@modular-vue/journeys 1.0.0 → 1.2.0

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Igor Savin
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Igor Savin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,137 +1,149 @@
1
- # @modular-vue/journeys
2
-
3
- Vue 3 journeys for `@modular-vue`. Journeys are typed, serializable workflows
4
- that compose multiple modules: a journey declares entry/exit transitions between
5
- modules and owns shared state, while the modules stay journey-unaware.
6
-
7
- This package is the Vue binding over the framework-neutral
8
- [`@modular-frontend/journeys-engine`](../journeys-engine). It re-exports the
9
- engine's authoring surface (`defineJourney`, handles, persistence, transition
10
- helpers) and adds the Vue-specific pieces: the provider, the composables, the
11
- outlet, and the registry plugin.
12
-
13
- The React binding is [`@modular-react/journeys`](../journeys); the two are kept
14
- at parity, and its README carries the long-form guides (authoring patterns,
15
- invoke/resume, persistence) that apply to both.
16
-
17
- ## Installation
18
-
19
- ```bash
20
- npm install @modular-vue/journeys
21
- ```
22
-
23
- ## What's included
24
-
25
- - **`<JourneyProvider :runtime="…">`** — provides the journey runtime to
26
- descendant journey hosts and mounts `<ModuleExitProvider>` so module exits
27
- fired outside a step reach the shell's `onModuleExit`.
28
- - **`<JourneyOutlet :instance-id="…">`** — renders the current step of a running
29
- instance: mount-kind checks, loading, error boundary + policy, terminal, idle
30
- preload, and abandon-on-unmount. Walks the active call chain to the leaf by
31
- default.
32
- - **`<JourneyHost :handle="…" :input="…">`** — mounts a journey in one line:
33
- starts it on mount, renders its step, ends + forgets the instance on unmount.
34
- Outlet props pass through as attrs, in either spelling (`:on-finished` and
35
- `:onFinished` both reach the outlet); the default scoped slot receives
36
- `{ instanceId, instance, stepIndex, outlet }` for chrome.
37
- - **`useJourneyHost(handle, input, options?)`** the lifecycle without the
38
- rendering. Returns `{ instanceId, instance, stepIndex }` as refs, plus the
39
- plain `runtime` it resolved at setup — the one `instanceId` is valid on.
40
- - **`useJourneySync(id, port, options?)`** keeps a journey and the URL in step
41
- both ways: the journey advances and the URL follows; Back/Forward drive
42
- `rewindTo` / `goForward`. You supply a small `JourneySyncPort` for vue-router.
43
- - **`useJourneyState(id)` / `useJourneyInstance(id)`** subscribe to one
44
- journey instance; return a reactive ref of its `state` (or full snapshot).
45
- - **`useActiveLeafJourneyState(rootId)` / `useActiveLeafJourneyInstance(rootId)`**
46
- walk the `activeChildId` chain and track the deepest active leaf, so a
47
- parent host reads the child sub-flow's state without knowing the depth.
48
- - **`<ModuleTab>`** renders a single module entry outside a route and forwards
49
- its exits to the shell. The non-journey counterpart to the outlet.
50
- - **`useWaitForExit(exit, channels)`** for step components that wait on an
51
- async backend event: races a push `subscribe` channel, a `poll` channel, and a
52
- `timeout` arm with first-wins-latched dispatch.
53
- - **`journeysPlugin(options?)`** pass to `createRegistry({ plugins: [...] })`
54
- to contribute `registerJourney(...)`, validate journey contracts against
55
- registered modules, produce the `JourneyRuntime` on
56
- `manifest.extensions.journeys`, and wrap the provider stack in
57
- `<JourneyProvider>`.
58
-
59
- ## Usage
60
-
61
- ```ts
62
- // app-shared: register the plugin and journeys
63
- import { createRegistry } from "@modular-vue/runtime";
64
- import { journeysPlugin, defineJourney } from "@modular-vue/journeys";
65
-
66
- const registry = createRegistry<AppDeps, AppSlots>({ stores, services, slots });
67
- const journeys = journeysPlugin();
68
- registry.use(journeys);
69
-
70
- registry.registerJourney(checkoutJourney, {
71
- nav: { label: "Checkout", group: "flows" },
72
- });
73
- ```
74
-
75
- ```vue
76
- <!-- a host component reading the active leaf's state -->
77
- <script setup lang="ts">
78
- import { useActiveLeafJourneyInstance } from "@modular-vue/journeys";
79
-
80
- const props = defineProps<{ rootId: string }>();
81
- const leaf = useActiveLeafJourneyInstance(props.rootId);
82
- </script>
83
-
84
- <template>
85
- <span>{{ leaf?.step?.moduleId }} — {{ leaf?.status }}</span>
86
- </template>
87
- ```
88
-
89
- ```vue
90
- <!-- a journey route: mounted, deep-linked, cleaned up -->
91
- <script setup lang="ts">
92
- import { useRoute, useRouter } from "vue-router";
93
- import { JourneyOutlet, useJourneyHost, useJourneySync } from "@modular-vue/journeys";
94
- import type { JourneySyncPort } from "@modular-vue/journeys";
95
- import { checkoutHandle } from "@app/journeys-checkout";
96
-
97
- const props = defineProps<{ cartId: string }>();
98
- const router = useRouter();
99
- const route = useRoute();
100
-
101
- const { instanceId, stepIndex } = useJourneyHost(checkoutHandle, { cartId: props.cartId });
102
-
103
- const port: JourneySyncPort = {
104
- read: () => String(route.params.step ?? ""),
105
- push: (path) => void router.push({ name: "checkout", params: { step: path } }),
106
- replace: (path) => void router.replace({ name: "checkout", params: { step: path } }),
107
- go: (delta) => router.go(delta),
108
- subscribe: (listener) => router.afterEach(() => listener()),
109
- };
110
-
111
- useJourneySync(instanceId, port, { stepToPath: (step) => step.entry });
112
- </script>
113
-
114
- <template>
115
- <p>Step {{ stepIndex + 1 }}</p>
116
- <JourneyOutlet v-if="instanceId" :instance-id="instanceId" />
117
- </template>
118
- ```
119
-
120
- `useJourneyHost` starts the journey on mount and ends + forgets it on unmount;
121
- `useJourneySync` owns the URL. Neither knows about the other, and `instanceId`
122
- is `null` for the first render (the journey is started from `onMounted`, so the
123
- start is guaranteed to be paired with an unmount that ends it).
124
-
125
- A URL cannot navigate a journey to an arbitrary step — a step is derived from
126
- state, so the only positions a location can select are ones the journey has
127
- already been to. See
128
- [Deep-linking steps](../journeys/README.md#deep-linking-steps---usejourneysync)
129
- in the React README for the full model; the reconciler is the same code.
130
-
131
- ## Reactivity
132
-
133
- The composables mirror the React hooks but return Vue refs. A single-instance
134
- composable subscribes at setup and pushes fresh snapshots into a `shallowRef` on
135
- every runtime change; the leaf-walking composables re-subscribe as the active
136
- chain grows (a parent invokes a child) or shrinks (a child terminates and the
137
- parent resumes). Read `.value` at the call site, or bind directly in templates.
1
+ # @modular-vue/journeys
2
+
3
+ Vue 3 journeys for `@modular-vue`. Journeys are typed, serializable workflows
4
+ that compose multiple modules: a journey declares entry/exit transitions between
5
+ modules and owns shared state, while the modules stay journey-unaware.
6
+
7
+ This package is the Vue binding over the framework-neutral
8
+ [`@modular-frontend/journeys-engine`](../journeys-engine). It re-exports the
9
+ engine's authoring surface (`defineJourney`, handles, persistence, transition
10
+ helpers) and adds the Vue-specific pieces: the provider, the composables, the
11
+ outlet, and the registry plugin.
12
+
13
+ The React binding is [`@modular-react/journeys`](../journeys); the two are kept
14
+ at parity, and its README carries the long-form guides (authoring patterns,
15
+ invoke/resume, persistence) that apply to both.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ npm install @modular-vue/journeys
21
+ ```
22
+
23
+ ## What's included
24
+
25
+ - **`<JourneyProvider :runtime="…">`** — provides the journey runtime to
26
+ descendant journey hosts and mounts `<ModuleExitProvider>` so module exits
27
+ fired outside a step reach the shell's `onModuleExit`.
28
+ - **`<JourneyOutlet :instance-id="…">`** — renders the current step of a running
29
+ instance: mount-kind checks, loading, error boundary + policy, terminal, idle
30
+ preload, and abandon-on-unmount. Walks the active call chain to the leaf by
31
+ default.
32
+ - **`<JourneyHost :handle="…" :input="…">`** — mounts a journey in one line:
33
+ starts it on mount, renders its step, ends + forgets the instance on unmount.
34
+ Outlet props pass through as attrs, in either spelling (`:on-finished` and
35
+ `:onFinished` both reach the outlet); the default scoped slot receives
36
+ `{ instanceId, instance, runtime, stepIndex, outlet }` for chrome. `outlet` is
37
+ a functional componentrender it with `<component :is="outlet" />`, or spell
38
+ it yourself as `<JourneyOutlet :instance-id="instanceId" :runtime="runtime" />`.
39
+ - **`useJourneyHost(handle, input, options?)`** — the lifecycle without the
40
+ rendering. Returns `{ instanceId, instance, stepIndex }` as refs, plus the
41
+ plain `runtime` it resolved at setup the one `instanceId` is valid on.
42
+ - **`useJourneySync(id, port, options?)`** keeps a journey and the URL in step
43
+ both ways: the journey advances and the URL follows; Back/Forward drive
44
+ `rewindTo` / `goForward`. You supply a small `JourneySyncPort` for vue-router.
45
+ - **`useJourneyState(id)` / `useJourneyInstance(id)`** — subscribe to one
46
+ journey instance; return a reactive ref of its `state` (or full snapshot).
47
+ - **`useActiveLeafJourneyState(rootId)` / `useActiveLeafJourneyInstance(rootId)`**
48
+ walk the `activeChildId` chain and track the deepest active leaf, so a
49
+ parent host reads the child sub-flow's state without knowing the depth.
50
+ - **`<ModuleTab>`**renders a single module entry outside a route and forwards
51
+ its exits to the shell. The non-journey counterpart to the outlet.
52
+ - **`useWaitForExit(exit, channels)`** for step components that wait on an
53
+ async backend event: races a push `subscribe` channel, a `poll` channel, and a
54
+ `timeout` arm with first-wins-latched dispatch.
55
+ - **`journeysPlugin(options?)`** pass to `createRegistry({ plugins: [...] })`
56
+ to contribute `registerJourney(...)`, validate journey contracts against
57
+ registered modules, produce the `JourneyRuntime` on
58
+ `manifest.extensions.journeys`, and wrap the provider stack in
59
+ `<JourneyProvider>`. In the router-owning install path it also threads the
60
+ runtime app-wide via its `appProvides` hook, so `app.use(manifest)` provides
61
+ `journeyKey` with no shell wiring.
62
+ - **`createPiniaJourneyPersistence(options)`** a `JourneyPersistence` backed
63
+ by a Pinia store you own (keyed like `createWebStoragePersistence`), so
64
+ in-flight journeys live in your Pinia tree and resume across a modal
65
+ close/reopen. Structural store shape — takes no `pinia` dependency.
66
+ - **`provideJourneyRuntime(app, runtime, options?)`** the app-level twin of
67
+ `<JourneyProvider>` (analog of `provideNavigation` / `provideSlots`), for
68
+ wiring a hand-built runtime without the plugin. Usually unnecessary — the
69
+ plugin auto-threads via `app.use(manifest)`.
70
+
71
+ ## Usage
72
+
73
+ ```ts
74
+ // app-shared: register the plugin and journeys
75
+ import { createRegistry } from "@modular-vue/runtime";
76
+ import { journeysPlugin, defineJourney } from "@modular-vue/journeys";
77
+
78
+ const registry = createRegistry<AppDeps, AppSlots>({ stores, services, slots });
79
+ const journeys = journeysPlugin();
80
+ registry.use(journeys);
81
+
82
+ registry.registerJourney(checkoutJourney, {
83
+ nav: { label: "Checkout", group: "flows" },
84
+ });
85
+ ```
86
+
87
+ ```vue
88
+ <!-- a host component reading the active leaf's state -->
89
+ <script setup lang="ts">
90
+ import { useActiveLeafJourneyInstance } from "@modular-vue/journeys";
91
+
92
+ const props = defineProps<{ rootId: string }>();
93
+ const leaf = useActiveLeafJourneyInstance(props.rootId);
94
+ </script>
95
+
96
+ <template>
97
+ <span>{{ leaf?.step?.moduleId }} {{ leaf?.status }}</span>
98
+ </template>
99
+ ```
100
+
101
+ ```vue
102
+ <!-- a journey route: mounted, deep-linked, cleaned up -->
103
+ <script setup lang="ts">
104
+ import { useRoute, useRouter } from "vue-router";
105
+ import { JourneyOutlet, useJourneyHost, useJourneySync } from "@modular-vue/journeys";
106
+ import type { JourneySyncPort } from "@modular-vue/journeys";
107
+ import { checkoutHandle } from "@app/journeys-checkout";
108
+
109
+ const props = defineProps<{ cartId: string }>();
110
+ const router = useRouter();
111
+ const route = useRoute();
112
+
113
+ const { instanceId, stepIndex } = useJourneyHost(checkoutHandle, { cartId: props.cartId });
114
+
115
+ const port: JourneySyncPort = {
116
+ read: () => String(route.params.step ?? ""),
117
+ push: (path) => void router.push({ name: "checkout", params: { step: path } }),
118
+ replace: (path) => void router.replace({ name: "checkout", params: { step: path } }),
119
+ go: (delta) => router.go(delta),
120
+ subscribe: (listener) => router.afterEach(() => listener()),
121
+ };
122
+
123
+ useJourneySync(instanceId, port, { stepToPath: (step) => step.entry });
124
+ </script>
125
+
126
+ <template>
127
+ <p>Step {{ stepIndex + 1 }}</p>
128
+ <JourneyOutlet v-if="instanceId" :instance-id="instanceId" />
129
+ </template>
130
+ ```
131
+
132
+ `useJourneyHost` starts the journey on mount and ends + forgets it on unmount;
133
+ `useJourneySync` owns the URL. Neither knows about the other, and `instanceId`
134
+ is `null` for the first render (the journey is started from `onMounted`, so the
135
+ start is guaranteed to be paired with an unmount that ends it).
136
+
137
+ A URL cannot navigate a journey to an arbitrary step a step is derived from
138
+ state, so the only positions a location can select are ones the journey has
139
+ already been to. See
140
+ [Deep-linking steps](../journeys/README.md#deep-linking-steps---usejourneysync)
141
+ in the React README for the full model; the reconciler is the same code.
142
+
143
+ ## Reactivity
144
+
145
+ The composables mirror the React hooks but return Vue refs. A single-instance
146
+ composable subscribes at setup and pushes fresh snapshots into a `shallowRef` on
147
+ every runtime change; the leaf-walking composables re-subscribe as the active
148
+ chain grows (a parent invokes a child) or shrinks (a child terminates and the
149
+ parent resumes). Read `.value` at the call site, or bind directly in templates.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Component, ComputedRef, InjectionKey, MaybeRefOrGetter, PropType, ShallowRef, VNode } from "vue";
2
- import { ModuleExitEvent, ModuleExitHandler } from "@modular-vue/vue";
3
- import { AbandonCtx, AnnotatedTransitionHandler, AnyJourneyDefinition, ChildOutcome, EntryExitWildcardMap, EntryInputOf, EntryNamesOf, EntryTransitions, ExitCtx, ExitNamesOf, ExitNamesPairedWithEntry, ExitOnlyWildcardMap, ExitOutputOf, InstanceId, InstanceId as InstanceId$1, InvokeSpec, JourneyDefinition, JourneyDefinition as JourneyDefinition$1, JourneyDefinitionSummary, JourneyHandle, JourneyHandle as JourneyHandle$1, JourneyHydrationError, JourneyInstance, JourneyInstance as JourneyInstance$1, JourneyNavContribution, JourneyNavContribution as JourneyNavContribution$1, JourneyPersistence, JourneyRegisterOptions, JourneyRegisterOptions as JourneyRegisterOptions$1, JourneyRuntime, JourneyRuntime as JourneyRuntime$1, JourneyRuntimeOptions, JourneyStatus, JourneyStep, JourneyStep as JourneyStep$1, JourneyStepFor, JourneySync, JourneySyncAction, JourneySyncCallbackCtx, JourneySyncOptions, JourneySyncOptions as JourneySyncOptions$1, JourneySyncPort, JourneySyncPort as JourneySyncPort$1, JourneySystemAbortReason, JourneySystemAbortReasonCode, JourneyValidationError, MaybePromise, MemoryPersistence, MemoryPersistenceOptions, ModuleTypeMap, ParentLink, PendingInvoke, RegisteredJourney, ResumeBounceCounter, ResumeHandler, ResumeMap, SelectModuleCases, SelectModuleCasesPartial, SerializedJourney, StepRef, StepSpec, SyncJourneyPersistence, TerminalCtx, TerminalOutcome, TerminalOutcome as TerminalOutcome$1, TerminalSentinel, TransitionEvent, TransitionMap, TransitionResult, UnknownJourneyError, WebStoragePersistenceOptions, WildcardEntryInputOf, WildcardEntryNamesOf, WildcardExitNamesOf, WildcardExitOutputForEntry, WildcardExitOutputOf, WildcardTransitionMap, createJourneyRuntime, createJourneySync, createMemoryJourneySyncPort, createMemoryPersistence, createWebStoragePersistence, defaultStepPath, defineJourney, defineJourneyHandle, defineJourneyPersistence, defineTransition, invoke, isAnnotatedTransition, isTerminalSentinel, journeyStepPath, resolveJourneySyncAction, selectModule, selectModuleOrDefault, validateJourneyContracts, validateJourneyDefinition, validateJourneyGraph } from "@modular-frontend/journeys-engine";
1
+ import { App, Component, ComputedRef, FunctionalComponent, InjectionKey, MaybeRefOrGetter, PropType, ShallowRef, VNode } from "vue";
2
+ import { ModuleExitEvent, ModuleExitHandler, VueAppProvidingPlugin } from "@modular-vue/vue";
3
+ import { AbandonCtx, AnnotatedTransitionHandler, AnyJourneyDefinition, ChildOutcome, EntryExitWildcardMap, EntryInputOf, EntryNamesOf, EntryTransitions, ExitCtx, ExitNamesOf, ExitNamesPairedWithEntry, ExitOnlyWildcardMap, ExitOutputOf, InstanceId, InstanceId as InstanceId$1, InvokeSpec, JourneyDefinition, JourneyDefinition as JourneyDefinition$1, JourneyDefinitionSummary, JourneyHandle, JourneyHandle as JourneyHandle$1, JourneyHydrationError, JourneyInstance, JourneyInstance as JourneyInstance$1, JourneyNavContribution, JourneyNavContribution as JourneyNavContribution$1, JourneyPersistence, JourneyRegisterOptions, JourneyRegisterOptions as JourneyRegisterOptions$1, JourneyRuntime, JourneyRuntime as JourneyRuntime$1, JourneyRuntimeOptions, JourneyStatus, JourneyStep, JourneyStep as JourneyStep$1, JourneyStepFor, JourneySync, JourneySyncAction, JourneySyncCallbackCtx, JourneySyncOptions, JourneySyncOptions as JourneySyncOptions$1, JourneySyncPort, JourneySyncPort as JourneySyncPort$1, JourneySystemAbortReason, JourneySystemAbortReasonCode, JourneyValidationError, MaybePromise, MemoryPersistence, MemoryPersistenceOptions, ModuleTypeMap, ParentLink, PendingInvoke, RegisteredJourney, ResumeBounceCounter, ResumeHandler, ResumeMap, SelectModuleCases, SelectModuleCasesPartial, SerializedJourney, StepRef, StepSpec, SyncJourneyPersistence, SyncJourneyPersistence as SyncJourneyPersistence$1, TerminalCtx, TerminalOutcome, TerminalOutcome as TerminalOutcome$1, TerminalSentinel, TransitionEvent, TransitionMap, TransitionResult, UnknownJourneyError, WebStoragePersistenceOptions, WildcardEntryInputOf, WildcardEntryNamesOf, WildcardExitNamesOf, WildcardExitOutputForEntry, WildcardExitOutputOf, WildcardTransitionMap, createJourneyRuntime, createJourneySync, createMemoryJourneySyncPort, createMemoryPersistence, createWebStoragePersistence, defaultStepPath, defineJourney, defineJourneyHandle, defineJourneyPersistence, defineTransition, invoke, isAnnotatedTransition, isTerminalSentinel, journeyStepPath, resolveJourneySyncAction, selectModule, selectModuleOrDefault, validateJourneyContracts, validateJourneyDefinition, validateJourneyGraph } from "@modular-frontend/journeys-engine";
4
4
  import { ExitFn, ExitPointMap, ExitPointSchema, JourneyRuntime as JourneyRuntime$2, ModuleDescriptor, ModuleTypeMap as ModuleTypeMap$1, NavigationItemBase, RegistryPlugin, RuntimeMountAdapter, SemverParseError, UiComponent, compareVersions, isJourneySystemAbort, satisfies } from "@modular-frontend/core";
5
5
 
6
6
  //#region src/provider.d.ts
@@ -502,10 +502,27 @@ interface JourneyHostSlotProps {
502
502
  /** See {@link JourneyHostState.stepIndex}. */
503
503
  readonly stepIndex: number;
504
504
  /**
505
- * The `<JourneyOutlet>` for this instance, already built with every outlet
506
- * attribute passed to `<JourneyHost>`. Place it inside your chrome.
505
+ * The runtime the host started the instance on the same value
506
+ * {@link JourneyHostState.runtime} exposes. Pass it to a hand-placed
507
+ * `<JourneyOutlet :instance-id="instanceId" :runtime="runtime" />` when you'd
508
+ * rather render the outlet yourself than use {@link JourneyHostSlotProps.outlet}
509
+ * (the idiomatic-Vue path), so the outlet resolves the *same* runtime the host
510
+ * pinned rather than whatever a nearer provider hands out.
507
511
  */
508
- readonly outlet: VNode;
512
+ readonly runtime: JourneyRuntime$1;
513
+ /**
514
+ * The `<JourneyOutlet>` for this instance as a **functional component**,
515
+ * already bound to the host's pinned runtime and every outlet attribute passed
516
+ * to `<JourneyHost>`. Render it with `<component :is="outlet" />` in a template
517
+ * (or `h(outlet)` in a render function) — it is a component, not a raw VNode,
518
+ * so `:is` mounts it cleanly. Its identity is stable across host re-renders, so
519
+ * `:is` patches the outlet in place instead of remounting it on every step.
520
+ *
521
+ * Equivalent to spelling `<JourneyOutlet :instance-id="instanceId"
522
+ * :runtime="runtime" />` yourself with the slot's `instanceId` / `runtime` —
523
+ * use whichever reads better in your chrome.
524
+ */
525
+ readonly outlet: FunctionalComponent;
509
526
  }
510
527
  /**
511
528
  * Mount a journey in one line:
@@ -523,7 +540,8 @@ interface JourneyHostSlotProps {
523
540
  * reads itself, to cover the render before the instance exists — which is why
524
541
  * it has to accept both spellings; see {@link readLoadingFallback}.
525
542
  *
526
- * For chrome around the step, use the default scoped slot:
543
+ * For chrome around the step, use the default scoped slot. The slot's `outlet`
544
+ * is a functional component, so `<component :is="outlet" />` renders it:
527
545
  *
528
546
  * ```vue
