@wildo-ai/presets-components-3d 1.1.10 → 1.1.12

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.
Files changed (71) hide show
  1. package/dist/esm/focal-plane/focal-plane-depth-axis.d.ts +17 -0
  2. package/dist/esm/focal-plane/focal-plane-depth-axis.d.ts.map +1 -0
  3. package/dist/esm/focal-plane/focal-plane-depth-axis.js +59 -0
  4. package/dist/esm/focal-plane/focal-plane-depth-axis.js.map +1 -0
  5. package/dist/esm/focal-plane/focal-plane-settings.d.ts.map +1 -1
  6. package/dist/esm/focal-plane/focal-plane-settings.js.map +1 -1
  7. package/dist/esm/focal-plane/focal-plane-shell-container.d.ts.map +1 -1
  8. package/dist/esm/focal-plane/focal-plane-shell-container.js +10 -119
  9. package/dist/esm/focal-plane/focal-plane-shell-container.js.map +1 -1
  10. package/dist/esm/focal-plane/focal-plane-stylesheet.d.ts +2 -9
  11. package/dist/esm/focal-plane/focal-plane-stylesheet.d.ts.map +1 -1
  12. package/dist/esm/focal-plane/focal-plane-stylesheet.js +41 -80
  13. package/dist/esm/focal-plane/focal-plane-stylesheet.js.map +1 -1
  14. package/dist/esm/focal-plane/focal-plane-vanishing-point.d.ts +27 -0
  15. package/dist/esm/focal-plane/focal-plane-vanishing-point.d.ts.map +1 -0
  16. package/dist/esm/focal-plane/focal-plane-vanishing-point.js +21 -0
  17. package/dist/esm/focal-plane/focal-plane-vanishing-point.js.map +1 -0
  18. package/dist/esm/frame/frame-3d-style.d.ts +24 -4
  19. package/dist/esm/frame/frame-3d-style.d.ts.map +1 -1
  20. package/dist/esm/frame/frame-3d-style.js +86 -6
  21. package/dist/esm/frame/frame-3d-style.js.map +1 -1
  22. package/dist/esm/frame/frame-appearance.js.map +1 -1
  23. package/dist/esm/frame/frame-canvas.js.map +1 -1
  24. package/dist/esm/frame/frame-canvas.lazy.js.map +1 -1
  25. package/dist/esm/frame/frame-color.d.ts.map +1 -1
  26. package/dist/esm/frame/frame-color.js.map +1 -1
  27. package/dist/esm/frame/frame-driver.js.map +1 -1
  28. package/dist/esm/frame/frame-renderer.js.map +1 -1
  29. package/dist/esm/frame/frame-shaders.d.ts.map +1 -1
  30. package/dist/esm/frame/frame-shaders.js.map +1 -1
  31. package/dist/esm/frame/use-frame-appearance.d.ts +1 -1
  32. package/dist/esm/frame/use-frame-appearance.js +3 -3
  33. package/dist/esm/frame/use-frame-appearance.js.map +1 -1
  34. package/dist/esm/index.d.ts +0 -1
  35. package/dist/esm/index.d.ts.map +1 -1
  36. package/dist/esm/index.js +0 -1
  37. package/dist/esm/index.js.map +1 -1
  38. package/dist/esm/layout/header-first-shell-container.js.map +1 -1
  39. package/dist/esm/layout/layout-3d-definition.d.ts +5 -7
  40. package/dist/esm/layout/layout-3d-definition.d.ts.map +1 -1
  41. package/dist/esm/layout/layout-3d-definition.js +1 -1
  42. package/dist/esm/layout/layout-3d-definition.js.map +1 -1
  43. package/dist/esm/layout/layout-3d-transition-choreography.d.ts.map +1 -1
  44. package/dist/esm/layout/layout-3d-transition-choreography.js.map +1 -1
  45. package/dist/esm/layout/layout-3d-vocabulary.d.ts.map +1 -1
  46. package/dist/esm/layout/layout-3d-vocabulary.js.map +1 -1
  47. package/dist/esm/layout-3d-main-container.d.ts +13 -18
  48. package/dist/esm/layout-3d-main-container.d.ts.map +1 -1
  49. package/dist/esm/layout-3d-main-container.js +7 -15
  50. package/dist/esm/layout-3d-main-container.js.map +1 -1
  51. package/dist/esm/register-3d-layout.d.ts +8 -4
  52. package/dist/esm/register-3d-layout.d.ts.map +1 -1
  53. package/dist/esm/register-3d-layout.js +16 -36
  54. package/dist/esm/register-3d-layout.js.map +1 -1
  55. package/dist/esm/shell-region-measurement.js.map +1 -1
  56. package/dist/esm/tokens/design-token-resolution.js.map +1 -1
  57. package/dist/esm/tokens/use-design-token-resolution.js.map +1 -1
  58. package/dist/tsconfig.build.tsbuildinfo +1 -1
  59. package/package.json +8 -6
  60. package/dist/esm/focal-plane/use-pane-depth.d.ts +0 -20
  61. package/dist/esm/focal-plane/use-pane-depth.d.ts.map +0 -1
  62. package/dist/esm/focal-plane/use-pane-depth.js +0 -162
  63. package/dist/esm/focal-plane/use-pane-depth.js.map +0 -1
  64. package/dist/esm/focal-plane/use-shared-vanishing-point.d.ts +0 -35
  65. package/dist/esm/focal-plane/use-shared-vanishing-point.d.ts.map +0 -1
  66. package/dist/esm/focal-plane/use-shared-vanishing-point.js +0 -86
  67. package/dist/esm/focal-plane/use-shared-vanishing-point.js.map +0 -1
  68. package/dist/esm/layout/shell-layout-placement.d.ts +0 -26
  69. package/dist/esm/layout/shell-layout-placement.d.ts.map +0 -1
  70. package/dist/esm/layout/shell-layout-placement.js +0 -18
  71. package/dist/esm/layout/shell-layout-placement.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"focal-plane-stylesheet.js","sourceRoot":"","sources":["../../../../src/focal-plane/focal-plane-stylesheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,IAAI,GAAG,oBAAoB,CAAC;AAClC,MAAM,OAAO,GAAG,yBAAyB,WAAW,CAAC,OAAO,IAAI,CAAC;AACjE;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,OAAO,gDAAgD,OAAO,0BAA0B,CAAC;AACrI,0GAA0G;AAC1G,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,SAAS,CAAU,CAAC;AACpG,MAAM,UAAU,GAAG,CAAC,IAA4B,EAAU,EAAE,CAAC,2BAA2B,IAAI,2BAA2B,IAAI,KAAK,CAAC;AACjI,MAAM,YAAY,GAAG,OAAO,yBAAyB,2BAA2B,CAAC;AACjF,0FAA0F;AAC1F,MAA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CAAC;aAAM,CAAC;YACN,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACzC,KAAK,CAAC,OAAO,CAAC,UAAU,GAAG,EAAE,CAAC;YAC9B,KAAK,CAAC,WAAW,GAAG,eAAe,CAAC;YACpC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IACD,OAAO,GAAG,EAAE;QACV,KAAK,IAAI,CAAC,CAAC;QACX,IAAI,KAAK,GAAG,CAAC;YAAE,OAAO;QACtB,IAAI,SAAS;YAAE,GAAG,CAAC,kBAAkB,GAAG,GAAG,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;QACtG,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC5D,SAAS,GAAG,IAAI,CAAC;IACnB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { ShellRegion } from '@wildo-ai/presets-components-models';\nimport { NavigationZone } from '@wildo-ai/saas-frontend-lib';\n\n/**\n * The focal plane's stylesheet (#2049), scoped to `[data-focal-plane]`, so it touches nothing outside the layout.\n *\n * ## One still camera, without a nested 3D context\n *\n * Every object carries its OWN `perspective(d) translate3d(0, 0, z)`, with its `transform-origin` set (per element, by\n * `useSharedVanishingPoint`) to the one vanishing point of the stage. That is the projection of a single still camera,\n * and it needs no `transform-style: preserve-3d` ancestor — which matters, because a nested 3D context disables\n * `backdrop-filter`, and the glass windows are made of it.\n *\n * ## What counts as an object\n *\n * - the shell panels this layout wraps (`[data-fp-object]`);\n * - each navigation pane inside the content region, by the engine's own markers: `[data-content-area]` (the static and\n * single-zone branches) and the resizable panel `[data-panel-id^=\"nav-\"]` (NOT its inner `[data-content-area]`, which\n * the panel's inline `overflow: hidden` would clip).\n *\n * Depth is a custom property (`--fp-z`); states set it, and the transform reads it, so rules compose instead of fighting\n * over `transform`.\n *\n * ## Why a constructable stylesheet\n *\n * It is installed through `document.adoptedStyleSheets`, which a content security policy without `'unsafe-inline'`\n * does not block, where a `<style>` element would be.\n */\nconst ROOT = '[data-focal-plane]';\nconst CONTENT = `[data-component-area=\"${ShellRegion.CONTENT}\"]`;\n/**\n * The navigation panes, by the engine's markers: the zone itself in the static and single-zone branches, the panel in\n * the resizable branch — never the zone INSIDE a panel, which would be moved twice.\n */\nexport const FOCAL_PLANE_PANE_SELECTOR = `${CONTENT} [data-content-area]:not([data-panel-id] *), ${CONTENT} [data-panel-id^=\"nav-\"]`;\n/** The zone names the navigation state focuses, and the markers each one is found by in either branch. */\nconst ZONES = [NavigationZone.PRIMARY, NavigationZone.SECONDARY, NavigationZone.COMPANION] as const;\nconst zoneMarker = (zone: (typeof ZONES)[number]): string => `:is([data-content-area=\"${zone}\"], [data-panel-id=\"nav-${zone}\"])`;\nconst VISIBLE_PANE = `:is(${FOCAL_PLANE_PANE_SELECTOR}):not([data-zone-hidden])`;\n/** Two panes or more are side by side (the other panes are siblings in both branches). */\nconst SPLIT = `${CONTENT}:has(${VISIBLE_PANE} ~ ${VISIBLE_PANE})`;\nconst PANES = `:is(${FOCAL_PLANE_PANE_SELECTOR})`;\nconst OBJECTS = `:is([data-fp-object], ${FOCAL_PLANE_PANE_SELECTOR})`;\n/**\n * The popups the focal plane moves, by the stable `data-slot` of their portalled content (Radix `data-state` on the\n * same element). Lifting popups carry the CSS variable Radix publishes as their trigger-relative origin.\n */\nconst POPUPS = {\n lift: [\n ['dropdown-menu-content', '--radix-dropdown-menu-content-transform-origin'],\n ['dropdown-menu-sub-content', '--radix-dropdown-menu-content-transform-origin'],\n ['context-menu-content', '--radix-context-menu-content-transform-origin'],\n ['context-menu-sub-content', '--radix-context-menu-content-transform-origin'],\n ['popover-content', '--radix-popover-content-transform-origin'],\n ['hover-card-content', '--radix-hover-card-content-transform-origin'],\n ['tooltip-content', '--radix-tooltip-content-transform-origin'],\n ['select-content', '--radix-select-content-transform-origin'],\n ['menubar-content', '--radix-menubar-content-transform-origin'],\n ['menubar-sub-content', '--radix-menubar-content-transform-origin'],\n ],\n rise: ['dialog-content', 'alert-dialog-content'],\n} as const;\n/**\n * A MODAL popup is open: a dialog, an alert dialog, a sheet or a drawer, by their content SLOT. Not by `role=\"dialog\"`:\n * a Radix popover's content carries that role too (date pickers, linked-record pickers, the notification centre), and\n * opening one must not step the form you are editing back. Not by `body[data-scroll-locked]` either, which dropdown\n * and context menus also set.\n */\nconst MODAL_SLOTS = ['dialog-content', 'alert-dialog-content', 'sheet-content', 'drawer-content'] as const;\nconst MODAL_OPEN = `:has([data-shell-overlay-layer] :is(${MODAL_SLOTS.map((slot) => `[data-slot=\"${slot}\"]`).join(', ')})[data-state=\"open\"])`;\n\n/** The modal content slots, exported for the tests that pin what counts as modal. */\nexport const FOCAL_PLANE_MODAL_SLOTS: readonly string[] = MODAL_SLOTS;\n\nexport const FOCAL_PLANE_CSS = `\n/* Positioned, never isolated: an isolated root would be one stacking context, and anything positioned outside the\n shell with a lower z-index (a consent prompt) would paint over the shell's own dialogs (#1830). */\n${ROOT} { position: relative; height: 100vh; width: 100vw; overflow: hidden; background: var(--background); }\n\n/* The ambient background: soft fields of the theme's own colours, drifting very slowly. */\n${ROOT} .fp-backdrop { position: absolute; inset: -20%; z-index: 0; pointer-events: none; }\n${ROOT} .fp-backdrop i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.8; }\n${ROOT} .fp-backdrop .fp-a { width: 58%; height: 62%; left: 6%; top: 4%; background: radial-gradient(closest-side, color-mix(in oklab, var(--primary) 38%, var(--background)), transparent); animation: fp-drift-a 48s ease-in-out infinite alternate; }\n${ROOT} .fp-backdrop .fp-b { width: 52%; height: 58%; right: 4%; top: 30%; background: radial-gradient(closest-side, color-mix(in oklab, var(--accent, var(--primary)) 30%, var(--background)), transparent); animation: fp-drift-b 61s ease-in-out infinite alternate; }\n${ROOT} .fp-backdrop .fp-c { width: 46%; height: 50%; left: 34%; bottom: 0; background: radial-gradient(closest-side, color-mix(in oklab, var(--primary) 22%, var(--foreground) 8%), transparent); animation: fp-drift-c 55s ease-in-out infinite alternate; }\n@keyframes fp-drift-a { to { transform: translate(9%, 7%) scale(1.08); } }\n@keyframes fp-drift-b { to { transform: translate(-8%, -6%) scale(0.94); } }\n@keyframes fp-drift-c { to { transform: translate(-6%, -9%) scale(1.1); } }\n\n/* The arrangement: floating windows with a margin and gaps, never edge to edge. */\n${ROOT} .fp-grid { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; gap: 12px; padding: 14px; }\n${ROOT} .fp-row { display: flex; gap: 12px; min-height: 0; min-width: 0; }\n${ROOT} .fp-middle { flex: 1; }\n${ROOT} .fp-column { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }\n${ROOT} .fp-content { flex: 1; min-height: 0; min-width: 0; position: relative; display: flex; flex-direction: column; }\n${ROOT} [data-fp-object]:empty { display: none; }\n${ROOT} [data-fp-object] { position: relative; display: flex; min-height: 0; min-width: 0; }\n${ROOT} [data-fp-object] > * { flex: 1; min-width: 0; min-height: 0; }\n\n/* Every object: seen through the one still camera, at its depth. */\n${ROOT} ${OBJECTS} {\n transform-origin: var(--fp-ox, 50%) var(--fp-oy, 50%);\n transform: perspective(var(--fp-distance)) translate3d(0, 0, var(--fp-z, 0px));\n filter: var(--fp-filter, none);\n transition: transform var(--fp-motion) var(--fp-ease), filter var(--fp-motion) var(--fp-ease), box-shadow var(--fp-motion) var(--fp-ease);\n}\n\n/* Glass: the theme's card colour, translucent, over the background blurred through it. */\n${ROOT} :is([data-fp-object=\"shell\"], ${FOCAL_PLANE_PANE_SELECTOR}) {\n background: color-mix(in oklab, var(--card, var(--background)) var(--fp-glass), transparent);\n -webkit-backdrop-filter: blur(26px) saturate(1.5);\n backdrop-filter: blur(26px) saturate(1.5);\n border: 1px solid color-mix(in oklab, var(--border) 55%, transparent);\n border-radius: 14px;\n box-shadow: 0 18px 44px -22px rgb(0 0 0 / 0.30), 0 1px 3px rgb(0 0 0 / 0.05);\n}\n${ROOT} ${CONTENT} { background: transparent; }\n${ROOT} ${CONTENT} :is([data-content-area=\"${NavigationZone.SECONDARY}\"], [data-content-area=\"${NavigationZone.COMPANION}\"]):not([data-panel-id] *) { margin-left: 12px; }\n\n/* Side by side, the pane you work in rests on the focal plane; every other pane steps back and dims. The focused\n zone comes from the navigation state, written on the root as data-fp-focus. Clicking a pane focuses it (the\n engine does that), which brings it forward. */\n${ZONES.map((zone) => `${ROOT}[data-fp-focus=\"${zone}\"] ${SPLIT} ${VISIBLE_PANE}:not(${zoneMarker(zone)})`).join(', ')} {\n --fp-z: calc(var(--fp-step) * -0.55);\n --fp-filter: brightness(calc(1 - var(--fp-dim) * 0.55)) saturate(calc(1 - var(--fp-dim) * 0.5)) blur(calc(var(--fp-recede-blur) * 0.55));\n}\n\n/* A side pane arrives from depth when it opens. */\n${ROOT} ${CONTENT} :is(${zoneMarker(NavigationZone.SECONDARY)}, ${zoneMarker(NavigationZone.COMPANION)}):is(${FOCAL_PLANE_PANE_SELECTOR}) {\n animation: fp-pane-arrive var(--fp-motion) var(--fp-ease);\n}\n@keyframes fp-pane-arrive {\n from { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -1.2)); opacity: 0; }\n}\n\n/* Ghosts: a discarded pane flying away, and the still image of the panes an expanded pane stands in front of. */\n${ROOT} .fp-ghosts { position: absolute; inset: 0; z-index: 0; pointer-events: none; }\n${ROOT} .fp-ghosts-front { z-index: 2; }\n${ROOT} .fp-ghost {\n position: absolute; box-sizing: border-box; overflow: hidden;\n transform-origin: var(--fp-ox) var(--fp-oy);\n transform: perspective(var(--fp-distance)) translate3d(0, 0, var(--fp-z, 0px));\n filter: var(--fp-filter, none);\n transition: transform var(--fp-motion) var(--fp-ease), filter var(--fp-motion) var(--fp-ease), opacity var(--fp-motion) var(--fp-ease);\n background: color-mix(in oklab, var(--card, var(--background)) var(--fp-glass), transparent);\n border: 1px solid color-mix(in oklab, var(--border) 55%, transparent);\n border-radius: 14px;\n box-shadow: 0 18px 44px -22px rgb(0 0 0 / 0.30);\n}\n\n/* The shell panel under the pointer rises toward the camera; its items zoom a little. */\n${ROOT} [data-fp-object=\"shell\"]:hover { --fp-z: var(--fp-hover-lift); }\n${ROOT} [data-fp-object=\"shell\"] :is(button, a):not(:disabled) { transition: transform 180ms var(--fp-ease); }\n${ROOT} [data-fp-object=\"shell\"] :is(button, a):not(:disabled):hover { transform: scale(1.045); }\n\n/* Behind a modal popup, everything steps back, dims and blurs lightly. A menu is not modal: it only lifts. */\n${ROOT}${MODAL_OPEN} ${OBJECTS} {\n --fp-z: calc(var(--fp-step) * -0.6);\n --fp-filter: brightness(calc(1 - var(--fp-dim) * 0.6)) saturate(0.9) blur(var(--fp-modal-blur));\n}\n\n/* Popups are objects too. Their recipe animations (tw-animate's enter/exit) are replaced by depth KEYFRAMES —\n keyframes, because the overlay library keeps a closing popup mounted only until its exit ANIMATION ends; a\n transition would be cut off. Each popup rests at its true size: depth shows while it travels.\n - A menu, popover or tooltip lifts off its trigger: the library publishes the trigger point as the transform\n origin, and perspective() grows the popup out of it.\n - A dialog (the command palette is one) rises from depth to the focal plane.\n - A sheet arrives from in front of the plane and leaves back into depth.\n Drawers and toasts keep their own motion: their libraries position and stack them with transforms. */\n${POPUPS.lift.map(([slot, origin]) => `${ROOT} [data-shell-overlay-layer] [data-slot=\"${slot}\"] { transform-origin: var(${origin}); }`).join('\\n')}\n${ROOT} [data-shell-overlay-layer] :is(${POPUPS.lift.map(([slot]) => `[data-slot=\"${slot}\"]`).join(', ')}):is([data-state=\"open\"], [data-state=\"delayed-open\"], [data-state=\"instant-open\"]) { animation: fp-lift-in calc(var(--fp-motion) * 0.6) var(--fp-ease) both; }\n${ROOT} [data-shell-overlay-layer] :is(${POPUPS.lift.map(([slot]) => `[data-slot=\"${slot}\"]`).join(', ')})[data-state=\"closed\"] { animation: fp-lift-out calc(var(--fp-motion) * 0.45) var(--fp-ease) both; }\n${ROOT} [data-shell-overlay-layer] :is(${POPUPS.rise.map((slot) => `[data-slot=\"${slot}\"]`).join(', ')})[data-state=\"open\"] { animation: fp-rise-in var(--fp-motion) var(--fp-ease) both; }\n${ROOT} [data-shell-overlay-layer] :is(${POPUPS.rise.map((slot) => `[data-slot=\"${slot}\"]`).join(', ')})[data-state=\"closed\"] { animation: fp-rise-out calc(var(--fp-motion) * 0.7) var(--fp-ease) both; }\n${ROOT} [data-shell-overlay-layer] [data-slot=\"sheet-content\"][data-state=\"open\"] { animation: fp-arrive-in var(--fp-motion) var(--fp-ease) both; }\n${ROOT} [data-shell-overlay-layer] [data-slot=\"sheet-content\"][data-state=\"closed\"] { animation: fp-arrive-out calc(var(--fp-motion) * 0.7) var(--fp-ease) both; }\n/* Popups are glass, a little more opaque than windows (they carry text you act on at once). Tooltips keep their own\n inverse colours. */\n${ROOT} [data-shell-overlay-layer] :is(${[...POPUPS.lift.filter(([slot]) => slot !== 'tooltip-content').map(([slot]) => slot), ...POPUPS.rise, 'sheet-content'].map((slot) => `[data-slot=\"${slot}\"]`).join(', ')}) {\n background: color-mix(in oklab, var(--popover, var(--card, var(--background))) calc(var(--fp-glass) + 26%), transparent);\n -webkit-backdrop-filter: blur(24px) saturate(1.5);\n backdrop-filter: blur(24px) saturate(1.5);\n border-color: color-mix(in oklab, var(--border) 60%, transparent);\n}\n@keyframes fp-lift-in { from { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -0.35)); opacity: 0; } to { transform: none; opacity: 1; } }\n@keyframes fp-lift-out { from { transform: none; opacity: 1; } to { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -0.35)); opacity: 0; } }\n@keyframes fp-rise-in { from { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -1.4)); opacity: 0; } to { transform: none; opacity: 1; } }\n@keyframes fp-rise-out { from { transform: none; opacity: 1; } to { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -1.4)); opacity: 0; } }\n@keyframes fp-arrive-in { from { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * 0.9)); opacity: 0; } to { transform: none; opacity: 1; } }\n@keyframes fp-arrive-out { from { transform: none; opacity: 1; } to { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -0.5)); opacity: 0; } }\n\n/* The modal scrim: in the focal plane, stepping back and the light blur above ARE the scrim, so the engine's dark\n overlay (and its own backdrop blur) would double it into a heavy grey. Keep the overlay element (it still catches\n the outside click), just transparent. */\n${ROOT} [data-shell-overlay-layer] :is([data-slot=\"dialog-overlay\"], [data-slot=\"alert-dialog-overlay\"], [data-slot=\"sheet-overlay\"], [data-slot=\"drawer-overlay\"]) {\n background: transparent;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n}\n\n@media (prefers-reduced-motion: reduce) {\n /* !important: the motion rules above are more specific (the drifting fields, the item zoom), and the reader's\n setting must win over every one of them. */\n ${ROOT} ${OBJECTS}, ${ROOT} .fp-ghost, ${ROOT} [data-fp-object=\"shell\"] :is(button, a), ${ROOT} [data-shell-overlay-layer] [data-slot] { transition-duration: 0ms !important; animation: none !important; }\n ${ROOT} .fp-backdrop i { animation: none !important; }\n}\n`;\n\nlet installed: CSSStyleSheet | null = null;\nlet users = 0;\n\n/**\n * Installs the stylesheet while at least one focal-plane layout is mounted, and removes it when the last one unmounts.\n * Returns the release function. Falls back to a `<style>` element where constructable stylesheets are missing.\n */\nexport function installFocalPlaneStylesheet(doc: Document = document): () => void {\n users += 1;\n if (users === 1) {\n if ('adoptedStyleSheets' in doc && typeof CSSStyleSheet !== 'undefined' && 'replaceSync' in CSSStyleSheet.prototype) {\n installed = new CSSStyleSheet();\n installed.replaceSync(FOCAL_PLANE_CSS);\n doc.adoptedStyleSheets = [...doc.adoptedStyleSheets, installed];\n } else {\n const style = doc.createElement('style');\n style.dataset.focalPlane = '';\n style.textContent = FOCAL_PLANE_CSS;\n doc.head.appendChild(style);\n }\n }\n return () => {\n users -= 1;\n if (users > 0) return;\n if (installed) doc.adoptedStyleSheets = doc.adoptedStyleSheets.filter((sheet) => sheet !== installed);\n doc.head.querySelector('style[data-focal-plane]')?.remove();\n installed = null;\n };\n}\n"]}
