@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.
@@ -507,10 +507,14 @@ var defaultTheme = {
507
507
  }
508
508
  },
509
509
  screens: {
510
- sm: 640,
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
  };
@@ -8,7 +8,7 @@ import {
8
8
  resolve,
9
9
  useConditionalWidth,
10
10
  useGlobalDarkMode
11
- } from "./chunk-6YT4ECUI.mjs";
11
+ } from "./chunk-2D35ZED5.mjs";
12
12
 
13
13
  // src/jsx-runtime.tsx
14
14
  import { jsx as _jsx, jsxs as _jsxs, Fragment } from "react/jsx-runtime";
package/dist/index.js CHANGED
@@ -637,10 +637,14 @@ var defaultTheme = {
637
637
  }
638
638
  },
639
639
  screens: {
640
- sm: 640,
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-6YT4ECUI.mjs";
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;
@@ -540,10 +540,14 @@ var defaultTheme = {
540
540
  }
541
541
  },
542
542
  screens: {
543
- sm: 640,
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
  };
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-2WECG35P.mjs";
6
- import "./chunk-6YT4ECUI.mjs";
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) {
@@ -539,10 +539,14 @@ var defaultTheme = {
539
539
  }
540
540
  },
541
541
  screens: {
542
- sm: 640,
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
  };
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-2WECG35P.mjs";
6
- import "./chunk-6YT4ECUI.mjs";
5
+ } from "./chunk-VTAK5IRJ.mjs";
6
+ import "./chunk-2D35ZED5.mjs";
7
7
  export {
8
8
  Fragment,
9
9
  jsx,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "React / React Native components and hooks for the Kbach framework",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",