@webmate-studio/builder 0.2.46 → 0.2.48
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/package.json +3 -3
- package/src/tailwind-generator.js +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webmate-studio/builder",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.48",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Webmate Studio Component Builder",
|
|
6
6
|
"keywords": [
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@webmate-studio/core": "^0.2.
|
|
36
|
-
"@webmate-studio/parser": "^0.2.
|
|
35
|
+
"@webmate-studio/core": "^0.2.7",
|
|
36
|
+
"@webmate-studio/parser": "^0.2.8",
|
|
37
37
|
"dom-serializer": "^2.0.0",
|
|
38
38
|
"esbuild": "^0.19.0",
|
|
39
39
|
"esbuild-svelte": "^0.9.3",
|
|
@@ -143,6 +143,19 @@ function generateThemeCSS(colors, designTokens = null) {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
// Add font families if provided in design tokens
|
|
147
|
+
// Support both structures:
|
|
148
|
+
// 1. designTokens.fontFamily.{heading, body, mono}
|
|
149
|
+
// 2. designTokens.typography.fontFamily.{heading, body, mono}
|
|
150
|
+
const fontFamilies = designTokens?.fontFamily || designTokens?.typography?.fontFamily;
|
|
151
|
+
if (fontFamilies) {
|
|
152
|
+
for (const [key, value] of Object.entries(fontFamilies)) {
|
|
153
|
+
// value can be a string or an array
|
|
154
|
+
const fontValue = Array.isArray(value) ? value.join(', ') : value;
|
|
155
|
+
themeCSS += ` --font-${key}: ${fontValue};\n`;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
146
159
|
themeCSS += `}\n`;
|
|
147
160
|
|
|
148
161
|
return themeCSS;
|