@paragrav/rhf-utils 0.0.64 → 0.0.66
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/dist/esm/errors/outputErrors.mjs +3 -3
- package/dist/esm/errors/root/getRootsFromFieldErrors.mjs +3 -3
- package/dist/esm/errors/root/useRootFormFieldErrorsMemo.mjs +2 -2
- package/dist/esm/form/_FormBase.mjs +5 -5
- package/dist/types/src/client/index.d.ts +7 -6
- package/dist/types/src/client/zod/context/index.d.ts +2 -3
- package/dist/types/src/client/zod/index.d.ts +3 -6
- package/dist/types/src/errors/consoleErrors.d.ts +3 -2
- package/dist/types/src/errors/outputErrors.d.ts +3 -2
- package/dist/types/src/exports.d.ts +1 -0
- package/dist/types/src/form/FormWithProviders.d.ts +3 -3
- package/dist/types/src/form/SafeFieldValues.d.ts +4 -0
- package/dist/types/src/form/_Form.d.ts +3 -3
- package/dist/types/src/form/_FormProviders.d.ts +4 -3
- package/dist/types/src/form/useForm.d.ts +7 -6
- package/dist/types/src/submit/error/FormSubmitError.d.ts +3 -2
- package/dist/types/src/submit/error/setCtxErrorsByFormSubmitError.d.ts +3 -2
- package/package.json +151 -77
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as m, jsx as
|
|
1
|
+
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
const
|
|
3
|
+
const f = ({
|
|
4
4
|
formRef: e,
|
|
5
5
|
antiCsrfToken: r,
|
|
6
6
|
children: o,
|
|
7
7
|
...t
|
|
8
8
|
}) => /* @__PURE__ */ m("form", { role: "form", ...t, ref: e, children: [
|
|
9
|
-
r && /* @__PURE__ */
|
|
9
|
+
r && /* @__PURE__ */ n("input", { type: "hidden", name: "anticsrftoken", value: r }),
|
|
10
10
|
o
|
|
11
|
-
] })
|
|
11
|
+
] });
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
f as default
|
|
14
14
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { ClientConfig } from './config';
|
|
2
2
|
import { UseFormProps, UseFormReturn } from '../form/useForm';
|
|
3
|
+
import { SafeFieldValues } from '../form/SafeFieldValues';
|
|
3
4
|
import { FormWithProvidersProps } from '../form/FormWithProviders';
|
|
4
|
-
import {
|
|
5
|
+
import { Resolver } from 'react-hook-form';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Generic object schema type.
|
|
8
9
|
*/
|
|
9
10
|
export type ObjectSchema<TInputKey extends string, TOutputKey extends string> = {
|
|
10
|
-
[key in TInputKey]:
|
|
11
|
+
[key in TInputKey]: SafeFieldValues;
|
|
11
12
|
} & {
|
|
12
|
-
[key in TOutputKey]:
|
|
13
|
+
[key in TOutputKey]: SafeFieldValues;
|
|
13
14
|
};
|
|
14
15
|
export type CreateRhfUtilsClient<TObjectSchema extends ObjectSchema<TObjectSchemaInputKey, TObjectSchemaOutputKey>, TObjectSchemaInputKey extends string, TObjectSchemaOutputKey extends string> = {
|
|
15
16
|
config: ClientConfig;
|
|
16
|
-
useForm: <TSchema extends TObjectSchema, TSchemaInput extends
|
|
17
|
-
FormWithProviders: <TSchema extends TObjectSchema, TSchemaInput extends
|
|
17
|
+
useForm: <TSchema extends TObjectSchema, TSchemaInput extends SafeFieldValues = TSchema[TObjectSchemaInputKey], TSchemaOutput extends SafeFieldValues = TSchema[TObjectSchemaOutputKey]>(schema: TSchema, props: UseFormProps<TSchemaInput, TSchemaOutput>) => UseFormReturn<TSchemaInput, TSchemaOutput>;
|
|
18
|
+
FormWithProviders: <TSchema extends TObjectSchema, TSchemaInput extends SafeFieldValues = TSchema[TObjectSchemaInputKey], TSchemaOutput extends SafeFieldValues = TSchema[TObjectSchemaOutputKey]>(props: {
|
|
18
19
|
schema: TSchema;
|
|
19
20
|
} & FormWithProvidersProps<TSchemaInput, TSchemaOutput>) => JSX.Element;
|
|
20
21
|
};
|
|
@@ -23,4 +24,4 @@ export type CreateRhfUtilsClient<TObjectSchema extends ObjectSchema<TObjectSchem
|
|
|
23
24
|
*
|
|
24
25
|
* (We need to use generics to generate types for schema resolver.)
|
|
25
26
|
*/
|
|
26
|
-
export declare const createRhfUtilsClient: <TObjectSchema extends ObjectSchema<TObjectSchemaInputKey, TObjectSchemaOutputKey>, TObjectSchemaInputKey extends string, TObjectSchemaOutputKey extends string>(resolver: (schema: TObjectSchema) => Resolver<
|
|
27
|
+
export declare const createRhfUtilsClient: <TObjectSchema extends ObjectSchema<TObjectSchemaInputKey, TObjectSchemaOutputKey>, TObjectSchemaInputKey extends string, TObjectSchemaOutputKey extends string>(resolver: (schema: TObjectSchema) => Resolver<SafeFieldValues, unknown>) => (config: ClientConfig) => CreateRhfUtilsClient<TObjectSchema, TObjectSchemaInputKey, TObjectSchemaOutputKey>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { ZodTypeFieldValues } from '..';
|
|
1
2
|
import { RhfUtilsClientContext } from '../../context';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { FieldValues } from 'react-hook-form';
|
|
4
3
|
|
|
5
|
-
export type RhfUtilsZodClientContext = RhfUtilsClientContext<
|
|
4
|
+
export type RhfUtilsZodClientContext = RhfUtilsClientContext<ZodTypeFieldValues, '_input', '_output'>;
|
|
6
5
|
declare const useRhfUtilsZodContext: () => RhfUtilsZodClientContext, _RhfUtilsZodContextProvider: import('react').Provider<RhfUtilsZodClientContext | undefined>;
|
|
7
6
|
export default useRhfUtilsZodContext;
|
|
8
7
|
export { _RhfUtilsZodContextProvider as _RhfUtilsContextProvider };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
+
import { SafeFieldValues } from '../../form/SafeFieldValues';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { FieldValues } from 'react-hook-form';
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
}, {
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
}>, "_input", "_output">;
|
|
4
|
+
export type ZodTypeFieldValues = z.ZodType<SafeFieldValues>;
|
|
5
|
+
export declare const createZodRhfUtilsClient: (config: import('../config').ClientConfig) => import('..').CreateRhfUtilsClient<ZodTypeFieldValues, "_input", "_output">;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SafeFieldValues } from '../form/SafeFieldValues';
|
|
2
|
+
import { FieldErrors } from 'react-hook-form';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Output form values and errors to console.
|
|
5
6
|
*/
|
|
6
7
|
declare const consoleErrors: (message: string, form: {
|
|
7
|
-
values:
|
|
8
|
+
values: SafeFieldValues;
|
|
8
9
|
errors: FieldErrors;
|
|
9
10
|
}, options?: {
|
|
10
11
|
other?: Record<string, unknown>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SafeFieldValues } from '../form/SafeFieldValues';
|
|
2
|
+
import { FieldErrors } from 'react-hook-form';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Output form values and errors to console and throw in dev.
|
|
5
6
|
*/
|
|
6
7
|
declare const outputErrors: (message: string, form: {
|
|
7
|
-
values:
|
|
8
|
+
values: SafeFieldValues;
|
|
8
9
|
errors: FieldErrors;
|
|
9
10
|
}, options?: {
|
|
10
11
|
other?: Record<string, unknown>;
|
|
@@ -18,6 +18,7 @@ export { default as useFormErrorsEffect } from './errors/useFormErrorsEffect';
|
|
|
18
18
|
export { default as useFormErrorsIfAny } from './errors/useFormErrorsIfAny';
|
|
19
19
|
export { default as useFormErrorsMemo } from './errors/useFormErrorsMemo';
|
|
20
20
|
export { default as useFormRequestSubmit } from './errors/useFormRequestSubmit';
|
|
21
|
+
export type { SafeFieldValues } from './form/SafeFieldValues';
|
|
21
22
|
export type { UseFormFieldsProps } from './form/useForm';
|
|
22
23
|
export { default as useForm } from './form/useForm';
|
|
23
24
|
export type { UseFormOptions } from './form/useFormOptions';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UseFormProps } from './useForm';
|
|
2
|
-
import {
|
|
2
|
+
import { SafeFieldValues } from './SafeFieldValues';
|
|
3
3
|
|
|
4
|
-
export type FormWithProvidersProps<TFieldValues extends
|
|
4
|
+
export type FormWithProvidersProps<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = React.PropsWithChildren<UseFormProps<TFieldValues, TTransformedValues>>;
|
|
5
5
|
/**
|
|
6
6
|
* Form providers (with utils) with immediate descendent {@link Form}.
|
|
7
7
|
* (Syntactic sugar for {@link useForm}. Use this for most applications.)
|
|
@@ -9,5 +9,5 @@ export type FormWithProvidersProps<TFieldValues extends FieldValues, TTransforme
|
|
|
9
9
|
* Use {@link useForm} if you need to specific nesting hierarchy.
|
|
10
10
|
* (e.g., wrapping `<tr>` with provider and nesting `<form>` within `<td>` to appease HTML rules.)
|
|
11
11
|
*/
|
|
12
|
-
declare function FormWithProviders<TFieldValues extends
|
|
12
|
+
declare function FormWithProviders<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues>({ children, ...props }: FormWithProvidersProps<TFieldValues, TTransformedValues>): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export default FormWithProviders;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { UseFormProps } from './useForm';
|
|
2
|
-
import {
|
|
2
|
+
import { SafeFieldValues } from './SafeFieldValues';
|
|
3
3
|
import { default as React } from 'react';
|
|
4
4
|
|
|
5
5
|
export type _FormSlots = 'top' | 'bottom';
|
|
6
|
-
export type _FormProps<TFieldValues extends
|
|
6
|
+
export type _FormProps<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = React.PropsWithChildren<Pick<UseFormProps<TFieldValues, TTransformedValues>, 'form'> & {
|
|
7
7
|
formId: string;
|
|
8
8
|
formRef: React.RefObject<HTMLFormElement>;
|
|
9
9
|
}>;
|
|
10
|
-
declare function _Form<TFieldValues extends
|
|
10
|
+
declare function _Form<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues>({ formId, formRef, form, children, }: _FormProps<TFieldValues, TTransformedValues>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default _Form;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { SafeFieldValues } from './SafeFieldValues';
|
|
1
2
|
import { FormUtilsContextProviderProps } from './context/utils/FormUtilsContextProvider';
|
|
2
|
-
import {
|
|
3
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
3
4
|
|
|
4
|
-
export type _FormProvidersProps<TFieldValues extends
|
|
5
|
+
export type _FormProvidersProps<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = React.PropsWithChildren<{
|
|
5
6
|
formId: string;
|
|
6
7
|
formRef: React.RefObject<HTMLFormElement>;
|
|
7
8
|
rhfForm: UseFormReturn<TFieldValues, unknown, TTransformedValues>;
|
|
8
9
|
utils?: FormUtilsContextProviderProps;
|
|
9
10
|
}>;
|
|
10
|
-
declare function _FormProviders<TFieldValues extends
|
|
11
|
+
declare function _FormProviders<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues>({ formId, formRef, rhfForm, utils, children, }: _FormProvidersProps<TFieldValues, TTransformedValues>): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default _FormProviders;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { UseFormOptions } from './useFormOptions';
|
|
2
|
+
import { SafeFieldValues } from './SafeFieldValues';
|
|
2
3
|
import { FormUtilsContextProviderProps } from './context/utils/FormUtilsContextProvider';
|
|
3
4
|
import { _FormProvidersProps } from './_FormProviders';
|
|
4
5
|
import { _FormProps } from './_Form';
|
|
5
|
-
import {
|
|
6
|
+
import { SubmitErrorHandler, UseFormProps as RhfUseFormProps, UseFormReturn as RhfUseFormReturn } from 'react-hook-form';
|
|
6
7
|
import { default as React } from 'react';
|
|
7
8
|
|
|
8
|
-
export type UseFormFieldsProps<TFieldValues extends
|
|
9
|
+
export type UseFormFieldsProps<TFieldValues extends SafeFieldValues = SafeFieldValues, TTransformedValues extends SafeFieldValues = SafeFieldValues> = {
|
|
9
10
|
formId: string;
|
|
10
11
|
formRef: React.RefObject<HTMLFormElement>;
|
|
11
12
|
ctx: RhfUseFormReturn<TFieldValues, unknown, TTransformedValues>;
|
|
12
13
|
options?: UseFormOptions;
|
|
13
14
|
};
|
|
14
|
-
export type UseFormProps<TFieldValues extends
|
|
15
|
+
export type UseFormProps<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = {
|
|
15
16
|
/** {@link RhfUseFormProps} props for RHF's {@link useRhfForm}. */
|
|
16
17
|
rhf?: RhfUseFormProps<TFieldValues>;
|
|
17
18
|
/** {@link FormProps} props for Form. */
|
|
@@ -36,7 +37,7 @@ export type UseFormProps<TFieldValues extends FieldValues, TTransformedValues ex
|
|
|
36
37
|
* see https://caniuse.com/?search=form%20attribute
|
|
37
38
|
* @returns Form provider and form.
|
|
38
39
|
*/
|
|
39
|
-
declare const useForm: <TFieldValues extends
|
|
40
|
+
declare const useForm: <TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues>({ rhf, form, utils, }: UseFormProps<TFieldValues, TTransformedValues>) => {
|
|
40
41
|
readonly id: string;
|
|
41
42
|
readonly ref: React.RefObject<HTMLFormElement>;
|
|
42
43
|
readonly context: RhfUseFormReturn<TFieldValues, unknown, TTransformedValues>;
|
|
@@ -44,5 +45,5 @@ declare const useForm: <TFieldValues extends FieldValues, TTransformedValues ext
|
|
|
44
45
|
readonly formProps: _FormProps<TFieldValues, TTransformedValues>;
|
|
45
46
|
};
|
|
46
47
|
export default useForm;
|
|
47
|
-
export type UseForm<TFieldValues extends
|
|
48
|
-
export type UseFormReturn<TFieldValues extends
|
|
48
|
+
export type UseForm<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = typeof useForm<TFieldValues, TTransformedValues>;
|
|
49
|
+
export type UseFormReturn<TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues> = ReturnType<UseForm<TFieldValues, TTransformedValues>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SafeFieldValues } from '../../form/SafeFieldValues';
|
|
2
|
+
import { FieldPath } from 'react-hook-form';
|
|
2
3
|
|
|
3
|
-
export declare class FormSubmitError<TFieldValues extends
|
|
4
|
+
export declare class FormSubmitError<TFieldValues extends SafeFieldValues = SafeFieldValues> extends Error {
|
|
4
5
|
errors: Record<FieldPath<TFieldValues> | `root.${string}`, {
|
|
5
6
|
type?: string;
|
|
6
7
|
message: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { FormSubmitError } from './FormSubmitError';
|
|
2
|
-
import {
|
|
2
|
+
import { SafeFieldValues } from '../../form/SafeFieldValues';
|
|
3
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Handle thrown {@link FormSubmitError}.
|
|
6
7
|
* Add key/values as name/message to RHF context errors.
|
|
7
8
|
*/
|
|
8
|
-
declare const setCtxErrorsByFormSubmitError: <TFieldValues extends
|
|
9
|
+
declare const setCtxErrorsByFormSubmitError: <TFieldValues extends SafeFieldValues, TTransformedValues extends SafeFieldValues>(ctx: UseFormReturn<TFieldValues, unknown, TTransformedValues>, error: FormSubmitError<any>) => void;
|
|
9
10
|
export default setCtxErrorsByFormSubmitError;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@paragrav/rhf-utils",
|
|
3
3
|
"author": "paragrav.dev",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.66",
|
|
6
6
|
"description": "Integration utilities for react-hook-form.",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"sideEffects": false,
|
|
@@ -18,152 +18,226 @@
|
|
|
18
18
|
},
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
|
-
"
|
|
22
|
-
|
|
21
|
+
"import": {
|
|
22
|
+
"default": "./dist/esm/exports.mjs",
|
|
23
|
+
"types": "./dist/types/exports.d.ts"
|
|
24
|
+
}
|
|
23
25
|
},
|
|
24
26
|
"./createZodRhfUtilsClient": {
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
+
"import": {
|
|
28
|
+
"default": "./dist/esm/client/zod/createZodRhfUtilsClient.mjs",
|
|
29
|
+
"types": "./dist/types/client/zod/createZodRhfUtilsClient.d.ts"
|
|
30
|
+
}
|
|
27
31
|
},
|
|
28
32
|
"./useRhfUtilsZodContext": {
|
|
29
|
-
"
|
|
30
|
-
|
|
33
|
+
"import": {
|
|
34
|
+
"default": "./dist/esm/client/zod/useRhfUtilsZodContext.mjs",
|
|
35
|
+
"types": "./dist/types/client/zod/useRhfUtilsZodContext.d.ts"
|
|
36
|
+
}
|
|
31
37
|
},
|
|
32
38
|
"./RhfUtilsZodContextProvider": {
|
|
33
|
-
"
|
|
34
|
-
|
|
39
|
+
"import": {
|
|
40
|
+
"default": "./dist/esm/client/zod/RhfUtilsZodContextProvider.mjs",
|
|
41
|
+
"types": "./dist/types/client/zod/RhfUtilsZodContextProvider.d.ts"
|
|
42
|
+
}
|
|
35
43
|
},
|
|
36
44
|
"./LazyDevTool": {
|
|
37
|
-
"
|
|
38
|
-
|
|
45
|
+
"import": {
|
|
46
|
+
"default": "./dist/esm/devtool/LazyDevTool.mjs",
|
|
47
|
+
"types": "./dist/types/devtool/LazyDevTool.d.ts"
|
|
48
|
+
}
|
|
39
49
|
},
|
|
40
50
|
"./errors/FormErrorMessage": {
|
|
41
|
-
"
|
|
42
|
-
|
|
51
|
+
"import": {
|
|
52
|
+
"default": "./dist/esm/errors/message/FormErrorMessage.mjs",
|
|
53
|
+
"types": "./dist/types/errors/message/FormErrorMessage.d.ts"
|
|
54
|
+
}
|
|
43
55
|
},
|
|
44
56
|
"./errors/FormErrorMessageByPath": {
|
|
45
|
-
"
|
|
46
|
-
|
|
57
|
+
"import": {
|
|
58
|
+
"default": "./dist/esm/errors/message/FormErrorMessageByPath.mjs",
|
|
59
|
+
"types": "./dist/types/errors/message/FormErrorMessageByPath.d.ts"
|
|
60
|
+
}
|
|
47
61
|
},
|
|
48
62
|
"./errors/useFormErrorConsoleDebug": {
|
|
49
|
-
"
|
|
50
|
-
|
|
63
|
+
"import": {
|
|
64
|
+
"default": "./dist/esm/errors/useFormErrorConsoleDebug.mjs",
|
|
65
|
+
"types": "./dist/types/errors/useFormErrorConsoleDebug.d.ts"
|
|
66
|
+
}
|
|
51
67
|
},
|
|
52
68
|
"./errors/useFormErrorsEffect": {
|
|
53
|
-
"
|
|
54
|
-
|
|
69
|
+
"import": {
|
|
70
|
+
"default": "./dist/esm/errors/useFormErrorsEffect.mjs",
|
|
71
|
+
"types": "./dist/types/errors/useFormErrorsEffect.d.ts"
|
|
72
|
+
}
|
|
55
73
|
},
|
|
56
74
|
"./errors/useFormErrorsIfAny": {
|
|
57
|
-
"
|
|
58
|
-
|
|
75
|
+
"import": {
|
|
76
|
+
"default": "./dist/esm/errors/useFormErrorsIfAny.mjs",
|
|
77
|
+
"types": "./dist/types/errors/useFormErrorsIfAny.d.ts"
|
|
78
|
+
}
|
|
59
79
|
},
|
|
60
80
|
"./errors/useFormErrorsOnChange": {
|
|
61
|
-
"
|
|
62
|
-
|
|
81
|
+
"import": {
|
|
82
|
+
"default": "./dist/esm/errors/useFormErrorsOnChange.mjs",
|
|
83
|
+
"types": "./dist/types/errors/useFormErrorsOnChange.d.ts"
|
|
84
|
+
}
|
|
63
85
|
},
|
|
64
86
|
"./errors/useFormRequestSubmit": {
|
|
65
|
-
"
|
|
66
|
-
|
|
87
|
+
"import": {
|
|
88
|
+
"default": "./dist/esm/errors/useFormRequestSubmit.mjs",
|
|
89
|
+
"types": "./dist/types/errors/useFormRequestSubmit.d.ts"
|
|
90
|
+
}
|
|
67
91
|
},
|
|
68
92
|
"./errors/FormNonFieldErrorMarker": {
|
|
69
|
-
"
|
|
70
|
-
|
|
93
|
+
"import": {
|
|
94
|
+
"default": "./dist/esm/errors/nonfield/FormNonFieldErrorMarker.mjs",
|
|
95
|
+
"types": "./dist/types/errors/nonfield/FormNonFieldErrorMarker.d.ts"
|
|
96
|
+
}
|
|
71
97
|
},
|
|
72
98
|
"./errors/FormNonFieldErrorMarkerHtmlAttribute": {
|
|
73
|
-
"
|
|
74
|
-
|
|
99
|
+
"import": {
|
|
100
|
+
"default": "./dist/esm/errors/nonfield/FormNonFieldErrorMarker.utils.mjs",
|
|
101
|
+
"types": "./dist/types/errors/nonfield/FormNonFieldErrorMarker.utils.d.ts"
|
|
102
|
+
}
|
|
75
103
|
},
|
|
76
104
|
"./errors/useOrphanFormErrorsToConsoleError": {
|
|
77
|
-
"
|
|
78
|
-
|
|
105
|
+
"import": {
|
|
106
|
+
"default": "./dist/esm/errors/orphan/useOrphanFormErrorsToConsoleError.mjs",
|
|
107
|
+
"types": "./dist/types/errors/orphan/useOrphanFormErrorsToConsoleError.d.ts"
|
|
108
|
+
}
|
|
79
109
|
},
|
|
80
110
|
"./errors/useFormErrorsHasOnlyOrphans": {
|
|
81
|
-
"
|
|
82
|
-
|
|
111
|
+
"import": {
|
|
112
|
+
"default": "./dist/esm/errors/orphan/useFormErrorsHasOnlyOrphans.mjs",
|
|
113
|
+
"types": "./dist/types/errors/orphan/useFormErrorsHasOnlyOrphans.d.ts"
|
|
114
|
+
}
|
|
83
115
|
},
|
|
84
116
|
"./errors/useOrphanFormErrors": {
|
|
85
|
-
"
|
|
86
|
-
|
|
117
|
+
"import": {
|
|
118
|
+
"default": "./dist/esm/errors/orphan/useOrphanFormErrors.mjs",
|
|
119
|
+
"types": "./dist/types/errors/orphan/useOrphanFormErrors.d.ts"
|
|
120
|
+
}
|
|
87
121
|
},
|
|
88
122
|
"./errors/useRootFormFieldErrors": {
|
|
89
|
-
"
|
|
90
|
-
|
|
123
|
+
"import": {
|
|
124
|
+
"default": "./dist/esm/errors/root/useRootFormFieldErrors.mjs",
|
|
125
|
+
"types": "./dist/types/errors/root/useRootFormFieldErrors.d.ts"
|
|
126
|
+
}
|
|
91
127
|
},
|
|
92
128
|
"./form/useForm": {
|
|
93
|
-
"
|
|
94
|
-
|
|
129
|
+
"import": {
|
|
130
|
+
"default": "./dist/esm/form/useForm.mjs",
|
|
131
|
+
"types": "./dist/types/form/useForm.d.ts"
|
|
132
|
+
}
|
|
95
133
|
},
|
|
96
134
|
"./form/context/FormUtilsContextProvider": {
|
|
97
|
-
"
|
|
98
|
-
|
|
135
|
+
"import": {
|
|
136
|
+
"default": "./dist/esm/form/context/FormUtilsContextProvider.mjs",
|
|
137
|
+
"types": "./dist/types/form/context/FormUtilsContextProvider.d.ts"
|
|
138
|
+
}
|
|
99
139
|
},
|
|
100
140
|
"./form/context/useFormUtilsContext": {
|
|
101
|
-
"
|
|
102
|
-
|
|
141
|
+
"import": {
|
|
142
|
+
"default": "./dist/esm/form/context/useFormUtilsContext.mjs",
|
|
143
|
+
"types": "./dist/types/form/context/useFormUtilsContext.d.ts"
|
|
144
|
+
}
|
|
103
145
|
},
|
|
104
146
|
"./form/context/group/FormGroupContextProvider": {
|
|
105
|
-
"
|
|
106
|
-
|
|
147
|
+
"import": {
|
|
148
|
+
"default": "./dist/esm/form/context/group/FormGroupContextProvider.mjs",
|
|
149
|
+
"types": "./dist/types/form/context/group/FormGroupContextProvider.d.ts"
|
|
150
|
+
}
|
|
107
151
|
},
|
|
108
152
|
"./form/context/group/useFormGroupParentTracker": {
|
|
109
|
-
"
|
|
110
|
-
|
|
153
|
+
"import": {
|
|
154
|
+
"default": "./dist/esm/form/context/group/useFormGroupParentTracker.mjs",
|
|
155
|
+
"types": "./dist/types/form/context/group/useFormGroupParentTracker.d.ts"
|
|
156
|
+
}
|
|
111
157
|
},
|
|
112
158
|
"./form/context/group/useFormOrParentIsBusy": {
|
|
113
|
-
"
|
|
114
|
-
|
|
159
|
+
"import": {
|
|
160
|
+
"default": "./dist/esm/form/context/group/useFormOrParentIsBusy.mjs",
|
|
161
|
+
"types": "./dist/types/form/context/group/useFormOrParentIsBusy.d.ts"
|
|
162
|
+
}
|
|
115
163
|
},
|
|
116
164
|
"./form/context/group/useFormGroupChildIsSubmittingTracker": {
|
|
117
|
-
"
|
|
118
|
-
|
|
165
|
+
"import": {
|
|
166
|
+
"default": "./dist/esm/form/context/group/useFormGroupChildIsSubmittingTracker.mjs",
|
|
167
|
+
"types": "./dist/types/form/context/group/useFormGroupChildIsSubmittingTracker.d.ts"
|
|
168
|
+
}
|
|
119
169
|
},
|
|
120
170
|
"./form/context/group/useFormGroupChildTracker": {
|
|
121
|
-
"
|
|
122
|
-
|
|
171
|
+
"import": {
|
|
172
|
+
"default": "./dist/esm/form/context/group/useFormGroupChildTracker.mjs",
|
|
173
|
+
"types": "./dist/types/form/context/group/useFormGroupChildTracker.d.ts"
|
|
174
|
+
}
|
|
123
175
|
},
|
|
124
176
|
"./form/context/group/useFormGroupChildIsMountedTracker": {
|
|
125
|
-
"
|
|
126
|
-
|
|
177
|
+
"import": {
|
|
178
|
+
"default": "./dist/esm/form/context/group/useFormGroupChildIsMountedTracker.mjs",
|
|
179
|
+
"types": "./dist/types/form/context/group/useFormGroupChildIsMountedTracker.d.ts"
|
|
180
|
+
}
|
|
127
181
|
},
|
|
128
182
|
"./form/context/group/useFormGroupIsAnyBusy": {
|
|
129
|
-
"
|
|
130
|
-
|
|
183
|
+
"import": {
|
|
184
|
+
"default": "./dist/esm/form/context/group/useFormGroupIsAnyBusy.mjs",
|
|
185
|
+
"types": "./dist/types/form/context/group/useFormGroupIsAnyBusy.d.ts"
|
|
186
|
+
}
|
|
131
187
|
},
|
|
132
188
|
"./form/context/group/useFormGroupIsChildBusy": {
|
|
133
|
-
"
|
|
134
|
-
|
|
189
|
+
"import": {
|
|
190
|
+
"default": "./dist/esm/form/context/group/useFormGroupIsChildBusy.mjs",
|
|
191
|
+
"types": "./dist/types/form/context/group/useFormGroupIsChildBusy.d.ts"
|
|
192
|
+
}
|
|
135
193
|
},
|
|
136
194
|
"./form/context/group/useFormGroupIsParentBusy": {
|
|
137
|
-
"
|
|
138
|
-
|
|
195
|
+
"import": {
|
|
196
|
+
"default": "./dist/esm/form/context/group/useFormGroupIsParentBusy.mjs",
|
|
197
|
+
"types": "./dist/types/form/context/group/useFormGroupIsParentBusy.d.ts"
|
|
198
|
+
}
|
|
139
199
|
},
|
|
140
200
|
"./form/context/utils/getSubmitterButtonData": {
|
|
141
|
-
"
|
|
142
|
-
|
|
201
|
+
"import": {
|
|
202
|
+
"default": "./dist/esm/form/utils/getSubmitterButtonData.mjs",
|
|
203
|
+
"types": "./dist/types/form/utils/getSubmitterButtonData.d.ts"
|
|
204
|
+
}
|
|
143
205
|
},
|
|
144
206
|
"./submit/useFormOnSubmitSuccessful": {
|
|
145
|
-
"
|
|
146
|
-
|
|
207
|
+
"import": {
|
|
208
|
+
"default": "./dist/esm/submit/useFormOnSubmitSuccessful.mjs",
|
|
209
|
+
"types": "./dist/types/submit/useFormOnSubmitSuccessful.d.ts"
|
|
210
|
+
}
|
|
147
211
|
},
|
|
148
212
|
"./submit/error/FormSubmitError": {
|
|
149
|
-
"
|
|
150
|
-
|
|
213
|
+
"import": {
|
|
214
|
+
"default": "./dist/esm/submit/error/FormSubmitError.mjs",
|
|
215
|
+
"types": "./dist/types/submit/error/FormSubmitError.d.ts"
|
|
216
|
+
}
|
|
151
217
|
},
|
|
152
218
|
"./submit/useFormOnSubmitSuccessfulAndReset": {
|
|
153
|
-
"
|
|
154
|
-
|
|
219
|
+
"import": {
|
|
220
|
+
"default": "./dist/esm/submit/useFormOnSubmitSuccessfulAndReset.mjs",
|
|
221
|
+
"types": "./dist/types/submit/useFormOnSubmitSuccessfulAndReset.d.ts"
|
|
222
|
+
}
|
|
155
223
|
},
|
|
156
224
|
"./submit/useResetFormOnSubmitError": {
|
|
157
|
-
"
|
|
158
|
-
|
|
225
|
+
"import": {
|
|
226
|
+
"default": "./dist/esm/submit/useResetFormOnSubmitError.mjs",
|
|
227
|
+
"types": "./dist/types/submit/useResetFormOnSubmitError.d.ts"
|
|
228
|
+
}
|
|
159
229
|
},
|
|
160
230
|
"./submit/useResetFormAfterSubmitSuccessful": {
|
|
161
|
-
"
|
|
162
|
-
|
|
231
|
+
"import": {
|
|
232
|
+
"default": "./dist/esm/submit/useResetFormAfterSubmitSuccessful.mjs",
|
|
233
|
+
"types": "./dist/types/submit/useResetFormAfterSubmitSuccessful.d.ts"
|
|
234
|
+
}
|
|
163
235
|
},
|
|
164
236
|
"./submit/useSubmitFormOnChange": {
|
|
165
|
-
"
|
|
166
|
-
|
|
237
|
+
"import": {
|
|
238
|
+
"default": "./dist/esm/submit/useSubmitFormOnChange.mjs",
|
|
239
|
+
"types": "./dist/types/submit/useSubmitFormOnChange.d.ts"
|
|
240
|
+
}
|
|
167
241
|
}
|
|
168
242
|
},
|
|
169
243
|
"scripts": {
|
|
@@ -192,7 +266,7 @@
|
|
|
192
266
|
"@hookform/resolvers": "^3.3.4",
|
|
193
267
|
"@playwright/experimental-ct-react": "^1.42.1",
|
|
194
268
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
195
|
-
"@types/node": "^
|
|
269
|
+
"@types/node": "^20.12.7",
|
|
196
270
|
"@types/react": "^18.2.69",
|
|
197
271
|
"@types/react-dom": "^18.2.23",
|
|
198
272
|
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
|
@@ -219,7 +293,7 @@
|
|
|
219
293
|
"zod": "^3.22.4"
|
|
220
294
|
},
|
|
221
295
|
"engines": {
|
|
222
|
-
"node": ">=
|
|
296
|
+
"node": ">=20.12",
|
|
223
297
|
"npm": "^10.2.4"
|
|
224
298
|
},
|
|
225
299
|
"packageManager": "npm@10.2.4",
|