@shwfed/config 2.3.3 → 2.3.4

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 (32) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/actions/components/group.d.vue.ts +2 -0
  3. package/dist/runtime/components/actions/components/group.vue +1 -1
  4. package/dist/runtime/components/actions/components/group.vue.d.ts +2 -0
  5. package/dist/runtime/components/actions/config.d.vue.ts +2 -0
  6. package/dist/runtime/components/actions/config.vue +46 -19
  7. package/dist/runtime/components/actions/config.vue.d.ts +2 -0
  8. package/dist/runtime/components/actions/schema.d.ts +4 -0
  9. package/dist/runtime/components/actions/schema.js +9 -0
  10. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/config.d.vue.ts +2 -0
  11. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/config.vue.d.ts +2 -0
  12. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/runtime.d.vue.ts +2 -0
  13. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/runtime.vue.d.ts +2 -0
  14. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/schema.d.ts +1 -0
  15. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -0
  16. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -0
  17. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -0
  18. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -0
  19. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +2 -0
  20. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.d.vue.ts +2 -0
  21. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.vue.d.ts +2 -0
  22. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +1 -0
  23. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.actions/schema.d.ts +1 -0
  24. package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/runtime.vue +4 -4
  25. package/dist/runtime/components/table/schema.d.ts +3 -0
  26. package/dist/runtime/components/table/utils/row-reorder.js +16 -5
  27. package/dist/runtime/vendor/cel-js/CLAUDE.md +5 -1
  28. package/dist/runtime/vendor/cel-js/PROMPT.md +19 -0
  29. package/dist/runtime/vendor/cel-js/lib/evaluator.js +2 -0
  30. package/dist/runtime/vendor/cel-js/lib/form-builtins.d.ts +2 -0
  31. package/dist/runtime/vendor/cel-js/lib/form-builtins.js +58 -0
  32. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shwfed",
3
3
  "configKey": "shwfed",
4
- "version": "2.3.3",
4
+ "version": "2.3.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -53,6 +53,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
53
53
  }[]];
54
54
  readonly icon?: string | undefined;
55
55
  readonly groupId: string;
56
+ readonly hideTitle?: boolean | undefined;
56
57
  readonly items: readonly {
57
58
  readonly disabled?: string | undefined;
58
59
  readonly id: string;
@@ -121,6 +122,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
121
122
  }[]];
122
123
  readonly icon?: string | undefined;
123
124
  readonly groupId: string;
125
+ readonly hideTitle?: boolean | undefined;
124
126
  readonly items: readonly {
125
127
  readonly disabled?: string | undefined;
126
128
  readonly id: string;
@@ -448,7 +448,7 @@ async function runButton(buttonId) {
448
448
  v-else-if="item.icon"
449
449
  :icon="item.icon"
450
450
  />
451
- <span>{{ getDropdownLabel(item) }}</span>
451
+ <span v-if="!item.hideTitle">{{ getDropdownLabel(item) }}</span>
452
452
  </Button>
453
453
  </DropdownMenuTrigger>
454
454
 
@@ -53,6 +53,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
53
53
  }[]];
54
54
  readonly icon?: string | undefined;
55
55
  readonly groupId: string;
56
+ readonly hideTitle?: boolean | undefined;
56
57
  readonly items: readonly {
57
58
  readonly disabled?: string | undefined;
58
59
  readonly id: string;
@@ -121,6 +122,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
121
122
  }[]];
122
123
  readonly icon?: string | undefined;
123
124
  readonly groupId: string;
125
+ readonly hideTitle?: boolean | undefined;
124
126
  readonly items: readonly {
125
127
  readonly disabled?: string | undefined;
126
128
  readonly id: string;
@@ -51,6 +51,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
51
51
  }[]];
52
52
  readonly icon?: string | undefined;
53
53
  readonly groupId: string;
54
+ readonly hideTitle?: boolean | undefined;
54
55
  readonly items: readonly {
55
56
  readonly disabled?: string | undefined;
56
57
  readonly id: string;
@@ -119,6 +120,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
119
120
  }[]];
120
121
  readonly icon?: string | undefined;
121
122
  readonly groupId: string;
