@smplrspace/smplr-loader 2.62.1-beta.0 → 2.62.1-beta.10

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.
@@ -522,7 +522,6 @@ declare interface Filter {
522
522
  shellMaterial: Material;
523
523
  shellGroundMaterial: Material;
524
524
  metalMaterial: Material;
525
- compassMaterial: Material;
526
525
  placeholderMaterial: Material;
527
526
  hoveredMaterial: Material;
528
527
  selectedMaterial: Material;
@@ -533,6 +532,7 @@ declare interface Filter {
533
532
 
534
533
  declare const Floorplan: IModelType< {
535
534
  url: IMaybe<ISimpleType<string>>;
535
+ r2Key: IMaybe<ISimpleType<string>>;
536
536
  data: IMaybe<ISimpleType<string>>;
537
537
  r: IOptionalIType<ISimpleType<number>, [undefined]>;
538
538
  t: IOptionalIType<ISimpleType<number>, [undefined]>;
@@ -542,6 +542,7 @@ flipped: IOptionalIType<ISimpleType<boolean>, [undefined]>;
542
542
  isNil(): boolean;
543
543
  } & {
544
544
  setUrl(url: string): void;
545
+ setR2Key(r2Key: string | undefined): void;
545
546
  setData(data: string | undefined): void;
546
547
  moveTo({ r, t }: CanvasCoord): void;
547
548
  setScale(scale: number): void;
@@ -1085,7 +1086,6 @@ declare interface Instance_2 extends SOObject {
1085
1086
  }
1086
1087
 
1087
1088
  declare interface InternalSpaceRenderOptions {
1088
- compass?: boolean;
1089
1089
  backgroundColor?: string;
1090
1090
  filter: DeepPartial<Filter>;
1091
1091
  walls: WallsRenderState;
@@ -1202,7 +1202,6 @@ declare interface JsonRoof {
1202
1202
 
1203
1203
  declare interface JsonSpace {
1204
1204
  levels: JsonLevel[];
1205
- compassDirection?: number;
1206
1205
  facade?: SOFacade;
1207
1206
  defaults: SOSpaceDefaults;
1208
1207
  }
@@ -1879,6 +1878,7 @@ renameExtrasKey(oldKey: string, newKey: string): void;
1879
1878
  }, _NotCustomized, _NotCustomized>>;
1880
1879
  floorplan: IOptionalIType<IModelType< {
1881
1880
  url: IMaybe<ISimpleType<string>>;
1881
+ r2Key: IMaybe<ISimpleType<string>>;
1882
1882
  data: IMaybe<ISimpleType<string>>;
1883
1883
  r: IOptionalIType<ISimpleType<number>, [undefined]>;
1884
1884
  t: IOptionalIType<ISimpleType<number>, [undefined]>;
@@ -1888,6 +1888,7 @@ flipped: IOptionalIType<ISimpleType<boolean>, [undefined]>;
1888
1888
  isNil(): boolean;
1889
1889
  } & {
1890
1890
  setUrl(url: string): void;
1891
+ setR2Key(r2Key: string | undefined): void;
1891
1892
  setData(data: string | undefined): void;
1892
1893
  moveTo({ r, t }: CanvasCoord): void;
1893
1894
  setScale(scale: number): void;
@@ -2178,7 +2179,6 @@ declare enum MeshType {
2178
2179
  Roof = "roof",
2179
2180
  Stairs = "stairs",
2180
2181
  Annotation = "annotation",
2181
- Compass = "compass",
2182
2182
  Facade = "facade",
2183
2183
  Floorplan = "floorplan",
2184
2184
  Object = "object",
@@ -2770,6 +2770,27 @@ export declare class QueryClient {
2770
2770
  }): Promise<{
2771
2771
  status: string;
2772
2772
  }>;
2773
+ /**
2774
+ * Sets the definition of a space, and optionally publishes it.
2775
+ *
2776
+ * @beta The definition is not validated against a schema yet, only its floor area is checked. The
2777
+ * definition format may change before this method is considered stable.
2778
+ */
2779
+ setSpaceDefinition({ spaceId, definition, publish, user, }: {
2780
+ spaceId: string;
2781
+ definition: Record<string, unknown>;
2782
+ publish?: boolean;
2783
+ user: EmbeddedEditorUser;
2784
+ }): Promise<{
2785
+ sid: string;
2786
+ published: boolean;
2787
+ }>;
2788
+ publishSpace({ spaceId, user }: {
2789
+ spaceId: string;
2790
+ user: EmbeddedEditorUser;
2791
+ }): Promise<{
2792
+ sid: string;
2793
+ }>;
2773
2794
  deleteSpace(spaceId: string): Promise<void>;
2774
2795
  listSpaces(options?: {
2775
2796
  organizationId?: string;
@@ -2802,6 +2823,7 @@ export declare class QueryClient {
2802
2823
  project_sid: string;
2803
2824
  }[];
2804
2825
  name: string;
2826
+ thumbhash?: string | null | undefined;
2805
2827
  georeference?: {} | null | undefined;
2806
2828
  definition?: {} | null | undefined;
2807
2829
  assetmap?: {} | null | undefined;
@@ -2809,7 +2831,6 @@ export declare class QueryClient {
2809
2831
  created_at: string;
2810
2832
  modified_at: string;
2811
2833
  embed_image_id?: string | null | undefined;
2812
- thumbhash?: string | null | undefined;
2813
2834
  }>;
2814
2835
  getSpaceFromCache(spaceId: string): {
2815
2836
  sid: string;
@@ -2818,6 +2839,7 @@ export declare class QueryClient {
2818
2839
  project_sid: string;
2819
2840
  }[];
2820
2841
  name: string;
2842
+ thumbhash?: string | null | undefined;
2821
2843
  georeference?: {} | null | undefined;
2822
2844
  definition?: {} | null | undefined;
2823
2845
  assetmap?: {} | null | undefined;
@@ -2825,7 +2847,6 @@ export declare class QueryClient {
2825
2847
  created_at: string;
2826
2848
  modified_at: string;
2827
2849
  embed_image_id?: string | null | undefined;
2828
- thumbhash?: string | null | undefined;
2829
2850
  };
2830
2851
  getAllFurnitureInSpace(spaceId: string): Promise<Furniture[]>;
2831
2852
  getAllFurnitureInSpaceFromCache(spaceId: string): Furniture[];
@@ -4101,6 +4122,7 @@ renameExtrasKey(oldKey: string, newKey: string): void;
4101
4122
  }, _NotCustomized, _NotCustomized>>;
4102
4123
  floorplan: IOptionalIType<IModelType< {
4103
4124
  url: IMaybe<ISimpleType<string>>;
4125
+ r2Key: IMaybe<ISimpleType<string>>;
4104
4126
  data: IMaybe<ISimpleType<string>>;
4105
4127
  r: IOptionalIType<ISimpleType<number>, [undefined]>;
4106
4128
  t: IOptionalIType<ISimpleType<number>, [undefined]>;
@@ -4110,6 +4132,7 @@ flipped: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4110
4132
  isNil(): boolean;
4111
4133
  } & {
4112
4134
  setUrl(url: string): void;
4135
+ setR2Key(r2Key: string | undefined): void;
4113
4136
  setData(data: string | undefined): void;
4114
4137
  moveTo({ r, t }: CanvasCoord): void;
4115
4138
  setScale(scale: number): void;
@@ -4183,7 +4206,6 @@ removeDeskCluster(clusterId: string): void;
4183
4206
  removeSeminarSeatingCluster(clusterId: string): void;
4184
4207
  removeParkingCluster(clusterId: string): void;
4185
4208
  }, _NotCustomized, _NotCustomized>>, [undefined]>;
4186
- compassDirection: IMaybe<ISimpleType<number>>;
4187
4209
  facade: IMaybe<IModelType< {
4188
4210
  url: ISimpleType<string>;
4189
4211
  levelIndex: IOptionalIType<ISimpleType<number>, [undefined]>;
@@ -4291,7 +4313,6 @@ addLevel(): void;
4291
4313
  clearLevel(levelIndex: number): void;
4292
4314
  removeLevel(levelIndex: number): void;
4293
4315
  setLevels(levels: SILevel[]): void;
4294
- setCompassDirection(direction: number): void;
4295
4316
  regenerateIdsForLevel(levelIndex: number): void;
4296
4317
  } & {
4297
4318
  flip(): void;
@@ -4386,7 +4407,6 @@ declare type SpacePrefix = typeof spacePrefix;
4386
4407
  declare const spacePrefix: "spc_";
4387
4408
 
4388
4409
  export declare interface SpaceRenderOptions {
4389
- compass?: boolean
4390
4410
  backgroundColor?: string
4391
4411
  filter?: DeepPartial<Filter>
4392
4412
  walls?: {
@@ -4469,7 +4489,6 @@ export declare interface SpaceViewerOptions {
4469
4489
  hideNavigationButtons?: boolean;
4470
4490
  hideLevelPicker?: boolean;
4471
4491
  legendPosition?: LegendPosition;
4472
- compass?: boolean;
4473
4492
  annotations?: boolean;
4474
4493
  renderOptions?: SpaceRenderOptions;
4475
4494
  includeLevels?: number[];
@@ -4679,7 +4698,7 @@ declare interface Vector3Coord extends Vector2Coord {
4679
4698
  z: number;
4680
4699
  }
4681
4700
 
4682
- export declare const version = "2.62.1-beta.0";
4701
+ export declare const version = "2.62.1-beta.10";
4683
4702
 
4684
4703
  declare interface ViewerDataLayerRenderState<Definition = DataLayer<UnknownData>> {
4685
4704
  definition: Definition;
@@ -4739,7 +4758,6 @@ hideLevelPicker: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4739
4758
  hideNavigationButtons: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4740
4759
  showStructuralWalls: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4741
4760
  showAnnotations: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4742
- showCompass: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4743
4761
  showFacade: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4744
4762
  persistentTooltipsVisible: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4745
4763
  dataLayers: IMapType<ITypeUnion<ModelCreationType<ExtractCFromProps< {
@@ -5118,7 +5136,6 @@ shellGroundMaterial: PBRMetallicRoughnessMaterial | null;
5118
5136
  metalMaterial: PBRMetallicRoughnessMaterial | null;
5119
5137
  groundMaterials: GroundMaterials | null;
5120
5138
  meshes: SmplrMesh[];
5121
- compassMeshes: SmplrMesh[];
5122
5139
  assetsManager: AssetsManager | null;
5123
5140
  facadeAssetsManager: AssetsManager | null;
5124
5141
  actionManager: ActionManager | null;
@@ -5197,7 +5214,6 @@ setHideLevelPicker(hide: boolean): void;
5197
5214
  setHideNavigationButtons(hide: boolean): void;
5198
5215
  toggleShowStructuralWalls(): void;
5199
5216
  toggleShowAnnotations(): void;
5200
- toggleShowCompass(): void;
5201
5217
  toggleShowFacade(): void;
5202
5218
  } & {
5203
5219
  addDataLayer(layer: SIViewerDataLayer): void;
@@ -5225,7 +5241,6 @@ groundMaterials: GroundMaterials;
5225
5241
  }): void;
5226
5242
  enableCascadedShadowMapFallback(): void;
5227
5243
  setMeshes(meshes: SmplrMesh[]): void;
5228
- setCompassMeshes(compassMeshes: SmplrMesh[]): void;
5229
5244
  bumpObjectMeshesTick(): void;
5230
5245
  bumpFacadeTick(): void;
5231
5246
  setAssetsManager(assetsManager: AssetsManager | null): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smplrspace/smplr-loader",
3
- "version": "2.62.1-beta.0",
3
+ "version": "2.62.1-beta.10",
4
4
  "description": "NPM package to load a typed Smplr.js from CDN easily",
5
5
  "type": "module",
6
6
  "files": [