@shwfed/nuxt 0.10.0 → 0.10.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.
@@ -15,7 +15,7 @@ import { Button } from "../button";
15
15
  import { CommandGroup, CommandItem } from "../command";
16
16
  import { Field, FieldContent, FieldError, FieldLabel } from "../field";
17
17
  import FieldsConfiguratorDialog from "../fields-configurator/FieldsConfiguratorDialog.vue";
18
- import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupCombobox, InputGroupInput, InputGroupNumberField } from "../input-group";
18
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupCombobox, InputGroupInput, InputGroupNumberField, InputGroupTextarea } from "../input-group";
19
19
  import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "../popover";
20
20
  import { Skeleton } from "../skeleton";
21
21
  import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip";
@@ -84,8 +84,8 @@ function getFieldStyle(field) {
84
84
  }
85
85
  return normalizedStyle;
86
86
  }
87
- function isSlotField(field) {
88
- return field.type === "slot";
87
+ function isPassiveField(field) {
88
+ return field.type === "slot" || field.type === "empty";
89
89
  }
90
90
  function toCalendarDateValue(value, valueFormat) {
91
91
  if (typeof value !== "string") return void 0;
@@ -145,6 +145,9 @@ function isFieldInvalid(field) {
145
145
  function getFieldLabel(field) {
146
146
  return getLocalizedText(field.title, locale.value) ?? field.path;
147
147
  }
148
+ function isFieldRequired(field) {
149
+ return field.required === true;
150
+ }
148
151
  function renderValidationMessage(field) {
149
152
  const error = validationErrors.value[field.path];
150
153
  if (!error) return "";
@@ -178,7 +181,7 @@ watch(config, (value) => {
178
181
  watchEffect(() => {
179
182
  const activePaths = /* @__PURE__ */ new Set();
180
183
  for (const field of displayConfig.value.fields) {
181
- if (!isSlotField(field) && !isFieldHidden(field) && !isFieldDisabled(field)) {
184
+ if (!isPassiveField(field) && !isFieldHidden(field) && !isFieldDisabled(field)) {
182
185
  activePaths.add(field.path);
183
186
  }
184
187
  }
@@ -198,6 +201,7 @@ watchEffect(() => {
198
201
  <script>
199
202
  export {
200
203
  CalendarFieldC,
204
+ EmptyFieldC,
201
205
  FieldC,
202
206
  FieldsConfigC,
203
207
  NumberFieldC,
@@ -250,6 +254,10 @@ export {
250
254
  :name="field.id"
251
255
  :style="getFieldStyle(field)"
252
256
  />
257
+ <div
258
+ v-else-if="field.type === 'empty'"
259
+ :style="getFieldStyle(field)"
260
+ />
253
261
  <Field
254
262
  v-else-if="!isFieldHidden(field)"
255
263
  :data-disabled="isFieldDisabled(field) ? 'true' : void 0"
@@ -257,8 +265,14 @@ export {
257
265
  :orientation="getConfigOrientation(displayConfig)"
258
266
  :style="getFieldStyle(field)"
259
267
  >
260
- <FieldLabel :for="['string', 'number'].includes(field.type) ? `${id}:${field.path}` : void 0">
261
- {{ getFieldLabel(field) }}
268
+ <FieldLabel :for="['string', 'textarea', 'number'].includes(field.type) ? `${id}:${field.path}` : void 0">
269
+ <span class="inline-flex items-start gap-0.5">
270
+ <span>{{ getFieldLabel(field) }}</span>
271
+ <sup
272
+ v-if="isFieldRequired(field)"
273
+ class="text-red-500 leading-none"
274
+ >*</sup>
275
+ </span>
262
276
  <span v-if="isCheating">
263
277
  <span class="font-mono">{{ field.path }}</span>
264
278
  </span>
@@ -332,7 +346,33 @@ export {
332
346
  <InputGroup
333
347
  v-else
334
348
  :data-disabled="isFieldDisabled(field) ? 'true' : void 0"
349
+ :class="field.type === 'textarea' ? 'h-auto flex-col items-stretch' : void 0"
335
350
  >
351
+ <div
352
+ v-if="field.type === 'textarea'"
353
+ class="flex min-w-0 w-full items-center"
354
+ >
355
+ <InputGroupTextarea
356
+ :id="`${id}:${field.path}`"
357
+ :model-value="getProperty(modelValue, field.path)"
358
+ :maxlength="field.maxLength ? $dsl.evaluate`${field.maxLength}`() : void 0"
359
+ :disabled="isFieldDisabled(field)"
360
+ :aria-invalid="isFieldInvalid(field) ? 'true' : void 0"
361
+ @update:model-value="(value) => {
362
+ if (!value && !field.discardEmptyString) {
363
+ deleteProperty(modelValue, field.path);
364
+ } else {
365
+ setProperty(modelValue, field.path, value);
366
+ }
367
+ }"
368
+ @blur="validateField(field)"
369
+ />
370
+ <InputGroupAddon v-if="field.icon">
371
+ <Icon
372
+ :icon="field.icon"
373
+ />
374
+ </InputGroupAddon>
375
+ </div>
336
376
  <InputGroupInput
337
377
  v-if="field.type === 'string'"
338
378
  :id="`${id}:${field.path}`"
@@ -385,13 +425,13 @@ export {
385
425
  </CommandItem>
386
426
  </CommandGroup>
387
427
  </InputGroupCombobox>
388
- <InputGroupAddon v-if="field.icon">
428
+ <InputGroupAddon v-if="field.type !== 'textarea' && field.icon">
389
429
  <Icon
390
430
  :icon="field.icon"
391
431
  />
392
432
  </InputGroupAddon>
393
433
  <InputGroupAddon
394
- v-if="hasProperty(modelValue, field.path)"
434
+ v-if="field.type !== 'textarea' && hasProperty(modelValue, field.path)"
395
435
  align="inline-end"
396
436
  :class="getConfigOrientation(displayConfig) === 'floating' ? 'group-data-[disabled=true]/input-group:hidden' : void 0"
397
437
  >
@@ -423,6 +463,39 @@ export {
423
463
  <span class="inline-block text-right">{{ String(getProperty(modelValue, field.path) ?? "").length }}</span>/{{ field.maxLength }}
424
464
  </span>
425
465
  </InputGroupAddon>
466
+ <InputGroupAddon
467
+ v-if="field.type === 'textarea' && (hasProperty(modelValue, field.path) || field.maxLength && getProperty(modelValue, field.path))"
468
+ align="block-end"
469
+ >
470
+ <Tooltip
471
+ v-if="hasProperty(modelValue, field.path)"
472
+ :delay-duration="800"
473
+ >
474
+ <TooltipTrigger>
475
+ <InputGroupButton as-child>
476
+ <button
477
+ type="button"
478
+ class="text-zinc-300 hover:text-zinc-500 transition-colors"
479
+ :disabled="isFieldDisabled(field)"
480
+ @click="deleteProperty(modelValue, field.path)"
481
+ >
482
+ <Icon
483
+ icon="fluent:dismiss-20-regular"
484
+ />
485
+ </button>
486
+ </InputGroupButton>
487
+ </TooltipTrigger>
488
+ <TooltipContent>
489
+ {{ t("clear") }}
490
+ </TooltipContent>
491
+ </Tooltip>
492
+ <span
493
+ v-if="field.maxLength && getProperty(modelValue, field.path)"
494
+ class="text-xs text-zinc-400 font-mono"
495
+ >
496
+ <span class="inline-block text-right">{{ String(getProperty(modelValue, field.path) ?? "").length }}</span>/{{ field.maxLength }}
497
+ </span>
498
+ </InputGroupAddon>
426
499
  </InputGroup>
427
500
 
428
501
  <FieldError v-if="isFieldInvalid(field)">
@@ -1,7 +1,7 @@
1
1
  import { Effect } from 'effect';
2
2
  import type { CSSProperties } from 'vue';
3
- export { CalendarFieldC, FieldC, FieldsConfigC, NumberFieldC, SelectFieldC, SlotFieldC, StringFieldC, ValidationRuleC, validationC, } from './schema.js';
4
- export type { Field, FieldsConfig, SlotField, ValidationRule } from './schema.js';
3
+ export { CalendarFieldC, EmptyFieldC, FieldC, FieldsConfigC, NumberFieldC, SelectFieldC, SlotFieldC, StringFieldC, ValidationRuleC, validationC, } from './schema.js';
4
+ export type { EmptyField, Field, FieldsConfig, SlotField, ValidationRule } from './schema.js';
5
5
  declare const _default: typeof __VLS_export;
6
6
  export default _default;
7
7
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
@@ -14,6 +14,26 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
14
14
  locale: "zh" | "ja" | "en" | "ko";
15
15
  message: string;
16
16
  }[];
17
+ required?: boolean | undefined;
18
+ icon?: string | undefined;
19
+ style?: string | undefined;
20
+ discardEmptyString?: boolean | undefined;
21
+ maxLength?: string | undefined;
22
+ hidden?: string | undefined;
23
+ disabled?: string | undefined;
24
+ validation?: readonly Readonly<{
25
+ expression: string;
26
+ message: string;
27
+ }>[] | undefined;
28
+ } | {
29
+ id: string;
30
+ type: "textarea";
31
+ path: string;
32
+ title: readonly {
33
+ locale: "zh" | "ja" | "en" | "ko";
34
+ message: string;
35
+ }[];
36
+ required?: boolean | undefined;
17
37
  icon?: string | undefined;
18
38
  style?: string | undefined;
19
39
  discardEmptyString?: boolean | undefined;
@@ -32,6 +52,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
32
52
  locale: "zh" | "ja" | "en" | "ko";
33
53
  message: string;
34
54
  }[];
55
+ required?: boolean | undefined;
35
56
  icon?: string | undefined;
36
57
  style?: string | undefined;
37
58
  min?: string | undefined;
@@ -55,6 +76,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
55
76
  label: string;
56
77
  value: string;
57
78
  key: string;
79
+ required?: boolean | undefined;
58
80
  icon?: string | undefined;
59
81
  style?: string | undefined;
60
82
  hidden?: string | undefined;
@@ -73,6 +95,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
73
95
  }[];
74
96
  mode: "date" | "month" | "year";
75
97
  value: string;
98
+ required?: boolean | undefined;
76
99
  icon?: string | undefined;
77
100
  style?: string | undefined;
78
101
  display?: string | undefined;
@@ -87,6 +110,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
87
110
  id: string;
88
111
  type: "slot";
89
112
  style?: string | undefined;
113
+ } | {
114
+ id: string;
115
+ type: "empty";
116
+ style?: string | undefined;
90
117
  })[];
91
118
  orientation?: "vertical" | "horizontal" | "floating" | undefined;
92
119
  style?: string | undefined;
@@ -104,6 +131,26 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
104
131
  locale: "zh" | "ja" | "en" | "ko";
105
132
  message: string;
106
133
  }[];
134
+ required?: boolean | undefined;
135
+ icon?: string | undefined;
136
+ style?: string | undefined;
137
+ discardEmptyString?: boolean | undefined;
138
+ maxLength?: string | undefined;
139
+ hidden?: string | undefined;
140
+ disabled?: string | undefined;
141
+ validation?: readonly Readonly<{
142
+ expression: string;
143
+ message: string;
144
+ }>[] | undefined;
145
+ } | {
146
+ id: string;
147
+ type: "textarea";
148
+ path: string;
149
+ title: readonly {
150
+ locale: "zh" | "ja" | "en" | "ko";
151
+ message: string;
152
+ }[];
153
+ required?: boolean | undefined;
107
154
  icon?: string | undefined;
108
155
  style?: string | undefined;
109
156
  discardEmptyString?: boolean | undefined;
@@ -122,6 +169,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
122
169
  locale: "zh" | "ja" | "en" | "ko";
123
170
  message: string;
124
171
  }[];
172
+ required?: boolean | undefined;
125
173
  icon?: string | undefined;
126
174
  style?: string | undefined;
127
175
  min?: string | undefined;
@@ -145,6 +193,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
145
193
  label: string;
146
194
  value: string;
147
195
  key: string;
196
+ required?: boolean | undefined;
148
197
  icon?: string | undefined;
149
198
  style?: string | undefined;
150
199
  hidden?: string | undefined;
@@ -163,6 +212,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
163
212
  }[];
164
213
  mode: "date" | "month" | "year";
165
214
  value: string;
215
+ required?: boolean | undefined;
166
216
  icon?: string | undefined;
167
217
  style?: string | undefined;
168
218
  display?: string | undefined;
@@ -177,6 +227,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
177
227
  id: string;
178
228
  type: "slot";
179
229
  style?: string | undefined;
230
+ } | {
231
+ id: string;
232
+ type: "empty";
233
+ style?: string | undefined;
180
234
  })[];
181
235
  orientation?: "vertical" | "horizontal" | "floating" | undefined;
182
236
  style?: string | undefined;
@@ -191,6 +245,26 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
191
245
  locale: "zh" | "ja" | "en" | "ko";
192
246
  message: string;
193
247
  }[];
248
+ required?: boolean | undefined;
249
+ icon?: string | undefined;
250
+ style?: string | undefined;
251
+ discardEmptyString?: boolean | undefined;
252
+ maxLength?: string | undefined;
253
+ hidden?: string | undefined;
254
+ disabled?: string | undefined;
255
+ validation?: readonly Readonly<{
256
+ expression: string;
257
+ message: string;
258
+ }>[] | undefined;
259
+ } | {
260
+ id: string;
261
+ type: "textarea";
262
+ path: string;
263
+ title: readonly {
264
+ locale: "zh" | "ja" | "en" | "ko";
265
+ message: string;
266
+ }[];
267
+ required?: boolean | undefined;
194
268
  icon?: string | undefined;
195
269
  style?: string | undefined;
196
270
  discardEmptyString?: boolean | undefined;
@@ -209,6 +283,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
209
283
  locale: "zh" | "ja" | "en" | "ko";
210
284
  message: string;
211
285
  }[];
286
+ required?: boolean | undefined;
212
287
  icon?: string | undefined;
213
288
  style?: string | undefined;
214
289
  min?: string | undefined;
@@ -232,6 +307,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
232
307
  label: string;
233
308
  value: string;
234
309
  key: string;
310
+ required?: boolean | undefined;
235
311
  icon?: string | undefined;
236
312
  style?: string | undefined;
237
313
  hidden?: string | undefined;
@@ -250,6 +326,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
250
326
  }[];
251
327
  mode: "date" | "month" | "year";
252
328
  value: string;
329
+ required?: boolean | undefined;
253
330
  icon?: string | undefined;
254
331
  style?: string | undefined;
255
332
  display?: string | undefined;
@@ -264,6 +341,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
264
341
  id: string;
265
342
  type: "slot";
266
343
  style?: string | undefined;
344
+ } | {
345
+ id: string;
346
+ type: "empty";
347
+ style?: string | undefined;
267
348
  })[];
268
349
  orientation?: "vertical" | "horizontal" | "floating" | undefined;
269
350
  style?: string | undefined;
@@ -281,6 +362,26 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
281
362
  locale: "zh" | "ja" | "en" | "ko";
282
363
  message: string;
283
364
  }[];
