@hatiolab/things-scene 10.0.0-beta.132 → 10.0.0-beta.133

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hatiolab/things-scene",
3
- "version": "10.0.0-beta.132",
3
+ "version": "10.0.0-beta.133",
4
4
  "description": "A high-performance 2D/3D scene graph library for building interactive visual editors, combining HTML5 Canvas and Three.js to enable facility visualization, data-driven animations, and real-time monitoring dashboards",
5
5
  "main": "things-scene-min.js",
6
6
  "module": "things-scene.mjs",
@@ -16,7 +16,7 @@ const Wf=globalThis,Uf=Wf.ShadowRoot&&(void 0===Wf.ShadyCSS||Wf.ShadyCSS.nativeS
16
16
  * Copyright 2017 Google LLC
17
17
  * SPDX-License-Identifier: BSD-3-Clause
18
18
  */
19
- const pg=globalThis,fg=t=>t,gg=pg.trustedTypes,mg=gg?gg.createPolicy("lit-html",{createHTML:t=>t}):void 0,yg="$lit$",bg=`lit$${Math.random().toFixed(9).slice(2)}$`,_g="?"+bg,vg=`<${_g}>`,xg=document,wg=()=>xg.createComment(""),Sg=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Mg=Array.isArray,Ag="[ \t\n\f\r]",kg=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Eg=/-->/g,Cg=/>/g,Tg=RegExp(`>|${Ag}(?:([^\\s"'>=/]+)(${Ag}*=${Ag}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Pg=/'/g,Og=/"/g,Dg=/^(?:script|style|textarea|title)$/i,Ig=(t=>(e,...n)=>({_$litType$:t,strings:e,values:n}))(1),zg=Symbol.for("lit-noChange"),Rg=Symbol.for("lit-nothing"),Lg=new WeakMap,jg=xg.createTreeWalker(xg,129);function Fg(t,e){if(!Mg(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==mg?mg.createHTML(e):e}const Hg=(t,e)=>{const n=t.length-1,i=[];let r,s=2===e?"<svg>":3===e?"<math>":"",o=kg;for(let e=0;e<n;e++){const n=t[e];let a,c,l=-1,h=0;for(;h<n.length&&(o.lastIndex=h,c=o.exec(n),null!==c);)h=o.lastIndex,o===kg?"!--"===c[1]?o=Eg:void 0!==c[1]?o=Cg:void 0!==c[2]?(Dg.test(c[2])&&(r=RegExp("</"+c[2],"g")),o=Tg):void 0!==c[3]&&(o=Tg):o===Tg?">"===c[0]?(o=r??kg,l=-1):void 0===c[1]?l=-2:(l=o.lastIndex-c[2].length,a=c[1],o=void 0===c[3]?Tg:'"'===c[3]?Og:Pg):o===Og||o===Pg?o=Tg:o===Eg||o===Cg?o=kg:(o=Tg,r=void 0);const d=o===Tg&&t[e+1].startsWith("/>")?" ":"";s+=o===kg?n+vg:l>=0?(i.push(a),n.slice(0,l)+yg+n.slice(l)+bg+d):n+bg+(-2===l?e:d)}return[Fg(t,s+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class Ng{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let r=0,s=0;const o=t.length-1,a=this.parts,[c,l]=Hg(t,e);if(this.el=Ng.createElement(c,n),jg.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=jg.nextNode())&&a.length<o;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(yg)){const e=l[s++],n=i.getAttribute(t).split(bg),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:o[2],strings:n,ctor:"."===o[1]?$g:"?"===o[1]?Wg:"@"===o[1]?Ug:Vg}),i.removeAttribute(t)}else t.startsWith(bg)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(Dg.test(i.tagName)){const t=i.textContent.split(bg),e=t.length-1;if(e>0){i.textContent=gg?gg.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],wg()),jg.nextNode(),a.push({type:2,index:++r});i.append(t[e],wg())}}}else if(8===i.nodeType)if(i.data===_g)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(bg,t+1));)a.push({type:7,index:r}),t+=bg.length-1}r++}}static createElement(t,e){const n=xg.createElement("template");return n.innerHTML=t,n}}function Bg(t,e,n=t,i){if(e===zg)return e;let r=void 0!==i?n._$Co?.[i]:n._$Cl;const s=Sg(e)?void 0:e._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),void 0===s?r=void 0:(r=new s(t),r._$AT(t,n,i)),void 0!==i?(n._$Co??=[])[i]=r:n._$Cl=r),void 0!==r&&(e=Bg(t,r._$AS(t,e.values),r,i)),e}class Yg{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,i=(t?.creationScope??xg).importNode(e,!0);jg.currentNode=i;let r=jg.nextNode(),s=0,o=0,a=n[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new Gg(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new Xg(r,this,t)),this._$AV.push(e),a=n[++o]}s!==a?.index&&(r=jg.nextNode(),s++)}return jg.currentNode=xg,i}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class Gg{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,i){this.type=2,this._$AH=Rg,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Bg(this,t,e),Sg(t)?t===Rg||null==t||""===t?(this._$AH!==Rg&&this._$AR(),this._$AH=Rg):t!==this._$AH&&t!==zg&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>Mg(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Rg&&Sg(this._$AH)?this._$AA.nextSibling.data=t:this.T(xg.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,i="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=Ng.createElement(Fg(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Yg(i,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=Lg.get(t.strings);return void 0===e&&Lg.set(t.strings,e=new Ng(t)),e}k(t){Mg(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,i=0;for(const r of t)i===e.length?e.push(n=new Gg(this.O(wg()),this.O(wg()),this,this.options)):n=e[i],n._$AI(r),i++;i<e.length&&(this._$AR(n&&n._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=fg(t).nextSibling;fg(t).remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Vg{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,i,r){this.type=1,this._$AH=Rg,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Rg}_$AI(t,e=this,n,i){const r=this.strings;let s=!1;if(void 0===r)t=Bg(this,t,e,0),s=!Sg(t)||t!==this._$AH&&t!==zg,s&&(this._$AH=t);else{const i=t;let o,a;for(t=r[0],o=0;o<r.length-1;o++)a=Bg(this,i[n+o],e,o),a===zg&&(a=this._$AH[o]),s||=!Sg(a)||a!==this._$AH[o],a===Rg?t=Rg:t!==Rg&&(t+=(a??"")+r[o+1]),this._$AH[o]=a}s&&!i&&this.j(t)}j(t){t===Rg?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class $g extends Vg{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Rg?void 0:t}}class Wg extends Vg{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Rg)}}class Ug extends Vg{constructor(t,e,n,i,r){super(t,e,n,i,r),this.type=5}_$AI(t,e=this){if((t=Bg(this,t,e,0)??Rg)===zg)return;const n=this._$AH,i=t===Rg&&n!==Rg||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==Rg&&(n===Rg||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Xg{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Bg(this,t)}}const qg=pg.litHtmlPolyfillSupport;qg?.(Ng,Gg),(pg.litHtmlVersions??=[]).push("3.3.2");const Kg=(t,e,n)=>{const i=n?.renderBefore??e;let r=i._$litPart$;if(void 0===r){const t=n?.renderBefore??null;i._$litPart$=r=new Gg(e.insertBefore(wg(),t),t,void 0,n??{})}return r._$AI(t),r
19
+ const pg=globalThis,fg=t=>t,gg=pg.trustedTypes,mg=gg?gg.createPolicy("lit-html",{createHTML:t=>t}):void 0,yg="$lit$",bg=`lit$${Math.random().toFixed(9).slice(2)}$`,_g="?"+bg,vg=`<${_g}>`,xg=document,wg=()=>xg.createComment(""),Sg=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Mg=Array.isArray,Ag="[ \t\n\f\r]",kg=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Eg=/-->/g,Cg=/>/g,Tg=RegExp(`>|${Ag}(?:([^\\s"'>=/]+)(${Ag}*=${Ag}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Pg=/'/g,Og=/"/g,Dg=/^(?:script|style|textarea|title)$/i,Ig=(t=>(e,...n)=>({_$litType$:t,strings:e,values:n}))(1),zg=Symbol.for("lit-noChange"),Rg=Symbol.for("lit-nothing"),Lg=new WeakMap,jg=xg.createTreeWalker(xg,129);function Fg(t,e){if(!Mg(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==mg?mg.createHTML(e):e}const Hg=(t,e)=>{const n=t.length-1,i=[];let r,s=2===e?"<svg>":3===e?"<math>":"",o=kg;for(let e=0;e<n;e++){const n=t[e];let a,c,l=-1,h=0;for(;h<n.length&&(o.lastIndex=h,c=o.exec(n),null!==c);)h=o.lastIndex,o===kg?"!--"===c[1]?o=Eg:void 0!==c[1]?o=Cg:void 0!==c[2]?(Dg.test(c[2])&&(r=RegExp("</"+c[2],"g")),o=Tg):void 0!==c[3]&&(o=Tg):o===Tg?">"===c[0]?(o=r??kg,l=-1):void 0===c[1]?l=-2:(l=o.lastIndex-c[2].length,a=c[1],o=void 0===c[3]?Tg:'"'===c[3]?Og:Pg):o===Og||o===Pg?o=Tg:o===Eg||o===Cg?o=kg:(o=Tg,r=void 0);const d=o===Tg&&t[e+1].startsWith("/>")?" ":"";s+=o===kg?n+vg:l>=0?(i.push(a),n.slice(0,l)+yg+n.slice(l)+bg+d):n+bg+(-2===l?e:d)}return[Fg(t,s+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class Ng{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let r=0,s=0;const o=t.length-1,a=this.parts,[c,l]=Hg(t,e);if(this.el=Ng.createElement(c,n),jg.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=jg.nextNode())&&a.length<o;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(yg)){const e=l[s++],n=i.getAttribute(t).split(bg),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:o[2],strings:n,ctor:"."===o[1]?$g:"?"===o[1]?Wg:"@"===o[1]?Ug:Vg}),i.removeAttribute(t)}else t.startsWith(bg)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(Dg.test(i.tagName)){const t=i.textContent.split(bg),e=t.length-1;if(e>0){i.textContent=gg?gg.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],wg()),jg.nextNode(),a.push({type:2,index:++r});i.append(t[e],wg())}}}else if(8===i.nodeType)if(i.data===_g)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(bg,t+1));)a.push({type:7,index:r}),t+=bg.length-1}r++}}static createElement(t,e){const n=xg.createElement("template");return n.innerHTML=t,n}}function Bg(t,e,n=t,i){if(e===zg)return e;let r=void 0!==i?n._$Co?.[i]:n._$Cl;const s=Sg(e)?void 0:e._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),void 0===s?r=void 0:(r=new s(t),r._$AT(t,n,i)),void 0!==i?(n._$Co??=[])[i]=r:n._$Cl=r),void 0!==r&&(e=Bg(t,r._$AS(t,e.values),r,i)),e}class Yg{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,i=(t?.creationScope??xg).importNode(e,!0);jg.currentNode=i;let r=jg.nextNode(),s=0,o=0,a=n[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new Gg(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new Xg(r,this,t)),this._$AV.push(e),a=n[++o]}s!==a?.index&&(r=jg.nextNode(),s++)}return jg.currentNode=xg,i}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class Gg{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,i){this.type=2,this._$AH=Rg,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Bg(this,t,e),Sg(t)?t===Rg||null==t||""===t?(this._$AH!==Rg&&this._$AR(),this._$AH=Rg):t!==this._$AH&&t!==zg&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>Mg(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Rg&&Sg(this._$AH)?this._$AA.nextSibling.data=t:this.T(xg.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,i="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=Ng.createElement(Fg(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Yg(i,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=Lg.get(t.strings);return void 0===e&&Lg.set(t.strings,e=new Ng(t)),e}k(t){Mg(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,i=0;for(const r of t)i===e.length?e.push(n=new Gg(this.O(wg()),this.O(wg()),this,this.options)):n=e[i],n._$AI(r),i++;i<e.length&&(this._$AR(n&&n._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=fg(t).nextSibling;fg(t).remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Vg{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,i,r){this.type=1,this._$AH=Rg,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Rg}_$AI(t,e=this,n,i){const r=this.strings;let s=!1;if(void 0===r)t=Bg(this,t,e,0),s=!Sg(t)||t!==this._$AH&&t!==zg,s&&(this._$AH=t);else{const i=t;let o,a;for(t=r[0],o=0;o<r.length-1;o++)a=Bg(this,i[n+o],e,o),a===zg&&(a=this._$AH[o]),s||=!Sg(a)||a!==this._$AH[o],a===Rg?t=Rg:t!==Rg&&(t+=(a??"")+r[o+1]),this._$AH[o]=a}s&&!i&&this.j(t)}j(t){t===Rg?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class $g extends Vg{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Rg?void 0:t}}class Wg extends Vg{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Rg)}}class Ug extends Vg{constructor(t,e,n,i,r){super(t,e,n,i,r),this.type=5}_$AI(t,e=this){if((t=Bg(this,t,e,0)??Rg)===zg)return;const n=this._$AH,i=t===Rg&&n!==Rg||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==Rg&&(n===Rg||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Xg{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Bg(this,t)}}const qg=pg.litHtmlPolyfillSupport;qg?.(Ng,Gg),(pg.litHtmlVersions??=[]).push("3.3.3");const Kg=(t,e,n)=>{const i=n?.renderBefore??e;let r=i._$litPart$;if(void 0===r){const t=n?.renderBefore??null;i._$litPart$=r=new Gg(e.insertBefore(wg(),t),t,void 0,n??{})}return r._$AI(t),r
20
20
  /**
21
21
  * @license
22
22
  * Copyright 2017 Google LLC