@kbach/react 0.3.7 → 0.3.8

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.
@@ -8,7 +8,7 @@ import {
8
8
  resolve,
9
9
  useConditionalWidth,
10
10
  useGlobalDarkMode
11
- } from "./chunk-2D35ZED5.mjs";
11
+ } from "./chunk-WYY3PRRC.mjs";
12
12
 
13
13
  // src/jsx-runtime.tsx
14
14
  import { jsx as _jsx, jsxs as _jsxs, Fragment } from "react/jsx-runtime";
@@ -28,7 +28,7 @@ function hasResponsiveBuckets(resolved) {
28
28
  var DarkWrapper = React.forwardRef(
29
29
  function DarkWrapper2({ Component, resolvedStyle, style: styleProp, children, ...rest }, ref) {
30
30
  const isDark = useGlobalDarkMode();
31
- const needsWidth = !isWeb && hasResponsiveBuckets(resolvedStyle);
31
+ const needsWidth = hasResponsiveBuckets(resolvedStyle);
32
32
  const width = useConditionalWidth(needsWidth);
33
33
  const breakpoints = needsWidth ? getActiveBreakpoints(width) : EMPTY_BREAKPOINTS;
34
34
  const computedStyle = flatten(resolvedStyle, isDark, {}, breakpoints);
@@ -2362,7 +2362,7 @@ var InteractiveWrapper = forwardRef(
2362
2362
  ...rest
2363
2363
  }, ref) {
2364
2364
  const isDark = useGlobalDarkMode();
2365
- const needsWidth = !isWeb && hasResponsiveBuckets(resolvedStyle);
2365
+ const needsWidth = hasResponsiveBuckets(resolvedStyle);
2366
2366
  const width = useConditionalWidth(needsWidth);
2367
2367
  const breakpoints = needsWidth ? getActiveBreakpoints(width) : EMPTY_BREAKPOINTS;
2368
2368
  const [pressed, setPressed] = useState(false);
package/dist/index.js CHANGED
@@ -2779,7 +2779,7 @@ function useConditionalWidth(active) {
2779
2779
  function useStyles(classString, state = {}) {
2780
2780
  const { isDark, config } = useTheme();
2781
2781
  const width = useGlobalWidth();
2782
- const breakpoints = isWeb ? EMPTY_BREAKPOINTS : getActiveBreakpoints(width);
2782
+ const breakpoints = getActiveBreakpoints(width);
2783
2783
  const normalised = Array.isArray(classString) ? classString.join(" ") : classString;
2784
2784
  return (0, import_react7.useMemo)(() => {
2785
2785
  const resolved = resolve(normalised, config.theme, config.darkMode);
@@ -2866,7 +2866,7 @@ var InteractiveWrapper = (0, import_react9.forwardRef)(
2866
2866
  ...rest
2867
2867
  }, ref) {
2868
2868
  const isDark = useGlobalDarkMode();
2869
- const needsWidth = !isWeb && hasResponsiveBuckets(resolvedStyle);
2869
+ const needsWidth = hasResponsiveBuckets(resolvedStyle);
2870
2870
  const width = useConditionalWidth(needsWidth);
2871
2871
  const breakpoints = needsWidth ? getActiveBreakpoints(width) : EMPTY_BREAKPOINTS;
2872
2872
  const [pressed, setPressed] = (0, import_react9.useState)(false);
package/dist/index.mjs CHANGED
@@ -1,5 +1,4 @@
1
1
  import {
2
- EMPTY_BREAKPOINTS,
3
2
  InteractiveWrapper,
4
3
  __require,
5
4
  buildConfig,
@@ -22,7 +21,7 @@ import {
22
21
  updateConfig,
23
22
  useGlobalDarkMode,
24
23
  useGlobalWidth
25
- } from "./chunk-2D35ZED5.mjs";
24
+ } from "./chunk-WYY3PRRC.mjs";
26
25
 
27
26
  // src/context.tsx
28
27
  import { createContext, useContext } from "react";
@@ -445,7 +444,7 @@ import { useMemo as useMemo4 } from "react";
445
444
  function useStyles(classString, state = {}) {
446
445
  const { isDark, config } = useTheme();
447
446
  const width = useGlobalWidth();
448
- const breakpoints = isWeb ? EMPTY_BREAKPOINTS : getActiveBreakpoints(width);
447
+ const breakpoints = getActiveBreakpoints(width);
449
448
  const normalised = Array.isArray(classString) ? classString.join(" ") : classString;
450
449
  return useMemo4(() => {
451
450
  const resolved = resolve(normalised, config.theme, config.darkMode);
@@ -2349,7 +2349,7 @@ var InteractiveWrapper = (0, import_react3.forwardRef)(
2349
2349
  ...rest
2350
2350
  }, ref) {
2351
2351
  const isDark = useGlobalDarkMode();
2352
- const needsWidth = !isWeb && hasResponsiveBuckets(resolvedStyle);
2352
+ const needsWidth = hasResponsiveBuckets(resolvedStyle);
2353
2353
  const width = useConditionalWidth(needsWidth);
2354
2354
  const breakpoints = needsWidth ? getActiveBreakpoints(width) : EMPTY_BREAKPOINTS;
2355
2355
  const [pressed, setPressed] = (0, import_react3.useState)(false);
@@ -2400,7 +2400,7 @@ function hasResponsiveBuckets2(resolved) {
2400
2400
  var DarkWrapper = import_react4.default.forwardRef(
2401
2401
  function DarkWrapper2({ Component, resolvedStyle, style: styleProp, children, ...rest }, ref) {
2402
2402
  const isDark = useGlobalDarkMode();
2403
- const needsWidth = !isWeb && hasResponsiveBuckets2(resolvedStyle);
2403
+ const needsWidth = hasResponsiveBuckets2(resolvedStyle);
2404
2404
  const width = useConditionalWidth(needsWidth);
2405
2405
  const breakpoints = needsWidth ? getActiveBreakpoints(width) : EMPTY_BREAKPOINTS;
2406
2406
  const computedStyle = flatten(resolvedStyle, isDark, {}, breakpoints);
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-VTAK5IRJ.mjs";
6
- import "./chunk-2D35ZED5.mjs";
5
+ } from "./chunk-H5232HHF.mjs";
6
+ import "./chunk-WYY3PRRC.mjs";
7
7
 
8
8
  // src/jsx-dev-runtime.tsx
9
9
  function jsxDEV(type, props, key, isStaticChildren, _source, _self) {
@@ -2348,7 +2348,7 @@ var InteractiveWrapper = (0, import_react3.forwardRef)(
2348
2348
  ...rest
2349
2349
  }, ref) {
2350
2350
  const isDark = useGlobalDarkMode();
2351
- const needsWidth = !isWeb && hasResponsiveBuckets(resolvedStyle);
2351
+ const needsWidth = hasResponsiveBuckets(resolvedStyle);
2352
2352
  const width = useConditionalWidth(needsWidth);
2353
2353
  const breakpoints = needsWidth ? getActiveBreakpoints(width) : EMPTY_BREAKPOINTS;
2354
2354
  const [pressed, setPressed] = (0, import_react3.useState)(false);
@@ -2399,7 +2399,7 @@ function hasResponsiveBuckets2(resolved) {
2399
2399
  var DarkWrapper = import_react4.default.forwardRef(
2400
2400
  function DarkWrapper2({ Component, resolvedStyle, style: styleProp, children, ...rest }, ref) {
2401
2401
  const isDark = useGlobalDarkMode();
2402
- const needsWidth = !isWeb && hasResponsiveBuckets2(resolvedStyle);
2402
+ const needsWidth = hasResponsiveBuckets2(resolvedStyle);
2403
2403
  const width = useConditionalWidth(needsWidth);
2404
2404
  const breakpoints = needsWidth ? getActiveBreakpoints(width) : EMPTY_BREAKPOINTS;
2405
2405
  const computedStyle = flatten(resolvedStyle, isDark, {}, breakpoints);
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-VTAK5IRJ.mjs";
6
- import "./chunk-2D35ZED5.mjs";
5
+ } from "./chunk-H5232HHF.mjs";
6
+ import "./chunk-WYY3PRRC.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.7",
3
+ "version": "0.3.8",
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",