@shwfed/config 2.9.9 → 2.9.10

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 (143) hide show
  1. package/dist/mcp.mjs +8 -0
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-CdbT3cSj.js → FieldGroup.vue_vue_type_script_setup_true_lang-B_lv0Qb4.js} +1 -1
  4. package/dist/preview/assets/badge-DkCzSREV.js +1 -0
  5. package/dist/preview/assets/config-9Ny1em1E.js +1 -0
  6. package/dist/preview/assets/config-BO6oZNCA.js +1 -0
  7. package/dist/preview/assets/config-BQZZzdBi.js +1 -0
  8. package/dist/preview/assets/config-BzUZdTRZ.js +1 -0
  9. package/dist/preview/assets/config-CJYUWHSt.js +1 -0
  10. package/dist/preview/assets/config-CLszlI7X.js +1 -0
  11. package/dist/preview/assets/config-CfTdhIiz.js +1 -0
  12. package/dist/preview/assets/config-DG9kUyIX.js +1 -0
  13. package/dist/preview/assets/{config-DVk8b1Qf.js → config-DcOjw4Ib.js} +1 -1
  14. package/dist/preview/assets/config-DnxWfe-p.js +1 -0
  15. package/dist/preview/assets/config-IAY_3DyY.js +1 -0
  16. package/dist/preview/assets/{config-C8R7tsmC.js → config-y0whCdxg.js} +1 -1
  17. package/dist/preview/assets/definition.vue_vue_type_script_setup_true_lang-D6Dl1HG7.js +1 -0
  18. package/dist/preview/assets/{index-Df0XE7Lz.js → index-BxEz7F0S.js} +1 -1
  19. package/dist/preview/assets/{index-CsN0336H.js → index-CEpio2Ai.js} +206 -189
  20. package/dist/preview/assets/index-DEk1Sey_.css +1 -0
  21. package/dist/preview/assets/index-eXjRNljQ.js +1 -0
  22. package/dist/preview/assets/item-BgY4KzDy.js +1 -0
  23. package/dist/preview/assets/runtime--G6ZYJWm.js +1 -0
  24. package/dist/preview/assets/runtime-74HxxB_6.js +1 -0
  25. package/dist/preview/assets/runtime-B0yAZrhv.js +1 -0
  26. package/dist/preview/assets/runtime-B1vIYtF_.js +1 -0
  27. package/dist/preview/assets/runtime-BrfrrA2a.js +1 -0
  28. package/dist/preview/assets/runtime-BweDVL2G.js +1 -0
  29. package/dist/preview/assets/runtime-C9L73GlB.js +1 -0
  30. package/dist/preview/assets/runtime-DIHeE12q.js +1 -0
  31. package/dist/preview/assets/runtime-DNCNcjrA.js +1 -0
  32. package/dist/preview/assets/runtime-ObPbN32X.js +1 -0
  33. package/dist/preview/assets/schema-meta-dmADcmVf.js +1 -0
  34. package/dist/preview/index.html +2 -2
  35. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +10 -0
  36. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +10 -0
  37. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.d.ts +5 -0
  38. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +10 -0
  39. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +10 -0
  40. package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +5 -0
  41. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.d.vue.ts +2 -0
  42. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/config.vue.d.ts +2 -0
  43. package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.d.ts +1 -0
  44. package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/config.d.vue.ts +8 -0
  45. package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/config.vue.d.ts +8 -0
  46. package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.d.ts +4 -0
  47. package/dist/runtime/components/actions/buttons/2026-05-24/com.shwfed.actions.button.state.write/config.d.vue.ts +2 -0
  48. package/dist/runtime/components/actions/buttons/2026-05-24/com.shwfed.actions.button.state.write/config.vue.d.ts +2 -0
  49. package/dist/runtime/components/actions/buttons/2026-05-24/com.shwfed.actions.button.state.write/schema.d.ts +1 -0
  50. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.d.vue.ts +2 -0
  51. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.vue.d.ts +2 -0
  52. package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/schema.d.ts +1 -0
  53. package/dist/runtime/components/actions/components/trigger-row-scope.d.vue.ts +17 -0
  54. package/dist/runtime/components/actions/components/trigger-row-scope.vue +15 -0
  55. package/dist/runtime/components/actions/components/trigger-row-scope.vue.d.ts +17 -0
  56. package/dist/runtime/components/actions/components/triggers-field.d.vue.ts +2 -0
  57. package/dist/runtime/components/actions/components/triggers-field.vue +29 -7
  58. package/dist/runtime/components/actions/components/triggers-field.vue.d.ts +2 -0
  59. package/dist/runtime/components/config/index.vue +5 -1
  60. package/dist/runtime/components/config/schema.d.ts +5 -0
  61. package/dist/runtime/components/config/schema.js +10 -0
  62. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +8 -8
  63. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +8 -8
  64. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.d.vue.ts +8 -8
  65. package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/config.vue.d.ts +8 -8
  66. package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/config.d.vue.ts +33 -0
  67. package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/config.vue +130 -0
  68. package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/config.vue.d.ts +33 -0
  69. package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/runtime.d.ts +2 -0
  70. package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/runtime.js +55 -0
  71. package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/schema.d.ts +23 -0
  72. package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/schema.js +79 -0
  73. package/dist/runtime/components/operations/utils/resolve.d.ts +16 -1
  74. package/dist/runtime/components/operations/utils/resolve.js +1 -1
  75. package/dist/runtime/components/operations/utils/step-vars.d.ts +22 -0
  76. package/dist/runtime/components/operations/utils/step-vars.js +12 -0
  77. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +1 -0
  78. package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +1 -0
  79. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +4 -2
  80. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +4 -2
  81. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +1 -0
  82. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +4 -2
  83. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +4 -2
  84. package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +1 -0
  85. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +4 -2
  86. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +4 -2
  87. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +1 -0
  88. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +4 -2
  89. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +4 -2
  90. package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +1 -0
  91. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +4 -2
  92. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +4 -2
  93. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +1 -0
  94. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +4 -2
  95. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +4 -2
  96. package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +1 -0
  97. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +4 -2
  98. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +4 -2
  99. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +2 -0
  100. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +4 -2
  101. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +4 -2
  102. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +2 -0
  103. package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.d.vue.ts +2 -0
  104. package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue +9 -1
  105. package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue.d.ts +2 -0
  106. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +2 -2
  107. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +33 -4
  108. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +2 -2
  109. package/dist/runtime/components/ui/expression-editor/picker-entries.d.ts +3 -2
  110. package/dist/runtime/components/ui/expression-editor/picker-entries.js +13 -2
  111. package/dist/runtime/components/ui/expression-editor/step-chip-extension.d.ts +5 -0
  112. package/dist/runtime/components/ui/expression-editor/step-chip-extension.js +132 -0
  113. package/dist/runtime/components/ui/expression-editor/step-refs.d.ts +17 -0
  114. package/dist/runtime/components/ui/expression-editor/step-refs.js +29 -0
  115. package/dist/runtime/share/event-bus.d.ts +34 -1
  116. package/dist/runtime/share/event-bus.js +28 -11
  117. package/dist/runtime/utils/cel-context.d.ts +35 -0
  118. package/dist/runtime/utils/cel-context.js +8 -0
  119. package/package.json +1 -1
  120. package/dist/preview/assets/badge-DL-wtgr8.js +0 -1
  121. package/dist/preview/assets/config-80OJWswM.js +0 -1
  122. package/dist/preview/assets/config-B8F7X1oF.js +0 -1
  123. package/dist/preview/assets/config-B9BcmOZt.js +0 -1
  124. package/dist/preview/assets/config-C-Ta4ALL.js +0 -1
  125. package/dist/preview/assets/config-CoObmLL2.js +0 -1
  126. package/dist/preview/assets/config-DBQ-1J66.js +0 -1
  127. package/dist/preview/assets/config-DjsQoLiy.js +0 -1
  128. package/dist/preview/assets/config-RmdB0dwp.js +0 -1
  129. package/dist/preview/assets/config-h_hDvpHt.js +0 -1
  130. package/dist/preview/assets/definition.vue_vue_type_script_setup_true_lang-SX94Z692.js +0 -1
  131. package/dist/preview/assets/index-BIwwDhfa.js +0 -1
  132. package/dist/preview/assets/index-C1h9lV52.css +0 -1
  133. package/dist/preview/assets/item-B9XcOWjy.js +0 -1
  134. package/dist/preview/assets/runtime-BBsXfAZm.js +0 -1
  135. package/dist/preview/assets/runtime-BHlUDfbv.js +0 -1
  136. package/dist/preview/assets/runtime-BrwIgXY3.js +0 -1
  137. package/dist/preview/assets/runtime-C--WPQ3o.js +0 -1
  138. package/dist/preview/assets/runtime-C0yBdMlV.js +0 -1
  139. package/dist/preview/assets/runtime-C6uebSDU.js +0 -1
  140. package/dist/preview/assets/runtime-DU0iHs9-.js +0 -1
  141. package/dist/preview/assets/runtime-Dqa4phvv.js +0 -1
  142. package/dist/preview/assets/runtime-Dr-MmEyE.js +0 -1
  143. package/dist/preview/assets/runtime-v_nJoD5I.js +0 -1
