aptechka 0.4.19 → 0.4.21

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 (41) hide show
  1. package/lib/Damped-B0G_t-pw.cjs +1 -0
  2. package/lib/{Damped-ChjjwnrU.js → Damped-DpaKIZqv.js} +1 -1
  3. package/lib/accordion/index.js +9 -9
  4. package/lib/animation/index.cjs +1 -1
  5. package/lib/animation/index.js +2 -2
  6. package/lib/canvas/index.cjs +1 -1
  7. package/lib/canvas/index.d.ts +2 -0
  8. package/lib/canvas/index.js +63 -48
  9. package/lib/canvas-CU5Xjahf.cjs +1 -0
  10. package/lib/canvas-DeZ0SLUJ.js +34 -0
  11. package/lib/class-linked-status/index.cjs +1 -0
  12. package/lib/class-linked-status/index.d.ts +10 -0
  13. package/lib/class-linked-status/index.js +51 -0
  14. package/lib/coordinates-CgdGoSYs.js +24 -0
  15. package/lib/coordinates-D8Np3cPD.cjs +1 -0
  16. package/lib/{index-Fasue6kv.js → index-DTe0hK7c.js} +28 -28
  17. package/lib/pointer/Pointer.d.ts +21 -0
  18. package/lib/pointer/PointerElement.d.ts +13 -0
  19. package/lib/pointer/index.cjs +1 -0
  20. package/lib/pointer/index.d.ts +2 -0
  21. package/lib/pointer/index.js +130 -0
  22. package/lib/popover/PopoverButtonElement.d.ts +1 -0
  23. package/lib/popover/PopoverElement.d.ts +6 -0
  24. package/lib/popover/index.cjs +1 -1
  25. package/lib/popover/index.js +116 -77
  26. package/lib/scroll/index.cjs +1 -1
  27. package/lib/scroll/index.js +1 -1
  28. package/lib/select/index.js +1 -1
  29. package/lib/sequence/index.cjs +1 -0
  30. package/lib/sequence/index.d.ts +19 -0
  31. package/lib/sequence/index.js +151 -0
  32. package/lib/{style-j2TwriJ_.js → style-CklEF62D.js} +2 -2
  33. package/lib/tweaker/index.js +1 -1
  34. package/lib/utils/canvas.d.ts +1 -0
  35. package/lib/utils/coordinates.d.ts +2 -2
  36. package/lib/utils/index.cjs +1 -1
  37. package/lib/utils/index.d.ts +24 -24
  38. package/lib/utils/index.js +133 -168
  39. package/lib/utils/ts-shape.d.ts +2 -1
  40. package/package.json +25 -1
  41. package/lib/Damped-CbT5qqTP.cjs +0 -1