365
+ required?: boolean | undefined;
366
+ icon?: string | undefined;
367
+ style?: string | undefined;
368
+ discardEmptyString?: boolean | undefined;
369
+ maxLength?: string | undefined;
370
+ hidden?: string | undefined;
371
+ disabled?: string | undefined;
372
+ validation?: readonly Readonly<{
373
+ expression: string;
374
+ message: string;
375
+ }>[] | undefined;
376
+ } | {
377
+ id: string;
378
+ type: "textarea";
379
+ path: string;
380
+ title: readonly {
381
+ locale: "zh" | "ja" | "en" | "ko";
382
+ message: string;
383
+ }[];
384
+ required?: boolean | undefined;
284
385
  icon?: string | undefined;
285
386
  style?: string | undefined;
286
387
  discardEmptyString?: boolean | undefined;
@@ -299,6 +400,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
299
400
  locale: "zh" | "ja" | "en" | "ko";
300
401
  message: string;
301
402
  }[];
403
+ required?: boolean | undefined;
302
404
  icon?: string | undefined;
303
405
  style?: string | undefined;
304
406
  min?: string | undefined;
@@ -322,6 +424,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
322
424
  label: string;
323
425
  value: string;
324
426
  key: string;
427
+ required?: boolean | undefined;
325
428
  icon?: string | undefined;
