aptechka 0.1.7 → 0.1.8

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 (63) hide show
  1. package/lib/abstract-elements/index.cjs +1 -1
  2. package/lib/abstract-elements/index.js +10 -14
  3. package/lib/accordion/AccordionElement.d.ts +1 -1
  4. package/lib/accordion/index.cjs +1 -1
  5. package/lib/accordion/index.js +25 -26
  6. package/lib/canvas/index.cjs +1 -1
  7. package/lib/canvas/index.js +15 -15
  8. package/lib/connector/index.cjs +1 -1
  9. package/lib/connector/index.d.ts +1 -2
  10. package/lib/connector/index.js +31 -31
  11. package/lib/{createStylesheet-C1rimcGc.cjs → createStylesheet-BsVHqHhr.cjs} +1 -1
  12. package/lib/{createStylesheet-BSXZrWW6.js → createStylesheet-ITfBHk7A.js} +1 -1
  13. package/lib/element-constructor/ElementConstructor.d.ts +12 -15
  14. package/lib/element-constructor/index.cjs +1 -1
  15. package/lib/element-constructor/index.js +91 -89
  16. package/lib/element-constructor/tags.d.ts +3 -1
  17. package/lib/events-Crwi8fz6.cjs +1 -0
  18. package/lib/{events-CoqmkUxo.js → events-_C2CztxR.js} +1 -1
  19. package/lib/index-Bt91QUTY.cjs +9 -0
  20. package/lib/{index-dBwVZz_v.js → index-COirQu7j.js} +66 -75
  21. package/lib/modal/index.cjs +1 -1
  22. package/lib/modal/index.js +33 -39
  23. package/lib/scroll/index.cjs +1 -1
  24. package/lib/scroll/index.js +66 -68
  25. package/lib/select/SelectElement.d.ts +1 -1
  26. package/lib/select/index.cjs +1 -1
  27. package/lib/select/index.d.ts +1 -1
  28. package/lib/select/index.js +1 -1
  29. package/lib/store/index.cjs +1 -1
  30. package/lib/store/index.js +111 -48
  31. package/lib/studio/index.cjs +6 -6
  32. package/lib/studio/index.js +313 -360
  33. package/lib/{tags-D-lzPz_v.js → tags-8Y7LSTwg.js} +385 -354
  34. package/lib/tags-pcim-Cws.cjs +1 -0
  35. package/lib/theme/index.cjs +1 -1
  36. package/lib/theme/index.js +1 -1
  37. package/lib/utils/events.d.ts +1 -1
  38. package/lib/utils/index.cjs +1 -1
  39. package/lib/utils/index.d.ts +1 -1
  40. package/lib/utils/index.js +1 -1
  41. package/lib/utils/ts-utility.d.ts +2 -2
  42. package/package.json +1 -9
  43. package/lib/Composed-C2Vv1xxR.cjs +0 -1
  44. package/lib/Composed-DhtYBEmo.js +0 -79
  45. package/lib/events-D68xg4dy.cjs +0 -1
  46. package/lib/index-vI4hmrI8.cjs +0 -9
  47. package/lib/jsx/ComponentElement.d.ts +0 -17
  48. package/lib/jsx/h.d.ts +0 -8
  49. package/lib/jsx/hooks/animation-frame.d.ts +0 -5
  50. package/lib/jsx/hooks/animation.d.ts +0 -3
  51. package/lib/jsx/hooks/basic.d.ts +0 -4
  52. package/lib/jsx/hooks/element-resize.d.ts +0 -3
  53. package/lib/jsx/hooks/intersection.d.ts +0 -3
  54. package/lib/jsx/hooks/store.d.ts +0 -6
  55. package/lib/jsx/hooks/style.d.ts +0 -2
  56. package/lib/jsx/hooks/utils.d.ts +0 -4
  57. package/lib/jsx/hooks/window-resize.d.ts +0 -2
  58. package/lib/jsx/index.cjs +0 -1
  59. package/lib/jsx/index.d.ts +0 -11
  60. package/lib/jsx/index.js +0 -193
  61. package/lib/jsx/render.d.ts +0 -2
  62. package/lib/jsx/type.d.ts +0 -187
  63. package/lib/tags-DkAbVUQP.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const r=require("../browser-CpzFX2xg.cjs"),s=require("../tags-DkAbVUQP.cjs");class i extends e.CustomElement{constructor(){super(),r.isBrowser&&s.element(this,{attributes:{tabIndex:this.getAttribute("tabindex")||"0",role:"button"},style:{cursor:"default"},events:{keydown:t=>{t.code==="Space"&&this.click()},click:()=>{this.click()}}})}}exports.AbstractButtonElement=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const r=require("../browser-CpzFX2xg.cjs"),s=require("../tags-pcim-Cws.cjs");class o extends t.CustomElement{constructor(){super(),r.isBrowser&&s.element(this,{style:{cursor:"default"},tabIndex:this.getAttribute("tabindex")||"0",role:"button",onKeydown:e=>{e.code==="Space"&&this.click()},onClick:()=>{this.click()}})}}exports.AbstractButtonElement=o;
@@ -1,24 +1,20 @@
1
1
  import { CustomElement as e } from "../custom-element/index.js";
2
2
  import "../Store-JOKrNVEr.js";
