@movk/nuxt 1.1.2 → 1.2.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 (120) hide show
  1. package/README.md +5 -29
  2. package/dist/module.d.mts +3 -1
  3. package/dist/module.json +3 -3
  4. package/dist/module.mjs +120 -34
  5. package/dist/runtime/auto-form/controls.d.ts +221 -0
  6. package/dist/runtime/auto-form/controls.js +70 -0
  7. package/dist/runtime/{utils → auto-form}/field-utils.d.ts +4 -20
  8. package/dist/runtime/{utils → auto-form}/field-utils.js +1 -2
  9. package/dist/runtime/auto-form/metadata.d.ts +22 -0
  10. package/dist/runtime/auto-form/metadata.js +53 -0
  11. package/dist/runtime/auto-form/provider.d.ts +27 -0
  12. package/dist/runtime/{internal/useAutoFormProvider.js → auto-form/provider.js} +1 -1
  13. package/dist/runtime/{utils → auto-form}/reactive-utils.d.ts +4 -22
  14. package/dist/runtime/{utils → auto-form}/schema-introspector.d.ts +3 -9
  15. package/dist/runtime/{utils → auto-form}/schema-introspector.js +11 -9
  16. package/dist/runtime/components/AutoForm.d.vue.ts +4 -5
  17. package/dist/runtime/components/AutoForm.vue +12 -35
  18. package/dist/runtime/components/AutoForm.vue.d.ts +4 -5
  19. package/dist/runtime/components/ColorChooser.d.vue.ts +10 -6
  20. package/dist/runtime/components/ColorChooser.vue +4 -7
  21. package/dist/runtime/components/ColorChooser.vue.d.ts +10 -6
  22. package/dist/runtime/components/DatePicker.d.vue.ts +16 -10
  23. package/dist/runtime/components/DatePicker.vue.d.ts +16 -10
  24. package/dist/runtime/components/SearchForm.d.vue.ts +171 -0
  25. package/dist/runtime/components/SearchForm.vue +216 -0
  26. package/dist/runtime/components/SearchForm.vue.d.ts +171 -0
  27. package/dist/runtime/components/SlideVerify.d.vue.ts +5 -32
  28. package/dist/runtime/components/SlideVerify.vue +4 -4
  29. package/dist/runtime/components/SlideVerify.vue.d.ts +5 -32
  30. package/dist/runtime/components/StarRating.d.vue.ts +8 -16
  31. package/dist/runtime/components/StarRating.vue +50 -65
  32. package/dist/runtime/components/StarRating.vue.d.ts +8 -16
  33. package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.d.vue.ts +10 -2
  34. package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.vue +16 -23
  35. package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.vue.d.ts +10 -2
  36. package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.d.vue.ts +26 -0
  37. package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.vue +50 -0
  38. package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.vue.d.ts +26 -0
  39. package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.d.vue.ts +8 -2
  40. package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.vue +2 -2
  41. package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.vue.d.ts +8 -2
  42. package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.d.vue.ts +8 -2
  43. package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.vue +29 -64
  44. package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.vue.d.ts +8 -2
  45. package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.d.vue.ts +8 -2
  46. package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.vue +15 -69
  47. package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.vue.d.ts +8 -2
  48. package/dist/runtime/components/input/AsPhoneNumberInput.d.vue.ts +36 -0
  49. package/dist/runtime/components/input/AsPhoneNumberInput.vue +35 -0
  50. package/dist/runtime/components/input/AsPhoneNumberInput.vue.d.ts +36 -0
  51. package/dist/runtime/components/input/WithCharacterLimit.d.vue.ts +17 -9
  52. package/dist/runtime/components/input/WithCharacterLimit.vue +5 -5
  53. package/dist/runtime/components/input/WithCharacterLimit.vue.d.ts +17 -9
  54. package/dist/runtime/components/input/WithClear.d.vue.ts +13 -9
  55. package/dist/runtime/components/input/WithClear.vue +2 -2
  56. package/dist/runtime/components/input/WithClear.vue.d.ts +13 -9
  57. package/dist/runtime/components/input/WithCopy.d.vue.ts +16 -10
  58. package/dist/runtime/components/input/WithCopy.vue +3 -3
  59. package/dist/runtime/components/input/WithCopy.vue.d.ts +16 -10
  60. package/dist/runtime/components/input/WithFloatingLabel.d.vue.ts +36 -0
  61. package/dist/runtime/components/input/WithFloatingLabel.vue +67 -0
  62. package/dist/runtime/components/input/WithFloatingLabel.vue.d.ts +36 -0
  63. package/dist/runtime/components/input/WithPasswordToggle.d.vue.ts +11 -9
  64. package/dist/runtime/components/input/WithPasswordToggle.vue +3 -3
  65. package/dist/runtime/components/input/WithPasswordToggle.vue.d.ts +11 -9
  66. package/dist/runtime/components/theme-picker/ThemePicker.d.vue.ts +1 -1
  67. package/dist/runtime/components/theme-picker/ThemePicker.vue +19 -25
  68. package/dist/runtime/components/theme-picker/ThemePicker.vue.d.ts +1 -1
  69. package/dist/runtime/components/theme-picker/ThemePickerButton.d.vue.ts +1 -7
  70. package/dist/runtime/components/theme-picker/ThemePickerButton.vue.d.ts +1 -7
  71. package/dist/runtime/composables/index.d.ts +1 -1
  72. package/dist/runtime/composables/index.js +1 -1
  73. package/dist/runtime/composables/useApiFetch.d.ts +17 -14
  74. package/dist/runtime/composables/useApiFetch.js +3 -28
  75. package/dist/runtime/composables/useAutoForm.d.ts +14 -98
  76. package/dist/runtime/composables/useAutoForm.js +37 -157
  77. package/dist/runtime/composables/useClientApiFetch.d.ts +5 -6
  78. package/dist/runtime/composables/useDownloadWithProgress.js +5 -6
  79. package/dist/runtime/composables/useLazyApiFetch.d.ts +18 -0
  80. package/dist/runtime/composables/useLazyApiFetch.js +4 -0
  81. package/dist/runtime/composables/useTheme.d.ts +17 -14
  82. package/dist/runtime/composables/useTheme.js +68 -72
  83. package/dist/runtime/composables/useUploadWithProgress.d.ts +2 -2
  84. package/dist/runtime/composables/useUploadWithProgress.js +7 -7
  85. package/dist/runtime/constants/api-defaults.d.ts +9 -0
  86. package/dist/runtime/constants/api-defaults.js +32 -0
  87. package/dist/runtime/constants/auto-form.d.ts +0 -2
  88. package/dist/runtime/constants/auto-form.js +0 -25
  89. package/dist/runtime/constants/grid-cols.d.ts +7 -0
  90. package/dist/runtime/constants/grid-cols.js +44 -0
  91. package/dist/runtime/plugins/api.factory.js +78 -121
  92. package/dist/runtime/plugins/theme.js +44 -64
  93. package/dist/runtime/style.css +1 -1
  94. package/dist/runtime/types/api.d.ts +277 -146
  95. package/dist/runtime/types/auto-form.d.ts +122 -411
  96. package/dist/runtime/types/index.d.ts +2 -2
  97. package/dist/runtime/types/index.js +2 -2
  98. package/dist/runtime/types/module.d.ts +70 -13
  99. package/dist/runtime/types/theme.d.ts +2 -0
  100. package/dist/runtime/types/zod.d.ts +11 -10
  101. package/dist/runtime/utils/api-utils.d.ts +27 -48
  102. package/dist/runtime/utils/api-utils.js +18 -47
  103. package/dist/runtime/utils/meta.d.ts +7 -0
  104. package/dist/runtime/utils/meta.js +16 -0
  105. package/package.json +36 -35
  106. package/dist/runtime/composables/useApiAuth.d.ts +0 -47
  107. package/dist/runtime/composables/useApiAuth.js +0 -66
  108. package/dist/runtime/internal/useAutoFormProvider.d.ts +0 -50
  109. package/dist/runtime/schemas/api.d.ts +0 -590
  110. package/dist/runtime/schemas/api.js +0 -228
  111. package/dist/runtime/server/api/_movk/session.post.d.ts +0 -10
  112. package/dist/runtime/server/api/_movk/session.post.js +0 -18
  113. package/dist/runtime/types/auth.d.ts +0 -34
  114. package/dist/runtime/types/auto-form-renderer.d.ts +0 -22
  115. package/dist/runtime/types/components.d.ts +0 -43
  116. package/dist/runtime/types/components.js +0 -0
  117. package/dist/runtime/utils/auto-form.d.ts +0 -3
  118. package/dist/runtime/utils/auto-form.js +0 -18
  119. /package/dist/runtime/{utils → auto-form}/reactive-utils.js +0 -0
  120. /package/dist/runtime/types/{auto-form-renderer.js → theme.js} +0 -0
