@movk/nuxt 1.1.1 → 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.
- package/README.md +5 -29
- package/dist/module.d.mts +3 -31
- package/dist/module.json +3 -3
- package/dist/module.mjs +135 -77
- package/dist/runtime/auto-form/controls.d.ts +221 -0
- package/dist/runtime/auto-form/controls.js +70 -0
- package/dist/runtime/{utils → auto-form}/field-utils.d.ts +4 -20
- package/dist/runtime/{utils → auto-form}/field-utils.js +1 -2
- package/dist/runtime/auto-form/metadata.d.ts +22 -0
- package/dist/runtime/auto-form/metadata.js +53 -0
- package/dist/runtime/auto-form/provider.d.ts +27 -0
- package/dist/runtime/{internal/useAutoFormProvider.js → auto-form/provider.js} +1 -1
- package/dist/runtime/{utils → auto-form}/reactive-utils.d.ts +4 -22
- package/dist/runtime/{utils → auto-form}/schema-introspector.d.ts +3 -9
- package/dist/runtime/{utils → auto-form}/schema-introspector.js +11 -9
- package/dist/runtime/components/AutoForm.d.vue.ts +4 -5
- package/dist/runtime/components/AutoForm.vue +12 -35
- package/dist/runtime/components/AutoForm.vue.d.ts +4 -5
- package/dist/runtime/components/ColorChooser.d.vue.ts +10 -6
- package/dist/runtime/components/ColorChooser.vue +4 -7
- package/dist/runtime/components/ColorChooser.vue.d.ts +10 -6
- package/dist/runtime/components/DatePicker.d.vue.ts +16 -10
- package/dist/runtime/components/DatePicker.vue.d.ts +16 -10
- package/dist/runtime/components/SearchForm.d.vue.ts +171 -0
- package/dist/runtime/components/SearchForm.vue +216 -0
- package/dist/runtime/components/SearchForm.vue.d.ts +171 -0
- package/dist/runtime/components/SlideVerify.d.vue.ts +5 -32
- package/dist/runtime/components/SlideVerify.vue +4 -4
- package/dist/runtime/components/SlideVerify.vue.d.ts +5 -32
- package/dist/runtime/components/StarRating.d.vue.ts +8 -16
- package/dist/runtime/components/StarRating.vue +50 -65
- package/dist/runtime/components/StarRating.vue.d.ts +8 -16
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.d.vue.ts +10 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.vue +16 -23
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererArray.vue.d.ts +10 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.d.vue.ts +26 -0
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.vue +50 -0
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererChildren.vue.d.ts +26 -0
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.d.vue.ts +8 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.vue +2 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererField.vue.d.ts +8 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.d.vue.ts +8 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.vue +29 -64
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererLayout.vue.d.ts +8 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.d.vue.ts +8 -2
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.vue +15 -69
- package/dist/runtime/components/auto-form-renderer/AutoFormRendererNested.vue.d.ts +8 -2
- package/dist/runtime/components/input/AsPhoneNumberInput.d.vue.ts +36 -0
- package/dist/runtime/components/input/AsPhoneNumberInput.vue +35 -0
- package/dist/runtime/components/input/AsPhoneNumberInput.vue.d.ts +36 -0
- package/dist/runtime/components/input/WithCharacterLimit.d.vue.ts +17 -9
- package/dist/runtime/components/input/WithCharacterLimit.vue +5 -5
- package/dist/runtime/components/input/WithCharacterLimit.vue.d.ts +17 -9
- package/dist/runtime/components/input/WithClear.d.vue.ts +13 -9
- package/dist/runtime/components/input/WithClear.vue +2 -2
- package/dist/runtime/components/input/WithClear.vue.d.ts +13 -9
- package/dist/runtime/components/input/WithCopy.d.vue.ts +16 -10
- package/dist/runtime/components/input/WithCopy.vue +3 -3
- package/dist/runtime/components/input/WithCopy.vue.d.ts +16 -10
- package/dist/runtime/components/input/WithFloatingLabel.d.vue.ts +36 -0
- package/dist/runtime/components/input/WithFloatingLabel.vue +67 -0
- package/dist/runtime/components/input/WithFloatingLabel.vue.d.ts +36 -0
- package/dist/runtime/components/input/WithPasswordToggle.d.vue.ts +11 -9
- package/dist/runtime/components/input/WithPasswordToggle.vue +3 -3
- package/dist/runtime/components/input/WithPasswordToggle.vue.d.ts +11 -9
- package/dist/runtime/components/theme-picker/ThemePicker.d.vue.ts +1 -1
- package/dist/runtime/components/theme-picker/ThemePicker.vue +19 -25
- package/dist/runtime/components/theme-picker/ThemePicker.vue.d.ts +1 -1
- package/dist/runtime/components/theme-picker/ThemePickerButton.d.vue.ts +1 -7
- package/dist/runtime/components/theme-picker/ThemePickerButton.vue.d.ts +1 -7
- package/dist/runtime/composables/index.d.ts +8 -0
- package/dist/runtime/composables/index.js +8 -0
- package/dist/runtime/composables/useApiFetch.d.ts +17 -14
- package/dist/runtime/composables/useApiFetch.js +3 -28
- package/dist/runtime/composables/useAutoForm.d.ts +14 -98
- package/dist/runtime/composables/useAutoForm.js +37 -157
- package/dist/runtime/composables/useClientApiFetch.d.ts +5 -6
- package/dist/runtime/composables/useDownloadWithProgress.js +5 -6
- package/dist/runtime/composables/useLazyApiFetch.d.ts +18 -0
- package/dist/runtime/composables/useLazyApiFetch.js +4 -0
- package/dist/runtime/composables/useTheme.d.ts +17 -14
- package/dist/runtime/composables/useTheme.js +68 -72
- package/dist/runtime/composables/useUploadWithProgress.d.ts +2 -2
- package/dist/runtime/composables/useUploadWithProgress.js +7 -7
- package/dist/runtime/constants/api-defaults.d.ts +9 -0
- package/dist/runtime/constants/api-defaults.js +32 -0
- package/dist/runtime/constants/auto-form.d.ts +0 -2
- package/dist/runtime/constants/auto-form.js +0 -25
- package/dist/runtime/constants/grid-cols.d.ts +7 -0
- package/dist/runtime/constants/grid-cols.js +44 -0
- package/dist/runtime/plugins/api.factory.js +78 -121
- package/dist/runtime/plugins/theme.js +44 -64
- package/dist/runtime/style.css +1 -1
- package/dist/runtime/types/api.d.ts +277 -146
- package/dist/runtime/types/auto-form.d.ts +122 -411
- package/dist/runtime/types/index.d.ts +3 -2
- package/dist/runtime/types/index.js +3 -2
- package/dist/runtime/types/module.d.ts +96 -0
- package/dist/runtime/types/theme.d.ts +2 -0
- package/dist/runtime/types/zod.d.ts +11 -10
- package/dist/runtime/utils/api-utils.d.ts +27 -48
- package/dist/runtime/utils/api-utils.js +18 -47
- package/dist/runtime/utils/meta.d.ts +7 -0
- package/dist/runtime/utils/meta.js +16 -0
- package/dist/types.d.mts +6 -2
- package/package.json +68 -37
- package/dist/runtime/composables/useApiAuth.d.ts +0 -47
- package/dist/runtime/composables/useApiAuth.js +0 -66
- package/dist/runtime/internal/useAutoFormProvider.d.ts +0 -50
- package/dist/runtime/schemas/api.d.ts +0 -590
- package/dist/runtime/schemas/api.js +0 -228
- package/dist/runtime/server/api/_movk/session.post.d.ts +0 -10
- package/dist/runtime/server/api/_movk/session.post.js +0 -18
- package/dist/runtime/types/auth.d.ts +0 -34
- package/dist/runtime/types/auto-form-renderer.d.ts +0 -22
- package/dist/runtime/types/components.d.ts +0 -43
- package/dist/runtime/utils/auto-form.d.ts +0 -3
- package/dist/runtime/utils/auto-form.js +0 -18
- /package/dist/runtime/{utils → auto-form}/reactive-utils.js +0 -0
- /package/dist/runtime/types/{auto-form-renderer.js → module.js} +0 -0
- /package/dist/runtime/types/{components.js → theme.js} +0 -0
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
export const apiResponseConfigSchema = z.object({
|
|
3
|
-
/**
|
|
4
|
-
* 表示成功的业务状态码列表
|
|
5
|
-
* @defaultValue [200, 0]
|
|
6
|
-
*/
|
|
7
|
-
successCodes: z.array(z.union([z.number(), z.string()])).default([200, 0]),
|
|
8
|
-
/**
|
|
9
|
-
* 响应中业务状态码的字段名
|
|
10
|
-
* @defaultValue 'code'
|
|
11
|
-
*/
|
|
12
|
-
codeKey: z.string().default("code"),
|
|
13
|
-
/**
|
|
14
|
-
* 响应中消息内容的字段名
|
|
15
|
-
* @defaultValue 'message'
|
|
16
|
-
*/
|
|
17
|
-
messageKey: z.string().default("message"),
|
|
18
|
-
/**
|
|
19
|
-
* 响应中业务数据的字段名
|
|
20
|
-
* @defaultValue 'data'
|
|
21
|
-
*/
|
|
22
|
-
dataKey: z.string().default("data")
|
|
23
|
-
});
|
|
24
|
-
export const apiUnauthorizedConfigSchema = z.object({
|
|
25
|
-
/**
|
|
26
|
-
* 是否自动重定向到登录页
|
|
27
|
-
* @defaultValue false
|
|
28
|
-
*/
|
|
29
|
-
redirect: z.boolean().default(false),
|
|
30
|
-
/**
|
|
31
|
-
* 登录页路径
|
|
32
|
-
* @defaultValue '/login'
|
|
33
|
-
*/
|
|
34
|
-
loginPath: z.string().default("/login"),
|
|
35
|
-
/**
|
|
36
|
-
* 是否清除用户会话
|
|
37
|
-
* @defaultValue false
|
|
38
|
-
*/
|
|
39
|
-
clearSession: z.boolean().default(false)
|
|
40
|
-
});
|
|
41
|
-
export const apiAuthConfigSchema = z.object({
|
|
42
|
-
/**
|
|
43
|
-
* 是否启用认证
|
|
44
|
-
* @defaultValue false
|
|
45
|
-
*/
|
|
46
|
-
enabled: z.boolean().default(false),
|
|
47
|
-
/**
|
|
48
|
-
* 令牌来源类型
|
|
49
|
-
* @defaultValue 'session'
|
|
50
|
-
*/
|
|
51
|
-
tokenSource: z.enum(["session", "custom"]).default("session"),
|
|
52
|
-
/**
|
|
53
|
-
* 令牌在会话对象中的路径(支持点号分隔的嵌套路径)
|
|
54
|
-
* @defaultValue 'token'
|
|
55
|
-
*/
|
|
56
|
-
sessionTokenPath: z.string().default("token"),
|
|
57
|
-
/**
|
|
58
|
-
* 令牌类型前缀
|
|
59
|
-
* @defaultValue 'Bearer'
|
|
60
|
-
*/
|
|
61
|
-
tokenType: z.enum(["Bearer", "Basic", "Custom"]).default("Bearer"),
|
|
62
|
-
/** 自定义令牌类型前缀(当 tokenType 为 'Custom' 时使用) */
|
|
63
|
-
customTokenType: z.string().optional(),
|
|
64
|
-
/**
|
|
65
|
-
* 认证请求头名称
|
|
66
|
-
* @defaultValue 'Authorization'
|
|
67
|
-
*/
|
|
68
|
-
headerName: z.string().default("Authorization"),
|
|
69
|
-
/** 401 未授权处理配置 */
|
|
70
|
-
unauthorized: apiUnauthorizedConfigSchema.optional()
|
|
71
|
-
});
|
|
72
|
-
export const apiToastConfigSchema = z.looseObject({
|
|
73
|
-
/**
|
|
74
|
-
* 是否启用 Toast 提示
|
|
75
|
-
* @defaultValue true
|
|
76
|
-
*/
|
|
77
|
-
enabled: z.boolean().default(true),
|
|
78
|
-
/** 成功提示配置 */
|
|
79
|
-
success: z.object({
|
|
80
|
-
/**
|
|
81
|
-
* 是否显示成功提示
|
|
82
|
-
* @defaultValue true
|
|
83
|
-
*/
|
|
84
|
-
show: z.boolean().default(true),
|
|
85
|
-
/**
|
|
86
|
-
* 提示颜色
|
|
87
|
-
* @defaultValue 'success'
|
|
88
|
-
*/
|
|
89
|
-
color: z.string().default("success"),
|
|
90
|
-
/**
|
|
91
|
-
* 图标类名
|
|
92
|
-
* @defaultValue 'i-lucide-circle-check'
|
|
93
|
-
*/
|
|
94
|
-
icon: z.string().optional(),
|
|
95
|
-
/**
|
|
96
|
-
* 显示时长(毫秒)
|
|
97
|
-
* @defaultValue 3000
|
|
98
|
-
*/
|
|
99
|
-
duration: z.number().default(3e3)
|
|
100
|
-
}).optional(),
|
|
101
|
-
/** 错误提示配置 */
|
|
102
|
-
error: z.looseObject({
|
|
103
|
-
/**
|
|
104
|
-
* 是否显示错误提示
|
|
105
|
-
* @defaultValue true
|
|
106
|
-
*/
|
|
107
|
-
show: z.boolean().default(true),
|
|
108
|
-
/**
|
|
109
|
-
* 提示颜色
|
|
110
|
-
* @defaultValue 'error'
|
|
111
|
-
*/
|
|
112
|
-
color: z.string().default("error"),
|
|
113
|
-
/**
|
|
114
|
-
* 图标类名
|
|
115
|
-
* @defaultValue 'i-lucide-circle-x'
|
|
116
|
-
*/
|
|
117
|
-
icon: z.string().optional(),
|
|
118
|
-
/**
|
|
119
|
-
* 显示时长(毫秒)
|
|
120
|
-
* @defaultValue 3000
|
|
121
|
-
*/
|
|
122
|
-
duration: z.number().default(3e3)
|
|
123
|
-
}).optional()
|
|
124
|
-
});
|
|
125
|
-
const apiAuthPartialSchema = z.object({
|
|
126
|
-
/** 是否启用认证 */
|
|
127
|
-
enabled: z.boolean().optional(),
|
|
128
|
-
/** 令牌来源类型 */
|
|
129
|
-
tokenSource: z.enum(["session", "custom"]).optional(),
|
|
130
|
-
/** 令牌在会话对象中的路径(支持点号分隔的嵌套路径) */
|
|
131
|
-
sessionTokenPath: z.string().optional(),
|
|
132
|
-
/** 令牌类型前缀 */
|
|
133
|
-
tokenType: z.enum(["Bearer", "Basic", "Custom"]).optional(),
|
|
134
|
-
/** 自定义令牌类型前缀(当 tokenType 为 'Custom' 时使用) */
|
|
135
|
-
customTokenType: z.string().optional(),
|
|
136
|
-
/** 认证请求头名称 */
|
|
137
|
-
headerName: z.string().optional(),
|
|
138
|
-
/** 401 未授权处理配置 */
|
|
139
|
-
unauthorized: z.object({
|
|
140
|
-
/** 是否自动重定向到登录页 */
|
|
141
|
-
redirect: z.boolean().optional(),
|
|
142
|
-
/** 登录页路径 */
|
|
143
|
-
loginPath: z.string().optional(),
|
|
144
|
-
/** 是否清除用户会话 */
|
|
145
|
-
clearSession: z.boolean().optional()
|
|
146
|
-
}).optional()
|
|
147
|
-
}).optional();
|
|
148
|
-
export const apiEndpointPublicConfigSchema = z.object({
|
|
149
|
-
/** 端点的基础 URL */
|
|
150
|
-
baseURL: z.string(),
|
|
151
|
-
/** 端点别名(用于标识) */
|
|
152
|
-
alias: z.string().optional(),
|
|
153
|
-
/** 端点级别的认证配置(覆盖全局配置) */
|
|
154
|
-
auth: apiAuthPartialSchema,
|
|
155
|
-
/** 端点级别的 Toast 配置(覆盖全局配置) */
|
|
156
|
-
toast: apiToastConfigSchema.partial().optional(),
|
|
157
|
-
/** 端点级别的响应配置(覆盖全局配置) */
|
|
158
|
-
response: apiResponseConfigSchema.partial().optional()
|
|
159
|
-
});
|
|
160
|
-
export const apiEndpointPrivateConfigSchema = z.object({
|
|
161
|
-
/** 自定义请求头(仅服务端使用,不会暴露给客户端) */
|
|
162
|
-
headers: z.record(z.string(), z.string()).optional()
|
|
163
|
-
});
|
|
164
|
-
export const movkApiPublicConfigSchema = z.object({
|
|
165
|
-
/**
|
|
166
|
-
* 默认使用的端点名称
|
|
167
|
-
* @defaultValue 'default'
|
|
168
|
-
*/
|
|
169
|
-
defaultEndpoint: z.string().default("default"),
|
|
170
|
-
/**
|
|
171
|
-
* 是否启用调试模式(在控制台输出请求和响应日志)
|
|
172
|
-
* @defaultValue false
|
|
173
|
-
*/
|
|
174
|
-
debug: z.boolean().default(false),
|
|
175
|
-
/**
|
|
176
|
-
* 端点配置映射
|
|
177
|
-
* @defaultValue { default: { baseURL: '/api' } }
|
|
178
|
-
*/
|
|
179
|
-
endpoints: z.record(z.string(), apiEndpointPublicConfigSchema).default({
|
|
180
|
-
default: { baseURL: "/api" }
|
|
181
|
-
}),
|
|
182
|
-
/** 全局响应配置 */
|
|
183
|
-
response: apiResponseConfigSchema.optional(),
|
|
184
|
-
/** 全局认证配置 */
|
|
185
|
-
auth: apiAuthConfigSchema.optional(),
|
|
186
|
-
/** 全局 Toast 配置 */
|
|
187
|
-
toast: apiToastConfigSchema.optional()
|
|
188
|
-
}).transform((data) => ({
|
|
189
|
-
...data,
|
|
190
|
-
response: apiResponseConfigSchema.parse(data.response ?? {}),
|
|
191
|
-
auth: apiAuthConfigSchema.parse(data.auth ?? {}),
|
|
192
|
-
toast: apiToastConfigSchema.parse(data.toast ?? {})
|
|
193
|
-
}));
|
|
194
|
-
export const movkApiPrivateConfigSchema = z.object({
|
|
195
|
-
/** 各端点的私有配置 */
|
|
196
|
-
endpoints: z.record(z.string(), apiEndpointPrivateConfigSchema).optional()
|
|
197
|
-
});
|
|
198
|
-
export const movkApiFullConfigSchema = z.object({
|
|
199
|
-
/**
|
|
200
|
-
* 是否启用 API 模块
|
|
201
|
-
* @defaultValue true
|
|
202
|
-
*/
|
|
203
|
-
enabled: z.boolean().default(true),
|
|
204
|
-
/**
|
|
205
|
-
* 默认使用的端点名称
|
|
206
|
-
* @defaultValue 'default'
|
|
207
|
-
*/
|
|
208
|
-
defaultEndpoint: z.string().default("default"),
|
|
209
|
-
/**
|
|
210
|
-
* 是否启用调试模式
|
|
211
|
-
* @defaultValue false
|
|
212
|
-
*/
|
|
213
|
-
debug: z.boolean().default(false),
|
|
214
|
-
/**
|
|
215
|
-
* 端点配置映射(包含公共和私有配置)
|
|
216
|
-
* @defaultValue { default: { baseURL: '/api' } }
|
|
217
|
-
*/
|
|
218
|
-
endpoints: z.record(
|
|
219
|
-
z.string(),
|
|
220
|
-
apiEndpointPublicConfigSchema.extend(apiEndpointPrivateConfigSchema.shape)
|
|
221
|
-
).default({ default: { baseURL: "/api" } }),
|
|
222
|
-
/** 全局响应配置 */
|
|
223
|
-
response: apiResponseConfigSchema.optional(),
|
|
224
|
-
/** 全局认证配置 */
|
|
225
|
-
auth: apiAuthConfigSchema.optional(),
|
|
226
|
-
/** 全局 Toast 配置 */
|
|
227
|
-
toast: apiToastConfigSchema.optional()
|
|
228
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { defineEventHandler, readBody, createError } from "h3";
|
|
2
|
-
export default defineEventHandler(async (event) => {
|
|
3
|
-
const body = await readBody(event);
|
|
4
|
-
if (!body || typeof body !== "object") {
|
|
5
|
-
throw createError({
|
|
6
|
-
statusCode: 400,
|
|
7
|
-
message: "Invalid request body"
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
if (!body.user || typeof body.user !== "object") {
|
|
11
|
-
throw createError({
|
|
12
|
-
statusCode: 400,
|
|
13
|
-
message: "User data is required"
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
await setUserSession(event, body);
|
|
17
|
-
return { success: true };
|
|
18
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
declare module '#auth-utils' {
|
|
2
|
-
interface User {
|
|
3
|
-
// Add your own fields
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface UserSession {
|
|
7
|
-
/**
|
|
8
|
-
* Session ID
|
|
9
|
-
*/
|
|
10
|
-
id?: string
|
|
11
|
-
/**
|
|
12
|
-
* User session data, available on client and server
|
|
13
|
-
*/
|
|
14
|
-
user?: User
|
|
15
|
-
/**
|
|
16
|
-
* Private session data, only available on server/ code
|
|
17
|
-
*/
|
|
18
|
-
secure?: SecureSessionData
|
|
19
|
-
/**
|
|
20
|
-
* 认证 Token
|
|
21
|
-
*/
|
|
22
|
-
token?: string
|
|
23
|
-
/**
|
|
24
|
-
* Extra session data, available on client and server
|
|
25
|
-
*/
|
|
26
|
-
[key: string]: unknown
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface SecureSessionData {
|
|
30
|
-
// Add your own fields
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { }
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod/v4';
|
|
2
|
-
import type { AnyObject } from '@movk/core';
|
|
3
|
-
import type { ButtonProps } from '@nuxt/ui';
|
|
4
|
-
import type { AutoFormField } from './auto-form.js';
|
|
5
|
-
import type { AutoFormProps } from '../components/AutoForm.vue.js';
|
|
6
|
-
export interface AutoFormRendererArrayProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
|
|
7
|
-
field: AutoFormField;
|
|
8
|
-
extraProps?: AnyObject;
|
|
9
|
-
addButtonProps?: Partial<ButtonProps>;
|
|
10
|
-
}
|
|
11
|
-
export interface AutoFormFieldProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
|
|
12
|
-
field: AutoFormField;
|
|
13
|
-
extraProps?: AnyObject;
|
|
14
|
-
}
|
|
15
|
-
export interface AutoFormRendererLayoutProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
|
|
16
|
-
field: AutoFormField;
|
|
17
|
-
extraProps?: AnyObject;
|
|
18
|
-
}
|
|
19
|
-
export interface AutoFormRendererNestedProps<S extends z.ZodObject> extends Pick<AutoFormProps<S>, 'schema'> {
|
|
20
|
-
field: AutoFormField;
|
|
21
|
-
extraProps?: AnyObject;
|
|
22
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { ButtonProps, PopoverProps, ColorPickerProps, PopoverEmits, CalendarProps, CalendarEmits, InputProps, InputEmits, InputSlots, TooltipProps, InputValue } from '@nuxt/ui';
|
|
2
|
-
import type { OmitByKey } from '@movk/core';
|
|
3
|
-
import type { ClassNameValue } from 'tailwind-merge';
|
|
4
|
-
import type { DateFormatterOptions, useDateFormatter } from '../composables/useDateFormatter.js';
|
|
5
|
-
export interface ColorChooserProps<P extends 'click' | 'hover' = 'click'> extends /** @vue-ignore */ ColorPickerProps {
|
|
6
|
-
popoverProps?: PopoverProps<P>;
|
|
7
|
-
buttonProps?: ButtonProps;
|
|
8
|
-
}
|
|
9
|
-
export type ColorChooserEmits = PopoverEmits;
|
|
10
|
-
export type LabelFormat = 'iso' | 'formatted' | 'date' | 'timestamp' | 'unix';
|
|
11
|
-
export type ValueType<R extends boolean, M extends boolean> = CalendarProps<R, M>['modelValue'];
|
|
12
|
-
export interface DatePickerProps<R extends boolean, M extends boolean, P extends 'click' | 'hover' = 'click'> extends /** @vue-ignore */ OmitByKey<CalendarProps<R, M>, 'modelValue'>, DateFormatterOptions {
|
|
13
|
-
buttonProps?: ButtonProps;
|
|
14
|
-
popoverProps?: PopoverProps<P>;
|
|
15
|
-
labelFormat?: LabelFormat | ((formatter: ReturnType<typeof useDateFormatter>, modelValue: ValueType<R, M>) => string);
|
|
16
|
-
}
|
|
17
|
-
export type DatePickerEmits<R extends boolean, M extends boolean> = PopoverEmits & CalendarEmits<R, M>;
|
|
18
|
-
export interface WithCharacterLimitProps<T extends InputValue = InputValue> extends /** @vue-ignore */ OmitByKey<InputProps<T>, 'modelValue'> {
|
|
19
|
-
maxLength?: number;
|
|
20
|
-
counterClass?: ClassNameValue;
|
|
21
|
-
}
|
|
22
|
-
export type WithCharacterLimitEmits<T extends InputValue = InputValue> = InputEmits<T>;
|
|
23
|
-
export type WithCharacterLimitSlots = OmitByKey<InputSlots, 'trailing'>;
|
|
24
|
-
export interface WithClearProps<T extends InputValue = InputValue> extends /** @vue-ignore */ OmitByKey<InputProps<T>, 'modelValue'> {
|
|
25
|
-
buttonProps?: ButtonProps;
|
|
26
|
-
}
|
|
27
|
-
export type WithClearEmits<T extends InputValue = InputValue> = InputEmits<T> & {
|
|
28
|
-
clear: [];
|
|
29
|
-
};
|
|
30
|
-
export type WithClearSlots = OmitByKey<InputSlots, 'trailing'>;
|
|
31
|
-
export interface WithCopyProps<T extends InputValue = InputValue> extends /** @vue-ignore */ OmitByKey<InputProps<T>, 'modelValue'> {
|
|
32
|
-
buttonProps?: ButtonProps;
|
|
33
|
-
tooltipProps?: TooltipProps;
|
|
34
|
-
}
|
|
35
|
-
export type WithCopyEmits<T extends InputValue = InputValue> = InputEmits<T> & {
|
|
36
|
-
copy: [value: string];
|
|
37
|
-
};
|
|
38
|
-
export type WithCopySlots = OmitByKey<InputSlots, 'trailing'>;
|
|
39
|
-
export interface WithPasswordToggleProps<T extends InputValue = InputValue> extends /** @vue-ignore */ OmitByKey<InputProps<T>, 'type' | 'modelValue'> {
|
|
40
|
-
buttonProps?: ButtonProps;
|
|
41
|
-
}
|
|
42
|
-
export type WithPasswordToggleEmits<T extends InputValue = InputValue> = InputEmits<T>;
|
|
43
|
-
export type WithPasswordToggleSlots = OmitByKey<InputSlots, 'trailing'>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { resolveReactiveValue, resolveReactiveObject, enhanceEventProps, VNodeRender } from './reactive-utils.js';
|
|
2
|
-
export { introspectSchema, extractPureSchema } from './schema-introspector.js';
|
|
3
|
-
export { classifyFields, isLeafField, getFieldType, collectFieldDefaults, createHintSlotFactory, extractEnumValuesFromItems } from './field-utils.js';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
resolveReactiveValue,
|
|
3
|
-
resolveReactiveObject,
|
|
4
|
-
enhanceEventProps,
|
|
5
|
-
VNodeRender
|
|
6
|
-
} from "./reactive-utils.js";
|
|
7
|
-
export {
|
|
8
|
-
introspectSchema,
|
|
9
|
-
extractPureSchema
|
|
10
|
-
} from "./schema-introspector.js";
|
|
11
|
-
export {
|
|
12
|
-
classifyFields,
|
|
13
|
-
isLeafField,
|
|
14
|
-
getFieldType,
|
|
15
|
-
collectFieldDefaults,
|
|
16
|
-
createHintSlotFactory,
|
|
17
|
-
extractEnumValuesFromItems
|
|
18
|
-
} from "./field-utils.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|