@shwfed/nuxt 0.10.15 → 0.11.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.
Files changed (62) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/button.d.vue.ts +8 -2
  3. package/dist/runtime/components/button.vue +19 -3
  4. package/dist/runtime/components/button.vue.d.ts +8 -2
  5. package/dist/runtime/components/component-config.d.ts +12 -0
  6. package/dist/runtime/components/component-config.js +22 -0
  7. package/dist/runtime/components/fields.d.vue.ts +9 -5
  8. package/dist/runtime/components/fields.vue +14 -5
  9. package/dist/runtime/components/fields.vue.d.ts +9 -5
  10. package/dist/runtime/components/markdown.d.vue.ts +19 -9
  11. package/dist/runtime/components/markdown.vue +15 -3
  12. package/dist/runtime/components/markdown.vue.d.ts +19 -9
  13. package/dist/runtime/components/menu-tabs.d.vue.ts +14 -4
  14. package/dist/runtime/components/menu-tabs.vue +15 -3
  15. package/dist/runtime/components/menu-tabs.vue.d.ts +14 -4
  16. package/dist/runtime/components/table.d.vue.ts +8 -3
  17. package/dist/runtime/components/table.vue +28 -2
  18. package/dist/runtime/components/table.vue.d.ts +8 -3
  19. package/dist/runtime/components/ui/button-configurator/ButtonConfiguratorDialog.d.vue.ts +4 -0
  20. package/dist/runtime/components/ui/button-configurator/ButtonConfiguratorDialog.vue +12 -4
  21. package/dist/runtime/components/ui/button-configurator/ButtonConfiguratorDialog.vue.d.ts +4 -0
  22. package/dist/runtime/components/ui/buttons/Buttons.d.vue.ts +11 -4
  23. package/dist/runtime/components/ui/buttons/Buttons.vue +74 -8
  24. package/dist/runtime/components/ui/buttons/Buttons.vue.d.ts +11 -4
  25. package/dist/runtime/components/ui/buttons/schema.d.ts +255 -2
  26. package/dist/runtime/components/ui/buttons/schema.js +13 -21
  27. package/dist/runtime/components/ui/fields/Fields.d.vue.ts +10 -2
  28. package/dist/runtime/components/ui/fields/Fields.vue +12 -3
  29. package/dist/runtime/components/ui/fields/Fields.vue.d.ts +10 -2
  30. package/dist/runtime/components/ui/fields/schema.d.ts +464 -0
  31. package/dist/runtime/components/ui/fields/schema.js +15 -2
  32. package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.d.vue.ts +4 -0
  33. package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue +10 -4
  34. package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue.d.ts +4 -0
  35. package/dist/runtime/components/ui/markdown/Markdown.d.vue.ts +18 -8
  36. package/dist/runtime/components/ui/markdown/Markdown.vue +13 -3
  37. package/dist/runtime/components/ui/markdown/Markdown.vue.d.ts +18 -8
  38. package/dist/runtime/components/ui/markdown/schema.d.ts +51 -6
  39. package/dist/runtime/components/ui/markdown/schema.js +15 -2
  40. package/dist/runtime/components/ui/markdown-configurator/MarkdownConfiguratorDialog.d.vue.ts +16 -7
  41. package/dist/runtime/components/ui/markdown-configurator/MarkdownConfiguratorDialog.vue +12 -7
  42. package/dist/runtime/components/ui/markdown-configurator/MarkdownConfiguratorDialog.vue.d.ts +16 -7
  43. package/dist/runtime/components/ui/menu-tabs/MenuTabs.d.vue.ts +14 -4
  44. package/dist/runtime/components/ui/menu-tabs/MenuTabs.vue +16 -5
  45. package/dist/runtime/components/ui/menu-tabs/MenuTabs.vue.d.ts +14 -4
  46. package/dist/runtime/components/ui/menu-tabs/schema.d.ts +42 -5
  47. package/dist/runtime/components/ui/menu-tabs/schema.js +13 -12
  48. package/dist/runtime/components/ui/menu-tabs-configurator/MenuTabsConfiguratorDialog.d.vue.ts +12 -3
  49. package/dist/runtime/components/ui/menu-tabs-configurator/MenuTabsConfiguratorDialog.vue +9 -5
  50. package/dist/runtime/components/ui/menu-tabs-configurator/MenuTabsConfiguratorDialog.vue.d.ts +12 -3
  51. package/dist/runtime/components/ui/table/Table.d.vue.ts +6 -2
  52. package/dist/runtime/components/ui/table/Table.vue +18 -2
  53. package/dist/runtime/components/ui/table/Table.vue.d.ts +6 -2
  54. package/dist/runtime/components/ui/table/schema.d.ts +239 -2
  55. package/dist/runtime/components/ui/table/schema.js +15 -6
  56. package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.d.vue.ts +4 -0
  57. package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue +2 -1
  58. package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue.d.ts +4 -0
  59. package/dist/runtime/composables/useButtonAction.d.ts +21 -0
  60. package/dist/runtime/composables/useButtonAction.js +6 -0
  61. package/dist/runtime/plugins/toast/index.d.ts +2 -2
  62. package/package.json +1 -1
