@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
|
@@ -36,15 +36,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
36
36
|
}[]] | undefined;
|
|
37
37
|
readonly keywords?: string | undefined;
|
|
38
38
|
readonly readonly?: string | undefined;
|
|
39
|
+
readonly dataSource: {
|
|
40
|
+
readonly data: string;
|
|
41
|
+
readonly request?: string | undefined;
|
|
42
|
+
};
|
|
39
43
|
readonly binding: string;
|
|
40
44
|
readonly derived?: {
|
|
41
45
|
readonly mode: "formula" | "prefill";
|
|
42
46
|
readonly expression: string;
|
|
43
47
|
} | undefined;
|
|
44
|
-
readonly dataSource: {
|
|
45
|
-
readonly data: string;
|
|
46
|
-
readonly request?: string | undefined;
|
|
47
|
-
};
|
|
48
48
|
readonly nodeKey: string;
|
|
49
49
|
readonly nodeChildren: string;
|
|
50
50
|
readonly nodeLabel: string;
|
|
@@ -94,15 +94,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
94
94
|
}[]] | undefined;
|
|
95
95
|
readonly keywords?: string | undefined;
|
|
96
96
|
readonly readonly?: string | undefined;
|
|
97
|
+
readonly dataSource: {
|
|
98
|
+
readonly data: string;
|
|
99
|
+
readonly request?: string | undefined;
|
|
100
|
+
};
|
|
97
101
|
readonly binding: string;
|
|
98
102
|
readonly derived?: {
|
|
99
103
|
readonly mode: "formula" | "prefill";
|
|
100
104
|
readonly expression: string;
|
|
101
105
|
} | undefined;
|
|
102
|
-
readonly dataSource: {
|
|
103
|
-
readonly data: string;
|
|
104
|
-
readonly request?: string | undefined;
|
|
105
|
-
};
|
|
106
106
|
readonly nodeKey: string;
|
|
107
107
|
readonly nodeChildren: string;
|
|
108
108
|
readonly nodeLabel: string;
|
|
@@ -36,15 +36,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
36
36
|
}[]] | undefined;
|
|
37
37
|
readonly keywords?: string | undefined;
|
|
38
38
|
readonly readonly?: string | undefined;
|
|
39
|
+
readonly dataSource: {
|
|
40
|
+
readonly data: string;
|
|
41
|
+
readonly request?: string | undefined;
|
|
42
|
+
};
|
|
39
43
|
readonly binding: string;
|
|
40
44
|
readonly derived?: {
|
|
41
45
|
readonly mode: "formula" | "prefill";
|
|
42
46
|
readonly expression: string;
|
|
43
47
|
} | undefined;
|
|
44
|
-
readonly dataSource: {
|
|
45
|
-
readonly data: string;
|
|
46
|
-
readonly request?: string | undefined;
|
|
47
|
-
};
|
|
48
48
|
readonly nodeKey: string;
|
|
49
49
|
readonly nodeChildren: string;
|
|
50
50
|
readonly nodeLabel: string;
|
|
@@ -94,15 +94,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
94
94
|
}[]] | undefined;
|
|
95
95
|
readonly keywords?: string | undefined;
|
|
96
96
|
readonly readonly?: string | undefined;
|
|
97
|
+
readonly dataSource: {
|
|
98
|
+
readonly data: string;
|
|
99
|
+
readonly request?: string | undefined;
|
|
100
|
+
};
|
|
97
101
|
readonly binding: string;
|
|
98
102
|
readonly derived?: {
|
|
99
103
|
readonly mode: "formula" | "prefill";
|
|
100
104
|
readonly expression: string;
|
|
101
105
|
} | undefined;
|
|
102
|
-
readonly dataSource: {
|
|
103
|
-
readonly data: string;
|
|
104
|
-
readonly request?: string | undefined;
|
|
105
|
-
};
|
|
106
106
|
readonly nodeKey: string;
|
|
107
107
|
readonly nodeChildren: string;
|
|
108
108
|
readonly nodeLabel: string;
|
|
@@ -7,6 +7,7 @@ export declare const compatibilityDate: "2026-06-14";
|
|
|
7
7
|
export declare const metadata: {
|
|
8
8
|
readonly name: "下拉树(单选)";
|
|
9
9
|
readonly icon: "fluent:tree-evergreen-20-regular";
|
|
10
|
+
readonly description: "可编辑的下拉树单选单元格,选中节点写回行数据";
|
|
10
11
|
readonly selection: true;
|
|
11
12
|
};
|
|
12
13
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
@@ -17,6 +17,7 @@ export const compatibilityDate = "2026-06-14";
|
|
|
17
17
|
export const metadata = {
|
|
18
18
|
name: "\u4E0B\u62C9\u6811\uFF08\u5355\u9009\uFF09",
|
|
19
19
|
icon: "fluent:tree-evergreen-20-regular",
|
|
20
|
+
description: "\u53EF\u7F16\u8F91\u7684\u4E0B\u62C9\u6811\u5355\u9009\u5355\u5143\u683C\uFF0C\u9009\u4E2D\u8282\u70B9\u5199\u56DE\u884C\u6570\u636E",
|
|
20
21
|
// Publishes its resolved node (backend record) to the per-row `selections` registry (runtime.vue), readable via `selections["<id>"]`.
|
|
21
22
|
selection: true
|
|
22
23
|
};
|
|
@@ -7,6 +7,7 @@ export declare const compatibilityDate: "2026-06-17";
|
|
|
7
7
|
export declare const metadata: {
|
|
8
8
|
readonly name: "日期输入";
|
|
9
9
|
readonly icon: "fluent:calendar-ltr-20-regular";
|
|
10
|
+
readonly description: "可编辑的日期输入单元格,值写回行数据";
|
|
10
11
|
};
|
|
11
12
|
export declare function presetSchema(configure: (env: Environment) => void): Schema.Struct<{
|
|
12
13
|
id: Schema.refine<string, typeof Schema.String>;
|
|
@@ -7,7 +7,8 @@ export const type = "com.shwfed.table.column.date-input";
|
|
|
7
7
|
export const compatibilityDate = "2026-06-17";
|
|
8
8
|
export const metadata = {
|
|
9
9
|
name: "\u65E5\u671F\u8F93\u5165",
|
|
10
|
-
icon: "fluent:calendar-ltr-20-regular"
|
|
10
|
+
icon: "fluent:calendar-ltr-20-regular",
|
|
11
|
+
description: "\u53EF\u7F16\u8F91\u7684\u65E5\u671F\u8F93\u5165\u5355\u5143\u683C\uFF0C\u503C\u5199\u56DE\u884C\u6570\u636E"
|
|
11
12
|
};
|
|
12
13
|
function AddonActions(configure) {
|
|
13
14
|
const configureWithRow = (env) => {
|
|
@@ -7,6 +7,7 @@ export declare const compatibilityDate: "2026-06-22";
|
|
|
7
7
|
export declare const metadata: {
|
|
8
8
|
readonly name: "日期范围输入";
|
|
9
9
|
readonly icon: "fluent:calendar-arrow-right-20-regular";
|
|
10
|
+
readonly description: "可编辑的日期范围输入单元格,起止值写回行数据";
|
|
10
11
|
};
|
|
11
12
|
export declare function presetSchema(configure: (env: Environment) => void): Schema.Struct<{
|
|
12
13
|
id: Schema.refine<string, typeof Schema.String>;
|
|
@@ -6,7 +6,8 @@ export const type = "com.shwfed.table.column.date-range-input";
|
|
|
6
6
|
export const compatibilityDate = "2026-06-22";
|
|
7
7
|
export const metadata = {
|
|
8
8
|
name: "\u65E5\u671F\u8303\u56F4\u8F93\u5165",
|
|
9
|
-
icon: "fluent:calendar-arrow-right-20-regular"
|
|
9
|
+
icon: "fluent:calendar-arrow-right-20-regular",
|
|
10
|
+
description: "\u53EF\u7F16\u8F91\u7684\u65E5\u671F\u8303\u56F4\u8F93\u5165\u5355\u5143\u683C\uFF0C\u8D77\u6B62\u503C\u5199\u56DE\u884C\u6570\u636E"
|
|
10
11
|
};
|
|
11
12
|
const BindingPath = Schema.String.pipe(Schema.minLength(1));
|
|
12
13
|
const SplitBinding = Schema.Tuple(BindingPath, BindingPath).pipe(
|
package/dist/runtime/components/table/columns/2026-07-12/com.shwfed.table.column.dynamic/prompt.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
**何时用我**:列集合随租户 / 渠道变化、无法在设计时固定时——由服务端返回的**列定义列表**运行时生成一组普通列。本列自身不渲染单元格,是个**生成器**:它产出的每一列都是普通文本 / 数值 / 日期列,可照常调宽度、排序、隐藏。
|
|
2
|
+
|
|
3
|
+
**配置配方**
|
|
4
|
+
|
|
5
|
+
- `request`(列定义请求):返回 `HttpRequest` 的表达式,拉取列定义。**作用域只有宿主基础变量**——不能引用 `query` / `pageIndex` / `pageSize` / `sorts`(列集合不能依赖翻到第几页、搜了什么、怎么排序,引用会类型检查失败)。
|
|
6
|
+
- `transform`:把响应 `json`(已解析,未取到为 `none`,用 `json.orValue([])` 解包)映射成**列描述符列表**,每项:
|
|
7
|
+
- `key`(必填,列唯一 id)、`header`(列名,纯文本)、`kind`(`text` / `number` / `date`,封闭词表)、`accessor`(必填,每行取值 CEL,`row` / `index` 在作用域内)。
|
|
8
|
+
- 可选 `width`(px,默认 150)、`align`、`sortable` / `sortKey`(服务端排序字段)、`hidden`、`tooltip`。
|
|
9
|
+
- `data_type_code → kind` 的判断写在你的 `transform` 里。
|
|
10
|
+
|
|
11
|
+
**坑**
|
|
12
|
+
|
|
13
|
+
- `transform` 的静态保证只有「返回 `list<dyn>`」;每项运行时按描述符解码,坏项被丢弃(loud)。
|
|
14
|
+
- 生成的 `date` 列没有 per-column 日期格式(需要精细格式的列请用静态列),默认 `yyyy-MM-dd`。
|
|
15
|
+
- 列定义的字段名 / 类型映射不确定时**向用户询问**。
|
|
@@ -9,11 +9,11 @@ type __VLS_ModelProps = {
|
|
|
9
9
|
modelValue: AnyRecord;
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var
|
|
12
|
+
declare var __VLS_224: {}, __VLS_226: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
'general-grid-extra'?: (props: typeof
|
|
14
|
+
'general-grid-extra'?: (props: typeof __VLS_224) => any;
|
|
15
15
|
} & {
|
|
16
|
-
'general-extra'?: (props: typeof
|
|
16
|
+
'general-extra'?: (props: typeof __VLS_226) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
19
|
"update:modelValue": (value: AnyRecord) => any;
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
InputGroupNumberField
|
|
35
35
|
} from "../ui/input-group";
|
|
36
36
|
import ActionsConfigEditor from "../actions/config.vue";
|
|
37
|
-
import TableAiGenerate from "./ai-generate.vue";
|
|
38
37
|
import ShwfedFormConfig from "../form/config.vue";
|
|
39
38
|
import { defaultFormConfig } from "../form/schema";
|
|
40
39
|
import { Environment } from "../../vendor/cel-js/lib/index";
|
|
@@ -251,7 +250,7 @@ function writeGeneralPatch(patch) {
|
|
|
251
250
|
};
|
|
252
251
|
}
|
|
253
252
|
const editingGeneralConfig = computed(() => readGeneral());
|
|
254
|
-
const selected = ref(
|
|
253
|
+
const selected = ref({ kind: "general" });
|
|
255
254
|
const fieldErrors = ref({});
|
|
256
255
|
const pickedColumnIds = ref([]);
|
|
257
256
|
const pickedColumnIdSet = computed(() => new Set(pickedColumnIds.value));
|
|
@@ -273,7 +272,6 @@ watch(
|
|
|
273
272
|
},
|
|
274
273
|
{ immediate: true, deep: true }
|
|
275
274
|
);
|
|
276
|
-
const selectedAi = computed(() => selected.value.kind === "ai");
|
|
277
275
|
const selectedGeneral = computed(() => selected.value.kind === "general");
|
|
278
276
|
const selectedActions = computed(() => selected.value.kind === "actions");
|
|
279
277
|
const selectedBottomActions = computed(() => selected.value.kind === "bottomActions");
|
|
@@ -539,7 +537,6 @@ function resolveSelection() {
|
|
|
539
537
|
pickedColumnIds.value = pickedColumnIds.value.filter((id) => live.has(id));
|
|
540
538
|
}
|
|
541
539
|
const s = selected.value;
|
|
542
|
-
if (s.kind === "ai") return;
|
|
543
540
|
if (s.kind === "general") return;
|
|
544
541
|
if (s.kind === "actions") return;
|
|
545
542
|
if (s.kind === "bottomActions") return;
|
|
@@ -548,9 +545,6 @@ function resolveSelection() {
|
|
|
548
545
|
if (s.kind === "column" && findColumn(s.id)) return;
|
|
549
546
|
selected.value = { kind: "general" };
|
|
550
547
|
}
|
|
551
|
-
function selectAi() {
|
|
552
|
-
selected.value = { kind: "ai" };
|
|
553
|
-
}
|
|
554
548
|
function selectGeneral() {
|
|
555
549
|
selected.value = { kind: "general" };
|
|
556
550
|
}
|
|
@@ -610,14 +604,14 @@ async function copyColumns() {
|
|
|
610
604
|
const set = pickedColumnIdSet.value;
|
|
611
605
|
const cols = orderedColumnIds.value.filter((id) => set.has(id)).map((id) => editingColumns.value.find((c) => c.id === id)).filter((c) => !!c).map(({ groupId: _g, ...rest }) => rest);
|
|
612
606
|
if (cols.length === 0) return;
|
|
613
|
-
const ok = await writeClip("table", cols);
|
|
607
|
+
const ok = await writeClip("table", { items: cols });
|
|
614
608
|
if (ok) toast.success(`\u5DF2\u590D\u5236 ${cols.length} \u5217`);
|
|
615
609
|
else toast.error("\u590D\u5236\u5931\u8D25");
|
|
616
610
|
}
|
|
617
611
|
async function pasteColumns() {
|
|
618
612
|
const clip = await readClip();
|
|
619
613
|
if (!clip || clip.surface !== "table") return;
|
|
620
|
-
const { items } = reidFragment(clip
|
|
614
|
+
const { items } = reidFragment(clip);
|
|
621
615
|
const pasted = items.map(({ groupId: _g, ...rest }) => rest);
|
|
622
616
|
if (pasted.length === 0) return;
|
|
623
617
|
editingColumns.value = [...editingColumns.value, ...pasted];
|
|
@@ -1173,21 +1167,6 @@ const tableQueryValue = computed({
|
|
|
1173
1167
|
>
|
|
1174
1168
|
<ScrollArea class="flex-1">
|
|
1175
1169
|
<div class="flex flex-col gap-1">
|
|
1176
|
-
<div
|
|
1177
|
-
v-if="!hideDataSource"
|
|
1178
|
-
class="row general-row pl-2"
|
|
1179
|
-
:class="[
|
|
1180
|
-
selectedAi ? 'bg-[color-mix(in_srgb,var(--primary)_10%,white)] text-(--primary)' : 'text-zinc-600 hover:bg-zinc-50'
|
|
1181
|
-
]"
|
|
1182
|
-
@click.stop="selectAi()"
|
|
1183
|
-
>
|
|
1184
|
-
<Icon
|
|
1185
|
-
icon="fluent:sparkle-20-regular"
|
|
1186
|
-
class="size-4 shrink-0"
|
|
1187
|
-
/>
|
|
1188
|
-
<span class="flex-1 truncate">AI 生成</span>
|
|
1189
|
-
</div>
|
|
1190
|
-
|
|
1191
1170
|
<div
|
|
1192
1171
|
class="row general-row pl-2"
|
|
1193
1172
|
:class="[
|
|
@@ -1396,18 +1375,7 @@ const tableQueryValue = computed({
|
|
|
1396
1375
|
</div>
|
|
1397
1376
|
|
|
1398
1377
|
<div class="flex min-h-0 min-w-0 flex-1 flex-col">
|
|
1399
|
-
<!-- The AI chat owns the full right pane and manages its own scroll /
|
|
1400
|
-
composer, so it replaces (not nests inside) the section ScrollArea.
|
|
1401
|
-
`min-w-0` lets this flex item shrink below its content's intrinsic
|
|
1402
|
-
width — without it a long tool-call `<pre>` forces the pane (and the
|
|
1403
|
-
whole editor dialog) wider than the viewport. -->
|
|
1404
|
-
<TableAiGenerate
|
|
1405
|
-
v-if="selectedAi"
|
|
1406
|
-
v-model="config"
|
|
1407
|
-
:configure="configure"
|
|
1408
|
-
/>
|
|
1409
1378
|
<ScrollArea
|
|
1410
|
-
v-else
|
|
1411
1379
|
class="flex-1"
|
|
1412
1380
|
>
|
|
1413
1381
|
<div
|
|
@@ -9,11 +9,11 @@ type __VLS_ModelProps = {
|
|
|
9
9
|
modelValue: AnyRecord;
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var
|
|
12
|
+
declare var __VLS_224: {}, __VLS_226: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
'general-grid-extra'?: (props: typeof
|
|
14
|
+
'general-grid-extra'?: (props: typeof __VLS_224) => any;
|
|
15
15
|
} & {
|
|
16
|
-
'general-extra'?: (props: typeof
|
|
16
|
+
'general-extra'?: (props: typeof __VLS_226) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
19
|
"update:modelValue": (value: AnyRecord) => any;
|
|
@@ -60,7 +60,13 @@ useDerived({
|
|
|
60
60
|
evaluate: (expression) => $cel(expression),
|
|
61
61
|
ready: Promise.resolve(),
|
|
62
62
|
formState,
|
|
63
|
-
quiescence: useDerivedQuiescence()
|
|
63
|
+
quiescence: useDerivedQuiescence(),
|
|
64
|
+
// Selection cells publish into the row's registry only once their (typically
|
|
65
|
+
// remote) options land and resolve the stored key — after the first
|
|
66
|
+
// derivation pass, and outside form state. Without this dependency a cell
|
|
67
|
+
// reading `selections["<column-id>"]` evaluates once against an empty
|
|
68
|
+
// registry and never recomputes. Mirrors the form host and the list row.
|
|
69
|
+
dependencies: () => selections.entries.value
|
|
64
70
|
});
|
|
65
71
|
defineExpose({ evaluate: (expression) => Effect.runSync($cel(expression)) });
|
|
66
72
|
</script>
|
|
@@ -141,23 +141,6 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
|
|
|
141
141
|
readonly displayName?: string | undefined;
|
|
142
142
|
readonly columns: readonly any[];
|
|
143
143
|
readonly kind: "shwfed.component.table";
|
|
144
|
-
readonly groups: readonly {
|
|
145
|
-
readonly id: string;
|
|
146
|
-
readonly title?: readonly [{
|
|
147
|
-
readonly locale: "zh";
|
|
148
|
-
readonly message: string;
|
|
149
|
-
}, ...{
|
|
150
|
-
readonly locale: "en" | "ja" | "ko";
|
|
151
|
-
readonly message: string;
|
|
152
|
-
}[]] | undefined;
|
|
153
|
-
readonly tooltip?: readonly [{
|
|
154
|
-
readonly locale: "zh";
|
|
155
|
-
readonly message: string;
|
|
156
|
-
}, ...{
|
|
157
|
-
readonly locale: "en" | "ja" | "ko";
|
|
158
|
-
readonly message: string;
|
|
159
|
-
}[]] | undefined;
|
|
160
|
-
}[];
|
|
161
144
|
readonly query?: {
|
|
162
145
|
readonly style?: string | undefined;
|
|
163
146
|
readonly id?: string | undefined;
|
|
@@ -187,11 +170,23 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
|
|
|
187
170
|
}[];
|
|
188
171
|
readonly readonly?: string | undefined;
|
|
189
172
|
} | undefined;
|
|
190
|
-
readonly
|
|
191
|
-
readonly
|
|
192
|
-
readonly
|
|
193
|
-
|
|
194
|
-
|
|
173
|
+
readonly groups: readonly {
|
|
174
|
+
readonly id: string;
|
|
175
|
+
readonly title?: readonly [{
|
|
176
|
+
readonly locale: "zh";
|
|
177
|
+
readonly message: string;
|
|
178
|
+
}, ...{
|
|
179
|
+
readonly locale: "en" | "ja" | "ko";
|
|
180
|
+
readonly message: string;
|
|
181
|
+
}[]] | undefined;
|
|
182
|
+
readonly tooltip?: readonly [{
|
|
183
|
+
readonly locale: "zh";
|
|
184
|
+
readonly message: string;
|
|
185
|
+
}, ...{
|
|
186
|
+
readonly locale: "en" | "ja" | "ko";
|
|
187
|
+
readonly message: string;
|
|
188
|
+
}[]] | undefined;
|
|
189
|
+
}[];
|
|
195
190
|
readonly actions?: {
|
|
196
191
|
readonly size: "default" | "sm" | "xs";
|
|
197
192
|
readonly style?: string | undefined;
|
|
@@ -259,6 +254,11 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
|
|
|
259
254
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
260
255
|
}[];
|
|
261
256
|
} | undefined;
|
|
257
|
+
readonly dataSource?: {
|
|
258
|
+
readonly data: string;
|
|
259
|
+
readonly total?: string | undefined;
|
|
260
|
+
readonly request?: string | undefined;
|
|
261
|
+
} | undefined;
|
|
262
262
|
readonly bottomActions?: {
|
|
263
263
|
readonly size: "default" | "sm" | "xs";
|
|
264
264
|
readonly style?: string | undefined;
|
|
@@ -810,23 +810,6 @@ export declare function createTableConfig(body: Omit<Schema.Schema.Type<ReturnTy
|
|
|
810
810
|
id?: string | undefined;
|
|
811
811
|
displayName?: string | undefined;
|
|
812
812
|
columns: readonly any[];
|
|
813
|
-
groups: readonly {
|
|
814
|
-
readonly id: string;
|
|
815
|
-
readonly title?: readonly [{
|
|
816
|
-
readonly locale: "zh";
|
|
817
|
-
readonly message: string;
|
|
818
|
-
}, ...{
|
|
819
|
-
readonly locale: "en" | "ja" | "ko";
|
|
820
|
-
readonly message: string;
|
|
821
|
-
}[]] | undefined;
|
|
822
|
-
readonly tooltip?: readonly [{
|
|
823
|
-
readonly locale: "zh";
|
|
824
|
-
readonly message: string;
|
|
825
|
-
}, ...{
|
|
826
|
-
readonly locale: "en" | "ja" | "ko";
|
|
827
|
-
readonly message: string;
|
|
828
|
-
}[]] | undefined;
|
|
829
|
-
}[];
|
|
830
813
|
query?: {
|
|
831
814
|
readonly style?: string | undefined;
|
|
832
815
|
readonly id?: string | undefined;
|
|
@@ -856,11 +839,23 @@ export declare function createTableConfig(body: Omit<Schema.Schema.Type<ReturnTy
|
|
|
856
839
|
}[];
|
|
857
840
|
readonly readonly?: string | undefined;
|
|
858
841
|
} | undefined;
|
|
859
|
-
|
|
860
|
-
readonly
|
|
861
|
-
readonly
|
|
862
|
-
|
|
863
|
-
|
|
842
|
+
groups: readonly {
|
|
843
|
+
readonly id: string;
|
|
844
|
+
readonly title?: readonly [{
|
|
845
|
+
readonly locale: "zh";
|
|
846
|
+
readonly message: string;
|
|
847
|
+
}, ...{
|
|
848
|
+
readonly locale: "en" | "ja" | "ko";
|
|
849
|
+
readonly message: string;
|
|
850
|
+
}[]] | undefined;
|
|
851
|
+
readonly tooltip?: readonly [{
|
|
852
|
+
readonly locale: "zh";
|
|
853
|
+
readonly message: string;
|
|
854
|
+
}, ...{
|
|
855
|
+
readonly locale: "en" | "ja" | "ko";
|
|
856
|
+
readonly message: string;
|
|
857
|
+
}[]] | undefined;
|
|
858
|
+
}[];
|
|
864
859
|
actions?: {
|
|
865
860
|
readonly size: "default" | "sm" | "xs";
|
|
866
861
|
readonly style?: string | undefined;
|
|
@@ -928,6 +923,11 @@ export declare function createTableConfig(body: Omit<Schema.Schema.Type<ReturnTy
|
|
|
928
923
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
929
924
|
}[];
|
|
930
925
|
} | undefined;
|
|
926
|
+
dataSource?: {
|
|
927
|
+
readonly data: string;
|
|
928
|
+
readonly total?: string | undefined;
|
|
929
|
+
readonly request?: string | undefined;
|
|
930
|
+
} | undefined;
|
|
931
931
|
bottomActions?: {
|
|
932
932
|
readonly size: "default" | "sm" | "xs";
|
|
933
933
|
readonly style?: string | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSONSchema, ParseResult, Schema } from "effect";
|
|
2
|
+
import { getCelCatalog } from "../../../utils/cel-catalog.js";
|
|
2
3
|
import { coerceFromString } from "../../../share/coerce-from-string.js";
|
|
3
4
|
import { Expression, HttpRequestResult } from "../../../share/expression.js";
|
|
4
5
|
import {
|
|
@@ -10,7 +11,7 @@ import {
|
|
|
10
11
|
import { metadata as formMetadata } from "../../form/schema.js";
|
|
11
12
|
import { registerRowVariablesIfAbsent } from "./shared.js";
|
|
12
13
|
import { activeColumns } from "./resolve.js";
|
|
13
|
-
import {
|
|
14
|
+
import { createFormFieldTools } from "../../form/utils/ai-field-tools.js";
|
|
14
15
|
const HARNESS_KEYS = ["id", "groupId", "compatibilityDate"];
|
|
15
16
|
function publicColumnSchema(entry, configure) {
|
|
16
17
|
return entry.schema(configure).pipe(Schema.omit(...HARNESS_KEYS));
|
|
@@ -81,7 +82,7 @@ function safeJsonSchema(schema) {
|
|
|
81
82
|
export function createTableAiTools(deps) {
|
|
82
83
|
const dataSourceSchemas = buildDataSourceExpressionSchemas(deps.configure);
|
|
83
84
|
const rowKeySchema = buildRowKeyExpressionSchema(deps.configure);
|
|
84
|
-
const queryFieldTools =
|
|
85
|
+
const queryFieldTools = createFormFieldTools({
|
|
85
86
|
read: () => deps.read().query,
|
|
86
87
|
write: (next) => {
|
|
87
88
|
const working = deps.read();
|
|
@@ -109,7 +110,7 @@ export function createTableAiTools(deps) {
|
|
|
109
110
|
},
|
|
110
111
|
{
|
|
111
112
|
name: "describe_specific_column_type",
|
|
112
|
-
description: "Return the JSON Schema (without `id`/`groupId` \u2014 those are managed by the harness)
|
|
113
|
+
description: "Return the JSON Schema (without `id`/`groupId` \u2014 those are managed by the harness), the default values, and \u2014 when the type has one \u2014 a prose `guide` (when to use it, config recipe, gotchas) for one column type. Call this before `insert_column` to learn the field contract. Deprecated types are not accepted.",
|
|
113
114
|
inputJsonSchema: {
|
|
114
115
|
type: "object",
|
|
115
116
|
properties: {
|
|
@@ -134,15 +135,17 @@ export function createTableAiTools(deps) {
|
|
|
134
135
|
} catch {
|
|
135
136
|
jsonSchema = "(schema unavailable)";
|
|
136
137
|
}
|
|
137
|
-
|
|
138
|
+
const result = {
|
|
138
139
|
schema: jsonSchema,
|
|
139
140
|
defaults: entry.defaults?.() ?? null
|
|
140
141
|
};
|
|
142
|
+
if (entry.prompt !== void 0) result.guide = entry.prompt;
|
|
143
|
+
return result;
|
|
141
144
|
}
|
|
142
145
|
},
|
|
143
146
|
{
|
|
144
147
|
name: "describe_general_settings",
|
|
145
|
-
description: "Return the schema and current values for the table's general settings: `displayName` (internal label), `dataSource` (HTTP request / data extraction / total \u2014 each with its own CEL scope and available variables baked into the JSON Schema description), `rowKey` (per-row CEL expression evaluated against `row` / `index`), and the `pagination` toggle's current on/off state. Call this first when configuring a fresh table from API documentation; the CEL expressions reference the same scopes the inline UI validates against, so what you learn here is what the setters accept.",
|
|
148
|
+
description: "Return the schema and current values for the table's general settings: `displayName` (internal label), `dataSource` (HTTP request / data extraction / total \u2014 each with its own CEL scope and available variables baked into the JSON Schema description), `rowKey` (per-row CEL expression evaluated against `row` / `index`), and the `pagination` toggle's current on/off state, plus `celFunctions` \u2014 the CEL operator & function catalog. Call this first when configuring a fresh table from API documentation; the CEL expressions reference the same scopes the inline UI validates against, so what you learn here is what the setters accept.",
|
|
146
149
|
inputJsonSchema: {
|
|
147
150
|
type: "object",
|
|
148
151
|
properties: {},
|
|
@@ -217,7 +220,13 @@ export function createTableAiTools(deps) {
|
|
|
217
220
|
kind: "toggle",
|
|
218
221
|
enabled: working.pagination !== void 0
|
|
219
222
|
}
|
|
220
|
-
]
|
|
223
|
+
],
|
|
224
|
+
// The CEL operator & function catalog for the expressions above. The
|
|
225
|
+
// per-field variable scopes are already baked into each `jsonSchema`
|
|
226
|
+
// description (request / data / total / rowKey scopes differ), so this
|
|
227
|
+
// is the language reference half — extends the inlined-CEL pattern
|
|
228
|
+
// rather than duplicating the variable tables.
|
|
229
|
+
celFunctions: getCelCatalog()
|
|
221
230
|
};
|
|
222
231
|
}
|
|
223
232
|
},
|
|
@@ -501,7 +510,7 @@ ${fieldErrors.map((e) => `- ${e}`).join("\n")}`;
|
|
|
501
510
|
return targets;
|
|
502
511
|
}
|
|
503
512
|
},
|
|
504
|
-
// ---- 搜索条件(query = 一个 FormConfig
|
|
513
|
+
// ---- 搜索条件(query = 一个 FormConfig;通用 `*_field*` 族,放置为新增)----
|
|
505
514
|
...queryFieldTools
|
|
506
515
|
];
|
|
507
516
|
}
|
|
@@ -3,6 +3,7 @@ import type { Schema, Effect } from 'effect';
|
|
|
3
3
|
import type { ColumnDef } from '@tanstack/vue-table';
|
|
4
4
|
import type { Environment } from '../../../vendor/cel-js/lib/index.js';
|
|
5
5
|
import type { LocaleValue } from '../../../share/locale.js';
|
|
6
|
+
import { type RegistryEdge } from '../../../share/define-registry.js';
|
|
6
7
|
import type { ColumnValue } from '../schema.js';
|
|
7
8
|
type CelEvaluator = <T>(expression: string, context?: Record<string, unknown>) => Effect.Effect<T, any>;
|
|
8
9
|
type AnySchema = Schema.Schema<any, any, never>;
|
|
@@ -159,6 +160,10 @@ export type ColumnEntry = Readonly<{
|
|
|
159
160
|
* `enableRowSelection`. See `ColumnRowSelection`.
|
|
160
161
|
*/
|
|
161
162
|
rowSelection?: ColumnRowSelection;
|
|
163
|
+
/** The column's `prompt.md` (L2 fragment) raw text, surfaced by the AI describe tool. */
|
|
164
|
+
prompt?: string;
|
|
165
|
+
/** Recursion edges the AI scope cursor walks (empty for leaf columns). */
|
|
166
|
+
edges: ReadonlyArray<RegistryEdge>;
|
|
162
167
|
}>;
|
|
163
168
|
export declare const COLUMNS: ReadonlyArray<ColumnEntry>;
|
|
164
169
|
export declare function allColumnSchemas(configure: (env: Environment) => void): ReadonlyArray<AnySchema>;
|
|
@@ -11,6 +11,10 @@ const runtimeModules = import.meta.glob(
|
|
|
11
11
|
"../columns/*/*/runtime.vue",
|
|
12
12
|
{ eager: true, import: "default", exhaustive: true }
|
|
13
13
|
);
|
|
14
|
+
const promptModules = import.meta.glob(
|
|
15
|
+
"../columns/*/*/prompt.md",
|
|
16
|
+
{ eager: true, query: "?raw", import: "default", exhaustive: true }
|
|
17
|
+
);
|
|
14
18
|
const sourceKey = (type, compatibilityDate) => `${type}@${compatibilityDate}`;
|
|
15
19
|
const registry = defineRegistry({
|
|
16
20
|
hostName: "shwfed-table",
|
|
@@ -18,6 +22,7 @@ const registry = defineRegistry({
|
|
|
18
22
|
schemaModules,
|
|
19
23
|
configModules,
|
|
20
24
|
runtimeModules,
|
|
25
|
+
promptModules,
|
|
21
26
|
validateModule: (mod, type, date) => {
|
|
22
27
|
const hasToColumnDef = typeof mod.toColumnDef === "function";
|
|
23
28
|
const hasExpand = typeof mod.expand === "function";
|
|
@@ -30,6 +35,10 @@ const registry = defineRegistry({
|
|
|
30
35
|
// Generator (`expand`) entries have no cell renderer, so they need no
|
|
31
36
|
// sibling `runtime.vue`. Every other column keeps requiring one.
|
|
32
37
|
runtimeOptional: (mod) => typeof mod.expand === "function",
|
|
38
|
+
// Validate declared `edges` keys against the built schema (only column.actions
|
|
39
|
+
// declares one today). Inert configure — the edge check only reads field names.
|
|
40
|
+
buildSchemaForEdges: (mod) => mod.schema(() => {
|
|
41
|
+
}),
|
|
33
42
|
// Deprecation rules mirror the form host:
|
|
34
43
|
// (a) date-versioned: another entry shares this entry's `type` with a
|
|
35
44
|
// strictly greater `compatibilityDate`;
|
|
@@ -80,13 +89,15 @@ export const COLUMNS = registry.ENTRIES.map((e) => ({
|
|
|
80
89
|
config: e.config,
|
|
81
90
|
runtime: e.runtime,
|
|
82
91
|
toColumnDef: e.module.toColumnDef,
|
|
92
|
+
edges: e.module.edges ?? [],
|
|
83
93
|
deprecated: e.deprecated,
|
|
84
94
|
...e.supersededBy !== void 0 ? { supersededBy: e.supersededBy } : {},
|
|
85
95
|
...e.module.migrate !== void 0 ? { migrate: e.module.migrate } : {},
|
|
86
96
|
...e.module.migrateFrom !== void 0 ? { migrateFrom: e.module.migrateFrom } : {},
|
|
87
97
|
...e.module.defaults !== void 0 ? { defaults: e.module.defaults } : {},
|
|
88
98
|
...e.module.expand !== void 0 ? { expand: e.module.expand } : {},
|
|
89
|
-
...e.module.rowSelection !== void 0 ? { rowSelection: e.module.rowSelection } : {}
|
|
99
|
+
...e.module.rowSelection !== void 0 ? { rowSelection: e.module.rowSelection } : {},
|
|
100
|
+
...e.prompt !== void 0 ? { prompt: e.prompt } : {}
|
|
90
101
|
}));
|
|
91
102
|
const migrationTargets = (() => {
|
|
92
103
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export type ClipSurface = 'form' | 'block' | 'table';
|
|
2
|
-
export type
|
|
3
|
-
surface: ClipSurface;
|
|
1
|
+
export type ClipSurface = 'form' | 'block' | 'table' | 'actions';
|
|
2
|
+
export type ClipFragment = Readonly<{
|
|
4
3
|
items: ReadonlyArray<unknown>;
|
|
5
4
|
placements?: Readonly<Record<string, unknown>>;
|
|
5
|
+
groups?: ReadonlyArray<unknown>;
|
|
6
|
+
}>;
|
|
7
|
+
export type ClipPayload = ClipFragment & Readonly<{
|
|
8
|
+
surface: ClipSurface;
|
|
6
9
|
}>;
|
|
7
10
|
/**
|
|
8
11
|
* Deep-clone the fragment with every id (and every reference to a copied id)
|
|
@@ -11,16 +14,19 @@ export type ClipPayload = Readonly<{
|
|
|
11
14
|
*/
|
|
12
15
|
export declare function reidItems<T>(items: ReadonlyArray<T>): T[];
|
|
13
16
|
/**
|
|
14
|
-
* Reid
|
|
15
|
-
*
|
|
17
|
+
* Reid a whole fragment through one shared map, so every id definition and every
|
|
18
|
+
* reference to one lands on the same fresh UUID: the placement keys (which are
|
|
19
|
+
* item ids), an action item's `groupId` and the group's own `id`, and the items'
|
|
20
|
+
* own `id`s all stay wired to each other.
|
|
16
21
|
*/
|
|
17
|
-
export declare function reidFragment
|
|
18
|
-
items:
|
|
22
|
+
export declare function reidFragment(fragment: ClipFragment): {
|
|
23
|
+
items: unknown[];
|
|
19
24
|
placements?: Record<string, unknown>;
|
|
25
|
+
groups?: unknown[];
|
|
20
26
|
};
|
|
21
|
-
export declare function serializeClip(surface: ClipSurface,
|
|
27
|
+
export declare function serializeClip(surface: ClipSurface, fragment: ClipFragment): string;
|
|
22
28
|
export declare function parseClip(text: string): ClipPayload | null;
|
|
23
29
|
/** Write a fragment to the system clipboard. Resolves `false` on any failure. */
|
|
24
|
-
export declare function writeClip(surface: ClipSurface,
|
|
30
|
+
export declare function writeClip(surface: ClipSurface, fragment: ClipFragment): Promise<boolean>;
|
|
25
31
|
/** Read a fragment from the system clipboard, or `null` if absent/unreadable. */
|
|
26
32
|
export declare function readClip(): Promise<ClipPayload | null>;
|