@sanity/ui 3.0.9 → 3.0.10
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.js +5 -1
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +5 -1
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/package.json +6 -6
- package/src/core/hooks/useClickOutside.test.tsx +1 -1
- package/src/core/lib/createGlobalScopedContext.ts +3 -1
- package/src/core/primitives/avatar/avatar.tsx +1 -0
- package/src/core/primitives/card/card.tsx +1 -0
- package/src/core/primitives/popover/types.ts +2 -1
- package/src/core/styles/font/responsiveFont.ts +2 -0
- package/src/core/theme/__workshop__/canvas.tsx +1 -0
|
@@ -324,7 +324,11 @@ function getGlobalScope() {
|
|
|
324
324
|
const globalScope = getGlobalScope();
|
|
325
325
|
function createGlobalScopedContext(key2, defaultValue) {
|
|
326
326
|
const symbol = Symbol.for(key2);
|
|
327
|
-
|
|
327
|
+
if (typeof document > "u") {
|
|
328
|
+
const context = createContext(defaultValue);
|
|
329
|
+
return context.displayName = key2, context;
|
|
330
|
+
}
|
|
331
|
+
return globalScope[symbol] = globalScope[symbol] || createContext(defaultValue), globalScope[symbol];
|
|
328
332
|
}
|
|
329
333
|
const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
|
|
330
334
|
function ThemeProvider(props) {
|