aptechka 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/lib/Composed-C2Vv1xxR.cjs +1 -0
  2. package/lib/Composed-DhtYBEmo.js +79 -0
  3. package/lib/component/Component.d.ts +29 -0
  4. package/lib/component/hooks/animation.d.ts +9 -0
  5. package/lib/component/hooks/context.d.ts +2 -0
  6. package/lib/component/hooks/intersection.d.ts +4 -0
  7. package/lib/component/hooks/resize.d.ts +6 -0
  8. package/lib/component/hooks/shadow.d.ts +1 -0
  9. package/lib/component/hooks/stores.d.ts +6 -0
  10. package/lib/component/hooks/style.d.ts +2 -0
  11. package/lib/component/index.cjs +1 -0
  12. package/lib/component/index.d.ts +7 -0
  13. package/lib/component/index.js +187 -0
  14. package/lib/connector/index.cjs +1 -1
  15. package/lib/connector/index.js +1 -1
  16. package/lib/element-constructor/ElementConstructor.d.ts +1 -1
  17. package/lib/element-constructor/tags.d.ts +2 -3
  18. package/lib/element-resizer/index.cjs +1 -1
  19. package/lib/element-resizer/index.d.ts +1 -1
  20. package/lib/element-resizer/index.js +2 -1
  21. package/lib/en3/core/en3.d.ts +2 -2
  22. package/lib/en3/objects/En3Clip.d.ts +1 -1
  23. package/lib/intersector/index.cjs +1 -1
  24. package/lib/intersector/index.d.ts +1 -1
  25. package/lib/intersector/index.js +2 -1
  26. package/lib/layout-box/index.cjs +1 -1
  27. package/lib/layout-box/index.d.ts +2 -2
  28. package/lib/layout-box/index.js +70 -72
  29. package/lib/object-C1ph624j.cjs +1 -0
  30. package/lib/object-DIPjdukP.js +73 -0
  31. package/lib/popover/index.cjs +1 -1
  32. package/lib/popover/index.js +79 -71
  33. package/lib/router/Route.d.ts +8 -2
  34. package/lib/router/index.cjs +1 -1
  35. package/lib/router/index.d.ts +1 -2
  36. package/lib/router/index.js +139 -140
  37. package/lib/store/index.cjs +1 -1
  38. package/lib/store/index.js +48 -111
  39. package/lib/ticker/index.cjs +1 -1
  40. package/lib/ticker/index.d.ts +1 -1
  41. package/lib/ticker/index.js +33 -37
  42. package/lib/utils/dom.d.ts +2 -2
  43. package/lib/utils/index.cjs +1 -1
  44. package/lib/utils/index.d.ts +1 -1
  45. package/lib/utils/index.js +113 -168
  46. package/lib/utils/object.d.ts +1 -0
  47. package/package.json +10 -2
  48. package/lib/router/RouteElement.d.ts +0 -14