123
+ readonly hideTitle?: boolean | undefined;
122
124
  readonly items: readonly {
123
125
  readonly disabled?: string | undefined;
124
126
  readonly id: string;
@@ -1159,25 +1159,52 @@ const newGroupZoneId = (insertIndex) => `new-group-${insertIndex}`;
1159
1159
  />
1160
1160
  </Field>
1161
1161
 
1162
- <Field orientation="vertical">
1163
- <FieldLabel class="text-xs text-zinc-500">
1164
- <template
1165
- v-if="dropdownItemFieldDescription('icon')"
1166
- #tooltip
1167
- >
1168
- <Markdown
1169
- :source="dropdownItemFieldDescription('icon')"
1170
- block
1171
- class="prose prose-sm prose-zinc"
1172
- />
1173
- </template>
1174
- {{ dropdownItemFieldTitle("icon") }}
1175
- </FieldLabel>
1176
- <IconPicker
1177
- :model-value="selectedDropdownItem.icon ?? ''"
1178
- @update:model-value="(v) => patchSelectedDropdownItem((it) => setOptionalString(it, 'icon', v))"
1179
- />
1180
- </Field>
1162
+ <div class="flex items-end gap-4">
1163
+ <Field
1164
+ orientation="vertical"
1165
+ class="flex-1"
1166
+ >
1167
+ <FieldLabel class="text-xs text-zinc-500">
1168
+ <template
1169
+ v-if="dropdownItemFieldDescription('icon')"
1170
+ #tooltip
1171
+ >
1172
+ <Markdown
1173
+ :source="dropdownItemFieldDescription('icon')"
1174
+ block
1175
+ class="prose prose-sm prose-zinc"
1176
+ />
1177
+ </template>
1178
+ {{ dropdownItemFieldTitle("icon") }}
1179
+ </FieldLabel>
1180
+ <IconPicker
1181
+ :model-value="selectedDropdownItem.icon ?? ''"
1182
+ @update:model-value="(v) => patchSelectedDropdownItem((it) => setOptionalString(it, 'icon', v))"
1183
+ />
1184
+ </Field>
1185
+ <Field
1186
+ orientation="horizontal"
1187
+ class="h-9 w-auto gap-2"
1188
+ >
1189
+ <Switch
1190
+ :model-value="selectedDropdownItem.hideTitle ?? false"
1191
+ @update:model-value="(v) => patchSelectedDropdownItem((it) => setOptionalBoolean(it, 'hideTitle', v))"
1192
+ />
1193
+ <FieldLabel class="text-sm text-zinc-600">
1194
+ <template
1195
+ v-if="dropdownItemFieldDescription('hideTitle')"
1196
+ #tooltip
1197
+ >
1198
+ <Markdown
1199
+ :source="dropdownItemFieldDescription('hideTitle')"
1200
+ block
1201
+ class="prose prose-sm prose-zinc"
1202
+ />
1203
+ </template>
1204
+ {{ dropdownItemFieldTitle("hideTitle") }}
1205
+ </FieldLabel>
1206
+ </Field>
1207
+ </div>
1181
1208
 
1182
1209
  <p class="text-xs text-zinc-400">
1183
1210
  下拉按钮的下拉项以独立行的形式编辑,选中任意下拉项即可修改其属性。
@@ -51,6 +51,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
51
51
  }[]];
52
52
  readonly icon?: string | undefined;
53
53
  readonly groupId: string;
54
+ readonly hideTitle?: boolean | undefined;
54
55
  readonly items: readonly {
55
56
  readonly disabled?: string | undefined;
56
57
  readonly id: string;
@@ -119,6 +120,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
119
120
  }[]];
120
121
  readonly icon?: string | undefined;
121
122
  readonly groupId: string;
123
+ readonly hideTitle?: boolean | undefined;
122
124
  readonly items: readonly {
123
125
  readonly disabled?: string | undefined;
124
126
  readonly id: string;
@@ -39,6 +39,7 @@ export declare function ActionSchemaFields(configure: (env: Environment) => void
39
39
  message: Schema.SchemaClass<string, string, never>;
40
40
  }>]>;
41
41
  icon: Schema.optional<Schema.SchemaClass<string, string, never>>;
