@kbach/react 0.3.5 → 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-6YT4ECUI.mjs → chunk-2D35ZED5.mjs} +5 -1
- package/dist/{chunk-2WECG35P.mjs → chunk-VTAK5IRJ.mjs} +1 -1
- package/dist/index.js +8 -1
- package/dist/index.mjs +4 -1
- package/dist/jsx-dev-runtime.js +5 -1
- package/dist/jsx-dev-runtime.mjs +2 -2
- package/dist/jsx-runtime.js +5 -1
- package/dist/jsx-runtime.mjs +2 -2
- package/package.json +1 -1
|
@@ -507,10 +507,14 @@ var defaultTheme = {
|
|
|
507
507
|
}
|
|
508
508
|
},
|
|
509
509
|
screens: {
|
|
510
|
-
sm:
|
|
510
|
+
sm: 360,
|
|
511
|
+
// phones (virtually all modern devices)
|
|
511
512
|
md: 768,
|
|
513
|
+
// tablets (iPad and up)
|
|
512
514
|
lg: 1024,
|
|
515
|
+
// large tablets (iPad Pro)
|
|
513
516
|
xl: 1280,
|
|
517
|
+
// desktop
|
|
514
518
|
"2xl": 1536
|
|
515
519
|
}
|
|
516
520
|
};
|
package/dist/index.js
CHANGED
|
@@ -637,10 +637,14 @@ var defaultTheme = {
|
|
|
637
637
|
}
|
|
638
638
|
},
|
|
639
639
|
screens: {
|
|
640
|
-
sm:
|
|
640
|
+
sm: 360,
|
|
641
|
+
// phones (virtually all modern devices)
|
|
641
642
|
md: 768,
|
|
643
|
+
// tablets (iPad and up)
|
|
642
644
|
lg: 1024,
|
|
645
|
+
// large tablets (iPad Pro)
|
|
643
646
|
xl: 1280,
|
|
647
|
+
// desktop
|
|
644
648
|
"2xl": 1536
|
|
645
649
|
}
|
|
646
650
|
};
|
|
@@ -2459,6 +2463,9 @@ function ThemeProvider({
|
|
|
2459
2463
|
const effectiveWidth = windowWidthProp ?? (isWeb ? webWidth : 0);
|
|
2460
2464
|
syncGlobalWidth(effectiveWidth);
|
|
2461
2465
|
syncGlobalScreens(resolvedConfig.theme.screens);
|
|
2466
|
+
(0, import_react3.useEffect)(() => {
|
|
2467
|
+
setGlobalWidth(effectiveWidth);
|
|
2468
|
+
}, [effectiveWidth]);
|
|
2462
2469
|
(0, import_react3.useEffect)(() => {
|
|
2463
2470
|
if (!isWeb || typeof window === "undefined") return;
|
|
2464
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
|
@@ -540,10 +540,14 @@ var defaultTheme = {
|
|
|
540
540
|
}
|
|
541
541
|
},
|
|
542
542
|
screens: {
|
|
543
|
-
sm:
|
|
543
|
+
sm: 360,
|
|
544
|
+
// phones (virtually all modern devices)
|
|
544
545
|
md: 768,
|
|
546
|
+
// tablets (iPad and up)
|
|
545
547
|
lg: 1024,
|
|
548
|
+
// large tablets (iPad Pro)
|
|
546
549
|
xl: 1280,
|
|
550
|
+
// desktop
|
|
547
551
|
"2xl": 1536
|
|
548
552
|
}
|
|
549
553
|
};
|
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
|
@@ -539,10 +539,14 @@ var defaultTheme = {
|
|
|
539
539
|
}
|
|
540
540
|
},
|
|
541
541
|
screens: {
|
|
542
|
-
sm:
|
|
542
|
+
sm: 360,
|
|
543
|
+
// phones (virtually all modern devices)
|
|
543
544
|
md: 768,
|
|
545
|
+
// tablets (iPad and up)
|
|
544
546
|
lg: 1024,
|
|
547
|
+
// large tablets (iPad Pro)
|
|
545
548
|
xl: 1280,
|
|
549
|
+
// desktop
|
|
546
550
|
"2xl": 1536
|
|
547
551
|
}
|
|
548
552
|
};
|
package/dist/jsx-runtime.mjs
CHANGED