@paragrav/rhf-utils 0.0.71 → 0.0.72

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.
@@ -0,0 +1,14 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import i from "react";
3
+ import n from "../createRhfUtilsClientForZod.mjs";
4
+ import { _RhfUtilsClientForZodContextProvider as l } from "./useRhfUtilsClientForZodContext.mjs";
5
+ const s = ({
6
+ config: t,
7
+ children: o
8
+ }) => {
9
+ const [r] = i.useState(() => n(t));
10
+ return /* @__PURE__ */ e(l, { value: r, children: o });
11
+ }, a = s;
12
+ export {
13
+ a as default
14
+ };
@@ -1,6 +1,6 @@
1
1
  import t from "../../../utils/createContext.mjs";
2
- const [, o, s] = t(), r = o;
2
+ const [, o, n] = t(), r = o;
3
3
  export {
4
- s as _RhfUtilsContextProvider,
4
+ n as _RhfUtilsClientForZodContextProvider,
5
5
  r as default
6
6
  };
@@ -1,7 +1,7 @@
1
1
  import { zodResolver as t } from "@hookform/resolvers/zod";
2
2
  import "zod";
3
- import { createRhfUtilsClient as e } from "../index.mjs";
4
- const o = e(t), s = o;
3
+ import { createRhfUtilsClient as o } from "../index.mjs";
4
+ const e = o(t), s = e;
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import { default as e } from "./client/zod/context/index.mjs";
2
- import { default as s } from "./client/zod/context/provider.mjs";
3
- import { default as u } from "./client/zod/createZodRhfUtilsClient.mjs";
1
+ import { default as e } from "./client/zod/context/RhfUtilsClientForZodContextProvider .mjs";
2
+ import { default as s } from "./client/zod/context/useRhfUtilsClientForZodContext.mjs";
3
+ import { default as u } from "./client/zod/createRhfUtilsClientForZod.mjs";
4
4
  import { default as m } from "./devtool/LazyDevTool.mjs";
5
5
  import { default as d } from "./errors/flat/context/FlatFieldErrorsContextProvider.mjs";
6
6
  import { default as x } from "./errors/flat/context/useFlatFieldErrorsContext.mjs";
@@ -48,8 +48,8 @@ export {
48
48
  ir as FormSubmitError,
49
49
  w as FormUtilsContextProvider,
50
50
  m as LazyDevTool,
51
- s as RhfUtilsZodContextProvider,
52
- u as createZodRhfUtilsClient,
51
+ e as RhfUtilsClientForZodContextProvider,
52
+ u as createRhfUtilsClientForZod,
53
53
  xr as getSubmitterButtonData,
54
54
  x as useFlatFieldErrorsContext,
55
55
  z as useForm,
@@ -74,7 +74,7 @@ export {
74
74
  I as useOrphanFormErrorsToConsole,
75
75
  yr as useResetFormAfterSubmitSuccessful,
76
76
  Sr as useResetFormOnSubmitError,
77
- e as useRhfUtilsZodContext,
77
+ s as useRhfUtilsClientForZodContext,
78
78
  g as useRootFormFieldErrorsMemo,
79
79
  Or as useSubmitFormOnChange
80
80
  };
@@ -0,0 +1,8 @@
1
+ import { ClientConfig } from '../../config';
2
+ import { default as React } from 'react';
3
+
4
+ type Props = React.PropsWithChildren<{
5
+ config: ClientConfig;
6
+ }>;
7
+ declare const RhfUtilsClientForZodContextProvider: React.FC<Props>;
8
+ export default RhfUtilsClientForZodContextProvider;
@@ -0,0 +1,6 @@
1
+ import { default as createRhfUtilsClientForZod } from '../createRhfUtilsClientForZod';
2
+
3
+ export type RhfUtilsClientForZodContext = ReturnType<typeof createRhfUtilsClientForZod>;
4
+ declare const useRhfUtilsClientForZodContext: () => import('../..').CreateRhfUtilsClient<import('../createRhfUtilsClientForZod').ZodTypeFieldValues, "_input", "_output">, _RhfUtilsClientForZodContextProvider: import('react').Provider<import('../..').CreateRhfUtilsClient<import('../createRhfUtilsClientForZod').ZodTypeFieldValues, "_input", "_output"> | undefined>;
5
+ export default useRhfUtilsClientForZodContext;
6
+ export { _RhfUtilsClientForZodContextProvider };
@@ -0,0 +1,6 @@
1
+ import { SafeFieldValues } from '../../form/SafeFieldValues';
2
+ import { z } from 'zod';
3
+
4
+ export type ZodTypeFieldValues = z.ZodType<SafeFieldValues>;
5
+ declare const createRhfUtilsClientForZod: (config: import('../config').ClientConfig) => import('..').CreateRhfUtilsClient<ZodTypeFieldValues, "_input", "_output">;
6
+ export default createRhfUtilsClientForZod;
@@ -1,7 +1,7 @@
1
1
  export type { ClientConfig } from './client/config';
2
- export { default as useRhfUtilsZodContext } from './client/zod/context';
3
- export { default as RhfUtilsZodContextProvider } from './client/zod/context/provider';
4
- export { default as createZodRhfUtilsClient } from './client/zod/createZodRhfUtilsClient';
2
+ export { default as RhfUtilsClientForZodContextProvider } from './client/zod/context/RhfUtilsClientForZodContextProvider ';
3
+ export { default as useRhfUtilsClientForZodContext } from './client/zod/context/useRhfUtilsClientForZodContext';
4
+ export { default as createRhfUtilsClientForZod } from './client/zod/createRhfUtilsClientForZod';
5
5
  export { default as LazyDevTool } from './devtool/LazyDevTool';
6
6
  export { default as FlatFieldErrorsContextProvider } from './errors/flat/context/FlatFieldErrorsContextProvider';
7
7
  export { default as useFlatFieldErrorsContext } from './errors/flat/context/useFlatFieldErrorsContext';
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.71",
5
+ "version": "0.0.72",
6
6
  "description": "Integration utilities for react-hook-form.",
7
7
  "type": "module",
8
8
  "sideEffects": false,
@@ -21,17 +21,17 @@
21
21
  "default": "./dist/esm/exports.mjs",
22
22
  "types": "./dist/types/exports.d.ts"
23
23
  },