@@ -1,7 +1,8 @@
1
+ import { Effect } from 'effect';
1
2
  import type { TableConfigInput } from './ui/table/schema.js';
2
3
  export type { Accessor, Column, Expression, Markdown, Render, TableConfig, TableConfigInput } from './ui/table/schema.js';
3
4
  export type { TableInstance } from './ui/table/Table.vue.js';
4
- export { AccessorC, ColumnC, RenderC, TableConfigC } from './ui/table/schema.js';
5
+ export { AccessorC, ColumnC, CURRENT_COMPATIBILITY_DATE, KIND, RenderC, SUPPORTED_COMPATIBILITY_DATES, TableBodyC, TableBodyInputC, TableConfigC, TableConfigInputC, createTableConfig, } from './ui/table/schema.js';
5
6
  declare module '@tanstack/vue-table' {
6
7
  interface ColumnMeta<TData extends import('@tanstack/vue-table').RowData, TValue> {
7
8
  tooltip?: string;
@@ -13,11 +14,13 @@ declare module '@tanstack/vue-table' {
13
14
  declare const _default: typeof __VLS_export;
14
15
  export default _default;
15
16
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
16
- config?: TableConfigInput | import("effect").Effect.Effect<TableConfigInput | undefined>;
17
+ config?: TableConfigInput | Effect.Effect<TableConfigInput | undefined>;
17
18
  data: Array<unknown>;
18
19
  rowCount?: number;
19
20
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
21
  "update:config": (args_0: Readonly<{
22
+ kind: string;
23
+ compatibilityDate: string;
21
24
  getRowId?: import("./table.vue.js").Expression;
22
25
  getSubRows?: import("./table.vue.js").Expression;
23
26
  enableRowSelection?: import("./table.vue.js").Expression;
@@ -74,11 +77,13 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
74
77
  paginationPageSizes?: ReadonlyArray<number>;
75
78
  }>) => any;
76
79
  }, string, import("vue").PublicProps, Readonly<{
77
- config?: TableConfigInput | import("effect").Effect.Effect<TableConfigInput | undefined>;
80
+ config?: TableConfigInput | Effect.Effect<TableConfigInput | undefined>;
78
81
  data: Array<unknown>;
79
82
  rowCount?: number;
80
83
  }> & Readonly<{
81
84
  "onUpdate:config"?: ((args_0: Readonly<{
85
+ kind: string;
86
+ compatibilityDate: string;
82
87
  getRowId?: import("./table.vue.js").Expression;
83
88
  getSubRows?: import("./table.vue.js").Expression;
84
89
  enableRowSelection?: import("./table.vue.js").Expression;
@@ -72,6 +72,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
72
72
  icon?: string | undefined;
73
73
  }>)[];
74
74
  }>[];
75
+ kind: string;
76
+ compatibilityDate: string;
75
77
  gap?: number | undefined;
76
78
  style?: string | undefined;
77
79
  }>) => any;
@@ -141,6 +143,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
141
143
  icon?: string | undefined;
142
144
  }>)[];
143
145
  }>[];
146
+ kind: string;
147
+ compatibilityDate: string;
144
148
  gap?: number | undefined;
145
149
  style?: string | undefined;
146
150
  }>) => any) | undefined;
@@ -7,7 +7,11 @@ import { computed, nextTick, ref, watch } from "vue";
7
7
  import { useI18n } from "vue-i18n";
8
8
  import { cn } from "../../../utils/cn";
9
9
  import { Button } from "../button";