42
+ hideTitle: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
42
43
  items: Schema.Array$<Schema.Struct<{
43
44
  id: Schema.refine<string, typeof Schema.String>;
44
45
  title: Schema.TupleType<readonly [Schema.Struct<{
@@ -119,6 +120,7 @@ export declare function ActionSchemaFields(configure: (env: Environment) => void
119
120
  message: Schema.SchemaClass<string, string, never>;
120
121
  }>]>;
121
122
  icon: Schema.optional<Schema.SchemaClass<string, string, never>>;
123
+ hideTitle: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
122
124
  items: Schema.Array$<Schema.Struct<{
123
125
  id: Schema.refine<string, typeof Schema.String>;
124
126
  title: Schema.TupleType<readonly [Schema.Struct<{
@@ -188,6 +190,7 @@ export declare function ActionSchemaFields(configure: (env: Environment) => void
188
190
  message: Schema.SchemaClass<string, string, never>;
189
191
  }>]>;
190
192
  icon: Schema.optional<Schema.SchemaClass<string, string, never>>;
193
+ hideTitle: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
191
194
  items: Schema.Array$<Schema.Struct<{
192
195
  id: Schema.refine<string, typeof Schema.String>;
193
196
  title: Schema.TupleType<readonly [Schema.Struct<{
@@ -259,6 +262,7 @@ export declare function ActionsConfig(configure: (env: Environment) => void): Sc
259
262
  message: Schema.SchemaClass<string, string, never>;
260
263
  }>]>;
261
264
  icon: Schema.optional<Schema.SchemaClass<string, string, never>>;
265
+ hideTitle: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
262
266
  items: Schema.Array$<Schema.Struct<{
263
267
  id: Schema.refine<string, typeof Schema.String>;
264
268
  title: Schema.TupleType<readonly [Schema.Struct<{
@@ -90,6 +90,15 @@ export function ActionSchemaFields(configure) {
90
90
  title: "\u56FE\u6807",
91
91
  description: "Iconify \u56FE\u6807\u6807\u8BC6\u7B26"
92
92
  })),
93
+ hideTitle: Schema.optional(Schema.Boolean.annotations({
94
+ title: "\u4EC5\u663E\u793A\u56FE\u6807",
95
+ description: md`
96
+ 隐藏下拉按钮触发器的文字内容,仅显示其图标。常见于有一定关联隐喻的下拉按钮,如
97
+
98
+ - 异步下载与下载历史:下载历史仅展示历史图标
99
+ - 收集归纳多种操作:直接下载作为主要按钮,其他下载形式(如异步下载、自定义下载)放置于其后
100
+ `
101
+ })),
93
102
  items: Schema.Array(DropdownAction).annotations({
94
103
  description: "\u4E0B\u62C9\u6309\u94AE\u5185\u7684\u6309\u94AE\u5217\u8868"
95
104
  })
@@ -46,6 +46,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
46
46
  }[]];
47
47
  readonly icon?: string | undefined;
48
48
  readonly groupId: string;
49
+ readonly hideTitle?: boolean | undefined;
49
50
  readonly items: readonly {
50
51
  readonly disabled?: string | undefined;
51
52
  readonly id: string;
@@ -119,6 +120,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
119
120
  }[]];
120
121
  readonly icon?: string | undefined;
121
122
  readonly groupId: string;
123
+ readonly hideTitle?: boolean | undefined;
122
124
  readonly items: readonly {
123
125
  readonly disabled?: string | undefined;
124
126
  readonly id: string;
@@ -46,6 +46,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
46
46
  }[]];
47
47
  readonly icon?: string | undefined;
48
48
  readonly groupId: string;
49
+ readonly hideTitle?: boolean | undefined;
49
50
  readonly items: readonly {
50
51
  readonly disabled?: string | undefined;
51
52
  readonly id: string;
@@ -119,6 +120,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
119
120
  }[]];
120
121
  readonly icon?: string | undefined;
121
122
  readonly groupId: string;
123
+ readonly hideTitle?: boolean | undefined;
122
124
  readonly items: readonly {
123
125
  readonly disabled?: string | undefined;
124
126
  readonly id: string;
@@ -51,6 +51,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
51
51
  }[]];
52
52
  readonly icon?: string | undefined;
53
53
  readonly groupId: string;
54
+ readonly hideTitle?: boolean | undefined;
54
55
  readonly items: readonly {
55
56
  readonly disabled?: string | undefined;
56
57
  readonly id: string;
@@ -124,6 +125,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
124
125
  }[]];
125
126
  readonly icon?: string | undefined;
126
127
  readonly groupId: string;
128
+ readonly hideTitle?: boolean | undefined;
127
129
  readonly items: readonly {
128
130
  readonly disabled?: string | undefined;
129
131
  readonly id: string;
@@ -51,6 +51,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
51
51
  }[]];
52
52
  readonly icon?: string | undefined;
53
53
  readonly groupId: string;
54
+ readonly hideTitle?: boolean | undefined;
54
55
  readonly items: readonly {
55
56
  readonly disabled?: string | undefined;
56
57
  readonly id: string;
@@ -124,6 +125,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
124
125
  }[]];
125
126
  readonly icon?: string | undefined;
