aptechka 0.8.4 → 0.10.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/ElementConstructor-OK-6OPjh.cjs +1 -0
- package/lib/ElementConstructor-rValMo8f.js +372 -0
- package/lib/_createStore-C75y9luu.cjs +1 -0
- package/lib/_createStore-D3qHYaSz.js +12 -0
- package/lib/accordion/AccordionElement.d.ts +1 -2
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +110 -122
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +4 -5
- package/lib/canvas/index.js +69 -75
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.d.ts +1 -3
- package/lib/checkbox/index.js +42 -45
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.d.ts +2 -2
- package/lib/connector/index.js +39 -34
- package/lib/counter/index.d.ts +1 -3
- package/lib/{createStylesheet-BsMSWX0q.cjs → createStylesheet-9nksoWW0.cjs} +1 -1
- package/lib/{createStylesheet-BxKITIVV.js → createStylesheet-BrFGJ8Q7.js} +1 -1
- package/lib/element-constructor/ElementConstructor.d.ts +6 -5
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +114 -113
- package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -2
- 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 +7 -15
- package/lib/index-3R8YL-P3.js +266 -0
- package/lib/index-CyQAdqFu.cjs +9 -0
- package/lib/instantiate-BuVJ8pIJ.cjs +1 -0
- package/lib/instantiate-TYteKsII.js +134 -0
- package/lib/jsx/ComponentElement.d.ts +18 -0
- package/lib/jsx/globals.d.ts +13 -0
- package/lib/jsx/h.d.ts +6 -0
- package/lib/jsx/hooks/animation/createDamped.d.ts +3 -0
- package/lib/jsx/hooks/animation/createTweened.d.ts +3 -0
- package/lib/jsx/hooks/animation/index.cjs +1 -0
- package/lib/jsx/hooks/animation/index.d.ts +2 -0
- package/lib/jsx/hooks/animation/index.js +15 -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/createRef.d.ts +3 -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/basic/onStoreChange.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/createCached.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/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 +6 -0
- package/lib/jsx/hooks/store/index.js +31 -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 +15 -0
- package/lib/jsx/index.js +106 -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 +198 -0
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +34 -36
- package/lib/onConnect-DGP866cj.cjs +1 -0
- package/lib/onConnect-y5DrxJ9P.js +7 -0
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +5 -4
- package/lib/order/index.js +1 -1
- package/lib/pointer/PointerElement.d.ts +1 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +105 -117
- package/lib/popover/PopoverButtonElement.d.ts +1 -2
- package/lib/popover/PopoverElement.d.ts +1 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +109 -124
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +76 -73
- package/lib/scroll/ScrollElement.d.ts +1 -2
- package/lib/scroll/ScrollUserElement.d.ts +1 -2
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +674 -753
- package/lib/select/SelectElement.d.ts +1 -3
- package/lib/select/SelectUserElement.d.ts +1 -2
- 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.js +104 -107
- package/lib/slicer/SlicerElement.d.ts +1 -2
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +88 -106
- package/lib/source/SourceElement.d.ts +1 -2
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +19 -20
- package/lib/store/Cached.d.ts +13 -0
- package/lib/store/Derived.d.ts +3 -3
- package/lib/store/DerivedArray.d.ts +8 -0
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.js +65 -31
- package/lib/tags-BosXYPYv.cjs +1 -0
- package/lib/tags-D0kLlFdQ.js +485 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -1
- package/lib/tweaker/TweakerFieldElement.d.ts +1 -2
- package/lib/tweaker/TweakerFolderElement.d.ts +1 -2
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -2
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +393 -472
- package/lib/utils/bytes.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +122 -105
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +25 -29
- package/package.json +73 -9
- package/lib/custom-element/index.cjs +0 -1
- package/lib/custom-element/index.d.ts +0 -8
- package/lib/custom-element/index.js +0 -30
- package/lib/index-CzpP1Tg6.cjs +0 -9
- package/lib/index-Dwd_62sm.js +0 -301
- package/lib/tags-CAfasCGV.cjs +0 -1
- package/lib/tags-D9lNDPX8.js +0 -848
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatBytes(bytes: number, decimals?: number): string;
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),S=require("../browser-CpzFX2xg.cjs"),l=require("../canvas-CU5Xjahf.cjs"),m=require("../coordinates-D8Np3cPD.cjs"),p=require("../dom-JBOkFLTh.cjs"),a=require("../easings-DsS5-Kqc.cjs"),b=require("../events-BGwqaxVW.cjs"),I=require("../file-EevnUtRj.cjs"),C=require("../function-MthRj-GJ.cjs"),y=require("../gestures-DHLrn6Q8.cjs"),f=require("../layout-8ryRAMGJ.cjs"),s=require("../math-GDWEqu7y.cjs"),d=require("../polyfills-CM4SCDTt.cjs"),r=require("../object-CCiXnER2.cjs"),u=require("../string-DhgS_iFl.cjs"),O=require("../style-At6aDoqG.cjs"),g=require("../url-C3dWnJQg.cjs");function v(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function P(t,e){const n=t.length;e=e%n;const i=new Array(n);for(let o=0;o<n;o++){const c=(o+e)%n;i[c]=t[o]}return i}function T(t,e=2){if(!+t)return"0 Bytes";const n=1024,i=e<0?0:e,o=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],c=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,c)).toFixed(i))} ${o[c]}`}function x(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function q(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function E(t,e){const n=t.styleMap.get(e);if(n){const i=n.toString();return i.startsWith("var")?E(t,i.slice(4,-1)):i}}function B(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(i=>{i instanceof CSSStyleRule&&i.selectorText===":root"&&t.forEach(o=>{const c=E(i,o);c&&(e[o]=c)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function Q(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function w(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}exports.parseAttribute=h.parseAttribute;exports.parseAttributeValue=h.parseAttributeValue;exports.isBrowser=S.isBrowser;exports.contain=l.contain;exports.cover=l.cover;exports.fixPosition=l.fixPosition;exports.measureText=l.measureText;exports.getPointerPosition=m.getPointerPosition;exports.normalize=m.normalize;exports.screenToCartesian=m.screenToCartesian;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getAllParentElements=p.getAllParentElements;exports.getElement=p.getElement;exports.easeInCubic=a.easeInCubic;exports.easeInExpo=a.easeInExpo;exports.easeInOutCubic=a.easeInOutCubic;exports.easeInOutExpo=a.easeInOutExpo;exports.easeInOutQuad=a.easeInOutQuad;exports.easeInOutQuart=a.easeInOutQuart;exports.easeInOutQuint=a.easeInOutQuint;exports.easeInQuad=a.easeInQuad;exports.easeInQuart=a.easeInQuart;exports.easeInQuint=a.easeInQuint;exports.easeOutCubic=a.easeOutCubic;exports.easeOutExpo=a.easeOutExpo;exports.easeOutQuad=a.easeOutQuad;exports.easeOutQuart=a.easeOutQuart;exports.easeOutQuint=a.easeOutQuint;exports.linear=a.linear;exports.dispatchBeforeSizeChangeEvent=b.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=b.dispatchSizeChangeEvent;exports.createJSONAndSave=I.createJSONAndSave;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=y.setupDrag;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=s.calculateDistance;exports.calculateDistanceWithRadius=s.calculateDistanceWithRadius;exports.clamp=s.clamp;exports.damp=s.damp;exports.lerp=s.lerp;exports.mapRange=s.mapRange;exports.round=s.round;exports.smootherstep=s.smootherstep;exports.smoothstep=s.smoothstep;exports.step=s.step;exports.nullishCoalescing=d.nullishCoalescing;exports.preciseNumber=d.preciseNumber;exports.roundNumberTo=d.roundNumberTo;exports.toStep=d.toStep;exports.cloneDeep=r.cloneDeep;exports.compareObjects=r.compareObjects;exports.isESClass=r.isESClass;exports.isNullish=r.isNullish;exports.isObject=r.isObject;exports.mergeDeep=r.mergeDeep;exports.mixin=r.mixin;exports.omit=r.omit;exports.pick=r.pick;exports.camelToKebab=u.camelToKebab;exports.capitalize=u.capitalize;exports.generateId=u.generateId;exports.isUppercase=u.isUppercase;exports.kebabToCamel=u.kebabToCamel;exports.snakeToDotted=u.snakeToDotted;exports.toPascalCase=u.toPascalCase;exports.uncapitalize=u.uncapitalize;exports.getElementTransitionDurationMS=O.getElementTransitionDurationMS;exports.getElementTransitionDurationS=O.getElementTransitionDurationS;exports.changeHistory=g.changeHistory;exports.normalizeBase=g.normalizeBase;exports.splitPath=g.splitPath;exports.decode=w;exports.dotCircleCollision=q;exports.dotRectCollision=x;exports.encode=Q;exports.formatBytes=T;exports.getRootVariables=B;exports.insert=v;exports.shiftArray=P;
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
|
@@ -1,148 +1,165 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { i as
|
|
3
|
-
import { a as
|
|
1
|
+
import { a as h, p as b } from "../attributes-69we3byR.js";
|
|
2
|
+
import { i as E } from "../browser-0zX67oeU.js";
|
|
3
|
+
import { a as y, c as O, f as w, m as B } from "../canvas-DeZ0SLUJ.js";
|
|
4
4
|
import { g as v, n as P, s as T } from "../coordinates-CgdGoSYs.js";
|
|
5
|
-
import { f as Q, b as D, g as
|
|
6
|
-
import { c as
|
|
7
|
-
import { d as
|
|
8
|
-
import { c as
|
|
9
|
-
import { d as
|
|
10
|
-
import { s as
|
|
11
|
-
import { g as
|
|
12
|
-
import { e as
|
|
13
|
-
import { n as
|
|
14
|
-
import { c as Te, d as Ae, i as Qe, b as De, a as
|
|
15
|
-
import { c as
|
|
16
|
-
import { g as
|
|
17
|
-
import { c as
|
|
18
|
-
function i(a, e, ...
|
|
19
|
-
return [...a.slice(0, e), ...
|
|
5
|
+
import { f as Q, b as D, g as M, a as R } from "../dom-P5QbAASX.js";
|
|
6
|
+
import { c as k, n as j, f as N, p as V, b as U, i as $, m as F, e as K, g as W, j as q, d as G, o as H, a as J, h as L, k as Y, l as Z } from "../easings-BKi40vHz.js";
|
|
7
|
+
import { d as _, a as ee } from "../events-CJTUMSLU.js";
|
|
8
|
+
import { c as te } from "../file-lxi_oXJf.js";
|
|
9
|
+
import { d as oe, t as ne } from "../function-C10DGppn.js";
|
|
10
|
+
import { s as ie } from "../gestures-D2Fdra_G.js";
|
|
11
|
+
import { g as ue, a as le, b as fe } from "../layout-HoBT_Da2.js";
|
|
12
|
+
import { e as me, f as de, c as ge, d as xe, l as he, m as be, r as Ce, b as Ee, a as Se, s as ye } from "../math-BOBiC4TN.js";
|
|
13
|
+
import { n as we, p as Be, r as Ie, t as ve } from "../polyfills-X6KXuHg-.js";
|
|
14
|
+
import { c as Te, d as Ae, i as Qe, b as De, a as Me, m as Re, e as ze, o as ke, p as je } from "../object-D6MVWB4l.js";
|
|
15
|
+
import { c as Ve, a as Ue, g as $e, i as Fe, k as Ke, s as We, t as qe, u as Ge } from "../string-f0Dnk0L1.js";
|
|
16
|
+
import { g as Je, a as Le } from "../style-j2TwriJ_.js";
|
|
17
|
+
import { c as Ze, n as Xe, s as _e } from "../url-DMNfW7uN.js";
|
|
18
|
+
function i(a, e, ...t) {
|
|
19
|
+
return [...a.slice(0, e), ...t, ...a.slice(e)];
|
|
20
20
|
}
|
|
21
21
|
function c(a, e) {
|
|
22
|
-
const
|
|
23
|
-
e = e %
|
|
24
|
-
const
|
|
25
|
-
for (let o = 0; o <
|
|
26
|
-
const n = (o + e) %
|
|
27
|
-
|
|
22
|
+
const t = a.length;
|
|
23
|
+
e = e % t;
|
|
24
|
+
const s = new Array(t);
|
|
25
|
+
for (let o = 0; o < t; o++) {
|
|
26
|
+
const n = (o + e) % t;
|
|
27
|
+
s[n] = a[o];
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return s;
|
|
30
30
|
}
|
|
31
|
-
function u(a, e) {
|
|
32
|
-
|
|
31
|
+
function u(a, e = 2) {
|
|
32
|
+
if (!+a)
|
|
33
|
+
return "0 Bytes";
|
|
34
|
+
const t = 1024, s = e < 0 ? 0 : e, o = [
|
|
35
|
+
"Bytes",
|
|
36
|
+
"KiB",
|
|
37
|
+
"MiB",
|
|
38
|
+
"GiB",
|
|
39
|
+
"TiB",
|
|
40
|
+
"PiB",
|
|
41
|
+
"EiB",
|
|
42
|
+
"ZiB",
|
|
43
|
+
"YiB"
|
|
44
|
+
], n = Math.floor(Math.log(a) / Math.log(t));
|
|
45
|
+
return `${parseFloat((a / Math.pow(t, n)).toFixed(s))} ${o[n]}`;
|
|
33
46
|
}
|
|
34
47
|
function l(a, e) {
|
|
48
|
+
return a.x < e.x + e.width && a.x > e.x && a.y < e.y + e.height && a.y > e.y;
|
|
49
|
+
}
|
|
50
|
+
function f(a, e) {
|
|
35
51
|
return Math.sqrt((a.x - e.x) ** 2 + (a.y - e.y) ** 2) < e.radius;
|
|
36
52
|
}
|
|
37
53
|
function r(a, e) {
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
const
|
|
41
|
-
return
|
|
54
|
+
const t = a.styleMap.get(e);
|
|
55
|
+
if (t) {
|
|
56
|
+
const s = t.toString();
|
|
57
|
+
return s.startsWith("var") ? r(a, s.slice(4, -1)) : s;
|
|
42
58
|
}
|
|
43
59
|
}
|
|
44
|
-
function
|
|
60
|
+
function p(...a) {
|
|
45
61
|
const e = {};
|
|
46
|
-
return Array.from(document.styleSheets).forEach((
|
|
47
|
-
Array.from(
|
|
48
|
-
|
|
49
|
-
const n = r(
|
|
62
|
+
return Array.from(document.styleSheets).forEach((t) => {
|
|
63
|
+
Array.from(t.cssRules).forEach((s) => {
|
|
64
|
+
s instanceof CSSStyleRule && s.selectorText === ":root" && a.forEach((o) => {
|
|
65
|
+
const n = r(s, o);
|
|
50
66
|
n && (e[o] = n);
|
|
51
67
|
});
|
|
52
68
|
});
|
|
53
|
-
}), a.forEach((
|
|
54
|
-
e[
|
|
69
|
+
}), a.forEach((t) => {
|
|
70
|
+
e[t] || console.warn(`variable named ${t} not found`);
|
|
55
71
|
}), e;
|
|
56
72
|
}
|
|
57
|
-
function
|
|
73
|
+
function m(a) {
|
|
58
74
|
const e = window.atob(a);
|
|
59
75
|
return decodeURIComponent(window.escape(e));
|
|
60
76
|
}
|
|
61
|
-
function
|
|
77
|
+
function d(a) {
|
|
62
78
|
const e = window.unescape(encodeURIComponent(a));
|
|
63
79
|
return window.btoa(e);
|
|
64
80
|
}
|
|
65
81
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
me as calculateDistance,
|
|
83
|
+
de as calculateDistanceWithRadius,
|
|
84
|
+
Ve as camelToKebab,
|
|
85
|
+
Ue as capitalize,
|
|
86
|
+
Ze as changeHistory,
|
|
87
|
+
ge as clamp,
|
|
72
88
|
Te as cloneDeep,
|
|
73
89
|
Ae as compareObjects,
|
|
74
|
-
|
|
90
|
+
y as contain,
|
|
75
91
|
O as cover,
|
|
76
|
-
|
|
92
|
+
te as createJSONAndSave,
|
|
77
93
|
xe as damp,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
oe as debounce,
|
|
95
|
+
d as decode,
|
|
96
|
+
_ as dispatchBeforeSizeChangeEvent,
|
|
97
|
+
ee as dispatchSizeChangeEvent,
|
|
98
|
+
f as dotCircleCollision,
|
|
99
|
+
l as dotRectCollision,
|
|
100
|
+
k as easeInCubic,
|
|
101
|
+
j as easeInExpo,
|
|
102
|
+
N as easeInOutCubic,
|
|
103
|
+
V as easeInOutExpo,
|
|
104
|
+
U as easeInOutQuad,
|
|
105
|
+
$ as easeInOutQuart,
|
|
106
|
+
F as easeInOutQuint,
|
|
107
|
+
K as easeInQuad,
|
|
108
|
+
W as easeInQuart,
|
|
109
|
+
q as easeInQuint,
|
|
110
|
+
G as easeOutCubic,
|
|
111
|
+
H as easeOutExpo,
|
|
112
|
+
J as easeOutQuad,
|
|
113
|
+
L as easeOutQuart,
|
|
114
|
+
Y as easeOutQuint,
|
|
115
|
+
m as encode,
|
|
100
116
|
Q as findParentElement,
|
|
101
117
|
D as findScrollParentElement,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
ue as
|
|
107
|
-
le as
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
118
|
+
w as fixPosition,
|
|
119
|
+
u as formatBytes,
|
|
120
|
+
$e as generateId,
|
|
121
|
+
M as getAllParentElements,
|
|
122
|
+
ue as getCumulativeOffsetLeft,
|
|
123
|
+
le as getCumulativeOffsetTop,
|
|
124
|
+
fe as getCumulativePosition,
|
|
125
|
+
R as getElement,
|
|
126
|
+
Je as getElementTransitionDurationMS,
|
|
127
|
+
Le as getElementTransitionDurationS,
|
|
111
128
|
v as getPointerPosition,
|
|
112
|
-
|
|
129
|
+
p as getRootVariables,
|
|
113
130
|
i as insert,
|
|
114
|
-
|
|
131
|
+
E as isBrowser,
|
|
115
132
|
Qe as isESClass,
|
|
116
133
|
De as isNullish,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
134
|
+
Me as isObject,
|
|
135
|
+
Fe as isUppercase,
|
|
136
|
+
Ke as kebabToCamel,
|
|
137
|
+
he as lerp,
|
|
138
|
+
Z as linear,
|
|
122
139
|
be as mapRange,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
140
|
+
B as measureText,
|
|
141
|
+
Re as mergeDeep,
|
|
142
|
+
ze as mixin,
|
|
126
143
|
P as normalize,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
144
|
+
Xe as normalizeBase,
|
|
145
|
+
we as nullishCoalescing,
|
|
146
|
+
ke as omit,
|
|
147
|
+
h as parseAttribute,
|
|
131
148
|
b as parseAttributeValue,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
149
|
+
je as pick,
|
|
150
|
+
Be as preciseNumber,
|
|
151
|
+
Ce as round,
|
|
135
152
|
Ie as roundNumberTo,
|
|
136
153
|
T as screenToCartesian,
|
|
137
|
-
|
|
154
|
+
ie as setupDrag,
|
|
138
155
|
c as shiftArray,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
156
|
+
Ee as smootherstep,
|
|
157
|
+
Se as smoothstep,
|
|
158
|
+
We as snakeToDotted,
|
|
159
|
+
_e as splitPath,
|
|
160
|
+
ye as step,
|
|
161
|
+
ne as throttle,
|
|
162
|
+
qe as toPascalCase,
|
|
146
163
|
ve as toStep,
|
|
147
|
-
|
|
164
|
+
Ge as uncapitalize
|
|
148
165
|
};
|
package/lib/video/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var l=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var i=(t,s,e)=>(l(t,s,"read from private field"),e?e.call(t):s.get(t)),n=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},c=(t,s,e,o)=>(l(t,s,"write to private field"),o?o.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-Cr3VaD9G.cjs");const h=require("../source/index.cjs"),u=require("../ticker/index.cjs");var r,a;class d extends h.SourceElement{constructor(){super(...arguments);n(this,r,0);n(this,a,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const e=this.consumerElement.readyState/4;e>i(this,r)&&c(this,r,e),this.dispatchEvent(new CustomEvent("readyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}})),this.consumerElement.readyState===4&&u.ticker.unsubscribe(i(this,a))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{u.ticker.subscribe(i(this,a)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),u.ticker.unsubscribe(i(this,a)),c(this,r,0)}createConsumer(){return document.createElement("video")}consumeSource(e){this.consumerElement.src=e||""}}r=new WeakMap,a=new WeakMap;customElements.get("e-video")||customElements.define("e-video",d);exports.VideoElement=d;
|
package/lib/video/index.js
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
var m = (t, s, e) => {
|
|
2
|
+
if (!s.has(t))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
|
+
};
|
|
5
|
+
var i = (t, s, e) => (m(t, s, "read from private field"), e ? e.call(t) : s.get(t)), n = (t, s, e) => {
|
|
6
|
+
if (s.has(t))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
s instanceof WeakSet ? s.add(t) : s.set(t, e);
|
|
9
|
+
}, c = (t, s, e, u) => (m(t, s, "write to private field"), u ? u.call(t, e) : s.set(t, e), e);
|
|
2
10
|
import "../window-resizer/index.js";
|
|
3
11
|
import "../Store-Qr3SNOSf.js";
|
|
4
|
-
import { SourceElement as
|
|
5
|
-
import { ticker as
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
(u = e[o]) && (r = (i ? u(t, s, r) : u(r)) || r);
|
|
9
|
-
return i && r && E(t, s, r), r;
|
|
10
|
-
}, m = (e, t, s) => {
|
|
11
|
-
if (!t.has(e))
|
|
12
|
-
throw TypeError("Cannot " + s);
|
|
13
|
-
}, n = (e, t, s) => (m(e, t, "read from private field"), s ? s.call(e) : t.get(e)), l = (e, t, s) => {
|
|
14
|
-
if (t.has(e))
|
|
15
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
16
|
-
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
17
|
-
}, d = (e, t, s, i) => (m(e, t, "write to private field"), t.set(e, s), s), a, c;
|
|
18
|
-
let p = class extends f {
|
|
12
|
+
import { SourceElement as h } from "../source/index.js";
|
|
13
|
+
import { ticker as o } from "../ticker/index.js";
|
|
14
|
+
var r, a;
|
|
15
|
+
class l extends h {
|
|
19
16
|
constructor() {
|
|
20
|
-
super(...arguments)
|
|
17
|
+
super(...arguments);
|
|
18
|
+
n(this, r, 0);
|
|
19
|
+
n(this, a, () => {
|
|
21
20
|
this.classList.add(`state-${this.consumerElement.readyState}`);
|
|
22
21
|
const e = this.consumerElement.readyState / 4;
|
|
23
|
-
e >
|
|
22
|
+
e > i(this, r) && c(this, r, e), this.dispatchEvent(
|
|
24
23
|
new CustomEvent("readyStateChange", {
|
|
25
24
|
detail: {
|
|
26
25
|
readyState: this.consumerElement.readyState,
|
|
27
|
-
progress:
|
|
26
|
+
progress: i(this, r)
|
|
28
27
|
}
|
|
29
28
|
})
|
|
30
|
-
), this.consumerElement.readyState === 4 &&
|
|
29
|
+
), this.consumerElement.readyState === 4 && o.unsubscribe(i(this, a));
|
|
31
30
|
});
|
|
32
31
|
}
|
|
33
32
|
connectedCallback() {
|
|
34
33
|
super.connectedCallback(), this.addEventListener("sourceCapture", () => {
|
|
35
|
-
|
|
34
|
+
o.subscribe(i(this, a)), this.hasAttribute("capture-autoplay") && this.consumerElement.play();
|
|
36
35
|
}), this.addEventListener("sourceRelease", () => {
|
|
37
36
|
this.hasAttribute("capture-autoplay") && (this.consumerElement.pause(), this.hasAttribute("replay") && (this.consumerElement.currentTime = 0)), this.hasAttribute("reload-source") && this.classList.remove(
|
|
38
37
|
"state-0",
|
|
@@ -44,7 +43,7 @@ let p = class extends f {
|
|
|
44
43
|
});
|
|
45
44
|
}
|
|
46
45
|
disconnectedCallback() {
|
|
47
|
-
super.disconnectedCallback(),
|
|
46
|
+
super.disconnectedCallback(), o.unsubscribe(i(this, a)), c(this, r, 0);
|
|
48
47
|
}
|
|
49
48
|
createConsumer() {
|
|
50
49
|
return document.createElement("video");
|
|
@@ -52,12 +51,9 @@ let p = class extends f {
|
|
|
52
51
|
consumeSource(e) {
|
|
53
52
|
this.consumerElement.src = e || "";
|
|
54
53
|
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
p = y([
|
|
59
|
-
v("e-video")
|
|
60
|
-
], p);
|
|
54
|
+
}
|
|
55
|
+
r = new WeakMap(), a = new WeakMap();
|
|
56
|
+
customElements.get("e-video") || customElements.define("e-video", l);
|
|
61
57
|
export {
|
|
62
|
-
|
|
58
|
+
l as VideoElement
|
|
63
59
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aptechka",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/denisavitski/aptechka.git"
|
|
@@ -73,11 +73,6 @@
|
|
|
73
73
|
"default": "./lib/css-value-parser/index.js",
|
|
74
74
|
"types": "./lib/css-value-parser/index.d.ts"
|
|
75
75
|
},
|
|
76
|
-
"./custom-element": {
|
|
77
|
-
"require": "./lib/custom-element/index.cjs",
|
|
78
|
-
"default": "./lib/custom-element/index.js",
|
|
79
|
-
"types": "./lib/custom-element/index.d.ts"
|
|
80
|
-
},
|
|
81
76
|
"./dev": {
|
|
82
77
|
"require": "./lib/dev/index.cjs",
|
|
83
78
|
"default": "./lib/dev/index.js",
|
|
@@ -138,6 +133,51 @@
|
|
|
138
133
|
"default": "./lib/intersector/index.js",
|
|
139
134
|
"types": "./lib/intersector/index.d.ts"
|
|
140
135
|
},
|
|
136
|
+
"./jsx": {
|
|
137
|
+
"require": "./lib/jsx/index.cjs",
|
|
138
|
+
"default": "./lib/jsx/index.js",
|
|
139
|
+
"types": "./lib/jsx/index.d.ts"
|
|
140
|
+
},
|
|
141
|
+
"./jsx/hooks/animation": {
|
|
142
|
+
"require": "./lib/jsx/hooks/animation/index.cjs",
|
|
143
|
+
"default": "./lib/jsx/hooks/animation/index.js",
|
|
144
|
+
"types": "./lib/jsx/hooks/animation/index.d.ts"
|
|
145
|
+
},
|
|
146
|
+
"./jsx/hooks/store": {
|
|
147
|
+
"require": "./lib/jsx/hooks/store/index.cjs",
|
|
148
|
+
"default": "./lib/jsx/hooks/store/index.js",
|
|
149
|
+
"types": "./lib/jsx/hooks/store/index.d.ts"
|
|
150
|
+
},
|
|
151
|
+
"./jsx/hooks/onAnimationFrame": {
|
|
152
|
+
"require": "./lib/jsx/hooks/onAnimationFrame.cjs",
|
|
153
|
+
"default": "./lib/jsx/hooks/onAnimationFrame.js",
|
|
154
|
+
"types": "./lib/jsx/hooks/onAnimationFrame.d.ts"
|
|
155
|
+
},
|
|
156
|
+
"./jsx/hooks/onElementResize": {
|
|
157
|
+
"require": "./lib/jsx/hooks/onElementResize.cjs",
|
|
158
|
+
"default": "./lib/jsx/hooks/onElementResize.js",
|
|
159
|
+
"types": "./lib/jsx/hooks/onElementResize.d.ts"
|
|
160
|
+
},
|
|
161
|
+
"./jsx/hooks/onIntersection": {
|
|
162
|
+
"require": "./lib/jsx/hooks/onIntersection.cjs",
|
|
163
|
+
"default": "./lib/jsx/hooks/onIntersection.js",
|
|
164
|
+
"types": "./lib/jsx/hooks/onIntersection.d.ts"
|
|
165
|
+
},
|
|
166
|
+
"./jsx/hooks/onWindowResize": {
|
|
167
|
+
"require": "./lib/jsx/hooks/onWindowResize.cjs",
|
|
168
|
+
"default": "./lib/jsx/hooks/onWindowResize.js",
|
|
169
|
+
"types": "./lib/jsx/hooks/onWindowResize.d.ts"
|
|
170
|
+
},
|
|
171
|
+
"./jsx/hooks/watchAttribute": {
|
|
172
|
+
"require": "./lib/jsx/hooks/watchAttribute.cjs",
|
|
173
|
+
"default": "./lib/jsx/hooks/watchAttribute.js",
|
|
174
|
+
"types": "./lib/jsx/hooks/watchAttribute.d.ts"
|
|
175
|
+
},
|
|
176
|
+
"./jsx/hooks/watchCSSProperty": {
|
|
177
|
+
"require": "./lib/jsx/hooks/watchCSSProperty.cjs",
|
|
178
|
+
"default": "./lib/jsx/hooks/watchCSSProperty.js",
|
|
179
|
+
"types": "./lib/jsx/hooks/watchCSSProperty.d.ts"
|
|
180
|
+
},
|
|
141
181
|
"./ladder": {
|
|
142
182
|
"require": "./lib/ladder/index.cjs",
|
|
143
183
|
"default": "./lib/ladder/index.js",
|
|
@@ -302,9 +342,6 @@
|
|
|
302
342
|
"css-value-parser": [
|
|
303
343
|
"lib/css-value-parser/index.d.ts"
|
|
304
344
|
],
|
|
305
|
-
"custom-element": [
|
|
306
|
-
"lib/custom-element/index.d.ts"
|
|
307
|
-
],
|
|
308
345
|
"dev": [
|
|
309
346
|
"lib/dev/index.d.ts"
|
|
310
347
|
],
|
|
@@ -341,6 +378,33 @@
|
|
|
341
378
|
"intersector": [
|
|
342
379
|
"lib/intersector/index.d.ts"
|
|
343
380
|
],
|
|
381
|
+
"jsx": [
|
|
382
|
+
"lib/jsx/index.d.ts"
|
|
383
|
+
],
|
|
384
|
+
"jsx/hooks/animation": [
|
|
385
|
+
"lib/jsx/hooks/animation/index.d.ts"
|
|
386
|
+
],
|
|
387
|
+
"jsx/hooks/store": [
|
|
388
|
+
"lib/jsx/hooks/store/index.d.ts"
|
|
389
|
+
],
|
|
390
|
+
"jsx/hooks/onAnimationFrame": [
|
|
391
|
+
"lib/jsx/hooks/onAnimationFrame.d.ts"
|
|
392
|
+
],
|
|
393
|
+
"jsx/hooks/onElementResize": [
|
|
394
|
+
"lib/jsx/hooks/onElementResize.d.ts"
|
|
395
|
+
],
|
|
396
|
+
"jsx/hooks/onIntersection": [
|
|
397
|
+
"lib/jsx/hooks/onIntersection.d.ts"
|
|
398
|
+
],
|
|
399
|
+
"jsx/hooks/onWindowResize": [
|
|
400
|
+
"lib/jsx/hooks/onWindowResize.d.ts"
|
|
401
|
+
],
|
|
402
|
+
"jsx/hooks/watchAttribute": [
|
|
403
|
+
"lib/jsx/hooks/watchAttribute.d.ts"
|
|
404
|
+
],
|
|
405
|
+
"jsx/hooks/watchCSSProperty": [
|
|
406
|
+
"lib/jsx/hooks/watchCSSProperty.d.ts"
|
|
407
|
+
],
|
|
344
408
|
"ladder": [
|
|
345
409
|
"lib/ladder/index.d.ts"
|
|
346
410
|
],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../browser-CpzFX2xg.cjs");function n(t,e){return function(s){o.isBrowser&&!customElements.get(t)&&customElements.define(t,s,{extends:e})}}function i(t,e,s){o.isBrowser&&!customElements.get(t)&&customElements.define(t,e,{extends:s})}const d=o.isBrowser?window.HTMLElement:class{attachShadow(){}};class r extends d{openShadow(...e){if(!this.shadowRoot&&o.isBrowser){const s=this.attachShadow({mode:"open"});return this.addStylesheet(...e),s}return this.shadowRoot}addStylesheet(...e){this.shadowRoot&&o.isBrowser&&this.shadowRoot.adoptedStyleSheets.push(...e)}}exports.CustomElement=r;exports.define=n;exports.defineElement=i;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare function define(name: string, extend?: keyof HTMLElementTagNameMap): (Constructor: CustomElementConstructor) => void;
|
|
2
|
-
export declare function defineElement(name: string, Constructor: CustomElementConstructor, extend?: keyof HTMLElementTagNameMap): void;
|
|
3
|
-
declare const HTMLElement: typeof window.HTMLElement;
|
|
4
|
-
export declare class CustomElement extends HTMLElement {
|
|
5
|
-
openShadow(...stylesheets: Array<CSSStyleSheet>): ShadowRoot;
|
|
6
|
-
addStylesheet(...stylesheets: Array<CSSStyleSheet>): void;
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { i as o } from "../browser-0zX67oeU.js";
|
|
2
|
-
function i(e, t) {
|
|
3
|
-
return function(s) {
|
|
4
|
-
o && !customElements.get(e) && customElements.define(e, s, { extends: t });
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
function h(e, t, s) {
|
|
8
|
-
o && !customElements.get(e) && customElements.define(e, t, { extends: s });
|
|
9
|
-
}
|
|
10
|
-
const n = o ? window.HTMLElement : class {
|
|
11
|
-
attachShadow() {
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
class a extends n {
|
|
15
|
-
openShadow(...t) {
|
|
16
|
-
if (!this.shadowRoot && o) {
|
|
17
|
-
const s = this.attachShadow({ mode: "open" });
|
|
18
|
-
return this.addStylesheet(...t), s;
|
|
19
|
-
}
|
|
20
|
-
return this.shadowRoot;
|
|
21
|
-
}
|
|
22
|
-
addStylesheet(...t) {
|
|
23
|
-
this.shadowRoot && o && this.shadowRoot.adoptedStyleSheets.push(...t);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
a as CustomElement,
|
|
28
|
-
i as define,
|
|
29
|
-
h as defineElement
|
|
30
|
-
};
|
package/lib/index-CzpP1Tg6.cjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";var z=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var D=(t,e,s)=>(z(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)=>(z(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-Cr3VaD9G.cjs");const M=require("./browser-CpzFX2xg.cjs"),R=require("./events-BGwqaxVW.cjs"),N=require("./style-At6aDoqG.cjs"),a=require("./tags-CAfasCGV.cjs"),W=require("./createStylesheet-BsMSWX0q.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,$,()=>{R.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(){R.dispatchBeforeSizeChangeEvent(this),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 D(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},F=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},k=(t,e,s)=>(F(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)=>(F(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 U=`<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},K=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},p=(t,e,s)=>(K(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)=>(K(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(U,{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=U;
|