24
- "./client/zod/createZodRhfUtilsClient": {
25
- "default": "./dist/esm/client/zod/createZodRhfUtilsClient.mjs",
26
- "types": "./dist/types/client/zod/createZodRhfUtilsClient.d.ts"
24
+ "./client/zod/createRhfUtilsClientForZod": {
25
+ "default": "./dist/esm/client/zod/createRhfUtilsClientForZod.mjs",
26
+ "types": "./dist/types/client/zod/createRhfUtilsClientForZod.d.ts"
27
27
  },
28
- "./client/zod/useRhfUtilsZodContext": {
29
- "default": "./dist/esm/client/zod/useRhfUtilsZodContext.mjs",
30
- "types": "./dist/types/client/zod/useRhfUtilsZodContext.d.ts"
28
+ "./client/zod/useRhfUtilsClientForZodContext": {
29
+ "default": "./dist/esm/client/zod/useRhfUtilsClientForZodContext.mjs",
30
+ "types": "./dist/types/client/zod/useRhfUtilsClientForZodContext.d.ts"
31
31
  },
32
- "./client/zod/RhfUtilsZodContextProvider": {
33
- "default": "./dist/esm/client/zod/RhfUtilsZodContextProvider.mjs",
34
- "types": "./dist/types/client/zod/RhfUtilsZodContextProvider.d.ts"
32
+ "./client/zod/RhfUtilsClientForZodContextProvider": {
33
+ "default": "./dist/esm/client/zod/RhfUtilsClientForZodContextProvider.mjs",
34
+ "types": "./dist/types/client/zod/RhfUtilsClientForZodContextProvider.d.ts"
35
35
  },
36
36
  "./LazyDevTool": {
37
37
  "default": "./dist/esm/devtool/LazyDevTool.mjs",
@@ -1,11 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import i from "react";
3
- import s from "../createZodRhfUtilsClient.mjs";
4
- import { _RhfUtilsContextProvider as f } from "./index.mjs";
5
- const n = ({ config: t, children: o }) => {
6
- const [r] = i.useState(() => s(t));
7
- return /* @__PURE__ */ e(f, { value: r, children: o });
8
- }, c = n;
9
- export {
10
- c as default
11
- };