@@ -1,138 +1,75 @@
1
- var C = (e, t, s) => {
2
- if (!t.has(e))
3
- throw TypeError("Cannot " + s);
1
+ var v = (t, s, e) => {
2
+ if (!s.has(t))
3
+ throw TypeError("Cannot " + e);
4
4
  };
5
- var u = (e, t, s) => (C(e, t, "read from private field"), s ? s.call(e) : t.get(e)), n = (e, t, s) => {
6
- if (t.has(e))
5
+ var i = (t, s, e) => (v(t, s, "read from private field"), e ? e.call(t) : s.get(t)), n = (t, s, e) => {
6
+ if (s.has(t))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- t instanceof WeakSet ? t.add(e) : t.set(e, s);
9
- }, h = (e, t, s, r) => (C(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s);
10
- var S = (e, t, s, r) => ({
11
- set _(c) {
12
- h(e, t, c, s);
8
+ s instanceof WeakSet ? s.add(t) : s.set(t, e);
9
+ }, p = (t, s, e, r) => (v(t, s, "write to private field"), r ? r.call(t, e) : s.set(t, e), e);
10
+ var f = (t, s, e, r) => ({
11
+ set _(a) {
12
+ p(t, s, a, e);
13
13
  },
14
14
  get _() {
15
- return u(e, t, r);
15
+ return i(t, s, r);
16
16
  }
17
17
  });
18
- var y = (e, t, s) => new Promise((r, c) => {
19
- var o = (i) => {
18
+ var d = (t, s, e) => new Promise((r, a) => {
19
+ var g = (o) => {
20
20
  try {
21
- d(s.next(i));
22
- } catch (f) {
23
- c(f);
21
+ m(e.next(o));
22
+ } catch (h) {
23
+ a(h);
24
24
  }
25
- }, a = (i) => {
25
+ }, x = (o) => {
26
26
  try {
27
- d(s.throw(i));
28
- } catch (f) {
29
- c(f);
27
+ m(e.throw(o));
28
+ } catch (h) {
29
+ a(h);
30
30
  }
31
- }, d = (i) => i.done ? r(i.value) : Promise.resolve(i.value).then(o, a);
32
- d((s = s.apply(e, t)).next());
31
+ }, m = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(g, x);
32
+ m((e = e.apply(t, s)).next());
33
33
  });
34
- import { S as A } from "../Store-JOKrNVEr.js";
35
- import { a as B, s as F } from "../Store-JOKrNVEr.js";
36
- import { D as H } from "../Derived-Bc88XJ8J.js";
37
- import { d as D } from "../function-C10DGppn.js";
38
- var m;
39
- class w extends A {
40
- constructor(s, r, c) {
41
- super(null, c);
42
- n(this, m, void 0);
43
- h(this, m, s.subscribe((o) => {
44
- const a = [];
45
- o.current.forEach((d, i) => {
46
- var f;
47
- o.current[i] === ((f = o.previous) == null ? void 0 : f[i]) && this.current[i] ? a.push(this.current[i]) : a.push(r(d));
48
- }), this.current = a;
49
- }));
50
- }
51
- close() {
52
- super.close(), u(this, m).call(this);
53
- }
54
- }
55
- m = new WeakMap();
56
- var b, l, p;
57
- class E extends A {
58
- constructor(s, r, c) {
59
- super(s, c);
60
- n(this, b, void 0);
61
- n(this, l, void 0);
62
- n(this, p, 0);
63
- h(this, l, new A(!1)), h(this, b, r), c != null && c.manualControl || this.refetch();
64
- }
65
- get isPending() {
66
- return u(this, l);
67
- }
68
- /**
69
- * Calls fetcher again and sets isPending to true.
70
- */
71
- refetch() {
72
- u(this, l).current = !0, h(this, p, u(this, p) + 1);
73
- const s = u(this, p);
74
- u(this, b).call(this).then((r) => {
75
- s === u(this, p) && (u(this, l).current = !1, this.current = r);
76
- });
77
- }
78
- }
79
- b = new WeakMap(), l = new WeakMap(), p = new WeakMap();
80
- var v, x, g;
81
- class N extends E {
82
- constructor(s, r, c = 100) {
83
- super(s, r, {
34
+ import { S as I, a as b, s as k } from "../Store-JOKrNVEr.js";
35
+ import { D as j } from "../Derived-Bc88XJ8J.js";
36
+ import { R as A } from "../Composed-DhtYBEmo.js";
37
+ import { C as w, D as z } from "../Composed-DhtYBEmo.js";
38
+ var c, u, l;
39
+ class R extends A {
40
+ constructor(e, r, a = 100) {
41
+ super(e, r, {
84
42
  manualControl: !0,
85
43
  skipSubscribeNotification: !0
86
44
  });
87
- n(this, v, void 0);
88
- n(this, x, void 0);
89
- n(this, g, 0);
90
- h(this, x, c);
45
+ n(this, c, void 0);
46
+ n(this, u, void 0);
47
+ n(this, l, 0);
48
+ p(this, u, a);
91
49
  }
92
50
  get step() {
93
- return u(this, g);
51
+ return i(this, l);
94
52
  }
95
53
  startAccumulating() {
96
- h(this, v, setInterval(() => y(this, null, function* () {
97
- ++S(this, g)._, this.refetch();
98
- }), u(this, x)));
54
+ p(this, c, setInterval(() => d(this, null, function* () {
55
+ ++f(this, l)._, this.refetch();
56
+ }), i(this, u)));
99
57
  }
100
58
  stopAccumulating() {
101
- clearInterval(u(this, v));
59
+ clearInterval(i(this, c));
102
60
  }
103
61
  close() {
104
62
  super.close(), this.stopAccumulating();
105
63
  }
106
64
  }
107
- v = new WeakMap(), x = new WeakMap(), g = new WeakMap();
108
- var I;
109
- class j extends A {
110
- constructor(s, r, c) {
111
- super(null, c);
112
- n(this, I, []);
113
- const o = D(() => {
114
- this.current = r();
115
- }, 0);
116
- s.forEach((a) => {
117
- u(this, I).push(
118
- a.subscribe(() => {
119
- o();
120
- })
121
- );
122
- });
123
- }
124
- close() {
125
- super.close(), u(this, I).forEach((s) => s());
126
- }
127
- }
128
- I = new WeakMap();
65
+ c = new WeakMap(), u = new WeakMap(), l = new WeakMap();
129
66
  export {
130
- j as Composed,
131
- N as CumulativeResource,
132
- H as Derived,
133
- w as DerivedArray,
134
- E as Resource,
135
- A as Store,
136
- B as activeStores,
137
- F as storeRegistry
67
+ w as Composed,
68
+ R as CumulativeResource,
69
+ j as Derived,
70
+ z as DerivedArray,
71
+ A as Resource,
72
+ I as Store,
73
+ b as activeStores,
74
+ k as storeRegistry
138
75
  };
@@ -1 +1 @@
1
- "use strict";var B=(r,e,s)=>{if(!e.has(r))throw TypeError("Cannot "+s)};var i=(r,e,s)=>(B(r,e,"read from private field"),s?s.call(r):e.get(r)),h=(r,e,s)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,s)},t=(r,e,s,n)=>(B(r,e,"write to private field"),n?n.call(r,s):e.set(r,s),s);var q=(r,e,s)=>(B(r,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../intersector/index.cjs"),g=require("../browser-CpzFX2xg.cjs");var d,u,y,b,l,o,k;class M{constructor(e,s){h(this,d,void 0);h(this,u,void 0);h(this,y,void 0);h(this,b,0);h(this,l,0);h(this,o,!1);h(this,k,e=>{t(this,o,e.isIntersecting)});t(this,d,e),t(this,u,s==null?void 0:s.maxFPS),t(this,y,(s==null?void 0:s.order)||0),s!=null&&s.culling&&g.isBrowser?S.intersector.subscribe(s.culling,i(this,k)):t(this,o,!0)}get callback(){return i(this,d)}get order(){return i(this,y)}sync(e){t(this,b,e-i(this,l))}tick(e){if(t(this,l,Math.max(0,e-i(this,b))),i(this,u))if(i(this,l)>=1e3/i(this,u))t(this,b,e-i(this,l)%i(this,u));else return;else t(this,b,e);i(this,o)&&i(this,d).call(this,{elapsed:i(this,l),timestamp:e})}destroy(){S.intersector.unsubscribe(i(this,k))}}d=new WeakMap,u=new WeakMap,y=new WeakMap,b=new WeakMap,l=new WeakMap,o=new WeakMap,k=new WeakMap;var w,f,a,m,c,A,E,F,L,v,T;class x{constructor(){h(this,A);h(this,F);h(this,w,0);h(this,f,0);h(this,a,void 0);h(this,m,!1);h(this,c,[]);h(this,v,e=>{if(i(this,m)){t(this,m,!1),t(this,w,e-i(this,f));for(const s of i(this,c))s.sync(i(this,f))}t(this,a,requestAnimationFrame(i(this,v))),t(this,f,e-i(this,w));for(const s of i(this,c))s.tick(i(this,f))});h(this,T,()=>{document.hidden&&t(this,m,!0)});g.isBrowser&&document.addEventListener("visibilitychange",i(this,T))}subscribe(e,s){if(g.isBrowser){if(!i(this,c).find(n=>n.callback===e)){const n=new M(e,s);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((P,I)=>P.order-I.order))}q(this,A,E).call(this)}}unsubscribe(e){if(!g.isBrowser)return;const s=i(this,c).filter(n=>n.callback===e);s.length&&(s.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==e)),i(this,c).length||q(this,F,L).call(this))}destroy(){g.isBrowser&&(q(this,F,L).call(this),document.removeEventListener("visibilitychange",i(this,T)))}}w=new WeakMap,f=new WeakMap,a=new WeakMap,m=new WeakMap,c=new WeakMap,A=new WeakSet,E=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,v)))},F=new WeakSet,L=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},v=new WeakMap,T=new WeakMap;const V=new x;exports.Ticker=x;exports.ticker=V;
1
+ "use strict";var A=(r,e,s)=>{if(!e.has(r))throw TypeError("Cannot "+s)};var i=(r,e,s)=>(A(r,e,"read from private field"),s?s.call(r):e.get(r)),h=(r,e,s)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,s)},t=(r,e,s,n)=>(A(r,e,"write to private field"),n?n.call(r,s):e.set(r,s),s);var T=(r,e,s)=>(A(r,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../intersector/index.cjs"),L=require("../browser-CpzFX2xg.cjs");var f,l,g,b,u,m,y;class M{constructor(e,s){h(this,f,void 0);h(this,l,void 0);h(this,g,void 0);h(this,b,0);h(this,u,0);h(this,m,!1);h(this,y,e=>{t(this,m,e.isIntersecting)});t(this,f,e),t(this,l,s==null?void 0:s.maxFPS),t(this,g,(s==null?void 0:s.order)||0),s!=null&&s.culling&&L.isBrowser?x.intersector.subscribe(s.culling,i(this,y)):t(this,m,!0)}get callback(){return i(this,f)}get order(){return i(this,g)}sync(e){t(this,b,e-i(this,u))}tick(e){if(t(this,u,Math.max(0,e-i(this,b))),i(this,l))if(i(this,u)>=1e3/i(this,l))t(this,b,e-i(this,u)%i(this,l));else return;else t(this,b,e);i(this,m)&&i(this,f).call(this,{elapsed:i(this,u),timestamp:e})}destroy(){x.intersector.unsubscribe(i(this,y))}}f=new WeakMap,l=new WeakMap,g=new WeakMap,b=new WeakMap,u=new WeakMap,m=new WeakMap,y=new WeakMap;var k,d,a,o,c,q,E,F,S,v,w;class B{constructor(){h(this,q);h(this,F);h(this,k,0);h(this,d,0);h(this,a,void 0);h(this,o,!1);h(this,c,[]);h(this,v,e=>{if(i(this,o)){t(this,o,!1),t(this,k,e-i(this,d));for(const s of i(this,c))s.sync(i(this,d))}t(this,a,requestAnimationFrame(i(this,v))),t(this,d,e-i(this,k));for(const s of i(this,c))s.tick(i(this,d))});h(this,w,()=>{document.hidden&&t(this,o,!0)});L.isBrowser&&document.addEventListener("visibilitychange",i(this,w))}subscribe(e,s){if(!i(this,c).find(n=>n.callback===e)){const n=new M(e,s);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((P,I)=>P.order-I.order))}return T(this,q,E).call(this),()=>this.unsubscribe(e)}unsubscribe(e){const s=i(this,c).filter(n=>n.callback===e);s.length&&(s.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==e)),i(this,c).length||T(this,F,S).call(this))}destroy(){L.isBrowser&&(T(this,F,S).call(this),document.removeEventListener("visibilitychange",i(this,w)))}}k=new WeakMap,d=new WeakMap,a=new WeakMap,o=new WeakMap,c=new WeakMap,q=new WeakSet,E=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,v)))},F=new WeakSet,S=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},v=new WeakMap,w=new WeakMap;const V=new B;exports.Ticker=B;exports.ticker=V;
@@ -12,7 +12,7 @@ export interface TickerAddOptions {
12
12
  export declare class Ticker {
13
13
  #private;
14
14
  constructor();
15
- subscribe(callback: TickerCallback, options?: TickerAddOptions): void;
15
+ subscribe(callback: TickerCallback, options?: TickerAddOptions): () => void;
16
16
  unsubscribe(callback: TickerCallback): void;
17
17
  destroy(): void;
18
18
  }
@@ -1,34 +1,34 @@
1
- var T = (r, s, t) => {
1
+ var x = (r, s, t) => {
2
2
  if (!s.has(r))
3
3
  throw TypeError("Cannot " + t);
4
4
  };
5
- var i = (r, s, t) => (T(r, s, "read from private field"), t ? t.call(r) : s.get(r)), h = (r, s, t) => {
5
+ var i = (r, s, t) => (x(r, s, "read from private field"), t ? t.call(r) : s.get(r)), h = (r, s, t) => {
6
6
  if (s.has(r))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  s instanceof WeakSet ? s.add(r) : s.set(r, t);
9
- }, e = (r, s, t, n) => (T(r, s, "write to private field"), n ? n.call(r, t) : s.set(r, t), t);
10
- var w = (r, s, t) => (T(r, s, "access private method"), t);
9
+ }, e = (r, s, t, n) => (x(r, s, "write to private field"), n ? n.call(r, t) : s.set(r, t), t);
10
+ var L = (r, s, t) => (x(r, s, "access private method"), t);
11
11
  import { intersector as E } from "../intersector/index.js";
12
- import { i as g } from "../browser-0zX67oeU.js";
13
- var m, u, y, f, l, d, F;
12
+ import { i as T } from "../browser-0zX67oeU.js";
13
+ var m, u, g, f, l, d, y;
14
14
  class V {
15
15
  constructor(s, t) {
16
16
  h(this, m, void 0);
17
17
  h(this, u, void 0);
18
- h(this, y, void 0);
18
+ h(this, g, void 0);
19
19
  h(this, f, 0);
20
20
  h(this, l, 0);
21
21
  h(this, d, !1);
22
- h(this, F, (s) => {
22
+ h(this, y, (s) => {
23
23
  e(this, d, s.isIntersecting);
24
24
  });
25
- e(this, m, s), e(this, u, t == null ? void 0 : t.maxFPS), e(this, y, (t == null ? void 0 : t.order) || 0), t != null && t.culling && g ? E.subscribe(t.culling, i(this, F)) : e(this, d, !0);
25
+ e(this, m, s), e(this, u, t == null ? void 0 : t.maxFPS), e(this, g, (t == null ? void 0 : t.order) || 0), t != null && t.culling && T ? E.subscribe(t.culling, i(this, y)) : e(this, d, !0);
26
26
  }
27
27
  get callback() {
28
28
  return i(this, m);
29
29
  }
30
30
  get order() {
31
- return i(this, y);
31
+ return i(this, g);
32
32
  }
33
33
  sync(s) {
34
34
  e(this, f, s - i(this, l));
@@ -47,69 +47,65 @@ class V {
47
47
  });
48
48
  }
49
49
  destroy() {
50
- E.unsubscribe(i(this, F));
50
+ E.unsubscribe(i(this, y));
51
51
  }
52
52
  }
53
- m = new WeakMap(), u = new WeakMap(), y = new WeakMap(), f = new WeakMap(), l = new WeakMap(), d = new WeakMap(), F = new WeakMap();
54
- var k, b, a, o, c, x, S, v, q, A, L;
53
+ m = new WeakMap(), u = new WeakMap(), g = new WeakMap(), f = new WeakMap(), l = new WeakMap(), d = new WeakMap(), y = new WeakMap();
54
+ var F, b, a, o, c, w, S, k, q, v, A;
55
55
  class B {
56
56
  constructor() {
57
- h(this, x);
58
- h(this, v);
59
- h(this, k, 0);
57
+ h(this, w);
58
+ h(this, k);
59
+ h(this, F, 0);
60
60
  h(this, b, 0);
61
61
  h(this, a, void 0);
62
62
  h(this, o, !1);
63
63
  h(this, c, []);
64
- h(this, A, (s) => {
64
+ h(this, v, (s) => {
65
65
  if (i(this, o)) {
66
- e(this, o, !1), e(this, k, s - i(this, b));
66
+ e(this, o, !1), e(this, F, s - i(this, b));
67
67
  for (const t of i(this, c))
68
68
  t.sync(i(this, b));
69
69
  }
70
- e(this, a, requestAnimationFrame(i(this, A))), e(this, b, s - i(this, k));
70
+ e(this, a, requestAnimationFrame(i(this, v))), e(this, b, s - i(this, F));
71
71
  for (const t of i(this, c))
72
72
  t.tick(i(this, b));
73
73
  });
74
- h(this, L, () => {
74
+ h(this, A, () => {
75
75
  document.hidden && e(this, o, !0);
76
76
  });
77
- g && document.addEventListener(
77
+ T && document.addEventListener(
78
78
  "visibilitychange",
79
- i(this, L)
79
+ i(this, A)
80
80
  );
81
81
  }
82
82
  subscribe(s, t) {
83
- if (g) {
84
- if (!i(this, c).find((n) => n.callback === s)) {
85
- const n = new V(s, t);
86
- n.sync(performance.now()), i(this, c).push(n), e(this, c, i(this, c).sort((I, P) => I.order - P.order));
87
- }
88
- w(this, x, S).call(this);
83
+ if (!i(this, c).find((n) => n.callback === s)) {
84
+ const n = new V(s, t);
85
+ n.sync(performance.now()), i(this, c).push(n), e(this, c, i(this, c).sort((I, P) => I.order - P.order));
89
86
  }
87
+ return L(this, w, S).call(this), () => this.unsubscribe(s);
90
88
  }
91
89
  unsubscribe(s) {
92
- if (!g)
93
- return;
94
90
  const t = i(this, c).filter(
95
91
  (n) => n.callback === s
96
92
  );
97
93
  t.length && (t.forEach((n) => n.destroy()), e(this, c, i(this, c).filter(
98
94
  (n) => n.callback !== s
99
- )), i(this, c).length || w(this, v, q).call(this));
95
+ )), i(this, c).length || L(this, k, q).call(this));
100
96
  }
101
97
  destroy() {
102
- g && (w(this, v, q).call(this), document.removeEventListener(
98
+ T && (L(this, k, q).call(this), document.removeEventListener(
103
99
  "visibilitychange",
104
- i(this, L)
100
+ i(this, A)
105
101
  ));
106
102
  }
107
103
  }
108
- k = new WeakMap(), b = new WeakMap(), a = new WeakMap(), o = new WeakMap(), c = new WeakMap(), x = new WeakSet(), S = function() {
109
- i(this, c).length && !i(this, a) && e(this, a, requestAnimationFrame(i(this, A)));
110
- }, v = new WeakSet(), q = function() {
104
+ F = new WeakMap(), b = new WeakMap(), a = new WeakMap(), o = new WeakMap(), c = new WeakMap(), w = new WeakSet(), S = function() {
105
+ i(this, c).length && !i(this, a) && e(this, a, requestAnimationFrame(i(this, v)));
106
+ }, k = new WeakSet(), q = function() {
111
107
  i(this, a) && (cancelAnimationFrame(i(this, a)), e(this, a, void 0));
112
- }, A = new WeakMap(), L = new WeakMap();
108
+ }, v = new WeakMap(), A = new WeakMap();
113
109
  const M = new B();
114
110
  export {
115
111
  B as Ticker,
@@ -1,4 +1,4 @@
1
1
  export declare function findParentElement<T extends typeof Element>(element: Element | null, Constructor: T): T | null;
2
- export type ElementOrSelector<T extends HTMLElement = HTMLElement> = string | T;
3
- export declare function getElement<T extends HTMLElement>(elementOrSelector: ElementOrSelector<T>, from?: Document): T | null;
2
+ export type ElementOrSelector<T extends Element = Element> = string | T;
3
+ export declare function getElement<T extends Element>(elementOrSelector: ElementOrSelector<T> | undefined, from?: Document): T | null | undefined;
4
4
  export declare function findScrollParentElement(node: Node | null, _initial?: Node | null): HTMLElement;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../attributes-Bf2svn4j.cjs"),Q=require("../browser-CpzFX2xg.cjs"),m=require("../dom-qY2LdCVL.cjs"),r=require("../easings-DsS5-Kqc.cjs"),T=require("../events-Crwi8fz6.cjs"),D=require("../file-EevnUtRj.cjs"),h=require("../function-MthRj-GJ.cjs"),p=require("../layout-8ryRAMGJ.cjs"),u=require("../math-GDWEqu7y.cjs"),g=require("../number-yVpzMdbQ.cjs"),o=require("../string-DzUwFYSS.cjs"),O=require("../style-At6aDoqG.cjs");function P(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function S(e,t){const n=e.measureText(t),i=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent,s=n.width;return{height:i,width:s}}function A(e){return Math.floor(e)+.5}function q(e,t,n,i,s,a){let d=e/t,E=n/i,c=0,l=0;return s=typeof s=="undefined"?.5:s,a=typeof a=="undefined"?.5:a,d>E?(c=i,l=i*d):(l=n,c=n/d),[(n-l)*s,(i-c)*a,l,c]}function k(e,t){return e.x<t.x+t.width&&e.x>t.x&&e.y<t.y+t.height&&e.y>t.y}function v(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)<t.radius}function N(e,t,n=!1){let i=e.x-t.width/2,s=t.height/2-e.y;return n&&(i=i/(t.width/2),s=s/(t.height/2)),{x:i,y:s}}function R(e,t){const n=e.x/t.x,i=e.y/t.y;return{x:n,y:i}}function B(e,t){return t=t||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(e.x-t.x)/t.width*t.width,y:(e.y-t.y)/t.height*t.height}}function z(e){const t=window.atob(e);return decodeURIComponent(window.escape(t))}function M(e){const t=window.unescape(encodeURIComponent(e));return window.btoa(t)}function x(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function C(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Node)return e;const t=Array.isArray(e)?[]:{};for(const n in e)e.hasOwnProperty(n)&&(t[n]=C(e[n]));return t}function I(e,t,n=x){for(const i in t)n(t[i])?(e[i]||Object.assign(e,{[i]:{}}),I(e[i],t[i],n)):Object.assign(e,{[i]:t[i]});return e}function w(e){return e===null||typeof e=="undefined"}function f(e,t){if(typeof e!=typeof t)return!1;if([e,t].some(n=>w(n)))return e===t;if(Array.isArray(e)){const n=e.length>t.length?e:t,i=e.length>t.length?t:e;return n.every((s,a)=>f(s,i[a]))}if(typeof e!="object"||e instanceof Node||typeof e=="object"&&e.constructor.toString().startsWith("class"))return e===t;for(const n in e){if(!t.hasOwnProperty(n))return!1;if(typeof e[n]=="object"&&typeof t[n]=="object"){if(!f(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1}return!0}function b(e,t){const n={};for(const i in e)t.includes(i)&&(n[i]=e[i]);return n}function J(e,t){const n={};for(const i in e)t.includes(i)||(n[i]=e[i]);return n}exports.parseAttribute=y.parseAttribute;exports.parseAttributeValue=y.parseAttributeValue;exports.isBrowser=Q.isBrowser;exports.findParentElement=m.findParentElement;exports.findScrollParentElement=m.findScrollParentElement;exports.getElement=m.getElement;exports.easeInCubic=r.easeInCubic;exports.easeInExpo=r.easeInExpo;exports.easeInOutCubic=r.easeInOutCubic;exports.easeInOutExpo=r.easeInOutExpo;exports.easeInOutQuad=r.easeInOutQuad;exports.easeInOutQuart=r.easeInOutQuart;exports.easeInOutQuint=r.easeInOutQuint;exports.easeInQuad=r.easeInQuad;exports.easeInQuart=r.easeInQuart;exports.easeInQuint=r.easeInQuint;exports.easeOutCubic=r.easeOutCubic;exports.easeOutExpo=r.easeOutExpo;exports.easeOutQuad=r.easeOutQuad;exports.easeOutQuart=r.easeOutQuart;exports.easeOutQuint=r.easeOutQuint;exports.linear=r.linear;exports.dispatchSizeChangeEvent=T.dispatchSizeChangeEvent;exports.createJSONAndSave=D.createJSONAndSave;exports.debounce=h.debounce;exports.throttle=h.throttle;exports.getCumulativeOffsetLeft=p.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=p.getCumulativeOffsetTop;exports.getCumulativePosition=p.getCumulativePosition;exports.calculateDistance=u.calculateDistance;exports.calculateDistanceWithRadius=u.calculateDistanceWithRadius;exports.clamp=u.clamp;exports.damp=u.damp;exports.lerp=u.lerp;exports.mapRange=u.mapRange;exports.round=u.round;exports.smootherstep=u.smootherstep;exports.smoothstep=u.smoothstep;exports.step=u.step;exports.preciseNumber=g.preciseNumber;exports.roundNumberTo=g.roundNumberTo;exports.camelToKebab=o.camelToKebab;exports.capitalize=o.capitalize;exports.generateId=o.generateId;exports.kebabToCamel=o.kebabToCamel;exports.snakeToDotted=o.snakeToDotted;exports.toPascalCase=o.toPascalCase;exports.getElementTransitionDurationMS=O.getElementTransitionDurationMS;exports.getElementTransitionDurationS=O.getElementTransitionDurationS;exports.cloneDeep=C;exports.compareObjects=f;exports.cover=q;exports.decode=M;exports.dotCircleCollision=v;exports.dotRectCollision=k;exports.encode=z;exports.fixPosition=A;exports.getPointerPosition=B;exports.insert=P;exports.isNullish=w;exports.isObject=x;exports.measureText=S;exports.mergeDeep=I;exports.normalize=R;exports.omit=J;exports.pick=b;exports.screenToCartesian=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),f=require("../browser-CpzFX2xg.cjs"),p=require("../dom-qY2LdCVL.cjs"),n=require("../easings-DsS5-Kqc.cjs"),I=require("../events-Crwi8fz6.cjs"),y=require("../file-EevnUtRj.cjs"),g=require("../function-MthRj-GJ.cjs"),h=require("../layout-8ryRAMGJ.cjs"),u=require("../math-GDWEqu7y.cjs"),O=require("../number-yVpzMdbQ.cjs"),o=require("../object-C1ph624j.cjs"),r=require("../string-DzUwFYSS.cjs"),C=require("../style-At6aDoqG.cjs");function E(t,e,...i){return[...t.slice(0,e),...i,...t.slice(e)]}function w(t,e){const i=t.measureText(e),a=i.actualBoundingBoxAscent+i.actualBoundingBoxDescent,s=i.width;return{height:a,width:s}}function Q(t){return Math.floor(t)+.5}function S(t,e,i,a,s,l){let m=t/e,x=i/a,c=0,d=0;return s=typeof s=="undefined"?.5:s,l=typeof l=="undefined"?.5:l,m>x?(c=a,d=a*m):(d=i,c=i/m),[(i-d)*s,(a-c)*l,d,c]}function T(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function D(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function P(t,e,i=!1){let a=t.x-e.width/2,s=e.height/2-t.y;return i&&(a=a/(e.width/2),s=s/(e.height/2)),{x:a,y:s}}function q(t,e){const i=t.x/e.x,a=t.y/e.y;return{x:i,y:a}}function v(t,e){return e=e||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(t.x-e.x)/e.width*e.width,y:(t.y-e.y)/e.height*e.height}}function R(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function N(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}exports.parseAttribute=b.parseAttribute;exports.parseAttributeValue=b.parseAttributeValue;exports.isBrowser=f.isBrowser;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getElement=p.getElement;exports.easeInCubic=n.easeInCubic;exports.easeInExpo=n.easeInExpo;exports.easeInOutCubic=n.easeInOutCubic;exports.easeInOutExpo=n.easeInOutExpo;exports.easeInOutQuad=n.easeInOutQuad;exports.easeInOutQuart=n.easeInOutQuart;exports.easeInOutQuint=n.easeInOutQuint;exports.easeInQuad=n.easeInQuad;exports.easeInQuart=n.easeInQuart;exports.easeInQuint=n.easeInQuint;exports.easeOutCubic=n.easeOutCubic;exports.easeOutExpo=n.easeOutExpo;exports.easeOutQuad=n.easeOutQuad;exports.easeOutQuart=n.easeOutQuart;exports.easeOutQuint=n.easeOutQuint;exports.linear=n.linear;exports.dispatchSizeChangeEvent=I.dispatchSizeChangeEvent;exports.createJSONAndSave=y.createJSONAndSave;exports.debounce=g.debounce;exports.throttle=g.throttle;exports.getCumulativeOffsetLeft=h.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=h.getCumulativeOffsetTop;exports.getCumulativePosition=h.getCumulativePosition;exports.calculateDistance=u.calculateDistance;exports.calculateDistanceWithRadius=u.calculateDistanceWithRadius;exports.clamp=u.clamp;exports.damp=u.damp;exports.lerp=u.lerp;exports.mapRange=u.mapRange;exports.round=u.round;exports.smootherstep=u.smootherstep;exports.smoothstep=u.smoothstep;exports.step=u.step;exports.preciseNumber=O.preciseNumber;exports.roundNumberTo=O.roundNumberTo;exports.cloneDeep=o.cloneDeep;exports.compareObjects=o.compareObjects;exports.isESClass=o.isESClass;exports.isNullish=o.isNullish;exports.isObject=o.isObject;exports.mergeDeep=o.mergeDeep;exports.omit=o.omit;exports.pick=o.pick;exports.camelToKebab=r.camelToKebab;exports.capitalize=r.capitalize;exports.generateId=r.generateId;exports.kebabToCamel=r.kebabToCamel;exports.snakeToDotted=r.snakeToDotted;exports.toPascalCase=r.toPascalCase;exports.getElementTransitionDurationMS=C.getElementTransitionDurationMS;exports.getElementTransitionDurationS=C.getElementTransitionDurationS;exports.cover=S;exports.decode=N;exports.dotCircleCollision=D;exports.dotRectCollision=T;exports.encode=R;exports.fixPosition=Q;exports.getPointerPosition=v;exports.insert=E;exports.measureText=w;exports.normalize=q;exports.screenToCartesian=P;
@@ -13,7 +13,7 @@ export { debounce, throttle } from './function';
13
13
  export { getCumulativePosition, getCumulativeOffsetLeft, getCumulativeOffsetTop, } from './layout';
14
14
  export { lerp, damp, step, round, clamp, mapRange, smoothstep, smootherstep, calculateDistance, calculateDistanceWithRadius, } from './math';
15
15
  export { preciseNumber, roundNumberTo } from './number';
16
- export { isObject, cloneDeep, mergeDeep, isNullish, compareObjects, pick, omit, } from './object';
16
+ export { isObject, cloneDeep, mergeDeep, isNullish, compareObjects, pick, omit, isESClass, } from './object';
17
17
  export { kebabToCamel, camelToKebab, snakeToDotted, toPascalCase, capitalize, generateId, } from './string';
18
18
  export { getElementTransitionDurationMS, getElementTransitionDurationS, } from './style';
19
19
  export type { Axes2D, Axes3D, Dot2D, Rect2D, Circle, Dot3D, Rect3D, } from './ts-shape';