@kbach/react 0.5.33 → 0.5.35
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-VZD4672I.mjs → chunk-65BTN2UR.mjs} +2 -2
- package/dist/{chunk-X6FH5QTD.mjs → chunk-VRYE5CAE.mjs} +1 -1
- package/dist/{chunk-SOBLKZGE.mjs → chunk-YU55J6F6.mjs} +477 -437
- package/dist/index.js +472 -437
- package/dist/index.mjs +2 -2
- package/dist/jsx-dev-runtime.js +472 -437
- package/dist/jsx-dev-runtime.mjs +3 -3
- package/dist/jsx-runtime.js +472 -437
- package/dist/jsx-runtime.mjs +3 -3
- package/dist/vite-plugin.js +489 -450
- package/dist/vite-plugin.mjs +6 -3
- package/kbach-react.md +778 -0
- package/package.json +2 -2
- package/KBACH.md +0 -952
package/dist/vite-plugin.mjs
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildConfig,
|
|
3
|
-
generateClassCSS
|
|
4
|
-
|
|
3
|
+
generateClassCSS,
|
|
4
|
+
setCSSGenMode,
|
|
5
|
+
splitClassTokens
|
|
6
|
+
} from "./chunk-YU55J6F6.mjs";
|
|
5
7
|
|
|
6
8
|
// src/vite-plugin.ts
|
|
7
9
|
import { readFileSync, writeFileSync, existsSync, readdirSync, statSync } from "fs";
|
|
8
10
|
import { join } from "path";
|
|
11
|
+
setCSSGenMode(true);
|
|
9
12
|
var KBACH_START = "/* kbach:start */";
|
|
10
13
|
var KBACH_END = "/* kbach:end */";
|
|
11
14
|
var GROUPS = [
|
|
@@ -148,7 +151,7 @@ function kbach(userConfig) {
|
|
|
148
151
|
for (const dir of ["src", "app", "pages", "components", "views", "layouts"]) {
|
|
149
152
|
scanDir(join(root, dir), (code) => {
|
|
150
153
|
for (const cls of extractClassStrings(code))
|
|
151
|
-
for (const token of cls
|
|
154
|
+
for (const token of splitClassTokens(cls))
|
|
152
155
|
if (!tokenCSS.has(token)) {
|
|
153
156
|
const css = generateClassCSS(token, cfg.theme, cfg.darkMode, screens);
|
|
154
157
|
tokenCSS.set(token, css);
|