@daltonr/pathwrite-vue 0.1.1 → 0.1.2
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/README.md +39 -2
- package/dist/index.d.ts +15 -23
- package/dist/index.js +27 -50
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ const currentStep = computed(() => snapshot.value?.stepId ?? null);
|
|
|
22
22
|
<div v-if="snapshot">
|
|
23
23
|
<h2>{{ snapshot.stepTitle ?? snapshot.stepId }}</h2>
|
|
24
24
|
<p>Step {{ snapshot.stepIndex + 1 }} of {{ snapshot.stepCount }}</p>
|
|
25
|
-
<button @click="previous" :disabled="snapshot.isNavigating">Back</button>
|
|
26
|
-
<button @click="next" :disabled="snapshot.isNavigating">
|
|
25
|
+
<button @click="previous" :disabled="snapshot.isNavigating || !snapshot.canMovePrevious">Back</button>
|
|
26
|
+
<button @click="next" :disabled="snapshot.isNavigating || !snapshot.canMoveNext">
|
|
27
27
|
{{ snapshot.isLastStep ? "Finish" : "Next" }}
|
|
28
28
|
</button>
|
|
29
29
|
<button @click="cancel">Cancel</button>
|
|
@@ -55,6 +55,25 @@ const currentStep = computed(() => snapshot.value?.stepId ?? null);
|
|
|
55
55
|
| `goToStep(stepId)` | `function` | Jump directly to a step by ID. Calls `onLeave` / `onEnter` but bypasses guards and `shouldSkip`. |
|
|
56
56
|
| `setData(key, value)` | `function` | Update a single data value; triggers re-render via `stateChanged`. |
|
|
57
57
|
|
|
58
|
+
### Typed snapshot data
|
|
59
|
+
|
|
60
|
+
`usePath` and `usePathContext` accept an optional generic so that `snapshot.data` is typed:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import type { PathData } from "@daltonr/pathwrite-core";
|
|
64
|
+
|
|
65
|
+
interface FormData extends PathData {
|
|
66
|
+
name: string;
|
|
67
|
+
age: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const { snapshot } = usePath<FormData>();
|
|
71
|
+
snapshot.value?.data.name; // string
|
|
72
|
+
snapshot.value?.data.age; // number
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The generic is a **type-level assertion** — it narrows `snapshot.data` for convenience but is not enforced at runtime. Define your data shape once in a `PathDefinition<FormData>` and the types will stay consistent throughout.
|
|
76
|
+
|
|
58
77
|
## Design notes
|
|
59
78
|
|
|
60
79
|
- **`shallowRef`** — the snapshot is stored in a `shallowRef` for performance. The engine produces a new snapshot object on every change, so shallow reactivity is sufficient.
|
|
@@ -62,6 +81,24 @@ const currentStep = computed(() => snapshot.value?.stepId ?? null);
|
|
|
62
81
|
- **`onScopeDispose`** — the composable automatically unsubscribes from the engine when the calling component's effect scope is disposed (i.e. on unmount).
|
|
63
82
|
- **No RxJS** — unlike the Angular adapter, there is no RxJS dependency. The composable is pure Vue.
|
|
64
83
|
|
|
84
|
+
## Snapshot guard booleans
|
|
85
|
+
|
|
86
|
+
The snapshot includes `canMoveNext` and `canMovePrevious` — the evaluated results of the current step's navigation guards. Use them to proactively disable buttons. These update automatically when data changes (e.g. after `setData`). Async guards default to `true` optimistically.
|
|
87
|
+
|
|
88
|
+
## `usePathContext` — context sharing
|
|
89
|
+
|
|
90
|
+
`<PathShell>` automatically provides its engine instance to child components via Vue's `provide` / `inject`. Step children can call `usePathContext()` to access the snapshot and actions without prop drilling:
|
|
91
|
+
|
|
92
|
+
```vue
|
|
93
|
+
<script setup>
|
|
94
|
+
import { usePathContext } from "@daltonr/pathwrite-vue";
|
|
95
|
+
|
|
96
|
+
const { snapshot, setData } = usePathContext();
|
|
97
|
+
</script>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`usePathContext()` throws if called outside a `<PathShell>`.
|
|
101
|
+
|
|
65
102
|
## Peer dependencies
|
|
66
103
|
|
|
67
104
|
| Package | Version |
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ export interface UsePathOptions {
|
|
|
4
4
|
/** Called for every engine event (stateChanged, completed, cancelled, resumed). */
|
|
5
5
|
onEvent?: (event: PathEvent) => void;
|
|
6
6
|
}
|
|
7
|
-
export interface UsePathReturn {
|
|
7
|
+
export interface UsePathReturn<TData extends PathData = PathData> {
|
|
8
8
|
/** Current path snapshot, or `null` when no path is active. Reactive — triggers Vue re-renders on change. */
|
|
9
|
-
snapshot: DeepReadonly<Ref<PathSnapshot | null>>;
|
|
9
|
+
snapshot: DeepReadonly<Ref<PathSnapshot<TData> | null>>;
|
|
10
10
|
/** Start (or restart) a path. */
|
|
11
11
|
start: (path: PathDefinition, initialData?: PathData) => Promise<void>;
|
|
12
12
|
/** Push a sub-path onto the stack. Requires an active path. */
|
|
@@ -22,7 +22,15 @@ export interface UsePathReturn {
|
|
|
22
22
|
/** Update a single data value; triggers a re-render via stateChanged. */
|
|
23
23
|
setData: (key: string, value: unknown) => Promise<void>;
|
|
24
24
|
}
|
|
25
|
-
export declare function usePath(options?: UsePathOptions): UsePathReturn
|
|
25
|
+
export declare function usePath<TData extends PathData = PathData>(options?: UsePathOptions): UsePathReturn<TData>;
|
|
26
|
+
/**
|
|
27
|
+
* Access the nearest `PathShell`'s path instance via Vue `inject`.
|
|
28
|
+
* Throws if used outside of a `<PathShell>`.
|
|
29
|
+
*
|
|
30
|
+
* The optional generic narrows `snapshot.data` for convenience — it is a
|
|
31
|
+
* **type-level assertion**, not a runtime guarantee.
|
|
32
|
+
*/
|
|
33
|
+
export declare function usePathContext<TData extends PathData = PathData>(): UsePathReturn<TData>;
|
|
26
34
|
export interface PathShellActions {
|
|
27
35
|
next: () => Promise<void>;
|
|
28
36
|
previous: () => Promise<void>;
|
|
@@ -30,31 +38,15 @@ export interface PathShellActions {
|
|
|
30
38
|
goToStep: (stepId: string) => Promise<void>;
|
|
31
39
|
setData: (key: string, value: unknown) => Promise<void>;
|
|
32
40
|
}
|
|
33
|
-
/**
|
|
34
|
-
* `<PathStep>` — slot wrapper that only renders its default slot content
|
|
35
|
-
* when the current step matches the given `id`.
|
|
36
|
-
*
|
|
37
|
-
* Used inside `<PathShell>`.
|
|
38
|
-
*/
|
|
39
|
-
export declare const PathStep: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
40
|
-
id: {
|
|
41
|
-
type: StringConstructor;
|
|
42
|
-
required: true;
|
|
43
|
-
};
|
|
44
|
-
}>, () => null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
-
id: {
|
|
46
|
-
type: StringConstructor;
|
|
47
|
-
required: true;
|
|
48
|
-
};
|
|
49
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
50
41
|
/**
|
|
51
42
|
* `<PathShell>` — default UI shell that renders a progress indicator,
|
|
52
|
-
* step content, and navigation buttons.
|
|
43
|
+
* step content, and navigation buttons. Step content is provided via
|
|
44
|
+
* **named slots** matching each step's `id`.
|
|
53
45
|
*
|
|
54
46
|
* ```vue
|
|
55
47
|
* <PathShell :path="myPath" :initial-data="{ name: '' }" @complete="handleDone">
|
|
56
|
-
* <
|
|
57
|
-
* <
|
|
48
|
+
* <template #details><DetailsForm /></template>
|
|
49
|
+
* <template #review><ReviewPanel /></template>
|
|
58
50
|
* </PathShell>
|
|
59
51
|
* ```
|
|
60
52
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, shallowRef, readonly, onScopeDispose, defineComponent, h, onMounted } from "vue";
|
|
1
|
+
import { ref, shallowRef, readonly, onScopeDispose, defineComponent, h, onMounted, provide, inject } from "vue";
|
|
2
2
|
import { PathEngine } from "@daltonr/pathwrite-core";
|
|
3
3
|
// ---------------------------------------------------------------------------
|
|
4
4
|
// usePath composable
|
|
@@ -26,31 +26,34 @@ export function usePath(options) {
|
|
|
26
26
|
const setData = (key, value) => engine.setData(key, value);
|
|
27
27
|
return { snapshot, start, startSubPath, next, previous, cancel, goToStep, setData };
|
|
28
28
|
}
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
// Context — provide / inject
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
/** Injection key used by PathShell and usePathContext. */
|
|
33
|
+
const PathInjectionKey = Symbol("PathContext");
|
|
29
34
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
35
|
+
* Access the nearest `PathShell`'s path instance via Vue `inject`.
|
|
36
|
+
* Throws if used outside of a `<PathShell>`.
|
|
32
37
|
*
|
|
33
|
-
*
|
|
38
|
+
* The optional generic narrows `snapshot.data` for convenience — it is a
|
|
39
|
+
* **type-level assertion**, not a runtime guarantee.
|
|
34
40
|
*/
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
setup(_props, { slots }) {
|
|
41
|
-
// PathStep never renders itself — PathShell reads its props and
|
|
42
|
-
// decides which slot to display. If rendered standalone it shows nothing.
|
|
43
|
-
return () => null;
|
|
41
|
+
export function usePathContext() {
|
|
42
|
+
const ctx = inject(PathInjectionKey, null);
|
|
43
|
+
if (ctx === null) {
|
|
44
|
+
throw new Error("usePathContext must be used within a <PathShell>.");
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
return ctx;
|
|
47
|
+
}
|
|
46
48
|
/**
|
|
47
49
|
* `<PathShell>` — default UI shell that renders a progress indicator,
|
|
48
|
-
* step content, and navigation buttons.
|
|
50
|
+
* step content, and navigation buttons. Step content is provided via
|
|
51
|
+
* **named slots** matching each step's `id`.
|
|
49
52
|
*
|
|
50
53
|
* ```vue
|
|
51
54
|
* <PathShell :path="myPath" :initial-data="{ name: '' }" @complete="handleDone">
|
|
52
|
-
* <
|
|
53
|
-
* <
|
|
55
|
+
* <template #details><DetailsForm /></template>
|
|
56
|
+
* <template #review><ReviewPanel /></template>
|
|
54
57
|
* </PathShell>
|
|
55
58
|
* ```
|
|
56
59
|
*/
|
|
@@ -79,6 +82,8 @@ export const PathShell = defineComponent({
|
|
|
79
82
|
}
|
|
80
83
|
});
|
|
81
84
|
const { snapshot, start, next, previous, cancel, goToStep, setData } = pathReturn;
|
|
85
|
+
// Provide context so child components can use usePathContext()
|
|
86
|
+
provide(PathInjectionKey, pathReturn);
|
|
82
87
|
const started = ref(false);
|
|
83
88
|
onMounted(() => {
|
|
84
89
|
if (props.autoStart && !started.value) {
|
|
@@ -101,8 +106,9 @@ export const PathShell = defineComponent({
|
|
|
101
106
|
: null
|
|
102
107
|
]));
|
|
103
108
|
}
|
|
104
|
-
// Resolve step content from
|
|
105
|
-
const
|
|
109
|
+
// Resolve step content from named slot matching the current step ID
|
|
110
|
+
const stepSlot = slots[snap.stepId];
|
|
111
|
+
const stepContent = stepSlot ? stepSlot({ snapshot: snap }) : null;
|
|
106
112
|
return h("div", { class: "pw-shell" }, [
|
|
107
113
|
// Header — progress
|
|
108
114
|
!props.hideProgress && (slots.header
|
|
@@ -146,7 +152,7 @@ function renderVueFooter(snapshot, actions, props) {
|
|
|
146
152
|
? h("button", {
|
|
147
153
|
type: "button",
|
|
148
154
|
class: "pw-shell__btn pw-shell__btn--back",
|
|
149
|
-
disabled: snapshot.isNavigating,
|
|
155
|
+
disabled: snapshot.isNavigating || !snapshot.canMovePrevious,
|
|
150
156
|
onClick: actions.previous
|
|
151
157
|
}, props.backLabel)
|
|
152
158
|
: null
|
|
@@ -163,39 +169,10 @@ function renderVueFooter(snapshot, actions, props) {
|
|
|
163
169
|
h("button", {
|
|
164
170
|
type: "button",
|
|
165
171
|
class: "pw-shell__btn pw-shell__btn--next",
|
|
166
|
-
disabled: snapshot.isNavigating,
|
|
172
|
+
disabled: snapshot.isNavigating || !snapshot.canMoveNext,
|
|
167
173
|
onClick: actions.next
|
|
168
174
|
}, snapshot.isLastStep ? props.finishLabel : props.nextLabel)
|
|
169
175
|
])
|
|
170
176
|
]);
|
|
171
177
|
}
|
|
172
|
-
// ---------------------------------------------------------------------------
|
|
173
|
-
// Helpers
|
|
174
|
-
// ---------------------------------------------------------------------------
|
|
175
|
-
function resolveVueStepContent(slots, snapshot) {
|
|
176
|
-
// Look for a named slot matching the stepId
|
|
177
|
-
const namedSlot = slots[snapshot.stepId];
|
|
178
|
-
if (namedSlot)
|
|
179
|
-
return namedSlot({ snapshot });
|
|
180
|
-
// Fall back to scanning default slot children for <PathStep> with matching id
|
|
181
|
-
const defaultChildren = slots.default?.();
|
|
182
|
-
if (!defaultChildren)
|
|
183
|
-
return null;
|
|
184
|
-
for (const child of defaultChildren) {
|
|
185
|
-
if (child &&
|
|
186
|
-
typeof child === "object" &&
|
|
187
|
-
"type" in child &&
|
|
188
|
-
child.type === PathStep &&
|
|
189
|
-
child.props?.id === snapshot.stepId) {
|
|
190
|
-
// Return the PathStep's own children (its default slot)
|
|
191
|
-
const stepSlots = child.children?.default;
|
|
192
|
-
if (typeof stepSlots === "function")
|
|
193
|
-
return stepSlots();
|
|
194
|
-
if (Array.isArray(child.children))
|
|
195
|
-
return child.children;
|
|
196
|
-
return null;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
178
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,UAAU,EACV,QAAQ,EACR,cAAc,EACd,eAAe,EACf,CAAC,EAED,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,UAAU,EACV,QAAQ,EACR,cAAc,EACd,eAAe,EACf,CAAC,EAED,SAAS,EACT,OAAO,EACP,MAAM,EAMP,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAGX,MAAM,yBAAyB,CAAC;AA8BjC,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E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AAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;SAC9D,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daltonr/pathwrite-vue",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Vue 3 adapter for @daltonr/pathwrite-core — composables with reactive refs, and optional <PathShell> default UI.",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"vue": ">=3.3.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@daltonr/pathwrite-core": "^0.1.
|
|
45
|
+
"@daltonr/pathwrite-core": "^0.1.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@vue/test-utils": "^2.4.6",
|