@webstudio-is/fonts 0.274.5 → 0.276.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
@@ -316,7 +316,7 @@ var axisName = z.enum([
316
316
  "YTDE",
317
317
  "YTFI"
318
318
  ]);
319
- var variationAxes = z.record(
319
+ var variationAxes = z.partialRecord(
320
320
  axisName,
321
321
  z.object({
322
322
  name: z.string(),
@@ -1,83 +1,69 @@
1
1
  import { z } from "zod";
2
- export declare const fontFormat: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">]>;
2
+ export declare const fontFormat: z.ZodUnion<readonly [z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">]>;
3
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<{
4
+ declare const variationAxes: z.ZodRecord<z.ZodEnum<{
5
+ GRAD: "GRAD";
6
+ XOPQ: "XOPQ";
7
+ XTRA: "XTRA";
8
+ YOPQ: "YOPQ";
9
+ YTAS: "YTAS";
10
+ YTDE: "YTDE";
11
+ YTFI: "YTFI";
12
+ YTLC: "YTLC";
13
+ YTUC: "YTUC";
14
+ ital: "ital";
15
+ opsz: "opsz";
16
+ slnt: "slnt";
17
+ wdth: "wdth";
18
+ wght: "wght";
19
+ }> & z.core.$partial, z.ZodObject<{
5
20
  name: z.ZodString;
6
21
  min: z.ZodNumber;
7
22
  default: z.ZodNumber;
8
23
  max: z.ZodNumber;
9
- }, "strip", z.ZodTypeAny, {
10
- name: string;
11
- min: number;
12
- default: number;
13
- max: number;
14
- }, {
15
- name: string;
16
- min: number;
17
- default: number;
18
- max: number;
19
- }>>;
24
+ }, z.core.$strip>>;
20
25
  export type VariationAxes = z.infer<typeof variationAxes>;
21
26
  export declare const fontMetaStatic: z.ZodObject<{
22
27
  family: z.ZodString;
23
- style: z.ZodEnum<["normal", "italic", "oblique"]>;
28
+ style: z.ZodEnum<{
29
+ italic: "italic";
30
+ normal: "normal";
31
+ oblique: "oblique";
32
+ }>;
24
33
  weight: z.ZodNumber;
25
- }, "strip", z.ZodTypeAny, {
26
- family: string;
27
- style: "normal" | "italic" | "oblique";
28
- weight: number;
29
- }, {
30
- family: string;
31
- style: "normal" | "italic" | "oblique";
32
- weight: number;
33
- }>;
34
+ }, z.core.$strip>;
34
35
  export type FontMetaStatic = z.infer<typeof fontMetaStatic>;
35
- export declare const fontMeta: z.ZodUnion<[z.ZodObject<{
36
+ export declare const fontMeta: z.ZodUnion<readonly [z.ZodObject<{
36
37
  family: z.ZodString;
37
- style: z.ZodEnum<["normal", "italic", "oblique"]>;
38
+ style: z.ZodEnum<{
39
+ italic: "italic";
40
+ normal: "normal";
41
+ oblique: "oblique";
42
+ }>;
38
43
  weight: z.ZodNumber;
39
- }, "strip", z.ZodTypeAny, {
40
- family: string;
41
- style: "normal" | "italic" | "oblique";
42
- weight: number;
43
- }, {
44
- family: string;
45
- style: "normal" | "italic" | "oblique";
46
- weight: number;
47
- }>, z.ZodObject<{
44
+ }, z.core.$strip>, z.ZodObject<{
48
45
  family: z.ZodString;
49
- variationAxes: z.ZodRecord<z.ZodEnum<["wght", "wdth", "slnt", "opsz", "ital", "GRAD", "XTRA", "XOPQ", "YOPQ", "YTLC", "YTUC", "YTAS", "YTDE", "YTFI"]>, z.ZodObject<{
46
+ variationAxes: z.ZodRecord<z.ZodEnum<{
47
+ GRAD: "GRAD";
48
+ XOPQ: "XOPQ";
49
+ XTRA: "XTRA";
50
+ YOPQ: "YOPQ";
51
+ YTAS: "YTAS";
52
+ YTDE: "YTDE";
53
+ YTFI: "YTFI";
54
+ YTLC: "YTLC";
55
+ YTUC: "YTUC";
56
+ ital: "ital";
57
+ opsz: "opsz";
58
+ slnt: "slnt";
59
+ wdth: "wdth";
60
+ wght: "wght";
61
+ }> & z.core.$partial, z.ZodObject<{
50
62
  name: z.ZodString;
51
63
  min: z.ZodNumber;
52
64
  default: z.ZodNumber;
53
65
  max: z.ZodNumber;
54
- }, "strip", z.ZodTypeAny, {
55
- name: string;
56
- min: number;
57
- default: number;
58
- max: number;
59
- }, {
60
- name: string;
61
- min: number;
62
- default: number;
63
- max: number;
64
- }>>;
65
- }, "strip", z.ZodTypeAny, {
66
- family: string;
67
- variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
68
- name: string;
69
- min: number;
70
- default: number;
71
- max: number;
72
- }>>;
73
- }, {
74
- family: string;
75
- variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
76
- name: string;
77
- min: number;
78
- default: number;
79
- max: number;
80
- }>>;
81
- }>]>;
66
+ }, z.core.$strip>>;
67
+ }, z.core.$strip>]>;
82
68
  export type FontMeta = z.infer<typeof fontMeta>;
83
69
  export {};
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@webstudio-is/fonts",
3
- "version": "0.274.5",
3
+ "version": "0.276.0",
4
4
  "description": "Fonts utils",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
7
7
  "type": "module",
8
8
  "devDependencies": {
9
9
  "vitest": "^3.1.2",
10
- "zod": "^3.24.2",
10
+ "zod": "^4.4.3",
11
11
  "@webstudio-is/tsconfig": "1.0.7"
12
12
  },
13
13
  "peerDependencies": {
14
- "zod": "^3.19.1"
14
+ "zod": "^4.4.3"
15
15
  },
16
16
  "exports": {
17
17
  "webstudio": "./src/index.ts",
@@ -26,7 +26,7 @@
26
26
  "private": false,
27
27
  "sideEffects": false,
28
28
  "scripts": {
29
- "typecheck": "tsgo --noEmit",
29
+ "typecheck": "tsc --noEmit",
30
30
  "test": "vitest run",
31
31
  "build": "rm -rf lib && esbuild src/index.ts --outdir=lib --bundle --format=esm --packages=external",
32
32
  "dts": "tsc --project tsconfig.dts.json"