@ifc-lite/viewer 1.25.0 → 1.25.2

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 (58) hide show
  1. package/.turbo/turbo-build.log +79 -84
  2. package/CHANGELOG.md +60 -0
  3. package/dist/assets/{basketViewActivator-CU8_toGq.js → basketViewActivator-CTgyKI3U.js} +6 -6
  4. package/dist/assets/{bcf-DXGDhw56.js → bcf-7jQby1qi.js} +1 -1
  5. package/dist/assets/{deflate-Bb1_H2Yf.js → deflate-Cfp9t1Df.js} +1 -1
  6. package/dist/assets/exporters-DfSvJPi4.js +4660 -0
  7. package/dist/assets/geometry.worker-Cyn5BybV.js +1 -0
  8. package/dist/assets/{geotiff-y0ZxbRJd.js → geotiff-xZoE8BkO.js} +10 -10
  9. package/dist/assets/{ids-DruUNtfD.js → ids-Cu73hD0Y.js} +21 -21
  10. package/dist/assets/ifc-lite_bg-ksLBP5cA.wasm +0 -0
  11. package/dist/assets/{index-Dr88ZlSY.js → index-WSbA5iy6.js} +31959 -31608
  12. package/dist/assets/{jpeg-B3_loqFe.js → jpeg-DhwFEbqb.js} +1 -1
  13. package/dist/assets/{lerc-nkwS8ZUe.js → lerc-Dz6BXOVb.js} +1 -1
  14. package/dist/assets/{lzw-D3cW5Wpg.js → lzw-C9z0fG2o.js} +1 -1
  15. package/dist/assets/{native-bridge-BcYJooq8.js → native-bridge-RvDmzO-2.js} +1 -1
  16. package/dist/assets/{packbits-DDN4xzB5.js → packbits-jfwifz7C.js} +1 -1
  17. package/dist/assets/parser.worker-C594dWxH.js +182 -0
  18. package/dist/assets/raw-R2QfzPAR.js +1 -0
  19. package/dist/assets/{sandbox-DETNEyQb.js → sandbox-DDSZ7rek.js} +2450 -2260
  20. package/dist/assets/{server-client-CmzJOeS7.js → server-client-Ctk8_Bof.js} +1 -1
  21. package/dist/assets/{webimage-CBjgg4up.js → webimage-XFHVyVtC.js} +1 -1
  22. package/dist/assets/{zstd-C8oQ6qdS.js → zstd-3q5qcl5V.js} +1 -1
  23. package/dist/index.html +6 -6
  24. package/package.json +22 -21
  25. package/src/App.tsx +4 -0
  26. package/src/components/viewer/BCFPanel.tsx +8 -1
  27. package/src/components/viewer/CommandPalette.tsx +5 -1
  28. package/src/components/viewer/MainToolbar.tsx +41 -19
  29. package/src/components/viewer/Section2DPanel.tsx +6 -2
  30. package/src/components/viewer/Viewport.tsx +48 -3
  31. package/src/components/viewer/bcf/BCFTopicDetail.tsx +24 -0
  32. package/src/components/viewer/hierarchy/ifc-icons.ts +60 -0
  33. package/src/components/viewer/useGeometryStreaming.ts +113 -18
  34. package/src/hooks/ingest/resolveDataStoreOrAbort.test.ts +61 -0
  35. package/src/hooks/ingest/resolveDataStoreOrAbort.ts +28 -0
  36. package/src/hooks/ingest/viewerModelIngest.ts +55 -11
  37. package/src/hooks/useBCF.ts +98 -16
  38. package/src/hooks/useDrawingGeneration.ts +149 -3
  39. package/src/hooks/useIfcCache.ts +44 -18
  40. package/src/hooks/useIfcLoader.ts +1 -23
  41. package/src/hooks/useSymbolicAnnotations.ts +240 -61
  42. package/src/store/constants.ts +19 -3
  43. package/src/store/index.ts +1 -0
  44. package/src/store/slices/visibilitySlice.ts +2 -1
  45. package/src/store/types.ts +9 -0
  46. package/src/utils/serverDataModel.test.ts +51 -1
  47. package/src/utils/serverDataModel.ts +2 -26
  48. package/vite.config.ts +0 -5
  49. package/dist/assets/exporters-DZhLN0ux.js +0 -5957
  50. package/dist/assets/geometry-controller.worker-DQOSYqtw.js +0 -7
  51. package/dist/assets/geometry.worker-B62e03Ao.js +0 -1
  52. package/dist/assets/ifc-lite-Ch2T9pP9.js +0 -7
  53. package/dist/assets/ifc-lite_bg-D7O1WHgP.wasm +0 -0
  54. package/dist/assets/ifc-lite_bg-iH_07wf8.wasm +0 -0
  55. package/dist/assets/parser.worker-BW1IMUed.js +0 -182
  56. package/dist/assets/raw-CoIXstQ-.js +0 -1
  57. package/dist/assets/wasm-bridge-CT7mK9W0.js +0 -1
  58. package/dist/assets/workerHelpers-IEQDo8r3.js +0 -36
