@wizzard-packages/adapter-zod 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.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +53 -0
  3. package/package.json +11 -2
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Aziz
3
+ Copyright (c) 2026 Aziz Isapov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # @wizzard-packages/adapter-zod
2
+
3
+ ![npm](https://img.shields.io/npm/v/@wizzard-packages/adapter-zod)
4
+ ![downloads](https://img.shields.io/npm/dm/@wizzard-packages/adapter-zod)
5
+ ![license](https://img.shields.io/npm/l/@wizzard-packages/adapter-zod)
6
+
7
+ Zod validation adapter for Wizzard Stepper. Pair it with @wizzard-packages/react or your own core-driven UI.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ pnpm add @wizzard-packages/adapter-zod zod
13
+ ```
14
+
15
+ ## Usage with React
16
+
17
+ ```tsx
18
+ import { createWizardFactory } from '@wizzard-packages/react';
19
+ import { ZodAdapter } from '@wizzard-packages/adapter-zod';
20
+ import { z } from 'zod';
21
+
22
+ type Data = { name: string };
23
+
24
+ type StepId = 'name' | 'review';
25
+
26
+ const schema = z.object({ name: z.string().min(1) });
27
+
28
+ const { WizardProvider, createStep } = createWizardFactory<Data, StepId>();
29
+
30
+ const steps = [
31
+ createStep({
32
+ id: 'name',
33
+ label: 'Name',
34
+ component: NameStep,
35
+ validationAdapter: new ZodAdapter(schema),
36
+ }),
37
+ ];
38
+
39
+ export function App() {
40
+ return <WizardProvider config={{ steps }} initialData={{ name: '' }} />;
41
+ }
42
+ ```
43
+
44
+ ## Fits in the stack
45
+
46
+ - Core engine: @wizzard-packages/core
47
+ - React bindings: @wizzard-packages/react
48
+ - Alternative validation: @wizzard-packages/adapter-yup
49
+
50
+ ## Links
51
+
52
+ - Repo: https://github.com/ZizzX/wizzard-packages
53
+ - Docs UI: https://zizzx.github.io/wizzard-packages/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wizzard-packages/adapter-zod",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Zod validation adapter for Wizzard Stepper.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,8 +24,17 @@
24
24
  "require": "./dist/index.cjs"
25
25
  }
26
26
  },
27
+ "keywords": [
28
+ "wizard",
29
+ "stepper",
30
+ "validation",
31
+ "zod",
32
+ "adapter",
33
+ "form"
34
+ ],
35
+ "license": "MIT",
27
36
  "dependencies": {
28
- "@wizzard-packages/core": "0.1.0"
37
+ "@wizzard-packages/core": "0.3.0"
29
38
  },
30
39
  "devDependencies": {
31
40
  "tsup": "^8.3.5",