@webstudio-is/css-engine 0.179.0 → 0.181.0
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/lib/index.js +3 -4
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -156,12 +156,11 @@ import { captureError } from "@webstudio-is/error-utils";
|
|
|
156
156
|
import { DEFAULT_FONT_FALLBACK, SYSTEM_FONTS } from "@webstudio-is/fonts";
|
|
157
157
|
var fallbackTransform = (styleValue) => {
|
|
158
158
|
if (styleValue.type === "fontFamily") {
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
const fallbacks = SYSTEM_FONTS.get(firstFontFamily) ?? [
|
|
159
|
+
const fonts = SYSTEM_FONTS.get(styleValue.value[0])?.stack ?? [
|
|
160
|
+
styleValue.value[0],
|
|
162
161
|
DEFAULT_FONT_FALLBACK
|
|
163
162
|
];
|
|
164
|
-
const value = Array.from(
|
|
163
|
+
const value = Array.from(new Set(fonts));
|
|
165
164
|
return {
|
|
166
165
|
type: "fontFamily",
|
|
167
166
|
value
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/css-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.181.0",
|
|
4
4
|
"description": "CSS Renderer for Webstudio",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@emotion/hash": "^0.9.1",
|
|
10
10
|
"zod": "^3.22.4",
|
|
11
|
-
"@webstudio-is/
|
|
12
|
-
"@webstudio-is/
|
|
11
|
+
"@webstudio-is/fonts": "0.181.0",
|
|
12
|
+
"@webstudio-is/error-utils": "0.181.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@jest/globals": "^29.7.0",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
19
19
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
20
20
|
"typescript": "5.5.2",
|
|
21
|
-
"@webstudio-is/
|
|
22
|
-
"@webstudio-is/
|
|
21
|
+
"@webstudio-is/jest-config": "1.0.7",
|
|
22
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
"webstudio": "./src/index.ts",
|