@kbach/react-native 1.1.1-beta.0 → 1.1.1-beta.2

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.
@@ -2,8 +2,8 @@ import {
2
2
  Fragment,
3
3
  jsx,
4
4
  jsxs
5
- } from "./chunk-6F44N62F.mjs";
6
- import "./chunk-R7E5D3D6.mjs";
5
+ } from "./chunk-VMI2JVCQ.mjs";
6
+ import "./chunk-TCSCNQQ7.mjs";
7
7
  export {
8
8
  Fragment,
9
9
  jsx,
@@ -23,6 +23,13 @@ import { PressableProps, TextProps } from 'react-native';
23
23
  */
24
24
  interface KbachConfig {
25
25
  darkMode?: ThemeConfig['darkMode'];
26
+ /**
27
+ * Named class bundles (2026-11-29): `{ btn: 'px-4 py-2 rounded-lg', 'btn-primary': 'btn bg-blue-6
28
+ * active:(opacity-75)' }`, then `className="btn-primary"`. Same as @kbach/react's `compose`: a
29
+ * value is a class string (or an array of them) and can use variant groups and other names; a
30
+ * name takes variants and `!` (`md:btn`). The element's own classes win over a name's in a tie.
31
+ */
32
+ compose?: Record<string, string | string[]>;
26
33
  /**
27
34
  * REPLACES the named section of `defaultTheme` entirely — use `extend` to
28
35
  * add instead of replace. `container` isn't here (only under `extend`
package/dist/theme.d.ts CHANGED
@@ -44,6 +44,8 @@ interface ThemeConfig {
44
44
  darkMode: 'attribute' | 'class' | 'media';
45
45
  /** Optional, matching `ContainerConfig`'s own `#[serde(default)]` on the Rust side. */
46
46
  container?: ContainerConfig;
47
+ /** Named class bundles (`kbach.config.js`'s `compose`): name -> the classes it stands for (core-engine's compose.rs, jsEngine/compose.ts). */
48
+ compose?: Record<string, string>;
47
49
  }
48
50
  declare const defaultTheme: ThemeConfig;
49
51
  /**
package/llms.txt CHANGED
@@ -17,10 +17,15 @@ Kbach rules. Follow them in every class you write.
17
17
  steps of 4px (p-4 is 16px), variants such as hover:, md: and dark:,
18
18
  values in square brackets, a slash for opacity (bg-black/50).
19
19
  Gradients: bg-linear-to-r from-* via-* to-*.
20
+ Write a variant once for several classes: hover:(bg-blue-7 shadow-lg)
21
+ is hover:bg-blue-7 hover:shadow-lg. Groups nest: md:(p-8 hover:(p-10)).
20
22
  4. There is no tailwind.config.js, no @tailwind, no @import "tailwindcss",
21
23
  no @theme and no @apply. Settings go in kbach.config.js
22
- (export default { darkMode, theme, extend }). Custom animations go in
23
- extend.keyframes and extend.animation and are used as animate-<name>.
24
+ (export default { darkMode, theme, extend, compose }). Custom animations
25
+ go in extend.keyframes and extend.animation and are used as
26
+ animate-<name>. To reuse a set of classes, name it in compose:
27
+ { btn: 'px-4 py-2 rounded-lg hover:(bg-blue-7)' } and write className="btn"
28
+ (md:btn works too; the element's own classes win over btn's).
24
29
  5. Plain HTML page: put <script>window.kbachConfig = { ... }</script> BEFORE
25
30
  <script src="https://cdn.jsdelivr.net/npm/@kbach/browser"></script>.
26
31
  A theme button calls Kbach.toggle() and needs darkMode: 'class' or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react-native",
3
- "version": "1.1.1-beta.0",
3
+ "version": "1.1.1-beta.2",
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",