@vectoriox/iox-ui 5.70.1 → 5.70.2

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.
@@ -123,8 +123,11 @@ function sceneFrame(tracks, p, options = {}) {
123
123
  for (const { prop, keys } of tracks) {
124
124
  if (prop in TRANSFORM_REST)
125
125
  moves[prop] = valueAt(keys, p);
126
- else if (prop === SceneProp.Opacity)
127
- frame.opacity = String(clamp01(valueAt(keys, p)));
126
+ else if (prop === SceneProp.Opacity) {
127
+ const opacity = clamp01(valueAt(keys, p));
128
+ frame.opacity = String(opacity);
129
+ frame.pointerEvents = opacity > 0 ? '' : 'none';
130
+ }
128
131
  else if (prop === SceneProp.Clip)
129
132
  frame.clipPath = `inset(${Math.min(50, Math.max(0, valueAt(keys, p)))}%)`;
130
133
  else if (prop === SceneProp.Ground)
@@ -145,6 +148,7 @@ const CSS_NAME = {
145
148
  clipPath: 'clip-path',
146
149
  backgroundColor: 'background-color',
147
150
  color: 'color',
151
+ pointerEvents: 'pointer-events',
148
152
  };
149
153
  /** A frame as kebab-case style declarations, for a string renderer. */
150
154
  function sceneFrameDeclarations(frame) {
@@ -202,7 +206,7 @@ function applySceneFirstFrame(el, node) {
202
206
  */
203
207
  const SCENE_FLOW_RULES = `.iox-role-scene{height:auto!important}`
204
208
  + `.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important}`
205
- + `[${SceneAttribute.Tracks}]{transform:none!important;opacity:1!important;clip-path:none!important}`;
209
+ + `[${SceneAttribute.Tracks}]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}`;
206
210
  /** Under reduced motion the driver never starts, so the same rules hold for the whole visit. */
207
211
  const SCENE_REDUCED_MOTION_CSS = `@media (prefers-reduced-motion: reduce){${SCENE_FLOW_RULES}}`;
208
212
 
@@ -437,7 +441,7 @@ class ScrollDriver {
437
441
  const frame = sceneFrame(tracks, scene.progress, { inlineSign: scene.inlineSign });
438
442
  for (const key of Object.keys(frame)) {
439
443
  if (frame[key] !== layer.last[key])
440
- layer.el.style[key] = frame[key];
444
+ layer.el.style[key] = frame[key] ?? '';
441
445
  }
442
446
  layer.last = frame;
443
447
  }
@@ -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-recipe.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';\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 /** Inset from every side, in % of the layer (0 = whole, 50 = gone). */\n Clip = 'clip',\n /** The layer's background colour. */\n Ground = 'ground',\n /** The layer's text colour. */\n Ink = 'ink',\n}\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}\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}\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 = 767;\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));\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) out.push({ prop, keys });\n }\n return out;\n}\n\n/** The two keys around `p` and how far between them it eases. */\nfunction span(keys: ReadonlyArray<SceneKey>, p: number): { 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 ? smoothstep((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): number {\n if (!keys.length) return 0;\n const { a, b, f } = span(keys, p);\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 } of tracks) {\n if (prop in TRANSFORM_REST) moves[prop] = valueAt(keys, p);\n else if (prop === SceneProp.Opacity) frame.opacity = String(clamp01(valueAt(keys, p)));\n else if (prop === SceneProp.Clip) frame.clipPath = `inset(${Math.min(50, Math.max(0, valueAt(keys, p)))}%)`;\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\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};\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 return sceneFrame(normalizeTracks(node?.sceneTracks), 0);\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 + `.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important}`\n + `[${SceneAttribute.Tracks}]{transform:none!important;opacity:1!important;clip-path:none!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 { 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","import { SceneRole } from '@vectoriox/iox-ui/composite-core';\n\nimport { normalizeTracks, SCENE_PHONE_MAX_WIDTH, SceneAttribute, sceneFrame, SceneFrame, SceneTrack } from './scene';\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;\nconst SETTLED = 0.0005;\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 /** The window, for a test. */\n host?: Window;\n}\n\ninterface Layer {\n el: HTMLElement;\n tracks: SceneTrack[];\n phoneTracks: SceneTrack[];\n last: SceneFrame;\n}\n\ninterface Scene {\n root: HTMLElement;\n stage: HTMLElement | null;\n layers: Layer[];\n progress: 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, 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.reread(scene));\n scene.mutations.observe(root, { childList: true, subtree: true, attributes: true, attributeFilter: [SceneAttribute.Tracks, SceneAttribute.PhoneTracks] });\n }\n }\n this.reread(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) layer.el.style.removeProperty('will-change');\n this.scenes.delete(root);\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 /** 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 reread(scene: Scene): void {\n scene.stage = scene.root.querySelector<HTMLElement>(STAGE_SELECTOR);\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 this.measure(scene);\n scene.fresh = true;\n this.wake();\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 ?? {} };\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.last = {};\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 const settled = Math.abs(next - target) < SETTLED;\n scene.progress = settled ? target : next;\n scene.fresh = false;\n this.write(scene);\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 const frame = sceneFrame(tracks, scene.progress, { inlineSign: scene.inlineSign });\n for (const key of Object.keys(frame) as (keyof SceneFrame)[]) {\n if (frame[key] !== layer.last[key]) layer.el.style[key] = frame[key]!;\n }\n layer.last = frame;\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-recipe';\nexport * from './scroll-driver';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAEA;;;;;;;;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,QAAA,CAAA,GAAA,QAAiB;;AAEjB,IAAA,SAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACf,CAAC,EAhBW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;IA6CT;AAAZ,CAAA,UAAY,cAA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F,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAyB,EAAE;gBAC1D,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;AAAE,oBAAA,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAE;YACzE;AACA,YAAA,KAAK,CAAC,IAAI,GAAG,KAAK;QACtB;IACJ;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;;AC3NA;;;;;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-recipe.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';\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 /** Inset from every side, in % of the layer (0 = whole, 50 = gone). */\n Clip = 'clip',\n /** The layer's background colour. */\n Ground = 'ground',\n /** The layer's text colour. */\n Ink = 'ink',\n}\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}\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 = 767;\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));\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) out.push({ prop, keys });\n }\n return out;\n}\n\n/** The two keys around `p` and how far between them it eases. */\nfunction span(keys: ReadonlyArray<SceneKey>, p: number): { 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 ? smoothstep((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): number {\n if (!keys.length) return 0;\n const { a, b, f } = span(keys, p);\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 } 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 = `inset(${Math.min(50, Math.max(0, valueAt(keys, p)))}%)`;\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\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 return sceneFrame(normalizeTracks(node?.sceneTracks), 0);\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 + `.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important}`\n + `[${SceneAttribute.Tracks}]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events: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 { 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","import { SceneRole } from '@vectoriox/iox-ui/composite-core';\n\nimport { normalizeTracks, SCENE_PHONE_MAX_WIDTH, SceneAttribute, sceneFrame, SceneFrame, SceneTrack } from './scene';\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;\nconst SETTLED = 0.0005;\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 /** The window, for a test. */\n host?: Window;\n}\n\ninterface Layer {\n el: HTMLElement;\n tracks: SceneTrack[];\n phoneTracks: SceneTrack[];\n last: SceneFrame;\n}\n\ninterface Scene {\n root: HTMLElement;\n stage: HTMLElement | null;\n layers: Layer[];\n progress: 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, 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.reread(scene));\n scene.mutations.observe(root, { childList: true, subtree: true, attributes: true, attributeFilter: [SceneAttribute.Tracks, SceneAttribute.PhoneTracks] });\n }\n }\n this.reread(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) layer.el.style.removeProperty('will-change');\n this.scenes.delete(root);\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 /** 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 reread(scene: Scene): void {\n scene.stage = scene.root.querySelector<HTMLElement>(STAGE_SELECTOR);\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 this.measure(scene);\n scene.fresh = true;\n this.wake();\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 ?? {} };\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.last = {};\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 const settled = Math.abs(next - target) < SETTLED;\n scene.progress = settled ? target : next;\n scene.fresh = false;\n this.write(scene);\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 const frame = sceneFrame(tracks, scene.progress, { inlineSign: scene.inlineSign });\n for (const key of Object.keys(frame) as (keyof SceneFrame)[]) {\n if (frame[key] !== layer.last[key]) layer.el.style[key] = frame[key] ?? '';\n }\n layer.last = frame;\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-recipe';\nexport * from './scroll-driver';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAEA;;;;;;;;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,QAAA,CAAA,GAAA,QAAiB;;AAEjB,IAAA,SAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACf,CAAC,EAhBW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;IA+CT;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,gBAAuB;AACvB,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,iBAA0B;AAC1B,IAAA,cAAA,CAAA,aAAA,CAAA,GAAA,uBAAqC;AACzC,CAAC,EAJW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;AAM1B;AACO,MAAM,qBAAqB,GAAG;AAErC,MAAM,QAAQ,GAAG,KAAK;AACtB,MAAM,KAAK,GAAG,CAAC,CAAS,K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CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE;YAC9E;AACA,YAAA,KAAK,CAAC,IAAI,GAAG,KAAK;QACtB;IACJ;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;;AC3NA;;;;;AAKG;;ACLH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.70.1",
3
+ "version": "5.70.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -48,6 +48,8 @@ interface SceneFrame {
48
48
  clipPath?: string;
49
49
  backgroundColor?: string;
50
50
  color?: string;
51
+ /** A layer faded right out takes no clicks: it would sit invisibly over what is under it. `''` clears it. */
52
+ pointerEvents?: string;
51
53
  }
