@shwfed/nuxt 0.9.2 → 0.10.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.
@@ -8,6 +8,7 @@ export declare const validationC: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodRe
8
8
  message: z.ZodString;
9
9
  }, z.core.$strip>>>>>;
10
10
  export declare const StringFieldC: z.ZodObject<{
11
+ id: z.ZodUUID;
11
12
  type: z.ZodLiteral<"string">;
12
13
  path: z.ZodString;
13
14
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -31,6 +32,7 @@ export declare const StringFieldC: z.ZodObject<{
31
32
  }, z.core.$strip>>>>>;
32
33
  }, z.core.$strip>;
33
34
  export declare const NumberFieldC: z.ZodObject<{
35
+ id: z.ZodUUID;
34
36
  type: z.ZodLiteral<"number">;
35
37
  path: z.ZodString;
36
38
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -55,6 +57,7 @@ export declare const NumberFieldC: z.ZodObject<{
55
57
  }, z.core.$strip>>>>>;
56
58
  }, z.core.$strip>;
57
59
  export declare const SelectFieldC: z.ZodObject<{
60
+ id: z.ZodUUID;
58
61
  type: z.ZodLiteral<"select">;
59
62
  path: z.ZodString;
60
63
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -80,6 +83,7 @@ export declare const SelectFieldC: z.ZodObject<{
80
83
  }, z.core.$strip>>>>>;
81
84
  }, z.core.$strip>;
82
85
  export declare const CalendarFieldC: z.ZodObject<{
86
+ id: z.ZodUUID;
83
87
  type: z.ZodLiteral<"calendar">;
84
88
  path: z.ZodString;
85
89
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -108,7 +112,13 @@ export declare const CalendarFieldC: z.ZodObject<{
108
112
  message: z.ZodString;
109
113
  }, z.core.$strip>>>>>;
110
114
  }, z.core.$strip>;
115
+ export declare const SlotFieldC: z.ZodObject<{
116
+ id: z.ZodUUID;
117
+ type: z.ZodLiteral<"slot">;
118
+ style: z.ZodOptional<z.ZodString>;
119
+ }, z.core.$strict>;
111
120
  export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
121
+ id: z.ZodUUID;
112
122
  type: z.ZodLiteral<"string">;
113
123
  path: z.ZodString;
114
124
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -131,6 +141,7 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
131
141
  message: z.ZodString;
132
142
  }, z.core.$strip>>>>>;
133
143
  }, z.core.$strip>, z.ZodObject<{
144
+ id: z.ZodUUID;
134
145
  type: z.ZodLiteral<"number">;
135
146
  path: z.ZodString;
136
147
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -154,6 +165,7 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
154
165
  message: z.ZodString;
155
166
  }, z.core.$strip>>>>>;
156
167
  }, z.core.$strip>, z.ZodObject<{
168
+ id: z.ZodUUID;
157
169
  type: z.ZodLiteral<"select">;
158
170
  path: z.ZodString;
159
171
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -178,6 +190,7 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
178
190
  message: z.ZodString;
179
191
  }, z.core.$strip>>>>>;
180
192
  }, z.core.$strip>, z.ZodObject<{
193
+ id: z.ZodUUID;
181
194
  type: z.ZodLiteral<"calendar">;
182
195
  path: z.ZodString;
183
196
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -205,7 +218,11 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
205
218
  expression: z.ZodString;
206
219
  message: z.ZodString;
207
220
  }, z.core.$strip>>>>>;
208
- }, z.core.$strip>], "type">;
221
+ }, z.core.$strip>, z.ZodObject<{
222
+ id: z.ZodUUID;
223
+ type: z.ZodLiteral<"slot">;
224
+ style: z.ZodOptional<z.ZodString>;
225
+ }, z.core.$strict>], "type">;
209
226
  export declare const FieldsOrientationC: z.ZodEnum<{
210
227
  vertical: "vertical";
211
228
  horizontal: "horizontal";
@@ -220,6 +237,7 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
220
237
  }>>;
221
238
  style: z.ZodOptional<z.ZodString>;
222
239
  fields: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
240
+ id: z.ZodUUID;
223
241
  type: z.ZodLiteral<"string">;
224
242
  path: z.ZodString;
225
243
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -242,6 +260,7 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
242
260
  message: z.ZodString;
243
261
  }, z.core.$strip>>>>>;
244
262
  }, z.core.$strip>, z.ZodObject<{
263
+ id: z.ZodUUID;
245
264
  type: z.ZodLiteral<"number">;
246
265
  path: z.ZodString;
247
266
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -265,6 +284,7 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
265
284
  message: z.ZodString;
266
285
  }, z.core.$strip>>>>>;
