@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.
Files changed (161) hide show
  1. package/dist/{ar-Wr6gMs-M.cjs → ar-CEzAem0F.cjs} +1 -1
  2. package/dist/{ar-fdUqbCvM.js → ar-CQieaqsq.js} +1 -1
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +1 -1
  5. package/dist/auth-divider-B8yr-E_b.cjs +1 -0
  6. package/dist/{auth-divider-D9KnNeyF.js → auth-divider-Byh5BWLc.js} +91 -88
  7. package/dist/beatui.css +1 -0
  8. package/dist/beatui.tailwind.css +1 -0
  9. package/dist/better-auth/index.cjs.js +1 -1
  10. package/dist/better-auth/index.es.js +27 -26
  11. package/dist/card-BkA7Wvbh.cjs +1 -0
  12. package/dist/card-DX1DwGbL.js +62 -0
  13. package/dist/{colors-C2sgnzFH.js → colors-CyMhfbJi.js} +64 -58
  14. package/dist/{colors-DPCHjRMj.cjs → colors-IXZF9U-s.cjs} +1 -1
  15. package/dist/control-hqEuMzyI.js +343 -0
  16. package/dist/control-muup9GF1.cjs +1 -0
  17. package/dist/custom-validation-BA9iJWl_.cjs +1 -0
  18. package/dist/custom-validation-BOBoUwHY.js +181 -0
  19. package/dist/{de-C5-k5Eov.js → de-CBIwvkAH.js} +1 -1
  20. package/dist/{de-DZqdSEta.cjs → de-DdfxrlT3.cjs} +1 -1
  21. package/dist/deep-merge-8fwp1z4X.js +1346 -0
  22. package/dist/deep-merge-VDGE_HQD.cjs +1 -0
  23. package/dist/duration-input-DmsljXl3.cjs +1 -0
  24. package/dist/{duration-input-D4V_PHIg.js → duration-input-ZQlcqdXU.js} +32 -31
  25. package/dist/{editor-toolbar-group-FpOHrmtx.js → editor-toolbar-group-BNTBMJCe.js} +2 -2
  26. package/dist/{editor-toolbar-group-C_ft_T8D.cjs → editor-toolbar-group-DiMzqYgz.cjs} +1 -1
  27. package/dist/{es-h6jmoF4X.js → es--9HaEj2D.js} +1 -1
  28. package/dist/{es-CJgYfRap.cjs → es-DSdljxFJ.cjs} +1 -1
  29. package/dist/{fa-BuxK837l.js → fa-1Z-akcW7.js} +1 -1
  30. package/dist/{fa-BQ5PzwNY.cjs → fa-BolmeWRT.cjs} +1 -1
  31. package/dist/flyout-CuKFh_T7.js +151 -0
  32. package/dist/flyout-DC_tKaTG.cjs +1 -0
  33. package/dist/{fr-Bv3TG44U.cjs → fr-CODgUuoZ.cjs} +1 -1
  34. package/dist/{fr-BwILQ9G2.js → fr-DhHM9rou.js} +1 -1
  35. package/dist/{he-yC9Sc7JD.js → he-CBamXbGJ.js} +1 -1
  36. package/dist/{he-5LbvgMCC.cjs → he-Juw-dr28.cjs} +1 -1
  37. package/dist/{hi-Da7rcCpP.js → hi-DvvcX-Ra.js} +1 -1
  38. package/dist/{hi-YWhWcG_L.cjs → hi-R749jeg-.cjs} +1 -1
  39. package/dist/{index-CvU9E9wd.js → index-BfQaT5Jy.js} +104 -104
  40. package/dist/{index-XogEKwdt.cjs → index-Dv7nPuwA.cjs} +1 -1
  41. package/dist/index.cjs.js +4 -4
  42. package/dist/index.es.js +6713 -9831
  43. package/dist/{input-container-CyOgiiQD.cjs → input-container-BaWQLWB6.cjs} +1 -1
  44. package/dist/{input-container-8JFB11xN.js → input-container-DCS5oJ4S.js} +4 -4
  45. package/dist/{it-BxOIJE45.cjs → it-DT5oRZDH.cjs} +1 -1
  46. package/dist/{it-Yeklau78.js → it-aV6i8Qxz.js} +1 -1
  47. package/dist/{ja-Dxj9Q5Yd.js → ja-CuLhGnJX.js} +1 -1
  48. package/dist/{ja-CNhjK06P.cjs → ja-CwKaCYLB.cjs} +1 -1
  49. package/dist/json-schema/index.cjs.js +1 -1
  50. package/dist/json-schema/index.es.js +83 -79
  51. package/dist/json-schema-display/index.cjs.js +1 -1
  52. package/dist/json-schema-display/index.es.js +2 -2
  53. package/dist/json-structure/index.cjs.js +1 -1
  54. package/dist/json-structure/index.es.js +74 -72
  55. package/dist/{ko-DgkqcXTs.cjs → ko-Bucro9ID.cjs} +1 -1
  56. package/dist/{ko-gn_MsegK.js → ko-D-66BsEX.js} +1 -1
  57. package/dist/lexical/index.cjs.js +1 -1
  58. package/dist/lexical/index.es.js +5 -5
  59. package/dist/menu-BFLFKceF.cjs +1 -0
  60. package/dist/menu-BO6zqyfq.js +220 -0
  61. package/dist/modal-6Mq3vS5r.js +309 -0
  62. package/dist/modal-d77-TMc4.cjs +1 -0
  63. package/dist/{nl-vHNFtXXb.js → nl-CAny6wvm.js} +1 -1
  64. package/dist/{nl-Dy9lmbBO.cjs → nl-D7vHpehb.cjs} +1 -1
  65. package/dist/notice-BNGx86Yg.js +110 -0
  66. package/dist/notice-iF6zBMq9.cjs +1 -0
  67. package/dist/{oneof-branch-detection-Q_jxvJIA.js → oneof-branch-detection-Bm17RhC2.js} +27 -26
  68. package/dist/oneof-branch-detection-DZ4MrfBp.cjs +1 -0
  69. package/dist/openui/index.cjs.js +9 -0
  70. package/dist/openui/index.es.js +2174 -0
  71. package/dist/password-input-Bipt7Wsu.cjs +1 -0
  72. package/dist/password-input-mkRmrEPq.js +105 -0
  73. package/dist/{pl-BtYbtsmG.cjs → pl-CSiXoOKT.cjs} +1 -1
  74. package/dist/{pl-C0UdHla0.js → pl-rmZLgQ_V.js} +1 -1
  75. package/dist/prosemirror/index.cjs.js +1 -1
  76. package/dist/prosemirror/index.es.js +4 -4
  77. package/dist/{pt-CtNmqQ1X.cjs → pt-CJT-iq4y.cjs} +1 -1
  78. package/dist/{pt-DGKtfN0d.js → pt-DHnajqAi.js} +1 -1
  79. package/dist/{ru-CpXYLt-v.js → ru-C_E8OZNE.js} +1 -1
  80. package/dist/{ru-BaL_NPRU.cjs → ru-G3sr_ctV.cjs} +1 -1
  81. package/dist/slider-input-SLguFA0d.cjs +1 -0
  82. package/dist/slider-input-VYAMm7pE.js +285 -0
  83. package/dist/stepper-24p16Zsv.cjs +1 -0
  84. package/dist/stepper-TlzbfYWa.js +3222 -0
  85. package/dist/tailwind/preset.cjs.js +1 -1
  86. package/dist/tailwind/preset.es.js +38 -40
  87. package/dist/tailwind/vite-plugin.cjs.js +14 -12
  88. package/dist/tailwind/vite-plugin.es.js +317 -246
  89. package/dist/text-area-BdemKQ_w.cjs +1 -0
  90. package/dist/text-area-Br83-_PQ.js +431 -0
  91. package/dist/{text-input-NJypZSnE.js → text-input-ByuxdX8w.js} +5 -5
  92. package/dist/{text-input-DS5zlXb2.cjs → text-input-MjlUC_9u.cjs} +1 -1
  93. package/dist/{toolbar-BF2L6WKC.js → toolbar-CEBTTjHh.js} +1 -1
  94. package/dist/{toolbar-BBwfe8U9.cjs → toolbar-DWawYFFX.cjs} +1 -1
  95. package/dist/{tr-DwOd87oB.cjs → tr-DcxLHHTC.cjs} +1 -1
  96. package/dist/{tr-DIFZDFW_.js → tr-bVXwloKC.js} +1 -1
  97. package/dist/{translations-EwEmHe3v.cjs → translations-D3xqZUTA.cjs} +1 -1
  98. package/dist/{translations-BCMP-h52.js → translations-DU9wTV1y.js} +20 -19
  99. package/dist/{translations-5cXBrENb.js → translations-RT_UN8ny.js} +1 -1
  100. package/dist/{translations-BqWc0ZHz.cjs → translations-qljG2Chq.cjs} +1 -1
  101. package/dist/types/components/navigation/stepper.d.ts +4 -4
  102. package/dist/types/openui/index.d.ts +28 -0
  103. package/dist/types/openui/library/define-component.d.ts +15 -0
  104. package/dist/types/openui/library/library.d.ts +7 -0
  105. package/dist/types/openui/library/prompt-generator.d.ts +5 -0
  106. package/dist/types/openui/library/types.d.ts +33 -0
  107. package/dist/types/openui/parser/parser.d.ts +8 -0
  108. package/dist/types/openui/parser/streaming-parser.d.ts +14 -0
  109. package/dist/types/openui/parser/tokenizer.d.ts +9 -0
  110. package/dist/types/openui/parser/types.d.ts +46 -0
  111. package/dist/types/openui/registry/button.d.ts +148 -0
  112. package/dist/types/openui/registry/data.d.ts +177 -0
  113. package/dist/types/openui/registry/form.d.ts +65 -0
  114. package/dist/types/openui/registry/format.d.ts +67 -0
  115. package/dist/types/openui/registry/index.d.ts +9 -0
  116. package/dist/types/openui/registry/layout.d.ts +45 -0
  117. package/dist/types/openui/registry/navigation.d.ts +149 -0
  118. package/dist/types/openui/registry/overlay.d.ts +56 -0
  119. package/dist/types/openui/registry/typography.d.ts +17 -0
  120. package/dist/types/openui/renderer/action-context.d.ts +24 -0
  121. package/dist/types/openui/renderer/node-resolver.d.ts +9 -0
  122. package/dist/types/openui/renderer/openui-renderer.d.ts +32 -0
  123. package/dist/types/openui/renderer/skeleton.d.ts +2 -0
  124. package/dist/types/openui/streaming/from-fetch.d.ts +7 -0
  125. package/dist/types/openui/streaming/from-sse.d.ts +7 -0
  126. package/dist/types/openui/streaming/from-websocket.d.ts +10 -0
  127. package/dist/types/openui/streaming/types.d.ts +5 -0
  128. package/dist/types/tailwind/preset.d.ts +25 -4
  129. package/dist/types/tailwind/vite-plugin.d.ts +17 -5
  130. package/dist/types/tokens/colors.d.ts +87 -9
  131. package/dist/types/tokens/index.d.ts +7 -6
  132. package/dist/{ur-DBst-TXc.js → ur-Dls2qb4V.js} +1 -1
  133. package/dist/{ur-D9nLchps.cjs → ur-IRQoHh1E.cjs} +1 -1
  134. package/dist/use-form-BZ8vDYOv.cjs +2 -0
  135. package/dist/use-form-DsCzINfm.js +750 -0
  136. package/dist/utils-D3-NApSw.cjs +1 -0
  137. package/dist/utils-Nbh7yQ73.js +105 -0
  138. package/dist/{vi-Dg1aiMr5.cjs → vi-Bi9SvVCP.cjs} +1 -1
  139. package/dist/{vi-DQOJp32U.js → vi-C3mTzj50.js} +1 -1
  140. package/dist/widget-customization-BV6XB2v_.cjs +1 -0
  141. package/dist/widget-customization-Bso45ONQ.js +1198 -0
  142. package/dist/{zh-DPK4HXl2.js → zh-B4JRJBt2.js} +1 -1
  143. package/dist/{zh-tbwSTbmn.cjs → zh-BMU5rYu1.cjs} +1 -1
  144. package/package.json +31 -20
  145. package/dist/auth-divider-CjcrgXmq.cjs +0 -1
  146. package/dist/custom-validation-7por5nJN.js +0 -488
  147. package/dist/custom-validation-CLscGHY4.cjs +0 -1
  148. package/dist/deep-merge-D90SW1Ci.cjs +0 -1
  149. package/dist/deep-merge-DT2H9AGq.js +0 -1765
  150. package/dist/duration-input-4AQnQpyo.cjs +0 -1
  151. package/dist/menu-B60Q9j3-.cjs +0 -1
  152. package/dist/menu-BkqFGcXg.js +0 -366
  153. package/dist/notice-CQGJyZ8o.js +0 -211
  154. package/dist/notice-p2IqXS5-.cjs +0 -1
  155. package/dist/oneof-branch-detection-xDDDdYRk.cjs +0 -1
  156. package/dist/use-form-8NnZ-KHk.js +0 -1090
  157. package/dist/use-form-Dcra7GeE.cjs +0 -2
  158. package/dist/utils-DmEuG3Np.cjs +0 -1
  159. package/dist/utils-vUtP6iPG.js +0 -165
  160. package/dist/widget-customization-BIBva3f-.js +0 -1458
  161. package/dist/widget-customization-pqmtsraC.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../index-XogEKwdt.cjs"),s=require("../colors-DPCHjRMj.cjs");function l(){return Object.fromEntries(s.semanticColorNames.map(e=>[e,Object.fromEntries(s.colorShades.map(t=>[t,`var(--color-${e}-${t})`]))]))}function u(e){const{includeCoreTokens:t=!0,includeSemanticTokens:n=!0}=e,a={};if(t){const r=i.generateCoreTokenVariables();e.baseSpacing&&(r[i.getSpacingVarName("base")]=e.baseSpacing),e.baseFontSize&&(r[i.getBaseFontSizeVarName()]=e.baseFontSize),e.baseMotionDuration&&(r[i.getMotionDurationVarName("base")]=e.baseMotionDuration),a[":root"]=r}return n&&(a[":root"]={...a[":root"]??{},...i.generateSemanticTokenVariables({colors:e.semanticColors,fonts:e.semanticFonts,radii:e.semanticRadii,shadows:e.semanticShadows,motion:e.semanticMotion,spacing:e.semanticSpacing,textShadows:e.semanticTextShadows})}),e.fontFamilies&&(a[":root"]={...a[":root"]??{},...i.generateFontFamilyOverrideVariables(e.fontFamilies)}),a}const o=Object.assign((e,t)=>({handler:e,config:t}),{withOptions(e,t=()=>({})){const n=a=>({handler:e(a),config:t(a)});return n.__isOptionsFunction=!0,n}});function c(e={}){const t=u(e);return{darkMode:"class",theme:{extend:e.extendTheme??!0?{colors:l()}:{}},plugins:[o(({addBase:r})=>{Object.keys(t).length>0&&r(t)}),o(({addVariant:r})=>{r("beatui-light",".light &"),r("beatui-rtl",".b-rtl &"),r("beatui-ltr",".b-ltr &")})]}}const b=c();exports.beatuiPreset=b;exports.createBeatuiPreset=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../index-Dv7nPuwA.cjs"),o=require("../colors-IXZF9U-s.cjs");function u(e){const r=[...o.semanticColorNames];return e&&r.push(...e),Object.fromEntries(r.map(a=>[a,Object.fromEntries(o.colorShades.map(t=>[t,`var(--color-${a}-${t})`]))]))}function b(e){const{includeCoreTokens:r=!0,includeSemanticTokens:a=!0}=e,t={};if(r){const i=n.generateCoreTokenVariables(e.customColors);e.baseSpacing&&(i["--spacing-base-raw"]=e.baseSpacing),e.baseFontSize&&(i["--font-size-base-raw"]=e.baseFontSize),e.baseMotionDuration&&(i[n.getMotionDurationVarName("base")]=e.baseMotionDuration),t[":root"]=i}return a&&(t[":root"]={...t[":root"]??{},...n.generateSemanticTokenVariables({colors:e.semanticColors,fonts:e.semanticFonts,radii:e.semanticRadii,shadows:e.semanticShadows,motion:e.semanticMotion,spacing:e.semanticSpacing,textShadows:e.semanticTextShadows})}),e.fontFamilies&&(t[":root"]={...t[":root"]??{},...n.generateFontFamilyOverrideVariables(e.fontFamilies)}),t}const c=Object.assign((e,r)=>({handler:e,config:r}),{withOptions(e,r=()=>({})){const a=t=>({handler:e(t),config:r(t)});return a.__isOptionsFunction=!0,a}});function l(e={}){const r=b(e),a=e.extendTheme??!0,t=e.customColors?Object.keys(e.customColors):void 0;return{darkMode:"class",theme:{extend:a?{colors:u(t)}:{}},plugins:[c(({addBase:s})=>{Object.keys(r).length>0&&s(r)}),c(({addVariant:s})=>{s("beatui-light",".light &"),s("beatui-rtl",".b-rtl &"),s("beatui-ltr",".b-ltr &")})]}}const m=l();exports.beatuiPreset=m;exports.createBeatuiPreset=l;
