@kbach/react-native 1.0.0-beta.0 → 1.0.0-beta.1
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 +34 -6
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -6,12 +6,40 @@ resolved to a real `StyleSheet`-ready style object instead of injected CSS.
|
|
|
6
6
|
|
|
7
7
|
> **Beta, Android-only.** Resolution runs through a Kotlin/JNI TurboModule
|
|
8
8
|
> calling the same Rust core `@kbach/react` uses, so class semantics stay
|
|
9
|
-
> identical across web and native
|
|
10
|
-
>
|
|
11
|
-
>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
> identical across web and native. The native module ships prebuilt (see
|
|
10
|
+
> Setup below) — no Rust toolchain or manual native wiring required — but
|
|
11
|
+
> there's no iOS bridge yet.
|
|
12
|
+
|
|
13
|
+
## Setup
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install @kbach/react-native
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
That pulls in [`@kbach/android`](https://www.npmjs.com/package/@kbach/android)
|
|
20
|
+
too — the actual native module — as a real dependency. Android's
|
|
21
|
+
autolinking discovers it automatically the moment it's in `node_modules`;
|
|
22
|
+
no manual `MainApplication.kt` edit needed.
|
|
23
|
+
|
|
24
|
+
Add the Babel plugin so your app's JSX routes through Kbach's JSX runtime
|
|
25
|
+
instead of `react/jsx-runtime`:
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
// babel.config.js
|
|
29
|
+
module.exports = {
|
|
30
|
+
presets: ['module:@react-native/babel-preset'],
|
|
31
|
+
plugins: ['@kbach/react-native/babel-plugin'],
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Then rebuild the Android app (`npm run android`, or a clean Gradle build if
|
|
36
|
+
you're re-running one that's already built) so Gradle picks up the new
|
|
37
|
+
native module. See `apps/native-sandbox` in the
|
|
38
|
+
[repo](https://github.com/semsakadanupol/kbach) for a full working
|
|
39
|
+
reference project, including the Metro config a monorepo setup like this
|
|
40
|
+
one needs (a plain single-app install doesn't need any of that — it's
|
|
41
|
+
only relevant if you're linking packages locally instead of installing
|
|
42
|
+
from npm).
|
|
15
43
|
|
|
16
44
|
## What this is
|
|
17
45
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kbach/react-native",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
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. Beta, Android-only.",
|
|
5
5
|
"keywords": ["css", "react-native", "tailwind", "utility-first", "styling", "android"],
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
"lint": "tsc --noEmit",
|
|
51
51
|
"generate:colors": "node ../core-engine/scripts/generate-palette.mjs src/generatedPalette.ts"
|
|
52
52
|
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@kbach/android": "1.0.0-beta.0"
|
|
55
|
+
},
|
|
53
56
|
"devDependencies": {
|
|
54
57
|
"@types/react": "^19.2.0",
|
|
55
58
|
"@types/react-test-renderer": "^19.1.0",
|