@timeax/form-palette 0.0.4 → 0.0.6

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 (425) hide show
  1. package/dist/{schema/adapter.d.ts → adapters.d.mts} +116 -13
  2. package/dist/adapters.d.ts +292 -0
  3. package/dist/adapters.js +13283 -0
  4. package/dist/adapters.js.map +1 -0
  5. package/dist/adapters.mjs +13269 -0
  6. package/dist/adapters.mjs.map +1 -0
  7. package/dist/index.d.mts +3828 -0
  8. package/dist/index.d.ts +3828 -15
  9. package/dist/index.js +43013 -25
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +42965 -0
  12. package/dist/index.mjs.map +1 -0
  13. package/package.json +22 -7
  14. package/dist/adapters/axios.d.ts +0 -21
  15. package/dist/adapters/axios.d.ts.map +0 -1
  16. package/dist/adapters/axios.js +0 -74
  17. package/dist/adapters/axios.js.map +0 -1
  18. package/dist/adapters/index.d.ts +0 -35
  19. package/dist/adapters/index.d.ts.map +0 -1
  20. package/dist/adapters/index.js +0 -74
  21. package/dist/adapters/index.js.map +0 -1
  22. package/dist/adapters/inertia.d.ts +0 -24
  23. package/dist/adapters/inertia.d.ts.map +0 -1
  24. package/dist/adapters/inertia.js +0 -126
  25. package/dist/adapters/inertia.js.map +0 -1
  26. package/dist/core/adapter-registry.d.ts +0 -30
  27. package/dist/core/adapter-registry.d.ts.map +0 -1
  28. package/dist/core/adapter-registry.js +0 -69
  29. package/dist/core/adapter-registry.js.map +0 -1
  30. package/dist/core/bound/bind-host.d.ts +0 -13
  31. package/dist/core/bound/bind-host.d.ts.map +0 -1
  32. package/dist/core/bound/bind-host.js +0 -2
  33. package/dist/core/bound/bind-host.js.map +0 -1
  34. package/dist/core/bound/observe-bound-field.d.ts +0 -21
  35. package/dist/core/bound/observe-bound-field.d.ts.map +0 -1
  36. package/dist/core/bound/observe-bound-field.js +0 -116
  37. package/dist/core/bound/observe-bound-field.js.map +0 -1
  38. package/dist/core/bound/wait-for-bound-field.d.ts +0 -5
  39. package/dist/core/bound/wait-for-bound-field.d.ts.map +0 -1
  40. package/dist/core/bound/wait-for-bound-field.js +0 -35
  41. package/dist/core/bound/wait-for-bound-field.js.map +0 -1
  42. package/dist/core/context.d.ts +0 -19
  43. package/dist/core/context.d.ts.map +0 -1
  44. package/dist/core/context.js +0 -11
  45. package/dist/core/context.js.map +0 -1
  46. package/dist/core/core-provider.d.ts +0 -22
  47. package/dist/core/core-provider.d.ts.map +0 -1
  48. package/dist/core/core-provider.js +0 -663
  49. package/dist/core/core-provider.js.map +0 -1
  50. package/dist/core/core-root.d.ts +0 -26
  51. package/dist/core/core-root.d.ts.map +0 -1
  52. package/dist/core/core-root.js +0 -38
  53. package/dist/core/core-root.js.map +0 -1
  54. package/dist/core/core-shell.d.ts +0 -22
  55. package/dist/core/core-shell.d.ts.map +0 -1
  56. package/dist/core/core-shell.js +0 -8
  57. package/dist/core/core-shell.js.map +0 -1
  58. package/dist/core/errors/error-strip.d.ts +0 -34
  59. package/dist/core/errors/error-strip.d.ts.map +0 -1
  60. package/dist/core/errors/error-strip.js +0 -18
  61. package/dist/core/errors/error-strip.js.map +0 -1
  62. package/dist/core/errors/index.d.ts +0 -4
  63. package/dist/core/errors/index.d.ts.map +0 -1
  64. package/dist/core/errors/index.js +0 -4
  65. package/dist/core/errors/index.js.map +0 -1
  66. package/dist/core/errors/map-error-bag.d.ts +0 -24
  67. package/dist/core/errors/map-error-bag.d.ts.map +0 -1
  68. package/dist/core/errors/map-error-bag.js +0 -39
  69. package/dist/core/errors/map-error-bag.js.map +0 -1
  70. package/dist/core/errors/map-zod.d.ts +0 -18
  71. package/dist/core/errors/map-zod.d.ts.map +0 -1
  72. package/dist/core/errors/map-zod.js +0 -27
  73. package/dist/core/errors/map-zod.js.map +0 -1
  74. package/dist/core/hooks/use-button.d.ts +0 -73
  75. package/dist/core/hooks/use-button.d.ts.map +0 -1
  76. package/dist/core/hooks/use-button.js +0 -116
  77. package/dist/core/hooks/use-button.js.map +0 -1
  78. package/dist/core/hooks/use-core-context.d.ts +0 -9
  79. package/dist/core/hooks/use-core-context.d.ts.map +0 -1
  80. package/dist/core/hooks/use-core-context.js +0 -17
  81. package/dist/core/hooks/use-core-context.js.map +0 -1
  82. package/dist/core/hooks/use-core-utility.d.ts +0 -1
  83. package/dist/core/hooks/use-core-utility.d.ts.map +0 -1
  84. package/dist/core/hooks/use-core-utility.js +0 -2
  85. package/dist/core/hooks/use-core-utility.js.map +0 -1
  86. package/dist/core/hooks/use-core.d.ts +0 -9
  87. package/dist/core/hooks/use-core.d.ts.map +0 -1
  88. package/dist/core/hooks/use-core.js +0 -11
  89. package/dist/core/hooks/use-core.js.map +0 -1
  90. package/dist/core/hooks/use-field.d.ts +0 -141
  91. package/dist/core/hooks/use-field.d.ts.map +0 -1
  92. package/dist/core/hooks/use-field.js +0 -256
  93. package/dist/core/hooks/use-field.js.map +0 -1
  94. package/dist/core/hooks/use-optional-field.d.ts +0 -9
  95. package/dist/core/hooks/use-optional-field.d.ts.map +0 -1
  96. package/dist/core/hooks/use-optional-field.js +0 -146
  97. package/dist/core/hooks/use-optional-field.js.map +0 -1
  98. package/dist/core/index.d.ts +0 -11
  99. package/dist/core/index.d.ts.map +0 -1
  100. package/dist/core/index.js +0 -11
  101. package/dist/core/index.js.map +0 -1
  102. package/dist/core/registry/binder-registry.d.ts +0 -38
  103. package/dist/core/registry/binder-registry.d.ts.map +0 -1
  104. package/dist/core/registry/binder-registry.js +0 -52
  105. package/dist/core/registry/binder-registry.js.map +0 -1
  106. package/dist/core/registry/field-registry.d.ts +0 -86
  107. package/dist/core/registry/field-registry.d.ts.map +0 -1
  108. package/dist/core/registry/field-registry.js +0 -173
  109. package/dist/core/registry/field-registry.js.map +0 -1
  110. package/dist/core/test.d.ts +0 -2
  111. package/dist/core/test.d.ts.map +0 -1
  112. package/dist/core/test.js +0 -9
  113. package/dist/core/test.js.map +0 -1
  114. package/dist/index.d.ts.map +0 -1
  115. package/dist/input/index.d.ts +0 -3
  116. package/dist/input/index.d.ts.map +0 -1
  117. package/dist/input/index.js +0 -3
  118. package/dist/input/index.js.map +0 -1
  119. package/dist/input/input-field.d.ts +0 -15
  120. package/dist/input/input-field.d.ts.map +0 -1
  121. package/dist/input/input-field.js +0 -413
  122. package/dist/input/input-field.js.map +0 -1
  123. package/dist/input/input-layout-graph.d.ts +0 -77
  124. package/dist/input/input-layout-graph.d.ts.map +0 -1
  125. package/dist/input/input-layout-graph.js +0 -108
  126. package/dist/input/input-layout-graph.js.map +0 -1
  127. package/dist/input/input-props.d.ts +0 -128
  128. package/dist/input/input-props.d.ts.map +0 -1
  129. package/dist/input/input-props.js +0 -4
  130. package/dist/input/input-props.js.map +0 -1
  131. package/dist/lib/get-global-countries.d.ts +0 -3
  132. package/dist/lib/get-global-countries.d.ts.map +0 -1
  133. package/dist/lib/get-global-countries.js +0 -70
  134. package/dist/lib/get-global-countries.js.map +0 -1
  135. package/dist/lib/utils.d.ts +0 -3
  136. package/dist/lib/utils.d.ts.map +0 -1
  137. package/dist/lib/utils.js +0 -6
  138. package/dist/lib/utils.js.map +0 -1
  139. package/dist/presets/index.d.ts +0 -1
  140. package/dist/presets/index.d.ts.map +0 -1
  141. package/dist/presets/index.js +0 -2
  142. package/dist/presets/index.js.map +0 -1
  143. package/dist/presets/shadcn-preset.d.ts +0 -1
  144. package/dist/presets/shadcn-preset.d.ts.map +0 -1
  145. package/dist/presets/shadcn-preset.js +0 -2
  146. package/dist/presets/shadcn-preset.js.map +0 -1
  147. package/dist/presets/shadcn-variants/checkbox.d.ts +0 -212
  148. package/dist/presets/shadcn-variants/checkbox.d.ts.map +0 -1
  149. package/dist/presets/shadcn-variants/checkbox.js +0 -315
  150. package/dist/presets/shadcn-variants/checkbox.js.map +0 -1
  151. package/dist/presets/shadcn-variants/chips.d.ts +0 -154
  152. package/dist/presets/shadcn-variants/chips.d.ts.map +0 -1
  153. package/dist/presets/shadcn-variants/chips.js +0 -266
  154. package/dist/presets/shadcn-variants/chips.js.map +0 -1
  155. package/dist/presets/shadcn-variants/color.d.ts +0 -63
  156. package/dist/presets/shadcn-variants/color.d.ts.map +0 -1
  157. package/dist/presets/shadcn-variants/color.js +0 -96
  158. package/dist/presets/shadcn-variants/color.js.map +0 -1
  159. package/dist/presets/shadcn-variants/custom.d.ts +0 -94
  160. package/dist/presets/shadcn-variants/custom.d.ts.map +0 -1
  161. package/dist/presets/shadcn-variants/custom.js +0 -80
  162. package/dist/presets/shadcn-variants/custom.js.map +0 -1
  163. package/dist/presets/shadcn-variants/date.d.ts +0 -114
  164. package/dist/presets/shadcn-variants/date.d.ts.map +0 -1
  165. package/dist/presets/shadcn-variants/date.js +0 -414
  166. package/dist/presets/shadcn-variants/date.js.map +0 -1
  167. package/dist/presets/shadcn-variants/file.d.ts +0 -79
  168. package/dist/presets/shadcn-variants/file.d.ts.map +0 -1
  169. package/dist/presets/shadcn-variants/file.js +0 -289
  170. package/dist/presets/shadcn-variants/file.js.map +0 -1
  171. package/dist/presets/shadcn-variants/keyvalue.d.ts +0 -35
  172. package/dist/presets/shadcn-variants/keyvalue.d.ts.map +0 -1
  173. package/dist/presets/shadcn-variants/keyvalue.js +0 -215
  174. package/dist/presets/shadcn-variants/keyvalue.js.map +0 -1
  175. package/dist/presets/shadcn-variants/multiselect.d.ts +0 -210
  176. package/dist/presets/shadcn-variants/multiselect.d.ts.map +0 -1
  177. package/dist/presets/shadcn-variants/multiselect.js +0 -352
  178. package/dist/presets/shadcn-variants/multiselect.js.map +0 -1
  179. package/dist/presets/shadcn-variants/number.d.ts +0 -31
  180. package/dist/presets/shadcn-variants/number.d.ts.map +0 -1
  181. package/dist/presets/shadcn-variants/number.js +0 -64
  182. package/dist/presets/shadcn-variants/number.js.map +0 -1
  183. package/dist/presets/shadcn-variants/password.d.ts +0 -195
  184. package/dist/presets/shadcn-variants/password.d.ts.map +0 -1
  185. package/dist/presets/shadcn-variants/password.js +0 -296
  186. package/dist/presets/shadcn-variants/password.js.map +0 -1
  187. package/dist/presets/shadcn-variants/phone.d.ts +0 -69
  188. package/dist/presets/shadcn-variants/phone.d.ts.map +0 -1
  189. package/dist/presets/shadcn-variants/phone.js +0 -308
  190. package/dist/presets/shadcn-variants/phone.js.map +0 -1
  191. package/dist/presets/shadcn-variants/radio.d.ts +0 -172
  192. package/dist/presets/shadcn-variants/radio.d.ts.map +0 -1
  193. package/dist/presets/shadcn-variants/radio.js +0 -192
  194. package/dist/presets/shadcn-variants/radio.js.map +0 -1
  195. package/dist/presets/shadcn-variants/select.d.ts +0 -203
  196. package/dist/presets/shadcn-variants/select.d.ts.map +0 -1
  197. package/dist/presets/shadcn-variants/select.js +0 -285
  198. package/dist/presets/shadcn-variants/select.js.map +0 -1
  199. package/dist/presets/shadcn-variants/slider.d.ts +0 -131
  200. package/dist/presets/shadcn-variants/slider.d.ts.map +0 -1
  201. package/dist/presets/shadcn-variants/slider.js +0 -151
  202. package/dist/presets/shadcn-variants/slider.js.map +0 -1
  203. package/dist/presets/shadcn-variants/text.d.ts +0 -155
  204. package/dist/presets/shadcn-variants/text.d.ts.map +0 -1
  205. package/dist/presets/shadcn-variants/text.js +0 -98
  206. package/dist/presets/shadcn-variants/text.js.map +0 -1
  207. package/dist/presets/shadcn-variants/textarea.d.ts +0 -18
  208. package/dist/presets/shadcn-variants/textarea.d.ts.map +0 -1
  209. package/dist/presets/shadcn-variants/textarea.js +0 -24
  210. package/dist/presets/shadcn-variants/textarea.js.map +0 -1
  211. package/dist/presets/shadcn-variants/toggle.d.ts +0 -61
  212. package/dist/presets/shadcn-variants/toggle.d.ts.map +0 -1
  213. package/dist/presets/shadcn-variants/toggle.js +0 -67
  214. package/dist/presets/shadcn-variants/toggle.js.map +0 -1
  215. package/dist/presets/shadcn-variants/treeselect.d.ts +0 -81
  216. package/dist/presets/shadcn-variants/treeselect.d.ts.map +0 -1
  217. package/dist/presets/shadcn-variants/treeselect.js +0 -317
  218. package/dist/presets/shadcn-variants/treeselect.js.map +0 -1
  219. package/dist/presets/ui/badge.d.ts +0 -10
  220. package/dist/presets/ui/badge.d.ts.map +0 -1
  221. package/dist/presets/ui/badge.js +0 -23
  222. package/dist/presets/ui/badge.js.map +0 -1
  223. package/dist/presets/ui/button.d.ts +0 -11
  224. package/dist/presets/ui/button.d.ts.map +0 -1
  225. package/dist/presets/ui/button.js +0 -34
  226. package/dist/presets/ui/button.js.map +0 -1
  227. package/dist/presets/ui/calendar.d.ts +0 -9
  228. package/dist/presets/ui/calendar.d.ts.map +0 -1
  229. package/dist/presets/ui/calendar.js +0 -76
  230. package/dist/presets/ui/calendar.js.map +0 -1
  231. package/dist/presets/ui/checkbox.d.ts +0 -18
  232. package/dist/presets/ui/checkbox.d.ts.map +0 -1
  233. package/dist/presets/ui/checkbox.js +0 -61
  234. package/dist/presets/ui/checkbox.js.map +0 -1
  235. package/dist/presets/ui/custom.d.ts +0 -1
  236. package/dist/presets/ui/custom.d.ts.map +0 -1
  237. package/dist/presets/ui/custom.js +0 -2
  238. package/dist/presets/ui/custom.js.map +0 -1
  239. package/dist/presets/ui/dialog.d.ts +0 -16
  240. package/dist/presets/ui/dialog.d.ts.map +0 -1
  241. package/dist/presets/ui/dialog.js +0 -36
  242. package/dist/presets/ui/dialog.js.map +0 -1
  243. package/dist/presets/ui/field.d.ts +0 -25
  244. package/dist/presets/ui/field.d.ts.map +0 -1
  245. package/dist/presets/ui/field.js +0 -76
  246. package/dist/presets/ui/field.js.map +0 -1
  247. package/dist/presets/ui/input-mask.d.ts +0 -34
  248. package/dist/presets/ui/input-mask.d.ts.map +0 -1
  249. package/dist/presets/ui/input-mask.js +0 -561
  250. package/dist/presets/ui/input-mask.js.map +0 -1
  251. package/dist/presets/ui/input-otp.d.ts +0 -12
  252. package/dist/presets/ui/input-otp.d.ts.map +0 -1
  253. package/dist/presets/ui/input-otp.js +0 -22
  254. package/dist/presets/ui/input-otp.js.map +0 -1
  255. package/dist/presets/ui/input.d.ts +0 -83
  256. package/dist/presets/ui/input.d.ts.map +0 -1
  257. package/dist/presets/ui/input.js +0 -436
  258. package/dist/presets/ui/input.js.map +0 -1
  259. package/dist/presets/ui/label.d.ts +0 -5
  260. package/dist/presets/ui/label.d.ts.map +0 -1
  261. package/dist/presets/ui/label.js +0 -8
  262. package/dist/presets/ui/label.js.map +0 -1
  263. package/dist/presets/ui/number.d.ts +0 -60
  264. package/dist/presets/ui/number.d.ts.map +0 -1
  265. package/dist/presets/ui/number.js +0 -1078
  266. package/dist/presets/ui/number.js.map +0 -1
  267. package/dist/presets/ui/popover.d.ts +0 -8
  268. package/dist/presets/ui/popover.d.ts.map +0 -1
  269. package/dist/presets/ui/popover.js +0 -17
  270. package/dist/presets/ui/popover.js.map +0 -1
  271. package/dist/presets/ui/radio-group.d.ts +0 -6
  272. package/dist/presets/ui/radio-group.d.ts.map +0 -1
  273. package/dist/presets/ui/radio-group.js +0 -12
  274. package/dist/presets/ui/radio-group.js.map +0 -1
  275. package/dist/presets/ui/scroll-area.d.ts +0 -6
  276. package/dist/presets/ui/scroll-area.d.ts.map +0 -1
  277. package/dist/presets/ui/scroll-area.js +0 -13
  278. package/dist/presets/ui/scroll-area.js.map +0 -1
  279. package/dist/presets/ui/select.d.ts +0 -21
  280. package/dist/presets/ui/select.d.ts.map +0 -1
  281. package/dist/presets/ui/select.js +0 -38
  282. package/dist/presets/ui/select.js.map +0 -1
  283. package/dist/presets/ui/separator.d.ts +0 -5
  284. package/dist/presets/ui/separator.d.ts.map +0 -1
  285. package/dist/presets/ui/separator.js +0 -9
  286. package/dist/presets/ui/separator.js.map +0 -1
  287. package/dist/presets/ui/slider.d.ts +0 -5
  288. package/dist/presets/ui/slider.d.ts.map +0 -1
  289. package/dist/presets/ui/slider.js +0 -14
  290. package/dist/presets/ui/slider.js.map +0 -1
  291. package/dist/presets/ui/switch.d.ts +0 -7
  292. package/dist/presets/ui/switch.d.ts.map +0 -1
  293. package/dist/presets/ui/switch.js +0 -9
  294. package/dist/presets/ui/switch.js.map +0 -1
  295. package/dist/presets/ui/textarea.d.ts +0 -76
  296. package/dist/presets/ui/textarea.d.ts.map +0 -1
  297. package/dist/presets/ui/textarea.js +0 -291
  298. package/dist/presets/ui/textarea.js.map +0 -1
  299. package/dist/presets/ui/time-dropdowns.d.ts +0 -58
  300. package/dist/presets/ui/time-dropdowns.d.ts.map +0 -1
  301. package/dist/presets/ui/time-dropdowns.js +0 -133
  302. package/dist/presets/ui/time-dropdowns.js.map +0 -1
  303. package/dist/schema/adapter.d.ts.map +0 -1
  304. package/dist/schema/adapter.js +0 -3
  305. package/dist/schema/adapter.js.map +0 -1
  306. package/dist/schema/core.d.ts +0 -329
  307. package/dist/schema/core.d.ts.map +0 -1
  308. package/dist/schema/core.js +0 -4
  309. package/dist/schema/core.js.map +0 -1
  310. package/dist/schema/field-map.d.ts +0 -1
  311. package/dist/schema/field-map.d.ts.map +0 -1
  312. package/dist/schema/field-map.js +0 -2
  313. package/dist/schema/field-map.js.map +0 -1
  314. package/dist/schema/field.d.ts +0 -191
  315. package/dist/schema/field.d.ts.map +0 -1
  316. package/dist/schema/field.js +0 -4
  317. package/dist/schema/field.js.map +0 -1
  318. package/dist/schema/index.d.ts +0 -1
  319. package/dist/schema/index.d.ts.map +0 -1
  320. package/dist/schema/index.js +0 -2
  321. package/dist/schema/index.js.map +0 -1
  322. package/dist/schema/input-field.d.ts +0 -223
  323. package/dist/schema/input-field.d.ts.map +0 -1
  324. package/dist/schema/input-field.js +0 -3
  325. package/dist/schema/input-field.js.map +0 -1
  326. package/dist/schema/presets.d.ts +0 -1
  327. package/dist/schema/presets.d.ts.map +0 -1
  328. package/dist/schema/presets.js +0 -2
  329. package/dist/schema/presets.js.map +0 -1
  330. package/dist/schema/variant.d.ts +0 -176
  331. package/dist/schema/variant.d.ts.map +0 -1
  332. package/dist/schema/variant.js +0 -3
  333. package/dist/schema/variant.js.map +0 -1
  334. package/dist/variants/core/checkbox.d.ts +0 -15
  335. package/dist/variants/core/checkbox.d.ts.map +0 -1
  336. package/dist/variants/core/checkbox.js +0 -27
  337. package/dist/variants/core/checkbox.js.map +0 -1
  338. package/dist/variants/core/chips.d.ts +0 -3
  339. package/dist/variants/core/chips.d.ts.map +0 -1
  340. package/dist/variants/core/chips.js +0 -20
  341. package/dist/variants/core/chips.js.map +0 -1
  342. package/dist/variants/core/color.d.ts +0 -3
  343. package/dist/variants/core/color.d.ts.map +0 -1
  344. package/dist/variants/core/color.js +0 -14
  345. package/dist/variants/core/color.js.map +0 -1
  346. package/dist/variants/core/custom.d.ts +0 -11
  347. package/dist/variants/core/custom.d.ts.map +0 -1
  348. package/dist/variants/core/custom.js +0 -15
  349. package/dist/variants/core/custom.js.map +0 -1
  350. package/dist/variants/core/date.d.ts +0 -3
  351. package/dist/variants/core/date.d.ts.map +0 -1
  352. package/dist/variants/core/date.js +0 -20
  353. package/dist/variants/core/date.js.map +0 -1
  354. package/dist/variants/core/file.d.ts +0 -3
  355. package/dist/variants/core/file.d.ts.map +0 -1
  356. package/dist/variants/core/file.js +0 -6
  357. package/dist/variants/core/file.js.map +0 -1
  358. package/dist/variants/core/keyvalue.d.ts +0 -3
  359. package/dist/variants/core/keyvalue.d.ts.map +0 -1
  360. package/dist/variants/core/keyvalue.js +0 -9
  361. package/dist/variants/core/keyvalue.js.map +0 -1
  362. package/dist/variants/core/multiselect.d.ts +0 -11
  363. package/dist/variants/core/multiselect.d.ts.map +0 -1
  364. package/dist/variants/core/multiselect.js +0 -15
  365. package/dist/variants/core/multiselect.js.map +0 -1
  366. package/dist/variants/core/number.d.ts +0 -38
  367. package/dist/variants/core/number.d.ts.map +0 -1
  368. package/dist/variants/core/number.js +0 -62
  369. package/dist/variants/core/number.js.map +0 -1
  370. package/dist/variants/core/password.d.ts +0 -11
  371. package/dist/variants/core/password.d.ts.map +0 -1
  372. package/dist/variants/core/password.js +0 -29
  373. package/dist/variants/core/password.js.map +0 -1
  374. package/dist/variants/core/phone.d.ts +0 -3
  375. package/dist/variants/core/phone.d.ts.map +0 -1
  376. package/dist/variants/core/phone.js +0 -14
  377. package/dist/variants/core/phone.js.map +0 -1
  378. package/dist/variants/core/radio.d.ts +0 -8
  379. package/dist/variants/core/radio.d.ts.map +0 -1
  380. package/dist/variants/core/radio.js +0 -34
  381. package/dist/variants/core/radio.js.map +0 -1
  382. package/dist/variants/core/select.d.ts +0 -5
  383. package/dist/variants/core/select.d.ts.map +0 -1
  384. package/dist/variants/core/select.js +0 -11
  385. package/dist/variants/core/select.js.map +0 -1
  386. package/dist/variants/core/slider.d.ts +0 -19
  387. package/dist/variants/core/slider.d.ts.map +0 -1
  388. package/dist/variants/core/slider.js +0 -36
  389. package/dist/variants/core/slider.js.map +0 -1
  390. package/dist/variants/core/text.d.ts +0 -38
  391. package/dist/variants/core/text.d.ts.map +0 -1
  392. package/dist/variants/core/text.js +0 -62
  393. package/dist/variants/core/text.js.map +0 -1
  394. package/dist/variants/core/textarea.d.ts +0 -3
  395. package/dist/variants/core/textarea.d.ts.map +0 -1
  396. package/dist/variants/core/textarea.js +0 -20
  397. package/dist/variants/core/textarea.js.map +0 -1
  398. package/dist/variants/core/toggle.d.ts +0 -6
  399. package/dist/variants/core/toggle.d.ts.map +0 -1
  400. package/dist/variants/core/toggle.js +0 -41
  401. package/dist/variants/core/toggle.js.map +0 -1
  402. package/dist/variants/core/treeselect.d.ts +0 -4
  403. package/dist/variants/core/treeselect.d.ts.map +0 -1
  404. package/dist/variants/core/treeselect.js +0 -7
  405. package/dist/variants/core/treeselect.js.map +0 -1
  406. package/dist/variants/helpers/selection-summary.d.ts +0 -24
  407. package/dist/variants/helpers/selection-summary.d.ts.map +0 -1
  408. package/dist/variants/helpers/selection-summary.js +0 -105
  409. package/dist/variants/helpers/selection-summary.js.map +0 -1
  410. package/dist/variants/index.d.ts +0 -16
  411. package/dist/variants/index.d.ts.map +0 -1
  412. package/dist/variants/index.js +0 -55
  413. package/dist/variants/index.js.map +0 -1
  414. package/dist/variants/registry.d.ts +0 -19
  415. package/dist/variants/registry.d.ts.map +0 -1
  416. package/dist/variants/registry.js +0 -29
  417. package/dist/variants/registry.js.map +0 -1
  418. package/dist/variants/select-shared.d.ts +0 -1
  419. package/dist/variants/select-shared.d.ts.map +0 -1
  420. package/dist/variants/select-shared.js +0 -2
  421. package/dist/variants/select-shared.js.map +0 -1
  422. package/dist/variants/shared.d.ts +0 -107
  423. package/dist/variants/shared.d.ts.map +0 -1
  424. package/dist/variants/shared.js +0 -3
  425. package/dist/variants/shared.js.map +0 -1