326
429
  style?: string | undefined;
327
430
  hidden?: string | undefined;
@@ -340,6 +443,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
340
443
  }[];
341
444
  mode: "date" | "month" | "year";
342
445
  value: string;
446
+ required?: boolean | undefined;
343
447
  icon?: string | undefined;
344
448
  style?: string | undefined;
345
449
  display?: string | undefined;
@@ -354,6 +458,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
354
458
  id: string;
355
459
  type: "slot";
356
460
  style?: string | undefined;
461
+ } | {
462
+ id: string;
463
+ type: "empty";
464
+ style?: string | undefined;
357
465
  })[];
358
466
  orientation?: "vertical" | "horizontal" | "floating" | undefined;
359
467
  style?: string | undefined;
@@ -20,6 +20,32 @@ export declare const StringFieldC: z.ZodObject<{
20
20
  }>;
21
21
  message: z.ZodString;
22
22
  }, z.core.$strip>>>;
23
+ required: z.ZodOptional<z.ZodBoolean>;
24
+ icon: z.ZodOptional<z.ZodString>;
25
+ style: z.ZodOptional<z.ZodString>;
26
+ discardEmptyString: z.ZodOptional<z.ZodBoolean>;
27
+ maxLength: z.ZodOptional<z.ZodString>;
28
+ hidden: z.ZodOptional<z.ZodString>;
29
+ disabled: z.ZodOptional<z.ZodString>;
30
+ validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
31
+ expression: z.ZodString;
32
+ message: z.ZodString;
33
+ }, z.core.$strip>>>>>;
34
+ }, z.core.$strip>;
35
+ export declare const TextareaFieldC: z.ZodObject<{
36
+ id: z.ZodUUID;
37
+ type: z.ZodLiteral<"textarea">;
38
+ path: z.ZodString;
39
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
40
+ locale: z.ZodEnum<{
41
+ zh: "zh";
42
+ ja: "ja";
43
+ en: "en";
44
+ ko: "ko";
45
+ }>;
46
+ message: z.ZodString;
47
+ }, z.core.$strip>>>;
48
+ required: z.ZodOptional<z.ZodBoolean>;
23
49
  icon: z.ZodOptional<z.ZodString>;
