@kbach/react 0.3.6 → 0.3.7
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/{chunk-UFSME6UC.mjs → chunk-2D35ZED5.mjs} +2 -2
- package/dist/{chunk-ALKTUEAA.mjs → chunk-VTAK5IRJ.mjs} +1 -1
- package/dist/index.js +5 -2
- package/dist/index.mjs +4 -1
- package/dist/jsx-dev-runtime.js +2 -2
- package/dist/jsx-dev-runtime.mjs +2 -2
- package/dist/jsx-runtime.js +2 -2
- package/dist/jsx-runtime.mjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -637,8 +637,8 @@ var defaultTheme = {
|
|
|
637
637
|
}
|
|
638
638
|
},
|
|
639
639
|
screens: {
|
|
640
|
-
sm:
|
|
641
|
-
//
|
|
640
|
+
sm: 360,
|
|
641
|
+
// phones (virtually all modern devices)
|
|
642
642
|
md: 768,
|
|
643
643
|
// tablets (iPad and up)
|
|
644
644
|
lg: 1024,
|
|
@@ -2463,6 +2463,9 @@ function ThemeProvider({
|
|
|
2463
2463
|
const effectiveWidth = windowWidthProp ?? (isWeb ? webWidth : 0);
|
|
2464
2464
|
syncGlobalWidth(effectiveWidth);
|
|
2465
2465
|
syncGlobalScreens(resolvedConfig.theme.screens);
|
|
2466
|
+
(0, import_react3.useEffect)(() => {
|
|
2467
|
+
setGlobalWidth(effectiveWidth);
|
|
2468
|
+
}, [effectiveWidth]);
|
|
2466
2469
|
(0, import_react3.useEffect)(() => {
|
|
2467
2470
|
if (!isWeb || typeof window === "undefined") return;
|
|
2468
2471
|
let raf = 0;
|
package/dist/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
updateConfig,
|
|
23
23
|
useGlobalDarkMode,
|
|
24
24
|
useGlobalWidth
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-2D35ZED5.mjs";
|
|
26
26
|
|
|
27
27
|
// src/context.tsx
|
|
28
28
|
import { createContext, useContext } from "react";
|
|
@@ -148,6 +148,9 @@ function ThemeProvider({
|
|
|
148
148
|
const effectiveWidth = windowWidthProp ?? (isWeb ? webWidth : 0);
|
|
149
149
|
syncGlobalWidth(effectiveWidth);
|
|
150
150
|
syncGlobalScreens(resolvedConfig.theme.screens);
|
|
151
|
+
useEffect(() => {
|
|
152
|
+
setGlobalWidth(effectiveWidth);
|
|
153
|
+
}, [effectiveWidth]);
|
|
151
154
|
useEffect(() => {
|
|
152
155
|
if (!isWeb || typeof window === "undefined") return;
|
|
153
156
|
let raf = 0;
|
package/dist/jsx-dev-runtime.js
CHANGED
package/dist/jsx-dev-runtime.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
Fragment,
|
|
3
3
|
jsx,
|
|
4
4
|
jsxs
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-VTAK5IRJ.mjs";
|
|
6
|
+
import "./chunk-2D35ZED5.mjs";
|
|
7
7
|
|
|
8
8
|
// src/jsx-dev-runtime.tsx
|
|
9
9
|
function jsxDEV(type, props, key, isStaticChildren, _source, _self) {
|
package/dist/jsx-runtime.js
CHANGED
package/dist/jsx-runtime.mjs
CHANGED