aptechka 0.1.6 → 0.1.7
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/Animated-Bf-gPIQM.cjs +1 -0
- package/lib/{Animated-CJcYqJzq.js → Animated-Br_4OSth.js} +36 -35
- package/lib/Composed-C2Vv1xxR.cjs +1 -0
- package/lib/Composed-DhtYBEmo.js +79 -0
- package/lib/{Damped-AHRBHNEQ.cjs → Damped-BwpMU9Gi.cjs} +1 -1
- package/lib/{Damped-Csj-9_gH.js → Damped-urvryQLo.js} +1 -1
- package/lib/abstract-elements/index.cjs +1 -1
- package/lib/abstract-elements/index.js +2 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +2 -2
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +8 -8
- package/lib/createStylesheet-BSXZrWW6.js +8 -0
- package/lib/createStylesheet-C1rimcGc.cjs +1 -0
- package/lib/element-constructor/ElementConstructor.d.ts +16 -27
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.d.ts +1 -2
- package/lib/element-constructor/index.js +120 -639
- package/lib/element-constructor/knownSvgTags.d.ts +1 -0
- package/lib/element-constructor/tags.d.ts +117 -0
- package/lib/{index-DgtdcBEI.js → index-dBwVZz_v.js} +25 -25
- package/lib/index-vI4hmrI8.cjs +9 -0
- package/lib/jsx/h.d.ts +2 -2
- package/lib/jsx/hooks/animation-frame.d.ts +5 -0
- package/lib/jsx/hooks/animation.d.ts +3 -0
- package/lib/jsx/hooks/basic.d.ts +4 -0
- package/lib/jsx/hooks/element-resize.d.ts +3 -0
- package/lib/jsx/hooks/intersection.d.ts +3 -0
- package/lib/jsx/hooks/store.d.ts +6 -0
- package/lib/jsx/hooks/style.d.ts +2 -0
- package/lib/jsx/hooks/utils.d.ts +4 -0
- package/lib/jsx/hooks/window-resize.d.ts +2 -0
- package/lib/jsx/index.cjs +1 -1
- package/lib/jsx/index.d.ts +8 -1
- package/lib/jsx/index.js +164 -87
- package/lib/jsx/type.d.ts +1 -0
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +7 -7
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +21 -22
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/store/Derived.d.ts +1 -1
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +48 -111
- package/lib/studio/index.cjs +3 -3
- package/lib/studio/index.js +41 -41
- package/lib/tags-D-lzPz_v.js +748 -0
- package/lib/tags-DkAbVUQP.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +6 -6
- package/package.json +1 -1
- package/lib/Animated-DyZuTEQE.cjs +0 -1
- package/lib/ElementConstructor-9f-12v7T.cjs +0 -1
- package/lib/ElementConstructor-CoKM2CTK.js +0 -228
- package/lib/createStylesheet-BON7aJYs.js +0 -10
- package/lib/createStylesheet-uicRVW05.cjs +0 -1
- package/lib/element-constructor/htmlTags.d.ts +0 -115
- package/lib/element-constructor/svgTags.d.ts +0 -64
- package/lib/htmlTags-BCNUG7oK.js +0 -683
- package/lib/htmlTags-BSQys9wH.cjs +0 -1
- package/lib/index-i_Ki9M-w.cjs +0 -9
- package/lib/jsx/hooks.d.ts +0 -25
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var j=Object.defineProperty,z=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var R=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var $=(s,r,e)=>r in s?j(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e,v=(s,r)=>{for(var e in r||(r={}))D.call(r,e)&&$(s,e,r[e]);if(R)for(var e of R(r))E.call(r,e)&&$(s,e,r[e]);return s},C=(s,r)=>z(s,B(r));var N=(s,r,e)=>{if(!r.has(s))throw TypeError("Cannot "+e)};var t=(s,r,e)=>(N(s,r,"read from private field"),e?e.call(s):r.get(s)),i=(s,r,e)=>{if(r.has(s))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(s):r.set(s,e)},u=(s,r,e,a)=>(N(s,r,"write to private field"),a?a.call(s,e):r.set(s,e),e);const m=require("./Store-D0_rDIsE.cjs"),G=require("./math-GDWEqu7y.cjs"),H=require("./number-yVpzMdbQ.cjs"),_=require("./ticker/index.cjs");var g,S,f,h,n,c,b,x,F,l,A,P,q;class I extends m.Store{constructor(e){var w,k;super((e==null?void 0:e.default)||0,e);i(this,g,void 0);i(this,S,void 0);i(this,f,void 0);i(this,h,void 0);i(this,n,void 0);i(this,c,void 0);i(this,b,new m.Store(null));i(this,x,new m.Store(!1));i(this,F,0);i(this,l,0);i(this,A,e=>{this.set(e.current)});i(this,P,e=>{const a=this.current;this.handleAnimationFrame(e);const d=Math.abs(a-this.target);u(this,l,d/e.elapsed)});i(this,q,()=>{this.set(t(this,h)),this.current=t(this,h)});u(this,S,e==null?void 0:e.order),u(this,g,e==null?void 0:e.maxFPS),u(this,f,e==null?void 0:e.culling),u(this,h,this.current);let a,d;e!=null&&e.passport&&(a={name:`${e.passport.name+"-min"}`},d={name:`${e.passport.name+"-max"}`}),u(this,n,(e==null?void 0:e.min)instanceof m.Store?e.min:new m.Store((w=e==null?void 0:e.min)!=null?w:0,{passport:a})),u(this,c,(e==null?void 0:e.max)instanceof m.Store?e.max:new m.Store((k=e==null?void 0:e.max)!=null?k:1,{passport:d})),t(this,n).subscribe(t(this,q)),t(this,c).subscribe(t(this,q)),t(this,b).subscribe(L=>{var y,M;(y=L.previous)==null||y.unsubscribe(t(this,A)),(M=L.current)==null||M.subscribe(t(this,A))})}get target(){return t(this,h)}get isRunning(){return t(this,x)}get direction(){return t(this,F)}get maxFPS(){return t(this,g)}get speed(){return t(this,l)}get min(){return t(this,n)}get max(){return t(this,c)}get delta(){return t(this,c).current-t(this,n).current}get progress(){return this.delta?H.preciseNumber((this.current-this.min.current)/this.delta,6):0}get entry(){return C(v({},super.entry),{min:t(this,n).current,max:t(this,c).current,delta:this.delta,direction:this.direction,progress:this.progress,speed:this.speed})}get updater(){return t(this,b)}set(e,a=!1){const d=t(this,h);u(this,h,G.clamp(e,t(this,n).current,t(this,c).current)),a&&(this.current=t(this,h)),t(this,h)!==d&&(u(this,l,0),u(this,F,Math.sign(e-t(this,h))||1),this.update())}shift(e,a=!1){this.set(t(this,h)+e,a)}close(){super.close(),this.unlistenAnimationFrame(),t(this,b).current=null}reset(){this.set(this.initial,!0),super.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){t(this,x).current=!0,_.ticker.subscribe(t(this,P),{maxFPS:t(this,g),order:t(this,S),culling:t(this,f)})}unlistenAnimationFrame(){u(this,l,0),t(this,x).current=!1,_.ticker.unsubscribe(t(this,P))}}g=new WeakMap,S=new WeakMap,f=new WeakMap,h=new WeakMap,n=new WeakMap,c=new WeakMap,b=new WeakMap,x=new WeakMap,F=new WeakMap,l=new WeakMap,A=new WeakMap,P=new WeakMap,q=new WeakMap;exports.Animated=I;
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var z = Object.defineProperty, B = Object.defineProperties;
|
|
2
|
+
var D = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var k = Object.getOwnPropertySymbols;
|
|
4
|
+
var E = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var v = (s, r, e) => r in s ? z(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e, C = (s, r) => {
|
|
6
6
|
for (var e in r || (r = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
|
|
7
|
+
E.call(r, e) && v(s, e, r[e]);
|
|
8
|
+
if (k)
|
|
9
|
+
for (var e of k(r))
|
|
10
|
+
G.call(r, e) && v(s, e, r[e]);
|
|
11
11
|
return s;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, N = (s, r) => B(s, D(r));
|
|
13
|
+
var j = (s, r, e) => {
|
|
14
14
|
if (!r.has(s))
|
|
15
15
|
throw TypeError("Cannot " + e);
|
|
16
16
|
};
|
|
17
|
-
var t = (s, r, e) => (
|
|
17
|
+
var t = (s, r, e) => (j(s, r, "read from private field"), e ? e.call(s) : r.get(s)), i = (s, r, e) => {
|
|
18
18
|
if (r.has(s))
|
|
19
19
|
throw TypeError("Cannot add the same private member more than once");
|
|
20
20
|
r instanceof WeakSet ? r.add(s) : r.set(s, e);
|
|
21
|
-
}, a = (s, r, e, u) => (
|
|
22
|
-
import { S as
|
|
23
|
-
import { c as
|
|
24
|
-
import { p as
|
|
25
|
-
import { ticker as
|
|
26
|
-
var g, x, F, h, n,
|
|
27
|
-
class
|
|
21
|
+
}, a = (s, r, e, u) => (j(s, r, "write to private field"), u ? u.call(s, e) : r.set(s, e), e);
|
|
22
|
+
import { S as c } from "./Store-JOKrNVEr.js";
|
|
23
|
+
import { c as H } from "./math-BOBiC4TN.js";
|
|
24
|
+
import { p as I } from "./number-Bo5RdrA1.js";
|
|
25
|
+
import { ticker as q } from "./ticker/index.js";
|
|
26
|
+
var g, x, F, h, n, m, b, f, A, l, P, S, w;
|
|
27
|
+
class U extends c {
|
|
28
28
|
constructor(e) {
|
|
29
|
+
var L, y;
|
|
29
30
|
super((e == null ? void 0 : e.default) || 0, e);
|
|
30
31
|
i(this, g, void 0);
|
|
31
32
|
i(this, x, void 0);
|
|
32
33
|
i(this, F, void 0);
|
|
33
34
|
i(this, h, void 0);
|
|
34
35
|
i(this, n, void 0);
|
|
35
|
-
i(this,
|
|
36
|
-
i(this, b, new
|
|
37
|
-
i(this, f, new
|
|
36
|
+
i(this, m, void 0);
|
|
37
|
+
i(this, b, new c(null));
|
|
38
|
+
i(this, f, new c(!1));
|
|
38
39
|
i(this, A, 0);
|
|
39
40
|
i(this, l, 0);
|
|
40
41
|
i(this, P, (e) => {
|
|
@@ -55,9 +56,9 @@ class Q extends m {
|
|
|
55
56
|
name: `${e.passport.name + "-min"}`
|
|
56
57
|
}, d = {
|
|
57
58
|
name: `${e.passport.name + "-max"}`
|
|
58
|
-
}), a(this, n, (e == null ? void 0 : e.min) instanceof
|
|
59
|
-
var
|
|
60
|
-
(
|
|
59
|
+
}), a(this, n, (e == null ? void 0 : e.min) instanceof c ? e.min : new c((L = e == null ? void 0 : e.min) != null ? L : 0, { passport: u })), a(this, m, (e == null ? void 0 : e.max) instanceof c ? e.max : new c((y = e == null ? void 0 : e.max) != null ? y : 1, { passport: d })), t(this, n).subscribe(t(this, w)), t(this, m).subscribe(t(this, w)), t(this, b).subscribe((M) => {
|
|
60
|
+
var R, $;
|
|
61
|
+
(R = M.previous) == null || R.unsubscribe(t(this, P)), ($ = M.current) == null || $.subscribe(t(this, P));
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
get target() {
|
|
@@ -79,18 +80,18 @@ class Q extends m {
|
|
|
79
80
|
return t(this, n);
|
|
80
81
|
}
|
|
81
82
|
get max() {
|
|
82
|
-
return t(this,
|
|
83
|
+
return t(this, m);
|
|
83
84
|
}
|
|
84
85
|
get delta() {
|
|
85
|
-
return t(this,
|
|
86
|
+
return t(this, m).current - t(this, n).current;
|
|
86
87
|
}
|
|
87
88
|
get progress() {
|
|
88
|
-
return this.delta ?
|
|
89
|
+
return this.delta ? I((this.current - this.min.current) / this.delta, 6) : 0;
|
|
89
90
|
}
|
|
90
91
|
get entry() {
|
|
91
|
-
return
|
|
92
|
+
return N(C({}, super.entry), {
|
|
92
93
|
min: t(this, n).current,
|
|
93
|
-
max: t(this,
|
|
94
|
+
max: t(this, m).current,
|
|
94
95
|
delta: this.delta,
|
|
95
96
|
direction: this.direction,
|
|
96
97
|
progress: this.progress,
|
|
@@ -102,7 +103,7 @@ class Q extends m {
|
|
|
102
103
|
}
|
|
103
104
|
set(e, u = !1) {
|
|
104
105
|
const d = t(this, h);
|
|
105
|
-
a(this, h,
|
|
106
|
+
a(this, h, H(e, t(this, n).current, t(this, m).current)), u && (this.current = t(this, h)), t(this, h) !== d && (a(this, l, 0), a(this, A, Math.sign(e - t(this, h)) || 1), this.update());
|
|
106
107
|
}
|
|
107
108
|
shift(e, u = !1) {
|
|
108
109
|
this.set(t(this, h) + e, u);
|
|
@@ -114,17 +115,17 @@ class Q extends m {
|
|
|
114
115
|
this.set(this.initial, !0), super.reset(), this.unlistenAnimationFrame();
|
|
115
116
|
}
|
|
116
117
|
listenAnimationFrame() {
|
|
117
|
-
t(this, f).current = !0,
|
|
118
|
+
t(this, f).current = !0, q.subscribe(t(this, S), {
|
|
118
119
|
maxFPS: t(this, g),
|
|
119
120
|
order: t(this, x),
|
|
120
121
|
culling: t(this, F)
|
|
121
122
|
});
|
|
122
123
|
}
|
|
123
124
|
unlistenAnimationFrame() {
|
|
124
|
-
a(this, l, 0), t(this, f).current = !1,
|
|
125
|
+
a(this, l, 0), t(this, f).current = !1, q.unsubscribe(t(this, S));
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
|
-
g = new WeakMap(), x = new WeakMap(), F = new WeakMap(), h = new WeakMap(), n = new WeakMap(),
|
|
128
|
+
g = new WeakMap(), x = new WeakMap(), F = new WeakMap(), h = new WeakMap(), n = new WeakMap(), m = new WeakMap(), b = new WeakMap(), f = new WeakMap(), A = new WeakMap(), l = new WeakMap(), P = new WeakMap(), S = new WeakMap(), w = new WeakMap();
|
|
128
129
|
export {
|
|
129
|
-
|
|
130
|
+
U as A
|
|
130
131
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var g=(r,s,e)=>{if(!s.has(r))throw TypeError("Cannot "+e)};var t=(r,s,e)=>(g(r,s,"read from private field"),e?e.call(r):s.get(r)),h=(r,s,e)=>{if(s.has(r))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(r):s.set(r,e)},f=(r,s,e,c)=>(g(r,s,"write to private field"),c?c.call(r,e):s.set(r,e),e);const x=require("./Store-D0_rDIsE.cjs"),v=require("./function-MthRj-GJ.cjs");var a;class C extends x.Store{constructor(e,c,u){super(null,u);h(this,a,void 0);f(this,a,e.subscribe(o=>{const l=[];o.current.forEach((m,p)=>{var S;o.current[p]===((S=o.previous)==null?void 0:S[p])&&this.current[p]?l.push(this.current[p]):l.push(c(m))}),this.current=l}))}close(){super.close(),t(this,a).call(this)}}a=new WeakMap;var d,n,i;class E extends x.Store{constructor(e,c,u){super(e,u);h(this,d,void 0);h(this,n,void 0);h(this,i,0);f(this,n,new x.Store(!1)),f(this,d,c),u!=null&&u.manualControl||this.refetch()}get isPending(){return t(this,n)}refetch(){t(this,n).current=!0,f(this,i,t(this,i)+1);const e=t(this,i);t(this,d).call(this).then(c=>{e===t(this,i)&&(t(this,n).current=!1,this.current=c)})}}d=new WeakMap,n=new WeakMap,i=new WeakMap;var b;class q extends x.Store{constructor(e,c,u){super(null,u);h(this,b,[]);const o=v.debounce(()=>{this.current=c()},0);e.forEach(l=>{t(this,b).push(l.subscribe(()=>{o()}))})}close(){super.close(),t(this,b).forEach(e=>e())}}b=new WeakMap;exports.Composed=q;exports.DerivedArray=C;exports.Resource=E;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var g = (e, r, s) => {
|
|
2
|
+
if (!r.has(e))
|
|
3
|
+
throw TypeError("Cannot " + s);
|
|
4
|
+
};
|
|
5
|
+
var t = (e, r, s) => (g(e, r, "read from private field"), s ? s.call(e) : r.get(e)), n = (e, r, s) => {
|
|
6
|
+
if (r.has(e))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
r instanceof WeakSet ? r.add(e) : r.set(e, s);
|
|
9
|
+
}, l = (e, r, s, c) => (g(e, r, "write to private field"), c ? c.call(e, s) : r.set(e, s), s);
|
|
10
|
+
import { S as m } from "./Store-JOKrNVEr.js";
|
|
11
|
+
import { d as E } from "./function-C10DGppn.js";
|
|
12
|
+
var f;
|
|
13
|
+
class P extends m {
|
|
14
|
+
constructor(s, c, u) {
|
|
15
|
+
super(null, u);
|
|
16
|
+
n(this, f, void 0);
|
|
17
|
+
l(this, f, s.subscribe((o) => {
|
|
18
|
+
const a = [];
|
|
19
|
+
o.current.forEach((C, p) => {
|
|
20
|
+
var x;
|
|
21
|
+
o.current[p] === ((x = o.previous) == null ? void 0 : x[p]) && this.current[p] ? a.push(this.current[p]) : a.push(c(C));
|
|
22
|
+
}), this.current = a;
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
close() {
|
|
26
|
+
super.close(), t(this, f).call(this);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
f = new WeakMap();
|
|
30
|
+
var d, h, i;
|
|
31
|
+
class R extends m {
|
|
32
|
+
constructor(s, c, u) {
|
|
33
|
+
super(s, u);
|
|
34
|
+
n(this, d, void 0);
|
|
35
|
+
n(this, h, void 0);
|
|
36
|
+
n(this, i, 0);
|
|
37
|
+
l(this, h, new m(!1)), l(this, d, c), u != null && u.manualControl || this.refetch();
|
|
38
|
+
}
|
|
39
|
+
get isPending() {
|
|
40
|
+
return t(this, h);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Calls fetcher again and sets isPending to true.
|
|
44
|
+
*/
|
|
45
|
+
refetch() {
|
|
46
|
+
t(this, h).current = !0, l(this, i, t(this, i) + 1);
|
|
47
|
+
const s = t(this, i);
|
|
48
|
+
t(this, d).call(this).then((c) => {
|
|
49
|
+
s === t(this, i) && (t(this, h).current = !1, this.current = c);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
d = new WeakMap(), h = new WeakMap(), i = new WeakMap();
|
|
54
|
+
var b;
|
|
55
|
+
class S extends m {
|
|
56
|
+
constructor(s, c, u) {
|
|
57
|
+
super(null, u);
|
|
58
|
+
n(this, b, []);
|
|
59
|
+
const o = E(() => {
|
|
60
|
+
this.current = c();
|
|
61
|
+
}, 0);
|
|
62
|
+
s.forEach((a) => {
|
|
63
|
+
t(this, b).push(
|
|
64
|
+
a.subscribe(() => {
|
|
65
|
+
o();
|
|
66
|
+
})
|
|
67
|
+
);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
close() {
|
|
71
|
+
super.close(), t(this, b).forEach((s) => s());
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
b = new WeakMap();
|
|
75
|
+
export {
|
|
76
|
+
S as C,
|
|
77
|
+
P as D,
|
|
78
|
+
R
|
|
79
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty,g=Object.defineProperties;var l=Object.getOwnPropertyDescriptors;var n=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var i=(r,t,e)=>t in r?d(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,h=(r,t)=>{for(var e in t||(t={}))A.call(t,e)&&i(r,e,t[e]);if(n)for(var e of n(t))f.call(t,e)&&i(r,e,t[e]);return r},s=(r,t)=>g(r,l(t));var u=(r,t,e)=>(i(r,typeof t!="symbol"?t+"":t,e),e);const F=require("./math-GDWEqu7y.cjs"),c=require("./number-yVpzMdbQ.cjs"),b=require("./Animated-
|
|
1
|
+
"use strict";var d=Object.defineProperty,g=Object.defineProperties;var l=Object.getOwnPropertyDescriptors;var n=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var i=(r,t,e)=>t in r?d(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,h=(r,t)=>{for(var e in t||(t={}))A.call(t,e)&&i(r,e,t[e]);if(n)for(var e of n(t))f.call(t,e)&&i(r,e,t[e]);return r},s=(r,t)=>g(r,l(t));var u=(r,t,e)=>(i(r,typeof t!="symbol"?t+"":t,e),e);const F=require("./math-GDWEqu7y.cjs"),c=require("./number-yVpzMdbQ.cjs"),b=require("./Animated-Bf-gPIQM.cjs");class q extends b.Animated{constructor(e){var a,m;super(s(h({},e),{min:(a=e==null?void 0:e.min)!=null?a:-1/0,max:(m=e==null?void 0:e.max)!=null?m:1/0}));u(this,"damping");this.damping=(e==null?void 0:e.damping)||0}update(){this.damping?this.listenAnimationFrame():(this.current=this.target,this.unlistenAnimationFrame())}handleAnimationFrame(e){c.preciseNumber(this.current,4)===c.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target),this.current=F.damp(this.current,this.target,this.damping,e.elapsed)}}exports.Damped=q;
|
|
@@ -13,7 +13,7 @@ var r = (a, t, e) => t in a ? c(a, t, { enumerable: !0, configurable: !0, writab
|
|
|
13
13
|
var d = (a, t, e) => (r(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
14
|
import { d as x } from "./math-BOBiC4TN.js";
|
|
15
15
|
import { p as u } from "./number-Bo5RdrA1.js";
|
|
16
|
-
import { A as F } from "./Animated-
|
|
16
|
+
import { A as F } from "./Animated-Br_4OSth.js";
|
|
17
17
|
class p extends F {
|
|
18
18
|
constructor(e) {
|
|
19
19
|
var i, m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../custom-element/index.cjs")
|
|
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,6 +1,7 @@
|
|
|
1
1
|
import { CustomElement as e } from "../custom-element/index.js";
|
|
2
|
-
import
|
|
2
|
+
import "../Store-JOKrNVEr.js";
|
|
3
3
|
import { i as r } from "../browser-0zX67oeU.js";
|
|
4
|
+
import { e as s } from "../tags-D-lzPz_v.js";
|
|
4
5
|
class l extends e {
|
|
5
6
|
constructor() {
|
|
6
7
|
super(), r && s(this, {
|
package/lib/animation/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty,c=Object.defineProperties;var l=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var i=(a,t,e)=>t in a?h(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,n=(a,t)=>{for(var e in t||(t={}))g.call(t,e)&&i(a,e,t[e]);if(r)for(var e of r(t))A.call(t,e)&&i(a,e,t[e]);return a},s=(a,t)=>c(a,l(t));var m=(a,t,e)=>(i(a,typeof t!="symbol"?t+"":t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../Animated-
|
|
1
|
+
"use strict";var h=Object.defineProperty,c=Object.defineProperties;var l=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var i=(a,t,e)=>t in a?h(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,n=(a,t)=>{for(var e in t||(t={}))g.call(t,e)&&i(a,e,t[e]);if(r)for(var e of r(t))A.call(t,e)&&i(a,e,t[e]);return a},s=(a,t)=>c(a,l(t));var m=(a,t,e)=>(i(a,typeof t!="symbol"?t+"":t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../Animated-Bf-gPIQM.cjs"),x=require("../easings-DsS5-Kqc.cjs"),F=require("../Damped-BwpMU9Gi.cjs");class f extends d.Animated{constructor(e){super(s(n({},e),{min:(e==null?void 0:e.min)||0,max:(e==null?void 0:e.max)||1e3}));m(this,"easing");this.easing=(e==null?void 0:e.easing)||x.linear}start(){this.listenAnimationFrame()}pause(){this.unlistenAnimationFrame()}stop(){this.reset()}get max(){return super.max}update(){const e=(this.target-this.min.current)/(this.delta||1),u=this.easing(e);this.current=this.min.current+u*this.delta}handleAnimationFrame(e){this.shift(e.elapsed),(e.elapsed&&this.current===0||this.current===this.delta)&&this.unlistenAnimationFrame()}}exports.Animated=d.Animated;exports.Damped=F.Damped;exports.Tweened=f;
|
package/lib/animation/index.js
CHANGED
|
@@ -11,9 +11,9 @@ var r = (a, t, e) => t in a ? d(a, t, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return a;
|
|
12
12
|
}, m = (a, t) => l(a, u(t));
|
|
13
13
|
var n = (a, t, e) => (r(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
-
import { A as g } from "../Animated-
|
|
14
|
+
import { A as g } from "../Animated-Br_4OSth.js";
|
|
15
15
|
import { l as A } from "../easings-BKi40vHz.js";
|
|
16
|
-
import { D as b } from "../Damped-
|
|
16
|
+
import { D as b } from "../Damped-urvryQLo.js";
|
|
17
17
|
class w extends g {
|
|
18
18
|
constructor(e) {
|
|
19
19
|
super(m(s({}, e), {
|
package/lib/canvas/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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);
|
package/lib/canvas/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CustomElement as C, define as E } from "../custom-element/index.js";
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import { c as P } from "../
|
|
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";
|
|
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";
|
|
@@ -18,7 +18,7 @@ var A = Object.defineProperty, O = Object.getOwnPropertyDescriptor, z = (t, i, s
|
|
|
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
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;
|
|
21
|
-
const D =
|
|
21
|
+
const D = P({
|
|
22
22
|
":host, canvas": {
|
|
23
23
|
display: "block",
|
|
24
24
|
width: "100%",
|
|
@@ -28,11 +28,11 @@ const D = b({
|
|
|
28
28
|
let R = class extends C {
|
|
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,
|
|
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
32
|
}), a(this, w, (t) => {
|
|
33
33
|
o(this, v, t.timestamp), o(this, f, t.elapsed), e(this, l).notify(this.detail);
|
|
34
|
-
}), this.openShadow(D),
|
|
35
|
-
shadowChildren:
|
|
34
|
+
}), this.openShadow(D), y(this, {
|
|
35
|
+
shadowChildren: b({
|
|
36
36
|
ref: (t) => {
|
|
37
37
|
o(this, h, t), o(this, d, t.getContext("2d"));
|
|
38
38
|
}
|
|
@@ -0,0 +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;
|
|
@@ -26,49 +26,38 @@ export type ElementConstructorEventValue<E extends Event> = {
|
|
|
26
26
|
export type ElementConstructorEvents = Partial<{
|
|
27
27
|
[EventName in ElementConstructorEventNames | `custom:${string}`]: EventName extends ElementConstructorEventNames ? ElementConstructorEventValue<HTMLElementEventMap[EventName]> : ElementConstructorEventValue<CustomEvent>;
|
|
28
28
|
}>;
|
|
29
|
-
export type ElementConstructorNativeAttribute<
|
|
29
|
+
export type ElementConstructorNativeAttribute<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames, E = T extends ElementConstructorTagNames ? ElementConstructorTagNameMap[T] : Node> = {
|
|
30
30
|
[K in keyof E]: E[K] extends string ? K : never;
|
|
31
31
|
}[keyof E];
|
|
32
|
-
export type ElementConstructorNativeAttributes<T extends ElementConstructorTagNames> = Partial<{
|
|
32
|
+
export type ElementConstructorNativeAttributes<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames> = Partial<{
|
|
33
33
|
[K in ElementConstructorNativeAttribute<T>]: any;
|
|
34
34
|
}>;
|
|
35
35
|
export type ElementConstructorCustomAttributes = {
|
|
36
36
|
[key: string]: any;
|
|
37
37
|
};
|
|
38
|
-
export type ElementConstructorAttributes<T extends ElementConstructorTagNames> = ElementConstructorNativeAttributes<T> | ElementConstructorCustomAttributes;
|
|
38
|
+
export type ElementConstructorAttributes<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames> = ElementConstructorNativeAttributes<T> | ElementConstructorCustomAttributes;
|
|
39
39
|
export type ElementConstructorParent = Node | ElementConstructor;
|
|
40
|
-
export type ElementConstructorRefCallback<
|
|
41
|
-
export type ElementConstructorRef<
|
|
42
|
-
current: ElementConstructorTagNameMap[
|
|
40
|
+
export type ElementConstructorRefCallback<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames> = (element: T extends ElementConstructorTagNames ? ElementConstructorTagNameMap[T] : Node) => void;
|
|
41
|
+
export type ElementConstructorRef<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames> = {
|
|
42
|
+
current: T extends ElementConstructorTagNames ? ElementConstructorTagNameMap[T] : Node;
|
|
43
43
|
};
|
|
44
|
-
export type ElementConstructorTagObject<
|
|
44
|
+
export type ElementConstructorTagObject<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames> = {
|
|
45
45
|
class?: ElementConstructorClass;
|
|
46
|
-
style?:
|
|
46
|
+
style?: T extends 'style' ? ElementConstructorJSS : ElementConstructorStyle;
|
|
47
47
|
events?: ElementConstructorEvents;
|
|
48
|
-
attributes?: ElementConstructorAttributes<
|
|
48
|
+
attributes?: ElementConstructorAttributes<T>;
|
|
49
49
|
children?: any;
|
|
50
50
|
shadowChildren?: any;
|
|
51
51
|
parent?: ElementConstructorParent;
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
ref?: ElementConstructorRefCallback<T> | ElementConstructorRef<T>;
|
|
53
|
+
forceSvg?: boolean;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
56
|
-
[T in ElementConstructorTagNames]: ElementConstructorTagObject<T>;
|
|
57
|
-
}> | {
|
|
58
|
-
[key: `${string}-${string}`]: ElementConstructorTagObject<'div'>;
|
|
59
|
-
};
|
|
60
|
-
export type ElementConstructorType = HTMLElement | SVGElement;
|
|
61
|
-
export declare class ElementConstructor<T extends ElementConstructorTagNames = ElementConstructorTagNames> {
|
|
55
|
+
export declare class ElementConstructor<T extends ElementConstructorTagNames | Node = ElementConstructorTagNames, N = T extends ElementConstructorTagNames ? ElementConstructorTagNameMap[T] : Node> {
|
|
62
56
|
#private;
|
|
63
|
-
constructor(
|
|
64
|
-
constructor(value: string, object
|
|
65
|
-
constructor(
|
|
57
|
+
constructor(value: T, object?: ElementConstructorTagObject<T>);
|
|
58
|
+
constructor(value: string, object?: ElementConstructorTagObject<T>);
|
|
59
|
+
constructor(value: Node, object?: ElementConstructorTagObject<T>);
|
|
66
60
|
get unsubscribeCallbacks(): Function[];
|
|
67
|
-
get
|
|
61
|
+
get node(): N;
|
|
68
62
|
destroy: () => void;
|
|
69
63
|
}
|
|
70
|
-
export declare function element(object: ElementConstructorObject): ElementConstructor;
|
|
71
|
-
export declare function element<T extends ElementConstructorTagNames = ElementConstructorTagNames>(value: string, object?: ElementConstructorTagObject<T>): ElementConstructor;
|
|
72
|
-
export declare function element(element: HTMLElement, object: ElementConstructorTagObject<any>): ElementConstructor;
|
|
73
|
-
export declare function elementFactory(object: ElementConstructorObject): () => ElementConstructor;
|
|
74
|
-
export declare function elementFactory(element: HTMLElement, object: ElementConstructorTagObject<any>): () => ElementConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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;
|