@movk/nuxt 1.2.0 → 1.3.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 (293) hide show
  1. package/.nuxt/movk-ui.css +3 -0
  2. package/README.md +74 -79
  3. package/dist/module.d.mts +57 -1
  4. package/dist/module.json +2 -2
  5. package/dist/module.mjs +120 -126
  6. package/dist/runtime/components/AutoForm.d.vue.ts +10 -30
  7. package/dist/runtime/components/AutoForm.vue +114 -125
  8. package/dist/runtime/components/AutoForm.vue.d.ts +10 -30
  9. package/dist/runtime/components/ColorChooser.d.vue.ts +21 -22
  10. package/dist/runtime/components/ColorChooser.vue +304 -27
  11. package/dist/runtime/components/ColorChooser.vue.d.ts +21 -22
  12. package/dist/runtime/components/DataTable.d.vue.ts +57 -0
  13. package/dist/runtime/components/DataTable.vue +584 -0
  14. package/dist/runtime/components/DataTable.vue.d.ts +57 -0
  15. package/dist/runtime/components/DatePicker.d.vue.ts +20 -33
  16. package/dist/runtime/components/DatePicker.vue +173 -65
  17. package/dist/runtime/components/DatePicker.vue.d.ts +20 -33
  18. package/dist/runtime/components/MessageBox.d.vue.ts +36 -0
  19. package/dist/runtime/components/MessageBox.vue +113 -0
  20. package/dist/runtime/components/MessageBox.vue.d.ts +36 -0
  21. package/dist/runtime/components/PillGroup.d.vue.ts +33 -0
  22. package/dist/runtime/components/PillGroup.vue +291 -0
  23. package/dist/runtime/components/PillGroup.vue.d.ts +33 -0
  24. package/dist/runtime/components/Popconfirm.d.vue.ts +30 -0
  25. package/dist/runtime/components/Popconfirm.vue +143 -0
  26. package/dist/runtime/components/Popconfirm.vue.d.ts +30 -0
  27. package/dist/runtime/components/SearchForm.d.vue.ts +21 -149
  28. package/dist/runtime/components/SearchForm.vue +211 -153
  29. package/dist/runtime/components/SearchForm.vue.d.ts +21 -149
  30. package/dist/runtime/components/SlideVerify.d.vue.ts +31 -70
  31. package/dist/runtime/components/SlideVerify.vue +117 -90
  32. package/dist/runtime/components/SlideVerify.vue.d.ts +31 -70
  33. package/dist/runtime/components/StarRating.d.vue.ts +38 -87
  34. package/dist/runtime/components/StarRating.vue +118 -74
  35. package/dist/runtime/components/StarRating.vue.d.ts +38 -87
  36. package/dist/runtime/components/input/AsPhoneNumberInput.d.vue.ts +11 -15
  37. package/dist/runtime/components/input/AsPhoneNumberInput.vue +22 -9
  38. package/dist/runtime/components/input/AsPhoneNumberInput.vue.d.ts +11 -15
  39. package/dist/runtime/components/input/WithCharacterLimit.d.vue.ts +11 -13
  40. package/dist/runtime/components/input/WithCharacterLimit.vue +23 -11
  41. package/dist/runtime/components/input/WithCharacterLimit.vue.d.ts +11 -13
  42. package/dist/runtime/components/input/WithClear.d.vue.ts +13 -11
  43. package/dist/runtime/components/input/WithClear.vue +27 -8
  44. package/dist/runtime/components/input/WithClear.vue.d.ts +13 -11
  45. package/dist/runtime/components/input/WithCopy.d.vue.ts +13 -13
  46. package/dist/runtime/components/input/WithCopy.vue +25 -8
  47. package/dist/runtime/components/input/WithCopy.vue.d.ts +13 -13
  48. package/dist/runtime/components/input/WithFloatingLabel.d.vue.ts +13 -16
  49. package/dist/runtime/components/input/WithFloatingLabel.vue +35 -27
  50. package/dist/runtime/components/input/WithFloatingLabel.vue.d.ts +13 -16
  51. package/dist/runtime/components/input/WithPasswordToggle.d.vue.ts +11 -7
  52. package/dist/runtime/components/input/WithPasswordToggle.vue +24 -7
  53. package/dist/runtime/components/input/WithPasswordToggle.vue.d.ts +11 -7
  54. package/dist/runtime/components/theme-picker/ThemePicker.d.vue.ts +8 -1
  55. package/dist/runtime/components/theme-picker/ThemePicker.vue +27 -12
  56. package/dist/runtime/components/theme-picker/ThemePicker.vue.d.ts +8 -1
  57. package/dist/runtime/components/theme-picker/ThemePickerButton.d.vue.ts +9 -4
  58. package/dist/runtime/components/theme-picker/ThemePickerButton.vue +4 -0
  59. package/dist/runtime/components/theme-picker/ThemePickerButton.vue.d.ts +9 -4
  60. package/dist/runtime/composables/index.d.ts +9 -8
  61. package/dist/runtime/composables/index.js +1 -0
  62. package/dist/runtime/composables/useApiFetch.d.ts +10 -5
  63. package/dist/runtime/composables/useApiFetch.js +20 -2
  64. package/dist/runtime/composables/useAutoForm.d.ts +4 -4
  65. package/dist/runtime/composables/useAutoForm.js +23 -9
  66. package/dist/runtime/composables/useClientApiFetch.d.ts +3 -2
  67. package/dist/runtime/composables/useDateFormatter.d.ts +16 -3
  68. package/dist/runtime/composables/useDateFormatter.js +89 -30
  69. package/dist/runtime/composables/useDownloadWithProgress.d.ts +26 -27
  70. package/dist/runtime/composables/useDownloadWithProgress.js +142 -40
  71. package/dist/runtime/composables/useLazyApiFetch.d.ts +3 -2
  72. package/dist/runtime/composables/useMessageBox.d.ts +6 -0
  73. package/dist/runtime/composables/useMessageBox.js +16 -0
  74. package/dist/runtime/composables/useTheme.d.ts +26 -16
  75. package/dist/runtime/composables/useTheme.js +98 -71
  76. package/dist/runtime/composables/useUploadWithProgress.d.ts +23 -29
  77. package/dist/runtime/composables/useUploadWithProgress.js +78 -67
  78. package/dist/runtime/domains/api/auth.d.ts +2 -0
  79. package/dist/runtime/domains/api/auth.js +31 -0
  80. package/dist/runtime/domains/api/endpoint-config.d.ts +11 -0
  81. package/dist/runtime/domains/api/endpoint-config.js +17 -0
  82. package/dist/runtime/domains/api/errors.d.ts +2 -0
  83. package/dist/runtime/domains/api/errors.js +10 -0
  84. package/dist/runtime/domains/api/fetch-key.d.ts +20 -0
  85. package/dist/runtime/domains/api/fetch-key.js +23 -0
  86. package/dist/runtime/domains/api/interceptors/error.d.ts +13 -0
  87. package/dist/runtime/domains/api/interceptors/error.js +49 -0
  88. package/dist/runtime/domains/api/interceptors/request.d.ts +12 -0
  89. package/dist/runtime/domains/api/interceptors/request.js +46 -0
  90. package/dist/runtime/domains/api/interceptors/response.d.ts +17 -0
  91. package/dist/runtime/domains/api/interceptors/response.js +27 -0
  92. package/dist/runtime/domains/api/response.d.ts +4 -0
  93. package/dist/runtime/domains/api/response.js +14 -0
  94. package/dist/runtime/domains/api/toast.d.ts +15 -0
  95. package/dist/runtime/domains/api/toast.js +46 -0
  96. package/dist/runtime/domains/api/transfer.d.ts +69 -0
  97. package/dist/runtime/domains/api/transfer.js +81 -0
  98. package/dist/runtime/domains/auto-form/actions.d.ts +2 -0
  99. package/dist/runtime/domains/auto-form/actions.js +4 -0
  100. package/dist/runtime/domains/auto-form/components/Array.d.vue.ts +13 -0
  101. package/dist/runtime/{components/auto-form-renderer/AutoFormRendererArray.vue → domains/auto-form/components/Array.vue} +25 -29
  102. package/dist/runtime/domains/auto-form/components/Array.vue.d.ts +13 -0
  103. package/dist/runtime/domains/auto-form/components/Children.d.vue.ts +11 -0
  104. package/dist/runtime/{components/auto-form-renderer/AutoFormRendererChildren.vue → domains/auto-form/components/Children.vue} +18 -18
  105. package/dist/runtime/domains/auto-form/components/Children.vue.d.ts +11 -0
  106. package/dist/runtime/domains/auto-form/components/Field.d.vue.ts +11 -0
  107. package/dist/runtime/domains/auto-form/components/Field.vue +56 -0
  108. package/dist/runtime/domains/auto-form/components/Field.vue.d.ts +11 -0
  109. package/dist/runtime/domains/auto-form/components/Layout.d.vue.ts +11 -0
  110. package/dist/runtime/{components/auto-form-renderer/AutoFormRendererLayout.vue → domains/auto-form/components/Layout.vue} +24 -25
  111. package/dist/runtime/domains/auto-form/components/Layout.vue.d.ts +11 -0
  112. package/dist/runtime/domains/auto-form/components/Nested.d.vue.ts +11 -0
  113. package/dist/runtime/{components/auto-form-renderer/AutoFormRendererNested.vue → domains/auto-form/components/Nested.vue} +17 -21
  114. package/dist/runtime/domains/auto-form/components/Nested.vue.d.ts +11 -0
  115. package/dist/runtime/domains/auto-form/controls.d.ts +41 -0
  116. package/dist/runtime/{auto-form → domains/auto-form}/controls.js +27 -24
  117. package/dist/runtime/{auto-form/field-utils.d.ts → domains/auto-form/fields.d.ts} +3 -1
  118. package/dist/runtime/{auto-form/field-utils.js → domains/auto-form/fields.js} +18 -2
  119. package/dist/runtime/{auto-form → domains/auto-form}/metadata.js +1 -1
  120. package/dist/runtime/domains/auto-form/provider.d.ts +62 -0
  121. package/dist/runtime/{auto-form → domains/auto-form}/provider.js +6 -3
  122. package/dist/runtime/{auto-form/reactive-utils.d.ts → domains/auto-form/reactive.d.ts} +5 -5
  123. package/dist/runtime/{auto-form/reactive-utils.js → domains/auto-form/reactive.js} +1 -1
  124. package/dist/runtime/{auto-form/schema-introspector.d.ts → domains/auto-form/schema.d.ts} +2 -2
  125. package/dist/runtime/{auto-form/schema-introspector.js → domains/auto-form/schema.js} +1 -1
  126. package/dist/runtime/domains/data-table/columns/constants.d.ts +50 -0
  127. package/dist/runtime/domains/data-table/columns/constants.js +19 -0
  128. package/dist/runtime/domains/data-table/columns/resolve-columns.d.ts +4 -0
  129. package/dist/runtime/domains/data-table/columns/resolve-columns.js +59 -0
  130. package/dist/runtime/domains/data-table/columns/resolve-data-column.d.ts +9 -0
  131. package/dist/runtime/domains/data-table/columns/resolve-data-column.js +164 -0
  132. package/dist/runtime/domains/data-table/columns/resolve-group-column.d.ts +4 -0
  133. package/dist/runtime/domains/data-table/columns/resolve-group-column.js +19 -0
  134. package/dist/runtime/domains/data-table/columns/resolve-special-columns.d.ts +8 -0
  135. package/dist/runtime/domains/data-table/columns/resolve-special-columns.js +232 -0
  136. package/dist/runtime/domains/data-table/columns/style.d.ts +11 -0
  137. package/dist/runtime/domains/data-table/columns/style.js +67 -0
  138. package/dist/runtime/domains/data-table/columns/utils.d.ts +6 -0
  139. package/dist/runtime/domains/data-table/columns/utils.js +16 -0
  140. package/dist/runtime/domains/data-table/components/ActionConfirm.d.vue.ts +10 -0
  141. package/dist/runtime/domains/data-table/components/ActionConfirm.vue +39 -0
  142. package/dist/runtime/domains/data-table/components/ActionConfirm.vue.d.ts +10 -0
  143. package/dist/runtime/domains/data-table/components/ActionsCell.d.vue.ts +11 -0
  144. package/dist/runtime/domains/data-table/components/ActionsCell.vue +91 -0
  145. package/dist/runtime/domains/data-table/components/ActionsCell.vue.d.ts +11 -0
  146. package/dist/runtime/domains/data-table/components/CellTooltip.d.vue.ts +9 -0
  147. package/dist/runtime/domains/data-table/components/CellTooltip.vue +40 -0
  148. package/dist/runtime/domains/data-table/components/CellTooltip.vue.d.ts +9 -0
  149. package/dist/runtime/domains/data-table/components/Pagination.d.vue.ts +26 -0
  150. package/dist/runtime/domains/data-table/components/Pagination.vue +132 -0
  151. package/dist/runtime/domains/data-table/components/Pagination.vue.d.ts +26 -0
  152. package/dist/runtime/domains/data-table/indent.d.ts +8 -0
  153. package/dist/runtime/domains/data-table/indent.js +19 -0
  154. package/dist/runtime/domains/data-table/tree-selection.d.ts +9 -0
  155. package/dist/runtime/domains/data-table/tree-selection.js +76 -0
  156. package/dist/runtime/{utils/theme.d.ts → domains/theme/theme-icons.d.ts} +0 -1
  157. package/dist/runtime/index.css +1 -0
  158. package/dist/runtime/plugins/api.factory.js +17 -117
  159. package/dist/runtime/plugins/theme.js +49 -27
  160. package/dist/runtime/types/api/config.d.ts +127 -0
  161. package/dist/runtime/types/api/fetch.d.ts +50 -0
  162. package/dist/runtime/types/api/index.d.ts +5 -0
  163. package/dist/runtime/types/api/module.d.ts +94 -0
  164. package/dist/runtime/types/api/response.d.ts +62 -0
  165. package/dist/runtime/types/api/response.js +0 -0
  166. package/dist/runtime/types/api/transfer.d.ts +32 -0
  167. package/dist/runtime/types/api/transfer.js +0 -0
  168. package/dist/runtime/types/app.config.d.ts +6 -0
  169. package/dist/runtime/types/auto-form/base.d.ts +26 -0
  170. package/dist/runtime/types/auto-form/base.js +0 -0
  171. package/dist/runtime/types/auto-form/component.d.ts +28 -0
  172. package/dist/runtime/types/auto-form/component.js +0 -0
  173. package/dist/runtime/types/auto-form/controls.d.ts +45 -0
  174. package/dist/runtime/types/auto-form/controls.js +0 -0
  175. package/dist/runtime/types/auto-form/fields.d.ts +68 -0
  176. package/dist/runtime/types/auto-form/fields.js +0 -0
  177. package/dist/runtime/types/auto-form/index.d.ts +7 -0
  178. package/dist/runtime/types/auto-form/index.js +0 -0
  179. package/dist/runtime/types/auto-form/search-form.d.ts +84 -0
  180. package/dist/runtime/types/auto-form/search-form.js +0 -0
  181. package/dist/runtime/types/auto-form/slots.d.ts +85 -0
  182. package/dist/runtime/types/auto-form/slots.js +0 -0
  183. package/dist/runtime/types/auto-form/zod-factory.d.ts +127 -0
  184. package/dist/runtime/types/auto-form/zod-factory.js +0 -0
  185. package/dist/runtime/types/components/color-chooser.d.ts +109 -0
  186. package/dist/runtime/types/components/color-chooser.js +0 -0
  187. package/dist/runtime/types/components/date-picker.d.ts +41 -0
  188. package/dist/runtime/types/components/date-picker.js +0 -0
  189. package/dist/runtime/types/components/index.d.ts +8 -0
  190. package/dist/runtime/types/components/index.js +0 -0
  191. package/dist/runtime/types/components/input/as-phone-number-input.d.ts +17 -0
  192. package/dist/runtime/types/components/input/as-phone-number-input.js +0 -0
  193. package/dist/runtime/types/components/input/index.d.ts +6 -0
  194. package/dist/runtime/types/components/input/index.js +0 -0
  195. package/dist/runtime/types/components/input/with-character-limit.d.ts +11 -0
  196. package/dist/runtime/types/components/input/with-character-limit.js +0 -0
  197. package/dist/runtime/types/components/input/with-clear.d.ts +10 -0
  198. package/dist/runtime/types/components/input/with-clear.js +0 -0
  199. package/dist/runtime/types/components/input/with-copy.d.ts +11 -0
  200. package/dist/runtime/types/components/input/with-copy.js +0 -0
  201. package/dist/runtime/types/components/input/with-floating-label.d.ts +12 -0
  202. package/dist/runtime/types/components/input/with-floating-label.js +0 -0
  203. package/dist/runtime/types/components/input/with-password-toggle.d.ts +7 -0
  204. package/dist/runtime/types/components/input/with-password-toggle.js +0 -0
  205. package/dist/runtime/types/components/message-box.d.ts +69 -0
  206. package/dist/runtime/types/components/message-box.js +0 -0
  207. package/dist/runtime/types/components/pill-group.d.ts +103 -0
  208. package/dist/runtime/types/components/pill-group.js +0 -0
  209. package/dist/runtime/types/components/popconfirm.d.ts +74 -0
  210. package/dist/runtime/types/components/popconfirm.js +0 -0
  211. package/dist/runtime/types/components/slide-verify.d.ts +54 -0
  212. package/dist/runtime/types/components/slide-verify.js +0 -0
  213. package/dist/runtime/types/components/star-rating.d.ts +55 -0
  214. package/dist/runtime/types/components/star-rating.js +0 -0
  215. package/dist/runtime/types/data-table/columns.d.ts +236 -0
  216. package/dist/runtime/types/data-table/columns.js +6 -0
  217. package/dist/runtime/types/data-table/component.d.ts +190 -0
  218. package/dist/runtime/types/data-table/component.js +0 -0
  219. package/dist/runtime/types/data-table/contexts.d.ts +44 -0
  220. package/dist/runtime/types/data-table/contexts.js +0 -0
  221. package/dist/runtime/types/data-table/index.d.ts +6 -0
  222. package/dist/runtime/types/data-table/index.js +1 -0
  223. package/dist/runtime/types/data-table/pagination.d.ts +87 -0
  224. package/dist/runtime/types/data-table/pagination.js +0 -0
  225. package/dist/runtime/types/index.d.ts +6 -5
  226. package/dist/runtime/types/index.js +5 -5
  227. package/dist/runtime/types/shared.d.ts +5 -0
  228. package/dist/runtime/types/shared.js +0 -0
  229. package/dist/runtime/types/zod.d.ts +11 -10
  230. package/dist/runtime/utils/extend-theme.d.ts +19 -0
  231. package/dist/runtime/utils/extend-theme.js +44 -0
  232. package/dist/runtime/utils/form-control.d.ts +33 -0
  233. package/dist/runtime/utils/form-control.js +54 -0
  234. package/dist/runtime/utils/meta.d.ts +2 -5
  235. package/dist/runtime/utils/meta.js +1 -3
  236. package/dist/runtime/utils/theme-defaults.d.ts +27 -0
  237. package/dist/runtime/utils/theme-defaults.js +28 -0
  238. package/dist/runtime/utils/tv.d.ts +1 -0
  239. package/dist/runtime/utils/tv.js +4 -0
  240. package/dist/runtime/vue/composables/useSiteConfig.d.ts +13 -0
  241. package/dist/runtime/vue/composables/useSiteConfig.js +11 -0
  242. package/dist/runtime/vue/plugins/theme.d.ts +6 -0
  243. package/dist/runtime/vue/plugins/theme.js +14 -0
  244. package/dist/runtime/vue/stubs/base.d.ts +2 -0
  245. package/dist/runtime/vue/stubs/base.js +2 -0
  246. package/dist/runtime/vue/stubs/inertia.d.ts +2 -0
  247. package/dist/runtime/vue/stubs/inertia.js +2 -0
  248. package/dist/runtime/vue/stubs/movk-extra.d.ts +2 -0
  249. package/dist/runtime/vue/stubs/movk-extra.js +2 -0
  250. package/dist/runtime/vue/stubs/none.d.ts +2 -0
  251. package/dist/runtime/vue/stubs/none.js +2 -0
  252. package/dist/runtime/vue/stubs/vue-router.d.ts +2 -0
  253. package/dist/runtime/vue/stubs/vue-router.js +2 -0
  254. package/dist/shared/nuxt.DfBEyjld.mjs +667 -0
  255. package/dist/types.d.mts +2 -6
  256. package/dist/unplugin.d.mts +28 -0
  257. package/dist/unplugin.mjs +292 -0
  258. package/dist/vite.d.mts +12 -0
  259. package/dist/vite.mjs +20 -0
  260. package/package.json +75 -36
  261. package/vue-plugin.d.ts +5 -0
  262. package/dist/runtime/auto-form/controls.d.ts +0 -221
  263. package/dist/runtime/auto-form/provider.d.ts +0 -27
  264. package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.d.vue.ts +0 -28
  265. package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.vue.d.ts +0 -28
  266. package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.d.vue.ts +0 -26
  267. package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.vue.d.ts +0 -26
  268. package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.d.vue.ts +0 -26
  269. package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.vue +0 -55
  270. package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.vue.d.ts +0 -26
  271. package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.d.vue.ts +0 -26
  272. package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.vue.d.ts +0 -26
  273. package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.d.vue.ts +0 -26
  274. package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.vue.d.ts +0 -26
  275. package/dist/runtime/constants/api-defaults.d.ts +0 -9
  276. package/dist/runtime/constants/api-defaults.js +0 -32
  277. package/dist/runtime/constants/grid-cols.d.ts +0 -7
  278. package/dist/runtime/constants/grid-cols.js +0 -44
  279. package/dist/runtime/style.css +0 -1
  280. package/dist/runtime/types/api.d.ts +0 -349
  281. package/dist/runtime/types/auto-form.d.ts +0 -259
  282. package/dist/runtime/types/module.d.ts +0 -96
  283. package/dist/runtime/types/theme.d.ts +0 -2
  284. package/dist/runtime/utils/api-utils.d.ts +0 -58
  285. package/dist/runtime/utils/api-utils.js +0 -98
  286. /package/dist/runtime/{constants/auto-form.d.ts → domains/auto-form/constants.d.ts} +0 -0
  287. /package/dist/runtime/{constants/auto-form.js → domains/auto-form/constants.js} +0 -0
  288. /package/dist/runtime/{auto-form → domains/auto-form}/metadata.d.ts +0 -0
  289. /package/dist/runtime/{utils/theme.js → domains/theme/theme-icons.js} +0 -0
  290. /package/dist/runtime/types/{api.js → api/config.js} +0 -0
  291. /package/dist/runtime/types/{auto-form.js → api/fetch.js} +0 -0
  292. /package/dist/runtime/types/{module.js → api/index.js} +0 -0
  293. /package/dist/runtime/types/{theme.js → api/module.js} +0 -0
