@smplrspace/smplr-loader 2.56.1-beta.8 → 2.57.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.
@@ -736,6 +736,7 @@ clearInEditor(id: string): void;
736
736
  regenerateIds(randomizer: string): void;
737
737
  } & {
738
738
  rename(name: string): void;
739
+ ensureName(): void;
739
740
  addHole(hole?: Omit<SIHole, 'segments'> & {
740
741
  segments: SOGroundSegment[];
741
742
  }): void;
@@ -1266,6 +1267,7 @@ clearInEditor(id: string): void;
1266
1267
  regenerateIds(randomizer: string): void;
1267
1268
  } & {
1268
1269
  rename(name: string): void;
1270
+ ensureName(): void;
1269
1271
  addHole(hole?: (Omit<SIHole, "segments"> & {
1270
1272
  segments: SOGroundSegment[];
1271
1273
  }) | undefined): void;
@@ -1350,6 +1352,7 @@ options: IOptionalIType<IModelType< {
1350
1352
  style: IOptionalIType<ISimpleType<string>, [undefined]>;
1351
1353
  nbOfPanels: IOptionalIType<ISimpleType<number>, [undefined]>;
1352
1354
  nbOfPanelsVertically: IOptionalIType<ISimpleType<number>, [undefined]>;
1355
+ targetPanelWidth: IMaybe<ISimpleType<number>>;
1353
1356
  twoPanels: IOptionalIType<ISimpleType<boolean>, [undefined]>;
1354
1357
  centerSplit: IOptionalIType<ISimpleType<boolean>, [undefined]>;
1355
1358
  swapKnob: IOptionalIType<ISimpleType<boolean>, [undefined]>;
@@ -1367,6 +1370,7 @@ readonly maxPanelsOpened: number;
1367
1370
  setStyle(style: string): void;
1368
1371
  setNbOfPanels(nbOfPanels: number): void;
1369
1372
  setNbOfPanelsVertically(nbOfPanelsVertically: number): void;
1373
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
1370
1374
  setCenterSplit(centerSplit: boolean): void;
1371
1375
  setSwapKnob(swapKnob: boolean): void;
1372
1376
  setSwapInOut(swapInOut: boolean): void;
@@ -1392,13 +1396,19 @@ readonly orientation: "horizontal" | "vertical";
1392
1396
  } & {
1393
1397
  verifyOpeningPosition(): void;
1394
1398
  regenerateId(randomizer: string): void;
1399
+ applyTargetPanelWidth(): void;
1395
1400
  } & {
1396
1401
  rename(name: string): void;
1402
+ ensureName(): void;
1397
1403
  resize(dimensions: Partial<SIWallOpeningDimensions>): void;
1404
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
1398
1405
  moveTo(position: SIWallOpeningPosition): void;
1399
1406
  moveInDirection(direction: URDL, distance?: number): void;
1400
1407
  remove(): void;
1401
1408
  setLayers(layers: string[]): void;
1409
+ } & {
1410
+ expandToFullSegment(): void;
1411
+ addToAllSegmentsInWall(): void;
1402
1412
  }, _NotCustomized, _NotCustomized>>;
1403
1413
  }, {
1404
1414
  readonly superJson: JsonAbstractSegment;
@@ -1423,6 +1433,7 @@ clearInEditor(id: string): void;
1423
1433
  regenerateIds(randomizer: string): void;
1424
1434
  } & {
1425
1435
  rename(name: string): void;
1436
+ ensureName(): void;
1426
1437
  setLayers(layers: string[]): void;
1427
1438
  splitWallAtPoint({ pointId }: {
1428
1439
  pointId: string;
@@ -1493,6 +1504,7 @@ clearInEditor(id: string): void;
1493
1504
  regenerateIds(randomizer: string): void;
1494
1505
  } & {
1495
1506
  rename(name: string): void;
1507
+ ensureName(): void;
1496
1508
  setBaseSegmentById(id: string): void;
1497
1509
  } & {
1498
1510
  readonly points: SOCanvasPoint[];
@@ -1539,6 +1551,7 @@ layers: IArrayType<ISimpleType<string>>;
1539
1551
  readonly json: JsonStair;
1540
1552
  } & {
1541
1553
  rename(name: string): void;
1554
+ ensureName(): void;
1542
1555
  setBaseHeight(baseHeight: number | undefined): void;
1543
1556
  setHeight(height: number | undefined): void;
1544
1557
  setStyle(style: "slope" | "thin" | "thick" | "block"): void;
@@ -1663,6 +1676,11 @@ readonly openings: IWallOpening[];
1663
1676
  } & {
1664
1677
  readonly doors: IWallOpening[];
1665
1678
  readonly windows: IWallOpening[];
1679
+ nextGroundName(excludeId?: string): string;
1680
+ nextWallName(excludeId?: string): string;
1681
+ nextRoofName(excludeId?: string): string;
1682
+ nextStairsName(excludeId?: string): string;
1683
+ nextOpeningName(type: string, excludeId?: string): string;
1666
1684
  readonly initialsFromName: string;
1667
1685
  } & {
1668
1686
  rename(name: string): void;
@@ -2455,6 +2473,44 @@ export declare class QueryClient {
2455
2473
  levelIndex: number;
2456
2474
  padding?: number;
2457
2475
  }): SmplrCoord2d[] | null;
2476
+ convertSmplrToGPSCoordinates(args: {
2477
+ spaceId: string;
2478
+ point: SmplrCoord2d;
2479
+ }): Promise<GeoPoint>;
2480
+ convertSmplrToGPSCoordinates(args: {
2481
+ spaceId: string;
2482
+ points: SmplrCoord2d[];
2483
+ }): Promise<GeoPoint[]>;
2484
+ convertSmplrToGPSCoordinatesFromCache(args: {
2485
+ spaceId: string;
2486
+ point: SmplrCoord2d;
2487
+ }): GeoPoint;
2488
+ convertSmplrToGPSCoordinatesFromCache(args: {
2489
+ spaceId: string;
2490
+ points: SmplrCoord2d[];
2491
+ }): GeoPoint[];
2492
+ convertGPSToSmplrCoordinates(args: {
2493
+ spaceId: string;
2494
+ levelIndex: number;
2495
+ point: GeoPoint;
2496
+ }): Promise<SmplrCoord2d>;
2497
+ convertGPSToSmplrCoordinates(args: {
2498
+ spaceId: string;
2499
+ levelIndex: number;
2500
+ points: GeoPoint[];
2501
+ }): Promise<SmplrCoord2d[]>;
2502
+ convertGPSToSmplrCoordinatesFromCache(args: {
2503
+ spaceId: string;
2504
+ levelIndex: number;
2505
+ point: GeoPoint;
2506
+ }): SmplrCoord2d;
2507
+ convertGPSToSmplrCoordinatesFromCache(args: {
2508
+ spaceId: string;
2509
+ levelIndex: number;
2510
+ points: GeoPoint[];
2511
+ }): SmplrCoord2d[];
2512
+ private smplrToGPS;
2513
+ private gpsToSmplr;
2458
2514
  isPointInPolygon({ point, polygon }: {
2459
2515
  point: SmplrCoord2d;
2460
2516
  polygon: SmplrCoord2d[] | SmplrCoord2d[][];
@@ -2656,6 +2712,7 @@ clearInEditor(id: string): void;
2656
2712
  regenerateIds(randomizer: string): void;
2657
2713
  } & {
2658
2714
  rename(name: string): void;
2715
+ ensureName(): void;
2659
2716
  setBaseSegmentById(id: string): void;
2660
2717
  } & {
2661
2718
  readonly points: SOCanvasPoint[];
@@ -3107,6 +3164,7 @@ clearInEditor(id: string): void;
3107
3164
  regenerateIds(randomizer: string): void;
3108
3165
  } & {
3109
3166
  rename(name: string): void;
3167
+ ensureName(): void;
3110
3168
  addHole(hole?: (Omit<SIHole, "segments"> & {
3111
3169
  segments: SOGroundSegment[];
3112
3170
  }) | undefined): void;
@@ -3191,6 +3249,7 @@ options: IOptionalIType<IModelType< {
3191
3249
  style: IOptionalIType<ISimpleType<string>, [undefined]>;
3192
3250
  nbOfPanels: IOptionalIType<ISimpleType<number>, [undefined]>;
3193
3251
  nbOfPanelsVertically: IOptionalIType<ISimpleType<number>, [undefined]>;
3252
+ targetPanelWidth: IMaybe<ISimpleType<number>>;
3194
3253
  twoPanels: IOptionalIType<ISimpleType<boolean>, [undefined]>;
3195
3254
  centerSplit: IOptionalIType<ISimpleType<boolean>, [undefined]>;
3196
3255
  swapKnob: IOptionalIType<ISimpleType<boolean>, [undefined]>;
@@ -3208,6 +3267,7 @@ readonly maxPanelsOpened: number;
3208
3267
  setStyle(style: string): void;
3209
3268
  setNbOfPanels(nbOfPanels: number): void;
3210
3269
  setNbOfPanelsVertically(nbOfPanelsVertically: number): void;
3270
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
3211
3271
  setCenterSplit(centerSplit: boolean): void;
3212
3272
  setSwapKnob(swapKnob: boolean): void;
3213
3273
  setSwapInOut(swapInOut: boolean): void;
@@ -3233,13 +3293,19 @@ readonly orientation: "horizontal" | "vertical";
3233
3293
  } & {
3234
3294
  verifyOpeningPosition(): void;
3235
3295
  regenerateId(randomizer: string): void;
3296
+ applyTargetPanelWidth(): void;
3236
3297
  } & {
3237
3298
  rename(name: string): void;
3299
+ ensureName(): void;
3238
3300
  resize(dimensions: Partial<SIWallOpeningDimensions>): void;
3301
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
3239
3302
  moveTo(position: SIWallOpeningPosition): void;
3240
3303
  moveInDirection(direction: URDL, distance?: number): void;
3241
3304
  remove(): void;
3242
3305
  setLayers(layers: string[]): void;
3306
+ } & {
3307
+ expandToFullSegment(): void;
3308
+ addToAllSegmentsInWall(): void;
3243
3309
  }, _NotCustomized, _NotCustomized>>;
3244
3310
  }, {
3245
3311
  readonly superJson: JsonAbstractSegment;
@@ -3264,6 +3330,7 @@ clearInEditor(id: string): void;
3264
3330
  regenerateIds(randomizer: string): void;
3265
3331
  } & {
3266
3332
  rename(name: string): void;
3333
+ ensureName(): void;
3267
3334
  setLayers(layers: string[]): void;
3268
3335
  splitWallAtPoint({ pointId }: {
3269
3336
  pointId: string;
@@ -3334,6 +3401,7 @@ clearInEditor(id: string): void;
3334
3401
  regenerateIds(randomizer: string): void;
3335
3402
  } & {
3336
3403
  rename(name: string): void;
3404
+ ensureName(): void;
3337
3405
  setBaseSegmentById(id: string): void;
3338
3406
  } & {
3339
3407
  readonly points: SOCanvasPoint[];
@@ -3380,6 +3448,7 @@ layers: IArrayType<ISimpleType<string>>;
3380
3448
  readonly json: JsonStair;
3381
3449
  } & {
3382
3450
  rename(name: string): void;
3451
+ ensureName(): void;
3383
3452
  setBaseHeight(baseHeight: number | undefined): void;
3384
3453
  setHeight(height: number | undefined): void;
3385
3454
  setStyle(style: "slope" | "thin" | "thick" | "block"): void;
@@ -3504,6 +3573,11 @@ readonly openings: IWallOpening[];
3504
3573
  } & {
3505
3574
  readonly doors: IWallOpening[];
3506
3575
  readonly windows: IWallOpening[];
3576
+ nextGroundName(excludeId?: string | undefined): string;
3577
+ nextWallName(excludeId?: string | undefined): string;
3578
+ nextRoofName(excludeId?: string | undefined): string;
3579
+ nextStairsName(excludeId?: string | undefined): string;
3580
+ nextOpeningName(type: string, excludeId?: string | undefined): string;
3507
3581
  readonly initialsFromName: string;
3508
3582
  } & {
3509
3583
  rename(name: string): void;
@@ -3891,6 +3965,7 @@ layers: IArrayType<ISimpleType<string>>;
3891
3965
  readonly json: JsonStair;
3892
3966
  } & {
3893
3967
  rename(name: string): void;
3968
+ ensureName(): void;
3894
3969
  setBaseHeight(baseHeight: number | undefined): void;
3895
3970
  setHeight(height: number | undefined): void;
3896
3971
  setStyle(style: Style): void;
@@ -4021,7 +4096,7 @@ declare interface Vector3Coord extends Vector2Coord {
4021
4096
  z: number;
4022
4097
  }
4023
4098
 
4024
- export declare const version = "2.56.1-beta.8";
4099
+ export declare const version = "2.57.0";
4025
4100
 
4026
4101
  declare interface ViewerRendererHandle {
4027
4102
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -4120,6 +4195,7 @@ options: IOptionalIType<IModelType< {
4120
4195
  style: IOptionalIType<ISimpleType<string>, [undefined]>;
4121
4196
  nbOfPanels: IOptionalIType<ISimpleType<number>, [undefined]>;
4122
4197
  nbOfPanelsVertically: IOptionalIType<ISimpleType<number>, [undefined]>;
4198
+ targetPanelWidth: IMaybe<ISimpleType<number>>;
4123
4199
  twoPanels: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4124
4200
  centerSplit: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4125
4201
  swapKnob: IOptionalIType<ISimpleType<boolean>, [undefined]>;
@@ -4137,6 +4213,7 @@ readonly maxPanelsOpened: number;
4137
4213
  setStyle(style: string): void;
4138
4214
  setNbOfPanels(nbOfPanels: number): void;
4139
4215
  setNbOfPanelsVertically(nbOfPanelsVertically: number): void;
4216
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
4140
4217
  setCenterSplit(centerSplit: boolean): void;
4141
4218
  setSwapKnob(swapKnob: boolean): void;
4142
4219
  setSwapInOut(swapInOut: boolean): void;
@@ -4162,13 +4239,19 @@ readonly orientation: "horizontal" | "vertical";
4162
4239
  } & {
4163
4240
  verifyOpeningPosition(): void;
4164
4241
  regenerateId(randomizer: string): void;
4242
+ applyTargetPanelWidth(): void;
4165
4243
  } & {
4166
4244
  rename(name: string): void;
4245
+ ensureName(): void;
4167
4246
  resize(dimensions: Partial<SIWallOpeningDimensions>): void;
4247
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
4168
4248
  moveTo(position: SIWallOpeningPosition): void;
4169
4249
  moveInDirection(direction: URDL, distance?: number): void;
4170
4250
  remove(): void;
4171
4251
  setLayers(layers: string[]): void;
4252
+ } & {
4253
+ expandToFullSegment(): void;
4254
+ addToAllSegmentsInWall(): void;
4172
4255
  }, _NotCustomized, _NotCustomized>>;
4173
4256
  }, {
4174
4257
  readonly superJson: JsonAbstractSegment;
@@ -4193,6 +4276,7 @@ clearInEditor(id: string): void;
4193
4276
  regenerateIds(randomizer: string): void;
4194
4277
  } & {
4195
4278
  rename(name: string): void;
4279
+ ensureName(): void;
4196
4280
  setLayers(layers: string[]): void;
4197
4281
  splitWallAtPoint({ pointId }: {
4198
4282
  pointId: string;
@@ -4232,6 +4316,7 @@ options: IOptionalIType<IModelType< {
4232
4316
  style: IOptionalIType<ISimpleType<string>, [undefined]>;
4233
4317
  nbOfPanels: IOptionalIType<ISimpleType<number>, [undefined]>;
4234
4318
  nbOfPanelsVertically: IOptionalIType<ISimpleType<number>, [undefined]>;
4319
+ targetPanelWidth: IMaybe<ISimpleType<number>>;
4235
4320
  twoPanels: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4236
4321
  centerSplit: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4237
4322
  swapKnob: IOptionalIType<ISimpleType<boolean>, [undefined]>;
@@ -4249,6 +4334,7 @@ readonly maxPanelsOpened: number;
4249
4334
  setStyle(style: string): void;
4250
4335
  setNbOfPanels(nbOfPanels: number): void;
4251
4336
  setNbOfPanelsVertically(nbOfPanelsVertically: number): void;
4337
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
4252
4338
  setCenterSplit(centerSplit: boolean): void;
4253
4339
  setSwapKnob(swapKnob: boolean): void;
4254
4340
  setSwapInOut(swapInOut: boolean): void;
@@ -4274,13 +4360,19 @@ readonly orientation: "horizontal" | "vertical";
4274
4360
  } & {
4275
4361
  verifyOpeningPosition(): void;
4276
4362
  regenerateId(randomizer: string): void;
4363
+ applyTargetPanelWidth(): void;
4277
4364
  } & {
4278
4365
  rename(name: string): void;
4366
+ ensureName(): void;
4279
4367
  resize(dimensions: Partial<SIWallOpeningDimensions>): void;
4368
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
4280
4369
  moveTo(position: SIWallOpeningPosition): void;
4281
4370
  moveInDirection(direction: URDL, distance?: number): void;
4282
4371
  remove(): void;
4283
4372
  setLayers(layers: string[]): void;
4373
+ } & {
4374
+ expandToFullSegment(): void;
4375
+ addToAllSegmentsInWall(): void;
4284
4376
  }, _NotCustomized, _NotCustomized>;
4285
4377
 
4286
4378
  declare const WallOpeningDimensions: IModelType< {
@@ -4295,6 +4387,7 @@ declare const WallOpeningOptions: IModelType< {
4295
4387
  style: IOptionalIType<ISimpleType<string>, [undefined]>;
4296
4388
  nbOfPanels: IOptionalIType<ISimpleType<number>, [undefined]>;
4297
4389
  nbOfPanelsVertically: IOptionalIType<ISimpleType<number>, [undefined]>;
4390
+ targetPanelWidth: IMaybe<ISimpleType<number>>;
4298
4391
  twoPanels: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4299
4392
  centerSplit: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4300
4393
  swapKnob: IOptionalIType<ISimpleType<boolean>, [undefined]>;
@@ -4312,6 +4405,7 @@ readonly maxPanelsOpened: number;
4312
4405
  setStyle(style: string): void;
4313
4406
  setNbOfPanels(nbOfPanels: number): void;
4314
4407
  setNbOfPanelsVertically(nbOfPanelsVertically: number): void;
4408
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
4315
4409
  setCenterSplit(centerSplit: boolean): void;
4316
4410
  setSwapKnob(swapKnob: boolean): void;
4317
4411
  setSwapInOut(swapInOut: boolean): void;
@@ -4377,6 +4471,7 @@ options: IOptionalIType<IModelType< {
4377
4471
  style: IOptionalIType<ISimpleType<string>, [undefined]>;
4378
4472
  nbOfPanels: IOptionalIType<ISimpleType<number>, [undefined]>;
4379
4473
  nbOfPanelsVertically: IOptionalIType<ISimpleType<number>, [undefined]>;
4474
+ targetPanelWidth: IMaybe<ISimpleType<number>>;
4380
4475
  twoPanels: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4381
4476
  centerSplit: IOptionalIType<ISimpleType<boolean>, [undefined]>;
4382
4477
  swapKnob: IOptionalIType<ISimpleType<boolean>, [undefined]>;
@@ -4394,6 +4489,7 @@ readonly maxPanelsOpened: number;
4394
4489
  setStyle(style: string): void;
4395
4490
  setNbOfPanels(nbOfPanels: number): void;
4396
4491
  setNbOfPanelsVertically(nbOfPanelsVertically: number): void;
4492
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
4397
4493
  setCenterSplit(centerSplit: boolean): void;
4398
4494
  setSwapKnob(swapKnob: boolean): void;
4399
4495
  setSwapInOut(swapInOut: boolean): void;
@@ -4419,13 +4515,19 @@ readonly orientation: "horizontal" | "vertical";
4419
4515
  } & {
4420
4516
  verifyOpeningPosition(): void;
4421
4517
  regenerateId(randomizer: string): void;
4518
+ applyTargetPanelWidth(): void;
4422
4519
  } & {
4423
4520
  rename(name: string): void;
4521
+ ensureName(): void;
4424
4522
  resize(dimensions: Partial<SIWallOpeningDimensions>): void;
4523
+ setTargetPanelWidth(targetPanelWidth: number | undefined): void;
4425
4524
  moveTo(position: SIWallOpeningPosition): void;
4426
4525
  moveInDirection(direction: URDL, distance?: number): void;
4427
4526
  remove(): void;
4428
4527
  setLayers(layers: string[]): void;
4528
+ } & {
4529
+ expandToFullSegment(): void;
4530
+ addToAllSegmentsInWall(): void;
4429
4531
  }, _NotCustomized, _NotCustomized>>;
4430
4532
  }, {
4431
4533
  readonly superJson: JsonAbstractSegment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smplrspace/smplr-loader",
3
- "version": "2.56.1-beta.8",
3
+ "version": "2.57.0",
4
4
  "description": "NPM package to load a typed Smplr.js from CDN easily",
5
5
  "type": "module",
6
6
  "files": [