@hyperframes/core 0.7.15 → 0.7.17

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 (39) hide show
  1. package/dist/compiler/assetPaths.d.ts +1 -17
  2. package/dist/compiler/assetPaths.d.ts.map +1 -1
  3. package/dist/compiler/assetPaths.js +2 -33
  4. package/dist/compiler/assetPaths.js.map +1 -1
  5. package/dist/compiler/rewriteSubCompPaths.d.ts +1 -43
  6. package/dist/compiler/rewriteSubCompPaths.d.ts.map +1 -1
  7. package/dist/compiler/rewriteSubCompPaths.js +2 -103
  8. package/dist/compiler/rewriteSubCompPaths.js.map +1 -1
  9. package/dist/fonts/aliases.d.ts +1 -90
  10. package/dist/fonts/aliases.d.ts.map +1 -1
  11. package/dist/fonts/aliases.js +2 -121
  12. package/dist/fonts/aliases.js.map +1 -1
  13. package/dist/generated/runtime-inline.js.map +1 -1
  14. package/dist/hyperframe.runtime.iife.js +21 -21
  15. package/dist/index.d.ts +2 -2
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/slideshow/index.d.ts +1 -3
  20. package/dist/slideshow/index.d.ts.map +1 -1
  21. package/dist/slideshow/index.js +2 -3
  22. package/dist/slideshow/index.js.map +1 -1
  23. package/dist/utils/urlPath.d.ts +1 -1
  24. package/dist/utils/urlPath.d.ts.map +1 -1
  25. package/dist/utils/urlPath.js +2 -12
  26. package/dist/utils/urlPath.js.map +1 -1
  27. package/package.json +4 -4
  28. package/dist/slideshow/parseSlideshow.d.ts +0 -23
  29. package/dist/slideshow/parseSlideshow.d.ts.map +0 -1
  30. package/dist/slideshow/parseSlideshow.js +0 -160
  31. package/dist/slideshow/parseSlideshow.js.map +0 -1
  32. package/dist/slideshow/sceneId.d.ts +0 -8
  33. package/dist/slideshow/sceneId.d.ts.map +0 -1
  34. package/dist/slideshow/sceneId.js +0 -18
  35. package/dist/slideshow/sceneId.js.map +0 -1
  36. package/dist/slideshow/slideshow.types.d.ts +0 -62
  37. package/dist/slideshow/slideshow.types.d.ts.map +0 -1
  38. package/dist/slideshow/slideshow.types.js +0 -5
  39. package/dist/slideshow/slideshow.types.js.map +0 -1
@@ -1,18 +1,2 @@
1
- /**
2
- * Shared primitives for scanning and rewriting asset paths in HTML/CSS.
3
- *
4
- * Used by: rewriteSubCompPaths (core), collectExternalAssets (producer),
5
- * localizeExternalAssets (CLI publish).
6
- */
7
- /** Regex matching CSS `url(...)` references — captures the quote style and the raw URL. */
8
- export declare const CSS_URL_RE: RegExp;
9
- /** Attributes that may contain relative asset paths. */
10
- export declare const PATH_ATTRS: readonly ["src", "href"];
11
- /** Returns true for URLs/prefixes that should never be rewritten. */
12
- export declare function isNonRelativeUrl(val: string): boolean;
13
- /**
14
- * Cross-platform containment check: is `childPath` inside `parentPath`?
15
- * Equality counts as "inside".
16
- */
17
- export declare function isPathInside(childPath: string, parentPath: string): boolean;
1
+ export { CSS_URL_RE, PATH_ATTRS, isNonRelativeUrl, isPathInside, } from "@hyperframes/parsers/asset-paths";
18
2
  //# sourceMappingURL=assetPaths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assetPaths.d.ts","sourceRoot":"","sources":["../../src/compiler/assetPaths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,2FAA2F;AAC3F,eAAO,MAAM,UAAU,QAAuC,CAAC;AAE/D,wDAAwD;AACxD,eAAO,MAAM,UAAU,0BAA2B,CAAC;AAEnD,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAUrD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAM3E"}