24
50
  style: z.ZodOptional<z.ZodString>;
25
51
  discardEmptyString: z.ZodOptional<z.ZodBoolean>;
@@ -44,6 +70,7 @@ export declare const NumberFieldC: z.ZodObject<{
44
70
  }>;
45
71
  message: z.ZodString;
46
72
  }, z.core.$strip>>>;
73
+ required: z.ZodOptional<z.ZodBoolean>;
47
74
  icon: z.ZodOptional<z.ZodString>;
48
75
  style: z.ZodOptional<z.ZodString>;
49
76
  min: z.ZodOptional<z.ZodString>;
@@ -69,6 +96,7 @@ export declare const SelectFieldC: z.ZodObject<{
69
96
  }>;
70
97
  message: z.ZodString;
71
98
  }, z.core.$strip>>>;
99
+ required: z.ZodOptional<z.ZodBoolean>;
72
100
  icon: z.ZodOptional<z.ZodString>;
73
101
  options: z.ZodString;
74
102
  label: z.ZodString;
@@ -95,6 +123,7 @@ export declare const CalendarFieldC: z.ZodObject<{
95
123
  }>;
96
124
  message: z.ZodString;
97
125
  }, z.core.$strip>>>;
126
+ required: z.ZodOptional<z.ZodBoolean>;
98
127
  icon: z.ZodOptional<z.ZodString>;