@@ -1,27 +1,25 @@
1
- import { g as s, a as o, b as c, c as l, d as m, e as u } from "../index-CvU9E9wd.js";
2
- import { s as b, c as g } from "../colors-C2sgnzFH.js";
3
- function f() {
4
- return Object.fromEntries(
5
- b.map((e) => [
6
- e,
1
+ import { g as o, a as c, b as l, c as m } from "../index-BfQaT5Jy.js";
2
+ import { s as u, c as b } from "../colors-CyMhfbJi.js";
3
+ function f(e) {
4
+ const a = [...u];
5
+ return e && a.push(...e), Object.fromEntries(
6
+ a.map((r) => [
7
+ r,
7
8
  Object.fromEntries(
8
- g.map((t) => [
9
- t,
10
- `var(--color-${e}-${t})`
11
- ])
9
+ b.map((t) => [t, `var(--color-${r}-${t})`])
12
10
  )
13
11
  ])
14
12
  );
15
13
  }
16
- function d(e) {
17
- const { includeCoreTokens: t = !0, includeSemanticTokens: i = !0 } = e, a = {};
18
- if (t) {
19
- const r = s();
20
- e.baseSpacing && (r[l("base")] = e.baseSpacing), e.baseFontSize && (r[m()] = e.baseFontSize), e.baseMotionDuration && (r[u("base")] = e.baseMotionDuration), a[":root"] = r;
14
+ function g(e) {
15
+ const { includeCoreTokens: a = !0, includeSemanticTokens: r = !0 } = e, t = {};
16
+ if (a) {
17
+ const s = o(e.customColors);
18
+ e.baseSpacing && (s["--spacing-base-raw"] = e.baseSpacing), e.baseFontSize && (s["--font-size-base-raw"] = e.baseFontSize), e.baseMotionDuration && (s[c("base")] = e.baseMotionDuration), t[":root"] = s;
21
19
  }
22
- return i && (a[":root"] = {
23
- ...a[":root"] ?? {},
24
- ...o({
20
+ return r && (t[":root"] = {
21
+ ...t[":root"] ?? {},
22
+ ...l({
25
23
  colors: e.semanticColors,
26
24
  fonts: e.semanticFonts,
27
25
  radii: e.semanticRadii,
@@ -30,47 +28,47 @@ function d(e) {
30
28
  spacing: e.semanticSpacing,
31
29
  textShadows: e.semanticTextShadows
32
30
  })
33
- }), e.fontFamilies && (a[":root"] = {
34
- ...a[":root"] ?? {},
35
- ...c(e.fontFamilies)
36
- }), a;
31
+ }), e.fontFamilies && (t[":root"] = {
32
+ ...t[":root"] ?? {},
33
+ ...m(e.fontFamilies)
34
+ }), t;
37
35
  }
38
36
  const n = Object.assign(
39
- (e, t) => ({
37
+ (e, a) => ({
40
38
  handler: e,
41
- config: t
39
+ config: a
42
40
  }),
43
41
  {
44
- withOptions(e, t = () => ({})) {
45
- const i = (a) => ({
46
- handler: e(a),
47
- config: t(a)
42
+ withOptions(e, a = () => ({})) {
43
+ const r = (t) => ({
44
+ handler: e(t),
45
+ config: a(t)
48
46
  });
49
- return i.__isOptionsFunction = !0, i;
47
+ return r.__isOptionsFunction = !0, r;
50
48
  }
51
49
  }
52
50
  );
53
- function h(e = {}) {
54
- const t = d(e);
51
+ function d(e = {}) {
52
+ const a = g(e), r = e.extendTheme ?? !0, t = e.customColors ? Object.keys(e.customColors) : void 0;
55
53
  return {
56
54
  darkMode: "class",
57
55
  theme: {
58
- extend: e.extendTheme ?? !0 ? {
59
- colors: f()
56
+ extend: r ? {
57
+ colors: f(t)
60
58
  } : {}
61
59
  },
62
60
  plugins: [
63
- n(({ addBase: r }) => {
64
- Object.keys(t).length > 0 && r(t);
61
+ n(({ addBase: i }) => {
62
+ Object.keys(a).length > 0 && i(a);
65
63
  }),
66
- n(({ addVariant: r }) => {
67
- r("beatui-light", ".light &"), r("beatui-rtl", ".b-rtl &"), r("beatui-ltr", ".b-ltr &");
64
+ n(({ addVariant: i }) => {
65
+ i("beatui-light", ".light &"), i("beatui-rtl", ".b-rtl &"), i("beatui-ltr", ".b-ltr &");
68
66
  })
69
67
  ]
70
68
  };
71
69
  }
72
- const T = h();
70
+ const F = d();
73
71
  export {
74
- T as beatuiPreset,
75
- h as createBeatuiPreset
72
+ F as beatuiPreset,
73
+ d as createBeatuiPreset
76
74
  };
@@ -1,18 +1,20 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("node:fs"),u=require("node:path"),R=require("../index-XogEKwdt.cjs"),G=require("node:fs/promises"),J=require("node:crypto");var N=typeof document<"u"?document.currentScript:null;const Q="https://fonts.googleapis.com/css2",M="normal",X=400,B="Mozilla/5.0 (compatible; BeatUI Tailwind Plugin; +https://tempots.com)";async function K(e){const{projectRoot:n,requests:t,logger:r}=e;if(!t||t.length===0)return null;const o=e.cacheDir?u.resolve(e.cacheDir):u.join(n,"node_modules",".beatui","google-fonts"),s=[],d=new Map;await G.mkdir(o,{recursive:!0}).catch(g=>{r?.(`Unable to create BeatUI Google Fonts cache directory: ${g}`)});for(const g of t)try{const i=W(g),l=await Y({request:g,cssUrl:i,cacheRoot:o,logger:r});if(!l)continue;const b=await se({cssText:l,cacheRoot:o,assetMap:d,logger:r});s.push(b)}catch(i){r?.(`Unexpected error while downloading Google Font "${g.family}": ${String(i)}`)}return s.length===0||d.size===0?null:{cssText:s.join(`
2
- `),assets:Array.from(d.values())}}async function Y({request:e,cssUrl:n,cacheRoot:t,logger:r}){const o=u.join(t,Z(e,n));try{const s=await fetch(n,{headers:{"User-Agent":B}});if(!s.ok)throw new Error(`Failed to download Google Font CSS: ${s.status} ${s.statusText}`);const d=await s.text();return await G.writeFile(o,d),d}catch(s){if(S.existsSync(o))try{const d=await G.readFile(o,"utf8");return r?.(`Using cached Google Font CSS for ${e.family} because download failed.`),d}catch(d){r?.(`Failed to read cached Google Font CSS for ${e.family}: ${d}`)}return r?.(`Unable to download Google Font CSS for ${e.family}: ${s}`),null}}function Z(e,n){const t=J.createHash("sha1").update(n).digest("hex").slice(0,10);return`${e.family.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-")||"font"}-${t}.css`}function W(e){const{family:n}=e,t=n.trim().replace(/\s+/g," "),r=q(e.weights),o=ee(e.styles),s=new URLSearchParams;return s.append("family",te(t,r,o)),e.display&&s.append("display",e.display),e.subsets&&e.subsets.length>0&&s.append("subset",e.subsets.join(",")),e.text&&s.append("text",e.text),`${Q}?${s.toString()}`}function q(e){return!e||e.length===0?[]:Array.from(new Set(e)).sort((n,t)=>n-t)}function ee(e){if(!e||e.length===0)return[M];const n=Array.from(new Set(e)),t=n.includes("italic"),r=n.includes("normal");return!t&&!r&&n.push(M),n.sort((o,s)=>o===s?0:o==="normal"?-1:1)}function te(e,n,t){if(n.length===0&&t.every(i=>i==="normal"))return e;const r=t.includes("italic"),o=t.includes("normal"),s=n.length>0?n:[X];if(!r)return`${e}:wght@${s.join(";")}`;const d=new Set;o&&s.forEach(i=>{d.add(`0,${i}`)}),s.forEach(i=>{d.add(`1,${i}`)});const g=Array.from(d).sort((i,l)=>{const[b,$]=i.split(",").map(Number),[T,v]=l.split(",").map(Number);return b-T||$-v});return`${e}:ital,wght@${g.join(";")}`}const ne=/url\(([^)]+)\)/g;async function se({cssText:e,cacheRoot:n,assetMap:t,logger:r}){let o=e;const s=new Set;let d;for(;(d=ne.exec(e))!==null;){const i=d[1].trim().replace(/^['"]|['"]$/g,"");i.startsWith("http")&&s.add(i)}for(const g of s){const i=await re(g,n,t,r);if(!i)continue;const l=g.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),b=new RegExp(`url\\((['"])${l}\\1\\)`,"g"),$=new RegExp(`url\\(${l}\\)`,"g");o=o.replace(b,`url(${i.placeholder})`),o=o.replace($,`url(${i.placeholder})`)}return o}async function re(e,n,t,r){const o=t.get(e);if(o)return o;let s;try{const l=new URL(e);s=u.basename(l.pathname)}catch(l){return r?.(`Invalid Google Font URL skipped: ${e} (${l})`),null}if(!s)return r?.(`Unable to derive file name for Google Font URL: ${e}`),null;const d=u.join(n,s),g=`__BEATUI_GOOGLE_FONT_${t.size}__`;if(!S.existsSync(d))try{const l=await fetch(e,{headers:{"User-Agent":B}});if(!l.ok)return r?.(`Failed to download Google Font asset ${s}: ${l.status} ${l.statusText}`),null;const b=Buffer.from(await l.arrayBuffer());await G.writeFile(d,b)}catch(l){return r?.(`Unexpected error while downloading Google Font asset ${s}: ${String(l)}`),null}const i={url:e,fileName:s,localPath:d,placeholder:g};return t.set(e,i),i}function z(e){const n=typeof e=="string"?new URL(e):e;if(n.protocol!=="file:")throw new TypeError(`Expected file URL, received: ${n.href}`);const t=n.hostname,r=t===""||t==="localhost",o=decodeURIComponent(n.pathname);if(process.platform==="win32"){let s=o.replace(/\//g,"\\");return!r&&t?`\\\\${t}${s}`:(s.startsWith("\\")&&(s=s.slice(1)),s)}return!r&&t?`//${t}${o}`:o}const D="@tempots/beatui/tailwind.css",y="beatui.tailwind.css",w=u.dirname(z(typeof document>"u"?require("url").pathToFileURL(__filename).href:N&&N.tagName.toUpperCase()==="SCRIPT"&&N.src||new URL("tailwind/vite-plugin.cjs.js",document.baseURI).href)),j=oe(w)??w;function x(e){if(Object.keys(e).length===0)return"";let n=`:root {
3
- `;for(const[t,r]of Object.entries(e))n+=` ${t}: ${r};
4
- `;return n+=`}
5
- `,n}function oe(e){let n=e;const t=u.parse(n).root;for(;n&&n!==t;){const r=u.join(n,"package.json");if(S.existsSync(r))try{if(JSON.parse(S.readFileSync(r,"utf8"))?.name==="@tempots/beatui")return n}catch{}n=u.dirname(n)}return null}function ae(e){if(e==null)return null;const n=typeof e=="string"?e:e.id;if(!n)return null;const[t]=n.split("?");return t.startsWith("virtual:")||t.startsWith("\0")?null:t.startsWith("/@fs/")?decodeURIComponent(t.slice(4)):t.startsWith("file://")?z(t):u.isAbsolute(t)?t:null}function ie(e){const n=new Set([u.resolve(w,y),u.resolve(w,"../",y),u.resolve(w,"../../",y),u.resolve(w,"tailwind.css"),u.resolve(w,"../tailwind.css"),u.resolve(w,"../../tailwind.css"),u.resolve(w,"../styles/tailwind.css"),u.resolve(w,"../../styles/tailwind.css"),u.resolve(j,"dist",y),u.resolve(j,y),u.resolve(j,"tailwind.css"),u.resolve(j,"src/styles/tailwind.css"),u.resolve(e,"node_modules/@tempots/beatui/tailwind.css")]);for(const t of n)if(S.existsSync(t))return t;return null}function le(e){return e?Array.isArray(e)?e:[e]:[]}function ce(e,n){let t=e;for(const[r,o]of n)t=t.split(r).join(o);return t}async function ue(e,n){if(e==null||typeof e!="object")return null;const t=e.resolve;if(!t)return null;try{return await t.call(e,n,void 0,{skipSelf:!0})}catch{return null}}function V(e={}){let n=process.cwd();const t=e.injectCss!==!1,r=e.rtlAttribute??"dir",o=e.rtlValue??"rtl";let s="/";const g=e.semanticColors!=null||e.semanticFonts!=null||e.semanticRadii!=null||e.semanticShadows!=null||e.semanticMotion!=null||e.semanticSpacing!=null||e.semanticTextShadows!=null?x(R.generateSemanticTokenVariables({colors:e.semanticColors,fonts:e.semanticFonts,radii:e.semanticRadii,shadows:e.semanticShadows,motion:e.semanticMotion,spacing:e.semanticSpacing,textShadows:e.semanticTextShadows})):"",i=e.fontFamilies?x(R.generateFontFamilyOverrideVariables(e.fontFamilies)):"",l={};e.baseSpacing&&(l[R.getSpacingVarName("base")]=e.baseSpacing),e.baseFontSize&&(l[R.getBaseFontSizeVarName()]=e.baseFontSize),e.baseMotionDuration&&(l[R.getMotionDurationVarName("base")]=e.baseMotionDuration);const b=x(l),$=le(e.googleFonts);let T="",v=[];const I=new Map,P=new Map,_=new Map,H="/@beatui/google-fonts",U=[];let O=null,C=null,A=!1;const L=h=>{const f=[b,g,i];return T&&(h==="dev"?f.push(ce(T,I)):f.push(T)),f.filter(a=>a&&a.length>0).join(`
6
- `)};return{name:"beatui-tailwind",enforce:"pre",async configResolved(h){if(n=h.root,A=h.command==="build",s=h.base&&h.base!=="/"?h.base.endsWith("/")?h.base:`${h.base}/`:"/",t){const a=await ue(this,D);C=ae(a)??ie(n)}const f=a=>{this&&typeof this.warn=="function"?this.warn(a):h.logger.warn(a)};if($.length>0){const a=Array.from(new Set($.map(W))),c=await K({projectRoot:n,requests:$,logger:m=>f(`[BeatUI] ${m}`)});if(T=c?.cssText??"",v=c?.assets??[],I.clear(),P.clear(),_.clear(),U.length=0,v.length>0)for(const m of v){const p=`${H}/${m.fileName}`;I.set(m.placeholder,p),_.set(p,m.localPath)}else U.push(...a)}else U.length=0;t&&!C&&f("[BeatUI] Unable to resolve @tempots/beatui/tailwind.css. CSS will not be auto-injected.")},configureServer(h){!t||C==null||(h.middlewares.use((f,a,c)=>{const m=f.method??"GET";if(!["GET","HEAD"].includes(m)){c();return}const p=(f.url??"").split("?")[0];if(!new Set([`/${y}`,s==="/"?null:`${s}${y}`].filter(F=>!!F)).has(p)){c();return}a.setHeader("Content-Type","text/css");try{let F=S.readFileSync(C,"utf8");const k=L("dev");k&&(F+=`
7
- ${k}`),a.end(F)}catch(F){h.config.logger.error(`[BeatUI] Failed to stream ${D}: ${String(F)}`),a.statusCode=500,a.end()}}),_.size>0&&h.middlewares.use((f,a,c)=>{const m=f.method??"GET";if(!["GET","HEAD"].includes(m)){c();return}const p=(f.url??"").split("?")[0],E=p?_.get(p):void 0;if(!E){c();return}a.setHeader("Content-Type","font/woff2"),S.createReadStream(E).on("error",()=>{a.statusCode=500,a.end()}).pipe(a)}))},buildStart(){if(!A||!t||C==null)return;P.clear(),O=null;const h=C;let f=S.readFileSync(h,"utf8");const a=L("raw");if(a&&(f+=`
8
- ${a}`),O=this.emitFile({type:"asset",fileName:y,source:f}),v.length>0)for(const c of v)try{const m=S.readFileSync(c.localPath),p=this.emitFile({type:"asset",name:`assets/${c.fileName}`,source:m});P.set(c.placeholder,p)}catch(m){this.warn(`[BeatUI] Failed to include Google Font asset ${c.fileName}: ${String(m)}`)}},generateBundle(h,f){if(!A||!O)return;const a=this.getFileName(O),c=f[a];if(!c||c.type!=="asset"||typeof c.source!="string")return;let m=c.source;for(const[p,E]of P){const F=this.getFileName(E);m=m.split(p).join(F)}c.source=m},transformIndexHtml(h){const f=[];if(t&&C){const c=s==="/"?`/${y}`:`${s}${y}`;f.push({tag:"link",attrs:{rel:"stylesheet",href:c},injectTo:"head-prepend"})}U.length>0&&f.push({tag:"link",attrs:{rel:"preconnect",href:"https://fonts.googleapis.com"},injectTo:"head"},{tag:"link",attrs:{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:""},injectTo:"head"},...U.map(c=>({tag:"link",attrs:{rel:"stylesheet",href:c,"data-beatui-google-font":""},injectTo:"head"})));const a=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("node:fs"),d=require("node:path"),G=require("../index-Dv7nPuwA.cjs"),k=require("../colors-IXZF9U-s.cjs"),x=require("node:fs/promises"),Y=require("node:crypto");var L=typeof document<"u"?document.currentScript:null;const Z="https://fonts.googleapis.com/css2",B="normal",q=400,V="Mozilla/5.0 (compatible; BeatUI Tailwind Plugin; +https://tempots.com)";async function ee(e){const{projectRoot:s,requests:t,logger:o}=e;if(!t||t.length===0)return null;const r=e.cacheDir?d.resolve(e.cacheDir):d.join(s,"node_modules",".beatui","google-fonts"),n=[],a=new Map;await x.mkdir(r,{recursive:!0}).catch(h=>{o?.(`Unable to create BeatUI Google Fonts cache directory: ${h}`)});for(const h of t)try{const f=J(h),g=await te({request:h,cssUrl:f,cacheRoot:r,logger:o});if(!g)continue;const b=await ie({cssText:g,cacheRoot:r,assetMap:a,logger:o});n.push(b)}catch(f){o?.(`Unexpected error while downloading Google Font "${h.family}": ${String(f)}`)}return n.length===0||a.size===0?null:{cssText:n.join(`
2
+ `),assets:Array.from(a.values())}}async function te({request:e,cssUrl:s,cacheRoot:t,logger:o}){const r=d.join(t,se(e,s));try{const n=await fetch(s,{headers:{"User-Agent":V}});if(!n.ok)throw new Error(`Failed to download Google Font CSS: ${n.status} ${n.statusText}`);const a=await n.text();return await x.writeFile(r,a),a}catch(n){if(p.existsSync(r))try{const a=await x.readFile(r,"utf8");return o?.(`Using cached Google Font CSS for ${e.family} because download failed.`),a}catch(a){o?.(`Failed to read cached Google Font CSS for ${e.family}: ${a}`)}return o?.(`Unable to download Google Font CSS for ${e.family}: ${n}`),null}}function se(e,s){const t=Y.createHash("sha1").update(s).digest("hex").slice(0,10);return`${e.family.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-")||"font"}-${t}.css`}function J(e){const{family:s}=e,t=s.trim().replace(/\s+/g," "),o=ne(e.weights),r=oe(e.styles),n=new URLSearchParams;return n.append("family",re(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),`${Z}?${n.toString()}`}function ne(e){return!e||e.length===0?[]:Array.from(new Set(e)).sort((s,t)=>s-t)}function oe(e){if(!e||e.length===0)return[B];const s=Array.from(new Set(e)),t=s.includes("italic"),o=s.includes("normal");return!t&&!o&&s.push(B),s.sort((r,n)=>r===n?0:r==="normal"?-1:1)}function re(e,s,t){if(s.length===0&&t.every(f=>f==="normal"))return e;const o=t.includes("italic"),r=t.includes("normal"),n=s.length>0?s:[q];if(!o)return`${e}:wght@${n.join(";")}`;const a=new Set;r&&n.forEach(f=>{a.add(`0,${f}`)}),n.forEach(f=>{a.add(`1,${f}`)});const h=Array.from(a).sort((f,g)=>{const[b,T]=f.split(",").map(Number),[U,v]=g.split(",").map(Number);return b-U||T-v});return`${e}:ital,wght@${h.join(";")}`}const ae=/url\(([^)]+)\)/g;async function ie({cssText:e,cacheRoot:s,assetMap:t,logger:o}){let r=e;const n=new Set;let a;for(;(a=ae.exec(e))!==null;){const f=a[1].trim().replace(/^['"]|['"]$/g,"");f.startsWith("http")&&n.add(f)}for(const h of n){const f=await le(h,s,t,o);if(!f)continue;const g=h.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),b=new RegExp(`url\\((['"])${g}\\1\\)`,"g"),T=new RegExp(`url\\(${g}\\)`,"g");r=r.replace(b,`url(${f.placeholder})`),r=r.replace(T,`url(${f.placeholder})`)}return r}async function le(e,s,t,o){const r=t.get(e);if(r)return r;let n;try{const g=new URL(e);n=d.basename(g.pathname)}catch(g){return o?.(`Invalid Google Font URL skipped: ${e} (${g})`),null}if(!n)return o?.(`Unable to derive file name for Google Font URL: ${e}`),null;const a=d.join(s,n),h=`__BEATUI_GOOGLE_FONT_${t.size}__`;if(!p.existsSync(a))try{const g=await fetch(e,{headers:{"User-Agent":V}});if(!g.ok)return o?.(`Failed to download Google Font asset ${n}: ${g.status} ${g.statusText}`),null;const b=Buffer.from(await g.arrayBuffer());await x.writeFile(a,b)}catch(g){return o?.(`Unexpected error while downloading Google Font asset ${n}: ${String(g)}`),null}const f={url:e,fileName:n,localPath:a,placeholder:h};return t.set(e,f),f}function Q(e){const s=typeof e=="string"?new URL(e):e;if(s.protocol!=="file:")throw new TypeError(`Expected file URL, received: ${s.href}`);const t=s.hostname,o=t===""||t==="localhost",r=decodeURIComponent(s.pathname);if(process.platform==="win32"){let n=r.replace(/\//g,"\\");return!o&&t?`\\\\${t}${n}`:(n.startsWith("\\")&&(n=n.slice(1)),n)}return!o&&t?`//${t}${r}`:r}const W="@tempots/beatui/tailwind.css",C="beatui.tailwind.css",$=d.dirname(Q(typeof document>"u"?require("url").pathToFileURL(__filename).href:L&&L.tagName.toUpperCase()==="SCRIPT"&&L.src||new URL("tailwind/vite-plugin.cjs.js",document.baseURI).href)),I=ce($)??$;function _(e){if(Object.keys(e).length===0)return"";let s=`:root {
3
+ `;for(const[t,o]of Object.entries(e))s+=` ${t}: ${o};
4
+ `;return s+=`}
5
+ `,s}function ce(e){let s=e;const t=d.parse(s).root;for(;s&&s!==t;){const o=d.join(s,"package.json");if(p.existsSync(o))try{if(JSON.parse(p.readFileSync(o,"utf8"))?.name==="@tempots/beatui")return s}catch{}s=d.dirname(s)}return null}function ue(e){if(e==null)return null;const s=typeof e=="string"?e:e.id;if(!s)return null;const[t]=s.split("?");return t.startsWith("virtual:")||t.startsWith("\0")?null:t.startsWith("/@fs/")?decodeURIComponent(t.slice(4)):t.startsWith("file://")?Q(t):d.isAbsolute(t)?t:null}function de(e){const s=new Set([d.resolve($,C),d.resolve($,"../",C),d.resolve($,"../../",C),d.resolve($,"tailwind.css"),d.resolve($,"../tailwind.css"),d.resolve($,"../../tailwind.css"),d.resolve($,"../styles/tailwind.css"),d.resolve($,"../../styles/tailwind.css"),d.resolve(I,"dist",C),d.resolve(I,C),d.resolve(I,"tailwind.css"),d.resolve(I,"src/styles/tailwind.css"),d.resolve(e,"node_modules/@tempots/beatui/tailwind.css")]);for(const t of s)if(p.existsSync(t))return t;return null}function fe(e){return e?Array.isArray(e)?e:[e]:[]}function he(e,s){let t=e;for(const[o,r]of s)t=t.split(o).join(r);return t}async function me(e,s){if(e==null||typeof e!="object")return null;const t=e.resolve;if(!t)return null;try{return await t.call(e,s,void 0,{skipSelf:!0})}catch{return null}}const z=new Set(Object.keys(k.colors));function ge(e,s,t,o){if(!e)return;const r=Object.keys(e);for(const n of r)z.has(n)&&o(`[BeatUI] Custom color "${n}" collides with a built-in palette name. Choose a different name to avoid conflicts.`);for(const n of r){const a=e[n];for(const h of k.colorShades)(!(h in a)||!a[h])&&t(`[BeatUI] Custom color "${n}" is missing shade ${h}. It will fall back to transparent.`)}if(s){const n=new Set([...z,...r]);for(const[a,h]of Object.entries(s))h&&!n.has(h)&&t(`[BeatUI] semanticColors.${a} references "${h}" which is not a built-in or custom color palette name.`)}}function H(e){return e.length===0?["// Auto-generated by @tempots/beatui — do not edit","declare module '@tempots/beatui' {"," // eslint-disable-next-line @typescript-eslint/no-empty-interface"," interface CustomColorRegistry {}","}",""].join(`
6
+ `):["// Auto-generated by @tempots/beatui do not edit","declare module '@tempots/beatui' {"," interface CustomColorRegistry {",...e.map(s=>` ${s}: true`)," }","}",""].join(`
7
+ `)}function X(e={}){let s=process.cwd();const t=e.injectCss!==!1,o=e.rtlAttribute??"dir",r=e.rtlValue??"rtl";let n="/";const a=e.customColors?_((()=>{const m={};for(const[u,i]of Object.entries(e.customColors))for(const c of k.colorShades)m[`--color-${u}-${c}`]=i[c];return m})()):"",f=e.semanticColors!=null||e.semanticFonts!=null||e.semanticRadii!=null||e.semanticShadows!=null||e.semanticMotion!=null||e.semanticSpacing!=null||e.semanticTextShadows!=null?_(G.generateSemanticTokenVariables({colors:e.semanticColors,fonts:e.semanticFonts,radii:e.semanticRadii,shadows:e.semanticShadows,motion:e.semanticMotion,spacing:e.semanticSpacing,textShadows:e.semanticTextShadows})):"",g=e.fontFamilies?_(G.generateFontFamilyOverrideVariables(e.fontFamilies)):"",b={};e.baseSpacing&&(b["--spacing-base-raw"]=e.baseSpacing),e.baseFontSize&&(b["--font-size-base-raw"]=e.baseFontSize),e.baseMotionDuration&&(b[G.getMotionDurationVarName("base")]=e.baseMotionDuration);const T=_(b),U=fe(e.googleFonts);let v="",E=[];const N=new Map,j=new Map,O=new Map,K="/@beatui/google-fonts",R=[];let P=null,F=null,A=!1;const D=m=>{const u=[a,T,f,g];return v&&(m==="dev"?u.push(he(v,N)):u.push(v)),u.filter(i=>i&&i.length>0).join(`
8
+ `)};return{name:"beatui-tailwind",enforce:"pre",async configResolved(m){s=m.root,A=m.command==="build";const u=e.customColors?Object.keys(e.customColors):[],i=d.resolve(s,"beatui-custom-colors.d.ts");if(u.length>0){const l=H(u);(p.existsSync(i)?p.readFileSync(i,"utf8"):"")!==l&&p.writeFileSync(i,l,"utf8")}else if(p.existsSync(i)){const l=H([]);p.readFileSync(i,"utf8")!==l&&p.writeFileSync(i,l,"utf8")}if(n=m.base&&m.base!=="/"?m.base.endsWith("/")?m.base:`${m.base}/`:"/",t){const l=await me(this,W);F=ue(l)??de(s)}const c=l=>{this&&typeof this.warn=="function"?this.warn(l):m.logger.warn(l)};if(ge(e.customColors,e.semanticColors,l=>c(l),l=>{throw new Error(l)}),U.length>0){const l=Array.from(new Set(U.map(J))),w=await ee({projectRoot:s,requests:U,logger:y=>c(`[BeatUI] ${y}`)});if(v=w?.cssText??"",E=w?.assets??[],N.clear(),j.clear(),O.clear(),R.length=0,E.length>0)for(const y of E){const S=`${K}/${y.fileName}`;N.set(y.placeholder,S),O.set(S,y.localPath)}else R.push(...l)}else R.length=0;t&&!F&&c("[BeatUI] Unable to resolve @tempots/beatui/tailwind.css. CSS will not be auto-injected.")},configureServer(m){!t||F==null||(m.middlewares.use((u,i,c)=>{const l=u.method??"GET";if(!["GET","HEAD"].includes(l)){c();return}const w=(u.url??"").split("?")[0];if(!new Set([`/${C}`,n==="/"?null:`${n}${C}`].filter(S=>!!S)).has(w)){c();return}i.setHeader("Content-Type","text/css");try{let S=p.readFileSync(F,"utf8");const M=D("dev");M&&(S+=`
9
+ ${M}`),i.end(S)}catch(S){m.config.logger.error(`[BeatUI] Failed to stream ${W}: ${String(S)}`),i.statusCode=500,i.end()}}),O.size>0&&m.middlewares.use((u,i,c)=>{const l=u.method??"GET";if(!["GET","HEAD"].includes(l)){c();return}const w=(u.url??"").split("?")[0],y=w?O.get(w):void 0;if(!y){c();return}i.setHeader("Content-Type","font/woff2"),p.createReadStream(y).on("error",()=>{i.statusCode=500,i.end()}).pipe(i)}))},buildStart(){if(!A||!t||F==null)return;j.clear(),P=null;const m=F;let u=p.readFileSync(m,"utf8");const i=D("raw");if(i&&(u+=`
10
+ ${i}`),P=this.emitFile({type:"asset",fileName:C,source:u}),E.length>0)for(const c of E)try{const l=p.readFileSync(c.localPath),w=this.emitFile({type:"asset",name:`assets/${c.fileName}`,source:l});j.set(c.placeholder,w)}catch(l){this.warn(`[BeatUI] Failed to include Google Font asset ${c.fileName}: ${String(l)}`)}},generateBundle(m,u){if(!A||!P)return;const i=this.getFileName(P),c=u[i];if(!c||c.type!=="asset"||typeof c.source!="string")return;let l=c.source;for(const[w,y]of j){const S=this.getFileName(y);l=l.split(w).join(S)}c.source=l},transformIndexHtml(m){const u=[];if(t&&F){const c=n==="/"?`/${C}`:`${n}${C}`;u.push({tag:"link",attrs:{rel:"stylesheet",href:c},injectTo:"head-prepend"})}R.length>0&&u.push({tag:"link",attrs:{rel:"preconnect",href:"https://fonts.googleapis.com"},injectTo:"head"},{tag:"link",attrs:{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:""},injectTo:"head"},...R.map(c=>({tag:"link",attrs:{rel:"stylesheet",href:c,"data-beatui-google-font":""},injectTo:"head"})));const i=`
9
11
  (() => {
10
12
  const apply = () => {
11
13
  const root = document.documentElement
12
14
  const target = document.body
13
15
  if (!target) return
14
- const dirValue = root.getAttribute('${r.replace(/'/g,"\\'")}')
15
- const isRtl = dirValue === '${o.replace(/'/g,"\\'")}'
16
+ const dirValue = root.getAttribute('${o.replace(/'/g,"\\'")}')
17
+ const isRtl = dirValue === '${r.replace(/'/g,"\\'")}'
16
18
  target.classList.toggle('b-rtl', isRtl)
17
19
  target.classList.toggle('b-ltr', !isRtl)
18
20
  }
@@ -24,7 +26,7 @@ ${a}`),O=this.emitFile({type:"asset",fileName:y,source:f}),v.length>0)for(const
24
26
  const observer = new MutationObserver(apply)
25
27
  observer.observe(document.documentElement, {
26
28
  attributes: true,
27
- attributeFilter: ['${r.replace(/'/g,"\\'")}'],
29
+ attributeFilter: ['${o.replace(/'/g,"\\'")}'],
28
30
  })
29
31
  })();
30
- `;return f.push({tag:"script",attrs:{type:"module"},children:a,injectTo:"body"}),{html:h,tags:f}}}}exports.beatuiTailwindPlugin=V;exports.default=V;
32
+ `;return u.push({tag:"script",attrs:{type:"module"},children:i,injectTo:"body"}),{html:m,tags:u}}}}exports.beatuiTailwindPlugin=X;exports.default=X;