@webspatial/react-sdk 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { ReactNode, CSSProperties, ElementType, ForwardedRef } from 'react';
3
3
  import { BackgroundMaterialType, CornerRadius, SpatialEntity, Vec3, SpatialSession } from '@webspatial/core-sdk';
4
- import * as react_jsx_runtime from 'react/jsx-runtime';
5
4
  import { ModelViewerElement } from '@google/model-viewer';
6
5
  import { WindowContainerOptions } from '@webspatial/core-sdk/';
7
6
 
@@ -47,11 +46,12 @@ declare function withSpatial(Component: React__default.ElementType): any;
47
46
  declare const SpatialPrimitive: Record<string, typeof SpatialReactComponent>;
48
47
  declare const SpatialDiv: React__default.ForwardRefExoticComponent<SpatialReactComponentProps & React__default.RefAttributes<HTMLDivElement>>;
49
48
 
50
- /**
51
- * Component that add MutationObserver to monitor all dom changes including its children.
52
- * If any dom changes, it will notify all SpatialDiv to render again for the purpose of sync standInstance layout to portalInstance.
53
- */
54
- declare function SpatialMonitor(props: any): react_jsx_runtime.JSX.Element;
49
+ declare function withSpatialMonitor(El: React__default.ElementType): any;
50
+
51
+ type SpatialMonitorProps = {
52
+ El?: ElementType;
53
+ };
54
+ declare const SpatialMonitor: React.ForwardRefExoticComponent<SpatialMonitorProps & React.RefAttributes<HTMLElement>>;
55
55
 
56
56
  /**
57
57
  * External-developers can call this function to sync the standardInstance layout to PortalInstance.
@@ -161,4 +161,4 @@ declare class XRApp {
161
161
  }
162
162
  declare function initScene(name: string, callback: (pre: WindowContainerOptions) => WindowContainerOptions): void;
163
163
 
164
- export { CSSSpatialDiv, CSSSpatialPrimitive, Model, type ModelProps, SpatialDiv, type SpatialReactComponentProps as SpatialDivProps, type SpatialReactComponentRef as SpatialDivRef, SpatialMonitor, SpatialPrimitive, type SpatialReactComponentProps, type SpatialReactComponentRef, SpatialView, type SpatialViewRef, XRApp, defaultSceneConfig, enableDebugTool, getSession, initScene, notifyUpdateStandInstanceLayout, parseCornerRadius, withCSSSpatial, withSpatial };
164
+ export { CSSSpatialDiv, CSSSpatialPrimitive, Model, type ModelProps, SpatialDiv, type SpatialReactComponentProps as SpatialDivProps, type SpatialReactComponentRef as SpatialDivRef, SpatialMonitor, SpatialPrimitive, type SpatialReactComponentProps, type SpatialReactComponentRef, SpatialView, type SpatialViewRef, XRApp, defaultSceneConfig, enableDebugTool, getSession, initScene, notifyUpdateStandInstanceLayout, parseCornerRadius, withCSSSpatial, withSpatial, withSpatialMonitor };