10
- import { ButtonConfigC, ButtonsStyleC } from "../buttons/schema";
10
+ import {
11
+ ButtonBodyC,
12
+ ButtonConfigC,
13
+ ButtonsStyleC
14
+ } from "../buttons/schema";
11
15
  import { Checkbox } from "../checkbox";
12
16
  import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "../dialog";
13
17
  import { IconPicker } from "../icon-picker";
@@ -492,15 +496,19 @@ function buildDraftConfig() {
492
496
  selectedItemId.value = "general";
493
497
  return;
494
498
  }
495
- const result = ButtonConfigC.safeParse({
499
+ const bodyResult = ButtonBodyC.safeParse({
496
500
  gap: draftGap.value,
497
501
  style: generalStyleResult.data,
498
502
  groups: materializeButtonConfiguratorTree(draftTree.value)
499
503
  });
500
- if (!result.success) {
504
+ if (!bodyResult.success) {
501
505
  return;
502
506
  }
503
- return result.data;
507
+ return ButtonConfigC.parse({
508
+ ...bodyResult.data,
509
+ kind: props.config.kind,
510
+ compatibilityDate: props.config.compatibilityDate
511
+ });
504
512
  }
505
513
  function getValidDraftConfig(errorMessage) {
506
514
  const config = buildDraftConfig();
@@ -72,6 +72,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
72
72
  icon?: string | undefined;
73
73
  }>)[];
74
74
  }>[];
75
+ kind: string;
76
+ compatibilityDate: string;
75
77
  gap?: number | undefined;
76
78
  style?: string | undefined;
77
79
  }>) => any;
@@ -141,6 +143,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
141
143
  icon?: string | undefined;
142
144
  }>)[];
143
145
  }>[];
146
+ kind: string;
147
+ compatibilityDate: string;
144
148
  gap?: number | undefined;
145
149
  style?: string | undefined;
146
150
  }>) => any) | undefined;
@@ -1,11 +1,14 @@
1
1
  import { Effect } from 'effect';
2
- import { type ButtonConfig } from './schema.js';
2
+ import { type ButtonConfigInput } from './schema.js';
3
3
  export { ButtonActionC, ButtonConfigC, ButtonConfigInputC, ButtonDropdownC, ButtonGroupC, ButtonModalC, ButtonsStyleC } from './schema.js';
4
- export type { ButtonAction, ButtonConfig, ButtonConfigInput, ButtonDropdown, ButtonDropdownAction, ButtonGroup, ButtonGroupItem, ButtonModal } from './schema.js';
4
+ export { ButtonBodyC, ButtonBodyInputC, CURRENT_COMPATIBILITY_DATE, KIND, SUPPORTED_COMPATIBILITY_DATES, createButtonConfig, } from './schema.js';
5
+ export { ButtonActionService, currentButtonAction } from '../../../composables/useButtonAction.js';
6
+ export type { ButtonAction, ButtonBody, ButtonBodyInput, ButtonConfig, ButtonConfigInput, ButtonDropdown, ButtonDropdownAction, ButtonGroup, ButtonGroupItem, ButtonModal, } from './schema.js';
7
+ export type { ButtonActionEffect, ButtonActionEffectFactory, ButtonActionRuntime } from '../../../composables/useButtonAction.js';
5
8
  declare const _default: typeof __VLS_export;
6
9
  export default _default;
7
10
  declare const __VLS_export: import("vue").DefineComponent<{
8
- config: Effect.Effect<ButtonConfig | import("./schema.js").ButtonConfigInput | undefined>;
11
+ config: Effect.Effect<ButtonConfigInput | undefined>;
9
12
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
13
  "update:config": (args_0: Readonly<{
11
14
  groups: readonly Readonly<{
@@ -71,11 +74,13 @@ declare const __VLS_export: import("vue").DefineComponent<{
71
74
  icon?: string | undefined;
72
75
  }>)[];
73
76
  }>[];
77
+ kind: string;
78
+ compatibilityDate: string;
74
79
  gap?: number | undefined;
75
80
  style?: string | undefined;
76
81
  }>) => any;
77
82
  }, string, import("vue").PublicProps, Readonly<{
78
- config: Effect.Effect<ButtonConfig | import("./schema.js").ButtonConfigInput | undefined>;
83
+ config: Effect.Effect<ButtonConfigInput | undefined>;
79
84
  }> & Readonly<{
80
85
  "onUpdate:config"?: ((args_0: Readonly<{
81
86
  groups: readonly Readonly<{
@@ -141,6 +146,8 @@ declare const __VLS_export: import("vue").DefineComponent<{
141
146
  icon?: string | undefined;
142
147
  }>)[];
143
148
  }>[];
149
+ kind: string;
150
+ compatibilityDate: string;
144
151
  gap?: number | undefined;
145
152
  style?: string | undefined;
146
153
  }>) => any) | undefined;
