@shwfed/config 2.3.29 → 2.4.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 (236) hide show
  1. package/dist/mcp.mjs +47 -9
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{config-Diuyh0Ex.js → config-BovRv7Mw.js} +1 -1
  4. package/dist/preview/assets/{config-rpX_Mc6I.js → config-ByTxMBcK.js} +1 -1
  5. package/dist/preview/assets/{config-DhsbcNzx.js → config-C7xYpB3N.js} +1 -1
  6. package/dist/preview/assets/{config-CZOeZ8ty.js → config-CH9wsYX8.js} +1 -1
  7. package/dist/preview/assets/{config-aK67Rsw5.js → config-Ch5dL5lp.js} +1 -1
  8. package/dist/preview/assets/{config-Bl80ye-i.js → config-D50Rl2n_.js} +1 -1
  9. package/dist/preview/assets/{config-BJzUh1_G.js → config-DiwVK32V.js} +1 -1
  10. package/dist/preview/assets/{config-6IiXCmyu.js → config-EKVeWrbS.js} +1 -1
  11. package/dist/preview/assets/{config-DaZD4ZSa.js → config-Q86AhjHq.js} +1 -1
  12. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-C_jU8d47.js → definition.vue_vue_type_script_setup_true_lang-D8NPPbjZ.js} +1 -1
  13. package/dist/preview/assets/index-65eB1l4r.css +1 -0
  14. package/dist/preview/assets/index-CIrlYN0M.js +1 -0
  15. package/dist/preview/assets/index-DUDlWaQI.js +661 -0
  16. package/dist/preview/assets/runtime-BP7zXnyG.js +1 -0
  17. package/dist/preview/assets/runtime-BQSwNpLC.js +1 -0
  18. package/dist/preview/assets/runtime-BwR_BbTu.js +1 -0
  19. package/dist/preview/assets/runtime-Ch3JIgUQ.js +1 -0
  20. package/dist/preview/assets/runtime-CjvZcU7X.js +1 -0
  21. package/dist/preview/assets/runtime-Cunk4vOs.js +1 -0
  22. package/dist/preview/assets/runtime-D34aQN00.js +1 -0
  23. package/dist/preview/assets/runtime-a9TOQRwD.js +1 -0
  24. package/dist/preview/assets/runtime-aPt-bW3F.js +1 -0
  25. package/dist/preview/index.html +2 -2
  26. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +7 -4
  27. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +6 -0
  28. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +2 -0
  29. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -0
  30. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +2 -0
  31. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +2 -0
  32. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +2 -0
  33. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -0
  34. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -0
  35. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -0
  36. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -0
  37. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +3 -0
  38. package/dist/runtime/components/form/ValidationRulesField.d.vue.ts +16 -0
  39. package/dist/runtime/components/form/ValidationRulesField.vue +207 -0
  40. package/dist/runtime/components/form/ValidationRulesField.vue.d.ts +16 -0
  41. package/dist/runtime/components/form/config.vue +32 -0
  42. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.d.vue.ts +24 -0
  43. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/config.vue.d.ts +24 -0
  44. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +18 -0
  45. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +24 -0
  46. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue +38 -0
  47. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +24 -0
  48. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/runtime.vue +18 -2
  49. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +18 -0
  50. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +24 -0
  51. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +38 -0
  52. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +24 -0
  53. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +18 -2
  54. package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +18 -0
  55. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.d.vue.ts +24 -0
  56. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/config.vue.d.ts +24 -0
  57. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +18 -0
  58. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  59. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  60. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  61. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +24 -0
  62. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue +38 -0
  63. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +24 -0
  64. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/runtime.vue +18 -2
  65. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +18 -0
  66. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +24 -0
  67. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +38 -0
  68. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +24 -0
  69. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +18 -2
  70. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +18 -0
  71. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +24 -0
  72. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue +38 -0
  73. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +24 -0
  74. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/runtime.vue +18 -2
  75. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +18 -0
  76. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +24 -0
  77. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +38 -0
  78. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +24 -0
  79. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +18 -2
  80. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +18 -0
  81. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.d.vue.ts +24 -0
  82. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue +38 -0
  83. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/config.vue.d.ts +24 -0
  84. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/runtime.vue +18 -2
  85. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +18 -0
  86. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +24 -0
  87. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +38 -0
  88. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +24 -0
  89. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +18 -2
  90. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +18 -0
  91. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +24 -0
  92. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue +38 -0
  93. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +24 -0
  94. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +18 -2
  95. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +18 -0
  96. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +24 -0
  97. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue +38 -0
  98. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +24 -0
  99. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +18 -2
  100. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +18 -0
  101. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.d.vue.ts +24 -0
  102. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue +38 -0
  103. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/config.vue.d.ts +24 -0
  104. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/runtime.vue +18 -2
  105. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +18 -0
  106. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  107. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  108. package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  109. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.d.vue.ts +24 -0
  110. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +38 -0
  111. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue.d.ts +24 -0
  112. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +18 -2
  113. package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +18 -0
  114. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +24 -0
  115. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue +38 -0
  116. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +24 -0
  117. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +18 -2
  118. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +18 -0
  119. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +24 -0
  120. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +38 -0
  121. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +24 -0
  122. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +18 -2
  123. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +30 -0
  124. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.d.vue.ts +24 -0
  125. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +38 -0
  126. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue.d.ts +24 -0
  127. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/runtime.vue +18 -2
  128. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +18 -0
  129. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.d.vue.ts +24 -0
  130. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +38 -0
  131. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue.d.ts +24 -0
  132. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/runtime.vue +18 -2
  133. package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +18 -0
  134. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +24 -0
  135. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue +51 -9
  136. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +24 -0
  137. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/runtime.vue +22 -2
  138. package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +18 -0
  139. package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/runtime.vue +26 -0
  140. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
  141. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
  142. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
  143. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +24 -0
  144. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue +38 -0
  145. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +24 -0
  146. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/runtime.vue +18 -2
  147. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +18 -0
  148. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +24 -0
  149. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue +38 -0
  150. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +24 -0
  151. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/runtime.vue +18 -2
  152. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +18 -0
  153. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
  154. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
  155. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
  156. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
  157. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
  158. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
  159. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
  160. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
  161. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
  162. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +24 -0
  163. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +38 -0
  164. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +24 -0
  165. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +18 -2
  166. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +18 -0
  167. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +24 -0
  168. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +38 -0
  169. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +24 -0
  170. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +18 -2
  171. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +18 -0
  172. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +24 -0
  173. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +38 -0
  174. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +24 -0
  175. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +18 -2
  176. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +18 -0
  177. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +24 -0
  178. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +38 -0
  179. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +24 -0
  180. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +18 -2
  181. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +18 -0
  182. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +24 -0
  183. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +38 -0
  184. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +24 -0
  185. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +18 -2
  186. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +18 -0
  187. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +24 -0
  188. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +38 -0
  189. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +24 -0
  190. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -2
  191. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +18 -0
  192. package/dist/runtime/components/form/index.d.vue.ts +1 -0
  193. package/dist/runtime/components/form/index.vue +16 -5
  194. package/dist/runtime/components/form/index.vue.d.ts +1 -0
  195. package/dist/runtime/components/form/schema.d.ts +4 -0
  196. package/dist/runtime/components/form/schema.js +6 -2
  197. package/dist/runtime/components/form/utils/common.d.ts +42 -0
  198. package/dist/runtime/components/form/utils/common.js +40 -2
  199. package/dist/runtime/components/form/utils/validation.d.ts +85 -0
  200. package/dist/runtime/components/form/utils/validation.js +113 -0
  201. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/config.vue +0 -22
  202. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/header.vue +3 -15
  203. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.d.ts +0 -1
  204. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.js +0 -4
  205. package/dist/runtime/components/table/config.d.vue.ts +4 -2
  206. package/dist/runtime/components/table/config.vue +59 -52
  207. package/dist/runtime/components/table/config.vue.d.ts +4 -2
  208. package/dist/runtime/components/table/schema.d.ts +4 -0
  209. package/dist/runtime/components/table/utils/shared.js +2 -2
  210. package/dist/runtime/components/ui/field/FieldError.vue +1 -1
  211. package/dist/runtime/components/ui/field/FieldMessages.d.vue.ts +9 -0
  212. package/dist/runtime/components/ui/field/FieldMessages.vue +21 -0
  213. package/dist/runtime/components/ui/field/FieldMessages.vue.d.ts +9 -0
  214. package/dist/runtime/components/ui/field/FieldWarning.d.vue.ts +20 -0
  215. package/dist/runtime/components/ui/field/FieldWarning.vue +51 -0
  216. package/dist/runtime/components/ui/field/FieldWarning.vue.d.ts +20 -0
  217. package/dist/runtime/components/ui/field/index.d.ts +2 -0
  218. package/dist/runtime/components/ui/field/index.js +10 -4
  219. package/dist/runtime/components/ui/locale/Locale.d.vue.ts +2 -0
  220. package/dist/runtime/components/ui/locale/Locale.vue +165 -155
  221. package/dist/runtime/components/ui/locale/Locale.vue.d.ts +2 -0
  222. package/dist/runtime/share/form-validate.d.ts +18 -0
  223. package/dist/runtime/share/form-validate.js +8 -0
  224. package/package.json +1 -1
  225. package/dist/preview/assets/index-2eQR4s3q.css +0 -1
  226. package/dist/preview/assets/index-DEF3_MKr.js +0 -659
  227. package/dist/preview/assets/index-Df-thth9.js +0 -1
  228. package/dist/preview/assets/runtime-3p1K6te5.js +0 -1
  229. package/dist/preview/assets/runtime-BcLnafic.js +0 -1
  230. package/dist/preview/assets/runtime-CSaV-359.js +0 -1
  231. package/dist/preview/assets/runtime-CjR8Vi5N.js +0 -1
  232. package/dist/preview/assets/runtime-D_fJCKX_.js +0 -1
  233. package/dist/preview/assets/runtime-DpeCgGEG.js +0 -1
  234. package/dist/preview/assets/runtime-K2a1x0TJ.js +0 -1
  235. package/dist/preview/assets/runtime-g9Zu3VNQ.js +0 -1
  236. package/dist/preview/assets/runtime-jTnh_6Dm.js +0 -1
