@hyperframes/core 0.6.80 → 0.6.81
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/dist/fonts/aliases.d.ts +91 -0
- package/dist/fonts/aliases.d.ts.map +1 -0
- package/dist/fonts/aliases.js +122 -0
- package/dist/fonts/aliases.js.map +1 -0
- package/dist/fonts/systemFontLocator.d.ts +28 -0
- package/dist/fonts/systemFontLocator.d.ts.map +1 -0
- package/dist/fonts/systemFontLocator.js +367 -0
- package/dist/fonts/systemFontLocator.js.map +1 -0
- package/dist/lint/rules/fonts.d.ts.map +1 -1
- package/dist/lint/rules/fonts.js +38 -37
- package/dist/lint/rules/fonts.js.map +1 -1
- package/dist/lint/types.d.ts +8 -0
- package/dist/lint/types.d.ts.map +1 -1
- package/dist/registry/types.d.ts +1 -1
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/registry/types.js +3 -0
- package/dist/registry/types.js.map +1 -1
- package/dist/studio-api/routes/fonts.d.ts.map +1 -1
- package/dist/studio-api/routes/fonts.js +51 -88
- package/dist/studio-api/routes/fonts.js.map +1 -1
- package/dist/templates/constants.d.ts +1 -1
- package/dist/templates/constants.d.ts.map +1 -1
- package/dist/templates/constants.js +1 -1
- package/dist/templates/constants.js.map +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the deterministic font alias map. Both the
|
|
3
|
+
* producer's @font-face injector and the core lint rules import from here,
|
|
4
|
+
* eliminating manual drift between the two.
|
|
5
|
+
*
|
|
6
|
+
* Keys are lowercase font family names. Values are canonical font slugs
|
|
7
|
+
* matching CANONICAL_FONTS keys in the producer's deterministicFonts module.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FONT_ALIAS_MAP: {
|
|
10
|
+
inter: string;
|
|
11
|
+
montserrat: string;
|
|
12
|
+
outfit: string;
|
|
13
|
+
nunito: string;
|
|
14
|
+
oswald: string;
|
|
15
|
+
"league gothic": string;
|
|
16
|
+
"archivo black": string;
|
|
17
|
+
"space mono": string;
|
|
18
|
+
"ibm plex mono": string;
|
|
19
|
+
"jetbrains mono": string;
|
|
20
|
+
"eb garamond": string;
|
|
21
|
+
"playfair display": string;
|
|
22
|
+
"source code pro": string;
|
|
23
|
+
"noto sans jp": string;
|
|
24
|
+
roboto: string;
|
|
25
|
+
"open sans": string;
|
|
26
|
+
lato: string;
|
|
27
|
+
poppins: string;
|
|
28
|
+
"helvetica neue": string;
|
|
29
|
+
helvetica: string;
|
|
30
|
+
arial: string;
|
|
31
|
+
"helvetica bold": string;
|
|
32
|
+
futura: string;
|
|
33
|
+
"din alternate": string;
|
|
34
|
+
"arial black": string;
|
|
35
|
+
"bebas neue": string;
|
|
36
|
+
"courier new": string;
|
|
37
|
+
courier: string;
|
|
38
|
+
garamond: string;
|
|
39
|
+
"noto sans japanese": string;
|
|
40
|
+
"segoe ui": string;
|
|
41
|
+
"sf pro": string;
|
|
42
|
+
"sf pro display": string;
|
|
43
|
+
"sf pro text": string;
|
|
44
|
+
"sf pro rounded": string;
|
|
45
|
+
avenir: string;
|
|
46
|
+
"avenir next": string;
|
|
47
|
+
"lucida grande": string;
|
|
48
|
+
geneva: string;
|
|
49
|
+
optima: string;
|
|
50
|
+
verdana: string;
|
|
51
|
+
tahoma: string;
|
|
52
|
+
"trebuchet ms": string;
|
|
53
|
+
calibri: string;
|
|
54
|
+
candara: string;
|
|
55
|
+
corbel: string;
|
|
56
|
+
"lucida sans": string;
|
|
57
|
+
"lucida sans unicode": string;
|
|
58
|
+
"noto sans": string;
|
|
59
|
+
"dejavu sans": string;
|
|
60
|
+
"liberation sans": string;
|
|
61
|
+
"sf mono": string;
|
|
62
|
+
menlo: string;
|
|
63
|
+
monaco: string;
|
|
64
|
+
consolas: string;
|
|
65
|
+
"lucida console": string;
|
|
66
|
+
"lucida sans typewriter": string;
|
|
67
|
+
"andale mono": string;
|
|
68
|
+
"dejavu sans mono": string;
|
|
69
|
+
"liberation mono": string;
|
|
70
|
+
georgia: string;
|
|
71
|
+
palatino: string;
|
|
72
|
+
"palatino linotype": string;
|
|
73
|
+
"book antiqua": string;
|
|
74
|
+
cambria: string;
|
|
75
|
+
times: string;
|
|
76
|
+
"times new roman": string;
|
|
77
|
+
"dejavu serif": string;
|
|
78
|
+
"liberation serif": string;
|
|
79
|
+
};
|
|
80
|
+
export declare const FONT_ALIAS_KEYS: ReadonlySet<string>;
|
|
81
|
+
/**
|
|
82
|
+
* Human-readable display names for canonical font slugs. Used by the lint
|
|
83
|
+
* rule to tell authors what their aliased font will render as.
|
|
84
|
+
*/
|
|
85
|
+
export declare const CANONICAL_FONT_DISPLAY_NAMES: Readonly<Record<string, string>>;
|
|
86
|
+
/**
|
|
87
|
+
* Resolve a font alias to its canonical display name, or undefined if the
|
|
88
|
+
* alias is not in the map.
|
|
89
|
+
*/
|
|
90
|
+
export declare function resolveAliasDisplayName(alias: string): string | undefined;
|
|
91
|
+
//# sourceMappingURL=aliases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../src/fonts/aliases.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFiB,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAAwC,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmBzE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIzE"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the deterministic font alias map. Both the
|
|
3
|
+
* producer's @font-face injector and the core lint rules import from here,
|
|
4
|
+
* eliminating manual drift between the two.
|
|
5
|
+
*
|
|
6
|
+
* Keys are lowercase font family names. Values are canonical font slugs
|
|
7
|
+
* matching CANONICAL_FONTS keys in the producer's deterministicFonts module.
|
|
8
|
+
*/
|
|
9
|
+
export const FONT_ALIAS_MAP = {
|
|
10
|
+
// ── Canonical bundled fonts (self-referencing) ────────────────────────
|
|
11
|
+
inter: "inter",
|
|
12
|
+
montserrat: "montserrat",
|
|
13
|
+
outfit: "outfit",
|
|
14
|
+
nunito: "nunito",
|
|
15
|
+
oswald: "oswald",
|
|
16
|
+
"league gothic": "league-gothic",
|
|
17
|
+
"archivo black": "archivo-black",
|
|
18
|
+
"space mono": "space-mono",
|
|
19
|
+
"ibm plex mono": "ibm-plex-mono",
|
|
20
|
+
"jetbrains mono": "jetbrains-mono",
|
|
21
|
+
"eb garamond": "eb-garamond",
|
|
22
|
+
"playfair display": "playfair-display",
|
|
23
|
+
"source code pro": "source-code-pro",
|
|
24
|
+
"noto sans jp": "noto-sans-jp",
|
|
25
|
+
roboto: "roboto",
|
|
26
|
+
"open sans": "open-sans",
|
|
27
|
+
lato: "lato",
|
|
28
|
+
poppins: "poppins",
|
|
29
|
+
// ── Common aliases → nearest canonical ────────────────────────────────
|
|
30
|
+
"helvetica neue": "inter",
|
|
31
|
+
helvetica: "inter",
|
|
32
|
+
arial: "inter",
|
|
33
|
+
"helvetica bold": "inter",
|
|
34
|
+
futura: "montserrat",
|
|
35
|
+
"din alternate": "montserrat",
|
|
36
|
+
"arial black": "montserrat",
|
|
37
|
+
"bebas neue": "league-gothic",
|
|
38
|
+
"courier new": "jetbrains-mono",
|
|
39
|
+
courier: "jetbrains-mono",
|
|
40
|
+
garamond: "eb-garamond",
|
|
41
|
+
"noto sans japanese": "noto-sans-jp",
|
|
42
|
+
"segoe ui": "roboto",
|
|
43
|
+
// ── macOS sans-serif system fonts → inter ─────────────────────────────
|
|
44
|
+
"sf pro": "inter",
|
|
45
|
+
"sf pro display": "inter",
|
|
46
|
+
"sf pro text": "inter",
|
|
47
|
+
"sf pro rounded": "inter",
|
|
48
|
+
avenir: "inter",
|
|
49
|
+
"avenir next": "inter",
|
|
50
|
+
"lucida grande": "inter",
|
|
51
|
+
geneva: "inter",
|
|
52
|
+
optima: "inter",
|
|
53
|
+
// ── Windows sans-serif system fonts → inter ───────────────────────────
|
|
54
|
+
verdana: "inter",
|
|
55
|
+
tahoma: "inter",
|
|
56
|
+
"trebuchet ms": "inter",
|
|
57
|
+
calibri: "inter",
|
|
58
|
+
candara: "inter",
|
|
59
|
+
corbel: "inter",
|
|
60
|
+
"lucida sans": "inter",
|
|
61
|
+
"lucida sans unicode": "inter",
|
|
62
|
+
// ── Linux sans-serif system fonts → inter ─────────────────────────────
|
|
63
|
+
"noto sans": "inter",
|
|
64
|
+
"dejavu sans": "inter",
|
|
65
|
+
"liberation sans": "inter",
|
|
66
|
+
// ── Monospace system fonts → jetbrains-mono ───────────────────────────
|
|
67
|
+
"sf mono": "jetbrains-mono",
|
|
68
|
+
menlo: "jetbrains-mono",
|
|
69
|
+
monaco: "jetbrains-mono",
|
|
70
|
+
consolas: "jetbrains-mono",
|
|
71
|
+
"lucida console": "jetbrains-mono",
|
|
72
|
+
"lucida sans typewriter": "jetbrains-mono",
|
|
73
|
+
"andale mono": "jetbrains-mono",
|
|
74
|
+
"dejavu sans mono": "jetbrains-mono",
|
|
75
|
+
"liberation mono": "jetbrains-mono",
|
|
76
|
+
// ── Serif system fonts → eb-garamond ──────────────────────────────────
|
|
77
|
+
georgia: "eb-garamond",
|
|
78
|
+
palatino: "eb-garamond",
|
|
79
|
+
"palatino linotype": "eb-garamond",
|
|
80
|
+
"book antiqua": "eb-garamond",
|
|
81
|
+
cambria: "eb-garamond",
|
|
82
|
+
times: "eb-garamond",
|
|
83
|
+
"times new roman": "eb-garamond",
|
|
84
|
+
"dejavu serif": "eb-garamond",
|
|
85
|
+
"liberation serif": "eb-garamond",
|
|
86
|
+
};
|
|
87
|
+
export const FONT_ALIAS_KEYS = new Set(Object.keys(FONT_ALIAS_MAP));
|
|
88
|
+
/**
|
|
89
|
+
* Human-readable display names for canonical font slugs. Used by the lint
|
|
90
|
+
* rule to tell authors what their aliased font will render as.
|
|
91
|
+
*/
|
|
92
|
+
export const CANONICAL_FONT_DISPLAY_NAMES = {
|
|
93
|
+
inter: "Inter",
|
|
94
|
+
montserrat: "Montserrat",
|
|
95
|
+
outfit: "Outfit",
|
|
96
|
+
nunito: "Nunito",
|
|
97
|
+
oswald: "Oswald",
|
|
98
|
+
"league-gothic": "League Gothic",
|
|
99
|
+
"archivo-black": "Archivo Black",
|
|
100
|
+
"space-mono": "Space Mono",
|
|
101
|
+
"ibm-plex-mono": "IBM Plex Mono",
|
|
102
|
+
"jetbrains-mono": "JetBrains Mono",
|
|
103
|
+
"eb-garamond": "EB Garamond",
|
|
104
|
+
"playfair-display": "Playfair Display",
|
|
105
|
+
"source-code-pro": "Source Code Pro",
|
|
106
|
+
"noto-sans-jp": "Noto Sans JP",
|
|
107
|
+
roboto: "Roboto",
|
|
108
|
+
"open-sans": "Open Sans",
|
|
109
|
+
lato: "Lato",
|
|
110
|
+
poppins: "Poppins",
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Resolve a font alias to its canonical display name, or undefined if the
|
|
114
|
+
* alias is not in the map.
|
|
115
|
+
*/
|
|
116
|
+
export function resolveAliasDisplayName(alias) {
|
|
117
|
+
const slug = FONT_ALIAS_MAP[alias.toLowerCase()];
|
|
118
|
+
if (!slug)
|
|
119
|
+
return undefined;
|
|
120
|
+
return CANONICAL_FONT_DISPLAY_NAMES[slug];
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=aliases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../src/fonts/aliases.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,G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AM;IACZ,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAa;IACnD,MAAM,IAAI,GAAI,cAAyC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7E,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,OAAO,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const SYSTEM_FONT_SIZE_LIMIT: number;
|
|
2
|
+
export type FontFileFormat = "ttf" | "otf" | "woff2" | "woff" | "ttc";
|
|
3
|
+
export interface LocatedFont {
|
|
4
|
+
path: string;
|
|
5
|
+
format: FontFileFormat;
|
|
6
|
+
}
|
|
7
|
+
export declare const FONT_EXT_RE: RegExp;
|
|
8
|
+
export declare function toFamilyName(fileName: string): string | null;
|
|
9
|
+
export declare function fontDirectories(): string[];
|
|
10
|
+
export interface FontFileEntry {
|
|
11
|
+
path: string;
|
|
12
|
+
fileName: string;
|
|
13
|
+
family: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Iterates font files in a directory (up to `depth` 2) and yields each file's
|
|
17
|
+
* path, filename, and derived family name. Shared by the font listing route
|
|
18
|
+
* and the per-family locator to avoid duplicating the directory scan loop.
|
|
19
|
+
*/
|
|
20
|
+
export declare function collectFontFileEntries(dir: string, depth?: number): FontFileEntry[];
|
|
21
|
+
export declare function locateSystemFont(family: string): LocatedFont | null;
|
|
22
|
+
export interface LocatedFontVariant extends LocatedFont {
|
|
23
|
+
weight: string;
|
|
24
|
+
style: "normal" | "italic";
|
|
25
|
+
}
|
|
26
|
+
export declare function locateSystemFontVariants(family: string): LocatedFontVariant[];
|
|
27
|
+
export declare function clearSystemFontCache(): void;
|
|
28
|
+
//# sourceMappingURL=systemFontLocator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemFontLocator.d.ts","sourceRoot":"","sources":["../../src/fonts/systemFontLocator.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB,QAAkB,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAEtE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,QAA6B,CAAC;AA4FtD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAe5D;AAQD,wBAAgB,eAAe,IAAI,MAAM,EAAE,CA2B1C;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,aAAa,EAAE,CAqB9E;AAkHD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAyBnE;AAED,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC5B;AAkCD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,EAAE,CA0B7E;AAWD,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C"}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import { existsSync, lstatSync, readdirSync, realpathSync } from "node:fs";
|
|
3
|
+
import { homedir, platform } from "node:os";
|
|
4
|
+
import { join, resolve } from "node:path";
|
|
5
|
+
export const SYSTEM_FONT_SIZE_LIMIT = 5 * 1024 * 1024;
|
|
6
|
+
export const FONT_EXT_RE = /\.(otf|ttf|ttc|woff2?)$/i;
|
|
7
|
+
const FORMAT_PRIORITY = {
|
|
8
|
+
woff2: 0,
|
|
9
|
+
otf: 1,
|
|
10
|
+
ttf: 2,
|
|
11
|
+
woff: 3,
|
|
12
|
+
ttc: 4,
|
|
13
|
+
};
|
|
14
|
+
const STYLE_SUFFIXES = new Set([
|
|
15
|
+
"black",
|
|
16
|
+
"bold",
|
|
17
|
+
"book",
|
|
18
|
+
"condensed",
|
|
19
|
+
"demi",
|
|
20
|
+
"demibold",
|
|
21
|
+
"display",
|
|
22
|
+
"extra",
|
|
23
|
+
"extrabold",
|
|
24
|
+
"hairline",
|
|
25
|
+
"heavy",
|
|
26
|
+
"italic",
|
|
27
|
+
"light",
|
|
28
|
+
"medium",
|
|
29
|
+
"normal",
|
|
30
|
+
"regular",
|
|
31
|
+
"roman",
|
|
32
|
+
"semibold",
|
|
33
|
+
"thin",
|
|
34
|
+
"ultra",
|
|
35
|
+
"ultralight",
|
|
36
|
+
]);
|
|
37
|
+
const REGULAR_TOKENS = new Set(["regular", "roman", "normal", "book"]);
|
|
38
|
+
const cache = new Map();
|
|
39
|
+
let allowedDirsCache = null;
|
|
40
|
+
function getAllowedFontDirs() {
|
|
41
|
+
if (allowedDirsCache)
|
|
42
|
+
return allowedDirsCache;
|
|
43
|
+
allowedDirsCache = fontDirectories()
|
|
44
|
+
.filter((d) => existsSync(d))
|
|
45
|
+
.map((d) => {
|
|
46
|
+
try {
|
|
47
|
+
return realpathSync(d);
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return resolve(d);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return allowedDirsCache;
|
|
54
|
+
}
|
|
55
|
+
function isPathBounded(filePath) {
|
|
56
|
+
try {
|
|
57
|
+
const real = realpathSync(filePath);
|
|
58
|
+
const allowed = getAllowedFontDirs();
|
|
59
|
+
return allowed.some((dir) => real.startsWith(dir + "/") || real.startsWith(dir + "\\"));
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function isRegularFile(filePath) {
|
|
66
|
+
try {
|
|
67
|
+
const lst = lstatSync(filePath);
|
|
68
|
+
if (lst.isSymbolicLink())
|
|
69
|
+
return isPathBounded(filePath) && lstatSync(realpathSync(filePath)).isFile();
|
|
70
|
+
return lst.isFile();
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function normalizeName(name) {
|
|
77
|
+
return name
|
|
78
|
+
.trim()
|
|
79
|
+
.replace(/^['"]|['"]$/g, "")
|
|
80
|
+
.trim()
|
|
81
|
+
.toLowerCase();
|
|
82
|
+
}
|
|
83
|
+
function extensionToFormat(ext) {
|
|
84
|
+
const lower = ext.toLowerCase().replace(/^\./, "");
|
|
85
|
+
if (lower === "woff2")
|
|
86
|
+
return "woff2";
|
|
87
|
+
if (lower === "woff")
|
|
88
|
+
return "woff";
|
|
89
|
+
if (lower === "otf")
|
|
90
|
+
return "otf";
|
|
91
|
+
if (lower === "ttc")
|
|
92
|
+
return "ttc";
|
|
93
|
+
return "ttf";
|
|
94
|
+
}
|
|
95
|
+
export function toFamilyName(fileName) {
|
|
96
|
+
const withoutExt = fileName.replace(FONT_EXT_RE, "");
|
|
97
|
+
if (!withoutExt || withoutExt.startsWith("."))
|
|
98
|
+
return null;
|
|
99
|
+
const spaced = withoutExt
|
|
100
|
+
.replace(/[_-]+/g, " ")
|
|
101
|
+
.replace(/([a-z])([A-Z])/g, "$1 $2")
|
|
102
|
+
.replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2")
|
|
103
|
+
.replace(/\s+/g, " ")
|
|
104
|
+
.trim();
|
|
105
|
+
const words = spaced.split(" ").filter(Boolean);
|
|
106
|
+
while (words.length > 1 && STYLE_SUFFIXES.has((words.at(-1) ?? "").toLowerCase())) {
|
|
107
|
+
words.pop();
|
|
108
|
+
}
|
|
109
|
+
const family = words.join(" ").trim();
|
|
110
|
+
return family.length >= 2 ? family : null;
|
|
111
|
+
}
|
|
112
|
+
function isRegularWeight(fileName) {
|
|
113
|
+
const lower = fileName.toLowerCase();
|
|
114
|
+
if (REGULAR_TOKENS.has(lower.replace(FONT_EXT_RE, "").split(/[-_ ]/).pop() ?? ""))
|
|
115
|
+
return true;
|
|
116
|
+
return !lower.includes("bold") && !lower.includes("italic") && !lower.includes("light");
|
|
117
|
+
}
|
|
118
|
+
export function fontDirectories() {
|
|
119
|
+
const home = homedir();
|
|
120
|
+
if (platform() === "darwin") {
|
|
121
|
+
return [
|
|
122
|
+
join(home, "Library", "Fonts"),
|
|
123
|
+
"/Library/Fonts",
|
|
124
|
+
"/System/Library/Fonts",
|
|
125
|
+
"/System/Library/Fonts/Supplemental",
|
|
126
|
+
];
|
|
127
|
+
}
|
|
128
|
+
if (platform() === "win32") {
|
|
129
|
+
return [
|
|
130
|
+
join(process.env.WINDIR || "C:\\Windows", "Fonts"),
|
|
131
|
+
join(process.env.LOCALAPPDATA || join(homedir(), "AppData", "Local"), "Microsoft", "Windows", "Fonts"),
|
|
132
|
+
];
|
|
133
|
+
}
|
|
134
|
+
return [
|
|
135
|
+
join(home, ".fonts"),
|
|
136
|
+
join(home, ".local", "share", "fonts"),
|
|
137
|
+
"/usr/local/share/fonts",
|
|
138
|
+
"/usr/share/fonts",
|
|
139
|
+
];
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Iterates font files in a directory (up to `depth` 2) and yields each file's
|
|
143
|
+
* path, filename, and derived family name. Shared by the font listing route
|
|
144
|
+
* and the per-family locator to avoid duplicating the directory scan loop.
|
|
145
|
+
*/
|
|
146
|
+
export function collectFontFileEntries(dir, depth = 0) {
|
|
147
|
+
if (!existsSync(dir) || depth > 2)
|
|
148
|
+
return [];
|
|
149
|
+
const entries = [];
|
|
150
|
+
try {
|
|
151
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
152
|
+
const fullPath = join(dir, entry.name);
|
|
153
|
+
if (entry.isDirectory()) {
|
|
154
|
+
entries.push(...collectFontFileEntries(fullPath, depth + 1));
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
if (!FONT_EXT_RE.test(entry.name))
|
|
158
|
+
continue;
|
|
159
|
+
if (!isRegularFile(fullPath))
|
|
160
|
+
continue;
|
|
161
|
+
const family = toFamilyName(entry.name);
|
|
162
|
+
if (family)
|
|
163
|
+
entries.push({ path: fullPath, fileName: entry.name, family });
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
// Directory read failed — skip
|
|
168
|
+
}
|
|
169
|
+
return entries;
|
|
170
|
+
}
|
|
171
|
+
function collectCandidatesFromDir(dir, targetFamily, depth = 0) {
|
|
172
|
+
return collectFontFileEntries(dir, depth)
|
|
173
|
+
.filter((e) => normalizeName(e.family) === targetFamily)
|
|
174
|
+
.map((e) => {
|
|
175
|
+
const ext = e.fileName.match(FONT_EXT_RE)?.[1] ?? "ttf";
|
|
176
|
+
return {
|
|
177
|
+
path: e.path,
|
|
178
|
+
format: extensionToFormat(ext),
|
|
179
|
+
isRegular: isRegularWeight(e.fileName),
|
|
180
|
+
};
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function pickBestCandidate(candidates) {
|
|
184
|
+
if (candidates.length === 0)
|
|
185
|
+
return null;
|
|
186
|
+
candidates.sort((a, b) => {
|
|
187
|
+
if (a.isRegular !== b.isRegular)
|
|
188
|
+
return a.isRegular ? -1 : 1;
|
|
189
|
+
return (FORMAT_PRIORITY[a.format] ?? 9) - (FORMAT_PRIORITY[b.format] ?? 9);
|
|
190
|
+
});
|
|
191
|
+
const best = candidates[0];
|
|
192
|
+
return { path: best.path, format: best.format };
|
|
193
|
+
}
|
|
194
|
+
let profilerCache = null;
|
|
195
|
+
// fallow-ignore-next-line complexity
|
|
196
|
+
function getSystemProfilerIndex() {
|
|
197
|
+
if (profilerCache)
|
|
198
|
+
return profilerCache;
|
|
199
|
+
profilerCache = new Map();
|
|
200
|
+
if (platform() !== "darwin")
|
|
201
|
+
return profilerCache;
|
|
202
|
+
try {
|
|
203
|
+
const raw = execFileSync("system_profiler", ["SPFontsDataType", "-json"], {
|
|
204
|
+
encoding: "utf8",
|
|
205
|
+
maxBuffer: 12 * 1024 * 1024,
|
|
206
|
+
timeout: 5000,
|
|
207
|
+
});
|
|
208
|
+
const parsed = JSON.parse(raw);
|
|
209
|
+
if (!parsed?.SPFontsDataType || !Array.isArray(parsed.SPFontsDataType))
|
|
210
|
+
return profilerCache;
|
|
211
|
+
for (const fontEntry of parsed.SPFontsDataType) {
|
|
212
|
+
if (!fontEntry?.typefaces || !Array.isArray(fontEntry.typefaces))
|
|
213
|
+
continue;
|
|
214
|
+
for (const typeface of fontEntry.typefaces) {
|
|
215
|
+
if (!typeface)
|
|
216
|
+
continue;
|
|
217
|
+
const family = typeface.family ?? typeface.fullname ?? typeface._name;
|
|
218
|
+
if (typeof family !== "string")
|
|
219
|
+
continue;
|
|
220
|
+
const filePath = typeface.path;
|
|
221
|
+
if (typeof filePath !== "string" || !FONT_EXT_RE.test(filePath))
|
|
222
|
+
continue;
|
|
223
|
+
const normalized = normalizeName(family);
|
|
224
|
+
const ext = filePath.match(FONT_EXT_RE)?.[1] ?? "ttf";
|
|
225
|
+
const entry = {
|
|
226
|
+
family: normalized,
|
|
227
|
+
path: filePath,
|
|
228
|
+
format: extensionToFormat(ext),
|
|
229
|
+
isRegular: isRegularWeight(filePath),
|
|
230
|
+
};
|
|
231
|
+
const list = profilerCache.get(normalized) ?? [];
|
|
232
|
+
list.push(entry);
|
|
233
|
+
profilerCache.set(normalized, list);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
catch {
|
|
238
|
+
// system_profiler unavailable
|
|
239
|
+
}
|
|
240
|
+
return profilerCache;
|
|
241
|
+
}
|
|
242
|
+
function locateViaSystemProfiler(targetFamily) {
|
|
243
|
+
const index = getSystemProfilerIndex();
|
|
244
|
+
const entries = index.get(targetFamily);
|
|
245
|
+
if (!entries || entries.length === 0)
|
|
246
|
+
return null;
|
|
247
|
+
const candidates = entries
|
|
248
|
+
.filter((e) => isRegularFile(e.path) && isPathBounded(e.path))
|
|
249
|
+
.map((e) => ({ path: e.path, format: e.format, isRegular: e.isRegular }));
|
|
250
|
+
return pickBestCandidate(candidates);
|
|
251
|
+
}
|
|
252
|
+
// fallow-ignore-next-line complexity
|
|
253
|
+
function locateViaFcMatch(targetFamily) {
|
|
254
|
+
if (platform() !== "linux")
|
|
255
|
+
return null;
|
|
256
|
+
try {
|
|
257
|
+
const result = execFileSync("fc-match", [targetFamily, "--format=%{file}"], {
|
|
258
|
+
encoding: "utf8",
|
|
259
|
+
timeout: 3000,
|
|
260
|
+
}).trim();
|
|
261
|
+
if (!result || !isRegularFile(result) || !isPathBounded(result))
|
|
262
|
+
return null;
|
|
263
|
+
const fileName = result.split("/").pop() ?? "";
|
|
264
|
+
const derivedFamily = toFamilyName(fileName);
|
|
265
|
+
if (!derivedFamily || normalizeName(derivedFamily) !== targetFamily)
|
|
266
|
+
return null;
|
|
267
|
+
const ext = fileName.match(FONT_EXT_RE)?.[1] ?? "ttf";
|
|
268
|
+
return { path: result, format: extensionToFormat(ext) };
|
|
269
|
+
}
|
|
270
|
+
catch {
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
export function locateSystemFont(family) {
|
|
275
|
+
const normalized = normalizeName(family);
|
|
276
|
+
if (!normalized)
|
|
277
|
+
return null;
|
|
278
|
+
const cached = cache.get(normalized);
|
|
279
|
+
if (cached !== undefined)
|
|
280
|
+
return cached;
|
|
281
|
+
let result = null;
|
|
282
|
+
result = locateViaSystemProfiler(normalized);
|
|
283
|
+
if (!result) {
|
|
284
|
+
result = locateViaFcMatch(normalized);
|
|
285
|
+
}
|
|
286
|
+
if (!result) {
|
|
287
|
+
const allCandidates = [];
|
|
288
|
+
for (const dir of fontDirectories()) {
|
|
289
|
+
allCandidates.push(...collectCandidatesFromDir(dir, normalized));
|
|
290
|
+
}
|
|
291
|
+
result = pickBestCandidate(allCandidates);
|
|
292
|
+
}
|
|
293
|
+
cache.set(normalized, result);
|
|
294
|
+
return result;
|
|
295
|
+
}
|
|
296
|
+
const WEIGHT_TOKENS = {
|
|
297
|
+
thin: "100",
|
|
298
|
+
hairline: "100",
|
|
299
|
+
ultralight: "200",
|
|
300
|
+
extralight: "200",
|
|
301
|
+
light: "300",
|
|
302
|
+
regular: "400",
|
|
303
|
+
normal: "400",
|
|
304
|
+
book: "400",
|
|
305
|
+
roman: "400",
|
|
306
|
+
medium: "500",
|
|
307
|
+
demibold: "600",
|
|
308
|
+
semibold: "600",
|
|
309
|
+
bold: "700",
|
|
310
|
+
extrabold: "800",
|
|
311
|
+
ultrabold: "800",
|
|
312
|
+
heavy: "800",
|
|
313
|
+
black: "900",
|
|
314
|
+
ultrablack: "950",
|
|
315
|
+
};
|
|
316
|
+
const WEIGHT_TOKENS_SORTED = Object.entries(WEIGHT_TOKENS).sort(([a], [b]) => b.length - a.length);
|
|
317
|
+
function inferWeightAndStyle(fileName) {
|
|
318
|
+
const lower = fileName.toLowerCase().replace(FONT_EXT_RE, "");
|
|
319
|
+
const style = lower.includes("italic") || lower.includes("oblique") ? "italic" : "normal";
|
|
320
|
+
for (const [token, weight] of WEIGHT_TOKENS_SORTED) {
|
|
321
|
+
if (lower.includes(token))
|
|
322
|
+
return { weight, style };
|
|
323
|
+
}
|
|
324
|
+
return { weight: "400", style };
|
|
325
|
+
}
|
|
326
|
+
export function locateSystemFontVariants(family) {
|
|
327
|
+
const normalized = normalizeName(family);
|
|
328
|
+
if (!normalized)
|
|
329
|
+
return [];
|
|
330
|
+
const variants = [];
|
|
331
|
+
const profilerIndex = getSystemProfilerIndex();
|
|
332
|
+
const profilerEntries = profilerIndex.get(normalized);
|
|
333
|
+
if (profilerEntries && profilerEntries.length > 0) {
|
|
334
|
+
for (const e of profilerEntries) {
|
|
335
|
+
if (!isRegularFile(e.path) || !isPathBounded(e.path))
|
|
336
|
+
continue;
|
|
337
|
+
const { weight, style } = inferWeightAndStyle(e.path);
|
|
338
|
+
variants.push({ path: e.path, format: e.format, weight, style });
|
|
339
|
+
}
|
|
340
|
+
if (variants.length > 0)
|
|
341
|
+
return dedupeVariants(variants);
|
|
342
|
+
}
|
|
343
|
+
const allCandidates = [];
|
|
344
|
+
for (const dir of fontDirectories()) {
|
|
345
|
+
allCandidates.push(...collectCandidatesFromDir(dir, normalized));
|
|
346
|
+
}
|
|
347
|
+
for (const c of allCandidates) {
|
|
348
|
+
const { weight, style } = inferWeightAndStyle(c.path);
|
|
349
|
+
variants.push({ path: c.path, format: c.format, weight, style });
|
|
350
|
+
}
|
|
351
|
+
return dedupeVariants(variants);
|
|
352
|
+
}
|
|
353
|
+
function dedupeVariants(variants) {
|
|
354
|
+
const seen = new Map();
|
|
355
|
+
for (const v of variants) {
|
|
356
|
+
const key = `${v.weight}:${v.style}`;
|
|
357
|
+
if (!seen.has(key))
|
|
358
|
+
seen.set(key, v);
|
|
359
|
+
}
|
|
360
|
+
return Array.from(seen.values());
|
|
361
|
+
}
|
|
362
|
+
export function clearSystemFontCache() {
|
|
363
|
+
cache.clear();
|
|
364
|
+
profilerCache = null;
|
|
365
|
+
allowedDirsCache = null;
|
|
366
|
+
}
|
|
367
|
+
//# sourceMappingURL=systemFontLocator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemFontLocator.js","sourceRoot":"","sources":["../../src/fonts/systemFontLocator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,IAA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AmB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACtD,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,cAAc,CAAC,QAA8B;IACpD,MAAM,IAAI,GAAG,IAAI,GAAG,EAA8B,CAAC;IACnD,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,KAAK,CAAC,KAAK,EAAE,CAAC;IACd,aAAa,GAAG,IAAI,CAAC;IACrB,gBAAgB,GAAG,IAAI,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/fonts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/fonts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA2ErE,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,qBAAqB,EAAE,CAsE1E,CAAC"}
|
package/dist/lint/rules/fonts.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FONT_ALIAS_KEYS, resolveAliasDisplayName } from "../../fonts/aliases";
|
|
1
2
|
const GENERIC_FAMILIES = new Set([
|
|
2
3
|
"serif",
|
|
3
4
|
"sans-serif",
|
|
@@ -17,42 +18,6 @@ const GENERIC_FAMILIES = new Set([
|
|
|
17
18
|
"unset",
|
|
18
19
|
"revert",
|
|
19
20
|
]);
|
|
20
|
-
// Fonts pre-bundled as data URIs in the producer (deterministicFonts.ts FONT_ALIASES).
|
|
21
|
-
// These render correctly without @font-face — the producer injects them automatically.
|
|
22
|
-
// Must match the keys in packages/producer/src/services/deterministicFonts.ts exactly.
|
|
23
|
-
const PRODUCER_BUNDLED_FONTS = new Set([
|
|
24
|
-
"inter",
|
|
25
|
-
"helvetica neue",
|
|
26
|
-
"helvetica",
|
|
27
|
-
"arial",
|
|
28
|
-
"helvetica bold",
|
|
29
|
-
"montserrat",
|
|
30
|
-
"futura",
|
|
31
|
-
"din alternate",
|
|
32
|
-
"arial black",
|
|
33
|
-
"outfit",
|
|
34
|
-
"nunito",
|
|
35
|
-
"oswald",
|
|
36
|
-
"bebas neue",
|
|
37
|
-
"league gothic",
|
|
38
|
-
"archivo black",
|
|
39
|
-
"space mono",
|
|
40
|
-
"ibm plex mono",
|
|
41
|
-
"jetbrains mono",
|
|
42
|
-
"courier new",
|
|
43
|
-
"courier",
|
|
44
|
-
"eb garamond",
|
|
45
|
-
"garamond",
|
|
46
|
-
"playfair display",
|
|
47
|
-
"source code pro",
|
|
48
|
-
"noto sans jp",
|
|
49
|
-
"noto sans japanese",
|
|
50
|
-
"roboto",
|
|
51
|
-
"open sans",
|
|
52
|
-
"lato",
|
|
53
|
-
"poppins",
|
|
54
|
-
"segoe ui",
|
|
55
|
-
]);
|
|
56
21
|
function extractFontFaceFamilies(styles) {
|
|
57
22
|
const families = new Set();
|
|
58
23
|
const fontFaceRe = /@font-face\s*\{[^}]*\}/gi;
|
|
@@ -92,6 +57,20 @@ function extractUsedFontFamilies(styles) {
|
|
|
92
57
|
}
|
|
93
58
|
return used;
|
|
94
59
|
}
|
|
60
|
+
function collectAliasedFonts(used, declared) {
|
|
61
|
+
const aliased = [];
|
|
62
|
+
for (const name of used) {
|
|
63
|
+
if (declared.has(name))
|
|
64
|
+
continue;
|
|
65
|
+
const displayName = resolveAliasDisplayName(name);
|
|
66
|
+
if (!displayName)
|
|
67
|
+
continue;
|
|
68
|
+
if (displayName.toLowerCase() === name)
|
|
69
|
+
continue;
|
|
70
|
+
aliased.push(`'${name}' → ${displayName}`);
|
|
71
|
+
}
|
|
72
|
+
return aliased;
|
|
73
|
+
}
|
|
95
74
|
export const fontRules = [
|
|
96
75
|
// google_fonts_import
|
|
97
76
|
({ styles, source }) => {
|
|
@@ -111,12 +90,34 @@ export const fontRules = [
|
|
|
111
90
|
}
|
|
112
91
|
return findings;
|
|
113
92
|
},
|
|
93
|
+
// system_font_will_alias — inform when a font will be silently substituted
|
|
94
|
+
({ styles, options }) => {
|
|
95
|
+
const declared = extractFontFaceFamilies(styles);
|
|
96
|
+
const used = extractUsedFontFamilies(styles);
|
|
97
|
+
const aliased = collectAliasedFonts(used, declared);
|
|
98
|
+
if (aliased.length === 0)
|
|
99
|
+
return [];
|
|
100
|
+
// In distributed / Lambda renders system-font capture is disabled, so
|
|
101
|
+
// the alias substitution does NOT happen — elevate to a warning.
|
|
102
|
+
const severity = options.distributed ? "warning" : "info";
|
|
103
|
+
return [
|
|
104
|
+
{
|
|
105
|
+
code: "system_font_will_alias",
|
|
106
|
+
severity,
|
|
107
|
+
message: `Font ${aliased.length === 1 ? "family" : "families"} will be substituted at render time: ${aliased.join(", ")}. ` +
|
|
108
|
+
(options.distributed
|
|
109
|
+
? "In distributed/Lambda rendering system-font capture is disabled — these fonts will fall back to OS defaults. Embed explicit @font-face declarations instead."
|
|
110
|
+
: "The renderer maps these to bundled fonts for cross-platform consistency. " +
|
|
111
|
+
"Use the target font name directly for consistent preview and render results."),
|
|
112
|
+
},
|
|
113
|
+
];
|
|
114
|
+
},
|
|
114
115
|
// font_family_without_font_face
|
|
115
116
|
({ styles }) => {
|
|
116
117
|
const findings = [];
|
|
117
118
|
const declared = extractFontFaceFamilies(styles);
|
|
118
119
|
const used = extractUsedFontFamilies(styles);
|
|
119
|
-
const undeclared = used.filter((name) => !declared.has(name) && !
|
|
120
|
+
const undeclared = used.filter((name) => !declared.has(name) && !FONT_ALIAS_KEYS.has(name));
|
|
120
121
|
if (undeclared.length === 0)
|
|
121
122
|
return findings;
|
|
122
123
|
findings.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/lint/rules/fonts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/lint/rules/fonts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAG/E,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC/B,OAAO;IACP,YAAY;IACZ,WAAW;IACX,SAAS;IACT,SAAS;IACT,WAAW;IACX,UAAU;IACV,eAAe;IACf,cAAc;IACd,YAAY;IACZ,MAAM;IACN,OAAO;IACP,UAAU;IACV,SAAS;IACT,SAAS;IACT,OAAO;IACP,QAAQ;CACT,CAAC,CAAC;AAEH,SAAS,uBAAuB,CAAC,MAAkC;IACjE,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,MAAM,UAAU,GAAG,0BAA0B,CAAC;IAC9C,MAAM,QAAQ,GAAG,uCAAuC,CAAC;IACzD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAA6B,CAAC;QAClC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACzD,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC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AAE,+BAA+B;YACrC,QAAQ,EAAE,SAAS;YACnB,OAAO,EACL,QAAQ,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,yCAAyC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;gBACzH,kGAAkG;gBAClG,qFAAqF;YACvF,OAAO,EACL,oFAAoF;gBACpF,8DAA8D;SACjE,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAC"}
|
package/dist/lint/types.d.ts
CHANGED
|
@@ -23,6 +23,14 @@ export type HyperframeLinterOptions = {
|
|
|
23
23
|
href: string;
|
|
24
24
|
content: string;
|
|
25
25
|
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Set to `true` when linting compositions destined for distributed / Lambda
|
|
28
|
+
* rendering, where system-font capture (`allowSystemFontCapture`) is
|
|
29
|
+
* disabled. When `true`, the `system_font_will_alias` rule is elevated from
|
|
30
|
+
* `"info"` to `"warning"` because the alias substitution will NOT happen at
|
|
31
|
+
* render time — the font will silently fall back to whatever the OS provides.
|
|
32
|
+
*/
|
|
33
|
+
distributed?: boolean;
|
|
26
34
|
};
|
|
27
35
|
export type LintRule<TContext> = (ctx: TContext) => HyperframeLintFinding[] | Promise<HyperframeLintFinding[]>;
|
|
28
36
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/lint/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lint/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAElE,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,sBAAsB,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,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AC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1D;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAIF,MAAM,MAAM,QAAQ,CAAC,QAAQ,IAAI,CAC/B,GAAG,EAAE,QAAQ,KACV,qBAAqB,EAAE,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC"}
|
package/dist/registry/types.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export declare const ITEM_TYPE_DIRS: {
|
|
|
127
127
|
readonly "hyperframes:block": "blocks";
|
|
128
128
|
readonly "hyperframes:component": "components";
|
|
129
129
|
};
|
|
130
|
-
export type BlockCategory = "vfx" | "transitions" | "social" | "data" | "scenes" | "captions" | "effects";
|
|
130
|
+
export type BlockCategory = "vfx" | "transitions" | "social" | "data" | "scenes" | "captions" | "effects" | "text-effects";
|
|
131
131
|
export interface BlockCategoryMeta {
|
|
132
132
|
id: BlockCategory;
|
|
133
133
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAGA,oDAAoD;AACpD,MAAM,MAAM,QAAQ,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,uBAAuB,CAAC;AAE7F,4DAA4D;AAC5D,MAAM,MAAM,QAAQ,GAChB,yBAAyB,GACzB,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,sBAAsB,CAAC;AAE3B,2DAA2D;AAC3D,MAAM,WAAW,UAAU;IACzB,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,MAAM,EAAE,MAAM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,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,aAAa,CAW9E;AAID,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,IAAI,WAAW,CAErE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,IAAI,SAAS,CAEjE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,IAAI,aAAa,CAEzE"}
|
package/dist/registry/types.js
CHANGED
|
@@ -33,6 +33,7 @@ export const BLOCK_CATEGORIES = [
|
|
|
33
33
|
{ id: "vfx", label: "VFX", color: "purple" },
|
|
34
34
|
{ id: "transitions", label: "Transitions", color: "blue" },
|
|
35
35
|
{ id: "effects", label: "Effects", color: "rose" },
|
|
36
|
+
{ id: "text-effects", label: "Text Effects", color: "violet" },
|
|
36
37
|
{ id: "social", label: "Social", color: "pink" },
|
|
37
38
|
{ id: "data", label: "Data", color: "green" },
|
|
38
39
|
{ id: "scenes", label: "Scenes", color: "amber" },
|
|
@@ -51,6 +52,8 @@ export function resolveBlockCategory(tags) {
|
|
|
51
52
|
return "data";
|
|
52
53
|
if (set.has("html-in-canvas") || set.has("webgl") || set.has("shader"))
|
|
53
54
|
return "vfx";
|
|
55
|
+
if (set.has("text-effect"))
|
|
56
|
+
return "text-effects";
|
|
54
57
|
if (set.has("effect") || set.has("grain") || set.has("vignette"))
|
|
55
58
|
return "effects";
|
|
56
59
|
return "scenes";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,0EAA0E;AAqI1E,+EAA+E;AAE/E,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,qBAAqB;IACrB,mBAAmB;IACnB,uBAAuB;CACe,CAAC;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,yBAAyB;IACzB,m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AAG,CAAC,QAAQ,CAAC;QAAE,OAAO,KAAK,CAAC;IACrF,IAAI,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC;QAAE,OAAO,cAAc,CAAC;IAClD,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC;QAAE,OAAO,SAAS,CAAC;IACnF,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,+EAA+E;AAE/E,MAAM,UAAU,aAAa,CAAC,IAAkB;IAC9C,OAAO,IAAI,CAAC,IAAI,KAAK,qBAAqB,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAkB;IAC5C,OAAO,IAAI,CAAC,IAAI,KAAK,mBAAmB,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAkB;IAChD,OAAO,IAAI,CAAC,IAAI,KAAK,uBAAuB,CAAC;AAC/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/studio-api/routes/fonts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/studio-api/routes/fonts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAiKjC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAiDlD"}
|
|
@@ -1,36 +1,12 @@
|
|
|
1
1
|
import { execFileSync } from "node:child_process";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const FONT_EXT_RE = /\.(otf|ttf|ttc|woff2?)$/i;
|
|
2
|
+
import { closeSync, constants, fstatSync, openSync, readSync } from "node:fs";
|
|
3
|
+
import { platform } from "node:os";
|
|
4
|
+
import { collectFontFileEntries, fontDirectories, locateSystemFont, SYSTEM_FONT_SIZE_LIMIT, } from "../../fonts/systemFontLocator";
|
|
6
5
|
const MAX_FONT_RESULTS = 2000;
|
|
7
6
|
const GOOGLE_FONTS_METADATA_URL = "https://fonts.google.com/metadata/fonts";
|
|
8
7
|
const GOOGLE_FONTS_FETCH_TIMEOUT_MS = 3000;
|
|
9
8
|
let cachedFonts = null;
|
|
10
9
|
let cachedGoogleFonts = null;
|
|
11
|
-
const STYLE_SUFFIXES = new Set([
|
|
12
|
-
"black",
|
|
13
|
-
"bold",
|
|
14
|
-
"book",
|
|
15
|
-
"condensed",
|
|
16
|
-
"demi",
|
|
17
|
-
"demibold",
|
|
18
|
-
"display",
|
|
19
|
-
"extra",
|
|
20
|
-
"extrabold",
|
|
21
|
-
"hairline",
|
|
22
|
-
"heavy",
|
|
23
|
-
"italic",
|
|
24
|
-
"light",
|
|
25
|
-
"medium",
|
|
26
|
-
"normal",
|
|
27
|
-
"regular",
|
|
28
|
-
"roman",
|
|
29
|
-
"semibold",
|
|
30
|
-
"thin",
|
|
31
|
-
"ultra",
|
|
32
|
-
"ultralight",
|
|
33
|
-
]);
|
|
34
10
|
const GOOGLE_FONT_FALLBACKS = [
|
|
35
11
|
"Inter",
|
|
36
12
|
"Roboto",
|
|
@@ -56,43 +32,6 @@ const GOOGLE_FONT_FALLBACKS = [
|
|
|
56
32
|
function isRecord(value) {
|
|
57
33
|
return typeof value === "object" && value !== null;
|
|
58
34
|
}
|
|
59
|
-
function fontDirectories() {
|
|
60
|
-
const home = homedir();
|
|
61
|
-
if (platform() === "darwin") {
|
|
62
|
-
return [
|
|
63
|
-
join(home, "Library", "Fonts"),
|
|
64
|
-
"/Library/Fonts",
|
|
65
|
-
"/System/Library/Fonts",
|
|
66
|
-
"/System/Library/Fonts/Supplemental",
|
|
67
|
-
];
|
|
68
|
-
}
|
|
69
|
-
if (platform() === "win32") {
|
|
70
|
-
return [join(process.env.WINDIR || "C:\\Windows", "Fonts")];
|
|
71
|
-
}
|
|
72
|
-
return [
|
|
73
|
-
join(home, ".fonts"),
|
|
74
|
-
join(home, ".local", "share", "fonts"),
|
|
75
|
-
"/usr/local/share/fonts",
|
|
76
|
-
"/usr/share/fonts",
|
|
77
|
-
];
|
|
78
|
-
}
|
|
79
|
-
function toFamilyName(fileName) {
|
|
80
|
-
const withoutExt = fileName.replace(FONT_EXT_RE, "");
|
|
81
|
-
if (!withoutExt || withoutExt.startsWith("."))
|
|
82
|
-
return null;
|
|
83
|
-
const spaced = withoutExt
|
|
84
|
-
.replace(/[_-]+/g, " ")
|
|
85
|
-
.replace(/([a-z])([A-Z])/g, "$1 $2")
|
|
86
|
-
.replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2")
|
|
87
|
-
.replace(/\s+/g, " ")
|
|
88
|
-
.trim();
|
|
89
|
-
const words = spaced.split(" ").filter(Boolean);
|
|
90
|
-
while (words.length > 1 && STYLE_SUFFIXES.has((words.at(-1) ?? "").toLowerCase())) {
|
|
91
|
-
words.pop();
|
|
92
|
-
}
|
|
93
|
-
const family = words.join(" ").trim();
|
|
94
|
-
return family.length >= 2 ? family : null;
|
|
95
|
-
}
|
|
96
35
|
function collectMacSystemProfilerFonts() {
|
|
97
36
|
if (platform() !== "darwin")
|
|
98
37
|
return [];
|
|
@@ -136,30 +75,8 @@ function collectMacSystemProfilerFonts() {
|
|
|
136
75
|
}
|
|
137
76
|
return fonts;
|
|
138
77
|
}
|
|
139
|
-
function collectFontsFromDir(dir
|
|
140
|
-
|
|
141
|
-
return [];
|
|
142
|
-
const fonts = [];
|
|
143
|
-
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
144
|
-
const fullPath = join(dir, entry.name);
|
|
145
|
-
if (entry.isDirectory()) {
|
|
146
|
-
fonts.push(...collectFontsFromDir(fullPath, depth + 1));
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
if (!entry.isFile() || !FONT_EXT_RE.test(entry.name))
|
|
150
|
-
continue;
|
|
151
|
-
try {
|
|
152
|
-
if (!statSync(fullPath).isFile())
|
|
153
|
-
continue;
|
|
154
|
-
}
|
|
155
|
-
catch {
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
const family = toFamilyName(entry.name);
|
|
159
|
-
if (family)
|
|
160
|
-
fonts.push(family);
|
|
161
|
-
}
|
|
162
|
-
return fonts;
|
|
78
|
+
function collectFontsFromDir(dir) {
|
|
79
|
+
return collectFontFileEntries(dir).map((e) => e.family);
|
|
163
80
|
}
|
|
164
81
|
function listInstalledFontFamilies() {
|
|
165
82
|
if (cachedFonts)
|
|
@@ -235,5 +152,51 @@ async function listGoogleFontFamilies() {
|
|
|
235
152
|
export function registerFontRoutes(api) {
|
|
236
153
|
api.get("/fonts", (c) => c.json({ fonts: listInstalledFontFamilies() }));
|
|
237
154
|
api.get("/fonts/google", async (c) => c.json({ fonts: await listGoogleFontFamilies() }));
|
|
155
|
+
// fallow-ignore-next-line complexity
|
|
156
|
+
api.get("/fonts/file", (c) => {
|
|
157
|
+
const family = c.req.query("family");
|
|
158
|
+
if (!family)
|
|
159
|
+
return c.json({ error: "family parameter required" }, 400);
|
|
160
|
+
const located = locateSystemFont(family);
|
|
161
|
+
if (!located)
|
|
162
|
+
return c.json({ error: "font not found" }, 404);
|
|
163
|
+
let fd;
|
|
164
|
+
try {
|
|
165
|
+
fd = openSync(located.path, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
return c.json({ error: "font file not accessible" }, 404);
|
|
169
|
+
}
|
|
170
|
+
try {
|
|
171
|
+
const stat = fstatSync(fd);
|
|
172
|
+
if (stat.size > SYSTEM_FONT_SIZE_LIMIT) {
|
|
173
|
+
return c.json({ error: "font file too large" }, 413);
|
|
174
|
+
}
|
|
175
|
+
const buffer = Buffer.alloc(stat.size);
|
|
176
|
+
readSync(fd, buffer, 0, stat.size, 0);
|
|
177
|
+
const mimeType = located.format === "otf"
|
|
178
|
+
? "font/otf"
|
|
179
|
+
: located.format === "woff2"
|
|
180
|
+
? "font/woff2"
|
|
181
|
+
: located.format === "woff"
|
|
182
|
+
? "font/woff"
|
|
183
|
+
: located.format === "ttc"
|
|
184
|
+
? "font/collection"
|
|
185
|
+
: "font/ttf";
|
|
186
|
+
const fileName = `${family.replace(/[^a-zA-Z0-9 -]/g, "")}.${located.format}`;
|
|
187
|
+
return new Response(buffer, {
|
|
188
|
+
headers: {
|
|
189
|
+
"Content-Type": mimeType,
|
|
190
|
+
"Content-Disposition": `attachment; filename="${fileName}"`,
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
catch {
|
|
195
|
+
return c.json({ error: "failed to read font file" }, 500);
|
|
196
|
+
}
|
|
197
|
+
finally {
|
|
198
|
+
closeSync(fd);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
238
201
|
}
|
|
239
202
|
//# sourceMappingURL=fonts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/studio-api/routes/fonts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/studio-api/routes/fonts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,yBAAyB,GAAG,yCAAyC,CAAC;AAC5E,MAAM,6BAA6B,GAAG,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,SAAS,CAAC,EAAE,CAAC,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -2,6 +2,6 @@ export declare const GSAP_CDN = "https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/g
|
|
|
2
2
|
export declare const BASE_STYLES = "* { margin: 0; padding: 0; box-sizing: border-box; }\nhtml, body { width: 100%; height: 100%; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }";
|
|
3
3
|
export declare const ELEMENT_BASE_STYLES = "position: absolute; visibility: hidden;";
|
|
4
4
|
export declare const MEDIA_STYLES = "width: 100%; height: 100%; object-fit: contain;";
|
|
5
|
-
export declare const TEXT_STYLES = "display: flex; align-items: center; justify-content: center; font-family:
|
|
5
|
+
export declare const TEXT_STYLES = "display: flex; align-items: center; justify-content: center; font-family: \"Inter\", sans-serif; font-size: 48px; font-weight: bold; color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); width: 100%; height: 100%;";
|
|
6
6
|
export declare const ZOOM_CONTAINER_STYLES = "position: absolute; inset: 0; transform-origin: 0 0;";
|
|
7
7
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/templates/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,8DAA8D,CAAC;AAEpF,eAAO,MAAM,WAAW,qMACmH,CAAC;AAE5I,eAAO,MAAM,mBAAmB,4CAA4C,CAAC;AAE7E,eAAO,MAAM,YAAY,oDAAoD,CAAC;AAE9E,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/templates/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,8DAA8D,CAAC;AAEpF,eAAO,MAAM,WAAW,qMACmH,CAAC;AAE5I,eAAO,MAAM,mBAAmB,4CAA4C,CAAC;AAE7E,eAAO,MAAM,YAAY,oDAAoD,CAAC;AAE9E,eAAO,MAAM,WAAW,4NAA0N,CAAC;AAEnP,eAAO,MAAM,qBAAqB,yDAAyD,CAAC"}
|
|
@@ -3,6 +3,6 @@ export const BASE_STYLES = `* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
3
3
|
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }`;
|
|
4
4
|
export const ELEMENT_BASE_STYLES = `position: absolute; visibility: hidden;`;
|
|
5
5
|
export const MEDIA_STYLES = `width: 100%; height: 100%; object-fit: contain;`;
|
|
6
|
-
export const TEXT_STYLES = `display: flex; align-items: center; justify-content: center; font-family:
|
|
6
|
+
export const TEXT_STYLES = `display: flex; align-items: center; justify-content: center; font-family: "Inter", sans-serif; font-size: 48px; font-weight: bold; color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); width: 100%; height: 100%;`;
|
|
7
7
|
export const ZOOM_CONTAINER_STYLES = `position: absolute; inset: 0; transform-origin: 0 0;`;
|
|
8
8
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/templates/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,2DAA2D,CAAC;AAEpF,MAAM,CAAC,MAAM,WAAW,GAAG;2IACgH,CAAC;AAE5I,MAAM,CAAC,MAAM,mBAAmB,GAAG,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,YAAY,GAAG,iDAAiD,CAAC;AAE9E,MAAM,CAAC,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/templates/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,2DAA2D,CAAC;AAEpF,MAAM,CAAC,MAAM,WAAW,GAAG;2IACgH,CAAC;AAE5I,MAAM,CAAC,MAAM,mBAAmB,GAAG,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,YAAY,GAAG,iDAAiD,CAAC;AAE9E,MAAM,CAAC,MAAM,WAAW,GAAG,uNAAuN,CAAC;AAEnP,MAAM,CAAC,MAAM,qBAAqB,GAAG,sDAAsD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.81",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -74,6 +74,14 @@
|
|
|
74
74
|
"import": "./dist/parsers/springEase.js",
|
|
75
75
|
"types": "./dist/parsers/springEase.d.ts"
|
|
76
76
|
},
|
|
77
|
+
"./fonts/aliases": {
|
|
78
|
+
"import": "./dist/fonts/aliases.js",
|
|
79
|
+
"types": "./dist/fonts/aliases.d.ts"
|
|
80
|
+
},
|
|
81
|
+
"./fonts/system-locator": {
|
|
82
|
+
"import": "./dist/fonts/systemFontLocator.js",
|
|
83
|
+
"types": "./dist/fonts/systemFontLocator.d.ts"
|
|
84
|
+
},
|
|
77
85
|
"./schemas/registry.json": "./schemas/registry.json",
|
|
78
86
|
"./schemas/registry-item.json": "./schemas/registry-item.json"
|
|
79
87
|
},
|