@atscript/vue-wf 0.1.70 → 0.1.72

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.
@@ -129,21 +129,21 @@ function useWfForm(options) {
129
129
  if (new URLSearchParams(window.location.search).get(tokenName)) console.warn(`[useWfForm] URL contains ?${tokenName}=… but no \`initialToken\` was passed and \`tokenTransport\` is "${transport}". Workflow will start fresh instead of resuming the magic-link flow. Pass \`initial-token="route.query.${tokenName}"\` or set \`tokenTransport: "query"\`.`);
130
130
  }
131
131
  const body = { [wfidName]: options.name };
132
- if (input) body.input = input;
132
+ if (input) body.input = { formData: input };
133
133
  if (initialToken) body[tokenName] = initialToken;
134
134
  await post(body);
135
135
  }
136
136
  async function submit(data) {
137
- await post({ input: data });
137
+ await post({ input: { formData: data } });
138
138
  }
139
139
  async function action(name) {
140
- await post({ action: name });
140
+ await post({ input: { action: name } });
141
141
  }
142
142
  async function actionWithData(name, data) {
143
- await post({
144
- input: data,
145
- action: name
146
- });
143
+ await post({ input: {
144
+ action: name,
145
+ formData: data
146
+ } });
147
147
  }
148
148
  async function retry() {
149
149
  if (lastRequestBody) await post(lastRequestBody);
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-wf-form.vue-CkpfsyQH.mjs";
1
+ import { t as _default } from "./as-wf-form.vue-TL4xxHyM.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_wf_form_default } from "./as-wf-form-CwWizwko.mjs";
1
+ import { t as as_wf_form_default } from "./as-wf-form-DVRd6Jvc.mjs";
2
2
  export { as_wf_form_default as default };
@@ -196,26 +196,26 @@ type __VLS_Slots = {} & {
196
196
  'form.footer'?: (props: typeof __VLS_58) => any;
197
197
  };
198
198
  declare const __VLS_base: vue.DefineComponent<AsWfFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
199
- dismiss: () => any;
200
- action: (action: WfActionRequest) => any;
199
+ finished: (response: unknown) => any;
201
200
  error: (error: {
202
201
  message: string;
203
202
  status?: number;
204
203
  }) => any;
205
- finished: (response: unknown) => any;
206
204
  submit: (data: unknown) => any;
207
205
  loading: (isLoading: boolean) => any;
206
+ dismiss: () => any;
207
+ action: (action: WfActionRequest) => any;
208
208
  form: (def: FormDef, context?: Record<string, unknown> | undefined) => any;
209
209
  }, string, vue.PublicProps, Readonly<AsWfFormProps> & Readonly<{
210
- onDismiss?: (() => any) | undefined;
211
- onAction?: ((action: WfActionRequest) => any) | undefined;
210
+ onFinished?: ((response: unknown) => any) | undefined;
212
211
  onError?: ((error: {
213
212
  message: string;
214
213
  status?: number;
215
214
  }) => any) | undefined;
216
- onFinished?: ((response: unknown) => any) | undefined;
217
215
  onSubmit?: ((data: unknown) => any) | undefined;
218
216
  onLoading?: ((isLoading: boolean) => any) | undefined;
217
+ onDismiss?: (() => any) | undefined;
218
+ onAction?: ((action: WfActionRequest) => any) | undefined;
219
219
  onForm?: ((def: FormDef, context?: Record<string, unknown> | undefined) => any) | undefined;
220
220
  }>, {
221
221
  tokenTransport: "body" | "cookie" | "query";
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { a as WfNext, i as WfMessage, n as WfButton, r as WfFinished, t as WfActionRequest } from "./index-C5MmoWFB.mjs";
2
- import { i as useWfForm, n as UseWfFormOptions, r as UseWfFormReturn, t as _default$1 } from "./as-wf-form.vue-CkpfsyQH.mjs";
2
+ import { i as useWfForm, n as UseWfFormOptions, r as UseWfFormReturn, t as _default$1 } from "./as-wf-form.vue-TL4xxHyM.mjs";
3
3
  import { t as _default } from "./as-wf-finish.vue-BhXMooP3.mjs";
4
4
  export { _default as AsWfFinish, _default$1 as AsWfForm, type UseWfFormOptions, type UseWfFormReturn, type WfActionRequest, type WfButton, type WfFinished, type WfMessage, type WfNext, useWfForm };
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { n as useWfForm, t as as_wf_form_default } from "./as-wf-form-CwWizwko.mjs";
1
+ import { n as useWfForm, t as as_wf_form_default } from "./as-wf-form-DVRd6Jvc.mjs";
2
2
  import { t as as_wf_finish_default } from "./as-wf-finish-CfbsKJhX.mjs";
3
3
  export { as_wf_finish_default as AsWfFinish, as_wf_form_default as AsWfForm, useWfForm };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/vue-wf",
3
- "version": "0.1.70",
3
+ "version": "0.1.72",
4
4
  "description": "Workflow form integration for Vue 3 — HTTP round-trip loop driven by atscript type metadata",
5
5
  "keywords": [
6
6
  "atscript",
@@ -50,25 +50,25 @@
50
50
  "access": "public"
51
51
  },
52
52
  "dependencies": {
53
- "@atscript/ui": "^0.1.70"
53
+ "@atscript/ui": "^0.1.72"
54
54
  },
55
55
  "devDependencies": {
56
- "@atscript/core": "^0.1.58",
57
- "@atscript/typescript": "^0.1.58",
56
+ "@atscript/core": "^0.1.59",
57
+ "@atscript/typescript": "^0.1.59",
58
58
  "@vitejs/plugin-vue": "^6",
59
59
  "@vue/test-utils": "^2",
60
60
  "happy-dom": "^18",
61
- "unplugin-atscript": "^0.1.58",
61
+ "unplugin-atscript": "^0.1.59",
62
62
  "vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
63
63
  "vue": "^3",
64
64
  "vue-tsc": "^3.2.6",
65
- "@atscript/vue-form": "^0.1.70",
66
- "@atscript/moost-wf": "^0.1.70"
65
+ "@atscript/moost-wf": "^0.1.72",
66
+ "@atscript/vue-form": "^0.1.72"
67
67
  },
68
68
  "peerDependencies": {
69
- "@atscript/typescript": "^0.1.58",
69
+ "@atscript/typescript": "^0.1.59",
70
70
  "vue": "^3",
71
- "@atscript/vue-form": "^0.1.70"
71
+ "@atscript/vue-form": "^0.1.72"
72
72
  },
73
73
  "scripts": {
74
74
  "build": "node ../../scripts/gen-exports.mjs && vp pack",