@modular-vue/journeys 1.0.0 → 1.1.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 +21 -21
- package/README.md +147 -137
- package/dist/index.d.ts +142 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +102 -54
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
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,147 @@
|
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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>`. In the router-owning install path it also threads the
|
|
58
|
+
runtime app-wide via its `appProvides` hook, so `app.use(manifest)` provides
|
|
59
|
+
`journeyKey` with no shell wiring.
|
|
60
|
+
- **`createPiniaJourneyPersistence(options)`** — a `JourneyPersistence` backed
|
|
61
|
+
by a Pinia store you own (keyed like `createWebStoragePersistence`), so
|
|
62
|
+
in-flight journeys live in your Pinia tree and resume across a modal
|
|
63
|
+
close/reopen. Structural store shape — takes no `pinia` dependency.
|
|
64
|
+
- **`provideJourneyRuntime(app, runtime, options?)`** — the app-level twin of
|
|
65
|
+
`<JourneyProvider>` (analog of `provideNavigation` / `provideSlots`), for
|
|
66
|
+
wiring a hand-built runtime without the plugin. Usually unnecessary — the
|
|
67
|
+
plugin auto-threads via `app.use(manifest)`.
|
|
68
|
+
|
|
69
|
+
## Usage
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
// app-shared: register the plugin and journeys
|
|
73
|
+
import { createRegistry } from "@modular-vue/runtime";
|
|
74
|
+
import { journeysPlugin, defineJourney } from "@modular-vue/journeys";
|
|
75
|
+
|
|
76
|
+
const registry = createRegistry<AppDeps, AppSlots>({ stores, services, slots });
|
|
77
|
+
const journeys = journeysPlugin();
|
|
78
|
+
registry.use(journeys);
|
|
79
|
+
|
|
80
|
+
registry.registerJourney(checkoutJourney, {
|
|
81
|
+
nav: { label: "Checkout", group: "flows" },
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```vue
|
|
86
|
+
<!-- a host component reading the active leaf's state -->
|
|
87
|
+
<script setup lang="ts">
|
|
88
|
+
import { useActiveLeafJourneyInstance } from "@modular-vue/journeys";
|
|
89
|
+
|
|
90
|
+
const props = defineProps<{ rootId: string }>();
|
|
91
|
+
const leaf = useActiveLeafJourneyInstance(props.rootId);
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<template>
|
|
95
|
+
<span>{{ leaf?.step?.moduleId }} — {{ leaf?.status }}</span>
|
|
96
|
+
</template>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```vue
|
|
100
|
+
<!-- a journey route: mounted, deep-linked, cleaned up -->
|
|
101
|
+
<script setup lang="ts">
|
|
102
|
+
import { useRoute, useRouter } from "vue-router";
|
|
103
|
+
import { JourneyOutlet, useJourneyHost, useJourneySync } from "@modular-vue/journeys";
|
|
104
|
+
import type { JourneySyncPort } from "@modular-vue/journeys";
|
|
105
|
+
import { checkoutHandle } from "@app/journeys-checkout";
|
|
106
|
+
|
|
107
|
+
const props = defineProps<{ cartId: string }>();
|
|
108
|
+
const router = useRouter();
|
|
109
|
+
const route = useRoute();
|
|
110
|
+
|
|
111
|
+
const { instanceId, stepIndex } = useJourneyHost(checkoutHandle, { cartId: props.cartId });
|
|
112
|
+
|
|
113
|
+
const port: JourneySyncPort = {
|
|
114
|
+
read: () => String(route.params.step ?? ""),
|
|
115
|
+
push: (path) => void router.push({ name: "checkout", params: { step: path } }),
|
|
116
|
+
replace: (path) => void router.replace({ name: "checkout", params: { step: path } }),
|
|
117
|
+
go: (delta) => router.go(delta),
|
|
118
|
+
subscribe: (listener) => router.afterEach(() => listener()),
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
useJourneySync(instanceId, port, { stepToPath: (step) => step.entry });
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<template>
|
|
125
|
+
<p>Step {{ stepIndex + 1 }}</p>
|
|
126
|
+
<JourneyOutlet v-if="instanceId" :instance-id="instanceId" />
|
|
127
|
+
</template>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
`useJourneyHost` starts the journey on mount and ends + forgets it on unmount;
|
|
131
|
+
`useJourneySync` owns the URL. Neither knows about the other, and `instanceId`
|
|
132
|
+
is `null` for the first render (the journey is started from `onMounted`, so the
|
|
133
|
+
start is guaranteed to be paired with an unmount that ends it).
|
|
134
|
+
|
|
135
|
+
A URL cannot navigate a journey to an arbitrary step — a step is derived from
|
|
136
|
+
state, so the only positions a location can select are ones the journey has
|
|
137
|
+
already been to. See
|
|
138
|
+
[Deep-linking steps](../journeys/README.md#deep-linking-steps---usejourneysync)
|
|
139
|
+
in the React README for the full model; the reconciler is the same code.
|
|
140
|
+
|
|
141
|
+
## Reactivity
|
|
142
|
+
|
|
143
|
+
The composables mirror the React hooks but return Vue refs. A single-instance
|
|
144
|
+
composable subscribes at setup and pushes fresh snapshots into a `shallowRef` on
|
|
145
|
+
every runtime change; the leaf-walking composables re-subscribe as the active
|
|
146
|
+
chain grows (a parent invokes a child) or shrinks (a child terminates and the
|
|
147
|
+
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, 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
|
|
@@ -890,6 +890,143 @@ interface WaitForExitChannels<TExits extends ExitPointMap> {
|
|
|
890
890
|
*/
|
|
891
891
|
declare function useWaitForExit<TExits extends ExitPointMap>(exit: MaybeRefOrGetter<ExitFn<TExits>>, channels: MaybeRefOrGetter<WaitForExitChannels<TExits>>): void;
|
|
892
892
|
//#endregion
|
|
893
|
+
//#region src/provide-journey-runtime.d.ts
|
|
894
|
+
interface ProvideJourneyRuntimeOptions {
|
|
895
|
+
/**
|
|
896
|
+
* Shell-wide fallback dispatcher for module exits fired outside a journey
|
|
897
|
+
* step — the app-level equivalent of `<JourneyProvider :onModuleExit>`.
|
|
898
|
+
*/
|
|
899
|
+
readonly onModuleExit?: (event: ModuleExitEvent) => void;
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* App-level twin of `<JourneyProvider>`: install the journey runtime on a Vue
|
|
903
|
+
* `App` via `app.provide` so `<JourneyOutlet>` and the instance composables
|
|
904
|
+
* resolve it from context without a wrapping component in the render tree. The
|
|
905
|
+
* journeys analog of `@modular-vue/vue`'s `provideNavigation` / `provideSlots`
|
|
906
|
+
* standalone helpers.
|
|
907
|
+
*
|
|
908
|
+
* **You usually do not need to call this.** When the registry is built with
|
|
909
|
+
* `journeysPlugin()`, the plugin's `appProvides` hook already threads the
|
|
910
|
+
* runtime app-wide through `app.use(manifest)` (the router-owning `resolve()` /
|
|
911
|
+
* `installModularApp` path) — `<JourneyOutlet>` resolves `journeyKey` with no
|
|
912
|
+
* shell wiring. This helper is the explicit escape hatch for the cases that
|
|
913
|
+
* bypass that:
|
|
914
|
+
*
|
|
915
|
+
* - a shell that constructs a `JourneyRuntime` by hand (no `journeysPlugin()`),
|
|
916
|
+
* - installing the same runtime on a second app (SSR, multiple roots),
|
|
917
|
+
* - overriding the app-wide runtime for a subtree that mounts its own app.
|
|
918
|
+
*
|
|
919
|
+
* ```ts
|
|
920
|
+
* // Hand-wired runtime, no plugin:
|
|
921
|
+
* const runtime = createJourneyRuntime(registered, { modules });
|
|
922
|
+
* provideJourneyRuntime(app, runtime, { onModuleExit: (e) => reportExit(e) });
|
|
923
|
+
* ```
|
|
924
|
+
*
|
|
925
|
+
* A local `<JourneyProvider :runtime>` mounted lower in the tree still wins for
|
|
926
|
+
* its subtree (component-level `inject` shadows the app-level provide), so this
|
|
927
|
+
* only supplies the default when no nearer provider is present.
|
|
928
|
+
*/
|
|
929
|
+
declare function provideJourneyRuntime(app: App, runtime: JourneyRuntime$1, options?: ProvideJourneyRuntimeOptions): void;
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region src/pinia-persistence.d.ts
|
|
932
|
+
/**
|
|
933
|
+
* The minimal structural slice of a Pinia store this adapter needs: read the
|
|
934
|
+
* reactive `$state` and mutate it through `$patch`. A real Pinia store (option
|
|
935
|
+
* or setup) satisfies this, but the shape is intentionally structural so this
|
|
936
|
+
* package takes **no** `pinia` dependency — the caller brings their own store.
|
|
937
|
+
*
|
|
938
|
+
* This is the load-bearing design choice behind decision D3
|
|
939
|
+
* (`docs/vue-support-tracker.md`): "do not take a Pinia dependency in runtime
|
|
940
|
+
* packages". The adapter is a thin bridge over a store the consumer already
|
|
941
|
+
* owns, not a reason for every `@modular-vue/journeys` consumer to pull Pinia.
|
|
942
|
+
*/
|
|
943
|
+
interface PiniaJourneyPersistenceStore {
|
|
944
|
+
/**
|
|
945
|
+
* The store's reactive state object (`store.$state`). Typed as `object`
|
|
946
|
+
* rather than `Record<string, unknown>` so a concrete Pinia store — whose
|
|
947
|
+
* `$state` is an interface without an index signature — is structurally
|
|
948
|
+
* assignable without the caller casting. The adapter narrows internally.
|
|
949
|
+
*/
|
|
950
|
+
readonly $state: object;
|
|
951
|
+
/** Apply a mutation to `$state` (`store.$patch((s) => { … })`). */
|
|
952
|
+
$patch(mutator: (state: any) => void): void;
|
|
953
|
+
}
|
|
954
|
+
interface PiniaJourneyPersistenceOptions<TInput> {
|
|
955
|
+
/**
|
|
956
|
+
* Compute the persistence key from the journey id and starting input.
|
|
957
|
+
* Must be deterministic — `runtime.start()` probes this key to find an
|
|
958
|
+
* existing instance and achieve start-means-resume idempotency.
|
|
959
|
+
*/
|
|
960
|
+
readonly keyFor: (ctx: {
|
|
961
|
+
journeyId: string;
|
|
962
|
+
input: TInput;
|
|
963
|
+
}) => string;
|
|
964
|
+
/**
|
|
965
|
+
* The Pinia store that owns the serialized-journey record, or a lazy getter
|
|
966
|
+
* returning it (or `null`). The getter is invoked on every call, mirroring
|
|
967
|
+
* `createWebStoragePersistence`'s `storage` option — pass a getter when the
|
|
968
|
+
* store is created inside a Pinia scope resolved after this adapter is
|
|
969
|
+
* constructed, or `null` to force the no-op (server / no-store) path.
|
|
970
|
+
*/
|
|
971
|
+
readonly store: PiniaJourneyPersistenceStore | (() => PiniaJourneyPersistenceStore | null);
|
|
972
|
+
/**
|
|
973
|
+
* Property on the store's `$state` that holds the
|
|
974
|
+
* `Record<string, SerializedJourney<TState>>` map. Defaults to `"journeys"`.
|
|
975
|
+
* The property is created on first `save` if absent.
|
|
976
|
+
*/
|
|
977
|
+
readonly stateKey?: string;
|
|
978
|
+
/**
|
|
979
|
+
* When true (default), stored blobs are deep-cloned on both `save` and
|
|
980
|
+
* `load`, so `load` returns a plain object detached from the store: callers
|
|
981
|
+
* mutating it cannot corrupt the reactive state, and a mutated source blob
|
|
982
|
+
* cannot corrupt what was persisted. The clone is a structural JSON round-trip
|
|
983
|
+
* (`JSON.parse(JSON.stringify(...))`), which matches the `SerializedJourney`
|
|
984
|
+
* contract the engine persists — plain JSON — but, like any storage adapter,
|
|
985
|
+
* drops `undefined` fields and cannot carry `Date` / `Map` / `Set`. Journey
|
|
986
|
+
* blobs are already JSON by construction, so this only bites if a custom
|
|
987
|
+
* persistence layer routes non-serializable state through here.
|
|
988
|
+
*
|
|
989
|
+
* When false, the clone is skipped. Note Pinia still wraps stored state in a
|
|
990
|
+
* reactive proxy, so `load` never returns the exact reference passed to
|
|
991
|
+
* `save`; instead it returns the **live** store entry (mutations to it are
|
|
992
|
+
* visible on the next `load` and to Pinia devtools). Use only when you have
|
|
993
|
+
* verified nobody mutates the loaded blob out from under the store.
|
|
994
|
+
*/
|
|
995
|
+
readonly clone?: boolean;
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* `JourneyPersistence` backed by a Pinia store — the Vue-ecosystem analog of
|
|
999
|
+
* `createWebStoragePersistence`, keeping journey state inside the app's
|
|
1000
|
+
* existing Pinia store tree instead of a parallel storage mechanism.
|
|
1001
|
+
*
|
|
1002
|
+
* Because the record lives in Pinia, in-flight journeys participate in the
|
|
1003
|
+
* app's Pinia devtools / timeline, and a single `store.$reset()` (or clearing
|
|
1004
|
+
* the record) drops every persisted journey through one path the app already
|
|
1005
|
+
* owns.
|
|
1006
|
+
*
|
|
1007
|
+
* Semantics match the stock adapters exactly: `keyFor` derives the key,
|
|
1008
|
+
* `load` returns the stored blob (or `null`), `save` writes it, `remove`
|
|
1009
|
+
* deletes it — so `runtime.start()` resumes an in-flight instance for the same
|
|
1010
|
+
* `keyFor(input)` rather than minting a fresh one.
|
|
1011
|
+
*
|
|
1012
|
+
* Pure-client-safe like the web-storage adapter: pass `store` as a getter that
|
|
1013
|
+
* returns `null` under SSR and all four methods no-op, so the runtime mints a
|
|
1014
|
+
* fresh instance server-side.
|
|
1015
|
+
*
|
|
1016
|
+
* ```ts
|
|
1017
|
+
* // A tiny store whose only job is to hold serialized journeys.
|
|
1018
|
+
* const useJourneyStore = defineStore("journeys", {
|
|
1019
|
+
* state: () => ({ journeys: {} as Record<string, SerializedJourney<WizardState>> }),
|
|
1020
|
+
* });
|
|
1021
|
+
*
|
|
1022
|
+
* export const wizardPersistence = createPiniaJourneyPersistence<{ frameId: string }, WizardState>({
|
|
1023
|
+
* keyFor: ({ journeyId, input }) => `journey:${input.frameId}:${journeyId}`,
|
|
1024
|
+
* store: () => useJourneyStore(),
|
|
1025
|
+
* });
|
|
1026
|
+
* ```
|
|
1027
|
+
*/
|
|
1028
|
+
declare function createPiniaJourneyPersistence<TInput, TState>(options: PiniaJourneyPersistenceOptions<TInput>): SyncJourneyPersistence$1<TState, TInput>;
|
|
1029
|
+
//#endregion
|
|
893
1030
|
//#region src/plugin.d.ts
|
|
894
1031
|
/**
|
|
895
1032
|
* Methods the journeys plugin contributes to the registry. Registered plugins
|
|
@@ -990,7 +1127,7 @@ interface JourneysPluginOptions<TNavItem extends NavigationItemBase = JourneyDef
|
|
|
990
1127
|
* `createRegistry()` calls causes them to share that list. Call
|
|
991
1128
|
* `journeysPlugin()` once per registry.
|
|
992
1129
|
*/
|
|
993
|
-
declare function journeysPlugin<TNavItem extends NavigationItemBase = JourneyDefaultNavItem>(options?: JourneysPluginOptions<TNavItem>): RegistryPlugin<"journeys", JourneysPluginExtension, JourneyRuntime$2>;
|
|
1130
|
+
declare function journeysPlugin<TNavItem extends NavigationItemBase = JourneyDefaultNavItem>(options?: JourneysPluginOptions<TNavItem>): RegistryPlugin<"journeys", JourneysPluginExtension, JourneyRuntime$2> & VueAppProvidingPlugin<JourneyRuntime$2>;
|
|
994
1131
|
//#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 };
|
|
1132
|
+
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
1133
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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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AS,MAAA,CAAO,MAAA;;;;;;;;;;;;;;;;;;UAoBD,sBAAA,gBAAsC,YAAA;EAAA,SAC5C,UAAA;EAAA,SACA,KAAA,GAAQ,OAAA,EAAS,MAAA,CAAO,MAAA,aAAmB,OAAA;AAAA;;;;;;;;;;;;;;;;;;;KAqB1C,yBAAA,gBAAyC,YAAA;EAAA,SAC1C,EAAA;AAAA;EAAA,SAEI,IAAA,EAAM,YAAA,CAAa,MAAA;AAAA;EAAA,SACnB,IAAA,GAAO,OAAA,EAAS,MAAA,CAAO,MAAA;AAAA;AAAA,UAGrB,mBAAA,gBAAmC,YAAA;ERZK;EAAA,SQc9C,SAAA,GAAY,2BAAA,CAA4B,MAAA;;WAExC,IAAA,GAAO,sBAAA,CAAuB,MAAA;EP9EzB;EAAA,SOgFL,OAAA,GAAU,yBAAA,CAA0B,MAAA;AAAA;;;;;;;;;;;;;;AP9E1B;AAarB;;;;;;;;;;;;;;;AAE6B;AAe7B;;;;;;;;;;;;;;iBO+FgB,cAAA,gBAA8B,YAAA,EAC5C,IAAA,EAAM,gBAAA,CAAiB,MAAA,CAAO,MAAA,IAC9B,QAAA,EAAU,gBAAA,CAAiB,mBAAA,CAAoB,MAAA;;;;;;
|
|
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,e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