1
+ {"version":3,"file":"focal-plane-stylesheet.js","sourceRoot":"","sources":["../../../src/focal-plane/focal-plane-stylesheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EACL,4BAA4B,EAC5B,cAAc,EACd,4BAA4B,EAC5B,yBAAyB,EACzB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,IAAI,GAAG,oBAAoB,CAAC;AAClC,MAAM,OAAO,GAAG,mBAAmB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACzD,0GAA0G;AAC1G,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,SAAS,CAAU,CAAC;AACpG,MAAM,UAAU,GAAG,CAAC,IAA4B,EAAU,EAAE,CAAC,2BAA2B,IAAI,2BAA2B,IAAI,KAAK,CAAC;AACjI,MAAM,YAAY,GAAG,OAAO,mBAAmB,2BAA2B,CAAC;AAC3E,0FAA0F;AAC1F,MAAM,KAAK,GAAG,GAAG,OAAO,QAAQ,YAAY,MAAM,YAAY,GAAG,CAAC;AAClE,MAAM,KAAK,GAAG,OAAO,mBAAmB,GAAG,CAAC;AAC5C,MAAM,OAAO,GAAG,4BAA4B,mBAAmB,GAAG,CAAC;AACnE;;;GAGG;AACH,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,4BAA4B,CAA4C;IAC7F,IAAI,EAA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G,IAAI;;CAEP,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,MAAgB,QAAQ;IAClE,OAAO,4BAA4B,CAAC,aAAa,EAAE,eAAe,EAAE,GAAG,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["import { ShellRegion } from '@wildo-ai/presets-components-models';\nimport {\n installShellLayoutStylesheet,\n NavigationZone,\n SHELL_ANCHORED_POPUP_ORIGINS,\n SHELL_CENTRED_POPUP_SLOTS,\n SHELL_PANE_SELECTOR,\n SHELL_POPUP_OPEN_STATES,\n shellModalOpenClause,\n ShellPopupSlot,\n shellRegionSelector,\n} from '@wildo-ai/saas-frontend-lib';\n\n/**\n * The focal plane's stylesheet (#2049), scoped to `[data-focal-plane]`, so it touches nothing outside the layout.\n *\n * ## One still camera, without a nested 3D context\n *\n * Every object carries its OWN `perspective(d) translate3d(0, 0, z)`, with its `transform-origin` set (per element, by\n * `writeVanishingOrigin`, called by the core stage measurement) to the one vanishing point of the stage. That is the projection of a single still camera,\n * and it needs no `transform-style: preserve-3d` ancestor — which matters, because a nested 3D context disables\n * `backdrop-filter`, and the glass windows are made of it.\n *\n * ## What counts as an object\n *\n * - the shell panels this layout wraps (`[data-shell-object]`, the core's wrapper marker);\n * - each navigation pane inside the content region, by the engine's own markers: `[data-content-area]` (the static and\n * single-zone branches) and the resizable panel `[data-panel-id^=\"nav-\"]` (NOT its inner `[data-content-area]`, which\n * the panel's inline `overflow: hidden` would clip).\n *\n * Depth is a custom property (`--fp-z`); states set it, and the transform reads it, so rules compose instead of fighting\n * over `transform`.\n *\n * ## Why a constructable stylesheet\n *\n * It is installed through `document.adoptedStyleSheets`, which a content security policy without `'unsafe-inline'`\n * does not block, where a `<style>` element would be.\n */\nconst ROOT = '[data-focal-plane]';\nconst CONTENT = shellRegionSelector(ShellRegion.CONTENT);\n/** The zone names the navigation state focuses, and the markers each one is found by in either branch. */\nconst ZONES = [NavigationZone.PRIMARY, NavigationZone.SECONDARY, NavigationZone.COMPANION] as const;\nconst zoneMarker = (zone: (typeof ZONES)[number]): string => `:is([data-content-area=\"${zone}\"], [data-panel-id=\"nav-${zone}\"])`;\nconst VISIBLE_PANE = `:is(${SHELL_PANE_SELECTOR}):not([data-zone-hidden])`;\n/** Two panes or more are side by side (the other panes are siblings in both branches). */\nconst SPLIT = `${CONTENT}:has(${VISIBLE_PANE} ~ ${VISIBLE_PANE})`;\nconst PANES = `:is(${SHELL_PANE_SELECTOR})`;\nconst OBJECTS = `:is([data-shell-object], ${SHELL_PANE_SELECTOR})`;\n/**\n * The popups the focal plane moves, by the core's `ShellPopupSlot` vocabulary: anchored popups LIFT from the origin\n * Radix publishes for their trigger (`SHELL_ANCHORED_POPUP_ORIGINS`), centred dialogs RISE (`SHELL_CENTRED_POPUP_SLOTS`).\n */\nconst POPUPS = {\n lift: Object.entries(SHELL_ANCHORED_POPUP_ORIGINS) as ReadonlyArray<[ShellPopupSlot, string]>,\n rise: SHELL_CENTRED_POPUP_SLOTS,\n};\n/** A modal popup is open: the core's slot-keyed clause (`shellModalOpenClause`), never `role=\"dialog\"`. */\nconst MODAL_OPEN = shellModalOpenClause();\n\n\nexport const FOCAL_PLANE_CSS = `\n/* Positioned, never isolated: an isolated root would be one stacking context, and anything positioned outside the\n shell with a lower z-index (a consent prompt) would paint over the shell's own dialogs (#1830). */\n${ROOT} { position: relative; height: 100vh; width: 100vw; overflow: hidden; background: var(--background); }\n\n/* The ambient background: soft fields of the theme's own colours, drifting very slowly. */\n${ROOT} .fp-backdrop { position: absolute; inset: -20%; z-index: 0; pointer-events: none; }\n${ROOT} .fp-backdrop i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.8; }\n${ROOT} .fp-backdrop .fp-a { width: 58%; height: 62%; left: 6%; top: 4%; background: radial-gradient(closest-side, color-mix(in oklab, var(--primary) 38%, var(--background)), transparent); animation: fp-drift-a 48s ease-in-out infinite alternate; }\n${ROOT} .fp-backdrop .fp-b { width: 52%; height: 58%; right: 4%; top: 30%; background: radial-gradient(closest-side, color-mix(in oklab, var(--accent, var(--primary)) 30%, var(--background)), transparent); animation: fp-drift-b 61s ease-in-out infinite alternate; }\n${ROOT} .fp-backdrop .fp-c { width: 46%; height: 50%; left: 34%; bottom: 0; background: radial-gradient(closest-side, color-mix(in oklab, var(--primary) 22%, var(--foreground) 8%), transparent); animation: fp-drift-c 55s ease-in-out infinite alternate; }\n@keyframes fp-drift-a { to { transform: translate(9%, 7%) scale(1.08); } }\n@keyframes fp-drift-b { to { transform: translate(-8%, -6%) scale(0.94); } }\n@keyframes fp-drift-c { to { transform: translate(-6%, -9%) scale(1.1); } }\n\n/* The arrangement: floating windows with a margin and gaps, never edge to edge. */\n${ROOT} .fp-grid { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; gap: 12px; padding: 14px; }\n${ROOT} .fp-row { display: flex; gap: 12px; min-height: 0; min-width: 0; }\n${ROOT} .fp-middle { flex: 1; }\n${ROOT} .fp-column { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }\n${ROOT} .fp-content { flex: 1; min-height: 0; min-width: 0; position: relative; display: flex; flex-direction: column; }\n${ROOT} [data-shell-object]:empty { display: none; }\n${ROOT} [data-shell-object] { position: relative; display: flex; min-height: 0; min-width: 0; }\n${ROOT} [data-shell-object] > * { flex: 1; min-width: 0; min-height: 0; }\n\n/* Every object: seen through the one still camera, at its depth. */\n${ROOT} ${OBJECTS} {\n transform-origin: var(--fp-ox, 50%) var(--fp-oy, 50%);\n transform: perspective(var(--fp-distance)) translate3d(0, 0, var(--fp-z, 0px));\n filter: var(--fp-filter, none);\n transition: transform var(--fp-motion) var(--fp-ease), filter var(--fp-motion) var(--fp-ease), box-shadow var(--fp-motion) var(--fp-ease);\n}\n\n/* Glass: the theme's card colour, translucent, over the background blurred through it. */\n${ROOT} :is([data-shell-object], ${SHELL_PANE_SELECTOR}) {\n background: color-mix(in oklab, var(--card, var(--background)) var(--fp-glass), transparent);\n -webkit-backdrop-filter: blur(26px) saturate(1.5);\n backdrop-filter: blur(26px) saturate(1.5);\n border: 1px solid color-mix(in oklab, var(--border) 55%, transparent);\n border-radius: 14px;\n box-shadow: 0 18px 44px -22px rgb(0 0 0 / 0.30), 0 1px 3px rgb(0 0 0 / 0.05);\n}\n${ROOT} ${CONTENT} { background: transparent; }\n\n/* Muted text inside a glass window is drawn a little nearer the body ink (#2049). The page's muted ink is measured on the\n page, but a window lets the ambient fields through: where two of them overlap it read 3.98:1 (light) and 3.97:1 (dark)\n at the agreed 56% window opacity. 88% of the page's muted ink with 12% of the body ink is the smallest step that reads\n at 4.5:1 or more there (4.64:1 light, 4.56:1 dark) and stays muted (body text reads 11.86:1 and 11.10:1 on the same\n ground). The page's value is taken on the root, so a window nested in a window mixes from the page again rather than\n twice. Popups are more opaque and read without it. Measured by focal-plane-glass-contrast.test.ts. */\n${ROOT} { --fp-page-muted-foreground: var(--muted-foreground); }\n${ROOT} :is([data-shell-object], ${SHELL_PANE_SELECTOR}) { --muted-foreground: color-mix(in oklab, var(--fp-page-muted-foreground) 88%, var(--foreground)); }\n${ROOT} ${CONTENT} :is([data-content-area=\"${NavigationZone.SECONDARY}\"], [data-content-area=\"${NavigationZone.COMPANION}\"]):not([data-panel-id] *) { margin-left: 12px; }\n\n/* Side by side, the pane you work in rests on the focal plane; every other pane steps back and dims. The focused\n zone comes from the navigation state, written on the root as data-fp-focus. Clicking a pane focuses it (the\n engine does that), which brings it forward. */\n${ZONES.map((zone) => `${ROOT}[data-fp-focus=\"${zone}\"] ${SPLIT} ${VISIBLE_PANE}:not(${zoneMarker(zone)})`).join(', ')} {\n --fp-z: calc(var(--fp-step) * -0.55);\n --fp-filter: brightness(calc(1 - var(--fp-dim) * 0.55)) saturate(calc(1 - var(--fp-dim) * 0.5)) blur(calc(var(--fp-recede-blur) * 0.55));\n}\n\n/* A side pane arrives from depth when it opens. */\n${ROOT} ${CONTENT} :is(${zoneMarker(NavigationZone.SECONDARY)}, ${zoneMarker(NavigationZone.COMPANION)}):is(${SHELL_PANE_SELECTOR}) {\n animation: fp-pane-arrive var(--fp-motion) var(--fp-ease);\n}\n@keyframes fp-pane-arrive {\n from { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -1.2)); opacity: 0; }\n}\n\n/* Ghosts: a discarded pane flying away, and the still image of the panes an expanded pane stands in front of. */\n${ROOT} [data-shell-ghost-layer] { position: absolute; inset: 0; z-index: 0; pointer-events: none; }\n${ROOT} [data-shell-ghost-layer=\"front\"] { z-index: 2; }\n${ROOT} [data-shell-ghost] {\n position: absolute; box-sizing: border-box; overflow: hidden;\n transform-origin: var(--fp-ox) var(--fp-oy);\n transform: perspective(var(--fp-distance)) translate3d(0, 0, var(--fp-z, 0px));\n filter: var(--fp-filter, none);\n transition: transform var(--fp-motion) var(--fp-ease), filter var(--fp-motion) var(--fp-ease), opacity var(--fp-motion) var(--fp-ease);\n background: color-mix(in oklab, var(--card, var(--background)) var(--fp-glass), transparent);\n border: 1px solid color-mix(in oklab, var(--border) 55%, transparent);\n border-radius: 14px;\n box-shadow: 0 18px 44px -22px rgb(0 0 0 / 0.30);\n}\n\n/* The shell panel under the pointer rises toward the camera; its items zoom a little. */\n${ROOT} [data-shell-object]:hover { --fp-z: var(--fp-hover-lift); }\n${ROOT} [data-shell-object] :is(button, a):not(:disabled) { transition: transform 180ms var(--fp-ease); }\n${ROOT} [data-shell-object] :is(button, a):not(:disabled):hover { transform: scale(1.045); }\n\n/* Behind a modal popup, everything steps back, dims and blurs lightly. A menu is not modal: it only lifts. */\n${ROOT}${MODAL_OPEN} ${OBJECTS} {\n --fp-z: calc(var(--fp-step) * -0.6);\n --fp-filter: brightness(calc(1 - var(--fp-dim) * 0.6)) saturate(0.9) blur(var(--fp-modal-blur));\n}\n\n/* Popups are objects too. Their recipe animations (tw-animate's enter/exit) are replaced by depth KEYFRAMES —\n keyframes, because the overlay library keeps a closing popup mounted only until its exit ANIMATION ends; a\n transition would be cut off. Each popup rests at its true size: depth shows while it travels.\n - A menu, popover or tooltip lifts off its trigger: the library publishes the trigger point as the transform\n origin, and perspective() grows the popup out of it.\n - A dialog (the command palette is one) rises from depth to the focal plane.\n - A sheet arrives from in front of the plane and leaves back into depth.\n Drawers and toasts keep their own motion: their libraries position and stack them with transforms. */\n${POPUPS.lift.map(([slot, origin]) => `${ROOT} [data-shell-overlay-layer] [data-slot=\"${slot}\"] { transform-origin: var(${origin}); }`).join('\\n')}\n${ROOT} [data-shell-overlay-layer] :is(${POPUPS.lift.map(([slot]) => `[data-slot=\"${slot}\"]`).join(', ')}):is(${SHELL_POPUP_OPEN_STATES.map((state) => `[data-state=\"${state}\"]`).join(', ')}) { animation: fp-lift-in calc(var(--fp-motion) * 0.6) var(--fp-ease) both; }\n${ROOT} [data-shell-overlay-layer] :is(${POPUPS.lift.map(([slot]) => `[data-slot=\"${slot}\"]`).join(', ')})[data-state=\"closed\"] { animation: fp-lift-out calc(var(--fp-motion) * 0.45) var(--fp-ease) both; }\n${ROOT} [data-shell-overlay-layer] :is(${POPUPS.rise.map((slot) => `[data-slot=\"${slot}\"]`).join(', ')})[data-state=\"open\"] { animation: fp-rise-in var(--fp-motion) var(--fp-ease) both; }\n${ROOT} [data-shell-overlay-layer] :is(${POPUPS.rise.map((slot) => `[data-slot=\"${slot}\"]`).join(', ')})[data-state=\"closed\"] { animation: fp-rise-out calc(var(--fp-motion) * 0.7) var(--fp-ease) both; }\n${ROOT} [data-shell-overlay-layer] [data-slot=\"${ShellPopupSlot.SHEET}\"][data-state=\"open\"] { animation: fp-arrive-in var(--fp-motion) var(--fp-ease) both; }\n${ROOT} [data-shell-overlay-layer] [data-slot=\"${ShellPopupSlot.SHEET}\"][data-state=\"closed\"] { animation: fp-arrive-out calc(var(--fp-motion) * 0.7) var(--fp-ease) both; }\n/* Popups are glass, a little more opaque than windows (they carry text you act on at once). Tooltips keep their own\n inverse colours. */\n${ROOT} [data-shell-overlay-layer] :is(${[...POPUPS.lift.filter(([slot]) => slot !== ShellPopupSlot.TOOLTIP).map(([slot]) => slot), ...POPUPS.rise, ShellPopupSlot.SHEET].map((slot) => `[data-slot=\"${slot}\"]`).join(', ')}) {\n background: color-mix(in oklab, var(--popover, var(--card, var(--background))) calc(var(--fp-glass) + 26%), transparent);\n -webkit-backdrop-filter: blur(24px) saturate(1.5);\n backdrop-filter: blur(24px) saturate(1.5);\n border-color: color-mix(in oklab, var(--border) 60%, transparent);\n}\n@keyframes fp-lift-in { from { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -0.35)); opacity: 0; } to { transform: none; opacity: 1; } }\n@keyframes fp-lift-out { from { transform: none; opacity: 1; } to { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -0.35)); opacity: 0; } }\n@keyframes fp-rise-in { from { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -1.4)); opacity: 0; } to { transform: none; opacity: 1; } }\n@keyframes fp-rise-out { from { transform: none; opacity: 1; } to { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -1.4)); opacity: 0; } }\n@keyframes fp-arrive-in { from { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * 0.9)); opacity: 0; } to { transform: none; opacity: 1; } }\n@keyframes fp-arrive-out { from { transform: none; opacity: 1; } to { transform: perspective(var(--fp-distance)) translate3d(0, 0, calc(var(--fp-step) * -0.5)); opacity: 0; } }\n\n/* The modal scrim: in the focal plane, stepping back and the light blur above ARE the scrim, so the engine's dark\n overlay (and its own backdrop blur) would double it into a heavy grey. Keep the overlay element (it still catches\n the outside click), just transparent. */\n${ROOT} [data-shell-overlay-layer] :is([data-slot=\"dialog-overlay\"], [data-slot=\"alert-dialog-overlay\"], [data-slot=\"sheet-overlay\"], [data-slot=\"drawer-overlay\"]) {\n background: transparent;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n}\n\n@media (prefers-reduced-motion: reduce) {\n /* !important: the motion rules above are more specific (the drifting fields, the item zoom), and the reader's\n setting must win over every one of them. */\n ${ROOT} ${OBJECTS}, ${ROOT} [data-shell-ghost], ${ROOT} [data-shell-object] :is(button, a), ${ROOT} [data-shell-overlay-layer] [data-slot] { transition-duration: 0ms !important; animation: none !important; }\n ${ROOT} .fp-backdrop i { animation: none !important; }\n}\n`;\n\n/**\n * Installs the stylesheet while at least one focal-plane layout is mounted, and removes it when the last one unmounts\n * (`installShellLayoutStylesheet`: a constructable stylesheet, with a `<style>` fallback). Returns the release function.\n */\nexport function installFocalPlaneStylesheet(doc: Document = document): () => void {\n return installShellLayoutStylesheet('focal-plane', FOCAL_PLANE_CSS, doc);\n}\n"]}
@@ -0,0 +1,27 @@
1
+ /** Where the vanishing point sits in the stage: centred, a little above the middle (the eye line of the prototype). */
2
+ export declare const VANISHING_POINT: {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ /**
7
+ * Keeps an object's `transform-origin` on the stage's ONE vanishing point, so objects that each carry their own
8
+ * `perspective()` are seen through a single still camera (see `focal-plane-stylesheet.ts`). Passed to the core's stage
9
+ * measurement (`useShellMotion`'s `onObjectMeasured`), which calls it for every object whenever one can have moved.
10
+ *
11
+ * The origin is written as two custom properties on the object (`--fp-ox`, `--fp-oy`): the vanishing point minus the
12
+ * object's offset in the stage, an offset read from the layout (transforms ignored), so an object stepped back right
13
+ * now is still seen from the right point. React leaves custom properties written this way alone.
14
+ */
15
+ export declare function writeVanishingOrigin(element: HTMLElement, offset: {
16
+ left: number;
17
+ top: number;
18
+ }, stage: HTMLElement): void;
19
+ /** The vanishing point in the coordinates of a box whose top-left sits at `offset` in the stage. */
20
+ export declare function vanishingOrigin(offset: {
21
+ left: number;
22
+ top: number;
23
+ }, stage: HTMLElement): {
24
+ x: number;
25
+ y: number;
26
+ };
27
+ //# sourceMappingURL=focal-plane-vanishing-point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focal-plane-vanishing-point.d.ts","sourceRoot":"","sources":["../../../src/focal-plane/focal-plane-vanishing-point.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,eAAO,MAAM,eAAe;;;CAAsB,CAAC;AAEnD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAI1H;AAED,oGAAoG;AACpG,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,WAAW,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAEnH"}
@@ -0,0 +1,21 @@
1
+ /** Where the vanishing point sits in the stage: centred, a little above the middle (the eye line of the prototype). */
2
+ export const VANISHING_POINT = { x: 0.5, y: 0.42 };
3
+ /**
4
+ * Keeps an object's `transform-origin` on the stage's ONE vanishing point, so objects that each carry their own
5
+ * `perspective()` are seen through a single still camera (see `focal-plane-stylesheet.ts`). Passed to the core's stage
6
+ * measurement (`useShellMotion`'s `onObjectMeasured`), which calls it for every object whenever one can have moved.
7
+ *
8
+ * The origin is written as two custom properties on the object (`--fp-ox`, `--fp-oy`): the vanishing point minus the
9
+ * object's offset in the stage, an offset read from the layout (transforms ignored), so an object stepped back right
10
+ * now is still seen from the right point. React leaves custom properties written this way alone.
11
+ */
12
+ export function writeVanishingOrigin(element, offset, stage) {
13
+ const { x, y } = vanishingOrigin(offset, stage);
14
+ element.style.setProperty('--fp-ox', `${x.toFixed(1)}px`);
15
+ element.style.setProperty('--fp-oy', `${y.toFixed(1)}px`);
16
+ }
17
+ /** The vanishing point in the coordinates of a box whose top-left sits at `offset` in the stage. */
18
+ export function vanishingOrigin(offset, stage) {
19
+ return { x: stage.clientWidth * VANISHING_POINT.x - offset.left, y: stage.clientHeight * VANISHING_POINT.y - offset.top };
20
+ }
21
+ //# sourceMappingURL=focal-plane-vanishing-point.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focal-plane-vanishing-point.js","sourceRoot":"","sources":["../../../src/focal-plane/focal-plane-vanishing-point.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAoB,EAAE,MAAqC,EAAE,KAAkB;IAClH,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAChD,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC1D,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC5D,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,eAAe,CAAC,MAAqC,EAAE,KAAkB;IACvF,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,eAAe,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,eAAe,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;AAC5H,CAAC","sourcesContent":["/** Where the vanishing point sits in the stage: centred, a little above the middle (the eye line of the prototype). */\nexport const VANISHING_POINT = { x: 0.5, y: 0.42 };\n\n/**\n * Keeps an object's `transform-origin` on the stage's ONE vanishing point, so objects that each carry their own\n * `perspective()` are seen through a single still camera (see `focal-plane-stylesheet.ts`). Passed to the core's stage\n * measurement (`useShellMotion`'s `onObjectMeasured`), which calls it for every object whenever one can have moved.\n *\n * The origin is written as two custom properties on the object (`--fp-ox`, `--fp-oy`): the vanishing point minus the\n * object's offset in the stage, an offset read from the layout (transforms ignored), so an object stepped back right\n * now is still seen from the right point. React leaves custom properties written this way alone.\n */\nexport function writeVanishingOrigin(element: HTMLElement, offset: { left: number; top: number }, stage: HTMLElement): void {\n const { x, y } = vanishingOrigin(offset, stage);\n element.style.setProperty('--fp-ox', `${x.toFixed(1)}px`);\n element.style.setProperty('--fp-oy', `${y.toFixed(1)}px`);\n}\n\n/** The vanishing point in the coordinates of a box whose top-left sits at `offset` in the stage. */\nexport function vanishingOrigin(offset: { left: number; top: number }, stage: HTMLElement): { x: number; y: number } {\n return { x: stage.clientWidth * VANISHING_POINT.x - offset.left, y: stage.clientHeight * VANISHING_POINT.y - offset.top };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { DesignSystemToken, ShellRegion } from '@wildo-ai/presets-components-models';
1
+ import { DesignSystemToken, ShellRegion, type ComponentStyleTheme, type ThemePersonality } from '@wildo-ai/presets-components-models';
2
2
  /** @wildo_source:part:start presets.3d.frame-style-overrides facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */
3
3
  /**
4
4
  * What the frame draws under one shell region.
@@ -131,11 +131,31 @@ export declare const INHERIT_FRAME_STYLES: Frame3DStyleCatalog;
131
131
  * width over the rails in that disposal, so the light falls from the header down.
132
132
  */
133
133
  export declare const HEADER_FIRST_FRAME_STYLES: Frame3DStyleCatalog;
134
+ /** @wildo_source:part:start presets.3d.frame-style-resolution facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */
134
135
  /**
135
- * The frame style for the active theme: the layout's catalog entry for a built-in theme id (its fallback for any
136
- * other id), then the application's `all` override, then its override for that theme id.
136
+ * The frame style for a point on the theme personality axes, in one layout's catalog (#2477).
137
+ *
138
+ * Starts from the catalog's fallback (so the layout's own light angle and background stay), then takes, per region,
139
+ * the corner radius from the theme the point's shape was copied from, the shadow from its elevation's, the frost,
140
+ * gradient and background glow from its material's, and the rim from its edge weight's. The default point gives the
141
+ * fallback exactly.
142
+ *
143
+ * @example
144
+ * import { cozyThemePersonality } from '@wildo-ai/presets-components/themes';
145
+ * deriveFrame3DThemeStyle(INHERIT_FRAME_STYLES, cozyThemePersonality); // cozy's radius, shadow and rim
146
+ */
147
+ export declare function deriveFrame3DThemeStyle(catalog: Frame3DStyleCatalog, personality: ThemePersonality): Frame3DThemeStyle;
148
+ /**
149
+ * The frame style for the active theme, then the application's `all` override, then its override for that theme id:
150
+ *
151
+ * 1. a built-in theme id takes the layout's own entry for it;
152
+ * 2. any other theme that records the point it was composed from (`personality`, which `composeTheme` sets) takes a
153
+ * style derived from that point ({@link deriveFrame3DThemeStyle}), so a theme composed from the brand's words gets
154
+ * a frame that matches its recipes;
155
+ * 3. anything else takes the layout's fallback.
137
156
  */
138
- export declare function resolveFrame3DThemeStyle(catalog: Frame3DStyleCatalog, themeId: string, overrides?: Frame3DStyleOverrides): Frame3DThemeStyle;
157
+ export declare function resolveFrame3DThemeStyle(catalog: Frame3DStyleCatalog, theme: Pick<ComponentStyleTheme, 'id' | 'personality'>, overrides?: Frame3DStyleOverrides): Frame3DThemeStyle;
158
+ /** @wildo_source:part:end presets.3d.frame-style-resolution */
139
159
  /**
140
160
  * The frame's verification sentinel: a neon green (`#39ff14`) that appears in no theme, token or palette in the
141
161
  * framework or the dogfood applications (checked 2026-09-29 by a repository search).
@@ -1 +1 @@
1
- {"version":3,"file":"frame-3d-style.d.ts","sourceRoot":"","sources":["../../../src/frame/frame-3d-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAErF,yIAAyI;AACzI;;;;;;GAMG;AACH,oBAAY,kBAAkB;IAC5B,0GAA0G;IAC1G,OAAO,YAAY;IACnB,yCAAyC;IACzC,IAAI,SAAS;CACd;AAED,iGAAiG;AACjG,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,KAAK,EAAE,iBAAiB,CAAC;IACzB,g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,EAAE,qBAAqB,GAAG,iBAAiB,CAG5I;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,yBAAyB,IAAI,qBAAqB,CAajE"}
1
+ {"version":3,"file":"frame-3d-style.d.ts","sourceRoot":"","sources":["../../../src/frame/frame-3d-style.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,WAAW,EAKX,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACtB,MAAM,qCAAqC,CAAC;AAE7C,yIAAyI;AACzI;;;;;;GAMG;AACH,oBAAY,kBAAkB;IAC5B,0GAA0G;IAC1G,OAAO,YAAY;IACnB,yCAAyC;IACzC,IAAI,SAAS;CACd;AAED,iGAAiG;AACjG,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,KAAK,EAAE,iBAAiB,CAAC;IACzB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,mGAAmG;AACnG,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,kFAAkF;IAClF,SAAS,EAAE,iBAAiB,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qGAAqG;IACrG,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,eAAe,CAAC;I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;AAEF;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,yBAAyB,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC;CAChE;AACD,8DAA8D;AAE9D,0GAA0G;AAC1G,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;IAC5D,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AA6DD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,mBAoElC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,mBAA8D,CAAC;AA0EvG,0IAA0I;AAC1I;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,gBAAgB,GAAG,iBAAiB,CAkBtH;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,aAAa,CAAC,EACtD,SAAS,CAAC,EAAE,qBAAqB,GAChC,iBAAiB,CAOnB;AACD,+DAA+D;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,yBAAyB,IAAI,qBAAqB,CAajE"}
@@ -1,4 +1,4 @@
1
- import { DesignSystemToken, ShellRegion } from '@wildo-ai/presets-components-models';
1
+ import { DesignSystemToken, ShellRegion, ThemeEdgeWeight, ThemeElevation, ThemeMaterial, ThemeShape, } from '@wildo-ai/presets-components-models';
2
2
  /** @wildo_source:part:start presets.3d.frame-style-overrides facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */
3
3
  /**
4
4
  * What the frame draws under one shell region.
@@ -188,13 +188,93 @@ function mergeTheme(base, override) {
188
188
  };
189
189
  }
190
190
  /**
191
- * The frame style for the active theme: the layout's catalog entry for a built-in theme id (its fallback for any
192
- * other id), then the application's `all` override, then its override for that theme id.
191
+ * Which built-in theme each personality-axis value is copied from, for the part of the frame that axis governs
192
+ * (#2477). The same sources the 2D axes name (`ThemeShape.ROUND` is "cozy's radii", `ThemeElevation.HARD_OFFSET`
193
+ * is "neo-brutalist's shadow"), so a point's frame takes the frame value of the theme its recipes took theirs from.
194
+ *
195
+ * - shape → the slab's corner radius;
196
+ * - elevation → its shadow;
197
+ * - material → how much it lets the scene through and how much light plays on it (frost, gradient, background glow):
198
+ * a glass point frosts like glass, a solid one like the default;
199
+ * - edge weight → its rim. `INK` takes editorial's, the first theme that axis value names.
200
+ *
201
+ * The other six axes (density, motion, type voice, danger style, selection emphasis, letter case) govern nothing the
202
+ * frame draws. Records over every member, so a value added to one of these four axes fails to compile here.
203
+ *
204
+ * Rejected: deriving the slab from the point by formula (radius = shape index × k). The catalog entries are tuned by
205
+ * eye per theme; copying them keeps one set of tuned numbers, and a derived point's frame is always one a built-in
206
+ * theme already shows.
207
+ */
208
+ const FRAME_SOURCE_BY_SHAPE = {
209
+ [ThemeShape.SHARP]: Frame3DBuiltInThemeId.EDITORIAL,
210
+ [ThemeShape.SOFT]: Frame3DBuiltInThemeId.DEFAULT,
211
+ [ThemeShape.ROUND]: Frame3DBuiltInThemeId.COZY,
212
+ };
213
+ const FRAME_SOURCE_BY_ELEVATION = {
214
+ [ThemeElevation.FLAT]: Frame3DBuiltInThemeId.DENSE,
215
+ [ThemeElevation.SOFT]: Frame3DBuiltInThemeId.DEFAULT,
216
+ [ThemeElevation.LAYERED]: Frame3DBuiltInThemeId.COZY,
217
+ [ThemeElevation.HARD_OFFSET]: Frame3DBuiltInThemeId.NEO_BRUTALIST,
218
+ };
219
+ const FRAME_SOURCE_BY_MATERIAL = {
220
+ [ThemeMaterial.SOLID]: Frame3DBuiltInThemeId.DEFAULT,
221
+ [ThemeMaterial.GLASS]: Frame3DBuiltInThemeId.GLASS,
222
+ };
223
+ const FRAME_SOURCE_BY_EDGE_WEIGHT = {
224
+ [ThemeEdgeWeight.HAIRLINE]: Frame3DBuiltInThemeId.DEFAULT,
225
+ [ThemeEdgeWeight.INK]: Frame3DBuiltInThemeId.EDITORIAL,
226
+ [ThemeEdgeWeight.BOLD]: Frame3DBuiltInThemeId.NEO_BRUTALIST,
227
+ };
228
+ /** @wildo_source:part:start presets.3d.frame-style-resolution facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */
229
+ /**
230
+ * The frame style for a point on the theme personality axes, in one layout's catalog (#2477).
231
+ *
232
+ * Starts from the catalog's fallback (so the layout's own light angle and background stay), then takes, per region,
233
+ * the corner radius from the theme the point's shape was copied from, the shadow from its elevation's, the frost,
234
+ * gradient and background glow from its material's, and the rim from its edge weight's. The default point gives the
235
+ * fallback exactly.
236
+ *
237
+ * @example
238
+ * import { cozyThemePersonality } from '@wildo-ai/presets-components/themes';
239
+ * deriveFrame3DThemeStyle(INHERIT_FRAME_STYLES, cozyThemePersonality); // cozy's radius, shadow and rim
240
+ */
241
+ export function deriveFrame3DThemeStyle(catalog, personality) {
242
+ const base = catalog.fallback;
243
+ const shape = catalog.byThemeId[FRAME_SOURCE_BY_SHAPE[personality.shape]];
244
+ const elevation = catalog.byThemeId[FRAME_SOURCE_BY_ELEVATION[personality.elevation]];
245
+ const material = catalog.byThemeId[FRAME_SOURCE_BY_MATERIAL[personality.material]];
246
+ const edge = catalog.byThemeId[FRAME_SOURCE_BY_EDGE_WEIGHT[personality.edgeWeight]];
247
+ const regions = { ...base.regions };
248
+ for (const region of Object.values(ShellRegion)) {
249
+ regions[region] = {
250
+ ...base.regions[region],
251
+ radiusScale: shape.regions[region].radiusScale,
252
+ shadow: elevation.regions[region].shadow,
253
+ frost: material.regions[region].frost,
254
+ gradient: material.regions[region].gradient,
255
+ rim: edge.regions[region].rim,
256
+ };
257
+ }
258
+ return { ...base, background: { ...base.background, glow: material.background.glow }, regions };
259
+ }
260
+ /**
261
+ * The frame style for the active theme, then the application's `all` override, then its override for that theme id:
262
+ *
263
+ * 1. a built-in theme id takes the layout's own entry for it;
264
+ * 2. any other theme that records the point it was composed from (`personality`, which `composeTheme` sets) takes a
265
+ * style derived from that point ({@link deriveFrame3DThemeStyle}), so a theme composed from the brand's words gets
266
+ * a frame that matches its recipes;
267
+ * 3. anything else takes the layout's fallback.
193
268
  */
194
- export function resolveFrame3DThemeStyle(catalog, themeId, overrides) {
195
- const base = isBuiltInThemeId(themeId) ? catalog.byThemeId[themeId] : catalog.fallback;
196
- return mergeTheme(mergeTheme(base, overrides?.all), overrides?.byThemeId?.[themeId]);
269
+ export function resolveFrame3DThemeStyle(catalog, theme, overrides) {
270
+ const base = isBuiltInThemeId(theme.id)
271
+ ? catalog.byThemeId[theme.id]
272
+ : theme.personality === undefined
273
+ ? catalog.fallback
274
+ : deriveFrame3DThemeStyle(catalog, theme.personality);
275
+ return mergeTheme(mergeTheme(base, overrides?.all), overrides?.byThemeId?.[theme.id]);
197
276
  }
277
+ /** @wildo_source:part:end presets.3d.frame-style-resolution */
198
278
  /**
199
279
  * The frame's verification sentinel: a neon green (`#39ff14`) that appears in no theme, token or palette in the
200
280
  * framework or the dogfood applications (checked 2026-09-29 by a repository search).
@@ -1 +1 @@
1
- {"version":3,"file":"frame-3d-style.js","sourceRoot":"","sources":["../../../../src/frame/frame-3d-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAErF,yIAAyI;AACzI;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,0GAA0G;IAC1G,yCAAmB,CAAA;IACnB,yCAAyC;IACzC,mCAAa,CAAA;AACf,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAyED;;;GAGG;AACH,MAAM,CAAN,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IAC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AAG,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["import { DesignSystemToken, ShellRegion } from '@wildo-ai/presets-components-models';\n\n/** @wildo_source:part:start presets.3d.frame-style-overrides facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * What the frame draws under one shell region.\n *\n * A frame style is the 3D frame's OWN vocabulary: it says how a region's slab looks, never how the region\n * itself looks. The region stays the 2D preset's HTML, with its recipes and Tailwind classes untouched; the\n * engine's theme and recipe schemas are not extended for the frame.\n */\nexport enum Frame3DSurfaceKind {\n /** A frosted slab: a translucent tint over the in-scene background, with a rim and an optional shadow. */\n FROSTED = 'frosted',\n /** Nothing is drawn under the region. */\n NONE = 'none',\n}\n\n/** The rim: a thin edge line along the slab, emphasised while the pointer is over the region. */\nexport interface Frame3DRimStyle {\n /** The colour token of the rim. */\n token: DesignSystemToken;\n /** Rim opacity at rest, 0–1. */\n opacity: number;\n /** Rim opacity while the pointer is over the region, 0–1. The only thing hover changes. */\n hoverOpacity: number;\n /** Rim width as a multiple of the `border-width` token. */\n widthScale: number;\n}\n\n/** The slab's shadow, drawn on the scene background just outside the slab. Its colour is black. */\nexport interface Frame3DShadowStyle {\n offsetXPx: number;\n offsetYPx: number;\n /** Blur radius in CSS pixels; 0 draws a hard shadow. */\n blurPx: number;\n /** Shadow opacity, 0–1. */\n opacity: number;\n}\n\n/** How the frame draws under one region kind. */\nexport interface Frame3DRegionStyle {\n surface: Frame3DSurfaceKind;\n /** The colour token the frost is tinted with. Ignored when `tintColor` is set. */\n tintToken: DesignSystemToken;\n /**\n * An explicit CSS colour for the frost instead of a token: a brand colour, or the verification sentinel\n * ({@link createSentinelFrameStyles}). The contrast bound still applies to it.\n */\n tintColor?: string;\n /** Frost opacity over the scene background, 0–1. A glass theme's navigation material replaces it. */\n frost: number;\n /** How much lighter the lit side of the slab is than its shaded side, 0–1. */\n gradient: number;\n /** Corner radius as a multiple of the `radius` token. */\n radiusScale: number;\n rim: Frame3DRimStyle;\n shadow: Frame3DShadowStyle;\n}\n\n/** The in-scene background the slabs sit on: the page's own `backgroundLayer` cannot be sampled by WebGL. */\nexport interface Frame3DBackgroundStyle {\n /** The base colour token. */\n baseToken: DesignSystemToken;\n /** The token of the glow on the lit side. */\n glowToken: DesignSystemToken;\n /** Glow strength: how far the lit side moves from the base colour toward the glow colour, 0–1. */\n glow: number;\n}\n\n/** Everything the frame draws for one theme. `regions` is total over `ShellRegion`: a new region kind must be styled. */\nexport interface Frame3DThemeStyle {\n background: Frame3DBackgroundStyle;\n /**\n * The direction the light comes from, in degrees, y UP: 0 = from the right, 90 = from the top. (A glass\n * navigation material replaces it, converted from the engine's y-down convention.)\n */\n lightAngleDeg: number;\n /**\n * The colour of the light: the lit side of every slab moves toward it. `primary` by default — the colour the\n * background's glow uses too — so the lit side takes a cast of the theme's own light. (A surface token would be\n * the frost's own colour, and a slab lit by itself shows no gradient at all.)\n */\n lightToken: DesignSystemToken;\n /** In dark mode the lit side moves this share of the way it does in light mode (a dimmer light rig), 0–1. */\n darkModeLightStrength: number;\n regions: Record<ShellRegion, Frame3DRegionStyle>;\n}\n\n/**\n * The ids of the themes the framework ships, which the built-in frame styles are keyed on. Theme ids are an\n * open vocabulary (an application can author its own theme); any id not listed here takes the fallback style.\n */\nexport enum Frame3DBuiltInThemeId {\n DEFAULT = 'default',\n COZY = 'cozy',\n DENSE = 'dense',\n EDITORIAL = 'editorial',\n GLASS = 'glass',\n NEO_BRUTALIST = 'neo-brutalist',\n TERMINAL = 'terminal',\n TRADING = 'trading',\n}\n\n/** A partial frame style an application layers over a built-in one; nested objects merge key by key. */\nexport interface Frame3DThemeStyleOverride {\n background?: Partial<Frame3DBackgroundStyle>;\n lightAngleDeg?: number;\n lightToken?: DesignSystemToken;\n darkModeLightStrength?: number;\n regions?: Partial<Record<ShellRegion, Frame3DRegionStyleOverride>>;\n}\n\nexport type Frame3DRegionStyleOverride = Partial<Omit<Frame3DRegionStyle, 'rim' | 'shadow'>> & {\n rim?: Partial<Frame3DRimStyle>;\n shadow?: Partial<Frame3DShadowStyle>;\n};\n\n/**\n * An application's frame-style overrides, passed to `register3DLayout({ frameStyles })`. `all` applies to\n * every theme; `byThemeId` applies to one theme id and is layered after `all`.\n */\nexport interface Frame3DStyleOverrides {\n all?: Frame3DThemeStyleOverride;\n byThemeId?: Partial<Record<string, Frame3DThemeStyleOverride>>;\n}\n/** @wildo_source:part:end presets.3d.frame-style-overrides */\n\n/** The styles a layout's scene ships: one per built-in theme, and the fallback for any other theme id. */\nexport interface Frame3DStyleCatalog {\n byThemeId: Record<Frame3DBuiltInThemeId, Frame3DThemeStyle>;\n fallback: Frame3DThemeStyle;\n}\n\nconst NO_SHADOW: Frame3DShadowStyle = { offsetXPx: 0, offsetYPx: 0, blurPx: 0, opacity: 0 };\n\n/**\n * One theme's region table from a chrome style (the bars and rails) and a content style (the `<main>`). Written\n * as an object literal over every `ShellRegion` member, so a member added to the enum fails to compile here\n * instead of silently falling through to nothing.\n */\nfunction regionStyles(chrome: Frame3DRegionStyle, content: Frame3DRegionStyle): Record<ShellRegion, Frame3DRegionStyle> {\n return {\n [ShellRegion.MENUBAR]: chrome,\n [ShellRegion.SIDEBAR]: chrome,\n [ShellRegion.TOOLBAR]: chrome,\n [ShellRegion.ACTIVITY_BAR]: chrome,\n [ShellRegion.UTILITY_PANEL]: chrome,\n [ShellRegion.STATUS_BAR]: chrome,\n [ShellRegion.CONTENT]: content,\n };\n}\n\nfunction theme(input: {\n radiusScale: number;\n frost: number;\n contentFrost: number;\n gradient: number;\n rim: Frame3DRimStyle;\n shadow: Frame3DShadowStyle;\n glow: number;\n glowToken?: DesignSystemToken;\n lightAngleDeg?: number;\n}): Frame3DThemeStyle {\n const chrome: Frame3DRegionStyle = {\n surface: Frame3DSurfaceKind.FROSTED,\n tintToken: DesignSystemToken.SURFACE_RAISED,\n frost: input.frost,\n gradient: input.gradient,\n radiusScale: input.radiusScale,\n rim: input.rim,\n shadow: input.shadow,\n };\n const content: Frame3DRegionStyle = { ...chrome, tintToken: DesignSystemToken.SURFACE_DEFAULT, frost: input.contentFrost };\n return {\n background: { baseToken: DesignSystemToken.BACKGROUND, glowToken: input.glowToken ?? DesignSystemToken.PRIMARY, glow: input.glow },\n lightAngleDeg: input.lightAngleDeg ?? 110,\n lightToken: DesignSystemToken.PRIMARY,\n darkModeLightStrength: 0.5,\n regions: regionStyles(chrome, content),\n };\n}\n\nconst DEFAULT_STYLE = theme({\n radiusScale: 1,\n frost: 0.5,\n contentFrost: 0.55,\n gradient: 0.06,\n rim: { token: DesignSystemToken.BORDER, opacity: 0.5, hoverOpacity: 0.9, widthScale: 1 },\n shadow: { offsetXPx: 0, offsetYPx: 6, blurPx: 18, opacity: 0.12 },\n glow: 0.08,\n});\n\n/**\n * The INHERIT layout's styles. Each built-in entry expresses its theme's character in the frame's own terms:\n * cozy is softer and rounder, dense and trading are tight and flat, editorial is nearly square and quiet,\n * neo-brutalist is solid with a heavy rim and a hard offset shadow, terminal is square with a primary rim.\n * Colours always come from the tokens; a style only chooses WHICH token and how strongly.\n */\nexport const INHERIT_FRAME_STYLES: Frame3DStyleCatalog = {\n byThemeId: {\n [Frame3DBuiltInThemeId.DEFAULT]: DEFAULT_STYLE,\n [Frame3DBuiltInThemeId.COZY]: theme({\n radiusScale: 1.5,\n frost: 0.6,\n contentFrost: 0.62,\n gradient: 0.08,\n rim: { token: DesignSystemToken.BORDER, opacity: 0.35, hoverOpacity: 0.75, widthScale: 1 },\n shadow: { offsetXPx: 0, offsetYPx: 10, blurPx: 28, opacity: 0.1 },\n glow: 0.1,\n }),\n [Frame3DBuiltInThemeId.DENSE]: theme({\n radiusScale: 0.5,\n frost: 0.4,\n contentFrost: 0.45,\n gradient: 0.03,\n rim: { token: DesignSystemToken.BORDER, opacity: 0.6, hoverOpacity: 0.9, widthScale: 1 },\n shadow: NO_SHADOW,\n glow: 0.04,\n }),\n [Frame3DBuiltInThemeId.EDITORIAL]: theme({\n radiusScale: 0.25,\n frost: 0.3,\n contentFrost: 0.35,\n gradient: 0,\n rim: { token: DesignSystemToken.BORDER, opacity: 0.25, hoverOpacity: 0.5, widthScale: 1 },\n shadow: NO_SHADOW,\n glow: 0.03,\n }),\n [Frame3DBuiltInThemeId.GLASS]: theme({\n radiusScale: 1.25,\n frost: 0.3,\n contentFrost: 0.35,\n gradient: 0.12,\n rim: { token: DesignSystemToken.BORDER_STRONG, opacity: 0.6, hoverOpacity: 1, widthScale: 1 },\n shadow: { offsetXPx: 0, offsetYPx: 8, blurPx: 24, opacity: 0.15 },\n glow: 0.14,\n }),\n [Frame3DBuiltInThemeId.NEO_BRUTALIST]: theme({\n radiusScale: 0,\n frost: 0.92,\n contentFrost: 0.92,\n gradient: 0,\n rim: { token: DesignSystemToken.FOREGROUND, opacity: 1, hoverOpacity: 1, widthScale: 2 },\n shadow: { offsetXPx: 4, offsetYPx: 4, blurPx: 0, opacity: 1 },\n glow: 0,\n }),\n [Frame3DBuiltInThemeId.TERMINAL]: theme({\n radiusScale: 0,\n frost: 0.25,\n contentFrost: 0.3,\n gradient: 0,\n rim: { token: DesignSystemToken.PRIMARY, opacity: 0.5, hoverOpacity: 0.9, widthScale: 1 },\n shadow: NO_SHADOW,\n glow: 0.12,\n }),\n [Frame3DBuiltInThemeId.TRADING]: theme({\n radiusScale: 0.5,\n frost: 0.45,\n contentFrost: 0.5,\n gradient: 0.02,\n rim: { token: DesignSystemToken.BORDER, opacity: 0.45, hoverOpacity: 0.8, widthScale: 1 },\n shadow: NO_SHADOW,\n glow: 0.05,\n }),\n },\n fallback: DEFAULT_STYLE,\n};\n\n/**\n * The HEADER_FIRST layout's styles: the INHERIT styles, lit from straight above — the menubar spans the whole\n * width over the rails in that disposal, so the light falls from the header down.\n */\nexport const HEADER_FIRST_FRAME_STYLES: Frame3DStyleCatalog = withLightAngle(INHERIT_FRAME_STYLES, 90);\n\nfunction withLightAngle(catalog: Frame3DStyleCatalog, lightAngleDeg: number): Frame3DStyleCatalog {\n const byThemeId = {} as Record<Frame3DBuiltInThemeId, Frame3DThemeStyle>;\n for (const id of Object.values(Frame3DBuiltInThemeId)) byThemeId[id] = { ...catalog.byThemeId[id], lightAngleDeg };\n return { byThemeId, fallback: { ...catalog.fallback, lightAngleDeg } };\n}\n\nfunction isBuiltInThemeId(id: string): id is Frame3DBuiltInThemeId {\n return (Object.values(Frame3DBuiltInThemeId) as string[]).includes(id);\n}\n\nfunction mergeTheme(base: Frame3DThemeStyle, override: Frame3DThemeStyleOverride | undefined): Frame3DThemeStyle {\n if (!override) return base;\n const regions = { ...base.regions };\n for (const region of Object.values(ShellRegion)) {\n const regionOverride = override.regions?.[region];\n if (!regionOverride) continue;\n const current = regions[region];\n regions[region] = {\n ...current,\n ...regionOverride,\n rim: { ...current.rim, ...regionOverride.rim },\n shadow: { ...current.shadow, ...regionOverride.shadow },\n };\n }\n return {\n background: { ...base.background, ...override.background },\n lightAngleDeg: override.lightAngleDeg ?? base.lightAngleDeg,\n lightToken: override.lightToken ?? base.lightToken,\n darkModeLightStrength: override.darkModeLightStrength ?? base.darkModeLightStrength,\n regions,\n };\n}\n\n/**\n * The frame style for the active theme: the layout's catalog entry for a built-in theme id (its fallback for any\n * other id), then the application's `all` override, then its override for that theme id.\n */\nexport function resolveFrame3DThemeStyle(catalog: Frame3DStyleCatalog, themeId: string, overrides?: Frame3DStyleOverrides): Frame3DThemeStyle {\n const base = isBuiltInThemeId(themeId) ? catalog.byThemeId[themeId] : catalog.fallback;\n return mergeTheme(mergeTheme(base, overrides?.all), overrides?.byThemeId?.[themeId]);\n}\n\n/**\n * The frame's verification sentinel: a neon green (`#39ff14`) that appears in no theme, token or palette in the\n * framework or the dogfood applications (checked 2026-09-29 by a repository search).\n *\n * That absence is the point. A cover check counts sentinel pixels in a screenshot: one where a region is\n * transparent over its slab is expected, one over a region's CONTENT means the canvas covered it — and a colour\n * a theme could also produce would make that count meaningless.\n */\nexport const FRAME_SENTINEL_COLOR = '#39ff14';\n\n/**\n * Frame-style overrides that draw every region as a flat, square, rimless, shadowless slab in\n * {@link FRAME_SENTINEL_COLOR}, for a cover-and-alignment check: `register3DLayout({ frameStyles:\n * createSentinelFrameStyles() })`. The contrast bound still applies, so run the check where the sentinel passes\n * it against the foreground (a light mode, whose foreground is dark) — and assert the sentinel is actually\n * visible where regions are transparent, or a bound-adjusted colour would read as \"nothing covered\".\n */\nexport function createSentinelFrameStyles(): Frame3DStyleOverrides {\n const sentinel: Frame3DRegionStyleOverride = {\n surface: Frame3DSurfaceKind.FROSTED,\n tintColor: FRAME_SENTINEL_COLOR,\n frost: 1,\n gradient: 0,\n radiusScale: 0,\n rim: { opacity: 0, hoverOpacity: 0 },\n shadow: NO_SHADOW,\n };\n const regions: Partial<Record<ShellRegion, Frame3DRegionStyleOverride>> = {};\n for (const region of Object.values(ShellRegion)) regions[region] = sentinel;\n return { all: { regions } };\n}\n"]}
1
+ {"version":3,"file":"frame-3d-style.js","sourceRoot":"","sources":["../../../src/frame/frame-3d-style.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,cAAc,EACd,aAAa,EACb,UAAU,GAGX,MAAM,qCAAqC,CAAC;AAE7C,yIAAyI;AACzI;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,0GAA0G;IAC1G,yCAAmB,CAAA;IACnB,yCAAyC;IACzC,mCAAa,CAAA;AACf,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAyED;;;GAGG;AACH,MAAM,CAAN,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,sCAAa,CAAA;IACb,wCAAe,CAAA;IACf,gDAAuB,CAAA;IACvB,wCAAe,CAAA;IACf,wDAA+B,CAAA;IAC/B,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;AACrB,CAAC,EATW,qBAAqB,KAArB,qBAAqB,QAShC;AAgCD,MAAM,SAAS,GAAuB,EA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KAAK,CAAC,EAAE,CAAC;QACrC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,CAAC,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS;YAC/B,CAAC,CAAC,OAAO,CAAC,QAAQ;YAClB,CAAC,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC1D,OAAO,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;AACxF,CAAC;AACD,+DAA+D;AAE/D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB;IACvC,MAAM,QAAQ,GAA+B;QAC3C,OAAO,EAAE,kBAAkB,CAAC,OAAO;QACnC,SAAS,EAAE,oBAAoB;QAC/B,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,CAAC;QACX,WAAW,EAAE,CAAC;QACd,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE;QACpC,MAAM,EAAE,SAAS;KAClB,CAAC;IACF,MAAM,OAAO,GAA6D,EAAE,CAAC;IAC7E,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC;QAAE,OAAO,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;IAC5E,OAAO,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["import {\n DesignSystemToken,\n ShellRegion,\n ThemeEdgeWeight,\n ThemeElevation,\n ThemeMaterial,\n ThemeShape,\n type ComponentStyleTheme,\n type ThemePersonality,\n} from '@wildo-ai/presets-components-models';\n\n/** @wildo_source:part:start presets.3d.frame-style-overrides facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * What the frame draws under one shell region.\n *\n * A frame style is the 3D frame's OWN vocabulary: it says how a region's slab looks, never how the region\n * itself looks. The region stays the 2D preset's HTML, with its recipes and Tailwind classes untouched; the\n * engine's theme and recipe schemas are not extended for the frame.\n */\nexport enum Frame3DSurfaceKind {\n /** A frosted slab: a translucent tint over the in-scene background, with a rim and an optional shadow. */\n FROSTED = 'frosted',\n /** Nothing is drawn under the region. */\n NONE = 'none',\n}\n\n/** The rim: a thin edge line along the slab, emphasised while the pointer is over the region. */\nexport interface Frame3DRimStyle {\n /** The colour token of the rim. */\n token: DesignSystemToken;\n /** Rim opacity at rest, 0–1. */\n opacity: number;\n /** Rim opacity while the pointer is over the region, 0–1. The only thing hover changes. */\n hoverOpacity: number;\n /** Rim width as a multiple of the `border-width` token. */\n widthScale: number;\n}\n\n/** The slab's shadow, drawn on the scene background just outside the slab. Its colour is black. */\nexport interface Frame3DShadowStyle {\n offsetXPx: number;\n offsetYPx: number;\n /** Blur radius in CSS pixels; 0 draws a hard shadow. */\n blurPx: number;\n /** Shadow opacity, 0–1. */\n opacity: number;\n}\n\n/** How the frame draws under one region kind. */\nexport interface Frame3DRegionStyle {\n surface: Frame3DSurfaceKind;\n /** The colour token the frost is tinted with. Ignored when `tintColor` is set. */\n tintToken: DesignSystemToken;\n /**\n * An explicit CSS colour for the frost instead of a token: a brand colour, or the verification sentinel\n * ({@link createSentinelFrameStyles}). The contrast bound still applies to it.\n */\n tintColor?: string;\n /** Frost opacity over the scene background, 0–1. A glass theme's navigation material replaces it. */\n frost: number;\n /** How much lighter the lit side of the slab is than its shaded side, 0–1. */\n gradient: number;\n /** Corner radius as a multiple of the `radius` token. */\n radiusScale: number;\n rim: Frame3DRimStyle;\n shadow: Frame3DShadowStyle;\n}\n\n/** The in-scene background the slabs sit on: the page's own `backgroundLayer` cannot be sampled by WebGL. */\nexport interface Frame3DBackgroundStyle {\n /** The base colour token. */\n baseToken: DesignSystemToken;\n /** The token of the glow on the lit side. */\n glowToken: DesignSystemToken;\n /** Glow strength: how far the lit side moves from the base colour toward the glow colour, 0–1. */\n glow: number;\n}\n\n/** Everything the frame draws for one theme. `regions` is total over `ShellRegion`: a new region kind must be styled. */\nexport interface Frame3DThemeStyle {\n background: Frame3DBackgroundStyle;\n /**\n * The direction the light comes from, in degrees, y UP: 0 = from the right, 90 = from the top. (A glass\n * navigation material replaces it, converted from the engine's y-down convention.)\n */\n lightAngleDeg: number;\n /**\n * The colour of the light: the lit side of every slab moves toward it. `primary` by default — the colour the\n * background's glow uses too — so the lit side takes a cast of the theme's own light. (A surface token would be\n * the frost's own colour, and a slab lit by itself shows no gradient at all.)\n */\n lightToken: DesignSystemToken;\n /** In dark mode the lit side moves this share of the way it does in light mode (a dimmer light rig), 0–1. */\n darkModeLightStrength: number;\n regions: Record<ShellRegion, Frame3DRegionStyle>;\n}\n\n/**\n * The ids of the themes the framework ships, which the built-in frame styles are keyed on. Theme ids are an\n * open vocabulary (an application can author its own theme); any id not listed here takes the fallback style.\n */\nexport enum Frame3DBuiltInThemeId {\n DEFAULT = 'default',\n COZY = 'cozy',\n DENSE = 'dense',\n EDITORIAL = 'editorial',\n GLASS = 'glass',\n NEO_BRUTALIST = 'neo-brutalist',\n TERMINAL = 'terminal',\n TRADING = 'trading',\n}\n\n/** A partial frame style an application layers over a built-in one; nested objects merge key by key. */\nexport interface Frame3DThemeStyleOverride {\n background?: Partial<Frame3DBackgroundStyle>;\n lightAngleDeg?: number;\n lightToken?: DesignSystemToken;\n darkModeLightStrength?: number;\n regions?: Partial<Record<ShellRegion, Frame3DRegionStyleOverride>>;\n}\n\nexport type Frame3DRegionStyleOverride = Partial<Omit<Frame3DRegionStyle, 'rim' | 'shadow'>> & {\n rim?: Partial<Frame3DRimStyle>;\n shadow?: Partial<Frame3DShadowStyle>;\n};\n\n/**\n * An application's frame-style overrides, passed to `register3DLayout({ frameStyles })`. `all` applies to\n * every theme; `byThemeId` applies to one theme id and is layered after `all`.\n */\nexport interface Frame3DStyleOverrides {\n all?: Frame3DThemeStyleOverride;\n byThemeId?: Partial<Record<string, Frame3DThemeStyleOverride>>;\n}\n/** @wildo_source:part:end presets.3d.frame-style-overrides */\n\n/** The styles a layout's scene ships: one per built-in theme, and the fallback for any other theme id. */\nexport interface Frame3DStyleCatalog {\n byThemeId: Record<Frame3DBuiltInThemeId, Frame3DThemeStyle>;\n fallback: Frame3DThemeStyle;\n}\n\nconst NO_SHADOW: Frame3DShadowStyle = { offsetXPx: 0, offsetYPx: 0, blurPx: 0, opacity: 0 };\n\n/**\n * One theme's region table from a chrome style (the bars and rails) and a content style (the `<main>`). Written\n * as an object literal over every `ShellRegion` member, so a member added to the enum fails to compile here\n * instead of silently falling through to nothing.\n */\nfunction regionStyles(chrome: Frame3DRegionStyle, content: Frame3DRegionStyle): Record<ShellRegion, Frame3DRegionStyle> {\n return {\n [ShellRegion.MENUBAR]: chrome,\n [ShellRegion.SIDEBAR]: chrome,\n [ShellRegion.TOOLBAR]: chrome,\n [ShellRegion.ACTIVITY_BAR]: chrome,\n [ShellRegion.UTILITY_PANEL]: chrome,\n [ShellRegion.STATUS_BAR]: chrome,\n [ShellRegion.CONTENT]: content,\n };\n}\n\nfunction theme(input: {\n radiusScale: number;\n frost: number;\n contentFrost: number;\n gradient: number;\n rim: Frame3DRimStyle;\n shadow: Frame3DShadowStyle;\n glow: number;\n glowToken?: DesignSystemToken;\n lightAngleDeg?: number;\n}): Frame3DThemeStyle {\n const chrome: Frame3DRegionStyle = {\n surface: Frame3DSurfaceKind.FROSTED,\n tintToken: DesignSystemToken.SURFACE_RAISED,\n frost: input.frost,\n gradient: input.gradient,\n radiusScale: input.radiusScale,\n rim: input.rim,\n shadow: input.shadow,\n };\n const content: Frame3DRegionStyle = { ...chrome, tintToken: DesignSystemToken.SURFACE_DEFAULT, frost: input.contentFrost };\n return {\n background: { baseToken: DesignSystemToken.BACKGROUND, glowToken: input.glowToken ?? DesignSystemToken.PRIMARY, glow: input.glow },\n lightAngleDeg: input.lightAngleDeg ?? 110,\n lightToken: DesignSystemToken.PRIMARY,\n darkModeLightStrength: 0.5,\n regions: regionStyles(chrome, content),\n };\n}\n\nconst DEFAULT_STYLE = theme({\n radiusScale: 1,\n frost: 0.5,\n contentFrost: 0.55,\n gradient: 0.06,\n rim: { token: DesignSystemToken.BORDER, opacity: 0.5, hoverOpacity: 0.9, widthScale: 1 },\n shadow: { offsetXPx: 0, offsetYPx: 6, blurPx: 18, opacity: 0.12 },\n glow: 0.08,\n});\n\n/**\n * The INHERIT layout's styles. Each built-in entry expresses its theme's character in the frame's own terms:\n * cozy is softer and rounder, dense and trading are tight and flat, editorial is nearly square and quiet,\n * neo-brutalist is solid with a heavy rim and a hard offset shadow, terminal is square with a primary rim.\n * Colours always come from the tokens; a style only chooses WHICH token and how strongly.\n */\nexport const INHERIT_FRAME_STYLES: Frame3DStyleCatalog = {\n byThemeId: {\n [Frame3DBuiltInThemeId.DEFAULT]: DEFAULT_STYLE,\n [Frame3DBuiltInThemeId.COZY]: theme({\n radiusScale: 1.5,\n frost: 0.6,\n contentFrost: 0.62,\n gradient: 0.08,\n rim: { token: DesignSystemToken.BORDER, opacity: 0.35, hoverOpacity: 0.75, widthScale: 1 },\n shadow: { offsetXPx: 0, offsetYPx: 10, blurPx: 28, opacity: 0.1 },\n glow: 0.1,\n }),\n [Frame3DBuiltInThemeId.DENSE]: theme({\n radiusScale: 0.5,\n frost: 0.4,\n contentFrost: 0.45,\n gradient: 0.03,\n rim: { token: DesignSystemToken.BORDER, opacity: 0.6, hoverOpacity: 0.9, widthScale: 1 },\n shadow: NO_SHADOW,\n glow: 0.04,\n }),\n [Frame3DBuiltInThemeId.EDITORIAL]: theme({\n radiusScale: 0.25,\n frost: 0.3,\n contentFrost: 0.35,\n gradient: 0,\n rim: { token: DesignSystemToken.BORDER, opacity: 0.25, hoverOpacity: 0.5, widthScale: 1 },\n shadow: NO_SHADOW,\n glow: 0.03,\n }),\n [Frame3DBuiltInThemeId.GLASS]: theme({\n radiusScale: 1.25,\n frost: 0.3,\n contentFrost: 0.35,\n gradient: 0.12,\n rim: { token: DesignSystemToken.BORDER_STRONG, opacity: 0.6, hoverOpacity: 1, widthScale: 1 },\n shadow: { offsetXPx: 0, offsetYPx: 8, blurPx: 24, opacity: 0.15 },\n glow: 0.14,\n }),\n [Frame3DBuiltInThemeId.NEO_BRUTALIST]: theme({\n radiusScale: 0,\n frost: 0.92,\n contentFrost: 0.92,\n gradient: 0,\n rim: { token: DesignSystemToken.FOREGROUND, opacity: 1, hoverOpacity: 1, widthScale: 2 },\n shadow: { offsetXPx: 4, offsetYPx: 4, blurPx: 0, opacity: 1 },\n glow: 0,\n }),\n [Frame3DBuiltInThemeId.TERMINAL]: theme({\n radiusScale: 0,\n frost: 0.25,\n contentFrost: 0.3,\n gradient: 0,\n rim: { token: DesignSystemToken.PRIMARY, opacity: 0.5, hoverOpacity: 0.9, widthScale: 1 },\n shadow: NO_SHADOW,\n glow: 0.12,\n }),\n [Frame3DBuiltInThemeId.TRADING]: theme({\n radiusScale: 0.5,\n frost: 0.45,\n contentFrost: 0.5,\n gradient: 0.02,\n rim: { token: DesignSystemToken.BORDER, opacity: 0.45, hoverOpacity: 0.8, widthScale: 1 },\n shadow: NO_SHADOW,\n glow: 0.05,\n }),\n },\n fallback: DEFAULT_STYLE,\n};\n\n/**\n * The HEADER_FIRST layout's styles: the INHERIT styles, lit from straight above — the menubar spans the whole\n * width over the rails in that disposal, so the light falls from the header down.\n */\nexport const HEADER_FIRST_FRAME_STYLES: Frame3DStyleCatalog = withLightAngle(INHERIT_FRAME_STYLES, 90);\n\nfunction withLightAngle(catalog: Frame3DStyleCatalog, lightAngleDeg: number): Frame3DStyleCatalog {\n const byThemeId = {} as Record<Frame3DBuiltInThemeId, Frame3DThemeStyle>;\n for (const id of Object.values(Frame3DBuiltInThemeId)) byThemeId[id] = { ...catalog.byThemeId[id], lightAngleDeg };\n return { byThemeId, fallback: { ...catalog.fallback, lightAngleDeg } };\n}\n\nfunction isBuiltInThemeId(id: string): id is Frame3DBuiltInThemeId {\n return (Object.values(Frame3DBuiltInThemeId) as string[]).includes(id);\n}\n\nfunction mergeTheme(base: Frame3DThemeStyle, override: Frame3DThemeStyleOverride | undefined): Frame3DThemeStyle {\n if (!override) return base;\n const regions = { ...base.regions };\n for (const region of Object.values(ShellRegion)) {\n const regionOverride = override.regions?.[region];\n if (!regionOverride) continue;\n const current = regions[region];\n regions[region] = {\n ...current,\n ...regionOverride,\n rim: { ...current.rim, ...regionOverride.rim },\n shadow: { ...current.shadow, ...regionOverride.shadow },\n };\n }\n return {\n background: { ...base.background, ...override.background },\n lightAngleDeg: override.lightAngleDeg ?? base.lightAngleDeg,\n lightToken: override.lightToken ?? base.lightToken,\n darkModeLightStrength: override.darkModeLightStrength ?? base.darkModeLightStrength,\n regions,\n };\n}\n\n/**\n * Which built-in theme each personality-axis value is copied from, for the part of the frame that axis governs\n * (#2477). The same sources the 2D axes name (`ThemeShape.ROUND` is \"cozy's radii\", `ThemeElevation.HARD_OFFSET`\n * is \"neo-brutalist's shadow\"), so a point's frame takes the frame value of the theme its recipes took theirs from.\n *\n * - shape → the slab's corner radius;\n * - elevation → its shadow;\n * - material → how much it lets the scene through and how much light plays on it (frost, gradient, background glow):\n * a glass point frosts like glass, a solid one like the default;\n * - edge weight → its rim. `INK` takes editorial's, the first theme that axis value names.\n *\n * The other six axes (density, motion, type voice, danger style, selection emphasis, letter case) govern nothing the\n * frame draws. Records over every member, so a value added to one of these four axes fails to compile here.\n *\n * Rejected: deriving the slab from the point by formula (radius = shape index × k). The catalog entries are tuned by\n * eye per theme; copying them keeps one set of tuned numbers, and a derived point's frame is always one a built-in\n * theme already shows.\n */\nconst FRAME_SOURCE_BY_SHAPE: Record<ThemeShape, Frame3DBuiltInThemeId> = {\n [ThemeShape.SHARP]: Frame3DBuiltInThemeId.EDITORIAL,\n [ThemeShape.SOFT]: Frame3DBuiltInThemeId.DEFAULT,\n [ThemeShape.ROUND]: Frame3DBuiltInThemeId.COZY,\n};\nconst FRAME_SOURCE_BY_ELEVATION: Record<ThemeElevation, Frame3DBuiltInThemeId> = {\n [ThemeElevation.FLAT]: Frame3DBuiltInThemeId.DENSE,\n [ThemeElevation.SOFT]: Frame3DBuiltInThemeId.DEFAULT,\n [ThemeElevation.LAYERED]: Frame3DBuiltInThemeId.COZY,\n [ThemeElevation.HARD_OFFSET]: Frame3DBuiltInThemeId.NEO_BRUTALIST,\n};\nconst FRAME_SOURCE_BY_MATERIAL: Record<ThemeMaterial, Frame3DBuiltInThemeId> = {\n [ThemeMaterial.SOLID]: Frame3DBuiltInThemeId.DEFAULT,\n [ThemeMaterial.GLASS]: Frame3DBuiltInThemeId.GLASS,\n};\nconst FRAME_SOURCE_BY_EDGE_WEIGHT: Record<ThemeEdgeWeight, Frame3DBuiltInThemeId> = {\n [ThemeEdgeWeight.HAIRLINE]: Frame3DBuiltInThemeId.DEFAULT,\n [ThemeEdgeWeight.INK]: Frame3DBuiltInThemeId.EDITORIAL,\n [ThemeEdgeWeight.BOLD]: Frame3DBuiltInThemeId.NEO_BRUTALIST,\n};\n\n/** @wildo_source:part:start presets.3d.frame-style-resolution facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * The frame style for a point on the theme personality axes, in one layout's catalog (#2477).\n *\n * Starts from the catalog's fallback (so the layout's own light angle and background stay), then takes, per region,\n * the corner radius from the theme the point's shape was copied from, the shadow from its elevation's, the frost,\n * gradient and background glow from its material's, and the rim from its edge weight's. The default point gives the\n * fallback exactly.\n *\n * @example\n * import { cozyThemePersonality } from '@wildo-ai/presets-components/themes';\n * deriveFrame3DThemeStyle(INHERIT_FRAME_STYLES, cozyThemePersonality); // cozy's radius, shadow and rim\n */\nexport function deriveFrame3DThemeStyle(catalog: Frame3DStyleCatalog, personality: ThemePersonality): Frame3DThemeStyle {\n const base = catalog.fallback;\n const shape = catalog.byThemeId[FRAME_SOURCE_BY_SHAPE[personality.shape]];\n const elevation = catalog.byThemeId[FRAME_SOURCE_BY_ELEVATION[personality.elevation]];\n const material = catalog.byThemeId[FRAME_SOURCE_BY_MATERIAL[personality.material]];\n const edge = catalog.byThemeId[FRAME_SOURCE_BY_EDGE_WEIGHT[personality.edgeWeight]];\n const regions = { ...base.regions };\n for (const region of Object.values(ShellRegion)) {\n regions[region] = {\n ...base.regions[region],\n radiusScale: shape.regions[region].radiusScale,\n shadow: elevation.regions[region].shadow,\n frost: material.regions[region].frost,\n gradient: material.regions[region].gradient,\n rim: edge.regions[region].rim,\n };\n }\n return { ...base, background: { ...base.background, glow: material.background.glow }, regions };\n}\n\n/**\n * The frame style for the active theme, then the application's `all` override, then its override for that theme id:\n *\n * 1. a built-in theme id takes the layout's own entry for it;\n * 2. any other theme that records the point it was composed from (`personality`, which `composeTheme` sets) takes a\n * style derived from that point ({@link deriveFrame3DThemeStyle}), so a theme composed from the brand's words gets\n * a frame that matches its recipes;\n * 3. anything else takes the layout's fallback.\n */\nexport function resolveFrame3DThemeStyle(\n catalog: Frame3DStyleCatalog,\n theme: Pick<ComponentStyleTheme, 'id' | 'personality'>,\n overrides?: Frame3DStyleOverrides,\n): Frame3DThemeStyle {\n const base = isBuiltInThemeId(theme.id)\n ? catalog.byThemeId[theme.id]\n : theme.personality === undefined\n ? catalog.fallback\n : deriveFrame3DThemeStyle(catalog, theme.personality);\n return mergeTheme(mergeTheme(base, overrides?.all), overrides?.byThemeId?.[theme.id]);\n}\n/** @wildo_source:part:end presets.3d.frame-style-resolution */\n\n/**\n * The frame's verification sentinel: a neon green (`#39ff14`) that appears in no theme, token or palette in the\n * framework or the dogfood applications (checked 2026-09-29 by a repository search).\n *\n * That absence is the point. A cover check counts sentinel pixels in a screenshot: one where a region is\n * transparent over its slab is expected, one over a region's CONTENT means the canvas covered it — and a colour\n * a theme could also produce would make that count meaningless.\n */\nexport const FRAME_SENTINEL_COLOR = '#39ff14';\n\n/**\n * Frame-style overrides that draw every region as a flat, square, rimless, shadowless slab in\n * {@link FRAME_SENTINEL_COLOR}, for a cover-and-alignment check: `register3DLayout({ frameStyles:\n * createSentinelFrameStyles() })`. The contrast bound still applies, so run the check where the sentinel passes\n * it against the foreground (a light mode, whose foreground is dark) — and assert the sentinel is actually\n * visible where regions are transparent, or a bound-adjusted colour would read as \"nothing covered\".\n */\nexport function createSentinelFrameStyles(): Frame3DStyleOverrides {\n const sentinel: Frame3DRegionStyleOverride = {\n surface: Frame3DSurfaceKind.FROSTED,\n tintColor: FRAME_SENTINEL_COLOR,\n frost: 1,\n gradient: 0,\n radiusScale: 0,\n rim: { opacity: 0, hoverOpacity: 0 },\n shadow: NO_SHADOW,\n };\n const regions: Partial<Record<ShellRegion, Frame3DRegionStyleOverride>> = {};\n for (const region of Object.values(ShellRegion)) regions[region] = sentinel;\n return { all: { regions } };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"frame-appearance.js","sourceRoot":"","sources":["../../../../src/frame/frame-appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAwB,MAAM,qCAAqC,CAAC;AAEzH,OAAO,EAAE,kBAAkB,EAAmD,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAmB,MAAM,eAAe,CAAC;AAC9I,OAAO,EAAE,uBAAuB,EAA8B,MAAM,mCAAmC,CAAC;AA4ExG;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAE1C;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,sBAAsB,GAAG,IAAI,CAAC;AAE5D,MAAM,aAAa,GAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAChD,MAAM,eA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AC,CAAC,CAAC,CAAC;AAChK,CAAC;AAED,SAAS,QAAQ,CAAC,UAA6C;IAC7D,OAAO,UAAU,IAAI,UAAU,IAAI,UAAU,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,KAAK,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC;AACnK,CAAC;AAED,SAAS,aAAa;IACpB,OAAO;QACL,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,CAAC;QACZ,GAAG,EAAE,KAAK;QACV,QAAQ,EAAE,CAAC;QACX,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,CAAC;QACb,QAAQ,EAAE,CAAC;QACX,eAAe,EAAE,CAAC;QAClB,eAAe,EAAE,CAAC;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,CAAC;KACf,CAAC;AACJ,CAAC","sourcesContent":["import { converter, parse } from 'culori';\nimport { DesignSystemToken, MaterialKind, ShellRegion, type MaterialProfile } from '@wildo-ai/presets-components-models';\n\nimport { Frame3DSurfaceKind, type Frame3DRegionStyle, type Frame3DThemeStyle } from './frame-3d-style';\nimport { BLACK, WHITE, composite, contrastRatio, encodeSrgb, gradientPoints, mix, pushUntil, quantize, type FrameColor } from './frame-color';\nimport { ResolvedDesignTokenKind, type DesignTokenResolution } from '../tokens/design-token-resolution';\n\nexport type { FrameColor } from './frame-color';\n\n/** How one region kind's slab is drawn, in frame units (CSS pixels, sRGB-encoded colours). */\nexport interface FrameSlabAppearance {\n /** False when the style draws nothing here, or a colour it needs did not resolve. */\n visible: boolean;\n /** The shaded side of the frost. */\n fillFrom: FrameColor;\n /** The lit side of the frost. */\n fillTo: FrameColor;\n fillAlpha: number;\n rim: FrameColor;\n rimAlpha: number;\n rimHoverAlpha: number;\n rimWidthPx: number;\n radiusPx: number;\n shadowOffsetXPx: number;\n shadowOffsetYPx: number;\n shadowBlurPx: number;\n shadowAlpha: number;\n}\n\n/** A cubic-Bézier easing, as its four control points. */\nexport type FrameEasing = readonly [number, number, number, number];\n\n/** A damped spring, as motion.dev's gesture `transition` declares one. */\nexport interface FrameSpring {\n stiffness: number;\n damping: number;\n mass: number;\n}\n\n/**\n * Everything the frame draws, as plain data. It is computed in the DOM tree from the theme and handed to the\n * canvas as props, so the canvas holds meshes only and reads no context (#1823).\n */\nexport interface FrameAppearance {\n /** The `--foreground` the bound was computed against. A change of it (a mode switch) is applied at once. */\n foreground: FrameColor;\n /** The in-scene background, shaded side then lit side. */\n background: { from: FrameColor; to: FrameColor } | null;\n /** The light direction in the FRAME's convention: degrees, 0 = from the right, 90 = from the top (y up). */\n lightAngleDeg: number;\n regions: Record<ShellRegion, FrameSlabAppearance>;\n /** A theme change cross-fades over this. 0 under reduced motion. */\n transitionSeconds: number;\n transitionEasing: FrameEasing;\n /** The rim's hover emphasis animates over this, when no spring is declared. */\n hoverSeconds: number;\n hoverEasing: FrameEasing;\n /** The theme's surface gesture spring: when declared, the rim's hover emphasis follows it instead. */\n hoverSpring: FrameSpring | null;\n /** False under reduced motion: the frame is static, so the rim does not respond to hover at all. */\n hoverResponse: boolean;\n /**\n * How long a shell CSS transition may run before the frame stops following it without a `transitionend`:\n * the slowest motion-duration token, with half again as margin. The shell's own transitions use those tokens.\n */\n transitionCeilingSeconds: number;\n}\n\nexport interface FrameAppearanceInputs {\n resolutions: ReadonlyMap<DesignSystemToken, DesignTokenResolution>;\n style: Frame3DThemeStyle;\n /** The theme's navigation material (`MaterialProfileRole.GLASS_NAVIGATION`), when it has one. */\n navigationMaterial: MaterialProfile | undefined;\n /** The theme's surface gesture `transition` (motion.dev), when its surface recipe declares one. */\n surfaceGestureTransition: Readonly<Record<string, string | number>> | undefined;\n isDark: boolean;\n prefersReducedMotion: boolean;\n /** Converts the material's device-pixel rim width into CSS pixels. */\n devicePixelRatio: number;\n}\n\n/**\n * The lowest contrast any colour the frame can put behind text may have against `--foreground`: WCAG 2.x's\n * AA minimum for normal text.\n * spec-cite: WCAG 2.2 SC 1.4.3 Contrast (Minimum) — https://www.w3.org/TR/WCAG22/#contrast-minimum\n */\nexport const FRAME_MINIMUM_CONTRAST = 4.5;\n\n/**\n * What the derivation actually aims for: the minimum plus a margin for a GPU that TRUNCATES rather than rounds\n * when it writes a blended value to the 8-bit framebuffer. The model already rounds every layer it writes\n * ({@link quantize}); truncation moves a channel by at most one more level, which the margin covers.\n */\nconst FRAME_CONTRAST_TARGET = FRAME_MINIMUM_CONTRAST + 0.05;\n\nconst LINEAR_EASING: FrameEasing = [0, 0, 1, 1];\nconst DURATION_TOKENS = [\n DesignSystemToken.MOTION_DURATION_INSTANT,\n DesignSystemToken.MOTION_DURATION_FAST,\n DesignSystemToken.MOTION_DURATION_NORMAL,\n DesignSystemToken.MOTION_DURATION_SLOW,\n DesignSystemToken.MOTION_DURATION_SLOWER,\n];\nconst toSrgb = converter('rgb');\n\n/**\n * Derive the frame's appearance from the active theme, or `null` when the foreground did not resolve — without\n * it no colour can be shown to be readable, and a frame that cannot be shown readable is not drawn.\n *\n * **The contrast bound** is part of the derivation, not a check after it. Every colour text can sit on is\n * composited the way the framebuffer blends — in sRGB-encoded space, each written layer rounded to 8 bits — and\n * must reach the target against `--foreground`:\n * - the background, at several points along its gradient;\n * - the background under a shadow (shadows combine by MAXIMUM in the renderer, never by stacking, so one\n * shadow at its full opacity is the darkest a point can be);\n * - the frost over either, along its own gradient;\n * - the rim at its HOVER opacity over the frost.\n *\n * A style value that would break it is WEAKENED — a colour moved toward the pole with the most contrast, a\n * shadow or rim made fainter — and the bound is never relaxed. A style is a preference; the bound is a guarantee.\n */\nexport function deriveFrameAppearance(inputs: FrameAppearanceInputs): FrameAppearance | null {\n const colorOf = (token: DesignSystemToken): FrameColor | null => tokenColor(inputs.resolutions.get(token));\n const foreground = colorOf(DesignSystemToken.FOREGROUND);\n if (!foreground) return null;\n // The pole is black or white, whichever contrasts more with the foreground; bounded colours move toward it.\n const pole = contrastRatio(foreground, BLACK) >= contrastRatio(foreground, WHITE) ? BLACK : WHITE;\n const readable = (color: FrameColor): boolean => contrastRatio(quantize(color), foreground) >= FRAME_CONTRAST_TARGET;\n\n const glass = inputs.navigationMaterial?.kind === MaterialKind.GLASS ? inputs.navigationMaterial : undefined;\n // A material's light angle is measured against the DOM's y-DOWN axis (the engine's edge response reads it\n // against image-space normals); the frame's is y-UP, so the vertical component flips sign.\n const lightAngleDeg = glass ? -glass.optics.lightAngleDeg : inputs.style.lightAngleDeg;\n\n // ── Background ── (nothing is drawn, not even a slab, when its base colour does not resolve: frost over an\n // unknown base cannot be bounded.)\n const base = colorOf(inputs.style.background.baseToken);\n const glowColor = colorOf(inputs.style.background.glowToken) ?? base;\n let background: { from: FrameColor; to: FrameColor } | null = null;\n if (base && glowColor) {\n const from = pushUntil(base, pole, readable);\n const to = pushUntil(mix(base, glowColor, clamp01(inputs.style.background.glow)), pole, (c) => gradientPoints(from, c).every(readable));\n background = { from, to };\n }\n const backgroundStops = background ? gradientPoints(background.from, background.to).map(quantize) : [];\n const light = colorOf(inputs.style.lightToken) ?? WHITE;\n\n const radiusPx = sizeOf(inputs.resolutions.get(DesignSystemToken.RADIUS)) ?? 0;\n const borderWidthPx = sizeOf(inputs.resolutions.get(DesignSystemToken.BORDER_WIDTH)) ?? 1;\n\n const tintOf = (style: Frame3DRegionStyle): FrameColor | null => (style.tintColor !== undefined ? cssColor(style.tintColor) : colorOf(style.tintToken));\n const drawn = (style: Frame3DRegionStyle): boolean => style.surface !== Frame3DSurfaceKind.NONE && tintOf(style) !== null && backgroundStops.length > 0;\n\n // ── Pass 1: shadows ── Each is black, made fainter until the background under it stays readable. A shadow\n // spreads beyond its own slab — under a NEIGHBOUR's slab too — and the renderer combines overlapping shadows by\n // their maximum, so every slab's frost must be readable over the background under the STRONGEST shadow of any\n // slab, not only under its own.\n const shadowAlphaOf = (style: Frame3DRegionStyle): number => {\n let alpha = clamp01(style.shadow.opacity);\n while (alpha > 0 && !backgroundStops.every((stop) => readable(composite(BLACK, alpha, stop)))) alpha = Math.max(0, alpha - 0.02);\n return alpha;\n };\n const shadowAlphas = new Map<ShellRegion, number>();\n for (const region of Object.values(ShellRegion)) {\n const style = inputs.style.regions[region];\n shadowAlphas.set(region, drawn(style) ? shadowAlphaOf(style) : 0);\n }\n const strongestShadow = Math.max(0, ...shadowAlphas.values());\n const underlays = [...backgroundStops, ...backgroundStops.map((stop) => quantize(composite(BLACK, strongestShadow, stop)))];\n\n // ── Pass 2: every slab's frost and rim, bounded over all of those underlays ──\n const slab = (region: ShellRegion, style: Frame3DRegionStyle): FrameSlabAppearance => {\n const tint = tintOf(style);\n if (!drawn(style) || !tint) return invisibleSlab();\n const shadowAlpha = shadowAlphas.get(region) ?? 0;\n\n // Frost: the lit side moves toward the theme's light colour; in dark mode by the style's dark-mode share.\n const fillAlpha = clamp01((glass ? glass.optics.tintOpacity : style.frost) * tintAlpha(style, inputs.resolutions));\n const litAmount = clamp01(style.gradient) * (inputs.isDark ? clamp01(inputs.style.darkModeLightStrength) : 1);\n const frostReadable = (fill: FrameColor): boolean => underlays.every((under) => readable(composite(fill, fillAlpha, under)));\n const fillFrom = pushUntil(tint, pole, frostReadable);\n const fillTo = pushUntil(mix(fillFrom, light, litAmount), pole, (c) => gradientPoints(fillFrom, c).every(frostReadable));\n const frostUnderlays = gradientPoints(fillFrom, fillTo).flatMap((fill) => underlays.map((under) => ({ fill, under })));\n\n // Rim: at its HOVER opacity, over every frost point — one layer with the frost, as the shader writes it —\n // made fainter (rest and hover together) until readable.\n const rim = colorOf(style.rim.token) ?? foreground;\n // A glass material states its rest highlight; the hover emphasis keeps the style's own hover-to-rest ratio.\n const styleRatio = style.rim.opacity > 0 ? style.rim.hoverOpacity / style.rim.opacity : 1;\n const rimRest = clamp01(glass ? glass.optics.edgeHighlightOpacity : style.rim.opacity);\n const rimHover = clamp01(glass ? glass.optics.edgeHighlightOpacity * styleRatio : style.rim.hoverOpacity);\n let rimScale = 1;\n const rimReadable = (scale: number): boolean => frostUnderlays.every(({ fill, under }) => readable(composite(rim, rimHover * scale, composite(fill, fillAlpha, under))));\n while (rimScale > 0 && !rimReadable(rimScale)) rimScale = Math.max(0, rimScale - 0.02);\n\n return {\n visible: true,\n fillFrom,\n fillTo,\n fillAlpha,\n rim,\n rimAlpha: rimRest * rimScale,\n rimHoverAlpha: rimHover * rimScale,\n rimWidthPx: glass ? glass.optics.rimWidthDevicePx / Math.max(1, inputs.devicePixelRatio) : borderWidthPx * Math.max(0, style.rim.widthScale),\n radiusPx: radiusPx * Math.max(0, style.radiusScale),\n shadowOffsetXPx: style.shadow.offsetXPx,\n shadowOffsetYPx: style.shadow.offsetYPx,\n shadowBlurPx: Math.max(0, style.shadow.blurPx),\n shadowAlpha,\n };\n };\n\n const regions = {} as Record<ShellRegion, FrameSlabAppearance>;\n for (const region of Object.values(ShellRegion)) regions[region] = slab(region, inputs.style.regions[region]);\n\n const reduced = inputs.prefersReducedMotion;\n const slowestSeconds = Math.max(0, ...DURATION_TOKENS.map((token) => secondsOf(inputs.resolutions.get(token))));\n return {\n foreground,\n background,\n lightAngleDeg,\n regions,\n transitionSeconds: reduced ? 0 : secondsOf(inputs.resolutions.get(DesignSystemToken.MOTION_DURATION_NORMAL)),\n transitionEasing: easingOf(inputs.resolutions.get(DesignSystemToken.MOTION_EASING_DEFAULT)),\n hoverSeconds: secondsOf(inputs.resolutions.get(DesignSystemToken.MOTION_DURATION_FAST)),\n hoverEasing: easingOf(inputs.resolutions.get(DesignSystemToken.MOTION_EASING_SPRING)),\n hoverSpring: springOf(inputs.surfaceGestureTransition),\n hoverResponse: !reduced,\n transitionCeilingSeconds: slowestSeconds > 0 ? slowestSeconds * 1.5 : 1.5,\n };\n}\n\n/**\n * A motion.dev gesture transition, when it is a spring. motion.dev's defaults fill what it omits: stiffness 100,\n * damping 10, mass 1. Anything that is not `type: 'spring'` (a tween) leaves the hover to the motion tokens.\n */\nfunction springOf(transition: Readonly<Record<string, string | number>> | undefined): FrameSpring | null {\n if (!transition || transition.type !== 'spring') return null;\n const number = (key: string, fallback: number): number => (typeof transition[key] === 'number' && Number.isFinite(transition[key]) ? (transition[key] as number) : fallback);\n const spring = { stiffness: number('stiffness', 100), damping: number('damping', 10), mass: number('mass', 1) };\n return spring.stiffness > 0 && spring.mass > 0 && spring.damping >= 0 ? spring : null;\n}\n\nfunction clamp01(value: number): number {\n return Math.min(1, Math.max(0, value));\n}\n\nfunction tokenColor(resolution: DesignTokenResolution | undefined): FrameColor | null {\n if (!resolution || !('resolved' in resolution) || resolution.resolved.kind !== ResolvedDesignTokenKind.COLOR) return null;\n const [r, g, b] = resolution.resolved.linearRgb;\n return [encodeSrgb(r), encodeSrgb(g), encodeSrgb(b)];\n}\n\n/** A token colour's own alpha multiplies the frost: a translucent token is a lighter tint, not an opaque one. */\nfunction tintAlpha(style: Frame3DRegionStyle, resolutions: ReadonlyMap<DesignSystemToken, DesignTokenResolution>): number {\n if (style.tintColor !== undefined) return parse(style.tintColor)?.alpha ?? 1;\n const resolution = resolutions.get(style.tintToken);\n return resolution && 'resolved' in resolution && resolution.resolved.kind === ResolvedDesignTokenKind.COLOR ? resolution.resolved.alpha : 1;\n}\n\nfunction cssColor(value: string): FrameColor | null {\n const parsed = parse(value);\n if (!parsed) return null;\n const rgb = toSrgb(parsed);\n return [clamp01(Number(rgb.r ?? 0)), clamp01(Number(rgb.g ?? 0)), clamp01(Number(rgb.b ?? 0))];\n}\n\nfunction sizeOf(resolution: DesignTokenResolution | undefined): number | null {\n return resolution && 'resolved' in resolution && resolution.resolved.kind === ResolvedDesignTokenKind.SIZE ? resolution.resolved.px : null;\n}\n\nfunction secondsOf(resolution: DesignTokenResolution | undefined): number {\n return resolution && 'resolved' in resolution && resolution.resolved.kind === ResolvedDesignTokenKind.DURATION ? Math.max(0, resolution.resolved.seconds) : 0;\n}\n\nfunction easingOf(resolution: DesignTokenResolution | undefined): FrameEasing {\n return resolution && 'resolved' in resolution && resolution.resolved.kind === ResolvedDesignTokenKind.EASING ? resolution.resolved.controlPoints : LINEAR_EASING;\n}\n\nfunction invisibleSlab(): FrameSlabAppearance {\n return {\n visible: false,\n fillFrom: BLACK,\n fillTo: BLACK,\n fillAlpha: 0,\n rim: BLACK,\n rimAlpha: 0,\n rimHoverAlpha: 0,\n rimWidthPx: 0,\n radiusPx: 0,\n shadowOffsetXPx: 0,\n shadowOffsetYPx: 0,\n shadowBlurPx: 0,\n shadowAlpha: 0,\n };\n}\n"]}
1
+ {"version":3,"file":"frame-appearance.js","sourceRoot":"","sources":["../../../src/frame/frame-appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAwB,MAAM,qCAAqC,CAAC;AAEzH,OAAO,EAAE,kBAAkB,EAAmD,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAmB,MAAM,eAAe,CAAC;AAC9I,OAAO,EAAE,uBAAuB,EAA8B,MAAM,mCAAmC,CAAC;AA4ExG;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAE1C;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,sBAAsB,GAAG,IAAI,CAAC;AAE5D,MAAM,aAAa,GAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAChD,MAAM,eAAe,GAAG;IACtB,iBAAiB,CAAC,uBAAuB;IACzC,iBAAiB,CAAC,oBAAoB;IACtC,iBAAiB,CAAC,sBAAsB;IACxC,iBAAiB,CAAC,oBAAoB;IACtC,iBAAiB,CAAC,sBAAsB;CACzC,CAAC;AACF,MAAM,MAAM,GAAG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C,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC;AACnK,CAAC;AAED,SAAS,aAAa;IACpB,OAAO;QACL,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,CAAC;QACZ,GAAG,EAAE,KAAK;QACV,QAAQ,EAAE,CAAC;QACX,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,CAAC;QACb,QAAQ,EAAE,CAAC;QACX,eAAe,EAAE,CAAC;QAClB,eAAe,EAAE,CAAC;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,CAAC;KACf,CAAC;AACJ,CAAC","sourcesContent":["import { converter, parse } from 'culori';\nimport { DesignSystemToken, MaterialKind, ShellRegion, type MaterialProfile } from '@wildo-ai/presets-components-models';\n\nimport { Frame3DSurfaceKind, type Frame3DRegionStyle, type Frame3DThemeStyle } from './frame-3d-style';\nimport { BLACK, WHITE, composite, contrastRatio, encodeSrgb, gradientPoints, mix, pushUntil, quantize, type FrameColor } from './frame-color';\nimport { ResolvedDesignTokenKind, type DesignTokenResolution } from '../tokens/design-token-resolution';\n\nexport type { FrameColor } from './frame-color';\n\n/** How one region kind's slab is drawn, in frame units (CSS pixels, sRGB-encoded colours). */\nexport interface FrameSlabAppearance {\n /** False when the style draws nothing here, or a colour it needs did not resolve. */\n visible: boolean;\n /** The shaded side of the frost. */\n fillFrom: FrameColor;\n /** The lit side of the frost. */\n fillTo: FrameColor;\n fillAlpha: number;\n rim: FrameColor;\n rimAlpha: number;\n rimHoverAlpha: number;\n rimWidthPx: number;\n radiusPx: number;\n shadowOffsetXPx: number;\n shadowOffsetYPx: number;\n shadowBlurPx: number;\n shadowAlpha: number;\n}\n\n/** A cubic-Bézier easing, as its four control points. */\nexport type FrameEasing = readonly [number, number, number, number];\n\n/** A damped spring, as motion.dev's gesture `transition` declares one. */\nexport interface FrameSpring {\n stiffness: number;\n damping: number;\n mass: number;\n}\n\n/**\n * Everything the frame draws, as plain data. It is computed in the DOM tree from the theme and handed to the\n * canvas as props, so the canvas holds meshes only and reads no context (#1823).\n */\nexport interface FrameAppearance {\n /** The `--foreground` the bound was computed against. A change of it (a mode switch) is applied at once. */\n foreground: FrameColor;\n /** The in-scene background, shaded side then lit side. */\n background: { from: FrameColor; to: FrameColor } | null;\n /** The light direction in the FRAME's convention: degrees, 0 = from the right, 90 = from the top (y up). */\n lightAngleDeg: number;\n regions: Record<ShellRegion, FrameSlabAppearance>;\n /** A theme change cross-fades over this. 0 under reduced motion. */\n transitionSeconds: number;\n transitionEasing: FrameEasing;\n /** The rim's hover emphasis animates over this, when no spring is declared. */\n hoverSeconds: number;\n hoverEasing: FrameEasing;\n /** The theme's surface gesture spring: when declared, the rim's hover emphasis follows it instead. */\n hoverSpring: FrameSpring | null;\n /** False under reduced motion: the frame is static, so the rim does not respond to hover at all. */\n hoverResponse: boolean;\n /**\n * How long a shell CSS transition may run before the frame stops following it without a `transitionend`:\n * the slowest motion-duration token, with half again as margin. The shell's own transitions use those tokens.\n */\n transitionCeilingSeconds: number;\n}\n\nexport interface FrameAppearanceInputs {\n resolutions: ReadonlyMap<DesignSystemToken, DesignTokenResolution>;\n style: Frame3DThemeStyle;\n /** The theme's navigation material (`MaterialProfileRole.GLASS_NAVIGATION`), when it has one. */\n navigationMaterial: MaterialProfile | undefined;\n /** The theme's surface gesture `transition` (motion.dev), when its surface recipe declares one. */\n surfaceGestureTransition: Readonly<Record<string, string | number>> | undefined;\n isDark: boolean;\n prefersReducedMotion: boolean;\n /** Converts the material's device-pixel rim width into CSS pixels. */\n devicePixelRatio: number;\n}\n\n/**\n * The lowest contrast any colour the frame can put behind text may have against `--foreground`: WCAG 2.x's\n * AA minimum for normal text.\n * spec-cite: WCAG 2.2 SC 1.4.3 Contrast (Minimum) — https://www.w3.org/TR/WCAG22/#contrast-minimum\n */\nexport const FRAME_MINIMUM_CONTRAST = 4.5;\n\n/**\n * What the derivation actually aims for: the minimum plus a margin for a GPU that TRUNCATES rather than rounds\n * when it writes a blended value to the 8-bit framebuffer. The model already rounds every layer it writes\n * ({@link quantize}); truncation moves a channel by at most one more level, which the margin covers.\n */\nconst FRAME_CONTRAST_TARGET = FRAME_MINIMUM_CONTRAST + 0.05;\n\nconst LINEAR_EASING: FrameEasing = [0, 0, 1, 1];\nconst DURATION_TOKENS = [\n DesignSystemToken.MOTION_DURATION_INSTANT,\n DesignSystemToken.MOTION_DURATION_FAST,\n DesignSystemToken.MOTION_DURATION_NORMAL,\n DesignSystemToken.MOTION_DURATION_SLOW,\n DesignSystemToken.MOTION_DURATION_SLOWER,\n];\nconst toSrgb = converter('rgb');\n\n/**\n * Derive the frame's appearance from the active theme, or `null` when the foreground did not resolve — without\n * it no colour can be shown to be readable, and a frame that cannot be shown readable is not drawn.\n *\n * **The contrast bound** is part of the derivation, not a check after it. Every colour text can sit on is\n * composited the way the framebuffer blends — in sRGB-encoded space, each written layer rounded to 8 bits — and\n * must reach the target against `--foreground`:\n * - the background, at several points along its gradient;\n * - the background under a shadow (shadows combine by MAXIMUM in the renderer, never by stacking, so one\n * shadow at its full opacity is the darkest a point can be);\n * - the frost over either, along its own gradient;\n * - the rim at its HOVER opacity over the frost.\n *\n * A style value that would break it is WEAKENED — a colour moved toward the pole with the most contrast, a\n * shadow or rim made fainter — and the bound is never relaxed. A style is a preference; the bound is a guarantee.\n */\nexport function deriveFrameAppearance(inputs: FrameAppearanceInputs): FrameAppearance | null {\n const colorOf = (token: DesignSystemToken): FrameColor | null => tokenColor(inputs.resolutions.get(token));\n const foreground = colorOf(DesignSystemToken.FOREGROUND);\n if (!foreground) return null;\n // The pole is black or white, whichever contrasts more with the foreground; bounded colours move toward it.\n const pole = contrastRatio(foreground, BLACK) >= contrastRatio(foreground, WHITE) ? BLACK : WHITE;\n const readable = (color: FrameColor): boolean => contrastRatio(quantize(color), foreground) >= FRAME_CONTRAST_TARGET;\n\n const glass = inputs.navigationMaterial?.kind === MaterialKind.GLASS ? inputs.navigationMaterial : undefined;\n // A material's light angle is measured against the DOM's y-DOWN axis (the engine's edge response reads it\n // against image-space normals); the frame's is y-UP, so the vertical component flips sign.\n const lightAngleDeg = glass ? -glass.optics.lightAngleDeg : inputs.style.lightAngleDeg;\n\n // ── Background ── (nothing is drawn, not even a slab, when its base colour does not resolve: frost over an\n // unknown base cannot be bounded.)\n const base = colorOf(inputs.style.background.baseToken);\n const glowColor = colorOf(inputs.style.background.glowToken) ?? base;\n let background: { from: FrameColor; to: FrameColor } | null = null;\n if (base && glowColor) {\n const from = pushUntil(base, pole, readable);\n const to = pushUntil(mix(base, glowColor, clamp01(inputs.style.background.glow)), pole, (c) => gradientPoints(from, c).every(readable));\n background = { from, to };\n }\n const backgroundStops = background ? gradientPoints(background.from, background.to).map(quantize) : [];\n const light = colorOf(inputs.style.lightToken) ?? WHITE;\n\n const radiusPx = sizeOf(inputs.resolutions.get(DesignSystemToken.RADIUS)) ?? 0;\n const borderWidthPx = sizeOf(inputs.resolutions.get(DesignSystemToken.BORDER_WIDTH)) ?? 1;\n\n const tintOf = (style: Frame3DRegionStyle): FrameColor | null => (style.tintColor !== undefined ? cssColor(style.tintColor) : colorOf(style.tintToken));\n const drawn = (style: Frame3DRegionStyle): boolean => style.surface !== Frame3DSurfaceKind.NONE && tintOf(style) !== null && backgroundStops.length > 0;\n\n // ── Pass 1: shadows ── Each is black, made fainter until the background under it stays readable. A shadow\n // spreads beyond its own slab — under a NEIGHBOUR's slab too — and the renderer combines overlapping shadows by\n // their maximum, so every slab's frost must be readable over the background under the STRONGEST shadow of any\n // slab, not only under its own.\n const shadowAlphaOf = (style: Frame3DRegionStyle): number => {\n let alpha = clamp01(style.shadow.opacity);\n while (alpha > 0 && !backgroundStops.every((stop) => readable(composite(BLACK, alpha, stop)))) alpha = Math.max(0, alpha - 0.02);\n return alpha;\n };\n const shadowAlphas = new Map<ShellRegion, number>();\n for (const region of Object.values(ShellRegion)) {\n const style = inputs.style.regions[region];\n shadowAlphas.set(region, drawn(style) ? shadowAlphaOf(style) : 0);\n }\n const strongestShadow = Math.max(0, ...shadowAlphas.values());\n const underlays = [...backgroundStops, ...backgroundStops.map((stop) => quantize(composite(BLACK, strongestShadow, stop)))];\n\n // ── Pass 2: every slab's frost and rim, bounded over all of those underlays ──\n const slab = (region: ShellRegion, style: Frame3DRegionStyle): FrameSlabAppearance => {\n const tint = tintOf(style);\n if (!drawn(style) || !tint) return invisibleSlab();\n const shadowAlpha = shadowAlphas.get(region) ?? 0;\n\n // Frost: the lit side moves toward the theme's light colour; in dark mode by the style's dark-mode share.\n const fillAlpha = clamp01((glass ? glass.optics.tintOpacity : style.frost) * tintAlpha(style, inputs.resolutions));\n const litAmount = clamp01(style.gradient) * (inputs.isDark ? clamp01(inputs.style.darkModeLightStrength) : 1);\n const frostReadable = (fill: FrameColor): boolean => underlays.every((under) => readable(composite(fill, fillAlpha, under)));\n const fillFrom = pushUntil(tint, pole, frostReadable);\n const fillTo = pushUntil(mix(fillFrom, light, litAmount), pole, (c) => gradientPoints(fillFrom, c).every(frostReadable));\n const frostUnderlays = gradientPoints(fillFrom, fillTo).flatMap((fill) => underlays.map((under) => ({ fill, under })));\n\n // Rim: at its HOVER opacity, over every frost point — one layer with the frost, as the shader writes it —\n // made fainter (rest and hover together) until readable.\n const rim = colorOf(style.rim.token) ?? foreground;\n // A glass material states its rest highlight; the hover emphasis keeps the style's own hover-to-rest ratio.\n const styleRatio = style.rim.opacity > 0 ? style.rim.hoverOpacity / style.rim.opacity : 1;\n const rimRest = clamp01(glass ? glass.optics.edgeHighlightOpacity : style.rim.opacity);\n const rimHover = clamp01(glass ? glass.optics.edgeHighlightOpacity * styleRatio : style.rim.hoverOpacity);\n let rimScale = 1;\n const rimReadable = (scale: number): boolean => frostUnderlays.every(({ fill, under }) => readable(composite(rim, rimHover * scale, composite(fill, fillAlpha, under))));\n while (rimScale > 0 && !rimReadable(rimScale)) rimScale = Math.max(0, rimScale - 0.02);\n\n return {\n visible: true,\n fillFrom,\n fillTo,\n fillAlpha,\n rim,\n rimAlpha: rimRest * rimScale,\n rimHoverAlpha: rimHover * rimScale,\n rimWidthPx: glass ? glass.optics.rimWidthDevicePx / Math.max(1, inputs.devicePixelRatio) : borderWidthPx * Math.max(0, style.rim.widthScale),\n radiusPx: radiusPx * Math.max(0, style.radiusScale),\n shadowOffsetXPx: style.shadow.offsetXPx,\n shadowOffsetYPx: style.shadow.offsetYPx,\n shadowBlurPx: Math.max(0, style.shadow.blurPx),\n shadowAlpha,\n };\n };\n\n const regions = {} as Record<ShellRegion, FrameSlabAppearance>;\n for (const region of Object.values(ShellRegion)) regions[region] = slab(region, inputs.style.regions[region]);\n\n const reduced = inputs.prefersReducedMotion;\n const slowestSeconds = Math.max(0, ...DURATION_TOKENS.map((token) => secondsOf(inputs.resolutions.get(token))));\n return {\n foreground,\n background,\n lightAngleDeg,\n regions,\n transitionSeconds: reduced ? 0 : secondsOf(inputs.resolutions.get(DesignSystemToken.MOTION_DURATION_NORMAL)),\n transitionEasing: easingOf(inputs.resolutions.get(DesignSystemToken.MOTION_EASING_DEFAULT)),\n hoverSeconds: secondsOf(inputs.resolutions.get(DesignSystemToken.MOTION_DURATION_FAST)),\n hoverEasing: easingOf(inputs.resolutions.get(DesignSystemToken.MOTION_EASING_SPRING)),\n hoverSpring: springOf(inputs.surfaceGestureTransition),\n hoverResponse: !reduced,\n transitionCeilingSeconds: slowestSeconds > 0 ? slowestSeconds * 1.5 : 1.5,\n };\n}\n\n/**\n * A motion.dev gesture transition, when it is a spring. motion.dev's defaults fill what it omits: stiffness 100,\n * damping 10, mass 1. Anything that is not `type: 'spring'` (a tween) leaves the hover to the motion tokens.\n */\nfunction springOf(transition: Readonly<Record<string, string | number>> | undefined): FrameSpring | null {\n if (!transition || transition.type !== 'spring') return null;\n const number = (key: string, fallback: number): number => (typeof transition[key] === 'number' && Number.isFinite(transition[key]) ? (transition[key] as number) : fallback);\n const spring = { stiffness: number('stiffness', 100), damping: number('damping', 10), mass: number('mass', 1) };\n return spring.stiffness > 0 && spring.mass > 0 && spring.damping >= 0 ? spring : null;\n}\n\nfunction clamp01(value: number): number {\n return Math.min(1, Math.max(0, value));\n}\n\nfunction tokenColor(resolution: DesignTokenResolution | undefined): FrameColor | null {\n if (!resolution || !('resolved' in resolution) || resolution.resolved.kind !== ResolvedDesignTokenKind.COLOR) return null;\n const [r, g, b] = resolution.resolved.linearRgb;\n return [encodeSrgb(r), encodeSrgb(g), encodeSrgb(b)];\n}\n\n/** A token colour's own alpha multiplies the frost: a translucent token is a lighter tint, not an opaque one. */\nfunction tintAlpha(style: Frame3DRegionStyle, resolutions: ReadonlyMap<DesignSystemToken, DesignTokenResolution>): number {\n if (style.tintColor !== undefined) return parse(style.tintColor)?.alpha ?? 1;\n const resolution = resolutions.get(style.tintToken);\n return resolution && 'resolved' in resolution && resolution.resolved.kind === ResolvedDesignTokenKind.COLOR ? resolution.resolved.alpha : 1;\n}\n\nfunction cssColor(value: string): FrameColor | null {\n const parsed = parse(value);\n if (!parsed) return null;\n const rgb = toSrgb(parsed);\n return [clamp01(Number(rgb.r ?? 0)), clamp01(Number(rgb.g ?? 0)), clamp01(Number(rgb.b ?? 0))];\n}\n\nfunction sizeOf(resolution: DesignTokenResolution | undefined): number | null {\n return resolution && 'resolved' in resolution && resolution.resolved.kind === ResolvedDesignTokenKind.SIZE ? resolution.resolved.px : null;\n}\n\nfunction secondsOf(resolution: DesignTokenResolution | undefined): number {\n return resolution && 'resolved' in resolution && resolution.resolved.kind === ResolvedDesignTokenKind.DURATION ? Math.max(0, resolution.resolved.seconds) : 0;\n}\n\nfunction easingOf(resolution: DesignTokenResolution | undefined): FrameEasing {\n return resolution && 'resolved' in resolution && resolution.resolved.kind === ResolvedDesignTokenKind.EASING ? resolution.resolved.controlPoints : LINEAR_EASING;\n}\n\nfunction invisibleSlab(): FrameSlabAppearance {\n return {\n visible: false,\n fillFrom: BLACK,\n fillTo: BLACK,\n fillAlpha: 0,\n rim: BLACK,\n rimAlpha: 0,\n rimHoverAlpha: 0,\n rimWidthPx: 0,\n radiusPx: 0,\n shadowOffsetXPx: 0,\n shadowOffsetYPx: 0,\n shadowBlurPx: 0,\n shadowAlpha: 0,\n };\n}\n"]}