react-wizard-engine 0.1.0 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # react-wizard-engine
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Use an absolute GitHub URL for the examples link in the README so it resolves on npmjs.com.
8
+
9
+ ## 0.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Fix `@radix-ui/react-slot` peer dep (was marked optional but is required by the headless entry). Update README install snippet. Fix README typo (`withBackStrategy` -> `withScrollStrategy` example). `WizardBack` now reads `config.backBtnText` like `WizardNext` does. Convert TODO markers in `wizard-header.tsx` to stable historical notes.
14
+
3
15
  ## 0.1.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -8,9 +8,9 @@ Multi-step flow engine for React. Steps, categories, branches. Pluggable strateg
8
8
  ## Install
9
9
 
10
10
  ```sh
11
- pnpm add react-wizard-engine lucide-react
11
+ pnpm add react-wizard-engine lucide-react @radix-ui/react-slot
12
12
  # only if you also use the styled /shadcn adapter:
13
- pnpm add @radix-ui/react-dialog @radix-ui/react-slot
13
+ pnpm add @radix-ui/react-dialog
14
14
  ```
15
15
 
16
16
  ## Quickstart
@@ -47,6 +47,8 @@ export function SignupWizard() {
47
47
  }
48
48
  ```
49
49
 
50
+ > Runnable Vite example: [`examples/basic/`](https://github.com/knazark/react-wizard-engine/tree/main/examples/basic) — 5 routes (`setup`, `setup-full`, `setup-initializer`, `linear`, `diamond`). `pnpm install && pnpm dev`.
51
+
50
52
  ## Styled adapter
51
53
 
52
54
  The `/shadcn` subpath ships an opinionated styled `WizardTopBar` and `WizardLayout` built on Radix + Tailwind utility classes that match shadcn defaults.
@@ -93,7 +95,16 @@ See `src/core/` for full type definitions.
93
95
 
94
96
  ## Strategies (pluggable)
95
97
 
96
- `composeWizardProviders(withBackStrategy(...), withScrollStrategy(...), ...)`. Back, visibility, progress, and scroll strategies all overridable. See `src/core/strategies/`.
98
+ Compose providers to override strategies/config. Back, visibility, progress, and scroll strategies are all overridable. See `src/core/strategies/`.
99
+
100
+ ```ts
101
+ composeWizardProviders(
102
+ withConfig({ isBackResetCompleted: false }),
103
+ withScrollStrategy(new WizardSmoothScrollStrategy()),
104
+ )
105
+ ```
106
+
107
+ Available helpers: `withConfig`, `withInitializer`, `withListener`, `withProgressStrategy`, `withScrollContainer`, `withScrollStrategy`, `withVisibilityStrategy`.
97
108
 
98
109
  ## License
99
110
 
package/dist/index.cjs CHANGED
@@ -1858,7 +1858,7 @@ function WizardBack(props) {
1858
1858
  {
1859
1859
  asChild: props.asChild,
1860
1860
  className: props.className,
1861
- defaultLabel: "Back",
1861
+ defaultLabel: wizard.configOptions.backBtnText ?? "Back",
1862
1862
  onClick: () => void wizard.back(),
1863
1863
  variant: "ghost",
1864
1864
  children: props.children