@shwfed/config 2.7.3 → 2.7.5

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 (108) hide show
  1. package/dist/mcp.mjs +36 -5
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/badge-DamXUB_x.js +1 -0
  4. package/dist/preview/assets/{config-5JFmp62X.js → config-CXgHZFVu.js} +1 -1
  5. package/dist/preview/assets/{config-BkS5uufU.js → config-CYixJlBY.js} +1 -1
  6. package/dist/preview/assets/{config-DE97oObU.js → config-CtPQb6dK.js} +1 -1
  7. package/dist/preview/assets/{config-Ck5_8YaL.js → config-DBviu6U0.js} +1 -1
  8. package/dist/preview/assets/{config-Bo4cd_u5.js → config-Dtj6xvFB.js} +1 -1
  9. package/dist/preview/assets/{config-CMcqX_mc.js → config-DyKtOYYU.js} +1 -1
  10. package/dist/preview/assets/{config-BoVPp04e.js → config-ISM4vT-S.js} +1 -1
  11. package/dist/preview/assets/{config-dk7L4924.js → config-ulTPyAGw.js} +1 -1
  12. package/dist/preview/assets/{config-L72ON8PT.js → config-v7KXfP3A.js} +1 -1
  13. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-Cr7UNELp.js → definition.vue_vue_type_script_setup_true_lang-C-3KP_in.js} +1 -1
  14. package/dist/preview/assets/index-CqWUukUH.css +1 -0
  15. package/dist/preview/assets/index-CzxZSeNm.js +680 -0
  16. package/dist/preview/assets/{index-DumuGVME.js → index-D6fhWrrp.js} +1 -1
  17. package/dist/preview/assets/index-DUSkLHHf.js +1 -0
  18. package/dist/preview/assets/{item-BhBaPg4Z.js → item-BAj_4_7-.js} +1 -1
  19. package/dist/preview/assets/{runtime-BbGu9CHo.js → runtime-B7NcvR9y.js} +1 -1
  20. package/dist/preview/assets/{runtime-DrxczhTW.js → runtime-BqlrYWt_.js} +1 -1
  21. package/dist/preview/assets/{runtime-luMscNiE.js → runtime-CiWg_Jub.js} +1 -1
  22. package/dist/preview/assets/{runtime-CILO8PDD.js → runtime-CpMT9U1z.js} +1 -1
  23. package/dist/preview/assets/{runtime-C6Pc6N3T.js → runtime-CswN1gKf.js} +1 -1
  24. package/dist/preview/assets/{runtime-iR16bMIx.js → runtime-DOK5OTJn.js} +1 -1
  25. package/dist/preview/assets/{runtime-DZuxXJrv.js → runtime-DldmFxn1.js} +1 -1
  26. package/dist/preview/assets/{runtime-CrNhb4dv.js → runtime-WZBVKYom.js} +1 -1
  27. package/dist/preview/assets/{runtime-KTenCV-J.js → runtime-jVzpCkuu.js} +1 -1
  28. package/dist/preview/index.html +2 -2
  29. package/dist/runtime/components/block-layout-editor/index.d.vue.ts +19 -1
  30. package/dist/runtime/components/block-layout-editor/index.vue +131 -38
  31. package/dist/runtime/components/block-layout-editor/index.vue.d.ts +19 -1
  32. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +4 -0
  33. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +4 -0
  34. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +4 -0
  35. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +4 -0
  36. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +4 -0
  37. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +4 -0
  38. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +4 -0
  39. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +4 -0
  40. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +4 -0
  41. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +6 -0
  42. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/badge.vue +11 -1
  43. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/config.d.vue.ts +2 -0
  44. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/config.vue +48 -21
  45. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/config.vue.d.ts +2 -0
  46. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/runtime.d.vue.ts +2 -0
  47. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/runtime.vue +46 -26
  48. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/runtime.vue.d.ts +2 -0
  49. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.d.ts +2 -0
  50. package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.js +12 -1
  51. package/dist/runtime/components/form/FormUnitRenderer.vue +2 -8
  52. package/dist/runtime/components/form/config.vue +49 -1
  53. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +1 -0
  54. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.js +4 -1
  55. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +16 -16
  56. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +16 -16
  57. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +18 -18
  58. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +18 -18
  59. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +16 -16
  60. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +16 -16
  61. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +18 -18
  62. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +18 -18
  63. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +1 -0
  64. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +4 -1
  65. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +1 -0
  66. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.js +4 -1
  67. package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/schema.d.ts +1 -0
  68. package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/schema.js +4 -1
  69. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +16 -16
  70. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +16 -16
  71. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +18 -18
  72. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +18 -18
  73. package/dist/runtime/components/form/index.d.vue.ts +1 -0
  74. package/dist/runtime/components/form/index.vue +8 -0
  75. package/dist/runtime/components/form/index.vue.d.ts +1 -0
  76. package/dist/runtime/components/form/schema.d.ts +25 -0
  77. package/dist/runtime/components/form/schema.js +17 -0
  78. package/dist/runtime/components/form/unit-config.vue +32 -4
  79. package/dist/runtime/components/form/utils/history.d.ts +8 -0
  80. package/dist/runtime/components/form/utils/history.js +8 -0
  81. package/dist/runtime/components/form/utils/resolve.d.ts +9 -0
  82. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +26 -26
  83. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +26 -26
  84. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +26 -26
  85. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +26 -26
  86. package/dist/runtime/components/table/schema.d.ts +8 -0
  87. package/dist/runtime/components/ui/command/CommandItem.d.vue.ts +2 -2
  88. package/dist/runtime/components/ui/command/CommandItem.vue +1 -0
  89. package/dist/runtime/components/ui/command/CommandItem.vue.d.ts +2 -2
  90. package/dist/runtime/components/ui/context-menu/ContextMenuContent.d.vue.ts +0 -1
  91. package/dist/runtime/components/ui/context-menu/ContextMenuContent.vue +3 -4
  92. package/dist/runtime/components/ui/context-menu/ContextMenuContent.vue.d.ts +0 -1
  93. package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue +17 -2
  94. package/dist/runtime/components/ui/input-group/InputGroupCombobox.d.vue.ts +2 -8
  95. package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue +6 -5
  96. package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue.d.ts +2 -8
  97. package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +0 -1
  98. package/dist/runtime/components/ui/popover/PopoverContent.vue +3 -4
  99. package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +0 -1
  100. package/dist/runtime/components/ui/tooltip/TooltipContent.d.vue.ts +0 -1
  101. package/dist/runtime/components/ui/tooltip/TooltipContent.vue +3 -4
  102. package/dist/runtime/components/ui/tooltip/TooltipContent.vue.d.ts +0 -1
  103. package/dist/runtime/share/slot-renderer.vue +2 -8
  104. package/package.json +1 -1
  105. package/dist/preview/assets/badge-CV7CwAKY.js +0 -1
  106. package/dist/preview/assets/index-C2PrdVxC.css +0 -1
  107. package/dist/preview/assets/index-CTZy_nrf.js +0 -680
  108. package/dist/preview/assets/index-CY99yvOi.js +0 -1
