@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.
Files changed (286) hide show
  1. package/dist/module.d.mts +2 -19
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +15 -34
  4. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +36 -4
  5. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue +45 -8
  6. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +36 -4
  7. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +15 -9
  8. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.d.ts +17 -1
  9. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.js +23 -4
  10. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +36 -4
  11. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue +39 -5
  12. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +36 -4
  13. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +15 -9
  14. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +17 -1
  15. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.js +23 -5
  16. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.prototype/config.vue +1 -0
  17. package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.d.vue.ts +2 -2
  18. package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/config.vue.d.ts +2 -2
  19. package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/runtime.vue +2 -3
  20. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.d.vue.ts +1 -1
  21. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue +44 -10
  22. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue.d.ts +1 -1
  23. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/runtime.vue +24 -7
  24. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +6 -1
  25. package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.js +6 -3
  26. 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
  27. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.vue +32 -0
  28. 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
  29. 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
  30. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.d.ts +17 -0
  31. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.js +18 -0
  32. package/dist/runtime/components/actions/components/group.vue +2 -3
  33. package/dist/runtime/components/actions/components/triggers-field.d.vue.ts +17 -0
  34. package/dist/runtime/components/actions/components/triggers-field.vue +209 -0
  35. package/dist/runtime/components/actions/components/triggers-field.vue.d.ts +17 -0
  36. package/dist/runtime/components/actions/config.vue +51 -1
  37. package/dist/runtime/components/actions/schema.d.ts +4 -0
  38. package/dist/runtime/components/actions/schema.js +6 -0
  39. package/dist/runtime/components/actions/utils/resolve.d.ts +25 -1
  40. package/dist/runtime/components/actions/utils/resolve.js +37 -9
  41. package/dist/runtime/components/app.vue +1 -1
  42. package/dist/runtime/components/block-layout-editor/index.vue +11 -11
  43. package/dist/runtime/components/block-layout-editor/sidebar.vue +0 -4
  44. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +2 -0
  45. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -0
  46. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +2 -0
  47. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +2 -0
  48. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +2 -0
  49. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +6 -0
  50. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +6 -0
  51. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +6 -0
  52. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +6 -0
  53. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +7 -0
  54. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.d.vue.ts +1 -1
  55. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue +16 -2
  56. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue.d.ts +1 -1
  57. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue +1 -0
  58. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +18 -9
  59. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.js +8 -4
  60. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.d.vue.ts +77 -0
  61. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue +535 -0
  62. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/config.vue.d.ts +77 -0
  63. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.d.vue.ts +77 -0
  64. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.vue +233 -0
  65. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/runtime.vue.d.ts +77 -0
  66. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/schema.d.ts +134 -0
  67. package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.line/schema.js +142 -0
  68. package/dist/runtime/components/config/index.vue +1 -1
  69. package/dist/runtime/components/config/use-editor.js +4 -3
  70. package/dist/runtime/components/form/DerivedValueEditor.d.vue.ts +19 -0
  71. package/dist/runtime/components/form/DerivedValueEditor.vue +77 -0
  72. package/dist/runtime/components/form/DerivedValueEditor.vue.d.ts +19 -0
  73. package/dist/runtime/components/form/config.vue +58 -24
  74. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +8 -0
  75. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +21 -0
  76. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +8 -0
  77. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +29 -31
  78. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +4 -0
  79. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +3 -2
  80. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +8 -0
  81. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +21 -0
  82. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +8 -0
  83. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +24 -26
  84. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +4 -0
  85. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +3 -2
  86. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +10 -2
  87. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue +21 -0
  88. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +10 -2
  89. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/runtime.vue +15 -7
  90. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +4 -0
  91. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.js +2 -1
  92. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +10 -2
  93. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +21 -0
  94. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +10 -2
  95. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +14 -6
  96. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +4 -0
  97. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +2 -1
  98. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +10 -2
  99. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +21 -0
  100. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +10 -2
  101. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +14 -6
  102. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +4 -0
  103. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +2 -1
  104. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +12 -4
  105. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +21 -0
  106. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +12 -4
  107. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +14 -6
  108. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +4 -0
  109. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +2 -1
  110. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +12 -4
  111. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +21 -0
  112. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +12 -4
  113. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +14 -6
  114. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +4 -0
  115. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +2 -1
  116. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +12 -4
  117. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +21 -0
  118. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +12 -4
  119. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +14 -6
  120. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +4 -0
  121. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.js +2 -1
  122. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +12 -4
  123. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +21 -0
  124. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +12 -4
  125. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +14 -6
  126. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +4 -0
  127. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.js +2 -1
  128. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +8 -0
  129. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +21 -0
  130. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +8 -0
  131. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +37 -38
  132. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +4 -0
  133. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +2 -1
  134. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +10 -2
  135. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +21 -0
  136. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +10 -2
  137. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +33 -22
  138. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +4 -0
  139. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.js +2 -1
  140. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +8 -0
  141. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +21 -0
  142. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +8 -0
  143. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +14 -6
  144. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +4 -0
  145. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.js +3 -2
  146. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +8 -0
  147. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue +21 -0
  148. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +8 -0
  149. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/runtime.vue +14 -7
  150. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +4 -0
  151. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.js +2 -1
  152. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +1 -0
  153. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +13 -8
  154. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +10 -2
  155. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +25 -1
  156. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +10 -2
  157. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +102 -44
  158. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +14 -0
  159. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.js +14 -5
  160. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +1 -0
  161. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/row.vue +22 -5
  162. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +7 -4
  163. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +7 -1
  164. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +113 -0
  165. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +426 -0
  166. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +113 -0
  167. 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
  168. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +176 -0
  169. 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
  170. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +121 -0
  171. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.js +78 -0
  172. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +113 -0
  173. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +426 -0
  174. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +113 -0
  175. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.d.vue.ts +8 -0
  176. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +159 -0
  177. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue.d.ts +8 -0
  178. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +121 -0
  179. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.js +78 -0
  180. package/dist/runtime/components/form/index.d.vue.ts +6 -0
  181. package/dist/runtime/components/form/index.vue +41 -6
  182. package/dist/runtime/components/form/index.vue.d.ts +6 -0
  183. package/dist/runtime/components/form/schema.d.ts +5 -1
  184. package/dist/runtime/components/form/schema.js +13 -1
  185. package/dist/runtime/components/form/unit-config.d.vue.ts +0 -3
  186. package/dist/runtime/components/form/unit-config.vue +4 -10
  187. package/dist/runtime/components/form/unit-config.vue.d.ts +0 -3
  188. package/dist/runtime/components/form/utils/commit-bus.d.ts +26 -0
  189. package/dist/runtime/components/form/utils/commit-bus.js +27 -0
  190. package/dist/runtime/components/form/utils/common.d.ts +27 -0
  191. package/dist/runtime/components/form/utils/common.js +31 -0
  192. package/dist/runtime/components/form/utils/derived.d.ts +72 -0
  193. package/dist/runtime/components/form/utils/derived.js +116 -0
  194. package/dist/runtime/components/form/utils/field-value.d.ts +35 -0
  195. package/dist/runtime/components/form/utils/field-value.js +40 -0
  196. package/dist/runtime/components/form/utils/history.d.ts +36 -0
  197. package/dist/runtime/components/form/utils/history.js +74 -0
  198. package/dist/runtime/components/form/utils/readonly.d.ts +8 -0
  199. package/dist/runtime/components/form/utils/readonly.js +9 -0
  200. package/dist/runtime/components/form/utils/state.d.ts +27 -1
  201. package/dist/runtime/components/form/utils/state.js +16 -8
  202. package/dist/runtime/components/table/ai/columns-button.vue +3 -4
  203. package/dist/runtime/components/table/ai/data-source-button.vue +3 -4
  204. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/runtime.vue +2 -3
  205. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/runtime.vue +2 -3
  206. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/runtime.vue +2 -3
  207. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/runtime.vue +2 -3
  208. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/runtime.vue +11 -6
  209. package/dist/runtime/components/table/config.vue +46 -2
  210. package/dist/runtime/components/table/index.d.vue.ts +4 -0
  211. package/dist/runtime/components/table/index.vue +28 -22
  212. package/dist/runtime/components/table/index.vue.d.ts +4 -0
  213. package/dist/runtime/components/table/schema.d.ts +33 -0
  214. package/dist/runtime/components/table/schema.js +21 -0
  215. package/dist/runtime/components/table/utils/instance.d.ts +2 -0
  216. package/dist/runtime/components/table/utils/instance.js +8 -0
  217. package/dist/runtime/components/ui/date-picker/DatePickerInput.vue +2 -2
  218. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue +2 -2
  219. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue +2 -2
  220. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue +2 -2
  221. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +13 -1
  222. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +11 -3
  223. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +13 -1
  224. package/dist/runtime/components/ui/locale/Locale.vue +2 -2
  225. package/dist/runtime/components/ui/radio-group/RadioGroup.d.vue.ts +22 -0
  226. package/dist/runtime/components/ui/radio-group/RadioGroup.vue +32 -0
  227. package/dist/runtime/components/ui/radio-group/RadioGroup.vue.d.ts +22 -0
  228. package/dist/runtime/components/ui/radio-group/RadioGroupItem.d.vue.ts +8 -0
  229. package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue +36 -0
  230. package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue.d.ts +8 -0
  231. package/dist/runtime/components/ui/radio-group/index.d.ts +2 -0
  232. package/dist/runtime/components/ui/radio-group/index.js +2 -0
  233. package/dist/runtime/composables/useOverlay.d.ts +1 -5
  234. package/dist/runtime/composables/useOverlay.js +4 -3
  235. package/dist/runtime/composables/useTranslateLocale.js +1 -2
  236. package/dist/runtime/share/event-bus.d.ts +118 -0
  237. package/dist/runtime/share/event-bus.js +55 -0
  238. package/dist/runtime/share/expression.d.ts +7 -0
  239. package/dist/runtime/share/expression.js +3 -1
  240. package/dist/runtime/share/layout.d.ts +1 -0
  241. package/dist/runtime/share/layout.js +3 -2
  242. package/dist/runtime/share/slot-renderer.vue +6 -4
  243. package/dist/runtime/{plugins → utils}/ai/cel-prompt.d.ts +1 -1
  244. package/dist/runtime/{plugins → utils}/ai/index.d.ts +1 -6
  245. package/dist/runtime/{plugins → utils}/ai/index.js +5 -14
  246. package/dist/runtime/utils/cel.d.ts +5 -0
  247. package/dist/runtime/utils/cel.js +42 -0
  248. package/dist/runtime/vendor/cel-js/CLAUDE.md +8 -2
  249. package/dist/runtime/vendor/cel-js/PROMPT.md +35 -10
  250. package/dist/runtime/vendor/cel-js/lib/functions.js +63 -1
  251. package/dist/runtime/vendor/cel-js/lib/http-builder.d.ts +35 -0
  252. package/dist/runtime/{plugins/http/builder.js → vendor/cel-js/lib/http-builder.js} +25 -23
  253. package/dist/runtime/vendor/cel-js/lib/http-builtins.d.ts +9 -10
  254. package/dist/runtime/vendor/cel-js/lib/http-builtins.js +53 -13
  255. package/dist/types.d.mts +7 -1
  256. package/package.json +1 -1
  257. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/config.vue +0 -10
  258. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/runtime.vue +0 -25
  259. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/schema.d.ts +0 -13
  260. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.reset/schema.js +0 -16
  261. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.d.vue.ts +0 -17
  262. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.vue +0 -10
  263. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/config.vue.d.ts +0 -17
  264. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/schema.d.ts +0 -13
  265. package/dist/runtime/components/actions/buttons/2026-04-27/com.shwfed.actions.button.table.search/schema.js +0 -16
  266. package/dist/runtime/components/table/utils/host.d.ts +0 -9
  267. package/dist/runtime/components/table/utils/host.js +0 -8
  268. package/dist/runtime/composables/useCel.d.ts +0 -16
  269. package/dist/runtime/composables/useCel.js +0 -8
  270. package/dist/runtime/middleware/token.d.ts +0 -2
  271. package/dist/runtime/middleware/token.js +0 -20
  272. package/dist/runtime/plugins/cel/http.d.ts +0 -8
  273. package/dist/runtime/plugins/cel/http.js +0 -49
  274. package/dist/runtime/plugins/cel/index.d.ts +0 -9
  275. package/dist/runtime/plugins/cel/index.js +0 -59
  276. package/dist/runtime/plugins/http/builder.d.ts +0 -14
  277. package/dist/runtime/plugins/http/index.d.ts +0 -19
  278. package/dist/runtime/plugins/http/index.js +0 -35
  279. package/dist/runtime/plugins/toast/index.d.ts +0 -108
  280. package/dist/runtime/plugins/toast/index.js +0 -10
  281. package/dist/runtime/types.d.ts +0 -25
  282. /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
  283. /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
  284. /package/dist/runtime/{plugins → utils}/ai/cel-prompt.js +0 -0
  285. /package/dist/runtime/{plugins/cel/context.d.ts → utils/cel-context.d.ts} +0 -0
  286. /package/dist/runtime/{plugins/cel/context.js → utils/cel-context.js} +0 -0
