@procore/bim-webviewer-sdk 17.3.0-rc.9 → 17.4.0-hotfix.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +38 -3
  2. package/dist/Procore.Bim.Webviewer.d.ts +49 -5
  3. package/dist/Procore.Bim.Webviewer.js +1 -1
  4. package/dist/types/src/api/analytic_events/analyticKeys.d.ts +1 -0
  5. package/dist/types/src/api/bim_viewpoints.d.ts +5 -0
  6. package/dist/types/src/api/types/FileExtraction.d.ts +1 -0
  7. package/dist/types/src/components/ShortestDistanceComponent.d.ts +1 -0
  8. package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +0 -1
  9. package/dist/types/src/controllers/RenderController.d.ts +1 -0
  10. package/dist/types/src/controllers/RenderControllerProxy.d.ts +1 -3
  11. package/dist/types/src/{navigation → hotkeys}/Hotkeys.d.ts +8 -5
  12. package/dist/types/src/hotkeys/__tests__/Hotkeys.test.d.ts +1 -0
  13. package/dist/types/src/measuring/DistanceLabel.d.ts +1 -0
  14. package/dist/types/src/measuring/FeatureTooltip/FeatureTooltip.d.ts +4 -0
  15. package/dist/types/src/measuring/MeasureToolUtils.d.ts +11 -8
  16. package/dist/types/src/measuring/MeasurementInterface.d.ts +1 -0
  17. package/dist/types/src/measuring/MeasurementManager.d.ts +5 -0
  18. package/dist/types/src/measuring/PointToPointController.d.ts +7 -10
  19. package/dist/types/src/measuring/PointToPointManager.d.ts +5 -0
  20. package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +30 -50
  21. package/dist/types/src/measuring/__tests__/fixtures.d.ts +17 -0
  22. package/dist/types/src/navigation/DefaultControl.d.ts +1 -0
  23. package/dist/types/src/navigation/__tests__/DefaultControl.test.d.ts +1 -0
  24. package/dist/types/src/picking/PickingController.d.ts +9 -1
  25. package/dist/types/src/procoregl/MeshTopology/__tests__/TopologyFixtures.d.ts +4 -1
  26. package/dist/types/src/pwfreader/v1/streaming/StreamedMeshServices.d.ts +2 -0
  27. package/dist/types/src/pwfreader/v2/PWFV2.d.ts +7 -0
  28. package/dist/types/src/pwfreader/v2/streaming/MeshData.d.ts +1 -0
  29. package/dist/types/src/pwfreader/v2/streaming/PartitionProxy.d.ts +7 -2
  30. package/dist/types/src/pwfreader/v2/streaming/StreamedMeshServices.d.ts +24 -3
  31. package/dist/types/src/types/setMeasurementSchema.d.ts +21 -0
  32. package/dist/types/src/utils/ApiMetaData/ApiMetaData.d.ts +4 -0
  33. package/dist/types/src/utils/ApiMetaData/__tests__/mocks.d.ts +3 -2
  34. package/dist/types/src/utils/Enums.d.ts +1 -0
  35. package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/MainThreadSyncAccessHandleFallback.d.ts +2 -1
  36. package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/OPFSFile.d.ts +3 -2
  37. package/dist/types/src/utils/OPFSFile/__tests__/OPFSFile.test.d.ts +1 -0
  38. package/dist/types/src/utils/OPFSFile/index.d.ts +1 -0
  39. package/package.json +2 -2
  40. package/dist/types/src/pwfreader/v1/streaming/OPFSFile/index.d.ts +0 -1
  41. /package/dist/types/src/{navigation/Orbit → utils}/log.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -5,24 +5,51 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
7
7
 
8
- ## [Unreleased]
8
+ ## [17.4.0] 2025-01-31
9
9
 
10
10
  ### Added
11
11
 
