@kbach/react-native 1.0.0-beta.38 → 1.0.0-beta.39

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.
package/dist/index.js CHANGED
@@ -1714,6 +1714,20 @@ function isPlainPercentage(value) {
1714
1714
  return digits.length > 0 && /^[0-9.]+$/.test(digits);
1715
1715
  }
1716
1716
  function rnStyleValue(property, value) {
1717
+ if (property === "aspect-ratio") {
1718
+ if (value.trim() === "auto") return { value: null, warning: null };
1719
+ const parts = value.split("/").map((s) => s.trim());
1720
+ let n = null;
1721
+ if (parts.length === 1) {
1722
+ const a = Number(parts[0]);
1723
+ n = Number.isFinite(a) ? a : null;
1724
+ } else if (parts.length === 2) {
1725
+ const a = Number(parts[0]);
1726
+ const b = Number(parts[1]);
1727
+ n = Number.isFinite(a) && Number.isFinite(b) && b !== 0 ? a / b : null;
1728
+ }
1729
+ return { value: n, warning: null };
1730
+ }
1717
1731
  if (!NUMERIC_LENGTH_PROPS.has(property)) {
1718
1732
  return { value, warning: null };
1719
1733
  }
@@ -2098,6 +2098,20 @@ function isPlainPercentage(value) {
2098
2098
  return digits.length > 0 && /^[0-9.]+$/.test(digits);
2099
2099
  }
2100
2100
  function rnStyleValue(property, value) {
2101
+ if (property === "aspect-ratio") {
2102
+ if (value.trim() === "auto") return { value: null, warning: null };
2103
+ const parts = value.split("/").map((s) => s.trim());
2104
+ let n = null;
2105
+ if (parts.length === 1) {
2106
+ const a = Number(parts[0]);
2107
+ n = Number.isFinite(a) ? a : null;
2108
+ } else if (parts.length === 2) {
2109
+ const a = Number(parts[0]);
2110
+ const b = Number(parts[1]);
2111
+ n = Number.isFinite(a) && Number.isFinite(b) && b !== 0 ? a / b : null;
2112
+ }
2113
+ return { value: n, warning: null };
2114
+ }
2101
2115
  if (!NUMERIC_LENGTH_PROPS.has(property)) {
2102
2116
  return { value, warning: null };
2103
2117
  }
@@ -2089,6 +2089,20 @@ function isPlainPercentage(value) {
2089
2089
  return digits.length > 0 && /^[0-9.]+$/.test(digits);
2090
2090
  }
2091
2091
  function rnStyleValue(property, value) {
2092
+ if (property === "aspect-ratio") {
2093
+ if (value.trim() === "auto") return { value: null, warning: null };
2094
+ const parts = value.split("/").map((s) => s.trim());
2095
+ let n = null;
2096
+ if (parts.length === 1) {
2097
+ const a = Number(parts[0]);
2098
+ n = Number.isFinite(a) ? a : null;
2099
+ } else if (parts.length === 2) {
2100
+ const a = Number(parts[0]);
2101
+ const b = Number(parts[1]);
2102
+ n = Number.isFinite(a) && Number.isFinite(b) && b !== 0 ? a / b : null;
2103
+ }
2104
+ return { value: n, warning: null };
2105
+ }
2092
2106
  if (!NUMERIC_LENGTH_PROPS.has(property)) {
2093
2107
  return { value, warning: null };
2094
2108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react-native",
3
- "version": "1.0.0-beta.38",
3
+ "version": "1.0.0-beta.39",
4
4
  "description": "Kbach's utility-class styling engine for React Native — the same class names as @kbach/react, resolved to a StyleSheet-ready style object via a Kotlin/JNI TurboModule (native), the same WASM engine @kbach/react uses (Expo Web / react-native-web), or a pure-JS fallback engine (Expo Go). Ships its own native Android module — one npm install, no separate native package. Beta. Native is Android-only (no iOS bridge yet); works with the React Native CLI, an Expo dev client, AND Expo Go (a reduced-coverage pure-JS fallback, since Expo Go can't load any custom native module).",
5
5
  "keywords": [
6
6
  "css",