99
128
  style: z.ZodOptional<z.ZodString>;
100
129
  mode: z.ZodEnum<{
@@ -117,6 +146,11 @@ export declare const SlotFieldC: z.ZodObject<{
117
146
  type: z.ZodLiteral<"slot">;
118
147
  style: z.ZodOptional<z.ZodString>;
119
148
  }, z.core.$strict>;
149
+ export declare const EmptyFieldC: z.ZodObject<{
150
+ id: z.ZodUUID;
151
+ type: z.ZodLiteral<"empty">;
152
+ style: z.ZodOptional<z.ZodString>;
153
+ }, z.core.$strict>;
120
154
  export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
121
155
  id: z.ZodUUID;
122
156
  type: z.ZodLiteral<"string">;
@@ -130,6 +164,31 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
130
164
  }>;
131
165
  message: z.ZodString;
132
166
  }, z.core.$strip>>>;
167
+ required: z.ZodOptional<z.ZodBoolean>;
168
+ icon: z.ZodOptional<z.ZodString>;
169
+ style: z.ZodOptional<z.ZodString>;
170
+ discardEmptyString: z.ZodOptional<z.ZodBoolean>;
171
+ maxLength: z.ZodOptional<z.ZodString>;
172
+ hidden: z.ZodOptional<z.ZodString>;
173
+ disabled: z.ZodOptional<z.ZodString>;
174
+ validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
175
+ expression: z.ZodString;
176
+ message: z.ZodString;
177
+ }, z.core.$strip>>>>>;
178
+ }, z.core.$strip>, z.ZodObject<{
179
+ id: z.ZodUUID;
180
+ type: z.ZodLiteral<"textarea">;
181
+ path: z.ZodString;
182
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
183
+ locale: z.ZodEnum<{
184
+ zh: "zh";
185
+ ja: "ja";
186
+ en: "en";
187
+ ko: "ko";
188
+ }>;
189
+ message: z.ZodString;
190
+ }, z.core.$strip>>>;
191
+ required: z.ZodOptional<z.ZodBoolean>;
133
192
  icon: z.ZodOptional<z.ZodString>;