126
127
  readonly groupId: string;
128
+ readonly hideTitle?: boolean | undefined;
127
129
  readonly items: readonly {
128
130
  readonly disabled?: string | undefined;
129
131
  readonly id: string;
@@ -67,6 +67,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
67
67
  message: Schema.SchemaClass<string, string, never>;
68
68
  }>]>;
69
69
  icon: Schema.optional<Schema.SchemaClass<string, string, never>>;
70
+ hideTitle: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
70
71
  items: Schema.Array$<Schema.Struct<{
71
72
  id: Schema.refine<string, typeof Schema.String>;
72
73
  title: Schema.TupleType<readonly [Schema.Struct<{
@@ -77,6 +77,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
77
77
  }[]];
78
78
  readonly icon?: string | undefined;
79
79
  readonly groupId: string;
80
+ readonly hideTitle?: boolean | undefined;
80
81
  readonly items: readonly {
81
82
  readonly disabled?: string | undefined;
82
83
  readonly id: string;
@@ -253,6 +254,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
253
254
  }[]];
254
255
  readonly icon?: string | undefined;
255
256
  readonly groupId: string;
257
+ readonly hideTitle?: boolean | undefined;
256
258
  readonly items: readonly {
257
259
  readonly disabled?: string | undefined;
258
260
  readonly id: string;
@@ -77,6 +77,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
77
77
  }[]];
78
78
  readonly icon?: string | undefined;
79
79
  readonly groupId: string;
80
+ readonly hideTitle?: boolean | undefined;
80
81
  readonly items: readonly {
81
82
  readonly disabled?: string | undefined;
82
83
  readonly id: string;
@@ -253,6 +254,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
253
254
  }[]];
254
255
  readonly icon?: string | undefined;
255
256
  readonly groupId: string;
257
+ readonly hideTitle?: boolean | undefined;
256
258
  readonly items: readonly {
257
259
  readonly disabled?: string | undefined;
258
260
  readonly id: string;
@@ -72,6 +72,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
72
72
  }[]];
73
73
  readonly icon?: string | undefined;
74
74
  readonly groupId: string;
75
+ readonly hideTitle?: boolean | undefined;
75
76
  readonly items: readonly {
76
77
  readonly disabled?: string | undefined;
77
78
  readonly id: string;
@@ -248,6 +249,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
248
249
  }[]];
249
250
  readonly icon?: string | undefined;
250
251
  readonly groupId: string;
252
+ readonly hideTitle?: boolean | undefined;
251
253
  readonly items: readonly {
252
254
  readonly disabled?: string | undefined;
253
255
  readonly id: string;
@@ -72,6 +72,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
72
72
  }[]];
73
73
  readonly icon?: string | undefined;
74
74
  readonly groupId: string;
75
+ readonly hideTitle?: boolean | undefined;
75
76
  readonly items: readonly {
76
77
  readonly disabled?: string | undefined;
77
78
  readonly id: string;
@@ -248,6 +249,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
248
249
  }[]];
249
250
  readonly icon?: string | undefined;
250
251
  readonly groupId: string;
252
+ readonly hideTitle?: boolean | undefined;
251
253
  readonly items: readonly {
252
254
  readonly disabled?: string | undefined;
253
255
  readonly id: string;
@@ -87,6 +87,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
87
87
  }[]];
88
88
  readonly icon?: string | undefined;
89
89
  readonly groupId: string;
90
+ readonly hideTitle?: boolean | undefined;
90
91
  readonly items: readonly {
91
92
  readonly disabled?: string | undefined;
92
93
  readonly id: string;
@@ -265,6 +266,7 @@ export declare function schema(configure: (env: Environment) => void, _blockRef:
265
266
  message: Schema.SchemaClass<string, string, never>;
266
267
  }>]>;
267
268
  icon: Schema.optional<Schema.SchemaClass<string, string, never>>;
269
+ hideTitle: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
268
270
  items: Schema.Array$<Schema.Struct<{
269
271
  id: Schema.refine<string, typeof Schema.String>;
270
272
  title: Schema.TupleType<readonly [Schema.Struct<{
@@ -45,6 +45,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
45
45
  }[]];
46
46
  readonly icon?: string | undefined;
47
47
  readonly groupId: string;
48
+ readonly hideTitle?: boolean | undefined;
48
49
  readonly items: readonly {
49
50
  readonly disabled?: string | undefined;
50
51
  readonly id: string;
@@ -116,6 +117,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
116
117
  }[]];
117
118
  readonly icon?: string | undefined;
118
119
  readonly groupId: string;
