aptechka 0.1.3 → 0.1.6
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/Animated-CJcYqJzq.js +130 -0
- package/lib/Animated-DyZuTEQE.cjs +1 -0
- package/lib/Damped-AHRBHNEQ.cjs +1 -0
- package/lib/Damped-Csj-9_gH.js +36 -0
- package/lib/Derived-Bc88XJ8J.js +27 -0
- package/lib/Derived-SjPdLJiZ.cjs +1 -0
- package/lib/ElementConstructor-9f-12v7T.cjs +1 -0
- package/lib/ElementConstructor-CoKM2CTK.js +228 -0
- package/lib/{SourceManager-vXInLlh_.js → SourceManager-BoP9RAJr.js} +26 -26
- package/lib/SourceManager-CI6NfLzW.cjs +1 -0
- package/lib/Store-D0_rDIsE.cjs +1 -0
- package/lib/Store-JOKrNVEr.js +152 -0
- package/lib/Viewport-COsaberc.cjs +1 -0
- package/lib/Viewport-CXY5xcGJ.js +129 -0
- package/lib/WheelControls-CX9WUbBC.js +83 -0
- package/lib/WheelControls-CfDeGCOU.cjs +1 -0
- package/lib/abstract-elements/AbstractButtonElement.d.ts +5 -0
- package/lib/abstract-elements/index.cjs +1 -0
- package/lib/abstract-elements/index.d.ts +1 -0
- package/lib/abstract-elements/index.js +27 -0
- package/lib/accordion/AccordionElement.d.ts +24 -1
- package/lib/accordion/index.cjs +1 -0
- package/lib/accordion/index.js +166 -0
- package/lib/animation/Animated.d.ts +9 -12
- package/lib/animation/Tweened.d.ts +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.d.ts +1 -1
- package/lib/animation/index.js +11 -17
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +8 -4
- package/lib/attribute/index.js +44 -35
- package/lib/canvas/index.cjs +1 -0
- package/lib/{canvas-2d → canvas}/index.d.ts +4 -3
- package/lib/canvas/index.js +97 -0
- package/lib/connector/index.cjs +1 -0
- package/lib/connector/index.d.ts +15 -0
- package/lib/connector/index.js +54 -0
- package/lib/controls/WheelControls.d.ts +3 -2
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +23 -27
- package/lib/createStylesheet-BON7aJYs.js +10 -0
- package/lib/createStylesheet-uicRVW05.cjs +1 -0
- package/lib/createTheme-BMH9cRrS.js +15 -0
- package/lib/createTheme-COo8IzPG.cjs +1 -0
- package/lib/custom-element/index.cjs +1 -1
- package/lib/custom-element/index.d.ts +3 -1
- package/lib/custom-element/index.js +19 -9
- package/lib/device/Viewport.d.ts +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -121
- package/lib/element-constructor/ElementConstructor.d.ts +15 -17
- package/lib/element-constructor/createStylesheet.d.ts +2 -0
- package/lib/element-constructor/createTheme.d.ts +12 -0
- package/lib/element-constructor/htmlTags.d.ts +115 -113
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.d.ts +2 -1
- package/lib/element-constructor/index.js +387 -1136
- package/lib/element-constructor/svgTags.d.ts +63 -63
- package/lib/element-resizer/index.cjs +1 -0
- package/lib/element-resizer/index.d.ts +9 -0
- package/lib/element-resizer/index.js +64 -0
- package/lib/en3/attachments/En3SourceManager.d.ts +2 -2
- package/lib/en3/index.cjs +7 -7
- package/lib/en3/index.js +252 -242
- package/lib/en3/objects/En3Clip.d.ts +2 -2
- package/lib/events-CoqmkUxo.js +11 -0
- package/lib/events-D68xg4dy.cjs +1 -0
- package/lib/file-EevnUtRj.cjs +1 -0
- package/lib/file-lxi_oXJf.js +13 -0
- package/lib/htmlTags-BCNUG7oK.js +683 -0
- package/lib/htmlTags-BSQys9wH.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +13 -20
- package/lib/index-DgtdcBEI.js +310 -0
- package/lib/index-i_Ki9M-w.cjs +9 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.d.ts +2 -1
- package/lib/intersector/index.js +33 -22
- package/lib/jsx/ComponentElement.d.ts +17 -0
- package/lib/jsx/h.d.ts +8 -0
- package/lib/jsx/hooks.d.ts +25 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +4 -0
- package/lib/jsx/index.js +116 -0
- package/lib/jsx/render.d.ts +2 -0
- package/lib/jsx/type.d.ts +186 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +3 -4
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +1 -0
- package/lib/layout-box/index.js +113 -99
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +1 -1
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +17 -20
- package/lib/modal/ModalElement.d.ts +12 -0
- package/lib/modal/index.cjs +1 -0
- package/lib/modal/index.d.ts +1 -0
- package/lib/modal/index.js +144 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +1 -1
- package/lib/number-Bo5RdrA1.js +23 -0
- package/lib/number-yVpzMdbQ.cjs +1 -0
- package/lib/popover/PopoverButtonElement.d.ts +14 -0
- package/lib/popover/PopoverElement.d.ts +19 -0
- package/lib/popover/index.cjs +1 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +122 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +2 -2
- package/lib/scroll/ScrollElement.d.ts +5 -3
- package/lib/scroll/index.cjs +1 -71
- package/lib/scroll/index.js +349 -314
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.d.ts +1 -1
- package/lib/scroll-entries/index.js +4 -2
- package/lib/select/SelectElement.d.ts +25 -0
- package/lib/select/SelectHeadElement.d.ts +12 -0
- package/lib/select/SelectOptionElement.d.ts +13 -0
- package/lib/select/SelectUserElement.d.ts +7 -0
- package/lib/select/index.cjs +1 -0
- package/lib/select/index.d.ts +4 -0
- package/lib/select/index.js +7 -0
- package/lib/source/SourceClass.d.ts +1 -1
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +13 -18
- package/lib/store/CumulativeResource.d.ts +2 -2
- package/lib/store/Resource.d.ts +1 -1
- package/lib/store/Store.d.ts +55 -9
- package/lib/store/StoreRegistry.d.ts +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -1
- package/lib/store/index.js +105 -66
- package/lib/string-BrDhnNUL.js +39 -0
- package/lib/string-DzUwFYSS.cjs +1 -0
- package/lib/studio/StudioElement.d.ts +3 -0
- package/lib/studio/index.cjs +10 -0
- package/lib/studio/index.js +1004 -0
- package/lib/studio/studioStorage.d.ts +14 -0
- package/lib/studio/tweaker/TweakerBooleanManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerColorManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerElement.d.ts +17 -0
- package/lib/studio/tweaker/TweakerFieldElement.d.ts +21 -0
- package/lib/studio/tweaker/TweakerFolderElement.d.ts +22 -0
- package/lib/studio/tweaker/TweakerLinkManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerNumberManagerElement.d.ts +17 -0
- package/lib/studio/tweaker/TweakerRangeManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerSelectManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerStoreManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerStringManagerElement.d.ts +12 -0
- package/lib/studio/tweaker/tweakerManagerConstructors.d.ts +5 -0
- package/lib/style-At6aDoqG.cjs +1 -0
- package/lib/style-j2TwriJ_.js +10 -0
- package/lib/theme/index.cjs +1 -0
- package/lib/theme/index.d.ts +90 -0
- package/lib/theme/index.js +34 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +1 -1
- package/lib/utils/events.d.ts +6 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +8 -7
- package/lib/utils/index.js +95 -105
- package/lib/utils/number.d.ts +2 -3
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/style.d.ts +2 -0
- package/lib/utils/ts-utility.d.ts +2 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +13 -20
- package/lib/window-resizer/index.cjs +1 -0
- package/lib/window-resizer/index.d.ts +9 -0
- package/lib/window-resizer/index.js +46 -0
- package/package.json +91 -28
- package/lib/Damped-DdPj4Sho.cjs +0 -1
- package/lib/Damped-H3PuZwKV.js +0 -152
- package/lib/SourceManager-tmQlXkSD.cjs +0 -1
- package/lib/Store-qq7IjRLE.js +0 -136
- package/lib/Store-txkR3wXU.cjs +0 -1
- package/lib/WheelControls-9ZQKSYYq.js +0 -83
- package/lib/WheelControls-TYhGU6oA.cjs +0 -1
- package/lib/canvas-2d/index.cjs +0 -5
- package/lib/canvas-2d/index.js +0 -90
- package/lib/element-constructor/specialObjects.d.ts +0 -2
- package/lib/measurer/CumulativeOffsetLeft.d.ts +0 -4
- package/lib/measurer/CumulativeOffsetTop.d.ts +0 -4
- package/lib/measurer/Meaurer.d.ts +0 -8
- package/lib/measurer/index.cjs +0 -1
- package/lib/measurer/index.d.ts +0 -3
- package/lib/measurer/index.js +0 -48
- package/lib/number-2bR0KBcX.cjs +0 -1
- package/lib/number-bCHB2GAD.js +0 -31
- package/lib/resizer/index.cjs +0 -1
- package/lib/resizer/index.d.ts +0 -10
- package/lib/resizer/index.js +0 -45
- package/lib/string-GmxZA5Nq.js +0 -31
- package/lib/string-WmNOGq16.cjs +0 -1
- package/lib/utils/dev.d.ts +0 -3
- /package/lib/{attributes-w0u-KiIb.js → attributes-69we3byR.js} +0 -0
- /package/lib/{attributes-_2U65GDl.cjs → attributes-Bf2svn4j.cjs} +0 -0
- /package/lib/{browser-S4eq8AeN.js → browser-0zX67oeU.js} +0 -0
- /package/lib/{browser-QbF6EW-w.cjs → browser-CpzFX2xg.cjs} +0 -0
- /package/lib/{dom-bHEwc_xV.js → dom-BY7JhTx5.js} +0 -0
- /package/lib/{dom-QhWsdQS2.cjs → dom-qY2LdCVL.cjs} +0 -0
- /package/lib/{easings-uF-tgahf.js → easings-BKi40vHz.js} +0 -0
- /package/lib/{easings-_wFs9ZWc.cjs → easings-DsS5-Kqc.cjs} +0 -0
- /package/lib/{function-zwSFehNd.js → function-C10DGppn.js} +0 -0
- /package/lib/{function-QP7IreXR.cjs → function-MthRj-GJ.cjs} +0 -0
- /package/lib/{layout-rZzbsLPd.cjs → layout-8ryRAMGJ.cjs} +0 -0
- /package/lib/{layout-5SJlcXTY.js → layout-HoBT_Da2.js} +0 -0
- /package/lib/{math-_a3IpKOc.js → math-BOBiC4TN.js} +0 -0
- /package/lib/{math-FNUBmQPK.cjs → math-GDWEqu7y.cjs} +0 -0
package/lib/layout-box/index.js
CHANGED
|
@@ -1,86 +1,83 @@
|
|
|
1
|
-
var
|
|
1
|
+
var I = (i, s, e) => {
|
|
2
2
|
if (!s.has(i))
|
|
3
3
|
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var t = (i, s, e) => (
|
|
5
|
+
var t = (i, s, e) => (I(i, s, "read from private field"), e ? e.call(i) : s.get(i)), h = (i, s, e) => {
|
|
6
6
|
if (s.has(i))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
s instanceof WeakSet ? s.add(i) : s.set(i, e);
|
|
9
|
-
}, n = (i, s, e,
|
|
10
|
-
var g = (i, s, e) => (
|
|
9
|
+
}, n = (i, s, e, l) => (I(i, s, "write to private field"), l ? l.call(i, e) : s.set(i, e), e);
|
|
10
|
+
var g = (i, s, e) => (I(i, s, "access private method"), e);
|
|
11
11
|
import { cssUnitParser as ot } from "../css-unit-parser/index.js";
|
|
12
|
-
import { Ladder as
|
|
13
|
-
import { TICK_ORDER as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { ticker as
|
|
17
|
-
import { i as
|
|
18
|
-
import { g as
|
|
19
|
-
|
|
20
|
-
import "../notifier/index.js";
|
|
21
|
-
import "../function-zwSFehNd.js";
|
|
22
|
-
import "../intersector/index.js";
|
|
23
|
-
function at(i) {
|
|
12
|
+
import { Ladder as V } from "../ladder/index.js";
|
|
13
|
+
import { TICK_ORDER as N } from "../order/index.js";
|
|
14
|
+
import { windowResizer as Q } from "../window-resizer/index.js";
|
|
15
|
+
import { scrollEntries as at } from "../scroll-entries/index.js";
|
|
16
|
+
import { ticker as j } from "../ticker/index.js";
|
|
17
|
+
import { i as tt } from "../browser-0zX67oeU.js";
|
|
18
|
+
import { g as $, a as F } from "../layout-HoBT_Da2.js";
|
|
19
|
+
function ct(i) {
|
|
24
20
|
const s = Math.sqrt(
|
|
25
21
|
i.m11 * i.m11 + i.m12 * i.m12 + i.m13 * i.m13
|
|
26
22
|
), e = Math.sqrt(
|
|
27
23
|
i.m21 * i.m21 + i.m22 * i.m22 + i.m23 * i.m23
|
|
28
|
-
),
|
|
24
|
+
), l = Math.sqrt(
|
|
29
25
|
i.m31 * i.m31 + i.m32 * i.m32 + i.m33 * i.m33
|
|
30
|
-
),
|
|
26
|
+
), E = Math.atan2(i.m32, i.m33), H = Math.atan2(
|
|
31
27
|
-i.m31,
|
|
32
28
|
Math.sqrt(i.m32 * i.m32 + i.m33 * i.m33)
|
|
33
|
-
),
|
|
29
|
+
), K = Math.atan2(i.m21, i.m11), u = i.m41, b = i.m42, L = i.m43;
|
|
34
30
|
return {
|
|
35
31
|
scaleX: s,
|
|
36
32
|
scaleY: e,
|
|
37
|
-
scaleZ:
|
|
38
|
-
rotationX:
|
|
33
|
+
scaleZ: l,
|
|
34
|
+
rotationX: E,
|
|
39
35
|
rotationY: H,
|
|
40
|
-
rotationZ:
|
|
36
|
+
rotationZ: K,
|
|
41
37
|
translationX: u,
|
|
42
|
-
translationY:
|
|
38
|
+
translationY: b,
|
|
43
39
|
translationZ: L
|
|
44
40
|
};
|
|
45
41
|
}
|
|
46
|
-
var
|
|
47
|
-
class
|
|
42
|
+
var a, f, m, v, R, O, x, w, T, M, _, P, S, d, C, X, Y, Z, p, y, z, c, r, o, q, G, D, st, U, et, k, it, A, J, W, B;
|
|
43
|
+
class Mt {
|
|
48
44
|
constructor(s, e) {
|
|
49
|
-
h(this,
|
|
50
|
-
h(this, B);
|
|
45
|
+
h(this, q);
|
|
51
46
|
h(this, D);
|
|
52
47
|
h(this, U);
|
|
53
|
-
h(this,
|
|
54
|
-
h(this,
|
|
55
|
-
h(this,
|
|
56
|
-
h(this, f,
|
|
57
|
-
h(this,
|
|
48
|
+
h(this, k);
|
|
49
|
+
h(this, A);
|
|
50
|
+
h(this, a, null);
|
|
51
|
+
h(this, f, null);
|
|
52
|
+
h(this, m, []);
|
|
53
|
+
h(this, v, "auto");
|
|
58
54
|
h(this, R, "top");
|
|
59
55
|
h(this, O, !1);
|
|
60
|
-
h(this, b, !0);
|
|
61
56
|
h(this, x, !0);
|
|
57
|
+
h(this, w, !0);
|
|
58
|
+
h(this, T, !0);
|
|
62
59
|
h(this, M, 0);
|
|
63
60
|
h(this, _, 0);
|
|
64
61
|
h(this, P, 0);
|
|
65
62
|
h(this, S, 0);
|
|
66
63
|
h(this, d, 0);
|
|
67
|
-
h(this,
|
|
64
|
+
h(this, C, 0);
|
|
68
65
|
h(this, X, 0);
|
|
69
66
|
h(this, Y, 0);
|
|
70
|
-
h(this,
|
|
71
|
-
h(this,
|
|
67
|
+
h(this, Z, 0);
|
|
68
|
+
h(this, p, { x: 0, y: 0, z: 0 });
|
|
72
69
|
h(this, y, { x: 0, y: 0, z: 0 });
|
|
73
70
|
h(this, z, { x: 1, y: 1, z: 1 });
|
|
74
|
-
h(this, c, new
|
|
75
|
-
h(this, r, new
|
|
76
|
-
h(this,
|
|
77
|
-
h(this, A, () => {
|
|
78
|
-
j && g(this, D, st).call(this);
|
|
79
|
-
});
|
|
71
|
+
h(this, c, new V({ x: 0, y: 0, z: 0 }));
|
|
72
|
+
h(this, r, new V({ x: 0, y: 0, z: 0 }));
|
|
73
|
+
h(this, o, new V({ x: 0, y: 0, z: 0 }));
|
|
80
74
|
h(this, W, () => {
|
|
81
|
-
g(this, U, et).call(this)
|
|
75
|
+
tt && g(this, U, et).call(this);
|
|
82
76
|
});
|
|
83
|
-
|
|
77
|
+
h(this, B, () => {
|
|
78
|
+
g(this, k, it).call(this), g(this, q, G).call(this);
|
|
79
|
+
});
|
|
80
|
+
tt && (n(this, a, g(this, A, J).call(this, s) || document.body), n(this, f, g(this, A, J).call(this, e == null ? void 0 : e.containerElement) || document.body), n(this, v, (e == null ? void 0 : e.scrollAxis) || "auto"), n(this, R, (e == null ? void 0 : e.frontSide) || "top"), n(this, O, (e == null ? void 0 : e.cartesian) || !1), n(this, x, (e == null ? void 0 : e.sizeStep) !== void 0 ? e.sizeStep : !0), n(this, w, (e == null ? void 0 : e.positionStep) !== void 0 ? e.positionStep : !0), n(this, T, (e == null ? void 0 : e.transformStep) !== void 0 ? e.transformStep : !0), t(this, o).setStep("_size", "+", {
|
|
84
81
|
x: 1,
|
|
85
82
|
y: 1,
|
|
86
83
|
z: 1
|
|
@@ -88,7 +85,7 @@ class Ct {
|
|
|
88
85
|
x: 0,
|
|
89
86
|
y: 0,
|
|
90
87
|
z: 0
|
|
91
|
-
}), t(this,
|
|
88
|
+
}), t(this, o).setStep("_scale", "*", {
|
|
92
89
|
x: 1,
|
|
93
90
|
y: 1,
|
|
94
91
|
z: 1
|
|
@@ -101,19 +98,19 @@ class Ct {
|
|
|
101
98
|
y: 0,
|
|
102
99
|
z: 0
|
|
103
100
|
}), addEventListener("DOMContentLoaded", () => {
|
|
104
|
-
|
|
105
|
-
this.setScrollStep(() =>
|
|
101
|
+
at.getAll(this.element).forEach((l) => {
|
|
102
|
+
this.setScrollStep(() => l);
|
|
106
103
|
});
|
|
107
|
-
}),
|
|
108
|
-
order:
|
|
104
|
+
}), j.subscribe(t(this, B), {
|
|
105
|
+
order: N.LAYOUT_BOX,
|
|
109
106
|
culling: e != null && e.culling ? this.element : void 0
|
|
110
|
-
}),
|
|
107
|
+
}), Q.subscribe(t(this, W), N.LAYOUT_BOX));
|
|
111
108
|
}
|
|
112
109
|
get element() {
|
|
113
|
-
return t(this,
|
|
110
|
+
return t(this, a);
|
|
114
111
|
}
|
|
115
112
|
get containerElement() {
|
|
116
|
-
return t(this,
|
|
113
|
+
return t(this, f);
|
|
117
114
|
}
|
|
118
115
|
get position() {
|
|
119
116
|
return t(this, r).current;
|
|
@@ -122,7 +119,7 @@ class Ct {
|
|
|
122
119
|
return t(this, c).current;
|
|
123
120
|
}
|
|
124
121
|
get scale() {
|
|
125
|
-
return t(this,
|
|
122
|
+
return t(this, o).current;
|
|
126
123
|
}
|
|
127
124
|
get left() {
|
|
128
125
|
return t(this, d);
|
|
@@ -131,7 +128,7 @@ class Ct {
|
|
|
131
128
|
return t(this, S);
|
|
132
129
|
}
|
|
133
130
|
get front() {
|
|
134
|
-
return t(this,
|
|
131
|
+
return t(this, C);
|
|
135
132
|
}
|
|
136
133
|
get width() {
|
|
137
134
|
return t(this, M);
|
|
@@ -143,19 +140,21 @@ class Ct {
|
|
|
143
140
|
return t(this, P);
|
|
144
141
|
}
|
|
145
142
|
bindObject(s) {
|
|
146
|
-
s.position && t(this, r).bind(s.position), s.rotation && t(this, c).bind(s.rotation), s.scale && t(this,
|
|
143
|
+
s.position && t(this, r).bind(s.position), s.rotation && t(this, c).bind(s.rotation), s.scale && t(this, o).bind(s.scale);
|
|
147
144
|
}
|
|
148
145
|
unbindObject(s) {
|
|
149
|
-
s.position && t(this, r).unbind(s.position), s.rotation && t(this, c).unbind(s.rotation), s.scale && t(this,
|
|
146
|
+
s.position && t(this, r).unbind(s.position), s.rotation && t(this, c).unbind(s.rotation), s.scale && t(this, o).unbind(s.scale);
|
|
150
147
|
}
|
|
151
148
|
setScrollStep(s) {
|
|
152
|
-
return t(this,
|
|
149
|
+
return t(this, m).includes(s) || t(this, m).push(s), () => this.deleteScrollStep(s);
|
|
153
150
|
}
|
|
154
151
|
deleteScrollStep(s) {
|
|
155
|
-
n(this,
|
|
152
|
+
n(this, m, t(this, m).filter(
|
|
153
|
+
(e) => e !== s
|
|
154
|
+
));
|
|
156
155
|
}
|
|
157
156
|
destroy() {
|
|
158
|
-
|
|
157
|
+
j.unsubscribe(t(this, B)), Q.unsubscribe(t(this, W)), t(this, r).close(), t(this, c).close(), t(this, o).close();
|
|
159
158
|
}
|
|
160
159
|
setPositionStep(...s) {
|
|
161
160
|
t(this, r).setStep(...s);
|
|
@@ -164,7 +163,7 @@ class Ct {
|
|
|
164
163
|
t(this, c).setStep(...s);
|
|
165
164
|
}
|
|
166
165
|
setScaleStep(...s) {
|
|
167
|
-
t(this,
|
|
166
|
+
t(this, o).setStep(...s);
|
|
168
167
|
}
|
|
169
168
|
deletePositionStep(...s) {
|
|
170
169
|
t(this, r).deleteStep(...s);
|
|
@@ -173,63 +172,78 @@ class Ct {
|
|
|
173
172
|
t(this, c).deleteStep(...s);
|
|
174
173
|
}
|
|
175
174
|
deleteScaleStep(...s) {
|
|
176
|
-
t(this,
|
|
175
|
+
t(this, o).deleteStep(...s);
|
|
177
176
|
}
|
|
178
177
|
}
|
|
179
|
-
|
|
180
|
-
t(this,
|
|
181
|
-
},
|
|
182
|
-
t(this,
|
|
183
|
-
x: t(this,
|
|
184
|
-
y: t(this,
|
|
185
|
-
z: t(this,
|
|
178
|
+
a = new WeakMap(), f = new WeakMap(), m = new WeakMap(), v = new WeakMap(), R = new WeakMap(), O = new WeakMap(), x = new WeakMap(), w = new WeakMap(), T = new WeakMap(), M = new WeakMap(), _ = new WeakMap(), P = new WeakMap(), S = new WeakMap(), d = new WeakMap(), C = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), Z = new WeakMap(), p = new WeakMap(), y = new WeakMap(), z = new WeakMap(), c = new WeakMap(), r = new WeakMap(), o = new WeakMap(), q = new WeakSet(), G = function() {
|
|
179
|
+
t(this, o).calculate(), t(this, r).calculate(), t(this, c).calculate();
|
|
180
|
+
}, D = new WeakSet(), st = function() {
|
|
181
|
+
t(this, o).setStep("_size", "+", {
|
|
182
|
+
x: t(this, x) ? t(this, M) : 1,
|
|
183
|
+
y: t(this, x) ? t(this, _) : 1,
|
|
184
|
+
z: t(this, x) ? t(this, P) : 1
|
|
186
185
|
});
|
|
187
|
-
const s = t(this,
|
|
186
|
+
const s = t(this, w) ? t(this, X) : 0, e = t(this, w) ? t(this, Y) : 0, l = t(this, w) ? t(this, Z) : 0;
|
|
188
187
|
t(this, r).setStep("_position", "+", {
|
|
189
188
|
x: s,
|
|
190
189
|
y: e,
|
|
191
|
-
z:
|
|
192
|
-
}), t(this,
|
|
190
|
+
z: l
|
|
191
|
+
}), t(this, T) ? (t(this, o).setStep("_scale", "*", {
|
|
193
192
|
x: t(this, z).x,
|
|
194
193
|
y: t(this, z).y,
|
|
195
194
|
z: t(this, z).z
|
|
196
195
|
}), t(this, r).setStep("_translation", "+", {
|
|
197
|
-
x: t(this,
|
|
198
|
-
y: t(this,
|
|
199
|
-
z: t(this,
|
|
196
|
+
x: t(this, p).x,
|
|
197
|
+
y: t(this, p).y,
|
|
198
|
+
z: t(this, p).z
|
|
200
199
|
}), t(this, c).setStep("_rotation", "+", {
|
|
201
200
|
x: t(this, y).x,
|
|
202
201
|
y: t(this, y).y,
|
|
203
202
|
z: t(this, y).z
|
|
204
|
-
})
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
203
|
+
})) : (t(this, o).setStep("_scale", "*", {
|
|
204
|
+
x: 1,
|
|
205
|
+
y: 1,
|
|
206
|
+
z: 1
|
|
207
|
+
}), t(this, r).setStep("_translation", "+", {
|
|
208
|
+
x: 0,
|
|
209
|
+
y: 0,
|
|
210
|
+
z: 0
|
|
211
|
+
}), t(this, c).setStep("_rotation", "+", {
|
|
212
|
+
x: 0,
|
|
213
|
+
y: 0,
|
|
214
|
+
z: 0
|
|
215
|
+
}));
|
|
216
|
+
}, U = new WeakSet(), et = function() {
|
|
217
|
+
const s = getComputedStyle(t(this, a));
|
|
218
|
+
n(this, M, Math.max(t(this, a).clientWidth, 1)), n(this, _, Math.max(t(this, a).clientHeight, 1)), n(this, P, Math.max(
|
|
219
|
+
ot.parse(s.getPropertyValue("--depth") || "0px"),
|
|
220
|
+
1
|
|
221
|
+
));
|
|
222
|
+
const e = $(t(this, f)), l = F(t(this, f)), E = t(this, f).clientWidth, H = t(this, f).clientHeight;
|
|
223
|
+
if (n(this, d, $(t(this, a)) - e), n(this, S, F(t(this, a)) - l), t(this, v) === "z") {
|
|
224
|
+
const b = t(this, d) / E, L = t(this, S) / H;
|
|
225
|
+
n(this, d, (b - Math.floor(b)) * E), n(this, S, (L - Math.floor(L)) * H), t(this, R) === "left" ? n(this, C, $(t(this, a)) - e - t(this, d)) : n(this, C, F(t(this, a)) - l - t(this, S));
|
|
226
|
+
}
|
|
227
|
+
if (n(this, d, t(this, d) + t(this, a).clientLeft), n(this, S, t(this, S) + t(this, a).clientTop), t(this, O)) {
|
|
228
|
+
const b = Math.round(E / 2), L = Math.round(H / 2), ht = t(this, M) ? Math.round(t(this, M) / 2) : 0, nt = t(this, _) ? Math.round(t(this, _) / 2) : 0, rt = t(this, d) - b + ht, lt = (t(this, S) - L + nt) * -1;
|
|
229
|
+
n(this, X, rt), n(this, Y, lt);
|
|
216
230
|
} else
|
|
217
231
|
n(this, X, t(this, d)), n(this, Y, t(this, S));
|
|
218
|
-
n(this,
|
|
219
|
-
const
|
|
220
|
-
t(this,
|
|
221
|
-
},
|
|
222
|
-
for (let s = 0; s < t(this,
|
|
223
|
-
const e = t(this,
|
|
224
|
-
let
|
|
225
|
-
t(this,
|
|
226
|
-
[
|
|
232
|
+
n(this, Z, t(this, C) * -1);
|
|
233
|
+
const K = new WebKitCSSMatrix(s.transform), u = ct(K);
|
|
234
|
+
t(this, p).x = u.translationX, t(this, p).y = u.translationY, t(this, p).z = u.translationZ, t(this, z).x = u.scaleX, t(this, z).y = u.scaleY, t(this, z).z = u.scaleZ, t(this, y).x = u.rotationX, t(this, y).y = u.rotationY, t(this, y).z = u.rotationZ, g(this, D, st).call(this), g(this, q, G).call(this);
|
|
235
|
+
}, k = new WeakSet(), it = function() {
|
|
236
|
+
for (let s = 0; s < t(this, m).length; s++) {
|
|
237
|
+
const e = t(this, m)[s]();
|
|
238
|
+
let l = e.axis;
|
|
239
|
+
t(this, v) !== "auto" && (l = t(this, v)), t(this, r).setStep(`_scroll_${s}`, "+", {
|
|
240
|
+
[l]: e.value * (l === "x" ? -1 : t(this, O) ? 1 : -1)
|
|
227
241
|
});
|
|
228
242
|
}
|
|
229
|
-
},
|
|
243
|
+
}, A = new WeakSet(), J = function(s) {
|
|
230
244
|
return typeof s == "string" ? document.querySelector(s) : s;
|
|
231
|
-
},
|
|
245
|
+
}, W = new WeakMap(), B = new WeakMap();
|
|
232
246
|
export {
|
|
233
|
-
|
|
234
|
-
|
|
247
|
+
Mt as LayoutBox,
|
|
248
|
+
ct as decomposeCSSMatrix
|
|
235
249
|
};
|
package/lib/loading/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty,b=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var S=(s,t,e)=>t in s?p(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,f=(s,t)=>{for(var e in t||(t={}))L.call(t,e)&&S(s,e,t[e]);if(E)for(var e of E(t))N.call(t,e)&&S(s,e,t[e]);return s},c=(s,t)=>b(s,C(t));var w=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var r=(s,t,e)=>(w(s,t,"read from private field"),e?e.call(s):t.get(s)),l=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},v=(s,t,e,o)=>(w(s,t,"write to private field"),o?o.call(s,e):t.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../notifier/index.cjs"),_=require("../function-
|
|
1
|
+
"use strict";var p=Object.defineProperty,b=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var S=(s,t,e)=>t in s?p(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,f=(s,t)=>{for(var e in t||(t={}))L.call(t,e)&&S(s,e,t[e]);if(E)for(var e of E(t))N.call(t,e)&&S(s,e,t[e]);return s},c=(s,t)=>b(s,C(t));var w=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var r=(s,t,e)=>(w(s,t,"read from private field"),e?e.call(s):t.get(s)),l=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},v=(s,t,e,o)=>(w(s,t,"write to private field"),o?o.call(s,e):t.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../notifier/index.cjs"),_=require("../function-MthRj-GJ.cjs");var i,h,a,d,n,u,g;class q{constructor(){l(this,i,new Map);l(this,h,new y.Notifier);l(this,a,new y.Notifier);l(this,d,new y.Notifier);l(this,n,!1);l(this,u,t=>{const{loaded:e,total:o}=this.getStats();r(this,h).notify({progress:e/o,loaded:e,total:o,namespace:t}),r(this,g).call(this)});l(this,g,_.debounce(()=>{const{loaded:t,total:e}=this.getStats();if(t===e){v(this,n,!0);const{total:o}=this.getStats();r(this,a).notify({total:o})}},150))}get progressEvent(){return r(this,h)}get completeEvent(){return r(this,a)}get errorEvent(){return r(this,d)}get _counter(){return r(this,i)}get isComplete(){return r(this,n)}reset(){v(this,n,!1),r(this,i).clear()}setTotal(t,e=1){r(this,n)||r(this,i).set(t,{loaded:0,total:e})}setLoaded(t,e=1){if(!r(this,n)&&r(this,i).has(t)){const o=r(this,i).get(t);o.loaded!==e&&(r(this,i).set(t,c(f({},o),{loaded:e})),r(this,u).call(this,t))}}setError(t,e){if(!r(this,n)&&r(this,i).has(t)){const o=r(this,i).get(t);r(this,i).set(t,c(f({},o),{total:o.total-1})),r(this,d).notify({namespace:t,url:e})}}getStats(){return Array.from(r(this,i)).reduce((t,e)=>({loaded:t.loaded+e[1].loaded,total:t.total+e[1].total}),{loaded:0,total:0})}}i=new WeakMap,h=new WeakMap,a=new WeakMap,d=new WeakMap,n=new WeakMap,u=new WeakMap,g=new WeakMap;const M=new q;exports.loading=M;
|
package/lib/loading/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var r = (s, t, e) => (y(s, t, "read from private field"), e ? e.call(s) : t.get(
|
|
|
20
20
|
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
21
21
|
}, E = (s, t, e, o) => (y(s, t, "write to private field"), o ? o.call(s, e) : t.set(s, e), e);
|
|
22
22
|
import { Notifier as p } from "../notifier/index.js";
|
|
23
|
-
import { d as x } from "../function-
|
|
23
|
+
import { d as x } from "../function-C10DGppn.js";
|
|
24
24
|
var i, l, a, d, n, g, f;
|
|
25
25
|
class A {
|
|
26
26
|
constructor() {
|
package/lib/media/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var d=(e,r,s)=>{if(!r.has(e))throw TypeError("Cannot "+s)};var o=(e,r,s)=>(d(e,r,"read from private field"),s?s.call(e):r.get(e)),c=(e,r,s)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,s)},u=(e,r,s,n)=>(d(e,r,"write to private field"),n?n.call(e,s):r.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../order/index.cjs"),l=require("../window-resizer/index.cjs"),h=require("../Store-D0_rDIsE.cjs");var i,t;class b extends h.Store{constructor(s){super(!1);c(this,i,void 0);c(this,t,void 0);u(this,i,s),u(this,t,l.windowResizer.subscribe(()=>{matchMedia(o(this,i)).matches?this.current=!0:this.current=!1},a.RESIZE_ORDER.MEDIA))}close(){super.close(),o(this,t).call(this)}}i=new WeakMap,t=new WeakMap;exports.Media=b;
|
package/lib/media/index.js
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var a = (e, s, r) => {
|
|
2
|
+
if (!s.has(e))
|
|
3
|
+
throw TypeError("Cannot " + r);
|
|
4
4
|
};
|
|
5
|
-
var o = (
|
|
6
|
-
if (
|
|
5
|
+
var o = (e, s, r) => (a(e, s, "read from private field"), r ? r.call(e) : s.get(e)), c = (e, s, r) => {
|
|
6
|
+
if (s.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
import { RESIZE_ORDER as
|
|
11
|
-
import {
|
|
12
|
-
import { S as f } from "../Store-
|
|
13
|
-
import "../notifier/index.js";
|
|
14
|
-
import "../browser-S4eq8AeN.js";
|
|
15
|
-
import "../function-zwSFehNd.js";
|
|
8
|
+
s instanceof WeakSet ? s.add(e) : s.set(e, r);
|
|
9
|
+
}, u = (e, s, r, m) => (a(e, s, "write to private field"), m ? m.call(e, r) : s.set(e, r), r);
|
|
10
|
+
import { RESIZE_ORDER as h } from "../order/index.js";
|
|
11
|
+
import { windowResizer as n } from "../window-resizer/index.js";
|
|
12
|
+
import { S as f } from "../Store-JOKrNVEr.js";
|
|
16
13
|
var t, i;
|
|
17
|
-
class
|
|
18
|
-
constructor(
|
|
14
|
+
class b extends f {
|
|
15
|
+
constructor(r) {
|
|
19
16
|
super(!1);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
c(this, t, void 0);
|
|
18
|
+
c(this, i, void 0);
|
|
19
|
+
u(this, t, r), u(this, i, n.subscribe(() => {
|
|
23
20
|
matchMedia(o(this, t)).matches ? this.current = !0 : this.current = !1;
|
|
24
|
-
},
|
|
21
|
+
}, h.MEDIA));
|
|
25
22
|
}
|
|
26
23
|
close() {
|
|
27
24
|
super.close(), o(this, i).call(this);
|
|
@@ -29,5 +26,5 @@ class S extends f {
|
|
|
29
26
|
}
|
|
30
27
|
t = new WeakMap(), i = new WeakMap();
|
|
31
28
|
export {
|
|
32
|
-
|
|
29
|
+
b as Media
|
|
33
30
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PopoverElement } from '../popover';
|
|
2
|
+
export declare class ModalElement extends PopoverElement {
|
|
3
|
+
#private;
|
|
4
|
+
constructor();
|
|
5
|
+
protected connectedCallback(): void;
|
|
6
|
+
protected disconnectedCallback(): void;
|
|
7
|
+
}
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementTagNameMap {
|
|
10
|
+
'e-modal': ModalElement;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs"),b=require("../ElementConstructor-9f-12v7T.cjs"),s=require("../htmlTags-BSQys9wH.cjs"),m=require("../createStylesheet-uicRVW05.cjs"),g=require("../browser-CpzFX2xg.cjs"),w=require("../popover/index.cjs"),d=require("../theme/index.cjs");var _=Object.defineProperty,y=Object.getOwnPropertyDescriptor,C=(t,e,o,r)=>{for(var n=r>1?void 0:r?y(e,o):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(n=(r?h(e,o,n):h(n))||n);return r&&n&&_(e,o,n),n},p=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(p(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},f=(t,e,o,r)=>(p(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const k=m.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:d.aptechkaTheme.durationShort.var},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",top:"var(---close-button-top, 0.5em)",right:"var(---close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(---close-button-size, 1.5em)",height:"var(---close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:d.aptechkaTheme.durationShort.var,willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(---close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${d.aptechkaTheme.colorDark.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends w.PopoverElement{constructor(){super(),u(this,i,null),u(this,a,null),g.isBrowser&&(this.openShadow(k),b.element(this,{shadowChildren:s.div({class:"inner",attributes:{outside:!0},children:s.div({class:"content",children:[s.custom("e-popover-button",{attributes:{type:"close",target:this.id},class:"close-button",children:[s.slot({attributes:{name:"close-button"},children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>f(this,a,e)})}),f(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=C([v.define("e-modal")],exports.ModalElement);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ModalElement } from './ModalElement';
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { define as m } from "../custom-element/index.js";
|
|
2
|
+
import { e as w } from "../ElementConstructor-CoKM2CTK.js";
|
|
3
|
+
import { C as d, aW as g, aw as f, az as _ } from "../htmlTags-BCNUG7oK.js";
|
|
4
|
+
import { c as C } from "../createStylesheet-BON7aJYs.js";
|
|
5
|
+
import { i as y } from "../browser-0zX67oeU.js";
|
|
6
|
+
import { PopoverElement as k } from "../popover/index.js";
|
|
7
|
+
import { aptechkaTheme as h } from "../theme/index.js";
|
|
8
|
+
var x = Object.defineProperty, z = Object.getOwnPropertyDescriptor, P = (t, e, o, r) => {
|
|
9
|
+
for (var n = r > 1 ? void 0 : r ? z(e, o) : e, l = t.length - 1, c; l >= 0; l--)
|
|
10
|
+
(c = t[l]) && (n = (r ? c(e, o, n) : c(n)) || n);
|
|
11
|
+
return r && n && x(e, o, n), n;
|
|
12
|
+
}, b = (t, e, o) => {
|
|
13
|
+
if (!e.has(t))
|
|
14
|
+
throw TypeError("Cannot " + o);
|
|
15
|
+
}, i = (t, e, o) => (b(t, e, "read from private field"), o ? o.call(t) : e.get(t)), u = (t, e, o) => {
|
|
16
|
+
if (e.has(t))
|
|
17
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
+
e instanceof WeakSet ? e.add(t) : e.set(t, o);
|
|
19
|
+
}, p = (t, e, o, r) => (b(t, e, "write to private field"), r ? r.call(t, o) : e.set(t, o), o), s, a;
|
|
20
|
+
const S = C({
|
|
21
|
+
":host": {
|
|
22
|
+
position: "fixed",
|
|
23
|
+
top: "0",
|
|
24
|
+
left: "0",
|
|
25
|
+
zIndex: "1",
|
|
26
|
+
width: "100%",
|
|
27
|
+
height: "100%",
|
|
28
|
+
transitionProperty: "opacity",
|
|
29
|
+
transitionDuration: h.durationShort.var
|
|
30
|
+
},
|
|
31
|
+
":host::before": {
|
|
32
|
+
content: '""',
|
|
33
|
+
position: "fixed",
|
|
34
|
+
top: "0",
|
|
35
|
+
left: "0",
|
|
36
|
+
zIndex: "-1",
|
|
37
|
+
width: "100%",
|
|
38
|
+
height: "100%",
|
|
39
|
+
backgroundColor: "var(--backdrop, rgba(0, 0, 0, 0.8))"
|
|
40
|
+
},
|
|
41
|
+
".inner": {
|
|
42
|
+
width: "100%",
|
|
43
|
+
height: "100%",
|
|
44
|
+
display: "flex",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
justifyContent: "center",
|
|
47
|
+
overflow: "hidden auto"
|
|
48
|
+
},
|
|
49
|
+
".overflow .inner": {
|
|
50
|
+
alignItems: "flex-start"
|
|
51
|
+
},
|
|
52
|
+
".content": {
|
|
53
|
+
position: "relative"
|
|
54
|
+
},
|
|
55
|
+
".close-button": {
|
|
56
|
+
position: "absolute",
|
|
57
|
+
top: "var(---close-button-top, 0.5em)",
|
|
58
|
+
right: "var(---close-button-right, 0.5em)",
|
|
59
|
+
background: "none",
|
|
60
|
+
border: "none",
|
|
61
|
+
fontFamily: "inherit",
|
|
62
|
+
fontSize: "inherit",
|
|
63
|
+
fontWeight: "inherit"
|
|
64
|
+
},
|
|
65
|
+
".close-button-default": {
|
|
66
|
+
width: "var(---close-button-size, 1.5em)",
|
|
67
|
+
height: "var(---close-button-size, 1.5em)",
|
|
68
|
+
display: "flex",
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
justifyContent: "center",
|
|
71
|
+
transitionProperty: "transform",
|
|
72
|
+
transitionDuration: h.durationShort.var,
|
|
73
|
+
willChange: "transform"
|
|
74
|
+
},
|
|
75
|
+
".close-button:hover .close-button-default": {
|
|
76
|
+
transform: "scale(0.9)"
|
|
77
|
+
},
|
|
78
|
+
".close-button:active .close-button-default": {
|
|
79
|
+
transform: "scale(0.7)"
|
|
80
|
+
},
|
|
81
|
+
".close-button-default::before, .close-button-default::after": {
|
|
82
|
+
content: '""',
|
|
83
|
+
position: "absolute",
|
|
84
|
+
width: "var(---close-button-thickness, 0.1em)",
|
|
85
|
+
height: "100%",
|
|
86
|
+
backgroundColor: `var(--close-button-color, ${h.colorDark.var})`
|
|
87
|
+
},
|
|
88
|
+
".close-button-default::before": {
|
|
89
|
+
transform: "rotate(-45deg)"
|
|
90
|
+
},
|
|
91
|
+
".close-button-default::after": {
|
|
92
|
+
transform: "rotate(45deg)"
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
let v = class extends k {
|
|
96
|
+
constructor() {
|
|
97
|
+
super(), u(this, s, null), u(this, a, null), y && (this.openShadow(S), w(this, {
|
|
98
|
+
shadowChildren: d({
|
|
99
|
+
class: "inner",
|
|
100
|
+
attributes: {
|
|
101
|
+
outside: !0
|
|
102
|
+
},
|
|
103
|
+
children: d({
|
|
104
|
+
class: "content",
|
|
105
|
+
children: [
|
|
106
|
+
g("e-popover-button", {
|
|
107
|
+
attributes: {
|
|
108
|
+
type: "close",
|
|
109
|
+
target: this.id
|
|
110
|
+
},
|
|
111
|
+
class: "close-button",
|
|
112
|
+
children: [
|
|
113
|
+
f({
|
|
114
|
+
attributes: {
|
|
115
|
+
name: "close-button"
|
|
116
|
+
},
|
|
117
|
+
children: _({ class: "close-button-default" })
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
}),
|
|
121
|
+
f()
|
|
122
|
+
]
|
|
123
|
+
}),
|
|
124
|
+
ref: (t) => p(this, a, t)
|
|
125
|
+
})
|
|
126
|
+
}), p(this, s, new ResizeObserver(() => {
|
|
127
|
+
i(this, a).scrollHeight > i(this, a).clientHeight ? this.classList.add("overflow") : this.classList.remove("overflow");
|
|
128
|
+
})));
|
|
129
|
+
}
|
|
130
|
+
connectedCallback() {
|
|
131
|
+
super.connectedCallback(), i(this, s).observe(this);
|
|
132
|
+
}
|
|
133
|
+
disconnectedCallback() {
|
|
134
|
+
super.disconnectedCallback(), i(this, s).disconnect();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
s = /* @__PURE__ */ new WeakMap();
|
|
138
|
+
a = /* @__PURE__ */ new WeakMap();
|
|
139
|
+
v = P([
|
|
140
|
+
m("e-modal")
|
|
141
|
+
], v);
|
|
142
|
+
export {
|
|
143
|
+
v as ModalElement
|
|
144
|
+
};
|
package/lib/morph/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var st=Object.defineProperty;var U=(i,t)=>(t=Symbol[i])?t:Symbol.for("Symbol."+i);var ot=(i,t,e)=>t in i?st(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var Y=(i,t,e)=>(ot(i,typeof t!="symbol"?t+"":t,e),e),_=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var s=(i,t,e)=>(_(i,t,"read from private field"),e?e.call(i):t.get(i)),o=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},r=(i,t,e,n)=>(_(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e);var d=(i,t,e)=>(_(i,t,"access private method"),e);var F=(i,t,e)=>new Promise((n,h)=>{var u=l=>{try{g(e.next(l))}catch(w){h(w)}},E=l=>{try{g(e.throw(l))}catch(w){h(w)}},g=l=>l.done?n(l.value):Promise.resolve(l.value).then(u,E);g((e=e.apply(i,t)).next())});var V=(i,t,e)=>(t=i[U("asyncIterator")])?t.call(i):(i=i[U("iterator")](),t={},e=(n,h)=>(h=i[n])&&(t[n]=u=>new Promise((E,g,l)=>(u=h.call(i,u),l=u.done,Promise.resolve(u.value).then(w=>E({value:w,done:l}),g)))),e("next"),e("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("../notifier/index.cjs"),nt=require("../browser-
|
|
1
|
+
"use strict";var st=Object.defineProperty;var U=(i,t)=>(t=Symbol[i])?t:Symbol.for("Symbol."+i);var ot=(i,t,e)=>t in i?st(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var Y=(i,t,e)=>(ot(i,typeof t!="symbol"?t+"":t,e),e),_=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var s=(i,t,e)=>(_(i,t,"read from private field"),e?e.call(i):t.get(i)),o=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},r=(i,t,e,n)=>(_(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e);var d=(i,t,e)=>(_(i,t,"access private method"),e);var F=(i,t,e)=>new Promise((n,h)=>{var u=l=>{try{g(e.next(l))}catch(w){h(w)}},E=l=>{try{g(e.throw(l))}catch(w){h(w)}},g=l=>l.done?n(l.value):Promise.resolve(l.value).then(u,E);g((e=e.apply(i,t)).next())});var V=(i,t,e)=>(t=i[U("asyncIterator")])?t.call(i):(i=i[U("iterator")](),t={},e=(n,h)=>(h=i[n])&&(t[n]=u=>new Promise((E,g,l)=>(u=h.call(i,u),l=u.done,Promise.resolve(u.value).then(w=>E({value:w,done:l}),g)))),e("next"),e("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("../notifier/index.cjs"),nt=require("../browser-CpzFX2xg.cjs");var H,f,y,T,N;class rt{constructor(t,e){o(this,H,void 0);o(this,f,void 0);o(this,y,void 0);o(this,T,void 0);o(this,N,t=>{t.preventDefault(),s(this,H).navigate(s(this,y),s(this,T))});r(this,H,e),r(this,f,t),r(this,y,s(this,f).getAttribute("href")||"/"),r(this,T,s(this,f).getAttribute("data-history-action")||"push"),s(this,f).addEventListener("click",s(this,N)),s(this,y)===location.pathname&&s(this,f).classList.add("current")}destroy(){s(this,f).removeEventListener("click",s(this,N)),s(this,f).classList.remove("current")}}H=new WeakMap,f=new WeakMap,y=new WeakMap,T=new WeakMap,N=new WeakMap;var a,P,S,k,C,O,b,v,M,A,x,I,Z,j,$,D,z,q,G,m,p,R,J,B;class ct{constructor(t){o(this,I);o(this,j);o(this,D);o(this,q);o(this,m);o(this,R);o(this,a,null);o(this,P,null);o(this,S,null);o(this,k,null);o(this,C,[]);o(this,O,new DOMParser);o(this,b,new Map);o(this,v,void 0);o(this,M,null);Y(this,"preprocessor");Y(this,"postprocessor");o(this,A,new X.Notifier);o(this,x,new X.Notifier);o(this,B,t=>{t.state&&this.navigate(t.state,"none")});nt.isBrowser&&(r(this,a,(t==null?void 0:t.base)||"/"),t!=null&&t.base?(r(this,a,t.base),t.base.endsWith("/")||r(this,a,s(this,a)+"/")):r(this,a,"/"),r(this,P,(t==null?void 0:t.waitForHeadToLoad)!==!1),r(this,S,(t==null?void 0:t.cachePages)!==!1),r(this,k,d(this,q,G).call(this,document)),r(this,M,location.pathname),d(this,D,z).call(this),addEventListener("popstate",s(this,B)))}beforeNavigationEvent(t){return s(this,A).subscribe(t)}afterNavigationEvent(t){return s(this,x).subscribe(t)}navigate(t,e="push"){return F(this,null,function*(){var h;if(t=d(this,j,$).call(this,t),s(this,v)===t||s(this,M)===t)return;r(this,v,t);const n=s(this,b).has(t);try{let u=!0;if(this.preprocessor)try{yield new Promise((c,L)=>{var W;(W=this.preprocessor)==null||W.call(this,{pathname:t,resolve:c,reject:L,isCached:n})})}catch(c){c?console.error(c):console.log("Route change canceled"),u=!1}if(s(this,A).notify({pathname:t,isCached:n}),!u||s(this,v)!==t)return;const E=yield d(this,I,Z).call(this,t);if(s(this,S)&&s(this,b).set(t,E),s(this,v)!==t)return;const g=Array.from(document.head.children),l=Array.from(E.head.cloneNode(!0).children),w=d(this,m,p).call(this,g,l),tt=d(this,R,J).call(this,g,w),Q=d(this,R,J).call(this,l,w);tt.forEach(c=>c.remove()),Q.forEach(c=>document.head.appendChild(c));const K=Q.filter(c=>c.tagName==="STYLE"||c.tagName==="SCRIPT"||c.tagName==="LINK");s(this,P)&&K.length&&(yield new Promise(c=>F(this,null,function*(){let L=0;try{for(var W=V(K),ut,dt,ft;ut=!(dt=yield W.next()).done;ut=!1){const it=dt.value;it.onload=()=>{L++,L===K.length&&c()}}}catch(dt){ft=[dt]}finally{try{ut&&(dt=W.return)&&(yield dt.call(W))}finally{if(ft)throw ft[0]}}})));const et=d(this,q,G).call(this,E);s(this,k).forEach((c,L)=>{const W=et[L];c.innerHTML=W.innerHTML}),r(this,M,t),e==="push"?history.pushState(t,"",t+location.search):e==="replace"&&history.replaceState(t,"",t+location.search),d(this,D,z).call(this),(h=this.postprocessor)==null||h.call(this,{pathname:t,isCached:n}),s(this,x).notify({pathname:t,isCached:n})}catch(u){console.error(u)}r(this,v,void 0)})}}a=new WeakMap,P=new WeakMap,S=new WeakMap,k=new WeakMap,C=new WeakMap,O=new WeakMap,b=new WeakMap,v=new WeakMap,M=new WeakMap,A=new WeakMap,x=new WeakMap,I=new WeakSet,Z=function(t){return F(this,null,function*(){const e=s(this,b).get(t);if(e)return e;const h=yield(yield fetch(t)).text();return s(this,O).parseFromString(h,"text/html")})},j=new WeakSet,$=function(t){return t=t.replace(s(this,a),""),t.startsWith("/")&&(t=t.slice(1)),s(this,a)+t},D=new WeakSet,z=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(e=>{var n;return(n=e.getAttribute("href"))==null?void 0:n.startsWith("/")});s(this,C).forEach(e=>e.destroy()),r(this,C,t.map(e=>new rt(e,this)))},q=new WeakSet,G=function(t){const e=t.querySelectorAll("[data-morph]");return e.length?[...e]:[t.body]},m=new WeakSet,p=function(t,e){return t.filter(n=>e.find(h=>h.outerHTML===n.outerHTML))},R=new WeakSet,J=function(t,e){return t.filter(n=>!e.find(h=>h.outerHTML===n.outerHTML))},B=new WeakMap;exports.Morph=ct;
|
package/lib/morph/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var F = (i, t, e) => new Promise((n, h) => {
|
|
|
29
29
|
});
|
|
30
30
|
var X = (i, t, e) => (t = i[V("asyncIterator")]) ? t.call(i) : (i = i[V("iterator")](), t = {}, e = (n, h) => (h = i[n]) && (t[n] = (u) => new Promise((L, g, l) => (u = h.call(i, u), l = u.done, Promise.resolve(u.value).then((w) => L({ value: w, done: l }), g)))), e("next"), e("return"), t);
|
|
31
31
|
import { Notifier as Z } from "../notifier/index.js";
|
|
32
|
-
import { i as nt } from "../browser-
|
|
32
|
+
import { i as nt } from "../browser-0zX67oeU.js";
|
|
33
33
|
var M, f, y, T, N;
|
|
34
34
|
class rt {
|
|
35
35
|
constructor(t, e) {
|