@tempots/beatui 0.95.0 → 1.0.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 (237) hide show
  1. package/dist/{ar-BVXPzVJB.cjs → ar-CuI1Jgt6.cjs} +1 -1
  2. package/dist/{ar-B4jDJwHQ.js → ar-DaKbK_t8.js} +87 -11
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +1 -1
  5. package/dist/{auth-divider-BPwKk8MW.js → auth-divider-BQIhr3-R.js} +99 -98
  6. package/dist/auth-divider-DvnUModP.cjs +1 -0
  7. package/dist/beatui.css +1628 -541
  8. package/dist/beatui.tailwind.css +1629 -542
  9. package/dist/better-auth/index.cjs.js +1 -1
  10. package/dist/better-auth/index.es.js +9 -9
  11. package/dist/codehighlight/index.cjs.js +22 -0
  12. package/dist/codehighlight/index.es.js +76 -0
  13. package/dist/colors-B-p6IzX9.cjs +1 -0
  14. package/dist/{colors-BY0Ja_bf.js → colors-DwufPN8S.js} +18 -18
  15. package/dist/{de-Dd33yWzb.js → de-3MTPDS1i.js} +82 -6
  16. package/dist/{de-BdfPZskW.cjs → de-DthHehbh.cjs} +1 -1
  17. package/dist/{deep-merge-C8dSqIXI.js → deep-merge-BzIheQtH.js} +511 -517
  18. package/dist/deep-merge-EkjEgK0N.cjs +1 -0
  19. package/dist/{duration-input-IuFWywO5.cjs → duration-input-ClgYjeBa.cjs} +1 -1
  20. package/dist/{duration-input-DFZwkg6M.js → duration-input-DGzmIImj.js} +5 -5
  21. package/dist/{editor-toolbar-group-DiJFgGcI.js → editor-toolbar-group-Crlu1QJw.js} +3 -3
  22. package/dist/{editor-toolbar-group-BCBfu8pG.cjs → editor-toolbar-group-mkL4QozO.cjs} +1 -1
  23. package/dist/es-B6GJLk9h.cjs +1 -0
  24. package/dist/{es-jHMT3_7O.js → es-DwMUvBeU.js} +94 -18
  25. package/dist/{fa-eX3_BAZR.js → fa-0rvQiKrJ.js} +87 -11
  26. package/dist/{fa-BXnP4pbN.cjs → fa-BwgP93iV.cjs} +1 -1
  27. package/dist/{fr-Bj-GjMJm.js → fr-B4i6NzLl.js} +86 -10
  28. package/dist/{fr-HJDhGjI2.cjs → fr-CQzk5zqY.cjs} +1 -1
  29. package/dist/{he-DYgmPPkG.js → he-C71n-hsn.js} +87 -11
  30. package/dist/{he-C6nEVZhN.cjs → he-DcxxvRfs.cjs} +1 -1
  31. package/dist/{hi-DMVSXAJt.cjs → hi-D-KHVWg4.cjs} +1 -1
  32. package/dist/{hi-CgYLonE9.js → hi-xmrXpeVU.js} +87 -11
  33. package/dist/index-B5MAsOC-.cjs +1 -0
  34. package/dist/{index-B8cqD9ny.js → index-C3o9GSH6.js} +106 -105
  35. package/dist/index.cjs.js +4 -4
  36. package/dist/index.es.js +8055 -5285
  37. package/dist/input-container-BvEcp7FU.js +275 -0
  38. package/dist/input-container-Di1YvVB_.cjs +1 -0
  39. package/dist/{it-CO2BPqah.js → it-CDZTtOBC.js} +83 -7
  40. package/dist/{it-DhfVcjKb.cjs → it-D344Dutu.cjs} +1 -1
  41. package/dist/{ja-Bt6fGS_Q.cjs → ja-BNgnDZ27.cjs} +1 -1
  42. package/dist/{ja-BrzwjH8T.js → ja-Zz1LzidW.js} +91 -15
  43. package/dist/json-schema/index.cjs.js +1 -1
  44. package/dist/json-schema/index.es.js +261 -257
  45. package/dist/json-schema-display/index.cjs.js +1 -1
  46. package/dist/json-schema-display/index.es.js +2 -2
  47. package/dist/json-structure/index.cjs.js +1 -1
  48. package/dist/json-structure/index.es.js +132 -133
  49. package/dist/{ko-D-lJ4wYQ.js → ko-9laUsZDL.js} +90 -14
  50. package/dist/{ko-DfAaBGrz.cjs → ko-D-WJ9NK7.cjs} +1 -1
  51. package/dist/lexical/index.cjs.js +2 -39
  52. package/dist/lexical/index.es.js +2056 -20626
  53. package/dist/markdown/index.cjs.js +1 -1
  54. package/dist/markdown/index.es.js +41 -4
  55. package/dist/{menu-CV85y3Xf.js → menu-B8yoDMRS.js} +23 -23
  56. package/dist/menu-B92oSDct.cjs +1 -0
  57. package/dist/modal-BT0jjDqX.cjs +1 -0
  58. package/dist/{modal-CwZuWiSK.js → modal-DBguyX-b.js} +9 -9
  59. package/dist/monaco/index.cjs.js +2 -2
  60. package/dist/monaco/index.es.js +7 -7
  61. package/dist/{nl-CNWBQjK5.cjs → nl-CrqUlFie.cjs} +1 -1
  62. package/dist/{nl-ClsworIe.js → nl-Dcll9fVA.js} +86 -10
  63. package/dist/{notice-D7hYFM5A.js → notice-E19wu9lA.js} +51 -51
  64. package/dist/notice-_9XhdrFw.cjs +1 -0
  65. package/dist/oneof-branch-detection-J_DYEEcD.js +1077 -0
  66. package/dist/oneof-branch-detection-ZUBZ6hqy.cjs +1 -0
  67. package/dist/{pl-CqHTeu3-.cjs → pl-9UksIrvX.cjs} +1 -1
  68. package/dist/{pl-WTwLAxnV.js → pl-Dm9N9Gbr.js} +83 -7
  69. package/dist/prosemirror/index.cjs.js +3 -1
  70. package/dist/prosemirror/index.es.js +636 -4
  71. package/dist/{pt-CgkjJnsG.js → pt-CFi5cn0k.js} +88 -12
  72. package/dist/{pt-BQmsiqbo.cjs → pt-_kfdzwqi.cjs} +1 -1
  73. package/dist/{ru-CtgH7OY9.js → ru-CEhZUw8R.js} +91 -15
  74. package/dist/{ru-CG56A2To.cjs → ru-CW1WNNlr.cjs} +1 -1
  75. package/dist/stack-BLMteGTn.js +15 -0
  76. package/dist/stack-dwLevGa2.cjs +1 -0
  77. package/dist/tailwind/preset.cjs.js +1 -1
  78. package/dist/tailwind/preset.es.js +2 -2
  79. package/dist/tailwind/vite-plugin.cjs.js +1 -1
  80. package/dist/tailwind/vite-plugin.es.js +1 -1
  81. package/dist/text-input-DfqXolVe.js +55 -0
  82. package/dist/text-input-X_q01NsY.cjs +1 -0
  83. package/dist/toolbar-DY0ax2Qd.js +130 -0
  84. package/dist/toolbar-DoKdYXIL.cjs +1 -0
  85. package/dist/{tr-DE7_VtKu.cjs → tr-B6GIRegf.cjs} +1 -1
  86. package/dist/{tr-D1O1vEmr.js → tr-ZmnVDhLP.js} +81 -5
  87. package/dist/{translations-yu4gNqlP.js → translations-A4kR7CW8.js} +1 -1
  88. package/dist/{translations-DyCmyLE_.js → translations-B1_yyDUK.js} +207 -129
  89. package/dist/{translations-DBxIjvWR.cjs → translations-C81buKAw.cjs} +1 -1
  90. package/dist/translations-Dbx7L7Q1.cjs +1 -0
  91. package/dist/types/beatui-i18n/default.d.ts +71 -0
  92. package/dist/types/beatui-i18n/locales/en.d.ts +71 -0
  93. package/dist/types/beatui-i18n/translations.d.ts +71 -0
  94. package/dist/types/codehighlight/code-highlight.d.ts +21 -0
  95. package/dist/types/codehighlight/index.d.ts +14 -0
  96. package/dist/types/components/button/toggle-button.d.ts +4 -4
  97. package/dist/types/components/data/avatar.d.ts +3 -1
  98. package/dist/types/components/data/badge.d.ts +10 -18
  99. package/dist/types/components/data/column-filter-panel.d.ts +31 -0
  100. package/dist/types/components/data/column-filter.d.ts +110 -0
  101. package/dist/types/components/data/column-header-menu.d.ts +42 -0
  102. package/dist/types/components/data/data-source.d.ts +190 -0
  103. package/dist/types/components/data/data-table-body.d.ts +12 -0
  104. package/dist/types/components/data/data-table-column-toggle.d.ts +4 -0
  105. package/dist/types/components/data/data-table-context.d.ts +53 -0
  106. package/dist/types/components/data/data-table-header.d.ts +6 -0
  107. package/dist/types/components/data/data-table-resolve.d.ts +26 -0
  108. package/dist/types/components/data/data-table-types.d.ts +201 -0
  109. package/dist/types/components/data/data-table.d.ts +38 -0
  110. package/dist/types/components/data/data-toolbar.d.ts +44 -0
  111. package/dist/types/components/data/date-picker-shared.d.ts +55 -0
  112. package/dist/types/components/data/date-picker.d.ts +58 -0
  113. package/dist/types/components/data/date-range-picker.d.ts +56 -0
  114. package/dist/types/components/data/filter.d.ts +268 -0
  115. package/dist/types/components/data/index.d.ts +13 -4
  116. package/dist/types/components/data/indicator.d.ts +41 -0
  117. package/dist/types/components/data/progress-bar.d.ts +2 -2
  118. package/dist/types/components/data/selection-checkbox.d.ts +63 -0
  119. package/dist/types/components/data/skeleton.d.ts +1 -1
  120. package/dist/types/components/data/sortable-header.d.ts +55 -0
  121. package/dist/types/components/data/unstyled-drop-zone.d.ts +2 -2
  122. package/dist/types/components/form/control/control.d.ts +9 -9
  123. package/dist/types/components/form/input/advanced-slider.d.ts +6 -6
  124. package/dist/types/components/form/input/appearance-selector.d.ts +9 -2
  125. package/dist/types/components/form/input/checkbox-input.d.ts +6 -7
  126. package/dist/types/components/form/input/color-input.d.ts +1 -1
  127. package/dist/types/components/form/input/color-swatch-input.d.ts +3 -3
  128. package/dist/types/components/form/input/combobox-input.d.ts +5 -5
  129. package/dist/types/components/form/input/combobox-tags-input.d.ts +5 -5
  130. package/dist/types/components/form/input/create-nullable-string-input.d.ts +2 -2
  131. package/dist/types/components/form/input/date-input.d.ts +4 -4
  132. package/dist/types/components/form/input/dropdown-input.d.ts +5 -5
  133. package/dist/types/components/form/input/editable-text.d.ts +2 -2
  134. package/dist/types/components/form/input/email-input.d.ts +4 -4
  135. package/dist/types/components/form/input/index.d.ts +1 -0
  136. package/dist/types/components/form/input/input-container.d.ts +1 -1
  137. package/dist/types/components/form/input/input-options.d.ts +28 -1
  138. package/dist/types/components/form/input/mask-input.d.ts +8 -2
  139. package/dist/types/components/form/input/native-select.d.ts +3 -3
  140. package/dist/types/components/form/input/nullable-date-input.d.ts +2 -2
  141. package/dist/types/components/form/input/nullable-email-input.d.ts +3 -3
  142. package/dist/types/components/form/input/nullable-rating-input.d.ts +8 -8
  143. package/dist/types/components/form/input/nullable-uuid-input.d.ts +4 -4
  144. package/dist/types/components/form/input/number-input.d.ts +3 -3
  145. package/dist/types/components/form/input/otp-input.d.ts +12 -12
  146. package/dist/types/components/form/input/rating-input.d.ts +7 -8
  147. package/dist/types/components/form/input/select-tags-input.d.ts +5 -5
  148. package/dist/types/components/form/input/switch.d.ts +2 -2
  149. package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +82 -0
  150. package/dist/types/components/form/input/uuid-input.d.ts +2 -2
  151. package/dist/types/components/json-structure/controls/uuid-control.d.ts +1 -1
  152. package/dist/types/components/layout/card.d.ts +66 -0
  153. package/dist/types/components/layout/collapse.d.ts +2 -2
  154. package/dist/types/components/layout/flex.d.ts +26 -0
  155. package/dist/types/components/layout/index.d.ts +1 -0
  156. package/dist/types/components/lexical/floating/slash-command-palette.d.ts +2 -2
  157. package/dist/types/components/media/pdf-page-viewer.d.ts +8 -5
  158. package/dist/types/components/misc/index.d.ts +1 -0
  159. package/dist/types/components/misc/loading-overlay.d.ts +29 -0
  160. package/dist/types/components/misc/notice.d.ts +4 -4
  161. package/dist/types/components/misc/notification-provider.d.ts +9 -3
  162. package/dist/types/components/misc/notification.d.ts +9 -9
  163. package/dist/types/components/navigation/breadcrumbs.d.ts +1 -1
  164. package/dist/types/components/navigation/menu.d.ts +6 -6
  165. package/dist/types/components/navigation/pagination.d.ts +17 -4
  166. package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +2 -2
  167. package/dist/types/components/navigation/tabs/tabs.d.ts +17 -8
  168. package/dist/types/components/navigation/toolbar/toolbar.d.ts +12 -6
  169. package/dist/types/components/overlay/announcement-bar.d.ts +12 -4
  170. package/dist/types/components/overlay/dialogs.d.ts +2 -2
  171. package/dist/types/components/overlay/modal.d.ts +9 -2
  172. package/dist/types/components/overlay/tooltip.d.ts +6 -6
  173. package/dist/types/components/theme/types.d.ts +15 -4
  174. package/dist/types/lexical/plugins/slash-commands.d.ts +1 -1
  175. package/dist/types/tokens/z-index.d.ts +18 -18
  176. package/dist/types/utils/use-animated-toggle.d.ts +12 -4
  177. package/dist/{ur-ZJgsSpG2.cjs → ur-CtFl_tz6.cjs} +1 -1
  178. package/dist/{ur-BcuB7IqE.js → ur-yYgj3NmT.js} +87 -11
  179. package/dist/use-animated-toggle-C3asw_Sg.js +207 -0
  180. package/dist/use-animated-toggle-cKcuItmz.cjs +1 -0
  181. package/dist/use-form-CaW192gw.cjs +2 -0
  182. package/dist/{use-form-CfxvyTfd.js → use-form-Dn6v2tEh.js} +153 -152
  183. package/dist/utils-DmEuG3Np.cjs +1 -0
  184. package/dist/utils-vUtP6iPG.js +165 -0
  185. package/dist/{vi-D0rQ3dIx.js → vi-D5u4CLQO.js} +88 -12
  186. package/dist/{vi-BOgLRkuK.cjs → vi-DyCZSpsk.cjs} +1 -1
  187. package/dist/widget-customization-DgW1SXN6.cjs +1 -0
  188. package/dist/{widget-customization-CLZNGavL.js → widget-customization-Dkx7kNSe.js} +413 -398
  189. package/dist/{zh-DoYqiZO1.js → zh-B0kwMMer.js} +90 -14
  190. package/dist/{zh-BTZ8OZ4H.cjs → zh-C3ZxMQKb.cjs} +1 -1
  191. package/package.json +208 -37
  192. package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -1
  193. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  194. package/dist/auth-divider-BgaQ8ifw.cjs +0 -1
  195. package/dist/colors-BI0YhONJ.cjs +0 -1
  196. package/dist/deep-merge-ChJQbUKq.cjs +0 -1
  197. package/dist/es-C8TpneCm.cjs +0 -1
  198. package/dist/hls.light.min-C6xKDzRR.cjs +0 -27
  199. package/dist/hls.light.min-hEMf_E8u.js +0 -8311
  200. package/dist/index-1JaBwDB-.js +0 -921
  201. package/dist/index-CN10Cyqr.cjs +0 -1
  202. package/dist/index-CTcbhnPw.cjs +0 -4
  203. package/dist/index-DF7RFzD9.cjs +0 -1
  204. package/dist/index-D_zOXmU5.cjs +0 -36
  205. package/dist/index-DfPkCwdC.js +0 -2709
  206. package/dist/index-vowHNIPH.js +0 -14308
  207. package/dist/index-yOU4Ceaq.js +0 -68
  208. package/dist/index-zQ3IYJFH.cjs +0 -1
  209. package/dist/input-container-BWYHj0Iq.cjs +0 -1
  210. package/dist/input-container-DMoVdH6E.js +0 -263
  211. package/dist/menu-De_-sGeb.cjs +0 -1
  212. package/dist/modal-CiGmgsOI.cjs +0 -1
  213. package/dist/notice-CPZQuxcA.cjs +0 -1
  214. package/dist/oneof-branch-detection-BFxukD63.cjs +0 -8
  215. package/dist/oneof-branch-detection-izpPjBCR.js +0 -6290
  216. package/dist/stack-4VUGISn6.cjs +0 -1
  217. package/dist/stack-Bm-UZosx.js +0 -879
  218. package/dist/string-B9vVyfq3.cjs +0 -1
  219. package/dist/string-DYyMxBl-.js +0 -19
  220. package/dist/text-input-BLupB3cU.js +0 -45
  221. package/dist/text-input-M6WBhhVj.cjs +0 -1
  222. package/dist/timer-BJHOsuS6.cjs +0 -1
  223. package/dist/timer-Rd2sKnvH.js +0 -65
  224. package/dist/toolbar-Be1eU0qU.js +0 -118
  225. package/dist/toolbar-WWv5kcYG.cjs +0 -1
  226. package/dist/translations-OOsMRpX9.cjs +0 -1
  227. package/dist/types/components/data/calendar-shared.d.ts +0 -59
  228. package/dist/types/components/data/calendar.d.ts +0 -107
  229. package/dist/types/components/data/icon-badge.d.ts +0 -14
  230. package/dist/types/components/data/range-calendar.d.ts +0 -104
  231. package/dist/types/components/data/tag.d.ts +0 -51
  232. package/dist/use-animated-toggle-C7PTmnZi.js +0 -195
  233. package/dist/use-animated-toggle-DrqK7nUS.cjs +0 -1
  234. package/dist/use-form-ClA0ZRco.cjs +0 -2
  235. package/dist/utils-DEbsp9Q9.js +0 -129
  236. package/dist/utils-DIUEhA-Z.cjs +0 -1
  237. package/dist/widget-customization-DtEEo35Y.cjs +0 -1
