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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/esm/focal-plane/focal-plane-depth-axis.d.ts +17 -0
  2. package/dist/esm/focal-plane/focal-plane-depth-axis.d.ts.map +1 -0
  3. package/dist/esm/focal-plane/focal-plane-depth-axis.js +59 -0
  4. package/dist/esm/focal-plane/focal-plane-depth-axis.js.map +1 -0
  5. package/dist/esm/focal-plane/focal-plane-settings.d.ts.map +1 -1
  6. package/dist/esm/focal-plane/focal-plane-settings.js.map +1 -1
  7. package/dist/esm/focal-plane/focal-plane-shell-container.d.ts.map +1 -1
  8. package/dist/esm/focal-plane/focal-plane-shell-container.js +10 -119
  9. package/dist/esm/focal-plane/focal-plane-shell-container.js.map +1 -1
  10. package/dist/esm/focal-plane/focal-plane-stylesheet.d.ts +2 -9
  11. package/dist/esm/focal-plane/focal-plane-stylesheet.d.ts.map +1 -1
  12. package/dist/esm/focal-plane/focal-plane-stylesheet.js +41 -80
  13. package/dist/esm/focal-plane/focal-plane-stylesheet.js.map +1 -1
  14. package/dist/esm/focal-plane/focal-plane-vanishing-point.d.ts +27 -0
  15. package/dist/esm/focal-plane/focal-plane-vanishing-point.d.ts.map +1 -0
  16. package/dist/esm/focal-plane/focal-plane-vanishing-point.js +21 -0
  17. package/dist/esm/focal-plane/focal-plane-vanishing-point.js.map +1 -0
  18. package/dist/esm/frame/frame-3d-style.d.ts +24 -4
  19. package/dist/esm/frame/frame-3d-style.d.ts.map +1 -1
  20. package/dist/esm/frame/frame-3d-style.js +86 -6
  21. package/dist/esm/frame/frame-3d-style.js.map +1 -1
  22. package/dist/esm/frame/frame-appearance.js.map +1 -1
  23. package/dist/esm/frame/frame-canvas.js.map +1 -1
  24. package/dist/esm/frame/frame-canvas.lazy.js.map +1 -1
  25. package/dist/esm/frame/frame-color.d.ts.map +1 -1
  26. package/dist/esm/frame/frame-color.js.map +1 -1
  27. package/dist/esm/frame/frame-driver.js.map +1 -1
  28. package/dist/esm/frame/frame-renderer.js.map +1 -1
  29. package/dist/esm/frame/frame-shaders.d.ts.map +1 -1
  30. package/dist/esm/frame/frame-shaders.js.map +1 -1
  31. package/dist/esm/frame/use-frame-appearance.d.ts +1 -1
  32. package/dist/esm/frame/use-frame-appearance.js +3 -3
  33. package/dist/esm/frame/use-frame-appearance.js.map +1 -1
  34. package/dist/esm/index.d.ts +0 -1
  35. package/dist/esm/index.d.ts.map +1 -1
  36. package/dist/esm/index.js +0 -1
  37. package/dist/esm/index.js.map +1 -1
  38. package/dist/esm/layout/header-first-shell-container.js.map +1 -1
  39. package/dist/esm/layout/layout-3d-definition.d.ts +5 -7
  40. package/dist/esm/layout/layout-3d-definition.d.ts.map +1 -1
  41. package/dist/esm/layout/layout-3d-definition.js +1 -1
  42. package/dist/esm/layout/layout-3d-definition.js.map +1 -1
  43. package/dist/esm/layout/layout-3d-transition-choreography.d.ts.map +1 -1
  44. package/dist/esm/layout/layout-3d-transition-choreography.js.map +1 -1
  45. package/dist/esm/layout/layout-3d-vocabulary.d.ts.map +1 -1
  46. package/dist/esm/layout/layout-3d-vocabulary.js.map +1 -1
  47. package/dist/esm/layout-3d-main-container.d.ts +13 -18
  48. package/dist/esm/layout-3d-main-container.d.ts.map +1 -1
  49. package/dist/esm/layout-3d-main-container.js +7 -15
  50. package/dist/esm/layout-3d-main-container.js.map +1 -1
  51. package/dist/esm/register-3d-layout.d.ts +8 -4
  52. package/dist/esm/register-3d-layout.d.ts.map +1 -1
  53. package/dist/esm/register-3d-layout.js +16 -36
  54. package/dist/esm/register-3d-layout.js.map +1 -1
  55. package/dist/esm/shell-region-measurement.js.map +1 -1
  56. package/dist/esm/tokens/design-token-resolution.js.map +1 -1
  57. package/dist/esm/tokens/use-design-token-resolution.js.map +1 -1
  58. package/dist/tsconfig.build.tsbuildinfo +1 -1
  59. package/package.json +8 -6
  60. package/dist/esm/focal-plane/use-pane-depth.d.ts +0 -20
  61. package/dist/esm/focal-plane/use-pane-depth.d.ts.map +0 -1
  62. package/dist/esm/focal-plane/use-pane-depth.js +0 -162
  63. package/dist/esm/focal-plane/use-pane-depth.js.map +0 -1
  64. package/dist/esm/focal-plane/use-shared-vanishing-point.d.ts +0 -35
  65. package/dist/esm/focal-plane/use-shared-vanishing-point.d.ts.map +0 -1
  66. package/dist/esm/focal-plane/use-shared-vanishing-point.js +0 -86
  67. package/dist/esm/focal-plane/use-shared-vanishing-point.js.map +0 -1
  68. package/dist/esm/layout/shell-layout-placement.d.ts +0 -26
  69. package/dist/esm/layout/shell-layout-placement.d.ts.map +0 -1
  70. package/dist/esm/layout/shell-layout-placement.js +0 -18
  71. package/dist/esm/layout/shell-layout-placement.js.map +0 -1
@@ -9,7 +9,7 @@ import { useDesignTokenResolution } from '../tokens/use-design-token-resolution.
9
9
  *
10
10
  * This is the frame's only reader of the theme: the tokens (through the resolver, #1819), the navigation
11
11
  * material, the gesture spring of the SUNKEN surface recipe (the recipe the shell regions render with), `isDark`,
12
- * `prefersReducedMotion` and the theme id that picks the frame style. The recipe's Tailwind classes are NOT read:
12
+ * `prefersReducedMotion` and the theme id and personality point that pick the frame style. The recipe's Tailwind classes are NOT read:
13
13
  * they stay DOM, inside the regions. The canvas behind the
14
14
  * lazy door receives the result as props and reads nothing itself, so a theme, mode or breakpoint change is a
15
15
  * prop change on the canvas — never a remount of anything, and never of the 2D shell beside it.
@@ -27,12 +27,12 @@ export function useFrameAppearance(catalog, overrides) {
27
27
  const surfaceGestureTransition = useMemo(() => JSON.parse(gestureKey) ?? undefined, [gestureKey]);
28
28
  return useMemo(() => deriveFrameAppearance({
29
29
  resolutions,
30
- style: resolveFrame3DThemeStyle(catalog, designTheme.id, overrides),
30
+ style: resolveFrame3DThemeStyle(catalog, { id: designTheme.id, personality: designTheme.personality }, overrides),
31
31
  navigationMaterial,
32
32
  surfaceGestureTransition,
33
33
  isDark,
34
34
  prefersReducedMotion,
35
35
  devicePixelRatio: window.devicePixelRatio,
36
- }), [resolutions, catalog, designTheme.id, overrides, navigationMaterial, surfaceGestureTransition, isDark, prefersReducedMotion]);
36
+ }), [resolutions, catalog, designTheme.id, designTheme.personality, overrides, navigationMaterial, surfaceGestureTransition, isDark, prefersReducedMotion]);
37
37
  }
38
38
  //# sourceMappingURL=use-frame-appearance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-frame-appearance.js","sourceRoot":"","sources":["../../../../src/frame/use-frame-appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtG,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEpD,OAAO,EAAE,wBAAwB,EAAwD,MAAM,kBAAkB,CAAC;AAClH,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEjF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAA4B,EAAE,SAA4C;IAC3G,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,WAAW,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAC;IAC7F,MAAM,WAAW,GAAG,wBAAwB,EAAE,CAAC;IAC/C,MAAM,kBAAkB,GAAG,kBAAkB,EAAE,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACtF,0GAA0G;IAC1G,iEAAiE;IACjE,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC;IACpH,MAAM,wBAAwB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAgD,IAAI,SAAS,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IACjJ,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,qBAAqB,CAAC;QAC1B,WAAW;QACX,KAAK,EAAE,wBAAwB,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,EAAE,SAAS,CAAC;QACnE,kBAAkB;QAClB,wBAAwB;QACxB,MAAM;QACN,oBAAoB;QACpB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;KAC1C,CAAC,EACF,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAC9H,CAAC;AACJ,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport { MaterialProfileRole, SurfaceVariant, UIBehavior } from '@wildo-ai/presets-components-models';\nimport { useUI } from '@wildo-ai/saas-frontend-lib';\n\nimport { resolveFrame3DThemeStyle, type Frame3DStyleCatalog, type Frame3DStyleOverrides } from './frame-3d-style';\nimport { deriveFrameAppearance, type FrameAppearance } from './frame-appearance';\nimport { useDesignTokenResolution } from '../tokens/use-design-token-resolution';\n\n/**\n * The frame's appearance for the active theme and mode, computed in the DOM tree (#1823).\n *\n * This is the frame's only reader of the theme: the tokens (through the resolver, #1819), the navigation\n * material, the gesture spring of the SUNKEN surface recipe (the recipe the shell regions render with), `isDark`,\n * `prefersReducedMotion` and the theme id that picks the frame style. The recipe's Tailwind classes are NOT read:\n * they stay DOM, inside the regions. The canvas behind the\n * lazy door receives the result as props and reads nothing itself, so a theme, mode or breakpoint change is a\n * prop change on the canvas — never a remount of anything, and never of the 2D shell beside it.\n *\n * `devicePixelRatio` is read when the appearance is derived; it only converts a glass material's device-pixel\n * rim width, so a browser zoom that changes it takes effect at the next theme or mode change.\n */\nexport function useFrameAppearance(catalog: Frame3DStyleCatalog, overrides: Frame3DStyleOverrides | undefined): FrameAppearance | null {\n const { isDark, prefersReducedMotion, designTheme, getMaterialProfile, getRecipe } = useUI();\n const resolutions = useDesignTokenResolution();\n const navigationMaterial = getMaterialProfile?.(MaterialProfileRole.GLASS_NAVIGATION);\n // Keyed by VALUE: a recipe may be re-composed on each call, and an identity change must not re-derive the\n // appearance (a new appearance restarts the canvas' cross-fade).\n const gestureKey = JSON.stringify(getRecipe(UIBehavior.SURFACE, SurfaceVariant.SUNKEN).gesture?.transition ?? null);\n const surfaceGestureTransition = useMemo(() => JSON.parse(gestureKey) as Record<string, string | number> | undefined ?? undefined, [gestureKey]);\n return useMemo(\n () => deriveFrameAppearance({\n resolutions,\n style: resolveFrame3DThemeStyle(catalog, designTheme.id, overrides),\n navigationMaterial,\n surfaceGestureTransition,\n isDark,\n prefersReducedMotion,\n devicePixelRatio: window.devicePixelRatio,\n }),\n [resolutions, catalog, designTheme.id, overrides, navigationMaterial, surfaceGestureTransition, isDark, prefersReducedMotion],\n );\n}\n"]}
1
+ {"version":3,"file":"use-frame-appearance.js","sourceRoot":"","sources":["../../../src/frame/use-frame-appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtG,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEpD,OAAO,EAAE,wBAAwB,EAAwD,MAAM,kBAAkB,CAAC;AAClH,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEjF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAA4B,EAAE,SAA4C;IAC3G,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,WAAW,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAC;IAC7F,MAAM,WAAW,GAAG,wBAAwB,EAAE,CAAC;IAC/C,MAAM,kBAAkB,GAAG,kBAAkB,EAAE,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACtF,0GAA0G;IAC1G,iEAAiE;IACjE,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC;IACpH,MAAM,wBAAwB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAgD,IAAI,SAAS,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IACjJ,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,qBAAqB,CAAC;QAC1B,WAAW;QACX,KAAK,EAAE,wBAAwB,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,WAAW,CAAC,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC;QACjH,kBAAkB;QAClB,wBAAwB;QACxB,MAAM;QACN,oBAAoB;QACpB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;KAC1C,CAAC,EACF,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,EAAE,WAAW,CAAC,WAAW,EAAE,SAAS,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,EAAE,oBAAoB,CAAC,CACvJ,CAAC;AACJ,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport { MaterialProfileRole, SurfaceVariant, UIBehavior } from '@wildo-ai/presets-components-models';\nimport { useUI } from '@wildo-ai/saas-frontend-lib';\n\nimport { resolveFrame3DThemeStyle, type Frame3DStyleCatalog, type Frame3DStyleOverrides } from './frame-3d-style';\nimport { deriveFrameAppearance, type FrameAppearance } from './frame-appearance';\nimport { useDesignTokenResolution } from '../tokens/use-design-token-resolution';\n\n/**\n * The frame's appearance for the active theme and mode, computed in the DOM tree (#1823).\n *\n * This is the frame's only reader of the theme: the tokens (through the resolver, #1819), the navigation\n * material, the gesture spring of the SUNKEN surface recipe (the recipe the shell regions render with), `isDark`,\n * `prefersReducedMotion` and the theme id and personality point that pick the frame style. The recipe's Tailwind classes are NOT read:\n * they stay DOM, inside the regions. The canvas behind the\n * lazy door receives the result as props and reads nothing itself, so a theme, mode or breakpoint change is a\n * prop change on the canvas — never a remount of anything, and never of the 2D shell beside it.\n *\n * `devicePixelRatio` is read when the appearance is derived; it only converts a glass material's device-pixel\n * rim width, so a browser zoom that changes it takes effect at the next theme or mode change.\n */\nexport function useFrameAppearance(catalog: Frame3DStyleCatalog, overrides: Frame3DStyleOverrides | undefined): FrameAppearance | null {\n const { isDark, prefersReducedMotion, designTheme, getMaterialProfile, getRecipe } = useUI();\n const resolutions = useDesignTokenResolution();\n const navigationMaterial = getMaterialProfile?.(MaterialProfileRole.GLASS_NAVIGATION);\n // Keyed by VALUE: a recipe may be re-composed on each call, and an identity change must not re-derive the\n // appearance (a new appearance restarts the canvas' cross-fade).\n const gestureKey = JSON.stringify(getRecipe(UIBehavior.SURFACE, SurfaceVariant.SUNKEN).gesture?.transition ?? null);\n const surfaceGestureTransition = useMemo(() => JSON.parse(gestureKey) as Record<string, string | number> | undefined ?? undefined, [gestureKey]);\n return useMemo(\n () => deriveFrameAppearance({\n resolutions,\n style: resolveFrame3DThemeStyle(catalog, { id: designTheme.id, personality: designTheme.personality }, overrides),\n navigationMaterial,\n surfaceGestureTransition,\n isDark,\n prefersReducedMotion,\n devicePixelRatio: window.devicePixelRatio,\n }),\n [resolutions, catalog, designTheme.id, designTheme.personality, overrides, navigationMaterial, surfaceGestureTransition, isDark, prefersReducedMotion],\n );\n}\n"]}
@@ -6,7 +6,6 @@ export * from './frame/frame-appearance';
6
6
  export * from './frame/use-frame-appearance';
