aptechka 0.4.30 → 0.4.32

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 (57) hide show
  1. package/lib/Damped-BJgyFENo.js +258 -0
  2. package/lib/Damped-CbWlWAbx.cjs +1 -0
  3. package/lib/animation/Animation.d.ts +42 -7
  4. package/lib/animation/AnimationLink.d.ts +13 -0
  5. package/lib/animation/Damped.d.ts +23 -28
  6. package/lib/animation/Tweened.d.ts +7 -19
  7. package/lib/animation/index.cjs +1 -1
  8. package/lib/animation/index.d.ts +2 -1
  9. package/lib/animation/index.js +43 -61
  10. package/lib/canvas/index.cjs +1 -1
  11. package/lib/canvas/index.d.ts +1 -1
  12. package/lib/canvas/index.js +35 -35
  13. package/lib/class-linked-status/index.cjs +1 -1
  14. package/lib/class-linked-status/index.d.ts +3 -1
  15. package/lib/class-linked-status/index.js +36 -37
  16. package/lib/controls/index.cjs +1 -1
  17. package/lib/controls/index.js +64 -64
  18. package/lib/css-property/index.cjs +1 -1
  19. package/lib/css-property/index.d.ts +5 -1
  20. package/lib/css-property/index.js +35 -31
  21. package/lib/en3/index.cjs +7 -7
  22. package/lib/en3/index.d.ts +1 -1
  23. package/lib/en3/index.js +264 -277
  24. package/lib/intersector/index.cjs +1 -1
  25. package/lib/intersector/index.js +8 -8
  26. package/lib/ladder/index.cjs +1 -1
  27. package/lib/ladder/index.d.ts +12 -6
  28. package/lib/ladder/index.js +119 -114
  29. package/lib/order/index.cjs +1 -1
  30. package/lib/order/index.d.ts +4 -3
  31. package/lib/order/index.js +1 -1
  32. package/lib/pointer/index.cjs +1 -1
  33. package/lib/pointer/index.js +2 -2
  34. package/lib/scroll/ScrollElement.d.ts +1 -3
  35. package/lib/scroll/ScrollSegmentElement.d.ts +6 -11
  36. package/lib/scroll/index.cjs +1 -1
  37. package/lib/scroll/index.d.ts +1 -1
  38. package/lib/scroll/index.js +497 -500
  39. package/lib/sequence/index.cjs +1 -1
  40. package/lib/sequence/index.d.ts +4 -2
  41. package/lib/sequence/index.js +129 -114
  42. package/lib/source/SourceElement.d.ts +14 -7
  43. package/lib/source/index.cjs +2 -2
  44. package/lib/source/index.d.ts +2 -2
  45. package/lib/source/index.js +66 -56
  46. package/lib/theme/index.cjs +1 -1
  47. package/lib/theme/index.d.ts +15 -0
  48. package/lib/theme/index.js +9 -6
  49. package/lib/ticker/index.cjs +1 -1
  50. package/lib/ticker/index.d.ts +3 -2
  51. package/lib/ticker/index.js +81 -71
  52. package/lib/video/index.cjs +1 -1
  53. package/lib/video/index.js +10 -10
  54. package/package.json +5 -5
  55. package/lib/Damped-B0G_t-pw.cjs +0 -1
  56. package/lib/Damped-DpaKIZqv.js +0 -150
  57. package/lib/en3/instances/en3LazyLoader.d.ts +0 -8
@@ -1,9 +1,9 @@
1
1
  import "../Store-Cd-E5W1z.js";
2
2
  import { i as e } from "../browser-0zX67oeU.js";
3
3
  import "../path-data-polyfill-DgeDWYeI.js";
