@vectoriox/iox-ui 5.47.0 → 5.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,9 +15,22 @@ export interface MotionInput {
15
15
  avoid?: ReadonlyArray<string>;
16
16
  }
17
17
 
18
+ /** Where the start came from, structured (the screen words it in its own language). */
19
+ export interface MotionBasis {
20
+ /** The kind of business it started from (null: no type matched, the style's own). */
21
+ type: string | null;
22
+ /** The style made How animated calmer than the business (or the references) wanted. */
23
+ calmerStyle: boolean;
24
+ /** The references set How animated. */
25
+ references: boolean;
26
+ /** The owner asked for little movement: all three were capped. */
27
+ littleMovement: boolean;
28
+ }
29
+
18
30
  export interface MotionStart extends DesignMotion {
19
31
  /** Why, in English — one line per step the start took. */
20
32
  why: string[];
33
+ basis: MotionBasis;
21
34
  }
22
35
 
23
36
  /** The owner asked for little movement (`USER_AVOID_IDS`). */
@@ -53,9 +66,11 @@ export function motionFor(
53
66
  const wanted = ref ?? base.animate;
54
67
  let out: DesignMotion = { scroll: base.scroll, animate: calmerChoice('animate', wanted, preset.moves.animate), between: base.between };
55
68
  const why = [type ? `${type.label}: ${triple(base)}` : `${preset.name}: the style's own`];
56
- if (out.animate !== wanted) why.push(`${preset.name} moves less (${label('animate', preset.moves.animate)})`);
57
- if (ref && type) why.push(`your references: ${label('animate', ref)}`);
69
+ const basis: MotionBasis = { type: type?.id ?? null, calmerStyle: out.animate !== wanted, references: !!(ref && type), littleMovement: false };
70
+ if (basis.calmerStyle) why.push(`${preset.name} moves less (${label('animate', preset.moves.animate)})`);
71
+ if (basis.references) why.push(`your references: ${label('animate', ref!)}`);
58
72
  if ((input.avoid ?? []).includes(LITTLE_MOVEMENT_AVOID)) {
73
+ basis.littleMovement = true;
59
74
  out = {
60
75
  scroll: calmerChoice('scroll', out.scroll, LITTLE_MOVEMENT_CAP.scroll),
61
76
  animate: calmerChoice('animate', out.animate, LITTLE_MOVEMENT_CAP.animate),
@@ -63,5 +78,5 @@ export function motionFor(
63
78
  };
64
79
  why.push('you asked for little movement');
65
80
  }
66
- return { ...out, why };
81
+ return { ...out, why, basis };
67
82
  }
@@ -16,3 +16,4 @@ export * from './needs';
16
16
  export * from './lint';
17
17
  export * from './site-analysis';
18
18
  export * from './prompt-context';
19
+ export * from './intake';