@kbach/react-native 1.0.0-beta.56 → 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 CHANGED
@@ -129,12 +129,14 @@ theme)`.
129
129
  Native has no selector/cascade engine. Two groups:
130
130
 
131
131
  **Resolved in the engine from live parameters:**
132
- - `dark:` — current OS/app color scheme.
132
+ - `dark:` — current OS/app color scheme; `not-dark:` is the other one.
133
133
  - `sm:` `md:` `lg:` `xl:` `2xl:` — window width vs `theme.screens`, plus
134
134
  any breakpoint a config adds (`3xl:`, `tablet:`), and `max-<name>:`
135
- (strictly below that width).
135
+ (strictly below that width). `not-<name>:` / `not-max-<name>:` flip
136
+ either one.
136
137
  - `min-[500px]:` / `max-[30rem]:` — arbitrary width breakpoints (constant
137
- px/rem only).
138
+ px/rem only). `max-[…]` is strictly below its width, like `max-<name>:`;
139
+ through core-engine 1.0.0-beta.18 it also held at exactly that width.
138
140
  - `active:` — `Pressable` press state (via its style-callback).
139
141
 
140
142
  **Resolved in `jsxRuntimeCore.ts` from React props, before the engine sees
@@ -191,6 +193,15 @@ also unavailable in Expo Go (no full-vocabulary resolver to check against).
191
193
  This is also exactly what iOS gets in every build type (§3) — the coverage
192
194
  gap isn't Expo-Go-specific, it's "whatever the JS-fallback engine covers."
193
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
+
194
205
  Within that scope it must match the Rust native engine exactly.
195
206
  `src/jsEngine/parity.test.ts` runs class strings through both (Rust via
196
207
  `packages/core-engine/dist-node`, so core-engine must be built first) and
@@ -373,7 +384,9 @@ and `react` at `projectRoot/node_modules/...`. A plain non-monorepo
373
384
  `H5`, `H6` (§14). Types: `ThemeConfig`, `ColorEntry`, `ContainerConfig`,
374
385
  `StyleObject`, `KbachConfig`, `ThemeState`, `ThemeProviderProps`,
375
386
  `ThemeStorageAdapter`, `ThemeMode`, `ColorsAPI`, `ColorScale`,
376
- `ClassValue`, `ButtonProps`, `ParagraphProps`, `HeadingProps`.
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.
377
390
 
378
391
  Subpath exports: `@kbach/react-native/babel-plugin`,
379
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