120
+ readonly hideTitle?: boolean | undefined;
119
121
  readonly items: readonly {
120
122
  readonly disabled?: string | undefined;
121
123
  readonly id: string;
@@ -45,6 +45,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
45
45
  }[]];
46
46
  readonly icon?: string | undefined;
47
47
  readonly groupId: string;
48
+ readonly hideTitle?: boolean | undefined;
48
49
  readonly items: readonly {
49
50
  readonly disabled?: string | undefined;
50
51
  readonly id: string;
@@ -116,6 +117,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
116
117
  }[]];
117
118
  readonly icon?: string | undefined;
118
119
  readonly groupId: string;
120
+ readonly hideTitle?: boolean | undefined;
119
121
  readonly items: readonly {
120
122
  readonly disabled?: string | undefined;
121
123
  readonly id: string;
@@ -57,6 +57,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
57
57
  message: Schema.SchemaClass<string, string, never>;
58
58
  }>]>;
59
59
  icon: Schema.optional<Schema.SchemaClass<string, string, never>>;
60
+ hideTitle: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
60
61
  items: Schema.Array$<Schema.Struct<{
61
62
  id: Schema.refine<string, typeof Schema.String>;
62
63
  title: Schema.TupleType<readonly [Schema.Struct<{
@@ -53,6 +53,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
53
53
  message: Schema.SchemaClass<string, string, never>;
54
54
  }>]>;
55
55
  icon: Schema.optional<Schema.SchemaClass<string, string, never>>;
56
+ hideTitle: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
56
57
  items: Schema.Array$<Schema.Struct<{
57
58
  id: Schema.refine<string, typeof Schema.String>;
58
59
  title: Schema.TupleType<readonly [Schema.Struct<{
@@ -194,7 +194,7 @@ const anyHasTooltip = computed(
194
194
  </InputGroup>
195
195
  </PopoverAnchor>
196
196
  <PopoverContent
197
- class="p-0"
197
+ class="w-auto p-0 [&_[data-slot=command-input-wrapper]]:h-7 [&_[data-slot=command-input-wrapper]]:px-2 [&_[data-slot=command-input-wrapper]_svg]:size-3 [&_[data-slot=command-input]]:h-7 [&_[data-slot=command-input]]:py-0 [&_[data-slot=command-input]]:text-[0.75rem] [&_[data-slot=command-item]]:px-2 [&_[data-slot=command-item]]:py-1 [&_[data-slot=command-item]]:text-[0.75rem]"
198
198
  :style="{ width: 'var(--reka-popover-trigger-width)' }"
199
199
  >
200
200
  <Command
@@ -205,7 +205,7 @@ const anyHasTooltip = computed(
205
205
  >
206
206
  <CommandInput :placeholder="t('combobox-single-search-placeholder')" />
207
207
  <CommandList>
208
- <CommandEmpty class="py-6 text-center text-sm text-zinc-500">
208
+ <CommandEmpty class="py-3 text-center text-[0.75rem] text-zinc-500">
209
209
  {{ t("combobox-single-empty") }}
210
210
  </CommandEmpty>
211
211
  <CommandGroup>
@@ -222,12 +222,12 @@ const anyHasTooltip = computed(
222
222
  </CommandList>
223
223
  <div
224
224
  v-if="anyHasTooltip && hoveredTooltip"
225
- class="border-t border-zinc-200 px-3 py-2"
225
+ class="border-t border-zinc-200 px-2 py-1.5"
226
226
  >
227
227
  <Markdown
228
228
  :source="hoveredTooltip"
229
229
  block
230
- class="prose prose-sm prose-zinc"
230
+ class="prose prose-xs prose-zinc"
231
231
  />
232
232
  </div>
233
233
  </Command>
@@ -166,6 +166,7 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
166
166
  }[]];
167
167
  readonly icon?: string | undefined;
168
168
  readonly groupId: string;
169
+ readonly hideTitle?: boolean | undefined;
169
170
  readonly items: readonly {
170
171
  readonly disabled?: string | undefined;
171
172
  readonly id: string;
@@ -344,6 +345,7 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
344
345
  message: Schema.SchemaClass<string, string, never>;
345
346
  }>]>;
346
347
  icon: Schema.optional<Schema.SchemaClass<string, string, never>>;
348
+ hideTitle: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
347
349
  items: Schema.Array$<Schema.Struct<{
348
350
  id: Schema.refine<string, typeof Schema.String>;
349
351
  title: Schema.TupleType<readonly [Schema.Struct<{
@@ -546,6 +548,7 @@ export declare function createTableConfig(body: Omit<Schema.Schema.Type<ReturnTy
546
548
  }[]];
547
549
  readonly icon?: string | undefined;
548
550
  readonly groupId: string;
551
+ readonly hideTitle?: boolean | undefined;
549
552
  readonly items: readonly {
550
553
  readonly disabled?: string | undefined;
551
554
  readonly id: string;
@@ -5,7 +5,6 @@ import {
5
5
  dropTargetForElements
6
6
  } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
7
7
  import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview";
8
- import { preserveOffsetOnSource } from "@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source";
9
8
  import {
10
9
  attachInstruction,
11
10
  extractInstruction
@@ -49,10 +48,22 @@ export function useRowReorder(options) {
49
48
  onGenerateDragPreview: ({ nativeSetDragImage, location, source }) => {
50
49
  setCustomNativeDragPreview({
51
50
  nativeSetDragImage,
52
- getOffset: preserveOffsetOnSource({
53
- element: source.element,
54
- input: location.current.input
55
- }),
51
+ // Anchor the preview to the grip's rect, not the row's. The row is
52
+ // virtualized (`position: absolute` + `translate3d`) so its
53
+ // bounding box shifts with vertical scroll and `preserveOffsetOnSource`
54
+ // pulls the preview off the pointer once the table has been
55
+ // scrolled. The grip is always rendered exactly where the user
56
+ // clicked AND sits at the row's leading edge, so offsetting from
57
+ // it keeps the start of the line pinned under the cursor in
58
+ // every scroll state.
59
+ getOffset: ({ container }) => {
60
+ const containerRect = container.getBoundingClientRect();
61
+ const handleRect = handleEl.getBoundingClientRect();
62
+ return {
63
+ x: Math.max(0, Math.min(location.current.input.clientX - handleRect.left, containerRect.width)),
64
+ y: Math.max(0, Math.min(location.current.input.clientY - handleRect.top, containerRect.height))
65
+ };
66
+ },
56
67
  render: ({ container }) => {
57
68
  const src = source.element;
58
69
  const rect = src.getBoundingClientRect();
@@ -22,6 +22,9 @@ The custom `Optional` class has been replaced with Effect's `Option` type (`impo
22
22
 
23
23
  An `http` built-in has been added (`http-builtins.ts`, `http-builder.ts`) — not from upstream. It registers the `http` constant and the `http` / `HttpRequest` types on `globalRegistry`, so `http.get(url).header(...).body(...)` expressions type-check and evaluate in every `Environment`. A CEL expression only builds an `HttpRequestBuilder` — a pure description of a request; it never issues one. Both terminal methods, `.json()` and `.file()`, are dispatched by the host on the returned builder (neither is a CEL method), so expression evaluation stays free of IO. Endpoints must be absolute URLs — there is no base-URL resolution. Depends on `fx-fetch`. The host can register process-wide default headers via `HttpRequestBuilder.setDefaultHeader(name, valueOrGetter)` / `clearDefaultHeader(name)`; they are merged in at `#buildRequest()` time, with case-insensitive precedence to an explicit `.header(...)` on the builder. A getter that returns `null` / `undefined` / `''` skips the header for that request, so the host can source values from live refs (e.g. the active i18n locale for `Accept-Language`) without baking in stale snapshots.
24
24
 
25
+ A `form(dyn): FormData` built-in has been added (`form-builtins.ts`) — not from upstream. It registers the `FormData` type on `globalRegistry` and a global `form` function that turns a CEL map into a native `FormData`, so authors can write `http.post(url).body(form({"file": myFile, "name": "Alice"}))` (`.body()` already passes `FormData` through verbatim and `fetch` sets the multipart boundary). Value coercion mirrors `.query()`'s flat-record semantics: `null` / `undefined` / `Option.None` skip the key; `Option.Some(x)` recurses on `x`; `File` / `Blob` pass through (preserves the `File` filename); `Decimal` → `.toString()` (preserves precision past safe-integer); `Date` (`TZDate`) → `.toISOString()`; `bool` → `'true'` / `'false'`; arrays append one entry per element; nested objects throw (`multipart/form-data` is flat — same rule as `.query(dyn)`). Top-level input must be a map literal / record (Map or plain object); passing an array or scalar throws.
26
+ The `__proto__` / `constructor` / `prototype` keys are skipped on the top-level record, mirroring `safeFromEntries`.
27
+
25
28
  A `JSON` built-in namespace has been added (`json-builtins.ts`) — not from upstream. It registers a `JSON` brand class and a same-named constant on `globalRegistry`, so `JSON.parse(string): dyn` and `JSON.stringify(dyn): string` resolve in every `Environment`. The CEL-side surface mirrors the JS globals deliberately. `JSON.parse` is a thin wrapper over `globalThis.JSON.parse` — numbers come back as plain JS `number` (the evaluator coerces via `Decimal.from` at use time). `JSON.stringify` pre-walks the value via `normalizeForJSON` before handing it to `globalThis.JSON.stringify`: `Decimal` → JS number (via `.toNumber()` — loses precision past safe-integer range, deliberate trade-off for idiomatic JSON output), `Option.Some(x)` → `x`, `Option.None` → `null`, `Map` → plain object, `Date`/`TZDate` passes through so its built-in `toJSON` emits ISO 8601. The pre-walk is required because Effect's `Option` defines its own `toJSON()` that runs before any replacer would see it.
26
29
 
27
30
  Spread syntax (`...expr`) inside list and map literals — not from upstream. A new `ELLIPSIS` token (3-char lookahead in the lexer) and a `spread` AST op let `[1, ...a, 4]` and `{...a, "x": 1, ...b}` desugar inside the parent literal. The spread node's own `check`/`evaluate` are defensive stubs — `parsePrimary` never produces one, so `...` outside a list/map is an "unexpected token" parse error. List `args` shape is unchanged (`IASTNode[]`, with spread elements detected via `op === 'spread'`); map `args` becomes `([IASTNode, IASTNode] | [IASTNode])[]` — a length-1 tuple represents a spread entry, preserving positional ordering for override semantics (later writes win). The fast path is preserved: the `list`/`map` `check` swaps `evaluate` meta to `evaluateSpreadList`/`evaluateSpreadMap` only when a spread child is present; literals without spreads run the original `resolveAstArray`/`safeFromEntries` paths byte-for-byte. Spread map sources may be plain objects, `Map` instances, or registered message types (typed as `map<string, dyn>`); the `__proto__`/`constructor`/`prototype` skip from `safeFromEntries` is applied to spread sources too. Runtime errors fire on non-list/non-map sources (including `null`). `maxListElements` / `maxMapEntries` count a spread as one entry — runtime expansion bypasses those caps (deliberate trade-off). Call-argument spread (`f(...args)`) is **not** supported.
@@ -42,6 +45,7 @@ lib/
42
45
  ├── http-builtins.ts — `http` constant + http/HttpRequest types (local addition)
43
46
  ├── http-builder.ts — `HttpRequestBuilder` — what an http.* expression returns
44
47
  ├── json-builtins.ts — `JSON` constant + `JSON.parse` / `JSON.stringify` (local addition)
48
+ ├── form-builtins.ts — `form(map): FormData` global + `FormData` type (local addition)
45
49
  ├── decimal.ts — Decimal class (arbitrary precision)
46
50
  ├── optional.ts — Optional type support (uses Effect Option)
47
51
  ├── serialize.ts — AST back to CEL string
@@ -73,7 +77,7 @@ Internal-only (not re-exported from `index.js`): `parse`, standalone `evaluate`/
73
77
 
74
78
  Primitives: `string`, `bool`, `number`, `bytes`, `null_type`, `type`
75
79
  Composites: `list<T>`, `map<K, V>`, `optional<T>`, `dyn`, `message`
76
- Custom: `Date` (backed by `TZDate` from `@date-fns/tz`), `URL` (backed by the native `URL`; method `URL.param(string): string` reads a search param), `File` (native), `http` / `HttpRequest` (local addition — see `http-builtins.ts`)
80
+ Custom: `Date` (backed by `TZDate` from `@date-fns/tz`), `URL` (backed by the native `URL`; method `URL.param(string): string` reads a search param), `File` (native), `FormData` (native — see `form-builtins.ts`), `http` / `HttpRequest` (local addition — see `http-builtins.ts`)
77
81
 
78
82
  ## Function Signature Format
79
83
 
@@ -174,6 +174,25 @@ unwrapped first so the output is plain JSON — numbers (CEL's `Decimal`) become
174
174
  JS numbers, optionals become their value (or `null` when empty), and `Date`
175
175
  values become ISO 8601 strings.
176
176
 
177
+ ### FormData
178
+ ```cel
179
+ // Build multipart/form-data for an upload:
180
+ http.post("https://api.example.com/files")
181
+ .body(form({"file": myFile, "name": "Alice", "tags": ["a", "b"]}))
182
+ ```
183
+ `form(map): FormData` turns a flat record into a native `FormData`. Pass it
184
+ straight to `.body(...)` — `fetch` sets the multipart boundary, so you don't
185
+ need a `Content-Type` header.
186
+
187
+ Value coercion is flat (same rules as `.query(...)`):
188
+ - `null` / `undefined` / absent `.?` values → key is skipped
189
+ - `Option.Some(x)` → unwrapped to `x`
190
+ - `File` / `Blob` → appended as-is (the `File` filename is preserved)
191
+ - numbers / booleans / dates → coerced to string (`Date` → ISO 8601)
192
+ - arrays → one entry per element under the same key
193
+ - nested objects / maps → error (multipart is flat — use `JSON.stringify(...)`
194
+ on the value if you need a structured field)
195
+
177
196
  ### Dates
178
197
  ```cel
179
198
  date("2023-06-15") // create a Date
@@ -4,6 +4,7 @@ import { evaluationError } from "./errors.js";
4
4
  import { registerFunctions } from "./functions.js";
5
5
  import { registerHttpBuiltins } from "./http-builtins.js";
6
6
  import { registerJSONBuiltins } from "./json-builtins.js";
7
+ import { registerFormBuiltins } from "./form-builtins.js";
7
8
  import { registerMacros } from "./macros.js";
8
9
  import { registerOverloads } from "./overloads.js";
9
10
  import { TypeChecker } from "./type-checker.js";
@@ -16,6 +17,7 @@ registerOverloads(globalRegistry);
16
17
  registerMacros(globalRegistry);
17
18
  registerHttpBuiltins(globalRegistry);
18
19
  registerJSONBuiltins(globalRegistry);
20
+ registerFormBuiltins(globalRegistry);
19
21
  class Environment {
20
22
  #registry;
21
23
  #evaluator;
@@ -0,0 +1,2 @@
1
+ import type { Registry } from './registry.js.js';
2
+ export declare function registerFormBuiltins(registry: Registry): void;
@@ -0,0 +1,58 @@
1
+ import { Option } from "effect";
2
+ import { evaluationError } from "./errors.js";
3
+ import { Decimal } from "./decimal.js";
4
+ function coerceScalar(value) {
5
+ if (value instanceof Blob) return value;
6
+ if (value instanceof Decimal) return value.toString();
7
+ if (value instanceof Date) return value.toISOString();
8
+ if (typeof value === "string") return value;
9
+ if (typeof value === "boolean") return value ? "true" : "false";
10
+ if (typeof value === "number" || typeof value === "bigint") return String(value);
11
+ throw evaluationError(
12
+ "invalid_form_value",
13
+ `form(): unsupported value type ${Object.prototype.toString.call(value)}`
14
+ );
15
+ }
16
+ function appendEntry(fd, key, value) {
17
+ if (value === null || value === void 0) return;
18
+ if (Option.isOption(value)) {
19
+ if (Option.isSome(value)) appendEntry(fd, key, value.value);
20
+ return;
21
+ }
22
+ if (Array.isArray(value)) {
23
+ for (const item of value) appendEntry(fd, key, item);
24
+ return;
25
+ }
26
+ if (value instanceof Blob) {
27
+ fd.append(key, value);
28
+ return;
29
+ }
30
+ if (typeof value === "object" && !(value instanceof Decimal) && !(value instanceof Date)) {
31
+ throw evaluationError(
32
+ "invalid_form_value",
33
+ `form(): nested object values are not supported (key: "${key}")`
34
+ );
35
+ }
36
+ fd.append(key, coerceScalar(value));
37
+ }
38
+ export function registerFormBuiltins(registry) {
39
+ registry.registerType("FormData", FormData);
40
+ registry.registerFunctionOverload("form(dyn): FormData", (record) => {
41
+ if (record === null || record === void 0) {
42
+ throw evaluationError("invalid_form_value", "form(): expected a map, got null");
43
+ }
44
+ const fd = new FormData();
45
+ if (record instanceof Map) {
46
+ for (const [k, v] of record) appendEntry(fd, String(k), v);
47
+ return fd;
48
+ }
49
+ if (typeof record !== "object" || Array.isArray(record)) {
50
+ throw evaluationError("invalid_form_value", "form(): expected a map");
51
+ }
52
+ for (const key of Object.keys(record)) {
53
+ if (key === "__proto__" || key === "constructor" || key === "prototype") continue;
54
+ appendEntry(fd, key, record[key]);
55
+ }
56
+ return fd;
57
+ });
58
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {