@wildo-ai/presets-components-3d 1.1.11 → 1.1.13

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 (55) hide show
  1. package/dist/esm/focal-plane/focal-plane-depth-axis.d.ts.map +1 -1
  2. package/dist/esm/focal-plane/focal-plane-depth-axis.js.map +1 -1
  3. package/dist/esm/focal-plane/focal-plane-settings.d.ts.map +1 -1
  4. package/dist/esm/focal-plane/focal-plane-settings.js.map +1 -1
  5. package/dist/esm/focal-plane/focal-plane-shell-container.d.ts.map +1 -1
  6. package/dist/esm/focal-plane/focal-plane-shell-container.js.map +1 -1
  7. package/dist/esm/focal-plane/focal-plane-stylesheet.d.ts.map +1 -1
  8. package/dist/esm/focal-plane/focal-plane-stylesheet.js +9 -0
  9. package/dist/esm/focal-plane/focal-plane-stylesheet.js.map +1 -1
  10. package/dist/esm/focal-plane/focal-plane-vanishing-point.d.ts.map +1 -1
  11. package/dist/esm/focal-plane/focal-plane-vanishing-point.js.map +1 -1
  12. package/dist/esm/frame/frame-3d-style.d.ts +24 -4
  13. package/dist/esm/frame/frame-3d-style.d.ts.map +1 -1
  14. package/dist/esm/frame/frame-3d-style.js +86 -6
  15. package/dist/esm/frame/frame-3d-style.js.map +1 -1
  16. package/dist/esm/frame/frame-appearance.d.ts.map +1 -1
  17. package/dist/esm/frame/frame-appearance.js.map +1 -1
  18. package/dist/esm/frame/frame-canvas.d.ts.map +1 -1
  19. package/dist/esm/frame/frame-canvas.js.map +1 -1
  20. package/dist/esm/frame/frame-canvas.lazy.d.ts.map +1 -1
  21. package/dist/esm/frame/frame-canvas.lazy.js.map +1 -1
  22. package/dist/esm/frame/frame-color.d.ts.map +1 -1
  23. package/dist/esm/frame/frame-color.js.map +1 -1
  24. package/dist/esm/frame/frame-driver.d.ts.map +1 -1
  25. package/dist/esm/frame/frame-driver.js.map +1 -1
  26. package/dist/esm/frame/frame-renderer.d.ts.map +1 -1
  27. package/dist/esm/frame/frame-renderer.js.map +1 -1
  28. package/dist/esm/frame/frame-shaders.d.ts.map +1 -1
  29. package/dist/esm/frame/frame-shaders.js.map +1 -1
  30. package/dist/esm/frame/use-frame-appearance.d.ts +1 -1
  31. package/dist/esm/frame/use-frame-appearance.d.ts.map +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.map +1 -1
  35. package/dist/esm/index.js.map +1 -1
  36. package/dist/esm/layout/header-first-shell-container.d.ts.map +1 -1
  37. package/dist/esm/layout/header-first-shell-container.js.map +1 -1
  38. package/dist/esm/layout/layout-3d-definition.d.ts.map +1 -1
  39. package/dist/esm/layout/layout-3d-definition.js.map +1 -1
  40. package/dist/esm/layout/layout-3d-transition-choreography.d.ts.map +1 -1
  41. package/dist/esm/layout/layout-3d-transition-choreography.js.map +1 -1
  42. package/dist/esm/layout/layout-3d-vocabulary.d.ts.map +1 -1
  43. package/dist/esm/layout/layout-3d-vocabulary.js.map +1 -1
  44. package/dist/esm/layout-3d-main-container.d.ts.map +1 -1
  45. package/dist/esm/layout-3d-main-container.js.map +1 -1
  46. package/dist/esm/register-3d-layout.d.ts.map +1 -1
  47. package/dist/esm/register-3d-layout.js.map +1 -1
  48. package/dist/esm/shell-region-measurement.d.ts.map +1 -1
  49. package/dist/esm/shell-region-measurement.js.map +1 -1
  50. package/dist/esm/tokens/design-token-resolution.d.ts.map +1 -1
  51. package/dist/esm/tokens/design-token-resolution.js.map +1 -1
  52. package/dist/esm/tokens/use-design-token-resolution.d.ts.map +1 -1
  53. package/dist/esm/tokens/use-design-token-resolution.js.map +1 -1
  54. package/dist/tsconfig.build.tsbuildinfo +1 -0
  55. package/package.json +8 -6
