@tempots/beatui 1.4.0 → 1.6.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 (216) hide show
  1. package/dist/ar-Wr6gMs-M.cjs +1 -0
  2. package/dist/{ar-C-kUt6f9.js → ar-fdUqbCvM.js} +154 -1
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +1 -1
  5. package/dist/auth-divider-DewHpITQ.cjs +1 -0
  6. package/dist/{auth-divider-D_3gKZ6g.js → auth-divider-qnJuYK-x.js} +7 -7
  7. package/dist/beatui.css +2107 -171
  8. package/dist/beatui.tailwind.css +2107 -171
  9. package/dist/better-auth/index.cjs.js +1 -1
  10. package/dist/better-auth/index.es.js +5 -5
  11. package/dist/{modal-YKqlh4Dk.js → custom-validation-BetUqAEz.js} +186 -186
  12. package/dist/custom-validation-CLscGHY4.cjs +1 -0
  13. package/dist/{de-CP0kbElb.js → de-C5-k5Eov.js} +156 -3
  14. package/dist/de-DZqdSEta.cjs +1 -0
  15. package/dist/deep-merge-D90SW1Ci.cjs +1 -0
  16. package/dist/deep-merge-ZVigk5Qf.js +1765 -0
  17. package/dist/{duration-input-BrYLC1js.cjs → duration-input-4AQnQpyo.cjs} +1 -1
  18. package/dist/{duration-input-CFu6vq-y.js → duration-input-GMBmT1BE.js} +4 -4
  19. package/dist/{editor-toolbar-group-QVdBUbB8.cjs → editor-toolbar-group-C_ft_T8D.cjs} +1 -1
  20. package/dist/{editor-toolbar-group-DWUWUO-B.js → editor-toolbar-group-FpOHrmtx.js} +2 -2
  21. package/dist/es-CJgYfRap.cjs +1 -0
  22. package/dist/{es-BtIkcnsw.js → es-h6jmoF4X.js} +156 -3
  23. package/dist/fa-BQ5PzwNY.cjs +1 -0
  24. package/dist/{fa-11-rZmQ-.js → fa-BuxK837l.js} +154 -1
  25. package/dist/fr-Bv3TG44U.cjs +1 -0
  26. package/dist/{fr-C-L2F8w2.js → fr-BwILQ9G2.js} +165 -12
  27. package/dist/he-5LbvgMCC.cjs +1 -0
  28. package/dist/{he-Bu1xGoQ9.js → he-yC9Sc7JD.js} +154 -1
  29. package/dist/{hi-CewH-MAH.js → hi-Da7rcCpP.js} +154 -1
  30. package/dist/hi-YWhWcG_L.cjs +1 -0
  31. package/dist/{index-BGKz2Nol.js → index-DI8bf9oC.js} +175 -172
  32. package/dist/index-DeUj-5ph.cjs +1 -0
  33. package/dist/index.cjs.js +4 -4
  34. package/dist/index.es.js +11806 -8105
  35. package/dist/{input-container-CO3DNqpp.js → input-container-8JFB11xN.js} +1 -1
  36. package/dist/{input-container-BkPcNDaZ.cjs → input-container-CyOgiiQD.cjs} +1 -1
  37. package/dist/it-BxOIJE45.cjs +1 -0
  38. package/dist/{it-5hiKQO_p.js → it-Yeklau78.js} +156 -3
  39. package/dist/ja-CNhjK06P.cjs +1 -0
  40. package/dist/{ja-CGfEmZrm.js → ja-Dxj9Q5Yd.js} +155 -2
  41. package/dist/json-schema/index.cjs.js +1 -1
  42. package/dist/json-schema/index.es.js +110 -110
  43. package/dist/json-schema-display/index.cjs.js +1 -1
  44. package/dist/json-schema-display/index.es.js +1 -1
  45. package/dist/json-structure/index.cjs.js +1 -1
  46. package/dist/json-structure/index.es.js +5 -5
  47. package/dist/ko-DgkqcXTs.cjs +1 -0
  48. package/dist/{ko-DZthvREd.js → ko-gn_MsegK.js} +154 -1
  49. package/dist/lexical/index.cjs.js +1 -1
  50. package/dist/lexical/index.es.js +4 -4
  51. package/dist/nl-Dy9lmbBO.cjs +1 -0
  52. package/dist/{nl-CcKyHlQ7.js → nl-vHNFtXXb.js} +162 -9
  53. package/dist/{notice-Du3tWJTW.js → notice-B6ojfenv.js} +4 -4
  54. package/dist/{notice-Q0A1gIho.cjs → notice-p2IqXS5-.cjs} +1 -1
  55. package/dist/{oneof-branch-detection-DSzC0PkO.js → oneof-branch-detection-Q_jxvJIA.js} +1 -1
  56. package/dist/{oneof-branch-detection-BEkAezNi.cjs → oneof-branch-detection-xDDDdYRk.cjs} +1 -1
  57. package/dist/pl-BtYbtsmG.cjs +1 -0
  58. package/dist/{pl-Mwtjp4MV.js → pl-C0UdHla0.js} +184 -31
  59. package/dist/prosemirror/index.cjs.js +1 -1
  60. package/dist/prosemirror/index.es.js +4 -4
  61. package/dist/pt-CtNmqQ1X.cjs +1 -0
  62. package/dist/{pt-BaTsY-8f.js → pt-DGKtfN0d.js} +156 -3
  63. package/dist/ru-BaL_NPRU.cjs +1 -0
  64. package/dist/{ru-CvbGmz5s.js → ru-CpXYLt-v.js} +154 -1
  65. package/dist/tailwind/preset.cjs.js +1 -1
  66. package/dist/tailwind/preset.es.js +1 -1
  67. package/dist/tailwind/vite-plugin.cjs.js +1 -1
  68. package/dist/tailwind/vite-plugin.es.js +1 -1
  69. package/dist/{text-input-D_IxFd0M.cjs → text-input-DS5zlXb2.cjs} +1 -1
  70. package/dist/{text-input-BAn02BzO.js → text-input-NJypZSnE.js} +1 -1
  71. package/dist/{toolbar-CnecqhaU.cjs → toolbar-BBwfe8U9.cjs} +1 -1
  72. package/dist/{toolbar-BKan3NHw.js → toolbar-BF2L6WKC.js} +1 -1
  73. package/dist/{tr-YFqQdZjM.js → tr-DIFZDFW_.js} +156 -3
  74. package/dist/tr-DwOd87oB.cjs +1 -0
  75. package/dist/{translations-CxDUnbXn.js → translations-5cXBrENb.js} +1 -1
  76. package/dist/{translations-DT5QQ4WO.js → translations-BCMP-h52.js} +269 -115
  77. package/dist/{translations-C_-cObaF.cjs → translations-BqWc0ZHz.cjs} +1 -1
  78. package/dist/translations-EwEmHe3v.cjs +1 -0
  79. package/dist/types/beatui-i18n/default.d.ts +109 -0
  80. package/dist/types/beatui-i18n/locales/en.d.ts +109 -0
  81. package/dist/types/beatui-i18n/translations.d.ts +109 -0
  82. package/dist/types/components/button/copy-button.d.ts +42 -0
  83. package/dist/types/components/button/index.d.ts +1 -0
  84. package/dist/types/components/button/toggle-button-group.d.ts +2 -2
  85. package/dist/types/components/button/toggle-button.d.ts +2 -2
  86. package/dist/types/components/data/data-table-context.d.ts +9 -1
  87. package/dist/types/components/data/data-table-row-details.d.ts +21 -0
  88. package/dist/types/components/data/data-table-types.d.ts +23 -0
  89. package/dist/types/components/data/date-picker-shared.d.ts +2 -5
  90. package/dist/types/components/data/date-picker.d.ts +1 -1
  91. package/dist/types/components/data/date-range-picker.d.ts +1 -1
  92. package/dist/types/components/data/index.d.ts +4 -0
  93. package/dist/types/components/data/stat-card.d.ts +108 -0
  94. package/dist/types/components/data/time-picker.d.ts +54 -0
  95. package/dist/types/components/data/virtual-scrolling/index.d.ts +1 -0
  96. package/dist/types/components/data/virtual-scrolling/virtual-list.d.ts +91 -0
  97. package/dist/types/components/form/control/control.d.ts +5 -5
  98. package/dist/types/components/form/control/list-control.d.ts +11 -11
  99. package/dist/types/components/form/fieldset/fieldset.d.ts +60 -0
  100. package/dist/types/components/form/fieldset/index.d.ts +1 -0
  101. package/dist/types/components/form/index.d.ts +1 -0
  102. package/dist/types/components/form/input/checkbox-input.d.ts +1 -1
  103. package/dist/types/components/form/input/color-input.d.ts +1 -1
  104. package/dist/types/components/form/input/color-picker/canvas-draw.d.ts +12 -0
  105. package/dist/types/components/form/input/color-picker/channel-picker.d.ts +71 -0
  106. package/dist/types/components/form/input/color-picker/hex-color-picker.d.ts +20 -0
  107. package/dist/types/components/form/input/color-picker/hsl-color-picker.d.ts +14 -0
  108. package/dist/types/components/form/input/color-picker/hwb-color-picker.d.ts +15 -0
  109. package/dist/types/components/form/input/color-picker/index.d.ts +7 -0
  110. package/dist/types/components/form/input/color-picker/oklch-color-picker.d.ts +15 -0
  111. package/dist/types/components/form/input/color-picker/rgb-color-picker.d.ts +17 -0
  112. package/dist/types/components/form/input/color-swatch-input.d.ts +1 -1
  113. package/dist/types/components/form/input/combobox-input.d.ts +3 -3
  114. package/dist/types/components/form/input/combobox-tags-input.d.ts +1 -1
  115. package/dist/types/components/form/input/date-input.d.ts +1 -1
  116. package/dist/types/components/form/input/date-range-select-base.d.ts +23 -0
  117. package/dist/types/components/form/input/date-range-select.d.ts +64 -0
  118. package/dist/types/components/form/input/date-select.d.ts +52 -0
  119. package/dist/types/components/form/input/date-time-input.d.ts +2 -2
  120. package/dist/types/components/form/input/date-time-select-base.d.ts +23 -0
  121. package/dist/types/components/form/input/date-time-select.d.ts +66 -0
  122. package/dist/types/components/form/input/dropdown-input.d.ts +3 -3
  123. package/dist/types/components/form/input/email-input.d.ts +1 -1
  124. package/dist/types/components/form/input/field-layout.d.ts +64 -0
  125. package/dist/types/components/form/input/{input-wrapper.d.ts → field.d.ts} +23 -14
  126. package/dist/types/components/form/input/index.d.ts +19 -1
  127. package/dist/types/components/form/input/multi-select.d.ts +2 -2
  128. package/dist/types/components/form/input/native-select.d.ts +1 -1
  129. package/dist/types/components/form/input/nullable-date-select.d.ts +55 -0
  130. package/dist/types/components/form/input/nullable-date-time-select.d.ts +68 -0
  131. package/dist/types/components/form/input/nullable-time-select.d.ts +64 -0
  132. package/dist/types/components/form/input/number-input.d.ts +5 -40
  133. package/dist/types/components/form/input/number-stepper.d.ts +53 -0
  134. package/dist/types/components/form/input/open-date-range-select.d.ts +75 -0
  135. package/dist/types/components/form/input/otp-input.d.ts +2 -2
  136. package/dist/types/components/form/input/password-input.d.ts +1 -1
  137. package/dist/types/components/form/input/radio-group.d.ts +1 -1
  138. package/dist/types/components/form/input/range-slider.d.ts +23 -6
  139. package/dist/types/components/form/input/rating-input.d.ts +1 -1
  140. package/dist/types/components/form/input/segmented-input.d.ts +6 -2
  141. package/dist/types/components/form/input/segmented-select.d.ts +84 -0
  142. package/dist/types/components/form/input/select-tags-input.d.ts +1 -1
  143. package/dist/types/components/form/input/slider-input.d.ts +2 -2
  144. package/dist/types/components/form/input/sortable-list.d.ts +68 -0
  145. package/dist/types/components/form/input/switch.d.ts +1 -1
  146. package/dist/types/components/form/input/text-area.d.ts +1 -1
  147. package/dist/types/components/form/input/text-input.d.ts +1 -1
  148. package/dist/types/components/form/input/time-format.d.ts +31 -0
  149. package/dist/types/components/form/input/time-select-base.d.ts +23 -0
  150. package/dist/types/components/form/input/time-select.d.ts +61 -0
  151. package/dist/types/components/form/input/transfer-list.d.ts +56 -0
  152. package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +1 -1
  153. package/dist/types/components/form/input/url-input.d.ts +1 -1
  154. package/dist/types/components/format/format-bigint.d.ts +64 -0
  155. package/dist/types/components/format/format-date-time.d.ts +54 -0
  156. package/dist/types/components/format/format-date.d.ts +82 -0
  157. package/dist/types/components/format/format-display-name.d.ts +70 -0
  158. package/dist/types/components/format/format-file-size.d.ts +30 -0
  159. package/dist/types/components/format/format-list.d.ts +61 -0
  160. package/dist/types/components/format/format-number.d.ts +88 -0
  161. package/dist/types/components/format/format-plural.d.ts +96 -0
  162. package/dist/types/components/format/format-relative-time.d.ts +62 -0
  163. package/dist/types/components/format/format-time.d.ts +66 -0
  164. package/dist/types/components/format/index.d.ts +11 -0
  165. package/dist/types/components/i18n/locale-selector.d.ts +1 -1
  166. package/dist/types/components/json-schema/controls/composition-shared.d.ts +1 -1
  167. package/dist/types/components/json-schema/controls/shared-utils.d.ts +3 -3
  168. package/dist/types/components/json-schema/widgets/string-controls.d.ts +2 -2
  169. package/dist/types/components/json-schema-display/display-wrapper.d.ts +1 -1
  170. package/dist/types/components/layout/nine-slice-scroll-view.d.ts +1 -1
  171. package/dist/types/components/navigation/index.d.ts +1 -0
  172. package/dist/types/components/navigation/stepper.d.ts +102 -0
  173. package/dist/types/components/overlay/index.d.ts +1 -1
  174. package/dist/types/components/overlay/spotlight.d.ts +62 -0
  175. package/dist/types/index.d.ts +1 -0
  176. package/dist/types/utils/index.d.ts +0 -1
  177. package/dist/ur-D9nLchps.cjs +1 -0
  178. package/dist/{ur-CdnwwnG_.js → ur-DBst-TXc.js} +154 -1
  179. package/dist/use-form-Dcra7GeE.cjs +2 -0
  180. package/dist/{use-form-D_TJyZhP.js → use-form-NfobsGNl.js} +474 -434
  181. package/dist/{vi-Bwvz1d_n.js → vi-DQOJp32U.js} +183 -30
  182. package/dist/vi-Dg1aiMr5.cjs +1 -0
  183. package/dist/widget-customization-BtkexHgm.js +1458 -0
  184. package/dist/widget-customization-pqmtsraC.cjs +1 -0
  185. package/dist/{zh-hy7Uw6c5.js → zh-DPK4HXl2.js} +154 -1
  186. package/dist/zh-tbwSTbmn.cjs +1 -0
  187. package/package.json +9 -9
  188. package/dist/ar-Dc56zcjW.cjs +0 -1
  189. package/dist/auth-divider-itm5-j5G.cjs +0 -1
  190. package/dist/de-DboQlEC4.cjs +0 -1
  191. package/dist/deep-merge-Bydz6jLt.cjs +0 -1
  192. package/dist/deep-merge-CzZVsVF-.js +0 -1704
  193. package/dist/es-CAmE_0Ph.cjs +0 -1
  194. package/dist/fa-D9LrFZdW.cjs +0 -1
  195. package/dist/fr-DKogQyss.cjs +0 -1
  196. package/dist/he-CVx91Jdr.cjs +0 -1
  197. package/dist/hi-BgrHV72l.cjs +0 -1
  198. package/dist/index-DFF7Uahh.cjs +0 -1
  199. package/dist/it-B1rA1F9l.cjs +0 -1
  200. package/dist/ja-DZnjjqoi.cjs +0 -1
  201. package/dist/ko-CDnYKYWU.cjs +0 -1
  202. package/dist/modal-DCxNGrzk.cjs +0 -1
  203. package/dist/nl-Bj8QnDEY.cjs +0 -1
  204. package/dist/pl-BmuuxxVd.cjs +0 -1
  205. package/dist/pt-RiC0yeVA.cjs +0 -1
  206. package/dist/ru-pRqtOQHF.cjs +0 -1
  207. package/dist/tr-B9JhBJeL.cjs +0 -1
  208. package/dist/translations-qefRsdGi.cjs +0 -1
  209. package/dist/types/components/overlay/command-palette.d.ts +0 -17
  210. package/dist/types/utils/color.d.ts +0 -346
  211. package/dist/ur-BZakU0iv.cjs +0 -1
  212. package/dist/use-form-BvBkVEKi.cjs +0 -2
  213. package/dist/vi-D1nly0nb.cjs +0 -1
  214. package/dist/widget-customization-BAchyOUo.js +0 -1066
  215. package/dist/widget-customization-DELy3SMQ.cjs +0 -1
  216. package/dist/zh-DBk7sSD9.cjs +0 -1
