aptechka 0.1.18 → 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.
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +9 -11
- package/lib/component/index.cjs +1 -1
- package/lib/component/index.d.ts +1 -1
- package/lib/component/index.js +138 -133
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/package.json +7 -1
package/lib/accordion/index.cjs
CHANGED
|
@@ -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
|
|
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);
|
package/lib/accordion/index.js
CHANGED
|
@@ -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, _,
|
|
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,
|
|
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,
|
|
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,
|
|
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(),
|
|
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,
|
|
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,
|
|
139
|
+
a(this, _).observe(a(this, z, D), {
|
|
140
140
|
childList: !0
|
|
141
|
-
}), R(this, f, [...a(this,
|
|
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
|
-
|
|
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
|
};
|
package/lib/component/index.cjs
CHANGED
|
@@ -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,
|
|
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;
|
package/lib/component/index.d.ts
CHANGED
|
@@ -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';
|
package/lib/component/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
var F = Object.defineProperty, H = Object.defineProperties;
|
|
2
2
|
var I = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var k = Object.getOwnPropertySymbols;
|
|
4
4
|
var L = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
6
|
-
for (var n in
|
|
7
|
-
L.call(
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
M.call(
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var N = (
|
|
14
|
-
if (!
|
|
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 = (
|
|
18
|
-
if (
|
|
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
|
-
|
|
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
|
|
35
|
-
function
|
|
36
|
-
|
|
34
|
+
let C = null;
|
|
35
|
+
function b(e) {
|
|
36
|
+
C.addConnectCallback(e);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
38
|
+
function l(e) {
|
|
39
|
+
C.addDisconnectCallback(e);
|
|
40
40
|
}
|
|
41
|
-
function S(
|
|
42
|
-
return
|
|
41
|
+
function S(e) {
|
|
42
|
+
return e(C);
|
|
43
43
|
}
|
|
44
|
-
function se(
|
|
44
|
+
function se(e) {
|
|
45
|
+
C.addAfterCreateCallback(e);
|
|
46
|
+
}
|
|
47
|
+
function ie(...e) {
|
|
45
48
|
var a, f, m, E;
|
|
46
|
-
const
|
|
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 || (
|
|
53
|
+
i || (e[0].componentConstructor ? i = class extends t {
|
|
51
54
|
constructor(p) {
|
|
52
55
|
super();
|
|
53
|
-
const
|
|
56
|
+
const o = r(y({
|
|
54
57
|
element: this
|
|
55
58
|
}, p));
|
|
56
|
-
|
|
59
|
+
o && T(this, o);
|
|
57
60
|
}
|
|
58
|
-
} : i = (E = class extends
|
|
59
|
-
constructor(
|
|
61
|
+
} : i = (E = class extends t {
|
|
62
|
+
constructor(o) {
|
|
60
63
|
super();
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const h =
|
|
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
|
-
},
|
|
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(
|
|
73
|
-
s(this, a).add(
|
|
75
|
+
addConnectCallback(o) {
|
|
76
|
+
s(this, a).add(o);
|
|
74
77
|
}
|
|
75
|
-
addDisconnectCallback(
|
|
76
|
-
s(this, f).add(
|
|
78
|
+
addDisconnectCallback(o) {
|
|
79
|
+
s(this, f).add(o);
|
|
77
80
|
}
|
|
78
|
-
addAfterCreateCallback(
|
|
79
|
-
s(this, m).add(
|
|
81
|
+
addAfterCreateCallback(o) {
|
|
82
|
+
s(this, m).add(o);
|
|
80
83
|
}
|
|
81
84
|
connectedCallback() {
|
|
82
|
-
var
|
|
83
|
-
(
|
|
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
|
|
90
|
-
(
|
|
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),
|
|
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
|
|
101
|
-
const
|
|
102
|
-
return
|
|
103
|
-
}
|
|
104
|
-
function
|
|
105
|
-
const
|
|
106
|
-
return
|
|
107
|
-
}
|
|
108
|
-
function ue(...
|
|
109
|
-
const
|
|
110
|
-
return
|
|
111
|
-
}
|
|
112
|
-
function
|
|
113
|
-
const
|
|
114
|
-
return
|
|
115
|
-
}
|
|
116
|
-
function
|
|
117
|
-
const
|
|
118
|
-
return
|
|
119
|
-
}
|
|
120
|
-
function
|
|
121
|
-
const
|
|
122
|
-
return
|
|
123
|
-
}
|
|
124
|
-
function
|
|
125
|
-
const
|
|
126
|
-
return
|
|
127
|
-
}
|
|
128
|
-
function
|
|
129
|
-
|
|
130
|
-
let
|
|
131
|
-
const c =
|
|
132
|
-
return c === !0 ?
|
|
133
|
-
culling:
|
|
134
|
-
maxFPS:
|
|
135
|
-
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
|
|
140
|
-
const n = S((
|
|
141
|
-
return
|
|
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(
|
|
146
|
-
|
|
147
|
-
const
|
|
148
|
-
if (typeof
|
|
149
|
-
return x.subscribe(
|
|
150
|
-
if (
|
|
151
|
-
return x.subscribe(
|
|
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(
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
if (typeof
|
|
158
|
-
return v.subscribe(
|
|
159
|
-
if (
|
|
160
|
-
return v.subscribe(
|
|
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
|
|
164
|
-
|
|
166
|
+
function ye(e, t) {
|
|
167
|
+
b((n) => O.subscribe(e, t));
|
|
165
168
|
}
|
|
166
|
-
function
|
|
167
|
-
S((
|
|
168
|
-
|
|
169
|
-
}),
|
|
170
|
-
if (
|
|
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 =
|
|
175
|
+
const n = t.getRootNode();
|
|
173
176
|
if (n === document) {
|
|
174
|
-
const
|
|
175
|
-
if (![...document.head.querySelectorAll("style")].find((
|
|
176
|
-
return document.head.appendChild(
|
|
177
|
-
|
|
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
|
|
183
|
+
const r = z(e);
|
|
181
184
|
n.adoptedStyleSheets.filter((c) => {
|
|
182
|
-
const
|
|
183
|
-
Array.from(
|
|
184
|
-
(d) => !
|
|
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
|
|
195
|
-
return S((
|
|
197
|
+
function Se(e) {
|
|
198
|
+
return S((t) => t.attachShadow(D(y({}, e), { mode: "open" })));
|
|
196
199
|
}
|
|
197
|
-
function
|
|
198
|
-
return S((
|
|
200
|
+
function Ee() {
|
|
201
|
+
return S((e) => e.attachInternals());
|
|
199
202
|
}
|
|
200
203
|
export {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
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
|
-
|
|
218
|
-
|
|
222
|
+
ye as onWindowResize,
|
|
223
|
+
be as watchAttribute
|
|
219
224
|
};
|
package/lib/ladder/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var j=Object.defineProperty;var w=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var x=(s,t,e)=>t in s?j(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,S=(s,t)=>{for(var e in t||(t={}))C.call(t,e)&&x(s,e,t[e]);if(w)for(var e of w(t))E.call(t,e)&&x(s,e,t[e]);return s};var q=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var i=(s,t,e)=>(q(s,t,"read from private field"),e?e.call(s):t.get(s)),h=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},c=(s,t,e,n)=>(q(s,t,"write to private field"),n?n.call(s,e):t.set(s,e),e);var M=(s,t,e)=>(q(s,t,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("../Store-D0_rDIsE.cjs"),O=require("../math-GDWEqu7y.cjs"),U=require("../number-yVpzMdbQ.cjs"),m=require("../ticker/index.cjs");var v,u,p,d;class P{constructor(t){h(this,v,void 0);h(this,u,void 0);h(this,p,void 0);h(this,d,void 0);c(this,v,t.operation),c(this,u,t.value),c(this,p,i(this,u)),c(this,d,t.damping||0)}get operation(){return i(this,v)}get value(){return i(this,u)}set value(t){c(this,p,t),i(this,d)||c(this,u,t)}get damping(){return i(this,d)}set damping(t){c(this,d,t)}update(t){let e=0;for(const n in i(this,u))i(this,u)[n]=O.damp(i(this,u)[n],i(this,p)[n],this.damping,t),U.preciseNumber(i(this,u)[n],4)!==U.preciseNumber(i(this,p)[n],4)&&e++;return e===0}}v=new WeakMap,u=new WeakMap,p=new WeakMap,d=new WeakMap;var g,f,l,y,V,b;class T extends N.Store{constructor(e){super(e,{equalityCheck:()=>!1});h(this,y);h(this,g,void 0);h(this,f,void 0);h(this,l,void 0);h(this,b,e=>{let n=0;for(const r of this.steps){const a=r[1].update(e.elapsed);n+=a?0:1}this.calculate(),n||m.ticker.unsubscribe(i(this,b))});c(this,g,S({},e)),c(this,f,new Map),c(this,l,new Set)}get base(){return i(this,g)}get steps(){return i(this,f)}close(){super.close(),i(this,l).clear(),i(this,f).clear(),m.ticker.unsubscribe(i(this,b))}bind(e){i(this,l).add(e)}unbind(e){i(this,l).delete(e)}deleteStep(e){this.steps.delete(e)}getStepValue(e){return this.steps.get(e).value}setStep(e,n,r,o){const a={};for(const L in this.current)a[L]=r[L]||0;let k=this.steps.get(e);k||(k=new P({operation:n,value:S({},i(this,g)),damping:o}),this.steps.set(e,k)),k.
|
|
1
|
+
"use strict";var j=Object.defineProperty;var w=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var x=(s,t,e)=>t in s?j(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,S=(s,t)=>{for(var e in t||(t={}))C.call(t,e)&&x(s,e,t[e]);if(w)for(var e of w(t))E.call(t,e)&&x(s,e,t[e]);return s};var q=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var i=(s,t,e)=>(q(s,t,"read from private field"),e?e.call(s):t.get(s)),h=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},c=(s,t,e,n)=>(q(s,t,"write to private field"),n?n.call(s,e):t.set(s,e),e);var M=(s,t,e)=>(q(s,t,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("../Store-D0_rDIsE.cjs"),O=require("../math-GDWEqu7y.cjs"),U=require("../number-yVpzMdbQ.cjs"),m=require("../ticker/index.cjs");var v,u,p,d;class P{constructor(t){h(this,v,void 0);h(this,u,void 0);h(this,p,void 0);h(this,d,void 0);c(this,v,t.operation),c(this,u,t.value),c(this,p,i(this,u)),c(this,d,t.damping||0)}get operation(){return i(this,v)}get value(){return i(this,u)}set value(t){c(this,p,t),i(this,d)||c(this,u,t)}get damping(){return i(this,d)}set damping(t){c(this,d,t)}update(t){let e=0;for(const n in i(this,u))i(this,u)[n]=O.damp(i(this,u)[n],i(this,p)[n],this.damping,t),U.preciseNumber(i(this,u)[n],4)!==U.preciseNumber(i(this,p)[n],4)&&e++;return e===0}}v=new WeakMap,u=new WeakMap,p=new WeakMap,d=new WeakMap;var g,f,l,y,V,b;class T extends N.Store{constructor(e){super(e,{equalityCheck:()=>!1});h(this,y);h(this,g,void 0);h(this,f,void 0);h(this,l,void 0);h(this,b,e=>{let n=0;for(const r of this.steps){const a=r[1].update(e.elapsed);n+=a?0:1}this.calculate(),n||m.ticker.unsubscribe(i(this,b))});c(this,g,S({},e)),c(this,f,new Map),c(this,l,new Set)}get base(){return i(this,g)}get steps(){return i(this,f)}close(){super.close(),i(this,l).clear(),i(this,f).clear(),m.ticker.unsubscribe(i(this,b))}bind(e){i(this,l).add(e)}unbind(e){i(this,l).delete(e)}deleteStep(e){this.steps.delete(e)}getStepValue(e){return this.steps.get(e).value}setStep(e,n,r,o){const a={};for(const L in this.current)a[L]=r[L]||0;let k=this.steps.get(e);k||(k=new P({operation:n,value:S({},i(this,g)),damping:o}),this.steps.set(e,k)),k.damping=o||0,k.value=a,M(this,y,V).call(this)}calculate(){const e={};for(const n in this.base)e[n]=this.base[n];for(const n of this.steps){const r=n[1];if(r.operation==="+")for(const o in this.base){const a=r.value[o];e[o]+=a}else if(r.operation==="*")for(const o in this.base){const a=r.value[o];e[o]*=a}else if(r.operation==="/")for(const o in this.base){const a=r.value[o];e[o]/=a}else if(r.operation==="-")for(const o in this.base){const a=r.value[o];e[o]-=a}}for(const n of i(this,l))for(const r in e)n[r]=e[r];this.current=e}}g=new WeakMap,f=new WeakMap,l=new WeakMap,y=new WeakSet,V=function(){let e=!1;i(this,f).forEach(n=>{n.damping&&(e=!0)}),e?m.ticker.subscribe(i(this,b)):m.ticker.unsubscribe(i(this,b))},b=new WeakMap;exports.Ladder=T;
|
package/lib/ladder/index.js
CHANGED
|
@@ -106,7 +106,7 @@ class J extends z {
|
|
|
106
106
|
for (const L in this.current)
|
|
107
107
|
a[L] = o[L] || 0;
|
|
108
108
|
let m = this.steps.get(t);
|
|
109
|
-
m || (m = new B({ operation: n, value: S({}, i(this, g)), damping: r }), this.steps.set(t, m)), m.
|
|
109
|
+
m || (m = new B({ operation: n, value: S({}, i(this, g)), damping: r }), this.steps.set(t, m)), m.damping = r || 0, m.value = a, V(this, y, C).call(this);
|
|
110
110
|
}
|
|
111
111
|
calculate() {
|
|
112
112
|
const t = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aptechka",
|
|
3
|
-
"version": "0.1.
|
|
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
|
},
|