@vectoriox/iox-ui 5.205.0 → 5.206.1

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.
Files changed (49) hide show
  1. package/data-core/index.d.ts +13 -4
  2. package/design-core/index.d.ts +269 -6
  3. package/fesm2022/vectoriox-iox-ui-data-core.mjs +23 -4
  4. package/fesm2022/vectoriox-iox-ui-data-core.mjs.map +1 -1
  5. package/fesm2022/vectoriox-iox-ui-design-core.mjs +3064 -2682
  6. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  7. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +1184 -173
  8. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  9. package/fesm2022/vectoriox-iox-ui-harness-core.mjs +71 -19
  10. package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
  11. package/fesm2022/vectoriox-iox-ui-scene-core.mjs +32 -4
  12. package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
  13. package/generation-core/index.d.ts +421 -34
  14. package/harness-core/index.d.ts +52 -12
  15. package/package.json +1 -1
  16. package/scene-core/index.d.ts +16 -2
  17. package/src/data-core/placeholder-rows.ts +24 -3
  18. package/src/design-core/colour-eval.ts +22 -0
  19. package/src/design-core/contrast-audit.ts +96 -2
  20. package/src/design-core/design-token.model.ts +2 -0
  21. package/src/design-core/flavor-spec.generated.ts +184 -0
  22. package/src/design-core/font-metrics.ts +14 -1
  23. package/src/design-core/font-vertical.ts +80 -0
  24. package/src/design-core/public-api.ts +1 -0
  25. package/src/design-core/style-presets.ts +20 -1
  26. package/src/design-core/token-css.ts +3 -1
  27. package/src/generation-core/audit-site.ts +5 -3
  28. package/src/generation-core/compose-free.ts +1 -1
  29. package/src/generation-core/compose-layout.ts +197 -23
  30. package/src/generation-core/critic-calibration.ts +26 -9
  31. package/src/generation-core/critic-numbers.ts +259 -0
  32. package/src/generation-core/critic-prompt.ts +53 -6
  33. package/src/generation-core/critic-rubric.generated.ts +6 -6
  34. package/src/generation-core/critic-sheet.ts +112 -1
  35. package/src/generation-core/layout-render-check.ts +35 -2
  36. package/src/generation-core/layout-space.ts +2 -1
  37. package/src/generation-core/nav-shape.ts +67 -8
  38. package/src/generation-core/opening-mix.ts +61 -17
  39. package/src/generation-core/public-api.ts +2 -0
  40. package/src/generation-core/social-links.ts +47 -8
  41. package/src/generation-core/stock-photos.ts +149 -14
  42. package/src/generation-core/stock-search.ts +108 -19
  43. package/src/generation-core/stock-subjects.ts +204 -0
  44. package/src/harness-core/business-types.ts +3 -0
  45. package/src/harness-core/harness-spec.generated.ts +54 -15
  46. package/src/harness-core/intake.ts +18 -5
  47. package/src/scene-core/scene.ts +34 -3
  48. package/styles/iox-design.css +41 -2
  49. package/styles/iox-forms.css +7 -6
@@ -203,9 +203,37 @@ function validKey(key, colour) {
203
203
  return false;
204
204
  return colour ? typeof value === 'string' && COLOUR.test(value) : typeof value === 'number' && Number.isFinite(value);
205
205
  }
206
+ /** What a track is plotted on: its property, its range and, for a Clip, its direction — one timeline each. */
207
+ const timelineOf = (track) => `${track.prop}|${track.range ?? SceneRange.Hold}|${track.prop === SceneProp.Clip ? track.from ?? '' : ''}`;
208
+ /**
209
+ * Tracks on ONE timeline (the same property and range; a Clip's same direction) are pieces of one movement: their keys
210
+ * merge into the first one's track, ascending by progress (an exact repeat dropped), its ease kept. A step that fades in
211
+ * and later out (`[0.4, 0] → [0.5, 1]` and `[0.6, 1] → [0.7, 0]`) reads as one track — read as two, the later piece held
212
+ * its first key before it began and the step stood at full opacity over the step before it (iox-ui#195). The one rule
213
+ * both renderers read through `normalizeTracks`, and the composer stamps its tracks with. Pure.
214
+ */
215
+ function mergeSceneTracks(tracks) {
216
+ const out = [];
217
+ const at = new Map();
218
+ for (const track of tracks) {
219
+ const line = timelineOf(track);
220
+ const i = at.get(line);
221
+ if (i === undefined) {
222
+ at.set(line, out.length);
223
+ out.push(track);
224
+ continue;
225
+ }
226
+ const keys = [...out[i].keys, ...track.keys]
227
+ .sort((a, b) => a[0] - b[0])
228
+ .filter((key, k, all) => !k || all[k - 1][0] !== key[0] || all[k - 1][1] !== key[1]);
229
+ out[i] = { ...out[i], keys };
230
+ }
231
+ return out;
232
+ }
206
233
  /**
207
234
  * The tracks a saved value really holds: unknown properties, bad keys and colours that are not colours are dropped,
208
- * keys sorted by progress, a track left with no key dropped. Never throws on what a page document holds.
235
+ * keys sorted by progress, a track left with no key dropped, and tracks on one timeline merged (`mergeSceneTracks`).
236
+ * Never throws on what a page document holds.
209
237
  */