@@ -0,0 +1,171 @@
1
+ import type { ButtonProps, FormProps, InferInput } from '@nuxt/ui';
2
+ import type { z } from 'zod';
3
+ import type { ZodAutoFormFieldMeta } from '../types/zod.js';
4
+ import type { AutoFormControls } from '../types/auto-form.js';
5
+ export interface SearchFormProps<S extends z.ZodObject, T extends boolean = true, N extends boolean = false> extends FormProps<S, T, N> {
6
+ /**
7
+ * Zod 对象 schema,定义搜索字段
8
+ */
9
+ schema: S;
10
+ /**
11
+ * 网格列数
12
+ * @defaultValue 3
13
+ */
14
+ cols?: number | {
15
+ sm?: number;
16
+ md?: number;
17
+ lg?: number;
18
+ xl?: number;
19
+ };
20
+ /**
21
+ * 可见行数(折叠时显示的行数)
22
+ * @defaultValue 1
23
+ */
24
+ visibleRows?: number;
25
+ /**
26
+ * 自定义控件映射(复用 AutoForm 的控件系统)
27
+ */
28
+ controls?: AutoFormControls;
29
+ /**
30
+ * 全局字段元数据
31
+ */
32
+ globalMeta?: ZodAutoFormFieldMeta;
33
+ /**
34
+ * 搜索按钮属性
35
+ */
36
+ searchButtonProps?: ButtonProps;
37
+ /**
38
+ * 重置按钮属性
39
+ */
40
+ resetButtonProps?: ButtonProps;
41
+ /**
42
+ * 搜索按钮文本
43
+ * @defaultValue '搜索'
44
+ */
45
+ searchText?: string;
46
+ /**
47
+ * 重置按钮文本
48
+ * @defaultValue '重置'
49
+ */
50
+ resetText?: string;
51
+ /**
52
+ * 是否显示搜索按钮
53
+ * @defaultValue true
54
+ */
55
+ showSearchButton?: boolean;
56
+ /**
57
+ * 是否显示重置按钮
58
+ * @defaultValue true
59
+ */
60
+ showResetButton?: boolean;
61
+ /**
62
+ * 搜索按钮加载状态
63
+ * @defaultValue false
64
+ */
65
+ loading?: boolean;
66
+ /**
67
+ * 展开/收起按钮图标
68
+ * @defaultValue 'i-lucide-chevron-down'
69
+ */
70
+ icon?: string;
71
+ /**
72
+ * 展开按钮文本
73
+ * @defaultValue '展开'
74
+ */
75
+ expandText?: string;
76
+ /**
77
+ * 收起按钮文本
78
+ * @defaultValue '收起'
79
+ */
80
+ collapseText?: string;
81
+ /**
82
+ * 默认展开状态
83
+ * @defaultValue false
84
+ */
85
+ defaultExpanded?: boolean;
86
+ /**
87
+ * 网格间距
88
+ * @defaultValue 'gap-4'
89
+ */
90
+ gap?: string;
91
+ }
92
+ export interface SearchFormActionSlots {
93
+ /** 替换默认按钮区域 */
94
+ actions: (props: {
95
+ expanded: boolean;
96
+ toggle: () => void;
97
+ search: () => void;
98
+ reset: () => void;
99
+ loading: boolean;
100
+ }) => any;
101
+ /** 追加在默认按钮后面 */
102
+ extraActions: (props: {
103
+ expanded: boolean;
104
+ }) => any;
105
+ }
106
+ declare const __VLS_export: <S extends z.ZodObject, T extends boolean = true, N extends boolean = false>(__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<{
107
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(SearchFormProps<S, T, N> & {
108
+ modelValue?: Partial<InferInput<S>>;
109
+ }) & {
110
+ [x: `on${Capitalize<string>}`]: ((...args: any) => any) | undefined;
111
+ }> & (typeof globalThis extends {
112
+ __VLS_PROPS_FALLBACK: infer P;
113
+ } ? P : {});
114
+ expose: (exposed: import("vue").ShallowUnwrapRef<{
115
+ formRef: any;
116
+ reset: () => void;
117
+ clear: () => void;
118
+ expanded: any;
119
+ toggle: () => void;
120
+ }>) => void;
121
+ attrs: any;
122
+ slots: SearchFormActionSlots & Record<string, (props: import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown> & {
123
+ "field-label": (props: {
124
+ label?: string;
125
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
126
+ "field-hint": (props: {
127
+ hint?: string;
128
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
129
+ "field-description": (props: {
130
+ description?: string;
131
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
132
+ "field-help": (props: {
133
+ help?: string;
134
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
135
+ "field-error": (props: {
136
+ error?: boolean | string;
137
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
138
+ "field-default": (props: {
139
+ error?: boolean | string;
140
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
141
+ } & { [Key in `field-label:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_2 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_2]> extends true ? K_2 | `${K_2}.${{ [K_3 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_2]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_2]>[K_3]> extends true ? K_3 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_2]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-label:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}` | `field-hint:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-hint:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}` | `field-description:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-description:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}` | `field-help:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-help:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}` | `field-error:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-error:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}` | `field-default:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-default:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}`]: Key extends `field-${infer K_2 extends keyof import("../types/index.js").AutoFormFieldSlots}:${infer P extends { [K_3 in keyof T_1 & string]: import("@movk/core").IsPlainObject<T_1[K_3]> extends true ? K_3 | `${K_3}.${{ [K_5 in keyof NonNullable<T_1[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<T_1[K_3]>[K_5]> extends true ? K_5 | `${K_5}.${{ [K_6 in keyof NonNullable<NonNullable<T_1[K_3]>[K_5]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<T_1[K_3]>[K_5]>[K_6]> extends true ? K_6 : never; }[keyof NonNullable<NonNullable<T_1[K_3]>[K_5]> & string]}` : never; }[keyof NonNullable<T_1[K_3]> & string]}` : never; }[keyof T_1 & string] | (string & import("@movk/core").NonObjectFieldKeys<T_1>)}` ? (props: {
142
+ label: {
143
+ label?: string;
144
+ };
145
+ hint: {
146
+ hint?: string;
147
+ };
148
+ description: {
149
+ description?: string;
150
+ };
151
+ help: {
152
+ help?: string;
153
+ };
154
+ error: {
155
+ error?: boolean | string;
156
+ };
157
+ default: {
158
+ error?: boolean | string;
159
+ };
160
+ }[K_2] & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, P>) => unknown : never; } & { [P in { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string] | { [K_2 in keyof InferInput<S> & string]: NonNullable<Partial<InferInput<S>>[K_2]> extends any[] ? K_2 : import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_2]> extends true ? `${K_2}.${{ [K_4 in keyof NonNullable<Partial<InferInput<S>>[K_2]> & string]: NonNullable<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]> extends any[] ? K_4 : import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]> extends true ? `${K_4}.${{ [K_5 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]> & string]: NonNullable<NonNullable<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]>[K_5]> extends any[] ? K_5 : import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]>[K_5]> extends true ? never : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K_2]> & string]}` : never; }[keyof InferInput<S> & string] as `field-content:${P}` | `field-before:${P}` | `field-after:${P}`]: (props: import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, P>) => unknown; };
161
+ emit: any & ((event: "update:modelValue", value: Partial<InferInput<S>> | undefined) => void);
162
+ }>) => import("vue").VNode & {
163
+ __ctx?: Awaited<typeof __VLS_setup>;
164
+ };
165
+ declare const _default: typeof __VLS_export;
166
+ export default _default;
167
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
168
+ [K in keyof T]: T[K];
169
+ } : {
170
+ [K in keyof T as K]: T[K];
171
+ }) & {};
@@ -0,0 +1,216 @@
1
+ <script setup>
2
+ import { UButton, UCollapsible, UForm } from "#components";
3
+ import { computed, ref, useTemplateRef, watch } from "vue";
4
+ import { useAutoFormProvider } from "../auto-form/provider";
5
+ import { extractPureSchema, introspectSchema } from "../auto-form/schema-introspector";
6
+ import { useAutoForm } from "../composables/useAutoForm";
7
+ import AutoFormRendererField from "./auto-form-renderer/AutoFormRendererField.vue";
8
+ import { useAppConfig } from "#app";
9
+ import { resolveGridClasses, resolveMaxCols } from "../constants/grid-cols";
10
+ const {
11
+ schema,
12
+ controls,
13
+ globalMeta,
14
+ cols = 3,
15
+ visibleRows = 1,
16
+ icon = "i-lucide-chevron-down",
17
+ expandText = "\u5C55\u5F00",
18
+ collapseText = "\u6536\u8D77",
19
+ defaultExpanded = false,
20
+ gap = "gap-4",
21
+ searchText = "\u641C\u7D22",
22
+ resetText = "\u91CD\u7F6E",
23
+ searchButtonProps,
24
+ resetButtonProps,
25
+ showSearchButton = true,
26
+ showResetButton = true,
27
+ loading = false,
28
+ state: _state,
29
+ ...restProps
30
+ } = defineProps({
31
+ schema: { type: null, required: true },
32
+ cols: { type: [Number, Object], required: false },
33
+ visibleRows: { type: Number, required: false },
34
+ controls: { type: Object, required: false },
35
+ globalMeta: { type: Object, required: false },
36
+ searchButtonProps: { type: Object, required: false },
37
+ resetButtonProps: { type: Object, required: false },
38
+ searchText: { type: String, required: false },
39
+ resetText: { type: String, required: false },
40
+ showSearchButton: { type: Boolean, required: false },
41
+ showResetButton: { type: Boolean, required: false },
42
+ loading: { type: Boolean, required: false },
43
+ icon: { type: String, required: false },
44
+ expandText: { type: String, required: false },
45
+ collapseText: { type: String, required: false },
46
+ defaultExpanded: { type: Boolean, required: false },
47
+ gap: { type: String, required: false },
48
+ id: { type: [String, Number], required: false },
49
+ state: { type: null, required: false },
50
+ validate: { type: Function, required: false },
51
+ validateOn: { type: Array, required: false },
52
+ disabled: { type: Boolean, required: false },
53
+ name: { type: null, required: false },
54
+ validateOnInputDelay: { type: Number, required: false },
55
+ transform: { type: null, required: false },
56
+ nested: { type: Boolean, required: false },
57
+ loadingAuto: { type: Boolean, required: false },
58
+ class: { type: null, required: false },
59
+ ui: { type: Object, required: false },
60
+ onSubmit: { type: Function, required: false }
61
+ });
62
+ const emit = defineEmits(["search", "reset", "expand"]);
63
+ const modelValue = defineModel({ type: Object });
64
+ const _slots = defineSlots();
65
+ defineOptions({ inheritAttrs: false });
66
+ const state = ref(modelValue.value ?? _state ?? {});
67
+ const initialState = { ...modelValue.value ?? _state ?? {} };
68
+ watch(() => state.value, (val) => {
69
+ if (val !== modelValue.value) {
70
+ modelValue.value = val;
71
+ }
72
+ }, { deep: true });
73
+ watch(() => modelValue.value, (val) => {
74
+ if (val !== void 0 && val !== state.value) {
75
+ state.value = val ?? {};
76
+ }
77
+ });
78
+ const appConfig = useAppConfig();
79
+ const formRef = useTemplateRef("formRef");
80
+ const expanded = ref(defaultExpanded);
81
+ const { DEFAULT_CONTROLS } = useAutoForm();
82
+ useAutoFormProvider(state, _slots);
83
+ const showActionsCell = computed(() => showSearchButton || showResetButton || !!_slots.actions || !!_slots.extraActions);
84
+ const pureSchema = computed(() => schema ? extractPureSchema(schema) : schema);
85
+ const controlsMapping = computed(() => ({
86
+ ...DEFAULT_CONTROLS,
87
+ ...controls
88
+ }));
89
+ const fields = computed(() => {
90
+ if (!schema) return [];
91
+ return introspectSchema(schema, controlsMapping.value, "", globalMeta);
92
+ });
93
+ const gridClass = computed(() => resolveGridClasses(cols, gap));
94
+ const visibleCount = computed(() => {
95
+ const base = resolveMaxCols(cols) * visibleRows;
96
+ return Math.max(0, showActionsCell.value ? base - 1 : base);
97
+ });
98
+ const visibleFields = computed(() => fields.value.slice(0, visibleCount.value));
99
+ const collapsedFields = computed(() => fields.value.slice(visibleCount.value));
100
+ const needsCollapse = computed(() => collapsedFields.value.length > 0);
101
+ function toggle() {
102
+ expanded.value = !expanded.value;
103
+ emit("expand", expanded.value);
104
+ }
105
+ function handleSearch() {
106
+ emit("search", { ...state.value });
107
+ }
108
+ function triggerSearch() {
109
+ formRef.value?.submit();
110
+ }
111
+ function clear() {
112
+ state.value = {};
113
+ formRef.value?.clear();
114
+ }
115
+ function reset() {
116
+ state.value = { ...initialState };
117
+ formRef.value?.clear();
118
+ emit("reset");
119
+ }
120
+ defineExpose({
121
+ formRef,
122
+ reset,
123
+ clear,
124
+ expanded,
125
+ toggle
126
+ });
127
+ </script>
128
+
129
+ <template>
130
+ <UForm
131
+ ref="formRef"
132
+ :state="state"
133
+ :schema="pureSchema"
134
+ v-bind="restProps"
135
+ @submit="handleSearch"
136
+ >
137
+ <template #default="{ errors, loading: formLoading }">
138
+ <div class="group/search pb-6 -mb-6">
139
+ <div class="relative">
140
+ <div :class="gridClass">
141
+ <AutoFormRendererField
142
+ v-for="field in visibleFields"
143
+ :key="field.path"
144
+ :field="field"
145
+ :schema="schema"
146
+ :extra-props="{ errors, loading: formLoading }"
147
+ />
148
+
149
+ <slot
150
+ v-if="showActionsCell"
151
+ name="actions"
152
+ :expanded="expanded"
153
+ :toggle="toggle"
154
+ :search="triggerSearch"
155
+ :reset="reset"
156
+ :loading="loading"
157
+ >
158
+ <div class="flex items-end gap-2 justify-end">
159
+ <UButton
160
+ v-if="showSearchButton"
161
+ type="submit"
162
+ icon="i-lucide-search"
163
+ :label="searchText"
164
+ :loading="loading"
165
+ v-bind="searchButtonProps"
166
+ />
167
+ <UButton
168
+ v-if="showResetButton"
169
+ :label="resetText"
170
+ color="neutral"
171
+ variant="outline"
172
+ icon="i-lucide-rotate-ccw"
173
+ v-bind="resetButtonProps"
174
+ @click="reset"
175
+ />
176
+ <slot name="extraActions" :expanded="expanded" />
177
+ </div>
178
+ </slot>
179
+ </div>
180
+
181
+ <div
182
+ v-if="needsCollapse"
183
+ class="absolute inset-x-0 top-full flex justify-center pointer-events-none z-10"
184
+ >
185
+ <UButton
186
+ :icon="icon || appConfig.ui.icons.chevronDown"
187
+ color="neutral"
188
+ size="xs"
189
+ variant="ghost"
190
+ :data-state="expanded ? 'open' : 'closed'"
191
+ :label="expanded ? collapseText : expandText"
192
+ tabindex="-1"
193
+ class="group pointer-events-auto opacity-30 group-hover/search:opacity-100 transition-opacity duration-200"
194
+ :ui="{ leadingIcon: 'size-3.5 group-data-[state=open]:rotate-180 transition-transform duration-200' }"
195
+ @click="toggle"
196
+ />
197
+ </div>
198
+ </div>
199
+
200
+ <UCollapsible v-if="needsCollapse" v-model:open="expanded">
201
+ <template #content>
202
+ <div :class="gridClass" class="mt-4">
203
+ <AutoFormRendererField
204
+ v-for="field in collapsedFields"
205
+ :key="field.path"
206
+ :field="field"
207
+ :schema="schema"
208
+ :extra-props="{ errors, loading: formLoading }"
209
+ />
210
+ </div>
211
+ </template>
212
+ </UCollapsible>
213
+ </div>
214
+ </template>
215
+ </UForm>
216
+ </template>
@@ -0,0 +1,171 @@
1
+ import type { ButtonProps, FormProps, InferInput } from '@nuxt/ui';
2
+ import type { z } from 'zod';
3
+ import type { ZodAutoFormFieldMeta } from '../types/zod.js';
4
+ import type { AutoFormControls } from '../types/auto-form.js';
5
+ export interface SearchFormProps<S extends z.ZodObject, T extends boolean = true, N extends boolean = false> extends FormProps<S, T, N> {
6
+ /**
7
+ * Zod 对象 schema,定义搜索字段
8
+ */
9
+ schema: S;
10
+ /**
11
+ * 网格列数
12
+ * @defaultValue 3
13
+ */
14
+ cols?: number | {
15
+ sm?: number;
16
+ md?: number;
17
+ lg?: number;
18
+ xl?: number;
19
+ };
20
+ /**
21
+ * 可见行数(折叠时显示的行数)
22
+ * @defaultValue 1
23
+ */
24
+ visibleRows?: number;
25
+ /**
26
+ * 自定义控件映射(复用 AutoForm 的控件系统)
27
+ */
28
+ controls?: AutoFormControls;
29
+ /**
30
+ * 全局字段元数据
31
+ */
32
+ globalMeta?: ZodAutoFormFieldMeta;
33
+ /**
34
+ * 搜索按钮属性
35
+ */
36
+ searchButtonProps?: ButtonProps;
37
+ /**
38
+ * 重置按钮属性
39
+ */
40
+ resetButtonProps?: ButtonProps;
41
+ /**
42
+ * 搜索按钮文本
43
+ * @defaultValue '搜索'
44
+ */
45
+ searchText?: string;
46
+ /**
47
+ * 重置按钮文本
48
+ * @defaultValue '重置'
49
+ */
50
+ resetText?: string;
51
+ /**
52
+ * 是否显示搜索按钮
53
+ * @defaultValue true
54
+ */
55
+ showSearchButton?: boolean;
56
+ /**
57
+ * 是否显示重置按钮
58
+ * @defaultValue true
59
+ */
60
+ showResetButton?: boolean;
61
+ /**
62
+ * 搜索按钮加载状态
63
+ * @defaultValue false
64
+ */
65
+ loading?: boolean;
66
+ /**
67
+ * 展开/收起按钮图标
68
+ * @defaultValue 'i-lucide-chevron-down'
69
+ */
70
+ icon?: string;
71
+ /**
72
+ * 展开按钮文本
73
+ * @defaultValue '展开'
74
+ */
75
+ expandText?: string;
76
+ /**
77
+ * 收起按钮文本
78
+ * @defaultValue '收起'
79
+ */
80
+ collapseText?: string;
81
+ /**
82
+ * 默认展开状态
83
+ * @defaultValue false
84
+ */
85
+ defaultExpanded?: boolean;
86
+ /**
87
+ * 网格间距
88
+ * @defaultValue 'gap-4'
89
+ */
90
+ gap?: string;
91
+ }
92
+ export interface SearchFormActionSlots {
93
+ /** 替换默认按钮区域 */
94
+ actions: (props: {
95
+ expanded: boolean;
96
+ toggle: () => void;
97
+ search: () => void;
98
+ reset: () => void;
99
+ loading: boolean;
100
+ }) => any;
101
+ /** 追加在默认按钮后面 */
102
+ extraActions: (props: {
103
+ expanded: boolean;
104
+ }) => any;
105
+ }
106
+ declare const __VLS_export: <S extends z.ZodObject, T extends boolean = true, N extends boolean = false>(__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<{
107
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(SearchFormProps<S, T, N> & {
108
+ modelValue?: Partial<InferInput<S>>;
109
+ }) & {
110
+ [x: `on${Capitalize<string>}`]: ((...args: any) => any) | undefined;
111
+ }> & (typeof globalThis extends {
112
+ __VLS_PROPS_FALLBACK: infer P;
113
+ } ? P : {});
114
+ expose: (exposed: import("vue").ShallowUnwrapRef<{
115
+ formRef: any;
116
+ reset: () => void;
117
+ clear: () => void;
118
+ expanded: any;
119
+ toggle: () => void;
120
+ }>) => void;
121
+ attrs: any;
122
+ slots: SearchFormActionSlots & Record<string, (props: import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown> & {
123
+ "field-label": (props: {
124
+ label?: string;
125
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
126
+ "field-hint": (props: {
127
+ hint?: string;
128
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
129
+ "field-description": (props: {
130
+ description?: string;
131
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
132
+ "field-help": (props: {
133
+ help?: string;
134
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
135
+ "field-error": (props: {
136
+ error?: boolean | string;
137
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
138
+ "field-default": (props: {
139
+ error?: boolean | string;
140
+ } & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, string>) => unknown;
141
+ } & { [Key in `field-label:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_2 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_2]> extends true ? K_2 | `${K_2}.${{ [K_3 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_2]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_2]>[K_3]> extends true ? K_3 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_2]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-label:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}` | `field-hint:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-hint:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}` | `field-description:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-description:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}` | `field-help:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-help:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}` | `field-error:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-error:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}` | `field-default:${{ [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]}` | `field-default:${Exclude<{ [K_1 in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_1]> extends true ? K_1 | `${K_1}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]>[K_4]> extends true ? K_4 : K_4; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_1]>[K_3]> & string]}` : K_3; }[keyof NonNullable<Partial<InferInput<S>>[K_1]> & string]}` : K_1; }[keyof InferInput<S> & string], { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string]>}`]: Key extends `field-${infer K_2 extends keyof import("../types/index.js").AutoFormFieldSlots}:${infer P extends { [K_3 in keyof T_1 & string]: import("@movk/core").IsPlainObject<T_1[K_3]> extends true ? K_3 | `${K_3}.${{ [K_5 in keyof NonNullable<T_1[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<T_1[K_3]>[K_5]> extends true ? K_5 | `${K_5}.${{ [K_6 in keyof NonNullable<NonNullable<T_1[K_3]>[K_5]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<T_1[K_3]>[K_5]>[K_6]> extends true ? K_6 : never; }[keyof NonNullable<NonNullable<T_1[K_3]>[K_5]> & string]}` : never; }[keyof NonNullable<T_1[K_3]> & string]}` : never; }[keyof T_1 & string] | (string & import("@movk/core").NonObjectFieldKeys<T_1>)}` ? (props: {
142
+ label: {
143
+ label?: string;
144
+ };
145
+ hint: {
146
+ hint?: string;
147
+ };
148
+ description: {
149
+ description?: string;
150
+ };
151
+ help: {
152
+ help?: string;
153
+ };
154
+ error: {
155
+ error?: boolean | string;
156
+ };
157
+ default: {
158
+ error?: boolean | string;
159
+ };
160
+ }[K_2] & import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, P>) => unknown : never; } & { [P in { [K in keyof InferInput<S> & string]: import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K]> extends true ? K | `${K}.${{ [K_3 in keyof NonNullable<Partial<InferInput<S>>[K]> & string]: import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K]>[K_3]> extends true ? K_3 | `${K_3}.${{ [K_4 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]: import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]>[K_4]> extends true ? K_4 : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K]>[K_3]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K]> & string]}` : never; }[keyof InferInput<S> & string] | { [K_2 in keyof InferInput<S> & string]: NonNullable<Partial<InferInput<S>>[K_2]> extends any[] ? K_2 : import("@movk/core").IsPlainObject<Partial<InferInput<S>>[K_2]> extends true ? `${K_2}.${{ [K_4 in keyof NonNullable<Partial<InferInput<S>>[K_2]> & string]: NonNullable<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]> extends any[] ? K_4 : import("@movk/core").IsPlainObject<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]> extends true ? `${K_4}.${{ [K_5 in keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]> & string]: NonNullable<NonNullable<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]>[K_5]> extends any[] ? K_5 : import("@movk/core").IsPlainObject<NonNullable<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]>[K_5]> extends true ? never : never; }[keyof NonNullable<NonNullable<Partial<InferInput<S>>[K_2]>[K_4]> & string]}` : never; }[keyof NonNullable<Partial<InferInput<S>>[K_2]> & string]}` : never; }[keyof InferInput<S> & string] as `field-content:${P}` | `field-before:${P}` | `field-after:${P}`]: (props: import("../types/index.js").AutoFormFieldContext<Partial<InferInput<S>>, P>) => unknown; };
161
+ emit: any & ((event: "update:modelValue", value: Partial<InferInput<S>> | undefined) => void);
162
+ }>) => import("vue").VNode & {
163
+ __ctx?: Awaited<typeof __VLS_setup>;
164
+ };
165
+ declare const _default: typeof __VLS_export;
166
+ export default _default;
167
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
168
+ [K in keyof T]: T[K];
169
+ } : {
170
+ [K in keyof T as K]: T[K];
171
+ }) & {};