@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
@@ -13,6 +13,7 @@
13
13
  import type { MeshData } from '@ifc-lite/geometry';
14
14
  import type { DataModel } from '@ifc-lite/server-client';
15
15
  import type { IfcDataStore } from '@ifc-lite/parser';
16
+ import { REL_TYPE_MAP as CANONICAL_REL_TYPE_MAP } from '@ifc-lite/parser';
16
17
  import {
17
18
  IfcTypeEnum,
18
19
  RelationshipType,
@@ -76,31 +77,6 @@ export interface ServerParseResult {
76
77
  };
77
78
  }
78
79
 
79
- // ============================================================================
80
- // Relationship Type Mapping
81
- // ============================================================================
82
-
83
- /**
84
- * Pre-computed uppercase relationship type map for efficient comparison
85
- * IMPORTANT: Keep in sync with columnar-parser.ts REL_TYPE_MAP (14 types total)
86
- */
87
- const REL_TYPE_MAP = new Map<string, RelationshipType>([
88
- ['IFCRELCONTAINEDINSPATIALSTRUCTURE', RelationshipType.ContainsElements],
89
- ['IFCRELAGGREGATES', RelationshipType.Aggregates],
90
- ['IFCRELDEFINESBYPROPERTIES', RelationshipType.DefinesByProperties],
91
- ['IFCRELDEFINESBYTYPE', RelationshipType.DefinesByType],
92
- ['IFCRELASSOCIATESMATERIAL', RelationshipType.AssociatesMaterial],
93
- ['IFCRELASSOCIATESCLASSIFICATION', RelationshipType.AssociatesClassification],
94
- ['IFCRELVOIDSELEMENT', RelationshipType.VoidsElement],
95
- ['IFCRELFILLSELEMENT', RelationshipType.FillsElement],
96
- ['IFCRELCONNECTSPATHELEMENTS', RelationshipType.ConnectsPathElements],
97
- ['IFCRELCONNECTSELEMENTS', RelationshipType.ConnectsElements],
98
- ['IFCRELSPACEBOUNDARY', RelationshipType.SpaceBoundary],
99
- ['IFCRELASSIGNSTOGROUP', RelationshipType.AssignsToGroup],
100
- ['IFCRELASSIGNSTOPRODUCT', RelationshipType.AssignsToProduct],
101
- ['IFCRELREFERENCEDINSPATIALSTRUCTURE', RelationshipType.ReferencedInSpatialStructure],
102
- ]);
103
-
104
80
  // ============================================================================
105
81
  // Spatial Hierarchy Building
106
82
  // ============================================================================
@@ -432,7 +408,7 @@ function buildRelationships(
432
408
  // Combined loop - process relationships once for both graph building AND property mapping
433
409
  for (const rel of dataModel.relationships) {
434
410
  const upperType = rel.rel_type.toUpperCase();
435
- const relType = REL_TYPE_MAP.get(upperType);
411
+ const relType = CANONICAL_REL_TYPE_MAP[upperType];
436
412
 
437
413
  // Build property set and quantity set mappings (regardless of relType mapping)
438
414
  if (upperType === 'IFCRELDEFINESBYPROPERTIES') {
package/vite.config.ts CHANGED
@@ -256,11 +256,6 @@ export default defineConfig({
256
256
  '@ifc-lite/ifcx': path.resolve(__dirname, '../../packages/ifcx/src'),
257
257
  '@ifc-lite/pointcloud': path.resolve(__dirname, '../../packages/pointcloud/src'),
258
258
  '@ifc-lite/wasm': path.resolve(__dirname, '../../packages/wasm/pkg/ifc-lite.js'),
259
- // Phase 2 of single-controller-rayon-design.md — threaded bundle
260
- // imported by `geometry-controller.worker.ts`. Kept separate from
261
- // `@ifc-lite/wasm` so legacy code that doesn't need threading
262
- // stays on the slim single-thread bundle.
263
- '@ifc-lite/wasm-threaded': path.resolve(__dirname, '../../packages/wasm-threaded/pkg/ifc-lite.js'),
264
259
  '@ifc-lite/sdk': path.resolve(__dirname, '../../packages/sdk/src'),
265
260
  '@ifc-lite/create': path.resolve(__dirname, '../../packages/create/src'),
266
261
  '@ifc-lite/sandbox/schema': path.resolve(__dirname, '../../packages/sandbox/src/bridge-schema.ts'),