@@ -0,0 +1 @@
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;
@@ -72,7 +72,7 @@ class V extends E {
72
72
  a(this, g, void 0);
73
73
  a(this, x, void 0);
74
74
  a(this, b, void 0);
75
- this.damping = 1, 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, () => {
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
76
  this.set(s(this, n), !0);
77
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
78
  }
@@ -12,12 +12,12 @@ import { CustomElement as J, define as K } from "../custom-element/index.js";
12
12
  import { Attribute as B } from "../attribute/index.js";
13
13
  import { i as Q } from "../browser-0zX67oeU.js";
14
14
  import { d as U } from "../events-_C2CztxR.js";
15
- import { g as V } from "../style-j2TwriJ_.js";
15
+ import { a as V } from "../style-CklEF62D.js";
16
16
  import "../path-data-polyfill-DgeDWYeI.js";
17
17
  var X = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, Z = (t, e, s, o) => {
18
- for (var g = o > 1 ? void 0 : o ? Y(e, s) : e, I = t.length - 1, O; I >= 0; I--)
19
- (O = t[I]) && (g = (o ? O(e, s, g) : O(g)) || g);
20
- return o && g && X(e, s, g), g;
18
+ for (var p = o > 1 ? void 0 : o ? Y(e, s) : e, I = t.length - 1, O; I >= 0; I--)
19
+ (O = t[I]) && (p = (o ? O(e, s, p) : O(p)) || p);
20
+ return o && p && X(e, s, p), p;
21
21
  }, q = (t, e, s) => {
22
22
  if (!e.has(t))
23
23
  throw TypeError("Cannot " + s);
@@ -25,14 +25,14 @@ var X = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, Z = (t, e, s
25
25
  if (e.has(t))
26
26
  throw TypeError("Cannot add the same private member more than once");
27
27
  e instanceof WeakSet ? e.add(t) : e.set(t, s);
28
- }, R = (t, e, s, o) => (q(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s), W, P, f, _, z, D, p, r, u, n, E, M, w, m, x, F, y, C, H, b, c, v, L, k, A, N;
28
+ }, R = (t, e, s, o) => (q(t, e, "write to private field"), o ? o.call(t, s) : e.set(t, s), s), W, P, f, _, z, D, g, r, u, n, E, M, w, m, x, F, y, C, H, b, c, v, L, k, A, N;
29
29
  class G {
30
30
  constructor(e, s) {
31
31
  h(this, x);
32
32
  h(this, c);
33
33
  h(this, L);
34
34
  h(this, A);
35
- h(this, p, null);
35
+ h(this, g, null);
36
36
  h(this, r, null);
37
37
  h(this, u, null);
38
38
  h(this, n, null);
@@ -52,7 +52,7 @@ class G {
52
52
  h(this, b, () => {
53
53
  i(this, m) && (l(this, c, v).call(this, 0, !0), l(this, c, v).call(this, i(this, n).scrollHeight));
54
54
  });
55
- s.firstElementChild instanceof HTMLElement && s.lastElementChild instanceof HTMLElement ? (d(this, p, e), d(this, r, s), d(this, u, s.firstElementChild), d(this, n, s.lastElementChild), i(this, u).style.cursor = "default", i(this, n).style.height = "0px", i(this, n).style.overflow = "hidden", d(this, E, new ResizeObserver(i(this, H))), addEventListener("resize", i(this, C)), i(this, u).addEventListener("click", i(this, y)), i(this, r).addEventListener(
55
+ s.firstElementChild instanceof HTMLElement && s.lastElementChild instanceof HTMLElement ? (d(this, g, e), d(this, r, s), d(this, u, s.firstElementChild), d(this, n, s.lastElementChild), i(this, u).style.cursor = "default", i(this, n).style.height = "0px", i(this, n).style.overflow = "hidden", d(this, E, new ResizeObserver(i(this, H))), addEventListener("resize", i(this, C)), i(this, u).addEventListener("click", i(this, y)), i(this, r).addEventListener(
56
56
  "sizeChange",
57
57
  i(this, b)
58
58
  ), i(this, r).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) : e.removeItem(i(this, r));
@@ -67,7 +67,7 @@ class G {
67
67
  ), clearTimeout(i(this, w)));
68
68
  }
69
69
  open(e) {
70
- e != null && e.skipTransition && l(this, A, N).call(this), i(this, p).multipleAttribute.current || i(this, p).closeAll({ exclude: i(this, r) }), i(this, M) || i(this, E).observe(i(this, n)), d(this, m, !0), clearTimeout(i(this, w)), i(this, r).classList.add("triggered"), l(this, c, v).call(this, i(this, n).scrollHeight), setTimeout(() => {
70
+ e != null && e.skipTransition && l(this, A, N).call(this), i(this, g).multipleAttribute.current || i(this, g).closeAll({ exclude: i(this, r) }), i(this, M) || i(this, E).observe(i(this, n)), d(this, m, !0), clearTimeout(i(this, w)), i(this, r).classList.add("triggered"), l(this, c, v).call(this, i(this, n).scrollHeight), setTimeout(() => {
71
71
  i(this, r).classList.add("opened");
72
72
  }, 0), l(this, L, k).call(this, "toggle");
73
73
  }
@@ -77,7 +77,7 @@ class G {
77
77
  }, V(i(this, n)))), l(this, L, k).call(this, "toggle");
78
78
  }
79
79
  }
80
- p = new WeakMap(), r = new WeakMap(), u = new WeakMap(), n = new WeakMap(), E = new WeakMap(), M = new WeakMap(), w = new WeakMap(), m = new WeakMap(), x = new WeakSet(), F = function() {
80
+ g = new WeakMap(), r = new WeakMap(), u = new WeakMap(), n = new WeakMap(), E = new WeakMap(), M = new WeakMap(), w = new WeakMap(), m = new WeakMap(), x = new WeakSet(), F = function() {
81
81
  return i(this, r).parentElement || i(this, r).getRootNode();
82
82
  }, y = new WeakMap(), C = new WeakMap(), H = new WeakMap(), b = new WeakMap(), c = new WeakSet(), v = function(e, s = !1) {
83
83
  s && (i(this, n).style.transition = "all 0s", setTimeout(() => {
@@ -1 +1 @@
1
- "use strict";var F=Object.defineProperty,O=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var d=(i,e,t)=>e in i?F(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,p=(i,e)=>{for(var t in e||(e={}))D.call(e,t)&&d(i,t,e[t]);if(g)for(var t of g(e))w.call(e,t)&&d(i,t,e[t]);return i},f=(i,e)=>O(i,T(e));var o=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var r=(i,e,t)=>(o(i,e,"read from private field"),t?t.call(i):e.get(i)),u=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},l=(i,e,t,s)=>(o(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../Damped-CbT5qqTP.cjs"),C=require("../easings-DsS5-Kqc.cjs"),M=require("../math-GDWEqu7y.cjs"),q=require("../number-yVpzMdbQ.cjs"),A=require("../polyfills-CrcS4RcO.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var c,h,n,a,m;class N extends b.Animation{constructor(t,s){super(t||0);u(this,c,C.linear);u(this,h,1e3);u(this,n,0);u(this,a,0);u(this,m,0);this.updateOptions(s)}get direction(){return r(this,m)}get length(){return r(this,a)-r(this,n)}get progress(){return this.length?q.preciseNumber((this.current-r(this,n))/this.length,6):0}get entry(){return f(p({},super.entry),{length:this.length,direction:this.direction,progress:this.progress})}set(t,s){s!=null&&s.restart&&(this.current=this.initial),l(this,n,this.current),l(this,a,t),l(this,m,Math.sign(this.length)),this.updateOptions(s),r(this,h)?(this.unlistenAnimationFrame(),this.listenAnimationFrame()):(this.current=r(this,a),this.unlistenAnimationFrame())}shift(t,s){this.set(this.current+t,s)}updateOptions(t){super.updateOptions(t),l(this,c,A.nullishCoalescing(t==null?void 0:t.easing,r(this,c))),l(this,h,A.nullishCoalescing(t==null?void 0:t.duration,r(this,h)))}handleAnimationFrame(t){const s=(t.timestamp-t.startTimestamp)/1e3/(r(this,h)/1e3),y=r(this,c).call(this,M.clamp(s,0,1));this.current=q.preciseNumber(r(this,n)+(r(this,a)-r(this,n))*y,6),s>1&&this.unlistenAnimationFrame()}}c=new WeakMap,h=new WeakMap,n=new WeakMap,a=new WeakMap,m=new WeakMap;exports.Damped=b.Damped;exports.Tweened=N;
1
+ "use strict";var F=Object.defineProperty,O=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var d=(i,e,t)=>e in i?F(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,p=(i,e)=>{for(var t in e||(e={}))D.call(e,t)&&d(i,t,e[t]);if(g)for(var t of g(e))w.call(e,t)&&d(i,t,e[t]);return i},f=(i,e)=>O(i,T(e));var o=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var r=(i,e,t)=>(o(i,e,"read from private field"),t?t.call(i):e.get(i)),u=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},l=(i,e,t,s)=>(o(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../Damped-B0G_t-pw.cjs"),C=require("../easings-DsS5-Kqc.cjs"),M=require("../math-GDWEqu7y.cjs"),q=require("../number-yVpzMdbQ.cjs"),A=require("../polyfills-CrcS4RcO.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var c,h,n,a,m;class N extends b.Animation{constructor(t,s){super(t||0);u(this,c,C.linear);u(this,h,1e3);u(this,n,0);u(this,a,0);u(this,m,0);this.updateOptions(s)}get direction(){return r(this,m)}get length(){return r(this,a)-r(this,n)}get progress(){return this.length?q.preciseNumber((this.current-r(this,n))/this.length,6):0}get entry(){return f(p({},super.entry),{length:this.length,direction:this.direction,progress:this.progress})}set(t,s){s!=null&&s.restart&&(this.current=this.initial),l(this,n,this.current),l(this,a,t),l(this,m,Math.sign(this.length)),this.updateOptions(s),r(this,h)?(this.unlistenAnimationFrame(),this.listenAnimationFrame()):(this.current=r(this,a),this.unlistenAnimationFrame())}shift(t,s){this.set(this.current+t,s)}updateOptions(t){super.updateOptions(t),l(this,c,A.nullishCoalescing(t==null?void 0:t.easing,r(this,c))),l(this,h,A.nullishCoalescing(t==null?void 0:t.duration,r(this,h)))}handleAnimationFrame(t){const s=(t.timestamp-t.startTimestamp)/1e3/(r(this,h)/1e3),y=r(this,c).call(this,M.clamp(s,0,1));this.current=q.preciseNumber(r(this,n)+(r(this,a)-r(this,n))*y,6),s>1&&this.unlistenAnimationFrame()}}c=new WeakMap,h=new WeakMap,n=new WeakMap,a=new WeakMap,m=new WeakMap;exports.Damped=b.Damped;exports.Tweened=N;
@@ -19,8 +19,8 @@ var r = (e, i, t) => (o(e, i, "read from private field"), t ? t.call(e) : i.get(
19
19
  throw TypeError("Cannot add the same private member more than once");
20
20
  i instanceof WeakSet ? i.add(e) : i.set(e, t);
21
21
  }, u = (e, i, t, s) => (o(e, i, "write to private field"), s ? s.call(e, t) : i.set(e, t), t);
22
- import { A as w } from "../Damped-ChjjwnrU.js";
23
- import { D as I } from "../Damped-ChjjwnrU.js";
22
+ import { A as w } from "../Damped-DpaKIZqv.js";
23
+ import { D as I } from "../Damped-DpaKIZqv.js";
24
24
  import { l as C } from "../easings-BKi40vHz.js";
25
25
  import { c as M } from "../math-BOBiC4TN.js";
26
26
  import { p as A } from "../number-Bo5RdrA1.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../custom-element/index.cjs");require("../Store-BQGNOHlY.cjs");const S=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const E=require("../tags-CueX-JLX.cjs"),b=require("../createStylesheet-C8aQQ4hd.cjs"),k=require("../element-resizer/index.cjs"),C=require("../ticker/index.cjs");var q=Object.defineProperty,y=Object.getOwnPropertyDescriptor,P=(i,e,s,h)=>{for(var r=h>1?void 0:h?y(e,s):e,f=i.length-1,g;f>=0;f--)(g=i[f])&&(r=(h?g(e,s,r):g(r))||r);return h&&r&&q(e,s,r),r},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)),a=(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,h)=>(R(i,e,"write to private field"),h?h.call(i,s):e.set(i,s),s),M=(i,e,s)=>(R(i,e,"access private method"),s),n,p,l,o,d,u,v,_,m,w,x;const O=b.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});exports.CanvasElement=class extends W.CustomElement{constructor(){super(),a(this,w),a(this,n,null),a(this,p,null),a(this,l,0),a(this,o,0),a(this,d,1),a(this,u,0),a(this,v,1),a(this,_,e=>{c(this,d,S.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,o,e.contentRect.height),t(this,n).width=t(this,l)*this.pixelRatio,t(this,n).height=t(this,o)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),M(this,w,x).call(this)}),a(this,m,e=>{c(this,u,e.timestamp),c(this,v,e.elapsed),M(this,w,x).call(this)}),this.openShadow(O),E.element(this,{children:E.canvas({ref:e=>{c(this,n,e),c(this,p,e.getContext("2d"))}})})}get canvasElement(){return t(this,n)}get context(){return t(this,p)}get pixelRatio(){return t(this,d)}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,n),pixelRatio:t(this,d),context:t(this,p),timestamp:t(this,u),elapsed:t(this,v)}}connectedCallback(){k.elementResizer.subscribe(this,t(this,_)),this.hasAttribute("static")||C.ticker.subscribe(t(this,m),{culling:this,maxFPS:this.hasAttribute("fps")?parseInt(this.getAttribute("fps")):void 0})}disconnectedCallback(){k.elementResizer.unsubscribe(t(this,_)),C.ticker.unsubscribe(t(this,m)),t(this,n).remove()}};n=new WeakMap;p=new WeakMap;l=new WeakMap;o=new WeakMap;d=new WeakMap;u=new WeakMap;v=new WeakMap;_=new WeakMap;m=new WeakMap;w=new WeakSet;x=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))};exports.CanvasElement=P([W.define("e-canvas")],exports.CanvasElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("../css-property/index.cjs"),P=require("../custom-element/index.cjs");require("../Store-BQGNOHlY.cjs");const z=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const b=require("../tags-CueX-JLX.cjs"),T=require("../createStylesheet-C8aQQ4hd.cjs"),M=require("../element-resizer/index.cjs"),C=require("../ticker/index.cjs");var A=Object.defineProperty,D=Object.getOwnPropertyDescriptor,L=(i,e,s,r)=>{for(var a=r>1?void 0:r?D(e,s):e,k=i.length-1,S;k>=0;k--)(S=i[k])&&(a=(r?S(e,s,a):S(a))||a);return r&&a&&A(e,s,a),a},y=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(y(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)},h=(i,e,s,r)=>(y(i,e,"write to private field"),r?r.call(i,s):e.set(i,s),s),u=(i,e,s)=>(y(i,e,"access private method"),s),l,c,d,o,p,v,f,w,m,R,E,q,x,_,g,W;const F=T.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});exports.CanvasElement=class extends P.CustomElement{constructor(){super(),n(this,m),n(this,E),n(this,g),n(this,l,new O.CSSProperty(this,"--fps",0)),n(this,c,null),n(this,d,null),n(this,o,0),n(this,p,0),n(this,v,1),n(this,f,0),n(this,w,1),n(this,x,e=>{h(this,v,z.clamp(devicePixelRatio,1,2)),h(this,o,e.contentRect.width),h(this,p,e.contentRect.height),t(this,c).width=t(this,o)*this.pixelRatio,t(this,c).height=t(this,p)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),u(this,g,W).call(this)}),n(this,_,e=>{h(this,f,e.timestamp),h(this,w,e.elapsed),u(this,g,W).call(this)}),this.openShadow(F),b.element(this,{children:b.canvas({ref:e=>{h(this,c,e),h(this,d,e.getContext("2d"))}})}),t(this,l).subscribe(e=>{typeof e.previous!="undefined"&&e.current!==e.previous&&u(this,m,R).call(this)})}get fpsCSSProperty(){return t(this,l)}get canvasElement(){return t(this,c)}get context(){return t(this,d)}get pixelRatio(){return t(this,v)}get width(){return t(this,o)}get height(){return t(this,p)}get detail(){return{width:t(this,o),height:t(this,p),element:this,canvasElement:t(this,c),pixelRatio:t(this,v),context:t(this,d),timestamp:t(this,f),elapsed:t(this,w)}}connectedCallback(){t(this,l).observe(),M.elementResizer.subscribe(this,t(this,x)),u(this,m,R).call(this)}disconnectedCallback(){t(this,l).unobserve(),M.elementResizer.unsubscribe(t(this,x)),u(this,E,q).call(this)}};l=new WeakMap;c=new WeakMap;d=new WeakMap;o=new WeakMap;p=new WeakMap;v=new WeakMap;f=new WeakMap;w=new WeakMap;m=new WeakSet;R=function(){C.ticker.unsubscribe(t(this,_)),this.hasAttribute("static")||C.ticker.subscribe(t(this,_),{culling:this,maxFPS:t(this,l).current})};E=new WeakSet;q=function(){C.ticker.unsubscribe(t(this,_))};x=new WeakMap;_=new WeakMap;g=new WeakSet;W=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))};exports.CanvasElement=L([P.define("e-canvas")],exports.CanvasElement);
