@webstudio-is/fonts 0.271.0 → 0.273.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
@@ -295,12 +295,12 @@ var getFontFaces = (assets, options) => {
295
295
 
296
296
  // src/schema.ts
297
297
  import { z } from "zod";
298
- var FontFormat = z.union([
298
+ var fontFormat = z.union([
299
299
  z.literal("ttf"),
300
300
  z.literal("woff"),
301
301
  z.literal("woff2")
302
302
  ]);
303
- var AxisName = z.enum([
303
+ var axisName = z.enum([
304
304
  "wght",
305
305
  "wdth",
306
306
  "slnt",
@@ -316,8 +316,8 @@ var AxisName = z.enum([
316
316
  "YTDE",
317
317
  "YTFI"
318
318
  ]);
319
- var VariationAxes = z.record(
320
- AxisName,
319
+ var variationAxes = z.record(
320
+ axisName,
321
321
  z.object({
322
322
  name: z.string(),
323
323
  min: z.number(),
@@ -325,16 +325,16 @@ var VariationAxes = z.record(
325
325
  max: z.number()
326
326
  })
327
327
  );
328
- var FontMetaStatic = z.object({
328
+ var fontMetaStatic = z.object({
329
329
  family: z.string(),
330
330
  style: z.enum(FONT_STYLES),
331
331
  weight: z.number()
332
332
  });
333
- var FontMetaVariable = z.object({
333
+ var fontMetaVariable = z.object({
334
334
  family: z.string(),
335
- variationAxes: VariationAxes
335
+ variationAxes
336
336
  });
337
- var FontMeta = z.union([FontMetaStatic, FontMetaVariable]);
337
+ var fontMeta = z.union([fontMetaStatic, fontMetaVariable]);
338
338
 
339
339
  // src/font-weights.ts
340
340
  var fontWeights = {
@@ -386,10 +386,10 @@ export {
386
386
  FONT_FORMATS,
387
387
  FONT_MIME_TYPES,
388
388
  FONT_STYLES,
389
- FontFormat,
390
- FontMeta,
391
- FontMetaStatic,
392
389
  SYSTEM_FONTS,
390
+ fontFormat,
391
+ fontMeta,
392
+ fontMetaStatic,
393
393
  fontWeightNames,
394
394
  fontWeights,
395
395
  getFontFaces
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
- export declare const FontFormat: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">]>;
3
- export type FontFormat = z.infer<typeof FontFormat>;
4
- declare const VariationAxes: z.ZodRecord<z.ZodEnum<["wght", "wdth", "slnt", "opsz", "ital", "GRAD", "XTRA", "XOPQ", "YOPQ", "YTLC", "YTUC", "YTAS", "YTDE", "YTFI"]>, z.ZodObject<{
2
+ export declare const fontFormat: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">]>;
3
+ export type FontFormat = z.infer<typeof fontFormat>;
4
+ declare const variationAxes: z.ZodRecord<z.ZodEnum<["wght", "wdth", "slnt", "opsz", "ital", "GRAD", "XTRA", "XOPQ", "YOPQ", "YTLC", "YTUC", "YTAS", "YTDE", "YTFI"]>, z.ZodObject<{
5
5
  name: z.ZodString;
6
6
  min: z.ZodNumber;
7
7
  default: z.ZodNumber;
@@ -17,8 +17,8 @@ declare const VariationAxes: z.ZodRecord<z.ZodEnum<["wght", "wdth", "slnt", "ops
17
17
  default: number;
18
18
  max: number;
19
19
  }>>;
20
- export type VariationAxes = z.infer<typeof VariationAxes>;
21
- export declare const FontMetaStatic: z.ZodObject<{
20
+ export type VariationAxes = z.infer<typeof variationAxes>;
21
+ export declare const fontMetaStatic: z.ZodObject<{
22
22
  family: z.ZodString;
23
23
  style: z.ZodEnum<["normal", "italic", "oblique"]>;
24
24
  weight: z.ZodNumber;
@@ -31,8 +31,8 @@ export declare const FontMetaStatic: z.ZodObject<{
31
31
  style: "normal" | "italic" | "oblique";
32
32
  weight: number;
33
33
  }>;
34
- export type FontMetaStatic = z.infer<typeof FontMetaStatic>;
35
- export declare const FontMeta: z.ZodUnion<[z.ZodObject<{
34
+ export type FontMetaStatic = z.infer<typeof fontMetaStatic>;
35
+ export declare const fontMeta: z.ZodUnion<[z.ZodObject<{
36
36
  family: z.ZodString;
37
37
  style: z.ZodEnum<["normal", "italic", "oblique"]>;
38
38
  weight: z.ZodNumber;
@@ -79,5 +79,5 @@ export declare const FontMeta: z.ZodUnion<[z.ZodObject<{
79
79
  max: number;
80
80
  }>>;
81
81
  }>]>;
82
- export type FontMeta = z.infer<typeof FontMeta>;
82
+ export type FontMeta = z.infer<typeof fontMeta>;
83
83
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/fonts",
3
- "version": "0.271.0",
3
+ "version": "0.273.0",
4
4
  "description": "Fonts utils",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",