@shwfed/config 2.11.6 → 2.12.1
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/module.mjs +1 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +13 -7
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +13 -7
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/schema.d.ts +13 -7
- package/dist/runtime/components/actions/items/2026-05-21/com.shwfed.actions.item.markdown/schema.d.ts +13 -7
- package/dist/runtime/components/actions/schema.d.ts +82 -52
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/schema.d.ts +5 -5
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/schema.d.ts +13 -7
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +96 -72
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +26 -14
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.xy/schema.d.ts +39 -21
- package/dist/runtime/components/config/blocks/2026-06-01/com.shwfed.block.animated.number/schema.d.ts +13 -7
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.d.ts +26 -14
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/schema.d.ts +44 -26
- package/dist/runtime/components/config/schema.d.ts +13 -7
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +26 -14
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +57 -33
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +52 -28
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +18 -12
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +65 -35
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +18 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +18 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +79 -42
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +20 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +20 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +92 -49
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +18 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +18 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +79 -42
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +20 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +20 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +92 -49
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +39 -21
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +39 -21
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +28 -28
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +28 -28
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +57 -33
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +65 -35
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +65 -35
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +104 -56
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +65 -35
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +91 -49
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +91 -49
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +39 -21
- package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/schema.d.ts +13 -7
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +18 -16
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +18 -16
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +79 -42
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +20 -18
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +22 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +20 -18
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +5 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +92 -49
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.js +12 -0
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +65 -35
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +169 -91
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +169 -91
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +30 -30
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.d.ts +130 -70
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.d.ts +130 -70
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/schema.d.ts +26 -14
- package/dist/runtime/components/form/utils/ai-field-tools.d.ts +11 -0
- package/dist/runtime/components/form/utils/ai-field-tools.js +282 -0
- package/dist/runtime/components/form/utils/common.d.ts +26 -14
- package/dist/runtime/components/form/utils/resolve.d.ts +15 -0
- package/dist/runtime/components/form/utils/resolve.js +13 -0
- package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/schema.d.ts +13 -7
- package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/schema.d.ts +13 -7
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/schema.d.ts +13 -7
- package/dist/runtime/components/table/ai-generate.d.vue.ts +16 -0
- package/dist/runtime/components/table/ai-generate.system.d.ts +1 -0
- package/dist/runtime/components/table/ai-generate.system.js +10 -0
- package/dist/runtime/components/table/ai-generate.system.md +101 -0
- package/dist/runtime/components/table/ai-generate.vue +173 -0
- package/dist/runtime/components/table/ai-generate.vue.d.ts +16 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.actions/schema.d.ts +18 -12
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/schema.d.ts +39 -21
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.d.ts +91 -49
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +44 -26
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.d.ts +52 -28
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +52 -28
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +44 -26
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +6 -6
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +6 -6
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +52 -28
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +91 -49
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.d.ts +91 -49
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +6 -6
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +6 -6
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +52 -28
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +91 -49
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.d.ts +156 -84
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +156 -84
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/schema.d.ts +156 -84
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +156 -84
- 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-multi/schema.d.ts +65 -35
- 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-27/com.shwfed.table.column.tree-combobox-single/schema.d.ts +65 -35
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +156 -84
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +156 -84
- 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-multi/schema.d.ts +65 -35
- 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-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +65 -35
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.d.ts +117 -63
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.d.ts +117 -63
- 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 +52 -28
- 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 +52 -28
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/config.vue +33 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/runtime.vue +5 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.d.ts +71 -40
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.js +6 -1
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/config.vue +33 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.vue +5 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +79 -42
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.js +6 -1
- package/dist/runtime/components/table/config.d.vue.ts +3 -3
- package/dist/runtime/components/table/config.vue +37 -3
- package/dist/runtime/components/table/config.vue.d.ts +3 -3
- package/dist/runtime/components/table/schema.d.ts +182 -134
- package/dist/runtime/components/table/utils/ai-tools.d.ts +11 -0
- package/dist/runtime/components/table/utils/ai-tools.js +507 -0
- package/dist/runtime/components/table/utils/resolve.d.ts +23 -0
- package/dist/runtime/components/table/utils/resolve.js +3 -0
- package/dist/runtime/components/table/utils/shared.d.ts +66 -35
- package/dist/runtime/components/table/utils/shared.js +26 -17
- package/dist/runtime/components/ui/alert-dialog/AlertDialogCancel.vue +1 -1
- package/dist/runtime/components/ui/chat/ChatMessage.d.vue.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatMessage.vue +35 -0
- package/dist/runtime/components/ui/chat/ChatMessage.vue.d.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatMessagePart.d.vue.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatMessagePart.vue +43 -0
- package/dist/runtime/components/ui/chat/ChatMessagePart.vue.d.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatMessages.d.vue.ts +18 -0
- package/dist/runtime/components/ui/chat/ChatMessages.vue +63 -0
- package/dist/runtime/components/ui/chat/ChatMessages.vue.d.ts +18 -0
- package/dist/runtime/components/ui/chat/ChatPrompt.d.vue.ts +34 -0
- package/dist/runtime/components/ui/chat/ChatPrompt.vue +53 -0
- package/dist/runtime/components/ui/chat/ChatPrompt.vue.d.ts +34 -0
- package/dist/runtime/components/ui/chat/ChatPromptSubmit.d.vue.ts +18 -0
- package/dist/runtime/components/ui/chat/ChatPromptSubmit.vue +41 -0
- package/dist/runtime/components/ui/chat/ChatPromptSubmit.vue.d.ts +18 -0
- package/dist/runtime/components/ui/chat/ChatReasoning.d.vue.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatReasoning.vue +33 -0
- package/dist/runtime/components/ui/chat/ChatReasoning.vue.d.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatToolCall.d.vue.ts +10 -0
- package/dist/runtime/components/ui/chat/ChatToolCall.vue +92 -0
- package/dist/runtime/components/ui/chat/ChatToolCall.vue.d.ts +10 -0
- package/dist/runtime/components/ui/chat/index.d.ts +9 -0
- package/dist/runtime/components/ui/chat/index.js +8 -0
- package/dist/runtime/components/ui/stream-markdown/StreamMarkdown.d.vue.ts +15 -0
- package/dist/runtime/components/ui/stream-markdown/StreamMarkdown.vue +22 -0
- package/dist/runtime/components/ui/stream-markdown/StreamMarkdown.vue.d.ts +15 -0
- package/dist/runtime/components/ui/stream-markdown/index.d.ts +1 -0
- package/dist/runtime/components/ui/stream-markdown/index.js +1 -0
- package/dist/runtime/share/coerce-from-string.d.ts +62 -0
- package/dist/runtime/share/coerce-from-string.js +154 -0
- package/dist/runtime/share/disabled-date.d.ts +34 -0
- package/dist/runtime/share/disabled-date.js +13 -0
- package/dist/runtime/share/locale.d.ts +13 -7
- package/dist/runtime/share/locale.js +27 -5
- package/dist/runtime/share/use-persisted-chat.d.ts +30 -0
- package/dist/runtime/share/use-persisted-chat.js +34 -0
- package/dist/runtime/utils/ai/index.d.ts +10 -0
- package/dist/runtime/utils/ai/index.js +145 -32
- package/dist/runtime/utils/ai/parts.d.ts +30 -0
- package/dist/runtime/utils/ai/parts.js +9 -0
- package/dist/runtime/utils/disabled-date.d.ts +26 -0
- package/dist/runtime/utils/disabled-date.js +21 -0
- package/package.json +2 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../collapsible";
|
|
5
|
+
defineOptions({ name: "UiChatReasoning" });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
part: { type: Object, required: true }
|
|
8
|
+
});
|
|
9
|
+
const streaming = computed(() => props.part.state === "streaming");
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<Collapsible
|
|
14
|
+
data-slot="chat-reasoning"
|
|
15
|
+
class="text-xs text-zinc-400"
|
|
16
|
+
>
|
|
17
|
+
<CollapsibleTrigger class="group/reason flex items-center gap-1">
|
|
18
|
+
<Icon
|
|
19
|
+
:icon="streaming ? 'fluent:spinner-ios-20-regular' : 'fluent:brain-circuit-20-regular'"
|
|
20
|
+
class="size-3.5"
|
|
21
|
+
:class="streaming ? 'animate-spin' : ''"
|
|
22
|
+
/>
|
|
23
|
+
<span>{{ streaming ? "\u601D\u8003\u4E2D\u2026" : "\u5DF2\u601D\u8003" }}</span>
|
|
24
|
+
<Icon
|
|
25
|
+
icon="fluent:chevron-down-20-regular"
|
|
26
|
+
class="size-3.5 transition-transform duration-180 group-data-[state=open]/reason:rotate-180"
|
|
27
|
+
/>
|
|
28
|
+
</CollapsibleTrigger>
|
|
29
|
+
<CollapsibleContent class="mt-1 whitespace-pre-wrap border-l-2 border-zinc-100 pl-2">
|
|
30
|
+
{{ part.text }}
|
|
31
|
+
</CollapsibleContent>
|
|
32
|
+
</Collapsible>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReasoningUIPart } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
part: ReasoningUIPart;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ToolUIPart } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
part: ToolUIPart;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
defaultOpen: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { toolNameOf } from "../../../utils/ai/parts";
|
|
5
|
+
import { Badge } from "../badge";
|
|
6
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../collapsible";
|
|
7
|
+
defineOptions({ name: "UiChatToolCall" });
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
part: { type: Object, required: true },
|
|
10
|
+
defaultOpen: { type: Boolean, required: false, default: false }
|
|
11
|
+
});
|
|
12
|
+
const name = computed(() => toolNameOf(props.part));
|
|
13
|
+
const badge = computed(() => {
|
|
14
|
+
switch (props.part.state) {
|
|
15
|
+
case "output-available":
|
|
16
|
+
return { label: "\u5B8C\u6210", variant: "secondary", spin: false };
|
|
17
|
+
case "output-error":
|
|
18
|
+
return { label: "\u5931\u8D25", variant: "destructive", spin: false };
|
|
19
|
+
default:
|
|
20
|
+
return { label: "\u8FD0\u884C\u4E2D", variant: "outline", spin: true };
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
function pretty(v) {
|
|
24
|
+
if (v === void 0) return "";
|
|
25
|
+
if (typeof v === "string") return v;
|
|
26
|
+
try {
|
|
27
|
+
return JSON.stringify(v, null, 2);
|
|
28
|
+
} catch {
|
|
29
|
+
return String(v);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const inputText = computed(() => pretty(props.part.input));
|
|
33
|
+
const isError = computed(() => props.part.state === "output-error");
|
|
34
|
+
const bodyText = computed(
|
|
35
|
+
() => isError.value ? props.part.errorText ?? "" : pretty(props.part.output)
|
|
36
|
+
);
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Collapsible
|
|
41
|
+
:default-open="defaultOpen"
|
|
42
|
+
data-slot="chat-tool-call"
|
|
43
|
+
class="w-full overflow-hidden rounded-lg border border-zinc-200 bg-white"
|
|
44
|
+
>
|
|
45
|
+
<CollapsibleTrigger
|
|
46
|
+
class="group/tool flex w-full items-center gap-2 px-3 py-2 text-left"
|
|
47
|
+
>
|
|
48
|
+
<Icon
|
|
49
|
+
icon="fluent:wrench-screwdriver-20-regular"
|
|
50
|
+
class="size-4 shrink-0 text-zinc-400"
|
|
51
|
+
/>
|
|
52
|
+
<span class="font-mono text-xs text-zinc-600">{{ name }}</span>
|
|
53
|
+
<Badge
|
|
54
|
+
:variant="badge.variant"
|
|
55
|
+
class="ml-auto"
|
|
56
|
+
data-slot="chat-tool-call-badge"
|
|
57
|
+
>
|
|
58
|
+
<Icon
|
|
59
|
+
v-if="badge.spin"
|
|
60
|
+
icon="fluent:spinner-ios-20-regular"
|
|
61
|
+
class="animate-spin"
|
|
62
|
+
/>
|
|
63
|
+
{{ badge.label }}
|
|
64
|
+
</Badge>
|
|
65
|
+
<Icon
|
|
66
|
+
icon="fluent:chevron-down-20-regular"
|
|
67
|
+
class="size-4 shrink-0 text-zinc-400 transition-transform duration-180 group-data-[state=open]/tool:rotate-180"
|
|
68
|
+
/>
|
|
69
|
+
</CollapsibleTrigger>
|
|
70
|
+
<CollapsibleContent class="space-y-2 border-t border-zinc-100 px-3 py-2 text-xs">
|
|
71
|
+
<div v-if="inputText">
|
|
72
|
+
<p class="mb-1 text-zinc-400">
|
|
73
|
+
输入
|
|
74
|
+
</p>
|
|
75
|
+
<pre
|
|
76
|
+
class="whitespace-pre-wrap break-words rounded bg-zinc-50 p-2 text-zinc-600"
|
|
77
|
+
data-slot="chat-tool-call-input"
|
|
78
|
+
>{{ inputText }}</pre>
|
|
79
|
+
</div>
|
|
80
|
+
<div v-if="bodyText">
|
|
81
|
+
<p class="mb-1 text-zinc-400">
|
|
82
|
+
{{ isError ? "\u9519\u8BEF" : "\u7ED3\u679C" }}
|
|
83
|
+
</p>
|
|
84
|
+
<pre
|
|
85
|
+
class="whitespace-pre-wrap break-words rounded p-2"
|
|
86
|
+
:class="isError ? 'bg-red-50 text-red-600' : 'bg-zinc-50 text-zinc-600'"
|
|
87
|
+
data-slot="chat-tool-call-output"
|
|
88
|
+
>{{ bodyText }}</pre>
|
|
89
|
+
</div>
|
|
90
|
+
</CollapsibleContent>
|
|
91
|
+
</Collapsible>
|
|
92
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ToolUIPart } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
part: ToolUIPart;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
defaultOpen: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ChatStatus = 'ready' | 'streaming' | 'error';
|
|
2
|
+
export { default as ChatMessages } from './ChatMessages.vue.js';
|
|
3
|
+
export { default as ChatMessage } from './ChatMessage.vue.js';
|
|
4
|
+
export { default as ChatMessagePart } from './ChatMessagePart.vue.js';
|
|
5
|
+
export { default as ChatToolCall } from './ChatToolCall.vue.js';
|
|
6
|
+
export { default as ChatReasoning } from './ChatReasoning.vue.js';
|
|
7
|
+
export { default as ChatPrompt } from './ChatPrompt.vue.js';
|
|
8
|
+
export { default as ChatPromptSubmit } from './ChatPromptSubmit.vue.js';
|
|
9
|
+
export { StreamMarkdown as ChatMarkdown } from '../stream-markdown/index.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as ChatMessages } from "./ChatMessages.vue";
|
|
2
|
+
export { default as ChatMessage } from "./ChatMessage.vue";
|
|
3
|
+
export { default as ChatMessagePart } from "./ChatMessagePart.vue";
|
|
4
|
+
export { default as ChatToolCall } from "./ChatToolCall.vue";
|
|
5
|
+
export { default as ChatReasoning } from "./ChatReasoning.vue";
|
|
6
|
+
export { default as ChatPrompt } from "./ChatPrompt.vue";
|
|
7
|
+
export { default as ChatPromptSubmit } from "./ChatPromptSubmit.vue";
|
|
8
|
+
export { StreamMarkdown as ChatMarkdown } from "../stream-markdown/index.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
source: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
source: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { useRuntimeConfig } from "#app";
|
|
3
|
+
import remend from "remend";
|
|
4
|
+
import { computed, defineComponent, h } from "vue";
|
|
5
|
+
import { md } from "../../../utils/markdown";
|
|
6
|
+
const REMEND_OPTIONS = {
|
|
7
|
+
linkMode: "text-only",
|
|
8
|
+
katex: false,
|
|
9
|
+
inlineKatex: false
|
|
10
|
+
};
|
|
11
|
+
export default defineComponent({
|
|
12
|
+
name: "UiStreamMarkdown",
|
|
13
|
+
props: {
|
|
14
|
+
source: { type: String, required: true }
|
|
15
|
+
},
|
|
16
|
+
setup(props) {
|
|
17
|
+
const env = { base: useRuntimeConfig().app.baseURL || "/" };
|
|
18
|
+
const html = computed(() => md.render(remend(props.source, REMEND_OPTIONS), env));
|
|
19
|
+
return () => h("div", { "data-slot": "stream-markdown", "innerHTML": html.value });
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
source: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
source: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as StreamMarkdown } from './StreamMarkdown.vue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as StreamMarkdown } from "./StreamMarkdown.vue";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { SchemaAST } from 'effect';
|
|
2
|
+
/**
|
|
3
|
+
* Coerce AI tool-call outputs that the model accidentally stringified.
|
|
4
|
+
*
|
|
5
|
+
* The AI tool-call loop accumulates `partial_json` deltas and concatenates them
|
|
6
|
+
* into one JSON string, then `JSON.parse`s it. When the model is unsure about a
|
|
7
|
+
* field's wire shape — does `size` want a number or a string? — it sometimes
|
|
8
|
+
* stringifies the value, so the parser hands us e.g. `size: "120"` while the
|
|
9
|
+
* column schema declares `Schema.Number.pipe(Schema.finite(), Schema.positive())`.
|
|
10
|
+
*
|
|
11
|
+
* `Schema.decodeUnknownSync` then rejects with `Expected number, actual string`,
|
|
12
|
+
* the chat loop can't recover, and the user sees the "改写配置中…" card spin
|
|
13
|
+
* forever. The same bug also affects `grow` (Boolean), `gap` (Number),
|
|
14
|
+
* `expandAll` (Boolean), every column/button/block schema's primitive fields —
|
|
15
|
+
* per-schema `Schema.transform` workarounds would touch dozens of files and
|
|
16
|
+
* pollute the JSON Schema we hand back to the model (it would advertise
|
|
17
|
+
* `oneOf: [number, string]` and tell the model "strings are OK", which they
|
|
18
|
+
* aren't).
|
|
19
|
+
*
|
|
20
|
+
* This helper takes a different path: walk the raw value in parallel with the
|
|
21
|
+
* schema's AST, and silently coerce string → number / boolean based on what the
|
|
22
|
+
* schema expects. The schema is never modified, so:
|
|
23
|
+
*
|
|
24
|
+
* - `JSONSchema.make(schema)` still emits `type: number` / `type: boolean`
|
|
25
|
+
* for the model (it sees the canonical types and is asked to honor them).
|
|
26
|
+
* - Existing `Schema.suspend(Schema.transform(...))` wrappers (e.g. `Locale`,
|
|
27
|
+
* which already forgives stringified tuples) keep working — this preprocessor
|
|
28
|
+
* passes strings through for fields whose schema accepts strings.
|
|
29
|
+
* - Effect 3.21.2's `Schema.optionalWith` quirk (it strips peer property
|
|
30
|
+
* Transformation wrappers — see the `Locale` fix) cannot fire, because we
|
|
31
|
+
* never add a Transformation anywhere.
|
|
32
|
+
*
|
|
33
|
+
* Apply this at the AI decode chokepoint, BEFORE `Schema.decodeUnknownSync`.
|
|
34
|
+
* After preprocessing, the raw value is structurally compatible with the
|
|
35
|
+
* schema, and the schema's own validators (finite/positive/etc.) still run.
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* Pre-process `raw` so it decodes cleanly against `schema`. The schema is read
|
|
39
|
+
* but never modified — this is a pure transformation of the value side.
|
|
40
|
+
*
|
|
41
|
+
* Safe to call on already-typed values (numbers stay numbers, etc.); the only
|
|
42
|
+
* change is `string → number` when the schema expects a number, and the
|
|
43
|
+
* equivalent for booleans. JSON-stringified object/array payloads are also
|
|
44
|
+
* parsed once, mirroring the `Locale` tuple fix at the general level.
|
|
45
|
+
*
|
|
46
|
+
* `S` is inferred from the call site. We don't pin it to one of Effect's
|
|
47
|
+
* bundled `Schema.Any` / `Schema.All` aliases because their third type
|
|
48
|
+
* parameter (Context / R) collides between `never` and `unknown` under
|
|
49
|
+
* strict mode, making any of them reject callers that pass the other.
|
|
50
|
+
*/
|
|
51
|
+
export declare function coerceFromString<S extends {
|
|
52
|
+
readonly ast: SchemaAST.AST;
|
|
53
|
+
}>(raw: unknown, schema: S): unknown;
|
|
54
|
+
/**
|
|
55
|
+
* Build a JSON Schema with the same shape as `JSONSchema.make(schema)` —
|
|
56
|
+
* exposed only for the test suite to lock in the "no JSONSchema pollution"
|
|
57
|
+
* guarantee. If this drifts from `JSONSchema.make`, the implementation
|
|
58
|
+
* accidentally changed the schema and the model will be misled.
|
|
59
|
+
*/
|
|
60
|
+
export declare function peekJsonSchema<S extends {
|
|
61
|
+
ast: SchemaAST.AST;
|
|
62
|
+
}>(schema: S): unknown;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { JSONSchema, SchemaAST } from "effect";
|
|
2
|
+
export function coerceFromString(raw, schema) {
|
|
3
|
+
return preprocess(raw, schema.ast);
|
|
4
|
+
}
|
|
5
|
+
function preprocess(value, ast) {
|
|
6
|
+
const shape = unwrap(ast);
|
|
7
|
+
if (value === null || value === void 0) return value;
|
|
8
|
+
if (typeof value !== "object") return value;
|
|
9
|
+
if (Array.isArray(value)) {
|
|
10
|
+
if (shape._tag === "TupleType") {
|
|
11
|
+
const elements = shape.elements;
|
|
12
|
+
const restAst = shape.rest[0]?.type ?? SchemaAST.unknownKeyword;
|
|
13
|
+
return value.map((v, i) => {
|
|
14
|
+
const elementType = i < elements.length ? elements[i].type : restAst;
|
|
15
|
+
return preprocessField(v, elementType);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return value.map((v) => preprocessField(v, shape));
|
|
19
|
+
}
|
|
20
|
+
if (shape._tag === "TypeLiteral") {
|
|
21
|
+
return preprocessStruct(value, shape);
|
|
22
|
+
}
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
function preprocessStruct(value, ast) {
|
|
26
|
+
const result = {};
|
|
27
|
+
for (const ps of ast.propertySignatures) {
|
|
28
|
+
const key = ps.name;
|
|
29
|
+
if (!(key in value)) continue;
|
|
30
|
+
result[key] = preprocessField(value[key], ps.type);
|
|
31
|
+
}
|
|
32
|
+
for (const key of Object.keys(value)) {
|
|
33
|
+
if (!(key in result)) result[key] = value[key];
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
function preprocessField(value, ast) {
|
|
38
|
+
if (typeof value === "string") {
|
|
39
|
+
const parsedJson = tryParseJson(value, ast);
|
|
40
|
+
if (parsedJson !== void 0) return preprocess(parsedJson, ast);
|
|
41
|
+
}
|
|
42
|
+
if (typeof value === "string") {
|
|
43
|
+
if (expectsNumber(ast)) {
|
|
44
|
+
if (value.trim() !== "") return Number(value);
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
if (expectsBoolean(ast)) {
|
|
48
|
+
if (value === "true") return true;
|
|
49
|
+
if (value === "false") return false;
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (ast._tag === "TypeLiteral" && isPlainObject(value)) {
|
|
54
|
+
return preprocessStruct(value, ast);
|
|
55
|
+
}
|
|
56
|
+
if (ast._tag === "TupleType" && Array.isArray(value)) {
|
|
57
|
+
const elements = ast.elements;
|
|
58
|
+
const restAst = ast.rest[0]?.type ?? SchemaAST.unknownKeyword;
|
|
59
|
+
return value.map((v, i) => {
|
|
60
|
+
const elementType = i < elements.length ? elements[i].type : restAst;
|
|
61
|
+
return preprocessField(v, elementType);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (ast._tag === "Union") {
|
|
65
|
+
if (typeof value === "string") {
|
|
66
|
+
const wantsNumber = ast.types.some(expectsNumber);
|
|
67
|
+
const wantsBoolean = ast.types.some(expectsBoolean);
|
|
68
|
+
if (wantsNumber && !wantsBoolean) {
|
|
69
|
+
if (value.trim() !== "") return Number(value);
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
if (wantsBoolean && !wantsNumber) {
|
|
73
|
+
return value === "true";
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
if (ast._tag === "Refinement") return preprocessField(value, ast.from);
|
|
79
|
+
if (ast._tag === "Suspend") return preprocessField(value, ast.f());
|
|
80
|
+
if (ast._tag === "Declaration") {
|
|
81
|
+
return preprocessField(value, ast.typeParameters[0] ?? ast);
|
|
82
|
+
}
|
|
83
|
+
if (ast._tag === "Transformation") {
|
|
84
|
+
return preprocessField(value, ast.from);
|
|
85
|
+
}
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
function unwrap(ast) {
|
|
89
|
+
switch (ast._tag) {
|
|
90
|
+
case "Suspend":
|
|
91
|
+
return unwrap(ast.f());
|
|
92
|
+
case "Refinement":
|
|
93
|
+
return unwrap(ast.from);
|
|
94
|
+
case "Declaration":
|
|
95
|
+
return unwrap(ast.typeParameters[0] ?? ast);
|
|
96
|
+
case "Transformation":
|
|
97
|
+
return unwrap(ast.from);
|
|
98
|
+
default:
|
|
99
|
+
return ast;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function expectsNumber(ast) {
|
|
103
|
+
switch (ast._tag) {
|
|
104
|
+
case "NumberKeyword":
|
|
105
|
+
return true;
|
|
106
|
+
case "Refinement":
|
|
107
|
+
return expectsNumber(ast.from);
|
|
108
|
+
case "Suspend":
|
|
109
|
+
return expectsNumber(ast.f());
|
|
110
|
+
case "Declaration":
|
|
111
|
+
return expectsNumber(ast.typeParameters[0] ?? ast);
|
|
112
|
+
case "Union":
|
|
113
|
+
return ast.types.some(expectsNumber);
|
|
114
|
+
case "Transformation":
|
|
115
|
+
return expectsNumber(ast.from);
|
|
116
|
+
default:
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function expectsBoolean(ast) {
|
|
121
|
+
switch (ast._tag) {
|
|
122
|
+
case "BooleanKeyword":
|
|
123
|
+
return true;
|
|
124
|
+
case "Refinement":
|
|
125
|
+
return expectsBoolean(ast.from);
|
|
126
|
+
case "Suspend":
|
|
127
|
+
return expectsBoolean(ast.f());
|
|
128
|
+
case "Declaration":
|
|
129
|
+
return expectsBoolean(ast.typeParameters[0] ?? ast);
|
|
130
|
+
case "Union":
|
|
131
|
+
return ast.types.some(expectsBoolean);
|
|
132
|
+
case "Transformation":
|
|
133
|
+
return expectsBoolean(ast.from);
|
|
134
|
+
default:
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function isPlainObject(value) {
|
|
139
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
140
|
+
}
|
|
141
|
+
function tryParseJson(value, ast) {
|
|
142
|
+
const unwrapped = unwrap(ast);
|
|
143
|
+
if (unwrapped._tag !== "TypeLiteral" && unwrapped._tag !== "TupleType") return void 0;
|
|
144
|
+
const trimmed = value.trimStart();
|
|
145
|
+
if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) return void 0;
|
|
146
|
+
try {
|
|
147
|
+
return JSON.parse(value);
|
|
148
|
+
} catch {
|
|
149
|
+
return void 0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
export function peekJsonSchema(schema) {
|
|
153
|
+
return JSONSchema.make(schema);
|
|
154
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Environment } from '../vendor/cel-js/lib/index.js';
|
|
2
|
+
import type { ResultType } from './expression.js';
|
|
3
|
+
/**
|
|
4
|
+
* Result-type matcher for a per-date "should this date be disabled" expression.
|
|
5
|
+
* The expression returns `true` to disable the candidate date; `false`/none/
|
|
6
|
+
* absent leave it enabled (matching reka-ui's native `isDateDisabled`). Accepts
|
|
7
|
+
* a bare `bool` (`input >= now`) as well as `optional<bool>`
|
|
8
|
+
* (`cond ? optional.of(true) : optional.none()`) — same leniency as
|
|
9
|
+
* `HttpRequestResult` in `share/expression.ts`. At runtime `cel()` unwraps
|
|
10
|
+
* `optional.none()` to `undefined`, which the predicate treats as "no opinion,
|
|
11
|
+
* keep the date enabled". `dyn`/`optional<dyn>` ride along for gradual typing.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DISABLE_DATE_RESULT: ResultType;
|
|
14
|
+
/**
|
|
15
|
+
* Register the `input` (Date) CEL variable — the candidate date the calendar is
|
|
16
|
+
* rendering — only when an enclosing `configure` hasn't already declared it. The
|
|
17
|
+
* CEL registry throws `'input' is already registered` on a duplicate, so the
|
|
18
|
+
* guard mirrors `registerRowVariablesIfAbsent` / `registerLoopVariablesIfAbsent`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function registerInputDateIfAbsent(env: Environment): void;
|
|
21
|
+
/**
|
|
22
|
+
* The `input` variable advertised to `ExpressionEditor` via its `extra-vars`
|
|
23
|
+
* prop, so completion offers it at design time. Pair with
|
|
24
|
+
* `DISABLE_DATE_EDITOR_RESULT` for the editor's `result-type` — the editor prop
|
|
25
|
+
* can't take a function matcher, so the array form mirrors `DISABLE_DATE_RESULT`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const INPUT_DATE_VARS: {
|
|
28
|
+
readonly input: {
|
|
29
|
+
readonly type: "Date";
|
|
30
|
+
readonly label: "候选日期";
|
|
31
|
+
readonly description: "日历中待判定是否可选的日期";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const DISABLE_DATE_EDITOR_RESULT: readonly ["bool", "optional<bool>"];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const DISABLE_DATE_RESULT = (t) => t === "bool" || t === "optional<bool>" || t === "optional<dyn>" || t === "dyn";
|
|
2
|
+
const INPUT_VAR_LABEL = "\u5019\u9009\u65E5\u671F";
|
|
3
|
+
const INPUT_VAR_DESCRIPTION = "\u65E5\u5386\u4E2D\u5F85\u5224\u5B9A\u662F\u5426\u53EF\u9009\u7684\u65E5\u671F";
|
|
4
|
+
export function registerInputDateIfAbsent(env) {
|
|
5
|
+
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
6
|
+
if (!declared.has("input")) {
|
|
7
|
+
env.registerVariable("input", "Date", { label: INPUT_VAR_LABEL, description: INPUT_VAR_DESCRIPTION });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export const INPUT_DATE_VARS = {
|
|
11
|
+
input: { type: "Date", label: INPUT_VAR_LABEL, description: INPUT_VAR_DESCRIPTION }
|
|
12
|
+
};
|
|
13
|
+
export const DISABLE_DATE_EDITOR_RESULT = ["bool", "optional<bool>"];
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
|
-
export declare const Locale: Schema.
|
|
3
|
-
locale:
|
|
4
|
-
message:
|
|
5
|
-
}
|
|
6
|
-
locale:
|
|
7
|
-
message:
|
|
8
|
-
}
|
|
2
|
+
export declare const Locale: Schema.suspend<readonly [{
|
|
3
|
+
readonly locale: "zh";
|
|
4
|
+
readonly message: string;
|
|
5
|
+
}, ...{
|
|
6
|
+
readonly locale: "en" | "ja" | "ko";
|
|
7
|
+
readonly message: string;
|
|
8
|
+
}[]], string | readonly [{
|
|
9
|
+
readonly locale: "zh";
|
|
10
|
+
readonly message: string;
|
|
11
|
+
}, ...{
|
|
12
|
+
readonly locale: "en" | "ja" | "ko";
|
|
13
|
+
readonly message: string;
|
|
14
|
+
}[]], never>;
|
|
9
15
|
export type LocaleValue = Schema.Schema.Type<typeof Locale>;
|
|
10
16
|
export declare function hasVisibleLocaleValue(value: LocaleValue | undefined): boolean;
|
|
11
17
|
export declare function getLocalizedText(messages: LocaleValue | undefined, locale: string): string | undefined;
|
|
@@ -15,13 +15,35 @@ const OtherLocaleItem = Schema.Struct({
|
|
|
15
15
|
description: "\u9488\u5BF9\u8BE5\u8BED\u8A00\u7684 UI \u6587\u672C"
|
|
16
16
|
})
|
|
17
17
|
});
|
|
18
|
-
|
|
18
|
+
const LocaleTuple = Schema.Tuple(
|
|
19
19
|
[ZhLocaleItem],
|
|
20
20
|
OtherLocaleItem
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
);
|
|
22
|
+
function coerceStringToLocale(input) {
|
|
23
|
+
if (input.trimStart().startsWith("[")) {
|
|
24
|
+
try {
|
|
25
|
+
const parsed = JSON.parse(input);
|
|
26
|
+
if (Array.isArray(parsed)) return parsed;
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return [{ locale: "zh", message: input }];
|
|
31
|
+
}
|
|
32
|
+
export const Locale = Schema.suspend(
|
|
33
|
+
() => Schema.transform(
|
|
34
|
+
Schema.Union(LocaleTuple, Schema.String),
|
|
35
|
+
LocaleTuple,
|
|
36
|
+
{
|
|
37
|
+
strict: true,
|
|
38
|
+
decode: (input) => typeof input === "string" ? coerceStringToLocale(input) : input,
|
|
39
|
+
encode: (input) => input
|
|
40
|
+
}
|
|
41
|
+
).annotations({
|
|
42
|
+
identifier: "Locale",
|
|
43
|
+
title: "Locale",
|
|
44
|
+
description: "\u672C\u5730\u5316\u6587\u672C\u5217\u8868\uFF0Czh \u5FC5\u987B\u4E3A\u9996\u9879\uFF1B\u63A5\u53D7\u7EAF\u5B57\u7B26\u4E32\uFF08\u82E5\u662F JSON-encoded tuple \u5219\u89E3\u6790\u5B83\uFF0C\u5426\u5219\u5F53\u4F5C zh \u6587\u672C\u6765\u7528\uFF09"
|
|
45
|
+
})
|
|
46
|
+
);
|
|
25
47
|
export function hasVisibleLocaleValue(value) {
|
|
26
48
|
return value?.some((item) => item.message.trim().length > 0) ?? false;
|
|
27
49
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { UIMessage } from '../utils/ai/parts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Mirrors a table editor's AI-chat history into `sessionStorage`, keyed on the
|
|
5
|
+
* table's stable `config.id`, so the conversation survives both the chat
|
|
6
|
+
* component unmounting — switching away from the "AI 生成" section `v-if`-
|
|
7
|
+
* unmounts `<TableAiGenerate>`, dropping its local `ref<UIMessage[]>` — and a
|
|
8
|
+
* page reload. It clears when the browser tab is closed (`sessionStorage`
|
|
9
|
+
* lifetime), giving each table a per-instance, session-scoped chat memory.
|
|
10
|
+
*
|
|
11
|
+
* Modeled on `usePersistedQuery`: every access is SSR-guarded and guarded
|
|
12
|
+
* against unavailable storage (privacy modes). With no `tableId()` persistence
|
|
13
|
+
* is a no-op (in-memory only) so id-less drafts can't collide on a shared key.
|
|
14
|
+
*
|
|
15
|
+
* - `restore()` seeds `messages` from the stored snapshot. Call it in
|
|
16
|
+
* `onMounted`, after the fresh component's empty ref exists, so a remount
|
|
17
|
+
* rehydrates the prior conversation.
|
|
18
|
+
* - `clear()` drops the stored snapshot (for a future "new conversation"
|
|
19
|
+
* affordance / a hard reset).
|
|
20
|
+
* - A deep watch persists committed turns; an emptied history removes the key
|
|
21
|
+
* rather than storing `"[]"`.
|
|
22
|
+
*
|
|
23
|
+
* Restored turns keep their tool-call parts for display, but `streamChat`
|
|
24
|
+
* replays history as prose only (`partsToText` in `utils/ai`), so a continued
|
|
25
|
+
* conversation never re-sends a dangling tool_use across the restore boundary.
|
|
26
|
+
*/
|
|
27
|
+
export declare function usePersistedChat(tableId: () => string | undefined, messages: Ref<UIMessage[]>): {
|
|
28
|
+
restore: () => void;
|
|
29
|
+
clear: () => void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { watch } from "vue";
|
|
2
|
+
const STORAGE_PREFIX = "shwfed.table.ai-chat.";
|
|
3
|
+
export function usePersistedChat(tableId, messages) {
|
|
4
|
+
const key = () => `${STORAGE_PREFIX}${tableId()}`;
|
|
5
|
+
const active = () => Boolean(tableId()) && typeof window !== "undefined";
|
|
6
|
+
function restore() {
|
|
7
|
+
if (!active()) return;
|
|
8
|
+
try {
|
|
9
|
+
const raw = window.sessionStorage.getItem(key());
|
|
10
|
+
if (!raw) return;
|
|
11
|
+
const parsed = JSON.parse(raw);
|
|
12
|
+
if (Array.isArray(parsed)) messages.value = parsed;
|
|
13
|
+
} catch {
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function clear() {
|
|
17
|
+
if (typeof window === "undefined") return;
|
|
18
|
+
const id = tableId();
|
|
19
|
+
if (!id) return;
|
|
20
|
+
try {
|
|
21
|
+
window.sessionStorage.removeItem(`${STORAGE_PREFIX}${id}`);
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
watch(messages, (next) => {
|
|
26
|
+
if (!active()) return;
|
|
27
|
+
try {
|
|
28
|
+
if (next.length === 0) window.sessionStorage.removeItem(key());
|
|
29
|
+
else window.sessionStorage.setItem(key(), JSON.stringify(next));
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
}, { deep: true });
|
|
33
|
+
return { restore, clear };
|
|
34
|
+
}
|