@spatial-elements/core 1.0.0-beta.12 → 1.0.0-beta.14
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/catalog/CarouselSectionSurfaces.d.ts.map +1 -1
- package/dist/catalog/CarouselSectionSurfaces.js +8 -2
- package/dist/catalog/CarouselSectionSurfaces.js.map +1 -1
- package/dist/catalog/CatalogSpatialElementLayer.d.ts.map +1 -1
- package/dist/catalog/CatalogSpatialElementLayer.js +12 -4
- package/dist/catalog/CatalogSpatialElementLayer.js.map +1 -1
- package/dist/catalog/SourceDomMotion.d.ts.map +1 -1
- package/dist/catalog/SourceDomMotion.js +2 -3
- package/dist/catalog/SourceDomMotion.js.map +1 -1
- package/dist/catalog/carouselRenderClip.d.ts +4 -0
- package/dist/catalog/carouselRenderClip.d.ts.map +1 -0
- package/dist/catalog/carouselRenderClip.js +15 -0
- package/dist/catalog/carouselRenderClip.js.map +1 -0
- package/dist/spatial-element/SpatialElementPaneController.d.ts +4 -4
- package/dist/spatial-element/SpatialElementPaneController.d.ts.map +1 -1
- package/dist/spatial-element/SpatialElementPaneController.js +49 -23
- package/dist/spatial-element/SpatialElementPaneController.js.map +1 -1
- package/dist/spatial-element/responsiveLayout.d.ts.map +1 -1
- package/dist/spatial-element/responsiveLayout.js +4 -2
- package/dist/spatial-element/responsiveLayout.js.map +1 -1
- package/dist/stage/DetailWheelGesture.d.ts +11 -0
- package/dist/stage/DetailWheelGesture.d.ts.map +1 -0
- package/dist/stage/DetailWheelGesture.js +19 -0
- package/dist/stage/DetailWheelGesture.js.map +1 -0
- package/dist/stage/HeldSceneCapture.d.ts +15 -0
- package/dist/stage/HeldSceneCapture.d.ts.map +1 -0
- package/dist/stage/HeldSceneCapture.js +48 -0
- package/dist/stage/HeldSceneCapture.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 +5 -0
- package/dist/stage/PanelPresentationController.d.ts.map +1 -1
- package/dist/stage/PanelPresentationController.js +76 -30
- package/dist/stage/PanelPresentationController.js.map +1 -1
- package/dist/stage/SpaceMouseAdapter.js +8 -6
- package/dist/stage/SpaceMouseAdapter.js.map +1 -1
- package/dist/stage/SpatialElementInteractionController.d.ts +44 -1
- package/dist/stage/SpatialElementInteractionController.d.ts.map +1 -1
- package/dist/stage/SpatialElementInteractionController.js +378 -39
- 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 +39 -21
- package/dist/stage/StageExperience.js.map +1 -1
- package/dist/stage/StageRenderPipeline.d.ts +4 -0
- package/dist/stage/StageRenderPipeline.d.ts.map +1 -1
- package/dist/stage/StageRenderPipeline.js +30 -8
- 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/cssProjection.d.ts +3 -1
- package/dist/stage/cssProjection.d.ts.map +1 -1
- package/dist/stage/cssProjection.js +8 -3
- package/dist/stage/cssProjection.js.map +1 -1
- 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/rendererState.d.ts.map +1 -1
- package/dist/stage/rendererState.js +24 -9
- package/dist/stage/rendererState.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceDomMotion.d.ts","sourceRoot":"","sources":["../../src/catalog/SourceDomMotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,
|
|
1
|
+
{"version":3,"file":"SourceDomMotion.d.ts","sourceRoot":"","sources":["../../src/catalog/SourceDomMotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAkC,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnG,MAAM,WAAW,mBAAmB;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,iBAAiB,CAAA;CAAE;AAClG,MAAM,WAAW,eAAe;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;AAE9F,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAEzH;AAOD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAW7H;AAED,8EAA8E;AAC9E,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,eAAe,eAQ3E,MAAM,sCAMxB;AAOD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,eAAe;uBAwBrF,MAAM;;;cAqBhC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Matrix4 } from 'three';
|
|
2
|
-
import {
|
|
2
|
+
import { getProjectiveCssMatrixElements } from '../stage/cssProjection.js';
|
|
3
3
|
export function sourceDomProjectiveMatrix(corners, width, height) {
|
|
4
|
-
|
|
5
|
-
return css ? css.slice(9, -1).split(',').map(Number) : undefined;
|
|
4
|
+
return getProjectiveCssMatrixElements(corners, width, height) ?? undefined;
|
|
6
5
|
}
|
|
7
6
|
function projectiveMatrix(corners, width, height) {
|
|
8
7
|
const values = sourceDomProjectiveMatrix(corners, width, height);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceDomMotion.js","sourceRoot":"","sources":["../../src/catalog/SourceDomMotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAA0B,MAAM,2BAA2B,CAAC;AAK7F,MAAM,UAAU,yBAAyB,CAAC,OAA0B,EAAE,KAAa,EAAE,MAAc;IAClG,MAAM,GAAG,GAAG,wBAAwB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC7D,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAClE,CAAC;AAED,SAAS,gBAAgB,CAAC,OAA0B,EAAE,KAAa,EAAE,MAAc;IAClF,MAAM,MAAM,GAAG,yBAAyB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACjE,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CA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O,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YAC7C,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC","sourcesContent":["import { Matrix4 } from 'three';\nimport { getProjectiveCssMatrix3d, type CssProjectionQuad } from '../stage/cssProjection.js';\n\nexport interface SourceDomProjection { width: number; height: number; corners: CssProjectionQuad }\nexport interface SourceDomTarget { left: number; top: number; width: number; height?: number }\n\nexport function sourceDomProjectiveMatrix(corners: CssProjectionQuad, width: number, height: number): number[] | undefined {\n\tconst css = getProjectiveCssMatrix3d(corners, width, height);\n\treturn css ? css.slice(9, -1).split(',').map(Number) : undefined;\n}\n\nfunction projectiveMatrix(corners: CssProjectionQuad, width: number, height: number) {\n\tconst values = sourceDomProjectiveMatrix(corners, width, height);\n\treturn values ? new Matrix4().fromArray(values) : undefined;\n}\n\nexport function sourceDomMotionQuad(source: SourceDomProjection, target: SourceDomTarget, progress: number): CssProjectionQuad {\n\tconst t = Math.min(1, Math.max(0, progress));\n\tconst height = target.height ?? source.height * target.width / source.width;\n\tconst end = [\n\t\t{ x: target.left, y: target.top }, { x: target.left + target.width, y: target.top },\n\t\t{ x: target.left + target.width, y: target.top + height }, { x: target.left, y: target.top + height }\n\t];\n\treturn source.corners.map((point, index) => ({\n\t\tx: point.x + (end[index].x - point.x) * t,\n\t\ty: point.y + (end[index].y - point.y) * t\n\t})) as unknown as CssProjectionQuad;\n}\n\n/** A planar correction on the RIGHT of the original local CSS3D transform. */\nexport function createSourceDomProjection(source: SourceDomProjection, target: SourceDomTarget) {\n\tif (![source.width, source.height, target.width].every(value => Number.isFinite(value) && value > 0) ||\n\t\t![target.left, target.top].every(Number.isFinite)) return;\n\tconst height = target.height ?? source.height * target.width / source.width;\n\tif (!Number.isFinite(height) || height <= 0) return;\n\tconst start = projectiveMatrix(source.corners, source.width, source.height);\n\tif (!start || !Number.isFinite(start.determinant()) || Math.abs(start.determinant()) < 1e-12) return;\n\tconst inverse = start.invert();\n\treturn (progress: number) => {\n\t\tif (!Number.isFinite(progress)) return;\n\t\tconst corners = sourceDomMotionQuad(source, target, progress);\n\t\tconst current = projectiveMatrix(corners, source.width, source.height);\n\t\treturn current ? inverse.clone().multiply(current) : undefined;\n\t};\n}\n\nconst OWNED_PROPERTIES = [\n\t'transform', 'transform-origin', 'width', 'height', 'min-width', 'max-width',\n\t'min-height', 'max-height', 'box-sizing', 'transition', 'animation', 'will-change', 'visibility'\n] as const;\n\n/**\n * Moves the existing node in its existing parent. No node creation, removal,\n * reparenting, destination layout, or renderer work occurs during this motion.\n * Callers freeze competing transform writers and keep clipping ancestors stable.\n */\nexport function createSourceDomMotion(element: HTMLElement, source: SourceDomProjection, target: SourceDomTarget) {\n\tconst project = createSourceDomProjection(source, target);\n\tif (!project) return;\n\tconst computed = getComputedStyle(element);\n\t// Individual transform properties precede `transform`. Until captured as part\n\t// of the local matrix, authored use must keep the ordinary transition path.\n\tif ([computed.translate, computed.rotate, computed.scale].some(value => value && value !== 'none')) return;\n\tconst origin = computed.transformOrigin.split(' ').map(Number.parseFloat);\n\tif (!Number.isFinite(origin[0]) || !Number.isFinite(origin[1])) return;\n\tconst css = new DOMMatrix(computed.transform === 'none' ? undefined : computed.transform);\n\tconst local = new Matrix4().makeTranslation(origin[0], origin[1], origin[2] || 0)\n\t\t.multiply(new Matrix4().fromArray(css.toFloat64Array()))\n\t\t.multiply(new Matrix4().makeTranslation(-origin[0], -origin[1], -(origin[2] || 0)));\n\tconst saved = OWNED_PROPERTIES.map(property => ({ property,\n\t\tvalue: element.style.getPropertyValue(property), priority: element.style.getPropertyPriority(property) }));\n\tconst write = (property: string, value: string) => element.style.setProperty(property, value, 'important');\n\t// Freeze the captured border box, retaining the source's own query width and\n\t// line wrapping. Its later intrinsic destination height belongs to reveal.\n\twrite('box-sizing', 'border-box');\n\tfor (const property of ['width', 'min-width', 'max-width']) write(property, `${source.width}px`);\n\tfor (const property of ['height', 'min-height', 'max-height']) write(property, `${source.height}px`);\n\twrite('transition', 'none'); write('animation', 'none');\n\twrite('transform-origin', '0px 0px 0px'); write('will-change', 'transform');\n\tlet restored = false;\n\tconst update = (progress: number) => {\n\t\tif (restored) return;\n\t\tconst delta = project(progress);\n\t\tif (!delta) return;\n\t\tconst matrix = local.clone().multiply(delta);\n\t\twrite('transform', `matrix3d(${matrix.elements.map(value => Math.abs(value) < 1e-12 ? 0 : value).join(',')})`);\n\t\treturn sourceDomMotionQuad(source, target, progress);\n\t};\n\tupdate(0);\n\treturn {\n\t\tupdate,\n\t\thide() { if (!restored) write('visibility', 'hidden'); },\n\t\trestore() {\n\t\t\tif (restored) return;\n\t\t\trestored = true;\n\t\t\tfor (const { property, value, priority } of saved) {\n\t\t\t\tif (value) element.style.setProperty(property, value, priority);\n\t\t\t\telse element.style.removeProperty(property);\n\t\t\t}\n\t\t}\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SourceDomMotion.js","sourceRoot":"","sources":["../../src/catalog/SourceDomMotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,8BAA8B,EAA0B,MAAM,2BAA2B,CAAC;AAKnG,MAAM,UAAU,yBAAyB,CAAC,OAA0B,EAAE,KAAa,EAAE,MAAc;IAClG,OAAO,8BAA8B,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,SAAS,CAAC;AAC5E,CAAC;AAED,SAAS,gBAAgB,CAAC,OAA0B,EAAE,KAAa,EAAE,MAAc;IAClF,MAAM,MAAM,GAAG,yBAAyB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACjE,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAA2B,EAAE,MAAuB,EAAE,QAAgB;IACzG,MAAM,CAAC,GAAG,I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 'three';\nimport { getProjectiveCssMatrixElements, type CssProjectionQuad } from '../stage/cssProjection.js';\n\nexport interface SourceDomProjection { width: number; height: number; corners: CssProjectionQuad }\nexport interface SourceDomTarget { left: number; top: number; width: number; height?: number }\n\nexport function sourceDomProjectiveMatrix(corners: CssProjectionQuad, width: number, height: number): number[] | undefined {\n\treturn getProjectiveCssMatrixElements(corners, width, height) ?? undefined;\n}\n\nfunction projectiveMatrix(corners: CssProjectionQuad, width: number, height: number) {\n\tconst values = sourceDomProjectiveMatrix(corners, width, height);\n\treturn values ? new Matrix4().fromArray(values) : undefined;\n}\n\nexport function sourceDomMotionQuad(source: SourceDomProjection, target: SourceDomTarget, progress: number): CssProjectionQuad {\n\tconst t = Math.min(1, Math.max(0, progress));\n\tconst height = target.height ?? source.height * target.width / source.width;\n\tconst end = [\n\t\t{ x: target.left, y: target.top }, { x: target.left + target.width, y: target.top },\n\t\t{ x: target.left + target.width, y: target.top + height }, { x: target.left, y: target.top + height }\n\t];\n\treturn source.corners.map((point, index) => ({\n\t\tx: point.x + (end[index].x - point.x) * t,\n\t\ty: point.y + (end[index].y - point.y) * t\n\t})) as unknown as CssProjectionQuad;\n}\n\n/** A planar correction on the RIGHT of the original local CSS3D transform. */\nexport function createSourceDomProjection(source: SourceDomProjection, target: SourceDomTarget) {\n\tif (![source.width, source.height, target.width].every(value => Number.isFinite(value) && value > 0) ||\n\t\t![target.left, target.top].every(Number.isFinite)) return;\n\tconst height = target.height ?? source.height * target.width / source.width;\n\tif (!Number.isFinite(height) || height <= 0) return;\n\tconst start = projectiveMatrix(source.corners, source.width, source.height);\n\tif (!start || !Number.isFinite(start.determinant()) || Math.abs(start.determinant()) < 1e-12) return;\n\tconst inverse = start.invert();\n\treturn (progress: number) => {\n\t\tif (!Number.isFinite(progress)) return;\n\t\tconst corners = sourceDomMotionQuad(source, target, progress);\n\t\tconst current = projectiveMatrix(corners, source.width, source.height);\n\t\treturn current ? inverse.clone().multiply(current) : undefined;\n\t};\n}\n\nconst OWNED_PROPERTIES = [\n\t'transform', 'transform-origin', 'width', 'height', 'min-width', 'max-width',\n\t'min-height', 'max-height', 'box-sizing', 'transition', 'animation', 'will-change', 'visibility'\n] as const;\n\n/**\n * Moves the existing node in its existing parent. No node creation, removal,\n * reparenting, destination layout, or renderer work occurs during this motion.\n * Callers freeze competing transform writers and keep clipping ancestors stable.\n */\nexport function createSourceDomMotion(element: HTMLElement, source: SourceDomProjection, target: SourceDomTarget) {\n\tconst project = createSourceDomProjection(source, target);\n\tif (!project) return;\n\tconst computed = getComputedStyle(element);\n\t// Individual transform properties precede `transform`. Until captured as part\n\t// of the local matrix, authored use must keep the ordinary transition path.\n\tif ([computed.translate, computed.rotate, computed.scale].some(value => value && value !== 'none')) return;\n\tconst origin = computed.transformOrigin.split(' ').map(Number.parseFloat);\n\tif (!Number.isFinite(origin[0]) || !Number.isFinite(origin[1])) return;\n\tconst css = new DOMMatrix(computed.transform === 'none' ? undefined : computed.transform);\n\tconst local = new Matrix4().makeTranslation(origin[0], origin[1], origin[2] || 0)\n\t\t.multiply(new Matrix4().fromArray(css.toFloat64Array()))\n\t\t.multiply(new Matrix4().makeTranslation(-origin[0], -origin[1], -(origin[2] || 0)));\n\tconst saved = OWNED_PROPERTIES.map(property => ({ property,\n\t\tvalue: element.style.getPropertyValue(property), priority: element.style.getPropertyPriority(property) }));\n\tconst write = (property: string, value: string) => element.style.setProperty(property, value, 'important');\n\t// Freeze the captured border box, retaining the source's own query width and\n\t// line wrapping. Its later intrinsic destination height belongs to reveal.\n\twrite('box-sizing', 'border-box');\n\tfor (const property of ['width', 'min-width', 'max-width']) write(property, `${source.width}px`);\n\tfor (const property of ['height', 'min-height', 'max-height']) write(property, `${source.height}px`);\n\twrite('transition', 'none'); write('animation', 'none');\n\twrite('transform-origin', '0px 0px 0px'); write('will-change', 'transform');\n\tlet restored = false;\n\tconst update = (progress: number) => {\n\t\tif (restored) return;\n\t\tconst delta = project(progress);\n\t\tif (!delta) return;\n\t\tconst matrix = local.clone().multiply(delta);\n\t\twrite('transform', `matrix3d(${matrix.elements.map(value => Math.abs(value) < 1e-12 ? 0 : value).join(',')})`);\n\t\treturn sourceDomMotionQuad(source, target, progress);\n\t};\n\tupdate(0);\n\treturn {\n\t\tupdate,\n\t\thide() { if (!restored) write('visibility', 'hidden'); },\n\t\trestore() {\n\t\t\tif (restored) return;\n\t\t\trestored = true;\n\t\t\tfor (const { property, value, priority } of saved) {\n\t\t\t\tif (value) element.style.setProperty(property, value, priority);\n\t\t\t\telse element.style.removeProperty(property);\n\t\t\t}\n\t\t}\n\t};\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BlurRect } from './CatalogDepthBlur.js';
|
|
2
|
+
/** Standard-width surfaces can be overflown; full-width backgrounds separate scenes. */
|
|
3
|
+
export declare function carouselRenderClip(surface: BlurRect, fullSurfaces: readonly BlurRect[], viewportWidth: number, documentTop: number, documentBottom: number, ownFull: boolean): BlurRect;
|
|
4
|
+
//# sourceMappingURL=carouselRenderClip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carouselRenderClip.d.ts","sourceRoot":"","sources":["../../src/catalog/carouselRenderClip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,wFAAwF;AACxF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,QAAQ,EAAE,EACtF,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,QAAQ,CAS/F"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Standard-width surfaces can be overflown; full-width backgrounds separate scenes. */
|
|
2
|
+
export function carouselRenderClip(surface, fullSurfaces, viewportWidth, documentTop, documentBottom, ownFull) {
|
|
3
|
+
if (ownFull)
|
|
4
|
+
return { ...surface };
|
|
5
|
+
let top = documentTop, bottom = documentBottom;
|
|
6
|
+
for (const other of fullSurfaces) {
|
|
7
|
+
const end = other.top + other.height;
|
|
8
|
+
if (end <= surface.top + 1)
|
|
9
|
+
top = Math.max(top, end);
|
|
10
|
+
if (other.top >= surface.top + surface.height - 1)
|
|
11
|
+
bottom = Math.min(bottom, other.top);
|
|
12
|
+
}
|
|
13
|
+
return { left: 0, top, width: viewportWidth, height: Math.max(0, bottom - top) };
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=carouselRenderClip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carouselRenderClip.js","sourceRoot":"","sources":["../../src/catalog/carouselRenderClip.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,MAAM,UAAU,kBAAkB,CAAC,OAAiB,EAAE,YAAiC,EACtF,aAAqB,EAAE,WAAmB,EAAE,cAAsB,EAAE,OAAgB;IACpF,IAAI,OAAO;QAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;IACnC,IAAI,GAAG,GAAG,WAAW,EAAE,MAAM,GAAG,cAAc,CAAC;IAC/C,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;QACrC,IAAI,GAAG,IAAI,OAAO,CAAC,GAAG,GAAG,CAAC;YAAE,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACrD,IAAI,KAAK,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACzF,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,EAAE,CAAC;AAClF,CAAC","sourcesContent":["import type { BlurRect } from './CatalogDepthBlur.js';\n\n/** Standard-width surfaces can be overflown; full-width backgrounds separate scenes. */\nexport function carouselRenderClip(surface: BlurRect, fullSurfaces: readonly BlurRect[],\n\tviewportWidth: number, documentTop: number, documentBottom: number, ownFull: boolean): BlurRect {\n\tif (ownFull) return { ...surface };\n\tlet top = documentTop, bottom = documentBottom;\n\tfor (const other of fullSurfaces) {\n\t\tconst end = other.top + other.height;\n\t\tif (end <= surface.top + 1) top = Math.max(top, end);\n\t\tif (other.top >= surface.top + surface.height - 1) bottom = Math.min(bottom, other.top);\n\t}\n\treturn { left: 0, top, width: viewportWidth, height: Math.max(0, bottom - top) };\n}\n"]}
|
|
@@ -5,10 +5,7 @@ export declare function resolvePaneFocusPresentation(rect: {
|
|
|
5
5
|
y: number;
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
|
-
}, viewport: {
|
|
9
|
-
width: number;
|
|
10
|
-
height: number;
|
|
11
|
-
}, focus: number): {
|
|
8
|
+
}, viewport: ResponsiveLayoutInput, focus: number): {
|
|
12
9
|
x: number;
|
|
13
10
|
y: number;
|
|
14
11
|
scale: number;
|
|
@@ -41,6 +38,8 @@ export declare class SpatialElementPaneController {
|
|
|
41
38
|
private scrollY;
|
|
42
39
|
private hidden;
|
|
43
40
|
private focus;
|
|
41
|
+
private focusDirty;
|
|
42
|
+
private focusPresentation?;
|
|
44
43
|
private focusPose;
|
|
45
44
|
private savedScroll?;
|
|
46
45
|
private sectionPositions;
|
|
@@ -61,6 +60,7 @@ export declare class SpatialElementPaneController {
|
|
|
61
60
|
/** Measurements remain in document coordinates while the pane moves in paint. */
|
|
62
61
|
private neutralY;
|
|
63
62
|
private paintFocus;
|
|
63
|
+
private setStyle;
|
|
64
64
|
private readonly handleFocus;
|
|
65
65
|
}
|
|
66
66
|
//# sourceMappingURL=SpatialElementPaneController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpatialElementPaneController.d.ts","sourceRoot":"","sources":["../../src/spatial-element/SpatialElementPaneController.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SpatialElementPaneController.d.ts","sourceRoot":"","sources":["../../src/spatial-element/SpatialElementPaneController.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAM3G,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,qBAAqB,EAAE,KAAK,EAAE,MAAM;;;;;;;EAE9C;AAyBD,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;;EAKtI;AAED,wFAAwF;AACxF,qBAAa,4BAA4B;IA0B5B,OAAO,CAAC,QAAQ,CAAC,IAAI;IAChC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IA3BxB,OAAO,CAAC,IAAI,CAAC,CAAc;IAC3B,OAAO,CAAC,KAAK,CAAC,CAAc;IAC5B,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,QAAQ,CAAC,CAAiB;IAClC,OAAO,CAAC,aAAa,CAAC,CAAmB;IACzC,OAAO,CAAC,UAAU,CAAC,CAAa;IAChC,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,MAAM,CAAC,CAAyC;IACxD,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAiD;IAC3E,OAAO,CAAC,SAAS,CAA4D;IAC7E,OAAO,CAAC,WAAW,CAAC,CAA2B;IAC/C,OAAO,CAAC,gBAAgB,CAA+C;IACvE,OAAO,CAAC,aAAa,CAAC,CAA2C;IACjE,OAAO,CAAC,YAAY,CAAC,CAA2C;IAChE,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,OAAO,CAAS;gBAEK,IAAI,EAAE,WAAW,EAC5B,WAAW,EAAE,MAAM,qBAAqB,GAAG,SAAS,EACpD,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI;IAElD,KAAK;IAsBL,SAAS,CAAC,MAAM,EAAE,OAAO;IAazB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,UAAQ;IAQ1C,OAAO;IAYP,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAGvB;IAEF,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAM3B;IAEF,OAAO,CAAC,MAAM;IAiDd,OAAO,CAAC,KAAK;IAiBb,iFAAiF;IACjF,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,UAAU;IAuBlB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAU1B;CACF"}
|
|
@@ -1,20 +1,32 @@
|
|
|
1
|
-
import { resolveDetailLayout } from './responsiveLayout.js';
|
|
1
|
+
import { resolveDetailLayout, resolveZoomLayout } from './responsiveLayout.js';
|
|
2
2
|
import { STAGE_PANEL_LAYOUT_EVENT } from '../stage/panelContext.js';
|
|
3
3
|
import { getStageVisualScrollPosition, STAGE_SCROLL_PRIORITY, subscribeStageScrollFrame, syncStageScrollToNative } from '../stage/scrollFrame.js';
|
|
4
|
-
import { getPanelFocusBlur, getPanelFocusOffset, getPanelFocusOpacity,
|
|
4
|
+
import { getPanelFocusBlur, getPanelFocusOffset, getPanelFocusOpacity, getPanelFocusProgress, getPerspectiveDistance } from '../stage/panelFocusMath.js';
|
|
5
5
|
import { PANEL_CAMERA_FOV, PANEL_FOCUS_PERSPECTIVE_MAX_SCALE } from '../stage/stageConstants.js';
|
|
6
6
|
/** The native pane uses the same focus curve and camera-facing motion as panels. */
|
|
7
7
|
export function resolvePaneFocusPresentation(rect, viewport, focus) {
|
|
8
|
+
return createPaneFocusPresentation(rect, viewport, resolveDetailLayout(viewport))(focus);
|
|
9
|
+
}
|
|
10
|
+
/** Resolve viewport geometry once; zoom and scroll frames only evaluate its focus curve. */
|
|
11
|
+
function createPaneFocusPresentation(rect, viewport, layout) {
|
|
8
12
|
const position = { x: rect.x + rect.width / 2 - viewport.width / 2,
|
|
9
13
|
y: viewport.height / 2 - rect.y - rect.height / 2 };
|
|
10
14
|
const options = { width: rect.width, height: rect.height, position };
|
|
11
|
-
const offset = getPanelFocusOffset(options, focus, viewport.width, viewport.height);
|
|
12
15
|
const distance = getPerspectiveDistance(viewport.height, PANEL_CAMERA_FOV);
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const start = layout.controls.viewSelector;
|
|
17
|
+
const end = resolveZoomLayout(viewport).controls.viewSelector;
|
|
18
|
+
return (focus) => {
|
|
19
|
+
const offset = getPanelFocusOffset(options, focus, viewport.width, viewport.height);
|
|
20
|
+
const scale = Math.min(PANEL_FOCUS_PERSPECTIVE_MAX_SCALE, Math.max(1, distance / Math.max(distance - offset.z, 1)));
|
|
21
|
+
const progress = getPanelFocusProgress(focus);
|
|
22
|
+
// Preserve the gap between the pane's top-left corner and the control row,
|
|
23
|
+
// countering perspective growth exactly like an anchored summary panel.
|
|
24
|
+
return { x: (end.x - start.x) * progress + rect.width * (scale - 1) / 2,
|
|
25
|
+
y: (end.y - start.y) * progress + rect.height * (scale - 1) / 2,
|
|
26
|
+
scale,
|
|
27
|
+
opacity: getPanelFocusOpacity(focus), blur: getPanelFocusBlur(focus, options),
|
|
28
|
+
pivotY: rect.y + rect.height / 2 };
|
|
29
|
+
};
|
|
18
30
|
}
|
|
19
31
|
/** One document coordinate system; clipping changes paint and hit testing only. */
|
|
20
32
|
export function resolvePaneScrollClip(bodyTop, bodyHeight, viewportTop, viewportBottom, scrollY) {
|
|
@@ -43,6 +55,8 @@ export class SpatialElementPaneController {
|
|
|
43
55
|
scrollY = 0;
|
|
44
56
|
hidden = false;
|
|
45
57
|
focus = 0;
|
|
58
|
+
focusDirty = true;
|
|
59
|
+
focusPresentation;
|
|
46
60
|
focusPose = { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };
|
|
47
61
|
savedScroll;
|
|
48
62
|
sectionPositions = [];
|
|
@@ -87,7 +101,7 @@ export class SpatialElementPaneController {
|
|
|
87
101
|
this.savedScroll = { x: window.scrollX, y: window.scrollY };
|
|
88
102
|
this.root.toggleAttribute('data-spatial-detail-pane-hidden', hidden);
|
|
89
103
|
for (const region of this.hiddenRegions)
|
|
90
|
-
region.inert = hidden
|
|
104
|
+
region.inert = hidden;
|
|
91
105
|
if (!hidden && this.savedScroll) {
|
|
92
106
|
window.scrollTo({ left: this.savedScroll.x, top: this.savedScroll.y, behavior: 'instant' });
|
|
93
107
|
syncStageScrollToNative();
|
|
@@ -95,7 +109,11 @@ export class SpatialElementPaneController {
|
|
|
95
109
|
}
|
|
96
110
|
}
|
|
97
111
|
setFocus(focus, fullscreen = false) {
|
|
98
|
-
|
|
112
|
+
const next = fullscreen ? 1 : Math.max(0, Math.min(1, Number.isFinite(focus) ? focus : 0));
|
|
113
|
+
if (next === this.focus)
|
|
114
|
+
return;
|
|
115
|
+
this.focus = next;
|
|
116
|
+
this.focusDirty = true;
|
|
99
117
|
this.paintFocus();
|
|
100
118
|
}
|
|
101
119
|
destroy() {
|
|
@@ -144,13 +162,15 @@ export class SpatialElementPaneController {
|
|
|
144
162
|
this.resizeAnchor = undefined;
|
|
145
163
|
this.metricKey = key;
|
|
146
164
|
this.layout = next;
|
|
165
|
+
this.focusPresentation = next.pane ? createPaneFocusPresentation(next.pane.surface, metrics, next) : undefined;
|
|
166
|
+
this.focusDirty = true;
|
|
147
167
|
const split = next.composition === 'split';
|
|
148
168
|
this.root.toggleAttribute('data-spatial-detail-pane', split);
|
|
149
169
|
this.root.toggleAttribute('data-spatial-detail-flow', next.shortHeightFallback);
|
|
150
170
|
for (const region of this.regions)
|
|
151
171
|
region.toggleAttribute('data-stage-fixed-region', split);
|
|
152
172
|
for (const region of this.hiddenRegions)
|
|
153
|
-
region.inert =
|
|
173
|
+
region.inert = this.hidden;
|
|
154
174
|
this.onMode(split);
|
|
155
175
|
// The framework flushes the native summary ownership before its new box is measured.
|
|
156
176
|
this.schedule();
|
|
@@ -189,9 +209,11 @@ export class SpatialElementPaneController {
|
|
|
189
209
|
return;
|
|
190
210
|
}
|
|
191
211
|
const enhanced = this.stage?.classList.contains('stage-virtual-scroll-active');
|
|
192
|
-
this.root
|
|
212
|
+
this.setStyle(this.root, '--spatial-pane-fixed-compensation', `${enhanced ? this.scrollY : 0}px`);
|
|
193
213
|
const clip = resolvePaneScrollClip(this.bodyTop, this.bodyHeight, pane.body.y, pane.body.y + pane.body.height, this.scrollY);
|
|
194
|
-
|
|
214
|
+
const clipPath = `inset(${clip.top}px 0 ${clip.bottom}px 0 round 0 0 var(--spatial-element-panel-radius) var(--spatial-element-panel-radius))`;
|
|
215
|
+
if (this.body.style.clipPath !== clipPath)
|
|
216
|
+
this.body.style.clipPath = clipPath;
|
|
195
217
|
this.root.toggleAttribute('data-spatial-detail-pane-clipped', true);
|
|
196
218
|
}
|
|
197
219
|
/** Measurements remain in document coordinates while the pane moves in paint. */
|
|
@@ -201,29 +223,33 @@ export class SpatialElementPaneController {
|
|
|
201
223
|
}
|
|
202
224
|
paintFocus() {
|
|
203
225
|
const pane = this.layout?.pane;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
226
|
+
if (this.focusDirty) {
|
|
227
|
+
this.focusPose = this.focusPresentation?.(this.focus)
|
|
228
|
+
?? { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };
|
|
229
|
+
this.focusDirty = false;
|
|
230
|
+
}
|
|
207
231
|
const pose = this.focusPose;
|
|
208
232
|
this.root.toggleAttribute('data-spatial-detail-pane-zooming', Boolean(pane && this.focus > 0.001));
|
|
209
|
-
this.setHidden(
|
|
233
|
+
this.setHidden(getPanelFocusOpacity(this.focus) < 0.12);
|
|
210
234
|
const values = { '--spatial-pane-focus-x': `${pose.x}px`, '--spatial-pane-focus-y': `${pose.y}px`,
|
|
211
235
|
'--spatial-pane-focus-scale': String(pose.scale), '--spatial-pane-focus-opacity': String(pose.opacity),
|
|
212
236
|
'--spatial-pane-focus-blur': `${pose.blur}px` };
|
|
213
|
-
for (const [name, value] of Object.entries(values))
|
|
214
|
-
|
|
215
|
-
this.root.style.setProperty(name, value);
|
|
216
|
-
}
|
|
237
|
+
for (const [name, value] of Object.entries(values))
|
|
238
|
+
this.setStyle(this.root, name, value);
|
|
217
239
|
if (!pane || !this.body)
|
|
218
240
|
return;
|
|
219
|
-
this.body
|
|
241
|
+
this.setStyle(this.body, '--spatial-pane-focus-origin-y', `${pose.pivotY - this.bodyTop + this.scrollY}px`);
|
|
220
242
|
for (const region of this.regions) {
|
|
221
243
|
const top = region.hasAttribute('data-spatial-detail-pane-submenu-shell') ? this.layout.submenu.y
|
|
222
244
|
: region.hasAttribute('data-spatial-detail-pane-header') || region.hasAttribute('data-spatial-detail-pane-surface') ? pane.surface.y : undefined;
|
|
223
245
|
if (top !== undefined)
|
|
224
|
-
|
|
246
|
+
this.setStyle(region, '--spatial-pane-focus-origin-y', `${pose.pivotY - top}px`);
|
|
225
247
|
}
|
|
226
248
|
}
|
|
249
|
+
setStyle(element, name, value) {
|
|
250
|
+
if (element.style.getPropertyValue(name) !== value)
|
|
251
|
+
element.style.setProperty(name, value);
|
|
252
|
+
}
|
|
227
253
|
handleFocus = (event) => {
|
|
228
254
|
// VirtualScrollController owns the enhanced path; native DOM uses identical bounds.
|
|
229
255
|
if (!this.layout?.pane || this.hidden || this.stage?.classList.contains('stage-virtual-scroll-active'))
|
|
@@ -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,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,EAAE,QAAQ,EAAE,CAA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LayoutInput } 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 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\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(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,EAAE,iBAAiB,EAA8B,MAAM,uBAAuB,CAAC;AAC3G,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,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzJ,OAAO,EAAE,gBAAgB,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAEjG,oFAAoF;AACpF,MAAM,UAAU,4BAA4B,CAAC,IAA6D,EACzG,QAA+B,EAAE,KAAa;IAC9C,OAAO,2BAA2B,CAAC,IAAI,EAAE,QAAQ,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC1F,CAAC;AAED,4FAA4F;AAC5F,SAAS,2BAA2B,CAAC,IAA6D,EACjG,QAA+B,EAAE,MAA8C;IAC/E,MAAM,QAAQ,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,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IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,6BAA6B,CAAC;YAAE,OAAO;QAC/G,MAAM,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, resolveZoomLayout, 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, getPanelFocusProgress, 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: ResponsiveLayoutInput, focus: number) {\n\treturn createPaneFocusPresentation(rect, viewport, resolveDetailLayout(viewport))(focus);\n}\n\n/** Resolve viewport geometry once; zoom and scroll frames only evaluate its focus curve. */\nfunction createPaneFocusPresentation(rect: { x: number; y: number; width: number; height: number },\n\tviewport: ResponsiveLayoutInput, layout: ReturnType<typeof resolveDetailLayout>) {\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 distance = getPerspectiveDistance(viewport.height, PANEL_CAMERA_FOV);\n\tconst start = layout.controls.viewSelector;\n\tconst end = resolveZoomLayout(viewport).controls.viewSelector;\n\treturn (focus: number) => {\n\t\tconst offset = getPanelFocusOffset(options, focus, viewport.width, viewport.height);\n\t\tconst scale = Math.min(PANEL_FOCUS_PERSPECTIVE_MAX_SCALE, Math.max(1, distance / Math.max(distance - offset.z, 1)));\n\t\tconst progress = getPanelFocusProgress(focus);\n\t\t// Preserve the gap between the pane's top-left corner and the control row,\n\t\t// countering perspective growth exactly like an anchored summary panel.\n\t\treturn { x: (end.x - start.x) * progress + rect.width * (scale - 1) / 2,\n\t\t\ty: (end.y - start.y) * progress + rect.height * (scale - 1) / 2,\n\t\t\tscale,\n\t\t\topacity: getPanelFocusOpacity(focus), blur: getPanelFocusBlur(focus, options),\n\t\t\tpivotY: rect.y + rect.height / 2 };\n\t};\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 focusDirty = true;\n\tprivate focusPresentation?: ReturnType<typeof createPaneFocusPresentation>;\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\tconst next = fullscreen ? 1 : Math.max(0, Math.min(1, Number.isFinite(focus) ? focus : 0));\n\t\tif (next === this.focus) return;\n\t\tthis.focus = next;\n\t\tthis.focusDirty = true;\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\tthis.focusPresentation = next.pane ? createPaneFocusPresentation(next.pane.surface, metrics, next) : undefined;\n\t\t\tthis.focusDirty = true;\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.setStyle(this.root, '--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\tconst 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\tif (this.body.style.clipPath !== clipPath) this.body.style.clipPath = clipPath;\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\tif (this.focusDirty) {\n\t\t\tthis.focusPose = this.focusPresentation?.(this.focus)\n\t\t\t\t?? { x: 0, y: 0, scale: 1, opacity: 1, blur: 0, pivotY: 0 };\n\t\t\tthis.focusDirty = false;\n\t\t}\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)) this.setStyle(this.root, name, value);\n\t\tif (!pane || !this.body) return;\n\t\tthis.setStyle(this.body, '--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) this.setStyle(region, '--spatial-pane-focus-origin-y', `${pose.pivotY - top}px`);\n\t\t}\n\t}\n\n\tprivate setStyle(element: HTMLElement, name: string, value: string) {\n\t\tif (element.style.getPropertyValue(name) !== value) element.style.setProperty(name, value);\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsiveLayout.d.ts","sourceRoot":"","sources":["../../src/spatial-element/responsiveLayout.ts"],"names":[],"mappings":"AACA,OAAO,EACyC,KAAK,iBAAiB,EAAE,KAAK,qBAAqB,EAChG,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB7D;AAED,oGAAoG;AACpG,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,UAE1E"}
|
|
@@ -77,6 +77,7 @@ export function resolveDetailLayout(input) {
|
|
|
77
77
|
const hero = tokens.hero[layout];
|
|
78
78
|
const horizontal = layout === 'xs' || layout === 's';
|
|
79
79
|
const wide = layout === 'xl' || layout === '2xl';
|
|
80
|
+
const insetL = layout === 'l' && base.viewport.width > 1536;
|
|
80
81
|
const right = available.x + available.width;
|
|
81
82
|
const contentLeft = content.x - available.x;
|
|
82
83
|
const railSize = layout === '2xl'
|
|
@@ -113,9 +114,10 @@ export function resolveDetailLayout(input) {
|
|
|
113
114
|
x: base.paneSubmenu.x, y: base.paneSubmenu.y, maxWidth: base.paneSubmenu.width,
|
|
114
115
|
height: base.paneSubmenu.height, inlineAlignment: 'center', position: 'fixed'
|
|
115
116
|
} : {
|
|
116
|
-
x: wide ? content.x : available.x + hero.submenuLeft,
|
|
117
|
+
x: wide ? content.x : insetL ? Math.max(available.x + 12, content.x) : available.x + hero.submenuLeft,
|
|
117
118
|
y: top + fitHeight + hero.submenuGap,
|
|
118
|
-
maxWidth: wide ? content.width : Math.max(0, available.width -
|
|
119
|
+
maxWidth: wide ? content.width : insetL ? Math.min(content.width, Math.max(0, available.width - 24))
|
|
120
|
+
: Math.max(0, available.width - hero.submenuLeft - hero.submenuRight),
|
|
119
121
|
height: hero.submenuHeight, inlineAlignment: 'start', position: 'document'
|
|
120
122
|
};
|
|
121
123
|
const dock = split ? undefined : {
|