@spatial-elements/core 1.0.0-beta.12 → 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.
- package/dist/spatial-element/SpatialElementPaneController.js +3 -3
- package/dist/spatial-element/SpatialElementPaneController.js.map +1 -1
- package/dist/stage/DetailWheelGesture.d.ts +9 -0
- package/dist/stage/DetailWheelGesture.d.ts.map +1 -0
- package/dist/stage/DetailWheelGesture.js +16 -0
- package/dist/stage/DetailWheelGesture.js.map +1 -0
- package/dist/stage/LiquidGlassPanel.d.ts +2 -0
- package/dist/stage/LiquidGlassPanel.d.ts.map +1 -1
- package/dist/stage/LiquidGlassPanel.js +24 -17
- package/dist/stage/LiquidGlassPanel.js.map +1 -1
- package/dist/stage/PanelPresentationController.d.ts.map +1 -1
- package/dist/stage/PanelPresentationController.js +2 -0
- package/dist/stage/PanelPresentationController.js.map +1 -1
- package/dist/stage/SpatialElementInteractionController.d.ts +21 -0
- package/dist/stage/SpatialElementInteractionController.d.ts.map +1 -1
- package/dist/stage/SpatialElementInteractionController.js +185 -16
- package/dist/stage/SpatialElementInteractionController.js.map +1 -1
- package/dist/stage/SpatialElementPresentationController.js +4 -4
- package/dist/stage/SpatialElementPresentationController.js.map +1 -1
- package/dist/stage/StageExperience.d.ts +8 -0
- package/dist/stage/StageExperience.d.ts.map +1 -1
- package/dist/stage/StageExperience.js +34 -19
- package/dist/stage/StageExperience.js.map +1 -1
- package/dist/stage/StageRenderPipeline.d.ts +3 -0
- package/dist/stage/StageRenderPipeline.d.ts.map +1 -1
- package/dist/stage/StageRenderPipeline.js +15 -0
- package/dist/stage/StageRenderPipeline.js.map +1 -1
- package/dist/stage/browserPinch.d.ts +5 -0
- package/dist/stage/browserPinch.d.ts.map +1 -0
- package/dist/stage/browserPinch.js +29 -0
- package/dist/stage/browserPinch.js.map +1 -0
- package/dist/stage/panelContext.d.ts +2 -1
- package/dist/stage/panelContext.d.ts.map +1 -1
- package/dist/stage/panelContext.js.map +1 -1
- package/dist/stage/panelFocusMath.d.ts +2 -0
- package/dist/stage/panelFocusMath.d.ts.map +1 -1
- package/dist/stage/panelFocusMath.js +8 -0
- package/dist/stage/panelFocusMath.js.map +1 -1
- package/dist/stage/stageVisualTest.d.ts +1 -0
- package/dist/stage/stageVisualTest.d.ts.map +1 -1
- package/dist/stage/stageVisualTest.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browserPinch.d.ts","sourceRoot":"","sources":["../../src/stage/browserPinch.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,cAqBpD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Suppress page magnification without disabling keyboard/browser-menu zoom.
|
|
2
|
+
* Detail gestures are handled separately by the lazily loaded 3D runtime.
|
|
3
|
+
*/
|
|
4
|
+
export function preventBrowserPinch(root) {
|
|
5
|
+
const belongs = (event) => event.target instanceof Node && root.contains(event.target);
|
|
6
|
+
const wheel = (event) => {
|
|
7
|
+
if (event.ctrlKey && belongs(event))
|
|
8
|
+
event.preventDefault();
|
|
9
|
+
};
|
|
10
|
+
const touch = (event) => {
|
|
11
|
+
if (event.touches.length > 1 && belongs(event))
|
|
12
|
+
event.preventDefault();
|
|
13
|
+
};
|
|
14
|
+
const gesture = (event) => { if (belongs(event))
|
|
15
|
+
event.preventDefault(); };
|
|
16
|
+
window.addEventListener('wheel', wheel, { capture: true, passive: false });
|
|
17
|
+
window.addEventListener('touchstart', touch, { capture: true, passive: false });
|
|
18
|
+
window.addEventListener('touchmove', touch, { capture: true, passive: false });
|
|
19
|
+
window.addEventListener('gesturestart', gesture, { capture: true, passive: false });
|
|
20
|
+
window.addEventListener('gesturechange', gesture, { capture: true, passive: false });
|
|
21
|
+
return () => {
|
|
22
|
+
window.removeEventListener('wheel', wheel, true);
|
|
23
|
+
window.removeEventListener('touchstart', touch, true);
|
|
24
|
+
window.removeEventListener('touchmove', touch, true);
|
|
25
|
+
window.removeEventListener('gesturestart', gesture, true);
|
|
26
|
+
window.removeEventListener('gesturechange', gesture, true);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=browserPinch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browserPinch.js","sourceRoot":"","sources":["../../src/stage/browserPinch.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAiB;IACpD,MAAM,OAAO,GAAG,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,YAAY,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9F,MAAM,KAAK,GAAG,CAAC,KAAiB,EAAE,EAAE;QACnC,IAAI,KAAK,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC;YAAE,KAAK,CAAC,cAAc,EAAE,CAAC;IAC7D,CAAC,CAAC;IACF,MAAM,KAAK,GAAG,CAAC,KAAiB,EAAE,EAAE;QACnC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC;YAAE,KAAK,CAAC,cAAc,EAAE,CAAC;IACxE,CAAC,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,KAAY,EAAE,EAAE,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;QAAE,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC;IAClF,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3E,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IAChF,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/E,MAAM,CAAC,gBAAgB,CAAC,cAAc,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IACpF,MAAM,CAAC,gBAAgB,CAAC,eAAe,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IACrF,OAAO,GAAG,EAAE;QACX,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACjD,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACtD,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACrD,MAAM,CAAC,mBAAmB,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QAC1D,MAAM,CAAC,mBAAmB,CAAC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5D,CAAC,CAAC;AACH,CAAC","sourcesContent":["/** Suppress page magnification without disabling keyboard/browser-menu zoom.\n * Detail gestures are handled separately by the lazily loaded 3D runtime.\n */\nexport function preventBrowserPinch(root: HTMLElement) {\n\tconst belongs = (event: Event) => event.target instanceof Node && root.contains(event.target);\n\tconst wheel = (event: WheelEvent) => {\n\t\tif (event.ctrlKey && belongs(event)) event.preventDefault();\n\t};\n\tconst touch = (event: TouchEvent) => {\n\t\tif (event.touches.length > 1 && belongs(event)) event.preventDefault();\n\t};\n\tconst gesture = (event: Event) => { if (belongs(event)) event.preventDefault(); };\n\twindow.addEventListener('wheel', wheel, { capture: true, passive: false });\n\twindow.addEventListener('touchstart', touch, { capture: true, passive: false });\n\twindow.addEventListener('touchmove', touch, { capture: true, passive: false });\n\twindow.addEventListener('gesturestart', gesture, { capture: true, passive: false });\n\twindow.addEventListener('gesturechange', gesture, { capture: true, passive: false });\n\treturn () => {\n\t\twindow.removeEventListener('wheel', wheel, true);\n\t\twindow.removeEventListener('touchstart', touch, true);\n\t\twindow.removeEventListener('touchmove', touch, true);\n\t\twindow.removeEventListener('gesturestart', gesture, true);\n\t\twindow.removeEventListener('gesturechange', gesture, true);\n\t};\n}\n"]}
|
|
@@ -15,9 +15,10 @@ export interface StagePanelPose {
|
|
|
15
15
|
}
|
|
16
16
|
export interface StagePanelShape {
|
|
17
17
|
radius: number;
|
|
18
|
+
squareBottom?: boolean;
|
|
18
19
|
contentInset?: number;
|
|
19
20
|
}
|
|
20
|
-
export type StagePanelTheme = Omit<LiquidGlassPanelOptions, 'width' | 'height' | 'position' | 'radius'> & {
|
|
21
|
+
export type StagePanelTheme = Omit<LiquidGlassPanelOptions, 'width' | 'height' | 'position' | 'radius' | 'squareBottom'> & {
|
|
21
22
|
/** Semantic surface style. Defaults to the WebGPU-backed `glass` mode. */
|
|
22
23
|
surface?: StagePanelSurface;
|
|
23
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/stage/panelContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEjF,eAAO,MAAM,iBAAiB,eAAkB,CAAC;AAEjD,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAE7D,+FAA+F;AAC/F,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAE7D,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAA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IAAI,OAAO,CAAC;IACzB,kFAAkF;IAClF,YAAY,CAAC,IAAI,MAAM,CAAC;IACxB,8EAA8E;IAC9E,cAAc,CAAC,IAAI,MAAM,CAAC;IAC1B,aAAa,CAAC,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelContext.js","sourceRoot":"","sources":["../../src/stage/panelContext.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAEjD,uFAAuF;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D,+FAA+F;AAC/F,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC","sourcesContent":["\nimport type { LiquidGlassPanelOptions } from './LiquidGlassPanel.js';\nimport type { StageMinimapDockedView, StagePanelSurface } from './stageTypes.js';\n\nexport const STAGE_CONTEXT_KEY = Symbol('stage');\n\n/** Notifies an active stage that externally positioned panel frames changed layout. */\nexport const STAGE_PANEL_LAYOUT_EVENT = 'stage:panel-layout';\n\n/** Notifies an active stage that an external panel visual changed without affecting layout. */\nexport const STAGE_PANEL_VISUAL_EVENT = 'stage:panel-visual';\n\nexport interface StagePanelPose {\n\twidth: number;\n\theight: number;\n\tposition: { x: number; y: number };\n}\n\nexport interface StagePanelShape {\n\tradius: number;\n\tcontentInset?: number;\n}\n\nexport type StagePanelTheme = Omit<\n\tLiquidGlassPanelOptions,\n\t'width' | 'height' | 'position' | 'radius'\n> & {\n\t/** Semantic surface style. Defaults to the WebGPU-backed `glass` mode. */\n\tsurface?: StagePanelSurface;\n};\n\n\n\nexport interface StagePanelMinimapOptions {\n\texpandedHeight?: number;\n\tinset?: number;\n\t/** Additional unbounded scale applied to the fitted model. Values below 0.2 are clamped. */\n\tmodelScale?: number;\n\t/** Model multiplier at full pointer hover. Use 1 to disable hover enlargement. */\n\thoverModelScale?: number;\n\t/** Hover multiplier used once the minimap is expanded by camera zoom. */\n\texpandedHoverModelScale?: number;\n\t/** Optional spatial-element-specific presentation used while the minimap is docked. */\n\tdockedView?: StageMinimapDockedView;\n\toverlayColor?: string | number;\n\toverlayOpacity?: number;\n\t/** Gaussian blur radius in CSS pixels. */\n\toverlayBlur?: number;\n\tcontextColor?: string | number;\n\tcontextOpacity?: number;\n\tviewportColor?: string | number;\n}\n\nexport interface StagePanelRegistration {\n\tgetContentInset(): number;\n\tgetElement(): HTMLElement | undefined;\n\tgetFrameElement(): HTMLElement | undefined;\n\tgetSurfaceElement(): HTMLElement | undefined;\n\tgetPointerReactive(): boolean | 'lift';\n\tgetFocusReactive?(): boolean | 'top-right';\n\t/** Neighbouring panel frame that shares a corner control's exit path. */\n\tgetFocusAnchor?(): HTMLElement | undefined;\n\tgetNativeContent?(): boolean;\n\t/** Runs synchronously before the native panel surface is measured and drawn. */\n\tupdateNativeLayout?(): void;\n\tgetVisible?(): boolean;\n\t/** Selection is read without rebuilding the minimap model. */\n\tgetMinimapSelected?(): boolean;\n\tgetMinimapOptions(): StagePanelMinimapOptions | undefined;\n\tgetOptions(): LiquidGlassPanelOptions;\n\tgetSurface(): StagePanelSurface;\n\t/** Returns the opacity of the panel surface without affecting panel content. */\n\tgetSurfaceOpacity(): number;\n\t/** Returns a transient presentation scale applied to a rendered minimap model. */\n\tgetMinimapModelScale(): number;\n\t/** Returns the animated transition from the regular to the docked minimap view. */\n\tgetMinimapDockProgress(): number;\n\t/** Returns the viewport-space top edge used to anchor the rendered model. */\n\tgetMinimapModelTop(): number | undefined;\n\tgetMinimapModelCenterY?: () => number | undefined;\n\tgetMinimapModelLeft?(): number | undefined;\n}\n\nexport interface StageViewportRegistration {\n\tgetElement(): HTMLElement | undefined;\n}\n\nexport interface StageContext {\n\t/** Detail-page ownership; stale route cleanup cannot reset a newer media selection. */\n\tregisterDetailMedia?(read: () => import('../spatial-element/types.js').SpatialElementMediaItem['kind']): () => void;\n\t/** Cached browser layout metrics; unavailable during SSR. */\n\tgetLayoutMetrics?(mode?: 'stable' | 'visible'): import('../spatial-element/responsiveLayout.js').ResponsiveLayoutInput | undefined;\n\t/** Reactive in framework adapters; false during SSR and until the GPU has painted. */\n\tisEnhanced?(): boolean;\n\t/** Local-driver integration is opt-in and may trigger a browser permission prompt. */\n\tsetSpaceMouseEnabled?(enabled: boolean): void;\n\tisSpaceMouseEnabled?(): boolean;\n\tisSpaceMouseDesktop?(): boolean;\n\tgetSpaceMouseState?(): import('./spaceMousePlatform.js').SpaceMouseState;\n\tgetSpaceMousePermission?(): import('./spaceMousePermission.js').SpaceMousePermission;\n\tprefetchSpatialElement?(stage: import('../spatial-element/spatialElementScene.js').SpatialElementScene): void;\n\tregisterPanel(panel: StagePanelRegistration): () => void;\n\t/** Refresh appearance from registered getters without rebinding the page or its camera. */\n\tupdatePanelAppearance?(): void;\n\tregisterViewport(viewport: StageViewportRegistration): () => void;\n\t/** Restores the element camera to its initial fitted pose. */\n\tresetView(): void;\n\t/** True for both native fullscreen and its viewport fallback. */\n\tisFullscreen?(): boolean;\n\t/** Current camera zoom focus, from the fitted detail view (0) to close-up (1). */\n\tgetZoomFocus?(): number;\n\t/** Damped UI focus shared by panels and the document-scrolled detail pane. */\n\tgetZoomUiFocus?(): number;\n\tsetFullscreen?(fullscreen: boolean): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"panelContext.js","sourceRoot":"","sources":["../../src/stage/panelContext.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAEjD,uFAAuF;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D,+FAA+F;AAC/F,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC","sourcesContent":["\nimport type { LiquidGlassPanelOptions } from './LiquidGlassPanel.js';\nimport type { StageMinimapDockedView, StagePanelSurface } from './stageTypes.js';\n\nexport const STAGE_CONTEXT_KEY = Symbol('stage');\n\n/** Notifies an active stage that externally positioned panel frames changed layout. */\nexport const STAGE_PANEL_LAYOUT_EVENT = 'stage:panel-layout';\n\n/** Notifies an active stage that an external panel visual changed without affecting layout. */\nexport const STAGE_PANEL_VISUAL_EVENT = 'stage:panel-visual';\n\nexport interface StagePanelPose {\n\twidth: number;\n\theight: number;\n\tposition: { x: number; y: number };\n}\n\nexport interface StagePanelShape {\n\tradius: number;\n\tsquareBottom?: boolean;\n\tcontentInset?: number;\n}\n\nexport type StagePanelTheme = Omit<\n\tLiquidGlassPanelOptions,\n\t'width' | 'height' | 'position' | 'radius' | 'squareBottom'\n> & {\n\t/** Semantic surface style. Defaults to the WebGPU-backed `glass` mode. */\n\tsurface?: StagePanelSurface;\n};\n\n\n\nexport interface StagePanelMinimapOptions {\n\texpandedHeight?: number;\n\tinset?: number;\n\t/** Additional unbounded scale applied to the fitted model. Values below 0.2 are clamped. */\n\tmodelScale?: number;\n\t/** Model multiplier at full pointer hover. Use 1 to disable hover enlargement. */\n\thoverModelScale?: number;\n\t/** Hover multiplier used once the minimap is expanded by camera zoom. */\n\texpandedHoverModelScale?: number;\n\t/** Optional spatial-element-specific presentation used while the minimap is docked. */\n\tdockedView?: StageMinimapDockedView;\n\toverlayColor?: string | number;\n\toverlayOpacity?: number;\n\t/** Gaussian blur radius in CSS pixels. */\n\toverlayBlur?: number;\n\tcontextColor?: string | number;\n\tcontextOpacity?: number;\n\tviewportColor?: string | number;\n}\n\nexport interface StagePanelRegistration {\n\tgetContentInset(): number;\n\tgetElement(): HTMLElement | undefined;\n\tgetFrameElement(): HTMLElement | undefined;\n\tgetSurfaceElement(): HTMLElement | undefined;\n\tgetPointerReactive(): boolean | 'lift';\n\tgetFocusReactive?(): boolean | 'top-right';\n\t/** Neighbouring panel frame that shares a corner control's exit path. */\n\tgetFocusAnchor?(): HTMLElement | undefined;\n\tgetNativeContent?(): boolean;\n\t/** Runs synchronously before the native panel surface is measured and drawn. */\n\tupdateNativeLayout?(): void;\n\tgetVisible?(): boolean;\n\t/** Selection is read without rebuilding the minimap model. */\n\tgetMinimapSelected?(): boolean;\n\tgetMinimapOptions(): StagePanelMinimapOptions | undefined;\n\tgetOptions(): LiquidGlassPanelOptions;\n\tgetSurface(): StagePanelSurface;\n\t/** Returns the opacity of the panel surface without affecting panel content. */\n\tgetSurfaceOpacity(): number;\n\t/** Returns a transient presentation scale applied to a rendered minimap model. */\n\tgetMinimapModelScale(): number;\n\t/** Returns the animated transition from the regular to the docked minimap view. */\n\tgetMinimapDockProgress(): number;\n\t/** Returns the viewport-space top edge used to anchor the rendered model. */\n\tgetMinimapModelTop(): number | undefined;\n\tgetMinimapModelCenterY?: () => number | undefined;\n\tgetMinimapModelLeft?(): number | undefined;\n}\n\nexport interface StageViewportRegistration {\n\tgetElement(): HTMLElement | undefined;\n}\n\nexport interface StageContext {\n\t/** Detail-page ownership; stale route cleanup cannot reset a newer media selection. */\n\tregisterDetailMedia?(read: () => import('../spatial-element/types.js').SpatialElementMediaItem['kind']): () => void;\n\t/** Cached browser layout metrics; unavailable during SSR. */\n\tgetLayoutMetrics?(mode?: 'stable' | 'visible'): import('../spatial-element/responsiveLayout.js').ResponsiveLayoutInput | undefined;\n\t/** Reactive in framework adapters; false during SSR and until the GPU has painted. */\n\tisEnhanced?(): boolean;\n\t/** Local-driver integration is opt-in and may trigger a browser permission prompt. */\n\tsetSpaceMouseEnabled?(enabled: boolean): void;\n\tisSpaceMouseEnabled?(): boolean;\n\tisSpaceMouseDesktop?(): boolean;\n\tgetSpaceMouseState?(): import('./spaceMousePlatform.js').SpaceMouseState;\n\tgetSpaceMousePermission?(): import('./spaceMousePermission.js').SpaceMousePermission;\n\tprefetchSpatialElement?(stage: import('../spatial-element/spatialElementScene.js').SpatialElementScene): void;\n\tregisterPanel(panel: StagePanelRegistration): () => void;\n\t/** Refresh appearance from registered getters without rebinding the page or its camera. */\n\tupdatePanelAppearance?(): void;\n\tregisterViewport(viewport: StageViewportRegistration): () => void;\n\t/** Restores the element camera to its initial fitted pose. */\n\tresetView(): void;\n\t/** True for both native fullscreen and its viewport fallback. */\n\tisFullscreen?(): boolean;\n\t/** Current camera zoom focus, from the fitted detail view (0) to close-up (1). */\n\tgetZoomFocus?(): number;\n\t/** Damped UI focus shared by panels and the document-scrolled detail pane. */\n\tgetZoomUiFocus?(): number;\n\tsetFullscreen?(fullscreen: boolean): void;\n}\n"]}
|
|
@@ -27,6 +27,8 @@ export declare function getPanelFocusDirection(options: Pick<Required<LiquidGlas
|
|
|
27
27
|
};
|
|
28
28
|
/** Shared, eased progress for panel motion, blur, opacity and corner controls. */
|
|
29
29
|
export declare function getPanelFocusProgress(focus: number): number;
|
|
30
|
+
/** Inverse of the shared curve, for a timeline that already owns eased progress. */
|
|
31
|
+
export declare function getPanelFocusFromProgress(progress: number): number;
|
|
30
32
|
/** Stacked detail content leaves as one row, without sideways perspective drift. */
|
|
31
33
|
export declare function getStackedDetailFocusOffset(focus: number, viewportHeight: number): {
|
|
32
34
|
x: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelFocusMath.d.ts","sourceRoot":"","sources":["../../src/stage/panelFocusMath.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AASrE,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAIrE;AAED,wFAAwF;AACxF,wBAAgB,sBAAsB,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAEzE;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAC7C,QAAQ,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAClC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM;;;EAiBtB;AAED,mFAAmF;AACnF,wBAAgB,mBA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M,CAAA;CAAE,EAClC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM;;;EAiBtB;AAED,mFAAmF;AACnF,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC,EACjF,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM;;;;EAqBtB;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC,EACjF,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM;;;EAYnB;AAED,kFAAkF;AAClF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,UAElD;AAED,oFAAoF;AACpF,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,UAIzD;AAED,oFAAoF;AACpF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;;;;EAEhF;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,UAEjD;AAED,kEAAkE;AAClE,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,UAKpE"}
|
|
@@ -66,6 +66,14 @@ export function getPanelFocusDirection(options, normalizedX, normalizedY) {
|
|
|
66
66
|
export function getPanelFocusProgress(focus) {
|
|
67
67
|
return smoothstep(0.08, 0.96, focus);
|
|
68
68
|
}
|
|
69
|
+
/** Inverse of the shared curve, for a timeline that already owns eased progress. */
|
|
70
|
+
export function getPanelFocusFromProgress(progress) {
|
|
71
|
+
if (progress <= 0)
|
|
72
|
+
return 0;
|
|
73
|
+
if (progress >= 1)
|
|
74
|
+
return 1;
|
|
75
|
+
return 0.08 + 0.88 * (0.5 - Math.sin(Math.asin(1 - 2 * progress) / 3));
|
|
76
|
+
}
|
|
69
77
|
/** Stacked detail content leaves as one row, without sideways perspective drift. */
|
|
70
78
|
export function getStackedDetailFocusOffset(focus, viewportHeight) {
|
|
71
79
|
return { x: 0, y: -viewportHeight * 0.6 * getPanelFocusProgress(focus), z: 0 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelFocusMath.js","sourceRoot":"","sources":["../../src/stage/panelFocusMath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EACN,iCAAiC,EACjC,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,yEAAyE;AACzE,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,KAAa,EAAE,KAAa;IACrE,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,MAAM,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,sBAAsB,CAAC,cAAsB,EAAE,GAAW;IACzE,OAAO,CAAC,cAAc,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAC7C,QAAkC,EACl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,GAAG,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAChF,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,oBAAoB,CAAC,KAAa;IACjD,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,uBAAuB,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;AAClF,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,iBAAiB,CAChC,KAAa,EACb,OAAoE;IAEpE,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IACvE,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACxE,OAAO,oBAAoB,GAAG,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACxE,CAAC","sourcesContent":["import * as ScalarMath from './scalarMath.js';\nimport type { LiquidGlassPanelOptions } from './LiquidGlassPanel.js';\nimport {\n\tPANEL_FOCUS_PERSPECTIVE_MAX_SCALE,\n\tPANEL_FOCUS_MAX_OFFSET,\n\tPANEL_FOCUS_MAX_ADVANCE,\n\tPANEL_FOCUS_MIN_OPACITY,\n\tPANEL_FOCUS_MAX_BLUR\n} from './stageConstants.js';\n\n/** Applies the cubic Hermite smoothstep curve with clamped endpoints. */\nexport function smoothstep(edge0: number, edge1: number, value: number) {\n\tif (edge0 === edge1) return value < edge0 ? 0 : 1;\n\tconst t = ScalarMath.clamp((value - edge0) / (edge1 - edge0), 0, 1);\n\treturn t * t * (3 - 2 * t);\n}\n\n/** Returns the perspective camera distance that maps viewport pixels to world units. */\nexport function getPerspectiveDistance(viewportHeight: number, fov: number) {\n\treturn (viewportHeight * 0.5) / Math.tan(ScalarMath.degToRad(fov * 0.5));\n}\n\n/**\n * Restores the outward screen-space drift that an off-axis panel would receive\n * from the shared perspective while leaving its hover projection panel-local.\n */\nexport function getPanelFocusPerspectiveOffset(\n\tposition: { x: number; y: number },\n\tadvance: number,\n\tcameraDistance: number\n) {\n\tconst safeCameraDistance = Math.max(Number.isFinite(cameraDistance) ? cameraDistance : 1, 1);\n\tconst safeAdvance = Math.max(Number.isFinite(advance) ? advance : 0, 0);\n\tif (safeAdvance <= 0) return { x: 0, y: 0 };\n\n\tconst projectionScale = ScalarMath.clamp(\n\t\tsafeCameraDistance / Math.max(safeCameraDistance - safeAdvance, 1),\n\t\t1,\n\t\tPANEL_FOCUS_PERSPECTIVE_MAX_SCALE\n\t);\n\tconst egressScale = projectionScale - 1;\n\n\treturn {\n\t\tx: position.x * egressScale,\n\t\ty: position.y * egressScale\n\t};\n}\n\n/** Computes the camera-facing travel used to clear panels during close-up zoom. */\nexport function getPanelFocusOffset(\n\toptions: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height' | 'position'>,\n\tfocus: number,\n\tviewportWidth: number,\n\tviewportHeight: number\n) {\n\tif (focus <= 0.001) return { x: 0, y: 0, z: 0 };\n\tconst edgeDistanceX = Math.max(viewportWidth * 0.5 - options.width * 0.5, 1);\n\tconst edgeDistanceY = Math.max(viewportHeight * 0.5 - options.height * 0.5, 1);\n\tconst normalizedX = options.position.x / edgeDistanceX;\n\tconst normalizedY = options.position.y / edgeDistanceY;\n\tconst direction = getPanelFocusDirection(options, normalizedX, normalizedY);\n\tconst horizontal = Math.abs(direction.x) > Math.abs(direction.y);\n\tconst axisSize = horizontal ? options.width : options.height;\n\tconst travel = ScalarMath.clamp(\n\t\taxisSize * (horizontal ? 0.16 : 0.42),\n\t\thorizontal ? 48 : 18,\n\t\tPANEL_FOCUS_MAX_OFFSET\n\t);\n\tconst easedFocus = getPanelFocusProgress(focus);\n\treturn {\n\t\tx: direction.x * travel * easedFocus,\n\t\ty: direction.y * travel * easedFocus,\n\t\tz: PANEL_FOCUS_MAX_ADVANCE * easedFocus\n\t};\n}\n\n/** Chooses the least disruptive edge toward which a focused panel should travel. */\nexport function getPanelFocusDirection(\n\toptions: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height' | 'position'>,\n\tnormalizedX: number,\n\tnormalizedY: number\n) {\n\tconst aspect = options.width / Math.max(options.height, 1);\n\tconst absX = Math.abs(normalizedX);\n\tconst absY = Math.abs(normalizedY);\n\tif (aspect >= 2.4 && absY > 0.12) return { x: 0, y: Math.sign(normalizedY) || 1 };\n\tif (absX > absY * 0.8) return { x: Math.sign(normalizedX) || 1, y: 0 };\n\tif (absY > absX * 0.8) return { x: 0, y: Math.sign(normalizedY) || 1 };\n\tif (normalizedX * normalizedX + normalizedY * normalizedY < 0.02)\n\t\treturn { x: 0, y: options.position.y >= 0 ? 1 : -1 };\n\tconst length = Math.hypot(normalizedX, normalizedY);\n\treturn { x: normalizedX / length, y: normalizedY / length };\n}\n\n/** Shared, eased progress for panel motion, blur, opacity and corner controls. */\nexport function getPanelFocusProgress(focus: number) {\n\treturn smoothstep(0.08, 0.96, focus);\n}\n\n/** Stacked detail content leaves as one row, without sideways perspective drift. */\nexport function getStackedDetailFocusOffset(focus: number, viewportHeight: number) {\n\treturn { x: 0, y: -viewportHeight * 0.6 * getPanelFocusProgress(focus), z: 0 };\n}\n\n/** Returns panel opacity at a normalized stage UI focus level. */\nexport function getPanelFocusOpacity(focus: number) {\n\treturn ScalarMath.lerp(1, PANEL_FOCUS_MIN_OPACITY, getPanelFocusProgress(focus));\n}\n\n/** Returns CSS content blur at a normalized stage focus level. */\nexport function getPanelFocusBlur(\n\tfocus: number,\n\toptions: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height'>\n) {\n\tconst shortSide = Math.max(Math.min(options.width, options.height), 1);\n\tconst sizeScale = ScalarMath.clamp(Math.sqrt(shortSide / 240), 0.34, 1);\n\treturn PANEL_FOCUS_MAX_BLUR * sizeScale * getPanelFocusProgress(focus);\n}\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OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,cAAc,GAAG,GAAG,GAAG,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAChF,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,oBAAoB,CAAC,KAAa;IACjD,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,uBAAuB,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;AAClF,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,iBAAiB,CAChC,KAAa,EACb,OAAoE;IAEpE,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IACvE,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACxE,OAAO,oBAAoB,GAAG,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACxE,CAAC","sourcesContent":["import * as ScalarMath from './scalarMath.js';\nimport type { LiquidGlassPanelOptions } from './LiquidGlassPanel.js';\nimport {\n\tPANEL_FOCUS_PERSPECTIVE_MAX_SCALE,\n\tPANEL_FOCUS_MAX_OFFSET,\n\tPANEL_FOCUS_MAX_ADVANCE,\n\tPANEL_FOCUS_MIN_OPACITY,\n\tPANEL_FOCUS_MAX_BLUR\n} from './stageConstants.js';\n\n/** Applies the cubic Hermite smoothstep curve with clamped endpoints. */\nexport function smoothstep(edge0: number, edge1: number, value: number) {\n\tif (edge0 === edge1) return value < edge0 ? 0 : 1;\n\tconst t = ScalarMath.clamp((value - edge0) / (edge1 - edge0), 0, 1);\n\treturn t * t * (3 - 2 * t);\n}\n\n/** Returns the perspective camera distance that maps viewport pixels to world units. */\nexport function getPerspectiveDistance(viewportHeight: number, fov: number) {\n\treturn (viewportHeight * 0.5) / Math.tan(ScalarMath.degToRad(fov * 0.5));\n}\n\n/**\n * Restores the outward screen-space drift that an off-axis panel would receive\n * from the shared perspective while leaving its hover projection panel-local.\n */\nexport function getPanelFocusPerspectiveOffset(\n\tposition: { x: number; y: number },\n\tadvance: number,\n\tcameraDistance: number\n) {\n\tconst safeCameraDistance = Math.max(Number.isFinite(cameraDistance) ? cameraDistance : 1, 1);\n\tconst safeAdvance = Math.max(Number.isFinite(advance) ? advance : 0, 0);\n\tif (safeAdvance <= 0) return { x: 0, y: 0 };\n\n\tconst projectionScale = ScalarMath.clamp(\n\t\tsafeCameraDistance / Math.max(safeCameraDistance - safeAdvance, 1),\n\t\t1,\n\t\tPANEL_FOCUS_PERSPECTIVE_MAX_SCALE\n\t);\n\tconst egressScale = projectionScale - 1;\n\n\treturn {\n\t\tx: position.x * egressScale,\n\t\ty: position.y * egressScale\n\t};\n}\n\n/** Computes the camera-facing travel used to clear panels during close-up zoom. */\nexport function getPanelFocusOffset(\n\toptions: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height' | 'position'>,\n\tfocus: number,\n\tviewportWidth: number,\n\tviewportHeight: number\n) {\n\tif (focus <= 0.001) return { x: 0, y: 0, z: 0 };\n\tconst edgeDistanceX = Math.max(viewportWidth * 0.5 - options.width * 0.5, 1);\n\tconst edgeDistanceY = Math.max(viewportHeight * 0.5 - options.height * 0.5, 1);\n\tconst normalizedX = options.position.x / edgeDistanceX;\n\tconst normalizedY = options.position.y / edgeDistanceY;\n\tconst direction = getPanelFocusDirection(options, normalizedX, normalizedY);\n\tconst horizontal = Math.abs(direction.x) > Math.abs(direction.y);\n\tconst axisSize = horizontal ? options.width : options.height;\n\tconst travel = ScalarMath.clamp(\n\t\taxisSize * (horizontal ? 0.16 : 0.42),\n\t\thorizontal ? 48 : 18,\n\t\tPANEL_FOCUS_MAX_OFFSET\n\t);\n\tconst easedFocus = getPanelFocusProgress(focus);\n\treturn {\n\t\tx: direction.x * travel * easedFocus,\n\t\ty: direction.y * travel * easedFocus,\n\t\tz: PANEL_FOCUS_MAX_ADVANCE * easedFocus\n\t};\n}\n\n/** Chooses the least disruptive edge toward which a focused panel should travel. */\nexport function getPanelFocusDirection(\n\toptions: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height' | 'position'>,\n\tnormalizedX: number,\n\tnormalizedY: number\n) {\n\tconst aspect = options.width / Math.max(options.height, 1);\n\tconst absX = Math.abs(normalizedX);\n\tconst absY = Math.abs(normalizedY);\n\tif (aspect >= 2.4 && absY > 0.12) return { x: 0, y: Math.sign(normalizedY) || 1 };\n\tif (absX > absY * 0.8) return { x: Math.sign(normalizedX) || 1, y: 0 };\n\tif (absY > absX * 0.8) return { x: 0, y: Math.sign(normalizedY) || 1 };\n\tif (normalizedX * normalizedX + normalizedY * normalizedY < 0.02)\n\t\treturn { x: 0, y: options.position.y >= 0 ? 1 : -1 };\n\tconst length = Math.hypot(normalizedX, normalizedY);\n\treturn { x: normalizedX / length, y: normalizedY / length };\n}\n\n/** Shared, eased progress for panel motion, blur, opacity and corner controls. */\nexport function getPanelFocusProgress(focus: number) {\n\treturn smoothstep(0.08, 0.96, focus);\n}\n\n/** Inverse of the shared curve, for a timeline that already owns eased progress. */\nexport function getPanelFocusFromProgress(progress: number) {\n\tif (progress <= 0) return 0;\n\tif (progress >= 1) return 1;\n\treturn 0.08 + 0.88 * (0.5 - Math.sin(Math.asin(1 - 2 * progress) / 3));\n}\n\n/** Stacked detail content leaves as one row, without sideways perspective drift. */\nexport function getStackedDetailFocusOffset(focus: number, viewportHeight: number) {\n\treturn { x: 0, y: -viewportHeight * 0.6 * getPanelFocusProgress(focus), z: 0 };\n}\n\n/** Returns panel opacity at a normalized stage UI focus level. */\nexport function getPanelFocusOpacity(focus: number) {\n\treturn ScalarMath.lerp(1, PANEL_FOCUS_MIN_OPACITY, getPanelFocusProgress(focus));\n}\n\n/** Returns CSS content blur at a normalized stage focus level. */\nexport function getPanelFocusBlur(\n\tfocus: number,\n\toptions: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height'>\n) {\n\tconst shortSide = Math.max(Math.min(options.width, options.height), 1);\n\tconst sizeScale = ScalarMath.clamp(Math.sqrt(shortSide / 240), 0.34, 1);\n\treturn PANEL_FOCUS_MAX_BLUR * sizeScale * getPanelFocusProgress(focus);\n}\n"]}
|
|
@@ -57,6 +57,7 @@ export interface StageVisualTestController {
|
|
|
57
57
|
getSpatialCapture(): ReturnType<StageExperience['getSpatialCapture']> | null;
|
|
58
58
|
/** Clip matrix of the bound detail owner, after the retained source is released. */
|
|
59
59
|
getDetailProjection(kind: 'hero' | 'dock'): number[] | null;
|
|
60
|
+
getOutlinePose(): ReturnType<StageExperience['getVisualTestOutlinePose']>;
|
|
60
61
|
releaseSpatialCapture(): void;
|
|
61
62
|
getCatalogOwnership(): ReturnType<import('../catalog/CatalogTransition.js').CatalogTransition['getOwnership']>;
|
|
62
63
|
/** Query-gated fixture registration for ambiguity/teardown tests. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stageVisualTest.d.ts","sourceRoot":"","sources":["../../src/stage/stageVisualTest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,WAAW,mBAAmB;IACnC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iCAAiC;IACjD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,yBAAyB,GAAG,CAAC,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C,CAAC;IACzD,wEAAwE;IACxE,kBAAkB,IAAI,8BAA8B,CAAC;IACrD,6FAA6F;IAC7F,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,mEAAmE;IACnE,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,4DAA4D;IAC5D,QAAQ,IAAI,mBAAmB,CAAC;CAChC;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;KAC9C;CACD;AAED,gGAAgG;AAChG,wBAAgB,qBAAqB,YAEpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stageVisualTest.js","sourceRoot":"","sources":["../../src/stage/stageVisualTest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stageVisualTest.js","sourceRoot":"","sources":["../../src/stage/stageVisualTest.ts"],"names":[],"mappings":"AAoHA,gGAAgG;AAChG,MAAM,UAAU,qBAAqB;IACpC,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,GAAG,CAAC;AAC9E,CAAC","sourcesContent":["import type { StageVisualTestView, StageZoomFocusState } from './stageTypes.js';\nimport type { StageExperience } from './StageExperience.js';\n\nexport interface StageVisualTestRect {\n\tx: number;\n\ty: number;\n\twidth: number;\n\theight: number;\n}\n\nexport interface StageVisualTestMinimapRenderStats {\n\toverlayCapturePasses: number;\n\tdepthNear: number;\n\tdepthFar: number;\n\tviewportRingInForeground: boolean;\n}\n\nexport type StageVisualTestQuaternion = [number, number, number, number];\n\nexport interface StageVisualTestMinimapOrientation {\n\trest: StageVisualTestQuaternion;\n\tdisplay: StageVisualTestQuaternion;\n\tlive: StageVisualTestQuaternion;\n\tdocked: StageVisualTestQuaternion | null;\n\tdockProgress: number;\n}\n\nexport type StageVisualTestRenderTargetStats = ReturnType<\n\tStageExperience['getVisualTestRenderTargetStats']\n>;\n\nexport interface StageVisualTestVisibilityStats {\n\tstageViewportVisible: boolean;\n\tvisiblePanels: number;\n\tvisibleMinimaps: number;\n\tstageModelRenderPasses: number;\n\tpanelBlurRenderPasses: number;\n\tpanelSceneRenderPasses: number;\n\tminimapSceneRenderPasses: number;\n}\n\n/** Browser-only controls exposed when a stage is opened with `?stage-test=1`. */\nexport interface StageVisualTestController {\n\tgetNavigationTimings(): { dataReady: number; captured: number; restoring: number; bound: number;\n\t\tearly?: { started: number; entered: number; captured: number; prepared: number; firstMotion: number;\n\t\t\tfirstSubmitted: number; motionEnded: number; holdStarted: number; held: number; committed: number;\n\t\t\trevealStarted: number; revealEnded: number; revealed: number } };\n\tcaptureHeroPresentation(): boolean;\n\tgetSpatialCapture(): ReturnType<StageExperience['getSpatialCapture']> | null;\n\t/** Clip matrix of the bound detail owner, after the retained source is released. */\n\tgetDetailProjection(kind: 'hero' | 'dock'): number[] | null;\n\tgetOutlinePose(): ReturnType<StageExperience['getVisualTestOutlinePose']>;\n\treleaseSpatialCapture(): void;\n\tgetCatalogOwnership(): ReturnType<\n\t\timport('../catalog/CatalogTransition.js').CatalogTransition['getOwnership']\n\t>;\n\t/** Query-gated fixture registration for ambiguity/teardown tests. */\n\tregisterCatalogEndpoint(\n\t\taddress: import('../catalog/CatalogEndpointRegistry.js').CatalogEndpointAddress,\n\t\telement: HTMLElement\n\t): () => void;\n\tgetCatalogEndpoints(): ReturnType<\n\t\timport('../catalog/CatalogEndpointRegistry.js').CatalogEndpointRegistry['getSnapshot']\n\t>;\n\tloseDevice(): void;\n\t/** Holds one destination after DOM commit to verify its pre-render visibility gate. */\n\tholdNextPageBinding(): void;\n\treleasePageBinding(): void;\n\tgetCatalogPresentation(): ReturnType<StageExperience['getCatalogPresentation']> | null;\n\t/** Resource ownership diagnostics for catalog navigation acceptance. */\n\tgetCarouselStats(): ReturnType<\n\t\timport('../catalog/CatalogSpatialElementLayer.js').CatalogSpatialElementLayer['getStats']\n\t> | null;\n\tgetCatalogStats(): ReturnType<StageExperience['assets']['getStats']> | null;\n\t/** Read-only current animation, queued-frame and preparation metadata; does not wait for idle. */\n\tgetRenderActivity(): ReturnType<StageExperience['getVisualTestRenderActivity']> | null;\n\t/** Applies a deterministic camera pose and waits until dependent render state settles. */\n\tsetView(view: StageVisualTestView, frames?: number): Promise<void>;\n\t/** Applies an equivalent zoom through the SpaceMouse camera/target dolly path. */\n\tsetSpaceMouseZoom(zoom: number): Promise<void>;\n\t/** Repeats SpaceMouse updates while frames render, leaving the synthetic gesture active. */\n\tdriveSpaceMouseZoom(zoom: number, frames?: number): Promise<void>;\n\t/** Ends a synthetic SpaceMouse gesture and lets dependent render state settle. */\n\tstopSpaceMouse(): Promise<void>;\n\t/** Returns the current rendered minimap bounds in viewport pixels. */\n\tgetMinimapRect(): StageVisualTestRect | null;\n\t/** Returns the current projected surface bounds for a registered panel frame. */\n\tgetPanelRect(frame: HTMLElement): StageVisualTestRect | null;\n\t/** Returns the projected main element bounds in viewport pixels. */\n\tgetModelRect(): StageVisualTestRect | null;\n\t/** Returns the projected 3D element bounds in viewport pixels. */\n\tgetMinimapModelRect(): StageVisualTestRect | null;\n\t/** Returns the visible viewport mask in minimap-local pixels. */\n\tgetMinimapViewportRect(): StageVisualTestRect | null;\n\t/** Returns canonical, displayed, and fully synchronized minimap orientations. */\n\tgetMinimapOrientation(): StageVisualTestMinimapOrientation | null;\n\t/** Returns minimap overlay submissions for performance regression tests. */\n\tgetMinimapRenderStats(): StageVisualTestMinimapRenderStats;\n\t/** Returns target allocation, resize, and warm-up counters. */\n\tgetRenderTargetStats(): StageVisualTestRenderTargetStats;\n\t/** Returns current culling state and submitted render-pass counters. */\n\tgetVisibilityStats(): StageVisualTestVisibilityStats;\n\t/** Restores the exact fitted camera pose without running the user-facing reset animation. */\n\treset(): Promise<void>;\n\t/** Advances the renderer by a fixed number of synthetic frames. */\n\tsettle(frames?: number): Promise<void>;\n\t/** Returns the latest zoom phases reported by the stage. */\n\tgetState(): StageZoomFocusState;\n}\n\ndeclare global {\n\tinterface Window {\n\t\t__stageVisualTest?: StageVisualTestController;\n\t}\n}\n\n/** Returns whether the current page explicitly requested deterministic visual-test controls. */\nexport function isStageVisualTestMode() {\n\treturn new URLSearchParams(window.location.search).get('stage-test') === '1';\n}\n"]}
|