@@ -1,346 +0,0 @@
1
- /**
2
- * Color validation, conversion, and formatting utilities for BeatUI.
3
- *
4
- * Provides comprehensive color handling including validation for multiple color
5
- * formats (hex, RGB, RGBA, HSL), conversion between color spaces (RGB, HSL, HWB,
6
- * OKLCH), contrast ratio calculation, and color string formatting.
7
- *
8
- * @module
9
- */
10
- /**
11
- * Validates if a string is a valid hex color (3 or 6 character format, with or without `#`).
12
- *
13
- * @param color - The color string to validate
14
- * @returns `true` if valid hex color, `false` otherwise
15
- *
16
- * @example
17
- * ```ts
18
- * isValidHexColor('#ff0000') // true
19
- * isValidHexColor('abc') // true
20
- * isValidHexColor('#gggggg') // false
21
- * ```
22
- */
23
- export declare function isValidHexColor(color: string): boolean;
24
- /**
25
- * Validates if a string is a valid CSS `rgb()` color with values in range 0-255.
26
- *
27
- * @param color - The color string to validate (e.g., `"rgb(255, 0, 0)"`)
28
- * @returns `true` if valid RGB color, `false` otherwise
29
- *
30
- * @example
31
- * ```ts
32
- * isValidRgbColor('rgb(255, 0, 0)') // true
33
- * isValidRgbColor('rgb(300, 0, 0)') // false (out of range)
34
- * isValidRgbColor('rgba(0, 0, 0, 1)') // false (use isValidRgbaColor)
35
- * ```
36
- */
37
- export declare function isValidRgbColor(color: string): boolean;
38
- /**
39
- * Validates if a string is a valid CSS `rgba()` color with values in range
40
- * 0-255 for RGB and 0-1 for alpha.
41
- *
42
- * @param color - The color string to validate (e.g., `"rgba(255, 0, 0, 0.5)"`)
43
- * @returns `true` if valid RGBA color, `false` otherwise
44
- *
45
- * @example
46
- * ```ts
47
- * isValidRgbaColor('rgba(255, 0, 0, 0.5)') // true
48
- * isValidRgbaColor('rgba(255, 0, 0, 2)') // false (alpha out of range)
49
- * ```
50
- */
51
- export declare function isValidRgbaColor(color: string): boolean;
52
- /**
53
- * Validates if a string is a valid CSS `hsl()` color with hue 0-360 and
54
- * saturation/lightness 0-100%.
55
- *
56
- * @param color - The color string to validate (e.g., `"hsl(120, 100%, 50%)"`)
57
- * @returns `true` if valid HSL color, `false` otherwise
58
- *
59
- * @example
60
- * ```ts
61
- * isValidHslColor('hsl(120, 100%, 50%)') // true
62
- * isValidHslColor('hsl(400, 100%, 50%)') // false (hue out of range)
63
- * ```
64
- */
65
- export declare function isValidHslColor(color: string): boolean;
66
- /**
67
- * Validates if a string is a valid color in any supported format
68
- * (hex, RGB, RGBA, or HSL).
69
- *
70
- * @param color - The color string to validate
71
- * @returns `true` if valid color in any supported format, `false` otherwise
72
- *
73
- * @example
74
- * ```ts
75
- * isValidColor('#ff0000') // true
76
- * isValidColor('rgb(255, 0, 0)') // true
77
- * isValidColor('not-a-color') // false
78
- * ```
79
- */
80
- export declare function isValidColor(color: string): boolean;
81
- /**
82
- * Normalizes a hex color to always include the `#` prefix and be 6 characters
83
- * (lowercase). Expands 3-character shorthand to full 6-character form.
84
- *
85
- * @param color - The hex color to normalize
86
- * @returns Normalized hex color string (e.g., `'#ff0000'`) or `null` if invalid
87
- *
88
- * @example
89
- * ```ts
90
- * normalizeHexColor('abc') // '#aabbcc'
91
- * normalizeHexColor('#FF0000') // '#ff0000'
92
- * normalizeHexColor('invalid') // null
93
- * ```
94
- */
95
- export declare function normalizeHexColor(color: string): string | null;
96
- /**
97
- * Converts RGB channel values to a hex color string. Values are clamped to 0-255.
98
- *
99
- * @param r - Red channel value (0-255)
100
- * @param g - Green channel value (0-255)
101
- * @param b - Blue channel value (0-255)
102
- * @returns Hex color string with `#` prefix (e.g., `'#ff0000'`)
103
- *
104
- * @example
105
- * ```ts
106
- * rgbToHex(255, 0, 0) // '#ff0000'
107
- * rgbToHex(0, 128, 255) // '#0080ff'
108
- * ```
109
- */
110
- export declare function rgbToHex(r: number, g: number, b: number): string;
111
- /**
112
- * Converts a hex color string to RGB channel values. Handles both 3-character
113
- * and 6-character hex values, with or without the `#` prefix.
114
- *
115
- * @param hex - Hex color string (with or without `#`)
116
- * @returns Object with `r`, `g`, `b` properties (0-255 each) or `null` if invalid
117
- *
118
- * @example
119
- * ```ts
120
- * hexToRgb('#ff0000') // { r: 255, g: 0, b: 0 }
121
- * hexToRgb('abc') // { r: 170, g: 187, b: 204 }
122
- * hexToRgb('invalid') // null
123
- * ```
124
- */
125
- export declare function hexToRgb(hex: string): {
126
- r: number;
127
- g: number;
128
- b: number;
129
- } | null;
130
- /**
131
- * Calculates the WCAG 2.0 contrast ratio between two hex colors.
132
- * The ratio ranges from 1:1 (identical) to 21:1 (black on white).
133
- * A ratio of at least 4.5 is required for WCAG AA text compliance.
134
- *
135
- * @param color1 - First color in hex format
136
- * @param color2 - Second color in hex format
137
- * @returns The contrast ratio as a number, or `null` if either color is invalid
138
- *
139
- * @example
140
- * ```ts
141
- * getContrastRatio('#000000', '#ffffff') // 21
142
- * getContrastRatio('#ff0000', '#00ff00') // ~2.91
143
- * ```
144
- */
145
- export declare function getContrastRatio(color1: string, color2: string): number | null;
146
- /**
147
- * Parses any supported CSS color string into an `[r, g, b, a]` tuple.
148
- *
149
- * Supported formats:
150
- * - Hex: `#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA` (with or without `#`)
151
- * - RGB: `rgb(r, g, b)`
152
- * - RGBA: `rgba(r, g, b, a)`
153
- * - HSL/HSLA: `hsl(h, s%, l%)`, `hsla(h, s%, l%, a)`, and modern syntax
154
- * - HWB: `hwb(h w% b% / a)`
155
- * - OKLCH: `oklch(L C h / a)`
156
- *
157
- * @param v - The color string to parse
158
- * @returns A tuple of `[red, green, blue, alpha]` where RGB are 0-255 and alpha is 0-1.
159
- * Returns `[0, 0, 0, 1]` for empty or unparseable input.
160
- *
161
- * @example
162
- * ```ts
163
- * parseAnyColor('#ff0000') // [255, 0, 0, 1]
164
- * parseAnyColor('rgba(0, 128, 255, 0.5)') // [0, 128, 255, 0.5]
165
- * parseAnyColor('oklch(0.623 0.214 259.815)') // [approximately 59, 130, 246, 1]
166
- * ```
167
- */
168
- export declare function parseAnyColor(v: string): [number, number, number, number];
169
- /**
170
- * Formats RGBA values into a CSS `rgba()` string. Alpha is clamped to 0-1
171
- * and rounded to 2 decimal places; RGB values are rounded to integers.
172
- *
173
- * @param r - Red channel (0-255)
174
- * @param g - Green channel (0-255)
175
- * @param b - Blue channel (0-255)
176
- * @param a - Alpha channel (0-1)
177
- * @returns A CSS `rgba()` string (e.g., `'rgba(255, 0, 0, 0.5)'`)
178
- *
179
- * @example
180
- * ```ts
181
- * toRgbaString(255, 0, 0, 0.5) // 'rgba(255, 0, 0, 0.5)'
182
- * ```
183
- */
184
- export declare function toRgbaString(r: number, g: number, b: number, a: number): string;
185
- /**
186
- * Creates a seeded pseudo-random number generator using the Mulberry32 algorithm.
187
- * Useful for generating deterministic "random" values (e.g., for color hashing).
188
- *
189
- * @param seed - The integer seed value
190
- * @returns A function that returns the next pseudo-random number in the range [0, 1)
191
- *
192
- * @example
193
- * ```ts
194
- * const random = mulberry32(42)
195
- * random() // 0.6011037519201636 (deterministic)
196
- * random() // 0.4321023514959961
197
- * ```
198
- */
199
- export declare function mulberry32(seed: number): () => number;
200
- /**
201
- * Converts HSL color values to RGB. Hue is wrapped to 0-360 range.
202
- *
203
- * @param h - Hue in degrees (0-360)
204
- * @param s - Saturation as a fraction (0-1)
205
- * @param l - Lightness as a fraction (0-1)
206
- * @returns A tuple of `[red, green, blue]` with values 0-255
207
- *
208
- * @example
209
- * ```ts
210
- * hslToRgb(0, 1, 0.5) // [255, 0, 0] (red)
211
- * hslToRgb(120, 1, 0.5) // [0, 255, 0] (green)
212
- * ```
213
- */
214
- export declare function hslToRgb(h: number, s: number, l: number): [number, number, number];
215
- /**
216
- * Converts HWB (Hue-Whiteness-Blackness) color values to RGB.
217
- * If whiteness + blackness exceeds 1, they are scaled proportionally.
218
- *
219
- * @param h - Hue in degrees (0-360)
220
- * @param w - Whiteness as a fraction (0-1)
221
- * @param bl - Blackness as a fraction (0-1)
222
- * @returns A tuple of `[red, green, blue]` with values 0-255
223
- *
224
- * @example
225
- * ```ts
226
- * hwbToRgb(0, 0, 0) // [255, 0, 0] (pure red)
227
- * hwbToRgb(0, 0.5, 0.5) // [128, 128, 128] (gray)
228
- * ```
229
- */
230
- export declare function hwbToRgb(h: number, w: number, bl: number): [number, number, number];
231
- /**
232
- * Converts RGB color values to HSL. Returns rounded integer values.
233
- *
234
- * @param r - Red channel (0-255)
235
- * @param g - Green channel (0-255)
236
- * @param b - Blue channel (0-255)
237
- * @returns A tuple of `[hue, saturation, lightness]` where hue is 0-360 and
238
- * saturation/lightness are 0-100 (percentage)
239
- *
240
- * @example
241
- * ```ts
242
- * rgbToHsl(255, 0, 0) // [0, 100, 50]
243
- * rgbToHsl(0, 128, 255) // [210, 100, 50]
244
- * ```
245
- */
246
- export declare function rgbToHsl(r: number, g: number, b: number): [number, number, number];
247
- /**
248
- * Converts RGB color values to HWB (Hue-Whiteness-Blackness).
249
- *
250
- * @param r - Red channel (0-255)
251
- * @param g - Green channel (0-255)
252
- * @param b - Blue channel (0-255)
253
- * @returns A tuple of `[hue, whiteness, blackness]` where hue is 0-360 and
254
- * whiteness/blackness are 0-100 (percentage)
255
- *
256
- * @example
257
- * ```ts
258
- * rgbToHwb(255, 0, 0) // [0, 0, 0]
259
- * rgbToHwb(128, 128, 128) // [0, 50, 50]
260
- * ```
261
- */
262
- export declare function rgbToHwb(r: number, g: number, b: number): [number, number, number];
263
- /**
264
- * Converts an sRGB channel value (0-255) to linear RGB (0-1).
265
- * Applies the standard sRGB gamma decompression curve.
266
- *
267
- * @param u - sRGB channel value (0-255)
268
- * @returns Linear RGB value (0-1)
269
- */
270
- export declare function srgbToLinear(u: number): number;
271
- /**
272
- * Converts a linear RGB value (0-1) to an sRGB channel value (0-255).
273
- * Applies the standard sRGB gamma compression curve, clamping and rounding the result.
274
- *
275
- * @param u - Linear RGB value (0-1)
276
- * @returns sRGB channel value (0-255)
277
- */
278
- export declare function linearToSrgb(u: number): number;
279
- /**
280
- * Converts OKLCH color values to sRGB. Uses the OKLab intermediate color space
281
- * with matrix transforms to linear sRGB.
282
- *
283
- * @param L - Lightness (0-1)
284
- * @param C - Chroma (0 to approximately 0.4)
285
- * @param hDeg - Hue angle in degrees (0-360)
286
- * @returns A tuple of `[red, green, blue]` with values 0-255
287
- *
288
- * @example
289
- * ```ts
290
- * oklchToRgb(0.623, 0.214, 259.815) // approximately [59, 130, 246] (blue-500)
291
- * ```
292
- */
293
- export declare function oklchToRgb(L: number, C: number, hDeg: number): [number, number, number];
294
- /**
295
- * Converts sRGB color values to OKLCH color space.
296
- *
297
- * @param r - Red channel (0-255)
298
- * @param g - Green channel (0-255)
299
- * @param b - Blue channel (0-255)
300
- * @returns A tuple of `[lightness, chroma, hue]` where lightness is 0-1,
301
- * chroma is 0 to ~0.4, and hue is 0-360 degrees
302
- *
303
- * @example
304
- * ```ts
305
- * rgbToOklch(59, 130, 246) // approximately [0.623, 0.214, 259.815]
306
- * ```
307
- */
308
- export declare function rgbToOklch(r: number, g: number, b: number): [number, number, number];
309
- /**
310
- * Formats RGBA color values into a CSS color string in the specified format.
311
- *
312
- * @param r - Red channel (0-255)
313
- * @param g - Green channel (0-255)
314
- * @param b - Blue channel (0-255)
315
- * @param a - Alpha channel (0-1)
316
- * @param fmt - The output format: `'hex'`, `'rgb'`, `'rgba'`, `'hsl'`, `'hsla'`, `'hwb'`, or `'oklch'`
317
- * @param alphaEnabled - Whether to include alpha in formats that support it (hex, oklch)
318
- * @returns A CSS color string in the requested format
319
- *
320
- * @example
321
- * ```ts
322
- * formatColor(255, 0, 0, 1, 'hex') // '#ff0000'
323
- * formatColor(255, 0, 0, 0.5, 'hex', true) // '#ff000080'
324
- * formatColor(255, 0, 0, 1, 'hsl') // 'hsl(0, 100%, 50%)'
325
- * formatColor(255, 0, 0, 1, 'oklch') // 'oklch(0.628 0.258 29.2)'
326
- * ```
327
- */
328
- export declare function formatColor(r: number, g: number, b: number, a: number, fmt: 'hex' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hwb' | 'oklch', alphaEnabled?: boolean): string;
329
- /**
330
- * Resolves the effective color format based on whether alpha is enabled.
331
- * When alpha is enabled, `'rgb'` becomes `'rgba'` and `'hsl'` becomes `'hsla'`.
332
- * When alpha is disabled, `'rgba'` becomes `'rgb'` and `'hsla'` becomes `'hsl'`.
333
- * Other formats (hex, hwb, oklch) are returned unchanged.
334
- *
335
- * @param fmt - The requested color format
336
- * @param alphaEnabled - Whether alpha channel is enabled
337
- * @returns The resolved effective color format
338
- *
339
- * @example
340
- * ```ts
341
- * resolveEffectiveFormat('rgb', true) // 'rgba'
342
- * resolveEffectiveFormat('rgba', false) // 'rgb'
343
- * resolveEffectiveFormat('hex', true) // 'hex'
344
- * ```
345
- */
346
- export declare function resolveEffectiveFormat(fmt: 'hex' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hwb' | 'oklch', alphaEnabled: boolean): 'hex' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hwb' | 'oklch';
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./translations-qefRsdGi.cjs"),r={loadingExtended:"لوڈ ہو رہا ہے، براہ کرم انتظار کریں",loadingShort:"لوڈ ہو رہا ہے...",locale:"زبان",iconDescription:"آئیکن",loadingIcon:"لوڈنگ آئیکن",failedToLoadIcon:"آئیکن لوڈ کرنے میں ناکام",editLabel:"ترمیم",selectOne:"ایک منتخب کریں",selectNone:"کوئی نہیں",selectMany:"متعدد منتخب کریں",noResults:"کوئی نتیجہ نہیں",passwordPlaceholderText:"خفیہ پاس ورڈ",togglePasswordVisibility:"پاس ورڈ کی مرئیت تبدیل کریں",toggleMenu:"مینو ٹوگل کریں",toggleAside:"سائیڈ پینل ٹوگل کریں",mainNavigation:"بنیادی نیویگیشن",sidebar:"سائیڈ بار",closeDrawer:"دراز بند کریں",closeModal:"ماڈل بند کریں",confirm:"تصدیق",cancel:"منسوخ",addLabel:"شامل کریں",removeItem:"آئٹم ہٹائیں",currentLocale:"اردو",ar:"عربی",de:"جرمن",en:"انگریزی",es:"ہسپانوی",fr:"فرانسیسی",he:"عبرانی",hi:"ہندی",it:"اطالوی",ja:"جاپانی",ko:"کوریائی",nl:"ڈچ",pl:"پولش",pt:"پرتگالی",ru:"روسی",tr:"ترکی",vi:"ویتنامی",zh:"چینی",fa:"فارسی",ur:"اردو",emailPlaceholderText:"اپنا ای میل داخل کریں",incrementValue:"قدر اضافہ کریں",decrementValue:"قدر کم کریں",dropZoneInstructions:e=>e?"منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں، یا فائل منتخب کرنے کے لیے Enter یا Space دبائیں":"فائلیں یہاں گھسیٹیں",fileSizeUnits:["بائٹس","KB","MB","GB","TB"],removeFile:"فائل حذف کریں",clearAllFiles:"تمام فائلیں صاف کریں",clearValue:"قدر صاف کریں",unknownType:"نامعلوم قسم",filesInputInstructions:(e,t,l)=>{let o=e==null||e>1?"منتخب کرنے کے لیے کلک کریں یا فائلیں یہاں گھسیٹیں":"منتخب کرنے کے لیے کلک کریں یا فائل یہاں گھسیٹیں";if(e||t){const n=[];if(e!=null&&e>1&&n.push(`زیادہ سے زیادہ ${e} فائلیں`),t&&l){const a=i.formatFileSize(t,{units:l});n.push(`ہر ایک زیادہ سے زیادہ ${a}`)}n.length>0&&(o+=` (${n.join("، ")})`)}return o},paginationLabel:"صفحہ بندی",paginationRange:(e,t,l,o)=>o>l?`قطاریں ${e} سے ${t} تک، ${l} میں سے ${o} میں سے`:`قطاریں ${e} سے ${t} تک، ${l} میں سے`,firstPage:"پہلا صفحہ",previousPage:"پچھلا صفحہ",nextPage:"اگلا صفحہ",lastPage:"آخری صفحہ",breadcrumbs:"بریڈ کرمبز",commandPalette:"کمانڈ پیلیٹ",typeACommand:"کمانڈ ٹائپ کریں...",noResultsFound:"کوئی نتیجہ نہیں ملا",noMatchingCommands:"کوئی مماثل کمانڈ نہیں ملی",appearanceSystem:"سسٹم",appearanceLight:"ہلکا",appearanceDark:"گہرا",ok:"OK",changeTypeConfirmation:"قسم تبدیل کرنے سے موجودہ قدر صاف ہو جائے گی۔ جاری رکھیں؟",notifications:"اطلاعات",markAllAsRead:"سب کو پڑھا ہوا نشان زد کریں",noNotifications:"کوئی اطلاع نہیں",schemaConflictsDetected:"اسکیما تنازعات کا پتا چلا",schemaViolationsDetected:"اسکیما خلاف ورزیوں کا پتا چلا",properties:"خصوصیات",uploading:"اپ لوڈ ہو رہا ہے...",dropFilesOrBrowse:"فائلیں یہاں چھوڑیں یا براؤز کرنے کے لیے کلک کریں",acceptedTypes:e=>`قابل قبول اقسام: ${e}`,enterUrlPrompt:"URL درج کریں:",exceeded:"(حد سے تجاوز)",pdfPreview:"PDF پیش نظارہ",lexical:{fontFamily:"فونٹ فیملی",fontSize:"فونٹ سائز",lineHeight:"لائن کی اونچائی",fontColor:"فونٹ رنگ",highlightColor:"ہائی لائٹ رنگ",backgroundColor:"پس منظر رنگ",bold:"بولڈ",italic:"ترچھا",underline:"خط کشیدہ",strikethrough:"کٹا ہوا",code:"کوڈ",clearFormatting:"فارمیٹنگ صاف کریں",normal:"عام",heading:e=>`سرخی ${e}`,bulletList:"بلٹ فہرست",orderedList:"نمبر شدہ فہرست",checkList:"چیک فہرست",indent:"اندر کریں",outdent:"باہر کریں",blockquote:"اقتباس",codeBlock:"کوڈ بلاک",horizontalRule:"افقی لکیر",insertTable:"ٹیبل داخل کریں",link:"لنک",undo:"واپس",redo:"دوبارہ",cut:"کاٹیں",copy:"نقل",paste:"چسپاں",defaultOption:"پہلے سے طے شدہ",slashCommands:"سلیش کمانڈز",noCommandsFound:"کوئی کمانڈ نہیں ملی",changeBlockType:"بلاک کی قسم تبدیل کریں",blockTypes:"بلاک کی اقسام",enterUrl:"URL درج کریں:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"صعودی ترتیب",sortDescending:"نزولی ترتیب",clearSort:"ترتیب صاف کریں",filterPlaceholder:"فلٹر...",clearFilter:"فلٹر صاف کریں",selectAll:"سب منتخب کریں",deselectAll:"سب غیر منتخب کریں",selectedCount:e=>`${e} منتخب`,resetAll:"سب ری سیٹ کریں",noResults:"کوئی نتائج نہیں ملے",loading:"لوڈ ہو رہا ہے...",filterPanelAddCondition:"شرط شامل کریں",filterPanelApply:"لاگو کریں",filterPanelClear:"فلٹرز صاف کریں",filterPanelAnd:"اور",filterPanelOr:"یا",filterPanelContains:"شامل ہے",filterPanelNotContains:"شامل نہیں ہے",filterPanelEquals:"برابر ہے",filterPanelNotEquals:"برابر نہیں ہے",filterPanelStartsWith:"سے شروع ہوتا ہے",filterPanelEndsWith:"پر ختم ہوتا ہے",filterPanelIsNull:"خالی ہے",filterPanelIsNotNull:"خالی نہیں ہے",filterPanelGt:"سے بڑا",filterPanelGte:"سے بڑا یا برابر",filterPanelLt:"سے چھوٹا",filterPanelLte:"سے چھوٹا یا برابر",filterPanelBetween:"کے درمیان",filterPanelValuePlaceholder:"قدر...",sortMultiHint:"متعدد کالموں کو ترتیب دینے کے لیے Shift دبائیں",columnVisibility:"کالم",showAllColumns:"سب دکھائیں",menuSortAsc:"صعودی ترتیب",menuSortDesc:"نزولی ترتیب",menuClearSort:"ترتیب ہٹائیں",menuHideColumn:"کالم چھپائیں",menuChooseColumns:"کالم منتخب کریں",menuResetColumns:"کالم ری سیٹ کریں",menuFilter:"فلٹر",rowCount:(e,t)=>`قطاریں: ${e} کل قطاریں: ${t}`,filterTagsPlaceholder:"قدریں منتخب کریں...",groupCount:e=>`${e} آئٹم`,collapseGroup:"گروپ سکیڑیں",expandGroup:"گروپ پھیلائیں",describeFilter:{textContains:(e,t)=>`${e} "${t}" پر مشتمل`,textNotContains:(e,t)=>`${e} "${t}" پر مشتمل نہیں`,textEquals:(e,t)=>`${e} "${t}" کے برابر`,textNotEquals:(e,t)=>`${e} "${t}" کے برابر نہیں`,textStartsWith:(e,t)=>`${e} "${t}" سے شروع ہوتا ہے`,textEndsWith:(e,t)=>`${e} "${t}" پر ختم ہوتا ہے`,compareEq:(e,t)=>`${e} = ${t}`,compareNeq:(e,t)=>`${e} ≠ ${t}`,compareGt:(e,t)=>`${e} > ${t}`,compareGte:(e,t)=>`${e} ≥ ${t}`,compareLt:(e,t)=>`${e} < ${t}`,compareLte:(e,t)=>`${e} ≤ ${t}`,rangeBetween:(e,t,l)=>`${e} ${t} اور ${l} کے درمیان`,rangeGte:(e,t)=>`${e} ≥ ${t}`,rangeLte:(e,t)=>`${e} ≤ ${t}`,setIn:(e,t)=>`${e} [${t}] میں`,setNotIn:(e,t)=>`${e} [${t}] میں نہیں`,booleanIs:(e,t)=>`${e} ${t} ہے`,isNull:e=>`${e} خالی ہے`,isNotNull:e=>`${e} خالی نہیں ہے`,compositeAnd:e=>e.join(" اور "),compositeOr:e=>e.join(" یا ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Loading PDF...",loadFailed:"Failed to load PDF",invalidPdf:"Invalid PDF file",pageOutOfRange:(e,t)=>`Page ${e} is out of range (1-${t})`,renderFailed:"Failed to render PDF page"}};exports.default=r;
@@ -1,2 +0,0 @@
1
- "use strict";const e=require("@tempots/dom"),_=require("./translations-qefRsdGi.cjs"),B=require("./input-container-BkPcNDaZ.cjs"),j=require("./stack-dwLevGa2.cjs"),T=require("./session-id-B5lJMzbB.cjs"),p=require("@tempots/std"),P=e.html.span(e.attr.class("bc-input-wrapper__required")," *");function G(n){const t=["bc-input-wrapper"];return n!=="vertical"&&t.push(`bc-input-wrapper--${n}`),t.join(" ")}function J(n,t){const s=["bc-input-wrapper__label-text"];return n?s.push("bc-input-wrapper__label-text--error"):t?s.push("bc-input-wrapper__label-text--disabled"):s.push("bc-input-wrapper__label-text--default"),s.join(" ")}function Q(n,t){if(n==="horizontal-fixed"&&t!=null)return`--input-wrapper-label-width: ${t}`}const O=({fullWidth:n=!1,required:t,label:s,labelChildren:i,context:r,description:l,content:o,error:a,labelFor:c,hasError:d,disabled:u,layout:m,labelWidth:g},...v)=>{const f=d??a!=null,h=u??!1,y=m??"vertical",w=T.sessionId("input-wrapper"),D=l?`${w}-description`:void 0,I=a!=null?`${w}-error`:void 0,A=e.computedOf(y)(b=>b!=="vertical"),K=e.computedOf(y,g??void 0)((b,C)=>Q(b,C));return e.html.div(e.attr.class(e.Value.map(y,b=>G(b))),e.attr.class(e.Value.map(n,b=>b?"bc-input-wrapper--full-width":"")),e.attr.style(K),s!=null||r!=null?e.html.div(e.attr.class("bc-input-wrapper__header"),e.html.div(e.attr.class("bc-input-wrapper__label-section"),e.html.label(e.attr.class("bc-input-wrapper__label"),c!=null?e.attr.for(c):e.Empty,e.html.span(e.attr.class(e.computedOf(f,h)((b,C)=>J(b??!1,C??!1))),s),s!=null&&t?P:e.Empty),e.When(e.computedOf(A,l)((b,C)=>b&&C!=null),()=>e.html.div(e.attr.class("bc-input-wrapper__description bc-input-wrapper__description--under-label"),e.attr.id(D),l))),r!=null?j.Label(r):e.Empty,i):e.Empty,e.html.div(e.attr.class("bc-input-wrapper__content"),[D,I].filter(Boolean).length>0?e.dataAttr("describedby",[D,I].filter(Boolean).join(" ")):e.Empty,t?e.dataAttr("required","true"):e.Empty,e.When(f,()=>e.dataAttr("invalid","true")),o),e.When(e.computedOf(A,l)((b,C)=>!b&&C!=null),()=>e.html.div(e.attr.class("bc-input-wrapper__description"),e.attr.id(D),l)),e.When(f,()=>e.html.div(e.attr.class("bc-input-wrapper__error"),e.attr.id(I),e.aria.live("polite"),e.attr.role("alert"),a)),...v)};function X({size:n="sm",icon:t="line-md:close",disabled:s,roundedness:i="full",color:r="base",onClick:l,label:o},...a){return e.Use(_.BeatUII18n,c=>{const d=e.coalesce(o,c.$.closeModal);return B.Button({variant:"text",size:n,roundedness:i,disabled:s,color:r,onClick:l},e.attr.title(d),e.aria.label(d),...a,_.Icon({icon:t,size:n??"sm"}))})}const Y=n=>{const{value:t,onBlur:s,onChange:i,onInput:r,placeholder:l,disabled:o,id:a,activeIcon:c,inactiveIcon:d,size:u="md"}=n,m=a??T.sessionId("checkbox"),g=`${m}-label`,v=()=>{if(e.Value.get(o??!1))return;const h=e.Value.get(t);i?.(!h),r?.(!h)},f=h=>{e.Value.get(o??!1)||(h.key===" "||h.key==="Enter")&&(h.preventDefault(),v())};return B.InputContainer({baseContainer:!0,growInput:!1,...n,input:e.html.span(e.attr.class("bc-checkbox-input"),e.html.span(e.attr.class("bc-checkbox-input__checkbox"),e.attr.class(e.Value.map(t,h=>h?"bc-checkbox-input__checkbox--checked":"bc-checkbox-input__checkbox--unchecked")),e.attr.class(e.Value.map(o??!1,h=>h?"bc-checkbox-input__checkbox--disabled":"")),e.attr.id(m),e.attr.role("checkbox"),e.attr.tabindex(e.Value.map(o??!1,h=>h?-1:0)),e.aria.checked(t),e.aria.disabled(o),l!=null?e.aria.labelledby(g):e.Empty,e.on.keydown(f),s!=null?e.on.blur(s):e.Empty,_.Icon({icon:e.computedOf(t,c,d)((h,y,w)=>h?y??"ri:checkbox-fill":w??"mdi:checkbox-blank-outline"),accessibility:"decorative",size:u})),l!=null?e.html.label(e.attr.class("bc-checkbox-input__label"),e.attr.id(g),e.attr.for(m),j.MutedLabel(l)):e.Empty)},e.on.click(v))},q=((n,t)=>()=>{n.markTouched(),t?.()}),E=(n,t)=>s=>{n.change(s),t?.(s)};function M(n,t){const{controller:s,onBlur:i,onChange:r,id:l,triggerOn:o,...a}=t;return n({id:l??s.name,disabled:s.disabled,value:s.signal,hasError:s.errorVisible,name:s.name,...a,onInput:o==="input"?E(s,r):void 0,onChange:o!=="input"?E(s,r):void 0,onBlur:q(s,i)})}function Z(n,{id:t,labelFor:s,...i},...r){const l=t??i.controller.name??T.sessionId("control"),o=s??l;return O({...i,hasError:i.controller.errorVisible,error:e.TextNode(i.controller.error.map(a=>a??"")),labelFor:o,content:M(a=>n({...a,id:l}),i)},...r)}function H(n,t){const{toInput:s,fromInput:i,controller:r,...l}=t,o=r.transform(s,i);return M(n,{...l,controller:o})}function tt(n,{id:t,labelFor:s,...i},...r){const l=t??i.controller.name??T.sessionId("control");return O({...i,labelFor:s??l,content:H(n,{...i,id:l})},...r)}function et(n){return n.split(".").map(s=>{const i=s.match(/^\[(\d+)\]$/);return i?Number(i[1]):s})}function F(n){return typeof n=="number"?`[${n}]`:`.${n}`}function $(n){if(n.length===0)return"";const[t,...s]=n;return[typeof t=="number"?`[${t}]`:t,...s.map(F)].join("")}const st={valid:p.Validation.valid,invalid(n){return p.Validation.invalid({message:n})},invalidFields(n){const t={};for(const[s,i]of Object.entries(n))t[s]=typeof i=="string"?{message:i}:i;return p.Validation.invalid({dependencies:t})},fromError(n){return p.Validation.invalid(n)}};function V(n){return function(s){if(s.type==="valid")return s;let i=s.error;for(const r of n)if(i=i?.dependencies?.[r],i==null)return p.Validation.valid;return p.Validation.invalid(i)}}class k{path;change;signal;status;error;hasError;touched;errorVisible;dirty;dependencyErrors;#t={disabled:e.prop(!1),touched:e.prop(!1)};#s;#e=e.prop(void 0);parent;disabled;#n=[];disabledOrHasErrors;constructor(t,s,i,r,l,o=p.strictEqual){this.path=t,this.change=s,this.signal=i,this.status=r,this.#s=o,this.#e.set(i.value),this.error=r.map(a=>a?.type==="invalid"?a.error?.message:void 0),this.hasError=this.error.map(a=>a!=null),this.touched=this.#t.touched,l.validationMode?this.errorVisible=e.computedOf(this.hasError,this.touched,l.validationMode)((a,c,d)=>d==="eager"?!!a:!!a&&!!c):this.errorVisible=e.computedOf(this.hasError,this.touched)((a,c)=>!!a&&!!c),this.dirty=e.computedOf(this.signal,this.#e)((a,c)=>!this.#s(a,c)),this.dependencyErrors=r.map(a=>a?.type==="invalid"?a.error?.dependencies:void 0),this.parent=l,this.disabled=e.computedOf(this.#t.disabled,l.disabled)((a,c)=>a||c),this.disabledOrHasErrors=e.computedOf(this.disabled,this.hasError)((a,c)=>a||c),this.onDispose(()=>{this.#t.disabled.dispose(),this.#t.touched.dispose(),this.disabled.dispose(),this.error.dispose(),this.errorVisible.dispose(),this.dirty.dispose(),this.#e.dispose(),this.dependencyErrors.dispose(),this.disabledOrHasErrors.dispose()})}get name(){return $(this.path)}onDispose=t=>{this.#n.push(t)};dispose=()=>{for(const t of this.#n)try{t()}catch(s){console.error("Error in dispose callback:",s)}this.#n.length=0};setDisabled=t=>{this.#t.disabled.set(t)};disable=()=>this.setDisabled(!0);enable=()=>this.setDisabled(!1);markTouched=()=>{this.#t.touched.set(!0)};resetTouched=()=>{this.#t.touched.set(!1)};markPristine=()=>{this.#e.set(this.signal.value)};reset=()=>{this.change(this.#e.value)};array=(t=p.strictEqual)=>new N(this.path,this.change,this.signal,this.status,this.parent,t);object=(t=p.strictEqual)=>new W(this.path,this.change,this.signal,this.status,this.parent,t);transform=(t,s,i=[],r=p.strictEqual)=>new k([...this.path,...i],l=>this.change(s(l)),this.signal.map(t,r),this.status.map(V(i)),this.parent,r);asyncTransform=(t,s,i,r=[],l=p.strictEqual)=>new k([...this.path,...r],o=>{s(o).then(a=>this.change(a))},this.signal.mapAsync(t,i,void 0,l),this.status.map(V(r)),this.parent,l)}class W extends k{#t=new Map;#s=new Map;#e=new Map;#n=e.prop(!1);touchedDeep=this.#n;#r=new Map;#i=new Map;#o=e.prop(!1);dirtyDeep=this.#o;#c;#h;#l=()=>{let t=!1;for(const s of this.#s.values())if(s){t=!0;break}this.#n.set(this.touched.value||t)};constructor(t,s,i,r,l,o){super(t,s,i.map(c=>c??{},o),r,l,o),this.#c=this.touched.on(()=>{this.#l()}),this.#h=this.dirty.on(()=>{this.#a()});const a=this.signal.on(()=>this.#a());this.onDispose(()=>{for(const c of this.#t.values())c.dispose();this.#t.clear();for(const c of this.#e.values())c();this.#e.clear(),this.#s.clear(),this.#n.dispose();for(const c of this.#i.values())c();this.#i.clear(),this.#r.clear(),this.#o.dispose(),this.#c(),this.#h(),a()})}field=t=>{if(this.#t.has(t))return this.#t.get(t);const s=async o=>{this.change({...this.signal.value,[t]:o})},i=new k([...this.path,t],s,this.signal.map(o=>o[t]),this.status.map(V([t])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#t.set(t,i);const r=i.touched.on(o=>{this.#s.set(t,o),this.#l()});this.#e.set(t,r);const l=i.dirty.on(o=>{this.#r.set(t,o),this.#a()});return this.#i.set(t,l),i};markAllTouched=()=>{this.markTouched();const t=this.signal.value;for(const s of Object.keys(t))this.field(s).markTouched();for(const s of this.#t.values())s.markTouched()};markAllPristine=()=>{this.markPristine();const t=this.signal.value;for(const s of Object.keys(t))this.field(s).markPristine?.();for(const s of this.#t.values())s.markPristine?.()};#a=()=>{let t=!1;for(const s of this.#r.values())if(s){t=!0;break}this.#o.set(this.dirty.value||t)}}class N extends k{#t=new Array;length;#s=new Map;#e=new Map;#n=e.prop(!1);touchedDeep=this.#n;#r=new Map;#i=new Map;#o=e.prop(!1);dirtyDeep=this.#o;#c;#h;#l=()=>{let t=!1;for(const s of this.#s.values())if(s){t=!0;break}this.#n.set(this.touched.value||t)};constructor(t,s,i,r,l,o){const a=i.map(u=>u??[],o);super(t,s,a,r,l,o);const c=a.on(u=>{const m=this.#t.length-u.length;m>0&&(this.#t.splice(u.length,m).forEach((g,v)=>{const f=u.length+v;g.dispose(),this.#e.get(f)?.(),this.#e.delete(f),this.#s.delete(f),this.#i.get(f)?.(),this.#i.delete(f),this.#r.delete(f)}),this.#l(),this.#a())});this.length=a.map(u=>u.length),this.#c=this.touched.on(()=>{this.#l()}),this.#h=this.dirty.on(()=>{this.#a()});const d=this.signal.on(()=>this.#a());this.onDispose(()=>{for(const u of this.#t)u.dispose();this.length.dispose(),this.#t.length=0,c(),a.dispose();for(const u of this.#e.values())u();this.#e.clear(),this.#s.clear(),this.#n.dispose();for(const u of this.#i.values())u();this.#i.clear(),this.#r.clear(),this.#o.dispose(),this.#c(),this.#h(),d()})}item=t=>{if(this.#t[t])return this.#t[t];const s=async o=>{const a=this.signal.value.slice();a[t]=o,this.change(a)},i=new k([...this.path,t],s,this.signal.map(o=>o[t]),this.status.map(V([t])),{disabled:this.disabled,validationMode:this.parent.validationMode});this.#t[t]=i;const r=i.touched.on(o=>{this.#s.set(t,o),this.#l()});this.#e.set(t,r);const l=i.dirty.on(o=>{this.#r.set(t,o),this.#a()});return this.#i.set(t,l),i};push=(...t)=>{this.change([...this.signal.value,...t])};pop=()=>{this.splice(this.signal.value.length-1,1)};shift=()=>{this.splice(0,1)};unshift=(...t)=>{this.change([...t,...this.signal.value])};removeAt=t=>{this.splice(t,1)};splice=(t,s)=>{const i=this.signal.value.slice();i.splice(t,s),this.change(i)};move=(t,s,i=1)=>{if(i<1||t===s)return;const r=this.signal.value.slice(),l=r.splice(t,i);r.splice(s,0,...l),this.change(r)};markAllTouched=()=>{this.markTouched();const t=this.signal.value.length;for(let s=0;s<t;s++)this.item(s).markTouched()};markAllPristine=()=>{this.markPristine();const t=this.signal.value.length;for(let s=0;s<t;s++)this.item(s).markPristine?.()};#a=()=>{let t=!1;for(const s of this.#r.values())if(s){t=!0;break}this.#o.set(this.dirty.value||t)}}function z(n){function t(s){return typeof s=="number"?s:s.toString()}return n.map(s=>typeof s=="object"&&s.key!=null?t(s.key):t(s))}function L(n){const t=n.filter(r=>r.path==null||r.path.length===0).map(r=>r.message),s=n.filter(r=>r.path!=null&&r.path.length>0).reduce((r,l)=>{const o=z(l.path),a=o.pop();let c=r;for(const d of o)c.dependencies==null&&(c.dependencies={}),c.dependencies[d]==null&&(c.dependencies[d]={}),c=c.dependencies[d];return c.dependencies==null&&(c.dependencies={}),c.dependencies[a]={message:l.message},r},{}),i=t.join(`
2
- `);return{...s,message:i!=""?i:void 0}}function R({initialValue:n,onChange:t,validate:s,equals:i,validationMode:r,validateDebounceMs:l}){const o=e.Value.deriveProp(n),a=e.prop(p.Validation.valid),c=e.prop(!1),d=e.prop(r??"onTouched"),u=h=>{a.set(h)};let m;const g=async h=>{if(s!=null){const y=await s(h);u(y)}},v=async h=>{o.set(h),t?.(h);const y=d.value;if(s!=null){if(y==="onSubmit")return;const w=l??0;w>0?(m&&clearTimeout(m),m=setTimeout(()=>{g(h)},w)):await g(h)}},f=new k([],v,o,a,{disabled:c,validationMode:d},i??p.strictEqual);return f.onDispose(()=>{c.dispose(),o.dispose(),a.dispose(),d.dispose(),m&&clearTimeout(m)}),{controller:f,setStatus:u}}function x(n){return e.Fragment(e.attr.disabled(n.disabled),e.attr.name(n.name))}function nt(n,{triggerOn:t="change"}={}){return e.Fragment(x(n),e.attr.value(n.signal),(t==="input"?e.on.input:e.on.change)(e.emitValue(n.change)))}function it(n,{triggerOn:t="change"}={}){return e.Fragment(x(n),e.attr.valueAsNumber(n.signal),(t==="input"?e.on.input:e.on.change)(e.emitValueAsNumber(n.change)))}function S(n){return n.issues!=null?p.Validation.invalid(L(n.issues)):p.Validation.valid}async function rt({task:n,errorMessage:t,errorPath:s=["root"],validation:i}){try{const r=await n();return i!=null?i(r):p.Validation.valid}catch(r){const l=t??(r instanceof Error?r.message:"Operation failed");return s.length===1&&s[0]==="root"?p.Validation.invalid({message:l}):p.Validation.invalid({dependencies:U(s,l)})}}function U(n,t){if(n.length===1)return{[n[0]]:{message:t}};const[s,...i]=n;return{[s]:{dependencies:U(i,t)}}}function at({initialValue:n={},schema:t,onSubmit:s=async()=>p.Validation.valid,validationMode:i,validateDebounceMs:r}){const{controller:l,setStatus:o}=R({initialValue:n,validationMode:i??"onTouched",validateDebounceMs:r,validate:(i??"onTouched")==="onSubmit"||t==null?void 0:async u=>S(await t["~standard"].validate(u))}),a=e.prop(!1),c=l.object();return c.onDispose(()=>a.dispose()),{controller:c,setStatus:o,submit:async u=>{if(a.set(!0),u?.preventDefault(),c.markAllTouched(),t!=null){const g=c.signal.value,v=S(await t["~standard"].validate(g));if(o(v),v.type==="invalid"){a.set(!1);return}}const m=await s(c.signal.value);a.set(!1),m.type==="invalid"&&o(m)},submitting:a}}exports.ArrayController=N;exports.BaseControl=M;exports.BaseMappedControl=H;exports.CheckboxInput=Y;exports.CloseButton=X;exports.Control=Z;exports.Controller=k;exports.ControllerValidation=st;exports.InputWrapper=O;exports.MappedControl=tt;exports.ObjectController=W;exports.RequiredSymbol=P;exports.connectCommonAttributes=x;exports.connectNumberInput=it;exports.connectStringInput=nt;exports.convertStandardSchemaIssues=L;exports.convertStandardSchemaPathToPath=z;exports.makeMapValidation=V;exports.makeOnBlurHandler=q;exports.makeOnChangeHandler=E;exports.parsePath=et;exports.pathToString=$;exports.standardSchemaResultToValidation=S;exports.taskToValidation=rt;exports.useController=R;exports.useForm=at;exports.wrapSegment=F;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-qefRsdGi.cjs"),h={loadingExtended:"Đang tải, vui lòng đợi",loadingShort:"Đang tải...",locale:"Ngôn ngữ",iconDescription:"Biểu tượng",loadingIcon:"Biểu tượng tải",failedToLoadIcon:"Không thể tải biểu tượng",editLabel:"Chỉnh sửa",selectOne:"Chọn một",selectNone:"Không có",selectMany:"Chọn nhiều",noResults:"Không có kết quả",passwordPlaceholderText:"Mật khẩu bí mật",togglePasswordVisibility:"Chuyển đổi hiển thị mật khẩu",toggleMenu:"Chuyển đổi menu",toggleAside:"Chuyển đổi bảng bên",mainNavigation:"Điều hướng chính",sidebar:"Thanh bên",closeDrawer:"Đóng ngăn kéo",closeModal:"Đóng modal",confirm:"Xác nhận",cancel:"Hủy",addLabel:"Thêm",removeItem:"Xóa mục",currentLocale:"Tiếng Việt",ar:"Tiếng Ả Rập",de:"Tiếng Đức",en:"Tiếng Anh",es:"Tiếng Tây Ban Nha",fr:"Tiếng Pháp",hi:"Tiếng Hindi",it:"Tiếng Ý",ja:"Tiếng Nhật",ko:"Tiếng Hàn",nl:"Tiếng Hà Lan",pl:"Tiếng Ba Lan",pt:"Tiếng Bồ Đào Nha",ru:"Tiếng Nga",tr:"Tiếng Thổ Nhĩ Kỳ",vi:"Tiếng Việt",zh:"Tiếng Trung",he:"Tiếng Do Thái",fa:"Tiếng Ba Tư",ur:"Tiếng Urdu",emailPlaceholderText:"Nhập email của bạn",incrementValue:"Tăng giá trị",decrementValue:"Giảm giá trị",dropZoneInstructions:n=>n?"Nhấp để chọn hoặc kéo tệp vào đây, hoặc nhấn Enter hoặc Space để mở trình chọn tệp":"Kéo tệp vào đây",fileSizeUnits:["Byte","KB","MB","GB","TB"],removeFile:"Xóa tệp",clearAllFiles:"Xóa tất cả tệp",clearValue:"Xóa giá trị",unknownType:"Loại không xác định",filesInputInstructions:(n,t,e)=>{let i=n==null||n>1?"Nhấp để chọn hoặc kéo tệp vào đây":"Nhấp để chọn hoặc kéo một tệp vào đây";if(n||t){const o=[];if(n!=null&&n>1&&o.push(`tối đa ${n} tệp`),t&&e){const l=a.formatFileSize(t,{units:e});o.push(`mỗi tệp tối đa ${l}`)}o.length>0&&(i+=` (${o.join(", ")})`)}return i},paginationLabel:"Phân trang",paginationRange:(n,t,e,i)=>i>e?`Hàng ${n} đến ${t} trong ${e} trên ${i}`:`Hàng ${n} đến ${t} trong ${e}`,firstPage:"Trang đầu",previousPage:"Trang trước",nextPage:"Trang tiếp",lastPage:"Trang cuối",breadcrumbs:"Thanh điều hướng",commandPalette:"Bảng lệnh",typeACommand:"Nhập lệnh...",noResultsFound:"Không tìm thấy kết quả",noMatchingCommands:"Không có lệnh phù hợp",appearanceSystem:"Hệ thống",appearanceLight:"Sáng",appearanceDark:"Tối",ok:"OK",changeTypeConfirmation:"Thay đổi loại sẽ xóa giá trị hiện tại. Tiếp tục?",notifications:"Thông báo",markAllAsRead:"Đánh dấu tất cả đã đọc",noNotifications:"Không có thông báo",schemaConflictsDetected:"Phát hiện xung đột lược đồ",schemaViolationsDetected:"Phát hiện vi phạm lược đồ",properties:"Thuộc tính",uploading:"Đang tải lên...",dropFilesOrBrowse:"Kéo thả tệp vào đây hoặc nhấp để duyệt",acceptedTypes:n=>`Loại tệp được chấp nhận: ${n}`,enterUrlPrompt:"Nhập URL:",exceeded:"(vượt quá)",pdfPreview:"Xem trước PDF",lexical:{fontFamily:"Phông chữ",fontSize:"Cỡ chữ",lineHeight:"Chiều cao dòng",fontColor:"Màu chữ",highlightColor:"Màu đánh dấu",backgroundColor:"Màu nền",bold:"Đậm",italic:"Nghiêng",underline:"Gạch chân",strikethrough:"Gạch ngang",code:"Mã",clearFormatting:"Xóa định dạng",normal:"Bình thường",heading:n=>`Tiêu đề ${n}`,bulletList:"Danh sách dấu đầu dòng",orderedList:"Danh sách đánh số",checkList:"Danh sách kiểm tra",indent:"Thụt lề",outdent:"Giảm thụt lề",blockquote:"Trích dẫn",codeBlock:"Khối mã",horizontalRule:"Đường kẻ ngang",insertTable:"Chèn bảng",link:"Liên kết",undo:"Hoàn tác",redo:"Làm lại",cut:"Cắt",copy:"Sao chép",paste:"Dán",defaultOption:"Mặc định",slashCommands:"Lệnh gạch chéo",noCommandsFound:"Không tìm thấy lệnh",changeBlockType:"Đổi loại khối",blockTypes:"Loại khối",enterUrl:"Nhập URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Sắp xếp tăng dần",sortDescending:"Sắp xếp giảm dần",clearSort:"Xóa sắp xếp",filterPlaceholder:"Lọc...",clearFilter:"Xóa bộ lọc",selectAll:"Chọn tất cả",deselectAll:"Bỏ chọn tất cả",selectedCount:n=>`${n} đã chọn`,resetAll:"Đặt lại tất cả",noResults:"Không tìm thấy kết quả",loading:"Đang tải...",filterPanelAddCondition:"Thêm điều kiện",filterPanelApply:"Áp dụng",filterPanelClear:"Xóa bộ lọc",filterPanelAnd:"VÀ",filterPanelOr:"HOẶC",filterPanelContains:"Chứa",filterPanelNotContains:"Không chứa",filterPanelEquals:"Bằng",filterPanelNotEquals:"Không bằng",filterPanelStartsWith:"Bắt đầu với",filterPanelEndsWith:"Kết thúc với",filterPanelIsNull:"Trống",filterPanelIsNotNull:"Không trống",filterPanelGt:"Lớn hơn",filterPanelGte:"Lớn hơn hoặc bằng",filterPanelLt:"Nhỏ hơn",filterPanelLte:"Nhỏ hơn hoặc bằng",filterPanelBetween:"Trong khoảng",filterPanelValuePlaceholder:"Giá trị...",sortMultiHint:"Giữ Shift để sắp xếp nhiều cột",columnVisibility:"Cột",showAllColumns:"Hiển thị tất cả",menuSortAsc:"Sắp xếp tăng dần",menuSortDesc:"Sắp xếp giảm dần",menuClearSort:"Xóa sắp xếp",menuHideColumn:"Ẩn cột",menuChooseColumns:"Chọn cột",menuResetColumns:"Đặt lại cột",menuFilter:"Lọc",rowCount:(n,t)=>`Hàng: ${n} Tổng hàng: ${t}`,filterTagsPlaceholder:"Chọn giá trị...",groupCount:n=>`${n} mục`,collapseGroup:"Thu gọn nhóm",expandGroup:"Mở rộng nhóm",describeFilter:{textContains:(n,t)=>`${n} chứa "${t}"`,textNotContains:(n,t)=>`${n} không chứa "${t}"`,textEquals:(n,t)=>`${n} bằng "${t}"`,textNotEquals:(n,t)=>`${n} không bằng "${t}"`,textStartsWith:(n,t)=>`${n} bắt đầu bằng "${t}"`,textEndsWith:(n,t)=>`${n} kết thúc bằng "${t}"`,compareEq:(n,t)=>`${n} = ${t}`,compareNeq:(n,t)=>`${n} ≠ ${t}`,compareGt:(n,t)=>`${n} > ${t}`,compareGte:(n,t)=>`${n} ≥ ${t}`,compareLt:(n,t)=>`${n} < ${t}`,compareLte:(n,t)=>`${n} ≤ ${t}`,rangeBetween:(n,t,e)=>`${n} giữa ${t} và ${e}`,rangeGte:(n,t)=>`${n} ≥ ${t}`,rangeLte:(n,t)=>`${n} ≤ ${t}`,setIn:(n,t)=>`${n} trong [${t}]`,setNotIn:(n,t)=>`${n} không trong [${t}]`,booleanIs:(n,t)=>`${n} là ${t}`,isNull:n=>`${n} trống`,isNotNull:n=>`${n} không trống`,compositeAnd:n=>n.join(" VÀ "),compositeOr:n=>n.join(" HOẶC ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:n=>`Heading ${n}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Đang tải PDF...",loadFailed:"Không thể tải PDF",invalidPdf:"Tệp PDF không hợp lệ",pageOutOfRange:(n,t)=>`Trang ${n} nằm ngoài phạm vi (1-${t})`,renderFailed:"Không thể hiển thị trang PDF"}};exports.default=h;