7
7
  export * from './tokens/design-token-resolution';
8
8
  export * from './tokens/use-design-token-resolution';
9
- export * from './layout/shell-layout-placement';
10
9
  export * from './layout/layout-3d-vocabulary';
11
10
  export * from './layout/layout-3d-definition';
12
11
  export * from './layout/layout-3d-transition-choreography';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC"}
package/dist/esm/index.js CHANGED
@@ -6,7 +6,6 @@ export * from './frame/frame-appearance.js';
6
6
  export * from './frame/use-frame-appearance.js';
7
7
  export * from './tokens/design-token-resolution.js';
8
8
  export * from './tokens/use-design-token-resolution.js';
9
- export * from './layout/shell-layout-placement.js';
10
9
  export * from './layout/layout-3d-vocabulary.js';
11
10
  export * from './layout/layout-3d-definition.js';
12
11
  export * from './layout/layout-3d-transition-choreography.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './register-3d-layout';\nexport * from './layout-3d-main-container';\nexport * from './shell-region-measurement';\nexport * from './frame/frame-3d-style';\nexport * from './frame/frame-appearance';\nexport * from './frame/use-frame-appearance';\nexport * from './tokens/design-token-resolution';\nexport * from './tokens/use-design-token-resolution';\nexport * from './layout/shell-layout-placement';\nexport * from './layout/layout-3d-vocabulary';\nexport * from './layout/layout-3d-definition';\nexport * from './layout/layout-3d-transition-choreography';\nexport * from './layout/header-first-shell-container';\nexport * from './focal-plane/focal-plane-settings';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './register-3d-layout';\nexport * from './layout-3d-main-container';\nexport * from './shell-region-measurement';\nexport * from './frame/frame-3d-style';\nexport * from './frame/frame-appearance';\nexport * from './frame/use-frame-appearance';\nexport * from './tokens/design-token-resolution';\nexport * from './tokens/use-design-token-resolution';\nexport * from './layout/layout-3d-vocabulary';\nexport * from './layout/layout-3d-definition';\nexport * from './layout/layout-3d-transition-choreography';\nexport * from './layout/header-first-shell-container';\nexport * from './focal-plane/focal-plane-settings';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"header-first-shell-container.js","sourceRoot":"","sources":["../../../../src/layout/header-first-shell-container.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC3I,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,2CAA2C,EAC3C,OAAO,EACP,EAAE,EACF,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,GAEN,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,yBAAyB,CAAC,EAAE,QAAQ,EAA8C;IAChG,MAAM,UAAU,GAAG,iBAAiB,EAAE,CAAC;IACvC,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,EAAE,CAAC;IACpC,MAAM,iBAAiB,GAAG,eAAe,KAAK,eAAe,CAAC,UAAU,CAAC;IACzE,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAE3E,IAAI,CAAC,UAAU,CAAC,aAAa,IAAI,CAAC,kBAAkB;QAAE,OAAO,KAAC,oBAAoB,KAAG,CAAC;IAEtF,OAAO,CACL,KAAC,iBAAiB,IAAC,MAAM,EAAE,UAAU,YACnC,KAAC,OAAO,IAAC,OAAO,QAAC,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,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ticalPlacement } from '@wildo-ai/presets-components-models';\nimport {\n AppShellContentOutlet,\n AppShellLoadingState,\n AppShellOverlaysOutlet,\n AppShellProviders,\n AppShellRegionOutlet,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n cn,\n useAppShellFirstReady,\n useAppShellLayout,\n useUI,\n type AppLayoutPreset_MainContainer_DefaultProps,\n} from '@wildo-ai/saas-frontend-lib';\n\n/**\n * The HEADER_FIRST disposal (#1843): the status bars and the menubar span the whole width, and the navigation\n * rails — activity bar, sidebar, utility panel — sit between them, beside the toolbar and the content.\n *\n * ```\n * ┌────────────── status bar (top) ───────────────┐\n * ├────────────────── menubar ────────────────────┤\n * │ act │ side │ util │ toolbar │ side │ util │\n * │ bar │ bar │ │ content │ (end)│ (end)│\n * ├────────────── status bar (bottom) ────────────┤\n * ```\n *\n * The same regions, the same components, the same contexts as the default (sidebar-first) disposal — only the\n * arrangement differs. It is composed from the shell building blocks exactly as the default container is, and\n * keeps its rules: `AppShellProviders` once around everything, every region placed, the content outlet once,\n * and a `relative` root (not `isolate`: see the default container and #1830). The regions tile the viewport, as\n * the shell baseline requires.\n */\nexport function HeaderFirstShellContainer({ children }: AppLayoutPreset_MainContainer_DefaultProps): React.JSX.Element {\n const layoutInfo = useAppShellLayout();\n const { shellAppearance } = useUI();\n const isContinuousShell = shellAppearance === ShellAppearance.CONTINUOUS;\n const hasLayoutBeenReady = useAppShellFirstReady(layoutInfo.isLayoutReady);\n\n if (!layoutInfo.isLayoutReady && !hasLayoutBeenReady) return <AppShellLoadingState />;\n\n return (\n <AppShellProviders layout={layoutInfo}>\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div className={cn('relative h-screen w-screen flex flex-col overflow-hidden', isContinuousShell ? 'bg-transparent' : 'bg-background')}>\n <AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.TOP} />\n <AppShellRegionOutlet region={ShellRegion.MENUBAR} />\n\n <div className=\"flex-1 flex min-w-0 min-h-0\">\n <AppShellRegionOutlet region={ShellRegion.ACTIVITY_BAR} />\n <AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.START} />\n <AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.START} />\n\n <div className=\"flex-1 flex flex-col min-w-0 min-h-0\">\n <AppShellRegionOutlet region={ShellRegion.TOOLBAR} />\n <AppShellContentOutlet className=\"flex-1 relative min-w-0 min-h-0\">{children}</AppShellContentOutlet>\n </div>\n\n <AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.END} />\n <AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.END} />\n </div>\n\n <AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.BOTTOM} />\n\n <AppShellOverlaysOutlet />\n </div>\n </Surface>\n </AppShellProviders>\n );\n}\n"]}
1
+ {"version":3,"file":"header-first-shell-container.js","sourceRoot":"","sources":["../../../src/layout/header-first-shell-container.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC3I,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,2CAA2C,EAC3C,OAAO,EACP,EAAE,EACF,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,GAEN,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,yBAAyB,CAAC,EAAE,QAAQ,EAA8C;IAChG,MAAM,UAAU,GAAG,iBAAiB,EAAE,CAAC;IACvC,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,EAAE,CAAC;IACpC,MAAM,iBAAiB,GAAG,eAAe,KAAK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AAoB,IAAC,MAAM,EAAE,WAAW,CAAC,aAAa,EAAE,SAAS,EAAE,mBAAmB,CAAC,GAAG,GAAI,IAC3F,EAEN,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,GAAI,EAE7F,KAAC,sBAAsB,KAAG,IACtB,GACE,GACQ,CACrB,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { HorizontalPlacement, ShellAppearance, ShellRegion, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';\nimport {\n AppShellContentOutlet,\n AppShellLoadingState,\n AppShellOverlaysOutlet,\n AppShellProviders,\n AppShellRegionOutlet,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n cn,\n useAppShellFirstReady,\n useAppShellLayout,\n useUI,\n type AppLayoutPreset_MainContainer_DefaultProps,\n} from '@wildo-ai/saas-frontend-lib';\n\n/**\n * The HEADER_FIRST disposal (#1843): the status bars and the menubar span the whole width, and the navigation\n * rails — activity bar, sidebar, utility panel — sit between them, beside the toolbar and the content.\n *\n * ```\n * ┌────────────── status bar (top) ───────────────┐\n * ├────────────────── menubar ────────────────────┤\n * │ act │ side │ util │ toolbar │ side │ util │\n * │ bar │ bar │ │ content │ (end)│ (end)│\n * ├────────────── status bar (bottom) ────────────┤\n * ```\n *\n * The same regions, the same components, the same contexts as the default (sidebar-first) disposal — only the\n * arrangement differs. It is composed from the shell building blocks exactly as the default container is, and\n * keeps its rules: `AppShellProviders` once around everything, every region placed, the content outlet once,\n * and a `relative` root (not `isolate`: see the default container and #1830). The regions tile the viewport, as\n * the shell baseline requires.\n */\nexport function HeaderFirstShellContainer({ children }: AppLayoutPreset_MainContainer_DefaultProps): React.JSX.Element {\n const layoutInfo = useAppShellLayout();\n const { shellAppearance } = useUI();\n const isContinuousShell = shellAppearance === ShellAppearance.CONTINUOUS;\n const hasLayoutBeenReady = useAppShellFirstReady(layoutInfo.isLayoutReady);\n\n if (!layoutInfo.isLayoutReady && !hasLayoutBeenReady) return <AppShellLoadingState />;\n\n return (\n <AppShellProviders layout={layoutInfo}>\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div className={cn('relative h-screen w-screen flex flex-col overflow-hidden', isContinuousShell ? 'bg-transparent' : 'bg-background')}>\n <AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.TOP} />\n <AppShellRegionOutlet region={ShellRegion.MENUBAR} />\n\n <div className=\"flex-1 flex min-w-0 min-h-0\">\n <AppShellRegionOutlet region={ShellRegion.ACTIVITY_BAR} />\n <AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.START} />\n <AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.START} />\n\n <div className=\"flex-1 flex flex-col min-w-0 min-h-0\">\n <AppShellRegionOutlet region={ShellRegion.TOOLBAR} />\n <AppShellContentOutlet className=\"flex-1 relative min-w-0 min-h-0\">{children}</AppShellContentOutlet>\n </div>\n\n <AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.END} />\n <AppShellRegionOutlet region={ShellRegion.UTILITY_PANEL} placement={HorizontalPlacement.END} />\n </div>\n\n <AppShellRegionOutlet region={ShellRegion.STATUS_BAR} placement={VerticalPlacement.BOTTOM} />\n\n <AppShellOverlaysOutlet />\n </div>\n </Surface>\n </AppShellProviders>\n );\n}\n"]}
@@ -1,16 +1,14 @@
1
1
  import { ShellAppearance } from '@wildo-ai/presets-components-models';
2
+ import { type ShellLayoutDefinition } from '@wildo-ai/saas-frontend-lib';
2
3
  import { type Frame3DStyleCatalog } from '../frame/frame-3d-style';
3
- import { type ShellLayoutPlacement } from './shell-layout-placement';
4
4
  import { Layout3DCamera, Layout3DId, Layout3DRestPose, type Layout3DTransitions } from './layout-3d-vocabulary';
5
5
  /** @wildo_source:part:start presets.3d.layout-contract facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */
6
6
  /**
7
- * A 3D layout: where the regions go (`placement`, 3D-free), and what the frame draws around them (`scene`,
8
- * `transitions`), under `constraints`.
7
+ * A 3D layout: a shell layout (`ShellLayoutDefinition` from `@wildo-ai/saas-frontend-lib` — its `id` and its
8
+ * 3D-free `placement`), plus what the frame draws around the regions (`scene`, `transitions`), under `constraints`.
9
+ * The `id` is a {@link Layout3DId} for a built-in layout; an application's own layout names itself.
9
10
  */
