@shwfed/config 1.1.5 → 2.0.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.d.mts +2 -19
- package/dist/module.json +1 -1
- package/dist/module.mjs +15 -34
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue +45 -8
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +15 -9
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.d.ts +17 -1
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.js +23 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue +39 -5
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +36 -4
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +15 -9
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +17 -1
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.js +23 -5
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.prototype/config.vue +1 -0
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/runtime.vue +2 -3
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.d.vue.ts +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue +44 -10
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue.d.ts +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/runtime.vue +24 -7
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +6 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.js +6 -3
- package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/config.d.vue.ts +13 -5
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.vue +32 -0
- package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/config.vue.d.ts +13 -5
- package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.search → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.vue +5 -7
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.d.ts +17 -0
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.js +18 -0
- package/dist/runtime/components/actions/components/group.vue +2 -3
- package/dist/runtime/components/actions/components/triggers-field.d.vue.ts +17 -0
- package/dist/runtime/components/actions/components/triggers-field.vue +209 -0
- package/dist/runtime/components/actions/components/triggers-field.vue.d.ts +17 -0
- package/dist/runtime/components/actions/config.vue +51 -1
- package/dist/runtime/components/actions/schema.d.ts +4 -0
- package/dist/runtime/components/actions/schema.js +6 -0
- package/dist/runtime/components/actions/utils/resolve.d.ts +25 -1
- package/dist/runtime/components/actions/utils/resolve.js +37 -9
- package/dist/runtime/components/app.vue +1 -1
- package/dist/runtime/components/block-layout-editor/index.vue +11 -11
- package/dist/runtime/components/block-layout-editor/sidebar.vue +0 -4
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +7 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.d.vue.ts +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue +16 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue.d.ts +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue +1 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +18 -9
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.js +8 -4
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.d.vue.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue +535 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue.d.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.d.vue.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.vue +233 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.vue.d.ts +77 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/schema.d.ts +134 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/schema.js +142 -0
- package/dist/runtime/components/config/index.vue +1 -1
- package/dist/runtime/components/config/use-editor.js +4 -3
- package/dist/runtime/components/form/DerivedValueEditor.d.vue.ts +19 -0
- package/dist/runtime/components/form/DerivedValueEditor.vue +77 -0
- package/dist/runtime/components/form/DerivedValueEditor.vue.d.ts +19 -0
- package/dist/runtime/components/form/config.vue +58 -24
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +29 -31
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +3 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +24 -26
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +3 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/runtime.vue +15 -7
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +12 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +37 -38
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +33 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +14 -6
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.js +3 -2
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue +21 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/runtime.vue +14 -7
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +4 -0
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.js +2 -1
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +1 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +13 -8
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +10 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +25 -1
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +10 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +102 -44
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +14 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.js +14 -5
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +1 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/row.vue +22 -5
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +7 -4
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +7 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +113 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +426 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +113 -0
- package/dist/runtime/components/{actions/buttons/2026-04-27/com.shwfed.actions.button.table.search → form/fields/2026-05-17/com.shwfed.form.field.checkbox.group}/runtime.d.vue.ts +1 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +176 -0
- package/dist/runtime/components/{actions/buttons/2026-04-27/com.shwfed.actions.button.table.search → form/fields/2026-05-17/com.shwfed.form.field.checkbox.group}/runtime.vue.d.ts +1 -1
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +121 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.js +78 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +113 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +426 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +113 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +159 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +121 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.js +78 -0
- package/dist/runtime/components/form/index.d.vue.ts +6 -0
- package/dist/runtime/components/form/index.vue +41 -6
- package/dist/runtime/components/form/index.vue.d.ts +6 -0
- package/dist/runtime/components/form/schema.d.ts +5 -1
- package/dist/runtime/components/form/schema.js +13 -1
- package/dist/runtime/components/form/unit-config.d.vue.ts +0 -3
- package/dist/runtime/components/form/unit-config.vue +4 -10
- package/dist/runtime/components/form/unit-config.vue.d.ts +0 -3
- package/dist/runtime/components/form/utils/commit-bus.d.ts +26 -0
- package/dist/runtime/components/form/utils/commit-bus.js +27 -0
- package/dist/runtime/components/form/utils/common.d.ts +27 -0
- package/dist/runtime/components/form/utils/common.js +31 -0
- package/dist/runtime/components/form/utils/derived.d.ts +72 -0
- package/dist/runtime/components/form/utils/derived.js +116 -0
- package/dist/runtime/components/form/utils/field-value.d.ts +35 -0
- package/dist/runtime/components/form/utils/field-value.js +40 -0
- package/dist/runtime/components/form/utils/history.d.ts +36 -0
- package/dist/runtime/components/form/utils/history.js +74 -0
- package/dist/runtime/components/form/utils/readonly.d.ts +8 -0
- package/dist/runtime/components/form/utils/readonly.js +9 -0
- package/dist/runtime/components/form/utils/state.d.ts +27 -1
- package/dist/runtime/components/form/utils/state.js +16 -8
- package/dist/runtime/components/table/ai/columns-button.vue +3 -4
- package/dist/runtime/components/table/ai/data-source-button.vue +3 -4
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/runtime.vue +2 -3
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/runtime.vue +11 -6
- package/dist/runtime/components/table/config.vue +46 -2
- package/dist/runtime/components/table/index.d.vue.ts +4 -0
- package/dist/runtime/components/table/index.vue +28 -22
- package/dist/runtime/components/table/index.vue.d.ts +4 -0
- package/dist/runtime/components/table/schema.d.ts +33 -0
- package/dist/runtime/components/table/schema.js +21 -0
- package/dist/runtime/components/table/utils/instance.d.ts +2 -0
- package/dist/runtime/components/table/utils/instance.js +8 -0
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue +2 -2
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue +2 -2
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +13 -1
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +11 -3
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +13 -1
- package/dist/runtime/components/ui/locale/Locale.vue +2 -2
- package/dist/runtime/components/ui/radio-group/RadioGroup.d.vue.ts +22 -0
- package/dist/runtime/components/ui/radio-group/RadioGroup.vue +32 -0
- package/dist/runtime/components/ui/radio-group/RadioGroup.vue.d.ts +22 -0
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.d.vue.ts +8 -0
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue +36 -0
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue.d.ts +8 -0
- package/dist/runtime/components/ui/radio-group/index.d.ts +2 -0
- package/dist/runtime/components/ui/radio-group/index.js +2 -0
- package/dist/runtime/composables/useOverlay.d.ts +1 -5
- package/dist/runtime/composables/useOverlay.js +4 -3
- package/dist/runtime/composables/useTranslateLocale.js +1 -2
- package/dist/runtime/share/event-bus.d.ts +118 -0
- package/dist/runtime/share/event-bus.js +55 -0
- package/dist/runtime/share/expression.d.ts +7 -0
- package/dist/runtime/share/expression.js +3 -1
- package/dist/runtime/share/layout.d.ts +1 -0
- package/dist/runtime/share/layout.js +3 -2
- package/dist/runtime/share/slot-renderer.vue +6 -4
- package/dist/runtime/{plugins → utils}/ai/cel-prompt.d.ts +1 -1
- package/dist/runtime/{plugins → utils}/ai/index.d.ts +1 -6
- package/dist/runtime/{plugins → utils}/ai/index.js +5 -14
- package/dist/runtime/utils/cel.d.ts +5 -0
- package/dist/runtime/utils/cel.js +42 -0
- package/dist/runtime/vendor/cel-js/CLAUDE.md +8 -2
- package/dist/runtime/vendor/cel-js/PROMPT.md +35 -10
- package/dist/runtime/vendor/cel-js/lib/functions.js +63 -1
- package/dist/runtime/vendor/cel-js/lib/http-builder.d.ts +35 -0
- package/dist/runtime/{plugins/http/builder.js → vendor/cel-js/lib/http-builder.js} +25 -23
- package/dist/runtime/vendor/cel-js/lib/http-builtins.d.ts +9 -10
- package/dist/runtime/vendor/cel-js/lib/http-builtins.js +53 -13
- package/dist/types.d.mts +7 -1
- package/package.json +1 -1
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/config.vue +0 -10
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/runtime.vue +0 -25
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/schema.d.ts +0 -13
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/schema.js +0 -16
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.d.vue.ts +0 -17
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.vue +0 -10
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.vue.d.ts +0 -17
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/schema.d.ts +0 -13
- package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/schema.js +0 -16
- package/dist/runtime/components/table/utils/host.d.ts +0 -9
- package/dist/runtime/components/table/utils/host.js +0 -8
- package/dist/runtime/composables/useCel.d.ts +0 -16
- package/dist/runtime/composables/useCel.js +0 -8
- package/dist/runtime/middleware/token.d.ts +0 -2
- package/dist/runtime/middleware/token.js +0 -20
- package/dist/runtime/plugins/cel/http.d.ts +0 -8
- package/dist/runtime/plugins/cel/http.js +0 -49
- package/dist/runtime/plugins/cel/index.d.ts +0 -9
- package/dist/runtime/plugins/cel/index.js +0 -59
- package/dist/runtime/plugins/http/builder.d.ts +0 -14
- package/dist/runtime/plugins/http/index.d.ts +0 -19
- package/dist/runtime/plugins/http/index.js +0 -35
- package/dist/runtime/plugins/toast/index.d.ts +0 -108
- package/dist/runtime/plugins/toast/index.js +0 -10
- package/dist/runtime/types.d.ts +0 -25
- /package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.d.vue.ts +0 -0
- /package/dist/runtime/components/actions/buttons/{2026-04-27/com.shwfed.actions.button.table.reset → 2026-05-15/com.shwfed.actions.button.event.dispatch}/runtime.vue.d.ts +0 -0
- /package/dist/runtime/{plugins → utils}/ai/cel-prompt.js +0 -0
- /package/dist/runtime/{plugins/cel/context.d.ts → utils/cel-context.d.ts} +0 -0
- /package/dist/runtime/{plugins/cel/context.js → utils/cel-context.js} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { RadioGroupRoot, useForwardPropsEmits } from "reka-ui";
|
|
4
|
+
import { cn } from "../../../utils/cn";
|
|
5
|
+
defineOptions({ name: "UiRadioGroup" });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
modelValue: { type: null, required: false },
|
|
8
|
+
defaultValue: { type: null, required: false },
|
|
9
|
+
disabled: { type: Boolean, required: false },
|
|
10
|
+
orientation: { type: String, required: false },
|
|
11
|
+
dir: { type: String, required: false },
|
|
12
|
+
loop: { type: Boolean, required: false },
|
|
13
|
+
asChild: { type: Boolean, required: false },
|
|
14
|
+
as: { type: null, required: false },
|
|
15
|
+
name: { type: String, required: false },
|
|
16
|
+
required: { type: Boolean, required: false },
|
|
17
|
+
class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true }
|
|
18
|
+
});
|
|
19
|
+
const emits = defineEmits(["update:modelValue"]);
|
|
20
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
21
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<RadioGroupRoot
|
|
26
|
+
data-slot="radio-group"
|
|
27
|
+
v-bind="forwarded"
|
|
28
|
+
:class="cn('grid gap-3', props.class)"
|
|
29
|
+
>
|
|
30
|
+
<slot />
|
|
31
|
+
</RadioGroupRoot>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RadioGroupRootProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = RadioGroupRootProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (payload: import("reka-ui").AcceptableValue) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((payload: import("reka-ui").AcceptableValue) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RadioGroupItemProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = RadioGroupItemProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { RadioGroupIndicator, RadioGroupItem, useForwardProps } from "reka-ui";
|
|
4
|
+
import { cn } from "../../../utils/cn";
|
|
5
|
+
defineOptions({ name: "UiRadioGroupItem" });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
id: { type: String, required: false },
|
|
8
|
+
value: { type: null, required: false },
|
|
9
|
+
disabled: { type: Boolean, required: false },
|
|
10
|
+
asChild: { type: Boolean, required: false },
|
|
11
|
+
as: { type: null, required: false },
|
|
12
|
+
name: { type: String, required: false },
|
|
13
|
+
required: { type: Boolean, required: false },
|
|
14
|
+
class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true }
|
|
15
|
+
});
|
|
16
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
17
|
+
const forwarded = useForwardProps(delegatedProps);
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<RadioGroupItem
|
|
22
|
+
data-slot="radio-group-item"
|
|
23
|
+
v-bind="forwarded"
|
|
24
|
+
:class="cn(
|
|
25
|
+
'peer cursor-pointer flex items-center justify-center border-zinc-200 data-[state=checked]:border-(--primary) aria-invalid:border-red-400 size-4 shrink-0 rounded-full border shadow-xs hover:shadow transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
26
|
+
props.class
|
|
27
|
+
)"
|
|
28
|
+
>
|
|
29
|
+
<RadioGroupIndicator
|
|
30
|
+
data-slot="radio-group-indicator"
|
|
31
|
+
class="grid h-full w-full place-content-center"
|
|
32
|
+
>
|
|
33
|
+
<span class="size-2 rounded-full bg-(--primary)" />
|
|
34
|
+
</RadioGroupIndicator>
|
|
35
|
+
</RadioGroupItem>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RadioGroupItemProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = RadioGroupItemProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -96,13 +96,9 @@ export declare function openModal<T = unknown>(options: {
|
|
|
96
96
|
props?: Record<string, unknown>;
|
|
97
97
|
}): Effect.Effect<{
|
|
98
98
|
patch: (props: Record<string, unknown>) => Effect.Effect<void>;
|
|
99
|
+
close: () => Effect.Effect<void>;
|
|
99
100
|
modal: Effect.Effect<OverlayResult<T>>;
|
|
100
101
|
}, OverlayDefinitionNotFoundError, ActionContext | Scope.Scope>;
|
|
101
|
-
export declare function confirm(input: {
|
|
102
|
-
content: string;
|
|
103
|
-
icon?: string;
|
|
104
|
-
color?: string;
|
|
105
|
-
}): Effect.Effect<boolean>;
|
|
106
102
|
export declare function reject(input: {
|
|
107
103
|
content: string;
|
|
108
104
|
icon?: string;
|
|
@@ -256,13 +256,14 @@ export function openModal(options) {
|
|
|
256
256
|
}
|
|
257
257
|
return {
|
|
258
258
|
patch: (props) => handle.patch({ props }),
|
|
259
|
+
// Lets the modal body request its own dismissal (e.g. an in-modal
|
|
260
|
+
// close button reached via a bubbled op-request). Idempotent — a
|
|
261
|
+
// no-op once the session has already been closed.
|
|
262
|
+
close: () => handle.close(),
|
|
259
263
|
modal: handle.result
|
|
260
264
|
};
|
|
261
265
|
});
|
|
262
266
|
}
|
|
263
|
-
export function confirm(input) {
|
|
264
|
-
return overlayRuntime.openAlert(input);
|
|
265
|
-
}
|
|
266
267
|
export function reject(input) {
|
|
267
268
|
return Effect.map(overlayRuntime.openAlert(input), (confirmed) => !confirmed);
|
|
268
269
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import {
|
|
3
|
+
import { ai as $ai } from "../utils/ai/index.js";
|
|
4
4
|
const SingleTranslation = Schema.Struct({
|
|
5
5
|
message: Schema.String
|
|
6
6
|
}).annotations({ identifier: "LocaleSingleTranslation" });
|
|
@@ -21,7 +21,6 @@ function buildSystem(target, hint) {
|
|
|
21
21
|
].join(" ");
|
|
22
22
|
}
|
|
23
23
|
export function useTranslateLocale(options = {}) {
|
|
24
|
-
const { $ai } = useNuxtApp();
|
|
25
24
|
const inFlight = ref(/* @__PURE__ */ new Set());
|
|
26
25
|
function isTranslating(target) {
|
|
27
26
|
return inFlight.value.has(target);
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Effect, Schema } from 'effect';
|
|
2
|
+
import type { InjectionKey, Ref } from 'vue';
|
|
3
|
+
/** A descendant button asking an ancestor instance to run an operation. */
|
|
4
|
+
export type OpRequest = Readonly<{
|
|
5
|
+
/** Instance id of the ancestor that should handle this request. */
|
|
6
|
+
target: string;
|
|
7
|
+
/** Operation id from that component type's capability manifest. */
|
|
8
|
+
operation: string;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* The persisted form of a trigger — one stored row addressing an ancestor
|
|
12
|
+
* instance's operation. At runtime each row is dispatched verbatim as an
|
|
13
|
+
* `OpRequest`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Trigger: Schema.Struct<{
|
|
16
|
+
target: Schema.refine<string, typeof Schema.String>;
|
|
17
|
+
operation: Schema.SchemaClass<string, string, never>;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* An ordered list of triggers. A button that fires triggers embeds this as
|
|
21
|
+
* one of its own config fields — re-annotated for that button's own
|
|
22
|
+
* semantics (e.g. a network button's "请求成功后" / "请求失败后"). There is no
|
|
23
|
+
* host-level trigger field; what triggers a button carries, and when they
|
|
24
|
+
* fire, is decided by the button type. List order is execution order.
|
|
25
|
+
*/
|
|
26
|
+
export declare const Triggers: Schema.Array$<Schema.Struct<{
|
|
27
|
+
target: Schema.refine<string, typeof Schema.String>;
|
|
28
|
+
operation: Schema.SchemaClass<string, string, never>;
|
|
29
|
+
}>>;
|
|
30
|
+
/** One stored trigger row. */
|
|
31
|
+
export type TriggerValue = Schema.Schema.Type<typeof Trigger>;
|
|
32
|
+
/**
|
|
33
|
+
* One node of the bubbling channel. `dispatch` runs the matching operation
|
|
34
|
+
* when a request targets this node's instance, then always forwards to the
|
|
35
|
+
* parent — requests bubble to the tree root with no interception. It returns
|
|
36
|
+
* an Effect (the handler then the bubble) instead of running eagerly, so
|
|
37
|
+
* callers can sequence requests.
|
|
38
|
+
*/
|
|
39
|
+
export type EventChannel = Readonly<{
|
|
40
|
+
dispatch: (request: OpRequest) => Effect.Effect<void>;
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Operation id → handler, for one operation-exposing instance. Handlers
|
|
44
|
+
* return an Effect so the bus can run them serially and in order. They are
|
|
45
|
+
* infallible by contract: an operation that can fail must swallow/log
|
|
46
|
+
* internally (mirrors the table's fetch-error contract) so a serial trigger
|
|
47
|
+
* chain never aborts halfway because one trigger quietly failed.
|
|
48
|
+
*/
|
|
49
|
+
export type OperationHandlers = Readonly<Record<string, () => Effect.Effect<void>>>;
|
|
50
|
+
export declare const EVENT_CHANNEL_KEY: InjectionKey<EventChannel>;
|
|
51
|
+
/**
|
|
52
|
+
* Build a channel node for an operation-exposing instance. `dispatch` runs
|
|
53
|
+
* the handler for requests addressed to `instanceId`, then bubbles every
|
|
54
|
+
* request — handled or not — up to `parent`. Handler-then-bubble is one
|
|
55
|
+
* Effect, so the whole delivery is sequenced.
|
|
56
|
+
*/
|
|
57
|
+
export declare function createEventChannel(instanceId: string, operations: OperationHandlers, parent: EventChannel | undefined): EventChannel;
|
|
58
|
+
/**
|
|
59
|
+
* Register the current component as an operation target for its descendants.
|
|
60
|
+
* Only works across the normal Vue inject tree — detached subtrees (a modal
|
|
61
|
+
* slot rendered in an overlay container) must bridge explicitly with
|
|
62
|
+
* `createEventChannel` + a manual `provide(EVENT_CHANNEL_KEY, …)`.
|
|
63
|
+
*/
|
|
64
|
+
export declare function provideEventTarget(instanceId: string, operations: OperationHandlers): void;
|
|
65
|
+
/**
|
|
66
|
+
* Inject the nearest channel, for emitters (button hosts). `undefined` when
|
|
67
|
+
* no operation-exposing ancestor exists — dispatching is then a no-op.
|
|
68
|
+
*/
|
|
69
|
+
export declare function useEventChannel(): EventChannel | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Bubble a list of triggers through `channel`, one after another — list
|
|
72
|
+
* order is execution order and each request's Effect is awaited before the
|
|
73
|
+
* next, so async handlers (e.g. a table refetch) stay sequenced. A no-op
|
|
74
|
+
* when there is no channel (no operation-exposing ancestor) or the list is
|
|
75
|
+
* empty.
|
|
76
|
+
*
|
|
77
|
+
* A button that fires triggers composes this into its runtime effect at the
|
|
78
|
+
* lifecycle point the triggers should fire — the bus no longer runs them.
|
|
79
|
+
*/
|
|
80
|
+
export declare function dispatchTriggers(channel: EventChannel | undefined, triggers: ReadonlyArray<TriggerValue> | undefined): Effect.Effect<void>;
|
|
81
|
+
/**
|
|
82
|
+
* One operation a component type exposes. `id` is what the trigger stores;
|
|
83
|
+
* `name`/`icon` are display only.
|
|
84
|
+
*/
|
|
85
|
+
export type OperationDescriptor = Readonly<{
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
icon?: string;
|
|
89
|
+
}>;
|
|
90
|
+
/** An operation-exposing ancestor instance, as seen by the trigger config UI. */
|
|
91
|
+
export type EventAncestor = Readonly<{
|
|
92
|
+
/** Instance id stored as the trigger `target`. */
|
|
93
|
+
instanceId: string;
|
|
94
|
+
/**
|
|
95
|
+
* Instance display name from config — a table's 内部名称, a button's title.
|
|
96
|
+
* `undefined` when the configurer left it blank; the trigger UI then shows
|
|
97
|
+
* the type name alone instead of an empty `「」`.
|
|
98
|
+
*/
|
|
99
|
+
name?: string;
|
|
100
|
+
/** Component type display name (from type metadata). */
|
|
101
|
+
typeName: string;
|
|
102
|
+
/** Component type icon (from type metadata). */
|
|
103
|
+
typeIcon?: string;
|
|
104
|
+
/** Operations this instance exposes. */
|
|
105
|
+
operations: ReadonlyArray<OperationDescriptor>;
|
|
106
|
+
}>;
|
|
107
|
+
/**
|
|
108
|
+
* Contribute one ancestor frame. Descendant editors see it prepended
|
|
109
|
+
* (nearest first) to whatever chain was inherited from further up. A `null`
|
|
110
|
+
* value contributes nothing — for editors whose current selection may or
|
|
111
|
+
* may not expose operations.
|
|
112
|
+
*/
|
|
113
|
+
export declare function provideEventAncestor(ancestor: Ref<EventAncestor | null>): void;
|
|
114
|
+
/**
|
|
115
|
+
* The operation-exposing ancestors of the current editing position, nearest
|
|
116
|
+
* first. Empty when nothing up the tree exposes operations.
|
|
117
|
+
*/
|
|
118
|
+
export declare function useEventAncestry(): Ref<ReadonlyArray<EventAncestor>>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { computed, inject, provide, shallowRef } from "vue";
|
|
2
|
+
import { Effect, Schema } from "effect";
|
|
3
|
+
export const Trigger = Schema.Struct({
|
|
4
|
+
target: Schema.UUID.annotations({
|
|
5
|
+
description: "\u76EE\u6807\u7956\u5148\u5B9E\u4F8B\u7684 ID"
|
|
6
|
+
}),
|
|
7
|
+
operation: Schema.String.annotations({
|
|
8
|
+
description: "\u76EE\u6807\u7EC4\u4EF6\u80FD\u529B\u6E05\u5355\u4E2D\u7684\u64CD\u4F5C ID"
|
|
9
|
+
})
|
|
10
|
+
}).annotations({
|
|
11
|
+
title: "Trigger",
|
|
12
|
+
description: "\u4E00\u6761\u5411\u4E0A\u5192\u6CE1\u7684\u64CD\u4F5C\u8BF7\u6C42"
|
|
13
|
+
});
|
|
14
|
+
export const Triggers = Schema.Array(Trigger).annotations({
|
|
15
|
+
title: "\u89E6\u53D1\u64CD\u4F5C",
|
|
16
|
+
description: "\u6309\u5217\u8868\u987A\u5E8F\u6267\u884C"
|
|
17
|
+
});
|
|
18
|
+
export const EVENT_CHANNEL_KEY = Symbol("shwfed/event-channel");
|
|
19
|
+
export function createEventChannel(instanceId, operations, parent) {
|
|
20
|
+
return {
|
|
21
|
+
dispatch(request) {
|
|
22
|
+
const handled = request.target === instanceId ? operations[request.operation]?.() ?? Effect.void : Effect.void;
|
|
23
|
+
return parent ? Effect.andThen(handled, parent.dispatch(request)) : handled;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export function provideEventTarget(instanceId, operations) {
|
|
28
|
+
const parent = inject(EVENT_CHANNEL_KEY, void 0);
|
|
29
|
+
provide(EVENT_CHANNEL_KEY, createEventChannel(instanceId, operations, parent));
|
|
30
|
+
}
|
|
31
|
+
export function useEventChannel() {
|
|
32
|
+
return inject(EVENT_CHANNEL_KEY, void 0);
|
|
33
|
+
}
|
|
34
|
+
export function dispatchTriggers(channel, triggers) {
|
|
35
|
+
if (!channel || !triggers || triggers.length === 0) return Effect.void;
|
|
36
|
+
return Effect.forEach(
|
|
37
|
+
triggers,
|
|
38
|
+
(trigger) => channel.dispatch({ target: trigger.target, operation: trigger.operation }),
|
|
39
|
+
{ discard: true }
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
const EVENT_ANCESTRY_KEY = Symbol("shwfed/event-ancestry");
|
|
43
|
+
export function provideEventAncestor(ancestor) {
|
|
44
|
+
const parent = inject(EVENT_ANCESTRY_KEY, void 0);
|
|
45
|
+
provide(
|
|
46
|
+
EVENT_ANCESTRY_KEY,
|
|
47
|
+
computed(() => {
|
|
48
|
+
const chain = parent?.value ?? [];
|
|
49
|
+
return ancestor.value ? [ancestor.value, ...chain] : chain;
|
|
50
|
+
})
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
export function useEventAncestry() {
|
|
54
|
+
return inject(EVENT_ANCESTRY_KEY, void 0) ?? shallowRef([]);
|
|
55
|
+
}
|
|
@@ -5,6 +5,13 @@ type ResultType = string | string[] | ((type: string) => boolean);
|
|
|
5
5
|
export declare function Expression(options: {
|
|
6
6
|
configure: (env: Environment) => void;
|
|
7
7
|
resultType?: ResultType;
|
|
8
|
+
/**
|
|
9
|
+
* Treat identifiers not registered by `configure` as `dyn` instead of
|
|
10
|
+
* rejecting them. Needed when an expression references variables whose
|
|
11
|
+
* names are user-defined and unknowable at schema-construction time
|
|
12
|
+
* (e.g. the chart block's named data sources).
|
|
13
|
+
*/
|
|
14
|
+
unlistedVariablesAreDyn?: boolean;
|
|
8
15
|
}): Schema.Schema<string, string>;
|
|
9
16
|
export declare function Markdown(options: {
|
|
10
17
|
configure: (env: Environment) => void;
|
|
@@ -36,7 +36,9 @@ function buildDescription(baseline, env, resultType) {
|
|
|
36
36
|
return parts.join(" ");
|
|
37
37
|
}
|
|
38
38
|
export function Expression(options) {
|
|
39
|
-
const env = new Environment({
|
|
39
|
+
const env = new Environment({
|
|
40
|
+
unlistedVariablesAreDyn: options.unlistedVariablesAreDyn ?? false
|
|
41
|
+
});
|
|
40
42
|
const baseline = env.getDefinitions();
|
|
41
43
|
options.configure(env);
|
|
42
44
|
const description = buildDescription(baseline, env, options.resultType);
|
|
@@ -9,6 +9,7 @@ export declare const Placement: Schema.Struct<{
|
|
|
9
9
|
h: Schema.optional<Schema.Literal<["start", "center", "end", "stretch"]>>;
|
|
10
10
|
v: Schema.optional<Schema.Literal<["start", "center", "end", "stretch"]>>;
|
|
11
11
|
}>;
|
|
12
|
+
export declare const DEFAULT_GAP = 4;
|
|
12
13
|
export declare const Layout: Schema.Struct<{
|
|
13
14
|
columns: Schema.refine<number, Schema.filter<typeof Schema.Number>>;
|
|
14
15
|
rows: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
@@ -26,6 +26,7 @@ export const Placement = Schema.Struct({
|
|
|
26
26
|
title: "Placement",
|
|
27
27
|
description: "\u5757\u5728\u67D0\u4E00\u5E03\u5C40\u4E2D\u7684\u4F4D\u7F6E\u4E0E\u5BF9\u9F50"
|
|
28
28
|
});
|
|
29
|
+
export const DEFAULT_GAP = 4;
|
|
29
30
|
export const Layout = Schema.Struct({
|
|
30
31
|
columns: TrackCount.annotations({
|
|
31
32
|
title: "\u5217\u6570",
|
|
@@ -35,9 +36,9 @@ export const Layout = Schema.Struct({
|
|
|
35
36
|
title: "\u884C\u6570",
|
|
36
37
|
description: "\u603B\u884C\u6570\u3002\u6BCF\u884C\u7B49\u6743\uFF0C\u6E32\u67D3\u65F6\u5C55\u5F00\u4E3A `repeat(N, minmax(0, 1fr))` \u2014 \u5728\u81EA\u7136\u9AD8\u5EA6\u5BB9\u5668\u5185\u7B49\u540C\u4E8E `auto`"
|
|
37
38
|
})),
|
|
38
|
-
gap: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.
|
|
39
|
+
gap: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.nonNegative()).annotations({
|
|
39
40
|
title: "\u7F51\u683C\u95F4\u8DDD",
|
|
40
|
-
description: "\
|
|
41
|
+
description: "\u975E\u8D1F\u6574\u6570\uFF1B\u5B9E\u9645 CSS gap \u4E3A `calc(n * 0.25rem)`\u3002\u663E\u5F0F `0` \u8868\u793A\u65E0\u95F4\u8DDD\uFF0C\u672A\u8BBE\u7F6E\u5219\u53D6\u9ED8\u8BA4\u95F4\u8DDD 4\uFF08\u5373 `1rem`\uFF09"
|
|
41
42
|
})),
|
|
42
43
|
style: Schema.optional(Schema.String.annotations({
|
|
43
44
|
title: "\u5BB9\u5668\u6837\u5F0F",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useNuxtApp } from "#app";
|
|
3
2
|
import { Effect } from "effect";
|
|
4
3
|
import { computed, onMounted, ref, watch } from "vue";
|
|
5
|
-
import {
|
|
4
|
+
import { cel as _rawCel } from "../utils/cel";
|
|
5
|
+
import { celBindings, injectCELContext } from "../utils/cel-context";
|
|
6
|
+
import { DEFAULT_GAP } from "./layout";
|
|
6
7
|
defineOptions({ name: "ShwfedSlotRenderer" });
|
|
7
8
|
const props = defineProps({
|
|
8
9
|
slotValue: { type: Object, required: true },
|
|
@@ -10,7 +11,6 @@ const props = defineProps({
|
|
|
10
11
|
findEntry: { type: Function, required: true }
|
|
11
12
|
});
|
|
12
13
|
const emit = defineEmits(["update:slotValue"]);
|
|
13
|
-
const { $cel: _rawCel } = useNuxtApp();
|
|
14
14
|
const inherited = injectCELContext();
|
|
15
15
|
const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
|
|
16
16
|
function pickLayout(sets) {
|
|
@@ -40,7 +40,9 @@ const gridStyle = computed(() => {
|
|
|
40
40
|
"display: grid",
|
|
41
41
|
`grid-template-columns: ${tracks(l.columns)}`,
|
|
42
42
|
l.rows ? `grid-template-rows: ${tracks(l.rows)}` : "",
|
|
43
|
-
|
|
43
|
+
// Missing `gap` resolves to `DEFAULT_GAP` — the layout editor's fallback —
|
|
44
|
+
// so the editor and the rendered slot agree. `gap: 0` stays 0.
|
|
45
|
+
`gap: calc(${l.gap ?? DEFAULT_GAP} * 0.25rem)`,
|
|
44
46
|
l.style ?? ""
|
|
45
47
|
].filter(Boolean);
|
|
46
48
|
return parts.join("; ");
|
|
@@ -36,9 +36,4 @@ export declare class StructuredOutputDecodeError extends Error {
|
|
|
36
36
|
readonly rawOutput: unknown;
|
|
37
37
|
constructor(rawOutput: unknown, cause: unknown);
|
|
38
38
|
}
|
|
39
|
-
declare const
|
|
40
|
-
ai: Ai;
|
|
41
|
-
}> & import("#app").ObjectPlugin<{
|
|
42
|
-
ai: Ai;
|
|
43
|
-
}>;
|
|
44
|
-
export default _default;
|
|
39
|
+
export declare const ai: Ai;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from "#app";
|
|
2
1
|
import { computed } from "vue";
|
|
3
2
|
import { JSONSchema, Schema } from "effect";
|
|
4
3
|
const ENDPOINT = "http://192.168.168.10/anthropic/v1/messages";
|
|
@@ -251,16 +250,8 @@ async function generateObject(input) {
|
|
|
251
250
|
messages.push({ role: "user", content: results });
|
|
252
251
|
}
|
|
253
252
|
}
|
|
254
|
-
export
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
generateText,
|
|
260
|
-
generateObject
|
|
261
|
-
};
|
|
262
|
-
return {
|
|
263
|
-
provide: { ai }
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
});
|
|
253
|
+
export const ai = {
|
|
254
|
+
available: computed(() => true),
|
|
255
|
+
generateText,
|
|
256
|
+
generateObject
|
|
257
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Either } from 'effect';
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
|
+
import type { ParseError, TypeError, EvaluationError } from '../vendor/cel-js/lib/errors.js';
|
|
4
|
+
export declare function cel<T>(expression: string, context?: Record<string, unknown>): Effect.Effect<T, ParseError | TypeError | EvaluationError>;
|
|
5
|
+
export declare function celCheck(expression: string): Either.Either<string, ParseError | TypeError>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Effect, Option } from "effect";
|
|
2
|
+
import { Decimal } from "../vendor/cel-js/lib/decimal.js";
|
|
3
|
+
import { Environment } from "../vendor/cel-js/lib/index.js";
|
|
4
|
+
function unwrapCelValue(value) {
|
|
5
|
+
if (value === null || value === void 0) return value;
|
|
6
|
+
if (value instanceof Decimal) return value.toNumber();
|
|
7
|
+
if (Option.isOption(value)) {
|
|
8
|
+
return Option.isSome(value) ? unwrapCelValue(value.value) : void 0;
|
|
9
|
+
}
|
|
10
|
+
if (Array.isArray(value)) return value.map(unwrapCelValue);
|
|
11
|
+
if (typeof value === "object") {
|
|
12
|
+
const proto = Object.getPrototypeOf(value);
|
|
13
|
+
if (proto !== Object.prototype && proto !== null) return value;
|
|
14
|
+
const out = {};
|
|
15
|
+
for (const key of Object.keys(value)) {
|
|
16
|
+
out[key] = unwrapCelValue(value[key]);
|
|
17
|
+
}
|
|
18
|
+
return out;
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
const env = new Environment({ unlistedVariablesAreDyn: true });
|
|
23
|
+
env.registerFunction(
|
|
24
|
+
"media(string): bool",
|
|
25
|
+
(_self, q) => typeof window !== "undefined" && window.matchMedia(q).matches
|
|
26
|
+
);
|
|
27
|
+
env.registerFunction(
|
|
28
|
+
"list<number>.sum(): number",
|
|
29
|
+
(list) => list.reduce(
|
|
30
|
+
(acc, n) => acc.add(n),
|
|
31
|
+
Decimal.from(0)
|
|
32
|
+
)
|
|
33
|
+
);
|
|
34
|
+
export function cel(expression, context) {
|
|
35
|
+
return Effect.map(
|
|
36
|
+
env.evaluate(expression, context),
|
|
37
|
+
(v) => unwrapCelValue(v)
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
export function celCheck(expression) {
|
|
41
|
+
return env.check(expression);
|
|
42
|
+
}
|
|
@@ -10,7 +10,9 @@ When modifying this library, keep both `CLAUDE.md` and `PROMPT.md` in sync with
|
|
|
10
10
|
|
|
11
11
|
`int` and `uint` types have been removed in favor of a unified `number` type backed by `Decimal` (arbitrary-precision arithmetic via BigInt). All numeric literals, arithmetic results, and size/index returns are `Decimal` instances. The `int()`, `uint()`, and `double()` conversion functions still exist as aliases but all return `number`.
|
|
12
12
|
|
|
13
|
-
`google.protobuf.Timestamp` and `google.protobuf.Duration` have been removed. Replaced with a `Date` type backed by `TZDate` from `@date-fns/tz`, constructed via `date(string)
|
|
13
|
+
`google.protobuf.Timestamp` and `google.protobuf.Duration` have been removed. Replaced with a `Date` type backed by `TZDate` from `@date-fns/tz`, constructed via `date(string)` or `date(number)` (a Unix timestamp — the seconds-vs-milliseconds unit is auto-detected by magnitude: values `< 1e11` are read as seconds, the rest as milliseconds). Date manipulation uses date-fns functions (`startOf`, `endOf`, `offset`, `set`, `format`).
|
|
14
|
+
|
|
15
|
+
A `range()` built-in has been added (not from upstream) — `range(number, number)`, `range(number, number, number)` and `range(Date, Date, string)`. It builds an end-exclusive list; the direction follows the operands (counts down when `start > end`); `step` is a positive magnitude; the date unit is `year` / `month` / `day` / `hour` / `minute`. Output length is capped at 100000.
|
|
14
16
|
|
|
15
17
|
`evaluate` now returns `Effect<T, ParseError | EvaluationError | TypeError>` instead of a plain value. The entire evaluation pipeline is Effect-based — every AST node's `evaluate` function returns an Effect, and sub-expressions are composed via `Effect.gen` / `yield*`. Promise-based async handling has been removed. User-registered functions may return `Effect` values, which are automatically flatMapped into the evaluation pipeline. Import `Effect` from `effect` and use `Effect.runSync` or `Effect.runPromise` to execute the returned Effect.
|
|
16
18
|
|
|
@@ -18,6 +20,8 @@ The `homogeneousAggregateLiterals` and `enableOptionalTypes` environment options
|
|
|
18
20
|
|
|
19
21
|
The custom `Optional` class has been replaced with Effect's `Option` type (`import { Option } from 'effect'`). Internal helpers `optionalOf(value)` and `optionalValue(opt)` in `optional.js` handle the CEL-specific semantics (treating `undefined` as `None`, throwing `EvaluationError` on missing value access).
|
|
20
22
|
|
|
23
|
+
An `http` built-in has been added (`http-builtins.ts`, `http-builder.ts`) — not from upstream. It registers the `http` constant and the `http` / `HttpRequest` types on `globalRegistry`, so `http.get(url).header(...).body(...)` expressions type-check and evaluate in every `Environment`. A CEL expression only *describes* a request; it evaluates to an `HttpRequestBuilder`, and the host dispatches it via `.json()` / `.file()`. Endpoints must be absolute URLs — there is no base-URL resolution. Depends on `fx-fetch`.
|
|
24
|
+
|
|
21
25
|
## Architecture
|
|
22
26
|
|
|
23
27
|
```
|
|
@@ -31,6 +35,8 @@ lib/
|
|
|
31
35
|
├── overloads.ts — Operator overload definitions
|
|
32
36
|
├── functions.ts — Built-in functions + Date type (TZDate)
|
|
33
37
|
├── macros.ts — map, filter, all, exists, exists_one, find, has, cel.bind
|
|
38
|
+
├── http-builtins.ts — `http` constant + http/HttpRequest types (local addition)
|
|
39
|
+
├── http-builder.ts — `HttpRequestBuilder` — what an http.* expression returns
|
|
34
40
|
├── decimal.ts — Decimal class (arbitrary precision)
|
|
35
41
|
├── optional.ts — Optional type support (uses Effect Option)
|
|
36
42
|
├── serialize.ts — AST back to CEL string
|
|
@@ -62,7 +68,7 @@ Internal-only (not re-exported from `index.js`): `parse`, standalone `evaluate`/
|
|
|
62
68
|
|
|
63
69
|
Primitives: `string`, `bool`, `number`, `bytes`, `null_type`, `type`
|
|
64
70
|
Composites: `list<T>`, `map<K, V>`, `optional<T>`, `dyn`, `message`
|
|
65
|
-
Custom: `Date` (backed by `TZDate` from `@date-fns/tz`)
|
|
71
|
+
Custom: `Date` (backed by `TZDate` from `@date-fns/tz`), `URL` (backed by the native `URL`; method `URL.param(string): string` reads a search param), `File` (native), `http` / `HttpRequest` (local addition — see `http-builtins.ts`)
|
|
66
72
|
|
|
67
73
|
## Function Signature Format
|
|
68
74
|
|