@vectoriox/iox-ui 5.48.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.
@@ -3778,11 +3778,13 @@ function motionFor(input, presetId, read = null, types = BUSINESS_TYPES, presets
3778
3778
  const wanted = ref ?? base.animate;
3779
3779
  let out = { scroll: base.scroll, animate: calmerChoice('animate', wanted, preset.moves.animate), between: base.between };
3780
3780
  const why = [type ? `${type.label}: ${triple(base)}` : `${preset.name}: the style's own`];
3781
- if (out.animate !== wanted)
3781
+ const basis = { type: type?.id ?? null, calmerStyle: out.animate !== wanted, references: !!(ref && type), littleMovement: false };
3782
+ if (basis.calmerStyle)
3782
3783
  why.push(`${preset.name} moves less (${label('animate', preset.moves.animate)})`);
3783
- if (ref && type)
3784
+ if (basis.references)
3784
3785
  why.push(`your references: ${label('animate', ref)}`);
3785
3786
  if ((input.avoid ?? []).includes(LITTLE_MOVEMENT_AVOID)) {
3787
+ basis.littleMovement = true;
3786
3788
  out = {
3787
3789
  scroll: calmerChoice('scroll', out.scroll, LITTLE_MOVEMENT_CAP.scroll),
3788
3790
  animate: calmerChoice('animate', out.animate, LITTLE_MOVEMENT_CAP.animate),
@@ -3790,7 +3792,7 @@ function motionFor(input, presetId, read = null, types = BUSINESS_TYPES, presets
3790
3792
  };
3791
3793
  why.push('you asked for little movement');
3792
3794
  }
3793
- return { ...out, why };
3795
+ return { ...out, why, basis };
3794
3796
  }
3795
3797
 
3796
3798
  /** Who asked for a need: the owner named it, or the kind of business needs it ("we added"). */
@@ -3890,13 +3892,23 @@ function lintDesign(site, typeId, types = BUSINESS_TYPES) {
3890
3892
  }
3891
3893
  }
3892
3894
  }
3893
- // Rev 3.1: two levels above what this kind of business usually wears (Subtle → Lively) is advice, never a block.
3894
- if (site.design.animate && ANIMATE_ORDER.indexOf(site.design.animate) >= ANIMATE_ORDER.indexOf(type.moves.animate) + ANIMATE_ADVICE_STEPS) {
3895
- const usual = SPEC_AXES.animations[type.moves.animate].label;
3895
+ const advice = motionAdvice(type.id, site.design.animate, types);
3896
+ if (advice) {
3897
+ const usual = SPEC_AXES.animations[advice.usual].label;
3896
3898
  out.push({ kind: LintKind.Look, say: `${type.label} sites usually move less (${usual}); this much movement as people scroll can feel restless.` });
3897
3899
  }
3898
3900
  return out;
3899
3901
  }
3902
+ /**
3903
+ * Rev 3.1: two levels above what this kind of business usually wears (Subtle → Lively) is advice, never a block.
3904
+ * Structured, so Design ▸ Motion says it in the studio's language: `usual` = the level the type wears.
3905
+ */
3906
+ function motionAdvice(typeId, animate, types = BUSINESS_TYPES) {
3907
+ const type = typeId ? types.find(t => t.id === typeId) : undefined;
3908
+ if (!type || !animate || !ANIMATE_ORDER.includes(animate))
3909
+ return null;
3910
+ return ANIMATE_ORDER.indexOf(animate) >= ANIMATE_ORDER.indexOf(type.moves.animate) + ANIMATE_ADVICE_STEPS ? { usual: type.moves.animate } : null;
3911
+ }
3900
3912
 
3901
3913
  /**
3902
3914
  * What the reading of a prompt returns (AI plan rev 3 §3d): one of the 30 kinds of business (and the two
@@ -4175,5 +4187,5 @@ function withoutAddress(text, address) {
4175
4187
  * Generated bundle index. Do not edit.
4176
4188
  */
4177
4189
 
4178
- export { ANIMATE_ADVICE_STEPS, AnalysisIssueCode, AnalysisLocale, AvoidCheck, BUSINESS_TYPES, BUSINESS_TYPE_IDS, BookingNeed, COPY_LENGTH_ORDER, CopyLength, HARNESS_SOURCE, LITTLE_MOVEMENT_AVOID, LITTLE_MOVEMENT_CAP, LintKind, MAX_ANALYSIS_MOODS, NEEDS, NEED_IDS, NeedSource, PresetFit, RANK_WEIGHTS, READ_ANIMATE, READ_WEIGHTS, RankReason, SPEC_ANALYSIS_SHAPE, SPEC_BUSINESS_TYPES, SPEC_HARNESS_EXAMPLES, SPEC_HARNESS_SOURCE, SPEC_NEEDS, SPEC_STRUCTURES, SPEC_USER_AVOIDS, STRUCTURES, StyleReadGround, StyleReadHeadings, StyleReadMotion, StyleReadSourceKind, USER_AVOID_IDS, VoiceFormality, VoicePerson, addressesIn, analysisPromptContext, businessTypeById, calmerChoice, inferNeeds, isLookRule, lintDesign, lookMatches, mapStyleRead, matchBusinessType, matchBusinessTypes, motionFor, normalizeAddress, oklchHue, presetHasSerifHeadings, presetLook, rankStylePresets, rankWithReferences, userAvoidRule, validateSiteAnalysis, withoutAddress };
4190
+ export { ANIMATE_ADVICE_STEPS, AnalysisIssueCode, AnalysisLocale, AvoidCheck, BUSINESS_TYPES, BUSINESS_TYPE_IDS, BookingNeed, COPY_LENGTH_ORDER, CopyLength, HARNESS_SOURCE, LITTLE_MOVEMENT_AVOID, LITTLE_MOVEMENT_CAP, LintKind, MAX_ANALYSIS_MOODS, NEEDS, NEED_IDS, NeedSource, PresetFit, RANK_WEIGHTS, READ_ANIMATE, READ_WEIGHTS, RankReason, SPEC_ANALYSIS_SHAPE, SPEC_BUSINESS_TYPES, SPEC_HARNESS_EXAMPLES, SPEC_HARNESS_SOURCE, SPEC_NEEDS, SPEC_STRUCTURES, SPEC_USER_AVOIDS, STRUCTURES, StyleReadGround, StyleReadHeadings, StyleReadMotion, StyleReadSourceKind, USER_AVOID_IDS, VoiceFormality, VoicePerson, addressesIn, analysisPromptContext, businessTypeById, calmerChoice, inferNeeds, isLookRule, lintDesign, lookMatches, mapStyleRead, matchBusinessType, matchBusinessTypes, motionAdvice, motionFor, normalizeAddress, oklchHue, presetHasSerifHeadings, presetLook, rankStylePresets, rankWithReferences, userAvoidRule, validateSiteAnalysis, withoutAddress };
4179
4191
  //# sourceMappingURL=vectoriox-iox-ui-harness-core.mjs.map