@fuf-stack/uniform 1.10.3 → 1.11.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 (552) hide show
  1. package/dist/Checkboxes/index.cjs +4 -18
  2. package/dist/Checkboxes/index.d.cts +2 -11
  3. package/dist/Checkboxes/index.d.ts +2 -11
  4. package/dist/Checkboxes/index.js +3 -19
  5. package/dist/Checkboxes-CGWhnpBp.js +115 -0
  6. package/dist/Checkboxes-CGWhnpBp.js.map +1 -0
  7. package/dist/Checkboxes-Ds6bzl6p.cjs +127 -0
  8. package/dist/Checkboxes-Ds6bzl6p.cjs.map +1 -0
  9. package/dist/FieldArray/index.cjs +4 -21
  10. package/dist/FieldArray/index.d.cts +2 -10
  11. package/dist/FieldArray/index.d.ts +2 -10
  12. package/dist/FieldArray/index.js +3 -22
  13. package/dist/FieldArray-BexXN9bO.cjs +515 -0
  14. package/dist/FieldArray-BexXN9bO.cjs.map +1 -0
  15. package/dist/FieldArray-D3iUaRLo.js +503 -0
  16. package/dist/FieldArray-D3iUaRLo.js.map +1 -0
  17. package/dist/FieldCard/index.cjs +3 -18
  18. package/dist/FieldCard/index.d.cts +2 -97
  19. package/dist/FieldCard/index.d.ts +2 -97
  20. package/dist/FieldCard/index.js +3 -19
  21. package/dist/FieldCard-mpmErfDK.js +121 -0
  22. package/dist/FieldCard-mpmErfDK.js.map +1 -0
  23. package/dist/FieldCard-pP7aniZU.cjs +133 -0
  24. package/dist/FieldCard-pP7aniZU.cjs.map +1 -0
  25. package/dist/FieldCopyTestIdButton-AaLwu_8y.cjs +41 -0
  26. package/dist/FieldCopyTestIdButton-AaLwu_8y.cjs.map +1 -0
  27. package/dist/FieldCopyTestIdButton-Cx8AXJhO.js +29 -0
  28. package/dist/FieldCopyTestIdButton-Cx8AXJhO.js.map +1 -0
  29. package/dist/FieldValidationError-Cq6aI0tE.cjs +65 -0
  30. package/dist/FieldValidationError-Cq6aI0tE.cjs.map +1 -0
  31. package/dist/FieldValidationError-D86DPSOH.js +53 -0
  32. package/dist/FieldValidationError-D86DPSOH.js.map +1 -0
  33. package/dist/Form/index.cjs +4 -13
  34. package/dist/Form/index.d.cts +2 -11
  35. package/dist/Form/index.d.ts +3 -11
  36. package/dist/Form/index.js +3 -14
  37. package/dist/Form-CFmCTl60.js +119 -0
  38. package/dist/Form-CFmCTl60.js.map +1 -0
  39. package/dist/Form-FvN3SXfF.cjs +130 -0
  40. package/dist/Form-FvN3SXfF.cjs.map +1 -0
  41. package/dist/FormContext-C2_WMi_v.d.ts +18 -0
  42. package/dist/FormContext-C2_WMi_v.d.ts.map +1 -0
  43. package/dist/FormContext-C3GymQOA.cjs +275 -0
  44. package/dist/FormContext-C3GymQOA.cjs.map +1 -0
  45. package/dist/FormContext-CN9n_KdE.js +229 -0
  46. package/dist/FormContext-CN9n_KdE.js.map +1 -0
  47. package/dist/FormContext-Dl7KL_wl.d.cts +18 -0
  48. package/dist/FormContext-Dl7KL_wl.d.cts.map +1 -0
  49. package/dist/Grid/index.cjs +4 -9
  50. package/dist/Grid/index.d.cts +2 -8
  51. package/dist/Grid/index.d.ts +2 -8
  52. package/dist/Grid/index.js +3 -10
  53. package/dist/Grid-DEH7Sezi.js +23 -0
  54. package/dist/Grid-DEH7Sezi.js.map +1 -0
  55. package/dist/Grid-DG60vYYG.cjs +35 -0
  56. package/dist/Grid-DG60vYYG.cjs.map +1 -0
  57. package/dist/Input/index.cjs +4 -19
  58. package/dist/Input/index.d.cts +2 -11
  59. package/dist/Input/index.d.ts +2 -11
  60. package/dist/Input/index.js +3 -20
  61. package/dist/Input--h5t7Sbl.js +94 -0
  62. package/dist/Input--h5t7Sbl.js.map +1 -0
  63. package/dist/Input-DKfFFOpo.cjs +106 -0
  64. package/dist/Input-DKfFFOpo.cjs.map +1 -0
  65. package/dist/RadioBoxes/index.cjs +5 -20
  66. package/dist/RadioBoxes/index.d.cts +2 -10
  67. package/dist/RadioBoxes/index.d.ts +2 -10
  68. package/dist/RadioBoxes/index.js +3 -21
  69. package/dist/RadioBoxes-7qdHj3ti.js +138 -0
  70. package/dist/RadioBoxes-7qdHj3ti.js.map +1 -0
  71. package/dist/RadioBoxes-Bd9ahl4i.cjs +156 -0
  72. package/dist/RadioBoxes-Bd9ahl4i.cjs.map +1 -0
  73. package/dist/RadioTabs/index.cjs +4 -18
  74. package/dist/RadioTabs/index.d.cts +2 -10
  75. package/dist/RadioTabs/index.d.ts +2 -10
  76. package/dist/RadioTabs/index.js +3 -19
  77. package/dist/RadioTabs-DXs98jng.js +119 -0
  78. package/dist/RadioTabs-DXs98jng.js.map +1 -0
  79. package/dist/RadioTabs-DcEUdW7r.cjs +132 -0
  80. package/dist/RadioTabs-DcEUdW7r.cjs.map +1 -0
  81. package/dist/Radios/index.cjs +4 -18
  82. package/dist/Radios/index.d.cts +2 -9
  83. package/dist/Radios/index.d.ts +2 -9
  84. package/dist/Radios/index.js +3 -19
  85. package/dist/Radios-BIx06mzU.js +75 -0
  86. package/dist/Radios-BIx06mzU.js.map +1 -0
  87. package/dist/Radios-CIPNqPzi.cjs +87 -0
  88. package/dist/Radios-CIPNqPzi.cjs.map +1 -0
  89. package/dist/Select/index.cjs +4 -19
  90. package/dist/Select/index.d.cts +2 -11
  91. package/dist/Select/index.d.ts +2 -11
  92. package/dist/Select/index.js +3 -20
  93. package/dist/Select-BsL7qn2v.cjs +246 -0
  94. package/dist/Select-BsL7qn2v.cjs.map +1 -0
  95. package/dist/Select-CBjqYDcs.js +233 -0
  96. package/dist/Select-CBjqYDcs.js.map +1 -0
  97. package/dist/Slider/index.cjs +4 -18
  98. package/dist/Slider/index.d.cts +2 -10
  99. package/dist/Slider/index.d.ts +2 -10
  100. package/dist/Slider/index.js +3 -19
  101. package/dist/Slider-BDLbD7d5.cjs +123 -0
  102. package/dist/Slider-BDLbD7d5.cjs.map +1 -0
  103. package/dist/Slider-BHjHSoIk.js +111 -0
  104. package/dist/Slider-BHjHSoIk.js.map +1 -0
  105. package/dist/SubmitButton/index.cjs +4 -13
  106. package/dist/SubmitButton/index.d.cts +2 -9
  107. package/dist/SubmitButton/index.d.ts +2 -9
  108. package/dist/SubmitButton/index.js +3 -14
  109. package/dist/SubmitButton-7iOaKzhB.js +34 -0
  110. package/dist/SubmitButton-7iOaKzhB.js.map +1 -0
  111. package/dist/SubmitButton-DhtPJuro.cjs +46 -0
  112. package/dist/SubmitButton-DhtPJuro.cjs.map +1 -0
  113. package/dist/Switch/index.cjs +4 -18
  114. package/dist/Switch/index.d.cts +2 -11
  115. package/dist/Switch/index.d.ts +2 -11
  116. package/dist/Switch/index.js +3 -19
  117. package/dist/Switch-DCxAgt_L.js +84 -0
  118. package/dist/Switch-DCxAgt_L.js.map +1 -0
  119. package/dist/Switch-Dczzog3v.cjs +96 -0
  120. package/dist/Switch-Dczzog3v.cjs.map +1 -0
  121. package/dist/SwitchBox/index.cjs +5 -20
  122. package/dist/SwitchBox/index.d.cts +2 -11
  123. package/dist/SwitchBox/index.d.ts +2 -11
  124. package/dist/SwitchBox/index.js +3 -21
  125. package/dist/SwitchBox-DPHryDOM.js +156 -0
  126. package/dist/SwitchBox-DPHryDOM.js.map +1 -0
  127. package/dist/SwitchBox-DqVmZYId.cjs +174 -0
  128. package/dist/SwitchBox-DqVmZYId.cjs.map +1 -0
  129. package/dist/TextArea/index.cjs +4 -19
  130. package/dist/TextArea/index.d.cts +2 -10
  131. package/dist/TextArea/index.d.ts +2 -10
  132. package/dist/TextArea/index.js +3 -20
  133. package/dist/TextArea-BR6e-Fio.js +64 -0
  134. package/dist/TextArea-BR6e-Fio.js.map +1 -0
  135. package/dist/TextArea-CH-F6_ax.cjs +76 -0
  136. package/dist/TextArea-CH-F6_ax.cjs.map +1 -0
  137. package/dist/helpers/index.cjs +8 -18
  138. package/dist/helpers/index.d.cts +2 -132
  139. package/dist/helpers/index.d.ts +2 -132
  140. package/dist/helpers/index.js +3 -18
  141. package/dist/helpers-B-CJOBt3.js +236 -0
  142. package/dist/helpers-B-CJOBt3.js.map +1 -0
  143. package/dist/helpers-KTgXi0lA.cjs +272 -0
  144. package/dist/helpers-KTgXi0lA.cjs.map +1 -0
  145. package/dist/hooks/useClientValidation/index.cjs +6 -10
  146. package/dist/hooks/useClientValidation/index.cjs.map +1 -1
  147. package/dist/hooks/useClientValidation/index.d.cts +2 -147
  148. package/dist/hooks/useClientValidation/index.d.ts +2 -147
  149. package/dist/hooks/useClientValidation/index.js +7 -12
  150. package/dist/hooks/useClientValidation/index.js.map +1 -1
  151. package/dist/hooks/useController/index.cjs +5 -7
  152. package/dist/hooks/useController/index.cjs.map +1 -1
  153. package/dist/hooks/useController/index.d.cts +2 -29
  154. package/dist/hooks/useController/index.d.ts +3 -29
  155. package/dist/hooks/useController/index.js +7 -9
  156. package/dist/hooks/useController/index.js.map +1 -1
  157. package/dist/hooks/useFormContext/index.cjs +3 -12
  158. package/dist/hooks/useFormContext/index.d.cts +2 -62
  159. package/dist/hooks/useFormContext/index.d.ts +4 -62
  160. package/dist/hooks/useFormContext/index.js +3 -13
  161. package/dist/hooks/useInput/index.cjs +11 -5
  162. package/dist/hooks/useInput/index.cjs.map +1 -1
  163. package/dist/hooks/useInput/index.d.cts +2 -1
  164. package/dist/hooks/useInput/index.d.ts +2 -1
  165. package/dist/hooks/useInput/index.js +7 -7
  166. package/dist/hooks/useInput/index.js.map +1 -1
  167. package/dist/hooks/useInputValueDebounce/index.cjs +2 -7
  168. package/dist/hooks/useInputValueDebounce/index.d.cts +2 -55
  169. package/dist/hooks/useInputValueDebounce/index.d.ts +2 -55
  170. package/dist/hooks/useInputValueDebounce/index.js +3 -8
  171. package/dist/hooks/useInputValueTransform/index.cjs +5 -5
  172. package/dist/hooks/useInputValueTransform/index.cjs.map +1 -1
  173. package/dist/hooks/useInputValueTransform/index.d.cts +2 -102
  174. package/dist/hooks/useInputValueTransform/index.d.ts +2 -102
  175. package/dist/hooks/useInputValueTransform/index.js +7 -7
  176. package/dist/hooks/useInputValueTransform/index.js.map +1 -1
  177. package/dist/hooks/useUniformField/index.cjs +2 -15
  178. package/dist/hooks/useUniformField/index.d.cts +2 -98
  179. package/dist/hooks/useUniformField/index.d.ts +6 -98
  180. package/dist/hooks/useUniformField/index.js +3 -16
  181. package/dist/hooks/useUniformFieldArray/index.cjs +2 -17
  182. package/dist/hooks/useUniformFieldArray/index.d.cts +2 -71
  183. package/dist/hooks/useUniformFieldArray/index.d.ts +7 -71
  184. package/dist/hooks/useUniformFieldArray/index.js +3 -18
  185. package/dist/hooks/useWatchUserChange/index.cjs +5 -8
  186. package/dist/hooks/useWatchUserChange/index.cjs.map +1 -1
  187. package/dist/hooks/useWatchUserChange/index.d.cts +2 -73
  188. package/dist/hooks/useWatchUserChange/index.d.ts +2 -73
  189. package/dist/hooks/useWatchUserChange/index.js +7 -10
  190. package/dist/hooks/useWatchUserChange/index.js.map +1 -1
  191. package/dist/index-1gPh6Uoh.d.cts +16 -0
  192. package/dist/index-1gPh6Uoh.d.cts.map +1 -0
  193. package/dist/index-B3Z8gdjC.d.ts +1 -0
  194. package/dist/index-B4Wkijem.d.ts +169 -0
  195. package/dist/index-B4Wkijem.d.ts.map +1 -0
  196. package/dist/index-B74QlCAy.d.cts +169 -0
  197. package/dist/index-B74QlCAy.d.cts.map +1 -0
  198. package/dist/index-BLREDRDJ.d.cts +1 -0
  199. package/dist/index-BM4XWo1K.d.ts +118 -0
  200. package/dist/index-BM4XWo1K.d.ts.map +1 -0
  201. package/dist/index-BMN2XNyT.d.cts +23 -0
  202. package/dist/index-BMN2XNyT.d.cts.map +1 -0
  203. package/dist/index-BOI0cy-n.d.cts +118 -0
  204. package/dist/index-BOI0cy-n.d.cts.map +1 -0
  205. package/dist/index-BTEsKen4.d.ts +264 -0
  206. package/dist/index-BTEsKen4.d.ts.map +1 -0
  207. package/dist/index-BW9EUWZE.d.cts +23 -0
  208. package/dist/index-BW9EUWZE.d.cts.map +1 -0
  209. package/dist/index-BXpMZvwA.d.cts +1 -0
  210. package/dist/index-BYrmFhKl.d.ts +1 -0
  211. package/dist/index-BaBZGCqS.d.cts +177 -0
  212. package/dist/index-BaBZGCqS.d.cts.map +1 -0
  213. package/dist/index-C1fYmoY0.d.ts +123 -0
  214. package/dist/index-C1fYmoY0.d.ts.map +1 -0
  215. package/dist/index-C56I3SOi.d.cts +148 -0
  216. package/dist/index-C56I3SOi.d.cts.map +1 -0
  217. package/dist/index-CHmS3ri3.d.ts +16 -0
  218. package/dist/index-CHmS3ri3.d.ts.map +1 -0
  219. package/dist/index-CI9QBUoM.d.cts +97 -0
  220. package/dist/index-CI9QBUoM.d.cts.map +1 -0
  221. package/dist/index-CJNLQVjx.d.ts +1 -0
  222. package/dist/index-CO-l7RmT.d.cts +181 -0
  223. package/dist/index-CO-l7RmT.d.cts.map +1 -0
  224. package/dist/index-CQWoxgWk.d.ts +23 -0
  225. package/dist/index-CQWoxgWk.d.ts.map +1 -0
  226. package/dist/index-CVY05bZf.d.ts +39 -0
  227. package/dist/index-CVY05bZf.d.ts.map +1 -0
  228. package/dist/index-C_ATGeaX.d.ts +104 -0
  229. package/dist/index-C_ATGeaX.d.ts.map +1 -0
  230. package/dist/index-CbAh0Kfo.d.cts +39 -0
  231. package/dist/index-CbAh0Kfo.d.cts.map +1 -0
  232. package/dist/index-CqV2Q3da.d.cts +264 -0
  233. package/dist/index-CqV2Q3da.d.cts.map +1 -0
  234. package/dist/index-CraZe1qS.d.ts +97 -0
  235. package/dist/index-CraZe1qS.d.ts.map +1 -0
  236. package/dist/index-CvA5yKx9.d.ts +177 -0
  237. package/dist/index-CvA5yKx9.d.ts.map +1 -0
  238. package/dist/index-CwSIy_W-.d.cts +1 -0
  239. package/dist/index-CzypMcVS.d.cts +104 -0
  240. package/dist/index-CzypMcVS.d.cts.map +1 -0
  241. package/dist/index-D6RB3b5L.d.ts +148 -0
  242. package/dist/index-D6RB3b5L.d.ts.map +1 -0
  243. package/dist/index-DA5um0u6.d.cts +123 -0
  244. package/dist/index-DA5um0u6.d.cts.map +1 -0
  245. package/dist/index-DHHBSmJb.d.ts +23 -0
  246. package/dist/index-DHHBSmJb.d.ts.map +1 -0
  247. package/dist/index-DhMSgdwM.d.ts +156 -0
  248. package/dist/index-DhMSgdwM.d.ts.map +1 -0
  249. package/dist/index-Dklb-p_1.d.cts +156 -0
  250. package/dist/index-Dklb-p_1.d.cts.map +1 -0
  251. package/dist/index-DpD4MxGD.d.cts +177 -0
  252. package/dist/index-DpD4MxGD.d.cts.map +1 -0
  253. package/dist/index-Drl7euco.d.ts +115 -0
  254. package/dist/index-Drl7euco.d.ts.map +1 -0
  255. package/dist/index-DzuP5q-2.d.ts +181 -0
  256. package/dist/index-DzuP5q-2.d.ts.map +1 -0
  257. package/dist/index-G0IgQWoU.d.cts +134 -0
  258. package/dist/index-G0IgQWoU.d.cts.map +1 -0
  259. package/dist/index-RvYO46Vg.d.ts +178 -0
  260. package/dist/index-RvYO46Vg.d.ts.map +1 -0
  261. package/dist/index-UjKqRe-8.d.ts +134 -0
  262. package/dist/index-UjKqRe-8.d.ts.map +1 -0
  263. package/dist/index-aHcGnXHf.d.ts +44 -0
  264. package/dist/index-aHcGnXHf.d.ts.map +1 -0
  265. package/dist/index-iuLEYAix.d.cts +115 -0
  266. package/dist/index-iuLEYAix.d.cts.map +1 -0
  267. package/dist/index-jmQP58tO.d.cts +44 -0
  268. package/dist/index-jmQP58tO.d.cts.map +1 -0
  269. package/dist/index.cjs +75 -133
  270. package/dist/index.cjs.map +1 -1
  271. package/dist/index.d.cts +28 -38
  272. package/dist/index.d.ts +31 -38
  273. package/dist/index.js +33 -133
  274. package/dist/index.js.map +1 -1
  275. package/dist/partials/FieldCopyTestIdButton/index.cjs +4 -9
  276. package/dist/partials/FieldCopyTestIdButton/index.d.cts +2 -7
  277. package/dist/partials/FieldCopyTestIdButton/index.d.ts +2 -7
  278. package/dist/partials/FieldCopyTestIdButton/index.js +3 -10
  279. package/dist/partials/FieldValidationError/index.cjs +4 -9
  280. package/dist/partials/FieldValidationError/index.d.cts +2 -8
  281. package/dist/partials/FieldValidationError/index.d.ts +2 -8
  282. package/dist/partials/FieldValidationError/index.js +3 -10
  283. package/dist/useClientValidation-BnnscAEe.js +179 -0
  284. package/dist/useClientValidation-BnnscAEe.js.map +1 -0
  285. package/dist/useClientValidation-C3Q5UCy9.d.cts +150 -0
  286. package/dist/useClientValidation-C3Q5UCy9.d.cts.map +1 -0
  287. package/dist/useClientValidation-CkBtUSco.d.ts +150 -0
  288. package/dist/useClientValidation-CkBtUSco.d.ts.map +1 -0
  289. package/dist/useClientValidation-oZd4_ocQ.cjs +191 -0
  290. package/dist/useClientValidation-oZd4_ocQ.cjs.map +1 -0
  291. package/dist/useController-BzkCcbSo.cjs +48 -0
  292. package/dist/useController-BzkCcbSo.cjs.map +1 -0
  293. package/dist/useController-C_MZLZIp.d.cts +31 -0
  294. package/dist/useController-C_MZLZIp.d.cts.map +1 -0
  295. package/dist/useController-CumIERks.js +43 -0
  296. package/dist/useController-CumIERks.js.map +1 -0
  297. package/dist/useController-hjpJQf0w.d.ts +31 -0
  298. package/dist/useController-hjpJQf0w.d.ts.map +1 -0
  299. package/dist/useFormContext-356X5XAY.js +6 -0
  300. package/dist/useFormContext-356X5XAY.js.map +1 -0
  301. package/dist/useFormContext-3AAPT6eZ.d.ts +64 -0
  302. package/dist/useFormContext-3AAPT6eZ.d.ts.map +1 -0
  303. package/dist/useFormContext-CWuN-_7P.cjs +134 -0
  304. package/dist/useFormContext-CWuN-_7P.cjs.map +1 -0
  305. package/dist/useFormContext-CZh7pv8f.d.cts +64 -0
  306. package/dist/useFormContext-CZh7pv8f.d.cts.map +1 -0
  307. package/dist/useFormContext-CkeSOfWD.cjs +6 -0
  308. package/dist/useFormContext-CkeSOfWD.cjs.map +1 -0
  309. package/dist/useFormContext-JCm1UR_e.js +123 -0
  310. package/dist/useFormContext-JCm1UR_e.js.map +1 -0
  311. package/dist/useInput-DZ6KGBxw.js +3 -0
  312. package/dist/useInput-IGJqJ2tR.d.ts +2 -0
  313. package/dist/useInput-NMHJNZ5A.d.cts +2 -0
  314. package/dist/useInputValueDebounce-B2RzCWty.d.cts +62 -0
  315. package/dist/useInputValueDebounce-B2RzCWty.d.cts.map +1 -0
  316. package/dist/useInputValueDebounce-C7_bvNGH.d.ts +62 -0
  317. package/dist/useInputValueDebounce-C7_bvNGH.d.ts.map +1 -0
  318. package/dist/useInputValueDebounce-DaH5ONlQ.js +84 -0
  319. package/dist/useInputValueDebounce-DaH5ONlQ.js.map +1 -0
  320. package/dist/useInputValueDebounce-tL8maIp8.cjs +90 -0
  321. package/dist/useInputValueDebounce-tL8maIp8.cjs.map +1 -0
  322. package/dist/useInputValueTransform-BID-CQ-y.d.cts +107 -0
  323. package/dist/useInputValueTransform-BID-CQ-y.d.cts.map +1 -0
  324. package/dist/useInputValueTransform-C-uSW8Y3.cjs +116 -0
  325. package/dist/useInputValueTransform-C-uSW8Y3.cjs.map +1 -0
  326. package/dist/useInputValueTransform-D7LfyYRe.d.ts +107 -0
  327. package/dist/useInputValueTransform-D7LfyYRe.d.ts.map +1 -0
  328. package/dist/useInputValueTransform-aiIf8lq5.js +110 -0
  329. package/dist/useInputValueTransform-aiIf8lq5.js.map +1 -0
  330. package/dist/useUniformField-BMvnRC_r.cjs +136 -0
  331. package/dist/useUniformField-BMvnRC_r.cjs.map +1 -0
  332. package/dist/useUniformField-Be3kdnhK.d.cts +98 -0
  333. package/dist/useUniformField-Be3kdnhK.d.cts.map +1 -0
  334. package/dist/useUniformField-ClprfrES.js +129 -0
  335. package/dist/useUniformField-ClprfrES.js.map +1 -0
  336. package/dist/useUniformField-DDHQ5B11.d.ts +98 -0
  337. package/dist/useUniformField-DDHQ5B11.d.ts.map +1 -0
  338. package/dist/useUniformFieldArray-BBFw08qL.d.cts +79 -0
  339. package/dist/useUniformFieldArray-BBFw08qL.d.cts.map +1 -0
  340. package/dist/useUniformFieldArray-BhPi3gPv.d.ts +79 -0
  341. package/dist/useUniformFieldArray-BhPi3gPv.d.ts.map +1 -0
  342. package/dist/useUniformFieldArray-C-0OXG3N.js +84 -0
  343. package/dist/useUniformFieldArray-C-0OXG3N.js.map +1 -0
  344. package/dist/useUniformFieldArray-btjvJdZ6.cjs +90 -0
  345. package/dist/useUniformFieldArray-btjvJdZ6.cjs.map +1 -0
  346. package/dist/useWatchUserChange-BAdiqg2q.d.ts +78 -0
  347. package/dist/useWatchUserChange-BAdiqg2q.d.ts.map +1 -0
  348. package/dist/useWatchUserChange-C1ezpj0t.js +83 -0
  349. package/dist/useWatchUserChange-C1ezpj0t.js.map +1 -0
  350. package/dist/useWatchUserChange-C5dr12By.cjs +89 -0
  351. package/dist/useWatchUserChange-C5dr12By.cjs.map +1 -0
  352. package/dist/useWatchUserChange-COVdHmki.d.cts +78 -0
  353. package/dist/useWatchUserChange-COVdHmki.d.cts.map +1 -0
  354. package/package.json +73 -100
  355. package/dist/Checkboxes/index.cjs.map +0 -1
  356. package/dist/Checkboxes/index.js.map +0 -1
  357. package/dist/Checkboxes-CBgO9itq.d.cts +0 -171
  358. package/dist/Checkboxes-CFbsc6zg.d.ts +0 -171
  359. package/dist/FieldArray/index.cjs.map +0 -1
  360. package/dist/FieldArray/index.js.map +0 -1
  361. package/dist/FieldArray-72vn2MG9.d.cts +0 -160
  362. package/dist/FieldArray-72vn2MG9.d.ts +0 -160
  363. package/dist/FieldCard/index.cjs.map +0 -1
  364. package/dist/FieldCard/index.js.map +0 -1
  365. package/dist/FieldCopyTestIdButton-_TDlmw0L.d.cts +0 -11
  366. package/dist/FieldCopyTestIdButton-_TDlmw0L.d.ts +0 -11
  367. package/dist/FieldValidationError-DwtLkGMo.d.cts +0 -17
  368. package/dist/FieldValidationError-DwtLkGMo.d.ts +0 -17
  369. package/dist/Form/index.cjs.map +0 -1
  370. package/dist/Form/index.js.map +0 -1
  371. package/dist/Form-BZZJPLsi.d.cts +0 -32
  372. package/dist/Form-zsUjI2yq.d.ts +0 -32
  373. package/dist/FormContext-9Firwt4k.d.cts +0 -14
  374. package/dist/FormContext-9Firwt4k.d.ts +0 -14
  375. package/dist/Grid/index.cjs.map +0 -1
  376. package/dist/Grid/index.js.map +0 -1
  377. package/dist/Grid-DF3L9NF3.d.cts +0 -17
  378. package/dist/Grid-DF3L9NF3.d.ts +0 -17
  379. package/dist/Input/index.cjs.map +0 -1
  380. package/dist/Input/index.js.map +0 -1
  381. package/dist/Input-BGYDOpbo.d.cts +0 -101
  382. package/dist/Input-__SqMh2n.d.ts +0 -101
  383. package/dist/RadioBox-DnqCiTR1.d.cts +0 -168
  384. package/dist/RadioBox-DnqCiTR1.d.ts +0 -168
  385. package/dist/RadioBoxes/index.cjs.map +0 -1
  386. package/dist/RadioBoxes/index.js.map +0 -1
  387. package/dist/RadioTabs/index.cjs.map +0 -1
  388. package/dist/RadioTabs/index.js.map +0 -1
  389. package/dist/RadioTabs-DkR5fvl4.d.cts +0 -138
  390. package/dist/RadioTabs-DkR5fvl4.d.ts +0 -138
  391. package/dist/Radios/index.cjs.map +0 -1
  392. package/dist/Radios/index.js.map +0 -1
  393. package/dist/Radios-lLVlvY_B.d.cts +0 -115
  394. package/dist/Radios-lLVlvY_B.d.ts +0 -115
  395. package/dist/Select/index.cjs.map +0 -1
  396. package/dist/Select/index.js.map +0 -1
  397. package/dist/Select-DWlnKj5c.d.cts +0 -249
  398. package/dist/Select-DWlnKj5c.d.ts +0 -249
  399. package/dist/Slider/index.cjs.map +0 -1
  400. package/dist/Slider/index.js.map +0 -1
  401. package/dist/Slider-CxHvafJA.d.cts +0 -155
  402. package/dist/Slider-CxHvafJA.d.ts +0 -155
  403. package/dist/SubmitButton/index.cjs.map +0 -1
  404. package/dist/SubmitButton/index.js.map +0 -1
  405. package/dist/SubmitButton-DqaxyVpp.d.cts +0 -28
  406. package/dist/SubmitButton-DqaxyVpp.d.ts +0 -28
  407. package/dist/Switch/index.cjs.map +0 -1
  408. package/dist/Switch/index.js.map +0 -1
  409. package/dist/Switch-B4AuHAMX.d.cts +0 -108
  410. package/dist/Switch-B4AuHAMX.d.ts +0 -108
  411. package/dist/SwitchBox/index.cjs.map +0 -1
  412. package/dist/SwitchBox/index.js.map +0 -1
  413. package/dist/SwitchBox-q1I7a0NX.d.cts +0 -146
  414. package/dist/SwitchBox-q1I7a0NX.d.ts +0 -146
  415. package/dist/TextArea/index.cjs.map +0 -1
  416. package/dist/TextArea/index.js.map +0 -1
  417. package/dist/TextArea-CYcFOcun.d.cts +0 -88
  418. package/dist/TextArea-CYcFOcun.d.ts +0 -88
  419. package/dist/chunk-264VRHMT.js +0 -105
  420. package/dist/chunk-264VRHMT.js.map +0 -1
  421. package/dist/chunk-26VE4IGU.js +0 -68
  422. package/dist/chunk-26VE4IGU.js.map +0 -1
  423. package/dist/chunk-2HDXHQOC.js +0 -215
  424. package/dist/chunk-2HDXHQOC.js.map +0 -1
  425. package/dist/chunk-2UQCRQEJ.cjs +0 -68
  426. package/dist/chunk-2UQCRQEJ.cjs.map +0 -1
  427. package/dist/chunk-36LBVB45.js +0 -1
  428. package/dist/chunk-36LBVB45.js.map +0 -1
  429. package/dist/chunk-3JAVQAL5.cjs +0 -1
  430. package/dist/chunk-3JAVQAL5.cjs.map +0 -1
  431. package/dist/chunk-3ZQXSGR2.cjs +0 -67
  432. package/dist/chunk-3ZQXSGR2.cjs.map +0 -1
  433. package/dist/chunk-4CQWTUQR.js +0 -292
  434. package/dist/chunk-4CQWTUQR.js.map +0 -1
  435. package/dist/chunk-4HFPBJ3O.cjs +0 -171
  436. package/dist/chunk-4HFPBJ3O.cjs.map +0 -1
  437. package/dist/chunk-4RQJCFM7.js +0 -154
  438. package/dist/chunk-4RQJCFM7.js.map +0 -1
  439. package/dist/chunk-555JRYCS.cjs +0 -61
  440. package/dist/chunk-555JRYCS.cjs.map +0 -1
  441. package/dist/chunk-55VJM3KD.cjs +0 -118
  442. package/dist/chunk-55VJM3KD.cjs.map +0 -1
  443. package/dist/chunk-56TQOKG7.cjs +0 -48
  444. package/dist/chunk-56TQOKG7.cjs.map +0 -1
  445. package/dist/chunk-5MTIQ6WD.js +0 -41
  446. package/dist/chunk-5MTIQ6WD.js.map +0 -1
  447. package/dist/chunk-6AWHOBNL.cjs +0 -41
  448. package/dist/chunk-6AWHOBNL.cjs.map +0 -1
  449. package/dist/chunk-6GN62PBG.cjs +0 -182
  450. package/dist/chunk-6GN62PBG.cjs.map +0 -1
  451. package/dist/chunk-7MOAXLQZ.js +0 -103
  452. package/dist/chunk-7MOAXLQZ.js.map +0 -1
  453. package/dist/chunk-7OMJ26AT.js +0 -165
  454. package/dist/chunk-7OMJ26AT.js.map +0 -1
  455. package/dist/chunk-7ZE7IZ5R.cjs +0 -103
  456. package/dist/chunk-7ZE7IZ5R.cjs.map +0 -1
  457. package/dist/chunk-AHJJIANM.js +0 -7
  458. package/dist/chunk-AHJJIANM.js.map +0 -1
  459. package/dist/chunk-AQJLKHAE.cjs +0 -277
  460. package/dist/chunk-AQJLKHAE.cjs.map +0 -1
  461. package/dist/chunk-B62HKKMS.js +0 -20
  462. package/dist/chunk-B62HKKMS.js.map +0 -1
  463. package/dist/chunk-C6WYP35Z.js +0 -219
  464. package/dist/chunk-C6WYP35Z.js.map +0 -1
  465. package/dist/chunk-CNTOODUQ.js +0 -48
  466. package/dist/chunk-CNTOODUQ.js.map +0 -1
  467. package/dist/chunk-ECUVOZGQ.cjs +0 -148
  468. package/dist/chunk-ECUVOZGQ.cjs.map +0 -1
  469. package/dist/chunk-ELYGQTXB.js +0 -47
  470. package/dist/chunk-ELYGQTXB.js.map +0 -1
  471. package/dist/chunk-EVASKP6Q.js +0 -148
  472. package/dist/chunk-EVASKP6Q.js.map +0 -1
  473. package/dist/chunk-FYN7ZWLW.cjs +0 -115
  474. package/dist/chunk-FYN7ZWLW.cjs.map +0 -1
  475. package/dist/chunk-GEC75GNL.js +0 -137
  476. package/dist/chunk-GEC75GNL.js.map +0 -1
  477. package/dist/chunk-HEPNEBRF.cjs +0 -26
  478. package/dist/chunk-HEPNEBRF.cjs.map +0 -1
  479. package/dist/chunk-IR75YRIZ.js +0 -171
  480. package/dist/chunk-IR75YRIZ.js.map +0 -1
  481. package/dist/chunk-IV45K4WU.js +0 -277
  482. package/dist/chunk-IV45K4WU.js.map +0 -1
  483. package/dist/chunk-K2V4ULA2.js +0 -61
  484. package/dist/chunk-K2V4ULA2.js.map +0 -1
  485. package/dist/chunk-KBKMMDLM.js +0 -118
  486. package/dist/chunk-KBKMMDLM.js.map +0 -1
  487. package/dist/chunk-KDNO5YO5.cjs +0 -105
  488. package/dist/chunk-KDNO5YO5.cjs.map +0 -1
  489. package/dist/chunk-LEMQGDFE.js +0 -67
  490. package/dist/chunk-LEMQGDFE.js.map +0 -1
  491. package/dist/chunk-LO7UKHOS.js +0 -26
  492. package/dist/chunk-LO7UKHOS.js.map +0 -1
  493. package/dist/chunk-LWPZZ2AW.cjs +0 -172
  494. package/dist/chunk-LWPZZ2AW.cjs.map +0 -1
  495. package/dist/chunk-NG3CJ3UE.js +0 -699
  496. package/dist/chunk-NG3CJ3UE.js.map +0 -1
  497. package/dist/chunk-NHEZXA4H.cjs +0 -47
  498. package/dist/chunk-NHEZXA4H.cjs.map +0 -1
  499. package/dist/chunk-NTDKZW4E.js +0 -35
  500. package/dist/chunk-NTDKZW4E.js.map +0 -1
  501. package/dist/chunk-O2XJNQQK.js +0 -154
  502. package/dist/chunk-O2XJNQQK.js.map +0 -1
  503. package/dist/chunk-OE5BOGGX.cjs +0 -35
  504. package/dist/chunk-OE5BOGGX.cjs.map +0 -1
  505. package/dist/chunk-OKJWLH7T.cjs +0 -154
  506. package/dist/chunk-OKJWLH7T.cjs.map +0 -1
  507. package/dist/chunk-OORASWXL.js +0 -49
  508. package/dist/chunk-OORASWXL.js.map +0 -1
  509. package/dist/chunk-OT3A4LEE.cjs +0 -154
  510. package/dist/chunk-OT3A4LEE.cjs.map +0 -1
  511. package/dist/chunk-PCTYJUY7.cjs +0 -7
  512. package/dist/chunk-PCTYJUY7.cjs.map +0 -1
  513. package/dist/chunk-PRUIH5LI.js +0 -131
  514. package/dist/chunk-PRUIH5LI.js.map +0 -1
  515. package/dist/chunk-QLNJZDVF.js +0 -182
  516. package/dist/chunk-QLNJZDVF.js.map +0 -1
  517. package/dist/chunk-RVBTLB5G.cjs +0 -131
  518. package/dist/chunk-RVBTLB5G.cjs.map +0 -1
  519. package/dist/chunk-SJWL6EMI.js +0 -115
  520. package/dist/chunk-SJWL6EMI.js.map +0 -1
  521. package/dist/chunk-SW3NGBCE.cjs +0 -215
  522. package/dist/chunk-SW3NGBCE.cjs.map +0 -1
  523. package/dist/chunk-THDHNYP7.cjs +0 -219
  524. package/dist/chunk-THDHNYP7.cjs.map +0 -1
  525. package/dist/chunk-TTD3KL6E.cjs +0 -20
  526. package/dist/chunk-TTD3KL6E.cjs.map +0 -1
  527. package/dist/chunk-UB7CSOZU.js +0 -172
  528. package/dist/chunk-UB7CSOZU.js.map +0 -1
  529. package/dist/chunk-V3M7HL26.cjs +0 -137
  530. package/dist/chunk-V3M7HL26.cjs.map +0 -1
  531. package/dist/chunk-WXSISX5Y.cjs +0 -49
  532. package/dist/chunk-WXSISX5Y.cjs.map +0 -1
  533. package/dist/chunk-WYM6IAIJ.cjs +0 -292
  534. package/dist/chunk-WYM6IAIJ.cjs.map +0 -1
  535. package/dist/chunk-YYR23V5P.cjs +0 -165
  536. package/dist/chunk-YYR23V5P.cjs.map +0 -1
  537. package/dist/chunk-Z6QACVK7.cjs +0 -699
  538. package/dist/chunk-Z6QACVK7.cjs.map +0 -1
  539. package/dist/helpers/index.cjs.map +0 -1
  540. package/dist/helpers/index.js.map +0 -1
  541. package/dist/hooks/useFormContext/index.cjs.map +0 -1
  542. package/dist/hooks/useFormContext/index.js.map +0 -1
  543. package/dist/hooks/useInputValueDebounce/index.cjs.map +0 -1
  544. package/dist/hooks/useInputValueDebounce/index.js.map +0 -1
  545. package/dist/hooks/useUniformField/index.cjs.map +0 -1
  546. package/dist/hooks/useUniformField/index.js.map +0 -1
  547. package/dist/hooks/useUniformFieldArray/index.cjs.map +0 -1
  548. package/dist/hooks/useUniformFieldArray/index.js.map +0 -1
  549. package/dist/partials/FieldCopyTestIdButton/index.cjs.map +0 -1
  550. package/dist/partials/FieldCopyTestIdButton/index.js.map +0 -1
  551. package/dist/partials/FieldValidationError/index.cjs.map +0 -1
  552. package/dist/partials/FieldValidationError/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers-KTgXi0lA.cjs","names":["cleanName: string"],"sources":["../src/helpers/nullishFields/nullishFields.ts"],"sourcesContent":["import { slugify } from '@fuf-stack/pixel-utils';\n\n/** Key used to wrap flat array elements when converting to form format */\nexport const flatArrayKey = '__FLAT__';\n\n/**\n * String markers used to preserve null, false, and 0 values during JSON processing\n */\nconst nullString = '__NULL__';\nconst falseString = '__FALSE__';\nconst zeroString = '__ZERO__';\n\n/**\n * Converts marker strings back to their original values when processing arrays\n */\nexport const fromNullishString = (value: unknown): unknown => {\n // Support arrays: unwrap flat wrappers and convert marker strings per entry\n if (Array.isArray(value)) {\n return (value as unknown[]).map((entry) => {\n if (entry && typeof entry === 'object') {\n const record = entry as Record<string, unknown>;\n if (flatArrayKey in record) {\n const inner = record[flatArrayKey];\n // For arrays, treat empty string as null (placeholder input)\n if (inner === '') {\n return null;\n }\n return fromNullishString(inner);\n }\n }\n return fromNullishString(entry);\n });\n }\n\n if (typeof value !== 'string') {\n return value;\n }\n\n switch (value) {\n case nullString:\n return null;\n case falseString:\n return false;\n case zeroString:\n return 0;\n default:\n return value;\n }\n};\n\n/**\n * Converts null/falsy values to marker strings for JSON processing\n */\nexport const toNullishString = (value: unknown): unknown => {\n if (Array.isArray(value)) {\n // Only wrap arrays of primitives; leave arrays of objects as-is\n const isPrimitive = (v: unknown) => {\n return v === null || ['string', 'number', 'boolean'].includes(typeof v);\n };\n const isPrimitiveArray = (value as unknown[]).every(isPrimitive);\n if (isPrimitiveArray) {\n return (value as unknown[]).map((v) => {\n // Store raw primitive; do not convert to marker strings inside the wrapper\n return { [flatArrayKey]: v } as Record<string, unknown>;\n });\n }\n return value;\n }\n if (value === null || value === '') {\n return nullString;\n }\n if (value === false) {\n return falseString;\n }\n if (value === 0) {\n return zeroString;\n }\n return value;\n};\n\n/**\n * Converts field values to a format suitable for forms by:\n * - Wrapping arrays of primitives as objects using the flatArrayKey `__FLAT__`\n * to satisfy RHF's requirement that array fields contain objects\n * - Removing empty strings and null values from objects\n *\n * This conversion is required because React Hook Form does not support arrays with\n * flat values (string, number, boolean, null). Array fields must contain objects.\n * We work around this by wrapping primitive entries: `{ __FLAT__: <value> }`.\n *\n * @example\n * const fields = {\n * name: 'John',\n * scores: [0, null, 75, false],\n * scoresDetailed: [\n * { score: 1 },\n * { score: null },\n * { score: 0 },\n * { score: false },\n * { score: '' },\n * ],\n * contact: {\n * email: '',\n * phone: null,\n * address: '123 Main St'\n * }\n * };\n *\n * // Result:\n * {\n * name: 'John',\n * scores: [\n * { __FLAT__: 0 },\n * { __FLAT__: null },\n * { __FLAT__: 75 },\n * { __FLAT__: false }\n * ],\n * // Arrays of objects are left as objects; empty/null properties are removed\n * scoresDetailed: [\n * { score: 1 },\n * {}, // null score removed\n * { score: 0 },\n * { score: false },\n * {}, // empty string removed\n * ],\n * contact: {\n * address: '123 Main St'\n * }\n * }\n */\nexport const toFormFormat = (fields: Record<string, unknown>) => {\n const formFormatJson = JSON.stringify(fields, (_, value) => {\n if (Array.isArray(value)) {\n // Delegate to toNullishString to ensure consistent handling\n return toNullishString(value);\n }\n\n if (value && typeof value === 'object') {\n // Preserve flat-array wrappers as-is (do not filter their inner values here)\n const record = value as Record<string, unknown>;\n if (flatArrayKey in record) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return value;\n }\n return Object.fromEntries(\n Object.entries(value).filter(([_key, v]) => {\n return v !== '' && v !== null;\n }),\n );\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return value;\n });\n\n return JSON.parse(formFormatJson) as Record<string, unknown>;\n};\n\n/**\n * Converts form state to a format suitable for validation by:\n * - Unwrapping flat array wrappers `{ __FLAT__: <value> }` back to primitives\n * - Converting legacy string markers (__NULL__, __FALSE__, __ZERO__) back to their original values\n * - Removing fields whose converted value is empty string or null\n * - Removing empty arrays\n *\n * @example\n * const formState = {\n * name: 'John',\n * scores: [\n * { __FLAT__: 75 },\n * { __FLAT__: 0 },\n * { __FLAT__: null },\n * { __FLAT__: false }\n * ],\n * emptyArray: [],\n * scoresDetailed: [\n * { score: 1 },\n * {},\n * { score: 0 },\n * { score: false },\n * {},\n * ],\n * contact: {\n * address: '123 Main St',\n * fax: null\n * }\n * };\n *\n * // Result:\n * {\n * name: 'John',\n * scores: [75, 0, null, false],\n * // emptyArray is removed\n * // Objects inside arrays remain objects; empty entries remain empty objects\n * scoresDetailed: [\n * { score: 1 },\n * {},\n * { score: 0 },\n * { score: false },\n * {},\n * ],\n * contact: {\n * address: '123 Main St'\n * }\n * }\n */\nexport const toValidationFormat = (\n formState: Record<string, unknown> | null | undefined,\n): Record<string, unknown> | null | undefined => {\n // Handle null or undefined input\n if (formState === undefined || formState === null) {\n return formState;\n }\n\n const validationFormatJson = JSON.stringify(formState, (_, value) => {\n if (Array.isArray(value)) {\n return value.map((v) => {\n // Unwrap new wrapper format { __FLAT__: <value> }\n if (v && typeof v === 'object') {\n const record = v as Record<string, unknown>;\n if (flatArrayKey in record) {\n const inner = record[flatArrayKey];\n // Treat empty string from forms as null in validation format\n if (inner === '') {\n return null;\n }\n return fromNullishString(inner);\n }\n }\n // Backward compatibility for string markers\n return fromNullishString(v);\n });\n }\n\n if (value && typeof value === 'object') {\n // Object branch: remove keys that resolve to empty/null after marker conversion\n // and unwrap flat-array wrappers if present.\n //\n // Why this shape?\n // - Forms may contain objects with placeholder/empty values that should not\n // be part of the validation payload (e.g. \"\" or __NULL__ markers).\n // - Arrays of primitives are stored as wrapper objects { __FLAT__: <value> }\n // to satisfy RHF structure constraints. When converting back for\n // validation, we need to treat wrappers whose inner value resolves to\n // empty/null as removable, and unwrap non-empty wrappers to the primitive.\n return Object.fromEntries(\n Object.entries(value)\n .filter(([_key, v]) => {\n // If this is a flat-array wrapper, convert the inner value first and\n // drop the key when the inner resolves to empty string or null.\n if (v && typeof v === 'object') {\n const record = v as Record<string, unknown>;\n if (flatArrayKey in record) {\n const convertedInner = fromNullishString(record[flatArrayKey]);\n return convertedInner !== '' && convertedInner !== null;\n }\n }\n // Drop empty arrays\n if (Array.isArray(v) && v.length === 0) {\n return false;\n }\n // For regular values, convert markers and drop when empty/null.\n const converted = fromNullishString(v);\n return converted !== '' && converted !== null;\n })\n .map(([k, v]) => {\n // Unwrap flat-array wrappers to raw primitives after conversion.\n if (v && typeof v === 'object') {\n const record = v as Record<string, unknown>;\n if (flatArrayKey in record) {\n return [k, fromNullishString(record[flatArrayKey])];\n }\n }\n // For other values, just convert markers.\n return [k, fromNullishString(v)];\n }),\n );\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return value;\n });\n\n return JSON.parse(validationFormatJson) as Record<string, unknown>;\n};\n\n/**\n * Converts a field name to a testId by removing flat array key segments and slugifying.\n * Removes all occurrences of `flatArrayKey` from the field name and applies slugify transformation.\n *\n * This is used to generate stable testIds for form fields that don't include\n * the internal `__FLAT__` marker used for flat arrays.\n *\n * @param name - The field name as a string (e.g., 'tags.0.__FLAT__') or array path (e.g., ['tags', '0', '__FLAT__'])\n * @returns The slugified field name with all flat array key segments removed (e.g., 'tags_0')\n *\n * @example\n * ```ts\n * nameToTestId('tags.0.__FLAT__') // => 'tags_0'\n * nameToTestId('array.0.__FLAT__') // => 'array_0'\n * nameToTestId('nested.array.0.__FLAT__.field') // => 'nested_array_0_field'\n * nameToTestId('simple.field') // => 'simple_field'\n * nameToTestId(['tags', '0', '__FLAT__']) // => 'tags_0'\n * ```\n */\nexport const nameToTestId = (name: string | readonly string[]): string => {\n let cleanName: string;\n\n // Handle array paths - filter out flatArrayKey and join with dots\n if (Array.isArray(name)) {\n cleanName = name\n .filter((segment: string) => {\n return segment !== flatArrayKey;\n })\n .join('.');\n } else {\n // Handle string paths - split by dots and filter out flatArrayKey segments\n const segments = (name as string).split('.');\n cleanName = segments\n .filter((segment: string) => {\n return segment !== flatArrayKey;\n })\n .join('.');\n }\n\n // Apply slugify transformation\n return slugify(cleanName, { replaceDots: true });\n};\n"],"mappings":";;;;;AAGA,MAAa,eAAe;;;;AAK5B,MAAM,aAAa;AACnB,MAAM,cAAc;AACpB,MAAM,aAAa;;;;AAKnB,MAAa,qBAAqB,UAA4B;AAE5D,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAQ,MAAoB,KAAK,UAAU;AACzC,MAAI,SAAS,OAAO,UAAU,UAAU;GACtC,MAAM,SAAS;AACf,OAAI,gBAAgB,QAAQ;IAC1B,MAAM,QAAQ,OAAO;AAErB,QAAI,UAAU,GACZ,QAAO;AAET,WAAO,kBAAkB,MAAM;;;AAGnC,SAAO,kBAAkB,MAAM;GAC/B;AAGJ,KAAI,OAAO,UAAU,SACnB,QAAO;AAGT,SAAQ,OAAR;EACE,KAAK,WACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,KAAK,WACH,QAAO;EACT,QACE,QAAO;;;;;;AAOb,MAAa,mBAAmB,UAA4B;AAC1D,KAAI,MAAM,QAAQ,MAAM,EAAE;EAExB,MAAM,eAAe,MAAe;AAClC,UAAO,MAAM,QAAQ;IAAC;IAAU;IAAU;IAAU,CAAC,SAAS,OAAO,EAAE;;AAGzE,MAD0B,MAAoB,MAAM,YAAY,CAE9D,QAAQ,MAAoB,KAAK,MAAM;AAErC,UAAO,GAAG,eAAe,GAAG;IAC5B;AAEJ,SAAO;;AAET,KAAI,UAAU,QAAQ,UAAU,GAC9B,QAAO;AAET,KAAI,UAAU,MACZ,QAAO;AAET,KAAI,UAAU,EACZ,QAAO;AAET,QAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDT,MAAa,gBAAgB,WAAoC;CAC/D,MAAM,iBAAiB,KAAK,UAAU,SAAS,GAAG,UAAU;AAC1D,MAAI,MAAM,QAAQ,MAAM,CAEtB,QAAO,gBAAgB,MAAM;AAG/B,MAAI,SAAS,OAAO,UAAU,UAAU;AAGtC,OAAI,gBADW,MAGb,QAAO;AAET,UAAO,OAAO,YACZ,OAAO,QAAQ,MAAM,CAAC,QAAQ,CAAC,MAAM,OAAO;AAC1C,WAAO,MAAM,MAAM,MAAM;KACzB,CACH;;AAGH,SAAO;GACP;AAEF,QAAO,KAAK,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDnC,MAAa,sBACX,cAC+C;AAE/C,KAAI,cAAc,UAAa,cAAc,KAC3C,QAAO;CAGT,MAAM,uBAAuB,KAAK,UAAU,YAAY,GAAG,UAAU;AACnE,MAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,MAAM,KAAK,MAAM;AAEtB,OAAI,KAAK,OAAO,MAAM,UAAU;IAC9B,MAAM,SAAS;AACf,QAAI,gBAAgB,QAAQ;KAC1B,MAAM,QAAQ,OAAO;AAErB,SAAI,UAAU,GACZ,QAAO;AAET,YAAO,kBAAkB,MAAM;;;AAInC,UAAO,kBAAkB,EAAE;IAC3B;AAGJ,MAAI,SAAS,OAAO,UAAU,SAW5B,QAAO,OAAO,YACZ,OAAO,QAAQ,MAAM,CAClB,QAAQ,CAAC,MAAM,OAAO;AAGrB,OAAI,KAAK,OAAO,MAAM,UAAU;IAC9B,MAAM,SAAS;AACf,QAAI,gBAAgB,QAAQ;KAC1B,MAAM,iBAAiB,kBAAkB,OAAO,cAAc;AAC9D,YAAO,mBAAmB,MAAM,mBAAmB;;;AAIvD,OAAI,MAAM,QAAQ,EAAE,IAAI,EAAE,WAAW,EACnC,QAAO;GAGT,MAAM,YAAY,kBAAkB,EAAE;AACtC,UAAO,cAAc,MAAM,cAAc;IACzC,CACD,KAAK,CAAC,GAAG,OAAO;AAEf,OAAI,KAAK,OAAO,MAAM,UAAU;IAC9B,MAAM,SAAS;AACf,QAAI,gBAAgB,OAClB,QAAO,CAAC,GAAG,kBAAkB,OAAO,cAAc,CAAC;;AAIvD,UAAO,CAAC,GAAG,kBAAkB,EAAE,CAAC;IAChC,CACL;AAGH,SAAO;GACP;AAEF,QAAO,KAAK,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;AAsBzC,MAAa,gBAAgB,SAA6C;CACxE,IAAIA;AAGJ,KAAI,MAAM,QAAQ,KAAK,CACrB,aAAY,KACT,QAAQ,YAAoB;AAC3B,SAAO,YAAY;GACnB,CACD,KAAK,IAAI;KAIZ,aADkB,KAAgB,MAAM,IAAI,CAEzC,QAAQ,YAAoB;AAC3B,SAAO,YAAY;GACnB,CACD,KAAK,IAAI;AAId,6CAAe,WAAW,EAAE,aAAa,MAAM,CAAC"}
@@ -1,13 +1,9 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ const require_useClientValidation = require('../../useClientValidation-oZd4_ocQ.cjs');
2
2
 
3
+ //#region src/hooks/useClientValidation/index.ts
4
+ /* v8 ignore stop */
3
5
 
4
- var _chunk2UQCRQEJcjs = require('../../chunk-2UQCRQEJ.cjs');
5
- require('../../chunk-FYN7ZWLW.cjs');
6
- require('../../chunk-AQJLKHAE.cjs');
7
- require('../../chunk-OKJWLH7T.cjs');
8
- require('../../chunk-555JRYCS.cjs');
9
-
10
-
11
-
12
- exports.clientValidationSchemaByName = _chunk2UQCRQEJcjs.clientValidationSchemaByName; exports.useClientValidation = _chunk2UQCRQEJcjs.useClientValidation;
6
+ //#endregion
7
+ exports.clientValidationSchemaByName = require_useClientValidation.clientValidationSchemaByName;
8
+ exports.useClientValidation = require_useClientValidation.useClientValidation;
13
9
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/hooks/useClientValidation/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,4DAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC;AACE;AACA;AACF,2JAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/hooks/useClientValidation/index.cjs"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/hooks/useClientValidation/index.ts"],"sourcesContent":["/* v8 ignore start */\n\nexport * from './useClientValidation';\n\n/* v8 ignore stop */\n"],"mappings":""}
@@ -1,147 +1,2 @@
1
- import * as _fuf_stack_veto_dist_types_d_CSVd_Qmh from '@fuf-stack/veto/dist/types.d-CSVd_Qmh';
2
- import { VetoTypeAny } from '@fuf-stack/veto';
3
-
4
- /**
5
- * Hook for adding dynamic client-side validation to forms.
6
- *
7
- * Client validation is used for context-dependent validation rules that require external data
8
- * (e.g., checking if a username already exists). It complements base validation (passed to Form),
9
- * which handles static rules like "required", min/max length, format, etc.
10
- *
11
- * **Typical pattern:**
12
- * - Base validation: Static, always-on rules (required, format, length constraints)
13
- * - Client validation: Dynamic rules based on external data (uniqueness, business logic)
14
- * - Client schemas should use `.nullish()` to allow empty values (base validation handles "required")
15
- *
16
- * Automatically manages validation schema lifecycle: sets schema when data is provided,
17
- * clears schema when data is null/undefined, and cleans up on unmount. When the client
18
- * validation schema changes, automatically re-validates all touched fields.
19
- *
20
- * @param data - Data to create validation schema from (or null/undefined to clear validation)
21
- * @param schemaFactory - Function that creates a validation schema from the data. Schemas should typically use `.nullish()`.
22
- * @param options - Optional configuration object
23
- * @param options.key - Optional custom key for registration. Useful when multiple instances should share validation (e.g., in field arrays)
24
- *
25
- * @example
26
- * ```tsx
27
- * // Base validation handles "required" and format
28
- * const baseSchema = veto({ username: vt.string({ min: 3 }) });
29
- *
30
- * // Client validation adds dynamic uniqueness check
31
- * const { data: teamData } = useTeamQuery(teamId);
32
- * useClientValidation(teamData, (data) =>
33
- * vt.objectLoose({
34
- * username: vt.string()
35
- * .refine(
36
- * (value) => !data.existingUsers.includes(value),
37
- * { message: 'Username already exists' }
38
- * )
39
- * .nullish() // Allow empty - base validation handles "required"
40
- * })
41
- * );
42
- * ```
43
- *
44
- * @example
45
- * ```tsx
46
- * // Using custom key in a field array to avoid multiple registrations
47
- * fields.map((field, index) => (
48
- * useClientValidation(
49
- * userData,
50
- * (data) => clientValidationSchemaByName(
51
- * `items.${index}.name`,
52
- * vt.string()
53
- * .refine((val) => !data.forbidden.includes(val), { message: 'Name not allowed' })
54
- * .nullish()
55
- * ),
56
- * { key: 'items-validation' } // All instances share the same key
57
- * )
58
- * ));
59
- * ```
60
- */
61
- declare const useClientValidation: <TData = unknown>(data: TData | null | undefined, schemaFactory: (data: TData) => VetoTypeAny, options?: {
62
- key?: string;
63
- }) => void;
64
- /**
65
- * Helper function to create a veto looseObject schema for a single field with nested path support.
66
- *
67
- * Parses field paths (dot-notation) and creates properly nested loose object schemas with array support.
68
- * All intermediate objects and arrays are marked as optional to allow partial data structures.
69
- * Numeric segments in the path are treated as array indices, and the parent field is wrapped in an array schema.
70
- * Supports flat arrays (arrays of primitives) via the special `__FLAT__` key.
71
- *
72
- * **Important:** The fieldSchema should typically use `.nullish()` to allow empty values. This is because:
73
- * - Base validation (passed to Form) handles "required" constraints
74
- * - Client validation adds dynamic, context-dependent rules (e.g., "username already exists")
75
- * - Form data processing converts empty strings in flat arrays to `null` (not `undefined`)
76
- * - `.nullish()` accepts both `null` and `undefined`, while `.optional()` only accepts `undefined`
77
- *
78
- * This pattern ensures client validation only validates non-empty values, while base validation
79
- * enforces required fields and basic constraints (min length, format, etc.).
80
- *
81
- * @param name - The dot-separated path to the field (e.g., 'username', 'user.profile.email', 'items.0.name', 'tags.0.__FLAT__')
82
- * @param fieldSchema - The veto validation schema for the field. Should typically use `.nullish()` to allow empty values.
83
- * @returns A nested loose object schema matching the field path structure with proper type inference
84
- *
85
- * @example
86
- * ```tsx
87
- * // Typical usage: base validation handles "required", client validation adds dynamic rules
88
- * // Base validation (in Form component)
89
- * const baseSchema = veto({ username: vt.string({ min: 3 }) }); // Required + min length
90
- *
91
- * // Client validation (dynamic check for existing usernames)
92
- * const { data: userData } = useUserQuery(userId);
93
- * useClientValidation(userData, (data) =>
94
- * clientValidationSchemaByName(
95
- * 'username',
96
- * vt.string()
97
- * .refine(
98
- * (value) => !data.existingUsernames.includes(value),
99
- * { message: 'Username already taken' }
100
- * )
101
- * .nullish() // Allow empty - base validation handles "required"
102
- * )
103
- * );
104
- * ```
105
- *
106
- * @example
107
- * ```tsx
108
- * // Nested field path with dynamic validation
109
- * clientValidationSchemaByName(
110
- * 'user.profile.email',
111
- * vt.string()
112
- * .refine(
113
- * (value) => !reservedEmails.includes(value),
114
- * { message: 'This email is reserved' }
115
- * )
116
- * .nullish()
117
- * )
118
- * // => objectLoose({ user: objectLoose({ profile: objectLoose({ email: ... }).optional() }).optional() })
119
- * ```
120
- *
121
- * @example
122
- * ```tsx
123
- * // Array of objects with dynamic validation
124
- * clientValidationSchemaByName(
125
- * 'items.0.tag',
126
- * vt.string()
127
- * .refine((value) => !forbiddenTags.includes(value), { message: 'Tag not allowed' })
128
- * .nullish()
129
- * )
130
- * // => objectLoose({ items: array(objectLoose({ tag: ... })).optional() })
131
- * ```
132
- *
133
- * @example
134
- * ```tsx
135
- * // Flat array (array of primitives) with dynamic validation
136
- * clientValidationSchemaByName(
137
- * 'tags.0.__FLAT__',
138
- * vt.string()
139
- * .refine((value) => !forbiddenWords.includes(value), { message: 'Word not allowed' })
140
- * .nullish()
141
- * )
142
- * // => objectLoose({ tags: array(vt.string().refine(...).nullish()).optional() })
143
- * ```
144
- */
145
- declare const clientValidationSchemaByName: <T extends VetoTypeAny>(name: string, fieldSchema: T) => _fuf_stack_veto_dist_types_d_CSVd_Qmh.Z;
146
-
147
- export { clientValidationSchemaByName, useClientValidation };
1
+ import { n as useClientValidation, t as clientValidationSchemaByName } from "../../useClientValidation-C3Q5UCy9.cjs";
2
+ export { clientValidationSchemaByName, useClientValidation };
@@ -1,147 +1,2 @@
1
- import * as _fuf_stack_veto_dist_types_d_CSVd_Qmh from '@fuf-stack/veto/dist/types.d-CSVd_Qmh';
2
- import { VetoTypeAny } from '@fuf-stack/veto';
3
-
4
- /**
5
- * Hook for adding dynamic client-side validation to forms.
6
- *
7
- * Client validation is used for context-dependent validation rules that require external data
8
- * (e.g., checking if a username already exists). It complements base validation (passed to Form),
9
- * which handles static rules like "required", min/max length, format, etc.
10
- *
11
- * **Typical pattern:**
12
- * - Base validation: Static, always-on rules (required, format, length constraints)
13
- * - Client validation: Dynamic rules based on external data (uniqueness, business logic)
14
- * - Client schemas should use `.nullish()` to allow empty values (base validation handles "required")
15
- *
16
- * Automatically manages validation schema lifecycle: sets schema when data is provided,
17
- * clears schema when data is null/undefined, and cleans up on unmount. When the client
18
- * validation schema changes, automatically re-validates all touched fields.
19
- *
20
- * @param data - Data to create validation schema from (or null/undefined to clear validation)
21
- * @param schemaFactory - Function that creates a validation schema from the data. Schemas should typically use `.nullish()`.
22
- * @param options - Optional configuration object
23
- * @param options.key - Optional custom key for registration. Useful when multiple instances should share validation (e.g., in field arrays)
24
- *
25
- * @example
26
- * ```tsx
27
- * // Base validation handles "required" and format
28
- * const baseSchema = veto({ username: vt.string({ min: 3 }) });
29
- *
30
- * // Client validation adds dynamic uniqueness check
31
- * const { data: teamData } = useTeamQuery(teamId);
32
- * useClientValidation(teamData, (data) =>
33
- * vt.objectLoose({
34
- * username: vt.string()
35
- * .refine(
36
- * (value) => !data.existingUsers.includes(value),
37
- * { message: 'Username already exists' }
38
- * )
39
- * .nullish() // Allow empty - base validation handles "required"
40
- * })
41
- * );
42
- * ```
43
- *
44
- * @example
45
- * ```tsx
46
- * // Using custom key in a field array to avoid multiple registrations
47
- * fields.map((field, index) => (
48
- * useClientValidation(
49
- * userData,
50
- * (data) => clientValidationSchemaByName(
51
- * `items.${index}.name`,
52
- * vt.string()
53
- * .refine((val) => !data.forbidden.includes(val), { message: 'Name not allowed' })
54
- * .nullish()
55
- * ),
56
- * { key: 'items-validation' } // All instances share the same key
57
- * )
58
- * ));
59
- * ```
60
- */
61
- declare const useClientValidation: <TData = unknown>(data: TData | null | undefined, schemaFactory: (data: TData) => VetoTypeAny, options?: {
62
- key?: string;
63
- }) => void;
64
- /**
65
- * Helper function to create a veto looseObject schema for a single field with nested path support.
66
- *
67
- * Parses field paths (dot-notation) and creates properly nested loose object schemas with array support.
68
- * All intermediate objects and arrays are marked as optional to allow partial data structures.
69
- * Numeric segments in the path are treated as array indices, and the parent field is wrapped in an array schema.
70
- * Supports flat arrays (arrays of primitives) via the special `__FLAT__` key.
71
- *
72
- * **Important:** The fieldSchema should typically use `.nullish()` to allow empty values. This is because:
73
- * - Base validation (passed to Form) handles "required" constraints
74
- * - Client validation adds dynamic, context-dependent rules (e.g., "username already exists")
75
- * - Form data processing converts empty strings in flat arrays to `null` (not `undefined`)
76
- * - `.nullish()` accepts both `null` and `undefined`, while `.optional()` only accepts `undefined`
77
- *
78
- * This pattern ensures client validation only validates non-empty values, while base validation
79
- * enforces required fields and basic constraints (min length, format, etc.).
80
- *
81
- * @param name - The dot-separated path to the field (e.g., 'username', 'user.profile.email', 'items.0.name', 'tags.0.__FLAT__')
82
- * @param fieldSchema - The veto validation schema for the field. Should typically use `.nullish()` to allow empty values.
83
- * @returns A nested loose object schema matching the field path structure with proper type inference
84
- *
85
- * @example
86
- * ```tsx
87
- * // Typical usage: base validation handles "required", client validation adds dynamic rules
88
- * // Base validation (in Form component)
89
- * const baseSchema = veto({ username: vt.string({ min: 3 }) }); // Required + min length
90
- *
91
- * // Client validation (dynamic check for existing usernames)
92
- * const { data: userData } = useUserQuery(userId);
93
- * useClientValidation(userData, (data) =>
94
- * clientValidationSchemaByName(
95
- * 'username',
96
- * vt.string()
97
- * .refine(
98
- * (value) => !data.existingUsernames.includes(value),
99
- * { message: 'Username already taken' }
100
- * )
101
- * .nullish() // Allow empty - base validation handles "required"
102
- * )
103
- * );
104
- * ```
105
- *
106
- * @example
107
- * ```tsx
108
- * // Nested field path with dynamic validation
109
- * clientValidationSchemaByName(
110
- * 'user.profile.email',
111
- * vt.string()
112
- * .refine(
113
- * (value) => !reservedEmails.includes(value),
114
- * { message: 'This email is reserved' }
115
- * )
116
- * .nullish()
117
- * )
118
- * // => objectLoose({ user: objectLoose({ profile: objectLoose({ email: ... }).optional() }).optional() })
119
- * ```
120
- *
121
- * @example
122
- * ```tsx
123
- * // Array of objects with dynamic validation
124
- * clientValidationSchemaByName(
125
- * 'items.0.tag',
126
- * vt.string()
127
- * .refine((value) => !forbiddenTags.includes(value), { message: 'Tag not allowed' })
128
- * .nullish()
129
- * )
130
- * // => objectLoose({ items: array(objectLoose({ tag: ... })).optional() })
131
- * ```
132
- *
133
- * @example
134
- * ```tsx
135
- * // Flat array (array of primitives) with dynamic validation
136
- * clientValidationSchemaByName(
137
- * 'tags.0.__FLAT__',
138
- * vt.string()
139
- * .refine((value) => !forbiddenWords.includes(value), { message: 'Word not allowed' })
140
- * .nullish()
141
- * )
142
- * // => objectLoose({ tags: array(vt.string().refine(...).nullish()).optional() })
143
- * ```
144
- */
145
- declare const clientValidationSchemaByName: <T extends VetoTypeAny>(name: string, fieldSchema: T) => _fuf_stack_veto_dist_types_d_CSVd_Qmh.Z;
146
-
147
- export { clientValidationSchemaByName, useClientValidation };
1
+ import { n as useClientValidation, t as clientValidationSchemaByName } from "../../useClientValidation-CkBtUSco.js";
2
+ export { clientValidationSchemaByName, useClientValidation };
@@ -1,13 +1,8 @@
1
- import {
2
- clientValidationSchemaByName,
3
- useClientValidation
4
- } from "../../chunk-26VE4IGU.js";
5
- import "../../chunk-SJWL6EMI.js";
6
- import "../../chunk-IV45K4WU.js";
7
- import "../../chunk-O2XJNQQK.js";
8
- import "../../chunk-K2V4ULA2.js";
9
- export {
10
- clientValidationSchemaByName,
11
- useClientValidation
12
- };
1
+ import { n as useClientValidation, t as clientValidationSchemaByName } from "../../useClientValidation-BnnscAEe.js";
2
+
3
+ //#region src/hooks/useClientValidation/index.ts
4
+ /* v8 ignore stop */
5
+
6
+ //#endregion
7
+ export { clientValidationSchemaByName, useClientValidation };
13
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useClientValidation/index.ts"],"sourcesContent":["/* v8 ignore start */\n\nexport * from './useClientValidation';\n\n/* v8 ignore stop */\n"],"mappings":""}
@@ -1,10 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ const require_useController = require('../../useController-BzkCcbSo.cjs');
2
2
 