52
54
  declare enum SceneAttribute {
53
55
  Root = "data-iox-scene",
@@ -99,7 +101,7 @@ declare function applySceneFirstFrame(el: HTMLElement | null | undefined, node:
99
101
  */
100
102
  declare const SCENE_FLOW_RULES: string;
101
103
  /** Under reduced motion the driver never starts, so the same rules hold for the whole visit. */
102
- declare const SCENE_REDUCED_MOTION_CSS = "@media (prefers-reduced-motion: reduce){.iox-role-scene{height:auto!important}.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important}[data-iox-tracks]{transform:none!important;opacity:1!important;clip-path:none!important}}";
104
+ declare const SCENE_REDUCED_MOTION_CSS = "@media (prefers-reduced-motion: reduce){.iox-role-scene{height:auto!important}.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important}[data-iox-tracks]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}}";
103
105
 
104
106
  /**
105
107
  * The SCENE recipe: ordinary nodes, no new type, so all three render paths and every panel already know it.
@@ -53,6 +53,8 @@ export interface SceneFrame {
53
53
  clipPath?: string;
54
54
  backgroundColor?: string;
55
55
  color?: string;
56
+ /** A layer faded right out takes no clicks: it would sit invisibly over what is under it. `''` clears it. */
57
+ pointerEvents?: string;
56
58
  }
57
59
 
58
60
  export enum SceneAttribute {
@@ -154,7 +156,11 @@ export function sceneFrame(tracks: ReadonlyArray<SceneTrack>, p: number, options
154
156
  const moves: Partial<Record<SceneProp, number>> = {};
155
157
  for (const { prop, keys } of tracks) {
156
158
  if (prop in TRANSFORM_REST) moves[prop] = valueAt(keys, p);
157
- else if (prop === SceneProp.Opacity) frame.opacity = String(clamp01(valueAt(keys, p)));
159
+ else if (prop === SceneProp.Opacity) {
160
+ const opacity = clamp01(valueAt(keys, p));
161
+ frame.opacity = String(opacity);
162
+ frame.pointerEvents = opacity > 0 ? '' : 'none';
163
+ }
158
164
  else if (prop === SceneProp.Clip) frame.clipPath = `inset(${Math.min(50, Math.max(0, valueAt(keys, p)))}%)`;
159
165
  else if (prop === SceneProp.Ground) frame.backgroundColor = colourAt(keys, p);
160
166
  else if (prop === SceneProp.Ink) frame.color = colourAt(keys, p);
@@ -173,6 +179,7 @@ const CSS_NAME: Readonly<Record<keyof SceneFrame, string>> = {
173
179
  clipPath: 'clip-path',
174
180
  backgroundColor: 'background-color',
175
181
  color: 'color',
182
+ pointerEvents: 'pointer-events',
176
183
  };
177
184
 
178
185
  /** A frame as kebab-case style declarations, for a string renderer. */
@@ -226,7 +233,7 @@ export function applySceneFirstFrame(el: HTMLElement | null | undefined, node: S
226
233
  */
227
234
  export const SCENE_FLOW_RULES = `.iox-role-scene{height:auto!important}`
228
235
  + `.iox-role-scene-stage{position:relative!important;top:auto!important;height:auto!important;overflow:visible!important;container-type:normal!important}`
229
- + `[${SceneAttribute.Tracks}]{transform:none!important;opacity:1!important;clip-path:none!important}`;
236
+ + `[${SceneAttribute.Tracks}]{transform:none!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important}`;
230
237
 
231
238
  /** Under reduced motion the driver never starts, so the same rules hold for the whole visit. */
232
239
  export const SCENE_REDUCED_MOTION_CSS = `@media (prefers-reduced-motion: reduce){${SCENE_FLOW_RULES}}`;
@@ -200,7 +200,7 @@ export class ScrollDriver {
200
200
  const tracks = scene.phone && layer.phoneTracks.length ? layer.phoneTracks : layer.tracks;
201
201
  const frame = sceneFrame(tracks, scene.progress, { inlineSign: scene.inlineSign });
202
202
  for (const key of Object.keys(frame) as (keyof SceneFrame)[]) {
203
- if (frame[key] !== layer.last[key]) layer.el.style[key] = frame[key]!;
203
+ if (frame[key] !== layer.last[key]) layer.el.style[key] = frame[key] ?? '';
204
204
  }
205
205
  layer.last = frame;
206
206
  }