@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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTheme
3
- } from "./chunk-B36TKRB6.mjs";
3
+ } from "./chunk-DDNGWPS4.mjs";
4
4
 
5
5
  // src/darkModeStore.ts
6
6
  import { Appearance } from "react-native";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveClassName
3
- } from "./chunk-B36TKRB6.mjs";
3
+ } from "./chunk-DDNGWPS4.mjs";
4
4
 
5
5
  // src/jsxRuntimeCoreWeb.ts
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
package/dist/index.js CHANGED
@@ -1244,11 +1244,11 @@ function resolveNative(parsed, theme) {
1244
1244
  case "backface-hidden":
1245
1245
  return [decl("backface-visibility", "hidden")];
1246
1246
  case "translate-x": {
1247
- const v = resolveNegatableLength(theme, parsed);
1247
+ const v = resolveNegatableSize(theme, parsed);
1248
1248
  return v === null ? null : [decl("transform-op-translate-x", v)];
1249
1249
  }
1250
1250
  case "translate-y": {
1251
- const v = resolveNegatableLength(theme, parsed);
1251
+ const v = resolveNegatableSize(theme, parsed);
1252
1252
  return v === null ? null : [decl("transform-op-translate-y", v)];
1253
1253
  }
1254
1254
  case "scale": {
@@ -1646,7 +1646,9 @@ function rnStyleValue(property, value) {
1646
1646
  if (reduced !== null) {
1647
1647
  return { value: reduced, warning: null };
1648
1648
  }
1649
- 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.`;
1649
+ const warning = `[Kbach] "${value}" isn't a valid native value for "${property}" \u2014 dropped.
1650
+ 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).
1651
+ Fix: use a plain px/rem calc, a fraction utility (e.g. w-1/2), or resolve this value in JS instead.`;
1650
1652
  return { value: null, warning };
1651
1653
  }
1652
1654
  function resolveStyleJsWithWarnings(classString, theme, colorScheme, pressed, width) {
@@ -1741,7 +1743,8 @@ function warnIfDev(classString, warnings) {
1741
1743
  if (warnings.length === 0) return;
1742
1744
  if (typeof __DEV__ !== "undefined" && !__DEV__) return;
1743
1745
  for (const warning of warnings) {
1744
- const message = `${warning} (from className "${classString}")`;
1746
+ const message = `${warning}
1747
+ From className: "${classString}"`;
1745
1748
  if (warnedMessages.has(message)) continue;
1746
1749
  warnedMessages.add(message);
1747
1750
  console.warn(message);
@@ -1842,7 +1845,7 @@ function ThemeProvider({ children, defaultMode = "system", persist = false }) {
1842
1845
  if (mountedProviderCount > 1 && !warnedMultipleProviders) {
1843
1846
  warnedMultipleProviders = true;
1844
1847
  console.warn(
1845
- "[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."
1848
+ "[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."
1846
1849
  );
1847
1850
  }
1848
1851
  return () => {