3
- var _chunk6AWHOBNLcjs = require('../../chunk-6AWHOBNL.cjs');
4
- require('../../chunk-AQJLKHAE.cjs');
5
- require('../../chunk-OKJWLH7T.cjs');
6
- require('../../chunk-555JRYCS.cjs');
3
+ //#region src/hooks/useController/index.ts
4
+ /* v8 ignore stop */
7
5
 
8
-
9
- exports.useController = _chunk6AWHOBNLcjs.useController;
6
+ //#endregion
7
+ exports.useController = require_useController.useController;
10
8
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/hooks/useController/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,4DAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC;AACE;AACF,wDAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/hooks/useController/index.cjs"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/hooks/useController/index.ts"],"sourcesContent":["/* v8 ignore start */\n\nexport * from './useController';\n\n/* v8 ignore stop */\n"],"mappings":""}
@@ -1,29 +1,2 @@
1
- import { UseControllerProps as UseControllerProps$1, ControllerRenderProps, UseFormStateReturn, ControllerFieldState } from 'react-hook-form';
2
-
3
- type UseControllerProps<TFieldValues extends object = object> = UseControllerProps$1<TFieldValues>;
4
- interface UseControllerReturn<TFieldValues extends object = object> {
5
- field: Omit<ControllerRenderProps<TFieldValues>, 'onChange' | 'value'> & {
6
- onChange: (...event: any[]) => void;
7
- value: string;
8
- };
9
- formState: UseFormStateReturn<TFieldValues>;
10
- fieldState: ControllerFieldState;
11
- }
12
- /**
13
- * A wrapper around react-hook-form's useController that transparently handles nullish string conversions.
14
- *
15
- * Key features:
16
- * 1. Empty strings ('') in the UI are stored as null in form state
17
- * 2. Null/undefined values in form state are displayed as empty strings in the UI
18
- * 3. Handles both direct value changes and React synthetic events
19
- * 4. Maintains the same API as react-hook-form's useController
20
- * 5. Notifies UniformContext's userChange listeners on field changes (enables useWatchUserChange hook)
21
- *
22
- * This enables consistent handling of empty/null values while keeping a clean API
23
- * for form inputs that expect string values.
24
- *
25
- * @see https://react-hook-form.com/docs/usecontroller
26
- */
27
- declare const useController: <TFieldValues extends object = object>(props: UseControllerProps<TFieldValues>) => UseControllerReturn<TFieldValues>;
28
-
29
- export { type UseControllerProps, type UseControllerReturn, useController };
1
+ import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "../../useController-C_MZLZIp.cjs";
2
+ export { UseControllerProps, UseControllerReturn, useController };
@@ -1,29 +1,3 @@
1
- import { UseControllerProps as UseControllerProps$1, ControllerRenderProps, UseFormStateReturn, ControllerFieldState } from 'react-hook-form';
2
-
3
- type UseControllerProps<TFieldValues extends object = object> = UseControllerProps$1<TFieldValues>;
4
- interface UseControllerReturn<TFieldValues extends object = object> {
5
- field: Omit<ControllerRenderProps<TFieldValues>, 'onChange' | 'value'> & {
6
- onChange: (...event: any[]) => void;
7
- value: string;
8
- };
9
- formState: UseFormStateReturn<TFieldValues>;
10
- fieldState: ControllerFieldState;
11
- }
12
- /**
13
- * A wrapper around react-hook-form's useController that transparently handles nullish string conversions.
14
- *
15
- * Key features:
16
- * 1. Empty strings ('') in the UI are stored as null in form state
17
- * 2. Null/undefined values in form state are displayed as empty strings in the UI
18
- * 3. Handles both direct value changes and React synthetic events
19
- * 4. Maintains the same API as react-hook-form's useController
20
- * 5. Notifies UniformContext's userChange listeners on field changes (enables useWatchUserChange hook)
21
- *
22
- * This enables consistent handling of empty/null values while keeping a clean API
23
- * for form inputs that expect string values.
24
- *
25
- * @see https://react-hook-form.com/docs/usecontroller
26
- */
27
- declare const useController: <TFieldValues extends object = object>(props: UseControllerProps<TFieldValues>) => UseControllerReturn<TFieldValues>;
28
-
29
- export { type UseControllerProps, type UseControllerReturn, useController };
1
+ import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "../../useController-hjpJQf0w.js";
2
+ import "../../index-B3Z8gdjC.js";
3
+ export { UseControllerProps, UseControllerReturn, useController };
@@ -1,10 +1,8 @@
1
- import {
2
- useController
3
- } from "../../chunk-5MTIQ6WD.js";
4
- import "../../chunk-IV45K4WU.js";
5
- import "../../chunk-O2XJNQQK.js";
6
- import "../../chunk-K2V4ULA2.js";
7
- export {
8
- useController
9
- };
1
+ import { t as useController } from "../../useController-CumIERks.js";
2
+
3
+ //#region src/hooks/useController/index.ts
4
+ /* v8 ignore stop */
5
+
6
+ //#endregion
7
+ export { useController };
10
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useController/index.ts"],"sourcesContent":["/* v8 ignore start */\n\nexport * from './useController';\n\n/* v8 ignore stop */\n"],"mappings":""}
@@ -1,13 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-3JAVQAL5.cjs');
1
+ const require_useFormContext = require('../../useFormContext-CWuN-_7P.cjs');
2
2
 
