@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.
- package/android/src/main/jniLibs/arm64-v8a/libkbach_core_engine.so +0 -0
- package/android/src/main/jniLibs/x86_64/libkbach_core_engine.so +0 -0
- package/dist/{chunk-B36TKRB6.mjs → chunk-DDNGWPS4.mjs} +1 -1
- package/dist/{chunk-2RXP6YSV.mjs → chunk-LOTFFRZP.mjs} +1 -1
- package/dist/{chunk-Q2L7M7FC.mjs → chunk-UJYEYY6S.mjs} +1 -1
- package/dist/index.js +8 -5
- package/dist/index.web.js +2 -2
- package/dist/index.web.mjs +3 -3
- package/dist/jsx-dev-runtime.js +7 -4
- package/dist/jsx-dev-runtime.web.js +1 -1
- package/dist/jsx-dev-runtime.web.mjs +3 -3
- package/dist/jsx-runtime.js +7 -4
- package/dist/jsx-runtime.web.js +1 -1
- package/dist/jsx-runtime.web.mjs +2 -2
- package/package.json +3 -1
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 =
|
|
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 =
|
|
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
|
|
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}
|
|
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
|
-
"[
|
|
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 () => {
|