@@ -1,5 +1,4 @@
1
1
  <script setup>
2
- import { useNuxtApp } from "#app";
3
2
  import { computed, onBeforeUnmount, provide, reactive, ref, watch } from "vue";
4
3
  import { Icon } from "@iconify/vue";
5
4
  import { Effect } from "effect";
@@ -12,7 +11,8 @@ import { Button } from "../../ui/button";
12
11
  import { ButtonGroup } from "../../ui/button-group";
13
12
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../ui/dropdown-menu";
14
13
  import { Tooltip, TooltipContent, TooltipTrigger } from "../../ui/tooltip";
15
- import { celBindings, injectCELContext } from "../../../plugins/cel/context";
14
+ import { cel as _rawCel } from "../../../utils/cel";
15
+ import { celBindings, injectCELContext } from "../../../utils/cel-context";
16
16
  import { buttonRegistryKey } from "../utils/button-registry";
17
17
  import { findButton } from "../utils/resolve";
18
18
  import { Fetch } from "fx-fetch";
@@ -73,7 +73,6 @@ const { locale, t } = useI18n({
73
73
  }
74
74
  }
75
75
  });
76
- const { $cel: _rawCel } = useNuxtApp();
77
76
  const _inheritedCelContext = injectCELContext();
78
77
  const $cel = (expression, context) => _rawCel(expression, { ...celBindings(_inheritedCelContext), ...context });