267
286
  }, z.core.$strip>, z.ZodObject<{
287
+ id: z.ZodUUID;
268
288
  type: z.ZodLiteral<"select">;
269
289
  path: z.ZodString;
270
290
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -289,6 +309,7 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
289
309
  message: z.ZodString;
290
310
  }, z.core.$strip>>>>>;
291
311
  }, z.core.$strip>, z.ZodObject<{
312
+ id: z.ZodUUID;
292
313
  type: z.ZodLiteral<"calendar">;
293
314
  path: z.ZodString;
294
315
  title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -316,8 +337,13 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
316
337
  expression: z.ZodString;
317
338
  message: z.ZodString;
318
339
  }, z.core.$strip>>>>>;
319
- }, z.core.$strip>], "type">>>;
340
+ }, z.core.$strip>, z.ZodObject<{
341
+ id: z.ZodUUID;
342
+ type: z.ZodLiteral<"slot">;
343
+ style: z.ZodOptional<z.ZodString>;
344
+ }, z.core.$strict>], "type">>>;
320
345
  }, z.core.$strip>>;
321
346
  export type ValidationRule = z.infer<typeof ValidationRuleC>;
322
347
  export type Field = z.infer<typeof FieldC>;
323
348
  export type FieldsConfig = z.infer<typeof FieldsConfigC>;
349
+ export type SlotField = z.infer<typeof SlotFieldC>;
@@ -1,11 +1,13 @@
1
1
  import z from "zod";
2
2
  import { dotPropC, expressionC, localeC } from "../../../utils/coders.js";
3
+ const fieldIdC = z.uuid().describe("\u5B57\u6BB5\u552F\u4E00\u6807\u8BC6\uFF0C\u5FC5\u987B\u662F UUID");
3
4
  export const ValidationRuleC = z.object({
4
5
  expression: expressionC("bool", { value: "dyn", form: "map<string, dyn>" }).describe("\u8FD4\u56DE\u5E03\u5C14\u503C\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u53EF\u4F7F\u7528 value \u548C form \u53D8\u91CF"),
5
6
  message: z.string().describe("\u6821\u9A8C\u5931\u8D25\u65F6\u5C55\u793A\u7684 Markdown \u6D88\u606F\uFF0C\u53EF\u5728 {{ expression }} \u4E2D\u4F7F\u7528 value \u548C form \u53D8\u91CF")
6
7
  }).readonly();
7
8
  export const validationC = z.array(ValidationRuleC).readonly().optional().describe("\u5B57\u6BB5\u5931\u7126\u65F6\u6309\u987A\u5E8F\u6267\u884C\u7684\u6821\u9A8C\u89C4\u5219\uFF0C\u547D\u4E2D\u7B2C\u4E00\u4E2A\u5931\u8D25\u89C4\u5219\u540E\u505C\u6B62");
