@kbach/react-native 1.0.0-beta.51 → 1.0.0-beta.52

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
@@ -9,6 +9,23 @@ cross-package overview, `kbach.config.js` reference, the color palette,
9
9
  and how the underlying engine is built, see the repo root's
10
10
  [AGENTS.md](https://github.com/semsakadanupol/kbach/blob/main/AGENTS.md).
11
11
 
12
+ > **Before writing a single class here, know these three things —
13
+ > Tailwind familiarity actively misleads on all three:**
14
+ >
15
+ > 1. Color shades are `1`–`12` (lightest→darkest), not Tailwind's
16
+ > `50`–`950` — `bg-blue-500` resolves to nothing; the real class is
17
+ > `bg-blue-6`. Full palette: root AGENTS.md §6.
18
+ > 2. `group-*`, `peer-*`, `has-[…]`, container queries, grid, and pseudo-
19
+ > elements (`before:`/`after:`) are real Tailwind syntax that PARSES
20
+ > here but applies **zero style, with no warning** — native has no
21
+ > cascade/DOM to support them. See §4's "Not supported" list. A typo
22
+ > DOES warn; an unsupported-but-valid utility does not — don't assume
23
+ > silence means it worked.
24
+ > 3. The babel plugin (§1 below) is required on **every** target,
25
+ > including Expo Go — without it `className` does literally nothing,
26
+ > silently, no error. This is the single most common real setup bug
27
+ > reported against this package.
28
+
12
29
  ---
13
30
 
14
31
  ## 1. Install + setup
@@ -220,6 +237,23 @@ Outside React: `getGlobalDarkMode()` / `toggleGlobalDarkMode()` /
220
237
  engine (a space splits the class token). Use underscores if you want them
221
238
  for readability: `w-[calc(100%_-_3rem)]`.
222
239
 
240
+ ### 7.1 Arbitrary values elsewhere — same px/rem-only rule
241
+
242
+ Not just `calc()`: any arbitrary value RN needs as a plain number (font
243
+ size, spacing, radii, ...) follows the identical rule. `text-[20px]` and
244
+ `text-[1.5rem]` work (`rem` × 16, same as everywhere else); `text-[2em]`,
245
+ `text-[50%]`, `text-[10vh]`/`text-[10vw]` don't — `em` needs the parent's
246
+ own cascaded font-size and `%`/viewport units need real layout, neither
247
+ of which exists at native resolve time — dropped with the same dev-only
248
+ `console.warn`, never a crash. Identical on Expo Go's JS-fallback engine
249
+ (`jsEngine/resolveStyle.ts` mirrors `resolve_style.rs`'s `rn_style_value`
250
+ exactly). Web (including Expo Web) has none of this restriction — real
251
+ CSS resolves every unit natively.
252
+
253
+ **`text-[…]` specifically needs `< 1.0.0-beta.52` excluded** — every
254
+ arbitrary `text-[…]` value, including a plain `text-[10px]`, silently
255
+ resolved nothing at all on native/Expo Go before that version (see §13).
256
+
223
257
  ## 8. Dynamic tokens (native counterpart to CSS custom properties)
224
258
 
225
259
  ```tsx
@@ -359,3 +393,13 @@ Subpath exports: `@kbach/react-native/babel-plugin`,
359
393
  React Native Fast Refresh race. `setTheme` is idempotent by content
360
394
  since beta.51 (compares against the theme's own JSON serialization
361
395
  before replacing it); update.
396
+ - **`text-[10px]` (or any other arbitrary `text-[…]` value) does nothing
397
+ on native or Expo Go** — stale `@kbach/react-native` (`< 1.0.0-beta.52`).
398
+ The native dispatcher's `resolve_text_native` (`resolvers/mod.rs`) never
399
+ got the arbitrary-value length check `color::resolve_text` (web) already
400
+ had — an arbitrary value skipped the font-size/align lookup entirely and
401
+ fell straight through to color resolution, which correctly rejected
402
+ "10px" as not a real color and silently dropped the whole declaration.
403
+ Fixed identically in both the Rust native dispatcher and its Expo Go JS-
404
+ fallback mirror (`jsEngine/resolveUtilityNative.ts`) in beta.52; update.
405
+ Web (including Expo Web) was never affected.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTheme
3
- } from "./chunk-IJAXJVB4.mjs";
3
+ } from "./chunk-Z5Q3FGXR.mjs";
4
4
 
5
5
  // src/darkModeStore.ts
6
6
  import { Appearance } from "react-native";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveClassName
3
- } from "./chunk-IJAXJVB4.mjs";
3
+ } from "./chunk-Z5Q3FGXR.mjs";
4
4
 
5
5
  // src/jsxRuntimeCoreWeb.ts
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";