@kbach/react-native 1.0.0-beta.57 → 1.0.0-beta.58
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/AGENTS.md +12 -1
- package/README.md +40 -0
- package/llms.txt +37 -0
- package/package.json +2 -1
package/AGENTS.md
CHANGED
|
@@ -193,6 +193,15 @@ also unavailable in Expo Go (no full-vocabulary resolver to check against).
|
|
|
193
193
|
This is also exactly what iOS gets in every build type (§3) — the coverage
|
|
194
194
|
gap isn't Expo-Go-specific, it's "whatever the JS-fallback engine covers."
|
|
195
195
|
|
|
196
|
+
Measured 2026-11-17 against every class in the docs' reference tables
|
|
197
|
+
(1,048), the JS fallback matches the Rust engine except: the `object-*`
|
|
198
|
+
classes (no `objectFit`), the small container sizes `3xs`/`2xs`/`xs` on
|
|
199
|
+
`w-`/`min-w-`/`max-w-`/`basis-` (no value), and `container`. The other
|
|
200
|
+
differences are properties React Native ignores anyway (`float`, `columns`,
|
|
201
|
+
`break-*`, `clear`, `visibility`, `isolation`, logical `rounded-s`/`border-s`
|
|
202
|
+
with `"0.5rem"`/`"1px"` strings), which the Rust engine returns and the JS
|
|
203
|
+
one doesn't.
|
|
204
|
+
|
|
196
205
|
Within that scope it must match the Rust native engine exactly.
|
|
197
206
|
`src/jsEngine/parity.test.ts` runs class strings through both (Rust via
|
|
198
207
|
`packages/core-engine/dist-node`, so core-engine must be built first) and
|
|
@@ -375,7 +384,9 @@ and `react` at `projectRoot/node_modules/...`. A plain non-monorepo
|
|
|
375
384
|
`H5`, `H6` (§14). Types: `ThemeConfig`, `ColorEntry`, `ContainerConfig`,
|
|
376
385
|
`StyleObject`, `KbachConfig`, `ThemeState`, `ThemeProviderProps`,
|
|
377
386
|
`ThemeStorageAdapter`, `ThemeMode`, `ColorsAPI`, `ColorScale`,
|
|
378
|
-
`ClassValue`, `ButtonProps`, `ParagraphProps`,
|
|
387
|
+
`ClassValue`, `ClassDictionary`, `ClassArray`, `ButtonProps`, `ParagraphProps`,
|
|
388
|
+
`HeadingProps`. The docs site's `tests/e2e/api-reference.mjs` fails when an
|
|
389
|
+
export here is missing from the React Native API page.
|
|
379
390
|
|
|
380
391
|
Subpath exports: `@kbach/react-native/babel-plugin`,
|
|
381
392
|
`@kbach/react-native/jsx-runtime`, `@kbach/react-native/jsx-dev-runtime`.
|
package/README.md
CHANGED
|
@@ -204,6 +204,46 @@ for the complete reference — modifier list, `calc()`/`min()`/`max()`/
|
|
|
204
204
|
the [root AGENTS.md](https://github.com/semsakadanupol/kbach/blob/main/AGENTS.md)
|
|
205
205
|
for `kbach.config.js` and how the underlying engine is built.
|
|
206
206
|
|
|
207
|
+
<!-- kbach:ai-rules:start -->
|
|
208
|
+
## For AI assistants
|
|
209
|
+
|
|
210
|
+
AI models learned Tailwind CSS, not Kbach. Give your assistant these rules (they're also in `llms.txt` in this package, and `npx @kbach/cli ai` writes them into your project's `AGENTS.md`):
|
|
211
|
+
|
|
212
|
+
```text
|
|
213
|
+
Kbach rules. Follow them in every class you write.
|
|
214
|
+
|
|
215
|
+
1. Color shades go from 1 (lightest) to 12 (darkest). Never use 50 to 950.
|
|
216
|
+
Convert: 50→1 100→2 200→3 300→4 400→5 500→6 600→7 700→8 800→9 900→10 950→11.
|
|
217
|
+
Write bg-blue-6, text-gray-11, border-slate-3. Never bg-blue-500.
|
|
218
|
+
2. Color families: amber blue cyan emerald fuchsia gray green indigo lime
|
|
219
|
+
mauve mist neutral olive orange pink purple red rose sky slate stone taupe
|
|
220
|
+
teal violet yellow zinc. Single colors: white black transparent current
|
|
221
|
+
gold silver bronze copper coal.
|
|
222
|
+
3. Every other class follows Tailwind CSS v4.3 names and values: spacing in
|
|
223
|
+
steps of 4px (p-4 is 16px), variants such as hover:, md: and dark:,
|
|
224
|
+
values in square brackets, a slash for opacity (bg-black/50).
|
|
225
|
+
Gradients: bg-linear-to-r from-* via-* to-*.
|
|
226
|
+
4. There is no tailwind.config.js, no @tailwind, no @import "tailwindcss",
|
|
227
|
+
no @theme and no @apply. Settings go in kbach.config.js
|
|
228
|
+
(export default { darkMode, theme, extend }).
|
|
229
|
+
5. Plain HTML page: put <script>window.kbachConfig = { ... }</script> BEFORE
|
|
230
|
+
<script src="https://cdn.jsdelivr.net/npm/@kbach/browser"></script>.
|
|
231
|
+
A theme button calls Kbach.toggle() and needs darkMode: 'class' or
|
|
232
|
+
'attribute' in that config.
|
|
233
|
+
6. React with Vite: import { kbach } from '@kbach/react/vite' and add kbach()
|
|
234
|
+
to plugins; import './kbach.css' once in the entry file. Write every class
|
|
235
|
+
in full: never build one from pieces like 'bg-' + color.
|
|
236
|
+
7. React Native: '@kbach/react-native/babel-plugin' must be in
|
|
237
|
+
babel.config.js. On a phone there is no grid, no gradients, no filters, no
|
|
238
|
+
transitions or animations, no group-*, peer-*, before: or after:. Use
|
|
239
|
+
flex-row for rows (a View is a column). Values in brackets: px or rem only.
|
|
240
|
+
8. Dark mode switches use useTheme() from '@kbach/react' or
|
|
241
|
+
'@kbach/react-native': { mode, isDark, setMode, toggle }.
|
|
242
|
+
|
|
243
|
+
Full documentation: https://github.com/semsakadanupol/kbach
|
|
244
|
+
```
|
|
245
|
+
<!-- kbach:ai-rules:end -->
|
|
246
|
+
|
|
207
247
|
## License
|
|
208
248
|
|
|
209
249
|
MIT
|
package/llms.txt
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# @kbach/react-native
|
|
2
|
+
|
|
3
|
+
> React Native and Expo: class names turned into React Native styles when each element renders. Part of Kbach.
|
|
4
|
+
|
|
5
|
+
## Rules for AI assistants
|
|
6
|
+
|
|
7
|
+
Kbach rules. Follow them in every class you write.
|
|
8
|
+
|
|
9
|
+
1. Color shades go from 1 (lightest) to 12 (darkest). Never use 50 to 950.
|
|
10
|
+
Convert: 50→1 100→2 200→3 300→4 400→5 500→6 600→7 700→8 800→9 900→10 950→11.
|
|
11
|
+
Write bg-blue-6, text-gray-11, border-slate-3. Never bg-blue-500.
|
|
12
|
+
2. Color families: amber blue cyan emerald fuchsia gray green indigo lime
|
|
13
|
+
mauve mist neutral olive orange pink purple red rose sky slate stone taupe
|
|
14
|
+
teal violet yellow zinc. Single colors: white black transparent current
|
|
15
|
+
gold silver bronze copper coal.
|
|
16
|
+
3. Every other class follows Tailwind CSS v4.3 names and values: spacing in
|
|
17
|
+
steps of 4px (p-4 is 16px), variants such as hover:, md: and dark:,
|
|
18
|
+
values in square brackets, a slash for opacity (bg-black/50).
|
|
19
|
+
Gradients: bg-linear-to-r from-* via-* to-*.
|
|
20
|
+
4. There is no tailwind.config.js, no @tailwind, no @import "tailwindcss",
|
|
21
|
+
no @theme and no @apply. Settings go in kbach.config.js
|
|
22
|
+
(export default { darkMode, theme, extend }).
|
|
23
|
+
5. Plain HTML page: put <script>window.kbachConfig = { ... }</script> BEFORE
|
|
24
|
+
<script src="https://cdn.jsdelivr.net/npm/@kbach/browser"></script>.
|
|
25
|
+
A theme button calls Kbach.toggle() and needs darkMode: 'class' or
|
|
26
|
+
'attribute' in that config.
|
|
27
|
+
6. React with Vite: import { kbach } from '@kbach/react/vite' and add kbach()
|
|
28
|
+
to plugins; import './kbach.css' once in the entry file. Write every class
|
|
29
|
+
in full: never build one from pieces like 'bg-' + color.
|
|
30
|
+
7. React Native: '@kbach/react-native/babel-plugin' must be in
|
|
31
|
+
babel.config.js. On a phone there is no grid, no gradients, no filters, no
|
|
32
|
+
transitions or animations, no group-*, peer-*, before: or after:. Use
|
|
33
|
+
flex-row for rows (a View is a column). Values in brackets: px or rem only.
|
|
34
|
+
8. Dark mode switches use useTheme() from '@kbach/react' or
|
|
35
|
+
'@kbach/react-native': { mode, isDark, setMode, toggle }.
|
|
36
|
+
|
|
37
|
+
Full documentation: https://github.com/semsakadanupol/kbach
|
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.58",
|
|
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",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|
|
32
|
+
"llms.txt",
|
|
32
33
|
"src/babel-plugin.js",
|
|
33
34
|
"android/build.gradle",
|
|
34
35
|
"android/src",
|