4
- import { aD as r } from "../tags-BoPv9fDr.js";
5
- import { c as o } from "../createTheme-u3NsrEV6.js";
6
- const a = o(
4
+ import { aD as t } from "../tags-BoPv9fDr.js";
5
+ import { c as r } from "../createTheme-u3NsrEV6.js";
6
+ const i = r(
7
7
  {
8
8
  colorDark: "#1c1c1c",
9
9
  colorDarkAux: "#282828",
@@ -12,6 +12,9 @@ const a = o(
12
12
  tweakerWidth: "500px",
13
13
  tweakerOffset: "20px",
14
14
  tweakerFolderHeight: "40px",
15
+ timelineWidth: "50vw",
16
+ timelineHeight: "30vh",
17
+ timelineOffset: "20px",
15
18
  heightInput: "30px",
16
19
  borderRadius: "12px",
17
20
  borderRadiusSmall: "4px",
@@ -27,10 +30,10 @@ const a = o(
27
30
  { prefix: "aptechka-" }
28
31
  );
29
32
  e && document.head.appendChild(
30
- r({
31
- ":root": a.style
33
+ t({
34
+ ":root": i.style
32
35
  }).node
33
36
  );
34
37
  export {
35
- a as aptechkaTheme
38
+ i as aptechkaTheme
36
39
  };
@@ -1 +1 @@
1
- "use strict";var L=(h,s,e)=>{if(!s.has(h))throw TypeError("Cannot "+e)};var i=(h,s,e)=>(L(h,s,"read from private field"),e?e.call(h):s.get(h)),r=(h,s,e)=>{if(s.has(h))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(h):s.set(h,e)},t=(h,s,e,n)=>(L(h,s,"write to private field"),n?n.call(h,e):s.set(h,e),e);var q=(h,s,e)=>(L(h,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../intersector/index.cjs"),S=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var f,l,y,b,m,u,o,k;class V{constructor(s,e){r(this,f,void 0);r(this,l,void 0);r(this,y,void 0);r(this,b,0);r(this,m,0);r(this,u,0);r(this,o,!1);r(this,k,s=>{t(this,o,s.isIntersecting)});t(this,f,s),t(this,l,e==null?void 0:e.maxFPS),t(this,y,(e==null?void 0:e.order)||0),e!=null&&e.culling&&S.isBrowser?B.intersector.subscribe(e.culling,i(this,k)):t(this,o,!0)}get callback(){return i(this,f)}get order(){return i(this,y)}sync(s){t(this,b,s-i(this,u))}tick(s){if(t(this,u,Math.max(0,s-i(this,b))),i(this,m)||t(this,m,s),i(this,l))if(i(this,u)>=1e3/i(this,l))t(this,b,s-i(this,u)%i(this,l));else return;else t(this,b,s);i(this,o)&&i(this,f).call(this,{elapsed:i(this,u),timestamp:s,startTimestamp:i(this,m)})}destroy(){B.intersector.unsubscribe(i(this,k))}}f=new WeakMap,l=new WeakMap,y=new WeakMap,b=new WeakMap,m=new WeakMap,u=new WeakMap,o=new WeakMap,k=new WeakMap;var F,d,a,g,c,A,P,T,x,v,w;class E{constructor(){r(this,A);r(this,T);r(this,F,0);r(this,d,0);r(this,a,void 0);r(this,g,!1);r(this,c,[]);r(this,v,s=>{if(i(this,g)){t(this,g,!1),t(this,F,s-i(this,d));for(const e of i(this,c))e.sync(i(this,d))}t(this,a,requestAnimationFrame(i(this,v))),t(this,d,s-i(this,F));for(const e of i(this,c))e.tick(i(this,d))});r(this,w,()=>{document.hidden&&t(this,g,!0)});S.isBrowser&&document.addEventListener("visibilitychange",i(this,w))}subscribe(s,e){if(!i(this,c).find(n=>n.callback===s)){const n=new V(s,e);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((I,M)=>I.order-M.order))}return q(this,A,P).call(this),()=>this.unsubscribe(s)}unsubscribe(s){const e=i(this,c).filter(n=>n.callback===s);e.length&&(e.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==s)),i(this,c).length||q(this,T,x).call(this))}destroy(){S.isBrowser&&(q(this,T,x).call(this),document.removeEventListener("visibilitychange",i(this,w)))}}F=new WeakMap,d=new WeakMap,a=new WeakMap,g=new WeakMap,c=new WeakMap,A=new WeakSet,P=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,v)))},T=new WeakSet,x=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},v=new WeakMap,w=new WeakMap;const j=new E;exports.Ticker=E;exports.ticker=j;
1
+ "use strict";var B=(h,e,s)=>{if(!e.has(h))throw TypeError("Cannot "+s)};var i=(h,e,s)=>(B(h,e,"read from private field"),s?s.call(h):e.get(h)),r=(h,e,s)=>{if(e.has(h))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(h):e.set(h,s)},t=(h,e,s,n)=>(B(h,e,"write to private field"),n?n.call(h,s):e.set(h,s),s);var S=(h,e,s)=>(B(h,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../browser-CpzFX2xg.cjs"),M=require("../dom-JBOkFLTh.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var d,l,F,b,m,u,o,g,q;class V{constructor(e,s){r(this,d,void 0);r(this,l,void 0);r(this,F,void 0);r(this,b,0);r(this,m,0);r(this,u,0);r(this,o,!1);r(this,g,null);r(this,q,e=>{const s=e[0];t(this,o,s.isIntersecting)});if(t(this,d,e),t(this,l,s==null?void 0:s.maxFPS),t(this,F,(s==null?void 0:s.order)||0),s!=null&&s.culling&&E.isBrowser){const n=M.getElement(s.culling);n&&(t(this,g,new IntersectionObserver(i(this,q))),i(this,g).observe(n))}else t(this,o,!0)}get callback(){return i(this,d)}get order(){return i(this,F)}sync(e){t(this,b,e-i(this,u))}tick(e){if(t(this,u,Math.max(0,e-i(this,b))),i(this,m)||t(this,m,e),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,o)&&i(this,d).call(this,{timeBetweenFrames:i(this,u),timestamp:e,subscribeTimestamp:i(this,m),timeElapsedSinceSubscription:e-i(this,m)})}destroy(){var e;(e=i(this,g))==null||e.disconnect()}}d=new WeakMap,l=new WeakMap,F=new WeakMap,b=new WeakMap,m=new WeakMap,u=new WeakMap,o=new WeakMap,g=new WeakMap,q=new WeakMap;var v,f,a,y,c,A,I,w,L,k,T;class x{constructor(){r(this,A);r(this,w);r(this,v,0);r(this,f,0);r(this,a,void 0);r(this,y,!1);r(this,c,[]);r(this,k,e=>{if(i(this,y)){t(this,y,!1),t(this,v,e-i(this,f));for(const s of i(this,c))s.sync(i(this,f))}t(this,a,requestAnimationFrame(i(this,k))),t(this,f,e-i(this,v));for(const s of i(this,c))s.tick(i(this,f))});r(this,T,()=>{document.hidden&&t(this,y,!0)});E.isBrowser&&document.addEventListener("visibilitychange",i(this,T))}subscribe(e,s){if(!i(this,c).find(n=>n.callback===e)){const n=new V(e,s);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((O,P)=>O.order-P.order))}return S(this,A,I).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||S(this,w,L).call(this))}destroy(){E.isBrowser&&(S(this,w,L).call(this),document.removeEventListener("visibilitychange",i(this,T)))}}v=new WeakMap,f=new WeakMap,a=new WeakMap,y=new WeakMap,c=new WeakMap,A=new WeakSet,I=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,k)))},w=new WeakSet,L=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},k=new WeakMap,T=new WeakMap;const j=new x;exports.Ticker=x;exports.ticker=j;
@@ -2,8 +2,9 @@ import { ElementOrSelector } from '../utils';
2
2
 
3
3
  export interface TickerCallbackEntry {
4
4
  timestamp: number;
5
- elapsed: number;
6
- startTimestamp: number;
5
+ subscribeTimestamp: number;
6
+ timeBetweenFrames: number;
7
+ timeElapsedSinceSubscription: number;
7
8
  }
8
9
  export type TickerCallback = (entry: TickerCallbackEntry) => void;
9
10
  export interface TickerAddOptions {
@@ -1,114 +1,124 @@
1
- var x = (h, s, t) => {
2
- if (!s.has(h))
3
- throw TypeError("Cannot " + t);
1
+ var S = (h, i, s) => {
2
+ if (!i.has(h))
3
+ throw TypeError("Cannot " + s);
4
4
  };
5
- var i = (h, s, t) => (x(h, s, "read from private field"), t ? t.call(h) : s.get(h)), r = (h, s, t) => {
6
- if (s.has(h))
5
+ var e = (h, i, s) => (S(h, i, "read from private field"), s ? s.call(h) : i.get(h)), r = (h, i, s) => {
6
+ if (i.has(h))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- s instanceof WeakSet ? s.add(h) : s.set(h, t);
9
- }, e = (h, s, t, n) => (x(h, s, "write to private field"), n ? n.call(h, t) : s.set(h, t), t);
10
- var L = (h, s, t) => (x(h, s, "access private method"), t);
11
- import { intersector as S } from "../intersector/index.js";
12
- import { i as q } from "../browser-0zX67oeU.js";
8
+ i instanceof WeakSet ? i.add(h) : i.set(h, s);
9
+ }, t = (h, i, s, n) => (S(h, i, "write to private field"), n ? n.call(h, s) : i.set(h, s), s);
10
+ var A = (h, i, s) => (S(h, i, "access private method"), s);
11
+ import { i as x } from "../browser-0zX67oeU.js";
12
+ import { g as P } from "../dom-0S_WDL4g.js";
13
13
  import "../path-data-polyfill-DgeDWYeI.js";
14
- var b, u, y, f, d, l, o, F;
15
- class B {
16
- constructor(s, t) {
17
- r(this, b, void 0);
18
- r(this, u, void 0);
14
+ var d, m, y, u, b, l, o, g, E;
15
+ class V {
16
+ constructor(i, s) {
17
+ r(this, d, void 0);
18
+ r(this, m, void 0);
19
19
  r(this, y, void 0);
20
- r(this, f, 0);
21
- r(this, d, 0);
20
+ r(this, u, 0);
21
+ r(this, b, 0);
22
22
  r(this, l, 0);
23
23
  r(this, o, !1);
24
- r(this, F, (s) => {
25
- e(this, o, s.isIntersecting);
24
+ r(this, g, null);
25
+ r(this, E, (i) => {
26
+ const s = i[0];
27
+ t(this, o, s.isIntersecting);
26
28
  });
27
- e(this, b, s), e(this, u, t == null ? void 0 : t.maxFPS), e(this, y, (t == null ? void 0 : t.order) || 0), t != null && t.culling && q ? S.subscribe(t.culling, i(this, F)) : e(this, o, !0);
29
+ if (t(this, d, i), t(this, m, s == null ? void 0 : s.maxFPS), t(this, y, (s == null ? void 0 : s.order) || 0), s != null && s.culling && x) {
30
+ const n = P(s.culling);
31
+ n && (t(this, g, new IntersectionObserver(
32
+ e(this, E)
33
+ )), e(this, g).observe(n));
34
+ } else
35
+ t(this, o, !0);
28
36
  }
29
37
  get callback() {
30
- return i(this, b);
38
+ return e(this, d);
31
39
  }
32
40
  get order() {
33
- return i(this, y);
41
+ return e(this, y);
34
42
  }
35
- sync(s) {
36
- e(this, f, s - i(this, l));
43
+ sync(i) {
44
+ t(this, u, i - e(this, l));
37
45
  }
38
- tick(s) {
39
- if (e(this, l, Math.max(0, s - i(this, f))), i(this, d) || e(this, d, s), i(this, u))
40
- if (i(this, l) >= 1e3 / i(this, u))
41
- e(this, f, s - i(this, l) % i(this, u));
46
+ tick(i) {
47
+ if (t(this, l, Math.max(0, i - e(this, u))), e(this, b) || t(this, b, i), e(this, m))
48
+ if (e(this, l) >= 1e3 / e(this, m))
49
+ t(this, u, i - e(this, l) % e(this, m));
42
50
  else
43
51
  return;
44
52
  else
45
- e(this, f, s);
46
- i(this, o) && i(this, b).call(this, {
47
- elapsed: i(this, l),
48
- timestamp: s,
49
- startTimestamp: i(this, d)
53
+ t(this, u, i);
54
+ e(this, o) && e(this, d).call(this, {
55
+ timeBetweenFrames: e(this, l),
56
+ timestamp: i,
57
+ subscribeTimestamp: e(this, b),
58
+ timeElapsedSinceSubscription: i - e(this, b)
50
59
  });
51
60
  }
52
61
  destroy() {
53
- S.unsubscribe(i(this, F));
62
+ var i;
63
+ (i = e(this, g)) == null || i.disconnect();
54
64
  }
55
65
  }
56
- b = new WeakMap(), u = new WeakMap(), y = new WeakMap(), f = new WeakMap(), d = new WeakMap(), l = new WeakMap(), o = new WeakMap(), F = new WeakMap();
57
- var k, m, a, g, c, w, I, v, E, T, A;
66
+ d = new WeakMap(), m = new WeakMap(), y = new WeakMap(), u = new WeakMap(), b = new WeakMap(), l = new WeakMap(), o = new WeakMap(), g = new WeakMap(), E = new WeakMap();
67
+ var v, f, a, F, c, L, B, k, q, w, T;
58
68
  class C {
59
69
  constructor() {
60
- r(this, w);
61
- r(this, v);
62
- r(this, k, 0);
63
- r(this, m, 0);
70
+ r(this, L);
71
+ r(this, k);
72
+ r(this, v, 0);
73
+ r(this, f, 0);
64
74
  r(this, a, void 0);
65
- r(this, g, !1);
75
+ r(this, F, !1);
66
76
  r(this, c, []);
67
- r(this, T, (s) => {
68
- if (i(this, g)) {
69
- e(this, g, !1), e(this, k, s - i(this, m));
70
- for (const t of i(this, c))
71
- t.sync(i(this, m));
77
+ r(this, w, (i) => {
78
+ if (e(this, F)) {
79
+ t(this, F, !1), t(this, v, i - e(this, f));
80
+ for (const s of e(this, c))
81
+ s.sync(e(this, f));
72
82
  }
73
- e(this, a, requestAnimationFrame(i(this, T))), e(this, m, s - i(this, k));
74
- for (const t of i(this, c))
75
- t.tick(i(this, m));
83
+ t(this, a, requestAnimationFrame(e(this, w))), t(this, f, i - e(this, v));
84
+ for (const s of e(this, c))
85
+ s.tick(e(this, f));
76
86
  });
77
- r(this, A, () => {
78
- document.hidden && e(this, g, !0);
87
+ r(this, T, () => {
88
+ document.hidden && t(this, F, !0);
79
89
  });
80
- q && document.addEventListener(
90
+ x && document.addEventListener(
81
91
  "visibilitychange",
82
- i(this, A)
92
+ e(this, T)
83
93
  );
84
94
  }
85
- subscribe(s, t) {
86
- if (!i(this, c).find((n) => n.callback === s)) {
87
- const n = new B(s, t);
88
- n.sync(performance.now()), i(this, c).push(n), e(this, c, i(this, c).sort((P, V) => P.order - V.order));
95
+ subscribe(i, s) {
96
+ if (!e(this, c).find((n) => n.callback === i)) {
97
+ const n = new V(i, s);
98
+ n.sync(performance.now()), e(this, c).push(n), t(this, c, e(this, c).sort((I, O) => I.order - O.order));
89
99
  }
90
- return L(this, w, I).call(this), () => this.unsubscribe(s);
100
+ return A(this, L, B).call(this), () => this.unsubscribe(i);
91
101
  }
92
- unsubscribe(s) {
93
- const t = i(this, c).filter(
94
- (n) => n.callback === s
102
+ unsubscribe(i) {
103
+ const s = e(this, c).filter(
104
+ (n) => n.callback === i
95
105
  );
96
- t.length && (t.forEach((n) => n.destroy()), e(this, c, i(this, c).filter(
97
- (n) => n.callback !== s
98
- )), i(this, c).length || L(this, v, E).call(this));
106
+ s.length && (s.forEach((n) => n.destroy()), t(this, c, e(this, c).filter(
107
+ (n) => n.callback !== i
108
+ )), e(this, c).length || A(this, k, q).call(this));
99
109
  }
100
110
  destroy() {
101
- q && (L(this, v, E).call(this), document.removeEventListener(
111
+ x && (A(this, k, q).call(this), document.removeEventListener(
102
112
  "visibilitychange",
103
- i(this, A)
113
+ e(this, T)
104
114
  ));
105
115
  }
106
116
  }
107
- k = new WeakMap(), m = new WeakMap(), a = new WeakMap(), g = new WeakMap(), c = new WeakMap(), w = new WeakSet(), I = function() {
108
- i(this, c).length && !i(this, a) && e(this, a, requestAnimationFrame(i(this, T)));
109
- }, v = new WeakSet(), E = function() {
110
- i(this, a) && (cancelAnimationFrame(i(this, a)), e(this, a, void 0));
111
- }, T = new WeakMap(), A = new WeakMap();
117
+ v = new WeakMap(), f = new WeakMap(), a = new WeakMap(), F = new WeakMap(), c = new WeakMap(), L = new WeakSet(), B = function() {
118
+ e(this, c).length && !e(this, a) && t(this, a, requestAnimationFrame(e(this, w)));
119
+ }, k = new WeakSet(), q = function() {
120
+ e(this, a) && (cancelAnimationFrame(e(this, a)), t(this, a, void 0));
121
+ }, w = new WeakMap(), T = new WeakMap();
112
122
  const z = new C();
113
123
  export {
114
124
  C as Ticker,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-BQGNOHlY.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,m=(s,t,n,r)=>{for(var e=r>1?void 0:r?a(t,n):t,i=s.length-1,u;i>=0;i--)(u=s[i])&&(e=(r?u(t,n,e):u(e))||e);return r&&e&&l(t,n,e),e};exports.VideoElement=class extends o.SourceElement{connectedCallback(){super.connectedCallback(),this.captureEvent.subscribe(()=>{this.hasAttribute("e-autoplay")&&this.consumerElement.play()}),this.releaseEvent.subscribe(()=>{this.hasAttribute("e-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0))})}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}};exports.VideoElement=m([c.define("e-video")],exports.VideoElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-BQGNOHlY.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,m=(s,t,n,r)=>{for(var e=r>1?void 0:r?a(t,n):t,i=s.length-1,u;i>=0;i--)(u=s[i])&&(e=(r?u(t,n,e):u(e))||e);return r&&e&&l(t,n,e),e};exports.VideoElement=class extends o.SourceElement{connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0))})}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}};exports.VideoElement=m([c.define("e-video")],exports.VideoElement);
@@ -2,18 +2,18 @@ import { define as u } from "../custom-element/index.js";
2
2
  import "../window-resizer/index.js";
3
3
  import "../Store-Cd-E5W1z.js";
4
4
  import "../path-data-polyfill-DgeDWYeI.js";
5
- import { SourceElement as m } from "../source/index.js";
6
- var l = Object.defineProperty, a = Object.getOwnPropertyDescriptor, p = (t, r, i, s) => {
7
- for (var e = s > 1 ? void 0 : s ? a(r, i) : r, n = t.length - 1, o; n >= 0; n--)
8
- (o = t[n]) && (e = (s ? o(r, i, e) : o(e)) || e);
9
- return s && e && l(r, i, e), e;
5
+ import { SourceElement as a } from "../source/index.js";
6
+ var m = Object.defineProperty, l = Object.getOwnPropertyDescriptor, p = (t, r, n, s) => {
7
+ for (var e = s > 1 ? void 0 : s ? l(r, n) : r, o = t.length - 1, i; o >= 0; o--)
8
+ (i = t[o]) && (e = (s ? i(r, n, e) : i(e)) || e);
9
+ return s && e && m(r, n, e), e;
10
10
  };
11
- let c = class extends m {
11
+ let c = class extends a {
12
12
  connectedCallback() {
13
- super.connectedCallback(), this.captureEvent.subscribe(() => {
14
- this.hasAttribute("e-autoplay") && this.consumerElement.play();
15
- }), this.releaseEvent.subscribe(() => {
16
- this.hasAttribute("e-autoplay") && (this.consumerElement.pause(), this.hasAttribute("replay") && (this.consumerElement.currentTime = 0));
13
+ super.connectedCallback(), this.addEventListener("sourceCapture", () => {
14
+ this.hasAttribute("capture-autoplay") && this.consumerElement.play();
15
+ }), this.addEventListener("sourceRelease", () => {
16
+ this.hasAttribute("capture-autoplay") && (this.consumerElement.pause(), this.hasAttribute("replay") && (this.consumerElement.currentTime = 0));
17
17
  });
18
18
  }
19
19
  createConsumer() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.4.30",
3
+ "version": "0.4.32",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -218,10 +218,10 @@
218
218
  "default": "./lib/ticker/index.js",
219
219
  "types": "./lib/ticker/index.d.ts"
220
220
  },
221
- "./twekaer": {
222
- "require": "./lib/twekaer/index.cjs",
223
- "default": "./lib/twekaer/index.js",
224
- "types": "./lib/twekaer/index.d.ts"
221
+ "./tweaker": {
222
+ "require": "./lib/tweaker/index.cjs",
223
+ "default": "./lib/tweaker/index.js",
224
+ "types": "./lib/tweaker/index.d.ts"
225
225
  },
226
226
  "./utils": {
227
227
  "require": "./lib/utils/index.cjs",
@@ -1 +0,0 @@
1
- "use strict";var L=Object.defineProperty,_=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var k=(e,i,t)=>i in e?L(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,N=(e,i)=>{for(var t in i||(i={}))z.call(i,t)&&k(e,t,i[t]);if(O)for(var t of O(i))B.call(i,t)&&k(e,t,i[t]);return e},P=(e,i)=>_(e,j(i));var v=(e,i,t)=>{if(!i.has(e))throw TypeError("Cannot "+t)};var s=(e,i,t)=>(v(e,i,"read from private field"),t?t.call(e):i.get(e)),a=(e,i,t)=>{if(i.has(e))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(e):i.set(e,t)},r=(e,i,t,h)=>(v(e,i,"write to private field"),h?h.call(e,t):i.set(e,t),t);const D=require("./math-GDWEqu7y.cjs"),S=require("./number-yVpzMdbQ.cjs"),c=require("./polyfills-CrcS4RcO.cjs");require("./path-data-polyfill-CXsOR7Oc.cjs");const I=require("./Store-BQGNOHlY.cjs"),M=require("./ticker/index.cjs");var d,f,F,m,C;class R extends I.Store{constructor(t){super(t||0);a(this,d,void 0);a(this,f,void 0);a(this,F,void 0);a(this,m,new I.Store(!1));a(this,C,t=>{this.handleAnimationFrame(t)})}get isRunning(){return s(this,m)}reset(){this.unlistenAnimationFrame(),super.reset()}close(){super.close(),this.unlistenAnimationFrame()}listenAnimationFrame(){s(this,m).current||(s(this,m).current=!0,M.ticker.subscribe(s(this,C),{maxFPS:s(this,d),order:s(this,f),culling:s(this,F)}))}unlistenAnimationFrame(){s(this,m).current&&(s(this,m).current=!1,M.ticker.unsubscribe(s(this,C)))}updateOptions(t){r(this,d,c.nullishCoalescing(t==null?void 0:t.maxFPS,s(this,d))),r(this,f,c.nullishCoalescing(t==null?void 0:t.order,s(this,f))),r(this,F,c.nullishCoalescing(t==null?void 0:t.culling,s(this,F)))}}d=new WeakMap,f=new WeakMap,F=new WeakMap,m=new WeakMap,C=new WeakMap;var n,A,u,l,g,x,b;class E extends R{constructor(t,h){super(t||0);a(this,n,void 0);a(this,A,void 0);a(this,u,void 0);a(this,l,void 0);a(this,g,void 0);a(this,x,void 0);a(this,b,void 0);this.damping=20,this.stiffness=0,this.mass=0,r(this,n,0),r(this,A,0),r(this,u,0),r(this,l,0),r(this,g,0),r(this,x,0),r(this,b,()=>{this.set(s(this,n),!0)}),r(this,u,c.nullishCoalescing(h==null?void 0:h.min,-1/0)),r(this,l,c.nullishCoalescing(h==null?void 0:h.max,1/0)),r(this,n,this.current),this.updateOptions(h),this.listenAnimationFrame()}get target(){return s(this,n)}get direction(){return s(this,A)}get min(){return s(this,u)}set min(t){r(this,u,t),s(this,b).call(this)}get max(){return s(this,l)}set max(t){r(this,l,t),s(this,b).call(this)}get velocity(){return s(this,g)}get speed(){return s(this,x)}get length(){return s(this,l)-s(this,u)}get progress(){return this.length?S.preciseNumber((this.current-s(this,u))/this.length,6):0}get entry(){return P(N({},super.entry),{min:s(this,u),max:s(this,l),length:this.length,direction:this.direction,progress:this.progress})}set(t,h=!1){const y=s(this,n);r(this,n,D.clamp(t,s(this,u),s(this,l))),h&&(this.current=s(this,n)),s(this,n)!==y&&(r(this,A,Math.sign(t-s(this,n))||1),this.listenAnimationFrame())}shift(t,h=!1){this.set(s(this,n)+t,h)}reset(){this.set(this.initial,!0),super.reset()}listenAnimationFrame(){this.current!==this.target&&super.listenAnimationFrame()}updateOptions(t){super.updateOptions(t),this.damping=c.nullishCoalescing(t==null?void 0:t.damping,this.damping),this.mass=c.nullishCoalescing(t==null?void 0:t.mass,this.mass),this.stiffness=c.nullishCoalescing(t==null?void 0:t.stiffness,this.stiffness)}handleAnimationFrame(t){S.preciseNumber(this.current,4)===S.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target);const h=this.current,y=Math.abs(h-this.target);r(this,x,y/t.elapsed);const q=t.elapsed/1e3;if(this.mass||this.stiffness){const w=(s(this,n)-this.current)*this.stiffness-s(this,g)*this.damping;r(this,g,s(this,g)+w/this.mass*q),this.current+=s(this,g)*q}else this.current=D.damp(this.current,this.target,this.damping,q)}}n=new WeakMap,A=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,x=new WeakMap,b=new WeakMap;exports.Animation=R;exports.Damped=E;
@@ -1,150 +0,0 @@
1
- var w = Object.defineProperty, L = Object.defineProperties;
2
- var N = Object.getOwnPropertyDescriptors;
3
- var P = Object.getOwnPropertySymbols;
4
- var j = Object.prototype.hasOwnProperty, q = Object.prototype.propertyIsEnumerable;
5
- var v = (e, i, t) => i in e ? w(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, C = (e, i) => {
6
- for (var t in i || (i = {}))
7
- j.call(i, t) && v(e, t, i[t]);
8
- if (P)
9
- for (var t of P(i))
10
- q.call(i, t) && v(e, t, i[t]);
11
- return e;
12
- }, D = (e, i) => L(e, N(i));
13
- var I = (e, i, t) => {
14
- if (!i.has(e))
15
- throw TypeError("Cannot " + t);
16
- };
17
- var s = (e, i, t) => (I(e, i, "read from private field"), t ? t.call(e) : i.get(e)), a = (e, i, t) => {
18
- if (i.has(e))
19
- throw TypeError("Cannot add the same private member more than once");
20
- i instanceof WeakSet ? i.add(e) : i.set(e, t);
21
- }, r = (e, i, t, h) => (I(e, i, "write to private field"), h ? h.call(e, t) : i.set(e, t), t);
22
- import { c as z, d as B } from "./math-BOBiC4TN.js";
23
- import { p } from "./number-Bo5RdrA1.js";
24
- import { n as c } from "./polyfills-DJUYczFm.js";
25
- import "./path-data-polyfill-DgeDWYeI.js";
26
- import { S as M } from "./Store-Cd-E5W1z.js";
27
- import { ticker as R } from "./ticker/index.js";
28
- var f, d, F, l, y;
29
- class E extends M {
30
- constructor(t) {
31
- super(t || 0);
32
- a(this, f, void 0);
33
- a(this, d, void 0);
34
- a(this, F, void 0);
35
- a(this, l, new M(!1));
36
- a(this, y, (t) => {
37
- this.handleAnimationFrame(t);
38
- });
39
- }
40
- get isRunning() {
41
- return s(this, l);
42
- }
43
- reset() {
44
- this.unlistenAnimationFrame(), super.reset();
45
- }
46
- close() {
47
- super.close(), this.unlistenAnimationFrame();
48
- }
49
- listenAnimationFrame() {
50
- s(this, l).current || (s(this, l).current = !0, R.subscribe(s(this, y), {
51
- maxFPS: s(this, f),
52
- order: s(this, d),
53
- culling: s(this, F)
54
- }));
55
- }
56
- unlistenAnimationFrame() {
57
- s(this, l).current && (s(this, l).current = !1, R.unsubscribe(s(this, y)));
58
- }
59
- updateOptions(t) {
60
- r(this, f, c(t == null ? void 0 : t.maxFPS, s(this, f))), r(this, d, c(t == null ? void 0 : t.order, s(this, d))), r(this, F, c(t == null ? void 0 : t.culling, s(this, F)));
61
- }
62
- }
63
- f = new WeakMap(), d = new WeakMap(), F = new WeakMap(), l = new WeakMap(), y = new WeakMap();
64
- var n, A, m, u, g, x, b;
65
- class V extends E {
66
- constructor(t, h) {
67
- super(t || 0);
68
- a(this, n, void 0);
69
- a(this, A, void 0);
70
- a(this, m, void 0);
71
- a(this, u, void 0);
72
- a(this, g, void 0);
73
- a(this, x, void 0);
74
- a(this, b, void 0);
75
- this.damping = 20, this.stiffness = 0, this.mass = 0, r(this, n, 0), r(this, A, 0), r(this, m, 0), r(this, u, 0), r(this, g, 0), r(this, x, 0), r(this, b, () => {
76
- this.set(s(this, n), !0);
77
- }), r(this, m, c(h == null ? void 0 : h.min, -1 / 0)), r(this, u, c(h == null ? void 0 : h.max, 1 / 0)), r(this, n, this.current), this.updateOptions(h), this.listenAnimationFrame();
78
- }
79
- get target() {
80
- return s(this, n);
81
- }
82
- get direction() {
83
- return s(this, A);
84
- }
85
- get min() {
86
- return s(this, m);
87
- }
88
- set min(t) {
89
- r(this, m, t), s(this, b).call(this);
90
- }
91
- get max() {
92
- return s(this, u);
93
- }
94
- set max(t) {
95
- r(this, u, t), s(this, b).call(this);
96
- }
97
- get velocity() {
98
- return s(this, g);
99
- }
100
- get speed() {
101
- return s(this, x);
102
- }
103
- get length() {
104
- return s(this, u) - s(this, m);
105
- }
106
- get progress() {
107
- return this.length ? p((this.current - s(this, m)) / this.length, 6) : 0;
108
- }
109
- get entry() {
110
- return D(C({}, super.entry), {
111
- min: s(this, m),
112
- max: s(this, u),
113
- length: this.length,
114
- direction: this.direction,
115
- progress: this.progress
116
- });
117
- }
118
- set(t, h = !1) {
119
- const S = s(this, n);
120
- r(this, n, z(t, s(this, m), s(this, u))), h && (this.current = s(this, n)), s(this, n) !== S && (r(this, A, Math.sign(t - s(this, n)) || 1), this.listenAnimationFrame());
121
- }
122
- shift(t, h = !1) {
123
- this.set(s(this, n) + t, h);
124
- }
125
- reset() {
126
- this.set(this.initial, !0), super.reset();
127
- }
128
- listenAnimationFrame() {
129
- this.current !== this.target && super.listenAnimationFrame();
130
- }
131
- updateOptions(t) {
132
- super.updateOptions(t), this.damping = c(t == null ? void 0 : t.damping, this.damping), this.mass = c(t == null ? void 0 : t.mass, this.mass), this.stiffness = c(t == null ? void 0 : t.stiffness, this.stiffness);
133
- }
134
- handleAnimationFrame(t) {
135
- p(this.current, 4) === p(this.target, 4) && (this.unlistenAnimationFrame(), this.current = this.target);
136
- const h = this.current, S = Math.abs(h - this.target);
137
- r(this, x, S / t.elapsed);
138
- const O = t.elapsed / 1e3;
139
- if (this.mass || this.stiffness) {
140
- const k = (s(this, n) - this.current) * this.stiffness - s(this, g) * this.damping;
141
- r(this, g, s(this, g) + k / this.mass * O), this.current += s(this, g) * O;
142
- } else
143
- this.current = B(this.current, this.target, this.damping, O);
144
- }
145
- }
146
- n = new WeakMap(), A = new WeakMap(), m = new WeakMap(), u = new WeakMap(), g = new WeakMap(), x = new WeakMap(), b = new WeakMap();
147
- export {
148
- E as A,
149
- V as D
150
- };
@@ -1,8 +0,0 @@
1
- import { En3SourceConsumer } from '../objects/En3SourceConsumer';
2
- import { ElementOrSelector } from '../../utils';
3
-
4
- declare class En3LazyLoader {
5
- add(consumer: En3SourceConsumer<any>, element: ElementOrSelector): (() => void) | undefined;
6
- }
7
- export declare const en3LazyLoader: En3LazyLoader;
8
- export {};