@shwfed/nuxt 0.8.3 → 0.9.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.
@@ -1,175 +1,327 @@
1
1
  import { Effect } from 'effect';
2
- import z from 'zod';
3
- import { FieldC } from './schema.js';
4
- export { CalendarFieldC, FieldC, NumberFieldC, SelectFieldC, StringFieldC, ValidationRuleC, validationC, } from './schema.js';
5
- export type { Field, ValidationRule } from './schema.js';
2
+ export { CalendarFieldC, FieldC, FieldsConfigC, NumberFieldC, SelectFieldC, StringFieldC, ValidationRuleC, validationC, } from './schema.js';
3
+ export type { Field, FieldsConfig, ValidationRule } from './schema.js';
6
4
  declare const _default: typeof __VLS_export;
7
5
  export default _default;
8
6
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
9
- orientation?: "horizontal" | "vertical" | "floating";
10
- fields: Effect.Effect<ReadonlyArray<z.infer<typeof FieldC>>>;
7
+ config: Effect.Effect<Readonly<{
8
+ fields: readonly ({
9
+ type: "string";
10
+ path: string;
11
+ title: readonly {
12
+ locale: "zh" | "ja" | "en" | "ko";
13
+ message: string;
14
+ }[];
15
+ icon?: string | undefined;
16
+ style?: string | undefined;
17
+ discardEmptyString?: boolean | undefined;
18
+ maxLength?: string | undefined;
19
+ hidden?: string | undefined;
20
+ disabled?: string | undefined;
21
+ validation?: readonly Readonly<{
22
+ expression: string;
23
+ message: string;
24
+ }>[] | undefined;
25
+ } | {
26
+ type: "number";
27
+ path: string;
28
+ title: readonly {
29
+ locale: "zh" | "ja" | "en" | "ko";
30
+ message: string;
31
+ }[];
32
+ icon?: string | undefined;
33
+ style?: string | undefined;
34
+ min?: string | undefined;
35
+ max?: string | undefined;
36
+ step?: string | undefined;
37
+ hidden?: string | undefined;
38
+ disabled?: string | undefined;
39
+ validation?: readonly Readonly<{
40
+ expression: string;
41
+ message: string;
42
+ }>[] | undefined;
43
+ } | {
44
+ type: "select";
45
+ path: string;
46
+ title: readonly {
47
+ locale: "zh" | "ja" | "en" | "ko";
48
+ message: string;
49
+ }[];
50
+ options: string;
51
+ label: string;
52
+ value: string;
53
+ key: string;
54
+ icon?: string | undefined;
55
+ style?: string | undefined;
56
+ hidden?: string | undefined;
57
+ disabled?: string | undefined;
58
+ validation?: readonly Readonly<{
59
+ expression: string;
60
+ message: string;
61
+ }>[] | undefined;
62
+ } | {
63
+ type: "calendar";
64
+ path: string;
65
+ title: readonly {
66
+ locale: "zh" | "ja" | "en" | "ko";
67
+ message: string;
68
+ }[];
69
+ mode: "date" | "month" | "year";
70
+ value: string;
71
+ icon?: string | undefined;
72
+ style?: string | undefined;
73
+ display?: string | undefined;
74
+ disableDate?: string | undefined;
75
+ hidden?: string | undefined;
76
+ disabled?: string | undefined;
77
+ validation?: readonly Readonly<{
78
+ expression: string;
79
+ message: string;
80
+ }>[] | undefined;
81
+ })[];
82
+ orientation?: "vertical" | "horizontal" | "floating" | undefined;
83
+ }> | undefined>;
11
84
  } & {
12
85
  modelValue?: Record<string, unknown>;
13
86
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
87
  "update:modelValue": (value: Record<string, unknown>) => any;
15
- "update:fields": (args_0: readonly ({
16
- type: "string";
17
- path: string;
18
- title: readonly {
19
- locale: "zh" | "ja" | "en" | "ko";
20
- message: string;
21
- }[];
22
- icon?: string | undefined;
23
- style?: string | undefined;
24
- discardEmptyString?: boolean | undefined;
25
- maxLength?: string | undefined;
26
- hidden?: string | undefined;
27
- disabled?: string | undefined;
28
- validation?: readonly Readonly<{
29
- expression: string;
30
- message: string;
31
- }>[] | undefined;
32
- } | {
33
- type: "number";
34
- path: string;
35
- title: readonly {
36
- locale: "zh" | "ja" | "en" | "ko";
37
- message: string;
38
- }[];
39
- icon?: string | undefined;
40
- style?: string | undefined;
41
- min?: string | undefined;
42
- max?: string | undefined;
43
- step?: string | undefined;
44
- hidden?: string | undefined;
45
- disabled?: string | undefined;
46
- validation?: readonly Readonly<{
47
- expression: string;
48
- message: string;
49
- }>[] | undefined;
50
- } | {
51
- type: "select";
52
- path: string;
53
- title: readonly {
54
- locale: "zh" | "ja" | "en" | "ko";
55
- message: string;
56
- }[];
57
- options: string;
58
- label: string;
59
- value: string;
60
- key: string;
61
- icon?: string | undefined;
62
- style?: string | undefined;
63
- hidden?: string | undefined;
64
- disabled?: string | undefined;
65
- validation?: readonly Readonly<{
66
- expression: string;
67
- message: string;
68
- }>[] | undefined;
69
- } | {
70
- type: "calendar";
71
- path: string;
72
- title: readonly {
73
- locale: "zh" | "ja" | "en" | "ko";
74
- message: string;
75
- }[];
76
- mode: "date" | "month" | "year";
77
- value: string;
78
- icon?: string | undefined;
79
- style?: string | undefined;
80
- display?: string | undefined;
81
- disableDate?: string | undefined;
82
- hidden?: string | undefined;
83
- disabled?: string | undefined;
84
- validation?: readonly Readonly<{
85
- expression: string;
86
- message: string;
87
- }>[] | undefined;
88
- })[]) => any;
88
+ "update:config": (args_0: Readonly<{
89
+ fields: readonly ({
90
+ type: "string";
91
+ path: string;
92
+ title: readonly {
93
+ locale: "zh" | "ja" | "en" | "ko";
94
+ message: string;
95
+ }[];
96
+ icon?: string | undefined;
97
+ style?: string | undefined;
98
+ discardEmptyString?: boolean | undefined;
99
+ maxLength?: string | undefined;
100
+ hidden?: string | undefined;
101
+ disabled?: string | undefined;
102
+ validation?: readonly Readonly<{
103
+ expression: string;
104
+ message: string;
105
+ }>[] | undefined;
106
+ } | {
107
+ type: "number";
108
+ path: string;
109
+ title: readonly {
110
+ locale: "zh" | "ja" | "en" | "ko";
111
+ message: string;
112
+ }[];
113
+ icon?: string | undefined;
114
+ style?: string | undefined;
115
+ min?: string | undefined;
116
+ max?: string | undefined;
117
+ step?: string | undefined;
118
+ hidden?: string | undefined;
119
+ disabled?: string | undefined;
120
+ validation?: readonly Readonly<{
121
+ expression: string;
122
+ message: string;
123
+ }>[] | undefined;
124
+ } | {
125
+ type: "select";
126
+ path: string;
127
+ title: readonly {
128
+ locale: "zh" | "ja" | "en" | "ko";
129
+ message: string;
130
+ }[];
131
+ options: string;
132
+ label: string;
133
+ value: string;
134
+ key: string;
135
+ icon?: string | undefined;
136
+ style?: string | undefined;
137
+ hidden?: string | undefined;
138
+ disabled?: string | undefined;
139
+ validation?: readonly Readonly<{
140
+ expression: string;
141
+ message: string;
142
+ }>[] | undefined;
143
+ } | {
144
+ type: "calendar";
145
+ path: string;
146
+ title: readonly {
147
+ locale: "zh" | "ja" | "en" | "ko";
148
+ message: string;
149
+ }[];
150
+ mode: "date" | "month" | "year";
151
+ value: string;
152
+ icon?: string | undefined;
153
+ style?: string | undefined;
154
+ display?: string | undefined;
155
+ disableDate?: string | undefined;
156
+ hidden?: string | undefined;
157
+ disabled?: string | undefined;
158
+ validation?: readonly Readonly<{
159
+ expression: string;
160
+ message: string;
161
+ }>[] | undefined;
162
+ })[];
163
+ orientation?: "vertical" | "horizontal" | "floating" | undefined;
164
+ }>) => any;
89
165
  }, string, import("vue").PublicProps, Readonly<{
90
- orientation?: "horizontal" | "vertical" | "floating";
91
- fields: Effect.Effect<ReadonlyArray<z.infer<typeof FieldC>>>;
166
+ config: Effect.Effect<Readonly<{
167
+ fields: readonly ({
168
+ type: "string";
169
+ path: string;
170
+ title: readonly {
171
+ locale: "zh" | "ja" | "en" | "ko";
172
+ message: string;
173
+ }[];
174
+ icon?: string | undefined;
175
+ style?: string | undefined;
176
+ discardEmptyString?: boolean | undefined;
177
+ maxLength?: string | undefined;
178
+ hidden?: string | undefined;
179
+ disabled?: string | undefined;
180
+ validation?: readonly Readonly<{
181
+ expression: string;
182
+ message: string;
183
+ }>[] | undefined;
184
+ } | {
185
+ type: "number";
186
+ path: string;
187
+ title: readonly {
188
+ locale: "zh" | "ja" | "en" | "ko";
189
+ message: string;
190
+ }[];
191
+ icon?: string | undefined;
192
+ style?: string | undefined;
193
+ min?: string | undefined;
194
+ max?: string | undefined;
195
+ step?: string | undefined;
196
+ hidden?: string | undefined;
197
+ disabled?: string | undefined;
198
+ validation?: readonly Readonly<{
199
+ expression: string;
200
+ message: string;
201
+ }>[] | undefined;
202
+ } | {
203
+ type: "select";
204
+ path: string;
205
+ title: readonly {
206
+ locale: "zh" | "ja" | "en" | "ko";
207
+ message: string;
208
+ }[];
209
+ options: string;
210
+ label: string;
211
+ value: string;
212
+ key: string;
213
+ icon?: string | undefined;
214
+ style?: string | undefined;
215
+ hidden?: string | undefined;
216
+ disabled?: string | undefined;
217
+ validation?: readonly Readonly<{
218
+ expression: string;
219
+ message: string;
220
+ }>[] | undefined;
221
+ } | {
222
+ type: "calendar";
223
+ path: string;
224
+ title: readonly {
225
+ locale: "zh" | "ja" | "en" | "ko";
226
+ message: string;
227
+ }[];
228
+ mode: "date" | "month" | "year";
229
+ value: string;
230
+ icon?: string | undefined;
231
+ style?: string | undefined;
232
+ display?: string | undefined;
233
+ disableDate?: string | undefined;
234
+ hidden?: string | undefined;
235
+ disabled?: string | undefined;
236
+ validation?: readonly Readonly<{
237
+ expression: string;
238
+ message: string;
239
+ }>[] | undefined;
240
+ })[];
241
+ orientation?: "vertical" | "horizontal" | "floating" | undefined;
242
+ }> | undefined>;
92
243
  } & {
93
244
  modelValue?: Record<string, unknown>;
94
245
  }> & Readonly<{
95
246
  "onUpdate:modelValue"?: ((value: Record<string, unknown>) => any) | undefined;
96
- "onUpdate:fields"?: ((args_0: readonly ({
97
- type: "string";
98
- path: string;
99
- title: readonly {
100
- locale: "zh" | "ja" | "en" | "ko";
101
- message: string;
102
- }[];
103
- icon?: string | undefined;
104
- style?: string | undefined;
105
- discardEmptyString?: boolean | undefined;
106
- maxLength?: string | undefined;
107
- hidden?: string | undefined;
108
- disabled?: string | undefined;
109
- validation?: readonly Readonly<{
110
- expression: string;
111
- message: string;
112
- }>[] | undefined;
113
- } | {
114
- type: "number";
115
- path: string;
116
- title: readonly {
117
- locale: "zh" | "ja" | "en" | "ko";
118
- message: string;
119
- }[];
120
- icon?: string | undefined;
121
- style?: string | undefined;
122
- min?: string | undefined;
123
- max?: string | undefined;
124
- step?: string | undefined;
125
- hidden?: string | undefined;
126
- disabled?: string | undefined;
127
- validation?: readonly Readonly<{
128
- expression: string;
129
- message: string;
130
- }>[] | undefined;
131
- } | {
132
- type: "select";
133
- path: string;
134
- title: readonly {
135
- locale: "zh" | "ja" | "en" | "ko";
136
- message: string;
137
- }[];
138
- options: string;
139
- label: string;
140
- value: string;
141
- key: string;
142
- icon?: string | undefined;
143
- style?: string | undefined;
144
- hidden?: string | undefined;
145
- disabled?: string | undefined;
146
- validation?: readonly Readonly<{
147
- expression: string;
148
- message: string;
149
- }>[] | undefined;
150
- } | {
151
- type: "calendar";
152
- path: string;
153
- title: readonly {
154
- locale: "zh" | "ja" | "en" | "ko";
155
- message: string;
156
- }[];
157
- mode: "date" | "month" | "year";
158
- value: string;
159
- icon?: string | undefined;
160
- style?: string | undefined;
161
- display?: string | undefined;
162
- disableDate?: string | undefined;
163
- hidden?: string | undefined;
164
- disabled?: string | undefined;
165
- validation?: readonly Readonly<{
166
- expression: string;
167
- message: string;
168
- }>[] | undefined;
169
- })[]) => any) | undefined;
170
- }>, {
171
- orientation: "horizontal" | "vertical" | "floating";
172
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
247
+ "onUpdate:config"?: ((args_0: Readonly<{
248
+ fields: readonly ({
249
+ type: "string";
250
+ path: string;
251
+ title: readonly {
252
+ locale: "zh" | "ja" | "en" | "ko";
253
+ message: string;
254
+ }[];
255
+ icon?: string | undefined;
256
+ style?: string | undefined;
257
+ discardEmptyString?: boolean | undefined;
258
+ maxLength?: string | undefined;
259
+ hidden?: string | undefined;
260
+ disabled?: string | undefined;
261
+ validation?: readonly Readonly<{
262
+ expression: string;
263
+ message: string;
264
+ }>[] | undefined;
265
+ } | {
266
+ type: "number";
267
+ path: string;
268
+ title: readonly {
269
+ locale: "zh" | "ja" | "en" | "ko";
270
+ message: string;
271
+ }[];
272
+ icon?: string | undefined;
273
+ style?: string | undefined;
274
+ min?: string | undefined;
275
+ max?: string | undefined;
276
+ step?: string | undefined;
277
+ hidden?: string | undefined;
278
+ disabled?: string | undefined;
279
+ validation?: readonly Readonly<{
280
+ expression: string;
281
+ message: string;
282
+ }>[] | undefined;
283
+ } | {
284
+ type: "select";
285
+ path: string;
286
+ title: readonly {
287
+ locale: "zh" | "ja" | "en" | "ko";
288
+ message: string;
289
+ }[];
290
+ options: string;
291
+ label: string;
292
+ value: string;
293
+ key: string;
294
+ icon?: string | undefined;
295
+ style?: string | undefined;
296
+ hidden?: string | undefined;
297
+ disabled?: string | undefined;
298
+ validation?: readonly Readonly<{
299
+ expression: string;
300
+ message: string;
301
+ }>[] | undefined;
302
+ } | {
303
+ type: "calendar";
304
+ path: string;
305
+ title: readonly {
306
+ locale: "zh" | "ja" | "en" | "ko";
307
+ message: string;
308
+ }[];
309
+ mode: "date" | "month" | "year";
310
+ value: string;
311
+ icon?: string | undefined;
312
+ style?: string | undefined;
313
+ display?: string | undefined;
314
+ disableDate?: string | undefined;
315
+ hidden?: string | undefined;
316
+ disabled?: string | undefined;
317
+ validation?: readonly Readonly<{
318
+ expression: string;
319
+ message: string;
320
+ }>[] | undefined;
321
+ })[];
322
+ orientation?: "vertical" | "horizontal" | "floating" | undefined;
323
+ }>) => any) | undefined;
324
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
173
325
  default?: (props: {}) => any;
174
326
  }>;
