@kbach/react-native 1.0.0 → 1.1.1-beta.0
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 +9 -0
- package/README.md +8 -0
- 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-HYQFT32E.mjs → chunk-6F44N62F.mjs} +1 -1
- package/dist/{chunk-7CNURQSH.mjs → chunk-FSO4WVCH.mjs} +1 -1
- package/dist/chunk-R7E5D3D6.mjs +623 -0
- package/dist/index.js +68 -0
- package/dist/index.web.js +1 -1
- package/dist/index.web.mjs +2 -2
- package/dist/jsx-dev-runtime.js +68 -0
- package/dist/jsx-dev-runtime.web.js +1 -1
- package/dist/jsx-dev-runtime.web.mjs +3 -3
- package/dist/jsx-runtime.js +68 -0
- package/dist/jsx-runtime.web.js +1 -1
- package/dist/jsx-runtime.web.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-MUPEQJRT.mjs +0 -623
package/AGENTS.md
CHANGED
|
@@ -124,6 +124,15 @@ engines does the work, chosen automatically:
|
|
|
124
124
|
Resolution is memoized per `(classString, pressed, colorScheme, width,
|
|
125
125
|
theme)`.
|
|
126
126
|
|
|
127
|
+
**Variant groups (1.1.1-beta.0):** `className="flex active:(bg-blue-6 opacity-50)"`
|
|
128
|
+
resolves as `active:bg-blue-6 active:opacity-50`, with no build step: every
|
|
129
|
+
engine expands groups before resolving (Rust's `groups.rs` on Android and Expo
|
|
130
|
+
Web; `src/jsEngine/groups.ts` on Expo Go / iOS, a port held to the same cases
|
|
131
|
+
as the Rust one by `groups.test.ts`, which reads
|
|
132
|
+
`core-engine/tests/variant-groups.json`; `jsEngine/parity.test.ts` compares the
|
|
133
|
+
two engines on grouped strings, light and dark, pressed or not). Root
|
|
134
|
+
AGENTS.md §8.2 has the syntax.
|
|
135
|
+
|
|
127
136
|
## 4. Modifiers on native
|
|
128
137
|
|
|
129
138
|
Native has no selector/cascade engine. Two groups:
|
package/README.md
CHANGED
|
@@ -161,6 +161,14 @@ import { Button, H1, Paragraph } from '@kbach/react-native';
|
|
|
161
161
|
<Button className="px-4 py-2 rounded bg-blue-6" onPress={...}>Save</Button>
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
+
## Variant groups
|
|
165
|
+
|
|
166
|
+
Write a variant once for several classes:
|
|
167
|
+
`className="flex active:(bg-blue-6 opacity-50)"` is
|
|
168
|
+
`active:bg-blue-6 active:opacity-50`. Groups nest (`dark:(p-4 active:p-2)`)
|
|
169
|
+
and need no setup: every engine expands them before resolving. This is Kbach's
|
|
170
|
+
own syntax, not Tailwind CSS's.
|
|
171
|
+
|
|
164
172
|
## What differs on native
|
|
165
173
|
|
|
166
174
|
React Native has no CSS cascade, so a fixed subset of modifiers is
|
|
Binary file
|
|
Binary file
|