79
78
  const overlay = useOverlay();
@@ -0,0 +1,17 @@
1
+ import { type TriggerValue } from '../../../share/event-bus.js';
2
+ type __VLS_Props = {
3
+ triggers: ReadonlyArray<TriggerValue>;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ "update:triggers": (triggers: readonly {
7
+ readonly target: string;
8
+ readonly operation: string;
9
+ }[]) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:triggers"?: ((triggers: readonly {
12
+ readonly target: string;
13
+ readonly operation: string;
14
+ }[]) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,209 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { Icon } from "@iconify/vue";
4
+ import { useEventAncestry } from "../../../share/event-bus";
5
+ import {
6
+ useTreeDnd
7
+ } from "../../../composables/useTreeDnd";
8
+ import {
9
+ InputGroup,
10
+ InputGroupAddon,
11
+ InputGroupButton,
12
+ InputGroupCombobox,
13
+ InputGroupText
14
+ } from "../../ui/input-group";
15
+ import { CommandGroup, CommandItem } from "../../ui/command";
16
+ defineOptions({ name: "ShwfedTriggersField" });
17
+ const props = defineProps({
18
+ triggers: { type: Array, required: true }
19
+ });
20
+ const emit = defineEmits(["update:triggers"]);
21
+ function keyOf(target, operation) {
22
+ return `${target}::${operation}`;
23
+ }
24
+ const ancestry = useEventAncestry();
25
+ const allOptions = computed(
26
+ () => ancestry.value.flatMap(
27
+ (ancestor) => ancestor.operations.map((operation) => ({
28
+ key: keyOf(ancestor.instanceId, operation.id),
29
+ target: ancestor.instanceId,
30
+ operation: operation.id,
31
+ typeName: ancestor.typeName,
32
+ typeIcon: ancestor.typeIcon,
33
+ instanceName: ancestor.name,
34
+ opName: operation.name,
35
+ opIcon: operation.icon
36
+ }))
37
+ )
38
+ );
39
+ const optionByKey = computed(() => {
40
+ const map = /* @__PURE__ */ new Map();
41
+ for (const option of allOptions.value) map.set(option.key, option);
42
+ return map;
43
+ });
44
+ const rows = computed(
45
+ () => props.triggers.map((trigger) => ({
46
+ key: keyOf(trigger.target, trigger.operation),
47
+ trigger,
48
+ option: optionByKey.value.get(keyOf(trigger.target, trigger.operation))
49
+ }))
50
+ );
51
+ const available = computed(() => {
52
+ const used = new Set(props.triggers.map((t) => keyOf(t.target, t.operation)));
53
+ return allOptions.value.filter((option) => !used.has(option.key));
54
+ });
55
+ function searchValue(option) {
56
+ return [option.typeName, option.instanceName, option.opName].filter((part) => !!part).join(" ");
57
+ }
58
+ function addTrigger(option) {
59
+ emit("update:triggers", [
60
+ ...props.triggers,
61
+ { target: option.target, operation: option.operation }
62
+ ]);
63
+ }
64
+ function removeTrigger(index) {
65
+ emit("update:triggers", props.triggers.filter((_, i) => i !== index));
66
+ }
67
+ const ROW_KIND = "shwfed-trigger-row";
68
+ function moveTrigger(from, to) {
69
+ if (from === to) return;
70
+ if (from < 0 || to < 0 || from >= props.triggers.length || to >= props.triggers.length) return;
71
+ const next = [...props.triggers];
72
+ const [item] = next.splice(from, 1);
73
+ if (!item) return;
74
+ next.splice(to, 0, item);
75
+ emit("update:triggers", next);
76
+ }
77
+ function onRowDrop(e) {
78
+ if (e.source.kind !== ROW_KIND || e.target.kind !== ROW_KIND) return;
79
+ const from = rows.value.findIndex((r) => r.key === e.source.id);
80
+ const to = rows.value.findIndex((r) => r.key === e.target.id);
81
+ if (from < 0 || to < 0) return;
82
+ if (e.instruction === "reorder-above") moveTrigger(from, from < to ? to - 1 : to);
83
+ else if (e.instruction === "reorder-below") moveTrigger(from, from <= to ? to : to + 1);
84
+ }
85
+ const dnd = useTreeDnd({ onRowDrop });
86
+ const pickDragHandle = (el) => el.querySelector(".drag-handle");
87
+ function rowConfig(rowKey) {
88
+ return {
89
+ kind: ROW_KIND,
90
+ canDrop: (src) => src.kind === ROW_KIND,
91
+ blockInstructions: (src) => {
92
+ const block = ["make-child", "reparent"];
93
+ if (src.id === rowKey) block.push("reorder-above", "reorder-below");
94
+ return block;
95
+ },
96
+ dragHandle: pickDragHandle
97
+ };
98
+ }
99
+ </script>
100
+
101
+ <template>
102
+ <div class="flex flex-col gap-2">
103
+ <div
104
+ v-for="(row, index) in rows"
105
+ :key="row.key"
106
+ :ref="dnd.rowRef(row.key, rowConfig(row.key))"
107
+ class="relative"
108
+ :data-instruction="dnd.instructionFor(row.key) ?? void 0"
109
+ >
110
+ <InputGroup>
111
+ <InputGroupAddon align="inline-start">
112
+ <Icon
113
+ icon="fluent:re-order-dots-vertical-20-regular"
114
+ class="drag-handle size-4 shrink-0 cursor-grab text-zinc-400"
115
+ aria-label="拖动排序"
116
+ />
117
+ </InputGroupAddon>
118
+
119
+ <InputGroupText class="min-w-0 pl-1 flex-1">
120
+ <template v-if="row.option">
121
+ <Icon
122
+ v-if="row.option.typeIcon"
123
+ :icon="row.option.typeIcon"
124
+ class="size-4 shrink-0 text-zinc-500"
125
+ />
126
+ <span class="shrink-0 text-zinc-500">{{ row.option.typeName }}</span>
127
+ <span
128
+ v-if="row.option.instanceName"
129
+ class="truncate font-medium text-zinc-700"
130
+ >「{{ row.option.instanceName }}」</span>
131
+ <Icon icon="fluent:arrow-step-in-right-20-regular" />
132
+ <Icon
133
+ v-if="row.option.opIcon"
134
+ :icon="row.option.opIcon"
135
+ class="size-4 shrink-0 text-zinc-500"
136
+ />
137
+ <span class="truncate text-zinc-700">{{ row.option.opName }}</span>
138
+ </template>
139
+ <template v-else>
140
+ <Icon
141
+ icon="fluent:warning-20-regular"
142
+ class="size-4 shrink-0 text-amber-500"
143
+ />
144
+ <span class="shrink-0 text-amber-600">目标已失效</span>
145
+ <span class="truncate text-xs tabular-nums text-zinc-400">
146
+ {{ row.trigger.target.slice(0, 8) }} · {{ row.trigger.operation }}
147
+ </span>
148
+ </template>
149
+ </InputGroupText>
150
+
151
+ <InputGroupAddon align="inline-end">
152
+ <InputGroupButton
153
+ variant="destructive"
154
+ size="icon-xs"
155
+ as-child
156
+ >
157
+ <button
158
+ type="button"
159
+ aria-label="移除"
160
+ @click="removeTrigger(index)"
161
+ >
162
+ <Icon icon="fluent:delete-20-regular" />
163
+ </button>
164
+ </InputGroupButton>
165
+ </InputGroupAddon>
166
+ </InputGroup>
167
+ </div>
168
+
169
+ <InputGroup v-if="available.length > 0">
170
+ <InputGroupAddon align="inline-start">
171
+ <Icon icon="fluent:add-20-regular" />
172
+ </InputGroupAddon>
173
+ <InputGroupCombobox>
174
+ <CommandGroup>
175
+ <CommandItem
176
+ v-for="option in available"
177
+ :key="option.key"
178
+ :value="searchValue(option)"
179
+ @select="addTrigger(option)"
180
+ >
181
+ <Icon
182
+ v-if="option.typeIcon"
183
+ :icon="option.typeIcon"
184
+ class="size-4 shrink-0 text-zinc-500"
185
+ />
186
+ <span class="text-zinc-500">{{ option.typeName }}</span>
187
+ <span
188
+ v-if="option.instanceName"
189
+ class="font-medium"
190
+ >「{{ option.instanceName }}」</span>
191
+ <span class="text-zinc-400">:</span>
192
+ <span class="flex-1">{{ option.opName }}</span>
193
+ </CommandItem>
194
+ </CommandGroup>
195
+ </InputGroupCombobox>
196
+ </InputGroup>
197
+
198
+ <p
199
+ v-else-if="rows.length === 0"
200
+ class="text-xs text-zinc-400"
201
+ >
202
+ 当前位置没有可触发的祖先组件。
203
+ </p>
204
+ </div>
205
+ </template>
206
+
207
+ <style scoped>
208
+ [data-instruction=reorder-above]:before,[data-instruction=reorder-below]:after{background:var(--primary,#2563eb);content:"";height:2px;left:0;pointer-events:none;position:absolute;right:0;z-index:1}[data-instruction=reorder-above]:before{top:-5px}[data-instruction=reorder-below]:after{bottom:-5px}
209
+ </style>
@@ -0,0 +1,17 @@
1
+ import { type TriggerValue } from '../../../share/event-bus.js';
2
+ type __VLS_Props = {
3
+ triggers: ReadonlyArray<TriggerValue>;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ "update:triggers": (triggers: readonly {
7
+ readonly target: string;
8
+ readonly operation: string;
9
+ }[]) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:triggers"?: ((triggers: readonly {
12
+ readonly target: string;
13
+ readonly operation: string;
14
+ }[]) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -8,7 +8,7 @@ import {
8
8
  getStructFieldTitle
9
9
  } from "./schema";
10
10
  import { Environment } from "../../vendor/cel-js/lib/index";
11
- import { provideCELContext } from "../../plugins/cel/context";
11
+ import { provideCELContext } from "../../utils/cel-context";
12
12
  import { BUTTONS, findButton } from "./utils/resolve";
13
13
  import { SIDEBAR_TAKEOVER_KEY } from "../sidebar-takeover";
14
14
  import { BREADCRUMB_EXTENSION_KEY } from "../config/breadcrumb-extension";
@@ -40,6 +40,9 @@ import { Markdown } from "../ui/markdown";
40
40
  import {
41
41
  useTreeDnd
42
42
  } from "../../composables/useTreeDnd";
43
+ import {
44
+ provideEventAncestor
45
+ } from "../../share/event-bus";
43
46
  defineOptions({ name: "ShwfedActionsConfig" });
44
47
  const props = defineProps({
45
48
  configure: { type: Function, required: false }
@@ -102,6 +105,7 @@ const SIZE_OPTIONS = [
102
105
  const ACTION_PICKER_ENTRIES = (() => {
103
106
  const byType = /* @__PURE__ */ new Map();
104
107
  for (const a of BUTTONS) {
108
+ if (a.deprecated) continue;
105
109
  const prev = byType.get(a.type);
106
110
  if (!prev || a.compatibilityDate > prev.compatibilityDate) {
107
111
  byType.set(a.type, {
@@ -234,6 +238,11 @@ function getActionConfigComponent(action) {
234
238
  function getButtonMetadataLabel(action) {
235
239
  return findButton(action.type, action.compatibilityDate)?.metadata.name ?? action.type;
236
240
  }
241
+ function getButtonDeprecationNote(action) {
242
+ const entry = findButton(action.type, action.compatibilityDate);
243
+ if (!entry?.deprecated) return void 0;
244
+ return entry.deprecationNote ?? "\u6B64\u6309\u94AE\u7C7B\u578B\u5DF2\u5F03\u7528\u3002";
245
+ }
237
246
  function patchSelectedGroup(mutate) {
238
247
  const sel = selected.value;
239
248
  if (sel?.kind !== "group") return;
@@ -325,6 +334,23 @@ const selectedDrillableTitle = computed(() => {
325
334
  if (sub && sub.action === drilled) return sub.title;
326
335
  return null;
327
336
  });
337
+ const selectedOperationAncestor = computed(() => {
338
+ const node = selectedActionItem.value ?? selectedSubRef.value;
339
+ if (!node?.action) return null;
340
+ const entry = findButton(node.action.type, node.action.compatibilityDate);
341
+ const operations = entry?.metadata.operations;
342
+ if (!entry || !operations || operations.length === 0) return null;
343
+ return {
344
+ instanceId: node.id,
345
+ // Undefined when the button has no title — the trigger UI then shows the
346
+ // type name alone instead of an empty 「」.
347
+ name: getLocalizedText(node.title, "zh"),
348
+ typeName: entry.metadata.name,
349
+ typeIcon: entry.metadata.icon,
350
+ operations
351
+ };
352
+ });
353
+ provideEventAncestor(selectedOperationAncestor);
328
354
  const outerTakeover = inject(SIDEBAR_TAKEOVER_KEY, null);
329
355
  const outerTakeoverTarget = computed(() => outerTakeover?.target.value ?? null);
330
356
  const sidebarTakeoverTarget = ref(null);
@@ -1350,6 +1376,18 @@ const newGroupZoneId = (insertIndex) => `new-group-${insertIndex}`;
1350
1376
  <div class="text-xs text-zinc-400">
1351
1377
  {{ getButtonMetadataLabel(selectedActionItem.action) }}
1352
1378
  </div>
1379
+
1380
+ <div
1381
+ v-if="getButtonDeprecationNote(selectedActionItem.action)"
1382
+ class="flex items-start gap-2 rounded border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800"
1383
+ role="alert"
1384
+ >
1385
+ <Icon
1386
+ icon="fluent:warning-20-regular"
1387
+ class="mt-px size-4 shrink-0"
1388
+ />
1389
+ <span class="flex-1">{{ getButtonDeprecationNote(selectedActionItem.action) }}</span>
1390
+ </div>
1353
1391
  </template>
1354
1392
 
1355
1393
  <component
@@ -1525,6 +1563,18 @@ const newGroupZoneId = (insertIndex) => `new-group-${insertIndex}`;
1525
1563
  <div class="text-xs text-zinc-400">
1526
1564
  {{ getButtonMetadataLabel(selectedSubRef.action) }}
1527
1565
  </div>
1566
+
1567
+ <div
1568
+ v-if="getButtonDeprecationNote(selectedSubRef.action)"
1569
+ class="flex items-start gap-2 rounded border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800"
1570
+ role="alert"
1571
+ >
1572
+ <Icon
1573
+ icon="fluent:warning-20-regular"
1574
+ class="mt-px size-4 shrink-0"
1575
+ />
1576
+ <span class="flex-1">{{ getButtonDeprecationNote(selectedSubRef.action) }}</span>
1577
+ </div>
1528
1578
  </template>
1529
1579
 
1530
1580
  <component
@@ -288,6 +288,10 @@ export declare function defaultActionsConfig(): ActionsConfigValue;
288
288
  type AnySchema = Schema.Schema<any, any, any>;
289
289
  export declare function getStructFieldTitle(schema: AnySchema, fieldName: string): string | undefined;
290
290
  export declare function getStructFieldDescription(schema: AnySchema, fieldName: string): string | undefined;
291
+ /** Top-level `title` annotation of a schema, if any. */
292
+ export declare function getSchemaTitle(schema: AnySchema): string | undefined;
293
+ /** Top-level `description` annotation of a schema, if any. */
294
+ export declare function getSchemaDescription(schema: AnySchema): string | undefined;
291
295
  export type ActionsConfigValue = Schema.Schema.Type<ReturnType<typeof ActionsConfig>>;
292
296
  export type ActionGroupValue = ActionsConfigValue['groups'][number];
293
297
  export type ActionGroupItemValue = ActionsConfigValue['items'][number];
@@ -208,3 +208,9 @@ export function getStructFieldTitle(schema, fieldName) {
208
208
  export function getStructFieldDescription(schema, fieldName) {
209
209
  return getFieldAnnotation(schema, fieldName, SchemaAST.getDescriptionAnnotation);
210
210
  }
211
+ export function getSchemaTitle(schema) {
212
+ return Option.getOrUndefined(SchemaAST.getTitleAnnotation(schema.ast));
213
+ }
214
+ export function getSchemaDescription(schema) {
215
+ return Option.getOrUndefined(SchemaAST.getDescriptionAnnotation(schema.ast));
216
+ }
@@ -3,6 +3,7 @@ import type { Schema } from 'effect';
3
3
  import { Effect } from 'effect';
4
4
  import type { Fetch } from 'fx-fetch';
5
5
  import type { Environment } from '../../../vendor/cel-js/lib/index.js';
6
+ import type { EventChannel, OperationDescriptor, TriggerValue } from '../../../share/event-bus.js';
6
7
  type CelEvaluator = <T>(expression: string, context?: Record<string, unknown>) => Effect.Effect<T, any>;
7
8
  type AnySchema = Schema.Schema<any, any, never>;
8
9
  type SchemaFactory = (configure: (env: Environment) => void) => AnySchema;
@@ -10,6 +11,8 @@ export type ButtonMetadata = Readonly<{
10
11
  name: string;
11
12
  icon: string;
12
13
  drillable?: boolean;
14
+ operations?: ReadonlyArray<OperationDescriptor>;
15
+ deprecated?: string;
13
16
  }>;
14
17
  export type ButtonEntry = Readonly<{
15
18
  type: string;
@@ -18,10 +21,31 @@ export type ButtonEntry = Readonly<{
18
21
  schema: SchemaFactory;
19
22
  config: Component;
20
23
  runtime: Component;
24
+ /** True when this button type is deprecated — explicit flag or newer date. */
25
+ deprecated: boolean;
26
+ /** Migration guidance shown in the inspector when `deprecated`. */
27
+ deprecationNote?: string;
21
28
  }>;
22
29
  export declare const BUTTONS: ReadonlyArray<ButtonEntry>;
23
30
  export declare function allButtonSchemas(configure: (env: Environment) => void): ReadonlyArray<AnySchema>;
24
31
  export declare function findButton(type: string, compatibilityDate: string): ButtonEntry | undefined;
25
32
  export declare function interpolateMarkdown(source: string, $cel: CelEvaluator): string;
26
- export declare function executeHttpRequest(expression: string, $cel: CelEvaluator, messageExpression?: string, styleExpression?: string): Effect.Effect<unknown, any, Fetch.Fetch>;
33
+ type ToastStyle = 'success' | 'error' | 'warning' | 'info';
34
+ /**
35
+ * Post-completion behaviour shared by the HTTP-request buttons. Once the
36
+ * request finishes, `resultExpression` classifies the outcome into one of the
37
+ * four `ToastStyle`s (default `success`); that single result then both styles
38
+ * the toast and selects which trigger list runs.
39
+ */
40
+ export type HttpRequestOutcome = {
41
+ /** Toast message expression, evaluated against `json`. No toast when absent. */
42
+ messageExpression?: string;
43
+ /** Result classifier, evaluated against `json`. Defaults to `success`. */
44
+ resultExpression?: string;
45
+ /** Bubbling channel for the result-keyed trigger lists. */
46
+ channel?: EventChannel;
47
+ /** Trigger lists keyed by result — the one matching the result runs. */
48
+ triggers?: Partial<Record<ToastStyle, ReadonlyArray<TriggerValue>>>;
49
+ };
50
+ export declare function executeHttpRequest(expression: string, $cel: CelEvaluator, outcome?: HttpRequestOutcome): Effect.Effect<unknown, any, Fetch.Fetch>;
27
51
  export {};
@@ -2,6 +2,7 @@ import { defineAsyncComponent } from "vue";
2
2
  import { Effect } from "effect";
3
3
  import { toast } from "vue-sonner";
4
4
  import { defineRegistry } from "../../../share/define-registry.js";
5
+ import { dispatchTriggers } from "../../../share/event-bus.js";
5
6
  const schemaModules = import.meta.glob(
6
7
  "../buttons/*/*/schema.{ts,js}",
7
8
  { eager: true, exhaustive: true }
@@ -31,7 +32,29 @@ const registry = defineRegistry({
31
32
  dirSegment: "buttons",
32
33
  schemaModules,
33
34
  configModules,
34
- runtimeModules
35
+ runtimeModules,
36
+ // A button is deprecated when its schema declares `metadata.deprecated`
37
+ // (an explicit, possibly cross-type replacement note), or when a newer
38
+ // `compatibilityDate` of the same `type` exists (the date-versioned rule
39
+ // shared with form). Either way the inspector shows the migration hint.
40
+ deriveEntryExtras: (drafts) => {
41
+ const latestByType = /* @__PURE__ */ new Map();
42
+ for (const d of drafts) {
43
+ const prev = latestByType.get(d.type);
44
+ if (!prev || d.compatibilityDate > prev) latestByType.set(d.type, d.compatibilityDate);
45
+ }
46
+ return (draft) => {
47
+ const note = draft.module.metadata.deprecated;
48
+ if (note) return { deprecated: true, deprecationNote: note };
49
+ if (draft.compatibilityDate < latestByType.get(draft.type)) {
50
+ return {
51
+ deprecated: true,
52
+ deprecationNote: `\u5DF2\u88AB\u66F4\u65B0\u7248\u672C ${latestByType.get(draft.type)} \u53D6\u4EE3\u3002`
53
+ };
54
+ }
55
+ return { deprecated: false };
56
+ };
57
+ }
35
58
  });
36
59
  export const BUTTONS = registry.ENTRIES.map((e) => ({
37
60
  type: e.type,
@@ -39,7 +62,9 @@ export const BUTTONS = registry.ENTRIES.map((e) => ({
39
62
  metadata: e.module.metadata,
40
63
  schema: e.module.schema,
41
64
  config: e.config,
42
- runtime: e.runtime
65
+ runtime: e.runtime,
66
+ deprecated: e.deprecated,
67
+ ...e.deprecationNote !== void 0 ? { deprecationNote: e.deprecationNote } : {}
43
68
  }));
44
69
  export function allButtonSchemas(configure) {
45
70
  return BUTTONS.map((entry) => entry.schema(configure));
@@ -65,18 +90,21 @@ function stringifyCelResult(value) {
65
90
  return String(value);
66
91
  }
67
92
  const TOAST_STYLES = /* @__PURE__ */ new Set(["success", "error", "warning", "info"]);
68
- export function executeHttpRequest(expression, $cel, messageExpression, styleExpression) {
93
+ export function executeHttpRequest(expression, $cel, outcome = {}) {
94
+ const { messageExpression, resultExpression, channel, triggers } = outcome;
69
95
  const request = Effect.flatMap(
70
96
  $cel(expression),
71
97
  (builder) => builder.json()
72
98
  );
73
- if (messageExpression === void 0) return request;
74
99
  return Effect.flatMap(request, (body) => {
75
100
  const context = { json: body };
76
- const style = styleExpression === void 0 ? Effect.succeed("success") : Effect.map($cel(styleExpression, context), (s) => TOAST_STYLES.has(s) ? s : "success");
77
- return Effect.flatMap(
78
- Effect.all([$cel(messageExpression, context), style]),
79
- ([message, kind]) => Effect.sync(() => toast[kind](message))
80
- );
101
+ const result = resultExpression === void 0 ? Effect.succeed("success") : Effect.map($cel(resultExpression, context), (s) => TOAST_STYLES.has(s) ? s : "success");
102
+ return Effect.flatMap(result, (kind) => {
103
+ const toasted = messageExpression === void 0 ? Effect.void : Effect.flatMap(
104
+ $cel(messageExpression, context),
105
+ (message) => Effect.sync(() => toast[kind](message))
106
+ );
107
+ return Effect.andThen(toasted, dispatchTriggers(channel, triggers?.[kind]));
108
+ });
81
109
  });
82
110
  }
@@ -127,7 +127,7 @@ useHead({
127
127
  v-if="session.shell.title"
128
128
  #title
129
129
  >
130
- {{ session.shell.title }}
130
+ <Markdown :source="session.shell.title" />
131
131
  </template>
132
132
 
133
133
  <template
@@ -22,7 +22,7 @@ import {
22
22
  } from "../ui/input-group";
23
23
  import { Field, FieldLabel } from "../ui/field";
24
24
  import useInfinitePlane from "../../composables/useInfinitePlane";
25
- import { findFreePlacement } from "../../share/layout";
25
+ import { DEFAULT_GAP, findFreePlacement } from "../../share/layout";
26
26
  defineOptions({ name: "ShwfedBlockLayoutEditor" });
27
27
  const layouts = defineModel({ type: Array, ...{ required: true } });
28
28
  const activeIndex = defineModel("activeIndex", { type: Number, ...{ default: 0 } });
@@ -73,12 +73,11 @@ function emitAddNew(entry) {
73
73
  const itemNoun = computed(() => props.itemNoun ?? "\u5757");
74
74
  const CANVAS_STEP_PX = 24;
75
75
  const activeLayout = computed(() => layouts.value[activeIndex.value]);
76
- const GAP_DEFAULT = 4;
77
76
  const editorGaps = ref(/* @__PURE__ */ new Map());
78
77
  function getGap(i) {
79
78
  const cached = editorGaps.value.get(i);
80
79
  if (cached !== void 0) return cached;
81
- return layouts.value[i]?.layout.gap ?? GAP_DEFAULT;
80
+ return layouts.value[i]?.layout.gap ?? DEFAULT_GAP;
82
81
  }
83
82
  const activeGap = computed(() => getGap(activeIndex.value));
84
83
  const stepPx = computed(() => CANVAS_STEP_PX);
@@ -141,15 +140,16 @@ function writeTracks(i, nextPlacements) {
141
140
  if (x2 - 1 > cols) cols = x2 - 1;
142
141
  if (y2 - 1 > rows) rows = y2 - 1;
143
142
  }
144
- const nextLayout = {
145
- ...ls.layout,
146
- placements,
147
- columns: Math.max(1, cols),
148
- rows: Math.max(1, rows),
149
- ...gap > 0 ? { gap } : {}
143
+ return {
144
+ ...ls,
145
+ layout: {
146
+ ...ls.layout,
147
+ placements,
148
+ columns: Math.max(1, cols),
149
+ rows: Math.max(1, rows),
150
+ gap
151
+ }
150
152
  };
151
- if (gap === 0 && "gap" in nextLayout) delete nextLayout.gap;
152
- return { ...ls, layout: nextLayout };
153
153
  });
154
154
  }
155
155
  const isSpaceHeld = ref(false);
@@ -114,10 +114,6 @@ defineExpose({ addLayout });
114
114
  />
115
115
 
116
116
  <span class="flex-1 truncate">{{ ls.name || "\u672A\u547D\u540D\u5E03\u5C40" }}</span>
117
- <span
118
- v-if="ls.media"
119
- class="truncate text-xs tabular-nums text-zinc-400 group-hover:hidden"
120
- >{{ ls.media }}</span>
121
117
 
122
118
  <span
123
119
  class="ml-auto flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100"
@@ -30,6 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
30
30
  };
31
31
  readonly media?: string | undefined;
32
32
  }[];
33
+ readonly readonly?: string | undefined;
33
34
  };
34
35
  readonly type: "com.shwfed.block.form";
35
36
  readonly id: string;
@@ -58,6 +59,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
58
59
  };
59
60
  readonly media?: string | undefined;
60
61
  }[];
62
+ readonly readonly?: string | undefined;
61
63
  };
62
64
  readonly type: "com.shwfed.block.form";
63
65
  readonly id: string;
@@ -30,6 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
30
30
  };
31
31
  readonly media?: string | undefined;
32
32
  }[];
33
+ readonly readonly?: string | undefined;
33
34
  };
34
35
  readonly type: "com.shwfed.block.form";
35
36
  readonly id: string;
@@ -58,6 +59,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
58
59
  };
59
60
  readonly media?: string | undefined;
60
61
  }[];
62
+ readonly readonly?: string | undefined;
61
63
  };
62
64
  readonly type: "com.shwfed.block.form";
63
65
  readonly id: string;
@@ -32,6 +32,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
32
32
  };
33
33
  readonly media?: string | undefined;
34
34
  }[];
35
+ readonly readonly?: string | undefined;
35
36
  };
36
37
  readonly type: "com.shwfed.block.form";
37
38
  readonly id: string;
@@ -61,6 +62,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
61
62
  };
62
63
  readonly media?: string | undefined;
63
64
  }[];
65
+ readonly readonly?: string | undefined;
64
66
  };
65
67
  readonly type: "com.shwfed.block.form";
66
68
  readonly id: string;
@@ -32,6 +32,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
32
32
  };
33
33
  readonly media?: string | undefined;
34
34
  }[];
35
+ readonly readonly?: string | undefined;
35
36
  };
36
37
  readonly type: "com.shwfed.block.form";
37
38
  readonly id: string;
@@ -61,6 +62,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
61
62
  };
62
63
  readonly media?: string | undefined;
63
64
  }[];
65
+ readonly readonly?: string | undefined;
64
66
  };
65
67
  readonly type: "com.shwfed.block.form";
66
68
  readonly id: string;