@shwfed/config 3.0.6 → 3.0.8
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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/actions/ai-l1.md +24 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.prototype/schema.d.ts +1 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.prototype/schema.js +2 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/prompt.md +8 -0
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +6 -0
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.js +4 -0
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/prompt.md +8 -0
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.d.ts +1 -0
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.js +2 -1
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/prompt.md +9 -0
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/schema.d.ts +1 -0
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/schema.js +2 -1
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/prompt.md +8 -0
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/schema.d.ts +1 -0
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/schema.js +2 -1
- package/dist/runtime/components/actions/config.vue +109 -3
- package/dist/runtime/components/actions/items/2026-05-21/com.shwfed.actions.item.markdown/schema.d.ts +1 -0
- package/dist/runtime/components/actions/items/2026-05-21/com.shwfed.actions.item.markdown/schema.js +2 -1
- package/dist/runtime/components/actions/utils/ai-button-tools.d.ts +29 -0
- package/dist/runtime/components/actions/utils/ai-button-tools.js +664 -0
- package/dist/runtime/components/actions/utils/resolve.d.ts +22 -0
- package/dist/runtime/components/actions/utils/resolve.js +23 -1
- package/dist/runtime/components/config/ai-generate.d.vue.ts +7 -0
- package/dist/runtime/components/config/ai-generate.system.md +39 -0
- package/dist/runtime/components/{table → config}/ai-generate.vue +55 -32
- package/dist/runtime/components/config/ai-generate.vue.d.ts +7 -0
- package/dist/runtime/components/config/ai-page-slot.l1.md +25 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/schema.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/schema.d.ts +1 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/schema.js +1 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +44 -44
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +44 -44
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +44 -44
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +44 -44
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +28 -22
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +7 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.xy/schema.d.ts +1 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.xy/schema.js +1 -0
- package/dist/runtime/components/config/blocks/2026-06-01/com.shwfed.block.animated.number/schema.d.ts +1 -0
- package/dist/runtime/components/config/blocks/2026-06-01/com.shwfed.block.animated.number/schema.js +1 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/schema.d.ts +1 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/schema.js +1 -0
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.d.vue.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.vue.d.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.d.vue.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.vue.d.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/schema.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-06-25/com.shwfed.block.loop/schema.d.ts +7 -0
- package/dist/runtime/components/config/blocks/2026-06-25/com.shwfed.block.loop/schema.js +4 -0
- package/dist/runtime/components/config/config.vue +24 -3
- package/dist/runtime/components/config/history-picker.vue +6 -4
- package/dist/runtime/components/config/prune-dialog.vue +15 -4
- package/dist/runtime/components/config/use-editor.d.ts +1 -0
- package/dist/runtime/components/config/use-editor.js +20 -2
- package/dist/runtime/components/config/utils/ai-cursor.d.ts +21 -0
- package/dist/runtime/components/config/utils/ai-cursor.js +827 -0
- package/dist/runtime/components/config/utils/ai-host-manuals.d.ts +2 -0
- package/dist/runtime/components/config/utils/ai-host-manuals.js +19 -0
- package/dist/runtime/components/config/utils/linkage.d.ts +15 -6
- package/dist/runtime/components/config/utils/linkage.js +23 -7
- package/dist/runtime/components/config/utils/resolve.d.ts +19 -0
- package/dist/runtime/components/config/utils/resolve.js +25 -2
- package/dist/runtime/components/form/ai-l1.md +22 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +7 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/prompt.md +8 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +7 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/prompt.md +12 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +6 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/schema.d.ts +6 -0
- package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/prompt.md +7 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/prompt.md +7 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/prompt.md +9 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/prompt.md +11 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/prompt.md +12 -0
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/prompt.md +14 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/prompt.md +19 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/schema.d.ts +7 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-07-13/com.shwfed.form.field.dynamic/prompt.md +14 -0
- package/dist/runtime/components/form/fields/2026-07-13/com.shwfed.form.field.dynamic/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-07-13/com.shwfed.form.field.dynamic/schema.js +1 -0
- package/dist/runtime/components/form/unit-config.vue +2 -2
- package/dist/runtime/components/form/utils/ai-field-tools.d.ts +2 -2
- package/dist/runtime/components/form/utils/ai-field-tools.js +47 -30
- package/dist/runtime/components/form/utils/resolve.d.ts +11 -0
- package/dist/runtime/components/form/utils/resolve.js +13 -1
- package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/schema.d.ts +1 -0
- package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/schema.js +2 -1
- package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/schema.d.ts +1 -0
- package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/schema.js +1 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/schema.d.ts +1 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/schema.js +2 -1
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/schema.d.ts +1 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/schema.js +2 -1
- package/dist/runtime/components/operations/2026-07-06/com.shwfed.operation.table.add-row/schema.d.ts +1 -0
- package/dist/runtime/components/operations/2026-07-06/com.shwfed.operation.table.add-row/schema.js +2 -1
- package/dist/runtime/components/operations/utils/resolve.d.ts +17 -0
- package/dist/runtime/components/operations/utils/resolve.js +18 -1
- package/dist/runtime/components/table/ai-l1.md +38 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.actions/schema.d.ts +7 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.actions/schema.js +5 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-21/com.shwfed.table.column.drag-handle/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-21/com.shwfed.table.column.drag-handle/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/prompt.md +12 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/prompt.md +16 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-07-12/com.shwfed.table.column.dynamic/prompt.md +15 -0
- package/dist/runtime/components/table/config.d.vue.ts +3 -3
- package/dist/runtime/components/table/config.vue +3 -35
- package/dist/runtime/components/table/config.vue.d.ts +3 -3
- package/dist/runtime/components/table/row-provider.vue +7 -1
- package/dist/runtime/components/table/schema.d.ts +44 -44
- package/dist/runtime/components/table/utils/ai-tools.js +16 -7
- package/dist/runtime/components/table/utils/resolve.d.ts +5 -0
- package/dist/runtime/components/table/utils/resolve.js +12 -1
- package/dist/runtime/share/clipboard.d.ts +15 -9
- package/dist/runtime/share/clipboard.js +22 -10
- package/dist/runtime/share/define-registry.d.ts +66 -0
- package/dist/runtime/share/define-registry.js +37 -1
- package/dist/runtime/share/use-persisted-chat.d.ts +11 -9
- package/dist/runtime/share/use-persisted-chat.js +3 -3
- package/dist/runtime/utils/ai/index.d.ts +1 -1
- package/dist/runtime/utils/ai/index.js +18 -11
- package/dist/runtime/utils/cel-catalog.d.ts +1 -0
- package/dist/runtime/utils/cel-catalog.js +10 -0
- package/dist/runtime/utils/cel-catalog.md +42 -0
- package/dist/runtime/utils/cel-context.d.ts +15 -0
- package/dist/runtime/utils/cel-context.js +8 -0
- package/dist/runtime/vendor/cel-js/CLAUDE.md +7 -2
- package/dist/runtime/vendor/cel-js/PROMPT.md +27 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.js +2 -0
- package/dist/runtime/vendor/cel-js/lib/globals.d.ts +2 -0
- package/dist/runtime/vendor/cel-js/lib/globals.js +10 -0
- package/dist/runtime/vendor/cel-js/lib/map-builtins.d.ts +2 -0
- package/dist/runtime/vendor/cel-js/lib/map-builtins.js +80 -0
- package/dist/runtime/vendor/cel-js/lib/operators.js +2 -12
- package/package.json +1 -1
- package/dist/runtime/components/table/ai-generate.d.vue.ts +0 -16
- package/dist/runtime/components/table/ai-generate.system.md +0 -101
- package/dist/runtime/components/table/ai-generate.vue.d.ts +0 -16
- /package/dist/runtime/components/{table → config}/ai-generate.system.d.ts +0 -0
- /package/dist/runtime/components/{table → config}/ai-generate.system.js +0 -0
package/dist/module.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
你正在配置一组操作按钮(actions)。一组操作由**按钮组**(group)与**按钮项**(item)构成:每个按钮属于一个组,组只用于视觉分段。发现式推进:先 `list_available_button_types` / `describe_specific_button_type` 看清可用按钮类型与其配置契约,再增删配置;配完 `leave_node` 返回。
|
|
2
|
+
|
|
3
|
+
## 增删按钮
|
|
4
|
+
|
|
5
|
+
- `insert_action_group` 建组(可设默认变体),`insert_button` 新增按钮(不传 `groupId` 则自动建一个新组)。按钮初始只有身份,动作字段留空——像人手动「先加后配」,随后用 `configure_button` 补齐(必填字段未填时校验会提示)。
|
|
6
|
+
- `insert_dropdown` 建下拉菜单,`insert_button({ dropdownId })` 往下拉里加子按钮。
|
|
7
|
+
- `set_action_item` 配按钮外观(标题、图标、变体、仅图标,以及 CEL 的 `hidden` / `disabled` 条件);`configure_button` 配按钮**行为**(各类型自己的字段 + 触发链)。
|
|
8
|
+
- `list_action_groups` / `list_action_items` / `delete_action_groups` / `delete_action_items` 管理。
|
|
9
|
+
|
|
10
|
+
## 触发接线(trigger)
|
|
11
|
+
|
|
12
|
+
多数按钮的行为是**向上冒泡的操作请求**:请求某个祖先实例执行它的一个操作。一条触发行是 `{ target, operation, params }`:
|
|
13
|
+
|
|
14
|
+
- `target` 是目标实例 id,**必须**取自 `describe_event_targets`(它按当前位置列出可达目标:页面、外层表格 / 树、以及承载当前弹窗的按钮)。
|
|
15
|
+
- `operation` 是该目标暴露的操作 id。目标里带 `compatibilityDate` 的是**参数化操作**——用 `list_operations` 查其 `params` 契约(JSON Schema);不带的是无参操作(如表格的 `search` / `reset-query`、页面的 `close`、表单的 `validate`)。
|
|
16
|
+
- 触发字段名由按钮类型决定(`describe_specific_button_type` 的 `triggerFields` 会点名,如 `triggers` / `before` / `onSuccess`)。用 `configure_button` 把触发行写进对应字段。
|
|
17
|
+
|
|
18
|
+
常见接线:搜索按钮 → `触发事件`,触发目标表格的 `search`;重置按钮 → 触发目标表格的 `reset-query`;提交按钮 → `请求`,`before` 里先触发表单 `validate`(校验未过则中止),`onSuccess` 里再刷新表格。
|
|
19
|
+
|
|
20
|
+
**链步引用(`steps`)**:触发行按顺序串行执行,发布输出的操作(如「发送请求」,见 `list_operations` 的 `output`)把结果存到该行 `id` 名下,后续行的 CEL 经 `steps[?"<该行 id>"]` 读取——例如先「发送请求」取下载凭据、再「下载文件」引用它。需要被引用的行请**自带一个新 UUID 作 `id`**(这是行输出的稳定地址,重排也不变);不引用输出的行可省略 `id`,写入时会自动补上。
|
|
21
|
+
|
|
22
|
+
## 模态窗口按钮
|
|
23
|
+
|
|
24
|
+
`模态窗口` 按钮点击后弹出一个含块的弹窗,其内容是一个页面槽(page-slot)。`describe_specific_button_type` 里 `drillable: true` 即表示可钻入——`enter_node` 进入后用页面块工具族在弹窗内搭块。关闭弹窗的触发目标是**承载弹窗的按钮实例**(不是弹窗本身)。
|
|
@@ -5,6 +5,7 @@ export declare const compatibilityDate: "2026-04-18";
|
|
|
5
5
|
export declare const metadata: {
|
|
6
6
|
readonly name: "原型";
|
|
7
7
|
readonly icon: "fluent:predictions-20-regular";
|
|
8
|
+
readonly description: "占位按钮,点击无副作用;先占位、之后可一键转换为其它按钮类型";
|
|
8
9
|
};
|
|
9
10
|
export declare function schema(_configure: (env: Environment) => void): Schema.Struct<{
|
|
10
11
|
type: Schema.Literal<["com.shwfed.actions.button.prototype"]>;
|
|
@@ -3,7 +3,8 @@ export const type = "com.shwfed.actions.button.prototype";
|
|
|
3
3
|
export const compatibilityDate = "2026-04-18";
|
|
4
4
|
export const metadata = {
|
|
5
5
|
name: "\u539F\u578B",
|
|
6
|
-
icon: "fluent:predictions-20-regular"
|
|
6
|
+
icon: "fluent:predictions-20-regular",
|
|
7
|
+
description: "\u5360\u4F4D\u6309\u94AE\uFF0C\u70B9\u51FB\u65E0\u526F\u4F5C\u7528\uFF1B\u5148\u5360\u4F4D\u3001\u4E4B\u540E\u53EF\u4E00\u952E\u8F6C\u6362\u4E3A\u5176\u5B83\u6309\u94AE\u7C7B\u578B"
|
|
7
8
|
};
|
|
8
9
|
export function schema(_configure) {
|
|
9
10
|
return Schema.Struct({
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## 模态窗口按钮
|
|
2
|
+
|
|
3
|
+
点击后弹出一个弹窗,弹窗内容是一个**页面槽**(可放任意块与布局)。
|
|
4
|
+
|
|
5
|
+
- 配置弹窗外观用 `configure_button`:`modalTitle`(本地化标题,不填回退按钮名)、`modalWidth`(如 `720px` / `60vw`)、`modalMinHeight`。
|
|
6
|
+
- 弹窗**内容**不在 `configure_button` 里配——它 `drillable`,用 `enter_node` 进入其内部页面槽,再用页面块工具族搭块(表格、表单等,可继续递归)。
|
|
7
|
+
- 该按钮暴露一个 `close` 操作:弹窗里的「关闭」按钮要触发**这个按钮实例的 id**(承载弹窗者)的 `close`,而不是弹窗自身。
|
|
8
|
+
- 弹窗内的块**继承打开处的作用域**:行操作弹窗内可直接引用 `row`,表单里的弹窗可直接引用 `form`。只有当弹窗内又嵌套了重新绑定同名变量的作用域(如弹窗里的表格行)、外层被遮蔽时,才需要 `__scopes__["<外层实例 uuid>"].row` 跨层寻址。
|
|
@@ -2,9 +2,15 @@ import { Schema } from 'effect';
|
|
|
2
2
|
import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
|
|
3
3
|
export declare const type: "com.shwfed.actions.button.modal.layout";
|
|
4
4
|
export declare const compatibilityDate: "2026-05-11";
|
|
5
|
+
export declare const edges: readonly [{
|
|
6
|
+
readonly key: "slot";
|
|
7
|
+
readonly host: "slot";
|
|
8
|
+
readonly label: "弹窗内容";
|
|
9
|
+
}];
|
|
5
10
|
export declare const metadata: {
|
|
6
11
|
readonly name: "模态窗口";
|
|
7
12
|
readonly icon: "fluent:window-edit-20-regular";
|
|
13
|
+
readonly description: "点击后弹出一个包含一组块的弹窗;其内容是一个可继续配置的页面槽";
|
|
8
14
|
readonly drillable: true;
|
|
9
15
|
readonly operations: readonly [{
|
|
10
16
|
readonly id: "close";
|
|
@@ -4,9 +4,13 @@ import { Slot, defaultSlot } from "../../../../../share/layout.js";
|
|
|
4
4
|
import { lookupBlockRef } from "../../../../config/utils/block-ref-cache.js";
|
|
5
5
|
export const type = "com.shwfed.actions.button.modal.layout";
|
|
6
6
|
export const compatibilityDate = "2026-05-11";
|
|
7
|
+
export const edges = [
|
|
8
|
+
{ key: "slot", host: "slot", label: "\u5F39\u7A97\u5185\u5BB9" }
|
|
9
|
+
];
|
|
7
10
|
export const metadata = {
|
|
8
11
|
name: "\u6A21\u6001\u7A97\u53E3",
|
|
9
12
|
icon: "fluent:window-edit-20-regular",
|
|
13
|
+
description: "\u70B9\u51FB\u540E\u5F39\u51FA\u4E00\u4E2A\u5305\u542B\u4E00\u7EC4\u5757\u7684\u5F39\u7A97\uFF1B\u5176\u5185\u5BB9\u662F\u4E00\u4E2A\u53EF\u7EE7\u7EED\u914D\u7F6E\u7684\u9875\u9762\u69FD",
|
|
10
14
|
drillable: true,
|
|
11
15
|
operations: [
|
|
12
16
|
{ id: "close", name: "\u5173\u95ED\u5F39\u7A97", icon: "fluent:dismiss-20-regular" }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## 触发事件按钮
|
|
2
|
+
|
|
3
|
+
最通用的按钮:它自己不做任何事,只按顺序**触发一组操作**(`triggers`),每条 `{ target, operation, params }` 向某个祖先实例发一个操作请求。
|
|
4
|
+
|
|
5
|
+
- 目标与操作先用 `describe_event_targets`(可达实例 + 各自操作)与 `list_operations`(参数化操作的 `params` 契约)查清;`target` 必须是前者返回的 id。
|
|
6
|
+
- 典型用法:一个「搜索」按钮触发目标表格的 `search`;一个「重置」按钮触发目标表格的 `reset-query`;一个「关闭」按钮触发**承载弹窗的按钮实例**(不是弹窗本身)的 `close`。
|
|
7
|
+
- 触发行按列表顺序串行执行,前一条中止(如表单「校验」未过、确认弹窗取消)会取消其后的行——把校验 / 确认放在最前面即可作为前置门。
|
|
8
|
+
- 需要引用某个已发请求的响应时,用参数化的「发送请求」操作作为其中一行,后续行以 `steps[?"<该行 id>"]` 读取其输出。
|
|
@@ -6,6 +6,7 @@ export declare const compatibilityDate: "2026-05-15";
|
|
|
6
6
|
export declare const metadata: {
|
|
7
7
|
readonly name: "触发事件";
|
|
8
8
|
readonly icon: "fluent:flash-20-regular";
|
|
9
|
+
readonly description: "点击后按顺序触发一组操作(如搜索 / 重置 / 关闭弹窗 / 页面级请求);最通用的按钮";
|
|
9
10
|
};
|
|
10
11
|
export declare function schema(_configure: (env: Environment) => void): Schema.Struct<{
|
|
11
12
|
type: Schema.Literal<["com.shwfed.actions.button.event.dispatch"]>;
|
|
@@ -7,7 +7,8 @@ export const type = "com.shwfed.actions.button.event.dispatch";
|
|
|
7
7
|
export const compatibilityDate = "2026-05-15";
|
|
8
8
|
export const metadata = {
|
|
9
9
|
name: "\u89E6\u53D1\u4E8B\u4EF6",
|
|
10
|
-
icon: "fluent:flash-20-regular"
|
|
10
|
+
icon: "fluent:flash-20-regular",
|
|
11
|
+
description: "\u70B9\u51FB\u540E\u6309\u987A\u5E8F\u89E6\u53D1\u4E00\u7EC4\u64CD\u4F5C\uFF08\u5982\u641C\u7D22 / \u91CD\u7F6E / \u5173\u95ED\u5F39\u7A97 / \u9875\u9762\u7EA7\u8BF7\u6C42\uFF09\uFF1B\u6700\u901A\u7528\u7684\u6309\u94AE"
|
|
11
12
|
};
|
|
12
13
|
export function schema(_configure) {
|
|
13
14
|
return Schema.Struct({
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## 批量请求按钮
|
|
2
|
+
|
|
3
|
+
点击后对一个**请求列表**逐条串行发送,配一个带进度与「停止」的弹窗。适合批量提交 / 导入选中行。
|
|
4
|
+
|
|
5
|
+
- `expression`(请求列表)求值为一组 `HttpRequestBuilder`——常见是对 `selected`(已选行)逐行 `map` 构造请求。
|
|
6
|
+
- `resultExpression` 逐条对该条响应体 `json` 求值返回 `bool` 判定成功;不配则任何未报错的响应都算成功。
|
|
7
|
+
- `continueOnError` 关(默认)时首个失败即停;开则跳过失败继续。
|
|
8
|
+
- `messageExpression` 在全部结束后对成功响应体列表 `jsons` 求值一次作 toast,全成功样式为 success、有失败为 error。
|
|
9
|
+
- `markdown` 是进度弹窗正文,可用 `total` / `succeeded` / `failure` 计数插值实时刷新。
|
|
@@ -5,6 +5,7 @@ export declare const compatibilityDate: "2026-06-08";
|
|
|
5
5
|
export declare const metadata: {
|
|
6
6
|
readonly name: "批量请求";
|
|
7
7
|
readonly icon: "fluent:cloud-arrow-up-20-regular";
|
|
8
|
+
readonly description: "点击后按顺序逐条发送一批 HTTP 请求,带进度弹窗;适合批量提交 / 导入";
|
|
8
9
|
};
|
|
9
10
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
10
11
|
type: Schema.Literal<["com.shwfed.actions.button.http.request.json.batch"]>;
|
|
@@ -7,7 +7,8 @@ export const type = "com.shwfed.actions.button.http.request.json.batch";
|
|
|
7
7
|
export const compatibilityDate = "2026-06-08";
|
|
8
8
|
export const metadata = {
|
|
9
9
|
name: "\u6279\u91CF\u8BF7\u6C42",
|
|
10
|
-
icon: "fluent:cloud-arrow-up-20-regular"
|
|
10
|
+
icon: "fluent:cloud-arrow-up-20-regular",
|
|
11
|
+
description: "\u70B9\u51FB\u540E\u6309\u987A\u5E8F\u9010\u6761\u53D1\u9001\u4E00\u6279 HTTP \u8BF7\u6C42\uFF0C\u5E26\u8FDB\u5EA6\u5F39\u7A97\uFF1B\u9002\u5408\u6279\u91CF\u63D0\u4EA4 / \u5BFC\u5165"
|
|
11
12
|
};
|
|
12
13
|
const isHttpRequestList = (t) => t === "dyn" || t === "list" || t === "list<dyn>" || t === "list<HttpRequest>";
|
|
13
14
|
export function schema(configure) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## 写入表单状态按钮
|
|
2
|
+
|
|
3
|
+
点击后把一批 CEL 表达式的结果写回**最近祖先表单**的状态。
|
|
4
|
+
|
|
5
|
+
- `writes` 是一个 `{ path, value }` 列表,按顺序逐行求值写入:`path` 是绑定路径(如 `dataJson.cus_currency`),`value` 是点击时求值的 CEL。对象值与当前值**深合并**(数组整体替换),其他类型直接替换。
|
|
6
|
+
- `before`(写入前)是一条触发链:任一步中止(请求失败、表单校验未过)取消本次写入。放「发送请求」在此可先取远端数据;其输出在 `value` 与 `onSuccess` 里用 `steps[?"<第 N 步 id>"]` 引用。
|
|
7
|
+
- `onSuccess`(写入后)是写入完成后再跑的触发链(如刷新表格、关闭弹窗)。
|
|
8
|
+
- 只想改本地表单值、不发请求时,`writes` 直接写常量 / 引用 `form` 即可;无需触发链。
|
|
@@ -6,6 +6,7 @@ export declare const compatibilityDate: "2026-07-13";
|
|
|
6
6
|
export declare const metadata: {
|
|
7
7
|
readonly name: "写入表单状态";
|
|
8
8
|
readonly icon: "fluent:document-edit-20-regular";
|
|
9
|
+
readonly description: "点击后按顺序把每个 CEL 求值结果写入最近祖先表单状态的对应绑定路径;写入前后可各接一条触发链";
|
|
9
10
|
};
|
|
10
11
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
11
12
|
type: Schema.Literal<["com.shwfed.actions.button.state.write"]>;
|
|
@@ -9,7 +9,8 @@ export const type = "com.shwfed.actions.button.state.write";
|
|
|
9
9
|
export const compatibilityDate = "2026-07-13";
|
|
10
10
|
export const metadata = {
|
|
11
11
|
name: "\u5199\u5165\u8868\u5355\u72B6\u6001",
|
|
12
|
-
icon: "fluent:document-edit-20-regular"
|
|
12
|
+
icon: "fluent:document-edit-20-regular",
|
|
13
|
+
description: "\u70B9\u51FB\u540E\u6309\u987A\u5E8F\u628A\u6BCF\u4E2A CEL \u6C42\u503C\u7ED3\u679C\u5199\u5165\u6700\u8FD1\u7956\u5148\u8868\u5355\u72B6\u6001\u7684\u5BF9\u5E94\u7ED1\u5B9A\u8DEF\u5F84\uFF1B\u5199\u5165\u524D\u540E\u53EF\u5404\u63A5\u4E00\u6761\u89E6\u53D1\u94FE"
|
|
13
14
|
};
|
|
14
15
|
export function schema(configure) {
|
|
15
16
|
const withSteps = (env) => {
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
import { Environment } from "../../vendor/cel-js/lib/index";
|
|
13
13
|
import { cel as rawCel } from "../../utils/cel";
|
|
14
14
|
import { celBindings, injectCELContext, provideCELContext } from "../../utils/cel-context";
|
|
15
|
+
import { readClip, reidFragment, writeClip } from "../../share/clipboard";
|
|
15
16
|
import { BUTTONS, findButton, ITEMS, findItem } from "./utils/resolve";
|
|
16
17
|
import { SIDEBAR_TAKEOVER_KEY } from "../sidebar-takeover";
|
|
17
18
|
import { BREADCRUMB_EXTENSION_KEY } from "../config/breadcrumb-extension";
|
|
@@ -175,6 +176,9 @@ const editingStyle = computed({
|
|
|
175
176
|
}
|
|
176
177
|
});
|
|
177
178
|
const selected = ref({ kind: "general" });
|
|
179
|
+
const pickedItemIds = ref([]);
|
|
180
|
+
const pickedItemIdSet = computed(() => new Set(pickedItemIds.value));
|
|
181
|
+
const pickAnchor = ref(null);
|
|
178
182
|
function itemsOfGroup(groupId) {
|
|
179
183
|
return editingItems.value.filter((it) => it.groupId === groupId);
|
|
180
184
|
}
|
|
@@ -528,12 +532,107 @@ function selectGeneral() {
|
|
|
528
532
|
function selectGroup(id) {
|
|
529
533
|
selected.value = { kind: "group", id };
|
|
530
534
|
}
|
|
531
|
-
|
|
535
|
+
const orderedItemIds = computed(
|
|
536
|
+
() => editingGroups.value.flatMap((g) => itemsOfGroup(g.id).map((it) => it.id))
|
|
537
|
+
);
|
|
538
|
+
function itemRange(a, b) {
|
|
539
|
+
const ord = orderedItemIds.value;
|
|
540
|
+
const ia = ord.indexOf(a);
|
|
541
|
+
const ib = ord.indexOf(b);
|
|
542
|
+
if (ia === -1 || ib === -1) return [b];
|
|
543
|
+
const [lo, hi] = ia <= ib ? [ia, ib] : [ib, ia];
|
|
544
|
+
return ord.slice(lo, hi + 1);
|
|
545
|
+
}
|
|
546
|
+
function selectItem(id, e) {
|
|
547
|
+
const meta = !!e && (e.metaKey || e.ctrlKey);
|
|
548
|
+
if (meta && e.shiftKey) {
|
|
549
|
+
const range = pickAnchor.value ? itemRange(pickAnchor.value, id) : [id];
|
|
550
|
+
const set = new Set(pickedItemIds.value);
|
|
551
|
+
for (const iid of range) set.add(iid);
|
|
552
|
+
pickedItemIds.value = orderedItemIds.value.filter((iid) => set.has(iid));
|
|
553
|
+
pickAnchor.value = id;
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
if (meta) {
|
|
557
|
+
const set = new Set(pickedItemIds.value);
|
|
558
|
+
if (set.has(id)) set.delete(id);
|
|
559
|
+
else set.add(id);
|
|
560
|
+
pickedItemIds.value = orderedItemIds.value.filter((iid) => set.has(iid));
|
|
561
|
+
pickAnchor.value = id;
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
pickedItemIds.value = [];
|
|
565
|
+
pickAnchor.value = null;
|
|
532
566
|
selected.value = { kind: "item", id };
|
|
533
567
|
}
|
|
534
568
|
function selectSub(id) {
|
|
535
569
|
selected.value = { kind: "sub", id };
|
|
536
570
|
}
|
|
571
|
+
watch(selected, (s) => {
|
|
572
|
+
if (s?.kind !== "item") {
|
|
573
|
+
pickedItemIds.value = [];
|
|
574
|
+
pickAnchor.value = null;
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
async function copyItems() {
|
|
578
|
+
if (pickedItemIds.value.length === 0) return;
|
|
579
|
+
const set = pickedItemIdSet.value;
|
|
580
|
+
const items = orderedItemIds.value.filter((id) => set.has(id)).map((id) => findItemNode(id)).filter((it) => !!it);
|
|
581
|
+
if (items.length === 0) return;
|
|
582
|
+
const groupIds = new Set(items.map((it) => it.groupId));
|
|
583
|
+
const groups = editingGroups.value.filter((g) => groupIds.has(g.id));
|
|
584
|
+
const ok = await writeClip("actions", { items, groups });
|
|
585
|
+
if (ok) toast.success(`\u5DF2\u590D\u5236 ${items.length} \u4E2A\u6309\u94AE`);
|
|
586
|
+
else toast.error("\u590D\u5236\u5931\u8D25");
|
|
587
|
+
}
|
|
588
|
+
async function pasteItems() {
|
|
589
|
+
const clip = await readClip();
|
|
590
|
+
if (!clip || clip.surface !== "actions") return;
|
|
591
|
+
const { items, groups } = reidFragment(clip);
|
|
592
|
+
const pastedItems = items;
|
|
593
|
+
if (pastedItems.length === 0) return;
|
|
594
|
+
const w = snapshot();
|
|
595
|
+
const pastedGroups = [...groups ?? []];
|
|
596
|
+
const known = new Set(pastedGroups.map((g) => g.id));
|
|
597
|
+
const repaired = pastedItems.map((it) => {
|
|
598
|
+
if (known.has(it.groupId)) return it;
|
|
599
|
+
const group = { id: crypto.randomUUID() };
|
|
600
|
+
pastedGroups.push(group);
|
|
601
|
+
known.add(group.id);
|
|
602
|
+
return { ...it, groupId: group.id };
|
|
603
|
+
});
|
|
604
|
+
w.groups = [...w.groups, ...pastedGroups];
|
|
605
|
+
w.items = sortByGroupOrder(w.groups, [...w.items, ...repaired]);
|
|
606
|
+
commit(w);
|
|
607
|
+
const ids = repaired.map((it) => it.id);
|
|
608
|
+
pickedItemIds.value = ids;
|
|
609
|
+
pickAnchor.value = ids[ids.length - 1] ?? null;
|
|
610
|
+
selected.value = { kind: "item", id: ids[ids.length - 1] };
|
|
611
|
+
toast.success(`\u5DF2\u7C98\u8D34 ${repaired.length} \u4E2A\u6309\u94AE`);
|
|
612
|
+
}
|
|
613
|
+
function isTextInput(el) {
|
|
614
|
+
if (!(el instanceof HTMLElement)) return false;
|
|
615
|
+
const tag = el.tagName;
|
|
616
|
+
return tag === "INPUT" || tag === "TEXTAREA" || el.isContentEditable;
|
|
617
|
+
}
|
|
618
|
+
function onItemListKeydown(e) {
|
|
619
|
+
if (isTextInput(e.target)) return;
|
|
620
|
+
const mod = e.metaKey || e.ctrlKey;
|
|
621
|
+
if (!mod || e.shiftKey || e.altKey) return;
|
|
622
|
+
const key = e.key.toLowerCase();
|
|
623
|
+
if (key === "c") {
|
|
624
|
+
if (pickedItemIds.value.length === 0) return;
|
|
625
|
+
const sel = window.getSelection();
|
|
626
|
+
if (sel && !sel.isCollapsed) return;
|
|
627
|
+
e.preventDefault();
|
|
628
|
+
e.stopPropagation();
|
|
629
|
+
void copyItems();
|
|
630
|
+
} else if (key === "v") {
|
|
631
|
+
e.preventDefault();
|
|
632
|
+
e.stopPropagation();
|
|
633
|
+
void pasteItems();
|
|
634
|
+
}
|
|
635
|
+
}
|
|
537
636
|
function isSourceDropdown(src) {
|
|
538
637
|
if (src.kind !== ITEM_DRAG_KIND) return false;
|
|
539
638
|
const it = editingItems.value.find((i) => i.id === src.id);
|
|
@@ -795,6 +894,10 @@ function wrapActionItemInDropdown(itemId) {
|
|
|
795
894
|
selected.value = { kind: "item", id: dropdown.id };
|
|
796
895
|
}
|
|
797
896
|
function resolveSelection() {
|
|
897
|
+
const live = new Set(editingItems.value.map((it) => it.id));
|
|
898
|
+
if (pickedItemIds.value.some((id) => !live.has(id))) {
|
|
899
|
+
pickedItemIds.value = pickedItemIds.value.filter((id) => live.has(id));
|
|
900
|
+
}
|
|
798
901
|
const s = selected.value;
|
|
799
902
|
if (!s || s.kind === "general") return;
|
|
800
903
|
if (s.kind === "group" && findGroup(s.id)) return;
|
|
@@ -959,7 +1062,10 @@ const newGroupZoneId = (insertIndex) => `new-group-${insertIndex}`;
|
|
|
959
1062
|
:disabled="!outerTakeoverTarget"
|
|
960
1063
|
>
|
|
961
1064
|
<div
|
|
1065
|
+
class="outline-none"
|
|
962
1066
|
:class="outerTakeoverTarget ? 'flex flex-1 flex-col gap-2 min-h-0' : 'flex gap-2 w-72 shrink-0 flex-col'"
|
|
1067
|
+
tabindex="-1"
|
|
1068
|
+
@keydown="onItemListKeydown"
|
|
963
1069
|
>
|
|
964
1070
|
<div
|
|
965
1071
|
v-if="selectedDrillableAction"
|
|
@@ -1040,9 +1146,9 @@ const newGroupZoneId = (insertIndex) => `new-group-${insertIndex}`;
|
|
|
1040
1146
|
<div
|
|
1041
1147
|
class="row group item-row pl-5"
|
|
1042
1148
|
:class="[
|
|
1043
|
-
selected?.kind === 'item' && selected.id === item.id ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : 'text-zinc-600 hover:bg-zinc-50'
|
|
1149
|
+
selected?.kind === 'item' && selected.id === item.id ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : pickedItemIdSet.has(item.id) ? 'bg-zinc-100 text-zinc-700' : 'text-zinc-600 hover:bg-zinc-50'
|
|
1044
1150
|
]"
|
|
1045
|
-
@click.stop="selectItem(item.id)"
|
|
1151
|
+
@click.stop="selectItem(item.id, $event)"
|
|
1046
1152
|
>
|
|
1047
1153
|
<Icon
|
|
1048
1154
|
icon="fluent:re-order-dots-vertical-20-regular"
|
|
@@ -5,6 +5,7 @@ export declare const compatibilityDate: "2026-05-21";
|
|
|
5
5
|
export declare const metadata: {
|
|
6
6
|
readonly name: "内联 Markdown";
|
|
7
7
|
readonly icon: "fluent:markdown-20-regular";
|
|
8
|
+
readonly description: "与按钮并排展示一段内联 Markdown 文本(仅展示,不是按钮)";
|
|
8
9
|
};
|
|
9
10
|
export declare function schema(_configure: (env: Environment) => void): Schema.Struct<{
|
|
10
11
|
id: Schema.refine<string, typeof Schema.String>;
|
package/dist/runtime/components/actions/items/2026-05-21/com.shwfed.actions.item.markdown/schema.js
CHANGED
|
@@ -4,7 +4,8 @@ export const type = "com.shwfed.actions.item.markdown";
|
|
|
4
4
|
export const compatibilityDate = "2026-05-21";
|
|
5
5
|
export const metadata = {
|
|
6
6
|
name: "\u5185\u8054 Markdown",
|
|
7
|
-
icon: "fluent:markdown-20-regular"
|
|
7
|
+
icon: "fluent:markdown-20-regular",
|
|
8
|
+
description: "\u4E0E\u6309\u94AE\u5E76\u6392\u5C55\u793A\u4E00\u6BB5\u5185\u8054 Markdown \u6587\u672C\uFF08\u4EC5\u5C55\u793A\uFF0C\u4E0D\u662F\u6309\u94AE\uFF09"
|
|
8
9
|
};
|
|
9
10
|
export function schema(_configure) {
|
|
10
11
|
return Schema.Struct({
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Environment } from '../../../vendor/cel-js/lib/index.js';
|
|
2
|
+
import type { AgenticTool } from '../../../utils/ai/index.js';
|
|
3
|
+
type AnyRecord = Record<string, any>;
|
|
4
|
+
/** 一个可作为 trigger `target` 的事件目标实例及其操作(由游标按帧栈计算)。 */
|
|
5
|
+
export interface EventTargetInfo {
|
|
6
|
+
/** 实例 id(trigger 的 `target`);null 表示该目标尚无 id,无法被可靠寻址。 */
|
|
7
|
+
id: string | null;
|
|
8
|
+
/** 目标种类,仅供模型理解(table / queryForm / page / tree / modal)。 */
|
|
9
|
+
kind: string;
|
|
10
|
+
/** 目标的展示名(内部名称,或类型名兜底)。 */
|
|
11
|
+
name: string;
|
|
12
|
+
/** 该目标暴露的操作;`compatibilityDate` 存在即为参数化操作。 */
|
|
13
|
+
operations: ReadonlyArray<{
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
compatibilityDate?: string;
|
|
17
|
+
}>;
|
|
18
|
+
/** 可选说明(例如「尚无 id」)。 */
|
|
19
|
+
note?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ActionsAiToolDeps {
|
|
22
|
+
readonly read: () => AnyRecord | undefined;
|
|
23
|
+
readonly write: (next: AnyRecord) => void;
|
|
24
|
+
readonly configure: (env: Environment) => void;
|
|
25
|
+
readonly genUuid: () => string;
|
|
26
|
+
readonly eventTargets?: () => ReadonlyArray<EventTargetInfo>;
|
|
27
|
+
}
|
|
28
|
+
export declare function createActionsAiTools(deps: ActionsAiToolDeps): AgenticTool[];
|
|
29
|
+
export {};
|