@conform-to/react 1.6.0 → 1.6.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/README.md +1 -1
- package/{context.d.ts → dist/context.d.ts} +1 -0
- package/{helpers.d.ts → dist/helpers.d.ts} +6 -6
- package/{hooks.d.ts → dist/hooks.d.ts} +1 -0
- package/{index.d.ts → dist/index.d.ts} +1 -0
- package/{integrations.d.ts → dist/integrations.d.ts} +1 -0
- package/package.json +17 -12
- /package/{_virtual → dist/_virtual}/_rollupPluginBabelHelpers.js +0 -0
- /package/{_virtual → dist/_virtual}/_rollupPluginBabelHelpers.mjs +0 -0
- /package/{context.js → dist/context.js} +0 -0
- /package/{context.mjs → dist/context.mjs} +0 -0
- /package/{helpers.js → dist/helpers.js} +0 -0
- /package/{helpers.mjs → dist/helpers.mjs} +0 -0
- /package/{hooks.js → dist/hooks.js} +0 -0
- /package/{hooks.mjs → dist/hooks.mjs} +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{index.mjs → dist/index.mjs} +0 -0
- /package/{integrations.js → dist/integrations.js} +0 -0
- /package/{integrations.mjs → dist/integrations.mjs} +0 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
╚══════╝ ╚═════╝ ╚═╝ ╚══╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Version 1.6.
|
|
10
|
+
Version 1.6.1 / License MIT / Copyright (c) 2024 Edmund Hung
|
|
11
11
|
|
|
12
12
|
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.
|
|
13
13
|
|
|
@@ -70,3 +70,4 @@ export type FormContext<Schema extends Record<string, any> = any, FormError = st
|
|
|
70
70
|
};
|
|
71
71
|
export declare function createFormContext<Schema extends Record<string, any> = any, FormError = string[], FormValue = Schema>(options: FormOptions<Schema, FormError, FormValue>): FormContext<Schema, FormError, FormValue>;
|
|
72
72
|
export {};
|
|
73
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { FormMetadata, FieldMetadata, Metadata, Pretty } from './context';
|
|
3
2
|
type FormControlProps = {
|
|
4
3
|
key: string | undefined;
|
|
@@ -91,10 +90,10 @@ export declare function getAriaAttributes(metadata: Metadata<any, any, any>, opt
|
|
|
91
90
|
* ```
|
|
92
91
|
*/
|
|
93
92
|
export declare function getFormProps<Schema extends Record<string, any>, FormError>(metadata: FormMetadata<Schema, FormError>, options?: FormControlOptions): {
|
|
94
|
-
'aria-invalid'?: boolean
|
|
95
|
-
'aria-describedby'?: string
|
|
93
|
+
'aria-invalid'?: boolean;
|
|
94
|
+
'aria-describedby'?: string;
|
|
96
95
|
id: import("@conform-to/dom").FormId<Schema, FormError>;
|
|
97
|
-
onSubmit: (event:
|
|
96
|
+
onSubmit: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
98
97
|
noValidate: boolean;
|
|
99
98
|
};
|
|
100
99
|
/**
|
|
@@ -107,8 +106,8 @@ export declare function getFormProps<Schema extends Record<string, any>, FormErr
|
|
|
107
106
|
* ```
|
|
108
107
|
*/
|
|
109
108
|
export declare function getFieldsetProps<Schema extends Record<string, any> | undefined | unknown>(metadata: FieldMetadata<Schema, any, any>, options?: FormControlOptions): {
|
|
110
|
-
'aria-invalid'?: boolean
|
|
111
|
-
'aria-describedby'?: string
|
|
109
|
+
'aria-invalid'?: boolean;
|
|
110
|
+
'aria-describedby'?: string;
|
|
112
111
|
id: string;
|
|
113
112
|
name: import("@conform-to/dom").FieldName<Schema, any, any>;
|
|
114
113
|
form: import("@conform-to/dom").FormId<any, any>;
|
|
@@ -206,3 +205,4 @@ export declare function getCollectionProps<Schema extends Array<string | boolean
|
|
|
206
205
|
value?: boolean;
|
|
207
206
|
}>>(metadata: FieldMetadata<Schema, any, any>, options: Options): Array<InputProps & Pick<Options, 'type'> & Pick<Required<InputProps>, 'value'>>;
|
|
208
207
|
export {};
|
|
208
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -3,3 +3,4 @@ export { type FieldMetadata, type FormMetadata, FormProvider, FormStateInput, }
|
|
|
3
3
|
export { useForm, useFormMetadata, useField } from './hooks';
|
|
4
4
|
export { Control as unstable_Control, useControl as unstable_useControl, useInputControl, } from './integrations';
|
|
5
5
|
export { getFormProps, getFieldsetProps, getInputProps, getSelectProps, getTextareaProps, getCollectionProps, } from './helpers';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -3,19 +3,23 @@
|
|
|
3
3
|
"description": "Conform view adapter for react",
|
|
4
4
|
"homepage": "https://conform.guide",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "1.6.
|
|
7
|
-
"main": "index.js",
|
|
8
|
-
"module": "index.mjs",
|
|
9
|
-
"types": "index.d.ts",
|
|
6
|
+
"version": "1.6.1",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"types": "./index.d.ts",
|
|
13
|
-
"module": "./index.mjs",
|
|
14
|
-
"import": "./index.mjs",
|
|
15
|
-
"require": "./index.js",
|
|
16
|
-
"default": "./index.mjs"
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"module": "./dist/index.mjs",
|
|
14
|
+
"import": "./dist/index.mjs",
|
|
15
|
+
"require": "./dist/index.js",
|
|
16
|
+
"default": "./dist/index.mjs"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
+
"files": [
|
|
20
|
+
"./dist/**/*.{js,mjs}",
|
|
21
|
+
"./dist/**/*.d.ts"
|
|
22
|
+
],
|
|
19
23
|
"repository": {
|
|
20
24
|
"type": "git",
|
|
21
25
|
"url": "https://github.com/edmundhung/conform",
|
|
@@ -30,7 +34,7 @@
|
|
|
30
34
|
"url": "https://github.com/edmundhung/conform/issues"
|
|
31
35
|
},
|
|
32
36
|
"dependencies": {
|
|
33
|
-
"@conform-to/dom": "1.6.
|
|
37
|
+
"@conform-to/dom": "1.6.1"
|
|
34
38
|
},
|
|
35
39
|
"devDependencies": {
|
|
36
40
|
"@babel/core": "^7.17.8",
|
|
@@ -60,10 +64,11 @@
|
|
|
60
64
|
"sideEffects": false,
|
|
61
65
|
"scripts": {
|
|
62
66
|
"build:js": "rollup -c",
|
|
63
|
-
"build:ts": "tsc",
|
|
67
|
+
"build:ts": "tsc --project ./tsconfig.build.json",
|
|
64
68
|
"build": "pnpm run \"/^build:.*/\"",
|
|
65
69
|
"dev:js": "pnpm run build:js --watch",
|
|
66
70
|
"dev:ts": "pnpm run build:ts --watch",
|
|
67
|
-
"dev": "pnpm run \"/^dev:.*/\""
|
|
71
|
+
"dev": "pnpm run \"/^dev:.*/\"",
|
|
72
|
+
"typecheck": "tsc"
|
|
68
73
|
}
|
|
69
74
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|