12
+ - ([#1466](https://github.com/procore/bim-webviewer/pull/1466)) Point to point measurement will now snap to intersections between meshes.
13
+ - ([#1469](https://github.com/procore/bim-webviewer/pull/1469)) Models loaded with a `fileExtractionId` now apply the viewpoint associated with that file extraction (if there is one) when the model is loaded.
14
+
15
+ ### Changed
16
+
17
+ - ([#1460](https://github.com/procore/bim-webviewer/pull/1460)) Measurement Tool will no longer display any visuals prior to making a measurement while hovering over a section plane when the Section Box tool is enabled. This is to prevent confusion over the interactions between the two tools.
18
+ - ([#1467](https://github.com/procore/bim-webviewer/pull/1467)) [Internal][QA Ignore] `updateProcore` script now updates `document-viewer-ui-service`.
19
+
20
+ ### Fixed
21
+
22
+ - ([#1476](https://github.com/procore/bim-webviewer/pull/1476)) While measurement tool is enabled, quick switch to a different navigation mode using the keyboard/mouse shortcuts no longer disables the measurement tool.
23
+
24
+ ## [17.3.0] 2025-01-17
25
+
26
+ ### Added
27
+
28
+ - ([#1440](https://github.com/procore/bim-webviewer/pull/1440)) Added clipping of the point to point outline that appears when a user hovers over a mesh/surface, respecting the applied section box/plane.
12
29
  - ([#1389](https://github.com/procore/bim-webviewer/pull/1389)) [QA Ignore] Fetching the model by only using model revision id in SDK side.
13
30
 
14
31
  ### Changed
15
32
 
16
33
  - ([#1415](https://github.com/procore/bim-webviewer/pull/1415)) Changed the priority of the escape key operations to place resetting the measurement below closing the floor plan modal, but above closing any open windows.
17
34
  - ([#1416](https://github.com/procore/bim-webviewer/pull/1416)) When the Measurement Tool is enabled, the context menu for mouse right click button will no longer display.
18
- - ([#1442](https://github.com/procore/bim-webviewer/pull/1442)) [Internal] Refactor Shortest Distance Measurement to get mesh data in the same code path for both standard and partitioned models. For partitioned models this means it no longer fetches the partition from cache for the mesh data and instead reads it from OPFS
35
+ - ([#1444](https://github.com/procore/bim-webviewer/pull/1444)) While Measurement Tool is enabled, changing to a different navigation mode other than the default navigation mode will now disable the Measurement Tool. Additionally, when enabling the Measurement Tool, the default navigation mode will be set regardless of the current navigation mode.
36
+ - ([#1446](https://github.com/procore/bim-webviewer/pull/1446)) Hotkey refactoring. Additionally, the SDK method `setMeasurement` can now be used even if the Measurement Tool is not added to the `options.tools` array when initializing the Web Viewer. This allows third party developers to enable the Measurement Tool after the Web Viewer has been initialized.
19
37
 
20
38
  ### Fixed
21
39
 
22
40
  - ([#1422](https://github.com/procore/bim-webviewer/pull/1422)) Fixed an issue where the crosshair cursor wouldn't appear when enabling the point-to-point measurement tool, requiring users to hover over a mesh and then move into empty space.
23
41
  - ([#1423](https://github.com/procore/bim-webviewer/pull/1423)) Fixed bug that caused the temporary distance label to reappear in the scene when zooming in even when it was hidden behind the camera.
24
- - ([#1414](https://github.com/procore/bim-webviewer/pull/1414)) [Internal][QA Ignore] Removes noisy console logs from the PointToPointController when a user of p2p hovers over non-manifold meshes.
25
42
  - ([#1445](https://github.com/procore/bim-webviewer/pull/1445)) Fixed UI bug in which the footer line of the Settings dialog was on top of the Measurement Units dropdown menu.
43
+ - ([#1448](https://github.com/procore/bim-webviewer/pull/1448)) Fixed an issue where the cursor was not updated to the default one if the section box was disabled while the resize cursor was applied.
44
+ - ([#1449](https://github.com/procore/bim-webviewer/pull/1449)) Fixed bug in which the point to point feature tooltip was not hiding when zooming in/out as it does when moving the mouse around. It now behaves exactly as it does when moving the mouse around.
45
+ - ([#1450](https://github.com/procore/bim-webviewer/pull/1450)) Fixes the issue with opening the same large model multiple times, on separate tabs of the same Safari browser instance.
46
+ - ([#1451](https://github.com/procore/bim-webviewer/pull/1451)) Fixed issue with SDK method `setMeasurement` not working as expected when disabling the measurement tool while the tool is enabled and the optional `measurementMode` parameter is set to a different mode than the current mode.
47
+ - ([#1462](https://github.com/procore/bim-webviewer/pull/1462)) Fixed bug that was causing the temporary distance label to flicker its visibility when zooming out past a certain limit. This limit makes sure to hide the label so it doesn't occlude the line.
48
+ - ([#1464](https://github.com/procore/bim-webviewer/pull/1464)) Fixed bug in which the fixed orbit stayed active after the point-to-point tool was toggled off.
49
+
50
+ ## [17.2.1] 2025-01-15
51
+
52
+ - ([#1453](https://github.com/procore/bim-webviewer/pull/1453)) Fix issue where models that have beyond a certain number of nodes in the object tree would fail to load in Chrome v132 (which released 2025-01-14). Chrome v131 did not seem to have this issue.
26
53
 
27
54
  ## [17.2.0] 2024-12-13
28
55
 
@@ -66,6 +93,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
93
  - ([#1399](https://github.com/procore/bim-webviewer/pull/1399)) When zooming in and/or out while the point to point measurement tool is active, the mouse cursor and intersection snap results now automatically update and the temporary distance label stays in the midpoint of the measuring line.
67
94
  - ([#1419](https://github.com/procore/bim-webviewer/pull/1419)) Fixed erroneous test mock data that was causing the whole test suite to fail.
68
95
 
96
+ ## [16.5.1] 2025-01-15
97
+
98
+ - ([#1453](https://github.com/procore/bim-webviewer/pull/1453)) Fix issue where models that have beyond a certain number of nodes in the object tree would fail to load in Chrome v132 (which released 2025-01-14). Chrome v131 did not seem to have this issue.
99
+
69
100
  ## [16.5.0] 2024-11-08
70
101
 
71
102
  ### Added
@@ -158,6 +189,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
158
189
 
159
190
  - [Breaking Change] Removed `enableObjectTreeSearch` feature flag as it is now always enabled and cannot be disabled.
160
191
 
192
+ ## [15.5.1] 2025-01-15
193
+
194
+ - ([#1453](https://github.com/procore/bim-webviewer/pull/1453)) Fix issue where models that have beyond a certain number of nodes in the object tree would fail to load in Chrome v132 (which released 2025-01-14). Chrome v131 did not seem to have this issue.
195
+
161
196
  ## [15.5.0] - 2024-08-02
162
197
 
163
198
  ### Added
@@ -196,6 +196,7 @@ export declare type FileExtraction = {
196
196
  id: number;
197
197
  extraction_items: FileExtractionItem[];
198
198
  bim_file_upload: BimFileUpload;
199
+ viewpoint_id?: number | null;
199
200
  };
200
201
 
201
202
  export declare type FileExtractionItem = WebFormatExtractionItem | PropertiesExtractionItem;
@@ -367,6 +368,7 @@ declare class MeshData {
367
368
  faces(): Uint16Array;
368
369
  uploadToGPU(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
369
370
  uploadToGPUPreFetching(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
371
+ getCompressedMeshData(): ArrayBuffer;
370
372
  getUncompressedMeshData(): ArrayBuffer;
371
373
  }
372
374
 
@@ -833,6 +835,22 @@ export declare type ObjectFilter = {
833
835
  filterValue: string;
834
836
  };
835
837
 
838
+ declare class OPFSFile {
839
+ private path;
840
+ private syncAccessHandle?;
841
+ private directoryHandle?;
842
+ private fileName?;
843
+ private static stats;
844
+ constructor(path: string);
845
+ open(): Promise<void>;
846
+ delete(): Promise<void>;
847
+ close(): void;
848
+ truncate(offset: number): void;
849
+ write(buffer: ArrayBuffer, byteOffset?: number): number | undefined;
850
+ read(byteOffset?: number, byteLength?: number): ArrayBuffer;
851
+ private updateReadStats;
852
+ }
853
+
836
854
  export declare type Options = FileExtractionModePwfV2OverrideOptions | FileExtractionModePwfV1OverrideOptions | FileExtractionModeOptions | ModelRevisionModePwfV2OverrideOptions | ModelRevisionModePwfV1OverrideOptions | ModelRevisionModeOptions | ResourceOptions;
837
855
 
838
856
  declare type Palette = {
@@ -862,6 +880,7 @@ declare class Partition_2 {
862
880
 
863
881
  declare class PartitionProxy {
864
882
  private pwfPartitionProxy;
883
+ private meshServices;
865
884
  static numberOfPartitions: number;
866
885
  static numberOfPartitionsLoaded: number;
867
886
  static currentNumberOfDownloading: number;
@@ -872,7 +891,10 @@ declare class PartitionProxy {
872
891
  private _byteLength?;
873
892
  private _compressedByteLength?;
874
893
  private stats;
875
- constructor(pwfPartitionProxy: PWFPartitionProxy);
894
+ constructor(params: {
895
+ pwfPartitionProxy: PWFPartitionProxy;
896
+ meshServices: StreamedMeshServices;
897
+ });
876
898
  meshCount(): number;
877
899
  incrementMeshCount(numMeshes: number): void;
878
900
  vertexCount(): number;
@@ -890,7 +912,7 @@ declare class PartitionProxy {
890
912
  compressed: number;
891
913
  size: number;
892
914
  };
893
- static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, callback: (partitionProxy: PartitionProxy) => void): void;
915
+ static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, meshServices: StreamedMeshServices, callback: (partitionProxy: PartitionProxy) => void): void;
894
916
  static getPartitionProxies(partitionProxiesAB: ArrayBuffer): PWFPartitionProxy[];
895
917
  getContentOfPartitionUrl(): string;
896
918
  }
@@ -1264,6 +1286,7 @@ export declare type PwfV1Bundle = {
1264
1286
  declare class PWFV2 implements PWF {
1265
1287
  private readonly downloadMetaData;
1266
1288
  resourceId: number;
1289
+ resource: ResourceDiscriminator;
1267
1290
  streaming: boolean;
1268
1291
  nodeAB?: ArrayBuffer;
1269
1292
  meshnodeAB?: ArrayBuffer;
@@ -1286,14 +1309,18 @@ declare class PWFV2 implements PWF {
1286
1309
  meshnodeOffPointer: number;
1287
1310
  bvhTree?: BVHTree;
1288
1311
  _virtualMeshnodeIndexOffset: number;
1312
+ private readonly featureFlags;
1289
1313
  loadPartitionPromises: Promise<void>[];
1290
1314
  currentIndex: number;
1291
1315
  partitionProxies: PartitionProxy[];
1292
1316
  partitionsCache: LRUCache<string, Partition>;
1317
+ private meshServicesOPFSInitialized;
1293
1318
  constructor(params: {
1294
1319
  downloadMetaData: DownloadMetaData;
1295
1320
  resourceId: number;
1321
+ resource: ResourceDiscriminator;
1296
1322
  manifest: Manifest;
1323
+ featureFlags: ValidatedFeatureFlags;
1297
1324
  });
1298
1325
  setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
1299
1326
  setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
@@ -1442,11 +1469,27 @@ declare class StreamedMeshnodeServices_2 extends MeshnodeServices_2 {
1442
1469
  }
1443
1470
 
1444
1471
  declare class StreamedMeshServices extends MeshServices {
1445
- constructor(pwf: PWFV2);
1446
- getMeshObject(meshOffset: number): MeshObject_2;
1472
+ private readonly featureFlags;
1473
+ private meshIndexToOPFSRecord;
1474
+ private opfsFile?;
1475
+ private opfsOffset;
1476
+ private resource;
1477
+ constructor(params: {
1478
+ pwf: PWFV2;
1479
+ featureFlags: ValidatedFeatureFlags;
1480
+ resource: ResourceDiscriminator;
1481
+ });
1482
+ initOPFS(): Promise<void>;
1483
+ private deleteOPFSFile;
1484
+ getOPFSFile(): OPFSFile | undefined;
1485
+ closeOPFS(): Promise<void>;
1486
+ writeMeshDataToOPFS(meshData: MeshData): Promise<void>;
1487
+ getMeshObject(meshIndex: number): MeshObject_2;
1447
1488
  loadPartitionContainingMeshnode(streamedMeshnode: StreamedMeshnode): Promise<void>;
1448
1489
  getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
1449
- dispose(): void;
1490
+ meshFromOffset(meshIndex: number): Mesh;
1491
+ private getCompressedMeshDataFromOPFS;
1492
+ dispose(): Promise<void>;
1450
1493
  }
1451
1494
 
1452
1495
  declare class StreamedMeshServices_2 extends MeshServices_2 {
@@ -1462,6 +1505,7 @@ declare class StreamedMeshServices_2 extends MeshServices_2 {
1462
1505
  });
1463
1506
  initOPFS(): Promise<void>;
1464
1507
  private deleteOPFSFile;
1508
+ getOPFSFile(): OPFSFile | undefined;
1465
1509
  closeOPFS(): Promise<void>;
1466
1510
  writeMeshDataToOPFS(meshData: MeshData_2): Promise<void>;
1467
1511
  getMeshObject(meshIndex: number): MeshObject;