10
- export interface Layout3DDefinition {
11
- /** A {@link Layout3DId} for a built-in layout; an application's own layout names itself. */
12
- id: string;
13
- placement: ShellLayoutPlacement;
11
+ export interface Layout3DDefinition extends ShellLayoutDefinition {
14
12
  scene: {
15
13
  camera: Layout3DCamera;
16
14
  /** The frame styles, per theme, with a fallback for any theme id the catalog does not name. */
@@ -1 +1 @@
1
- {"version":3,"file":"layout-3d-definition.d.ts","sourceRoot":"","sources":["../../../src/layout/layout-3d-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAmD,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAGpH,OAAO,EAA4B,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAE/F,OAAO,EAEL,cAAc,EACd,UAAU,EAEV,gBAAgB,EAEhB,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAEhC,mIAAmI;AACnI;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,4FAA4F;IAC5F,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,oBAAoB,CAAC;IAChC,KAAK,EAAE;QACL,MAAM,EAAE,cAAc,CAAC;QACvB,+FAA+F;QAC/F,WAAW,EAAE,mBAAmB,CAAC;KAClC,CAAC;IACF,qGAAqG;IACrG,WAAW,EAAE,mBAAmB,CAAC;IACjC,WAAW,EAAE;QACX,uHAAuH;QACvH,uBAAuB,EAAE,eAAe,GAAG,IAAI,CAAC;QAChD,QAAQ,EAAE,gBAAgB,CAAC;KAC5B,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,kBAW/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,kBAWpC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,kBAWnC,CAAC;AACF,wDAAwD;AAExD,iHAAiH;AACjH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,kBAAkB,CAItE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAkCxE"}
1
+ {"version":3,"file":"layout-3d-definition.d.ts","sourceRoot":"","sources":["../../../src/layout/layout-3d-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAA4B,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEnG,OAAO,EAAmD,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAIpH,OAAO,EAEL,cAAc,EACd,UAAU,EAEV,gBAAgB,EAEhB,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAEhC,mIAAmI;AACnI;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,KAAK,EAAE;QACL,MAAM,EAAE,cAAc,CAAC;QACvB,+FAA+F;QAC/F,WAAW,EAAE,mBAAmB,CAAC;KAClC,CAAC;IACF,qGAAqG;IACrG,WAAW,EAAE,mBAAmB,CAAC;IACjC,WAAW,EAAE;QACX,uHAAuH;QACvH,uBAAuB,EAAE,eAAe,GAAG,IAAI,CAAC;QAChD,QAAQ,EAAE,gBAAgB,CAAC;KAC5B,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,kBAW/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,kBAWpC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,kBAWnC,CAAC;AACF,wDAAwD;AAExD,iHAAiH;AACjH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,kBAAkB,CAItE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAkCxE"}
@@ -1,8 +1,8 @@
1
1
  import { ShellAppearance } from '@wildo-ai/presets-components-models';
2
+ import { ShellLayoutPlacementKind } from '@wildo-ai/saas-frontend-lib';
2
3
  import { HEADER_FIRST_FRAME_STYLES, INHERIT_FRAME_STYLES } from '../frame/frame-3d-style.js';
3
4
  import { HeaderFirstShellContainer } from './header-first-shell-container.js';
4
5
  import { FocalPlaneShellContainer } from '../focal-plane/focal-plane-shell-container.js';
5
- import { ShellLayoutPlacementKind } from './shell-layout-placement.js';
6
6
  import { crossFadesAppearance, frameChoreography, rimsFocusedZone } from './layout-3d-transition-choreography.js';
7
7
  import { Layout3DAppearanceTransition, Layout3DCamera, Layout3DId, Layout3DFrameChoreography, Layout3DRestPose, Layout3DZoneFocusTransition, } from './layout-3d-vocabulary.js';
8
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"layout-3d-definition.js","sourceRoot":"","sources":["../../../../src/layout/layout-3d-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAA4B,MAAM,yBAAyB,CAAC;AACpH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAA6B,MAAM,0BAA0B,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,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CAAC;YACD,MAAM;QACR,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,MAAM,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,cAAc,MAAM,CAAC,EAAE,+BAA+B,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACjG,CAAC;IACH,CAAC;IACD,qFAAqF;IACrF,oBAAoB,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACpD,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACjD,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;IACpD,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC;IACzC,QAAQ,IAAI,EAAE,CAAC;QACb,oEAAoE;QACpE,KAAK,gBAAgB,CAAC,IAAI;YACxB,MAAM;QACR,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,IAAI,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,cAAc,MAAM,CAAC,EAAE,qBAAqB,MAAM,CAAC,WAAW,CAAC,0EAA0E,CAAC,CAAC;QAC7J,CAAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,wBAAwB,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,wBAAwB,CAAC,QAAQ,EAAE,CAAC;QAC9H,MAAM,IAAI,KAAK,CAAC,cAAc,MAAM,CAAC,EAAE,8BAA8B,MAAM,CAAE,MAAM,CAAC,SAA+B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjI,CAAC;AACH,CAAC","sourcesContent":["import { ShellAppearance } from '@wildo-ai/presets-components-models';\n\nimport { HEADER_FIRST_FRAME_STYLES, INHERIT_FRAME_STYLES, type Frame3DStyleCatalog } from '../frame/frame-3d-style';\nimport { HeaderFirstShellContainer } from './header-first-shell-container';\nimport { FocalPlaneShellContainer } from '../focal-plane/focal-plane-shell-container';\nimport { ShellLayoutPlacementKind, type ShellLayoutPlacement } from './shell-layout-placement';\nimport { crossFadesAppearance, frameChoreography, rimsFocusedZone } from './layout-3d-transition-choreography';\nimport {\n Layout3DAppearanceTransition,\n Layout3DCamera,\n Layout3DId,\n Layout3DFrameChoreography,\n Layout3DRestPose,\n Layout3DZoneFocusTransition,\n type Layout3DTransitions,\n} from './layout-3d-vocabulary';\n\n/** @wildo_source:part:start presets.3d.layout-contract facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * A 3D layout: where the regions go (`placement`, 3D-free), and what the frame draws around them (`scene`,\n * `transitions`), under `constraints`.\n */\nexport interface Layout3DDefinition {\n /** A {@link Layout3DId} for a built-in layout; an application's own layout names itself. */\n id: string;\n placement: ShellLayoutPlacement;\n scene: {\n camera: Layout3DCamera;\n /** The frame styles, per theme, with a fallback for any theme id the catalog does not name. */\n frameStyles: Frame3DStyleCatalog;\n };\n /** What the frame plays on an appearance change, a navigation, a sidebar resize and a zone focus. */\n transitions: Layout3DTransitions;\n constraints: {\n /** The shell appearance the layout is designed for; any other is reported once (a console warning), never switched. */\n requiredShellAppearance: ShellAppearance | null;\n restPose: Layout3DRestPose;\n };\n}\n\n/**\n * The 2D disposal, unchanged, with the frame under it. On navigation the content slab lifts and settles; when\n * the sidebar collapses or expands, the light swings across and back.\n */\nexport const INHERIT_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.INHERIT,\n placement: { kind: ShellLayoutPlacementKind.INHERIT },\n scene: { camera: Layout3DCamera.FLAT_ORTHOGRAPHIC, frameStyles: INHERIT_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.ELEVATION_SETTLE,\n sidebarResize: Layout3DFrameChoreography.LIGHT_SWEEP,\n zoneFocus: Layout3DZoneFocusTransition.RIM,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n\n/**\n * The header-first disposal, with the frame lit from the header down. On navigation the light swings from the header\n * and returns; when the sidebar collapses or expands, the content slab lifts and settles.\n */\nexport const HEADER_FIRST_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.HEADER_FIRST,\n placement: { kind: ShellLayoutPlacementKind.COMPOSED, container: HeaderFirstShellContainer },\n scene: { camera: Layout3DCamera.FLAT_ORTHOGRAPHIC, frameStyles: HEADER_FIRST_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.LIGHT_SWEEP,\n sidebarResize: Layout3DFrameChoreography.ELEVATION_SETTLE,\n zoneFocus: Layout3DZoneFocusTransition.RIM,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n/**\n * The focal plane (#2049): the shell regions, each navigation pane and each popup are glass objects in depth under one\n * still camera. Whatever you work with rests on the focal plane; the rest steps back. No WebGL frame: the depth is in\n * the HTML objects themselves, so the frame styles and frame transitions below are not drawn.\n */\nexport const FOCAL_PLANE_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.FOCAL_PLANE,\n placement: { kind: ShellLayoutPlacementKind.COMPOSED, container: FocalPlaneShellContainer },\n scene: { camera: Layout3DCamera.STILL_PERSPECTIVE, frameStyles: INHERIT_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.NONE,\n sidebarResize: Layout3DFrameChoreography.NONE,\n zoneFocus: Layout3DZoneFocusTransition.NONE,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n/** @wildo_source:part:end presets.3d.layout-contract */\n\n/** Every built-in layout, keyed by its id: total over {@link Layout3DId}, so a new member must ship a layout. */\nexport const BUILT_IN_LAYOUTS_3D: Record<Layout3DId, Layout3DDefinition> = {\n [Layout3DId.INHERIT]: INHERIT_LAYOUT_3D,\n [Layout3DId.HEADER_FIRST]: HEADER_FIRST_LAYOUT_3D,\n [Layout3DId.FOCAL_PLANE]: FOCAL_PLANE_LAYOUT_3D,\n};\n\n/**\n * Refuses a layout the renderer cannot draw as declared: a camera, a transition or a rest pose it does not\n * implement. Exhaustive switches, so a member added to one of those vocabularies fails to compile here until the\n * renderer supports it — and a value that reaches it at runtime anyway (an application's own layout, built without\n * the types) is refused instead of being silently drawn as something else.\n */\nexport function assertSupportedLayout3D(layout: Layout3DDefinition): void {\n const camera = layout.scene.camera;\n switch (camera) {\n case Layout3DCamera.FLAT_ORTHOGRAPHIC:\n break;\n case Layout3DCamera.STILL_PERSPECTIVE:\n // The captured flat container stages nothing in depth; only a composed placement that does can use this camera.\n if (layout.placement.kind !== ShellLayoutPlacementKind.COMPOSED) {\n throw new Error(`3D layout '${layout.id}': the still-perspective camera needs a composed placement that stages the shell in depth.`);\n }\n break;\n default: {\n const unsupported: never = camera;\n throw new Error(`3D layout '${layout.id}': the frame has no camera '${String(unsupported)}'.`);\n }\n }\n // Each throws on a member the frame does not play (a value built without the types).\n crossFadesAppearance(layout.transitions.appearance);\n frameChoreography(layout.transitions.navigation);\n frameChoreography(layout.transitions.sidebarResize);\n rimsFocusedZone(layout.transitions.zoneFocus);\n const pose = layout.constraints.restPose;\n switch (pose) {\n // FLAT is what the container renders: the placement, untransformed.\n case Layout3DRestPose.FLAT:\n break;\n default: {\n const unsupported: never = pose;\n throw new Error(`3D layout '${layout.id}': the rest pose '${String(unsupported)}' is not supported (only FLAT exists: no region is transformed at rest).`);\n }\n }\n if (layout.placement.kind !== ShellLayoutPlacementKind.INHERIT && layout.placement.kind !== ShellLayoutPlacementKind.COMPOSED) {\n throw new Error(`3D layout '${layout.id}': unknown placement kind '${String((layout.placement as { kind: unknown }).kind)}'.`);\n }\n}\n"]}
1
+ {"version":3,"file":"layout-3d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KAAK,wBAAwB,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,wBAAwB,CAAC,QAAQ,EAAE,CAAC;QAC9H,MAAM,IAAI,KAAK,CAAC,cAAc,MAAM,CAAC,EAAE,8BAA8B,MAAM,CAAE,MAAM,CAAC,SAA+B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjI,CAAC;AACH,CAAC","sourcesContent":["import { ShellAppearance } from '@wildo-ai/presets-components-models';\nimport { ShellLayoutPlacementKind, type ShellLayoutDefinition } from '@wildo-ai/saas-frontend-lib';\n\nimport { HEADER_FIRST_FRAME_STYLES, INHERIT_FRAME_STYLES, type Frame3DStyleCatalog } from '../frame/frame-3d-style';\nimport { HeaderFirstShellContainer } from './header-first-shell-container';\nimport { FocalPlaneShellContainer } from '../focal-plane/focal-plane-shell-container';\nimport { crossFadesAppearance, frameChoreography, rimsFocusedZone } from './layout-3d-transition-choreography';\nimport {\n Layout3DAppearanceTransition,\n Layout3DCamera,\n Layout3DId,\n Layout3DFrameChoreography,\n Layout3DRestPose,\n Layout3DZoneFocusTransition,\n type Layout3DTransitions,\n} from './layout-3d-vocabulary';\n\n/** @wildo_source:part:start presets.3d.layout-contract facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * A 3D layout: a shell layout (`ShellLayoutDefinition` from `@wildo-ai/saas-frontend-lib` — its `id` and its\n * 3D-free `placement`), plus what the frame draws around the regions (`scene`, `transitions`), under `constraints`.\n * The `id` is a {@link Layout3DId} for a built-in layout; an application's own layout names itself.\n */\nexport interface Layout3DDefinition extends ShellLayoutDefinition {\n scene: {\n camera: Layout3DCamera;\n /** The frame styles, per theme, with a fallback for any theme id the catalog does not name. */\n frameStyles: Frame3DStyleCatalog;\n };\n /** What the frame plays on an appearance change, a navigation, a sidebar resize and a zone focus. */\n transitions: Layout3DTransitions;\n constraints: {\n /** The shell appearance the layout is designed for; any other is reported once (a console warning), never switched. */\n requiredShellAppearance: ShellAppearance | null;\n restPose: Layout3DRestPose;\n };\n}\n\n/**\n * The 2D disposal, unchanged, with the frame under it. On navigation the content slab lifts and settles; when\n * the sidebar collapses or expands, the light swings across and back.\n */\nexport const INHERIT_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.INHERIT,\n placement: { kind: ShellLayoutPlacementKind.INHERIT },\n scene: { camera: Layout3DCamera.FLAT_ORTHOGRAPHIC, frameStyles: INHERIT_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.ELEVATION_SETTLE,\n sidebarResize: Layout3DFrameChoreography.LIGHT_SWEEP,\n zoneFocus: Layout3DZoneFocusTransition.RIM,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n\n/**\n * The header-first disposal, with the frame lit from the header down. On navigation the light swings from the header\n * and returns; when the sidebar collapses or expands, the content slab lifts and settles.\n */\nexport const HEADER_FIRST_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.HEADER_FIRST,\n placement: { kind: ShellLayoutPlacementKind.COMPOSED, container: HeaderFirstShellContainer },\n scene: { camera: Layout3DCamera.FLAT_ORTHOGRAPHIC, frameStyles: HEADER_FIRST_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.LIGHT_SWEEP,\n sidebarResize: Layout3DFrameChoreography.ELEVATION_SETTLE,\n zoneFocus: Layout3DZoneFocusTransition.RIM,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n/**\n * The focal plane (#2049): the shell regions, each navigation pane and each popup are glass objects in depth under one\n * still camera. Whatever you work with rests on the focal plane; the rest steps back. No WebGL frame: the depth is in\n * the HTML objects themselves, so the frame styles and frame transitions below are not drawn.\n */\nexport const FOCAL_PLANE_LAYOUT_3D: Layout3DDefinition = {\n id: Layout3DId.FOCAL_PLANE,\n placement: { kind: ShellLayoutPlacementKind.COMPOSED, container: FocalPlaneShellContainer },\n scene: { camera: Layout3DCamera.STILL_PERSPECTIVE, frameStyles: INHERIT_FRAME_STYLES },\n transitions: {\n appearance: Layout3DAppearanceTransition.CROSS_FADE,\n navigation: Layout3DFrameChoreography.NONE,\n sidebarResize: Layout3DFrameChoreography.NONE,\n zoneFocus: Layout3DZoneFocusTransition.NONE,\n },\n constraints: { requiredShellAppearance: ShellAppearance.CONTINUOUS, restPose: Layout3DRestPose.FLAT },\n};\n/** @wildo_source:part:end presets.3d.layout-contract */\n\n/** Every built-in layout, keyed by its id: total over {@link Layout3DId}, so a new member must ship a layout. */\nexport const BUILT_IN_LAYOUTS_3D: Record<Layout3DId, Layout3DDefinition> = {\n [Layout3DId.INHERIT]: INHERIT_LAYOUT_3D,\n [Layout3DId.HEADER_FIRST]: HEADER_FIRST_LAYOUT_3D,\n [Layout3DId.FOCAL_PLANE]: FOCAL_PLANE_LAYOUT_3D,\n};\n\n/**\n * Refuses a layout the renderer cannot draw as declared: a camera, a transition or a rest pose it does not\n * implement. Exhaustive switches, so a member added to one of those vocabularies fails to compile here until the\n * renderer supports it — and a value that reaches it at runtime anyway (an application's own layout, built without\n * the types) is refused instead of being silently drawn as something else.\n */\nexport function assertSupportedLayout3D(layout: Layout3DDefinition): void {\n const camera = layout.scene.camera;\n switch (camera) {\n case Layout3DCamera.FLAT_ORTHOGRAPHIC:\n break;\n case Layout3DCamera.STILL_PERSPECTIVE:\n // The captured flat container stages nothing in depth; only a composed placement that does can use this camera.\n if (layout.placement.kind !== ShellLayoutPlacementKind.COMPOSED) {\n throw new Error(`3D layout '${layout.id}': the still-perspective camera needs a composed placement that stages the shell in depth.`);\n }\n break;\n default: {\n const unsupported: never = camera;\n throw new Error(`3D layout '${layout.id}': the frame has no camera '${String(unsupported)}'.`);\n }\n }\n // Each throws on a member the frame does not play (a value built without the types).\n crossFadesAppearance(layout.transitions.appearance);\n frameChoreography(layout.transitions.navigation);\n frameChoreography(layout.transitions.sidebarResize);\n rimsFocusedZone(layout.transitions.zoneFocus);\n const pose = layout.constraints.restPose;\n switch (pose) {\n // FLAT is what the container renders: the placement, untransformed.\n case Layout3DRestPose.FLAT:\n break;\n default: {\n const unsupported: never = pose;\n throw new Error(`3D layout '${layout.id}': the rest pose '${String(unsupported)}' is not supported (only FLAT exists: no region is transformed at rest).`);\n }\n }\n if (layout.placement.kind !== ShellLayoutPlacementKind.INHERIT && layout.placement.kind !== ShellLayoutPlacementKind.COMPOSED) {\n throw new Error(`3D layout '${layout.id}': unknown placement kind '${String((layout.placement as { kind: unknown }).kind)}'.`);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"layout-3d-transition-choreography.d.ts","sourceRoot":"","sources":["../../../../src/layout/layout-3d-transition-choreography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE9H;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,KAAK,EAAE,OAAO,CAAC;IACf,sGAAsG;IACtG,YAAY,EAAE,MAAM,CAAC;IACrB,+GAA+G;IAC/G,OAAO,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,aAAa,EAAE,MAAM,CAAC;IACtB,2GAA2G;IAC3G,cAAc,EAAE,MAAM,CAAC;CACxB;AAID,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,yBAAyB,GAAG,iBAAiB,CAcpF;AAED,gGAAgG;AAChG,wBAAgB,eAAe,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAW1E;AAED,gHAAgH;AAChH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAShF"}
1
+ {"version":3,"file":"layout-3d-transition-choreography.d.ts","sourceRoot":"","sources":["../../../src/layout/layout-3d-transition-choreography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE9H;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,KAAK,EAAE,OAAO,CAAC;IACf,sGAAsG;IACtG,YAAY,EAAE,MAAM,CAAC;IACrB,+GAA+G;IAC/G,OAAO,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,aAAa,EAAE,MAAM,CAAC;IACtB,2GAA2G;IAC3G,cAAc,EAAE,MAAM,CAAC;CACxB;AAID,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,yBAAyB,GAAG,iBAAiB,CAcpF;AAED,gGAAgG;AAChG,wBAAgB,eAAe,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAW1E;AAED,gHAAgH;AAChH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAShF"}
@@ -1 +1 @@
1
- {"version":3,"file":"layout-3d-transition-choreography.js","sourceRoot":"","sources":["../../../../src/layout/layout-3d-transition-choreography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AA0B9H,MAAM,KAAK,GAAsB,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;AAEpH,8FAA8F;AAC9F,MAAM,UAAU,iBAAiB,CAAC,IAA+B;IAC/D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,yBAAyB,CAAC,IAAI;YACjC,OAAO,KAAK,CAAC;QACf,KAAK,yBAAyB,CAAC,gBAAgB;YAC7C,yGAAyG;YACzG,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;QAC7F,KAAK,yBAAyB,CAAC,WAAW;YACxC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;QAC5F,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,IAAI,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,6CAA6C,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;AACH,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,eAAe,CAAC,IAAiC;IAC/D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,2BAA2B,CAAC,IAAI;YACnC,OAAO,KAAK,CAAC;QACf,KAAK,2BAA2B,CAAC,GAAG;YAClC,OAAO,IAAI,CAAC;QACd,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,IAAI,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,gDAAgD,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;AACH,CAAC;AAED,gHAAgH;AAChH,MAAM,UAAU,oBAAoB,CAAC,IAAkC;IACrE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,4BAA4B,CAAC,UAAU;YAC1C,OAAO,IAAI,CAAC;QACd,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,IAAI,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,gDAAgD,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["import { Layout3DAppearanceTransition, Layout3DFrameChoreography, Layout3DZoneFocusTransition } from './layout-3d-vocabulary';\n\n/**\n * The numbers each transition member plays (#1826), in one module both the registration check and the lazily loaded\n * renderer read — so the members are interpreted in one place, and a member added to a vocabulary fails to compile\n * HERE until it has numbers. Imports only the vocabulary, so the frame's chunk pulls in nothing else through it.\n */\n\n/**\n * A frame choreography's numbers. A pulse RISES to full strength over the first half of its duration and\n * SETTLES back over the second, each half eased by the theme's default easing; the strength shown is `sin(π/2 · v)`\n * of that eased value, so it swells in and out without a corner at the peak.\n */\nexport interface FrameChoreography {\n /** Whether the trigger plays anything. */\n plays: boolean;\n /** How far the content slab's shadow blur and offset grow at the pulse's peak: 0.8 is 80% further. */\n shadowSpread: number;\n /** How far the content slab's rim moves from its rest opacity toward its hover opacity at the peak: 0 to 1. */\n rimLift: number;\n /** How far the light swings at the peak, in degrees. */\n lightSweepDeg: number;\n /** The pulse lasts this many times the theme's normal motion duration: one half to rise, one to settle. */\n durationFactor: number;\n}\n\nconst STILL: FrameChoreography = { plays: false, shadowSpread: 0, rimLift: 0, lightSweepDeg: 0, durationFactor: 0 };\n\n/** The numbers of a frame choreography. Exhaustive over {@link Layout3DFrameChoreography}. */\nexport function frameChoreography(kind: Layout3DFrameChoreography): FrameChoreography {\n switch (kind) {\n case Layout3DFrameChoreography.NONE:\n return STILL;\n case Layout3DFrameChoreography.ELEVATION_SETTLE:\n // Rim capped at 1 (the hover opacity): the bound was proved for the rim at hover opacity over the frost.\n return { plays: true, shadowSpread: 0.8, rimLift: 1, lightSweepDeg: 0, durationFactor: 2 };\n case Layout3DFrameChoreography.LIGHT_SWEEP:\n return { plays: true, shadowSpread: 0, rimLift: 0, lightSweepDeg: 40, durationFactor: 2 };\n default: {\n const unsupported: never = kind;\n throw new Error(`The 3D frame plays no frame choreography '${String(unsupported)}'.`);\n }\n }\n}\n\n/** Whether the focused zone gets a rim. Exhaustive over {@link Layout3DZoneFocusTransition}. */\nexport function rimsFocusedZone(kind: Layout3DZoneFocusTransition): boolean {\n switch (kind) {\n case Layout3DZoneFocusTransition.NONE:\n return false;\n case Layout3DZoneFocusTransition.RIM:\n return true;\n default: {\n const unsupported: never = kind;\n throw new Error(`The 3D frame plays no zone-focus transition '${String(unsupported)}'.`);\n }\n }\n}\n\n/** Whether the frame cross-fades an appearance change. Exhaustive over {@link Layout3DAppearanceTransition}. */\nexport function crossFadesAppearance(kind: Layout3DAppearanceTransition): boolean {\n switch (kind) {\n case Layout3DAppearanceTransition.CROSS_FADE:\n return true;\n default: {\n const unsupported: never = kind;\n throw new Error(`The 3D frame plays no appearance transition '${String(unsupported)}'.`);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"layout-3d-transition-choreography.js","sourceRoot":"","sources":["../../../src/layout/layout-3d-transition-choreography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AA0B9H,MAAM,KAAK,GAAsB,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;AAEpH,8FAA8F;AAC9F,MAAM,UAAU,iBAAiB,CAAC,IAA+B;IAC/D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,yBAAyB,CAAC,IAAI;YACjC,OAAO,KAAK,CAAC;QACf,KAAK,yBAAyB,CAAC,gBAAgB;YAC7C,yGAAyG;YACzG,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;QAC7F,KAAK,yBAAyB,CAAC,WAAW;YACxC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;QAC5F,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,IAAI,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,6CAA6C,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;AACH,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,eAAe,CAAC,IAAiC;IAC/D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,2BAA2B,CAAC,IAAI;YACnC,OAAO,KAAK,CAAC;QACf,KAAK,2BAA2B,CAAC,GAAG;YAClC,OAAO,IAAI,CAAC;QACd,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,IAAI,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,gDAAgD,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;AACH,CAAC;AAED,gHAAgH;AAChH,MAAM,UAAU,oBAAoB,CAAC,IAAkC;IACrE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,4BAA4B,CAAC,UAAU;YAC1C,OAAO,IAAI,CAAC;QACd,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,IAAI,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,gDAAgD,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["import { Layout3DAppearanceTransition, Layout3DFrameChoreography, Layout3DZoneFocusTransition } from './layout-3d-vocabulary';\n\n/**\n * The numbers each transition member plays (#1826), in one module both the registration check and the lazily loaded\n * renderer read — so the members are interpreted in one place, and a member added to a vocabulary fails to compile\n * HERE until it has numbers. Imports only the vocabulary, so the frame's chunk pulls in nothing else through it.\n */\n\n/**\n * A frame choreography's numbers. A pulse RISES to full strength over the first half of its duration and\n * SETTLES back over the second, each half eased by the theme's default easing; the strength shown is `sin(π/2 · v)`\n * of that eased value, so it swells in and out without a corner at the peak.\n */\nexport interface FrameChoreography {\n /** Whether the trigger plays anything. */\n plays: boolean;\n /** How far the content slab's shadow blur and offset grow at the pulse's peak: 0.8 is 80% further. */\n shadowSpread: number;\n /** How far the content slab's rim moves from its rest opacity toward its hover opacity at the peak: 0 to 1. */\n rimLift: number;\n /** How far the light swings at the peak, in degrees. */\n lightSweepDeg: number;\n /** The pulse lasts this many times the theme's normal motion duration: one half to rise, one to settle. */\n durationFactor: number;\n}\n\nconst STILL: FrameChoreography = { plays: false, shadowSpread: 0, rimLift: 0, lightSweepDeg: 0, durationFactor: 0 };\n\n/** The numbers of a frame choreography. Exhaustive over {@link Layout3DFrameChoreography}. */\nexport function frameChoreography(kind: Layout3DFrameChoreography): FrameChoreography {\n switch (kind) {\n case Layout3DFrameChoreography.NONE:\n return STILL;\n case Layout3DFrameChoreography.ELEVATION_SETTLE:\n // Rim capped at 1 (the hover opacity): the bound was proved for the rim at hover opacity over the frost.\n return { plays: true, shadowSpread: 0.8, rimLift: 1, lightSweepDeg: 0, durationFactor: 2 };\n case Layout3DFrameChoreography.LIGHT_SWEEP:\n return { plays: true, shadowSpread: 0, rimLift: 0, lightSweepDeg: 40, durationFactor: 2 };\n default: {\n const unsupported: never = kind;\n throw new Error(`The 3D frame plays no frame choreography '${String(unsupported)}'.`);\n }\n }\n}\n\n/** Whether the focused zone gets a rim. Exhaustive over {@link Layout3DZoneFocusTransition}. */\nexport function rimsFocusedZone(kind: Layout3DZoneFocusTransition): boolean {\n switch (kind) {\n case Layout3DZoneFocusTransition.NONE:\n return false;\n case Layout3DZoneFocusTransition.RIM:\n return true;\n default: {\n const unsupported: never = kind;\n throw new Error(`The 3D frame plays no zone-focus transition '${String(unsupported)}'.`);\n }\n }\n}\n\n/** Whether the frame cross-fades an appearance change. Exhaustive over {@link Layout3DAppearanceTransition}. */\nexport function crossFadesAppearance(kind: Layout3DAppearanceTransition): boolean {\n switch (kind) {\n case Layout3DAppearanceTransition.CROSS_FADE:\n return true;\n default: {\n const unsupported: never = kind;\n throw new Error(`The 3D frame plays no appearance transition '${String(unsupported)}'.`);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"layout-3d-vocabulary.d.ts","sourceRoot":"","sources":["../../../../src/layout/layout-3d-vocabulary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mIAAmI;AACnI;;;GAGG;AACH,oBAAY,UAAU;IACpB,yFAAyF;IACzF,OAAO,YAAY;IACnB;;;OAGG;IACH,YAAY,iBAAiB;IAC7B;;;;OAIG;IACH,WAAW,gBAAgB;CAC5B;AAED;;;GAGG;AACH,oBAAY,cAAc;IACxB,8GAA8G;IAC9G,iBAAiB,sBAAsB;IACvC;;;;OAIG;IACH,iBAAiB,sBAAsB;CACxC;AAED;;;;;GAKG;AACH,oBAAY,4BAA4B;IACtC,2FAA2F;IAC3F,UAAU,eAAe;CAC1B;AAED;;;;;;;;;;;;GAYG;AACH,oBAAY,yBAAyB;IACnC,+FAA+F;IAC/F,IAAI,SAAS;IACb;;;;OAIG;IACH,gBAAgB,qBAAqB;IACrC;;;OAGG;IACH,WAAW,gBAAgB;CAC5B;AAED;;;GAGG;AACH,oBAAY,2BAA2B;IACrC,mDAAmD;IACnD,IAAI,SAAS;IACb;;;;;;OAMG;IACH,GAAG,QAAQ;CACZ;AAED;;;;GAIG;AACH,oBAAY,gBAAgB;IAC1B,iDAAiD;IACjD,IAAI,SAAS;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,UAAU,EAAE,4BAA4B,CAAC;IACzC;;;;OAIG;IACH,UAAU,EAAE,yBAAyB,CAAC;IACtC,4GAA4G;IAC5G,aAAa,EAAE,yBAAyB,CAAC;IACzC,4FAA4F;IAC5F,SAAS,EAAE,2BAA2B,CAAC;CACxC;AACD,wDAAwD"}
1
+ {"version":3,"file":"layout-3d-vocabulary.d.ts","sourceRoot":"","sources":["../../../src/layout/layout-3d-vocabulary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mIAAmI;AACnI;;;GAGG;AACH,oBAAY,UAAU;IACpB,yFAAyF;IACzF,OAAO,YAAY;IACnB;;;OAGG;IACH,YAAY,iBAAiB;IAC7B;;;;OAIG;IACH,WAAW,gBAAgB;CAC5B;AAED;;;GAGG;AACH,oBAAY,cAAc;IACxB,8GAA8G;IAC9G,iBAAiB,sBAAsB;IACvC;;;;OAIG;IACH,iBAAiB,sBAAsB;CACxC;AAED;;;;;GAKG;AACH,oBAAY,4BAA4B;IACtC,2FAA2F;IAC3F,UAAU,eAAe;CAC1B;AAED;;;;;;;;;;;;GAYG;AACH,oBAAY,yBAAyB;IACnC,+FAA+F;IAC/F,IAAI,SAAS;IACb;;;;OAIG;IACH,gBAAgB,qBAAqB;IACrC;;;OAGG;IACH,WAAW,gBAAgB;CAC5B;AAED;;;GAGG;AACH,oBAAY,2BAA2B;IACrC,mDAAmD;IACnD,IAAI,SAAS;IACb;;;;;;OAMG;IACH,GAAG,QAAQ;CACZ;AAED;;;;GAIG;AACH,oBAAY,gBAAgB;IAC1B,iDAAiD;IACjD,IAAI,SAAS;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,UAAU,EAAE,4BAA4B,CAAC;IACzC;;;;OAIG;IACH,UAAU,EAAE,yBAAyB,CAAC;IACtC,4GAA4G;IAC5G,aAAa,EAAE,yBAAyB,CAAC;IACzC,4FAA4F;IAC5F,SAAS,EAAE,2BAA2B,CAAC;CACxC;AACD,wDAAwD"}
@@ -1 +1 @@
1
- {"version":3,"file":"layout-3d-vocabulary.js","sourceRoot":"","sources":["../../../../src/layout/layout-3d-vocabulary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mIAAmI;AACnI;;;GAGG;AACH,MAAM,CAAN,IAAY,UAcX;AAdD,WAAY,UAAU;IACpB,yFAAyF;IACzF,iCAAmB,CAAA;IACnB;;;OAGG;IACH,2CAA6B,CAAA;IAC7B;;;;OAIG;IACH,yCAA2B,CAAA;AAC7B,CAAC,EAdW,UAAU,KAAV,UAAU,QAcrB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,8GAA8G;IAC9G,yDAAuC,CAAA;IACvC;;;;OAIG;IACH,yDAAuC,CAAA;AACzC,CAAC,EATW,cAAc,KAAd,cAAc,QASzB;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,2FAA2F;IAC3F,yDAAyB,CAAA;AAC3B,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,QAGvC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,yBAcX;AAdD,WAAY,yBAAyB;IACnC,+FAA+F;IAC/F,0CAAa,CAAA;IACb;;;;OAIG;IACH,kEAAqC,CAAA;IACrC;;;OAGG;IACH,wDAA2B,CAAA;AAC7B,CAAC,EAdW,yBAAyB,KAAzB,yBAAyB,QAcpC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,2BAWX;AAXD,WAAY,2BAA2B;IACrC,mDAAmD;IACnD,4CAAa,CAAA;IACb;;;;;;OAMG;IACH,0CAAW,CAAA;AACb,CAAC,EAXW,2BAA2B,KAA3B,2BAA2B,QAWtC;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iDAAiD;IACjD,iCAAa,CAAA;AACf,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAsBD,wDAAwD","sourcesContent":["/**\n * The 3D layout vocabularies (#1843), in a module that imports NOTHING: the lazily loaded frame canvas reads\n * `Layout3DCamera`, and must not pull the layout definitions (and their shell containers) into its chunk to do so.\n */\n\n/** @wildo_source:part:start presets.3d.layout-contract facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * The built-in 3D layouts. An application uses exactly ONE, chosen when it registers the library; there\n * is no switch. An application may also define its own layout with an id of its own.\n */\nexport enum Layout3DId {\n /** The 2D shell's own disposal, unchanged, with the 3D frame drawn under its regions. */\n INHERIT = 'inherit',\n /**\n * The menubar and the status bars span the whole width; the navigation rails (activity bar, sidebar, utility\n * panel) sit between them, beside the content. The default disposal is sidebar-first; this one is header-first.\n */\n HEADER_FIRST = 'header-first',\n /**\n * The focal plane (#2049): one still perspective camera; the shell regions, each navigation pane and each popup are\n * separate glass objects that travel in depth. Whatever you work with rests on the focal plane at its true size;\n * everything else steps back. Nothing is angled and the camera never moves (Paul, 2026-09-30).\n */\n FOCAL_PLANE = 'focal-plane',\n}\n\n/**\n * The cameras a 3D layout is seen through. The flat camera's transitions are all drawn IN the flat frame (elevation,\n * light, rims), so a slab never leaves its region's box; the still-perspective camera moves the HTML objects instead.\n */\nexport enum Layout3DCamera {\n /** Orthographic, matched 1:1 to CSS pixels: the frame lies flat under the regions, exactly on their boxes. */\n FLAT_ORTHOGRAPHIC = 'flat-orthographic',\n /**\n * A still perspective camera, in CSS: the HTML objects themselves carry depth, around one shared vanishing point, and\n * no WebGL frame is drawn. The camera never moves; objects do (#2049). Only a placement that stages the objects can\n * be seen through it.\n */\n STILL_PERSPECTIVE = 'still-perspective',\n}\n\n/**\n * How the frame answers an APPEARANCE change: a theme, a density, a reduced-motion switch.\n *\n * Whatever the member, a light/dark switch SNAPS: text changes colour at once, and a backdrop halfway between two\n * modes is bounded against neither foreground.\n */\nexport enum Layout3DAppearanceTransition {\n /** The frame cross-fades to the new appearance over the theme's normal motion duration. */\n CROSS_FADE = 'cross-fade',\n}\n\n/**\n * A choreography the frame plays once, as a PULSE that rises and settles, when a shell state changes. The same\n * vocabulary serves every pulse-shaped trigger of {@link Layout3DTransitions} (a navigation, a sidebar resize), so a\n * layout picks per trigger and a new choreography is available to every trigger at once.\n *\n * Every member is drawn in the FRAME. No member transforms a region: a CSS transform blurs text while it runs and\n * makes the region the containing block of its `position: fixed` overlays. A choreography that moved regions would\n * need an untransformed portal target on the shell providers (a default-off option, not built) and its own\n * member here; none exists.\n *\n * Every member stays inside the contrast bound (see each), and plays nothing under reduced motion, where the theme's\n * motion duration is zero.\n */\nexport enum Layout3DFrameChoreography {\n /** Nothing moves. For an application's own layout that wants a still frame on this trigger. */\n NONE = 'none',\n /**\n * The content slab lifts toward the reader and settles back: its shadow spreads and drops further, and its rim\n * brightens toward its hover opacity, then both return. Only blur, offset and rim move — never the shadow's\n * opacity, and never the rim past the hover opacity the bound was proved for.\n */\n ELEVATION_SETTLE = 'elevation-settle',\n /**\n * The light swings across the frame and back: every gradient re-orients along the moving light. Every colour it\n * shows is a point of a gradient the bound already covers; only its direction changes.\n */\n LIGHT_SWEEP = 'light-sweep',\n}\n\n/**\n * What the frame shows for the FOCUSED navigation zone (`useNavigationState().focusedZone`), when two or more zones\n * are side by side.\n */\nexport enum Layout3DZoneFocusTransition {\n /** Nothing marks the focused zone in the frame. */\n NONE = 'none',\n /**\n * A rim in the content slab's rim colour, at most its hover opacity, around the focused zone; it moves to another\n * zone with the theme's gesture spring. Inset clear of the content slab's own rim band, so where it is drawn it is\n * the case the bound was proved for — a rim at hover opacity over the frost — except that it is written as a second\n * framebuffer layer, rounded to 8 bits twice rather than once (at most 1/255 apart), and that the emphasis values\n * between rest and hover are not checked one by one: both limits are shared with the slab rim's own hover emphasis.\n */\n RIM = 'rim',\n}\n\n/**\n * What a layout does to the regions at rest. Only FLAT exists: a CSS 3D transform blurs text, and any transform\n * makes a region the containing block of its `position: fixed` descendants. A layout that wants a persistent tilt\n * needs an untransformed portal target on the shell providers (not built: no choreography moves a region) and a new member here.\n */\nexport enum Layout3DRestPose {\n /** The regions are never transformed at rest. */\n FLAT = 'flat',\n}\n\n/**\n * What a layout plays, per trigger. The triggers are read from existing state only: the navigation state\n * (`useNavigationState`) and the shell's own region measurement. Whatever a layout picks, the frame FOLLOWS every\n * region's box frame by frame while the shell animates (the alignment invariant); these are what it plays\n * ON TOP of following.\n */\nexport interface Layout3DTransitions {\n /** A theme, density or reduced-motion change. */\n appearance: Layout3DAppearanceTransition;\n /**\n * The content changed: any structural zone's top entry is a different place (its URL). The route sync hooks mirror\n * router navigations into those stacks, so a sidebar link and a record opened beside a list both count; the\n * overlay zone does not (a dialog is not a place).\n */\n navigation: Layout3DFrameChoreography;\n /** The sidebar collapsed, expanded or was resized: its measured width changed while it stayed on screen. */\n sidebarResize: Layout3DFrameChoreography;\n /** The navigation state's focused zone changed while two or more zones are side by side. */\n zoneFocus: Layout3DZoneFocusTransition;\n}\n/** @wildo_source:part:end presets.3d.layout-contract */\n"]}
1
+ {"version":3,"file":"layout-3d-vocabulary.js","sourceRoot":"","sources":["../../../src/layout/layout-3d-vocabulary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mIAAmI;AACnI;;;GAGG;AACH,MAAM,CAAN,IAAY,UAcX;AAdD,WAAY,UAAU;IACpB,yFAAyF;IACzF,iCAAmB,CAAA;IACnB;;;OAGG;IACH,2CAA6B,CAAA;IAC7B;;;;OAIG;IACH,yCAA2B,CAAA;AAC7B,CAAC,EAdW,UAAU,KAAV,UAAU,QAcrB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,8GAA8G;IAC9G,yDAAuC,CAAA;IACvC;;;;OAIG;IACH,yDAAuC,CAAA;AACzC,CAAC,EATW,cAAc,KAAd,cAAc,QASzB;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,2FAA2F;IAC3F,yDAAyB,CAAA;AAC3B,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,QAGvC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,yBAcX;AAdD,WAAY,yBAAyB;IACnC,+FAA+F;IAC/F,0CAAa,CAAA;IACb;;;;OAIG;IACH,kEAAqC,CAAA;IACrC;;;OAGG;IACH,wDAA2B,CAAA;AAC7B,CAAC,EAdW,yBAAyB,KAAzB,yBAAyB,QAcpC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,2BAWX;AAXD,WAAY,2BAA2B;IACrC,mDAAmD;IACnD,4CAAa,CAAA;IACb;;;;;;OAMG;IACH,0CAAW,CAAA;AACb,CAAC,EAXW,2BAA2B,KAA3B,2BAA2B,QAWtC;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iDAAiD;IACjD,iCAAa,CAAA;AACf,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAsBD,wDAAwD","sourcesContent":["/**\n * The 3D layout vocabularies (#1843), in a module that imports NOTHING: the lazily loaded frame canvas reads\n * `Layout3DCamera`, and must not pull the layout definitions (and their shell containers) into its chunk to do so.\n */\n\n/** @wildo_source:part:start presets.3d.layout-contract facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/**\n * The built-in 3D layouts. An application uses exactly ONE, chosen when it registers the library; there\n * is no switch. An application may also define its own layout with an id of its own.\n */\nexport enum Layout3DId {\n /** The 2D shell's own disposal, unchanged, with the 3D frame drawn under its regions. */\n INHERIT = 'inherit',\n /**\n * The menubar and the status bars span the whole width; the navigation rails (activity bar, sidebar, utility\n * panel) sit between them, beside the content. The default disposal is sidebar-first; this one is header-first.\n */\n HEADER_FIRST = 'header-first',\n /**\n * The focal plane (#2049): one still perspective camera; the shell regions, each navigation pane and each popup are\n * separate glass objects that travel in depth. Whatever you work with rests on the focal plane at its true size;\n * everything else steps back. Nothing is angled and the camera never moves (Paul, 2026-09-30).\n */\n FOCAL_PLANE = 'focal-plane',\n}\n\n/**\n * The cameras a 3D layout is seen through. The flat camera's transitions are all drawn IN the flat frame (elevation,\n * light, rims), so a slab never leaves its region's box; the still-perspective camera moves the HTML objects instead.\n */\nexport enum Layout3DCamera {\n /** Orthographic, matched 1:1 to CSS pixels: the frame lies flat under the regions, exactly on their boxes. */\n FLAT_ORTHOGRAPHIC = 'flat-orthographic',\n /**\n * A still perspective camera, in CSS: the HTML objects themselves carry depth, around one shared vanishing point, and\n * no WebGL frame is drawn. The camera never moves; objects do (#2049). Only a placement that stages the objects can\n * be seen through it.\n */\n STILL_PERSPECTIVE = 'still-perspective',\n}\n\n/**\n * How the frame answers an APPEARANCE change: a theme, a density, a reduced-motion switch.\n *\n * Whatever the member, a light/dark switch SNAPS: text changes colour at once, and a backdrop halfway between two\n * modes is bounded against neither foreground.\n */\nexport enum Layout3DAppearanceTransition {\n /** The frame cross-fades to the new appearance over the theme's normal motion duration. */\n CROSS_FADE = 'cross-fade',\n}\n\n/**\n * A choreography the frame plays once, as a PULSE that rises and settles, when a shell state changes. The same\n * vocabulary serves every pulse-shaped trigger of {@link Layout3DTransitions} (a navigation, a sidebar resize), so a\n * layout picks per trigger and a new choreography is available to every trigger at once.\n *\n * Every member is drawn in the FRAME. No member transforms a region: a CSS transform blurs text while it runs and\n * makes the region the containing block of its `position: fixed` overlays. A choreography that moved regions would\n * need an untransformed portal target on the shell providers (a default-off option, not built) and its own\n * member here; none exists.\n *\n * Every member stays inside the contrast bound (see each), and plays nothing under reduced motion, where the theme's\n * motion duration is zero.\n */\nexport enum Layout3DFrameChoreography {\n /** Nothing moves. For an application's own layout that wants a still frame on this trigger. */\n NONE = 'none',\n /**\n * The content slab lifts toward the reader and settles back: its shadow spreads and drops further, and its rim\n * brightens toward its hover opacity, then both return. Only blur, offset and rim move — never the shadow's\n * opacity, and never the rim past the hover opacity the bound was proved for.\n */\n ELEVATION_SETTLE = 'elevation-settle',\n /**\n * The light swings across the frame and back: every gradient re-orients along the moving light. Every colour it\n * shows is a point of a gradient the bound already covers; only its direction changes.\n */\n LIGHT_SWEEP = 'light-sweep',\n}\n\n/**\n * What the frame shows for the FOCUSED navigation zone (`useNavigationState().focusedZone`), when two or more zones\n * are side by side.\n */\nexport enum Layout3DZoneFocusTransition {\n /** Nothing marks the focused zone in the frame. */\n NONE = 'none',\n /**\n * A rim in the content slab's rim colour, at most its hover opacity, around the focused zone; it moves to another\n * zone with the theme's gesture spring. Inset clear of the content slab's own rim band, so where it is drawn it is\n * the case the bound was proved for — a rim at hover opacity over the frost — except that it is written as a second\n * framebuffer layer, rounded to 8 bits twice rather than once (at most 1/255 apart), and that the emphasis values\n * between rest and hover are not checked one by one: both limits are shared with the slab rim's own hover emphasis.\n */\n RIM = 'rim',\n}\n\n/**\n * What a layout does to the regions at rest. Only FLAT exists: a CSS 3D transform blurs text, and any transform\n * makes a region the containing block of its `position: fixed` descendants. A layout that wants a persistent tilt\n * needs an untransformed portal target on the shell providers (not built: no choreography moves a region) and a new member here.\n */\nexport enum Layout3DRestPose {\n /** The regions are never transformed at rest. */\n FLAT = 'flat',\n}\n\n/**\n * What a layout plays, per trigger. The triggers are read from existing state only: the navigation state\n * (`useNavigationState`) and the shell's own region measurement. Whatever a layout picks, the frame FOLLOWS every\n * region's box frame by frame while the shell animates (the alignment invariant); these are what it plays\n * ON TOP of following.\n */\nexport interface Layout3DTransitions {\n /** A theme, density or reduced-motion change. */\n appearance: Layout3DAppearanceTransition;\n /**\n * The content changed: any structural zone's top entry is a different place (its URL). The route sync hooks mirror\n * router navigations into those stacks, so a sidebar link and a record opened beside a list both count; the\n * overlay zone does not (a dialog is not a place).\n */\n navigation: Layout3DFrameChoreography;\n /** The sidebar collapsed, expanded or was resized: its measured width changed while it stayed on screen. */\n sidebarResize: Layout3DFrameChoreography;\n /** The navigation state's focused zone changed while two or more zones are side by side. */\n zoneFocus: Layout3DZoneFocusTransition;\n}\n/** @wildo_source:part:end presets.3d.layout-contract */\n"]}
@@ -1,14 +1,8 @@
1
1
  import React from 'react';
2
- import { type AppLayoutPreset_MainContainer_DefaultProps } from '@wildo-ai/saas-frontend-lib';
2
+ import { type AppLayoutPreset_MainContainer_DefaultProps, type ShellLayoutMainContainer } from '@wildo-ai/saas-frontend-lib';
3
3
  import type { Frame3DStyleOverrides } from './frame/frame-3d-style';
4
4
  import { type FocalPlaneSettings } from './focal-plane/focal-plane-settings';
5
5
  import { type Layout3DDefinition } from './layout/layout-3d-definition';
6
- /**
7
- * The brand a 3D main container carries. `Symbol.for`, not `Symbol`: the component registry lives on
8
- * `globalThis` and survives a hot reload, while a reloaded module would mint a new `Symbol` and fail to
9
- * recognise the container it registered last time — and then capture it as "the 2D shell".
10
- */
11
- declare const LAYOUT_3D_MAIN_CONTAINER_BRAND: unique symbol;
12
6
  type MainContainerComponent = React.ComponentType<AppLayoutPreset_MainContainer_DefaultProps>;
13
7
  /** @wildo_source:part:start presets.3d.register-layout facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */
14
8
  /** What a 3D main container draws: the layout, and the application's frame-style overrides. */
@@ -27,20 +21,21 @@ export interface Layout3DOptions {
27
21
  focalPlane?: Partial<FocalPlaneSettings>;
28
22
  }
29
23
  /** @wildo_source:part:end presets.3d.register-layout */
30
- /** A 3D main container: the component, the 2D container it captured, and the layout it draws. */
31
- export type Layout3DMainContainer = MainContainerComponent & {
32
- readonly [LAYOUT_3D_MAIN_CONTAINER_BRAND]: true;
33
- /**
34
- * The 2D main container captured at registration: rendered unchanged by an INHERIT placement, and kept by every
35
- * layout so a re-registration wraps IT rather than a 3D container.
36
- */
37
- readonly captured: MainContainerComponent;
38
- /** The layout this container draws. */
39
- readonly layout: Layout3DDefinition;
24
+ /**
25
+ * A 3D main container: a shell layout main container (`ShellLayoutMainContainer` from `@wildo-ai/saas-frontend-lib`
26
+ * — the component, the container it captured, the layout it draws) whose layout is a 3D one, plus the application's
27
+ * frame-style overrides. It carries the core brand, so the one-layout rule and the re-registration capture treat it
28
+ * exactly as they treat a 2D layout's container.
29
+ */
30
+ export type Layout3DMainContainer = ShellLayoutMainContainer<Layout3DDefinition> & {
40
31
  /** The application's frame-style overrides, when it registered any. */
41
32
  readonly frameStyles: Frame3DStyleOverrides | undefined;
42
33
  };
43
- /** Whether a registered main container is a 3D one — and so carries the 2D container it wraps. */
34
+ /**
35
+ * Whether a registered main container is a 3D one — and so carries the 2D container it wraps. Decided by the family
36
+ * the container was branded for (`ShellLayoutFamily.LAYOUT_3D`): a 2D layout's container is a layout container, not
37
+ * a 3D one, whatever its layout id.
38
+ */
44
39
  export declare function isLayout3DMainContainer(component: unknown): component is Layout3DMainContainer;
45
40
  /**
46
41
  * Build the 3D main container: a captured 2D container, and a layout that either renders it (INHERIT) or arranges
@@ -1 +1 @@
1
- {"version":3,"file":"layout-3d-main-container.d.ts","sourceRoot":"","sources":["../../src/layout-3d-main-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAA6B,KAAK,0CAA0C,EAAE,MAAM,6BAA6B,CAAC;AAGzH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAwD,KAAK,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACnI,OAAO,EAA8C,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAMpH;;;;GAIG;AACH,QAAA,MAAM,8BAA8B,eAA+D,CAAC;AAEpG,KAAK,sBAAsB,GAAG,KAAK,CAAC,aAAa,CAAC,0CAA0C,CAAC,CAAC;AAE9F,mIAAmI;AACnI,+FAA+F;AAC/F,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,uEAAuE;IACvE,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC1C;AACD,wDAAwD;AAExD,iGAAiG;AACjG,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,GAAG;IAC3D,QAAQ,CAAC,CAAC,8BAA8B,CAAC,EAAE,IAAI,CAAC;IAChD;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;IAC1C,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,uEAAuE;IACvE,QAAQ,CAAC,WAAW,EAAE,qBAAqB,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF,kGAAkG;AAClG,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,OAAO,GA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QAAQ,EAAE,sBAAsB,EAAE,OAAO,GAAE,eAAoB,GAAG,qBAAqB,CA+C5H"}
@@ -1,22 +1,19 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect } from 'react';
3
- import { useNavigationState, useUI } from '@wildo-ai/saas-frontend-lib';
3
+ import { brandShellLayoutMainContainer, isShellLayoutMainContainer, resolveShellLayoutPlacement, ShellLayoutFamily, useNavigationState, useUI, } from '@wildo-ai/saas-frontend-lib';
4
4
  import { FrameCanvasDoor } from './frame/frame-canvas.lazy.js';
5
5
  import { FocalPlaneSettingsContext, resolveFocalPlaneSettings } from './focal-plane/focal-plane-settings.js';
6
6
  import { assertSupportedLayout3D, INHERIT_LAYOUT_3D } from './layout/layout-3d-definition.js';
7
7
  import { crossFadesAppearance } from './layout/layout-3d-transition-choreography.js';
8
8
  import { Layout3DCamera } from './layout/layout-3d-vocabulary.js';
9
- import { ShellLayoutPlacementKind } from './layout/shell-layout-placement.js';
10
9
  import { useFrameAppearance } from './frame/use-frame-appearance.js';
11
10
  /**
12
- * The brand a 3D main container carries. `Symbol.for`, not `Symbol`: the component registry lives on
13
- * `globalThis` and survives a hot reload, while a reloaded module would mint a new `Symbol` and fail to
14
- * recognise the container it registered last time — and then capture it as "the 2D shell".
11
+ * Whether a registered main container is a 3D one — and so carries the 2D container it wraps. Decided by the family
12
+ * the container was branded for (`ShellLayoutFamily.LAYOUT_3D`): a 2D layout's container is a layout container, not
13
+ * a 3D one, whatever its layout id.
15
14
  */
16
- const LAYOUT_3D_MAIN_CONTAINER_BRAND = Symbol.for('@wildo-ai/presets-components-3d/main-container');
17
- /** Whether a registered main container is a 3D one — and so carries the 2D container it wraps. */
18
15
  export function isLayout3DMainContainer(component) {
19
- return typeof component === 'function' && component[LAYOUT_3D_MAIN_CONTAINER_BRAND] === true;
16
+ return isShellLayoutMainContainer(component) && component.layoutFamily === ShellLayoutFamily.LAYOUT_3D && 'frameStyles' in component;
20
17
  }
21
18
  let appearanceMismatchWarned = false;
22
19
  /**
@@ -73,7 +70,7 @@ export function create3DMainContainer(captured, options = {}) {
73
70
  const crossFadeAppearance = crossFadesAppearance(layout.transitions.appearance);
74
71
  // Chosen ONCE, outside the component: the element at index 1 keeps one type for the application's life, so it
75
72
  // never remounts.
76
- const Placement = layout.placement.kind === ShellLayoutPlacementKind.INHERIT ? captured : layout.placement.container;
73
+ const Placement = resolveShellLayoutPlacement(captured, layout);
77
74
  function Layout3DMainContainer(props) {
78
75
  const { shellAppearance } = useUI();
79
76
  const required = layout.constraints.requiredShellAppearance;
@@ -94,12 +91,7 @@ export function create3DMainContainer(captured, options = {}) {
94
91
  }, [shellAppearance, required]);
95
92
  return (_jsxs(_Fragment, { children: [layout.scene.camera === Layout3DCamera.FLAT_ORTHOGRAPHIC && _jsx(FrameSlot, { layout: layout, frameStyles: frameStyles, crossFadeAppearance: crossFadeAppearance }), _jsx(FocalPlaneSettingsContext.Provider, { value: focalPlane, children: _jsx(Placement, { ...props }) })] }));
96
93
  }
97
- return Object.assign(Layout3DMainContainer, {
98
- [LAYOUT_3D_MAIN_CONTAINER_BRAND]: true,
99
- captured,
100
- layout,
101
- frameStyles,
102
- });
94
+ return brandShellLayoutMainContainer(Layout3DMainContainer, captured, layout, ShellLayoutFamily.LAYOUT_3D, { frameStyles });
103
95
  }
104
96
  /**
105
97
  * Index 0 of a 3D main container: reads what the frame follows — the theme (`useFrameAppearance`) and the navigation
@@ -1 +1 @@
1
- {"version":3,"file":"layout-3d-main-container.js","sourceRoot":"","sources":["../../../src/layout-3d-main-container.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAmD,MAAM,6BAA6B,CAAC;AAEzH,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAA2B,MAAM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,IACd,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,EAC3B,mBAAmB,EAAE,mBAAmB,EACxC,oBAAoB,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,EACnD,uBAAuB,EAAE,MAAM,CAAC,WAAW,CAAC,aAAa,EACzD,mBAAmB,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,EACjD,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,UAAU,CAAC,WAAW,GACnC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React, { useEffect } from 'react';\n\nimport { useNavigationState, useUI, type AppLayoutPreset_MainContainer_DefaultProps } from '@wildo-ai/saas-frontend-lib';\n\nimport { FrameCanvasDoor } from './frame/frame-canvas.lazy';\nimport type { Frame3DStyleOverrides } from './frame/frame-3d-style';\nimport { FocalPlaneSettingsContext, resolveFocalPlaneSettings, type FocalPlaneSettings } from './focal-plane/focal-plane-settings';\nimport { assertSupportedLayout3D, INHERIT_LAYOUT_3D, type Layout3DDefinition } from './layout/layout-3d-definition';\nimport { crossFadesAppearance } from './layout/layout-3d-transition-choreography';\nimport { Layout3DCamera } from './layout/layout-3d-vocabulary';\nimport { ShellLayoutPlacementKind } from './layout/shell-layout-placement';\nimport { useFrameAppearance } from './frame/use-frame-appearance';\n\n/**\n * The brand a 3D main container carries. `Symbol.for`, not `Symbol`: the component registry lives on\n * `globalThis` and survives a hot reload, while a reloaded module would mint a new `Symbol` and fail to\n * recognise the container it registered last time — and then capture it as \"the 2D shell\".\n */\nconst LAYOUT_3D_MAIN_CONTAINER_BRAND = Symbol.for('@wildo-ai/presets-components-3d/main-container');\n\ntype MainContainerComponent = React.ComponentType<AppLayoutPreset_MainContainer_DefaultProps>;\n\n/** @wildo_source:part:start presets.3d.register-layout facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/** What a 3D main container draws: the layout, and the application's frame-style overrides. */\nexport interface Layout3DOptions {\n /**\n * The layout: its disposal, its scene and its transitions. Defaults to {@link INHERIT_LAYOUT_3D}, the 2D disposal\n * with the frame under it. An application uses ONE layout for its whole life.\n */\n layout?: Layout3DDefinition;\n /** Frame-style overrides layered over the layout's built-in styles. */\n frameStyles?: Frame3DStyleOverrides;\n /**\n * Overrides of the focal plane's numbers (camera distance, layer depth, motion, dims, blurs, window opacity), for\n * {@link FOCAL_PLANE_LAYOUT_3D}; each is checked at registration. Omitted, the defaults.\n */\n focalPlane?: Partial<FocalPlaneSettings>;\n}\n/** @wildo_source:part:end presets.3d.register-layout */\n\n/** A 3D main container: the component, the 2D container it captured, and the layout it draws. */\nexport type Layout3DMainContainer = MainContainerComponent & {\n readonly [LAYOUT_3D_MAIN_CONTAINER_BRAND]: true;\n /**\n * The 2D main container captured at registration: rendered unchanged by an INHERIT placement, and kept by every\n * layout so a re-registration wraps IT rather than a 3D container.\n */\n readonly captured: MainContainerComponent;\n /** The layout this container draws. */\n readonly layout: Layout3DDefinition;\n /** The application's frame-style overrides, when it registered any. */\n readonly frameStyles: Frame3DStyleOverrides | undefined;\n};\n\n/** Whether a registered main container is a 3D one — and so carries the 2D container it wraps. */\nexport function isLayout3DMainContainer(component: unknown): component is Layout3DMainContainer {\n return typeof component === 'function' && (component as Partial<Layout3DMainContainer>)[LAYOUT_3D_MAIN_CONTAINER_BRAND] === true;\n}\n\nlet appearanceMismatchWarned = false;\n\n/**\n * How long a shell appearance other than the one the layout requires must persist before it is reported. The UI\n * context starts from the DEFAULT theme and resolves the application's own theme a moment later, so the first value\n * this container sees is routinely SEPARATED even in a CONTINUOUS application — measured on Wonder Todos, whose\n * shell renders `bg-transparent` while the first-render value read SEPARATED. Only a value that survives\n * bootstrap is the application's.\n */\nconst APPEARANCE_MISMATCH_REPORT_DELAY_MS = 5000;\n\n/**\n * Build the 3D main container: a captured 2D container, and a layout that either renders it (INHERIT) or arranges\n * the regions with a container of its own (COMPOSED).\n *\n * It renders exactly two children, at FIXED positions:\n *\n * - **index 0, the frame slot** ({@link FrameSlot}): the decorative canvas behind its lazy door (`FrameCanvasDoor`),\n * whose `LazyDoorErrorBoundary` contains any failure of it. The theme and the navigation state are read in the\n * slot, in the DOM tree, and passed to the canvas as props: a theme, mode, breakpoint or navigation change\n * re-renders index 0 and never touches index 1.\n * It is `position: fixed` with NO z-index, `aria-hidden` and `pointer-events: none`.\n * - **index 1, the placement**: the captured 2D container, unchanged, for an INHERIT layout; the layout's own\n * container, composed from the same shell building blocks, otherwise. Either way every region, provider,\n * context, portal and latch is the application's own.\n *\n * Why no wrapper, and no `isolate` (the #1821 text proposed `<div class=\"isolate\">` with the canvas at\n * `-z-10`): `isolate` would make the whole shell ONE stacking context, so anything positioned OUTSIDE it\n * with a lower z-index — the consent prompt (`z-50`) — would paint over the shell's own dialogs\n * (`--z-overlay`, 300). #1830 measured that exact reordering and chose `relative` for the 2D shell root\n * for that reason. Instead, a positioned element with no z-index paints at the z-index:0 level in TREE\n * order, which puts the canvas after the theme's background layer (`UIContext`'s `isolate` wrapper,\n * earlier in the tree) and before the shell root (`relative`, the next sibling) — frame above the theme\n * background, shell above the frame — while every z-index inside the shell keeps its global order.\n *\n * The precondition this places on the placement: its ROOT must be positioned (the 2D default and the\n * header-first container are `relative`, #1830), or its in-flow content paints at a lower level than the frame and\n * under it. The frame never takes a click either way — it handles no pointer events at all.\n *\n * Why fixed positions: a canvas failure empties only index 0. The placement never moves and keeps one component\n * type for the application's life, so it never remounts — a remount there would unmount every navigation zone and\n * lose its state.\n */\nexport function create3DMainContainer(captured: MainContainerComponent, options: Layout3DOptions = {}): Layout3DMainContainer {\n const layout = options.layout ?? INHERIT_LAYOUT_3D;\n const frameStyles = options.frameStyles;\n // Checked here, at registration, like the layout itself. Only the still-perspective camera reads them: settings a\n // layout would silently ignore are refused instead.\n if (options.focalPlane !== undefined && layout.scene.camera !== Layout3DCamera.STILL_PERSPECTIVE) {\n throw new Error(`register3DLayout(): 'focalPlane' tunes the focal-plane layout, and the layout '${layout.id}' is not seen through its still camera.`);\n }\n const focalPlane = resolveFocalPlaneSettings(options.focalPlane);\n // A camera, transition kind or rest pose the renderer does not implement is refused here, at registration.\n assertSupportedLayout3D(layout);\n const crossFadeAppearance = crossFadesAppearance(layout.transitions.appearance);\n // Chosen ONCE, outside the component: the element at index 1 keeps one type for the application's life, so it\n // never remounts.\n const Placement: MainContainerComponent = layout.placement.kind === ShellLayoutPlacementKind.INHERIT ? captured : layout.placement.container;\n function Layout3DMainContainer(props: AppLayoutPreset_MainContainer_DefaultProps): React.JSX.Element {\n const { shellAppearance } = useUI();\n const required = layout.constraints.requiredShellAppearance;\n\n useEffect(() => {\n // The frame is visible only where regions paint nothing. A layout states the shell appearance it is designed\n // for; any other is the application's choice to correct, so it is said once and nothing switches.\n if (required === null || shellAppearance === required || appearanceMismatchWarned) return undefined;\n const report = setTimeout(() => {\n // Checked again here: several containers (or a remount) may have armed a timer before the first fired.\n if (appearanceMismatchWarned) return;\n appearanceMismatchWarned = true;\n console.warn(\n `[presets-components-3d] the 3D layout '${layout.id}' is designed for a '${String(required)}' shell, and this theme's `\n + `shell appearance is '${String(shellAppearance)}': opaque regions will cover the frame drawn under them.`,\n );\n }, APPEARANCE_MISMATCH_REPORT_DELAY_MS);\n return () => clearTimeout(report);\n }, [shellAppearance, required]);\n\n return (\n <>\n {/* The flat frame belongs to the flat camera; a still-perspective placement stages its own depth. */}\n {layout.scene.camera === Layout3DCamera.FLAT_ORTHOGRAPHIC && <FrameSlot layout={layout} frameStyles={frameStyles} crossFadeAppearance={crossFadeAppearance} />}\n <FocalPlaneSettingsContext.Provider value={focalPlane}>\n <Placement {...props} />\n </FocalPlaneSettingsContext.Provider>\n </>\n );\n }\n\n return Object.assign(Layout3DMainContainer, {\n [LAYOUT_3D_MAIN_CONTAINER_BRAND]: true as const,\n captured,\n layout,\n frameStyles,\n });\n}\n\n/**\n * Index 0 of a 3D main container: reads what the frame follows — the theme (`useFrameAppearance`) and the navigation\n * state (#1826) — and hands it to the canvas. Its own component, so a navigation, which changes the navigation state\n * many times a second during some flows, re-renders this slot and never the placement beside it.\n *\n * The navigation signature is every structural zone's top entry (`getTopEntry`, so a tabbed zone reports its visible\n * tab), identified by its URL PATH:\n * - not by its id, which is minted again on every push or replace, so a route sync that re-lands the SAME place would\n * read as a navigation nobody made (the id stands in only for an entry without a URL);\n * - not by its query string, which carries VIEW state on the same content (`?section=`, `?dataMode=`, which the\n * engine updates in place as \"same id, same content\"): switching a board's section tab or a list's mode is not\n * going somewhere, and does not play.\n * The route sync hooks mirror router navigations into those stacks, so a sidebar link and a record opened beside a\n * list both change it; the overlay zone is not a place and does not. While no zone holds anything yet, the signature\n * is empty, which the frame never records (see `FrameDriver.setNavigation`).\n */\nfunction FrameSlot({\n layout,\n frameStyles,\n crossFadeAppearance,\n}: {\n layout: Layout3DDefinition;\n frameStyles: Frame3DStyleOverrides | undefined;\n crossFadeAppearance: boolean;\n}): React.JSX.Element {\n const appearance = useFrameAppearance(layout.scene.frameStyles, frameStyles);\n const navigation = useNavigationState();\n const zones = Object.keys(navigation.state.zones) as Array<keyof typeof navigation.state.zones>;\n const places = zones.map((zone) => {\n const top = navigation.getTopEntry(zone);\n return top ? (top.urlPath?.split(/[?#]/)[0] ?? top.id) : '';\n });\n const navigationSignature = places.some((place) => place !== '') ? zones.map((zone, index) => `${zone}:${places[index]}`).join('|') : '';\n return (\n <FrameCanvasDoor\n appearance={appearance}\n camera={layout.scene.camera}\n crossFadeAppearance={crossFadeAppearance}\n navigationTransition={layout.transitions.navigation}\n sidebarResizeTransition={layout.transitions.sidebarResize}\n zoneFocusTransition={layout.transitions.zoneFocus}\n navigationSignature={navigationSignature}\n focusedZone={navigation.focusedZone}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"layout-3d-main-container.js","sourceRoot":"","sources":["../../src/layout-3d-main-container.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,2B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MAAM,CAAC,KAAK,CAAC,MAAM,EAC3B,mBAAmB,EAAE,mBAAmB,EACxC,oBAAoB,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,EACnD,uBAAuB,EAAE,MAAM,CAAC,WAAW,CAAC,aAAa,EACzD,mBAAmB,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,EACjD,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,UAAU,CAAC,WAAW,GACnC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React, { useEffect } from 'react';\n\nimport {\n brandShellLayoutMainContainer,\n isShellLayoutMainContainer,\n resolveShellLayoutPlacement,\n ShellLayoutFamily,\n useNavigationState,\n useUI,\n type AppLayoutPreset_MainContainer_DefaultProps,\n type ShellLayoutMainContainer,\n} from '@wildo-ai/saas-frontend-lib';\n\nimport { FrameCanvasDoor } from './frame/frame-canvas.lazy';\nimport type { Frame3DStyleOverrides } from './frame/frame-3d-style';\nimport { FocalPlaneSettingsContext, resolveFocalPlaneSettings, type FocalPlaneSettings } from './focal-plane/focal-plane-settings';\nimport { assertSupportedLayout3D, INHERIT_LAYOUT_3D, type Layout3DDefinition } from './layout/layout-3d-definition';\nimport { crossFadesAppearance } from './layout/layout-3d-transition-choreography';\nimport { Layout3DCamera } from './layout/layout-3d-vocabulary';\nimport { useFrameAppearance } from './frame/use-frame-appearance';\n\ntype MainContainerComponent = React.ComponentType<AppLayoutPreset_MainContainer_DefaultProps>;\n\n/** @wildo_source:part:start presets.3d.register-layout facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */\n/** What a 3D main container draws: the layout, and the application's frame-style overrides. */\nexport interface Layout3DOptions {\n /**\n * The layout: its disposal, its scene and its transitions. Defaults to {@link INHERIT_LAYOUT_3D}, the 2D disposal\n * with the frame under it. An application uses ONE layout for its whole life.\n */\n layout?: Layout3DDefinition;\n /** Frame-style overrides layered over the layout's built-in styles. */\n frameStyles?: Frame3DStyleOverrides;\n /**\n * Overrides of the focal plane's numbers (camera distance, layer depth, motion, dims, blurs, window opacity), for\n * {@link FOCAL_PLANE_LAYOUT_3D}; each is checked at registration. Omitted, the defaults.\n */\n focalPlane?: Partial<FocalPlaneSettings>;\n}\n/** @wildo_source:part:end presets.3d.register-layout */\n\n/**\n * A 3D main container: a shell layout main container (`ShellLayoutMainContainer` from `@wildo-ai/saas-frontend-lib`\n * — the component, the container it captured, the layout it draws) whose layout is a 3D one, plus the application's\n * frame-style overrides. It carries the core brand, so the one-layout rule and the re-registration capture treat it\n * exactly as they treat a 2D layout's container.\n */\nexport type Layout3DMainContainer = ShellLayoutMainContainer<Layout3DDefinition> & {\n /** The application's frame-style overrides, when it registered any. */\n readonly frameStyles: Frame3DStyleOverrides | undefined;\n};\n\n/**\n * Whether a registered main container is a 3D one — and so carries the 2D container it wraps. Decided by the family\n * the container was branded for (`ShellLayoutFamily.LAYOUT_3D`): a 2D layout's container is a layout container, not\n * a 3D one, whatever its layout id.\n */\nexport function isLayout3DMainContainer(component: unknown): component is Layout3DMainContainer {\n return isShellLayoutMainContainer(component) && component.layoutFamily === ShellLayoutFamily.LAYOUT_3D && 'frameStyles' in component;\n}\n\nlet appearanceMismatchWarned = false;\n\n/**\n * How long a shell appearance other than the one the layout requires must persist before it is reported. The UI\n * context starts from the DEFAULT theme and resolves the application's own theme a moment later, so the first value\n * this container sees is routinely SEPARATED even in a CONTINUOUS application — measured on Wonder Todos, whose\n * shell renders `bg-transparent` while the first-render value read SEPARATED. Only a value that survives\n * bootstrap is the application's.\n */\nconst APPEARANCE_MISMATCH_REPORT_DELAY_MS = 5000;\n\n/**\n * Build the 3D main container: a captured 2D container, and a layout that either renders it (INHERIT) or arranges\n * the regions with a container of its own (COMPOSED).\n *\n * It renders exactly two children, at FIXED positions:\n *\n * - **index 0, the frame slot** ({@link FrameSlot}): the decorative canvas behind its lazy door (`FrameCanvasDoor`),\n * whose `LazyDoorErrorBoundary` contains any failure of it. The theme and the navigation state are read in the\n * slot, in the DOM tree, and passed to the canvas as props: a theme, mode, breakpoint or navigation change\n * re-renders index 0 and never touches index 1.\n * It is `position: fixed` with NO z-index, `aria-hidden` and `pointer-events: none`.\n * - **index 1, the placement**: the captured 2D container, unchanged, for an INHERIT layout; the layout's own\n * container, composed from the same shell building blocks, otherwise. Either way every region, provider,\n * context, portal and latch is the application's own.\n *\n * Why no wrapper, and no `isolate` (the #1821 text proposed `<div class=\"isolate\">` with the canvas at\n * `-z-10`): `isolate` would make the whole shell ONE stacking context, so anything positioned OUTSIDE it\n * with a lower z-index — the consent prompt (`z-50`) — would paint over the shell's own dialogs\n * (`--z-overlay`, 300). #1830 measured that exact reordering and chose `relative` for the 2D shell root\n * for that reason. Instead, a positioned element with no z-index paints at the z-index:0 level in TREE\n * order, which puts the canvas after the theme's background layer (`UIContext`'s `isolate` wrapper,\n * earlier in the tree) and before the shell root (`relative`, the next sibling) — frame above the theme\n * background, shell above the frame — while every z-index inside the shell keeps its global order.\n *\n * The precondition this places on the placement: its ROOT must be positioned (the 2D default and the\n * header-first container are `relative`, #1830), or its in-flow content paints at a lower level than the frame and\n * under it. The frame never takes a click either way — it handles no pointer events at all.\n *\n * Why fixed positions: a canvas failure empties only index 0. The placement never moves and keeps one component\n * type for the application's life, so it never remounts — a remount there would unmount every navigation zone and\n * lose its state.\n */\nexport function create3DMainContainer(captured: MainContainerComponent, options: Layout3DOptions = {}): Layout3DMainContainer {\n const layout = options.layout ?? INHERIT_LAYOUT_3D;\n const frameStyles = options.frameStyles;\n // Checked here, at registration, like the layout itself. Only the still-perspective camera reads them: settings a\n // layout would silently ignore are refused instead.\n if (options.focalPlane !== undefined && layout.scene.camera !== Layout3DCamera.STILL_PERSPECTIVE) {\n throw new Error(`register3DLayout(): 'focalPlane' tunes the focal-plane layout, and the layout '${layout.id}' is not seen through its still camera.`);\n }\n const focalPlane = resolveFocalPlaneSettings(options.focalPlane);\n // A camera, transition kind or rest pose the renderer does not implement is refused here, at registration.\n assertSupportedLayout3D(layout);\n const crossFadeAppearance = crossFadesAppearance(layout.transitions.appearance);\n // Chosen ONCE, outside the component: the element at index 1 keeps one type for the application's life, so it\n // never remounts.\n const Placement = resolveShellLayoutPlacement(captured, layout);\n function Layout3DMainContainer(props: AppLayoutPreset_MainContainer_DefaultProps): React.JSX.Element {\n const { shellAppearance } = useUI();\n const required = layout.constraints.requiredShellAppearance;\n\n useEffect(() => {\n // The frame is visible only where regions paint nothing. A layout states the shell appearance it is designed\n // for; any other is the application's choice to correct, so it is said once and nothing switches.\n if (required === null || shellAppearance === required || appearanceMismatchWarned) return undefined;\n const report = setTimeout(() => {\n // Checked again here: several containers (or a remount) may have armed a timer before the first fired.\n if (appearanceMismatchWarned) return;\n appearanceMismatchWarned = true;\n console.warn(\n `[presets-components-3d] the 3D layout '${layout.id}' is designed for a '${String(required)}' shell, and this theme's `\n + `shell appearance is '${String(shellAppearance)}': opaque regions will cover the frame drawn under them.`,\n );\n }, APPEARANCE_MISMATCH_REPORT_DELAY_MS);\n return () => clearTimeout(report);\n }, [shellAppearance, required]);\n\n return (\n <>\n {/* The flat frame belongs to the flat camera; a still-perspective placement stages its own depth. */}\n {layout.scene.camera === Layout3DCamera.FLAT_ORTHOGRAPHIC && <FrameSlot layout={layout} frameStyles={frameStyles} crossFadeAppearance={crossFadeAppearance} />}\n <FocalPlaneSettingsContext.Provider value={focalPlane}>\n <Placement {...props} />\n </FocalPlaneSettingsContext.Provider>\n </>\n );\n }\n\n return brandShellLayoutMainContainer(Layout3DMainContainer, captured, layout, ShellLayoutFamily.LAYOUT_3D, { frameStyles });\n}\n\n/**\n * Index 0 of a 3D main container: reads what the frame follows — the theme (`useFrameAppearance`) and the navigation\n * state (#1826) — and hands it to the canvas. Its own component, so a navigation, which changes the navigation state\n * many times a second during some flows, re-renders this slot and never the placement beside it.\n *\n * The navigation signature is every structural zone's top entry (`getTopEntry`, so a tabbed zone reports its visible\n * tab), identified by its URL PATH:\n * - not by its id, which is minted again on every push or replace, so a route sync that re-lands the SAME place would\n * read as a navigation nobody made (the id stands in only for an entry without a URL);\n * - not by its query string, which carries VIEW state on the same content (`?section=`, `?dataMode=`, which the\n * engine updates in place as \"same id, same content\"): switching a board's section tab or a list's mode is not\n * going somewhere, and does not play.\n * The route sync hooks mirror router navigations into those stacks, so a sidebar link and a record opened beside a\n * list both change it; the overlay zone is not a place and does not. While no zone holds anything yet, the signature\n * is empty, which the frame never records (see `FrameDriver.setNavigation`).\n */\nfunction FrameSlot({\n layout,\n frameStyles,\n crossFadeAppearance,\n}: {\n layout: Layout3DDefinition;\n frameStyles: Frame3DStyleOverrides | undefined;\n crossFadeAppearance: boolean;\n}): React.JSX.Element {\n const appearance = useFrameAppearance(layout.scene.frameStyles, frameStyles);\n const navigation = useNavigationState();\n const zones = Object.keys(navigation.state.zones) as Array<keyof typeof navigation.state.zones>;\n const places = zones.map((zone) => {\n const top = navigation.getTopEntry(zone);\n return top ? (top.urlPath?.split(/[?#]/)[0] ?? top.id) : '';\n });\n const navigationSignature = places.some((place) => place !== '') ? zones.map((zone, index) => `${zone}:${places[index]}`).join('|') : '';\n return (\n <FrameCanvasDoor\n appearance={appearance}\n camera={layout.scene.camera}\n crossFadeAppearance={crossFadeAppearance}\n navigationTransition={layout.transitions.navigation}\n sidebarResizeTransition={layout.transitions.sidebarResize}\n zoneFocusTransition={layout.transitions.zoneFocus}\n navigationSignature={navigationSignature}\n focusedZone={navigation.focusedZone}\n />\n );\n}\n"]}
@@ -30,10 +30,14 @@ import { type Layout3DOptions } from './layout-3d-main-container';
30
30
  * `options.layout` selects the layout (`INHERIT_LAYOUT_3D` by default); `options.frameStyles` layers an
31
31
  * application's frame styles over the layout's own (per theme id, or for all themes).
32
32
  *
33
- * - **One layout per application.** A registration that finds a 3D container of a DIFFERENT layout already
34
- * registered refuses: an application is not 3D in two ways, and a silent replacement would hide which one it
35
- * is. The same layout again is idempotent. (A layout changed in code during a hot reload needs a full page
36
- * reload, because the registry outlives the hot reload.)
33
+ * - **One layout per application, 2D or 3D.** A registration that finds a layout container of a DIFFERENT layout
34
+ * already registered refuses — including a 2D layout registered with `registerShellLayout`: an application is
35
+ * laid out one way, and a silent replacement would hide which one it is. The same layout again is idempotent. (A
36
+ * layout changed in code during a hot reload needs a full page reload, because the registry outlives the hot
37
+ * reload.)
38
+ *
39
+ * It is `registerShellLayout` from `@wildo-ai/saas-frontend-lib` — the registration every layout family shares —
40
+ * with the 3D built-ins guarded and a container that adds the frame and the focal-plane settings.
37
41
  */
38
42
  export declare function register3DLayout(options?: Layout3DOptions): FrontendComponentRegistration;
39
43
  /** @wildo_source:part:end presets.3d.register-layout */
@@ -1 +1 @@
1
- {"version":3,"file":"register-3d-layout.d.ts","sourceRoot":"","sources":["../../src/register-3d-layout.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAE3G,OAAO,EAAkD,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAIlH,mIAAmI;AACnI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,eAAoB,GAAG,6BAA6B,CAiC7F;AACD,wDAAwD"}
1
+ {"version":3,"file":"register-3d-layout.d.ts","sourceRoot":"","sources":["../../src/register-3d-layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAEzH,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGzF,mIAAmI;AACnI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,eAAoB,GAAG,6BAA6B,CAO7F;AACD,wDAAwD"}
@@ -1,8 +1,6 @@
1
- import { CorePresetNames, FrontendComponentType } from '@wildo-ai/presets-components-models';
2
- import { ComponentRegistryService } from '@wildo-ai/saas-frontend-lib';
3
- import { create3DMainContainer, isLayout3DMainContainer } from './layout-3d-main-container.js';
1
+ import { registerShellLayout, ShellLayoutFamily } from '@wildo-ai/saas-frontend-lib';
2
+ import { create3DMainContainer } from './layout-3d-main-container.js';
4
3
  import { BUILT_IN_LAYOUTS_3D, INHERIT_LAYOUT_3D } from './layout/layout-3d-definition.js';
5
- import { Layout3DId } from './layout/layout-3d-vocabulary.js';
6
4
  /** @wildo_source:part:start presets.3d.register-layout facet:layer:frontend facet:family:layout-3d facet:audience:app-developer */
7
5
  /**
8
6
  * Make an application's signed-in shell 3D: the shell's regions — unchanged HTML, with all their contexts —
@@ -33,40 +31,22 @@ import { Layout3DId } from './layout/layout-3d-vocabulary.js';
33
31
  * `options.layout` selects the layout (`INHERIT_LAYOUT_3D` by default); `options.frameStyles` layers an
34
32
  * application's frame styles over the layout's own (per theme id, or for all themes).
35
33
  *
36
- * - **One layout per application.** A registration that finds a 3D container of a DIFFERENT layout already
37
- * registered refuses: an application is not 3D in two ways, and a silent replacement would hide which one it
38
- * is. The same layout again is idempotent. (A layout changed in code during a hot reload needs a full page
39
- * reload, because the registry outlives the hot reload.)
34
+ * - **One layout per application, 2D or 3D.** A registration that finds a layout container of a DIFFERENT layout
35
+ * already registered refuses — including a 2D layout registered with `registerShellLayout`: an application is
36
+ * laid out one way, and a silent replacement would hide which one it is. The same layout again is idempotent. (A
37
+ * layout changed in code during a hot reload needs a full page reload, because the registry outlives the hot
38
+ * reload.)
39
+ *
40
+ * It is `registerShellLayout` from `@wildo-ai/saas-frontend-lib` — the registration every layout family shares —
41
+ * with the 3D built-ins guarded and a container that adds the frame and the focal-plane settings.
40
42
  */
41
43
  export function register3DLayout(options = {}) {
42
- let capturedIsConfigurable = false;
43
- return {
44
- componentRef: FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER,
45
- preset: CorePresetNames.DEFAULT,
46
- get isConfigurable() {
47
- return capturedIsConfigurable;
48
- },
49
- loadComponent: async () => {
50
- const current = ComponentRegistryService.resolve(FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER, CorePresetNames.DEFAULT);
51
- if (!current) {
52
- throw new Error('register3DLayout(): no Default APP_LAYOUTS_MAIN_CONTAINER is registered to capture. Call it from the engine module\'s '
53
- + '`componentRegistrations`, which run after the framework presets — not from a module evaluated before them.');
54
- }
55
- const layout = options.layout ?? INHERIT_LAYOUT_3D;
56
- // An application's own layout may not borrow a built-in id: the one-layout check compares ids, and a borrowed
57
- // one would make two different layouts look like the same.
58
- if (Object.values(Layout3DId).includes(layout.id) && BUILT_IN_LAYOUTS_3D[layout.id] !== layout) {
59
- throw new Error(`register3DLayout(): the layout id '${layout.id}' belongs to a built-in layout; give the application's own layout an id of its own.`);
60
- }
61
- if (isLayout3DMainContainer(current) && current.layout.id !== layout.id) {
62
- throw new Error(`register3DLayout(): this application already registered the 3D layout '${current.layout.id}' and now asks for '${layout.id}'. `
63
- + 'An application uses one layout: remove the other registration — or, if you just changed the layout in code, '
64
- + 'reload the page (the component registry outlives a hot reload).');
65
- }
66
- capturedIsConfigurable = ComponentRegistryService.getMetadata(FrontendComponentType.APP_LAYOUTS_MAIN_CONTAINER, CorePresetNames.DEFAULT)?.isConfigurable ?? false;
67
- return create3DMainContainer(isLayout3DMainContainer(current) ? current.captured : current, options);
68
- },
69
- };
44
+ return registerShellLayout(options.layout ?? INHERIT_LAYOUT_3D, {
45
+ callerName: 'register3DLayout()',
46
+ family: ShellLayoutFamily.LAYOUT_3D,
47
+ builtInLayouts: BUILT_IN_LAYOUTS_3D,
48
+ createContainer: (captured, layout) => create3DMainContainer(captured, { ...options, layout }),
49
+ });
70
50
  }
71
51
  /** @wildo_source:part:end presets.3d.register-layout */
72
52
  //# sourceMappingURL=register-3d-layout.js.map