tailwind-styled-v4 5.1.4 → 5.1.6
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.mjs
CHANGED
|
@@ -1208,10 +1208,26 @@ function injectTokensToRoot(tokens, prefix) {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
function _buildTokenCss(tokens, prefix) {
|
|
1210
1210
|
const binding = getNativeBinding();
|
|
1211
|
-
if (
|
|
1212
|
-
|
|
1211
|
+
if (binding?.generateSystemTokenCss) {
|
|
1212
|
+
return binding.generateSystemTokenCss(JSON.stringify(tokens), prefix);
|
|
1213
|
+
}
|
|
1214
|
+
return _buildTokenCssJs(tokens, prefix);
|
|
1215
|
+
}
|
|
1216
|
+
function _buildTokenCssJs(tokens, prefix) {
|
|
1217
|
+
const groupKeys = Object.keys(tokens);
|
|
1218
|
+
if (groupKeys.length === 0) return ":root {}\n";
|
|
1219
|
+
const lines = [":root {"];
|
|
1220
|
+
for (const group of groupKeys.slice().sort()) {
|
|
1221
|
+
const map = tokens[group];
|
|
1222
|
+
if (!map || typeof map !== "object" || Object.keys(map).length === 0) continue;
|
|
1223
|
+
for (const name of Object.keys(map).sort()) {
|
|
1224
|
+
const value = map[name];
|
|
1225
|
+
if (typeof value !== "string") continue;
|
|
1226
|
+
lines.push(` --${prefix}-${group}-${name}: ${value};`);
|
|
1227
|
+
}
|
|
1213
1228
|
}
|
|
1214
|
-
|
|
1229
|
+
lines.push("}");
|
|
1230
|
+
return lines.join("\n") + "\n";
|
|
1215
1231
|
}
|
|
1216
1232
|
function resolveComponentConfig(config, tokens, prefix) {
|
|
1217
1233
|
const resolveStr = (s) => resolveTokenRef(tokens, prefix, s);
|