@webstudio-is/css-engine 0.175.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.
Files changed (2) hide show
  1. package/lib/index.js +3 -4
  2. package/package.json +3 -3
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 firstFontFamily = styleValue.value[0];
160
- const fontFamily = styleValue.value;
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(/* @__PURE__ */ new Set([...fontFamily, ...fallbacks]));
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.175.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/fonts": "0.175.0",
12
- "@webstudio-is/error-utils": "0.175.0"
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",