@@ -84,13 +84,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
84
84
  readonly onChange?: string | undefined;
85
85
  readonly kind: "remote";
86
86
  readonly triggers?: readonly {
87
+ readonly id?: string | undefined;
87
88
  readonly params?: unknown;
88
89
  readonly compatibilityDate?: string | undefined;
89
90
  readonly target: string;
90
91
  readonly operation: string;
91
92
  }[] | undefined;
92
- readonly accessor: string;
93
93
  readonly successMessage?: string | undefined;
94
+ readonly accessor: string;
94
95
  };
95
96
  }) => any;
96
97
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -175,13 +176,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
175
176
  readonly onChange?: string | undefined;
176
177
  readonly kind: "remote";
177
178
  readonly triggers?: readonly {
179
+ readonly id?: string | undefined;
178
180
  readonly params?: unknown;
179
181
  readonly compatibilityDate?: string | undefined;
180
182
  readonly target: string;
181
183
  readonly operation: string;
182
184
  }[] | undefined;
183
- readonly accessor: string;
184
185
  readonly successMessage?: string | undefined;
186
+ readonly accessor: string;
185
187
  };
186
188
  }) => any) | undefined;
187
189
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -150,6 +150,7 @@ export declare function writeSchema(configure: (env: Environment) => void): Sche
150
150
  onChange: Schema.optional<Schema.Schema<string, string, never>>;
