aptechka 0.5.42 → 0.7.0
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/Animation-6Na1MCtM.cjs +1 -0
- package/lib/Animation-CELiTw3n.js +132 -0
- package/lib/Composed-DmLYTh1b.js +35 -0
- package/lib/Composed-Dx2hs-va.cjs +1 -0
- package/lib/{Damped-P4MkCGoY.js → Damped-Mx_FNNVz.js} +2 -5
- package/lib/Damped-loFiBsBy.cjs +1 -0
- package/lib/{Derived-kPJs5JC5.js → Derived-DlCvc0xQ.js} +1 -1
- package/lib/{Derived-B-g8dYgh.cjs → Derived-a6MDQEPY.cjs} +1 -1
- package/lib/ElementConstructor-CAZ2ra8m.cjs +1 -0
- package/lib/ElementConstructor-OYlPJf2L.js +366 -0
- package/lib/Resource-D3TQormz.cjs +1 -0
- package/lib/Resource-DIcoALGo.js +64 -0
- package/lib/{SourceManager-Q-PB-Rkh.js → SourceManager-Bz329f90.js} +1 -1
- package/lib/{SourceManager-vSlsMKUE.cjs → SourceManager-kxr5eUyL.cjs} +1 -1
- package/lib/Store-6s0YXK4o.cjs +1 -0
- package/lib/{Store-BQXXikps.js → Store-BI2xxXOA.js} +42 -42
- package/lib/Tweened-B_mclQ61.cjs +1 -0
- package/lib/Tweened-NE8M9onF.js +48 -0
- package/lib/{Viewport-DMB0dO-s.cjs → Viewport-CJeKnL5V.cjs} +1 -1
- package/lib/{Viewport-CFFhFKqX.js → Viewport-D9IL7kUQ.js} +1 -1
- package/lib/_createStore-Cf1MyeHa.cjs +1 -0
- package/lib/_createStore-Ck9bHolX.js +12 -0
- package/lib/accordion/AccordionElement.d.ts +5 -2
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +141 -105
- package/lib/animation/Animation.d.ts +11 -19
- package/lib/animation/Damped.d.ts +4 -6
- package/lib/animation/Tweened.d.ts +2 -4
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +1 -1
- package/lib/attribute/index.js +31 -31
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +1 -1
- package/lib/canvas/index.js +29 -29
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +20 -20
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/AutoplayControls.d.ts +1 -1
- package/lib/controls/DragControls.d.ts +1 -1
- package/lib/controls/WheelControls.d.ts +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +3 -3
- package/lib/counter/index.d.ts +8 -0
- package/lib/{createStylesheet-DBCEbDjI.js → createStylesheet-CR_yi5tp.js} +1 -1
- package/lib/{createStylesheet-CqHU9_qv.cjs → createStylesheet-p23sZ7Ey.cjs} +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +2 -1
- package/lib/css-property/index.js +36 -32
- package/lib/custom-element/index.d.ts +1 -4
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/ElementConstructor.d.ts +2 -2
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +114 -113
- package/lib/en3/core/En3Raycaster.d.ts +20 -0
- package/lib/en3/core/En3View.d.ts +1 -1
- package/lib/en3/core/en3.d.ts +7 -3
- package/lib/en3/helpers/En3Controls.d.ts +5 -0
- package/lib/en3/helpers/En3GridHelper.d.ts +8 -0
- package/lib/en3/helpers/En3Object3dManager.d.ts +12 -0
- package/lib/en3/helpers/En3OrbitControls.d.ts +8 -0
- package/lib/en3/helpers/En3TransformControls.d.ts +8 -0
- package/lib/en3/helpers/index.cjs +1 -0
- package/lib/en3/helpers/index.d.ts +2 -0
- package/lib/en3/helpers/index.js +1165 -0
- package/lib/en3/index.cjs +1 -215
- package/lib/en3/index.d.ts +1 -19
- package/lib/en3/index.js +4 -4227
- package/lib/en3/libs/index.cjs +1 -0
- package/lib/en3/libs/index.d.ts +1 -0
- package/lib/en3/libs/index.js +201 -0
- package/lib/en3/loaders/_En3GLTFLoader.d.ts +12 -0
- package/lib/en3/loaders/_En3TextureLoader.d.ts +8 -0
- package/lib/en3/loaders/index.cjs +1 -0
- package/lib/en3/loaders/index.d.ts +3 -0
- package/lib/en3/loaders/index.js +1757 -0
- package/lib/en3/loaders/loaders.d.ts +13 -0
- package/lib/en3/misc/index.cjs +10 -0
- package/lib/en3/misc/index.d.ts +2 -0
- package/lib/en3/misc/index.js +115 -0
- package/lib/en3/objects/En3Clip.d.ts +1 -1
- package/lib/en3/objects/En3ClipHelpers.d.ts +1 -1
- package/lib/en3/objects/En3GLTF.d.ts +4 -3
- package/lib/en3/objects/En3Image.d.ts +1 -1
- package/lib/en3/objects/En3ImageLike.d.ts +3 -2
- package/lib/en3/objects/En3SourceConsumer.d.ts +1 -1
- package/lib/en3/objects/En3Video.d.ts +1 -1
- package/lib/en3/objects/fluid/Advection.d.ts +1 -1
- package/lib/en3/objects/fluid/Divergence.d.ts +1 -1
- package/lib/en3/objects/fluid/En3Fluid.d.ts +1 -1
- package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -1
- package/lib/en3/objects/fluid/ExternalForce.d.ts +1 -1
- package/lib/en3/objects/fluid/Poisson.d.ts +1 -1
- package/lib/en3/objects/fluid/Pressure.d.ts +1 -1
- package/lib/en3/objects/fluid/Simulation.d.ts +1 -1
- package/lib/en3/objects/fluid/Viscous.d.ts +1 -1
- package/lib/en3/objects/fluid/index.d.ts +0 -3
- package/lib/en3/objects/index.d.ts +7 -0
- package/lib/en3/utils/coverTexture.d.ts +1 -1
- package/lib/en3/utils/index.cjs +1 -0
- package/lib/en3/utils/index.d.ts +5 -0
- package/lib/en3/utils/index.js +43 -0
- package/lib/en3-C4mzaF6q.cjs +8 -0
- package/lib/en3-hbkN1OPu.js +343 -0
- package/lib/globals-DMjysUXI.js +8 -0
- package/lib/globals-bYKki-b9.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/{index-BtsOv9u0.js → index-BAH_fO2N.js} +66 -66
- package/lib/index-D1LQUR-R.cjs +9 -0
- package/lib/instantiate-D19Uvc31.js +125 -0
- package/lib/instantiate-Db5gGSYG.cjs +1 -0
- package/lib/jsx/ComponentElement.d.ts +18 -0
- package/lib/jsx/globals.d.ts +13 -0
- package/lib/jsx/h.d.ts +7 -0
- package/lib/jsx/hooks/basic/_createStore.d.ts +4 -0
- package/lib/jsx/hooks/basic/attachInternals.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachShadow.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachStylesheet.d.ts +3 -0
- package/lib/jsx/hooks/basic/createContext.d.ts +2 -0
- package/lib/jsx/hooks/basic/onConnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onDisconnect.d.ts +3 -0
- package/lib/jsx/hooks/onAnimationFrame.cjs +1 -0
- package/lib/jsx/hooks/onAnimationFrame.d.ts +6 -0
- package/lib/jsx/hooks/onAnimationFrame.js +22 -0
- package/lib/jsx/hooks/onElementResize.cjs +1 -0
- package/lib/jsx/hooks/onElementResize.d.ts +5 -0
- package/lib/jsx/hooks/onElementResize.js +11 -0
- package/lib/jsx/hooks/onIntersection.cjs +1 -0
- package/lib/jsx/hooks/onIntersection.d.ts +5 -0
- package/lib/jsx/hooks/onIntersection.js +11 -0
- package/lib/jsx/hooks/onWindowResize.cjs +1 -0
- package/lib/jsx/hooks/onWindowResize.d.ts +3 -0
- package/lib/jsx/hooks/onWindowResize.js +8 -0
- package/lib/jsx/hooks/store/createArrayStore.d.ts +3 -0
- package/lib/jsx/hooks/store/createComposed.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerived.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedArray.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedComponent.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedComponents.d.ts +3 -0
- package/lib/jsx/hooks/store/createResource.d.ts +3 -0
- package/lib/jsx/hooks/store/createStore.d.ts +3 -0
- package/lib/jsx/hooks/store/index.cjs +1 -0
- package/lib/jsx/hooks/store/index.d.ts +7 -0
- package/lib/jsx/hooks/store/index.js +49 -0
- package/lib/jsx/hooks/watchAttribute.cjs +1 -0
- package/lib/jsx/hooks/watchAttribute.d.ts +6 -0
- package/lib/jsx/hooks/watchAttribute.js +17 -0
- package/lib/jsx/hooks/watchCSSProperty.cjs +1 -0
- package/lib/jsx/hooks/watchCSSProperty.d.ts +7 -0
- package/lib/jsx/hooks/watchCSSProperty.js +17 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +13 -0
- package/lib/jsx/index.js +91 -0
- package/lib/jsx/instantiate.d.ts +5 -0
- package/lib/jsx/register.d.ts +1 -0
- package/lib/jsx/render.d.ts +6 -0
- package/lib/jsx/type.d.ts +188 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.d.ts +2 -0
- package/lib/ladder/index.js +84 -66
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +11 -2
- package/lib/layout-box/index.js +190 -164
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +16 -16
- package/lib/morph/Morph.d.ts +2 -2
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.d.ts +1 -1
- package/lib/morph/index.js +135 -143
- package/lib/notifier/index.d.ts +2 -2
- package/lib/notifier/index.js +3 -1
- package/lib/onConnect-DGP866cj.cjs +1 -0
- package/lib/onConnect-y5DrxJ9P.js +7 -0
- package/lib/pointer/Pointer.d.ts +1 -1
- package/lib/pointer/PointerElement.d.ts +1 -1
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +3 -3
- package/lib/polyfills-CM4SCDTt.cjs +1 -0
- package/lib/polyfills-X6KXuHg-.js +33 -0
- package/lib/popover/PopoverButtonElement.d.ts +1 -1
- package/lib/popover/PopoverElement.d.ts +2 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +49 -49
- package/lib/router/Router.d.ts +11 -3
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.d.ts +1 -1
- package/lib/router/index.js +185 -165
- package/lib/scroll/ScrollElement.d.ts +8 -25
- package/lib/scroll/ScrollSection.d.ts +23 -0
- package/lib/scroll/ScrollSegmentElement.d.ts +3 -3
- package/lib/scroll/ScrollUserElement.d.ts +1 -1
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +87 -83
- package/lib/scroll-entries/index.d.ts +1 -1
- package/lib/select/SelectUserElement.d.ts +1 -1
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.d.ts +1 -1
- package/lib/sequence/index.js +8 -8
- package/lib/slicer/SlicerElement.d.ts +2 -2
- package/lib/slicer/index.cjs +4 -4
- package/lib/slicer/index.js +31 -31
- package/lib/source/SourceElement.d.ts +2 -2
- package/lib/source/SourceManager.d.ts +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/ArrayStore.d.ts +21 -0
- package/lib/store/Store.d.ts +1 -7
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -2
- package/lib/store/index.js +65 -139
- package/lib/tags-BqJKcIve.js +485 -0
- package/lib/tags-ld5jemJw.cjs +1 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/tweaker/TweakerBooleanManagerElement.d.ts +2 -2
- package/lib/tweaker/TweakerColorManagerElement.d.ts +2 -2
- package/lib/tweaker/TweakerElement.d.ts +1 -1
- package/lib/tweaker/TweakerFieldElement.d.ts +2 -2
- package/lib/tweaker/TweakerFolderElement.d.ts +5 -3
- package/lib/tweaker/TweakerLinkManagerElement.d.ts +2 -2
- package/lib/tweaker/TweakerNumberManagerElement.d.ts +4 -8
- package/lib/tweaker/TweakerSelectManagerElement.d.ts +2 -2
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +7 -7
- package/lib/tweaker/TweakerStringManagerElement.d.ts +3 -5
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +535 -412
- package/lib/tweaker/tweakerManagerConstructors.d.ts +2 -2
- package/lib/tweaker/tweakerStorage.d.ts +8 -1
- package/lib/url-C3dWnJQg.cjs +1 -0
- package/lib/url-DMNfW7uN.js +22 -0
- package/lib/utils/function.d.ts +2 -2
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +39 -34
- package/lib/utils/layout.d.ts +1 -1
- package/lib/utils/number.d.ts +1 -0
- package/lib/utils/url.d.ts +9 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +14 -14
- package/package.json +108 -12
- package/lib/Animation-DDHjrbtL.cjs +0 -1
- package/lib/Animation-Dq_05jlR.js +0 -217
- package/lib/Damped-l0mnlhar.cjs +0 -1
- package/lib/Store-C-1ruEIm.cjs +0 -1
- package/lib/Tweened-CwDC2zl8.js +0 -51
- package/lib/Tweened-DIt9j9B-.cjs +0 -1
- package/lib/animation/AnimationLink.d.ts +0 -13
- package/lib/en3/loaders/en3GLTFLoader.d.ts +0 -14
- package/lib/en3/loaders/en3TextureLoader.d.ts +0 -3
- package/lib/en3/test/En3HTML.d.ts +0 -10
- package/lib/index-Buf76Qoq.cjs +0 -9
- package/lib/polyfills-BA-CL_HF.js +0 -27
- package/lib/polyfills-DHs2SNbz.cjs +0 -1
- package/lib/resized/index.cjs +0 -1
- package/lib/resized/index.d.ts +0 -12
- package/lib/resized/index.js +0 -30
- package/lib/store/CumulativeResource.d.ts +0 -13
- package/lib/tags-CMPg9ETZ.js +0 -848
- package/lib/tags-Djb6mb1o.cjs +0 -1
- package/lib/tweaker/TweakerRangeManagerElement.d.ts +0 -11
- package/lib/en3/{loaders → core}/en3Cache.d.ts +0 -0
- package/lib/en3/{test → misc}/En3ModifiedMaterial.d.ts +0 -0
- package/lib/en3/{attachments → misc}/En3SourceManager.d.ts +2 -2
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
var he = Object.defineProperty, ae = Object.defineProperties;
|
|
2
|
+
var ne = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var K = Object.getOwnPropertySymbols;
|
|
4
|
+
var ce = Object.prototype.hasOwnProperty, le = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var U = (h, e, i) => e in h ? he(h, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : h[e] = i, H = (h, e) => {
|
|
6
|
+
for (var i in e || (e = {}))
|
|
7
|
+
ce.call(e, i) && U(h, i, e[i]);
|
|
8
|
+
if (K)
|
|
9
|
+
for (var i of K(e))
|
|
10
|
+
le.call(e, i) && U(h, i, e[i]);
|
|
11
|
+
return h;
|
|
12
|
+
}, X = (h, e) => ae(h, ne(e));
|
|
13
|
+
var Z = (h, e, i) => {
|
|
14
|
+
if (!e.has(h))
|
|
15
|
+
throw TypeError("Cannot " + i);
|
|
16
|
+
};
|
|
17
|
+
var t = (h, e, i) => (Z(h, e, "read from private field"), i ? i.call(h) : e.get(h)), s = (h, e, i) => {
|
|
18
|
+
if (e.has(h))
|
|
19
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
+
e instanceof WeakSet ? e.add(h) : e.set(h, i);
|
|
21
|
+
}, r = (h, e, i, n) => (Z(h, e, "write to private field"), n ? n.call(h, i) : e.set(h, i), i);
|
|
22
|
+
import { RESIZE_ORDER as oe, TICK_ORDER as de } from "./order/index.js";
|
|
23
|
+
import { windowResizer as q } from "./window-resizer/index.js";
|
|
24
|
+
import { ticker as J } from "./ticker/index.js";
|
|
25
|
+
import { g as re } from "./dom-0S_WDL4g.js";
|
|
26
|
+
import { Mesh as ue, OrthographicCamera as Q, PerspectiveCamera as ee, Scene as me, Vector2 as fe, Raycaster as ge, REVISION as Ee, WebGLRenderer as be } from "three";
|
|
27
|
+
import { LayoutBox as te } from "./layout-box/index.js";
|
|
28
|
+
function xe(h) {
|
|
29
|
+
const e = (i) => {
|
|
30
|
+
i.dispose();
|
|
31
|
+
for (const n of Object.keys(i)) {
|
|
32
|
+
const c = i[n];
|
|
33
|
+
c && typeof c == "object" && "minFilter" in c && c.dispose();
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
h.traverse((i) => {
|
|
37
|
+
if (i instanceof ue) {
|
|
38
|
+
if (i.geometry.dispose(), !Array.isArray(i.material) && i.material.isMaterial)
|
|
39
|
+
e(i.material);
|
|
40
|
+
else if (Array.isArray(i.material))
|
|
41
|
+
for (const n of i.material)
|
|
42
|
+
e(n);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
var z, l, D, x, b, L, y, w;
|
|
47
|
+
class ie {
|
|
48
|
+
constructor(e, i) {
|
|
49
|
+
s(this, z, void 0);
|
|
50
|
+
s(this, l, void 0);
|
|
51
|
+
s(this, D, void 0);
|
|
52
|
+
s(this, x, void 0);
|
|
53
|
+
s(this, b, void 0);
|
|
54
|
+
s(this, L, void 0);
|
|
55
|
+
s(this, y, void 0);
|
|
56
|
+
s(this, w, void 0);
|
|
57
|
+
r(this, z, e), r(this, l, (i == null ? void 0 : i.cameraType) === "orthographic" ? new Q() : new ee()), r(this, D, new me()), r(this, x, []), r(this, b, (i == null ? void 0 : i.cameraDistance) || 1e3), t(this, l).near = (i == null ? void 0 : i.cameraNear) || 1, t(this, l).far = (i == null ? void 0 : i.cameraFar) || 11e3, r(this, L, (i == null ? void 0 : i.cameraFov) || "auto"), t(this, l).position.z = t(this, b), t(this, l).name = `Cameras.${t(this, z)}`, r(this, y, re(i == null ? void 0 : i.sizeElement) || document.documentElement), this.beforeRenderCallback = i == null ? void 0 : i.beforeRender, r(this, w, new te(t(this, y))), t(this, w).onResize(() => {
|
|
58
|
+
this.resize();
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
get name() {
|
|
62
|
+
return t(this, z);
|
|
63
|
+
}
|
|
64
|
+
get camera() {
|
|
65
|
+
return t(this, l);
|
|
66
|
+
}
|
|
67
|
+
get scene() {
|
|
68
|
+
return t(this, D);
|
|
69
|
+
}
|
|
70
|
+
get box() {
|
|
71
|
+
return t(this, w);
|
|
72
|
+
}
|
|
73
|
+
get cameraDistance() {
|
|
74
|
+
return t(this, b);
|
|
75
|
+
}
|
|
76
|
+
set cameraDistance(e) {
|
|
77
|
+
r(this, b, e), this.resize();
|
|
78
|
+
}
|
|
79
|
+
get sizeElement() {
|
|
80
|
+
return t(this, y);
|
|
81
|
+
}
|
|
82
|
+
get isClipped() {
|
|
83
|
+
return t(this, y) !== m.containerElement;
|
|
84
|
+
}
|
|
85
|
+
resize() {
|
|
86
|
+
const { width: e, height: i } = t(this, w);
|
|
87
|
+
t(this, l).userData.controlled || (t(this, l).position.z = t(this, b)), t(this, l) instanceof ee ? (t(this, l).aspect = e / i, t(this, l).fov = t(this, L) === "auto" ? 2 * Math.atan(i / 2 / t(this, b)) * (180 / Math.PI) : t(this, L)) : t(this, l) instanceof Q && (t(this, l).left = e / -2, t(this, l).right = e / 2, t(this, l).top = i / 2, t(this, l).bottom = i / -2), t(this, l).updateProjectionMatrix();
|
|
88
|
+
}
|
|
89
|
+
destroy() {
|
|
90
|
+
t(this, x).forEach((e) => {
|
|
91
|
+
e.userData.box.destroy();
|
|
92
|
+
}), t(this, D).clear(), xe(t(this, D)), m.destroyView(this.name), t(this, w).destroy();
|
|
93
|
+
}
|
|
94
|
+
attachToHTMLElement(e, i, n) {
|
|
95
|
+
const c = new te(e, X(H({}, n), {
|
|
96
|
+
containerElement: t(this, y),
|
|
97
|
+
cartesian: !0,
|
|
98
|
+
scrollStep: !this.isClipped
|
|
99
|
+
}));
|
|
100
|
+
return c.bindObject(i), i.userData.box = c, t(this, x).push(i), i;
|
|
101
|
+
}
|
|
102
|
+
detachFromHTMLElement(e) {
|
|
103
|
+
r(this, x, t(this, x).filter((i) => i === e ? (e.userData.box.destroy(), !1) : !0));
|
|
104
|
+
}
|
|
105
|
+
add(...e) {
|
|
106
|
+
const i = e[0], n = e[1], c = e[2];
|
|
107
|
+
return n && this.attachToHTMLElement(n, i, c), this.scene.add(i), i;
|
|
108
|
+
}
|
|
109
|
+
remove(e, i) {
|
|
110
|
+
this.scene.remove(e), i && this.detachFromHTMLElement(e);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
z = new WeakMap(), l = new WeakMap(), D = new WeakMap(), x = new WeakMap(), b = new WeakMap(), L = new WeakMap(), y = new WeakMap(), w = new WeakMap();
|
|
114
|
+
const se = /* @__PURE__ */ new Map();
|
|
115
|
+
var v, O, P, p, j;
|
|
116
|
+
class ye {
|
|
117
|
+
constructor(e) {
|
|
118
|
+
s(this, v, void 0);
|
|
119
|
+
s(this, O, void 0);
|
|
120
|
+
s(this, P, void 0);
|
|
121
|
+
s(this, p, void 0);
|
|
122
|
+
s(this, j, void 0);
|
|
123
|
+
r(this, v, e.targetName || void 0), r(this, O, e.eventDispatcher || e.object3D), r(this, P, e.propagation || !1), r(this, p, e.object3D), r(this, j, t(this, v) ? () => t(this, p).getObjectByName(t(this, v)) || t(this, p) : () => t(this, p));
|
|
124
|
+
}
|
|
125
|
+
get object3D() {
|
|
126
|
+
return t(this, p);
|
|
127
|
+
}
|
|
128
|
+
get eventDispatcher() {
|
|
129
|
+
return t(this, O);
|
|
130
|
+
}
|
|
131
|
+
get propagation() {
|
|
132
|
+
return t(this, P);
|
|
133
|
+
}
|
|
134
|
+
get target() {
|
|
135
|
+
return t(this, j).call(this);
|
|
136
|
+
}
|
|
137
|
+
dispatch(e, i) {
|
|
138
|
+
this.eventDispatcher.dispatchEvent(H({
|
|
139
|
+
originalEvent: i,
|
|
140
|
+
type: e
|
|
141
|
+
}, this.intersection));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
v = new WeakMap(), O = new WeakMap(), P = new WeakMap(), p = new WeakMap(), j = new WeakMap();
|
|
145
|
+
var f, d, C, k, A, F, N;
|
|
146
|
+
class we {
|
|
147
|
+
constructor() {
|
|
148
|
+
s(this, f, []);
|
|
149
|
+
s(this, d, []);
|
|
150
|
+
s(this, C, new fe());
|
|
151
|
+
s(this, k, new ge());
|
|
152
|
+
s(this, A, (e) => {
|
|
153
|
+
for (let i = 0; i < t(this, d).length; i++)
|
|
154
|
+
t(this, d)[i].dispatch("pointerDown", e);
|
|
155
|
+
});
|
|
156
|
+
s(this, F, (e) => {
|
|
157
|
+
for (let i = 0; i < t(this, d).length; i++)
|
|
158
|
+
t(this, d)[i].dispatch("pointerUp", e);
|
|
159
|
+
});
|
|
160
|
+
s(this, N, (e) => {
|
|
161
|
+
if (!t(this, f).length)
|
|
162
|
+
return;
|
|
163
|
+
t(this, C).x = e.clientX / m.width * 2 - 1, t(this, C).y = -(e.clientY / m.height) * 2 + 1, m.camera && t(this, k).setFromCamera(t(this, C), m.camera);
|
|
164
|
+
const i = [];
|
|
165
|
+
for (const a of t(this, f)) {
|
|
166
|
+
const E = t(this, k).intersectObject(a.target);
|
|
167
|
+
E.length && (a.intersection = E[0], i.push(a));
|
|
168
|
+
}
|
|
169
|
+
let n = !1;
|
|
170
|
+
const c = t(this, d).filter(
|
|
171
|
+
(a) => !i.find((E) => E.object3D.uuid === a.object3D.uuid)
|
|
172
|
+
), W = i.sort(
|
|
173
|
+
(a, E) => E.object3D.position.z - a.object3D.position.z
|
|
174
|
+
).filter((a, E) => n ? (c.push(a), !1) : (n = !a.propagation, !0)), _ = W.filter(
|
|
175
|
+
(a) => !t(this, d).find((E) => E.object3D.uuid === a.object3D.uuid)
|
|
176
|
+
);
|
|
177
|
+
for (let a = 0; a < c.length; a++)
|
|
178
|
+
c[a].dispatch("pointerLeave", e);
|
|
179
|
+
for (let a = 0; a < _.length; a++)
|
|
180
|
+
_[a].dispatch("pointerEnter", e);
|
|
181
|
+
r(this, d, W);
|
|
182
|
+
for (let a = 0; a < t(this, d).length; a++)
|
|
183
|
+
t(this, d)[a].dispatch("pointerMove", e);
|
|
184
|
+
});
|
|
185
|
+
m.containerElement.addEventListener(
|
|
186
|
+
"pointerdown",
|
|
187
|
+
t(this, A)
|
|
188
|
+
), m.containerElement.addEventListener("pointerup", t(this, F)), m.containerElement.addEventListener(
|
|
189
|
+
"pointermove",
|
|
190
|
+
t(this, N)
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
destroy() {
|
|
194
|
+
m.containerElement.removeEventListener(
|
|
195
|
+
"pointerdown",
|
|
196
|
+
t(this, A)
|
|
197
|
+
), m.containerElement.removeEventListener(
|
|
198
|
+
"pointerup",
|
|
199
|
+
t(this, F)
|
|
200
|
+
), m.containerElement.removeEventListener(
|
|
201
|
+
"pointermove",
|
|
202
|
+
t(this, N)
|
|
203
|
+
), r(this, f, []), r(this, d, []);
|
|
204
|
+
}
|
|
205
|
+
add(e, i) {
|
|
206
|
+
if (t(this, f).find((c) => c.object3D.uuid === e.uuid))
|
|
207
|
+
return;
|
|
208
|
+
const n = new ye(H({
|
|
209
|
+
object3D: e
|
|
210
|
+
}, i));
|
|
211
|
+
t(this, f).push(n);
|
|
212
|
+
}
|
|
213
|
+
remove(e) {
|
|
214
|
+
r(this, f, t(this, f).filter(
|
|
215
|
+
(i) => i.object3D.uuid !== e.uuid
|
|
216
|
+
)), r(this, d, t(this, d).filter((i) => i.object3D.uuid !== e.uuid));
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
f = new WeakMap(), d = new WeakMap(), C = new WeakMap(), k = new WeakMap(), A = new WeakMap(), F = new WeakMap(), N = new WeakMap();
|
|
220
|
+
var G, g, o, T, u, V, M, S, I, R, Y, $, B;
|
|
221
|
+
class pe {
|
|
222
|
+
constructor() {
|
|
223
|
+
s(this, G, `https://unpkg.com/three@0.${Ee}.x`);
|
|
224
|
+
s(this, g, null);
|
|
225
|
+
s(this, o, null);
|
|
226
|
+
s(this, T, null);
|
|
227
|
+
s(this, u, /* @__PURE__ */ new Map());
|
|
228
|
+
s(this, V, 0);
|
|
229
|
+
s(this, M, 0);
|
|
230
|
+
s(this, S, 0);
|
|
231
|
+
s(this, I, 2);
|
|
232
|
+
s(this, R, !1);
|
|
233
|
+
s(this, Y, !1);
|
|
234
|
+
s(this, $, () => {
|
|
235
|
+
r(this, V, t(this, g).clientWidth), r(this, M, t(this, g).clientHeight), r(this, S, Math.min(t(this, I), devicePixelRatio || 1)), t(this, o).setPixelRatio(t(this, S)), t(this, o).setSize(t(this, V), t(this, M));
|
|
236
|
+
});
|
|
237
|
+
s(this, B, () => {
|
|
238
|
+
t(this, o).setRenderTarget(null), t(this, u).forEach((e) => {
|
|
239
|
+
this.render(e);
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
get CDNVersion() {
|
|
244
|
+
return t(this, G);
|
|
245
|
+
}
|
|
246
|
+
get containerElement() {
|
|
247
|
+
return t(this, g);
|
|
248
|
+
}
|
|
249
|
+
get webglRenderer() {
|
|
250
|
+
return t(this, o);
|
|
251
|
+
}
|
|
252
|
+
get raycaster() {
|
|
253
|
+
return t(this, T);
|
|
254
|
+
}
|
|
255
|
+
get views() {
|
|
256
|
+
return t(this, u);
|
|
257
|
+
}
|
|
258
|
+
get view() {
|
|
259
|
+
return this.getView("default");
|
|
260
|
+
}
|
|
261
|
+
get camera() {
|
|
262
|
+
return this.getView("default").camera;
|
|
263
|
+
}
|
|
264
|
+
get scene() {
|
|
265
|
+
return this.getView("default").scene;
|
|
266
|
+
}
|
|
267
|
+
get width() {
|
|
268
|
+
return t(this, V);
|
|
269
|
+
}
|
|
270
|
+
get height() {
|
|
271
|
+
return t(this, M);
|
|
272
|
+
}
|
|
273
|
+
get pixelRatio() {
|
|
274
|
+
return t(this, S);
|
|
275
|
+
}
|
|
276
|
+
get cacheAssets() {
|
|
277
|
+
return t(this, Y);
|
|
278
|
+
}
|
|
279
|
+
setup(e) {
|
|
280
|
+
if (t(this, R)) {
|
|
281
|
+
console.warn("[en3.setup]: You are trying to setup en3 again.");
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
r(this, g, re(e == null ? void 0 : e.containerElement) || document.body), r(this, I, (e == null ? void 0 : e.maxPixelRatio) || 2), r(this, o, new be(e == null ? void 0 : e.webGLRendererParameters)), t(this, o).domElement.style.cssText = `
|
|
285
|
+
position: fixed;
|
|
286
|
+
left: 0;
|
|
287
|
+
top: 0;
|
|
288
|
+
width: 100%;
|
|
289
|
+
height: 100%;
|
|
290
|
+
z-index: ${(e == null ? void 0 : e.zIndex) || 0};
|
|
291
|
+
`, (t(this, g).shadowRoot || t(this, g)).append(t(this, o).domElement), t(this, u).set(
|
|
292
|
+
"default",
|
|
293
|
+
new ie("default", H({
|
|
294
|
+
sizeElement: t(this, g)
|
|
295
|
+
}, e == null ? void 0 : e.view))
|
|
296
|
+
), r(this, T, new we()), r(this, Y, (e == null ? void 0 : e.cacheAssets) || !1), r(this, R, !0), q.subscribe(t(this, $), oe.EN3), J.subscribe(t(this, B), { order: de.EN3 });
|
|
297
|
+
}
|
|
298
|
+
destroy() {
|
|
299
|
+
if (!t(this, R)) {
|
|
300
|
+
console.warn(
|
|
301
|
+
"[en3.setup]: You are trying to destory en3 but it has not been initialized."
|
|
302
|
+
);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
q.unsubscribe(t(this, $)), J.unsubscribe(t(this, B)), t(this, T).destroy(), t(this, u).forEach((e) => {
|
|
306
|
+
e.destroy();
|
|
307
|
+
}), t(this, o).dispose(), t(this, o).domElement.remove(), r(this, o, null), r(this, R, !1), se.forEach((e) => {
|
|
308
|
+
e.dispose();
|
|
309
|
+
}), se.clear();
|
|
310
|
+
}
|
|
311
|
+
createView(e, i) {
|
|
312
|
+
const n = t(this, u).size, c = new ie(e, i);
|
|
313
|
+
return t(this, u).set(e, c), n === 1 && t(this, o).setScissorTest(!0), c;
|
|
314
|
+
}
|
|
315
|
+
getView(e) {
|
|
316
|
+
return t(this, u).get(e);
|
|
317
|
+
}
|
|
318
|
+
destroyView(e) {
|
|
319
|
+
const i = t(this, u).get(e);
|
|
320
|
+
i && (t(this, u).delete(e), i.destroy(), t(this, u).size <= 1 && t(this, o).setScissorTest(!1));
|
|
321
|
+
}
|
|
322
|
+
render(e) {
|
|
323
|
+
var i;
|
|
324
|
+
if (t(this, u).size > 1 || this.view.isClipped) {
|
|
325
|
+
const n = e.box.left + e.box.CSSTranslation.x + e.box.scrollValue.x, c = m.height - e.box.height - e.box.top + e.box.CSSTranslation.y + e.box.scrollValue.y * -1;
|
|
326
|
+
t(this, o).setScissor(n, c, e.box.width, e.box.height), t(this, o).setViewport(
|
|
327
|
+
n,
|
|
328
|
+
c,
|
|
329
|
+
e.box.width,
|
|
330
|
+
e.box.height
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
(i = e.beforeRenderCallback) == null || i.call(e), t(this, o).render(e.scene, e.camera);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
G = new WeakMap(), g = new WeakMap(), o = new WeakMap(), T = new WeakMap(), u = new WeakMap(), V = new WeakMap(), M = new WeakMap(), S = new WeakMap(), I = new WeakMap(), R = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), B = new WeakMap();
|
|
337
|
+
const m = new pe();
|
|
338
|
+
export {
|
|
339
|
+
ie as E,
|
|
340
|
+
se as a,
|
|
341
|
+
xe as d,
|
|
342
|
+
m as e
|
|
343
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t={value:null},n={value:null},e={value:[]};exports.contextStack=e;exports.currentComponentElement=t;exports.nextComponentAttributes=n;
|
package/lib/image/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-6s0YXK4o.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=(n,r,m,t)=>{for(var e=t>1?void 0:t?i(r,m):r,s=n.length-1,u;s>=0;s--)(u=n[s])&&(e=(t?u(r,m,e):u(e))||e);return t&&e&&l(r,m,e),e};exports.ImageElement=class extends o.SourceElement{createConsumer(){return document.createElement("img")}consumeSource(r){this.consumerElement.src=r||""}};exports.ImageElement=a([c.define("e-image")],exports.ImageElement);
|
package/lib/image/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { define as p } from "../custom-element/index.js";
|
|
2
2
|
import "../window-resizer/index.js";
|
|
3
|
-
import "../Store-
|
|
3
|
+
import "../Store-BI2xxXOA.js";
|
|
4
4
|
import { SourceElement as l } from "../source/index.js";
|
|
5
5
|
var u = Object.defineProperty, f = Object.getOwnPropertyDescriptor, i = (r, t, o, m) => {
|
|
6
6
|
for (var e = m > 1 ? void 0 : m ? f(t, o) : t, n = r.length - 1, s; n >= 0; n--)
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
var A = (
|
|
2
|
-
if (!
|
|
1
|
+
var A = (t, e, s) => {
|
|
2
|
+
if (!e.has(t))
|
|
3
3
|
throw TypeError("Cannot " + s);
|
|
4
4
|
};
|
|
5
|
-
var H = (
|
|
6
|
-
if (
|
|
5
|
+
var H = (t, e, s) => (A(t, e, "read from private field"), s ? s.call(t) : e.get(t)), I = (t, e, s) => {
|
|
6
|
+
if (e.has(t))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
}, G = (
|
|
10
|
-
import { CustomElement as U, define as
|
|
11
|
-
import "./Store-
|
|
8
|
+
e instanceof WeakSet ? e.add(t) : e.set(t, s);
|
|
9
|
+
}, G = (t, e, s, a) => (A(t, e, "write to private field"), a ? a.call(t, s) : e.set(t, s), s);
|
|
10
|
+
import { CustomElement as U, define as W } from "./custom-element/index.js";
|
|
11
|
+
import "./Store-BI2xxXOA.js";
|
|
12
12
|
import { i as P } from "./browser-0zX67oeU.js";
|
|
13
13
|
import { d as J } from "./events-_C2CztxR.js";
|
|
14
14
|
import { a as Q } from "./style-CklEF62D.js";
|
|
15
|
-
import { e as T, p as X,
|
|
16
|
-
import { c as D } from "./createStylesheet-
|
|
15
|
+
import { e as T, p as X, ax as w, D as R } from "./tags-BqJKcIve.js";
|
|
16
|
+
import { c as D } from "./createStylesheet-CR_yi5tp.js";
|
|
17
17
|
import { aptechkaTheme as j } from "./theme/index.js";
|
|
18
|
-
var ee = Object.defineProperty, te = Object.getOwnPropertyDescriptor, se = (
|
|
19
|
-
for (var
|
|
20
|
-
(l =
|
|
21
|
-
return
|
|
22
|
-
}, z = (
|
|
23
|
-
if (!
|
|
18
|
+
var ee = Object.defineProperty, te = Object.getOwnPropertyDescriptor, se = (t, e, s, a) => {
|
|
19
|
+
for (var i = a > 1 ? void 0 : a ? te(e, s) : e, r = t.length - 1, l; r >= 0; r--)
|
|
20
|
+
(l = t[r]) && (i = (a ? l(e, s, i) : l(i)) || i);
|
|
21
|
+
return a && i && ee(e, s, i), i;
|
|
22
|
+
}, z = (t, e, s) => {
|
|
23
|
+
if (!e.has(t))
|
|
24
24
|
throw TypeError("Cannot " + s);
|
|
25
|
-
}, n = (
|
|
26
|
-
if (
|
|
25
|
+
}, n = (t, e, s) => (z(t, e, "read from private field"), s ? s.call(t) : e.get(t)), h = (t, e, s) => {
|
|
26
|
+
if (e.has(t))
|
|
27
27
|
throw TypeError("Cannot add the same private member more than once");
|
|
28
|
-
|
|
29
|
-
}, c = (
|
|
28
|
+
e instanceof WeakSet ? e.add(t) : e.set(t, s);
|
|
29
|
+
}, c = (t, e, s, a) => (z(t, e, "write to private field"), e.set(t, s), s), q = (t, e, s) => (z(t, e, "access private method"), s), v, u, o, p, f, g, b, y, L;
|
|
30
30
|
const ie = D({
|
|
31
31
|
":host": {
|
|
32
32
|
position: "relative"
|
|
@@ -62,11 +62,11 @@ const ie = D({
|
|
|
62
62
|
paddingTop: "var(--gap, 0px)"
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
let
|
|
65
|
+
let M = class extends U {
|
|
66
66
|
constructor() {
|
|
67
|
-
super(), h(this, y), h(this, v, null), h(this, u, ""), h(this, o, null), h(this, p, !1), h(this, f, void 0), h(this, g, null), h(this,
|
|
67
|
+
super(), h(this, y), h(this, v, null), h(this, u, ""), h(this, o, null), h(this, p, !1), h(this, f, void 0), h(this, g, null), h(this, b, () => {
|
|
68
68
|
J(this);
|
|
69
|
-
}), P && (this.openShadow(ie), c(this, v, this.attachInternals()), c(this, g, new ResizeObserver(n(this,
|
|
69
|
+
}), P && (this.openShadow(ie), c(this, v, this.attachInternals()), c(this, g, new ResizeObserver(n(this, b))), T(this, {
|
|
70
70
|
children: [
|
|
71
71
|
X({
|
|
72
72
|
class: "head",
|
|
@@ -84,8 +84,8 @@ let O = class extends U {
|
|
|
84
84
|
class: "body-inner",
|
|
85
85
|
children: w()
|
|
86
86
|
}),
|
|
87
|
-
ref: (
|
|
88
|
-
c(this, o,
|
|
87
|
+
ref: (t) => {
|
|
88
|
+
c(this, o, t);
|
|
89
89
|
}
|
|
90
90
|
})
|
|
91
91
|
]
|
|
@@ -94,8 +94,8 @@ let O = class extends U {
|
|
|
94
94
|
get value() {
|
|
95
95
|
return n(this, u);
|
|
96
96
|
}
|
|
97
|
-
set value(
|
|
98
|
-
c(this, u,
|
|
97
|
+
set value(t) {
|
|
98
|
+
c(this, u, t), this.dispatchEvent(
|
|
99
99
|
new Event("change", {
|
|
100
100
|
bubbles: !0,
|
|
101
101
|
composed: !0
|
|
@@ -110,11 +110,11 @@ let O = class extends U {
|
|
|
110
110
|
}
|
|
111
111
|
open() {
|
|
112
112
|
clearTimeout(n(this, f)), c(this, p, !0), n(this, o).style.display = "grid", this.classList.add("triggered"), setTimeout(() => {
|
|
113
|
-
this.classList.add("opened"), n(this, o).style.height = n(this, o).scrollHeight + "px", q(this, y,
|
|
113
|
+
this.classList.add("opened"), n(this, o).style.height = n(this, o).scrollHeight + "px", q(this, y, L).call(this);
|
|
114
114
|
}, 0);
|
|
115
115
|
}
|
|
116
116
|
close() {
|
|
117
|
-
c(this, p, !1), n(this, o).style.height = "0px", this.classList.remove("opened"), q(this, y,
|
|
117
|
+
c(this, p, !1), n(this, o).style.height = "0px", this.classList.remove("opened"), q(this, y, L).call(this), c(this, f, setTimeout(() => {
|
|
118
118
|
this.classList.remove("triggered"), n(this, o).style.display = "none";
|
|
119
119
|
}, Q(n(this, o))));
|
|
120
120
|
}
|
|
@@ -131,9 +131,9 @@ o = /* @__PURE__ */ new WeakMap();
|
|
|
131
131
|
p = /* @__PURE__ */ new WeakMap();
|
|
132
132
|
f = /* @__PURE__ */ new WeakMap();
|
|
133
133
|
g = /* @__PURE__ */ new WeakMap();
|
|
134
|
-
|
|
134
|
+
b = /* @__PURE__ */ new WeakMap();
|
|
135
135
|
y = /* @__PURE__ */ new WeakSet();
|
|
136
|
-
|
|
136
|
+
L = function() {
|
|
137
137
|
this.dispatchEvent(
|
|
138
138
|
new CustomEvent("selectToggle", {
|
|
139
139
|
bubbles: !0,
|
|
@@ -144,10 +144,10 @@ M = function() {
|
|
|
144
144
|
})
|
|
145
145
|
);
|
|
146
146
|
};
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
],
|
|
147
|
+
M.formAssociated = !0;
|
|
148
|
+
M = se([
|
|
149
|
+
W("e-select")
|
|
150
|
+
], M);
|
|
151
151
|
var E;
|
|
152
152
|
class V extends U {
|
|
153
153
|
constructor() {
|
|
@@ -158,24 +158,24 @@ class V extends U {
|
|
|
158
158
|
return H(this, E);
|
|
159
159
|
}
|
|
160
160
|
connectedCallback() {
|
|
161
|
-
var
|
|
162
|
-
const s = (
|
|
161
|
+
var a, i;
|
|
162
|
+
const s = (i = (a = this.assignedSlot) == null ? void 0 : a.getRootNode()) == null ? void 0 : i.host;
|
|
163
163
|
s ? G(this, E, s) : console.log(this, "e-select not found");
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
E = new WeakMap();
|
|
167
|
-
var ae = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, re = (
|
|
168
|
-
for (var
|
|
169
|
-
(l =
|
|
170
|
-
return
|
|
171
|
-
}, Y = (
|
|
172
|
-
if (!
|
|
167
|
+
var ae = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, re = (t, e, s, a) => {
|
|
168
|
+
for (var i = a > 1 ? void 0 : a ? ne(e, s) : e, r = t.length - 1, l; r >= 0; r--)
|
|
169
|
+
(l = t[r]) && (i = (a ? l(e, s, i) : l(i)) || i);
|
|
170
|
+
return a && i && ae(e, s, i), i;
|
|
171
|
+
}, Y = (t, e, s) => {
|
|
172
|
+
if (!e.has(t))
|
|
173
173
|
throw TypeError("Cannot " + s);
|
|
174
|
-
}, k = (
|
|
175
|
-
if (
|
|
174
|
+
}, k = (t, e, s) => (Y(t, e, "read from private field"), s ? s.call(t) : e.get(t)), B = (t, e, s) => {
|
|
175
|
+
if (e.has(t))
|
|
176
176
|
throw TypeError("Cannot add the same private member more than once");
|
|
177
|
-
|
|
178
|
-
}, F = (
|
|
177
|
+
e instanceof WeakSet ? e.add(t) : e.set(t, s);
|
|
178
|
+
}, F = (t, e, s) => (Y(t, e, "access private method"), s), m, C, O;
|
|
179
179
|
const le = D({
|
|
180
180
|
":host": {
|
|
181
181
|
width: "100%",
|
|
@@ -191,10 +191,10 @@ let K = class extends V {
|
|
|
191
191
|
}), P && (this.openShadow(le), T(this, {
|
|
192
192
|
tabindex: 0,
|
|
193
193
|
onClick: () => {
|
|
194
|
-
F(this, C,
|
|
194
|
+
F(this, C, O).call(this);
|
|
195
195
|
},
|
|
196
|
-
onKeydown: (
|
|
197
|
-
|
|
196
|
+
onKeydown: (t) => {
|
|
197
|
+
t.code === "Space" && F(this, C, O).call(this);
|
|
198
198
|
},
|
|
199
199
|
children: w()
|
|
200
200
|
}));
|
|
@@ -213,11 +213,11 @@ let K = class extends V {
|
|
|
213
213
|
};
|
|
214
214
|
m = /* @__PURE__ */ new WeakMap();
|
|
215
215
|
C = /* @__PURE__ */ new WeakSet();
|
|
216
|
-
|
|
216
|
+
O = function() {
|
|
217
217
|
this.selectElement.value = this.value, this.selectElement.close();
|
|
218
218
|
};
|
|
219
219
|
K = re([
|
|
220
|
-
|
|
220
|
+
W("e-select-option")
|
|
221
221
|
], K);
|
|
222
222
|
const oe = `<svg
|
|
223
223
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -228,18 +228,18 @@ const oe = `<svg
|
|
|
228
228
|
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
229
229
|
</svg>
|
|
230
230
|
`;
|
|
231
|
-
var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, de = (
|
|
232
|
-
for (var
|
|
233
|
-
(l =
|
|
234
|
-
return
|
|
235
|
-
}, Z = (
|
|
236
|
-
if (!
|
|
231
|
+
var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, de = (t, e, s, a) => {
|
|
232
|
+
for (var i = a > 1 ? void 0 : a ? ce(e, s) : e, r = t.length - 1, l; r >= 0; r--)
|
|
233
|
+
(l = t[r]) && (i = (a ? l(e, s, i) : l(i)) || i);
|
|
234
|
+
return a && i && he(e, s, i), i;
|
|
235
|
+
}, Z = (t, e, s) => {
|
|
236
|
+
if (!e.has(t))
|
|
237
237
|
throw TypeError("Cannot " + s);
|
|
238
|
-
}, d = (
|
|
239
|
-
if (
|
|
238
|
+
}, d = (t, e, s) => (Z(t, e, "read from private field"), s ? s.call(t) : e.get(t)), $ = (t, e, s) => {
|
|
239
|
+
if (e.has(t))
|
|
240
240
|
throw TypeError("Cannot add the same private member more than once");
|
|
241
|
-
|
|
242
|
-
}, pe = (
|
|
241
|
+
e instanceof WeakSet ? e.add(t) : e.set(t, s);
|
|
242
|
+
}, pe = (t, e, s, a) => (Z(t, e, "write to private field"), e.set(t, s), s), S, _, x;
|
|
243
243
|
const ve = D({
|
|
244
244
|
":host": {
|
|
245
245
|
width: "100%",
|
|
@@ -263,10 +263,10 @@ const ve = D({
|
|
|
263
263
|
let N = class extends V {
|
|
264
264
|
constructor() {
|
|
265
265
|
super(), $(this, S, null), $(this, _, () => {
|
|
266
|
-
const
|
|
266
|
+
const e = this.selectElement.shadowRoot.querySelector(
|
|
267
267
|
".body slot"
|
|
268
268
|
).assignedElements().find((s) => s.value === this.selectElement.value);
|
|
269
|
-
|
|
269
|
+
e && (d(this, S).innerHTML = e.innerHTML);
|
|
270
270
|
}), $(this, x, () => {
|
|
271
271
|
this.classList.toggle("opened", this.selectElement.opened);
|
|
272
272
|
}), P && (this.openShadow(ve), T(this, {
|
|
@@ -290,10 +290,10 @@ S = /* @__PURE__ */ new WeakMap();
|
|
|
290
290
|
_ = /* @__PURE__ */ new WeakMap();
|
|
291
291
|
x = /* @__PURE__ */ new WeakMap();
|
|
292
292
|
N = de([
|
|
293
|
-
|
|
293
|
+
W("e-select-head")
|
|
294
294
|
], N);
|
|
295
295
|
export {
|
|
296
|
-
|
|
296
|
+
M as S,
|
|
297
297
|
oe as a,
|
|
298
298
|
V as b,
|
|
299
299
|
K as c,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";var D=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var z=(t,e,s)=>(D(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(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)},H=(t,e,s,n)=>(D(t,e,"write to private field"),n?n.call(t,s):e.set(t,s),s);const y=require("./custom-element/index.cjs");require("./Store-6s0YXK4o.cjs");const M=require("./browser-CpzFX2xg.cjs"),K=require("./events-Crwi8fz6.cjs"),N=require("./style-At6aDoqG.cjs"),a=require("./tags-ld5jemJw.cjs"),W=require("./createStylesheet-p23sZ7Ey.cjs"),V=require("./theme/index.cjs");var Y=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,J=(t,e,s,n)=>{for(var i=n>1?void 0:n?Z(e,s):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(i=(n?o(e,s,i):o(i))||i);return n&&i&&Y(e,s,i),i},P=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},r=(t,e,s)=>(P(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(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)},d=(t,e,s,n)=>(P(t,e,"write to private field"),e.set(t,s),s),I=(t,e,s)=>(P(t,e,"access private method"),s),u,f,h,v,g,m,$,S,b;const Q=W.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});exports.SelectElement=class extends y.CustomElement{constructor(){super(),c(this,S),c(this,u,null),c(this,f,""),c(this,h,null),c(this,v,!1),c(this,g,void 0),c(this,m,null),c(this,$,()=>{K.dispatchSizeChangeEvent(this)}),M.isBrowser&&(this.openShadow(Q),d(this,u,this.attachInternals()),d(this,m,new ResizeObserver(r(this,$))),a.element(this,{children:[a.button({class:"head",children:a.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),a.div({class:"body",style:{height:"0px"},children:a.div({class:"body-inner",children:a.slot()}),ref:e=>{d(this,h,e)}})]}))}get value(){return r(this,f)}set value(e){d(this,f,e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r(this,u).setFormValue(r(this,f))}get internals(){return r(this,u)}get opened(){return r(this,v)}open(){clearTimeout(r(this,g)),d(this,v,!0),r(this,h).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),r(this,h).style.height=r(this,h).scrollHeight+"px",I(this,S,b).call(this)},0)}close(){d(this,v,!1),r(this,h).style.height="0px",this.classList.remove("opened"),I(this,S,b).call(this),d(this,g,setTimeout(()=>{this.classList.remove("triggered"),r(this,h).style.display="none"},N.getElementTransitionDurationMS(r(this,h))))}connectedCallback(){r(this,m).observe(r(this,h))}disconnectedCallback(){clearTimeout(r(this,g)),r(this,m).disconnect()}};u=new WeakMap;f=new WeakMap;h=new WeakMap;v=new WeakMap;g=new WeakMap;m=new WeakMap;$=new WeakMap;S=new WeakSet;b=function(){this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:r(this,v)}}))};exports.SelectElement.formAssociated=!0;exports.SelectElement=J([y.define("e-select")],exports.SelectElement);var E;class q extends y.CustomElement{constructor(){super(...arguments);A(this,E,null)}get selectElement(){return z(this,E)}connectedCallback(){var n,i;const s=(i=(n=this.assignedSlot)==null?void 0:n.getRootNode())==null?void 0:i.host;s?H(this,E,s):console.log(this,"e-select not found")}}E=new WeakMap;var X=Object.defineProperty,j=Object.getOwnPropertyDescriptor,ee=(t,e,s,n)=>{for(var i=n>1?void 0:n?j(e,s):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(i=(n?o(e,s,i):o(i))||i);return n&&i&&X(e,s,i),i},R=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},k=(t,e,s)=>(R(t,e,"read from private field"),s?s.call(t):e.get(t)),B=(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)},G=(t,e,s)=>(R(t,e,"access private method"),s),w,C,L;const te=W.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});exports.SelectOptionElement=class extends q{constructor(){super(),B(this,C),B(this,w,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""}),M.isBrowser&&(this.openShadow(te),a.element(this,{tabindex:0,onClick:()=>{G(this,C,L).call(this)},onKeydown:e=>{e.code==="Space"&&G(this,C,L).call(this)},children:a.slot()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",k(this,w)),setTimeout(()=>{k(this,w).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",k(this,w))}};w=new WeakMap;C=new WeakSet;L=function(){this.selectElement.value=this.value,this.selectElement.close()};exports.SelectOptionElement=ee([y.define("e-select-option")],exports.SelectOptionElement);const F=`<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
width="32"
|
|
4
|
+
height="32"
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
>
|
|
7
|
+
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
8
|
+
</svg>
|
|
9
|
+
`;var se=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,ne=(t,e,s,n)=>{for(var i=n>1?void 0:n?ie(e,s):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(i=(n?o(e,s,i):o(i))||i);return n&&i&&se(e,s,i),i},U=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},p=(t,e,s)=>(U(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)},re=(t,e,s,n)=>(U(t,e,"write to private field"),e.set(t,s),s),x,_,T;const ae=W.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${V.aptechkaTheme.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});exports.SelectHeadElement=class extends q{constructor(){super(),O(this,x,null),O(this,_,()=>{const s=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(n=>n.value===this.selectElement.value);s&&(p(this,x).innerHTML=s.innerHTML)}),O(this,T,()=>{this.classList.toggle("opened",this.selectElement.opened)}),M.isBrowser&&(this.openShadow(ae),a.element(this,{children:[a.slot(),a.slot({name:"arrow",children:a.element(F,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),re(this,x,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",p(this,_)),p(this,_).call(this),this.selectElement.addEventListener("selectToggle",p(this,T))}disconnectedCallback(){this.selectElement.removeEventListener("change",p(this,_)),this.selectElement.removeEventListener("selectToggle",p(this,T))}};x=new WeakMap;_=new WeakMap;T=new WeakMap;exports.SelectHeadElement=ne([y.define("e-select-head")],exports.SelectHeadElement);exports.SelectUserElement=q;exports.arrowIcon=F;
|