aptechka 0.1.14 → 0.1.16

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 (55) hide show
  1. package/lib/Damped-Fy7tHx4d.js +33 -0
  2. package/lib/Damped-mdFs8WSd.cjs +1 -0
  3. package/lib/{WheelControls-CX9WUbBC.js → WheelControls-BN4XGOpG.js} +29 -34
  4. package/lib/WheelControls-Dc1xcVG6.cjs +1 -0
  5. package/lib/animation/index.cjs +1 -1
  6. package/lib/animation/index.js +21 -24
  7. package/lib/component/Component.d.ts +7 -3
  8. package/lib/component/hooks/custom-element.d.ts +2 -0
  9. package/lib/component/index.cjs +1 -1
  10. package/lib/component/index.d.ts +2 -1
  11. package/lib/component/index.js +149 -116
  12. package/lib/controls/index.cjs +1 -1
  13. package/lib/controls/index.js +20 -23
  14. package/lib/en3/{test → core}/En3Raycaster.d.ts +1 -1
  15. package/lib/en3/core/en3.d.ts +2 -0
  16. package/lib/en3/index.cjs +7 -7
  17. package/lib/en3/index.d.ts +1 -1
  18. package/lib/en3/index.js +540 -523
  19. package/lib/index-B-ZmkQyB.cjs +9 -0
  20. package/lib/{index-BWTXnG5n.js → index-Dizn7btU.js} +96 -96
  21. package/lib/layout-box/index.cjs +1 -1
  22. package/lib/layout-box/index.d.ts +15 -0
  23. package/lib/layout-box/index.js +102 -93
  24. package/lib/morph/index.cjs +1 -1
  25. package/lib/morph/index.js +71 -75
  26. package/lib/object-BZELAoVj.cjs +1 -0
  27. package/lib/object-R34VLqhp.js +85 -0
  28. package/lib/order/index.cjs +1 -1
  29. package/lib/order/index.d.ts +1 -0
  30. package/lib/order/index.js +1 -1
  31. package/lib/popover/index.cjs +1 -1
  32. package/lib/popover/index.js +50 -50
  33. package/lib/resized/index.cjs +1 -0
  34. package/lib/resized/index.d.ts +11 -0
  35. package/lib/resized/index.js +30 -0
  36. package/lib/router/index.cjs +1 -1
  37. package/lib/router/index.js +101 -105
  38. package/lib/scroll/index.cjs +1 -1
  39. package/lib/scroll/index.js +2 -2
  40. package/lib/select/index.cjs +1 -1
  41. package/lib/select/index.js +1 -1
  42. package/lib/studio/index.cjs +1 -1
  43. package/lib/studio/index.js +1 -1
  44. package/lib/utils/index.cjs +1 -1
  45. package/lib/utils/index.d.ts +1 -1
  46. package/lib/utils/index.js +15 -14
  47. package/lib/utils/object.d.ts +1 -0
  48. package/package.json +9 -1
  49. package/lib/Damped-BwpMU9Gi.cjs +0 -1
  50. package/lib/Damped-urvryQLo.js +0 -36
  51. package/lib/WheelControls-CfDeGCOU.cjs +0 -1
  52. package/lib/component/hooks/shadow.d.ts +0 -1
  53. package/lib/index-3G1lTMEf.cjs +0 -9
  54. package/lib/object-C1ph624j.cjs +0 -1
  55. package/lib/object-DIPjdukP.js +0 -73
