aptechka 0.5.6 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,13 +9,15 @@ export interface PointerParameters {
9
9
  }
10
10
  export declare class Pointer {
11
11
  #private;
12
- cartesian: boolean;
13
- normalize: boolean;
14
12
  constructor(parameters: PointerParameters);
15
13
  get element(): HTMLElement;
16
14
  get x(): Damped;
17
15
  get y(): Damped;
18
16
  get z(): Damped;
17
+ get cartesian(): boolean;
18
+ set cartesian(value: boolean);
19
+ get normalize(): boolean;
20
+ set normalize(value: boolean);
19
21
  connect(): void;
20
22
  disconnect(): void;
21
23
  }
@@ -1 +1 @@
1
- "use strict";var E=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var i=(t,e,s)=>(E(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)},m=(t,e,s,h)=>(E(t,e,"write to private field"),h?h.call(t,s):e.set(t,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-BQGNOHlY.cjs");const L=require("../coordinates-D8Np3cPD.cjs"),k=require("../dom-JBOkFLTh.cjs"),q=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");require("../ticker/index.cjs");const g=require("../Damped-CbWlWAbx.cjs"),M=require("../custom-element/index.cjs"),v=require("../css-property/index.cjs");var a,u,d,l,_,w,x;class W{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,x,e=>{const s={x:e.clientX,y:e.clientY},h={width:this.element.offsetWidth,height:this.element.offsetHeight},o={x:s.x,y:s.y};if(this.cartesian){const c=L.screenToCartesian(o,h);o.x=c.x,o.y=c.y}if(this.normalize){const c=L.normalize(o,h);o.x=q.clamp(c.x*2,-1,1),o.y=q.clamp(c.y*2,-1,1)}i(this,u).set(o.x),i(this,d).set(o.y)});m(this,a,k.getElement(e.element)),m(this,u,new g.Damped(0,e.damped)),m(this,d,new g.Damped(0,e.damped)),m(this,l,new g.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,x))}disconnect(){i(this,a).removeEventListener("pointerenter",i(this,_)),i(this,a).removeEventListener("pointerleave",i(this,w)),i(this,a).removeEventListener("pointermove",i(this,x)),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,x=new WeakMap;var O=Object.defineProperty,T=Object.getOwnPropertyDescriptor,A=(t,e,s,h)=>{for(var o=h>1?void 0:h?T(e,s):e,c=t.length-1,b;c>=0;c--)(b=t[c])&&(o=(h?b(e,s,o):b(o))||o);return h&&o&&O(e,s,o),o},D=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},r=(t,e,s)=>(D(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)},G=(t,e,s,h)=>(D(t,e,"write to private field"),h?h.call(t,s):e.set(t,s),s),n,f,P,S,C,z;exports.PointerElement=class extends M.CustomElement{constructor(){super(),y(this,n,void 0),y(this,f,new v.CSSProperty(this,"--damping",20)),y(this,P,new v.CSSProperty(this,"--mass",0)),y(this,S,new v.CSSProperty(this,"--stiffness",0)),y(this,C,new v.CSSProperty(this,"--cartesian",!1)),y(this,z,new v.CSSProperty(this,"--normalize",!1)),G(this,n,new W({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,C).subscribe(e=>{r(this,n).cartesian=e.current}),r(this,z).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())})}get pointer(){return r(this,n)}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;C=new WeakMap;z=new WeakMap;exports.PointerElement=A([M.define("e-pointer")],exports.PointerElement);exports.Pointer=W;
1
+ "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(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)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-BQGNOHlY.cjs");const L=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");require("../ticker/index.cjs");const M=require("../Damped-CbWlWAbx.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),S=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=L.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=L.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=L.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,q;p>=0;p--)(q=i[p])&&(n=(o?q(e,s,n):q(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),x=(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)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s),h,b,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),x(this,h,void 0),x(this,b,new S.CSSProperty(this,"--damping",20)),x(this,g,new S.CSSProperty(this,"--mass",0)),x(this,z,new S.CSSProperty(this,"--stiffness",0)),x(this,W,new S.CSSProperty(this,"--cartesian",!1)),x(this,R,new S.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,b).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,b).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,b).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;b=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
@@ -1,137 +1,168 @@
1
- var E = (e, t, s) => {
1
+ var F = Object.defineProperty;
2
+ var D = Object.getOwnPropertySymbols;
3
+ var I = Object.prototype.hasOwnProperty, J = Object.prototype.propertyIsEnumerable;
4
+ var O = (e, t, i) => t in e ? F(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, R = (e, t) => {
5
+ for (var i in t || (t = {}))
6
+ I.call(t, i) && O(e, i, t[i]);
7
+ if (D)
8
+ for (var i of D(t))
9
+ J.call(t, i) && O(e, i, t[i]);
10
+ return e;
11
+ };
12
+ var T = (e, t, i) => {
2
13
  if (!t.has(e))
3
- throw TypeError("Cannot " + s);
14
+ throw TypeError("Cannot " + i);
4
15
  };
5
- var r = (e, t, s) => (E(e, t, "read from private field"), s ? s.call(e) : t.get(e)), p = (e, t, s) => {
16
+ var s = (e, t, i) => (T(e, t, "read from private field"), i ? i.call(e) : t.get(e)), a = (e, t, i) => {
6
17
  if (t.has(e))
7
18
  throw TypeError("Cannot add the same private member more than once");
8
- t instanceof WeakSet ? t.add(e) : t.set(e, s);
9
- }, u = (e, t, s, h) => (E(e, t, "write to private field"), h ? h.call(e, s) : t.set(e, s), s);
19
+ t instanceof WeakSet ? t.add(e) : t.set(e, i);
20
+ }, p = (e, t, i, o) => (T(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i);
10
21
  import "../Store-Cd-E5W1z.js";
11
- import { s as k, n as D } from "../coordinates-CgdGoSYs.js";
12
- import { g as O } from "../dom-0S_WDL4g.js";
13
- import { c as L } from "../math-BOBiC4TN.js";
22
+ import { g as K, s as N, n as Q } from "../coordinates-CgdGoSYs.js";
23
+ import { g as U } from "../dom-0S_WDL4g.js";
24
+ import { c as A } from "../math-BOBiC4TN.js";
14
25
  import "../path-data-polyfill-DgeDWYeI.js";
15
26
  import "../ticker/index.js";
16
- import { D as b } from "../Damped-BJgyFENo.js";
17
- import { CustomElement as T, define as A } from "../custom-element/index.js";
18
- import { CSSProperty as y } from "../css-property/index.js";
19
- var a, m, v, l, x, P, g;
20
- class G {
27
+ import { D as W } from "../Damped-BJgyFENo.js";
28
+ import { elementResizer as B } from "../element-resizer/index.js";
29
+ import { windowResizer as G } from "../window-resizer/index.js";
30
+ import { CustomElement as V, define as X } from "../custom-element/index.js";
31
+ import { CSSProperty as x } from "../css-property/index.js";
32
+ var c, l, u, d, y, v, b, g, S, C, E, f;
33
+ class Y {
21
34
  constructor(t) {
22
- p(this, a, void 0);
23
- p(this, m, void 0);
24
- p(this, v, void 0);
25
- p(this, l, void 0);
26
- p(this, x, (t) => {
27
- r(this, l).set(1);
35
+ a(this, c, void 0);
36
+ a(this, l, void 0);
37
+ a(this, u, void 0);
38
+ a(this, d, void 0);
39
+ a(this, y, void 0);
40
+ a(this, v, void 0);
41
+ a(this, b, 0);
42
+ a(this, g, 0);
43
+ a(this, S, (t) => {
44
+ s(this, d).set(1);
28
45
  });
29
- p(this, P, (t) => {
30
- r(this, l).set(0);
46
+ a(this, C, (t) => {
47
+ s(this, d).set(0);
31
48
  });
32
- p(this, g, (t) => {
33
- const s = {
34
- x: t.clientX,
35
- y: t.clientY
36
- }, h = {
37
- width: this.element.offsetWidth,
38
- height: this.element.offsetHeight
39
- }, o = {
40
- x: s.x,
41
- y: s.y
49
+ a(this, E, (t) => {
50
+ const i = K(t, s(this, c).getBoundingClientRect()), o = {
51
+ width: s(this, b),
52
+ height: s(this, g)
53
+ }, n = {
54
+ x: i.x,
55
+ y: i.y
42
56
  };
43
- if (this.cartesian) {
44
- const c = k(o, h);
45
- o.x = c.x, o.y = c.y;
57
+ if (s(this, y)) {
58
+ const m = N(n, o);
59
+ n.x = m.x, n.y = m.y;
46
60
  }
47
- if (this.normalize) {
48
- const c = D(o, h);
49
- o.x = L(c.x * 2, -1, 1), o.y = L(c.y * 2, -1, 1);
61
+ if (s(this, v)) {
62
+ const m = Q(n, o);
63
+ n.x = A(m.x * 2, -1, 1), n.y = A(m.y * 2, -1, 1);
50
64
  }
51
- r(this, m).set(o.x), r(this, v).set(o.y);
65
+ s(this, l).set(n.x), s(this, u).set(n.y);
66
+ });
67
+ a(this, f, () => {
68
+ p(this, b, this.element.clientWidth), p(this, g, this.element.clientHeight);
69
+ let t = 0, i = 0, o = 0, n = 0;
70
+ s(this, y) ? s(this, v) ? (t = -1, i = 1, o = -1, n = 1) : (t = s(this, b) / 2 * -1, i = s(this, b) / 2 * 1, o = s(this, g) / 2 * -1, n = s(this, g) / 2 * 1) : s(this, v) ? (t = 0, i = 1, o = 0, n = 1) : (t = 0, i = s(this, b), o = 0, n = s(this, g)), s(this, l).min = t, s(this, l).max = i, s(this, u).min = o, s(this, u).max = n;
52
71
  });
53
- u(this, a, O(t.element)), u(this, m, new b(0, t.damped)), u(this, v, new b(0, t.damped)), u(this, l, new b(0, t.damped)), this.cartesian = t.cartesian || !1, this.normalize = t.normalize || !1;
72
+ p(this, c, U(t.element)), p(this, l, new W(0, t.damped)), p(this, u, new W(0, t.damped)), p(this, d, new W(0, R({ min: 0, max: 1 }, t.damped))), p(this, y, t.cartesian || !1), p(this, v, t.normalize || !1);
54
73
  }
55
74
  get element() {
56
- return r(this, a);
75
+ return s(this, c);
57
76
  }
58
77
  get x() {
59
- return r(this, m);
78
+ return s(this, l);
60
79
  }
61
80
  get y() {
62
- return r(this, v);
81
+ return s(this, u);
63
82
  }
64
83
  get z() {
65
- return r(this, l);
84
+ return s(this, d);
85
+ }
86
+ get cartesian() {
87
+ return s(this, y);
88
+ }
89
+ set cartesian(t) {
90
+ p(this, y, t), s(this, f).call(this);
91
+ }
92
+ get normalize() {
93
+ return s(this, v);
94
+ }
95
+ set normalize(t) {
96
+ p(this, v, t), s(this, f).call(this);
66
97
  }
67
98
  connect() {
68
- r(this, a).addEventListener("pointerenter", r(this, x)), r(this, a).addEventListener("pointerleave", r(this, P)), r(this, a).addEventListener("pointermove", r(this, g));
99
+ s(this, c).addEventListener("pointerenter", s(this, S)), s(this, c).addEventListener("pointerleave", s(this, C)), s(this, c).addEventListener("pointermove", s(this, E)), B.subscribe(s(this, c), s(this, f)), G.subscribe(s(this, f));
69
100
  }
70
101
  disconnect() {
71
- r(this, a).removeEventListener(
102
+ s(this, c).removeEventListener(
72
103
  "pointerenter",
73
- r(this, x)
74
- ), r(this, a).removeEventListener(
104
+ s(this, S)
105
+ ), s(this, c).removeEventListener(
75
106
  "pointerleave",
76
- r(this, P)
77
- ), r(this, a).removeEventListener("pointermove", r(this, g)), r(this, m).reset(), r(this, v).reset(), r(this, l).reset();
107
+ s(this, C)
108
+ ), s(this, c).removeEventListener("pointermove", s(this, E)), B.unsubscribe(s(this, f)), G.unsubscribe(s(this, f)), s(this, l).reset(), s(this, u).reset(), s(this, d).reset();
78
109
  }
79
110
  }
80
- a = new WeakMap(), m = new WeakMap(), v = new WeakMap(), l = new WeakMap(), x = new WeakMap(), P = new WeakMap(), g = new WeakMap();
81
- var H = Object.defineProperty, X = Object.getOwnPropertyDescriptor, Y = (e, t, s, h) => {
82
- for (var o = h > 1 ? void 0 : h ? X(t, s) : t, c = e.length - 1, S; c >= 0; c--)
83
- (S = e[c]) && (o = (h ? S(t, s, o) : S(o)) || o);
84
- return h && o && H(t, s, o), o;
85
- }, M = (e, t, s) => {
111
+ c = new WeakMap(), l = new WeakMap(), u = new WeakMap(), d = new WeakMap(), y = new WeakMap(), v = new WeakMap(), b = new WeakMap(), g = new WeakMap(), S = new WeakMap(), C = new WeakMap(), E = new WeakMap(), f = new WeakMap();
112
+ var Z = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, j = (e, t, i, o) => {
113
+ for (var n = o > 1 ? void 0 : o ? $(t, i) : t, m = e.length - 1, L; m >= 0; m--)
114
+ (L = e[m]) && (n = (o ? L(t, i, n) : L(n)) || n);
115
+ return o && n && Z(t, i, n), n;
116
+ }, q = (e, t, i) => {
86
117
  if (!t.has(e))
87
- throw TypeError("Cannot " + s);
88
- }, i = (e, t, s) => (M(e, t, "read from private field"), s ? s.call(e) : t.get(e)), f = (e, t, s) => {
118
+ throw TypeError("Cannot " + i);
119
+ }, r = (e, t, i) => (q(e, t, "read from private field"), i ? i.call(e) : t.get(e)), w = (e, t, i) => {
89
120
  if (t.has(e))
90
121
  throw TypeError("Cannot add the same private member more than once");
91
- t instanceof WeakSet ? t.add(e) : t.set(e, s);
92
- }, q = (e, t, s, h) => (M(e, t, "write to private field"), h ? h.call(e, s) : t.set(e, s), s), n, d, w, _, z, C;
93
- let W = class extends T {
122
+ t instanceof WeakSet ? t.add(e) : t.set(e, i);
123
+ }, tt = (e, t, i, o) => (q(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i), h, z, P, _, M, k;
124
+ let H = class extends V {
94
125
  constructor() {
95
- super(), f(this, n, void 0), f(this, d, new y(this, "--damping", 20)), f(this, w, new y(this, "--mass", 0)), f(this, _, new y(this, "--stiffness", 0)), f(this, z, new y(this, "--cartesian", !1)), f(this, C, new y(this, "--normalize", !1)), q(this, n, new G({
126
+ super(), w(this, h, void 0), w(this, z, new x(this, "--damping", 20)), w(this, P, new x(this, "--mass", 0)), w(this, _, new x(this, "--stiffness", 0)), w(this, M, new x(this, "--cartesian", !1)), w(this, k, new x(this, "--normalize", !1)), tt(this, h, new Y({
96
127
  element: this
97
- })), i(this, d).subscribe((e) => {
98
- i(this, n).x.damping = e.current, i(this, n).y.damping = e.current, i(this, n).z.damping = e.current;
99
- }), i(this, z).subscribe((e) => {
100
- i(this, n).cartesian = e.current;
101
- }), i(this, C).subscribe((e) => {
102
- i(this, n).normalize = e.current;
103
- }), i(this, w).subscribe((e) => {
104
- i(this, n).x.mass = e.current, i(this, n).y.mass = e.current, i(this, n).z.mass = e.current;
105
- }), i(this, _).subscribe((e) => {
106
- i(this, n).x.stiffness = e.current, i(this, n).y.stiffness = e.current, i(this, n).z.stiffness = e.current;
107
- }), i(this, n).x.subscribe((e) => {
128
+ })), r(this, z).subscribe((e) => {
129
+ r(this, h).x.damping = e.current, r(this, h).y.damping = e.current, r(this, h).z.damping = e.current;
130
+ }), r(this, M).subscribe((e) => {
131
+ r(this, h).cartesian = e.current;
132
+ }), r(this, k).subscribe((e) => {
133
+ r(this, h).normalize = e.current;
134
+ }), r(this, P).subscribe((e) => {
135
+ r(this, h).x.mass = e.current, r(this, h).y.mass = e.current, r(this, h).z.mass = e.current;
136
+ }), r(this, _).subscribe((e) => {
137
+ r(this, h).x.stiffness = e.current, r(this, h).y.stiffness = e.current, r(this, h).z.stiffness = e.current;
138
+ }), r(this, h).x.subscribe((e) => {
108
139
  this.style.setProperty("--x", e.current.toString());
109
- }), i(this, n).y.subscribe((e) => {
140
+ }), r(this, h).y.subscribe((e) => {
110
141
  this.style.setProperty("--y", e.current.toString());
111
- }), i(this, n).z.subscribe((e) => {
142
+ }), r(this, h).z.subscribe((e) => {
112
143
  this.style.setProperty("--z", e.current.toString());
113
144
  });
114
145
  }
115
146
  get pointer() {
116
- return i(this, n);
147
+ return r(this, h);
117
148
  }
118
149
  connectedCallback() {
119
- i(this, n).connect(), i(this, d).observe(), i(this, w).observe(), i(this, _).observe();
150
+ r(this, h).connect(), r(this, z).observe(), r(this, P).observe(), r(this, _).observe();
120
151
  }
121
152
  disconnectedCallback() {
122
- i(this, n).disconnect(), i(this, d).unobserve(), i(this, w).unobserve(), i(this, _).unobserve(), this.style.removeProperty("--x"), this.style.removeProperty("--y"), this.style.removeProperty("--z");
153
+ r(this, h).disconnect(), r(this, z).unobserve(), r(this, P).unobserve(), r(this, _).unobserve(), this.style.removeProperty("--x"), this.style.removeProperty("--y"), this.style.removeProperty("--z");
123
154
  }
124
155
  };
125
- n = /* @__PURE__ */ new WeakMap();
126
- d = /* @__PURE__ */ new WeakMap();
127
- w = /* @__PURE__ */ new WeakMap();
128
- _ = /* @__PURE__ */ new WeakMap();
156
+ h = /* @__PURE__ */ new WeakMap();
129
157
  z = /* @__PURE__ */ new WeakMap();
130
- C = /* @__PURE__ */ new WeakMap();
131
- W = Y([
132
- A("e-pointer")
133
- ], W);
158
+ P = /* @__PURE__ */ new WeakMap();
159
+ _ = /* @__PURE__ */ new WeakMap();
160
+ M = /* @__PURE__ */ new WeakMap();
161
+ k = /* @__PURE__ */ new WeakMap();
162
+ H = j([
163
+ X("e-pointer")
164
+ ], H);
134
165
  export {
135
- G as Pointer,
136
- W as PointerElement
166
+ Y as Pointer,
167
+ H as PointerElement
137
168
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"