@kbach/react-native 1.0.0-beta.29 → 1.0.0-beta.30

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.
@@ -10,13 +10,13 @@ import {
10
10
  subscribeDynamicTokens,
11
11
  subscribeGlobalDarkMode,
12
12
  toggleGlobalDarkMode
13
- } from "./chunk-2RXP6YSV.mjs";
13
+ } from "./chunk-LOTFFRZP.mjs";
14
14
  import {
15
15
  defaultTheme,
16
16
  getTheme,
17
17
  resolveClassName,
18
18
  setTheme
19
- } from "./chunk-B36TKRB6.mjs";
19
+ } from "./chunk-DDNGWPS4.mjs";
20
20
 
21
21
  // src/config.ts
22
22
  function parseHexRgb(hex) {
@@ -108,7 +108,7 @@ function ThemeProvider({ children, defaultMode = "system", persist = false }) {
108
108
  if (mountedProviderCount > 1 && !warnedMultipleProviders) {
109
109
  warnedMultipleProviders = true;
110
110
  console.warn(
111
- "[kbach] Multiple <ThemeProvider> instances are mounted at once. Dark-mode state is one global store useTheme() reads everywhere, not scoped per-provider, so their defaultMode seeds will fight over the same state."
111
+ "[Kbach] Multiple <ThemeProvider> instances are mounted at once.\nDark mode is one global store \u2014 useTheme() reads it everywhere, not scoped per provider \u2014 so their defaultMode/persist seeds will fight over the same state.\nMount exactly one <ThemeProvider>, as high in the tree as convenient."
112
112
  );
113
113
  }
114
114
  return () => {
@@ -1636,11 +1636,11 @@ function resolveNative(parsed, theme) {
1636
1636
  case "backface-hidden":
1637
1637
  return [decl("backface-visibility", "hidden")];
1638
1638
  case "translate-x": {
1639
- const v = resolveNegatableLength(theme, parsed);
1639
+ const v = resolveNegatableSize(theme, parsed);
1640
1640
  return v === null ? null : [decl("transform-op-translate-x", v)];
1641
1641
  }
1642
1642
  case "translate-y": {
1643
- const v = resolveNegatableLength(theme, parsed);
1643
+ const v = resolveNegatableSize(theme, parsed);
1644
1644
  return v === null ? null : [decl("transform-op-translate-y", v)];
1645
1645
  }
1646
1646
  case "scale": {
@@ -1891,7 +1891,9 @@ function rnStyleValue(property, value) {
1891
1891
  if (reduced !== null) {
1892
1892
  return { value: reduced, warning: null };
1893
1893
  }
1894
- const warning = `Kbach: "${value}" is not a valid native value for "${property}" \u2014 dropped. calc()/clamp()/min()/max() only resolve on native when every operand is a constant px/rem length (no %, vw, vh, var(), or other viewport/CSS-variable units \u2014 those need real layout/DOM, which doesn't exist on native at paint time). Use a plain px/rem calc, a fraction utility (e.g. w-1/2), or resolve this value in JS instead.`;
1894
+ const warning = `[Kbach] "${value}" isn't a valid native value for "${property}" \u2014 dropped.
1895
+ calc()/min()/max()/clamp() only resolve on native when every operand is a constant px/rem length (no %, vw, vh, var(), or other viewport/CSS-variable units \u2014 those need real layout/DOM, which doesn't exist on native at paint time).
1896
+ Fix: use a plain px/rem calc, a fraction utility (e.g. w-1/2), or resolve this value in JS instead.`;
1895
1897
  return { value: null, warning };
1896
1898
  }
1897
1899
  function resolveStyleJsWithWarnings(classString, theme, colorScheme, pressed, width) {
@@ -1986,7 +1988,8 @@ function warnIfDev(classString, warnings) {
1986
1988
  if (warnings.length === 0) return;
1987
1989
  if (typeof __DEV__ !== "undefined" && !__DEV__) return;
1988
1990
  for (const warning of warnings) {
1989
- const message = `${warning} (from className "${classString}")`;
1991
+ const message = `${warning}
1992
+ From className: "${classString}"`;
1990
1993
  if (warnedMessages.has(message)) continue;
1991
1994
  warnedMessages.add(message);
1992
1995
  console.warn(message);