aptechka 0.83.1 → 0.84.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-BAiM6_n1.js +111 -0
- package/lib/Animation-DMWabSR0.cjs +1 -0
- package/lib/Composed-B0fvCtZz.cjs +1 -0
- package/lib/Composed-CgA9lLWA.js +75 -0
- package/lib/Damped-BLo-OAVb.cjs +1 -0
- package/lib/Damped-Dcz5UdMH.js +57 -0
- package/lib/DerivedArray-DFhxap_z.js +63 -0
- package/lib/DerivedArray-DYtWMW0n.cjs +1 -0
- package/lib/DragControls-BPHsDeH6.cjs +1 -0
- package/lib/DragControls-D2a1Cifp.js +234 -0
- package/lib/LocalLinks-BWFJYhGX.cjs +1 -0
- package/lib/LocalLinks-Dwgf3No6.js +65 -0
- package/lib/PageAnnouncerElement-DPMlVJZG.cjs +1 -0
- package/lib/PageAnnouncerElement-DV9pm_od.js +28 -0
- package/lib/PageScroll-BAatKJx6.cjs +1 -0
- package/lib/PageScroll-m3TsHnzR.js +65 -0
- package/lib/SourceElement-941MrYpq.js +265 -0
- package/lib/SourceElement-DBLZ7b5k.cjs +5 -0
- package/lib/Store-BCW70G3Z.cjs +1 -0
- package/lib/Store-uLDYY9ed.js +158 -0
- package/lib/Tweened-BvtjLCa3.js +48 -0
- package/lib/Tweened-DdXm1dbF.cjs +1 -0
- package/lib/Viewport-BiDoiU8M.js +113 -0
- package/lib/Viewport-CXGKUyDy.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +97 -93
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +6 -6
- package/lib/api-fetcher/index.cjs +1 -1
- package/lib/api-fetcher/index.js +67 -66
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +37 -34
- package/lib/attributes-BADnRZpK.cjs +1 -0
- package/lib/attributes-FObgMNCf.js +36 -0
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +240 -232
- package/lib/cache/index.cjs +1 -1
- package/lib/cache/index.js +26 -23
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +62 -59
- package/lib/canvas-BP1ceie3.cjs +1 -0
- package/lib/canvas-DsglKco1.js +40 -0
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.js +44 -41
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +6 -6
- package/lib/coordinates--JG1U6kQ.js +29 -0
- package/lib/coordinates-DQ9XV9M1.cjs +1 -0
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +1 -1
- package/lib/css-property/index.js +40 -37
- package/lib/css-unit-parser/index.cjs +2 -2
- package/lib/css-unit-parser/index.js +22 -19
- package/lib/css-value-parser/index.cjs +1 -1
- package/lib/css-value-parser/index.js +13 -11
- package/lib/custom-elements-BfZCJde6.cjs +1 -0
- package/lib/custom-elements-HEMuF7yH.js +27 -0
- package/lib/dev/index.cjs +2 -1
- package/lib/dev/index.d.ts +1 -0
- package/lib/dev/index.js +25 -10
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -5
- package/lib/dom-B40i6NXw.cjs +1 -0
- package/lib/dom-D8D-_9ty.js +108 -0
- package/lib/easings-BSGJFMAo.js +40 -0
- package/lib/easings-BWq0pPLq.cjs +1 -0
- package/lib/element-CqD0jqBJ.cjs +1 -0
- package/lib/element-DKw5H-Tu.js +10 -0
- package/lib/element-linked-store/index.cjs +1 -1
- package/lib/element-linked-store/index.js +53 -52
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +47 -44
- package/lib/en3/index.cjs +4 -4
- package/lib/en3/index.js +192 -185
- package/lib/events-Ds-TuvYW.js +9 -0
- package/lib/events-UlGk63iC.cjs +1 -0
- package/lib/file-DwQs6bB6.js +28 -0
- package/lib/file-RHfA3OS-.cjs +1 -0
- package/lib/function-H4b_gTg6.cjs +1 -0
- package/lib/function-UmbPrOHm.js +19 -0
- package/lib/gestures-DmKKNnh4.js +14 -0
- package/lib/gestures-DtYbQr49.cjs +1 -0
- package/lib/history/index.cjs +1 -1
- package/lib/history/index.js +24 -21
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +27 -24
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +17 -13
- package/lib/index-BpO2RJ__.cjs +1 -0
- package/lib/index-DpKsHe97.js +68 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +3 -3
- package/lib/jsx/ComponentElement.d.ts +4 -0
- package/lib/jsx/h.d.ts +7 -16
- package/lib/jsx/hooks/component/useStylesheet.d.ts +1 -1
- package/lib/jsx/hooks/cssProperty.d.ts +6 -0
- package/lib/jsx/hooks/resize.d.ts +4 -0
- package/lib/jsx/hooks/store.d.ts +1 -2
- package/lib/jsx/hooks/ticker.d.ts +5 -0
- package/lib/jsx/index.cjs +1 -1
- package/lib/jsx/index.d.ts +4 -4
- package/lib/jsx/index.js +171 -349
- package/lib/jsx/plugins/vite/index.cjs +49 -0
- package/lib/jsx/plugins/vite/index.d.ts +38 -0
- package/lib/jsx/plugins/vite/index.js +104 -0
- package/lib/jsx/render.d.ts +2 -0
- package/lib/jsx/type.d.ts +228 -190
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +86 -84
- package/lib/layout-C26zkY7D.js +35 -0
- package/lib/layout-CnGLl7oe.cjs +1 -0
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +221 -217
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +48 -45
- package/lib/local-links/index.cjs +1 -1
- package/lib/local-links/index.js +2 -2
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +48 -45
- package/lib/math-C-knY2TL.cjs +1 -0
- package/lib/math-r8V23YFe.js +57 -0
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +28 -25
- package/lib/metadata-BNdkmeeD.js +15 -0
- package/lib/metadata-BrHUfpV9.cjs +1 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +561 -556
- package/lib/morph-BtgB1YQP.js +256 -0
- package/lib/morph-Buhxq-X0.cjs +1 -0
- package/lib/need_redo_tweaker/index.cjs +4 -4
- package/lib/need_redo_tweaker/index.js +862 -834
- package/lib/notifier/index.cjs +1 -1
- package/lib/notifier/index.js +29 -26
- package/lib/number-Bu4sGvW7.cjs +1 -0
- package/lib/number-DiVt2xnh.js +47 -0
- package/lib/object-CiIdEmJx.js +98 -0
- package/lib/object-DTY_W6xG.cjs +1 -0
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.js +3 -3
- package/lib/page-announcer/index.cjs +1 -1
- package/lib/page-announcer/index.js +2 -2
- package/lib/page-scroll/index.cjs +1 -1
- package/lib/page-scroll/index.js +2 -2
- package/lib/pixel-perfect/index.cjs +4 -4
- package/lib/pixel-perfect/index.js +43 -40
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +125 -122
- package/lib/polyfills-CG1XJNia.js +28 -0
- package/lib/polyfills-DZCuDBkA.cjs +1 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +249 -245
- package/lib/radio/index.cjs +1 -1
- package/lib/radio/index.js +58 -55
- package/lib/render-DLcWVnuH.js +355 -0
- package/lib/render-DdomypCo.cjs +1 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +196 -194
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +890 -877
- package/lib/scroll-BvIWh1xB.js +41 -0
- package/lib/scroll-CT0lpyRZ.cjs +1 -0
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.js +37 -34
- package/lib/scroll-kit/index.cjs +1 -1
- package/lib/scroll-kit/index.js +214 -209
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +102 -98
- package/lib/size-element/index.cjs +1 -1
- package/lib/size-element/index.js +29 -26
- package/lib/slicer/index.cjs +1 -1
- package/lib/slicer/index.js +118 -113
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +5 -5
- package/lib/spa/index.cjs +1 -1
- package/lib/spa/index.js +94 -94
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -2
- package/lib/store/index.js +10 -8
- package/lib/string-B3lm2b7v.js +84 -0
- package/lib/string-CbRNzmd9.cjs +1 -0
- package/lib/style-DBoQWK0d.js +14 -0
- package/lib/style-IDJ6db6n.cjs +1 -0
- package/lib/stylesheet-CHvuef16.js +28 -0
- package/lib/stylesheet-CQdBaIAA.cjs +1 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +96 -92
- package/lib/url-CPCO10Sy.cjs +1 -0
- package/lib/url-CWCY_qe_.js +124 -0
- package/lib/utils/attributes.d.ts +2 -0
- package/lib/utils/dom.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +245 -226
- package/lib/utils/polyfills.d.ts +1 -1
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +36 -33
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +27 -24
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +56 -54
- package/package.json +11 -24
- package/lib/Animation-BzTjZIE-.js +0 -108
- package/lib/Animation-C39Ah-LM.cjs +0 -1
- package/lib/Composed-C-TV9te3.cjs +0 -1
- package/lib/Composed-DyAWjEXE.js +0 -121
- package/lib/Damped-CRusiRIV.js +0 -56
- package/lib/Damped-Prr0iKu1.cjs +0 -1
- package/lib/DragControls-8rNZwQrs.cjs +0 -1
- package/lib/DragControls-DBNdMBA4.js +0 -228
- package/lib/LocalLinks-BxhSFv_Q.cjs +0 -1
- package/lib/LocalLinks-DFZFpbjs.js +0 -62
- package/lib/PageAnnouncerElement-0LxZjtVH.js +0 -24
- package/lib/PageAnnouncerElement-AQ0Ja6HM.cjs +0 -1
- package/lib/PageScroll-0LxFblry.js +0 -62
- package/lib/PageScroll-BXJUQwG7.cjs +0 -1
- package/lib/SourceElement-BHqPFbna.cjs +0 -5
- package/lib/SourceElement-DjbHjynf.js +0 -260
- package/lib/Store-Blf4msDz.cjs +0 -1
- package/lib/Store-ZThXYBQd.js +0 -152
- package/lib/Tweened-Bw1Cn1PJ.js +0 -47
- package/lib/Tweened-DWtk9E-O.cjs +0 -1
- package/lib/Viewport-BxCr0GlB.cjs +0 -1
- package/lib/Viewport-Dt-d9DPi.js +0 -109
- package/lib/attributes-69we3byR.js +0 -10
- package/lib/attributes-Bf2svn4j.cjs +0 -1
- package/lib/canvas-CU5Xjahf.cjs +0 -1
- package/lib/canvas-DeZ0SLUJ.js +0 -34
- package/lib/coordinates-CgdGoSYs.js +0 -24
- package/lib/coordinates-D8Np3cPD.cjs +0 -1
- package/lib/custom-elements-DBnCK7Zx.js +0 -24
- package/lib/custom-elements-Dh4TWRDJ.cjs +0 -1
- package/lib/dom-BETkVSSZ.js +0 -82
- package/lib/dom-CBLlqORw.cjs +0 -1
- package/lib/easings-BEmRlrDd.js +0 -38
- package/lib/easings-GegIwET5.cjs +0 -1
- package/lib/element-CGVl1jA-.js +0 -7
- package/lib/element-yhcBhsho.cjs +0 -1
- package/lib/events-CsVF98U6.js +0 -6
- package/lib/events-KVanG9sR.cjs +0 -1
- package/lib/file-DSpfWdd9.cjs +0 -1
- package/lib/file-GHShUlue.js +0 -24
- package/lib/function-C10DGppn.js +0 -17
- package/lib/function-MthRj-GJ.cjs +0 -1
- package/lib/gestures-C7gbKx11.cjs +0 -1
- package/lib/gestures-CcXV6fCp.js +0 -11
- package/lib/index-OE2INULi.cjs +0 -1
- package/lib/index-e9eDuagL.js +0 -65
- package/lib/jsx/hydrate.d.ts +0 -1
- package/lib/jsx/integrations/astro/client.cjs +0 -1
- package/lib/jsx/integrations/astro/client.d.ts +0 -2
- package/lib/jsx/integrations/astro/client.js +0 -50
- package/lib/jsx/integrations/astro/index.cjs +0 -1
- package/lib/jsx/integrations/astro/index.d.ts +0 -2
- package/lib/jsx/integrations/astro/index.js +0 -54
- package/lib/jsx/integrations/astro/server.cjs +0 -1
- package/lib/jsx/integrations/astro/server.d.ts +0 -3
- package/lib/jsx/integrations/astro/server.js +0 -35
- package/lib/jsx/plugins/vite.d.ts +0 -21
- package/lib/layout-BSMtwCga.js +0 -29
- package/lib/layout-Ctc2p3uz.cjs +0 -1
- package/lib/math-BOBiC4TN.js +0 -45
- package/lib/math-GDWEqu7y.cjs +0 -1
- package/lib/metadata-BcYZ5w3T.cjs +0 -1
- package/lib/metadata-jfowcCyz.js +0 -12
- package/lib/morph-B6sGhLCi.cjs +0 -1
- package/lib/morph-BQErz7qP.js +0 -242
- package/lib/number-ChAm68cm.cjs +0 -1
- package/lib/number-CumqY64S.js +0 -40
- package/lib/object-CcMK4y_r.js +0 -87
- package/lib/object-baN9pgbU.cjs +0 -1
- package/lib/polyfills-DJrTJQky.js +0 -24
- package/lib/polyfills-Df4r-ETT.cjs +0 -1
- package/lib/render-DQs7rIoN.cjs +0 -1
- package/lib/render-D_0FCWEu.js +0 -18
- package/lib/scroll-BA2WnUrb.cjs +0 -1
- package/lib/scroll-DY5senkF.js +0 -37
- package/lib/string-BlMQbe8b.js +0 -70
- package/lib/string-DUXXtU8v.cjs +0 -1
- package/lib/style-At6aDoqG.cjs +0 -1
- package/lib/style-j2TwriJ_.js +0 -10
- package/lib/stylesheet-5_o7PFzM.cjs +0 -1
- package/lib/stylesheet-DdBzowZY.js +0 -24
- package/lib/url-CHgcNwJ1.cjs +0 -1
- package/lib/url-CYgo5vrG.js +0 -113
- package/lib/vite-C-i3hVDL.js +0 -75
- package/lib/vite-DzanPumM.cjs +0 -44
package/lib/url-CYgo5vrG.js
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
var R = Object.defineProperty, U = Object.defineProperties;
|
|
2
|
-
var $ = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var p = Object.getOwnPropertySymbols;
|
|
4
|
-
var P = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var S = (t, e, n) => e in t ? R(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, g = (t, e) => {
|
|
6
|
-
for (var n in e || (e = {}))
|
|
7
|
-
P.call(e, n) && S(t, n, e[n]);
|
|
8
|
-
if (p)
|
|
9
|
-
for (var n of p(e))
|
|
10
|
-
W.call(e, n) && S(t, n, e[n]);
|
|
11
|
-
return t;
|
|
12
|
-
}, d = (t, e) => U(t, $(e));
|
|
13
|
-
function k(t, {
|
|
14
|
-
base: e = "",
|
|
15
|
-
trailingSlash: n = !1,
|
|
16
|
-
mergeParams: s,
|
|
17
|
-
removeParams: r
|
|
18
|
-
} = {}) {
|
|
19
|
-
e = e.endsWith("/") ? e.slice(0, -1) : e, t = t.replace(e, ""), t.startsWith("/") && (t = t.slice(1));
|
|
20
|
-
const i = t.split("#"), f = i[0].split("?");
|
|
21
|
-
let a = f[0].startsWith("/") ? f[0] : "/" + f[0];
|
|
22
|
-
n ? a = !a.endsWith("/") && a !== "/" ? a + "/" : a : a = a.endsWith("/") && a !== "/" ? a.slice(0, -1) : a;
|
|
23
|
-
let o = f[1] || "";
|
|
24
|
-
if (s) {
|
|
25
|
-
const c = new URLSearchParams(o), w = new URLSearchParams(s);
|
|
26
|
-
for (const [h, L] of w)
|
|
27
|
-
c.has(h) || c.set(h, L);
|
|
28
|
-
r == null || r.split(",").forEach((h) => {
|
|
29
|
-
c.has(h) && c.delete(h);
|
|
30
|
-
}), o = c.toString();
|
|
31
|
-
}
|
|
32
|
-
const u = e + a, l = i[1], y = `${u}${o ? "?" + o : ""}${l ? "#" + l : ""}`;
|
|
33
|
-
return {
|
|
34
|
-
leaf: a,
|
|
35
|
-
pathname: u,
|
|
36
|
-
parameters: o,
|
|
37
|
-
hash: l,
|
|
38
|
-
path: y
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function O(t = "/") {
|
|
42
|
-
return t.endsWith("/") || (t += "/"), t.startsWith("/") || (t += "/"), t;
|
|
43
|
-
}
|
|
44
|
-
function z(t) {
|
|
45
|
-
if (t.action === "none")
|
|
46
|
-
return;
|
|
47
|
-
const e = t == null ? void 0 : t.searchParameters, n = t.hash ? t.hash.startsWith("#") ? t.hash : "#" + t.hash : "", s = e ? e.startsWith("?") ? e : "?" + e : "", r = `${t.pathname}${s}${n}`, i = d(g({}, t.state), { path: r });
|
|
48
|
-
t.action === "push" ? history.pushState(i, "", r) : t.action === "replace" && history.replaceState(i, "", r);
|
|
49
|
-
}
|
|
50
|
-
function E(t) {
|
|
51
|
-
const e = new URLSearchParams(t), n = {};
|
|
52
|
-
for (const [s, r] of e)
|
|
53
|
-
n[s] = r;
|
|
54
|
-
return n;
|
|
55
|
-
}
|
|
56
|
-
function q(t, e) {
|
|
57
|
-
const n = new URL(location.href), s = (e == null ? void 0 : e.toString()) || "";
|
|
58
|
-
n.searchParams.set(t, s), history.replaceState(history.state, "", n.href);
|
|
59
|
-
}
|
|
60
|
-
function m(t, e, n) {
|
|
61
|
-
t.setAttribute(e, new URL(t.getAttribute(e), n).pathname);
|
|
62
|
-
}
|
|
63
|
-
function x(t, e) {
|
|
64
|
-
t.querySelectorAll('[href^="./"], [href^="../"]').forEach(
|
|
65
|
-
(n) => m(n, "href", e)
|
|
66
|
-
), t.querySelectorAll('[src^="./"], [src^="../"]').forEach(
|
|
67
|
-
(n) => m(n, "src", e)
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
function T(t, {
|
|
71
|
-
base: e = "",
|
|
72
|
-
trailingSlash: n = !1
|
|
73
|
-
} = {}) {
|
|
74
|
-
e = e.replace(/^\/|\/$/g, "");
|
|
75
|
-
const s = typeof t == "string" ? t.replace(/^\/|\/$/g, "") : t.pathname.replace(/^\/|\/$/g, "");
|
|
76
|
-
let r = "";
|
|
77
|
-
return s.includes(e) ? r = `/${s}` : r = `${e}/${s}`, n && !r.endsWith("/") && (r += "/"), new URL(r, location.origin);
|
|
78
|
-
}
|
|
79
|
-
function B(t) {
|
|
80
|
-
try {
|
|
81
|
-
const e = new URL(t);
|
|
82
|
-
if (window.location.origin === e.origin)
|
|
83
|
-
return e.pathname === window.location.pathname ? !e.hash : !0;
|
|
84
|
-
} catch (e) {
|
|
85
|
-
}
|
|
86
|
-
return !1;
|
|
87
|
-
}
|
|
88
|
-
function H(t) {
|
|
89
|
-
if (!t)
|
|
90
|
-
return "";
|
|
91
|
-
const e = new URLSearchParams();
|
|
92
|
-
for (const [n, s] of Object.entries(t))
|
|
93
|
-
s != null && s !== !1 && s !== "" && e.append(n, String(s));
|
|
94
|
-
return e.toString();
|
|
95
|
-
}
|
|
96
|
-
function C(t) {
|
|
97
|
-
const e = {};
|
|
98
|
-
for (const [n, s] of t.entries())
|
|
99
|
-
s != null && (e[n] = s);
|
|
100
|
-
return e;
|
|
101
|
-
}
|
|
102
|
-
export {
|
|
103
|
-
O as a,
|
|
104
|
-
x as b,
|
|
105
|
-
z as c,
|
|
106
|
-
k as d,
|
|
107
|
-
C as e,
|
|
108
|
-
B as i,
|
|
109
|
-
T as n,
|
|
110
|
-
E as p,
|
|
111
|
-
H as s,
|
|
112
|
-
q as u
|
|
113
|
-
};
|
package/lib/vite-C-i3hVDL.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
function r(t) {
|
|
2
|
-
const n = t != null && t.__dev ? "@packages" : "aptechka";
|
|
3
|
-
return {
|
|
4
|
-
name: "jsx-hmr-plugin",
|
|
5
|
-
apply: "serve",
|
|
6
|
-
transform(o, e) {
|
|
7
|
-
if ((e.endsWith(".jsx") || e.endsWith(".tsx")) && !e.endsWith("render.tsx")) {
|
|
8
|
-
let l = o;
|
|
9
|
-
return l += `
|
|
10
|
-
|
|
11
|
-
if (import.meta.hot) {
|
|
12
|
-
import.meta.hot.accept(async (Module) => {
|
|
13
|
-
const { render } = await import('${n}/jsx')
|
|
14
|
-
const { camelToKebab } = await import('${n}/utils')
|
|
15
|
-
for (const key in Module) {
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(Module, key)) {
|
|
17
|
-
if (typeof Module[key] === 'function') {
|
|
18
|
-
const tag = \`e-\${camelToKebab(Module[key].name)}\`
|
|
19
|
-
const foundedElements = [...document.querySelectorAll(tag)]
|
|
20
|
-
|
|
21
|
-
foundedElements.forEach((el) => {
|
|
22
|
-
const nestElements = el.querySelectorAll('[data-nest]')
|
|
23
|
-
|
|
24
|
-
const container = document.createElement('div')
|
|
25
|
-
|
|
26
|
-
render(container, Module[key], el.__props__)
|
|
27
|
-
const componentElement = container.firstElementChild
|
|
28
|
-
|
|
29
|
-
if (componentElement) {
|
|
30
|
-
el.dispatchEvent(new CustomEvent('__hmrInstanceReplace', {
|
|
31
|
-
'detail': {
|
|
32
|
-
element: componentElement
|
|
33
|
-
}
|
|
34
|
-
}))
|
|
35
|
-
|
|
36
|
-
el.replaceWith(componentElement)
|
|
37
|
-
|
|
38
|
-
componentElement
|
|
39
|
-
.querySelectorAll('[data-nest]')
|
|
40
|
-
.forEach((el, i) => {
|
|
41
|
-
if (nestElements[i]) {
|
|
42
|
-
el.replaceWith(nestElements[i])
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
})
|
|
51
|
-
}
|
|
52
|
-
`, {
|
|
53
|
-
code: l,
|
|
54
|
-
map: null
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
return null;
|
|
58
|
-
},
|
|
59
|
-
config(o, e) {
|
|
60
|
-
return {
|
|
61
|
-
esbuild: {
|
|
62
|
-
jsxFactory: "h",
|
|
63
|
-
jsxFragment: "Fragment",
|
|
64
|
-
jsxInject: `import { h, Fragment } from '${n}/jsx'`
|
|
65
|
-
},
|
|
66
|
-
define: {
|
|
67
|
-
__JSX_HMR_DEV__: e.command === "serve"
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
export {
|
|
74
|
-
r as a
|
|
75
|
-
};
|
package/lib/vite-DzanPumM.cjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";function r(t){const n=t!=null&&t.__dev?"@packages":"aptechka";return{name:"jsx-hmr-plugin",apply:"serve",transform(o,e){if((e.endsWith(".jsx")||e.endsWith(".tsx"))&&!e.endsWith("render.tsx")){let l=o;return l+=`
|
|
2
|
-
|
|
3
|
-
if (import.meta.hot) {
|
|
4
|
-
import.meta.hot.accept(async (Module) => {
|
|
5
|
-
const { render } = await import('${n}/jsx')
|
|
6
|
-
const { camelToKebab } = await import('${n}/utils')
|
|
7
|
-
for (const key in Module) {
|
|
8
|
-
if (Object.prototype.hasOwnProperty.call(Module, key)) {
|
|
9
|
-
if (typeof Module[key] === 'function') {
|
|
10
|
-
const tag = \`e-\${camelToKebab(Module[key].name)}\`
|
|
11
|
-
const foundedElements = [...document.querySelectorAll(tag)]
|
|
12
|
-
|
|
13
|
-
foundedElements.forEach((el) => {
|
|
14
|
-
const nestElements = el.querySelectorAll('[data-nest]')
|
|
15
|
-
|
|
16
|
-
const container = document.createElement('div')
|
|
17
|
-
|
|
18
|
-
render(container, Module[key], el.__props__)
|
|
19
|
-
const componentElement = container.firstElementChild
|
|
20
|
-
|
|
21
|
-
if (componentElement) {
|
|
22
|
-
el.dispatchEvent(new CustomEvent('__hmrInstanceReplace', {
|
|
23
|
-
'detail': {
|
|
24
|
-
element: componentElement
|
|
25
|
-
}
|
|
26
|
-
}))
|
|
27
|
-
|
|
28
|
-
el.replaceWith(componentElement)
|
|
29
|
-
|
|
30
|
-
componentElement
|
|
31
|
-
.querySelectorAll('[data-nest]')
|
|
32
|
-
.forEach((el, i) => {
|
|
33
|
-
if (nestElements[i]) {
|
|
34
|
-
el.replaceWith(nestElements[i])
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
}
|
|
44
|
-
`,{code:l,map:null}}return null},config(o,e){return{esbuild:{jsxFactory:"h",jsxFragment:"Fragment",jsxInject:`import { h, Fragment } from '${n}/jsx'`},define:{__JSX_HMR_DEV__:e.command==="serve"}}}}}exports.aptechkaVite=r;
|