@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 CHANGED
@@ -7,7 +7,7 @@
7
7
  ╚══════╝ ╚═════╝ ╚═╝ ╚══╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
8
8
  ```
9
9
 
10
- Version 1.6.0 / License MIT / Copyright (c) 2024 Edmund Hung
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 | undefined;
95
- 'aria-describedby'?: string | undefined;
93
+ 'aria-invalid'?: boolean;
94
+ 'aria-describedby'?: string;
96
95
  id: import("@conform-to/dom").FormId<Schema, FormError>;
97
- onSubmit: (event: import("react").FormEvent<HTMLFormElement>) => void;
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 | undefined;
111
- 'aria-describedby'?: string | undefined;
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
@@ -32,3 +32,4 @@ export declare function useField<FieldSchema, FormSchema extends Record<string,
32
32
  FieldMetadata<FieldSchema, FormSchema, FormError>,
33
33
  FormMetadata<FormSchema, FormError>
34
34
  ];
35
+ //# sourceMappingURL=hooks.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
@@ -43,3 +43,4 @@ export declare function Control<Value extends string | string[] | Array<string |
43
43
  };
44
44
  render: (control: ReturnType<typeof useControl<Value>>) => React.ReactNode;
45
45
  }): import("react").ReactNode;
46
+ //# sourceMappingURL=integrations.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.0",
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.0"
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