@spatial-elements/core 1.0.0-beta.11 → 1.0.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/catalog/stagedDockGeometry.js +2 -2
  2. package/dist/catalog/stagedDockGeometry.js.map +1 -1
  3. package/dist/spatial-element/SpatialElementDockController.d.ts +1 -2
  4. package/dist/spatial-element/SpatialElementDockController.d.ts.map +1 -1
  5. package/dist/spatial-element/SpatialElementDockController.js +13 -31
  6. package/dist/spatial-element/SpatialElementDockController.js.map +1 -1
  7. package/dist/spatial-element/SpatialElementHeaderFields.d.ts +18 -0
  8. package/dist/spatial-element/SpatialElementHeaderFields.d.ts.map +1 -0
  9. package/dist/spatial-element/SpatialElementHeaderFields.js +100 -0
  10. package/dist/spatial-element/SpatialElementHeaderFields.js.map +1 -0
  11. package/dist/spatial-element/SpatialElementPaneController.d.ts +0 -1
  12. package/dist/spatial-element/SpatialElementPaneController.d.ts.map +1 -1
  13. package/dist/spatial-element/SpatialElementPaneController.js +3 -7
  14. package/dist/spatial-element/SpatialElementPaneController.js.map +1 -1
  15. package/dist/spatial-element/messages.d.ts +1 -0
  16. package/dist/spatial-element/messages.d.ts.map +1 -1
  17. package/dist/spatial-element/messages.js +2 -1
  18. package/dist/spatial-element/messages.js.map +1 -1
  19. package/dist/spatial-element/spatialElementDock.d.ts +1 -1
  20. package/dist/spatial-element/spatialElementDock.js +1 -1
  21. package/dist/spatial-element/spatialElementDock.js.map +1 -1
  22. package/dist/stage/DetailWheelGesture.d.ts +9 -0
  23. package/dist/stage/DetailWheelGesture.d.ts.map +1 -0
  24. package/dist/stage/DetailWheelGesture.js +16 -0
  25. package/dist/stage/DetailWheelGesture.js.map +1 -0
  26. package/dist/stage/LiquidGlassPanel.d.ts +2 -0
  27. package/dist/stage/LiquidGlassPanel.d.ts.map +1 -1
  28. package/dist/stage/LiquidGlassPanel.js +24 -17
  29. package/dist/stage/LiquidGlassPanel.js.map +1 -1
  30. package/dist/stage/MinimapController.d.ts +1 -0
  31. package/dist/stage/MinimapController.d.ts.map +1 -1
  32. package/dist/stage/MinimapController.js +10 -4
  33. package/dist/stage/MinimapController.js.map +1 -1
  34. package/dist/stage/PanelPresentationController.d.ts.map +1 -1
  35. package/dist/stage/PanelPresentationController.js +18 -1
  36. package/dist/stage/PanelPresentationController.js.map +1 -1
  37. package/dist/stage/SpatialElementInteractionController.d.ts +21 -0
  38. package/dist/stage/SpatialElementInteractionController.d.ts.map +1 -1
  39. package/dist/stage/SpatialElementInteractionController.js +185 -16
  40. package/dist/stage/SpatialElementInteractionController.js.map +1 -1
  41. package/dist/stage/SpatialElementPresentationController.js +4 -4
  42. package/dist/stage/SpatialElementPresentationController.js.map +1 -1
  43. package/dist/stage/StageExperience.d.ts +8 -0
  44. package/dist/stage/StageExperience.d.ts.map +1 -1
  45. package/dist/stage/StageExperience.js +37 -21
  46. package/dist/stage/StageExperience.js.map +1 -1
  47. package/dist/stage/StageRenderPipeline.d.ts +4 -0
  48. package/dist/stage/StageRenderPipeline.d.ts.map +1 -1
  49. package/dist/stage/StageRenderPipeline.js +37 -3
  50. package/dist/stage/StageRenderPipeline.js.map +1 -1
  51. package/dist/stage/browserPinch.d.ts +5 -0
  52. package/dist/stage/browserPinch.d.ts.map +1 -0
  53. package/dist/stage/browserPinch.js +29 -0
  54. package/dist/stage/browserPinch.js.map +1 -0
  55. package/dist/stage/minimap/MinimapModelGeometry.d.ts +2 -0
  56. package/dist/stage/minimap/MinimapModelGeometry.d.ts.map +1 -1
  57. package/dist/stage/minimap/MinimapModelGeometry.js +28 -0
  58. package/dist/stage/minimap/MinimapModelGeometry.js.map +1 -1
  59. package/dist/stage/panelContext.d.ts +3 -1
  60. package/dist/stage/panelContext.d.ts.map +1 -1
  61. package/dist/stage/panelContext.js.map +1 -1
  62. package/dist/stage/panelFocusMath.d.ts +8 -0
  63. package/dist/stage/panelFocusMath.d.ts.map +1 -1
  64. package/dist/stage/panelFocusMath.js +12 -0
  65. package/dist/stage/panelFocusMath.js.map +1 -1
  66. package/dist/stage/spaceMousePermission.d.ts +2 -0
  67. package/dist/stage/spaceMousePermission.d.ts.map +1 -1
  68. package/dist/stage/spaceMousePermission.js +10 -4
  69. package/dist/stage/spaceMousePermission.js.map +1 -1
  70. package/dist/stage/spaceMousePlatform.d.ts +1 -1
  71. package/dist/stage/spaceMousePlatform.d.ts.map +1 -1
  72. package/dist/stage/spaceMousePlatform.js +7 -1
  73. package/dist/stage/spaceMousePlatform.js.map +1 -1
  74. package/dist/stage/stageMath.d.ts +2 -7
  75. package/dist/stage/stageMath.d.ts.map +1 -1
  76. package/dist/stage/stageMath.js +4 -9
  77. package/dist/stage/stageMath.js.map +1 -1
  78. package/dist/stage/stageTypes.d.ts +1 -0
  79. package/dist/stage/stageTypes.d.ts.map +1 -1
  80. package/dist/stage/stageTypes.js.map +1 -1
  81. package/dist/stage/stageVisualTest.d.ts +1 -0
  82. package/dist/stage/stageVisualTest.d.ts.map +1 -1
  83. package/dist/stage/stageVisualTest.js.map +1 -1
  84. package/package.json +1 -1