@@ -52,28 +52,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
52
52
  readonly locale: "en" | "ja" | "ko";
53
53
  readonly message: string;
54
54
  }[]] | undefined;
55
- readonly presets?: readonly {
56
- readonly label: readonly [{
55
+ readonly validations?: readonly {
56
+ readonly message: readonly [{
57
57
  readonly locale: "zh";
58
58
  readonly message: string;
59
59
  }, ...{
60
60
  readonly locale: "en" | "ja" | "ko";
61
61
  readonly message: string;
62
62
  }[]];
63
- readonly id: string;
64
- readonly end: string;
65
- readonly start: string;
63
+ readonly warning?: boolean | undefined;
64
+ readonly when: string;
66
65
  }[] | undefined;
67
- readonly validations?: readonly {
68
- readonly message: readonly [{
66
+ readonly presets?: readonly {
67
+ readonly label: readonly [{
69
68
  readonly locale: "zh";
70
69
  readonly message: string;
71
70
  }, ...{
72
71
  readonly locale: "en" | "ja" | "ko";
73
72
  readonly message: string;
74
73
  }[]];
75
- readonly warning?: boolean | undefined;
76
- readonly when: string;
74
+ readonly id: string;
75
+ readonly end: string;
76
+ readonly start: string;
77
77
  }[] | undefined;
78
78
  }) => any;
79
79
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -126,28 +126,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
126
126
  readonly locale: "en" | "ja" | "ko";
127
127
  readonly message: string;
128
128
  }[]] | undefined;
129
- readonly presets?: readonly {
130
- readonly label: readonly [{
129
+ readonly validations?: readonly {
130
+ readonly message: readonly [{
131
131
  readonly locale: "zh";
132
132
  readonly message: string;
133
133
  }, ...{
134
134
  readonly locale: "en" | "ja" | "ko";
135
135
  readonly message: string;
136
136
  }[]];
137
- readonly id: string;
138
- readonly end: string;
139
- readonly start: string;
137
+ readonly warning?: boolean | undefined;
138
+ readonly when: string;
140
139
  }[] | undefined;
141
- readonly validations?: readonly {
142
- readonly message: readonly [{
140
+ readonly presets?: readonly {
141
+ readonly label: readonly [{
143
142
  readonly locale: "zh";
144
143
  readonly message: string;
145
144
  }, ...{
146
145
  readonly locale: "en" | "ja" | "ko";
147
146
  readonly message: string;
148
147
  }[]];
149
- readonly warning?: boolean | undefined;
150
- readonly when: string;
148
+ readonly id: string;
149
+ readonly end: string;
150
+ readonly start: string;
151
151
  }[] | undefined;
152
152
  }) => any) | undefined;
153
153
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -52,28 +52,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
52
52
  readonly locale: "en" | "ja" | "ko";
53
53
  readonly message: string;
54
54
  }[]] | undefined;
55
- readonly presets?: readonly {
56
- readonly label: readonly [{
55
+ readonly validations?: readonly {
56
+ readonly message: readonly [{
57
57
  readonly locale: "zh";
58
58
  readonly message: string;
59
59
  }, ...{
60
60
  readonly locale: "en" | "ja" | "ko";
61
61
  readonly message: string;
62
62
  }[]];
63
- readonly id: string;
64
- readonly end: string;
65
- readonly start: string;
63
+ readonly warning?: boolean | undefined;
64
+ readonly when: string;
66
65
  }[] | undefined;
67
- readonly validations?: readonly {
68
- readonly message: readonly [{
66
+ readonly presets?: readonly {
67
+ readonly label: readonly [{
69
68
  readonly locale: "zh";
70
69
  readonly message: string;
71
70
  }, ...{
72
71
  readonly locale: "en" | "ja" | "ko";
73
72
  readonly message: string;
74
73
  }[]];
75
- readonly warning?: boolean | undefined;
76
- readonly when: string;
74
+ readonly id: string;
75
+ readonly end: string;
76
+ readonly start: string;
77
77
  }[] | undefined;
78
78
  }) => any;
79
79
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -126,28 +126,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
126
126
  readonly locale: "en" | "ja" | "ko";
127
127
  readonly message: string;
128
128
  }[]] | undefined;
129
- readonly presets?: readonly {
130
- readonly label: readonly [{
129
+ readonly validations?: readonly {
130
+ readonly message: readonly [{
131
131
  readonly locale: "zh";
132
132
  readonly message: string;
133
133
  }, ...{
134
134
  readonly locale: "en" | "ja" | "ko";
135
135
  readonly message: string;
136
136
  }[]];
137
- readonly id: string;
138
- readonly end: string;
139
- readonly start: string;
137
+ readonly warning?: boolean | undefined;
138
+ readonly when: string;
140
139
  }[] | undefined;
141
- readonly validations?: readonly {
142
- readonly message: readonly [{
140
+ readonly presets?: readonly {
141
+ readonly label: readonly [{
143
142
  readonly locale: "zh";
144
143
  readonly message: string;
145
144
  }, ...{
146
145
  readonly locale: "en" | "ja" | "ko";
147
146
  readonly message: string;
148
147
  }[]];
149
- readonly warning?: boolean | undefined;
150
- readonly when: string;
148
+ readonly id: string;
149
+ readonly end: string;
150
+ readonly start: string;
151
151
  }[] | undefined;
152
152
  }) => any) | undefined;
153
153
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -16,6 +16,7 @@ export declare const metadata: {
16
16
  readonly max: number;
17
17
  readonly grow: true;
18
18
  };
19
+ readonly inlineConfig: false;
19
20
  };
20
21
  export declare function schema(configure: (env: Environment) => void): Schema.refine<{
21
22
  readonly label?: readonly [{
@@ -9,7 +9,10 @@ export const metadata = {
9
9
  name: "\u5217\u8868",
10
10
  icon: "fluent:list-20-regular",
11
11
  w: { initial: 12, min: 4, max: Infinity },
12
- h: { initial: 6, min: 4, max: Infinity, grow: true }
12
+ h: { initial: 6, min: 4, max: Infinity, grow: true },
13
+ // Hosts a nested sub-form (its own fields + layout) — too complex for the
14
+ // fullscreen inline-config pane; keep the (fullscreen-exiting) drill-down.
15
+ inlineConfig: false
13
16
  };
14
17
  export function schema(configure) {
15
18
  const CelBool = Expression({ configure, resultType: "bool" });
@@ -16,6 +16,7 @@ export declare const metadata: {
16
16
  readonly max: number;
17
17
  readonly grow: true;
18
18
  };
19
+ readonly inlineConfig: false;
19
20
  };
20
21
  export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
21
22
  label: Schema.optional<Schema.TupleType<readonly [Schema.Struct<{
@@ -8,7 +8,10 @@ export const metadata = {
8
8
  name: "\u8868\u683C",
9
9
  icon: "fluent:table-20-regular",
10
10
  w: { initial: 12, min: 6, max: Infinity },
11
- h: { initial: 10, min: 5, max: Infinity, grow: true }
11
+ h: { initial: 10, min: 5, max: Infinity, grow: true },
12
+ // Nested table/column editor — too complex for the fullscreen inline-config
13
+ // pane; keep the (fullscreen-exiting) drill-down.
14
+ inlineConfig: false
12
15
  };
13
16
  export function schema(configure) {
14
17
  const Table = Schema.suspend(
@@ -16,6 +16,7 @@ export declare const metadata: {
16
16
  readonly max: number;
17
17
  readonly grow: true;
18
18
  };
19
+ readonly inlineConfig: false;
19
20
  };
20
21
  /**
21
22
  * A collapsible section. Pure view — children are flat in the form state
@@ -7,7 +7,10 @@ export const metadata = {
7
7
  name: "\u53EF\u6298\u53E0\u533A\u57DF",
8
8
  icon: "fluent:chevron-down-20-regular",
9
9
  w: { initial: 12, min: 4, max: Infinity },
10
- h: { initial: 4, min: 2, max: Infinity, grow: true }
10
+ h: { initial: 4, min: 2, max: Infinity, grow: true },
11
+ // Hosts a nested sub-form (its own fields + layout) — too complex for the
12
+ // fullscreen inline-config pane; keep the (fullscreen-exiting) drill-down.
13
+ inlineConfig: false
11
14
  };
12
15
  export function schema(configure) {
13
16
  const Unit = Schema.suspend(() => FormUnit(configure));
@@ -41,27 +41,27 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
41
41
  } | undefined;
42
42
  readonly format?: string | undefined;
43
43
  readonly valueFormat?: string | undefined;
44
- readonly presets?: readonly {
45
- readonly label: readonly [{
44
+ readonly validations?: readonly {
45
+ readonly message: readonly [{
46
46
  readonly locale: "zh";
47
47
  readonly message: string;
48
48
  }, ...{
49
49
  readonly locale: "en" | "ja" | "ko";
50
50
  readonly message: string;
51
51
  }[]];
52
- readonly id: string;
53
- readonly value: string;
52
+ readonly warning?: boolean | undefined;
53
+ readonly when: string;
54
54
  }[] | undefined;
55
- readonly validations?: readonly {
56
- readonly message: readonly [{
55
+ readonly presets?: readonly {
56
+ readonly label: readonly [{
57
57
  readonly locale: "zh";
58
58
  readonly message: string;
59
59
  }, ...{
60
60
  readonly locale: "en" | "ja" | "ko";
61
61
  readonly message: string;
62
62
  }[]];
63
- readonly warning?: boolean | undefined;
64
- readonly when: string;
63
+ readonly id: string;
64
+ readonly value: string;
65
65
  }[] | undefined;
66
66
  }) => any;
67
67
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -103,27 +103,27 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
103
103
  } | undefined;
104
104
  readonly format?: string | undefined;
105
105
  readonly valueFormat?: string | undefined;
106
- readonly presets?: readonly {
107
- readonly label: readonly [{
106
+ readonly validations?: readonly {
107
+ readonly message: readonly [{
108
108
  readonly locale: "zh";
109
109
  readonly message: string;
110
110
  }, ...{
111
111
  readonly locale: "en" | "ja" | "ko";
112
112
  readonly message: string;
113
113
  }[]];
114
- readonly id: string;
115
- readonly value: string;
114
+ readonly warning?: boolean | undefined;
115
+ readonly when: string;
116
116
  }[] | undefined;
117
- readonly validations?: readonly {
118
- readonly message: readonly [{
117
+ readonly presets?: readonly {
118
+ readonly label: readonly [{
119
119
  readonly locale: "zh";
120
120
  readonly message: string;
121
121
  }, ...{
122
122
  readonly locale: "en" | "ja" | "ko";
123
123
  readonly message: string;
124
124
  }[]];
125
- readonly warning?: boolean | undefined;
126
- readonly when: string;
125
+ readonly id: string;
126
+ readonly value: string;
127
127
  }[] | undefined;
128
128
  }) => any) | undefined;
129
129
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -41,27 +41,27 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
41
41
  } | undefined;
42
42
  readonly format?: string | undefined;
43
43
  readonly valueFormat?: string | undefined;
44
- readonly presets?: readonly {
45
- readonly label: readonly [{
44
+ readonly validations?: readonly {
45
+ readonly message: readonly [{
46
46
  readonly locale: "zh";
47
47
  readonly message: string;
48
48
  }, ...{
49
49
  readonly locale: "en" | "ja" | "ko";
50
50
  readonly message: string;
51
51
  }[]];
52
- readonly id: string;
53
- readonly value: string;
52
+ readonly warning?: boolean | undefined;
53
+ readonly when: string;
54
54
  }[] | undefined;
55
- readonly validations?: readonly {
56
- readonly message: readonly [{
55
+ readonly presets?: readonly {
56
+ readonly label: readonly [{
57
57
  readonly locale: "zh";
58
58
  readonly message: string;
59
59
  }, ...{
60
60
  readonly locale: "en" | "ja" | "ko";
61
61
  readonly message: string;
62
62
  }[]];
63
- readonly warning?: boolean | undefined;
64
- readonly when: string;
63
+ readonly id: string;
64
+ readonly value: string;
65
65
  }[] | undefined;
66
66
  }) => any;
67
67
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -103,27 +103,27 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
103
103
  } | undefined;
104
104
  readonly format?: string | undefined;
105
105
  readonly valueFormat?: string | undefined;
106
- readonly presets?: readonly {
107
- readonly label: readonly [{
106
+ readonly validations?: readonly {
107
+ readonly message: readonly [{
108
108
  readonly locale: "zh";
109
109
  readonly message: string;
110
110
  }, ...{
111
111
  readonly locale: "en" | "ja" | "ko";
112
112
  readonly message: string;
113
113
  }[]];
114
- readonly id: string;
115
- readonly value: string;
114
+ readonly warning?: boolean | undefined;
115
+ readonly when: string;
116
116
  }[] | undefined;
117
- readonly validations?: readonly {
118
- readonly message: readonly [{
117
+ readonly presets?: readonly {
118
+ readonly label: readonly [{
119
119
  readonly locale: "zh";
120
120
  readonly message: string;
121
121
  }, ...{
122
122
  readonly locale: "en" | "ja" | "ko";
123
123
  readonly message: string;
124
124
  }[]];
125
- readonly warning?: boolean | undefined;
126
- readonly when: string;
125
+ readonly id: string;
126
+ readonly value: string;
127
127
  }[] | undefined;
128
128
  }) => any) | undefined;
129
129
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -49,28 +49,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
49
49
  readonly locale: "en" | "ja" | "ko";
50
50
  readonly message: string;
51
51
  }[]] | undefined;
52
- readonly presets?: readonly {
53
- readonly label: readonly [{
52
+ readonly validations?: readonly {
53
+ readonly message: readonly [{
54
54
  readonly locale: "zh";
55
55
  readonly message: string;
56
56
  }, ...{
57
57
  readonly locale: "en" | "ja" | "ko";
58
58
  readonly message: string;
59
59
  }[]];
60
- readonly id: string;
61
- readonly end: string;
62
- readonly start: string;
60
+ readonly warning?: boolean | undefined;
61
+ readonly when: string;
63
62
  }[] | undefined;
64
- readonly validations?: readonly {
65
- readonly message: readonly [{
63
+ readonly presets?: readonly {
64
+ readonly label: readonly [{
66
65
  readonly locale: "zh";
67
66
  readonly message: string;
68
67
  }, ...{
69
68
  readonly locale: "en" | "ja" | "ko";
70
69
  readonly message: string;
71
70
  }[]];
72
- readonly warning?: boolean | undefined;
73
- readonly when: string;
71
+ readonly id: string;
72
+ readonly end: string;
73
+ readonly start: string;
74
74
  }[] | undefined;
75
75
  }) => any;
76
76
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -120,28 +120,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
120
120
  readonly locale: "en" | "ja" | "ko";
121
121
  readonly message: string;
122
122
  }[]] | undefined;
123
- readonly presets?: readonly {
124
- readonly label: readonly [{
123
+ readonly validations?: readonly {
124
+ readonly message: readonly [{
125
125
  readonly locale: "zh";
126
126
  readonly message: string;
127
127
  }, ...{
128
128
  readonly locale: "en" | "ja" | "ko";
129
129
  readonly message: string;
130
130
  }[]];
131
- readonly id: string;
132
- readonly end: string;
133
- readonly start: string;
131
+ readonly warning?: boolean | undefined;
132
+ readonly when: string;
134
133
  }[] | undefined;
135
- readonly validations?: readonly {
136
- readonly message: readonly [{
134
+ readonly presets?: readonly {
135
+ readonly label: readonly [{
137
136
  readonly locale: "zh";
138
137
  readonly message: string;
139
138
  }, ...{
140
139
  readonly locale: "en" | "ja" | "ko";
141
140
  readonly message: string;
142
141
  }[]];
143
- readonly warning?: boolean | undefined;
144
- readonly when: string;
142
+ readonly id: string;
143
+ readonly end: string;
144
+ readonly start: string;
145
145
  }[] | undefined;
146
146
  }) => any) | undefined;
147
147
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -49,28 +49,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
49
49
  readonly locale: "en" | "ja" | "ko";
50
50
  readonly message: string;
51
51
  }[]] | undefined;
52
- readonly presets?: readonly {
53
- readonly label: readonly [{
52
+ readonly validations?: readonly {
53
+ readonly message: readonly [{
54
54
  readonly locale: "zh";
55
55
  readonly message: string;
56
56
  }, ...{
57
57
  readonly locale: "en" | "ja" | "ko";
58
58
  readonly message: string;
59
59
  }[]];
60
- readonly id: string;
61
- readonly end: string;
62
- readonly start: string;
60
+ readonly warning?: boolean | undefined;
61
+ readonly when: string;
63
62
  }[] | undefined;
64
- readonly validations?: readonly {
65
- readonly message: readonly [{
63
+ readonly presets?: readonly {
64
+ readonly label: readonly [{
66
65
  readonly locale: "zh";
67
66
  readonly message: string;
68
67
  }, ...{
69
68
  readonly locale: "en" | "ja" | "ko";
70
69
  readonly message: string;
71
70
  }[]];
72
- readonly warning?: boolean | undefined;
73
- readonly when: string;
71
+ readonly id: string;
72
+ readonly end: string;
73
+ readonly start: string;
74
74
  }[] | undefined;
75
75
  }) => any;
76
76
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -120,28 +120,28 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
120
120
  readonly locale: "en" | "ja" | "ko";
121
121
  readonly message: string;
122
122
  }[]] | undefined;
123
- readonly presets?: readonly {
124
- readonly label: readonly [{
123
+ readonly validations?: readonly {
124
+ readonly message: readonly [{
125
125
  readonly locale: "zh";
126
126
  readonly message: string;
127
127
  }, ...{
128
128
  readonly locale: "en" | "ja" | "ko";
129
129
  readonly message: string;
130
130
  }[]];
131
- readonly id: string;
132
- readonly end: string;
133
- readonly start: string;
131
+ readonly warning?: boolean | undefined;
132
+ readonly when: string;
134
133
  }[] | undefined;
135
- readonly validations?: readonly {
136
- readonly message: readonly [{
134
+ readonly presets?: readonly {
135
+ readonly label: readonly [{
137
136
  readonly locale: "zh";
138
137
  readonly message: string;
139
138
  }, ...{
140
139
  readonly locale: "en" | "ja" | "ko";
141
140
  readonly message: string;
142
141
  }[]];
143
- readonly warning?: boolean | undefined;
144
- readonly when: string;
142
+ readonly id: string;
143
+ readonly end: string;
144
+ readonly start: string;
145
145
  }[] | undefined;
146
146
  }) => any) | undefined;
147
147
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -16,6 +16,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
16
16
  validate: () => Promise<boolean>;
17
17
  undo: () => void;
18
18
  redo: () => void;
19
+ reset: () => void;
19
20
  canUndo: import("vue").Ref<boolean, boolean>;
20
21
  canRedo: import("vue").Ref<boolean, boolean>;
21
22
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -16,6 +16,7 @@ import { provideDerivedQuiescence, useDerived } from "./utils/derived";
16
16
  import { useFormHistory } from "./utils/history";
17
17
  import { evaluateInitial } from "./utils/initial";
18
18
  import { provideFormValidate } from "../../share/form-validate";
19
+ import { provideEventTarget } from "../../share/event-bus";
19
20
  import { provideFormReadonly } from "./utils/readonly";
20
21
  import { provideFormState } from "./utils/state";
21
22
  import { provideValidation } from "./utils/validation";
@@ -78,6 +79,12 @@ const validation = provideValidation({
78
79
  });
79
80
  provideFormValidate(validation.validate);
80
81
  const formHistory = useFormHistory(state, { quiescence, seeded, dirty: formState.dirty });
82
+ const formInstanceId = config.value?.id ?? crypto.randomUUID();
83
+ provideEventTarget(formInstanceId, {
84
+ "undo": () => Effect.sync(formHistory.undo),
85
+ "redo": () => Effect.sync(formHistory.redo),
86
+ "reset-to-initial": () => Effect.sync(formHistory.reset)
87
+ });
81
88
  defineExpose({
82
89
  seeded,
83
90
  flush: commitBus.flushAll,
@@ -85,6 +92,7 @@ defineExpose({
85
92
  validate: validation.validate,
86
93
  undo: formHistory.undo,
87
94
  redo: formHistory.redo,
95
+ reset: formHistory.reset,
88
96
  canUndo: formHistory.canUndo,
89
97
  canRedo: formHistory.canRedo
90
98
  });
@@ -16,6 +16,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
16
16
  validate: () => Promise<boolean>;
17
17
  undo: () => void;
18
18
  redo: () => void;
19
+ reset: () => void;
19
20
  canUndo: import("vue").Ref<boolean, boolean>;
20
21
  canRedo: import("vue").Ref<boolean, boolean>;
21
22
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -7,6 +7,23 @@ export { commonFieldFields } from './utils/common.js';
7
7
  export { getStructFieldTitle, getStructFieldDescription } from './utils/schema-meta.js';
8
8
  export { Align, DEFAULT_GAP, LayoutSet, validatePlacements } from '../../share/layout.js';
9
9
  declare const KIND = "shwfed.component.form";
10
+ export declare const metadata: {
11
+ readonly name: "表单";
12
+ readonly icon: "fluent:form-20-regular";
13
+ readonly operations: readonly [{
14
+ readonly id: "undo";
15
+ readonly name: "撤销";
16
+ readonly icon: "fluent:arrow-undo-20-regular";
17
+ }, {
18
+ readonly id: "redo";
19
+ readonly name: "重做";
20
+ readonly icon: "fluent:arrow-redo-20-regular";
21
+ }, {
22
+ readonly id: "reset-to-initial";
23
+ readonly name: "重置为初始值";
24
+ readonly icon: "fluent:arrow-reset-20-regular";
25
+ }];
26
+ };
10
27
  type AnySchema = Schema.Schema<any, any, never>;
11
28
  /**
12
29
  * The shared body of a form — fields + layouts only, with placement
@@ -73,10 +90,12 @@ export declare function FormUnit(configure: (env: Environment) => void): Schema.
73
90
  export { registerFormVariablesIfAbsent };
74
91
  export declare function FormConfig(configure: (env: Environment) => void): Schema.refine<{
75
92
  readonly style?: string | undefined;
93
+ readonly id?: string | undefined;
76
94
  readonly initial?: {
77
95
  readonly data: string;
78
96
  readonly request?: string | undefined;
79
97
  } | undefined;
98
+ readonly displayName?: string | undefined;
80
99
  readonly kind: "shwfed.component.form";
81
100
  readonly fields: readonly any[];
82
101
  readonly layouts: readonly {
@@ -131,6 +150,8 @@ export declare function FormConfig(configure: (env: Environment) => void): Schem
131
150
  }>;
132
151
  }>>>;
133
152
  kind: Schema.tag<"shwfed.component.form">;
153
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
154
+ displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
134
155
  initial: Schema.optional<Schema.transform<Schema.Union<[Schema.Schema<string, string, never>, Schema.Struct<{
135
156
  request: Schema.optional<Schema.Schema<string, string, never>>;
136
157
  data: Schema.Schema<string, string, never>;
@@ -143,10 +164,12 @@ export declare function FormConfig(configure: (env: Environment) => void): Schem
143
164
  }>>;
144
165
  export declare function createFormConfig(body: Omit<Schema.Schema.Type<ReturnType<typeof FormConfig>>, 'kind'>): {
145
166
  style?: string | undefined;
167
+ id?: string | undefined;
146
168
  initial?: {
147
169
  readonly data: string;
148
170
  readonly request?: string | undefined;
149
171
  } | undefined;
172
+ displayName?: string | undefined;
150
173
  fields: readonly any[];
151
174
  layouts: readonly {
152
175
  readonly name: string;
@@ -181,6 +204,8 @@ export type FormUnitValue = Readonly<{
181
204
  }>;
182
205
  export type FormConfigValue = Readonly<{
183
206
  kind: typeof KIND;
207
+ id?: string;
208
+ displayName?: string;
184
209
  initial?: InitialSource;
185
210
  readonly?: string;
186
211
  style?: string;