@paragrav/rhf-utils 0.0.23 → 0.0.26
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/_virtual/_commonjsHelpers.mjs +8 -0
- package/dist/_virtual/index.mjs +4 -0
- package/dist/devtool/LazyDevTool.d.ts +11 -0
- package/dist/devtool/LazyDevTool.mjs +16 -0
- package/dist/errors/getFlatFieldErrors.mjs +11 -11
- package/dist/errors/isFieldError.d.ts +7 -0
- package/dist/errors/isFieldError.mjs +4 -0
- package/dist/errors/message/FormErrorMessage.d.ts +8 -0
- package/dist/errors/message/FormErrorMessage.mjs +14 -0
- package/dist/errors/message/FormErrorMessageByPath.d.ts +9 -0
- package/dist/errors/message/FormErrorMessageByPath.mjs +17 -0
- package/dist/errors/nonfield/{utils.d.ts → isNonFieldError.d.ts} +3 -2
- package/dist/errors/nonfield/isNonFieldError.mjs +5 -0
- package/dist/errors/orphan/getOrphanFlatFieldErrors.d.ts +5 -0
- package/dist/errors/orphan/{utils.mjs → getOrphanFlatFieldErrors.mjs} +7 -7
- package/dist/errors/orphan/useFormHasOrphanAndNoFieldErrors.d.ts +9 -0
- package/dist/errors/orphan/useFormHasOrphanAndNoFieldErrors.mjs +10 -0
- package/dist/errors/orphan/useOrphanFormErrors.mjs +2 -2
- package/dist/errors/orphan/useOrphanFormErrorsToConsoleError.d.ts +4 -3
- package/dist/errors/orphan/useOrphanFormErrorsToConsoleError.mjs +22 -14
- package/dist/errors/useFormErrorsEffect.mjs +2 -2
- package/dist/errors/useFormErrorsIfAny.mjs +1 -1
- package/dist/errors/useFormErrorsOnChange.mjs +5 -5
- package/dist/errors/useFormFieldErrors.d.ts +6 -0
- package/dist/errors/useFormFieldErrors.mjs +13 -0
- package/dist/isEmptyObject.d.ts +2 -0
- package/dist/isEmptyObject.mjs +4 -0
- package/dist/main.d.ts +4 -1
- package/dist/main.mjs +34 -28
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.mjs +13 -0
- package/dist/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.mjs +305 -0
- package/dist/node_modules/@emotion/hash/dist/emotion-hash.esm.mjs +22 -0
- package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.mjs +10 -0
- package/dist/node_modules/@emotion/memoize/dist/emotion-memoize.esm.mjs +9 -0
- package/dist/node_modules/@emotion/react/dist/emotion-element-43c6fea0.browser.esm.mjs +57 -0
- package/dist/node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.mjs +167 -0
- package/dist/node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.mjs +49 -0
- package/dist/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.mjs +82 -0
- package/dist/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.mjs +146 -0
- package/dist/node_modules/@emotion/unitless/dist/emotion-unitless.esm.mjs +52 -0
- package/dist/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.mjs +7 -0
- package/dist/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.mjs +34 -0
- package/dist/node_modules/@hookform/devtools/dist/index.esm.mjs +1402 -0
- package/dist/node_modules/dequal/dist/index.mjs +64 -0
- package/dist/node_modules/little-state-machine/dist/little-state-machine.es.mjs +67 -0
- package/dist/node_modules/lodash/_Hash.mjs +22 -0
- package/dist/node_modules/lodash/_ListCache.mjs +22 -0
- package/dist/node_modules/lodash/_Map.mjs +6 -0
- package/dist/node_modules/lodash/_MapCache.mjs +22 -0
- package/dist/node_modules/lodash/_Symbol.mjs +5 -0
- package/dist/node_modules/lodash/_arrayMap.mjs +9 -0
- package/dist/node_modules/lodash/_assocIndexOf.mjs +12 -0
- package/dist/node_modules/lodash/_baseGet.mjs +13 -0
- package/dist/node_modules/lodash/_baseGetTag.mjs +11 -0
- package/dist/node_modules/lodash/_baseIsNative.mjs +17 -0
- package/dist/node_modules/lodash/_baseToString.mjs +19 -0
- package/dist/node_modules/lodash/_castPath.mjs +12 -0
- package/dist/node_modules/lodash/_coreJsData.mjs +5 -0
- package/dist/node_modules/lodash/_freeGlobal.mjs +5 -0
- package/dist/node_modules/lodash/_getMapData.mjs +10 -0
- package/dist/node_modules/lodash/_getNative.mjs +11 -0
- package/dist/node_modules/lodash/_getRawTag.mjs +16 -0
- package/dist/node_modules/lodash/_getValue.mjs +7 -0
- package/dist/node_modules/lodash/_hashClear.mjs +9 -0
- package/dist/node_modules/lodash/_hashDelete.mjs +8 -0
- package/dist/node_modules/lodash/_hashGet.mjs +14 -0
- package/dist/node_modules/lodash/_hashHas.mjs +10 -0
- package/dist/node_modules/lodash/_hashSet.mjs +10 -0
- package/dist/node_modules/lodash/_isKey.mjs +13 -0
- package/dist/node_modules/lodash/_isKeyable.mjs +8 -0
- package/dist/node_modules/lodash/_isMasked.mjs +12 -0
- package/dist/node_modules/lodash/_listCacheClear.mjs +7 -0
- package/dist/node_modules/lodash/_listCacheDelete.mjs +13 -0
- package/dist/node_modules/lodash/_listCacheGet.mjs +10 -0
- package/dist/node_modules/lodash/_listCacheHas.mjs +9 -0
- package/dist/node_modules/lodash/_listCacheSet.mjs +10 -0
- package/dist/node_modules/lodash/_mapCacheClear.mjs +15 -0
- package/dist/node_modules/lodash/_mapCacheDelete.mjs +10 -0
- package/dist/node_modules/lodash/_mapCacheGet.mjs +9 -0
- package/dist/node_modules/lodash/_mapCacheHas.mjs +9 -0
- package/dist/node_modules/lodash/_mapCacheSet.mjs +10 -0
- package/dist/node_modules/lodash/_memoizeCapped.mjs +12 -0
- package/dist/node_modules/lodash/_nativeCreate.mjs +5 -0
- package/dist/node_modules/lodash/_objectToString.mjs +8 -0
- package/dist/node_modules/lodash/_root.mjs +5 -0
- package/dist/node_modules/lodash/_stringToPath.mjs +10 -0
- package/dist/node_modules/lodash/_toKey.mjs +12 -0
- package/dist/node_modules/lodash/_toSource.mjs +18 -0
- package/dist/node_modules/lodash/eq.mjs +7 -0
- package/dist/node_modules/lodash/get.mjs +12 -0
- package/dist/node_modules/lodash/isArray.mjs +4 -0
- package/dist/node_modules/lodash/isFunction.mjs +13 -0
- package/dist/node_modules/lodash/isObject.mjs +11 -0
- package/dist/node_modules/lodash/isObjectLike.mjs +7 -0
- package/dist/node_modules/lodash/isSymbol.mjs +10 -0
- package/dist/node_modules/lodash/isUndefined.mjs +9 -0
- package/dist/node_modules/lodash/memoize.mjs +19 -0
- package/dist/node_modules/lodash/toString.mjs +9 -0
- package/dist/node_modules/react-simple-animate/dist/index.mjs +257 -0
- package/dist/node_modules/stylis/src/Enum.mjs +12 -0
- package/dist/node_modules/stylis/src/Middleware.mjs +18 -0
- package/dist/node_modules/stylis/src/Parser.mjs +114 -0
- package/dist/node_modules/stylis/src/Serializer.mjs +28 -0
- package/dist/node_modules/stylis/src/Tokenizer.mjs +131 -0
- package/dist/node_modules/stylis/src/Utility.mjs +50 -0
- package/dist/node_modules/use-deep-compare-effect/dist/use-deep-compare-effect.esm.mjs +24 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.mjs +4 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.mjs +9 -0
- package/dist/node_modules/uuid/dist/esm-browser/stringify.mjs +13 -0
- package/dist/node_modules/uuid/dist/esm-browser/v4.mjs +16 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.mjs +7 -0
- package/dist/submit/useFormOnSubmitSuccessful.mjs +7 -7
- package/dist/submit/useFormOnSubmitSuccessfulAndReset.mjs +7 -7
- package/package.json +14 -1
- package/dist/errors/nonfield/utils.mjs +0 -4
- package/dist/errors/orphan/useFormErrorsHasOnlyOrphans.d.ts +0 -2
- package/dist/errors/orphan/useFormErrorsHasOnlyOrphans.mjs +0 -10
- package/dist/errors/orphan/utils.d.ts +0 -4
- package/dist/errors/useFormFlatFieldErrors.mjs +0 -6
- package/dist/utils.d.ts +0 -1
- package/dist/utils.mjs +0 -4
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import z from "../../../../@babel/runtime/helpers/esm/extends.mjs";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import D from "../../../is-prop-valid/dist/emotion-is-prop-valid.esm.mjs";
|
|
4
|
+
import { getRegisteredStyles as A, registerStyles as I, insertStyles as V } from "../../../utils/dist/emotion-utils.browser.esm.mjs";
|
|
5
|
+
import { serializeStyles as x } from "../../../serialize/dist/emotion-serialize.browser.esm.mjs";
|
|
6
|
+
import { useInsertionEffectAlwaysWithSyncFallback as L } from "../../../use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.mjs";
|
|
7
|
+
import { w as Y, T as U } from "../../../react/dist/emotion-element-43c6fea0.browser.esm.mjs";
|
|
8
|
+
var q = D, J = function(e) {
|
|
9
|
+
return e !== "theme";
|
|
10
|
+
}, O = function(e) {
|
|
11
|
+
return typeof e == "string" && // 96 is one less than the char code
|
|
12
|
+
// for "a" so this is checking that
|
|
13
|
+
// it's a lowercase character
|
|
14
|
+
e.charCodeAt(0) > 96 ? q : J;
|
|
15
|
+
}, C = function(e, n, s) {
|
|
16
|
+
var r;
|
|
17
|
+
if (n) {
|
|
18
|
+
var a = n.shouldForwardProp;
|
|
19
|
+
r = e.__emotion_forwardProp && a ? function(l) {
|
|
20
|
+
return e.__emotion_forwardProp(l) && a(l);
|
|
21
|
+
} : a;
|
|
22
|
+
}
|
|
23
|
+
return typeof r != "function" && s && (r = e.__emotion_forwardProp), r;
|
|
24
|
+
}, b = `You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
25
|
+
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
|
26
|
+
You can read more about this here:
|
|
27
|
+
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`, W = function(e) {
|
|
28
|
+
var n = e.cache, s = e.serialized, r = e.isStringTag;
|
|
29
|
+
return I(n, s, r), L(function() {
|
|
30
|
+
return V(n, s, r);
|
|
31
|
+
}), null;
|
|
32
|
+
}, K = function f(e, n) {
|
|
33
|
+
if (process.env.NODE_ENV !== "production" && e === void 0)
|
|
34
|
+
throw new Error(`You are trying to create a styled element with an undefined component.
|
|
35
|
+
You may have forgotten to import it.`);
|
|
36
|
+
var s = e.__emotion_real === e, r = s && e.__emotion_base || e, a, l;
|
|
37
|
+
n !== void 0 && (a = n.label, l = n.target);
|
|
38
|
+
var y = C(e, n, s), E = y || O(r), S = !E("as");
|
|
39
|
+
return function() {
|
|
40
|
+
var i = arguments, u = s && e.__emotion_styles !== void 0 ? e.__emotion_styles.slice(0) : [];
|
|
41
|
+
if (a !== void 0 && u.push("label:" + a + ";"), i[0] == null || i[0].raw === void 0)
|
|
42
|
+
u.push.apply(u, i);
|
|
43
|
+
else {
|
|
44
|
+
process.env.NODE_ENV !== "production" && i[0][0] === void 0 && console.error(b), u.push(i[0][0]);
|
|
45
|
+
for (var F = i.length, m = 1; m < F; m++)
|
|
46
|
+
process.env.NODE_ENV !== "production" && i[0][m] === void 0 && console.error(b), u.push(i[m], i[0][m]);
|
|
47
|
+
}
|
|
48
|
+
var o = Y(function(t, d, T) {
|
|
49
|
+
var g = S && t.as || r, c = "", P = [], _ = t;
|
|
50
|
+
if (t.theme == null) {
|
|
51
|
+
_ = {};
|
|
52
|
+
for (var w in t)
|
|
53
|
+
_[w] = t[w];
|
|
54
|
+
_.theme = v.useContext(U);
|
|
55
|
+
}
|
|
56
|
+
typeof t.className == "string" ? c = A(d.registered, P, t.className) : t.className != null && (c = t.className + " ");
|
|
57
|
+
var N = x(u.concat(P), d.registered, _);
|
|
58
|
+
c += d.key + "-" + N.name, l !== void 0 && (c += " " + l);
|
|
59
|
+
var R = S && y === void 0 ? O(g) : E, p = {};
|
|
60
|
+
for (var h in t)
|
|
61
|
+
S && h === "as" || // $FlowFixMe
|
|
62
|
+
R(h) && (p[h] = t[h]);
|
|
63
|
+
return p.className = c, p.ref = T, /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement(W, {
|
|
64
|
+
cache: d,
|
|
65
|
+
serialized: N,
|
|
66
|
+
isStringTag: typeof g == "string"
|
|
67
|
+
}), /* @__PURE__ */ v.createElement(g, p));
|
|
68
|
+
});
|
|
69
|
+
return o.displayName = a !== void 0 ? a : "Styled(" + (typeof r == "string" ? r : r.displayName || r.name || "Component") + ")", o.defaultProps = e.defaultProps, o.__emotion_real = o, o.__emotion_base = r, o.__emotion_styles = u, o.__emotion_forwardProp = y, Object.defineProperty(o, "toString", {
|
|
70
|
+
value: function() {
|
|
71
|
+
return l === void 0 && process.env.NODE_ENV !== "production" ? "NO_COMPONENT_SELECTOR" : "." + l;
|
|
72
|
+
}
|
|
73
|
+
}), o.withComponent = function(t, d) {
|
|
74
|
+
return f(t, z({}, n, d, {
|
|
75
|
+
shouldForwardProp: C(o, d, !0)
|
|
76
|
+
})).apply(void 0, u);
|
|
77
|
+
}, o;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export {
|
|
81
|
+
K as default
|
|
82
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import a from "../base/dist/emotion-styled-base.browser.esm.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../../serialize/dist/emotion-serialize.browser.esm.mjs";
|
|
4
|
+
var r = [
|
|
5
|
+
"a",
|
|
6
|
+
"abbr",
|
|
7
|
+
"address",
|
|
8
|
+
"area",
|
|
9
|
+
"article",
|
|
10
|
+
"aside",
|
|
11
|
+
"audio",
|
|
12
|
+
"b",
|
|
13
|
+
"base",
|
|
14
|
+
"bdi",
|
|
15
|
+
"bdo",
|
|
16
|
+
"big",
|
|
17
|
+
"blockquote",
|
|
18
|
+
"body",
|
|
19
|
+
"br",
|
|
20
|
+
"button",
|
|
21
|
+
"canvas",
|
|
22
|
+
"caption",
|
|
23
|
+
"cite",
|
|
24
|
+
"code",
|
|
25
|
+
"col",
|
|
26
|
+
"colgroup",
|
|
27
|
+
"data",
|
|
28
|
+
"datalist",
|
|
29
|
+
"dd",
|
|
30
|
+
"del",
|
|
31
|
+
"details",
|
|
32
|
+
"dfn",
|
|
33
|
+
"dialog",
|
|
34
|
+
"div",
|
|
35
|
+
"dl",
|
|
36
|
+
"dt",
|
|
37
|
+
"em",
|
|
38
|
+
"embed",
|
|
39
|
+
"fieldset",
|
|
40
|
+
"figcaption",
|
|
41
|
+
"figure",
|
|
42
|
+
"footer",
|
|
43
|
+
"form",
|
|
44
|
+
"h1",
|
|
45
|
+
"h2",
|
|
46
|
+
"h3",
|
|
47
|
+
"h4",
|
|
48
|
+
"h5",
|
|
49
|
+
"h6",
|
|
50
|
+
"head",
|
|
51
|
+
"header",
|
|
52
|
+
"hgroup",
|
|
53
|
+
"hr",
|
|
54
|
+
"html",
|
|
55
|
+
"i",
|
|
56
|
+
"iframe",
|
|
57
|
+
"img",
|
|
58
|
+
"input",
|
|
59
|
+
"ins",
|
|
60
|
+
"kbd",
|
|
61
|
+
"keygen",
|
|
62
|
+
"label",
|
|
63
|
+
"legend",
|
|
64
|
+
"li",
|
|
65
|
+
"link",
|
|
66
|
+
"main",
|
|
67
|
+
"map",
|
|
68
|
+
"mark",
|
|
69
|
+
"marquee",
|
|
70
|
+
"menu",
|
|
71
|
+
"menuitem",
|
|
72
|
+
"meta",
|
|
73
|
+
"meter",
|
|
74
|
+
"nav",
|
|
75
|
+
"noscript",
|
|
76
|
+
"object",
|
|
77
|
+
"ol",
|
|
78
|
+
"optgroup",
|
|
79
|
+
"option",
|
|
80
|
+
"output",
|
|
81
|
+
"p",
|
|
82
|
+
"param",
|
|
83
|
+
"picture",
|
|
84
|
+
"pre",
|
|
85
|
+
"progress",
|
|
86
|
+
"q",
|
|
87
|
+
"rp",
|
|
88
|
+
"rt",
|
|
89
|
+
"ruby",
|
|
90
|
+
"s",
|
|
91
|
+
"samp",
|
|
92
|
+
"script",
|
|
93
|
+
"section",
|
|
94
|
+
"select",
|
|
95
|
+
"small",
|
|
96
|
+
"source",
|
|
97
|
+
"span",
|
|
98
|
+
"strong",
|
|
99
|
+
"style",
|
|
100
|
+
"sub",
|
|
101
|
+
"summary",
|
|
102
|
+
"sup",
|
|
103
|
+
"table",
|
|
104
|
+
"tbody",
|
|
105
|
+
"td",
|
|
106
|
+
"textarea",
|
|
107
|
+
"tfoot",
|
|
108
|
+
"th",
|
|
109
|
+
"thead",
|
|
110
|
+
"time",
|
|
111
|
+
"title",
|
|
112
|
+
"tr",
|
|
113
|
+
"track",
|
|
114
|
+
"u",
|
|
115
|
+
"ul",
|
|
116
|
+
"var",
|
|
117
|
+
"video",
|
|
118
|
+
"wbr",
|
|
119
|
+
// SVG
|
|
120
|
+
"circle",
|
|
121
|
+
"clipPath",
|
|
122
|
+
"defs",
|
|
123
|
+
"ellipse",
|
|
124
|
+
"foreignObject",
|
|
125
|
+
"g",
|
|
126
|
+
"image",
|
|
127
|
+
"line",
|
|
128
|
+
"linearGradient",
|
|
129
|
+
"mask",
|
|
130
|
+
"path",
|
|
131
|
+
"pattern",
|
|
132
|
+
"polygon",
|
|
133
|
+
"polyline",
|
|
134
|
+
"radialGradient",
|
|
135
|
+
"rect",
|
|
136
|
+
"stop",
|
|
137
|
+
"svg",
|
|
138
|
+
"text",
|
|
139
|
+
"tspan"
|
|
140
|
+
], t = a.bind();
|
|
141
|
+
r.forEach(function(e) {
|
|
142
|
+
t[e] = t(e);
|
|
143
|
+
});
|
|
144
|
+
export {
|
|
145
|
+
t as default
|
|
146
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var o = {
|
|
2
|
+
animationIterationCount: 1,
|
|
3
|
+
aspectRatio: 1,
|
|
4
|
+
borderImageOutset: 1,
|
|
5
|
+
borderImageSlice: 1,
|
|
6
|
+
borderImageWidth: 1,
|
|
7
|
+
boxFlex: 1,
|
|
8
|
+
boxFlexGroup: 1,
|
|
9
|
+
boxOrdinalGroup: 1,
|
|
10
|
+
columnCount: 1,
|
|
11
|
+
columns: 1,
|
|
12
|
+
flex: 1,
|
|
13
|
+
flexGrow: 1,
|
|
14
|
+
flexPositive: 1,
|
|
15
|
+
flexShrink: 1,
|
|
16
|
+
flexNegative: 1,
|
|
17
|
+
flexOrder: 1,
|
|
18
|
+
gridRow: 1,
|
|
19
|
+
gridRowEnd: 1,
|
|
20
|
+
gridRowSpan: 1,
|
|
21
|
+
gridRowStart: 1,
|
|
22
|
+
gridColumn: 1,
|
|
23
|
+
gridColumnEnd: 1,
|
|
24
|
+
gridColumnSpan: 1,
|
|
25
|
+
gridColumnStart: 1,
|
|
26
|
+
msGridRow: 1,
|
|
27
|
+
msGridRowSpan: 1,
|
|
28
|
+
msGridColumn: 1,
|
|
29
|
+
msGridColumnSpan: 1,
|
|
30
|
+
fontWeight: 1,
|
|
31
|
+
lineHeight: 1,
|
|
32
|
+
opacity: 1,
|
|
33
|
+
order: 1,
|
|
34
|
+
orphans: 1,
|
|
35
|
+
tabSize: 1,
|
|
36
|
+
widows: 1,
|
|
37
|
+
zIndex: 1,
|
|
38
|
+
zoom: 1,
|
|
39
|
+
WebkitLineClamp: 1,
|
|
40
|
+
// SVG-related properties
|
|
41
|
+
fillOpacity: 1,
|
|
42
|
+
floodOpacity: 1,
|
|
43
|
+
stopOpacity: 1,
|
|
44
|
+
strokeDasharray: 1,
|
|
45
|
+
strokeDashoffset: 1,
|
|
46
|
+
strokeMiterlimit: 1,
|
|
47
|
+
strokeOpacity: 1,
|
|
48
|
+
strokeWidth: 1
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
o as default
|
|
52
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var r = !0;
|
|
2
|
+
function o(i, e, n) {
|
|
3
|
+
var s = "";
|
|
4
|
+
return n.split(" ").forEach(function(t) {
|
|
5
|
+
i[t] !== void 0 ? e.push(i[t] + ";") : s += t + " ";
|
|
6
|
+
}), s;
|
|
7
|
+
}
|
|
8
|
+
var d = function(e, n, s) {
|
|
9
|
+
var t = e.key + "-" + n.name;
|
|
10
|
+
// we only need to add the styles to the registered cache if the
|
|
11
|
+
// class name could be used further down
|
|
12
|
+
// the tree but if it's a string tag, we know it won't
|
|
13
|
+
// so we don't have to add it to registered cache.
|
|
14
|
+
// this improves memory usage since we can avoid storing the whole style string
|
|
15
|
+
(s === !1 || // we need to always store it if we're in compat mode and
|
|
16
|
+
// in node since emotion-server relies on whether a style is in
|
|
17
|
+
// the registered cache to know whether a style is global or not
|
|
18
|
+
// also, note that this check will be dead code eliminated in the browser
|
|
19
|
+
r === !1) && e.registered[t] === void 0 && (e.registered[t] = n.styles);
|
|
20
|
+
}, u = function(e, n, s) {
|
|
21
|
+
d(e, n, s);
|
|
22
|
+
var t = e.key + "-" + n.name;
|
|
23
|
+
if (e.inserted[n.name] === void 0) {
|
|
24
|
+
var f = n;
|
|
25
|
+
do
|
|
26
|
+
e.insert(n === f ? "." + t : "", f, e.sheet, !0), f = f.next;
|
|
27
|
+
while (f !== void 0);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
o as getRegisteredStyles,
|
|
32
|
+
u as insertStyles,
|
|
33
|
+
d as registerStyles
|
|
34
|
+
};
|