@@ -0,0 +1,100 @@
1
+ import { STAGE_PANEL_LAYOUT_EVENT, STAGE_PANEL_VISUAL_EVENT } from '../stage/panelContext.js';
2
+ import { STAGE_SCROLL_PRIORITY, subscribeStageScrollFrame } from '../stage/scrollFrame.js';
3
+ const FIELD = '[data-spatial-element-header-field]';
4
+ const ACTION = '[data-spatial-element-dock-action]';
5
+ /** Matches projected summary fields to their fixed-header copies, including the 3XL pane. */
6
+ export class SpatialElementHeaderFields {
7
+ root;
8
+ summary;
9
+ headers;
10
+ summaryFrame;
11
+ originalInert = new Map();
12
+ stopScroll;
13
+ observer;
14
+ frame = 0;
15
+ constructor(root) {
16
+ this.root = root;
17
+ // Retain nodes before the stage reparents projected content and the scroll header.
18
+ this.summary = root.querySelector('[data-spatial-element-hero-panel-content]');
19
+ this.summaryFrame = root.querySelector('[data-spatial-summary-aside]');
20
+ this.headers = Array.from(root.querySelectorAll('[data-spatial-element-handoff-header]'));
21
+ }
22
+ start() {
23
+ this.stopScroll = subscribeStageScrollFrame(this.update, STAGE_SCROLL_PRIORITY.stage + 1);
24
+ window.addEventListener(STAGE_PANEL_LAYOUT_EVENT, this.schedule);
25
+ window.addEventListener(STAGE_PANEL_VISUAL_EVENT, this.schedule);
26
+ this.observer = new ResizeObserver(this.schedule);
27
+ if (this.summary)
28
+ this.observer.observe(this.summary);
29
+ for (const header of this.headers)
30
+ this.observer.observe(header);
31
+ this.update();
32
+ }
33
+ destroy() {
34
+ this.stopScroll?.();
35
+ this.observer?.disconnect();
36
+ window.removeEventListener(STAGE_PANEL_LAYOUT_EVENT, this.schedule);
37
+ window.removeEventListener(STAGE_PANEL_VISUAL_EVENT, this.schedule);
38
+ cancelAnimationFrame(this.frame);
39
+ for (const [element, inert] of this.originalInert) {
40
+ element.inert = inert;
41
+ element.removeAttribute('data-header-field-visible');
42
+ }
43
+ }
44
+ schedule = () => {
45
+ if (!this.frame)
46
+ this.frame = requestAnimationFrame(() => { this.frame = 0; this.update(); });
47
+ };
48
+ update = () => {
49
+ if (!this.summary?.isConnected)
50
+ return;
51
+ const sources = new Map();
52
+ for (const field of this.summary.querySelectorAll(FIELD))
53
+ sources.set(field.dataset.spatialElementHeaderField, field);
54
+ const action = this.summary.querySelector('[data-catalog-rich-shared="primary-action"]');
55
+ if (action)
56
+ sources.set('primary-action', action);
57
+ // Read the actual projected boxes, after the stage has positioned its DOM.
58
+ // Cached document offsets drift with sticky panels, transfers and responsive reflow.
59
+ const bounds = new Map([...sources].map(([key, element]) => [key, element.getBoundingClientRect()]));
60
+ // Offscreen projected content is culled (display:none). Its live layout
61
+ // placeholder still tells us whether the entire panel has passed the header.
62
+ const summaryRect = this.summaryFrame?.getBoundingClientRect();
63
+ const covered = new Set();
64
+ const updates = [];
65
+ for (const header of this.headers) {
66
+ const pane = header.hasAttribute('data-spatial-detail-pane-header');
67
+ const active = pane ? this.root.hasAttribute('data-spatial-detail-pane')
68
+ : header.getAttribute('aria-hidden') === 'false';
69
+ const headerRect = header.getBoundingClientRect();
70
+ for (const target of header.querySelectorAll(`${FIELD}, ${ACTION}`)) {
71
+ const key = target.hasAttribute('data-spatial-element-dock-action') ? 'primary-action'
72
+ : target.dataset.spatialElementHeaderField;
73
+ const source = sources.get(key);
74
+ const rect = bounds.get(key);
75
+ const sourceRect = rect?.height ? rect : summaryRect;
76
+ const visible = active && headerRect.height > 0 && Boolean(source && sourceRect && sourceRect.height > 0 && (key === 'primary-action' && rect?.height
77
+ ? sourceRect.top + sourceRect.height / 2 < headerRect.bottom
78
+ : sourceRect.bottom <= headerRect.bottom));
79
+ updates.push({ target, visible });
80
+ if (active && source && sourceRect && sourceRect.bottom <= headerRect.bottom)
81
+ covered.add(source);
82
+ }
83
+ }
84
+ for (const { target, visible } of updates) {
85
+ this.setInert(target, !visible);
86
+ if (target.hasAttribute('data-header-field-visible') !== visible)
87
+ target.toggleAttribute('data-header-field-visible', visible);
88
+ }
89
+ for (const source of sources.values())
90
+ this.setInert(source, covered.has(source));
91
+ };
92
+ setInert(element, hidden) {
93
+ if (!this.originalInert.has(element))
94
+ this.originalInert.set(element, element.inert);
95
+ const inert = hidden || this.originalInert.get(element);
96
+ if (element.inert !== inert)
97
+ element.inert = inert;
98
+ }
99
+ }
100
+ //# sourceMappingURL=SpatialElementHeaderFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpatialElementHeaderFields.js","sourceRoot":"","sources":["../../src/spatial-element/SpatialElementHeaderFields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAE3F,MAAM,KAAK,GAAG,qCAAqC,CAAC;AACpD,MAAM,MAAM,GAAG,oCAAoC,CAAC;AAEpD,6FAA6F;AAC7F,MAAM,OAAO,0BAA0B;IA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,CAAC,GAAG,CAAC,OAAO,CAAE,CAAC;QACzD,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK;YAAE,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IACpD,CAAC;CACD","sourcesContent":["import { STAGE_PANEL_LAYOUT_EVENT, STAGE_PANEL_VISUAL_EVENT } from '../stage/panelContext.js';\nimport { STAGE_SCROLL_PRIORITY, subscribeStageScrollFrame } from '../stage/scrollFrame.js';\n\nconst FIELD = '[data-spatial-element-header-field]';\nconst ACTION = '[data-spatial-element-dock-action]';\n\n/** Matches projected summary fields to their fixed-header copies, including the 3XL pane. */\nexport class SpatialElementHeaderFields {\n\tprivate readonly summary: HTMLElement | null;\n\tprivate readonly headers: HTMLElement[];\n\tprivate readonly summaryFrame: HTMLElement | null;\n\tprivate readonly originalInert = new Map<HTMLElement, boolean>();\n\tprivate stopScroll?: () => void;\n\tprivate observer?: ResizeObserver;\n\tprivate frame = 0;\n\n\tconstructor(private readonly root: HTMLElement) {\n\t\t// Retain nodes before the stage reparents projected content and the scroll header.\n\t\tthis.summary = root.querySelector('[data-spatial-element-hero-panel-content]');\n\t\tthis.summaryFrame = root.querySelector('[data-spatial-summary-aside]');\n\t\tthis.headers = Array.from(root.querySelectorAll('[data-spatial-element-handoff-header]'));\n\t}\n\n\tstart() {\n\t\tthis.stopScroll = subscribeStageScrollFrame(this.update, STAGE_SCROLL_PRIORITY.stage + 1);\n\t\twindow.addEventListener(STAGE_PANEL_LAYOUT_EVENT, this.schedule);\n\t\twindow.addEventListener(STAGE_PANEL_VISUAL_EVENT, this.schedule);\n\t\tthis.observer = new ResizeObserver(this.schedule);\n\t\tif (this.summary) this.observer.observe(this.summary);\n\t\tfor (const header of this.headers) this.observer.observe(header);\n\t\tthis.update();\n\t}\n\n\tdestroy() {\n\t\tthis.stopScroll?.();\n\t\tthis.observer?.disconnect();\n\t\twindow.removeEventListener(STAGE_PANEL_LAYOUT_EVENT, this.schedule);\n\t\twindow.removeEventListener(STAGE_PANEL_VISUAL_EVENT, this.schedule);\n\t\tcancelAnimationFrame(this.frame);\n\t\tfor (const [element, inert] of this.originalInert) {\n\t\t\telement.inert = inert;\n\t\t\telement.removeAttribute('data-header-field-visible');\n\t\t}\n\t}\n\n\tprivate readonly schedule = () => {\n\t\tif (!this.frame) this.frame = requestAnimationFrame(() => { this.frame = 0; this.update(); });\n\t};\n\n\tprivate readonly update = () => {\n\t\tif (!this.summary?.isConnected) return;\n\t\tconst sources = new Map<string, HTMLElement>();\n\t\tfor (const field of this.summary.querySelectorAll<HTMLElement>(FIELD))\n\t\t\tsources.set(field.dataset.spatialElementHeaderField!, field);\n\t\tconst action = this.summary.querySelector<HTMLElement>('[data-catalog-rich-shared=\"primary-action\"]');\n\t\tif (action) sources.set('primary-action', action);\n\t\t// Read the actual projected boxes, after the stage has positioned its DOM.\n\t\t// Cached document offsets drift with sticky panels, transfers and responsive reflow.\n\t\tconst bounds = new Map([...sources].map(([key, element]) => [key, element.getBoundingClientRect()]));\n\t\t// Offscreen projected content is culled (display:none). Its live layout\n\t\t// placeholder still tells us whether the entire panel has passed the header.\n\t\tconst summaryRect = this.summaryFrame?.getBoundingClientRect();\n\t\tconst covered = new Set<HTMLElement>();\n\t\tconst updates: { target: HTMLElement; visible: boolean }[] = [];\n\t\tfor (const header of this.headers) {\n\t\t\tconst pane = header.hasAttribute('data-spatial-detail-pane-header');\n\t\t\tconst active = pane ? this.root.hasAttribute('data-spatial-detail-pane')\n\t\t\t\t: header.getAttribute('aria-hidden') === 'false';\n\t\t\tconst headerRect = header.getBoundingClientRect();\n\t\t\tfor (const target of header.querySelectorAll<HTMLElement>(`${FIELD}, ${ACTION}`)) {\n\t\t\t\tconst key = target.hasAttribute('data-spatial-element-dock-action') ? 'primary-action'\n\t\t\t\t\t: target.dataset.spatialElementHeaderField!;\n\t\t\t\tconst source = sources.get(key);\n\t\t\t\tconst rect = bounds.get(key);\n\t\t\t\tconst sourceRect = rect?.height ? rect : summaryRect;\n\t\t\t\tconst visible = active && headerRect.height > 0 && Boolean(source && sourceRect && sourceRect.height > 0 && (key === 'primary-action' && rect?.height\n\t\t\t\t\t? sourceRect.top + sourceRect.height / 2 < headerRect.bottom\n\t\t\t\t\t: sourceRect.bottom <= headerRect.bottom));\n\t\t\t\tupdates.push({ target, visible });\n\t\t\t\tif (active && source && sourceRect && sourceRect.bottom <= headerRect.bottom) covered.add(source);\n\t\t\t}\n\t\t}\n\t\tfor (const { target, visible } of updates) {\n\t\t\tthis.setInert(target, !visible);\n\t\t\tif (target.hasAttribute('data-header-field-visible') !== visible)\n\t\t\t\ttarget.toggleAttribute('data-header-field-visible', visible);\n\t\t}\n\t\tfor (const source of sources.values()) this.setInert(source, covered.has(source));\n\t};\n\n\tprivate setInert(element: HTMLElement, hidden: boolean) {\n\t\tif (!this.originalInert.has(element)) this.originalInert.set(element, element.inert);\n\t\tconst inert = hidden || this.originalInert.get(element)!;\n\t\tif (element.inert !== inert) element.inert = inert;\n\t}\n}\n"]}
@@ -43,7 +43,6 @@ export declare class SpatialElementPaneController {
43
43
  private focus;
44
44
  private focusPose;
45
45
  private savedScroll?;
46
- private actionBottom;
47
46
  private sectionPositions;
48
47
  private restoreAnchor?;
49
48
  private resizeAnchor?;
@@ -1 +1 @@
1
- {"version":3,"file":"SpatialElementPaneController.d.ts","sourceRoot":"","sources":["../../src/spatial-element/SpatialElementPaneController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAMxF,oFAAoF;AACpF,wBAAgB,4BAA4B,CAAC,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACzG,QAAQ,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,MAAM;;;;;;;EA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ElementPaneController {
45
45
  focus = 0;
46
46
  focusPose = { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };
47
47
  savedScroll;
48
- actionBottom = Infinity;
49
48
  sectionPositions = [];
50
49
  restoreAnchor;
51
50
  resizeAnchor;
@@ -88,7 +87,7 @@ export class SpatialElementPaneController {
88
87
  this.savedScroll = { x: window.scrollX, y: window.scrollY };
89
88
  this.root.toggleAttribute('data-spatial-detail-pane-hidden', hidden);
90
89
  for (const region of this.hiddenRegions)
91
- region.inert = hidden && this.layout?.composition === 'split';
90
+ region.inert = hidden;
92
91
  if (!hidden && this.savedScroll) {
93
92
  window.scrollTo({ left: this.savedScroll.x, top: this.savedScroll.y, behavior: 'instant' });
94
93
  syncStageScrollToNative();
@@ -151,7 +150,7 @@ export class SpatialElementPaneController {
151
150
  for (const region of this.regions)
152
151
  region.toggleAttribute('data-stage-fixed-region', split);
153
152
  for (const region of this.hiddenRegions)
154
- region.inert = split && this.hidden;
153
+ region.inert = this.hidden;
155
154
  this.onMode(split);
156
155
  // The framework flushes the native summary ownership before its new box is measured.
157
156
  this.schedule();
@@ -165,8 +164,6 @@ export class SpatialElementPaneController {
165
164
  this.bodyHeight = rect.height / this.focusPose.scale;
166
165
  this.sectionPositions = Array.from(this.body.querySelectorAll('[data-spatial-element-tab-target]'))
167
166
  .map(element => ({ element, top: this.neutralY(element.getBoundingClientRect().top) + this.scrollY }));
168
- const action = this.body.querySelector('[data-catalog-rich-shared="primary-action"]');
169
- this.actionBottom = action ? this.neutralY(action.getBoundingClientRect().bottom) + this.scrollY : Infinity;
170
167
  this.readingTop = this.layout?.pane?.body.y ?? (Number.parseFloat(getComputedStyle(this.root).getPropertyValue('--spatial-element-section-scroll-offset')) || 0);
171
168
  const summaryReady = this.layout?.composition !== 'split' || Boolean(this.body.querySelector('[data-spatial-summary-root]'));
172
169
  if (!metricsChanged && !bodyHeightChanged && summaryReady && this.restoreAnchor && this.restoreAnchor.element.isConnected) {
@@ -196,7 +193,6 @@ export class SpatialElementPaneController {
196
193
  const clip = resolvePaneScrollClip(this.bodyTop, this.bodyHeight, pane.body.y, pane.body.y + pane.body.height, this.scrollY);
197
194
  this.body.style.clipPath = `inset(${clip.top}px 0 ${clip.bottom}px 0 round 0 0 var(--spatial-element-panel-radius) var(--spatial-element-panel-radius))`;
198
195
  this.root.toggleAttribute('data-spatial-detail-pane-clipped', true);
199
- this.root.toggleAttribute('data-spatial-detail-pane-action', this.actionBottom - this.scrollY <= pane.body.y);
200
196
  }
201
197
  /** Measurements remain in document coordinates while the pane moves in paint. */
202
198
  neutralY(y) {
@@ -210,7 +206,7 @@ export class SpatialElementPaneController {
210
206
  : { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };
211
207
  const pose = this.focusPose;
212
208
  this.root.toggleAttribute('data-spatial-detail-pane-zooming', Boolean(pane && this.focus > 0.001));
213
- this.setHidden(Boolean(pane && pose.opacity < 0.12));
209
+ this.setHidden(getPanelFocusOpacity(this.focus) < 0.12);
214
210
  const values = { '--spatial-pane-focus-x': `${pose.x}px`, '--spatial-pane-focus-y': `${pose.y}px`,
215
211
  '--spatial-pane-focus-scale': String(pose.scale), '--spatial-pane-focus-opacity': String(pose.opacity),
216
212
  '--spatial-pane-focus-blur': `${pose.blur}px` };
@@ -1 +1 @@
1
- {"version":3,"file":"SpatialElementPaneController.js","sourceRoot":"","sources":["../../src/spatial-element/SpatialElementPaneController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClJ,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAClK,OAAO,E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M,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,CAAC,MAAM,YAAY,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC;YAAE,OAAO;QAC7E,MAAM,IAAI,GAAG,MAAM,CAAC,qBAAqB,EAAE,CAAC;QAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,QAAQ,CAAC,CAAC;QAC1F,IAAI,IAAI,CAAC,GAAG,IAAI,QAAQ,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,MAAM;YAAE,OAAO;QAC5D,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3J,CAAC,CAAC;CACF","sourcesContent":["import { resolveDetailLayout, type ResponsiveLayoutInput } from './responsiveLayout.js';\nimport { STAGE_PANEL_LAYOUT_EVENT } from '../stage/panelContext.js';\nimport { getStageVisualScrollPosition, STAGE_SCROLL_PRIORITY, subscribeStageScrollFrame, syncStageScrollToNative } from '../stage/scrollFrame.js';\nimport { getPanelFocusBlur, getPanelFocusOffset, getPanelFocusOpacity, getPanelFocusPerspectiveOffset, getPerspectiveDistance } from '../stage/panelFocusMath.js';\nimport { PANEL_CAMERA_FOV, PANEL_FOCUS_PERSPECTIVE_MAX_SCALE } from '../stage/stageConstants.js';\n\n/** The native pane uses the same focus curve and camera-facing motion as panels. */\nexport function resolvePaneFocusPresentation(rect: { x: number; y: number; width: number; height: number },\n\tviewport: { width: number; height: number }, focus: number) {\n\tconst position = { x: rect.x + rect.width / 2 - viewport.width / 2,\n\t\ty: viewport.height / 2 - rect.y - rect.height / 2 };\n\tconst options = { width: rect.width, height: rect.height, position };\n\tconst offset = getPanelFocusOffset(options, focus, viewport.width, viewport.height);\n\tconst distance = getPerspectiveDistance(viewport.height, PANEL_CAMERA_FOV);\n\tconst perspective = getPanelFocusPerspectiveOffset({ x: position.x + offset.x, y: position.y + offset.y }, offset.z, distance);\n\treturn { x: offset.x + perspective.x, y: -offset.y - perspective.y,\n\t\tscale: Math.min(PANEL_FOCUS_PERSPECTIVE_MAX_SCALE, Math.max(1, distance / Math.max(distance - offset.z, 1))),\n\t\topacity: getPanelFocusOpacity(focus), blur: getPanelFocusBlur(focus, options),\n\t\tpivotY: rect.y + rect.height / 2 };\n}\n\n/** One document coordinate system; clipping changes paint and hit testing only. */\nexport function resolvePaneScrollClip(bodyTop: number, bodyHeight: number, viewportTop: number, viewportBottom: number, scrollY: number) {\n\treturn {\n\t\ttop: Math.max(0, scrollY + viewportTop - bodyTop),\n\t\tbottom: Math.max(0, bodyTop + bodyHeight - scrollY - viewportBottom)\n\t};\n}\n\n/** Keeps fixed 3XL regions and the ordinary document body on the Stage scroll clock. */\nexport class SpatialElementPaneController {\n\tprivate body?: HTMLElement;\n\tprivate stage?: HTMLElement;\n\tprivate regions: HTMLElement[] = [];\n\tprivate hiddenRegions: HTMLElement[] = [];\n\tprivate observer?: ResizeObserver;\n\tprivate stageObserver?: MutationObserver;\n\tprivate stopScroll?: () => void;\n\tprivate frame = 0;\n\tprivate layout?: ReturnType<typeof resolveDetailLayout>;\n\tprivate metricKey = '';\n\tprivate bodyTop = 0;\n\tprivate bodyHeight = 0;\n\tprivate scrollY = 0;\n\tprivate hidden = false;\n\tprivate focus = 0;\n\tprivate focusPose = { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };\n\tprivate savedScroll?: { x: number; y: number };\n\tprivate actionBottom = Infinity;\n\tprivate sectionPositions: { element: HTMLElement; top: number }[] = [];\n\tprivate restoreAnchor?: { element: HTMLElement; offset: number };\n\tprivate resizeAnchor?: { element: HTMLElement; offset: number };\n\tprivate readingTop = 0;\n\tprivate started = false;\n\n\tconstructor(private readonly root: HTMLElement,\n\t\tprivate readonly readMetrics: () => ResponsiveLayoutInput | undefined,\n\t\tprivate readonly onMode: (split: boolean) => void) {}\n\n\tstart() {\n\t\tif (this.started) return;\n\t\tthis.started = true;\n\t\tthis.stage = this.root.closest<HTMLElement>('.stage') ?? undefined;\n\t\tthis.body = this.root.querySelector<HTMLElement>('[data-spatial-detail-pane-body]') ?? undefined;\n\t\tthis.regions = Array.from(this.root.querySelectorAll<HTMLElement>('[data-spatial-detail-fixed]'));\n\t\tthis.hiddenRegions = Array.from(this.root.querySelectorAll<HTMLElement>('[data-spatial-detail-pane-body], [data-spatial-detail-pane-header], [data-spatial-detail-pane-submenu-shell]'));\n\t\tthis.scrollY = getStageVisualScrollPosition().scrollY;\n\t\tthis.observer = new ResizeObserver(this.schedule);\n\t\tif (this.body) this.observer.observe(this.body);\n\t\tthis.stageObserver = new MutationObserver(this.schedule);\n\t\tif (this.stage) this.stageObserver.observe(this.stage, { attributes: true, attributeFilter: ['class'] });\n\t\twindow.addEventListener(STAGE_PANEL_LAYOUT_EVENT, this.schedule);\n\t\twindow.addEventListener('resize', this.handleResize, { passive: true });\n\t\tthis.root.addEventListener('focusin', this.handleFocus);\n\t\tthis.stopScroll = subscribeStageScrollFrame(frame => {\n\t\t\tthis.scrollY = frame.scrollY;\n\t\t\tthis.paint();\n\t\t}, STAGE_SCROLL_PRIORITY.virtualDocument + 2);\n\t\tthis.update();\n\t}\n\n\tsetHidden(hidden: boolean) {\n\t\tif (this.hidden === hidden) return;\n\t\tthis.hidden = hidden;\n\t\tif (hidden && this.layout?.composition === 'split') this.savedScroll = { x: window.scrollX, y: window.scrollY };\n\t\tthis.root.toggleAttribute('data-spatial-detail-pane-hidden', hidden);\n\t\tfor (const region of this.hiddenRegions) region.inert = hidden && this.layout?.composition === 'split';\n\t\tif (!hidden && this.savedScroll) {\n\t\t\twindow.scrollTo({ left: this.savedScroll.x, top: this.savedScroll.y, behavior: 'instant' });\n\t\t\tsyncStageScrollToNative();\n\t\t\tthis.savedScroll = undefined;\n\t\t}\n\t}\n\n\tsetFocus(focus: number, fullscreen = false) {\n\t\tthis.focus = fullscreen ? 1 : Math.max(0, Math.min(1, Number.isFinite(focus) ? focus : 0));\n\t\tthis.paintFocus();\n\t}\n\n\tdestroy() {\n\t\tthis.started = false;\n\t\tthis.stopScroll?.();\n\t\tthis.observer?.disconnect();\n\t\tthis.stageObserver?.disconnect();\n\t\tcancelAnimationFrame(this.frame);\n\t\twindow.removeEventListener(STAGE_PANEL_LAYOUT_EVENT, this.schedule);\n\t\twindow.removeEventListener('resize', this.handleResize);\n\t\tthis.root.removeEventListener('focusin', this.handleFocus);\n\t\tfor (const region of this.regions) region.removeAttribute('data-stage-fixed-region');\n\t}\n\n\tprivate readonly schedule = () => {\n\t\tif (!this.started || this.frame) return;\n\t\tthis.frame = requestAnimationFrame(() => { this.frame = 0; this.update(); });\n\t};\n\n\tprivate readAnchor() {\n\t\tconst anchor = this.sectionPositions.filter(item => item.top <= this.scrollY + this.readingTop + 1).at(-1);\n\t\treturn anchor ? { element: anchor.element, offset: this.scrollY + this.readingTop - anchor.top } : undefined;\n\t}\n\n\tprivate readonly handleResize = () => {\n\t\t// CSS reflows before the shared viewport probe's next frame. Preserve the\n\t\t// last stable document anchor now, before any observer can cache new boxes\n\t\t// against old metrics. Keep it across consecutive breakpoint crossings.\n\t\tthis.resizeAnchor ??= this.restoreAnchor ?? this.readAnchor();\n\t\tthis.schedule();\n\t};\n\n\tprivate update() {\n\t\tconst metrics = this.readMetrics();\n\t\tif (!metrics || !this.body) return;\n\t\tif (!this.stage?.classList.contains('stage-virtual-scroll-active')) this.scrollY = window.scrollY;\n\t\tconst key = JSON.stringify(metrics);\n\t\tconst metricsChanged = key !== this.metricKey;\n\t\tif (key !== this.metricKey) {\n\t\t\tconst previous = this.layout;\n\t\t\tconst next = resolveDetailLayout(metrics);\n\t\t\tif (previous && previous.composition !== next.composition && this.scrollY > 1) {\n\t\t\t\tthis.restoreAnchor = this.resizeAnchor ?? this.restoreAnchor ?? this.readAnchor();\n\t\t\t}\n\t\t\tif (!this.restoreAnchor) this.resizeAnchor = undefined;\n\t\t\tthis.metricKey = key;\n\t\t\tthis.layout = next;\n\t\t\tconst split = next.composition === 'split';\n\t\t\tthis.root.toggleAttribute('data-spatial-detail-pane', split);\n\t\t\tthis.root.toggleAttribute('data-spatial-detail-flow', next.shortHeightFallback);\n\t\t\tfor (const region of this.regions) region.toggleAttribute('data-stage-fixed-region', split);\n\t\t\tfor (const region of this.hiddenRegions) region.inert = split && this.hidden;\n\t\t\tthis.onMode(split);\n\t\t\t// The framework flushes the native summary ownership before its new box is measured.\n\t\t\tthis.schedule();\n\t\t}\n\t\tconst rect = this.body.getBoundingClientRect();\n\t\t// A breakpoint can remove the paint transform before this resize callback.\n\t\tif (this.layout?.composition !== 'split') this.focusPose = { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };\n\t\tconst bodyHeightChanged = Math.abs(this.bodyHeight - rect.height / this.focusPose.scale) > 0.5;\n\t\tthis.bodyTop = this.neutralY(rect.top) + this.scrollY;\n\t\tthis.bodyHeight = rect.height / this.focusPose.scale;\n\t\tthis.sectionPositions = Array.from(this.body.querySelectorAll<HTMLElement>('[data-spatial-element-tab-target]'))\n\t\t\t.map(element => ({ element, top: this.neutralY(element.getBoundingClientRect().top) + this.scrollY }));\n\t\tconst action = this.body.querySelector<HTMLElement>('[data-catalog-rich-shared=\"primary-action\"]');\n\t\tthis.actionBottom = action ? this.neutralY(action.getBoundingClientRect().bottom) + this.scrollY : Infinity;\n\t\tthis.readingTop = this.layout?.pane?.body.y ?? (Number.parseFloat(getComputedStyle(this.root).getPropertyValue('--spatial-element-section-scroll-offset')) || 0);\n\t\tconst summaryReady = this.layout?.composition !== 'split' || Boolean(this.body.querySelector('[data-spatial-summary-root]'));\n\t\tif (!metricsChanged && !bodyHeightChanged && summaryReady && this.restoreAnchor && this.restoreAnchor.element.isConnected) {\n\t\t\tconst anchor = this.restoreAnchor;\n\t\t\tthis.restoreAnchor = undefined;\n\t\t\tthis.resizeAnchor = undefined;\n\t\t\tconst y = Math.max(0, this.neutralY(anchor.element.getBoundingClientRect().top) + this.scrollY + anchor.offset - this.readingTop);\n\t\t\twindow.scrollTo({ top: y, behavior: 'instant' });\n\t\t\tsyncStageScrollToNative();\n\t\t\tthis.scrollY = getStageVisualScrollPosition().scrollY;\n\t\t}\n\t\tif (this.restoreAnchor) this.schedule();\n\t\tthis.paint();\n\t}\n\n\tprivate paint() {\n\t\tthis.paintFocus();\n\t\tconst pane = this.layout?.pane;\n\t\tif (!pane || !this.body) {\n\t\t\tthis.root.removeAttribute('data-spatial-detail-pane-clipped');\n\t\t\tthis.body?.style.removeProperty('clip-path');\n\t\t\tthis.root.style.removeProperty('--spatial-pane-fixed-compensation');\n\t\t\treturn;\n\t\t}\n\t\tconst enhanced = this.stage?.classList.contains('stage-virtual-scroll-active');\n\t\tthis.root.style.setProperty('--spatial-pane-fixed-compensation', `${enhanced ? this.scrollY : 0}px`);\n\t\tconst clip = resolvePaneScrollClip(this.bodyTop, this.bodyHeight, pane.body.y, pane.body.y + pane.body.height, this.scrollY);\n\t\tthis.body.style.clipPath = `inset(${clip.top}px 0 ${clip.bottom}px 0 round 0 0 var(--spatial-element-panel-radius) var(--spatial-element-panel-radius))`;\n\t\tthis.root.toggleAttribute('data-spatial-detail-pane-clipped', true);\n\t\tthis.root.toggleAttribute('data-spatial-detail-pane-action', this.actionBottom - this.scrollY <= pane.body.y);\n\t}\n\n\t/** Measurements remain in document coordinates while the pane moves in paint. */\n\tprivate neutralY(y: number) {\n\t\tconst { scale, pivotY, y: offset } = this.focusPose;\n\t\treturn pivotY + (y - pivotY - offset) / scale;\n\t}\n\n\tprivate paintFocus() {\n\t\tconst pane = this.layout?.pane;\n\t\tconst metrics = this.readMetrics();\n\t\tthis.focusPose = pane && metrics ? resolvePaneFocusPresentation(pane.surface, metrics, this.focus)\n\t\t\t: { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };\n\t\tconst pose = this.focusPose;\n\t\tthis.root.toggleAttribute('data-spatial-detail-pane-zooming', Boolean(pane && this.focus > 0.001));\n\t\tthis.setHidden(Boolean(pane && pose.opacity < 0.12));\n\t\tconst values = { '--spatial-pane-focus-x': `${pose.x}px`, '--spatial-pane-focus-y': `${pose.y}px`,\n\t\t\t'--spatial-pane-focus-scale': String(pose.scale), '--spatial-pane-focus-opacity': String(pose.opacity),\n\t\t\t'--spatial-pane-focus-blur': `${pose.blur}px` };\n\t\tfor (const [name, value] of Object.entries(values)) {\n\t\t\tif (this.root.style.getPropertyValue(name) !== value) this.root.style.setProperty(name, value);\n\t\t}\n\t\tif (!pane || !this.body) return;\n\t\tthis.body.style.setProperty('--spatial-pane-focus-origin-y', `${pose.pivotY - this.bodyTop + this.scrollY}px`);\n\t\tfor (const region of this.regions) {\n\t\t\tconst top = region.hasAttribute('data-spatial-detail-pane-submenu-shell') ? this.layout!.submenu!.y\n\t\t\t\t: region.hasAttribute('data-spatial-detail-pane-header') || region.hasAttribute('data-spatial-detail-pane-surface') ? pane.surface.y : undefined;\n\t\t\tif (top !== undefined) region.style.setProperty('--spatial-pane-focus-origin-y', `${pose.pivotY - top}px`);\n\t\t}\n\t}\n\n\tprivate readonly handleFocus = (event: FocusEvent) => {\n\t\t// VirtualScrollController owns the enhanced path; native DOM uses identical bounds.\n\t\tif (!this.layout?.pane || this.hidden || this.stage?.classList.contains('stage-virtual-scroll-active')) return;\n\t\tconst target = event.target;\n\t\tif (!(target instanceof HTMLElement) || !this.body?.contains(target)) return;\n\t\tconst rect = target.getBoundingClientRect();\n\t\tconst viewport = this.layout.pane.body;\n\t\tconst bottom = Math.min(viewport.y + viewport.height, this.layout.submenu?.y ?? Infinity);\n\t\tif (rect.top >= viewport.y && rect.bottom <= bottom) return;\n\t\twindow.scrollTo({ top: Math.max(0, window.scrollY + rect.top - viewport.y - Math.max(0, (bottom - viewport.y - rect.height) / 2)), behavior: 'instant' });\n\t};\n}\n"]}
1
+ {"version":3,"file":"SpatialElementPaneController.js","sourceRoot":"","sources":["../../src/spatial-element/SpatialElementPaneController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClJ,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAClK,OAAO,EAAE,gBAAgB,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAEjG,oFAAoF;AACpF,MAAM,UAAU,4BAA4B,CAAC,IAA6D,EACzG,QAA2C,EAAE,KAAa;IAC1D,MAAM,QAAQ,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,GAAG,QAAQ,CAAC,KAAK,GAAG,CAAC;QACjE,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;IACrD,MAAM,OAAO,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAA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VENT } from '../stage/panelContext.js';\nimport { getStageVisualScrollPosition, STAGE_SCROLL_PRIORITY, subscribeStageScrollFrame, syncStageScrollToNative } from '../stage/scrollFrame.js';\nimport { getPanelFocusBlur, getPanelFocusOffset, getPanelFocusOpacity, getPanelFocusPerspectiveOffset, getPerspectiveDistance } from '../stage/panelFocusMath.js';\nimport { PANEL_CAMERA_FOV, PANEL_FOCUS_PERSPECTIVE_MAX_SCALE } from '../stage/stageConstants.js';\n\n/** The native pane uses the same focus curve and camera-facing motion as panels. */\nexport function resolvePaneFocusPresentation(rect: { x: number; y: number; width: number; height: number },\n\tviewport: { width: number; height: number }, focus: number) {\n\tconst position = { x: rect.x + rect.width / 2 - viewport.width / 2,\n\t\ty: viewport.height / 2 - rect.y - rect.height / 2 };\n\tconst options = { width: rect.width, height: rect.height, position };\n\tconst offset = getPanelFocusOffset(options, focus, viewport.width, viewport.height);\n\tconst distance = getPerspectiveDistance(viewport.height, PANEL_CAMERA_FOV);\n\tconst perspective = getPanelFocusPerspectiveOffset({ x: position.x + offset.x, y: position.y + offset.y }, offset.z, distance);\n\treturn { x: offset.x + perspective.x, y: -offset.y - perspective.y,\n\t\tscale: Math.min(PANEL_FOCUS_PERSPECTIVE_MAX_SCALE, Math.max(1, distance / Math.max(distance - offset.z, 1))),\n\t\topacity: getPanelFocusOpacity(focus), blur: getPanelFocusBlur(focus, options),\n\t\tpivotY: rect.y + rect.height / 2 };\n}\n\n/** One document coordinate system; clipping changes paint and hit testing only. */\nexport function resolvePaneScrollClip(bodyTop: number, bodyHeight: number, viewportTop: number, viewportBottom: number, scrollY: number) {\n\treturn {\n\t\ttop: Math.max(0, scrollY + viewportTop - bodyTop),\n\t\tbottom: Math.max(0, bodyTop + bodyHeight - scrollY - viewportBottom)\n\t};\n}\n\n/** Keeps fixed 3XL regions and the ordinary document body on the Stage scroll clock. */\nexport class SpatialElementPaneController {\n\tprivate body?: HTMLElement;\n\tprivate stage?: HTMLElement;\n\tprivate regions: HTMLElement[] = [];\n\tprivate hiddenRegions: HTMLElement[] = [];\n\tprivate observer?: ResizeObserver;\n\tprivate stageObserver?: MutationObserver;\n\tprivate stopScroll?: () => void;\n\tprivate frame = 0;\n\tprivate layout?: ReturnType<typeof resolveDetailLayout>;\n\tprivate metricKey = '';\n\tprivate bodyTop = 0;\n\tprivate bodyHeight = 0;\n\tprivate scrollY = 0;\n\tprivate hidden = false;\n\tprivate focus = 0;\n\tprivate focusPose = { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };\n\tprivate savedScroll?: { x: number; y: number };\n\tprivate sectionPositions: { element: HTMLElement; top: number }[] = [];\n\tprivate restoreAnchor?: { element: HTMLElement; offset: number };\n\tprivate resizeAnchor?: { element: HTMLElement; offset: number };\n\tprivate readingTop = 0;\n\tprivate started = false;\n\n\tconstructor(private readonly root: HTMLElement,\n\t\tprivate readonly readMetrics: () => ResponsiveLayoutInput | undefined,\n\t\tprivate readonly onMode: (split: boolean) => void) {}\n\n\tstart() {\n\t\tif (this.started) return;\n\t\tthis.started = true;\n\t\tthis.stage = this.root.closest<HTMLElement>('.stage') ?? undefined;\n\t\tthis.body = this.root.querySelector<HTMLElement>('[data-spatial-detail-pane-body]') ?? undefined;\n\t\tthis.regions = Array.from(this.root.querySelectorAll<HTMLElement>('[data-spatial-detail-fixed]'));\n\t\tthis.hiddenRegions = Array.from(this.root.querySelectorAll<HTMLElement>('[data-spatial-detail-pane-body], [data-spatial-detail-pane-header], [data-spatial-detail-pane-submenu-shell]'));\n\t\tthis.scrollY = getStageVisualScrollPosition().scrollY;\n\t\tthis.observer = new ResizeObserver(this.schedule);\n\t\tif (this.body) this.observer.observe(this.body);\n\t\tthis.stageObserver = new MutationObserver(this.schedule);\n\t\tif (this.stage) this.stageObserver.observe(this.stage, { attributes: true, attributeFilter: ['class'] });\n\t\twindow.addEventListener(STAGE_PANEL_LAYOUT_EVENT, this.schedule);\n\t\twindow.addEventListener('resize', this.handleResize, { passive: true });\n\t\tthis.root.addEventListener('focusin', this.handleFocus);\n\t\tthis.stopScroll = subscribeStageScrollFrame(frame => {\n\t\t\tthis.scrollY = frame.scrollY;\n\t\t\tthis.paint();\n\t\t}, STAGE_SCROLL_PRIORITY.virtualDocument + 2);\n\t\tthis.update();\n\t}\n\n\tsetHidden(hidden: boolean) {\n\t\tif (this.hidden === hidden) return;\n\t\tthis.hidden = hidden;\n\t\tif (hidden && this.layout?.composition === 'split') this.savedScroll = { x: window.scrollX, y: window.scrollY };\n\t\tthis.root.toggleAttribute('data-spatial-detail-pane-hidden', hidden);\n\t\tfor (const region of this.hiddenRegions) region.inert = hidden;\n\t\tif (!hidden && this.savedScroll) {\n\t\t\twindow.scrollTo({ left: this.savedScroll.x, top: this.savedScroll.y, behavior: 'instant' });\n\t\t\tsyncStageScrollToNative();\n\t\t\tthis.savedScroll = undefined;\n\t\t}\n\t}\n\n\tsetFocus(focus: number, fullscreen = false) {\n\t\tthis.focus = fullscreen ? 1 : Math.max(0, Math.min(1, Number.isFinite(focus) ? focus : 0));\n\t\tthis.paintFocus();\n\t}\n\n\tdestroy() {\n\t\tthis.started = false;\n\t\tthis.stopScroll?.();\n\t\tthis.observer?.disconnect();\n\t\tthis.stageObserver?.disconnect();\n\t\tcancelAnimationFrame(this.frame);\n\t\twindow.removeEventListener(STAGE_PANEL_LAYOUT_EVENT, this.schedule);\n\t\twindow.removeEventListener('resize', this.handleResize);\n\t\tthis.root.removeEventListener('focusin', this.handleFocus);\n\t\tfor (const region of this.regions) region.removeAttribute('data-stage-fixed-region');\n\t}\n\n\tprivate readonly schedule = () => {\n\t\tif (!this.started || this.frame) return;\n\t\tthis.frame = requestAnimationFrame(() => { this.frame = 0; this.update(); });\n\t};\n\n\tprivate readAnchor() {\n\t\tconst anchor = this.sectionPositions.filter(item => item.top <= this.scrollY + this.readingTop + 1).at(-1);\n\t\treturn anchor ? { element: anchor.element, offset: this.scrollY + this.readingTop - anchor.top } : undefined;\n\t}\n\n\tprivate readonly handleResize = () => {\n\t\t// CSS reflows before the shared viewport probe's next frame. Preserve the\n\t\t// last stable document anchor now, before any observer can cache new boxes\n\t\t// against old metrics. Keep it across consecutive breakpoint crossings.\n\t\tthis.resizeAnchor ??= this.restoreAnchor ?? this.readAnchor();\n\t\tthis.schedule();\n\t};\n\n\tprivate update() {\n\t\tconst metrics = this.readMetrics();\n\t\tif (!metrics || !this.body) return;\n\t\tif (!this.stage?.classList.contains('stage-virtual-scroll-active')) this.scrollY = window.scrollY;\n\t\tconst key = JSON.stringify(metrics);\n\t\tconst metricsChanged = key !== this.metricKey;\n\t\tif (key !== this.metricKey) {\n\t\t\tconst previous = this.layout;\n\t\t\tconst next = resolveDetailLayout(metrics);\n\t\t\tif (previous && previous.composition !== next.composition && this.scrollY > 1) {\n\t\t\t\tthis.restoreAnchor = this.resizeAnchor ?? this.restoreAnchor ?? this.readAnchor();\n\t\t\t}\n\t\t\tif (!this.restoreAnchor) this.resizeAnchor = undefined;\n\t\t\tthis.metricKey = key;\n\t\t\tthis.layout = next;\n\t\t\tconst split = next.composition === 'split';\n\t\t\tthis.root.toggleAttribute('data-spatial-detail-pane', split);\n\t\t\tthis.root.toggleAttribute('data-spatial-detail-flow', next.shortHeightFallback);\n\t\t\tfor (const region of this.regions) region.toggleAttribute('data-stage-fixed-region', split);\n\t\t\tfor (const region of this.hiddenRegions) region.inert = this.hidden;\n\t\t\tthis.onMode(split);\n\t\t\t// The framework flushes the native summary ownership before its new box is measured.\n\t\t\tthis.schedule();\n\t\t}\n\t\tconst rect = this.body.getBoundingClientRect();\n\t\t// A breakpoint can remove the paint transform before this resize callback.\n\t\tif (this.layout?.composition !== 'split') this.focusPose = { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };\n\t\tconst bodyHeightChanged = Math.abs(this.bodyHeight - rect.height / this.focusPose.scale) > 0.5;\n\t\tthis.bodyTop = this.neutralY(rect.top) + this.scrollY;\n\t\tthis.bodyHeight = rect.height / this.focusPose.scale;\n\t\tthis.sectionPositions = Array.from(this.body.querySelectorAll<HTMLElement>('[data-spatial-element-tab-target]'))\n\t\t\t.map(element => ({ element, top: this.neutralY(element.getBoundingClientRect().top) + this.scrollY }));\n\t\tthis.readingTop = this.layout?.pane?.body.y ?? (Number.parseFloat(getComputedStyle(this.root).getPropertyValue('--spatial-element-section-scroll-offset')) || 0);\n\t\tconst summaryReady = this.layout?.composition !== 'split' || Boolean(this.body.querySelector('[data-spatial-summary-root]'));\n\t\tif (!metricsChanged && !bodyHeightChanged && summaryReady && this.restoreAnchor && this.restoreAnchor.element.isConnected) {\n\t\t\tconst anchor = this.restoreAnchor;\n\t\t\tthis.restoreAnchor = undefined;\n\t\t\tthis.resizeAnchor = undefined;\n\t\t\tconst y = Math.max(0, this.neutralY(anchor.element.getBoundingClientRect().top) + this.scrollY + anchor.offset - this.readingTop);\n\t\t\twindow.scrollTo({ top: y, behavior: 'instant' });\n\t\t\tsyncStageScrollToNative();\n\t\t\tthis.scrollY = getStageVisualScrollPosition().scrollY;\n\t\t}\n\t\tif (this.restoreAnchor) this.schedule();\n\t\tthis.paint();\n\t}\n\n\tprivate paint() {\n\t\tthis.paintFocus();\n\t\tconst pane = this.layout?.pane;\n\t\tif (!pane || !this.body) {\n\t\t\tthis.root.removeAttribute('data-spatial-detail-pane-clipped');\n\t\t\tthis.body?.style.removeProperty('clip-path');\n\t\t\tthis.root.style.removeProperty('--spatial-pane-fixed-compensation');\n\t\t\treturn;\n\t\t}\n\t\tconst enhanced = this.stage?.classList.contains('stage-virtual-scroll-active');\n\t\tthis.root.style.setProperty('--spatial-pane-fixed-compensation', `${enhanced ? this.scrollY : 0}px`);\n\t\tconst clip = resolvePaneScrollClip(this.bodyTop, this.bodyHeight, pane.body.y, pane.body.y + pane.body.height, this.scrollY);\n\t\tthis.body.style.clipPath = `inset(${clip.top}px 0 ${clip.bottom}px 0 round 0 0 var(--spatial-element-panel-radius) var(--spatial-element-panel-radius))`;\n\t\tthis.root.toggleAttribute('data-spatial-detail-pane-clipped', true);\n\t}\n\n\t/** Measurements remain in document coordinates while the pane moves in paint. */\n\tprivate neutralY(y: number) {\n\t\tconst { scale, pivotY, y: offset } = this.focusPose;\n\t\treturn pivotY + (y - pivotY - offset) / scale;\n\t}\n\n\tprivate paintFocus() {\n\t\tconst pane = this.layout?.pane;\n\t\tconst metrics = this.readMetrics();\n\t\tthis.focusPose = pane && metrics ? resolvePaneFocusPresentation(pane.surface, metrics, this.focus)\n\t\t\t: { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };\n\t\tconst pose = this.focusPose;\n\t\tthis.root.toggleAttribute('data-spatial-detail-pane-zooming', Boolean(pane && this.focus > 0.001));\n\t\tthis.setHidden(getPanelFocusOpacity(this.focus) < 0.12);\n\t\tconst values = { '--spatial-pane-focus-x': `${pose.x}px`, '--spatial-pane-focus-y': `${pose.y}px`,\n\t\t\t'--spatial-pane-focus-scale': String(pose.scale), '--spatial-pane-focus-opacity': String(pose.opacity),\n\t\t\t'--spatial-pane-focus-blur': `${pose.blur}px` };\n\t\tfor (const [name, value] of Object.entries(values)) {\n\t\t\tif (this.root.style.getPropertyValue(name) !== value) this.root.style.setProperty(name, value);\n\t\t}\n\t\tif (!pane || !this.body) return;\n\t\tthis.body.style.setProperty('--spatial-pane-focus-origin-y', `${pose.pivotY - this.bodyTop + this.scrollY}px`);\n\t\tfor (const region of this.regions) {\n\t\t\tconst top = region.hasAttribute('data-spatial-detail-pane-submenu-shell') ? this.layout!.submenu!.y\n\t\t\t\t: region.hasAttribute('data-spatial-detail-pane-header') || region.hasAttribute('data-spatial-detail-pane-surface') ? pane.surface.y : undefined;\n\t\t\tif (top !== undefined) region.style.setProperty('--spatial-pane-focus-origin-y', `${pose.pivotY - top}px`);\n\t\t}\n\t}\n\n\tprivate readonly handleFocus = (event: FocusEvent) => {\n\t\t// VirtualScrollController owns the enhanced path; native DOM uses identical bounds.\n\t\tif (!this.layout?.pane || this.hidden || this.stage?.classList.contains('stage-virtual-scroll-active')) return;\n\t\tconst target = event.target;\n\t\tif (!(target instanceof HTMLElement) || !this.body?.contains(target)) return;\n\t\tconst rect = target.getBoundingClientRect();\n\t\tconst viewport = this.layout.pane.body;\n\t\tconst bottom = Math.min(viewport.y + viewport.height, this.layout.submenu?.y ?? Infinity);\n\t\tif (rect.top >= viewport.y && rect.bottom <= bottom) return;\n\t\twindow.scrollTo({ top: Math.max(0, window.scrollY + rect.top - viewport.y - Math.max(0, (bottom - viewport.y - rect.height) / 2)), behavior: 'instant' });\n\t};\n}\n"]}
@@ -21,6 +21,7 @@ export interface SpatialMessages {
21
21
  spaceMouseConnected: string;
22
22
  spaceMouseConnecting: string;
23
23
  spaceMouseReady: string;
24
+ spaceMouseCancelled: string;
24
25
  spaceMousePermissionTitle: string;
25
26
  spaceMouseUnavailableTitle: string;
26
27
  spaceMouseUnavailable: string;
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/spatial-element/messages.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,eAAe,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,qEAAqE;QACrE,mBAAmB,EAAE,MAAM,CAAC;QAC5B,oBAAoB,EAAE,MAAM,CAAC;QAC7B,eAAe,EAAE,MAAM,CAAC;QACxB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,oBAAoB,EAAE,MAAM,CAAC;QAC7B,eAAe,EAAE,MAAM,CAAC;Q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,EAAE,MAAM,CAAC;QACjB,qEAAqE;QACrE,mBAAmB,EAAE,MAAM,CAAC;QAC5B,oBAAoB,EAAE,MAAM,CAAC;QAC7B,eAAe,EAAE,MAAM,CAAC;QACxB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,oBAAoB,EAAE,MAAM,CAAC;QAC7B,eAAe,EAAE,MAAM,CAAC;QACxB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,yBAAyB,EAAE,MAAM,CAAC;QAClC,0BAA0B,EAAE,MAAM,CAAC;QACnC,qBAAqB,EAAE,MAAM,CAAC;QAC9B,kBAAkB,EAAE,MAAM,CAAC;QAC3B,eAAe,EAAE,MAAM,CAAC;QACxB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,gBAAgB,EAAE,MAAM,CAAC;QACzB,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,eAAe,EAAE,MAAM,CAAC;KACxB,CAAC;CACF;AAED,iFAAiF;AACjF,MAAM,MAAM,oBAAoB,GAAG;KAAG,CAAC,IAAI,MAAM,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAElG,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC;KAC5C,CAAC,IAAI,MAAM,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAC1D,CA8BC,CAAC;AAEH,wBAAgB,sBAAsB,CAAC,KAAK,GAAE,oBAAyB,GAAG,eAAe,CAaxF"}
@@ -12,8 +12,9 @@ export const defaultSpatialMessages = Object.freeze({
12
12
  spaceMousePermission: 'To use your SpaceMouse, allow this website to access the local 3Dconnexion driver. Select OK to try again and allow access when your browser asks.',
13
13
  spaceMouseTitle: 'click to connect spacemouse for 3d navigation',
14
14
  spaceMouseConnected: 'spacemouse is connected, click to disconnect',
15
- spaceMouseConnecting: "Connecting SpaceMouse",
15
+ spaceMouseConnecting: "Searching for SpaceMouse, click to cancel",
16
16
  spaceMouseReady: "SpaceMouse connected. You can now navigate the model.",
17
+ spaceMouseCancelled: "SpaceMouse search cancelled at your request.",
17
18
  spaceMousePermissionTitle: "Allow SpaceMouse access",
18
19
  spaceMouseUnavailableTitle: "No SpaceMouse found",
19
20
  spaceMouseUnavailable: "No SpaceMouse connection could be established. Connect your device and check that the 3Dconnexion 3DxWare driver is installed and running.",
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/spatial-element/messages.ts"],"names":[],"mappings":"AAyCA,MAAM,CAAC,MAAM,sBAAsB,GAE9B,MAAM,CAAC,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;IAC9H,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC;QAC9B,KAAK,EAAE,eAAe;QACtB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,KAAK;QACV,WAAW,EAAE,iCAAiC;QAC9C,SAAS,EAAE,sBAAsB;QACjC,QAAQ,EAAE,kCAAkC;QAC5C,mBAAmB,EAAE,gDAAgD;QACrE,oBAAoB,EAAE,oJAAoJ;QAC1K,eAAe,EAAE,+CAA+C;QAChE,mBAAmB,EAAE,8CAA8C;QACnE,oBAAoB,EAAE,uBAAuB;QAC7C,eAAe,EAAE,uDAAuD;QACxE,yBAAyB,EAAE,yBAAyB;QACpD,0BAA0B,EAAE,qBAAqB;QACjD,qBAAqB,EAAE,4IAA4I;QACnK,kBAAkB,EAAE,wCAAwC;QAC5D,eAAe,EAAE,OAAO;QACxB,iBAAiB,EAAE,IAAI;QACvB,gBAAgB,EAAE,yGAAyG;QAC3H,WAAW,EAAE,sBAAsB;QACnC,SAAS,EAAE,wBAAwB;QACnC,QAAQ,EAAE,uBAAuB;QACjC,SAAS,EAAE,qCAAqC;QAChD,eAAe,EAAE,6CAA6C;KAC9D,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,UAAU,sBAAsB,CAAC,QAA8B,EAAE;IACtE,MAAM,KAAK,GAAG,CAAmB,QAAW,EAAE,SAAsB,EAAK,EAAE;QAC1E,MAAM,MAAM,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAC;QAC/B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAgB,EAAE,CAAC;YACxD,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;YAC/B,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,MAAM,CAAC,GAAG,CAAC,GAAG,KAAmB,CAAC;QAClE,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC,CAAC;IACF,OAAO;QACN,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;QAChE,eAAe,EAAE,KAAK,CAAC,sBAAsB,CAAC,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC;KACrF,CAAC;AACH,CAAC","sourcesContent":["/** Package-owned interface copy. Product content remains part of SpatialElementData. */\nexport interface SpatialMessages {\n\tcontrols: {\n\t\thelp: string;\n\t\tcloseHelp: string;\n\t\tdetailView: string;\n\t\tfullscreen: string;\n\t};\n\tinteractionHelp: {\n\t\ttitle: string;\n\t\trotate: string;\n\t\tzoom: string;\n\t\tpan: string;\n\t\tmouseRotate: string;\n\t\tmouseZoom: string;\n\t\tmousePan: string;\n\t\t/** Plain text; {spacemouse} inserts the external SpaceMouse link. */\n\t\tmouseNavigationHint: string;\n\t\tspaceMousePermission: string;\n\t\tspaceMouseTitle: string;\n\t\tspaceMouseConnected: string;\n\t\tspaceMouseConnecting: string;\n\t\tspaceMouseReady: string;\n\t\tspaceMousePermissionTitle: string;\n\t\tspaceMouseUnavailableTitle: string;\n\t\tspaceMouseUnavailable: string;\n\t\tspaceMouseDiscover: string;\n\t\tspaceMouseClose: string;\n\t\tspaceMouseConfirm: string;\n\t\tspaceMouseDenied: string;\n\t\ttouchRotate: string;\n\t\ttouchZoom: string;\n\t\ttouchPan: string;\n\t\ttouchHint: string;\n\t\ttouchScrollHint: string;\n\t};\n}\n\n/** Override individual strings; omitted groups/keys use the English defaults. */\nexport type SpatialMessagesInput = { [K in keyof SpatialMessages]?: Partial<SpatialMessages[K]> };\n\nexport const defaultSpatialMessages: Readonly<{\n\t[K in keyof SpatialMessages]: Readonly<SpatialMessages[K]>;\n}> = Object.freeze({\n\tcontrols: Object.freeze({ help: '3D controls', closeHelp: 'Close help', detailView: 'Detail view', fullscreen: 'Fullscreen' }),\n\tinteractionHelp: Object.freeze({\n\t\ttitle: 'Explore in 3D',\n\t\trotate: 'Rotate',\n\t\tzoom: 'Zoom',\n\t\tpan: 'Pan',\n\t\tmouseRotate: 'Drag with the left mouse button',\n\t\tmouseZoom: 'Use the scroll wheel',\n\t\tmousePan: 'Drag with the right mouse button',\n\t\tmouseNavigationHint: 'Alternatively, use a {spacemouse} to navigate.',\n\t\tspaceMousePermission: 'To use your SpaceMouse, allow this website to access the local 3Dconnexion driver. Select OK to try again and allow access when your browser asks.',\n\t\tspaceMouseTitle: 'click to connect spacemouse for 3d navigation',\n\t\tspaceMouseConnected: 'spacemouse is connected, click to disconnect',\n\t\tspaceMouseConnecting: \"Connecting SpaceMouse\",\n\t\tspaceMouseReady: \"SpaceMouse connected. You can now navigate the model.\",\n\t\tspaceMousePermissionTitle: \"Allow SpaceMouse access\",\n\t\tspaceMouseUnavailableTitle: \"No SpaceMouse found\",\n\t\tspaceMouseUnavailable: \"No SpaceMouse connection could be established. Connect your device and check that the 3Dconnexion 3DxWare driver is installed and running.\",\n\t\tspaceMouseDiscover: \"Discover SpaceMouse at 3dconnexion.com\",\n\t\tspaceMouseClose: \"Close\",\n\t\tspaceMouseConfirm: \"OK\",\n\t\tspaceMouseDenied: 'Access is blocked. Allow access to apps on this device in your browser’s site settings, then try again.',\n\t\ttouchRotate: 'Drag with one finger',\n\t\ttouchZoom: 'Pinch with two fingers',\n\t\ttouchPan: 'Drag with two fingers',\n\t\ttouchHint: '3D · Drag with one finger to rotate',\n\t\ttouchScrollHint: 'Touch outside the model to scroll the page.'\n\t})\n});\n\nexport function resolveSpatialMessages(input: SpatialMessagesInput = {}): SpatialMessages {\n\tconst merge = <T extends object>(defaults: T, overrides?: Partial<T>): T => {\n\t\tconst result = { ...defaults };\n\t\tfor (const key of Object.keys(defaults) as (keyof T)[]) {\n\t\t\tconst value = overrides?.[key];\n\t\t\tif (typeof value === 'string') result[key] = value as T[keyof T];\n\t\t}\n\t\treturn result;\n\t};\n\treturn {\n\t\tcontrols: merge(defaultSpatialMessages.controls, input.controls),\n\t\tinteractionHelp: merge(defaultSpatialMessages.interactionHelp, input.interactionHelp)\n\t};\n}\n"]}
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/spatial-element/messages.ts"],"names":[],"mappings":"AA0CA,MAAM,CAAC,MAAM,sBAAsB,GAE9B,MAAM,CAAC,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;IAC9H,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC;QAC9B,KAAK,EAAE,eAAe;QACtB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,KAAK;QACV,WAAW,EAAE,iCAAiC;QAC9C,SAAS,EAAE,sBAAsB;QACjC,QAAQ,EAAE,kCAAkC;QAC5C,mBAAmB,EAAE,gDAAgD;QACrE,oBAAoB,EAAE,oJAAoJ;QAC1K,eAAe,EAAE,+CAA+C;QAChE,mBAAmB,EAAE,8CAA8C;QACnE,oBAAoB,EAAE,2CAA2C;QACjE,eAAe,EAAE,uDAAuD;QACxE,mBAAmB,EAAE,8CAA8C;QACnE,yBAAyB,EAAE,yBAAyB;QACpD,0BAA0B,EAAE,qBAAqB;QACjD,qBAAqB,EAAE,4IAA4I;QACnK,kBAAkB,EAAE,wCAAwC;QAC5D,eAAe,EAAE,OAAO;QACxB,iBAAiB,EAAE,IAAI;QACvB,gBAAgB,EAAE,yGAAyG;QAC3H,WAAW,EAAE,sBAAsB;QACnC,SAAS,EAAE,wBAAwB;QACnC,QAAQ,EAAE,uBAAuB;QACjC,SAAS,EAAE,qCAAqC;QAChD,eAAe,EAAE,6CAA6C;KAC9D,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,UAAU,sBAAsB,CAAC,QAA8B,EAAE;IACtE,MAAM,KAAK,GAAG,CAAmB,QAAW,EAAE,SAAsB,EAAK,EAAE;QAC1E,MAAM,MAAM,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAC;QAC/B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAgB,EAAE,CAAC;YACxD,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;YAC/B,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,MAAM,CAAC,GAAG,CAAC,GAAG,KAAmB,CAAC;QAClE,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC,CAAC;IACF,OAAO;QACN,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;QAChE,eAAe,EAAE,KAAK,CAAC,sBAAsB,CAAC,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC;KACrF,CAAC;AACH,CAAC","sourcesContent":["/** Package-owned interface copy. Product content remains part of SpatialElementData. */\nexport interface SpatialMessages {\n\tcontrols: {\n\t\thelp: string;\n\t\tcloseHelp: string;\n\t\tdetailView: string;\n\t\tfullscreen: string;\n\t};\n\tinteractionHelp: {\n\t\ttitle: string;\n\t\trotate: string;\n\t\tzoom: string;\n\t\tpan: string;\n\t\tmouseRotate: string;\n\t\tmouseZoom: string;\n\t\tmousePan: string;\n\t\t/** Plain text; {spacemouse} inserts the external SpaceMouse link. */\n\t\tmouseNavigationHint: string;\n\t\tspaceMousePermission: string;\n\t\tspaceMouseTitle: string;\n\t\tspaceMouseConnected: string;\n\t\tspaceMouseConnecting: string;\n\t\tspaceMouseReady: string;\n\t\tspaceMouseCancelled: string;\n\t\tspaceMousePermissionTitle: string;\n\t\tspaceMouseUnavailableTitle: string;\n\t\tspaceMouseUnavailable: string;\n\t\tspaceMouseDiscover: string;\n\t\tspaceMouseClose: string;\n\t\tspaceMouseConfirm: string;\n\t\tspaceMouseDenied: string;\n\t\ttouchRotate: string;\n\t\ttouchZoom: string;\n\t\ttouchPan: string;\n\t\ttouchHint: string;\n\t\ttouchScrollHint: string;\n\t};\n}\n\n/** Override individual strings; omitted groups/keys use the English defaults. */\nexport type SpatialMessagesInput = { [K in keyof SpatialMessages]?: Partial<SpatialMessages[K]> };\n\nexport const defaultSpatialMessages: Readonly<{\n\t[K in keyof SpatialMessages]: Readonly<SpatialMessages[K]>;\n}> = Object.freeze({\n\tcontrols: Object.freeze({ help: '3D controls', closeHelp: 'Close help', detailView: 'Detail view', fullscreen: 'Fullscreen' }),\n\tinteractionHelp: Object.freeze({\n\t\ttitle: 'Explore in 3D',\n\t\trotate: 'Rotate',\n\t\tzoom: 'Zoom',\n\t\tpan: 'Pan',\n\t\tmouseRotate: 'Drag with the left mouse button',\n\t\tmouseZoom: 'Use the scroll wheel',\n\t\tmousePan: 'Drag with the right mouse button',\n\t\tmouseNavigationHint: 'Alternatively, use a {spacemouse} to navigate.',\n\t\tspaceMousePermission: 'To use your SpaceMouse, allow this website to access the local 3Dconnexion driver. Select OK to try again and allow access when your browser asks.',\n\t\tspaceMouseTitle: 'click to connect spacemouse for 3d navigation',\n\t\tspaceMouseConnected: 'spacemouse is connected, click to disconnect',\n\t\tspaceMouseConnecting: \"Searching for SpaceMouse, click to cancel\",\n\t\tspaceMouseReady: \"SpaceMouse connected. You can now navigate the model.\",\n\t\tspaceMouseCancelled: \"SpaceMouse search cancelled at your request.\",\n\t\tspaceMousePermissionTitle: \"Allow SpaceMouse access\",\n\t\tspaceMouseUnavailableTitle: \"No SpaceMouse found\",\n\t\tspaceMouseUnavailable: \"No SpaceMouse connection could be established. Connect your device and check that the 3Dconnexion 3DxWare driver is installed and running.\",\n\t\tspaceMouseDiscover: \"Discover SpaceMouse at 3dconnexion.com\",\n\t\tspaceMouseClose: \"Close\",\n\t\tspaceMouseConfirm: \"OK\",\n\t\tspaceMouseDenied: 'Access is blocked. Allow access to apps on this device in your browser’s site settings, then try again.',\n\t\ttouchRotate: 'Drag with one finger',\n\t\ttouchZoom: 'Pinch with two fingers',\n\t\ttouchPan: 'Drag with two fingers',\n\t\ttouchHint: '3D · Drag with one finger to rotate',\n\t\ttouchScrollHint: 'Touch outside the model to scroll the page.'\n\t})\n});\n\nexport function resolveSpatialMessages(input: SpatialMessagesInput = {}): SpatialMessages {\n\tconst merge = <T extends object>(defaults: T, overrides?: Partial<T>): T => {\n\t\tconst result = { ...defaults };\n\t\tfor (const key of Object.keys(defaults) as (keyof T)[]) {\n\t\t\tconst value = overrides?.[key];\n\t\t\tif (typeof value === 'string') result[key] = value as T[keyof T];\n\t\t}\n\t\treturn result;\n\t};\n\treturn {\n\t\tcontrols: merge(defaultSpatialMessages.controls, input.controls),\n\t\tinteractionHelp: merge(defaultSpatialMessages.interactionHelp, input.interactionHelp)\n\t};\n}\n"]}
@@ -49,7 +49,7 @@ export declare function getDockedMinimapInteractionRect(minimap: SpatialElementD
49
49
  export declare function getSpatialElementDockBreakpoint(minimapDocumentTop: number, minimapDockTop: number): number;
50
50
  /**
51
51
  * Maps page scroll directly to the minimap/header handoff. The transition starts
52
- * at the top of the page and completes when the source minimap has fully left the viewport.
52
+ * at the supplied docking threshold and completes when the source panel has left the viewport.
53
53
  */
54
54
  export declare function getSpatialElementDockPresentationProgress(scrollY: number, minimapDocumentBottom: number, startScrollY?: number): number;
55
55
  /** Adds a small release hysteresis so trackpad momentum cannot flicker the header. */
@@ -127,7 +127,7 @@ export function getSpatialElementDockBreakpoint(minimapDocumentTop, minimapDockT
127
127
  }
128
128
  /**
129
129
  * Maps page scroll directly to the minimap/header handoff. The transition starts
130
- * at the top of the page and completes when the source minimap has fully left the viewport.
130
+ * at the supplied docking threshold and completes when the source panel has left the viewport.
131
131
  */
132
132
  export function getSpatialElementDockPresentationProgress(scrollY, minimapDocumentBottom, startScrollY = 0) {
133
133
  const start = Number.isFinite(startScrollY) ? Math.max(startScrollY, 0) : 0;
@@ -1 +1 @@
1
- {"version":3,"file":"spatialElementDock.js","sourceRoot":"","sources":["../../src/spatial-element/spatialElementDock.ts"],"names":[],"mappings":"AAQA,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAC3C,MAAM,yCAAyC,GAAG,GAAG,CAAC;AACtD,MAAM,yCAAyC,GAAG,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC;AAExD,qFAAqF;AACrF,MAAM,UAAU,+BAA+B,CAAC,KAA4B,EAAE,YAAY,GAAG,CAAC;IAC7F,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IACnC,MAAM,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAA2D,EAA0B,EAAE,CAC3H,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,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AE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpE,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,2BAA2B,CAC1C,OAAe,EACf,UAAkB,EAClB,eAAwB,EACxB,aAAa,GAAG,EAAE;IAElB,OAAO,eAAe;QACrB,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,aAAa,EAAE,CAAC,CAAC;QACpD,CAAC,CAAC,OAAO,IAAI,UAAU,CAAC;AAC1B,CAAC;AACD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC","sourcesContent":["/** A viewport-aligned rectangle expressed in CSS pixels. */\nexport interface SpatialElementDockRect {\n\tleft: number;\n\ttop: number;\n\twidth: number;\n\theight: number;\n}\n\nconst MAX_DOCKED_MINIMAP_MODEL_SCALE = 1.4;\nconst MIN_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE = 0.2;\nconst MAX_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE = 2;\nexport const SPATIAL_ELEMENT_TABS_DOCK_SEAM_OVERLAP = 1;\n\n/** Shared endpoint geometry. Intrinsic submenu width is bounded, never stretched. */\nexport function resolveSpatialElementDockLayout(input: ResponsiveLayoutInput, submenuWidth = 0) {\n\tconst detail = resolveDetailLayout(input);\n\tif (!detail.dock) return undefined;\n\tconst asRect = ({ x, y, width, height }: { x: number; y: number; width: number; height: number }): SpatialElementDockRect =>\n\t\t({ left: x, top: y, width, height });\n\tconst header = asRect(detail.dock.surface);\n\tconst minimap = asRect(detail.dock.minimap);\n\tconst submenu = detail.submenu && {\n\t\tleft: detail.submenu.x,\n\t\ttop: header.top + header.height,\n\t\twidth: Math.min(Math.max(Number.isFinite(submenuWidth) ? submenuWidth : 0, 0), detail.submenu.maxWidth),\n\t\theight: detail.submenu.height\n\t};\n\tconst gap = submenu ? spatialLayoutTokens.hero[detail.layout].submenuAfterGap : 8;\n\treturn {\n\t\tlayout: detail.layout, header, minimap, submenu,\n\t\ttitleReserve: detail.dock.titleLeft - header.left,\n\t\tsectionOffset: header.top + header.height + (submenu?.height ?? 0) + gap\n\t};\n}\n\n/** Resolves the fixed spatial-element-header rectangle for a viewport. */\nexport function getSpatialElementDockDestination(\n\tviewportWidth: number,\n\ttop = 8,\n\theight = 86\n): SpatialElementDockRect {\n\tconst inset = 16;\n\treturn {\n\t\tleft: inset,\n\t\ttop,\n\t\twidth: Math.max(viewportWidth - inset * 2, 1),\n\t\theight\n\t};\n}\n\n/** Pins the unchanged minimap to the top edge of the viewport. */\nexport function getMinimapDockDestination(source: SpatialElementDockRect): SpatialElementDockRect {\n\treturn {\n\t\t...source,\n\t\ttop: 0\n\t};\n}\n\n/** Fits the docked minimap around a compact header without consuming most of its copy width. */\nexport function getCompactMinimapDockDestination(\n\tsource: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tviewportWidth: number,\n\tinset = 4\n): SpatialElementDockRect {\n\tconst safeInset = Math.max(inset, 0);\n\tconst size = Math.max(\n\t\tMath.min(source.width, header.height + 8, viewportWidth - safeInset * 2),\n\t\t1\n\t);\n\tconst minimumLeft = header.left + safeInset;\n\tconst maximumLeft = Math.max(header.left + header.width - size - safeInset, minimumLeft);\n\n\treturn {\n\t\tleft: Math.min(Math.max(source.left, minimumLeft), maximumLeft),\n\t\ttop: Math.max(header.top - (size - header.height) * 0.5, 0),\n\t\twidth: size,\n\t\theight: size\n\t};\n}\n\n/** Overlaps the subnavigation with the header edge to avoid a compositing seam between surfaces. */\nexport function getSpatialElementTabsDockDestination(\n\tsource: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tviewportWidth: number,\n\tinset = 8,\n\tseamOverlap = SPATIAL_ELEMENT_TABS_DOCK_SEAM_OVERLAP\n): SpatialElementDockRect {\n\tconst safeInset = Math.max(inset, 0);\n\tconst safeSeamOverlap = Number.isFinite(seamOverlap) ? Math.max(seamOverlap, 0) : 0;\n\tconst left = Math.min(\n\t\tMath.max(source.left, safeInset),\n\t\tMath.max(viewportWidth - safeInset, safeInset)\n\t);\n\tconst width = Math.max(Math.min(source.width, viewportWidth - left - safeInset), 1);\n\n\treturn {\n\t\tleft,\n\t\ttop: header.top + header.height - safeSeamOverlap,\n\t\twidth,\n\t\theight: Math.max(source.height, 1)\n\t};\n}\n\n/** Returns the exact visual-scroll point where the source tabs meet their dock destination. */\nexport function getSpatialElementTabsDockBreakpoint(sourceDocumentTop: number, dockTop: number) {\n\treturn Math.max(sourceDocumentTop - dockTop, 0);\n}\n\n/** Tabs only dock after the element header is available as their visible anchor. */\nexport function getSpatialElementTabsDockTarget(\n\tscrollY: number,\n\tbreakpoint: number,\n\theaderDocked: boolean,\n\tcurrentlyDocked = false,\n\treleaseOffset = 1\n) {\n\tif (!headerDocked) return false;\n\treturn currentlyDocked\n\t\t? scrollY >= Math.max(breakpoint - Math.max(releaseOffset, 0), 0)\n\t\t: scrollY >= breakpoint;\n}\n\n/** Morphs the dock shell over a short, reversible distance after the visual handoff. */\nexport function getSpatialElementTabsDockProgress(scrollY: number, breakpoint: number, distance = 24) {\n\tconst safeDistance = Number.isFinite(distance) ? Math.max(distance, 0) : 0;\n\tif (safeDistance === 0) return scrollY >= breakpoint ? 1 : 0;\n\treturn Math.min(Math.max((scrollY - breakpoint) / safeDistance, 0), 1);\n}\n\n/** Leaves a small reading gap below the complete docked header stack for anchor navigation. */\nexport function getSpatialElementSectionScrollOffset(tabs: SpatialElementDockRect, gap = 16) {\n\treturn Math.max(tabs.top + tabs.height + Math.max(gap, 0), 0);\n}\n\n/**\n * Makes the docked element overhang as deliberately as the minimap is taller than\n * the header, without requiring spatial-element-specific optical tuning.\n */\nexport function getDockedMinimapModelScale(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tconfiguredScale?: number\n) {\n\tif (configuredScale !== undefined && Number.isFinite(configuredScale)) {\n\t\treturn Math.min(\n\t\t\tMath.max(configuredScale, MIN_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE),\n\t\t\tMAX_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE\n\t\t);\n\t}\n\n\tconst minimapHeight = Number.isFinite(minimap.height) ? Math.max(minimap.height, 0) : 0;\n\tconst headerHeight = Number.isFinite(header.height) ? Math.max(header.height, 0) : 0;\n\tif (minimapHeight === 0 || headerHeight === 0) return 1;\n\n\treturn Math.min(Math.max(minimapHeight / headerHeight, 1), MAX_DOCKED_MINIMAP_MODEL_SCALE);\n}\n\n/** Reserves the scaled model's potential right-side overhang before header copy. */\nexport function getDockedMinimapCopyReserve(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tmodelScale: number,\n\tgap = 16\n) {\n\tconst safeScale = Number.isFinite(modelScale) ? Math.max(modelScale, 1) : 1;\n\tconst modelOverflow = Math.max(minimap.width, 0) * (safeScale - 1) * 0.5;\n\treturn Math.max(minimap.left + minimap.width + modelOverflow + gap - header.left, 0);\n}\n\n/** Covers the complete scaled model overhang with a viewport-aligned interaction target. */\nexport function getDockedMinimapInteractionRect(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tmodelScale: number\n): SpatialElementDockRect {\n\tconst safeScale = Number.isFinite(modelScale) ? Math.max(modelScale, 1) : 1;\n\tconst width = Math.max(minimap.width, 1) * safeScale;\n\tconst height = Math.max(minimap.height, 1) * safeScale;\n\n\treturn {\n\t\tleft: minimap.left - (width - minimap.width) * 0.5,\n\t\ttop: header.top,\n\t\twidth,\n\t\theight\n\t};\n}\n\n/** Returns the scroll position where the minimap naturally reaches its fixed position. */\nexport function getSpatialElementDockBreakpoint(minimapDocumentTop: number, minimapDockTop: number) {\n\treturn Math.max(minimapDocumentTop - minimapDockTop, 0);\n}\n\n/**\n * Maps page scroll directly to the minimap/header handoff. The transition starts\n * at the top of the page and completes when the source minimap has fully left the viewport.\n */\nexport function getSpatialElementDockPresentationProgress(\n\tscrollY: number,\n\tminimapDocumentBottom: number,\n\tstartScrollY = 0\n) {\n\tconst start = Number.isFinite(startScrollY) ? Math.max(startScrollY, 0) : 0;\n\tconst end = Number.isFinite(minimapDocumentBottom)\n\t\t? Math.max(minimapDocumentBottom, start)\n\t\t: start;\n\tif (end === start) return scrollY >= end ? 1 : 0;\n\treturn Math.min(Math.max((scrollY - start) / (end - start), 0), 1);\n}\n\n/** Adds a small release hysteresis so trackpad momentum cannot flicker the header. */\nexport function getSpatialElementDockTarget(\n\tscrollY: number,\n\tbreakpoint: number,\n\tcurrentlyDocked: boolean,\n\treleaseOffset = 16\n) {\n\treturn currentlyDocked\n\t\t? scrollY >= Math.max(breakpoint - releaseOffset, 0)\n\t\t: scrollY >= breakpoint;\n}\nimport { resolveDetailLayout, spatialLayoutTokens, type ResponsiveLayoutInput } from './responsiveLayout.js';\n"]}
1
+ {"version":3,"file":"spatialElementDock.js","sourceRoot":"","sources":["../../src/spatial-element/spatialElementDock.ts"],"names":[],"mappings":"AAQA,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAC3C,MAAM,yCAAyC,GAAG,GAAG,CAAC;AACtD,MAAM,yCAAyC,GAAG,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC;AAExD,qFAAqF;AACrF,MAAM,UAAU,+BAA+B,CAAC,KAA4B,EAAE,YAAY,GAAG,CAAC;IAC7F,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IACnC,MAAM,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAA2D,EAA0B,EAAE,CAC3H,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,MAAM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AAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpE,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,2BAA2B,CAC1C,OAAe,EACf,UAAkB,EAClB,eAAwB,EACxB,aAAa,GAAG,EAAE;IAElB,OAAO,eAAe;QACrB,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,aAAa,EAAE,CAAC,CAAC;QACpD,CAAC,CAAC,OAAO,IAAI,UAAU,CAAC;AAC1B,CAAC;AACD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC","sourcesContent":["/** A viewport-aligned rectangle expressed in CSS pixels. */\nexport interface SpatialElementDockRect {\n\tleft: number;\n\ttop: number;\n\twidth: number;\n\theight: number;\n}\n\nconst MAX_DOCKED_MINIMAP_MODEL_SCALE = 1.4;\nconst MIN_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE = 0.2;\nconst MAX_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE = 2;\nexport const SPATIAL_ELEMENT_TABS_DOCK_SEAM_OVERLAP = 1;\n\n/** Shared endpoint geometry. Intrinsic submenu width is bounded, never stretched. */\nexport function resolveSpatialElementDockLayout(input: ResponsiveLayoutInput, submenuWidth = 0) {\n\tconst detail = resolveDetailLayout(input);\n\tif (!detail.dock) return undefined;\n\tconst asRect = ({ x, y, width, height }: { x: number; y: number; width: number; height: number }): SpatialElementDockRect =>\n\t\t({ left: x, top: y, width, height });\n\tconst header = asRect(detail.dock.surface);\n\tconst minimap = asRect(detail.dock.minimap);\n\tconst submenu = detail.submenu && {\n\t\tleft: detail.submenu.x,\n\t\ttop: header.top + header.height,\n\t\twidth: Math.min(Math.max(Number.isFinite(submenuWidth) ? submenuWidth : 0, 0), detail.submenu.maxWidth),\n\t\theight: detail.submenu.height\n\t};\n\tconst gap = submenu ? spatialLayoutTokens.hero[detail.layout].submenuAfterGap : 8;\n\treturn {\n\t\tlayout: detail.layout, header, minimap, submenu,\n\t\ttitleReserve: detail.dock.titleLeft - header.left,\n\t\tsectionOffset: header.top + header.height + (submenu?.height ?? 0) + gap\n\t};\n}\n\n/** Resolves the fixed spatial-element-header rectangle for a viewport. */\nexport function getSpatialElementDockDestination(\n\tviewportWidth: number,\n\ttop = 8,\n\theight = 86\n): SpatialElementDockRect {\n\tconst inset = 16;\n\treturn {\n\t\tleft: inset,\n\t\ttop,\n\t\twidth: Math.max(viewportWidth - inset * 2, 1),\n\t\theight\n\t};\n}\n\n/** Pins the unchanged minimap to the top edge of the viewport. */\nexport function getMinimapDockDestination(source: SpatialElementDockRect): SpatialElementDockRect {\n\treturn {\n\t\t...source,\n\t\ttop: 0\n\t};\n}\n\n/** Fits the docked minimap around a compact header without consuming most of its copy width. */\nexport function getCompactMinimapDockDestination(\n\tsource: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tviewportWidth: number,\n\tinset = 4\n): SpatialElementDockRect {\n\tconst safeInset = Math.max(inset, 0);\n\tconst size = Math.max(\n\t\tMath.min(source.width, header.height + 8, viewportWidth - safeInset * 2),\n\t\t1\n\t);\n\tconst minimumLeft = header.left + safeInset;\n\tconst maximumLeft = Math.max(header.left + header.width - size - safeInset, minimumLeft);\n\n\treturn {\n\t\tleft: Math.min(Math.max(source.left, minimumLeft), maximumLeft),\n\t\ttop: Math.max(header.top - (size - header.height) * 0.5, 0),\n\t\twidth: size,\n\t\theight: size\n\t};\n}\n\n/** Overlaps the subnavigation with the header edge to avoid a compositing seam between surfaces. */\nexport function getSpatialElementTabsDockDestination(\n\tsource: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tviewportWidth: number,\n\tinset = 8,\n\tseamOverlap = SPATIAL_ELEMENT_TABS_DOCK_SEAM_OVERLAP\n): SpatialElementDockRect {\n\tconst safeInset = Math.max(inset, 0);\n\tconst safeSeamOverlap = Number.isFinite(seamOverlap) ? Math.max(seamOverlap, 0) : 0;\n\tconst left = Math.min(\n\t\tMath.max(source.left, safeInset),\n\t\tMath.max(viewportWidth - safeInset, safeInset)\n\t);\n\tconst width = Math.max(Math.min(source.width, viewportWidth - left - safeInset), 1);\n\n\treturn {\n\t\tleft,\n\t\ttop: header.top + header.height - safeSeamOverlap,\n\t\twidth,\n\t\theight: Math.max(source.height, 1)\n\t};\n}\n\n/** Returns the exact visual-scroll point where the source tabs meet their dock destination. */\nexport function getSpatialElementTabsDockBreakpoint(sourceDocumentTop: number, dockTop: number) {\n\treturn Math.max(sourceDocumentTop - dockTop, 0);\n}\n\n/** Tabs only dock after the element header is available as their visible anchor. */\nexport function getSpatialElementTabsDockTarget(\n\tscrollY: number,\n\tbreakpoint: number,\n\theaderDocked: boolean,\n\tcurrentlyDocked = false,\n\treleaseOffset = 1\n) {\n\tif (!headerDocked) return false;\n\treturn currentlyDocked\n\t\t? scrollY >= Math.max(breakpoint - Math.max(releaseOffset, 0), 0)\n\t\t: scrollY >= breakpoint;\n}\n\n/** Morphs the dock shell over a short, reversible distance after the visual handoff. */\nexport function getSpatialElementTabsDockProgress(scrollY: number, breakpoint: number, distance = 24) {\n\tconst safeDistance = Number.isFinite(distance) ? Math.max(distance, 0) : 0;\n\tif (safeDistance === 0) return scrollY >= breakpoint ? 1 : 0;\n\treturn Math.min(Math.max((scrollY - breakpoint) / safeDistance, 0), 1);\n}\n\n/** Leaves a small reading gap below the complete docked header stack for anchor navigation. */\nexport function getSpatialElementSectionScrollOffset(tabs: SpatialElementDockRect, gap = 16) {\n\treturn Math.max(tabs.top + tabs.height + Math.max(gap, 0), 0);\n}\n\n/**\n * Makes the docked element overhang as deliberately as the minimap is taller than\n * the header, without requiring spatial-element-specific optical tuning.\n */\nexport function getDockedMinimapModelScale(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tconfiguredScale?: number\n) {\n\tif (configuredScale !== undefined && Number.isFinite(configuredScale)) {\n\t\treturn Math.min(\n\t\t\tMath.max(configuredScale, MIN_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE),\n\t\t\tMAX_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE\n\t\t);\n\t}\n\n\tconst minimapHeight = Number.isFinite(minimap.height) ? Math.max(minimap.height, 0) : 0;\n\tconst headerHeight = Number.isFinite(header.height) ? Math.max(header.height, 0) : 0;\n\tif (minimapHeight === 0 || headerHeight === 0) return 1;\n\n\treturn Math.min(Math.max(minimapHeight / headerHeight, 1), MAX_DOCKED_MINIMAP_MODEL_SCALE);\n}\n\n/** Reserves the scaled model's potential right-side overhang before header copy. */\nexport function getDockedMinimapCopyReserve(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tmodelScale: number,\n\tgap = 16\n) {\n\tconst safeScale = Number.isFinite(modelScale) ? Math.max(modelScale, 1) : 1;\n\tconst modelOverflow = Math.max(minimap.width, 0) * (safeScale - 1) * 0.5;\n\treturn Math.max(minimap.left + minimap.width + modelOverflow + gap - header.left, 0);\n}\n\n/** Covers the complete scaled model overhang with a viewport-aligned interaction target. */\nexport function getDockedMinimapInteractionRect(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tmodelScale: number\n): SpatialElementDockRect {\n\tconst safeScale = Number.isFinite(modelScale) ? Math.max(modelScale, 1) : 1;\n\tconst width = Math.max(minimap.width, 1) * safeScale;\n\tconst height = Math.max(minimap.height, 1) * safeScale;\n\n\treturn {\n\t\tleft: minimap.left - (width - minimap.width) * 0.5,\n\t\ttop: header.top,\n\t\twidth,\n\t\theight\n\t};\n}\n\n/** Returns the scroll position where the minimap naturally reaches its fixed position. */\nexport function getSpatialElementDockBreakpoint(minimapDocumentTop: number, minimapDockTop: number) {\n\treturn Math.max(minimapDocumentTop - minimapDockTop, 0);\n}\n\n/**\n * Maps page scroll directly to the minimap/header handoff. The transition starts\n * at the supplied docking threshold and completes when the source panel has left the viewport.\n */\nexport function getSpatialElementDockPresentationProgress(\n\tscrollY: number,\n\tminimapDocumentBottom: number,\n\tstartScrollY = 0\n) {\n\tconst start = Number.isFinite(startScrollY) ? Math.max(startScrollY, 0) : 0;\n\tconst end = Number.isFinite(minimapDocumentBottom)\n\t\t? Math.max(minimapDocumentBottom, start)\n\t\t: start;\n\tif (end === start) return scrollY >= end ? 1 : 0;\n\treturn Math.min(Math.max((scrollY - start) / (end - start), 0), 1);\n}\n\n/** Adds a small release hysteresis so trackpad momentum cannot flicker the header. */\nexport function getSpatialElementDockTarget(\n\tscrollY: number,\n\tbreakpoint: number,\n\tcurrentlyDocked: boolean,\n\treleaseOffset = 16\n) {\n\treturn currentlyDocked\n\t\t? scrollY >= Math.max(breakpoint - releaseOffset, 0)\n\t\t: scrollY >= breakpoint;\n}\nimport { resolveDetailLayout, spatialLayoutTokens, type ResponsiveLayoutInput } from './responsiveLayout.js';\n"]}
@@ -0,0 +1,9 @@
1
+ /** Keep one wheel burst with its original owner, including inertial samples. */
2
+ export declare class DetailWheelGesture {
3
+ private lastTime;
4
+ private owner?;
5
+ reset(): void;
6
+ zooming(now: number): boolean;
7
+ resolve(now: number, hit: boolean, down: boolean, atOverview: boolean, pinch?: boolean): "scroll" | "zoom";
8
+ }
9
+ //# sourceMappingURL=DetailWheelGesture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailWheelGesture.d.ts","sourceRoot":"","sources":["../../src/stage/DetailWheelGesture.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,qBAAa,kBAAkB;IAC9B,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,KAAK,CAAC,CAAoB;IAClC,KAAK;IACL,OAAO,CAAC,GAAG,EAAE,MAAM;IACnB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,UAAQ;CAQpF"}
@@ -0,0 +1,16 @@
1
+ /** Keep one wheel burst with its original owner, including inertial samples. */
2
+ export class DetailWheelGesture {
3
+ lastTime = -Infinity;
4
+ owner;
5
+ reset() { this.lastTime = -Infinity; this.owner = undefined; }
6
+ zooming(now) { return this.owner === 'zoom' && now - this.lastTime < 800; }
7
+ resolve(now, hit, down, atOverview, pinch = false) {
8
+ const recent = now - this.lastTime < 800;
9
+ const previous = recent ? this.owner : undefined;
10
+ this.owner = pinch ? 'zoom' : previous === 'scroll' || !hit ||
11
+ (down && atOverview && previous !== 'zoom') ? 'scroll' : 'zoom';
12
+ this.lastTime = now;
13
+ return this.owner;
14
+ }
15
+ }
16
+ //# sourceMappingURL=DetailWheelGesture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailWheelGesture.js","sourceRoot":"","sources":["../../src/stage/DetailWheelGesture.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,OAAO,kBAAkB;IACtB,QAAQ,GAAG,CAAC,QAAQ,CAAC;IACrB,KAAK,CAAqB;IAClC,KAAK,KAAK,IAAI,CAAC,QAAQ,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAW,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC;IACnF,OAAO,CAAC,GAAW,EAAE,GAAY,EAAE,IAAa,EAAE,UAAmB,EAAE,KAAK,GAAG,KAAK;QACnF,MAAM,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,GAAG;YAC1D,CAAC,IAAI,IAAI,UAAU,IAAI,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;QACjE,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;CACD","sourcesContent":["/** Keep one wheel burst with its original owner, including inertial samples. */\nexport class DetailWheelGesture {\n\tprivate lastTime = -Infinity;\n\tprivate owner?: 'scroll' | 'zoom';\n\treset() { this.lastTime = -Infinity; this.owner = undefined; }\n\tzooming(now: number) { return this.owner === 'zoom' && now - this.lastTime < 800; }\n\tresolve(now: number, hit: boolean, down: boolean, atOverview: boolean, pinch = false) {\n\t\tconst recent = now - this.lastTime < 800;\n\t\tconst previous = recent ? this.owner : undefined;\n\t\tthis.owner = pinch ? 'zoom' : previous === 'scroll' || !hit ||\n\t\t\t(down && atOverview && previous !== 'zoom') ? 'scroll' : 'zoom';\n\t\tthis.lastTime = now;\n\t\treturn this.owner;\n\t}\n}\n"]}
@@ -5,6 +5,8 @@ export interface LiquidGlassPanelOptions {
5
5
  width?: number;
6
6
  height?: number;
7
7
  radius?: number;
8
+ /** Keep the lower corners square when a panel joins the content below it. */
9
+ squareBottom?: boolean;
8
10
  position?: {
9
11
  x: number;
10
12
  y: number;
@@ -1 +1 @@
1
- {"version":3,"file":"LiquidGlassPanel.d.ts","sourceRoot":"","sources":["../../src/stage/LiquidGlassPanel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AA6BtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAOzC,MAAM,WAAW,uBAAuB;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;K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