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.
- 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/Tweened.d.ts +0 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +20 -26
- 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 +174 -139
- 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/Morph.d.ts +1 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +130 -122
- 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.d.ts +11 -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 +1 -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/morph/index.js
CHANGED
|
@@ -1,182 +1,190 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var j = (i, t, e) => (ot(i, typeof t != "symbol" ? t + "" : t, e), e), z = (i, t, e) => {
|
|
5
|
-
if (!t.has(i))
|
|
1
|
+
var X = (s, t) => (t = Symbol[s]) ? t : Symbol.for("Symbol." + s);
|
|
2
|
+
var z = (s, t, e) => {
|
|
3
|
+
if (!t.has(s))
|
|
6
4
|
throw TypeError("Cannot " + e);
|
|
7
5
|
};
|
|
8
|
-
var
|
|
9
|
-
if (t.has(
|
|
6
|
+
var i = (s, t, e) => (z(s, t, "read from private field"), e ? e.call(s) : t.get(s)), n = (s, t, e) => {
|
|
7
|
+
if (t.has(s))
|
|
10
8
|
throw TypeError("Cannot add the same private member more than once");
|
|
11
|
-
t instanceof WeakSet ? t.add(
|
|
12
|
-
}, r = (
|
|
13
|
-
var d = (
|
|
14
|
-
var
|
|
15
|
-
var
|
|
9
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
10
|
+
}, r = (s, t, e, o) => (z(s, t, "write to private field"), o ? o.call(s, e) : t.set(s, e), e);
|
|
11
|
+
var d = (s, t, e) => (z(s, t, "access private method"), e);
|
|
12
|
+
var T = (s, t, e) => new Promise((o, c) => {
|
|
13
|
+
var l = (f) => {
|
|
16
14
|
try {
|
|
17
|
-
g(e.next(
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
15
|
+
g(e.next(f));
|
|
16
|
+
} catch (L) {
|
|
17
|
+
c(L);
|
|
20
18
|
}
|
|
21
|
-
},
|
|
19
|
+
}, y = (f) => {
|
|
22
20
|
try {
|
|
23
|
-
g(e.throw(
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
21
|
+
g(e.throw(f));
|
|
22
|
+
} catch (L) {
|
|
23
|
+
c(L);
|
|
26
24
|
}
|
|
27
|
-
}, g = (
|
|
28
|
-
g((e = e.apply(
|
|
25
|
+
}, g = (f) => f.done ? o(f.value) : Promise.resolve(f.value).then(l, y);
|
|
26
|
+
g((e = e.apply(s, t)).next());
|
|
29
27
|
});
|
|
30
|
-
var
|
|
31
|
-
import { Notifier as
|
|
32
|
-
import { i as
|
|
33
|
-
var
|
|
34
|
-
class
|
|
28
|
+
var Z = (s, t, e) => (t = s[X("asyncIterator")]) ? t.call(s) : (s = s[X("iterator")](), t = {}, e = (o, c) => (c = s[o]) && (t[o] = (l) => new Promise((y, g, f) => (l = c.call(s, l), f = l.done, Promise.resolve(l.value).then((L) => y({ value: L, done: f }), g)))), e("next"), e("return"), t);
|
|
29
|
+
import { Notifier as _ } from "../notifier/index.js";
|
|
30
|
+
import { i as st } from "../browser-0zX67oeU.js";
|
|
31
|
+
var H, u, E, N, P, S;
|
|
32
|
+
class nt {
|
|
35
33
|
constructor(t, e) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
t.preventDefault(),
|
|
34
|
+
n(this, H, void 0);
|
|
35
|
+
n(this, u, void 0);
|
|
36
|
+
n(this, E, void 0);
|
|
37
|
+
n(this, N, void 0);
|
|
38
|
+
n(this, P, (t) => {
|
|
39
|
+
t.preventDefault(), i(this, H).navigate(i(this, E), i(this, N));
|
|
42
40
|
});
|
|
43
|
-
|
|
41
|
+
n(this, S, () => {
|
|
42
|
+
i(this, H).prefetch(i(this, E));
|
|
43
|
+
});
|
|
44
|
+
r(this, H, e), r(this, u, t), r(this, E, i(this, u).getAttribute("href") || "/"), r(this, N, i(this, u).getAttribute(
|
|
45
|
+
"data-history-action"
|
|
46
|
+
) || "push"), i(this, u).addEventListener("click", i(this, P)), i(this, E) === location.pathname && i(this, u).classList.add("current"), i(this, u).hasAttribute("data-prefetch") && i(this, u).addEventListener("pointerenter", i(this, S));
|
|
44
47
|
}
|
|
45
48
|
destroy() {
|
|
46
|
-
|
|
49
|
+
i(this, u).removeEventListener("click", i(this, P)), i(this, u).removeEventListener("pointerenter", i(this, S)), i(this, u).classList.remove("current");
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
|
-
|
|
50
|
-
var a,
|
|
51
|
-
class
|
|
52
|
+
H = new WeakMap(), u = new WeakMap(), E = new WeakMap(), N = new WeakMap(), P = new WeakMap(), S = new WeakMap();
|
|
53
|
+
var a, k, A, C, x, O, w, v, M, D, R, W, G, B, $, m, J, F, Q, K, p, q, U, Y;
|
|
54
|
+
class ct {
|
|
52
55
|
constructor(t) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
o(this, x, new Z());
|
|
72
|
-
o(this, K, (t) => {
|
|
56
|
+
n(this, W);
|
|
57
|
+
n(this, B);
|
|
58
|
+
n(this, m);
|
|
59
|
+
n(this, F);
|
|
60
|
+
n(this, K);
|
|
61
|
+
n(this, q);
|
|
62
|
+
n(this, a, null);
|
|
63
|
+
n(this, k, null);
|
|
64
|
+
n(this, A, null);
|
|
65
|
+
n(this, C, null);
|
|
66
|
+
n(this, x, []);
|
|
67
|
+
n(this, O, new DOMParser());
|
|
68
|
+
n(this, w, /* @__PURE__ */ new Map());
|
|
69
|
+
n(this, v, void 0);
|
|
70
|
+
n(this, M, null);
|
|
71
|
+
n(this, D, new _());
|
|
72
|
+
n(this, R, new _());
|
|
73
|
+
n(this, Y, (t) => {
|
|
73
74
|
t.state && this.navigate(t.state, "none");
|
|
74
75
|
});
|
|
75
|
-
|
|
76
|
+
st && (r(this, a, (t == null ? void 0 : t.base) || "/"), t != null && t.base ? (r(this, a, t.base), t.base.endsWith("/") || r(this, a, i(this, a) + "/")) : r(this, a, "/"), r(this, k, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), r(this, A, (t == null ? void 0 : t.cachePages) !== !1), r(this, C, d(this, F, Q).call(this, document)), r(this, M, location.pathname), d(this, m, J).call(this), addEventListener("popstate", i(this, Y)));
|
|
76
77
|
}
|
|
77
78
|
beforeNavigationEvent(t) {
|
|
78
|
-
return
|
|
79
|
+
return i(this, D).subscribe(t);
|
|
79
80
|
}
|
|
80
81
|
afterNavigationEvent(t) {
|
|
81
|
-
return
|
|
82
|
+
return i(this, R).subscribe(t);
|
|
83
|
+
}
|
|
84
|
+
prefetch(t) {
|
|
85
|
+
return T(this, null, function* () {
|
|
86
|
+
return d(this, W, G).call(this, t);
|
|
87
|
+
});
|
|
82
88
|
}
|
|
83
89
|
navigate(t, e = "push") {
|
|
84
|
-
return
|
|
85
|
-
var
|
|
86
|
-
if (t = d(this,
|
|
90
|
+
return T(this, null, function* () {
|
|
91
|
+
var c;
|
|
92
|
+
if (t = d(this, B, $).call(this, t), i(this, v) === t || i(this, M) === t)
|
|
87
93
|
return;
|
|
88
|
-
r(this,
|
|
89
|
-
const
|
|
94
|
+
r(this, v, t);
|
|
95
|
+
const o = i(this, w).has(t);
|
|
90
96
|
try {
|
|
91
|
-
let
|
|
97
|
+
let l = !0;
|
|
92
98
|
if (this.preprocessor)
|
|
93
99
|
try {
|
|
94
|
-
yield new Promise((
|
|
95
|
-
var
|
|
96
|
-
(
|
|
100
|
+
yield new Promise((h, b) => {
|
|
101
|
+
var I;
|
|
102
|
+
(I = this.preprocessor) == null || I.call(this, { pathname: t, resolve: h, reject: b, isCached: o });
|
|
97
103
|
});
|
|
98
|
-
} catch (
|
|
99
|
-
|
|
104
|
+
} catch (h) {
|
|
105
|
+
h ? console.error(h) : console.log("Route change canceled"), l = !1;
|
|
100
106
|
}
|
|
101
|
-
if (
|
|
107
|
+
if (i(this, D).notify({
|
|
102
108
|
pathname: t,
|
|
103
|
-
isCached:
|
|
104
|
-
}), !
|
|
109
|
+
isCached: o
|
|
110
|
+
}), !l || i(this, v) !== t)
|
|
105
111
|
return;
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
112
|
+
const y = i(this, w).get(t) || (yield d(this, W, G).call(this, t));
|
|
113
|
+
if (i(this, v) !== t)
|
|
108
114
|
return;
|
|
109
|
-
const g = Array.from(document.head.children),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
115
|
+
const g = Array.from(document.head.children), f = Array.from(
|
|
116
|
+
y.head.cloneNode(!0).children
|
|
117
|
+
), L = d(this, K, p).call(this, g, f), tt = d(this, q, U).call(this, g, L), V = d(this, q, U).call(this, f, L);
|
|
118
|
+
tt.forEach((h) => h.remove()), V.forEach((h) => document.head.appendChild(h));
|
|
119
|
+
const j = V.filter(
|
|
120
|
+
(h) => h.tagName === "STYLE" || h.tagName === "SCRIPT" || h.tagName === "LINK"
|
|
113
121
|
);
|
|
114
|
-
|
|
115
|
-
let
|
|
122
|
+
i(this, k) && j.length && (yield new Promise((h) => T(this, null, function* () {
|
|
123
|
+
let b = 0;
|
|
116
124
|
try {
|
|
117
|
-
for (var
|
|
118
|
-
const it =
|
|
125
|
+
for (var I = Z(j), ut, dt, at; ut = !(dt = yield I.next()).done; ut = !1) {
|
|
126
|
+
const it = dt.value;
|
|
119
127
|
it.onload = () => {
|
|
120
|
-
|
|
128
|
+
b++, b === j.length && h();
|
|
121
129
|
};
|
|
122
130
|
}
|
|
123
|
-
} catch (
|
|
124
|
-
|
|
131
|
+
} catch (dt) {
|
|
132
|
+
at = [dt];
|
|
125
133
|
} finally {
|
|
126
134
|
try {
|
|
127
|
-
|
|
135
|
+
ut && (dt = I.return) && (yield dt.call(I));
|
|
128
136
|
} finally {
|
|
129
|
-
if (
|
|
130
|
-
throw
|
|
137
|
+
if (at)
|
|
138
|
+
throw at[0];
|
|
131
139
|
}
|
|
132
140
|
}
|
|
133
141
|
})));
|
|
134
|
-
const et = d(this,
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
}), r(this,
|
|
139
|
-
} catch (
|
|
140
|
-
console.error(
|
|
142
|
+
const et = d(this, F, Q).call(this, y);
|
|
143
|
+
i(this, C).forEach((h, b) => {
|
|
144
|
+
const I = et[b];
|
|
145
|
+
h.innerHTML = I.innerHTML;
|
|
146
|
+
}), r(this, M, t), e === "push" ? history.pushState(t, "", t + location.search) : e === "replace" && history.replaceState(t, "", t + location.search), d(this, m, J).call(this), (c = this.postprocessor) == null || c.call(this, { pathname: t, isCached: o }), i(this, R).notify({ pathname: t, isCached: o });
|
|
147
|
+
} catch (l) {
|
|
148
|
+
console.error(l);
|
|
141
149
|
}
|
|
142
|
-
r(this,
|
|
150
|
+
r(this, v, void 0);
|
|
143
151
|
});
|
|
144
152
|
}
|
|
145
153
|
}
|
|
146
|
-
a = new WeakMap(),
|
|
147
|
-
return
|
|
148
|
-
const e =
|
|
154
|
+
a = new WeakMap(), k = new WeakMap(), A = new WeakMap(), C = new WeakMap(), x = new WeakMap(), O = new WeakMap(), w = new WeakMap(), v = new WeakMap(), M = new WeakMap(), D = new WeakMap(), R = new WeakMap(), W = new WeakSet(), G = function(t) {
|
|
155
|
+
return T(this, null, function* () {
|
|
156
|
+
const e = i(this, w).get(t);
|
|
149
157
|
if (e)
|
|
150
158
|
return e;
|
|
151
|
-
const
|
|
152
|
-
return
|
|
159
|
+
const c = yield (yield fetch(t)).text(), l = i(this, O).parseFromString(c, "text/html");
|
|
160
|
+
return i(this, A) && i(this, w).set(t, l), l;
|
|
153
161
|
});
|
|
154
|
-
},
|
|
155
|
-
return t = t.replace(
|
|
156
|
-
},
|
|
157
|
-
const t = [
|
|
158
|
-
(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
);
|
|
163
|
-
|
|
164
|
-
},
|
|
162
|
+
}, B = new WeakSet(), $ = function(t) {
|
|
163
|
+
return t = t.replace(i(this, a), ""), t.startsWith("/") && (t = t.slice(1)), i(this, a) + t;
|
|
164
|
+
}, m = new WeakSet(), J = function() {
|
|
165
|
+
const t = [
|
|
166
|
+
...document.documentElement.querySelectorAll("a")
|
|
167
|
+
].filter((e) => {
|
|
168
|
+
var o;
|
|
169
|
+
return (o = e.getAttribute("href")) == null ? void 0 : o.startsWith("/");
|
|
170
|
+
});
|
|
171
|
+
i(this, x).forEach((e) => e.destroy()), r(this, x, t.map((e) => new nt(e, this)));
|
|
172
|
+
}, F = new WeakSet(), Q = function(t) {
|
|
165
173
|
const e = t.querySelectorAll("[data-morph]");
|
|
166
174
|
return e.length ? [...e] : [t.body];
|
|
167
|
-
},
|
|
175
|
+
}, K = new WeakSet(), p = function(t, e) {
|
|
168
176
|
return t.filter(
|
|
169
|
-
(
|
|
170
|
-
(
|
|
177
|
+
(o) => e.find(
|
|
178
|
+
(c) => c.outerHTML === o.outerHTML
|
|
171
179
|
)
|
|
172
180
|
);
|
|
173
|
-
},
|
|
181
|
+
}, q = new WeakSet(), U = function(t, e) {
|
|
174
182
|
return t.filter(
|
|
175
|
-
(
|
|
176
|
-
(
|
|
183
|
+
(o) => !e.find(
|
|
184
|
+
(c) => c.outerHTML === o.outerHTML
|
|
177
185
|
)
|
|
178
186
|
);
|
|
179
|
-
},
|
|
187
|
+
}, Y = new WeakMap();
|
|
180
188
|
export {
|
|
181
|
-
|
|
189
|
+
ct as Morph
|
|
182
190
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function s(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function c(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Node)return e;const t=Array.isArray(e)?[]:{};for(const r in e)e.hasOwnProperty(r)&&(t[r]=c(e[r]));return t}function f(e,t,r=s){for(const n in t)r(t[n])?(e[n]||Object.assign(e,{[n]:{}}),f(e[n],t[n],r)):Object.assign(e,{[n]:t[n]});return e}function u(e){return e===null||typeof e=="undefined"}function i(e,t){if(typeof e!=typeof t)return!1;if([e,t].some(r=>u(r)))return e===t;if(Array.isArray(e)){const r=e.length>t.length?e:t,n=e.length>t.length?t:e;return r.every((o,p)=>i(o,n[p]))}if(typeof e!="object"||e instanceof Node||typeof e=="object"&&e.constructor.toString().startsWith("class"))return e===t;for(const r in e){if(!t.hasOwnProperty(r))return!1;if(typeof e[r]=="object"&&typeof t[r]=="object"){if(!i(e[r],t[r]))return!1}else if(e[r]!==t[r])return!1}return!0}function y(e,t){const r={};for(const n in e)t.includes(n)&&(r[n]=e[n]);return r}function l(e,t){const r={};for(const n in e)t.includes(n)||(r[n]=e[n]);return r}function a(e){var t;return typeof e=="function"&&((t=Object.getOwnPropertyDescriptor(e,"prototype"))==null?void 0:t.writable)===!1}function O(e,...t){t.forEach(r=>{Object.getOwnPropertyNames(r.prototype).forEach(n=>{console.log(n),Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(r.prototype,n)||Object.create(null))})})}exports.cloneDeep=c;exports.compareObjects=i;exports.isESClass=a;exports.isNullish=u;exports.isObject=s;exports.mergeDeep=f;exports.mixin=O;exports.omit=l;exports.pick=y;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
function c(e) {
|
|
2
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
3
|
+
}
|
|
4
|
+
function y(e) {
|
|
5
|
+
if (e === null || typeof e != "object")
|
|
6
|
+
return e;
|
|
7
|
+
if (e instanceof Date)
|
|
8
|
+
return new Date(e.getTime());
|
|
9
|
+
if (e instanceof Node)
|
|
10
|
+
return e;
|
|
11
|
+
const t = Array.isArray(e) ? [] : {};
|
|
12
|
+
for (const r in e)
|
|
13
|
+
e.hasOwnProperty(r) && (t[r] = y(e[r]));
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
function o(e, t, r = c) {
|
|
17
|
+
for (const n in t)
|
|
18
|
+
r(t[n]) ? (e[n] || Object.assign(e, { [n]: {} }), o(e[n], t[n], r)) : Object.assign(e, { [n]: t[n] });
|
|
19
|
+
return e;
|
|
20
|
+
}
|
|
21
|
+
function u(e) {
|
|
22
|
+
return e === null || typeof e == "undefined";
|
|
23
|
+
}
|
|
24
|
+
function i(e, t) {
|
|
25
|
+
if (typeof e != typeof t)
|
|
26
|
+
return !1;
|
|
27
|
+
if ([e, t].some((r) => u(r)))
|
|
28
|
+
return e === t;
|
|
29
|
+
if (Array.isArray(e)) {
|
|
30
|
+
const r = e.length > t.length ? e : t, n = e.length > t.length ? t : e;
|
|
31
|
+
return r.every(
|
|
32
|
+
(s, f) => i(s, n[f])
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
if (typeof e != "object" || e instanceof Node || typeof e == "object" && e.constructor.toString().startsWith("class"))
|
|
36
|
+
return e === t;
|
|
37
|
+
for (const r in e) {
|
|
38
|
+
if (!t.hasOwnProperty(r))
|
|
39
|
+
return !1;
|
|
40
|
+
if (typeof e[r] == "object" && typeof t[r] == "object") {
|
|
41
|
+
if (!i(e[r], t[r]))
|
|
42
|
+
return !1;
|
|
43
|
+
} else if (e[r] !== t[r])
|
|
44
|
+
return !1;
|
|
45
|
+
}
|
|
46
|
+
return !0;
|
|
47
|
+
}
|
|
48
|
+
function a(e, t) {
|
|
49
|
+
const r = {};
|
|
50
|
+
for (const n in e)
|
|
51
|
+
t.includes(n) && (r[n] = e[n]);
|
|
52
|
+
return r;
|
|
53
|
+
}
|
|
54
|
+
function p(e, t) {
|
|
55
|
+
const r = {};
|
|
56
|
+
for (const n in e)
|
|
57
|
+
t.includes(n) || (r[n] = e[n]);
|
|
58
|
+
return r;
|
|
59
|
+
}
|
|
60
|
+
function l(e) {
|
|
61
|
+
var t;
|
|
62
|
+
return typeof e == "function" && ((t = Object.getOwnPropertyDescriptor(e, "prototype")) == null ? void 0 : t.writable) === !1;
|
|
63
|
+
}
|
|
64
|
+
function O(e, ...t) {
|
|
65
|
+
t.forEach((r) => {
|
|
66
|
+
Object.getOwnPropertyNames(r.prototype).forEach((n) => {
|
|
67
|
+
console.log(n), Object.defineProperty(
|
|
68
|
+
e.prototype,
|
|
69
|
+
n,
|
|
70
|
+
Object.getOwnPropertyDescriptor(r.prototype, n) || /* @__PURE__ */ Object.create(null)
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
c as a,
|
|
77
|
+
u as b,
|
|
78
|
+
y as c,
|
|
79
|
+
i as d,
|
|
80
|
+
O as e,
|
|
81
|
+
l as i,
|
|
82
|
+
o as m,
|
|
83
|
+
p as o,
|
|
84
|
+
a as p
|
|
85
|
+
};
|
package/lib/order/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=(L=>(L[L.DEVICE=-1e5]="DEVICE",L[L.MEDIA=-99999]="MEDIA",L[L.SOURCE_MANAGER=-99998]="SOURCE_MANAGER",L[L.SCROLL=-99997]="SCROLL",L[L.LAYOUT_BOX=-99996]="LAYOUT_BOX",L[L.EN3=1e5]="EN3",L))(e||{}),A=(L=>(L[L.SCROLL=-1e5]="SCROLL",L[L.LAYOUT_BOX=-99999]="LAYOUT_BOX",L[L.LADDER=-99998]="LADDER",L[L.EN3=1e5]="EN3",L))(A||{});exports.RESIZE_ORDER=e;exports.TICK_ORDER=A;
|
package/lib/order/index.d.ts
CHANGED
package/lib/order/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var A = /* @__PURE__ */ ((L) => (L[L.DEVICE = -1e5] = "DEVICE", L[L.MEDIA = -99999] = "MEDIA", L[L.SOURCE_MANAGER = -99998] = "SOURCE_MANAGER", L[L.SCROLL = -99997] = "SCROLL", L[L.LAYOUT_BOX = -99996] = "LAYOUT_BOX", L[L.EN3 = 1e5] = "EN3", L))(A || {}), e = /* @__PURE__ */ ((L) => (L[L.SCROLL = -1e5] = "SCROLL", L[L.LAYOUT_BOX = -99999] = "LAYOUT_BOX", L[L.EN3 = 1e5] = "EN3", L))(e || {});
|
|
1
|
+
var A = /* @__PURE__ */ ((L) => (L[L.DEVICE = -1e5] = "DEVICE", L[L.MEDIA = -99999] = "MEDIA", L[L.SOURCE_MANAGER = -99998] = "SOURCE_MANAGER", L[L.SCROLL = -99997] = "SCROLL", L[L.LAYOUT_BOX = -99996] = "LAYOUT_BOX", L[L.EN3 = 1e5] = "EN3", L))(A || {}), e = /* @__PURE__ */ ((L) => (L[L.SCROLL = -1e5] = "SCROLL", L[L.LAYOUT_BOX = -99999] = "LAYOUT_BOX", L[L.LADDER = -99998] = "LADDER", L[L.EN3 = 1e5] = "EN3", L))(e || {});
|
|
2
2
|
export {
|
|
3
3
|
A as RESIZE_ORDER,
|
|
4
4
|
e as TICK_ORDER
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../attribute/index.cjs"),M=require("../custom-element/index.cjs"),A=require("../Store-D0_rDIsE.cjs"),q=require("../style-At6aDoqG.cjs"),x=require("../abstract-elements/index.cjs");var B=Object.defineProperty,D=Object.getOwnPropertyDescriptor,I=(t,e,s,i)=>{for(var n=i>1?void 0:i?D(e,s):e,c=t.length-1,l;c>=0;c--)(l=t[c])&&(n=(i?l(e,s,n):l(n))||n);return i&&n&&B(e,s,n),n},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)),o=(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)},k=(t,e,s,i)=>(W(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),T=(t,e,s)=>(W(t,e,"access private method"),s),P,a,m,p,E,v,S,C,u,f,w,g,y,L,_;exports.PopoverElement=class extends M.CustomElement{constructor(){super(...arguments),o(this,S),o(this,u),o(this,y),o(this,P,-1),o(this,a,new A.Store(!1)),o(this,m,void 0),o(this,p,new $.Attribute(this,"history",!1)),o(this,E,new $.Attribute(this,"single",!1)),o(this,v,!1),this.open=()=>{r(this,a).current||(r(this,a).current=!0,r(this,E).current&&(exports.PopoverElement.__opened.forEach(e=>e.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),k(this,P,exports.PopoverElement.__opened.length-1),r(this,p).current&&r(this,v)&&history.pushState("","",r(this,S,C)),clearTimeout(r(this,m)),this.classList.add("triggered"),this.style.display="block",setTimeout(()=>{addEventListener("click",r(this,w)),addEventListener("keydown",r(this,g)),this.style.opacity="1",this.classList.add("opened")}))},this.close=()=>{r(this,a).current&&(r(this,a).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),r(this,p).current&&history.replaceState("","",location.href.replace(new RegExp(`[&?]${r(this,u,f)}`,"g"),"")),this.classList.remove("opened"),this.style.opacity="0",removeEventListener("click",r(this,w)),removeEventListener("keydown",r(this,g)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none"},q.getElementTransitionDurationMS(this)))},o(this,w,e=>{T(this,y,L).call(this,()=>{const s=e.composedPath();(!s.find(i=>i===this)&&!s.find(i=>i instanceof HTMLElement&&i.closest("e-popover-button"))||s[0]instanceof HTMLElement&&s[0].hasAttribute("outside"))&&this.close()})}),o(this,g,e=>{T(this,y,L).call(this,()=>{e.code==="Escape"&&this.close()})}),o(this,_,()=>{k(this,v,!1),r(this,a).current&&r(this,p).current&&!location.search.includes(r(this,u,f))?this.close():!r(this,a).current&&r(this,p).current&&location.search.includes(r(this,u,f))&&this.open(),k(this,v,!0)})}get history(){return r(this,p)}get single(){return r(this,E)}get opened(){return r(this,a)}connectedCallback(){this.style.opacity="0",this.style.display="none",addEventListener("popstate",r(this,_)),setTimeout(()=>{r(this,_).call(this)},0)}disconnectedCallback(){clearTimeout(r(this,m)),removeEventListener("popstate",r(this,_))}};P=new WeakMap;a=new WeakMap;m=new WeakMap;p=new WeakMap;E=new WeakMap;v=new WeakMap;S=new WeakSet;C=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${r(this,u,f)}`};u=new WeakSet;f=function(){return`modal-${this.id}`};w=new WeakMap;g=new WeakMap;y=new WeakSet;L=function(t){(exports.PopoverElement.__opened[r(this,P)-1]||exports.PopoverElement.__opened.length===1)&&t()};_=new WeakMap;exports.PopoverElement.__opened=[];exports.PopoverElement=I([M.define("e-popover")],exports.PopoverElement);var N=Object.defineProperty,G=Object.getOwnPropertyDescriptor,H=(t,e,s,i)=>{for(var n=i>1?void 0:i?G(e,s):e,c=t.length-1,l;c>=0;c--)(l=t[c])&&(n=(i?l(e,s,n):l(n))||n);return i&&n&&N(e,s,n),n},O=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},d=(t,e,s)=>(O(t,e,"read from private field"),s?s.call(t):e.get(t)),R=(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)},b=(t,e,s,i)=>(O(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),h;exports.PopoverButtonElement=class extends x.AbstractButtonElement{constructor(){super(...arguments),R(this,h,void 0)}get popoverElement(){return d(this,h)}click(){if(d(this,h)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!d(this,h).opened.current?d(this,h).open():(e==="close"||e==="toggle"&&d(this,h).opened.current)&&d(this,h).close()}}connectedCallback(){const e=this.getAttribute("target");if(e){const s=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`);s?b(this,h,s):console.warn(this,`target ${e} not found`)}}};h=new WeakMap;exports.PopoverButtonElement=H([M.define("e-popover-button")],exports.PopoverButtonElement);
|