@shwfed/config 2.9.4 → 2.9.6

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 (153) hide show
  1. package/dist/mcp.mjs +558 -102
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -0
  4. package/dist/preview/assets/FieldGroup.vue_vue_type_script_setup_true_lang-B-Cwm94m.js +1 -0
  5. package/dist/preview/assets/badge-nn3uvUrR.js +1 -0
  6. package/dist/preview/assets/config-BNQXbhtM.js +1 -0
  7. package/dist/preview/assets/config-Bg95dd9K.js +1 -0
  8. package/dist/preview/assets/config-C6LousLT.js +1 -0
  9. package/dist/preview/assets/config-CGhV-PCy.js +1 -0
  10. package/dist/preview/assets/config-CUkEZF8G.js +1 -0
  11. package/dist/preview/assets/config-DO77XC7j.js +1 -0
  12. package/dist/preview/assets/config-DbjXscRV.js +1 -0
  13. package/dist/preview/assets/config-DiD-8mMw.js +1 -0
  14. package/dist/preview/assets/config-Dvq_Xh7I.js +1 -0
  15. package/dist/preview/assets/config-d8ZhbBPg.js +1 -0
  16. package/dist/preview/assets/config-e8Li9jh4.js +1 -0
  17. package/dist/preview/assets/definition.vue_vue_type_script_setup_true_lang-DuO-EwWA.js +1 -0
  18. package/dist/preview/assets/{index-cyMSopN_.js → index-Bpap7h0Q.js} +217 -186
  19. package/dist/preview/assets/{index-CHkjJPVP.js → index-DZyYLnIs.js} +1 -1
  20. package/dist/preview/assets/index-jHSCIEVi.js +1 -0
  21. package/dist/preview/assets/index-vPcvbp7e.css +1 -0
  22. package/dist/preview/assets/item-BqnYkxMr.js +1 -0
  23. package/dist/preview/assets/{runtime-Dy1bI4VO.js → runtime-BFAxoqEC.js} +1 -1
  24. package/dist/preview/assets/runtime-BntIEgRD.js +1 -0
  25. package/dist/preview/assets/{runtime-lZLYBBgn.js → runtime-Bu6BEaxq.js} +1 -1
  26. package/dist/preview/assets/runtime-CfdnDil3.js +1 -0
  27. package/dist/preview/assets/runtime-CqoGHW0U.js +1 -0
  28. package/dist/preview/assets/runtime-D6blej8e.js +1 -0
  29. package/dist/preview/assets/runtime-DEsY0ihh.js +1 -0
  30. package/dist/preview/assets/runtime-DrnADq2i.js +1 -0
  31. package/dist/preview/assets/runtime-JW4LSnRF.js +1 -0
  32. package/dist/preview/assets/runtime-U7gyBbWI.js +1 -0
  33. package/dist/preview/index.html +2 -2
  34. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +20 -0
  35. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +20 -0
  36. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.d.ts +22 -0
  37. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.js +33 -1
  38. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +20 -0
  39. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +20 -0
  40. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +10 -0
  41. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.d.vue.ts +4 -0
  42. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.vue.d.ts +4 -0
  43. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.d.ts +2 -0
  44. package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/config.d.vue.ts +16 -0
  45. package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/config.vue.d.ts +16 -0
  46. package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.d.ts +8 -0
  47. package/dist/runtime/components/actions/buttons/2026-05-24/com.shwfed.actions.button.state.write/config.d.vue.ts +4 -0
  48. package/dist/runtime/components/actions/buttons/2026-05-24/com.shwfed.actions.button.state.write/config.vue.d.ts +4 -0
  49. package/dist/runtime/components/actions/buttons/2026-05-24/com.shwfed.actions.button.state.write/schema.d.ts +2 -0
  50. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.d.vue.ts +51 -0
  51. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.vue +201 -0
  52. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.vue.d.ts +51 -0
  53. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/runtime.d.vue.ts +8 -0
  54. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/runtime.vue +37 -0
  55. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/runtime.vue.d.ts +8 -0
  56. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/schema.d.ts +30 -0
  57. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/schema.js +87 -0
  58. package/dist/runtime/components/actions/components/triggers-field.d.vue.ts +4 -0
  59. package/dist/runtime/components/actions/components/triggers-field.vue +65 -7
  60. package/dist/runtime/components/actions/components/triggers-field.vue.d.ts +4 -0
  61. package/dist/runtime/components/actions/config.vue +68 -1
  62. package/dist/runtime/components/actions/utils/resolve.d.ts +85 -2
  63. package/dist/runtime/components/actions/utils/resolve.js +122 -21
  64. package/dist/runtime/components/app.vue +59 -4
  65. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -2
  66. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -2
  67. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -2
  68. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -2
  69. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +1 -1
  70. package/dist/runtime/components/config/index.vue +9 -2
  71. package/dist/runtime/components/config/schema.d.ts +6 -10
  72. package/dist/runtime/components/config/schema.js +12 -2
  73. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +2 -2
  74. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +2 -2
  75. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +2 -2
  76. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +2 -2
  77. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +2 -2
  78. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +2 -2
  79. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +1 -1
  80. package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/config.d.vue.ts +31 -0
  81. package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/config.vue +89 -0
  82. package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/config.vue.d.ts +31 -0
  83. package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/runtime.d.ts +2 -0
  84. package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/runtime.js +14 -0
  85. package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/schema.d.ts +21 -0
  86. package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/schema.js +36 -0
  87. package/dist/runtime/components/operations/utils/resolve.d.ts +48 -0
  88. package/dist/runtime/components/operations/utils/resolve.js +76 -0
  89. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +2 -0
  90. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +2 -0
  91. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +4 -0
  92. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +4 -0
  93. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +2 -0
  94. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +4 -0
  95. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +4 -0
  96. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +2 -0
  97. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +4 -0
  98. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +4 -0
  99. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +2 -0
  100. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +4 -0
  101. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +4 -0
  102. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +2 -0
  103. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +4 -0
  104. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +4 -0
  105. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +2 -0
  106. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +4 -0
  107. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +4 -0
  108. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +2 -0
  109. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +4 -0
  110. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +4 -0
  111. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +4 -0
  112. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +4 -0
  113. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +4 -0
  114. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +4 -0
  115. package/dist/runtime/components/table/schema.d.ts +2 -2
  116. package/dist/runtime/components/ui/progress/Progress.d.vue.ts +11 -0
  117. package/dist/runtime/components/ui/progress/Progress.vue +32 -0
  118. package/dist/runtime/components/ui/progress/Progress.vue.d.ts +11 -0
  119. package/dist/runtime/components/ui/progress/index.d.ts +1 -0
  120. package/dist/runtime/components/ui/progress/index.js +1 -0
  121. package/dist/runtime/composables/useOverlay.d.ts +35 -0
  122. package/dist/runtime/composables/useOverlay.js +52 -0
  123. package/dist/runtime/share/event-bus.d.ts +24 -2
  124. package/dist/runtime/share/event-bus.js +21 -3
  125. package/dist/runtime/share/interpolate.d.ts +12 -0
  126. package/dist/runtime/share/interpolate.js +18 -0
  127. package/dist/runtime/share/page-target.d.ts +16 -0
  128. package/dist/runtime/share/page-target.js +1 -0
  129. package/dist/runtime/share/schema-meta.d.ts +5 -0
  130. package/dist/runtime/share/schema-meta.js +48 -0
  131. package/dist/runtime/style.css +1 -1
  132. package/package.json +1 -1
  133. package/dist/preview/assets/badge-Nmf0QGvo.js +0 -1
  134. package/dist/preview/assets/config-BuBQPlju.js +0 -1
  135. package/dist/preview/assets/config-CBxDLjqQ.js +0 -1
  136. package/dist/preview/assets/config-CSU0Tuu4.js +0 -1
  137. package/dist/preview/assets/config-Cnu3ZCPF.js +0 -1
  138. package/dist/preview/assets/config-CzBP2y8L.js +0 -1
  139. package/dist/preview/assets/config-nczxdERQ.js +0 -1
  140. package/dist/preview/assets/config-qCPGn6mB.js +0 -1
  141. package/dist/preview/assets/config-vHYVnzyt.js +0 -1
  142. package/dist/preview/assets/config-w2mvI_4h.js +0 -1
  143. package/dist/preview/assets/definition.vue_vue_type_script_setup_true_lang-DqE0YNVF.js +0 -1
  144. package/dist/preview/assets/index-BgvMBKzp.js +0 -1
  145. package/dist/preview/assets/index-COSjWreD.css +0 -1
  146. package/dist/preview/assets/item-DAL4Ui_l.js +0 -1
  147. package/dist/preview/assets/runtime-BcsMOkA2.js +0 -1
  148. package/dist/preview/assets/runtime-BzwoxDCd.js +0 -1
  149. package/dist/preview/assets/runtime-Cu2DKoI0.js +0 -1
  150. package/dist/preview/assets/runtime-Dp0JEFtU.js +0 -1
  151. package/dist/preview/assets/runtime-YE1oXXQN.js +0 -1
  152. package/dist/preview/assets/runtime-YRSxexBQ.js +0 -1
  153. package/dist/preview/assets/runtime-uwt0BxpS.js +0 -1
