@webspatial/react-sdk 0.0.4 → 0.0.6
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/default/index.d.mts +164 -0
- package/dist/default/index.d.ts +164 -0
- package/dist/{cjs/default → default}/index.js +47 -119
- package/dist/default/index.js.map +1 -0
- package/dist/default/index.mjs +3346 -0
- package/dist/default/index.mjs.map +1 -0
- package/dist/jsx/jsx-dev-runtime.d.mts +4 -0
- package/dist/jsx/jsx-dev-runtime.d.ts +3 -2
- package/dist/jsx/jsx-dev-runtime.js +3083 -6755
- package/dist/jsx/jsx-dev-runtime.js.map +1 -7
- package/dist/jsx/jsx-dev-runtime.mjs +3445 -0
- package/dist/jsx/jsx-dev-runtime.mjs.map +1 -0
- package/dist/jsx/jsx-runtime-C06ExmCC.d.mts +9 -0
- package/dist/jsx/jsx-runtime-C06ExmCC.d.ts +9 -0
- package/dist/jsx/jsx-runtime.d.mts +4 -0
- package/dist/jsx/jsx-runtime.d.ts +3 -2
- package/dist/jsx/jsx-runtime.js +3085 -6757
- package/dist/jsx/jsx-runtime.js.map +1 -7
- package/dist/jsx/jsx-runtime.mjs +3445 -0
- package/dist/jsx/jsx-runtime.mjs.map +1 -0
- package/dist/web/index.d.mts +164 -0
- package/dist/web/index.d.ts +164 -0
- package/dist/{cjs/web → web}/index.js +51 -125
- package/dist/web/index.js.map +1 -0
- package/dist/web/index.mjs +3346 -0
- package/dist/web/index.mjs.map +1 -0
- package/npm/plugin/vite.js +23 -22
- package/package.json +26 -11
- package/dist/cjs/default/XRApp.d.ts +0 -21
- package/dist/cjs/default/XRApp.d.ts.map +0 -1
- package/dist/cjs/default/index.d.ts +0 -5
- package/dist/cjs/default/index.d.ts.map +0 -1
- package/dist/cjs/default/index.js.map +0 -7
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/CSSSpatialComponent.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/CSSSpatialComponent.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/CSSSpatialDebugNameContext.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/CSSSpatialDebugNameContext.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/CSSSpatialDiv.d.ts +0 -6
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/CSSSpatialDiv.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/CSSSpatialLayerContext.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/CSSSpatialLayerContext.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/CSSSpatialRootContext.d.ts +0 -14
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/CSSSpatialRootContext.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/const.d.ts +0 -6
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/const.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/index.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/index.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/injectClassStyle.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/injectClassStyle.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/math/index.d.ts +0 -4
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/math/index.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/useHijackSpatialDivRef.d.ts +0 -4
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/useHijackSpatialDivRef.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/useSpatialStyle.d.ts +0 -29
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/useSpatialStyle.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/utils.d.ts +0 -7
- package/dist/cjs/default/spatial-react-components/CSSSpatialDiv/utils.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model/index.d.ts +0 -42
- package/dist/cjs/default/spatial-react-components/Model/index.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/CSSModel3D.d.ts +0 -4
- package/dist/cjs/default/spatial-react-components/Model3D/CSSModel3D.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/CSSModel3DNotInSpatialDiv.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/Model3D/CSSModel3DNotInSpatialDiv.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/CSSModel3DPortalInstance.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/Model3D/CSSModel3DPortalInstance.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/CSSModel3DStandardInstance.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/Model3D/CSSModel3DStandardInstance.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/Model3D.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/Model3D/Model3D.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/Model3DNative.d.ts +0 -48
- package/dist/cjs/default/spatial-react-components/Model3D/Model3DNative.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/Model3DNotInSpatialDiv.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/Model3D/Model3DNotInSpatialDiv.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/Model3DPortalInstance.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/Model3D/Model3DPortalInstance.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/Model3DStandardInstance.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/Model3D/Model3DStandardInstance.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/index.d.ts +0 -4
- package/dist/cjs/default/spatial-react-components/Model3D/index.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/types.d.ts +0 -46
- package/dist/cjs/default/spatial-react-components/Model3D/types.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/useDetectLayoutDomUpdated.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/Model3D/useDetectLayoutDomUpdated.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/useModel3DNative.d.ts +0 -15
- package/dist/cjs/default/spatial-react-components/Model3D/useModel3DNative.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/useSyncDomInfoFromStandardInstance.d.ts +0 -19
- package/dist/cjs/default/spatial-react-components/Model3D/useSyncDomInfoFromStandardInstance.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/Model3D/utils.d.ts +0 -4
- package/dist/cjs/default/spatial-react-components/Model3D/utils.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialMonitor.d.ts +0 -6
- package/dist/cjs/default/spatial-react-components/SpatialMonitor.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialPrimitive.d.ts +0 -6
- package/dist/cjs/default/spatial-react-components/SpatialPrimitive.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/PortalInstance.d.ts +0 -20
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/PortalInstance.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialDebugNameContext.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialDebugNameContext.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialIsStandardInstanceContext.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialIsStandardInstanceContext.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialLayerContext.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialLayerContext.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialReactComponent.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialReactComponent.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialReactContext.d.ts +0 -24
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialReactContext.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialWindowManager.d.ts +0 -17
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialWindowManager.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialWindowManagerContext.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/SpatialWindowManagerContext.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/StandardInstance.d.ts +0 -10
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/StandardInstance.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/const.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/const.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/index.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/index.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/types.d.ts +0 -31
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/types.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/usePortalContainer.d.ts +0 -8
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/usePortalContainer.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/utils.d.ts +0 -15
- package/dist/cjs/default/spatial-react-components/SpatialReactComponent/utils.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/SpatialView.d.ts +0 -15
- package/dist/cjs/default/spatial-react-components/SpatialView.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/hooks/useForceUpdate.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/hooks/useForceUpdate.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/hooks/useMonitorDocumentHeaderChange.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/hooks/useMonitorDocumentHeaderChange.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/hooks/useMonitorDomChange.d.ts +0 -2
- package/dist/cjs/default/spatial-react-components/hooks/useMonitorDomChange.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/index.d.ts +0 -11
- package/dist/cjs/default/spatial-react-components/index.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/notifyUpdateStandInstanceLayout.d.ts +0 -13
- package/dist/cjs/default/spatial-react-components/notifyUpdateStandInstanceLayout.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/primitives.d.ts +0 -3
- package/dist/cjs/default/spatial-react-components/primitives.d.ts.map +0 -1
- package/dist/cjs/default/spatial-react-components/types.d.ts +0 -18
- package/dist/cjs/default/spatial-react-components/types.d.ts.map +0 -1
- package/dist/cjs/default/types.d.ts +0 -2
- package/dist/cjs/default/types.d.ts.map +0 -1
- package/dist/cjs/default/utils/debugTool.d.ts +0 -2
- package/dist/cjs/default/utils/debugTool.d.ts.map +0 -1
- package/dist/cjs/default/utils/getSession.d.ts +0 -6
- package/dist/cjs/default/utils/getSession.d.ts.map +0 -1
- package/dist/cjs/default/utils/index.d.ts +0 -3
- package/dist/cjs/default/utils/index.d.ts.map +0 -1
- package/dist/cjs/web/XRApp.d.ts +0 -21
- package/dist/cjs/web/XRApp.d.ts.map +0 -1
- package/dist/cjs/web/index.d.ts +0 -5
- package/dist/cjs/web/index.d.ts.map +0 -1
- package/dist/cjs/web/index.js.map +0 -7
- package/dist/cjs/web/noRuntime.d.ts +0 -5
- package/dist/cjs/web/noRuntime.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/CSSSpatialComponent.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/CSSSpatialComponent.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/CSSSpatialDebugNameContext.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/CSSSpatialDebugNameContext.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/CSSSpatialDiv.d.ts +0 -6
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/CSSSpatialDiv.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/CSSSpatialLayerContext.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/CSSSpatialLayerContext.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/CSSSpatialRootContext.d.ts +0 -14
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/CSSSpatialRootContext.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/const.d.ts +0 -6
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/const.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/index.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/index.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/injectClassStyle.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/injectClassStyle.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/math/index.d.ts +0 -4
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/math/index.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/useHijackSpatialDivRef.d.ts +0 -4
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/useHijackSpatialDivRef.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/useSpatialStyle.d.ts +0 -29
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/useSpatialStyle.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/utils.d.ts +0 -7
- package/dist/cjs/web/spatial-react-components/CSSSpatialDiv/utils.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model/index.d.ts +0 -42
- package/dist/cjs/web/spatial-react-components/Model/index.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/CSSModel3D.d.ts +0 -4
- package/dist/cjs/web/spatial-react-components/Model3D/CSSModel3D.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/CSSModel3DNotInSpatialDiv.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/Model3D/CSSModel3DNotInSpatialDiv.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/CSSModel3DPortalInstance.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/Model3D/CSSModel3DPortalInstance.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/CSSModel3DStandardInstance.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/Model3D/CSSModel3DStandardInstance.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/Model3D.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/Model3D/Model3D.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/Model3DNative.d.ts +0 -48
- package/dist/cjs/web/spatial-react-components/Model3D/Model3DNative.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/Model3DNotInSpatialDiv.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/Model3D/Model3DNotInSpatialDiv.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/Model3DPortalInstance.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/Model3D/Model3DPortalInstance.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/Model3DStandardInstance.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/Model3D/Model3DStandardInstance.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/index.d.ts +0 -4
- package/dist/cjs/web/spatial-react-components/Model3D/index.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/types.d.ts +0 -46
- package/dist/cjs/web/spatial-react-components/Model3D/types.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/useDetectLayoutDomUpdated.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/Model3D/useDetectLayoutDomUpdated.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/useModel3DNative.d.ts +0 -15
- package/dist/cjs/web/spatial-react-components/Model3D/useModel3DNative.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/useSyncDomInfoFromStandardInstance.d.ts +0 -19
- package/dist/cjs/web/spatial-react-components/Model3D/useSyncDomInfoFromStandardInstance.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/Model3D/utils.d.ts +0 -4
- package/dist/cjs/web/spatial-react-components/Model3D/utils.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialMonitor.d.ts +0 -6
- package/dist/cjs/web/spatial-react-components/SpatialMonitor.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialPrimitive.d.ts +0 -6
- package/dist/cjs/web/spatial-react-components/SpatialPrimitive.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/PortalInstance.d.ts +0 -20
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/PortalInstance.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialDebugNameContext.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialDebugNameContext.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialIsStandardInstanceContext.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialIsStandardInstanceContext.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialLayerContext.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialLayerContext.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialReactComponent.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialReactComponent.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialReactContext.d.ts +0 -24
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialReactContext.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialWindowManager.d.ts +0 -17
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialWindowManager.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialWindowManagerContext.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/SpatialWindowManagerContext.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/StandardInstance.d.ts +0 -10
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/StandardInstance.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/const.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/const.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/index.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/index.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/types.d.ts +0 -31
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/types.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/usePortalContainer.d.ts +0 -8
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/usePortalContainer.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/utils.d.ts +0 -15
- package/dist/cjs/web/spatial-react-components/SpatialReactComponent/utils.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/SpatialView.d.ts +0 -15
- package/dist/cjs/web/spatial-react-components/SpatialView.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/hooks/useForceUpdate.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/hooks/useForceUpdate.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/hooks/useMonitorDocumentHeaderChange.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/hooks/useMonitorDocumentHeaderChange.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/hooks/useMonitorDomChange.d.ts +0 -2
- package/dist/cjs/web/spatial-react-components/hooks/useMonitorDomChange.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/index.d.ts +0 -11
- package/dist/cjs/web/spatial-react-components/index.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/notifyUpdateStandInstanceLayout.d.ts +0 -13
- package/dist/cjs/web/spatial-react-components/notifyUpdateStandInstanceLayout.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/primitives.d.ts +0 -3
- package/dist/cjs/web/spatial-react-components/primitives.d.ts.map +0 -1
- package/dist/cjs/web/spatial-react-components/types.d.ts +0 -18
- package/dist/cjs/web/spatial-react-components/types.d.ts.map +0 -1
- package/dist/cjs/web/types.d.ts +0 -2
- package/dist/cjs/web/types.d.ts.map +0 -1
- package/dist/cjs/web/utils/debugTool.d.ts +0 -2
- package/dist/cjs/web/utils/debugTool.d.ts.map +0 -1
- package/dist/cjs/web/utils/getSession.d.ts +0 -6
- package/dist/cjs/web/utils/getSession.d.ts.map +0 -1
- package/dist/cjs/web/utils/index.d.ts +0 -3
- package/dist/cjs/web/utils/index.d.ts.map +0 -1
- package/dist/jsx/injectSceneHook.d.ts +0 -2
- package/dist/jsx/injectSceneHook.d.ts.map +0 -1
- package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-shared.d.ts +0 -6
- package/dist/jsx/jsx-shared.d.ts.map +0 -1
- package/dist/jsx/spatialPolyfill.d.ts +0 -2
- package/dist/jsx/spatialPolyfill.d.ts.map +0 -1
- package/npm/index.d.ts +0 -1
- package/npm/index.js +0 -7
|
@@ -5,7 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
8
|
var __export = (target, all) => {
|
|
10
9
|
for (var name in all)
|
|
11
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -29,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
29
|
|
|
31
30
|
// src/index.ts
|
|
32
|
-
var
|
|
33
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
34
33
|
CSSSpatialDiv: () => CSSSpatialDiv,
|
|
35
34
|
CSSSpatialPrimitive: () => CSSSpatialPrimitive,
|
|
36
35
|
Model: () => Model,
|
|
@@ -48,7 +47,7 @@ __export(src_exports, {
|
|
|
48
47
|
withCSSSpatial: () => withCSSSpatial,
|
|
49
48
|
withSpatial: () => withSpatial
|
|
50
49
|
});
|
|
51
|
-
module.exports = __toCommonJS(
|
|
50
|
+
module.exports = __toCommonJS(index_exports);
|
|
52
51
|
|
|
53
52
|
// src/spatial-react-components/SpatialPrimitive.tsx
|
|
54
53
|
var import_react11 = require("react");
|
|
@@ -194,17 +193,14 @@ var primitives = [
|
|
|
194
193
|
// src/spatial-react-components/SpatialReactComponent/SpatialReactComponent.tsx
|
|
195
194
|
var import_react10 = require("react");
|
|
196
195
|
|
|
197
|
-
// src/noRuntime.ts
|
|
198
|
-
var SpatialHelper = {};
|
|
199
|
-
var Spatial = {};
|
|
200
|
-
|
|
201
196
|
// src/utils/getSession.ts
|
|
197
|
+
var import_core_sdk = require("@webspatial/core-sdk");
|
|
202
198
|
var spatial = null;
|
|
203
199
|
var _currentSession = null;
|
|
204
200
|
function getSession() {
|
|
205
201
|
if (true) return null;
|
|
206
202
|
if (!spatial) {
|
|
207
|
-
spatial = new Spatial();
|
|
203
|
+
spatial = new import_core_sdk.Spatial();
|
|
208
204
|
}
|
|
209
205
|
if (!spatial.isSupported()) {
|
|
210
206
|
return null;
|
|
@@ -215,7 +211,6 @@ function getSession() {
|
|
|
215
211
|
_currentSession = spatial.requestSession();
|
|
216
212
|
return _currentSession;
|
|
217
213
|
}
|
|
218
|
-
__name(getSession, "getSession");
|
|
219
214
|
|
|
220
215
|
// src/utils/debugTool.ts
|
|
221
216
|
async function getStat() {
|
|
@@ -223,7 +218,6 @@ async function getStat() {
|
|
|
223
218
|
const statsInfo = await getSession()._getStats();
|
|
224
219
|
return statsInfo;
|
|
225
220
|
}
|
|
226
|
-
__name(getStat, "getStat");
|
|
227
221
|
function simplifyEntityTree(rootTree) {
|
|
228
222
|
const rootEntity = Object.values(rootTree.childEntities)[0];
|
|
229
223
|
function traverseTree(node, parent, callback) {
|
|
@@ -235,7 +229,6 @@ function simplifyEntityTree(rootTree) {
|
|
|
235
229
|
});
|
|
236
230
|
}
|
|
237
231
|
}
|
|
238
|
-
__name(traverseTree, "traverseTree");
|
|
239
232
|
let rootNode;
|
|
240
233
|
const nodeMap = {};
|
|
241
234
|
function visitNode(node, parent) {
|
|
@@ -261,12 +254,10 @@ function simplifyEntityTree(rootTree) {
|
|
|
261
254
|
parentNode.children.push(newNode);
|
|
262
255
|
}
|
|
263
256
|
}
|
|
264
|
-
__name(visitNode, "visitNode");
|
|
265
257
|
traverseTree(rootEntity, null, visitNode);
|
|
266
258
|
console.log("rootNode", rootNode);
|
|
267
259
|
return rootNode;
|
|
268
260
|
}
|
|
269
|
-
__name(simplifyEntityTree, "simplifyEntityTree");
|
|
270
261
|
async function inspectRootWindowContainer(simple) {
|
|
271
262
|
const rootWindowContainerInfo = await getSession()._inspectRootWindowContainer();
|
|
272
263
|
console.log(rootWindowContainerInfo);
|
|
@@ -275,7 +266,6 @@ async function inspectRootWindowContainer(simple) {
|
|
|
275
266
|
}
|
|
276
267
|
return rootWindowContainerInfo;
|
|
277
268
|
}
|
|
278
|
-
__name(inspectRootWindowContainer, "inspectRootWindowContainer");
|
|
279
269
|
function enableDebugTool() {
|
|
280
270
|
if (true) return;
|
|
281
271
|
const session = getSession();
|
|
@@ -285,7 +275,6 @@ function enableDebugTool() {
|
|
|
285
275
|
inspectRootWindowContainer
|
|
286
276
|
});
|
|
287
277
|
}
|
|
288
|
-
__name(enableDebugTool, "enableDebugTool");
|
|
289
278
|
|
|
290
279
|
// src/spatial-react-components/SpatialReactComponent/StandardInstance.tsx
|
|
291
280
|
var import_react4 = require("react");
|
|
@@ -296,7 +285,6 @@ function useForceUpdate() {
|
|
|
296
285
|
const [, setToggle] = (0, import_react.useState)(false);
|
|
297
286
|
return () => setToggle((toggle) => !toggle);
|
|
298
287
|
}
|
|
299
|
-
__name(useForceUpdate, "useForceUpdate");
|
|
300
288
|
|
|
301
289
|
// src/spatial-react-components/SpatialReactComponent/SpatialIsStandardInstanceContext.ts
|
|
302
290
|
var import_react2 = require("react");
|
|
@@ -312,9 +300,6 @@ var SpatialID = "data-spatial-id";
|
|
|
312
300
|
|
|
313
301
|
// src/spatial-react-components/SpatialReactComponent/SpatialReactContext.ts
|
|
314
302
|
var SpatialReactContextObject = class {
|
|
315
|
-
static {
|
|
316
|
-
__name(this, "SpatialReactContextObject");
|
|
317
|
-
}
|
|
318
303
|
debugName;
|
|
319
304
|
constructor(debugName) {
|
|
320
305
|
this.debugName = debugName;
|
|
@@ -436,9 +421,9 @@ function useDetectDomRectChange() {
|
|
|
436
421
|
);
|
|
437
422
|
return;
|
|
438
423
|
}
|
|
439
|
-
const handleResize =
|
|
424
|
+
const handleResize = () => {
|
|
440
425
|
forceUpdate();
|
|
441
|
-
}
|
|
426
|
+
};
|
|
442
427
|
window.addEventListener("resize", handleResize);
|
|
443
428
|
return () => {
|
|
444
429
|
window.removeEventListener("resize", handleResize);
|
|
@@ -475,7 +460,6 @@ function useDetectDomRectChange() {
|
|
|
475
460
|
}, []);
|
|
476
461
|
return ref;
|
|
477
462
|
}
|
|
478
|
-
__name(useDetectDomRectChange, "useDetectDomRectChange");
|
|
479
463
|
var StandardInstance = (0, import_react4.forwardRef)(function(inProps, refIn) {
|
|
480
464
|
const { El, style: inStyle, debugShowStandardInstance, ...props } = inProps;
|
|
481
465
|
const extraStyle = {
|
|
@@ -515,9 +499,6 @@ var import_react6 = require("react");
|
|
|
515
499
|
|
|
516
500
|
// src/spatial-react-components/SpatialReactComponent/SpatialWindowManager.ts
|
|
517
501
|
var SpatialWindowManager = class {
|
|
518
|
-
static {
|
|
519
|
-
__name(this, "SpatialWindowManager");
|
|
520
|
-
}
|
|
521
502
|
initPromise;
|
|
522
503
|
entity;
|
|
523
504
|
webview;
|
|
@@ -634,7 +615,6 @@ function usePortalContainer(options) {
|
|
|
634
615
|
spatialWindowManagerRef.current = windowMgr;
|
|
635
616
|
forceUpdate();
|
|
636
617
|
}
|
|
637
|
-
__name(asyncCreatePortalContainer, "asyncCreatePortalContainer");
|
|
638
618
|
if (isStandard !== true) {
|
|
639
619
|
asyncCreatePortalContainer();
|
|
640
620
|
}
|
|
@@ -649,7 +629,6 @@ function usePortalContainer(options) {
|
|
|
649
629
|
}, []);
|
|
650
630
|
return [spatialWindowManagerRef.current];
|
|
651
631
|
}
|
|
652
|
-
__name(usePortalContainer, "usePortalContainer");
|
|
653
632
|
|
|
654
633
|
// src/spatial-react-components/SpatialReactComponent/utils.ts
|
|
655
634
|
function getInheritedStyleProps(computedStyle) {
|
|
@@ -708,7 +687,6 @@ function getInheritedStyleProps(computedStyle) {
|
|
|
708
687
|
}
|
|
709
688
|
return props;
|
|
710
689
|
}
|
|
711
|
-
__name(getInheritedStyleProps, "getInheritedStyleProps");
|
|
712
690
|
function domRect2rectType(from) {
|
|
713
691
|
return {
|
|
714
692
|
x: from.x,
|
|
@@ -717,7 +695,6 @@ function domRect2rectType(from) {
|
|
|
717
695
|
height: from.height
|
|
718
696
|
};
|
|
719
697
|
}
|
|
720
|
-
__name(domRect2rectType, "domRect2rectType");
|
|
721
698
|
function parseTransformOrigin(computedStyle) {
|
|
722
699
|
const transformOriginProperty = computedStyle.getPropertyValue("transform-origin");
|
|
723
700
|
const [x, y] = transformOriginProperty.split(" ").map(parseFloat);
|
|
@@ -729,7 +706,6 @@ function parseTransformOrigin(computedStyle) {
|
|
|
729
706
|
z: 0.5
|
|
730
707
|
};
|
|
731
708
|
}
|
|
732
|
-
__name(parseTransformOrigin, "parseTransformOrigin");
|
|
733
709
|
function parseBorderRadius(borderProperty, width) {
|
|
734
710
|
if (borderProperty === "") {
|
|
735
711
|
return 0;
|
|
@@ -739,7 +715,6 @@ function parseBorderRadius(borderProperty, width) {
|
|
|
739
715
|
}
|
|
740
716
|
return parseFloat(borderProperty);
|
|
741
717
|
}
|
|
742
|
-
__name(parseBorderRadius, "parseBorderRadius");
|
|
743
718
|
function parseCornerRadius(computedStyle) {
|
|
744
719
|
const width = parseFloat(computedStyle.getPropertyValue("width"));
|
|
745
720
|
const topLeftPropertyValue = computedStyle.getPropertyValue(
|
|
@@ -762,7 +737,6 @@ function parseCornerRadius(computedStyle) {
|
|
|
762
737
|
};
|
|
763
738
|
return cornerRadius;
|
|
764
739
|
}
|
|
765
|
-
__name(parseCornerRadius, "parseCornerRadius");
|
|
766
740
|
|
|
767
741
|
// src/spatial-react-components/SpatialReactComponent/SpatialDebugNameContext.ts
|
|
768
742
|
var import_react7 = require("react");
|
|
@@ -797,13 +771,11 @@ function renderJSXPortalInstance(inProps, elWidth, elHeight, inheritedPortalStyl
|
|
|
797
771
|
};
|
|
798
772
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(El, { style, className, ...props });
|
|
799
773
|
}
|
|
800
|
-
__name(renderJSXPortalInstance, "renderJSXPortalInstance");
|
|
801
774
|
function setOpenWindowStyle(openedWindow) {
|
|
802
775
|
openedWindow.document.documentElement.style.cssText += document.documentElement.style.cssText;
|
|
803
776
|
openedWindow.document.documentElement.style.backgroundColor = "transparent";
|
|
804
777
|
openedWindow.document.body.style.margin = "0px";
|
|
805
778
|
}
|
|
806
|
-
__name(setOpenWindowStyle, "setOpenWindowStyle");
|
|
807
779
|
function handleOpenWindowDocumentClick(openedWindow) {
|
|
808
780
|
openedWindow.document.onclick = function(e) {
|
|
809
781
|
let element = e.target;
|
|
@@ -823,7 +795,6 @@ function handleOpenWindowDocumentClick(openedWindow) {
|
|
|
823
795
|
}
|
|
824
796
|
};
|
|
825
797
|
}
|
|
826
|
-
__name(handleOpenWindowDocumentClick, "handleOpenWindowDocumentClick");
|
|
827
798
|
function asyncLoadStyleToChildWindow(childWindow, n, debugName) {
|
|
828
799
|
return new Promise((resolve) => {
|
|
829
800
|
n.href += "?uniqueURL=" + Math.random();
|
|
@@ -841,7 +812,6 @@ function asyncLoadStyleToChildWindow(childWindow, n, debugName) {
|
|
|
841
812
|
childWindow.document.head.appendChild(n);
|
|
842
813
|
});
|
|
843
814
|
}
|
|
844
|
-
__name(asyncLoadStyleToChildWindow, "asyncLoadStyleToChildWindow");
|
|
845
815
|
async function syncParentHeadToChild(childWindow, debugName) {
|
|
846
816
|
const styleLoadedPromises = [];
|
|
847
817
|
for (let i = document.head.children.length - 1; i >= 0; i--) {
|
|
@@ -862,7 +832,6 @@ async function syncParentHeadToChild(childWindow, debugName) {
|
|
|
862
832
|
}
|
|
863
833
|
return Promise.all(styleLoadedPromises);
|
|
864
834
|
}
|
|
865
|
-
__name(syncParentHeadToChild, "syncParentHeadToChild");
|
|
866
835
|
async function syncHeaderStyle(openedWindow, debugName) {
|
|
867
836
|
await syncParentHeadToChild(openedWindow, debugName);
|
|
868
837
|
const headObserver = new MutationObserver((mutations) => {
|
|
@@ -871,14 +840,12 @@ async function syncHeaderStyle(openedWindow, debugName) {
|
|
|
871
840
|
headObserver.observe(document.head, { childList: true, subtree: true });
|
|
872
841
|
return headObserver;
|
|
873
842
|
}
|
|
874
|
-
__name(syncHeaderStyle, "syncHeaderStyle");
|
|
875
843
|
function syncDefaultSpatialStyle(openedWindow, debugName) {
|
|
876
844
|
const styleElement = document.createElement("style");
|
|
877
845
|
styleElement.type = "text/css";
|
|
878
846
|
styleElement.innerHTML = " .xr-spatial-default { --xr-back: 0.001; --xr-background-material: none } ";
|
|
879
847
|
openedWindow.document.head.appendChild(styleElement);
|
|
880
848
|
}
|
|
881
|
-
__name(syncDefaultSpatialStyle, "syncDefaultSpatialStyle");
|
|
882
849
|
function useSyncSpatialProps(spatialWindowManager, props, domRect, anchor, cornerRadiusFromStyle, opacity, stylePosition) {
|
|
883
850
|
let { allowScroll, scrollWithParent, style, spatialStyle = {} } = props;
|
|
884
851
|
let {
|
|
@@ -1006,7 +973,6 @@ function useSyncSpatialProps(spatialWindowManager, props, domRect, anchor, corne
|
|
|
1006
973
|
}
|
|
1007
974
|
}, [spatialWindowManager, domRect.width]);
|
|
1008
975
|
}
|
|
1009
|
-
__name(useSyncSpatialProps, "useSyncSpatialProps");
|
|
1010
976
|
function useSyncDomRect(spatialId) {
|
|
1011
977
|
const [domRect, setDomRect] = (0, import_react8.useState)({
|
|
1012
978
|
x: 0,
|
|
@@ -1030,7 +996,7 @@ function useSyncDomRect(spatialId) {
|
|
|
1030
996
|
const spatialReactContextObject = (0, import_react8.useContext)(SpatialReactContext);
|
|
1031
997
|
const inheritedPortalClassNameRef = (0, import_react8.useRef)("");
|
|
1032
998
|
(0, import_react8.useEffect)(() => {
|
|
1033
|
-
const syncDomRect =
|
|
999
|
+
const syncDomRect = () => {
|
|
1034
1000
|
const dom = spatialReactContextObject?.querySpatialDom(spatialId);
|
|
1035
1001
|
if (!dom) {
|
|
1036
1002
|
return;
|
|
@@ -1054,7 +1020,7 @@ function useSyncDomRect(spatialId) {
|
|
|
1054
1020
|
opacityRef.current = opacity;
|
|
1055
1021
|
inheritedPortalClassNameRef.current = dom.className;
|
|
1056
1022
|
setDomRect(rectType);
|
|
1057
|
-
}
|
|
1023
|
+
};
|
|
1058
1024
|
spatialReactContextObject?.onDomChange(spatialId, syncDomRect);
|
|
1059
1025
|
return () => {
|
|
1060
1026
|
spatialReactContextObject?.offDomChange(spatialId);
|
|
@@ -1069,7 +1035,6 @@ function useSyncDomRect(spatialId) {
|
|
|
1069
1035
|
className: inheritedPortalClassNameRef.current
|
|
1070
1036
|
};
|
|
1071
1037
|
}
|
|
1072
|
-
__name(useSyncDomRect, "useSyncDomRect");
|
|
1073
1038
|
function PortalInstance(inProps) {
|
|
1074
1039
|
const { allowScroll, scrollWithParent, spatialStyle, isSubPortal, ...props } = inProps;
|
|
1075
1040
|
const debugName = (0, import_react8.useContext)(SpatialDebugNameContext);
|
|
@@ -1148,7 +1113,6 @@ function PortalInstance(inProps) {
|
|
|
1148
1113
|
)
|
|
1149
1114
|
] });
|
|
1150
1115
|
}
|
|
1151
|
-
__name(PortalInstance, "PortalInstance");
|
|
1152
1116
|
PortalInstance.displayName = "PortalInstance";
|
|
1153
1117
|
|
|
1154
1118
|
// src/spatial-react-components/SpatialReactComponent/SpatialLayerContext.ts
|
|
@@ -1173,13 +1137,11 @@ function parseProps(inProps) {
|
|
|
1173
1137
|
const debugDesc = { debugName, debugShowStandardInstance };
|
|
1174
1138
|
return { componentDesc, spatialDesc, debugDesc, props };
|
|
1175
1139
|
}
|
|
1176
|
-
__name(parseProps, "parseProps");
|
|
1177
1140
|
function renderWebReactComponent(inProps, ref) {
|
|
1178
1141
|
const { componentDesc, props } = parseProps(inProps);
|
|
1179
1142
|
const { El } = componentDesc;
|
|
1180
1143
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(El, { ...props, ref });
|
|
1181
1144
|
}
|
|
1182
|
-
__name(renderWebReactComponent, "renderWebReactComponent");
|
|
1183
1145
|
function renderSpatialReactComponent(inProps, ref) {
|
|
1184
1146
|
const { componentDesc, spatialDesc, debugDesc, props } = parseProps(inProps);
|
|
1185
1147
|
const standardInstanceProps = {
|
|
@@ -1201,7 +1163,6 @@ function renderSpatialReactComponent(inProps, ref) {
|
|
|
1201
1163
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PortalInstance, { isSubPortal: false, ...portalInstanceProps })
|
|
1202
1164
|
] });
|
|
1203
1165
|
}
|
|
1204
|
-
__name(renderSpatialReactComponent, "renderSpatialReactComponent");
|
|
1205
1166
|
function renderSubPortalInstance(inProps) {
|
|
1206
1167
|
const { componentDesc, spatialDesc, props } = parseProps(inProps);
|
|
1207
1168
|
const portalInstanceProps = {
|
|
@@ -1211,7 +1172,6 @@ function renderSubPortalInstance(inProps) {
|
|
|
1211
1172
|
};
|
|
1212
1173
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PortalInstance, { isSubPortal: true, ...portalInstanceProps });
|
|
1213
1174
|
}
|
|
1214
|
-
__name(renderSubPortalInstance, "renderSubPortalInstance");
|
|
1215
1175
|
function SpatialReactComponentRefactor(inProps, ref) {
|
|
1216
1176
|
const layer = (0, import_react10.useContext)(SpatialLayerContext) + 1;
|
|
1217
1177
|
const parentSpatialReactContextObject = (0, import_react10.useContext)(SpatialReactContext);
|
|
@@ -1228,7 +1188,6 @@ function SpatialReactComponentRefactor(inProps, ref) {
|
|
|
1228
1188
|
const contentInLayer = renderContentInLayer(props, ref);
|
|
1229
1189
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SpatialDebugNameContext.Provider, { value: inProps.debugName || "", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SpatialLayerContext.Provider, { value: layer, children: contentInLayer }) });
|
|
1230
1190
|
}
|
|
1231
|
-
__name(SpatialReactComponentRefactor, "SpatialReactComponentRefactor");
|
|
1232
1191
|
function renderContentInLayer(inProps, ref) {
|
|
1233
1192
|
const isInStandardInstance = (0, import_react10.useContext)(SpatialIsStandardInstanceContext);
|
|
1234
1193
|
const isWebSpatialEnv = getSession() !== null;
|
|
@@ -1243,7 +1202,6 @@ function renderContentInLayer(inProps, ref) {
|
|
|
1243
1202
|
}
|
|
1244
1203
|
}
|
|
1245
1204
|
}
|
|
1246
|
-
__name(renderContentInLayer, "renderContentInLayer");
|
|
1247
1205
|
var SpatialReactComponent = (0, import_react10.forwardRef)(SpatialReactComponentRefactor);
|
|
1248
1206
|
SpatialReactComponent.displayName = "SpatialReactComponent";
|
|
1249
1207
|
|
|
@@ -1273,13 +1231,12 @@ function withSpatial(Component) {
|
|
|
1273
1231
|
return WithSpatialComponent;
|
|
1274
1232
|
}
|
|
1275
1233
|
}
|
|
1276
|
-
__name(withSpatial, "withSpatial");
|
|
1277
1234
|
var SpatialPrimitive = {};
|
|
1278
|
-
(
|
|
1235
|
+
(function createSpatialPrimitive(SpatialPrimitive2) {
|
|
1279
1236
|
primitives.forEach((primitive) => {
|
|
1280
1237
|
SpatialPrimitive2[primitive] = withSpatial(primitive);
|
|
1281
1238
|
});
|
|
1282
|
-
}
|
|
1239
|
+
})(SpatialPrimitive);
|
|
1283
1240
|
var SpatialDiv = SpatialPrimitive.div;
|
|
1284
1241
|
|
|
1285
1242
|
// src/spatial-react-components/hooks/useMonitorDomChange.tsx
|
|
@@ -1293,7 +1250,6 @@ function notifyUpdateStandInstanceLayout() {
|
|
|
1293
1250
|
})
|
|
1294
1251
|
);
|
|
1295
1252
|
}
|
|
1296
|
-
__name(notifyUpdateStandInstanceLayout, "notifyUpdateStandInstanceLayout");
|
|
1297
1253
|
function notifyDOMUpdate(mutationsList) {
|
|
1298
1254
|
document.dispatchEvent(
|
|
1299
1255
|
new CustomEvent("domUpdated" /* domUpdated */, {
|
|
@@ -1301,7 +1257,6 @@ function notifyDOMUpdate(mutationsList) {
|
|
|
1301
1257
|
})
|
|
1302
1258
|
);
|
|
1303
1259
|
}
|
|
1304
|
-
__name(notifyDOMUpdate, "notifyDOMUpdate");
|
|
1305
1260
|
|
|
1306
1261
|
// src/spatial-react-components/hooks/useMonitorDomChange.tsx
|
|
1307
1262
|
function useMonitorDomChange() {
|
|
@@ -1323,7 +1278,6 @@ function useMonitorDomChange() {
|
|
|
1323
1278
|
}, []);
|
|
1324
1279
|
return ref;
|
|
1325
1280
|
}
|
|
1326
|
-
__name(useMonitorDomChange, "useMonitorDomChange");
|
|
1327
1281
|
|
|
1328
1282
|
// src/spatial-react-components/hooks/useMonitorDocumentHeaderChange.tsx
|
|
1329
1283
|
var import_react13 = require("react");
|
|
@@ -1343,7 +1297,6 @@ function useMonitorDocumentHeaderChange() {
|
|
|
1343
1297
|
};
|
|
1344
1298
|
}, []);
|
|
1345
1299
|
}
|
|
1346
|
-
__name(useMonitorDocumentHeaderChange, "useMonitorDocumentHeaderChange");
|
|
1347
1300
|
|
|
1348
1301
|
// src/spatial-react-components/SpatialMonitor.tsx
|
|
1349
1302
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
@@ -1357,7 +1310,6 @@ function SpatialMonitor(props) {
|
|
|
1357
1310
|
" "
|
|
1358
1311
|
] });
|
|
1359
1312
|
}
|
|
1360
|
-
__name(SpatialMonitor, "SpatialMonitor");
|
|
1361
1313
|
|
|
1362
1314
|
// src/spatial-react-components/CSSSpatialDiv/CSSSpatialDiv.tsx
|
|
1363
1315
|
var import_react20 = require("react");
|
|
@@ -1404,12 +1356,10 @@ function parse2dMatrix(transformDataArray) {
|
|
|
1404
1356
|
);
|
|
1405
1357
|
return matrix4;
|
|
1406
1358
|
}
|
|
1407
|
-
__name(parse2dMatrix, "parse2dMatrix");
|
|
1408
1359
|
function parse3dMatrix(transformDataArray) {
|
|
1409
1360
|
const matrix4 = new import_Matrix4.Matrix4().fromArray(transformDataArray);
|
|
1410
1361
|
return matrix4;
|
|
1411
1362
|
}
|
|
1412
|
-
__name(parse3dMatrix, "parse3dMatrix");
|
|
1413
1363
|
function parseTransform(computedStyle) {
|
|
1414
1364
|
let transform = computedStyle.getPropertyValue("transform");
|
|
1415
1365
|
const matrixFlagString = "matrix(";
|
|
@@ -1428,7 +1378,6 @@ function parseTransform(computedStyle) {
|
|
|
1428
1378
|
}
|
|
1429
1379
|
}
|
|
1430
1380
|
}
|
|
1431
|
-
__name(parseTransform, "parseTransform");
|
|
1432
1381
|
function parseBack(computedStyle) {
|
|
1433
1382
|
let useBackProperty = computedStyle.position === "absolute" || computedStyle.position === "relative" || computedStyle.position === "fixed";
|
|
1434
1383
|
if (!useBackProperty) return new import_Matrix4.Matrix4();
|
|
@@ -1440,7 +1389,6 @@ function parseBack(computedStyle) {
|
|
|
1440
1389
|
}
|
|
1441
1390
|
return new import_Matrix4.Matrix4().makeTranslation(0, 0, back || 1);
|
|
1442
1391
|
}
|
|
1443
|
-
__name(parseBack, "parseBack");
|
|
1444
1392
|
function parseSpatialStyle(node) {
|
|
1445
1393
|
const computedStyle = getComputedStyle(node);
|
|
1446
1394
|
const mat4ForBack = parseBack(computedStyle);
|
|
@@ -1472,7 +1420,6 @@ function parseSpatialStyle(node) {
|
|
|
1472
1420
|
visible
|
|
1473
1421
|
};
|
|
1474
1422
|
}
|
|
1475
|
-
__name(parseSpatialStyle, "parseSpatialStyle");
|
|
1476
1423
|
function useSpatialStyle() {
|
|
1477
1424
|
const ref = (0, import_react14.useRef)(null);
|
|
1478
1425
|
const [spatialStyle, setSpatialStyle] = (0, import_react14.useState)({
|
|
@@ -1536,8 +1483,7 @@ function useSpatialStyle() {
|
|
|
1536
1483
|
}
|
|
1537
1484
|
return false;
|
|
1538
1485
|
}
|
|
1539
|
-
|
|
1540
|
-
const onDomUpdated = /* @__PURE__ */ __name((event) => {
|
|
1486
|
+
const onDomUpdated = (event) => {
|
|
1541
1487
|
const mutationsList = event.detail;
|
|
1542
1488
|
const spatialReactComponentDiv = ref.current.previousElementSibling;
|
|
1543
1489
|
const targets = mutationsList.map((m) => m.target).filter(
|
|
@@ -1546,7 +1492,7 @@ function useSpatialStyle() {
|
|
|
1546
1492
|
if (targets.length > 0) {
|
|
1547
1493
|
checkSpatialStyleUpdate();
|
|
1548
1494
|
}
|
|
1549
|
-
}
|
|
1495
|
+
};
|
|
1550
1496
|
document.addEventListener(
|
|
1551
1497
|
"domUpdated" /* domUpdated */,
|
|
1552
1498
|
onDomUpdated
|
|
@@ -1560,7 +1506,6 @@ function useSpatialStyle() {
|
|
|
1560
1506
|
}, []);
|
|
1561
1507
|
return { ref, ready, spatialStyle };
|
|
1562
1508
|
}
|
|
1563
|
-
__name(useSpatialStyle, "useSpatialStyle");
|
|
1564
1509
|
|
|
1565
1510
|
// src/spatial-react-components/CSSSpatialDiv/CSSSpatialDebugNameContext.ts
|
|
1566
1511
|
var import_react15 = require("react");
|
|
@@ -1580,7 +1525,6 @@ function injectClassStyle() {
|
|
|
1580
1525
|
`;
|
|
1581
1526
|
document.head.prepend(style);
|
|
1582
1527
|
}
|
|
1583
|
-
__name(injectClassStyle, "injectClassStyle");
|
|
1584
1528
|
injectClassStyle();
|
|
1585
1529
|
|
|
1586
1530
|
// src/spatial-react-components/CSSSpatialDiv/utils.ts
|
|
@@ -1601,18 +1545,15 @@ function extractAndRemoveCustomProperties(cssText, properties) {
|
|
|
1601
1545
|
const filteredCssText = filteredRules.join(";").trim();
|
|
1602
1546
|
return { extractedValues, filteredCssText };
|
|
1603
1547
|
}
|
|
1604
|
-
__name(extractAndRemoveCustomProperties, "extractAndRemoveCustomProperties");
|
|
1605
1548
|
function joinToCSSText(cssKV) {
|
|
1606
1549
|
const rules = Object.entries(cssKV).map(([key, value]) => `${key}: ${value}`);
|
|
1607
1550
|
return rules.join(";");
|
|
1608
1551
|
}
|
|
1609
|
-
__name(joinToCSSText, "joinToCSSText");
|
|
1610
1552
|
|
|
1611
1553
|
// src/spatial-react-components/CSSSpatialDiv/useHijackSpatialDivRef.ts
|
|
1612
1554
|
function makeOriginalKey(key) {
|
|
1613
1555
|
return `__original_${key}`;
|
|
1614
1556
|
}
|
|
1615
|
-
__name(makeOriginalKey, "makeOriginalKey");
|
|
1616
1557
|
function useHijackSpatialDivRef(refIn, cssParserRef) {
|
|
1617
1558
|
const ref = cssParserRef;
|
|
1618
1559
|
const spatialDivRef = (0, import_react16.useCallback)(
|
|
@@ -1728,9 +1669,9 @@ function useHijackSpatialDivRef(refIn, cssParserRef) {
|
|
|
1728
1669
|
return result;
|
|
1729
1670
|
};
|
|
1730
1671
|
});
|
|
1731
|
-
const __getComputedStyle =
|
|
1672
|
+
const __getComputedStyle = (originalGetComputedStyle, pseudoElt) => {
|
|
1732
1673
|
return originalGetComputedStyle(domElement, pseudoElt);
|
|
1733
|
-
}
|
|
1674
|
+
};
|
|
1734
1675
|
const proxyDomElement = new Proxy(domElement, {
|
|
1735
1676
|
get(target, prop) {
|
|
1736
1677
|
if (prop === "style") {
|
|
@@ -1790,7 +1731,6 @@ function useHijackSpatialDivRef(refIn, cssParserRef) {
|
|
|
1790
1731
|
);
|
|
1791
1732
|
return spatialDivRef;
|
|
1792
1733
|
}
|
|
1793
|
-
__name(useHijackSpatialDivRef, "useHijackSpatialDivRef");
|
|
1794
1734
|
|
|
1795
1735
|
// src/spatial-react-components/CSSSpatialDiv/CSSSpatialLayerContext.ts
|
|
1796
1736
|
var import_react17 = require("react");
|
|
@@ -1800,9 +1740,6 @@ var CSSSpatialLayerContext = (0, import_react17.createContext)(0);
|
|
|
1800
1740
|
var import_react18 = require("react");
|
|
1801
1741
|
var CSSSpatialID = "CSSSpatialID";
|
|
1802
1742
|
var CSSSpatialRootContextObject = class {
|
|
1803
|
-
static {
|
|
1804
|
-
__name(this, "CSSSpatialRootContextObject");
|
|
1805
|
-
}
|
|
1806
1743
|
prefix = "css";
|
|
1807
1744
|
domSpatialId = null;
|
|
1808
1745
|
fns = {};
|
|
@@ -1893,11 +1830,9 @@ function renderRootCSSSpatialComponent(inProps, refIn) {
|
|
|
1893
1830
|
)
|
|
1894
1831
|
] });
|
|
1895
1832
|
}
|
|
1896
|
-
__name(renderRootCSSSpatialComponent, "renderRootCSSSpatialComponent");
|
|
1897
1833
|
function renderInWebEnv(props, ref) {
|
|
1898
1834
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SpatialReactComponent, { ...props, ref });
|
|
1899
1835
|
}
|
|
1900
|
-
__name(renderInWebEnv, "renderInWebEnv");
|
|
1901
1836
|
function renderInStandardInstance(cssSpatialRootContextObject, cssSpatialID, inProps, refIn) {
|
|
1902
1837
|
const { style: inStyle = {}, ...props } = inProps;
|
|
1903
1838
|
const style = {
|
|
@@ -1908,9 +1843,9 @@ function renderInStandardInstance(cssSpatialRootContextObject, cssSpatialID, inP
|
|
|
1908
1843
|
var cssParserRef = (0, import_react19.useRef)(null);
|
|
1909
1844
|
const spatialDivRef = useHijackSpatialDivRef(refIn, cssParserRef);
|
|
1910
1845
|
(0, import_react19.useEffect)(() => {
|
|
1911
|
-
const onDomChangeAction =
|
|
1846
|
+
const onDomChangeAction = (dom) => {
|
|
1912
1847
|
cssParserRef.current = dom;
|
|
1913
|
-
}
|
|
1848
|
+
};
|
|
1914
1849
|
cssSpatialRootContextObject.onDomChange(cssSpatialID, onDomChangeAction);
|
|
1915
1850
|
return () => {
|
|
1916
1851
|
cssSpatialRootContextObject.offDomChange(cssSpatialID, onDomChangeAction);
|
|
@@ -1918,7 +1853,6 @@ function renderInStandardInstance(cssSpatialRootContextObject, cssSpatialID, inP
|
|
|
1918
1853
|
}, []);
|
|
1919
1854
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SpatialReactComponent, { style, ...props, ref: spatialDivRef });
|
|
1920
1855
|
}
|
|
1921
|
-
__name(renderInStandardInstance, "renderInStandardInstance");
|
|
1922
1856
|
function renderInPortalInstance(cssSpatialRootContextObject, cssSpatialID, inProps) {
|
|
1923
1857
|
const {
|
|
1924
1858
|
style = {},
|
|
@@ -1969,7 +1903,6 @@ function renderInPortalInstance(cssSpatialRootContextObject, cssSpatialID, inPro
|
|
|
1969
1903
|
)
|
|
1970
1904
|
] });
|
|
1971
1905
|
}
|
|
1972
|
-
__name(renderInPortalInstance, "renderInPortalInstance");
|
|
1973
1906
|
function CSSSpatialComponentBase(inProps, ref) {
|
|
1974
1907
|
const { [CSSSpatialID]: cssSpatialID, ...props } = inProps;
|
|
1975
1908
|
const isWebEnv = true;
|
|
@@ -2000,7 +1933,6 @@ function CSSSpatialComponentBase(inProps, ref) {
|
|
|
2000
1933
|
}
|
|
2001
1934
|
}
|
|
2002
1935
|
}
|
|
2003
|
-
__name(CSSSpatialComponentBase, "CSSSpatialComponentBase");
|
|
2004
1936
|
var CSSSpatialComponentBaseWithRef = (0, import_react19.forwardRef)(CSSSpatialComponentBase);
|
|
2005
1937
|
function CSSSpatialComponentWithRef(inProps, ref) {
|
|
2006
1938
|
const layer = (0, import_react19.useContext)(CSSSpatialLayerContext) + 1;
|
|
@@ -2017,7 +1949,6 @@ function CSSSpatialComponentWithRef(inProps, ref) {
|
|
|
2017
1949
|
const props = { ...inProps, [CSSSpatialID]: cssSpatialID };
|
|
2018
1950
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CSSSpatialDebugNameContext.Provider, { value: inProps.debugName || "", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CSSSpatialLayerContext.Provider, { value: layer, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CSSSpatialComponentBaseWithRef, { ...props, ref }) }) });
|
|
2019
1951
|
}
|
|
2020
|
-
__name(CSSSpatialComponentWithRef, "CSSSpatialComponentWithRef");
|
|
2021
1952
|
var CSSSpatialComponent = (0, import_react19.forwardRef)(CSSSpatialComponentWithRef);
|
|
2022
1953
|
|
|
2023
1954
|
// src/spatial-react-components/CSSSpatialDiv/CSSSpatialDiv.tsx
|
|
@@ -2055,21 +1986,21 @@ function withCSSSpatial(Component) {
|
|
|
2055
1986
|
return WithCSSSpatialComponent;
|
|
2056
1987
|
}
|
|
2057
1988
|
}
|
|
2058
|
-
__name(withCSSSpatial, "withCSSSpatial");
|
|
2059
1989
|
var CSSSpatialPrimitive = {};
|
|
2060
|
-
(
|
|
1990
|
+
(function createSpatialPrimitive2(CSSSpatialPrimitive2) {
|
|
2061
1991
|
primitives.forEach((primitive) => {
|
|
2062
1992
|
CSSSpatialPrimitive2[primitive] = withCSSSpatial(primitive);
|
|
2063
1993
|
});
|
|
2064
|
-
}
|
|
1994
|
+
})(CSSSpatialPrimitive);
|
|
2065
1995
|
var CSSSpatialDiv = CSSSpatialPrimitive.div;
|
|
2066
1996
|
|
|
2067
1997
|
// src/spatial-react-components/SpatialView.tsx
|
|
1998
|
+
var import_core_sdk2 = require("@webspatial/core-sdk");
|
|
2068
1999
|
var import_react21 = require("react");
|
|
2069
2000
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2070
|
-
var runAsync =
|
|
2001
|
+
var runAsync = (fn) => {
|
|
2071
2002
|
return fn();
|
|
2072
|
-
}
|
|
2003
|
+
};
|
|
2073
2004
|
var SpatialViewEl = (0, import_react21.forwardRef)(
|
|
2074
2005
|
(props, ref) => {
|
|
2075
2006
|
const divRef = (0, import_react21.useRef)(null);
|
|
@@ -2077,12 +2008,12 @@ var SpatialViewEl = (0, import_react21.forwardRef)(
|
|
|
2077
2008
|
const activePromise = (0, import_react21.useRef)(null);
|
|
2078
2009
|
(0, import_react21.useImperativeHandle)(ref, () => ({
|
|
2079
2010
|
...divRef.current,
|
|
2080
|
-
getViewEntity:
|
|
2011
|
+
getViewEntity: async () => {
|
|
2081
2012
|
if (activePromise.current) {
|
|
2082
2013
|
await activePromise.current;
|
|
2083
2014
|
}
|
|
2084
2015
|
return spatialEntity.current;
|
|
2085
|
-
}
|
|
2016
|
+
}
|
|
2086
2017
|
}));
|
|
2087
2018
|
if (getSession() == null) {
|
|
2088
2019
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { ref: divRef, ...props, children: "WebSpatial is not supported in this browser" });
|
|
@@ -2093,7 +2024,7 @@ var SpatialViewEl = (0, import_react21.forwardRef)(
|
|
|
2093
2024
|
if (activePromise.current) {
|
|
2094
2025
|
await activePromise.current;
|
|
2095
2026
|
}
|
|
2096
|
-
let sh = new SpatialHelper(getSession());
|
|
2027
|
+
let sh = new import_core_sdk2.SpatialHelper(getSession());
|
|
2097
2028
|
let x = await sh.dom.attachSpatialView(divRef.current);
|
|
2098
2029
|
spatialEntity.current = x.entity;
|
|
2099
2030
|
if (props.onViewLoad) {
|
|
@@ -2159,7 +2090,6 @@ function useDetectLayoutDomUpdated(onDomUpdated) {
|
|
|
2159
2090
|
}, []);
|
|
2160
2091
|
return ref;
|
|
2161
2092
|
}
|
|
2162
|
-
__name(useDetectLayoutDomUpdated, "useDetectLayoutDomUpdated");
|
|
2163
2093
|
|
|
2164
2094
|
// src/spatial-react-components/Model3D/useModel3DNative.ts
|
|
2165
2095
|
var import_react23 = require("react");
|
|
@@ -2180,7 +2110,6 @@ function PopulatePartialSpatialTransformType(spatialTransform = {}) {
|
|
|
2180
2110
|
scale: { x: sx, y: sy, z: sz }
|
|
2181
2111
|
};
|
|
2182
2112
|
}
|
|
2183
|
-
__name(PopulatePartialSpatialTransformType, "PopulatePartialSpatialTransformType");
|
|
2184
2113
|
function getAbsoluteURL(url) {
|
|
2185
2114
|
if (!url) {
|
|
2186
2115
|
return "";
|
|
@@ -2190,13 +2119,9 @@ function getAbsoluteURL(url) {
|
|
|
2190
2119
|
}
|
|
2191
2120
|
return `${location.origin}${url}`;
|
|
2192
2121
|
}
|
|
2193
|
-
__name(getAbsoluteURL, "getAbsoluteURL");
|
|
2194
2122
|
|
|
2195
2123
|
// src/spatial-react-components/Model3D/Model3DNative.ts
|
|
2196
2124
|
var Model3DNative = class {
|
|
2197
|
-
static {
|
|
2198
|
-
__name(this, "Model3DNative");
|
|
2199
|
-
}
|
|
2200
2125
|
constructor(parentEntity) {
|
|
2201
2126
|
this.parentEntity = parentEntity;
|
|
2202
2127
|
}
|
|
@@ -2454,7 +2379,6 @@ function useModel3DNative(modelUrl, parentEntity, eventHandlers = {}, onModel3DN
|
|
|
2454
2379
|
}, [model3DNativeRef.current, eventHandlers.onLongPress]);
|
|
2455
2380
|
return { model3DNativeRef, phase, failureReason };
|
|
2456
2381
|
}
|
|
2457
|
-
__name(useModel3DNative, "useModel3DNative");
|
|
2458
2382
|
|
|
2459
2383
|
// src/spatial-react-components/Model3D/Model3DNotInSpatialDiv.tsx
|
|
2460
2384
|
var import_react24 = require("react");
|
|
@@ -2697,7 +2621,6 @@ function renderModel3DNotInSpatialDiv(props, refIn) {
|
|
|
2697
2621
|
}, [modelUrl]);
|
|
2698
2622
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className, style: layoutDomStyle, ref: proxyRef, children: phase === "failure" && children });
|
|
2699
2623
|
}
|
|
2700
|
-
__name(renderModel3DNotInSpatialDiv, "renderModel3DNotInSpatialDiv");
|
|
2701
2624
|
|
|
2702
2625
|
// src/spatial-react-components/Model3D/Model3DStandardInstance.tsx
|
|
2703
2626
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
@@ -2717,7 +2640,6 @@ function renderModel3DStandardInstance(spatialId, props, refIn) {
|
|
|
2717
2640
|
}
|
|
2718
2641
|
);
|
|
2719
2642
|
}
|
|
2720
|
-
__name(renderModel3DStandardInstance, "renderModel3DStandardInstance");
|
|
2721
2643
|
|
|
2722
2644
|
// src/spatial-react-components/Model3D/Model3DPortalInstance.tsx
|
|
2723
2645
|
var import_react26 = require("react");
|
|
@@ -2742,7 +2664,7 @@ function useSyncDomInfoFromStandardInstance(spatialId) {
|
|
|
2742
2664
|
const inheritedPortalClassNameRef = (0, import_react25.useRef)("");
|
|
2743
2665
|
const modelRef = (0, import_react25.useRef)(null);
|
|
2744
2666
|
(0, import_react25.useEffect)(() => {
|
|
2745
|
-
const syncDomRect =
|
|
2667
|
+
const syncDomRect = () => {
|
|
2746
2668
|
const dom = spatialReactContextObject?.querySpatialDom(spatialId);
|
|
2747
2669
|
if (!dom) {
|
|
2748
2670
|
return;
|
|
@@ -2765,7 +2687,7 @@ function useSyncDomInfoFromStandardInstance(spatialId) {
|
|
|
2765
2687
|
opacityRef.current = opacity;
|
|
2766
2688
|
inheritedPortalClassNameRef.current = dom.className;
|
|
2767
2689
|
setDomRect(rectType);
|
|
2768
|
-
}
|
|
2690
|
+
};
|
|
2769
2691
|
spatialReactContextObject?.onDomChange(spatialId, syncDomRect);
|
|
2770
2692
|
return () => {
|
|
2771
2693
|
spatialReactContextObject?.offDomChange(spatialId);
|
|
@@ -2780,7 +2702,6 @@ function useSyncDomInfoFromStandardInstance(spatialId) {
|
|
|
2780
2702
|
className: inheritedPortalClassNameRef.current
|
|
2781
2703
|
};
|
|
2782
2704
|
}
|
|
2783
|
-
__name(useSyncDomInfoFromStandardInstance, "useSyncDomInfoFromStandardInstance");
|
|
2784
2705
|
|
|
2785
2706
|
// src/spatial-react-components/Model3D/Model3DPortalInstance.tsx
|
|
2786
2707
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
@@ -2862,7 +2783,6 @@ function useModelEvents(props, modelRef) {
|
|
|
2862
2783
|
onLongPress: onLongPressCb
|
|
2863
2784
|
};
|
|
2864
2785
|
}
|
|
2865
|
-
__name(useModelEvents, "useModelEvents");
|
|
2866
2786
|
function renderModel3DPortalInstance(spatialId, props) {
|
|
2867
2787
|
const {
|
|
2868
2788
|
style: _,
|
|
@@ -3004,7 +2924,6 @@ function renderModel3DPortalInstance(spatialId, props) {
|
|
|
3004
2924
|
);
|
|
3005
2925
|
}
|
|
3006
2926
|
}
|
|
3007
|
-
__name(renderModel3DPortalInstance, "renderModel3DPortalInstance");
|
|
3008
2927
|
|
|
3009
2928
|
// src/spatial-react-components/Model3D/Model3D.tsx
|
|
3010
2929
|
function Model3DBase(props, refIn) {
|
|
@@ -3029,7 +2948,6 @@ function Model3DBase(props, refIn) {
|
|
|
3029
2948
|
return renderModel3DNotInSpatialDiv(props, refIn);
|
|
3030
2949
|
}
|
|
3031
2950
|
}
|
|
3032
|
-
__name(Model3DBase, "Model3DBase");
|
|
3033
2951
|
var Model3D = (0, import_react27.forwardRef)(Model3DBase);
|
|
3034
2952
|
Model3D.displayName = "Model3D";
|
|
3035
2953
|
|
|
@@ -3083,7 +3001,6 @@ function renderCSSModel3DNotInSpatialDiv(inProps, refIn) {
|
|
|
3083
3001
|
)
|
|
3084
3002
|
] });
|
|
3085
3003
|
}
|
|
3086
|
-
__name(renderCSSModel3DNotInSpatialDiv, "renderCSSModel3DNotInSpatialDiv");
|
|
3087
3004
|
|
|
3088
3005
|
// src/spatial-react-components/Model3D/CSSModel3DStandardInstance.tsx
|
|
3089
3006
|
var import_react28 = require("react");
|
|
@@ -3102,9 +3019,9 @@ function renderCSSModel3DStandardInstance(spatialId, inProps, refIn) {
|
|
|
3102
3019
|
);
|
|
3103
3020
|
const rootSpatialReactContextObject = (0, import_react28.useContext)(SpatialReactContext);
|
|
3104
3021
|
(0, import_react28.useEffect)(() => {
|
|
3105
|
-
const onSubEvent =
|
|
3022
|
+
const onSubEvent = (dom) => {
|
|
3106
3023
|
cssParserRef.current = dom;
|
|
3107
|
-
}
|
|
3024
|
+
};
|
|
3108
3025
|
rootSpatialReactContextObject.onSubDivEvent(spatialId, onSubEvent);
|
|
3109
3026
|
return () => {
|
|
3110
3027
|
rootSpatialReactContextObject.offSubDivEvent(spatialId);
|
|
@@ -3112,7 +3029,6 @@ function renderCSSModel3DStandardInstance(spatialId, inProps, refIn) {
|
|
|
3112
3029
|
}, []);
|
|
3113
3030
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Model3D, { style, ...props, ref, visible: true });
|
|
3114
3031
|
}
|
|
3115
|
-
__name(renderCSSModel3DStandardInstance, "renderCSSModel3DStandardInstance");
|
|
3116
3032
|
|
|
3117
3033
|
// src/spatial-react-components/Model3D/CSSModel3DPortalInstance.tsx
|
|
3118
3034
|
var import_react29 = require("react");
|
|
@@ -3154,7 +3070,6 @@ function renderCSSModel3DPortalInstance(spatialId, inProps) {
|
|
|
3154
3070
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className, style: cssParserDomStyle, ref })
|
|
3155
3071
|
] });
|
|
3156
3072
|
}
|
|
3157
|
-
__name(renderCSSModel3DPortalInstance, "renderCSSModel3DPortalInstance");
|
|
3158
3073
|
|
|
3159
3074
|
// src/spatial-react-components/Model3D/CSSModel3D.tsx
|
|
3160
3075
|
function CSSModel3DBase(props, refIn) {
|
|
@@ -3179,7 +3094,6 @@ function CSSModel3DBase(props, refIn) {
|
|
|
3179
3094
|
return renderCSSModel3DNotInSpatialDiv(props, refIn);
|
|
3180
3095
|
}
|
|
3181
3096
|
}
|
|
3182
|
-
__name(CSSModel3DBase, "CSSModel3DBase");
|
|
3183
3097
|
var CSSModel3D = (0, import_react30.forwardRef)(CSSModel3DBase);
|
|
3184
3098
|
CSSModel3D.displayName = "CSSModel3D";
|
|
3185
3099
|
|
|
@@ -3194,7 +3108,6 @@ function renderInModel3D(inProps, ref, modelUrl, placeHolder) {
|
|
|
3194
3108
|
" "
|
|
3195
3109
|
] });
|
|
3196
3110
|
}
|
|
3197
|
-
__name(renderInModel3D, "renderInModel3D");
|
|
3198
3111
|
function parseChildren(child) {
|
|
3199
3112
|
if (child === void 0) {
|
|
3200
3113
|
throw new Error("children with <source> required ");
|
|
@@ -3223,7 +3136,6 @@ function parseChildren(child) {
|
|
|
3223
3136
|
usdzSourceURL: getAbsoluteURL(usdzSourceURL)
|
|
3224
3137
|
};
|
|
3225
3138
|
}
|
|
3226
|
-
__name(parseChildren, "parseChildren");
|
|
3227
3139
|
function ModelBase(inProps, ref) {
|
|
3228
3140
|
const { children, ...props } = inProps;
|
|
3229
3141
|
const { placeHolder, gltfSourceURL, usdzSourceURL } = (0, import_react31.useMemo)(
|
|
@@ -3308,7 +3220,6 @@ function ModelBase(inProps, ref) {
|
|
|
3308
3220
|
return renderInModel3D(props, ref, usdzSourceURL, placeHolder);
|
|
3309
3221
|
}
|
|
3310
3222
|
}
|
|
3311
|
-
__name(ModelBase, "ModelBase");
|
|
3312
3223
|
var Model = (0, import_react31.forwardRef)(ModelBase);
|
|
3313
3224
|
Model.displayName = "Model";
|
|
3314
3225
|
|
|
@@ -3323,9 +3234,6 @@ var defaultSceneConfig = {
|
|
|
3323
3234
|
var CONTEXT_WINDOW_URL = "webspatial://createWindowContext";
|
|
3324
3235
|
var originalOpen = window.open;
|
|
3325
3236
|
var XRApp = class _XRApp {
|
|
3326
|
-
static {
|
|
3327
|
-
__name(this, "XRApp");
|
|
3328
|
-
}
|
|
3329
3237
|
static instance;
|
|
3330
3238
|
static getInstance() {
|
|
3331
3239
|
if (!_XRApp.instance) {
|
|
@@ -3380,7 +3288,7 @@ var XRApp = class _XRApp {
|
|
|
3380
3288
|
console.error(error);
|
|
3381
3289
|
}
|
|
3382
3290
|
}
|
|
3383
|
-
open =
|
|
3291
|
+
open = (url, target, features) => {
|
|
3384
3292
|
const newWindow = originalOpen(url, target, features);
|
|
3385
3293
|
if (url === CONTEXT_WINDOW_URL) return newWindow;
|
|
3386
3294
|
if (target === "_self" || target === "_parent" || target === "_top") {
|
|
@@ -3425,7 +3333,7 @@ var XRApp = class _XRApp {
|
|
|
3425
3333
|
}
|
|
3426
3334
|
}, 0);
|
|
3427
3335
|
return newWindow;
|
|
3428
|
-
}
|
|
3336
|
+
};
|
|
3429
3337
|
initScene(name, callback) {
|
|
3430
3338
|
this.configMap[name] = callback({ ...defaultSceneConfig });
|
|
3431
3339
|
}
|
|
@@ -3433,5 +3341,23 @@ var XRApp = class _XRApp {
|
|
|
3433
3341
|
function initScene(name, callback) {
|
|
3434
3342
|
return XRApp.getInstance().initScene(name, callback);
|
|
3435
3343
|
}
|
|
3436
|
-
|
|
3437
|
-
|
|
3344
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3345
|
+
0 && (module.exports = {
|
|
3346
|
+
CSSSpatialDiv,
|
|
3347
|
+
CSSSpatialPrimitive,
|
|
3348
|
+
Model,
|
|
3349
|
+
SpatialDiv,
|
|
3350
|
+
SpatialMonitor,
|
|
3351
|
+
SpatialPrimitive,
|
|
3352
|
+
SpatialView,
|
|
3353
|
+
XRApp,
|
|
3354
|
+
defaultSceneConfig,
|
|
3355
|
+
enableDebugTool,
|
|
3356
|
+
getSession,
|
|
3357
|
+
initScene,
|
|
3358
|
+
notifyUpdateStandInstanceLayout,
|
|
3359
|
+
parseCornerRadius,
|
|
3360
|
+
withCSSSpatial,
|
|
3361
|
+
withSpatial
|
|
3362
|
+
});
|
|
3363
|
+
//# sourceMappingURL=index.js.map
|