@@ -1,183 +1,216 @@
1
- var A = Object.defineProperty, g = Object.defineProperties;
2
- var z = Object.getOwnPropertyDescriptors;
3
- var E = Object.getOwnPropertySymbols;
4
- var M = Object.prototype.hasOwnProperty, F = Object.prototype.propertyIsEnumerable;
5
- var S = (t, e, n) => e in t ? A(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, p = (t, e) => {
1
+ var z = Object.defineProperty, M = Object.defineProperties;
2
+ var F = Object.getOwnPropertyDescriptors;
3
+ var D = Object.getOwnPropertySymbols;
4
+ var H = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
5
+ var k = (t, e, n) => e in t ? z(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, E = (t, e) => {
6
6
  for (var n in e || (e = {}))
7
- M.call(e, n) && S(t, n, e[n]);
8
- if (E)
9
- for (var n of E(e))
10
- F.call(e, n) && S(t, n, e[n]);
7
+ H.call(e, n) && k(t, n, e[n]);
8
+ if (D)
9
+ for (var n of D(e))
10
+ I.call(e, n) && k(t, n, e[n]);
11
11
  return t;
12
- }, D = (t, e) => g(t, z(e));
13
- var H = (t, e, n) => {
12
+ }, x = (t, e) => M(t, F(e));
13
+ var L = (t, e, n) => {
14
14
  if (!e.has(t))
15
15
  throw TypeError("Cannot " + n);
16
16
  };
17
- var o = (t, e, n) => (H(t, e, "read from private field"), n ? n.call(t) : e.get(t)), C = (t, e, n) => {
17
+ var s = (t, e, n) => (L(t, e, "read from private field"), n ? n.call(t) : e.get(t)), w = (t, e, n) => {
18
18
  if (e.has(t))
19
19
  throw TypeError("Cannot add the same private member more than once");
20
20
  e instanceof WeakSet ? e.add(t) : e.set(t, n);
21
21
  };
22
- import { S as L } from "../Store-JOKrNVEr.js";
23
- import { e as P, aD as j } from "../tags-DgRVzazL.js";
24
- import { D as q } from "../Derived-Bc88XJ8J.js";
25
- import { D as B, C as I, R as N } from "../Composed-DhtYBEmo.js";
26
- import { ticker as W } from "../ticker/index.js";
27
- import { Tweened as $ } from "../animation/index.js";
28
- import { D as G } from "../Damped-urvryQLo.js";
29
- import { intersector as k } from "../intersector/index.js";
30
- import { elementResizer as R } from "../element-resizer/index.js";
31
- import { windowResizer as J } from "../window-resizer/index.js";
32
- import { c as K } from "../createStylesheet-Zqf3lXhM.js";
33
- let b = null;
34
- const v = /* @__PURE__ */ new Map();
35
- function m(t) {
36
- b.addConnectCallback(t);
37
- }
38
- function a(t) {
39
- b.addDisconnectCallback(t);
40
- }
41
- function T(t) {
42
- t(b);
22
+ import { S as N } from "../Store-JOKrNVEr.js";
23
+ import { e as P, aD as q } from "../tags-DgRVzazL.js";
24
+ import { D as B } from "../Derived-Bc88XJ8J.js";
25
+ import { D as W, C as $, R as j } from "../Composed-DhtYBEmo.js";
26
+ import { ticker as G } from "../ticker/index.js";
27
+ import { Tweened as J } from "../animation/index.js";
28
+ import { D as K } from "../Damped-Fy7tHx4d.js";
29
+ import { intersector as T } from "../intersector/index.js";
30
+ import { elementResizer as A } from "../element-resizer/index.js";
31
+ import { windowResizer as O } from "../window-resizer/index.js";
32
+ import { c as v } from "../createStylesheet-Zqf3lXhM.js";
33
+ let p = null;
34
+ const b = /* @__PURE__ */ new Map();
35
+ function C(t) {
36
+ p.addConnectCallback(t);
37
+ }
38
+ function u(t) {
39
+ p.addDisconnectCallback(t);
40
+ }
41
+ function y(t) {
42
+ return t(p);
43
43
  }
44
44
  function ce(...t) {
45
- var l, i, u, w;
46
- const e = typeof t[0] == "string" ? HTMLElement : t[0], n = typeof t[0] == "string" ? t[0] : t[1], r = typeof t[0] == "string" ? t[1] : t[2], s = `e-${n}`;
47
- let h = customElements.get(
48
- s
45
+ var i, a, d, R;
46
+ const e = typeof t[0] == "string" ? HTMLElement : t[0], n = typeof t[0] == "string" ? t[0] : t[1], r = typeof t[0] == "string" ? t[1] : t[2], o = `e-${n}`, l = typeof t[0] == "string" ? t[2] : t[3];
47
+ let f = customElements.get(
48
+ o
49
49
  );
50
- return h || (h = (w = class extends e {
50
+ return f || (f = (R = class extends e {
51
51
  constructor(c) {
52
52
  super();
53
- C(this, l, /* @__PURE__ */ new Set());
54
- C(this, i, /* @__PURE__ */ new Set());
55
- C(this, u, /* @__PURE__ */ new Set());
56
- b = this;
57
- const f = r(p({
53
+ w(this, i, /* @__PURE__ */ new Set());
54
+ w(this, a, /* @__PURE__ */ new Set());
55
+ w(this, d, /* @__PURE__ */ new Set());
56
+ p = this;
57
+ const m = r(E({
58
58
  element: this
59
59
  }, c));
60
- f && P(this, f), o(this, u).forEach((d) => {
61
- d(this);
62
- }), o(this, u).clear(), v.forEach((d, x) => {
63
- d.element === this && v.delete(x);
60
+ m && P(this, m), s(this, d).forEach((h) => {
61
+ h(this);
62
+ }), s(this, d).clear(), b.forEach((h, g) => {
63
+ h.element === this && b.delete(g);
64
64
  });
65
65
  }
66
66
  addConnectCallback(c) {
67
- o(this, l).add(c);
67
+ s(this, i).add(c);
68
68
  }
69
69
  addDisconnectCallback(c) {
70
- o(this, i).add(c);
70
+ s(this, a).add(c);
71
71
  }
72
72
  addAfterCreateCallback(c) {
73
- o(this, u).add(c);
73
+ s(this, d).add(c);
74
74
  }
75
75
  connectedCallback() {
76
76
  var c;
77
- (c = super.connectedCallback) == null || c.call(this), o(this, l).forEach((f) => {
78
- const d = f(this);
79
- d && o(this, i).add(d);
80
- }), o(this, l).clear();
77
+ (c = super.connectedCallback) == null || c.call(this), s(this, i).forEach((m) => {
78
+ const h = m(this);
79
+ h && s(this, a).add(h);
80
+ }), s(this, i).clear();
81
81
  }
82
82
  disconnectedCallback() {
83
83
  var c;
84
- (c = super.disconnectedCallback) == null || c.call(this), o(this, i).forEach((f) => {
85
- f(this);
86
- }), o(this, i).clear();
84
+ (c = super.disconnectedCallback) == null || c.call(this), s(this, a).forEach((m) => {
85
+ m(this);
86
+ }), s(this, a).clear();
87
87
  }
88
- }, l = new WeakMap(), i = new WeakMap(), u = new WeakMap(), w), customElements.define(s, h)), (y) => new h(y || {});
89
- }
90
- function oe(...t) {
91
- const e = new L(...t);
92
- return a(e.close), e;
88
+ }, i = new WeakMap(), a = new WeakMap(), d = new WeakMap(), R), l != null && l.formAssociated && (f.formAssociated = !0), customElements.define(o, f)), (S) => new f(S || {});
93
89
  }
94
90
  function se(...t) {
95
- const e = new q(...t);
96
- return a(e.close), e;
91
+ const e = new N(...t);
92
+ return u(e.close), e;
97
93
  }
98
94
  function ie(...t) {
99
95
  const e = new B(...t);
100
- return a(e.close), e;
96
+ return u(e.close), e;
101
97
  }
102
98
  function ae(...t) {
103
- const e = new I(...t);
104
- return a(e.close), e;
99
+ const e = new W(...t);
100
+ return u(e.close), e;
105
101
  }
106
102
  function le(...t) {
107
- const e = new N(...t);
108
- return a(e.close), e;
103
+ const e = new $(...t);
104
+ return u(e.close), e;
109
105
  }
110
106
  function ue(...t) {
111
- const e = new G(...t);
112
- return a(e.close), e;
107
+ const e = new j(...t);
108
+ return u(e.close), e;
113
109
  }
114
110
  function fe(...t) {
115
- const e = new $(...t);
116
- return a(e.close), e;
111
+ const e = new K(...t);
112
+ return u(e.close), e;
117
113
  }
118
- function de(t, e) {
119
- m((n) => {
114
+ function de(...t) {
115
+ const e = new J(...t);
116
+ return u(e.close), e;
117
+ }
118
+ function me(t, e) {
119
+ C((n) => {
120
120
  let r;
121
- const s = e == null ? void 0 : e.culling;
122
- return s === !0 ? r = n : typeof s == "string" || s instanceof Element ? r = s : typeof s == "object" && (r = s.current), W.subscribe(t, {
121
+ const o = e == null ? void 0 : e.culling;
122
+ return o === !0 ? r = n : typeof o == "string" || o instanceof Element ? r = o : typeof o == "object" && (r = o.current), G.subscribe(t, {
123
123
  culling: r,
124
124
  maxFPS: e == null ? void 0 : e.maxFPS,
125
125
  order: e == null ? void 0 : e.order
126
126
  });
127
127
  });
128
128
  }
129
- function me(t, e) {
130
- m((n) => {
129
+ function he(t, e) {
130
+ y((n) => {
131
+ b.set(t, {
132
+ element: n,
133
+ value: e
134
+ });
135
+ });
136
+ }
137
+ function Ce(t) {
138
+ var e;
139
+ return (e = b.get(t)) == null ? void 0 : e.value;
140
+ }
141
+ function we(t, e) {
142
+ C((n) => {
131
143
  const r = e || (n instanceof Element ? n : void 0);
132
144
  if (typeof r == "string" || r instanceof Element)
133
- return k.subscribe(r, t);
145
+ return T.subscribe(r, t);
134
146
  if (r != null && r.current)
135
- return k.subscribe(r.current, t);
147
+ return T.subscribe(r.current, t);
136
148
  });
137
149
  }
138
- function he(t, e) {
139
- m((n) => {
150
+ function be(t, e) {
151
+ C((n) => {
140
152
  const r = e || (n instanceof Element ? n : void 0);
141
153
  if (typeof r == "string" || r instanceof Element)
142
- return R.subscribe(r, t);
154
+ return A.subscribe(r, t);
143
155
  if (r != null && r.current)
144
- return R.subscribe(r.current, t);
156
+ return A.subscribe(r.current, t);
145
157
  });
146
158
  }
147
- function Ce(t, e) {
148
- m((n) => J.subscribe(t, e));
149
- }
150
- function be(t) {
151
- T((e) => {
152
- e.shadowRoot && e.shadowRoot.adoptedStyleSheets.push(K(t));
153
- }), m(() => {
154
- const e = j(t).node;
155
- if (![...document.head.querySelectorAll("style")].find((r) => r.outerHTML === e.outerHTML))
156
- return document.head.appendChild(e), () => {
157
- e.remove();
158
- };
159
+ function pe(t, e) {
160
+ C((n) => O.subscribe(t, e));
161
+ }
162
+ function ye(t) {
163
+ y((e) => {
164
+ e.shadowRoot && e.shadowRoot.adoptedStyleSheets.push(v(t));
165
+ }), C((e) => {
166
+ if (e.shadowRoot)
167
+ return;
168
+ const n = e.getRootNode();
169
+ if (n === document) {
170
+ const r = q(t).node;
171
+ if (![...document.head.querySelectorAll("style")].find((l) => l.outerHTML === r.outerHTML))
172
+ return document.head.appendChild(r), () => {
173
+ r.remove();
174
+ };
175
+ } else if (n instanceof ShadowRoot) {
176
+ const r = v(t);
177
+ n.adoptedStyleSheets.filter((o) => {
178
+ const l = Array.from(o.cssRules);
179
+ Array.from(r.cssRules).filter(
180
+ (i) => !l.find(
181
+ (a) => a.cssText === i.cssText
182
+ )
183
+ ).forEach((i) => {
184
+ o.insertRule(i.cssText);
185
+ });
186
+ });
187
+ }
159
188
  });
160
189
  }
161
- function pe(t) {
162
- T((e) => {
163
- e.attachShadow(D(p({}, t), { mode: "open" }));
164
- });
190
+ function Ee(t) {
191
+ return y((e) => e.attachShadow(x(E({}, t), { mode: "open" })));
192
+ }
193
+ function Re() {
194
+ return y((t) => t.attachInternals());
165
195
  }
166
196
  export {
167
197
  ce as Component,
168
- pe as attachShadow,
169
- be as attachStyle,
170
- ae as createComposed,
171
- ue as createDamped,
172
- se as createDerived,
173
- ie as createDerivedArray,
174
- le as createResource,
175
- oe as createStore,
176
- fe as createTweened,
177
- de as onAnimationFrame,
178
- m as onConnect,
179
- a as onDisconnect,
180
- he as onElementResize,
181
- me as onIntersection,
182
- Ce as onWindowResize
198
+ Re as attachInternals,
199
+ Ee as attachShadow,
200
+ ye as attachStyle,
201
+ le as createComposed,
202
+ he as createContext,
203
+ fe as createDamped,
204
+ ie as createDerived,
205
+ ae as createDerivedArray,
206
+ ue as createResource,
207
+ se as createStore,
208
+ de as createTweened,
209
+ Ce as getContext,
210
+ me as onAnimationFrame,
211
+ C as onConnect,
212
+ u as onDisconnect,
213
+ be as onElementResize,
214
+ we as onIntersection,
215
+ pe as onWindowResize
183
216
  };
@@ -1 +1 @@
1
- "use strict";var a=Object.defineProperty;var d=(s,e,r)=>e in s?a(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r;var l=(s,e,r)=>(d(s,typeof e!="symbol"?e+"":e,r),r),C=(s,e,r)=>{if(!e.has(s))throw TypeError("Cannot "+r)};var n=(s,e,r)=>(C(s,e,"read from private field"),r?r.call(s):e.get(s)),c=(s,e,r)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,r)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../WheelControls-CfDeGCOU.cjs"),i=require("../ticker/index.cjs");var t;class u extends o.Controls{constructor(r){super();l(this,"speed");c(this,t,r=>{this.changeEvent.notify(r.elapsed*this.speed)});this.speed=(r==null?void 0:r.speed)||1}connect(){i.ticker.subscribe(n(this,t))}disconnect(){i.ticker.unsubscribe(n(this,t))}}t=new WeakMap;exports.Controls=o.Controls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;exports.LinearControls=u;
1
+ "use strict";var i=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var n=(r,t,e)=>(i(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../WheelControls-Dc1xcVG6.cjs"),c=require("../ticker/index.cjs");var s;class a extends o.Controls{constructor(e){super();l(this,s,e=>{this.changeEvent.notify(e.elapsed*this.speed)});this.speed=(e==null?void 0:e.speed)||1}connect(){c.ticker.subscribe(n(this,s))}disconnect(){c.ticker.unsubscribe(n(this,s))}}s=new WeakMap;exports.Controls=o.Controls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;exports.LinearControls=a;
@@ -1,38 +1,35 @@
1
- var i = Object.defineProperty;
2
- var l = (r, e, s) => e in r ? i(r, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[e] = s;
3
- var a = (r, e, s) => (l(r, typeof e != "symbol" ? e + "" : e, s), s), d = (r, e, s) => {
4
- if (!e.has(r))
5
- throw TypeError("Cannot " + s);
1
+ var c = (s, r, e) => {
2
+ if (!r.has(s))
3
+ throw TypeError("Cannot " + e);
6
4
  };
7
- var o = (r, e, s) => (d(r, e, "read from private field"), s ? s.call(r) : e.get(r)), n = (r, e, s) => {
8
- if (e.has(r))
5
+ var o = (s, r, e) => (c(s, r, "read from private field"), e ? e.call(s) : r.get(s)), a = (s, r, e) => {
6
+ if (r.has(s))
9
7
  throw TypeError("Cannot add the same private member more than once");
10
- e instanceof WeakSet ? e.add(r) : e.set(r, s);
8
+ r instanceof WeakSet ? r.add(s) : r.set(s, e);
11
9
  };
12
- import { C as h } from "../WheelControls-CX9WUbBC.js";
13
- import { K as x, W as k } from "../WheelControls-CX9WUbBC.js";
14
- import { ticker as c } from "../ticker/index.js";
10
+ import { C as i } from "../WheelControls-BN4XGOpG.js";
11
+ import { K as p, W as u } from "../WheelControls-BN4XGOpG.js";
12
+ import { ticker as n } from "../ticker/index.js";
15
13
  var t;
16
- class C extends h {
17
- constructor(s) {
14
+ class m extends i {
15
+ constructor(e) {
18
16
  super();
19
- a(this, "speed");
20
- n(this, t, (s) => {
21
- this.changeEvent.notify(s.elapsed * this.speed);
17
+ a(this, t, (e) => {
18
+ this.changeEvent.notify(e.elapsed * this.speed);
22
19
  });
23
- this.speed = (s == null ? void 0 : s.speed) || 1;
20
+ this.speed = (e == null ? void 0 : e.speed) || 1;
24
21
  }
25
22
  connect() {
26
- c.subscribe(o(this, t));
23
+ n.subscribe(o(this, t));
27
24
  }
28
25
  disconnect() {
29
- c.unsubscribe(o(this, t));
26
+ n.unsubscribe(o(this, t));
30
27
  }
31
28
  }
32
29
  t = new WeakMap();
33
30
  export {
34
- h as Controls,
35
- x as KeyboardControls,
36
- C as LinearControls,
37
- k as WheelControls
31
+ i as Controls,
32
+ p as KeyboardControls,
33
+ m as LinearControls,
34
+ u as WheelControls
38
35
  };
@@ -1,5 +1,5 @@
1
1
  import { Intersection, Object3D } from 'three';
2
- export type En3RaycasterEventType = 'en3-pointerdown' | 'en3-pointerup' | 'en3-pointermove' | 'en3-pointerleave' | 'en3-pointerenter' | 'en3-pointermove';
2
+ export type En3RaycasterEventType = 'en3PointerDown' | 'en3PointerUp' | 'en3PointerMove' | 'en3PointerLeave' | 'en3PointerEnter' | 'en3PointerMove';
3
3
  export type En3RaycasterEvent = {
4
4
  type: En3RaycasterEventType;
5
5
  originalEvent: PointerEvent;
@@ -2,6 +2,7 @@ import { Ladder } from '../../ladder';
2
2
  import { LayoutBox, LayoutBoxOptions } from '../../layout-box';
3
3
  import { ElementOrSelector } from '../../utils';
4
4
  import { Object3D, OrthographicCamera, PerspectiveCamera, Scene, WebGLRenderer, WebGLRendererParameters } from 'three';
5
+ import { En3Raycaster } from '..';
5
6
  export type En3AttachedObject3D<T extends Object3D> = T & {
6
7
  userData: {
7
8
  box: LayoutBox;
@@ -26,6 +27,7 @@ declare class En3 {
26
27
  get webglRenderer(): WebGLRenderer;
27
28
  get camera(): PerspectiveCamera | OrthographicCamera;
28
29
  get scene(): Scene;
30
+ get raycaster(): En3Raycaster;
29
31
  get attachedObjects(): En3AttachedObject3D<Object3D<import("three").Object3DEventMap>>[];
30
32
  get cameraPosition(): Ladder<{
31
33
  x: number;