3
-
4
-
5
- var _chunkFYN7ZWLWcjs = require('../../chunk-FYN7ZWLW.cjs');
6
- require('../../chunk-AQJLKHAE.cjs');
7
- require('../../chunk-OKJWLH7T.cjs');
8
- require('../../chunk-555JRYCS.cjs');
9
-
10
-
11
-
12
- exports.checkFieldIsRequired = _chunkFYN7ZWLWcjs.checkFieldIsRequired; exports.useFormContext = _chunkFYN7ZWLWcjs.useFormContext;
13
- //# sourceMappingURL=index.cjs.map
3
+ exports.checkFieldIsRequired = require_useFormContext.checkFieldIsRequired;
4
+ exports.useFormContext = require_useFormContext.useFormContext;
@@ -1,62 +1,2 @@
1
- import * as _fuf_stack_veto from '@fuf-stack/veto';
2
- import { VetoInstance, VetoFormattedError } from '@fuf-stack/veto';
3
- import * as React from 'react';
4
- import { D as DebugModeSettings, U as UserChangeListener } from '../../FormContext-9Firwt4k.cjs';
5
- import * as react_hook_form from 'react-hook-form';
6
- import { FieldValues, Path, FieldError } from 'react-hook-form';
7
-
8
- /** Schema check whether a field is required or optional */
9
- declare const checkFieldIsRequired: (validation: VetoInstance, path: string[]) => boolean;
10
- /**
11
- * Custom hook that extends react-hook-form's useFormContext to add validation and state management.
12
- *
13
- * Key features:
14
- * - Enhanced `getFieldState` that includes validation schema-based "required" status and testId generation
15
- * - Automatic conversion of form values via `getValues`, `watch`, and `subscribe`:
16
- * - Unwraps flat array wrappers (`{ __FLAT__: value }` → `value`)
17
- * - Converts nullish string markers (`__NULL__` → `null`, `__FALSE__` → `false`, `__ZERO__` → `0`)
18
- * - Filters out empty/null values
19
- */
20
- declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>() => {
21
- formState: react_hook_form.FormState<TFieldValues>;
22
- getFieldState: (name: Path<TFieldValues>, testId?: string) => {
23
- error: FieldError[] | undefined;
24
- invalid: boolean;
25
- required: boolean;
26
- testId: string;
27
- isDirty: boolean;
28
- isTouched: boolean;
29
- isValidating: boolean;
30
- };
31
- getValues: react_hook_form.UseFormGetValues<TFieldValues>;
32
- subscribe: react_hook_form.UseFormSubscribe<TFieldValues>;
33
- watch: react_hook_form.UseFormWatch<TFieldValues>;
34
- debugMode: "disabled" | "debug" | "debug-testids" | "off";
35
- debugModeSettings?: DebugModeSettings;
36
- preventSubmit: (prevent: boolean) => void;
37
- setDebugMode: (debugMode: "disabled" | "debug" | "debug-testids" | "off") => void;
38
- triggerSubmit: (e?: React.BaseSyntheticEvent) => Promise<void> | void;
39
- userChange: {
40
- subscribe: (listener: UserChangeListener) => () => void;
41
- notify: (fieldName: string, value: unknown) => void;
42
- };
43
- validation: {
44
- baseInstance?: VetoInstance;
45
- instance?: VetoInstance;
46
- errors?: VetoFormattedError;
47
- setClientValidationSchema: (key: string, schema: _fuf_stack_veto.VetoTypeAny | null) => void;
48
- };
49
- setError: react_hook_form.UseFormSetError<TFieldValues>;
50
- clearErrors: react_hook_form.UseFormClearErrors<TFieldValues>;
51
- setValue: react_hook_form.UseFormSetValue<TFieldValues>;
52
- trigger: react_hook_form.UseFormTrigger<TFieldValues>;
53
- resetField: react_hook_form.UseFormResetField<TFieldValues>;
54
- reset: react_hook_form.UseFormReset<TFieldValues>;
55
- handleSubmit: react_hook_form.UseFormHandleSubmit<TFieldValues, TTransformedValues>;
56
- unregister: react_hook_form.UseFormUnregister<TFieldValues>;
57
- control: react_hook_form.Control<TFieldValues, TContext, TTransformedValues>;
58
- register: react_hook_form.UseFormRegister<TFieldValues>;
59
- setFocus: react_hook_form.UseFormSetFocus<TFieldValues>;
60
- };
61
-
62
- export { checkFieldIsRequired, useFormContext };
1
+ import { n as useFormContext, t as checkFieldIsRequired } from "../../useFormContext-CZh7pv8f.cjs";
2
+ export { checkFieldIsRequired, useFormContext };
@@ -1,62 +1,4 @@
1
- import * as _fuf_stack_veto from '@fuf-stack/veto';
2
- import { VetoInstance, VetoFormattedError } from '@fuf-stack/veto';
3
- import * as React from 'react';
4
- import { D as DebugModeSettings, U as UserChangeListener } from '../../FormContext-9Firwt4k.js';
5
- import * as react_hook_form from 'react-hook-form';
6
- import { FieldValues, Path, FieldError } from 'react-hook-form';
7
-
8
- /** Schema check whether a field is required or optional */
9
- declare const checkFieldIsRequired: (validation: VetoInstance, path: string[]) => boolean;
10
- /**
11
- * Custom hook that extends react-hook-form's useFormContext to add validation and state management.
12
- *
13
- * Key features:
14
- * - Enhanced `getFieldState` that includes validation schema-based "required" status and testId generation
15
- * - Automatic conversion of form values via `getValues`, `watch`, and `subscribe`:
16
- * - Unwraps flat array wrappers (`{ __FLAT__: value }` → `value`)
17
- * - Converts nullish string markers (`__NULL__` → `null`, `__FALSE__` → `false`, `__ZERO__` → `0`)
18
- * - Filters out empty/null values
19
- */
20
- declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>() => {
21
- formState: react_hook_form.FormState<TFieldValues>;
22
- getFieldState: (name: Path<TFieldValues>, testId?: string) => {
23
- error: FieldError[] | undefined;
24
- invalid: boolean;
25
- required: boolean;
26
- testId: string;
27
- isDirty: boolean;
28
- isTouched: boolean;
29
- isValidating: boolean;
30
- };
31
- getValues: react_hook_form.UseFormGetValues<TFieldValues>;
32
- subscribe: react_hook_form.UseFormSubscribe<TFieldValues>;
33
- watch: react_hook_form.UseFormWatch<TFieldValues>;
34
- debugMode: "disabled" | "debug" | "debug-testids" | "off";
35
- debugModeSettings?: DebugModeSettings;
36
- preventSubmit: (prevent: boolean) => void;
37
- setDebugMode: (debugMode: "disabled" | "debug" | "debug-testids" | "off") => void;
38
- triggerSubmit: (e?: React.BaseSyntheticEvent) => Promise<void> | void;
39
- userChange: {
40
- subscribe: (listener: UserChangeListener) => () => void;
41
- notify: (fieldName: string, value: unknown) => void;
42
- };
43
- validation: {
44
- baseInstance?: VetoInstance;
45
- instance?: VetoInstance;
46
- errors?: VetoFormattedError;
47
- setClientValidationSchema: (key: string, schema: _fuf_stack_veto.VetoTypeAny | null) => void;
48
- };
49
- setError: react_hook_form.UseFormSetError<TFieldValues>;
50
- clearErrors: react_hook_form.UseFormClearErrors<TFieldValues>;
51
- setValue: react_hook_form.UseFormSetValue<TFieldValues>;
52
- trigger: react_hook_form.UseFormTrigger<TFieldValues>;
53
- resetField: react_hook_form.UseFormResetField<TFieldValues>;
54
- reset: react_hook_form.UseFormReset<TFieldValues>;
55
- handleSubmit: react_hook_form.UseFormHandleSubmit<TFieldValues, TTransformedValues>;
56
- unregister: react_hook_form.UseFormUnregister<TFieldValues>;
57
- control: react_hook_form.Control<TFieldValues, TContext, TTransformedValues>;
58
- register: react_hook_form.UseFormRegister<TFieldValues>;
59
- setFocus: react_hook_form.UseFormSetFocus<TFieldValues>;
60
- };
61
-
62
- export { checkFieldIsRequired, useFormContext };
1
+ import "../../FormContext-C2_WMi_v.js";
2
+ import { n as useFormContext, t as checkFieldIsRequired } from "../../useFormContext-3AAPT6eZ.js";
3
+ import "../../index-CJNLQVjx.js";
4
+ export { checkFieldIsRequired, useFormContext };