151
151
  successMessage: Schema.optional<Schema.Schema<string, string, never>>;
152
152
  triggers: Schema.optional<Schema.Array$<Schema.Struct<{
153
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
153
154
  target: Schema.refine<string, typeof Schema.String>;
154
155
  operation: Schema.SchemaClass<string, string, never>;
155
156
  compatibilityDate: Schema.optional<Schema.SchemaClass<string, string, never>>;
@@ -267,6 +268,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
267
268
  onChange: Schema.optional<Schema.Schema<string, string, never>>;
268
269
  successMessage: Schema.optional<Schema.Schema<string, string, never>>;
269
270
  triggers: Schema.optional<Schema.Array$<Schema.Struct<{
271
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
270
272
  target: Schema.refine<string, typeof Schema.String>;
271
273
  operation: Schema.SchemaClass<string, string, never>;
272
274
  compatibilityDate: Schema.optional<Schema.SchemaClass<string, string, never>>;
@@ -84,13 +84,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
84
84
  readonly onChange?: string | undefined;
85
85
  readonly kind: "remote";
86
86
  readonly triggers?: readonly {
87
+ readonly id?: string | undefined;
87
88
  readonly params?: unknown;
88
89
  readonly compatibilityDate?: string | undefined;
89
90
  readonly target: string;
90
91
  readonly operation: string;
91
92
  }[] | undefined;
92
- readonly accessor: string;
93
93
  readonly successMessage?: string | undefined;
94
+ readonly accessor: string;
94
95
  };
95
96
  }) => any;
96
97
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -175,13 +176,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
175
176
  readonly onChange?: string | undefined;
176
177
  readonly kind: "remote";
177
178
  readonly triggers?: readonly {
179
+ readonly id?: string | undefined;
178
180
  readonly params?: unknown;
179
181
  readonly compatibilityDate?: string | undefined;
180
182
  readonly target: string;
181
183
  readonly operation: string;
182
184
  }[] | undefined;
183
- readonly accessor: string;
184
185
  readonly successMessage?: string | undefined;
186
+ readonly accessor: string;
185
187
  };
186
188
  }) => any) | undefined;
187
189
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -84,13 +84,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
84
84
  readonly onChange?: string | undefined;
85
85
  readonly kind: "remote";
86
86
  readonly triggers?: readonly {
87
+ readonly id?: string | undefined;
87
88
  readonly params?: unknown;
88
89
  readonly compatibilityDate?: string | undefined;
89
90
  readonly target: string;
90
91
  readonly operation: string;
91
92
  }[] | undefined;
92
- readonly accessor: string;
93
93
  readonly successMessage?: string | undefined;
94
+ readonly accessor: string;
94
95
  };
95
96
  }) => any;
96
97
  }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
@@ -175,13 +176,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
175
176
  readonly onChange?: string | undefined;
176
177
  readonly kind: "remote";
177
178
  readonly triggers?: readonly {
179
+ readonly id?: string | undefined;
178
180
  readonly params?: unknown;
179
181
  readonly compatibilityDate?: string | undefined;
180
182
  readonly target: string;
181
183
  readonly operation: string;
182
184
  }[] | undefined;
183
- readonly accessor: string;
184
185
  readonly successMessage?: string | undefined;
186
+ readonly accessor: string;
185
187
  };
186
188
  }) => any) | undefined;
187
189
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -150,6 +150,7 @@ export declare function writeSchema(configure: (env: Environment) => void): Sche
150
150
  onChange: Schema.optional<Schema.Schema<string, string, never>>;
151
151
  successMessage: Schema.optional<Schema.Schema<string, string, never>>;