@@ -0,0 +1,21 @@
1
+ <script setup>
2
+ import { cn } from "../../../utils/cn";
3
+ import FieldError from "./FieldError.vue";
4
+ import FieldWarning from "./FieldWarning.vue";
5
+ const props = defineProps({
6
+ class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
7
+ errors: { type: Array, required: false },
8
+ warnings: { type: Array, required: false }
9
+ });
10
+ </script>
11
+
12
+ <template>
13
+ <div
14
+ v-if="errors && errors.length || warnings && warnings.length"
15
+ data-slot="field-messages"
16
+ :class="cn('absolute left-0 top-full z-10 flex w-full flex-col gap-0.5', props.class)"
17
+ >
18
+ <FieldError :errors="errors ? [...errors] : void 0" />
19
+ <FieldWarning :errors="warnings ? [...warnings] : void 0" />
20
+ </div>
21
+ </template>
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ errors?: ReadonlyArray<string>;
5
+ warnings?: ReadonlyArray<string>;
6
+ };
7
+ 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>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ errors?: Array<string | {
5
+ message: string | undefined;
6
+ } | undefined>;
7
+ };
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_base: 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>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,51 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ import { cn } from "../../../utils/cn";
4
+ const props = defineProps({
5
+ class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
6
+ errors: { type: Array, required: false }
7
+ });
8
+ const content = computed(() => {
9
+ if (!props.errors || props.errors.length === 0)
10
+ return null;
11
+ const unique = [
12
+ ...new Map(
13
+ props.errors.filter(Boolean).map((error) => {
14
+ const message = typeof error === "string" ? error : error?.message;
15
+ return [message, error];
16
+ })
17
+ ).values()
18
+ ];
19
+ if (unique.length === 1 && unique[0]) {
20
+ return typeof unique[0] === "string" ? unique[0] : unique[0].message;
21
+ }
22
+ return unique.map((error) => typeof error === "string" ? error : error?.message);
23
+ });
24
+ </script>
25
+
26
+ <template>
27
+ <div
28
+ v-if="$slots.default || content"
29
+ role="status"
30
+ data-slot="field-warning"
31
+ :class="cn('max-w-full pt-0.25 text-amber-600 text-xs leading-tight font-normal', props.class)"
32
+ >
33
+ <slot v-if="$slots.default" />
34
+
35
+ <template v-else-if="typeof content === 'string'">
36
+ {{ content }}
37
+ </template>
38
+
39
+ <ul
40
+ v-else-if="Array.isArray(content)"
41
+ class="ml-3 flex list-disc flex-col gap-0.5"
42
+ >
43
+ <li
44
+ v-for="(warning, index) in content"
45
+ :key="index"
46
+ >
47
+ {{ warning }}
48
+ </li>
49
+ </ul>
50
+ </div>
51
+ </template>
@@ -0,0 +1,20 @@
1
+ import type { HTMLAttributes } from 'vue';
2
+ type __VLS_Props = {
3
+ class?: HTMLAttributes['class'];
4
+ errors?: Array<string | {
5
+ message: string | undefined;
6
+ } | undefined>;
7
+ };
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_base: 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>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -10,6 +10,8 @@ export { default as FieldError } from './FieldError.vue.js';
10
10
  export { default as FieldGroup } from './FieldGroup.vue.js';