@@ -1,56 +1,56 @@
1
- import { Value as p, prop as rt, computedOf as D, html as _, attr as u, svg as tt, svgAttr as Y, Empty as A, on as M, When as W, Fragment as j, aria as N, emitValue as Z, Use as lt, input as ot, emitValueAsNullableDate as et, emitValueAsNullableDateTime as nt, Repeat as ut, style as pt, emit as dt, emitValueAsNumber as V } from "@tempots/dom";
2
- import { F as ht, N as z, T as gt, U as ft, a as mt } from "./deep-merge-C8dSqIXI.js";
3
- import { $ as bt } from "./string-DYyMxBl-.js";
4
- import { I as E } from "./input-container-DMoVdH6E.js";
5
- import { C as U, T as wt } from "./text-input-BLupB3cU.js";
6
- import { B as yt, I as q, b as st, a as It } from "./translations-DyCmyLE_.js";
7
- import { AutoSelect as Mt } from "@tempots/ui";
8
- import { E as $t, P as xt } from "./notice-D7hYFM5A.js";
9
- import { s as _t } from "./session-id-3KiilioY.js";
10
- import { r as kt } from "./utils-DEbsp9Q9.js";
11
- function it(t) {
1
+ import { Value as p, prop as lt, computedOf as D, html as _, attr as u, svg as rt, svgAttr as Q, Empty as S, on as I, When as H, Fragment as j, aria as B, emitValue as st, Use as gt, input as ut, emitValueAsNullableDate as ot, emitValueAsNullableDateTime as ct, Repeat as ft, style as mt, emit as bt, emitValueAsNumber as E } from "@tempots/dom";
2
+ import { F as wt, N as X, T as yt, U as Mt, a as It } from "./deep-merge-BzIheQtH.js";
3
+ import { decodeBase64 as $t } from "@tempots/std";
4
+ import { I as L } from "./input-container-BvEcp7FU.js";
5
+ import { C as O, m as pt, T as xt } from "./text-input-DfqXolVe.js";
6
+ import { B as _t, I as tt, b as it, a as kt } from "./translations-B1_yyDUK.js";
7
+ import { AutoSelect as Ft } from "@tempots/ui";
8
+ import { N as Ct, P as Tt } from "./notice-E19wu9lA.js";
9
+ import { s as St } from "./session-id-3KiilioY.js";
10
+ import { r as At } from "./utils-vUtP6iPG.js";
11
+ function dt(t) {
12
12
  if (typeof t != "string") return !1;
13
13
  const e = t.startsWith("#") ? t.slice(1) : t;
14
14
  return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(e);
15
15
  }
16
- function Ft(t) {
16
+ function vt(t) {
17
17
  if (typeof t != "string") return !1;
18
18
  const e = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i, a = t.match(e);
19
19
  if (!a) return !1;
20
- const [, n, r, s] = a, o = parseInt(n, 10), i = parseInt(r, 10), c = parseInt(s, 10);
21
- return o >= 0 && o <= 255 && i >= 0 && i <= 255 && c >= 0 && c <= 255;
20
+ const [, n, r, s] = a, o = parseInt(n, 10), c = parseInt(r, 10), i = parseInt(s, 10);
21
+ return o >= 0 && o <= 255 && c >= 0 && c <= 255 && i >= 0 && i <= 255;
22
22
  }
23
- function Ct(t) {
23
+ function Nt(t) {
24
24
  if (typeof t != "string") return !1;
25
25
  const e = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0|1|0?\.\d+)\s*\)$/i, a = t.match(e);
26
26
  if (!a) return !1;
27
- const [, n, r, s, o] = a, i = parseInt(n, 10), c = parseInt(r, 10), l = parseInt(s, 10), d = parseFloat(o);
28
- return i >= 0 && i <= 255 && c >= 0 && c <= 255 && l >= 0 && l <= 255 && d >= 0 && d <= 1;
27
+ const [, n, r, s, o] = a, c = parseInt(n, 10), i = parseInt(r, 10), l = parseInt(s, 10), d = parseFloat(o);
28
+ return c >= 0 && c <= 255 && i >= 0 && i <= 255 && l >= 0 && l <= 255 && d >= 0 && d <= 1;
29
29
  }
30
- function Tt(t) {
30
+ function Rt(t) {
31
31
  if (typeof t != "string") return !1;
32
32
  const e = /^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/i, a = t.match(e);
33
33
  if (!a) return !1;
34
- const [, n, r, s] = a, o = parseInt(n, 10), i = parseInt(r, 10), c = parseInt(s, 10);
35
- return o >= 0 && o <= 360 && i >= 0 && i <= 100 && c >= 0 && c <= 100;
34
+ const [, n, r, s] = a, o = parseInt(n, 10), c = parseInt(r, 10), i = parseInt(s, 10);
35
+ return o >= 0 && o <= 360 && c >= 0 && c <= 100 && i >= 0 && i <= 100;
36
36
  }
37
- function re(t) {
38
- return it(t) || Ft(t) || Ct(t) || Tt(t);
37
+ function pe(t) {
38
+ return dt(t) || vt(t) || Nt(t) || Rt(t);
39
39
  }
40
- function At(t) {
41
- if (!it(t)) return null;
40
+ function Bt(t) {
41
+ if (!dt(t)) return null;
42
42
  let e = t.startsWith("#") ? t.slice(1) : t;
43
43
  return e.length === 3 && (e = e.split("").map((a) => a + a).join("")), `#${e.toLowerCase()}`;
44
44
  }
45
- function Q(t, e, a) {
45
+ function et(t, e, a) {
46
46
  const n = (r) => {
47
47
  const s = Math.round(Math.max(0, Math.min(255, r))).toString(16);
48
48
  return s.length === 1 ? "0" + s : s;
49
49
  };
50
50
  return `#${n(t)}${n(e)}${n(a)}`;
51
51
  }
52
- function H(t) {
53
- const e = At(t);
52
+ function z(t) {
53
+ const e = Bt(t);
54
54
  if (!e) return null;
55
55
  const a = /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
56
56
  return a ? {
@@ -59,16 +59,16 @@ function H(t) {
59
59
  b: parseInt(a[3], 16)
60
60
  } : null;
61
61
  }
62
- function oe(t, e) {
63
- const a = H(t), n = H(e);
62
+ function de(t, e) {
63
+ const a = z(t), n = z(e);
64
64
  if (!a || !n) return null;
65
- const r = (l, d, f) => {
66
- const [m, g, b] = [l, d, f].map((I) => (I = I / 255, I <= 0.03928 ? I / 12.92 : Math.pow((I + 0.055) / 1.055, 2.4)));
67
- return 0.2126 * m + 0.7152 * g + 0.0722 * b;
68
- }, s = r(a.r, a.g, a.b), o = r(n.r, n.g, n.b), i = Math.max(s, o), c = Math.min(s, o);
69
- return (i + 0.05) / (c + 0.05);
65
+ const r = (l, d, g) => {
66
+ const [m, h, b] = [l, d, g].map((M) => (M = M / 255, M <= 0.03928 ? M / 12.92 : Math.pow((M + 0.055) / 1.055, 2.4)));
67
+ return 0.2126 * m + 0.7152 * h + 0.0722 * b;
68
+ }, s = r(a.r, a.g, a.b), o = r(n.r, n.g, n.b), c = Math.max(s, o), i = Math.min(s, o);
69
+ return (c + 0.05) / (i + 0.05);
70
70
  }
71
- function St(t) {
71
+ function Dt(t) {
72
72
  if (!t) return [0, 0, 0, 1];
73
73
  const a = t.trim().match(
74
74
  /^#?([a-fA-F0-9]{3,4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$/
@@ -76,8 +76,8 @@ function St(t) {
76
76
  if (a) {
77
77
  const l = a[1];
78
78
  if (l.length === 8) {
79
- const d = parseInt(l.slice(0, 2), 16), f = parseInt(l.slice(2, 4), 16), m = parseInt(l.slice(4, 6), 16), g = parseInt(l.slice(6, 8), 16) / 255;
80
- return [d, f, m, g];
79
+ const d = parseInt(l.slice(0, 2), 16), g = parseInt(l.slice(2, 4), 16), m = parseInt(l.slice(4, 6), 16), h = parseInt(l.slice(6, 8), 16) / 255;
80
+ return [d, g, m, h];
81
81
  }
82
82
  if (l.length === 6)
83
83
  return [
@@ -87,12 +87,12 @@ function St(t) {
87
87
  1
88
88
  ];
89
89
  if (l.length === 4) {
90
- const d = parseInt(l[0] + l[0], 16), f = parseInt(l[1] + l[1], 16), m = parseInt(l[2] + l[2], 16), g = parseInt(l[3] + l[3], 16) / 255;
91
- return [d, f, m, g];
90
+ const d = parseInt(l[0] + l[0], 16), g = parseInt(l[1] + l[1], 16), m = parseInt(l[2] + l[2], 16), h = parseInt(l[3] + l[3], 16) / 255;
91
+ return [d, g, m, h];
92
92
  }
93
93
  if (l.length === 3) {
94
- const d = parseInt(l[0] + l[0], 16), f = parseInt(l[1] + l[1], 16), m = parseInt(l[2] + l[2], 16);
95
- return [d, f, m, 1];
94
+ const d = parseInt(l[0] + l[0], 16), g = parseInt(l[1] + l[1], 16), m = parseInt(l[2] + l[2], 16);
95
+ return [d, g, m, 1];
96
96
  }
97
97
  }
98
98
  const n = t.match(
@@ -114,130 +114,130 @@ function St(t) {
114
114
  /^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i
115
115
  );
116
116
  if (s) {
117
- const l = parseFloat(s[1]), d = parseFloat(s[2]), f = parseFloat(s[3]), m = s[4] != null ? parseFloat(s[4]) : 1, [g, b, I] = ct(l, d / 100, f / 100);
118
- return [g, b, I, m];
117
+ const l = parseFloat(s[1]), d = parseFloat(s[2]), g = parseFloat(s[3]), m = s[4] != null ? parseFloat(s[4]) : 1, [h, b, M] = ht(l, d / 100, g / 100);
118
+ return [h, b, M, m];
119
119
  }
120
120
  const o = t.match(
121
121
  /^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i
122
122
  );
123
123
  if (o) {
124
- const l = parseFloat(o[1]), d = parseFloat(o[2]) / 100, f = parseFloat(o[3]) / 100, m = o[4] != null ? parseFloat(o[4]) : 1, [g, b, I] = Nt(l, d, f);
125
- return [g, b, I, m];
124
+ const l = parseFloat(o[1]), d = parseFloat(o[2]) / 100, g = parseFloat(o[3]) / 100, m = o[4] != null ? parseFloat(o[4]) : 1, [h, b, M] = Lt(l, d, g);
125
+ return [h, b, M, m];
126
126
  }
127
- const i = t.match(
127
+ const c = t.match(
128
128
  /^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i
129
129
  );
130
- if (i) {
131
- const l = i[1], d = parseFloat(i[2]), f = parseFloat(i[3]), m = i[4] != null ? parseFloat(i[4]) : 1, g = l.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(l) / 100)) : Math.max(0, Math.min(1, parseFloat(l))), [b, I, x] = Bt(g, d, f);
132
- return [b, I, x, m];
130
+ if (c) {
131
+ const l = c[1], d = parseFloat(c[2]), g = parseFloat(c[3]), m = c[4] != null ? parseFloat(c[4]) : 1, h = l.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(l) / 100)) : Math.max(0, Math.min(1, parseFloat(l))), [b, M, $] = Pt(h, d, g);
132
+ return [b, M, $, m];
133
133
  }
134
- const c = H(t);
135
- return c ? [c.r, c.g, c.b, 1] : [0, 0, 0, 1];
134
+ const i = z(t);
135
+ return i ? [i.r, i.g, i.b, 1] : [0, 0, 0, 1];
136
136
  }
137
- function vt(t, e, a, n) {
137
+ function Vt(t, e, a, n) {
138
138
  return `rgba(${Math.round(t)}, ${Math.round(e)}, ${Math.round(a)}, ${Math.max(
139
139
  0,
140
140
  Math.min(1, Math.round(n * 100) / 100)
141
141
  )})`;
142
142
  }
143
- function Rt(t) {
143
+ function Et(t) {
144
144
  let e = t + 1831565813;
145
145
  return function() {
146
146
  return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
147
147
  };
148
148
  }
149
- function ct(t, e, a) {
149
+ function ht(t, e, a) {
150
150
  t = (t % 360 + 360) % 360;
151
151
  const n = (1 - Math.abs(2 * a - 1)) * e, r = n * (1 - Math.abs(t / 60 % 2 - 1)), s = a - n / 2;
152
- let o, i, c;
153
- return 0 <= t && t < 60 ? [o, i, c] = [n, r, 0] : 60 <= t && t < 120 ? [o, i, c] = [r, n, 0] : 120 <= t && t < 180 ? [o, i, c] = [0, n, r] : 180 <= t && t < 240 ? [o, i, c] = [0, r, n] : 240 <= t && t < 300 ? [o, i, c] = [r, 0, n] : [o, i, c] = [n, 0, r], [
152
+ let o, c, i;
153
+ return 0 <= t && t < 60 ? [o, c, i] = [n, r, 0] : 60 <= t && t < 120 ? [o, c, i] = [r, n, 0] : 120 <= t && t < 180 ? [o, c, i] = [0, n, r] : 180 <= t && t < 240 ? [o, c, i] = [0, r, n] : 240 <= t && t < 300 ? [o, c, i] = [r, 0, n] : [o, c, i] = [n, 0, r], [
154
154
  Math.round((o + s) * 255),
155
- Math.round((i + s) * 255),
156
- Math.round((c + s) * 255)
155
+ Math.round((c + s) * 255),
156
+ Math.round((i + s) * 255)
157
157
  ];
158
158
  }
159
- function Nt(t, e, a) {
159
+ function Lt(t, e, a) {
160
160
  t = (t % 360 + 360) % 360;
161
161
  const n = e + a;
162
162
  n > 1 && (e /= n, a /= n);
163
- const [r, s, o] = ct(t, 1, 0.5).map((f) => f / 255), i = 1 - e - a, c = r * i + e, l = s * i + e, d = o * i + e;
164
- return [Math.round(c * 255), Math.round(l * 255), Math.round(d * 255)];
163
+ const [r, s, o] = ht(t, 1, 0.5).map((g) => g / 255), c = 1 - e - a, i = r * c + e, l = s * c + e, d = o * c + e;
164
+ return [Math.round(i * 255), Math.round(l * 255), Math.round(d * 255)];
165
165
  }
166
- function J(t, e, a) {
166
+ function nt(t, e, a) {
167
167
  t /= 255, e /= 255, a /= 255;
168
168
  const n = Math.max(t, e, a), r = Math.min(t, e, a);
169
169
  let s = 0, o = 0;
170
- const i = (n + r) / 2, c = n - r;
171
- if (c !== 0) {
172
- switch (o = i > 0.5 ? c / (2 - n - r) : c / (n + r), n) {
170
+ const c = (n + r) / 2, i = n - r;
171
+ if (i !== 0) {
172
+ switch (o = c > 0.5 ? i / (2 - n - r) : i / (n + r), n) {
173
173
  case t:
174
- s = (e - a) / c + (e < a ? 6 : 0);
174
+ s = (e - a) / i + (e < a ? 6 : 0);
175
175
  break;
176
176
  case e:
177
- s = (a - t) / c + 2;
177
+ s = (a - t) / i + 2;
178
178
  break;
179
179
  default:
180
- s = (t - e) / c + 4;
180
+ s = (t - e) / i + 4;
181
181
  }
182
182
  s *= 60;
183
183
  }
184
- return [Math.round(s), Math.round(o * 100), Math.round(i * 100)];
184
+ return [Math.round(s), Math.round(o * 100), Math.round(c * 100)];
185
185
  }
186
- function Dt(t, e, a) {
187
- const [n] = J(t, e, a), r = t / 255, s = e / 255, o = a / 255, i = Math.min(r, s, o), c = 1 - Math.max(r, s, o);
188
- return [n, Math.round(i * 100), Math.round(c * 100)];
186
+ function Ot(t, e, a) {
187
+ const [n] = nt(t, e, a), r = t / 255, s = e / 255, o = a / 255, c = Math.min(r, s, o), i = 1 - Math.max(r, s, o);
188
+ return [n, Math.round(c * 100), Math.round(i * 100)];
189
189
  }
190
- function G(t) {
190
+ function J(t) {
191
191
  const e = t / 255;
192
192
  return e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
193
193
  }
194
- function K(t) {
194
+ function Z(t) {
195
195
  const e = t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 0.4166666666666667) - 0.055;
196
196
  return Math.round(Math.max(0, Math.min(1, e)) * 255);
197
197
  }
198
- function Bt(t, e, a) {
199
- const n = a * Math.PI / 180, r = Math.cos(n) * e, s = Math.sin(n) * e, o = t + 0.3963377774 * r + 0.2158037573 * s, i = t - 0.1055613458 * r - 0.0638541728 * s, c = t - 0.0894841775 * r - 1.291485548 * s, l = o * o * o, d = i * i * i, f = c * c * c, m = 4.0767416621 * l - 3.3077115913 * d + 0.2309699292 * f, g = -1.2684380046 * l + 2.6097574011 * d - 0.3413193965 * f, b = -0.0041960863 * l - 0.7034186147 * d + 1.707614701 * f;
200
- return [K(m), K(g), K(b)];
198
+ function Pt(t, e, a) {
199
+ const n = a * Math.PI / 180, r = Math.cos(n) * e, s = Math.sin(n) * e, o = t + 0.3963377774 * r + 0.2158037573 * s, c = t - 0.1055613458 * r - 0.0638541728 * s, i = t - 0.0894841775 * r - 1.291485548 * s, l = o * o * o, d = c * c * c, g = i * i * i, m = 4.0767416621 * l - 3.3077115913 * d + 0.2309699292 * g, h = -1.2684380046 * l + 2.6097574011 * d - 0.3413193965 * g, b = -0.0041960863 * l - 0.7034186147 * d + 1.707614701 * g;
200
+ return [Z(m), Z(h), Z(b)];
201
201
  }
202
- function Vt(t, e, a) {
203
- const n = G(t), r = G(e), s = G(a), o = 0.4122214708 * n + 0.5363325363 * r + 0.0514459929 * s, i = 0.2119034982 * n + 0.6806995451 * r + 0.1073969566 * s, c = 0.0883024619 * n + 0.2817188376 * r + 0.6299787005 * s, l = Math.cbrt(o), d = Math.cbrt(i), f = Math.cbrt(c), m = 0.2104542553 * l + 0.793617785 * d - 0.0040720468 * f, g = 1.9779984951 * l - 2.428592205 * d + 0.4505937099 * f, b = 0.0259040371 * l + 0.7827717662 * d - 0.808675766 * f, I = Math.sqrt(g * g + b * b);
204
- let x = Math.atan2(b, g) * 180 / Math.PI;
205
- return x < 0 && (x += 360), [m, I, x];
202
+ function Ut(t, e, a) {
203
+ const n = J(t), r = J(e), s = J(a), o = 0.4122214708 * n + 0.5363325363 * r + 0.0514459929 * s, c = 0.2119034982 * n + 0.6806995451 * r + 0.1073969566 * s, i = 0.0883024619 * n + 0.2817188376 * r + 0.6299787005 * s, l = Math.cbrt(o), d = Math.cbrt(c), g = Math.cbrt(i), m = 0.2104542553 * l + 0.793617785 * d - 0.0040720468 * g, h = 1.9779984951 * l - 2.428592205 * d + 0.4505937099 * g, b = 0.0259040371 * l + 0.7827717662 * d - 0.808675766 * g, M = Math.sqrt(h * h + b * b);
204
+ let $ = Math.atan2(b, h) * 180 / Math.PI;
205
+ return $ < 0 && ($ += 360), [m, M, $];
206
206
  }
207
- function P(t, e, a, n, r, s) {
207
+ function U(t, e, a, n, r, s) {
208
208
  switch (r) {
209
209
  case "hex":
210
210
  if (s) {
211
- const o = (c) => c.toString(16).padStart(2, "0"), i = Math.max(0, Math.min(255, Math.round(n * 255)));
212
- return `#${o(t)}${o(e)}${o(a)}${o(i)}`;
211
+ const o = (i) => i.toString(16).padStart(2, "0"), c = Math.max(0, Math.min(255, Math.round(n * 255)));
212
+ return `#${o(t)}${o(e)}${o(a)}${o(c)}`;
213
213
  }
214
- return Q(t, e, a);
214
+ return et(t, e, a);
215
215
  case "rgb":
216
216
  return `rgb(${t}, ${e}, ${a})`;
217
217
  case "rgba":
218
218
  return `rgba(${t}, ${e}, ${a}, ${Math.round(n * 100) / 100})`;
219
219
  case "hsl": {
220
- const [o, i, c] = J(t, e, a);
221
- return `hsl(${o}, ${i}%, ${c}%)`;
220
+ const [o, c, i] = nt(t, e, a);
221
+ return `hsl(${o}, ${c}%, ${i}%)`;
222
222
  }
223
223
  case "hsla": {
224
- const [o, i, c] = J(t, e, a);
225
- return `hsla(${o}, ${i}%, ${c}%, ${Math.round(n * 100) / 100})`;
224
+ const [o, c, i] = nt(t, e, a);
225
+ return `hsla(${o}, ${c}%, ${i}%, ${Math.round(n * 100) / 100})`;
226
226
  }
227
227
  case "hwb": {
228
- const [o, i, c] = Dt(t, e, a);
229
- return n < 1 ? `hwb(${o} ${i}% ${c}% / ${Math.round(n * 100) / 100})` : `hwb(${o} ${i}% ${c}%)`;
228
+ const [o, c, i] = Ot(t, e, a);
229
+ return n < 1 ? `hwb(${o} ${c}% ${i}% / ${Math.round(n * 100) / 100})` : `hwb(${o} ${c}% ${i}%)`;
230
230
  }
231
231
  case "oklch": {
232
- const [o, i, c] = Vt(t, e, a), l = (Math.round(o * 1e3) / 1e3).toFixed(3), d = (Math.round(i * 1e3) / 1e3).toFixed(3), f = (Math.round(c * 10) / 10).toFixed(1), m = Math.round(n * 100) / 100;
233
- return s || n < 1 ? `oklch(${l} ${d} ${f} / ${m})` : `oklch(${l} ${d} ${f})`;
232
+ const [o, c, i] = Ut(t, e, a), l = (Math.round(o * 1e3) / 1e3).toFixed(3), d = (Math.round(c * 1e3) / 1e3).toFixed(3), g = (Math.round(i * 10) / 10).toFixed(1), m = Math.round(n * 100) / 100;
233
+ return s || n < 1 ? `oklch(${l} ${d} ${g} / ${m})` : `oklch(${l} ${d} ${g})`;
234
234
  }
235
235
  }
236
236
  }
237
- function O(t, e) {
237
+ function W(t, e) {
238
238
  return e ? t === "rgb" ? "rgba" : t === "hsl" ? "hsla" : t : t === "rgba" ? "rgb" : t === "hsla" ? "hsl" : t;
239
239
  }
240
- async function Et(t) {
240
+ async function Wt(t) {
241
241
  return new Promise((e, a) => {
242
242
  const n = new FileReader();
243
243
  n.readAsDataURL(t), n.onload = () => {
@@ -246,10 +246,10 @@ async function Et(t) {
246
246
  }, n.onerror = (r) => a(r);
247
247
  });
248
248
  }
249
- function Ut(t) {
250
- return Promise.all(t.map(Et));
249
+ function Ht(t) {
250
+ return Promise.all(t.map(Wt));
251
251
  }
252
- function Lt(t) {
252
+ function zt(t) {
253
253
  if (t.length >= 4) {
254
254
  if (t[0] === 137 && t[1] === 80 && t[2] === 78 && t[3] === 71)
255
255
  return "image/png";
@@ -265,45 +265,45 @@ function Lt(t) {
265
265
  }
266
266
  return "application/octet-stream";
267
267
  }
268
- function Pt(t) {
269
- const e = bt(t ?? ""), a = e.length, n = new Uint8Array(a);
268
+ function jt(t) {
269
+ const e = $t(t ?? ""), a = e.length, n = new Uint8Array(a);
270
270
  for (let r = 0; r < a; r++) n[r] = e.charCodeAt(r);
271
271
  return n;
272
272
  }
273
- function Ot(t) {
273
+ function Xt(t) {
274
274
  const {
275
275
  value: e,
276
276
  onChange: a,
277
277
  onInput: n,
278
278
  ...r
279
- } = t, s = /* @__PURE__ */ new Map(), o = p.toSignal(e).map((d) => d.map((f, m) => {
280
- const g = s.get(f), b = Pt(f ?? ""), I = g?.type || Lt(b), x = g?.name ?? `file-${m}`, y = b.buffer.slice(
279
+ } = t, s = /* @__PURE__ */ new Map(), o = p.toSignal(e).map((d) => d.map((g, m) => {
280
+ const h = s.get(g), b = jt(g ?? ""), M = h?.type || zt(b), $ = h?.name ?? `file-${m}`, y = b.buffer.slice(
281
281
  b.byteOffset,
282
282
  b.byteOffset + b.byteLength
283
- ), F = new Blob([y], { type: I });
284
- return new File([F], x, { type: I });
285
- })), i = (d) => (f) => {
286
- d && Ut(f).then((m) => {
287
- for (const [g, b] of m.entries())
288
- s.set(b, { name: f[g].name, type: f[g].type });
283
+ ), F = new Blob([y], { type: M });
284
+ return new File([F], $, { type: M });
285
+ })), c = (d) => (g) => {
286
+ d && Ht(g).then((m) => {
287
+ for (const [h, b] of m.entries())
288
+ s.set(b, { name: g[h].name, type: g[h].type });
289
289
  d(m);
290
290
  });
291
- }, c = i(a), l = i(n);
292
- return ht({
291
+ }, i = c(a), l = c(n);
292
+ return wt({
293
293
  ...r,
294
294
  value: o,
295
- onChange: c,
295
+ onChange: i,
296
296
  onInput: l
297
297
  });
298
298
  }
299
- function ie(t) {
299
+ function he(t) {
300
300
  const {
301
301
  value: e,
302
302
  onInput: a,
303
303
  onChange: n,
304
304
  ...r
305
305
  } = t;
306
- return Ot({
306
+ return Xt({
307
307
  ...r,
308
308
  maxFiles: 1,
309
309
  value: p.map(e, (s) => s == null ? [] : [s]),
@@ -315,250 +315,263 @@ function ie(t) {
315
315
  }
316
316
  });
317
317
  }
318
- function Wt(t, e) {
319
- const [a, n, r] = t, s = a << 16 ^ n << 8 ^ r, o = Rt(s), i = 6 + Math.floor(o() * 5), c = 0.18 + o() * 0.06, l = [];
320
- for (let g = 0; g < i; g++) {
321
- const b = g / i * Math.PI * 2, I = e * (1 + (o() * 2 - 1) * c), x = Math.cos(b) * I, y = Math.sin(b) * I;
322
- l.push({ x, y });
318
+ function Yt(t, e) {
319
+ const [a, n, r] = t, s = a << 16 ^ n << 8 ^ r, o = Et(s), c = 6 + Math.floor(o() * 5), i = 0.18 + o() * 0.06, l = [];
320
+ for (let h = 0; h < c; h++) {
321
+ const b = h / c * Math.PI * 2, M = e * (1 + (o() * 2 - 1) * i), $ = Math.cos(b) * M, y = Math.sin(b) * M;
322
+ l.push({ x: $, y });
323
323
  }
324
- const d = (l[0].x + l[i - 1].x) / 2, f = (l[0].y + l[i - 1].y) / 2;
325
- let m = `M ${d.toFixed(3)} ${f.toFixed(3)}`;
326
- for (let g = 0; g < i; g++) {
327
- const b = l[g], I = l[(g + 1) % i], x = (b.x + I.x) / 2, y = (b.y + I.y) / 2;
328
- m += ` Q ${b.x.toFixed(3)} ${b.y.toFixed(3)} ${x.toFixed(3)} ${y.toFixed(3)}`;
324
+ const d = (l[0].x + l[c - 1].x) / 2, g = (l[0].y + l[c - 1].y) / 2;
325
+ let m = `M ${d.toFixed(3)} ${g.toFixed(3)}`;
326
+ for (let h = 0; h < c; h++) {
327
+ const b = l[h], M = l[(h + 1) % c], $ = (b.x + M.x) / 2, y = (b.y + M.y) / 2;
328
+ m += ` Q ${b.x.toFixed(3)} ${b.y.toFixed(3)} ${$.toFixed(3)} ${y.toFixed(3)}`;
329
329
  }
330
330
  return m += " Z", m;
331
331
  }
332
- const ce = (t) => {
333
- const { value: e, onBlur: a, onChange: n, onInput: r, displayValue: s, size: o, withAlpha: i } = t, c = p.map(o ?? 32, (h) => h), l = p.map(e, (h) => St(h ?? "#000000")), d = p.map(
332
+ const ge = (t) => {
333
+ const {
334
+ value: e,
335
+ onBlur: a,
336
+ onChange: n,
337
+ onInput: r,
338
+ displayValue: s,
339
+ swatchSize: o,
340
+ withAlpha: c
341
+ } = t, i = p.map(o ?? 32, (f) => f), l = p.map(e, (f) => Dt(f ?? "#000000")), d = p.map(
334
342
  l,
335
- ([h, $, k]) => [h, $, k]
336
- ), f = p.map(l, ([, , , h]) => h), m = rt(p.get(f) ?? 1), g = p.map(i ?? !1, (h) => h), b = p.map(
343
+ ([f, x, C]) => [f, x, C]
344
+ ), g = p.map(l, ([, , , f]) => f), m = lt(p.get(g) ?? 1), h = p.map(c ?? !1, (f) => f), b = p.map(
337
345
  t.colorTextFormat ?? "rgb",
338
- (h) => h
339
- ), I = D(
346
+ (f) => f
347
+ ), M = D(
340
348
  d,
341
349
  m,
342
350
  b,
343
- g
351
+ h
344
352
  )(
345
- ([h, $, k], T, v, R) => P(h, $, k, T ?? 1, O(v, R), R)
346
- ), x = p.map(
353
+ ([f, x, C], v, N, R) => U(f, x, C, v ?? 1, W(N, R), R)
354
+ ), $ = p.map(
347
355
  t.colorTextFormat ?? "hex",
348
- (h) => h
349
- ), y = p.map(c, (h) => `${-h / 2} ${-h / 2} ${h} ${h}`), F = D(
356
+ (f) => f
357
+ ), y = p.map(i, (f) => `${-f / 2} ${-f / 2} ${f} ${f}`), F = D(
350
358
  d,
351
- c
352
- )((h, $) => Wt(h, $ / 2)), w = D(
359
+ i
360
+ )((f, x) => Yt(f, x / 2)), w = D(
353
361
  d,
354
362
  m,
355
- g
363
+ h
356
364
  )(
357
- ([h, $, k], T, v) => v || T < 1 ? vt(h, $, k, T) : Q(h, $, k)
358
- ), S = _.div(
365
+ ([f, x, C], v, N) => N || v < 1 ? Vt(f, x, C, v) : et(f, x, C)
366
+ ), A = _.div(
359
367
  u.class("bc-color-swatch-input__control"),
360
368
  u.class(
361
369
  p.map(
362
- g,
363
- (h) => h ? "bc-color-swatch-input__control--alpha" : ""
370
+ h,
371
+ (f) => f ? "bc-color-swatch-input__control--alpha" : ""
364
372
  )
365
373
  ),
366
374
  u.style(
367
- D(c)((h) => `min-width:${h + 2}px;height:${h + 2}px`)
375
+ D(i)((f) => `min-width:${f + 2}px;height:${f + 2}px`)
368
376
  ),
369
377
  // The SVG blob preview
370
- tt.svg(
378
+ rt.svg(
371
379
  u.class("bc-color-swatch-input__svg"),
372
- Y.viewBox(y),
373
- tt.path(Y.d(F), Y.fill(w))
380
+ Q.viewBox(y),
381
+ rt.path(Q.d(F), Q.fill(w))
374
382
  ),
375
383
  // Invisible native input overlays the blob for picker and accessibility
376
384
  _.input(
377
385
  u.type("color"),
378
- U(t),
386
+ O(t),
379
387
  // Native color input needs hex without alpha
380
- u.value(p.map(d, ([h, $, k]) => Q(h, $, k))),
388
+ u.value(p.map(d, ([f, x, C]) => et(f, x, C))),
381
389
  u.class(
382
390
  "bc-input bc-color-swatch-input bc-color-swatch-input__native"
383
391
  ),
384
- a != null ? M.blur(a) : A,
385
- n != null ? M.change((h) => {
386
- const $ = h.target.value;
392
+ a != null ? I.blur(a) : S,
393
+ n != null ? I.change((f) => {
394
+ const x = f.target.value;
387
395
  if (!n) return;
388
- const { r: k, g: T, b: v } = H($) ?? { r: 0, g: 0, b: 0 }, R = p.get(m) ?? 1, B = O(
389
- p.get(x),
390
- p.get(g)
391
- ), X = P(k, T, v, R, B, p.get(g));
392
- n(X);
393
- }) : A,
394
- r != null ? M.input((h) => {
395
- const $ = h.target.value;
396
+ const { r: C, g: v, b: N } = z(x) ?? { r: 0, g: 0, b: 0 }, R = p.get(m) ?? 1, V = W(
397
+ p.get($),
398
+ p.get(h)
399
+ ), q = U(C, v, N, R, V, p.get(h));
400
+ n(q);
401
+ }) : S,
402
+ r != null ? I.input((f) => {
403
+ const x = f.target.value;
396
404
  if (!r) return;
397
- const { r: k, g: T, b: v } = H($) ?? { r: 0, g: 0, b: 0 }, R = p.get(m) ?? 1, B = O(
398
- p.get(x),
399
- p.get(g)
400
- ), X = P(k, T, v, R, B, p.get(g));
401
- r(X);
402
- }) : A
405
+ const { r: C, g: v, b: N } = z(x) ?? { r: 0, g: 0, b: 0 }, R = p.get(m) ?? 1, V = W(
406
+ p.get($),
407
+ p.get(h)
408
+ ), q = U(C, v, N, R, V, p.get(h));
409
+ r(q);
410
+ }) : S
403
411
  )
404
- ), C = W(
405
- g,
412
+ ), T = H(
413
+ h,
406
414
  () => _.input(
407
415
  u.type("range"),
408
416
  u.class("bc-color-swatch-input__alpha"),
409
417
  u.min(0),
410
418
  u.max(1),
411
419
  u.step(0.01),
412
- u.value(p.map(m, (h) => String(h ?? 1))),
420
+ u.value(p.map(m, (f) => String(f ?? 1))),
413
421
  u.disabled(t.disabled),
414
- M.input((h) => {
415
- const $ = parseFloat(h.target.value);
416
- m.set($);
417
- const [k, T, v] = p.get(d), R = O(
418
- p.get(x),
419
- p.get(g)
420
- ), B = P(k, T, v, $, R, p.get(g));
421
- r?.(B);
422
+ I.input((f) => {
423
+ const x = parseFloat(f.target.value);
424
+ m.set(x);
425
+ const [C, v, N] = p.get(d), R = W(
426
+ p.get($),
427
+ p.get(h)
428
+ ), V = U(C, v, N, x, R, p.get(h));
429
+ r?.(V);
422
430
  }),
423
- M.change((h) => {
424
- const $ = parseFloat(h.target.value);
425
- m.set($);
426
- const [k, T, v] = p.get(d), R = O(
427
- p.get(x),
428
- p.get(g)
429
- ), B = P(k, T, v, $, R, p.get(g));
430
- n?.(B);
431
+ I.change((f) => {
432
+ const x = parseFloat(f.target.value);
433
+ m.set(x);
434
+ const [C, v, N] = p.get(d), R = W(
435
+ p.get($),
436
+ p.get(h)
437
+ ), V = U(C, v, N, x, R, p.get(h));
438
+ n?.(V);
431
439
  })
432
440
  )
433
- );
434
- return E({
441
+ ), {
442
+ swatchSize: k,
443
+ displayValue: Y,
444
+ withAlpha: at,
445
+ colorTextFormat: G,
446
+ ...K
447
+ } = t;
448
+ return L({
435
449
  baseContainer: !0,
436
- ...t,
450
+ ...K,
437
451
  // ensure our control does not try to grow
438
452
  growInput: !1,
439
- input: S,
453
+ input: A,
440
454
  // If caller provided an `after`, append RGB before it
441
455
  after: j(
442
- W(
456
+ H(
443
457
  s ?? !1,
444
- () => _.span(u.class("bc-color-swatch-input__rgb"), I)
458
+ () => _.span(u.class("bc-color-swatch-input__rgb"), M)
445
459
  ),
446
- C,
460
+ T,
447
461
  t.after
448
462
  )
449
463
  });
450
- }, at = (t) => typeof t == "string" && t.trim() === "" ? null : t, Ht = (t) => t ?? "";
451
- function L(t) {
464
+ }, Gt = (t) => typeof t == "string" && t.trim() === "" ? null : t, Kt = (t) => t ?? "";
465
+ function P(t) {
452
466
  return (e) => {
453
- const { value: a, onBlur: n, onChange: r, onInput: s, after: o, disabled: i, ...c } = e, l = z(a, i, r ?? s);
467
+ const { after: a, disabled: n } = e, r = pt(e, Kt, Gt), s = X(
468
+ e.value,
469
+ n,
470
+ e.onChange ?? e.onInput
471
+ );
454
472
  return t({
455
- ...c,
456
- disabled: i,
457
- value: p.map(a, Ht),
458
- onChange: r != null ? (d) => r(at(d)) : void 0,
459
- onInput: s != null ? (d) => s(at(d)) : void 0,
460
- onBlur: n,
461
- after: o != null ? j(l, o) : l
473
+ ...r,
474
+ after: a != null ? j(s, a) : s
462
475
  });
463
476
  };
464
477
  }
465
- const le = ({
478
+ const fe = ({
466
479
  startEditing: t,
467
480
  value: e,
468
481
  onChange: a,
469
482
  placeholder: n,
470
483
  disabled: r
471
484
  }) => {
472
- const s = p.deriveProp(t ?? !1), o = rt(!1), i = p.map(r ?? !1, (c) => c);
485
+ const s = p.deriveProp(t ?? !1), o = lt(!1), c = p.map(r ?? !1, (i) => i);
473
486
  return _.div(
474
487
  u.class("bc-editable-text"),
475
488
  u.class(
476
489
  p.map(
477
- i,
478
- (c) => c ? "bc-editable-text--disabled" : ""
490
+ c,
491
+ (i) => i ? "bc-editable-text--disabled" : ""
479
492
  )
480
493
  ),
481
- N.disabled(i),
482
- W(
494
+ B.disabled(c),
495
+ H(
483
496
  s,
484
497
  () => _.input(
485
498
  u.placeholder(n),
486
499
  u.value(e),
487
500
  u.class("bc-editable-text__input"),
488
- Mt(),
489
- M.keydown((c) => {
490
- c.key === "Enter" ? s.set(!1) : c.key === "Escape" && (o.set(!0), s.set(!1));
501
+ Ft(),
502
+ I.keydown((i) => {
503
+ i.key === "Enter" ? s.set(!1) : i.key === "Escape" && (o.set(!0), s.set(!1));
491
504
  }),
492
- M.blur(
493
- Z((c) => {
505
+ I.blur(
506
+ st((i) => {
494
507
  if (s.set(!1), o.value) {
495
508
  o.set(!1);
496
509
  return;
497
510
  }
498
- a(c);
511
+ a(i);
499
512
  })
500
513
  )
501
514
  ),
502
515
  () => _.span(
503
- M.click(() => {
504
- p.get(i) || s.set(!0);
516
+ I.click(() => {
517
+ p.get(c) || s.set(!0);
505
518
  }),
506
519
  u.class("bc-editable-text__display"),
507
- W(
508
- p.map(e, (c) => c != null && c.trim() !== ""),
520
+ H(
521
+ p.map(e, (i) => i != null && i.trim() !== ""),
509
522
  () => _.span(u.class("bc-editable-text__text"), e),
510
523
  () => _.span(
511
524
  u.class("bc-editable-text__placeholder"),
512
525
  n
513
526
  )
514
527
  ),
515
- W(
516
- p.map(i, (c) => !c),
528
+ H(
529
+ p.map(c, (i) => !i),
517
530
  () => _.button(
518
531
  u.type("button"),
519
532
  u.class("bc-editable-text__edit-button"),
520
- lt(yt, (c) => N.label(c.$.editLabel)),
521
- M.click(() => s.set(!0)),
522
- q({ icon: "line-md/pencil", color: "neutral" })
533
+ gt(_t, (i) => B.label(i.$.editLabel)),
534
+ I.click(() => s.set(!0)),
535
+ tt({ icon: "line-md/pencil", color: "neutral" })
523
536
  )
524
537
  )
525
538
  )
526
539
  )
527
540
  );
528
- }, ue = (t) => {
529
- const { value: e, onBlur: a, onChange: n, onInput: r, after: s, disabled: o } = t, i = z(e, o, n ?? r);
530
- return E({
541
+ }, me = (t) => {
542
+ const { value: e, onBlur: a, onChange: n, onInput: r, after: s, disabled: o } = t, c = X(e, o, n ?? r);
543
+ return L({
531
544
  ...t,
532
- input: ot.date(
533
- U(t),
545
+ input: ut.date(
546
+ O(t),
534
547
  u.valueAsDate(e),
535
548
  u.class("bc-input"),
536
- a != null ? M.blur(Z(a)) : A,
537
- n != null ? M.change(et(n)) : A,
538
- r != null ? M.input(et(r)) : A
549
+ a != null ? I.blur(st(a)) : S,
550
+ n != null ? I.change(ot(n)) : S,
551
+ r != null ? I.input(ot(r)) : S
539
552
  ),
540
- after: s != null ? j(i, s) : i
553
+ after: s != null ? j(c, s) : c
541
554
  });
542
- }, jt = (t) => {
555
+ }, qt = (t) => {
543
556
  const e = t.getFullYear(), a = t.getMonth() + 1, n = t.getDate(), r = t.getHours(), s = t.getMinutes(), o = t.getSeconds();
544
557
  return `${e}-${a.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${r.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}`;
545
- }, pe = (t) => {
546
- const { value: e, onBlur: a, onChange: n, onInput: r, after: s, disabled: o } = t, i = p.map(e, (l) => l != null ? jt(l) : null), c = z(e, o, n ?? r);
547
- return E({
558
+ }, be = (t) => {
559
+ const { value: e, onBlur: a, onChange: n, onInput: r, after: s, disabled: o } = t, c = p.map(e, (l) => l != null ? qt(l) : null), i = X(e, o, n ?? r);
560
+ return L({
548
561
  ...t,
549
- input: ot["datetime-local"](
550
- U(t),
551
- u.value(p.map(i, (l) => l ?? null)),
562
+ input: ut["datetime-local"](
563
+ O(t),
564
+ u.value(p.map(c, (l) => l ?? null)),
552
565
  u.class("bc-input"),
553
- a != null ? M.blur(Z(a)) : A,
554
- n != null ? M.change(nt(n)) : A,
555
- r != null ? M.input(nt(r)) : A
566
+ a != null ? I.blur(st(a)) : S,
567
+ n != null ? I.change(ct(n)) : S,
568
+ r != null ? I.input(ct(r)) : S
556
569
  ),
557
- after: s != null ? j(c, s) : c
570
+ after: s != null ? j(i, s) : i
558
571
  });
559
- }, de = L($t), he = L(wt), ge = L(xt), fe = L(
560
- gt
561
- ), me = ({
572
+ }, we = P(Ct), ye = P(xt), Me = P(Tt), Ie = P(
573
+ yt
574
+ ), $e = ({
562
575
  value: t,
563
576
  onChange: e,
564
577
  onInput: a,
@@ -566,40 +579,40 @@ const le = ({
566
579
  offLabel: r,
567
580
  onLabel: s,
568
581
  disabled: o = !1,
569
- size: i = "md",
570
- id: c,
582
+ size: c = "md",
583
+ id: i,
571
584
  color: l = "primary",
572
585
  tabIndex: d = 0,
573
- matchInputHeight: f = !0
586
+ matchInputHeight: g = !0
574
587
  }) => {
575
- const m = c ?? _t("switch");
576
- function g(y, F) {
588
+ const m = i ?? St("switch");
589
+ function h(y, F) {
577
590
  const w = [
578
591
  "bc-switch",
579
592
  `bc-switch--size-${F}`,
580
593
  `bc-switch--${F}`
581
594
  ];
582
- return f && w.push("bc-switch--match-input"), y && w.push("bc-switch--disabled"), w.join(" ");
595
+ return g && w.push("bc-switch--match-input"), y && w.push("bc-switch--disabled"), w.join(" ");
583
596
  }
584
597
  function b(y) {
585
- const F = y ?? "primary", w = /* @__PURE__ */ new Map(), S = st(F, "solid", "light"), C = st(F, "solid", "dark");
586
- return w.set("--switch-track-on-bg", S.backgroundColor), w.set("--switch-track-on-label", S.textColor), w.set("--switch-track-on-bg-dark", C.backgroundColor), w.set("--switch-track-on-label-dark", C.textColor), w.set(
598
+ const F = y ?? "primary", w = /* @__PURE__ */ new Map(), A = it(F, "solid", "light"), T = it(F, "solid", "dark");
599
+ return w.set("--switch-track-on-bg", A.backgroundColor), w.set("--switch-track-on-label", A.textColor), w.set("--switch-track-on-bg-dark", T.backgroundColor), w.set("--switch-track-on-label-dark", T.textColor), w.set(
587
600
  "--switch-track-on-border-dark",
588
- It(F, "dark")
589
- ), Array.from(w.entries()).map(([h, $]) => `${h}: ${$}`).join("; ");
601
+ kt(F, "dark")
602
+ ), Array.from(w.entries()).map(([k, Y]) => `${k}: ${Y}`).join("; ");
590
603
  }
591
- const I = () => {
604
+ const M = () => {
592
605
  p.get(o) || (e?.(!p.get(t)), a?.(!p.get(t)));
593
- }, x = (y) => {
594
- p.get(o) || (y.key === " " || y.key === "Enter") && (y.preventDefault(), I());
606
+ }, $ = (y) => {
607
+ p.get(o) || (y.key === " " || y.key === "Enter") && (y.preventDefault(), M());
595
608
  };
596
609
  return _.div(
597
610
  u.class(
598
611
  D(
599
612
  o ?? !1,
600
- i
613
+ c
601
614
  )(
602
- (y, F) => g(y ?? !1, F ?? "md")
615
+ (y, F) => h(y ?? !1, F ?? "md")
603
616
  )
604
617
  ),
605
618
  u.style(
@@ -615,11 +628,11 @@ const le = ({
615
628
  d
616
629
  )((y, F) => y ? -1 : F ?? 0)
617
630
  ),
618
- N.checked(t),
619
- N.disabled(o),
620
- M.click(I),
621
- M.keydown(x),
622
- n != null ? M.blur(n) : null,
631
+ B.checked(t),
632
+ B.disabled(o),
633
+ I.click(M),
634
+ I.keydown($),
635
+ n != null ? I.blur(n) : null,
623
636
  _.div(
624
637
  u.class("bc-switch__track"),
625
638
  u.class(
@@ -629,7 +642,7 @@ const le = ({
629
642
  )
630
643
  ),
631
644
  r != null ? _.div(
632
- N.hidden(!0),
645
+ B.hidden(!0),
633
646
  u.class("bc-switch__track-label bc-switch__track-label--off"),
634
647
  u.class(
635
648
  p.map(
@@ -660,7 +673,7 @@ const le = ({
660
673
  )
661
674
  )
662
675
  );
663
- }, be = L(ft), zt = "line-md:star-alt-filled", Xt = "line-md:star-alt", Yt = (t) => {
676
+ }, xe = P(Mt), Qt = "line-md:star-alt-filled", Jt = "line-md:star-alt", Zt = (t) => {
664
677
  const {
665
678
  value: e,
666
679
  onChange: a,
@@ -668,50 +681,50 @@ const le = ({
668
681
  disabled: r,
669
682
  max: s = 5,
670
683
  fullColor: o = "yellow",
671
- emptyColor: i = "neutral",
672
- fullIcon: c = zt,
673
- emptyIcon: l = Xt,
684
+ emptyColor: c = "neutral",
685
+ activeIcon: i = Qt,
686
+ inactiveIcon: l = Jt,
674
687
  size: d = "md",
675
- onBlur: f,
688
+ onBlur: g,
676
689
  rounding: m = 1
677
- } = t, g = () => {
690
+ } = t, h = () => {
678
691
  const w = p.get(m);
679
692
  return w > 0 ? w : 1;
680
- }, b = (w) => Math.min(Math.max(w, 0), p.get(s)), I = (w, S) => {
693
+ }, b = (w) => Math.min(Math.max(w, 0), p.get(s)), M = (w, A) => {
681
694
  if (p.get(r ?? !1)) return;
682
- const h = w.currentTarget.getBoundingClientRect(), $ = (w.clientX - h.left) / h.width, k = S - 1 + $, T = g(), v = Math.ceil(k / T) * T, R = b(v);
683
- a?.(R), n?.(R);
684
- }, x = (w) => {
695
+ const k = w.currentTarget.getBoundingClientRect(), Y = (w.clientX - k.left) / k.width, at = A - 1 + Y, G = h(), K = Math.ceil(at / G) * G, f = b(K);
696
+ a?.(f), n?.(f);
697
+ }, $ = (w) => {
685
698
  if (p.get(r ?? !1)) return;
686
- const S = g(), C = p.get(e) ?? 0;
687
- let h;
699
+ const A = h(), T = p.get(e) ?? 0;
700
+ let k;
688
701
  switch (w.key) {
689
702
  case "ArrowRight":
690
703
  case "ArrowUp":
691
- h = b(C + S);
704
+ k = b(T + A);
692
705
  break;
693
706
  case "ArrowLeft":
694
707
  case "ArrowDown":
695
- h = b(C - S);
708
+ k = b(T - A);
696
709
  break;
697
710
  case "Home":
698
- h = 0;
711
+ k = 0;
699
712
  break;
700
713
  case "End":
701
- h = p.get(s);
714
+ k = p.get(s);
702
715
  break;
703
716
  default:
704
717
  return;
705
718
  }
706
- w.preventDefault(), a?.(h), n?.(h);
707
- }, y = p.map(d, (w) => `bc-icon--${w}`), F = ({ index: w, counter: S }) => _.span(
719
+ w.preventDefault(), a?.(k), n?.(k);
720
+ }, y = p.map(d, (w) => `bc-icon--${w}`), F = ({ index: w, counter: A }) => _.span(
708
721
  u.class("bc-rating-input__icon-container"),
709
722
  u.class(y),
710
- q(
723
+ tt(
711
724
  {
712
725
  icon: l,
713
726
  size: d,
714
- color: i,
727
+ color: c,
715
728
  tone: "soft"
716
729
  },
717
730
  u.class("bc-rating-input__icon-empty")
@@ -719,15 +732,15 @@ const le = ({
719
732
  _.span(
720
733
  u.class("bc-rating-input__icon-clipper"),
721
734
  u.class(y),
722
- pt.width(
723
- p.map(e, (C) => {
724
- const h = Math.floor(C);
725
- return h > w ? "100%" : h < w ? "0%" : `${(C - w) * 100}%`;
735
+ mt.width(
736
+ p.map(e, (T) => {
737
+ const k = Math.floor(T);
738
+ return k > w ? "100%" : k < w ? "0%" : `${(T - w) * 100}%`;
726
739
  })
727
740
  ),
728
- q(
741
+ tt(
729
742
  {
730
- icon: c,
743
+ icon: i,
731
744
  size: d,
732
745
  color: o,
733
746
  tone: "soft"
@@ -735,113 +748,115 @@ const le = ({
735
748
  u.class("bc-rating-input__icon-full")
736
749
  )
737
750
  ),
738
- M.click(
739
- dt((C) => I(C, S), {
751
+ I.click(
752
+ bt((T) => M(T, A), {
740
753
  preventDefault: !0,
741
754
  stopPropagation: !0
742
755
  })
743
756
  )
744
757
  );
745
- return E({
758
+ return L({
746
759
  baseContainer: !0,
747
760
  growInput: !1,
748
761
  focusableSelector: '[role="slider"]',
749
762
  ...t,
750
763
  input: _.div(
751
764
  // Common input attributes (id, required, invalid, custom classes, etc.)
752
- U(t),
765
+ O(t),
753
766
  u.class("bc-rating-input"),
754
767
  // ARIA slider semantics
755
768
  u.role("slider"),
756
769
  u.tabindex(p.map(r ?? !1, (w) => w ? -1 : 0)),
757
- N.disabled(r ?? !1),
758
- N.valuemin(0),
759
- N.valuemax(p.map(s, (w) => w ?? 0)),
760
- N.valuenow(p.map(e, (w) => w ?? 0)),
761
- N.valuetext(
770
+ B.disabled(r ?? !1),
771
+ B.valuemin(0),
772
+ B.valuemax(p.map(s, (w) => w ?? 0)),
773
+ B.valuenow(p.map(e, (w) => w ?? 0)),
774
+ B.valuetext(
762
775
  D(
763
776
  e,
764
777
  s
765
- )((w, S) => {
766
- const C = w ?? 0, h = S ?? 0;
767
- return `${String(C)} / ${String(h)}`;
778
+ )((w, A) => {
779
+ const T = w ?? 0, k = A ?? 0;
780
+ return `${String(T)} / ${String(k)}`;
768
781
  })
769
782
  ),
770
783
  // Keyboard & focus handlers
771
- M.keydown(x),
772
- f != null ? M.blur(f) : null,
773
- ut(s, F)
784
+ I.keydown($),
785
+ g != null ? I.blur(g) : null,
786
+ ft(s, F)
774
787
  )
775
788
  });
776
- }, we = (t) => {
777
- const { value: e, onChange: a, onInput: n, onBlur: r, after: s, disabled: o, ...i } = t, c = z(e, o, a ?? n);
778
- return Yt({
779
- ...i,
780
- // Map null -> 0 for display so the control shows as empty when null
781
- value: p.map(e, (l) => l ?? 0),
782
- // Pass through numeric changes; clear button will call onChange(null)
783
- onChange: a,
784
- onInput: n,
785
- onBlur: r,
786
- after: s != null ? j(c, s) : c
789
+ }, _e = (t) => {
790
+ const { after: e, disabled: a } = t, n = pt(
791
+ t,
792
+ (s) => s ?? 0,
793
+ (s) => s
794
+ ), r = X(
795
+ t.value,
796
+ a,
797
+ t.onChange ?? t.onInput
798
+ );
799
+ return Zt({
800
+ ...n,
801
+ after: e != null ? j(r, e) : r
787
802
  });
788
- }, ye = (t) => {
789
- const { value: e, step: a, min: n, max: r, onBlur: s, onChange: o, onInput: i } = t;
790
- return E({
803
+ }, ke = (t) => {
804
+ const { value: e, step: a, min: n, max: r, onBlur: s, onChange: o, onInput: c } = t;
805
+ return L({
791
806
  ...t,
792
807
  // Make sure clicks anywhere focus the range input
793
808
  focusableSelector: 'input[type="range"]',
794
809
  input: _.input(
795
810
  u.type("range"),
796
- U(t),
811
+ O(t),
797
812
  u.min(n),
798
813
  u.max(r),
799
814
  u.step(a),
800
815
  // Using value as number to keep it in sync
801
816
  u.valueAsNumber(e),
802
817
  u.class("bc-input bc-slider-input"),
803
- s != null ? M.blur(V(s)) : A,
804
- o != null ? M.change(V(o)) : A,
805
- i != null ? M.input(V(i)) : A
818
+ s != null ? I.blur(E(s)) : S,
819
+ o != null ? I.change(E(o)) : S,
820
+ c != null ? I.input(E(c)) : S
806
821
  )
807
822
  });
808
- }, Ie = (t) => {
809
- const { value: e, step: a, min: n, max: r, onBlur: s, onChange: o, onInput: i } = t, c = p.map(e, (d) => {
823
+ }, Fe = (t) => {
824
+ const { value: e, step: a, min: n, max: r, onBlur: s, onChange: o, onInput: c } = t, i = p.map(e, (d) => {
810
825
  if (d != null) return d;
811
- const f = n != null ? p.get(n) : void 0;
812
- return typeof f == "number" ? f : 0;
813
- }), l = z(
826
+ const g = n != null ? p.get(n) : void 0;
827
+ return typeof g == "number" ? g : 0;
828
+ }), l = X(
814
829
  e,
815
830
  t.disabled,
816
- o ?? i
831
+ o ?? c
817
832
  );
818
- return E({
833
+ return L({
819
834
  ...t,
820
835
  focusableSelector: 'input[type="range"]',
821
836
  after: l,
822
837
  input: _.input(
823
838
  u.type("range"),
824
- U(t),
839
+ O(t),
825
840
  u.min(n),
826
841
  u.max(r),
827
842
  u.step(a),
828
- u.valueAsNumber(c),
843
+ u.valueAsNumber(i),
829
844
  u.class("bc-input bc-slider-input"),
830
- s != null ? M.blur(V(s)) : A,
831
- o != null ? M.change(
832
- V((d) => {
845
+ s != null ? I.blur(E(s)) : S,
846
+ o != null ? I.change(
847
+ E((d) => {
833
848
  o(d);
834
849
  })
835
- ) : A,
836
- i != null ? M.input(
837
- V((d) => {
838
- i(d);
850
+ ) : S,
851
+ c != null ? I.input(
852
+ E((d) => {
853
+ c(d);
839
854
  })
840
- ) : A
855
+ ) : S
841
856
  )
842
857
  });
843
- }, Me = L(mt);
844
- class Gt {
858
+ }, Ce = P(It);
859
+ class te {
845
860
  widgets = /* @__PURE__ */ new Map();
846
861
  typeMapping = /* @__PURE__ */ new Map();
847
862
  // JSON Schema type -> widget names
@@ -892,7 +907,7 @@ class Gt {
892
907
  * Find the best widget for a schema context
893
908
  */
894
909
  findBestWidget(e) {
895
- const a = kt(e.definition, e.name);
910
+ const a = At(e.definition, e.name);
896
911
  if (a?.widget) {
897
912
  const r = this.widgets.get(a.widget);
898
913
  if (r)
@@ -933,8 +948,8 @@ class Gt {
933
948
  return null;
934
949
  }
935
950
  }
936
- const $e = new Gt();
937
- function xe(t, e, a) {
951
+ const Te = new te();
952
+ function Se(t, e, a) {
938
953
  return {
939
954
  factory: e,
940
955
  matcher: (n) => {
@@ -947,7 +962,7 @@ function xe(t, e, a) {
947
962
  ...a
948
963
  };
949
964
  }
950
- function _e(t, e, a) {
965
+ function Ae(t, e, a) {
951
966
  return {
952
967
  factory: e,
953
968
  matcher: (n) => n.definition.format === t,
@@ -956,7 +971,7 @@ function _e(t, e, a) {
956
971
  ...a
957
972
  };
958
973
  }
959
- function ke(t, e, a, n) {
974
+ function ve(t, e, a, n) {
960
975
  return {
961
976
  factory: a,
962
977
  matcher: (r) => {
@@ -968,7 +983,7 @@ function ke(t, e, a, n) {
968
983
  ...n
969
984
  };
970
985
  }
971
- function Fe(t) {
986
+ function Ne(t) {
972
987
  const e = t?.logPrefix ?? "WIDGET_DIAG", a = t?.filterFn ?? (() => !0);
973
988
  return {
974
989
  factory: () => null,
@@ -991,52 +1006,52 @@ function Fe(t) {
991
1006
  };
992
1007
  }
993
1008
  export {
994
- Nt as A,
995
- ie as B,
996
- ce as C,
997
- Tt as D,
998
- le as E,
999
- Ft as F,
1000
- Ct as G,
1001
- K as H,
1002
- Rt as I,
1003
- Bt as J,
1004
- St as K,
1005
- O as L,
1006
- Q as M,
1007
- he as N,
1008
- J as O,
1009
- Dt as P,
1010
- Vt as Q,
1011
- Yt as R,
1012
- ye as S,
1013
- G as T,
1014
- vt as U,
1015
- Gt as W,
1016
- fe as a,
1017
- be as b,
1018
- Me as c,
1019
- ge as d,
1020
- pe as e,
1021
- ue as f,
1022
- $e as g,
1023
- de as h,
1024
- Ie as i,
1025
- we as j,
1026
- me as k,
1027
- Fe as l,
1028
- _e as m,
1029
- ke as n,
1030
- xe as o,
1031
- at as p,
1032
- Ht as q,
1033
- re as r,
1034
- it as s,
1035
- At as t,
1036
- Ot as u,
1037
- Et as v,
1038
- P as w,
1039
- oe as x,
1040
- H as y,
1041
- ct as z
1009
+ Lt as A,
1010
+ he as B,
1011
+ ge as C,
1012
+ Rt as D,
1013
+ fe as E,
1014
+ vt as F,
1015
+ Nt as G,
1016
+ Z as H,
1017
+ Et as I,
1018
+ Pt as J,
1019
+ Dt as K,
1020
+ W as L,
1021
+ et as M,
1022
+ ye as N,
1023
+ nt as O,
1024
+ Ot as P,
1025
+ Ut as Q,
1026
+ Zt as R,
1027
+ ke as S,
1028
+ J as T,
1029
+ Vt as U,
1030
+ te as W,
1031
+ Ie as a,
1032
+ xe as b,
1033
+ Ce as c,
1034
+ Me as d,
1035
+ be as e,
1036
+ me as f,
1037
+ Te as g,
1038
+ we as h,
1039
+ Fe as i,
1040
+ _e as j,
1041
+ $e as k,
1042
+ Ne as l,
1043
+ Ae as m,
1044
+ ve as n,
1045
+ Se as o,
1046
+ Gt as p,
1047
+ Kt as q,
1048
+ pe as r,
1049
+ dt as s,
1050
+ Bt as t,
1051
+ Xt as u,
1052
+ Wt as v,
1053
+ U as w,
1054
+ de as x,
1055
+ z as y,
1056
+ ht as z
1042
1057
  };