@@ -1,16 +1,19 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { Page } from './../../../../node_modules/@inertiajs/core/types/types.d';
3
+
1
4
  /**
2
5
  * HTTP methods supported by the core adapter layer.
3
6
  *
4
7
  * This matches the legacy Method union from the old types.ts.
5
8
  */
6
- export type Method = 'post' | 'get' | 'delete' | 'put' | 'patch';
9
+ type Method = 'post' | 'get' | 'delete' | 'put' | 'patch';
7
10
  /**
8
11
  * Lifecycle callbacks used by adapters to report events back to the core.
9
12
  *
10
13
  * @template Ok Type of the "successful" response payload (e.g. AxiosResponse).
11
14
  * @template Err Type of the "error" payload (e.g. AxiosError, unknown).
12
15
  */
13
- export interface AdapterCallbacks<Ok = unknown, Err = unknown> {
16
+ interface AdapterCallbacks<Ok = unknown, Err = unknown> {
14
17
  /**
15
18
  * Called when the underlying request completes successfully.
16
19
  * The adapter decides what "success" means (HTTP 2xx, no exception, etc.).
@@ -45,7 +48,7 @@ export interface AdapterCallbacks<Ok = unknown, Err = unknown> {
45
48
  *
46
49
  * @template Ok Type of the "successful" response payload.
47
50
  */
48
- export interface AdapterResult<Ok = unknown> {
51
+ interface AdapterResult<Ok = unknown> {
49
52
  /**
50
53
  * Fire-and-forget trigger.
51
54
  *
@@ -85,7 +88,7 @@ export interface AdapterResult<Ok = unknown> {
85
88
  * @template Ok Type of the "successful" response payload.
86
89
  * @template Err Type of the "error" payload.
87
90
  */
88
- export interface AdapterConfig<Body = unknown, Ok = unknown, Err = unknown> {
91
+ interface AdapterConfig<Body = unknown, Ok = unknown, Err = unknown> {
89
92
  /**
90
93
  * HTTP method / intent used by the adapter.
91
94
  */
@@ -124,7 +127,7 @@ export interface AdapterConfig<Body = unknown, Ok = unknown, Err = unknown> {
124
127
  * @template Ok Type of the "successful" response payload.
125
128
  * @template Err Type of the "error" payload.
126
129
  */
127
- export type AdapterFactory<Body = unknown, Ok = unknown, Err = unknown> = (config: AdapterConfig<Body, Ok, Err>) => AdapterResult<Ok>;
130
+ type AdapterFactory<Body = unknown, Ok = unknown, Err = unknown> = (config: AdapterConfig<Body, Ok, Err>) => AdapterResult<Ok>;
128
131
  /**
129
132
  * Registry of adapter flavours.
130
133
  *
@@ -136,7 +139,7 @@ export type AdapterFactory<Body = unknown, Ok = unknown, Err = unknown> = (confi
136
139
  * Hosts can extend this interface via module augmentation to add
137
140
  * their own adapter flavours (e.g. 'axios', 'inertia', ...).
138
141
  */
139
- export interface Adapters {
142
+ interface Adapters {
140
143
  local: {
141
144
  /**
142
145
  * Type of the value produced by adapter.send() for this adapter flavour.
@@ -155,22 +158,22 @@ export interface Adapters {
155
158
  *
156
159
  * Hosts can extend this union by augmenting the Adapters interface.
157
160
  */
158
- export type AdapterKey = keyof Adapters;
161
+ type AdapterKey = keyof Adapters;
159
162
  /**
160
163
  * Helper: given an adapter key K, get its "ok" payload type.
161
164
  */
162
- export type AdapterOk<K extends AdapterKey> = Adapters[K]['ok'];
165
+ type AdapterOk<K extends AdapterKey> = Adapters[K]['ok'];
163
166
  /**
164
167
  * Helper: given an adapter key K, get its "error" payload type.
165
168
  */
166
- export type AdapterError<K extends AdapterKey> = Adapters[K]['err'];
169
+ type AdapterError<K extends AdapterKey> = Adapters[K]['err'];
167
170
  /**
168
171
  * Helper: what CoreProps.onSubmitted receives for adapter K.
169
172
  *
170
173
  * For now, this is the same as AdapterOk<K>. If a host wants a different
171
174
  * shape, they can wrap/transform in their own components.
172
175
  */
173
- export type AdapterSubmit<K extends AdapterKey> = AdapterOk<K>;
176
+ type AdapterSubmit<K extends AdapterKey> = AdapterOk<K>;
174
177
  /**
175
178
  * AdapterConfig specialised for a named adapter key K, using the
176
179
  * registry's ok/err types for that key.
@@ -178,12 +181,112 @@ export type AdapterSubmit<K extends AdapterKey> = AdapterOk<K>;
178
181
  * @template K Adapter key.
179
182
  * @template Body Outbound payload type.
180
183
  */
181
- export type NamedAdapterConfig<K extends AdapterKey, Body = unknown> = AdapterConfig<Body, AdapterOk<K>, AdapterError<K>>;
184
+ type NamedAdapterConfig<K extends AdapterKey, Body = unknown> = AdapterConfig<Body, AdapterOk<K>, AdapterError<K>>;
182
185
  /**
183
186
  * AdapterFactory specialised for a named adapter key K.
184
187
  *
185
188
  * @template K Adapter key.
186
189
  * @template Body Outbound payload type.
187
190
  */
188
- export type NamedAdapterFactory<K extends AdapterKey, Body = unknown> = (config: NamedAdapterConfig<K, Body>) => AdapterResult<AdapterOk<K>>;
189
- //# sourceMappingURL=adapter.d.ts.map
191
+ type NamedAdapterFactory<K extends AdapterKey, Body = unknown> = (config: NamedAdapterConfig<K, Body>) => AdapterResult<AdapterOk<K>>;
192
+
193
+ /**
194
+ * Built-in 'local' adapter.
195
+ *
196
+ * Semantics:
197
+ * - send(options?) resolves to `{ data: Body }`
198
+ * - submit/run do nothing by default (no side effects)
199
+ *
200
+ * The core will typically call onSubmitted with the result of send().
201
+ */
202
+ declare const localAdapter: NamedAdapterFactory<"local", any>;
203
+ /**
204
+ * Register or override an adapter factory for a given key.
205
+ *
206
+ * Hosts can call this at bootstrap time, e.g.:
207
+ *
208
+ * registerAdapter<'axios'>('axios', axiosAdapter);
209
+ */
210
+ declare function registerAdapter<K extends AdapterKey, Body = any>(key: K, factory: NamedAdapterFactory<K, Body>): void;
211
+ /**
212
+ * Lookup an adapter factory by key.
213
+ *
214
+ * If no adapter is found for the given key, this returns undefined.
215
+ */
216
+ declare function getAdapter<K extends AdapterKey>(key: K): NamedAdapterFactory<K, any> | undefined;
217
+ /**
218
+ * Check whether an adapter is registered for the given key.
219
+ */
220
+ declare function hasAdapter(key: AdapterKey): boolean;
221
+
222
+ declare const createAxiosAdapter: NamedAdapterFactory<"axios">;
223
+ declare module "@/schema/adapter" {
224
+ interface Adapters {
225
+ axios: {
226
+ /**
227
+ * What adapter.send() resolves with for Axios.
228
+ */
229
+ ok: AxiosResponse<unknown>;
230
+ /**
231
+ * What callbacks.onError receives for Axios.
232
+ *
233
+ * We pass the *payload* (e.g. response.data), not the raw AxiosError,
234
+ * so Form Palette's autoErr branch can see `.errors`.
235
+ */
236
+ err: unknown;
237
+ };
238
+ }
239
+ }
240
+
241
+ declare const createInertiaAdapter: NamedAdapterFactory<"inertia">;
242
+ declare module "@/schema/adapter" {
243
+ interface Adapters {
244
+ inertia: {
245
+ /**
246
+ * What adapter.send() resolves with for Inertia.
247
+ * This is the Page object passed to onSuccess.
248
+ */
249
+ ok: Page<any>;
250
+ /**
251
+ * What callbacks.onError receives for Inertia.
252
+ *
253
+ * We shape this as `{ errors: ErrorBag }` so Form Palette's
254
+ * autoErr branch can see `.errors`.
255
+ */
256
+ err: {
257
+ errors: Record<string, string | string[]>;
258
+ } | unknown;
259
+ };
260
+ }
261
+ }
262
+
263
+ /**
264
+ * Register the Axios adapter under the "axios" key.
265
+ *
266
+ * This performs a basic runtime check to make sure Axios is present.
267
+ * If Axios isn't available or doesn't look like a proper Axios instance,
268
+ * an error is thrown.
269
+ */
270
+ declare function registerAxiosAdapter(): void;
271
+ /**
272
+ * Register the Inertia adapter under the "inertia" key.
273
+ *
274
+ * This explicitly tests that '@inertiajs/react' can be imported and that
275
+ * it exposes a router with a .visit() method. If not, an error is thrown.
276
+ *
277
+ * Note:
278
+ * - This function is async because it uses dynamic import.
279
+ * - Call it at bootstrap time and await it:
280
+ *
281
+ * await registerInertiaAdapter();
282
+ */
283
+ declare function registerInertiaAdapter(): Promise<void>;
284
+ /**
285
+ * Optional helper: convenience registration for known adapter keys.
286
+ *
287
+ * This is purely ergonomic; you can also call registerAxiosAdapter /
288
+ * registerInertiaAdapter directly.
289
+ */
290
+ declare function registerKnownAdapter(key: AdapterKey): Promise<void>;
291
+
292
+ export { type AdapterCallbacks, type AdapterConfig, type AdapterError, type AdapterFactory, type AdapterKey, type AdapterOk, type AdapterResult, type AdapterSubmit, type Adapters, type Method, type NamedAdapterConfig, type NamedAdapterFactory, createAxiosAdapter, createInertiaAdapter, getAdapter, hasAdapter, localAdapter, registerAdapter, registerAxiosAdapter, registerInertiaAdapter, registerKnownAdapter };
@@ -0,0 +1,292 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { Page } from './../../../../node_modules/@inertiajs/core/types/types.d';
3
+
4
+ /**
5
+ * HTTP methods supported by the core adapter layer.
6
+ *
7
+ * This matches the legacy Method union from the old types.ts.
8
+ */
9
+ type Method = 'post' | 'get' | 'delete' | 'put' | 'patch';
10
+ /**
11
+ * Lifecycle callbacks used by adapters to report events back to the core.
12
+ *
13
+ * @template Ok Type of the "successful" response payload (e.g. AxiosResponse).
14
+ * @template Err Type of the "error" payload (e.g. AxiosError, unknown).
15
+ */
16
+ interface AdapterCallbacks<Ok = unknown, Err = unknown> {
17
+ /**
18
+ * Called when the underlying request completes successfully.
19
+ * The adapter decides what "success" means (HTTP 2xx, no exception, etc.).
20
+ */
21
+ onSuccess?(response: Ok): void;
22
+ /**
23
+ * Called when the underlying request fails.
24
+ * Adapters should pass the most informative error shape they have.
25
+ */
26
+ onError?(error: Err): void;
27
+ /**
28
+ * Called at the end of the adapter lifecycle, whether success or error.
29
+ * Useful for clearing loading states, unlocking buttons, etc.
30
+ */
31
+ onFinish?(): void;
32
+ }
33
+ /**
34
+ * Result interface returned by an adapter.
35
+ *
36
+ * Generic evolution of the legacy AdapterResult:
37
+ *
38
+ * type AdapterResult = {
39
+ * submit(options?: unknown): void;
40
+ * send<T = unknown>(): Promise<AxiosResponse<T>>;
41
+ * run(options?: unknown): void;
42
+ * };
43
+ *
44
+ * Differences:
45
+ * - The success payload is generic (Ok) instead of hard-coded to AxiosResponse.
46
+ * - send() always returns Promise<Ok>.
47
+ * - run() may return either void or Promise<Ok>, depending on adapter.
48
+ *
49
+ * @template Ok Type of the "successful" response payload.
50
+ */
51
+ interface AdapterResult<Ok = unknown> {
52
+ /**
53
+ * Fire-and-forget trigger.
54
+ *
55
+ * Intended for flows where the caller does not care about the response
56
+ * object itself (e.g. SPA navigation).
57
+ *
58
+ * @param options Optional adapter-specific options.
59
+ */
60
+ submit(options?: unknown): void;
61
+ /**
62
+ * Promise-based trigger.
63
+ *
64
+ * Intended for flows where the caller wants to await the response object.
65
+ * Adapters should reject the promise when an error occurs.
66
+ *
67
+ * @param options Optional adapter-specific options.
68
+ */
69
+ send(options?: unknown): Promise<Ok>;
70
+ /**
71
+ * Convenience trigger.
72
+ *
73
+ * Adapters are free to implement this as:
74
+ * - submit(options) (returning void), or
75
+ * - send(options) (returning Promise<Ok>).
76
+ *
77
+ * Callers that need strict typing can prefer send();
78
+ * callers that just need "do the thing" can use run().
79
+ *
80
+ * @param options Optional adapter-specific options.
81
+ */
82
+ run(options?: unknown): void | Promise<Ok>;
83
+ }
84
+ /**
85
+ * Configuration passed from the core runtime to a concrete adapter factory.
86
+ *
87
+ * @template Body Type of the outbound payload (form values + extra data).
88
+ * @template Ok Type of the "successful" response payload.
89
+ * @template Err Type of the "error" payload.
90
+ */
91
+ interface AdapterConfig<Body = unknown, Ok = unknown, Err = unknown> {
92
+ /**
93
+ * HTTP method / intent used by the adapter.
94
+ */
95
+ method: Method;
96
+ /**
97
+ * Fully-resolved URL or route string.
98
+ *
99
+ * The core is responsible for resolving named routes, base URLs, etc.,
100
+ * before handing control to the adapter.
101
+ */
102
+ url: string;
103
+ /**
104
+ * Request body payload built by the core.
105
+ *
106
+ * Typically something like:
107
+ *
108
+ * { ...formValues, ...extra }
109
+ */
110
+ data: Body;
111
+ /**
112
+ * Lifecycle callbacks provided by the core.
113
+ *
114
+ * The adapter should invoke these at the appropriate times; it must not
115
+ * swallow errors without calling onError (when provided).
116
+ */
117
+ callbacks?: AdapterCallbacks<Ok, Err>;
118
+ }
119
+ /**
120
+ * Factory function type for creating an adapter instance.
121
+ *
122
+ * Concrete implementations (Axios, Inertia, fetch, custom) can conform
123
+ * to this signature. The core runtime only knows about this type and does
124
+ * not depend on any adapter-specific details.
125
+ *
126
+ * @template Body Type of the outbound payload (form values + extra data).
127
+ * @template Ok Type of the "successful" response payload.
128
+ * @template Err Type of the "error" payload.
129
+ */
130
+ type AdapterFactory<Body = unknown, Ok = unknown, Err = unknown> = (config: AdapterConfig<Body, Ok, Err>) => AdapterResult<Ok>;
131
+ /**
132
+ * Registry of adapter flavours.
133
+ *
134
+ * The library hard-codes a single built-in adapter flavour:
135
+ *
136
+ * - 'local' → host-handled, no transport semantics.
137
+ * .send() resolves to `{ data: Body }`.
138
+ *
139
+ * Hosts can extend this interface via module augmentation to add
140
+ * their own adapter flavours (e.g. 'axios', 'inertia', ...).
141
+ */
142
+ interface Adapters {
143
+ local: {
144
+ /**
145
+ * Type of the value produced by adapter.send() for this adapter flavour.
146
+ */
147
+ ok: {
148
+ data: unknown;
149
+ };
150
+ /**
151
+ * Type of the error value passed into callbacks.onError for this adapter.
152
+ */
153
+ err: unknown;
154
+ };
155
+ }
156
+ /**
157
+ * Union of all adapter keys known to the core.
158
+ *
159
+ * Hosts can extend this union by augmenting the Adapters interface.
160
+ */
161
+ type AdapterKey = keyof Adapters;
162
+ /**
163
+ * Helper: given an adapter key K, get its "ok" payload type.
164
+ */
165
+ type AdapterOk<K extends AdapterKey> = Adapters[K]['ok'];
166
+ /**
167
+ * Helper: given an adapter key K, get its "error" payload type.
168
+ */
169
+ type AdapterError<K extends AdapterKey> = Adapters[K]['err'];
170
+ /**
171
+ * Helper: what CoreProps.onSubmitted receives for adapter K.
172
+ *
173
+ * For now, this is the same as AdapterOk<K>. If a host wants a different
174
+ * shape, they can wrap/transform in their own components.
175
+ */
176
+ type AdapterSubmit<K extends AdapterKey> = AdapterOk<K>;
177
+ /**
178
+ * AdapterConfig specialised for a named adapter key K, using the
179
+ * registry's ok/err types for that key.
180
+ *
181
+ * @template K Adapter key.
182
+ * @template Body Outbound payload type.
183
+ */
184
+ type NamedAdapterConfig<K extends AdapterKey, Body = unknown> = AdapterConfig<Body, AdapterOk<K>, AdapterError<K>>;
185
+ /**
186
+ * AdapterFactory specialised for a named adapter key K.
187
+ *
188
+ * @template K Adapter key.
189
+ * @template Body Outbound payload type.
190
+ */
191
+ type NamedAdapterFactory<K extends AdapterKey, Body = unknown> = (config: NamedAdapterConfig<K, Body>) => AdapterResult<AdapterOk<K>>;
192
+
193
+ /**
194
+ * Built-in 'local' adapter.
195
+ *
196
+ * Semantics:
197
+ * - send(options?) resolves to `{ data: Body }`
198
+ * - submit/run do nothing by default (no side effects)
199
+ *
200
+ * The core will typically call onSubmitted with the result of send().
201
+ */
202
+ declare const localAdapter: NamedAdapterFactory<"local", any>;
203
+ /**
204
+ * Register or override an adapter factory for a given key.
205
+ *
206
+ * Hosts can call this at bootstrap time, e.g.:
207
+ *
208
+ * registerAdapter<'axios'>('axios', axiosAdapter);
209
+ */
210
+ declare function registerAdapter<K extends AdapterKey, Body = any>(key: K, factory: NamedAdapterFactory<K, Body>): void;
211
+ /**
212
+ * Lookup an adapter factory by key.
213
+ *
214
+ * If no adapter is found for the given key, this returns undefined.
215
+ */
216
+ declare function getAdapter<K extends AdapterKey>(key: K): NamedAdapterFactory<K, any> | undefined;
217
+ /**
218
+ * Check whether an adapter is registered for the given key.
219
+ */
220
+ declare function hasAdapter(key: AdapterKey): boolean;
221
+
222
+ declare const createAxiosAdapter: NamedAdapterFactory<"axios">;
223
+ declare module "@/schema/adapter" {
224
+ interface Adapters {
225
+ axios: {
226
+ /**
227
+ * What adapter.send() resolves with for Axios.
228
+ */
229
+ ok: AxiosResponse<unknown>;
230
+ /**
231
+ * What callbacks.onError receives for Axios.
232
+ *
233
+ * We pass the *payload* (e.g. response.data), not the raw AxiosError,
234
+ * so Form Palette's autoErr branch can see `.errors`.
235
+ */
236
+ err: unknown;
237
+ };
238
+ }
239
+ }
240
+
241
+ declare const createInertiaAdapter: NamedAdapterFactory<"inertia">;
242
+ declare module "@/schema/adapter" {
243
+ interface Adapters {
244
+ inertia: {
245
+ /**
246
+ * What adapter.send() resolves with for Inertia.
247
+ * This is the Page object passed to onSuccess.
248
+ */
249
+ ok: Page<any>;
250
+ /**
251
+ * What callbacks.onError receives for Inertia.
252
+ *
253
+ * We shape this as `{ errors: ErrorBag }` so Form Palette's
254
+ * autoErr branch can see `.errors`.
255
+ */
256
+ err: {
257
+ errors: Record<string, string | string[]>;
258
+ } | unknown;
259
+ };
260
+ }
261
+ }
262
+
263
+ /**
264
+ * Register the Axios adapter under the "axios" key.
265
+ *
266
+ * This performs a basic runtime check to make sure Axios is present.
267
+ * If Axios isn't available or doesn't look like a proper Axios instance,
268
+ * an error is thrown.
269
+ */
270
+ declare function registerAxiosAdapter(): void;
271
+ /**
272
+ * Register the Inertia adapter under the "inertia" key.
273
+ *
274
+ * This explicitly tests that '@inertiajs/react' can be imported and that
275
+ * it exposes a router with a .visit() method. If not, an error is thrown.
276
+ *
277
+ * Note:
278
+ * - This function is async because it uses dynamic import.
279
+ * - Call it at bootstrap time and await it:
280
+ *
281
+ * await registerInertiaAdapter();
282
+ */
283
+ declare function registerInertiaAdapter(): Promise<void>;
284
+ /**
285
+ * Optional helper: convenience registration for known adapter keys.
286
+ *
287
+ * This is purely ergonomic; you can also call registerAxiosAdapter /
288
+ * registerInertiaAdapter directly.
289
+ */
290
+ declare function registerKnownAdapter(key: AdapterKey): Promise<void>;
291
+
292
+ export { type AdapterCallbacks, type AdapterConfig, type AdapterError, type AdapterFactory, type AdapterKey, type AdapterOk, type AdapterResult, type AdapterSubmit, type Adapters, type Method, type NamedAdapterConfig, type NamedAdapterFactory, createAxiosAdapter, createInertiaAdapter, getAdapter, hasAdapter, localAdapter, registerAdapter, registerAxiosAdapter, registerInertiaAdapter, registerKnownAdapter };