@ifc-lite/viewer 1.26.0 → 1.28.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 (150) hide show
  1. package/.turbo/turbo-build.log +45 -38
  2. package/CHANGELOG.md +93 -0
  3. package/dist/assets/{basketViewActivator-ZpTYWE3K.js → basketViewActivator-BNRDNuUJ.js} +9 -9
  4. package/dist/assets/{bcf-Ctcu_Sc2.js → bcf-DCwCuP7n.js} +56 -56
  5. package/dist/assets/{browser-DXS29_v9.js → browser-BIoDDfBW.js} +1 -1
  6. package/dist/assets/{cesium-BoVuJvTC.js → cesium-CzZn5yVA.js} +319 -319
  7. package/dist/assets/{decode-worker-CgM1iNSK.js → decode-worker-Cjign7Zh.js} +1 -1
  8. package/dist/assets/deflate-DNGgs8Ur.js +1 -0
  9. package/dist/assets/drawing-2d-D0dDf6Lh.js +257 -0
  10. package/dist/assets/e57-source-2wI9jkCA.js +1 -0
  11. package/dist/assets/exceljs.min-DsuzKYnj.js +29 -0
  12. package/dist/assets/{exporters-DSq76AVM.js → exporters-B9v81gi9.js} +1861 -1524
  13. package/dist/assets/geometry.worker-Bpa3115V.js +1 -0
  14. package/dist/assets/{geotiff-A5UjhI6L.js → geotiff-D-YCLS4g.js} +10 -10
  15. package/dist/assets/html2canvas.esm-Ge7aVWlp.js +5 -0
  16. package/dist/assets/{ids-DiLcGTer.js → ids-CCpq-5d3.js} +952 -945
  17. package/dist/assets/ifc-lite_bg-DbgS5EUA.wasm +0 -0
  18. package/dist/assets/{index-BAH8IJVR.js → index-Bgb3_Pu_.js} +47682 -42474
  19. package/dist/assets/index-BtbXFKsX.css +1 -0
  20. package/dist/assets/index.es-CWfqZyyr.js +6866 -0
  21. package/dist/assets/{jpeg-BzSkwo5D.js → jpeg-DGOAeUqU.js} +1 -1
  22. package/dist/assets/jspdf.es.min-XPLU2Wkq.js +19571 -0
  23. package/dist/assets/jspdf.plugin.autotable-BBLUVd7n.js +2 -0
  24. package/dist/assets/lens-C4p1kQ0p.js +1 -0
  25. package/dist/assets/{lerc-Cg2Rz-D5.js → lerc-1PMSCHwX.js} +1 -1
  26. package/dist/assets/{lzw-BBPPLW-0.js → lzw-C65U9lNM.js} +1 -1
  27. package/dist/assets/{maplibre-gl-Do6O5tDc.js → maplibre-gl-BF3Z0idw.js} +1 -1
  28. package/dist/assets/{native-bridge-CPojOeGE.js → native-bridge-XxXos6yI.js} +2 -2
  29. package/dist/assets/{packbits-yLSpjW-V.js → packbits-BdMWXC3m.js} +1 -1
  30. package/dist/assets/{pako.esm-Cram60i4.js → pako.esm-n3Pgozwg.js} +1 -1
  31. package/dist/assets/parser.worker-Ddwo3_06.js +182 -0
  32. package/dist/assets/pdf-CRwaZf3s.js +135 -0
  33. package/dist/assets/raw-CJgQdyuZ.js +1 -0
  34. package/dist/assets/{sandbox-CsRXlgCO.js → sandbox-0sDo3g3m.js} +3037 -2554
  35. package/dist/assets/server-client-cTCJ-853.js +719 -0
  36. package/dist/assets/{webimage-YafxjjGr.js → webimage-BtakWX7W.js} +1 -1
  37. package/dist/assets/xlsx-B1YOg2QB.js +142 -0
  38. package/dist/assets/{zip-BJqVbRkU.js → zip-DFgP-l20.js} +1 -1
  39. package/dist/assets/{zstd-CkSLOiuu.js → zstd-CmwsbxmM.js} +1 -1
  40. package/dist/index.html +10 -10
  41. package/package.json +27 -23
  42. package/src/components/mcp/PlaygroundChat.tsx +1 -0
  43. package/src/components/mcp/data.ts +6 -0
  44. package/src/components/mcp/playground-dispatcher.ts +280 -0
  45. package/src/components/mcp/playground-files.ts +33 -1
  46. package/src/components/mcp/types.ts +2 -1
  47. package/src/components/ui/combo-input.tsx +163 -0
  48. package/src/components/ui/tabs.tsx +1 -1
  49. package/src/components/viewer/CommandPalette.tsx +6 -1
  50. package/src/components/viewer/ComparePanel.tsx +420 -0
  51. package/src/components/viewer/HierarchyPanel.tsx +46 -7
  52. package/src/components/viewer/MainToolbar.tsx +19 -2
  53. package/src/components/viewer/PropertiesPanel.tsx +84 -8
  54. package/src/components/viewer/SearchInline.tsx +62 -2
  55. package/src/components/viewer/SearchModal.filter.builder.tsx +24 -393
  56. package/src/components/viewer/SearchModal.filter.editors.tsx +503 -0
  57. package/src/components/viewer/SearchModal.filter.tsx +64 -1
  58. package/src/components/viewer/SearchModal.tsx +19 -6
  59. package/src/components/viewer/ViewerLayout.tsx +5 -0
  60. package/src/components/viewer/Viewport.tsx +18 -0
  61. package/src/components/viewer/hierarchy/HierarchyNode.tsx +3 -3
  62. package/src/components/viewer/hierarchy/ifc-icons.ts +9 -0
  63. package/src/components/viewer/hierarchy/treeDataBuilder.ts +87 -0
  64. package/src/components/viewer/hierarchy/types.ts +1 -0
  65. package/src/components/viewer/hierarchy/useHierarchyTree.ts +6 -2
  66. package/src/components/viewer/lists/ColumnHeaderMenu.tsx +84 -0
  67. package/src/components/viewer/lists/ListBuilder.tsx +789 -280
  68. package/src/components/viewer/lists/ListGroupingBar.tsx +72 -0
  69. package/src/components/viewer/lists/ListPanel.tsx +49 -5
  70. package/src/components/viewer/lists/ListResultsTable.tsx +270 -176
  71. package/src/components/viewer/lists/list-table-utils.ts +123 -0
  72. package/src/components/viewer/properties/MaterialTotalsPanel.tsx +283 -0
  73. package/src/generated/mcp-catalog.json +4 -0
  74. package/src/hooks/federationLoadGate.test.ts +12 -2
  75. package/src/hooks/federationLoadGate.ts +9 -2
  76. package/src/hooks/ingest/federationAlign.ts +481 -0
  77. package/src/hooks/ingest/viewerModelIngest.ts +3 -212
  78. package/src/hooks/source-key.ts +35 -0
  79. package/src/hooks/useAlignmentLines3D.ts +1 -26
  80. package/src/hooks/useCompare.ts +0 -0
  81. package/src/hooks/useCompareOverlay.ts +119 -0
  82. package/src/hooks/useDrawingGeneration.ts +23 -1
  83. package/src/hooks/useGridLines3D.ts +140 -0
  84. package/src/hooks/useIfc.ts +1 -1
  85. package/src/hooks/useIfcCache.ts +32 -9
  86. package/src/hooks/useIfcFederation.ts +42 -810
  87. package/src/hooks/useIfcLoader.ts +361 -488
  88. package/src/hooks/useIfcServer.ts +3 -0
  89. package/src/hooks/useLens.ts +5 -1
  90. package/src/hooks/useSymbolicAnnotations.ts +70 -38
  91. package/src/lib/compare/buildFingerprints.ts +173 -0
  92. package/src/lib/compare/describeChange.ts +0 -0
  93. package/src/lib/compare/geometricData.test.ts +54 -0
  94. package/src/lib/compare/geometricData.ts +37 -0
  95. package/src/lib/compare/overlay.test.ts +99 -0
  96. package/src/lib/compare/overlay.ts +91 -0
  97. package/src/lib/geo/cesium-placement.ts +1 -1
  98. package/src/lib/geo/reproject.ts +4 -1
  99. package/src/lib/length-unit-scale.ts +41 -0
  100. package/src/lib/lists/adapter.ts +136 -11
  101. package/src/lib/lists/export/csv.ts +47 -0
  102. package/src/lib/lists/export/index.ts +49 -0
  103. package/src/lib/lists/export/model.ts +111 -0
  104. package/src/lib/lists/export/pdf.ts +67 -0
  105. package/src/lib/lists/export/xlsx.ts +83 -0
  106. package/src/lib/lists/index.ts +2 -0
  107. package/src/lib/llm/script-edit-ops.ts +23 -0
  108. package/src/lib/llm/stream-client.ts +8 -1
  109. package/src/lib/search/filter-evaluate.test.ts +81 -0
  110. package/src/lib/search/filter-evaluate.ts +59 -87
  111. package/src/lib/search/filter-match.ts +167 -0
  112. package/src/lib/search/filter-rules.test.ts +25 -0
  113. package/src/lib/search/filter-rules.ts +75 -2
  114. package/src/lib/search/filter-schema.ts +0 -0
  115. package/src/lib/search/result-export.ts +7 -1
  116. package/src/lib/slab-edit.test.ts +72 -0
  117. package/src/lib/slab-edit.ts +159 -19
  118. package/src/sdk/adapters/export-adapter.ts +9 -4
  119. package/src/sdk/adapters/query-adapter.ts +3 -3
  120. package/src/store/globalId.ts +15 -13
  121. package/src/store/index.ts +16 -1
  122. package/src/store/slices/cesiumSlice.ts +8 -1
  123. package/src/store/slices/compareSlice.ts +96 -0
  124. package/src/store/slices/lensSlice.ts +8 -0
  125. package/src/store/slices/listSlice.ts +6 -0
  126. package/src/store/slices/mutationSlice.ts +14 -6
  127. package/src/store/slices/searchSlice.ts +29 -3
  128. package/src/utils/acquireFileBuffer.test.ts +12 -4
  129. package/src/utils/desktopModelSnapshot.ts +2 -1
  130. package/src/utils/loadingUtils.ts +32 -0
  131. package/src/utils/nativeSpatialDataStore.ts +6 -0
  132. package/src/utils/serverDataModel.test.ts +6 -0
  133. package/src/utils/serverDataModel.ts +7 -0
  134. package/src/utils/spatialHierarchy.test.ts +53 -1
  135. package/src/utils/spatialHierarchy.ts +42 -2
  136. package/src/vite-env.d.ts +2 -0
  137. package/dist/assets/deflate-Cnx0il6E.js +0 -1
  138. package/dist/assets/drawing-2d-C71b8Ugx.js +0 -257
  139. package/dist/assets/e57-source-CQHxE8n3.js +0 -1
  140. package/dist/assets/geometry.worker-0Q9qEa6p.js +0 -1
  141. package/dist/assets/ifc-lite_bg-CEZnhM2e.wasm +0 -0
  142. package/dist/assets/index-B9Ug2EqU.css +0 -1
  143. package/dist/assets/lens-PYsLu_MA.js +0 -1
  144. package/dist/assets/parser.worker-8md211IW.js +0 -182
  145. package/dist/assets/raw-BQrAgxwT.js +0 -1
  146. package/dist/assets/server-client-Bk4c1CPO.js +0 -626
  147. package/src/hooks/ingest/resolveDataStoreOrAbort.test.ts +0 -61
  148. package/src/hooks/ingest/resolveDataStoreOrAbort.ts +0 -28
  149. package/src/hooks/ingest/watchedGeometryStream.test.ts +0 -78
  150. package/src/hooks/ingest/watchedGeometryStream.ts +0 -76