152
152
  triggers: Schema.optional<Schema.Array$<Schema.Struct<{
153
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
153
154
  target: Schema.refine<string, typeof Schema.String>;
154
155
  operation: Schema.SchemaClass<string, string, never>;
155
156
  compatibilityDate: Schema.optional<Schema.SchemaClass<string, string, never>>;
@@ -267,6 +268,7 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
267
268
  onChange: Schema.optional<Schema.Schema<string, string, never>>;
268
269
  successMessage: Schema.optional<Schema.Schema<string, string, never>>;
269
270
  triggers: Schema.optional<Schema.Array$<Schema.Struct<{
271
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
270
272
  target: Schema.refine<string, typeof Schema.String>;
271
273
  operation: Schema.SchemaClass<string, string, never>;
272
274
  compatibilityDate: Schema.optional<Schema.SchemaClass<string, string, never>>;
@@ -1,5 +1,6 @@
1
1
  import type { HTMLAttributes } from 'vue';
2
2
  import type { ScopeInfo } from './scope-refs.js';
3
+ import type { StepChipInfo } from './step-refs.js';
3
4
  type __VLS_Props = {
4
5
  class?: HTMLAttributes['class'];
5
6
  defaultValue?: string;
@@ -8,6 +9,7 @@ type __VLS_Props = {
8
9
  placeholder?: string;
9
10
  scopeLookup: Map<string, ScopeInfo>;
10
11
  selectionLookup: Map<string, string>;
12
+ stepLookup: Map<string, StepChipInfo>;
11
13
  };
12
14
  declare function insertAtSelection(text: string): void;
13
15
  declare function focus(): void;
@@ -7,6 +7,7 @@ import { cn } from "../../../utils/cn";
7
7
  import { celHighlighting } from "./cel-language";
8
8
  import { scopeChips, scopeLookupFacet } from "./chip-extension";
9
9
  import { selectionChips, selectionLookupFacet } from "./selection-chip-extension";
10
+ import { stepChips, stepLookupFacet } from "./step-chip-extension";
10
11
  defineOptions({ name: "UiCodeMirrorInput" });
11
12
  const props = defineProps({
12
13
  class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
@@ -15,13 +16,15 @@ const props = defineProps({
15
16
  multiline: { type: Boolean, required: false },
16
17
  placeholder: { type: String, required: false },
17
18
  scopeLookup: { type: Map, required: true },
18
- selectionLookup: { type: Map, required: true }
19
+ selectionLookup: { type: Map, required: true },
20
+ stepLookup: { type: Map, required: true }
19
21
  });
20
22
  const emits = defineEmits(["update:modelValue"]);
21
23
  const host = useTemplateRef("host");
22
24
  let view = null;
23
25
  const lookupCompartment = new Compartment();
24
26
  const selectionLookupCompartment = new Compartment();
27
+ const stepLookupCompartment = new Compartment();
25
28
  const modeCompartment = new Compartment();
26
29
  let applyingExternal = false;
27
30
  const editorTheme = EditorView.theme({
@@ -77,6 +80,7 @@ function makeState(doc) {
77
80
  cmPlaceholder(props.placeholder ?? ""),
78
81
  lookupCompartment.of(scopeLookupFacet.of(props.scopeLookup)),
79
82
  selectionLookupCompartment.of(selectionLookupFacet.of(props.selectionLookup)),
83
+ stepLookupCompartment.of(stepLookupFacet.of(props.stepLookup)),
80
84
  modeCompartment.of(modeExtension(!!props.multiline)),
81
85
  editorTheme,
82
86
  // CEL syntax colours sit *under* the chips: the chip plugin's
@@ -85,6 +89,7 @@ function makeState(doc) {
85
89
  celHighlighting(),
86
90
  scopeChips(),
87
91
  selectionChips(),
92
+ stepChips(),
88
93
  EditorView.contentAttributes.of({ "aria-label": props.placeholder ?? "Expression" }),
89
94
  EditorView.updateListener.of((update) => {
90
95
  if (!update.docChanged || applyingExternal) return;
@@ -118,6 +123,9 @@ watch(() => props.scopeLookup, (lookup) => {
118
123
  watch(() => props.selectionLookup, (lookup) => {
119
124
  view?.dispatch({ effects: selectionLookupCompartment.reconfigure(selectionLookupFacet.of(lookup)) });
120
125
  });
126
+ watch(() => props.stepLookup, (lookup) => {
127
+ view?.dispatch({ effects: stepLookupCompartment.reconfigure(stepLookupFacet.of(lookup)) });
128
+ });
121
129
  watch(() => props.multiline, (multiline) => {
122
130
  view?.dispatch({ effects: modeCompartment.reconfigure(modeExtension(!!multiline)) });
123
131
  });
@@ -1,5 +1,6 @@
1
1
  import type { HTMLAttributes } from 'vue';
2
2
  import type { ScopeInfo } from './scope-refs.js';
3
+ import type { StepChipInfo } from './step-refs.js';
3
4
  type __VLS_Props = {
4
5
  class?: HTMLAttributes['class'];
5
6
  defaultValue?: string;
@@ -8,6 +9,7 @@ type __VLS_Props = {
8
9
  placeholder?: string;
9
10
  scopeLookup: Map<string, ScopeInfo>;
10
11
  selectionLookup: Map<string, string>;
12
+ stepLookup: Map<string, StepChipInfo>;
11
13
  };
12
14
  declare function insertAtSelection(text: string): void;
13
15
  declare function focus(): void;
@@ -14,11 +14,11 @@ type __VLS_Props = {
14
14
  extraVars?: Record<string, VarSpec>;
15
15
  unlistedVarsAreDyn?: boolean;
16
16
  };
17
- declare var __VLS_13: {}, __VLS_150: {};
17
+ declare var __VLS_13: {}, __VLS_171: {};
18
18
  type __VLS_Slots = {} & {
19
19
  leading?: (props: typeof __VLS_13) => any;
20
20
  } & {
21
- trailing?: (props: typeof __VLS_150) => any;
21
+ trailing?: (props: typeof __VLS_171) => any;
22
22
  };
23
23
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
24
24
  "update:modelValue": (payload: string) => any;
@@ -2,12 +2,13 @@
2
2
  import { Icon } from "@iconify/vue";
3
3
  import { computed, ref, useSlots, useTemplateRef, watch } from "vue";
4
4
  import { buildCheckEnvironment, evaluateExpression } from "../../../share/expression";
5
- import { injectCELContext, useScopeAncestry, useSelectionRoster } from "../../../utils/cel-context";
5
+ import { injectCELContext, useScopeAncestry, useSelectionRoster, useStepRoster } from "../../../utils/cel-context";
6
6
  import { Markdown } from "../markdown";
7
7
  import CodeMirrorInput from "./CodeMirrorInput.vue";
8
8
  import { buildScopeLookup } from "./scope-refs";
9
9
  import { buildSelectionLookup } from "./selection-refs";
10
- import { buildScopeEntries, buildSelectionEntries, buildVarEntries } from "./picker-entries";
10
+ import { buildStepLookup } from "./step-refs";
11
+ import { buildScopeEntries, buildSelectionEntries, buildStepEntries, buildVarEntries } from "./picker-entries";
11
12
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../command";
12
13
  import { InputGroup, InputGroupAddon, InputGroupButton } from "../input-group";
13
14
  import { Popover, PopoverContent, PopoverTrigger } from "../popover";
@@ -26,12 +27,15 @@ const emits = defineEmits(["update:modelValue"]);
26
27
  const celContext = injectCELContext();
27
28
  const scopeAncestry = useScopeAncestry();
28
29
  const selectionRoster = useSelectionRoster();
30
+ const stepRoster = useStepRoster();
29
31
  const varEntries = computed(() => buildVarEntries(celContext, props.extraVars));
30
32
  const scopeEntries = computed(() => buildScopeEntries(scopeAncestry.value.slice(1)));
31
33
  const selectionEntries = computed(() => buildSelectionEntries(selectionRoster.value));
34
+ const stepEntries = computed(() => buildStepEntries(stepRoster.value));
32
35
  const scopeLookup = computed(() => buildScopeLookup(scopeAncestry.value));
33
36
  const selectionLookup = computed(() => buildSelectionLookup(selectionRoster.value));
34
- const hasVars = computed(() => varEntries.value.length > 0 || scopeEntries.value.length > 0 || selectionEntries.value.length > 0);
37
+ const stepLookup = computed(() => buildStepLookup(stepRoster.value));
38
+ const hasVars = computed(() => varEntries.value.length > 0 || scopeEntries.value.length > 0 || selectionEntries.value.length > 0 || stepEntries.value.length > 0);
35
39
  const checkEnvironment = computed(() => {
36
40
  const vars = /* @__PURE__ */ new Map();
37
41
  for (const [name, entry] of Object.entries(celContext)) vars.set(name, entry.type);
@@ -51,6 +55,7 @@ const entries = ref([]);
51
55
  const shownVars = computed(() => entries.value.filter((e) => e.group === "var"));
52
56
  const shownScopes = computed(() => entries.value.filter((e) => e.group === "scope"));
53
57
  const shownSelections = computed(() => entries.value.filter((e) => e.group === "selection"));
58
+ const shownSteps = computed(() => entries.value.filter((e) => e.group === "step"));
54
59
  const hoveredName = ref(null);
55
60
  const editorRef = useTemplateRef("editor");
56
61
  function insertVariable(text) {
@@ -59,7 +64,7 @@ function insertVariable(text) {
59
64
  }
60
65
  watch(open, (v) => {
61
66
  if (v) {
62
- entries.value = [...varEntries.value, ...selectionEntries.value, ...scopeEntries.value];
67
+ entries.value = [...varEntries.value, ...selectionEntries.value, ...stepEntries.value, ...scopeEntries.value];
63
68
  hoveredName.value = entries.value[0]?.id ?? null;
64
69
  }
65
70
  });
@@ -97,6 +102,7 @@ const addonAlign = computed(
97
102
  :multiline="props.multiline"
98
103
  :scope-lookup="scopeLookup"
99
104
  :selection-lookup="selectionLookup"
105
+ :step-lookup="stepLookup"
100
106
  :class="props.class"
101
107
  @update:model-value="(v) => emits('update:modelValue', v)"
102
108
  />
@@ -170,6 +176,29 @@ const addonAlign = computed(
170
176
  </span>
171
177
  </CommandItem>
172
178
  </CommandGroup>
179
+ <CommandGroup
180
+ v-if="shownSteps.length > 0"
181
+ heading="前序步骤"
182
+ >
183
+ <CommandItem
184
+ v-for="entry in shownSteps"
185
+ :key="entry.id"
186
+ :value="`${entry.display} ${entry.id}`"
187
+ class="cursor-pointer gap-2"
188
+ @select="insertVariable(entry.insert)"
189
+ @mouseenter="hoveredName = entry.id"
190
+ @focus="hoveredName = entry.id"
191
+ >
192
+ <Icon
193
+ icon="fluent:arrow-step-over-20-regular"
194
+ class="size-3.5 shrink-0 text-sky-500"
195
+ />
196
+ <span class="flex-1 truncate text-xs text-zinc-700">{{ entry.display }}</span>
197
+ <span class="rounded bg-sky-100 px-1.5 py-0.5 font-mono text-[10px] leading-none text-sky-700 select-none">
198
+ {{ entry.type }}
199
+ </span>
200
+ </CommandItem>
201
+ </CommandGroup>
173
202
  <CommandGroup
174
203
  v-if="shownScopes.length > 0"
175
204
  heading="跨层引用"
@@ -14,11 +14,11 @@ type __VLS_Props = {
14
14
  extraVars?: Record<string, VarSpec>;
15
15
  unlistedVarsAreDyn?: boolean;
16
16
  };
17
- declare var __VLS_13: {}, __VLS_150: {};
17
+ declare var __VLS_13: {}, __VLS_171: {};
18
18
  type __VLS_Slots = {} & {
19
19
  leading?: (props: typeof __VLS_13) => any;
20
20
  } & {
21
- trailing?: (props: typeof __VLS_150) => any;
21
+ trailing?: (props: typeof __VLS_171) => any;
22
22
  };
23
23
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
24
24
  "update:modelValue": (payload: string) => any;
@@ -1,7 +1,7 @@
1
- import { type ScopeAncestor, type SelectionFieldRef } from '../../../utils/cel-context.js';
1
+ import { type ScopeAncestor, type SelectionFieldRef, type StepRef } from '../../../utils/cel-context.js';
2
2
  export type PickEntry = {
3
3
  id: string;
4
- group: 'var' | 'scope' | 'selection';
4
+ group: 'var' | 'scope' | 'selection' | 'step';
5
5
  insert: string;
6
6
  display: string;
7
7
  label: string;
@@ -15,4 +15,5 @@ export type PickVarMeta = {
15
15
  };
16
16
  export declare function buildVarEntries(celContext: Record<string, PickVarMeta>, extraVars?: Record<string, PickVarMeta>): PickEntry[];
17
17
  export declare function buildSelectionEntries(roster: ReadonlyArray<SelectionFieldRef>): PickEntry[];
18
+ export declare function buildStepEntries(roster: ReadonlyArray<StepRef>): PickEntry[];
18
19
  export declare function buildScopeEntries(ancestry: ReadonlyArray<ScopeAncestor>): PickEntry[];
@@ -1,6 +1,6 @@
1
- import { SCOPE_ADDRESS_VAR, SELECTIONS_VAR } from "../../../utils/cel-context.js";
1
+ import { SCOPE_ADDRESS_VAR, SELECTIONS_VAR, STEPS_VAR } from "../../../utils/cel-context.js";
2
2
  import { scopeOrigin } from "./scope-refs.js";
3
- const SUPPRESSED_VARS = /* @__PURE__ */ new Set([SCOPE_ADDRESS_VAR, SELECTIONS_VAR]);
3
+ const SUPPRESSED_VARS = /* @__PURE__ */ new Set([SCOPE_ADDRESS_VAR, SELECTIONS_VAR, STEPS_VAR]);
4
4
  export function buildVarEntries(celContext, extraVars) {
5
5
  const out = [];
6
6
  const seen = /* @__PURE__ */ new Set();
@@ -25,6 +25,17 @@ export function buildSelectionEntries(roster) {
25
25
  type: "dyn"
26
26
  }));
27
27
  }
28
+ export function buildStepEntries(roster) {
29
+ return roster.filter((step) => step.valid).map((step) => ({
30
+ id: `step:${step.id}`,
31
+ group: "step",
32
+ insert: `${STEPS_VAR}[${JSON.stringify(step.id)}]`,
33
+ display: step.label,
34
+ label: "\u524D\u5E8F\u6B65\u9AA4",
35
+ type: "dyn",
36
+ description: step.description
37
+ }));
38
+ }
28
39
  export function buildScopeEntries(ancestry) {
29
40
  const out = [];
30
41
  for (const ancestor of ancestry) {
@@ -0,0 +1,5 @@
1
+ import { type Extension, Facet } from '@codemirror/state';
2
+ import { type StepChipInfo } from './step-refs.js';
3
+ export declare const stepLookupFacet: Facet<Map<string, StepChipInfo>, Map<string, StepChipInfo>>;
4
+ /** The full step inline-chip extension: decoration plugin + theme. */
5
+ export declare function stepChips(): Extension;
@@ -0,0 +1,132 @@
1
+ import { Facet, RangeSetBuilder } from "@codemirror/state";
2
+ import {
3
+ Decoration,
4
+ EditorView,
5
+ ViewPlugin,
6
+ WidgetType
7
+ } from "@codemirror/view";
8
+ import { scanStepRefs } from "./step-refs.js";
9
+ export const stepLookupFacet = Facet.define({
10
+ combine: (values) => values.length > 0 ? values[values.length - 1] : /* @__PURE__ */ new Map()
11
+ });
12
+ class StepChipWidget extends WidgetType {
13
+ constructor(id, info) {
14
+ super();
15
+ this.id = id;
16
+ this.info = info;
17
+ }
18
+ eq(other) {
19
+ return other.id === this.id && other.info?.label === this.info?.label && other.info?.valid === this.info?.valid;
20
+ }
21
+ toDOM() {
22
+ const chip = document.createElement("span");
23
+ chip.className = "cm-step-chip";
24
+ chip.setAttribute("data-step-id", this.id);
25
+ const tag = document.createElement("span");
26
+ tag.className = "cm-step-chip-tag";
27
+ tag.textContent = "\u6B65\u9AA4";
28
+ chip.appendChild(tag);
29
+ const text = document.createElement("span");
30
+ text.className = "cm-step-chip-label";
31
+ if (this.info === null) {
32
+ chip.classList.add("cm-step-chip-dangling");
33
+ const short = this.id.length > 8 ? `${this.id.slice(0, 8)}\u2026` : this.id;
34
+ text.textContent = short;
35
+ chip.title = `\u672A\u77E5\u6B65\u9AA4 ${this.id}`;
36
+ } else if (!this.info.valid) {
37
+ chip.classList.add("cm-step-chip-invalid");
38
+ text.textContent = this.info.label;
39
+ chip.title = `${this.info.label}\u5728\u672C\u6B65\u9AA4\u4E4B\u540E\u6267\u884C\uFF0C\u4E0D\u53EF\u5F15\u7528\u5176\u8F93\u51FA`;
40
+ } else {
41
+ text.textContent = this.info.label;
42
+ chip.title = `\u524D\u5E8F\u6B65\u9AA4 \xB7 ${this.info.label}`;
43
+ }
44
+ chip.appendChild(text);
45
+ return chip;
46
+ }
47
+ ignoreEvent() {
48
+ return false;
49
+ }
50
+ }
51
+ function buildChips(view) {
52
+ const lookup = view.state.facet(stepLookupFacet);
53
+ const builder = new RangeSetBuilder();
54
+ for (const ref of scanStepRefs(view.state.doc.toString())) {
55
+ const info = lookup.get(ref.id) ?? null;
56
+ builder.add(
57
+ ref.from,
58
+ ref.to,
59
+ Decoration.replace({ widget: new StepChipWidget(ref.id, info) })
60
+ );
61
+ }
62
+ return builder.finish();
63
+ }
64
+ const chipPlugin = ViewPlugin.fromClass(
65
+ class {
66
+ decorations;
67
+ constructor(view) {
68
+ this.decorations = buildChips(view);
69
+ }
70
+ update(update) {
71
+ if (update.docChanged || update.viewportChanged || update.startState.facet(stepLookupFacet) !== update.state.facet(stepLookupFacet)) {
72
+ this.decorations = buildChips(update.view);
73
+ }
74
+ }
75
+ },
76
+ {
77
+ decorations: (plugin) => plugin.decorations,
78
+ // Atomic so the caret steps over a chip and Backspace removes the whole
79
+ // `steps["id"]` at once — matching the scope/selection chips' feel.
80
+ provide: (plugin) => EditorView.atomicRanges.of((view) => view.plugin(plugin)?.decorations ?? Decoration.none)
81
+ }
82
+ );
83
+ const chipTheme = EditorView.theme({
84
+ ".cm-step-chip": {
85
+ display: "inline-flex",
86
+ alignItems: "center",
87
+ gap: "0.25rem",
88
+ margin: "0 1px",
89
+ padding: "0.125rem 0.25rem",
90
+ borderRadius: "0.25rem",
91
+ background: "#f0f9ff",
92
+ border: "1px solid #bae6fd",
93
+ color: "#0369a1",
94
+ fontFamily: "ui-sans-serif, system-ui, sans-serif",
95
+ verticalAlign: "baseline",
96
+ cursor: "default",
97
+ whiteSpace: "nowrap"
98
+ },
99
+ ".cm-step-chip-invalid": {
100
+ background: "#fffbeb",
101
+ borderColor: "#fde68a",
102
+ color: "#b45309"
103
+ },
104
+ ".cm-step-chip-dangling": {
105
+ background: "#fef2f2",
106
+ borderColor: "#fecaca",
107
+ color: "#b91c1c"
108
+ },
109
+ ".cm-step-chip-tag": {
110
+ borderRadius: "0.125rem",
111
+ background: "#e0f2fe",
112
+ padding: "0.05rem 0.2rem",
113
+ fontSize: "9px",
114
+ lineHeight: "1",
115
+ color: "#0284c7"
116
+ },
117
+ ".cm-step-chip-invalid .cm-step-chip-tag": {
118
+ background: "#fef3c7",
119
+ color: "#b45309"
120
+ },
121
+ ".cm-step-chip-dangling .cm-step-chip-tag": {
122
+ background: "#fee2e2",
123
+ color: "#b91c1c"
124
+ },
125
+ ".cm-step-chip-label": {
126
+ fontSize: "0.75rem",
127
+ lineHeight: "1.1"
128
+ }
129
+ });
130
+ export function stepChips() {
131
+ return [chipPlugin, chipTheme];
132
+ }
@@ -0,0 +1,17 @@
1
+ import { type StepRef } from '../../../utils/cel-context.js';
2
+ export type StepRefOccurrence = {
3
+ from: number;
4
+ to: number;
5
+ id: string;
6
+ };
7
+ export declare function scanStepRefs(text: string): StepRefOccurrence[];
8
+ /** What the chip renders for one known step — its position label + validity. */
9
+ export type StepChipInfo = {
10
+ label: string;
11
+ /**
12
+ * False when the step sits at or after the referencing row (a forward ref
13
+ * created by reorder) — chipped as a warning, not as dangling.
14
+ */
15
+ valid: boolean;
16
+ };
17
+ export declare function buildStepLookup(roster: ReadonlyArray<StepRef>): Map<string, StepChipInfo>;
@@ -0,0 +1,29 @@
1
+ import { STEPS_VAR } from "../../../utils/cel-context.js";
2
+ const STEP_REF_RE = new RegExp(
3
+ `(?<![\\w$.])${STEPS_VAR}\\[("(?:[^"\\\\]|\\\\.)*")\\]`,
4
+ "g"
5
+ );
6
+ export function scanStepRefs(text) {
7
+ const out = [];
8
+ STEP_REF_RE.lastIndex = 0;
9
+ let match;
10
+ while ((match = STEP_REF_RE.exec(text)) !== null) {
11
+ let id;
12
+ try {
13
+ id = JSON.parse(match[1]);
14
+ } catch {
15
+ continue;
16
+ }
17
+ out.push({
18
+ from: match.index,
19
+ to: match.index + match[0].length,
20
+ id
21
+ });
22
+ }
23
+ return out;
24
+ }
25
+ export function buildStepLookup(roster) {
26
+ const lookup = /* @__PURE__ */ new Map();
27
+ for (const step of roster) lookup.set(step.id, { label: step.label, valid: step.valid });
28
+ return lookup;
29
+ }
@@ -1,6 +1,31 @@
1
1
  import { Effect, Schema } from 'effect';
2
2
  import type { InjectionKey, Ref } from 'vue';
3
3
  import type { CelEvaluator } from './interpolate.js';
4
+ /**
5
+ * One trigger row's window onto its chain run — the channel through which a
6
+ * later step reads what earlier steps published (the CEL `steps` variable) and
7
+ * a publishing operation (e.g. the HTTP request op) deposits its own output.
8
+ *
9
+ * Scoped to ONE `dispatchTriggers` run: the outputs map is minted per run, so
10
+ * two clicks of the same button never see each other's responses. Sequential
11
+ * execution (triggers run serially, in list order) is what makes a plain
12
+ * mutable map safe here — unlike the reactive selections registry there is no
13
+ * concurrent reader to notify, so no shallowRef/dedup machinery.
14
+ */
15
+ export type ChainStep = Readonly<{
16
+ /**
17
+ * Outputs published by the steps that already ran in this chain, keyed by
18
+ * their trigger-row `id`. A thunk (not a snapshot) so a handler that defers
19
+ * evaluation still reads the map as of its own turn.
20
+ */
21
+ outputs: () => Readonly<Record<string, unknown>>;
22
+ /**
23
+ * Publish this step's output for later steps to read. A no-op when the
24
+ * trigger row carries no persisted `id` (a legacy row) — there is then no
25
+ * address a later expression could reference it by.
26
+ */
27
+ publish: (output: unknown) => void;
28
+ }>;
4
29
  /** A descendant button asking an ancestor instance to run an operation. */
5
30
  export type OpRequest = Readonly<{
6
31
  /** Instance id of the ancestor that should handle this request. */
@@ -25,6 +50,12 @@ export type OpRequest = Readonly<{
25
50
  * its host's own evaluator.
26
51
  */
27
52
  cel?: CelEvaluator;
53
+ /**
54
+ * This request's window onto its chain run — read earlier steps' outputs,
55
+ * publish your own. Stamped by `dispatchTriggers`; absent when the request
56
+ * was dispatched outside a trigger chain.
57
+ */
58
+ step?: ChainStep;
28
59
  }>;
29
60
  /**
30
61
  * The persisted form of a trigger — one stored row addressing an ancestor
@@ -32,6 +63,7 @@ export type OpRequest = Readonly<{
32
63
  * `OpRequest`.
33
64
  */
34
65
  export declare const Trigger: Schema.Struct<{
66
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
35
67
  target: Schema.refine<string, typeof Schema.String>;
36
68
  operation: Schema.SchemaClass<string, string, never>;
37
69
  compatibilityDate: Schema.optional<Schema.SchemaClass<string, string, never>>;
@@ -45,6 +77,7 @@ export declare const Trigger: Schema.Struct<{
45
77
  * fire, is decided by the button type. List order is execution order.
46
78
  */
47
79
  export declare const Triggers: Schema.Array$<Schema.Struct<{
80
+ id: Schema.optional<Schema.refine<string, typeof Schema.String>>;
48
81
  target: Schema.refine<string, typeof Schema.String>;
49
82
  operation: Schema.SchemaClass<string, string, never>;
50
83
  compatibilityDate: Schema.optional<Schema.SchemaClass<string, string, never>>;
@@ -91,7 +124,7 @@ export type EventChannel = Readonly<{
91
124
  * pre-request trigger list, so validation is explicit and configured rather
92
125
  * than an implicit host gate.
93
126
  */
94
- export type OperationHandlers = Readonly<Record<string, (params?: unknown, cel?: CelEvaluator) => Effect.Effect<void>>>;
127
+ export type OperationHandlers = Readonly<Record<string, (params?: unknown, cel?: CelEvaluator, step?: ChainStep) => Effect.Effect<void>>>;
95
128
  export declare const EVENT_CHANNEL_KEY: InjectionKey<EventChannel>;
96
129
  /**
97
130
  * Build a channel node for an operation-exposing instance. `dispatch` runs