@vectoriox/iox-ui 5.140.0 → 5.142.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.
- package/assist-core/index.d.ts +19 -2
- package/design-core/index.d.ts +171 -2
- package/fesm2022/vectoriox-iox-ui-assist-core.mjs +29 -3
- package/fesm2022/vectoriox-iox-ui-assist-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +358 -172
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +1671 -861
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +49 -18
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs +32 -9
- package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +85 -4
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +525 -144
- package/harness-core/index.d.ts +18 -18
- package/index.d.ts +92 -2
- package/package.json +1 -1
- package/scene-core/index.d.ts +17 -1
- package/src/assist-core/assist-turn.ts +34 -2
- package/src/design-core/flavor-spec.generated.ts +141 -0
- package/src/design-core/ink-on-ground.ts +36 -0
- package/src/design-core/list-classes.ts +37 -0
- package/src/design-core/node-classes.ts +3 -2
- package/src/design-core/public-api.ts +2 -0
- package/src/generation-core/check-layout.ts +23 -1
- package/src/generation-core/check-list.ts +144 -5
- package/src/generation-core/compose-layout.ts +188 -23
- package/src/generation-core/compose-site.ts +14 -2
- package/src/generation-core/header-edit.ts +15 -11
- package/src/generation-core/layout-fingerprint.ts +5 -1
- package/src/generation-core/layout-language.ts +10 -0
- package/src/generation-core/layout-wire.ts +64 -24
- package/src/generation-core/list-panel.ts +122 -0
- package/src/generation-core/list-space.ts +205 -0
- package/src/generation-core/list-table.ts +101 -0
- package/src/generation-core/node-baselines.generated.ts +3 -1
- package/src/generation-core/public-api.ts +2 -0
- package/src/generation-core/serialized-node.ts +2 -0
- package/src/generation-core/site-plan.model.ts +6 -0
- package/src/generation-core/site-spec.generated.ts +188 -70
- package/src/generation-core/validate-site-plan.ts +8 -4
- package/src/harness-core/harness-spec.generated.ts +49 -18
- package/src/scene-core/split-text.ts +31 -7
- package/styles/iox-design.css +438 -4
|
@@ -862,6 +862,32 @@ const JOINED_SCRIPTS = /[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{S
|
|
|
862
862
|
function lettersSplittable(text) {
|
|
863
863
|
return !JOINED_SCRIPTS.test(text);
|
|
864
864
|
}
|
|
865
|
+
/** The pieces a letter split makes of `text`: the letters of its words (a letter with its points or a joined emoji is
|
|
866
|
+
* one). The spaces are no piece. */
|
|
867
|
+
function letterCount(text) {
|
|
868
|
+
const words = text.match(/\S+/g) ?? [];
|
|
869
|
+
return words.reduce((n, word) => n + graphemes(word).length, 0);
|
|
870
|
+
}
|
|
871
|
+
/** Why a reveal set to Letter by letter comes in by word for a text (AW10-D2). The values are the panel's words' keys. */
|
|
872
|
+
var LetterRefusal;
|
|
873
|
+
(function (LetterRefusal) {
|
|
874
|
+
/** A script whose letters join (Arabic, Indic, Thai…): pulled apart, each would show its isolated form. */
|
|
875
|
+
LetterRefusal["Joined"] = "letterJoined";
|
|
876
|
+
/** Longer than a display line: over `LETTER_PIECE_CAP` letters. */
|
|
877
|
+
LetterRefusal["Long"] = "letterLong";
|
|
878
|
+
})(LetterRefusal || (LetterRefusal = {}));
|
|
879
|
+
/**
|
|
880
|
+
* THE rule a letter split follows (AW10-D2): why `text` cannot come in letter by letter, or null when it can (an empty
|
|
881
|
+
* text refuses nothing — there is nothing to split). `splitForReveal` asks it before splitting, and the builder's panel
|
|
882
|
+
* asks it to SAY so before the text plays — one rule, so the two never disagree (vectoriox/iox-ui#107).
|
|
883
|
+
*/
|
|
884
|
+
function letterRefusalOf(text) {
|
|
885
|
+
if (!text)
|
|
886
|
+
return null;
|
|
887
|
+
if (!lettersSplittable(text))
|
|
888
|
+
return LetterRefusal.Joined;
|
|
889
|
+
return letterCount(text) > LETTER_PIECE_CAP ? LetterRefusal.Long : null;
|
|
890
|
+
}
|
|
865
891
|
const SKIPPED_TAGS = new Set(['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'SELECT', 'OPTION']);
|
|
866
892
|
const SHOW_TEXT = 4;
|
|
867
893
|
/** Hebrew through Arabic Extended, and their presentation forms. */
|
|
@@ -934,7 +960,7 @@ function splitText(root, options) {
|
|
|
934
960
|
const planned = texts.map(original => ({
|
|
935
961
|
original, parts: textPieces(original.nodeValue ?? '', keepRuns && !!options.rtl, keepRuns && !options.rtl),
|
|
936
962
|
}));
|
|
937
|
-
const pieceCount = (part) => (!part.word ? 0 : letters ?
|
|
963
|
+
const pieceCount = (part) => (!part.word ? 0 : letters ? letterCount(part.text) : 1);
|
|
938
964
|
const count = planned.reduce((sum, { parts }) => sum + parts.reduce((n, part) => n + pieceCount(part), 0), 0);
|
|
939
965
|
if (!count || count > options.cap)
|
|
940
966
|
return null;
|
|
@@ -1037,13 +1063,10 @@ function splitForReveal(el, by, look = TextRevealLook.Rise) {
|
|
|
1037
1063
|
return null;
|
|
1038
1064
|
const rtl = el.ownerDocument.defaultView?.getComputedStyle(el).direction === 'rtl';
|
|
1039
1065
|
const mask = look === TextRevealLook.Rise;
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
used = TextRevealBy.Word;
|
|
1045
|
-
split = splitText(el, { cap: REVEAL_PIECE_CAP, mask, rtl });
|
|
1046
|
-
}
|
|
1066
|
+
// The text a split reads: its text nodes, apart (a letter never joins across two of them).
|
|
1067
|
+
const used = by === TextRevealBy.Letter && letterRefusalOf(textNodesOf(el).map(t => t.nodeValue ?? '').join(' ')) ? TextRevealBy.Word : by;
|
|
1068
|
+
const letters = used === TextRevealBy.Letter;
|
|
1069
|
+
const split = splitText(el, { cap: letters ? LETTER_PIECE_CAP : REVEAL_PIECE_CAP, mask, rtl, letters });
|
|
1047
1070
|
if (!split)
|
|
1048
1071
|
return null;
|
|
1049
1072
|
const boxes = used === TextRevealBy.Line ? split.pieces.map(piece => (mask ? piece.parentElement : piece).getBoundingClientRect()) : [];
|
|
@@ -1602,5 +1625,5 @@ function attachSceneRoots(roots, options = {}) {
|
|
|
1602
1625
|
* Generated bundle index. Do not edit.
|
|
1603
1626
|
*/
|
|
1604
1627
|
|
|
1605
|
-
export { LETTER_PIECE_CAP, 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, SCRUB_PIECES_IN_FLIGHT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneProp, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, TextRevealLook, applySceneFirstFrame, attachSceneRoots, attachScenes, buildSceneRecipe, colourAt, dampToward, gentleFrames, heldProgress, layoutBoxOnScreen, lettersSplittable, 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, scrubPieceProgress, scrubTextReveal, splitForReveal, splitText, syncSceneAttributes, textPieces, textRevealByOf, textRevealLookOf, valueAt, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
|
|
1628
|
+
export { 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, 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, SCRUB_PIECES_IN_FLIGHT, SLIDER_HOLD_SHARE, SLIDER_SCROLL_STEP_SCREENS, SceneAttribute, SceneProp, SceneRevealFrom, ScrollActionKind, ScrollDriver, ScrollPlay, ScrollRange, TextRevealBy, TextRevealLook, applySceneFirstFrame, attachSceneRoots, attachScenes, buildSceneRecipe, colourAt, dampToward, gentleFrames, heldProgress, layoutBoxOnScreen, letterCount, letterRefusalOf, lettersSplittable, 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, scrubPieceProgress, scrubTextReveal, splitForReveal, splitText, syncSceneAttributes, textPieces, textRevealByOf, textRevealLookOf, valueAt, withSceneKey, withScenePlayback, withSceneRevealFrom, withoutSceneKey, withoutScenePlayback };
|
|
1606
1629
|
//# sourceMappingURL=vectoriox-iox-ui-scene-core.mjs.map
|