@kbach/react-native 1.0.0-beta.8 → 1.0.0-beta.9
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/README.md +67 -235
- 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-KV3ZIXSH.mjs → chunk-DOWW44F7.mjs} +1 -1
- package/dist/chunk-H5Z24XX5.mjs +192 -0
- package/dist/{chunk-4BXM3QUV.mjs → chunk-HK6PDJJK.mjs} +21 -6
- package/dist/{chunk-JR3BLUAV.mjs → chunk-SY5OAY2C.mjs} +11 -4
- package/dist/chunk-X4UQCEOE.mjs +186 -0
- package/dist/{chunk-OIW7OQWO.mjs → chunk-YOC3SHF5.mjs} +1 -1
- package/dist/index.d.mts +4 -5
- package/dist/index.d.ts +4 -5
- package/dist/index.js +176 -39
- package/dist/index.mjs +9 -5
- package/dist/index.web.d.mts +1 -1
- package/dist/index.web.d.ts +1 -1
- package/dist/index.web.js +171 -39
- package/dist/index.web.mjs +9 -5
- package/dist/jsx-dev-runtime.js +31 -9
- package/dist/jsx-dev-runtime.mjs +3 -3
- package/dist/jsx-dev-runtime.web.js +22 -7
- package/dist/jsx-dev-runtime.web.mjs +3 -3
- package/dist/jsx-runtime.js +31 -9
- package/dist/jsx-runtime.mjs +3 -3
- package/dist/jsx-runtime.web.js +22 -7
- package/dist/jsx-runtime.web.mjs +3 -3
- package/dist/useColors-CeP5_HvM.d.mts +230 -0
- package/dist/useColors-CeP5_HvM.d.ts +230 -0
- package/package.json +1 -1
- package/src/babel-plugin.js +74 -2
- package/dist/ThemeContext-Dc5AC-m0.d.mts +0 -98
- package/dist/ThemeContext-Dc5AC-m0.d.ts +0 -98
- package/dist/chunk-CGU7UM2F.mjs +0 -66
- package/dist/chunk-JS5KIGAB.mjs +0 -192
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
Fragment,
|
|
3
3
|
jsx,
|
|
4
4
|
jsxs
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-YOC3SHF5.mjs";
|
|
6
|
+
import "./chunk-H5Z24XX5.mjs";
|
|
7
7
|
import {
|
|
8
8
|
createJsxDEV
|
|
9
9
|
} from "./chunk-DLIXI5OW.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-HK6PDJJK.mjs";
|
|
11
11
|
|
|
12
12
|
// src/jsx-dev-runtime.web.tsx
|
|
13
13
|
var jsxDEV = createJsxDEV(jsx, jsxs);
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -349,11 +349,13 @@ var defaultTheme = {
|
|
|
349
349
|
colors: PALETTE,
|
|
350
350
|
// Real Tailwind's default spacing scale in full — every step is exactly
|
|
351
351
|
// `n * 4px`, including the fractional `.5` steps (`1.5` -> 6px, `2.5` ->
|
|
352
|
-
// 10px, `3.5` -> 14px) and the "px" literal (a bare 1px).
|
|
353
|
-
//
|
|
354
|
-
//
|
|
355
|
-
// `
|
|
356
|
-
//
|
|
352
|
+
// 10px, `3.5` -> 14px) and the "px" literal (a bare 1px). Only the
|
|
353
|
+
// "usual stops", though — `jsEngine/shared.ts`'s `spacingPx` (and the
|
|
354
|
+
// native Rust dispatcher's own `spacing_px`) falls back to Tailwind v4's
|
|
355
|
+
// live `n * 4px` formula for any bare numeric step not listed here
|
|
356
|
+
// (`p-0.25`, `w-13`, ...), so this table names the common values and
|
|
357
|
+
// gives a theme override something to target, not the full resolvable
|
|
358
|
+
// set. Mirrors @kbach/react's theme.ts exactly.
|
|
357
359
|
spacing: {
|
|
358
360
|
"0": 0,
|
|
359
361
|
"px": 1,
|
|
@@ -398,7 +400,20 @@ var defaultTheme = {
|
|
|
398
400
|
xl: 1280,
|
|
399
401
|
"2xl": 1536
|
|
400
402
|
},
|
|
401
|
-
|
|
403
|
+
// Byte-for-byte the same three stacks
|
|
404
|
+
// packages/core-engine/src/resolvers/typography.rs's `font_family_value`
|
|
405
|
+
// falls back to. On native these three still effectively no-op (see
|
|
406
|
+
// `first_font_name`'s own doc comment for why a generic CSS keyword
|
|
407
|
+
// isn't a real loadable font) — only a caller-configured custom name
|
|
408
|
+
// changes native rendering; Expo Web uses the full stack as-is.
|
|
409
|
+
fontFamily: {
|
|
410
|
+
sans: 'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
|
|
411
|
+
serif: 'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',
|
|
412
|
+
mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
|
|
413
|
+
},
|
|
414
|
+
darkMode: "attribute",
|
|
415
|
+
// Empty by default, matching real Tailwind's own defaults.
|
|
416
|
+
container: {}
|
|
402
417
|
};
|
|
403
418
|
var activeTheme = defaultTheme;
|
|
404
419
|
var activeThemeJson = JSON.stringify(defaultTheme);
|
|
@@ -682,6 +697,12 @@ function parseClass(token) {
|
|
|
682
697
|
function decl(property, value) {
|
|
683
698
|
return { property, value };
|
|
684
699
|
}
|
|
700
|
+
function spacingPx(theme, value) {
|
|
701
|
+
const fromTable = theme.spacing[value];
|
|
702
|
+
if (fromTable !== void 0) return fromTable;
|
|
703
|
+
const n = Number(value);
|
|
704
|
+
return Number.isFinite(n) && value.trim() !== "" ? n * 4 : void 0;
|
|
705
|
+
}
|
|
685
706
|
function resolveLength(theme, parsed) {
|
|
686
707
|
if (parsed.negative) return null;
|
|
687
708
|
const value = parsed.value;
|
|
@@ -689,7 +710,7 @@ function resolveLength(theme, parsed) {
|
|
|
689
710
|
if (parsed.isArbitrary) return value;
|
|
690
711
|
if (value === "full") return "100%";
|
|
691
712
|
if (value === "auto") return "auto";
|
|
692
|
-
const px = theme
|
|
713
|
+
const px = spacingPx(theme, value);
|
|
693
714
|
return px === void 0 ? null : `${px}px`;
|
|
694
715
|
}
|
|
695
716
|
function resolveNegatableLength(theme, parsed) {
|
|
@@ -697,7 +718,7 @@ function resolveNegatableLength(theme, parsed) {
|
|
|
697
718
|
if (parsed.isArbitrary) return null;
|
|
698
719
|
const value = parsed.value;
|
|
699
720
|
if (value === null) return null;
|
|
700
|
-
const px = theme
|
|
721
|
+
const px = spacingPx(theme, value);
|
|
701
722
|
if (px === void 0) return null;
|
|
702
723
|
if (px === 0) return "0px";
|
|
703
724
|
return `-${px}px`;
|
|
@@ -1056,7 +1077,8 @@ function resolve2(parsed, theme) {
|
|
|
1056
1077
|
|
|
1057
1078
|
// src/jsEngine/resolvers/color.ts
|
|
1058
1079
|
function lookupHex(theme, key) {
|
|
1059
|
-
|
|
1080
|
+
const entry = theme.colors[key];
|
|
1081
|
+
return typeof entry === "string" ? entry : null;
|
|
1060
1082
|
}
|
|
1061
1083
|
|
|
1062
1084
|
// src/jsEngine/resolvers/border.ts
|
package/dist/jsx-runtime.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
jsx,
|
|
3
3
|
jsxs
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-DOWW44F7.mjs";
|
|
5
|
+
import "./chunk-SY5OAY2C.mjs";
|
|
6
6
|
import "./chunk-Z664AKW7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Fragment
|
|
9
9
|
} from "./chunk-DLIXI5OW.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-HK6PDJJK.mjs";
|
|
11
11
|
export {
|
|
12
12
|
Fragment,
|
|
13
13
|
jsx,
|