@kbach/react 0.5.32 → 0.5.34
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/README.md +13 -1
- package/dist/{chunk-X6FH5QTD.mjs → chunk-6AUSWRH2.mjs} +1 -1
- package/dist/{chunk-VZD4672I.mjs → chunk-LMCUZ3HI.mjs} +2 -2
- package/dist/{chunk-SOBLKZGE.mjs → chunk-T3SOZ6AO.mjs} +454 -434
- package/dist/index.js +450 -434
- package/dist/index.mjs +2 -2
- package/dist/jsx-dev-runtime.js +450 -434
- package/dist/jsx-dev-runtime.mjs +3 -3
- package/dist/jsx-runtime.js +450 -434
- package/dist/jsx-runtime.mjs +3 -3
- package/dist/vite-plugin.js +483 -493
- package/dist/vite-plugin.mjs +21 -49
- package/kbach-react.md +778 -0
- package/package.json +2 -2
- package/KBACH.md +0 -952
package/README.md
CHANGED
|
@@ -40,12 +40,18 @@ npm install @kbach/react
|
|
|
40
40
|
// vite.config.ts
|
|
41
41
|
import { defineConfig } from 'vite';
|
|
42
42
|
import react from '@vitejs/plugin-react';
|
|
43
|
+
import { kbach } from '@kbach/react/vite';
|
|
43
44
|
|
|
44
45
|
export default defineConfig({
|
|
45
|
-
plugins: [
|
|
46
|
+
plugins: [
|
|
47
|
+
react({ jsxImportSource: '@kbach/react' }),
|
|
48
|
+
kbach(), // generates app.css on every HMR event
|
|
49
|
+
],
|
|
46
50
|
});
|
|
47
51
|
```
|
|
48
52
|
|
|
53
|
+
The `kbach()` Vite plugin scans your source files and writes generated CSS between `/* kbach:start */` / `/* kbach:end */` markers in your main CSS file (`src/index.css`, `app/app.css`, etc.). It rescans fresh on every HMR event so removed classes are immediately evicted.
|
|
54
|
+
|
|
49
55
|
**Babel**
|
|
50
56
|
|
|
51
57
|
```js
|
|
@@ -430,3 +436,9 @@ const Heading = styled(Text, 'font-sans-bold text-2xl');
|
|
|
430
436
|
<Body>Regular text</Body>
|
|
431
437
|
<Heading>Title</Heading>
|
|
432
438
|
```
|
|
439
|
+
|
|
440
|
+
## Full reference
|
|
441
|
+
|
|
442
|
+
See [kbach-react.md](./kbach-react.md) for the complete utility reference, all modifiers, configuration options, and common patterns.
|
|
443
|
+
|
|
444
|
+
For React Native / Expo, see the [`@kbach/native`](https://www.npmjs.com/package/@kbach/native) package.
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
InteractiveWrapper,
|
|
4
4
|
useConditionalWidth,
|
|
5
5
|
useGlobalDarkMode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6AUSWRH2.mjs";
|
|
7
7
|
import {
|
|
8
8
|
flatten,
|
|
9
9
|
getActiveBreakpoints,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getDefaultFontFamily,
|
|
12
12
|
isWeb,
|
|
13
13
|
resolve
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-T3SOZ6AO.mjs";
|
|
15
15
|
|
|
16
16
|
// src/jsx-runtime.tsx
|
|
17
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|