@easypost/easy-ui 1.0.0-alpha.6 → 1.0.0-alpha.8
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/Badge/index.js +12 -12
- package/Badge/index.mjs +12 -12
- package/Banner/index.js +4 -4
- package/Banner/index.mjs +4 -4
- package/Button/index.js +18 -18
- package/Button/index.mjs +18 -18
- package/CHANGELOG.md +21 -0
- package/Card/index.js +9 -9
- package/Card/index.mjs +9 -9
- package/Checkbox/index.js +21 -21
- package/Checkbox/index.mjs +21 -21
- package/CodeBlock/CodeBlock.d.ts +49 -61
- package/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/CodeBlock/CodeBlock.stories.d.ts +3 -2
- package/CodeBlock/CodeBlock.stories.d.ts.map +1 -1
- package/CodeBlock/CopyButton.d.ts +9 -0
- package/CodeBlock/CopyButton.d.ts.map +1 -0
- package/CodeBlock/LanguageMenu.d.ts +18 -0
- package/CodeBlock/LanguageMenu.d.ts.map +1 -0
- package/CodeBlock/context.d.ts +11 -0
- package/CodeBlock/context.d.ts.map +1 -0
- package/CodeBlock/index.js +310 -5335
- package/CodeBlock/index.mjs +299 -5340
- package/CodeSnippet/CodeSnippet.d.ts +82 -0
- package/CodeSnippet/CodeSnippet.d.ts.map +1 -0
- package/CodeSnippet/CodeSnippet.stories.d.ts +14 -0
- package/CodeSnippet/CodeSnippet.stories.d.ts.map +1 -0
- package/CodeSnippet/CodeSnippet.test.d.ts +2 -0
- package/CodeSnippet/CodeSnippet.test.d.ts.map +1 -0
- package/CodeSnippet/SyntaxHighlighter.d.ts +8 -0
- package/CodeSnippet/SyntaxHighlighter.d.ts.map +1 -0
- package/CodeSnippet/index.d.ts +2 -0
- package/CodeSnippet/index.d.ts.map +1 -0
- package/CodeSnippet/index.js +11 -0
- package/CodeSnippet/index.mjs +11 -0
- package/CodeSnippet/theme.d.ts.map +1 -0
- package/CodeSnippet/useScrollbar.d.ts.map +1 -0
- package/DropdownButton/index.js +13 -13
- package/DropdownButton/index.mjs +13 -13
- package/HorizontalGrid/index.js +1 -1
- package/HorizontalGrid/index.mjs +1 -1
- package/HorizontalStack/index.js +1 -1
- package/HorizontalStack/index.mjs +1 -1
- package/Icon/index.js +2 -2
- package/Icon/index.mjs +2 -2
- package/IconButton/index.js +12 -12
- package/IconButton/index.mjs +12 -12
- package/InputField/index.js +3 -3
- package/InputField/index.mjs +3 -3
- package/Menu/index.js +11 -11
- package/Menu/index.mjs +11 -11
- package/Notification/index.js +14 -14
- package/Notification/index.mjs +14 -14
- package/Provider/index.js +3 -3
- package/Provider/index.mjs +3 -3
- package/RadioGroup/index.js +15 -15
- package/RadioGroup/index.mjs +15 -15
- package/Select/index.js +23 -23
- package/Select/index.mjs +23 -23
- package/SelectorErrorTooltip/index.js +4 -4
- package/SelectorErrorTooltip/index.mjs +4 -4
- package/Text/index.js +27 -27
- package/Text/index.mjs +27 -27
- package/TextField/index.js +3 -3
- package/TextField/index.mjs +3 -3
- package/Textarea/index.js +3 -3
- package/Textarea/index.mjs +3 -3
- package/Theme/index.js +1 -1
- package/Theme/index.mjs +1 -1
- package/Toggle/index.js +12 -12
- package/Toggle/index.mjs +12 -12
- package/Tooltip/Tooltip.stories.d.ts +1 -0
- package/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/Tooltip/index.js +8 -297
- package/Tooltip/index.mjs +8 -297
- package/UnstyledButton/index.js +2 -2
- package/UnstyledButton/index.mjs +2 -2
- package/VerticalStack/index.js +3 -3
- package/VerticalStack/index.mjs +3 -3
- package/__chunks__/{InputIcon-2317befd.mjs → InputIcon-db15c32a.mjs} +24 -24
- package/__chunks__/{InputIcon-d3963cf8.js → InputIcon-e721be51.js} +24 -24
- package/__chunks__/{import-a2023d8f.js → import-0f8555a4.js} +1 -1
- package/__chunks__/{import-2b302763.js → import-26676303.js} +1 -0
- package/__chunks__/{import-3d962a94.mjs → import-3faba3a6.mjs} +2 -1
- package/__chunks__/{import-8b6c0bc7.js → import-890ae60e.js} +1 -1
- package/__chunks__/{import-f1f4792a.mjs → import-c4caaddf.mjs} +5 -5
- package/__chunks__/{import-0561e1ba.mjs → import-eb35a9b9.mjs} +1 -1
- package/__chunks__/index-0c519caa.mjs +5421 -0
- package/__chunks__/index-12ba1ea7.js +299 -0
- package/__chunks__/{index-29d7bca9.mjs → index-45f05366.mjs} +1 -1
- package/__chunks__/{index-3985350a.js → index-5f429325.js} +1 -1
- package/__chunks__/index-766f8373.mjs +300 -0
- package/__chunks__/index-9964b6cd.js +5420 -0
- package/__chunks__/{tokens-6be8e137.mjs → tokens-3c27019b.mjs} +1 -0
- package/__chunks__/{tokens-e696ca96.js → tokens-ad06cd2c.js} +1 -0
- package/__chunks__/{useTriggerWidth-addcd1d6.mjs → useTriggerWidth-b554acaf.mjs} +23 -23
- package/__chunks__/{useTriggerWidth-156b038a.js → useTriggerWidth-e11bf6d6.js} +2 -2
- package/package.json +7 -5
- package/style.css +562 -491
- package/utilities/react.d.ts +15 -0
- package/utilities/react.d.ts.map +1 -0
- package/utilities/react.js +333 -0
- package/utilities/react.mjs +333 -0
- package/CodeBlock/SyntaxHighlighter.d.ts +0 -5
- package/CodeBlock/SyntaxHighlighter.d.ts.map +0 -1
- package/CodeBlock/theme.d.ts.map +0 -1
- package/CodeBlock/useScrollbar.d.ts.map +0 -1
- /package/{CodeBlock → CodeSnippet}/theme.d.ts +0 -0
- /package/{CodeBlock → CodeSnippet}/useScrollbar.d.ts +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Similar to React's built-in Children.toArray method, this utility takes
|
|
4
|
+
* children and returns them as an array for introspection or filtering.
|
|
5
|
+
* Different from Children.toArray, it will flatten arrays and React.Fragments
|
|
6
|
+
* into a regular, one-dimensional array while ensuring element and fragment
|
|
7
|
+
* keys are preserved, unique, and stable between renders.
|
|
8
|
+
*
|
|
9
|
+
* Adopted from https://github.com/grrowl/react-keyed-flatten-children
|
|
10
|
+
*
|
|
11
|
+
* @returns flattened children
|
|
12
|
+
*/
|
|
13
|
+
export declare function flattenChildren(children: ReactNode, depth?: number, keys?: (string | number)[]): ReactNode[];
|
|
14
|
+
export declare function filterChildrenByDisplayName(children: ReactNode, displayName: string): ReactElement<any, string | import("react").JSXElementConstructor<any>>[];
|
|
15
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/utilities/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EACZ,SAAS,EAGV,MAAM,OAAO,CAAC;AAGf;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,EACnB,KAAK,GAAE,MAAU,EACjB,IAAI,GAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAO,GAC7B,SAAS,EAAE,CA4Bb;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,SAAS,EACnB,WAAW,EAAE,MAAM,4EASpB"}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
var reactIs = { exports: {} };
|
|
5
|
+
var reactIs_production_min = {};
|
|
6
|
+
/**
|
|
7
|
+
* @license React
|
|
8
|
+
* react-is.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
var hasRequiredReactIs_production_min;
|
|
16
|
+
function requireReactIs_production_min() {
|
|
17
|
+
if (hasRequiredReactIs_production_min)
|
|
18
|
+
return reactIs_production_min;
|
|
19
|
+
hasRequiredReactIs_production_min = 1;
|
|
20
|
+
var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u;
|
|
21
|
+
u = Symbol.for("react.module.reference");
|
|
22
|
+
function v(a) {
|
|
23
|
+
if ("object" === typeof a && null !== a) {
|
|
24
|
+
var r = a.$$typeof;
|
|
25
|
+
switch (r) {
|
|
26
|
+
case b:
|
|
27
|
+
switch (a = a.type, a) {
|
|
28
|
+
case d:
|
|
29
|
+
case f:
|
|
30
|
+
case e:
|
|
31
|
+
case m:
|
|
32
|
+
case n:
|
|
33
|
+
return a;
|
|
34
|
+
default:
|
|
35
|
+
switch (a = a && a.$$typeof, a) {
|
|
36
|
+
case k:
|
|
37
|
+
case h:
|
|
38
|
+
case l:
|
|
39
|
+
case q:
|
|
40
|
+
case p:
|
|
41
|
+
case g:
|
|
42
|
+
return a;
|
|
43
|
+
default:
|
|
44
|
+
return r;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
case c:
|
|
48
|
+
return r;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
reactIs_production_min.ContextConsumer = h;
|
|
53
|
+
reactIs_production_min.ContextProvider = g;
|
|
54
|
+
reactIs_production_min.Element = b;
|
|
55
|
+
reactIs_production_min.ForwardRef = l;
|
|
56
|
+
reactIs_production_min.Fragment = d;
|
|
57
|
+
reactIs_production_min.Lazy = q;
|
|
58
|
+
reactIs_production_min.Memo = p;
|
|
59
|
+
reactIs_production_min.Portal = c;
|
|
60
|
+
reactIs_production_min.Profiler = f;
|
|
61
|
+
reactIs_production_min.StrictMode = e;
|
|
62
|
+
reactIs_production_min.Suspense = m;
|
|
63
|
+
reactIs_production_min.SuspenseList = n;
|
|
64
|
+
reactIs_production_min.isAsyncMode = function() {
|
|
65
|
+
return false;
|
|
66
|
+
};
|
|
67
|
+
reactIs_production_min.isConcurrentMode = function() {
|
|
68
|
+
return false;
|
|
69
|
+
};
|
|
70
|
+
reactIs_production_min.isContextConsumer = function(a) {
|
|
71
|
+
return v(a) === h;
|
|
72
|
+
};
|
|
73
|
+
reactIs_production_min.isContextProvider = function(a) {
|
|
74
|
+
return v(a) === g;
|
|
75
|
+
};
|
|
76
|
+
reactIs_production_min.isElement = function(a) {
|
|
77
|
+
return "object" === typeof a && null !== a && a.$$typeof === b;
|
|
78
|
+
};
|
|
79
|
+
reactIs_production_min.isForwardRef = function(a) {
|
|
80
|
+
return v(a) === l;
|
|
81
|
+
};
|
|
82
|
+
reactIs_production_min.isFragment = function(a) {
|
|
83
|
+
return v(a) === d;
|
|
84
|
+
};
|
|
85
|
+
reactIs_production_min.isLazy = function(a) {
|
|
86
|
+
return v(a) === q;
|
|
87
|
+
};
|
|
88
|
+
reactIs_production_min.isMemo = function(a) {
|
|
89
|
+
return v(a) === p;
|
|
90
|
+
};
|
|
91
|
+
reactIs_production_min.isPortal = function(a) {
|
|
92
|
+
return v(a) === c;
|
|
93
|
+
};
|
|
94
|
+
reactIs_production_min.isProfiler = function(a) {
|
|
95
|
+
return v(a) === f;
|
|
96
|
+
};
|
|
97
|
+
reactIs_production_min.isStrictMode = function(a) {
|
|
98
|
+
return v(a) === e;
|
|
99
|
+
};
|
|
100
|
+
reactIs_production_min.isSuspense = function(a) {
|
|
101
|
+
return v(a) === m;
|
|
102
|
+
};
|
|
103
|
+
reactIs_production_min.isSuspenseList = function(a) {
|
|
104
|
+
return v(a) === n;
|
|
105
|
+
};
|
|
106
|
+
reactIs_production_min.isValidElementType = function(a) {
|
|
107
|
+
return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false;
|
|
108
|
+
};
|
|
109
|
+
reactIs_production_min.typeOf = v;
|
|
110
|
+
return reactIs_production_min;
|
|
111
|
+
}
|
|
112
|
+
var reactIs_development = {};
|
|
113
|
+
/**
|
|
114
|
+
* @license React
|
|
115
|
+
* react-is.development.js
|
|
116
|
+
*
|
|
117
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the MIT license found in the
|
|
120
|
+
* LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/
|
|
122
|
+
var hasRequiredReactIs_development;
|
|
123
|
+
function requireReactIs_development() {
|
|
124
|
+
if (hasRequiredReactIs_development)
|
|
125
|
+
return reactIs_development;
|
|
126
|
+
hasRequiredReactIs_development = 1;
|
|
127
|
+
if (process.env.NODE_ENV !== "production") {
|
|
128
|
+
(function() {
|
|
129
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
130
|
+
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
131
|
+
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
132
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
133
|
+
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
134
|
+
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
135
|
+
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
136
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context");
|
|
137
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
138
|
+
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
139
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
140
|
+
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
141
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
142
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
143
|
+
var enableScopeAPI = false;
|
|
144
|
+
var enableCacheElement = false;
|
|
145
|
+
var enableTransitionTracing = false;
|
|
146
|
+
var enableLegacyHidden = false;
|
|
147
|
+
var enableDebugTracing = false;
|
|
148
|
+
var REACT_MODULE_REFERENCE;
|
|
149
|
+
{
|
|
150
|
+
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
151
|
+
}
|
|
152
|
+
function isValidElementType(type) {
|
|
153
|
+
if (typeof type === "string" || typeof type === "function") {
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
if (typeof type === "object" && type !== null) {
|
|
160
|
+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
161
|
+
// types supported by any Flight configuration anywhere since
|
|
162
|
+
// we don't know which Flight build this will end up being used
|
|
163
|
+
// with.
|
|
164
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
function typeOf(object) {
|
|
171
|
+
if (typeof object === "object" && object !== null) {
|
|
172
|
+
var $$typeof = object.$$typeof;
|
|
173
|
+
switch ($$typeof) {
|
|
174
|
+
case REACT_ELEMENT_TYPE:
|
|
175
|
+
var type = object.type;
|
|
176
|
+
switch (type) {
|
|
177
|
+
case REACT_FRAGMENT_TYPE:
|
|
178
|
+
case REACT_PROFILER_TYPE:
|
|
179
|
+
case REACT_STRICT_MODE_TYPE:
|
|
180
|
+
case REACT_SUSPENSE_TYPE:
|
|
181
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
182
|
+
return type;
|
|
183
|
+
default:
|
|
184
|
+
var $$typeofType = type && type.$$typeof;
|
|
185
|
+
switch ($$typeofType) {
|
|
186
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
187
|
+
case REACT_CONTEXT_TYPE:
|
|
188
|
+
case REACT_FORWARD_REF_TYPE:
|
|
189
|
+
case REACT_LAZY_TYPE:
|
|
190
|
+
case REACT_MEMO_TYPE:
|
|
191
|
+
case REACT_PROVIDER_TYPE:
|
|
192
|
+
return $$typeofType;
|
|
193
|
+
default:
|
|
194
|
+
return $$typeof;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
case REACT_PORTAL_TYPE:
|
|
198
|
+
return $$typeof;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return void 0;
|
|
202
|
+
}
|
|
203
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
204
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
205
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
206
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
207
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
208
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
209
|
+
var Memo = REACT_MEMO_TYPE;
|
|
210
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
211
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
212
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
213
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
214
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
215
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
216
|
+
var hasWarnedAboutDeprecatedIsConcurrentMode = false;
|
|
217
|
+
function isAsyncMode(object) {
|
|
218
|
+
{
|
|
219
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
220
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
221
|
+
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return false;
|
|
225
|
+
}
|
|
226
|
+
function isConcurrentMode(object) {
|
|
227
|
+
{
|
|
228
|
+
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
229
|
+
hasWarnedAboutDeprecatedIsConcurrentMode = true;
|
|
230
|
+
console["warn"]("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
235
|
+
function isContextConsumer(object) {
|
|
236
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
237
|
+
}
|
|
238
|
+
function isContextProvider(object) {
|
|
239
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
240
|
+
}
|
|
241
|
+
function isElement(object) {
|
|
242
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
243
|
+
}
|
|
244
|
+
function isForwardRef(object) {
|
|
245
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
246
|
+
}
|
|
247
|
+
function isFragment(object) {
|
|
248
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
249
|
+
}
|
|
250
|
+
function isLazy(object) {
|
|
251
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
252
|
+
}
|
|
253
|
+
function isMemo(object) {
|
|
254
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
255
|
+
}
|
|
256
|
+
function isPortal(object) {
|
|
257
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
258
|
+
}
|
|
259
|
+
function isProfiler(object) {
|
|
260
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
261
|
+
}
|
|
262
|
+
function isStrictMode(object) {
|
|
263
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
264
|
+
}
|
|
265
|
+
function isSuspense(object) {
|
|
266
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
267
|
+
}
|
|
268
|
+
function isSuspenseList(object) {
|
|
269
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
270
|
+
}
|
|
271
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
|
272
|
+
reactIs_development.ContextProvider = ContextProvider;
|
|
273
|
+
reactIs_development.Element = Element;
|
|
274
|
+
reactIs_development.ForwardRef = ForwardRef;
|
|
275
|
+
reactIs_development.Fragment = Fragment;
|
|
276
|
+
reactIs_development.Lazy = Lazy;
|
|
277
|
+
reactIs_development.Memo = Memo;
|
|
278
|
+
reactIs_development.Portal = Portal;
|
|
279
|
+
reactIs_development.Profiler = Profiler;
|
|
280
|
+
reactIs_development.StrictMode = StrictMode;
|
|
281
|
+
reactIs_development.Suspense = Suspense;
|
|
282
|
+
reactIs_development.SuspenseList = SuspenseList;
|
|
283
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
|
284
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
285
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
|
286
|
+
reactIs_development.isContextProvider = isContextProvider;
|
|
287
|
+
reactIs_development.isElement = isElement;
|
|
288
|
+
reactIs_development.isForwardRef = isForwardRef;
|
|
289
|
+
reactIs_development.isFragment = isFragment;
|
|
290
|
+
reactIs_development.isLazy = isLazy;
|
|
291
|
+
reactIs_development.isMemo = isMemo;
|
|
292
|
+
reactIs_development.isPortal = isPortal;
|
|
293
|
+
reactIs_development.isProfiler = isProfiler;
|
|
294
|
+
reactIs_development.isStrictMode = isStrictMode;
|
|
295
|
+
reactIs_development.isSuspense = isSuspense;
|
|
296
|
+
reactIs_development.isSuspenseList = isSuspenseList;
|
|
297
|
+
reactIs_development.isValidElementType = isValidElementType;
|
|
298
|
+
reactIs_development.typeOf = typeOf;
|
|
299
|
+
})();
|
|
300
|
+
}
|
|
301
|
+
return reactIs_development;
|
|
302
|
+
}
|
|
303
|
+
if (process.env.NODE_ENV === "production") {
|
|
304
|
+
reactIs.exports = requireReactIs_production_min();
|
|
305
|
+
} else {
|
|
306
|
+
reactIs.exports = requireReactIs_development();
|
|
307
|
+
}
|
|
308
|
+
var reactIsExports = reactIs.exports;
|
|
309
|
+
function flattenChildren(children, depth = 0, keys = []) {
|
|
310
|
+
return React.Children.toArray(children).reduce((acc, node, nodeIndex) => {
|
|
311
|
+
if (reactIsExports.isFragment(node)) {
|
|
312
|
+
acc.push.apply(acc, flattenChildren(node.props.children, depth + 1, keys.concat(node.key || nodeIndex)));
|
|
313
|
+
} else {
|
|
314
|
+
if (React.isValidElement(node)) {
|
|
315
|
+
acc.push(React.cloneElement(node, {
|
|
316
|
+
key: keys.concat(String(node.key)).join(".")
|
|
317
|
+
}));
|
|
318
|
+
} else if (typeof node === "string" || typeof node === "number") {
|
|
319
|
+
acc.push(node);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return acc;
|
|
323
|
+
}, []);
|
|
324
|
+
}
|
|
325
|
+
function filterChildrenByDisplayName(children, displayName) {
|
|
326
|
+
const elements = flattenChildren(children).filter((n) => reactIsExports.isElement(n));
|
|
327
|
+
return elements.filter((e) => {
|
|
328
|
+
const elementType = e.type;
|
|
329
|
+
return elementType.displayName === displayName;
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
exports.filterChildrenByDisplayName = filterChildrenByDisplayName;
|
|
333
|
+
exports.flattenChildren = flattenChildren;
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import { Children, isValidElement, cloneElement } from "react";
|
|
2
|
+
var reactIs = { exports: {} };
|
|
3
|
+
var reactIs_production_min = {};
|
|
4
|
+
/**
|
|
5
|
+
* @license React
|
|
6
|
+
* react-is.production.min.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
var hasRequiredReactIs_production_min;
|
|
14
|
+
function requireReactIs_production_min() {
|
|
15
|
+
if (hasRequiredReactIs_production_min)
|
|
16
|
+
return reactIs_production_min;
|
|
17
|
+
hasRequiredReactIs_production_min = 1;
|
|
18
|
+
var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u;
|
|
19
|
+
u = Symbol.for("react.module.reference");
|
|
20
|
+
function v(a) {
|
|
21
|
+
if ("object" === typeof a && null !== a) {
|
|
22
|
+
var r = a.$$typeof;
|
|
23
|
+
switch (r) {
|
|
24
|
+
case b:
|
|
25
|
+
switch (a = a.type, a) {
|
|
26
|
+
case d:
|
|
27
|
+
case f:
|
|
28
|
+
case e:
|
|
29
|
+
case m:
|
|
30
|
+
case n:
|
|
31
|
+
return a;
|
|
32
|
+
default:
|
|
33
|
+
switch (a = a && a.$$typeof, a) {
|
|
34
|
+
case k:
|
|
35
|
+
case h:
|
|
36
|
+
case l:
|
|
37
|
+
case q:
|
|
38
|
+
case p:
|
|
39
|
+
case g:
|
|
40
|
+
return a;
|
|
41
|
+
default:
|
|
42
|
+
return r;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
case c:
|
|
46
|
+
return r;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
reactIs_production_min.ContextConsumer = h;
|
|
51
|
+
reactIs_production_min.ContextProvider = g;
|
|
52
|
+
reactIs_production_min.Element = b;
|
|
53
|
+
reactIs_production_min.ForwardRef = l;
|
|
54
|
+
reactIs_production_min.Fragment = d;
|
|
55
|
+
reactIs_production_min.Lazy = q;
|
|
56
|
+
reactIs_production_min.Memo = p;
|
|
57
|
+
reactIs_production_min.Portal = c;
|
|
58
|
+
reactIs_production_min.Profiler = f;
|
|
59
|
+
reactIs_production_min.StrictMode = e;
|
|
60
|
+
reactIs_production_min.Suspense = m;
|
|
61
|
+
reactIs_production_min.SuspenseList = n;
|
|
62
|
+
reactIs_production_min.isAsyncMode = function() {
|
|
63
|
+
return false;
|
|
64
|
+
};
|
|
65
|
+
reactIs_production_min.isConcurrentMode = function() {
|
|
66
|
+
return false;
|
|
67
|
+
};
|
|
68
|
+
reactIs_production_min.isContextConsumer = function(a) {
|
|
69
|
+
return v(a) === h;
|
|
70
|
+
};
|
|
71
|
+
reactIs_production_min.isContextProvider = function(a) {
|
|
72
|
+
return v(a) === g;
|
|
73
|
+
};
|
|
74
|
+
reactIs_production_min.isElement = function(a) {
|
|
75
|
+
return "object" === typeof a && null !== a && a.$$typeof === b;
|
|
76
|
+
};
|
|
77
|
+
reactIs_production_min.isForwardRef = function(a) {
|
|
78
|
+
return v(a) === l;
|
|
79
|
+
};
|
|
80
|
+
reactIs_production_min.isFragment = function(a) {
|
|
81
|
+
return v(a) === d;
|
|
82
|
+
};
|
|
83
|
+
reactIs_production_min.isLazy = function(a) {
|
|
84
|
+
return v(a) === q;
|
|
85
|
+
};
|
|
86
|
+
reactIs_production_min.isMemo = function(a) {
|
|
87
|
+
return v(a) === p;
|
|
88
|
+
};
|
|
89
|
+
reactIs_production_min.isPortal = function(a) {
|
|
90
|
+
return v(a) === c;
|
|
91
|
+
};
|
|
92
|
+
reactIs_production_min.isProfiler = function(a) {
|
|
93
|
+
return v(a) === f;
|
|
94
|
+
};
|
|
95
|
+
reactIs_production_min.isStrictMode = function(a) {
|
|
96
|
+
return v(a) === e;
|
|
97
|
+
};
|
|
98
|
+
reactIs_production_min.isSuspense = function(a) {
|
|
99
|
+
return v(a) === m;
|
|
100
|
+
};
|
|
101
|
+
reactIs_production_min.isSuspenseList = function(a) {
|
|
102
|
+
return v(a) === n;
|
|
103
|
+
};
|
|
104
|
+
reactIs_production_min.isValidElementType = function(a) {
|
|
105
|
+
return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false;
|
|
106
|
+
};
|
|
107
|
+
reactIs_production_min.typeOf = v;
|
|
108
|
+
return reactIs_production_min;
|
|
109
|
+
}
|
|
110
|
+
var reactIs_development = {};
|
|
111
|
+
/**
|
|
112
|
+
* @license React
|
|
113
|
+
* react-is.development.js
|
|
114
|
+
*
|
|
115
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the MIT license found in the
|
|
118
|
+
* LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/
|
|
120
|
+
var hasRequiredReactIs_development;
|
|
121
|
+
function requireReactIs_development() {
|
|
122
|
+
if (hasRequiredReactIs_development)
|
|
123
|
+
return reactIs_development;
|
|
124
|
+
hasRequiredReactIs_development = 1;
|
|
125
|
+
if (process.env.NODE_ENV !== "production") {
|
|
126
|
+
(function() {
|
|
127
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
128
|
+
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
129
|
+
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
130
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
131
|
+
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
132
|
+
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
133
|
+
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
134
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context");
|
|
135
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
136
|
+
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
137
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
138
|
+
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
139
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
140
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
141
|
+
var enableScopeAPI = false;
|
|
142
|
+
var enableCacheElement = false;
|
|
143
|
+
var enableTransitionTracing = false;
|
|
144
|
+
var enableLegacyHidden = false;
|
|
145
|
+
var enableDebugTracing = false;
|
|
146
|
+
var REACT_MODULE_REFERENCE;
|
|
147
|
+
{
|
|
148
|
+
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
149
|
+
}
|
|
150
|
+
function isValidElementType(type) {
|
|
151
|
+
if (typeof type === "string" || typeof type === "function") {
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
if (typeof type === "object" && type !== null) {
|
|
158
|
+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
159
|
+
// types supported by any Flight configuration anywhere since
|
|
160
|
+
// we don't know which Flight build this will end up being used
|
|
161
|
+
// with.
|
|
162
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
function typeOf(object) {
|
|
169
|
+
if (typeof object === "object" && object !== null) {
|
|
170
|
+
var $$typeof = object.$$typeof;
|
|
171
|
+
switch ($$typeof) {
|
|
172
|
+
case REACT_ELEMENT_TYPE:
|
|
173
|
+
var type = object.type;
|
|
174
|
+
switch (type) {
|
|
175
|
+
case REACT_FRAGMENT_TYPE:
|
|
176
|
+
case REACT_PROFILER_TYPE:
|
|
177
|
+
case REACT_STRICT_MODE_TYPE:
|
|
178
|
+
case REACT_SUSPENSE_TYPE:
|
|
179
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
180
|
+
return type;
|
|
181
|
+
default:
|
|
182
|
+
var $$typeofType = type && type.$$typeof;
|
|
183
|
+
switch ($$typeofType) {
|
|
184
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
185
|
+
case REACT_CONTEXT_TYPE:
|
|
186
|
+
case REACT_FORWARD_REF_TYPE:
|
|
187
|
+
case REACT_LAZY_TYPE:
|
|
188
|
+
case REACT_MEMO_TYPE:
|
|
189
|
+
case REACT_PROVIDER_TYPE:
|
|
190
|
+
return $$typeofType;
|
|
191
|
+
default:
|
|
192
|
+
return $$typeof;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
case REACT_PORTAL_TYPE:
|
|
196
|
+
return $$typeof;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return void 0;
|
|
200
|
+
}
|
|
201
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
202
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
203
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
204
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
205
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
206
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
207
|
+
var Memo = REACT_MEMO_TYPE;
|
|
208
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
209
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
210
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
211
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
212
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
213
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
214
|
+
var hasWarnedAboutDeprecatedIsConcurrentMode = false;
|
|
215
|
+
function isAsyncMode(object) {
|
|
216
|
+
{
|
|
217
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
218
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
219
|
+
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return false;
|
|
223
|
+
}
|
|
224
|
+
function isConcurrentMode(object) {
|
|
225
|
+
{
|
|
226
|
+
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
227
|
+
hasWarnedAboutDeprecatedIsConcurrentMode = true;
|
|
228
|
+
console["warn"]("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return false;
|
|
232
|
+
}
|
|
233
|
+
function isContextConsumer(object) {
|
|
234
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
235
|
+
}
|
|
236
|
+
function isContextProvider(object) {
|
|
237
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
238
|
+
}
|
|
239
|
+
function isElement(object) {
|
|
240
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
241
|
+
}
|
|
242
|
+
function isForwardRef(object) {
|
|
243
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
244
|
+
}
|
|
245
|
+
function isFragment(object) {
|
|
246
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
247
|
+
}
|
|
248
|
+
function isLazy(object) {
|
|
249
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
250
|
+
}
|
|
251
|
+
function isMemo(object) {
|
|
252
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
253
|
+
}
|
|
254
|
+
function isPortal(object) {
|
|
255
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
256
|
+
}
|
|
257
|
+
function isProfiler(object) {
|
|
258
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
259
|
+
}
|
|
260
|
+
function isStrictMode(object) {
|
|
261
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
262
|
+
}
|
|
263
|
+
function isSuspense(object) {
|
|
264
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
265
|
+
}
|
|
266
|
+
function isSuspenseList(object) {
|
|
267
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
268
|
+
}
|
|
269
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
|
270
|
+
reactIs_development.ContextProvider = ContextProvider;
|
|
271
|
+
reactIs_development.Element = Element;
|
|
272
|
+
reactIs_development.ForwardRef = ForwardRef;
|
|
273
|
+
reactIs_development.Fragment = Fragment;
|
|
274
|
+
reactIs_development.Lazy = Lazy;
|
|
275
|
+
reactIs_development.Memo = Memo;
|
|
276
|
+
reactIs_development.Portal = Portal;
|
|
277
|
+
reactIs_development.Profiler = Profiler;
|
|
278
|
+
reactIs_development.StrictMode = StrictMode;
|
|
279
|
+
reactIs_development.Suspense = Suspense;
|
|
280
|
+
reactIs_development.SuspenseList = SuspenseList;
|
|
281
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
|
282
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
283
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
|
284
|
+
reactIs_development.isContextProvider = isContextProvider;
|
|
285
|
+
reactIs_development.isElement = isElement;
|
|
286
|
+
reactIs_development.isForwardRef = isForwardRef;
|
|
287
|
+
reactIs_development.isFragment = isFragment;
|
|
288
|
+
reactIs_development.isLazy = isLazy;
|
|
289
|
+
reactIs_development.isMemo = isMemo;
|
|
290
|
+
reactIs_development.isPortal = isPortal;
|
|
291
|
+
reactIs_development.isProfiler = isProfiler;
|
|
292
|
+
reactIs_development.isStrictMode = isStrictMode;
|
|
293
|
+
reactIs_development.isSuspense = isSuspense;
|
|
294
|
+
reactIs_development.isSuspenseList = isSuspenseList;
|
|
295
|
+
reactIs_development.isValidElementType = isValidElementType;
|
|
296
|
+
reactIs_development.typeOf = typeOf;
|
|
297
|
+
})();
|
|
298
|
+
}
|
|
299
|
+
return reactIs_development;
|
|
300
|
+
}
|
|
301
|
+
if (process.env.NODE_ENV === "production") {
|
|
302
|
+
reactIs.exports = requireReactIs_production_min();
|
|
303
|
+
} else {
|
|
304
|
+
reactIs.exports = requireReactIs_development();
|
|
305
|
+
}
|
|
306
|
+
var reactIsExports = reactIs.exports;
|
|
307
|
+
function flattenChildren(children, depth = 0, keys = []) {
|
|
308
|
+
return Children.toArray(children).reduce((acc, node, nodeIndex) => {
|
|
309
|
+
if (reactIsExports.isFragment(node)) {
|
|
310
|
+
acc.push.apply(acc, flattenChildren(node.props.children, depth + 1, keys.concat(node.key || nodeIndex)));
|
|
311
|
+
} else {
|
|
312
|
+
if (isValidElement(node)) {
|
|
313
|
+
acc.push(cloneElement(node, {
|
|
314
|
+
key: keys.concat(String(node.key)).join(".")
|
|
315
|
+
}));
|
|
316
|
+
} else if (typeof node === "string" || typeof node === "number") {
|
|
317
|
+
acc.push(node);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return acc;
|
|
321
|
+
}, []);
|
|
322
|
+
}
|
|
323
|
+
function filterChildrenByDisplayName(children, displayName) {
|
|
324
|
+
const elements = flattenChildren(children).filter((n) => reactIsExports.isElement(n));
|
|
325
|
+
return elements.filter((e) => {
|
|
326
|
+
const elementType = e.type;
|
|
327
|
+
return elementType.displayName === displayName;
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
export {
|
|
331
|
+
filterChildrenByDisplayName,
|
|
332
|
+
flattenChildren
|
|
333
|
+
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { PrismLight as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
2
|
-
export type SnippetLanguages = "csharp" | "go" | "java" | "javascript" | "json" | "php" | "python" | "ruby" | "shell";
|
|
3
|
-
declare const SnippetLanguage: Record<string, SnippetLanguages>;
|
|
4
|
-
export { SyntaxHighlighter, SnippetLanguage };
|
|
5
|
-
//# sourceMappingURL=SyntaxHighlighter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SyntaxHighlighter.d.ts","sourceRoot":"","sources":["../../src/CodeBlock/SyntaxHighlighter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAY3E,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,IAAI,GACJ,MAAM,GACN,YAAY,GACZ,MAAM,GACN,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,CAAC;AAEZ,QAAA,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAUrD,CAAC;AAYF,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,CAAC"}
|