@@ -6,6 +6,9 @@ import { Icon } from "@iconify/vue";
6
6
  import { Effect } from "effect";
7
7
  import { useI18n } from "vue-i18n";
8
8
  import { useCheating } from "#imports";
9
+ import {
10
+ ButtonActionService
11
+ } from "../../../composables/useButtonAction";
9
12
  import { provideOverlay, useOverlay } from "../../../composables/useOverlay";
10
13
  import { getLocalizedText, hasVisibleLocaleValue } from "../../../utils/coders";
11
14
  import { cn } from "../../../utils/cn";
@@ -15,7 +18,10 @@ import { ButtonGroup } from "../button-group";
15
18
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../dropdown-menu";
16
19
  import { Skeleton } from "../skeleton";
17
20
  import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip";
18
- import { ButtonConfigC, normalizeButtonConfigInput } from "./schema";
21
+ import {
22
+ ButtonConfigC,
23
+ createButtonConfig
24
+ } from "./schema";
19
25
  defineOptions({
20
26
  inheritAttrs: false
21
27
  });
@@ -23,10 +29,10 @@ const props = defineProps({
23
29
  config: { type: null, required: true }
24
30
  });
25
31
  const emit = defineEmits(["update:config"]);
26
- const defaultConfig = {
32
+ const defaultConfig = createButtonConfig({
27
33
  gap: 4,
28
34
  groups: []
29
- };
35
+ });
30
36
  const uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu;
31
37
  const attrs = useAttrs();
32
38
  const slots = useSlots();
@@ -38,7 +44,7 @@ const isConfiguratorOpen = ref(false);
38
44
  const pendingIds = ref([]);
39
45
  const overlayOwnerId = crypto.randomUUID();
40
46
  const currentConfig = computedAsync(
41
- async () => ButtonConfigC.parse(normalizeButtonConfigInput(await props.config.pipe(Effect.runPromise)))
47
+ async () => ButtonConfigC.parse(await props.config.pipe(Effect.runPromise) ?? defaultConfig)
42
48
  );
43
49
  const displayConfig = ref(defaultConfig);