@@ -1 +0,0 @@
1
- import{B as o}from"./geotiff-y0ZxbRJd.js";import"./sandbox-DETNEyQb.js";import"./lens-PYsLu_MA.js";import"./__vite-browser-external-B1O5LaIO.js";class c extends o{decodeBlock(e){return e}}export{c as default};
@@ -1 +0,0 @@
1
- import{e as m,f}from"./exporters-DZhLN0ux.js";import"./sandbox-DETNEyQb.js";import"./lens-PYsLu_MA.js";class z{bridge;initialized=!1;constructor(){this.bridge=new m}async init(){this.initialized||(await this.bridge.init(),this.initialized=!0)}isInitialized(){return this.initialized}toIfcContent(e){return typeof e=="string"?e:new TextDecoder().decode(e)}async processGeometry(e){this.initialized||await this.init(),performance.now();const i=new f(this.bridge.getApi(),this.toIfcContent(e)),r=i.collectMeshes(),s=i.getBuildingRotation();performance.now();let o=0,n=0;for(const a of r)o+=a.positions.length/3,n+=a.indices.length/3;return{meshes:r,totalVertices:o,totalTriangles:n,coordinateInfo:{originShift:{x:0,y:0,z:0},originalBounds:{min:{x:0,y:0,z:0},max:{x:0,y:0,z:0}},shiftedBounds:{min:{x:0,y:0,z:0},max:{x:0,y:0,z:0}},hasLargeCoordinates:!1,buildingRotation:s}}}async processGeometryStreaming(e,i){this.initialized||await this.init();const r=performance.now(),s=new f(this.bridge.getApi(),this.toIfcContent(e));let o=0,n=0,c=0;try{for await(const t of s.collectMeshesStreaming(50)){if(t&&typeof t=="object"&&"type"in t&&t.type==="colorUpdate")continue;const l=t;o+=l.length;for(const g of l)n+=g.positions.length/3,c+=g.indices.length/3;i.onBatch?.({meshes:l,progress:{processed:o,total:o,currentType:"processing"}})}}catch(t){throw i.onError?.(t instanceof Error?t:new Error(String(t))),t}const d=performance.now()-r,h={totalMeshes:o,totalVertices:n,totalTriangles:c,parseTimeMs:d*.3,geometryTimeMs:d*.7};return i.onComplete?.(h),h}getApi(){return this.bridge.getApi()}}export{z as WasmBridge};
@@ -1,36 +0,0 @@
1
- let a;
2
- let __tla = (async ()=>{
3
- function o(r, t) {
4
- return new Promise((e)=>{
5
- r.addEventListener("message", function s({ data: n }) {
6
- n?.type === t && (r.removeEventListener("message", s), e(n));
7
- });
8
- });
9
- }
10
- o(self, "wasm_bindgen_worker_init").then(async ({ init: r, receiver: t })=>{
11
- const e = await import("./ifc-lite-Ch2T9pP9.js");
12
- await e.default(r), postMessage({
13
- type: "wasm_bindgen_worker_ready"
14
- }), e.wbg_rayon_start_worker(t);
15
- });
16
- a = async function(r, t, e) {
17
- if (e.numThreads() === 0) throw new Error("num_threads must be > 0.");
18
- const s = {
19
- type: "wasm_bindgen_worker_init",
20
- init: {
21
- module_or_path: r,
22
- memory: t
23
- },
24
- receiver: e.receiver()
25
- };
26
- await Promise.all(Array.from({
27
- length: e.numThreads()
28
- }, async ()=>{
29
- const n = new Worker(self.location.href, {
30
- type: "module"
31
- });
32
- return n.postMessage(s), await o(n, "wasm_bindgen_worker_ready"), n;
33
- })), e.build();
34
- };
35
- })();
36
- export { a as s, __tla };