@@ -1,4 +1,5 @@
1
1
  import { CustomElement } from '../custom-element';
2
+ import { CSSProperty } from '../css-property';
2
3
 
3
4
  export interface Canvas2DRenderDetail {
4
5
  pixelRatio: number;
@@ -14,6 +15,7 @@ export type Canvas2DRenderCallback = (entry: Canvas2DRenderDetail) => void;
14
15
  export declare class CanvasElement extends CustomElement {
15
16
  #private;
16
17
  constructor();
18
+ get fpsCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;
17
19
  get canvasElement(): HTMLCanvasElement;
18
20
  get context(): CanvasRenderingContext2D;
19
21
  get pixelRatio(): number;
@@ -1,92 +1,107 @@
1
- import { CustomElement as M, define as b } from "../custom-element/index.js";
1
+ import { CSSProperty as O } from "../css-property/index.js";
2
+ import { CustomElement as z, define as A } from "../custom-element/index.js";
2
3
  import "../Store-Cd-E5W1z.js";
3
- import { c as P } from "../math-BOBiC4TN.js";
4
+ import { c as D } from "../math-BOBiC4TN.js";
4
5
  import "../path-data-polyfill-DgeDWYeI.js";
5
- import { e as S, q as y } from "../tags-BoPv9fDr.js";
6
- import { c as A } from "../createStylesheet-KMRQhSa-.js";
7
- import { elementResizer as k } from "../element-resizer/index.js";
8
- import { ticker as E } from "../ticker/index.js";
9
- var O = Object.defineProperty, z = Object.getOwnPropertyDescriptor, D = (t, i, s, r) => {
10
- for (var n = r > 1 ? void 0 : r ? z(i, s) : i, w = t.length - 1, x; w >= 0; w--)
11
- (x = t[w]) && (n = (r ? x(i, s, n) : x(n)) || n);
12
- return r && n && O(i, s, n), n;
13
- }, R = (t, i, s) => {
6
+ import { e as L, q as T } from "../tags-BoPv9fDr.js";
7
+ import { c as q } from "../createStylesheet-KMRQhSa-.js";
8
+ import { elementResizer as b } from "../element-resizer/index.js";
9
+ import { ticker as S } from "../ticker/index.js";
10
+ var F = Object.defineProperty, G = Object.getOwnPropertyDescriptor, B = (t, i, s, h) => {
11
+ for (var r = h > 1 ? void 0 : h ? G(i, s) : i, k = t.length - 1, R; k >= 0; k--)
12
+ (R = t[k]) && (r = (h ? R(i, s, r) : R(r)) || r);
13
+ return h && r && F(i, s, r), r;
14
+ }, M = (t, i, s) => {
14
15
  if (!i.has(t))
15
16
  throw TypeError("Cannot " + s);
16
- }, e = (t, i, s) => (R(t, i, "read from private field"), s ? s.call(t) : i.get(t)), a = (t, i, s) => {
17
+ }, e = (t, i, s) => (M(t, i, "read from private field"), s ? s.call(t) : i.get(t)), a = (t, i, s) => {
17
18
  if (i.has(t))
18
19
  throw TypeError("Cannot add the same private member more than once");
19
20
  i instanceof WeakSet ? i.add(t) : i.set(t, s);
20
- }, c = (t, i, s, r) => (R(t, i, "write to private field"), r ? r.call(t, s) : i.set(t, s), s), W = (t, i, s) => (R(t, i, "access private method"), s), h, l, p, o, d, v, m, u, _, f, g;
21
- const L = A({
21
+ }, n = (t, i, s, h) => (M(t, i, "write to private field"), h ? h.call(t, s) : i.set(t, s), s), d = (t, i, s) => (M(t, i, "access private method"), s), o, c, u, p, l, v, _, m, w, W, C, P, x, f, g, E;
22
+ const H = q({
22
23
  ":host, canvas": {
23
24
  display: "block",
24
25
  width: "100%",
25
26
  height: "100%"
26
27
  }
27
28
  });
28
- let C = class extends M {
29
+ let y = class extends z {
29
30
  constructor() {
30
- super(), a(this, f), a(this, h, null), a(this, l, null), a(this, p, 0), a(this, o, 0), a(this, d, 1), a(this, v, 0), a(this, m, 1), a(this, u, (t) => {
31
- c(this, d, P(devicePixelRatio, 1, 2)), c(this, p, t.contentRect.width), c(this, o, t.contentRect.height), e(this, h).width = e(this, p) * this.pixelRatio, e(this, h).height = e(this, o) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), W(this, f, g).call(this);
32
- }), a(this, _, (t) => {
33
- c(this, v, t.timestamp), c(this, m, t.elapsed), W(this, f, g).call(this);
34
- }), this.openShadow(L), S(this, {
35
- children: y({
31
+ super(), a(this, w), a(this, C), a(this, g), a(this, o, new O(this, "--fps", 0)), a(this, c, null), a(this, u, null), a(this, p, 0), a(this, l, 0), a(this, v, 1), a(this, _, 0), a(this, m, 1), a(this, x, (t) => {
32
+ n(this, v, D(devicePixelRatio, 1, 2)), n(this, p, t.contentRect.width), n(this, l, t.contentRect.height), e(this, c).width = e(this, p) * this.pixelRatio, e(this, c).height = e(this, l) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), d(this, g, E).call(this);
33
+ }), a(this, f, (t) => {
34
+ n(this, _, t.timestamp), n(this, m, t.elapsed), d(this, g, E).call(this);
35
+ }), this.openShadow(H), L(this, {
36
+ children: T({
36
37
  ref: (t) => {
37
- c(this, h, t), c(this, l, t.getContext("2d"));
38
+ n(this, c, t), n(this, u, t.getContext("2d"));
38
39
  }
39
40
  })
41
+ }), e(this, o).subscribe((t) => {
42
+ typeof t.previous != "undefined" && t.current !== t.previous && d(this, w, W).call(this);
40
43
  });
41
44
  }
45
+ get fpsCSSProperty() {
46
+ return e(this, o);
47
+ }
42
48
  get canvasElement() {
43
- return e(this, h);
49
+ return e(this, c);
44
50
  }
45
51
  get context() {
46
- return e(this, l);
52
+ return e(this, u);
47
53
  }
48
54
  get pixelRatio() {
49
- return e(this, d);
55
+ return e(this, v);
50
56
  }
51
57
  get width() {
52
58
  return e(this, p);
53
59
  }
54
60
  get height() {
55
- return e(this, o);
61
+ return e(this, l);
56
62
  }
57
63
  get detail() {
58
64
  return {
59
65
  width: e(this, p),
60
- height: e(this, o),
66
+ height: e(this, l),
61
67
  element: this,
62
- canvasElement: e(this, h),
63
- pixelRatio: e(this, d),
64
- context: e(this, l),
65
- timestamp: e(this, v),
68
+ canvasElement: e(this, c),
69
+ pixelRatio: e(this, v),
70
+ context: e(this, u),
71
+ timestamp: e(this, _),
66
72
  elapsed: e(this, m)
67
73
  };
68
74
  }
69
75
  connectedCallback() {
70
- k.subscribe(this, e(this, u)), this.hasAttribute("static") || E.subscribe(e(this, _), {
71
- culling: this,
72
- maxFPS: this.hasAttribute("fps") ? parseInt(this.getAttribute("fps")) : void 0
73
- });
76
+ e(this, o).observe(), b.subscribe(this, e(this, x)), d(this, w, W).call(this);
74
77
  }
75
78
  disconnectedCallback() {
76
- k.unsubscribe(e(this, u)), E.unsubscribe(e(this, _)), e(this, h).remove();
79
+ e(this, o).unobserve(), b.unsubscribe(e(this, x)), d(this, C, P).call(this);
77
80
  }
78
81
  };
79
- h = /* @__PURE__ */ new WeakMap();
80
- l = /* @__PURE__ */ new WeakMap();
81
- p = /* @__PURE__ */ new WeakMap();
82
82
  o = /* @__PURE__ */ new WeakMap();
83
- d = /* @__PURE__ */ new WeakMap();
84
- v = /* @__PURE__ */ new WeakMap();
85
- m = /* @__PURE__ */ new WeakMap();
83
+ c = /* @__PURE__ */ new WeakMap();
86
84
  u = /* @__PURE__ */ new WeakMap();
85
+ p = /* @__PURE__ */ new WeakMap();
86
+ l = /* @__PURE__ */ new WeakMap();
87
+ v = /* @__PURE__ */ new WeakMap();
87
88
  _ = /* @__PURE__ */ new WeakMap();
88
- f = /* @__PURE__ */ new WeakSet();
89
- g = function() {
89
+ m = /* @__PURE__ */ new WeakMap();
90
+ w = /* @__PURE__ */ new WeakSet();
91
+ W = function() {
92
+ S.unsubscribe(e(this, f)), this.hasAttribute("static") || S.subscribe(e(this, f), {
93
+ culling: this,
94
+ maxFPS: e(this, o).current
95
+ });
96
+ };
97
+ C = /* @__PURE__ */ new WeakSet();
98
+ P = function() {
99
+ S.unsubscribe(e(this, f));
100
+ };
101
+ x = /* @__PURE__ */ new WeakMap();
102
+ f = /* @__PURE__ */ new WeakMap();
103
+ g = /* @__PURE__ */ new WeakSet();
104
+ E = function() {
90
105
  this.dispatchEvent(
91
106
  new CustomEvent("canvasRender", {
92
107
  composed: !0,
@@ -94,9 +109,9 @@ g = function() {
94
109
  })
95
110
  );
96
111
  };
97
- C = D([
98
- b("e-canvas")
99
- ], C);
112
+ y = B([
113
+ A("e-canvas")
114
+ ], y);
100
115
  export {
101
- C as CanvasElement
116
+ y as CanvasElement
102
117
  };
@@ -0,0 +1 @@
1
+ "use strict";function x(r,d){const u=r.measureText(d),e=u.actualBoundingBoxAscent+u.actualBoundingBoxDescent,n=u.width;return{height:e,width:n}}function a(r){return Math.floor(r)+.5}function m(r,d,u,e,n,l){let c=r/d,s=u/e,t=0,i=0;return n=typeof n=="undefined"?.5:n,l=typeof l=="undefined"?.5:l,c>s?(t=e,i=e*c):(i=u,t=u/c),[(u-i)*n,(e-t)*l,i,t]}function y(r,d,u,e,n,l){let c=r/d,s=u/e,t=0,i=0;return n=typeof n=="undefined"?.5:n,l=typeof l=="undefined"?.5:l,c>s?(i=u,t=u/c):(t=e,i=e*c),[(u-i)*n,(e-t)*l,i,t]}exports.contain=y;exports.cover=m;exports.fixPosition=a;exports.measureText=x;
@@ -0,0 +1,34 @@
1
+ function i(r, c) {
2
+ const u = r.measureText(c), l = u.actualBoundingBoxAscent + u.actualBoundingBoxDescent, n = u.width;
3
+ return {
4
+ height: l,
5
+ width: n
6
+ };
7
+ }
8
+ function x(r) {
9
+ return Math.floor(r) + 0.5;
10
+ }
11
+ function m(r, c, u, l, n, e) {
12
+ let a = r / c, s = u / l, t = 0, d = 0;
13
+ return n = typeof n == "undefined" ? 0.5 : n, e = typeof e == "undefined" ? 0.5 : e, a > s ? (t = l, d = l * a) : (d = u, t = u / a), [
14
+ (u - d) * n,
15
+ (l - t) * e,
16
+ d,
17
+ t
18
+ ];
19
+ }
20
+ function y(r, c, u, l, n, e) {
21
+ let a = r / c, s = u / l, t = 0, d = 0;
22
+ return n = typeof n == "undefined" ? 0.5 : n, e = typeof e == "undefined" ? 0.5 : e, a > s ? (d = u, t = u / a) : (t = l, d = l * a), [
23
+ (u - d) * n,
24
+ (l - t) * e,
25
+ d,
26
+ t
27
+ ];
28
+ }
29
+ export {
30
+ y as a,
31
+ m as c,
32
+ x as f,
33
+ i as m
34
+ };
@@ -0,0 +1 @@
1
+ "use strict";var f=Object.defineProperty;var c=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var h=(e,s,t)=>s in e?f(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,b=(e,s)=>{for(var t in s||(s={}))L.call(s,t)&&h(e,t,s[t]);if(c)for(var t of c(s))S.call(s,t)&&h(e,t,s[t]);return e};var d=(e,s,t)=>{if(!s.has(e))throw TypeError("Cannot "+t)};var i=(e,s,t)=>(d(e,s,"read from private field"),t?t.call(e):s.get(e)),n=(e,s,t)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,t)},o=(e,s,t,u)=>(d(e,s,"write to private field"),u?u.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../string-DhgS_iFl.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var a,r,l;class T{constructor(s,t){n(this,a,void 0);n(this,r,void 0);n(this,l,void 0);o(this,a,s),o(this,r,t),o(this,l,b({},t))}isTrue(s){return i(this,r)[s]===!0}isFalse(s){return i(this,r)[s]===!1}reset(){for(const s in i(this,l))this.set(s,i(this,l)[s])}set(s,t=!0){i(this,r)[s]=t,t?i(this,a).classList.add(m.camelToKebab(s)):i(this,a).classList.remove(m.camelToKebab(s))}}a=new WeakMap,r=new WeakMap,l=new WeakMap;exports.ClassLinkedStatus=T;
@@ -0,0 +1,10 @@
1
+ export declare class ClassLinkedStatus<T extends {
2
+ [key in string]: boolean;
3
+ }> {
4
+ #private;
5
+ constructor(element: HTMLElement, value: T);
6
+ isTrue(key: keyof T): boolean;
7
+ isFalse(key: keyof T): boolean;
8
+ reset(): void;
9
+ set(key: keyof T, value?: boolean): void;
10
+ }
@@ -0,0 +1,51 @@
1
+ var p = Object.defineProperty;
2
+ var n = Object.getOwnPropertySymbols;
3
+ var L = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
4
+ var m = (i, s, t) => s in i ? p(i, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[s] = t, u = (i, s) => {
5
+ for (var t in s || (s = {}))
6
+ L.call(s, t) && m(i, t, s[t]);
7
+ if (n)
8
+ for (var t of n(s))
9
+ b.call(s, t) && m(i, t, s[t]);
10
+ return i;
11
+ };
12
+ var f = (i, s, t) => {
13
+ if (!s.has(i))
14
+ throw TypeError("Cannot " + t);
15
+ };
16
+ var e = (i, s, t) => (f(i, s, "read from private field"), t ? t.call(i) : s.get(i)), o = (i, s, t) => {
17
+ if (s.has(i))
18
+ throw TypeError("Cannot add the same private member more than once");
19
+ s instanceof WeakSet ? s.add(i) : s.set(i, t);
20
+ }, l = (i, s, t, c) => (f(i, s, "write to private field"), c ? c.call(i, t) : s.set(i, t), t);
21
+ import { c as d } from "../string-f0Dnk0L1.js";
22
+ import "../path-data-polyfill-DgeDWYeI.js";
23
+ var a, r, h;
24
+ class F {
25
+ constructor(s, t) {
26
+ o(this, a, void 0);
27
+ o(this, r, void 0);
28
+ o(this, h, void 0);
29
+ l(this, a, s), l(this, r, t), l(this, h, u({}, t));
30
+ }
31
+ isTrue(s) {
32
+ return e(this, r)[s] === !0;
33
+ }
34
+ isFalse(s) {
35
+ return e(this, r)[s] === !1;
36
+ }
37
+ reset() {
38
+ for (const s in e(this, h))
39
+ this.set(
40
+ s,
41
+ e(this, h)[s]
42
+ );
43
+ }
44
+ set(s, t = !0) {
45
+ e(this, r)[s] = t, t ? e(this, a).classList.add(d(s)) : e(this, a).classList.remove(d(s));
46
+ }
47
+ }
48
+ a = new WeakMap(), r = new WeakMap(), h = new WeakMap();
49
+ export {
50
+ F as ClassLinkedStatus
51
+ };
@@ -0,0 +1,24 @@
1
+ function s(t, h, n = !1) {
2
+ let i = t.x - h.width / 2, g = h.height / 2 - t.y;
3
+ return n && (i = i / (h.width / 2), g = g / (h.height / 2)), { x: i, y: g };
4
+ }
5
+ function x(t, h) {
6
+ const n = t.x / h.width, i = t.y / h.height;
7
+ return { x: n, y: i };
8
+ }
9
+ function e(t, h) {
10
+ return h = h || {
11
+ x: 0,
12
+ y: 0,
13
+ width: document.documentElement.offsetWidth,
14
+ height: innerHeight
15
+ }, {
16
+ x: (t.x - h.x) / h.width * h.width,
17
+ y: (t.y - h.y) / h.height * h.height
18
+ };
19
+ }
20
+ export {
21
+ e as g,
22
+ x as n,
23
+ s
24
+ };
@@ -0,0 +1 @@
1
+ "use strict";function o(t,i,n=!1){let h=t.x-i.width/2,e=i.height/2-t.y;return n&&(h=h/(i.width/2),e=e/(i.height/2)),{x:h,y:e}}function s(t,i){const n=t.x/i.width,h=t.y/i.height;return{x:n,y:h}}function g(t,i){return i=i||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(t.x-i.x)/i.width*i.width,y:(t.y-i.y)/i.height*i.height}}exports.getPointerPosition=g;exports.normalize=s;exports.screenToCartesian=o;
@@ -11,19 +11,19 @@ import { CustomElement as U, define as M } from "./custom-element/index.js";
11
11
  import "./Store-Cd-E5W1z.js";
12
12
  import { i as P } from "./browser-0zX67oeU.js";
13
13
  import { d as Q } from "./events-_C2CztxR.js";
14
- import { g as X } from "./style-j2TwriJ_.js";
14
+ import { a as X } from "./style-CklEF62D.js";
15
15
  import "./path-data-polyfill-DgeDWYeI.js";
16
16
  import { e as k, p as V, ay as E, D as R } from "./tags-BoPv9fDr.js";
17
17
  import { c as D } from "./createStylesheet-KMRQhSa-.js";
18
18
  import { aptechkaTheme as w } from "./theme/index.js";
19
19
  var j = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, te = (t, e, s, i) => {
20
- for (var n = i > 1 ? void 0 : i ? ee(e, s) : e, r = t.length - 1, l; r >= 0; r--)
21
- (l = t[r]) && (n = (i ? l(e, s, n) : l(n)) || n);
22
- return i && n && j(e, s, n), n;
20
+ for (var a = i > 1 ? void 0 : i ? ee(e, s) : e, r = t.length - 1, l; r >= 0; r--)
21
+ (l = t[r]) && (a = (i ? l(e, s, a) : l(a)) || a);
22
+ return i && a && j(e, s, a), a;
23
23
  }, z = (t, e, s) => {
24
24
  if (!e.has(t))
25
25
  throw TypeError("Cannot " + s);
26
- }, a = (t, e, s) => (z(t, e, "read from private field"), s ? s.call(t) : e.get(t)), h = (t, e, s) => {
26
+ }, n = (t, e, s) => (z(t, e, "read from private field"), s ? s.call(t) : e.get(t)), h = (t, e, s) => {
27
27
  if (e.has(t))
28
28
  throw TypeError("Cannot add the same private member more than once");
29
29
  e instanceof WeakSet ? e.add(t) : e.set(t, s);
@@ -67,7 +67,7 @@ let W = class extends U {
67
67
  constructor() {
68
68
  super(), h(this, C), h(this, v, null), h(this, u, ""), h(this, o, null), h(this, p, !1), h(this, f, void 0), h(this, g, null), h(this, L, () => {
69
69
  Q(this);
70
- }), P && (this.openShadow(se), c(this, v, this.attachInternals()), c(this, g, new ResizeObserver(a(this, L))), k(this, {
70
+ }), P && (this.openShadow(se), c(this, v, this.attachInternals()), c(this, g, new ResizeObserver(n(this, L))), k(this, {
71
71
  children: [
72
72
  V({
73
73
  class: "head",
@@ -93,7 +93,7 @@ let W = class extends U {
93
93
  }));
94
94
  }
95
95
  get value() {
96
- return a(this, u);
96
+ return n(this, u);
97
97
  }
98
98
  set value(t) {
99
99
  c(this, u, t), this.dispatchEvent(
@@ -101,29 +101,29 @@ let W = class extends U {
101
101
  bubbles: !0,
102
102
  composed: !0
103
103
  })
104
- ), a(this, v).setFormValue(a(this, u));
104
+ ), n(this, v).setFormValue(n(this, u));
105
105
  }
106
106
  get internals() {
107
- return a(this, v);
107
+ return n(this, v);
108
108
  }
109
109
  get opened() {
110
- return a(this, p);
110
+ return n(this, p);
111
111
  }
112
112
  open() {
113
- clearTimeout(a(this, f)), c(this, p, !0), a(this, o).style.display = "grid", this.classList.add("triggered"), setTimeout(() => {
114
- this.classList.add("opened"), a(this, o).style.height = a(this, o).scrollHeight + "px", q(this, C, O).call(this);
113
+ clearTimeout(n(this, f)), c(this, p, !0), n(this, o).style.display = "grid", this.classList.add("triggered"), setTimeout(() => {
114
+ this.classList.add("opened"), n(this, o).style.height = n(this, o).scrollHeight + "px", q(this, C, O).call(this);
115
115
  }, 0);
116
116
  }
117
117
  close() {
118
- c(this, p, !1), a(this, o).style.height = "0px", this.classList.remove("opened"), q(this, C, O).call(this), c(this, f, setTimeout(() => {
119
- this.classList.remove("triggered"), a(this, o).style.display = "none";
120
- }, X(a(this, o))));
118
+ c(this, p, !1), n(this, o).style.height = "0px", this.classList.remove("opened"), q(this, C, O).call(this), c(this, f, setTimeout(() => {
119
+ this.classList.remove("triggered"), n(this, o).style.display = "none";
120
+ }, X(n(this, o))));
121
121
  }
122
122
  connectedCallback() {
123
- a(this, g).observe(a(this, o));
123
+ n(this, g).observe(n(this, o));
124
124
  }
125
125
  disconnectedCallback() {
126
- clearTimeout(a(this, f)), a(this, g).disconnect();
126
+ clearTimeout(n(this, f)), n(this, g).disconnect();
127
127
  }
128
128
  };
129
129
  v = /* @__PURE__ */ new WeakMap();
@@ -140,7 +140,7 @@ O = function() {
140
140
  bubbles: !0,
141
141
  composed: !0,
142
142
  detail: {
143
- opened: a(this, p)
143
+ opened: n(this, p)
144
144
  }
145
145
  })
146
146
  );
@@ -159,16 +159,16 @@ class Y extends U {
159
159
  return I(this, y);
160
160
  }
161
161
  connectedCallback() {
162
- var i, n;
163
- const s = (n = (i = this.assignedSlot) == null ? void 0 : i.getRootNode()) == null ? void 0 : n.host;
162
+ var i, a;
163
+ const s = (a = (i = this.assignedSlot) == null ? void 0 : i.getRootNode()) == null ? void 0 : a.host;
164
164
  s ? G(this, y, s) : console.log(this, "e-select not found");
165
165
  }
166
166
  }
167
167
  y = new WeakMap();
168
- var ie = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, ae = (t, e, s, i) => {
169
- for (var n = i > 1 ? void 0 : i ? ne(e, s) : e, r = t.length - 1, l; r >= 0; r--)
170
- (l = t[r]) && (n = (i ? l(e, s, n) : l(n)) || n);
171
- return i && n && ie(e, s, n), n;
168
+ var ie = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, ne = (t, e, s, i) => {
169
+ for (var a = i > 1 ? void 0 : i ? ae(e, s) : e, r = t.length - 1, l; r >= 0; r--)
170
+ (l = t[r]) && (a = (i ? l(e, s, a) : l(a)) || a);
171
+ return i && a && ie(e, s, a), a;
172
172
  }, Z = (t, e, s) => {
173
173
  if (!e.has(t))
174
174
  throw TypeError("Cannot " + s);
@@ -220,7 +220,7 @@ b = /* @__PURE__ */ new WeakSet();
220
220
  J = function() {
221
221
  this.selectElement.value = this.value, this.selectElement.close();
222
222
  };
223
- F = ae([
223
+ F = ne([
224
224
  M("e-select-option")
225
225
  ], F);
226
226
  const oe = `<svg
@@ -233,9 +233,9 @@ const oe = `<svg
233
233
  </svg>
234
234
  `;
235
235
  var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, de = (t, e, s, i) => {
236
- for (var n = i > 1 ? void 0 : i ? ce(e, s) : e, r = t.length - 1, l; r >= 0; r--)
237
- (l = t[r]) && (n = (i ? l(e, s, n) : l(n)) || n);
238
- return i && n && he(e, s, n), n;
236
+ for (var a = i > 1 ? void 0 : i ? ce(e, s) : e, r = t.length - 1, l; r >= 0; r--)
237
+ (l = t[r]) && (a = (i ? l(e, s, a) : l(a)) || a);
238
+ return i && a && he(e, s, a), a;
239
239
  }, K = (t, e, s) => {
240
240
  if (!e.has(t))
241
241
  throw TypeError("Cannot " + s);
@@ -0,0 +1,21 @@
1
+ import { ElementOrSelector } from '../utils';
2
+ import { Damped, DampedOptions } from '../animation';
3
+
4
+ export interface PointerParameters {
5
+ element: ElementOrSelector<HTMLElement>;
6
+ damped?: DampedOptions;
7
+ cartesian?: boolean;
8
+ normalize?: boolean;
9
+ }
10
+ export declare class Pointer {
11
+ #private;
12
+ cartesian: boolean;
13
+ normalize: boolean;
14
+ constructor(parameters: PointerParameters);
15
+ get element(): HTMLElement;
16
+ get x(): Damped;
17
+ get y(): Damped;
18
+ get z(): Damped;
19
+ connect(): void;
20
+ disconnect(): void;
21
+ }
@@ -0,0 +1,13 @@
1
+ import { CustomElement } from '../custom-element';
2
+
3
+ export declare class PointerElement extends CustomElement {
4
+ #private;
5
+ constructor();
6
+ protected connectedCallback(): void;
7
+ protected disconnectedCallback(): void;
8
+ }
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ 'e-pointer': PointerElement;
12
+ }
13
+ }
@@ -0,0 +1 @@
1
+ "use strict";var L=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var i=(t,e,s)=>(L(t,e,"read from private field"),s?s.call(t):e.get(t)),p=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},v=(t,e,s,h)=>(L(t,e,"write to private field"),h?h.call(t,s):e.set(t,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../Damped-B0G_t-pw.cjs"),C=require("../coordinates-D8Np3cPD.cjs"),D=require("../dom-JBOkFLTh.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");require("../Store-BQGNOHlY.cjs");require("../ticker/index.cjs");const q=require("../custom-element/index.cjs"),m=require("../css-property/index.cjs");var a,u,d,l,_,w,b;class M{constructor(e){p(this,a,void 0);p(this,u,void 0);p(this,d,void 0);p(this,l,void 0);p(this,_,e=>{i(this,l).set(1)});p(this,w,e=>{i(this,l).set(0)});p(this,b,e=>{const s=C.getPointerPosition(e),h={width:this.element.offsetWidth,height:this.element.offsetHeight},o={x:s.x,y:s.y};if(this.cartesian){const c=C.screenToCartesian(o,h);o.x=c.x,o.y=c.y}if(this.normalize){const c=C.normalize(o,h);o.x=c.x*2,o.y=c.y*2}i(this,u).set(o.x),i(this,d).set(o.y)});v(this,a,D.getElement(e.element)),v(this,u,new x.Damped(0,e.damped)),v(this,d,new x.Damped(0,e.damped)),v(this,l,new x.Damped(0,e.damped)),this.cartesian=e.cartesian||!1,this.normalize=e.normalize||!1}get element(){return i(this,a)}get x(){return i(this,u)}get y(){return i(this,d)}get z(){return i(this,l)}connect(){i(this,a).addEventListener("pointerenter",i(this,_)),i(this,a).addEventListener("pointerleave",i(this,w)),i(this,a).addEventListener("pointermove",i(this,b))}disconnect(){i(this,a).removeEventListener("pointerenter",i(this,_)),i(this,a).removeEventListener("pointerleave",i(this,w)),i(this,a).removeEventListener("pointermove",i(this,b)),i(this,u).reset(),i(this,d).reset(),i(this,l).reset()}}a=new WeakMap,u=new WeakMap,d=new WeakMap,l=new WeakMap,_=new WeakMap,w=new WeakMap,b=new WeakMap;var k=Object.defineProperty,O=Object.getOwnPropertyDescriptor,T=(t,e,s,h)=>{for(var o=h>1?void 0:h?O(e,s):e,c=t.length-1,g;c>=0;c--)(g=t[c])&&(o=(h?g(e,s,o):g(o))||o);return h&&o&&k(e,s,o),o},W=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},r=(t,e,s)=>(W(t,e,"read from private field"),s?s.call(t):e.get(t)),y=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},A=(t,e,s,h)=>(W(t,e,"write to private field"),h?h.call(t,s):e.set(t,s),s),n,f,P,S,z,E;exports.PointerElement=class extends q.CustomElement{constructor(){super(),y(this,n,void 0),y(this,f,new m.CSSProperty(this,"--damping",20)),y(this,P,new m.CSSProperty(this,"--mass",0)),y(this,S,new m.CSSProperty(this,"--stiffness",0)),y(this,z,new m.CSSProperty(this,"--cartesian",!1)),y(this,E,new m.CSSProperty(this,"--normalize",!1)),A(this,n,new M({element:this})),r(this,f).subscribe(e=>{r(this,n).x.damping=e.current,r(this,n).y.damping=e.current,r(this,n).z.damping=e.current}),r(this,z).subscribe(e=>{r(this,n).cartesian=e.current}),r(this,E).subscribe(e=>{r(this,n).normalize=e.current}),r(this,P).subscribe(e=>{r(this,n).x.mass=e.current,r(this,n).y.mass=e.current,r(this,n).z.mass=e.current}),r(this,S).subscribe(e=>{r(this,n).x.stiffness=e.current,r(this,n).y.stiffness=e.current,r(this,n).z.stiffness=e.current}),r(this,n).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,n).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,n).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}connectedCallback(){r(this,n).connect(),r(this,f).observe(),r(this,P).observe(),r(this,S).observe()}disconnectedCallback(){r(this,n).disconnect(),r(this,f).unobserve(),r(this,P).unobserve(),r(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};n=new WeakMap;f=new WeakMap;P=new WeakMap;S=new WeakMap;z=new WeakMap;E=new WeakMap;exports.PointerElement=T([q.define("e-pointer")],exports.PointerElement);exports.Pointer=M;