11
11
  export { default as FieldLabel } from './FieldLabel.vue.js';
12
12
  export { default as FieldLegend } from './FieldLegend.vue.js';
13
+ export { default as FieldMessages } from './FieldMessages.vue.js';
13
14
  export { default as FieldSeparator } from './FieldSeparator.vue.js';
15
+ export { default as FieldWarning } from './FieldWarning.vue.js';
14
16
  export { default as FieldSet } from './FieldSet.vue.js';
15
17
  export { default as FieldTitle } from './FieldTitle.vue.js';
@@ -1,6 +1,6 @@
1
1
  import { cva } from "class-variance-authority";
2
2
  export const fieldVariants = cva(
3
- "group/field flex w-full gap-2 data-[invalid=true]:text-red-400",
3
+ "group/field relative flex w-full gap-2 data-[invalid=true]:text-red-400",
4
4
  {
5
5
  variants: {
6
6
  orientation: {
@@ -25,11 +25,15 @@ export const fieldVariants = cva(
25
25
  "**:data-[slot=field-label]:px-1",
26
26
  "**:data-[slot=field-label]:text-sm",
27
27
  "has-data-[value=true]:**:data-[slot=field-label]:text-[0.625rem]",
28
- "has-[[data-slot=input-group-control]:focus]:**:data-[slot=field-label]:top-0",
28
+ // Float on focus via `focus-within`, NOT `[data-slot=input-group-control]:focus`:
29
+ // `InputGroupInput`/`InputGroupTextarea` forward that slot to `Input`/`Textarea`,
30
+ // which hard-code `data-slot=input`/`textarea` on the focusable element, so the
31
+ // forwarded slot never lands there and the focus selector would never match.
32
+ "focus-within:**:data-[slot=field-label]:top-0",
29
33
  "has-data-[state=open]:**:data-[slot=field-label]:top-0",
30
- "has-[[data-slot=input-group-control]:focus]:**:data-[slot=field-label]:text-[0.625rem]",
34
+ "focus-within:**:data-[slot=field-label]:text-[0.625rem]",
31
35
  "has-data-[state=open]:**:data-[slot=field-label]:text-[0.625rem]",
32
- "has-[[data-slot=input-group-control]:focus]:**:data-[slot=field-label]:text-zinc-700",
36
+ "focus-within:**:data-[slot=field-label]:text-zinc-700",
33
37
  "has-data-[state=open]:**:data-[slot=field-label]:text-zinc-700",
34
38
  "has-data-[value=true]:**:data-[slot=field-label]:text-zinc-700",
35
39
  "data-[disabled=true]:**:data-[slot=field-label]:text-zinc-400",
@@ -61,6 +65,8 @@ export { default as FieldError } from "./FieldError.vue";
61
65
  export { default as FieldGroup } from "./FieldGroup.vue";
62
66
  export { default as FieldLabel } from "./FieldLabel.vue";
63
67
  export { default as FieldLegend } from "./FieldLegend.vue";
68
+ export { default as FieldMessages } from "./FieldMessages.vue";
64
69
  export { default as FieldSeparator } from "./FieldSeparator.vue";
70
+ export { default as FieldWarning } from "./FieldWarning.vue";
65
71
  export { default as FieldSet } from "./FieldSet.vue";
66
72
  export { default as FieldTitle } from "./FieldTitle.vue";
@@ -5,6 +5,8 @@ type __VLS_Props = {
5
5
  class?: HTMLAttributes['class'];
6
6
  multiline?: boolean;
7
7
  markdown?: boolean;
8
+ floating?: boolean;
9
+ placeholder?: string;
8
10
  translateHint?: string;
9
11
  };
10
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -7,6 +7,7 @@ import { useTranslateLocale } from "../../../composables/useTranslateLocale";
7
7
  import { cn } from "../../../utils/cn";
8
8
  import { Button } from "../button";
9
9
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../dropdown-menu";
10
+ import { Field, FieldLabel } from "../field";
10
11
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupTextarea } from "../input-group";
11
12
  const supportedLocales = ["zh", "ja", "en", "ko"];
12
13
  defineOptions({
@@ -18,6 +19,8 @@ const props = defineProps({
18
19
  class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
19
20
  multiline: { type: Boolean, required: false },
20
21
  markdown: { type: Boolean, required: false },
22
+ floating: { type: Boolean, required: false },
23
+ placeholder: { type: String, required: false },
21
24
  translateHint: { type: String, required: false }
22
25
  });
23
26
  const emits = defineEmits(["update:modelValue"]);
@@ -136,32 +139,123 @@ async function onAiTranslate(locale) {
136
139
  data-slot="locale"
137
140
  :class="cn('flex flex-col gap-2', props.class)"
138
141
  >
139
- <InputGroup
142
+ <Field
140
143
  v-for="(item, index) in locales"
141
144
  :key="item.locale"
142
- data-slot="locale-row"
143
- :data-locale="item.locale"
145
+ :orientation="props.floating ? 'floating' : 'contents'"
144
146
  >
145
- <InputGroupAddon
146
- v-if="props.multiline"
147
- align="block-start"
148
- class="border-b border-zinc-200"
147
+ <FieldLabel v-if="props.floating">
148
+ {{ localeLabel(item.locale) }}
149
+ </FieldLabel>
150
+ <InputGroup
151
+ data-slot="locale-row"
152
+ :data-locale="item.locale"
149
153
  >
150
- <div class="flex w-full items-center justify-between gap-3">
154
+ <InputGroupAddon
155
+ v-if="props.multiline"
156
+ align="block-start"
157
+ class="border-b border-zinc-200"
158
+ >
159
+ <div class="flex w-full items-center justify-between gap-3">
160
+ <DropdownMenu v-if="item.locale !== 'zh' && availableLocales(index).length > 0">
161
+ <DropdownMenuTrigger as-child>
162
+ <InputGroupButton
163
+ size="sm"
164
+ as-child
165
+ >
166
+ <button
167
+ type="button"
168
+ data-slot="locale-trigger"
169
+ class="text-zinc-500 transition-colors hover:text-zinc-700"
170
+ :aria-label="`\u9009\u62E9\u8BED\u8A00\uFF1A${localeLabel(item.locale)}`"
171
+ >
172
+ <Icon :icon="localeIcon(item.locale)" />
173
+ <span>{{ localeLabel(item.locale) }}</span>
174
+ </button>
175
+ </InputGroupButton>
176
+ </DropdownMenuTrigger>
177
+ <DropdownMenuContent align="start">
178
+ <DropdownMenuItem
179
+ v-for="locale in availableLocales(index)"
180
+ :key="locale"
181
+ data-slot="locale-option"
182
+ :data-locale-option="locale"
183
+ @select="updateLocale(index, locale)"
184
+ >
185
+ <Icon :icon="localeIcon(locale)" />
186
+ <span>{{ localeLabel(locale) }}</span>
187
+ </DropdownMenuItem>
188
+ </DropdownMenuContent>
189
+ </DropdownMenu>
190
+
191
+ <span
192
+ v-else
193
+ data-slot="locale-icon"
194
+ class="flex items-center gap-2 text-zinc-500"
195
+ >
196
+ <Icon :icon="localeIcon(item.locale)" />
197
+ <span>{{ localeLabel(item.locale) }}</span>
198
+ </span>
199
+
200
+ <div class="flex items-center gap-2">
201
+ <Icon
202
+ v-if="props.markdown"
203
+ data-slot="locale-markdown-indicator"
204
+ icon="fluent:markdown-20-regular"
205
+ class="text-purple-600"
206
+ aria-label="支持 Markdown"
207
+ />
208
+ <InputGroupButton
209
+ v-if="canAiTranslate(item.locale) || isAiTranslating(item.locale)"
210
+ size="icon-xs"
211
+ as-child
212
+ >
213
+ <button
214
+ type="button"
215
+ data-slot="locale-translate"
216
+ :disabled="isAiTranslating(item.locale) || !canAiTranslate(item.locale)"
217
+ :aria-label="`AI \u7FFB\u8BD1\uFF1A${localeLabel(item.locale)}`"
218
+ @click="onAiTranslate(item.locale)"
219
+ >
220
+ <Icon
221
+ :icon="isAiTranslating(item.locale) ? 'fluent:arrow-sync-20-regular' : 'fluent:magic-wand-20-regular'"
222
+ :class="isAiTranslating(item.locale) ? 'animate-spin' : ''"
223
+ />
224
+ </button>
225
+ </InputGroupButton>
226
+ <InputGroupButton
227
+ variant="destructive"
228
+ size="icon-xs"
229
+ as-child
230
+ >
231
+ <button
232
+ type="button"
233
+ data-slot="locale-delete"
234
+ :disabled="item.locale === 'zh'"
235
+ :aria-label="`\u5220\u9664\u8BED\u8A00\uFF1A${localeLabel(item.locale)}`"
236
+ @click="removeLocale(index)"
237
+ >
238
+ <Icon icon="fluent:delete-20-regular" />
239
+ </button>
240
+ </InputGroupButton>
241
+ </div>
242
+ </div>
243
+ </InputGroupAddon>
244
+
245
+ <InputGroupAddon v-else>
151
246
  <DropdownMenu v-if="item.locale !== 'zh' && availableLocales(index).length > 0">
152
247
  <DropdownMenuTrigger as-child>
153
248
  <InputGroupButton
154
- size="sm"
249
+ size="icon-sm"
155
250
  as-child
156
251
  >
157
252
  <button
158
253
  type="button"
159
254
  data-slot="locale-trigger"
160
- class="text-zinc-500 transition-colors hover:text-zinc-700"
255
+ class="text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5"
161
256
  :aria-label="`\u9009\u62E9\u8BED\u8A00\uFF1A${localeLabel(item.locale)}`"
162
257
  >
163
258
  <Icon :icon="localeIcon(item.locale)" />
164
- <span>{{ localeLabel(item.locale) }}</span>
165
259
  </button>
166
260
  </InputGroupButton>
167
261
  </DropdownMenuTrigger>
@@ -178,163 +272,79 @@ async function onAiTranslate(locale) {
178
272
  </DropdownMenuItem>
179
273
  </DropdownMenuContent>
180
274
  </DropdownMenu>
181
-
182
275
  <span
183
276
  v-else
184
277
  data-slot="locale-icon"
185
- class="flex items-center gap-2 text-zinc-500"
278
+ class="-ml-[0.45rem] flex size-8 items-center justify-center text-zinc-500"
186
279
  >
187
280
  <Icon :icon="localeIcon(item.locale)" />
188
- <span>{{ localeLabel(item.locale) }}</span>
189
281
  </span>
282
+ </InputGroupAddon>
190
283
 
191
- <div class="flex items-center gap-2">
192
- <Icon
193
- v-if="props.markdown"
194
- data-slot="locale-markdown-indicator"
195
- icon="fluent:markdown-20-regular"
196
- class="text-purple-600"
197
- aria-label="支持 Markdown"
198
- />
199
- <InputGroupButton
200
- v-if="canAiTranslate(item.locale) || isAiTranslating(item.locale)"
201
- size="icon-xs"
202
- as-child
203
- >
204
- <button
205
- type="button"
206
- data-slot="locale-translate"
207
- :disabled="isAiTranslating(item.locale) || !canAiTranslate(item.locale)"
208
- :aria-label="`AI \u7FFB\u8BD1\uFF1A${localeLabel(item.locale)}`"
209
- @click="onAiTranslate(item.locale)"
210
- >
211
- <Icon
212
- :icon="isAiTranslating(item.locale) ? 'fluent:arrow-sync-20-regular' : 'fluent:magic-wand-20-regular'"
213
- :class="isAiTranslating(item.locale) ? 'animate-spin' : ''"
214
- />
215
- </button>
216
- </InputGroupButton>
217
- <InputGroupButton
218
- variant="destructive"
219
- size="icon-xs"
220
- as-child
221
- >
222
- <button
223
- type="button"
224
- data-slot="locale-delete"
225
- :disabled="item.locale === 'zh'"
226
- :aria-label="`\u5220\u9664\u8BED\u8A00\uFF1A${localeLabel(item.locale)}`"
227
- @click="removeLocale(index)"
228
- >
229
- <Icon icon="fluent:delete-20-regular" />
230
- </button>
231
- </InputGroupButton>
232
- </div>
233
- </div>
234
- </InputGroupAddon>
284
+ <InputGroupInput
285
+ v-if="!props.multiline"
286
+ data-slot="locale-input"
287
+ :model-value="item.message"
288
+ :placeholder="props.placeholder ?? (props.floating ? '' : localeLabel(item.locale))"
289
+ @update:model-value="handleMessageUpdate(index, $event)"
290
+ />
235
291
 
236
- <InputGroupAddon v-else>
237
- <DropdownMenu v-if="item.locale !== 'zh' && availableLocales(index).length > 0">
238
- <DropdownMenuTrigger as-child>
239
- <InputGroupButton
240
- size="icon-sm"
241
- as-child
242
- >
243
- <button
244
- type="button"
245
- data-slot="locale-trigger"
246
- class="text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5"
247
- :aria-label="`\u9009\u62E9\u8BED\u8A00\uFF1A${localeLabel(item.locale)}`"
248
- >
249
- <Icon :icon="localeIcon(item.locale)" />
250
- </button>
251
- </InputGroupButton>
252
- </DropdownMenuTrigger>
253
- <DropdownMenuContent align="start">
254
- <DropdownMenuItem
255
- v-for="locale in availableLocales(index)"
256
- :key="locale"
257
- data-slot="locale-option"
258
- :data-locale-option="locale"
259
- @select="updateLocale(index, locale)"
260
- >
261
- <Icon :icon="localeIcon(locale)" />
262
- <span>{{ localeLabel(locale) }}</span>
263
- </DropdownMenuItem>
264
- </DropdownMenuContent>
265
- </DropdownMenu>
266
- <span
292
+ <InputGroupTextarea
267
293
  v-else
268
- data-slot="locale-icon"
269
- class="-ml-[0.45rem] flex size-8 items-center justify-center text-zinc-500"
270
- >
271
- <Icon :icon="localeIcon(item.locale)" />
272
- </span>
273
- </InputGroupAddon>
274
-
275
- <InputGroupInput
276
- v-if="!props.multiline"
277
- data-slot="locale-input"
278
- :model-value="item.message"
279
- :placeholder="localeLabel(item.locale)"
280
- @update:model-value="handleMessageUpdate(index, $event)"
281
- />
282
-
283
- <InputGroupTextarea
284
- v-else
285
- data-slot="locale-textarea"
286
- class="min-h-32"
287
- :model-value="item.message"
288
- :placeholder="localeLabel(item.locale)"
289
- @update:model-value="handleMessageUpdate(index, $event)"
290
- />
291
-
292
- <InputGroupAddon
293
- v-if="!props.multiline"
294
- align="inline-end"
295
- >
296
- <Icon
297
- v-if="props.markdown"
298
- data-slot="locale-markdown-indicator"
299
- icon="fluent:markdown-20-regular"
300
- class="text-purple-600"
301
- aria-label="支持 Markdown"
294
+ data-slot="locale-textarea"
295
+ class="min-h-32"
296
+ :model-value="item.message"
297
+ :placeholder="props.placeholder ?? (props.floating ? '' : localeLabel(item.locale))"
298
+ @update:model-value="handleMessageUpdate(index, $event)"
302
299
  />
303
- <InputGroupButton
304
- v-if="canAiTranslate(item.locale) || isAiTranslating(item.locale)"
305
- size="icon-xs"
306
- as-child
300
+
301
+ <InputGroupAddon
302
+ v-if="!props.multiline"
303
+ align="inline-end"
307
304
  >
308
- <button
309
- type="button"
310
- data-slot="locale-translate"
311
- :disabled="isAiTranslating(item.locale) || !canAiTranslate(item.locale)"
312
- :aria-label="`AI \u7FFB\u8BD1\uFF1A${localeLabel(item.locale)}`"
313
- @click="onAiTranslate(item.locale)"
305
+ <Icon
306
+ v-if="props.markdown"
307
+ data-slot="locale-markdown-indicator"
308
+ icon="fluent:markdown-20-regular"
309
+ class="text-purple-600"
310
+ aria-label="支持 Markdown"
311
+ />
312
+ <InputGroupButton
313
+ v-if="canAiTranslate(item.locale) || isAiTranslating(item.locale)"
314
+ size="icon-xs"
315
+ as-child
314
316
  >
315
- <Icon
316
- :icon="isAiTranslating(item.locale) ? 'fluent:arrow-sync-20-regular' : 'fluent:magic-wand-20-regular'"
317
- :class="isAiTranslating(item.locale) ? 'animate-spin' : ''"
318
- />
319
- </button>
320
- </InputGroupButton>
321
- <InputGroupButton
322
- variant="destructive"
323
- size="icon-xs"
324
- as-child
325
- >
326
- <button
327
- type="button"
328
- data-slot="locale-delete"
329
- :disabled="item.locale === 'zh'"
330
- :aria-label="`\u5220\u9664\u8BED\u8A00\uFF1A${localeLabel(item.locale)}`"
331
- @click="removeLocale(index)"
317
+ <button
318
+ type="button"
319
+ data-slot="locale-translate"
320
+ :disabled="isAiTranslating(item.locale) || !canAiTranslate(item.locale)"
321
+ :aria-label="`AI \u7FFB\u8BD1\uFF1A${localeLabel(item.locale)}`"
322
+ @click="onAiTranslate(item.locale)"
323
+ >
324
+ <Icon
325
+ :icon="isAiTranslating(item.locale) ? 'fluent:arrow-sync-20-regular' : 'fluent:magic-wand-20-regular'"
326
+ :class="isAiTranslating(item.locale) ? 'animate-spin' : ''"
327
+ />
328
+ </button>
329
+ </InputGroupButton>
330
+ <InputGroupButton
331
+ variant="destructive"
332
+ size="icon-xs"
333
+ as-child
332
334
  >
333
- <Icon icon="fluent:delete-20-regular" />
334
- </button>
335
- </InputGroupButton>
336
- </InputGroupAddon>
337
- </InputGroup>
335
+ <button
336
+ type="button"
337
+ data-slot="locale-delete"
338
+ :disabled="item.locale === 'zh'"
339
+ :aria-label="`\u5220\u9664\u8BED\u8A00\uFF1A${localeLabel(item.locale)}`"
340
+ @click="removeLocale(index)"
341
+ >
342
+ <Icon icon="fluent:delete-20-regular" />
343
+ </button>
344
+ </InputGroupButton>
345
+ </InputGroupAddon>
346
+ </InputGroup>
347
+ </Field>
338
348
 
339
349
  <Button
340
350
  type="button"
@@ -5,6 +5,8 @@ type __VLS_Props = {
5
5
  class?: HTMLAttributes['class'];
6
6
  multiline?: boolean;
7
7
  markdown?: boolean;
8
+ floating?: boolean;
9
+ placeholder?: string;
8
10
  translateHint?: string;
9
11
  };
10
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -0,0 +1,18 @@
1
+ import { type InjectionKey } from 'vue';
2
+ /**
3
+ * A form-scoped "validate me" callback. Resolves `true` when the enclosing
4
+ * `<Form>` has no `error`-severity validation results (and reveals the errors
5
+ * on the way out either way).
6
+ *
7
+ * Lives in `share/` — the neutral ground for host↔button contracts, alongside
8
+ * `event-bus` — so a host-agnostic action button can run pre-submit validation
9
+ * without importing the form module. The form host provides the callback; a
10
+ * submit-style button injects it and always validates before firing. This is
11
+ * the transitional seam: the final design dispatches a fallible `validate`
12
+ * operation over the event bus instead, at which point this key retires.
13
+ */
14
+ export type FormValidate = () => Promise<boolean>;
15
+ export declare const FORM_VALIDATE_KEY: InjectionKey<FormValidate>;
16
+ export declare function provideFormValidate(validate: FormValidate): void;
17
+ /** Inject the enclosing form's validate callback, or `undefined` outside a form. */
18
+ export declare function useFormValidate(): FormValidate | undefined;
@@ -0,0 +1,8 @@
1
+ import { inject, provide } from "vue";
2
+ export const FORM_VALIDATE_KEY = Symbol("shwfed/form-validate");
3
+ export function provideFormValidate(validate) {
4
+ provide(FORM_VALIDATE_KEY, validate);
5
+ }
6
+ export function useFormValidate() {
7
+ return inject(FORM_VALIDATE_KEY, void 0);
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "2.3.29",
3
+ "version": "2.4.1",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {