@paragrav/rhf-utils 0.0.26 → 0.0.27

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.
Files changed (142) hide show
  1. package/dist/{devtool → esm/devtool}/LazyDevTool.mjs +4 -4
  2. package/dist/{errors → esm/errors}/orphan/useOrphanFormErrorsToConsoleError.mjs +2 -2
  3. package/dist/{errors → esm/errors}/useFormErrorsEffect.mjs +2 -2
  4. package/dist/esm/errors/useFormErrorsOnChange.mjs +9 -0
  5. package/dist/esm/submit/useFormOnSubmitSuccessful.mjs +11 -0
  6. package/dist/esm/submit/useFormOnSubmitSuccessfulAndReset.mjs +14 -0
  7. package/package.json +39 -39
  8. package/dist/_virtual/_commonjsHelpers.mjs +0 -8
  9. package/dist/_virtual/index.mjs +0 -4
  10. package/dist/errors/useFormErrorsOnChange.mjs +0 -9
  11. package/dist/node_modules/@babel/runtime/helpers/esm/extends.mjs +0 -13
  12. package/dist/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.mjs +0 -305
  13. package/dist/node_modules/@emotion/hash/dist/emotion-hash.esm.mjs +0 -22
  14. package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.mjs +0 -10
  15. package/dist/node_modules/@emotion/memoize/dist/emotion-memoize.esm.mjs +0 -9
  16. package/dist/node_modules/@emotion/react/dist/emotion-element-43c6fea0.browser.esm.mjs +0 -57
  17. package/dist/node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.mjs +0 -167
  18. package/dist/node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.mjs +0 -49
  19. package/dist/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.mjs +0 -82
  20. package/dist/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.mjs +0 -146
  21. package/dist/node_modules/@emotion/unitless/dist/emotion-unitless.esm.mjs +0 -52
  22. package/dist/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.mjs +0 -7
  23. package/dist/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.mjs +0 -34
  24. package/dist/node_modules/@hookform/devtools/dist/index.esm.mjs +0 -1402
  25. package/dist/node_modules/dequal/dist/index.mjs +0 -64
  26. package/dist/node_modules/little-state-machine/dist/little-state-machine.es.mjs +0 -67
  27. package/dist/node_modules/lodash/_Hash.mjs +0 -22
  28. package/dist/node_modules/lodash/_ListCache.mjs +0 -22
  29. package/dist/node_modules/lodash/_Map.mjs +0 -6
  30. package/dist/node_modules/lodash/_MapCache.mjs +0 -22
  31. package/dist/node_modules/lodash/_Symbol.mjs +0 -5
  32. package/dist/node_modules/lodash/_arrayMap.mjs +0 -9
  33. package/dist/node_modules/lodash/_assocIndexOf.mjs +0 -12
  34. package/dist/node_modules/lodash/_baseGet.mjs +0 -13
  35. package/dist/node_modules/lodash/_baseGetTag.mjs +0 -11
  36. package/dist/node_modules/lodash/_baseIsNative.mjs +0 -17
  37. package/dist/node_modules/lodash/_baseToString.mjs +0 -19
  38. package/dist/node_modules/lodash/_castPath.mjs +0 -12
  39. package/dist/node_modules/lodash/_coreJsData.mjs +0 -5
  40. package/dist/node_modules/lodash/_freeGlobal.mjs +0 -5
  41. package/dist/node_modules/lodash/_getMapData.mjs +0 -10
  42. package/dist/node_modules/lodash/_getNative.mjs +0 -11
  43. package/dist/node_modules/lodash/_getRawTag.mjs +0 -16
  44. package/dist/node_modules/lodash/_getValue.mjs +0 -7
  45. package/dist/node_modules/lodash/_hashClear.mjs +0 -9
  46. package/dist/node_modules/lodash/_hashDelete.mjs +0 -8
  47. package/dist/node_modules/lodash/_hashGet.mjs +0 -14
  48. package/dist/node_modules/lodash/_hashHas.mjs +0 -10
  49. package/dist/node_modules/lodash/_hashSet.mjs +0 -10
  50. package/dist/node_modules/lodash/_isKey.mjs +0 -13
  51. package/dist/node_modules/lodash/_isKeyable.mjs +0 -8
  52. package/dist/node_modules/lodash/_isMasked.mjs +0 -12
  53. package/dist/node_modules/lodash/_listCacheClear.mjs +0 -7
  54. package/dist/node_modules/lodash/_listCacheDelete.mjs +0 -13
  55. package/dist/node_modules/lodash/_listCacheGet.mjs +0 -10
  56. package/dist/node_modules/lodash/_listCacheHas.mjs +0 -9
  57. package/dist/node_modules/lodash/_listCacheSet.mjs +0 -10
  58. package/dist/node_modules/lodash/_mapCacheClear.mjs +0 -15
  59. package/dist/node_modules/lodash/_mapCacheDelete.mjs +0 -10
  60. package/dist/node_modules/lodash/_mapCacheGet.mjs +0 -9
  61. package/dist/node_modules/lodash/_mapCacheHas.mjs +0 -9
  62. package/dist/node_modules/lodash/_mapCacheSet.mjs +0 -10
  63. package/dist/node_modules/lodash/_memoizeCapped.mjs +0 -12
  64. package/dist/node_modules/lodash/_nativeCreate.mjs +0 -5
  65. package/dist/node_modules/lodash/_objectToString.mjs +0 -8
  66. package/dist/node_modules/lodash/_root.mjs +0 -5
  67. package/dist/node_modules/lodash/_stringToPath.mjs +0 -10
  68. package/dist/node_modules/lodash/_toKey.mjs +0 -12
  69. package/dist/node_modules/lodash/_toSource.mjs +0 -18
  70. package/dist/node_modules/lodash/eq.mjs +0 -7
  71. package/dist/node_modules/lodash/get.mjs +0 -12
  72. package/dist/node_modules/lodash/isArray.mjs +0 -4
  73. package/dist/node_modules/lodash/isFunction.mjs +0 -13
  74. package/dist/node_modules/lodash/isObject.mjs +0 -11
  75. package/dist/node_modules/lodash/isObjectLike.mjs +0 -7
  76. package/dist/node_modules/lodash/isSymbol.mjs +0 -10
  77. package/dist/node_modules/lodash/isUndefined.mjs +0 -9
  78. package/dist/node_modules/lodash/memoize.mjs +0 -19
  79. package/dist/node_modules/lodash/toString.mjs +0 -9
  80. package/dist/node_modules/react-simple-animate/dist/index.mjs +0 -257
  81. package/dist/node_modules/stylis/src/Enum.mjs +0 -12
  82. package/dist/node_modules/stylis/src/Middleware.mjs +0 -18
  83. package/dist/node_modules/stylis/src/Parser.mjs +0 -114
  84. package/dist/node_modules/stylis/src/Serializer.mjs +0 -28
  85. package/dist/node_modules/stylis/src/Tokenizer.mjs +0 -131
  86. package/dist/node_modules/stylis/src/Utility.mjs +0 -50
  87. package/dist/node_modules/use-deep-compare-effect/dist/use-deep-compare-effect.esm.mjs +0 -24
  88. package/dist/node_modules/uuid/dist/esm-browser/regex.mjs +0 -4
  89. package/dist/node_modules/uuid/dist/esm-browser/rng.mjs +0 -9
  90. package/dist/node_modules/uuid/dist/esm-browser/stringify.mjs +0 -13
  91. package/dist/node_modules/uuid/dist/esm-browser/v4.mjs +0 -16
  92. package/dist/node_modules/uuid/dist/esm-browser/validate.mjs +0 -7
  93. package/dist/submit/useFormOnSubmitSuccessful.mjs +0 -11
  94. package/dist/submit/useFormOnSubmitSuccessfulAndReset.mjs +0 -14
  95. /package/dist/{errors → esm/errors}/flattenFieldErrors.mjs +0 -0
  96. /package/dist/{errors → esm/errors}/getFlatFieldErrors.mjs +0 -0
  97. /package/dist/{errors → esm/errors}/isFieldError.mjs +0 -0
  98. /package/dist/{errors → esm/errors}/message/FormErrorMessage.mjs +0 -0
  99. /package/dist/{errors → esm/errors}/message/FormErrorMessageByPath.mjs +0 -0
  100. /package/dist/{errors → esm/errors}/nonfield/FormNonFieldErrorMarker.mjs +0 -0
  101. /package/dist/{errors → esm/errors}/nonfield/FormNonFieldErrorMarker.utils.mjs +0 -0
  102. /package/dist/{errors → esm/errors}/nonfield/isNonFieldError.mjs +0 -0
  103. /package/dist/{errors → esm/errors}/orphan/getOrphanFlatFieldErrors.mjs +0 -0
  104. /package/dist/{errors → esm/errors}/orphan/useFormHasOrphanAndNoFieldErrors.mjs +0 -0
  105. /package/dist/{errors → esm/errors}/orphan/useOrphanFormErrors.mjs +0 -0
  106. /package/dist/{errors → esm/errors}/root/useRootFormFieldErrors.mjs +0 -0
  107. /package/dist/{errors → esm/errors}/root/utils.mjs +0 -0
  108. /package/dist/{errors → esm/errors}/useFormErrorConsoleDebug.mjs +0 -0
  109. /package/dist/{errors → esm/errors}/useFormErrorsIfAny.mjs +0 -0
  110. /package/dist/{errors → esm/errors}/useFormFieldErrors.mjs +0 -0
  111. /package/dist/{errors → esm/errors}/useFormRequestSubmit.mjs +0 -0
  112. /package/dist/{isEmptyObject.mjs → esm/isEmptyObject.mjs} +0 -0
  113. /package/dist/{main.mjs → esm/main.mjs} +0 -0
  114. /package/dist/{submit → esm/submit}/useResetFormOnSubmitSuccessful.mjs +0 -0
  115. /package/dist/{devtool → types/devtool}/LazyDevTool.d.ts +0 -0
  116. /package/dist/{errors → types/errors}/flattenFieldErrors.d.ts +0 -0
  117. /package/dist/{errors → types/errors}/getFlatFieldErrors.d.ts +0 -0
  118. /package/dist/{errors → types/errors}/isFieldError.d.ts +0 -0
  119. /package/dist/{errors → types/errors}/message/FormErrorMessage.d.ts +0 -0
  120. /package/dist/{errors → types/errors}/message/FormErrorMessageByPath.d.ts +0 -0
  121. /package/dist/{errors → types/errors}/nonfield/FormNonFieldErrorMarker.d.ts +0 -0
  122. /package/dist/{errors → types/errors}/nonfield/FormNonFieldErrorMarker.spec.d.ts +0 -0
  123. /package/dist/{errors → types/errors}/nonfield/FormNonFieldErrorMarker.utils.d.ts +0 -0
  124. /package/dist/{errors → types/errors}/nonfield/isNonFieldError.d.ts +0 -0
  125. /package/dist/{errors → types/errors}/orphan/getOrphanFlatFieldErrors.d.ts +0 -0
  126. /package/dist/{errors → types/errors}/orphan/useFormHasOrphanAndNoFieldErrors.d.ts +0 -0
  127. /package/dist/{errors → types/errors}/orphan/useOrphanFormErrors.d.ts +0 -0
  128. /package/dist/{errors → types/errors}/orphan/useOrphanFormErrorsToConsoleError.d.ts +0 -0
  129. /package/dist/{errors → types/errors}/root/useRootFormFieldErrors.d.ts +0 -0
  130. /package/dist/{errors → types/errors}/root/utils.d.ts +0 -0
  131. /package/dist/{errors → types/errors}/useFormErrorConsoleDebug.d.ts +0 -0
  132. /package/dist/{errors → types/errors}/useFormErrorsEffect.d.ts +0 -0
  133. /package/dist/{errors → types/errors}/useFormErrorsIfAny.d.ts +0 -0
  134. /package/dist/{errors → types/errors}/useFormErrorsOnChange.d.ts +0 -0
  135. /package/dist/{errors → types/errors}/useFormFieldErrors.d.ts +0 -0
  136. /package/dist/{errors → types/errors}/useFormFlatFieldErrors.d.ts +0 -0
  137. /package/dist/{errors → types/errors}/useFormRequestSubmit.d.ts +0 -0
  138. /package/dist/{isEmptyObject.d.ts → types/isEmptyObject.d.ts} +0 -0
  139. /package/dist/{main.d.ts → types/main.d.ts} +0 -0
  140. /package/dist/{submit → types/submit}/useFormOnSubmitSuccessful.d.ts +0 -0
  141. /package/dist/{submit → types/submit}/useFormOnSubmitSuccessfulAndReset.d.ts +0 -0
  142. /package/dist/{submit → types/submit}/useResetFormOnSubmitSuccessful.d.ts +0 -0
@@ -2,15 +2,15 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import e from "react";
3
3
  import { useFormContext as n } from "react-hook-form";
4
4
  const a = e.lazy(
5
- () => import("../node_modules/@hookform/devtools/dist/index.esm.mjs").then((o) => ({
5
+ () => import("@hookform/devtools").then((o) => ({
6
6
  default: o.DevTool
7
7
  }))
8
- ), f = ({ isDev: o, ...l }) => {
8
+ ), s = ({ isDev: o, ...l }) => {
9
9
  if (!o)
10
10
  return null;
11
11
  const { control: r } = n();
12
12
  return /* @__PURE__ */ t(e.Suspense, { fallback: null, children: /* @__PURE__ */ t(a, { control: r, ...l }) });
13
- }, m = f;
13
+ }, u = s;
14
14
  export {
15
- m as default
15
+ u as default
16
16
  };
@@ -1,9 +1,9 @@
1
1
  import n from "react";
2
- import { useFormContext as a, useFormState as m } from "react-hook-form";
2
+ import { useFormContext as m, useFormState as a } from "react-hook-form";
3
3
  import c from "../../isEmptyObject.mjs";
4
4
  import p from "./useOrphanFormErrors.mjs";
5
5
  const u = (o, e) => {
6
- const { getValues: s } = a(), { errors: t } = m(), r = p(o);
6
+ const { getValues: s } = m(), { errors: t } = a(), r = p(o);
7
7
  n.useEffect(() => {
8
8
  if (!c(r) && (console.error(
9
9
  "useOrphanFormErrorsToConsoleError",
@@ -5,7 +5,7 @@ const s = (r) => {
5
5
  t.useEffect(() => {
6
6
  r(o);
7
7
  }, [r, o]);
8
- }, u = s;
8
+ }, c = s;
9
9
  export {
10
- u as default
10
+ c as default
11
11
  };
@@ -0,0 +1,9 @@
1
+ import e from "react";
2
+ import { useFormState as t } from "react-hook-form";
3
+ const n = (r) => {
4
+ const { errors: o } = t();
5
+ return e.useMemo(() => r(o), [r, o]);
6
+ };
7
+ export {
8
+ n as default
9
+ };
@@ -0,0 +1,11 @@
1
+ import u from "react";
2
+ import { useFormState as e } from "react-hook-form";
3
+ const o = (s) => {
4
+ const { isSubmitSuccessful: t } = e();
5
+ u.useEffect(() => {
6
+ s && t && s();
7
+ }, [s, t]);
8
+ }, r = o;
9
+ export {
10
+ r as default
11
+ };
@@ -0,0 +1,14 @@
1
+ import r from "react";
2
+ import { useFormState as c } from "react-hook-form";
3
+ import f from "./useFormOnSubmitSuccessful.mjs";
4
+ const m = (s) => {
5
+ const { isSubmitSuccessful: t, isDirty: u } = c(), e = r.useRef(!1);
6
+ f(() => {
7
+ e.current = !0;
8
+ }), r.useEffect(() => {
9
+ s && e.current && !t && !u && (s(), e.current = !1);
10
+ }, [t, u]);
11
+ }, S = m;
12
+ export {
13
+ S as default
14
+ };
package/package.json CHANGED
@@ -2,90 +2,90 @@
2
2
  "name": "@paragrav/rhf-utils",
3
3
  "author": "paragrav.dev",
4
4
  "license": "MIT",
5
- "version": "0.0.26",
5
+ "version": "0.0.27",
6
6
  "description": "Integration utilities for react-hook-form.",
7
7
  "type": "module",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "dist"
11
11
  ],
12
- "module": "./dist/main.mjs",
12
+ "module": "./dist/esm/main.mjs",
13
13
  "exports": {
14
14
  ".": {
15
- "default": "./dist/main.mjs",
16
- "types": "./dist/main.d.ts"
15
+ "default": "./dist/esm/main.mjs",
16
+ "types": "./dist/types/main.d.ts"
17
17
  },
18
18
  "./LazyDevTool": {
19
- "default": "./dist/devtool/LazyDevTool.mjs",
20
- "types": "./dist/devtool/LazyDevTool.d.ts"
19
+ "default": "./dist/esm/devtool/LazyDevTool.mjs",
20
+ "types": "./dist/types/devtool/LazyDevTool.d.ts"
21
21
  },
22
22
  "./errors/FormErrorMessage": {
23
- "default": "./dist/errors/message/FormErrorMessage.mjs",
24
- "types": "./dist/errors/message/FormErrorMessage.d.ts"
23
+ "default": "./dist/esm/errors/message/FormErrorMessage.mjs",
24
+ "types": "./dist/types/errors/message/FormErrorMessage.d.ts"
25
25
  },
26
26
  "./errors/FormErrorMessageByPath": {
27
- "default": "./dist/errors/message/FormErrorMessageByPath.mjs",
28
- "types": "./dist/errors/message/FormErrorMessageByPath.d.ts"
27
+ "default": "./dist/esm/errors/message/FormErrorMessageByPath.mjs",
28
+ "types": "./dist/types/errors/message/FormErrorMessageByPath.d.ts"
29
29
  },
30
30
  "./errors/useFormErrorConsoleDebug": {
31
- "default": "./dist/errors/useFormErrorConsoleDebug.mjs",
32
- "types": "./dist/errors/useFormErrorConsoleDebug.d.ts"
31
+ "default": "./dist/esm/errors/useFormErrorConsoleDebug.mjs",
32
+ "types": "./dist/types/errors/useFormErrorConsoleDebug.d.ts"
33
33
  },
34
34
  "./errors/useFormErrorsEffect": {
35
- "default": "./dist/errors/useFormErrorsEffect.mjs",
36
- "types": "./dist/errors/useFormErrorsEffect.d.ts"
35
+ "default": "./dist/esm/errors/useFormErrorsEffect.mjs",
36
+ "types": "./dist/types/errors/useFormErrorsEffect.d.ts"
37
37
  },
38
38
  "./errors/useFormErrorsIfAny": {
39
- "default": "./dist/errors/useFormErrorsIfAny.mjs",
40
- "types": "./dist/errors/useFormErrorsIfAny.d.ts"
39
+ "default": "./dist/esm/errors/useFormErrorsIfAny.mjs",
40
+ "types": "./dist/types/errors/useFormErrorsIfAny.d.ts"
41
41
  },
42
42
  "./errors/useFormErrorsOnChange": {
43
- "default": "./dist/errors/useFormErrorsOnChange.mjs",
44
- "types": "./dist/errors/useFormErrorsOnChange.d.ts"
43
+ "default": "./dist/esm/errors/useFormErrorsOnChange.mjs",
44
+ "types": "./dist/types/errors/useFormErrorsOnChange.d.ts"
45
45
  },
46
46
  "./errors/useFormRequestSubmit": {
47
- "default": "./dist/errors/useFormRequestSubmit.mjs",
48
- "types": "./dist/errors/useFormRequestSubmit.d.ts"
47
+ "default": "./dist/esm/errors/useFormRequestSubmit.mjs",
48
+ "types": "./dist/types/errors/useFormRequestSubmit.d.ts"
49
49
  },
50
50
  "./errors/FormNonFieldErrorMarker": {
51
- "default": "./dist/errors/nonfield/FormNonFieldErrorMarker.mjs",
52
- "types": "./dist/errors/nonfield/FormNonFieldErrorMarker.d.ts"
51
+ "default": "./dist/esm/errors/nonfield/FormNonFieldErrorMarker.mjs",
52
+ "types": "./dist/types/errors/nonfield/FormNonFieldErrorMarker.d.ts"
53
53
  },
54
54
  "./errors/FormNonFieldErrorMarkerHtmlAttribute": {
55
- "default": "./dist/errors/nonfield/FormNonFieldErrorMarker.utils.mjs",
56
- "types": "./dist/errors/nonfield/FormNonFieldErrorMarker.utils.d.ts"
55
+ "default": "./dist/esm/errors/nonfield/FormNonFieldErrorMarker.utils.mjs",
56
+ "types": "./dist/types/errors/nonfield/FormNonFieldErrorMarker.utils.d.ts"
57
57
  },
58
58
  "./errors/useOrphanFormErrorsToConsoleError": {
59
- "default": "./dist/errors/orphan/useOrphanFormErrorsToConsoleError.mjs",
60
- "types": "./dist/errors/orphan/useOrphanFormErrorsToConsoleError.d.ts"
59
+ "default": "./dist/esm/errors/orphan/useOrphanFormErrorsToConsoleError.mjs",
60
+ "types": "./dist/types/errors/orphan/useOrphanFormErrorsToConsoleError.d.ts"
61
61
  },
62
62
  "./errors/useFormErrorsHasOnlyOrphans": {
63
- "default": "./dist/errors/orphan/useFormErrorsHasOnlyOrphans.mjs",
64
- "types": "./dist/errors/orphan/useFormErrorsHasOnlyOrphans.d.ts"
63
+ "default": "./dist/esm/errors/orphan/useFormErrorsHasOnlyOrphans.mjs",
64
+ "types": "./dist/types/errors/orphan/useFormErrorsHasOnlyOrphans.d.ts"
65
65
  },
66
66
  "./errors/useOrphanFormErrors": {
67
- "default": "./dist/errors/orphan/useOrphanFormErrors.mjs",
68
- "types": "./dist/errors/orphan/useOrphanFormErrors.d.ts"
67
+ "default": "./dist/esm/errors/orphan/useOrphanFormErrors.mjs",
68
+ "types": "./dist/types/errors/orphan/useOrphanFormErrors.d.ts"
69
69
  },
70
70
  "./errors/useRootFormFieldErrors": {
71
- "default": "./dist/errors/root/useRootFormFieldErrors.mjs",
72
- "types": "./dist/errors/root/useRootFormFieldErrors.d.ts"
71
+ "default": "./dist/esm/errors/root/useRootFormFieldErrors.mjs",
72
+ "types": "./dist/types/errors/root/useRootFormFieldErrors.d.ts"
73
73
  },
74
74
  "./submit/useFormOnSubmitSuccessful": {
75
- "default": "./dist/submit/useFormOnSubmitSuccessful.mjs",
76
- "types": "./dist/submit/useFormOnSubmitSuccessful.d.ts"
75
+ "default": "./dist/esm/submit/useFormOnSubmitSuccessful.mjs",
76
+ "types": "./dist/types/submit/useFormOnSubmitSuccessful.d.ts"
77
77
  },
78
78
  "./submit/useFormOnSubmitSuccessfulAndReset": {
79
- "default": "./dist/submit/useFormOnSubmitSuccessfulAndReset.mjs",
80
- "types": "./dist/submit/useFormOnSubmitSuccessfulAndReset.d.ts"
79
+ "default": "./dist/esm/submit/useFormOnSubmitSuccessfulAndReset.mjs",
80
+ "types": "./dist/types/submit/useFormOnSubmitSuccessfulAndReset.d.ts"
81
81
  },
82
82
  "./submit/useResetFormAfterSubmitSuccessful": {
83
- "default": "./dist/submit/useResetFormAfterSubmitSuccessful.mjs",
84
- "types": "./dist/submit/useResetFormAfterSubmitSuccessful.d.ts"
83
+ "default": "./dist/esm/submit/useResetFormAfterSubmitSuccessful.mjs",
84
+ "types": "./dist/types/submit/useResetFormAfterSubmitSuccessful.d.ts"
85
85
  }
86
86
  },
87
87
  "scripts": {
88
- "build": "npm run validate && npm run build:esm",
88
+ "build": "npm install && npm run validate && npm run build:esm",
89
89
  "build:esm": "vite build",
90
90
  "lint": "eslint --ignore-path ./.gitignore --ext ts,tsx --report-unused-disable-directives --max-warnings 0 .",
91
91
  "preinstall": "npx only-allow npm",
@@ -1,8 +0,0 @@
1
- var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function l(e) {
3
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
- }
5
- export {
6
- o as commonjsGlobal,
7
- l as getDefaultExportFromCjs
8
- };
@@ -1,4 +0,0 @@
1
- var r = {};
2
- export {
3
- r as __exports
4
- };
@@ -1,9 +0,0 @@
1
- import o from "react";
2
- import { useFormState as t } from "react-hook-form";
3
- const u = (r) => {
4
- const { errors: e } = t();
5
- return o.useMemo(() => r(e), [r, e]);
6
- };
7
- export {
8
- u as default
9
- };
@@ -1,13 +0,0 @@
1
- function e() {
2
- return e = Object.assign ? Object.assign.bind() : function(a) {
3
- for (var n = 1; n < arguments.length; n++) {
4
- var t = arguments[n];
5
- for (var r in t)
6
- Object.prototype.hasOwnProperty.call(t, r) && (a[r] = t[r]);
7
- }
8
- return a;
9
- }, e.apply(this, arguments);
10
- }
11
- export {
12
- e as default
13
- };
@@ -1,305 +0,0 @@
1
- import { StyleSheet as q } from "../../sheet/dist/emotion-sheet.browser.esm.mjs";
2
- import { stringify as L, serialize as $ } from "../../../stylis/src/Serializer.mjs";
3
- import { COMMENT as K, RULESET as U, KEYFRAMES as F, DECLARATION as Y, WEBKIT as s, MS as f, MOZ as E } from "../../../stylis/src/Enum.mjs";
4
- import { rulesheet as B, middleware as H } from "../../../stylis/src/Middleware.mjs";
5
- import { combine as Z, replace as i, hash as z, charat as b, strlen as A, indexof as R, match as G, from as J } from "../../../stylis/src/Utility.mjs";
6
- import { copy as m, dealloc as Q, alloc as X, next as C, token as I, peek as k, delimit as j, slice as v, position as O } from "../../../stylis/src/Tokenizer.mjs";
7
- import { compile as rr } from "../../../stylis/src/Parser.mjs";
8
- var er = function(e, t, n) {
9
- for (var c = 0, a = 0; c = a, a = k(), c === 38 && a === 12 && (t[n] = 1), !I(a); )
10
- C();
11
- return v(e, O);
12
- }, tr = function(e, t) {
13
- var n = -1, c = 44;
14
- do
15
- switch (I(c)) {
16
- case 0:
17
- c === 38 && k() === 12 && (t[n] = 1), e[n] += er(O - 1, t, n);
18
- break;
19
- case 2:
20
- e[n] += j(c);
21
- break;
22
- case 4:
23
- if (c === 44) {
24
- e[++n] = k() === 58 ? "&\f" : "", t[n] = e[n].length;
25
- break;
26
- }
27
- default:
28
- e[n] += J(c);
29
- }
30
- while (c = C());
31
- return e;
32
- }, sr = function(e, t) {
33
- return Q(tr(X(e), t));
34
- }, P = /* @__PURE__ */ new WeakMap(), nr = function(e) {
35
- if (!(e.type !== "rule" || !e.parent || // positive .length indicates that this rule contains pseudo
36
- // negative .length indicates that this rule has been already prefixed
37
- e.length < 1)) {
38
- for (var t = e.value, n = e.parent, c = e.column === n.column && e.line === n.line; n.type !== "rule"; )
39
- if (n = n.parent, !n)
40
- return;
41
- if (!(e.props.length === 1 && t.charCodeAt(0) !== 58 && !P.get(n)) && !c) {
42
- P.set(e, !0);
43
- for (var a = [], l = sr(t, a), h = n.props, u = 0, d = 0; u < l.length; u++)
44
- for (var p = 0; p < h.length; p++, d++)
45
- e.props[d] = a[u] ? l[u].replace(/&\f/g, h[p]) : h[p] + " " + l[u];
46
- }
47
- }
48
- }, ir = function(e) {
49
- if (e.type === "decl") {
50
- var t = e.value;
51
- // charcode for l
52
- t.charCodeAt(0) === 108 && // charcode for b
53
- t.charCodeAt(2) === 98 && (e.return = "", e.value = "");
54
- }
55
- }, cr = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason", ar = function(e) {
56
- return e.type === "comm" && e.children.indexOf(cr) > -1;
57
- }, or = function(e) {
58
- return function(t, n, c) {
59
- if (!(t.type !== "rule" || e.compat)) {
60
- var a = t.value.match(/(:first|:nth|:nth-last)-child/g);
61
- if (a) {
62
- for (var l = !!t.parent, h = l ? t.parent.children : (
63
- // global rule at the root level
64
- c
65
- ), u = h.length - 1; u >= 0; u--) {
66
- var d = h[u];
67
- if (d.line < t.line)
68
- break;
69
- if (d.column < t.column) {
70
- if (ar(d))
71
- return;
72
- break;
73
- }
74
- }
75
- a.forEach(function(p) {
76
- console.error('The pseudo class "' + p + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + p.split("-child")[0] + '-of-type".');
77
- });
78
- }
79
- }
80
- };
81
- }, T = function(e) {
82
- return e.type.charCodeAt(1) === 105 && e.type.charCodeAt(0) === 64;
83
- }, fr = function(e, t) {
84
- for (var n = e - 1; n >= 0; n--)
85
- if (!T(t[n]))
86
- return !0;
87
- return !1;
88
- }, N = function(e) {
89
- e.type = "", e.value = "", e.return = "", e.children = "", e.props = "";
90
- }, pr = function(e, t, n) {
91
- T(e) && (e.parent ? (console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."), N(e)) : fr(t, n) && (console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."), N(e)));
92
- };
93
- function D(r, e) {
94
- switch (z(r, e)) {
95
- case 5103:
96
- return s + "print-" + r + r;
97
- case 5737:
98
- case 4201:
99
- case 3177:
100
- case 3433:
101
- case 1641:
102
- case 4457:
103
- case 2921:
104
- case 5572:
105
- case 6356:
106
- case 5844:
107
- case 3191:
108
- case 6645:
109
- case 3005:
110
- case 6391:
111
- case 5879:
112
- case 5623:
113
- case 6135:
114
- case 4599:
115
- case 4855:
116
- case 4215:
117
- case 6389:
118
- case 5109:
119
- case 5365:
120
- case 5621:
121
- case 3829:
122
- return s + r + r;
123
- case 5349:
124
- case 4246:
125
- case 4810:
126
- case 6968:
127
- case 2756:
128
- return s + r + E + r + f + r + r;
129
- case 6828:
130
- case 4268:
131
- return s + r + f + r + r;
132
- case 6165:
133
- return s + r + f + "flex-" + r + r;
134
- case 5187:
135
- return s + r + i(r, /(\w+).+(:[^]+)/, s + "box-$1$2" + f + "flex-$1$2") + r;
136
- case 5443:
137
- return s + r + f + "flex-item-" + i(r, /flex-|-self/, "") + r;
138
- case 4675:
139
- return s + r + f + "flex-line-pack" + i(r, /align-content|flex-|-self/, "") + r;
140
- case 5548:
141
- return s + r + f + i(r, "shrink", "negative") + r;
142
- case 5292:
143
- return s + r + f + i(r, "basis", "preferred-size") + r;
144
- case 6060:
145
- return s + "box-" + i(r, "-grow", "") + s + r + f + i(r, "grow", "positive") + r;
146
- case 4554:
147
- return s + i(r, /([^-])(transform)/g, "$1" + s + "$2") + r;
148
- case 6187:
149
- return i(i(i(r, /(zoom-|grab)/, s + "$1"), /(image-set)/, s + "$1"), r, "") + r;
150
- case 5495:
151
- case 3959:
152
- return i(r, /(image-set\([^]*)/, s + "$1$`$1");
153
- case 4968:
154
- return i(i(r, /(.+:)(flex-)?(.*)/, s + "box-pack:$3" + f + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + s + r + r;
155
- case 4095:
156
- case 3583:
157
- case 4068:
158
- case 2532:
159
- return i(r, /(.+)-inline(.+)/, s + "$1$2") + r;
160
- case 8116:
161
- case 7059:
162
- case 5753:
163
- case 5535:
164
- case 5445:
165
- case 5701:
166
- case 4933:
167
- case 4677:
168
- case 5533:
169
- case 5789:
170
- case 5021:
171
- case 4765:
172
- if (A(r) - 1 - e > 6)
173
- switch (b(r, e + 1)) {
174
- case 109:
175
- if (b(r, e + 4) !== 45)
176
- break;
177
- case 102:
178
- return i(r, /(.+:)(.+)-([^]+)/, "$1" + s + "$2-$3$1" + E + (b(r, e + 3) == 108 ? "$3" : "$2-$3")) + r;
179
- case 115:
180
- return ~R(r, "stretch") ? D(i(r, "stretch", "fill-available"), e) + r : r;
181
- }
182
- break;
183
- case 4949:
184
- if (b(r, e + 1) !== 115)
185
- break;
186
- case 6444:
187
- switch (b(r, A(r) - 3 - (~R(r, "!important") && 10))) {
188
- case 107:
189
- return i(r, ":", ":" + s) + r;
190
- case 101:
191
- return i(r, /(.+:)([^;!]+)(;|!.+)?/, "$1" + s + (b(r, 14) === 45 ? "inline-" : "") + "box$3$1" + s + "$2$3$1" + f + "$2box$3") + r;
192
- }
193
- break;
194
- case 5936:
195
- switch (b(r, e + 11)) {
196
- case 114:
197
- return s + r + f + i(r, /[svh]\w+-[tblr]{2}/, "tb") + r;
198
- case 108:
199
- return s + r + f + i(r, /[svh]\w+-[tblr]{2}/, "tb-rl") + r;
200
- case 45:
201
- return s + r + f + i(r, /[svh]\w+-[tblr]{2}/, "lr") + r;
202
- }
203
- return s + r + f + r + r;
204
- }
205
- return r;
206
- }
207
- var ur = function(e, t, n, c) {
208
- if (e.length > -1 && !e.return)
209
- switch (e.type) {
210
- case Y:
211
- e.return = D(e.value, e.length);
212
- break;
213
- case F:
214
- return $([m(e, {
215
- value: i(e.value, "@", "@" + s)
216
- })], c);
217
- case U:
218
- if (e.length)
219
- return Z(e.props, function(a) {
220
- switch (G(a, /(::plac\w+|:read-\w+)/)) {
221
- case ":read-only":
222
- case ":read-write":
223
- return $([m(e, {
224
- props: [i(a, /:(read-\w+)/, ":" + E + "$1")]
225
- })], c);
226
- case "::placeholder":
227
- return $([m(e, {
228
- props: [i(a, /:(plac\w+)/, ":" + s + "input-$1")]
229
- }), m(e, {
230
- props: [i(a, /:(plac\w+)/, ":" + E + "$1")]
231
- }), m(e, {
232
- props: [i(a, /:(plac\w+)/, f + "input-$1")]
233
- })], c);
234
- }
235
- return "";
236
- });
237
- }
238
- }, hr = [ur], Er = function(e) {
239
- var t = e.key;
240
- if (process.env.NODE_ENV !== "production" && !t)
241
- throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
242
- If multiple caches share the same key they might "fight" for each other's style elements.`);
243
- if (t === "css") {
244
- var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
245
- Array.prototype.forEach.call(n, function(o) {
246
- var y = o.getAttribute("data-emotion");
247
- y.indexOf(" ") !== -1 && (document.head.appendChild(o), o.setAttribute("data-s", ""));
248
- });
249
- }
250
- var c = e.stylisPlugins || hr;
251
- if (process.env.NODE_ENV !== "production" && /[^a-z-]/.test(t))
252
- throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + t + '" was passed');
253
- var a = {}, l, h = [];
254
- l = e.container || document.head, Array.prototype.forEach.call(
255
- // this means we will ignore elements which don't have a space in them which
256
- // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
257
- document.querySelectorAll('style[data-emotion^="' + t + ' "]'),
258
- function(o) {
259
- for (var y = o.getAttribute("data-emotion").split(" "), g = 1; g < y.length; g++)
260
- a[y[g]] = !0;
261
- h.push(o);
262
- }
263
- );
264
- var u, d = [nr, ir];
265
- process.env.NODE_ENV !== "production" && d.push(or({
266
- get compat() {
267
- return w.compat;
268
- }
269
- }), pr);
270
- {
271
- var p, M = [L, process.env.NODE_ENV !== "production" ? function(o) {
272
- o.root || (o.return ? p.insert(o.return) : o.value && o.type !== K && p.insert(o.value + "{}"));
273
- } : B(function(o) {
274
- p.insert(o);
275
- })], S = H(d.concat(c, M)), W = function(y) {
276
- return $(rr(y), S);
277
- };
278
- u = function(y, g, x, _) {
279
- p = x, process.env.NODE_ENV !== "production" && g.map !== void 0 && (p = {
280
- insert: function(V) {
281
- x.insert(V + g.map);
282
- }
283
- }), W(y ? y + "{" + g.styles + "}" : g.styles), _ && (w.inserted[g.name] = !0);
284
- };
285
- }
286
- var w = {
287
- key: t,
288
- sheet: new q({
289
- key: t,
290
- container: l,
291
- nonce: e.nonce,
292
- speedy: e.speedy,
293
- prepend: e.prepend,
294
- insertionPoint: e.insertionPoint
295
- }),
296
- nonce: e.nonce,
297
- inserted: a,
298
- registered: {},
299
- insert: u
300
- };
301
- return w.sheet.hydrate(h), w;
302
- };
303
- export {
304
- Er as default
305
- };
@@ -1,22 +0,0 @@
1
- function c(e) {
2
- for (var f = 0, x, a = 0, d = e.length; d >= 4; ++a, d -= 4)
3
- x = e.charCodeAt(a) & 255 | (e.charCodeAt(++a) & 255) << 8 | (e.charCodeAt(++a) & 255) << 16 | (e.charCodeAt(++a) & 255) << 24, x = /* Math.imul(k, m): */
4
- (x & 65535) * 1540483477 + ((x >>> 16) * 59797 << 16), x ^= /* k >>> r: */
5
- x >>> 24, f = /* Math.imul(k, m): */
6
- (x & 65535) * 1540483477 + ((x >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
7
- (f & 65535) * 1540483477 + ((f >>> 16) * 59797 << 16);
8
- switch (d) {
9
- case 3:
10
- f ^= (e.charCodeAt(a + 2) & 255) << 16;
11
- case 2:
12
- f ^= (e.charCodeAt(a + 1) & 255) << 8;
13
- case 1:
14
- f ^= e.charCodeAt(a) & 255, f = /* Math.imul(h, m): */
15
- (f & 65535) * 1540483477 + ((f >>> 16) * 59797 << 16);
16
- }
17
- return f ^= f >>> 13, f = /* Math.imul(h, m): */
18
- (f & 65535) * 1540483477 + ((f >>> 16) * 59797 << 16), ((f ^ f >>> 15) >>> 0).toString(36);
19
- }
20
- export {
21
- c as default
22
- };
@@ -1,10 +0,0 @@
1
- import t from "../../memoize/dist/emotion-memoize.esm.mjs";
2
- var r = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, a = /* @__PURE__ */ t(
3
- function(e) {
4
- return r.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
5
- }
6
- /* Z+1 */
7
- );
8
- export {
9
- a as default
10
- };
@@ -1,9 +0,0 @@
1
- function u(t) {
2
- var n = /* @__PURE__ */ Object.create(null);
3
- return function(e) {
4
- return n[e] === void 0 && (n[e] = t(e)), n[e];
5
- };
6
- }
7
- export {
8
- u as default
9
- };