@vectoriox/iox-ui 5.78.0 → 5.79.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.
@@ -1 +1 @@
1
- {"version":3,"file":"vectoriox-iox-ui-scene-core.mjs","sources":["../../../projects/iox-ui/src/scene-core/scene.ts","../../../projects/iox-ui/src/scene-core/scene-edit.ts","../../../projects/iox-ui/src/scene-core/scene-recipe.ts","../../../projects/iox-ui/src/scene-core/split-text.ts","../../../projects/iox-ui/src/scene-core/scroll-driver.ts","../../../projects/iox-ui/src/scene-core/public-api.ts","../../../projects/iox-ui/src/scene-core/vectoriox-iox-ui-scene-core.ts"],"sourcesContent":["import { SceneRole } from '@vectoriox/iox-ui/composite-core';\nimport { FRAMES_PHONE_MAX_WIDTH, VideoAttribute, VideoClass } from '@vectoriox/iox-ui/media-core';\n\n/**\n * A Scene's data and maths (premium-sites plan §5b). A Scene is a recipe of ordinary nodes — a tall Section, a pinned\n * stage inside it, ordinary nodes as layers — so every word stays real, bound and translatable, and all three render\n * paths already draw it. What moves a layer is its OWN `sceneTracks`, never a list on the root naming layer ids: a clone\n * copies them with the layer, a delete takes them with it, and there is no id to remap.\n *\n * The vocabulary is closed. Every property is one the compositor can run without layout (CLS stays 0): a saved value\n * outside it is dropped when read, so a page document can never write CSS through a track.\n */\n\nexport enum SceneProp {\n /** Along the inline axis, in % of the stage's width. Positive runs toward the inline END (mirrored in RTL). */\n X = 'x',\n /** Down, in % of the stage's height. */\n Y = 'y',\n Scale = 'scale',\n /** Degrees. */\n Rotate = 'rotate',\n /** 0–1. */\n Opacity = 'opacity',\n /** How much of the layer shows, in % (100 = whole, 0 = gone). Its track's `from` says where it opens from. */\n Clip = 'clip',\n /** How many of the layer's words are lit, in % (100 = all): the word-by-word light-up. Split in the browser only. */\n Words = 'words',\n /** How much of a Video layer's pictures have played, in % (100 = the last picture). */\n Play = 'play',\n /** The layer's background colour. */\n Ground = 'ground',\n /** The layer's text colour. */\n Ink = 'ink',\n}\n\n/** Where a reveal opens from. Start and End mirror in RTL. */\nexport enum SceneRevealFrom {\n Centre = 'centre',\n Bottom = 'bottom',\n Top = 'top',\n Start = 'start',\n End = 'end',\n}\n\n/** What a reveal opens from when nobody has said: the page's own direction of travel, upward as it scrolls. */\nexport const SCENE_REVEAL_DEFAULT = SceneRevealFrom.Bottom;\n\n/** One key: at progress `[0]` (0–1) the property holds `[1]`: a number, or a colour for Ground and Ink. */\nexport type SceneKey = readonly [number, number | string];\n\nexport interface SceneTrack {\n prop: SceneProp;\n /** Ascending by progress. Between two keys the value eases (smoothstep); outside them it holds the nearest. */\n keys: ReadonlyArray<SceneKey>;\n /** A Clip track's direction. */\n from?: SceneRevealFrom;\n}\n\n/** What a node carries (both a builder node and a saved one). */\nexport interface SceneNodeSource {\n role?: string | null;\n /** How this layer moves, from the wide layout down to the phone's. */\n sceneTracks?: ReadonlyArray<SceneTrack> | null;\n /** How it moves at phone width instead (`SCENE_PHONE_MAX_WIDTH`). Absent = the same tracks. */\n scenePhoneTracks?: ReadonlyArray<SceneTrack> | null;\n}\n\n/** A frame as inline-style properties (camelCase, as `CSSStyleDeclaration` and `Object.assign` take them). */\nexport interface SceneFrame {\n transform?: string;\n opacity?: string;\n clipPath?: string;\n backgroundColor?: string;\n color?: string;\n /** A layer faded right out takes no clicks: it would sit invisibly over what is under it. `''` clears it. */\n pointerEvents?: string;\n}\n\nexport enum SceneAttribute {\n Root = 'data-iox-scene',\n Tracks = 'data-iox-tracks',\n PhoneTracks = 'data-iox-tracks-phone',\n}\n\n/** At or under this stage width a layer plays its phone tracks. The `mobile` breakpoint's width. */\nexport const SCENE_PHONE_MAX_WIDTH = FRAMES_PHONE_MAX_WIDTH;\n\nconst DECIMALS = 10000;\nconst round = (v: number): number => Math.round(v * DECIMALS) / DECIMALS;\nconst clamp01 = (v: number): number => Math.min(1, Math.max(0, v));\nconst smoothstep = (t: number): number => t * t * (3 - 2 * t);\n\n/** A colour a track may hold: a hex, an rgb()/hsl() literal, or a design token. Anything else could break out of the\n * inline style it lands in. */\nconst COLOUR = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\\([\\d\\s.,%/]+\\)|var\\(--iox-[\\w-]+\\))$/i;\nconst COLOUR_PROPS: ReadonlySet<SceneProp> = new Set([SceneProp.Ground, SceneProp.Ink]);\nconst ALL_PROPS: ReadonlySet<string> = new Set(Object.values(SceneProp));\nconst REVEAL_FROMS: ReadonlySet<string> = new Set(Object.values(SceneRevealFrom));\nconst PERCENT = 100;\nconst clampPercent = (v: number): number => Math.min(PERCENT, Math.max(0, v));\n\nfunction validKey(key: unknown, colour: boolean): key is SceneKey {\n if (!Array.isArray(key) || key.length !== 2) return false;\n const [p, value] = key;\n if (typeof p !== 'number' || !Number.isFinite(p) || p < 0 || p > 1) return false;\n return colour ? typeof value === 'string' && COLOUR.test(value) : typeof value === 'number' && Number.isFinite(value);\n}\n\n/**\n * The tracks a saved value really holds: unknown properties, bad keys and colours that are not colours are dropped,\n * keys sorted by progress, a track left with no key dropped. Never throws on what a page document holds.\n */\nexport function normalizeTracks(tracks: unknown): SceneTrack[] {\n if (!Array.isArray(tracks)) return [];\n const out: SceneTrack[] = [];\n for (const track of tracks) {\n const prop = (track as SceneTrack | null)?.prop;\n if (!prop || !ALL_PROPS.has(prop) || !Array.isArray((track as SceneTrack).keys)) continue;\n const keys = (track as SceneTrack).keys\n .filter(key => validKey(key, COLOUR_PROPS.has(prop)))\n .slice()\n .sort((a, b) => a[0] - b[0]);\n if (!keys.length) continue;\n out.push(prop === SceneProp.Clip ? clipTrack(keys, (track as SceneTrack).from) : { prop, keys });\n }\n return out;\n}\n\n/**\n * A Clip track with a direction. One with none was saved when a reveal could only close in from every side, its value\n * the inset per side (50 = gone): it reads as the same movement, from the centre, in % showing.\n */\nfunction clipTrack(keys: ReadonlyArray<SceneKey>, from: unknown): SceneTrack {\n if (typeof from === 'string' && REVEAL_FROMS.has(from)) return { prop: SceneProp.Clip, from: from as SceneRevealFrom, keys };\n return { prop: SceneProp.Clip, from: SceneRevealFrom.Centre, keys: keys.map(([p, inset]): SceneKey => [p, clampPercent(PERCENT - Number(inset) * 2)]) };\n}\n\n/**\n * The clip-path of a layer `showing` % revealed, opening from `from`. The one shape behind a Scene's Clip track and the\n * clipReveal action. `clip-path` has no logical sides, so Start and End take the direction from `inlineSign`.\n */\nexport function revealClipPath(showing: number, from: SceneRevealFrom = SCENE_REVEAL_DEFAULT, inlineSign: 1 | -1 = 1): string {\n const hidden = round(PERCENT - clampPercent(showing));\n switch (from) {\n case SceneRevealFrom.Centre: return `inset(${round(hidden / 2)}%)`;\n case SceneRevealFrom.Top: return `inset(0 0 ${hidden}% 0)`;\n case SceneRevealFrom.Start: return inlineSign === 1 ? `inset(0 ${hidden}% 0 0)` : `inset(0 0 0 ${hidden}%)`;\n case SceneRevealFrom.End: return inlineSign === 1 ? `inset(0 0 0 ${hidden}%)` : `inset(0 ${hidden}% 0 0)`;\n default: return `inset(${hidden}% 0 0 0)`;\n }\n}\n\nconst linear = (t: number): number => t;\n\n/** The two keys around `p` and how far between them it has come. */\nfunction span(keys: ReadonlyArray<SceneKey>, p: number, ease: (t: number) => number = smoothstep): { a: SceneKey; b: SceneKey; f: number } {\n const at = clamp01(p);\n if (at <= keys[0][0]) return { a: keys[0], b: keys[0], f: 0 };\n for (let i = 1; i < keys.length; i++) {\n if (at <= keys[i][0]) {\n const a = keys[i - 1];\n const b = keys[i];\n const width = b[0] - a[0];\n return { a, b, f: width > 0 ? ease((at - a[0]) / width) : 1 };\n }\n }\n const last = keys[keys.length - 1];\n return { a: last, b: last, f: 0 };\n}\n\n/** A numeric track's value at progress `p`. */\nexport function valueAt(keys: ReadonlyArray<SceneKey>, p: number, ease?: (t: number) => number): number {\n if (!keys.length) return 0;\n const { a, b, f } = span(keys, p, ease);\n const from = Number(a[1]);\n return round(from + (Number(b[1]) - from) * f);\n}\n\n/**\n * A colour track's value at progress `p`. Mixed by the browser, never computed here, so a design token stays a live\n * reference (a re-theme reaches a Scene, as it reaches every saved page) and the path is perceptual.\n */\nexport function colourAt(keys: ReadonlyArray<SceneKey>, p: number): string {\n if (!keys.length) return '';\n const { a, b, f } = span(keys, p);\n if (f <= 0 || a === b) return String(a[1]);\n if (f >= 1) return String(b[1]);\n return `color-mix(in oklab, ${a[1]} ${round((1 - f) * 100)}%, ${b[1]})`;\n}\n\nexport interface SceneFrameOptions {\n /** -1 when the stage reads right-to-left: the inline axis mirrors. */\n inlineSign?: 1 | -1;\n}\n\n/** What the tracks' transform-family properties rest at when a layer has no track for one. */\nconst TRANSFORM_REST: Readonly<Partial<Record<SceneProp, number>>> = { [SceneProp.X]: 0, [SceneProp.Y]: 0, [SceneProp.Scale]: 1, [SceneProp.Rotate]: 0 };\n\n/**\n * A layer's frame at progress `p`. Lengths are container-query units, so one frame is right at any width, under any\n * canvas zoom, on the server and with no measuring: the stage is the size container (`iox-design.css`).\n */\nexport function sceneFrame(tracks: ReadonlyArray<SceneTrack>, p: number, options: SceneFrameOptions = {}): SceneFrame {\n const frame: SceneFrame = {};\n const moves: Partial<Record<SceneProp, number>> = {};\n for (const { prop, keys, from } of tracks) {\n if (prop in TRANSFORM_REST) moves[prop] = valueAt(keys, p);\n else if (prop === SceneProp.Opacity) {\n const opacity = clamp01(valueAt(keys, p));\n frame.opacity = String(opacity);\n frame.pointerEvents = opacity > 0 ? '' : 'none';\n }\n else if (prop === SceneProp.Clip) frame.clipPath = revealClipPath(valueAt(keys, p), from ?? SceneRevealFrom.Centre, options.inlineSign ?? 1);\n else if (prop === SceneProp.Ground) frame.backgroundColor = colourAt(keys, p);\n else if (prop === SceneProp.Ink) frame.color = colourAt(keys, p);\n }\n if (Object.keys(moves).length) {\n const value = (prop: SceneProp): number => moves[prop] ?? TRANSFORM_REST[prop]!;\n const x = round(value(SceneProp.X) * (options.inlineSign ?? 1));\n frame.transform = `translate3d(${x}cqw, ${value(SceneProp.Y)}cqh, 0) rotate(${value(SceneProp.Rotate)}deg) scale(${value(SceneProp.Scale)})`;\n }\n return frame;\n}\n\n/** How far an unlit word still shows: readable as a shape, plainly not yet said. */\nexport const SCENE_WORD_DIM = 0.16;\n\n/** How many of a layer's words are lit at `p`, in %; null when it has no such track. */\nexport function sceneWordsLit(tracks: ReadonlyArray<SceneTrack>, p: number): number | null {\n const track = tracks.find(t => t.prop === SceneProp.Words);\n return track ? clampPercent(valueAt(track.keys, p)) : null;\n}\n\n/**\n * How far a layer's pictures have played at `p`, in %; null when it has no such track. A film runs straight between its\n * keys, where everything else eases: eased over a 20-screen Scene it would crawl for its first screens and rush the middle.\n */\nexport function scenePlayed(tracks: ReadonlyArray<SceneTrack>, p: number): number | null {\n const track = tracks.find(t => t.prop === SceneProp.Play);\n return track ? clampPercent(valueAt(track.keys, p, linear)) : null;\n}\n\n/** Word `index` of `count`, with `lit` % lit: words light one after the other, each easing in as the last finishes. */\nexport function sceneWordOpacity(index: number, count: number, lit: number): number {\n return round(SCENE_WORD_DIM + (1 - SCENE_WORD_DIM) * clamp01((lit / PERCENT) * count - index));\n}\n\nconst CSS_NAME: Readonly<Record<keyof SceneFrame, string>> = {\n transform: 'transform',\n opacity: 'opacity',\n clipPath: 'clip-path',\n backgroundColor: 'background-color',\n color: 'color',\n pointerEvents: 'pointer-events',\n};\n\n/** A frame as kebab-case style declarations, for a string renderer. */\nexport function sceneFrameDeclarations(frame: SceneFrame): Record<string, string> {\n const out: Record<string, string> = {};\n for (const [key, value] of Object.entries(frame)) if (value) out[CSS_NAME[key as keyof SceneFrame]] = value;\n return out;\n}\n\n/** The attributes a node's own element carries — the same decision in all three render paths. The runtime reads them,\n * so it needs no node tree and is the same on every path. Empty for any node that is no part of a Scene. */\nexport function sceneNodeAttributes(node: SceneNodeSource | null | undefined): Record<string, string> {\n const attrs: Record<string, string> = {};\n if (node?.role === SceneRole.Scene) attrs[SceneAttribute.Root] = '';\n const tracks = normalizeTracks(node?.sceneTracks);\n const phone = normalizeTracks(node?.scenePhoneTracks);\n if (tracks.length) attrs[SceneAttribute.Tracks] = JSON.stringify(tracks);\n if (phone.length) attrs[SceneAttribute.PhoneTracks] = JSON.stringify(phone);\n return attrs;\n}\n\n/** The frame a layer ships in from the server: where it stands before anyone has scrolled. Without it the page would\n * paint every layer at once, and then jump when the script arrives. */\nexport function sceneFirstFrame(node: SceneNodeSource | null | undefined): SceneFrame {\n const tracks = normalizeTracks(node?.sceneTracks);\n const frame = sceneFrame(tracks, 0);\n // The words are split in the browser, so until then the whole layer stands for them, or it paints lit and then dims.\n const lit = sceneWordsLit(tracks, 0);\n return lit !== null && lit < PERCENT && frame.opacity === undefined ? { ...frame, opacity: String(SCENE_WORD_DIM) } : frame;\n}\n\n/**\n * Make an element carry its node's Scene attributes: the live sync on the canvas and the component path's stamp.\n * Removes stale ones, touches nothing else.\n */\nexport function syncSceneAttributes(el: HTMLElement | null | undefined, node: SceneNodeSource | null | undefined): void {\n if (!el?.setAttribute) return;\n const attrs = sceneNodeAttributes(node);\n for (const name of Object.values(SceneAttribute)) {\n if (name in attrs) el.setAttribute(name, attrs[name]);\n else el.removeAttribute(name);\n }\n}\n\n/** Stamp a layer's first frame on its element (the component path, on the server too). */\nexport function applySceneFirstFrame(el: HTMLElement | null | undefined, node: SceneNodeSource | null | undefined): void {\n if (!el?.style) return;\n for (const [name, value] of Object.entries(sceneFrameDeclarations(sceneFirstFrame(node)))) el.style.setProperty(name, value);\n}\n\n/**\n * Where nothing will drive it (reduced motion, no script) a Scene is ordinary content: it flows, every layer in its\n * place and in its own look, every word readable. `!important` because it must beat a node's compiled height and\n * position, and the inline first frame. The engine wraps it in a reduced-motion query and in `<noscript>`.\n */\nexport const SCENE_FLOW_RULES = `.iox-role-scene{height:auto!important}`\n // A stage's layers are placed over one another for the scroll to move. With no scroll they stand one after the other, or\n // every word lands on the last. The stage isolates, so a film laid behind the words stays in front of its background.\n + `.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important;display:flex!important;flex-direction:column!important;gap:clamp(40px,8vw,72px)!important;padding:clamp(72px,10vw,96px) clamp(16px,4vw,32px)!important;isolation:isolate}`\n + `.iox-role-scene-stage>*{position:relative!important;inset:auto!important;max-width:100%!important}`\n // On the component path a node stands inside its host, so that is where its own placement has to go.\n + `.iox-role-scene-stage>[class*=\"iox-outer-\"]>[class*=\"iox-node-\"]{position:relative!important;inset:auto!important}`\n + `[${SceneAttribute.Tracks}]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}`\n // A row the scroll slid sideways has no scroll to slide it now: it wraps, or its last items run off the side of a phone.\n + `[${SceneAttribute.Tracks}]{max-width:100%!important;flex-wrap:wrap!important}`\n // A Video the scroll plays stands as its poster, at the poster's own height: a percent of a stage that now flows is nothing.\n + `[${VideoAttribute.Frames}]{height:auto!important}`\n // On the component path it stands inside a host that took no height from it, so the host steps out of the layout.\n + `iox-video:has(>[${VideoAttribute.Frames}]){display:contents!important}`\n + `[${VideoAttribute.Frames}]>.${VideoClass.Poster},[${VideoAttribute.Frames}]>picture>.${VideoClass.Poster}{position:static!important;height:auto!important}`;\n\n/** Under reduced motion the driver never starts, so the same rules hold for the whole visit. */\nexport const SCENE_REDUCED_MOTION_CSS = `@media (prefers-reduced-motion: reduce){${SCENE_FLOW_RULES}}`;\n","import { SceneRole } from '@vectoriox/iox-ui/composite-core';\n\nimport { normalizeTracks, SCENE_REVEAL_DEFAULT, SceneKey, SceneNodeSource, SceneProp, SceneRevealFrom, SceneTrack, valueAt } from './scene';\n\n/**\n * Authoring a Scene (premium-sites plan §5b, SC2): the decisions the builder's timeline and its panel share, so neither\n * holds a second copy of what a key is. Pure, and every edit returns NEW tracks: the caller assigns them to the node, so\n * undo's snapshot and the attribute the driver reads can never see a half-made edit.\n *\n * One rule to author by: one key holds, two keys move. A value edited at a scroll position sets a key there, so a layer\n * is animated by scrolling to a moment and saying where it stands at that moment.\n */\n\n/** Keys sit on whole percents of the scroll: finer than anyone can place by hand, and two keys never nearly coincide. */\nconst KEY_GRID = 100;\n\nexport function sceneKeyPosition(p: number): number {\n return Math.round(Math.min(1, Math.max(0, p)) * KEY_GRID) / KEY_GRID;\n}\n\nexport interface SceneTrackDef {\n prop: SceneProp;\n /** Ground and Ink hold colours; everything else holds a number. */\n colour: boolean;\n /** What a layer with no track for this property stands at, in stored units. */\n rest: number;\n /** The bounds and the step, in the units the author sees. */\n min: number;\n max: number;\n step: number;\n /** Author's units per stored unit: scale 1.2 reads 120 %, opacity 0.5 reads 50 %. */\n factor: number;\n unit: string;\n}\n\nconst PERCENT = '%';\nconst DEGREES = '°';\n\n/** The closed vocabulary, in the order the panel lists it. */\nexport const SCENE_TRACK_DEFS: ReadonlyArray<SceneTrackDef> = [\n { prop: SceneProp.X, colour: false, rest: 0, min: -300, max: 300, step: 1, factor: 1, unit: PERCENT },\n { prop: SceneProp.Y, colour: false, rest: 0, min: -300, max: 300, step: 1, factor: 1, unit: PERCENT },\n { prop: SceneProp.Scale, colour: false, rest: 1, min: 0, max: 2000, step: 1, factor: 100, unit: PERCENT },\n { prop: SceneProp.Rotate, colour: false, rest: 0, min: -720, max: 720, step: 1, factor: 1, unit: DEGREES },\n { prop: SceneProp.Opacity, colour: false, rest: 1, min: 0, max: 100, step: 1, factor: 100, unit: PERCENT },\n { prop: SceneProp.Clip, colour: false, rest: 100, min: 0, max: 100, step: 1, factor: 1, unit: PERCENT },\n { prop: SceneProp.Words, colour: false, rest: 100, min: 0, max: 100, step: 1, factor: 1, unit: PERCENT },\n { prop: SceneProp.Play, colour: false, rest: 0, min: 0, max: 100, step: 1, factor: 1, unit: PERCENT },\n { prop: SceneProp.Ground, colour: true, rest: 0, min: 0, max: 0, step: 0, factor: 1, unit: '' },\n { prop: SceneProp.Ink, colour: true, rest: 0, min: 0, max: 0, step: 0, factor: 1, unit: '' },\n];\n\nconst DEF_BY_PROP = new Map(SCENE_TRACK_DEFS.map(def => [def.prop, def]));\n\nexport function sceneTrackDef(prop: SceneProp): SceneTrackDef {\n return DEF_BY_PROP.get(prop)!;\n}\n\nconst trackOf = (tracks: ReadonlyArray<SceneTrack>, prop: SceneProp): SceneTrack | undefined => tracks.find(t => t.prop === prop);\nconst samePosition = (a: number, b: number): boolean => sceneKeyPosition(a) === sceneKeyPosition(b);\nconst roundTo = (value: number, places = 4): number => Number(value.toFixed(places));\n\n/** A number track's value at `p` in the author's units, or where the layer rests when it has no such track. */\nexport function sceneDisplayValue(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, p: number): number {\n const def = sceneTrackDef(prop);\n const track = trackOf(tracks, prop);\n return roundTo((track ? valueAt(track.keys, p) : def.rest) * def.factor, 2);\n}\n\n/**\n * The colour to show for a colour track at `p`: the key at or before it, else the first. Between two keys the live value\n * is a mix, which is no value a colour control can edit; the author sets keys, so the panel shows a key.\n */\nexport function sceneColourKeyAt(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, p: number): string {\n const keys = trackOf(tracks, prop)?.keys;\n if (!keys?.length) return '';\n let held = keys[0];\n for (const key of keys) if (key[0] <= sceneKeyPosition(p)) held = key;\n return String(held[1]);\n}\n\nexport function sceneHasKeyAt(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, p: number): boolean {\n return !!trackOf(tracks, prop)?.keys.some(key => samePosition(key[0], p));\n}\n\nfunction storedValue(def: SceneTrackDef, value: number | string): number | string {\n if (def.colour) return value;\n return roundTo(Math.min(def.max, Math.max(def.min, Number(value))) / def.factor);\n}\n\nfunction replaceTrack(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, keys: ReadonlyArray<SceneKey>): SceneTrack[] {\n const rest = tracks.filter(t => t.prop !== prop);\n if (!keys.length) return rest;\n const at = tracks.findIndex(t => t.prop === prop);\n const next = [...rest];\n const from = prop === SceneProp.Clip ? { from: tracks[at]?.from ?? SCENE_REVEAL_DEFAULT } : {};\n next.splice(at < 0 ? rest.length : at, 0, { prop, ...from, keys });\n return next;\n}\n\n/** Where a layer's reveal opens from: its track's direction, else where a new one would open from. */\nexport function sceneRevealFromOf(tracks: ReadonlyArray<SceneTrack>): SceneRevealFrom {\n return trackOf(tracks, SceneProp.Clip)?.from ?? SCENE_REVEAL_DEFAULT;\n}\n\n/**\n * Open a layer's reveal from `from`. With no reveal yet it starts one with a key at `p` holding the layer whole, so the\n * direction is kept and nothing on screen changes until the author sets a second key.\n */\nexport function withSceneRevealFrom(tracks: ReadonlyArray<SceneTrack>, from: SceneRevealFrom, p: number): SceneTrack[] {\n if (!trackOf(tracks, SceneProp.Clip)) return [...tracks, { prop: SceneProp.Clip, from, keys: [[sceneKeyPosition(p), sceneTrackDef(SceneProp.Clip).rest]] }];\n return tracks.map(track => (track.prop === SceneProp.Clip ? { ...track, from } : track));\n}\n\n/**\n * A layer's pictures playing across the whole Scene: the start of playing them. Keys the author has set are kept, so\n * replacing the pictures keeps the timing.\n */\nexport function withScenePlayback(tracks: ReadonlyArray<SceneTrack>): SceneTrack[] {\n if (trackOf(tracks, SceneProp.Play)) return [...tracks];\n return [...tracks, { prop: SceneProp.Play, keys: [[0, 0], [1, 100]] }];\n}\n\n/** Stop playing a layer's pictures. */\nexport function withoutScenePlayback(tracks: ReadonlyArray<SceneTrack>): SceneTrack[] {\n return tracks.filter(track => track.prop !== SceneProp.Play);\n}\n\n/**\n * Set a key at `p`, in the author's units. A number is clamped to its bounds; a colour that is no colour changes nothing,\n * because `normalizeTracks` would drop it anyway and the author's other keys must survive.\n */\nexport function withSceneKey(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, p: number, value: number | string): SceneTrack[] {\n const def = sceneTrackDef(prop);\n const at = sceneKeyPosition(p);\n if (!def.colour && !Number.isFinite(Number(value))) return [...tracks];\n const key: SceneKey = [at, storedValue(def, value)];\n const others = (trackOf(tracks, prop)?.keys ?? []).filter(k => !samePosition(k[0], at));\n const keys = [...others, key].sort((a, b) => a[0] - b[0]);\n const next = replaceTrack(tracks, prop, keys);\n return trackOf(normalizeTracks(next), prop)?.keys.length === keys.length ? next : [...tracks];\n}\n\n/** Remove the key at `p`. The last key of a track takes the track with it. */\nexport function withoutSceneKey(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, p: number): SceneTrack[] {\n const track = trackOf(tracks, prop);\n if (!track) return [...tracks];\n return replaceTrack(tracks, prop, track.keys.filter(key => !samePosition(key[0], p)));\n}\n\n/**\n * Move a key from `from` toward `to`, stopping one grid step short of its neighbours: keys never swap, so a drag can\n * never reverse a movement the author set. Returns where it landed, so a drag keeps following it.\n */\nexport function movedSceneKey(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, from: number, to: number): { tracks: SceneTrack[]; at: number } {\n const track = trackOf(tracks, prop);\n const index = track ? track.keys.findIndex(key => samePosition(key[0], from)) : -1;\n if (!track || index < 0) return { tracks: [...tracks], at: sceneKeyPosition(from) };\n const step = 1 / KEY_GRID;\n const low = index > 0 ? track.keys[index - 1][0] + step : 0;\n const high = index < track.keys.length - 1 ? track.keys[index + 1][0] - step : 1;\n const at = sceneKeyPosition(Math.min(high, Math.max(low, to)));\n const keys = track.keys.map((key, i): SceneKey => (i === index ? [at, key[1]] : key));\n return { tracks: replaceTrack(tracks, prop, keys), at };\n}\n\n/** A track's bar on the timeline: from its first key to its last, as fractions of the scroll. */\nexport function sceneTrackSpan(track: SceneTrack): { from: number; to: number } {\n return { from: track.keys[0][0], to: track.keys[track.keys.length - 1][0] };\n}\n\n/** A node as these helpers read it: a builder node and a saved one both fit. */\nexport interface SceneTreeNode extends SceneNodeSource {\n id?: string;\n children?: ReadonlyArray<SceneTreeNode> | null;\n}\n\n/** The Scene a selection sits in: the innermost Scene on its path from the top. */\nexport function sceneRootOnPath<T extends SceneTreeNode>(path: ReadonlyArray<T>): T | null {\n for (let i = path.length - 1; i >= 0; i--) if (path[i].role === SceneRole.Scene) return path[i];\n return null;\n}\n\n/** Every Scene on a page, in document order, a Scene inside a Scene included. */\nexport function scenesIn<T extends SceneTreeNode>(nodes: ReadonlyArray<T> | null | undefined): T[] {\n const found: T[] = [];\n for (const node of nodes ?? []) {\n if (node.role === SceneRole.Scene) found.push(node);\n found.push(...scenesIn((node.children ?? []) as ReadonlyArray<T>));\n }\n return found;\n}\n\nconst hasTracks = (node: SceneTreeNode): boolean =>\n normalizeTracks(node.sceneTracks).length > 0 || normalizeTracks(node.scenePhoneTracks).length > 0;\n\n/**\n * What the timeline lists: the stage, everything standing on it, and anything deeper that carries tracks. A layer with\n * none is listed too, or it could never be given its first. A Scene inside this one keeps its own timeline.\n */\nexport function sceneLayersOf<T extends SceneTreeNode>(root: T | null | undefined): T[] {\n const stage = (root?.children ?? []).find(child => child.role === SceneRole.Stage) as T | undefined;\n if (!stage) return [];\n const layers: T[] = [stage];\n const deeper = (node: T): void => {\n for (const child of (node.children ?? []) as ReadonlyArray<T>) {\n if (child.role === SceneRole.Scene) continue;\n if (hasTracks(child)) layers.push(child);\n deeper(child);\n }\n };\n for (const child of (stage.children ?? []) as ReadonlyArray<T>) {\n if (child.role === SceneRole.Scene) continue;\n layers.push(child);\n deeper(child);\n }\n return layers;\n}\n\n/** How many screens of scrolling a Scene holds for, and the bounds the panel offers. */\nexport const SCENE_MIN_SCREENS = 0.5;\nexport const SCENE_MAX_SCREENS = 20;\n\nconst VIEWPORT_HEIGHT = /^([\\d.]+)[sdl]?vh$/;\n\n/**\n * The root's height as screens of scrolling: the stage itself takes one screen, so 400vh holds for 3. Null for a height\n * set in anything else (a hand-set px), which the panel then says it cannot express rather than overwriting it.\n */\nexport function sceneScreensOf(height: string | null | undefined): number | null {\n const match = VIEWPORT_HEIGHT.exec(String(height ?? '').trim());\n if (!match) return null;\n return Math.max(0, roundTo(Number(match[1]) / 100 - 1, 2));\n}\n\nexport function sceneHeightForScreens(screens: number): string {\n const held = Math.min(SCENE_MAX_SCREENS, Math.max(SCENE_MIN_SCREENS, screens));\n return `${roundTo((held + 1) * 100, 1)}vh`;\n}\n\n/**\n * Pictures per screen of scrolling at which a played film stays smooth as a glide slows to a stop. Measured on Doron's\n * iPhone (2026-11-05): Studio Alma's film at about 11 a screen stepped, at about 55 it did not.\n */\nexport const SCENE_FILM_SMOOTH = 40;\n\nexport interface SceneFilmDensity {\n /** Pictures per screen of scrolling over most of the play: half its scroll holds at least this many. */\n perScreen: number;\n /** The screens of scrolling the film plays over; where it holds still is not counted. */\n screens: number;\n smooth: boolean;\n}\n\n/**\n * How densely a film of `count` pictures plays on a Scene of `screens`, by its Play track; null when nothing plays. A\n * film's smoothness is its density, never the drawing: spread thin, a slowing glide holds each picture for many refreshes.\n */\nexport function sceneFilmDensity(tracks: ReadonlyArray<SceneTrack> | null | undefined, screens: number | null, count: number): SceneFilmDensity | null {\n const keys = normalizeTracks(tracks).find(track => track.prop === SceneProp.Play)?.keys ?? [];\n if (count < 2 || !screens || screens <= 0) return null;\n const stretches: { perScreen: number; screens: number }[] = [];\n for (let i = 1; i < keys.length; i++) {\n const scrolled = (keys[i][0] - keys[i - 1][0]) * screens;\n const played = Math.abs(Number(keys[i][1]) - Number(keys[i - 1][1]));\n if (scrolled > 0 && played > 0) stretches.push({ perScreen: ((played / 100) * (count - 1)) / scrolled, screens: scrolled });\n }\n if (!stretches.length) return null;\n stretches.sort((a, b) => a.perScreen - b.perScreen);\n const total = stretches.reduce((sum, stretch) => sum + stretch.screens, 0);\n let covered = 0;\n const typical = stretches.find(stretch => (covered += stretch.screens) >= total / 2)!;\n return { perScreen: Math.round(typical.perScreen), screens: roundTo(total, 1), smooth: typical.perScreen >= SCENE_FILM_SMOOTH };\n}\n\n/** Motion v2 §3d's limits for scroll-linked work on one page. */\nexport const SCENE_BUDGET = { heldSections: 1, movingLayers: 8 } as const;\n\nexport interface SceneBudget {\n /** Every track on the page's Scenes. */\n tracks: number;\n heldSections: number;\n movingLayers: number;\n within: boolean;\n}\n\n/** What a page's Scenes cost. Advice to the author, never a refusal: the composer enforces it from SC6. */\nexport function sceneBudget(nodes: ReadonlyArray<SceneTreeNode> | null | undefined): SceneBudget {\n const scenes = scenesIn(nodes);\n const moving = scenes.flatMap(scene => sceneLayersOf(scene)).filter(hasTracks);\n const movingLayers = new Set(moving).size;\n const tracks = [...new Set(moving)].reduce((sum, node) => sum + normalizeTracks(node.sceneTracks).length, 0);\n return {\n tracks,\n heldSections: scenes.length,\n movingLayers,\n within: scenes.length <= SCENE_BUDGET.heldSections && movingLayers <= SCENE_BUDGET.movingLayers,\n };\n}\n","import { CompositeNode, CompositeNodeFactory, makeCompositePart, NO_ELEMENT_STYLE, SceneRole, writeLayerStyles, writeStyles } from '@vectoriox/iox-ui/composite-core';\n\nimport { SceneNodeSource, SceneProp, SceneTrack } from './scene';\n\n/**\n * The SCENE recipe: ordinary nodes, no new type, so all three render paths and every panel already know it.\n *\n * Section role scene height = how long it plays (× the viewport)\n * └─ Container role scene.stage pinned, one viewport tall, clips its layers, the size container for their lengths\n * ├─ Heading a layer with its own tracks\n * └─ Text a layer with its own tracks\n *\n * How long it plays IS the root's height, so it follows the width system the way every other size does. The stage is a\n * track-carrying layer too: its Ground is the colour the whole Scene moves through.\n */\n\nexport type SceneLayerNode = CompositeNode & SceneNodeSource;\n\nexport interface SceneWords {\n title: string;\n line: string;\n}\n\n/** Generic words a fresh Scene starts with: the author's to replace. */\nexport const SCENE_WORDS: Readonly<SceneWords> = {\n title: 'One idea, held still',\n line: 'The page keeps moving. This stays until you have read it.',\n};\n\n/** How long a fresh Scene plays: 4 viewports wide, 3 on a phone (a thumb travels less). */\nexport const SCENE_LENGTH = '400vh';\nexport const SCENE_PHONE_LENGTH = '300vh';\n/** Small viewport height: a phone's toolbar never pushes the stage's bottom out of sight. */\nexport const SCENE_STAGE_HEIGHT = '100svh';\nconst PHONE_BREAKPOINT = 'mobile';\nconst TITLE_LEVEL = 'h2';\n\nenum Type {\n Section = 'Section',\n Container = 'Container',\n Heading = 'Heading',\n Text = 'Text',\n}\n\nconst ROOT_LAYOUT: Readonly<Record<string, string>> = {\n position: 'relative',\n display: 'block',\n width: '100%',\n height: SCENE_LENGTH,\n};\n\nconst STAGE_LAYOUT: Readonly<Record<string, string>> = {\n position: 'sticky',\n top: '0px',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: SCENE_STAGE_HEIGHT,\n overflow: 'hidden',\n};\n\nconst TITLE_TRACKS: ReadonlyArray<SceneTrack> = [\n { prop: SceneProp.Opacity, keys: [[0, 0], [0.2, 1], [0.75, 1], [1, 0]] },\n { prop: SceneProp.Y, keys: [[0, 8], [0.2, 0], [1, -6]] },\n { prop: SceneProp.Scale, keys: [[0, 0.96], [0.6, 1], [1, 1.04]] },\n];\n\nconst LINE_TRACKS: ReadonlyArray<SceneTrack> = [\n { prop: SceneProp.Opacity, keys: [[0.25, 0], [0.45, 1], [0.8, 1], [1, 0]] },\n { prop: SceneProp.Y, keys: [[0.25, 6], [0.45, 0], [1, -4]] },\n];\n\nconst STAGE_TRACKS: ReadonlyArray<SceneTrack> = [\n { prop: SceneProp.Ground, keys: [[0, 'var(--iox-surface-2)'], [0.6, 'var(--iox-page-bg)']] },\n];\n\nconst copyTracks = (tracks: ReadonlyArray<SceneTrack>): SceneTrack[] => tracks.map(t => ({ prop: t.prop, keys: t.keys.map(k => [k[0], k[1]] as const) }));\n\n/** A fresh Scene: it already moves, so the author sees what the thing is before touching it. */\nexport function buildSceneRecipe(create: CompositeNodeFactory, words: Partial<SceneWords> = {}): SceneLayerNode {\n const text = { ...SCENE_WORDS, ...words };\n const root = makeCompositePart(create, { key: 'root', type: Type.Section, elementStyle: NO_ELEMENT_STYLE }, SceneRole.Scene, 'Scene', ROOT_LAYOUT) as SceneLayerNode;\n writeLayerStyles(root, PHONE_BREAKPOINT, { height: SCENE_PHONE_LENGTH });\n\n const stage = makeCompositePart(create, { key: 'stage', type: Type.Container, elementStyle: NO_ELEMENT_STYLE }, SceneRole.Stage, 'Stage', STAGE_LAYOUT) as SceneLayerNode;\n stage.sceneTracks = copyTracks(STAGE_TRACKS);\n\n const title = makeCompositePart(create, { key: 'title', type: Type.Heading, props: { content: text.title, level: TITLE_LEVEL } }, null, 'Title') as SceneLayerNode;\n title.sceneTracks = copyTracks(TITLE_TRACKS);\n writeStyles(title, { textAlign: 'center' });\n\n const line = makeCompositePart(create, { key: 'line', type: Type.Text, props: { content: text.line, tag: 'p' } }, null, 'Line') as SceneLayerNode;\n line.sceneTracks = copyTracks(LINE_TRACKS);\n writeStyles(line, { textAlign: 'center' });\n\n stage.children = [title, line];\n root.children = [stage];\n return root;\n}\n","/**\n * Text into pieces, in the browser only (premium sites SC3, Motion v2 §3c). A saved node keeps its plain text and the\n * server sends it whole, so every word is in the raw response, editing never meets a piece, and there is no markup for\n * hydration to disagree with. Each original text node is kept and put back as it was, never rebuilt from a string: a\n * framework may hold that node, and a layer may hold live components.\n */\n\nexport enum TextRevealBy {\n Line = 'line',\n Word = 'word',\n}\n\n/** Past these a text is plainly no heading: it fades whole, and lights up whole. */\nexport const REVEAL_PIECE_CAP = 120;\nexport const LIGHT_UP_PIECE_CAP = 300;\n\nconst SKIPPED_TAGS: ReadonlySet<string> = new Set(['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'SELECT', 'OPTION']);\nconst SHOW_TEXT = 4;\n/** Hebrew through Arabic Extended, and their presentation forms. */\nconst RTL_LETTER = /[֐-ࣿיִ-﷿ﹰ-]/;\n\nexport interface TextPiece {\n text: string;\n /** False for the space between two words, which stays bare text so lines wrap exactly as they did. */\n word: boolean;\n}\n\n/**\n * A string as words and the space between them. With `keepLtrRuns` a run of words holding no RTL letter stays ONE word:\n * an inline-block is neutral to the bidi algorithm, so \"Studio Alma\" inside a Hebrew heading, split, would read reversed.\n */\nexport function textPieces(text: string, keepLtrRuns = false): TextPiece[] {\n const pieces: TextPiece[] = (text.match(/\\s+|\\S+/g) ?? []).map(part => ({ text: part, word: /\\S/.test(part) }));\n if (!keepLtrRuns) return pieces;\n const merged: TextPiece[] = [];\n for (const piece of pieces) {\n const space = merged[merged.length - 1];\n const word = merged[merged.length - 2];\n if (piece.word && !RTL_LETTER.test(piece.text) && space && !space.word && word?.word && !RTL_LETTER.test(word.text)) {\n word.text += space.text + piece.text;\n merged.pop();\n } else {\n merged.push({ ...piece });\n }\n }\n return merged;\n}\n\nexport interface SplitTextOptions {\n cap: number;\n /** Each piece in a clipping mask, to rise out of (and so an inline-block). Without it a piece is a plain inline span. */\n mask?: boolean;\n /** The element reads right-to-left. Only a mask needs to know. */\n rtl?: boolean;\n}\n\nexport interface SplitText {\n /** In reading order. With a mask, the moving part inside it. */\n pieces: HTMLElement[];\n /** Put every original text node back. Safe after the text was replaced: what is gone stays gone. */\n restore(): void;\n}\n\ninterface Replacement {\n original: Text;\n nodes: Node[];\n}\n\nfunction textNodesOf(root: HTMLElement): Text[] {\n const walker = root.ownerDocument.createTreeWalker(root, SHOW_TEXT);\n const found: Text[] = [];\n for (let node = walker.nextNode(); node; node = walker.nextNode()) {\n const parent = node.parentElement;\n if (parent && !SKIPPED_TAGS.has(parent.tagName) && /\\S/.test(node.nodeValue ?? '')) found.push(node as Text);\n }\n return found;\n}\n\nfunction pieceOf(doc: Document, text: string, mask: boolean): { outer: HTMLElement; moving: HTMLElement } {\n const moving = doc.createElement('span');\n moving.textContent = text;\n if (!mask) return { outer: moving, moving };\n moving.style.display = 'inline-block';\n const outer = doc.createElement('span');\n outer.style.display = 'inline-block';\n // A clip-path and not overflow, which would move the box's baseline. The negative sides leave descenders and italics.\n outer.style.clipPath = 'inset(-0.1em -0.1em -0.18em -0.1em)';\n outer.appendChild(moving);\n return { outer, moving };\n}\n\n/** Split `root`'s text, or null when it holds none or more than `cap` pieces (nothing is changed then). */\nexport function splitText(root: HTMLElement, options: SplitTextOptions): SplitText | null {\n const doc = root.ownerDocument;\n const mask = !!options.mask;\n const planned = textNodesOf(root).map(original => ({ original, parts: textPieces(original.nodeValue ?? '', mask && !!options.rtl) }));\n const count = planned.reduce((sum, { parts }) => sum + parts.filter(part => part.word).length, 0);\n if (!count || count > options.cap) return null;\n\n const pieces: HTMLElement[] = [];\n const replacements: Replacement[] = planned.map(({ original, parts }) => {\n const nodes = parts.map((part): Node => {\n if (!part.word) return doc.createTextNode(part.text);\n const { outer, moving } = pieceOf(doc, part.text, mask);\n pieces.push(moving);\n return outer;\n });\n const parent = original.parentNode as ParentNode & Node;\n for (const node of nodes) parent.insertBefore(node, original);\n parent.removeChild(original);\n return { original, nodes };\n });\n\n return {\n pieces,\n restore: () => {\n for (const { original, nodes } of replacements) {\n const first = nodes[0];\n if (!first?.isConnected || !first.parentNode) continue;\n first.parentNode.insertBefore(original, first);\n for (const node of nodes) node.parentNode?.removeChild(node);\n }\n },\n };\n}\n\n/** The line each piece stands on: 0, 0, 1, 1, 1, 2… Read once, as a reveal starts. */\nexport function lineIndexes(tops: ReadonlyArray<number>, heights: ReadonlyArray<number>): number[] {\n let line = 0;\n let top = tops[0] ?? 0;\n return tops.map((next, i) => {\n if (next - top > (heights[i] ?? 0) / 2) {\n line++;\n top = next;\n }\n return line;\n });\n}\n\nconst LINE_STAGGER_MS = 90;\nconst WORD_STAGGER_MS = 40;\n/** However long the heading, the last piece starts within this. */\nconst STAGGER_BUDGET_MS = 1000;\n\nexport function revealStagger(groups: number, by: TextRevealBy): number {\n const step = by === TextRevealBy.Line ? LINE_STAGGER_MS : WORD_STAGGER_MS;\n return groups > 1 ? Math.min(step, STAGGER_BUDGET_MS / (groups - 1)) : 0;\n}\n\n/** Past the mask's negative inset, so nothing shows before a piece's turn. */\nconst PIECE_FRAMES: Keyframe[] = [{ transform: 'translateY(120%)' }, { transform: 'translateY(0)' }];\nconst DEFAULT_PIECE_MS = 700;\n\nconst playing = new WeakMap<HTMLElement, Animation>();\n\n/**\n * Play a text reveal: each piece rises out of its mask, line by line or word by word. Returns ONE animation for the\n * whole, so a runtime treats it as any other: it finishes when the last piece lands, and on finish or cancel the text\n * is put back whole, which leaves nothing for a screen reader to stumble on and nothing to re-split on a resize. Null\n * when there is nothing to split or it is being edited: the caller plays its plain fade.\n */\nexport function playTextReveal(el: HTMLElement, by: TextRevealBy, timing: KeyframeAnimationOptions): Animation | null {\n playing.get(el)?.cancel();\n if (el.isContentEditable) return null;\n const rtl = el.ownerDocument.defaultView?.getComputedStyle(el).direction === 'rtl';\n const split = splitText(el, { cap: REVEAL_PIECE_CAP, mask: true, rtl });\n if (!split) return null;\n\n const boxes = by === TextRevealBy.Line ? split.pieces.map(piece => (piece.parentElement as HTMLElement).getBoundingClientRect()) : [];\n const order = by === TextRevealBy.Line ? lineIndexes(boxes.map(box => box.top), boxes.map(box => box.height)) : split.pieces.map((_, i) => i);\n const groups = Math.max(...order) + 1;\n const step = revealStagger(groups, by);\n const duration = Number(timing.duration) || DEFAULT_PIECE_MS;\n const delay = timing.delay ?? 0;\n const pieces = split.pieces.map((piece, i) => piece.animate(PIECE_FRAMES, { duration, delay: delay + order[i] * step, easing: timing.easing, fill: 'both' }));\n // The element itself just stands visible: its entrance's first frame had hidden it whole.\n const whole = el.animate([{ opacity: 1 }, { opacity: 1 }], { duration: delay + duration + step * (groups - 1), fill: timing.fill ?? 'both' });\n playing.set(el, whole);\n const finished = (): void => {\n if (playing.get(el) === whole) playing.delete(el);\n for (const piece of pieces) piece.cancel();\n split.restore();\n };\n whole.addEventListener('finish', finished, { once: true });\n whole.addEventListener('cancel', finished, { once: true });\n return whole;\n}\n","import { SceneRole } from '@vectoriox/iox-ui/composite-core';\nimport { FramePlayer, normalizeFrameSequence, VideoAttribute } from '@vectoriox/iox-ui/media-core';\n\nimport { normalizeTracks, SCENE_PHONE_MAX_WIDTH, SceneAttribute, sceneFrame, SceneFrame, scenePlayed, sceneWordOpacity, sceneWordsLit, SceneTrack } from './scene';\nimport { LIGHT_UP_PIECE_CAP, SplitText, splitText } from './split-text';\n\n/**\n * The ONE scroll loop (premium-sites plan §5b, SC0). Every Scene on a page reads one progress value from it, on the\n * canvas and on the live site alike. It reads where the root is and nothing else, so it has one code path: under the\n * canvas's zoom the same rectangle divides by the same zoom, and the answer is the same at any scale.\n *\n * - The value is DAMPED: the scroll stops and the page settles a moment later. This is much of the prototype's weight,\n * and why this is not a CSS scroll timeline, which cannot do it.\n * - The live site pins with `position: sticky`, on the compositor. The canvas cannot (its page never scrolls itself,\n * its Lenis scrolls a wrapper around a zoomed frame), so `pin` holds the stage there with `translate` instead.\n * `translate`, not `transform`: a Stage may carry tracks of its own.\n * - It sleeps. No frame is asked for unless something moved, so a page holding a settled Scene costs nothing.\n * - Reads come first in a frame and writes after, and a write only ever touches compositor properties.\n */\n\nexport const SCENE_DAMPING = 9;\n/** Page px from the scroll at which the damping stops and stands exactly on it: a step this small never shows. */\nconst SETTLED_PX = 0.25;\nconst MAX_FRAME_SECONDS = 0.1;\n/** The first frame after a sleep has no previous one to measure from: it counts as one frame, or a scroll would lose it. */\nconst WAKING_FRAME_SECONDS = 1 / 60;\nconst STAGE_SELECTOR = `.iox-role-${SceneRole.Stage.replace(/\\./g, '-')}`;\nconst TRANSFORM_WILL_CHANGE = 'transform, opacity';\n\n/** One frame of the damping: frame-rate independent, so 60 Hz and 120 Hz settle in the same time. */\nexport function dampToward(current: number, target: number, seconds: number, rate: number = SCENE_DAMPING): number {\n return current + (target - current) * (1 - Math.exp(-seconds * rate));\n}\n\n/** Where a root stands: scrolled `local` page px into its `travel`. `zoom` undoes the canvas's scale. */\nexport function sceneScrollState(rootTop: number, originTop: number, zoom: number, travel: number): { local: number; progress: number } {\n if (travel <= 0) return { local: 0, progress: 0 };\n const local = Math.min(travel, Math.max(0, -(rootTop - originTop) / (zoom || 1)));\n return { local, progress: local / travel };\n}\n\nexport interface ScrollDriverOptions {\n /** Hold the stage with `translate` (the canvas). The live site's stage is sticky and needs nothing. */\n pin?: boolean;\n /** The element a root scrolls under, when that is not the window (the canvas's frame, Preview's page). */\n originOf?: (root: HTMLElement) => HTMLElement | null;\n /** Follow what changes inside a root: tracks edited, layers added (the canvas). */\n observe?: boolean;\n damping?: number;\n /** Called after every frame it writes, outside any framework's zone (the canvas's selection box follows on it). */\n onFrame?: (root: HTMLElement, state: SceneFrameState) => void;\n /** The window, for a test. */\n host?: Window;\n}\n\nexport interface SceneFrameState {\n /** Where the scroll stands, undamped: what a scrubber shows. */\n target: number;\n /** Where the layers stand, damped: what is on screen. */\n progress: number;\n}\n\ninterface Layer {\n el: HTMLElement;\n tracks: SceneTrack[];\n phoneTracks: SceneTrack[];\n /** What this driver last wrote on the element, so a property whose track went can be cleared. */\n last: SceneFrame;\n /** Write every property on the next frame, changed or not: a measure may have moved what a frame resolves to. */\n stale: boolean;\n /** Its words, split while a Words track plays them. Null until the first frame that needs them. */\n words: SplitText | null;\n /** Too many words to split: it holds as it is, and is not counted again on every frame. */\n wordsRefused: boolean;\n /** Its pictures, while a Play track plays them, and what they were built from: a change starts a new player. */\n player: FramePlayer | null;\n playerKey: string;\n}\n\ninterface Scene {\n root: HTMLElement;\n stage: HTMLElement | null;\n layers: Layer[];\n progress: number;\n target: number;\n /** Page px and the stage's own width, measured when something resizes and never per frame. */\n height: number;\n travel: number;\n phone: boolean;\n inlineSign: 1 | -1;\n /** No frame written yet: the first one lands exactly where the scroll is, with no glide. */\n fresh: boolean;\n mutations: MutationObserver | null;\n}\n\nfunction parseTracks(raw: string | null): SceneTrack[] {\n if (!raw) return [];\n try { return normalizeTracks(JSON.parse(raw)); } catch { return []; }\n}\n\nexport class ScrollDriver {\n private readonly scenes = new Map<HTMLElement, Scene>();\n private readonly host: Window;\n private readonly resize: ResizeObserver | null;\n private frame = 0;\n private lastTime = 0;\n private readonly wakeUp = (): void => this.wake();\n\n constructor(private readonly options: ScrollDriverOptions = {}) {\n this.host = options.host ?? window;\n // In capture: a scroll does not bubble, and the canvas's Lenis scrolls an element, not the window.\n this.host.addEventListener('scroll', this.wakeUp, { capture: true, passive: true });\n this.host.addEventListener('resize', this.wakeUp, { passive: true });\n const Observer = (this.host as Window & { ResizeObserver?: typeof ResizeObserver }).ResizeObserver;\n this.resize = Observer ? new Observer(() => this.remeasureAll()) : null;\n }\n\n /** Drive a Scene's root. Idempotent: adding a root again re-reads it. */\n add(root: HTMLElement): void {\n this.remove(root);\n const scene: Scene = { root, stage: null, layers: [], progress: 0, target: 0, height: 0, travel: 0, phone: false, inlineSign: 1, fresh: true, mutations: null };\n this.scenes.set(root, scene);\n this.resize?.observe(root);\n if (this.options.observe) {\n const Observer = (this.host as Window & { MutationObserver?: typeof MutationObserver }).MutationObserver;\n if (Observer) {\n scene.mutations = new Observer(() => this.readScene(scene));\n scene.mutations.observe(root, { childList: true, subtree: true, attributes: true, attributeFilter: [SceneAttribute.Tracks, SceneAttribute.PhoneTracks, VideoAttribute.Frames] });\n }\n }\n this.readScene(scene);\n }\n\n remove(root: HTMLElement): void {\n const scene = this.scenes.get(root);\n if (!scene) return;\n scene.mutations?.disconnect();\n this.resize?.unobserve(root);\n if (scene.stage) scene.stage.style.removeProperty('translate');\n for (const layer of scene.layers) {\n layer.el.style.removeProperty('will-change');\n this.restoreWords(layer);\n this.stopPlayer(layer);\n }\n this.scenes.delete(root);\n }\n\n /** Read a root's layers again now, keeping where it stands: an editor changed their tracks. */\n reread(root: HTMLElement): void {\n const scene = this.scenes.get(root);\n if (scene) this.readScene(scene);\n }\n\n /** The damped progress a root's layers stand at. */\n progressOf(root: HTMLElement): number | null {\n return this.scenes.get(root)?.progress ?? null;\n }\n\n /** Where the scroll stands in a root's travel, undamped. */\n targetOf(root: HTMLElement): number | null {\n return this.scenes.get(root)?.target ?? null;\n }\n\n /** Page px from the root's top to the scroll position that stands it at `p`. */\n offsetFor(root: HTMLElement, p: number): number | null {\n const scene = this.scenes.get(root);\n return scene ? scene.travel * Math.min(1, Math.max(0, p)) : null;\n }\n\n /** Land on the next frame with no glide: a scrubber sets a position, and the author is waiting to see that moment. */\n settle(root: HTMLElement): void {\n const scene = this.scenes.get(root);\n if (!scene) return;\n scene.fresh = true;\n this.wake();\n }\n\n /**\n * Hold every stage against the scroll, now. For a host that moves the scroll itself inside a frame (the canvas's\n * Lenis): waiting for the scroll event paints that frame with the stage carried off its pin, up to a whole frame's\n * scroll, which reads as a shake. Damping is untouched: only the pin has to be exact.\n */\n pinNow(): void {\n if (!this.options.pin) return;\n for (const scene of this.scenes.values()) {\n if (scene.stage) scene.stage.style.setProperty('translate', `0 ${this.read(scene).local}px`);\n }\n }\n\n /** Something moved that no scroll or resize announces (the canvas's zoom). */\n wake(): void {\n if (this.frame) return;\n this.frame = this.host.requestAnimationFrame(this.tick);\n }\n\n destroy(): void {\n if (this.frame) this.host.cancelAnimationFrame(this.frame);\n this.frame = 0;\n this.host.removeEventListener('scroll', this.wakeUp, { capture: true });\n this.host.removeEventListener('resize', this.wakeUp);\n for (const root of [...this.scenes.keys()]) this.remove(root);\n this.resize?.disconnect();\n }\n\n /** Read a root's stage and layers from its DOM: its own Scene's only, never a nested one's. */\n private readScene(scene: Scene): void {\n scene.stage = scene.root.querySelector<HTMLElement>(STAGE_SELECTOR);\n const previous = scene.layers;\n scene.layers = Array.from(scene.root.querySelectorAll<HTMLElement>(`[${SceneAttribute.Tracks}], [${SceneAttribute.PhoneTracks}]`))\n .filter(el => el === scene.root || el.parentElement?.closest(`[${SceneAttribute.Root}]`) === scene.root)\n .map(el => this.readLayer(el, scene));\n // A layer that lost its last track stands as its own styles say again, not at the frame it last held.\n for (const layer of previous) {\n if (!scene.layers.some(current => current.el === layer.el)) this.letGo(layer);\n }\n this.measure(scene);\n scene.fresh = true;\n this.wake();\n }\n\n private letGo(layer: Layer): void {\n layer.el.style.removeProperty('will-change');\n for (const key of Object.keys(layer.last) as (keyof SceneFrame)[]) layer.el.style[key] = '';\n this.restoreWords(layer);\n this.stopPlayer(layer);\n }\n\n private stopPlayer(layer: Layer): void {\n layer.player?.destroy();\n layer.player = null;\n layer.playerKey = '';\n }\n\n private restoreWords(layer: Layer): void {\n layer.words?.restore();\n layer.words = null;\n }\n\n private readLayer(el: HTMLElement, scene: Scene): Layer {\n const previous = scene.layers.find(layer => layer.el === el);\n el.style.setProperty('will-change', TRANSFORM_WILL_CHANGE);\n return { el, tracks: parseTracks(el.getAttribute(SceneAttribute.Tracks)), phoneTracks: parseTracks(el.getAttribute(SceneAttribute.PhoneTracks)), last: previous?.last ?? {}, stale: true, words: previous?.words ?? null, wordsRefused: false, player: previous?.player ?? null, playerKey: previous?.playerKey ?? '' };\n }\n\n private remeasureAll(): void {\n for (const scene of this.scenes.values()) this.measure(scene);\n this.wake();\n }\n\n private measure(scene: Scene): void {\n scene.height = scene.root.offsetHeight;\n scene.travel = Math.max(0, scene.height - (scene.stage?.offsetHeight ?? scene.height));\n scene.phone = (scene.stage?.offsetWidth ?? Infinity) <= SCENE_PHONE_MAX_WIDTH;\n scene.inlineSign = scene.stage && this.host.getComputedStyle(scene.stage).direction === 'rtl' ? -1 : 1;\n for (const layer of scene.layers) layer.stale = true;\n }\n\n private readonly tick = (now: number): void => {\n this.frame = 0;\n const seconds = this.lastTime ? Math.min(MAX_FRAME_SECONDS, (now - this.lastTime) / 1000) : WAKING_FRAME_SECONDS;\n this.lastTime = now;\n const reads = [...this.scenes.values()].map(scene => this.read(scene));\n let moving = false;\n for (const { scene, local, target } of reads) {\n if (this.options.pin && scene.stage) scene.stage.style.setProperty('translate', `0 ${local}px`);\n const next = scene.fresh ? target : dampToward(scene.progress, target, seconds, this.options.damping);\n // The step onto the scroll is what is left: taken once it is under SETTLED_PX, so it never shows.\n const settled = scene.fresh || Math.abs(target - scene.progress) * Math.max(1, scene.travel) < SETTLED_PX;\n scene.progress = settled ? target : next;\n scene.target = target;\n scene.fresh = false;\n this.write(scene);\n this.options.onFrame?.(scene.root, { target, progress: scene.progress });\n moving = moving || !settled;\n }\n if (moving) this.wake();\n else this.lastTime = 0;\n };\n\n private read(scene: Scene): { scene: Scene; local: number; target: number } {\n const rect = scene.root.getBoundingClientRect();\n const origin = this.options.originOf?.(scene.root)?.getBoundingClientRect().top ?? 0;\n const zoom = scene.height ? rect.height / scene.height : 1;\n const { local, progress } = sceneScrollState(rect.top, origin, zoom, scene.travel);\n return { scene, local, target: progress };\n }\n\n private write(scene: Scene): void {\n for (const layer of scene.layers) {\n const tracks = scene.phone && layer.phoneTracks.length ? layer.phoneTracks : layer.tracks;\n this.writeWords(layer, sceneWordsLit(tracks, scene.progress));\n this.writePlayed(layer, scene, scenePlayed(tracks, scene.progress));\n const frame = sceneFrame(tracks, scene.progress, { inlineSign: scene.inlineSign });\n for (const key of Object.keys(frame) as (keyof SceneFrame)[]) {\n if (layer.stale || frame[key] !== layer.last[key]) layer.el.style[key] = frame[key] ?? '';\n }\n // A property whose track was deleted is no longer in the frame: it goes, or the layer holds it forever.\n for (const key of Object.keys(layer.last) as (keyof SceneFrame)[]) {\n if (!(key in frame)) layer.el.style[key] = '';\n }\n layer.last = frame;\n layer.stale = false;\n }\n }\n\n /**\n * The picture this moment asks for. The attribute sits on the Video's own root, which is the layer on the string path\n * and inside it on the component path. A layer with no pictures, or no Play track, holds its poster.\n */\n private writePlayed(layer: Layer, scene: Scene, played: number | null): void {\n const target = played === null ? null : (layer.el.hasAttribute(VideoAttribute.Frames) ? layer.el : layer.el.querySelector<HTMLElement>(`[${VideoAttribute.Frames}]`));\n const raw = target?.getAttribute(VideoAttribute.Frames) ?? '';\n const sequence = raw ? normalizeFrameSequence(raw) : null;\n if (!target || !sequence) {\n if (layer.player) this.stopPlayer(layer);\n return;\n }\n const key = `${scene.phone}|${raw}`;\n if (layer.player && (layer.playerKey !== key || layer.player.detached)) this.stopPlayer(layer);\n if (!layer.player) {\n layer.player = new FramePlayer(target, sequence, { phone: scene.phone, near: scene.root, host: this.host });\n layer.playerKey = key;\n }\n // The damped moment, like every other layer: the film slows with the page and stops when it stops.\n layer.player.seek(played!);\n }\n\n /** One opacity per word, and a write only for the few the scroll actually changed. */\n private writeWords(layer: Layer, lit: number | null): void {\n if (lit === null) {\n this.restoreWords(layer);\n return;\n }\n // Gone from the page: the text was replaced under it (an edit on the canvas), so its words are new.\n if (layer.words && !layer.words.pieces[0]?.isConnected) layer.words = null;\n if (!layer.words && !layer.wordsRefused) {\n layer.words = splitText(layer.el, { cap: LIGHT_UP_PIECE_CAP });\n layer.wordsRefused = !layer.words;\n // The whole layer stood for its words until now (`sceneFirstFrame`); an Opacity track's frame writes after this.\n layer.el.style.removeProperty('opacity');\n layer.stale = true;\n }\n const pieces = layer.words?.pieces ?? [];\n pieces.forEach((piece, i) => {\n const opacity = String(sceneWordOpacity(i, pieces.length, lit));\n if (piece.style.opacity !== opacity) piece.style.opacity = opacity;\n });\n }\n}\n\n/** A page's Scenes, driven by one driver; null when it holds none, or when the visitor asked for less motion (the\n * page's own CSS then lets each Scene flow). The live site's door. */\nexport function attachScenes(container: HTMLElement, options: ScrollDriverOptions = {}): ScrollDriver | null {\n const roots = container.querySelectorAll<HTMLElement>(`[${SceneAttribute.Root}]`);\n if (!roots.length) return null;\n const host = options.host ?? window;\n if (host.matchMedia?.('(prefers-reduced-motion: reduce)').matches) return null;\n const driver = new ScrollDriver(options);\n roots.forEach(root => driver.add(root));\n return driver;\n}\n","/**\n * @vectoriox/iox-ui/scene-core — a Scene: a stage that holds still while the page scrolls past it, its layers moving on\n * ONE progress value (premium-sites plan §5b). FRAMEWORK-FREE: the builder canvas, both engine paths and (from SC6) the\n * composer read the same tracks, frames and recipe; the driver is DOM-only and is the ONE scroll loop.\n * ⚠️ Consumers wire the usual trio — ng-package raw-ts assets, jest moduleNameMapper, tsconfig paths.\n */\nexport * from './scene';\nexport * from './scene-edit';\nexport * from './scene-recipe';\nexport * from './scroll-driver';\nexport * from './split-text';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["PERCENT"],"mappings":";;;AAGA;;;;;;;;AAQG;IAES;AAAZ,CAAA,UAAY,SAAS,EAAA;;AAEjB,IAAA,SAAA,CAAA,GAAA,CAAA,GAAA,GAAO;;AAEP,IAAA,SAAA,CAAA,GAAA,CAAA,GAAA,GAAO;AACP,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,OAAe;;AAEf,IAAA,SAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;;AAEjB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;;A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AC,CAAC;AAC/D,YAAA,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,KAAK,OAAO;AAAE,gBAAA,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO;AACtE,QAAA,CAAC,CAAC;IACN;AACH;AAED;AACuE;SACvD,YAAY,CAAC,SAAsB,EAAE,UAA+B,EAAE,EAAA;AAClF,IAAA,MAAM,KAAK,GAAG,SAAS,CAAC,gBAAgB,CAAc,CAAA,CAAA,EAAI,cAAc,CAAC,IAAI,CAAA,CAAA,CAAG,CAAC;IACjF,IAAI,CAAC,KAAK,CAAC,MAAM;AAAE,QAAA,OAAO,IAAI;AAC9B,IAAA,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,MAAM;IACnC,IAAI,IAAI,CAAC,UAAU,GAAG,kCAAkC,CAAC,CAAC,OAAO;AAAE,QAAA,OAAO,IAAI;AAC9E,IAAA,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC;AACxC,IAAA,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACvC,IAAA,OAAO,MAAM;AACjB;;ACxWA;;;;;AAKG;;ACLH;;AAEG;;;;"}
1
+ {"version":3,"file":"vectoriox-iox-ui-scene-core.mjs","sources":["../../../projects/iox-ui/src/scene-core/scene.ts","../../../projects/iox-ui/src/scene-core/scene-edit.ts","../../../projects/iox-ui/src/scene-core/scene-recipe.ts","../../../projects/iox-ui/src/scene-core/split-text.ts","../../../projects/iox-ui/src/scene-core/scroll-driver.ts","../../../projects/iox-ui/src/scene-core/public-api.ts","../../../projects/iox-ui/src/scene-core/vectoriox-iox-ui-scene-core.ts"],"sourcesContent":["import { SceneRole } from '@vectoriox/iox-ui/composite-core';\nimport { FRAMES_PHONE_MAX_WIDTH, VideoAttribute, VideoClass } from '@vectoriox/iox-ui/media-core';\n\n/**\n * A Scene's data and maths (premium-sites plan §5b). A Scene is a recipe of ordinary nodes — a tall Section, a pinned\n * stage inside it, ordinary nodes as layers — so every word stays real, bound and translatable, and all three render\n * paths already draw it. What moves a layer is its OWN `sceneTracks`, never a list on the root naming layer ids: a clone\n * copies them with the layer, a delete takes them with it, and there is no id to remap.\n *\n * The vocabulary is closed. Every property is one the compositor can run without layout (CLS stays 0): a saved value\n * outside it is dropped when read, so a page document can never write CSS through a track.\n */\n\nexport enum SceneProp {\n /** Along the inline axis, in % of the stage's width. Positive runs toward the inline END (mirrored in RTL). */\n X = 'x',\n /** Down, in % of the stage's height. */\n Y = 'y',\n Scale = 'scale',\n /** Degrees. */\n Rotate = 'rotate',\n /** 0–1. */\n Opacity = 'opacity',\n /** How much of the layer shows, in % (100 = whole, 0 = gone). Its track's `from` says where it opens from. */\n Clip = 'clip',\n /** How many of the layer's words are lit, in % (100 = all): the word-by-word light-up. Split in the browser only. */\n Words = 'words',\n /** How much of a Video layer's pictures have played, in % (100 = the last picture). */\n Play = 'play',\n /** The layer's background colour. */\n Ground = 'ground',\n /** The layer's text colour. */\n Ink = 'ink',\n}\n\n/** Where a reveal opens from. Start and End mirror in RTL. */\nexport enum SceneRevealFrom {\n Centre = 'centre',\n Bottom = 'bottom',\n Top = 'top',\n Start = 'start',\n End = 'end',\n}\n\n/** What a reveal opens from when nobody has said: the page's own direction of travel, upward as it scrolls. */\nexport const SCENE_REVEAL_DEFAULT = SceneRevealFrom.Bottom;\n\n/** One key: at progress `[0]` (0–1) the property holds `[1]`: a number, or a colour for Ground and Ink. */\nexport type SceneKey = readonly [number, number | string];\n\nexport interface SceneTrack {\n prop: SceneProp;\n /** Ascending by progress. Between two keys the value eases (smoothstep); outside them it holds the nearest. */\n keys: ReadonlyArray<SceneKey>;\n /** A Clip track's direction. */\n from?: SceneRevealFrom;\n}\n\n/** What a node carries (both a builder node and a saved one). */\nexport interface SceneNodeSource {\n role?: string | null;\n /** How this layer moves, from the wide layout down to the phone's. */\n sceneTracks?: ReadonlyArray<SceneTrack> | null;\n /** How it moves at phone width instead (`SCENE_PHONE_MAX_WIDTH`). Absent = the same tracks. */\n scenePhoneTracks?: ReadonlyArray<SceneTrack> | null;\n}\n\n/** A frame as inline-style properties (camelCase, as `CSSStyleDeclaration` and `Object.assign` take them). */\nexport interface SceneFrame {\n transform?: string;\n opacity?: string;\n clipPath?: string;\n backgroundColor?: string;\n color?: string;\n /** A layer faded right out takes no clicks: it would sit invisibly over what is under it. `''` clears it. */\n pointerEvents?: string;\n}\n\nexport enum SceneAttribute {\n Root = 'data-iox-scene',\n Tracks = 'data-iox-tracks',\n PhoneTracks = 'data-iox-tracks-phone',\n}\n\n/** At or under this stage width a layer plays its phone tracks. The `mobile` breakpoint's width. */\nexport const SCENE_PHONE_MAX_WIDTH = FRAMES_PHONE_MAX_WIDTH;\n\nconst DECIMALS = 10000;\nconst round = (v: number): number => Math.round(v * DECIMALS) / DECIMALS;\nconst clamp01 = (v: number): number => Math.min(1, Math.max(0, v));\nconst smoothstep = (t: number): number => t * t * (3 - 2 * t);\n\n/** A colour a track may hold: a hex, an rgb()/hsl() literal, or a design token. Anything else could break out of the\n * inline style it lands in. */\nconst COLOUR = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\\([\\d\\s.,%/]+\\)|var\\(--iox-[\\w-]+\\))$/i;\nconst COLOUR_PROPS: ReadonlySet<SceneProp> = new Set([SceneProp.Ground, SceneProp.Ink]);\nconst ALL_PROPS: ReadonlySet<string> = new Set(Object.values(SceneProp));\nconst REVEAL_FROMS: ReadonlySet<string> = new Set(Object.values(SceneRevealFrom));\nconst PERCENT = 100;\nconst clampPercent = (v: number): number => Math.min(PERCENT, Math.max(0, v));\n\nfunction validKey(key: unknown, colour: boolean): key is SceneKey {\n if (!Array.isArray(key) || key.length !== 2) return false;\n const [p, value] = key;\n if (typeof p !== 'number' || !Number.isFinite(p) || p < 0 || p > 1) return false;\n return colour ? typeof value === 'string' && COLOUR.test(value) : typeof value === 'number' && Number.isFinite(value);\n}\n\n/**\n * The tracks a saved value really holds: unknown properties, bad keys and colours that are not colours are dropped,\n * keys sorted by progress, a track left with no key dropped. Never throws on what a page document holds.\n */\nexport function normalizeTracks(tracks: unknown): SceneTrack[] {\n if (!Array.isArray(tracks)) return [];\n const out: SceneTrack[] = [];\n for (const track of tracks) {\n const prop = (track as SceneTrack | null)?.prop;\n if (!prop || !ALL_PROPS.has(prop) || !Array.isArray((track as SceneTrack).keys)) continue;\n const keys = (track as SceneTrack).keys\n .filter(key => validKey(key, COLOUR_PROPS.has(prop)))\n .slice()\n .sort((a, b) => a[0] - b[0]);\n if (!keys.length) continue;\n out.push(prop === SceneProp.Clip ? clipTrack(keys, (track as SceneTrack).from) : { prop, keys });\n }\n return out;\n}\n\n/**\n * A Clip track with a direction. One with none was saved when a reveal could only close in from every side, its value\n * the inset per side (50 = gone): it reads as the same movement, from the centre, in % showing.\n */\nfunction clipTrack(keys: ReadonlyArray<SceneKey>, from: unknown): SceneTrack {\n if (typeof from === 'string' && REVEAL_FROMS.has(from)) return { prop: SceneProp.Clip, from: from as SceneRevealFrom, keys };\n return { prop: SceneProp.Clip, from: SceneRevealFrom.Centre, keys: keys.map(([p, inset]): SceneKey => [p, clampPercent(PERCENT - Number(inset) * 2)]) };\n}\n\n/**\n * The clip-path of a layer `showing` % revealed, opening from `from`. The one shape behind a Scene's Clip track and the\n * clipReveal action. `clip-path` has no logical sides, so Start and End take the direction from `inlineSign`.\n */\nexport function revealClipPath(showing: number, from: SceneRevealFrom = SCENE_REVEAL_DEFAULT, inlineSign: 1 | -1 = 1): string {\n const hidden = round(PERCENT - clampPercent(showing));\n switch (from) {\n case SceneRevealFrom.Centre: return `inset(${round(hidden / 2)}%)`;\n case SceneRevealFrom.Top: return `inset(0 0 ${hidden}% 0)`;\n case SceneRevealFrom.Start: return inlineSign === 1 ? `inset(0 ${hidden}% 0 0)` : `inset(0 0 0 ${hidden}%)`;\n case SceneRevealFrom.End: return inlineSign === 1 ? `inset(0 0 0 ${hidden}%)` : `inset(0 ${hidden}% 0 0)`;\n default: return `inset(${hidden}% 0 0 0)`;\n }\n}\n\nconst linear = (t: number): number => t;\n\n/** The two keys around `p` and how far between them it has come. */\nfunction span(keys: ReadonlyArray<SceneKey>, p: number, ease: (t: number) => number = smoothstep): { a: SceneKey; b: SceneKey; f: number } {\n const at = clamp01(p);\n if (at <= keys[0][0]) return { a: keys[0], b: keys[0], f: 0 };\n for (let i = 1; i < keys.length; i++) {\n if (at <= keys[i][0]) {\n const a = keys[i - 1];\n const b = keys[i];\n const width = b[0] - a[0];\n return { a, b, f: width > 0 ? ease((at - a[0]) / width) : 1 };\n }\n }\n const last = keys[keys.length - 1];\n return { a: last, b: last, f: 0 };\n}\n\n/** A numeric track's value at progress `p`. */\nexport function valueAt(keys: ReadonlyArray<SceneKey>, p: number, ease?: (t: number) => number): number {\n if (!keys.length) return 0;\n const { a, b, f } = span(keys, p, ease);\n const from = Number(a[1]);\n return round(from + (Number(b[1]) - from) * f);\n}\n\n/**\n * A colour track's value at progress `p`. Mixed by the browser, never computed here, so a design token stays a live\n * reference (a re-theme reaches a Scene, as it reaches every saved page) and the path is perceptual.\n */\nexport function colourAt(keys: ReadonlyArray<SceneKey>, p: number): string {\n if (!keys.length) return '';\n const { a, b, f } = span(keys, p);\n if (f <= 0 || a === b) return String(a[1]);\n if (f >= 1) return String(b[1]);\n return `color-mix(in oklab, ${a[1]} ${round((1 - f) * 100)}%, ${b[1]})`;\n}\n\nexport interface SceneFrameOptions {\n /** -1 when the stage reads right-to-left: the inline axis mirrors. */\n inlineSign?: 1 | -1;\n}\n\n/** What the tracks' transform-family properties rest at when a layer has no track for one. */\nconst TRANSFORM_REST: Readonly<Partial<Record<SceneProp, number>>> = { [SceneProp.X]: 0, [SceneProp.Y]: 0, [SceneProp.Scale]: 1, [SceneProp.Rotate]: 0 };\n\n/**\n * A layer's frame at progress `p`. Lengths are container-query units, so one frame is right at any width, under any\n * canvas zoom, on the server and with no measuring: the stage is the size container (`iox-design.css`).\n */\nexport function sceneFrame(tracks: ReadonlyArray<SceneTrack>, p: number, options: SceneFrameOptions = {}): SceneFrame {\n const frame: SceneFrame = {};\n const moves: Partial<Record<SceneProp, number>> = {};\n for (const { prop, keys, from } of tracks) {\n if (prop in TRANSFORM_REST) moves[prop] = valueAt(keys, p);\n else if (prop === SceneProp.Opacity) {\n const opacity = clamp01(valueAt(keys, p));\n frame.opacity = String(opacity);\n frame.pointerEvents = opacity > 0 ? '' : 'none';\n }\n else if (prop === SceneProp.Clip) frame.clipPath = revealClipPath(valueAt(keys, p), from ?? SceneRevealFrom.Centre, options.inlineSign ?? 1);\n else if (prop === SceneProp.Ground) frame.backgroundColor = colourAt(keys, p);\n else if (prop === SceneProp.Ink) frame.color = colourAt(keys, p);\n }\n if (Object.keys(moves).length) {\n const value = (prop: SceneProp): number => moves[prop] ?? TRANSFORM_REST[prop]!;\n const x = round(value(SceneProp.X) * (options.inlineSign ?? 1));\n frame.transform = `translate3d(${x}cqw, ${value(SceneProp.Y)}cqh, 0) rotate(${value(SceneProp.Rotate)}deg) scale(${value(SceneProp.Scale)})`;\n }\n return frame;\n}\n\n/** How far an unlit word still shows: readable as a shape, plainly not yet said. */\nexport const SCENE_WORD_DIM = 0.16;\n\n/** How many of a layer's words are lit at `p`, in %; null when it has no such track. */\nexport function sceneWordsLit(tracks: ReadonlyArray<SceneTrack>, p: number): number | null {\n const track = tracks.find(t => t.prop === SceneProp.Words);\n return track ? clampPercent(valueAt(track.keys, p)) : null;\n}\n\n/**\n * How far a layer's pictures have played at `p`, in %; null when it has no such track. A film runs straight between its\n * keys, where everything else eases: eased over a 20-screen Scene it would crawl for its first screens and rush the middle.\n */\nexport function scenePlayed(tracks: ReadonlyArray<SceneTrack>, p: number): number | null {\n const track = tracks.find(t => t.prop === SceneProp.Play);\n return track ? clampPercent(valueAt(track.keys, p, linear)) : null;\n}\n\n/** Word `index` of `count`, with `lit` % lit: words light one after the other, each easing in as the last finishes. */\nexport function sceneWordOpacity(index: number, count: number, lit: number): number {\n return round(SCENE_WORD_DIM + (1 - SCENE_WORD_DIM) * clamp01((lit / PERCENT) * count - index));\n}\n\nconst CSS_NAME: Readonly<Record<keyof SceneFrame, string>> = {\n transform: 'transform',\n opacity: 'opacity',\n clipPath: 'clip-path',\n backgroundColor: 'background-color',\n color: 'color',\n pointerEvents: 'pointer-events',\n};\n\n/** A frame as kebab-case style declarations, for a string renderer. */\nexport function sceneFrameDeclarations(frame: SceneFrame): Record<string, string> {\n const out: Record<string, string> = {};\n for (const [key, value] of Object.entries(frame)) if (value) out[CSS_NAME[key as keyof SceneFrame]] = value;\n return out;\n}\n\n/** The attributes a node's own element carries — the same decision in all three render paths. The runtime reads them,\n * so it needs no node tree and is the same on every path. Empty for any node that is no part of a Scene. */\nexport function sceneNodeAttributes(node: SceneNodeSource | null | undefined): Record<string, string> {\n const attrs: Record<string, string> = {};\n if (node?.role === SceneRole.Scene) attrs[SceneAttribute.Root] = '';\n const tracks = normalizeTracks(node?.sceneTracks);\n const phone = normalizeTracks(node?.scenePhoneTracks);\n if (tracks.length) attrs[SceneAttribute.Tracks] = JSON.stringify(tracks);\n if (phone.length) attrs[SceneAttribute.PhoneTracks] = JSON.stringify(phone);\n return attrs;\n}\n\n/** The frame a layer ships in from the server: where it stands before anyone has scrolled. Without it the page would\n * paint every layer at once, and then jump when the script arrives. */\nexport function sceneFirstFrame(node: SceneNodeSource | null | undefined): SceneFrame {\n const tracks = normalizeTracks(node?.sceneTracks);\n const frame = sceneFrame(tracks, 0);\n // The words are split in the browser, so until then the whole layer stands for them, or it paints lit and then dims.\n const lit = sceneWordsLit(tracks, 0);\n return lit !== null && lit < PERCENT && frame.opacity === undefined ? { ...frame, opacity: String(SCENE_WORD_DIM) } : frame;\n}\n\n/**\n * Make an element carry its node's Scene attributes: the live sync on the canvas and the component path's stamp.\n * Removes stale ones, touches nothing else.\n */\nexport function syncSceneAttributes(el: HTMLElement | null | undefined, node: SceneNodeSource | null | undefined): void {\n if (!el?.setAttribute) return;\n const attrs = sceneNodeAttributes(node);\n for (const name of Object.values(SceneAttribute)) {\n if (name in attrs) el.setAttribute(name, attrs[name]);\n else el.removeAttribute(name);\n }\n}\n\n/** Stamp a layer's first frame on its element (the component path, on the server too). */\nexport function applySceneFirstFrame(el: HTMLElement | null | undefined, node: SceneNodeSource | null | undefined): void {\n if (!el?.style) return;\n for (const [name, value] of Object.entries(sceneFrameDeclarations(sceneFirstFrame(node)))) el.style.setProperty(name, value);\n}\n\n/**\n * Where nothing will drive it (reduced motion, no script) a Scene is ordinary content: it flows, every layer in its\n * place and in its own look, every word readable. `!important` because it must beat a node's compiled height and\n * position, and the inline first frame. The engine wraps it in a reduced-motion query and in `<noscript>`.\n */\nexport const SCENE_FLOW_RULES = `.iox-role-scene{height:auto!important}`\n // A stage's layers are placed over one another for the scroll to move. With no scroll they stand one after the other, or\n // every word lands on the last. The stage isolates, so a film laid behind the words stays in front of its background.\n + `.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important;display:flex!important;flex-direction:column!important;gap:clamp(40px,8vw,72px)!important;padding:clamp(72px,10vw,96px) clamp(16px,4vw,32px)!important;isolation:isolate}`\n + `.iox-role-scene-stage>*{position:relative!important;inset:auto!important;max-width:100%!important}`\n // On the component path a node stands inside its host, so that is where its own placement has to go.\n + `.iox-role-scene-stage>[class*=\"iox-outer-\"]>[class*=\"iox-node-\"]{position:relative!important;inset:auto!important}`\n + `[${SceneAttribute.Tracks}]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}`\n // A row the scroll slid sideways has no scroll to slide it now: it wraps, or its last items run off the side of a phone.\n + `[${SceneAttribute.Tracks}]{max-width:100%!important;flex-wrap:wrap!important}`\n // A Video the scroll plays stands as its poster, at the poster's own height: a percent of a stage that now flows is nothing.\n + `[${VideoAttribute.Frames}]{height:auto!important}`\n // On the component path it stands inside a host that took no height from it, so the host steps out of the layout.\n + `iox-video:has(>[${VideoAttribute.Frames}]){display:contents!important}`\n + `[${VideoAttribute.Frames}]>.${VideoClass.Poster},[${VideoAttribute.Frames}]>picture>.${VideoClass.Poster}{position:static!important;height:auto!important}`;\n\n/** Under reduced motion the driver never starts, so the same rules hold for the whole visit. */\nexport const SCENE_REDUCED_MOTION_CSS = `@media (prefers-reduced-motion: reduce){${SCENE_FLOW_RULES}}`;\n","import { SceneRole } from '@vectoriox/iox-ui/composite-core';\nimport { FILM_SMOOTH_PER_SCREEN } from '@vectoriox/iox-ui/media-core';\n\nimport { normalizeTracks, SCENE_REVEAL_DEFAULT, SceneKey, SceneNodeSource, SceneProp, SceneRevealFrom, SceneTrack, valueAt } from './scene';\n\n/**\n * Authoring a Scene (premium-sites plan §5b, SC2): the decisions the builder's timeline and its panel share, so neither\n * holds a second copy of what a key is. Pure, and every edit returns NEW tracks: the caller assigns them to the node, so\n * undo's snapshot and the attribute the driver reads can never see a half-made edit.\n *\n * One rule to author by: one key holds, two keys move. A value edited at a scroll position sets a key there, so a layer\n * is animated by scrolling to a moment and saying where it stands at that moment.\n */\n\n/** Keys sit on whole percents of the scroll: finer than anyone can place by hand, and two keys never nearly coincide. */\nconst KEY_GRID = 100;\n\nexport function sceneKeyPosition(p: number): number {\n return Math.round(Math.min(1, Math.max(0, p)) * KEY_GRID) / KEY_GRID;\n}\n\nexport interface SceneTrackDef {\n prop: SceneProp;\n /** Ground and Ink hold colours; everything else holds a number. */\n colour: boolean;\n /** What a layer with no track for this property stands at, in stored units. */\n rest: number;\n /** The bounds and the step, in the units the author sees. */\n min: number;\n max: number;\n step: number;\n /** Author's units per stored unit: scale 1.2 reads 120 %, opacity 0.5 reads 50 %. */\n factor: number;\n unit: string;\n}\n\nconst PERCENT = '%';\nconst DEGREES = '°';\n\n/** The closed vocabulary, in the order the panel lists it. */\nexport const SCENE_TRACK_DEFS: ReadonlyArray<SceneTrackDef> = [\n { prop: SceneProp.X, colour: false, rest: 0, min: -300, max: 300, step: 1, factor: 1, unit: PERCENT },\n { prop: SceneProp.Y, colour: false, rest: 0, min: -300, max: 300, step: 1, factor: 1, unit: PERCENT },\n { prop: SceneProp.Scale, colour: false, rest: 1, min: 0, max: 2000, step: 1, factor: 100, unit: PERCENT },\n { prop: SceneProp.Rotate, colour: false, rest: 0, min: -720, max: 720, step: 1, factor: 1, unit: DEGREES },\n { prop: SceneProp.Opacity, colour: false, rest: 1, min: 0, max: 100, step: 1, factor: 100, unit: PERCENT },\n { prop: SceneProp.Clip, colour: false, rest: 100, min: 0, max: 100, step: 1, factor: 1, unit: PERCENT },\n { prop: SceneProp.Words, colour: false, rest: 100, min: 0, max: 100, step: 1, factor: 1, unit: PERCENT },\n { prop: SceneProp.Play, colour: false, rest: 0, min: 0, max: 100, step: 1, factor: 1, unit: PERCENT },\n { prop: SceneProp.Ground, colour: true, rest: 0, min: 0, max: 0, step: 0, factor: 1, unit: '' },\n { prop: SceneProp.Ink, colour: true, rest: 0, min: 0, max: 0, step: 0, factor: 1, unit: '' },\n];\n\nconst DEF_BY_PROP = new Map(SCENE_TRACK_DEFS.map(def => [def.prop, def]));\n\nexport function sceneTrackDef(prop: SceneProp): SceneTrackDef {\n return DEF_BY_PROP.get(prop)!;\n}\n\nconst trackOf = (tracks: ReadonlyArray<SceneTrack>, prop: SceneProp): SceneTrack | undefined => tracks.find(t => t.prop === prop);\nconst samePosition = (a: number, b: number): boolean => sceneKeyPosition(a) === sceneKeyPosition(b);\nconst roundTo = (value: number, places = 4): number => Number(value.toFixed(places));\n\n/** A number track's value at `p` in the author's units, or where the layer rests when it has no such track. */\nexport function sceneDisplayValue(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, p: number): number {\n const def = sceneTrackDef(prop);\n const track = trackOf(tracks, prop);\n return roundTo((track ? valueAt(track.keys, p) : def.rest) * def.factor, 2);\n}\n\n/**\n * The colour to show for a colour track at `p`: the key at or before it, else the first. Between two keys the live value\n * is a mix, which is no value a colour control can edit; the author sets keys, so the panel shows a key.\n */\nexport function sceneColourKeyAt(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, p: number): string {\n const keys = trackOf(tracks, prop)?.keys;\n if (!keys?.length) return '';\n let held = keys[0];\n for (const key of keys) if (key[0] <= sceneKeyPosition(p)) held = key;\n return String(held[1]);\n}\n\nexport function sceneHasKeyAt(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, p: number): boolean {\n return !!trackOf(tracks, prop)?.keys.some(key => samePosition(key[0], p));\n}\n\nfunction storedValue(def: SceneTrackDef, value: number | string): number | string {\n if (def.colour) return value;\n return roundTo(Math.min(def.max, Math.max(def.min, Number(value))) / def.factor);\n}\n\nfunction replaceTrack(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, keys: ReadonlyArray<SceneKey>): SceneTrack[] {\n const rest = tracks.filter(t => t.prop !== prop);\n if (!keys.length) return rest;\n const at = tracks.findIndex(t => t.prop === prop);\n const next = [...rest];\n const from = prop === SceneProp.Clip ? { from: tracks[at]?.from ?? SCENE_REVEAL_DEFAULT } : {};\n next.splice(at < 0 ? rest.length : at, 0, { prop, ...from, keys });\n return next;\n}\n\n/** Where a layer's reveal opens from: its track's direction, else where a new one would open from. */\nexport function sceneRevealFromOf(tracks: ReadonlyArray<SceneTrack>): SceneRevealFrom {\n return trackOf(tracks, SceneProp.Clip)?.from ?? SCENE_REVEAL_DEFAULT;\n}\n\n/**\n * Open a layer's reveal from `from`. With no reveal yet it starts one with a key at `p` holding the layer whole, so the\n * direction is kept and nothing on screen changes until the author sets a second key.\n */\nexport function withSceneRevealFrom(tracks: ReadonlyArray<SceneTrack>, from: SceneRevealFrom, p: number): SceneTrack[] {\n if (!trackOf(tracks, SceneProp.Clip)) return [...tracks, { prop: SceneProp.Clip, from, keys: [[sceneKeyPosition(p), sceneTrackDef(SceneProp.Clip).rest]] }];\n return tracks.map(track => (track.prop === SceneProp.Clip ? { ...track, from } : track));\n}\n\n/**\n * A layer's pictures playing across the whole Scene: the start of playing them. Keys the author has set are kept, so\n * replacing the pictures keeps the timing.\n */\nexport function withScenePlayback(tracks: ReadonlyArray<SceneTrack>): SceneTrack[] {\n if (trackOf(tracks, SceneProp.Play)) return [...tracks];\n return [...tracks, { prop: SceneProp.Play, keys: [[0, 0], [1, 100]] }];\n}\n\n/** Stop playing a layer's pictures. */\nexport function withoutScenePlayback(tracks: ReadonlyArray<SceneTrack>): SceneTrack[] {\n return tracks.filter(track => track.prop !== SceneProp.Play);\n}\n\n/**\n * Set a key at `p`, in the author's units. A number is clamped to its bounds; a colour that is no colour changes nothing,\n * because `normalizeTracks` would drop it anyway and the author's other keys must survive.\n */\nexport function withSceneKey(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, p: number, value: number | string): SceneTrack[] {\n const def = sceneTrackDef(prop);\n const at = sceneKeyPosition(p);\n if (!def.colour && !Number.isFinite(Number(value))) return [...tracks];\n const key: SceneKey = [at, storedValue(def, value)];\n const others = (trackOf(tracks, prop)?.keys ?? []).filter(k => !samePosition(k[0], at));\n const keys = [...others, key].sort((a, b) => a[0] - b[0]);\n const next = replaceTrack(tracks, prop, keys);\n return trackOf(normalizeTracks(next), prop)?.keys.length === keys.length ? next : [...tracks];\n}\n\n/** Remove the key at `p`. The last key of a track takes the track with it. */\nexport function withoutSceneKey(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, p: number): SceneTrack[] {\n const track = trackOf(tracks, prop);\n if (!track) return [...tracks];\n return replaceTrack(tracks, prop, track.keys.filter(key => !samePosition(key[0], p)));\n}\n\n/**\n * Move a key from `from` toward `to`, stopping one grid step short of its neighbours: keys never swap, so a drag can\n * never reverse a movement the author set. Returns where it landed, so a drag keeps following it.\n */\nexport function movedSceneKey(tracks: ReadonlyArray<SceneTrack>, prop: SceneProp, from: number, to: number): { tracks: SceneTrack[]; at: number } {\n const track = trackOf(tracks, prop);\n const index = track ? track.keys.findIndex(key => samePosition(key[0], from)) : -1;\n if (!track || index < 0) return { tracks: [...tracks], at: sceneKeyPosition(from) };\n const step = 1 / KEY_GRID;\n const low = index > 0 ? track.keys[index - 1][0] + step : 0;\n const high = index < track.keys.length - 1 ? track.keys[index + 1][0] - step : 1;\n const at = sceneKeyPosition(Math.min(high, Math.max(low, to)));\n const keys = track.keys.map((key, i): SceneKey => (i === index ? [at, key[1]] : key));\n return { tracks: replaceTrack(tracks, prop, keys), at };\n}\n\n/** A track's bar on the timeline: from its first key to its last, as fractions of the scroll. */\nexport function sceneTrackSpan(track: SceneTrack): { from: number; to: number } {\n return { from: track.keys[0][0], to: track.keys[track.keys.length - 1][0] };\n}\n\n/** A node as these helpers read it: a builder node and a saved one both fit. */\nexport interface SceneTreeNode extends SceneNodeSource {\n id?: string;\n children?: ReadonlyArray<SceneTreeNode> | null;\n}\n\n/** The Scene a selection sits in: the innermost Scene on its path from the top. */\nexport function sceneRootOnPath<T extends SceneTreeNode>(path: ReadonlyArray<T>): T | null {\n for (let i = path.length - 1; i >= 0; i--) if (path[i].role === SceneRole.Scene) return path[i];\n return null;\n}\n\n/** Every Scene on a page, in document order, a Scene inside a Scene included. */\nexport function scenesIn<T extends SceneTreeNode>(nodes: ReadonlyArray<T> | null | undefined): T[] {\n const found: T[] = [];\n for (const node of nodes ?? []) {\n if (node.role === SceneRole.Scene) found.push(node);\n found.push(...scenesIn((node.children ?? []) as ReadonlyArray<T>));\n }\n return found;\n}\n\nconst hasTracks = (node: SceneTreeNode): boolean =>\n normalizeTracks(node.sceneTracks).length > 0 || normalizeTracks(node.scenePhoneTracks).length > 0;\n\n/**\n * What the timeline lists: the stage, everything standing on it, and anything deeper that carries tracks. A layer with\n * none is listed too, or it could never be given its first. A Scene inside this one keeps its own timeline.\n */\nexport function sceneLayersOf<T extends SceneTreeNode>(root: T | null | undefined): T[] {\n const stage = (root?.children ?? []).find(child => child.role === SceneRole.Stage) as T | undefined;\n if (!stage) return [];\n const layers: T[] = [stage];\n const deeper = (node: T): void => {\n for (const child of (node.children ?? []) as ReadonlyArray<T>) {\n if (child.role === SceneRole.Scene) continue;\n if (hasTracks(child)) layers.push(child);\n deeper(child);\n }\n };\n for (const child of (stage.children ?? []) as ReadonlyArray<T>) {\n if (child.role === SceneRole.Scene) continue;\n layers.push(child);\n deeper(child);\n }\n return layers;\n}\n\n/** How many screens of scrolling a Scene holds for, and the bounds the panel offers. */\nexport const SCENE_MIN_SCREENS = 0.5;\nexport const SCENE_MAX_SCREENS = 20;\n\nconst VIEWPORT_HEIGHT = /^([\\d.]+)[sdl]?vh$/;\n\n/**\n * The root's height as screens of scrolling: the stage itself takes one screen, so 400vh holds for 3. Null for a height\n * set in anything else (a hand-set px), which the panel then says it cannot express rather than overwriting it.\n */\nexport function sceneScreensOf(height: string | null | undefined): number | null {\n const match = VIEWPORT_HEIGHT.exec(String(height ?? '').trim());\n if (!match) return null;\n return Math.max(0, roundTo(Number(match[1]) / 100 - 1, 2));\n}\n\nexport function sceneHeightForScreens(screens: number): string {\n const held = Math.min(SCENE_MAX_SCREENS, Math.max(SCENE_MIN_SCREENS, screens));\n return `${roundTo((held + 1) * 100, 1)}vh`;\n}\n\n/** Pictures per screen of scrolling at which a played film stays smooth (media-core's, which the composer sizes by). */\nexport const SCENE_FILM_SMOOTH = FILM_SMOOTH_PER_SCREEN;\n\nexport interface SceneFilmDensity {\n /** Pictures per screen of scrolling over most of the play: half its scroll holds at least this many. */\n perScreen: number;\n /** The screens of scrolling the film plays over; where it holds still is not counted. */\n screens: number;\n smooth: boolean;\n}\n\n/**\n * How densely a film of `count` pictures plays on a Scene of `screens`, by its Play track; null when nothing plays. A\n * film's smoothness is its density, never the drawing: spread thin, a slowing glide holds each picture for many refreshes.\n */\nexport function sceneFilmDensity(tracks: ReadonlyArray<SceneTrack> | null | undefined, screens: number | null, count: number): SceneFilmDensity | null {\n const keys = normalizeTracks(tracks).find(track => track.prop === SceneProp.Play)?.keys ?? [];\n if (count < 2 || !screens || screens <= 0) return null;\n const stretches: { perScreen: number; screens: number }[] = [];\n for (let i = 1; i < keys.length; i++) {\n const scrolled = (keys[i][0] - keys[i - 1][0]) * screens;\n const played = Math.abs(Number(keys[i][1]) - Number(keys[i - 1][1]));\n if (scrolled > 0 && played > 0) stretches.push({ perScreen: ((played / 100) * (count - 1)) / scrolled, screens: scrolled });\n }\n if (!stretches.length) return null;\n stretches.sort((a, b) => a.perScreen - b.perScreen);\n const total = stretches.reduce((sum, stretch) => sum + stretch.screens, 0);\n let covered = 0;\n const typical = stretches.find(stretch => (covered += stretch.screens) >= total / 2)!;\n return { perScreen: Math.round(typical.perScreen), screens: roundTo(total, 1), smooth: typical.perScreen >= SCENE_FILM_SMOOTH };\n}\n\n/** Motion v2 §3d's limits for scroll-linked work on one page. */\nexport const SCENE_BUDGET = { heldSections: 1, movingLayers: 8 } as const;\n\nexport interface SceneBudget {\n /** Every track on the page's Scenes. */\n tracks: number;\n heldSections: number;\n movingLayers: number;\n within: boolean;\n}\n\n/** What a page's Scenes cost. Advice to the author, never a refusal: the composer enforces it from SC6. */\nexport function sceneBudget(nodes: ReadonlyArray<SceneTreeNode> | null | undefined): SceneBudget {\n const scenes = scenesIn(nodes);\n const moving = scenes.flatMap(scene => sceneLayersOf(scene)).filter(hasTracks);\n const movingLayers = new Set(moving).size;\n const tracks = [...new Set(moving)].reduce((sum, node) => sum + normalizeTracks(node.sceneTracks).length, 0);\n return {\n tracks,\n heldSections: scenes.length,\n movingLayers,\n within: scenes.length <= SCENE_BUDGET.heldSections && movingLayers <= SCENE_BUDGET.movingLayers,\n };\n}\n","import { CompositeNode, CompositeNodeFactory, makeCompositePart, NO_ELEMENT_STYLE, SceneRole, writeLayerStyles, writeStyles } from '@vectoriox/iox-ui/composite-core';\n\nimport { SceneNodeSource, SceneProp, SceneTrack } from './scene';\n\n/**\n * The SCENE recipe: ordinary nodes, no new type, so all three render paths and every panel already know it.\n *\n * Section role scene height = how long it plays (× the viewport)\n * └─ Container role scene.stage pinned, one viewport tall, clips its layers, the size container for their lengths\n * ├─ Heading a layer with its own tracks\n * └─ Text a layer with its own tracks\n *\n * How long it plays IS the root's height, so it follows the width system the way every other size does. The stage is a\n * track-carrying layer too: its Ground is the colour the whole Scene moves through.\n */\n\nexport type SceneLayerNode = CompositeNode & SceneNodeSource;\n\nexport interface SceneWords {\n title: string;\n line: string;\n}\n\n/** Generic words a fresh Scene starts with: the author's to replace. */\nexport const SCENE_WORDS: Readonly<SceneWords> = {\n title: 'One idea, held still',\n line: 'The page keeps moving. This stays until you have read it.',\n};\n\n/** How long a fresh Scene plays: 4 viewports wide, 3 on a phone (a thumb travels less). */\nexport const SCENE_LENGTH = '400vh';\nexport const SCENE_PHONE_LENGTH = '300vh';\n/** Small viewport height: a phone's toolbar never pushes the stage's bottom out of sight. */\nexport const SCENE_STAGE_HEIGHT = '100svh';\nconst PHONE_BREAKPOINT = 'mobile';\nconst TITLE_LEVEL = 'h2';\n\nenum Type {\n Section = 'Section',\n Container = 'Container',\n Heading = 'Heading',\n Text = 'Text',\n}\n\nconst ROOT_LAYOUT: Readonly<Record<string, string>> = {\n position: 'relative',\n display: 'block',\n width: '100%',\n height: SCENE_LENGTH,\n};\n\nconst STAGE_LAYOUT: Readonly<Record<string, string>> = {\n position: 'sticky',\n top: '0px',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: SCENE_STAGE_HEIGHT,\n overflow: 'hidden',\n};\n\nconst TITLE_TRACKS: ReadonlyArray<SceneTrack> = [\n { prop: SceneProp.Opacity, keys: [[0, 0], [0.2, 1], [0.75, 1], [1, 0]] },\n { prop: SceneProp.Y, keys: [[0, 8], [0.2, 0], [1, -6]] },\n { prop: SceneProp.Scale, keys: [[0, 0.96], [0.6, 1], [1, 1.04]] },\n];\n\nconst LINE_TRACKS: ReadonlyArray<SceneTrack> = [\n { prop: SceneProp.Opacity, keys: [[0.25, 0], [0.45, 1], [0.8, 1], [1, 0]] },\n { prop: SceneProp.Y, keys: [[0.25, 6], [0.45, 0], [1, -4]] },\n];\n\nconst STAGE_TRACKS: ReadonlyArray<SceneTrack> = [\n { prop: SceneProp.Ground, keys: [[0, 'var(--iox-surface-2)'], [0.6, 'var(--iox-page-bg)']] },\n];\n\nconst copyTracks = (tracks: ReadonlyArray<SceneTrack>): SceneTrack[] => tracks.map(t => ({ prop: t.prop, keys: t.keys.map(k => [k[0], k[1]] as const) }));\n\n/** A fresh Scene: it already moves, so the author sees what the thing is before touching it. */\nexport function buildSceneRecipe(create: CompositeNodeFactory, words: Partial<SceneWords> = {}): SceneLayerNode {\n const text = { ...SCENE_WORDS, ...words };\n const root = makeCompositePart(create, { key: 'root', type: Type.Section, elementStyle: NO_ELEMENT_STYLE }, SceneRole.Scene, 'Scene', ROOT_LAYOUT) as SceneLayerNode;\n writeLayerStyles(root, PHONE_BREAKPOINT, { height: SCENE_PHONE_LENGTH });\n\n const stage = makeCompositePart(create, { key: 'stage', type: Type.Container, elementStyle: NO_ELEMENT_STYLE }, SceneRole.Stage, 'Stage', STAGE_LAYOUT) as SceneLayerNode;\n stage.sceneTracks = copyTracks(STAGE_TRACKS);\n\n const title = makeCompositePart(create, { key: 'title', type: Type.Heading, props: { content: text.title, level: TITLE_LEVEL } }, null, 'Title') as SceneLayerNode;\n title.sceneTracks = copyTracks(TITLE_TRACKS);\n writeStyles(title, { textAlign: 'center' });\n\n const line = makeCompositePart(create, { key: 'line', type: Type.Text, props: { content: text.line, tag: 'p' } }, null, 'Line') as SceneLayerNode;\n line.sceneTracks = copyTracks(LINE_TRACKS);\n writeStyles(line, { textAlign: 'center' });\n\n stage.children = [title, line];\n root.children = [stage];\n return root;\n}\n","/**\n * Text into pieces, in the browser only (premium sites SC3, Motion v2 §3c). A saved node keeps its plain text and the\n * server sends it whole, so every word is in the raw response, editing never meets a piece, and there is no markup for\n * hydration to disagree with. Each original text node is kept and put back as it was, never rebuilt from a string: a\n * framework may hold that node, and a layer may hold live components.\n */\n\nexport enum TextRevealBy {\n Line = 'line',\n Word = 'word',\n}\n\n/** Past these a text is plainly no heading: it fades whole, and lights up whole. */\nexport const REVEAL_PIECE_CAP = 120;\nexport const LIGHT_UP_PIECE_CAP = 300;\n\nconst SKIPPED_TAGS: ReadonlySet<string> = new Set(['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'SELECT', 'OPTION']);\nconst SHOW_TEXT = 4;\n/** Hebrew through Arabic Extended, and their presentation forms. */\nconst RTL_LETTER = /[֐-ࣿיִ-﷿ﹰ-]/;\n\nexport interface TextPiece {\n text: string;\n /** False for the space between two words, which stays bare text so lines wrap exactly as they did. */\n word: boolean;\n}\n\n/**\n * A string as words and the space between them. With `keepLtrRuns` a run of words holding no RTL letter stays ONE word:\n * an inline-block is neutral to the bidi algorithm, so \"Studio Alma\" inside a Hebrew heading, split, would read reversed.\n */\nexport function textPieces(text: string, keepLtrRuns = false): TextPiece[] {\n const pieces: TextPiece[] = (text.match(/\\s+|\\S+/g) ?? []).map(part => ({ text: part, word: /\\S/.test(part) }));\n if (!keepLtrRuns) return pieces;\n const merged: TextPiece[] = [];\n for (const piece of pieces) {\n const space = merged[merged.length - 1];\n const word = merged[merged.length - 2];\n if (piece.word && !RTL_LETTER.test(piece.text) && space && !space.word && word?.word && !RTL_LETTER.test(word.text)) {\n word.text += space.text + piece.text;\n merged.pop();\n } else {\n merged.push({ ...piece });\n }\n }\n return merged;\n}\n\nexport interface SplitTextOptions {\n cap: number;\n /** Each piece in a clipping mask, to rise out of (and so an inline-block). Without it a piece is a plain inline span. */\n mask?: boolean;\n /** The element reads right-to-left. Only a mask needs to know. */\n rtl?: boolean;\n}\n\nexport interface SplitText {\n /** In reading order. With a mask, the moving part inside it. */\n pieces: HTMLElement[];\n /** Put every original text node back. Safe after the text was replaced: what is gone stays gone. */\n restore(): void;\n}\n\ninterface Replacement {\n original: Text;\n nodes: Node[];\n}\n\nfunction textNodesOf(root: HTMLElement): Text[] {\n const walker = root.ownerDocument.createTreeWalker(root, SHOW_TEXT);\n const found: Text[] = [];\n for (let node = walker.nextNode(); node; node = walker.nextNode()) {\n const parent = node.parentElement;\n if (parent && !SKIPPED_TAGS.has(parent.tagName) && /\\S/.test(node.nodeValue ?? '')) found.push(node as Text);\n }\n return found;\n}\n\nfunction pieceOf(doc: Document, text: string, mask: boolean): { outer: HTMLElement; moving: HTMLElement } {\n const moving = doc.createElement('span');\n moving.textContent = text;\n if (!mask) return { outer: moving, moving };\n moving.style.display = 'inline-block';\n const outer = doc.createElement('span');\n outer.style.display = 'inline-block';\n // A clip-path and not overflow, which would move the box's baseline. The negative sides leave descenders and italics.\n outer.style.clipPath = 'inset(-0.1em -0.1em -0.18em -0.1em)';\n outer.appendChild(moving);\n return { outer, moving };\n}\n\n/** Split `root`'s text, or null when it holds none or more than `cap` pieces (nothing is changed then). */\nexport function splitText(root: HTMLElement, options: SplitTextOptions): SplitText | null {\n const doc = root.ownerDocument;\n const mask = !!options.mask;\n const planned = textNodesOf(root).map(original => ({ original, parts: textPieces(original.nodeValue ?? '', mask && !!options.rtl) }));\n const count = planned.reduce((sum, { parts }) => sum + parts.filter(part => part.word).length, 0);\n if (!count || count > options.cap) return null;\n\n const pieces: HTMLElement[] = [];\n const replacements: Replacement[] = planned.map(({ original, parts }) => {\n const nodes = parts.map((part): Node => {\n if (!part.word) return doc.createTextNode(part.text);\n const { outer, moving } = pieceOf(doc, part.text, mask);\n pieces.push(moving);\n return outer;\n });\n const parent = original.parentNode as ParentNode & Node;\n for (const node of nodes) parent.insertBefore(node, original);\n parent.removeChild(original);\n return { original, nodes };\n });\n\n return {\n pieces,\n restore: () => {\n for (const { original, nodes } of replacements) {\n const first = nodes[0];\n if (!first?.isConnected || !first.parentNode) continue;\n first.parentNode.insertBefore(original, first);\n for (const node of nodes) node.parentNode?.removeChild(node);\n }\n },\n };\n}\n\n/** The line each piece stands on: 0, 0, 1, 1, 1, 2… Read once, as a reveal starts. */\nexport function lineIndexes(tops: ReadonlyArray<number>, heights: ReadonlyArray<number>): number[] {\n let line = 0;\n let top = tops[0] ?? 0;\n return tops.map((next, i) => {\n if (next - top > (heights[i] ?? 0) / 2) {\n line++;\n top = next;\n }\n return line;\n });\n}\n\nconst LINE_STAGGER_MS = 90;\nconst WORD_STAGGER_MS = 40;\n/** However long the heading, the last piece starts within this. */\nconst STAGGER_BUDGET_MS = 1000;\n\nexport function revealStagger(groups: number, by: TextRevealBy): number {\n const step = by === TextRevealBy.Line ? LINE_STAGGER_MS : WORD_STAGGER_MS;\n return groups > 1 ? Math.min(step, STAGGER_BUDGET_MS / (groups - 1)) : 0;\n}\n\n/** Past the mask's negative inset, so nothing shows before a piece's turn. */\nconst PIECE_FRAMES: Keyframe[] = [{ transform: 'translateY(120%)' }, { transform: 'translateY(0)' }];\nconst DEFAULT_PIECE_MS = 700;\n\nconst playing = new WeakMap<HTMLElement, Animation>();\n\n/**\n * Play a text reveal: each piece rises out of its mask, line by line or word by word. Returns ONE animation for the\n * whole, so a runtime treats it as any other: it finishes when the last piece lands, and on finish or cancel the text\n * is put back whole, which leaves nothing for a screen reader to stumble on and nothing to re-split on a resize. Null\n * when there is nothing to split or it is being edited: the caller plays its plain fade.\n */\nexport function playTextReveal(el: HTMLElement, by: TextRevealBy, timing: KeyframeAnimationOptions): Animation | null {\n playing.get(el)?.cancel();\n if (el.isContentEditable) return null;\n const rtl = el.ownerDocument.defaultView?.getComputedStyle(el).direction === 'rtl';\n const split = splitText(el, { cap: REVEAL_PIECE_CAP, mask: true, rtl });\n if (!split) return null;\n\n const boxes = by === TextRevealBy.Line ? split.pieces.map(piece => (piece.parentElement as HTMLElement).getBoundingClientRect()) : [];\n const order = by === TextRevealBy.Line ? lineIndexes(boxes.map(box => box.top), boxes.map(box => box.height)) : split.pieces.map((_, i) => i);\n const groups = Math.max(...order) + 1;\n const step = revealStagger(groups, by);\n const duration = Number(timing.duration) || DEFAULT_PIECE_MS;\n const delay = timing.delay ?? 0;\n const pieces = split.pieces.map((piece, i) => piece.animate(PIECE_FRAMES, { duration, delay: delay + order[i] * step, easing: timing.easing, fill: 'both' }));\n // The element itself just stands visible: its entrance's first frame had hidden it whole.\n const whole = el.animate([{ opacity: 1 }, { opacity: 1 }], { duration: delay + duration + step * (groups - 1), fill: timing.fill ?? 'both' });\n playing.set(el, whole);\n const finished = (): void => {\n if (playing.get(el) === whole) playing.delete(el);\n for (const piece of pieces) piece.cancel();\n split.restore();\n };\n whole.addEventListener('finish', finished, { once: true });\n whole.addEventListener('cancel', finished, { once: true });\n return whole;\n}\n","import { SceneRole } from '@vectoriox/iox-ui/composite-core';\nimport { FramePlayer, normalizeFrameSequence, VideoAttribute } from '@vectoriox/iox-ui/media-core';\n\nimport { normalizeTracks, SCENE_PHONE_MAX_WIDTH, SceneAttribute, sceneFrame, SceneFrame, scenePlayed, sceneWordOpacity, sceneWordsLit, SceneTrack } from './scene';\nimport { LIGHT_UP_PIECE_CAP, SplitText, splitText } from './split-text';\n\n/**\n * The ONE scroll loop (premium-sites plan §5b, SC0). Every Scene on a page reads one progress value from it, on the\n * canvas and on the live site alike. It reads where the root is and nothing else, so it has one code path: under the\n * canvas's zoom the same rectangle divides by the same zoom, and the answer is the same at any scale.\n *\n * - The value is DAMPED: the scroll stops and the page settles a moment later. This is much of the prototype's weight,\n * and why this is not a CSS scroll timeline, which cannot do it.\n * - The live site pins with `position: sticky`, on the compositor. The canvas cannot (its page never scrolls itself,\n * its Lenis scrolls a wrapper around a zoomed frame), so `pin` holds the stage there with `translate` instead.\n * `translate`, not `transform`: a Stage may carry tracks of its own.\n * - It sleeps. No frame is asked for unless something moved, so a page holding a settled Scene costs nothing.\n * - Reads come first in a frame and writes after, and a write only ever touches compositor properties.\n */\n\nexport const SCENE_DAMPING = 9;\n/** Page px from the scroll at which the damping stops and stands exactly on it: a step this small never shows. */\nconst SETTLED_PX = 0.25;\nconst MAX_FRAME_SECONDS = 0.1;\n/** The first frame after a sleep has no previous one to measure from: it counts as one frame, or a scroll would lose it. */\nconst WAKING_FRAME_SECONDS = 1 / 60;\nconst STAGE_SELECTOR = `.iox-role-${SceneRole.Stage.replace(/\\./g, '-')}`;\nconst TRANSFORM_WILL_CHANGE = 'transform, opacity';\n\n/** One frame of the damping: frame-rate independent, so 60 Hz and 120 Hz settle in the same time. */\nexport function dampToward(current: number, target: number, seconds: number, rate: number = SCENE_DAMPING): number {\n return current + (target - current) * (1 - Math.exp(-seconds * rate));\n}\n\n/** Where a root stands: scrolled `local` page px into its `travel`. `zoom` undoes the canvas's scale. */\nexport function sceneScrollState(rootTop: number, originTop: number, zoom: number, travel: number): { local: number; progress: number } {\n if (travel <= 0) return { local: 0, progress: 0 };\n const local = Math.min(travel, Math.max(0, -(rootTop - originTop) / (zoom || 1)));\n return { local, progress: local / travel };\n}\n\nexport interface ScrollDriverOptions {\n /** Hold the stage with `translate` (the canvas). The live site's stage is sticky and needs nothing. */\n pin?: boolean;\n /** The element a root scrolls under, when that is not the window (the canvas's frame, Preview's page). */\n originOf?: (root: HTMLElement) => HTMLElement | null;\n /** Follow what changes inside a root: tracks edited, layers added (the canvas). */\n observe?: boolean;\n damping?: number;\n /** Called after every frame it writes, outside any framework's zone (the canvas's selection box follows on it). */\n onFrame?: (root: HTMLElement, state: SceneFrameState) => void;\n /** The window, for a test. */\n host?: Window;\n}\n\nexport interface SceneFrameState {\n /** Where the scroll stands, undamped: what a scrubber shows. */\n target: number;\n /** Where the layers stand, damped: what is on screen. */\n progress: number;\n}\n\ninterface Layer {\n el: HTMLElement;\n tracks: SceneTrack[];\n phoneTracks: SceneTrack[];\n /** What this driver last wrote on the element, so a property whose track went can be cleared. */\n last: SceneFrame;\n /** Write every property on the next frame, changed or not: a measure may have moved what a frame resolves to. */\n stale: boolean;\n /** Its words, split while a Words track plays them. Null until the first frame that needs them. */\n words: SplitText | null;\n /** Too many words to split: it holds as it is, and is not counted again on every frame. */\n wordsRefused: boolean;\n /** Its pictures, while a Play track plays them, and what they were built from: a change starts a new player. */\n player: FramePlayer | null;\n playerKey: string;\n}\n\ninterface Scene {\n root: HTMLElement;\n stage: HTMLElement | null;\n layers: Layer[];\n progress: number;\n target: number;\n /** Page px and the stage's own width, measured when something resizes and never per frame. */\n height: number;\n travel: number;\n phone: boolean;\n inlineSign: 1 | -1;\n /** No frame written yet: the first one lands exactly where the scroll is, with no glide. */\n fresh: boolean;\n mutations: MutationObserver | null;\n}\n\nfunction parseTracks(raw: string | null): SceneTrack[] {\n if (!raw) return [];\n try { return normalizeTracks(JSON.parse(raw)); } catch { return []; }\n}\n\nexport class ScrollDriver {\n private readonly scenes = new Map<HTMLElement, Scene>();\n private readonly host: Window;\n private readonly resize: ResizeObserver | null;\n private frame = 0;\n private lastTime = 0;\n private readonly wakeUp = (): void => this.wake();\n\n constructor(private readonly options: ScrollDriverOptions = {}) {\n this.host = options.host ?? window;\n // In capture: a scroll does not bubble, and the canvas's Lenis scrolls an element, not the window.\n this.host.addEventListener('scroll', this.wakeUp, { capture: true, passive: true });\n this.host.addEventListener('resize', this.wakeUp, { passive: true });\n const Observer = (this.host as Window & { ResizeObserver?: typeof ResizeObserver }).ResizeObserver;\n this.resize = Observer ? new Observer(() => this.remeasureAll()) : null;\n }\n\n /** Drive a Scene's root. Idempotent: adding a root again re-reads it. */\n add(root: HTMLElement): void {\n this.remove(root);\n const scene: Scene = { root, stage: null, layers: [], progress: 0, target: 0, height: 0, travel: 0, phone: false, inlineSign: 1, fresh: true, mutations: null };\n this.scenes.set(root, scene);\n this.resize?.observe(root);\n if (this.options.observe) {\n const Observer = (this.host as Window & { MutationObserver?: typeof MutationObserver }).MutationObserver;\n if (Observer) {\n scene.mutations = new Observer(() => this.readScene(scene));\n scene.mutations.observe(root, { childList: true, subtree: true, attributes: true, attributeFilter: [SceneAttribute.Tracks, SceneAttribute.PhoneTracks, VideoAttribute.Frames] });\n }\n }\n this.readScene(scene);\n }\n\n remove(root: HTMLElement): void {\n const scene = this.scenes.get(root);\n if (!scene) return;\n scene.mutations?.disconnect();\n this.resize?.unobserve(root);\n if (scene.stage) scene.stage.style.removeProperty('translate');\n for (const layer of scene.layers) {\n layer.el.style.removeProperty('will-change');\n this.restoreWords(layer);\n this.stopPlayer(layer);\n }\n this.scenes.delete(root);\n }\n\n /** Read a root's layers again now, keeping where it stands: an editor changed their tracks. */\n reread(root: HTMLElement): void {\n const scene = this.scenes.get(root);\n if (scene) this.readScene(scene);\n }\n\n /** The damped progress a root's layers stand at. */\n progressOf(root: HTMLElement): number | null {\n return this.scenes.get(root)?.progress ?? null;\n }\n\n /** Where the scroll stands in a root's travel, undamped. */\n targetOf(root: HTMLElement): number | null {\n return this.scenes.get(root)?.target ?? null;\n }\n\n /** Page px from the root's top to the scroll position that stands it at `p`. */\n offsetFor(root: HTMLElement, p: number): number | null {\n const scene = this.scenes.get(root);\n return scene ? scene.travel * Math.min(1, Math.max(0, p)) : null;\n }\n\n /** Land on the next frame with no glide: a scrubber sets a position, and the author is waiting to see that moment. */\n settle(root: HTMLElement): void {\n const scene = this.scenes.get(root);\n if (!scene) return;\n scene.fresh = true;\n this.wake();\n }\n\n /**\n * Hold every stage against the scroll, now. For a host that moves the scroll itself inside a frame (the canvas's\n * Lenis): waiting for the scroll event paints that frame with the stage carried off its pin, up to a whole frame's\n * scroll, which reads as a shake. Damping is untouched: only the pin has to be exact.\n */\n pinNow(): void {\n if (!this.options.pin) return;\n for (const scene of this.scenes.values()) {\n if (scene.stage) scene.stage.style.setProperty('translate', `0 ${this.read(scene).local}px`);\n }\n }\n\n /** Something moved that no scroll or resize announces (the canvas's zoom). */\n wake(): void {\n if (this.frame) return;\n this.frame = this.host.requestAnimationFrame(this.tick);\n }\n\n destroy(): void {\n if (this.frame) this.host.cancelAnimationFrame(this.frame);\n this.frame = 0;\n this.host.removeEventListener('scroll', this.wakeUp, { capture: true });\n this.host.removeEventListener('resize', this.wakeUp);\n for (const root of [...this.scenes.keys()]) this.remove(root);\n this.resize?.disconnect();\n }\n\n /** Read a root's stage and layers from its DOM: its own Scene's only, never a nested one's. */\n private readScene(scene: Scene): void {\n scene.stage = scene.root.querySelector<HTMLElement>(STAGE_SELECTOR);\n const previous = scene.layers;\n scene.layers = Array.from(scene.root.querySelectorAll<HTMLElement>(`[${SceneAttribute.Tracks}], [${SceneAttribute.PhoneTracks}]`))\n .filter(el => el === scene.root || el.parentElement?.closest(`[${SceneAttribute.Root}]`) === scene.root)\n .map(el => this.readLayer(el, scene));\n // A layer that lost its last track stands as its own styles say again, not at the frame it last held.\n for (const layer of previous) {\n if (!scene.layers.some(current => current.el === layer.el)) this.letGo(layer);\n }\n this.measure(scene);\n scene.fresh = true;\n this.wake();\n }\n\n private letGo(layer: Layer): void {\n layer.el.style.removeProperty('will-change');\n for (const key of Object.keys(layer.last) as (keyof SceneFrame)[]) layer.el.style[key] = '';\n this.restoreWords(layer);\n this.stopPlayer(layer);\n }\n\n private stopPlayer(layer: Layer): void {\n layer.player?.destroy();\n layer.player = null;\n layer.playerKey = '';\n }\n\n private restoreWords(layer: Layer): void {\n layer.words?.restore();\n layer.words = null;\n }\n\n private readLayer(el: HTMLElement, scene: Scene): Layer {\n const previous = scene.layers.find(layer => layer.el === el);\n el.style.setProperty('will-change', TRANSFORM_WILL_CHANGE);\n return { el, tracks: parseTracks(el.getAttribute(SceneAttribute.Tracks)), phoneTracks: parseTracks(el.getAttribute(SceneAttribute.PhoneTracks)), last: previous?.last ?? {}, stale: true, words: previous?.words ?? null, wordsRefused: false, player: previous?.player ?? null, playerKey: previous?.playerKey ?? '' };\n }\n\n private remeasureAll(): void {\n for (const scene of this.scenes.values()) this.measure(scene);\n this.wake();\n }\n\n private measure(scene: Scene): void {\n scene.height = scene.root.offsetHeight;\n scene.travel = Math.max(0, scene.height - (scene.stage?.offsetHeight ?? scene.height));\n scene.phone = (scene.stage?.offsetWidth ?? Infinity) <= SCENE_PHONE_MAX_WIDTH;\n scene.inlineSign = scene.stage && this.host.getComputedStyle(scene.stage).direction === 'rtl' ? -1 : 1;\n for (const layer of scene.layers) layer.stale = true;\n }\n\n private readonly tick = (now: number): void => {\n this.frame = 0;\n const seconds = this.lastTime ? Math.min(MAX_FRAME_SECONDS, (now - this.lastTime) / 1000) : WAKING_FRAME_SECONDS;\n this.lastTime = now;\n const reads = [...this.scenes.values()].map(scene => this.read(scene));\n let moving = false;\n for (const { scene, local, target } of reads) {\n if (this.options.pin && scene.stage) scene.stage.style.setProperty('translate', `0 ${local}px`);\n const next = scene.fresh ? target : dampToward(scene.progress, target, seconds, this.options.damping);\n // The step onto the scroll is what is left: taken once it is under SETTLED_PX, so it never shows.\n const settled = scene.fresh || Math.abs(target - scene.progress) * Math.max(1, scene.travel) < SETTLED_PX;\n scene.progress = settled ? target : next;\n scene.target = target;\n scene.fresh = false;\n this.write(scene);\n this.options.onFrame?.(scene.root, { target, progress: scene.progress });\n moving = moving || !settled;\n }\n if (moving) this.wake();\n else this.lastTime = 0;\n };\n\n private read(scene: Scene): { scene: Scene; local: number; target: number } {\n const rect = scene.root.getBoundingClientRect();\n const origin = this.options.originOf?.(scene.root)?.getBoundingClientRect().top ?? 0;\n const zoom = scene.height ? rect.height / scene.height : 1;\n const { local, progress } = sceneScrollState(rect.top, origin, zoom, scene.travel);\n return { scene, local, target: progress };\n }\n\n private write(scene: Scene): void {\n for (const layer of scene.layers) {\n const tracks = scene.phone && layer.phoneTracks.length ? layer.phoneTracks : layer.tracks;\n this.writeWords(layer, sceneWordsLit(tracks, scene.progress));\n this.writePlayed(layer, scene, scenePlayed(tracks, scene.progress));\n const frame = sceneFrame(tracks, scene.progress, { inlineSign: scene.inlineSign });\n for (const key of Object.keys(frame) as (keyof SceneFrame)[]) {\n if (layer.stale || frame[key] !== layer.last[key]) layer.el.style[key] = frame[key] ?? '';\n }\n // A property whose track was deleted is no longer in the frame: it goes, or the layer holds it forever.\n for (const key of Object.keys(layer.last) as (keyof SceneFrame)[]) {\n if (!(key in frame)) layer.el.style[key] = '';\n }\n layer.last = frame;\n layer.stale = false;\n }\n }\n\n /**\n * The picture this moment asks for. The attribute sits on the Video's own root, which is the layer on the string path\n * and inside it on the component path. A layer with no pictures, or no Play track, holds its poster.\n */\n private writePlayed(layer: Layer, scene: Scene, played: number | null): void {\n const target = played === null ? null : (layer.el.hasAttribute(VideoAttribute.Frames) ? layer.el : layer.el.querySelector<HTMLElement>(`[${VideoAttribute.Frames}]`));\n const raw = target?.getAttribute(VideoAttribute.Frames) ?? '';\n const sequence = raw ? normalizeFrameSequence(raw) : null;\n if (!target || !sequence) {\n if (layer.player) this.stopPlayer(layer);\n return;\n }\n const key = `${scene.phone}|${raw}`;\n if (layer.player && (layer.playerKey !== key || layer.player.detached)) this.stopPlayer(layer);\n if (!layer.player) {\n layer.player = new FramePlayer(target, sequence, { phone: scene.phone, near: scene.root, host: this.host });\n layer.playerKey = key;\n }\n // The damped moment, like every other layer: the film slows with the page and stops when it stops.\n layer.player.seek(played!);\n }\n\n /** One opacity per word, and a write only for the few the scroll actually changed. */\n private writeWords(layer: Layer, lit: number | null): void {\n if (lit === null) {\n this.restoreWords(layer);\n return;\n }\n // Gone from the page: the text was replaced under it (an edit on the canvas), so its words are new.\n if (layer.words && !layer.words.pieces[0]?.isConnected) layer.words = null;\n if (!layer.words && !layer.wordsRefused) {\n layer.words = splitText(layer.el, { cap: LIGHT_UP_PIECE_CAP });\n layer.wordsRefused = !layer.words;\n // The whole layer stood for its words until now (`sceneFirstFrame`); an Opacity track's frame writes after this.\n layer.el.style.removeProperty('opacity');\n layer.stale = true;\n }\n const pieces = layer.words?.pieces ?? [];\n pieces.forEach((piece, i) => {\n const opacity = String(sceneWordOpacity(i, pieces.length, lit));\n if (piece.style.opacity !== opacity) piece.style.opacity = opacity;\n });\n }\n}\n\n/** A page's Scenes, driven by one driver; null when it holds none, or when the visitor asked for less motion (the\n * page's own CSS then lets each Scene flow). The live site's door. */\nexport function attachScenes(container: HTMLElement, options: ScrollDriverOptions = {}): ScrollDriver | null {\n const roots = container.querySelectorAll<HTMLElement>(`[${SceneAttribute.Root}]`);\n if (!roots.length) return null;\n const host = options.host ?? window;\n if (host.matchMedia?.('(prefers-reduced-motion: reduce)').matches) return null;\n const driver = new ScrollDriver(options);\n roots.forEach(root => driver.add(root));\n return driver;\n}\n","/**\n * @vectoriox/iox-ui/scene-core — a Scene: a stage that holds still while the page scrolls past it, its layers moving on\n * ONE progress value (premium-sites plan §5b). FRAMEWORK-FREE: the builder canvas, both engine paths and (from SC6) the\n * composer read the same tracks, frames and recipe; the driver is DOM-only and is the ONE scroll loop.\n * ⚠️ Consumers wire the usual trio — ng-package raw-ts assets, jest moduleNameMapper, tsconfig paths.\n */\nexport * from './scene';\nexport * from './scene-edit';\nexport * from './scene-recipe';\nexport * from './scroll-driver';\nexport * from './split-text';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["PERCENT"],"mappings":";;;AAGA;;;;;;;;AAQG;IAES;AAAZ,CAAA,UAAY,SAAS,EAAA;;AAEjB,IAAA,SAAA,CAAA,GAAA,CAAA,GAAA,GAAO;;AAEP,IAAA,SAAA,CAAA,GAAA,CAAA,GAAA,GAAO;AACP,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,OAAe;;AAEf,IAAA,SAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;;AAEjB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;;AAEnB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;;AAEb,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,OAAe;;AAEf,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;;AAEb,IAAA,SAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;;AAEjB,IAAA,SAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACf,CAAC,EApBW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;AAsBrB;IACY;AAAZ,CAAA,UAAY,eAAe,EAAA;AACvB,IAAA,eAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,eAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,eAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,eAAA,CAAA,KAAA,CAAA,GA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