1
+ {"version":3,"file":"assetPaths.d.ts","sourceRoot":"","sources":["../../src/compiler/assetPaths.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,YAAY,GACb,MAAM,kCAAkC,CAAC"}
@@ -1,34 +1,3 @@
1
- /**
2
- * Shared primitives for scanning and rewriting asset paths in HTML/CSS.
3
- *
4
- * Used by: rewriteSubCompPaths (core), collectExternalAssets (producer),
5
- * localizeExternalAssets (CLI publish).
6
- */
7
- import { isAbsolute, relative, resolve } from "node:path";
8
- /** Regex matching CSS `url(...)` references — captures the quote style and the raw URL. */
9
- export const CSS_URL_RE = /\burl\(\s*(["']?)([^)"']+)\1\s*\)/g;
10
- /** Attributes that may contain relative asset paths. */
11
- export const PATH_ATTRS = ["src", "href"];
12
- /** Returns true for URLs/prefixes that should never be rewritten. */
13
- export function isNonRelativeUrl(val) {
14
- return (!val ||
15
- val.startsWith("http://") ||
16
- val.startsWith("https://") ||
17
- val.startsWith("//") ||
18
- val.startsWith("data:") ||
19
- val.startsWith("#") ||
20
- val.startsWith("/"));
21
- }
22
- /**
23
- * Cross-platform containment check: is `childPath` inside `parentPath`?
24
- * Equality counts as "inside".
25
- */
26
- export function isPathInside(childPath, parentPath) {
27
- const absChild = resolve(childPath);
28
- const absParent = resolve(parentPath);
29
- if (absChild === absParent)
30
- return true;
31
- const rel = relative(absParent, absChild);
32
- return rel !== "" && !rel.startsWith("..") && !isAbsolute(rel);
33
- }
1
+ // Moved to @hyperframes/parsers. Re-exported here for back-compat.
2
+ export { CSS_URL_RE, PATH_ATTRS, isNonRelativeUrl, isPathInside, } from "@hyperframes/parsers/asset-paths";
34
3
  //# sourceMappingURL=assetPaths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assetPaths.js","sourceRoot":"","sources":["../../src/compiler/assetPaths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1D,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,oCAAoC,CAAC;AAE/D,wDAAwD;AACxD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,CAAU,CAAC;AAEnD,qEAAqE;AACrE,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,OAAO,CACL,CAAC,GAAG;QACJ,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC;QACzB,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC;QAC1B,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC;QACpB,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;QACvB,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;QACnB,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CACpB,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,SAAiB,EAAE,UAAkB;IAChE,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACxC,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC1C,OAAO,GAAG,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACjE,CAAC"}
1
+ {"version":3,"file":"assetPaths.js","sourceRoot":"","sources":["../../src/compiler/assetPaths.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,YAAY,GACb,MAAM,kCAAkC,CAAC"}
@@ -1,44 +1,2 @@
1
- /**
2
- * Rewrite relative asset paths in sub-composition content so they resolve
3
- * correctly after the content is inlined into the root document.
4
- *
5
- * A sub-composition at "compositions/scene.html" referencing "../icon.svg"
6
- * means the project root — but after inlining into root index.html, the
7
- * "../" escapes the project directory and causes 404s. This function
8
- * resolves each relative path against the sub-composition's directory,
9
- * then normalizes it to be relative to the project root.
10
- *
11
- * Used by both the core bundler (preview) and the producer compiler (render)
12
- * to ensure consistent behavior.
13
- */
14
- /**
15
- * Rewrite a single relative path from a sub-composition's context to the
16
- * project root context.
17
- *
18
- * @param compSrcPath - The `data-composition-src` value (e.g. "compositions/scene.html")
19
- * @param relativePath - The asset path to rewrite (e.g. "../icon.svg")
20
- * @returns The rewritten path relative to project root (e.g. "icon.svg"), or
21
- * the original path if no rewriting is needed.
22
- */
23
- export declare function rewriteAssetPath(compSrcPath: string, relativePath: string): string;
24
- /**
25
- * Rewrite all relative `src` and `href` attributes on elements within a
26
- * DOM tree, adjusting paths from the sub-composition's directory context
27
- * to the project root.
28
- *
29
- * @param elements - Iterable of DOM elements to scan (e.g. from querySelectorAll)
30
- * @param compSrcPath - The `data-composition-src` value
31
- * @param getAttr - Function to read an attribute from an element
32
- * @param setAttr - Function to set an attribute on an element
33
- */
34
- export declare function rewriteAssetPaths<T>(elements: Iterable<T>, compSrcPath: string, getAttr: (el: T, attr: string) => string | null | undefined, setAttr: (el: T, attr: string, value: string) => void): void;
35
- /**
36
- * Rewrite CSS url(...) references inside inline style attributes.
37
- */
38
- export declare function rewriteInlineStyleAssetUrls<T>(elements: Iterable<T>, compSrcPath: string, getStyle: (el: T) => string | null | undefined, setStyle: (el: T, value: string) => void): void;
39
- /**
40
- * Rewrite CSS url(...) references in a sub-composition's inline styles so
41
- * ../foo.woff2 remains valid after the CSS is hoisted into the root document.
42
- */
43
- export declare function rewriteCssAssetUrls(cssText: string, compSrcPath: string): string;
1
+ export { rewriteAssetPath, rewriteAssetPaths, rewriteInlineStyleAssetUrls, rewriteCssAssetUrls, } from "@hyperframes/parsers/asset-paths";
44
2
  //# sourceMappingURL=rewriteSubCompPaths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rewriteSubCompPaths.d.ts","sourceRoot":"","sources":["../../src/compiler/rewriteSubCompPaths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAsBH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAQlF;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,EAC3D,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GACpD,IAAI,CAUN;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,EAC3C,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EACrB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9C,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GACvC,IAAI,CAYN;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAQhF"}
1
+ {"version":3,"file":"rewriteSubCompPaths.d.ts","sourceRoot":"","sources":["../../src/compiler/rewriteSubCompPaths.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,kCAAkC,CAAC"}
@@ -1,104 +1,3 @@
1
- /**
2
- * Rewrite relative asset paths in sub-composition content so they resolve
3
- * correctly after the content is inlined into the root document.
4
- *
5
- * A sub-composition at "compositions/scene.html" referencing "../icon.svg"
6
- * means the project root — but after inlining into root index.html, the
7
- * "../" escapes the project directory and causes 404s. This function
8
- * resolves each relative path against the sub-composition's directory,
9
- * then normalizes it to be relative to the project root.
10
- *
11
- * Used by both the core bundler (preview) and the producer compiler (render)
12
- * to ensure consistent behavior.
13
- */
14
- // URL paths in HTML output are POSIX regardless of host OS — use the `posix`
15
- // submodule so Windows builds don't emit backslash-separated paths (or worse,
16
- // drive-letter-prefixed artifacts from `resolve("/", ...)`).
17
- import { posix } from "path";
18
- const { join, resolve, dirname } = posix;
19
- import { CSS_URL_RE, PATH_ATTRS, isNonRelativeUrl } from "./assetPaths.js";
20
- const isAbsoluteOrSpecial = isNonRelativeUrl;
21
- /**
22
- * Returns true only for paths that traverse up with `../`.
23
- * Plain relative paths like `assets/foo.svg` are already correct from the
24
- * root perspective — the browser resolves them against the served root, which
25
- * is the project root, so they don't need rewriting.
26
- */
27
- function needsRewrite(val) {
28
- return val.startsWith("../") || val === "..";
29
- }
30
- /**
31
- * Rewrite a single relative path from a sub-composition's context to the
32
- * project root context.
33
- *
34
- * @param compSrcPath - The `data-composition-src` value (e.g. "compositions/scene.html")
35
- * @param relativePath - The asset path to rewrite (e.g. "../icon.svg")
36
- * @returns The rewritten path relative to project root (e.g. "icon.svg"), or
37
- * the original path if no rewriting is needed.
38
- */
39
- export function rewriteAssetPath(compSrcPath, relativePath) {
40
- if (isAbsoluteOrSpecial(relativePath))
41
- return relativePath;
42
- if (!needsRewrite(relativePath))
43
- return relativePath;
44
- const compDir = dirname(compSrcPath);
45
- if (!compDir || compDir === ".")
46
- return relativePath;
47
- const resolved = join(compDir, relativePath);
48
- const normalized = resolve("/", resolved).slice(1);
49
- return normalized;
50
- }
51
- /**
52
- * Rewrite all relative `src` and `href` attributes on elements within a
53
- * DOM tree, adjusting paths from the sub-composition's directory context
54
- * to the project root.
55
- *
56
- * @param elements - Iterable of DOM elements to scan (e.g. from querySelectorAll)
57
- * @param compSrcPath - The `data-composition-src` value
58
- * @param getAttr - Function to read an attribute from an element
59
- * @param setAttr - Function to set an attribute on an element
60
- */
61
- export function rewriteAssetPaths(elements, compSrcPath, getAttr, setAttr) {
62
- for (const el of elements) {
63
- for (const attr of PATH_ATTRS) {
64
- const val = (getAttr(el, attr) || "").trim();
65
- const rewritten = rewriteAssetPath(compSrcPath, val);
66
- if (rewritten !== val) {
67
- setAttr(el, attr, rewritten);
68
- }
69
- }
70
- }
71
- }
72
- /**
73
- * Rewrite CSS url(...) references inside inline style attributes.
74
- */
75
- export function rewriteInlineStyleAssetUrls(elements, compSrcPath, getStyle, setStyle) {
76
- const compDir = dirname(compSrcPath);
77
- if (!compDir || compDir === ".")
78
- return;
79
- for (const el of elements) {
80
- const style = getStyle(el);
81
- if (!style)
82
- continue;
83
- const rewritten = rewriteCssAssetUrls(style, compSrcPath);
84
- if (rewritten !== style) {
85
- setStyle(el, rewritten);
86
- }
87
- }
88
- }
89
- /**
90
- * Rewrite CSS url(...) references in a sub-composition's inline styles so
91
- * ../foo.woff2 remains valid after the CSS is hoisted into the root document.
92
- */
93
- export function rewriteCssAssetUrls(cssText, compSrcPath) {
94
- if (!cssText)
95
- return cssText;
96
- return cssText.replace(CSS_URL_RE, (full, quote, rawUrl) => {
97
- const urlValue = (rawUrl || "").trim();
98
- const rewritten = rewriteAssetPath(compSrcPath, urlValue);
99
- if (rewritten === urlValue)
100
- return full;
101
- return `url(${quote || ""}${rewritten}${quote || ""})`;
102
- });
103
- }
1
+ // Moved to @hyperframes/parsers. Re-exported here for back-compat.
2
+ export { rewriteAssetPath, rewriteAssetPaths, rewriteInlineStyleAssetUrls, rewriteCssAssetUrls, } from "@hyperframes/parsers/asset-paths";
104
3
  //# sourceMappingURL=rewriteSubCompPaths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rewriteSubCompPaths.js","sourceRoot":"","sources":["../../src/compiler/rewriteSubCompPaths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,6EAA6E;AAC7E,8EAA8E;AAC9E,6DAA6D;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAA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,CAAC"}
1
+ {"version":3,"file":"rewriteSubCompPaths.js","sourceRoot":"","sources":["../../src/compiler/rewriteSubCompPaths.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,kCAAkC,CAAC"}
@@ -1,91 +1,2 @@
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;
1
+ export { FONT_ALIAS_MAP, FONT_ALIAS_KEYS, CANONICAL_FONT_DISPLAY_NAMES, resolveAliasDisplayName, } from "@hyperframes/parsers";
91
2
  //# sourceMappingURL=aliases.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../src/fonts/aliases.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,eAAe,EACf,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,sBAAsB,CAAC"}
@@ -1,122 +1,3 @@
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
- }
1
+ // Moved to @hyperframes/parsers. Re-exported here for back-compat.
2
+ export { FONT_ALIAS_MAP, FONT_ALIAS_KEYS, CANONICAL_FONT_DISPLAY_NAMES, resolveAliasDisplayName, } from "@hyperframes/parsers";
122
3
  //# sourceMappingURL=aliases.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../src/fonts/aliases.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,yEAAyE;IACzE,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,eAAe,EAAE,eAAe;IAChC,eAAe,EAAE,eAAe;IAChC,YAAY,EAAE,YAAY;IAC1B,eAAe,EAAE,eAAe;IAChC,gBAAgB,EAAE,gBAAgB;IAClC,aAAa,EAAE,aAAa;IAC5B,kBAAkB,EAAE,kBAAkB;IACtC,iBAAiB,EAAE,iBAAiB;IACpC,cAAc,EAAE,cAAc;IAC9B,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAElB,yEAAyE;IACzE,gBAAgB,EAAE,OAAO;IACzB,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,OAAO;IACd,gBAAgB,EAAE,OAAO;IACzB,MAAM,EAAE,YAAY;IACpB,eAAe,EAAE,YAAY;IAC7B,aAAa,EAAE,YAAY;IAC3B,YAAY,EAAE,eAAe;IAC7B,aAAa,EAAE,gBAAgB;IAC/B,OAAO,EAAE,gBAAgB;IACzB,QAAQ,EAAE,aAAa;IACvB,oBAAoB,EAAE,cAAc;IACpC,UA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IAC5E,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,eAAe,EAAE,eAAe;IAChC,eAAe,EAAE,eAAe;IAChC,YAAY,EAAE,YAAY;IAC1B,eAAe,EAAE,eAAe;IAChC,gBAAgB,EAAE,gBAAgB;IAClC,aAAa,EAAE,aAAa;IAC5B,kBAAkB,EAAE,kBAAkB;IACtC,iBAAiB,EAAE,iBAAiB;IACpC,cAAc,EAAE,cAAc;IAC9B,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,MAAM;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"}
1
+ {"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../src/fonts/aliases.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,EACL,cAAc,EACd,eAAe,EACf,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-inline.js","sourceRoot":"","sources":["../../src/generated/runtime-inline.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,YAAY,GAAW,ultOAAultO,CAAC;AAErntO;;;;GAIG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO,YAAY,CAAC;AACtB,CAAC"}
1
+ {"version":3,"file":"runtime-inline.js","sourceRoot":"","sources":["../../src/generated/runtime-inline.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,YAAY,GAAW,2vtOAA2vtO,CAAC;AAEzxtO;;;;GAIG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO,YAAY,CAAC;AACtB,CAAC"}