@movk/nuxt 1.3.0 → 1.3.1

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.
package/.nuxt/movk-ui.css CHANGED
@@ -1,3 +1,3 @@
1
- @source "/Users/yixuanmiao/MOVK/movk-nuxt/**/*";
1
+ @source "/Users/yixuanmiao/Projects/movk-nuxt/**/*";
2
2
  @source "./movk-ui";
3
3
  @source inline("{,sm:,md:,lg:,xl:}grid-cols-{1,2,3,4,5,6,7,8,9,10,11,12}");
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movk/nuxt",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "configKey": "movk",
5
5
  "compatibility": {
6
6
  "nuxt": ">=4.4.2"
package/dist/module.mjs CHANGED
@@ -9,7 +9,7 @@ export * from '../dist/runtime/types/index.js';
9
9
  import 'node:url';
10
10
 
11
11
  const name = "@movk/nuxt";
12
- const version = "1.3.0";
12
+ const version = "1.3.1";
13
13
 
14
14
  function getDefaultApiConfig(apiConfig) {
15
15
  const publicEndpoints = {};
@@ -4,7 +4,7 @@ import { computed, onMounted, ref, toRaw, unref, useAttrs, useTemplateRef } from
4
4
  import { deepClone, isFunction } from "@movk/core";
5
5
  import { useAutoFormProvider } from "../domains/auto-form/provider";
6
6
  import { applyFieldDefaults, classifyFields } from "../domains/auto-form/fields";
7
- import { extractPureSchema, introspectSchema } from "../domains/auto-form/schema";
7
+ import { extractPureSchema, introspectSchema, omitFields } from "../domains/auto-form/schema";
8
8
  import { DEFAULT_CONTROLS } from "../domains/auto-form/controls";
9
9
  import AutoFormRendererChildren from "../domains/auto-form/components/Children.vue";
10
10
  import AutoFormRendererField from "../domains/auto-form/components/Field.vue";
@@ -38,7 +38,6 @@ const resolvedButtonSize = computed(() => {
38
38
  if (size === void 0 || isFunction(size)) return void 0;
39
39
  return unref(size);
40
40
  });
41
- const pureSchema = computed(() => props.schema ? extractPureSchema(props.schema) : props.schema);
42
41
  const controlsMapping = computed(() => ({ ...DEFAULT_CONTROLS, ...props.controls }));
43
42
  const fields = computed(() => props.schema ? introspectSchema(props.schema, controlsMapping.value, "", props.globalMeta) : []);
44
43
  const visibleFields = computed(
@@ -46,6 +45,12 @@ const visibleFields = computed(
46
45
  (field) => field && (field.meta?.if === void 0 || resolveFieldProp(field, "if") === true)
47
46
  )
48
47
  );
48
+ const pureSchema = computed(() => {
49
+ if (!props.schema) return props.schema;
50
+ const base = extractPureSchema(props.schema);
51
+ const hiddenKeys = fields.value.filter((field) => field?.meta?.if !== void 0 && resolveFieldProp(field, "if") !== true).map((field) => field.path);
52
+ return omitFields(base, hiddenKeys);
53
+ });
49
54
  const renderData = computed(() => {
50
55
  if (!fields.value.length) return null;
51
56
  const classified = classifyFields(visibleFields.value);
@@ -20,10 +20,12 @@ import {
20
20
  isToday,
21
21
  parseDate,
22
22
  parseDateTime,
23
- parseZonedDateTime
23
+ parseZonedDateTime,
24
+ parseAbsolute
24
25
  } from "@internationalized/date";
25
26
  const DEFAULT_LOCALE = "zh-CN";
26
27
  const DEFAULT_FORMAT_OPTIONS = { dateStyle: "medium" };
28
+ const ABSOLUTE_RE = /(?:Z|[+-]\d{2}:?\d{2})$/;
27
29
  function safe(fn, fallback) {
28
30
  try {
29
31
  return fn();
@@ -138,10 +140,10 @@ export function useDateFormatter(options = {}) {
138
140
  }
139
141
  function parse(value) {
140
142
  try {
141
- if (value.includes("T")) {
142
- return value.includes("[") ? parseZonedDateTime(value) : parseDateTime(value);
143
- }
144
- return parseDate(value);
143
+ if (!value.includes("T")) return parseDate(value);
144
+ if (value.includes("[")) return parseZonedDateTime(value);
145
+ if (ABSOLUTE_RE.test(value)) return parseAbsolute(value, timeZone);
146
+ return parseDateTime(value);
145
147
  } catch {
146
148
  return null;
147
149
  }
@@ -1,5 +1,6 @@
1
+ type IconSet = 'lucide' | 'phosphor' | 'tabler';
1
2
  export declare function useTheme(): {
2
- color: import("vue").ComputedRef<any>;
3
+ color: import("vue").ComputedRef<string>;
3
4
  style: {
4
5
  innerHTML: import("vue").ComputedRef<string>;
5
6
  id: string;
@@ -7,30 +8,30 @@ export declare function useTheme(): {
7
8
  }[];
8
9
  link: import("vue").ComputedRef<{
9
10
  rel: "stylesheet";
10
- href: any;
11
+ href: string;
11
12
  id: string;
12
13
  }[]>;
13
- neutralColors: any;
14
- neutral: import("vue").WritableComputedRef<any, any>;
14
+ neutralColors: string[];
15
+ neutral: import("vue").WritableComputedRef<string, string>;
15
16
  primaryColors: string[];
16
- primary: import("vue").WritableComputedRef<any, any>;
17
+ primary: import("vue").WritableComputedRef<string, string>;
17
18
  blackAsPrimary: import("vue").ComputedRef<boolean>;
18
19
  setBlackAsPrimary: (value: boolean) => void;
19
- radiuses: any;
20
- radius: import("vue").WritableComputedRef<any, any>;
21
- fonts: any;
22
- font: import("vue").WritableComputedRef<any, any>;
23
- icon: import("vue").WritableComputedRef<any, any>;
20
+ radiuses: number[];
21
+ radius: import("vue").WritableComputedRef<number, number>;
22
+ fonts: string[];
23
+ font: import("vue").WritableComputedRef<string, string>;
24
+ icon: import("vue").WritableComputedRef<IconSet, IconSet>;
24
25
  icons: {
25
26
  label: string;
26
27
  icon: string;
27
- value: string;
28
+ value: IconSet;
28
29
  }[];
29
30
  modes: import("vue").ComputedRef<{
30
31
  label: string;
31
32
  icon: any;
32
33
  }[]>;
33
- mode: import("vue").WritableComputedRef<any, any>;
34
+ mode: import("vue").WritableComputedRef<string, string>;
34
35
  hasCSSChanges: import("vue").ComputedRef<boolean>;
35
36
  hasConfigChanges: import("vue").ComputedRef<boolean>;
36
37
  configLabel: string;
@@ -38,3 +39,4 @@ export declare function useTheme(): {
38
39
  exportConfig: () => string;
39
40
  resetTheme: () => void;
40
41
  };
42
+ export {};
@@ -9,15 +9,403 @@ declare const DEFAULT_CONTROL_COMPONENTS: {
9
9
  readonly boolean: any;
10
10
  readonly enum: any;
11
11
  readonly file: any;
12
- readonly calendarDate: any;
12
+ readonly calendarDate: IsComponent;
13
13
  readonly inputDate: any;
14
14
  readonly inputTime: any;
15
- readonly withClear: any;
16
- readonly withPasswordToggle: any;
17
- readonly withCopy: any;
18
- readonly withCharacterLimit: any;
19
- readonly withFloatingLabel: any;
20
- readonly asPhoneNumberInput: any;
15
+ readonly withClear: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
16
+ slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
17
+ attrs: any;
18
+ emit: (((evt: "clear") => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
19
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
20
+ props: import("vue").PublicProps & {
21
+ buttonProps?: import("@nuxt/ui").ButtonProps | undefined;
22
+ ui?: (Record<string, import("tailwind-variants").ClassValue> & {
23
+ [x: string]: import("tailwind-variants").ClassValue;
24
+ }) | undefined;
25
+ as?: any;
26
+ id?: string | undefined;
27
+ name?: string | undefined;
28
+ type?: import("vue").InputTypeHTMLAttribute | undefined;
29
+ placeholder?: string | undefined;
30
+ color?: (string | number | symbol) | undefined;
31
+ variant?: (string | number | symbol) | undefined;
32
+ size?: (string | number | symbol) | undefined;
33
+ required?: boolean | undefined;
34
+ autocomplete?: (string & {}) | "on" | "off" | undefined;
35
+ autofocus?: boolean | undefined;
36
+ autofocusDelay?: number | undefined;
37
+ disabled?: boolean | undefined;
38
+ highlight?: boolean | undefined;
39
+ fixed?: boolean | undefined;
40
+ defaultValue?: T | undefined;
41
+ modelModifiers?: import("@nuxt/ui").ModelModifiers | undefined;
42
+ class?: any;
43
+ icon?: import("@nuxt/ui").IconProps["name"];
44
+ avatar?: import("@nuxt/ui").AvatarProps | undefined;
45
+ leading?: boolean | undefined;
46
+ leadingIcon?: import("@nuxt/ui").IconProps["name"];
47
+ trailing?: boolean | undefined;
48
+ trailingIcon?: import("@nuxt/ui").IconProps["name"];
49
+ loading?: boolean | undefined;
50
+ loadingIcon?: import("@nuxt/ui").IconProps["name"];
51
+ form?: string | undefined | undefined;
52
+ formaction?: string | undefined | undefined;
53
+ formenctype?: string | undefined | undefined;
54
+ formmethod?: string | undefined | undefined;
55
+ formnovalidate?: (boolean | "true" | "false") | undefined;
56
+ formtarget?: string | undefined | undefined;
57
+ readonly?: (boolean | "true" | "false") | undefined;
58
+ enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
59
+ list?: string | undefined | undefined;
60
+ max?: (string | number) | undefined;
61
+ maxlength?: (string | number) | undefined;
62
+ min?: (string | number) | undefined;
63
+ minlength?: (string | number) | undefined;
64
+ pattern?: string | undefined | undefined;
65
+ step?: (string | number) | undefined;
66
+ modelValue?: T | undefined;
67
+ onClear?: (() => any) | undefined;
68
+ onBlur?: ((event: FocusEvent) => any) | undefined;
69
+ onChange?: ((event: Event) => any) | undefined;
70
+ "onUpdate:modelValue"?: ((value: T | undefined) => any) | undefined;
71
+ } & (typeof globalThis extends {
72
+ __VLS_PROPS_FALLBACK: infer P;
73
+ } ? P : {});
74
+ expose: (exposed: {}) => void;
75
+ attrs: any;
76
+ slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
77
+ emit: (((evt: "clear") => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
78
+ }>) => import("vue").VNode & {
79
+ __ctx?: Awaited<typeof __VLS_setup>;
80
+ };
81
+ readonly withPasswordToggle: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
82
+ slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
83
+ attrs: any;
84
+ emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
85
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
86
+ props: import("vue").PublicProps & {
87
+ buttonProps?: import("@nuxt/ui").ButtonProps | undefined;
88
+ ui?: (Record<string, import("tailwind-variants").ClassValue> & {
89
+ [x: string]: import("tailwind-variants").ClassValue;
90
+ }) | undefined;
91
+ as?: any;
92
+ id?: string | undefined;
93
+ name?: string | undefined;
94
+ placeholder?: string | undefined;
95
+ color?: (string | number | symbol) | undefined;
96
+ variant?: (string | number | symbol) | undefined;
97
+ size?: (string | number | symbol) | undefined;
98
+ required?: boolean | undefined;
99
+ autocomplete?: (string & {}) | "on" | "off" | undefined;
100
+ autofocus?: boolean | undefined;
101
+ autofocusDelay?: number | undefined;
102
+ disabled?: boolean | undefined;
103
+ highlight?: boolean | undefined;
104
+ fixed?: boolean | undefined;
105
+ defaultValue?: T | undefined;
106
+ modelModifiers?: import("@nuxt/ui").ModelModifiers | undefined;
107
+ class?: any;
108
+ icon?: import("@nuxt/ui").IconProps["name"];
109
+ avatar?: import("@nuxt/ui").AvatarProps | undefined;
110
+ leading?: boolean | undefined;
111
+ leadingIcon?: import("@nuxt/ui").IconProps["name"];
112
+ trailing?: boolean | undefined;
113
+ trailingIcon?: import("@nuxt/ui").IconProps["name"];
114
+ loading?: boolean | undefined;
115
+ loadingIcon?: import("@nuxt/ui").IconProps["name"];
116
+ form?: string | undefined | undefined;
117
+ formaction?: string | undefined | undefined;
118
+ formenctype?: string | undefined | undefined;
119
+ formmethod?: string | undefined | undefined;
120
+ formnovalidate?: (boolean | "true" | "false") | undefined;
121
+ formtarget?: string | undefined | undefined;
122
+ readonly?: (boolean | "true" | "false") | undefined;
123
+ enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
124
+ list?: string | undefined | undefined;
125
+ max?: (string | number) | undefined;
126
+ maxlength?: (string | number) | undefined;
127
+ min?: (string | number) | undefined;
128
+ minlength?: (string | number) | undefined;
129
+ pattern?: string | undefined | undefined;
130
+ step?: (string | number) | undefined;
131
+ modelValue?: T | undefined;
132
+ onBlur?: ((event: FocusEvent) => any) | undefined;
133
+ onChange?: ((event: Event) => any) | undefined;
134
+ "onUpdate:modelValue"?: ((value: T | undefined) => any) | undefined;
135
+ } & (typeof globalThis extends {
136
+ __VLS_PROPS_FALLBACK: infer P;
137
+ } ? P : {});
138
+ expose: (exposed: {}) => void;
139
+ attrs: any;
140
+ slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
141
+ emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
142
+ }>) => import("vue").VNode & {
143
+ __ctx?: Awaited<typeof __VLS_setup>;
144
+ };
145
+ readonly withCopy: <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: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "copy", value: string) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
149
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
150
+ props: import("vue").PublicProps & {
151
+ buttonProps?: import("@nuxt/ui").ButtonProps | undefined;
152
+ tooltipProps?: import("@nuxt/ui").TooltipProps | undefined;
153
+ ui?: (Record<string, import("tailwind-variants").ClassValue> & {
154
+ [x: string]: import("tailwind-variants").ClassValue;
155
+ }) | undefined;
156
+ as?: any;
157
+ id?: string | undefined;
158
+ name?: string | undefined;
159
+ type?: import("vue").InputTypeHTMLAttribute | undefined;
160
+ placeholder?: string | undefined;
161
+ color?: (string | number | symbol) | undefined;
162
+ variant?: (string | number | symbol) | undefined;
163
+ size?: (string | number | symbol) | undefined;
164
+ required?: boolean | undefined;
165
+ autocomplete?: (string & {}) | "on" | "off" | undefined;
166
+ autofocus?: boolean | undefined;
167
+ autofocusDelay?: number | undefined;
168
+ disabled?: boolean | undefined;
169
+ highlight?: boolean | undefined;
170
+ fixed?: boolean | undefined;
171
+ defaultValue?: T | undefined;
172
+ modelModifiers?: import("@nuxt/ui").ModelModifiers | undefined;
173
+ class?: any;
174
+ icon?: import("@nuxt/ui").IconProps["name"];
175
+ avatar?: import("@nuxt/ui").AvatarProps | undefined;
176
+ leading?: boolean | undefined;
177
+ leadingIcon?: import("@nuxt/ui").IconProps["name"];
178
+ trailing?: boolean | undefined;
179
+ trailingIcon?: import("@nuxt/ui").IconProps["name"];
180
+ loading?: boolean | undefined;
181
+ loadingIcon?: import("@nuxt/ui").IconProps["name"];
182
+ form?: string | undefined | undefined;
183
+ formaction?: string | undefined | undefined;
184
+ formenctype?: string | undefined | undefined;
185
+ formmethod?: string | undefined | undefined;
186
+ formnovalidate?: (boolean | "true" | "false") | undefined;
187
+ formtarget?: string | undefined | undefined;
188
+ readonly?: (boolean | "true" | "false") | undefined;
189
+ enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
190
+ list?: string | undefined | undefined;
191
+ max?: (string | number) | undefined;
192
+ maxlength?: (string | number) | undefined;
193
+ min?: (string | number) | undefined;
194
+ minlength?: (string | number) | undefined;
195
+ pattern?: string | undefined | undefined;
196
+ step?: (string | number) | undefined;
197
+ modelValue?: T | undefined;
198
+ onBlur?: ((event: FocusEvent) => any) | undefined;
199
+ onChange?: ((event: Event) => any) | undefined;
200
+ onCopy?: ((value: string) => any) | undefined;
201
+ "onUpdate:modelValue"?: ((value: T | undefined) => any) | undefined;
202
+ } & (typeof globalThis extends {
203
+ __VLS_PROPS_FALLBACK: infer P;
204
+ } ? P : {});
205
+ expose: (exposed: {}) => void;
206
+ attrs: any;
207
+ slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
208
+ emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "copy", value: string) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
209
+ }>) => import("vue").VNode & {
210
+ __ctx?: Awaited<typeof __VLS_setup>;
211
+ };
212
+ readonly withCharacterLimit: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
213
+ slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
214
+ attrs: any;
215
+ emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
216
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
217
+ props: import("vue").PublicProps & {
218
+ maxLength?: number | undefined;
219
+ ui?: (Record<string, import("tailwind-variants").ClassValue> & {
220
+ [x: string]: import("tailwind-variants").ClassValue;
221
+ }) | undefined;
222
+ as?: any;
223
+ id?: string | undefined;
224
+ name?: string | undefined;
225
+ type?: import("vue").InputTypeHTMLAttribute | undefined;
226
+ placeholder?: string | undefined;
227
+ color?: (string | number | symbol) | undefined;
228
+ variant?: (string | number | symbol) | undefined;
229
+ size?: (string | number | symbol) | undefined;
230
+ required?: boolean | undefined;
231
+ autocomplete?: (string & {}) | "on" | "off" | undefined;
232
+ autofocus?: boolean | undefined;
233
+ autofocusDelay?: number | undefined;
234
+ disabled?: boolean | undefined;
235
+ highlight?: boolean | undefined;
236
+ fixed?: boolean | undefined;
237
+ defaultValue?: T | undefined;
238
+ modelModifiers?: import("@nuxt/ui").ModelModifiers | undefined;
239
+ class?: any;
240
+ icon?: import("@nuxt/ui").IconProps["name"];
241
+ avatar?: import("@nuxt/ui").AvatarProps | undefined;
242
+ leading?: boolean | undefined;
243
+ leadingIcon?: import("@nuxt/ui").IconProps["name"];
244
+ trailing?: boolean | undefined;
245
+ trailingIcon?: import("@nuxt/ui").IconProps["name"];
246
+ loading?: boolean | undefined;
247
+ loadingIcon?: import("@nuxt/ui").IconProps["name"];
248
+ form?: string | undefined | undefined;
249
+ formaction?: string | undefined | undefined;
250
+ formenctype?: string | undefined | undefined;
251
+ formmethod?: string | undefined | undefined;
252
+ formnovalidate?: (boolean | "true" | "false") | undefined;
253
+ formtarget?: string | undefined | undefined;
254
+ readonly?: (boolean | "true" | "false") | undefined;
255
+ enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
256
+ list?: string | undefined | undefined;
257
+ max?: (string | number) | undefined;
258
+ maxlength?: (string | number) | undefined;
259
+ min?: (string | number) | undefined;
260
+ minlength?: (string | number) | undefined;
261
+ pattern?: string | undefined | undefined;
262
+ step?: (string | number) | undefined;
263
+ modelValue?: T | undefined;
264
+ onBlur?: ((event: FocusEvent) => any) | undefined;
265
+ onChange?: ((event: Event) => any) | undefined;
266
+ "onUpdate:modelValue"?: ((value: T | undefined) => any) | undefined;
267
+ } & (typeof globalThis extends {
268
+ __VLS_PROPS_FALLBACK: infer P;
269
+ } ? P : {});
270
+ expose: (exposed: {}) => void;
271
+ attrs: any;
272
+ slots: import("@movk/core").OmitByKey<InputSlots, "trailing">;
273
+ emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
274
+ }>) => import("vue").VNode & {
275
+ __ctx?: Awaited<typeof __VLS_setup>;
276
+ };
277
+ readonly withFloatingLabel: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
278
+ slots: import("@movk/core").OmitByKey<InputSlots, "default" | "trailing">;
279
+ attrs: any;
280
+ emit: (((evt: "clear") => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
281
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
282
+ props: import("vue").PublicProps & {
283
+ label?: string | undefined;
284
+ size?: string | number | symbol | undefined;
285
+ clearButtonProps?: import("@nuxt/ui").ButtonProps | undefined;
286
+ ui?: (Record<string, import("tailwind-variants").ClassValue> & {
287
+ [x: string]: import("tailwind-variants").ClassValue;
288
+ }) | undefined;
289
+ as?: any;
290
+ id?: string | undefined;
291
+ name?: string | undefined;
292
+ type?: import("vue").InputTypeHTMLAttribute | undefined;
293
+ placeholder?: string | undefined;
294
+ color?: (string | number | symbol) | undefined;
295
+ variant?: (string | number | symbol) | undefined;
296
+ required?: boolean | undefined;
297
+ autocomplete?: (string & {}) | "on" | "off" | undefined;
298
+ autofocus?: boolean | undefined;
299
+ autofocusDelay?: number | undefined;
300
+ disabled?: boolean | undefined;
301
+ highlight?: boolean | undefined;
302
+ fixed?: boolean | undefined;
303
+ defaultValue?: T | undefined;
304
+ modelModifiers?: import("@nuxt/ui").ModelModifiers | undefined;
305
+ class?: any;
306
+ icon?: import("@nuxt/ui").IconProps["name"];
307
+ avatar?: import("@nuxt/ui").AvatarProps | undefined;
308
+ leading?: boolean | undefined;
309
+ leadingIcon?: import("@nuxt/ui").IconProps["name"];
310
+ trailing?: boolean | undefined;
311
+ trailingIcon?: import("@nuxt/ui").IconProps["name"];
312
+ loading?: boolean | undefined;
313
+ loadingIcon?: import("@nuxt/ui").IconProps["name"];
314
+ form?: string | undefined | undefined;
315
+ formaction?: string | undefined | undefined;
316
+ formenctype?: string | undefined | undefined;
317
+ formmethod?: string | undefined | undefined;
318
+ formnovalidate?: (boolean | "true" | "false") | undefined;
319
+ formtarget?: string | undefined | undefined;
320
+ readonly?: (boolean | "true" | "false") | undefined;
321
+ enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
322
+ list?: string | undefined | undefined;
323
+ max?: (string | number) | undefined;
324
+ maxlength?: (string | number) | undefined;
325
+ min?: (string | number) | undefined;
326
+ minlength?: (string | number) | undefined;
327
+ pattern?: string | undefined | undefined;
328
+ step?: (string | number) | undefined;
329
+ modelValue?: T | undefined;
330
+ onClear?: (() => any) | undefined;
331
+ onBlur?: ((event: FocusEvent) => any) | undefined;
332
+ onChange?: ((event: Event) => any) | undefined;
333
+ "onUpdate:modelValue"?: ((value: T | undefined) => any) | undefined;
334
+ } & (typeof globalThis extends {
335
+ __VLS_PROPS_FALLBACK: infer P;
336
+ } ? P : {});
337
+ expose: (exposed: {}) => void;
338
+ attrs: any;
339
+ slots: import("@movk/core").OmitByKey<InputSlots, "default" | "trailing">;
340
+ emit: (((evt: "clear") => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
341
+ }>) => import("vue").VNode & {
342
+ __ctx?: Awaited<typeof __VLS_setup>;
343
+ };
344
+ readonly asPhoneNumberInput: <T extends import("@nuxt/ui").InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
345
+ slots: import("@movk/core").OmitByKey<InputSlots, "leading">;
346
+ attrs: any;
347
+ emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
348
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
349
+ props: import("vue").PublicProps & {
350
+ mask?: string | undefined;
351
+ dialCode?: string | undefined;
352
+ ui?: (Record<string, import("tailwind-variants").ClassValue> & {
353
+ [x: string]: import("tailwind-variants").ClassValue;
354
+ }) | undefined;
355
+ as?: any;
356
+ id?: string | undefined;
357
+ name?: string | undefined;
358
+ placeholder?: string | undefined;
359
+ color?: (string | number | symbol) | undefined;
360
+ variant?: (string | number | symbol) | undefined;
361
+ size?: (string | number | symbol) | undefined;
362
+ required?: boolean | undefined;
363
+ autocomplete?: (string & {}) | "on" | "off" | undefined;
364
+ autofocus?: boolean | undefined;
365
+ autofocusDelay?: number | undefined;
366
+ disabled?: boolean | undefined;
367
+ highlight?: boolean | undefined;
368
+ fixed?: boolean | undefined;
369
+ defaultValue?: T | undefined;
370
+ modelModifiers?: import("@nuxt/ui").ModelModifiers | undefined;
371
+ class?: any;
372
+ icon?: import("@nuxt/ui").IconProps["name"];
373
+ avatar?: import("@nuxt/ui").AvatarProps | undefined;
374
+ leading?: boolean | undefined;
375
+ leadingIcon?: import("@nuxt/ui").IconProps["name"];
376
+ trailing?: boolean | undefined;
377
+ trailingIcon?: import("@nuxt/ui").IconProps["name"];
378
+ loading?: boolean | undefined;
379
+ loadingIcon?: import("@nuxt/ui").IconProps["name"];
380
+ form?: string | undefined | undefined;
381
+ formaction?: string | undefined | undefined;
382
+ formenctype?: string | undefined | undefined;
383
+ formmethod?: string | undefined | undefined;
384
+ formnovalidate?: (boolean | "true" | "false") | undefined;
385
+ formtarget?: string | undefined | undefined;
386
+ readonly?: (boolean | "true" | "false") | undefined;
387
+ enterKeyHint?: "search" | "done" | "enter" | "go" | "next" | "previous" | "send" | undefined;
388
+ list?: string | undefined | undefined;
389
+ max?: (string | number) | undefined;
390
+ maxlength?: (string | number) | undefined;
391
+ min?: (string | number) | undefined;
392
+ minlength?: (string | number) | undefined;
393
+ pattern?: string | undefined | undefined;
394
+ step?: (string | number) | undefined;
395
+ modelValue?: T | undefined;
396
+ onBlur?: ((event: FocusEvent) => any) | undefined;
397
+ onChange?: ((event: Event) => any) | undefined;
398
+ "onUpdate:modelValue"?: ((value: T | undefined) => any) | undefined;
399
+ } & (typeof globalThis extends {
400
+ __VLS_PROPS_FALLBACK: infer P;
401
+ } ? P : {});
402
+ expose: (exposed: {}) => void;
403
+ attrs: any;
404
+ slots: import("@movk/core").OmitByKey<InputSlots, "leading">;
405
+ emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void)) & ((event: "update:modelValue", value: T | undefined) => void);
406
+ }>) => import("vue").VNode & {
407
+ __ctx?: Awaited<typeof __VLS_setup>;
408
+ };
21
409
  readonly textarea: any;
22
410
  readonly switch: any;
23
411
  readonly slider: any;
@@ -28,10 +416,262 @@ declare const DEFAULT_CONTROL_COMPONENTS: {
28
416
  readonly inputTags: any;
29
417
  readonly pinInput: any;
30
418
  readonly listbox: any;
31
- readonly starRating: any;
32
- readonly colorChooser: any;
33
- readonly slideVerify: any;
34
- readonly pillGroup: any;
419
+ readonly starRating: {
420
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../../types").StarRatingProps & {
421
+ ui?: import("@nuxt/ui").ComponentConfig<typeof UInput, import("@nuxt/schema").AppConfig, "starRating">["slots"];
422
+ } & {
423
+ modelValue?: number;
424
+ }> & Readonly<{
425
+ onChange?: ((value: number) => any) | undefined;
426
+ onHover?: ((value: number | null) => any) | undefined;
427
+ "onUpdate:modelValue"?: ((value: number) => any) | undefined;
428
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
429
+ change: (value: number) => any;
430
+ hover: (value: number | null) => any;
431
+ "update:modelValue": (value: number) => any;
432
+ }, import("vue").PublicProps, {
433
+ max: number;
434
+ showBadge: boolean;
435
+ emptyIcon: import("@nuxt/ui").IconProps["name"];
436
+ filledIcon: import("@nuxt/ui").IconProps["name"];
437
+ halfIcon: import("@nuxt/ui").IconProps["name"];
438
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
439
+ P: {};
440
+ B: {};
441
+ D: {};
442
+ C: {};
443
+ M: {};
444
+ Defaults: {};
445
+ }, Readonly<import("../../types").StarRatingProps & {
446
+ ui?: import("@nuxt/ui").ComponentConfig<typeof UInput, import("@nuxt/schema").AppConfig, "starRating">["slots"];
447
+ } & {
448
+ modelValue?: number;
449
+ }> & Readonly<{
450
+ onChange?: ((value: number) => any) | undefined;
451
+ onHover?: ((value: number | null) => any) | undefined;
452
+ "onUpdate:modelValue"?: ((value: number) => any) | undefined;
453
+ }>, {}, {}, {}, {}, {
454
+ max: number;
455
+ showBadge: boolean;
456
+ emptyIcon: import("@nuxt/ui").IconProps["name"];
457
+ filledIcon: import("@nuxt/ui").IconProps["name"];
458
+ halfIcon: import("@nuxt/ui").IconProps["name"];
459
+ }>;
460
+ __isFragment?: never;
461
+ __isTeleport?: never;
462
+ __isSuspense?: never;
463
+ } & import("vue").ComponentOptionsBase<Readonly<import("../../types").StarRatingProps & {
464
+ ui?: import("@nuxt/ui").ComponentConfig<typeof UInput, import("@nuxt/schema").AppConfig, "starRating">["slots"];
465
+ } & {
466
+ modelValue?: number;
467
+ }> & Readonly<{
468
+ onChange?: ((value: number) => any) | undefined;
469
+ onHover?: ((value: number | null) => any) | undefined;
470
+ "onUpdate:modelValue"?: ((value: number) => any) | undefined;
471
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
472
+ change: (value: number) => any;
473
+ hover: (value: number | null) => any;
474
+ "update:modelValue": (value: number) => any;
475
+ }, string, {
476
+ max: number;
477
+ showBadge: boolean;
478
+ emptyIcon: import("@nuxt/ui").IconProps["name"];
479
+ filledIcon: import("@nuxt/ui").IconProps["name"];
480
+ halfIcon: import("@nuxt/ui").IconProps["name"];
481
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
482
+ $slots: {
483
+ prefix?: (props: {
484
+ value: number;
485
+ max: number;
486
+ }) => any;
487
+ } & {
488
+ badge?: (props: {
489
+ value: number;
490
+ max: number;
491
+ label: string;
492
+ }) => any;
493
+ } & {
494
+ suffix?: (props: {
495
+ value: number;
496
+ max: number;
497
+ }) => any;
498
+ };
499
+ });
500
+ readonly colorChooser: <M extends "click" | "hover">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
501
+ slots: import("../../types").ColorChooserSlots;
502
+ attrs: any;
503
+ emit: (((evt: "clear") => void) & ((evt: "change", value: string | undefined) => void) & ((evt: "copy", value: string) => void) & ((evt: "update:open", open: boolean) => void) & ((evt: "update:modelValue", value: string | undefined) => void) & ((evt: "format-change", format: import("../../types").ColorFormat) => void)) & ((event: "update:modelValue", value: string | undefined) => void);
504
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
505
+ props: import("vue").PublicProps & {
506
+ id?: string | undefined;
507
+ name?: string | undefined;
508
+ format?: import("../../types").ColorFormat | undefined;
509
+ formats?: import("../../types").ColorFormat[] | undefined;
510
+ swatches?: string[] | string[][] | undefined;
511
+ closeOnSwatch?: boolean | undefined;
512
+ clearable?: boolean | undefined;
513
+ copyable?: boolean | undefined;
514
+ trigger?: "input" | "button" | "chip" | undefined;
515
+ label?: string | undefined;
516
+ placeholder?: string | undefined;
517
+ size?: string | number | symbol | undefined;
518
+ color?: string | number | symbol | undefined;
519
+ variant?: string | number | symbol | undefined;
520
+ disabled?: boolean | undefined;
521
+ highlight?: boolean | undefined;
522
+ icon?: import("@nuxt/ui").IconProps["name"];
523
+ colorPickerProps?: Omit<import("@nuxt/ui").ColorPickerProps, "modelValue" | "format" | "disabled"> | undefined;
524
+ ui?: (Record<string, import("tailwind-variants").ClassValue> & {
525
+ [x: string]: import("tailwind-variants").ClassValue;
526
+ }) | undefined;
527
+ mode?: M | undefined;
528
+ content?: (Omit<import("reka-ui").PopoverContentProps, "as" | "asChild" | "forceMount"> & Partial<import("@nuxt/ui").EmitsToProps<import("reka-ui").PopoverContentEmits>>) | undefined;
529
+ arrow?: (boolean | Omit<import("reka-ui").PopoverArrowProps, "as" | "asChild">) | undefined;
530
+ portal?: (boolean | string | HTMLElement) | undefined;
531
+ reference?: import("reka-ui").ReferenceElement | undefined;
532
+ dismissible?: boolean | undefined;
533
+ class?: any;
534
+ modal?: boolean | undefined;
535
+ openDelay?: number | undefined;
536
+ closeDelay?: number | undefined;
537
+ modelValue?: string | undefined;
538
+ onClear?: (() => any) | undefined;
539
+ onChange?: ((value: string | undefined) => any) | undefined;
540
+ onCopy?: ((value: string) => any) | undefined;
541
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
542
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
543
+ "onFormat-change"?: ((format: import("../../types").ColorFormat) => any) | undefined;
544
+ } & (typeof globalThis extends {
545
+ __VLS_PROPS_FALLBACK: infer P;
546
+ } ? P : {});
547
+ expose: (exposed: {}) => void;
548
+ attrs: any;
549
+ slots: import("../../types").ColorChooserSlots;
550
+ emit: (((evt: "clear") => void) & ((evt: "change", value: string | undefined) => void) & ((evt: "copy", value: string) => void) & ((evt: "update:open", open: boolean) => void) & ((evt: "update:modelValue", value: string | undefined) => void) & ((evt: "format-change", format: import("../../types").ColorFormat) => void)) & ((event: "update:modelValue", value: string | undefined) => void);
551
+ }>) => import("vue").VNode & {
552
+ __ctx?: Awaited<typeof __VLS_setup>;
553
+ };
554
+ readonly slideVerify: {
555
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../../types").SlideVerifyProps & {
556
+ size?: import("@nuxt/ui").ComponentConfig<typeof UInput, import("@nuxt/schema").AppConfig, "slideVerify">["variants"]["size"];
557
+ ui?: import("@nuxt/ui").ComponentConfig<typeof UInput, import("@nuxt/schema").AppConfig, "slideVerify">["slots"];
558
+ } & {
559
+ modelValue?: boolean;
560
+ }> & Readonly<{
561
+ onSuccess?: (() => any) | undefined;
562
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
563
+ onDragStart?: (() => any) | undefined;
564
+ onDragEnd?: ((success: boolean) => any) | undefined;
565
+ }>, {
566
+ reset: () => void;
567
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
568
+ success: () => any;
569
+ "update:modelValue": (value: boolean) => any;
570
+ dragStart: () => any;
571
+ dragEnd: (success: boolean) => any;
572
+ }, import("vue").PublicProps, {
573
+ icon: import("@nuxt/ui").IconProps["name"];
574
+ text: string;
575
+ successText: string;
576
+ successIcon: import("@nuxt/ui").IconProps["name"];
577
+ threshold: number;
578
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
579
+ P: {};
580
+ B: {};
581
+ D: {};
582
+ C: {};
583
+ M: {};
584
+ Defaults: {};
585
+ }, Readonly<import("../../types").SlideVerifyProps & {
586
+ size?: import("@nuxt/ui").ComponentConfig<typeof UInput, import("@nuxt/schema").AppConfig, "slideVerify">["variants"]["size"];
587
+ ui?: import("@nuxt/ui").ComponentConfig<typeof UInput, import("@nuxt/schema").AppConfig, "slideVerify">["slots"];
588
+ } & {
589
+ modelValue?: boolean;
590
+ }> & Readonly<{
591
+ onSuccess?: (() => any) | undefined;
592
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
593
+ onDragStart?: (() => any) | undefined;
594
+ onDragEnd?: ((success: boolean) => any) | undefined;
595
+ }>, {
596
+ reset: () => void;
597
+ }, {}, {}, {}, {
598
+ icon: import("@nuxt/ui").IconProps["name"];
599
+ text: string;
600
+ successText: string;
601
+ successIcon: import("@nuxt/ui").IconProps["name"];
602
+ threshold: number;
603
+ }>;
604
+ __isFragment?: never;
605
+ __isTeleport?: never;
606
+ __isSuspense?: never;
607
+ } & import("vue").ComponentOptionsBase<Readonly<import("../../types").SlideVerifyProps & {
608
+ size?: import("@nuxt/ui").ComponentConfig<typeof UInput, import("@nuxt/schema").AppConfig, "slideVerify">["variants"]["size"];
609
+ ui?: import("@nuxt/ui").ComponentConfig<typeof UInput, import("@nuxt/schema").AppConfig, "slideVerify">["slots"];
610
+ } & {
611
+ modelValue?: boolean;
612
+ }> & Readonly<{
613
+ onSuccess?: (() => any) | undefined;
614
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
615
+ onDragStart?: (() => any) | undefined;
616
+ onDragEnd?: ((success: boolean) => any) | undefined;
617
+ }>, {
618
+ reset: () => void;
619
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
620
+ success: () => any;
621
+ "update:modelValue": (value: boolean) => any;
622
+ dragStart: () => any;
623
+ dragEnd: (success: boolean) => any;
624
+ }, string, {
625
+ icon: import("@nuxt/ui").IconProps["name"];
626
+ text: string;
627
+ successText: string;
628
+ successIcon: import("@nuxt/ui").IconProps["name"];
629
+ threshold: number;
630
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
631
+ $slots: import("../../types").SlideVerifySlots;
632
+ });
633
+ readonly pillGroup: <T extends import("../../types").PillItem, VK extends import("@nuxt/ui").GetItemKeys<T> | undefined = undefined, M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
634
+ slots: import("../../types").PillGroupSlots<T, VK, M>;
635
+ attrs: any;
636
+ emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", value: import("@nuxt/ui").GetModelValue<T, VK, M, undefined>) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "select", payload: import("../../types").PillSelectPayload<T>) => void) & ((evt: "update:modelValue", value: import("@nuxt/ui").GetModelValue<T, VK, M, undefined>) => void)) & ((event: "update:modelValue", value: import("@nuxt/ui").GetModelValue<T, VK, M> | undefined) => void);
637
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
638
+ props: import("vue").PublicProps & {
639
+ items?: T[] | undefined;
640
+ valueKey?: VK | undefined;
641
+ labelKey?: import("@nuxt/ui").GetItemKeys<T> | undefined;
642
+ descriptionKey?: import("@nuxt/ui").GetItemKeys<T> | undefined;
643
+ by?: string | ((a: T, b: T) => boolean) | undefined;
644
+ orientation?: "horizontal" | "vertical" | undefined;
645
+ size?: string | number | symbol | undefined;
646
+ color?: string | number | symbol | undefined;
647
+ activeVariant?: string | number | symbol | undefined;
648
+ inactiveVariant?: string | number | symbol | undefined;
649
+ disabled?: boolean | undefined;
650
+ multiple?: M | undefined;
651
+ deselectable?: boolean | undefined;
652
+ max?: number | undefined;
653
+ min?: number | undefined;
654
+ defaultValue?: import("@nuxt/ui").GetModelValue<T, VK, M, undefined> | undefined;
655
+ modelValue?: (import("@nuxt/ui").GetModelValue<T, VK, M, undefined> & import("@nuxt/ui").GetModelValue<T, VK, M>) | undefined;
656
+ class?: import("tailwind-variants").ClassValue;
657
+ ui?: (Record<string, import("tailwind-variants").ClassValue> & {
658
+ [x: string]: import("tailwind-variants").ClassValue;
659
+ }) | undefined;
660
+ onBlur?: ((event: FocusEvent) => any) | undefined;
661
+ onChange?: ((value: import("@nuxt/ui").GetModelValue<T, VK, M, undefined>) => any) | undefined;
662
+ onFocus?: ((event: FocusEvent) => any) | undefined;
663
+ onSelect?: ((payload: import("../../types").PillSelectPayload<T>) => any) | undefined;
664
+ "onUpdate:modelValue"?: ((value: import("@nuxt/ui").GetModelValue<T, VK, M, undefined> | undefined) => any) | undefined;
665
+ } & (typeof globalThis extends {
666
+ __VLS_PROPS_FALLBACK: infer P;
667
+ } ? P : {});
668
+ expose: (exposed: {}) => void;
669
+ attrs: any;
670
+ slots: import("../../types").PillGroupSlots<T, VK, M>;
671
+ emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", value: import("@nuxt/ui").GetModelValue<T, VK, M, undefined>) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "select", payload: import("../../types").PillSelectPayload<T>) => void) & ((evt: "update:modelValue", value: import("@nuxt/ui").GetModelValue<T, VK, M, undefined>) => void)) & ((event: "update:modelValue", value: import("@nuxt/ui").GetModelValue<T, VK, M> | undefined) => void);
672
+ }>) => import("vue").VNode & {
673
+ __ctx?: Awaited<typeof __VLS_setup>;
674
+ };
35
675
  };
