aptechka 0.41.7 → 0.42.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-CMiBKrwE.cjs +1 -0
- package/lib/{Animation-CSexZn4M.js → Animation-DPRlQfW2.js} +1 -1
- package/lib/{Damped-BMr6Toib.cjs → Damped-CHZ314Rn.cjs} +1 -1
- package/lib/{Damped-Bcngr1kp.js → Damped-DxylD27S.js} +1 -1
- package/lib/{Tweened-D-vlLZdS.cjs → Tweened-Dn6CMA-p.cjs} +1 -1
- package/lib/{Tweened-sqOQu9Gf.js → Tweened-p5hYr6lL.js} +2 -2
- package/lib/animation/Animation.d.ts +2 -2
- package/lib/animation/Damped.d.ts +1 -1
- package/lib/animation/Tweened.d.ts +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.d.ts +1 -1
- package/lib/attribute/index.js +1 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/class-linked-status/index.d.ts +1 -1
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.js +1 -1
- package/lib/controls/AutoplayControls.d.ts +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +4 -4
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +1 -1
- package/lib/css-property/index.js +2 -2
- package/lib/custom-scrollbar/index.cjs +1 -0
- package/lib/custom-scrollbar/index.d.ts +13 -0
- package/lib/custom-scrollbar/index.js +60 -0
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/Viewport.d.ts +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/{dom-0S_WDL4g.js → dom-CVWzyXPH.js} +2 -2
- package/lib/{easings-BEmRlrDd.js → easings-Bni3YAAW.js} +15 -15
- package/lib/element-resizer/index.cjs +1 -0
- package/lib/element-resizer/{vanilla/index.d.ts → index.d.ts} +1 -1
- package/lib/element-resizer/{vanilla/index.js → index.js} +2 -2
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +3 -3
- package/lib/iframe/index.cjs +1 -0
- package/lib/iframe/index.js +38 -0
- package/lib/image/index.cjs +1 -0
- package/lib/image/index.js +20 -0
- package/lib/intersector/index.cjs +1 -0
- package/lib/intersector/{vanilla/index.d.ts → index.d.ts} +1 -1
- package/lib/intersector/{vanilla/index.js → index.js} +2 -2
- package/lib/ladder/index.d.ts +1 -1
- package/lib/layout-Ctc2p3uz.cjs +1 -0
- package/lib/layout-DpZo-I0y.js +29 -0
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +1 -1
- package/lib/layout-box/index.js +5 -5
- package/lib/masonry-layout/index.cjs +1 -0
- package/lib/masonry-layout/index.d.ts +11 -0
- package/lib/masonry-layout/index.js +60 -0
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.d.ts +1 -1
- package/lib/media/index.js +1 -1
- package/lib/need_redo_tweaker/TweakerBooleanManagerElement.d.ts +1 -1
- package/lib/need_redo_tweaker/TweakerColorManagerElement.d.ts +1 -1
- package/lib/need_redo_tweaker/TweakerElement.d.ts +1 -1
- package/lib/need_redo_tweaker/TweakerFieldElement.d.ts +1 -1
- package/lib/need_redo_tweaker/TweakerFolderElement.d.ts +1 -1
- package/lib/need_redo_tweaker/TweakerLinkManagerElement.d.ts +1 -1
- package/lib/need_redo_tweaker/TweakerNumberManagerElement.d.ts +1 -1
- package/lib/need_redo_tweaker/TweakerSelectManagerElement.d.ts +1 -1
- package/lib/need_redo_tweaker/TweakerStoreManagerElement.d.ts +1 -1
- package/lib/need_redo_tweaker/TweakerStringManagerElement.d.ts +1 -1
- package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +1 -1
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +2 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +5 -5
- package/lib/popover/PopoverElement.d.ts +1 -1
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +1 -1
- package/lib/scroll/{vanilla/ScrollElement.d.ts → ScrollElement.d.ts} +4 -4
- package/lib/scroll/{vanilla/ScrollSegmentElement.d.ts → ScrollSegmentElement.d.ts} +1 -1
- package/lib/scroll/index.cjs +1 -0
- package/lib/scroll/{vanilla/index.js → index.js} +50 -50
- package/lib/scroll-entries/index.js +1 -1
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.d.ts +1 -1
- package/lib/scroll-segment/index.js +4 -4
- package/lib/sequence/index.cjs +1 -0
- package/lib/{media-elements/sequence → sequence}/index.d.ts +2 -3
- package/lib/sequence/index.js +158 -0
- package/lib/size-element/index.cjs +1 -0
- package/lib/size-element/index.d.ts +10 -0
- package/lib/size-element/index.js +32 -0
- package/lib/{media-elements/source/index.d.ts → source/SourceElement.d.ts} +3 -3
- package/lib/source/SourceManager.d.ts +1 -1
- package/lib/source/index.cjs +5 -1
- package/lib/source/index.d.ts +1 -0
- package/lib/source/index.js +173 -67
- package/lib/store/index.cjs +1 -0
- package/lib/store/{vanilla/index.js → index.js} +3 -3
- package/lib/ticker/index.cjs +1 -0
- package/lib/ticker/{vanilla/index.d.ts → index.d.ts} +1 -1
- package/lib/ticker/{vanilla/index.js → index.js} +2 -2
- package/lib/utils/clipboard.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +3 -1
- package/lib/utils/index.js +190 -144
- package/lib/utils/layout.d.ts +4 -3
- package/lib/utils/scroll.d.ts +6 -0
- package/lib/utils/template.d.ts +1 -0
- package/lib/video/index.cjs +1 -0
- package/lib/video/index.js +54 -0
- package/lib/window-resizer/index.cjs +1 -0
- package/lib/window-resizer/{vanilla/index.d.ts → index.d.ts} +1 -1
- package/lib/window-resizer/{vanilla/index.js → index.js} +3 -3
- package/lib/youtube/index.cjs +1 -0
- package/lib/youtube/index.js +81 -0
- package/package.json +101 -99
- package/lib/Animation-esZH7swx.cjs +0 -1
- package/lib/element-resizer/react/index.cjs +0 -1
- package/lib/element-resizer/react/index.d.ts +0 -2
- package/lib/element-resizer/react/index.js +0 -8
- package/lib/element-resizer/vanilla/index.cjs +0 -1
- package/lib/intersector/react/index.cjs +0 -1
- package/lib/intersector/react/index.d.ts +0 -4
- package/lib/intersector/react/index.js +0 -12
- package/lib/intersector/vanilla/index.cjs +0 -1
- package/lib/layout-8ryRAMGJ.cjs +0 -1
- package/lib/layout-HoBT_Da2.js +0 -12
- package/lib/media-elements/index.cjs +0 -5
- package/lib/media-elements/index.d.ts +0 -6
- package/lib/media-elements/index.js +0 -416
- package/lib/scroll/react/Scroll.d.ts +0 -13
- package/lib/scroll/react/ScrollBulletButtons.d.ts +0 -11
- package/lib/scroll/react/ScrollSegment.d.ts +0 -18
- package/lib/scroll/react/ScrollSetButton.d.ts +0 -14
- package/lib/scroll/react/ScrollStepButton.d.ts +0 -14
- package/lib/scroll/react/Scrollbar.d.ts +0 -11
- package/lib/scroll/react/index.cjs +0 -30
- package/lib/scroll/react/index.d.ts +0 -6
- package/lib/scroll/react/index.js +0 -761
- package/lib/scroll/vanilla/index.cjs +0 -1
- package/lib/store/react/index.cjs +0 -1
- package/lib/store/react/index.d.ts +0 -1
- package/lib/store/react/index.js +0 -14
- package/lib/store/react/useStore.d.ts +0 -2
- package/lib/store/vanilla/index.cjs +0 -1
- package/lib/studio/Outliner/File/index.d.ts +0 -8
- package/lib/studio/Outliner/Folder/index.d.ts +0 -9
- package/lib/studio/Outliner/index.d.ts +0 -2
- package/lib/studio/Studio/index.d.ts +0 -2
- package/lib/studio/Tweaker/index.d.ts +0 -4
- package/lib/studio/index.d.ts +0 -1
- package/lib/studio/store.d.ts +0 -2
- package/lib/ticker/react/index.cjs +0 -1
- package/lib/ticker/react/index.d.ts +0 -5
- package/lib/ticker/react/index.js +0 -19
- package/lib/ticker/vanilla/index.cjs +0 -1
- package/lib/utils/ts-react-utility.d.ts +0 -12
- package/lib/window-resizer/react/index.cjs +0 -1
- package/lib/window-resizer/react/index.d.ts +0 -2
- package/lib/window-resizer/react/index.js +0 -8
- package/lib/window-resizer/vanilla/index.cjs +0 -1
- /package/lib/{media-elements/iframe → iframe}/index.d.ts +0 -0
- /package/lib/{media-elements/image → image}/index.d.ts +0 -0
- /package/lib/scroll/{vanilla/ScrollBulletButtonsElement.d.ts → ScrollBulletButtonsElement.d.ts} +0 -0
- /package/lib/scroll/{vanilla/ScrollButtonElement.d.ts → ScrollButtonElement.d.ts} +0 -0
- /package/lib/scroll/{vanilla/ScrollSection.d.ts → ScrollSection.d.ts} +0 -0
- /package/lib/scroll/{vanilla/ScrollSetButtonElement.d.ts → ScrollSetButtonElement.d.ts} +0 -0
- /package/lib/scroll/{vanilla/ScrollStepButtonElement.d.ts → ScrollStepButtonElement.d.ts} +0 -0
- /package/lib/scroll/{vanilla/ScrollUserElement.d.ts → ScrollUserElement.d.ts} +0 -0
- /package/lib/scroll/{vanilla/ScrollbarElement.d.ts → ScrollbarElement.d.ts} +0 -0
- /package/lib/scroll/{vanilla/index.d.ts → index.d.ts} +0 -0
- /package/lib/store/{vanilla/Composed.d.ts → Composed.d.ts} +0 -0
- /package/lib/store/{vanilla/Derived.d.ts → Derived.d.ts} +0 -0
- /package/lib/store/{vanilla/DerivedArray.d.ts → DerivedArray.d.ts} +0 -0
- /package/lib/store/{vanilla/Resource.d.ts → Resource.d.ts} +0 -0
- /package/lib/store/{vanilla/Store.d.ts → Store.d.ts} +0 -0
- /package/lib/store/{vanilla/StoreRegistry.d.ts → StoreRegistry.d.ts} +0 -0
- /package/lib/store/{vanilla/index.d.ts → index.d.ts} +0 -0
- /package/lib/{media-elements/video → video}/index.d.ts +0 -0
- /package/lib/{media-elements/youtube → youtube}/index.d.ts +0 -0
package/lib/utils/index.js
CHANGED
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { i as
|
|
3
|
-
import { a as
|
|
4
|
-
import { g as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { d as ee } from "../
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { c as
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { a as A, p as Q } from "../attributes-69we3byR.js";
|
|
2
|
+
import { i as D } from "../browser-0zX67oeU.js";
|
|
3
|
+
import { a as V, c as N, f as z, m as F } from "../canvas-DeZ0SLUJ.js";
|
|
4
|
+
import { g as H, n as U, s as k } from "../coordinates-CgdGoSYs.js";
|
|
5
|
+
import { g as i, f as p } from "../dom-CVWzyXPH.js";
|
|
6
|
+
import { b as q, a as K } from "../dom-CVWzyXPH.js";
|
|
7
|
+
import { f as G, p as J, h as L, a as Y, d as Z, k as X, o as _, b as ee, i as te, m as oe, g as se, q as ae, c as ne, j as re, n as ie, l as ce } from "../easings-Bni3YAAW.js";
|
|
8
|
+
import { d as ue } from "../events-CsVF98U6.js";
|
|
9
|
+
import { c as pe, d as me } from "../file-GHShUlue.js";
|
|
10
|
+
import { d as xe, t as he } from "../function-C10DGppn.js";
|
|
11
|
+
import { s as ye } from "../gestures-D2Fdra_G.js";
|
|
12
|
+
import { c as Ce, s as Te } from "../jss-CjccJC-K.js";
|
|
13
|
+
import { a as m } from "../layout-DpZo-I0y.js";
|
|
14
|
+
import { g as we, b as Ee, c as Oe } from "../layout-DpZo-I0y.js";
|
|
15
|
+
import { e as Pe, f as Ie, c as Be, d as Ae, l as Qe, m as Re, r as De, b as Me, a as Ve, s as Ne } from "../math-BOBiC4TN.js";
|
|
16
|
+
import { l as Fe, n as je, p as He, r as Ue, t as ke } from "../polyfills-CxfUK5OU.js";
|
|
17
|
+
import { c as qe, d as Ke, i as We, b as Ge, a as Je, m as Le, e as Ye, o as Ze, p as Xe } from "../object-D6MVWB4l.js";
|
|
18
|
+
import { c as et, a as tt, g as ot, i as st, k as at, s as nt, t as rt, u as it } from "../string-f0Dnk0L1.js";
|
|
19
|
+
import { g as lt, a as ut } from "../style-j2TwriJ_.js";
|
|
20
|
+
import { c as pt, n as mt, p as dt, s as xt, u as ht } from "../url-B5eH5z6S.js";
|
|
21
|
+
function h(t, e, ...o) {
|
|
22
|
+
return [...t.slice(0, e), ...o, ...t.slice(e)];
|
|
21
23
|
}
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
e = e %
|
|
25
|
-
const s = new Array(
|
|
26
|
-
for (let
|
|
27
|
-
const
|
|
28
|
-
s[
|
|
24
|
+
function g(t, e) {
|
|
25
|
+
const o = t.length;
|
|
26
|
+
e = e % o;
|
|
27
|
+
const s = new Array(o);
|
|
28
|
+
for (let a = 0; a < o; a++) {
|
|
29
|
+
const n = (a + e) % o;
|
|
30
|
+
s[n] = t[a];
|
|
29
31
|
}
|
|
30
32
|
return s;
|
|
31
33
|
}
|
|
32
|
-
function
|
|
33
|
-
if (!+
|
|
34
|
-
const
|
|
34
|
+
function y(t, e = 2) {
|
|
35
|
+
if (!+t) return "0 Bytes";
|
|
36
|
+
const o = 1024, s = e < 0 ? 0 : e, a = [
|
|
35
37
|
"Bytes",
|
|
36
38
|
"KiB",
|
|
37
39
|
"MiB",
|
|
@@ -41,138 +43,182 @@ function c(a, e = 2) {
|
|
|
41
43
|
"EiB",
|
|
42
44
|
"ZiB",
|
|
43
45
|
"YiB"
|
|
44
|
-
],
|
|
45
|
-
return `${parseFloat((
|
|
46
|
+
], n = Math.floor(Math.log(t) / Math.log(o));
|
|
47
|
+
return `${parseFloat((t / Math.pow(o, n)).toFixed(s))} ${a[n]}`;
|
|
46
48
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
+
function b(t) {
|
|
50
|
+
if (navigator.clipboard)
|
|
51
|
+
navigator.clipboard.writeText(t).then(() => {
|
|
52
|
+
console.log("Text copied to clipboard successfully!");
|
|
53
|
+
}).catch((e) => {
|
|
54
|
+
console.error("Failed to copy text to clipboard:", e);
|
|
55
|
+
});
|
|
56
|
+
else {
|
|
57
|
+
const e = document.createElement("textarea");
|
|
58
|
+
e.value = t, e.style.position = "fixed", e.style.top = "0", e.style.left = "0", document.body.appendChild(e), e.select();
|
|
59
|
+
try {
|
|
60
|
+
document.execCommand("copy") ? console.log("Text copied to clipboard successfully!") : console.error("Failed to copy text to clipboard.");
|
|
61
|
+
} catch (o) {
|
|
62
|
+
console.error("Failed to copy text to clipboard:", o);
|
|
63
|
+
}
|
|
64
|
+
document.body.removeChild(e);
|
|
65
|
+
}
|
|
49
66
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
67
|
+
function C(t, e) {
|
|
68
|
+
return t.x < e.x + e.width && t.x > e.x && t.y < e.y + e.height && t.y > e.y;
|
|
52
69
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
70
|
+
function T(t, e) {
|
|
71
|
+
return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2) < e.radius;
|
|
72
|
+
}
|
|
73
|
+
function c(t, e) {
|
|
74
|
+
const o = t.style.getPropertyValue(e);
|
|
75
|
+
if (o) {
|
|
76
|
+
const s = o.toString();
|
|
77
|
+
return s.startsWith("var") ? c(t, s.slice(4, -1)) : s;
|
|
58
78
|
}
|
|
59
79
|
}
|
|
60
|
-
function
|
|
80
|
+
function S(...t) {
|
|
61
81
|
const e = {};
|
|
62
|
-
return Array.from(document.styleSheets).forEach((
|
|
63
|
-
Array.from(
|
|
64
|
-
s instanceof CSSStyleRule && s.selectorText === ":root" &&
|
|
65
|
-
const
|
|
66
|
-
|
|
82
|
+
return Array.from(document.styleSheets).forEach((o) => {
|
|
83
|
+
Array.from(o.cssRules).forEach((s) => {
|
|
84
|
+
s instanceof CSSStyleRule && s.selectorText === ":root" && t.forEach((a) => {
|
|
85
|
+
const n = c(s, a);
|
|
86
|
+
n && (e[a] = n);
|
|
67
87
|
});
|
|
68
88
|
});
|
|
69
|
-
}),
|
|
70
|
-
e[
|
|
89
|
+
}), t.forEach((o) => {
|
|
90
|
+
e[o] || console.warn(`variable named ${o} not found`);
|
|
71
91
|
}), e;
|
|
72
92
|
}
|
|
73
|
-
function
|
|
74
|
-
const e = window.atob(
|
|
93
|
+
function w(t) {
|
|
94
|
+
const e = window.atob(t);
|
|
75
95
|
return decodeURIComponent(window.escape(e));
|
|
76
96
|
}
|
|
77
|
-
function
|
|
78
|
-
const e = window.unescape(encodeURIComponent(
|
|
97
|
+
function E(t) {
|
|
98
|
+
const e = window.unescape(encodeURIComponent(t));
|
|
79
99
|
return window.btoa(e);
|
|
80
100
|
}
|
|
81
|
-
function
|
|
101
|
+
function O(t) {
|
|
82
102
|
return new Promise((e) => {
|
|
83
103
|
setTimeout(() => {
|
|
84
104
|
e();
|
|
85
|
-
},
|
|
105
|
+
}, t);
|
|
86
106
|
});
|
|
87
107
|
}
|
|
108
|
+
function v(t, {
|
|
109
|
+
behaviour: e = "instant",
|
|
110
|
+
offset: o = 0,
|
|
111
|
+
center: s = !1
|
|
112
|
+
} = {}) {
|
|
113
|
+
var n;
|
|
114
|
+
const a = i(t);
|
|
115
|
+
if (a) {
|
|
116
|
+
const r = p(a), l = m(a), u = (typeof o == "number" ? o : ((n = i(o)) == null ? void 0 : n.offsetHeight) || 0) * -1, f = s ? innerHeight / 2 * -1 + a.offsetHeight / 2 : 0;
|
|
117
|
+
r == null || r.scroll({
|
|
118
|
+
top: l + u + f,
|
|
119
|
+
behavior: e
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function P(t, e) {
|
|
124
|
+
if (t) {
|
|
125
|
+
const s = t.content.cloneNode(!0).firstElementChild;
|
|
126
|
+
return s && (e == null || e(s)), s;
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
88
130
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
131
|
+
Pe as calculateDistance,
|
|
132
|
+
Ie as calculateDistanceWithRadius,
|
|
133
|
+
et as camelToKebab,
|
|
134
|
+
tt as capitalize,
|
|
135
|
+
pt as changeHistory,
|
|
136
|
+
Be as clamp,
|
|
137
|
+
qe as cloneDeep,
|
|
138
|
+
P as cloneTemplateContent,
|
|
139
|
+
Ke as compareObjects,
|
|
140
|
+
V as contain,
|
|
141
|
+
b as copyTextToClipboard,
|
|
142
|
+
N as cover,
|
|
143
|
+
pe as createJSONAndSave,
|
|
144
|
+
Ce as createStylesheet,
|
|
145
|
+
Ae as damp,
|
|
146
|
+
xe as debounce,
|
|
147
|
+
E as decode,
|
|
148
|
+
ue as dispatchEvent,
|
|
149
|
+
T as dotCircleCollision,
|
|
150
|
+
C as dotRectCollision,
|
|
151
|
+
me as downloadURI,
|
|
152
|
+
G as easeInCubic,
|
|
153
|
+
J as easeInExpo,
|
|
154
|
+
L as easeInOutCubic,
|
|
155
|
+
Y as easeInOutExpo,
|
|
156
|
+
Z as easeInOutQuad,
|
|
157
|
+
X as easeInOutQuart,
|
|
158
|
+
_ as easeInOutQuint,
|
|
159
|
+
ee as easeInQuad,
|
|
160
|
+
te as easeInQuart,
|
|
161
|
+
oe as easeInQuint,
|
|
162
|
+
se as easeOutCubic,
|
|
163
|
+
ae as easeOutExpo,
|
|
164
|
+
ne as easeOutQuad,
|
|
165
|
+
re as easeOutQuart,
|
|
166
|
+
ie as easeOutQuint,
|
|
167
|
+
w as encode,
|
|
168
|
+
q as findParentElement,
|
|
169
|
+
p as findScrollParentElement,
|
|
170
|
+
z as fixPosition,
|
|
171
|
+
y as formatBytes,
|
|
172
|
+
ot as generateId,
|
|
173
|
+
K as getAllParentElements,
|
|
174
|
+
we as getCumulativeOffsetLeft,
|
|
175
|
+
m as getCumulativeOffsetTop,
|
|
176
|
+
Ee as getCumulativePosition,
|
|
177
|
+
i as getElement,
|
|
178
|
+
lt as getElementTransitionDurationMS,
|
|
179
|
+
ut as getElementTransitionDurationS,
|
|
180
|
+
H as getPointerPosition,
|
|
181
|
+
S as getRootVariables,
|
|
182
|
+
Oe as getStickyOffset,
|
|
183
|
+
h as insert,
|
|
184
|
+
D as isBrowser,
|
|
185
|
+
We as isESClass,
|
|
186
|
+
Ge as isNullish,
|
|
187
|
+
Je as isObject,
|
|
188
|
+
st as isUppercase,
|
|
189
|
+
at as kebabToCamel,
|
|
190
|
+
Qe as lerp,
|
|
191
|
+
ce as linear,
|
|
192
|
+
Fe as loopNumber,
|
|
193
|
+
Re as mapRange,
|
|
194
|
+
F as measureText,
|
|
195
|
+
Le as mergeDeep,
|
|
196
|
+
Ye as mixin,
|
|
197
|
+
U as normalize,
|
|
198
|
+
mt as normalizeBase,
|
|
199
|
+
je as nullishCoalescing,
|
|
200
|
+
Ze as omit,
|
|
201
|
+
A as parseAttribute,
|
|
202
|
+
Q as parseAttributeValue,
|
|
203
|
+
dt as parseSearchParameters,
|
|
204
|
+
Xe as pick,
|
|
205
|
+
He as preciseNumber,
|
|
206
|
+
De as round,
|
|
207
|
+
Ue as roundNumberTo,
|
|
208
|
+
k as screenToCartesian,
|
|
209
|
+
v as scrollToElement,
|
|
210
|
+
ye as setupDrag,
|
|
211
|
+
g as shiftArray,
|
|
212
|
+
Me as smootherstep,
|
|
213
|
+
Ve as smoothstep,
|
|
214
|
+
nt as snakeToDotted,
|
|
215
|
+
xt as splitPath,
|
|
216
|
+
Ne as step,
|
|
217
|
+
Te as styleToString,
|
|
218
|
+
he as throttle,
|
|
219
|
+
rt as toPascalCase,
|
|
220
|
+
ke as toStep,
|
|
221
|
+
it as uncapitalize,
|
|
222
|
+
ht as updateSearchParameter,
|
|
223
|
+
O as wait
|
|
178
224
|
};
|
package/lib/utils/layout.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export declare
|
|
3
|
-
export declare
|
|
1
|
+
export declare function getCumulativePosition(target: HTMLElement, from?: 'offsetLeft' | 'offsetTop', stopElement?: HTMLElement): number;
|
|
2
|
+
export declare function getCumulativeOffsetLeft(target: HTMLElement, stopElement?: HTMLElement): number;
|
|
3
|
+
export declare function getCumulativeOffsetTop(target: HTMLElement, stopElement?: HTMLElement): number;
|
|
4
|
+
export declare function getStickyOffset(el: HTMLElement, type: 'top' | 'left'): number;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ElementOrSelector } from '.';
|
|
2
|
+
export declare function scrollToElement(elementOrSelector: ElementOrSelector<HTMLElement>, { behaviour, offset, center, }?: {
|
|
3
|
+
behaviour?: ScrollBehavior;
|
|
4
|
+
offset?: number | ElementOrSelector<HTMLElement>;
|
|
5
|
+
center?: boolean;
|
|
6
|
+
}): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function cloneTemplateContent<T extends HTMLElement>(templateElement: HTMLTemplateElement | undefined | null, callback?: (element: T) => void): T | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var l=e=>{throw TypeError(e)};var d=(e,s,t)=>s.has(e)||l("Cannot "+t);var i=(e,s,t)=>(d(e,s,"read from private field"),t?t.call(e):s.get(e)),n=(e,s,t)=>s.has(e)?l("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),c=(e,s,t,o)=>(d(e,s,"write to private field"),o?o.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-C2J4Q87x.cjs");const E=require("../events-KVanG9sR.cjs"),u=require("../ticker/index.cjs");var r,a;class h extends m.SourceElement{constructor(){super(...arguments);n(this,r,0);n(this,a,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const t=this.consumerElement.readyState/4;t>i(this,r)&&c(this,r,t),E.dispatchEvent(this,"videoReadyStateChange",{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(t){this.consumerElement.src=t||"",this.consumerElement.autoplay=!0}}r=new WeakMap,a=new WeakMap;customElements.get("e-video")||customElements.define("e-video",h);exports.VideoElement=h;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var m = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
|
+
};
|
|
4
|
+
var l = (e, s, t) => s.has(e) || m("Cannot " + t);
|
|
5
|
+
var i = (e, s, t) => (l(e, s, "read from private field"), t ? t.call(e) : s.get(e)), n = (e, s, t) => s.has(e) ? m("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), c = (e, s, t, u) => (l(e, s, "write to private field"), u ? u.call(e, t) : s.set(e, t), t);
|
|
6
|
+
import { SourceElement as h } from "../source/index.js";
|
|
7
|
+
import "../window-resizer/index.js";
|
|
8
|
+
import "../Store-Cm3LPXlx.js";
|
|
9
|
+
import { d } from "../events-CsVF98U6.js";
|
|
10
|
+
import { ticker as o } from "../ticker/index.js";
|
|
11
|
+
var r, a;
|
|
12
|
+
class p extends h {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
n(this, r, 0);
|
|
16
|
+
n(this, a, () => {
|
|
17
|
+
this.classList.add(`state-${this.consumerElement.readyState}`);
|
|
18
|
+
const t = this.consumerElement.readyState / 4;
|
|
19
|
+
t > i(this, r) && c(this, r, t), d(this, "videoReadyStateChange", {
|
|
20
|
+
detail: {
|
|
21
|
+
readyState: this.consumerElement.readyState,
|
|
22
|
+
progress: i(this, r)
|
|
23
|
+
}
|
|
24
|
+
}), this.consumerElement.readyState === 4 && o.unsubscribe(i(this, a));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
connectedCallback() {
|
|
28
|
+
super.connectedCallback(), this.addEventListener("sourceCapture", () => {
|
|
29
|
+
o.subscribe(i(this, a)), this.hasAttribute("capture-autoplay") && this.consumerElement.play();
|
|
30
|
+
}), this.addEventListener("sourceRelease", () => {
|
|
31
|
+
this.hasAttribute("capture-autoplay") && (this.consumerElement.pause(), this.hasAttribute("replay") && (this.consumerElement.currentTime = 0)), this.hasAttribute("reload-source") && this.classList.remove(
|
|
32
|
+
"state-0",
|
|
33
|
+
"state-1",
|
|
34
|
+
"state-2",
|
|
35
|
+
"state-3",
|
|
36
|
+
"state-4"
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
super.disconnectedCallback(), o.unsubscribe(i(this, a)), c(this, r, 0);
|
|
42
|
+
}
|
|
43
|
+
createConsumer() {
|
|
44
|
+
return document.createElement("video");
|
|
45
|
+
}
|
|
46
|
+
consumeSource(t) {
|
|
47
|
+
this.consumerElement.src = t || "", this.consumerElement.autoplay = !0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
r = new WeakMap(), a = new WeakMap();
|
|
51
|
+
customElements.get("e-video") || customElements.define("e-video", p);
|
|
52
|
+
export {
|
|
53
|
+
p as VideoElement
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var w=e=>{throw TypeError(e)};var f=(e,i,s)=>i.has(e)||w("Cannot "+s);var t=(e,i,s)=>(f(e,i,"read from private field"),s?s.call(e):i.get(e)),u=(e,i,s)=>i.has(e)?w("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),c=(e,i,s,o)=>(f(e,i,"write to private field"),o?o.call(e,s):i.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("../notifier/index.cjs"),l=require("../browser-CpzFX2xg.cjs"),R=require("../function-MthRj-GJ.cjs");var r,n,d;class h extends z.Notifier{constructor(){super();u(this,r,!1);u(this,n,()=>{t(this,r)||(c(this,r,!0),t(this,d).call(this))});u(this,d,R.debounce(()=>{this.notify(),c(this,r,!1)},0));l.isBrowser&&(window.addEventListener("resize",t(this,n)),t(this,n).call(this))}subscribe(s,o){const b=super.subscribe(s,o);return t(this,r)||s(),b}}r=new WeakMap,n=new WeakMap,d=new WeakMap;const a=new h;exports.WindowResizer=h;exports.windowResizer=a;
|
|
@@ -3,9 +3,9 @@ var h = (s) => {
|
|
|
3
3
|
};
|
|
4
4
|
var c = (s, e, i) => e.has(s) || h("Cannot " + i);
|
|
5
5
|
var t = (s, e, i) => (c(s, e, "read from private field"), i ? i.call(s) : e.get(s)), u = (s, e, i) => e.has(s) ? h("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, i), f = (s, e, i, n) => (c(s, e, "write to private field"), n ? n.call(s, i) : e.set(s, i), i);
|
|
6
|
-
import { Notifier as m } from "
|
|
7
|
-
import { i as p } from "
|
|
8
|
-
import { d as z } from "
|
|
6
|
+
import { Notifier as m } from "../notifier/index.js";
|
|
7
|
+
import { i as p } from "../browser-0zX67oeU.js";
|
|
8
|
+
import { d as z } from "../function-C10DGppn.js";
|
|
9
9
|
var r, o, d;
|
|
10
10
|
class b extends m {
|
|
11
11
|
constructor() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var v=s=>{throw TypeError(s)};var E=(s,r,t)=>r.has(s)||v("Cannot "+t);var e=(s,r,t)=>(E(s,r,"read from private field"),t?t.call(s):r.get(s)),o=(s,r,t)=>r.has(s)?v("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),u=(s,r,t,a)=>(E(s,r,"write to private field"),a?a.call(s,t):r.set(s,t),t),I=(s,r,t)=>(E(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-C2J4Q87x.cjs");const L=require("../events-KVanG9sR.cjs"),T=require("../string-DhgS_iFl.cjs");var i,c,n,y,l,f,b,R,p,w;const d=class d extends A.SourceElement{constructor(){super();o(this,p);o(this,i);o(this,c);o(this,n,!1);o(this,y,!1);o(this,l,()=>{u(this,n,e(this,n)||this.hasAttribute("autoplay")&&!this.hasAttribute("capture-autoplay")),u(this,i,new window.YT.Player(e(this,c),{playerVars:{mute:this.hasAttribute("muted")?1:0,controls:this.hasAttribute("controls")?1:0},events:{onReady:e(this,f),onError:e(this,b),onStateChange:e(this,R)}}))});o(this,f,()=>{u(this,y,!0),I(this,p,w).call(this)});o(this,b,t=>{var a,h;console.error("YouTube: Ошибка при загрузке видео:",this.currentURL,t),(h=(a=this.consumerElement).onerror)==null||h.call(a,new Event("error"))});o(this,R,()=>{});u(this,c,"yt-"+T.generateId(10)),d.__apiReady||(window.onYouTubeIframeAPIReady=()=>{d.__apiReady=!0,L.dispatchEvent(window,"youTubeIframeAPIReady")}),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&(e(this,y)?e(this,i).playVideo():u(this,n,!0))}),this.addEventListener("sourceRelease",()=>{e(this,i)&&this.hasAttribute("capture-autoplay")&&(e(this,i).pauseVideo(),this.hasAttribute("replay")&&e(this,i).seekTo(0))})}static __onYouTubeIframeAPIReady(){this.__apiReady=!0}createConsumer(){const t=document.createElement("div");return t.id=e(this,c),t}consumeSource(t){var a;if(t){if(!document.getElementById("youtube-script")){const h=document.createElement("script");h.id,h.src="https://www.youtube.com/iframe_api";const g=document.getElementsByTagName("script")[0];(a=g.parentNode)==null||a.insertBefore(h,g)}e(this,i)?I(this,p,w).call(this):d.__apiReady?e(this,l).call(this):addEventListener("youTubeIframeAPIReady",e(this,l))}else e(this,i)&&e(this,i).stopVideo()}disconnectedCallback(){super.disconnectedCallback(),e(this,i)&&e(this,i).destroy(),removeEventListener("youTubeIframeAPIReady",e(this,l))}};i=new WeakMap,c=new WeakMap,n=new WeakMap,y=new WeakMap,l=new WeakMap,f=new WeakMap,b=new WeakMap,R=new WeakMap,p=new WeakSet,w=function(){var t,a;this.currentURL&&(this.currentURL.startsWith("http")?e(this,i).loadVideoByUrl(this.currentURL):e(this,i).loadVideoById(this.currentURL)),e(this,n)?e(this,i).playVideo():e(this,i).stopVideo(),u(this,n,!1),(a=(t=this.consumerElement).onload)==null||a.call(t,new Event("load"))},d.__apiReady=!1;let m=d;customElements.get("e-youtube")||customElements.define("e-youtube",m);exports.YouTubeElement=m;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var L = (s) => {
|
|
2
|
+
throw TypeError(s);
|
|
3
|
+
};
|
|
4
|
+
var b = (s, r, t) => r.has(s) || L("Cannot " + t);
|
|
5
|
+
var e = (s, r, t) => (b(s, r, "read from private field"), t ? t.call(s) : r.get(s)), o = (s, r, t) => r.has(s) ? L("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, t), u = (s, r, t, a) => (b(s, r, "write to private field"), a ? a.call(s, t) : r.set(s, t), t), E = (s, r, t) => (b(s, r, "access private method"), t);
|
|
6
|
+
import { SourceElement as g } from "../source/index.js";
|
|
7
|
+
import "../window-resizer/index.js";
|
|
8
|
+
import "../Store-Cm3LPXlx.js";
|
|
9
|
+
import { d as v } from "../events-CsVF98U6.js";
|
|
10
|
+
import { g as T } from "../string-f0Dnk0L1.js";
|
|
11
|
+
var i, c, n, p, l, m, f, R, y, w;
|
|
12
|
+
const d = class d extends g {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
o(this, y);
|
|
16
|
+
o(this, i);
|
|
17
|
+
o(this, c);
|
|
18
|
+
o(this, n, !1);
|
|
19
|
+
o(this, p, !1);
|
|
20
|
+
o(this, l, () => {
|
|
21
|
+
u(this, n, e(this, n) || this.hasAttribute("autoplay") && !this.hasAttribute("capture-autoplay")), u(this, i, new window.YT.Player(e(this, c), {
|
|
22
|
+
playerVars: {
|
|
23
|
+
mute: this.hasAttribute("muted") ? 1 : 0,
|
|
24
|
+
controls: this.hasAttribute("controls") ? 1 : 0
|
|
25
|
+
},
|
|
26
|
+
events: {
|
|
27
|
+
onReady: e(this, m),
|
|
28
|
+
onError: e(this, f),
|
|
29
|
+
onStateChange: e(this, R)
|
|
30
|
+
}
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
o(this, m, () => {
|
|
34
|
+
u(this, p, !0), E(this, y, w).call(this);
|
|
35
|
+
});
|
|
36
|
+
o(this, f, (t) => {
|
|
37
|
+
var a, h;
|
|
38
|
+
console.error("YouTube: Ошибка при загрузке видео:", this.currentURL, t), (h = (a = this.consumerElement).onerror) == null || h.call(a, new Event("error"));
|
|
39
|
+
});
|
|
40
|
+
o(this, R, () => {
|
|
41
|
+
});
|
|
42
|
+
u(this, c, "yt-" + T(10)), d.__apiReady || (window.onYouTubeIframeAPIReady = () => {
|
|
43
|
+
d.__apiReady = !0, v(window, "youTubeIframeAPIReady");
|
|
44
|
+
}), this.addEventListener("sourceCapture", () => {
|
|
45
|
+
this.hasAttribute("capture-autoplay") && (e(this, p) ? e(this, i).playVideo() : u(this, n, !0));
|
|
46
|
+
}), this.addEventListener("sourceRelease", () => {
|
|
47
|
+
e(this, i) && this.hasAttribute("capture-autoplay") && (e(this, i).pauseVideo(), this.hasAttribute("replay") && e(this, i).seekTo(0));
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
static __onYouTubeIframeAPIReady() {
|
|
51
|
+
this.__apiReady = !0;
|
|
52
|
+
}
|
|
53
|
+
createConsumer() {
|
|
54
|
+
const t = document.createElement("div");
|
|
55
|
+
return t.id = e(this, c), t;
|
|
56
|
+
}
|
|
57
|
+
consumeSource(t) {
|
|
58
|
+
var a;
|
|
59
|
+
if (t) {
|
|
60
|
+
if (!document.getElementById("youtube-script")) {
|
|
61
|
+
const h = document.createElement("script");
|
|
62
|
+
h.id, h.src = "https://www.youtube.com/iframe_api";
|
|
63
|
+
const A = document.getElementsByTagName("script")[0];
|
|
64
|
+
(a = A.parentNode) == null || a.insertBefore(h, A);
|
|
65
|
+
}
|
|
66
|
+
e(this, i) ? E(this, y, w).call(this) : d.__apiReady ? e(this, l).call(this) : addEventListener("youTubeIframeAPIReady", e(this, l));
|
|
67
|
+
} else e(this, i) && e(this, i).stopVideo();
|
|
68
|
+
}
|
|
69
|
+
disconnectedCallback() {
|
|
70
|
+
super.disconnectedCallback(), e(this, i) && e(this, i).destroy(), removeEventListener("youTubeIframeAPIReady", e(this, l));
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
i = new WeakMap(), c = new WeakMap(), n = new WeakMap(), p = new WeakMap(), l = new WeakMap(), m = new WeakMap(), f = new WeakMap(), R = new WeakMap(), y = new WeakSet(), w = function() {
|
|
74
|
+
var t, a;
|
|
75
|
+
this.currentURL && (this.currentURL.startsWith("http") ? e(this, i).loadVideoByUrl(this.currentURL) : e(this, i).loadVideoById(this.currentURL)), e(this, n) ? e(this, i).playVideo() : e(this, i).stopVideo(), u(this, n, !1), (a = (t = this.consumerElement).onload) == null || a.call(t, new Event("load"));
|
|
76
|
+
}, d.__apiReady = !1;
|
|
77
|
+
let I = d;
|
|
78
|
+
customElements.get("e-youtube") || customElements.define("e-youtube", I);
|
|
79
|
+
export {
|
|
80
|
+
I as YouTubeElement
|
|
81
|
+
};
|