@vectoriox/iox-ui 5.89.0 → 5.90.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.
- package/design-core/index.d.ts +523 -2
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +581 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +8489 -4897
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +12 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs +33 -6
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +3 -2
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +4140 -2890
- package/harness-core/index.d.ts +52 -3
- package/package.json +1 -1
- package/scene-core/index.d.ts +19 -2
- package/src/design-core/flavor-spec.generated.ts +500 -0
- package/src/design-core/font-metrics.ts +105 -0
- package/src/design-core/public-api.ts +1 -0
- package/src/generation-core/ai-run.ts +11 -0
- package/src/generation-core/audit-site.ts +5 -0
- package/src/generation-core/check-layout.ts +994 -0
- package/src/generation-core/compose-layout.ts +123 -34
- package/src/generation-core/compose-site.ts +122 -3
- package/src/generation-core/function-words.ts +14 -0
- package/src/generation-core/layout-drift.ts +78 -0
- package/src/generation-core/layout-edits.ts +122 -0
- package/src/generation-core/layout-fingerprint.ts +203 -0
- package/src/generation-core/layout-language.ts +205 -12
- package/src/generation-core/layout-look.ts +57 -0
- package/src/generation-core/layout-photos.ts +19 -0
- package/src/generation-core/layout-render-check.ts +275 -0
- package/src/generation-core/layout-section-fallback.ts +187 -0
- package/src/generation-core/layout-type.ts +48 -0
- package/src/generation-core/layout-wire.ts +282 -0
- package/src/generation-core/nav-shape.ts +23 -1
- package/src/generation-core/photo-inventory.ts +250 -0
- package/src/generation-core/plan-edits.ts +25 -2
- package/src/generation-core/plan-wire.ts +19 -2
- package/src/generation-core/public-api.ts +11 -0
- package/src/generation-core/site-plan.model.ts +16 -0
- package/src/generation-core/site-spec.generated.ts +760 -2
- package/src/generation-core/stock-match.ts +4 -3
- package/src/generation-core/validate-site-plan.ts +55 -1
- package/src/harness-core/generation-view.ts +52 -1
- package/src/scene-core/scroll-driver.ts +14 -2
- package/src/scene-core/scroll-range.ts +23 -3
- package/styles/iox-forms.css +4 -0
|
@@ -734,11 +734,28 @@ function parallaxShift(distance, viewHeight, options = {}) {
|
|
|
734
734
|
const shift = speed * Math.min(Math.max(0, distance) / 2, Math.max(0, viewHeight));
|
|
735
735
|
return Math.round(shift * 10) / 10;
|
|
736
736
|
}
|
|
737
|
+
/** Halfway through its range: where a depth stands in its place when the page opens with it out of sight. */
|
|
738
|
+
const PARALLAX_REST_DEFAULT = 0.5;
|
|
739
|
+
/**
|
|
740
|
+
* Where in its range a depth stands exactly in its place (iox-ui#65). A layer the page opens with on screen rests where it
|
|
741
|
+
* stands then — `opening`, its progress at the page's top — so the first screen is drawn as it was laid out and the glide
|
|
742
|
+
* starts with the scroll; one out of sight rests halfway. (Resting halfway, a hero paragraph at 664 of a 900px screen
|
|
743
|
+
* stood 74px low at the top of the page and ran under its buttons.)
|
|
744
|
+
*/
|
|
745
|
+
function parallaxRest(opening) {
|
|
746
|
+
return opening > 0 && opening < 1 ? Math.round(opening * 1000) / 1000 : PARALLAX_REST_DEFAULT;
|
|
747
|
+
}
|
|
748
|
+
/** How far a depth stands off its place at `progress` through its range, in px (down is positive): 0 at `rest`, moving
|
|
749
|
+
* at the same speed as ever — `shift` each way of a half range. */
|
|
750
|
+
function parallaxOffset(depth, shift, progress, rest = PARALLAX_REST_DEFAULT) {
|
|
751
|
+
const sign = depth === ParallaxDepth.Front ? -1 : 1;
|
|
752
|
+
return 2 * sign * shift * (progress - rest);
|
|
753
|
+
}
|
|
737
754
|
/** The frames of a parallax depth over its range: the individual `translate` property, so the element's own `transform`
|
|
738
755
|
* (a hover lift, an entrance) is never overwritten. */
|
|
739
|
-
function parallaxFrames(depth, shift) {
|
|
740
|
-
const
|
|
741
|
-
return [{ translate:
|
|
756
|
+
function parallaxFrames(depth, shift, rest = PARALLAX_REST_DEFAULT) {
|
|
757
|
+
const px = (v) => `0 ${Math.round(v * 10) / 10 || 0}px`;
|
|
758
|
+
return [{ translate: px(parallaxOffset(depth, shift, 0, rest)) }, { translate: px(parallaxOffset(depth, shift, 1, rest)) }];
|
|
742
759
|
}
|
|
743
760
|
/** A bar that fills along the reading direction: the individual `scale` property, from its reading start (iox-design.css). */
|
|
744
761
|
const PROGRESS_BAR_FRAMES = Object.freeze([{ scale: '0 1' }, { scale: '1 1' }]);
|
|
@@ -1180,7 +1197,7 @@ class ScrollDriver {
|
|
|
1180
1197
|
* frame exactly where the scroll is, with no glide.
|
|
1181
1198
|
*/
|
|
1182
1199
|
addLink(link) {
|
|
1183
|
-
const state = { link, progress: 0, target: 0, fresh: true, geometry: { distance: 0, viewHeight: 0 } };
|
|
1200
|
+
const state = { link, progress: 0, target: 0, fresh: true, geometry: { distance: 0, viewHeight: 0, opening: 0 } };
|
|
1184
1201
|
this.links.add(state);
|
|
1185
1202
|
this.wake();
|
|
1186
1203
|
return () => { this.links.delete(state); };
|
|
@@ -1268,9 +1285,19 @@ class ScrollDriver {
|
|
|
1268
1285
|
const { box, zoom } = layoutBoxOnScreen(state.link.measured, state.link.within ?? null);
|
|
1269
1286
|
const z = zoom || 1;
|
|
1270
1287
|
const target = rangeProgress(state.link.range, box, view);
|
|
1271
|
-
state.geometry = { distance: rangeDistance(state.link.range, box, view) / z, viewHeight: view.height / z };
|
|
1288
|
+
state.geometry = { distance: rangeDistance(state.link.range, box, view) / z, viewHeight: view.height / z, opening: this.openingOf(state.link, box, view) };
|
|
1272
1289
|
return { state, target };
|
|
1273
1290
|
}
|
|
1291
|
+
/** The link's progress with its page scrolled to the top: the page's top on the view's, the element where it stands in it. */
|
|
1292
|
+
openingOf(link, box, view) {
|
|
1293
|
+
if (link.range === ScrollRange.Page)
|
|
1294
|
+
return 0;
|
|
1295
|
+
const page = link.within ?? link.measured.ownerDocument?.documentElement ?? null;
|
|
1296
|
+
if (!page)
|
|
1297
|
+
return 0;
|
|
1298
|
+
const top = page.getBoundingClientRect().top;
|
|
1299
|
+
return rangeProgress(link.range, { top: view.top + (box.top - top), height: box.height }, view);
|
|
1300
|
+
}
|
|
1274
1301
|
read(scene) {
|
|
1275
1302
|
const rect = scene.root.getBoundingClientRect();
|
|
1276
1303
|
const origin = this.options.originOf?.(scene.root)?.getBoundingClientRect().top ?? 0;
|
|
@@ -1406,5 +1433,5 @@ function attachSceneRoots(roots, options = {}) {
|
|
|
1406
1433
|
* Generated bundle index. Do not edit.
|
|
1407
1434
|
*/
|
|
1408
1435
|
|
|
1409
|
-
export { LIGHT_UP_PIECE_CAP, PARALLAX_DEPTH_DEFAULT, PARALLAX_PHONE_FACTOR, PARALLAX_SPEED, PROGRESS_BAR_FRAMES, ParallaxDepth, ParallaxPhone, REVEAL_PIECE_CAP, SCENE_BUDGET, SCENE_DAMPING, SCENE_FILM_SMOOTH, SCENE_FLOW_RULES, 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_WAKE_EVENT, SCENE_WORDS, SCENE_WORD_DIM, SCROLL_RANGE_DEFAULT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneProp, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, applySceneFirstFrame, attachSceneRoots, attachScenes, buildSceneRecipe, colourAt, dampToward, gentleFrames, heldProgress, layoutBoxOnScreen, lightMotionWanted, lineIndexes, movedSceneKey, normalizeParallaxDepth, normalizeParallaxPhone, normalizeScrollRange, normalizeTracks, outermostNodeOf, parallaxFrames, parallaxShift, playTextReveal, rangeDistance, rangeEnds, rangeProgress, revealClipPath, revealStagger, sceneBudget, sceneColourKeyAt, sceneDisplayValue, sceneFilmDensity, sceneFirstFrame, sceneFrame, sceneFrameDeclarations, sceneHasKeyAt, sceneHeightForScreens, sceneKeyPosition, sceneLayersOf, sceneNodeAttributes, scenePlayed, sceneRevealFromOf, sceneRootOnPath, sceneRootsIn, sceneScreensOf, sceneScrollState, sceneTrackDef, sceneTrackSpan, sceneWordOpacity, sceneWordsLit, scenesIn, scrollPlayFor, splitText, syncSceneAttributes, textPieces, valueAt, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
|
|
1436
|
+
export { LIGHT_UP_PIECE_CAP, PARALLAX_DEPTH_DEFAULT, PARALLAX_PHONE_FACTOR, PARALLAX_REST_DEFAULT, PARALLAX_SPEED, PROGRESS_BAR_FRAMES, ParallaxDepth, ParallaxPhone, REVEAL_PIECE_CAP, SCENE_BUDGET, SCENE_DAMPING, SCENE_FILM_SMOOTH, SCENE_FLOW_RULES, 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_WAKE_EVENT, SCENE_WORDS, SCENE_WORD_DIM, SCROLL_RANGE_DEFAULT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneProp, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, applySceneFirstFrame, attachSceneRoots, attachScenes, buildSceneRecipe, colourAt, dampToward, gentleFrames, heldProgress, layoutBoxOnScreen, lightMotionWanted, lineIndexes, movedSceneKey, normalizeParallaxDepth, normalizeParallaxPhone, normalizeScrollRange, normalizeTracks, outermostNodeOf, parallaxFrames, parallaxOffset, parallaxRest, parallaxShift, playTextReveal, rangeDistance, rangeEnds, rangeProgress, revealClipPath, revealStagger, sceneBudget, sceneColourKeyAt, sceneDisplayValue, sceneFilmDensity, sceneFirstFrame, sceneFrame, sceneFrameDeclarations, sceneHasKeyAt, sceneHeightForScreens, sceneKeyPosition, sceneLayersOf, sceneNodeAttributes, scenePlayed, sceneRevealFromOf, sceneRootOnPath, sceneRootsIn, sceneScreensOf, sceneScrollState, sceneTrackDef, sceneTrackSpan, sceneWordOpacity, sceneWordsLit, scenesIn, scrollPlayFor, splitText, syncSceneAttributes, textPieces, valueAt, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
|
|
1410
1437
|
//# sourceMappingURL=vectoriox-iox-ui-scene-core.mjs.map
|