8
9
  export const StringFieldC = z.object({
10
+ id: fieldIdC,
9
11
  type: z.literal("string").describe("\u5355\u884C\u6587\u672C\u8F93\u5165\u5B57\u6BB5\uFF0C\u7ED1\u5B9A string \u7C7B\u578B\u7684\u503C"),
10
12
  path: dotPropC,
11
13
  title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
@@ -18,6 +20,7 @@ export const StringFieldC = z.object({
18
20
  validation: validationC
19
21
  });
20
22
  export const NumberFieldC = z.object({
23
+ id: fieldIdC,
21
24
  type: z.literal("number").describe("\u6570\u5B57\u8F93\u5165\u5B57\u6BB5\uFF0C\u7ED1\u5B9A number \u7C7B\u578B\u7684\u503C"),
22
25
  path: dotPropC,
23
26
  title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
@@ -31,6 +34,7 @@ export const NumberFieldC = z.object({
31
34
  validation: validationC
32
35
  });
33
36
  export const SelectFieldC = z.object({
37
+ id: fieldIdC,
34
38
  type: z.literal("select").describe("\u4E0B\u62C9\u9009\u62E9\u5B57\u6BB5\uFF0C\u4ECE\u9884\u5B9A\u4E49\u9009\u9879\u4E2D\u9009\u53D6\u4E00\u4E2A\u503C"),
35
39
  path: dotPropC,
36
40
  title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
@@ -45,6 +49,7 @@ export const SelectFieldC = z.object({
45
49
  validation: validationC
46
50
  });
47
51
  export const CalendarFieldC = z.object({
52
+ id: fieldIdC,
48
53
  type: z.literal("calendar").describe("\u65E5\u671F\u9009\u62E9\u5B57\u6BB5\uFF0C\u901A\u8FC7\u5F39\u51FA\u65E5\u5386\u9762\u677F\u9009\u62E9\u65E5\u671F"),
49
54
  path: dotPropC,
50
55
  title: localeC.describe("\u5B57\u6BB5\u6807\u7B7E\u7684\u672C\u5730\u5316\u663E\u793A\u6587\u672C"),
@@ -58,11 +63,17 @@ export const CalendarFieldC = z.object({
58
63
  disabled: expressionC("bool", { form: "map<string, dyn>" }).optional().describe("\u4E3A true \u65F6\uFF0C\u7981\u7528\u8FD9\u4E2A\u5B57\u6BB5"),
59
64
  validation: validationC
60
65
  });
66
+ export const SlotFieldC = z.strictObject({
67
+ id: fieldIdC,
68
+ type: z.literal("slot").describe("\u5177\u540D\u63D2\u69FD\u5B57\u6BB5\uFF0C\u901A\u8FC7\u5B57\u6BB5 id \u5BF9\u5E94\u7684\u5177\u540D\u63D2\u69FD\u6E32\u67D3\u5185\u5BB9"),
69
+ style: z.string().optional().describe("CSS \u6837\u5F0F\u5BF9\u8C61\u8868\u8FBE\u5F0F\uFF0C\u6C42\u503C\u540E\u901A\u8FC7 scoped slot \u7684 style prop \u4F20\u7ED9\u6D88\u8D39\u8005")
70
+ });
61
71
  export const FieldC = z.discriminatedUnion("type", [
62
72
  StringFieldC,
63
73
  NumberFieldC,
64
74
  SelectFieldC,
65
- CalendarFieldC
75
+ CalendarFieldC,
76
+ SlotFieldC
66
77
  ]);
67
78
  export const FieldsOrientationC = z.enum(["horizontal", "vertical", "floating"]);
68
79
  export const FieldsStyleC = expressionC(/^map/, {
@@ -10,6 +10,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
10
10
  "update:open": (value: boolean) => any;
11
11
  confirm: (args_0: Readonly<{
12
12
  fields: readonly ({
13
+ id: string;
13
14
  type: "string";
14
15
  path: string;
15
16
  title: readonly {
@@ -27,6 +28,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
27
28
  message: string;
28
29
  }>[] | undefined;
29
30
  } | {
31
+ id: string;
30
32
  type: "number";
31
33
  path: string;
32
34
  title: readonly {
@@ -45,6 +47,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
45
47
  message: string;
46
48
  }>[] | undefined;
47
49
  } | {
50
+ id: string;
48
51
  type: "select";
49
52
  path: string;
50
53
  title: readonly {
@@ -64,6 +67,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
64
67
  message: string;
65
68
  }>[] | undefined;
66
69
  } | {
70
+ id: string;
67
71
  type: "calendar";
68
72
  path: string;
69
73
  title: readonly {
@@ -82,6 +86,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
82
86
  expression: string;
83
87
  message: string;
84
88
  }>[] | undefined;
89
+ } | {
90
+ id: string;
91
+ type: "slot";
92
+ style?: string | undefined;
85
93
  })[];
86
94
  orientation?: "vertical" | "horizontal" | "floating" | undefined;
87
95
  style?: string | undefined;
@@ -90,6 +98,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
90
98
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
91
99
  onConfirm?: ((args_0: Readonly<{
92
100
  fields: readonly ({
101
+ id: string;
93
102
  type: "string";
94
103
  path: string;
95
104
  title: readonly {
@@ -107,6 +116,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
107
116
  message: string;
108
117
  }>[] | undefined;
109
118
  } | {
119
+ id: string;
110
120
  type: "number";
111
121
  path: string;
112
122
  title: readonly {
@@ -125,6 +135,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
125
135
  message: string;
126
136
  }>[] | undefined;
127
137
  } | {
138
+ id: string;
128
139
  type: "select";
129
140
  path: string;
130
141
  title: readonly {
@@ -144,6 +155,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
144
155
  message: string;
145
156
  }>[] | undefined;
146
157
  } | {
158
+ id: string;
147
159
  type: "calendar";
148
160
  path: string;
149
161
  title: readonly {
@@ -162,6 +174,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
162
174
  expression: string;
163
175
  message: string;
164
176
  }>[] | undefined;
177
+ } | {
178
+ id: string;
179
+ type: "slot";
180
+ style?: string | undefined;
165
181
  })[];
166
182
  orientation?: "vertical" | "horizontal" | "floating" | undefined;
167
183
  style?: string | undefined;