134
193
  style: z.ZodOptional<z.ZodString>;
135
194
  discardEmptyString: z.ZodOptional<z.ZodBoolean>;
@@ -153,6 +212,7 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
153
212
  }>;
154
213
  message: z.ZodString;
155
214
  }, z.core.$strip>>>;
215
+ required: z.ZodOptional<z.ZodBoolean>;
156
216
  icon: z.ZodOptional<z.ZodString>;
157
217
  style: z.ZodOptional<z.ZodString>;
158
218
  min: z.ZodOptional<z.ZodString>;
@@ -177,6 +237,7 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
177
237
  }>;
178
238
  message: z.ZodString;
179
239
  }, z.core.$strip>>>;
240
+ required: z.ZodOptional<z.ZodBoolean>;
180
241
  icon: z.ZodOptional<z.ZodString>;
181
242
  options: z.ZodString;
182
243
  label: z.ZodString;
@@ -202,6 +263,7 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
202
263
  }>;
203
264
  message: z.ZodString;
204
265
  }, z.core.$strip>>>;
266
+ required: z.ZodOptional<z.ZodBoolean>;
205
267
  icon: z.ZodOptional<z.ZodString>;
206
268
  style: z.ZodOptional<z.ZodString>;
207
269
  mode: z.ZodEnum<{
@@ -222,6 +284,10 @@ export declare const FieldC: z.ZodDiscriminatedUnion<[z.ZodObject<{
222
284
  id: z.ZodUUID;
223
285
  type: z.ZodLiteral<"slot">;
224
286
  style: z.ZodOptional<z.ZodString>;
287
+ }, z.core.$strict>, z.ZodObject<{
288
+ id: z.ZodUUID;
289
+ type: z.ZodLiteral<"empty">;
290
+ style: z.ZodOptional<z.ZodString>;
225
291
  }, z.core.$strict>], "type">;
226
292
  export declare const FieldsOrientationC: z.ZodEnum<{
227
293
  vertical: "vertical";
@@ -249,6 +315,31 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
249
315
  }>;
250
316
  message: z.ZodString;
251
317
  }, z.core.$strip>>>;
