@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
@@ -20,6 +20,13 @@ declare const __VLS_export: <TItem extends {
20
20
  min: number;
21
21
  max: number;
22
22
  }>;
23
+ /**
24
+ * When `false`, this item opts out of the fullscreen inline-config pane —
25
+ * a drill request falls back to emitting `drill-down` (which exits
26
+ * fullscreen). Absent / `true` → inline editing is offered while the host
27
+ * provides the `inline-config` slot. See the "Inline config" section below.
28
+ */
29
+ inlineConfig?: boolean;
23
30
  }>;
24
31
  }> | undefined;
25
32
  getItemLabel?: (item: TItem) => string;
@@ -70,7 +77,18 @@ declare const __VLS_export: <TItem extends {
70
77
  } ? P : {});
71
78
  expose: (exposed: {}) => void;
72
79
  attrs: any;
73
- slots: {};
80
+ slots: {
81
+ /**
82
+ * Body of the right-docked config pane shown when a field is opened inline
83
+ * in fullscreen. Rendered inside the fullscreen element so editing doesn't
84
+ * unmount the canvas. Receives the item being edited and a `close` hook.
85
+ */
86
+ 'inline-config'(props: {
87
+ itemId: string;
88
+ item: TItem;
89
+ close: () => void;
90
+ }): unknown;
91
+ };
74
92
  emit: (((evt: "paste", target: {
75
93
  x: number;
76
94
  y: number;
@@ -11,10 +11,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
11
11
  "update:modelValue": (value: {
12
12
  readonly form: {
13
13
  readonly style?: string | undefined;
14
+ readonly id?: string | undefined;
14
15
  readonly initial?: {
15
16
  readonly data: string;
16
17
  readonly request?: string | undefined;
17
18
  } | undefined;
19
+ readonly displayName?: string | undefined;
18
20
  readonly kind: "shwfed.component.form";
19
21
  readonly fields: readonly any[];
20
22
  readonly layouts: readonly {
@@ -44,10 +46,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
44
46
  "onUpdate:modelValue"?: ((value: {
45
47
  readonly form: {
46
48
  readonly style?: string | undefined;
49
+ readonly id?: string | undefined;
47
50
  readonly initial?: {
48
51
  readonly data: string;
49
52
  readonly request?: string | undefined;
50
53
  } | undefined;
54
+ readonly displayName?: string | undefined;
51
55
  readonly kind: "shwfed.component.form";
52
56
  readonly fields: readonly any[];
53
57
  readonly layouts: readonly {
@@ -11,10 +11,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
11
11
  "update:modelValue": (value: {
12
12
  readonly form: {
13
13
  readonly style?: string | undefined;
14
+ readonly id?: string | undefined;
14
15
  readonly initial?: {
15
16
  readonly data: string;
16
17
  readonly request?: string | undefined;
17
18
  } | undefined;
19
+ readonly displayName?: string | undefined;
18
20
  readonly kind: "shwfed.component.form";
19
21
  readonly fields: readonly any[];
20
22
  readonly layouts: readonly {
@@ -44,10 +46,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
44
46
  "onUpdate:modelValue"?: ((value: {
45
47
  readonly form: {
46
48
  readonly style?: string | undefined;
49
+ readonly id?: string | undefined;
47
50
  readonly initial?: {
48
51
  readonly data: string;
49
52
  readonly request?: string | undefined;
50
53
  } | undefined;
54
+ readonly displayName?: string | undefined;
51
55
  readonly kind: "shwfed.component.form";
52
56
  readonly fields: readonly any[];
53
57
  readonly layouts: readonly {
@@ -13,10 +13,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
13
13
  "update:block": (value: {
14
14
  readonly form: {
15
15
  readonly style?: string | undefined;
16
+ readonly id?: string | undefined;
16
17
  readonly initial?: {
17
18
  readonly data: string;
18
19
  readonly request?: string | undefined;
19
20
  } | undefined;
21
+ readonly displayName?: string | undefined;
20
22
  readonly kind: "shwfed.component.form";
21
23
  readonly fields: readonly any[];
22
24
  readonly layouts: readonly {
@@ -47,10 +49,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
47
49
  "onUpdate:block"?: ((value: {
48
50
  readonly form: {
49
51
  readonly style?: string | undefined;
52
+ readonly id?: string | undefined;
50
53
  readonly initial?: {
51
54
  readonly data: string;
52
55
  readonly request?: string | undefined;
53
56
  } | undefined;
57
+ readonly displayName?: string | undefined;
54
58
  readonly kind: "shwfed.component.form";
55
59
  readonly fields: readonly any[];
56
60
  readonly layouts: readonly {
@@ -13,10 +13,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
13
13
  "update:block": (value: {
14
14
  readonly form: {
15
15
  readonly style?: string | undefined;
16
+ readonly id?: string | undefined;
16
17
  readonly initial?: {
17
18
  readonly data: string;
18
19
  readonly request?: string | undefined;
19
20
  } | undefined;
21
+ readonly displayName?: string | undefined;
20
22
  readonly kind: "shwfed.component.form";
21
23
  readonly fields: readonly any[];
22
24
  readonly layouts: readonly {
@@ -47,10 +49,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
47
49
  "onUpdate:block"?: ((value: {
48
50
  readonly form: {
49
51
  readonly style?: string | undefined;
52
+ readonly id?: string | undefined;
50
53
  readonly initial?: {
51
54
  readonly data: string;
52
55
  readonly request?: string | undefined;
53
56
  } | undefined;
57
+ readonly displayName?: string | undefined;
54
58
  readonly kind: "shwfed.component.form";
55
59
  readonly fields: readonly any[];
56
60
  readonly layouts: readonly {
@@ -23,10 +23,12 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
23
23
  compatibilityDate: Schema.tag<"2026-05-06">;
24
24
  form: Schema.refine<{
25
25
  readonly style?: string | undefined;
26
+ readonly id?: string | undefined;
26
27
  readonly initial?: {
27
28
  readonly data: string;
28
29
  readonly request?: string | undefined;
29
30
  } | undefined;
31
+ readonly displayName?: string | undefined;
30
32
  readonly kind: "shwfed.component.form";
31
33
  readonly fields: readonly any[];
32
34
  readonly layouts: readonly {
@@ -81,6 +83,8 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
81
83
  }>;
82
84
  }>>>;
83
85
  kind: Schema.tag<"shwfed.component.form">;
86
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
87
+ displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
84
88
  initial: Schema.optional<Schema.transform<Schema.Union<[Schema.Schema<string, string, never>, Schema.Struct<{
85
89
  request: Schema.optional<Schema.Schema<string, string, never>>;
86
90
  data: Schema.Schema<string, string, never>;
@@ -36,10 +36,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
36
36
  }[];
37
37
  readonly query?: {
38
38
  readonly style?: string | undefined;
39
+ readonly id?: string | undefined;
39
40
  readonly initial?: {
40
41
  readonly data: string;
41
42
  readonly request?: string | undefined;
42
43
  } | undefined;
44
+ readonly displayName?: string | undefined;
43
45
  readonly kind: "shwfed.component.form";
44
46
  readonly fields: readonly any[];
45
47
  readonly layouts: readonly {
@@ -214,10 +216,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
214
216
  }[];
215
217
  readonly query?: {
216
218
  readonly style?: string | undefined;
219
+ readonly id?: string | undefined;
217
220
  readonly initial?: {
218
221
  readonly data: string;
219
222
  readonly request?: string | undefined;
220
223
  } | undefined;
224
+ readonly displayName?: string | undefined;
221
225
  readonly kind: "shwfed.component.form";
222
226
  readonly fields: readonly any[];
223
227
  readonly layouts: readonly {
@@ -36,10 +36,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
36
36
  }[];
37
37
  readonly query?: {
38
38
  readonly style?: string | undefined;
39
+ readonly id?: string | undefined;
39
40
  readonly initial?: {
40
41
  readonly data: string;
41
42
  readonly request?: string | undefined;
42
43
  } | undefined;
44
+ readonly displayName?: string | undefined;
43
45
  readonly kind: "shwfed.component.form";
44
46
  readonly fields: readonly any[];
45
47
  readonly layouts: readonly {
@@ -214,10 +216,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
214
216
  }[];
215
217
  readonly query?: {
216
218
  readonly style?: string | undefined;
219
+ readonly id?: string | undefined;
217
220
  readonly initial?: {
218
221
  readonly data: string;
219
222
  readonly request?: string | undefined;
220
223
  } | undefined;
224
+ readonly displayName?: string | undefined;
221
225
  readonly kind: "shwfed.component.form";
222
226
  readonly fields: readonly any[];
223
227
  readonly layouts: readonly {
@@ -31,10 +31,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
31
31
  }[];
32
32
  readonly query?: {
33
33
  readonly style?: string | undefined;
34
+ readonly id?: string | undefined;
34
35
  readonly initial?: {
35
36
  readonly data: string;
36
37
  readonly request?: string | undefined;
37
38
  } | undefined;
39
+ readonly displayName?: string | undefined;
38
40
  readonly kind: "shwfed.component.form";
39
41
  readonly fields: readonly any[];
40
42
  readonly layouts: readonly {
@@ -209,10 +211,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
209
211
  }[];
210
212
  readonly query?: {
211
213
  readonly style?: string | undefined;
214
+ readonly id?: string | undefined;
212
215
  readonly initial?: {
213
216
  readonly data: string;
214
217
  readonly request?: string | undefined;
215
218
  } | undefined;
219
+ readonly displayName?: string | undefined;
216
220
  readonly kind: "shwfed.component.form";
217
221
  readonly fields: readonly any[];
218
222
  readonly layouts: readonly {
@@ -31,10 +31,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
31
31
  }[];
32
32
  readonly query?: {
33
33
  readonly style?: string | undefined;
34
+ readonly id?: string | undefined;
34
35
  readonly initial?: {
35
36
  readonly data: string;
36
37
  readonly request?: string | undefined;
37
38
  } | undefined;
39
+ readonly displayName?: string | undefined;
38
40
  readonly kind: "shwfed.component.form";
39
41
  readonly fields: readonly any[];
40
42
  readonly layouts: readonly {
@@ -209,10 +211,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
209
211
  }[];
210
212
  readonly query?: {
211
213
  readonly style?: string | undefined;
214
+ readonly id?: string | undefined;
212
215
  readonly initial?: {
213
216
  readonly data: string;
214
217
  readonly request?: string | undefined;
215
218
  } | undefined;
219
+ readonly displayName?: string | undefined;
216
220
  readonly kind: "shwfed.component.form";
217
221
  readonly fields: readonly any[];
218
222
  readonly layouts: readonly {
@@ -46,10 +46,12 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
46
46
  }[];
47
47
  readonly query?: {
48
48
  readonly style?: string | undefined;
49
+ readonly id?: string | undefined;
49
50
  readonly initial?: {
50
51
  readonly data: string;
51
52
  readonly request?: string | undefined;
52
53
  } | undefined;
54
+ readonly displayName?: string | undefined;
53
55
  readonly kind: "shwfed.component.form";
54
56
  readonly fields: readonly any[];
55
57
  readonly layouts: readonly {
@@ -351,10 +353,12 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
351
353
  }>>;
352
354
  query: Schema.optional<Schema.refine<{
353
355
  readonly style?: string | undefined;
356
+ readonly id?: string | undefined;
354
357
  readonly initial?: {
355
358
  readonly data: string;
356
359
  readonly request?: string | undefined;
357
360
  } | undefined;
361
+ readonly displayName?: string | undefined;
358
362
  readonly kind: "shwfed.component.form";
359
363
  readonly fields: readonly any[];
360
364
  readonly layouts: readonly {
@@ -409,6 +413,8 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
409
413
  }>;
410
414
  }>>>;
411
415
  kind: Schema.tag<"shwfed.component.form">;
416
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
417
+ displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
412
418
  initial: Schema.optional<Schema.transform<Schema.Union<[Schema.Schema<string, string, never>, Schema.Struct<{
413
419
  request: Schema.optional<Schema.Schema<string, string, never>>;
414
420
  data: Schema.Schema<string, string, never>;
@@ -28,6 +28,16 @@ const rendered = computed(() => {
28
28
  if (!template.value) return "";
29
29
  return interpolateMarkdown(template.value, cel, { ...baseContext(), json: jsonOption.value });
30
30
  });
31
+ const visible = computed(() => {
32
+ const expr = props.badge.show;
33
+ if (!expr) return true;
34
+ try {
35
+ return Effect.runSync(cel(expr, { ...baseContext(), json: jsonOption.value }));
36
+ } catch (e) {
37
+ console.warn("[shwfed-card-badge] show evaluation failed", e);
38
+ return true;
39
+ }
40
+ });
31
41
  async function refresh() {
32
42
  const req = props.badge.request;
33
43
  if (!req) return;
@@ -70,7 +80,7 @@ watch(
70
80
  </script>
71
81
 
72
82
  <template>
73
- <template v-if="template">
83
+ <template v-if="template && visible">
74
84
  <Badge
75
85
  v-if="badge.dot"
76
86
  :variant="badge.variant ?? 'default'"
@@ -43,6 +43,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
43
43
  readonly locale: "en" | "ja" | "ko";
44
44
  readonly message: string;
45
45
  }[]] | undefined;
46
+ readonly show?: string | undefined;
46
47
  readonly dot?: boolean | undefined;
47
48
  readonly variant?: "default" | "destructive" | "outline" | "secondary" | undefined;
48
49
  readonly request?: string | undefined;
@@ -85,6 +86,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
85
86
  readonly locale: "en" | "ja" | "ko";
86
87
  readonly message: string;
87
88
  }[]] | undefined;
89
+ readonly show?: string | undefined;
88
90
  readonly dot?: boolean | undefined;
89
91
  readonly variant?: "default" | "destructive" | "outline" | "secondary" | undefined;
90
92
  readonly request?: string | undefined;
@@ -59,7 +59,7 @@ const slotAccessor = computed({
59
59
  }
60
60
  });
61
61
  const editor = useSlotEditor(slotAccessor, { configure: configure.value });
62
- const viewMode = ref("content");
62
+ const viewMode = ref("general");
63
63
  function selectContent() {
64
64
  viewMode.value = "content";
65
65
  drilledBlockId.value = null;
@@ -103,6 +103,9 @@ function setBadgeRequest(v) {
103
103
  function setBadgeContent(v) {
104
104
  patchBadge({ content: isLocaleBlank(v) ? void 0 : v });
105
105
  }
106
+ function setBadgeShow(v) {
107
+ patchBadge({ show: v.trim().length > 0 ? v : void 0 });
108
+ }
106
109
  function setBadgeInterval(v) {
107
110
  patchBadge({ interval: typeof v === "number" && v > 0 ? Math.round(v) : void 0 });
108
111
  }
@@ -190,38 +193,38 @@ if (breadcrumbExt) {
190
193
  >
191
194
  <div
192
195
  class="row pl-2"
193
- :class="viewMode === 'content' ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : 'text-zinc-700 hover:bg-zinc-50'"
194
- @click="selectContent()"
196
+ :class="viewMode === 'general' ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : 'text-zinc-700 hover:bg-zinc-50'"
197
+ @click="selectGeneral()"
195
198
  >
196
199
  <Icon
197
- icon="fluent:apps-list-20-regular"
200
+ icon="fluent:settings-20-regular"
198
201
  class="size-4 shrink-0"
199
202
  />
200
- <span class="flex-1 truncate">内容</span>
203
+ <span class="flex-1 truncate">通用配置</span>
201
204
  </div>
202
205
 
203
206
  <div
204
207
  class="row pl-2"
205
- :class="viewMode === 'badge' ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : 'text-zinc-700 hover:bg-zinc-50'"
206
- @click="selectBadge()"
208
+ :class="viewMode === 'content' ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : 'text-zinc-700 hover:bg-zinc-50'"
209
+ @click="selectContent()"
207
210
  >
208
211
  <Icon
209
- icon="fluent:badge-20-regular"
212
+ icon="fluent:apps-list-20-regular"
210
213
  class="size-4 shrink-0"
211
214
  />
212
- <span class="flex-1 truncate">徽章</span>
215
+ <span class="flex-1 truncate">内容</span>
213
216
  </div>
214
217
 
215
218
  <div
216
219
  class="row pl-2"
217
- :class="viewMode === 'general' ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : 'text-zinc-700 hover:bg-zinc-50'"
218
- @click="selectGeneral()"
220
+ :class="viewMode === 'badge' ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : 'text-zinc-700 hover:bg-zinc-50'"
221
+ @click="selectBadge()"
219
222
  >
220
223
  <Icon
221
- icon="fluent:settings-20-regular"
224
+ icon="fluent:badge-20-regular"
222
225
  class="size-4 shrink-0"
223
226
  />
224
- <span class="flex-1 truncate">通用配置</span>
227
+ <span class="flex-1 truncate">徽章</span>
225
228
  </div>
226
229
 
227
230
  <Separator class="my-2" />
@@ -352,6 +355,30 @@ if (breadcrumbExt) {
352
355
 
353
356
  <!-- Badge settings. -->
354
357
  <template v-else-if="viewMode === 'badge'">
358
+ <Field orientation="vertical">
359
+ <FieldLabel class="text-xs text-zinc-500">
360
+ <template
361
+ v-if="badgeDescription('request')"
362
+ #tooltip
363
+ >
364
+ <Markdown
365
+ :source="badgeDescription('request')"
366
+ block
367
+ class="prose prose-sm prose-zinc"
368
+ />
369
+ </template>
370
+ {{ badgeTitle("request") }}
371
+ </FieldLabel>
372
+ <ExpressionEditor
373
+ :model-value="badge.request ?? ''"
374
+ placeholder="可选;如 http.get('/api/notifications')"
375
+ result-type="HttpRequest"
376
+ multiline
377
+ class="min-h-20"
378
+ @update:model-value="(v) => setBadgeRequest(v)"
379
+ />
380
+ </Field>
381
+
355
382
  <Field orientation="vertical">
356
383
  <FieldLabel class="text-xs text-zinc-500">
357
384
  <template
@@ -377,24 +404,24 @@ if (breadcrumbExt) {
377
404
  <Field orientation="vertical">
378
405
  <FieldLabel class="text-xs text-zinc-500">
379
406
  <template
380
- v-if="badgeDescription('request')"
407
+ v-if="badgeDescription('show')"
381
408
  #tooltip
382
409
  >
383
410
  <Markdown
384
- :source="badgeDescription('request')"
411
+ :source="badgeDescription('show')"
385
412
  block
386
413
  class="prose prose-sm prose-zinc"
387
414
  />
388
415
  </template>
389
- {{ badgeTitle("request") }}
416
+ {{ badgeTitle("show") }}
390
417
  </FieldLabel>
391
418
  <ExpressionEditor
392
- :model-value="badge.request ?? ''"
393
- placeholder="可选;如 http.get('/api/notifications')"
394
- result-type="HttpRequest"
419
+ :model-value="badge.show ?? ''"
420
+ placeholder="例:json.?data.?total.orValue(0) != 0"
421
+ result-type="bool"
395
422
  multiline
396
- class="min-h-20"
397
- @update:model-value="(v) => setBadgeRequest(v)"
423
+ class="min-h-12"
424
+ @update:model-value="(v) => setBadgeShow(v)"
398
425
  />
399
426
  </Field>
400
427
 
@@ -43,6 +43,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
43
43
  readonly locale: "en" | "ja" | "ko";
44
44
  readonly message: string;
45
45
  }[]] | undefined;
46
+ readonly show?: string | undefined;
46
47
  readonly dot?: boolean | undefined;
47
48
  readonly variant?: "default" | "destructive" | "outline" | "secondary" | undefined;
48
49
  readonly request?: string | undefined;
@@ -85,6 +86,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
85
86
  readonly locale: "en" | "ja" | "ko";
86
87
  readonly message: string;
87
88
  }[]] | undefined;
89
+ readonly show?: string | undefined;
88
90
  readonly dot?: boolean | undefined;
89
91
  readonly variant?: "default" | "destructive" | "outline" | "secondary" | undefined;
90
92
  readonly request?: string | undefined;
@@ -43,6 +43,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
43
43
  readonly locale: "en" | "ja" | "ko";
44
44
  readonly message: string;
45
45
  }[]] | undefined;
46
+ readonly show?: string | undefined;
46
47
  readonly dot?: boolean | undefined;
47
48
  readonly variant?: "default" | "destructive" | "outline" | "secondary" | undefined;
48
49
  readonly request?: string | undefined;
@@ -85,6 +86,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
85
86
  readonly locale: "en" | "ja" | "ko";
86
87
  readonly message: string;
87
88
  }[]] | undefined;
89
+ readonly show?: string | undefined;
88
90
  readonly dot?: boolean | undefined;
89
91
  readonly variant?: "default" | "destructive" | "outline" | "secondary" | undefined;
90
92
  readonly request?: string | undefined;
@@ -30,17 +30,23 @@ function evalStyle(expression) {
30
30
  }
31
31
  }
32
32
  const styleValue = computed(() => evalStyle(block.value.style));
33
- const hasUrl = computed(() => !!block.value.url && block.value.url.trim().length > 0);
34
- function onCardClick(e) {
35
- if (!hasUrl.value) return;
36
- const target = e.target;
37
- if (target?.closest('a, button, input, select, textarea, label, [role="button"]')) return;
33
+ const resolvedUrl = computed(() => {
34
+ const expr = block.value.url;
35
+ if (!expr || expr.trim().length === 0) return void 0;
38
36
  try {
39
- const url = Effect.runSync(cel(block.value.url, baseContext()));
40
- if (typeof url === "string" && url) window.open(url, "_self");
37
+ const url = Effect.runSync(cel(expr, baseContext()));
38
+ return typeof url === "string" && url ? url : void 0;
41
39
  } catch (err) {
42
40
  console.warn("[shwfed-card] url evaluation failed", err);
41
+ return void 0;
43
42
  }
43
+ });
44
+ const hasUrl = computed(() => !!block.value.url && block.value.url.trim().length > 0);
45
+ function onCardClick(e, navigate) {
46
+ if (!resolvedUrl.value) return;
47
+ const target = e.target;
48
+ if (target?.closest('a, button, input, select, textarea, label, [role="button"]')) return;
49
+ navigate(e);
44
50
  }
45
51
  function updateSlot(next) {
46
52
  block.value = { ...block.value, slot: next };
@@ -48,25 +54,39 @@ function updateSlot(next) {
48
54
  </script>
49
55
 
50
56
  <template>
51
- <div
52
- class="relative h-full rounded-sm border border-zinc-200 bg-white p-4"
53
- :class="hasUrl ? 'cursor-pointer' : ''"
54
- :style="styleValue"
55
- @click="onCardClick"
57
+ <!--
58
+ `custom` makes NuxtLink render no anchor of its own — it just hands us a
59
+ baseURL-aware `navigate()`. We keep the card a `<div>` so clicks on
60
+ interactive descendants stay untouched, and only follow the link from the
61
+ guarded handler. `to` is `''` when no URL is configured (navigation is then
62
+ short-circuited in `onCardClick`).
63
+ -->
64
+ <NuxtLink
65
+ :to="resolvedUrl ?? ''"
66
+ custom
56
67
  >
57
- <ClientOnly>
58
- <CardBadge
59
- v-if="block.badge"
60
- :badge="block.badge"
61
- class="absolute -right-2 -top-2 z-10"
62
- />
63
- </ClientOnly>
68
+ <template #default="{ navigate }">
69
+ <div
70
+ class="relative h-full rounded-sm border border-zinc-200 bg-white p-4"
71
+ :class="hasUrl ? 'cursor-pointer' : ''"
72
+ :style="styleValue"
73
+ @click="(e) => onCardClick(e, navigate)"
74
+ >
75
+ <ClientOnly>
76
+ <CardBadge
77
+ v-if="block.badge"
78
+ :badge="block.badge"
79
+ class="absolute -right-2 -top-2 z-10"
80
+ />
81
+ </ClientOnly>
64
82
 
65
- <SlotRenderer
66
- :slot-value="block.slot"
67
- :configure="configure"
68
- :find-entry="findBlock"
69
- @update:slot-value="(s) => updateSlot(s)"
70
- />
71
- </div>
83
+ <SlotRenderer
84
+ :slot-value="block.slot"
85
+ :configure="configure"
86
+ :find-entry="findBlock"
87
+ @update:slot-value="(s) => updateSlot(s)"
88
+ />
89
+ </div>
90
+ </template>
91
+ </NuxtLink>
72
92
  </template>
@@ -43,6 +43,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
43
43
  readonly locale: "en" | "ja" | "ko";
44
44
  readonly message: string;
45
45
  }[]] | undefined;
46
+ readonly show?: string | undefined;
46
47
  readonly dot?: boolean | undefined;
47
48
  readonly variant?: "default" | "destructive" | "outline" | "secondary" | undefined;
48
49
  readonly request?: string | undefined;
@@ -85,6 +86,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
85
86
  readonly locale: "en" | "ja" | "ko";
86
87
  readonly message: string;
87
88
  }[]] | undefined;
89
+ readonly show?: string | undefined;
88
90
  readonly dot?: boolean | undefined;
89
91
  readonly variant?: "default" | "destructive" | "outline" | "secondary" | undefined;
90
92
  readonly request?: string | undefined;
@@ -37,6 +37,7 @@ export declare function badgeSchema(configure: Configure): Schema.Struct<{
37
37
  locale: Schema.Literal<["ja", "en", "ko"]>;
38
38
  message: Schema.SchemaClass<string, string, never>;
39
39
  }>]>>>;
40
+ show: Schema.optional<Schema.Schema<string, string, never>>;
40
41
  interval: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
41
42
  dot: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
42
43
  variant: Schema.optional<Schema.Literal<["default", "secondary", "destructive", "outline"]>>;
@@ -57,6 +58,7 @@ export declare function schema(configure: Configure, blockRef: AnySchema): Schem
57
58
  locale: Schema.Literal<["ja", "en", "ko"]>;
58
59
  message: Schema.SchemaClass<string, string, never>;
59
60
  }>]>>>;
61
+ show: Schema.optional<Schema.Schema<string, string, never>>;
60
62
  interval: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
61
63
  dot: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
62
64
  variant: Schema.optional<Schema.Literal<["default", "secondary", "destructive", "outline"]>>;