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.
- package/lib/Damped-Fy7tHx4d.js +33 -0
- package/lib/Damped-mdFs8WSd.cjs +1 -0
- package/lib/{WheelControls-CX9WUbBC.js → WheelControls-BN4XGOpG.js} +29 -34
- package/lib/WheelControls-Dc1xcVG6.cjs +1 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +21 -24
- package/lib/component/Component.d.ts +7 -3
- package/lib/component/hooks/custom-element.d.ts +2 -0
- package/lib/component/index.cjs +1 -1
- package/lib/component/index.d.ts +2 -1
- package/lib/component/index.js +149 -116
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +20 -23
- package/lib/en3/{test → core}/En3Raycaster.d.ts +1 -1
- package/lib/en3/core/en3.d.ts +2 -0
- package/lib/en3/index.cjs +7 -7
- package/lib/en3/index.d.ts +1 -1
- package/lib/en3/index.js +540 -523
- package/lib/index-B-ZmkQyB.cjs +9 -0
- package/lib/{index-BWTXnG5n.js → index-Dizn7btU.js} +96 -96
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +15 -0
- package/lib/layout-box/index.js +102 -93
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +71 -75
- package/lib/object-BZELAoVj.cjs +1 -0
- package/lib/object-R34VLqhp.js +85 -0
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +1 -0
- package/lib/order/index.js +1 -1
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +50 -50
- package/lib/resized/index.cjs +1 -0
- package/lib/resized/index.d.ts +11 -0
- package/lib/resized/index.js +30 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +101 -105
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +2 -2
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/studio/index.cjs +1 -1
- package/lib/studio/index.js +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +15 -14
- package/lib/utils/object.d.ts +1 -0
- package/package.json +9 -1
- package/lib/Damped-BwpMU9Gi.cjs +0 -1
- package/lib/Damped-urvryQLo.js +0 -36
- package/lib/WheelControls-CfDeGCOU.cjs +0 -1
- package/lib/component/hooks/shadow.d.ts +0 -1
- package/lib/index-3G1lTMEf.cjs +0 -9
- package/lib/object-C1ph624j.cjs +0 -1
- package/lib/object-DIPjdukP.js +0 -73
package/lib/component/index.js
CHANGED
|
@@ -1,183 +1,216 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
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
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
|
|
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
|
-
},
|
|
13
|
-
var
|
|
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
|
|
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
|
|
23
|
-
import { e as P, aD as
|
|
24
|
-
import { D as
|
|
25
|
-
import { D as
|
|
26
|
-
import { ticker as
|
|
27
|
-
import { Tweened as
|
|
28
|
-
import { D as
|
|
29
|
-
import { intersector as
|
|
30
|
-
import { elementResizer as
|
|
31
|
-
import { windowResizer as
|
|
32
|
-
import { c as
|
|
33
|
-
let
|
|
34
|
-
const
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
function
|
|
42
|
-
t(
|
|
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
|
|
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],
|
|
47
|
-
let
|
|
48
|
-
|
|
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
|
|
50
|
+
return f || (f = (R = class extends e {
|
|
51
51
|
constructor(c) {
|
|
52
52
|
super();
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
}),
|
|
63
|
-
|
|
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
|
-
|
|
67
|
+
s(this, i).add(c);
|
|
68
68
|
}
|
|
69
69
|
addDisconnectCallback(c) {
|
|
70
|
-
|
|
70
|
+
s(this, a).add(c);
|
|
71
71
|
}
|
|
72
72
|
addAfterCreateCallback(c) {
|
|
73
|
-
|
|
73
|
+
s(this, d).add(c);
|
|
74
74
|
}
|
|
75
75
|
connectedCallback() {
|
|
76
76
|
var c;
|
|
77
|
-
(c = super.connectedCallback) == null || c.call(this),
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
}),
|
|
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),
|
|
85
|
-
|
|
86
|
-
}),
|
|
84
|
+
(c = super.disconnectedCallback) == null || c.call(this), s(this, a).forEach((m) => {
|
|
85
|
+
m(this);
|
|
86
|
+
}), s(this, a).clear();
|
|
87
87
|
}
|
|
88
|
-
},
|
|
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
|
|
96
|
-
return
|
|
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
|
|
96
|
+
return u(e.close), e;
|
|
101
97
|
}
|
|
102
98
|
function ae(...t) {
|
|
103
|
-
const e = new
|
|
104
|
-
return
|
|
99
|
+
const e = new W(...t);
|
|
100
|
+
return u(e.close), e;
|
|
105
101
|
}
|
|
106
102
|
function le(...t) {
|
|
107
|
-
const e = new
|
|
108
|
-
return
|
|
103
|
+
const e = new $(...t);
|
|
104
|
+
return u(e.close), e;
|
|
109
105
|
}
|
|
110
106
|
function ue(...t) {
|
|
111
|
-
const e = new
|
|
112
|
-
return
|
|
107
|
+
const e = new j(...t);
|
|
108
|
+
return u(e.close), e;
|
|
113
109
|
}
|
|
114
110
|
function fe(...t) {
|
|
115
|
-
const e = new
|
|
116
|
-
return
|
|
111
|
+
const e = new K(...t);
|
|
112
|
+
return u(e.close), e;
|
|
117
113
|
}
|
|
118
|
-
function de(t
|
|
119
|
-
|
|
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
|
|
122
|
-
return
|
|
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
|
|
130
|
-
|
|
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
|
|
145
|
+
return T.subscribe(r, t);
|
|
134
146
|
if (r != null && r.current)
|
|
135
|
-
return
|
|
147
|
+
return T.subscribe(r.current, t);
|
|
136
148
|
});
|
|
137
149
|
}
|
|
138
|
-
function
|
|
139
|
-
|
|
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
|
|
154
|
+
return A.subscribe(r, t);
|
|
143
155
|
if (r != null && r.current)
|
|
144
|
-
return
|
|
156
|
+
return A.subscribe(r.current, t);
|
|
145
157
|
});
|
|
146
158
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
function
|
|
151
|
-
|
|
152
|
-
e.shadowRoot && e.shadowRoot.adoptedStyleSheets.push(
|
|
153
|
-
}),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
};
|
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
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;
|
package/lib/controls/index.js
CHANGED
|
@@ -1,38 +1,35 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
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
|
|
8
|
-
if (
|
|
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
|
-
|
|
8
|
+
r instanceof WeakSet ? r.add(s) : r.set(s, e);
|
|
11
9
|
};
|
|
12
|
-
import { C as
|
|
13
|
-
import { K as
|
|
14
|
-
import { ticker as
|
|
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
|
|
17
|
-
constructor(
|
|
14
|
+
class m extends i {
|
|
15
|
+
constructor(e) {
|
|
18
16
|
super();
|
|
19
|
-
a(this,
|
|
20
|
-
|
|
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 = (
|
|
20
|
+
this.speed = (e == null ? void 0 : e.speed) || 1;
|
|
24
21
|
}
|
|
25
22
|
connect() {
|
|
26
|
-
|
|
23
|
+
n.subscribe(o(this, t));
|
|
27
24
|
}
|
|
28
25
|
disconnect() {
|
|
29
|
-
|
|
26
|
+
n.unsubscribe(o(this, t));
|
|
30
27
|
}
|
|
31
28
|
}
|
|
32
29
|
t = new WeakMap();
|
|
33
30
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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 = '
|
|
2
|
+
export type En3RaycasterEventType = 'en3PointerDown' | 'en3PointerUp' | 'en3PointerMove' | 'en3PointerLeave' | 'en3PointerEnter' | 'en3PointerMove';
|
|
3
3
|
export type En3RaycasterEvent = {
|
|
4
4
|
type: En3RaycasterEventType;
|
|
5
5
|
originalEvent: PointerEvent;
|
package/lib/en3/core/en3.d.ts
CHANGED
|
@@ -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;
|