36
676
  type DefaultControlComponents = typeof DEFAULT_CONTROL_COMPONENTS;
37
677
  type DefaultControlMap = {
@@ -46,6 +46,7 @@ const DEFAULT_CONTROL_COMPONENTS = {
46
46
  boolean: UCheckbox,
47
47
  enum: USelect,
48
48
  file: UFileUpload,
49
+ // reka-ui 未公开导出 Calendar 相关类型,收宽避免声明发射 TS2883(详见 AGENTS.md)
49
50
  calendarDate: DatePicker,
50
51
  inputDate: UInputDate,
51
52
  inputTime: UInputTime,
@@ -98,9 +98,10 @@ export function useAutoFormProvider(state, slots) {
98
98
  {
99
99
  ...wrappedProps,
100
100
  "onUpdate:modelValue": (v) => {
101
- context.setValue(v);
101
+ const next = v === null && field.decorators?.isOptional ? void 0 : v;
102
+ context.setValue(next);
102
103
  if (typeof userOnUpdate === "function") {
103
- userOnUpdate(v, context);
104
+ userOnUpdate(next, context);
104
105
  }
105
106
  },
106
107
  "modelValue": unref(context.value)
@@ -5,3 +5,8 @@ import type { ZodAutoFormFieldMeta } from '../../types/zod';
5
5
  export declare function introspectSchema(schema: z.ZodType, mapping: AutoFormControls, path: string, globalMeta?: ZodAutoFormFieldMeta): AutoFormField[];
6
6
  /** 将含布局标记的 schema 还原为纯字段 schema,用于 Zod 表单校验 */
7
7
  export declare function extractPureSchema<T extends z.ZodObject<any, any>>(schema: T): z.ZodObject<any, any>;
8
+ /**
9
+ * 从校验 schema 中剔除指定顶层字段。
10
+ * 用于让 meta.if 隐藏的字段不参与校验,使校验集与渲染保持一致。
11
+ */
12
+ export declare function omitFields(schema: z.ZodObject<any, any>, keys: string[]): z.ZodObject<any, any>;
@@ -205,3 +205,16 @@ export function extractPureSchema(schema) {
205
205
  const pureShape = processLayoutShape(shape);
206
206
  return zod.object(pureShape);
207
207
  }
208
+ export function omitFields(schema, keys) {
209
+ const shape = schema.shape;
210
+ if (!shape || typeof shape !== "object") {
211
+ return schema;
212
+ }
213
+ const present = keys.filter((key) => key in shape);
214
+ if (!present.length) {
215
+ return schema;
216
+ }
217
+ const mask = {};
218
+ for (const key of present) mask[key] = true;
219
+ return schema.omit(mask);
220
+ }
@@ -110,10 +110,42 @@ export function renderHeaderActions(ctx, col, options, label, sortable, pinable,
110
110
  if (sortable) actions.push(buildSortAction(col, options));
111
111
  const leading = actions.filter((a) => a.position === "leading").map((a) => a.render(ctx));
112
112
  const trailing = actions.filter((a) => a.position === "trailing").map((a) => a.render(ctx));
113
+ const startResize = (e) => {
114
+ const id = ctx.column.id;
115
+ const seeded = !(id in ctx.table.getState().columnSizing);
116
+ if (seeded) {
117
+ const th = e.currentTarget?.closest("th");
118
+ const w = th ? Math.round(th.getBoundingClientRect().width) : 0;
119
+ if (w > 0) ctx.table.setColumnSizing((prev) => ({ ...prev, [id]: w }));
120
+ }
121
+ ctx.header.getResizeHandler()(e);
122
+ if (!seeded) return;
123
+ const startX = "touches" in e ? e.touches[0]?.clientX ?? 0 : e.clientX;
124
+ let moved = false;
125
+ const onMove = (ev) => {
126
+ const x = "touches" in ev ? ev.touches[0]?.clientX : ev.clientX;
127
+ if (typeof x === "number" && Math.abs(x - startX) > 2) moved = true;
128
+ };
129
+ const onEnd = () => {
130
+ if (!moved) {
131
+ ctx.table.setColumnSizing(
132
+ (prev) => Object.fromEntries(Object.entries(prev).filter(([key]) => key !== id))
133
+ );
134
+ }
135
+ window.removeEventListener("mousemove", onMove);
136
+ window.removeEventListener("mouseup", onEnd);
137
+ window.removeEventListener("touchmove", onMove);
138
+ window.removeEventListener("touchend", onEnd);
139
+ };
140
+ window.addEventListener("mousemove", onMove);
141
+ window.addEventListener("mouseup", onEnd);
142
+ window.addEventListener("touchmove", onMove);
143
+ window.addEventListener("touchend", onEnd);
144
+ };
113
145
  const resizeHandle = resizable ? h("div", {
114
146
  class: "absolute top-0 bottom-0 right-0 w-4 -mr-2 cursor-col-resize select-none touch-none flex items-center justify-center group/resize",
115
- onMousedown: ctx.header.getResizeHandler(),
116
- onTouchstart: ctx.header.getResizeHandler(),
147
+ onMousedown: startResize,
148
+ onTouchstart: startResize,
117
149
  onClick: (e) => e.stopPropagation()
118
150
  }, [
119
151
  h("div", {
@@ -36,7 +36,7 @@ function buildSpecialColumnDef(col, type, ctx, render) {
36
36
  if (col.visibility === false) ctx.visibility[id] = false;
37
37
  ctx.allColumnIds.push(id);
38
38
  const effectivePinable = col.pinable ?? options.pinable === true;
39
- const effectiveResizable = col.resizable ?? options.resizable === true;
39
+ const effectiveResizable = col.resizable ?? false;
40
40
  ctx.flags.hasPinning ||= effectivePinable;
41
41
  ctx.flags.hasResizing ||= effectiveResizable;
42
42
  const effectiveAlign = col.align ?? defaults.align;
@@ -3,9 +3,10 @@ import { resolvePresetSize } from "./utils.js";
3
3
  export function resolveColumnSize(ctx) {
4
4
  const { columnDef } = ctx.column;
5
5
  const table = ctx.getContext().table;
6
- const isPinned = ctx.column.getIsPinned();
7
- const hasMeasuredSize = isPinned && ctx.column.id in table.getState().columnSizing;
8
- if (hasMeasuredSize || columnDef.size != table._getDefaultColumnDef().size || columnDef.enableResizing === true) {
6
+ const isPinned = !!ctx.column.getIsPinned();
7
+ const isSized = ctx.column.id in table.getState().columnSizing;
8
+ const hasExplicitSize = columnDef.size != table._getDefaultColumnDef().size;
9
+ if (isPinned || isSized || hasExplicitSize) {
9
10
  const w = `${ctx.column.getSize()}px`;
10
11
  return { width: w, minWidth: w, maxWidth: w };
11
12
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@movk/nuxt",
3
3
  "type": "module",
4
- "version": "1.3.0",
5
- "packageManager": "pnpm@11.5.2",
4
+ "version": "1.3.1",
5
+ "packageManager": "pnpm@11.7.0",
6
6
  "description": "An engineering suite built on Nuxt UI: schema-driven AutoForm (Zod v4), a full-featured DataTable, standalone UI components and composables. Get the full capabilities — including API integration with auth & progress — in Nuxt 4, and use its UI, forms, tables and theming in plain Vue + Vite via the Vite plugin.",
7
7
  "author": "YiXuan <mhaibaraai@gmail.com>",
8
8
  "license": "MIT",
@@ -107,12 +107,12 @@
107
107
  "scripts": {
108
108
  "prepack": "pnpm build",
109
109
  "build": "nuxt-module-build build",
110
- "dev": "cross-env TMPDIR=/tmp nuxt dev playgrounds/play --uiDev",
110
+ "dev": "nuxt dev playgrounds/play --uiDev",
111
111
  "dev:build": "nuxt build playgrounds/play",
112
112
  "dev:vue": "pnpm --filter './playgrounds/vue' dev",
113
113
  "dev:vue:build": "pnpm --filter './playgrounds/vue' build",
114
114
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playgrounds/play && nuxt prepare docs && pnpm dev:vue:build",
115
- "docs": "cross-env TMPDIR=/tmp nuxt dev docs --uiDev",
115
+ "docs": "nuxt dev docs --uiDev",
116
116
  "docs:build": "nuxt build docs",
117
117
  "release": "release-it && npm publish",
118
118
  "lint": "eslint .",
@@ -123,7 +123,7 @@
123
123
  "test:vue": "vitest --project vue"
124
124
  },
125
125
  "dependencies": {
126
- "@iconify-json/lucide": "^1.2.111",
126
+ "@iconify-json/lucide": "^1.2.113",
127
127
  "@iconify-json/ph": "^1.2.2",
128
128
  "@iconify-json/tabler": "^1.2.35",
129
129
  "@internationalized/date": "^3.12.2",
@@ -139,34 +139,33 @@
139
139
  "maska": "^3.2.0",
140
140
  "mlly": "^1.8.2",
141
141
  "nuxt-auth-utils": "^0.5.29",
142
- "nuxt-site-config": "^4.0.8",
142
+ "nuxt-site-config": "^4.1.0",
143
143
  "pathe": "^2.0.3",
144
144
  "reka-ui": "^2.9.9",
145
145
  "scule": "^1.3.0",
146
146
  "tailwind-variants": "^3.2.2",
147
- "tailwindcss": "^4.3.0",
147
+ "tailwindcss": "^4.3.1",
148
148
  "tinyglobby": "^0.2.17",
149
149
  "unifont": "^0.7.4",
150
150
  "unplugin": "^3.0.0",
151
151
  "zod": "^4.4.3"
152
152
  },
153
153
  "devDependencies": {
154
- "@nuxt/eslint-config": "^1.15.2",
155
- "@nuxt/kit": "^4.4.7",
154
+ "@nuxt/eslint-config": "^1.16.0",
155
+ "@nuxt/kit": "^4.4.8",
156
156
  "@nuxt/module-builder": "^1.0.2",
157
- "@nuxt/schema": "^4.4.7",
157
+ "@nuxt/schema": "^4.4.8",
158
158
  "@release-it/bumper": "^7.0.6",
159
159
  "@release-it/conventional-changelog": "^11.0.1",
160
- "cross-env": "^10.1.0",
161
- "eslint": "^10.4.1",
162
- "happy-dom": "^20.10.1",
163
- "nuxt": "^4.4.7",
160
+ "eslint": "^10.5.0",
161
+ "happy-dom": "^20.10.5",
162
+ "nuxt": "^4.4.8",
164
163
  "typescript": "^6.0.3",
165
164
  "unbuild": "^3.6.1",
166
165
  "unplugin-auto-import": "^21.0.0",
167
166
  "unplugin-vue-components": "^32.1.0",
168
- "vitest": "^4.1.8",
169
- "vue": "^3.5.35",
170
- "vue-tsc": "^3.3.3"
167
+ "vitest": "^4.1.9",
168
+ "vue": "^3.5.38",
169
+ "vue-tsc": "^3.3.5"
171
170
  }
172
171
  }