package/dist/mcp.mjs CHANGED
@@ -11957,10 +11957,10 @@ class Protocol {
11957
11957
  }
11958
11958
  let taskId;
11959
11959
  try {
11960
- const createResult = await this.request(request, CreateTaskResultSchema, options);
11961
- if (createResult.task) {
11962
- taskId = createResult.task.taskId;
11963
- yield { type: "taskCreated", task: createResult.task };
11960
+ const createResult2 = await this.request(request, CreateTaskResultSchema, options);
11961
+ if (createResult2.task) {
11962
+ taskId = createResult2.task.taskId;
11963
+ yield { type: "taskCreated", task: createResult2.task };
11964
11964
  } else {
11965
11965
  throw new McpError(ErrorCode.InternalError, "Task creation did not return a task");
11966
11966
  }
@@ -15509,14 +15509,14 @@ function requireCompile() {
15509
15509
  }
15510
15510
  const $id$1 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#";
15511
15511
  const description = "Meta-schema for $data reference (JSON AnySchema extension proposal)";
15512
- const type$1j = "object";
15512
+ const type$1l = "object";
15513
15513
  const required$1 = ["$data"];
15514
15514
  const properties$2 = { "$data": { "type": "string", "anyOf": [{ "format": "relative-json-pointer" }, { "format": "json-pointer" }] } };
15515
15515
  const additionalProperties$1 = false;
15516
15516
  const require$$9 = {
15517
15517
  $id: $id$1,
15518
15518
  description,
15519
- type: type$1j,
15519
+ type: type$1l,
15520
15520
  required: required$1,
15521
15521
  properties: properties$2,
15522
15522
  additionalProperties: additionalProperties$1
@@ -18516,14 +18516,14 @@ function requireFormat() {
18516
18516
  format$7.default = format2;
18517
18517
  return format$7;
18518
18518
  }
18519
- var metadata$1i = {};
18519
+ var metadata$1j = {};
18520
18520
  var hasRequiredMetadata;
18521
18521
  function requireMetadata() {
18522
- if (hasRequiredMetadata) return metadata$1i;
18522
+ if (hasRequiredMetadata) return metadata$1j;
18523
18523
  hasRequiredMetadata = 1;
18524
- Object.defineProperty(metadata$1i, "__esModule", { value: true });
18525
- metadata$1i.contentVocabulary = metadata$1i.metadataVocabulary = void 0;
18526
- metadata$1i.metadataVocabulary = [
18524
+ Object.defineProperty(metadata$1j, "__esModule", { value: true });
18525
+ metadata$1j.contentVocabulary = metadata$1j.metadataVocabulary = void 0;
18526
+ metadata$1j.metadataVocabulary = [
18527
18527
  "title",
18528
18528
  "description",
18529
18529
  "default",
@@ -18532,12 +18532,12 @@ function requireMetadata() {
18532
18532
  "writeOnly",
18533
18533
  "examples"
18534
18534
  ];
18535
- metadata$1i.contentVocabulary = [
18535
+ metadata$1j.contentVocabulary = [
18536
18536
  "contentMediaType",
18537
18537
  "contentEncoding",
18538
18538
  "contentSchema"
18539
18539
  ];
18540
- return metadata$1i;
18540
+ return metadata$1j;
18541
18541
  }
18542
18542
  var hasRequiredDraft7;
18543
18543
  function requireDraft7() {
@@ -18683,14 +18683,14 @@ const $schema = "http://json-schema.org/draft-07/schema#";
18683
18683
  const $id = "http://json-schema.org/draft-07/schema#";
18684
18684
  const title = "Core schema meta-schema";
18685
18685
  const definitions = { "schemaArray": { "type": "array", "minItems": 1, "items": { "$ref": "#" } }, "nonNegativeInteger": { "type": "integer", "minimum": 0 }, "nonNegativeIntegerDefault0": { "allOf": [{ "$ref": "#/definitions/nonNegativeInteger" }, { "default": 0 }] }, "simpleTypes": { "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] }, "stringArray": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "default": [] } };
18686
- const type$1i = ["object", "boolean"];
18686
+ const type$1k = ["object", "boolean"];
18687
18687
  const properties = { "$id": { "type": "string", "format": "uri-reference" }, "$schema": { "type": "string", "format": "uri" }, "$ref": { "type": "string", "format": "uri-reference" }, "$comment": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "default": true, "readOnly": { "type": "boolean", "default": false }, "examples": { "type": "array", "items": true }, "multipleOf": { "type": "number", "exclusiveMinimum": 0 }, "maximum": { "type": "number" }, "exclusiveMaximum": { "type": "number" }, "minimum": { "type": "number" }, "exclusiveMinimum": { "type": "number" }, "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "pattern": { "type": "string", "format": "regex" }, "additionalItems": { "$ref": "#" }, "items": { "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/schemaArray" }], "default": true }, "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "uniqueItems": { "type": "boolean", "default": false }, "contains": { "$ref": "#" }, "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "required": { "$ref": "#/definitions/stringArray" }, "additionalProperties": { "$ref": "#" }, "definitions": { "type": "object", "additionalProperties": { "$ref": "#" }, "default": {} }, "properties": { "type": "object", "additionalProperties": { "$ref": "#" }, "default": {} }, "patternProperties": { "type": "object", "additionalProperties": { "$ref": "#" }, "propertyNames": { "format": "regex" }, "default": {} }, "dependencies": { "type": "object", "additionalProperties": { "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/stringArray" }] } }, "propertyNames": { "$ref": "#" }, "const": true, "enum": { "type": "array", "items": true, "minItems": 1, "uniqueItems": true }, "type": { "anyOf": [{ "$ref": "#/definitions/simpleTypes" }, { "type": "array", "items": { "$ref": "#/definitions/simpleTypes" }, "minItems": 1, "uniqueItems": true }] }, "format": { "type": "string" }, "contentMediaType": { "type": "string" }, "contentEncoding": { "type": "string" }, "if": { "$ref": "#" }, "then": { "$ref": "#" }, "else": { "$ref": "#" }, "allOf": { "$ref": "#/definitions/schemaArray" }, "anyOf": { "$ref": "#/definitions/schemaArray" }, "oneOf": { "$ref": "#/definitions/schemaArray" }, "not": { "$ref": "#" } };
18688
18688
  const require$$3 = {
18689
18689
  $schema,
18690
18690
  $id,
18691
18691
  title,
18692
18692
  definitions,
18693
- type: type$1i,
18693
+ type: type$1k,
18694
18694
  properties,
18695
18695
  "default": true
18696
18696
  };
@@ -81608,7 +81608,21 @@ const Trigger = Struct({
81608
81608
  }),
81609
81609
  operation: String$.annotations({
81610
81610
  description: "目标组件能力清单中的操作 ID"
81611
- })
81611
+ }),
81612
+ // Parameterized operations carry their version + configured params on the
81613
+ // row. Both are optional and absent for param-less ops (close / validate /
81614
+ // refetch), so every pre-existing `{ target, operation }` trigger stays
81615
+ // valid — this additive shape is what keeps stored configs loading. `params`
81616
+ // is opaque here: it is validated against the *target operation's* own
81617
+ // schema (a cross-reference `target → type → operation`) in the trigger
81618
+ // editor, not by this row schema, since the schema lives on the host's
81619
+ // manifest rather than on the row.
81620
+ compatibilityDate: optional(String$.annotations({
81621
+ description: "参数化操作的兼容性日期;无参操作省略"
81622
+ })),
81623
+ params: optional(Unknown.annotations({
81624
+ description: "操作参数,按目标操作的 schema 校验"
81625
+ }))
81612
81626
  }).annotations({
81613
81627
  title: "Trigger",
81614
81628
  description: "一条向上冒泡的操作请求"
@@ -81623,13 +81637,13 @@ function md(...args2) {
81623
81637
  const indent = (original.startsWith("\n") ? original.slice(1) : original).split("\n", 1)[0]?.match(/^(\s*)/)?.[1]?.length ?? 0;
81624
81638
  return original.trim().replaceAll("\\`", "`").split("\n").map((line) => line.replace(new RegExp(`^${String.raw`\s`.repeat(indent)}`), "")).join("\n");
81625
81639
  }
81626
- const type$1h = "com.shwfed.actions.button.http.request.json.confirm";
81627
- const compatibilityDate$1h = "2026-04-18";
81628
- const metadata$1h = {
81640
+ const type$1j = "com.shwfed.actions.button.http.request.json.confirm";
81641
+ const compatibilityDate$1j = "2026-04-18";
81642
+ const metadata$1i = {
81629
81643
  name: "网络请求(JSON + 确认)",
81630
81644
  icon: "fluent:shield-checkmark-20-regular"
81631
81645
  };
81632
- function schema$1h(configure) {
81646
+ function schema$1i(configure) {
81633
81647
  const CelHttpRequest = Expression({ configure, resultType: "HttpRequest" });
81634
81648
  const CelMessage = Expression({
81635
81649
  configure: (env) => {
@@ -81641,8 +81655,8 @@ function schema$1h(configure) {
81641
81655
  resultType: "string"
81642
81656
  });
81643
81657
  return Struct({
81644
- type: Literal2(type$1h),
81645
- compatibilityDate: Literal2(compatibilityDate$1h),
81658
+ type: Literal2(type$1j),
81659
+ compatibilityDate: Literal2(compatibilityDate$1j),
81646
81660
  expression: CelHttpRequest.annotations({
81647
81661
  title: "请求",
81648
81662
  description: md`
@@ -81708,18 +81722,21 @@ function schema$1h(configure) {
81708
81722
  }
81709
81723
  const __vite_glob_0_0$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
81710
81724
  __proto__: null,
81711
- compatibilityDate: compatibilityDate$1h,
81712
- metadata: metadata$1h,
81713
- schema: schema$1h,
81714
- type: type$1h
81725
+ compatibilityDate: compatibilityDate$1j,
81726
+ metadata: metadata$1i,
81727
+ schema: schema$1i,
81728
+ type: type$1j
81715
81729
  }, Symbol.toStringTag, { value: "Module" }));
81716
- const type$1g = "com.shwfed.actions.button.http.request.json";
81717
- const compatibilityDate$1g = "2026-04-18";
81718
- const metadata$1g = {
81730
+ const PAGE_TARGET_ID = "00000000-0000-0000-0000-000000000000";
81731
+ const type$1i = "com.shwfed.operation.alert";
81732
+ const compatibilityDate$1i = "2026-06-09";
81733
+ const type$1h = "com.shwfed.actions.button.http.request.json";
81734
+ const compatibilityDate$1h = "2026-04-18";
81735
+ const metadata$1h = {
81719
81736
  name: "网络请求(JSON)",
81720
81737
  icon: "fluent:cloud-arrow-up-20-regular"
81721
81738
  };
81722
- function schema$1g(configure) {
81739
+ function schema$1h(configure) {
81723
81740
  const CelHttpRequest = Expression({ configure, resultType: "HttpRequest" });
81724
81741
  const CelMessage = Expression({
81725
81742
  configure: (env) => {
@@ -81731,8 +81748,8 @@ function schema$1g(configure) {
81731
81748
  resultType: "string"
81732
81749
  });
81733
81750
  return Struct({
81734
- type: Literal2(type$1g),
81735
- compatibilityDate: Literal2(compatibilityDate$1g),
81751
+ type: Literal2(type$1h),
81752
+ compatibilityDate: Literal2(compatibilityDate$1h),
81736
81753
  expression: CelHttpRequest.annotations({
81737
81754
  title: "请求",
81738
81755
  description: md`
@@ -81784,23 +81801,55 @@ function schema$1g(configure) {
81784
81801
  description: "点击后直接发起 HTTP 请求"
81785
81802
  });
81786
81803
  }
81804
+ const migrateFrom$f = [
81805
+ { type: "com.shwfed.actions.button.http.request.json.confirm", compatibilityDate: compatibilityDate$1h }
81806
+ ];
81807
+ const migrate$g = (prev) => try_({
81808
+ try: () => {
81809
+ if (!prev || typeof prev !== "object") {
81810
+ throw new Error("网络请求(JSON)迁移失败:原值不是对象");
81811
+ }
81812
+ const { type: _t, compatibilityDate: _c, markdown, icon, color, before, ...rest } = prev;
81813
+ const params = {
81814
+ message: markdown ?? [{ locale: "zh", message: "" }]
81815
+ };
81816
+ if (icon !== void 0) params.icon = icon;
81817
+ if (color !== void 0) params.color = color;
81818
+ const alertTrigger = {
81819
+ target: PAGE_TARGET_ID,
81820
+ operation: type$1i,
81821
+ compatibilityDate: compatibilityDate$1i,
81822
+ params
81823
+ };
81824
+ const prevBefore = Array.isArray(before) ? before : [];
81825
+ return {
81826
+ ...rest,
81827
+ type: type$1h,
81828
+ compatibilityDate: compatibilityDate$1h,
81829
+ before: [...prevBefore, alertTrigger]
81830
+ };
81831
+ },
81832
+ catch: (e) => e instanceof Error ? e : new Error(String(e))
81833
+ });
81787
81834
  const __vite_glob_0_1$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
81788
81835
  __proto__: null,
81789
- compatibilityDate: compatibilityDate$1g,
81790
- metadata: metadata$1g,
81791
- schema: schema$1g,
81792
- type: type$1g
81836
+ compatibilityDate: compatibilityDate$1h,
81837
+ metadata: metadata$1h,
81838
+ migrate: migrate$g,
81839
+ migrateFrom: migrateFrom$f,
81840
+ schema: schema$1h,
81841
+ type: type$1h
81793
81842
  }, Symbol.toStringTag, { value: "Module" }));
81794
- const type$1f = "com.shwfed.actions.button.prototype";
81795
- const compatibilityDate$1f = "2026-04-18";
81796
- const metadata$1f = {
81843
+ const type$1g = "com.shwfed.actions.button.prototype";
81844
+ const compatibilityDate$1g = "2026-04-18";
81845
+ const metadata$1g = {
81797
81846
  name: "原型",
81798
81847
  icon: "fluent:predictions-20-regular"
81799
81848
  };
81800
- function schema$1f(_configure) {
81849
+ function schema$1g(_configure) {
81801
81850
  return Struct({
81802
- type: Literal2(type$1f),
81803
- compatibilityDate: Literal2(compatibilityDate$1f)
81851
+ type: Literal2(type$1g),
81852
+ compatibilityDate: Literal2(compatibilityDate$1g)
81804
81853
  }).annotations({
81805
81854
  title: "PrototypeAction",
81806
81855
  description: "点击无副作用的原型按钮,可被一次性转换为其它类型"
@@ -81808,23 +81857,23 @@ function schema$1f(_configure) {
81808
81857
  }
81809
81858
  const __vite_glob_0_2$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
81810
81859
  __proto__: null,
81811
- compatibilityDate: compatibilityDate$1f,
81812
- metadata: metadata$1f,
81813
- schema: schema$1f,
81814
- type: type$1f
81860
+ compatibilityDate: compatibilityDate$1g,
81861
+ metadata: metadata$1g,
81862
+ schema: schema$1g,
81863
+ type: type$1g
81815
81864
  }, Symbol.toStringTag, { value: "Module" }));
81816
- const type$1e = "com.shwfed.actions.button.navigation";
81817
- const compatibilityDate$1e = "2026-04-21";
81818
- const metadata$1e = {
81865
+ const type$1f = "com.shwfed.actions.button.navigation";
81866
+ const compatibilityDate$1f = "2026-04-21";
81867
+ const metadata$1f = {
81819
81868
  name: "导航",
81820
81869
  icon: "fluent:link-20-regular"
81821
81870
  };
81822
81871
  const Mode = Literal2("_self", "_blank");
81823
- function schema$1e(configure) {
81872
+ function schema$1f(configure) {
81824
81873
  const CelUrl = Expression({ configure, resultType: "string" });
81825
81874
  return Struct({
81826
- type: Literal2(type$1e),
81827
- compatibilityDate: Literal2(compatibilityDate$1e),
81875
+ type: Literal2(type$1f),
81876
+ compatibilityDate: Literal2(compatibilityDate$1f),
81828
81877
  url: CelUrl.annotations({
81829
81878
  title: "链接",
81830
81879
  description: "点击后将打开的链接,返回 `string`"
@@ -81840,10 +81889,10 @@ function schema$1e(configure) {
81840
81889
  }
81841
81890
  const __vite_glob_0_3$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
81842
81891
  __proto__: null,
81843
- compatibilityDate: compatibilityDate$1e,
81844
- metadata: metadata$1e,
81845
- schema: schema$1e,
81846
- type: type$1e
81892
+ compatibilityDate: compatibilityDate$1f,
81893
+ metadata: metadata$1f,
81894
+ schema: schema$1f,
81895
+ type: type$1f
81847
81896
  }, Symbol.toStringTag, { value: "Module" }));
81848
81897
  const TrackCount = Number$.pipe(int(), positive());
81849
81898
  const GridCoord = Number$.pipe(int(), positive());
@@ -81979,9 +82028,9 @@ function registerBlockRef(configure, ref2) {
81979
82028
  function lookupBlockRef(configure) {
81980
82029
  return blockRefCache.get(configure);
81981
82030
  }
81982
- const type$1d = "com.shwfed.actions.button.modal.layout";
81983
- const compatibilityDate$1d = "2026-05-11";
81984
- const metadata$1d = {
82031
+ const type$1e = "com.shwfed.actions.button.modal.layout";
82032
+ const compatibilityDate$1e = "2026-05-11";
82033
+ const metadata$1e = {
81985
82034
  name: "模态窗口",
81986
82035
  icon: "fluent:window-edit-20-regular",
81987
82036
  drillable: true,
@@ -81992,12 +82041,12 @@ const metadata$1d = {
81992
82041
  const CssLength = String$.pipe(
81993
82042
  filter((s) => s.trim().length > 0 || "不能为空字符串")
81994
82043
  );
81995
- function schema$1d(configure) {
82044
+ function schema$1e(configure) {
81996
82045
  const blockUnion = lookupBlockRef(configure) ?? Unknown;
81997
82046
  const ModalSlot = Slot(blockUnion, configure);
81998
82047
  return Struct({
81999
- type: Literal2(type$1d),
82000
- compatibilityDate: Literal2(compatibilityDate$1d),
82048
+ type: Literal2(type$1e),
82049
+ compatibilityDate: Literal2(compatibilityDate$1e),
82001
82050
  modalTitle: optional(Locale.annotations({
82002
82051
  title: "弹窗标题",
82003
82052
  description: "弹窗顶部展示的本地化标题,支持行内 Markdown;不填则回退使用按钮自身的名称"
@@ -82026,22 +82075,22 @@ function defaultBody$9() {
82026
82075
  }
82027
82076
  const __vite_glob_0_4$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82028
82077
  __proto__: null,
82029
- compatibilityDate: compatibilityDate$1d,
82078
+ compatibilityDate: compatibilityDate$1e,
82030
82079
  defaultBody: defaultBody$9,
82031
- metadata: metadata$1d,
82032
- schema: schema$1d,
82033
- type: type$1d
82080
+ metadata: metadata$1e,
82081
+ schema: schema$1e,
82082
+ type: type$1e
82034
82083
  }, Symbol.toStringTag, { value: "Module" }));
82035
- const type$1c = "com.shwfed.actions.button.event.dispatch";
82036
- const compatibilityDate$1c = "2026-05-15";
82037
- const metadata$1c = {
82084
+ const type$1d = "com.shwfed.actions.button.event.dispatch";
82085
+ const compatibilityDate$1d = "2026-05-15";
82086
+ const metadata$1d = {
82038
82087
  name: "触发事件",
82039
82088
  icon: "fluent:flash-20-regular"
82040
82089
  };
82041
- function schema$1c(_configure) {
82090
+ function schema$1d(_configure) {
82042
82091
  return Struct({
82043
- type: Literal2(type$1c),
82044
- compatibilityDate: Literal2(compatibilityDate$1c),
82092
+ type: Literal2(type$1d),
82093
+ compatibilityDate: Literal2(compatibilityDate$1d),
82045
82094
  // This button's entire behaviour: the op-requests it bubbles up the
82046
82095
  // component tree on click. Stored on the button itself — there is no
82047
82096
  // host-level trigger field any more.
@@ -82052,14 +82101,14 @@ function schema$1c(_configure) {
82052
82101
  }
82053
82102
  const __vite_glob_0_5$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82054
82103
  __proto__: null,
82055
- compatibilityDate: compatibilityDate$1c,
82056
- metadata: metadata$1c,
82057
- schema: schema$1c,
82058
- type: type$1c
82104
+ compatibilityDate: compatibilityDate$1d,
82105
+ metadata: metadata$1d,
82106
+ schema: schema$1d,
82107
+ type: type$1d
82059
82108
  }, Symbol.toStringTag, { value: "Module" }));
82060
- const type$1b = "com.shwfed.actions.button.http.download";
82061
- const compatibilityDate$1b = "2026-05-21";
82062
- const metadata$1b = {
82109
+ const type$1c = "com.shwfed.actions.button.http.download";
82110
+ const compatibilityDate$1c = "2026-05-21";
82111
+ const metadata$1c = {
82063
82112
  name: "下载文件",
82064
82113
  icon: "fluent:arrow-download-20-regular"
82065
82114
  };
@@ -82074,13 +82123,13 @@ function configureWithJson$4(configure) {
82074
82123
  env.registerVariable("json", JSON_VAR$5.type, { description: JSON_VAR$5.description });
82075
82124
  };
82076
82125
  }
82077
- function schema$1b(configure) {
82126
+ function schema$1c(configure) {
82078
82127
  const CelHttpRequest = Expression({ configure, resultType: "HttpRequest" });
82079
82128
  const CelDownloadRequest = Expression({ configure: configureWithJson$4(configure), resultType: "HttpRequest" });
82080
82129
  const CelMessage = Expression({ configure: configureWithJson$4(configure), resultType: "string" });
82081
82130
  return Struct({
82082
- type: Literal2(type$1b),
82083
- compatibilityDate: Literal2(compatibilityDate$1b),
82131
+ type: Literal2(type$1c),
82132
+ compatibilityDate: Literal2(compatibilityDate$1c),
82084
82133
  template: Struct({
82085
82134
  request: CelHttpRequest.annotations({
82086
82135
  title: "请求",
@@ -82143,25 +82192,25 @@ function schema$1b(configure) {
82143
82192
  const __vite_glob_0_6$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82144
82193
  __proto__: null,
82145
82194
  JSON_VAR: JSON_VAR$5,
82146
- compatibilityDate: compatibilityDate$1b,
82147
- metadata: metadata$1b,
82148
- schema: schema$1b,
82149
- type: type$1b
82195
+ compatibilityDate: compatibilityDate$1c,
82196
+ metadata: metadata$1c,
82197
+ schema: schema$1c,
82198
+ type: type$1c
82150
82199
  }, Symbol.toStringTag, { value: "Module" }));
82151
- const type$1a = "com.shwfed.actions.button.state.write";
82152
- const compatibilityDate$1a = "2026-05-24";
82153
- const metadata$1a = {
82200
+ const type$1b = "com.shwfed.actions.button.state.write";
82201
+ const compatibilityDate$1b = "2026-05-24";
82202
+ const metadata$1b = {
82154
82203
  name: "写入表单状态",
82155
82204
  icon: "fluent:document-edit-20-regular"
82156
82205
  };
82157
- function schema$1a(configure) {
82206
+ function schema$1b(configure) {
82158
82207
  const CelRecord = Expression({
82159
82208
  configure,
82160
82209
  resultType: (t) => t === "dyn" || t.startsWith("map")
82161
82210
  });
82162
82211
  return Struct({
82163
- type: Literal2(type$1a),
82164
- compatibilityDate: Literal2(compatibilityDate$1a),
82212
+ type: Literal2(type$1b),
82213
+ compatibilityDate: Literal2(compatibilityDate$1b),
82165
82214
  expression: CelRecord.annotations({
82166
82215
  title: "写入值",
82167
82216
  description: md`
@@ -82180,6 +82229,95 @@ function schema$1a(configure) {
82180
82229
  });
82181
82230
  }
82182
82231
  const __vite_glob_0_7$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82232
+ __proto__: null,
82233
+ compatibilityDate: compatibilityDate$1b,
82234
+ metadata: metadata$1b,
82235
+ schema: schema$1b,
82236
+ type: type$1b
82237
+ }, Symbol.toStringTag, { value: "Module" }));
82238
+ const type$1a = "com.shwfed.actions.button.http.request.json.batch";
82239
+ const compatibilityDate$1a = "2026-06-08";
82240
+ const metadata$1a = {
82241
+ name: "批量网络请求(JSON)",
82242
+ icon: "fluent:cloud-arrow-up-20-regular"
82243
+ };
82244
+ const isHttpRequestList = (t) => t === "dyn" || t === "list" || t === "list<dyn>" || t === "list<HttpRequest>";
82245
+ function schema$1a(configure) {
82246
+ const CelHttpRequestList = Expression({ configure, resultType: isHttpRequestList });
82247
+ const CelMessage = Expression({
82248
+ configure: (env) => {
82249
+ configure(env);
82250
+ env.registerVariable("jsons", "list<dyn>", {
82251
+ description: "HTTP 响应体列表(已解析 JSON,仅成功项,按发送顺序)"
82252
+ });
82253
+ },
82254
+ resultType: "string"
82255
+ });
82256
+ const CelResult = Expression({
82257
+ configure: (env) => {
82258
+ configure(env);
82259
+ env.registerVariable("json", "dyn", {
82260
+ description: "HTTP 响应体(已解析 JSON),当前这一条响应"
82261
+ });
82262
+ },
82263
+ resultType: "bool"
82264
+ });
82265
+ return Struct({
82266
+ type: Literal2(type$1a),
82267
+ compatibilityDate: Literal2(compatibilityDate$1a),
82268
+ expression: CelHttpRequestList.annotations({
82269
+ title: "请求列表",
82270
+ description: md`
82271
+ 点击后将立即被求值,返回一个 \`HttpRequest\` 列表。调度器将按列表顺序逐个发起请求,
82272
+ 并在弹窗中显示进度。
82273
+ `
82274
+ }),
82275
+ before: optional(Triggers.annotations({
82276
+ title: "请求前",
82277
+ description: md`
82278
+ 整批请求发起前按列表顺序执行的操作。任一操作中止(例如表单校验未通过)将取消本次批量请求。
82279
+
82280
+ 放在表单里的提交按钮应在此处首先触发所在表单的「校验」操作,使校验成为显式的提交前步骤。
82281
+ `
82282
+ })),
82283
+ markdown: optional(Locale.annotations({
82284
+ title: "进度信息",
82285
+ description: md`
82286
+ 进度弹窗内显示的信息,支持 \`{{ expression }}\` 插值。可用变量:
82287
+ \`total\`(请求总数)、\`succeeded\`(成功数)、\`failure\`(失败数)。
82288
+
82289
+ 例:\`已处理 {{ succeeded + failure }} / {{ total }}\`。不配置则弹窗只显示进度条。
82290
+ `
82291
+ })),
82292
+ continueOnError: optional(Boolean$.annotations({
82293
+ title: "失败时继续",
82294
+ description: md`
82295
+ 开启后,单个请求失败不会中断整批 —— 失败项被跳过,继续发起后续请求。
82296
+ 缺省(关闭)时,遇到第一个失败即终止整批。
82297
+ `
82298
+ })),
82299
+ messageExpression: optional(CelMessage.annotations({
82300
+ title: "消息",
82301
+ description: md`
82302
+ 整批完成后对成功响应体列表 \`jsons\` 求值,返回 \`string\`,作为 toast 显示。
82303
+ 无失败时为成功样式,否则为错误样式。不配置则不显示。
82304
+ `
82305
+ })),
82306
+ resultExpression: optional(CelResult.annotations({
82307
+ title: "执行结果",
82308
+ description: md`
82309
+ 对**每一条**响应体 \`json\` 求值,返回 \`bool\` —— \`true\` 视为该条成功、\`false\` 视为失败。
82310
+ 不配置时,任何未报错的响应都视为成功。
82311
+
82312
+ 失败会计入进度信息的 \`failure\`,并在未开启「失败时继续」时终止整批。
82313
+ `
82314
+ }))
82315
+ }).annotations({
82316
+ title: "HttpRequestBatchAction",
82317
+ description: "点击后逐个发起一批 HTTP 请求,并显示进度弹窗"
82318
+ });
82319
+ }
82320
+ const __vite_glob_0_8$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82183
82321
  __proto__: null,
82184
82322
  compatibilityDate: compatibilityDate$1a,
82185
82323
  metadata: metadata$1a,
@@ -82220,6 +82358,285 @@ const __vite_glob_3_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
82220
82358
  schema: schema$19,
82221
82359
  type: type$19
82222
82360
  }, Symbol.toStringTag, { value: "Module" }));
82361
+ function createResult(...args2) {
82362
+ if (args2.length === 0) {
82363
+ return none$4();
82364
+ }
82365
+ return some(args2[0]);
82366
+ }
82367
+ function createOverlayRuntime() {
82368
+ const definitions2 = vueExports.reactive({});
82369
+ const sessions = vueExports.ref([]);
82370
+ const alerts = vueExports.ref([]);
82371
+ const progress = vueExports.ref([]);
82372
+ function openProgress(input) {
82373
+ return sync$1(() => {
82374
+ const progressId = crypto.randomUUID();
82375
+ progress.value.push({
82376
+ progressId,
82377
+ open: true,
82378
+ total: input.total,
82379
+ done: 0,
82380
+ content: input.content,
82381
+ cancellable: input.cancellable,
82382
+ cancelled: false,
82383
+ finished: false,
82384
+ failed: false
82385
+ });
82386
+ const live = progress.value[progress.value.length - 1];
82387
+ return {
82388
+ progressId,
82389
+ advance: sync$1(() => {
82390
+ live.done += 1;
82391
+ }),
82392
+ setContent: (content) => sync$1(() => {
82393
+ live.content = content;
82394
+ }),
82395
+ isCancelled: sync$1(() => live.cancelled),
82396
+ markFailed: sync$1(() => {
82397
+ live.failed = true;
82398
+ }),
82399
+ finish: sync$1(() => {
82400
+ live.finished = true;
82401
+ })
82402
+ };
82403
+ });
82404
+ }
82405
+ function cancelProgress(progressId) {
82406
+ const session = progress.value.find((p) => p.progressId === progressId);
82407
+ if (session) {
82408
+ session.cancelled = true;
82409
+ }
82410
+ }
82411
+ function closeProgress(progressId) {
82412
+ const index = progress.value.findIndex((p) => p.progressId === progressId);
82413
+ if (index >= 0) {
82414
+ progress.value.splice(index, 1);
82415
+ }
82416
+ }
82417
+ function openAlert(input) {
82418
+ return gen(function* () {
82419
+ const deferred = yield* make$m();
82420
+ alerts.value.push({
82421
+ alertId: crypto.randomUUID(),
82422
+ open: true,
82423
+ content: input.content,
82424
+ icon: input.icon,
82425
+ color: input.color,
82426
+ deferred
82427
+ });
82428
+ return yield* _await$2(deferred);
82429
+ });
82430
+ }
82431
+ function finalizeCloseAlert(alertId) {
82432
+ const index = alerts.value.findIndex((alert2) => alert2.alertId === alertId);
82433
+ if (index < 0) {
82434
+ return;
82435
+ }
82436
+ const [alert] = alerts.value.splice(index, 1);
82437
+ if (!alert) {
82438
+ return;
82439
+ }
82440
+ runSync(succeed$7(alert.deferred, alert.pendingResult ?? false));
82441
+ }
82442
+ function closeAlert(alertId, result, explicit = true) {
82443
+ return sync$1(() => {
82444
+ const alert = alerts.value.find((a) => a.alertId === alertId);
82445
+ if (!alert) {
82446
+ return;
82447
+ }
82448
+ if (explicit || alert.pendingResult === void 0) {
82449
+ alert.pendingResult = result;
82450
+ }
82451
+ if (alert.open) {
82452
+ alert.open = false;
82453
+ }
82454
+ if (!alert.finalizeScheduled) {
82455
+ alert.finalizeScheduled = true;
82456
+ queueMicrotask(() => finalizeCloseAlert(alertId));
82457
+ }
82458
+ });
82459
+ }
82460
+ function getDefinition(definitionId) {
82461
+ return Reflect.get(definitions2, definitionId);
82462
+ }
82463
+ function getSession(sessionId) {
82464
+ return sessions.value.find((session) => session.sessionId === sessionId);
82465
+ }
82466
+ function removeSession(sessionId) {
82467
+ const index = sessions.value.findIndex((session2) => session2.sessionId === sessionId);
82468
+ if (index < 0) {
82469
+ return void 0;
82470
+ }
82471
+ const [session] = sessions.value.splice(index, 1);
82472
+ return session;
82473
+ }
82474
+ function finalizeClose(sessionId, result) {
82475
+ const session = removeSession(sessionId);
82476
+ if (!session) {
82477
+ return;
82478
+ }
82479
+ runSync(succeed$7(session.deferred, session.pendingResult ?? result ?? none$4()));
82480
+ }
82481
+ function requestClose(sessionId, result) {
82482
+ const session = getSession(sessionId);
82483
+ if (!session || !session.open) {
82484
+ return;
82485
+ }
82486
+ session.open = false;
82487
+ session.pendingResult = result;
82488
+ }
82489
+ function closeDefinitionSessions(definitionId) {
82490
+ const targetSessions = sessions.value.filter((session) => session.definitionId === definitionId).map((session) => session.sessionId);
82491
+ for (const sessionId of targetSessions) {
82492
+ finalizeClose(sessionId, none$4());
82493
+ }
82494
+ }
82495
+ function registerDefinition(definition) {
82496
+ Reflect.set(definitions2, definition.definitionId, definition);
82497
+ }
82498
+ function unregisterDefinition(definitionId, ownerId) {
82499
+ const definition = getDefinition(definitionId);
82500
+ if (!definition) {
82501
+ return;
82502
+ }
82503
+ if (ownerId !== void 0 && definition.ownerId !== ownerId) {
82504
+ return;
82505
+ }
82506
+ Reflect.deleteProperty(definitions2, definitionId);
82507
+ closeDefinitionSessions(definitionId);
82508
+ }
82509
+ function syncDefinitions(ownerId, nextDefinitions) {
82510
+ const nextIds = nextDefinitions.map((definition) => definition.definitionId);
82511
+ const currentIds = Object.values(definitions2).filter((definition) => definition.ownerId === ownerId).map((definition) => definition.definitionId);
82512
+ for (const definitionId of currentIds) {
82513
+ if (!nextIds.includes(definitionId)) {
82514
+ unregisterDefinition(definitionId, ownerId);
82515
+ }
82516
+ }
82517
+ for (const definition of nextDefinitions) {
82518
+ registerDefinition(definition);
82519
+ }
82520
+ }
82521
+ function patchSession(sessionId, patch2) {
82522
+ const session = getSession(sessionId);
82523
+ if (!session) {
82524
+ return;
82525
+ }
82526
+ if (patch2.shell) {
82527
+ session.shell = {
82528
+ ...session.shell,
82529
+ ...patch2.shell,
82530
+ descriptionSrOnly: Reflect.has(patch2.shell, "description") ? false : session.shell.descriptionSrOnly
82531
+ };
82532
+ }
82533
+ if (patch2.props) {
82534
+ session.props = {
82535
+ ...session.props,
82536
+ ...patch2.props
82537
+ };
82538
+ }
82539
+ }
82540
+ function createHandle(session) {
82541
+ return {
82542
+ patch: (patch2) => sync$1(() => {
82543
+ patchSession(session.sessionId, patch2);
82544
+ }),
82545
+ close: (...args2) => sync$1(() => {
82546
+ requestClose(session.sessionId, createResult(...args2));
82547
+ }),
82548
+ result: _await$2(session.deferred)
82549
+ };
82550
+ }
82551
+ function open(definitionId, options) {
82552
+ return map$3(acquireRelease(
82553
+ gen(function* () {
82554
+ const definition = getDefinition(definitionId);
82555
+ if (!definition) {
82556
+ return yield* fail$2({
82557
+ _tag: "OverlayDefinitionNotFoundError",
82558
+ definitionId
82559
+ });
82560
+ }
82561
+ const definitionShell = definition.shell;
82562
+ const descriptionSrOnly = options?.shell?.description === void 0 && definitionShell?.description === void 0;
82563
+ const deferred = yield* make$m();
82564
+ const session = {
82565
+ sessionId: crypto.randomUUID(),
82566
+ definitionId,
82567
+ open: true,
82568
+ shell: {
82569
+ title: options?.shell?.title ?? definitionShell?.title,
82570
+ description: options?.shell?.description ?? definitionShell?.description,
82571
+ descriptionSrOnly,
82572
+ breakpoint: options?.shell?.breakpoint ?? definitionShell?.breakpoint,
82573
+ trap: options?.shell?.trap ?? definitionShell?.trap,
82574
+ width: options?.shell?.width ?? definitionShell?.width
82575
+ },
82576
+ props: {
82577
+ ...options?.props
82578
+ },
82579
+ deferred
82580
+ };
82581
+ sessions.value.push(session);
82582
+ return { handle: createHandle(session), sessionId: session.sessionId };
82583
+ }),
82584
+ ({ sessionId }) => sync$1(() => {
82585
+ finalizeClose(sessionId, none$4());
82586
+ })
82587
+ ), ({ handle }) => handle);
82588
+ }
82589
+ const runtime2 = {
82590
+ get definitions() {
82591
+ return definitions2;
82592
+ },
82593
+ get sessions() {
82594
+ return sessions.value;
82595
+ },
82596
+ get alerts() {
82597
+ return alerts.value;
82598
+ },
82599
+ get progress() {
82600
+ return progress.value;
82601
+ },
82602
+ get topSession() {
82603
+ return sessions.value.at(-1);
82604
+ },
82605
+ registerDefinition,
82606
+ unregisterDefinition,
82607
+ syncDefinitions,
82608
+ isOpen: (sessionId) => getSession(sessionId)?.open === true,
82609
+ open,
82610
+ patch: (sessionId, patch2) => sync$1(() => {
82611
+ patchSession(sessionId, patch2);
82612
+ }),
82613
+ close: (sessionId, ...args2) => sync$1(() => {
82614
+ requestClose(sessionId, createResult(...args2));
82615
+ }),
82616
+ closeTop: () => sync$1(() => {
82617
+ const topSession = sessions.value.at(-1);
82618
+ if (topSession) {
82619
+ requestClose(topSession.sessionId, none$4());
82620
+ }
82621
+ }),
82622
+ closeAll: () => sync$1(() => {
82623
+ const sessionIds = sessions.value.map((session) => session.sessionId);
82624
+ for (const sessionId of sessionIds) {
82625
+ requestClose(sessionId, none$4());
82626
+ }
82627
+ }),
82628
+ openAlert,
82629
+ closeAlert,
82630
+ openProgress,
82631
+ cancelProgress,
82632
+ closeProgress,
82633
+ finalizeClose
82634
+ };
82635
+ return runtime2;
82636
+ }
82637
+ createOverlayRuntime();
82638
+ class ActionContext extends Tag("shwfed/ActionContext")() {
82639
+ }
82223
82640
  function defineRegistry(options) {
82224
82641
  const {
82225
82642
  hostName,
@@ -82283,6 +82700,7 @@ function defineRegistry(options) {
82283
82700
  find: find2
82284
82701
  };
82285
82702
  }
82703
+ const sourceKey$2 = (type2, compatibilityDate2) => `${type2}@${compatibilityDate2}`;
82286
82704
  const schemaModules$3 = /* @__PURE__ */ Object.assign({
82287
82705
  "../buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.ts": __vite_glob_0_0$3,
82288
82706
  "../buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.ts": __vite_glob_0_1$3,
@@ -82291,7 +82709,8 @@ const schemaModules$3 = /* @__PURE__ */ Object.assign({
82291
82709
  "../buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.ts": __vite_glob_0_4$3,
82292
82710
  "../buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.ts": __vite_glob_0_5$3,
82293
82711
  "../buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.ts": __vite_glob_0_6$3,
82294
- "../buttons/2026-05-24/com.shwfed.actions.button.state.write/schema.ts": __vite_glob_0_7$3
82712
+ "../buttons/2026-05-24/com.shwfed.actions.button.state.write/schema.ts": __vite_glob_0_7$3,
82713
+ "../buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/schema.ts": __vite_glob_0_8$3
82295
82714
  });
82296
82715
  const configModuleLoaders = /* @__PURE__ */ Object.assign({
82297
82716
  "../buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue": () => Promise.resolve().then(() => _stubVue),
@@ -82301,7 +82720,8 @@ const configModuleLoaders = /* @__PURE__ */ Object.assign({
82301
82720
  "../buttons/2026-05-11/com.shwfed.actions.button.modal.layout/config.vue": () => Promise.resolve().then(() => _stubVue),
82302
82721
  "../buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.vue": () => Promise.resolve().then(() => _stubVue),
82303
82722
  "../buttons/2026-05-21/com.shwfed.actions.button.http.download/config.vue": () => Promise.resolve().then(() => _stubVue),
82304
- "../buttons/2026-05-24/com.shwfed.actions.button.state.write/config.vue": () => Promise.resolve().then(() => _stubVue)
82723
+ "../buttons/2026-05-24/com.shwfed.actions.button.state.write/config.vue": () => Promise.resolve().then(() => _stubVue),
82724
+ "../buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.vue": () => Promise.resolve().then(() => _stubVue)
82305
82725
  });
82306
82726
  const runtimeModuleLoaders = /* @__PURE__ */ Object.assign({
82307
82727
  "../buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue": () => Promise.resolve().then(() => _stubVue),
@@ -82311,7 +82731,8 @@ const runtimeModuleLoaders = /* @__PURE__ */ Object.assign({
82311
82731
  "../buttons/2026-05-11/com.shwfed.actions.button.modal.layout/runtime.vue": () => Promise.resolve().then(() => _stubVue),
82312
82732
  "../buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/runtime.vue": () => Promise.resolve().then(() => _stubVue),
82313
82733
  "../buttons/2026-05-21/com.shwfed.actions.button.http.download/runtime.vue": () => Promise.resolve().then(() => _stubVue),
82314
- "../buttons/2026-05-24/com.shwfed.actions.button.state.write/runtime.vue": () => Promise.resolve().then(() => _stubVue)
82734
+ "../buttons/2026-05-24/com.shwfed.actions.button.state.write/runtime.vue": () => Promise.resolve().then(() => _stubVue),
82735
+ "../buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/runtime.vue": () => Promise.resolve().then(() => _stubVue)
82315
82736
  });
82316
82737
  const configModules$3 = Object.fromEntries(
82317
82738
  Object.entries(configModuleLoaders).map(([path, loader]) => [
@@ -82331,23 +82752,55 @@ const registry$3 = defineRegistry({
82331
82752
  schemaModules: schemaModules$3,
82332
82753
  configModules: configModules$3,
82333
82754
  runtimeModules: runtimeModules$3,
82334
- // A button is deprecated when its schema declares `metadata.deprecated`
82335
- // (an explicit, possibly cross-type replacement note), or when a newer
82336
- // `compatibilityDate` of the same `type` exists (the date-versioned rule
82337
- // shared with form). Either way the inspector shows the migration hint.
82755
+ // A button is deprecated by one of three rules, in precedence order:
82756
+ // (1) another entry declares this one in its `migrateFrom` — explicit
82757
+ // cross-type supersession with a structured `supersededBy` target the
82758
+ // inspector can offer a one-click 「迁移」 against;
82759
+ // (2) its schema declares a free-text `metadata.deprecated` note — the
82760
+ // escape hatch for a replacement with no structured migrate target;
82761
+ // (3) a newer `compatibilityDate` of the same `type` exists — the
82762
+ // date-versioned rule shared with form / table.
82763
+ // `migrateFrom` wins over the date rule: a kept-around stub of an old type
82764
+ // points at exactly which target it migrates to, so trust it over the
82765
+ // implicit "any older same-type date is the same component upgraded" guess.
82338
82766
  deriveEntryExtras: (drafts) => {
82339
82767
  const latestByType = /* @__PURE__ */ new Map();
82340
82768
  for (const d of drafts) {
82341
82769
  const prev = latestByType.get(d.type);
82342
82770
  if (!prev || d.compatibilityDate > prev) latestByType.set(d.type, d.compatibilityDate);
82343
82771
  }
82772
+ const migrationTargets = /* @__PURE__ */ new Map();
82773
+ for (const d of drafts) {
82774
+ const sources = d.module.migrateFrom;
82775
+ if (!sources || sources.length === 0) continue;
82776
+ for (const src of sources) {
82777
+ const key = sourceKey$2(src.type, src.compatibilityDate);
82778
+ const existing = migrationTargets.get(key);
82779
+ if (existing) {
82780
+ throw new Error(
82781
+ `[shwfed-actions] migrateFrom collision: source "${key}" is claimed by both "${sourceKey$2(existing.type, existing.compatibilityDate)}" and "${sourceKey$2(d.type, d.compatibilityDate)}"`
82782
+ );
82783
+ }
82784
+ migrationTargets.set(key, { type: d.type, compatibilityDate: d.compatibilityDate });
82785
+ }
82786
+ }
82344
82787
  return (draft) => {
82788
+ const declared = migrationTargets.get(sourceKey$2(draft.type, draft.compatibilityDate));
82789
+ if (declared) {
82790
+ return {
82791
+ deprecated: true,
82792
+ supersededBy: declared,
82793
+ deprecationNote: declared.type === draft.type ? `已被更新版本 ${declared.compatibilityDate} 取代。` : `已被 ${declared.type}@${declared.compatibilityDate} 取代。`
82794
+ };
82795
+ }
82345
82796
  const note = draft.module.metadata.deprecated;
82346
82797
  if (note) return { deprecated: true, deprecationNote: note };
82347
- if (draft.compatibilityDate < latestByType.get(draft.type)) {
82798
+ const latest = latestByType.get(draft.type);
82799
+ if (draft.compatibilityDate < latest) {
82348
82800
  return {
82349
82801
  deprecated: true,
82350
- deprecationNote: `已被更新版本 ${latestByType.get(draft.type)} 取代。`
82802
+ supersededBy: { type: draft.type, compatibilityDate: latest },
82803
+ deprecationNote: `已被更新版本 ${latest} 取代。`
82351
82804
  };
82352
82805
  }
82353
82806
  return { deprecated: false };
@@ -82362,7 +82815,10 @@ const BUTTONS = registry$3.ENTRIES.map((e) => ({
82362
82815
  config: e.config,
82363
82816
  runtime: e.runtime,
82364
82817
  deprecated: e.deprecated,
82365
- ...e.deprecationNote !== void 0 ? { deprecationNote: e.deprecationNote } : {}
82818
+ ...e.deprecationNote !== void 0 ? { deprecationNote: e.deprecationNote } : {},
82819
+ ...e.supersededBy !== void 0 ? { supersededBy: e.supersededBy } : {},
82820
+ migrate: e.module.migrate,
82821
+ ...e.module.migrateFrom !== void 0 ? { migrateFrom: e.module.migrateFrom } : {}
82366
82822
  }));
82367
82823
  function allButtonSchemas(configure) {
82368
82824
  return BUTTONS.map((entry) => entry.schema(configure).annotations({