@@ -1 +0,0 @@
1
- const x=["ifcType","attribute","property","quantity","classification","material","model"],_=["Name","Description","ObjectType","Tag"],O=["#E53935","#1E88E5","#FDD835","#43A047","#8E24AA","#00ACC1","#FF8F00","#6D4C41","#EC407A","#5C6BC0","#26A69A","#78909C"],h={IfcWallStandardCase:"IfcWall",IfcSlabStandardCase:"IfcSlab",IfcColumnStandardCase:"IfcColumn",IfcBeamStandardCase:"IfcBeam",IfcStairFlight:"IfcStair",IfcRampFlight:"IfcRamp"};function E(t,o,e){switch(t.type){case"ifcType":return M(t,o,e);case"property":return b(t,o,e);case"material":return N(t,o,e);case"attribute":return I(t,o,e);case"quantity":return A(t,o,e);case"classification":return L(t,o,e);case"model":return q(t,o,e);default:return!1}}function M(t,o,e){if(!t.ifcType)return!1;const n=e.getEntityType(o);return n?n===t.ifcType?!0:h[n]===t.ifcType:!1}function b(t,o,e){if(!t.propertySet||!t.propertyName)return!1;const n=e.getPropertyValue(o,t.propertySet,t.propertyName);return t.operator==="exists"?n!=null:t.operator==="contains"&&t.propertyValue!==void 0?String(n??"").toLowerCase().includes(t.propertyValue.toLowerCase()):t.propertyValue!==void 0?String(n??"")===t.propertyValue:n!=null}function N(t,o,e){if(!t.materialName)return!1;const n=t.materialName.toLowerCase();if(e.getMaterialName){const s=e.getMaterialName(o);return s?s.toLowerCase().includes(n):!1}const a=e.getPropertySets(o);if(!a||a.length===0)return!1;for(const s of a)if(s.name.toLowerCase().includes("material")){for(const l of s.properties)if(String(l.value??"").toLowerCase().includes(n))return!0}return!1}function I(t,o,e){if(!t.attributeName||!e.getEntityAttribute)return!1;const n=e.getEntityAttribute(o,t.attributeName);return t.operator==="exists"?n!==void 0&&n!=="":t.operator==="contains"&&t.attributeValue!==void 0?(n??"").toLowerCase().includes(t.attributeValue.toLowerCase()):t.attributeValue!==void 0?(n??"")===t.attributeValue:n!==void 0&&n!==""}function A(t,o,e){if(!t.quantitySet||!t.quantityName||!e.getQuantityValue)return!1;const n=e.getQuantityValue(o,t.quantitySet,t.quantityName);return t.operator==="exists"?n!=null:n==null?!1:t.operator==="contains"&&t.quantityValue!==void 0?String(n).toLowerCase().includes(t.quantityValue.toLowerCase()):t.quantityValue!==void 0?String(n)===t.quantityValue:!0}function L(t,o,e){if(!t.classificationSystem&&!t.classificationCode||!e.getClassifications)return!1;const n=e.getClassifications(o);if(!n||n.length===0)return!1;for(const a of n){const s=!t.classificationSystem||(a.system??"").toLowerCase().includes(t.classificationSystem.toLowerCase()),l=!t.classificationCode||(a.identification??"").toLowerCase().includes(t.classificationCode.toLowerCase());if(s&&l)return!0}return!1}function q(t,o,e){return!t.modelId||!e.getModelId?!1:e.getModelId(o)===t.modelId}const T=[.6,.6,.6,.15];function C(t,o){const e=t.replace("#",""),n=parseInt(e.substring(0,2),16)/255,a=parseInt(e.substring(2,4),16)/255,s=parseInt(e.substring(4,6),16)/255;return[n,a,s,o]}function P(t){const o=Math.round(t[0]*255).toString(16).padStart(2,"0"),e=Math.round(t[1]*255).toString(16).padStart(2,"0"),n=Math.round(t[2]*255).toString(16).padStart(2,"0");return`#${o}${e}${n}`}function W(t){return t[3]<.2}const V=137.508;function F(t,o,e){const n=(1-Math.abs(2*e-1))*o,a=n*(1-Math.abs(t/60%2-1)),s=e-n/2;let l=0,p=0,i=0;t<60?(l=n,p=a):t<120?(l=a,p=n):t<180?(p=n,i=a):t<240?(p=a,i=n):t<300?(l=a,i=n):(l=n,i=a);const m=Math.round((l+s)*255),y=Math.round((p+s)*255),f=Math.round((i+s)*255);return`#${m.toString(16).padStart(2,"0")}${y.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}`}function B(t){const o=t*V%360,e=t%2===0?.65:.8,a=[.45,.55,.35][t%3];return F(o,e,a)}function Q(t,o){const e=performance.now(),n=t.rules.filter(i=>i.enabled);if(n.length===0)return{colorMap:new Map,hiddenIds:new Set,ruleCounts:new Map,ruleEntityIds:new Map,executionTime:performance.now()-e};const a=new Map,s=new Set,l=new Map,p=new Map;for(const i of n)l.set(i.id,0),p.set(i.id,[]);return o.forEachEntity(i=>{let m=!1;for(const y of n)if(E(y.criteria,i,o)){m=!0,l.set(y.id,(l.get(y.id)??0)+1),p.get(y.id).push(i),R(y,i,a,s);break}m||a.set(i,T)}),{colorMap:a,hiddenIds:s,ruleCounts:l,ruleEntityIds:p,executionTime:performance.now()-e}}function R(t,o,e,n){switch(t.action){case"colorize":e.set(o,C(t.color,1));break;case"transparent":e.set(o,C(t.color,.3));break;case"hide":n.add(o);break}}function $(t,o){const e=performance.now(),n=new Map,a=[];o.forEachEntity(f=>{const d=z(t,f,o),u=d!=null?String(d).trim():"";if(u===""){a.push(f);return}let r=n.get(u);r||(r=[],n.set(u,r)),r.push(f)});const s=Array.from(n.entries()).sort((f,d)=>d[1].length-f[1].length),l=new Map,p=new Set,i=new Map,m=new Map,y=[];for(let f=0;f<s.length;f++){const[d,u]=s[f],r=B(f),c=`auto-${f}`,S=C(r,1);for(const w of u)l.set(w,S);i.set(c,u.length),m.set(c,u);const g=t.source==="model"?o.getModelName?.(d)??d:d;y.push({id:c,name:g,color:r,count:u.length})}for(const f of a)l.set(f,T);return{colorMap:l,hiddenIds:p,ruleCounts:i,ruleEntityIds:m,legend:y,executionTime:performance.now()-e}}function z(t,o,e){switch(t.source){case"ifcType":return e.getEntityType(o);case"attribute":return!t.propertyName||!e.getEntityAttribute?void 0:e.getEntityAttribute(o,t.propertyName);case"property":if(!t.psetName||!t.propertyName)return;{const n=e.getPropertyValue(o,t.psetName,t.propertyName);return n!=null?String(n):void 0}case"quantity":return!t.psetName||!t.propertyName||!e.getQuantityValue?void 0:e.getQuantityValue(o,t.psetName,t.propertyName);case"classification":if(!e.getClassifications)return;{const n=e.getClassifications(o);if(!n||n.length===0)return;const a=n[0],s=[];return a.system&&s.push(a.system),a.identification&&s.push(a.identification),s.length>0?s.join(": "):a.name}case"material":return e.getMaterialName?e.getMaterialName(o):void 0;case"model":return e.getModelId?e.getModelId(o):void 0;default:return}}const G=[{id:"lens-by-class",name:"By IFC Class",builtin:!0,rules:[],autoColor:{source:"ifcType"}},{id:"lens-structural",name:"Structural",builtin:!0,rules:[{id:"col",name:"Columns",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcColumn"},action:"colorize",color:"#E53935"},{id:"beam",name:"Beams",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcBeam"},action:"colorize",color:"#1E88E5"},{id:"slab",name:"Slabs",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcSlab"},action:"colorize",color:"#FDD835"},{id:"footing",name:"Footings",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcFooting"},action:"colorize",color:"#43A047"}]},{id:"lens-envelope",name:"Building Envelope",builtin:!0,rules:[{id:"roof",name:"Roofs",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcRoof"},action:"colorize",color:"#C62828"},{id:"curtwall",name:"Curtain Walls",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcCurtainWall"},action:"colorize",color:"#0277BD"},{id:"window",name:"Windows",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcWindow"},action:"colorize",color:"#4FC3F7"},{id:"door",name:"Doors",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcDoor"},action:"colorize",color:"#00695C"},{id:"wall",name:"Walls",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcWall"},action:"colorize",color:"#8D6E63"}]},{id:"lens-openings",name:"Openings & Circulation",builtin:!0,rules:[{id:"door",name:"Doors",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcDoor"},action:"colorize",color:"#00897B"},{id:"window",name:"Windows",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcWindow"},action:"colorize",color:"#42A5F5"},{id:"stair",name:"Stairs",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcStairFlight"},action:"colorize",color:"#FF8F00"},{id:"ramp",name:"Ramps",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcRamp"},action:"colorize",color:"#7CB342"},{id:"railing",name:"Railings",enabled:!0,criteria:{type:"ifcType",ifcType:"IfcRailing"},action:"colorize",color:"#78909C"}]},{id:"lens-auto-material",name:"By Material",builtin:!0,rules:[],autoColor:{source:"material"}},{id:"lens-by-model",name:"By Model",builtin:!0,rules:[],autoColor:{source:"model"}}],D=30;function U(t){const o=new Set;return t.forEachEntity(e=>{const n=t.getEntityType(e);n&&o.add(n)}),Array.from(o).sort()}function k(t,o){const e={},n=o.properties===!0,a=o.quantities===!0,s=o.classifications===!0,l=o.materials===!0;if(!n&&!a&&!s&&!l)return e;const p=n?new Map:null,i=a?new Map:null,m=s?new Set:null,y=l?new Set:null,f=[],d=new Map;t.forEachEntity(u=>{const r=t.getEntityType(u);if(!r)return;const c=d.get(r)??0;c<D&&(f.push(u),d.set(r,c+1))});for(const u of f){if(p){const r=t.getPropertySets(u);for(const c of r){if(!c.name)continue;let S=p.get(c.name);S||(S=new Set,p.set(c.name,S));for(const g of c.properties)g.name&&S.add(g.name)}}if(i&&t.getQuantitySets){const r=t.getQuantitySets(u);for(const c of r){if(!c.name)continue;let S=i.get(c.name);S||(S=new Set,i.set(c.name,S));for(const g of c.quantities)g.name&&S.add(g.name)}}if(m&&t.getClassifications){const r=t.getClassifications(u);for(const c of r)c.system&&m.add(c.system)}if(y&&t.getMaterialName){const r=t.getMaterialName(u);r&&y.add(r)}}if(p){const u=new Map;for(const[r,c]of p)u.set(r,Array.from(c).sort());e.propertySets=u}if(i){const u=new Map;for(const[r,c]of i)u.set(r,Array.from(c).sort());e.quantitySets=u}return m&&(e.classificationSystems=Array.from(m).sort()),y&&(e.materials=Array.from(y).sort()),e}export{x as A,G as B,_ as E,O as L,k as a,Q as b,U as d,$ as e,C as h,W as i,P as r};