@tempots/beatui 1.7.4 → 1.9.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/dist/{ar-Wr6gMs-M.cjs → ar-CEzAem0F.cjs} +1 -1
- package/dist/{ar-fdUqbCvM.js → ar-CQieaqsq.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/auth-divider-B8yr-E_b.cjs +1 -0
- package/dist/{auth-divider-D9KnNeyF.js → auth-divider-Byh5BWLc.js} +91 -88
- package/dist/beatui.css +1 -0
- package/dist/beatui.tailwind.css +1 -0
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +27 -26
- package/dist/card-BkA7Wvbh.cjs +1 -0
- package/dist/card-DX1DwGbL.js +62 -0
- package/dist/{colors-C2sgnzFH.js → colors-CyMhfbJi.js} +64 -58
- package/dist/{colors-DPCHjRMj.cjs → colors-IXZF9U-s.cjs} +1 -1
- package/dist/control-hqEuMzyI.js +343 -0
- package/dist/control-muup9GF1.cjs +1 -0
- package/dist/custom-validation-BA9iJWl_.cjs +1 -0
- package/dist/custom-validation-BOBoUwHY.js +181 -0
- package/dist/{de-C5-k5Eov.js → de-CBIwvkAH.js} +1 -1
- package/dist/{de-DZqdSEta.cjs → de-DdfxrlT3.cjs} +1 -1
- package/dist/deep-merge-8fwp1z4X.js +1346 -0
- package/dist/deep-merge-VDGE_HQD.cjs +1 -0
- package/dist/duration-input-DmsljXl3.cjs +1 -0
- package/dist/{duration-input-D4V_PHIg.js → duration-input-ZQlcqdXU.js} +32 -31
- package/dist/{editor-toolbar-group-FpOHrmtx.js → editor-toolbar-group-BNTBMJCe.js} +2 -2
- package/dist/{editor-toolbar-group-C_ft_T8D.cjs → editor-toolbar-group-DiMzqYgz.cjs} +1 -1
- package/dist/{es-h6jmoF4X.js → es--9HaEj2D.js} +1 -1
- package/dist/{es-CJgYfRap.cjs → es-DSdljxFJ.cjs} +1 -1
- package/dist/{fa-BuxK837l.js → fa-1Z-akcW7.js} +1 -1
- package/dist/{fa-BQ5PzwNY.cjs → fa-BolmeWRT.cjs} +1 -1
- package/dist/flyout-CuKFh_T7.js +151 -0
- package/dist/flyout-DC_tKaTG.cjs +1 -0
- package/dist/{fr-Bv3TG44U.cjs → fr-CODgUuoZ.cjs} +1 -1
- package/dist/{fr-BwILQ9G2.js → fr-DhHM9rou.js} +1 -1
- package/dist/{he-yC9Sc7JD.js → he-CBamXbGJ.js} +1 -1
- package/dist/{he-5LbvgMCC.cjs → he-Juw-dr28.cjs} +1 -1
- package/dist/{hi-Da7rcCpP.js → hi-DvvcX-Ra.js} +1 -1
- package/dist/{hi-YWhWcG_L.cjs → hi-R749jeg-.cjs} +1 -1
- package/dist/{index-CvU9E9wd.js → index-BfQaT5Jy.js} +104 -104
- package/dist/{index-XogEKwdt.cjs → index-Dv7nPuwA.cjs} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +6713 -9831
- package/dist/{input-container-CyOgiiQD.cjs → input-container-BaWQLWB6.cjs} +1 -1
- package/dist/{input-container-8JFB11xN.js → input-container-DCS5oJ4S.js} +4 -4
- package/dist/{it-BxOIJE45.cjs → it-DT5oRZDH.cjs} +1 -1
- package/dist/{it-Yeklau78.js → it-aV6i8Qxz.js} +1 -1
- package/dist/{ja-Dxj9Q5Yd.js → ja-CuLhGnJX.js} +1 -1
- package/dist/{ja-CNhjK06P.cjs → ja-CwKaCYLB.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +83 -79
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +2 -2
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +74 -72
- package/dist/{ko-DgkqcXTs.cjs → ko-Bucro9ID.cjs} +1 -1
- package/dist/{ko-gn_MsegK.js → ko-D-66BsEX.js} +1 -1
- package/dist/lexical/index.cjs.js +1 -1
- package/dist/lexical/index.es.js +5 -5
- package/dist/menu-BFLFKceF.cjs +1 -0
- package/dist/menu-BO6zqyfq.js +220 -0
- package/dist/modal-6Mq3vS5r.js +309 -0
- package/dist/modal-d77-TMc4.cjs +1 -0
- package/dist/{nl-vHNFtXXb.js → nl-CAny6wvm.js} +1 -1
- package/dist/{nl-Dy9lmbBO.cjs → nl-D7vHpehb.cjs} +1 -1
- package/dist/notice-BNGx86Yg.js +110 -0
- package/dist/notice-iF6zBMq9.cjs +1 -0
- package/dist/{oneof-branch-detection-Q_jxvJIA.js → oneof-branch-detection-Bm17RhC2.js} +27 -26
- package/dist/oneof-branch-detection-DZ4MrfBp.cjs +1 -0
- package/dist/openui/index.cjs.js +9 -0
- package/dist/openui/index.es.js +2174 -0
- package/dist/password-input-Bipt7Wsu.cjs +1 -0
- package/dist/password-input-mkRmrEPq.js +105 -0
- package/dist/{pl-BtYbtsmG.cjs → pl-CSiXoOKT.cjs} +1 -1
- package/dist/{pl-C0UdHla0.js → pl-rmZLgQ_V.js} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +4 -4
- package/dist/{pt-CtNmqQ1X.cjs → pt-CJT-iq4y.cjs} +1 -1
- package/dist/{pt-DGKtfN0d.js → pt-DHnajqAi.js} +1 -1
- package/dist/{ru-CpXYLt-v.js → ru-C_E8OZNE.js} +1 -1
- package/dist/{ru-BaL_NPRU.cjs → ru-G3sr_ctV.cjs} +1 -1
- package/dist/slider-input-SLguFA0d.cjs +1 -0
- package/dist/slider-input-VYAMm7pE.js +285 -0
- package/dist/stepper-24p16Zsv.cjs +1 -0
- package/dist/stepper-TlzbfYWa.js +3222 -0
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +38 -40
- package/dist/tailwind/vite-plugin.cjs.js +14 -12
- package/dist/tailwind/vite-plugin.es.js +317 -246
- package/dist/text-area-BdemKQ_w.cjs +1 -0
- package/dist/text-area-Br83-_PQ.js +431 -0
- package/dist/{text-input-NJypZSnE.js → text-input-ByuxdX8w.js} +5 -5
- package/dist/{text-input-DS5zlXb2.cjs → text-input-MjlUC_9u.cjs} +1 -1
- package/dist/{toolbar-BF2L6WKC.js → toolbar-CEBTTjHh.js} +1 -1
- package/dist/{toolbar-BBwfe8U9.cjs → toolbar-DWawYFFX.cjs} +1 -1
- package/dist/{tr-DwOd87oB.cjs → tr-DcxLHHTC.cjs} +1 -1
- package/dist/{tr-DIFZDFW_.js → tr-bVXwloKC.js} +1 -1
- package/dist/{translations-EwEmHe3v.cjs → translations-D3xqZUTA.cjs} +1 -1
- package/dist/{translations-BCMP-h52.js → translations-DU9wTV1y.js} +20 -19
- package/dist/{translations-5cXBrENb.js → translations-RT_UN8ny.js} +1 -1
- package/dist/{translations-BqWc0ZHz.cjs → translations-qljG2Chq.cjs} +1 -1
- package/dist/types/components/navigation/stepper.d.ts +4 -4
- package/dist/types/openui/index.d.ts +28 -0
- package/dist/types/openui/library/define-component.d.ts +15 -0
- package/dist/types/openui/library/library.d.ts +7 -0
- package/dist/types/openui/library/prompt-generator.d.ts +5 -0
- package/dist/types/openui/library/types.d.ts +33 -0
- package/dist/types/openui/parser/parser.d.ts +8 -0
- package/dist/types/openui/parser/streaming-parser.d.ts +14 -0
- package/dist/types/openui/parser/tokenizer.d.ts +9 -0
- package/dist/types/openui/parser/types.d.ts +46 -0
- package/dist/types/openui/registry/button.d.ts +148 -0
- package/dist/types/openui/registry/data.d.ts +177 -0
- package/dist/types/openui/registry/form.d.ts +65 -0
- package/dist/types/openui/registry/format.d.ts +67 -0
- package/dist/types/openui/registry/index.d.ts +9 -0
- package/dist/types/openui/registry/layout.d.ts +45 -0
- package/dist/types/openui/registry/navigation.d.ts +149 -0
- package/dist/types/openui/registry/overlay.d.ts +56 -0
- package/dist/types/openui/registry/typography.d.ts +17 -0
- package/dist/types/openui/renderer/action-context.d.ts +24 -0
- package/dist/types/openui/renderer/node-resolver.d.ts +9 -0
- package/dist/types/openui/renderer/openui-renderer.d.ts +32 -0
- package/dist/types/openui/renderer/skeleton.d.ts +2 -0
- package/dist/types/openui/streaming/from-fetch.d.ts +7 -0
- package/dist/types/openui/streaming/from-sse.d.ts +7 -0
- package/dist/types/openui/streaming/from-websocket.d.ts +10 -0
- package/dist/types/openui/streaming/types.d.ts +5 -0
- package/dist/types/tailwind/preset.d.ts +25 -4
- package/dist/types/tailwind/vite-plugin.d.ts +17 -5
- package/dist/types/tokens/colors.d.ts +87 -9
- package/dist/types/tokens/index.d.ts +7 -6
- package/dist/{ur-DBst-TXc.js → ur-Dls2qb4V.js} +1 -1
- package/dist/{ur-D9nLchps.cjs → ur-IRQoHh1E.cjs} +1 -1
- package/dist/use-form-BZ8vDYOv.cjs +2 -0
- package/dist/use-form-DsCzINfm.js +750 -0
- package/dist/utils-D3-NApSw.cjs +1 -0
- package/dist/utils-Nbh7yQ73.js +105 -0
- package/dist/{vi-Dg1aiMr5.cjs → vi-Bi9SvVCP.cjs} +1 -1
- package/dist/{vi-DQOJp32U.js → vi-C3mTzj50.js} +1 -1
- package/dist/widget-customization-BV6XB2v_.cjs +1 -0
- package/dist/widget-customization-Bso45ONQ.js +1198 -0
- package/dist/{zh-DPK4HXl2.js → zh-B4JRJBt2.js} +1 -1
- package/dist/{zh-tbwSTbmn.cjs → zh-BMU5rYu1.cjs} +1 -1
- package/package.json +31 -20
- package/dist/auth-divider-CjcrgXmq.cjs +0 -1
- package/dist/custom-validation-7por5nJN.js +0 -488
- package/dist/custom-validation-CLscGHY4.cjs +0 -1
- package/dist/deep-merge-D90SW1Ci.cjs +0 -1
- package/dist/deep-merge-DT2H9AGq.js +0 -1765
- package/dist/duration-input-4AQnQpyo.cjs +0 -1
- package/dist/menu-B60Q9j3-.cjs +0 -1
- package/dist/menu-BkqFGcXg.js +0 -366
- package/dist/notice-CQGJyZ8o.js +0 -211
- package/dist/notice-p2IqXS5-.cjs +0 -1
- package/dist/oneof-branch-detection-xDDDdYRk.cjs +0 -1
- package/dist/use-form-8NnZ-KHk.js +0 -1090
- package/dist/use-form-Dcra7GeE.cjs +0 -2
- package/dist/utils-DmEuG3Np.cjs +0 -1
- package/dist/utils-vUtP6iPG.js +0 -165
- package/dist/widget-customization-BIBva3f-.js +0 -1458
- package/dist/widget-customization-pqmtsraC.cjs +0 -1
|
@@ -1,257 +1,258 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import p from "node:fs";
|
|
2
|
+
import f from "node:path";
|
|
3
|
+
import { b as Q, c as X, a as K } from "../index-BfQaT5Jy.js";
|
|
4
|
+
import { a as Y, c as M } from "../colors-CyMhfbJi.js";
|
|
5
|
+
import { mkdir as Z, writeFile as W, readFile as q } from "node:fs/promises";
|
|
6
|
+
import { createHash as ee } from "node:crypto";
|
|
7
|
+
const te = "https://fonts.googleapis.com/css2", k = "normal", se = 400, z = "Mozilla/5.0 (compatible; BeatUI Tailwind Plugin; +https://tempots.com)";
|
|
8
|
+
async function ne(e) {
|
|
9
|
+
const { projectRoot: s, requests: t, logger: o } = e;
|
|
9
10
|
if (!t || t.length === 0)
|
|
10
11
|
return null;
|
|
11
|
-
const
|
|
12
|
-
await
|
|
13
|
-
|
|
12
|
+
const r = e.cacheDir ? f.resolve(e.cacheDir) : f.join(s, "node_modules", ".beatui", "google-fonts"), n = [], a = /* @__PURE__ */ new Map();
|
|
13
|
+
await Z(r, { recursive: !0 }).catch((h) => {
|
|
14
|
+
o?.(`Unable to create BeatUI Google Fonts cache directory: ${h}`);
|
|
14
15
|
});
|
|
15
|
-
for (const
|
|
16
|
+
for (const h of t)
|
|
16
17
|
try {
|
|
17
|
-
const
|
|
18
|
-
request:
|
|
19
|
-
cssUrl:
|
|
20
|
-
cacheRoot:
|
|
21
|
-
logger:
|
|
18
|
+
const d = H(h), g = await oe({
|
|
19
|
+
request: h,
|
|
20
|
+
cssUrl: d,
|
|
21
|
+
cacheRoot: r,
|
|
22
|
+
logger: o
|
|
22
23
|
});
|
|
23
|
-
if (!
|
|
24
|
+
if (!g)
|
|
24
25
|
continue;
|
|
25
|
-
const
|
|
26
|
-
cssText:
|
|
27
|
-
cacheRoot:
|
|
28
|
-
assetMap:
|
|
29
|
-
logger:
|
|
26
|
+
const b = await ue({
|
|
27
|
+
cssText: g,
|
|
28
|
+
cacheRoot: r,
|
|
29
|
+
assetMap: a,
|
|
30
|
+
logger: o
|
|
30
31
|
});
|
|
31
|
-
n.push(
|
|
32
|
-
} catch (
|
|
33
|
-
|
|
34
|
-
`Unexpected error while downloading Google Font "${
|
|
32
|
+
n.push(b);
|
|
33
|
+
} catch (d) {
|
|
34
|
+
o?.(
|
|
35
|
+
`Unexpected error while downloading Google Font "${h.family}": ${String(d)}`
|
|
35
36
|
);
|
|
36
37
|
}
|
|
37
|
-
return n.length === 0 ||
|
|
38
|
+
return n.length === 0 || a.size === 0 ? null : {
|
|
38
39
|
cssText: n.join(`
|
|
39
40
|
`),
|
|
40
|
-
assets: Array.from(
|
|
41
|
+
assets: Array.from(a.values())
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
async function
|
|
44
|
+
async function oe({
|
|
44
45
|
request: e,
|
|
45
46
|
cssUrl: s,
|
|
46
47
|
cacheRoot: t,
|
|
47
|
-
logger:
|
|
48
|
+
logger: o
|
|
48
49
|
}) {
|
|
49
|
-
const
|
|
50
|
+
const r = f.join(t, re(e, s));
|
|
50
51
|
try {
|
|
51
52
|
const n = await fetch(s, {
|
|
52
53
|
headers: {
|
|
53
|
-
"User-Agent":
|
|
54
|
+
"User-Agent": z
|
|
54
55
|
}
|
|
55
56
|
});
|
|
56
57
|
if (!n.ok)
|
|
57
58
|
throw new Error(
|
|
58
59
|
`Failed to download Google Font CSS: ${n.status} ${n.statusText}`
|
|
59
60
|
);
|
|
60
|
-
const
|
|
61
|
-
return await
|
|
61
|
+
const a = await n.text();
|
|
62
|
+
return await W(r, a), a;
|
|
62
63
|
} catch (n) {
|
|
63
|
-
if (
|
|
64
|
+
if (p.existsSync(r))
|
|
64
65
|
try {
|
|
65
|
-
const
|
|
66
|
-
return
|
|
66
|
+
const a = await q(r, "utf8");
|
|
67
|
+
return o?.(
|
|
67
68
|
`Using cached Google Font CSS for ${e.family} because download failed.`
|
|
68
|
-
),
|
|
69
|
-
} catch (
|
|
70
|
-
|
|
71
|
-
`Failed to read cached Google Font CSS for ${e.family}: ${
|
|
69
|
+
), a;
|
|
70
|
+
} catch (a) {
|
|
71
|
+
o?.(
|
|
72
|
+
`Failed to read cached Google Font CSS for ${e.family}: ${a}`
|
|
72
73
|
);
|
|
73
74
|
}
|
|
74
|
-
return
|
|
75
|
+
return o?.(
|
|
75
76
|
`Unable to download Google Font CSS for ${e.family}: ${n}`
|
|
76
77
|
), null;
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
-
const t =
|
|
80
|
+
function re(e, s) {
|
|
81
|
+
const t = ee("sha1").update(s).digest("hex").slice(0, 10);
|
|
81
82
|
return `${e.family.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-") || "font"}-${t}.css`;
|
|
82
83
|
}
|
|
83
|
-
function
|
|
84
|
-
const { family: s } = e, t = s.trim().replace(/\s+/g, " "),
|
|
85
|
-
return n.append("family",
|
|
84
|
+
function H(e) {
|
|
85
|
+
const { family: s } = e, t = s.trim().replace(/\s+/g, " "), o = ae(e.weights), r = ie(e.styles), n = new URLSearchParams();
|
|
86
|
+
return n.append("family", le(t, o, r)), e.display && n.append("display", e.display), e.subsets && e.subsets.length > 0 && n.append("subset", e.subsets.join(",")), e.text && n.append("text", e.text), `${te}?${n.toString()}`;
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function ae(e) {
|
|
88
89
|
return !e || e.length === 0 ? [] : Array.from(new Set(e)).sort((s, t) => s - t);
|
|
89
90
|
}
|
|
90
|
-
function
|
|
91
|
+
function ie(e) {
|
|
91
92
|
if (!e || e.length === 0)
|
|
92
|
-
return [
|
|
93
|
-
const s = Array.from(new Set(e)), t = s.includes("italic"),
|
|
94
|
-
return !t && !
|
|
93
|
+
return [k];
|
|
94
|
+
const s = Array.from(new Set(e)), t = s.includes("italic"), o = s.includes("normal");
|
|
95
|
+
return !t && !o && s.push(k), s.sort((r, n) => r === n ? 0 : r === "normal" ? -1 : 1);
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
-
if (s.length === 0 && t.every((
|
|
97
|
+
function le(e, s, t) {
|
|
98
|
+
if (s.length === 0 && t.every((d) => d === "normal"))
|
|
98
99
|
return e;
|
|
99
|
-
const
|
|
100
|
-
if (!
|
|
100
|
+
const o = t.includes("italic"), r = t.includes("normal"), n = s.length > 0 ? s : [se];
|
|
101
|
+
if (!o)
|
|
101
102
|
return `${e}:wght@${n.join(";")}`;
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}), n.forEach((
|
|
106
|
-
|
|
103
|
+
const a = /* @__PURE__ */ new Set();
|
|
104
|
+
r && n.forEach((d) => {
|
|
105
|
+
a.add(`0,${d}`);
|
|
106
|
+
}), n.forEach((d) => {
|
|
107
|
+
a.add(`1,${d}`);
|
|
107
108
|
});
|
|
108
|
-
const
|
|
109
|
-
const [
|
|
110
|
-
return
|
|
109
|
+
const h = Array.from(a).sort((d, g) => {
|
|
110
|
+
const [b, T] = d.split(",").map(Number), [U, v] = g.split(",").map(Number);
|
|
111
|
+
return b - U || T - v;
|
|
111
112
|
});
|
|
112
|
-
return `${e}:ital,wght@${
|
|
113
|
+
return `${e}:ital,wght@${h.join(";")}`;
|
|
113
114
|
}
|
|
114
|
-
const
|
|
115
|
-
async function
|
|
115
|
+
const ce = /url\(([^)]+)\)/g;
|
|
116
|
+
async function ue({
|
|
116
117
|
cssText: e,
|
|
117
118
|
cacheRoot: s,
|
|
118
119
|
assetMap: t,
|
|
119
|
-
logger:
|
|
120
|
+
logger: o
|
|
120
121
|
}) {
|
|
121
|
-
let
|
|
122
|
+
let r = e;
|
|
122
123
|
const n = /* @__PURE__ */ new Set();
|
|
123
|
-
let
|
|
124
|
-
for (; (
|
|
125
|
-
const
|
|
126
|
-
|
|
124
|
+
let a;
|
|
125
|
+
for (; (a = ce.exec(e)) !== null; ) {
|
|
126
|
+
const d = a[1].trim().replace(/^['"]|['"]$/g, "");
|
|
127
|
+
d.startsWith("http") && n.add(d);
|
|
127
128
|
}
|
|
128
|
-
for (const
|
|
129
|
-
const
|
|
130
|
-
if (!
|
|
129
|
+
for (const h of n) {
|
|
130
|
+
const d = await fe(h, s, t, o);
|
|
131
|
+
if (!d)
|
|
131
132
|
continue;
|
|
132
|
-
const
|
|
133
|
-
|
|
133
|
+
const g = h.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), b = new RegExp(`url\\((['"])${g}\\1\\)`, "g"), T = new RegExp(`url\\(${g}\\)`, "g");
|
|
134
|
+
r = r.replace(b, `url(${d.placeholder})`), r = r.replace(T, `url(${d.placeholder})`);
|
|
134
135
|
}
|
|
135
|
-
return
|
|
136
|
+
return r;
|
|
136
137
|
}
|
|
137
|
-
async function
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
return
|
|
138
|
+
async function fe(e, s, t, o) {
|
|
139
|
+
const r = t.get(e);
|
|
140
|
+
if (r)
|
|
141
|
+
return r;
|
|
141
142
|
let n;
|
|
142
143
|
try {
|
|
143
|
-
const
|
|
144
|
-
n =
|
|
145
|
-
} catch (
|
|
146
|
-
return
|
|
144
|
+
const g = new URL(e);
|
|
145
|
+
n = f.basename(g.pathname);
|
|
146
|
+
} catch (g) {
|
|
147
|
+
return o?.(`Invalid Google Font URL skipped: ${e} (${g})`), null;
|
|
147
148
|
}
|
|
148
149
|
if (!n)
|
|
149
|
-
return
|
|
150
|
-
const
|
|
151
|
-
if (!
|
|
150
|
+
return o?.(`Unable to derive file name for Google Font URL: ${e}`), null;
|
|
151
|
+
const a = f.join(s, n), h = `__BEATUI_GOOGLE_FONT_${t.size}__`;
|
|
152
|
+
if (!p.existsSync(a))
|
|
152
153
|
try {
|
|
153
|
-
const
|
|
154
|
+
const g = await fetch(e, {
|
|
154
155
|
headers: {
|
|
155
|
-
"User-Agent":
|
|
156
|
+
"User-Agent": z
|
|
156
157
|
}
|
|
157
158
|
});
|
|
158
|
-
if (!
|
|
159
|
-
return
|
|
160
|
-
`Failed to download Google Font asset ${n}: ${
|
|
159
|
+
if (!g.ok)
|
|
160
|
+
return o?.(
|
|
161
|
+
`Failed to download Google Font asset ${n}: ${g.status} ${g.statusText}`
|
|
161
162
|
), null;
|
|
162
|
-
const
|
|
163
|
-
await
|
|
164
|
-
} catch (
|
|
165
|
-
return
|
|
166
|
-
`Unexpected error while downloading Google Font asset ${n}: ${String(
|
|
163
|
+
const b = Buffer.from(await g.arrayBuffer());
|
|
164
|
+
await W(a, b);
|
|
165
|
+
} catch (g) {
|
|
166
|
+
return o?.(
|
|
167
|
+
`Unexpected error while downloading Google Font asset ${n}: ${String(g)}`
|
|
167
168
|
), null;
|
|
168
169
|
}
|
|
169
|
-
const
|
|
170
|
+
const d = {
|
|
170
171
|
url: e,
|
|
171
172
|
fileName: n,
|
|
172
|
-
localPath:
|
|
173
|
-
placeholder:
|
|
173
|
+
localPath: a,
|
|
174
|
+
placeholder: h
|
|
174
175
|
};
|
|
175
|
-
return t.set(e,
|
|
176
|
+
return t.set(e, d), d;
|
|
176
177
|
}
|
|
177
|
-
function
|
|
178
|
+
function V(e) {
|
|
178
179
|
const s = typeof e == "string" ? new URL(e) : e;
|
|
179
180
|
if (s.protocol !== "file:")
|
|
180
181
|
throw new TypeError(`Expected file URL, received: ${s.href}`);
|
|
181
|
-
const t = s.hostname,
|
|
182
|
+
const t = s.hostname, o = t === "" || t === "localhost", r = decodeURIComponent(s.pathname);
|
|
182
183
|
if (process.platform === "win32") {
|
|
183
|
-
let n =
|
|
184
|
-
return !
|
|
184
|
+
let n = r.replace(/\//g, "\\");
|
|
185
|
+
return !o && t ? `\\\\${t}${n}` : (n.startsWith("\\") && (n = n.slice(1)), n);
|
|
185
186
|
}
|
|
186
|
-
return !
|
|
187
|
+
return !o && t ? `//${t}${r}` : r;
|
|
187
188
|
}
|
|
188
|
-
const L = "@tempots/beatui/tailwind.css",
|
|
189
|
-
function
|
|
189
|
+
const L = "@tempots/beatui/tailwind.css", F = "beatui.tailwind.css", $ = f.dirname(V(import.meta.url)), P = de($) ?? $;
|
|
190
|
+
function I(e) {
|
|
190
191
|
if (Object.keys(e).length === 0)
|
|
191
192
|
return "";
|
|
192
193
|
let s = `:root {
|
|
193
194
|
`;
|
|
194
|
-
for (const [t,
|
|
195
|
-
s += ` ${t}: ${
|
|
195
|
+
for (const [t, o] of Object.entries(e))
|
|
196
|
+
s += ` ${t}: ${o};
|
|
196
197
|
`;
|
|
197
198
|
return s += `}
|
|
198
199
|
`, s;
|
|
199
200
|
}
|
|
200
|
-
function
|
|
201
|
+
function de(e) {
|
|
201
202
|
let s = e;
|
|
202
|
-
const t =
|
|
203
|
+
const t = f.parse(s).root;
|
|
203
204
|
for (; s && s !== t; ) {
|
|
204
|
-
const
|
|
205
|
-
if (
|
|
205
|
+
const o = f.join(s, "package.json");
|
|
206
|
+
if (p.existsSync(o))
|
|
206
207
|
try {
|
|
207
|
-
if (JSON.parse(
|
|
208
|
+
if (JSON.parse(p.readFileSync(o, "utf8"))?.name === "@tempots/beatui")
|
|
208
209
|
return s;
|
|
209
210
|
} catch {
|
|
210
211
|
}
|
|
211
|
-
s =
|
|
212
|
+
s = f.dirname(s);
|
|
212
213
|
}
|
|
213
214
|
return null;
|
|
214
215
|
}
|
|
215
|
-
function
|
|
216
|
+
function he(e) {
|
|
216
217
|
if (e == null)
|
|
217
218
|
return null;
|
|
218
219
|
const s = typeof e == "string" ? e : e.id;
|
|
219
220
|
if (!s)
|
|
220
221
|
return null;
|
|
221
222
|
const [t] = s.split("?");
|
|
222
|
-
return t.startsWith("virtual:") || t.startsWith("\0") ? null : t.startsWith("/@fs/") ? decodeURIComponent(t.slice(4)) : t.startsWith("file://") ?
|
|
223
|
+
return t.startsWith("virtual:") || t.startsWith("\0") ? null : t.startsWith("/@fs/") ? decodeURIComponent(t.slice(4)) : t.startsWith("file://") ? V(t) : f.isAbsolute(t) ? t : null;
|
|
223
224
|
}
|
|
224
|
-
function
|
|
225
|
+
function me(e) {
|
|
225
226
|
const s = /* @__PURE__ */ new Set([
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
227
|
+
f.resolve($, F),
|
|
228
|
+
f.resolve($, "../", F),
|
|
229
|
+
f.resolve($, "../../", F),
|
|
230
|
+
f.resolve($, "tailwind.css"),
|
|
231
|
+
f.resolve($, "../tailwind.css"),
|
|
232
|
+
f.resolve($, "../../tailwind.css"),
|
|
233
|
+
f.resolve($, "../styles/tailwind.css"),
|
|
234
|
+
f.resolve($, "../../styles/tailwind.css"),
|
|
235
|
+
f.resolve(P, "dist", F),
|
|
236
|
+
f.resolve(P, F),
|
|
237
|
+
f.resolve(P, "tailwind.css"),
|
|
238
|
+
f.resolve(P, "src/styles/tailwind.css"),
|
|
239
|
+
f.resolve(e, "node_modules/@tempots/beatui/tailwind.css")
|
|
239
240
|
]);
|
|
240
241
|
for (const t of s)
|
|
241
|
-
if (
|
|
242
|
+
if (p.existsSync(t))
|
|
242
243
|
return t;
|
|
243
244
|
return null;
|
|
244
245
|
}
|
|
245
|
-
function
|
|
246
|
+
function ge(e) {
|
|
246
247
|
return e ? Array.isArray(e) ? e : [e] : [];
|
|
247
248
|
}
|
|
248
|
-
function
|
|
249
|
+
function pe(e, s) {
|
|
249
250
|
let t = e;
|
|
250
|
-
for (const [
|
|
251
|
-
t = t.split(
|
|
251
|
+
for (const [o, r] of s)
|
|
252
|
+
t = t.split(o).join(r);
|
|
252
253
|
return t;
|
|
253
254
|
}
|
|
254
|
-
async function
|
|
255
|
+
async function we(e, s) {
|
|
255
256
|
if (e == null || typeof e != "object")
|
|
256
257
|
return null;
|
|
257
258
|
const t = e.resolve;
|
|
@@ -263,12 +264,65 @@ async function me(e, s) {
|
|
|
263
264
|
return null;
|
|
264
265
|
}
|
|
265
266
|
}
|
|
266
|
-
|
|
267
|
+
const D = new Set(Object.keys(Y));
|
|
268
|
+
function be(e, s, t, o) {
|
|
269
|
+
if (!e) return;
|
|
270
|
+
const r = Object.keys(e);
|
|
271
|
+
for (const n of r)
|
|
272
|
+
D.has(n) && o(
|
|
273
|
+
`[BeatUI] Custom color "${n}" collides with a built-in palette name. Choose a different name to avoid conflicts.`
|
|
274
|
+
);
|
|
275
|
+
for (const n of r) {
|
|
276
|
+
const a = e[n];
|
|
277
|
+
for (const h of M)
|
|
278
|
+
(!(h in a) || !a[h]) && t(
|
|
279
|
+
`[BeatUI] Custom color "${n}" is missing shade ${h}. It will fall back to transparent.`
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
if (s) {
|
|
283
|
+
const n = /* @__PURE__ */ new Set([...D, ...r]);
|
|
284
|
+
for (const [a, h] of Object.entries(s))
|
|
285
|
+
h && !n.has(h) && t(
|
|
286
|
+
`[BeatUI] semanticColors.${a} references "${h}" which is not a built-in or custom color palette name.`
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
function B(e) {
|
|
291
|
+
return e.length === 0 ? [
|
|
292
|
+
"// Auto-generated by @tempots/beatui — do not edit",
|
|
293
|
+
"declare module '@tempots/beatui' {",
|
|
294
|
+
" // eslint-disable-next-line @typescript-eslint/no-empty-interface",
|
|
295
|
+
" interface CustomColorRegistry {}",
|
|
296
|
+
"}",
|
|
297
|
+
""
|
|
298
|
+
].join(`
|
|
299
|
+
`) : [
|
|
300
|
+
"// Auto-generated by @tempots/beatui — do not edit",
|
|
301
|
+
"declare module '@tempots/beatui' {",
|
|
302
|
+
" interface CustomColorRegistry {",
|
|
303
|
+
...e.map((s) => ` ${s}: true`),
|
|
304
|
+
" }",
|
|
305
|
+
"}",
|
|
306
|
+
""
|
|
307
|
+
].join(`
|
|
308
|
+
`);
|
|
309
|
+
}
|
|
310
|
+
function Te(e = {}) {
|
|
267
311
|
let s = process.cwd();
|
|
268
|
-
const t = e.injectCss !== !1,
|
|
312
|
+
const t = e.injectCss !== !1, o = e.rtlAttribute ?? "dir", r = e.rtlValue ?? "rtl";
|
|
269
313
|
let n = "/";
|
|
270
|
-
const
|
|
271
|
-
|
|
314
|
+
const a = e.customColors ? I(
|
|
315
|
+
(() => {
|
|
316
|
+
const m = {};
|
|
317
|
+
for (const [u, i] of Object.entries(
|
|
318
|
+
e.customColors
|
|
319
|
+
))
|
|
320
|
+
for (const c of M)
|
|
321
|
+
m[`--color-${u}-${c}`] = i[c];
|
|
322
|
+
return m;
|
|
323
|
+
})()
|
|
324
|
+
) : "", d = e.semanticColors != null || e.semanticFonts != null || e.semanticRadii != null || e.semanticShadows != null || e.semanticMotion != null || e.semanticSpacing != null || e.semanticTextShadows != null ? I(
|
|
325
|
+
Q({
|
|
272
326
|
colors: e.semanticColors,
|
|
273
327
|
fonts: e.semanticFonts,
|
|
274
328
|
radii: e.semanticRadii,
|
|
@@ -277,150 +331,167 @@ function Se(e = {}) {
|
|
|
277
331
|
spacing: e.semanticSpacing,
|
|
278
332
|
textShadows: e.semanticTextShadows
|
|
279
333
|
})
|
|
280
|
-
) : "",
|
|
281
|
-
|
|
282
|
-
) : "",
|
|
283
|
-
e.baseSpacing && (
|
|
284
|
-
const
|
|
285
|
-
let
|
|
286
|
-
const A = /* @__PURE__ */ new Map(),
|
|
287
|
-
let
|
|
288
|
-
const
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
334
|
+
) : "", g = e.fontFamilies ? I(
|
|
335
|
+
X(e.fontFamilies)
|
|
336
|
+
) : "", b = {};
|
|
337
|
+
e.baseSpacing && (b["--spacing-base-raw"] = e.baseSpacing), e.baseFontSize && (b["--font-size-base-raw"] = e.baseFontSize), e.baseMotionDuration && (b[K("base")] = e.baseMotionDuration);
|
|
338
|
+
const T = I(b), U = ge(e.googleFonts);
|
|
339
|
+
let v = "", E = [];
|
|
340
|
+
const A = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), J = "/@beatui/google-fonts", R = [];
|
|
341
|
+
let x = null, C = null, G = !1;
|
|
342
|
+
const N = (m) => {
|
|
343
|
+
const u = [
|
|
344
|
+
a,
|
|
345
|
+
T,
|
|
346
|
+
d,
|
|
347
|
+
g
|
|
293
348
|
];
|
|
294
|
-
return
|
|
295
|
-
|
|
296
|
-
) :
|
|
349
|
+
return v && (m === "dev" ? u.push(
|
|
350
|
+
pe(v, A)
|
|
351
|
+
) : u.push(v)), u.filter((i) => i && i.length > 0).join(`
|
|
297
352
|
`);
|
|
298
353
|
};
|
|
299
354
|
return {
|
|
300
355
|
name: "beatui-tailwind",
|
|
301
356
|
enforce: "pre",
|
|
302
|
-
async configResolved(
|
|
303
|
-
|
|
304
|
-
|
|
357
|
+
async configResolved(m) {
|
|
358
|
+
s = m.root, G = m.command === "build";
|
|
359
|
+
const u = e.customColors ? Object.keys(e.customColors) : [], i = f.resolve(s, "beatui-custom-colors.d.ts");
|
|
360
|
+
if (u.length > 0) {
|
|
361
|
+
const l = B(u);
|
|
362
|
+
(p.existsSync(i) ? p.readFileSync(i, "utf8") : "") !== l && p.writeFileSync(i, l, "utf8");
|
|
363
|
+
} else if (p.existsSync(i)) {
|
|
364
|
+
const l = B([]);
|
|
365
|
+
p.readFileSync(i, "utf8") !== l && p.writeFileSync(i, l, "utf8");
|
|
366
|
+
}
|
|
367
|
+
if (n = m.base && m.base !== "/" ? m.base.endsWith("/") ? m.base : `${m.base}/` : "/", t) {
|
|
368
|
+
const l = await we(
|
|
305
369
|
this,
|
|
306
370
|
L
|
|
307
371
|
);
|
|
308
|
-
C =
|
|
372
|
+
C = he(l) ?? me(s);
|
|
309
373
|
}
|
|
310
|
-
const
|
|
311
|
-
this && typeof this.warn == "function" ? this.warn(
|
|
374
|
+
const c = (l) => {
|
|
375
|
+
this && typeof this.warn == "function" ? this.warn(l) : m.logger.warn(l);
|
|
312
376
|
};
|
|
313
|
-
if (
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
)
|
|
377
|
+
if (be(
|
|
378
|
+
e.customColors,
|
|
379
|
+
e.semanticColors,
|
|
380
|
+
(l) => c(l),
|
|
381
|
+
(l) => {
|
|
382
|
+
throw new Error(l);
|
|
383
|
+
}
|
|
384
|
+
), U.length > 0) {
|
|
385
|
+
const l = Array.from(
|
|
386
|
+
new Set(U.map(H))
|
|
387
|
+
), w = await ne({
|
|
317
388
|
projectRoot: s,
|
|
318
|
-
requests:
|
|
319
|
-
logger: (
|
|
389
|
+
requests: U,
|
|
390
|
+
logger: (y) => c(`[BeatUI] ${y}`)
|
|
320
391
|
});
|
|
321
|
-
if (
|
|
322
|
-
for (const
|
|
323
|
-
const
|
|
324
|
-
A.set(
|
|
392
|
+
if (v = w?.cssText ?? "", E = w?.assets ?? [], A.clear(), O.clear(), j.clear(), R.length = 0, E.length > 0)
|
|
393
|
+
for (const y of E) {
|
|
394
|
+
const S = `${J}/${y.fileName}`;
|
|
395
|
+
A.set(y.placeholder, S), j.set(S, y.localPath);
|
|
325
396
|
}
|
|
326
397
|
else
|
|
327
|
-
|
|
398
|
+
R.push(...l);
|
|
328
399
|
} else
|
|
329
|
-
|
|
330
|
-
t && !C &&
|
|
400
|
+
R.length = 0;
|
|
401
|
+
t && !C && c(
|
|
331
402
|
"[BeatUI] Unable to resolve @tempots/beatui/tailwind.css. CSS will not be auto-injected."
|
|
332
403
|
);
|
|
333
404
|
},
|
|
334
|
-
configureServer(
|
|
335
|
-
!t || C == null || (
|
|
336
|
-
const
|
|
337
|
-
if (!["GET", "HEAD"].includes(
|
|
405
|
+
configureServer(m) {
|
|
406
|
+
!t || C == null || (m.middlewares.use((u, i, c) => {
|
|
407
|
+
const l = u.method ?? "GET";
|
|
408
|
+
if (!["GET", "HEAD"].includes(l)) {
|
|
338
409
|
c();
|
|
339
410
|
return;
|
|
340
411
|
}
|
|
341
|
-
const
|
|
412
|
+
const w = (u.url ?? "").split("?")[0];
|
|
342
413
|
if (!new Set(
|
|
343
414
|
[
|
|
344
|
-
`/${
|
|
345
|
-
n === "/" ? null : `${n}${
|
|
346
|
-
].filter((
|
|
347
|
-
).has(
|
|
415
|
+
`/${F}`,
|
|
416
|
+
n === "/" ? null : `${n}${F}`
|
|
417
|
+
].filter((S) => !!S)
|
|
418
|
+
).has(w)) {
|
|
348
419
|
c();
|
|
349
420
|
return;
|
|
350
421
|
}
|
|
351
|
-
|
|
422
|
+
i.setHeader("Content-Type", "text/css");
|
|
352
423
|
try {
|
|
353
|
-
let
|
|
354
|
-
const
|
|
355
|
-
|
|
356
|
-
${
|
|
357
|
-
} catch (
|
|
358
|
-
|
|
359
|
-
`[BeatUI] Failed to stream ${L}: ${String(
|
|
360
|
-
),
|
|
424
|
+
let S = p.readFileSync(C, "utf8");
|
|
425
|
+
const _ = N("dev");
|
|
426
|
+
_ && (S += `
|
|
427
|
+
${_}`), i.end(S);
|
|
428
|
+
} catch (S) {
|
|
429
|
+
m.config.logger.error(
|
|
430
|
+
`[BeatUI] Failed to stream ${L}: ${String(S)}`
|
|
431
|
+
), i.statusCode = 500, i.end();
|
|
361
432
|
}
|
|
362
|
-
}),
|
|
363
|
-
const
|
|
364
|
-
if (!["GET", "HEAD"].includes(
|
|
433
|
+
}), j.size > 0 && m.middlewares.use((u, i, c) => {
|
|
434
|
+
const l = u.method ?? "GET";
|
|
435
|
+
if (!["GET", "HEAD"].includes(l)) {
|
|
365
436
|
c();
|
|
366
437
|
return;
|
|
367
438
|
}
|
|
368
|
-
const
|
|
369
|
-
if (!
|
|
439
|
+
const w = (u.url ?? "").split("?")[0], y = w ? j.get(w) : void 0;
|
|
440
|
+
if (!y) {
|
|
370
441
|
c();
|
|
371
442
|
return;
|
|
372
443
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}).pipe(
|
|
444
|
+
i.setHeader("Content-Type", "font/woff2"), p.createReadStream(y).on("error", () => {
|
|
445
|
+
i.statusCode = 500, i.end();
|
|
446
|
+
}).pipe(i);
|
|
376
447
|
}));
|
|
377
448
|
},
|
|
378
449
|
buildStart() {
|
|
379
|
-
if (!
|
|
380
|
-
|
|
381
|
-
const
|
|
382
|
-
let
|
|
383
|
-
const
|
|
384
|
-
if (
|
|
385
|
-
${
|
|
450
|
+
if (!G || !t || C == null) return;
|
|
451
|
+
O.clear(), x = null;
|
|
452
|
+
const m = C;
|
|
453
|
+
let u = p.readFileSync(m, "utf8");
|
|
454
|
+
const i = N("raw");
|
|
455
|
+
if (i && (u += `
|
|
456
|
+
${i}`), x = this.emitFile({
|
|
386
457
|
type: "asset",
|
|
387
|
-
fileName:
|
|
388
|
-
source:
|
|
389
|
-
}),
|
|
390
|
-
for (const c of
|
|
458
|
+
fileName: F,
|
|
459
|
+
source: u
|
|
460
|
+
}), E.length > 0)
|
|
461
|
+
for (const c of E)
|
|
391
462
|
try {
|
|
392
|
-
const
|
|
463
|
+
const l = p.readFileSync(c.localPath), w = this.emitFile({
|
|
393
464
|
type: "asset",
|
|
394
465
|
name: `assets/${c.fileName}`,
|
|
395
|
-
source:
|
|
466
|
+
source: l
|
|
396
467
|
});
|
|
397
|
-
|
|
398
|
-
} catch (
|
|
468
|
+
O.set(c.placeholder, w);
|
|
469
|
+
} catch (l) {
|
|
399
470
|
this.warn(
|
|
400
471
|
`[BeatUI] Failed to include Google Font asset ${c.fileName}: ${String(
|
|
401
|
-
|
|
472
|
+
l
|
|
402
473
|
)}`
|
|
403
474
|
);
|
|
404
475
|
}
|
|
405
476
|
},
|
|
406
|
-
generateBundle(
|
|
407
|
-
if (!
|
|
477
|
+
generateBundle(m, u) {
|
|
478
|
+
if (!G || !x)
|
|
408
479
|
return;
|
|
409
|
-
const
|
|
480
|
+
const i = this.getFileName(x), c = u[i];
|
|
410
481
|
if (!c || c.type !== "asset" || typeof c.source != "string")
|
|
411
482
|
return;
|
|
412
|
-
let
|
|
413
|
-
for (const [
|
|
414
|
-
const
|
|
415
|
-
|
|
483
|
+
let l = c.source;
|
|
484
|
+
for (const [w, y] of O) {
|
|
485
|
+
const S = this.getFileName(y);
|
|
486
|
+
l = l.split(w).join(S);
|
|
416
487
|
}
|
|
417
|
-
c.source =
|
|
488
|
+
c.source = l;
|
|
418
489
|
},
|
|
419
|
-
transformIndexHtml(
|
|
420
|
-
const
|
|
490
|
+
transformIndexHtml(m) {
|
|
491
|
+
const u = [];
|
|
421
492
|
if (t && C) {
|
|
422
|
-
const c = n === "/" ? `/${
|
|
423
|
-
|
|
493
|
+
const c = n === "/" ? `/${F}` : `${n}${F}`;
|
|
494
|
+
u.push({
|
|
424
495
|
tag: "link",
|
|
425
496
|
attrs: {
|
|
426
497
|
rel: "stylesheet",
|
|
@@ -429,7 +500,7 @@ ${o}`), G = this.emitFile({
|
|
|
429
500
|
injectTo: "head-prepend"
|
|
430
501
|
});
|
|
431
502
|
}
|
|
432
|
-
|
|
503
|
+
R.length > 0 && u.push(
|
|
433
504
|
{
|
|
434
505
|
tag: "link",
|
|
435
506
|
attrs: {
|
|
@@ -447,7 +518,7 @@ ${o}`), G = this.emitFile({
|
|
|
447
518
|
},
|
|
448
519
|
injectTo: "head"
|
|
449
520
|
},
|
|
450
|
-
...
|
|
521
|
+
...R.map((c) => ({
|
|
451
522
|
tag: "link",
|
|
452
523
|
attrs: {
|
|
453
524
|
rel: "stylesheet",
|
|
@@ -457,14 +528,14 @@ ${o}`), G = this.emitFile({
|
|
|
457
528
|
injectTo: "head"
|
|
458
529
|
}))
|
|
459
530
|
);
|
|
460
|
-
const
|
|
531
|
+
const i = `
|
|
461
532
|
(() => {
|
|
462
533
|
const apply = () => {
|
|
463
534
|
const root = document.documentElement
|
|
464
535
|
const target = document.body
|
|
465
536
|
if (!target) return
|
|
466
|
-
const dirValue = root.getAttribute('${
|
|
467
|
-
const isRtl = dirValue === '${
|
|
537
|
+
const dirValue = root.getAttribute('${o.replace(/'/g, "\\'")}')
|
|
538
|
+
const isRtl = dirValue === '${r.replace(/'/g, "\\'")}'
|
|
468
539
|
target.classList.toggle('b-rtl', isRtl)
|
|
469
540
|
target.classList.toggle('b-ltr', !isRtl)
|
|
470
541
|
}
|
|
@@ -476,20 +547,20 @@ ${o}`), G = this.emitFile({
|
|
|
476
547
|
const observer = new MutationObserver(apply)
|
|
477
548
|
observer.observe(document.documentElement, {
|
|
478
549
|
attributes: true,
|
|
479
|
-
attributeFilter: ['${
|
|
550
|
+
attributeFilter: ['${o.replace(/'/g, "\\'")}'],
|
|
480
551
|
})
|
|
481
552
|
})();
|
|
482
553
|
`;
|
|
483
|
-
return
|
|
554
|
+
return u.push({
|
|
484
555
|
tag: "script",
|
|
485
556
|
attrs: { type: "module" },
|
|
486
|
-
children:
|
|
557
|
+
children: i,
|
|
487
558
|
injectTo: "body"
|
|
488
|
-
}), { html:
|
|
559
|
+
}), { html: m, tags: u };
|
|
489
560
|
}
|
|
490
561
|
};
|
|
491
562
|
}
|
|
492
563
|
export {
|
|
493
|
-
|
|
494
|
-
|
|
564
|
+
Te as beatuiTailwindPlugin,
|
|
565
|
+
Te as default
|
|
495
566
|
};
|