@conform-to/yup 1.2.0 → 1.2.1

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/constraint.d.ts CHANGED
@@ -1,5 +1,3 @@
1
1
  import { type Constraint } from '@conform-to/dom';
2
2
  import type * as yup from 'yup';
3
- export declare function getYupConstraint<Source extends yup.AnyObjectSchema>(
4
- source: Source,
5
- ): Record<string, Constraint>;
3
+ export declare function getYupConstraint<Source extends yup.AnyObjectSchema>(source: Source): Record<string, Constraint>;
package/index.d.ts CHANGED
@@ -1,17 +1,11 @@
1
1
  import { type Intent, type Submission } from '@conform-to/dom';
2
2
  import * as yup from 'yup';
3
3
  export { getYupConstraint } from './constraint';
4
- export declare function parseWithYup<Schema extends yup.AnyObjectSchema>(
5
- payload: FormData | URLSearchParams,
6
- config: {
7
- schema: Schema | ((intent: Intent | null) => Schema);
8
- async?: false;
9
- },
10
- ): Submission<yup.InferType<Schema>, string[]>;
11
- export declare function parseWithYup<Schema extends yup.AnyObjectSchema>(
12
- payload: FormData | URLSearchParams,
13
- config: {
14
- schema: Schema | ((intent: Intent | null) => Schema);
15
- async: true;
16
- },
17
- ): Promise<Submission<yup.InferType<Schema>, string[]>>;
4
+ export declare function parseWithYup<Schema extends yup.AnyObjectSchema>(payload: FormData | URLSearchParams, config: {
5
+ schema: Schema | ((intent: Intent | null) => Schema);
6
+ async?: false;
7
+ }): Submission<yup.InferType<Schema>, string[]>;
8
+ export declare function parseWithYup<Schema extends yup.AnyObjectSchema>(payload: FormData | URLSearchParams, config: {
9
+ schema: Schema | ((intent: Intent | null) => Schema);
10
+ async: true;
11
+ }): Promise<Submission<yup.InferType<Schema>, string[]>>;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Conform helpers for integrating with yup",
4
4
  "homepage": "https://conform.guide",
5
5
  "license": "MIT",
6
- "version": "1.2.0",
6
+ "version": "1.2.1",
7
7
  "main": "index.js",
8
8
  "module": "index.mjs",
9
9
  "types": "index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "url": "https://github.com/edmundhung/conform/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@conform-to/dom": "1.2.0"
28
+ "@conform-to/dom": "1.2.1"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "yup": ">=0.32.0"
package/README DELETED
@@ -1,37 +0,0 @@
1
-
2
-
3
- ███████╗ ██████╗ ███╗ ██╗ ████████╗ ██████╗ ███████╗ ███╗ ███╗
4
- ██╔═════╝ ██╔═══██╗ ████╗ ██║ ██╔═════╝ ██╔═══██╗ ██╔═══██╗ ████████║
5
- ██║ ██║ ██║ ██╔██╗██║ ███████╗ ██║ ██║ ███████╔╝ ██╔██╔██║
6
- ██║ ██║ ██║ ██║╚████║ ██╔════╝ ██║ ██║ ██╔═══██╗ ██║╚═╝██║
7
- ╚███████╗ ╚██████╔╝ ██║ ╚███║ ██║ ╚██████╔╝ ██║ ██║ ██║ ██║
8
- ╚══════╝ ╚═════╝ ╚═╝ ╚══╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
9
-
10
-
11
- Version 1.1.3 / License MIT / Copyright (c) 2024 Edmund Hung
12
-
13
- A type-safe form validation library utilizing web fundamentals to progressively enhance HTML Forms with full support for server frameworks like Remix and Next.js.
14
-
15
- # Getting Started
16
-
17
- Check out the overview and tutorial at our website https://conform.guide
18
-
19
- # Features
20
-
21
- - Progressive enhancement first APIs
22
- - Type-safe field inference
23
- - Fine-grained subscription
24
- - Built-in accessibility helpers
25
- - Automatic type coercion with Zod
26
-
27
- # Documentation
28
-
29
- - Validation: https://conform.guide/validation
30
- - Nested object and Array: https://conform.guide/complex-structures
31
- - UI Integrations: https://conform.guide/integration/ui-libraries
32
- - Intent button: https://conform.guide/intent-button
33
- - Accessibility Guide: https://conform.guide/accessibility
34
-
35
- # Support
36
-
37
- To report a bug, please open an issue on the repository at https://github.com/edmundhung/conform. For feature requests and questions, you can post them in the Discussions section.