@ifc-lite/viewer 1.23.0 → 1.25.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.
- package/.turbo/turbo-build.log +34 -31
- package/CHANGELOG.md +96 -0
- package/dist/assets/{basketViewActivator-Dn_bHUl2.js → basketViewActivator-CU8_toGq.js} +7 -7
- package/dist/assets/{bcf-B9SFl84i.js → bcf-DXGDhw56.js} +23 -23
- package/dist/assets/{deflate-yMpdCIqk.js → deflate-Bb1_H2Yf.js} +1 -1
- package/dist/assets/{exporters-D-BvrNIg.js → exporters-DZhLN0ux.js} +1861 -1658
- package/dist/assets/geometry-controller.worker-DQOSYqtw.js +7 -0
- package/dist/assets/geometry.worker-B62e03Ao.js +1 -0
- package/dist/assets/{geotiff-D1tvcDCb.js → geotiff-y0ZxbRJd.js} +10 -10
- package/dist/assets/{ids-DZLs0snJ.js → ids-DruUNtfD.js} +4 -4
- package/dist/assets/ifc-lite-Ch2T9pP9.js +7 -0
- package/dist/assets/{ifc-lite_bg-DyHX37GQ.wasm → ifc-lite_bg-D7O1WHgP.wasm} +0 -0
- package/dist/assets/{ifc-lite_bg-BIryVCXQ.wasm → ifc-lite_bg-iH_07wf8.wasm} +0 -0
- package/dist/assets/index-Bws3UAkj.css +1 -0
- package/dist/assets/{index-CXSBhkcJ.js → index-Dr88ZlSY.js} +64100 -47030
- package/dist/assets/{jpeg-DUMcZp24.js → jpeg-B3_loqFe.js} +1 -1
- package/dist/assets/lens-PYsLu_MA.js +1 -0
- package/dist/assets/{lerc-IN4uWojP.js → lerc-nkwS8ZUe.js} +1 -1
- package/dist/assets/{lzw-Cnw0hH-m.js → lzw-D3cW5Wpg.js} +1 -1
- package/dist/assets/{native-bridge-BVf2uzoH.js → native-bridge-BcYJooq8.js} +2 -2
- package/dist/assets/{packbits-BskJCwk0.js → packbits-DDN4xzB5.js} +1 -1
- package/dist/assets/{parser.worker-BdtkkaGf.js → parser.worker-BW1IMUed.js} +3 -3
- package/dist/assets/raw-CoIXstQ-.js +1 -0
- package/dist/assets/{sandbox-VLI_y7cl.js → sandbox-DETNEyQb.js} +498 -470
- package/dist/assets/{server-client-BLcKaWQB.js → server-client-CmzJOeS7.js} +1 -1
- package/dist/assets/{wasm-bridge-BAfZh7YT.js → wasm-bridge-CT7mK9W0.js} +1 -1
- package/dist/assets/{webimage-Db2xzze3.js → webimage-CBjgg4up.js} +1 -1
- package/dist/assets/{workerHelpers--sAYm9yN.js → workerHelpers-IEQDo8r3.js} +1 -1
- package/dist/assets/{zstd-BDToOQyD.js → zstd-C8oQ6qdS.js} +1 -1
- package/dist/index.html +8 -8
- package/package.json +11 -9
- package/src/App.tsx +5 -2
- package/src/components/extensions/AuditLogPanel.tsx +259 -0
- package/src/components/extensions/BundlePreview.tsx +102 -0
- package/src/components/extensions/CapabilityReview.tsx +333 -0
- package/src/components/extensions/ExtensionDockHost.tsx +192 -0
- package/src/components/extensions/ExtensionToolbarSlot.tsx +106 -0
- package/src/components/extensions/ExtensionsPanel.tsx +481 -0
- package/src/components/extensions/FlavorDialog.tsx +398 -0
- package/src/components/extensions/FlavorImportPreview.tsx +79 -0
- package/src/components/extensions/FlavorIndicator.tsx +81 -0
- package/src/components/extensions/FlavorListView.tsx +318 -0
- package/src/components/extensions/FlavorMergeDialog.tsx +326 -0
- package/src/components/extensions/HelpHint.tsx +182 -0
- package/src/components/extensions/IdeasPanel.tsx +344 -0
- package/src/components/extensions/PlanCard.tsx +227 -0
- package/src/components/extensions/PrivacyPanel.tsx +312 -0
- package/src/components/extensions/PromoteToolDialog.tsx +313 -0
- package/src/components/extensions/RepairQueuePanel.tsx +222 -0
- package/src/components/extensions/icon-registry.ts +92 -0
- package/src/components/extensions/toast-helpers.ts +49 -0
- package/src/components/extensions/widget/WidgetErrorBoundary.tsx +62 -0
- package/src/components/extensions/widget/WidgetRenderer.tsx +428 -0
- package/src/components/viewer/ChatPanel.tsx +251 -3
- package/src/components/viewer/CommandPalette.tsx +74 -4
- package/src/components/viewer/Drawing2DCanvas.tsx +178 -1
- package/src/components/viewer/EntityContextMenu.tsx +70 -0
- package/src/components/viewer/ExportDialog.tsx +9 -1
- package/src/components/viewer/KeyboardShortcutsDialog.tsx +21 -6
- package/src/components/viewer/LensPanel.tsx +50 -0
- package/src/components/viewer/MainToolbar.tsx +170 -87
- package/src/components/viewer/ScriptPanel.tsx +105 -1
- package/src/components/viewer/Section2DPanel.tsx +58 -2
- package/src/components/viewer/StatusBar.tsx +18 -0
- package/src/components/viewer/ViewerLayout.tsx +53 -4
- package/src/components/viewer/Viewport.tsx +72 -0
- package/src/hooks/useActionLogger.test.ts +161 -0
- package/src/hooks/useActionLogger.ts +141 -0
- package/src/hooks/useForkExtension.ts +51 -0
- package/src/hooks/useIfcFederation.ts +7 -1
- package/src/hooks/useInstalledExtensions.ts +43 -0
- package/src/hooks/usePrivacyDisclosure.ts +48 -0
- package/src/hooks/useRunExtensionTests.ts +67 -0
- package/src/hooks/useSlotContributions.ts +38 -0
- package/src/hooks/useSymbolicAnnotations.test.ts +124 -0
- package/src/hooks/useSymbolicAnnotations.ts +776 -0
- package/src/lib/desktop-product.ts +7 -1
- package/src/lib/lens/adapter.ts +14 -0
- package/src/lib/llm/prompt-cache.ts +77 -0
- package/src/lib/llm/stream-client.ts +20 -2
- package/src/lib/llm/stream-direct.ts +11 -1
- package/src/lib/llm/system-prompt.ts +42 -0
- package/src/lib/safe-mode.ts +30 -0
- package/src/sdk/ExtensionHostProvider.tsx +103 -0
- package/src/services/extensions/flavor-service.ts +183 -0
- package/src/services/extensions/host-commands.ts +112 -0
- package/src/services/extensions/host-installer.ts +289 -0
- package/src/services/extensions/host.ts +514 -0
- package/src/services/extensions/idb-flavor-storage.test.ts +140 -0
- package/src/services/extensions/idb-flavor-storage.ts +241 -0
- package/src/services/extensions/idb-log-storage.test.ts +110 -0
- package/src/services/extensions/idb-log-storage.ts +171 -0
- package/src/services/extensions/idb-storage.ts +228 -0
- package/src/services/extensions/runtime-errors.ts +26 -0
- package/src/services/extensions/sandbox-factory.ts +217 -0
- package/src/store/constants.ts +48 -6
- package/src/store/index.ts +6 -1
- package/src/store/slices/drawing2DSlice.ts +8 -0
- package/src/store/slices/extensionsSlice.ts +90 -0
- package/src/store/slices/lensSlice.ts +28 -0
- package/src/store/slices/visibilitySlice.test.ts +6 -0
- package/src/store/slices/visibilitySlice.ts +17 -8
- package/src/store/types.ts +2 -0
- package/dist/assets/geometry-controller.worker-Cm5pvyR6.js +0 -7
- package/dist/assets/geometry.worker-ClNvXIrj.js +0 -1
- package/dist/assets/ifc-lite-BDg0iIbj.js +0 -7
- package/dist/assets/index-DS_xJQfP.css +0 -1
- package/dist/assets/lens-CpjUdqpw.js +0 -1
- package/dist/assets/raw-DzTtEZIY.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const z=["ifcType","attribute","property","quantity","classification","material"],D=["Name","Description","ObjectType","Tag"],x=["#E53935","#1E88E5","#FDD835","#43A047","#8E24AA","#00ACC1","#FF8F00","#6D4C41","#EC407A","#5C6BC0","#26A69A","#78909C"],w={IfcWallStandardCase:"IfcWall",IfcSlabStandardCase:"IfcSlab",IfcColumnStandardCase:"IfcColumn",IfcBeamStandardCase:"IfcBeam",IfcStairFlight:"IfcStair",IfcRampFlight:"IfcRamp"};function h(t,a,n){switch(t.type){case"ifcType":return E(t,a,n);case"property":return b(t,a,n);case"material":return M(t,a,n);case"attribute":return N(t,a,n);case"quantity":return A(t,a,n);case"classification":return I(t,a,n);default:return!1}}function E(t,a,n){if(!t.ifcType)return!1;const e=n.getEntityType(a);return e?e===t.ifcType?!0:w[e]===t.ifcType:!1}function b(t,a,n){if(!t.propertySet||!t.propertyName)return!1;const e=n.getPropertyValue(a,t.propertySet,t.propertyName);return t.operator==="exists"?e!=null:t.operator==="contains"&&t.propertyValue!==void 0?String(e??"").toLowerCase().includes(t.propertyValue.toLowerCase()):t.propertyValue!==void 0?String(e??"")===t.propertyValue:e!=null}function M(t,a,n){if(!t.materialName)return!1;const e=t.materialName.toLowerCase();if(n.getMaterialName){const s=n.getMaterialName(a);return s?s.toLowerCase().includes(e):!1}const o=n.getPropertySets(a);if(!o||o.length===0)return!1;for(const s of o)if(s.name.toLowerCase().includes("material")){for(const l of s.properties)if(String(l.value??"").toLowerCase().includes(e))return!0}return!1}function N(t,a,n){if(!t.attributeName||!n.getEntityAttribute)return!1;const e=n.getEntityAttribute(a,t.attributeName);return t.operator==="exists"?e!==void 0&&e!=="":t.operator==="contains"&&t.attributeValue!==void 0?(e??"").toLowerCase().includes(t.attributeValue.toLowerCase()):t.attributeValue!==void 0?(e??"")===t.attributeValue:e!==void 0&&e!==""}function A(t,a,n){if(!t.quantitySet||!t.quantityName||!n.getQuantityValue)return!1;const e=n.getQuantityValue(a,t.quantitySet,t.quantityName);return t.operator==="exists"?e!=null:e==null?!1:t.operator==="contains"&&t.quantityValue!==void 0?String(e).toLowerCase().includes(t.quantityValue.toLowerCase()):t.quantityValue!==void 0?String(e)===t.quantityValue:!0}function I(t,a,n){if(!t.classificationSystem&&!t.classificationCode||!n.getClassifications)return!1;const e=n.getClassifications(a);if(!e||e.length===0)return!1;for(const o of e){const s=!t.classificationSystem||(o.system??"").toLowerCase().includes(t.classificationSystem.toLowerCase()),l=!t.classificationCode||(o.identification??"").toLowerCase().includes(t.classificationCode.toLowerCase());if(s&&l)return!0}return!1}const T=[.6,.6,.6,.15];function C(t,a){const n=t.replace("#",""),e=parseInt(n.substring(0,2),16)/255,o=parseInt(n.substring(2,4),16)/255,s=parseInt(n.substring(4,6),16)/255;return[e,o,s,a]}function _(t){const a=Math.round(t[0]*255).toString(16).padStart(2,"0"),n=Math.round(t[1]*255).toString(16).padStart(2,"0"),e=Math.round(t[2]*255).toString(16).padStart(2,"0");return`#${a}${n}${e}`}function O(t){return t[3]<.2}const L=137.508;function q(t,a,n){const e=(1-Math.abs(2*n-1))*a,o=e*(1-Math.abs(t/60%2-1)),s=n-e/2;let l=0,p=0,i=0;t<60?(l=e,p=o):t<120?(l=o,p=e):t<180?(p=e,i=o):t<240?(p=o,i=e):t<300?(l=o,i=e):(l=e,i=o);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 V(t){const a=t*L%360,n=t%2===0?.65:.8,o=[.45,.55,.35][t%3];return q(a,n,o)}function P(t,a){const n=performance.now(),e=t.rules.filter(i=>i.enabled);if(e.length===0)return{colorMap:new Map,hiddenIds:new Set,ruleCounts:new Map,ruleEntityIds:new Map,executionTime:performance.now()-n};const o=new Map,s=new Set,l=new Map,p=new Map;for(const i of e)l.set(i.id,0),p.set(i.id,[]);return a.forEachEntity(i=>{let m=!1;for(const y of e)if(h(y.criteria,i,a)){m=!0,l.set(y.id,(l.get(y.id)??0)+1),p.get(y.id).push(i),F(y,i,o,s);break}m||o.set(i,T)}),{colorMap:o,hiddenIds:s,ruleCounts:l,ruleEntityIds:p,executionTime:performance.now()-n}}function F(t,a,n,e){switch(t.action){case"colorize":n.set(a,C(t.color,1));break;case"transparent":n.set(a,C(t.color,.3));break;case"hide":e.add(a);break}}function W(t,a){const n=performance.now(),e=new Map,o=[];a.forEachEntity(f=>{const S=R(t,f,a),u=S!=null?String(S).trim():"";if(u===""){o.push(f);return}let r=e.get(u);r||(r=[],e.set(u,r)),r.push(f)});const s=Array.from(e.entries()).sort((f,S)=>S[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[S,u]=s[f],r=V(f),c=`auto-${f}`,d=C(r,1);for(const g of u)l.set(g,d);i.set(c,u.length),m.set(c,u),y.push({id:c,name:S,color:r,count:u.length})}for(const f of o)l.set(f,T);return{colorMap:l,hiddenIds:p,ruleCounts:i,ruleEntityIds:m,legend:y,executionTime:performance.now()-n}}function R(t,a,n){switch(t.source){case"ifcType":return n.getEntityType(a);case"attribute":return!t.propertyName||!n.getEntityAttribute?void 0:n.getEntityAttribute(a,t.propertyName);case"property":if(!t.psetName||!t.propertyName)return;{const e=n.getPropertyValue(a,t.psetName,t.propertyName);return e!=null?String(e):void 0}case"quantity":return!t.psetName||!t.propertyName||!n.getQuantityValue?void 0:n.getQuantityValue(a,t.psetName,t.propertyName);case"classification":if(!n.getClassifications)return;{const e=n.getClassifications(a);if(!e||e.length===0)return;const o=e[0],s=[];return o.system&&s.push(o.system),o.identification&&s.push(o.identification),s.length>0?s.join(": "):o.name}case"material":return n.getMaterialName?n.getMaterialName(a):void 0;default:return}}const Q=[{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"}}],B=30;function $(t){const a=new Set;return t.forEachEntity(n=>{const e=t.getEntityType(n);e&&a.add(e)}),Array.from(a).sort()}function v(t,a){const n={},e=a.properties===!0,o=a.quantities===!0,s=a.classifications===!0,l=a.materials===!0;if(!e&&!o&&!s&&!l)return n;const p=e?new Map:null,i=o?new Map:null,m=s?new Set:null,y=l?new Set:null,f=[],S=new Map;t.forEachEntity(u=>{const r=t.getEntityType(u);if(!r)return;const c=S.get(r)??0;c<B&&(f.push(u),S.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 d=p.get(c.name);d||(d=new Set,p.set(c.name,d));for(const g of c.properties)g.name&&d.add(g.name)}}if(i&&t.getQuantitySets){const r=t.getQuantitySets(u);for(const c of r){if(!c.name)continue;let d=i.get(c.name);d||(d=new Set,i.set(c.name,d));for(const g of c.quantities)g.name&&d.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());n.propertySets=u}if(i){const u=new Map;for(const[r,c]of i)u.set(r,Array.from(c).sort());n.quantitySets=u}return m&&(n.classificationSystems=Array.from(m).sort()),y&&(n.materials=Array.from(y).sort()),n}export{z as A,Q as B,D as E,x as L,v as a,P as b,$ as d,W as e,C as h,O as i,_ as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as o}from"./geotiff-D1tvcDCb.js";import"./sandbox-VLI_y7cl.js";import"./lens-CpjUdqpw.js";import"./__vite-browser-external-B1O5LaIO.js";class c extends o{decodeBlock(e){return e}}export{c as default};
|