@bagelink/vue 1.15.468 → 1.15.474

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.15.468",
4
+ "version": "1.15.474",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -222,8 +222,9 @@ async function onPrimary() {
222
222
  if (!step?.skipSubmit) await props.onComplete?.(submittedData)
223
223
  // Emit formComplete with standardised payload before completing.
224
224
  if (currentKey.value) emit('formComplete', buildPayload(currentKey.value))
225
- emit('complete', { ...formData.value })
226
- // Redirect last: leaves the page after analytics + host handling.
225
+ // Redirect before the generic completion event. Hosts commonly
226
+ // replace the player with success UI on `complete`; emitting it first
227
+ // can unmount this component before navigation executes.
227
228
  const url = step?.redirectUrl?.trim()
228
229
  if (url) {
229
230
  emit('redirect', url)
@@ -231,6 +232,7 @@ async function onPrimary() {
231
232
  window.location.assign(url)
232
233
  }
233
234
  }
235
+ emit('complete', { ...formData.value })
234
236
  }
235
237
  finally {
236
238
  submitting.value = false