aptechka 0.79.0 → 0.80.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/lib/{Animation-BDEX44-i.js → Animation-C4tLEBGM.js} +2 -2
  2. package/lib/{Animation-hZcAchp_.cjs → Animation-jmvFcNfM.cjs} +1 -1
  3. package/lib/Composed-BB1MtFiT.js +70 -0
  4. package/lib/Composed-CSeUTRCg.cjs +1 -0
  5. package/lib/{Damped-z9Uaw2MJ.cjs → Damped-77Urmi3q.cjs} +1 -1
  6. package/lib/{Damped-CtQmJ52v.js → Damped-DVG5nrYV.js} +2 -2
  7. package/lib/DerivedArray-B8A0-8uT.cjs +1 -0
  8. package/lib/DerivedArray-D3scYQdp.js +59 -0
  9. package/lib/{DragControls-K67-diF5.cjs → DragControls-BlL26P1V.cjs} +1 -1
  10. package/lib/{DragControls-DyIrD3GV.js → DragControls-Cm_88cLt.js} +4 -4
  11. package/lib/{SourceElement-VVdVc1d-.cjs → SourceElement-BBfaAgwe.cjs} +1 -1
  12. package/lib/{SourceElement-BnMxiOqY.js → SourceElement-BiNNtaz9.js} +2 -2
  13. package/lib/Store-1JrMCgdX.cjs +1 -0
  14. package/lib/{Store-0BVty6AZ.js → Store-BtVtCGLk.js} +52 -35
  15. package/lib/{Tweened-BlZB0vl4.js → Tweened-C1lnK6n9.js} +2 -2
  16. package/lib/{Tweened-mvHucL4Y.cjs → Tweened-CXQrFQth.cjs} +1 -1
  17. package/lib/{Viewport-DB0qAZPJ.cjs → Viewport-Cx50Hufs.cjs} +1 -1
  18. package/lib/{Viewport-DA10iWAO.js → Viewport-DbN_JWBM.js} +2 -2
  19. package/lib/accordion/index.cjs +1 -1
  20. package/lib/accordion/index.js +1 -1
  21. package/lib/animation/index.cjs +1 -1
  22. package/lib/animation/index.js +3 -3
  23. package/lib/attribute/index.cjs +1 -1
  24. package/lib/attribute/index.js +3 -3
  25. package/lib/billboard/index.cjs +1 -1
  26. package/lib/billboard/index.js +2 -2
  27. package/lib/canvas/index.cjs +1 -1
  28. package/lib/canvas/index.js +2 -2
  29. package/lib/connector/index.cjs +1 -1
  30. package/lib/connector/index.js +2 -1
  31. package/lib/controls/index.cjs +1 -1
  32. package/lib/controls/index.js +1 -1
  33. package/lib/css-property/index.cjs +1 -1
  34. package/lib/css-property/index.js +3 -3
  35. package/lib/css-value-parser/index.cjs +1 -1
  36. package/lib/css-value-parser/index.js +1 -1
  37. package/lib/dev/index.cjs +1 -1
  38. package/lib/dev/index.js +2 -2
  39. package/lib/device/index.cjs +1 -1
  40. package/lib/device/index.js +1 -1
  41. package/lib/{dom-CVWzyXPH.js → dom-fgxIeFxm.js} +22 -7
  42. package/lib/dom-hTEdqeoj.cjs +1 -0
  43. package/lib/element-linked-store/index.cjs +1 -1
  44. package/lib/element-linked-store/index.js +2 -2
  45. package/lib/element-resizer/index.cjs +1 -1
  46. package/lib/element-resizer/index.js +2 -2
  47. package/lib/en3/index.cjs +1 -1
  48. package/lib/en3/index.js +2 -2
  49. package/lib/iframe/index.cjs +1 -1
  50. package/lib/iframe/index.js +3 -3
  51. package/lib/image/index.cjs +1 -1
  52. package/lib/image/index.js +4 -4
  53. package/lib/{index-DekP7OZe.cjs → index-CKTweR3M.cjs} +1 -1
  54. package/lib/{index-Bv9zgfdb.js → index-JqYHGoo6.js} +1 -1
  55. package/lib/intersector/index.cjs +1 -1
  56. package/lib/intersector/index.js +2 -2
  57. package/lib/jsx/ComponentElement.d.ts +13 -0
  58. package/lib/jsx/h.d.ts +3 -0
  59. package/lib/jsx/hooks/common.d.ts +1 -0
  60. package/lib/jsx/hooks/component/lifecycle.d.ts +4 -0
  61. package/lib/jsx/hooks/component/useInternals.d.ts +2 -0
  62. package/lib/jsx/hooks/component/useShadow.d.ts +2 -0
  63. package/lib/jsx/hooks/component/useStylesheet.d.ts +8 -0
  64. package/lib/jsx/hooks/store.d.ts +8 -0
  65. package/lib/jsx/index.cjs +1 -0
  66. package/lib/jsx/index.d.ts +9 -0
  67. package/lib/jsx/index.js +140 -0
  68. package/lib/jsx/render.d.ts +1 -0
  69. package/lib/jsx/type.d.ts +224 -0
  70. package/lib/jsx/utils/attributes/class.d.ts +5 -0
  71. package/lib/jsx/utils/attributes/setAttributes.d.ts +2 -0
  72. package/lib/jsx/utils/attributes/style.d.ts +6 -0
  73. package/lib/jsx/utils/children/filterChildren.d.ts +2 -0
  74. package/lib/jsx/utils/children/findTextNode.d.ts +1 -0
  75. package/lib/jsx/utils/children/removeChildren.d.ts +1 -0
  76. package/lib/jsx/utils/children/storeChildren.d.ts +2 -0
  77. package/lib/jsx/utils/elementStoreSubscription.d.ts +2 -0
  78. package/lib/ladder/index.cjs +1 -1
  79. package/lib/ladder/index.js +2 -2
  80. package/lib/layout-box/index.cjs +1 -1
  81. package/lib/layout-box/index.js +2 -2
  82. package/lib/loading/index.cjs +1 -1
  83. package/lib/loading/index.js +1 -1
  84. package/lib/masonry-layout/index.cjs +1 -1
  85. package/lib/masonry-layout/index.js +2 -2
  86. package/lib/media/index.cjs +1 -1
  87. package/lib/media/index.js +2 -2
  88. package/lib/morph/Morph.d.ts +3 -21
  89. package/lib/morph/index.cjs +1 -1
  90. package/lib/morph/index.js +3 -3
  91. package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +1 -1
  92. package/lib/need_redo_tweaker/index.cjs +1 -1
  93. package/lib/need_redo_tweaker/index.js +8 -8
  94. package/lib/pixel-perfect/index.cjs +1 -1
  95. package/lib/pixel-perfect/index.js +3 -3
  96. package/lib/pointer/index.cjs +1 -1
  97. package/lib/pointer/index.js +4 -4
  98. package/lib/popover/index.cjs +1 -1
  99. package/lib/popover/index.js +3 -3
  100. package/lib/radio/index.cjs +1 -1
  101. package/lib/radio/index.js +1 -1
  102. package/lib/render-BCEBRfHS.js +196 -0
  103. package/lib/render-Rv0UMACs.cjs +1 -0
  104. package/lib/router/Link.d.ts +3 -1
  105. package/lib/router/Route.d.ts +9 -10
  106. package/lib/router/Router.d.ts +13 -13
  107. package/lib/router/index.cjs +1 -1
  108. package/lib/router/index.d.ts +2 -2
  109. package/lib/router/index.js +267 -216
  110. package/lib/scroll/index.cjs +1 -1
  111. package/lib/scroll/index.js +8 -8
  112. package/lib/{scroll-DNGJVxa2.js → scroll-7JSxRKFK.js} +2 -2
  113. package/lib/{scroll-CIdNtj3G.cjs → scroll-DxcPU0vk.cjs} +1 -1
  114. package/lib/scroll-entries/index.cjs +1 -1
  115. package/lib/scroll-entries/index.js +1 -1
  116. package/lib/scroll-kit/index.cjs +1 -1
  117. package/lib/scroll-kit/index.js +4 -4
  118. package/lib/sequence/index.cjs +1 -1
  119. package/lib/sequence/index.js +3 -3
  120. package/lib/size-element/index.cjs +1 -1
  121. package/lib/size-element/index.js +1 -1
  122. package/lib/slicer/SlicerElement.d.ts +1 -1
  123. package/lib/slicer/index.cjs +1 -1
  124. package/lib/slicer/index.js +13 -13
  125. package/lib/source/index.cjs +1 -1
  126. package/lib/source/index.js +1 -1
  127. package/lib/store/DerivedArray.d.ts +11 -1
  128. package/lib/store/Store.d.ts +5 -0
  129. package/lib/store/index.cjs +1 -1
  130. package/lib/store/index.js +10 -87
  131. package/lib/{stylesheet-HWF2a3nr.cjs → stylesheet-BcwbfhBp.cjs} +1 -1
  132. package/lib/{stylesheet-DpnWNVyD.js → stylesheet-JlRFfJIc.js} +1 -1
  133. package/lib/ticker/index.cjs +1 -1
  134. package/lib/ticker/index.js +2 -2
  135. package/lib/url-C2kASACG.cjs +1 -0
  136. package/lib/{url-Ddgqz4Q_.js → url-CGbjOTU4.js} +17 -17
  137. package/lib/utils/dom.d.ts +2 -0
  138. package/lib/utils/index.cjs +1 -1
  139. package/lib/utils/index.js +102 -100
  140. package/lib/utils/url.d.ts +3 -2
  141. package/lib/video/index.cjs +1 -1
  142. package/lib/video/index.js +3 -3
  143. package/lib/window-resizer/index.cjs +1 -1
  144. package/lib/window-resizer/index.js +1 -1
  145. package/lib/youtube/index.cjs +1 -1
  146. package/lib/youtube/index.js +3 -3
  147. package/package.json +21 -11
  148. package/lib/Store-Cd1GlEmZ.cjs +0 -1
  149. package/lib/dom-JBOkFLTh.cjs +0 -1
  150. package/lib/url-VIZgwj_h.cjs +0 -1
@@ -3,10 +3,10 @@ var d = (e) => {
3
3
  };
4
4
  var m = (e, s, t) => s.has(e) || d("Cannot " + t);
5
5
  var r = (e, s, t) => (m(e, s, "read from private field"), t ? t.call(e) : s.get(e)), c = (e, s, t) => s.has(e) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), a = (e, s, t, h) => (m(e, s, "write to private field"), h ? h.call(e, t) : s.set(e, t), t), v = (e, s, t) => (m(e, s, "access private method"), t);
6
- import { S as y } from "../Store-0BVty6AZ.js";
6
+ import { S as y } from "../Store-BtVtCGLk.js";
7
7
  import { p as S } from "../attributes-69we3byR.js";
8
- import { i as w } from "../index-Bv9zgfdb.js";
9
- import { g as x } from "../dom-CVWzyXPH.js";
8
+ import { i as w } from "../index-JqYHGoo6.js";
9
+ import { g as x } from "../dom-fgxIeFxm.js";
10
10
  import "construct-style-sheets-polyfill";
11
11
  var i, u, n, b, o, p;
