@sanity/ui 3.0.0-static.30 → 3.0.0-static.32
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/_chunks-cjs/_visual-editing.cjs +62 -61
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-cjs/refractor.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +62 -61
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/refractor.js.map +1 -1
- package/dist/css/index.cjs +1 -3
- package/dist/css/index.cjs.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/css/index.d.cts +7228 -7228
- package/dist/css/index.d.ts +7228 -7228
- package/dist/css/index.js +1 -3
- package/dist/css/index.js.map +1 -1
- package/dist/index.cjs +91 -88
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +93 -90
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.js.map +1 -1
- package/package.json +25 -25
- package/src/core/{primitives/root/Root.tsx → Root.tsx} +5 -3
- package/src/core/{primitives/root/RootProvider.tsx → RootProvider.tsx} +5 -5
- package/src/core/__DEV__.ts +0 -1
- package/src/core/__workshop__/boundary.tsx +28 -0
- package/src/core/__workshop__/index.ts +14 -0
- package/src/core/_compat/theme/theme.test.tsx +4 -3
- package/src/core/components/dialog/dialogCard.tsx +9 -2
- package/src/core/components/menu/menu.test.tsx +8 -7
- package/src/core/components/toast/toast.test.tsx +8 -7
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +1 -1
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +1 -1
- package/src/core/index.ts +4 -2
- package/src/core/lib/createGlobalScopedContext.ts +5 -2
- package/src/core/lib/globalScope.ts +1 -1
- package/src/core/primitives/card/card.tsx +4 -3
- package/src/core/primitives/card/useCard.ts +8 -2
- package/src/core/primitives/code/refractor.tsx +1 -1
- package/src/core/primitives/grid/types.ts +1 -1
- package/src/core/primitives/layer/layer.test.tsx +8 -7
- package/src/core/primitives/popover/popover.tsx +5 -33
- package/src/core/primitives/textArea/textArea.tsx +0 -2
- package/src/core/primitives/tooltip/tooltip.tsx +1 -4
- package/src/core/primitives/types.ts +11 -11
- package/src/core/types/props.ts +1 -0
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +8 -7
- package/src/core/utils/getElementRef.ts +2 -0
- package/src/core/utils/portal/portal.test.tsx +8 -7
- package/src/core/utils/portal/portal.tsx +1 -5
- package/src/core/utils/portal/portalContext.ts +10 -7
- package/src/css/components/dialog/dialog.css.ts +2 -2
- package/src/css/components/toast/toast.css.ts +2 -2
- package/src/css/primitives/button/button.css.ts +0 -2
- package/src/css/primitives/root/root.css.ts +5 -1
- package/src/css/primitives/root/root.ts +1 -1
- package/src/css/props/gridColumnStart/types.ts +1 -1
- package/src/theme/v0/css.ts +2 -0
- package/src/theme/v2/build/merge.ts +2 -0
- package/src/theme/v3/merge.ts +2 -0
- package/src/core/primitives/root/__workshop__/boundary.tsx +0 -5
- package/src/core/primitives/root/__workshop__/index.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refractor.cjs","sources":["../../src/core/primitives/code/refractor.tsx"],"sourcesContent":["import Refractor from 'react-refractor'\n\nexport default function LazyRefractor(\n props: Partial<Pick<React.ComponentProps<typeof Refractor>, 'language'>> & {\n value: React.ReactNode\n },\n) {\n const {language: languageProp, value} = props\n const language = typeof languageProp === 'string' ? languageProp : undefined\n const registered = language ? Refractor.hasLanguage(language
|
|
1
|
+
{"version":3,"file":"refractor.cjs","sources":["../../src/core/primitives/code/refractor.tsx"],"sourcesContent":["import Refractor from 'react-refractor'\n\nexport default function LazyRefractor(\n props: Partial<Pick<React.ComponentProps<typeof Refractor>, 'language'>> & {\n value: React.ReactNode\n },\n) {\n const {language: languageProp, value} = props\n const language = typeof languageProp === 'string' ? languageProp : undefined\n const registered = language ? Refractor.hasLanguage(language) : false\n\n return (\n <>\n {!(language && registered) && <code>{value}</code>}\n {language && registered && <Refractor inline language={language} value={String(value)} />}\n </>\n )\n}\n"],"names":["LazyRefractor","props","$","_c","language","languageProp","value","undefined","t0","Refractor","hasLanguage","registered","t1","t2","String","t3"],"mappings":";;;;;;AAEA,SAAeA,cAAAC,OAAA;AAAAC,QAAAA,IAAAC,kBAAA,EAAA,GAKb;AAAA,IAAAC,UAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAAwCL,OACxCG,WAAiB,OAAOC,gBAAiB,WAAWA,eAAYE;AAAYC,MAAAA;AAAAN,WAAAE,YACzDI,KAAAJ,WAAWK,mBAAAA,QAAAC,YAAsBN,QAAQ,IAAS,IAAAF,OAAAE,UAAAF,OAAAM,MAAAA,KAAAN,EAAA,CAAA;AAArE,QAAAS,aAAmBH;AAAkDI,MAAAA;AAAAV,IAAAE,CAAAA,MAAAA,YAAAF,SAAAS,cAAAT,EAAA,CAAA,MAAAI,SAIhEM,KAAA,EAAER,YAAYO,sDAAsBL,EAAAA,UAAAA,MAAAA,CAAM,GAAOJ,OAAAE,UAAAF,OAAAS,YAAAT,OAAAI,OAAAJ,OAAAU,MAAAA,KAAAV,EAAA,CAAA;AAAAW,MAAAA;AAAAX,IAAAE,CAAAA,MAAAA,YAAAF,SAAAS,cAAAT,EAAA,CAAA,MAAAI,SACjDO,KAAAT,YAAYO,6CAAeF,mBAAU,SAAA,EAAA,QAAK,IAAYL,UAAiB,OAAAU,OAAOR,KAAK,EAAA,CAAK,GAAAJ,OAAAE,UAAAF,OAAAS,YAAAT,OAAAI,OAAAJ,OAAAW,MAAAA,KAAAX,EAAA,CAAA;AAAAa,MAAAA;AAAAb,SAAAA,EAAAU,EAAAA,MAAAA,MAAAV,UAAAW,MAF3FE,KACGH,2BAAAA,KAAAA,WAAAA,UAAAA,EAAAA,UAAAA;AAAAA,IAAAA;AAAAA,IACAC;AAAAA,EAAAA,EAAwF,CAAA,GACxFX,QAAAU,IAAAV,QAAAW,IAAAX,QAAAa,MAAAA,KAAAb,EAAA,EAAA,GAHHa;AAGG;;"}
|
|
@@ -21,7 +21,10 @@ function getGlobalScope() {
|
|
|
21
21
|
const globalScope = getGlobalScope();
|
|
22
22
|
function createGlobalScopedContext(key2, defaultValue) {
|
|
23
23
|
const symbol = Symbol.for(key2);
|
|
24
|
-
|
|
24
|
+
if (typeof document > "u")
|
|
25
|
+
return createContext(defaultValue);
|
|
26
|
+
const symbolMap = globalScope;
|
|
27
|
+
return symbolMap[symbol] = symbolMap[symbol] || createContext(defaultValue), symbolMap[symbol];
|
|
25
28
|
}
|
|
26
29
|
const CardContext = createGlobalScopedContext("@sanity/ui/context/card", null);
|
|
27
30
|
function CardProvider(props) {
|
|
@@ -543,16 +546,23 @@ function useBoundaryElement() {
|
|
|
543
546
|
throw new Error("useBoundaryElement(): the context value is not compatible");
|
|
544
547
|
return value || DEFAULT_VALUE;
|
|
545
548
|
}
|
|
549
|
+
function getElementRef(element) {
|
|
550
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
551
|
+
return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
|
|
552
|
+
}
|
|
546
553
|
function useCard() {
|
|
547
|
-
|
|
554
|
+
const card2 = useContext(CardContext);
|
|
555
|
+
if (!card2)
|
|
556
|
+
throw new Error("useCard(): missing context value");
|
|
557
|
+
return card2;
|
|
548
558
|
}
|
|
549
|
-
const key = "@sanity/ui/context/portal", elementKey = Symbol.for(`${key}/element`);
|
|
550
|
-
|
|
559
|
+
const key = "@sanity/ui/context/portal", elementKey = Symbol.for(`${key}/element`), elementMap = globalScope;
|
|
560
|
+
elementMap[elementKey] = null;
|
|
551
561
|
const defaultContextValue = {
|
|
552
562
|
version: 0,
|
|
553
563
|
boundaryElement: null,
|
|
554
564
|
get element() {
|
|
555
|
-
return typeof document > "u" ? null : (
|
|
565
|
+
return typeof document > "u" ? null : (elementMap[elementKey] || (elementMap[elementKey] = document.createElement("div"), elementMap[elementKey].setAttribute("data-portal", ""), document.body.appendChild(elementMap[elementKey])), elementMap[elementKey]);
|
|
556
566
|
}
|
|
557
567
|
}, PortalContext = createGlobalScopedContext(key, defaultContextValue);
|
|
558
568
|
function usePortal() {
|
|
@@ -570,11 +580,10 @@ function Portal(props) {
|
|
|
570
580
|
} = props, card2 = useCard(), portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) || portal.elements?.default;
|
|
571
581
|
if (!portalElement)
|
|
572
582
|
return null;
|
|
573
|
-
|
|
583
|
+
let t0;
|
|
584
|
+
$[0] !== card2.scheme || $[1] !== children ? (t0 = /* @__PURE__ */ jsx(CardProvider, { tone: "transparent", scheme: card2.scheme, children }), $[0] = card2.scheme, $[1] = children, $[2] = t0) : t0 = $[2];
|
|
574
585
|
let t1;
|
|
575
|
-
$[
|
|
576
|
-
let t2;
|
|
577
|
-
return $[3] !== portalElement || $[4] !== t1 ? (t2 = createPortal(t1, portalElement), $[3] = portalElement, $[4] = t1, $[5] = t2) : t2 = $[5], t2;
|
|
586
|
+
return $[3] !== portalElement || $[4] !== t0 ? (t1 = createPortal(t0, portalElement), $[3] = portalElement, $[4] = t0, $[5] = t1) : t1 = $[5], t1;
|
|
578
587
|
}
|
|
579
588
|
function getLayerContext(contextValue) {
|
|
580
589
|
if (!isRecord(contextValue) || contextValue.version !== 0)
|
|
@@ -794,7 +803,7 @@ function Card(props) {
|
|
|
794
803
|
tone: t5,
|
|
795
804
|
...rest
|
|
796
805
|
} = t0, $[0] = t0, $[1] = className, $[2] = disabled, $[3] = pressed, $[4] = rest, $[5] = schemeProp, $[6] = selected, $[7] = style, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5) : (className = $[1], disabled = $[2], pressed = $[3], rest = $[4], schemeProp = $[5], selected = $[6], style = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12]);
|
|
797
|
-
const checkered = t1 === void 0 ? !1 : t1, focusRing = t2 === void 0 ? !1 : t2, as = t3 === void 0 ? DEFAULT_CARD_ELEMENT : t3, radius = t4 === void 0 ? 0 : t4, toneProp = t5 === void 0 ? "default" : t5, parent =
|
|
806
|
+
const checkered = t1 === void 0 ? !1 : t1, focusRing = t2 === void 0 ? !1 : t2, as = t3 === void 0 ? DEFAULT_CARD_ELEMENT : t3, radius = t4 === void 0 ? 0 : t4, toneProp = t5 === void 0 ? "default" : t5, parent = useContext(CardContext), tone = toneProp === "inherit" ? parent?.tone : toneProp, scheme = schemeProp === void 0 ? parent?.scheme : schemeProp, t6 = scheme === parent?.scheme ? void 0 : scheme;
|
|
798
807
|
let t7;
|
|
799
808
|
$[13] !== className || $[14] !== t6 || $[15] !== tone ? (t7 = card({
|
|
800
809
|
className,
|
|
@@ -810,7 +819,7 @@ function Card(props) {
|
|
|
810
819
|
const t14 = scheme ?? "light", t15 = tone ?? "default", t16 = parent?.unstable_CompatProvider;
|
|
811
820
|
let t17;
|
|
812
821
|
if ($[28] !== node || $[29] !== t14 || $[30] !== t15 || $[31] !== t16 ? (t17 = /* @__PURE__ */ jsx(CardProvider, { scheme: t14, tone: t15, unstable_CompatProvider: t16, children: node }), $[28] = node, $[29] = t14, $[30] = t15, $[31] = t16, $[32] = t17) : t17 = $[32], node = t17, parent?.unstable_CompatProvider) {
|
|
813
|
-
const CompatProvider = parent.unstable_CompatProvider, t18 = scheme ?? "light", t19 = tone ?? parent
|
|
822
|
+
const CompatProvider = parent.unstable_CompatProvider, t18 = scheme ?? "light", t19 = tone ?? parent.tone;
|
|
814
823
|
let t20;
|
|
815
824
|
return $[33] !== CompatProvider || $[34] !== node || $[35] !== t18 || $[36] !== t19 ? (t20 = /* @__PURE__ */ jsx(CompatProvider, { scheme: t18, tone: t19, children: node }), $[33] = CompatProvider, $[34] = node, $[35] = t18, $[36] = t19, $[37] = t20) : t20 = $[37], t20;
|
|
816
825
|
}
|
|
@@ -1159,8 +1168,8 @@ function Popover(props) {
|
|
|
1159
1168
|
}, []), setFloating = useCallback((node) => {
|
|
1160
1169
|
ref.current = node, refs.setFloating(node);
|
|
1161
1170
|
}, [refs]), setReference = useCallback((node_0) => {
|
|
1162
|
-
refs.setReference(node_0);
|
|
1163
|
-
const childRef = getElementRef
|
|
1171
|
+
if (refs.setReference(node_0), !childProp) return;
|
|
1172
|
+
const childRef = getElementRef(childProp);
|
|
1164
1173
|
typeof childRef == "function" ? childRef(node_0) : childRef && (childRef.current = node_0);
|
|
1165
1174
|
}, [childProp, refs]), child = useMemo(() => referenceElement ? childProp : childProp ? cloneElement(childProp, {
|
|
1166
1175
|
ref: setReference
|
|
@@ -1174,16 +1183,12 @@ function Popover(props) {
|
|
|
1174
1183
|
/* @__PURE__ */ jsx(PopoverLayer, { ...rest, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, className: popover({
|
|
1175
1184
|
className
|
|
1176
1185
|
}), hidden: referenceHidden, maxWidth: widthProp, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, x, y, zOffset, children: content })
|
|
1177
|
-
] }), children = open && (portal ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: /* @__PURE__ */ jsx(CardProvider, { tone: tone === "inherit" ? card2
|
|
1186
|
+
] }), children = open && (portal ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: /* @__PURE__ */ jsx(CardProvider, { tone: tone === "inherit" ? card2.tone : tone, scheme: scheme ?? "light", children: node_1 }) }) : node_1);
|
|
1178
1187
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1179
1188
|
animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children,
|
|
1180
1189
|
child
|
|
1181
1190
|
] });
|
|
1182
1191
|
}
|
|
1183
|
-
function getElementRef$1(element) {
|
|
1184
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
1185
|
-
return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
|
|
1186
|
-
}
|
|
1187
1192
|
const DEFAULT_SELECTABLE_ELEMENT = "button";
|
|
1188
1193
|
function Selectable(props) {
|
|
1189
1194
|
const $ = c(16), t0 = props;
|
|
@@ -1997,44 +2002,6 @@ function usePrefersDark(t0) {
|
|
|
1997
2002
|
function _temp$1() {
|
|
1998
2003
|
return !1;
|
|
1999
2004
|
}
|
|
2000
|
-
function PortalProvider(props) {
|
|
2001
|
-
const $ = c(7), {
|
|
2002
|
-
boundaryElement,
|
|
2003
|
-
children,
|
|
2004
|
-
element,
|
|
2005
|
-
__unstable_elements: elementsProp
|
|
2006
|
-
} = props, elements = useUnique(elementsProp), fallbackElement = useSyncExternalStore(emptySubscribe, _temp, _temp2);
|
|
2007
|
-
let t0;
|
|
2008
|
-
const t1 = boundaryElement || null, t2 = element || fallbackElement;
|
|
2009
|
-
let t3;
|
|
2010
|
-
$[0] !== elements || $[1] !== t1 || $[2] !== t2 ? (t3 = {
|
|
2011
|
-
version: 0,
|
|
2012
|
-
boundaryElement: t1,
|
|
2013
|
-
element: t2,
|
|
2014
|
-
elements
|
|
2015
|
-
}, $[0] = elements, $[1] = t1, $[2] = t2, $[3] = t3) : t3 = $[3], t0 = t3;
|
|
2016
|
-
const value = t0;
|
|
2017
|
-
let t4;
|
|
2018
|
-
return $[4] !== children || $[5] !== value ? (t4 = /* @__PURE__ */ jsx(PortalContext.Provider, { value, children }), $[4] = children, $[5] = value, $[6] = t4) : t4 = $[6], t4;
|
|
2019
|
-
}
|
|
2020
|
-
function _temp2() {
|
|
2021
|
-
return null;
|
|
2022
|
-
}
|
|
2023
|
-
function _temp() {
|
|
2024
|
-
return document.body;
|
|
2025
|
-
}
|
|
2026
|
-
const emptySubscribe = () => () => {
|
|
2027
|
-
};
|
|
2028
|
-
function useUnique(value) {
|
|
2029
|
-
const valueRef = useRef(value);
|
|
2030
|
-
return _isEqual(valueRef.current, value) || (valueRef.current = value), valueRef.current;
|
|
2031
|
-
}
|
|
2032
|
-
function _isEqual(objA, objB) {
|
|
2033
|
-
if (!objA || !objB)
|
|
2034
|
-
return objA === objB;
|
|
2035
|
-
const keysA = Object.keys(objA), keysB = Object.keys(objB);
|
|
2036
|
-
return keysA.length !== keysB.length ? !1 : keysA.every((key2) => objA[key2] === objB[key2]);
|
|
2037
|
-
}
|
|
2038
2005
|
function useDelayedState(initialState) {
|
|
2039
2006
|
const $ = c(3), [state, setState] = useState(initialState), delayedAction = useRef(void 0);
|
|
2040
2007
|
let t0;
|
|
@@ -2050,10 +2017,6 @@ function useDelayedState(initialState) {
|
|
|
2050
2017
|
let t1;
|
|
2051
2018
|
return $[1] !== state ? (t1 = [state, onStateChange], $[1] = state, $[2] = t1) : t1 = $[2], t1;
|
|
2052
2019
|
}
|
|
2053
|
-
function getElementRef(element) {
|
|
2054
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
2055
|
-
return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
|
|
2056
|
-
}
|
|
2057
2020
|
const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAULT_TOOLTIP_ARROW_RADIUS = 2, DEFAULT_TOOLTIP_DISTANCE = 4, DEFAULT_TOOLTIP_PADDING = 4, DEFAULT_FALLBACK_PLACEMENTS = {
|
|
2058
2021
|
top: ["top-end", "top-start", "bottom", "left", "right"],
|
|
2059
2022
|
"top-start": ["top", "top-end", "bottom-start", "left-start", "right-start"],
|
|
@@ -2251,7 +2214,7 @@ function Tooltip(props) {
|
|
|
2251
2214
|
}), originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, style: {
|
|
2252
2215
|
...floatingStyles,
|
|
2253
2216
|
maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
|
|
2254
|
-
}, tone, zOffset, children: content }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: /* @__PURE__ */ jsx(CardProvider, { tone: tone === "inherit" ? card2
|
|
2217
|
+
}, tone, zOffset, children: content }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: /* @__PURE__ */ jsx(CardProvider, { tone: tone === "inherit" ? card2.tone : tone, scheme: scheme ?? "light", children: node_0 }) }) : node_0);
|
|
2255
2218
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2256
2219
|
animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children,
|
|
2257
2220
|
child
|
|
@@ -2281,6 +2244,44 @@ function useCloseOnMouseLeave(t0) {
|
|
|
2281
2244
|
let t3;
|
|
2282
2245
|
$[7] !== isInsideGroup || $[8] !== showTooltip ? (t3 = [isInsideGroup, showTooltip], $[7] = isInsideGroup, $[8] = showTooltip, $[9] = t3) : t3 = $[9], useEffect(t2, t3);
|
|
2283
2246
|
}
|
|
2247
|
+
function PortalProvider(props) {
|
|
2248
|
+
const $ = c(7), {
|
|
2249
|
+
boundaryElement,
|
|
2250
|
+
children,
|
|
2251
|
+
element,
|
|
2252
|
+
__unstable_elements: elementsProp
|
|
2253
|
+
} = props, elements = useUnique(elementsProp), fallbackElement = useSyncExternalStore(emptySubscribe, _temp, _temp2);
|
|
2254
|
+
let t0;
|
|
2255
|
+
const t1 = boundaryElement || null, t2 = element || fallbackElement;
|
|
2256
|
+
let t3;
|
|
2257
|
+
$[0] !== elements || $[1] !== t1 || $[2] !== t2 ? (t3 = {
|
|
2258
|
+
version: 0,
|
|
2259
|
+
boundaryElement: t1,
|
|
2260
|
+
element: t2,
|
|
2261
|
+
elements
|
|
2262
|
+
}, $[0] = elements, $[1] = t1, $[2] = t2, $[3] = t3) : t3 = $[3], t0 = t3;
|
|
2263
|
+
const value = t0;
|
|
2264
|
+
let t4;
|
|
2265
|
+
return $[4] !== children || $[5] !== value ? (t4 = /* @__PURE__ */ jsx(PortalContext.Provider, { value, children }), $[4] = children, $[5] = value, $[6] = t4) : t4 = $[6], t4;
|
|
2266
|
+
}
|
|
2267
|
+
function _temp2() {
|
|
2268
|
+
return null;
|
|
2269
|
+
}
|
|
2270
|
+
function _temp() {
|
|
2271
|
+
return document.body;
|
|
2272
|
+
}
|
|
2273
|
+
const emptySubscribe = () => () => {
|
|
2274
|
+
};
|
|
2275
|
+
function useUnique(value) {
|
|
2276
|
+
const valueRef = useRef(value);
|
|
2277
|
+
return _isEqual(valueRef.current, value) || (valueRef.current = value), valueRef.current;
|
|
2278
|
+
}
|
|
2279
|
+
function _isEqual(objA, objB) {
|
|
2280
|
+
if (!objA || !objB)
|
|
2281
|
+
return objA === objB;
|
|
2282
|
+
const keysA = Object.keys(objA), keysB = Object.keys(objB);
|
|
2283
|
+
return keysA.length !== keysB.length ? !1 : keysA.every((key2) => objA[key2] === objB[key2]);
|
|
2284
|
+
}
|
|
2284
2285
|
export {
|
|
2285
2286
|
AnimatedSpinnerIcon,
|
|
2286
2287
|
Arrow,
|