tailwind-styled-v4 5.1.5 → 5.1.7
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/dist/analyzer.js +59 -3
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +59 -3
- package/dist/analyzer.mjs.map +1 -1
- package/dist/cli.js +59 -3
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +59 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/engine.js +59 -3
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +59 -3
- package/dist/engine.mjs.map +1 -1
- package/dist/index.browser.mjs +19 -3
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -3
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +59 -2
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +59 -2
- package/dist/next.mjs.map +1 -1
- package/dist/scanner.js +59 -2
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +59 -2
- package/dist/scanner.mjs.map +1 -1
- package/dist/tw.js +59 -3
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +59 -3
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +59 -3
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +59 -3
- package/dist/vite.mjs.map +1 -1
- package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
- package/native/tailwind-styled-native.node +0 -0
- package/package.json +1 -1
package/dist/index.browser.mjs
CHANGED
|
@@ -1008,10 +1008,26 @@ function injectTokensToRoot(tokens, prefix) {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
function _buildTokenCss(tokens, prefix) {
|
|
1010
1010
|
const binding = getNativeBinding();
|
|
1011
|
-
if (
|
|
1012
|
-
|
|
1011
|
+
if (binding?.generateSystemTokenCss) {
|
|
1012
|
+
return binding.generateSystemTokenCss(JSON.stringify(tokens), prefix);
|
|
1013
1013
|
}
|
|
1014
|
-
return
|
|
1014
|
+
return _buildTokenCssJs(tokens, prefix);
|
|
1015
|
+
}
|
|
1016
|
+
function _buildTokenCssJs(tokens, prefix) {
|
|
1017
|
+
const groupKeys = Object.keys(tokens);
|
|
1018
|
+
if (groupKeys.length === 0) return ":root {}\n";
|
|
1019
|
+
const lines = [":root {"];
|
|
1020
|
+
for (const group of groupKeys.slice().sort()) {
|
|
1021
|
+
const map = tokens[group];
|
|
1022
|
+
if (!map || typeof map !== "object" || Object.keys(map).length === 0) continue;
|
|
1023
|
+
for (const name of Object.keys(map).sort()) {
|
|
1024
|
+
const value = map[name];
|
|
1025
|
+
if (typeof value !== "string") continue;
|
|
1026
|
+
lines.push(` --${prefix}-${group}-${name}: ${value};`);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
lines.push("}");
|
|
1030
|
+
return lines.join("\n") + "\n";
|
|
1015
1031
|
}
|
|
1016
1032
|
function resolveComponentConfig(config, tokens, prefix) {
|
|
1017
1033
|
const resolveStr = (s) => resolveTokenRef(tokens, prefix, s);
|