210
238
  function normalizeTracks(tracks) {
211
239
  if (!Array.isArray(tracks))
@@ -230,7 +258,7 @@ function normalizeTracks(tracks) {
230
258
  ...(typeof range === 'string' && RANGES$1.has(range) && range !== SceneRange.Hold ? { range } : {}),
231
259
  });
232
260
  }
233
- return out;
261
+ return mergeSceneTracks(out);
234
262
  }
235
263
  /**
236
264
  * A Clip track with a direction. One with none was saved when a reveal could only close in from every side, its value
@@ -327,7 +355,7 @@ const TRANSFORM_REST = { [SceneProp.X]: 0, [SceneProp.Y]: 0, [SceneProp.Scale]:
327
355
  */
328
356
  function sceneFrame(tracks, p, options = {}) {
329
357
  const frame = {};
330
- // Per property and range, the last track wins (as one list always read). Across ranges they compose: a hold that
358
+ // Per property and range, the last track wins (normalized tracks hold one per timeline — `mergeSceneTracks`). Across ranges they compose: a hold that
331
359
  // carries a layer and an exit that sinks it add their moves, and their scales and opacities multiply.
332
360
  const byRange = new Map();
333
361
  for (const track of tracks) {
@@ -2241,5 +2269,5 @@ function onSceneLand(el, run, host = window) {
2241
2269
  * Generated bundle index. Do not edit.
2242
2270
  */
2243
2271
 
2244
- export { ARRIVE_ELEMENT_OPTIONS, ARRIVE_SCREEN_OPTIONS, ARRIVE_SHARE, LENIS_SMOOTH_CLASS, LETTER_PIECE_CAP, LIGHT_UP_PIECE_CAP, LetterRefusal, PARALLAX_DEPTH_DEFAULT, PARALLAX_PHONE_FACTOR, PARALLAX_REST_DEFAULT, PARALLAX_SPEED, PROGRESS_BAR_FRAMES, ParallaxDepth, ParallaxPhone, REVEAL_PIECE_CAP, REVEAL_STAGGER_MAX_MS, SCENE_BUDGET, SCENE_DAMPING, SCENE_FILM_SMOOTH, SCENE_FLOW_RULES, SCENE_LAND_EVENT, SCENE_LAND_TRIGGER, SCENE_LENGTH, SCENE_MAX_SCREENS, SCENE_MIN_SCREENS, SCENE_PHONE_LENGTH, SCENE_PHONE_MAX_WIDTH, SCENE_REDUCED_MOTION_CSS, SCENE_REVEAL_DEFAULT, SCENE_STAGE_HEIGHT, SCENE_TRACK_DEFS, SCENE_TRACK_EASE, SCENE_WAKE_EVENT, SCENE_WORDS, SCENE_WORD_DIM, SCROLL_RANGE_DEFAULT, SCRUB_PIECES_IN_FLIGHT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneEase, SceneProp, SceneRange, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, TextRevealLook, applySceneFirstFrame, arrivedWithin, attachSceneRoots, attachScenes, boxInside, buildSceneRecipe, colourAt, crossesStage, crossingOf, dampToward, followToward, gentleFrames, heldProgress, holdLookAt, isHoldTrack, layoutBoxOnScreen, letterCount, letterRefusalOf, lettersSplittable, lightMotionWanted, lineIndexes, movedSceneKey, normalizeParallaxDepth, normalizeParallaxPhone, normalizeScrollRange, normalizeTracks, onSceneLand, outermostNodeOf, pageScroller, parallaxFrames, parallaxOffset, parallaxRest, parallaxShift, playTextReveal, progressShowingFocus, progressShowingStep, rangeDistance, rangeEnds, rangeProgress, revealClipPath, revealStagger, sceneBudget, sceneColourKeyAt, sceneDisplayValue, sceneFilmDensity, sceneFirstFrame, sceneFrame, sceneFrameDeclarations, sceneHasKeyAt, sceneHeightForScreens, sceneKeyPosition, sceneLayersOf, sceneNodeAttributes, scenePlayed, sceneRevealFromOf, sceneRootOnPath, sceneRootsIn, sceneScreensOf, sceneScrollAlong, sceneScrollState, sceneTrackDef, sceneTrackSpan, sceneWordOpacity, sceneWordsLit, scenesIn, scrollPlayFor, scrollSubpixel, scrubPieceProgress, scrubTextReveal, setPageScroller, splitForReveal, splitText, stepLanding, syncSceneAttributes, textPieces, textRevealByOf, textRevealLookOf, textRevealStaggerOf, trackColourAt, trackEase, trackProgress, trackRange, trackValueAt, travellingLayerOf, unmovedBox, valueAt, watchArrival, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
2272
+ export { ARRIVE_ELEMENT_OPTIONS, ARRIVE_SCREEN_OPTIONS, ARRIVE_SHARE, LENIS_SMOOTH_CLASS, LETTER_PIECE_CAP, LIGHT_UP_PIECE_CAP, LetterRefusal, PARALLAX_DEPTH_DEFAULT, PARALLAX_PHONE_FACTOR, PARALLAX_REST_DEFAULT, PARALLAX_SPEED, PROGRESS_BAR_FRAMES, ParallaxDepth, ParallaxPhone, REVEAL_PIECE_CAP, REVEAL_STAGGER_MAX_MS, SCENE_BUDGET, SCENE_DAMPING, SCENE_FILM_SMOOTH, SCENE_FLOW_RULES, SCENE_LAND_EVENT, SCENE_LAND_TRIGGER, SCENE_LENGTH, SCENE_MAX_SCREENS, SCENE_MIN_SCREENS, SCENE_PHONE_LENGTH, SCENE_PHONE_MAX_WIDTH, SCENE_REDUCED_MOTION_CSS, SCENE_REVEAL_DEFAULT, SCENE_STAGE_HEIGHT, SCENE_TRACK_DEFS, SCENE_TRACK_EASE, SCENE_WAKE_EVENT, SCENE_WORDS, SCENE_WORD_DIM, SCROLL_RANGE_DEFAULT, SCRUB_PIECES_IN_FLIGHT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneEase, SceneProp, SceneRange, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, TextRevealLook, applySceneFirstFrame, arrivedWithin, attachSceneRoots, attachScenes, boxInside, buildSceneRecipe, colourAt, crossesStage, crossingOf, dampToward, followToward, gentleFrames, heldProgress, holdLookAt, isHoldTrack, layoutBoxOnScreen, letterCount, letterRefusalOf, lettersSplittable, lightMotionWanted, lineIndexes, mergeSceneTracks, movedSceneKey, normalizeParallaxDepth, normalizeParallaxPhone, normalizeScrollRange, normalizeTracks, onSceneLand, outermostNodeOf, pageScroller, parallaxFrames, parallaxOffset, parallaxRest, parallaxShift, playTextReveal, progressShowingFocus, progressShowingStep, rangeDistance, rangeEnds, rangeProgress, revealClipPath, revealStagger, sceneBudget, sceneColourKeyAt, sceneDisplayValue, sceneFilmDensity, sceneFirstFrame, sceneFrame, sceneFrameDeclarations, sceneHasKeyAt, sceneHeightForScreens, sceneKeyPosition, sceneLayersOf, sceneNodeAttributes, scenePlayed, sceneRevealFromOf, sceneRootOnPath, sceneRootsIn, sceneScreensOf, sceneScrollAlong, sceneScrollState, sceneTrackDef, sceneTrackSpan, sceneWordOpacity, sceneWordsLit, scenesIn, scrollPlayFor, scrollSubpixel, scrubPieceProgress, scrubTextReveal, setPageScroller, splitForReveal, splitText, stepLanding, syncSceneAttributes, textPieces, textRevealByOf, textRevealLookOf, textRevealStaggerOf, trackColourAt, trackEase, trackProgress, trackRange, trackValueAt, travellingLayerOf, unmovedBox, valueAt, watchArrival, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
2245
2273
  //# sourceMappingURL=vectoriox-iox-ui-scene-core.mjs.map