3
- import { i as r } from "../browser-0zX67oeU.js";
4
- import { e as s } from "../tags-D-lzPz_v.js";
3
+ import { i as o } from "../browser-0zX67oeU.js";
4
+ import { e as r } from "../tags-8Y7LSTwg.js";
5
5
  class l extends e {
6
6
  constructor() {
7
- super(), r && s(this, {
8
- attributes: {
9
- tabIndex: this.getAttribute("tabindex") || "0",
10
- role: "button"
11
- },
7
+ super(), o && r(this, {
12
8
  style: {
13
9
  cursor: "default"
14
10
  },
15
- events: {
16
- keydown: (t) => {
17
- t.code === "Space" && this.click();
18
- },
19
- click: () => {
20
- this.click();
21
- }
11
+ tabIndex: this.getAttribute("tabindex") || "0",
12
+ role: "button",
13
+ onKeydown: (t) => {
14
+ t.code === "Space" && this.click();
15
+ },
16
+ onClick: () => {
17
+ this.click();
22
18
  }
23
19
  });
24
20
  }
@@ -25,6 +25,6 @@ declare global {
25
25
  'e-accordion': AccordionElement;
26
26
  }
27
27
  interface HTMLElementEventMap {
28
- 'e-accordion-item-toggle': CustomEvent<AccordionItemToggleEventDetail>;
28
+ accordionItemToggle: CustomEvent<AccordionItemToggleEventDetail>;
29
29
  }
30
30
  }
@@ -1 +1 @@
1
- "use strict";var I=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var t=(s,e,i)=>(I(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,l)=>(I(s,e,"write to private field"),l?l.call(s,i):e.set(s,i),i);var a=(s,e,i)=>(I(s,e,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("../custom-element/index.cjs"),N=require("../attribute/index.cjs"),J=require("../browser-CpzFX2xg.cjs"),K=require("../events-D68xg4dy.cjs"),Q=require("../style-At6aDoqG.cjs");var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(s,e,i,l)=>{for(var g=l>1?void 0:l?V(e,i):e,O=s.length-1,S;O>=0;O--)(S=s[O])&&(g=(l?S(e,i,g):S(g))||g);return l&&g&&U(e,i,g),g},$=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},o=(s,e,i)=>($(s,e,"read from private field"),i?i.call(s):e.get(s)),L=(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)},R=(s,e,i,l)=>($(s,e,"write to private field"),l?l.call(s,i):e.set(s,i),i),W,q,u,y,z,P,E,r,f,n,p,k,w,v,x,F,T,b,H,A,c,m,_,M,C,D;class B{constructor(e,i){h(this,x);h(this,c);h(this,_);h(this,C);h(this,E,null);h(this,r,null);h(this,f,null);h(this,n,null);h(this,p,null);h(this,k,!1);h(this,w,void 0);h(this,v,!1);h(this,T,()=>{t(this,v)?this.close():this.open()});h(this,b,()=>{t(this,v)&&(a(this,c,m).call(this,0,!0),a(this,c,m).call(this,t(this,n).scrollHeight))});h(this,H,()=>{a(this,_,M).call(this,"size-change")});h(this,A,()=>{t(this,v)&&(a(this,c,m).call(this,0,!0),a(this,c,m).call(this,t(this,n).scrollHeight))});i.firstElementChild instanceof HTMLElement&&i.lastElementChild instanceof HTMLElement?(d(this,E,e),d(this,r,i),d(this,f,i.firstElementChild),d(this,n,i.lastElementChild),t(this,f).style.cursor="default",t(this,n).style.height="0px",t(this,n).style.overflow="hidden",d(this,p,new ResizeObserver(t(this,H))),addEventListener("resize",t(this,b)),t(this,f).addEventListener("click",t(this,T)),t(this,r).addEventListener("e-size-change",t(this,A)),t(this,r).hasAttribute("data-opened")&&this.open({skipTransition:!0})):e.removeItem(t(this,r))}get element(){return t(this,r)}destroy(){t(this,f)&&(t(this,r).classList.remove("opened","triggered"),t(this,f).style.cursor="",a(this,c,m).call(this,void 0),t(this,p).disconnect(),removeEventListener("resize",t(this,b)),t(this,f).removeEventListener("click",t(this,T)),t(this,r).removeEventListener("e-size-change",t(this,A)),clearTimeout(t(this,w)))}open(e){e!=null&&e.skipTransition&&a(this,C,D).call(this),t(this,E).multipleAttribute.current||t(this,E).closeAll({exclude:t(this,r)}),t(this,k)||t(this,p).observe(t(this,n)),d(this,v,!0),clearTimeout(t(this,w)),t(this,r).classList.add("triggered"),a(this,c,m).call(this,t(this,n).scrollHeight),setTimeout(()=>{t(this,r).classList.add("opened")},0),a(this,_,M).call(this,"toggle")}close(e){e!=null&&e.skipTransition&&a(this,C,D).call(this),d(this,v,!1),t(this,r).classList.remove("opened"),a(this,c,m).call(this,0),d(this,w,setTimeout(()=>{t(this,r).classList.remove("triggered")},Q.getElementTransitionDurationMS(t(this,n)))),a(this,_,M).call(this,"toggle")}}E=new WeakMap,r=new WeakMap,f=new WeakMap,n=new WeakMap,p=new WeakMap,k=new WeakMap,w=new WeakMap,v=new WeakMap,x=new WeakSet,F=function(){return t(this,r).parentElement||t(this,r).getRootNode()},T=new WeakMap,b=new WeakMap,H=new WeakMap,A=new WeakMap,c=new WeakSet,m=function(e,i=!1){i&&(t(this,n).style.transition="all 0s",setTimeout(()=>{t(this,n).style.transition=""})),e!=null?t(this,n).style.height=`${e}px`:t(this,n).style.height=""},_=new WeakSet,M=function(e){e==="toggle"?t(this,r).dispatchEvent(new CustomEvent("e-accordion-item-toggle",{bubbles:!0,composed:!0,detail:{opened:t(this,v)}})):e==="size-change"&&K.dispatchSizeChangeEvent(t(this,x,F))},C=new WeakSet,D=function(){t(this,n).style.transition="all 0s",setTimeout(()=>{t(this,n).style.transition=""},50)};exports.AccordionElement=class extends G.CustomElement{constructor(){super(),L(this,z),L(this,W,new N.Attribute(this,"axis","y")),L(this,q,new N.Attribute(this,"multiple",!1)),L(this,u,[]),L(this,y,null),J.isBrowser&&R(this,y,new MutationObserver(e=>{e.forEach(i=>{i.removedNodes.forEach(l=>{l instanceof HTMLElement&&this.removeItem(l)}),i.addedNodes.forEach(l=>{l instanceof HTMLElement&&this.createItem(l)})})}))}get axisAttribute(){return o(this,W)}get multipleAttribute(){return o(this,q)}createItem(e){o(this,u).find(i=>i.element===e)||o(this,u).push(new B(this,e))}removeItem(e){R(this,u,o(this,u).filter(i=>{if(i.element!==e)return!0;i.destroy()}))}closeAll(e){o(this,u).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.close(e)})}openAll(e){o(this,u).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.open(e)})}connectedCallback(){o(this,y).observe(o(this,z,P),{childList:!0}),R(this,u,[...o(this,z,P).children].map(e=>{if(e instanceof HTMLElement)return new B(this,e)}).filter(e=>!!e))}disconnectedCallback(){o(this,y).disconnect()}};W=new WeakMap;q=new WeakMap;u=new WeakMap;y=new WeakMap;z=new WeakSet;P=function(){return this.shadowRoot?this.shadowRoot:this};exports.AccordionElement=X([G.define("e-accordion")],exports.AccordionElement);
1
+ "use strict";var I=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)};var t=(s,e,i)=>(I(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,l)=>(I(s,e,"write to private field"),l?l.call(s,i):e.set(s,i),i);var a=(s,e,i)=>(I(s,e,"access private method"),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("../custom-element/index.cjs"),N=require("../attribute/index.cjs"),J=require("../browser-CpzFX2xg.cjs"),K=require("../events-Crwi8fz6.cjs"),Q=require("../style-At6aDoqG.cjs");var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(s,e,i,l)=>{for(var E=l>1?void 0:l?V(e,i):e,O=s.length-1,S;O>=0;O--)(S=s[O])&&(E=(l?S(e,i,E):S(E))||E);return l&&E&&U(e,i,E),E},$=(s,e,i)=>{if(!e.has(s))throw TypeError("Cannot "+i)},o=(s,e,i)=>($(s,e,"read from private field"),i?i.call(s):e.get(s)),_=(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)},R=(s,e,i,l)=>($(s,e,"write to private field"),l?l.call(s,i):e.set(s,i),i),W,q,u,T,k,P,g,r,f,n,p,M,w,v,x,F,y,b,H,A,c,m,L,z,C,D;class B{constructor(e,i){h(this,x);h(this,c);h(this,L);h(this,C);h(this,g,null);h(this,r,null);h(this,f,null);h(this,n,null);h(this,p,null);h(this,M,!1);h(this,w,void 0);h(this,v,!1);h(this,y,()=>{t(this,v)?this.close():this.open()});h(this,b,()=>{t(this,v)&&(a(this,c,m).call(this,0,!0),a(this,c,m).call(this,t(this,n).scrollHeight))});h(this,H,()=>{a(this,L,z).call(this,"size-change")});h(this,A,()=>{t(this,v)&&(a(this,c,m).call(this,0,!0),a(this,c,m).call(this,t(this,n).scrollHeight))});i.firstElementChild instanceof HTMLElement&&i.lastElementChild instanceof HTMLElement?(d(this,g,e),d(this,r,i),d(this,f,i.firstElementChild),d(this,n,i.lastElementChild),t(this,f).style.cursor="default",t(this,n).style.height="0px",t(this,n).style.overflow="hidden",d(this,p,new ResizeObserver(t(this,H))),addEventListener("resize",t(this,b)),t(this,f).addEventListener("click",t(this,y)),t(this,r).addEventListener("sizeChange",t(this,A)),t(this,r).hasAttribute("data-opened")&&this.open({skipTransition:!0})):e.removeItem(t(this,r))}get element(){return t(this,r)}destroy(){t(this,f)&&(t(this,r).classList.remove("opened","triggered"),t(this,f).style.cursor="",a(this,c,m).call(this,void 0),t(this,p).disconnect(),removeEventListener("resize",t(this,b)),t(this,f).removeEventListener("click",t(this,y)),t(this,r).removeEventListener("sizeChange",t(this,A)),clearTimeout(t(this,w)))}open(e){e!=null&&e.skipTransition&&a(this,C,D).call(this),t(this,g).multipleAttribute.current||t(this,g).closeAll({exclude:t(this,r)}),t(this,M)||t(this,p).observe(t(this,n)),d(this,v,!0),clearTimeout(t(this,w)),t(this,r).classList.add("triggered"),a(this,c,m).call(this,t(this,n).scrollHeight),setTimeout(()=>{t(this,r).classList.add("opened")},0),a(this,L,z).call(this,"toggle")}close(e){e!=null&&e.skipTransition&&a(this,C,D).call(this),d(this,v,!1),t(this,r).classList.remove("opened"),a(this,c,m).call(this,0),d(this,w,setTimeout(()=>{t(this,r).classList.remove("triggered")},Q.getElementTransitionDurationMS(t(this,n)))),a(this,L,z).call(this,"toggle")}}g=new WeakMap,r=new WeakMap,f=new WeakMap,n=new WeakMap,p=new WeakMap,M=new WeakMap,w=new WeakMap,v=new WeakMap,x=new WeakSet,F=function(){return t(this,r).parentElement||t(this,r).getRootNode()},y=new WeakMap,b=new WeakMap,H=new WeakMap,A=new WeakMap,c=new WeakSet,m=function(e,i=!1){i&&(t(this,n).style.transition="all 0s",setTimeout(()=>{t(this,n).style.transition=""})),e!=null?t(this,n).style.height=`${e}px`:t(this,n).style.height=""},L=new WeakSet,z=function(e){e==="toggle"?t(this,r).dispatchEvent(new CustomEvent("accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:t(this,v)}})):e==="size-change"&&K.dispatchSizeChangeEvent(t(this,x,F))},C=new WeakSet,D=function(){t(this,n).style.transition="all 0s",setTimeout(()=>{t(this,n).style.transition=""},50)};exports.AccordionElement=class extends G.CustomElement{constructor(){super(),_(this,k),_(this,W,new N.Attribute(this,"axis","y")),_(this,q,new N.Attribute(this,"multiple",!1)),_(this,u,[]),_(this,T,null),J.isBrowser&&R(this,T,new MutationObserver(e=>{e.forEach(i=>{i.removedNodes.forEach(l=>{l instanceof HTMLElement&&this.removeItem(l)}),i.addedNodes.forEach(l=>{l instanceof HTMLElement&&this.createItem(l)})})}))}get axisAttribute(){return o(this,W)}get multipleAttribute(){return o(this,q)}createItem(e){o(this,u).find(i=>i.element===e)||o(this,u).push(new B(this,e))}removeItem(e){R(this,u,o(this,u).filter(i=>{if(i.element!==e)return!0;i.destroy()}))}closeAll(e){o(this,u).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.close(e)})}openAll(e){o(this,u).forEach(i=>{(e==null?void 0:e.exclude)!==i.element&&i.open(e)})}connectedCallback(){o(this,T).observe(o(this,k,P),{childList:!0}),R(this,u,[...o(this,k,P).children].map(e=>{if(e instanceof HTMLElement)return new B(this,e)}).filter(e=>!!e))}disconnectedCallback(){o(this,T).disconnect()}};W=new WeakMap;q=new WeakMap;u=new WeakMap;T=new WeakMap;k=new WeakSet;P=function(){return this.shadowRoot?this.shadowRoot:this};exports.AccordionElement=X([G.define("e-accordion")],exports.AccordionElement);addEventListener("click",s=>{});
@@ -11,20 +11,20 @@ var l = (t, e, s) => (S(t, e, "access private method"), s);
11
11
  import { CustomElement as J, define as K } from "../custom-element/index.js";
12
12
  import { Attribute as B } from "../attribute/index.js";
13
13
  import { i as Q } from "../browser-0zX67oeU.js";
14
- import { d as U } from "../events-CoqmkUxo.js";
14
+ import { d as U } from "../events-_C2CztxR.js";
15
15
  import { g as V } from "../style-j2TwriJ_.js";
16
16
  var X = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, Z = (t, e, s, o) => {
17
- for (var g = o > 1 ? void 0 : o ? Y(e, s) : e, O = t.length - 1, I; O >= 0; O--)
18
- (I = t[O]) && (g = (o ? I(e, s, g) : I(g)) || g);
17
+ for (var g = o > 1 ? void 0 : o ? Y(e, s) : e, I = t.length - 1, O; I >= 0; I--)
18
+ (O = t[I]) && (g = (o ? O(e, s, g) : O(g)) || g);
19
19
  return o && g && X(e, s, g), g;
20
20
  }, q = (t, e, s) => {
21
21
  if (!e.has(t))
22
22
  throw TypeError("Cannot " + s);
23
- }, a = (t, e, s) => (q(t, e, "read from private field"), s ? s.call(t) : e.get(t)), _ = (t, e, s) => {
23
+ }, a = (t, e, s) => (q(t, e, "read from private field"), s ? s.call(t) : e.get(t)), T = (t, e, s) => {
24
24
  if (e.has(t))
25
25
  throw TypeError("Cannot add the same private member more than once");
26
26
  e instanceof WeakSet ? e.add(t) : e.set(t, s);
27
- }, R = (t, e, s, o) => (q(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s), W, P, f, T, z, D, p, r, u, n, E, M, w, m, x, F, y, C, H, b, c, v, L, k, A, N;
27
+ }, R = (t, e, s, o) => (q(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s), W, P, f, _, k, D, p, r, u, n, E, M, w, m, x, F, y, C, H, b, c, v, L, z, A, N;
28
28
  class G {
29
29
  constructor(e, s) {
30
30
  h(this, x);
@@ -46,13 +46,13 @@ class G {
46
46
  i(this, m) && (l(this, c, v).call(this, 0, !0), l(this, c, v).call(this, i(this, n).scrollHeight));
47
47
  });
48
48
  h(this, H, () => {
49
- l(this, L, k).call(this, "size-change");
49
+ l(this, L, z).call(this, "size-change");
50
50
  });
51
51
  h(this, b, () => {
52
52
  i(this, m) && (l(this, c, v).call(this, 0, !0), l(this, c, v).call(this, i(this, n).scrollHeight));
53
53
  });
54
54
  s.firstElementChild instanceof HTMLElement && s.lastElementChild instanceof HTMLElement ? (d(this, p, e), d(this, r, s), d(this, u, s.firstElementChild), d(this, n, s.lastElementChild), i(this, u).style.cursor = "default", i(this, n).style.height = "0px", i(this, n).style.overflow = "hidden", d(this, E, new ResizeObserver(i(this, H))), addEventListener("resize", i(this, C)), i(this, u).addEventListener("click", i(this, y)), i(this, r).addEventListener(
55
- "e-size-change",
55
+ "sizeChange",
56
56
  i(this, b)
57
57
  ), i(this, r).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) : e.removeItem(i(this, r));
58
58
  }
@@ -61,19 +61,19 @@ class G {
61
61
  }
62
62
  destroy() {
63
63
  i(this, u) && (i(this, r).classList.remove("opened", "triggered"), i(this, u).style.cursor = "", l(this, c, v).call(this, void 0), i(this, E).disconnect(), removeEventListener("resize", i(this, C)), i(this, u).removeEventListener("click", i(this, y)), i(this, r).removeEventListener(
64
- "e-size-change",
64
+ "sizeChange",
65
65
  i(this, b)
66
66
  ), clearTimeout(i(this, w)));
67
67
  }
68
68
  open(e) {
69
69
  e != null && e.skipTransition && l(this, A, N).call(this), i(this, p).multipleAttribute.current || i(this, p).closeAll({ exclude: i(this, r) }), i(this, M) || i(this, E).observe(i(this, n)), d(this, m, !0), clearTimeout(i(this, w)), i(this, r).classList.add("triggered"), l(this, c, v).call(this, i(this, n).scrollHeight), setTimeout(() => {
70
70
  i(this, r).classList.add("opened");
71
- }, 0), l(this, L, k).call(this, "toggle");
71
+ }, 0), l(this, L, z).call(this, "toggle");
72
72
  }
73
73
  close(e) {
74
74
  e != null && e.skipTransition && l(this, A, N).call(this), d(this, m, !1), i(this, r).classList.remove("opened"), l(this, c, v).call(this, 0), d(this, w, setTimeout(() => {
75
75
  i(this, r).classList.remove("triggered");
76
- }, V(i(this, n)))), l(this, L, k).call(this, "toggle");
76
+ }, V(i(this, n)))), l(this, L, z).call(this, "toggle");
77
77
  }
