@wildo-ai/presets-components-3d 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/focal-plane/focal-plane-settings.d.ts +35 -0
- package/dist/esm/focal-plane/focal-plane-settings.d.ts.map +1 -0
- package/dist/esm/focal-plane/focal-plane-settings.js +68 -0
- package/dist/esm/focal-plane/focal-plane-settings.js.map +1 -0
- package/dist/esm/focal-plane/focal-plane-shell-container.d.ts +13 -0
- package/dist/esm/focal-plane/focal-plane-shell-container.d.ts.map +1 -0
- package/dist/esm/focal-plane/focal-plane-shell-container.js +147 -0
- package/dist/esm/focal-plane/focal-plane-shell-container.js.map +1 -0
- package/dist/esm/focal-plane/focal-plane-stylesheet.d.ts +14 -0
- package/dist/esm/focal-plane/focal-plane-stylesheet.d.ts.map +1 -0
- package/dist/esm/focal-plane/focal-plane-stylesheet.js +236 -0
- package/dist/esm/focal-plane/focal-plane-stylesheet.js.map +1 -0
- package/dist/esm/focal-plane/use-pane-depth.d.ts +20 -0
- package/dist/esm/focal-plane/use-pane-depth.d.ts.map +1 -0
- package/dist/esm/focal-plane/use-pane-depth.js +162 -0
- package/dist/esm/focal-plane/use-pane-depth.js.map +1 -0
- package/dist/esm/focal-plane/use-shared-vanishing-point.d.ts +35 -0
- package/dist/esm/focal-plane/use-shared-vanishing-point.d.ts.map +1 -0
- package/dist/esm/focal-plane/use-shared-vanishing-point.js +86 -0
- package/dist/esm/focal-plane/use-shared-vanishing-point.js.map +1 -0
- package/dist/esm/frame/frame-3d-style.d.ts.map +1 -1
- package/dist/esm/frame/frame-3d-style.js.map +1 -1
- package/dist/esm/frame/frame-appearance.d.ts.map +1 -1
- package/dist/esm/frame/frame-appearance.js.map +1 -1
- package/dist/esm/frame/frame-canvas.d.ts.map +1 -1
- package/dist/esm/frame/frame-canvas.js +3 -3
- package/dist/esm/frame/frame-canvas.js.map +1 -1
- package/dist/esm/frame/frame-canvas.lazy.d.ts.map +1 -1
- package/dist/esm/frame/frame-canvas.lazy.js.map +1 -1
- package/dist/esm/frame/frame-color.d.ts.map +1 -1
- package/dist/esm/frame/frame-color.js.map +1 -1
- package/dist/esm/frame/frame-driver.d.ts.map +1 -1
- package/dist/esm/frame/frame-driver.js.map +1 -1
- package/dist/esm/frame/frame-renderer.d.ts.map +1 -1
- package/dist/esm/frame/frame-renderer.js.map +1 -1
- package/dist/esm/frame/frame-shaders.d.ts.map +1 -1
- package/dist/esm/frame/frame-shaders.js.map +1 -1
- package/dist/esm/frame/use-frame-appearance.d.ts.map +1 -1
- package/dist/esm/frame/use-frame-appearance.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layout/header-first-shell-container.d.ts.map +1 -1
- package/dist/esm/layout/header-first-shell-container.js.map +1 -1
- package/dist/esm/layout/layout-3d-definition.d.ts +5 -6
- package/dist/esm/layout/layout-3d-definition.d.ts.map +1 -1
- package/dist/esm/layout/layout-3d-definition.js +13 -14
- package/dist/esm/layout/layout-3d-definition.js.map +1 -1
- package/dist/esm/layout/layout-3d-transition-choreography.d.ts.map +1 -1
- package/dist/esm/layout/layout-3d-transition-choreography.js.map +1 -1
- package/dist/esm/layout/layout-3d-vocabulary.d.ts +13 -8
- package/dist/esm/layout/layout-3d-vocabulary.d.ts.map +1 -1
- package/dist/esm/layout/layout-3d-vocabulary.js +12 -7
- package/dist/esm/layout/layout-3d-vocabulary.js.map +1 -1
- package/dist/esm/layout/shell-layout-placement.d.ts.map +1 -1
- package/dist/esm/layout/shell-layout-placement.js.map +1 -1
- package/dist/esm/layout-3d-main-container.d.ts +6 -0
- package/dist/esm/layout-3d-main-container.d.ts.map +1 -1
- package/dist/esm/layout-3d-main-container.js +8 -1
- package/dist/esm/layout-3d-main-container.js.map +1 -1
- package/dist/esm/register-3d-layout.d.ts.map +1 -1
- package/dist/esm/register-3d-layout.js.map +1 -1
- package/dist/esm/shell-region-measurement.d.ts.map +1 -1
- package/dist/esm/shell-region-measurement.js.map +1 -1
- package/dist/esm/tokens/design-token-resolution.d.ts.map +1 -1
- package/dist/esm/tokens/design-token-resolution.js.map +1 -1
- package/dist/esm/tokens/use-design-token-resolution.d.ts.map +1 -1
- package/dist/esm/tokens/use-design-token-resolution.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +3 -3
- package/dist/esm/spatial/spatial-camera.d.ts +0 -106
- package/dist/esm/spatial/spatial-camera.d.ts.map +0 -1
- package/dist/esm/spatial/spatial-camera.js +0 -151
- package/dist/esm/spatial/spatial-camera.js.map +0 -1
- package/dist/esm/spatial/spatial-environment.d.ts +0 -6
- package/dist/esm/spatial/spatial-environment.d.ts.map +0 -1
- package/dist/esm/spatial/spatial-environment.js +0 -166
- package/dist/esm/spatial/spatial-environment.js.map +0 -1
- package/dist/esm/spatial/spatial-environment.lazy.d.ts +0 -10
- package/dist/esm/spatial/spatial-environment.lazy.d.ts.map +0 -1
- package/dist/esm/spatial/spatial-environment.lazy.js +0 -13
- package/dist/esm/spatial/spatial-environment.lazy.js.map +0 -1
- package/dist/esm/spatial/spatial-shell-container.d.ts +0 -21
- package/dist/esm/spatial/spatial-shell-container.d.ts.map +0 -1
- package/dist/esm/spatial/spatial-shell-container.js +0 -231
- package/dist/esm/spatial/spatial-shell-container.js.map +0 -1
- package/dist/esm/spatial/spatial-stage-store.d.ts +0 -27
- package/dist/esm/spatial/spatial-stage-store.d.ts.map +0 -1
- package/dist/esm/spatial/spatial-stage-store.js +0 -33
- package/dist/esm/spatial/spatial-stage-store.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-renderer.js","sourceRoot":"","sources":["../../../../src/frame/frame-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAS,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,OAA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AAK,GAAG,MAAM,CAAC,QAAQ,CAAC;IACrC,CAAC,CAAC,SAAU,CAAC,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC;IACpC,CAAC,CAAC,SAAU,CAAC,KAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC,CAAC,SAAU,CAAC,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC;AACvC,CAAC","sourcesContent":["import { CustomBlending, Group, Mesh, MinEquation, PlaneGeometry, ShaderMaterial, Vector2, Vector3 } from 'three';\nimport { ShellRegion } from '@wildo-ai/presets-components-models';\n\nimport { FRAME_BODY_FRAGMENT_SHADER, FRAME_SHADOW_FRAGMENT_SHADER, FRAME_VERTEX_SHADER } from './frame-shaders';\nimport type { FrameAppearance, FrameEasing, FrameSlabAppearance, FrameSpring } from './frame-appearance';\nimport type { FrameColor } from './frame-color';\nimport { regionCentreInFrameUnits } from '../shell-region-measurement';\nimport { frameChoreography, rimsFocusedZone, type FrameChoreography } from '../layout/layout-3d-transition-choreography';\nimport { Layout3DFrameChoreography, Layout3DZoneFocusTransition, type Layout3DTransitions } from '../layout/layout-3d-vocabulary';\n\n/** One region the frame draws under, as measured off the DOM. */\nexport interface FrameRegionBox {\n /** The region's element: the identity a slab (and its hover state) follows across redraws. */\n element: object;\n region: ShellRegion;\n left: number;\n top: number;\n width: number;\n height: number;\n /** The region already renders a glass material (`data-material-kind=\"glass\"`): no slab under it (#1823, no double glass). */\n glass: boolean;\n}\n\n/** One navigation zone inside the content region, as measured off the DOM (#1826). */\nexport interface FrameZoneBox {\n /** The zone container: the identity its rim emphasis follows across redraws. */\n element: object;\n left: number;\n top: number;\n width: number;\n height: number;\n}\n\n/** The canvas' size in CSS pixels, which the orthographic camera is fitted to. */\nexport interface FrameViewport {\n width: number;\n height: number;\n}\n\n/** Draw order: the background, then every shadow, then every body — so no shadow lands on a slab. */\nenum FrameRenderOrder {\n BACKGROUND = 0,\n SHADOW = 1,\n BODY = 2,\n /** The focused zone's rim, over the content slab it sits in. */\n ZONE_RIM = 3,\n}\n\n/**\n * A slab's numbers, flattened so a theme change can interpolate all of them at once:\n * fillFrom(3) fillTo(3) fillAlpha rim(3) rimAlpha rimHoverAlpha rimWidth radius shadowX shadowY shadowBlur\n * shadowAlpha presence.\n */\ntype SlabVector = number[];\n/** The background's numbers: from(3) to(3) presence. */\ntype BackgroundVector = number[];\n\ninterface DisplayedFrame {\n regions: Record<ShellRegion, SlabVector>;\n background: BackgroundVector;\n lightAngleDeg: number;\n}\n\ninterface Tween<T> {\n from: T;\n to: T;\n /** Set on the first tick after the tween is created, so a tween started between frames loses no time. */\n start: number | null;\n seconds: number;\n easing: FrameEasing;\n}\n\n/** A rim's hover emphasis: 0 at rest, 1 fully emphasised. Driven by a spring when the theme declares one. */\ninterface HoverState {\n value: number;\n target: number;\n velocity: number;\n /** The eased path, when there is no spring. */\n tween: Tween<number> | null;\n spring: FrameSpring | null;\n lastTick: number | null;\n}\n\n/**\n * What starts a transition of the frame (#1826). The driver reports each start to its host, which is how a live\n * probe tells that a choreography ran rather than inferring it from draws.\n */\nexport enum FrameTransitionTrigger {\n /** A structural zone's top entry became another place. Plays the layout's `navigation` choreography. */\n NAVIGATION = 'navigation',\n /** The sidebar's width changed while it stayed on screen. Plays the layout's `sidebarResize` choreography. */\n SIDEBAR_RESIZE = 'sidebar-resize',\n /** The focused zone of a split changed, and the layout rims it. */\n ZONE_FOCUS = 'zone-focus',\n}\n\n/** What a {@link FrameRenderer.pulse} call did. */\nexport enum FramePulseOutcome {\n /** Nothing plays: no choreography for the trigger, reduced motion, or no appearance yet. */\n NOT_PLAYED = 'not-played',\n /** A new pulse started (from rest, or a new rise out of a settle): a transition the driver reports. */\n STARTED = 'started',\n /** The trigger's pulse was already rising and keeps rising: nothing new to report. */\n ALREADY_RISING = 'already-rising',\n}\n\n/** The triggers that play a pulse-shaped {@link Layout3DFrameChoreography}. */\nexport type FramePulseTrigger = FrameTransitionTrigger.NAVIGATION | FrameTransitionTrigger.SIDEBAR_RESIZE;\n\n/**\n * One trigger's pulse (#1826): a RISE from wherever it stands to 1, then a SETTLE back to 0, each over half the\n * pulse's duration. The same trigger while it RISES changes nothing; while it SETTLES, it starts a new rise from the\n * CURRENT strength. So a quick run of navigations, or a sidebar whose width changes on every frame of its animation,\n * holds the pulse up without ever making the frame jump.\n */\ninterface FramePulse {\n rising: boolean;\n tween: Tween<number>;\n /** The strength after the last tick: where a restarted rise begins. */\n value: number;\n}\n\ninterface SlabMeshes {\n body: Mesh<PlaneGeometry, ShaderMaterial>;\n shadow: Mesh<PlaneGeometry, ShaderMaterial>;\n}\n\nconst PRESENCE = 18;\nconst SLAB_SIZE = PRESENCE + 1;\n/** A spring is considered at rest once it is this close to its target and this slow. */\nconst SPRING_REST = 1e-3;\n/** Integration step for a spring, in seconds: small enough to stay stable for any stiffness a theme declares. */\nconst SPRING_STEP_SECONDS = 1 / 240;\n\n/**\n * The frame's scene, driven imperatively (#1823).\n *\n * It owns the meshes and their uniforms and nothing else: WHEN to draw is the canvas driver's decision. Every\n * method is a plain state change plus {@link tick}, which applies the state for an instant and says whether\n * anything is still animating — so the whole scene logic runs, and is tested, without a WebGL context.\n *\n * Hover emphasises the RIM only, and its progress is clamped to 0–1 even when a spring overshoots. The frost never\n * changes on hover, so hover cannot take a colour outside the contrast bound the appearance derivation proved.\n */\nexport class FrameRenderer {\n private readonly geometry = new PlaneGeometry(1, 1);\n private readonly backgroundMesh: Mesh<PlaneGeometry, ShaderMaterial>;\n private readonly slabs: SlabMeshes[] = [];\n private boxes: FrameRegionBox[] = [];\n private viewport: FrameViewport = { width: 0, height: 0 };\n private layoutSignature = '';\n /** What is on screen now: the last frame applied, mid-cross-fade included. A new appearance fades FROM this. */\n private shown: DisplayedFrame | null = null;\n private tween: Tween<DisplayedFrame> | null = null;\n private appearance: FrameAppearance | null = null;\n private hovered: object | null = null;\n private readonly hover = new Map<object, HoverState>();\n private readonly choreographies: Record<FramePulseTrigger, FrameChoreography>;\n private readonly rimsFocusedZone: boolean;\n private readonly pulses = new Map<FramePulseTrigger, FramePulse>();\n /** The zone the rim is moving toward, or null. */\n private rimmed: object | null = null;\n private zones: FrameZoneBox[] = [];\n private zoneSignature = '';\n private focusedZone: object | null = null;\n /** Each zone's rim emphasis, 0 to 1, stepped exactly like a hover emphasis. */\n private readonly zoneEmphasis = new Map<object, HoverState>();\n private readonly zoneRims: Mesh<PlaneGeometry, ShaderMaterial>[] = [];\n\n /**\n * @param transitions What the layout plays on a navigation, a sidebar resize and a zone focus. Defaults to nothing:\n * a renderer with no layout behind it (a test, a probe) draws the regions and moves only on appearance and hover.\n */\n constructor(\n private readonly group: Group,\n transitions: Pick<Layout3DTransitions, 'navigation' | 'sidebarResize' | 'zoneFocus'> = {\n navigation: Layout3DFrameChoreography.NONE,\n sidebarResize: Layout3DFrameChoreography.NONE,\n zoneFocus: Layout3DZoneFocusTransition.NONE,\n },\n ) {\n this.choreographies = {\n [FrameTransitionTrigger.NAVIGATION]: frameChoreography(transitions.navigation),\n [FrameTransitionTrigger.SIDEBAR_RESIZE]: frameChoreography(transitions.sidebarResize),\n };\n this.rimsFocusedZone = rimsFocusedZone(transitions.zoneFocus);\n this.backgroundMesh = new Mesh(this.geometry, bodyMaterial());\n this.backgroundMesh.renderOrder = FrameRenderOrder.BACKGROUND;\n this.backgroundMesh.visible = false;\n group.add(this.backgroundMesh);\n }\n\n /**\n * The appearance to draw. With `animate`, the change cross-fades over the appearance's transition time —\n * except when the FOREGROUND changed (a light/dark switch): text switches colour at once, and a backdrop\n * halfway between two modes is bounded against neither foreground, so the frame switches at once too.\n */\n setAppearance(appearance: FrameAppearance | null, options: { animate: boolean }): void {\n const previous = this.appearance;\n const target = displayedOf(appearance, this.shown);\n if (appearance) this.appearance = appearance;\n // Reduced motion turned on mid-hover: the frame is static from now on, so the emphasis goes at once.\n if (appearance && !appearance.hoverResponse) {\n this.hovered = null;\n this.hover.clear();\n this.pulses.clear();\n this.zoneEmphasis.clear();\n }\n // A reduced-motion switch (either way) or a new gesture spring changes what the focused zone's rim should do.\n this.retargetZoneEmphasis();\n const seconds = appearance?.transitionSeconds ?? 0;\n const foregroundChanged = Boolean(previous && appearance && !sameColor(previous.foreground, appearance.foreground));\n if (!options.animate || !this.shown || seconds <= 0 || foregroundChanged) {\n this.shown = target;\n this.tween = null;\n return;\n }\n this.tween = { from: fadeInFrom(this.shown, target), to: target, start: null, seconds, easing: appearance?.transitionEasing ?? [0, 0, 1, 1] };\n }\n\n /** The measured regions. Returns false when nothing moved, so the caller can skip the frame entirely. */\n setLayout(boxes: FrameRegionBox[], viewport: FrameViewport): boolean {\n const signature = `${viewport.width}x${viewport.height}|${boxes.map((b) => `${b.region}:${b.left},${b.top},${b.width},${b.height},${b.glass ? 'g' : ''}`).join(';')}`;\n this.boxes = boxes;\n this.viewport = viewport;\n // A region that left takes its hover state with it (an organization switch remounts regions).\n const present = new Set(boxes.map((box) => box.element));\n for (const key of this.hover.keys()) if (!present.has(key)) this.hover.delete(key);\n if (this.hovered && !present.has(this.hovered)) this.hovered = null;\n if (signature === this.layoutSignature) return false;\n this.layoutSignature = signature;\n return true;\n }\n\n /**\n * The region element under the pointer, or null. Its rim moves toward the hover opacity — unless the\n * appearance says the frame is static (reduced motion). Returns whether anything will change on screen.\n */\n setHovered(element: object | null): boolean {\n const next = this.appearance?.hoverResponse ? element : null;\n if (next === this.hovered) return false;\n for (const [key, target] of [[this.hovered, 0], [next, 1]] as const) {\n if (!key) continue;\n const state = this.hover.get(key) ?? { value: 0, target: 0, velocity: 0, tween: null, spring: null, lastTick: null };\n state.target = target;\n state.spring = this.appearance?.hoverSpring ?? null;\n state.tween = state.spring ? null : { from: state.value, to: target, start: null, seconds: this.appearance?.hoverSeconds ?? 0, easing: this.appearance?.hoverEasing ?? [0, 0, 1, 1] };\n state.lastTick = null;\n this.hover.set(key, state);\n }\n this.hovered = next;\n return true;\n }\n\n /**\n * A shell state changed (#1826): play the layout's choreography for that trigger. Nothing plays when the layout\n * declares none for it, under reduced motion (the frame is static), or when the theme's motion duration is zero.\n * Says whether a pulse STARTED, was already rising, or nothing plays.\n */\n pulse(trigger: FramePulseTrigger): FramePulseOutcome {\n const appearance = this.appearance;\n const choreography = this.choreographies[trigger];\n if (!choreography.plays || !appearance || !appearance.hoverResponse || appearance.transitionSeconds <= 0) return FramePulseOutcome.NOT_PLAYED;\n // Already rising: let it rise. Restarting would re-anchor its clock on every call, and a sidebar calls on every\n // frame of its width animation, so the pulse would never leave where it stood until the sidebar stopped.\n if (this.pulses.get(trigger)?.rising) return FramePulseOutcome.ALREADY_RISING;\n const halfSeconds = (appearance.transitionSeconds * choreography.durationFactor) / 2;\n const from = this.pulses.get(trigger)?.value ?? 0;\n this.pulses.set(trigger, { rising: true, value: from, tween: { from, to: 1, start: null, seconds: halfSeconds, easing: appearance.transitionEasing } });\n return FramePulseOutcome.STARTED;\n }\n\n /** The zone whose rim is shown or moving in, or null: what the driver compares to report a zone-focus transition. */\n rimmedZone(): object | null {\n return this.rimmed;\n }\n\n /**\n * The navigation zones inside the content region, and the focused one (the navigation state's `focusedZone`), or\n * null. When the layout rims the focused zone and two or more zones are side by side, the focused one's rim moves\n * toward full emphasis and every other zone's back to none. Returns whether anything will change on screen.\n */\n setZones(zones: FrameZoneBox[], focused: object | null): boolean {\n const signature = zones.map((zone) => `${zone.left},${zone.top},${zone.width},${zone.height}`).join(';');\n const moved = signature !== this.zoneSignature;\n this.zoneSignature = signature;\n this.zones = zones;\n const present = new Set(zones.map((zone) => zone.element));\n for (const key of this.zoneEmphasis.keys()) if (!present.has(key)) this.zoneEmphasis.delete(key);\n this.focusedZone = focused && present.has(focused) ? focused : null;\n return this.retargetZoneEmphasis() || moved;\n }\n\n /** Whether a cross-fade, a hover or zone emphasis, or a pulse is still moving: the only reasons to draw when no region moved. */\n hasPendingMotion(): boolean {\n if (this.tween || this.pulses.size > 0) return true;\n for (const state of this.hover.values()) if (!hoverSettled(state)) return true;\n for (const state of this.zoneEmphasis.values()) if (!hoverSettled(state)) return true;\n return false;\n }\n\n /** Apply the state for instant `now` (ms). Returns true while a cross-fade or a hover emphasis is still moving. */\n tick(now: number): boolean {\n if (this.tween) {\n const { eased, done } = advance(this.tween, now);\n if (done) {\n this.shown = this.tween.to;\n this.tween = null;\n } else {\n this.shown = interpolateFrame(this.tween.from, this.tween.to, eased);\n }\n }\n for (const [key, state] of this.hover) {\n stepHover(state, now);\n if (hoverSettled(state) && state.target === 0) this.hover.delete(key);\n }\n for (const [key, state] of this.zoneEmphasis) {\n stepHover(state, now);\n if (hoverSettled(state) && state.target === 0) this.zoneEmphasis.delete(key);\n }\n for (const [trigger, pulse] of this.pulses) {\n const { eased, done } = advance(pulse.tween, now);\n const { from, to } = pulse.tween;\n pulse.value = from + (to - from) * eased;\n if (done && pulse.rising) {\n const easing = this.appearance?.transitionEasing ?? [0, 0, 1, 1];\n this.pulses.set(trigger, { rising: false, value: 1, tween: { from: 1, to: 0, start: now, seconds: pulse.tween.seconds, easing } });\n } else if (done) {\n this.pulses.delete(trigger);\n }\n }\n this.apply(this.shown);\n return this.hasPendingMotion();\n }\n\n dispose(): void {\n this.group.remove(this.backgroundMesh);\n this.backgroundMesh.material.dispose();\n for (const slab of this.slabs) {\n this.group.remove(slab.body, slab.shadow);\n slab.body.material.dispose();\n slab.shadow.material.dispose();\n }\n this.slabs.length = 0;\n for (const rim of this.zoneRims) {\n this.group.remove(rim);\n rim.material.dispose();\n }\n this.zoneRims.length = 0;\n this.geometry.dispose();\n }\n\n private apply(frame: DisplayedFrame | null): void {\n const { width, height } = this.viewport;\n // Each pulse's strength, 0 at rest: `sin` shapes the rise-and-settle into one smooth swell. Two pulses at once (a\n // navigation that also resized the sidebar) combine by their MAXIMUM, never by summing: the frame never moves\n // further than one choreography would move it.\n let lightSweepDeg = 0;\n let shadowSpread = 0;\n let rimLift = 0;\n for (const [trigger, pulse] of this.pulses) {\n const strength = Math.sin((Math.PI / 2) * clamp01(pulse.value));\n const choreography = this.choreographies[trigger];\n lightSweepDeg = Math.max(lightSweepDeg, choreography.lightSweepDeg * strength);\n shadowSpread = Math.max(shadowSpread, choreography.shadowSpread * strength);\n rimLift = Math.max(rimLift, choreography.rimLift * strength);\n }\n const light = frame ? (frame.lightAngleDeg + lightSweepDeg) * (Math.PI / 180) : 0;\n const lightDir = new Vector2(Math.cos(light), Math.sin(light));\n\n const background = frame?.background;\n this.backgroundMesh.visible = Boolean(background && background[6]! > 0 && width > 0 && height > 0);\n if (background && this.backgroundMesh.visible) {\n setBody(this.backgroundMesh.material, {\n size: [width, height],\n quad: [width + 2, height + 2],\n radius: 0,\n fillFrom: background.slice(0, 3),\n fillTo: background.slice(3, 6),\n fillAlpha: 1,\n rim: [0, 0, 0],\n rimAlpha: 0,\n rimWidth: 0,\n lightDir,\n presence: background[6]!,\n });\n this.backgroundMesh.scale.set(width + 2, height + 2, 1);\n this.backgroundMesh.position.set(0, 0, 0);\n }\n\n while (this.slabs.length < this.boxes.length) this.slabs.push(this.createSlab());\n this.slabs.forEach((slab, index) => {\n const box = this.boxes[index];\n const params = box && frame ? frame.regions[box.region] : undefined;\n const presence = params && box && !box.glass ? params[PRESENCE]! : 0;\n slab.body.visible = presence > 0;\n slab.shadow.visible = presence > 0 && params![17]! > 0 && this.backgroundMesh.visible;\n if (!box || !params || presence <= 0) return;\n\n const centre = regionCentreInFrameUnits(box, this.viewport);\n const radius = params[13]!;\n // The content slab carries the lift: its rim toward the hover opacity (never past it), its shadow further.\n const isContent = box.region === ShellRegion.CONTENT;\n const hover = Math.max(clamp01(this.hover.get(box.element)?.value ?? 0), isContent ? rimLift : 0);\n setBody(slab.body.material, {\n size: [box.width, box.height],\n quad: [box.width + 2, box.height + 2],\n radius,\n fillFrom: params.slice(0, 3),\n fillTo: params.slice(3, 6),\n fillAlpha: params[6]!,\n rim: params.slice(7, 10),\n rimAlpha: params[10]! + (params[11]! - params[10]!) * hover,\n rimWidth: params[12]!,\n lightDir,\n presence,\n });\n slab.body.scale.set(box.width + 2, box.height + 2, 1);\n slab.body.position.set(centre.x, centre.y, 0);\n\n if (!slab.shadow.visible) return;\n // Blur and offset grow with the lift; the opacity never does (the frost bound covers the strongest shadow's opacity anywhere).\n const spread = 1 + (isContent ? shadowSpread : 0);\n const [offsetX, offsetY, blur, alpha] = [params[14]! * spread, params[15]! * spread, params[16]! * spread, params[17]!];\n const margin = blur + 2;\n const u = slab.shadow.material.uniforms;\n (u.uSize!.value as Vector2).set(box.width, box.height);\n (u.uQuad!.value as Vector2).set(box.width + 2 * margin, box.height + 2 * margin);\n u.uRadius!.value = radius;\n u.uBlur!.value = blur;\n u.uAlpha!.value = alpha;\n u.uPresence!.value = presence;\n (u.uBgFrom!.value as Vector3).set(background![0]!, background![1]!, background![2]!);\n (u.uBgTo!.value as Vector3).set(background![3]!, background![4]!, background![5]!);\n (u.uBgSize!.value as Vector2).set(width, height);\n (u.uLightDir!.value as Vector2).copy(lightDir);\n slab.shadow.scale.set(box.width + 2 * margin, box.height + 2 * margin, 1);\n // The DOM's y axis points down and three.js' up, so a downward CSS offset is a negative y.\n slab.shadow.position.set(centre.x + offsetX, centre.y - offsetY, 0);\n });\n\n this.applyZoneRims(frame, lightDir);\n }\n\n /**\n * The focused zone's rim, drawn over the content slab: the content slab's rim colour and width, at most its HOVER\n * opacity, and no fill. Each rim is inset from the content box by the content rim's own width, so it never lands\n * on the content slab's rim band — where it is drawn, it is exactly the case the contrast bound was proved for.\n */\n private applyZoneRims(frame: DisplayedFrame | null, lightDir: Vector2): void {\n const content = this.boxes.find((box) => box.region === ShellRegion.CONTENT);\n const params = frame?.regions[ShellRegion.CONTENT];\n const drawable = Boolean(content && params && !content.glass && params[PRESENCE]! > 0);\n const shown = drawable ? this.zones.filter((zone) => (this.zoneEmphasis.get(zone.element)?.value ?? 0) > 0) : [];\n while (this.zoneRims.length < shown.length) {\n const rim = new Mesh(this.geometry, bodyMaterial());\n rim.renderOrder = FrameRenderOrder.ZONE_RIM;\n this.group.add(rim);\n this.zoneRims.push(rim);\n }\n this.zoneRims.forEach((rim, index) => {\n const zone = shown[index];\n rim.visible = false;\n if (!zone || !content || !params) return;\n const inset = params[12]! + 1;\n const left = Math.max(zone.left, content.left + inset);\n const top = Math.max(zone.top, content.top + inset);\n const right = Math.min(zone.left + zone.width, content.left + content.width - inset);\n const bottom = Math.min(zone.top + zone.height, content.top + content.height - inset);\n if (right - left <= 0 || bottom - top <= 0) return;\n const emphasis = clamp01(this.zoneEmphasis.get(zone.element)?.value ?? 0);\n const box = { left, top, width: right - left, height: bottom - top };\n const centre = regionCentreInFrameUnits(box, this.viewport);\n rim.visible = true;\n setBody(rim.material, {\n size: [box.width, box.height],\n quad: [box.width + 2, box.height + 2],\n radius: Math.max(0, params[13]! - inset),\n fillFrom: params.slice(0, 3),\n fillTo: params.slice(3, 6),\n fillAlpha: 0,\n rim: params.slice(7, 10),\n rimAlpha: params[11]! * emphasis,\n rimWidth: params[12]!,\n lightDir,\n presence: params[PRESENCE]!,\n });\n rim.scale.set(box.width + 2, box.height + 2, 1);\n rim.position.set(centre.x, centre.y, 0);\n });\n }\n\n /** Point every zone's rim emphasis at its target: 1 for the focused zone of a split, 0 otherwise. Returns whether any target moved. */\n private retargetZoneEmphasis(): boolean {\n const active = this.rimsFocusedZone && Boolean(this.appearance?.hoverResponse) && this.zones.length >= 2 ? this.focusedZone : null;\n this.rimmed = active;\n let changed = false;\n for (const zone of this.zones) {\n const target = zone.element === active ? 1 : 0;\n const state = this.zoneEmphasis.get(zone.element);\n if ((state?.target ?? 0) === target) continue;\n const next = state ?? { value: 0, target: 0, velocity: 0, tween: null, spring: null, lastTick: null };\n next.target = target;\n next.spring = this.appearance?.hoverSpring ?? null;\n next.tween = next.spring ? null : { from: next.value, to: target, start: null, seconds: this.appearance?.hoverSeconds ?? 0, easing: this.appearance?.hoverEasing ?? [0, 0, 1, 1] };\n next.lastTick = null;\n this.zoneEmphasis.set(zone.element, next);\n changed = true;\n }\n return changed;\n }\n\n private createSlab(): SlabMeshes {\n const body = new Mesh(this.geometry, bodyMaterial());\n body.renderOrder = FrameRenderOrder.BODY;\n const shadow = new Mesh(this.geometry, shadowMaterial());\n shadow.renderOrder = FrameRenderOrder.SHADOW;\n this.group.add(shadow, body);\n return { body, shadow };\n }\n}\n\n/** A cubic-Bézier easing evaluated at `x` in 0–1, as CSS `cubic-bezier()` defines it (x → y, solved by Newton then bisection). */\nexport function evaluateEasing([x1, y1, x2, y2]: FrameEasing, x: number): number {\n if (x <= 0) return 0;\n if (x >= 1) return 1;\n const sample = (a: number, b: number, t: number): number => ((1 - 3 * b + 3 * a) * t + (3 * b - 6 * a)) * t * t + 3 * a * t;\n const slope = (a: number, b: number, t: number): number => 3 * (1 - 3 * b + 3 * a) * t * t + 2 * (3 * b - 6 * a) * t + 3 * a;\n let t = x;\n for (let i = 0; i < 8; i += 1) {\n const error = sample(x1, x2, t) - x;\n if (Math.abs(error) < 1e-6) return sample(y1, y2, t);\n const d = slope(x1, x2, t);\n if (Math.abs(d) < 1e-6) break;\n t -= error / d;\n }\n let low = 0;\n let high = 1;\n t = x;\n for (let i = 0; i < 30; i += 1) {\n const value = sample(x1, x2, t);\n if (Math.abs(value - x) < 1e-6) break;\n if (value < x) low = t; else high = t;\n t = (low + high) / 2;\n }\n return sample(y1, y2, t);\n}\n\n/**\n * A tween's progress at `now`.\n *\n * - `eased` is CLAMPED to 0–1. A theme's easing token may overshoot (a y control point above 1 — the engine's own\n * `emphasized` easing does), and an overshooting cross-fade would pass its target: colours outside 0–1, a frost\n * more opaque than the bound was computed for. The frame follows the curve's shape inside the range only.\n * - `done` is decided by ELAPSED TIME, never by the eased value: an overshooting curve reaches 1 early, and ending\n * the tween there would cut the transition short.\n */\nfunction advance<T>(tween: Tween<T>, now: number): { eased: number; done: boolean } {\n if (tween.seconds <= 0) return { eased: 1, done: true };\n if (tween.start === null) tween.start = now;\n const linear = Math.min(1, Math.max(0, (now - tween.start) / (tween.seconds * 1000)));\n return linear >= 1 ? { eased: 1, done: true } : { eased: clamp01(evaluateEasing(tween.easing, linear)), done: false };\n}\n\nfunction stepHover(state: HoverState, now: number): void {\n if (state.tween) {\n const { eased, done } = advance(state.tween, now);\n state.value = state.tween.from + (state.tween.to - state.tween.from) * eased;\n if (done) state.tween = null;\n return;\n }\n if (!state.spring) return;\n const last = state.lastTick ?? now;\n state.lastTick = now;\n let remaining = Math.min(0.25, Math.max(0, (now - last) / 1000));\n const { stiffness, damping, mass } = state.spring;\n while (remaining > 0) {\n const dt = Math.min(SPRING_STEP_SECONDS, remaining);\n const acceleration = (-stiffness * (state.value - state.target) - damping * state.velocity) / mass;\n state.velocity += acceleration * dt;\n state.value += state.velocity * dt;\n remaining -= dt;\n }\n if (Math.abs(state.value - state.target) < SPRING_REST && Math.abs(state.velocity) < SPRING_REST) {\n state.value = state.target;\n state.velocity = 0;\n }\n}\n\nfunction hoverSettled(state: HoverState): boolean {\n if (state.tween) return false;\n return state.value === state.target && state.velocity === 0;\n}\n\nfunction clamp01(value: number): number {\n return Math.min(1, Math.max(0, value));\n}\n\nfunction sameColor(a: FrameColor, b: FrameColor): boolean {\n return a.every((channel, i) => Math.abs(channel - b[i]!) < 1e-9);\n}\n\nfunction slabVector(slab: FrameSlabAppearance): SlabVector {\n return [\n ...slab.fillFrom, ...slab.fillTo, slab.fillAlpha,\n ...slab.rim, slab.rimAlpha, slab.rimHoverAlpha, slab.rimWidthPx, slab.radiusPx,\n slab.shadowOffsetXPx, slab.shadowOffsetYPx, slab.shadowBlurPx, slab.shadowAlpha,\n slab.visible ? 1 : 0,\n ];\n}\n\n/**\n * The numbers to display for an appearance. A null appearance (or an invisible slab) keeps the PREVIOUS colours\n * with presence 0, so a fade-out fades the colours that were on screen instead of flashing to black.\n */\nfunction displayedOf(appearance: FrameAppearance | null, previous: DisplayedFrame | null): DisplayedFrame {\n const regions = {} as Record<ShellRegion, SlabVector>;\n for (const region of Object.values(ShellRegion)) {\n const slab = appearance?.regions[region];\n const prior = previous?.regions[region];\n if (slab?.visible) regions[region] = slabVector(slab);\n else regions[region] = prior ? [...prior.slice(0, PRESENCE), 0] : new Array<number>(SLAB_SIZE).fill(0);\n }\n const background = appearance?.background\n ? [...appearance.background.from, ...appearance.background.to, 1]\n : previous ? [...previous.background.slice(0, 6), 0] : [0, 0, 0, 0, 0, 0, 0];\n return { regions, background, lightAngleDeg: appearance?.lightAngleDeg ?? previous?.lightAngleDeg ?? 0 };\n}\n\n/**\n * The start of a cross-fade: what is on screen, except that anything NOT on screen (presence 0) starts from the\n * TARGET's colours. A slab appearing then fades in as itself — only its presence moves — instead of passing\n * through black, which no contrast bound covers.\n */\nfunction fadeInFrom(shown: DisplayedFrame, target: DisplayedFrame): DisplayedFrame {\n const regions = {} as Record<ShellRegion, SlabVector>;\n for (const region of Object.values(ShellRegion)) {\n const current = shown.regions[region];\n regions[region] = current[PRESENCE]! > 0 ? current : [...target.regions[region].slice(0, PRESENCE), 0];\n }\n const background = shown.background[6]! > 0 ? shown.background : [...target.background.slice(0, 6), 0];\n return { regions, background, lightAngleDeg: shown.lightAngleDeg };\n}\n\nfunction interpolateFrame(from: DisplayedFrame, to: DisplayedFrame, t: number): DisplayedFrame {\n const lerp = (a: number[], b: number[]): number[] => a.map((value, i) => value + (b[i]! - value) * t);\n const regions = {} as Record<ShellRegion, SlabVector>;\n for (const region of Object.values(ShellRegion)) regions[region] = lerp(from.regions[region], to.regions[region]);\n return { regions, background: lerp(from.background, to.background), lightAngleDeg: from.lightAngleDeg + (to.lightAngleDeg - from.lightAngleDeg) * t };\n}\n\nfunction bodyMaterial(): ShaderMaterial {\n return new ShaderMaterial({\n vertexShader: FRAME_VERTEX_SHADER,\n fragmentShader: FRAME_BODY_FRAGMENT_SHADER,\n transparent: true,\n depthTest: false,\n depthWrite: false,\n toneMapped: false,\n uniforms: {\n uSize: { value: new Vector2() },\n uQuad: { value: new Vector2() },\n uRadius: { value: 0 },\n uFillFrom: { value: new Vector3() },\n uFillTo: { value: new Vector3() },\n uFillAlpha: { value: 0 },\n uRim: { value: new Vector3() },\n uRimAlpha: { value: 0 },\n uRimWidth: { value: 0 },\n uLightDir: { value: new Vector2(0, 1) },\n uPresence: { value: 0 },\n },\n });\n}\n\n/** The shadow writes an opaque, darkened background with MIN blending: overlapping shadows never stack. */\nfunction shadowMaterial(): ShaderMaterial {\n return new ShaderMaterial({\n vertexShader: FRAME_VERTEX_SHADER,\n fragmentShader: FRAME_SHADOW_FRAGMENT_SHADER,\n transparent: true,\n depthTest: false,\n depthWrite: false,\n toneMapped: false,\n blending: CustomBlending,\n blendEquation: MinEquation,\n uniforms: {\n uSize: { value: new Vector2() },\n uQuad: { value: new Vector2() },\n uRadius: { value: 0 },\n uBlur: { value: 0 },\n uAlpha: { value: 0 },\n uPresence: { value: 0 },\n uBgFrom: { value: new Vector3() },\n uBgTo: { value: new Vector3() },\n uBgSize: { value: new Vector2() },\n uLightDir: { value: new Vector2(0, 1) },\n },\n });\n}\n\nfunction setBody(\n material: ShaderMaterial,\n values: {\n size: [number, number];\n quad: [number, number];\n radius: number;\n fillFrom: number[];\n fillTo: number[];\n fillAlpha: number;\n rim: number[];\n rimAlpha: number;\n rimWidth: number;\n lightDir: Vector2;\n presence: number;\n },\n): void {\n const u = material.uniforms;\n (u.uSize!.value as Vector2).set(...values.size);\n (u.uQuad!.value as Vector2).set(...values.quad);\n u.uRadius!.value = values.radius;\n (u.uFillFrom!.value as Vector3).set(values.fillFrom[0]!, values.fillFrom[1]!, values.fillFrom[2]!);\n (u.uFillTo!.value as Vector3).set(values.fillTo[0]!, values.fillTo[1]!, values.fillTo[2]!);\n u.uFillAlpha!.value = values.fillAlpha;\n (u.uRim!.value as Vector3).set(values.rim[0]!, values.rim[1]!, values.rim[2]!);\n u.uRimAlpha!.value = values.rimAlpha;\n u.uRimWidth!.value = values.rimWidth;\n (u.uLightDir!.value as Vector2).copy(values.lightDir);\n u.uPresence!.value = values.presence;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"frame-renderer.js","sourceRoot":"","s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AAM,CAAC,GAAG,CAAC,CAAC,CAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC,CAAC;IAC/E,CAAC,CAAC,SAAU,CAAC,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC;IACrC,CAAC,CAAC,SAAU,CAAC,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC;IACpC,CAAC,CAAC,SAAU,CAAC,KAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC,CAAC,SAAU,CAAC,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC;AACvC,CAAC","sourcesContent":["import { CustomBlending, Group, Mesh, MinEquation, PlaneGeometry, ShaderMaterial, Vector2, Vector3 } from 'three';\nimport { ShellRegion } from '@wildo-ai/presets-components-models';\n\nimport { FRAME_BODY_FRAGMENT_SHADER, FRAME_SHADOW_FRAGMENT_SHADER, FRAME_VERTEX_SHADER } from './frame-shaders';\nimport type { FrameAppearance, FrameEasing, FrameSlabAppearance, FrameSpring } from './frame-appearance';\nimport type { FrameColor } from './frame-color';\nimport { regionCentreInFrameUnits } from '../shell-region-measurement';\nimport { frameChoreography, rimsFocusedZone, type FrameChoreography } from '../layout/layout-3d-transition-choreography';\nimport { Layout3DFrameChoreography, Layout3DZoneFocusTransition, type Layout3DTransitions } from '../layout/layout-3d-vocabulary';\n\n/** One region the frame draws under, as measured off the DOM. */\nexport interface FrameRegionBox {\n /** The region's element: the identity a slab (and its hover state) follows across redraws. */\n element: object;\n region: ShellRegion;\n left: number;\n top: number;\n width: number;\n height: number;\n /** The region already renders a glass material (`data-material-kind=\"glass\"`): no slab under it (#1823, no double glass). */\n glass: boolean;\n}\n\n/** One navigation zone inside the content region, as measured off the DOM (#1826). */\nexport interface FrameZoneBox {\n /** The zone container: the identity its rim emphasis follows across redraws. */\n element: object;\n left: number;\n top: number;\n width: number;\n height: number;\n}\n\n/** The canvas' size in CSS pixels, which the orthographic camera is fitted to. */\nexport interface FrameViewport {\n width: number;\n height: number;\n}\n\n/** Draw order: the background, then every shadow, then every body — so no shadow lands on a slab. */\nenum FrameRenderOrder {\n BACKGROUND = 0,\n SHADOW = 1,\n BODY = 2,\n /** The focused zone's rim, over the content slab it sits in. */\n ZONE_RIM = 3,\n}\n\n/**\n * A slab's numbers, flattened so a theme change can interpolate all of them at once:\n * fillFrom(3) fillTo(3) fillAlpha rim(3) rimAlpha rimHoverAlpha rimWidth radius shadowX shadowY shadowBlur\n * shadowAlpha presence.\n */\ntype SlabVector = number[];\n/** The background's numbers: from(3) to(3) presence. */\ntype BackgroundVector = number[];\n\ninterface DisplayedFrame {\n regions: Record<ShellRegion, SlabVector>;\n background: BackgroundVector;\n lightAngleDeg: number;\n}\n\ninterface Tween<T> {\n from: T;\n to: T;\n /** Set on the first tick after the tween is created, so a tween started between frames loses no time. */\n start: number | null;\n seconds: number;\n easing: FrameEasing;\n}\n\n/** A rim's hover emphasis: 0 at rest, 1 fully emphasised. Driven by a spring when the theme declares one. */\ninterface HoverState {\n value: number;\n target: number;\n velocity: number;\n /** The eased path, when there is no spring. */\n tween: Tween<number> | null;\n spring: FrameSpring | null;\n lastTick: number | null;\n}\n\n/**\n * What starts a transition of the frame (#1826). The driver reports each start to its host, which is how a live\n * probe tells that a choreography ran rather than inferring it from draws.\n */\nexport enum FrameTransitionTrigger {\n /** A structural zone's top entry became another place. Plays the layout's `navigation` choreography. */\n NAVIGATION = 'navigation',\n /** The sidebar's width changed while it stayed on screen. Plays the layout's `sidebarResize` choreography. */\n SIDEBAR_RESIZE = 'sidebar-resize',\n /** The focused zone of a split changed, and the layout rims it. */\n ZONE_FOCUS = 'zone-focus',\n}\n\n/** What a {@link FrameRenderer.pulse} call did. */\nexport enum FramePulseOutcome {\n /** Nothing plays: no choreography for the trigger, reduced motion, or no appearance yet. */\n NOT_PLAYED = 'not-played',\n /** A new pulse started (from rest, or a new rise out of a settle): a transition the driver reports. */\n STARTED = 'started',\n /** The trigger's pulse was already rising and keeps rising: nothing new to report. */\n ALREADY_RISING = 'already-rising',\n}\n\n/** The triggers that play a pulse-shaped {@link Layout3DFrameChoreography}. */\nexport type FramePulseTrigger = FrameTransitionTrigger.NAVIGATION | FrameTransitionTrigger.SIDEBAR_RESIZE;\n\n/**\n * One trigger's pulse (#1826): a RISE from wherever it stands to 1, then a SETTLE back to 0, each over half the\n * pulse's duration. The same trigger while it RISES changes nothing; while it SETTLES, it starts a new rise from the\n * CURRENT strength. So a quick run of navigations, or a sidebar whose width changes on every frame of its animation,\n * holds the pulse up without ever making the frame jump.\n */\ninterface FramePulse {\n rising: boolean;\n tween: Tween<number>;\n /** The strength after the last tick: where a restarted rise begins. */\n value: number;\n}\n\ninterface SlabMeshes {\n body: Mesh<PlaneGeometry, ShaderMaterial>;\n shadow: Mesh<PlaneGeometry, ShaderMaterial>;\n}\n\nconst PRESENCE = 18;\nconst SLAB_SIZE = PRESENCE + 1;\n/** A spring is considered at rest once it is this close to its target and this slow. */\nconst SPRING_REST = 1e-3;\n/** Integration step for a spring, in seconds: small enough to stay stable for any stiffness a theme declares. */\nconst SPRING_STEP_SECONDS = 1 / 240;\n\n/**\n * The frame's scene, driven imperatively (#1823).\n *\n * It owns the meshes and their uniforms and nothing else: WHEN to draw is the canvas driver's decision. Every\n * method is a plain state change plus {@link tick}, which applies the state for an instant and says whether\n * anything is still animating — so the whole scene logic runs, and is tested, without a WebGL context.\n *\n * Hover emphasises the RIM only, and its progress is clamped to 0–1 even when a spring overshoots. The frost never\n * changes on hover, so hover cannot take a colour outside the contrast bound the appearance derivation proved.\n */\nexport class FrameRenderer {\n private readonly geometry = new PlaneGeometry(1, 1);\n private readonly backgroundMesh: Mesh<PlaneGeometry, ShaderMaterial>;\n private readonly slabs: SlabMeshes[] = [];\n private boxes: FrameRegionBox[] = [];\n private viewport: FrameViewport = { width: 0, height: 0 };\n private layoutSignature = '';\n /** What is on screen now: the last frame applied, mid-cross-fade included. A new appearance fades FROM this. */\n private shown: DisplayedFrame | null = null;\n private tween: Tween<DisplayedFrame> | null = null;\n private appearance: FrameAppearance | null = null;\n private hovered: object | null = null;\n private readonly hover = new Map<object, HoverState>();\n private readonly choreographies: Record<FramePulseTrigger, FrameChoreography>;\n private readonly rimsFocusedZone: boolean;\n private readonly pulses = new Map<FramePulseTrigger, FramePulse>();\n /** The zone the rim is moving toward, or null. */\n private rimmed: object | null = null;\n private zones: FrameZoneBox[] = [];\n private zoneSignature = '';\n private focusedZone: object | null = null;\n /** Each zone's rim emphasis, 0 to 1, stepped exactly like a hover emphasis. */\n private readonly zoneEmphasis = new Map<object, HoverState>();\n private readonly zoneRims: Mesh<PlaneGeometry, ShaderMaterial>[] = [];\n\n /**\n * @param transitions What the layout plays on a navigation, a sidebar resize and a zone focus. Defaults to nothing:\n * a renderer with no layout behind it (a test, a probe) draws the regions and moves only on appearance and hover.\n */\n constructor(\n private readonly group: Group,\n transitions: Pick<Layout3DTransitions, 'navigation' | 'sidebarResize' | 'zoneFocus'> = {\n navigation: Layout3DFrameChoreography.NONE,\n sidebarResize: Layout3DFrameChoreography.NONE,\n zoneFocus: Layout3DZoneFocusTransition.NONE,\n },\n ) {\n this.choreographies = {\n [FrameTransitionTrigger.NAVIGATION]: frameChoreography(transitions.navigation),\n [FrameTransitionTrigger.SIDEBAR_RESIZE]: frameChoreography(transitions.sidebarResize),\n };\n this.rimsFocusedZone = rimsFocusedZone(transitions.zoneFocus);\n this.backgroundMesh = new Mesh(this.geometry, bodyMaterial());\n this.backgroundMesh.renderOrder = FrameRenderOrder.BACKGROUND;\n this.backgroundMesh.visible = false;\n group.add(this.backgroundMesh);\n }\n\n /**\n * The appearance to draw. With `animate`, the change cross-fades over the appearance's transition time —\n * except when the FOREGROUND changed (a light/dark switch): text switches colour at once, and a backdrop\n * halfway between two modes is bounded against neither foreground, so the frame switches at once too.\n */\n setAppearance(appearance: FrameAppearance | null, options: { animate: boolean }): void {\n const previous = this.appearance;\n const target = displayedOf(appearance, this.shown);\n if (appearance) this.appearance = appearance;\n // Reduced motion turned on mid-hover: the frame is static from now on, so the emphasis goes at once.\n if (appearance && !appearance.hoverResponse) {\n this.hovered = null;\n this.hover.clear();\n this.pulses.clear();\n this.zoneEmphasis.clear();\n }\n // A reduced-motion switch (either way) or a new gesture spring changes what the focused zone's rim should do.\n this.retargetZoneEmphasis();\n const seconds = appearance?.transitionSeconds ?? 0;\n const foregroundChanged = Boolean(previous && appearance && !sameColor(previous.foreground, appearance.foreground));\n if (!options.animate || !this.shown || seconds <= 0 || foregroundChanged) {\n this.shown = target;\n this.tween = null;\n return;\n }\n this.tween = { from: fadeInFrom(this.shown, target), to: target, start: null, seconds, easing: appearance?.transitionEasing ?? [0, 0, 1, 1] };\n }\n\n /** The measured regions. Returns false when nothing moved, so the caller can skip the frame entirely. */\n setLayout(boxes: FrameRegionBox[], viewport: FrameViewport): boolean {\n const signature = `${viewport.width}x${viewport.height}|${boxes.map((b) => `${b.region}:${b.left},${b.top},${b.width},${b.height},${b.glass ? 'g' : ''}`).join(';')}`;\n this.boxes = boxes;\n this.viewport = viewport;\n // A region that left takes its hover state with it (an organization switch remounts regions).\n const present = new Set(boxes.map((box) => box.element));\n for (const key of this.hover.keys()) if (!present.has(key)) this.hover.delete(key);\n if (this.hovered && !present.has(this.hovered)) this.hovered = null;\n if (signature === this.layoutSignature) return false;\n this.layoutSignature = signature;\n return true;\n }\n\n /**\n * The region element under the pointer, or null. Its rim moves toward the hover opacity — unless the\n * appearance says the frame is static (reduced motion). Returns whether anything will change on screen.\n */\n setHovered(element: object | null): boolean {\n const next = this.appearance?.hoverResponse ? element : null;\n if (next === this.hovered) return false;\n for (const [key, target] of [[this.hovered, 0], [next, 1]] as const) {\n if (!key) continue;\n const state = this.hover.get(key) ?? { value: 0, target: 0, velocity: 0, tween: null, spring: null, lastTick: null };\n state.target = target;\n state.spring = this.appearance?.hoverSpring ?? null;\n state.tween = state.spring ? null : { from: state.value, to: target, start: null, seconds: this.appearance?.hoverSeconds ?? 0, easing: this.appearance?.hoverEasing ?? [0, 0, 1, 1] };\n state.lastTick = null;\n this.hover.set(key, state);\n }\n this.hovered = next;\n return true;\n }\n\n /**\n * A shell state changed (#1826): play the layout's choreography for that trigger. Nothing plays when the layout\n * declares none for it, under reduced motion (the frame is static), or when the theme's motion duration is zero.\n * Says whether a pulse STARTED, was already rising, or nothing plays.\n */\n pulse(trigger: FramePulseTrigger): FramePulseOutcome {\n const appearance = this.appearance;\n const choreography = this.choreographies[trigger];\n if (!choreography.plays || !appearance || !appearance.hoverResponse || appearance.transitionSeconds <= 0) return FramePulseOutcome.NOT_PLAYED;\n // Already rising: let it rise. Restarting would re-anchor its clock on every call, and a sidebar calls on every\n // frame of its width animation, so the pulse would never leave where it stood until the sidebar stopped.\n if (this.pulses.get(trigger)?.rising) return FramePulseOutcome.ALREADY_RISING;\n const halfSeconds = (appearance.transitionSeconds * choreography.durationFactor) / 2;\n const from = this.pulses.get(trigger)?.value ?? 0;\n this.pulses.set(trigger, { rising: true, value: from, tween: { from, to: 1, start: null, seconds: halfSeconds, easing: appearance.transitionEasing } });\n return FramePulseOutcome.STARTED;\n }\n\n /** The zone whose rim is shown or moving in, or null: what the driver compares to report a zone-focus transition. */\n rimmedZone(): object | null {\n return this.rimmed;\n }\n\n /**\n * The navigation zones inside the content region, and the focused one (the navigation state's `focusedZone`), or\n * null. When the layout rims the focused zone and two or more zones are side by side, the focused one's rim moves\n * toward full emphasis and every other zone's back to none. Returns whether anything will change on screen.\n */\n setZones(zones: FrameZoneBox[], focused: object | null): boolean {\n const signature = zones.map((zone) => `${zone.left},${zone.top},${zone.width},${zone.height}`).join(';');\n const moved = signature !== this.zoneSignature;\n this.zoneSignature = signature;\n this.zones = zones;\n const present = new Set(zones.map((zone) => zone.element));\n for (const key of this.zoneEmphasis.keys()) if (!present.has(key)) this.zoneEmphasis.delete(key);\n this.focusedZone = focused && present.has(focused) ? focused : null;\n return this.retargetZoneEmphasis() || moved;\n }\n\n /** Whether a cross-fade, a hover or zone emphasis, or a pulse is still moving: the only reasons to draw when no region moved. */\n hasPendingMotion(): boolean {\n if (this.tween || this.pulses.size > 0) return true;\n for (const state of this.hover.values()) if (!hoverSettled(state)) return true;\n for (const state of this.zoneEmphasis.values()) if (!hoverSettled(state)) return true;\n return false;\n }\n\n /** Apply the state for instant `now` (ms). Returns true while a cross-fade or a hover emphasis is still moving. */\n tick(now: number): boolean {\n if (this.tween) {\n const { eased, done } = advance(this.tween, now);\n if (done) {\n this.shown = this.tween.to;\n this.tween = null;\n } else {\n this.shown = interpolateFrame(this.tween.from, this.tween.to, eased);\n }\n }\n for (const [key, state] of this.hover) {\n stepHover(state, now);\n if (hoverSettled(state) && state.target === 0) this.hover.delete(key);\n }\n for (const [key, state] of this.zoneEmphasis) {\n stepHover(state, now);\n if (hoverSettled(state) && state.target === 0) this.zoneEmphasis.delete(key);\n }\n for (const [trigger, pulse] of this.pulses) {\n const { eased, done } = advance(pulse.tween, now);\n const { from, to } = pulse.tween;\n pulse.value = from + (to - from) * eased;\n if (done && pulse.rising) {\n const easing = this.appearance?.transitionEasing ?? [0, 0, 1, 1];\n this.pulses.set(trigger, { rising: false, value: 1, tween: { from: 1, to: 0, start: now, seconds: pulse.tween.seconds, easing } });\n } else if (done) {\n this.pulses.delete(trigger);\n }\n }\n this.apply(this.shown);\n return this.hasPendingMotion();\n }\n\n dispose(): void {\n this.group.remove(this.backgroundMesh);\n this.backgroundMesh.material.dispose();\n for (const slab of this.slabs) {\n this.group.remove(slab.body, slab.shadow);\n slab.body.material.dispose();\n slab.shadow.material.dispose();\n }\n this.slabs.length = 0;\n for (const rim of this.zoneRims) {\n this.group.remove(rim);\n rim.material.dispose();\n }\n this.zoneRims.length = 0;\n this.geometry.dispose();\n }\n\n private apply(frame: DisplayedFrame | null): void {\n const { width, height } = this.viewport;\n // Each pulse's strength, 0 at rest: `sin` shapes the rise-and-settle into one smooth swell. Two pulses at once (a\n // navigation that also resized the sidebar) combine by their MAXIMUM, never by summing: the frame never moves\n // further than one choreography would move it.\n let lightSweepDeg = 0;\n let shadowSpread = 0;\n let rimLift = 0;\n for (const [trigger, pulse] of this.pulses) {\n const strength = Math.sin((Math.PI / 2) * clamp01(pulse.value));\n const choreography = this.choreographies[trigger];\n lightSweepDeg = Math.max(lightSweepDeg, choreography.lightSweepDeg * strength);\n shadowSpread = Math.max(shadowSpread, choreography.shadowSpread * strength);\n rimLift = Math.max(rimLift, choreography.rimLift * strength);\n }\n const light = frame ? (frame.lightAngleDeg + lightSweepDeg) * (Math.PI / 180) : 0;\n const lightDir = new Vector2(Math.cos(light), Math.sin(light));\n\n const background = frame?.background;\n this.backgroundMesh.visible = Boolean(background && background[6]! > 0 && width > 0 && height > 0);\n if (background && this.backgroundMesh.visible) {\n setBody(this.backgroundMesh.material, {\n size: [width, height],\n quad: [width + 2, height + 2],\n radius: 0,\n fillFrom: background.slice(0, 3),\n fillTo: background.slice(3, 6),\n fillAlpha: 1,\n rim: [0, 0, 0],\n rimAlpha: 0,\n rimWidth: 0,\n lightDir,\n presence: background[6]!,\n });\n this.backgroundMesh.scale.set(width + 2, height + 2, 1);\n this.backgroundMesh.position.set(0, 0, 0);\n }\n\n while (this.slabs.length < this.boxes.length) this.slabs.push(this.createSlab());\n this.slabs.forEach((slab, index) => {\n const box = this.boxes[index];\n const params = box && frame ? frame.regions[box.region] : undefined;\n const presence = params && box && !box.glass ? params[PRESENCE]! : 0;\n slab.body.visible = presence > 0;\n slab.shadow.visible = presence > 0 && params![17]! > 0 && this.backgroundMesh.visible;\n if (!box || !params || presence <= 0) return;\n\n const centre = regionCentreInFrameUnits(box, this.viewport);\n const radius = params[13]!;\n // The content slab carries the lift: its rim toward the hover opacity (never past it), its shadow further.\n const isContent = box.region === ShellRegion.CONTENT;\n const hover = Math.max(clamp01(this.hover.get(box.element)?.value ?? 0), isContent ? rimLift : 0);\n setBody(slab.body.material, {\n size: [box.width, box.height],\n quad: [box.width + 2, box.height + 2],\n radius,\n fillFrom: params.slice(0, 3),\n fillTo: params.slice(3, 6),\n fillAlpha: params[6]!,\n rim: params.slice(7, 10),\n rimAlpha: params[10]! + (params[11]! - params[10]!) * hover,\n rimWidth: params[12]!,\n lightDir,\n presence,\n });\n slab.body.scale.set(box.width + 2, box.height + 2, 1);\n slab.body.position.set(centre.x, centre.y, 0);\n\n if (!slab.shadow.visible) return;\n // Blur and offset grow with the lift; the opacity never does (the frost bound covers the strongest shadow's opacity anywhere).\n const spread = 1 + (isContent ? shadowSpread : 0);\n const [offsetX, offsetY, blur, alpha] = [params[14]! * spread, params[15]! * spread, params[16]! * spread, params[17]!];\n const margin = blur + 2;\n const u = slab.shadow.material.uniforms;\n (u.uSize!.value as Vector2).set(box.width, box.height);\n (u.uQuad!.value as Vector2).set(box.width + 2 * margin, box.height + 2 * margin);\n u.uRadius!.value = radius;\n u.uBlur!.value = blur;\n u.uAlpha!.value = alpha;\n u.uPresence!.value = presence;\n (u.uBgFrom!.value as Vector3).set(background![0]!, background![1]!, background![2]!);\n (u.uBgTo!.value as Vector3).set(background![3]!, background![4]!, background![5]!);\n (u.uBgSize!.value as Vector2).set(width, height);\n (u.uLightDir!.value as Vector2).copy(lightDir);\n slab.shadow.scale.set(box.width + 2 * margin, box.height + 2 * margin, 1);\n // The DOM's y axis points down and three.js' up, so a downward CSS offset is a negative y.\n slab.shadow.position.set(centre.x + offsetX, centre.y - offsetY, 0);\n });\n\n this.applyZoneRims(frame, lightDir);\n }\n\n /**\n * The focused zone's rim, drawn over the content slab: the content slab's rim colour and width, at most its HOVER\n * opacity, and no fill. Each rim is inset from the content box by the content rim's own width, so it never lands\n * on the content slab's rim band — where it is drawn, it is exactly the case the contrast bound was proved for.\n */\n private applyZoneRims(frame: DisplayedFrame | null, lightDir: Vector2): void {\n const content = this.boxes.find((box) => box.region === ShellRegion.CONTENT);\n const params = frame?.regions[ShellRegion.CONTENT];\n const drawable = Boolean(content && params && !content.glass && params[PRESENCE]! > 0);\n const shown = drawable ? this.zones.filter((zone) => (this.zoneEmphasis.get(zone.element)?.value ?? 0) > 0) : [];\n while (this.zoneRims.length < shown.length) {\n const rim = new Mesh(this.geometry, bodyMaterial());\n rim.renderOrder = FrameRenderOrder.ZONE_RIM;\n this.group.add(rim);\n this.zoneRims.push(rim);\n }\n this.zoneRims.forEach((rim, index) => {\n const zone = shown[index];\n rim.visible = false;\n if (!zone || !content || !params) return;\n const inset = params[12]! + 1;\n const left = Math.max(zone.left, content.left + inset);\n const top = Math.max(zone.top, content.top + inset);\n const right = Math.min(zone.left + zone.width, content.left + content.width - inset);\n const bottom = Math.min(zone.top + zone.height, content.top + content.height - inset);\n if (right - left <= 0 || bottom - top <= 0) return;\n const emphasis = clamp01(this.zoneEmphasis.get(zone.element)?.value ?? 0);\n const box = { left, top, width: right - left, height: bottom - top };\n const centre = regionCentreInFrameUnits(box, this.viewport);\n rim.visible = true;\n setBody(rim.material, {\n size: [box.width, box.height],\n quad: [box.width + 2, box.height + 2],\n radius: Math.max(0, params[13]! - inset),\n fillFrom: params.slice(0, 3),\n fillTo: params.slice(3, 6),\n fillAlpha: 0,\n rim: params.slice(7, 10),\n rimAlpha: params[11]! * emphasis,\n rimWidth: params[12]!,\n lightDir,\n presence: params[PRESENCE]!,\n });\n rim.scale.set(box.width + 2, box.height + 2, 1);\n rim.position.set(centre.x, centre.y, 0);\n });\n }\n\n /** Point every zone's rim emphasis at its target: 1 for the focused zone of a split, 0 otherwise. Returns whether any target moved. */\n private retargetZoneEmphasis(): boolean {\n const active = this.rimsFocusedZone && Boolean(this.appearance?.hoverResponse) && this.zones.length >= 2 ? this.focusedZone : null;\n this.rimmed = active;\n let changed = false;\n for (const zone of this.zones) {\n const target = zone.element === active ? 1 : 0;\n const state = this.zoneEmphasis.get(zone.element);\n if ((state?.target ?? 0) === target) continue;\n const next = state ?? { value: 0, target: 0, velocity: 0, tween: null, spring: null, lastTick: null };\n next.target = target;\n next.spring = this.appearance?.hoverSpring ?? null;\n next.tween = next.spring ? null : { from: next.value, to: target, start: null, seconds: this.appearance?.hoverSeconds ?? 0, easing: this.appearance?.hoverEasing ?? [0, 0, 1, 1] };\n next.lastTick = null;\n this.zoneEmphasis.set(zone.element, next);\n changed = true;\n }\n return changed;\n }\n\n private createSlab(): SlabMeshes {\n const body = new Mesh(this.geometry, bodyMaterial());\n body.renderOrder = FrameRenderOrder.BODY;\n const shadow = new Mesh(this.geometry, shadowMaterial());\n shadow.renderOrder = FrameRenderOrder.SHADOW;\n this.group.add(shadow, body);\n return { body, shadow };\n }\n}\n\n/** A cubic-Bézier easing evaluated at `x` in 0–1, as CSS `cubic-bezier()` defines it (x → y, solved by Newton then bisection). */\nexport function evaluateEasing([x1, y1, x2, y2]: FrameEasing, x: number): number {\n if (x <= 0) return 0;\n if (x >= 1) return 1;\n const sample = (a: number, b: number, t: number): number => ((1 - 3 * b + 3 * a) * t + (3 * b - 6 * a)) * t * t + 3 * a * t;\n const slope = (a: number, b: number, t: number): number => 3 * (1 - 3 * b + 3 * a) * t * t + 2 * (3 * b - 6 * a) * t + 3 * a;\n let t = x;\n for (let i = 0; i < 8; i += 1) {\n const error = sample(x1, x2, t) - x;\n if (Math.abs(error) < 1e-6) return sample(y1, y2, t);\n const d = slope(x1, x2, t);\n if (Math.abs(d) < 1e-6) break;\n t -= error / d;\n }\n let low = 0;\n let high = 1;\n t = x;\n for (let i = 0; i < 30; i += 1) {\n const value = sample(x1, x2, t);\n if (Math.abs(value - x) < 1e-6) break;\n if (value < x) low = t; else high = t;\n t = (low + high) / 2;\n }\n return sample(y1, y2, t);\n}\n\n/**\n * A tween's progress at `now`.\n *\n * - `eased` is CLAMPED to 0–1. A theme's easing token may overshoot (a y control point above 1 — the engine's own\n * `emphasized` easing does), and an overshooting cross-fade would pass its target: colours outside 0–1, a frost\n * more opaque than the bound was computed for. The frame follows the curve's shape inside the range only.\n * - `done` is decided by ELAPSED TIME, never by the eased value: an overshooting curve reaches 1 early, and ending\n * the tween there would cut the transition short.\n */\nfunction advance<T>(tween: Tween<T>, now: number): { eased: number; done: boolean } {\n if (tween.seconds <= 0) return { eased: 1, done: true };\n if (tween.start === null) tween.start = now;\n const linear = Math.min(1, Math.max(0, (now - tween.start) / (tween.seconds * 1000)));\n return linear >= 1 ? { eased: 1, done: true } : { eased: clamp01(evaluateEasing(tween.easing, linear)), done: false };\n}\n\nfunction stepHover(state: HoverState, now: number): void {\n if (state.tween) {\n const { eased, done } = advance(state.tween, now);\n state.value = state.tween.from + (state.tween.to - state.tween.from) * eased;\n if (done) state.tween = null;\n return;\n }\n if (!state.spring) return;\n const last = state.lastTick ?? now;\n state.lastTick = now;\n let remaining = Math.min(0.25, Math.max(0, (now - last) / 1000));\n const { stiffness, damping, mass } = state.spring;\n while (remaining > 0) {\n const dt = Math.min(SPRING_STEP_SECONDS, remaining);\n const acceleration = (-stiffness * (state.value - state.target) - damping * state.velocity) / mass;\n state.velocity += acceleration * dt;\n state.value += state.velocity * dt;\n remaining -= dt;\n }\n if (Math.abs(state.value - state.target) < SPRING_REST && Math.abs(state.velocity) < SPRING_REST) {\n state.value = state.target;\n state.velocity = 0;\n }\n}\n\nfunction hoverSettled(state: HoverState): boolean {\n if (state.tween) return false;\n return state.value === state.target && state.velocity === 0;\n}\n\nfunction clamp01(value: number): number {\n return Math.min(1, Math.max(0, value));\n}\n\nfunction sameColor(a: FrameColor, b: FrameColor): boolean {\n return a.every((channel, i) => Math.abs(channel - b[i]!) < 1e-9);\n}\n\nfunction slabVector(slab: FrameSlabAppearance): SlabVector {\n return [\n ...slab.fillFrom, ...slab.fillTo, slab.fillAlpha,\n ...slab.rim, slab.rimAlpha, slab.rimHoverAlpha, slab.rimWidthPx, slab.radiusPx,\n slab.shadowOffsetXPx, slab.shadowOffsetYPx, slab.shadowBlurPx, slab.shadowAlpha,\n slab.visible ? 1 : 0,\n ];\n}\n\n/**\n * The numbers to display for an appearance. A null appearance (or an invisible slab) keeps the PREVIOUS colours\n * with presence 0, so a fade-out fades the colours that were on screen instead of flashing to black.\n */\nfunction displayedOf(appearance: FrameAppearance | null, previous: DisplayedFrame | null): DisplayedFrame {\n const regions = {} as Record<ShellRegion, SlabVector>;\n for (const region of Object.values(ShellRegion)) {\n const slab = appearance?.regions[region];\n const prior = previous?.regions[region];\n if (slab?.visible) regions[region] = slabVector(slab);\n else regions[region] = prior ? [...prior.slice(0, PRESENCE), 0] : new Array<number>(SLAB_SIZE).fill(0);\n }\n const background = appearance?.background\n ? [...appearance.background.from, ...appearance.background.to, 1]\n : previous ? [...previous.background.slice(0, 6), 0] : [0, 0, 0, 0, 0, 0, 0];\n return { regions, background, lightAngleDeg: appearance?.lightAngleDeg ?? previous?.lightAngleDeg ?? 0 };\n}\n\n/**\n * The start of a cross-fade: what is on screen, except that anything NOT on screen (presence 0) starts from the\n * TARGET's colours. A slab appearing then fades in as itself — only its presence moves — instead of passing\n * through black, which no contrast bound covers.\n */\nfunction fadeInFrom(shown: DisplayedFrame, target: DisplayedFrame): DisplayedFrame {\n const regions = {} as Record<ShellRegion, SlabVector>;\n for (const region of Object.values(ShellRegion)) {\n const current = shown.regions[region];\n regions[region] = current[PRESENCE]! > 0 ? current : [...target.regions[region].slice(0, PRESENCE), 0];\n }\n const background = shown.background[6]! > 0 ? shown.background : [...target.background.slice(0, 6), 0];\n return { regions, background, lightAngleDeg: shown.lightAngleDeg };\n}\n\nfunction interpolateFrame(from: DisplayedFrame, to: DisplayedFrame, t: number): DisplayedFrame {\n const lerp = (a: number[], b: number[]): number[] => a.map((value, i) => value + (b[i]! - value) * t);\n const regions = {} as Record<ShellRegion, SlabVector>;\n for (const region of Object.values(ShellRegion)) regions[region] = lerp(from.regions[region], to.regions[region]);\n return { regions, background: lerp(from.background, to.background), lightAngleDeg: from.lightAngleDeg + (to.lightAngleDeg - from.lightAngleDeg) * t };\n}\n\nfunction bodyMaterial(): ShaderMaterial {\n return new ShaderMaterial({\n vertexShader: FRAME_VERTEX_SHADER,\n fragmentShader: FRAME_BODY_FRAGMENT_SHADER,\n transparent: true,\n depthTest: false,\n depthWrite: false,\n toneMapped: false,\n uniforms: {\n uSize: { value: new Vector2() },\n uQuad: { value: new Vector2() },\n uRadius: { value: 0 },\n uFillFrom: { value: new Vector3() },\n uFillTo: { value: new Vector3() },\n uFillAlpha: { value: 0 },\n uRim: { value: new Vector3() },\n uRimAlpha: { value: 0 },\n uRimWidth: { value: 0 },\n uLightDir: { value: new Vector2(0, 1) },\n uPresence: { value: 0 },\n },\n });\n}\n\n/** The shadow writes an opaque, darkened background with MIN blending: overlapping shadows never stack. */\nfunction shadowMaterial(): ShaderMaterial {\n return new ShaderMaterial({\n vertexShader: FRAME_VERTEX_SHADER,\n fragmentShader: FRAME_SHADOW_FRAGMENT_SHADER,\n transparent: true,\n depthTest: false,\n depthWrite: false,\n toneMapped: false,\n blending: CustomBlending,\n blendEquation: MinEquation,\n uniforms: {\n uSize: { value: new Vector2() },\n uQuad: { value: new Vector2() },\n uRadius: { value: 0 },\n uBlur: { value: 0 },\n uAlpha: { value: 0 },\n uPresence: { value: 0 },\n uBgFrom: { value: new Vector3() },\n uBgTo: { value: new Vector3() },\n uBgSize: { value: new Vector2() },\n uLightDir: { value: new Vector2(0, 1) },\n },\n });\n}\n\nfunction setBody(\n material: ShaderMaterial,\n values: {\n size: [number, number];\n quad: [number, number];\n radius: number;\n fillFrom: number[];\n fillTo: number[];\n fillAlpha: number;\n rim: number[];\n rimAlpha: number;\n rimWidth: number;\n lightDir: Vector2;\n presence: number;\n },\n): void {\n const u = material.uniforms;\n (u.uSize!.value as Vector2).set(...values.size);\n (u.uQuad!.value as Vector2).set(...values.quad);\n u.uRadius!.value = values.radius;\n (u.uFillFrom!.value as Vector3).set(values.fillFrom[0]!, values.fillFrom[1]!, values.fillFrom[2]!);\n (u.uFillTo!.value as Vector3).set(values.fillTo[0]!, values.fillTo[1]!, values.fillTo[2]!);\n u.uFillAlpha!.value = values.fillAlpha;\n (u.uRim!.value as Vector3).set(values.rim[0]!, values.rim[1]!, values.rim[2]!);\n u.uRimAlpha!.value = values.rimAlpha;\n u.uRimWidth!.value = values.rimWidth;\n (u.uLightDir!.value as Vector2).copy(values.lightDir);\n u.uPresence!.value = values.presence;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-shaders.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"frame-shaders.d.ts","sourceRoot":"","sources":["../../../src/frame/frame-shaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH,eAAO,MAAM,mBAAmB,8MAQ/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,6lCA4BtC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,+5BAwBxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-shaders.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"frame-shaders.js","sourceRoot":"","sources":["../../../src/frame/frame-shaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,YAAY,GAAG,UAAU,CAAC;;;;;;CAM/B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC;;;;;;;;CAQ7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,UAAU,CAAC;EACnD,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Bb,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CAAC;EACrD,YAAY;;;;;;;;;;;;;;;;;;;;;;;CAuBb,CAAC","sourcesContent":["/**\n * The frame's two shaders (#1823). Both are UNLIT and write their colours as given: the colours arrive already\n * sRGB-encoded, and neither shader includes three.js' colour-space or tone-mapping chunks. So the pixel on screen\n * is exactly the colour the appearance derivation computed, which is what lets the contrast bound computed there\n * be the contrast on screen. A lit material would move every colour after the bound was checked.\n *\n * Geometry is one unit quad per mesh, scaled in CSS pixels by an orthographic camera matched 1:1 to the canvas.\n * The rounded rectangle is a signed distance field in pixels, so an edge is antialiased over one CSS pixel and\n * sits within half a pixel of the region's box.\n */\n\nconst SD_ROUND_BOX = /* glsl */ `\nfloat sdRoundBox(vec2 p, vec2 halfSize, float radius) {\n float r = min(radius, min(halfSize.x, halfSize.y));\n vec2 q = abs(p) - halfSize + r;\n return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - r;\n}\n`;\n\nexport const FRAME_VERTEX_SHADER = /* glsl */ `\nvarying vec2 vUv;\nvarying vec2 vWorld;\nvoid main() {\n vUv = uv;\n vWorld = (modelMatrix * vec4(position, 1.0)).xy;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n`;\n\n/**\n * A slab body (and the in-scene background, which is a body with no radius, no rim and full opacity): a\n * gradient frost along the light direction, with a rim band inside its edge. The rim is composited over the\n * frost in the shader so the pair blends onto what is beneath as ONE layer, exactly as the derivation assumed.\n */\nexport const FRAME_BODY_FRAGMENT_SHADER = /* glsl */ `\n${SD_ROUND_BOX}\nuniform vec2 uSize;\nuniform vec2 uQuad;\nuniform float uRadius;\nuniform vec3 uFillFrom;\nuniform vec3 uFillTo;\nuniform float uFillAlpha;\nuniform vec3 uRim;\nuniform float uRimAlpha;\nuniform float uRimWidth;\nuniform vec2 uLightDir;\nuniform float uPresence;\nvarying vec2 vUv;\nvoid main() {\n vec2 p = (vUv - 0.5) * uQuad;\n float d = sdRoundBox(p, uSize * 0.5, uRadius);\n float coverage = clamp(0.5 - d, 0.0, 1.0);\n if (coverage <= 0.0) discard;\n float t = clamp(0.5 + dot(p / max(uSize, vec2(1.0)), uLightDir), 0.0, 1.0);\n vec3 fill = mix(uFillFrom, uFillTo, t);\n float rimMask = uRimWidth > 0.0 ? clamp(uRimWidth + d + 0.5, 0.0, 1.0) : 0.0;\n float ra = uRimAlpha * rimMask;\n float fa = uFillAlpha;\n float a = 1.0 - (1.0 - fa) * (1.0 - ra);\n vec3 c = a > 0.0 ? (uRim * ra + fill * fa * (1.0 - ra)) / a : fill;\n gl_FragColor = vec4(c, a * coverage * uPresence);\n}\n`;\n\n/**\n * A slab's shadow, drawn after the background and before every body (so no shadow lands on a slab above it).\n *\n * Shadows must never STACK: where several overlap (a corner where three regions meet), stacked shadows would be\n * darker than the one shadow the contrast bound was computed for. So a shadow does not blend as a translucent\n * black layer. It computes the scene background at its own pixel — the same gradient the background quad drew —\n * darkens it, writes it OPAQUE, and is drawn with MIN blending: the framebuffer keeps the darker of what is there\n * and what the shadow writes. Overlapping shadows therefore combine by their MAXIMUM opacity, exactly one shadow\n * deep, with no extra render target. Over a pixel where no background was drawn (framebuffer cleared to zero) the\n * minimum is zero, so a shadow never appears there.\n */\nexport const FRAME_SHADOW_FRAGMENT_SHADER = /* glsl */ `\n${SD_ROUND_BOX}\nuniform vec2 uSize;\nuniform vec2 uQuad;\nuniform float uRadius;\nuniform float uBlur;\nuniform float uAlpha;\nuniform float uPresence;\nuniform vec3 uBgFrom;\nuniform vec3 uBgTo;\nuniform vec2 uBgSize;\nuniform vec2 uLightDir;\nvarying vec2 vUv;\nvarying vec2 vWorld;\nvoid main() {\n vec2 p = (vUv - 0.5) * uQuad;\n float d = sdRoundBox(p, uSize * 0.5, uRadius);\n float a = uBlur > 0.0 ? 1.0 - smoothstep(-uBlur * 0.5, uBlur, d) : clamp(0.5 - d, 0.0, 1.0);\n a *= uAlpha * uPresence;\n if (a <= 0.0) discard;\n float t = clamp(0.5 + dot(vWorld / max(uBgSize, vec2(1.0)), uLightDir), 0.0, 1.0);\n vec3 background = mix(uBgFrom, uBgTo, t);\n gl_FragColor = vec4(background * (1.0 - a), 1.0);\n}\n`;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-frame-appearance.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"use-frame-appearance.d.ts","sourceRoot":"","sources":["../../../src/frame/use-frame-appearance.ts"],"names":[],"mappings":"AAKA,OAAO,EAA4B,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAClH,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGjF;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,qBAAqB,GAAG,SAAS,GAAG,eAAe,GAAG,IAAI,CAoBrI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-frame-appearance.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"use-frame-appearance.js","sourceRoot":"","sources":["../../../src/frame/use-frame-appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtG,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEpD,OAAO,EAAE,wBAAwB,EAAwD,MAAM,kBAAkB,CAAC;AAClH,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEjF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAA4B,EAAE,SAA4C;IAC3G,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,WAAW,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAC;IAC7F,MAAM,WAAW,GAAG,wBAAwB,EAAE,CAAC;IAC/C,MAAM,kBAAkB,GAAG,kBAAkB,EAAE,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACtF,0GAA0G;IAC1G,iEAAiE;IACjE,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC;IACpH,MAAM,wBAAwB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAgD,IAAI,SAAS,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IACjJ,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,qBAAqB,CAAC;QAC1B,WAAW;QACX,KAAK,EAAE,wBAAwB,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,EAAE,SAAS,CAAC;QACnE,kBAAkB;QAClB,wBAAwB;QACxB,MAAM;QACN,oBAAoB;QACpB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;KAC1C,CAAC,EACF,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAC9H,CAAC;AACJ,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport { MaterialProfileRole, SurfaceVariant, UIBehavior } from '@wildo-ai/presets-components-models';\nimport { useUI } from '@wildo-ai/saas-frontend-lib';\n\nimport { resolveFrame3DThemeStyle, type Frame3DStyleCatalog, type Frame3DStyleOverrides } from './frame-3d-style';\nimport { deriveFrameAppearance, type FrameAppearance } from './frame-appearance';\nimport { useDesignTokenResolution } from '../tokens/use-design-token-resolution';\n\n/**\n * The frame's appearance for the active theme and mode, computed in the DOM tree (#1823).\n *\n * This is the frame's only reader of the theme: the tokens (through the resolver, #1819), the navigation\n * material, the gesture spring of the SUNKEN surface recipe (the recipe the shell regions render with), `isDark`,\n * `prefersReducedMotion` and the theme id that picks the frame style. The recipe's Tailwind classes are NOT read:\n * they stay DOM, inside the regions. The canvas behind the\n * lazy door receives the result as props and reads nothing itself, so a theme, mode or breakpoint change is a\n * prop change on the canvas — never a remount of anything, and never of the 2D shell beside it.\n *\n * `devicePixelRatio` is read when the appearance is derived; it only converts a glass material's device-pixel\n * rim width, so a browser zoom that changes it takes effect at the next theme or mode change.\n */\nexport function useFrameAppearance(catalog: Frame3DStyleCatalog, overrides: Frame3DStyleOverrides | undefined): FrameAppearance | null {\n const { isDark, prefersReducedMotion, designTheme, getMaterialProfile, getRecipe } = useUI();\n const resolutions = useDesignTokenResolution();\n const navigationMaterial = getMaterialProfile?.(MaterialProfileRole.GLASS_NAVIGATION);\n // Keyed by VALUE: a recipe may be re-composed on each call, and an identity change must not re-derive the\n // appearance (a new appearance restarts the canvas' cross-fade).\n const gestureKey = JSON.stringify(getRecipe(UIBehavior.SURFACE, SurfaceVariant.SUNKEN).gesture?.transition ?? null);\n const surfaceGestureTransition = useMemo(() => JSON.parse(gestureKey) as Record<string, string | number> | undefined ?? undefined, [gestureKey]);\n return useMemo(\n () => deriveFrameAppearance({\n resolutions,\n style: resolveFrame3DThemeStyle(catalog, designTheme.id, overrides),\n navigationMaterial,\n surfaceGestureTransition,\n isDark,\n prefersReducedMotion,\n devicePixelRatio: window.devicePixelRatio,\n }),\n [resolutions, catalog, designTheme.id, overrides, navigationMaterial, surfaceGestureTransition, isDark, prefersReducedMotion],\n );\n}\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -11,4 +11,5 @@ export * from './layout/layout-3d-vocabulary';
|
|
|
11
11
|
export * from './layout/layout-3d-definition';
|
|
12
12
|
export * from './layout/layout-3d-transition-choreography';
|
|
13
13
|
export * from './layout/header-first-shell-container';
|
|
14
|
+
export * from './focal-plane/focal-plane-settings';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -11,4 +11,5 @@ export * from './layout/layout-3d-vocabulary.js';
|
|
|
11
11
|
export * from './layout/layout-3d-definition.js';
|
|
12
12
|
export * from './layout/layout-3d-transition-choreography.js';
|
|
13
13
|
export * from './layout/header-first-shell-container.js';
|
|
14
|
+
export * from './focal-plane/focal-plane-settings.js';
|
|
14
15
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './register-3d-layout';\nexport * from './layout-3d-main-container';\nexport * from './shell-region-measurement';\nexport * from './frame/frame-3d-style';\nexport * from './frame/frame-appearance';\nexport * from './frame/use-frame-appearance';\nexport * from './tokens/design-token-resolution';\nexport * from './tokens/use-design-token-resolution';\nexport * from './layout/shell-layout-placement';\nexport * from './layout/layout-3d-vocabulary';\nexport * from './layout/layout-3d-definition';\nexport * from './layout/layout-3d-transition-choreography';\nexport * from './layout/header-first-shell-container';\nexport * from './focal-plane/focal-plane-settings';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-first-shell-container.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"header-first-shell-container.d.ts","sourceRoot":"","sources":["../../../src/layout/header-first-shell-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAYL,KAAK,0CAA0C,EAChD,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CAAC,EAAE,QAAQ,EAAE,EAAE,0CAA0C,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoCrH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-first-shell-container.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"header-first-shell-container.js","sourceRoot":"","sources":["../../../src/layout/header-first-shell-container.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC3I,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,2CAA2C,EAC3C,OAAO,EACP,EAAE,EACF,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,GAEN,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,yBAAyB,CAAC,EAAE,QAAQ,EAA8C;IAChG,MAAM,UAAU,GAAG,iBAAiB,EAAE,CAAC;IACvC,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,EAAE,CAAC;IACpC,MA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C,GAAG,GAAI,EACzF,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,SAAS,EAAE,mBAAmB,CAAC,GAAG,GAAI,IAC3F,EAEN,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,GAAI,EAE7F,KAAC,sBAAsB,KAAG,IACtB,GACE,GACQ,CACrB,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { HorizontalPlacement, ShellAppearance, ShellRegion, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';\nimport {\n AppShellContentOutlet,\n AppShellLoadingState,\n AppShellOverlaysOutlet,\n AppShellProviders,\n AppShellRegionOutlet,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n cn,\n useAppShellFirstReady,\n useAppShellLayout,\n useUI,\n type AppLayoutPreset_MainContainer_DefaultProps,\n} from '@wildo-ai/saas-frontend-lib';\n\n/**\n * The HEADER_FIRST disposal (#1843): the status bars and the menubar span the whole width, and the navigation\n * rails — activity bar, sidebar, utility panel — sit between them, beside the toolbar and the content.\n *\n * ```\n * ┌────────────── status bar (top) ───────────────┐\n * ├────────────────── menubar ────────────────────┤\n * │ act │ side │ util │ toolbar │ side │ util │\n * │ bar │ bar │ │ content │ (end)│ (end)│\n * ├────────────── status bar (bottom) ────────────┤\n * ```\n *\n * The same regions, the same components, the same contexts as the default (sidebar-first) disposal — only the\n * arrangement differs. It is composed from the shell building blocks exactly as the default container is, and\n * keeps its rules: `AppShellProviders` once around everything, every region placed, the content outlet once,\n * and a `relative` root (not `isolate`: see the default container and #1830). The regions tile the viewport, as\n * the shell baseline requires.\n */\nexport function HeaderFirstShellContainer({ children }: AppLayoutPreset_MainContainer_DefaultProps): React.JSX.Element {\n const layoutInfo = useAppShellLayout();\n const { shellAppearance } = useUI();\n const isContinuousShell = shellAppearance === ShellAppearance.CONTINUOUS;\n const hasLayoutBeenReady = useAppShellFirstReady(layoutInfo.isLayoutReady);\n\n if (!layoutInfo.isLayoutReady && !hasLayoutBeenReady) return <AppShellLoadingState />;\n\n return (\n <AppShellProviders layout={layoutInfo}>\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div className={cn('relative h-screen w-screen flex flex-col overflow-hidden', isContinuousShell ? 'bg-transparent' : 'bg-background')}>\n <AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.TOP} />\n <AppShellRegionOutlet region={ShellRegion.MENUBAR} />\n\n <div className=\"flex-1 flex min-w-0 min-h-0\">\n <AppShellRegionOutlet region={ShellRegion.ACTIVITY_BAR} />\n <AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.START} />\n <AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.START} />\n\n <div className=\"flex-1 flex flex-col min-w-0 min-h-0\">\n <AppShellRegionOutlet region={ShellRegion.TOOLBAR} />\n <AppShellContentOutlet className=\"flex-1 relative min-w-0 min-h-0\">{children}</AppShellContentOutlet>\n </div>\n\n <AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.END} />\n <AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.END} />\n </div>\n\n <AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.BOTTOM} />\n\n <AppShellOverlaysOutlet />\n </div>\n </Surface>\n </AppShellProviders>\n );\n}\n"]}
|
|
@@ -34,14 +34,13 @@ export declare const INHERIT_LAYOUT_3D: Layout3DDefinition;
|
|
|
34
34
|
* and returns; when the sidebar collapses or expands, the content slab lifts and settles.
|
|
35
35
|
*/
|
|
36
36
|
export declare const HEADER_FIRST_LAYOUT_3D: Layout3DDefinition;
|
|
37
|
-
/** @wildo_source:part:end presets.3d.layout-contract */
|
|
38
37
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* seen and judged in the running application before it is designed into a production layout.
|
|
38
|
+
* The focal plane (#2049): the shell regions, each navigation pane and each popup are glass objects in depth under one
|
|
39
|
+
* still camera. Whatever you work with rests on the focal plane; the rest steps back. No WebGL frame: the depth is in
|
|
40
|
+
* the HTML objects themselves, so the frame styles and frame transitions below are not drawn.
|
|
43
41
|
*/
|
|
44
|
-
export declare const
|
|
42
|
+
export declare const FOCAL_PLANE_LAYOUT_3D: Layout3DDefinition;
|
|
43
|
+
/** @wildo_source:part:end presets.3d.layout-contract */
|
|
45
44
|
/** Every built-in layout, keyed by its id: total over {@link Layout3DId}, so a new member must ship a layout. */
|
|
46
45
|
export declare const BUILT_IN_LAYOUTS_3D: Record<Layout3DId, Layout3DDefinition>;
|
|
47
46
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-3d-definition.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"layout-3d-definition.d.ts","sourceRoot":"","sources":["../../../src/layout/layout-3d-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAmD,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAGpH,OAAO,EAA4B,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAE/F,OAAO,EAEL,cAAc,EACd,UAAU,EAEV,gBAAgB,EAEhB,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAEhC,mIAAmI;AACnI;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,4FAA4F;IAC5F,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,oBAAoB,CAAC;IAChC,KAAK,EAAE;QACL,MAAM,EAAE,cAAc,CAAC;QACvB,+FAA+F;QAC/F,WAAW,EAAE,mBAAmB,CAAC;KAClC,CAAC;IACF,qGAAqG;IACrG,WAAW,EAAE,mBAAmB,CAAC;IACjC,WAAW,EAAE;QACX,uHAAuH;QACvH,uBAAuB,EAAE,eAAe,GAAG,IAAI,CAAC;QAChD,QAAQ,EAAE,gBAAgB,CAAC;KAC5B,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,kBAW/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,kBAWpC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,kBAWnC,CAAC;AACF,wDAAwD;AAExD,iHAAiH;AACjH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,kBAAkB,CAItE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAkCxE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ShellAppearance } from '@wildo-ai/presets-components-models';
|
|
2
2
|
import { HEADER_FIRST_FRAME_STYLES, INHERIT_FRAME_STYLES } from '../frame/frame-3d-style.js';
|
|
3
3
|
import { HeaderFirstShellContainer } from './header-first-shell-container.js';
|
|
4
|
-
import {
|
|
4
|
+
import { FocalPlaneShellContainer } from '../focal-plane/focal-plane-shell-container.js';
|
|
5
5
|
import { ShellLayoutPlacementKind } from './shell-layout-placement.js';
|
|
6
6
|
import { crossFadesAppearance, frameChoreography, rimsFocusedZone } from './layout-3d-transition-choreography.js';
|
|
7
7
|
import { Layout3DAppearanceTransition, Layout3DCamera, Layout3DId, Layout3DFrameChoreography, Layout3DRestPose, Layout3DZoneFocusTransition, } from './layout-3d-vocabulary.js';
|
|
@@ -37,17 +37,15 @@ export const HEADER_FIRST_LAYOUT_3D = {
|
|
|
37
37
|
},
|
|
38
38
|
constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },
|
|
39
39
|
};
|
|
40
|
-
/** @wildo_source:part:end presets.3d.layout-contract */
|
|
41
40
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* seen and judged in the running application before it is designed into a production layout.
|
|
41
|
+
* The focal plane (#2049): the shell regions, each navigation pane and each popup are glass objects in depth under one
|
|
42
|
+
* still camera. Whatever you work with rests on the focal plane; the rest steps back. No WebGL frame: the depth is in
|
|
43
|
+
* the HTML objects themselves, so the frame styles and frame transitions below are not drawn.
|
|
46
44
|
*/
|
|
47
|
-
export const
|
|
48
|
-
id:
|
|
49
|
-
placement: { kind: ShellLayoutPlacementKind.COMPOSED, container:
|
|
50
|
-
scene: { camera: Layout3DCamera.
|
|
45
|
+
export const FOCAL_PLANE_LAYOUT_3D = {
|
|
46
|
+
id: Layout3DId.FOCAL_PLANE,
|
|
47
|
+
placement: { kind: ShellLayoutPlacementKind.COMPOSED, container: FocalPlaneShellContainer },
|
|
48
|
+
scene: { camera: Layout3DCamera.STILL_PERSPECTIVE, frameStyles: INHERIT_FRAME_STYLES },
|
|
51
49
|
transitions: {
|
|
52
50
|
appearance: Layout3DAppearanceTransition.CROSS_FADE,
|
|
53
51
|
navigation: Layout3DFrameChoreography.NONE,
|
|
@@ -56,10 +54,12 @@ export const SPATIAL_PROTOTYPE_LAYOUT_3D = {
|
|
|
56
54
|
},
|
|
57
55
|
constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },
|
|
58
56
|
};
|
|
57
|
+
/** @wildo_source:part:end presets.3d.layout-contract */
|
|
59
58
|
/** Every built-in layout, keyed by its id: total over {@link Layout3DId}, so a new member must ship a layout. */
|
|
60
59
|
export const BUILT_IN_LAYOUTS_3D = {
|
|
61
60
|
[Layout3DId.INHERIT]: INHERIT_LAYOUT_3D,
|
|
62
61
|
[Layout3DId.HEADER_FIRST]: HEADER_FIRST_LAYOUT_3D,
|
|
62
|
+
[Layout3DId.FOCAL_PLANE]: FOCAL_PLANE_LAYOUT_3D,
|
|
63
63
|
};
|
|
64
64
|
/**
|
|
65
65
|
* Refuses a layout the renderer cannot draw as declared: a camera, a transition or a rest pose it does not
|
|
@@ -72,11 +72,10 @@ export function assertSupportedLayout3D(layout) {
|
|
|
72
72
|
switch (camera) {
|
|
73
73
|
case Layout3DCamera.FLAT_ORTHOGRAPHIC:
|
|
74
74
|
break;
|
|
75
|
-
case Layout3DCamera.
|
|
76
|
-
//
|
|
77
|
-
// container cannot.
|
|
75
|
+
case Layout3DCamera.STILL_PERSPECTIVE:
|
|
76
|
+
// The captured flat container stages nothing in depth; only a composed placement that does can use this camera.
|
|
78
77
|
if (layout.placement.kind !== ShellLayoutPlacementKind.COMPOSED) {
|
|
79
|
-
throw new Error(`3D layout '${layout.id}': the
|
|
78
|
+
throw new Error(`3D layout '${layout.id}': the still-perspective camera needs a composed placement that stages the shell in depth.`);
|
|
80
79
|
}
|
|
81
80
|
break;
|
|
82
81
|
default: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-3d-definition.js","sourceRoot":"","sources":["../../../../src/layout/layout-3d-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAA4B,MAAM,yBAAyB,CAAC;AACpH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAA6B,MAAM,0BAA0B,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EACL,4BAA4B,EAC5B,cAAc,EACd,UAAU,EACV,yBAAyB,EACzB,gBAAgB,EAChB,2BAA2B,GAE5B,MAAM,wBAAwB,CAAC;AAyBhC;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAuB;IACnD,EAAE,EAAE,UAA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pD,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACjD,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;IACpD,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC;IACzC,QAAQ,IAAI,EAAE,CAAC;QACb,oEAAoE;QACpE,KAAK,gBAAgB,CAAC,IAAI;YACxB,MAAM;QACR,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,IAAI,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,cAAc,MAAM,CAAC,EAAE,qBAAqB,MAAM,CAAC,WAAW,CAAC,0EAA0E,CAAC,CAAC;QAC7J,CAAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,wBAAwB,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,wBAAwB,CAAC,QAAQ,EAAE,CAAC;QAC9H,MAAM,IAAI,KAAK,CAAC,cAAc,MAAM,CAAC,EAAE,8BAA8B,MAAM,CAAE,MAAM,CAAC,SAA+B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjI,CAAC;AACH,CAAC","sourcesContent":["import { ShellAppearance } from '@wildo-ai/presets-components-models';\n\nimport { HEADER_FIRST_FRAME_STYLES, INHERIT_FRAME_STYLES, type Frame3DStyleCatalog } from '../frame/frame-3d-style';\nimport { HeaderFirstShellContainer } from './header-first-shell-container';\nimport { SpatialShellContainer } from '../spatial/spatial-shell-container';\nimport { ShellLayoutPlacementKind, type ShellLayoutPlacement } from './shell-layout-placement';\nimport { crossFadesAppearance, frameChoreography, rimsFocusedZone } from './layout-3d-transition-choreography';\nimport {\n Layout3DAppearanceTransition,\n Layout3DCamera,\n Layout3DId,\n Layout3DFrameChoreography,\n Layout3DRestPose,\n Layout3DZoneFocusTransition,\n type Layout3DTransitions,\n} from './layout-3d-vocabulary';\n\n/** @wildo_source:part:start presets.3d.layout-contract facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * A 3D layout: where the regions go (`placement`, 3D-free), and what the frame draws around them (`scene`,\n * `transitions`), under `constraints`.\n */\nexport interface Layout3DDefinition {\n /** A {@link Layout3DId} for a built-in layout; an application's own layout names itself. */\n id: string;\n placement: ShellLayoutPlacement;\n scene: {\n camera: Layout3DCamera;\n /** The frame styles, per theme, with a fallback for any theme id the catalog does not name. */\n frameStyles: Frame3DStyleCatalog;\n };\n /** What the frame plays on an appearance change, a navigation, a sidebar resize and a zone focus. */\n transitions: Layout3DTransitions;\n constraints: {\n /** The shell appearance the layout is designed for; any other is reported once (a console warning), never switched. */\n requiredShellAppearance: ShellAppearance | null;\n restPose: Layout3DRestPose;\n };\n}\n\n/**\n * The 2D disposal, unchanged, with the frame under it. On navigation the content slab lifts and settles; when\n * the sidebar collapses or expands, the light swings across and back.\n */\nexport const INHERIT_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.INHERIT,\n placement: { kind: ShellLayoutPlacementKind.INHERIT },\n scene: { camera: Layout3DCamera.FLAT_ORTHOGRAPHIC, frameStyles: INHERIT_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.ELEVATION_SETTLE,\n sidebarResize: Layout3DFrameChoreography.LIGHT_SWEEP,\n zoneFocus: Layout3DZoneFocusTransition.RIM,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n\n/**\n * The header-first disposal, with the frame lit from the header down. On navigation the light swings from the header\n * and returns; when the sidebar collapses or expands, the content slab lifts and settles.\n */\nexport const HEADER_FIRST_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.HEADER_FIRST,\n placement: { kind: ShellLayoutPlacementKind.COMPOSED, container: HeaderFirstShellContainer },\n scene: { camera: Layout3DCamera.FLAT_ORTHOGRAPHIC, frameStyles: HEADER_FIRST_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.LIGHT_SWEEP,\n sidebarResize: Layout3DFrameChoreography.ELEVATION_SETTLE,\n zoneFocus: Layout3DZoneFocusTransition.RIM,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n/** @wildo_source:part:end presets.3d.layout-contract */\n\n/**\n * PROTOTYPE (Paul, 2026-09-30): the shell's panels in space, seen through a moving perspective camera — clean spatial,\n * content facing the camera, side columns angled, the camera gliding on arrival, navigation, pane focus and sidebar\n * resize. Not a built-in yet (its id is its own, and it is absent from {@link BUILT_IN_LAYOUTS_3D}): it is here to be\n * seen and judged in the running application before it is designed into a production layout.\n */\nexport const SPATIAL_PROTOTYPE_LAYOUT_3D: Layout3DDefinition = {\n id: 'spatial-prototype',\n placement: { kind: ShellLayoutPlacementKind.COMPOSED, container: SpatialShellContainer },\n scene: { camera: Layout3DCamera.SPATIAL_PERSPECTIVE, frameStyles: INHERIT_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.NONE,\n sidebarResize: Layout3DFrameChoreography.NONE,\n zoneFocus: Layout3DZoneFocusTransition.NONE,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n\n/** Every built-in layout, keyed by its id: total over {@link Layout3DId}, so a new member must ship a layout. */\nexport const BUILT_IN_LAYOUTS_3D: Record<Layout3DId, Layout3DDefinition> = {\n [Layout3DId.INHERIT]: INHERIT_LAYOUT_3D,\n [Layout3DId.HEADER_FIRST]: HEADER_FIRST_LAYOUT_3D,\n};\n\n/**\n * Refuses a layout the renderer cannot draw as declared: a camera, a transition or a rest pose it does not\n * implement. Exhaustive switches, so a member added to one of those vocabularies fails to compile here until the\n * renderer supports it — and a value that reaches it at runtime anyway (an application's own layout, built without\n * the types) is refused instead of being silently drawn as something else.\n */\nexport function assertSupportedLayout3D(layout: Layout3DDefinition): void {\n const camera = layout.scene.camera;\n switch (camera) {\n case Layout3DCamera.FLAT_ORTHOGRAPHIC:\n break;\n case Layout3DCamera.SPATIAL_PERSPECTIVE:\n // Only a placement that builds the CSS 3D stage can be seen through the spatial camera; the captured flat\n // container cannot.\n if (layout.placement.kind !== ShellLayoutPlacementKind.COMPOSED) {\n throw new Error(`3D layout '${layout.id}': the spatial camera needs a composed placement that builds the spatial stage.`);\n }\n break;\n default: {\n const unsupported: never = camera;\n throw new Error(`3D layout '${layout.id}': the frame has no camera '${String(unsupported)}'.`);\n }\n }\n // Each throws on a member the frame does not play (a value built without the types).\n crossFadesAppearance(layout.transitions.appearance);\n frameChoreography(layout.transitions.navigation);\n frameChoreography(layout.transitions.sidebarResize);\n rimsFocusedZone(layout.transitions.zoneFocus);\n const pose = layout.constraints.restPose;\n switch (pose) {\n // FLAT is what the container renders: the placement, untransformed.\n case Layout3DRestPose.FLAT:\n break;\n default: {\n const unsupported: never = pose;\n throw new Error(`3D layout '${layout.id}': the rest pose '${String(unsupported)}' is not supported (only FLAT exists: no region is transformed at rest).`);\n }\n }\n if (layout.placement.kind !== ShellLayoutPlacementKind.INHERIT && layout.placement.kind !== ShellLayoutPlacementKind.COMPOSED) {\n throw new Error(`3D layout '${layout.id}': unknown placement kind '${String((layout.placement as { kind: unknown }).kind)}'.`);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"layout-3d-definition.js","sourceRoot":"","sources":["../../../src/layout/layout-3d-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAA4B,MAAM,yBAAyB,CAAC;AACpH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,wBA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sourcesContent":["import { ShellAppearance } from '@wildo-ai/presets-components-models';\n\nimport { HEADER_FIRST_FRAME_STYLES, INHERIT_FRAME_STYLES, type Frame3DStyleCatalog } from '../frame/frame-3d-style';\nimport { HeaderFirstShellContainer } from './header-first-shell-container';\nimport { FocalPlaneShellContainer } from '../focal-plane/focal-plane-shell-container';\nimport { ShellLayoutPlacementKind, type ShellLayoutPlacement } from './shell-layout-placement';\nimport { crossFadesAppearance, frameChoreography, rimsFocusedZone } from './layout-3d-transition-choreography';\nimport {\n Layout3DAppearanceTransition,\n Layout3DCamera,\n Layout3DId,\n Layout3DFrameChoreography,\n Layout3DRestPose,\n Layout3DZoneFocusTransition,\n type Layout3DTransitions,\n} from './layout-3d-vocabulary';\n\n/** @wildo_source:part:start presets.3d.layout-contract facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * A 3D layout: where the regions go (`placement`, 3D-free), and what the frame draws around them (`scene`,\n * `transitions`), under `constraints`.\n */\nexport interface Layout3DDefinition {\n /** A {@link Layout3DId} for a built-in layout; an application's own layout names itself. */\n id: string;\n placement: ShellLayoutPlacement;\n scene: {\n camera: Layout3DCamera;\n /** The frame styles, per theme, with a fallback for any theme id the catalog does not name. */\n frameStyles: Frame3DStyleCatalog;\n };\n /** What the frame plays on an appearance change, a navigation, a sidebar resize and a zone focus. */\n transitions: Layout3DTransitions;\n constraints: {\n /** The shell appearance the layout is designed for; any other is reported once (a console warning), never switched. */\n requiredShellAppearance: ShellAppearance | null;\n restPose: Layout3DRestPose;\n };\n}\n\n/**\n * The 2D disposal, unchanged, with the frame under it. On navigation the content slab lifts and settles; when\n * the sidebar collapses or expands, the light swings across and back.\n */\nexport const INHERIT_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.INHERIT,\n placement: { kind: ShellLayoutPlacementKind.INHERIT },\n scene: { camera: Layout3DCamera.FLAT_ORTHOGRAPHIC, frameStyles: INHERIT_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.ELEVATION_SETTLE,\n sidebarResize: Layout3DFrameChoreography.LIGHT_SWEEP,\n zoneFocus: Layout3DZoneFocusTransition.RIM,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n\n/**\n * The header-first disposal, with the frame lit from the header down. On navigation the light swings from the header\n * and returns; when the sidebar collapses or expands, the content slab lifts and settles.\n */\nexport const HEADER_FIRST_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.HEADER_FIRST,\n placement: { kind: ShellLayoutPlacementKind.COMPOSED, container: HeaderFirstShellContainer },\n scene: { camera: Layout3DCamera.FLAT_ORTHOGRAPHIC, frameStyles: HEADER_FIRST_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.LIGHT_SWEEP,\n sidebarResize: Layout3DFrameChoreography.ELEVATION_SETTLE,\n zoneFocus: Layout3DZoneFocusTransition.RIM,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n/**\n * The focal plane (#2049): the shell regions, each navigation pane and each popup are glass objects in depth under one\n * still camera. Whatever you work with rests on the focal plane; the rest steps back. No WebGL frame: the depth is in\n * the HTML objects themselves, so the frame styles and frame transitions below are not drawn.\n */\nexport const FOCAL_PLANE_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.FOCAL_PLANE,\n placement: { kind: ShellLayoutPlacementKind.COMPOSED, container: FocalPlaneShellContainer },\n scene: { camera: Layout3DCamera.STILL_PERSPECTIVE, frameStyles: INHERIT_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.NONE,\n sidebarResize: Layout3DFrameChoreography.NONE,\n zoneFocus: Layout3DZoneFocusTransition.NONE,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n/** @wildo_source:part:end presets.3d.layout-contract */\n\n/** Every built-in layout, keyed by its id: total over {@link Layout3DId}, so a new member must ship a layout. */\nexport const BUILT_IN_LAYOUTS_3D: Record<Layout3DId, Layout3DDefinition> = {\n [Layout3DId.INHERIT]: INHERIT_LAYOUT_3D,\n [Layout3DId.HEADER_FIRST]: HEADER_FIRST_LAYOUT_3D,\n [Layout3DId.FOCAL_PLANE]: FOCAL_PLANE_LAYOUT_3D,\n};\n\n/**\n * Refuses a layout the renderer cannot draw as declared: a camera, a transition or a rest pose it does not\n * implement. Exhaustive switches, so a member added to one of those vocabularies fails to compile here until the\n * renderer supports it — and a value that reaches it at runtime anyway (an application's own layout, built without\n * the types) is refused instead of being silently drawn as something else.\n */\nexport function assertSupportedLayout3D(layout: Layout3DDefinition): void {\n const camera = layout.scene.camera;\n switch (camera) {\n case Layout3DCamera.FLAT_ORTHOGRAPHIC:\n break;\n case Layout3DCamera.STILL_PERSPECTIVE:\n // The captured flat container stages nothing in depth; only a composed placement that does can use this camera.\n if (layout.placement.kind !== ShellLayoutPlacementKind.COMPOSED) {\n throw new Error(`3D layout '${layout.id}': the still-perspective camera needs a composed placement that stages the shell in depth.`);\n }\n break;\n default: {\n const unsupported: never = camera;\n throw new Error(`3D layout '${layout.id}': the frame has no camera '${String(unsupported)}'.`);\n }\n }\n // Each throws on a member the frame does not play (a value built without the types).\n crossFadesAppearance(layout.transitions.appearance);\n frameChoreography(layout.transitions.navigation);\n frameChoreography(layout.transitions.sidebarResize);\n rimsFocusedZone(layout.transitions.zoneFocus);\n const pose = layout.constraints.restPose;\n switch (pose) {\n // FLAT is what the container renders: the placement, untransformed.\n case Layout3DRestPose.FLAT:\n break;\n default: {\n const unsupported: never = pose;\n throw new Error(`3D layout '${layout.id}': the rest pose '${String(unsupported)}' is not supported (only FLAT exists: no region is transformed at rest).`);\n }\n }\n if (layout.placement.kind !== ShellLayoutPlacementKind.INHERIT && layout.placement.kind !== ShellLayoutPlacementKind.COMPOSED) {\n throw new Error(`3D layout '${layout.id}': unknown placement kind '${String((layout.placement as { kind: unknown }).kind)}'.`);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-3d-transition-choreography.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"layout-3d-transition-choreography.d.ts","sourceRoot":"","sources":["../../../src/layout/layout-3d-transition-choreography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE9H;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,KAAK,EAAE,OAAO,CAAC;IACf,sGAAsG;IACtG,YAAY,EAAE,MAAM,CAAC;IACrB,+GAA+G;IAC/G,OAAO,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,aAAa,EAAE,MAAM,CAAC;IACtB,2GAA2G;IAC3G,cAAc,EAAE,MAAM,CAAC;CACxB;AAID,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,yBAAyB,GAAG,iBAAiB,CAcpF;AAED,gGAAgG;AAChG,wBAAgB,eAAe,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAW1E;AAED,gHAAgH;AAChH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAShF"}
|