aptechka 0.8.3 → 0.9.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 (166) hide show
  1. package/lib/{Animation-BInSRYNr.cjs → Animation-BCA-DBje.cjs} +1 -1
  2. package/lib/{Animation-uimN7sdT.js → Animation-DrSYnbgb.js} +1 -1
  3. package/lib/{Composed-Iihn8fT4.cjs → Composed-7Fe7TW_T.cjs} +1 -1
  4. package/lib/{Composed-Fa7owymK.js → Composed-pnupzTOv.js} +1 -1
  5. package/lib/{Damped-yrNXlkDE.js → Damped-C2FuK_3K.js} +1 -1
  6. package/lib/{Damped-Da3EnNN4.cjs → Damped-CSEZ0qwp.cjs} +1 -1
  7. package/lib/{Derived-DIWinC7Y.js → Derived-CFnbeEgJ.js} +1 -1
  8. package/lib/{Derived-D9VrDuf9.cjs → Derived-Dko3EP7m.cjs} +1 -1
  9. package/lib/ElementConstructor-9S0f1yAH.cjs +1 -0
  10. package/lib/ElementConstructor-CZKbNIQK.js +366 -0
  11. package/lib/Resource-BhF6Tj1p.js +49 -0
  12. package/lib/Resource-WCQEgLpB.cjs +1 -0
  13. package/lib/{SourceManager--L_rA28b.js → SourceManager-CmhlHGx7.js} +1 -1
  14. package/lib/{SourceManager-D6D2LVKf.cjs → SourceManager-DYnGpBi1.cjs} +1 -1
  15. package/lib/{Store-Qr3SNOSf.js → Store-Dsft7GtM.js} +1 -1
  16. package/lib/{Store-Cr3VaD9G.cjs → Store-kzJycezD.cjs} +1 -1
  17. package/lib/{Tweened-CjgvoOwL.js → Tweened-BrD2cPSC.js} +1 -1
  18. package/lib/{Tweened-DksN-Rz6.cjs → Tweened-D6dAu8Zi.cjs} +1 -1
  19. package/lib/{Viewport-BBYt1Ivy.cjs → Viewport-DRNfjjDY.cjs} +1 -1
  20. package/lib/{Viewport-Cgtq2I_K.js → Viewport-Ud7nellV.js} +1 -1
  21. package/lib/_createStore-Cf1MyeHa.cjs +1 -0
  22. package/lib/_createStore-Ck9bHolX.js +12 -0
  23. package/lib/accordion/AccordionElement.d.ts +1 -2
  24. package/lib/accordion/index.cjs +1 -1
  25. package/lib/accordion/index.js +110 -122
  26. package/lib/animation/index.cjs +1 -1
  27. package/lib/animation/index.js +3 -3
  28. package/lib/attribute/index.cjs +1 -1
  29. package/lib/attribute/index.js +1 -1
  30. package/lib/canvas/index.cjs +1 -1
  31. package/lib/canvas/index.d.ts +1 -2
  32. package/lib/canvas/index.js +69 -75
  33. package/lib/checkbox/index.cjs +1 -1
  34. package/lib/checkbox/index.d.ts +1 -3
  35. package/lib/checkbox/index.js +42 -46
  36. package/lib/class-linked-status/index.cjs +1 -1
  37. package/lib/class-linked-status/index.js +1 -1
  38. package/lib/controls/index.cjs +1 -1
  39. package/lib/controls/index.js +2 -2
  40. package/lib/counter/index.d.ts +1 -3
  41. package/lib/{createStylesheet-BxKITIVV.js → createStylesheet-C2gpLy4r.js} +1 -1
  42. package/lib/{createStylesheet-BsMSWX0q.cjs → createStylesheet-Di9WRypw.cjs} +1 -1
  43. package/lib/css-property/index.cjs +1 -1
  44. package/lib/css-property/index.js +1 -1
  45. package/lib/dev/index.cjs +1 -1
  46. package/lib/dev/index.js +1 -1
  47. package/lib/device/index.cjs +1 -1
  48. package/lib/device/index.js +1 -1
  49. package/lib/element-constructor/index.cjs +1 -1
  50. package/lib/element-constructor/index.js +114 -113
  51. package/lib/en3/helpers/index.cjs +1 -1
  52. package/lib/en3/helpers/index.js +2 -2
  53. package/lib/en3/misc/index.cjs +1 -1
  54. package/lib/en3/misc/index.js +2 -2
  55. package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -2
  56. package/lib/globals-DMjysUXI.js +8 -0
  57. package/lib/globals-bYKki-b9.cjs +1 -0
  58. package/lib/image/index.cjs +1 -1
  59. package/lib/image/index.js +8 -16
  60. package/lib/index-BtB-3MG7.js +265 -0
  61. package/lib/index-DQo2-dnB.cjs +9 -0
  62. package/lib/instantiate-BPZZn8jK.js +134 -0
  63. package/lib/instantiate-BWM-ipPW.cjs +1 -0
  64. package/lib/jsx/ComponentElement.d.ts +18 -0
  65. package/lib/jsx/globals.d.ts +13 -0
  66. package/lib/jsx/h.d.ts +6 -0
  67. package/lib/jsx/hooks/basic/_createStore.d.ts +4 -0
  68. package/lib/jsx/hooks/basic/attachInternals.d.ts +1 -0
  69. package/lib/jsx/hooks/basic/attachShadow.d.ts +1 -0
  70. package/lib/jsx/hooks/basic/attachStylesheet.d.ts +3 -0
  71. package/lib/jsx/hooks/basic/createContext.d.ts +2 -0
  72. package/lib/jsx/hooks/basic/onConnect.d.ts +3 -0
  73. package/lib/jsx/hooks/basic/onDisconnect.d.ts +3 -0
  74. package/lib/jsx/hooks/onAnimationFrame.cjs +1 -0
  75. package/lib/jsx/hooks/onAnimationFrame.d.ts +6 -0
  76. package/lib/jsx/hooks/onAnimationFrame.js +22 -0
  77. package/lib/jsx/hooks/onElementResize.cjs +1 -0
  78. package/lib/jsx/hooks/onElementResize.d.ts +5 -0
  79. package/lib/jsx/hooks/onElementResize.js +11 -0
  80. package/lib/jsx/hooks/onIntersection.cjs +1 -0
  81. package/lib/jsx/hooks/onIntersection.d.ts +5 -0
  82. package/lib/jsx/hooks/onIntersection.js +11 -0
  83. package/lib/jsx/hooks/onWindowResize.cjs +1 -0
  84. package/lib/jsx/hooks/onWindowResize.d.ts +3 -0
  85. package/lib/jsx/hooks/onWindowResize.js +8 -0
  86. package/lib/jsx/hooks/store/createComposed.d.ts +3 -0
  87. package/lib/jsx/hooks/store/createDerived.d.ts +3 -0
  88. package/lib/jsx/hooks/store/createDerivedArray.d.ts +3 -0
  89. package/lib/jsx/hooks/store/createResource.d.ts +3 -0
  90. package/lib/jsx/hooks/store/createStore.d.ts +3 -0
  91. package/lib/jsx/hooks/store/index.cjs +1 -0
  92. package/lib/jsx/hooks/store/index.d.ts +5 -0
  93. package/lib/jsx/hooks/store/index.js +27 -0
  94. package/lib/jsx/hooks/watchAttribute.cjs +1 -0
  95. package/lib/jsx/hooks/watchAttribute.d.ts +6 -0
  96. package/lib/jsx/hooks/watchAttribute.js +17 -0
  97. package/lib/jsx/hooks/watchCSSProperty.cjs +1 -0
  98. package/lib/jsx/hooks/watchCSSProperty.d.ts +7 -0
  99. package/lib/jsx/hooks/watchCSSProperty.js +17 -0
  100. package/lib/jsx/index.cjs +1 -0
  101. package/lib/jsx/index.d.ts +13 -0
  102. package/lib/jsx/index.js +91 -0
  103. package/lib/jsx/instantiate.d.ts +5 -0
  104. package/lib/jsx/register.d.ts +1 -0
  105. package/lib/jsx/render.d.ts +6 -0
  106. package/lib/jsx/type.d.ts +192 -0
  107. package/lib/ladder/index.cjs +1 -1
  108. package/lib/ladder/index.js +1 -1
  109. package/lib/media/index.cjs +1 -1
  110. package/lib/media/index.js +1 -1
  111. package/lib/modal/index.cjs +1 -1
  112. package/lib/modal/index.js +33 -36
  113. package/lib/morph/index.cjs +1 -1
  114. package/lib/morph/index.js +33 -33
  115. package/lib/onConnect-DGP866cj.cjs +1 -0
  116. package/lib/onConnect-y5DrxJ9P.js +7 -0
  117. package/lib/pointer/PointerElement.d.ts +1 -2
  118. package/lib/pointer/index.cjs +1 -1
  119. package/lib/pointer/index.js +106 -118
  120. package/lib/popover/PopoverButtonElement.d.ts +1 -2
  121. package/lib/popover/PopoverElement.d.ts +1 -2
  122. package/lib/popover/index.cjs +1 -1
  123. package/lib/popover/index.js +109 -125
  124. package/lib/router/index.cjs +1 -1
  125. package/lib/router/index.js +76 -73
  126. package/lib/scroll/ScrollElement.d.ts +1 -2
  127. package/lib/scroll/ScrollUserElement.d.ts +1 -2
  128. package/lib/scroll/index.cjs +1 -1
  129. package/lib/scroll/index.js +674 -753
  130. package/lib/select/SelectElement.d.ts +1 -3
  131. package/lib/select/SelectUserElement.d.ts +1 -2
  132. package/lib/select/index.cjs +1 -1
  133. package/lib/select/index.js +1 -1
  134. package/lib/sequence/index.cjs +1 -1
  135. package/lib/sequence/index.js +105 -108
  136. package/lib/slicer/SlicerElement.d.ts +1 -2
  137. package/lib/slicer/index.cjs +5 -5
  138. package/lib/slicer/index.js +88 -106
  139. package/lib/source/SourceElement.d.ts +1 -2
  140. package/lib/source/index.cjs +2 -2
  141. package/lib/source/index.js +20 -21
  142. package/lib/store/Derived.d.ts +3 -3
  143. package/lib/store/DerivedArray.d.ts +8 -0
  144. package/lib/store/Keyed.d.ts +13 -0
  145. package/lib/store/index.cjs +1 -1
  146. package/lib/store/index.d.ts +2 -0
  147. package/lib/store/index.js +32 -32
  148. package/lib/tags-BBOGIzDK.cjs +1 -0
  149. package/lib/tags-CefGDQtF.js +485 -0
  150. package/lib/theme/index.cjs +1 -1
  151. package/lib/theme/index.js +2 -2
  152. package/lib/tweaker/TweakerFieldElement.d.ts +1 -2
  153. package/lib/tweaker/TweakerFolderElement.d.ts +1 -2
  154. package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -2
  155. package/lib/tweaker/index.cjs +3 -3
  156. package/lib/tweaker/index.js +392 -472
  157. package/lib/video/index.cjs +1 -1
  158. package/lib/video/index.js +26 -30
  159. package/package.json +65 -9
  160. package/lib/custom-element/index.cjs +0 -1
  161. package/lib/custom-element/index.d.ts +0 -8
  162. package/lib/custom-element/index.js +0 -30
  163. package/lib/index-CzpP1Tg6.cjs +0 -9
  164. package/lib/index-Dwd_62sm.js +0 -301
  165. package/lib/tags-CAfasCGV.cjs +0 -1
  166. package/lib/tags-D9lNDPX8.js +0 -848