529
547
  * <JourneyHost :handle="checkoutHandle" :input="{ cartId }" @finished="goToReceipt">
@@ -535,6 +553,17 @@ interface JourneyHostSlotProps {
535
553
  * </JourneyHost>
536
554
  * ```
537
555
  *
556
+ * Or render the outlet yourself from the slot's `instanceId` + `runtime` — the
557
+ * more idiomatic-Vue spelling, equivalent to the `outlet` above:
558
+ *
559
+ * ```vue
560
+ * <template #default="{ stepIndex, instanceId, runtime }">
561
+ * <Layout title="Checkout" :step="stepIndex">
562
+ * <JourneyOutlet :instance-id="instanceId" :runtime="runtime" />
563
+ * </Layout>
564
+ * </template>
565
+ * ```
566
+ *
538
567
  * To deep-link the steps, call `useJourneySync` in the same component — the
539
568
  * host owns the instance, the sync owns the URL, and neither knows about the
540
569
  * other.
@@ -593,8 +622,8 @@ declare const JourneyHost: import("vue").DefineComponent<import("vue").ExtractPr
593
622
  default: undefined;
594
623
  };
595
624
  }>> & Readonly<{}>, {
596
- input: any;
597
625
  runtime: JourneyRuntime$1;
626
+ input: any;
598
627
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
599
628
  //#endregion
600
629
  //#region src/use-journey-sync.d.ts
@@ -756,9 +785,9 @@ declare const ModuleTab: import("vue").DefineComponent<import("vue").ExtractProp
756
785
  default: undefined;
757
786
  };
758
787
  }>> & Readonly<{}>, {
788
+ onExit: (event: ModuleTabExitEvent) => void;
759
789
  entry: string;
760
790
  tabId: string;
761
- onExit: (event: ModuleTabExitEvent) => void;
762
791
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
763
792
  //#endregion
764
793
  //#region src/use-wait-for-exit.d.ts
@@ -890,6 +919,143 @@ interface WaitForExitChannels<TExits extends ExitPointMap> {
890
919
  */
891
920
  declare function useWaitForExit<TExits extends ExitPointMap>(exit: MaybeRefOrGetter<ExitFn<TExits>>, channels: MaybeRefOrGetter<WaitForExitChannels<TExits>>): void;
892
921
  //#endregion
922
+ //#region src/provide-journey-runtime.d.ts
923
+ interface ProvideJourneyRuntimeOptions {
924
+ /**
925
+ * Shell-wide fallback dispatcher for module exits fired outside a journey
926
+ * step — the app-level equivalent of `<JourneyProvider :onModuleExit>`.
927
+ */
928
+ readonly onModuleExit?: (event: ModuleExitEvent) => void;
929
+ }
930
+ /**
931
+ * App-level twin of `<JourneyProvider>`: install the journey runtime on a Vue
932
+ * `App` via `app.provide` so `<JourneyOutlet>` and the instance composables
933
+ * resolve it from context without a wrapping component in the render tree. The
934
+ * journeys analog of `@modular-vue/vue`'s `provideNavigation` / `provideSlots`
935
+ * standalone helpers.
936
+ *
937
+ * **You usually do not need to call this.** When the registry is built with
938
+ * `journeysPlugin()`, the plugin's `appProvides` hook already threads the
939
+ * runtime app-wide through `app.use(manifest)` (the router-owning `resolve()` /
940
+ * `installModularApp` path) — `<JourneyOutlet>` resolves `journeyKey` with no
941
+ * shell wiring. This helper is the explicit escape hatch for the cases that
942
+ * bypass that:
943
+ *
944
+ * - a shell that constructs a `JourneyRuntime` by hand (no `journeysPlugin()`),
945
+ * - installing the same runtime on a second app (SSR, multiple roots),
946
+ * - overriding the app-wide runtime for a subtree that mounts its own app.
947
+ *
948
+ * ```ts
949
+ * // Hand-wired runtime, no plugin:
950
+ * const runtime = createJourneyRuntime(registered, { modules });
951
+ * provideJourneyRuntime(app, runtime, { onModuleExit: (e) => reportExit(e) });
952
+ * ```
953
+ *
954
+ * A local `<JourneyProvider :runtime>` mounted lower in the tree still wins for
955
+ * its subtree (component-level `inject` shadows the app-level provide), so this
956
+ * only supplies the default when no nearer provider is present.
957
+ */
958
+ declare function provideJourneyRuntime(app: App, runtime: JourneyRuntime$1, options?: ProvideJourneyRuntimeOptions): void;
959
+ //#endregion
960
+ //#region src/pinia-persistence.d.ts
961
+ /**
962
+ * The minimal structural slice of a Pinia store this adapter needs: read the
963
+ * reactive `$state` and mutate it through `$patch`. A real Pinia store (option
964
+ * or setup) satisfies this, but the shape is intentionally structural so this
965
+ * package takes **no** `pinia` dependency — the caller brings their own store.
966
+ *
967
+ * This is the load-bearing design choice behind decision D3
968
+ * (`docs/vue-support-tracker.md`): "do not take a Pinia dependency in runtime
969
+ * packages". The adapter is a thin bridge over a store the consumer already
970
+ * owns, not a reason for every `@modular-vue/journeys` consumer to pull Pinia.
971
+ */
972
+ interface PiniaJourneyPersistenceStore {
973
+ /**
974
+ * The store's reactive state object (`store.$state`). Typed as `object`
975
+ * rather than `Record<string, unknown>` so a concrete Pinia store — whose
976
+ * `$state` is an interface without an index signature — is structurally
977
+ * assignable without the caller casting. The adapter narrows internally.
978
+ */
979
+ readonly $state: object;
980
+ /** Apply a mutation to `$state` (`store.$patch((s) => { … })`). */
981
+ $patch(mutator: (state: any) => void): void;
982
+ }
983
+ interface PiniaJourneyPersistenceOptions<TInput> {
984
+ /**
985
+ * Compute the persistence key from the journey id and starting input.
986
+ * Must be deterministic — `runtime.start()` probes this key to find an
987
+ * existing instance and achieve start-means-resume idempotency.
988
+ */
989
+ readonly keyFor: (ctx: {
990
+ journeyId: string;
991
+ input: TInput;
992
+ }) => string;
993
+ /**
994
+ * The Pinia store that owns the serialized-journey record, or a lazy getter
995
+ * returning it (or `null`). The getter is invoked on every call, mirroring
996
+ * `createWebStoragePersistence`'s `storage` option — pass a getter when the
997
+ * store is created inside a Pinia scope resolved after this adapter is
998
+ * constructed, or `null` to force the no-op (server / no-store) path.
999
+ */
1000
+ readonly store: PiniaJourneyPersistenceStore | (() => PiniaJourneyPersistenceStore | null);
1001
+ /**
1002
+ * Property on the store's `$state` that holds the
1003
+ * `Record<string, SerializedJourney<TState>>` map. Defaults to `"journeys"`.
1004
+ * The property is created on first `save` if absent.
1005
+ */
1006
+ readonly stateKey?: string;
1007
+ /**
1008
+ * When true (default), stored blobs are deep-cloned on both `save` and
1009
+ * `load`, so `load` returns a plain object detached from the store: callers
1010
+ * mutating it cannot corrupt the reactive state, and a mutated source blob
1011
+ * cannot corrupt what was persisted. The clone is a structural JSON round-trip
1012
+ * (`JSON.parse(JSON.stringify(...))`), which matches the `SerializedJourney`
1013
+ * contract the engine persists — plain JSON — but, like any storage adapter,
1014
+ * drops `undefined` fields and cannot carry `Date` / `Map` / `Set`. Journey
1015
+ * blobs are already JSON by construction, so this only bites if a custom
1016
+ * persistence layer routes non-serializable state through here.
1017
+ *
1018
+ * When false, the clone is skipped. Note Pinia still wraps stored state in a
1019
+ * reactive proxy, so `load` never returns the exact reference passed to
1020
+ * `save`; instead it returns the **live** store entry (mutations to it are
1021
+ * visible on the next `load` and to Pinia devtools). Use only when you have
1022
+ * verified nobody mutates the loaded blob out from under the store.
1023
+ */
1024
+ readonly clone?: boolean;
1025
+ }
1026
+ /**
1027
+ * `JourneyPersistence` backed by a Pinia store — the Vue-ecosystem analog of
1028
+ * `createWebStoragePersistence`, keeping journey state inside the app's
1029
+ * existing Pinia store tree instead of a parallel storage mechanism.
1030
+ *
1031
+ * Because the record lives in Pinia, in-flight journeys participate in the
1032
+ * app's Pinia devtools / timeline, and a single `store.$reset()` (or clearing
1033
+ * the record) drops every persisted journey through one path the app already
1034
+ * owns.
1035
+ *
1036
+ * Semantics match the stock adapters exactly: `keyFor` derives the key,
1037
+ * `load` returns the stored blob (or `null`), `save` writes it, `remove`
1038
+ * deletes it — so `runtime.start()` resumes an in-flight instance for the same
1039
+ * `keyFor(input)` rather than minting a fresh one.
1040
+ *
1041
+ * Pure-client-safe like the web-storage adapter: pass `store` as a getter that
1042
+ * returns `null` under SSR and all four methods no-op, so the runtime mints a
1043
+ * fresh instance server-side.
1044
+ *
1045
+ * ```ts
1046
+ * // A tiny store whose only job is to hold serialized journeys.
1047
+ * const useJourneyStore = defineStore("journeys", {
1048
+ * state: () => ({ journeys: {} as Record<string, SerializedJourney<WizardState>> }),
1049
+ * });
1050
+ *
1051
+ * export const wizardPersistence = createPiniaJourneyPersistence<{ frameId: string }, WizardState>({
1052
+ * keyFor: ({ journeyId, input }) => `journey:${input.frameId}:${journeyId}`,
1053
+ * store: () => useJourneyStore(),
1054
+ * });
1055
+ * ```
1056
+ */
1057
+ declare function createPiniaJourneyPersistence<TInput, TState>(options: PiniaJourneyPersistenceOptions<TInput>): SyncJourneyPersistence$1<TState, TInput>;
1058
+ //#endregion
893
1059
  //#region src/plugin.d.ts
894
1060
  /**
895
1061
  * Methods the journeys plugin contributes to the registry. Registered plugins
@@ -990,7 +1156,7 @@ interface JourneysPluginOptions<TNavItem extends NavigationItemBase = JourneyDef
990
1156
  * `createRegistry()` calls causes them to share that list. Call
991
1157
  * `journeysPlugin()` once per registry.
992
1158
  */
993
- declare function journeysPlugin<TNavItem extends NavigationItemBase = JourneyDefaultNavItem>(options?: JourneysPluginOptions<TNavItem>): RegistryPlugin<"journeys", JourneysPluginExtension, JourneyRuntime$2>;
1159
+ declare function journeysPlugin<TNavItem extends NavigationItemBase = JourneyDefaultNavItem>(options?: JourneysPluginOptions<TNavItem>): RegistryPlugin<"journeys", JourneysPluginExtension, JourneyRuntime$2> & VueAppProvidingPlugin<JourneyRuntime$2>;
994
1160
  //#endregion
995
- export { type AbandonCtx, type AnnotatedTransitionHandler, type AnyJourneyDefinition, type ChildOutcome, type EntryExitWildcardMap, type EntryInputOf, type EntryNamesOf, type EntryTransitions, type ExitCtx, type ExitNamesOf, type ExitNamesPairedWithEntry, type ExitOnlyWildcardMap, type ExitOutputOf, type InstanceId, type InvokeSpec, type JourneyDefaultNavItem, type JourneyDefinition, type JourneyDefinitionSummary, type JourneyHandle, JourneyHost, type JourneyHostSlotProps, type JourneyHostState, JourneyHydrationError, type JourneyInstance, type JourneyNavContribution, type JourneyNavItemBuilder, JourneyOutlet, type JourneyOutletErrorProps, type JourneyOutletNotFoundProps, type JourneyPersistence, JourneyProvider, type JourneyProviderValue, type JourneyRegisterOptions, type JourneyRuntime, type JourneyRuntimeOptions, type JourneyStatus, type JourneyStep, type JourneyStepErrorPolicy, type JourneyStepFor, type JourneySync, type JourneySyncAction, type JourneySyncCallbackCtx, type JourneySyncOptions, type JourneySyncPort, type JourneySystemAbortReason, type JourneySystemAbortReasonCode, JourneyValidationError, type JourneysPluginExtension, type JourneysPluginOptions, type MaybePromise, type MemoryPersistence, type MemoryPersistenceOptions, ModuleTab, type ModuleTabExitEvent, type ModuleTypeMap, type ParentLink, type PendingInvoke, type RegisteredJourney, type ResumeBounceCounter, type ResumeHandler, type ResumeMap, type SelectModuleCases, type SelectModuleCasesPartial, SemverParseError, type SerializedJourney, type StepRef, type StepSpec, type SyncJourneyPersistence, type TerminalCtx, type TerminalOutcome, type TerminalSentinel, type TransitionEvent, type TransitionMap, type TransitionResult, UnknownJourneyError, type UseJourneyHostOptions, type UseJourneySyncOptions, type WaitForExitChannels, type WaitForExitPollChannel, type WaitForExitSubscribeChannel, type WaitForExitTimeoutChannel, type WebStoragePersistenceOptions, type WildcardEntryInputOf, type WildcardEntryNamesOf, type WildcardExitNamesOf, type WildcardExitOutputForEntry, type WildcardExitOutputOf, type WildcardTransitionMap, compareVersions, createJourneyMountAdapter, createJourneyRuntime, createJourneySync, createMemoryJourneySyncPort, createMemoryPersistence, createWebStoragePersistence, defaultStepPath, defineJourney, defineJourneyHandle, defineJourneyPersistence, defineTransition, invoke, isAnnotatedTransition, isJourneySystemAbort, isTerminalSentinel, journeyKey, journeyStepPath, journeysPlugin, resolveJourneySyncAction, satisfies, selectModule, selectModuleOrDefault, useActiveLeafJourneyInstance, useActiveLeafJourneyState, useCallChain, useInstanceSnapshot, useJourneyCallStack, useJourneyContext, useJourneyHost, useJourneyInstance, useJourneyState, useJourneySync, useLeafId, useWaitForExit, validateJourneyContracts, validateJourneyDefinition, validateJourneyGraph };
1161
+ export { type AbandonCtx, type AnnotatedTransitionHandler, type AnyJourneyDefinition, type ChildOutcome, type EntryExitWildcardMap, type EntryInputOf, type EntryNamesOf, type EntryTransitions, type ExitCtx, type ExitNamesOf, type ExitNamesPairedWithEntry, type ExitOnlyWildcardMap, type ExitOutputOf, type InstanceId, type InvokeSpec, type JourneyDefaultNavItem, type JourneyDefinition, type JourneyDefinitionSummary, type JourneyHandle, JourneyHost, type JourneyHostSlotProps, type JourneyHostState, JourneyHydrationError, type JourneyInstance, type JourneyNavContribution, type JourneyNavItemBuilder, JourneyOutlet, type JourneyOutletErrorProps, type JourneyOutletNotFoundProps, type JourneyPersistence, JourneyProvider, type JourneyProviderValue, type JourneyRegisterOptions, type JourneyRuntime, type JourneyRuntimeOptions, type JourneyStatus, type JourneyStep, type JourneyStepErrorPolicy, type JourneyStepFor, type JourneySync, type JourneySyncAction, type JourneySyncCallbackCtx, type JourneySyncOptions, type JourneySyncPort, type JourneySystemAbortReason, type JourneySystemAbortReasonCode, JourneyValidationError, type JourneysPluginExtension, type JourneysPluginOptions, type MaybePromise, type MemoryPersistence, type MemoryPersistenceOptions, ModuleTab, type ModuleTabExitEvent, type ModuleTypeMap, type ParentLink, type PendingInvoke, type PiniaJourneyPersistenceOptions, type PiniaJourneyPersistenceStore, type ProvideJourneyRuntimeOptions, type RegisteredJourney, type ResumeBounceCounter, type ResumeHandler, type ResumeMap, type SelectModuleCases, type SelectModuleCasesPartial, SemverParseError, type SerializedJourney, type StepRef, type StepSpec, type SyncJourneyPersistence, type TerminalCtx, type TerminalOutcome, type TerminalSentinel, type TransitionEvent, type TransitionMap, type TransitionResult, UnknownJourneyError, type UseJourneyHostOptions, type UseJourneySyncOptions, type WaitForExitChannels, type WaitForExitPollChannel, type WaitForExitSubscribeChannel, type WaitForExitTimeoutChannel, type WebStoragePersistenceOptions, type WildcardEntryInputOf, type WildcardEntryNamesOf, type WildcardExitNamesOf, type WildcardExitOutputForEntry, type WildcardExitOutputOf, type WildcardTransitionMap, compareVersions, createJourneyMountAdapter, createJourneyRuntime, createJourneySync, createMemoryJourneySyncPort, createMemoryPersistence, createPiniaJourneyPersistence, createWebStoragePersistence, defaultStepPath, defineJourney, defineJourneyHandle, defineJourneyPersistence, defineTransition, invoke, isAnnotatedTransition, isJourneySystemAbort, isTerminalSentinel, journeyKey, journeyStepPath, journeysPlugin, provideJourneyRuntime, resolveJourneySyncAction, satisfies, selectModule, selectModuleOrDefault, useActiveLeafJourneyInstance, useActiveLeafJourneyState, useCallChain, useInstanceSnapshot, useJourneyCallStack, useJourneyContext, useJourneyHost, useJourneyInstance, useJourneyState, useJourneySync, useLeafId, useWaitForExit, validateJourneyContracts, validateJourneyDefinition, validateJourneyGraph };
996
1162
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/provider.ts","../src/use-journey-state.ts","../src/instance-hooks.ts","../src/mount-adapter.ts","../src/outlet.ts","../src/journey-host.ts","../src/use-journey-sync.ts","../src/module-tab.ts","../src/use-wait-for-exit.ts","../src/plugin.ts"],"mappings":";;;;;;;;;AAiBA;;;;;;;;UAAiB,oBAAA;EASgC;EAAA,SAPtC,OAAA,EAAS,gBAAA;EAeP;;;;AAA6C;AAsB1D;EAtBa,SARF,YAAA,IAAgB,KAAA,EAAO,eAAe;AAAA;;;;;;cAQpC,UAAA,EAAY,YAAY,CAAC,oBAAA;;;;;;;;;;;;;;;;;;;;;cAsBzB,eAAA,gBAAe,eAAA,eAAA,gBAAA;;UAIG,QAAA,CAAS,gBAAA;;;;UAEF,QAAA,CAAS,iBAAA;;;;;;;UAFhB,QAAA,CAAS,gBAAA;;;;UAEF,QAAA,CAAS,iBAAA;;;;;;;iBAmB/B,iBAAA,IAAqB,oBAAoB;;;;;;;AAhEzD;;;;;;;;;iBCEgB,eAAA,SACd,UAAA,EAAY,gBAAA,CAAiB,YAAA,WAC5B,WAAA,CAAY,MAAA;ADKkC;AAQjD;;;;AAA0D;AAsB1D;;AA9BiD,iBCQjC,kBAAA,CACd,UAAA,EAAY,gBAAA,CAAiB,YAAA,WAC5B,UAAA,CAAW,iBAAA;;;;;;;;;;;iBAeE,yBAAA,SACd,cAAA,EAAgB,gBAAA,CAAiB,YAAA,WAChC,WAAA,CAAY,MAAA;;;;;;;;;;;;iBAgBC,4BAAA,CACd,cAAA,EAAgB,gBAAA,CAAiB,YAAA,WAChC,UAAA,CAAW,iBAAA;;;;;;;ADtDd;;;;;;;;;;AASiD;AAQjD;;;;AAA0D;iBEY1C,mBAAA,CACd,OAAA,EAAS,gBAAA,SACT,UAAA,EAAY,gBAAA,CAAiB,YAAA,WAC5B,UAAA,CAAW,iBAAA;;;;;;;;;;;;;;;iBAuCE,YAAA,CACd,OAAA,EAAS,gBAAA,SACT,MAAA,EAAQ,gBAAA,CAAiB,YAAA,UACzB,OAAA,EAAS,gBAAA,Y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EY,qBAAA,kBACE,kBAAA,GAAqB,qBAAA;;;;;WAM7B,KAAA;;;;;;;;WAQA,YAAA,GAAe,iBAAA;;;;;ATnB1B;;;;AAAyD;WS6B9C,YAAA,GAAe,qBAAA,CAAsB,QAAA;AAAA;;AR3FhD;;;;;;;;;;;;;;;;AAEqB;AAarB;;iBQmGgB,cAAA,kBAAgC,kBAAA,GAAqB,qBAAA,EACnE,OAAA,GAAS,qBAAA,CAAsB,QAAA,IAC9B,cAAA,aAA2B,uBAAA,EAAyB,gBAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/provider.ts","../src/use-journey-state.ts","../src/instance-hooks.ts","../src/mount-adapter.ts","../src/outlet.ts","../src/journey-host.ts","../src/use-journey-sync.ts","../src/module-tab.ts","../src/use-wait-for-exit.ts","../src/provide-journey-runtime.ts","../src/pinia-persistence.ts","../src/plugin.ts"],"mappings":";;;;;;;;;AAiBA;;;;;;;;UAAiB,oBAAA;EASgC;EAAA,SAPtC,OAAA,EAAS,gBAAA;EAeP;;;;AAA6C;AAsB1D;EAtBa,SARF,YAAA,IAAgB,KAAA,EAAO,eAAe;AAAA;;;;;;cAQpC,UAAA,EAAY,YAAY,CAAC,oBAAA;;;;;;;;;;;;;;;;;;;;;cAsBzB,eAAA,gBAAe,eAAA,eAAA,gBAAA;;UAIG,QAAA,CAAS,gBAAA;;;;UAEF,QAAA,CAAS,iBAAA;;;;;;;UAFhB,QAAA,CAAS,gBAAA;;;;UAEF,QAAA,CAAS,iBAAA;;;;;;;iBAmB/B,iBAAA,IAAqB,oBAAoB;;;;;;;AAhEzD;;;;;;;;;iBCEgB,eAAA,SACd,UAAA,EAAY,gBAAA,CAAiB,YAAA,WAC5B,WAAA,CAAY,MAAA;ADKkC;AAQjD;;;;AAA0D;AAsB1D;;AA9BiD,iBCQjC,kBAAA,CACd,UAAA,EAAY,gBAAA,CAAiB,YAAA,WAC5B,UAAA,CAAW,iBAAA;;;;;;;;;;;iBAeE,yBAAA,SACd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