@@ -1 +1 @@
1
- {"version":3,"file":"focal-plane-depth-axis.d.ts","sourceRoot":"","sources":["../../../../src/focal-plane/focal-plane-depth-axis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyF,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE1J,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGjE,6GAA6G;AAC7G,eAAO,MAAM,kBAAkB,oCAAoC,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,aAAa,EAAE,OAAO,GAAG,eAAe,CA0C/G"}
1
+ {"version":3,"file":"focal-plane-depth-axis.d.ts","sourceRoot":"","sources":["../../../src/focal-plane/focal-plane-depth-axis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyF,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE1J,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGjE,6GAA6G;AAC7G,eAAO,MAAM,kBAAkB,oCAAoC,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,aAAa,EAAE,OAAO,GAAG,eAAe,CA0C/G"}
@@ -1 +1 @@
1
- {"version":3,"file":"focal-plane-depth-axis.js","sourceRoot":"","sources":["../../../../src/focal-plane/focal-plane-depth-axis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAwB,MAAM,6BAA6B,CAAC;AAG1J,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,6GAA6G;AAC7G,MAAM,CAAC,MAAM,kBAAkB,GAAG,iCAAiC,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAA4B,EAAE,aAAsB;IAC5F,MAAM,KAAK,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,eAAe,QAAQ,CAAC,gBAAgB,yBAAyB,CAAC,QAAQ,CAAC,YAAY,GAAG,MAAM,KAAK,CAAC;IAChJ,OAAO;QACL,UA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AAC,GAAG;YACT,QAAQ,GAAG,EAAE,CAAC;gBACZ,KAAK,cAAc,CAAC,SAAS;oBAC3B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gBAChE,KAAK,cAAc,CAAC,aAAa;oBAC/B,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;gBAChD,OAAO,CAAC,CAAC,CAAC;oBACR,MAAM,UAAU,GAAU,GAAG,CAAC;oBAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBACzE,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { ShellDialogArrival, ShellGhostPose, ShellMotionDip, ShellPaneArrival, ShellPaneResize, type ShellMotionAxis } from '@wildo-ai/saas-frontend-lib';\n\nimport type { FocalPlaneSettings } from './focal-plane-settings';\nimport { vanishingOrigin } from './focal-plane-vanishing-point';\n\n/** The easing every focal-plane motion shares: a quick start that settles softly (the prototype's curve). */\nexport const FOCAL_PLANE_EASING = 'cubic-bezier(0.2, 0.9, 0.25, 1)';\n\n/**\n * The focal plane's axis for the core motion building blocks: everything moves straight along the camera's line of\n * sight, never sideways and never angled.\n *\n * - A ghost is seen from the stage's vanishing point (its origin), at a depth the stylesheet's transform reads from\n * `--fp-z`: at rest where the pane stood, one layer back and dimmed behind an expanded pane, a layer and a half back\n * as a dismissed pane goes.\n * - A pane whose content changes dips half a layer back and returns, fading a little; a column that folds dips less.\n *\n * `reducedMotion` gives a still axis (`durationMs: 0`), which turns every building block off.\n */\nexport function createFocalPlaneDepthAxis(settings: FocalPlaneSettings, reducedMotion: boolean): ShellMotionAxis {\n const depth = (layers: number): string => `perspective(${settings.cameraDistancePx}px) translate3d(0, 0, ${-settings.layerDepthPx * layers}px)`;\n return {\n durationMs: reducedMotion ? 0 : settings.motionMs,\n easing: FOCAL_PLANE_EASING,\n // The windows are glass: a hidden pane's picture is SEEN, stepped back, through the expanded one.\n drawsHiddenPanePicture: true,\n // Depth is the focal plane's whole motion: panes arrive from depth (its stylesheet), sizes change at once, dialogs\n // rise (its stylesheet), and rows do not cascade.\n paneArrival: ShellPaneArrival.STYLESHEET,\n paneResize: ShellPaneResize.INSTANT,\n dialogArrival: ShellDialogArrival.STYLESHEET,\n cascadesRows: false,\n ghostPose(pose, { rect, stage }) {\n switch (pose) {\n case ShellGhostPose.REST: {\n const origin = vanishingOrigin(rect, stage);\n return { '--fp-ox': `${origin.x}px`, '--fp-oy': `${origin.y}px`, '--fp-z': '0px' };\n }\n case ShellGhostPose.BEHIND:\n return { '--fp-z': `${-settings.layerDepthPx}px`, '--fp-filter': `brightness(${1 - settings.recedeDim}) saturate(${1 - settings.recedeDim * 0.9})` };\n case ShellGhostPose.DISCARDED:\n return { '--fp-z': `${-settings.layerDepthPx * 1.5}px` };\n default: {\n const unknownPose: never = pose;\n throw new Error(`The focal plane has no ghost pose '${String(unknownPose)}'.`);\n }\n }\n },\n dipPeak(dip) {\n switch (dip) {\n case ShellMotionDip.PANE_SWAP:\n return { offset: 0.45, transform: depth(0.5), opacity: 0.55 };\n case ShellMotionDip.COLUMN_RESIZE:\n return { offset: 0.5, transform: depth(0.3) };\n default: {\n const unknownDip: never = dip;\n throw new Error(`The focal plane has no dip '${String(unknownDip)}'.`);\n }\n }\n },\n };\n}\n"]}
1
+ {"version":3,"file":"focal-plane-depth-axis.js","sourceRoot":"","sources":["../../../src/focal-plane/focal-plane-depth-axis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAwB,MAAM,6BAA6B,CAAC;AAG1J,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,6GAA6G;AAC7G,MAAM,CAA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E,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,YAAY,GAAG,GAAG,IAAI,EAAE,CAAC;gBAC3D,OAAO,CAAC,CAAC,CAAC;oBACR,MAAM,WAAW,GAAU,IAAI,CAAC;oBAChC,MAAM,IAAI,KAAK,CAAC,sCAAsC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBACjF,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,CAAC,GAAG;YACT,QAAQ,GAAG,EAAE,CAAC;gBACZ,KAAK,cAAc,CAAC,SAAS;oBAC3B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gBAChE,KAAK,cAAc,CAAC,aAAa;oBAC/B,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;gBAChD,OAAO,CAAC,CAAC,CAAC;oBACR,MAAM,UAAU,GAAU,GAAG,CAAC;oBAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBACzE,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { ShellDialogArrival, ShellGhostPose, ShellMotionDip, ShellPaneArrival, ShellPaneResize, type ShellMotionAxis } from '@wildo-ai/saas-frontend-lib';\n\nimport type { FocalPlaneSettings } from './focal-plane-settings';\nimport { vanishingOrigin } from './focal-plane-vanishing-point';\n\n/** The easing every focal-plane motion shares: a quick start that settles softly (the prototype's curve). */\nexport const FOCAL_PLANE_EASING = 'cubic-bezier(0.2, 0.9, 0.25, 1)';\n\n/**\n * The focal plane's axis for the core motion building blocks: everything moves straight along the camera's line of\n * sight, never sideways and never angled.\n *\n * - A ghost is seen from the stage's vanishing point (its origin), at a depth the stylesheet's transform reads from\n * `--fp-z`: at rest where the pane stood, one layer back and dimmed behind an expanded pane, a layer and a half back\n * as a dismissed pane goes.\n * - A pane whose content changes dips half a layer back and returns, fading a little; a column that folds dips less.\n *\n * `reducedMotion` gives a still axis (`durationMs: 0`), which turns every building block off.\n */\nexport function createFocalPlaneDepthAxis(settings: FocalPlaneSettings, reducedMotion: boolean): ShellMotionAxis {\n const depth = (layers: number): string => `perspective(${settings.cameraDistancePx}px) translate3d(0, 0, ${-settings.layerDepthPx * layers}px)`;\n return {\n durationMs: reducedMotion ? 0 : settings.motionMs,\n easing: FOCAL_PLANE_EASING,\n // The windows are glass: a hidden pane's picture is SEEN, stepped back, through the expanded one.\n drawsHiddenPanePicture: true,\n // Depth is the focal plane's whole motion: panes arrive from depth (its stylesheet), sizes change at once, dialogs\n // rise (its stylesheet), and rows do not cascade.\n paneArrival: ShellPaneArrival.STYLESHEET,\n paneResize: ShellPaneResize.INSTANT,\n dialogArrival: ShellDialogArrival.STYLESHEET,\n cascadesRows: false,\n ghostPose(pose, { rect, stage }) {\n switch (pose) {\n case ShellGhostPose.REST: {\n const origin = vanishingOrigin(rect, stage);\n return { '--fp-ox': `${origin.x}px`, '--fp-oy': `${origin.y}px`, '--fp-z': '0px' };\n }\n case ShellGhostPose.BEHIND:\n return { '--fp-z': `${-settings.layerDepthPx}px`, '--fp-filter': `brightness(${1 - settings.recedeDim}) saturate(${1 - settings.recedeDim * 0.9})` };\n case ShellGhostPose.DISCARDED:\n return { '--fp-z': `${-settings.layerDepthPx * 1.5}px` };\n default: {\n const unknownPose: never = pose;\n throw new Error(`The focal plane has no ghost pose '${String(unknownPose)}'.`);\n }\n }\n },\n dipPeak(dip) {\n switch (dip) {\n case ShellMotionDip.PANE_SWAP:\n return { offset: 0.45, transform: depth(0.5), opacity: 0.55 };\n case ShellMotionDip.COLUMN_RESIZE:\n return { offset: 0.5, transform: depth(0.3) };\n default: {\n const unknownDip: never = dip;\n throw new Error(`The focal plane has no dip '${String(unknownDip)}'.`);\n }\n }\n },\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"focal-plane-settings.d.ts","sourceRoot":"","sources":["../../../../src/focal-plane/focal-plane-settings.ts"],"names":[],"mappings":"AAEA,wIAAwI;AACxI;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,yHAAyH;IACzH,gBAAgB,EAAE,MAAM,CAAC;IACzB,wGAAwG;IACxG,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,iGAAiG;IACjG,YAAY,EAAE,MAAM,CAAC;IACrB,sGAAsG;IACtG,WAAW,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,aAAa,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,oBAAoB,EAAE,kBASlC,CAAC;AAeF;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAAG,kBAAkB,CAmBzG;AAED,4GAA4G;AAC5G,eAAO,MAAM,yBAAyB,6CAA0D,CAAC;AAEjG,wBAAgB,qBAAqB,IAAI,kBAAkB,CAE1D;AAED,qHAAqH;AACrH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,aAAa,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAYnH"}
1
+ {"version":3,"file":"focal-plane-settings.d.ts","sourceRoot":"","sources":["../../../src/focal-plane/focal-plane-settings.ts"],"names":[],"mappings":"AAEA,wIAAwI;AACxI;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,yHAAyH;IACzH,gBAAgB,EAAE,MAAM,CAAC;IACzB,wGAAwG;IACxG,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,iGAAiG;IACjG,YAAY,EAAE,MAAM,CAAC;IACrB,sGAAsG;IACtG,WAAW,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,aAAa,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,oBAAoB,EAAE,kBASlC,CAAC;AAeF;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAAG,kBAAkB,CAmBzG;AAED,4GAA4G;AAC5G,eAAO,MAAM,yBAAyB,6CAA0D,CAAC;AAEjG,wBAAgB,qBAAqB,IAAI,kBAAkB,CAE1D;AAED,qHAAqH;AACrH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,aAAa,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAYnH"}
@@ -1 +1 @@
1
- {"version":3,"file":"focal-plane-settings.js","sourceRoot":"","sources":["../../../../src/focal-plane/focal-plane-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA0BlD,MAAM,CAAC,MAAM,oBAAoB,GAAuB;IACtD,gBAAgB,EAAE,IAAI;IACtB,YAAY,EAAE,GAAG;IACjB,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,IAAI;IACf,YAAY,EAAE,CAAC;IACf,WAAW,EAAE,GAAG;IAChB,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,EAAE;CAChB,CAAC;AACF,6DAA6D;AAE7D,6HAA6H;AAC7H,MAAM,cAAc,GAAgE;IAClF,gBAAgB,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;IAC9B,YAAY,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC;IACvB,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC;IACnB,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,C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GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IACvR,CAAC;IACD,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,gBAAgB,GAAG,GAAG,EAAE,CAAC;QAC5D,MAAM,IAAI,KAAK,CAAC,+CAA+C,QAAQ,CAAC,WAAW,+CAA+C,QAAQ,CAAC,gBAAgB,GAAG,GAAG,IAAI,CAAC,CAAC;IACzK,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,4GAA4G;AAC5G,MAAM,CAAC,MAAM,yBAAyB,GAAG,aAAa,CAAqB,oBAAoB,CAAC,CAAC;AAEjG,MAAM,UAAU,qBAAqB;IACnC,OAAO,UAAU,CAAC,yBAAyB,CAAC,CAAC;AAC/C,CAAC;AAED,qHAAqH;AACrH,MAAM,UAAU,sBAAsB,CAAC,QAA4B,EAAE,aAAsB;IACzF,OAAO;QACL,eAAe,EAAE,GAAG,QAAQ,CAAC,gBAAgB,IAAI;QACjD,WAAW,EAAE,GAAG,QAAQ,CAAC,YAAY,IAAI;QACzC,aAAa,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI;QAC3D,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QACtC,kBAAkB,EAAE,GAAG,QAAQ,CAAC,YAAY,IAAI;QAChD,iBAAiB,EAAE,GAAG,QAAQ,CAAC,WAAW,IAAI;QAC9C,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,GAAG,GAAG,CAAC,GAAG;QAC5D,iBAAiB,EAAE,GAAG,QAAQ,CAAC,WAAW,IAAI;QAC9C,WAAW,EAAE,iCAAiC;KAC/C,CAAC;AACJ,CAAC","sourcesContent":["import { createContext, useContext } from 'react';\n\n/** @wildo_source:part:start presets.3d.focal-plane-settings facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * The focal plane's numbers (#2049). The defaults are the values Paul settled on in the prototype on 2026-09-30.\n * They reach the stylesheet as CSS custom properties on the layout's root, so every object reads one source.\n */\nexport interface FocalPlaneSettings {\n /** The still camera's distance from the focal plane, in CSS pixels: the `perspective()` every object is seen through. */\n cameraDistancePx: number;\n /** How far back one layer steps, in CSS pixels. A pane behind the focused one steps back part of it. */\n layerDepthPx: number;\n /** How long an object takes to travel, in milliseconds. */\n motionMs: number;\n /** How much a receding object dims per layer, 0-1. */\n recedeDim: number;\n /** How much a receding PANE blurs per layer, in CSS pixels (navigation; 0 keeps panes sharp). */\n recedeBlurPx: number;\n /** How much everything blurs behind a MODAL popup (dialog, sheet, command palette), in CSS pixels. */\n modalBlurPx: number;\n /** How opaque a glass window is, 0-1: the rest is the background blurred through it. */\n windowOpacity: number;\n /** How far a shell panel rises toward the camera under the pointer, in CSS pixels. */\n hoverLiftPx: number;\n}\n\nexport const FOCAL_PLANE_DEFAULTS: FocalPlaneSettings = {\n cameraDistancePx: 1000,\n layerDepthPx: 240,\n motionMs: 580,\n recedeDim: 0.18,\n recedeBlurPx: 0,\n modalBlurPx: 2.5,\n windowOpacity: 0.56,\n hoverLiftPx: 16,\n};\n/** @wildo_source:part:end presets.3d.focal-plane-settings */\n\n/** The range each setting accepts: outside it the layout would draw nonsense (a camera behind the plane, a negative dim). */\nconst SETTING_RANGES: Record<keyof FocalPlaneSettings, readonly [number, number]> = {\n cameraDistancePx: [200, 10000],\n layerDepthPx: [0, 2000],\n motionMs: [0, 5000],\n recedeDim: [0, 0.9],\n recedeBlurPx: [0, 20],\n modalBlurPx: [0, 20],\n windowOpacity: [0.05, 1],\n hoverLiftPx: [0, 200],\n};\n\n/**\n * The application's overrides over the defaults, checked: an unknown key or a value outside its range is refused at\n * registration, naming the setting, rather than drawn as something the application did not mean.\n */\nexport function resolveFocalPlaneSettings(overrides: Partial<FocalPlaneSettings> = {}): FocalPlaneSettings {\n const resolved: FocalPlaneSettings = { ...FOCAL_PLANE_DEFAULTS };\n for (const [key, value] of Object.entries(overrides)) {\n if (!(key in SETTING_RANGES)) throw new Error(`register3DLayout(): the focal plane has no setting '${key}'.`);\n const [min, max] = SETTING_RANGES[key as keyof FocalPlaneSettings];\n if (typeof value !== 'number' || !Number.isFinite(value) || value < min || value > max) {\n throw new Error(`register3DLayout(): focalPlane.${key} must be a number from ${min} to ${max}; got ${String(value)}.`);\n }\n resolved[key as keyof FocalPlaneSettings] = value;\n }\n // Each value alone can be in range and the combination still put an object at or behind the camera: the nearest any\n // object comes is a sheet arriving at 0.9 of a layer in front of the plane, and a hovered panel at its lift.\n if (resolved.layerDepthPx * 0.9 >= resolved.cameraDistancePx * 0.8) {\n throw new Error(`register3DLayout(): focalPlane.layerDepthPx (${resolved.layerDepthPx}) is too deep for a camera ${resolved.cameraDistancePx}px away: a popup arriving from in front would reach the camera. Keep it under ${Math.floor((resolved.cameraDistancePx * 0.8) / 0.9)}.`);\n }\n if (resolved.hoverLiftPx >= resolved.cameraDistancePx * 0.5) {\n throw new Error(`register3DLayout(): focalPlane.hoverLiftPx (${resolved.hoverLiftPx}) must stay under half the camera distance (${resolved.cameraDistancePx * 0.5}).`);\n }\n return resolved;\n}\n\n/** The resolved settings, provided by the 3D main container to its placement. Outside one, the defaults. */\nexport const FocalPlaneSettingsContext = createContext<FocalPlaneSettings>(FOCAL_PLANE_DEFAULTS);\n\nexport function useFocalPlaneSettings(): FocalPlaneSettings {\n return useContext(FocalPlaneSettingsContext);\n}\n\n/** The settings as the custom properties the focal-plane stylesheet reads. Reduced motion zeroes the travel time. */\nexport function focalPlaneCssVariables(settings: FocalPlaneSettings, reducedMotion: boolean): Record<string, string> {\n return {\n '--fp-distance': `${settings.cameraDistancePx}px`,\n '--fp-step': `${settings.layerDepthPx}px`,\n '--fp-motion': `${reducedMotion ? 0 : settings.motionMs}ms`,\n '--fp-dim': String(settings.recedeDim),\n '--fp-recede-blur': `${settings.recedeBlurPx}px`,\n '--fp-modal-blur': `${settings.modalBlurPx}px`,\n '--fp-glass': `${Math.round(settings.windowOpacity * 100)}%`,\n '--fp-hover-lift': `${settings.hoverLiftPx}px`,\n '--fp-ease': 'cubic-bezier(0.2, 0.9, 0.25, 1)',\n };\n}\n"]}
1
+ {"version":3,"file":"focal-plane-settings.js","sourceRoot":"","sources":["../../../src/focal-plane/focal-plane-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA0BlD,MAAM,CAAC,MAAM,oBAAoB,GAAuB;IACtD,gBAAgB,EAAE,IAAI;IACtB,YAAY,EAAE,GAAG;IACjB,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,IAAI;IACf,YAAY,EAAE,CAAC;IACf,WAAW,EAAE,GAAG;IAChB,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,EAAE;CAChB,CAAC;AACF,6DAA6D;AAE7D,6HAA6H;AAC7H,MAAM,cAAc,GAAgE;IAClF,gBAAgB,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;IAC9B,YAAY,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC;IACvB,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC;IACnB,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC;IACnB,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;IACxB,WAAW,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,YAAyC,EAAE;IACnF,MAAM,QAAQ,GAAuB,EAAE,GAAG,oBAAoB,EAAE,CAAC;IACjE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACrD,IAAI,CAAC,CAA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C,yBAAyB,CAAC,CAAC;AAC/C,CAAC;AAED,qHAAqH;AACrH,MAAM,UAAU,sBAAsB,CAAC,QAA4B,EAAE,aAAsB;IACzF,OAAO;QACL,eAAe,EAAE,GAAG,QAAQ,CAAC,gBAAgB,IAAI;QACjD,WAAW,EAAE,GAAG,QAAQ,CAAC,YAAY,IAAI;QACzC,aAAa,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI;QAC3D,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QACtC,kBAAkB,EAAE,GAAG,QAAQ,CAAC,YAAY,IAAI;QAChD,iBAAiB,EAAE,GAAG,QAAQ,CAAC,WAAW,IAAI;QAC9C,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,GAAG,GAAG,CAAC,GAAG;QAC5D,iBAAiB,EAAE,GAAG,QAAQ,CAAC,WAAW,IAAI;QAC9C,WAAW,EAAE,iCAAiC;KAC/C,CAAC;AACJ,CAAC","sourcesContent":["import { createContext, useContext } from 'react';\n\n/** @wildo_source:part:start presets.3d.focal-plane-settings facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * The focal plane's numbers (#2049). The defaults are the values Paul settled on in the prototype on 2026-09-30.\n * They reach the stylesheet as CSS custom properties on the layout's root, so every object reads one source.\n */\nexport interface FocalPlaneSettings {\n /** The still camera's distance from the focal plane, in CSS pixels: the `perspective()` every object is seen through. */\n cameraDistancePx: number;\n /** How far back one layer steps, in CSS pixels. A pane behind the focused one steps back part of it. */\n layerDepthPx: number;\n /** How long an object takes to travel, in milliseconds. */\n motionMs: number;\n /** How much a receding object dims per layer, 0-1. */\n recedeDim: number;\n /** How much a receding PANE blurs per layer, in CSS pixels (navigation; 0 keeps panes sharp). */\n recedeBlurPx: number;\n /** How much everything blurs behind a MODAL popup (dialog, sheet, command palette), in CSS pixels. */\n modalBlurPx: number;\n /** How opaque a glass window is, 0-1: the rest is the background blurred through it. */\n windowOpacity: number;\n /** How far a shell panel rises toward the camera under the pointer, in CSS pixels. */\n hoverLiftPx: number;\n}\n\nexport const FOCAL_PLANE_DEFAULTS: FocalPlaneSettings = {\n cameraDistancePx: 1000,\n layerDepthPx: 240,\n motionMs: 580,\n recedeDim: 0.18,\n recedeBlurPx: 0,\n modalBlurPx: 2.5,\n windowOpacity: 0.56,\n hoverLiftPx: 16,\n};\n/** @wildo_source:part:end presets.3d.focal-plane-settings */\n\n/** The range each setting accepts: outside it the layout would draw nonsense (a camera behind the plane, a negative dim). */\nconst SETTING_RANGES: Record<keyof FocalPlaneSettings, readonly [number, number]> = {\n cameraDistancePx: [200, 10000],\n layerDepthPx: [0, 2000],\n motionMs: [0, 5000],\n recedeDim: [0, 0.9],\n recedeBlurPx: [0, 20],\n modalBlurPx: [0, 20],\n windowOpacity: [0.05, 1],\n hoverLiftPx: [0, 200],\n};\n\n/**\n * The application's overrides over the defaults, checked: an unknown key or a value outside its range is refused at\n * registration, naming the setting, rather than drawn as something the application did not mean.\n */\nexport function resolveFocalPlaneSettings(overrides: Partial<FocalPlaneSettings> = {}): FocalPlaneSettings {\n const resolved: FocalPlaneSettings = { ...FOCAL_PLANE_DEFAULTS };\n for (const [key, value] of Object.entries(overrides)) {\n if (!(key in SETTING_RANGES)) throw new Error(`register3DLayout(): the focal plane has no setting '${key}'.`);\n const [min, max] = SETTING_RANGES[key as keyof FocalPlaneSettings];\n if (typeof value !== 'number' || !Number.isFinite(value) || value < min || value > max) {\n throw new Error(`register3DLayout(): focalPlane.${key} must be a number from ${min} to ${max}; got ${String(value)}.`);\n }\n resolved[key as keyof FocalPlaneSettings] = value;\n }\n // Each value alone can be in range and the combination still put an object at or behind the camera: the nearest any\n // object comes is a sheet arriving at 0.9 of a layer in front of the plane, and a hovered panel at its lift.\n if (resolved.layerDepthPx * 0.9 >= resolved.cameraDistancePx * 0.8) {\n throw new Error(`register3DLayout(): focalPlane.layerDepthPx (${resolved.layerDepthPx}) is too deep for a camera ${resolved.cameraDistancePx}px away: a popup arriving from in front would reach the camera. Keep it under ${Math.floor((resolved.cameraDistancePx * 0.8) / 0.9)}.`);\n }\n if (resolved.hoverLiftPx >= resolved.cameraDistancePx * 0.5) {\n throw new Error(`register3DLayout(): focalPlane.hoverLiftPx (${resolved.hoverLiftPx}) must stay under half the camera distance (${resolved.cameraDistancePx * 0.5}).`);\n }\n return resolved;\n}\n\n/** The resolved settings, provided by the 3D main container to its placement. Outside one, the defaults. */\nexport const FocalPlaneSettingsContext = createContext<FocalPlaneSettings>(FOCAL_PLANE_DEFAULTS);\n\nexport function useFocalPlaneSettings(): FocalPlaneSettings {\n return useContext(FocalPlaneSettingsContext);\n}\n\n/** The settings as the custom properties the focal-plane stylesheet reads. Reduced motion zeroes the travel time. */\nexport function focalPlaneCssVariables(settings: FocalPlaneSettings, reducedMotion: boolean): Record<string, string> {\n return {\n '--fp-distance': `${settings.cameraDistancePx}px`,\n '--fp-step': `${settings.layerDepthPx}px`,\n '--fp-motion': `${reducedMotion ? 0 : settings.motionMs}ms`,\n '--fp-dim': String(settings.recedeDim),\n '--fp-recede-blur': `${settings.recedeBlurPx}px`,\n '--fp-modal-blur': `${settings.modalBlurPx}px`,\n '--fp-glass': `${Math.round(settings.windowOpacity * 100)}%`,\n '--fp-hover-lift': `${settings.hoverLiftPx}px`,\n '--fp-ease': 'cubic-bezier(0.2, 0.9, 0.25, 1)',\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"focal-plane-shell-container.d.ts","sourceRoot":"","sources":["../../../../src/focal-plane/focal-plane-shell-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAiBL,KAAK,0CAA0C,EAChD,MAAM,6BAA6B,CAAC;AAOrC;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE,0CAA0C,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CASpH"}
1
+ {"version":3,"file":"focal-plane-shell-container.d.ts","sourceRoot":"","sources":["../../../src/focal-plane/focal-plane-shell-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAiBL,KAAK,0CAA0C,EAChD,MAAM,6BAA6B,CAAC;AAOrC;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE,0CAA0C,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CASpH"}
@@ -1 +1 @@
1
- {"version":3,"file":"focal-plane-shell-container.js","sourceRoot":"","sources":["../../../../src/focal-plane/focal-plane-shell-container.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC1H,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,2CAA2C,EAC3C,OAAO,EACP,qBAAqB,EACrB,iBAAiB,EACjB,2BAA2B,EAC3B,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,KAAK,GAEN,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;;;;GAQG;AACH,MAAM,UAAU,wBAAwB,CAAC,EAAE,QAAQ,EAA8C;IAC/F,MAAM,UAAU,GAAG,iBAAiB,EAAE,CAAC;IACvC,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BAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,mBAAmB,CAAC,GAAG,GAAI,CAAC,IAC7F,EACL,KAAK,CAAC,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,GAAI,CAAC,IACjG,EACN,cAAW,CAAC,2BAA2B,CAAC,EAAE,eAAe,CAAC,KAAK,iBAAgB,MAAM,GAAG,EACxF,KAAC,sBAAsB,KAAG,EAC1B,KAAC,0BAA0B,KAAG,IAC1B,GACE,CACX,CAAC;AACJ,CAAC","sourcesContent":["import React, { useLayoutEffect, useMemo, useRef } from 'react';\n\nimport { HorizontalPlacement, ShellRegion, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';\nimport {\n AppShellContentOutlet,\n AppShellLoadingState,\n AppShellOverlayPortalLayer,\n AppShellOverlaysOutlet,\n AppShellProviders,\n AppShellRegionOutlet,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n useAppShellFirstReady,\n useAppShellLayout,\n SHELL_GHOST_LAYER_ATTRIBUTE,\n SHELL_OBJECT_ATTRIBUTE,\n ShellGhostLayer,\n useNavigationState,\n useShellMotion,\n useUI,\n type AppLayoutPreset_MainContainer_DefaultProps,\n} from '@wildo-ai/saas-frontend-lib';\n\nimport { createFocalPlaneDepthAxis } from './focal-plane-depth-axis';\nimport { focalPlaneCssVariables, useFocalPlaneSettings } from './focal-plane-settings';\nimport { installFocalPlaneStylesheet } from './focal-plane-stylesheet';\nimport { writeVanishingOrigin } from './focal-plane-vanishing-point';\n\n/**\n * The focal plane's placement (#2049). The regions are the application's own, rendered by the standard outlets with\n * every context; this container arranges them as floating glass windows over an ambient background, and marks each\n * as an object the still camera sees in depth. The navigation panes inside the content region are objects too, found\n * by the engine's own markers (see `focal-plane-stylesheet.ts`).\n *\n * Overlays render in `AppShellOverlayPortalLayer`, outside every transformed object: a dialog inside a transformed pane\n * would be confined to it, and a menu placed in the wrong coordinates.\n */\nexport function FocalPlaneShellContainer({ children }: AppLayoutPreset_MainContainer_DefaultProps): React.JSX.Element {\n const layoutInfo = useAppShellLayout();\n const hasLayoutBeenReady = useAppShellFirstReady(layoutInfo.isLayoutReady);\n if (!layoutInfo.isLayoutReady && !hasLayoutBeenReady) return <AppShellLoadingState />;\n return (\n <AppShellProviders layout={layoutInfo}>\n <FocalPlaneStage>{children}</FocalPlaneStage>\n </AppShellProviders>\n );\n}\n\nfunction FocalPlaneStage({ children }: { children: React.ReactNode }): React.JSX.Element {\n const { prefersReducedMotion } = useUI();\n const rootRef = useRef<HTMLDivElement>(null);\n const settings = useFocalPlaneSettings();\n const navigation = useNavigationState();\n useLayoutEffect(() => installFocalPlaneStylesheet(), []);\n const axis = useMemo(() => createFocalPlaneDepthAxis(settings, prefersReducedMotion), [settings, prefersReducedMotion]);\n // The core motion building blocks: the pane in front, place changes, ghosts and dips, seen along the depth axis. Each\n // object's measurement also sets its origin on the one vanishing point.\n const { frontZone } = useShellMotion(rootRef, { axis, navigation, onObjectMeasured: writeVanishingOrigin });\n const shell = (content: React.ReactNode): React.JSX.Element => <div {...{ [SHELL_OBJECT_ATTRIBUTE]: 'region' }}>{content}</div>;\n\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div\n ref={rootRef}\n data-focal-plane=\"\"\n data-fp-focus={frontZone}\n style={focalPlaneCssVariables(settings, prefersReducedMotion) as React.CSSProperties}\n >\n <div {...{ [SHELL_GHOST_LAYER_ATTRIBUTE]: ShellGhostLayer.BACK }} aria-hidden=\"true\" />\n <div className=\"fp-backdrop\" aria-hidden=\"true\">\n <i className=\"fp-a\" />\n <i className=\"fp-b\" />\n <i className=\"fp-c\" />\n </div>\n <div className=\"fp-grid\">\n {shell(<AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.TOP} />)}\n {shell(<AppShellRegionOutlet region={ShellRegion.MENUBAR} />)}\n <div className=\"fp-row fp-middle\">\n {shell(<AppShellRegionOutlet region={ShellRegion.ACTIVITY_BAR} />)}\n {shell(<AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.START} />)}\n {shell(<AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.START} />)}\n <div className=\"fp-column\">\n {shell(<AppShellRegionOutlet region={ShellRegion.TOOLBAR} />)}\n <div className=\"fp-content\">\n <AppShellContentOutlet className=\"flex-1 relative min-w-0 min-h-0\">{children}</AppShellContentOutlet>\n </div>\n </div>\n {shell(<AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.END} />)}\n {shell(<AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.END} />)}\n </div>\n {shell(<AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.BOTTOM} />)}\n </div>\n <div {...{ [SHELL_GHOST_LAYER_ATTRIBUTE]: ShellGhostLayer.FRONT }} aria-hidden=\"true\" />\n <AppShellOverlaysOutlet />\n <AppShellOverlayPortalLayer />\n </div>\n </Surface>\n );\n}\n"]}
1
+ {"version":3,"file":"focal-plane-shell-container.js","sourceRoot":"","sources":["../../../src/focal-plane/focal-plane-shell-container.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC1H,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,2CAA2C,EAC3C,OAAO,EACP,qBAAqB,EACrB,iBAAiB,EACjB,2BAA2B,EAC3B,sBAAsB,EACtB,eAAe,EACf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,SAAS,EAAE,mBAAmB,CAAC,KAAK,GAAI,CAAC,EACzG,eAAK,SAAS,EAAC,WAAW,aACvB,KAAK,CAAC,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,OAAO,GAAI,CAAC,EAC7D,cAAK,SAAS,EAAC,YAAY,YACzB,KAAC,qBAAqB,IAAC,SAAS,EAAC,iCAAiC,YAAE,QAAQ,GAAyB,GACjG,IACF,EACL,KAAK,CAAC,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,SAAS,EAAE,mBAAmB,CAAC,GAAG,GAAI,CAAC,EACtG,KAAK,CAAC,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,mBAAmB,CAAC,GAAG,GAAI,CAAC,IAC7F,EACL,KAAK,CAAC,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,GAAI,CAAC,IACjG,EACN,cAAW,CAAC,2BAA2B,CAAC,EAAE,eAAe,CAAC,KAAK,iBAAgB,MAAM,GAAG,EACxF,KAAC,sBAAsB,KAAG,EAC1B,KAAC,0BAA0B,KAAG,IAC1B,GACE,CACX,CAAC;AACJ,CAAC","sourcesContent":["import React, { useLayoutEffect, useMemo, useRef } from 'react';\n\nimport { HorizontalPlacement, ShellRegion, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';\nimport {\n AppShellContentOutlet,\n AppShellLoadingState,\n AppShellOverlayPortalLayer,\n AppShellOverlaysOutlet,\n AppShellProviders,\n AppShellRegionOutlet,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n useAppShellFirstReady,\n useAppShellLayout,\n SHELL_GHOST_LAYER_ATTRIBUTE,\n SHELL_OBJECT_ATTRIBUTE,\n ShellGhostLayer,\n useNavigationState,\n useShellMotion,\n useUI,\n type AppLayoutPreset_MainContainer_DefaultProps,\n} from '@wildo-ai/saas-frontend-lib';\n\nimport { createFocalPlaneDepthAxis } from './focal-plane-depth-axis';\nimport { focalPlaneCssVariables, useFocalPlaneSettings } from './focal-plane-settings';\nimport { installFocalPlaneStylesheet } from './focal-plane-stylesheet';\nimport { writeVanishingOrigin } from './focal-plane-vanishing-point';\n\n/**\n * The focal plane's placement (#2049). The regions are the application's own, rendered by the standard outlets with\n * every context; this container arranges them as floating glass windows over an ambient background, and marks each\n * as an object the still camera sees in depth. The navigation panes inside the content region are objects too, found\n * by the engine's own markers (see `focal-plane-stylesheet.ts`).\n *\n * Overlays render in `AppShellOverlayPortalLayer`, outside every transformed object: a dialog inside a transformed pane\n * would be confined to it, and a menu placed in the wrong coordinates.\n */\nexport function FocalPlaneShellContainer({ children }: AppLayoutPreset_MainContainer_DefaultProps): React.JSX.Element {\n const layoutInfo = useAppShellLayout();\n const hasLayoutBeenReady = useAppShellFirstReady(layoutInfo.isLayoutReady);\n if (!layoutInfo.isLayoutReady && !hasLayoutBeenReady) return <AppShellLoadingState />;\n return (\n <AppShellProviders layout={layoutInfo}>\n <FocalPlaneStage>{children}</FocalPlaneStage>\n </AppShellProviders>\n );\n}\n\nfunction FocalPlaneStage({ children }: { children: React.ReactNode }): React.JSX.Element {\n const { prefersReducedMotion } = useUI();\n const rootRef = useRef<HTMLDivElement>(null);\n const settings = useFocalPlaneSettings();\n const navigation = useNavigationState();\n useLayoutEffect(() => installFocalPlaneStylesheet(), []);\n const axis = useMemo(() => createFocalPlaneDepthAxis(settings, prefersReducedMotion), [settings, prefersReducedMotion]);\n // The core motion building blocks: the pane in front, place changes, ghosts and dips, seen along the depth axis. Each\n // object's measurement also sets its origin on the one vanishing point.\n const { frontZone } = useShellMotion(rootRef, { axis, navigation, onObjectMeasured: writeVanishingOrigin });\n const shell = (content: React.ReactNode): React.JSX.Element => <div {...{ [SHELL_OBJECT_ATTRIBUTE]: 'region' }}>{content}</div>;\n\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div\n ref={rootRef}\n data-focal-plane=\"\"\n data-fp-focus={frontZone}\n style={focalPlaneCssVariables(settings, prefersReducedMotion) as React.CSSProperties}\n >\n <div {...{ [SHELL_GHOST_LAYER_ATTRIBUTE]: ShellGhostLayer.BACK }} aria-hidden=\"true\" />\n <div className=\"fp-backdrop\" aria-hidden=\"true\">\n <i className=\"fp-a\" />\n <i className=\"fp-b\" />\n <i className=\"fp-c\" />\n </div>\n <div className=\"fp-grid\">\n {shell(<AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.TOP} />)}\n {shell(<AppShellRegionOutlet region={ShellRegion.MENUBAR} />)}\n <div className=\"fp-row fp-middle\">\n {shell(<AppShellRegionOutlet region={ShellRegion.ACTIVITY_BAR} />)}\n {shell(<AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.START} />)}\n {shell(<AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.START} />)}\n <div className=\"fp-column\">\n {shell(<AppShellRegionOutlet region={ShellRegion.TOOLBAR} />)}\n <div className=\"fp-content\">\n <AppShellContentOutlet className=\"flex-1 relative min-w-0 min-h-0\">{children}</AppShellContentOutlet>\n </div>\n </div>\n {shell(<AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.END} />)}\n {shell(<AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.END} />)}\n </div>\n {shell(<AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.BOTTOM} />)}\n </div>\n <div {...{ [SHELL_GHOST_LAYER_ATTRIBUTE]: ShellGhostLayer.FRONT }} aria-hidden=\"true\" />\n <AppShellOverlaysOutlet />\n <AppShellOverlayPortalLayer />\n </div>\n </Surface>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"focal-plane-stylesheet.d.ts","sourceRoot":"","sources":["../../../../src/focal-plane/focal-plane-stylesheet.ts"],"names":[],"mappings":"AA4DA,eAAO,MAAM,eAAe,QAoI3B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,GAAE,QAAmB,GAAG,MAAM,IAAI,CAEhF"}
1
+ {"version":3,"file":"focal-plane-stylesheet.d.ts","sourceRoot":"","sources":["../../../src/focal-plane/focal-plane-stylesheet.ts"],"names":[],"mappings":"AA4DA,eAAO,MAAM,eAAe,QA6I3B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,GAAE,QAAmB,GAAG,MAAM,IAAI,CAEhF"}
@@ -88,6 +88,15 @@ ${ROOT} :is([data-shell-object], ${SHELL_PANE_SELECTOR}) {
88
88
  box-shadow: 0 18px 44px -22px rgb(0 0 0 / 0.30), 0 1px 3px rgb(0 0 0 / 0.05);
89
89
  }
90
90
  ${ROOT} ${CONTENT} { background: transparent; }
91
+
92
+ /* Muted text inside a glass window is drawn a little nearer the body ink (#2049). The page's muted ink is measured on the
93
+ 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)
94
+ 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
95
+ 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
96
+ ground). The page's value is taken on the root, so a window nested in a window mixes from the page again rather than
97
+ twice. Popups are more opaque and read without it. Measured by focal-plane-glass-contrast.test.ts. */
98
+ ${ROOT} { --fp-page-muted-foreground: var(--muted-foreground); }
99
+ ${ROOT} :is([data-shell-object], ${SHELL_PANE_SELECTOR}) { --muted-foreground: color-mix(in oklab, var(--fp-page-muted-foreground) 88%, var(--foreground)); }
91
100
  ${ROOT} ${CONTENT} :is([data-content-area="${NavigationZone.SECONDARY}"], [data-content-area="${NavigationZone.COMPANION}"]):not([data-panel-id] *) { margin-left: 12px; }
92
101
 
93
102
  /* Side by side, the pane you work in rests on the focal plane; every other pane steps back and dims. The focused
@@ -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,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,EAAE,yBAAyB;CAChC,CAAC;AACF,2GAA2G;AAC3G,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;AAG1C,MAAM,CAAC,MAAM,eAAe,GAAG;;;EAG7B,IAAI;;;EAG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-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${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"]}
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,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AAE,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;EACpG,IAAI,mCAAmC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;EACpG,IAAI,2CAA2C,cAAc,CAAC,KAAK;EACnE,IAAI,2CAA2C,cAAc,CAAC,KAAK;;;EAGnE,IAAI,mCAAmC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;EAgBzN,IAAI;;;;;;;;;IASF,IAAI,IAAI,OAAO,KAAK,IAAI,wBAAwB,IAAI,wCAAwC,IAAI;IAChG,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"]}
@@ -1 +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"}
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"}
@@ -1 +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
+ {"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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
+ 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,CAA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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 { 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,qB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,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.d.ts","sourceRoot":"","sources":["../../../../src/frame/frame-appearance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAgB,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEzH,OAAO,EAA+C,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAgG,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9I,OAAO,EAA2B,KAAK,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAExG,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,8FAA8F;AAC9F,MAAM,WAAW,mBAAmB;IAClC,qFAAqF;IACrF,OAAO,EAAE,OAAO,C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