44
50
  watch(currentConfig, (value) => {
@@ -151,11 +157,14 @@ function getButtonEffect(buttonId) {
151
157
  function isEffectValue(value) {
152
158
  return typeof value === "object" && value !== null && "_op" in value;
153
159
  }
160
+ function isEffectFactory(value) {
161
+ return typeof value === "function";
162
+ }
154
163
  function isPending(buttonId) {
155
164
  return pendingIds.value.includes(buttonId);
156
165
  }
157
166
  function isButtonDisabled(buttonId) {
158
- return isPending(buttonId) || !isEffectValue(getButtonEffect(buttonId));
167
+ return isPending(buttonId) || !(isEffectValue(getButtonEffect(buttonId)) || isEffectFactory(getButtonEffect(buttonId)));
159
168
  }
160
169
  function isDropdownPending(dropdown) {
161
170
  return dropdown.items.some((item) => isPending(item.id));
@@ -163,17 +172,65 @@ function isDropdownPending(dropdown) {
163
172
  function hasButtonTooltip(button) {
164
173
  return hasVisibleLocaleValue(button.tooltip);
165
174
  }
175
+ function findButtonAction(buttonId) {
176
+ for (const group of displayConfig.value.groups) {
177
+ for (const item of group.items) {
178
+ if (isDropdownItem(item)) {
179
+ const child = item.items.find((candidate) => candidate.id === buttonId);
180
+ if (child) {
181
+ return child;
182
+ }
183
+ continue;
184
+ }
185
+ if (item.id === buttonId) {
186
+ return item;
187
+ }
188
+ }
189
+ }
190
+ return void 0;
191
+ }
192
+ function createButtonActionRuntime(button) {
193
+ const tooltip = getButtonTooltip(button);
194
+ return {
195
+ id: button.id,
196
+ locale: locale.value,
197
+ title: getButtonLabel(button),
198
+ description: tooltip,
199
+ tooltip
200
+ };
201
+ }
202
+ function resolveButtonEffect(button) {
203
+ const value = getButtonEffect(button.id);
204
+ if (isEffectValue(value)) {
205
+ return value;
206
+ }
207
+ if (!isEffectFactory(value)) {
208
+ return void 0;
209
+ }
210
+ const effect = value(createButtonActionRuntime(button));
211
+ return isEffectValue(effect) ? effect : void 0;
212
+ }
166
213
  async function runButton(buttonId) {
167
214
  if (isPending(buttonId)) {
168
215
  return;
169
216
  }
170
- const effect = getButtonEffect(buttonId);
171
- if (!isEffectValue(effect)) {
217
+ const button = findButtonAction(buttonId);
218
+ if (!button) {
219
+ return;
220
+ }
221
+ const effect = resolveButtonEffect(button);
222
+ if (!effect) {
172
223
  return;
173
224
  }
225
+ const action = createButtonActionRuntime(button);
174
226
  pendingIds.value = [...pendingIds.value, buttonId];
175
227
  try {
176
- await Effect.runPromise(provideOverlay(Effect.scoped(effect), overlay));
228
+ await Effect.runPromise(
229
+ provideOverlay(
230
+ Effect.scoped(effect).pipe(Effect.provideService(ButtonActionService, action)),
231
+ overlay
232
+ )
233
+ );
177
234
  } finally {
178
235
  pendingIds.value = pendingIds.value.filter((id) => id !== buttonId);
179
236
  }
@@ -200,6 +257,15 @@ function hasLeadingPrimaryGap(items, itemIndex) {
200
257
 
201
258
  <script>
202
259
  export { ButtonActionC, ButtonConfigC, ButtonConfigInputC, ButtonDropdownC, ButtonGroupC, ButtonModalC, ButtonsStyleC } from "./schema";
260
+ export {
261
+ ButtonBodyC,
262
+ ButtonBodyInputC,
263
+ CURRENT_COMPATIBILITY_DATE,
264
+ KIND,
265
+ SUPPORTED_COMPATIBILITY_DATES,
266
+ createButtonConfig
267
+ } from "./schema";
268
+ export { ButtonActionService, currentButtonAction } from "../../../composables/useButtonAction";
203
269
  </script>
204
270
 
205
271
  <template>
@@ -1,11 +1,14 @@
1
1
  import { Effect } from 'effect';
2
- import { type ButtonConfig } from './schema.js';
2
+ import { type ButtonConfigInput } from './schema.js';
3
3
  export { ButtonActionC, ButtonConfigC, ButtonConfigInputC, ButtonDropdownC, ButtonGroupC, ButtonModalC, ButtonsStyleC } from './schema.js';
4
- export type { ButtonAction, ButtonConfig, ButtonConfigInput, ButtonDropdown, ButtonDropdownAction, ButtonGroup, ButtonGroupItem, ButtonModal } from './schema.js';
4
+ export { ButtonBodyC, ButtonBodyInputC, CURRENT_COMPATIBILITY_DATE, KIND, SUPPORTED_COMPATIBILITY_DATES, createButtonConfig, } from './schema.js';
5
+ export { ButtonActionService, currentButtonAction } from '../../../composables/useButtonAction.js';
6
+ export type { ButtonAction, ButtonBody, ButtonBodyInput, ButtonConfig, ButtonConfigInput, ButtonDropdown, ButtonDropdownAction, ButtonGroup, ButtonGroupItem, ButtonModal, } from './schema.js';
7
+ export type { ButtonActionEffect, ButtonActionEffectFactory, ButtonActionRuntime } from '../../../composables/useButtonAction.js';
5
8
  declare const _default: typeof __VLS_export;
6
9
  export default _default;
7
10
  declare const __VLS_export: import("vue").DefineComponent<{
8
- config: Effect.Effect<ButtonConfig | import("./schema.js").ButtonConfigInput | undefined>;
11
+ config: Effect.Effect<ButtonConfigInput | undefined>;
9
12
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
13
  "update:config": (args_0: Readonly<{
11
14
  groups: readonly Readonly<{
@@ -71,11 +74,13 @@ declare const __VLS_export: import("vue").DefineComponent<{
71
74
  icon?: string | undefined;
72
75
  }>)[];
73
76
  }>[];
77
+ kind: string;
78
+ compatibilityDate: string;
74
79
  gap?: number | undefined;
75
80
  style?: string | undefined;
76
81
  }>) => any;
77
82
  }, string, import("vue").PublicProps, Readonly<{
78
- config: Effect.Effect<ButtonConfig | import("./schema.js").ButtonConfigInput | undefined>;
83
+ config: Effect.Effect<ButtonConfigInput | undefined>;
79
84
  }> & Readonly<{
80
85
  "onUpdate:config"?: ((args_0: Readonly<{
81
86
  groups: readonly Readonly<{
@@ -141,6 +146,8 @@ declare const __VLS_export: import("vue").DefineComponent<{
141
146
  icon?: string | undefined;
142
147
  }>)[];
143
148
  }>[];
149
+ kind: string;
150
+ compatibilityDate: string;
144
151
  gap?: number | undefined;
145
152
  style?: string | undefined;
146
153
  }>) => any) | undefined;
@@ -1,5 +1,8 @@
1
1
  import z from 'zod';
2
2
  import type { ButtonVariants } from '../button/index.js';
3
+ export declare const KIND = "shwfed.component.button";
4
+ export declare const CURRENT_COMPATIBILITY_DATE = "2026-03-20";
5
+ export declare const SUPPORTED_COMPATIBILITY_DATES: string[];
3
6
  export declare const ButtonsStyleC: z.ZodOptional<z.ZodString>;
4
7
  export declare const ButtonModalC: z.ZodReadonly<z.ZodObject<{
5
8
  title: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -424,6 +427,250 @@ export declare const ButtonGroupC: z.ZodReadonly<z.ZodObject<{
424
427
  }, z.core.$strict>>>>;
425
428
  }, z.core.$strict>>]>>>;
426
429
  }, z.core.$strict>>;
430
+ export declare const ButtonBodyC: z.ZodReadonly<z.ZodObject<{
431
+ gap: z.ZodOptional<z.ZodNumber>;
432
+ style: z.ZodOptional<z.ZodString>;
433
+ groups: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
434
+ id: z.ZodUUID;
435
+ items: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
436
+ id: z.ZodUUID;
437
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
438
+ locale: z.ZodEnum<{
439
+ zh: "zh";
440
+ ja: "ja";
441
+ en: "en";
442
+ ko: "ko";
443
+ }>;
444
+ message: z.ZodString;
445
+ }, z.core.$strip>>>;
446
+ tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
447
+ locale: z.ZodEnum<{
448
+ zh: "zh";
449
+ ja: "ja";
450
+ en: "en";
451
+ ko: "ko";
452
+ }>;
453
+ message: z.ZodString;
454
+ }, z.core.$strip>>>>;
455
+ icon: z.ZodOptional<z.ZodString>;
456
+ variant: z.ZodOptional<z.ZodEnum<{
457
+ default: "default";
458
+ destructive: "destructive";
459
+ primary: "primary";
460
+ ghost: "ghost";
461
+ }>>;
462
+ hideTitle: z.ZodOptional<z.ZodBoolean>;
463
+ modal: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
464
+ title: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
465
+ locale: z.ZodEnum<{
466
+ zh: "zh";
467
+ ja: "ja";
468
+ en: "en";
469
+ ko: "ko";
470
+ }>;
471
+ message: z.ZodString;
472
+ }, z.core.$strip>>>>;
473
+ description: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
474
+ locale: z.ZodEnum<{
475
+ zh: "zh";
476
+ ja: "ja";
477
+ en: "en";
478
+ ko: "ko";
479
+ }>;
480
+ message: z.ZodString;
481
+ }, z.core.$strip>>>>;
482
+ showCloseButton: z.ZodOptional<z.ZodBoolean>;
483
+ breakpoint: z.ZodOptional<z.ZodString>;
484
+ dismissible: z.ZodOptional<z.ZodBoolean>;
485
+ }, z.core.$strict>>>;
486
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
487
+ id: z.ZodUUID;
488
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
489
+ locale: z.ZodEnum<{
490
+ zh: "zh";
491
+ ja: "ja";
492
+ en: "en";
493
+ ko: "ko";
494
+ }>;
495
+ message: z.ZodString;
496
+ }, z.core.$strip>>>;
497
+ icon: z.ZodOptional<z.ZodString>;
498
+ items: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
499
+ id: z.ZodUUID;
500
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
501
+ locale: z.ZodEnum<{
502
+ zh: "zh";
503
+ ja: "ja";
504
+ en: "en";
505
+ ko: "ko";
506
+ }>;
507
+ message: z.ZodString;
508
+ }, z.core.$strip>>>;
509
+ tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
510
+ locale: z.ZodEnum<{
511
+ zh: "zh";
512
+ ja: "ja";
513
+ en: "en";
514
+ ko: "ko";
515
+ }>;
516
+ message: z.ZodString;
517
+ }, z.core.$strip>>>>;
518
+ icon: z.ZodOptional<z.ZodString>;
519
+ variant: z.ZodOptional<z.ZodEnum<{
520
+ default: "default";
521
+ destructive: "destructive";
522
+ primary: "primary";
523
+ ghost: "ghost";
524
+ }>>;
525
+ modal: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
526
+ title: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
527
+ locale: z.ZodEnum<{
528
+ zh: "zh";
529
+ ja: "ja";
530
+ en: "en";
531
+ ko: "ko";
532
+ }>;
533
+ message: z.ZodString;
534
+ }, z.core.$strip>>>>;
535
+ description: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
536
+ locale: z.ZodEnum<{
537
+ zh: "zh";
538
+ ja: "ja";
539
+ en: "en";
540
+ ko: "ko";
541
+ }>;
542
+ message: z.ZodString;
543
+ }, z.core.$strip>>>>;
544
+ showCloseButton: z.ZodOptional<z.ZodBoolean>;
545
+ breakpoint: z.ZodOptional<z.ZodString>;
546
+ dismissible: z.ZodOptional<z.ZodBoolean>;
547
+ }, z.core.$strict>>>;
548
+ }, z.core.$strict>>>>;
549
+ }, z.core.$strict>>]>>>;
550
+ }, z.core.$strict>>>>;
551
+ }, z.core.$strict>>;
552
+ export declare const ButtonBodyInputC: z.ZodReadonly<z.ZodObject<{
553
+ gap: z.ZodOptional<z.ZodNumber>;
554
+ style: z.ZodOptional<z.ZodString>;
555
+ groups: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
556
+ id: z.ZodUUID;
557
+ items: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
558
+ id: z.ZodUUID;
559
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
560
+ locale: z.ZodEnum<{
561
+ zh: "zh";
562
+ ja: "ja";
563
+ en: "en";
564
+ ko: "ko";
565
+ }>;
566
+ message: z.ZodString;
567
+ }, z.core.$strip>>>;
568
+ tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
569
+ locale: z.ZodEnum<{
570
+ zh: "zh";
571
+ ja: "ja";
572
+ en: "en";
573
+ ko: "ko";
574
+ }>;
575
+ message: z.ZodString;
576
+ }, z.core.$strip>>>>;
577
+ icon: z.ZodOptional<z.ZodString>;
578
+ variant: z.ZodOptional<z.ZodEnum<{
579
+ default: "default";
580
+ destructive: "destructive";
581
+ primary: "primary";
582
+ ghost: "ghost";
583
+ }>>;
584
+ hideTitle: z.ZodOptional<z.ZodBoolean>;
585
+ modal: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
586
+ title: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
587
+ locale: z.ZodEnum<{
588
+ zh: "zh";
589
+ ja: "ja";
590
+ en: "en";
591
+ ko: "ko";
592
+ }>;
593
+ message: z.ZodString;
594
+ }, z.core.$strip>>>>;
595
+ description: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
596
+ locale: z.ZodEnum<{
597
+ zh: "zh";
598
+ ja: "ja";
599
+ en: "en";
600
+ ko: "ko";
601
+ }>;
602
+ message: z.ZodString;
603
+ }, z.core.$strip>>>>;
604
+ showCloseButton: z.ZodOptional<z.ZodBoolean>;
605
+ breakpoint: z.ZodOptional<z.ZodString>;
606
+ dismissible: z.ZodOptional<z.ZodBoolean>;
607
+ }, z.core.$strict>>>;
608
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
609
+ id: z.ZodUUID;
610
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
611
+ locale: z.ZodEnum<{
612
+ zh: "zh";
613
+ ja: "ja";
614
+ en: "en";
615
+ ko: "ko";
616
+ }>;
617
+ message: z.ZodString;
618
+ }, z.core.$strip>>>;
619
+ icon: z.ZodOptional<z.ZodString>;
620
+ items: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
621
+ id: z.ZodUUID;
622
+ title: z.ZodReadonly<z.ZodArray<z.ZodObject<{
623
+ locale: z.ZodEnum<{
624
+ zh: "zh";
625
+ ja: "ja";
626
+ en: "en";
627
+ ko: "ko";
628
+ }>;
629
+ message: z.ZodString;
630
+ }, z.core.$strip>>>;
631
+ tooltip: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
632
+ locale: z.ZodEnum<{
633
+ zh: "zh";
634
+ ja: "ja";
635
+ en: "en";
636
+ ko: "ko";
637
+ }>;
638
+ message: z.ZodString;
639
+ }, z.core.$strip>>>>;
640
+ icon: z.ZodOptional<z.ZodString>;
641
+ variant: z.ZodOptional<z.ZodEnum<{
642
+ default: "default";
643
+ destructive: "destructive";
644
+ primary: "primary";
645
+ ghost: "ghost";
646
+ }>>;
647
+ modal: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
648
+ title: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
649
+ locale: z.ZodEnum<{
650
+ zh: "zh";
651
+ ja: "ja";
652
+ en: "en";
653
+ ko: "ko";
654
+ }>;
655
+ message: z.ZodString;
656
+ }, z.core.$strip>>>>;
657
+ description: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
658
+ locale: z.ZodEnum<{
659
+ zh: "zh";
660
+ ja: "ja";
661
+ en: "en";
662
+ ko: "ko";
663
+ }>;
664
+ message: z.ZodString;
665
+ }, z.core.$strip>>>>;
666
+ showCloseButton: z.ZodOptional<z.ZodBoolean>;
667
+ breakpoint: z.ZodOptional<z.ZodString>;
668
+ dismissible: z.ZodOptional<z.ZodBoolean>;
669
+ }, z.core.$strict>>>;
670
+ }, z.core.$strict>>>>;
671
+ }, z.core.$strict>>]>>>;
672
+ }, z.core.$strict>>>>;
673
+ }, z.core.$strict>>;
427
674
  export declare const ButtonConfigC: z.ZodReadonly<z.ZodObject<{
428
675
  gap: z.ZodOptional<z.ZodNumber>;
429
676
  style: z.ZodOptional<z.ZodString>;
@@ -545,6 +792,8 @@ export declare const ButtonConfigC: z.ZodReadonly<z.ZodObject<{
545
792
  }, z.core.$strict>>>>;
546
793
  }, z.core.$strict>>]>>>;