78
78
  }
79
79
  p = new WeakMap(), r = new WeakMap(), u = new WeakMap(), n = new WeakMap(), E = new WeakMap(), M = new WeakMap(), w = new WeakMap(), m = new WeakMap(), x = new WeakSet(), F = function() {
@@ -82,18 +82,15 @@ p = new WeakMap(), r = new WeakMap(), u = new WeakMap(), n = new WeakMap(), E =
82
82
  s && (i(this, n).style.transition = "all 0s", setTimeout(() => {
83
83
  i(this, n).style.transition = "";
84
84
  })), e != null ? i(this, n).style.height = `${e}px` : i(this, n).style.height = "";
85
- }, L = new WeakSet(), k = function(e) {
85
+ }, L = new WeakSet(), z = function(e) {
86
86
  e === "toggle" ? i(this, r).dispatchEvent(
87
- new CustomEvent(
88
- "e-accordion-item-toggle",
89
- {
90
- bubbles: !0,
91
- composed: !0,
92
- detail: {
93
- opened: i(this, m)
94
- }
87
+ new CustomEvent("accordionItemToggle", {
88
+ bubbles: !0,
89
+ composed: !0,
90
+ detail: {
91
+ opened: i(this, m)
95
92
  }
96
- )
93
+ })
97
94
  ) : e === "size-change" && U(i(this, x, F));
98
95
  }, A = new WeakSet(), N = function() {
99
96
  i(this, n).style.transition = "all 0s", setTimeout(() => {
@@ -102,7 +99,7 @@ p = new WeakMap(), r = new WeakMap(), u = new WeakMap(), n = new WeakMap(), E =
102
99
  };
103
100
  let $ = class extends J {
104
101
  constructor() {
105
- super(), _(this, z), _(this, W, new B(this, "axis", "y")), _(this, P, new B(this, "multiple", !1)), _(this, f, []), _(this, T, null), Q && R(this, T, new MutationObserver((t) => {
102
+ super(), T(this, k), T(this, W, new B(this, "axis", "y")), T(this, P, new B(this, "multiple", !1)), T(this, f, []), T(this, _, null), Q && R(this, _, new MutationObserver((t) => {
106
103
  t.forEach((e) => {
107
104
  e.removedNodes.forEach((s) => {
108
105
  s instanceof HTMLElement && this.removeItem(s);
@@ -139,28 +136,30 @@ let $ = class extends J {
139
136
  });
140
137
  }
141
138
  connectedCallback() {
142
- a(this, T).observe(a(this, z, D), {
139
+ a(this, _).observe(a(this, k, D), {
143
140
  childList: !0
144
- }), R(this, f, [...a(this, z, D).children].map((t) => {
141
+ }), R(this, f, [...a(this, k, D).children].map((t) => {
145
142
  if (t instanceof HTMLElement)
146
143
  return new G(this, t);
147
144
  }).filter((t) => !!t));
148
145
  }
149
146
  disconnectedCallback() {
150
- a(this, T).disconnect();
147
+ a(this, _).disconnect();
151
148
  }
152
149
  };
153
150
  W = /* @__PURE__ */ new WeakMap();
154
151
  P = /* @__PURE__ */ new WeakMap();
155
152
  f = /* @__PURE__ */ new WeakMap();
156
- T = /* @__PURE__ */ new WeakMap();
157
- z = /* @__PURE__ */ new WeakSet();
153
+ _ = /* @__PURE__ */ new WeakMap();
154
+ k = /* @__PURE__ */ new WeakSet();
158
155
  D = function() {
159
156
  return this.shadowRoot ? this.shadowRoot : this;
160
157
  };
161
158
  $ = Z([
162
159
  K("e-accordion")
163
160
  ], $);
161
+ addEventListener("click", (t) => {
162
+ });
164
163
  export {
165
164
  $ as AccordionElement
166
165
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const M=require("../math-GDWEqu7y.cjs"),x=require("../tags-DkAbVUQP.cjs"),W=require("../createStylesheet-C1rimcGc.cjs"),y=require("../notifier/index.cjs"),k=require("../element-resizer/index.cjs"),E=require("../ticker/index.cjs");var b=Object.defineProperty,q=Object.getOwnPropertyDescriptor,S=(i,e,s,r)=>{for(var h=r>1?void 0:r?q(e,s):e,f=i.length-1,g;f>=0;f--)(g=i[f])&&(h=(r?g(e,s,h):g(h))||h);return r&&h&&b(e,s,h),h},R=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(R(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)},c=(i,e,s,r)=>(R(i,e,"write to private field"),r?r.call(i,s):e.set(i,s),s),p,a,d,l,o,u,v,_,w,m;const P=W.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});exports.CanvasElement=class extends C.CustomElement{constructor(){super(),n(this,p,new y.Notifier),n(this,a,null),n(this,d,null),n(this,l,0),n(this,o,0),n(this,u,1),n(this,v,0),n(this,_,1),n(this,w,e=>{c(this,u,M.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,o,e.contentRect.height),t(this,a).width=t(this,l)*this.pixelRatio,t(this,a).height=t(this,o)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),this.renderEvent.notify(this.detail)}),n(this,m,e=>{c(this,v,e.timestamp),c(this,_,e.elapsed),t(this,p).notify(this.detail)}),this.openShadow(P),x.element(this,{shadowChildren:x.canvas({ref:e=>{c(this,a,e),c(this,d,e.getContext("2d"))}})})}get renderEvent(){return t(this,p)}get canvasElement(){return t(this,a)}get context(){return t(this,d)}get pixelRatio(){return t(this,u)}get width(){return t(this,l)}get height(){return t(this,o)}get detail(){return{width:t(this,l),height:t(this,o),element:this,canvasElement:t(this,a),pixelRatio:t(this,u),context:t(this,d),timestamp:t(this,v),elapsed:t(this,_)}}connectedCallback(){k.elementResizer.subscribe(this,t(this,w)),this.hasAttribute("static")||E.ticker.subscribe(t(this,m),{culling:this,maxFPS:this.hasAttribute("fps")?parseInt(this.getAttribute("fps")):void 0})}disconnectedCallback(){k.elementResizer.unsubscribe(t(this,w)),E.ticker.unsubscribe(t(this,m)),t(this,p).close(),t(this,a).remove()}};p=new WeakMap;a=new WeakMap;d=new WeakMap;l=new WeakMap;o=new WeakMap;u=new WeakMap;v=new WeakMap;_=new WeakMap;w=new WeakMap;m=new WeakMap;exports.CanvasElement=S([C.define("e-canvas")],exports.CanvasElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../custom-element/index.cjs");require("../Store-D0_rDIsE.cjs");const M=require("../math-GDWEqu7y.cjs"),x=require("../tags-pcim-Cws.cjs"),W=require("../createStylesheet-BsVHqHhr.cjs"),y=require("../notifier/index.cjs"),k=require("../element-resizer/index.cjs"),E=require("../ticker/index.cjs");var b=Object.defineProperty,q=Object.getOwnPropertyDescriptor,S=(i,e,s,r)=>{for(var h=r>1?void 0:r?q(e,s):e,f=i.length-1,g;f>=0;f--)(g=i[f])&&(h=(r?g(e,s,h):g(h))||h);return r&&h&&b(e,s,h),h},C=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(C(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)},c=(i,e,s,r)=>(C(i,e,"write to private field"),r?r.call(i,s):e.set(i,s),s),p,a,d,l,o,u,v,_,w,m;const P=W.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});exports.CanvasElement=class extends R.CustomElement{constructor(){super(),n(this,p,new y.Notifier),n(this,a,null),n(this,d,null),n(this,l,0),n(this,o,0),n(this,u,1),n(this,v,0),n(this,_,1),n(this,w,e=>{c(this,u,M.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,o,e.contentRect.height),t(this,a).width=t(this,l)*this.pixelRatio,t(this,a).height=t(this,o)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),this.renderEvent.notify(this.detail)}),n(this,m,e=>{c(this,v,e.timestamp),c(this,_,e.elapsed),t(this,p).notify(this.detail)}),this.openShadow(P),x.element(this,{children:x.canvas({ref:e=>{c(this,a,e),c(this,d,e.getContext("2d"))}})})}get renderEvent(){return t(this,p)}get canvasElement(){return t(this,a)}get context(){return t(this,d)}get pixelRatio(){return t(this,u)}get width(){return t(this,l)}get height(){return t(this,o)}get detail(){return{width:t(this,l),height:t(this,o),element:this,canvasElement:t(this,a),pixelRatio:t(this,u),context:t(this,d),timestamp:t(this,v),elapsed:t(this,_)}}connectedCallback(){k.elementResizer.subscribe(this,t(this,w)),this.hasAttribute("static")||E.ticker.subscribe(t(this,m),{culling:this,maxFPS:this.hasAttribute("fps")?parseInt(this.getAttribute("fps")):void 0})}disconnectedCallback(){k.elementResizer.unsubscribe(t(this,w)),E.ticker.unsubscribe(t(this,m)),t(this,p).close(),t(this,a).remove()}};p=new WeakMap;a=new WeakMap;d=new WeakMap;l=new WeakMap;o=new WeakMap;u=new WeakMap;v=new WeakMap;_=new WeakMap;w=new WeakMap;m=new WeakMap;exports.CanvasElement=S([R.define("e-canvas")],exports.CanvasElement);
@@ -1,14 +1,14 @@
1
- import { CustomElement as C, define as E } from "../custom-element/index.js";
1
+ import { CustomElement as E, define as M } from "../custom-element/index.js";
2
2
  import "../Store-JOKrNVEr.js";
3
- import { c as M } from "../math-BOBiC4TN.js";
4
- import { e as y, q as b } from "../tags-D-lzPz_v.js";
5
- import { c as P } from "../createStylesheet-BSXZrWW6.js";
3
+ import { c as C } from "../math-BOBiC4TN.js";
4
+ import { e as y, q as b } from "../tags-8Y7LSTwg.js";
5
+ import { c as P } from "../createStylesheet-ITfBHk7A.js";
6
6
  import { Notifier as S } from "../notifier/index.js";
7
7
  import { elementResizer as x } from "../element-resizer/index.js";
8
8
  import { ticker as k } from "../ticker/index.js";
9
9
  var A = Object.defineProperty, O = Object.getOwnPropertyDescriptor, z = (t, i, s, r) => {
10
- for (var n = r > 1 ? void 0 : r ? O(i, s) : i, _ = t.length - 1, g; _ >= 0; _--)
11
- (g = t[_]) && (n = (r ? g(i, s, n) : g(n)) || n);
10
+ for (var n = r > 1 ? void 0 : r ? O(i, s) : i, w = t.length - 1, g; w >= 0; w--)
11
+ (g = t[w]) && (n = (r ? g(i, s, n) : g(n)) || n);
12
12
  return r && n && A(i, s, n), n;
13
13
  }, W = (t, i, s) => {
14
14
  if (!i.has(t))
@@ -17,7 +17,7 @@ var A = Object.defineProperty, O = Object.getOwnPropertyDescriptor, z = (t, i, s
17
17
  if (i.has(t))
18
18
  throw TypeError("Cannot add the same private member more than once");
19
19
  i instanceof WeakSet ? i.add(t) : i.set(t, s);
20
- }, o = (t, i, s, r) => (W(t, i, "write to private field"), r ? r.call(t, s) : i.set(t, s), s), l, h, d, p, c, m, v, f, u, w;
20
+ }, o = (t, i, s, r) => (W(t, i, "write to private field"), r ? r.call(t, s) : i.set(t, s), s), l, h, d, p, c, m, v, f, u, _;
21
21
  const D = P({
22
22
  ":host, canvas": {
23
23
  display: "block",
@@ -25,14 +25,14 @@ const D = P({
25
25
  height: "100%"
26
26
  }
27
27
  });
28
- let R = class extends C {
28
+ let R = class extends E {
29
29
  constructor() {
30
30
  super(), a(this, l, new S()), a(this, h, null), a(this, d, null), a(this, p, 0), a(this, c, 0), a(this, m, 1), a(this, v, 0), a(this, f, 1), a(this, u, (t) => {
31
- o(this, m, M(devicePixelRatio, 1, 2)), o(this, p, t.contentRect.width), o(this, c, t.contentRect.height), e(this, h).width = e(this, p) * this.pixelRatio, e(this, h).height = e(this, c) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), this.renderEvent.notify(this.detail);
32
- }), a(this, w, (t) => {
31
+ o(this, m, C(devicePixelRatio, 1, 2)), o(this, p, t.contentRect.width), o(this, c, t.contentRect.height), e(this, h).width = e(this, p) * this.pixelRatio, e(this, h).height = e(this, c) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), this.renderEvent.notify(this.detail);
32
+ }), a(this, _, (t) => {
33
33
  o(this, v, t.timestamp), o(this, f, t.elapsed), e(this, l).notify(this.detail);
34
34
  }), this.openShadow(D), y(this, {
35
- shadowChildren: b({
35
+ children: b({
36
36
  ref: (t) => {
37
37
  o(this, h, t), o(this, d, t.getContext("2d"));
38
38
  }
@@ -70,13 +70,13 @@ let R = class extends C {
70
70
  };
71
71
  }
72
72
  connectedCallback() {
73
- x.subscribe(this, e(this, u)), this.hasAttribute("static") || k.subscribe(e(this, w), {
73
+ x.subscribe(this, e(this, u)), this.hasAttribute("static") || k.subscribe(e(this, _), {
74
74
  culling: this,
75
75
  maxFPS: this.hasAttribute("fps") ? parseInt(this.getAttribute("fps")) : void 0
76
76
  });
77
77
  }
78
78
  disconnectedCallback() {
79
- x.unsubscribe(e(this, u)), k.unsubscribe(e(this, w)), e(this, l).close(), e(this, h).remove();
79
+ x.unsubscribe(e(this, u)), k.unsubscribe(e(this, _)), e(this, l).close(), e(this, h).remove();
80
80
  }
81
81
  };
82
82
  l = /* @__PURE__ */ new WeakMap();
@@ -88,9 +88,9 @@ m = /* @__PURE__ */ new WeakMap();
88
88
  v = /* @__PURE__ */ new WeakMap();
89
89
  f = /* @__PURE__ */ new WeakMap();
90
90
  u = /* @__PURE__ */ new WeakMap();
91
- w = /* @__PURE__ */ new WeakMap();
91
+ _ = /* @__PURE__ */ new WeakMap();
92
92
  R = z([
93
- E("e-canvas")
93
+ M("e-canvas")
94
94
  ], R);
95
95
  export {
96
96
  R as CanvasElement
@@ -1 +1 @@
1
- "use strict";var C=(t,n,e)=>{if(!n.has(t))throw TypeError("Cannot "+e)};var s=(t,n,e)=>(C(t,n,"read from private field"),e?e.call(t):n.get(t)),o=(t,n,e)=>{if(n.has(t))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(t):n.set(t,e)},r=(t,n,e,a)=>(C(t,n,"write to private field"),a?a.call(t,e):n.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../browser-CpzFX2xg.cjs");var i,l,d;class b{constructor(){o(this,i,[]);o(this,l,void 0);o(this,d,()=>{var n,e;for(let a=0;a<s(this,i).length;a++){const c=s(this,i)[a];c.node.isConnected&&!c.isConnected?((n=c.connectCallback)==null||n.call(c),c.isConnected=!0):!c.node.isConnected&&c.isConnected&&((e=c.disconnectCallback)==null||e.call(c),c.isConnected=!1,c.unsubscribeAfterDisconnect&&this.unsubscribe(c)),c.timer+=100,!c.isConnected&&c.timer>c.maxWaitSec*1e3&&this.unsubscribe(c)}});f.isBrowser&&r(this,l,setInterval(s(this,d),100))}subscribe(n,e){return s(this,i).push({node:n,connectCallback:e.connectCallback,disconnectCallback:e.disconnectCallback,isConnected:!1,maxWaitSec:e.maxWaitSec||1/0,timer:0,unsubscribeAfterDisconnect:e.unsubscribeAfterDisconnect||!1}),()=>{this.unsubscribe(e)}}unsubscribe(n){s(this,i).forEach(e=>{e.connectCallback===n.connectCallback&&(e.connectCallback=void 0),e.disconnectCallback===n.disconnectCallback&&(e.disconnectCallback=void 0)}),r(this,i,s(this,i).filter(e=>e.connectCallback&&e.disconnectCallback))}destroy(){clearInterval(s(this,l)),r(this,i,[])}}i=new WeakMap,l=new WeakMap,d=new WeakMap;const u=new b;exports.Connector=b;exports.connector=u;
1
+ "use strict";var f=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var c=(i,t,e)=>(f(i,t,"read from private field"),e?e.call(i):t.get(i)),o=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},d=(i,t,e,l)=>(f(i,t,"write to private field"),l?l.call(i,e):t.set(i,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var a,s,h,r;class b{constructor(){o(this,a,[]);o(this,s,void 0);o(this,h,100);o(this,r,()=>{var t,e,l;for(let C=c(this,a).length-1;C>=0;C--){const n=c(this,a)[c(this,a).length-1-C];n.node.isConnected&&!n.isConnected?((t=n.connectCallback)==null||t.call(n),n.isConnected=!0):!n.node.isConnected&&n.isConnected&&((e=n.disconnectCallback)==null||e.call(n),n.isConnected=!1,n.unsubscribeAfterDisconnect&&this.unsubscribe(n)),n.timer+=c(this,h),!n.isConnected&&n.timer>n.maxWaitSec*1e3&&((l=n.disconnectCallback)==null||l.call(n,!0),this.unsubscribe(n))}})}subscribe(t,e){const l=c(this,a).length;return c(this,a).push({node:t,connectCallback:e.connectCallback,disconnectCallback:e.disconnectCallback,isConnected:!1,maxWaitSec:typeof e.maxWaitSec=="number"?e.maxWaitSec===0?c(this,h)/1e3:e.maxWaitSec:1/0,timer:0,unsubscribeAfterDisconnect:e.unsubscribeAfterDisconnect||!1}),l||(d(this,s,setInterval(c(this,r),100)),c(this,r).call(this)),()=>{this.unsubscribe(e)}}unsubscribe(t){c(this,a).forEach(e=>{e.connectCallback===t.connectCallback&&(e.connectCallback=void 0),e.disconnectCallback===t.disconnectCallback&&(e.disconnectCallback=void 0)}),d(this,a,c(this,a).filter(e=>e.connectCallback||e.disconnectCallback)),c(this,a).length||clearInterval(c(this,s))}destroy(){clearInterval(c(this,s)),d(this,a,[])}}a=new WeakMap,s=new WeakMap,h=new WeakMap,r=new WeakMap;const k=new b;exports.Connector=b;exports.connector=k;
@@ -1,4 +1,4 @@
1
- export type ConnectorCallback = () => void;
1
+ export type ConnectorCallback = (expired?: boolean) => void;
2
2
  export interface ConnectorOptions {
3
3
  connectCallback?: ConnectorCallback;
4
4
  disconnectCallback?: ConnectorCallback;
@@ -7,7 +7,6 @@ export interface ConnectorOptions {
7
7
  }
8
8
  export declare class Connector {
9
9
  #private;
10
- constructor();
11
10
  subscribe(node: Node, options: ConnectorOptions): () => void;
12
11
  unsubscribe(options: ConnectorOptions): void;
13
12
  destroy(): void;
@@ -1,54 +1,54 @@
1
- var d = (t, c, e) => {
2
- if (!c.has(t))
1
+ var f = (i, t, e) => {
2
+ if (!t.has(i))
3
3
  throw TypeError("Cannot " + e);
4
4
  };
5
- var s = (t, c, e) => (d(t, c, "read from private field"), e ? e.call(t) : c.get(t)), o = (t, c, e) => {
6
- if (c.has(t))
5
+ var c = (i, t, e) => (f(i, t, "read from private field"), e ? e.call(i) : t.get(i)), o = (i, t, e) => {
6
+ if (t.has(i))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- c instanceof WeakSet ? c.add(t) : c.set(t, e);
9
- }, r = (t, c, e, a) => (d(t, c, "write to private field"), a ? a.call(t, e) : c.set(t, e), e);
10
- import { i as b } from "../browser-0zX67oeU.js";
11
- var i, l, C;
12
- class f {
8
+ t instanceof WeakSet ? t.add(i) : t.set(i, e);
9
+ }, d = (i, t, e, l) => (f(i, t, "write to private field"), l ? l.call(i, e) : t.set(i, e), e);
10
+ var a, s, h, C;
11
+ class b {
13
12
  constructor() {
14
- o(this, i, []);
15
- o(this, l, void 0);
13
+ o(this, a, []);
14
+ o(this, s, void 0);
15
+ o(this, h, 100);
16
16
  o(this, C, () => {
17
- var c, e;
18
- for (let a = 0; a < s(this, i).length; a++) {
19
- const n = s(this, i)[a];
20
- n.node.isConnected && !n.isConnected ? ((c = n.connectCallback) == null || c.call(n), n.isConnected = !0) : !n.node.isConnected && n.isConnected && ((e = n.disconnectCallback) == null || e.call(n), n.isConnected = !1, n.unsubscribeAfterDisconnect && this.unsubscribe(n)), n.timer += 100, !n.isConnected && n.timer > n.maxWaitSec * 1e3 && this.unsubscribe(n);
17
+ var t, e, l;
18
+ for (let r = c(this, a).length - 1; r >= 0; r--) {
19
+ const n = c(this, a)[c(this, a).length - 1 - r];
20
+ n.node.isConnected && !n.isConnected ? ((t = n.connectCallback) == null || t.call(n), n.isConnected = !0) : !n.node.isConnected && n.isConnected && ((e = n.disconnectCallback) == null || e.call(n), n.isConnected = !1, n.unsubscribeAfterDisconnect && this.unsubscribe(n)), n.timer += c(this, h), !n.isConnected && n.timer > n.maxWaitSec * 1e3 && ((l = n.disconnectCallback) == null || l.call(n, !0), this.unsubscribe(n));
21
21
  }
22
22
  });
23
- b && r(this, l, setInterval(s(this, C), 100));
24
23
  }
25
- subscribe(c, e) {
26
- return s(this, i).push({
27
- node: c,
24
+ subscribe(t, e) {
25
+ const l = c(this, a).length;
26
+ return c(this, a).push({
27
+ node: t,
28
28
  connectCallback: e.connectCallback,
29
29
  disconnectCallback: e.disconnectCallback,
30
30
  isConnected: !1,
31
- maxWaitSec: e.maxWaitSec || 1 / 0,
31
+ maxWaitSec: typeof e.maxWaitSec == "number" ? e.maxWaitSec === 0 ? c(this, h) / 1e3 : e.maxWaitSec : 1 / 0,
32
32
  timer: 0,
33
33
  unsubscribeAfterDisconnect: e.unsubscribeAfterDisconnect || !1
34
- }), () => {
34
+ }), l || (d(this, s, setInterval(c(this, C), 100)), c(this, C).call(this)), () => {
35
35
  this.unsubscribe(e);
36
36
  };
37
37
  }
38
- unsubscribe(c) {
39
- s(this, i).forEach((e) => {
40
- e.connectCallback === c.connectCallback && (e.connectCallback = void 0), e.disconnectCallback === c.disconnectCallback && (e.disconnectCallback = void 0);
41
- }), r(this, i, s(this, i).filter(
42
- (e) => e.connectCallback && e.disconnectCallback
43
- ));
38
+ unsubscribe(t) {
39
+ c(this, a).forEach((e) => {
40
+ e.connectCallback === t.connectCallback && (e.connectCallback = void 0), e.disconnectCallback === t.disconnectCallback && (e.disconnectCallback = void 0);
41
+ }), d(this, a, c(this, a).filter(
42
+ (e) => e.connectCallback || e.disconnectCallback
43
+ )), c(this, a).length || clearInterval(c(this, s));
44
44
  }
45
45
  destroy() {
46
- clearInterval(s(this, l)), r(this, i, []);
46
+ clearInterval(c(this, s)), d(this, a, []);
47
47
  }
48
48
  }
49
- i = new WeakMap(), l = new WeakMap(), C = new WeakMap();
50
- const u = new f();
49
+ a = new WeakMap(), s = new WeakMap(), h = new WeakMap(), C = new WeakMap();
50
+ const u = new b();
51
51
  export {
52
- f as Connector,
52
+ b as Connector,
53
53
  u as connector
54
54
  };
@@ -1 +1 @@
1
- "use strict";const n=require("./tags-DkAbVUQP.cjs");function r(t){const e=new CSSStyleSheet;return e.replaceSync(n.style(t).node.innerHTML),e}exports.createStylesheet=r;
1
+ "use strict";const n=require("./tags-pcim-Cws.cjs");function r(t){const e=new CSSStyleSheet;return e.replaceSync(n.style(t).node.innerHTML),e}exports.createStylesheet=r;
@@ -1,4 +1,4 @@
1
- import { aD as n } from "./tags-D-lzPz_v.js";
1
+ import { aD as n } from "./tags-8Y7LSTwg.js";
2
2
  function c(t) {
3
3
  const e = new CSSStyleSheet();
4
4
  return e.replaceSync(n(t).node.innerHTML), e;
@@ -1,4 +1,6 @@
1
1
  import { Store } from '../store';
2
+ import { SplitFirst } from '../utils';
3
+ import { ConnectorCallback } from '../connector';
2
4
  export type ElementConstructorTagNameMap = HTMLElementTagNameMap & SVGElementTagNameMap;
3
5
  export type ElementConstructorTagNames = keyof ElementConstructorTagNameMap;
4
6
  export type ElementConstructorStringStoreClass = Store<string | null | undefined> | Store<string>;
@@ -18,14 +20,6 @@ export type ElementConstructorJSS = ElementConstructorStyle | {
18
20
  [key: string]: ElementConstructorJSSWrapper | ElementConstructorStyle;
19
21
  };
20
22
  export type ElementConstructorEventMap = HTMLElementEventMap & SVGElementEventMap;
21
- export type ElementConstructorEventNames = keyof ElementConstructorEventMap;
22
- export type ElementConstructorEventValue<E extends Event> = {
23
- callback: (event: E) => void;
24
- options?: AddEventListenerOptions;
25
- } | ((event: E) => void);
26
- export type ElementConstructorEvents = Partial<{
27
- [EventName in ElementConstructorEventNames | `custom:${string}`]: EventName extends ElementConstructorEventNames ? ElementConstructorEventValue<HTMLElementEventMap[EventName]> : ElementConstructorEventValue<CustomEvent>;
28
- }>;
29
23
  export type ElementConstructorNativeAttribute<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames, E = T extends ElementConstructorTagNames ? ElementConstructorTagNameMap[T] : Node> = {
30
24
  [K in keyof E]: E[K] extends string ? K : never;
31
25
  }[keyof E];
@@ -41,23 +35,26 @@ export type ElementConstructorRefCallback<T extends ElementConstructorTagNames |
41
35
  export type ElementConstructorRef<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames> = {
42
36
  current: T extends ElementConstructorTagNames ? ElementConstructorTagNameMap[T] : Node;
43
37
  };
38
+ export type ElementConstructorEventValue<E extends Event> = {
39
+ callback: (event: E) => void;
40
+ options?: AddEventListenerOptions;
41
+ } | ((event: E) => void);
42
+ export type ElementConstructorEvents = Partial<{
43
+ [K in `on${Capitalize<keyof ElementConstructorEventMap>}`]: ElementConstructorEventValue<ElementConstructorEventMap[Extract<Uncapitalize<SplitFirst<K, 'on'>[1]>, keyof ElementConstructorEventMap>]>;
44
+ }>;
44
45
  export type ElementConstructorTagObject<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames> = {
45
46
  class?: ElementConstructorClass;
46
47
  style?: T extends 'style' ? ElementConstructorJSS : ElementConstructorStyle;
47
- events?: ElementConstructorEvents;
48
- attributes?: ElementConstructorAttributes<T>;
49
48
  children?: any;
50
- shadowChildren?: any;
51
- parent?: ElementConstructorParent;
52
49
  ref?: ElementConstructorRefCallback<T> | ElementConstructorRef<T>;
53
50
  forceSvg?: boolean;
54
- };
51
+ lightChildren?: any;
52
+ onDisconnect?: ConnectorCallback;
53
+ } & ElementConstructorAttributes<T> & ElementConstructorEvents;
55
54
  export declare class ElementConstructor<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames, N = T extends ElementConstructorTagNames ? ElementConstructorTagNameMap[T] : Node> {
56
55
  #private;
57
56
  constructor(value: T, object?: ElementConstructorTagObject<T>);
58
57
  constructor(value: string, object?: ElementConstructorTagObject<T>);
59
58
  constructor(value: Node, object?: ElementConstructorTagObject<T>);
60
- get unsubscribeCallbacks(): Function[];
61
59
  get node(): N;
62
- destroy: () => void;
63
60
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../tags-DkAbVUQP.cjs"),t=require("../createStylesheet-C1rimcGc.cjs"),a=require("../createTheme-COo8IzPG.cjs");exports.ElementConstructor=e.ElementConstructor;exports.a=e.a;exports.abbr=e.abbr;exports.address=e.address;exports.area=e.area;exports.article=e.article;exports.aside=e.aside;exports.audio=e.audio;exports.b=e.b;exports.base=e.base;exports.bdi=e.bdi;exports.bdo=e.bdo;exports.blockquote=e.blockquote;exports.body=e.body;exports.br=e.br;exports.button=e.button;exports.canvas=e.canvas;exports.caption=e.caption;exports.cite=e.cite;exports.code=e.code;exports.col=e.col;exports.colgroup=e.colgroup;exports.custom=e.custom;exports.data=e.data;exports.datalist=e.datalist;exports.dd=e.dd;exports.del=e.del;exports.details=e.details;exports.dfn=e.dfn;exports.dialog=e.dialog;exports.div=e.div;exports.dl=e.dl;exports.dt=e.dt;exports.element=e.element;exports.em=e.em;exports.embed=e.embed;exports.fieldset=e.fieldset;exports.figcaption=e.figcaption;exports.figure=e.figure;exports.footer=e.footer;exports.form=e.form;exports.h1=e.h1;exports.h2=e.h2;exports.h3=e.h3;exports.h4=e.h4;exports.h5=e.h5;exports.h6=e.h6;exports.head=e.head;exports.header=e.header;exports.hgroup=e.hgroup;exports.hr=e.hr;exports.html=e.html;exports.htmlVar=e.htmlVar;exports.i=e.i;exports.iframe=e.iframe;exports.img=e.img;exports.input=e.input;exports.ins=e.ins;exports.kbd=e.kbd;exports.label=e.label;exports.legend=e.legend;exports.li=e.li;exports.link=e.link;exports.main=e.main;exports.map=e.map;exports.mark=e.mark;exports.menu=e.menu;exports.meta=e.meta;exports.meter=e.meter;exports.nav=e.nav;exports.noscript=e.noscript;exports.object=e.object;exports.ol=e.ol;exports.optgroup=e.optgroup;exports.option=e.option;exports.output=e.output;exports.p=e.p;exports.picture=e.picture;exports.pre=e.pre;exports.progress=e.progress;exports.q=e.q;exports.rp=e.rp;exports.rt=e.rt;exports.ruby=e.ruby;exports.s=e.s;exports.samp=e.samp;exports.script=e.script;exports.search=e.search;exports.section=e.section;exports.select=e.select;exports.slot=e.slot;exports.small=e.small;exports.source=e.source;exports.span=e.span;exports.strong=e.strong;exports.style=e.style;exports.sub=e.sub;exports.summary=e.summary;exports.sup=e.sup;exports.table=e.table;exports.tbody=e.tbody;exports.td=e.td;exports.template=e.template;exports.textarea=e.textarea;exports.tfoot=e.tfoot;exports.th=e.th;exports.thead=e.thead;exports.time=e.time;exports.title=e.title;exports.tr=e.tr;exports.track=e.track;exports.u=e.u;exports.ul=e.ul;exports.video=e.video;exports.wbr=e.wbr;exports.createStylesheet=t.createStylesheet;exports.createTheme=a.createTheme;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../tags-pcim-Cws.cjs"),t=require("../createStylesheet-BsVHqHhr.cjs"),a=require("../createTheme-COo8IzPG.cjs");exports.ElementConstructor=e.ElementConstructor;exports.a=e.a;exports.abbr=e.abbr;exports.address=e.address;exports.area=e.area;exports.article=e.article;exports.aside=e.aside;exports.audio=e.audio;exports.b=e.b;exports.base=e.base;exports.bdi=e.bdi;exports.bdo=e.bdo;exports.blockquote=e.blockquote;exports.body=e.body;exports.br=e.br;exports.button=e.button;exports.canvas=e.canvas;exports.caption=e.caption;exports.cite=e.cite;exports.code=e.code;exports.col=e.col;exports.colgroup=e.colgroup;exports.contents=e.contents;exports.data=e.data;exports.datalist=e.datalist;exports.dd=e.dd;exports.del=e.del;exports.details=e.details;exports.dfn=e.dfn;exports.dialog=e.dialog;exports.div=e.div;exports.dl=e.dl;exports.dt=e.dt;exports.element=e.element;exports.em=e.em;exports.embed=e.embed;exports.empty=e.empty;exports.fieldset=e.fieldset;exports.figcaption=e.figcaption;exports.figure=e.figure;exports.footer=e.footer;exports.form=e.form;exports.fragment=e.fragment;exports.h1=e.h1;exports.h2=e.h2;exports.h3=e.h3;exports.h4=e.h4;exports.h5=e.h5;exports.h6=e.h6;exports.head=e.head;exports.header=e.header;exports.hgroup=e.hgroup;exports.hr=e.hr;exports.html=e.html;exports.htmlVar=e.htmlVar;exports.i=e.i;exports.iframe=e.iframe;exports.img=e.img;exports.input=e.input;exports.ins=e.ins;exports.kbd=e.kbd;exports.label=e.label;exports.legend=e.legend;exports.li=e.li;exports.link=e.link;exports.main=e.main;exports.map=e.map;exports.mark=e.mark;exports.menu=e.menu;exports.meta=e.meta;exports.meter=e.meter;exports.nav=e.nav;exports.noscript=e.noscript;exports.object=e.object;exports.ol=e.ol;exports.optgroup=e.optgroup;exports.option=e.option;exports.output=e.output;exports.p=e.p;exports.picture=e.picture;exports.pre=e.pre;exports.progress=e.progress;exports.q=e.q;exports.rp=e.rp;exports.rt=e.rt;exports.ruby=e.ruby;exports.s=e.s;exports.samp=e.samp;exports.script=e.script;exports.search=e.search;exports.section=e.section;exports.select=e.select;exports.slot=e.slot;exports.small=e.small;exports.source=e.source;exports.span=e.span;exports.strong=e.strong;exports.style=e.style;exports.sub=e.sub;exports.summary=e.summary;exports.sup=e.sup;exports.table=e.table;exports.tbody=e.tbody;exports.td=e.td;exports.template=e.template;exports.textarea=e.textarea;exports.tfoot=e.tfoot;exports.th=e.th;exports.thead=e.thead;exports.time=e.time;exports.title=e.title;exports.tr=e.tr;exports.track=e.track;exports.u=e.u;exports.ul=e.ul;exports.video=e.video;exports.wbr=e.wbr;exports.createStylesheet=t.createStylesheet;exports.createTheme=a.createTheme;