175
327
  type __VLS_WithSlots<T, S> = T & {
@@ -206,5 +206,116 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
206
206
  message: z.ZodString;
207
207
  }, z.core.$strip>>>>>;
208
208
  }, z.core.$strip>], "type">;
209
+ export declare const FieldsOrientationC: z.ZodEnum<{
210
+ vertical: "vertical";
211
+ horizontal: "horizontal";
212
+ floating: "floating";
213
+ }>;
214
+ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
215
+ orientation: z.ZodOptional<z.ZodEnum<{
216
+ vertical: "vertical";
217
+ horizontal: "horizontal";
218
+ floating: "floating";
219
+ }>>;
220
+ fields: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
221
+ type: z.ZodLiteral<"string">;
222
+ path: z.ZodString;
223
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
224
+ locale: z.ZodEnum<{
225
+ zh: "zh";
226
+ ja: "ja";
227
+ en: "en";
228
+ ko: "ko";
229
+ }>;
230
+ message: z.ZodString;
231
+ }, z.core.$strip>>>;
232
+ icon: z.ZodOptional<z.ZodString>;
233
+ style: z.ZodOptional<z.ZodString>;
234
+ discardEmptyString: z.ZodOptional<z.ZodBoolean>;
235
+ maxLength: z.ZodOptional<z.ZodString>;
236
+ hidden: z.ZodOptional<z.ZodString>;
237
+ disabled: z.ZodOptional<z.ZodString>;
238
+ validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
239
+ expression: z.ZodString;
240
+ message: z.ZodString;
241
+ }, z.core.$strip>>>>>;
242
+ }, z.core.$strip>, z.ZodObject<{
243
+ type: z.ZodLiteral<"number">;
244
+ path: z.ZodString;
245
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
246
+ locale: z.ZodEnum<{
247
+ zh: "zh";
248
+ ja: "ja";
249
+ en: "en";
250
+ ko: "ko";
251
+ }>;
252
+ message: z.ZodString;
253
+ }, z.core.$strip>>>;
254
+ icon: z.ZodOptional<z.ZodString>;
255
+ style: z.ZodOptional<z.ZodString>;
256
+ min: z.ZodOptional<z.ZodString>;
257
+ max: z.ZodOptional<z.ZodString>;
258
+ step: z.ZodOptional<z.ZodString>;
259
+ hidden: z.ZodOptional<z.ZodString>;
260
+ disabled: z.ZodOptional<z.ZodString>;
261
+ validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
262
+ expression: z.ZodString;
263
+ message: z.ZodString;
264
+ }, z.core.$strip>>>>>;
265
+ }, z.core.$strip>, z.ZodObject<{
266
+ type: z.ZodLiteral<"select">;
267
+ path: z.ZodString;
268
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
269
+ locale: z.ZodEnum<{
270
+ zh: "zh";
271
+ ja: "ja";
272
+ en: "en";
273
+ ko: "ko";
274
+ }>;
275
+ message: z.ZodString;
276
+ }, z.core.$strip>>>;
277
+ icon: z.ZodOptional<z.ZodString>;
278
+ options: z.ZodString;
279
+ label: z.ZodString;
280
+ value: z.ZodString;
281
+ key: z.ZodString;
282
+ style: z.ZodOptional<z.ZodString>;
283
+ hidden: z.ZodOptional<z.ZodString>;
284
+ disabled: z.ZodOptional<z.ZodString>;
285
+ validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
286
+ expression: z.ZodString;
287
+ message: z.ZodString;
288
+ }, z.core.$strip>>>>>;
289
+ }, z.core.$strip>, z.ZodObject<{
290
+ type: z.ZodLiteral<"calendar">;
291
+ path: z.ZodString;
292
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
293
+ locale: z.ZodEnum<{
294
+ zh: "zh";
295
+ ja: "ja";
296
+ en: "en";
297
+ ko: "ko";
298
+ }>;
299
+ message: z.ZodString;
300
+ }, z.core.$strip>>>;
301
+ icon: z.ZodOptional<z.ZodString>;
302
+ style: z.ZodOptional<z.ZodString>;
303
+ mode: z.ZodEnum<{
304
+ date: "date";
305
+ month: "month";
306
+ year: "year";
307
+ }>;
308
+ display: z.ZodOptional<z.ZodString>;
309
+ value: z.ZodString;
310
+ disableDate: z.ZodOptional<z.ZodString>;
311
+ hidden: z.ZodOptional<z.ZodString>;
312
+ disabled: z.ZodOptional<z.ZodString>;
313
+ validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
314
+ expression: z.ZodString;
315
+ message: z.ZodString;
316
+ }, z.core.$strip>>>>>;
317
+ }, z.core.$strip>], "type">>>;
318
+ }, z.core.$strip>>;
209
319
  export type ValidationRule = z.infer<typeof ValidationRuleC>;
210
320
  export type Field = z.infer<typeof FieldC>;
321
+ export type FieldsConfig = z.infer<typeof FieldsConfigC>;
@@ -64,3 +64,8 @@ export const FieldC = z.discriminatedUnion("type", [
64
64
  SelectFieldC,
65
65
  CalendarFieldC
66
66
  ]);
67
+ export const FieldsOrientationC = z.enum(["horizontal", "vertical", "floating"]);
68
+ export const FieldsConfigC = z.object({
69
+ orientation: FieldsOrientationC.optional().describe("\u5B57\u6BB5\u5E03\u5C40\u65B9\u5411\uFF0C\u53EF\u9009 horizontal\u3001vertical \u6216 floating\uFF1B\u7559\u7A7A\u65F6\u9ED8\u8BA4 horizontal"),
70
+ fields: z.array(FieldC).readonly().describe("\u5B57\u6BB5\u5217\u8868")
71
+ }).readonly();