aptechka 0.1.2 → 0.1.5
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-CzBHCHNm.js +130 -0
- package/lib/Animated-DZ_fbJmi.cjs +1 -0
- package/lib/Damped--qBZAdEi.cjs +1 -0
- package/lib/Damped-Bm1kSn1f.js +36 -0
- package/lib/Derived-BS2ja9qa.js +27 -0
- package/lib/Derived-CqmIkTGN.cjs +1 -0
- package/lib/ElementConstructor-DB0xOoat.js +199 -0
- package/lib/ElementConstructor-v1FPLXAW.cjs +1 -0
- package/lib/{SourceManager-F94MRde6.js → SourceManager-B44FUTig.js} +26 -26
- package/lib/SourceManager-D447KWpH.cjs +1 -0
- package/lib/Store-BOOfmlyv.cjs +1 -0
- package/lib/Store-uTyReFzx.js +152 -0
- package/lib/Viewport-CDqiD8Ao.cjs +1 -0
- package/lib/Viewport-Cj0i-H5d.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 +30 -0
- package/lib/accordion/index.cjs +1 -0
- package/lib/accordion/index.d.ts +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 +7 -6
- package/lib/canvas/index.js +97 -0
- package/lib/connector/index.cjs +1 -0
- package/lib/connector/index.d.ts +14 -0
- package/lib/connector/index.js +53 -0
- package/lib/controls/WheelControls.d.ts +3 -2
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.d.ts +0 -1
- package/lib/controls/index.js +23 -28
- package/lib/createStylesheet-74ZP3AZm.js +8 -0
- package/lib/createStylesheet-ChhZFwSX.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 +11 -15
- 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 -1135
- 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-CNEFIHPp.js +683 -0
- package/lib/htmlTags-CwYHVo9n.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +13 -20
- package/lib/index-DyJhLxk8.js +310 -0
- package/lib/index-tPw9mmLF.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/ComponentWrapper.d.ts +12 -0
- package/lib/jsx/h.d.ts +7 -0
- package/lib/jsx/hooks.d.ts +19 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +4 -0
- package/lib/jsx/index.js +125 -0
- package/lib/jsx/render.d.ts +2 -0
- package/lib/jsx/type.d.ts +185 -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 +12 -0
- package/lib/store/Resource.d.ts +5 -2
- package/lib/store/Store.d.ts +56 -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 +108 -66
- package/lib/string-BrDhnNUL.js +39 -0
- package/lib/string-DzUwFYSS.cjs +1 -0
- package/lib/studio/StudioElement.d.ts +12 -0
- package/lib/studio/index.cjs +10 -0
- package/lib/studio/index.d.ts +1 -0
- package/lib/studio/index.js +985 -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 +20 -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 +7 -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 +92 -30
- package/lib/Damped-1hlKSFaB.cjs +0 -1
- package/lib/Damped-523xgzT3.js +0 -152
- package/lib/SourceManager-3c3kr7oj.cjs +0 -1
- package/lib/Store-2hWEUGTj.js +0 -135
- package/lib/Store-WXFmsaEI.cjs +0 -1
- package/lib/WheelControls-F-xg5-oq.js +0 -102
- package/lib/WheelControls-Hp5NWRZY.cjs +0 -1
- package/lib/canvas-2d/index.cjs +0 -5
- package/lib/canvas-2d/index.js +0 -90
- package/lib/controls/User.d.ts +0 -7
- 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/utils/index.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { i as
|
|
3
|
-
import { f as M, a as
|
|
4
|
-
import { c as
|
|
5
|
-
import { d as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { c as
|
|
10
|
-
|
|
1
|
+
import { a as T, p as R } from "../attributes-69we3byR.js";
|
|
2
|
+
import { i as B } from "../browser-0zX67oeU.js";
|
|
3
|
+
import { f as M, a as z, g as U } from "../dom-BY7JhTx5.js";
|
|
4
|
+
import { c as J, n as K, f as V, p as W, b as G, i as X, m as Y, e as Z, g as _, j as $, d as F, o as H, a as L, h as b, k as j, l as ee } from "../easings-BKi40vHz.js";
|
|
5
|
+
import { d as ne } from "../events-CoqmkUxo.js";
|
|
6
|
+
import { c as ae } from "../file-lxi_oXJf.js";
|
|
7
|
+
import { d as ie, t as ue } from "../function-C10DGppn.js";
|
|
8
|
+
import { g as fe, a as ce, b as le } from "../layout-HoBT_Da2.js";
|
|
9
|
+
import { e as pe, f as me, c as ye, d as he, l as xe, m as ge, r as we, b as Oe, a as Ce, s as Ie } from "../math-BOBiC4TN.js";
|
|
10
|
+
import { p as ke, r as De } from "../number-Bo5RdrA1.js";
|
|
11
|
+
import { c as Pe, a as Qe, g as Se, k as Te, s as Re, t as Ne } from "../string-BrDhnNUL.js";
|
|
12
|
+
import { g as ve, a as Me } from "../style-j2TwriJ_.js";
|
|
13
|
+
function y(e, t, ...n) {
|
|
11
14
|
return [...e.slice(0, t), ...n, ...e.slice(t)];
|
|
12
15
|
}
|
|
13
16
|
function h(e, t) {
|
|
@@ -20,30 +23,30 @@ function h(e, t) {
|
|
|
20
23
|
function x(e) {
|
|
21
24
|
return Math.floor(e) + 0.5;
|
|
22
25
|
}
|
|
23
|
-
function
|
|
24
|
-
let
|
|
25
|
-
return a = typeof a == "undefined" ? 0.5 : a,
|
|
26
|
-
(n -
|
|
27
|
-
(s -
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
function g(e, t, n, s, a, r) {
|
|
27
|
+
let o = e / t, c = n / s, i = 0, u = 0;
|
|
28
|
+
return a = typeof a == "undefined" ? 0.5 : a, r = typeof r == "undefined" ? 0.5 : r, o > c ? (i = s, u = s * o) : (u = n, i = n / o), [
|
|
29
|
+
(n - u) * a,
|
|
30
|
+
(s - i) * r,
|
|
31
|
+
u,
|
|
32
|
+
i
|
|
30
33
|
];
|
|
31
34
|
}
|
|
32
|
-
function
|
|
35
|
+
function w(e, t) {
|
|
33
36
|
return e.x < t.x + t.width && e.x > t.x && e.y < t.y + t.height && e.y > t.y;
|
|
34
37
|
}
|
|
35
38
|
function O(e, t) {
|
|
36
39
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2) < t.radius;
|
|
37
40
|
}
|
|
38
|
-
function
|
|
41
|
+
function C(e, t, n = !1) {
|
|
39
42
|
let s = e.x - t.width / 2, a = t.height / 2 - e.y;
|
|
40
43
|
return n && (s = s / (t.width / 2), a = a / (t.height / 2)), { x: s, y: a };
|
|
41
44
|
}
|
|
42
|
-
function
|
|
45
|
+
function I(e, t) {
|
|
43
46
|
const n = e.x / t.x, s = e.y / t.y;
|
|
44
47
|
return { x: n, y: s };
|
|
45
48
|
}
|
|
46
|
-
function
|
|
49
|
+
function A(e, t) {
|
|
47
50
|
return t = t || {
|
|
48
51
|
x: 0,
|
|
49
52
|
y: 0,
|
|
@@ -54,30 +57,15 @@ function k(e, t) {
|
|
|
54
57
|
y: (e.y - t.y) / t.height * t.height
|
|
55
58
|
};
|
|
56
59
|
}
|
|
57
|
-
function
|
|
60
|
+
function k(e) {
|
|
58
61
|
const t = window.atob(e);
|
|
59
62
|
return decodeURIComponent(window.escape(t));
|
|
60
63
|
}
|
|
61
|
-
function
|
|
64
|
+
function D(e) {
|
|
62
65
|
const t = window.unescape(encodeURIComponent(e));
|
|
63
66
|
return window.btoa(t);
|
|
64
67
|
}
|
|
65
|
-
function
|
|
66
|
-
setInterval(() => {
|
|
67
|
-
window.dispatchEvent(new Event("resize"));
|
|
68
|
-
}, e);
|
|
69
|
-
}
|
|
70
|
-
function P(e, t) {
|
|
71
|
-
const n = new Blob([JSON.stringify(t)], { type: "application/json" }), s = document.createElement("a");
|
|
72
|
-
s.download = e + ".json", s.href = window.URL.createObjectURL(n), s.dataset.downloadurl = ["application/json", s.download, s.href].join(":");
|
|
73
|
-
const a = new MouseEvent("click", {
|
|
74
|
-
view: window,
|
|
75
|
-
bubbles: !0,
|
|
76
|
-
cancelable: !0
|
|
77
|
-
});
|
|
78
|
-
s.dispatchEvent(a), s.remove();
|
|
79
|
-
}
|
|
80
|
-
function f(e) {
|
|
68
|
+
function l(e) {
|
|
81
69
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
82
70
|
}
|
|
83
71
|
function d(e) {
|
|
@@ -92,22 +80,22 @@ function d(e) {
|
|
|
92
80
|
e.hasOwnProperty(n) && (t[n] = d(e[n]));
|
|
93
81
|
return t;
|
|
94
82
|
}
|
|
95
|
-
function p(e, t, n =
|
|
83
|
+
function p(e, t, n = l) {
|
|
96
84
|
for (const s in t)
|
|
97
85
|
n(t[s]) ? (e[s] || Object.assign(e, { [s]: {} }), p(e[s], t[s], n)) : Object.assign(e, { [s]: t[s] });
|
|
98
86
|
return e;
|
|
99
87
|
}
|
|
100
|
-
function
|
|
88
|
+
function m(e) {
|
|
101
89
|
return e === null || typeof e == "undefined";
|
|
102
90
|
}
|
|
103
|
-
function
|
|
91
|
+
function f(e, t) {
|
|
104
92
|
if (typeof e != typeof t)
|
|
105
93
|
return !1;
|
|
106
|
-
if ([e, t].some((n) =>
|
|
94
|
+
if ([e, t].some((n) => m(n)))
|
|
107
95
|
return e === t;
|
|
108
96
|
if (Array.isArray(e)) {
|
|
109
97
|
const n = e.length > t.length ? e : t, s = e.length > t.length ? t : e;
|
|
110
|
-
return n.every((a,
|
|
98
|
+
return n.every((a, r) => f(a, s[r]));
|
|
111
99
|
}
|
|
112
100
|
if (typeof e != "object" || e instanceof Node || typeof e == "object" && e.constructor.toString().startsWith("class"))
|
|
113
101
|
return e === t;
|
|
@@ -115,89 +103,91 @@ function c(e, t) {
|
|
|
115
103
|
if (!t.hasOwnProperty(n))
|
|
116
104
|
return !1;
|
|
117
105
|
if (typeof e[n] == "object" && typeof t[n] == "object") {
|
|
118
|
-
if (!
|
|
106
|
+
if (!f(e[n], t[n]))
|
|
119
107
|
return !1;
|
|
120
108
|
} else if (e[n] !== t[n])
|
|
121
109
|
return !1;
|
|
122
110
|
}
|
|
123
111
|
return !0;
|
|
124
112
|
}
|
|
125
|
-
function
|
|
113
|
+
function E(e, t) {
|
|
126
114
|
const n = {};
|
|
127
115
|
for (const s in e)
|
|
128
116
|
t.includes(s) && (n[s] = e[s]);
|
|
129
117
|
return n;
|
|
130
118
|
}
|
|
131
|
-
function
|
|
119
|
+
function P(e, t) {
|
|
132
120
|
const n = {};
|
|
133
121
|
for (const s in e)
|
|
134
122
|
t.includes(s) || (n[s] = e[s]);
|
|
135
123
|
return n;
|
|
136
124
|
}
|
|
137
125
|
export {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
126
|
+
pe as calculateDistance,
|
|
127
|
+
me as calculateDistanceWithRadius,
|
|
128
|
+
Pe as camelToKebab,
|
|
129
|
+
Qe as capitalize,
|
|
130
|
+
ye as clamp,
|
|
143
131
|
d as cloneDeep,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
132
|
+
f as compareObjects,
|
|
133
|
+
g as cover,
|
|
134
|
+
ae as createJSONAndSave,
|
|
135
|
+
he as damp,
|
|
136
|
+
ie as debounce,
|
|
137
|
+
D as decode,
|
|
138
|
+
ne as dispatchSizeChangeEvent,
|
|
150
139
|
O as dotCircleCollision,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
140
|
+
w as dotRectCollision,
|
|
141
|
+
J as easeInCubic,
|
|
142
|
+
K as easeInExpo,
|
|
143
|
+
V as easeInOutCubic,
|
|
144
|
+
W as easeInOutExpo,
|
|
145
|
+
G as easeInOutQuad,
|
|
146
|
+
X as easeInOutQuart,
|
|
147
|
+
Y as easeInOutQuint,
|
|
148
|
+
Z as easeInQuad,
|
|
149
|
+
_ as easeInQuart,
|
|
150
|
+
$ as easeInQuint,
|
|
151
|
+
F as easeOutCubic,
|
|
152
|
+
H as easeOutExpo,
|
|
153
|
+
L as easeOutQuad,
|
|
154
|
+
b as easeOutQuart,
|
|
155
|
+
j as easeOutQuint,
|
|
156
|
+
k as encode,
|
|
168
157
|
M as findParentElement,
|
|
169
|
-
|
|
170
|
-
Ce as fix,
|
|
158
|
+
z as findScrollParentElement,
|
|
171
159
|
x as fixPosition,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
y as
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
160
|
+
Se as generateId,
|
|
161
|
+
fe as getCumulativeOffsetLeft,
|
|
162
|
+
ce as getCumulativeOffsetTop,
|
|
163
|
+
le as getCumulativePosition,
|
|
164
|
+
U as getElement,
|
|
165
|
+
ve as getElementTransitionDurationMS,
|
|
166
|
+
Me as getElementTransitionDurationS,
|
|
167
|
+
A as getPointerPosition,
|
|
168
|
+
y as insert,
|
|
169
|
+
B as isBrowser,
|
|
170
|
+
m as isNullish,
|
|
171
|
+
l as isObject,
|
|
172
|
+
Te as kebabToCamel,
|
|
173
|
+
xe as lerp,
|
|
174
|
+
ee as linear,
|
|
175
|
+
ge as mapRange,
|
|
186
176
|
h as measureText,
|
|
187
177
|
p as mergeDeep,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
178
|
+
I as normalize,
|
|
179
|
+
P as omit,
|
|
180
|
+
T as parseAttribute,
|
|
181
|
+
R as parseAttributeValue,
|
|
182
|
+
E as pick,
|
|
183
|
+
ke as preciseNumber,
|
|
184
|
+
we as round,
|
|
185
|
+
De as roundNumberTo,
|
|
186
|
+
C as screenToCartesian,
|
|
187
|
+
Oe as smootherstep,
|
|
188
|
+
Ce as smoothstep,
|
|
199
189
|
Re as snakeToDotted,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
190
|
+
Ie as step,
|
|
191
|
+
ue as throttle,
|
|
192
|
+
Ne as toPascalCase
|
|
203
193
|
};
|
package/lib/utils/number.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export declare function
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function generateId(length: number, characters?: string): string;
|
|
1
|
+
export declare function preciseNumber(number: number, n?: number): number;
|
|
2
|
+
export declare function roundNumberTo(number: number, to: number): number;
|
package/lib/utils/string.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export declare function camelToKebab(camelCaseString: string): string;
|
|
|
3
3
|
export declare function snakeToDotted(snake: string): string;
|
|
4
4
|
export declare function toPascalCase(str: string): string;
|
|
5
5
|
export declare function capitalize(string: string, everyWord?: boolean): string;
|
|
6
|
+
export declare function generateId(length: number, characters?: string): string;
|
|
@@ -16,4 +16,6 @@ export type WithRequired<T, K extends keyof T> = T & {
|
|
|
16
16
|
[P in K]-?: T[P];
|
|
17
17
|
};
|
|
18
18
|
export type Split<S extends string, D extends string> = string extends S ? string[] : S extends '' ? [] : S extends `${infer T}${D}${infer U}` ? [T, ...Split<U, D>] : [S];
|
|
19
|
+
export type KebabToCamel<S extends string> = S extends `${infer T}-${infer U}` ? `${T}${Capitalize<KebabToCamel<U>>}` : S;
|
|
20
|
+
export type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : '';
|
|
19
21
|
export {};
|
package/lib/video/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../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-BOOfmlyv.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,m=(s,t,n,r)=>{for(var e=r>1?void 0:r?a(t,n):t,i=s.length-1,u;i>=0;i--)(u=s[i])&&(e=(r?u(t,n,e):u(e))||e);return r&&e&&l(t,n,e),e};exports.VideoElement=class extends o.SourceElement{connectedCallback(){super.connectedCallback(),this.captureEvent.subscribe(()=>{this.hasAttribute("e-autoplay")&&this.consumerElement.play()}),this.releaseEvent.subscribe(()=>{this.hasAttribute("e-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0))})}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}};exports.VideoElement=m([c.define("e-video")],exports.VideoElement);
|
package/lib/video/index.js
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import { define as
|
|
2
|
-
import "../resizer/index.js";
|
|
3
|
-
import "../Store-
|
|
4
|
-
import { SourceElement as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "../order/index.js";
|
|
10
|
-
import "../intersector/index.js";
|
|
11
|
-
import "../loading/index.js";
|
|
12
|
-
var u = Object.defineProperty, l = Object.getOwnPropertyDescriptor, a = (t, r, s, i) => {
|
|
13
|
-
for (var e = i > 1 ? void 0 : i ? l(r, s) : r, o = t.length - 1, m; o >= 0; o--)
|
|
14
|
-
(m = t[o]) && (e = (i ? m(r, s, e) : m(e)) || e);
|
|
15
|
-
return i && e && u(r, s, e), e;
|
|
1
|
+
import { define as u } from "../custom-element/index.js";
|
|
2
|
+
import "../window-resizer/index.js";
|
|
3
|
+
import "../Store-uTyReFzx.js";
|
|
4
|
+
import { SourceElement as l } from "../source/index.js";
|
|
5
|
+
var m = Object.defineProperty, a = Object.getOwnPropertyDescriptor, p = (t, r, i, s) => {
|
|
6
|
+
for (var e = s > 1 ? void 0 : s ? a(r, i) : r, n = t.length - 1, o; n >= 0; n--)
|
|
7
|
+
(o = t[n]) && (e = (s ? o(r, i, e) : o(e)) || e);
|
|
8
|
+
return s && e && m(r, i, e), e;
|
|
16
9
|
};
|
|
17
|
-
let
|
|
10
|
+
let c = class extends l {
|
|
18
11
|
connectedCallback() {
|
|
19
12
|
super.connectedCallback(), this.captureEvent.subscribe(() => {
|
|
20
13
|
this.hasAttribute("e-autoplay") && this.consumerElement.play();
|
|
@@ -29,9 +22,9 @@ let n = class extends p {
|
|
|
29
22
|
this.consumerElement.src = t || "";
|
|
30
23
|
}
|
|
31
24
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
],
|
|
25
|
+
c = p([
|
|
26
|
+
u("e-video")
|
|
27
|
+
], c);
|
|
35
28
|
export {
|
|
36
|
-
|
|
29
|
+
c as VideoElement
|
|
37
30
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var w=(e,i,s)=>{if(!i.has(e))throw TypeError("Cannot "+s)};var n=(e,i,s)=>(w(e,i,"read from private field"),s?s.call(e):i.get(e)),d=(e,i,s)=>{if(i.has(e))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(e):i.set(e,s)},c=(e,i,s,o)=>(w(e,i,"write to private field"),o?o.call(e,s):i.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../notifier/index.cjs"),a=require("../browser-CpzFX2xg.cjs"),h=require("../function-MthRj-GJ.cjs"),v=h.debounce(e=>{e?window.dispatchEvent(new CustomEvent("resize",{detail:{cause:e}})):window.dispatchEvent(new Event("resize"))},0);var t,r,u;class z extends b.Notifier{constructor(){super();d(this,t,!1);d(this,r,()=>{n(this,t)||(c(this,t,!0),n(this,u).call(this))});d(this,u,h.debounce(()=>{this.notify(),c(this,t,!1)},0));a.isBrowser&&(addEventListener("resize",n(this,r)),n(this,r).call(this))}subscribe(s,o){const f=super.subscribe(s,o);return n(this,t)||s(),f}}t=new WeakMap,r=new WeakMap,u=new WeakMap;const l=new z;exports.WindowResizer=z;exports.dispatchWindowResizeEvent=v;exports.windowResizer=l;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Notifier } from '../notifier';
|
|
2
|
+
export type WindowResizerCallback = () => void;
|
|
3
|
+
export declare const dispatchWindowResizeEvent: (cause?: any) => void;
|
|
4
|
+
export declare class WindowResizer extends Notifier<WindowResizerCallback> {
|
|
5
|
+
#private;
|
|
6
|
+
constructor();
|
|
7
|
+
subscribe(callback: WindowResizerCallback, order?: number): () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const windowResizer: WindowResizer;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var f = (e, s, i) => {
|
|
2
|
+
if (!s.has(e))
|
|
3
|
+
throw TypeError("Cannot " + i);
|
|
4
|
+
};
|
|
5
|
+
var r = (e, s, i) => (f(e, s, "read from private field"), i ? i.call(e) : s.get(e)), d = (e, s, i) => {
|
|
6
|
+
if (s.has(e))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
s instanceof WeakSet ? s.add(e) : s.set(e, i);
|
|
9
|
+
}, w = (e, s, i, o) => (f(e, s, "write to private field"), o ? o.call(e, i) : s.set(e, i), i);
|
|
10
|
+
import { Notifier as p } from "../notifier/index.js";
|
|
11
|
+
import { i as z } from "../browser-0zX67oeU.js";
|
|
12
|
+
import { d as u } from "../function-C10DGppn.js";
|
|
13
|
+
const l = u((e) => {
|
|
14
|
+
e ? window.dispatchEvent(
|
|
15
|
+
new CustomEvent("resize", {
|
|
16
|
+
detail: {
|
|
17
|
+
cause: e
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
) : window.dispatchEvent(new Event("resize"));
|
|
21
|
+
}, 0);
|
|
22
|
+
var t, n, h;
|
|
23
|
+
class a extends p {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
d(this, t, !1);
|
|
27
|
+
d(this, n, () => {
|
|
28
|
+
r(this, t) || (w(this, t, !0), r(this, h).call(this));
|
|
29
|
+
});
|
|
30
|
+
d(this, h, u(() => {
|
|
31
|
+
this.notify(), w(this, t, !1);
|
|
32
|
+
}, 0));
|
|
33
|
+
z && (addEventListener("resize", r(this, n)), r(this, n).call(this));
|
|
34
|
+
}
|
|
35
|
+
subscribe(i, o) {
|
|
36
|
+
const c = super.subscribe(i, o);
|
|
37
|
+
return r(this, t) || i(), c;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
t = new WeakMap(), n = new WeakMap(), h = new WeakMap();
|
|
41
|
+
const R = new a();
|
|
42
|
+
export {
|
|
43
|
+
a as WindowResizer,
|
|
44
|
+
l as dispatchWindowResizeEvent,
|
|
45
|
+
R as windowResizer
|
|
46
|
+
};
|