@webspatial/react-sdk 1.0.4 → 1.1.0

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,51 +1,117 @@
1
+ import { SpatialSceneCreationOptions, SpatialSceneType, SpatialTapEvent as SpatialTapEvent$1, SpatialDragEvent as SpatialDragEvent$1, SpatialRotateEvent as SpatialRotateEvent$1, SpatialMagnifyEvent as SpatialMagnifyEvent$1, SpatializedElement, Point3D, SpatialObject, SpatialSession, SpatializedDynamic3DElement, Vec3, SpatialEntity, SpatialRotateEndEvent as SpatialRotateEndEvent$1, SpatialMagnifyEndEvent as SpatialMagnifyEndEvent$1, SpatialBoxGeometryOptions, SpatialUnlitMaterialOptions, SpatialSphereGeometryOptions, SpatialConeGeometryOptions, SpatialCylinderGeometryOptions, SpatialPlaneGeometryOptions } from '@webspatial/core-sdk';
2
+ export { Point3D, Vec3 } from '@webspatial/core-sdk';
1
3
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, CSSProperties, ElementType, ForwardedRef } from 'react';
3
- import { BackgroundMaterialType, CornerRadius, SpatialEntity, Vec3, SpatialSession, WindowContainerOptions as WindowContainerOptions$1 } from '@webspatial/core-sdk';
4
- import { ModelViewerElement } from '@google/model-viewer';
5
- import { WindowContainerOptions } from '@webspatial/core-sdk/';
6
- export { WindowContainerOptions } from '@webspatial/core-sdk/';
7
-
8
- type vecType = {
9
- x: number;
10
- y: number;
11
- z: number;
12
- };
13
- type quatType = {
14
- x: number;
15
- y: number;
16
- z: number;
17
- w: number;
18
- };
19
-
20
- type spatialStyleDef = {
21
- position: Partial<vecType>;
22
- rotation: quatType;
23
- scale: Partial<vecType>;
24
- zIndex?: number;
25
- material?: {
26
- type: BackgroundMaterialType;
27
- };
28
- cornerRadius: number | CornerRadius;
29
- visible?: boolean;
30
- };
31
- interface SpatialReactComponentProps {
32
- allowScroll?: boolean;
33
- scrollWithParent?: boolean;
34
- spatialStyle?: Partial<spatialStyleDef>;
35
- children?: ReactNode;
36
- className?: string;
37
- style?: CSSProperties | undefined;
38
- component?: ElementType;
39
- debugName?: string;
40
- debugShowStandardInstance?: boolean;
4
+ import React__default, { ElementType, ForwardedRef } from 'react';
5
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
+
7
+ declare function enableDebugTool(): void;
8
+
9
+ declare function initScene(name: string, callback: (pre: SpatialSceneCreationOptions) => SpatialSceneCreationOptions, options?: {
10
+ type: SpatialSceneType;
11
+ }): void | undefined;
12
+
13
+ declare const SpatialID = "data-spatial-id";
14
+
15
+ type SpatialEventProps<T extends SpatializedElementRef> = {
16
+ onSpatialTap?: (event: SpatialTapEvent<T>) => void;
17
+ onSpatialDragStart?: (event: SpatialDragStartEvent<T>) => void;
18
+ onSpatialDrag?: (event: SpatialDragEvent<T>) => void;
19
+ onSpatialDragEnd?: (event: SpatialDragEndEvent<T>) => void;
20
+ onSpatialRotateStart?: (event: SpatialRotateStartEvent<T>) => void;
21
+ onSpatialRotate?: (event: SpatialRotateEvent<T>) => void;
22
+ onSpatialRotateEnd?: (event: SpatialRotateEndEvent<T>) => void;
23
+ onSpatialMagnifyStart?: (event: SpatialMagnifyStartEvent<T>) => void;
24
+ onSpatialMagnify?: (event: SpatialMagnifyEvent<T>) => void;
25
+ onSpatialMagnifyEnd?: (event: SpatialMagnifyEndEvent<T>) => void;
26
+ };
27
+ interface StandardSpatializedContainerProps extends React__default.ComponentPropsWithoutRef<'div'> {
28
+ component: ElementType;
29
+ inStandardSpatializedContainer?: boolean;
30
+ [SpatialID]: string;
41
31
  }
42
- type SpatialReactComponentRef = ForwardedRef<HTMLDivElement>;
32
+ type RealityProps = SpatialEventProps<SpatializedElementRef> & React__default.ComponentPropsWithRef<'div'>;
33
+ type PortalSpatializedContainerProps<T extends SpatializedElementRef> = SpatialEventProps<T> & React__default.ComponentPropsWithoutRef<'div'> & {
34
+ component: ElementType;
35
+ spatializedContent: ElementType;
36
+ createSpatializedElement: () => Promise<SpatializedElement>;
37
+ getExtraSpatializedElementProperties?: (computedStyle: CSSStyleDeclaration) => Record<string, any>;
38
+ [SpatialID]: string;
39
+ };
40
+ type SpatializedContainerProps<T extends SpatializedElementRef> = Omit<StandardSpatializedContainerProps & PortalSpatializedContainerProps<T>, typeof SpatialID | 'onLoad' | 'onError'> & {
41
+ extraRefProps?: (domProxy: T) => Record<string, () => any>;
42
+ };
43
+ type Spatialized2DElementContainerProps<P extends ElementType> = SpatialEventProps<SpatializedElementRef> & React__default.ComponentPropsWithRef<'div'> & {
44
+ component: P;
45
+ };
46
+ type SpatializedStatic3DContainerProps = SpatialEventProps<SpatializedStatic3DElementRef> & Omit<React__default.ComponentPropsWithoutRef<'div'>, 'onLoad' | 'onError'> & {
47
+ src?: string;
48
+ onLoad?: (event: ModelLoadEvent) => void;
49
+ onError?: (event: ModelLoadEvent) => void;
50
+ };
51
+ type SpatializedElementRef<T extends HTMLElement = HTMLElement> = T;
52
+ type SpatializedDivElementRef = SpatializedElementRef<HTMLDivElement>;
53
+ type SpatializedStatic3DElementRef = SpatializedDivElementRef & {
54
+ currentSrc: string;
55
+ ready: Promise<ModelLoadEvent>;
56
+ entityTransform: DOMMatrix;
57
+ };
58
+ type CurrentTarget<T extends SpatializedElementRef> = {
59
+ currentTarget: T;
60
+ };
61
+ type SpatialTapEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialTapEvent$1 & CurrentTarget<T>;
62
+ type SpatialDragStartEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialDragEvent$1 & CurrentTarget<T>;
63
+ type SpatialDragEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialDragEvent$1 & CurrentTarget<T>;
64
+ type SpatialDragEndEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialDragEvent$1 & CurrentTarget<T>;
65
+ type SpatialRotateStartEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialRotateEvent$1 & CurrentTarget<T>;
66
+ type SpatialRotateEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialRotateEvent$1 & CurrentTarget<T>;
67
+ type SpatialRotateEndEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialRotateEvent$1 & CurrentTarget<T>;
68
+ type SpatialMagnifyStartEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialMagnifyEvent$1 & CurrentTarget<T>;
69
+ type SpatialMagnifyEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialMagnifyEvent$1 & CurrentTarget<T>;
70
+ type SpatialMagnifyEndEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialMagnifyEvent$1 & CurrentTarget<T>;
71
+ type ModelSpatialTapEvent = SpatialTapEvent<SpatializedStatic3DElementRef>;
72
+ type ModelSpatialDragStartEvent = SpatialDragStartEvent<SpatializedStatic3DElementRef>;
73
+ type ModelSpatialDragEvent = SpatialDragEvent<SpatializedStatic3DElementRef>;
74
+ type ModelSpatialDragEndEvent = SpatialDragEndEvent<SpatializedStatic3DElementRef>;
75
+ type ModelSpatialRotateStartEvent = SpatialRotateStartEvent<SpatializedStatic3DElementRef>;
76
+ type ModelSpatialRotateEvent = SpatialRotateEvent<SpatializedStatic3DElementRef>;
77
+ type ModelSpatialRotateEndEvent = SpatialRotateEndEvent<SpatializedStatic3DElementRef>;
78
+ type ModelSpatialMagnifyEvent = SpatialMagnifyEvent<SpatializedStatic3DElementRef>;
79
+ type ModelSpatialMagnifyEndEvent = SpatialMagnifyEndEvent<SpatializedStatic3DElementRef>;
80
+ type ModelLoadEvent = CustomEvent & {
81
+ target: SpatializedStatic3DElementRef;
82
+ };
83
+
84
+ declare const SpatializedContainer: <T extends SpatializedElementRef>(props: SpatializedContainerProps<T> & {
85
+ ref?: ForwardedRef<SpatializedElementRef<T>>;
86
+ }) => React.ReactElement | null;
87
+
88
+ declare const Spatialized2DElementContainer: <P extends ElementType>(props: Spatialized2DElementContainerProps<P> & {
89
+ ref: ForwardedRef<SpatializedElementRef>;
90
+ }) => React__default.ReactElement | null;
91
+
92
+ declare const SpatializedStatic3DElementContainer: React$1.ForwardRefExoticComponent<{
93
+ onSpatialTap?: ((event: SpatialTapEvent<SpatializedStatic3DElementRef>) => void) | undefined;
94
+ onSpatialDragStart?: ((event: SpatialDragStartEvent<SpatializedStatic3DElementRef>) => void) | undefined;
95
+ onSpatialDrag?: ((event: SpatialDragEvent<SpatializedStatic3DElementRef>) => void) | undefined;
96
+ onSpatialDragEnd?: ((event: SpatialDragEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
97
+ onSpatialRotateStart?: ((event: SpatialRotateStartEvent<SpatializedStatic3DElementRef>) => void) | undefined;
98
+ onSpatialRotate?: ((event: SpatialRotateEvent<SpatializedStatic3DElementRef>) => void) | undefined;
99
+ onSpatialRotateEnd?: ((event: SpatialRotateEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
100
+ onSpatialMagnifyStart?: ((event: SpatialMagnifyStartEvent<SpatializedStatic3DElementRef>) => void) | undefined;
101
+ onSpatialMagnify?: ((event: SpatialMagnifyEvent<SpatializedStatic3DElementRef>) => void) | undefined;
102
+ onSpatialMagnifyEnd?: ((event: SpatialMagnifyEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
103
+ } & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onLoad" | "onError"> & {
104
+ src?: string;
105
+ onLoad?: (event: ModelLoadEvent) => void;
106
+ onError?: (event: ModelLoadEvent) => void;
107
+ } & React$1.RefAttributes<SpatializedStatic3DElementRef>>;
108
+
109
+ declare function withSpatialized2DElementContainer<P extends ElementType>(Component: P): P | React$1.ForwardRefExoticComponent<Omit<Spatialized2DElementContainerProps<P>, "ref"> & React$1.RefAttributes<HTMLElement>>;
43
110
 
44
- declare const SpatialReactComponent: React$1.ForwardRefExoticComponent<SpatialReactComponentProps & React$1.RefAttributes<HTMLDivElement>>;
111
+ declare function toSceneSpatial(point: Point3D, spatializedElement: SpatializedElementRef): DOMPoint;
112
+ declare function toLocalSpace(point: Point3D, spatializedElement: SpatializedElementRef): DOMPoint;
45
113
 
46
- declare function withSpatial(Component: React__default.ElementType): any;
47
- declare const SpatialPrimitive: Record<string, typeof SpatialReactComponent>;
48
- declare const SpatialDiv: React__default.ForwardRefExoticComponent<SpatialReactComponentProps & React__default.RefAttributes<HTMLDivElement>>;
114
+ declare function initPolyfill(): void;
49
115
 
50
116
  declare function withSpatialMonitor(El: React__default.ElementType): any;
51
117
 
@@ -54,141 +120,171 @@ type SpatialMonitorProps = {
54
120
  };
55
121
  declare const SpatialMonitor: React$1.ForwardRefExoticComponent<SpatialMonitorProps & React$1.RefAttributes<HTMLElement>>;
56
122
 
57
- /**
58
- * External-developers can call this function to sync the standardInstance layout to PortalInstance.
59
- *
60
- * Currently: notifyUpdateStandInstanceLayout is called when the document head changed
61
- * or when the monitored div changed (in both cases spatialDiv's layout may be changed, so we need to update the layout)
62
- */
63
- declare function notifyUpdateStandInstanceLayout(): void;
123
+ declare class ResourceRegistry {
124
+ private resources;
125
+ add<T extends SpatialObject>(id: string, resource: Promise<T>): void;
126
+ remove(id: string): void;
127
+ removeAndDestroy(id: string): void;
128
+ get<T extends SpatialObject>(id: string): Promise<T>;
129
+ destroy(): void;
130
+ }
131
+
132
+ type RealityContextValue = {
133
+ session: SpatialSession;
134
+ reality: SpatializedDynamic3DElement;
135
+ resourceRegistry: ResourceRegistry;
136
+ } | null;
137
+
138
+ interface EntityRefShape {
139
+ convertFromEntityToEntity: (fromEntityId: string, toEntityId: string, position: Vec3) => Promise<Vec3>;
140
+ convertFromEntityToReality: (entityId: string, position: Vec3) => Promise<Vec3>;
141
+ convertFromRealityToEntity: (entityId: string, position: Vec3) => Promise<Vec3>;
142
+ id: string | undefined;
143
+ name: string | undefined;
144
+ entity: SpatialEntity | null;
145
+ }
146
+ declare class EntityRef implements EntityRefShape {
147
+ private _entity;
148
+ private _ctx;
149
+ constructor(entity?: SpatialEntity | null, ctx?: RealityContextValue | null);
150
+ updateEntity(entity?: SpatialEntity | null): void;
151
+ updateCtx(ctx?: RealityContextValue | null): void;
152
+ destroy(): void;
153
+ get entity(): SpatialEntity | null;
154
+ get id(): string | undefined;
155
+ get name(): string | undefined;
156
+ convertFromEntityToEntity(fromEntityId: string, toEntityId: string, position: Vec3): Promise<Vec3>;
157
+ convertFromEntityToReality(entityId: string, position: Vec3): Promise<Vec3>;
158
+ convertFromRealityToEntity(entityId: string, position: Vec3): Promise<Vec3>;
159
+ }
64
160
 
65
- declare function parseCornerRadius(computedStyle: CSSStyleDeclaration): {
66
- topLeading: number;
67
- bottomLeading: number;
68
- topTrailing: number;
69
- bottomTrailing: number;
161
+ type EntityProps = {
162
+ id?: string;
163
+ name?: string;
164
+ position?: Vec3;
165
+ rotation?: Vec3;
166
+ scale?: Vec3;
167
+ };
168
+ type allTarget<T extends EntityRefShape> = {
169
+ target: T;
170
+ currentTarget: T;
171
+ };
172
+ type SpatialTapEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialTapEvent$1 & allTarget<T>;
173
+ type SpatialDragEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialDragEvent$1 & allTarget<T>;
174
+ type SpatialRotateEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialRotateEvent$1 & allTarget<T>;
175
+ type SpatialRotateEndEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialRotateEndEvent$1 & allTarget<T>;
176
+ type SpatialMagnifyEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialMagnifyEvent$1 & allTarget<T>;
177
+ type SpatialMagnifyEndEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialMagnifyEndEvent$1 & allTarget<T>;
178
+ type EntityEventHandler = {
179
+ onSpatialTap?: (event: SpatialTapEntityEvent) => void;
180
+ onSpatialDragStart?: (event: SpatialDragEntityEvent) => void;
181
+ onSpatialDrag?: (event: SpatialDragEntityEvent) => void;
182
+ onSpatialDragEnd?: (event: SpatialDragEntityEvent) => void;
183
+ onSpatialRotateStart?: (event: SpatialRotateEntityEvent) => void;
184
+ onSpatialRotate?: (event: SpatialRotateEntityEvent) => void;
185
+ onSpatialRotateEnd?: (event: SpatialRotateEndEntityEvent) => void;
186
+ onSpatialMagnifyStart?: (event: SpatialMagnifyEntityEvent) => void;
187
+ onSpatialMagnify?: (event: SpatialMagnifyEntityEvent) => void;
188
+ onSpatialMagnifyEnd?: (event: SpatialMagnifyEndEntityEvent) => void;
189
+ };
190
+ declare const eventMap: {
191
+ readonly onSpatialTap: "spatialtap";
192
+ readonly onSpatialDragStart: "spatialdragstart";
193
+ readonly onSpatialDrag: "spatialdrag";
194
+ readonly onSpatialDragEnd: "spatialdragend";
195
+ readonly onSpatialRotateStart: "spatialrotatestart";
196
+ readonly onSpatialRotate: "spatialrotate";
197
+ readonly onSpatialRotateEnd: "spatialrotateend";
198
+ readonly onSpatialMagnifyStart: "spatialmagnifystart";
199
+ readonly onSpatialMagnify: "spatialmagnify";
200
+ readonly onSpatialMagnifyEnd: "spatialmagnifyend";
70
201
  };
71
202
 
72
- declare const CSSSpatialComponent: React$1.ForwardRefExoticComponent<SpatialReactComponentProps & React$1.RefAttributes<HTMLDivElement>>;
203
+ declare const Entity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
204
+ children?: React__default.ReactNode;
205
+ } & React__default.RefAttributes<EntityRefShape>>;
73
206
 
74
- declare function withCSSSpatial(Component: React__default.ElementType): any;
75
- declare const CSSSpatialPrimitive: Record<string, typeof CSSSpatialComponent>;
76
- declare const CSSSpatialDiv: React__default.ForwardRefExoticComponent<SpatialReactComponentProps & React__default.RefAttributes<HTMLDivElement>>;
207
+ declare const BoxEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
208
+ children?: React__default.ReactNode;
209
+ materials?: string[];
210
+ } & SpatialBoxGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
77
211
 
78
- interface SpatialViewProps extends React__default.HTMLAttributes<HTMLDivElement> {
79
- onViewLoad?: (viewEnt: SpatialEntity) => void;
80
- onViewUnload?: () => void;
81
- }
82
- interface SpatialViewRef extends HTMLDivElement {
83
- getViewEntity: () => Promise<SpatialEntity | null>;
84
- }
85
- /**
86
- * [Experimental] Allows embedding 3D dynamic content within the webpage
87
- */
88
- declare const SpatialView: React__default.ForwardRefExoticComponent<SpatialViewProps & React__default.RefAttributes<SpatialViewRef>>;
89
-
90
- type PartialSpatialTransformType = {
91
- position?: Partial<vecType>;
92
- rotation?: Partial<quatType>;
93
- scale?: Partial<vecType>;
94
- };
95
- interface ModelEvent {
96
- target: ModelElement;
97
- }
98
- interface ModelDragEvent extends ModelEvent {
99
- eventType: 'dragstart' | 'dragend' | 'drag';
100
- translation3D: Vec3;
101
- startLocation3D: Vec3;
102
- }
103
- interface Model3DProps {
104
- spatialTransform?: PartialSpatialTransformType;
105
- modelUrl: string;
106
- visible: boolean;
107
- contentMode?: 'fill' | 'fit';
108
- resizable?: boolean;
109
- aspectRatio?: number;
110
- className?: string;
111
- style?: CSSProperties | undefined;
112
- children?: React.ReactNode;
113
- onLoad?: (event: ModelEvent) => void;
114
- onDragStart?: (dragEvent: ModelDragEvent) => void;
115
- onDrag?: (dragEvent: ModelDragEvent) => void;
116
- onDragEnd?: (dragEvent: ModelDragEvent) => void;
117
- onTap?: (event: ModelEvent) => void;
118
- onDoubleTap?: (event: ModelEvent) => void;
119
- onLongPress?: (event: ModelEvent) => void;
120
- }
121
- interface ModelElement extends HTMLDivElement {
122
- ready: boolean;
123
- currentSrc: string;
124
- }
125
- type ModelElementRef = ForwardedRef<ModelElement>;
126
- type CSSModel3DProps = Omit<Model3DProps, 'spatialTransform' | 'visible'>;
212
+ type Props$2 = {
213
+ children?: React__default.ReactNode;
214
+ id: string;
215
+ } & SpatialUnlitMaterialOptions;
216
+ declare const UnlitMaterial: React__default.FC<Props$2>;
127
217
 
128
- declare const Model3D: React$1.ForwardRefExoticComponent<Model3DProps & React$1.RefAttributes<ModelElement>>;
218
+ declare const SphereEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
219
+ children?: React__default.ReactNode;
220
+ materials?: string[];
221
+ } & SpatialSphereGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
129
222
 
130
- declare const CSSModel3D: React$1.ForwardRefExoticComponent<CSSModel3DProps & React$1.RefAttributes<ModelElement>>;
223
+ declare const ConeEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
224
+ children?: React__default.ReactNode;
225
+ materials?: string[];
226
+ } & SpatialConeGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
131
227
 
132
- declare global {
133
- namespace JSX {
134
- interface IntrinsicElements {
135
- 'model-viewer': ModelViewerElement | {
136
- ref: any;
137
- };
138
- }
139
- }
140
- }
141
- type ModelChildren = React__default.ReactElement<{
142
- type: string;
143
- src: string;
144
- }> | [React__default.ReactElement<{
145
- type: string;
146
- src: string;
147
- }>, React__default.ReactElement] | React__default.ReactElement<{
148
- type: string;
149
- src: string;
150
- }>[];
151
- interface ModelProps {
152
- className?: string;
153
- style?: CSSProperties | undefined;
154
- children: ModelChildren;
155
- onLoad?: (event: ModelEvent) => void;
156
- contentMode?: 'fill' | 'fit';
157
- resizable?: boolean;
158
- aspectRatio?: number;
159
- onDragStart?: (dragEvent: ModelDragEvent) => void;
160
- onDrag?: (dragEvent: ModelDragEvent) => void;
161
- onDragEnd?: (dragEvent: ModelDragEvent) => void;
162
- onTap?: (event: ModelEvent) => void;
163
- onDoubleTap?: (event: ModelEvent) => void;
164
- onLongPress?: (event: ModelEvent) => void;
165
- poster?: string;
166
- }
167
- declare const Model: React__default.ForwardRefExoticComponent<ModelProps & React__default.RefAttributes<ModelElement>>;
228
+ declare const CylinderEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
229
+ children?: React__default.ReactNode;
230
+ materials?: string[];
231
+ } & SpatialCylinderGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
168
232
 
169
- /** @hidden */
170
- declare function getSession(): SpatialSession | null;
233
+ declare const PlaneEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
234
+ children?: React__default.ReactNode;
235
+ materials?: string[];
236
+ } & SpatialPlaneGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
171
237
 
172
- declare function enableDebugTool(): void;
238
+ type Props$1 = {
239
+ children?: React__default.ReactNode;
240
+ };
241
+ declare const SceneGraph: React__default.FC<Props$1>;
173
242
 
174
- declare const defaultSceneConfig: WindowContainerOptions;
175
- declare class XRApp {
176
- private static instance;
177
- static getInstance(): XRApp;
178
- handleATag(event: MouseEvent): true | undefined;
179
- init(): void;
180
- deinit(): void;
181
- private configMap;
182
- private getConfig;
183
- show(window: Window, cfg: WindowContainerOptions): Promise<void>;
184
- open: (url?: string, target?: string, features?: string) => Window | null;
185
- initScene(name: string, callback: (pre: WindowContainerOptions) => WindowContainerOptions): void;
186
- }
243
+ type Props = {
244
+ children?: React__default.ReactNode;
245
+ id: string;
246
+ src: string;
247
+ onLoad?: () => void;
248
+ onError?: (error: any) => void;
249
+ };
250
+ declare const ModelAsset: React__default.FC<Props>;
251
+
252
+ declare const ModelEntity: React__default.ForwardRefExoticComponent<EntityProps & {
253
+ model: string;
254
+ } & EntityEventHandler & {
255
+ children?: React__default.ReactNode;
256
+ } & React__default.RefAttributes<EntityRefShape>>;
187
257
 
188
- declare function initScene(name: string, callback: (pre: WindowContainerOptions$1) => WindowContainerOptions$1): void;
258
+ declare const Reality: React__default.ForwardRefExoticComponent<Omit<RealityProps, "ref"> & React__default.RefAttributes<HTMLElement>>;
259
+
260
+ type ModelProps = SpatializedStatic3DContainerProps & {
261
+ 'enable-xr'?: boolean;
262
+ };
263
+ type ModelRef = SpatializedStatic3DElementRef;
264
+ declare const Model: React$1.ForwardRefExoticComponent<Omit<{
265
+ onSpatialTap?: ((event: SpatialTapEvent<SpatializedStatic3DElementRef>) => void) | undefined;
266
+ onSpatialDragStart?: ((event: SpatialDragStartEvent<SpatializedStatic3DElementRef>) => void) | undefined;
267
+ onSpatialDrag?: ((event: SpatialDragEvent<SpatializedStatic3DElementRef>) => void) | undefined;
268
+ onSpatialDragEnd?: ((event: SpatialDragEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
269
+ onSpatialRotateStart?: ((event: SpatialRotateStartEvent<SpatializedStatic3DElementRef>) => void) | undefined;
270
+ onSpatialRotate?: ((event: SpatialRotateEvent<SpatializedStatic3DElementRef>) => void) | undefined;
271
+ onSpatialRotateEnd?: ((event: SpatialRotateEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
272
+ onSpatialMagnifyStart?: ((event: SpatialMagnifyStartEvent<SpatializedStatic3DElementRef>) => void) | undefined;
273
+ onSpatialMagnify?: ((event: SpatialMagnifyEvent<SpatializedStatic3DElementRef>) => void) | undefined;
274
+ onSpatialMagnifyEnd?: ((event: SpatialMagnifyEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
275
+ } & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onLoad" | "onError"> & {
276
+ src?: string;
277
+ onLoad?: (event: ModelLoadEvent) => void;
278
+ onError?: (event: ModelLoadEvent) => void;
279
+ } & {
280
+ 'enable-xr'?: boolean;
281
+ } & React$1.RefAttributes<SpatializedStatic3DElementRef>, "ref"> & React$1.RefAttributes<any>>;
189
282
 
190
- declare function spatialPolyfill(): void;
283
+ declare const SSRProvider: ({ isSSR: initialIsSSR, children, }: {
284
+ isSSR?: boolean;
285
+ children: React__default.ReactNode;
286
+ }) => react_jsx_runtime.JSX.Element;
191
287
 
192
288
  declare const version: string;
193
289
 
194
- export { CSSModel3D, CSSSpatialDiv, CSSSpatialPrimitive, Model, Model3D, type Model3DProps, type ModelDragEvent, type ModelElement, type ModelElementRef, type ModelEvent, 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, spatialPolyfill, version, withCSSSpatial, withSpatial, withSpatialMonitor };
290
+ export { BoxEntity, ConeEntity, CylinderEntity, Entity, type EntityEventHandler, type EntityProps, EntityRef, Model, ModelAsset, ModelEntity, type ModelLoadEvent, type ModelProps, type ModelRef, type ModelSpatialDragEndEvent, type ModelSpatialDragEvent, type ModelSpatialDragStartEvent, type ModelSpatialMagnifyEndEvent, type ModelSpatialMagnifyEvent, type ModelSpatialRotateEndEvent, type ModelSpatialRotateEvent, type ModelSpatialRotateStartEvent, type ModelSpatialTapEvent, PlaneEntity, Reality, SSRProvider, SceneGraph, type SpatialDragEndEvent, type SpatialDragEntityEvent, type SpatialDragEvent, type SpatialDragStartEvent, type SpatialMagnifyEndEntityEvent, type SpatialMagnifyEndEvent, type SpatialMagnifyEntityEvent, type SpatialMagnifyEvent, type SpatialMagnifyStartEvent, SpatialMonitor, type SpatialRotateEndEntityEvent, type SpatialRotateEndEvent, type SpatialRotateEntityEvent, type SpatialRotateEvent, type SpatialRotateStartEvent, type SpatialTapEntityEvent, type SpatialTapEvent, Spatialized2DElementContainer, type Spatialized2DElementContainerProps, SpatializedContainer, type SpatializedElementRef, type SpatializedStatic3DContainerProps, SpatializedStatic3DElementContainer, type SpatializedStatic3DElementRef, SphereEntity, UnlitMaterial, enableDebugTool, eventMap, initPolyfill, initScene, toLocalSpace, toSceneSpatial, version, withSpatialMonitor, withSpatialized2DElementContainer };