547
794
  }, z.core.$strict>>>>;
795
+ kind: z.ZodLiteral<string>;
796
+ compatibilityDate: z.ZodString;
548
797
  }, z.core.$strict>>;
549
798
  export declare const ButtonConfigInputC: z.ZodReadonly<z.ZodObject<{
550
799
  gap: z.ZodOptional<z.ZodNumber>;
@@ -667,6 +916,8 @@ export declare const ButtonConfigInputC: z.ZodReadonly<z.ZodObject<{
667
916
  }, z.core.$strict>>>>;
668
917
  }, z.core.$strict>>]>>>;
669
918
  }, z.core.$strict>>>>;
919
+ kind: z.ZodLiteral<string>;
920
+ compatibilityDate: z.ZodString;
670
921
  }, z.core.$strict>>;
671
922
  export type ButtonModal = z.infer<typeof ButtonModalC>;
672
923
  export type ButtonAction = z.infer<typeof ButtonActionC>;
@@ -674,8 +925,10 @@ export type ButtonDropdown = z.infer<typeof ButtonDropdownC>;
674
925
  export type ButtonDropdownAction = z.infer<typeof DropdownButtonActionC>;
675
926
  export type ButtonGroupItem = z.infer<typeof ButtonGroupItemC>;
676
927
  export type ButtonGroup = z.infer<typeof ButtonGroupC>;
928
+ export type ButtonBody = z.infer<typeof ButtonBodyC>;
929
+ export type ButtonBodyInput = z.input<typeof ButtonBodyInputC>;
677
930
  export type ButtonConfig = z.infer<typeof ButtonConfigC>;
678
- export type ButtonConfigInput = z.infer<typeof ButtonConfigInputC>;
679
- export declare function normalizeButtonConfigInput(value: unknown): unknown;
931
+ export type ButtonConfigInput = z.input<typeof ButtonConfigInputC>;
932
+ export declare function createButtonConfig(body: ButtonBody): ButtonConfig;
680
933
  export type ButtonVariant = ButtonVariants['variant'];
681
934
  export {};