@sanity/ui 3.0.0-static.17 → 3.0.0-static.18
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 +2 -2
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +3 -3
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/css.cjs +1 -0
- package/dist/css.cjs.map +1 -1
- package/dist/css.d.cts +7 -3
- package/dist/css.d.ts +7 -3
- package/dist/css.js +1 -0
- package/dist/css.js.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/package.json +1 -1
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +2 -18
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +9 -9
- package/src/css/constants.ts +1 -0
- package/src/css/types.ts +23 -18
|
@@ -282,9 +282,9 @@ function useMatchMedia(mediaQueryString, getServerSnapshot2) {
|
|
|
282
282
|
let t1;
|
|
283
283
|
return $[2] !== mediaQueryString ? (t1 = () => window.matchMedia(mediaQueryString).matches, $[2] = mediaQueryString, $[3] = t1) : t1 = $[3], react.useSyncExternalStore(t0, t1, getServerSnapshot2);
|
|
284
284
|
}
|
|
285
|
-
const media =
|
|
285
|
+
const media = Object.values(css.BREAKPOINTS);
|
|
286
286
|
function _getMediaQuery(media2, index) {
|
|
287
|
-
return index === 0 ? `screen and (max-width: ${media2[index] - 1}px)` : index === media2.length ? `screen and (min-width: ${media2[index
|
|
287
|
+
return index === 0 ? `screen and (max-width: ${media2[index + 1] - 1}px)` : index === media2.length ? `screen and (min-width: ${media2[index]}px)` : `screen and (min-width: ${media2[index]}px) and (max-width: ${media2[index + 1] - 1}px)`;
|
|
288
288
|
}
|
|
289
289
|
function _createMediaStore() {
|
|
290
290
|
const mediaLen = media.length;
|