aptechka 0.1.12 → 0.1.15

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/Tweened.d.ts +0 -1
  6. package/lib/animation/index.cjs +1 -1
  7. package/lib/animation/index.js +20 -26
  8. package/lib/component/Component.d.ts +7 -3
  9. package/lib/component/hooks/custom-element.d.ts +2 -0
  10. package/lib/component/index.cjs +1 -1
  11. package/lib/component/index.d.ts +2 -1
  12. package/lib/component/index.js +174 -139
  13. package/lib/controls/index.cjs +1 -1
  14. package/lib/controls/index.js +20 -23
  15. package/lib/en3/{test → core}/En3Raycaster.d.ts +1 -1
  16. package/lib/en3/core/en3.d.ts +2 -0
  17. package/lib/en3/index.cjs +7 -7
  18. package/lib/en3/index.d.ts +1 -1
  19. package/lib/en3/index.js +540 -523
  20. package/lib/index-B-ZmkQyB.cjs +9 -0
  21. package/lib/{index-BWTXnG5n.js → index-Dizn7btU.js} +96 -96
  22. package/lib/layout-box/index.cjs +1 -1
  23. package/lib/layout-box/index.d.ts +15 -0
  24. package/lib/layout-box/index.js +102 -93
  25. package/lib/morph/Morph.d.ts +1 -0
  26. package/lib/morph/index.cjs +1 -1
  27. package/lib/morph/index.js +130 -122
  28. package/lib/object-BZELAoVj.cjs +1 -0
  29. package/lib/object-R34VLqhp.js +85 -0
  30. package/lib/order/index.cjs +1 -1
  31. package/lib/order/index.d.ts +1 -0
  32. package/lib/order/index.js +1 -1
  33. package/lib/popover/index.cjs +1 -1
  34. package/lib/popover/index.js +50 -50
  35. package/lib/resized/index.d.ts +11 -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 +1 -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,218 @@
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, R = (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)), b = (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);
43
- }
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
49
- );
50
- return h || (h = (w = class extends e {
51
- constructor(c) {
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({
58
- element: this
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);
64
- });
65
- }
66
- addConnectCallback(c) {
67
- o(this, l).add(c);
68
- }
69
- addDisconnectCallback(c) {
70
- o(this, i).add(c);
71
- }
72
- addAfterCreateCallback(c) {
73
- o(this, u).add(c);
74
- }
75
- connectedCallback() {
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();
81
- }
82
- disconnectedCallback() {
83
- var c;
84
- (c = super.disconnectedCallback) == null || c.call(this), o(this, i).forEach((f) => {
85
- f(this);
86
- }), o(this, i).clear();
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;
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 y = null;
34
+ const p = /* @__PURE__ */ new Map();
35
+ function C(t) {
36
+ y.addConnectCallback(t);
37
+ }
38
+ function u(t) {
39
+ y.addDisconnectCallback(t);
40
+ }
41
+ function E(t) {
42
+ return t(y);
93
43
  }
94
44
  function se(...t) {
95
- const e = new q(...t);
96
- return a(e.close), e;
45
+ return (e) => {
46
+ var a, l, d, S;
47
+ const n = typeof t[0] == "string" ? HTMLElement : t[0], r = typeof t[0] == "string" ? t[0] : t[1], c = typeof t[0] == "string" ? t[1] : t[2], f = `e-${r}`, w = typeof t[0] == "string" ? t[2] : t[3];
48
+ let i = customElements.get(
49
+ f
50
+ );
51
+ return i || (i = (S = class extends n {
52
+ constructor(o) {
53
+ super();
54
+ b(this, a, /* @__PURE__ */ new Set());
55
+ b(this, l, /* @__PURE__ */ new Set());
56
+ b(this, d, /* @__PURE__ */ new Set());
57
+ y = this;
58
+ const m = c(R({
59
+ element: this
60
+ }, o));
61
+ m && P(this, m), s(this, d).forEach((h) => {
62
+ h(this);
63
+ }), s(this, d).clear(), p.forEach((h, g) => {
64
+ h.element === this && p.delete(g);
65
+ });
66
+ }
67
+ addConnectCallback(o) {
68
+ s(this, a).add(o);
69
+ }
70
+ addDisconnectCallback(o) {
71
+ s(this, l).add(o);
72
+ }
73
+ addAfterCreateCallback(o) {
74
+ s(this, d).add(o);
75
+ }
76
+ connectedCallback() {
77
+ var o;
78
+ (o = super.connectedCallback) == null || o.call(this), s(this, a).forEach((m) => {
79
+ const h = m(this);
80
+ h && s(this, l).add(h);
81
+ }), s(this, a).clear();
82
+ }
83
+ disconnectedCallback() {
84
+ var o;
85
+ (o = super.disconnectedCallback) == null || o.call(this), s(this, l).forEach((m) => {
86
+ m(this);
87
+ }), s(this, l).clear();
88
+ }
89
+ }, a = new WeakMap(), l = new WeakMap(), d = new WeakMap(), S), w != null && w.formAssociated && (i.formAssociated = !0), customElements.define(f, i)), new i(e || {});
90
+ };
97
91
  }
98
92
  function ie(...t) {
99
- const e = new B(...t);
100
- return a(e.close), e;
93
+ const e = new N(...t);
94
+ return u(e.close), e;
101
95
  }
102
96
  function ae(...t) {
103
- const e = new I(...t);
104
- return a(e.close), e;
97
+ const e = new B(...t);
98
+ return u(e.close), e;
105
99
  }
106
100
  function le(...t) {
107
- const e = new N(...t);
108
- return a(e.close), e;
101
+ const e = new W(...t);
102
+ return u(e.close), e;
109
103
  }
110
104
  function ue(...t) {
111
- const e = new G(...t);
112
- return a(e.close), e;
105
+ const e = new $(...t);
106
+ return u(e.close), e;
113
107
  }
114
108
  function fe(...t) {
115
- const e = new $(...t);
116
- return a(e.close), e;
109
+ const e = new j(...t);
110
+ return u(e.close), e;
117
111
  }
118
- function de(t, e) {
119
- m((n) => {
112
+ function de(...t) {
113
+ const e = new K(...t);
114
+ return u(e.close), e;
115
+ }
116
+ function me(...t) {
117
+ const e = new J(...t);
118
+ return u(e.close), e;
119
+ }
120
+ function he(t, e) {
121
+ C((n) => {
120
122
  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, {
123
+ const c = e == null ? void 0 : e.culling;
124
+ return c === !0 ? r = n : typeof c == "string" || c instanceof Element ? r = c : typeof c == "object" && (r = c.current), G.subscribe(t, {
123
125
  culling: r,
124
126
  maxFPS: e == null ? void 0 : e.maxFPS,
125
127
  order: e == null ? void 0 : e.order
126
128
  });
127
129
  });
128
130
  }
129
- function me(t, e) {
130
- m((n) => {
131
+ function Ce(t, e) {
132
+ E((n) => {
133
+ p.set(t, {
134
+ element: n,
135
+ value: e
136
+ });
137
+ });
138
+ }
139
+ function we(t) {
140
+ var e;
141
+ return (e = p.get(t)) == null ? void 0 : e.value;
142
+ }
143
+ function be(t, e) {
144
+ C((n) => {
131
145
  const r = e || (n instanceof Element ? n : void 0);
132
146
  if (typeof r == "string" || r instanceof Element)
133
- return k.subscribe(r, t);
147
+ return T.subscribe(r, t);
134
148
  if (r != null && r.current)
135
- return k.subscribe(r.current, t);
149
+ return T.subscribe(r.current, t);
136
150
  });
137
151
  }
138
- function he(t, e) {
139
- m((n) => {
152
+ function pe(t, e) {
153
+ C((n) => {
140
154
  const r = e || (n instanceof Element ? n : void 0);
141
155
  if (typeof r == "string" || r instanceof Element)
142
- return R.subscribe(r, t);
156
+ return A.subscribe(r, t);
143
157
  if (r != null && r.current)
144
- return R.subscribe(r.current, t);
158
+ return A.subscribe(r.current, t);
145
159
  });
146
160
  }
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
- };
161
+ function ye(t, e) {
162
+ C((n) => O.subscribe(t, e));
163
+ }
164
+ function Ee(t) {
165
+ E((e) => {
166
+ e.shadowRoot && e.shadowRoot.adoptedStyleSheets.push(v(t));
167
+ }), C((e) => {
168
+ if (e.shadowRoot)
169
+ return;
170
+ const n = e.getRootNode();
171
+ if (n === document) {
172
+ const r = q(t).node;
173
+ if (![...document.head.querySelectorAll("style")].find((f) => f.outerHTML === r.outerHTML))
174
+ return document.head.appendChild(r), () => {
175
+ r.remove();
176
+ };
177
+ } else if (n instanceof ShadowRoot) {
178
+ const r = v(t);
179
+ n.adoptedStyleSheets.filter((c) => {
180
+ const f = Array.from(c.cssRules);
181
+ Array.from(r.cssRules).filter(
182
+ (i) => !f.find(
183
+ (a) => a.cssText === i.cssText
184
+ )
185
+ ).forEach((i) => {
186
+ c.insertRule(i.cssText);
187
+ });
188
+ });
189
+ }
159
190
  });
160
191
  }
161
- function pe(t) {
162
- T((e) => {
163
- e.attachShadow(D(p({}, t), { mode: "open" }));
164
- });
192
+ function Re(t) {
193
+ return E((e) => e.attachShadow(x(R({}, t), { mode: "open" })));
194
+ }
195
+ function Se() {
196
+ return E((t) => t.attachInternals());
165
197
  }
166
198
  export {
167
- 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
199
+ se as Component,
200
+ Se as attachInternals,
201
+ Re as attachShadow,
202
+ Ee as attachStyle,
203
+ ue as createComposed,
204
+ Ce as createContext,
205
+ de as createDamped,
206
+ ae as createDerived,
207
+ le as createDerivedArray,
208
+ fe as createResource,
209
+ ie as createStore,
210
+ me as createTweened,
211
+ we as getContext,
212
+ he as onAnimationFrame,
213
+ C as onConnect,
214
+ u as onDisconnect,
215
+ pe as onElementResize,
216
+ be as onIntersection,
217
+ ye as onWindowResize
183
218
  };
@@ -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;