@@ -1,221 +0,0 @@
1
- import type { IsComponent } from '@movk/core';
2
- import type { AutoFormControl, _Unset } from '../types/auto-form.js';
3
- import type { InputProps, InputSlots, TextareaProps, TextareaSlots } from '@nuxt/ui';
4
- import { UInput, UTextarea } from '#components';
5
- /** 声明单个控件配置,恒等函数,仅用于保留精确的组件 props/slots 类型推断 */
6
- export declare function defineControl<C extends IsComponent, P = _Unset, S = _Unset>(e: AutoFormControl<C, P, S>): AutoFormControl<C, P, S>;
7
- declare const DEFAULT_CONTROL_COMPONENTS: {
8
- readonly string: any;
9
- readonly number: any;
10
- readonly boolean: any;
11
- readonly enum: any;
12
- readonly file: any;
13
- readonly calendarDate: <R extends boolean, M extends boolean, P extends "click" | "hover" = "click">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
14
- slots: {
15
- default?: (props: any) => any;
16
- } & {
17
- leading?: (props: any) => any;
18
- } & {
19
- trailing?: (props: any) => any;
20
- } & {
21
- anchor?: (props: any) => any;
22
- } & {
23
- day?: (props: any) => any;
24
- } & {
25
- heading?: (props: any) => any;
26
- } & {
27
- 'week-day'?: (props: any) => any;
28
- };
29
- attrs: any;
30
- emit: any;
31
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
32
- props: any;
33
- expose: (exposed: {}) => void;
34
- attrs: any;
35
- slots: {
36
- default?: (props: any) => any;
37
- } & {
38
- leading?: (props: any) => any;
39
- } & {
40
- trailing?: (props: any) => any;
41
- } & {
42
- anchor?: (props: any) => any;
43
- } & {
44
- day?: (props: any) => any;
45
- } & {
46
- heading?: (props: any) => any;
47
- } & {
48
- 'week-day'?: (props: any) => any;
49
- };
50
- emit: any;
51
- }>) => import("vue").VNode & {
52
- __ctx?: Awaited<typeof __VLS_setup>;
53
- };
54
- readonly datePicker: <R extends boolean, M extends boolean, P extends "click" | "hover" = "click">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
55
- slots: {
56
- default?: (props: any) => any;
57
- } & {
58
- leading?: (props: any) => any;
59
- } & {
60
- trailing?: (props: any) => any;
61
- } & {
62
- anchor?: (props: any) => any;
63
- } & {
64
- day?: (props: any) => any;
65
- } & {
66
- heading?: (props: any) => any;
67
- } & {
68
- 'week-day'?: (props: any) => any;
69
- };
70
- attrs: any;
71
- emit: any;
72
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
73
- props: any;
74
- expose: (exposed: {}) => void;
75
- attrs: any;
76
- slots: {
77
- default?: (props: any) => any;
78
- } & {
79
- leading?: (props: any) => any;
80
- } & {
81
- trailing?: (props: any) => any;
82
- } & {
83
- anchor?: (props: any) => any;
84
- } & {
85
- day?: (props: any) => any;
86
- } & {
87
- heading?: (props: any) => any;
88
- } & {
89
- 'week-day'?: (props: any) => any;
90
- };
91
- emit: any;
92
- }>) => import("vue").VNode & {
93
- __ctx?: Awaited<typeof __VLS_setup>;
94
- };
95
- readonly switch: any;
96
- readonly textarea: any;
97
- readonly slider: any;
98
- readonly pinInput: any;
99
- readonly inputTags: any;
100
- readonly selectMenu: any;
101
- readonly inputMenu: any;
102
- readonly checkboxGroup: any;
103
- readonly radioGroup: any;
104
- readonly inputDate: any;
105
- readonly inputTime: any;
106
- readonly withClear: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
107
- slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
108
- attrs: any;
109
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
110
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
111
- props: any;
112
- expose: (exposed: {}) => void;
113
- attrs: any;
114
- slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
115
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
116
- }>) => import("vue").VNode & {
117
- __ctx?: Awaited<typeof __VLS_setup>;
118
- };
119
- readonly withPasswordToggle: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
120
- slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
121
- attrs: any;
122
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
123
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
124
- props: any;
125
- expose: (exposed: {}) => void;
126
- attrs: any;
127
- slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
128
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
129
- }>) => import("vue").VNode & {
130
- __ctx?: Awaited<typeof __VLS_setup>;
131
- };
132
- readonly withCopy: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
133
- slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
134
- attrs: any;
135
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
136
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
137
- props: any;
138
- expose: (exposed: {}) => void;
139
- attrs: any;
140
- slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
141
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
142
- }>) => import("vue").VNode & {
143
- __ctx?: Awaited<typeof __VLS_setup>;
144
- };
145
- readonly withCharacterLimit: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
146
- slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
147
- attrs: any;
148
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
149
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
150
- props: any;
151
- expose: (exposed: {}) => void;
152
- attrs: any;
153
- slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
154
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
155
- }>) => import("vue").VNode & {
156
- __ctx?: Awaited<typeof __VLS_setup>;
157
- };
158
- readonly asPhoneNumberInput: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
159
- slots: import("@movk/core").OmitByKey<InputSlots, "leading">;
160
- attrs: any;
161
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
162
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
163
- props: any;
164
- expose: (exposed: {}) => void;
165
- attrs: any;
166
- slots: import("@movk/core").OmitByKey<InputSlots, "leading">;
167
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
168
- }>) => import("vue").VNode & {
169
- __ctx?: Awaited<typeof __VLS_setup>;
170
- };
171
- readonly withFloatingLabel: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
172
- slots: import("@movk/core").OmitByKey<InputSlots, "default" | "trailing">;
173
- attrs: any;
174
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
175
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
176
- props: any;
177
- expose: (exposed: {}) => void;
178
- attrs: any;
179
- slots: import("@movk/core").OmitByKey<InputSlots, "default" | "trailing">;
180
- emit: any & ((event: "update:modelValue", value: T | undefined) => void);
181
- }>) => import("vue").VNode & {
182
- __ctx?: Awaited<typeof __VLS_setup>;
183
- };
184
- readonly colorChooser: <P extends "click" | "hover" = "click">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
185
- slots: {
186
- default?: (props: any) => any;
187
- } & {
188
- leading?: (props: any) => any;
189
- } & {
190
- trailing?: (props: any) => any;
191
- } & {
192
- anchor?: (props: any) => any;
193
- };
194
- attrs: any;
195
- emit: any & ((event: "update:modelValue", value: string | undefined) => void);
196
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
197
- props: any;
198
- expose: (exposed: {}) => void;
199
- attrs: any;
200
- slots: {
201
- default?: (props: any) => any;
202
- } & {
203
- leading?: (props: any) => any;
204
- } & {
205
- trailing?: (props: any) => any;
206
- } & {
207
- anchor?: (props: any) => any;
208
- };
209
- emit: any & ((event: "update:modelValue", value: string | undefined) => void);
210
- }>) => import("vue").VNode & {
211
- __ctx?: Awaited<typeof __VLS_setup>;
212
- };
213
- readonly starRating: any;
214
- readonly slideVerify: any;
215
- };
216
- type DefaultControlComponents = typeof DEFAULT_CONTROL_COMPONENTS;
217
- type DefaultControlMap = {
218
- readonly [K in keyof DefaultControlComponents]: K extends 'string' ? AutoFormControl<typeof UInput, InputProps, InputSlots> : K extends 'textarea' ? AutoFormControl<typeof UTextarea, TextareaProps, TextareaSlots> : AutoFormControl<DefaultControlComponents[K]>;
219
- };
220
- export declare const DEFAULT_CONTROLS: DefaultControlMap;
221
- export {};
@@ -1,27 +0,0 @@
1
- import type { Ref } from 'vue';
2
- import type { AutoFormField, AutoFormFieldContext } from '../types/auto-form.js';
3
- /** 初始化表单上下文工厂并通过 provide 注入给所有子渲染器 */
4
- export declare function useAutoFormProvider<T extends Record<string, any>>(state: Ref<T>, slots: Record<string, any>): {
5
- createFieldContext: (field: AutoFormField, extraProps?: Record<string, any>) => AutoFormFieldContext;
6
- createSlotProps: (field: AutoFormField, extraProps?: Record<string, any>) => AutoFormFieldContext;
7
- resolveFieldProp: <T_1 = any>(field: AutoFormField, prop: string, defaultValue?: T_1, extraProps?: Record<string, any>) => T_1 | undefined;
8
- renderFieldSlot: (fn?: (props?: any) => any, slotProps?: any) => any;
9
- getResolvedFieldSlots: (field: AutoFormField, extraProps?: Record<string, any>) => undefined;
10
- renderControl: (field: AutoFormField, extraProps?: Record<string, any>) => any;
11
- createSlotResolver: (field: AutoFormField, extraProps?: Record<string, any>) => {
12
- hasSlot(name: string): boolean;
13
- renderSlot(name: string, slotProps: any): any;
14
- };
15
- createFormFieldSlots: (field: AutoFormField, slotResolver: ReturnType<(field: AutoFormField, extraProps?: Record<string, any>) => {
16
- hasSlot(name: string): boolean;
17
- renderSlot(name: string, slotProps: any): any;
18
- }>, extraProps?: Record<string, any>) => Record<string, any>;
19
- createCollapsibleEnhancer: (field: AutoFormField, extraProps?: Record<string, any>) => {
20
- collapsibleConfig: any;
21
- shouldShowCollapsible: any;
22
- isHidden: any;
23
- enhancedField: any;
24
- };
25
- };
26
- /** 注入表单上下文,必须在 AutoForm 子渲染器中调用 */
27
- export declare function useAutoFormInjector(): any;
@@ -1,28 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { ButtonProps } from '@nuxt/ui';
3
- import type { AutoFormField } from '../../types/auto-form.js';
4
- import type { AnyObject } from '@movk/core';
5
- import type { AutoFormProps } from '../AutoForm.vue.js';
6
- export interface AutoFormRendererArrayProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
7
- field: AutoFormField;
8
- extraProps?: AnyObject;
9
- addButtonProps?: Partial<ButtonProps>;
10
- }
11
- declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
12
- props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererArrayProps<S>> & (typeof globalThis extends {
13
- __VLS_PROPS_FALLBACK: infer P;
14
- } ? P : {});
15
- expose: (exposed: {}) => void;
16
- attrs: any;
17
- slots: {};
18
- emit: {};
19
- }>) => import("vue").VNode & {
20
- __ctx?: Awaited<typeof __VLS_setup>;
21
- };
22
- declare const _default: typeof __VLS_export;
23
- export default _default;
24
- type __VLS_PrettifyLocal<T> = (T extends any ? {
25
- [K in keyof T]: T[K];
26
- } : {
27
- [K in keyof T as K]: T[K];
28
- }) & {};
@@ -1,28 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { ButtonProps } from '@nuxt/ui';
3
- import type { AutoFormField } from '../../types/auto-form.js';
4
- import type { AnyObject } from '@movk/core';
5
- import type { AutoFormProps } from '../AutoForm.vue.js';
6
- export interface AutoFormRendererArrayProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
7
- field: AutoFormField;
8
- extraProps?: AnyObject;
9
- addButtonProps?: Partial<ButtonProps>;
10
- }
11
- declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
12
- props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererArrayProps<S>> & (typeof globalThis extends {
13
- __VLS_PROPS_FALLBACK: infer P;
14
- } ? P : {});
15
- expose: (exposed: {}) => void;
16
- attrs: any;
17
- slots: {};
18
- emit: {};
19
- }>) => import("vue").VNode & {
20
- __ctx?: Awaited<typeof __VLS_setup>;
21
- };
22
- declare const _default: typeof __VLS_export;
23
- export default _default;
24
- type __VLS_PrettifyLocal<T> = (T extends any ? {
25
- [K in keyof T]: T[K];
26
- } : {
27
- [K in keyof T as K]: T[K];
28
- }) & {};
@@ -1,26 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { AutoFormField } from '../../types/auto-form.js';
3
- import type { AnyObject } from '@movk/core';
4
- import type { AutoFormProps } from '../AutoForm.vue.js';
5
- export interface AutoFormRendererChildrenProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
6
- fields: AutoFormField[];
7
- extraProps?: AnyObject;
8
- }
9
- declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
- props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererChildrenProps<S>> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {};
16
- emit: {};
17
- }>) => import("vue").VNode & {
18
- __ctx?: Awaited<typeof __VLS_setup>;
19
- };
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- type __VLS_PrettifyLocal<T> = (T extends any ? {
23
- [K in keyof T]: T[K];
24
- } : {
25
- [K in keyof T as K]: T[K];
26
- }) & {};
@@ -1,26 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { AutoFormField } from '../../types/auto-form.js';
3
- import type { AnyObject } from '@movk/core';
4
- import type { AutoFormProps } from '../AutoForm.vue.js';
5
- export interface AutoFormRendererChildrenProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
6
- fields: AutoFormField[];
7
- extraProps?: AnyObject;
8
- }
9
- declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
- props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererChildrenProps<S>> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {};
16
- emit: {};
17
- }>) => import("vue").VNode & {
18
- __ctx?: Awaited<typeof __VLS_setup>;
19
- };
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- type __VLS_PrettifyLocal<T> = (T extends any ? {
23
- [K in keyof T]: T[K];
24
- } : {
25
- [K in keyof T as K]: T[K];
26
- }) & {};
@@ -1,26 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { AutoFormProps } from '../AutoForm.vue.js';
3
- import type { AnyObject } from '@movk/core';
4
- import type { AutoFormField } from '../../types/index.js';
5
- export interface AutoFormFieldProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
6
- field: AutoFormField;
7
- extraProps?: AnyObject;
8
- }
9
- declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
- props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormFieldProps<S>> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {};
16
- emit: {};
17
- }>) => import("vue").VNode & {
18
- __ctx?: Awaited<typeof __VLS_setup>;
19
- };
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- type __VLS_PrettifyLocal<T> = (T extends any ? {
23
- [K in keyof T]: T[K];
24
- } : {
25
- [K in keyof T as K]: T[K];
26
- }) & {};
@@ -1,55 +0,0 @@
1
- <script setup>
2
- import { UFormField } from "#components";
3
- import { computed } from "vue";
4
- import { useAutoFormInjector } from "../../auto-form/provider";
5
- import { VNodeRender } from "../../auto-form/reactive-utils";
6
- const { field, extraProps } = defineProps({
7
- field: { type: Object, required: true },
8
- extraProps: { type: Object, required: false },
9
- schema: { type: null, required: false }
10
- });
11
- const {
12
- resolveFieldProp,
13
- renderControl,
14
- createSlotResolver,
15
- createFormFieldSlots,
16
- createSlotProps
17
- } = useAutoFormInjector();
18
- const slotResolver = computed(() => createSlotResolver(field, extraProps));
19
- const fieldProps = computed(() => ({
20
- hidden: resolveFieldProp(field, "hidden", void 0, extraProps),
21
- as: resolveFieldProp(field, "as", void 0, extraProps),
22
- name: resolveFieldProp(field, "name", field.path, extraProps),
23
- errorPattern: resolveFieldProp(field, "errorPattern", void 0, extraProps),
24
- label: resolveFieldProp(field, "label", void 0, extraProps),
25
- description: resolveFieldProp(field, "description", void 0, extraProps),
26
- help: resolveFieldProp(field, "help", void 0, extraProps),
27
- error: resolveFieldProp(field, "error", void 0, extraProps),
28
- hint: resolveFieldProp(field, "hint", void 0, extraProps),
29
- size: resolveFieldProp(field, "size", void 0, extraProps),
30
- required: resolveFieldProp(field, "required", void 0, extraProps),
31
- eagerValidation: resolveFieldProp(field, "eagerValidation", void 0, extraProps),
32
- validateOnInputDelay: resolveFieldProp(field, "validateOnInputDelay", void 0, extraProps),
33
- class: resolveFieldProp(field, "class", void 0, extraProps),
34
- ui: resolveFieldProp(field, "ui", void 0, extraProps)
35
- }));
36
- const formFieldSlots = computed(() => createFormFieldSlots(field, slotResolver.value, extraProps));
37
- const renderedControl = computed(() => renderControl(field, extraProps));
38
- const defaultSlotProps = computed(() => createSlotProps(field, extraProps));
39
- </script>
40
-
41
- <template>
42
- <UFormField v-show="!fieldProps.hidden" v-bind="fieldProps">
43
- <template v-for="(slotComponent, slotName) in formFieldSlots" :key="slotName" #[slotName]="slotData">
44
- <VNodeRender :node="slotComponent(slotData)" />
45
- </template>
46
-
47
- <template #default="{ error }">
48
- <VNodeRender
49
- v-if="slotResolver.hasSlot('default')"
50
- :node="slotResolver.renderSlot('default', { ...defaultSlotProps, error })"
51
- />
52
- <VNodeRender v-else :node="renderedControl" />
53
- </template>
54
- </UFormField>
55
- </template>
@@ -1,26 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { AutoFormProps } from '../AutoForm.vue.js';
3
- import type { AnyObject } from '@movk/core';
4
- import type { AutoFormField } from '../../types/index.js';
5
- export interface AutoFormFieldProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
6
- field: AutoFormField;
7
- extraProps?: AnyObject;
8
- }
9
- declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
- props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormFieldProps<S>> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {};
16
- emit: {};
17
- }>) => import("vue").VNode & {
18
- __ctx?: Awaited<typeof __VLS_setup>;
19
- };
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- type __VLS_PrettifyLocal<T> = (T extends any ? {
23
- [K in keyof T]: T[K];
24
- } : {
25
- [K in keyof T as K]: T[K];
26
- }) & {};
@@ -1,26 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { AutoFormField } from '../../types/auto-form.js';
3
- import type { AutoFormProps } from '../AutoForm.vue.js';
4
- import type { AnyObject } from '@movk/core';
5
- export interface AutoFormRendererLayoutProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
6
- field: AutoFormField;
7
- extraProps?: AnyObject;
8
- }
9
- declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
- props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererLayoutProps<S>> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {};
16
- emit: {};
17
- }>) => import("vue").VNode & {
18
- __ctx?: Awaited<typeof __VLS_setup>;
19
- };
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- type __VLS_PrettifyLocal<T> = (T extends any ? {
23
- [K in keyof T]: T[K];
24
- } : {
25
- [K in keyof T as K]: T[K];
26
- }) & {};
@@ -1,26 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { AutoFormField } from '../../types/auto-form.js';
3
- import type { AutoFormProps } from '../AutoForm.vue.js';
4
- import type { AnyObject } from '@movk/core';
5
- export interface AutoFormRendererLayoutProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
6
- field: AutoFormField;
7
- extraProps?: AnyObject;
8
- }
9
- declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
- props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererLayoutProps<S>> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {};
16
- emit: {};
17
- }>) => import("vue").VNode & {
18
- __ctx?: Awaited<typeof __VLS_setup>;
19
- };
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- type __VLS_PrettifyLocal<T> = (T extends any ? {
23
- [K in keyof T]: T[K];
24
- } : {
25
- [K in keyof T as K]: T[K];
26
- }) & {};
@@ -1,26 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { AutoFormProps } from '../AutoForm.vue.js';
3
- import type { AutoFormField } from '../../types/index.js';
4
- import type { AnyObject } from '@movk/core';
5
- export interface AutoFormRendererNestedProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
6
- field: AutoFormField;
7
- extraProps?: AnyObject;
8
- }
9
- declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
- props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererNestedProps<S>> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {};
16
- emit: {};
17
- }>) => import("vue").VNode & {
18
- __ctx?: Awaited<typeof __VLS_setup>;
19
- };
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- type __VLS_PrettifyLocal<T> = (T extends any ? {
23
- [K in keyof T]: T[K];
24
- } : {
25
- [K in keyof T as K]: T[K];
26
- }) & {};
@@ -1,26 +0,0 @@
1
- import type { z } from 'zod';
2
- import type { AutoFormProps } from '../AutoForm.vue.js';
3
- import type { AutoFormField } from '../../types/index.js';
4
- import type { AnyObject } from '@movk/core';
5
- export interface AutoFormRendererNestedProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
6
- field: AutoFormField;
7
- extraProps?: AnyObject;
8
- }
9
- declare const __VLS_export: <S extends z.ZodObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
10
- props: import("vue").PublicProps & __VLS_PrettifyLocal<AutoFormRendererNestedProps<S>> & (typeof globalThis extends {
11
- __VLS_PROPS_FALLBACK: infer P;
12
- } ? P : {});
13
- expose: (exposed: {}) => void;
14
- attrs: any;
15
- slots: {};
16
- emit: {};
17
- }>) => import("vue").VNode & {
18
- __ctx?: Awaited<typeof __VLS_setup>;
19
- };
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
22
- type __VLS_PrettifyLocal<T> = (T extends any ? {
23
- [K in keyof T]: T[K];
24
- } : {
25
- [K in keyof T as K]: T[K];
26
- }) & {};
@@ -1,9 +0,0 @@
1
- import type { ApiResponseConfig, ApiAuthConfig, ApiToastConfig } from '../types/api.js';
2
- export declare const DEFAULT_RESPONSE_CONFIG: ApiResponseConfig;
3
- export declare const DEFAULT_AUTH_CONFIG: ApiAuthConfig;
4
- export declare const DEFAULT_TOAST_CONFIG: ApiToastConfig;
5
- export declare const DEFAULT_ENDPOINT: {
6
- default: {
7
- baseURL: string;
8
- };
9
- };
@@ -1,32 +0,0 @@
1
- export const DEFAULT_RESPONSE_CONFIG = {
2
- successCodes: [200, 0],
3
- codeKey: "code",
4
- messageKey: "message",
5
- dataKey: "data"
6
- };
7
- export const DEFAULT_AUTH_CONFIG = {
8
- enabled: false,
9
- tokenSource: "session",
10
- sessionTokenPath: "token",
11
- tokenType: "Bearer",
12
- headerName: "Authorization",
13
- unauthorized: {
14
- redirect: true,
15
- clearSession: true,
16
- loginPath: "/login"
17
- }
18
- };
19
- export const DEFAULT_TOAST_CONFIG = {
20
- enabled: true,
21
- success: {
22
- show: true,
23
- color: "success",
24
- duration: 3e3
25
- },
26
- error: {
27
- show: true,
28
- color: "error",
29
- duration: 3e3
30
- }
31
- };
32
- export const DEFAULT_ENDPOINT = { default: { baseURL: "/api" } };
@@ -1,7 +0,0 @@
1
- declare const BREAKPOINTS: readonly ["sm", "md", "lg", "xl"];
2
- type Breakpoint = (typeof BREAKPOINTS)[number];
3
- type ColsConfig = Partial<Record<Breakpoint, number>>;
4
- export declare const GRID_COL_SAFELIST: string[];
5
- export declare function resolveMaxCols(cols: number | ColsConfig): number;
6
- export declare function resolveGridClasses(cols: number | ColsConfig, gap: string): string;
7
- export {};