12
12
  class V extends y {
@@ -1 +1 @@
1
- "use strict";var ht=h=>{throw TypeError(h)};var st=(h,n,e)=>n.has(h)||ht("Cannot "+e);var t=(h,n,e)=>(st(h,n,"read from private field"),e?e.call(h):n.get(h)),s=(h,n,e)=>n.has(h)?ht("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(h):n.set(h,e),l=(h,n,e,i)=>(st(h,n,"write to private field"),i?i.call(h,e):n.set(h,e),e),c=(h,n,e)=>(st(h,n,"access private method"),e);var z=(h,n,e)=>new Promise((i,r)=>{var a=B=>{try{tt(e.next(B))}catch(et){r(et)}},y=B=>{try{tt(e.throw(B))}catch(et){r(et)}},tt=B=>B.done?i(B.value):Promise.resolve(B.value).then(a,y);tt((e=e.apply(h,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../index-DekP7OZe.cjs"),rt=require("../custom-elements-Dh4TWRDJ.cjs"),Z=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");const M=require("../css-property/index.cjs"),pt=require("../events-KVanG9sR.cjs"),gt=require("../gestures-C7gbKx11.cjs"),vt=require("../math-GDWEqu7y.cjs"),lt=require("../number-ChAm68cm.cjs");var m,I,R,f,ot,ct,ut,it;class at{constructor(n,e){s(this,f);s(this,m);s(this,I,null);s(this,R,!1);this.element=n,l(this,m,e)}destroy(){c(this,f,it).call(this)}updateClasses(n){const e=n===t(this,m).counter;t(this,R)&&!e?this.element.classList.add("was-current"):this.element.classList.remove("was-current");const i=this.element.classList.contains("current-active");c(this,f,ut).call(this),c(this,f,it).call(this),i&&this.element.classList.add("previous-active"),n===t(this,m).counter?c(this,f,ot).call(this):n<t(this,m).counter?this.element.classList.add("previous"):this.element.classList.add("next"),c(this,f,ct).call(this,n)}}m=new WeakMap,I=new WeakMap,R=new WeakMap,f=new WeakSet,ot=function(){l(this,R,!0),this.element.classList.add("current"),l(this,I,requestAnimationFrame(()=>{this.element.classList.add("current-active")}))},ct=function(n){n===lt.loopNumber(t(this,m).counter-1,t(this,m).length)?this.element.classList.add("previous-sibling"):n===(t(this,m).counter+1)%t(this,m).length&&this.element.classList.add("next-sibling")},ut=function(){this.element.classList.remove("current","previous","next","previous-sibling","next-sibling","current-active","previous-active")},it=function(){t(this,I)&&(cancelAnimationFrame(t(this,I)),l(this,I,null))};var F,P,L,C,S,k,T,q,p,o,d,D,u,nt,V,N,W,Q,X,Y;class K extends HTMLElement{constructor(){super(...arguments);s(this,u);s(this,F,new M.CSSProperty(this,"--resize",!1));s(this,P,new M.CSSProperty(this,"--loop",!0));s(this,L,new M.CSSProperty(this,"--autoplay",!1));s(this,C,new M.CSSProperty(this,"--swipe","x"));s(this,S,new M.CSSProperty(this,"--length-offset",0));s(this,k);s(this,T,!1);s(this,q,[]);s(this,p,new Map);s(this,o,-1);s(this,d,0);s(this,D,[]);s(this,N,e=>{l(this,T,e.isIntersecting),t(this,T)?c(this,u,V).call(this):clearInterval(t(this,k))});s(this,W,()=>{clearInterval(t(this,k)),t(this,T)&&l(this,k,setInterval(t(this,X),this.autoplayDuration))});s(this,X,()=>{c(this,u,Q).call(this,t(this,o)+1)});s(this,Y,e=>{if(!t(this,C).current)return;let i=0;gt.setupDrag(r=>{const a=e.x-r.x,y=e.y-r.y;t(this,C).current==="x"?Math.abs(a)>Math.abs(y)&&Math.abs(a)>10&&(i=Math.sign(a)):t(this,C).current==="y"&&Math.abs(y)>Math.abs(a)&&Math.abs(y)>10&&(i=Math.sign(y))},()=>{i&&this.shift(i)})})}get counter(){return t(this,o)}get loop(){return t(this,P)}get autoplay(){return t(this,L)}get autoplayDuration(){return parseFloat(t(this,L).current||"0")*1e3}get swipe(){return t(this,C)}get lengthOffset(){return t(this,S)}get items(){return t(this,q)}get groups(){return t(this,p)}get length(){return t(this,d)}addItem(e){const i=new at(e,this);t(this,q).push(i);const r=e.getAttribute("data-billboard-item-group")||"default";let a=t(this,p).get(r);a||(a=[],t(this,p).set(r,a)),a.push(i),c(this,u,nt).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(c(this,u,Q).call(this,e),c(this,u,V).call(this))}shift(e){this.set(t(this,o)+e)}connectedCallback(){[...this.querySelectorAll(`[data-billboard-item${this.id?`="${this.id}"`:""}]`)].forEach(i=>{this.addItem(i)}),t(this,p).forEach(i=>{var r;(r=i[0])==null||r.element.classList.add("current")}),t(this,L).subscribe(i=>{i.current?($.intersector.subscribe(this,t(this,N)),c(this,u,V).call(this)):(l(this,T,!0),$.intersector.unsubscribe(t(this,N)),clearInterval(t(this,k)),c(this,u,Q).call(this,0))}),t(this,S).subscribe(()=>{c(this,u,nt).call(this)}),t(this,L).observe(),t(this,C).observe(),t(this,S).observe(),t(this,P).observe(),t(this,F).observe(),c(this,u,Q).call(this,0),this.addEventListener("pointerdown",t(this,Y))}disconnectedCallback(){t(this,L).unobserve(),t(this,C).unobserve(),t(this,S).unobserve(),t(this,P).unobserve(),t(this,F).unobserve(),t(this,q).forEach(e=>e.destroy()),l(this,q,[]),t(this,p).clear(),$.intersector.unsubscribe(t(this,N)),clearInterval(t(this,k)),t(this,D).forEach(e=>{clearTimeout(e)})}}F=new WeakMap,P=new WeakMap,L=new WeakMap,C=new WeakMap,S=new WeakMap,k=new WeakMap,T=new WeakMap,q=new WeakMap,p=new WeakMap,o=new WeakMap,d=new WeakMap,D=new WeakMap,u=new WeakSet,nt=function(){l(this,d,0),t(this,p).forEach(e=>{e.length>t(this,d)&&l(this,d,e.length)}),l(this,d,t(this,d)+t(this,S).current)},V=function(){t(this,L).current!==!1&&t(this,W).call(this)},N=new WeakMap,W=new WeakMap,Q=function(){return z(this,arguments,function*(e=t(this,o)){const i=t(this,o);t(this,P).current?l(this,o,lt.loopNumber(e,t(this,d))):l(this,o,vt.clamp(e,0,t(this,d)-1)),i!==t(this,o)&&(t(this,D).forEach(r=>{clearTimeout(r)}),this.classList.remove("forward","backward","next-round","prev-round"),t(this,o)-i>=0?this.classList.add("forward"):t(this,o)-i<0&&this.classList.add("backward"),t(this,p).forEach(r=>{r.forEach((a,y)=>{a.updateClasses(y)})}),this.classList.toggle("has-length",t(this,d)>1),this.classList.toggle("start",t(this,o)===0),this.classList.toggle("end",t(this,o)===t(this,d)-1),this.style.setProperty("--counter",t(this,o).toString()),this.style.setProperty("--sections",t(this,d).toString()),pt.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,o)}}),t(this,F).current&&t(this,D).push(setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)),t(this,D).push(setTimeout(()=>{this.classList.remove("next-round","prev-round")},10)))})},X=new WeakMap,Y=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",K);var g,O,v,U,_;class dt extends HTMLElement{constructor(){super(...arguments);s(this,g,null);s(this,O,null);s(this,v,[]);s(this,U,e=>{const i=e.currentTarget,r=t(this,v).findIndex(a=>a===i);r>=0&&t(this,g).set(r)});s(this,_,()=>{t(this,v).forEach((e,i)=>{i===t(this,g).counter?e.classList.add("current"):e.classList.remove("current")})})}get buttonElements(){return t(this,v)}connectedCallback(){return z(this,null,function*(){var e;if(yield rt.whenDefined("e-billboard"),l(this,g,Z.findParentElement(this,K)),t(this,g)&&this.isConnected){this.innerHTML="";const i=t(this,g).length;l(this,O,document.createElement("div"));for(let r=0;r<i;r++){const a=document.createElement("button");a.setAttribute("aria-label",`Go to item ${r+1}`),t(this,v).push(a),t(this,O).appendChild(a)}this.appendChild(t(this,O)),t(this,v).forEach(r=>{r.addEventListener("click",t(this,U))}),(e=t(this,g))==null||e.addEventListener("billboardChange",t(this,_)),t(this,_).call(this)}})}disconnectedCallback(){var e;t(this,v).forEach(i=>{i.removeEventListener("click",t(this,U))}),(e=t(this,g))==null||e.removeEventListener("billboardChange",t(this,_)),this.innerHTML="",l(this,v,[])}}g=new WeakMap,O=new WeakMap,v=new WeakMap,U=new WeakMap,_=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",dt);var H,j;class bt extends HTMLElement{constructor(){super(...arguments);s(this,H,null);s(this,j,()=>{var r;const e=(((r=t(this,H))==null?void 0:r.counter)||0)+1,i=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(i,"0")})}connectedCallback(){return z(this,null,function*(){var e;yield rt.whenDefined("e-billboard"),l(this,H,Z.findParentElement(this,K)),(e=t(this,H))==null||e.addEventListener("billboardChange",t(this,j)),t(this,j).call(this)})}disconnectedCallback(){var e;(e=t(this,H))==null||e.removeEventListener("billboardChange",t(this,j))}}H=new WeakMap,j=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-counter")&&customElements.define("e-billboard-counter",bt);var G,w,E,x;class mt extends HTMLElement{constructor(){super();s(this,G,null);s(this,w,new M.CSSProperty(this,"--index",0));s(this,E,null);s(this,x,()=>{t(this,G).updateClasses(t(this,w).current)});this.addEventListener("click",e=>{t(this,E)&&(!this.handleClick||this.handleClick(e))&&t(this,E).set(t(this,w).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){return z(this,null,function*(){yield rt.whenDefined("e-billboard"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),l(this,E,Z.findParentElement(this,K)),t(this,E)&&(l(this,G,new at(this,t(this,E))),t(this,E).addEventListener("billboardChange",t(this,x)),t(this,x).call(this),t(this,w).subscribe(t(this,x)),t(this,w).observe())})}disconnectedCallback(){var e;this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,w).unsubscribe(t(this,x)),t(this,w).unobserve(),(e=t(this,E))==null||e.removeEventListener("billboardChange",t(this,x)),t(this,G).destroy()}}G=new WeakMap,w=new WeakMap,E=new WeakMap,x=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",mt);var A,b,J;class ft extends HTMLElement{constructor(){super();s(this,A,new M.CSSProperty(this,"--step",1));s(this,b,null);s(this,J,()=>{t(this,b)&&(!t(this,b).loop.current&&(t(this,b).counter===0&&t(this,A).current<=0||t(this,b).counter===t(this,b).length-1&&t(this,A).current>=0)?this.setAttribute("disabled",""):this.removeAttribute("disabled"))});this.addEventListener("click",e=>{t(this,b)&&(!this.handleClick||this.handleClick(e))&&t(this,b).shift(t(this,A).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){return z(this,null,function*(){var e;yield customElements.whenDefined("e-billboard"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,A).observe(),this.tabIndex=0,l(this,b,Z.findParentElement(this,K)),(e=t(this,b))==null||e.addEventListener("billboardChange",t(this,J)),setTimeout(()=>{t(this,J).call(this)},0)})}disconnectedCallback(){var e;this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,A).unobserve(),(e=t(this,b))==null||e.removeEventListener("billboardChange",t(this,J))}}A=new WeakMap,b=new WeakMap,J=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",ft);exports.BillboardBulletsElement=dt;exports.BillboardCounterElement=bt;exports.BillboardElement=K;exports.BillboardSetButtonElement=mt;exports.BillboardStepButtonElement=ft;
1
+ "use strict";var ht=h=>{throw TypeError(h)};var st=(h,n,e)=>n.has(h)||ht("Cannot "+e);var t=(h,n,e)=>(st(h,n,"read from private field"),e?e.call(h):n.get(h)),s=(h,n,e)=>n.has(h)?ht("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(h):n.set(h,e),l=(h,n,e,i)=>(st(h,n,"write to private field"),i?i.call(h,e):n.set(h,e),e),c=(h,n,e)=>(st(h,n,"access private method"),e);var z=(h,n,e)=>new Promise((i,r)=>{var a=B=>{try{tt(e.next(B))}catch(et){r(et)}},y=B=>{try{tt(e.throw(B))}catch(et){r(et)}},tt=B=>B.done?i(B.value):Promise.resolve(B.value).then(a,y);tt((e=e.apply(h,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../index-CKTweR3M.cjs"),rt=require("../custom-elements-Dh4TWRDJ.cjs"),Z=require("../dom-hTEdqeoj.cjs");require("construct-style-sheets-polyfill");const M=require("../css-property/index.cjs"),pt=require("../events-KVanG9sR.cjs"),gt=require("../gestures-C7gbKx11.cjs"),vt=require("../math-GDWEqu7y.cjs"),lt=require("../number-ChAm68cm.cjs");var m,I,R,f,ot,ct,ut,it;class at{constructor(n,e){s(this,f);s(this,m);s(this,I,null);s(this,R,!1);this.element=n,l(this,m,e)}destroy(){c(this,f,it).call(this)}updateClasses(n){const e=n===t(this,m).counter;t(this,R)&&!e?this.element.classList.add("was-current"):this.element.classList.remove("was-current");const i=this.element.classList.contains("current-active");c(this,f,ut).call(this),c(this,f,it).call(this),i&&this.element.classList.add("previous-active"),n===t(this,m).counter?c(this,f,ot).call(this):n<t(this,m).counter?this.element.classList.add("previous"):this.element.classList.add("next"),c(this,f,ct).call(this,n)}}m=new WeakMap,I=new WeakMap,R=new WeakMap,f=new WeakSet,ot=function(){l(this,R,!0),this.element.classList.add("current"),l(this,I,requestAnimationFrame(()=>{this.element.classList.add("current-active")}))},ct=function(n){n===lt.loopNumber(t(this,m).counter-1,t(this,m).length)?this.element.classList.add("previous-sibling"):n===(t(this,m).counter+1)%t(this,m).length&&this.element.classList.add("next-sibling")},ut=function(){this.element.classList.remove("current","previous","next","previous-sibling","next-sibling","current-active","previous-active")},it=function(){t(this,I)&&(cancelAnimationFrame(t(this,I)),l(this,I,null))};var F,P,L,C,S,k,T,q,p,o,d,D,u,nt,V,N,W,Q,X,Y;class K extends HTMLElement{constructor(){super(...arguments);s(this,u);s(this,F,new M.CSSProperty(this,"--resize",!1));s(this,P,new M.CSSProperty(this,"--loop",!0));s(this,L,new M.CSSProperty(this,"--autoplay",!1));s(this,C,new M.CSSProperty(this,"--swipe","x"));s(this,S,new M.CSSProperty(this,"--length-offset",0));s(this,k);s(this,T,!1);s(this,q,[]);s(this,p,new Map);s(this,o,-1);s(this,d,0);s(this,D,[]);s(this,N,e=>{l(this,T,e.isIntersecting),t(this,T)?c(this,u,V).call(this):clearInterval(t(this,k))});s(this,W,()=>{clearInterval(t(this,k)),t(this,T)&&l(this,k,setInterval(t(this,X),this.autoplayDuration))});s(this,X,()=>{c(this,u,Q).call(this,t(this,o)+1)});s(this,Y,e=>{if(!t(this,C).current)return;let i=0;gt.setupDrag(r=>{const a=e.x-r.x,y=e.y-r.y;t(this,C).current==="x"?Math.abs(a)>Math.abs(y)&&Math.abs(a)>10&&(i=Math.sign(a)):t(this,C).current==="y"&&Math.abs(y)>Math.abs(a)&&Math.abs(y)>10&&(i=Math.sign(y))},()=>{i&&this.shift(i)})})}get counter(){return t(this,o)}get loop(){return t(this,P)}get autoplay(){return t(this,L)}get autoplayDuration(){return parseFloat(t(this,L).current||"0")*1e3}get swipe(){return t(this,C)}get lengthOffset(){return t(this,S)}get items(){return t(this,q)}get groups(){return t(this,p)}get length(){return t(this,d)}addItem(e){const i=new at(e,this);t(this,q).push(i);const r=e.getAttribute("data-billboard-item-group")||"default";let a=t(this,p).get(r);a||(a=[],t(this,p).set(r,a)),a.push(i),c(this,u,nt).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(c(this,u,Q).call(this,e),c(this,u,V).call(this))}shift(e){this.set(t(this,o)+e)}connectedCallback(){[...this.querySelectorAll(`[data-billboard-item${this.id?`="${this.id}"`:""}]`)].forEach(i=>{this.addItem(i)}),t(this,p).forEach(i=>{var r;(r=i[0])==null||r.element.classList.add("current")}),t(this,L).subscribe(i=>{i.current?($.intersector.subscribe(this,t(this,N)),c(this,u,V).call(this)):(l(this,T,!0),$.intersector.unsubscribe(t(this,N)),clearInterval(t(this,k)),c(this,u,Q).call(this,0))}),t(this,S).subscribe(()=>{c(this,u,nt).call(this)}),t(this,L).observe(),t(this,C).observe(),t(this,S).observe(),t(this,P).observe(),t(this,F).observe(),c(this,u,Q).call(this,0),this.addEventListener("pointerdown",t(this,Y))}disconnectedCallback(){t(this,L).unobserve(),t(this,C).unobserve(),t(this,S).unobserve(),t(this,P).unobserve(),t(this,F).unobserve(),t(this,q).forEach(e=>e.destroy()),l(this,q,[]),t(this,p).clear(),$.intersector.unsubscribe(t(this,N)),clearInterval(t(this,k)),t(this,D).forEach(e=>{clearTimeout(e)})}}F=new WeakMap,P=new WeakMap,L=new WeakMap,C=new WeakMap,S=new WeakMap,k=new WeakMap,T=new WeakMap,q=new WeakMap,p=new WeakMap,o=new WeakMap,d=new WeakMap,D=new WeakMap,u=new WeakSet,nt=function(){l(this,d,0),t(this,p).forEach(e=>{e.length>t(this,d)&&l(this,d,e.length)}),l(this,d,t(this,d)+t(this,S).current)},V=function(){t(this,L).current!==!1&&t(this,W).call(this)},N=new WeakMap,W=new WeakMap,Q=function(){return z(this,arguments,function*(e=t(this,o)){const i=t(this,o);t(this,P).current?l(this,o,lt.loopNumber(e,t(this,d))):l(this,o,vt.clamp(e,0,t(this,d)-1)),i!==t(this,o)&&(t(this,D).forEach(r=>{clearTimeout(r)}),this.classList.remove("forward","backward","next-round","prev-round"),t(this,o)-i>=0?this.classList.add("forward"):t(this,o)-i<0&&this.classList.add("backward"),t(this,p).forEach(r=>{r.forEach((a,y)=>{a.updateClasses(y)})}),this.classList.toggle("has-length",t(this,d)>1),this.classList.toggle("start",t(this,o)===0),this.classList.toggle("end",t(this,o)===t(this,d)-1),this.style.setProperty("--counter",t(this,o).toString()),this.style.setProperty("--sections",t(this,d).toString()),pt.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,o)}}),t(this,F).current&&t(this,D).push(setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)),t(this,D).push(setTimeout(()=>{this.classList.remove("next-round","prev-round")},10)))})},X=new WeakMap,Y=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",K);var g,O,v,U,_;class dt extends HTMLElement{constructor(){super(...arguments);s(this,g,null);s(this,O,null);s(this,v,[]);s(this,U,e=>{const i=e.currentTarget,r=t(this,v).findIndex(a=>a===i);r>=0&&t(this,g).set(r)});s(this,_,()=>{t(this,v).forEach((e,i)=>{i===t(this,g).counter?e.classList.add("current"):e.classList.remove("current")})})}get buttonElements(){return t(this,v)}connectedCallback(){return z(this,null,function*(){var e;if(yield rt.whenDefined("e-billboard"),l(this,g,Z.findParentElement(this,K)),t(this,g)&&this.isConnected){this.innerHTML="";const i=t(this,g).length;l(this,O,document.createElement("div"));for(let r=0;r<i;r++){const a=document.createElement("button");a.setAttribute("aria-label",`Go to item ${r+1}`),t(this,v).push(a),t(this,O).appendChild(a)}this.appendChild(t(this,O)),t(this,v).forEach(r=>{r.addEventListener("click",t(this,U))}),(e=t(this,g))==null||e.addEventListener("billboardChange",t(this,_)),t(this,_).call(this)}})}disconnectedCallback(){var e;t(this,v).forEach(i=>{i.removeEventListener("click",t(this,U))}),(e=t(this,g))==null||e.removeEventListener("billboardChange",t(this,_)),this.innerHTML="",l(this,v,[])}}g=new WeakMap,O=new WeakMap,v=new WeakMap,U=new WeakMap,_=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",dt);var H,j;class bt extends HTMLElement{constructor(){super(...arguments);s(this,H,null);s(this,j,()=>{var r;const e=(((r=t(this,H))==null?void 0:r.counter)||0)+1,i=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(i,"0")})}connectedCallback(){return z(this,null,function*(){var e;yield rt.whenDefined("e-billboard"),l(this,H,Z.findParentElement(this,K)),(e=t(this,H))==null||e.addEventListener("billboardChange",t(this,j)),t(this,j).call(this)})}disconnectedCallback(){var e;(e=t(this,H))==null||e.removeEventListener("billboardChange",t(this,j))}}H=new WeakMap,j=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-counter")&&customElements.define("e-billboard-counter",bt);var G,w,E,x;class mt extends HTMLElement{constructor(){super();s(this,G,null);s(this,w,new M.CSSProperty(this,"--index",0));s(this,E,null);s(this,x,()=>{t(this,G).updateClasses(t(this,w).current)});this.addEventListener("click",e=>{t(this,E)&&(!this.handleClick||this.handleClick(e))&&t(this,E).set(t(this,w).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){return z(this,null,function*(){yield rt.whenDefined("e-billboard"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),l(this,E,Z.findParentElement(this,K)),t(this,E)&&(l(this,G,new at(this,t(this,E))),t(this,E).addEventListener("billboardChange",t(this,x)),t(this,x).call(this),t(this,w).subscribe(t(this,x)),t(this,w).observe())})}disconnectedCallback(){var e;this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,w).unsubscribe(t(this,x)),t(this,w).unobserve(),(e=t(this,E))==null||e.removeEventListener("billboardChange",t(this,x)),t(this,G).destroy()}}G=new WeakMap,w=new WeakMap,E=new WeakMap,x=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",mt);var A,b,J;class ft extends HTMLElement{constructor(){super();s(this,A,new M.CSSProperty(this,"--step",1));s(this,b,null);s(this,J,()=>{t(this,b)&&(!t(this,b).loop.current&&(t(this,b).counter===0&&t(this,A).current<=0||t(this,b).counter===t(this,b).length-1&&t(this,A).current>=0)?this.setAttribute("disabled",""):this.removeAttribute("disabled"))});this.addEventListener("click",e=>{t(this,b)&&(!this.handleClick||this.handleClick(e))&&t(this,b).shift(t(this,A).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){return z(this,null,function*(){var e;yield customElements.whenDefined("e-billboard"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,A).observe(),this.tabIndex=0,l(this,b,Z.findParentElement(this,K)),(e=t(this,b))==null||e.addEventListener("billboardChange",t(this,J)),setTimeout(()=>{t(this,J).call(this)},0)})}disconnectedCallback(){var e;this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,A).unobserve(),(e=t(this,b))==null||e.removeEventListener("billboardChange",t(this,J))}}A=new WeakMap,b=new WeakMap,J=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",ft);exports.BillboardBulletsElement=dt;exports.BillboardCounterElement=bt;exports.BillboardElement=K;exports.BillboardSetButtonElement=mt;exports.BillboardStepButtonElement=ft;
@@ -19,9 +19,9 @@ var F = (h, n, e) => new Promise((i, r) => {
19
19
  }, tt = (I) => I.done ? i(I.value) : Promise.resolve(I.value).then(a, y);
20
20
  tt((e = e.apply(h, n)).next());
21
21
  });
22
- import { a as it, i as Z } from "../index-Bv9zgfdb.js";
22
+ import { a as it, i as Z } from "../index-JqYHGoo6.js";
23
23
  import { w as ht } from "../custom-elements-DBnCK7Zx.js";
24
- import { b as _ } from "../dom-CVWzyXPH.js";
24
+ import { b as _ } from "../dom-fgxIeFxm.js";
25
25
  import "construct-style-sheets-polyfill";
26
26
  import { CSSProperty as S } from "../css-property/index.js";
27
27
  import { d as bt } from "../events-CsVF98U6.js";
@@ -1 +1 @@
1
- "use strict";var f=i=>{throw TypeError(i)};var R=(i,s,e)=>s.has(i)||f("Cannot "+e);var t=(i,s,e)=>(R(i,s,"read from private field"),e?e.call(i):s.get(i)),n=(i,s,e)=>s.has(i)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,e),c=(i,s,e,d)=>(R(i,s,"write to private field"),d?d.call(i,e):s.set(i,e),e),o=(i,s,e)=>(R(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../css-property/index.cjs"),y=require("../element-resizer/index.cjs"),w=require("../ticker/index.cjs"),C=require("../index-DekP7OZe.cjs"),B=require("../math-GDWEqu7y.cjs"),F=require("../stylesheet-HWF2a3nr.cjs");var a,r,m,l,u,p,b,x,h,E,P,g,v,S,q;class k extends HTMLElement{constructor(){super();n(this,h);n(this,a,new z.CSSProperty(this,"--fps",0));n(this,r,null);n(this,m,null);n(this,l,0);n(this,u,0);n(this,p,1);n(this,b,0);n(this,x,1);n(this,g,e=>{c(this,p,B.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,u,e.contentRect.height),t(this,r).width=t(this,l)*this.pixelRatio,t(this,r).height=t(this,u)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),o(this,h,q).call(this),o(this,h,S).call(this)});n(this,v,e=>{c(this,b,e.timestamp),c(this,x,e.timeBetweenFrames),o(this,h,S).call(this)});if(C.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[F.createStylesheet({" :host, canvas":{display:"block",width:"100%",height:"100%"}})],c(this,r,document.createElement("canvas")),c(this,m,t(this,r).getContext("2d")),e.appendChild(t(this,r)),t(this,a).subscribe(d=>{typeof d.previous!="undefined"&&d.current!==d.previous&&o(this,h,E).call(this)})}}get fpsCSSProperty(){return t(this,a)}get canvasElement(){return t(this,r)}get context(){return t(this,m)}get pixelRatio(){return t(this,p)}get width(){return t(this,l)}get height(){return t(this,u)}get detail(){return{width:t(this,l),height:t(this,u),element:this,canvasElement:t(this,r),pixelRatio:t(this,p),context:t(this,m),timestamp:t(this,b),timeBetweenFrames:t(this,x)}}connectedCallback(){t(this,a).observe(),y.elementResizer.subscribe(this,t(this,g)),o(this,h,E).call(this)}disconnectedCallback(){t(this,a).unobserve(),y.elementResizer.unsubscribe(t(this,g)),o(this,h,P).call(this)}}a=new WeakMap,r=new WeakMap,m=new WeakMap,l=new WeakMap,u=new WeakMap,p=new WeakMap,b=new WeakMap,x=new WeakMap,h=new WeakSet,E=function(){w.ticker.unsubscribe(t(this,v)),this.hasAttribute("static")||w.ticker.subscribe(t(this,v),{culling:this,maxFPS:t(this,a).current})},P=function(){w.ticker.unsubscribe(t(this,v))},g=new WeakMap,v=new WeakMap,S=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))},q=function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))};C.isBrowser&&!customElements.get("e-canvas")&&customElements.define("e-canvas",k);exports.CanvasElement=k;
1
+ "use strict";var f=i=>{throw TypeError(i)};var R=(i,s,e)=>s.has(i)||f("Cannot "+e);var t=(i,s,e)=>(R(i,s,"read from private field"),e?e.call(i):s.get(i)),n=(i,s,e)=>s.has(i)?f("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,e),c=(i,s,e,d)=>(R(i,s,"write to private field"),d?d.call(i,e):s.set(i,e),e),o=(i,s,e)=>(R(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../css-property/index.cjs"),y=require("../element-resizer/index.cjs"),w=require("../ticker/index.cjs"),C=require("../index-CKTweR3M.cjs"),B=require("../math-GDWEqu7y.cjs"),F=require("../stylesheet-BcwbfhBp.cjs");var a,r,m,l,u,p,b,x,h,E,P,g,v,S,q;class k extends HTMLElement{constructor(){super();n(this,h);n(this,a,new z.CSSProperty(this,"--fps",0));n(this,r,null);n(this,m,null);n(this,l,0);n(this,u,0);n(this,p,1);n(this,b,0);n(this,x,1);n(this,g,e=>{c(this,p,B.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,u,e.contentRect.height),t(this,r).width=t(this,l)*this.pixelRatio,t(this,r).height=t(this,u)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),o(this,h,q).call(this),o(this,h,S).call(this)});n(this,v,e=>{c(this,b,e.timestamp),c(this,x,e.timeBetweenFrames),o(this,h,S).call(this)});if(C.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[F.createStylesheet({" :host, canvas":{display:"block",width:"100%",height:"100%"}})],c(this,r,document.createElement("canvas")),c(this,m,t(this,r).getContext("2d")),e.appendChild(t(this,r)),t(this,a).subscribe(d=>{typeof d.previous!="undefined"&&d.current!==d.previous&&o(this,h,E).call(this)})}}get fpsCSSProperty(){return t(this,a)}get canvasElement(){return t(this,r)}get context(){return t(this,m)}get pixelRatio(){return t(this,p)}get width(){return t(this,l)}get height(){return t(this,u)}get detail(){return{width:t(this,l),height:t(this,u),element:this,canvasElement:t(this,r),pixelRatio:t(this,p),context:t(this,m),timestamp:t(this,b),timeBetweenFrames:t(this,x)}}connectedCallback(){t(this,a).observe(),y.elementResizer.subscribe(this,t(this,g)),o(this,h,E).call(this)}disconnectedCallback(){t(this,a).unobserve(),y.elementResizer.unsubscribe(t(this,g)),o(this,h,P).call(this)}}a=new WeakMap,r=new WeakMap,m=new WeakMap,l=new WeakMap,u=new WeakMap,p=new WeakMap,b=new WeakMap,x=new WeakMap,h=new WeakSet,E=function(){w.ticker.unsubscribe(t(this,v)),this.hasAttribute("static")||w.ticker.subscribe(t(this,v),{culling:this,maxFPS:t(this,a).current})},P=function(){w.ticker.unsubscribe(t(this,v))},g=new WeakMap,v=new WeakMap,S=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))},q=function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))};C.isBrowser&&!customElements.get("e-canvas")&&customElements.define("e-canvas",k);exports.CanvasElement=k;
@@ -6,9 +6,9 @@ var t = (i, s, e) => (x(i, s, "read from private field"), e ? e.call(i) : s.get(
6
6
  import { CSSProperty as z } from "../css-property/index.js";
7
7
  import { elementResizer as C } from "../element-resizer/index.js";
8
8
  import { ticker as w } from "../ticker/index.js";
9
- import { i as y } from "../index-Bv9zgfdb.js";
9
+ import { i as y } from "../index-JqYHGoo6.js";
10
10
  import { c as B } from "../math-BOBiC4TN.js";
11
- import { c as F } from "../stylesheet-DpnWNVyD.js";
11
+ import { c as F } from "../stylesheet-JlRFfJIc.js";
12
12
  var o, r, d, m, l, u, b, f, n, R, k, g, v, E, P;
13
13
  class L extends HTMLElement {
14
14
  constructor() {
@@ -1 +1 @@
1
- "use strict";var f=t=>{throw TypeError(t)};var h=(t,c,e)=>c.has(t)||f("Cannot "+e);var a=(t,c,e)=>(h(t,c,"read from private field"),e?e.call(t):c.get(t)),r=(t,c,e)=>c.has(t)?f("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(t):c.set(t,e),d=(t,c,e,s)=>(h(t,c,"write to private field"),s?s.call(t,e):c.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../order/index.cjs"),u=require("../ticker/index.cjs");var i,o,l;class k{constructor(){r(this,i,[]);r(this,o);r(this,l,c=>{var e,s,b;for(let C=a(this,i).length-1;C>=0;C--){const n=a(this,i)[C];n.node.isConnected&&!n.isConnected?((e=n.connectCallback)==null||e.call(n,n.node),n.isConnected=!0):!n.node.isConnected&&n.isConnected&&((s=n.disconnectCallback)==null||s.call(n,n.node),n.isConnected=!1,n.unsubscribeAfterDisconnect&&this.unsubscribe(n)),n.isConnected||(n.timer=Math.max(0,c.timeElapsedSinceSubscription-n.startTime),n.timer>n.maxWaitSec*1e3&&((b=n.disconnectCallback)==null||b.call(n,n.node,!0),this.unsubscribe(n)))}})}subscribe(c,e){const s=a(this,i).length;return a(this,i).push({node:c,connectCallback:e.connectCallback,disconnectCallback:e.disconnectCallback,isConnected:!1,maxWaitSec:typeof e.maxWaitSec=="number"?e.maxWaitSec:1/0,timer:0,startTime:performance.now(),unsubscribeAfterDisconnect:e.unsubscribeAfterDisconnect||!1}),s||u.ticker.subscribe(a(this,l),{order:m.TICK_ORDER.CONNECTOR}),()=>{this.unsubscribe(e)}}unsubscribe(c){a(this,i).forEach(e=>{e.connectCallback===c.connectCallback&&(e.connectCallback=void 0),e.disconnectCallback===c.disconnectCallback&&(e.disconnectCallback=void 0)}),d(this,i,a(this,i).filter(e=>e.connectCallback||e.disconnectCallback)),a(this,i).length||(u.ticker.unsubscribe(a(this,l)),d(this,o,void 0))}destroy(){clearInterval(a(this,o)),d(this,i,[])}}i=new WeakMap,o=new WeakMap,l=new WeakMap;const x=new k;exports.Connector=k;exports.connector=x;
1
+ "use strict";var f=t=>{throw TypeError(t)};var h=(t,c,e)=>c.has(t)||f("Cannot "+e);var a=(t,c,e)=>(h(t,c,"read from private field"),e?e.call(t):c.get(t)),r=(t,c,e)=>c.has(t)?f("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(t):c.set(t,e),d=(t,c,e,s)=>(h(t,c,"write to private field"),s?s.call(t,e):c.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../order/index.cjs"),u=require("../ticker/index.cjs");var i,o,l;class k{constructor(){r(this,i,[]);r(this,o);r(this,l,c=>{var e,s,b;for(let C=a(this,i).length-1;C>=0;C--){const n=a(this,i)[C];n.node.isConnected&&!n.isConnected?((e=n.connectCallback)==null||e.call(n,n.node),n.isConnected=!0):!n.node.isConnected&&n.isConnected&&((s=n.disconnectCallback)==null||s.call(n,n.node),n.isConnected=!1,n.unsubscribeAfterDisconnect&&this.unsubscribe(n)),n.isConnected||(n.timer=Math.max(0,c.timeElapsedSinceSubscription-n.startTime),n.timer>n.maxWaitSec*1e3&&((b=n.disconnectCallback)==null||b.call(n,n.node,!0),this.unsubscribe(n)))}})}subscribe(c,e){const s=a(this,i).length;return a(this,i).push({node:c,connectCallback:e.connectCallback,disconnectCallback:e.disconnectCallback,isConnected:!1,maxWaitSec:typeof e.maxWaitSec=="number"?e.maxWaitSec:1/0,timer:0,startTime:performance.now(),unsubscribeAfterDisconnect:e.unsubscribeAfterDisconnect||!1}),s||u.ticker.subscribe(a(this,l),{order:m.TICK_ORDER.CONNECTOR,maxFPS:2}),()=>{this.unsubscribe(e)}}unsubscribe(c){a(this,i).forEach(e=>{e.connectCallback===c.connectCallback&&(e.connectCallback=void 0),e.disconnectCallback===c.disconnectCallback&&(e.disconnectCallback=void 0)}),d(this,i,a(this,i).filter(e=>e.connectCallback||e.disconnectCallback)),a(this,i).length||(u.ticker.unsubscribe(a(this,l)),d(this,o,void 0))}destroy(){clearInterval(a(this,o)),d(this,i,[])}}i=new WeakMap,o=new WeakMap,l=new WeakMap;const x=new k;exports.Connector=k;exports.connector=x;
@@ -33,7 +33,8 @@ class u {
33
33
  startTime: performance.now(),
34
34
  unsubscribeAfterDisconnect: e.unsubscribeAfterDisconnect || !1
35
35
  }), s || m.subscribe(a(this, o), {
36
- order: k.CONNECTOR
36
+ order: k.CONNECTOR,
37
+ maxFPS: 2
37
38
  }), () => {
38
39
  this.unsubscribe(e);
39
40
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../DragControls-K67-diF5.cjs");exports.AutoplayControls=o.AutoplayControls;exports.Controls=o.Controls;exports.DragControls=o.DragControls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../DragControls-BlL26P1V.cjs");exports.AutoplayControls=o.AutoplayControls;exports.Controls=o.Controls;exports.DragControls=o.DragControls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;
@@ -1,4 +1,4 @@
1
- import { A as r, C as a, D as l, K as t, W as C } from "../DragControls-DyIrD3GV.js";
1
+ import { A as r, C as a, D as l, K as t, W as C } from "../DragControls-Cm_88cLt.js";
2
2
  export {
3
3
  r as AutoplayControls,
4
4
  a as Controls,
@@ -1 +1 @@
1
- "use strict";var w=r=>{throw TypeError(r)};var f=(r,s,e)=>s.has(r)||w("Cannot "+e);var t=(r,s,e)=>(f(r,s,"read from private field"),e?e.call(r):s.get(r)),h=(r,s,e)=>s.has(r)?w("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),u=(r,s,e,i)=>(f(r,s,"write to private field"),i?i.call(r,e):s.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../css-value-parser/index.cjs"),V=require("../order/index.cjs"),p=require("../Store-Cd1GlEmZ.cjs"),q=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");require("../index-DekP7OZe.cjs");const g=require("../window-resizer/index.cjs");var l,a,c,b,n,o;class v extends p.Store{constructor(e,i,d,S){super(d,S);h(this,l);h(this,a);h(this,c);h(this,b);h(this,n,!1);h(this,o,()=>{this.check()});u(this,l,q.getElement(e)),u(this,a,i),u(this,c,d.toString()),u(this,b,(S==null?void 0:S.rawValueCheck)!==!1)}get currentRawValue(){return t(this,c)}observe(){t(this,n)||(u(this,n,!0),g.windowResizer.subscribe(t(this,o),V.RESIZE_ORDER.CSS_VARIABLE))}unobserve(){t(this,n)&&(u(this,n,!1),g.windowResizer.unsubscribe(t(this,o)))}subscribe(e,i){return this.subscribers.length||this.observe(),super.subscribe(e,i)}unsubscribe(e){super.unsubscribe(e),this.subscribers.length||this.unobserve()}close(){this.unobserve(),super.close()}check(){const e=getComputedStyle(t(this,l)).getPropertyValue(t(this,a)).trim();if(!(t(this,b)&&t(this,c)===e))if(u(this,c,e),e){const i=R.cssValueParser.parse(t(this,c),t(this,l));this.current=i}else this.current=this.initial}}l=new WeakMap,a=new WeakMap,c=new WeakMap,b=new WeakMap,n=new WeakMap,o=new WeakMap;exports.CSSProperty=v;
1
+ "use strict";var w=r=>{throw TypeError(r)};var f=(r,s,e)=>s.has(r)||w("Cannot "+e);var t=(r,s,e)=>(f(r,s,"read from private field"),e?e.call(r):s.get(r)),h=(r,s,e)=>s.has(r)?w("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),u=(r,s,e,i)=>(f(r,s,"write to private field"),i?i.call(r,e):s.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../css-value-parser/index.cjs"),V=require("../order/index.cjs"),p=require("../Store-1JrMCgdX.cjs"),q=require("../dom-hTEdqeoj.cjs");require("construct-style-sheets-polyfill");require("../index-CKTweR3M.cjs");const g=require("../window-resizer/index.cjs");var l,a,c,b,n,o;class v extends p.Store{constructor(e,i,d,S){super(d,S);h(this,l);h(this,a);h(this,c);h(this,b);h(this,n,!1);h(this,o,()=>{this.check()});u(this,l,q.getElement(e)),u(this,a,i),u(this,c,d.toString()),u(this,b,(S==null?void 0:S.rawValueCheck)!==!1)}get currentRawValue(){return t(this,c)}observe(){t(this,n)||(u(this,n,!0),g.windowResizer.subscribe(t(this,o),V.RESIZE_ORDER.CSS_VARIABLE))}unobserve(){t(this,n)&&(u(this,n,!1),g.windowResizer.unsubscribe(t(this,o)))}subscribe(e,i){return this.subscribers.length||this.observe(),super.subscribe(e,i)}unsubscribe(e){super.unsubscribe(e),this.subscribers.length||this.unobserve()}close(){this.unobserve(),super.close()}check(){const e=getComputedStyle(t(this,l)).getPropertyValue(t(this,a)).trim();if(!(t(this,b)&&t(this,c)===e))if(u(this,c,e),e){const i=R.cssValueParser.parse(t(this,c),t(this,l));this.current=i}else this.current=this.initial}}l=new WeakMap,a=new WeakMap,c=new WeakMap,b=new WeakMap,n=new WeakMap,o=new WeakMap;exports.CSSProperty=v;
@@ -5,10 +5,10 @@ var S = (s, r, e) => r.has(s) || p("Cannot " + e);
5
5
  var t = (s, r, e) => (S(s, r, "read from private field"), e ? e.call(s) : r.get(s)), c = (s, r, e) => r.has(s) ? p("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, e), u = (s, r, e, i) => (S(s, r, "write to private field"), i ? i.call(s, e) : r.set(s, e), e);
6
6
  import { cssValueParser as w } from "../css-value-parser/index.js";
7
7
  import { RESIZE_ORDER as R } from "../order/index.js";
8
- import { S as V } from "../Store-0BVty6AZ.js";
9
- import { g as v } from "../dom-CVWzyXPH.js";
8
+ import { S as V } from "../Store-BtVtCGLk.js";
9
+ import { g as v } from "../dom-fgxIeFxm.js";
10
10
  import "construct-style-sheets-polyfill";
11
- import "../index-Bv9zgfdb.js";
11
+ import "../index-JqYHGoo6.js";
12
12
  import { windowResizer as g } from "../window-resizer/index.js";
13
13
  var b, o, h, l, a, n;
14
14
  class A extends V {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../css-unit-parser/index.cjs"),w=require("../Viewport-DB0qAZPJ.cjs"),c=class c{parse(s,r){var h;const t=parseFloat(s),o=!isNaN(t),i=o?(h=s.match(/[a-z]+$/i))==null?void 0:h[0]:void 0;return o&&!i?t:i?i==="px"?t:i==="oh"?((r==null?void 0:r.offsetHeight)||0)*(t/100):i==="ow"?((r==null?void 0:r.offsetWidth)||0)*(t/100):i==="ohmh"?(((r==null?void 0:r.offsetHeight)||0)-w.viewport.height)*(t/100):i==="owmw"?(((r==null?void 0:r.offsetWidth)||0)-w.viewport.width)*(t/100):i&&c.CSS_UNITS.has(i)?u.cssUnitParser.parse(s):s:s.includes("calc")?s.includes("raw!")?s.replace("raw!",""):u.cssUnitParser.parse(s):s==="true"?!0:s==="false"?!1:s}};c.CSS_UNITS=new Set(["px","rem","vw","vh","vmin","vmax","em","cm","mm","Q","in","pc","pt","ex","ch","lh","rlh","vb","vi","svw","svh","lvw","lvh","dvw","dvh"]);let f=c;const e=new f;exports.cssValueParser=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../css-unit-parser/index.cjs"),w=require("../Viewport-Cx50Hufs.cjs"),c=class c{parse(s,r){var h;const t=parseFloat(s),o=!isNaN(t),i=o?(h=s.match(/[a-z]+$/i))==null?void 0:h[0]:void 0;return o&&!i?t:i?i==="px"?t:i==="oh"?((r==null?void 0:r.offsetHeight)||0)*(t/100):i==="ow"?((r==null?void 0:r.offsetWidth)||0)*(t/100):i==="ohmh"?(((r==null?void 0:r.offsetHeight)||0)-w.viewport.height)*(t/100):i==="owmw"?(((r==null?void 0:r.offsetWidth)||0)-w.viewport.width)*(t/100):i&&c.CSS_UNITS.has(i)?u.cssUnitParser.parse(s):s:s.includes("calc")?s.includes("raw!")?s.replace("raw!",""):u.cssUnitParser.parse(s):s==="true"?!0:s==="false"?!1:s}};c.CSS_UNITS=new Set(["px","rem","vw","vh","vmin","vmax","em","cm","mm","Q","in","pc","pt","ex","ch","lh","rlh","vb","vi","svw","svh","lvw","lvh","dvw","dvh"]);let f=c;const e=new f;exports.cssValueParser=e;
@@ -1,5 +1,5 @@
1
1
  import { cssUnitParser as p } from "../css-unit-parser/index.js";
2
- import { v as w } from "../Viewport-DA10iWAO.js";
2
+ import { v as w } from "../Viewport-DbN_JWBM.js";
3
3
  const t = class t {
4
4
  parse(s, r) {
5
5
  var c;
package/lib/dev/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../css-property/index.cjs"),t=require("../Store-Cd1GlEmZ.cjs");require("construct-style-sheets-polyfill");require("../index-DekP7OZe.cjs");const o=require("../ticker/index.cjs");function c(){o.ticker.subscribe(()=>{for(let e=0;e<t.activeStores.current.length;e++){const r=t.activeStores.current[e];r instanceof i.CSSProperty&&r.check()}})}exports.devMode=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../css-property/index.cjs"),t=require("../Store-1JrMCgdX.cjs");require("construct-style-sheets-polyfill");require("../index-CKTweR3M.cjs");const o=require("../ticker/index.cjs");function c(){o.ticker.subscribe(()=>{for(let e=0;e<t.activeStores.current.length;e++){const r=t.activeStores.current[e];r instanceof i.CSSProperty&&r.check()}})}exports.devMode=c;
package/lib/dev/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CSSProperty as e } from "../css-property/index.js";
2
- import { a as o } from "../Store-0BVty6AZ.js";
2
+ import { a as o } from "../Store-BtVtCGLk.js";
3
3
  import "construct-style-sheets-polyfill";
4
- import "../index-Bv9zgfdb.js";
4
+ import "../index-JqYHGoo6.js";
5
5
  import { ticker as i } from "../ticker/index.js";
6
6
  function s() {
7
7
  i.subscribe(() => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Viewport-DB0qAZPJ.cjs");exports.ViewportBreakpoints=e.ViewportBreakpoints;exports.ViewportMediaRules=e.ViewportMediaRules;exports.device=e.device;exports.viewport=e.viewport;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Viewport-Cx50Hufs.cjs");exports.ViewportBreakpoints=e.ViewportBreakpoints;exports.ViewportMediaRules=e.ViewportMediaRules;exports.device=e.device;exports.viewport=e.viewport;
@@ -1,4 +1,4 @@
1
- import { V as i, a as o, d as r, v as s } from "../Viewport-DA10iWAO.js";
1
+ import { V as i, a as o, d as r, v as s } from "../Viewport-DbN_JWBM.js";
2
2
  export {
3
3
  i as ViewportBreakpoints,
4
4
  o as ViewportMediaRules,
@@ -4,10 +4,10 @@ function u(e, t) {
4
4
  let n = e.parentElement;
5
5
  return e.parentElement instanceof t || (n = u(e.parentElement, t)), n;
6
6
  }
7
- function a(e, t = document) {
7
+ function l(e, t = document) {
8
8
  return typeof e == "string" ? t.querySelector(e) : e;
9
9
  }
10
- function l(e, t = null) {
10
+ function f(e, t = null) {
11
11
  if (t = t || e, !e || !(e instanceof HTMLElement))
12
12
  return document.body;
13
13
  if (t !== e) {
@@ -15,9 +15,9 @@ function l(e, t = null) {
15
15
  if (n.overflow.includes("auto") || n.overflow.includes("scroll"))
16
16
  return e;
17
17
  }
18
- return l(e.parentNode, t);
18
+ return f(e.parentNode, t);
19
19
  }
20
- function c(e) {
20
+ function i(e) {
21
21
  let t = [];
22
22
  return document.documentElement.addEventListener(
23
23
  "__illuminate-tree",
@@ -34,9 +34,24 @@ function c(e) {
34
34
  })
35
35
  ), t;
36
36
  }
37
+ function a(e, t) {
38
+ t(e), e.childNodes.forEach((n) => {
39
+ a(n, t);
40
+ });
41
+ }
42
+ function c(e, t, n = !0) {
43
+ e.shadowRoot && (t(e), n && o(e.shadowRoot, t, n)), o(e, t, n);
44
+ }
45
+ function o(e, t, n) {
46
+ const s = e.children || (e instanceof ShadowRoot ? e.children : []);
47
+ for (const r of Array.from(s))
48
+ c(r, t, n);
49
+ }
37
50
  export {
38
- c as a,
51
+ i as a,
39
52
  u as b,
40
- l as f,
41
- a as g
53
+ a as c,
54
+ f,
55
+ l as g,
56
+ c as t
42
57
  };
@@ -0,0 +1 @@
1
+ "use strict";function u(e,t){if(!e)return null;let n=e.parentElement;return e.parentElement instanceof t||(n=u(e.parentElement,t)),n}function c(e,t=document){return typeof e=="string"?t.querySelector(e):e}function l(e,t=null){if(t=t||e,!e||!(e instanceof HTMLElement))return document.body;if(t!==e){const n=getComputedStyle(e);if(n.overflow.includes("auto")||n.overflow.includes("scroll"))return e}return l(e.parentNode,t)}function i(e){let t=[];return document.documentElement.addEventListener("__illuminate-tree",n=>{n.composedPath().forEach(r=>{r instanceof HTMLElement&&t.push(r)})},{once:!0}),e.dispatchEvent(new CustomEvent("__illuminate-tree",{bubbles:!0,composed:!0})),t}function f(e,t){t(e),e.childNodes.forEach(n=>{f(n,t)})}function a(e,t,n=!0){e.shadowRoot&&(t(e),n&&s(e.shadowRoot,t,n)),s(e,t,n)}function s(e,t,n){const o=e.children||(e instanceof ShadowRoot?e.children:[]);for(const r of Array.from(o))a(r,t,n)}exports.findParentElement=u;exports.findScrollParentElement=l;exports.getAllParentElements=i;exports.getElement=c;exports.traverseNodes=f;exports.traverseShadowRoots=a;
@@ -1 +1 @@
1
- "use strict";var m=Object.defineProperty,P=Object.defineProperties;var g=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var p=s=>{throw TypeError(s)};var y=(s,r,t)=>r in s?m(s,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[r]=t,S=(s,r)=>{for(var t in r||(r={}))q.call(r,t)&&y(s,t,r[t]);if(E)for(var t of E(r))b.call(r,t)&&y(s,t,r[t]);return s},L=(s,r)=>P(s,g(r));var a=(s,r,t)=>r.has(s)||p("Cannot "+t);var n=(s,r,t)=>(a(s,r,"read from private field"),t?t.call(s):r.get(s)),f=(s,r,t)=>r.has(s)?p("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),l=(s,r,t,i)=>(a(s,r,"write to private field"),i?i.call(s,t):r.set(s,t),t),u=(s,r,t)=>(a(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../Store-Cd1GlEmZ.cjs");require("construct-style-sheets-polyfill");require("../index-DekP7OZe.cjs");var h,c,d;class A extends k.Store{constructor(t,i){super(i);f(this,c);f(this,h);l(this,h,Array.isArray(t)?t:[t]);for(const e in this.initial)this.set(e,this.initial[e])}addElement(t){n(this,h).push(t);for(const i in this.current)u(this,c,d).call(this,[t],i,this.current[i])}removeElement(t){const i=n(this,h).find(e=>e===t);if(i){l(this,h,n(this,h).filter(e=>e!==t));for(const e in this.current)u(this,c,d).call(this,[i],e,!1)}}isTrue(t){return this.current[t]===!0}isFalse(t){return this.current[t]===!1}reset(){super.reset();for(const t in this.initial)this.set(t,this.initial[t])}set(t,i){const e=t;this.current=L(S({},this.current),{[t]:i}),e.startsWith("--")?i?n(this,h).forEach(o=>o.style.setProperty(e,i.toString())):n(this,h).forEach(o=>o.style.removeProperty(e)):i?n(this,h).forEach(o=>o.classList.add(e)):n(this,h).forEach(o=>o.classList.remove(e))}}h=new WeakMap,c=new WeakSet,d=function(t,i,e){i.startsWith("--")?e?t.forEach(o=>o.style.setProperty(i,e.toString())):t.forEach(o=>o.style.removeProperty(i)):e?t.forEach(o=>o.classList.add(i)):t.forEach(o=>o.classList.remove(i))};exports.ElementLinkedStore=A;
1
+ "use strict";var m=Object.defineProperty,P=Object.defineProperties;var g=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var p=s=>{throw TypeError(s)};var y=(s,r,t)=>r in s?m(s,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[r]=t,S=(s,r)=>{for(var t in r||(r={}))q.call(r,t)&&y(s,t,r[t]);if(E)for(var t of E(r))b.call(r,t)&&y(s,t,r[t]);return s},L=(s,r)=>P(s,g(r));var a=(s,r,t)=>r.has(s)||p("Cannot "+t);var n=(s,r,t)=>(a(s,r,"read from private field"),t?t.call(s):r.get(s)),f=(s,r,t)=>r.has(s)?p("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),l=(s,r,t,i)=>(a(s,r,"write to private field"),i?i.call(s,t):r.set(s,t),t),u=(s,r,t)=>(a(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../Store-1JrMCgdX.cjs");require("construct-style-sheets-polyfill");require("../index-CKTweR3M.cjs");var h,c,d;class A extends k.Store{constructor(t,i){super(i);f(this,c);f(this,h);l(this,h,Array.isArray(t)?t:[t]);for(const e in this.initial)this.set(e,this.initial[e])}addElement(t){n(this,h).push(t);for(const i in this.current)u(this,c,d).call(this,[t],i,this.current[i])}removeElement(t){const i=n(this,h).find(e=>e===t);if(i){l(this,h,n(this,h).filter(e=>e!==t));for(const e in this.current)u(this,c,d).call(this,[i],e,!1)}}isTrue(t){return this.current[t]===!0}isFalse(t){return this.current[t]===!1}reset(){super.reset();for(const t in this.initial)this.set(t,this.initial[t])}set(t,i){const e=t;this.current=L(S({},this.current),{[t]:i}),e.startsWith("--")?i?n(this,h).forEach(o=>o.style.setProperty(e,i.toString())):n(this,h).forEach(o=>o.style.removeProperty(e)):i?n(this,h).forEach(o=>o.classList.add(e)):n(this,h).forEach(o=>o.classList.remove(e))}}h=new WeakMap,c=new WeakSet,d=function(t,i,e){i.startsWith("--")?e?t.forEach(o=>o.style.setProperty(i,e.toString())):t.forEach(o=>o.style.removeProperty(i)):e?t.forEach(o=>o.classList.add(i)):t.forEach(o=>o.classList.remove(i))};exports.ElementLinkedStore=A;
@@ -15,9 +15,9 @@ var E = (s, r, t) => r in s ? S(s, r, { enumerable: !0, configurable: !0, writab
15
15
  }, L = (s, r) => P(s, g(r));
16
16
  var f = (s, r, t) => r.has(s) || y("Cannot " + t);
17
17
  var c = (s, r, t) => (f(s, r, "read from private field"), t ? t.call(s) : r.get(s)), a = (s, r, t) => r.has(s) ? y("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, t), l = (s, r, t, i) => (f(s, r, "write to private field"), i ? i.call(s, t) : r.set(s, t), t), d = (s, r, t) => (f(s, r, "access private method"), t);
18
- import { S as W } from "../Store-0BVty6AZ.js";
18
+ import { S as W } from "../Store-BtVtCGLk.js";
19
19
  import "construct-style-sheets-polyfill";
20
- import "../index-Bv9zgfdb.js";
20
+ import "../index-JqYHGoo6.js";
21
21
  var h, n, p;
22
22
  class j extends W {
23
23
  constructor(t, i) {
@@ -1 +1 @@
1
- "use strict";var h=r=>{throw TypeError(r)};var y=(r,s,t)=>s.has(r)||h("Cannot "+t);var n=(r,s,t)=>(y(r,s,"read from private field"),t?t.call(r):s.get(r)),u=(r,s,t)=>s.has(r)?h("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),f=(r,s,t,e)=>(y(r,s,"write to private field"),e?e.call(r,t):s.set(r,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../index-DekP7OZe.cjs"),v=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");var i,o,b;class d{constructor(){u(this,i,[]);u(this,o,null);u(this,b,s=>{n(this,i).map(e=>({subscriber:e,entry:s.find(l=>l.target===e.element)})).forEach(e=>{e.entry&&(e.subscriber.entry=e.entry,e.subscriber.callback(e.entry))})});z.isBrowser&&window.ResizeObserver&&f(this,o,new ResizeObserver(n(this,b)))}subscribe(s,t){const e=v.getElement(s);if(!e)return()=>{};const l=n(this,i).find(c=>c.element===e);if(!l)n(this,o).observe(e);else{const c=n(this,i).find(m=>m.element===e&&m.entry);c!=null&&c.element.isConnected&&t(c.entry)}return n(this,i).push({element:e,callback:t,entry:(l==null?void 0:l.entry)||null}),()=>{this.unsubscribe(t)}}unsubscribe(s){const t=n(this,i).find(e=>e.callback===s);t&&(f(this,i,n(this,i).filter(e=>e.callback!==t.callback)),n(this,i).find(e=>e.element===t.element)||n(this,o).unobserve(t.element))}}i=new WeakMap,o=new WeakMap,b=new WeakMap;const w=new d;exports.ElementResizer=d;exports.elementResizer=w;
1
+ "use strict";var h=r=>{throw TypeError(r)};var y=(r,s,t)=>s.has(r)||h("Cannot "+t);var n=(r,s,t)=>(y(r,s,"read from private field"),t?t.call(r):s.get(r)),u=(r,s,t)=>s.has(r)?h("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),f=(r,s,t,e)=>(y(r,s,"write to private field"),e?e.call(r,t):s.set(r,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../index-CKTweR3M.cjs"),v=require("../dom-hTEdqeoj.cjs");require("construct-style-sheets-polyfill");var i,o,b;class d{constructor(){u(this,i,[]);u(this,o,null);u(this,b,s=>{n(this,i).map(e=>({subscriber:e,entry:s.find(l=>l.target===e.element)})).forEach(e=>{e.entry&&(e.subscriber.entry=e.entry,e.subscriber.callback(e.entry))})});z.isBrowser&&window.ResizeObserver&&f(this,o,new ResizeObserver(n(this,b)))}subscribe(s,t){const e=v.getElement(s);if(!e)return()=>{};const l=n(this,i).find(c=>c.element===e);if(!l)n(this,o).observe(e);else{const c=n(this,i).find(m=>m.element===e&&m.entry);c!=null&&c.element.isConnected&&t(c.entry)}return n(this,i).push({element:e,callback:t,entry:(l==null?void 0:l.entry)||null}),()=>{this.unsubscribe(t)}}unsubscribe(s){const t=n(this,i).find(e=>e.callback===s);t&&(f(this,i,n(this,i).filter(e=>e.callback!==t.callback)),n(this,i).find(e=>e.element===t.element)||n(this,o).unobserve(t.element))}}i=new WeakMap,o=new WeakMap,b=new WeakMap;const w=new d;exports.ElementResizer=d;exports.elementResizer=w;
@@ -3,8 +3,8 @@ var h = (r) => {
3
3
  };
4
4
  var y = (r, t, s) => t.has(r) || h("Cannot " + s);
5
5
  var n = (r, t, s) => (y(r, t, "read from private field"), s ? s.call(r) : t.get(r)), b = (r, t, s) => t.has(r) ? h("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, s), u = (r, t, s, e) => (y(r, t, "write to private field"), e ? e.call(r, s) : t.set(r, s), s);
6
- import { i as p } from "../index-Bv9zgfdb.js";
7
- import { g as w } from "../dom-CVWzyXPH.js";
6
+ import { i as p } from "../index-JqYHGoo6.js";
7
+ import { g as w } from "../dom-fgxIeFxm.js";
8
8
  import "construct-style-sheets-polyfill";
9
9
  var i, c, f;
10
10
  class z {
package/lib/en3/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var p=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var B=i=>{throw TypeError(i)};var $=(i,e,r)=>e in i?p(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,I=(i,e)=>{for(var r in e||(e={}))re.call(e,r)&&$(i,r,e[r]);if(N)for(var r of N(e))se.call(e,r)&&$(i,r,e[r]);return i},W=(i,e)=>ee(i,te(e));var G=(i,e,r)=>e.has(i)||B("Cannot "+r);var t=(i,e,r)=>(G(i,e,"read from private field"),r?r.call(i):e.get(i)),c=(i,e,r)=>e.has(i)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,r),n=(i,e,r,s)=>(G(i,e,"write to private field"),s?s.call(i,r):e.set(i,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("three"),K=require("../order/index.cjs"),U=require("../window-resizer/index.cjs"),Z=require("../ticker/index.cjs"),Q=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");require("../index-DekP7OZe.cjs");const J=require("../layout-box/index.cjs"),ie=require("../function-MthRj-GJ.cjs");function X(i){const e=r=>{r.dispose();for(const s of Object.keys(r)){const h=r[s];h&&typeof h=="object"&&"minFilter"in h&&h.dispose()}};i.traverse(r=>{if(r instanceof m.Mesh){if(r.geometry.dispose(),!Array.isArray(r.material)&&r.material.isMaterial)e(r.material);else if(Array.isArray(r.material))for(const s of r.material)e(s)}})}var S,D,a,R,g,o,x,w,y,z;class H{constructor(e,r,s){c(this,S);c(this,D);c(this,a);c(this,R);c(this,g);c(this,o);c(this,x);c(this,w);c(this,y);c(this,z,ie.debounce(()=>{this.resize()},0));n(this,S,e),n(this,D,r),n(this,a,(s==null?void 0:s.cameraType)==="orthographic"?new m.OrthographicCamera:new m.PerspectiveCamera),n(this,R,new m.Scene),n(this,g,[]),n(this,o,(s==null?void 0:s.cameraDistance)||1e3),t(this,a).near=(s==null?void 0:s.cameraNear)||1,t(this,a).far=(s==null?void 0:s.cameraFar)||11e3,n(this,x,(s==null?void 0:s.cameraFov)||"auto"),t(this,a).position.z=t(this,o),t(this,a).name=`Cameras.${t(this,D)}`,n(this,w,Q.getElement(s==null?void 0:s.sizeElement)||document.documentElement),this.beforeRenderCallback=s==null?void 0:s.beforeRender,n(this,y,new J.LayoutBox(t(this,w))),t(this,y).onResize(()=>{this.resize()})}get name(){return t(this,D)}get camera(){return t(this,a)}get scene(){return t(this,R)}get box(){return t(this,y)}get cameraDistance(){return t(this,o)}set cameraDistance(e){n(this,o,e),t(this,z).call(this)}set fov(e){n(this,x,e),t(this,z).call(this)}get fov(){return t(this,x)}set near(e){t(this,a).near=e,t(this,z).call(this)}get near(){return t(this,a).near}set far(e){t(this,a).far=e,t(this,z).call(this)}get far(){return t(this,a).far}get sizeElement(){return t(this,w)}get isClipped(){return t(this,w)!==t(this,S).containerElement}resize(){const{width:e,height:r}=t(this,y);t(this,a).userData.controlled||(t(this,a).position.z=t(this,o)),t(this,a)instanceof m.PerspectiveCamera?(t(this,a).aspect=e/r,t(this,a).fov=t(this,x)==="auto"?2*Math.atan(r/2/t(this,o))*(180/Math.PI):t(this,a).userData.controlled?t(this,a).fov:t(this,x)):t(this,a)instanceof m.OrthographicCamera&&(t(this,a).left=e/-2,t(this,a).right=e/2,t(this,a).top=r/2,t(this,a).bottom=r/-2),t(this,a).updateProjectionMatrix()}destroy(){t(this,g).forEach(e=>{e.userData.box.destroy()}),t(this,R).clear(),X(t(this,R)),t(this,S).destroyView(this.name),t(this,y).destroy()}attachToHTMLElement(e,r,s){const h=new J.LayoutBox(e,W(I({},s),{containerElement:t(this,w),cartesian:!0,scrollStep:!this.isClipped}));return h.bindObject(r),r.userData.box=h,t(this,g).push(r),r}detachFromHTMLElement(e){n(this,g,t(this,g).filter(r=>r===e?(e.userData.box.destroy(),!1):!0))}add(...e){const r=e[0],s=e[1],h=e[2];return s&&this.attachToHTMLElement(s,r,h),this.scene.add(r),r}remove(e,r){this.scene.remove(e),r&&this.detachFromHTMLElement(e)}}S=new WeakMap,D=new WeakMap,a=new WeakMap,R=new WeakMap,g=new WeakMap,o=new WeakMap,x=new WeakMap,w=new WeakMap,y=new WeakMap,z=new WeakMap;var q,d,l,u,V,C,M,P,T,f,A,L;class ae{constructor(){c(this,q,`https://unpkg.com/three@0.${m.REVISION}.x`);c(this,d,null);c(this,l,null);c(this,u,new Map);c(this,V,0);c(this,C,0);c(this,M,0);c(this,P,2);c(this,T,!1);c(this,f,null);c(this,A,e=>{e instanceof CustomEvent||(n(this,V,t(this,d).clientWidth),n(this,C,t(this,d).clientHeight),n(this,M,Math.min(t(this,P),devicePixelRatio||1)),t(this,l).setPixelRatio(t(this,M)),t(this,l).setSize(t(this,V),t(this,C)),t(this,f)&&(t(this,f).setPixelRatio(t(this,M)),t(this,f).setSize(t(this,V),t(this,C))))});c(this,L,()=>{t(this,l).setRenderTarget(null),t(this,u).forEach(e=>{this.render(e)})})}get CDNVersion(){return t(this,q)}get containerElement(){return t(this,d)}get webglRenderer(){return t(this,l)}get views(){return t(this,u)}get view(){return this.getView("default")}get camera(){return this.getView("default").camera}get scene(){return this.getView("default").scene}get width(){return t(this,V)}get height(){return t(this,C)}get pixelRatio(){return t(this,M)}get composer(){return t(this,f)}setup(e){if(t(this,T))return;n(this,d,Q.getElement(e==null?void 0:e.containerElement)||document.body),n(this,P,(e==null?void 0:e.maxPixelRatio)||2),n(this,l,new m.WebGLRenderer(e==null?void 0:e.webGLRendererParameters)),t(this,l).domElement.style.cssText=`
1
+ "use strict";var p=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var B=i=>{throw TypeError(i)};var $=(i,e,r)=>e in i?p(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,I=(i,e)=>{for(var r in e||(e={}))re.call(e,r)&&$(i,r,e[r]);if(N)for(var r of N(e))se.call(e,r)&&$(i,r,e[r]);return i},W=(i,e)=>ee(i,te(e));var G=(i,e,r)=>e.has(i)||B("Cannot "+r);var t=(i,e,r)=>(G(i,e,"read from private field"),r?r.call(i):e.get(i)),c=(i,e,r)=>e.has(i)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,r),n=(i,e,r,s)=>(G(i,e,"write to private field"),s?s.call(i,r):e.set(i,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("three"),K=require("../order/index.cjs"),U=require("../window-resizer/index.cjs"),Z=require("../ticker/index.cjs"),Q=require("../dom-hTEdqeoj.cjs");require("construct-style-sheets-polyfill");require("../index-CKTweR3M.cjs");const J=require("../layout-box/index.cjs"),ie=require("../function-MthRj-GJ.cjs");function X(i){const e=r=>{r.dispose();for(const s of Object.keys(r)){const h=r[s];h&&typeof h=="object"&&"minFilter"in h&&h.dispose()}};i.traverse(r=>{if(r instanceof m.Mesh){if(r.geometry.dispose(),!Array.isArray(r.material)&&r.material.isMaterial)e(r.material);else if(Array.isArray(r.material))for(const s of r.material)e(s)}})}var S,D,a,R,g,o,x,w,y,z;class H{constructor(e,r,s){c(this,S);c(this,D);c(this,a);c(this,R);c(this,g);c(this,o);c(this,x);c(this,w);c(this,y);c(this,z,ie.debounce(()=>{this.resize()},0));n(this,S,e),n(this,D,r),n(this,a,(s==null?void 0:s.cameraType)==="orthographic"?new m.OrthographicCamera:new m.PerspectiveCamera),n(this,R,new m.Scene),n(this,g,[]),n(this,o,(s==null?void 0:s.cameraDistance)||1e3),t(this,a).near=(s==null?void 0:s.cameraNear)||1,t(this,a).far=(s==null?void 0:s.cameraFar)||11e3,n(this,x,(s==null?void 0:s.cameraFov)||"auto"),t(this,a).position.z=t(this,o),t(this,a).name=`Cameras.${t(this,D)}`,n(this,w,Q.getElement(s==null?void 0:s.sizeElement)||document.documentElement),this.beforeRenderCallback=s==null?void 0:s.beforeRender,n(this,y,new J.LayoutBox(t(this,w))),t(this,y).onResize(()=>{this.resize()})}get name(){return t(this,D)}get camera(){return t(this,a)}get scene(){return t(this,R)}get box(){return t(this,y)}get cameraDistance(){return t(this,o)}set cameraDistance(e){n(this,o,e),t(this,z).call(this)}set fov(e){n(this,x,e),t(this,z).call(this)}get fov(){return t(this,x)}set near(e){t(this,a).near=e,t(this,z).call(this)}get near(){return t(this,a).near}set far(e){t(this,a).far=e,t(this,z).call(this)}get far(){return t(this,a).far}get sizeElement(){return t(this,w)}get isClipped(){return t(this,w)!==t(this,S).containerElement}resize(){const{width:e,height:r}=t(this,y);t(this,a).userData.controlled||(t(this,a).position.z=t(this,o)),t(this,a)instanceof m.PerspectiveCamera?(t(this,a).aspect=e/r,t(this,a).fov=t(this,x)==="auto"?2*Math.atan(r/2/t(this,o))*(180/Math.PI):t(this,a).userData.controlled?t(this,a).fov:t(this,x)):t(this,a)instanceof m.OrthographicCamera&&(t(this,a).left=e/-2,t(this,a).right=e/2,t(this,a).top=r/2,t(this,a).bottom=r/-2),t(this,a).updateProjectionMatrix()}destroy(){t(this,g).forEach(e=>{e.userData.box.destroy()}),t(this,R).clear(),X(t(this,R)),t(this,S).destroyView(this.name),t(this,y).destroy()}attachToHTMLElement(e,r,s){const h=new J.LayoutBox(e,W(I({},s),{containerElement:t(this,w),cartesian:!0,scrollStep:!this.isClipped}));return h.bindObject(r),r.userData.box=h,t(this,g).push(r),r}detachFromHTMLElement(e){n(this,g,t(this,g).filter(r=>r===e?(e.userData.box.destroy(),!1):!0))}add(...e){const r=e[0],s=e[1],h=e[2];return s&&this.attachToHTMLElement(s,r,h),this.scene.add(r),r}remove(e,r){this.scene.remove(e),r&&this.detachFromHTMLElement(e)}}S=new WeakMap,D=new WeakMap,a=new WeakMap,R=new WeakMap,g=new WeakMap,o=new WeakMap,x=new WeakMap,w=new WeakMap,y=new WeakMap,z=new WeakMap;var q,d,l,u,V,C,M,P,T,f,A,L;class ae{constructor(){c(this,q,`https://unpkg.com/three@0.${m.REVISION}.x`);c(this,d,null);c(this,l,null);c(this,u,new Map);c(this,V,0);c(this,C,0);c(this,M,0);c(this,P,2);c(this,T,!1);c(this,f,null);c(this,A,e=>{e instanceof CustomEvent||(n(this,V,t(this,d).clientWidth),n(this,C,t(this,d).clientHeight),n(this,M,Math.min(t(this,P),devicePixelRatio||1)),t(this,l).setPixelRatio(t(this,M)),t(this,l).setSize(t(this,V),t(this,C)),t(this,f)&&(t(this,f).setPixelRatio(t(this,M)),t(this,f).setSize(t(this,V),t(this,C))))});c(this,L,()=>{t(this,l).setRenderTarget(null),t(this,u).forEach(e=>{this.render(e)})})}get CDNVersion(){return t(this,q)}get containerElement(){return t(this,d)}get webglRenderer(){return t(this,l)}get views(){return t(this,u)}get view(){return this.getView("default")}get camera(){return this.getView("default").camera}get scene(){return this.getView("default").scene}get width(){return t(this,V)}get height(){return t(this,C)}get pixelRatio(){return t(this,M)}get composer(){return t(this,f)}setup(e){if(t(this,T))return;n(this,d,Q.getElement(e==null?void 0:e.containerElement)||document.body),n(this,P,(e==null?void 0:e.maxPixelRatio)||2),n(this,l,new m.WebGLRenderer(e==null?void 0:e.webGLRendererParameters)),t(this,l).domElement.style.cssText=`
2
2
  position: ${(e==null?void 0:e.position)||"fixed"};
3
3
  left: 0;
4
4
  top: 0;
package/lib/en3/index.js CHANGED
@@ -19,9 +19,9 @@ import { Mesh as $, OrthographicCamera as N, PerspectiveCamera as Z, Scene as he
19
19
  import { RESIZE_ORDER as ce, TICK_ORDER as le } from "../order/index.js";
20
20
  import { windowResizer as q } from "../window-resizer/index.js";
21
21
  import { ticker as J } from "../ticker/index.js";
22
- import { g as Y } from "../dom-CVWzyXPH.js";
22
+ import { g as Y } from "../dom-fgxIeFxm.js";
23
23
  import "construct-style-sheets-polyfill";
24
- import "../index-Bv9zgfdb.js";
24
+ import "../index-JqYHGoo6.js";
25
25
  import { LayoutBox as Q } from "../layout-box/index.js";
26
26
  import { d as me } from "../function-C10DGppn.js";
27
27
  function fe(r) {
@@ -1 +1 @@
1
- "use strict";var u=r=>{throw TypeError(r)};var a=(r,t,e)=>t.has(r)||u("Cannot "+e);var s=(r,t,e)=>(a(r,t,"read from private field"),e?e.call(r):t.get(r)),o=(r,t,e)=>t.has(r)?u("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),c=(r,t,e,i)=>(a(r,t,"write to private field"),i?i.call(r,e):t.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../SourceElement-VVdVc1d-.cjs");require("../window-resizer/index.cjs");require("../Store-Cd1GlEmZ.cjs");const f=require("../index-DekP7OZe.cjs");require("construct-style-sheets-polyfill");var n,l,m;class E extends h.SourceElement{constructor(){super({sourceSetOptions:{mediaBuckets:!1}});o(this,n,null);o(this,l,()=>{var e,i;(i=(e=this.consumerElement).onload)==null||i.call(e,new Event("load"))});o(this,m,()=>{var e,i;(i=(e=this.consumerElement).onload)==null||i.call(e,new Event("error"))})}createConsumer(){return document.createElement("div")}consumeSource(e){s(this,n)&&(s(this,n).onload=null,s(this,n).onerror=null),this.consumerElement.innerHTML=(e==null?void 0:e.replace(/\\u003C/g,"<").replace(/\\u003E/g,">").replace(/\\"/g,'"'))||"",c(this,n,this.consumerElement.querySelector("iframe")),s(this,n)&&(s(this,n).onload=s(this,l),s(this,n).onerror=s(this,m))}}n=new WeakMap,l=new WeakMap,m=new WeakMap;f.isBrowser&&!customElements.get("e-iframe")&&customElements.define("e-iframe",E);exports.IFrameElement=E;
1
+ "use strict";var u=r=>{throw TypeError(r)};var a=(r,t,e)=>t.has(r)||u("Cannot "+e);var s=(r,t,e)=>(a(r,t,"read from private field"),e?e.call(r):t.get(r)),o=(r,t,e)=>t.has(r)?u("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),c=(r,t,e,i)=>(a(r,t,"write to private field"),i?i.call(r,e):t.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../SourceElement-BBfaAgwe.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const f=require("../index-CKTweR3M.cjs");require("construct-style-sheets-polyfill");var n,l,m;class E extends h.SourceElement{constructor(){super({sourceSetOptions:{mediaBuckets:!1}});o(this,n,null);o(this,l,()=>{var e,i;(i=(e=this.consumerElement).onload)==null||i.call(e,new Event("load"))});o(this,m,()=>{var e,i;(i=(e=this.consumerElement).onload)==null||i.call(e,new Event("error"))})}createConsumer(){return document.createElement("div")}consumeSource(e){s(this,n)&&(s(this,n).onload=null,s(this,n).onerror=null),this.consumerElement.innerHTML=(e==null?void 0:e.replace(/\\u003C/g,"<").replace(/\\u003E/g,">").replace(/\\"/g,'"'))||"",c(this,n,this.consumerElement.querySelector("iframe")),s(this,n)&&(s(this,n).onload=s(this,l),s(this,n).onerror=s(this,m))}}n=new WeakMap,l=new WeakMap,m=new WeakMap;f.isBrowser&&!customElements.get("e-iframe")&&customElements.define("e-iframe",E);exports.IFrameElement=E;
@@ -3,10 +3,10 @@ var a = (r) => {
3
3
  };
4
4
  var u = (r, t, e) => t.has(r) || a("Cannot " + e);
5
5
  var s = (r, t, e) => (u(r, t, "read from private field"), e ? e.call(r) : t.get(r)), i = (r, t, e) => t.has(r) ? a("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), c = (r, t, e, o) => (u(r, t, "write to private field"), o ? o.call(r, e) : t.set(r, e), e);
6
- import { a as E } from "../SourceElement-BnMxiOqY.js";
6
+ import { a as E } from "../SourceElement-BiNNtaz9.js";
7
7
  import "../window-resizer/index.js";
8
- import "../Store-0BVty6AZ.js";
9
- import { i as f } from "../index-Bv9zgfdb.js";
8
+ import "../Store-BtVtCGLk.js";
9
+ import { i as f } from "../index-JqYHGoo6.js";
10
10
  import "construct-style-sheets-polyfill";
11
11
  var n, m, l;
12
12
  class h extends E {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../Viewport-DB0qAZPJ.cjs"),i=require("../SourceElement-VVdVc1d-.cjs");require("../window-resizer/index.cjs");require("../Store-Cd1GlEmZ.cjs");const n=require("../index-DekP7OZe.cjs");require("construct-style-sheets-polyfill");class t extends i.SourceElement{createConsumer(){return document.createElement("img")}consumeSource(e){if(e&&this.hasAttribute("webp")&&s.device.isWebp){const r=e.split(".").slice(0,-1).join(".")+".webp";this.consumerElement.src=r}else this.consumerElement.src=e||""}}n.isBrowser&&!customElements.get("e-image")&&customElements.define("e-image",t);exports.ImageElement=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../Viewport-Cx50Hufs.cjs"),i=require("../SourceElement-BBfaAgwe.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const n=require("../index-CKTweR3M.cjs");require("construct-style-sheets-polyfill");class t extends i.SourceElement{createConsumer(){return document.createElement("img")}consumeSource(e){if(e&&this.hasAttribute("webp")&&s.device.isWebp){const r=e.split(".").slice(0,-1).join(".")+".webp";this.consumerElement.src=r}else this.consumerElement.src=e||""}}n.isBrowser&&!customElements.get("e-image")&&customElements.define("e-image",t);exports.ImageElement=t;
@@ -1,8 +1,8 @@
1
- import { d as m } from "../Viewport-DA10iWAO.js";
2
- import { a as s } from "../SourceElement-BnMxiOqY.js";
1
+ import { d as m } from "../Viewport-DbN_JWBM.js";
2
+ import { a as s } from "../SourceElement-BiNNtaz9.js";
3
3
  import "../window-resizer/index.js";
4
- import "../Store-0BVty6AZ.js";
5
- import { i } from "../index-Bv9zgfdb.js";
4
+ import "../Store-BtVtCGLk.js";
5
+ import { i } from "../index-JqYHGoo6.js";
6
6
  import "construct-style-sheets-polyfill";
7
7
  class r extends s {
8
8
  createConsumer() {
@@ -1 +1 @@
1
- "use strict";var d=s=>{throw TypeError(s)};var w=(s,t,n)=>t.has(s)||d("Cannot "+n);var r=(s,t,n)=>(w(s,t,"read from private field"),n?n.call(s):t.get(s)),f=(s,t,n)=>t.has(s)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,n),h=(s,t,n,e)=>(w(s,t,"write to private field"),e?e.call(s,n):t.set(s,n),n);const p=require("./dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");const y=typeof window!="undefined"&&typeof window.document!="undefined";var i,u,b;class m{constructor(){f(this,i,[]);f(this,u,null);f(this,b,t=>{r(this,i).map(e=>({subscriber:e,entry:t.find(o=>o.target===e.element)})).forEach(e=>{e.entry&&(e.subscriber.entry=e.entry,e.subscriber.callback(e.entry))})});y&&window.IntersectionObserver&&h(this,u,new IntersectionObserver(r(this,b)))}subscribe(t,n){const e=p.getElement(t);if(!e)return()=>{};const o=r(this,i).find(c=>c.element===e);if(!o)r(this,u).observe(e);else{const c=r(this,i).find(l=>l.element===e&&l.entry);c!=null&&c.entry.isIntersecting&&n(c.entry)}return r(this,i).push({element:e,callback:n,entry:(o==null?void 0:o.entry)||null}),()=>{this.unsubscribe(n)}}unsubscribe(t){const n=r(this,i).find(e=>e.callback===t);n&&(h(this,i,r(this,i).filter(e=>e.callback!==t)),r(this,i).find(e=>e.element===n.element)||r(this,u).unobserve(n.element))}}i=new WeakMap,u=new WeakMap,b=new WeakMap;const v=new m;exports.Intersector=m;exports.intersector=v;exports.isBrowser=y;
1
+ "use strict";var d=s=>{throw TypeError(s)};var w=(s,t,n)=>t.has(s)||d("Cannot "+n);var r=(s,t,n)=>(w(s,t,"read from private field"),n?n.call(s):t.get(s)),f=(s,t,n)=>t.has(s)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,n),h=(s,t,n,e)=>(w(s,t,"write to private field"),e?e.call(s,n):t.set(s,n),n);const p=require("./dom-hTEdqeoj.cjs");require("construct-style-sheets-polyfill");const y=typeof window!="undefined"&&typeof window.document!="undefined";var i,u,b;class m{constructor(){f(this,i,[]);f(this,u,null);f(this,b,t=>{r(this,i).map(e=>({subscriber:e,entry:t.find(o=>o.target===e.element)})).forEach(e=>{e.entry&&(e.subscriber.entry=e.entry,e.subscriber.callback(e.entry))})});y&&window.IntersectionObserver&&h(this,u,new IntersectionObserver(r(this,b)))}subscribe(t,n){const e=p.getElement(t);if(!e)return()=>{};const o=r(this,i).find(c=>c.element===e);if(!o)r(this,u).observe(e);else{const c=r(this,i).find(l=>l.element===e&&l.entry);c!=null&&c.entry.isIntersecting&&n(c.entry)}return r(this,i).push({element:e,callback:n,entry:(o==null?void 0:o.entry)||null}),()=>{this.unsubscribe(n)}}unsubscribe(t){const n=r(this,i).find(e=>e.callback===t);n&&(h(this,i,r(this,i).filter(e=>e.callback!==t)),r(this,i).find(e=>e.element===n.element)||r(this,u).unobserve(n.element))}}i=new WeakMap,u=new WeakMap,b=new WeakMap;const v=new m;exports.Intersector=m;exports.intersector=v;exports.isBrowser=y;
@@ -3,7 +3,7 @@ var m = (s) => {
3
3
  };
4
4
  var y = (s, t, n) => t.has(s) || m("Cannot " + n);
5
5
  var i = (s, t, n) => (y(s, t, "read from private field"), n ? n.call(s) : t.get(s)), u = (s, t, n) => t.has(s) ? m("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, n), h = (s, t, n, e) => (y(s, t, "write to private field"), e ? e.call(s, n) : t.set(s, n), n);
6
- import { g as d } from "./dom-CVWzyXPH.js";
6
+ import { g as d } from "./dom-fgxIeFxm.js";
7
7
  import "construct-style-sheets-polyfill";
8
8
  const w = typeof window != "undefined" && typeof window.document != "undefined";
9
9
  var r, f, b;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-DekP7OZe.cjs");require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");exports.Intersector=e.Intersector;exports.intersector=e.intersector;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-CKTweR3M.cjs");require("../dom-hTEdqeoj.cjs");require("construct-style-sheets-polyfill");exports.Intersector=e.Intersector;exports.intersector=e.intersector;
@@ -1,5 +1,5 @@
1
- import { I as s, a } from "../index-Bv9zgfdb.js";
2
- import "../dom-CVWzyXPH.js";
1
+ import { I as s, a } from "../index-JqYHGoo6.js";
2
+ import "../dom-fgxIeFxm.js";
3
3
  import "construct-style-sheets-polyfill";
4
4
  export {
5
5
  s as Intersector,
@@ -0,0 +1,13 @@
1
+ export type ComponentConnectCallback = (element: HTMLElement) => void | ComponentDisconnectCallback;
2
+ export type ComponentDisconnectCallback = (element: HTMLElement) => void;
3
+ export declare const activeComponent: {
4
+ current: ComponentElement;
5
+ };
6
+ export declare class ComponentElement extends HTMLElement {
7
+ #private;
8
+ constructor();
9
+ addConnectCallback(callback: ComponentConnectCallback): void;
10
+ addDisconnectCallback(callback: ComponentDisconnectCallback): void;
11
+ protected connectedCallback(): void;
12
+ protected disconnectedCallback(): void;
13
+ }
package/lib/jsx/h.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export declare function appendChildren(element: Element, attributes: JSX.Attributes | undefined, children: JSX.Children): void;
2
+ export declare function h(jsxTag: string | Function, attributes?: JSX.Attributes, ...children: JSX.Children): any;
3
+ export declare function Fragment(children: any): DocumentFragment;
@@ -0,0 +1 @@
1
+ export declare function useRef<T>(): JSX.Ref<T>;
@@ -0,0 +1,4 @@
1
+ import { ComponentConnectCallback, ComponentDisconnectCallback } from '../../ComponentElement';
2
+ export declare function useComponent(callback?: ComponentConnectCallback): import('../../ComponentElement').ComponentElement;
3
+ export declare function useConnect(callback: ComponentConnectCallback): void;
4
+ export declare function useDisconnect(callback: ComponentDisconnectCallback): void;
@@ -0,0 +1,2 @@
1
+ export type UseInternalsCallback = (internals: ElementInternals) => void;
2
+ export declare function useInternals(callback?: UseInternalsCallback): ElementInternals;
@@ -0,0 +1,2 @@
1
+ export type UseShadowCallback = (shadowRoot: ShadowRoot) => void;
2
+ export declare function useShadow(init?: Partial<ShadowRootInit>, callback?: UseShadowCallback): ShadowRoot;
@@ -0,0 +1,8 @@
1
+ import type * as CSS from 'csstype';
2
+ export type UseStylesheetNestedObject = {
3
+ [key: string]: CSS.Properties | UseStylesheetNestedObject;
4
+ };
5
+ export type UseStylesheetSource = CSS.Properties | {
6
+ [key: string]: CSS.Properties | UseStylesheetNestedObject;
7
+ };
8
+ export declare function useStylesheet(source: UseStylesheetSource): void;
@@ -0,0 +1,8 @@
1
+ import { Composed, Derived, DerivedArray, Resource, Store } from '../../store';
2
+ import { DerivedKeyedArray } from '../../store/DerivedArray';
3
+ export declare function useStore<StoreType = unknown>(...parameters: ConstructorParameters<typeof Store<StoreType>>): Store<StoreType>;
4
+ export declare function useDerivedStore<Type, SourceType>(...parameters: ConstructorParameters<typeof Derived<Type, SourceType>>): Derived<Type, SourceType>;
5
+ export declare function useDerivedArrayStore<Type, SourceType extends Array<any>>(...parameters: ConstructorParameters<typeof DerivedArray<Type, SourceType>>): DerivedArray<Type, SourceType>;
6
+ export declare function useDerivedKeyedArrayStore<Type, SourceType extends Array<any>>(...parameters: ConstructorParameters<typeof DerivedKeyedArray<Type, SourceType>>): DerivedKeyedArray<Type, SourceType>;
7
+ export declare function useResourceStore<Type>(...parameters: ConstructorParameters<typeof Resource<Type>>): Resource<Type>;
8
+ export declare function useComposedStore<Type>(...parameters: ConstructorParameters<typeof Composed<Type>>): Composed<Type>;
@@ -0,0 +1 @@
1
+ "use strict";var y=Object.defineProperty;var d=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var l=(t,e,o)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,f=(t,e)=>{for(var o in e||(e={}))p.call(e,o)&&l(t,o,e[o]);if(d)for(var o of d(e))v.call(e,o)&&l(t,o,e[o]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../render-Rv0UMACs.cjs"),h=require("../string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");require("../index-CKTweR3M.cjs");const D=require("../Store-1JrMCgdX.cjs"),a=require("../Composed-CSeUTRCg.cjs"),S=require("../DerivedArray-B8A0-8uT.cjs");function w(){return{value:null}}function m(t){n.activeComponent.current.addConnectCallback(t)}function R(t){n.activeComponent.current.addDisconnectCallback(t)}function A(t){const e=n.activeComponent.current.attachInternals();return t==null||t(e),e}function x(t,e){const o=n.activeComponent.current.attachShadow(f({mode:"open"},t));return e==null||e(o),o}function C(t){const e=new CSSStyleSheet;return e.replaceSync(t),e}function g(t){let e="";const o=(s,r)=>{r&&(e+=`${r} {`);for(const[u,c]of Object.entries(s))typeof c=="object"&&c!==null?o(c,u):e+=`${h.camelToKebab(u)}: ${c};`;r&&(e+="}")};return o(t),e}function T(t,e){const o=C(e),s=[];for(const r of t.adoptedStyleSheets)Array.from(o.cssRules).filter(c=>!Array.from(r.cssRules).some(i=>i.cssText===c.cssText)).forEach(c=>{const i=r.insertRule(c.cssText);s.push(()=>r.deleteRule(i))});return()=>s.forEach(r=>r())}function b(t){const e=document.createElement("style");return e.textContent=t,document.head.appendChild(e),()=>e.remove()}function q(t){const e=g(t);if(n.activeComponent.current.shadowRoot){n.activeComponent.current.shadowRoot.adoptedStyleSheets=[...n.activeComponent.current.shadowRoot.adoptedStyleSheets,C(e)];return}m(o=>{const s=o.getRootNode();if(s===document){if(!Array.from(document.head.querySelectorAll("style")).find(u=>u.textContent===e))return b(e)}else if(s instanceof ShadowRoot)return T(s,e)})}function j(...t){const e=new D.Store(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}function E(...t){const e=new a.Derived(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}function K(...t){const e=new S.DerivedArray(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}function I(...t){const e=new S.DerivedKeyedArray(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}function O(...t){const e=new a.Resource(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}function $(...t){const e=new a.Composed(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}exports.Fragment=n.Fragment;exports.h=n.h;exports.render=n.render;exports.useComposedStore=$;exports.useConnect=m;exports.useDerivedArrayStore=K;exports.useDerivedKeyedArrayStore=I;exports.useDerivedStore=E;exports.useDisconnect=R;exports.useInternals=A;exports.useRef=w;exports.useResourceStore=O;exports.useShadow=x;exports.useStore=j;exports.useStylesheet=q;
@@ -0,0 +1,9 @@
1
+ export { type ComponentConnectCallback, type ComponentDisconnectCallback, } from './ComponentElement';
2
+ export { Fragment, h } from './h';
3
+ export { useRef } from './hooks/common';
4
+ export { useConnect, useDisconnect } from './hooks/component/lifecycle';
5
+ export { useInternals, type UseInternalsCallback, } from './hooks/component/useInternals';
6
+ export { useShadow, type UseShadowCallback } from './hooks/component/useShadow';
7
+ export { useStylesheet, type UseStylesheetNestedObject, type UseStylesheetSource, } from './hooks/component/useStylesheet';
8
+ export { useComposedStore, useDerivedArrayStore, useDerivedKeyedArrayStore, useDerivedStore, useResourceStore, useStore, } from './hooks/store';
9
+ export { render } from './render';