@@ -0,0 +1,12 @@
1
+ import { c as o } from "./globals-DMjysUXI.js";
2
+ function t(n) {
3
+ o.value.addDisconnectCallback(n);
4
+ }
5
+ function r(n) {
6
+ const e = typeof n == "function" ? n(o.value) : n;
7
+ return o && t(() => e.close()), e;
8
+ }
9
+ export {
10
+ r as _,
11
+ t as o
12
+ };
@@ -1,4 +1,3 @@
1
- import { CustomElement } from '../custom-element';
2
1
  import { Attribute } from '../attribute';
3
2
  import { Axes2D } from '../utils';
4
3
 
@@ -9,7 +8,7 @@ export interface AccordionToggleOptions {
9
8
  skipTransition?: boolean;
10
9
  exclude?: HTMLElement;
11
10
  }
12
- export declare class AccordionElement extends CustomElement {
11
+ export declare class AccordionElement extends HTMLElement {
13
12
  #private;
14
13
  constructor();
15
14
  get axisAttribute(): Attribute<Axes2D>;
@@ -1 +1 @@
1
- "use strict";var R=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var t=(s,e,i)=>(R(s,e,"read from private field"),i?i.call(s):e.get(s)),h=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},d=(s,e,i,n)=>(R(s,e,"write to private field"),n?n.call(s,i):e.set(s,i),i);var o=(s,e,i)=>(R(s,e,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("../custom-element/index.cjs"),F=require("../attribute/index.cjs"),X=require("../browser-CpzFX2xg.cjs"),Y=require("../dom-JBOkFLTh.cjs"),J=require("../events-BGwqaxVW.cjs"),Z=require("../style-At6aDoqG.cjs");var j=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=(s,e,i,n)=>{for(var p=n>1?void 0:n?ee(e,i):e,H=s.length-1,P;H>=0;H--)(P=s[H])&&(p=(n?P(e,i,p):P(p))||p);return n&&p&&j(e,i,p),p},U=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},c=(s,e,i)=>(U(s,e,"read from private field"),i?i.call(s):e.get(s)),A=(s,e,i)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,i)},D=(s,e,i,n)=>(U(s,e,"write to private field"),e.set(s,i),i),N,B,f,T,k,G,a,r,m,l,L,I,w,v,_,W,V,y,O,x,C,q,z,u,g,E,b,S,$,M;class K{constructor(e,i){h(this,W);h(this,y);h(this,u);h(this,E);h(this,S);h(this,a,null);h(this,r,null);h(this,m,null);h(this,l,null);h(this,L,null);h(this,I,!1);h(this,w,void 0);h(this,v,!1);h(this,_,[]);h(this,x,()=>{t(this,v)?this.close():this.open()});h(this,C,()=>{t(this,v)&&(o(this,u,g).call(this,0,!0),o(this,u,g).call(this,t(this,y,O)))});h(this,q,()=>{o(this,E,b).call(this,"size-change")});h(this,z,e=>{t(this,v)&&(o(this,u,g).call(this,0,!0),o(this,u,g).call(this,t(this,y,O)),t(this,_).forEach(i=>{i.element.scroll({left:t(this,a).axisAttribute.current==="x"?i.scroll:0,top:t(this,a).axisAttribute.current==="y"?i.scroll:0})}))});h(this,M,()=>{const e=Y.getAllParentElements(t(this,r));d(this,_,e.map(i=>({element:i,scroll:t(this,a).axisAttribute.current==="y"?i.scrollTop:i.scrollLeft})))});i.firstElementChild instanceof HTMLElement&&i.lastElementChild instanceof HTMLElement?(d(this,a,e),d(this,r,i),d(this,m,i.firstElementChild),d(this,l,i.lastElementChild),t(this,m).style.cursor="default",t(this,l).style.overflow="hidden",t(this,a).axisAttribute.current==="y"?t(this,l).style.height="0px":t(this,l).style.width="0px",d(this,L,new ResizeObserver(t(this,q))),addEventListener("resize",t(this,C)),t(this,m).addEventListener("click",t(this,x)),t(this,r).addEventListener("beforeSizeChange",t(this,M)),t(this,r).addEventListener("sizeChange",t(this,z)),t(this,r).hasAttribute("data-opened")&&this.open({skipTransition:!0})):e.removeItem(t(this,r))}get element(){return t(this,r)}destroy(){t(this,m)&&(t(this,r).classList.remove("opened","triggered"),t(this,m).style.cursor="",o(this,u,g).call(this,void 0),t(this,L).disconnect(),removeEventListener("resize",t(this,C)),t(this,m).removeEventListener("click",t(this,x)),t(this,r).removeEventListener("beforeSizeChange",t(this,M)),t(this,r).removeEventListener("sizeChange",t(this,z)),clearTimeout(t(this,w)))}open(e){o(this,E,b).call(this,"before-toggle"),e!=null&&e.skipTransition&&o(this,S,$).call(this),t(this,a).multipleAttribute.current||t(this,a).closeAll({exclude:t(this,r)}),t(this,I)||t(this,L).observe(t(this,l)),d(this,v,!0),clearTimeout(t(this,w)),t(this,r).classList.add("triggered"),o(this,u,g).call(this,t(this,y,O)),setTimeout(()=>{t(this,r).classList.add("opened")},0),o(this,E,b).call(this,"toggle")}close(e){o(this,E,b).call(this,"before-toggle"),e!=null&&e.skipTransition&&o(this,S,$).call(this),d(this,v,!1),t(this,r).classList.remove("opened"),o(this,u,g).call(this,0),d(this,w,setTimeout(()=>{t(this,r).classList.remove("triggered")},Z.getElementTransitionDurationMS(t(this,l)))),o(this,E,b).call(this,"toggle")}}a=new WeakMap,r=new WeakMap,m=new WeakMap,l=new WeakMap,L=new WeakMap,I=new WeakMap,w=new WeakMap,v=new WeakMap,_=new WeakMap,W=new WeakSet,V=function(){return t(this,r).parentElement||t(this,r).getRootNode()},y=new WeakSet,O=function(){return t(this,a).axisAttribute.current==="x"?t(this,l).scrollWidth:t(this,l).scrollHeight},x=new WeakMap,C=new WeakMap,q=new WeakMap,z=new WeakMap,u=new WeakSet,g=function(e,i=!1){i&&(t(this,l).style.transition="all 0s",setTimeout(()=>{t(this,l).style.transition=""}));const n=t(this,a).axisAttribute.current==="x"?"width":"height";e!=null?t(this,l).style[n]=`${e}px`:t(this,l).style[n]=""},E=new WeakSet,b=function(e){e==="before-toggle"?J.dispatchBeforeSizeChangeEvent(t(this,r)):e==="toggle"?t(this,r).dispatchEvent(new CustomEvent("accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:t(this,v)}})):e==="size-change"&&J.dispatchSizeChangeEvent(t(this,W,V))},S=new WeakSet,$=function(){t(this,l).style.transition="all 0s",setTimeout(()=>{t(this,l).style.transition=""},50)},M=new WeakMap;exports.AccordionElement=class extends Q.CustomElement{constructor(){super(),A(this,k),A(this,N,new F.Attribute(this,"axis","y")),A(this,B,new F.Attribute(this,"multiple",!1)),A(this,f,[]),A(this,T,null),X.isBrowser&&D(this,T,new MutationObserver(e=>{e.forEach(i=>{i.removedNodes.forEach(n=>{n instanceof HTMLElement&&this.removeItem(n)}),i.addedNodes.forEach(n=>{n instanceof HTMLElement&&this.createItem(n)})})}))}get axisAttribute(){return c(this,N)}get multipleAttribute(){return c(this,B)}createItem(e){c(this,f).find(i=>i.element===e)||c(this,f).push(new K(this,e))}removeItem(e){D(this,f,c(this,f).filter(i=>{if(i.element!==e)return!0;i.destroy()}))}closeAll(e){c(this,f).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.close(e)})}openAll(e){c(this,f).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.open(e)})}connectedCallback(){c(this,T).observe(c(this,k,G),{childList:!0}),D(this,f,[...c(this,k,G).children].map(e=>{if(e instanceof HTMLElement)return new K(this,e)}).filter(e=>!!e))}disconnectedCallback(){c(this,T).disconnect()}};N=new WeakMap;B=new WeakMap;f=new WeakMap;T=new WeakMap;k=new WeakSet;G=function(){return this.shadowRoot?this.shadowRoot:this};exports.AccordionElement=te([Q.define("e-accordion")],exports.AccordionElement);
1
+ "use strict";var N=(l,i,t)=>{if(!i.has(l))throw TypeError("Cannot "+t)};var e=(l,i,t)=>(N(l,i,"read from private field"),t?t.call(l):i.get(l)),s=(l,i,t)=>{if(i.has(l))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(l):i.set(l,t)},c=(l,i,t,h)=>(N(l,i,"write to private field"),h?h.call(l,t):i.set(l,t),t);var o=(l,i,t)=>(N(l,i,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../attribute/index.cjs"),F=require("../browser-CpzFX2xg.cjs"),G=require("../dom-JBOkFLTh.cjs"),j=require("../events-BGwqaxVW.cjs"),J=require("../style-At6aDoqG.cjs");var a,r,f,n,v,I,L,m,x,H,_,y,M,z,p,R,C,d,g,b,E,w,B,S;class D{constructor(i,t){s(this,H);s(this,y);s(this,d);s(this,b);s(this,w);s(this,a,null);s(this,r,null);s(this,f,null);s(this,n,null);s(this,v,null);s(this,I,!1);s(this,L,void 0);s(this,m,!1);s(this,x,[]);s(this,z,()=>{e(this,m)?this.close():this.open()});s(this,p,()=>{e(this,m)&&(o(this,d,g).call(this,0,!0),o(this,d,g).call(this,e(this,y,M)))});s(this,R,()=>{o(this,b,E).call(this,"size-change")});s(this,C,i=>{e(this,m)&&(o(this,d,g).call(this,0,!0),o(this,d,g).call(this,e(this,y,M)),e(this,x).forEach(t=>{t.element.scroll({left:e(this,a).axisAttribute.current==="x"?t.scroll:0,top:e(this,a).axisAttribute.current==="y"?t.scroll:0})}))});s(this,S,()=>{const i=G.getAllParentElements(e(this,r));c(this,x,i.map(t=>({element:t,scroll:e(this,a).axisAttribute.current==="y"?t.scrollTop:t.scrollLeft})))});t.firstElementChild instanceof HTMLElement&&t.lastElementChild instanceof HTMLElement?(c(this,a,i),c(this,r,t),c(this,f,t.firstElementChild),c(this,n,t.lastElementChild),e(this,f).style.cursor="default",e(this,n).style.overflow="hidden",e(this,a).axisAttribute.current==="y"?e(this,n).style.height="0px":e(this,n).style.width="0px",c(this,v,new ResizeObserver(e(this,R))),addEventListener("resize",e(this,p)),e(this,f).addEventListener("click",e(this,z)),e(this,r).addEventListener("beforeSizeChange",e(this,S)),e(this,r).addEventListener("sizeChange",e(this,C)),e(this,r).hasAttribute("data-opened")&&this.open({skipTransition:!0})):i.removeItem(e(this,r))}get element(){return e(this,r)}destroy(){e(this,f)&&(e(this,r).classList.remove("opened","triggered"),e(this,f).style.cursor="",o(this,d,g).call(this,void 0),e(this,v).disconnect(),removeEventListener("resize",e(this,p)),e(this,f).removeEventListener("click",e(this,z)),e(this,r).removeEventListener("beforeSizeChange",e(this,S)),e(this,r).removeEventListener("sizeChange",e(this,C)),clearTimeout(e(this,L)))}open(i){o(this,b,E).call(this,"before-toggle"),i!=null&&i.skipTransition&&o(this,w,B).call(this),e(this,a).multipleAttribute.current||e(this,a).closeAll({exclude:e(this,r)}),e(this,I)||e(this,v).observe(e(this,n)),c(this,m,!0),clearTimeout(e(this,L)),e(this,r).classList.add("triggered"),o(this,d,g).call(this,e(this,y,M)),setTimeout(()=>{e(this,r).classList.add("opened")},0),o(this,b,E).call(this,"toggle")}close(i){o(this,b,E).call(this,"before-toggle"),i!=null&&i.skipTransition&&o(this,w,B).call(this),c(this,m,!1),e(this,r).classList.remove("opened"),o(this,d,g).call(this,0),c(this,L,setTimeout(()=>{e(this,r).classList.remove("triggered")},J.getElementTransitionDurationMS(e(this,n)))),o(this,b,E).call(this,"toggle")}}a=new WeakMap,r=new WeakMap,f=new WeakMap,n=new WeakMap,v=new WeakMap,I=new WeakMap,L=new WeakMap,m=new WeakMap,x=new WeakMap,H=new WeakSet,_=function(){return e(this,r).parentElement||e(this,r).getRootNode()},y=new WeakSet,M=function(){return e(this,a).axisAttribute.current==="x"?e(this,n).scrollWidth:e(this,n).scrollHeight},z=new WeakMap,p=new WeakMap,R=new WeakMap,C=new WeakMap,d=new WeakSet,g=function(i,t=!1){t&&(e(this,n).style.transition="all 0s",setTimeout(()=>{e(this,n).style.transition=""}));const h=e(this,a).axisAttribute.current==="x"?"width":"height";i!=null?e(this,n).style[h]=`${i}px`:e(this,n).style[h]=""},b=new WeakSet,E=function(i){i==="before-toggle"?j.dispatchBeforeSizeChangeEvent(e(this,r)):i==="toggle"?e(this,r).dispatchEvent(new CustomEvent("accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,m)}})):i==="size-change"&&j.dispatchSizeChangeEvent(e(this,H,_))},w=new WeakSet,B=function(){e(this,n).style.transition="all 0s",setTimeout(()=>{e(this,n).style.transition=""},50)},S=new WeakMap;var q,O,u,T,k,P;class $ extends HTMLElement{constructor(){super();s(this,k);s(this,q,new W.Attribute(this,"axis","y"));s(this,O,new W.Attribute(this,"multiple",!1));s(this,u,[]);s(this,T,null);F.isBrowser&&c(this,T,new MutationObserver(t=>{t.forEach(h=>{h.removedNodes.forEach(A=>{A instanceof HTMLElement&&this.removeItem(A)}),h.addedNodes.forEach(A=>{A instanceof HTMLElement&&this.createItem(A)})})}))}get axisAttribute(){return e(this,q)}get multipleAttribute(){return e(this,O)}createItem(t){e(this,u).find(h=>h.element===t)||e(this,u).push(new D(this,t))}removeItem(t){c(this,u,e(this,u).filter(h=>{if(h.element!==t)return!0;h.destroy()}))}closeAll(t){e(this,u).forEach(h=>{(t==null?void 0:t.exclude)!==h.element&&h.close(t)})}openAll(t){e(this,u).forEach(h=>{(t==null?void 0:t.exclude)!==h.element&&h.open(t)})}connectedCallback(){e(this,T).observe(e(this,k,P),{childList:!0}),c(this,u,[...e(this,k,P).children].map(t=>{if(t instanceof HTMLElement)return new D(this,t)}).filter(t=>!!t))}disconnectedCallback(){e(this,T).disconnect()}}q=new WeakMap,O=new WeakMap,u=new WeakMap,T=new WeakMap,k=new WeakSet,P=function(){return this.shadowRoot?this.shadowRoot:this};customElements.get("e-accordion")||customElements.define("e-accordion",$);exports.AccordionElement=$;
@@ -1,188 +1,176 @@
1
- var D = (i, t, s) => {
2
- if (!t.has(i))
3
- throw TypeError("Cannot " + s);
1
+ var B = (l, i, t) => {
2
+ if (!i.has(l))
3
+ throw TypeError("Cannot " + t);
4
4
  };
5
- var e = (i, t, s) => (D(i, t, "read from private field"), s ? s.call(i) : t.get(i)), h = (i, t, s) => {
6
- if (t.has(i))
5
+ var e = (l, i, t) => (B(l, i, "read from private field"), t ? t.call(l) : i.get(l)), s = (l, i, t) => {
6
+ if (i.has(l))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- t instanceof WeakSet ? t.add(i) : t.set(i, s);
9
- }, d = (i, t, s, o) => (D(i, t, "write to private field"), o ? o.call(i, s) : t.set(i, s), s);
10
- var n = (i, t, s) => (D(i, t, "access private method"), s);
11
- import { CustomElement as V, define as X } from "../custom-element/index.js";
12
- import { Attribute as F } from "../attribute/index.js";
13
- import { i as Y } from "../browser-0zX67oeU.js";
14
- import { g as Z } from "../dom-P5QbAASX.js";
15
- import { d as j, a as ee } from "../events-CJTUMSLU.js";
16
- import { g as te } from "../style-j2TwriJ_.js";
17
- var ie = Object.defineProperty, se = Object.getOwnPropertyDescriptor, re = (i, t, s, o) => {
18
- for (var E = o > 1 ? void 0 : o ? se(t, s) : t, R = i.length - 1, P; R >= 0; R--)
19
- (P = i[R]) && (E = (o ? P(t, s, E) : P(E)) || E);
20
- return o && E && ie(t, s, E), E;
21
- }, Q = (i, t, s) => {
22
- if (!t.has(i))
23
- throw TypeError("Cannot " + s);
24
- }, c = (i, t, s) => (Q(i, t, "read from private field"), s ? s.call(i) : t.get(i)), y = (i, t, s) => {
25
- if (t.has(i))
26
- throw TypeError("Cannot add the same private member more than once");
27
- t instanceof WeakSet ? t.add(i) : t.set(i, s);
28
- }, N = (i, t, s, o) => (Q(i, t, "write to private field"), t.set(i, s), s), B, G, u, x, M, $, a, r, m, l, L, O, w, v, A, W, U, T, I, C, _, H, z, f, g, p, b, S, q, k;
29
- class J {
30
- constructor(t, s) {
31
- h(this, W);
32
- h(this, T);
33
- h(this, f);
34
- h(this, p);
35
- h(this, S);
36
- h(this, a, null);
37
- h(this, r, null);
38
- h(this, m, null);
39
- h(this, l, null);
40
- h(this, L, null);
41
- h(this, O, !1);
42
- h(this, w, void 0);
43
- h(this, v, !1);
44
- h(this, A, []);
45
- h(this, C, () => {
46
- e(this, v) ? this.close() : this.open();
8
+ i instanceof WeakSet ? i.add(l) : i.set(l, t);
9
+ }, a = (l, i, t, h) => (B(l, i, "write to private field"), h ? h.call(l, t) : i.set(l, t), t);
10
+ var o = (l, i, t) => (B(l, i, "access private method"), t);
11
+ import { Attribute as P } from "../attribute/index.js";
12
+ import { i as q } from "../browser-0zX67oeU.js";
13
+ import { g as F } from "../dom-P5QbAASX.js";
14
+ import { d as G, a as J } from "../events-CJTUMSLU.js";
15
+ import { g as K } from "../style-j2TwriJ_.js";
16
+ var c, r, f, n, v, M, L, m, y, H, j, T, I, A, z, R, C, d, g, E, b, w, W, k;
17
+ class $ {
18
+ constructor(i, t) {
19
+ s(this, H);
20
+ s(this, T);
21
+ s(this, d);
22
+ s(this, E);
23
+ s(this, w);
24
+ s(this, c, null);
25
+ s(this, r, null);
26
+ s(this, f, null);
27
+ s(this, n, null);
28
+ s(this, v, null);
29
+ s(this, M, !1);
30
+ s(this, L, void 0);
31
+ s(this, m, !1);
32
+ s(this, y, []);
33
+ s(this, A, () => {
34
+ e(this, m) ? this.close() : this.open();
47
35
  });
48
- h(this, _, () => {
49
- e(this, v) && (n(this, f, g).call(this, 0, !0), n(this, f, g).call(this, e(this, T, I)));
36
+ s(this, z, () => {
37
+ e(this, m) && (o(this, d, g).call(this, 0, !0), o(this, d, g).call(this, e(this, T, I)));
50
38
  });
51
- h(this, H, () => {
52
- n(this, p, b).call(this, "size-change");
39
+ s(this, R, () => {
40
+ o(this, E, b).call(this, "size-change");
53
41
  });
54
- h(this, z, (t) => {
55
- e(this, v) && (n(this, f, g).call(this, 0, !0), n(this, f, g).call(this, e(this, T, I)), e(this, A).forEach((s) => {
56
- s.element.scroll({
57
- left: e(this, a).axisAttribute.current === "x" ? s.scroll : 0,
58
- top: e(this, a).axisAttribute.current === "y" ? s.scroll : 0
42
+ s(this, C, (i) => {
43
+ e(this, m) && (o(this, d, g).call(this, 0, !0), o(this, d, g).call(this, e(this, T, I)), e(this, y).forEach((t) => {
44
+ t.element.scroll({
45
+ left: e(this, c).axisAttribute.current === "x" ? t.scroll : 0,
46
+ top: e(this, c).axisAttribute.current === "y" ? t.scroll : 0
59
47
  });
60
48
  }));
61
49
  });
62
- h(this, k, () => {
63
- const t = Z(e(this, r));
64
- d(this, A, t.map((s) => ({
65
- element: s,
66
- scroll: e(this, a).axisAttribute.current === "y" ? s.scrollTop : s.scrollLeft
50
+ s(this, k, () => {
51
+ const i = F(e(this, r));
52
+ a(this, y, i.map((t) => ({
53
+ element: t,
54
+ scroll: e(this, c).axisAttribute.current === "y" ? t.scrollTop : t.scrollLeft
67
55
  })));
68
56
  });
69
- s.firstElementChild instanceof HTMLElement && s.lastElementChild instanceof HTMLElement ? (d(this, a, t), d(this, r, s), d(this, m, s.firstElementChild), d(this, l, s.lastElementChild), e(this, m).style.cursor = "default", e(this, l).style.overflow = "hidden", e(this, a).axisAttribute.current === "y" ? e(this, l).style.height = "0px" : e(this, l).style.width = "0px", d(this, L, new ResizeObserver(e(this, H))), addEventListener("resize", e(this, _)), e(this, m).addEventListener("click", e(this, C)), e(this, r).addEventListener(
57
+ t.firstElementChild instanceof HTMLElement && t.lastElementChild instanceof HTMLElement ? (a(this, c, i), a(this, r, t), a(this, f, t.firstElementChild), a(this, n, t.lastElementChild), e(this, f).style.cursor = "default", e(this, n).style.overflow = "hidden", e(this, c).axisAttribute.current === "y" ? e(this, n).style.height = "0px" : e(this, n).style.width = "0px", a(this, v, new ResizeObserver(e(this, R))), addEventListener("resize", e(this, z)), e(this, f).addEventListener("click", e(this, A)), e(this, r).addEventListener(
70
58
  "beforeSizeChange",
71
59
  e(this, k)
72
60
  ), e(this, r).addEventListener(
73
61
  "sizeChange",
74
- e(this, z)
75
- ), e(this, r).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) : t.removeItem(e(this, r));
62
+ e(this, C)
63
+ ), e(this, r).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) : i.removeItem(e(this, r));
76
64
  }
77
65
  get element() {
78
66
  return e(this, r);
79
67
  }
80
68
  destroy() {
81
- e(this, m) && (e(this, r).classList.remove("opened", "triggered"), e(this, m).style.cursor = "", n(this, f, g).call(this, void 0), e(this, L).disconnect(), removeEventListener("resize", e(this, _)), e(this, m).removeEventListener("click", e(this, C)), e(this, r).removeEventListener(
69
+ e(this, f) && (e(this, r).classList.remove("opened", "triggered"), e(this, f).style.cursor = "", o(this, d, g).call(this, void 0), e(this, v).disconnect(), removeEventListener("resize", e(this, z)), e(this, f).removeEventListener("click", e(this, A)), e(this, r).removeEventListener(
82
70
  "beforeSizeChange",
83
71
  e(this, k)
84
72
  ), e(this, r).removeEventListener(
85
73
  "sizeChange",
86
- e(this, z)
87
- ), clearTimeout(e(this, w)));
74
+ e(this, C)
75
+ ), clearTimeout(e(this, L)));
88
76
  }
89
- open(t) {
90
- n(this, p, b).call(this, "before-toggle"), t != null && t.skipTransition && n(this, S, q).call(this), e(this, a).multipleAttribute.current || e(this, a).closeAll({ exclude: e(this, r) }), e(this, O) || e(this, L).observe(e(this, l)), d(this, v, !0), clearTimeout(e(this, w)), e(this, r).classList.add("triggered"), n(this, f, g).call(this, e(this, T, I)), setTimeout(() => {
77
+ open(i) {
78
+ o(this, E, b).call(this, "before-toggle"), i != null && i.skipTransition && o(this, w, W).call(this), e(this, c).multipleAttribute.current || e(this, c).closeAll({ exclude: e(this, r) }), e(this, M) || e(this, v).observe(e(this, n)), a(this, m, !0), clearTimeout(e(this, L)), e(this, r).classList.add("triggered"), o(this, d, g).call(this, e(this, T, I)), setTimeout(() => {
91
79
  e(this, r).classList.add("opened");
92
- }, 0), n(this, p, b).call(this, "toggle");
80
+ }, 0), o(this, E, b).call(this, "toggle");
93
81
  }
94
- close(t) {
95
- n(this, p, b).call(this, "before-toggle"), t != null && t.skipTransition && n(this, S, q).call(this), d(this, v, !1), e(this, r).classList.remove("opened"), n(this, f, g).call(this, 0), d(this, w, setTimeout(() => {
82
+ close(i) {
83
+ o(this, E, b).call(this, "before-toggle"), i != null && i.skipTransition && o(this, w, W).call(this), a(this, m, !1), e(this, r).classList.remove("opened"), o(this, d, g).call(this, 0), a(this, L, setTimeout(() => {
96
84
  e(this, r).classList.remove("triggered");
97
- }, te(e(this, l)))), n(this, p, b).call(this, "toggle");
85
+ }, K(e(this, n)))), o(this, E, b).call(this, "toggle");
98
86
  }
99
87
  }
100
- a = new WeakMap(), r = new WeakMap(), m = new WeakMap(), l = new WeakMap(), L = new WeakMap(), O = new WeakMap(), w = new WeakMap(), v = new WeakMap(), A = new WeakMap(), W = new WeakSet(), U = function() {
88
+ c = new WeakMap(), r = new WeakMap(), f = new WeakMap(), n = new WeakMap(), v = new WeakMap(), M = new WeakMap(), L = new WeakMap(), m = new WeakMap(), y = new WeakMap(), H = new WeakSet(), j = function() {
101
89
  return e(this, r).parentElement || e(this, r).getRootNode();
102
90
  }, T = new WeakSet(), I = function() {
103
- return e(this, a).axisAttribute.current === "x" ? e(this, l).scrollWidth : e(this, l).scrollHeight;
104
- }, C = new WeakMap(), _ = new WeakMap(), H = new WeakMap(), z = new WeakMap(), f = new WeakSet(), g = function(t, s = !1) {
105
- s && (e(this, l).style.transition = "all 0s", setTimeout(() => {
106
- e(this, l).style.transition = "";
91
+ return e(this, c).axisAttribute.current === "x" ? e(this, n).scrollWidth : e(this, n).scrollHeight;
92
+ }, A = new WeakMap(), z = new WeakMap(), R = new WeakMap(), C = new WeakMap(), d = new WeakSet(), g = function(i, t = !1) {
93
+ t && (e(this, n).style.transition = "all 0s", setTimeout(() => {
94
+ e(this, n).style.transition = "";
107
95
  }));
108
- const o = e(this, a).axisAttribute.current === "x" ? "width" : "height";
109
- t != null ? e(this, l).style[o] = `${t}px` : e(this, l).style[o] = "";
110
- }, p = new WeakSet(), b = function(t) {
111
- t === "before-toggle" ? j(e(this, r)) : t === "toggle" ? e(this, r).dispatchEvent(
96
+ const h = e(this, c).axisAttribute.current === "x" ? "width" : "height";
97
+ i != null ? e(this, n).style[h] = `${i}px` : e(this, n).style[h] = "";
98
+ }, E = new WeakSet(), b = function(i) {
99
+ i === "before-toggle" ? G(e(this, r)) : i === "toggle" ? e(this, r).dispatchEvent(
112
100
  new CustomEvent("accordionItemToggle", {
113
101
  bubbles: !0,
114
102
  composed: !0,
115
103
  detail: {
116
- opened: e(this, v)
104
+ opened: e(this, m)
117
105
  }
118
106
  })
119
- ) : t === "size-change" && ee(e(this, W, U));
120
- }, S = new WeakSet(), q = function() {
121
- e(this, l).style.transition = "all 0s", setTimeout(() => {
122
- e(this, l).style.transition = "";
107
+ ) : i === "size-change" && J(e(this, H, j));
108
+ }, w = new WeakSet(), W = function() {
109
+ e(this, n).style.transition = "all 0s", setTimeout(() => {
110
+ e(this, n).style.transition = "";
123
111
  }, 50);
124
112
  }, k = new WeakMap();
125
- let K = class extends V {
113
+ var O, N, u, p, S, D;
114
+ class Q extends HTMLElement {
126
115
  constructor() {
127
- super(), y(this, M), y(this, B, new F(this, "axis", "y")), y(this, G, new F(this, "multiple", !1)), y(this, u, []), y(this, x, null), Y && N(this, x, new MutationObserver((i) => {
128
- i.forEach((t) => {
129
- t.removedNodes.forEach((s) => {
130
- s instanceof HTMLElement && this.removeItem(s);
131
- }), t.addedNodes.forEach((s) => {
132
- s instanceof HTMLElement && this.createItem(s);
116
+ super();
117
+ s(this, S);
118
+ s(this, O, new P(this, "axis", "y"));
119
+ s(this, N, new P(this, "multiple", !1));
120
+ s(this, u, []);
121
+ s(this, p, null);
122
+ q && a(this, p, new MutationObserver((t) => {
123
+ t.forEach((h) => {
124
+ h.removedNodes.forEach((x) => {
125
+ x instanceof HTMLElement && this.removeItem(x);
126
+ }), h.addedNodes.forEach((x) => {
127
+ x instanceof HTMLElement && this.createItem(x);
133
128
  });
134
129
  });
135
130
  }));
136
131
  }
137
132
  get axisAttribute() {
138
- return c(this, B);
133
+ return e(this, O);
139
134
  }
140
135
  get multipleAttribute() {
141
- return c(this, G);
136
+ return e(this, N);
142
137
  }
143
- createItem(i) {
144
- c(this, u).find((t) => t.element === i) || c(this, u).push(new J(this, i));
138
+ createItem(t) {
139
+ e(this, u).find((h) => h.element === t) || e(this, u).push(new $(this, t));
145
140
  }
146
- removeItem(i) {
147
- N(this, u, c(this, u).filter((t) => {
148
- if (t.element !== i)
141
+ removeItem(t) {
142
+ a(this, u, e(this, u).filter((h) => {
143
+ if (h.element !== t)
149
144
  return !0;
150
- t.destroy();
145
+ h.destroy();
151
146
  }));
152
147
  }
153
- closeAll(i) {
154
- c(this, u).forEach((t) => {
155
- (i == null ? void 0 : i.exclude) !== t.element && t.close(i);
148
+ closeAll(t) {
149
+ e(this, u).forEach((h) => {
150
+ (t == null ? void 0 : t.exclude) !== h.element && h.close(t);
156
151
  });
157
152
  }
158
- openAll(i) {
159
- c(this, u).forEach((t) => {
160
- (i == null ? void 0 : i.exclude) !== t.element && t.open(i);
153
+ openAll(t) {
154
+ e(this, u).forEach((h) => {
155
+ (t == null ? void 0 : t.exclude) !== h.element && h.open(t);
161
156
  });
162
157
  }
163
158
  connectedCallback() {
164
- c(this, x).observe(c(this, M, $), {
159
+ e(this, p).observe(e(this, S, D), {
165
160
  childList: !0
166
- }), N(this, u, [...c(this, M, $).children].map((i) => {
167
- if (i instanceof HTMLElement)
168
- return new J(this, i);
169
- }).filter((i) => !!i));
161
+ }), a(this, u, [...e(this, S, D).children].map((t) => {
162
+ if (t instanceof HTMLElement)
163
+ return new $(this, t);
164
+ }).filter((t) => !!t));
170
165
  }
171
166
  disconnectedCallback() {
172
- c(this, x).disconnect();
167
+ e(this, p).disconnect();
173
168
  }
174
- };
175
- B = /* @__PURE__ */ new WeakMap();
176
- G = /* @__PURE__ */ new WeakMap();
177
- u = /* @__PURE__ */ new WeakMap();
178
- x = /* @__PURE__ */ new WeakMap();
179
- M = /* @__PURE__ */ new WeakSet();
180
- $ = function() {
169
+ }
170
+ O = new WeakMap(), N = new WeakMap(), u = new WeakMap(), p = new WeakMap(), S = new WeakSet(), D = function() {
181
171
  return this.shadowRoot ? this.shadowRoot : this;
182
172
  };
183
- K = re([
184
- X("e-accordion")
185
- ], K);
173
+ customElements.get("e-accordion") || customElements.define("e-accordion", Q);
186
174
  export {
187
- K as AccordionElement
175
+ Q as AccordionElement
188
176
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-BInSRYNr.cjs"),n=require("../Damped-Da3EnNN4.cjs"),i=require("../Tweened-DksN-Rz6.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-BCA-DBje.cjs"),n=require("../Damped-CSEZ0qwp.cjs"),i=require("../Tweened-D6dAu8Zi.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
@@ -1,6 +1,6 @@
1
- import { A as r } from "../Animation-uimN7sdT.js";
2
- import { D as m } from "../Damped-yrNXlkDE.js";
3
- import { T as t } from "../Tweened-CjgvoOwL.js";
1
+ import { A as r } from "../Animation-DrSYnbgb.js";
2
+ import { D as m } from "../Damped-C2FuK_3K.js";
3
+ import { T as t } from "../Tweened-BrD2cPSC.js";
4
4
  export {
5
5
  r as Animation,
6
6
  m as Damped,
@@ -1 +1 @@
1
- "use strict";var v=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var r=(t,s,e)=>(v(t,s,"read from private field"),e?e.call(t):s.get(t)),c=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},h=(t,s,e,a)=>(v(t,s,"write to private field"),a?a.call(t,e):s.set(t,e),e);var d=(t,s,e)=>(v(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../Store-Cr3VaD9G.cjs"),S=require("../attributes-Bf2svn4j.cjs"),q=require("../browser-CpzFX2xg.cjs"),p=require("../dom-JBOkFLTh.cjs");var i,u,n,b,o,m;class w extends A.Store{constructor(e,a,y,l){super(y,l);c(this,o);c(this,i,null);c(this,u,void 0);c(this,n,null);c(this,b,!1);h(this,u,a),q.isBrowser&&(h(this,i,p.getElement(e)),h(this,n,new MutationObserver(f=>{f.forEach(g=>{g.type==="attributes"&&g.attributeName===r(this,u)&&d(this,o,m).call(this)})})),l!=null&&l.sync&&this.subscribe(f=>{r(this,i).setAttribute(r(this,u),f.current.toString())}))}subscribe(e){return this.subscribers.size||this.observe(),super.subscribe(e)}unsubscribe(e){super.unsubscribe(e),this.subscribers.size||this.unobserve()}observe(){r(this,b)||(h(this,b,!0),r(this,n).observe(r(this,i),{attributes:!0}),d(this,o,m).call(this))}unobserve(){r(this,b)&&(h(this,b,!1),r(this,n).disconnect())}close(){super.close(),this.unobserve()}}i=new WeakMap,u=new WeakMap,n=new WeakMap,b=new WeakMap,o=new WeakSet,m=function(){const e=r(this,i).getAttribute(r(this,u));e!=null&&(this.current=S.parseAttributeValue(e))};exports.Attribute=w;
1
+ "use strict";var v=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var r=(t,s,e)=>(v(t,s,"read from private field"),e?e.call(t):s.get(t)),c=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},h=(t,s,e,a)=>(v(t,s,"write to private field"),a?a.call(t,e):s.set(t,e),e);var d=(t,s,e)=>(v(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../Store-kzJycezD.cjs"),S=require("../attributes-Bf2svn4j.cjs"),q=require("../browser-CpzFX2xg.cjs"),p=require("../dom-JBOkFLTh.cjs");var i,u,n,b,o,m;class w extends A.Store{constructor(e,a,y,l){super(y,l);c(this,o);c(this,i,null);c(this,u,void 0);c(this,n,null);c(this,b,!1);h(this,u,a),q.isBrowser&&(h(this,i,p.getElement(e)),h(this,n,new MutationObserver(f=>{f.forEach(g=>{g.type==="attributes"&&g.attributeName===r(this,u)&&d(this,o,m).call(this)})})),l!=null&&l.sync&&this.subscribe(f=>{r(this,i).setAttribute(r(this,u),f.current.toString())}))}subscribe(e){return this.subscribers.size||this.observe(),super.subscribe(e)}unsubscribe(e){super.unsubscribe(e),this.subscribers.size||this.unobserve()}observe(){r(this,b)||(h(this,b,!0),r(this,n).observe(r(this,i),{attributes:!0}),d(this,o,m).call(this))}unobserve(){r(this,b)&&(h(this,b,!1),r(this,n).disconnect())}close(){super.close(),this.unobserve()}}i=new WeakMap,u=new WeakMap,n=new WeakMap,b=new WeakMap,o=new WeakSet,m=function(){const e=r(this,i).getAttribute(r(this,u));e!=null&&(this.current=S.parseAttributeValue(e))};exports.Attribute=w;
@@ -8,7 +8,7 @@ var r = (t, e, s) => (m(t, e, "read from private field"), s ? s.call(t) : e.get(
8
8
  e instanceof WeakSet ? e.add(t) : e.set(t, s);
9
9
  }, a = (t, e, s, o) => (m(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s);
10
10
  var v = (t, e, s) => (m(t, e, "access private method"), s);
11
- import { S as g } from "../Store-Qr3SNOSf.js";
11
+ import { S as g } from "../Store-Dsft7GtM.js";
12
12
  import { p as y } from "../attributes-69we3byR.js";
13
13
  import { i as S } from "../browser-0zX67oeU.js";
14
14
  import { a as w } from "../dom-P5QbAASX.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("../css-property/index.cjs"),q=require("../custom-element/index.cjs");require("../Store-Cr3VaD9G.cjs");const B=require("../math-GDWEqu7y.cjs"),M=require("../tags-CAfasCGV.cjs"),T=require("../createStylesheet-BsMSWX0q.cjs"),P=require("../element-resizer/index.cjs"),g=require("../ticker/index.cjs");var A=Object.defineProperty,D=Object.getOwnPropertyDescriptor,L=(i,e,s,u)=>{for(var a=u>1?void 0:u?D(e,s):e,E=i.length-1,R;E>=0;E--)(R=i[E])&&(a=(u?R(e,s,a):R(a))||a);return u&&a&&A(e,s,a),a},y=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(y(i,e,"read from private field"),s?s.call(i):e.get(i)),n=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},r=(i,e,s,u)=>(y(i,e,"write to private field"),e.set(i,s),s),o=(i,e,s)=>(y(i,e,"access private method"),s),c,h,d,l,p,v,m,w,f,S,C,z,k,_,x,W,b,O;const G=T.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});exports.CanvasElement=class extends q.CustomElement{constructor(){super(),n(this,f),n(this,C),n(this,x),n(this,b),n(this,c,new F.CSSProperty(this,"--fps",0)),n(this,h,null),n(this,d,null),n(this,l,0),n(this,p,0),n(this,v,1),n(this,m,0),n(this,w,1),n(this,k,e=>{r(this,v,B.clamp(devicePixelRatio,1,2)),r(this,l,e.contentRect.width),r(this,p,e.contentRect.height),t(this,h).width=t(this,l)*this.pixelRatio,t(this,h).height=t(this,p)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),o(this,b,O).call(this),o(this,x,W).call(this)}),n(this,_,e=>{r(this,m,e.timestamp),r(this,w,e.timeBetweenFrames),o(this,x,W).call(this)}),this.openShadow(G),M.element(this,{children:M.canvas({ref:e=>{r(this,h,e),r(this,d,e.getContext("2d"))}})}),t(this,c).subscribe(e=>{typeof e.previous!="undefined"&&e.current!==e.previous&&o(this,f,S).call(this)})}get fpsCSSProperty(){return t(this,c)}get canvasElement(){return t(this,h)}get context(){return t(this,d)}get pixelRatio(){return t(this,v)}get width(){return t(this,l)}get height(){return t(this,p)}get detail(){return{width:t(this,l),height:t(this,p),element:this,canvasElement:t(this,h),pixelRatio:t(this,v),context:t(this,d),timestamp:t(this,m),timeBetweenFrames:t(this,w)}}connectedCallback(){t(this,c).observe(),P.elementResizer.subscribe(this,t(this,k)),o(this,f,S).call(this)}disconnectedCallback(){t(this,c).unobserve(),P.elementResizer.unsubscribe(t(this,k)),o(this,C,z).call(this)}};c=new WeakMap;h=new WeakMap;d=new WeakMap;l=new WeakMap;p=new WeakMap;v=new WeakMap;m=new WeakMap;w=new WeakMap;f=new WeakSet;S=function(){g.ticker.unsubscribe(t(this,_)),this.hasAttribute("static")||g.ticker.subscribe(t(this,_),{culling:this,maxFPS:t(this,c).current})};C=new WeakSet;z=function(){g.ticker.unsubscribe(t(this,_))};k=new WeakMap;_=new WeakMap;x=new WeakSet;W=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))};b=new WeakSet;O=function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))};exports.CanvasElement=L([q.define("e-canvas")],exports.CanvasElement);
1
+ "use strict";var S=(i,s,e)=>{if(!s.has(i))throw TypeError("Cannot "+e)};var t=(i,s,e)=>(S(i,s,"read from private field"),e?e.call(i):s.get(i)),h=(i,s,e)=>{if(s.has(i))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(i):s.set(i,e)},r=(i,s,e,n)=>(S(i,s,"write to private field"),n?n.call(i,e):s.set(i,e),e);var o=(i,s,e)=>(S(i,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../css-property/index.cjs");require("../Store-kzJycezD.cjs");const L=require("../math-GDWEqu7y.cjs"),k=require("../tags-BBOGIzDK.cjs"),_=require("../createStylesheet-Di9WRypw.cjs"),q=require("../element-resizer/index.cjs"),y=require("../ticker/index.cjs"),M=_.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});var a,c,d,l,u,m,v,b,g,f,w,z,x,p,R,C,E,F;class P extends HTMLElement{constructor(){super();h(this,g);h(this,w);h(this,R);h(this,E);h(this,a,new B.CSSProperty(this,"--fps",0));h(this,c,null);h(this,d,null);h(this,l,0);h(this,u,0);h(this,m,1);h(this,v,0);h(this,b,1);h(this,x,e=>{r(this,m,L.clamp(devicePixelRatio,1,2)),r(this,l,e.contentRect.width),r(this,u,e.contentRect.height),t(this,c).width=t(this,l)*this.pixelRatio,t(this,c).height=t(this,u)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),o(this,E,F).call(this),o(this,R,C).call(this)});h(this,p,e=>{r(this,v,e.timestamp),r(this,b,e.timeBetweenFrames),o(this,R,C).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(M),k.element(this,{children:k.canvas({ref:n=>{r(this,c,n),r(this,d,n.getContext("2d"))}})}),t(this,a).subscribe(n=>{typeof n.previous!="undefined"&&n.current!==n.previous&&o(this,g,f).call(this)})}get fpsCSSProperty(){return t(this,a)}get canvasElement(){return t(this,c)}get context(){return t(this,d)}get pixelRatio(){return t(this,m)}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,c),pixelRatio:t(this,m),context:t(this,d),timestamp:t(this,v),timeBetweenFrames:t(this,b)}}connectedCallback(){t(this,a).observe(),q.elementResizer.subscribe(this,t(this,x)),o(this,g,f).call(this)}disconnectedCallback(){t(this,a).unobserve(),q.elementResizer.unsubscribe(t(this,x)),o(this,w,z).call(this)}}a=new WeakMap,c=new WeakMap,d=new WeakMap,l=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,b=new WeakMap,g=new WeakSet,f=function(){y.ticker.unsubscribe(t(this,p)),this.hasAttribute("static")||y.ticker.subscribe(t(this,p),{culling:this,maxFPS:t(this,a).current})},w=new WeakSet,z=function(){y.ticker.unsubscribe(t(this,p))},x=new WeakMap,p=new WeakMap,R=new WeakSet,C=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))},E=new WeakSet,F=function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))};customElements.get("e-canvas")||customElements.define("e-canvas",P);exports.CanvasElement=P;
@@ -1,5 +1,4 @@
1
1
  import { CSSProperty } from '../css-property';
2
- import { CustomElement } from '../custom-element';
3
2
 
4
3
  export interface Canvas2DRenderDetail {
5
4
  pixelRatio: number;
@@ -12,7 +11,7 @@ export interface Canvas2DRenderDetail {
12
11
  timeBetweenFrames: number;
13
12
  }
14
13
  export type Canvas2DRenderCallback = (entry: Canvas2DRenderDetail) => void;
15
- export declare class CanvasElement extends CustomElement {
14
+ export declare class CanvasElement extends HTMLElement {
16
15
  #private;
17
16
  constructor();
18
17
  get fpsCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;