@webstudio-is/fonts 0.181.0 → 0.185.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 CHANGED
@@ -375,6 +375,12 @@ var fontWeights = {
375
375
  names: ["black", "heavy"]
376
376
  }
377
377
  };
378
+ var fontWeightNames = new Map(
379
+ Object.keys(fontWeights).map((weight) => {
380
+ const weightData = fontWeights[weight];
381
+ return weightData.names.map((name) => [name, weight]);
382
+ }).flat()
383
+ );
378
384
  export {
379
385
  DEFAULT_FONT_FALLBACK,
380
386
  FONT_FORMATS,
@@ -384,6 +390,7 @@ export {
384
390
  FontMeta,
385
391
  FontMetaStatic,
386
392
  SYSTEM_FONTS,
393
+ fontWeightNames,
387
394
  fontWeights,
388
395
  getFontFaces
389
396
  };
@@ -36,4 +36,5 @@ export declare const fontWeights: {
36
36
  readonly names: readonly ["black", "heavy"];
37
37
  };
38
38
  };
39
+ export declare const fontWeightNames: Map<string, "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900">;
39
40
  export type FontWeight = keyof typeof fontWeights;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/fonts",
3
- "version": "0.181.0",
3
+ "version": "0.185.0",
4
4
  "description": "Fonts utils",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",