+
+
diff --git a/examples/Tabs/index.html b/examples/Tabs/index.html
index 34c2e02e..1cc8c573 100644
--- a/examples/Tabs/index.html
+++ b/examples/Tabs/index.html
@@ -33,8 +33,8 @@
-
-
+
+
diff --git a/examples/TextInput/index.html b/examples/TextInput/index.html
index dd0c3fb2..52fe2008 100644
--- a/examples/TextInput/index.html
+++ b/examples/TextInput/index.html
@@ -23,8 +23,8 @@
-
-
+
+
diff --git a/examples/Toolbar/index.html b/examples/Toolbar/index.html
index 51b96f1a..6ebe44f8 100644
--- a/examples/Toolbar/index.html
+++ b/examples/Toolbar/index.html
@@ -20,8 +20,8 @@
-
-
+
+
diff --git a/examples/ViewCube/index.html b/examples/ViewCube/index.html
index 9615a6b9..cd2fde1f 100644
--- a/examples/ViewCube/index.html
+++ b/examples/ViewCube/index.html
@@ -17,9 +17,9 @@
-
-
-
+
+
+
diff --git a/examples/World2D/index.html b/examples/World2D/index.html
index a8598e96..0db2cdf2 100644
--- a/examples/World2D/index.html
+++ b/examples/World2D/index.html
@@ -18,9 +18,9 @@
-
-
-
+
+
+
diff --git a/examples/WorldsConfiguration/index.html b/examples/WorldsConfiguration/index.html
index 446f159e..fd56547d 100644
--- a/examples/WorldsConfiguration/index.html
+++ b/examples/WorldsConfiguration/index.html
@@ -28,8 +28,8 @@
-
-
+
+
diff --git a/examples/assets/button.js b/examples/assets/button.js
index 0125ee0c..58e607ab 100644
--- a/examples/assets/button.js
+++ b/examples/assets/button.js
@@ -1 +1 @@
-import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as e}from"./index-BRXkzNmn.js";import"./state-CdSmRkb4.js";e.init();const t=document.body.querySelector("bim-button");t.addEventListener("click",()=>{alert("Your schedule has been created!")});
+import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as e}from"./index-DhhQtOkc.js";import"./state-HK6D0hVF.js";e.init();const t=document.body.querySelector("bim-button");t.addEventListener("click",()=>{alert("Your schedule has been created!")});
diff --git a/examples/assets/checkbox.js b/examples/assets/checkbox.js
index 3e4e7191..b271f67a 100644
--- a/examples/assets/checkbox.js
+++ b/examples/assets/checkbox.js
@@ -1 +1 @@
-import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-BRXkzNmn.js";import"./state-CdSmRkb4.js";t.init();const e=document.body.querySelector("bim-checkbox");e.addEventListener("change",()=>{const{checked:o}=e;alert(o?"You want BIM Tiles! :)":"You don't want BIM Tiles :(")});
+import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-DhhQtOkc.js";import"./state-HK6D0hVF.js";t.init();const e=document.body.querySelector("bim-checkbox");e.addEventListener("change",()=>{const{checked:o}=e;alert(o?"You want BIM Tiles! :)":"You don't want BIM Tiles :(")});
diff --git a/examples/assets/classificationsTree.js b/examples/assets/classificationsTree.js
index b51ca70b..dca966d4 100644
--- a/examples/assets/classificationsTree.js
+++ b/examples/assets/classificationsTree.js
@@ -1,4 +1,4 @@
-import"./modulepreload-polyfill-B5Qt9EMX.js";import{p as m,a as d,C as l,i as f,n as b,k as u,u as w,R as g,b as y,A as C,h as T,j as v}from"./index-iHSjA6qM.js";import{b as E}from"./index-B3Tx1nQG.js";import{t as L}from"./index-BdZzXOWY.js";m.init();const e=new d,a=document.createElement("bim-viewport");a.name="viewer";const A=e.get(l),t=A.create(),o=new f(e);o.setup();t.scene=o;const c=new b(e,a);t.renderer=c;const r=new u(e);t.camera=r;a.addEventListener("resize",()=>{c.resize(),r.updateAspect()});const I=e.get(w);I.create(t);e.init();const $=e.get(g);await $.setup();const p=e.get(y);p.onFragmentsLoaded.add(n=>{t.scene&&t.scene.three.add(n)});const[h,k]=L.classificationTree({components:e,classifications:{}}),i=e.get(C);p.onFragmentsLoaded.add(async n=>{i.byEntity(n),await i.byPredefinedType(n),k({classifications:{Entities:["entities","predefinedTypes"],"Predefined Types":["predefinedTypes"]}})});const z=T.create(()=>{const[n]=E.loadIfc({components:e});return v`
+import"./modulepreload-polyfill-B5Qt9EMX.js";import{p as m,a as d,C as l,i as f,n as b,k as u,u as w,R as g,b as y,A as C,J as T,h as v}from"./template-DtWW1qyz.js";import{b as E}from"./index-Dx4AauaH.js";import{t as L}from"./index-CAZguOLS.js";m.init();const e=new d,a=document.createElement("bim-viewport");a.name="viewer";const A=e.get(l),t=A.create(),o=new f(e);o.setup();t.scene=o;const c=new b(e,a);t.renderer=c;const r=new u(e);t.camera=r;a.addEventListener("resize",()=>{c.resize(),r.updateAspect()});const I=e.get(w);I.create(t);e.init();const $=e.get(g);await $.setup();const p=e.get(y);p.onFragmentsLoaded.add(n=>{t.scene&&t.scene.three.add(n)});const[h,k]=L.classificationTree({components:e,classifications:{}}),i=e.get(C);p.onFragmentsLoaded.add(async n=>{i.byEntity(n),await i.byPredefinedType(n),k({classifications:{Entities:["entities"],"Predefined Types":["predefinedTypes"]}})});const z=T.create(()=>{const[n]=E.loadIfc({components:e});return v`
${n}
diff --git a/examples/assets/colorInput.js b/examples/assets/colorInput.js
index e1ad96c1..e2cf6799 100644
--- a/examples/assets/colorInput.js
+++ b/examples/assets/colorInput.js
@@ -1 +1 @@
-import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as n}from"./index-BRXkzNmn.js";import"./state-CdSmRkb4.js";n.init();const o=document.body.querySelector("bim-color-input");o.addEventListener("input",()=>{const{color:t}=o;console.log(t)});
+import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as n}from"./index-DhhQtOkc.js";import"./state-HK6D0hVF.js";n.init();const o=document.body.querySelector("bim-color-input");o.addEventListener("input",()=>{const{color:t}=o;console.log(t)});
diff --git a/examples/assets/component.js b/examples/assets/component.js
index fc2235bd..0a87c57b 100644
--- a/examples/assets/component.js
+++ b/examples/assets/component.js
@@ -1,4 +1,4 @@
-import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as c,C as t}from"./index-BRXkzNmn.js";import{x as n}from"./state-CdSmRkb4.js";c.init();const b=t.create(()=>n`
+import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as c,C as t}from"./index-DhhQtOkc.js";import{x as n}from"./state-HK6D0hVF.js";c.init();const b=t.create(()=>n`
diff --git a/examples/assets/dropdown.js b/examples/assets/dropdown.js
index 2bfb6f48..f9abc91b 100644
--- a/examples/assets/dropdown.js
+++ b/examples/assets/dropdown.js
@@ -1 +1 @@
-import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-BRXkzNmn.js";import"./state-CdSmRkb4.js";t.init();const e=document.body.querySelector("bim-dropdown");e.addEventListener("change",()=>{const o=e.value;alert(`You've selected: ${o.join(", ")}.`)});
+import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-DhhQtOkc.js";import"./state-HK6D0hVF.js";t.init();const e=document.body.querySelector("bim-dropdown");e.addEventListener("change",()=>{const o=e.value;alert(`You've selected: ${o.join(", ")}.`)});
diff --git a/examples/assets/elementProperties.js b/examples/assets/elementProperties.js
index a2b0504c..fff38857 100644
--- a/examples/assets/elementProperties.js
+++ b/examples/assets/elementProperties.js
@@ -1,4 +1,4 @@
-import"./modulepreload-polyfill-B5Qt9EMX.js";import{p as f,a as x,C as y,i as h,n as v,k as C,u as T,R as S,W as E,S as P,h as $,j as k}from"./index-iHSjA6qM.js";import{t as A}from"./index-BdZzXOWY.js";f.init();const r=document.createElement("bim-viewport"),e=new x,I=e.get(y),n=I.create(),l=new h(e);l.setup();n.scene=l;const d=new v(e,r);n.renderer=d;const i=new C(e);n.camera=i;i.controls.setLookAt(10,5.5,5,-4,-1,-6.5);r.addEventListener("resize",()=>{d.resize(),i.updateAspect()});e.init();const L=e.get(T);L.create(n);const m=e.get(S);await m.setup();const z=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),M=await z.arrayBuffer(),R=new Uint8Array(M),u=await m.load(R);n.scene.three.add(u);const V=e.get(E);await V.process(u);const[t,b]=A.elementProperties({components:e,fragmentIdMap:{}});t.preserveStructureOnFilter=!0;t.indentationInText=!1;const p=e.get(P);p.setup({world:n});p.events.select.onHighlight.add(o=>{b({fragmentIdMap:o})});p.events.select.onClear.add(()=>b({fragmentIdMap:{}}));const W=$.create(()=>{const o=s=>{const a=s.target;t.queryString=a.value!==""?a.value:null},g=s=>{const a=s.target;t.expanded=!t.expanded,a.label=t.expanded?"Collapse":"Expand"},w=async()=>{await navigator.clipboard.writeText(t.tsv)};return k`
+import"./modulepreload-polyfill-B5Qt9EMX.js";import{p as f,a as x,C as y,i as h,n as v,k as C,u as T,R as S,W as E,S as P,J as $,h as k}from"./template-DtWW1qyz.js";import{t as A}from"./index-CAZguOLS.js";f.init();const r=document.createElement("bim-viewport"),e=new x,I=e.get(y),n=I.create(),l=new h(e);l.setup();n.scene=l;const d=new v(e,r);n.renderer=d;const i=new C(e);n.camera=i;i.controls.setLookAt(10,5.5,5,-4,-1,-6.5);r.addEventListener("resize",()=>{d.resize(),i.updateAspect()});e.init();const L=e.get(T);L.create(n);const m=e.get(S);await m.setup();const z=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),J=await z.arrayBuffer(),M=new Uint8Array(J),u=await m.load(M);n.scene.three.add(u);const R=e.get(E);await R.process(u);const[t,b]=A.elementProperties({components:e,fragmentIdMap:{}});t.preserveStructureOnFilter=!0;t.indentationInText=!1;const p=e.get(P);p.setup({world:n});p.events.select.onHighlight.add(o=>{b({fragmentIdMap:o})});p.events.select.onClear.add(()=>b({fragmentIdMap:{}}));const V=$.create(()=>{const o=s=>{const a=s.target;t.queryString=a.value!==""?a.value:null},g=s=>{const a=s.target;t.expanded=!t.expanded,a.label=t.expanded?"Collapse":"Expand"},w=async()=>{await navigator.clipboard.writeText(t.tsv)};return k`
@@ -12,4 +12,4 @@ import"./modulepreload-polyfill-B5Qt9EMX.js";import{p as f,a as x,C as y,i as h,
`}),c=document.createElement("bim-grid");c.layouts={main:{template:`
"propertiesPanel viewport"
/25rem 1fr
- `,elements:{propertiesPanel:W,viewport:r}}};c.layout="main";document.body.append(c);
+ `,elements:{propertiesPanel:V,viewport:r}}};c.layout="main";document.body.append(c);
diff --git a/examples/assets/entityAttributes.js b/examples/assets/entityAttributes.js
index 985da9e8..b0d35e41 100644
--- a/examples/assets/entityAttributes.js
+++ b/examples/assets/entityAttributes.js
@@ -1,4 +1,4 @@
-import"./modulepreload-polyfill-B5Qt9EMX.js";import{p as I,a as v,C as T,i as A,n as P,k as $,u as E,R as W,W as L,S as N,h as R,j as p,t as b,l as H,I as O}from"./index-iHSjA6qM.js";import{t as V}from"./index-BdZzXOWY.js";I.init();const o=new v,B=o.get(T),a=B.create(),w=new A(o);w.setup();a.scene=w;const d=document.createElement("bim-viewport"),S=new P(o,d);a.renderer=S;const u=new $(o);a.camera=u;u.controls.setLookAt(10,5.5,5,-4,-1,-6.5);d.addEventListener("resize",()=>{S.resize(),u.updateAspect()});o.init();const M=o.get(E);M.create(a);const C=o.get(W);await C.setup();const D=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),F=await D.arrayBuffer(),J=new Uint8Array(F),x=await C.load(J);a.scene.three.add(x);const j=o.get(L);await j.process(x);const l={padding:"0.25rem",borderRadius:"0.25rem"},z={Entity:e=>{let t={};return e===H[O]&&(t={...l,backgroundColor:"purple",color:"white"}),String(e).includes("IFCWALL")&&(t={...l,backgroundColor:"green",color:"white"}),p`${e}`},PredefinedType:e=>{const t=["#1c8d83","#3c1c8d","#386c19","#837c24"],c=Math.floor(Math.random()*t.length),g=t[c],f={...l,backgroundColor:g,color:"white"};return p`${e}`},NominalValue:e=>{let t={};return typeof e=="boolean"&&e===!1&&(t={...l,backgroundColor:"#b13535",color:"white"}),typeof e=="boolean"&&e===!0&&(t={...l,backgroundColor:"#18882c",color:"white"}),p`${e}`}},[n,m]=V.entityAttributes({components:o,fragmentIdMap:{},tableDefinition:z,attributesToInclude:()=>["Name","ContainedInStructure","HasProperties","HasPropertySets",t=>t.includes("Value"),t=>t.startsWith("Material"),t=>t.startsWith("Relating"),t=>{const c=["IsGroupedBy","IsDecomposedBy"];return t.startsWith("Is")&&!c.includes(t)}]});n.expanded=!0;n.indentationInText=!0;n.preserveStructureOnFilter=!0;const h=o.get(N);h.setup({world:a});h.events.select.onHighlight.add(e=>{m({fragmentIdMap:e})});h.events.select.onClear.add(()=>m({fragmentIdMap:{}}));const G=R.create(()=>p`
+import"./modulepreload-polyfill-B5Qt9EMX.js";import{p as I,a as v,C as T,i as A,n as P,k as $,u as E,R as W,W as L,S as N,J as R,h as p,D as b,j as D,I as H}from"./template-DtWW1qyz.js";import{t as O}from"./index-CAZguOLS.js";I.init();const o=new v,V=o.get(T),a=V.create(),w=new A(o);w.setup();a.scene=w;const d=document.createElement("bim-viewport"),S=new P(o,d);a.renderer=S;const u=new $(o);a.camera=u;u.controls.setLookAt(10,5.5,5,-4,-1,-6.5);d.addEventListener("resize",()=>{S.resize(),u.updateAspect()});o.init();const B=o.get(E);B.create(a);const C=o.get(W);await C.setup();const J=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),M=await J.arrayBuffer(),F=new Uint8Array(M),x=await C.load(F);a.scene.three.add(x);const j=o.get(L);await j.process(x);const l={padding:"0.25rem",borderRadius:"0.25rem"},z={Entity:e=>{let t={};return e===D[H]&&(t={...l,backgroundColor:"purple",color:"white"}),String(e).includes("IFCWALL")&&(t={...l,backgroundColor:"green",color:"white"}),p`${e}`},PredefinedType:e=>{const t=["#1c8d83","#3c1c8d","#386c19","#837c24"],c=Math.floor(Math.random()*t.length),g=t[c],f={...l,backgroundColor:g,color:"white"};return p`${e}`},NominalValue:e=>{let t={};return typeof e=="boolean"&&e===!1&&(t={...l,backgroundColor:"#b13535",color:"white"}),typeof e=="boolean"&&e===!0&&(t={...l,backgroundColor:"#18882c",color:"white"}),p`${e}`}},[n,m]=O.entityAttributes({components:o,fragmentIdMap:{},tableDefinition:z,attributesToInclude:()=>["Name","ContainedInStructure","HasProperties","HasPropertySets",t=>t.includes("Value"),t=>t.startsWith("Material"),t=>t.startsWith("Relating"),t=>{const c=["IsGroupedBy","IsDecomposedBy"];return t.startsWith("Is")&&!c.includes(t)}]});n.expanded=!0;n.indentationInText=!0;n.preserveStructureOnFilter=!0;const h=o.get(N);h.setup({world:a});h.events.select.onHighlight.add(e=>{m({fragmentIdMap:e})});h.events.select.onClear.add(()=>m({fragmentIdMap:{}}));const G=R.create(()=>p`
diff --git a/examples/assets/grid.js b/examples/assets/grid.js
index 1c25f635..a71e06ce 100644
--- a/examples/assets/grid.js
+++ b/examples/assets/grid.js
@@ -1,4 +1,4 @@
-import"./modulepreload-polyfill-B5Qt9EMX.js";import{e as d,i as u,t as p,M as g,C as b,n as h}from"./index-BRXkzNmn.js";import{w as f,x as r}from"./state-CdSmRkb4.js";/**
+import"./modulepreload-polyfill-B5Qt9EMX.js";import{e as d,i as u,t as p,M as g,C as b,n as h}from"./index-DhhQtOkc.js";import{w as f,x as r}from"./state-HK6D0hVF.js";/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
diff --git a/examples/assets/index-BdZzXOWY.js b/examples/assets/index-BdZzXOWY.js
deleted file mode 100644
index 9bac847d..00000000
--- a/examples/assets/index-BdZzXOWY.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import{b as V,j as A,h as P,q as k,W,l as H,A as ne,I as J,r as B,s as Q,v as oe,w as ie,y as Y,z as K,D as U,H as re,J as se,S as ae,C as X,P as _,K as G,x as S,N as ce,Q as le,T as ue,g as F,u as de}from"./index-iHSjA6qM.js";const fe=n=>{const{components:i}=n,o=i.get(V),a=document.createElement("bim-table");a.columns=["Model"],a.headersHidden=!0;const s=[];for(const[,r]of o.groups){if(!r)continue;const l={data:{Model:r.name||r.uuid,Actions:r.uuid}};s.push(l)}return a.dataTransform={Actions:r=>{if(typeof r!="string")return r;const l=o.groups.get(r);return l?A`
- {l.visible=!l.visible;const I=d.target;I.icon=l.visible?"mdi:eye":"mdi:eye-off"}} icon="mdi:eye">
- o.disposeGroup(l)} icon="mdi:delete">
- `:r}},a.columns=["Model",{name:"Actions",width:"auto"}],a.data=s,A`
-
- ${s.length===0?A`No models has been loaded yet`:a}
-
- `},me=(n,i=!0)=>{const o=P.create(fe,n);if(i){const{components:a}=n,s=a.get(V),[,r]=o;s.onFragmentsLoaded.add(()=>setTimeout(()=>r())),s.onFragmentsDisposed.add(()=>r())}return o},pe=Object.freeze(Object.defineProperty({__proto__:null,modelsList:me},Symbol.toStringTag,{value:"Module"})),Z=["Name","ContainedInStructure","ForLayerSet","LayerThickness","HasProperties","HasAssociations","HasAssignments","HasPropertySets","PredefinedType","Quantities","ReferencedSource","Identification",n=>n.includes("Value"),n=>n.startsWith("Material"),n=>n.startsWith("Relating"),n=>{const i=["IsGroupedBy","IsDecomposedBy"];return n.startsWith("Is")&&!i.includes(n)}];async function j(n,i,o,a=Z,s=!1){const r=n.get(W),l=await i.getProperties(o);if(!l)return{data:{Entity:`${o} properties not found...`}};const p=r.relationMaps[i.uuid],u={data:{}};for(const d in l){const I=a.map(e=>typeof e=="string"?d===e:e(d)).includes(!0);if(!(d==="type"||I))continue;const g=l[d];if(g)if(g.type===5){u.children||(u.children=[]);const e=await j(n,i,g.value,a,s);u.children.push(e)}else if(typeof g=="object"&&!Array.isArray(g)){const{value:e,type:t}=g;if(s)t===1||t===2||t===3||(u.data[d]=e);else{const f=typeof e=="number"?Number(e.toFixed(3)):e;u.data[d]=f}}else if(Array.isArray(g))for(const e of g){if(e.type!==5)continue;u.children||(u.children=[]);const t=await j(n,i,e.value,a,s);u.children.push(t)}else if(d==="type"){const e=H[g];u.data.Entity=e}else u.data[d]=g}if(p&&p.get(l.expressID)){const d=p.get(l.expressID);for(const I of a){const g=[];if(typeof I=="string"){const e=r._inverseAttributes.indexOf(I);e!==-1&&g.push(e)}else{const e=r._inverseAttributes.filter(t=>I(t));for(const t of e){const f=r._inverseAttributes.indexOf(t);g.push(f)}}for(const e of g){const t=d.get(e);if(t)for(const f of t){const y=await j(n,i,f,a,s);u.children||(u.children=[]),u.children.push(y)}}}}return u}const ge=n=>{const{components:i,fragmentIdMap:o,attributesToInclude:a,editable:s,tableDefinition:r}=n,l=i.get(V);let p;return typeof a=="function"?p=a(Z):p=a,A`{if(!d)return;const I=d,g=[],e=[];for(const t in o){const f=l.list.get(t);if(!(f&&f.group))continue;const y=f.group,w=e.find(b=>b.model===y);if(w)for(const b of o[t])w.expressIDs.add(b);else{const b={model:y,expressIDs:new Set(o[t])};e.push(b)}}for(const t of e){const{model:f,expressIDs:y}=t;for(const w of y){const b=await j(i,f,w,p,s);g.push(b)}}I.dataTransform=r,I.data=g,I.columns=[{name:"Entity",width:"minmax(15rem, 1fr)"}]})}>`},he=n=>P.create(ge,n),ye=Object.freeze(Object.defineProperty({__proto__:null,entityAttributes:he},Symbol.toStringTag,{value:"Module"}));function be(n){const i=Object.keys(n).pop();return i&&n[i].length>0?n[i][0]:""}function ee(n){return n.map(i=>{const o={data:{System:be(i.filter)}};return i.children&&i.children.length>0&&(o.children=ee(i.children)),o})}const Ce=n=>{const{components:i,classifications:o}=n,a=i.get(ne),s=r=>{if(!r)return;const l=r;l.dataTransform={Actions:d=>d};const p=(d,I={})=>{const g=a.list,e=d[0],t=g[e],f=[];if(!e||!t)return f;for(const y in t){const w={...I,[e]:[y]},b=a.find(w);if(Object.keys(b).length>0){const m={filter:w};m.children=p(d.slice(1),w),f.push(m)}}return f},u=[];for(const d in o){const I=o[d],g=p(I),e=ee(g);u.push({data:{System:d},children:e})}l.data=u};return A`
-
- ${Object.keys(o).length===0?A``:A``}
-
- `},Ie=(n,i=!0)=>{const o=P.create(Ce,n);if(i){const{components:a}=n,s=a.get(V),[,r]=o;s.onFragmentsDisposed.add(()=>r())}return o},we=Object.freeze(Object.defineProperty({__proto__:null,classificationTree:Ie},Symbol.toStringTag,{value:"Module"})),xe=["OwnerHistory","ObjectPlacement","CompositionType"],z=async(n,i,o)=>{const s={...{groupName:"Attributes",includeClass:!1},...o},{groupName:r,includeClass:l}=s,p=await n.getProperties(i)??{},u={data:{Name:r}};l&&(u.children||(u.children=[]),u.children.push({data:{Name:"Class",Value:H[p.type]}}));for(const d in p){if(xe.includes(d))continue;const I=p[d];if(I&&typeof I=="object"&&!Array.isArray(I)){if(I.type===re)continue;const g={data:{Name:d,Value:I.value}};u.children||(u.children=[]),u.children.push(g)}}return u},Ne=async(n,i)=>{const o={data:{Name:"Property Sets"}};for(const a of i){const s=await n.getProperties(a);if(!s)continue;const r={data:{Name:s.Name.value}};if(s.type===J){for(const l of s.HasProperties){const{value:p}=l,u=await n.getProperties(p);if(!u)continue;const d=Object.keys(u).find(g=>g.includes("Value"));if(!(d&&u[d]))continue;const I={data:{Name:u.Name.value,Value:u[d].value}};r.children||(r.children=[]),r.children.push(I)}r.children&&(o.children||(o.children=[]),o.children.push(r))}}return o},Ae=async(n,i)=>{const o={data:{Name:"Quantity Sets"}};for(const a of i){const s=await n.getProperties(a);if(!s)continue;const r={data:{Name:s.Name.value}};if(s.type===B){for(const l of s.Quantities){const{value:p}=l,u=await n.getProperties(p);if(!u)continue;const d=Object.keys(u).find(g=>g.includes("Value"));if(!(d&&u[d]))continue;const I={data:{Name:u.Name.value,Value:u[d].value}};r.children||(r.children=[]),r.children.push(I)}r.children&&(o.children||(o.children=[]),o.children.push(r))}}return o},Se=async(n,i)=>{const o={data:{Name:"Materials"}};for(const a of i){const s=await n.getProperties(a);if(s.type===Q){const r=s.ForLayerSet.value,l=await n.getProperties(r);for(const p of l.MaterialLayers){const{value:u}=p,d=await n.getProperties(u),I=await n.getProperties(d.Material.value),g={data:{Name:"Layer"},children:[{data:{Name:"Thickness",Value:d.LayerThickness.value}},{data:{Name:"Material",Value:I.Name.value}}]};o.children||(o.children=[]),o.children.push(g)}}if(s.type===K)for(const r of s.Materials){const{value:l}=r,u={data:{Name:"Name",Value:(await n.getProperties(l)).Name.value}};o.children||(o.children=[]),o.children.push(u)}if(s.type===Y){const l={data:{Name:"Name",Value:(await n.getProperties(a)).Name.value}};o.children||(o.children=[]),o.children.push(l)}}return o},Re=async(n,i)=>{var a,s;const o={data:{Name:"Classifications"}};for(const r of i){const l=await n.getProperties(r);if(l.type===U){const{value:p}=l.ReferencedSource,d={data:{Name:(await n.getProperties(p)).Name.value},children:[{data:{Name:"Identification",Value:((a=l.Identification)==null?void 0:a.value)||((s=l.ItemReference)==null?void 0:s.value)}},{data:{Name:"Name",Value:l.Name.value}}]};o.children||(o.children=[]),o.children.push(d)}}return o},Ee=n=>{const{components:i,fragmentIdMap:o}=n,a=i.get(W),s=i.get(V);return A`{var I;if(!l)return;const p=[],u=[];for(const g in o){const e=s.list.get(g);if(!(e&&e.group))continue;const t=e.group,f=u.find(y=>y.model===t);if(f)for(const y of o[g])f.expressIDs.add(y);else{const y={model:t,expressIDs:new Set(o[g])};u.push(y)}}for(const g in u){const{model:e,expressIDs:t}=u[g],f=a.relationMaps[e.uuid];if(!f)return;for(const y of t){const w=await e.getProperties(y);if(!w)continue;const b={data:{Name:(I=w.Name)==null?void 0:I.value}};p.push(b);const c=await z(e,y,{includeClass:!0});if(b.children||(b.children=[]),b.children.push(c),!f.get(y))continue;const h=a.getEntityRelations(e,y,"IsDefinedBy");if(h){const E=h.filter(async D=>{const R=await e.getProperties(D);return R?R.type===J:!1}),O=await Ne(e,E);O.children&&b.children.push(O);const $=h.filter(async D=>{const R=await e.getProperties(D);return R?R.type===B:!1}),L=await Ae(e,$);L.children&&b.children.push(L)}const C=a.getEntityRelations(e,y,"HasAssociations");if(C){const E=C.filter(async D=>{const R=await e.getProperties(D);return R?R.type===Q||R.type===oe||R.type===ie||R.type===Y||R.type===K:!1}),O=await Se(e,E);O.children&&b.children.push(O);const $=C.filter(async D=>{const R=await e.getProperties(D);return R?R.type===U:!1}),L=await Re(e,$);L.children&&b.children.push(L)}const N=a.getEntityRelations(e,y,"ContainedInStructure");if(N){const E=N[0],O=await z(e,E,{groupName:"SpatialContainer"});b.children.push(O)}}}const d=l;d.addEventListener("cellcreated",({detail:g})=>{const e=g.cell.parentNode;if(!e)return;const t=e.querySelector("bim-table-cell[column='Name']"),f=e.querySelector("bim-table-cell[column='Value']");t&&!f&&(t.style.gridColumn="1 / -1")}),d.columns=[{name:"Name",width:"12rem"}],d.data=p})} headers-hidden>`},Oe=n=>P.create(Ee,n),De=Object.freeze(Object.defineProperty({__proto__:null,elementProperties:Oe},Symbol.toStringTag,{value:"Module"})),v=async(n,i,o,a)=>{var d;const s=[],r=n.get(W),l=await i.getProperties(o);if(!l)return s;const{type:p}=l,u={data:{Entity:H[p],Name:(d=l.Name)==null?void 0:d.value,modelID:i.uuid}};for(const I of a){const g=r.getEntityRelations(i,o,I);if(u.data.expressID=o,!!g){u.data.relations=JSON.stringify(g);for(const e of g){const t=await v(n,i,e,a);u.children||(u.children=[]),u.children.push(...t)}}}return s.push(u),s},q=(n,i)=>{const o=n.get(V),{modelID:a,expressID:s,relations:r}=i.data;if(!(a&&s))return null;const l=o.groups.get(a);return l?l.getFragmentMap([s,...JSON.parse(r??"[]")]):null},Te=n=>{const{components:i,models:o,inverseAttributes:a,expressID:s,selectHighlighterName:r,hoverHighlighterName:l}=n,p=a??["IsDecomposedBy","ContainsElements"];return A`{if(!d)return;const I=i.get(W),g=[];for(const t of o){let f;if(s)f={data:{Entity:t.name!==""?t.name:t.uuid},children:await v(i,t,s,p)};else{const y=I.relationMaps[t.uuid],w=await t.getAllPropertiesOfType(se);if(!(y&&w))continue;const{expressID:b}=Object.values(w)[0];f={data:{Entity:t.name!==""?t.name:t.uuid},children:await v(i,t,b,p)}}g.push(f)}const e=d;e.addEventListener("rowcreated",({detail:t})=>{const{row:f}=t,y=i.get(ae);f.onmouseover=()=>{if(!l)return;const w=q(i,f);w&&Object.keys(w).length!==0&&(f.style.backgroundColor="var(--bim-ui_bg-contrast-20)",y.highlightByID(l,w,!0,!1))},f.onmouseout=()=>{f.style.backgroundColor="",y.clear(l)},f.onclick=()=>{if(!r)return;const w=q(i,f);w&&Object.keys(w).length!==0&&y.highlightByID(r,w,!0,!0)}}),e.addEventListener("cellcreated",({detail:t})=>{const f=t.cell.parentNode;if(!f)return;const y=f.querySelector("bim-table-cell[column='Entity']"),w=f.querySelector("bim-table-cell[column='Name']");y&&!w&&(y.style.gridColumn="1 / -1")}),e.hiddenColumns=["modelID","expressID","relations"],e.columns=["Entity","Name"],e.data=g})} headers-hidden>`},Le=(n,i=!0)=>{const o=P.create(Te,n);if(i){const[,a]=o,{components:s}=n,r=s.get(V),l=s.get(W),p=()=>a({models:r.groups.values()});l.onRelationsIndexed.add(p),r.onFragmentsDisposed.add(p)}return o},Ve=Object.freeze(Object.defineProperty({__proto__:null,relationsTree:Le},Symbol.toStringTag,{value:"Module"})),M=(n,i)=>[...n.get(de).list.values()].find(s=>s.world===i),Pe=(n,i)=>A`
- {const s=a.target;n.color=new F(s.color)}} color=${i}>
- `,$e=(n,i)=>{const{postproduction:o}=n,a=o.n8ao.configuration;return A`
- {const l=r.target;a.color=new F(l.color)}} color=${i}>
- `},Ge=(n,i)=>{const{color:o,opacity:a}=JSON.parse(i),{postproduction:s}=n,{customEffects:r}=s;return A`
- {const{color:u,opacity:d}=p.target;r.lineColor=new F(u).getHex(),d&&(r.opacity=d/100)}} color=${o} opacity=${a*100}>
- `},Me=(n,i)=>A`
- {const s=a.target,r=new F(s.color);n.material.uniforms.uColor.value=r,console.log(n.material.uniforms)}} color=${i}>
- `,ke=(n,i)=>{const{postproduction:o}=n;return A`
- {const r=s.target;o.setPasses({ao:r.checked})}} .checked=${i}>
- `},We=(n,i)=>{const{postproduction:o}=n;return A`
- {const r=s.target;o.setPasses({gamma:r.checked})}} .checked=${i}>
- `},Fe=(n,i)=>{const{postproduction:o}=n;return A`
- {const r=s.target;o.setPasses({custom:r.checked})}} .checked=${i}>
- `},T=(n,i,o,a=()=>{})=>A`
- {const p=r.target.checked;n[i]=p,a(p)}}">
- `,x=(n,i,o,a)=>{const s={slider:!1,min:0,max:100,step:1,prefix:null,suffix:null,onInputSet:()=>{},...a},{slider:r,min:l,max:p,step:u,suffix:d,prefix:I,onInputSet:g}=s;return A`
- {const y=t.target.value;n[i]=y,g(y)}}"
- >
- `},_e=n=>{const{components:i}=n,o=i.get(X);return A`{var p,u,d,I,g;if(!s)return;const r=s;r.preserveStructureOnFilter=!0,r.dataTransform={Value:(e,t)=>{const f=t.World,y=o.list.get(f);if(!y)return e;const{scene:w,camera:b,renderer:c}=y,m=t.Name;if(m==="Grid"&&t.IsGridConfig&&typeof e=="boolean"){const h=M(i,y);return h?T(h,"visible",e):e}if(m==="Color"&&t.IsGridConfig&&typeof e=="string"){const h=M(i,y);return h?Me(h,e):e}if(m==="Distance"&&t.IsGridConfig&&typeof e=="number"){const h=M(i,y);return h?x(h.material.uniforms.uDistance,"value",e,{slider:!0,min:300,max:1e3}):e}if(m==="Size"&&t.IsGridConfig&&typeof e=="string"){const h=M(i,y);if(!h)return e;const{x:C,y:N}=JSON.parse(e),E=x(h.material.uniforms.uSize1,"value",C,{slider:!0,suffix:"m",prefix:"A",min:1,max:20}),O=x(h.material.uniforms.uSize2,"value",N,{slider:!0,suffix:"m",prefix:"B",min:1,max:20});return A`
-
- `}return m==="Custom Effects"&&t.IsCEConfig&&c instanceof S&&typeof e=="boolean"?Fe(c,e):m==="Color"&&t.IsOutlineConfig&&c instanceof S&&typeof e=="string"?Ge(c,e):m==="Tolerance"&&t.IsOutlineConfig&&c instanceof S&&typeof e=="number"?x(c.postproduction.customEffects,"tolerance",e,{slider:!0,min:0,max:6,step:.01}):m==="Outline"&&t.IsOutlineConfig&&c instanceof S&&typeof e=="boolean"?T(c.postproduction.customEffects,"outlineEnabled",e):m==="Gloss"&&t.IsGlossConfig&&c instanceof S&&typeof e=="boolean"?T(c.postproduction.customEffects,"glossEnabled",e):m==="Min"&&t.IsGlossConfig&&c instanceof S&&typeof e=="number"?x(c.postproduction.customEffects,"minGloss",e,{slider:!0,min:-.5,max:.5,step:.01}):m==="Max"&&t.IsGlossConfig&&c instanceof S&&typeof e=="number"?x(c.postproduction.customEffects,"maxGloss",e,{slider:!0,min:-.5,max:.5,step:.01}):m==="Exponent"&&t.IsGlossConfig&&c instanceof S&&typeof e=="number"?x(c.postproduction.customEffects,"glossExponent",e,{slider:!0,min:0,max:5,step:.01}):m==="Gamma Correction"&&t.IsGammaConfig&&c instanceof S&&typeof e=="boolean"?We(c,e):e}},r.addEventListener("cellcreated",({detail:e})=>{const t=e.cell.parentNode;if(!t)return;const f=t.querySelector("bim-table-cell[column='Name']"),y=t.querySelector("bim-table-cell[column='Value']");f&&!y&&(f.style.gridColumn="1 / -1")});const l=[];for(const[,e]of o.list){const{scene:t,camera:f,renderer:y}=e,w=M(i,e),b={data:{Name:e instanceof ce&&e.name||e.uuid},children:[]};if(t){const c={data:{Name:"Scene"}};if(w){const C={data:{Name:"Grid",Value:w.three.visible,World:e.uuid,IsGridConfig:!0},children:[{data:{Name:"Color",get Value(){return`#${w.material.uniforms.uColor.value.getHexString()}`},World:e.uuid,IsGridConfig:!0}},{data:{Name:"Size",get Value(){const N=w.material.uniforms.uSize1.value,E=w.material.uniforms.uSize2.value;return JSON.stringify({x:N,y:E})},World:e.uuid,IsGridConfig:!0}},{data:{Name:"Distance",Value:w.material.uniforms.uDistance.value,World:e.uuid,IsGridConfig:!0}}]};c.children||(c.children=[]),c.children.push(C)}const m=t.three.children.filter(C=>C instanceof le);for(const C of m){const N={data:{Name:"Directional Light",Value:C.visible,World:e.uuid,Light:C.uuid},children:[{data:{Name:"Position",Value:JSON.stringify(C.position),World:e.uuid,Light:C.uuid}},{data:{Name:"Intensity",Value:C.intensity,World:e.uuid,Light:C.uuid}},{data:{Name:"Color",Value:`#${C.color.getHexString()}`,World:e.uuid,Light:C.uuid}}]};c.children||(c.children=[]),c.children.push(N)}const h=t.three.children.filter(C=>C instanceof ue);for(const C of h){const N={data:{Name:"Ambient Light",Value:C.visible,World:e.uuid,Light:C.uuid},children:[{data:{Name:"Intensity",Value:C.intensity,World:e.uuid,Light:C.uuid}},{data:{Name:"Color",Value:`#${C.color.getHexString()}`,World:e.uuid,Light:C.uuid}}]};c.children||(c.children=[]),c.children.push(N)}c.children&&((p=c.children)==null?void 0:p.length)>0&&((u=b.children)==null||u.push(c))}if(f.three instanceof _){const c={data:{Name:"Perspective Camera"},children:[{data:{Name:"Near Frustum",Value:f.three.near,World:e.uuid}},{data:{Name:"Far Frustum",Value:f.three.far,World:e.uuid}},{data:{Name:"Field of View",Value:f.three.fov,World:e.uuid}}]};if(f.hasCameraControls()){const{controls:m}=f,h={dollyDragInverted:"Invert Drag",dollySpeed:"Dolly Speed",truckSpeed:"Truck Speed",smoothTime:"Smooth Time"};for(const C in h){const N=m[C];N!=null&&((d=c.children)==null||d.push({data:{Name:h[C],Value:N,World:e.uuid}}))}}(I=b.children)==null||I.push(c)}if(y instanceof S){const{postproduction:c}=y,m=c.n8ao.configuration,h={data:{Name:"Renderer"},children:[{data:{Name:"Gamma Correction",Value:c.settings.gamma??!1,World:e.uuid,IsGammaConfig:!0}},{data:{Name:"Ambient Oclussion",Value:c.settings.ao??!1,World:e.uuid,IsAOConfig:!0},children:[{data:{Name:"Samples",Value:m.aoSamples,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Color",Value:`#${m.color.getHexString()}`,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Half Resolution",Value:m.halfRes,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Screen Space Radius",Value:m.screenSpaceRadius,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Radius",Value:m.aoRadius,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Intensity",Value:m.intensity,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Distance Falloff",Value:m.distanceFalloff,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Denoise Samples",Value:m.denoiseSamples,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Denoise Radius",Value:m.denoiseRadius,World:e.uuid,IsAOConfig:!0}}]},{data:{Name:"Custom Effects",Value:c.settings.custom??!1,World:e.uuid,IsCEConfig:!0},children:[{data:{Name:"Gloss",Value:c.customEffects.glossEnabled,World:e.uuid,IsGlossConfig:!0},children:[{data:{Name:"Min",Value:c.customEffects.minGloss,World:e.uuid,IsGlossConfig:!0}},{data:{Name:"Max",Value:c.customEffects.maxGloss,World:e.uuid,IsGlossConfig:!0}},{data:{Name:"Exponent",Value:c.customEffects.glossExponent,World:e.uuid,IsGlossConfig:!0}}]},{data:{Name:"Outline",Value:c.customEffects.outlineEnabled,World:e.uuid,IsOutlineConfig:!0},children:[{data:{Name:"Color",get Value(){const C=new F(c.customEffects.lineColor),N=c.customEffects.opacity;return JSON.stringify({color:`#${C.getHexString()}`,opacity:N})},World:e.uuid,IsOutlineConfig:!0}},{data:{Name:"Tolerance",Value:c.customEffects.tolerance,World:e.uuid,IsOutlineConfig:!0}}]}]}]};(g=b.children)==null||g.push(h)}l.push(b)}r.columns=[{name:"Name",width:"11rem"}],r.hiddenColumns=["World","Light","IsAOConfig","IsCEConfig","IsGlossConfig","IsOutlineConfig","IsGammaConfig","IsGridConfig"],r.data=l})} headers-hidden expanded>`},je=(n,i=!0)=>{const o=P.create(_e,n);if(i){const[a]=o,s=()=>o[1](),{components:r}=n,l=r.get(X);l.onDisposed.add(a.remove);for(const[,p]of l.list)p.onDisposed.add(s);a.addEventListener("disconnected",()=>{l.onDisposed.remove(a.remove);for(const[,p]of l.list)p.onDisposed.remove(s)})}return o},ve=Object.freeze(Object.defineProperty({__proto__:null,worldsConfiguration:je},Symbol.toStringTag,{value:"Module"})),ze={...pe,...ye,...we,...De,...Ve,...ve};export{ze as t};
diff --git a/examples/assets/index-CAZguOLS.js b/examples/assets/index-CAZguOLS.js
new file mode 100644
index 00000000..27da662b
--- /dev/null
+++ b/examples/assets/index-CAZguOLS.js
@@ -0,0 +1,43 @@
+import{b as V,h as w,J as $,l as R,W as _,j as J,A as B,q,r as K,C as P,P as T,s as E,x as O,t as Q,v as X,w as Y,g as L,u as Z}from"./template-DtWW1qyz.js";const U=o=>{const{components:i}=o,s=i.get(V),a=document.createElement("bim-table");a.columns=["Model"],a.headersHidden=!0;const l=[];for(const[,r]of s.groups){if(!r)continue;const f={data:{Model:r.name||r.uuid,Actions:r.uuid}};l.push(f)}return a.dataTransform={Actions:r=>{if(typeof r!="string")return r;const f=s.groups.get(r);return f?w`
+ {f.visible=!f.visible;const S=m.target;S.icon=f.visible?"mdi:eye":"mdi:eye-off"}} icon="mdi:eye">
+ s.disposeGroup(f)} icon="mdi:delete">
+ `:r}},a.columns=["Model",{name:"Actions",width:"auto"}],a.data=l,w`
+
+ ${l.length===0?w`No models has been loaded yet`:a}
+
+ `},v=(o,i=!0)=>{const s=$.create(U,o);if(i){const{components:a}=o,l=a.get(V),[,r]=s;l.onFragmentsLoaded.add(()=>setTimeout(()=>r())),l.onFragmentsDisposed.add(()=>r())}return s},ee=Object.freeze(Object.defineProperty({__proto__:null,modelsList:v},Symbol.toStringTag,{value:"Module"})),j=["Name","ContainedInStructure","ForLayerSet","LayerThickness","HasProperties","HasAssociations","HasAssignments","HasPropertySets","PredefinedType","Quantities","ReferencedSource","Identification",o=>o.includes("Value"),o=>o.startsWith("Material"),o=>o.startsWith("Relating"),o=>{const i=["IsGroupedBy","IsDecomposedBy"];return o.startsWith("Is")&&!i.includes(o)}];async function D(o,i,s,a=j,l=!1){const r=o.get(_),f=await i.getProperties(s);if(!f)return{data:{Entity:`${s} properties not found...`}};const g=r.relationMaps[i.uuid],b={data:{}};for(const m in f){const S=a.map(e=>typeof e=="string"?m===e:e(m)).includes(!0);if(!(m==="type"||S))continue;const y=f[m];if(y)if(y.type===5){b.children||(b.children=[]);const e=await D(o,i,y.value,a,l);b.children.push(e)}else if(typeof y=="object"&&!Array.isArray(y)){const{value:e,type:t}=y;if(l)t===1||t===2||t===3||(b.data[m]=e);else{const h=typeof e=="number"?Number(e.toFixed(3)):e;b.data[m]=h}}else if(Array.isArray(y))for(const e of y){if(e.type!==5)continue;b.children||(b.children=[]);const t=await D(o,i,e.value,a,l);b.children.push(t)}else if(m==="type"){const e=J[y];b.data.Entity=e}else b.data[m]=y}if(g&&g.get(f.expressID)){const m=g.get(f.expressID);for(const S of a){const y=[];if(typeof S=="string"){const e=r._inverseAttributes.indexOf(S);e!==-1&&y.push(e)}else{const e=r._inverseAttributes.filter(t=>S(t));for(const t of e){const h=r._inverseAttributes.indexOf(t);y.push(h)}}for(const e of y){const t=m.get(e);if(t)for(const h of t){const C=await D(o,i,h,a,l);b.children||(b.children=[]),b.children.push(C)}}}}return b}const te=o=>{const{components:i,fragmentIdMap:s,attributesToInclude:a,editable:l,tableDefinition:r}=o,f=i.get(V);let g;return typeof a=="function"?g=a(j):g=a,w`{if(!m)return;const S=m,y=[],e=[];for(const t in s){const h=f.list.get(t);if(!(h&&h.group))continue;const C=h.group,x=e.find(p=>p.model===C);if(x)for(const p of s[t])x.expressIDs.add(p);else{const p={model:C,expressIDs:new Set(s[t])};e.push(p)}}for(const t of e){const{model:h,expressIDs:C}=t;for(const x of C){const p=await D(i,h,x,g,l);y.push(p)}}S.dataTransform=r,S.data=y,S.columns=[{name:"Entity",width:"minmax(15rem, 1fr)"}]})}>`},ne=o=>$.create(te,o),oe=Object.freeze(Object.defineProperty({__proto__:null,entityAttributes:ne},Symbol.toStringTag,{value:"Module"}));function ie(o){const i=Object.keys(o).pop();return i&&o[i].length>0?o[i][0]:""}function M(o){return o.map(i=>{const s={data:{System:ie(i.filter)}};return i.children&&i.children.length>0&&(s.children=M(i.children)),s})}const re=o=>{const{components:i,classifications:s}=o,a=i.get(B),l=r=>{if(!r)return;const f=r;f.dataTransform={Actions:m=>m};const g=(m,S={})=>{const y=a.list,e=m[0],t=y[e],h=[];if(!e||!t)return h;for(const C in t){const x={...S,[e]:[C]},p=a.find(x);if(Object.keys(p).length>0){const c={filter:x};c.children=g(m.slice(1),x),h.push(c)}}return h},b=[];for(const m in s){const S=s[m],y=g(S),e=M(y);b.push({data:{System:m},children:e})}f.data=b};return w`
+