@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.
@@ -507,8 +507,8 @@ var defaultTheme = {
507
507
  }
508
508
  },
509
509
  screens: {
510
- sm: 390,
511
- // large phones (iPhone 12+, most Android flagships)
510
+ sm: 360,
511
+ // phones (virtually all modern devices)
512
512
  md: 768,
513
513
  // tablets (iPad and up)
514
514
  lg: 1024,
@@ -8,7 +8,7 @@ import {
8
8
  resolve,
9
9
  useConditionalWidth,
10
10
  useGlobalDarkMode
11
- } from "./chunk-UFSME6UC.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,8 +637,8 @@ var defaultTheme = {
637
637
  }
638
638
  },
639
639
  screens: {
640
- sm: 390,
641
- // large phones (iPhone 12+, most Android flagships)
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-UFSME6UC.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,8 +540,8 @@ var defaultTheme = {
540
540
  }
541
541
  },
542
542
  screens: {
543
- sm: 390,
544
- // large phones (iPhone 12+, most Android flagships)
543
+ sm: 360,
544
+ // phones (virtually all modern devices)
545
545
  md: 768,
546
546
  // tablets (iPad and up)
547
547
  lg: 1024,
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-ALKTUEAA.mjs";
6
- import "./chunk-UFSME6UC.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,8 +539,8 @@ var defaultTheme = {
539
539
  }
540
540
  },
541
541
  screens: {
542
- sm: 390,
543
- // large phones (iPhone 12+, most Android flagships)
542
+ sm: 360,
543
+ // phones (virtually all modern devices)
544
544
  md: 768,
545
545
  // tablets (iPad and up)
546
546
  lg: 1024,
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-ALKTUEAA.mjs";
6
- import "./chunk-UFSME6UC.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.6",
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",