aptechka 0.1.19 → 0.1.20

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.
@@ -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-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=>{});
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 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,T,z,P,E,r,f,n,p,k,w,v,x,F,y,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,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,_,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,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,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()},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=""},_=new WeakSet,M=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(),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,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,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,T).disconnect()}};W=new WeakMap;q=new WeakMap;u=new WeakMap;T=new WeakMap;z=new WeakSet;P=function(){return this.shadowRoot?this.shadowRoot:this};exports.AccordionElement=X([G.define("e-accordion")],exports.AccordionElement);
@@ -24,7 +24,7 @@ var X = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, Z = (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, _, k, D, p, r, u, n, E, M, w, m, x, F, y, C, H, b, c, v, L, z, 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, _, z, D, p, r, u, n, E, M, w, m, x, F, y, C, H, b, c, v, L, k, A, N;
28
28
  class G {
29
29
  constructor(e, s) {
30
30
  h(this, x);
@@ -46,7 +46,7 @@ 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, z).call(this, "size-change");
49
+ l(this, L, k).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));
@@ -68,12 +68,12 @@ class G {
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, z).call(this, "toggle");
71
+ }, 0), l(this, L, k).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, z).call(this, "toggle");
76
+ }, V(i(this, n)))), l(this, L, k).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,7 +82,7 @@ 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(), z = function(e) {
85
+ }, L = new WeakSet(), k = function(e) {
86
86
  e === "toggle" ? i(this, r).dispatchEvent(
87
87
  new CustomEvent("accordionItemToggle", {
88
88
  bubbles: !0,
@@ -99,7 +99,7 @@ p = new WeakMap(), r = new WeakMap(), u = new WeakMap(), n = new WeakMap(), E =
99
99
  };
100
100
  let $ = class extends J {
101
101
  constructor() {
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) => {
102
+ super(), T(this, z), 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) => {
103
103
  t.forEach((e) => {
104
104
  e.removedNodes.forEach((s) => {
105
105
  s instanceof HTMLElement && this.removeItem(s);
@@ -136,9 +136,9 @@ let $ = class extends J {
136
136
  });
137
137
  }
138
138
  connectedCallback() {
139
- a(this, _).observe(a(this, k, D), {
139
+ a(this, _).observe(a(this, z, D), {
140
140
  childList: !0
141
- }), R(this, f, [...a(this, k, D).children].map((t) => {
141
+ }), R(this, f, [...a(this, z, D).children].map((t) => {
142
142
  if (t instanceof HTMLElement)
143
143
  return new G(this, t);
144
144
  }).filter((t) => !!t));
@@ -151,15 +151,13 @@ W = /* @__PURE__ */ new WeakMap();
151
151
  P = /* @__PURE__ */ new WeakMap();
152
152
  f = /* @__PURE__ */ new WeakMap();
153
153
  _ = /* @__PURE__ */ new WeakMap();
154
- k = /* @__PURE__ */ new WeakSet();
154
+ z = /* @__PURE__ */ new WeakSet();
155
155
  D = function() {
156
156
  return this.shadowRoot ? this.shadowRoot : this;
157
157
  };
158
158
  $ = Z([
159
159
  K("e-accordion")
160
160
  ], $);
161
- addEventListener("click", (t) => {
162
- });
163
161
  export {
164
162
  $ as AccordionElement
165
163
  };
@@ -1 +1 @@
1
- "use strict";var _=Object.defineProperty,I=Object.defineProperties;var g=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var q=(t,e,n)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,y=(t,e)=>{for(var n in e||(e={}))F.call(e,n)&&q(t,n,e[n]);if(k)for(var n of k(e))M.call(e,n)&&q(t,n,e[n]);return t},x=(t,e)=>I(t,g(e));var H=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var s=(t,e,n)=>(H(t,e,"read from private field"),n?n.call(t):e.get(t)),S=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../Store-D0_rDIsE.cjs"),E=require("../tags-75InVOh4.cjs"),N=require("../Derived-SjPdLJiZ.cjs"),D=require("../Composed-Mdr4ZFbI.cjs"),P=require("../ticker/index.cjs"),j=require("../animation/index.cjs"),W=require("../Damped-mdFs8WSd.cjs"),B=require("../attribute/index.cjs"),T=require("../intersector/index.cjs"),v=require("../element-resizer/index.cjs"),O=require("../window-resizer/index.cjs"),z=require("../createStylesheet-DTOK6fTn.cjs");let R=null;function C(t){R.addConnectCallback(t)}function i(t){R.addDisconnectCallback(t)}function p(t){return t(R)}function $(...t){var u,d,m,A;const e=typeof t[0]=="string"?HTMLElement:t[0].componentConstructor||t[0],n=typeof t[0]=="string"?t[0]:t[1],r=typeof t[0]=="string"?t[1]:t[2],o=`e-${n}`,l=typeof t[0]=="string"?t[2]:t[3];let a=customElements.get(o);a||(t[0].componentConstructor?a=class extends e{constructor(w){super();const c=r(y({element:this},w));c&&E.element(this,c)}}:a=(A=class extends e{constructor(c){super();S(this,u,new Set);S(this,d,new Set);S(this,m,new Set);R=this;const h=r(y({element:this},c));h&&E.element(this,h),s(this,m).forEach(b=>{b(this)}),s(this,m).clear()}addConnectCallback(c){s(this,u).add(c)}addDisconnectCallback(c){s(this,d).add(c)}addAfterCreateCallback(c){s(this,m).add(c)}connectedCallback(){var c;(c=super.connectedCallback)==null||c.call(this),s(this,u).forEach(h=>{const b=h(this);b&&s(this,d).add(b)}),s(this,u).clear()}disconnectedCallback(){var c;(c=super.disconnectedCallback)==null||c.call(this),s(this,d).forEach(h=>{h(this)}),s(this,d).clear()}},u=new WeakMap,d=new WeakMap,m=new WeakMap,A),l!=null&&l.formAssociated&&(a.formAssociated=!0),customElements.define(o,a));function f(w){return new a(w||{})}return f.componentConstructor=a,f}function G(...t){const e=new L.Store(...t);return i(e.close),e}function J(...t){const e=new N.Derived(...t);return i(e.close),e}function K(...t){const e=new D.DerivedArray(...t);return i(e.close),e}function Q(...t){const e=new D.Composed(...t);return i(e.close),e}function U(...t){const e=new D.Resource(...t);return i(e.close),e}function V(...t){const e=new W.Damped(...t);return i(e.close),e}function X(...t){const e=new j.Tweened(...t);return i(e.close),e}function Y(t,e){C(n=>{let r;const o=e==null?void 0:e.culling;return o===!0?r=n:typeof o=="string"||o instanceof Element?r=o:typeof o=="object"&&(r=o.current),P.ticker.subscribe(t,{culling:r,maxFPS:e==null?void 0:e.maxFPS,order:e==null?void 0:e.order})})}function Z(t,e){const n=p(r=>new B.Attribute(r,t,e));return i(()=>{n.close()}),n}function ee(t,e){C(n=>{const r=e||(n instanceof Element?n:void 0);if(typeof r=="string"||r instanceof Element)return T.intersector.subscribe(r,t);if(r!=null&&r.current)return T.intersector.subscribe(r.current,t)})}function te(t,e){C(n=>{const r=e||(n instanceof Element?n:void 0);if(typeof r=="string"||r instanceof Element)return v.elementResizer.subscribe(r,t);if(r!=null&&r.current)return v.elementResizer.subscribe(r.current,t)})}function ne(t,e){C(n=>O.windowResizer.subscribe(t,e))}function re(t){p(e=>{e.shadowRoot&&e.shadowRoot.adoptedStyleSheets.push(z.createStylesheet(t))}),C(e=>{if(e.shadowRoot)return;const n=e.getRootNode();if(n===document){const r=E.style(t).node;if(![...document.head.querySelectorAll("style")].find(l=>l.outerHTML===r.outerHTML))return document.head.appendChild(r),()=>{r.remove()}}else if(n instanceof ShadowRoot){const r=z.createStylesheet(t);n.adoptedStyleSheets.filter(o=>{const l=Array.from(o.cssRules);Array.from(r.cssRules).filter(f=>!l.find(u=>u.cssText===f.cssText)).forEach(f=>{o.insertRule(f.cssText)})})}})}function ce(t){return p(e=>e.attachShadow(x(y({},t),{mode:"open"})))}function oe(){return p(t=>t.attachInternals())}exports.Component=$;exports.attachInternals=oe;exports.attachShadow=ce;exports.attachStyle=re;exports.createComposed=Q;exports.createDamped=V;exports.createDerived=J;exports.createDerivedArray=K;exports.createResource=U;exports.createStore=G;exports.createTweened=X;exports.onAnimationFrame=Y;exports.onConnect=C;exports.onDisconnect=i;exports.onElementResize=te;exports.onIntersection=ee;exports.onWindowResize=ne;exports.watchAttribute=Z;
1
+ "use strict";var _=Object.defineProperty,I=Object.defineProperties;var g=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var q=(e,t,n)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||(t={}))F.call(t,n)&&q(e,n,t[n]);if(k)for(var n of k(t))M.call(t,n)&&q(e,n,t[n]);return e},x=(e,t)=>I(e,g(t));var H=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var s=(e,t,n)=>(H(e,t,"read from private field"),n?n.call(e):t.get(e)),p=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../Store-D0_rDIsE.cjs"),E=require("../tags-75InVOh4.cjs"),N=require("../Derived-SjPdLJiZ.cjs"),A=require("../Composed-Mdr4ZFbI.cjs"),P=require("../ticker/index.cjs"),j=require("../animation/index.cjs"),B=require("../Damped-mdFs8WSd.cjs"),W=require("../attribute/index.cjs"),T=require("../intersector/index.cjs"),v=require("../element-resizer/index.cjs"),O=require("../window-resizer/index.cjs"),z=require("../createStylesheet-DTOK6fTn.cjs");let w=null;function C(e){w.addConnectCallback(e)}function i(e){w.addDisconnectCallback(e)}function b(e){return e(w)}function $(e){w.addAfterCreateCallback(e)}function G(...e){var u,d,m,D;const t=typeof e[0]=="string"?HTMLElement:e[0].componentConstructor||e[0],n=typeof e[0]=="string"?e[0]:e[1],r=typeof e[0]=="string"?e[1]:e[2],c=`e-${n}`,l=typeof e[0]=="string"?e[2]:e[3];let a=customElements.get(c);a||(e[0].componentConstructor?a=class extends t{constructor(y){super();const o=r(R({element:this},y));o&&E.element(this,o)}}:a=(D=class extends t{constructor(o){super();p(this,u,new Set);p(this,d,new Set);p(this,m,new Set);w=this;const h=r(R({element:this},o));h&&E.element(this,h),s(this,m).forEach(S=>{S(this)}),s(this,m).clear()}addConnectCallback(o){s(this,u).add(o)}addDisconnectCallback(o){s(this,d).add(o)}addAfterCreateCallback(o){s(this,m).add(o)}connectedCallback(){var o;(o=super.connectedCallback)==null||o.call(this),s(this,u).forEach(h=>{const S=h(this);S&&s(this,d).add(S)}),s(this,u).clear()}disconnectedCallback(){var o;(o=super.disconnectedCallback)==null||o.call(this),s(this,d).forEach(h=>{h(this)}),s(this,d).clear()}},u=new WeakMap,d=new WeakMap,m=new WeakMap,D),l!=null&&l.formAssociated&&(a.formAssociated=!0),customElements.define(c,a));function f(y){return new a(y||{})}return f.componentConstructor=a,f}function J(...e){const t=new L.Store(...e);return i(t.close),t}function K(...e){const t=new N.Derived(...e);return i(t.close),t}function Q(...e){const t=new A.DerivedArray(...e);return i(t.close),t}function U(...e){const t=new A.Composed(...e);return i(t.close),t}function V(...e){const t=new A.Resource(...e);return i(t.close),t}function X(...e){const t=new B.Damped(...e);return i(t.close),t}function Y(...e){const t=new j.Tweened(...e);return i(t.close),t}function Z(e,t){C(n=>{let r;const c=t==null?void 0:t.culling;return c===!0?r=n:typeof c=="string"||c instanceof Element?r=c:typeof c=="object"&&(r=c.current),P.ticker.subscribe(e,{culling:r,maxFPS:t==null?void 0:t.maxFPS,order:t==null?void 0:t.order})})}function ee(e,t){const n=b(r=>new W.Attribute(r,e,t));return i(()=>{n.close()}),n}function te(e,t){C(n=>{const r=t||(n instanceof Element?n:void 0);if(typeof r=="string"||r instanceof Element)return T.intersector.subscribe(r,e);if(r!=null&&r.current)return T.intersector.subscribe(r.current,e)})}function ne(e,t){C(n=>{const r=t||(n instanceof Element?n:void 0);if(typeof r=="string"||r instanceof Element)return v.elementResizer.subscribe(r,e);if(r!=null&&r.current)return v.elementResizer.subscribe(r.current,e)})}function re(e,t){C(n=>O.windowResizer.subscribe(e,t))}function oe(e){b(t=>{t.shadowRoot&&t.shadowRoot.adoptedStyleSheets.push(z.createStylesheet(e))}),C(t=>{if(t.shadowRoot)return;const n=t.getRootNode();if(n===document){const r=E.style(e).node;if(![...document.head.querySelectorAll("style")].find(l=>l.outerHTML===r.outerHTML))return document.head.appendChild(r),()=>{r.remove()}}else if(n instanceof ShadowRoot){const r=z.createStylesheet(e);n.adoptedStyleSheets.filter(c=>{const l=Array.from(c.cssRules);Array.from(r.cssRules).filter(f=>!l.find(u=>u.cssText===f.cssText)).forEach(f=>{c.insertRule(f.cssText)})})}})}function ce(e){return b(t=>t.attachShadow(x(R({},e),{mode:"open"})))}function se(){return b(e=>e.attachInternals())}exports.Component=G;exports.attachInternals=se;exports.attachShadow=ce;exports.attachStyle=oe;exports.createComposed=U;exports.createDamped=X;exports.createDerived=K;exports.createDerivedArray=Q;exports.createResource=V;exports.createStore=J;exports.createTweened=Y;exports.onAfterCreate=$;exports.onAnimationFrame=Z;exports.onBeforeCreate=b;exports.onConnect=C;exports.onDisconnect=i;exports.onElementResize=ne;exports.onIntersection=te;exports.onWindowResize=re;exports.watchAttribute=ee;
@@ -1,4 +1,4 @@
1
- export { Component, onConnect, onDisconnect, type ComponentConstructorCallback, type ComponentConnectCallback, type ComponentElementCallback, } from './Component';
1
+ export { Component, onConnect, onDisconnect, onBeforeCreate, onAfterCreate, type ComponentConstructorCallback, type ComponentConnectCallback, type ComponentElementCallback, } from './Component';
2
2
  export { createStore, createComposed, createDerived, createDerivedArray, createResource, } from './hooks/stores';
3
3
  export { createDamped, createTweened, onAnimationFrame, } from './hooks/animation';
4
4
  export { watchAttribute } from './hooks/attributes';
@@ -1,23 +1,23 @@
1
1
  var F = Object.defineProperty, H = Object.defineProperties;
2
2
  var I = Object.getOwnPropertyDescriptors;
3
- var D = Object.getOwnPropertySymbols;
3
+ var k = Object.getOwnPropertySymbols;
4
4
  var L = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
5
- var k = (t, e, n) => e in t ? F(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, b = (t, e) => {
6
- for (var n in e || (e = {}))
7
- L.call(e, n) && k(t, n, e[n]);
8
- if (D)
9
- for (var n of D(e))
10
- M.call(e, n) && k(t, n, e[n]);
11
- return t;
12
- }, A = (t, e) => H(t, I(e));
13
- var N = (t, e, n) => {
14
- if (!e.has(t))
5
+ var A = (e, t, n) => t in e ? F(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ L.call(t, n) && A(e, n, t[n]);
8
+ if (k)
9
+ for (var n of k(t))
10
+ M.call(t, n) && A(e, n, t[n]);
11
+ return e;
12
+ }, D = (e, t) => H(e, I(t));
13
+ var N = (e, t, n) => {
14
+ if (!t.has(e))
15
15
  throw TypeError("Cannot " + n);
16
16
  };
17
- var s = (t, e, n) => (N(t, e, "read from private field"), n ? n.call(t) : e.get(t)), y = (t, e, n) => {
18
- if (e.has(t))
17
+ var s = (e, t, n) => (N(e, t, "read from private field"), n ? n.call(e) : t.get(e)), R = (e, t, n) => {
18
+ if (t.has(e))
19
19
  throw TypeError("Cannot add the same private member more than once");
20
- e instanceof WeakSet ? e.add(t) : e.set(t, n);
20
+ t instanceof WeakSet ? t.add(e) : t.set(e, n);
21
21
  };
22
22
  import { S as P } from "../Store-JOKrNVEr.js";
23
23
  import { e as T, aD as g } from "../tags-DgRVzazL.js";
@@ -31,157 +31,160 @@ import { intersector as x } from "../intersector/index.js";
31
31
  import { elementResizer as v } from "../element-resizer/index.js";
32
32
  import { windowResizer as O } from "../window-resizer/index.js";
33
33
  import { c as z } from "../createStylesheet-Zqf3lXhM.js";
34
- let R = null;
35
- function C(t) {
36
- R.addConnectCallback(t);
34
+ let C = null;
35
+ function b(e) {
36
+ C.addConnectCallback(e);
37
37
  }
38
- function u(t) {
39
- R.addDisconnectCallback(t);
38
+ function l(e) {
39
+ C.addDisconnectCallback(e);
40
40
  }
41
- function S(t) {
42
- return t(R);
41
+ function S(e) {
42
+ return e(C);
43
43
  }
44
- function se(...t) {
44
+ function se(e) {
45
+ C.addAfterCreateCallback(e);
46
+ }
47
+ function ie(...e) {
45
48
  var a, f, m, E;
46
- const e = typeof t[0] == "string" ? HTMLElement : t[0].componentConstructor || t[0], n = typeof t[0] == "string" ? t[0] : t[1], o = typeof t[0] == "string" ? t[1] : t[2], c = `e-${n}`, l = typeof t[0] == "string" ? t[2] : t[3];
49
+ const t = typeof e[0] == "string" ? HTMLElement : e[0].componentConstructor || e[0], n = typeof e[0] == "string" ? e[0] : e[1], r = typeof e[0] == "string" ? e[1] : e[2], c = `e-${n}`, u = typeof e[0] == "string" ? e[2] : e[3];
47
50
  let i = customElements.get(
48
51
  c
49
52
  );
50
- i || (t[0].componentConstructor ? i = class extends e {
53
+ i || (e[0].componentConstructor ? i = class extends t {
51
54
  constructor(p) {
52
55
  super();
53
- const r = o(b({
56
+ const o = r(y({
54
57
  element: this
55
58
  }, p));
56
- r && T(this, r);
59
+ o && T(this, o);
57
60
  }
58
- } : i = (E = class extends e {
59
- constructor(r) {
61
+ } : i = (E = class extends t {
62
+ constructor(o) {
60
63
  super();
61
- y(this, a, /* @__PURE__ */ new Set());
62
- y(this, f, /* @__PURE__ */ new Set());
63
- y(this, m, /* @__PURE__ */ new Set());
64
- R = this;
65
- const h = o(b({
64
+ R(this, a, /* @__PURE__ */ new Set());
65
+ R(this, f, /* @__PURE__ */ new Set());
66
+ R(this, m, /* @__PURE__ */ new Set());
67
+ C = this;
68
+ const h = r(y({
66
69
  element: this
67
- }, r));
70
+ }, o));
68
71
  h && T(this, h), s(this, m).forEach((w) => {
69
72
  w(this);
70
73
  }), s(this, m).clear();
71
74
  }
72
- addConnectCallback(r) {
73
- s(this, a).add(r);
75
+ addConnectCallback(o) {
76
+ s(this, a).add(o);
74
77
  }
75
- addDisconnectCallback(r) {
76
- s(this, f).add(r);
78
+ addDisconnectCallback(o) {
79
+ s(this, f).add(o);
77
80
  }
78
- addAfterCreateCallback(r) {
79
- s(this, m).add(r);
81
+ addAfterCreateCallback(o) {
82
+ s(this, m).add(o);
80
83
  }
81
84
  connectedCallback() {
82
- var r;
83
- (r = super.connectedCallback) == null || r.call(this), s(this, a).forEach((h) => {
85
+ var o;
86
+ (o = super.connectedCallback) == null || o.call(this), s(this, a).forEach((h) => {
84
87
  const w = h(this);
85
88
  w && s(this, f).add(w);
86
89
  }), s(this, a).clear();
87
90
  }
88
91
  disconnectedCallback() {
89
- var r;
90
- (r = super.disconnectedCallback) == null || r.call(this), s(this, f).forEach((h) => {
92
+ var o;
93
+ (o = super.disconnectedCallback) == null || o.call(this), s(this, f).forEach((h) => {
91
94
  h(this);
92
95
  }), s(this, f).clear();
93
96
  }
94
- }, a = new WeakMap(), f = new WeakMap(), m = new WeakMap(), E), l != null && l.formAssociated && (i.formAssociated = !0), customElements.define(c, i));
97
+ }, a = new WeakMap(), f = new WeakMap(), m = new WeakMap(), E), u != null && u.formAssociated && (i.formAssociated = !0), customElements.define(c, i));
95
98
  function d(p) {
96
99
  return new i(p || {});
97
100
  }
98
101
  return d.componentConstructor = i, d;
99
102
  }
100
- function ie(...t) {
101
- const e = new P(...t);
102
- return u(e.close), e;
103
- }
104
- function ae(...t) {
105
- const e = new j(...t);
106
- return u(e.close), e;
107
- }
108
- function ue(...t) {
109
- const e = new q(...t);
110
- return u(e.close), e;
111
- }
112
- function le(...t) {
113
- const e = new B(...t);
114
- return u(e.close), e;
115
- }
116
- function fe(...t) {
117
- const e = new W(...t);
118
- return u(e.close), e;
119
- }
120
- function de(...t) {
121
- const e = new J(...t);
122
- return u(e.close), e;
123
- }
124
- function me(...t) {
125
- const e = new G(...t);
126
- return u(e.close), e;
127
- }
128
- function he(t, e) {
129
- C((n) => {
130
- let o;
131
- const c = e == null ? void 0 : e.culling;
132
- return c === !0 ? o = n : typeof c == "string" || c instanceof Element ? o = c : typeof c == "object" && (o = c.current), $.subscribe(t, {
133
- culling: o,
134
- maxFPS: e == null ? void 0 : e.maxFPS,
135
- order: e == null ? void 0 : e.order
103
+ function ae(...e) {
104
+ const t = new P(...e);
105
+ return l(t.close), t;
106
+ }
107
+ function le(...e) {
108
+ const t = new j(...e);
109
+ return l(t.close), t;
110
+ }
111
+ function ue(...e) {
112
+ const t = new q(...e);
113
+ return l(t.close), t;
114
+ }
115
+ function fe(...e) {
116
+ const t = new B(...e);
117
+ return l(t.close), t;
118
+ }
119
+ function de(...e) {
120
+ const t = new W(...e);
121
+ return l(t.close), t;
122
+ }
123
+ function me(...e) {
124
+ const t = new J(...e);
125
+ return l(t.close), t;
126
+ }
127
+ function he(...e) {
128
+ const t = new G(...e);
129
+ return l(t.close), t;
130
+ }
131
+ function Ce(e, t) {
132
+ b((n) => {
133
+ let r;
134
+ const c = t == null ? void 0 : t.culling;
135
+ return c === !0 ? r = n : typeof c == "string" || c instanceof Element ? r = c : typeof c == "object" && (r = c.current), $.subscribe(e, {
136
+ culling: r,
137
+ maxFPS: t == null ? void 0 : t.maxFPS,
138
+ order: t == null ? void 0 : t.order
136
139
  });
137
140
  });
138
141
  }
139
- function Ce(t, e) {
140
- const n = S((o) => new K(o, t, e));
141
- return u(() => {
142
+ function be(e, t) {
143
+ const n = S((r) => new K(r, e, t));
144
+ return l(() => {
142
145
  n.close();
143
146
  }), n;
144
147
  }
145
- function pe(t, e) {
146
- C((n) => {
147
- const o = e || (n instanceof Element ? n : void 0);
148
- if (typeof o == "string" || o instanceof Element)
149
- return x.subscribe(o, t);
150
- if (o != null && o.current)
151
- return x.subscribe(o.current, t);
148
+ function pe(e, t) {
149
+ b((n) => {
150
+ const r = t || (n instanceof Element ? n : void 0);
151
+ if (typeof r == "string" || r instanceof Element)
152
+ return x.subscribe(r, e);
153
+ if (r != null && r.current)
154
+ return x.subscribe(r.current, e);
152
155
  });
153
156
  }
154
- function we(t, e) {
155
- C((n) => {
156
- const o = e || (n instanceof Element ? n : void 0);
157
- if (typeof o == "string" || o instanceof Element)
158
- return v.subscribe(o, t);
159
- if (o != null && o.current)
160
- return v.subscribe(o.current, t);
157
+ function we(e, t) {
158
+ b((n) => {
159
+ const r = t || (n instanceof Element ? n : void 0);
160
+ if (typeof r == "string" || r instanceof Element)
161
+ return v.subscribe(r, e);
162
+ if (r != null && r.current)
163
+ return v.subscribe(r.current, e);
161
164
  });
162
165
  }
163
- function be(t, e) {
164
- C((n) => O.subscribe(t, e));
166
+ function ye(e, t) {
167
+ b((n) => O.subscribe(e, t));
165
168
  }
166
- function ye(t) {
167
- S((e) => {
168
- e.shadowRoot && e.shadowRoot.adoptedStyleSheets.push(z(t));
169
- }), C((e) => {
170
- if (e.shadowRoot)
169
+ function Re(e) {
170
+ S((t) => {
171
+ t.shadowRoot && t.shadowRoot.adoptedStyleSheets.push(z(e));
172
+ }), b((t) => {
173
+ if (t.shadowRoot)
171
174
  return;
172
- const n = e.getRootNode();
175
+ const n = t.getRootNode();
173
176
  if (n === document) {
174
- const o = g(t).node;
175
- if (![...document.head.querySelectorAll("style")].find((l) => l.outerHTML === o.outerHTML))
176
- return document.head.appendChild(o), () => {
177
- o.remove();
177
+ const r = g(e).node;
178
+ if (![...document.head.querySelectorAll("style")].find((u) => u.outerHTML === r.outerHTML))
179
+ return document.head.appendChild(r), () => {
180
+ r.remove();
178
181
  };
179
182
  } else if (n instanceof ShadowRoot) {
180
- const o = z(t);
183
+ const r = z(e);
181
184
  n.adoptedStyleSheets.filter((c) => {
182
- const l = Array.from(c.cssRules);
183
- Array.from(o.cssRules).filter(
184
- (d) => !l.find(
185
+ const u = Array.from(c.cssRules);
186
+ Array.from(r.cssRules).filter(
187
+ (d) => !u.find(
185
188
  (a) => a.cssText === d.cssText
186
189
  )
187
190
  ).forEach((d) => {
@@ -191,29 +194,31 @@ function ye(t) {
191
194
  }
192
195
  });
193
196
  }
194
- function Re(t) {
195
- return S((e) => e.attachShadow(A(b({}, t), { mode: "open" })));
197
+ function Se(e) {
198
+ return S((t) => t.attachShadow(D(y({}, e), { mode: "open" })));
196
199
  }
197
- function Se() {
198
- return S((t) => t.attachInternals());
200
+ function Ee() {
201
+ return S((e) => e.attachInternals());
199
202
  }
200
203
  export {
201
- se as Component,
202
- Se as attachInternals,
203
- Re as attachShadow,
204
- ye as attachStyle,
205
- le as createComposed,
206
- de as createDamped,
207
- ae as createDerived,
204
+ ie as Component,
205
+ Ee as attachInternals,
206
+ Se as attachShadow,
207
+ Re as attachStyle,
208
+ fe as createComposed,
209
+ me as createDamped,
210
+ le as createDerived,
208
211
  ue as createDerivedArray,
209
- fe as createResource,
210
- ie as createStore,
211
- me as createTweened,
212
- he as onAnimationFrame,
213
- C as onConnect,
214
- u as onDisconnect,
212
+ de as createResource,
213
+ ae as createStore,
214
+ he as createTweened,
215
+ se as onAfterCreate,
216
+ Ce as onAnimationFrame,
217
+ S as onBeforeCreate,
218
+ b as onConnect,
219
+ l as onDisconnect,
215
220
  we as onElementResize,
216
221
  pe as onIntersection,
217
- be as onWindowResize,
218
- Ce as watchAttribute
222
+ ye as onWindowResize,
223
+ be as watchAttribute
219
224
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -244,6 +244,9 @@
244
244
  "element-constructor": [
245
245
  "lib/element-constructor/index.d.ts"
246
246
  ],
247
+ "element-resizer": [
248
+ "lib/element-resizer/index.d.ts"
249
+ ],
247
250
  "en3": [
248
251
  "lib/en3/index.d.ts"
249
252
  ],
@@ -315,6 +318,9 @@
315
318
  ],
316
319
  "video": [
317
320
  "lib/video/index.d.ts"
321
+ ],
322
+ "window-resizer": [
323
+ "lib/window-resizer/index.d.ts"
318
324
  ]
319
325
  }
320
326
  },