318
+ required: z.ZodOptional<z.ZodBoolean>;
319
+ icon: z.ZodOptional<z.ZodString>;
320
+ style: z.ZodOptional<z.ZodString>;
321
+ discardEmptyString: z.ZodOptional<z.ZodBoolean>;
322
+ maxLength: z.ZodOptional<z.ZodString>;
323
+ hidden: z.ZodOptional<z.ZodString>;
324
+ disabled: z.ZodOptional<z.ZodString>;
325
+ validation: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
326
+ expression: z.ZodString;
327
+ message: z.ZodString;
328
+ }, z.core.$strip>>>>>;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ id: z.ZodUUID;
331
+ type: z.ZodLiteral<"textarea">;
332
+ path: z.ZodString;
333
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
334
+ locale: z.ZodEnum<{
335
+ zh: "zh";
336
+ ja: "ja";
337
+ en: "en";
338
+ ko: "ko";
339
+ }>;
340
+ message: z.ZodString;
341
+ }, z.core.$strip>>>;
342
+ required: z.ZodOptional<z.ZodBoolean>;
252
343
  icon: z.ZodOptional<z.ZodString>;
253
344
  style: z.ZodOptional<z.ZodString>;
254
345
  discardEmptyString: z.ZodOptional<z.ZodBoolean>;
@@ -272,6 +363,7 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
272
363
  }>;
273
364
  message: z.ZodString;
274
365
  }, z.core.$strip>>>;
366
+ required: z.ZodOptional<z.ZodBoolean>;
275
367
  icon: z.ZodOptional<z.ZodString>;
276
368
  style: z.ZodOptional<z.ZodString>;
277
369
  min: z.ZodOptional<z.ZodString>;
@@ -296,6 +388,7 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
296
388
  }>;
297
389
  message: z.ZodString;
298
390
  }, z.core.$strip>>>;
391
+ required: z.ZodOptional<z.ZodBoolean>;
299
392
  icon: z.ZodOptional<z.ZodString>;
300
393
  options: z.ZodString;
301
394
  label: z.ZodString;
@@ -321,6 +414,7 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
321
414
  }>;
322
415
  message: z.ZodString;
323
416
  }, z.core.$strip>>>;
417
+ required: z.ZodOptional<z.ZodBoolean>;
324
418
  icon: z.ZodOptional<z.ZodString>;
325
419
  style: z.ZodOptional<z.ZodString>;
326
420
  mode: z.ZodEnum<{
@@ -341,9 +435,14 @@ export declare const FieldsConfigC: z.ZodReadonly<z.ZodObject<{
341
435
  id: z.ZodUUID;
342
436
  type: z.ZodLiteral<"slot">;
343
437
  style: z.ZodOptional<z.ZodString>;
438
+ }, z.core.$strict>, z.ZodObject<{
439
+ id: z.ZodUUID;
440
+ type: z.ZodLiteral<"empty">;
441
+ style: z.ZodOptional<z.ZodString>;
344
442
  }, z.core.$strict>], "type">>>;
345
443
  }, z.core.$strip>>;
346
444
  export type ValidationRule = z.infer<typeof ValidationRuleC>;
347
445
  export type Field = z.infer<typeof FieldC>;
348
446
  export type FieldsConfig = z.infer<typeof FieldsConfigC>;
349
447
  export type SlotField = z.infer<typeof SlotFieldC>;
448
+ export type EmptyField = z.infer<typeof EmptyFieldC>;