@kensio/colophon 2.6.0 → 2.8.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/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +7 -0
- package/dist/core/index.js.map +1 -1
- package/dist/highlight/index.d.ts +1 -1
- package/dist/highlight/index.d.ts.map +1 -1
- package/dist/highlight/index.js +3 -3
- package/dist/highlight/index.js.map +1 -1
- package/dist/highlight/language.d.ts +10 -1
- package/dist/highlight/language.d.ts.map +1 -1
- package/dist/highlight/language.js +16 -2
- package/dist/highlight/language.js.map +1 -1
- package/dist/highlight/probe.d.ts +4 -0
- package/dist/highlight/probe.d.ts.map +1 -0
- package/dist/highlight/probe.js +4 -0
- package/dist/highlight/probe.js.map +1 -0
- package/dist/highlight/themes.d.ts +27 -0
- package/dist/highlight/themes.d.ts.map +1 -0
- package/dist/highlight/themes.js +88 -0
- package/dist/highlight/themes.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/validate/collect.d.ts +6 -1
- package/dist/validate/collect.d.ts.map +1 -1
- package/dist/validate/collect.js +6 -1
- package/dist/validate/collect.js.map +1 -1
- package/dist/validate/index.d.ts +1 -0
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +3 -2
- package/dist/validate/index.js.map +1 -1
- package/package.json +2 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -22,13 +22,15 @@
|
|
|
22
22
|
* honours. Importing this entry point from Node gets the Node halves and works
|
|
23
23
|
* as the root entry point does.
|
|
24
24
|
*/
|
|
25
|
-
export type { Background, Badge, BrandColors, CodeStyle, ColophonConfig, Dimensions, FontSource, GradientStop, ImageSource, MeasureText, MetaImageProps, MeshBlob, OutputFormat, OutputSize, Rasteriser, RenderedMetaImage, ResolvedConfig, Template, TemplateContext, Texture, TextStyle, ThemeName, WarningHandler, } from "../types.js";
|
|
25
|
+
export type { Background, Badge, BrandColors, CodeStyle, ColophonConfig, ContentOptions, Dimensions, FontSource, GradientStop, ImageSource, MeasureText, MetaImageProps, MeshBlob, OutputFormat, OutputSize, Rasteriser, RenderedMetaImage, ResolvedConfig, Template, TemplateContext, Texture, TextStyle, ThemeName, WarningHandler, } from "../types.js";
|
|
26
26
|
export { DEFAULT_CODE_FONT_FAMILY, DEFAULT_CODE_STYLE, DEFAULT_COLORS, DEFAULT_FONT_FAMILY, DEFAULT_SIZES, defineConfig, resolveConfig, SIZE_PRESETS, } from "../config/index.js";
|
|
27
27
|
export { resolveConfigForSize } from "../config/size.js";
|
|
28
28
|
export { buildSvg } from "../render/svg.js";
|
|
29
29
|
export { backgroundSvg } from "../background/index.js";
|
|
30
30
|
export { textureSvg } from "../texture/index.js";
|
|
31
31
|
export { bannerTemplate, builtinTemplates, cardTemplate, codeTemplate, } from "../templates/index.js";
|
|
32
|
+
export { extractProps } from "../content/props.js";
|
|
33
|
+
export { configProblems } from "../validate/index.js";
|
|
32
34
|
export { createMeasurer } from "../measure/index.js";
|
|
33
35
|
export { escapeXml, fitText, textElement, wrapText } from "../text/index.js";
|
|
34
36
|
export { dedent, expandTabs, highlightCode, resolveLanguage, } from "../highlight/index.js";
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,YAAY,EACV,UAAU,EACV,KAAK,EACL,WAAW,EACX,SAAS,EACT,cAAc,EACd,UAAU,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,QAAQ,EACR,eAAe,EACf,OAAO,EACP,SAAS,EACT,SAAS,EACT,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,YAAY,GACb,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,YAAY,EACV,UAAU,EACV,KAAK,EACL,WAAW,EACX,SAAS,EACT,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,QAAQ,EACR,eAAe,EACf,OAAO,EACP,SAAS,EACT,SAAS,EACT,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,YAAY,GACb,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EACL,MAAM,EACN,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EACL,cAAc,EACd,UAAU,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -4,6 +4,13 @@ export { buildSvg } from "../render/svg.js";
|
|
|
4
4
|
export { backgroundSvg } from "../background/index.js";
|
|
5
5
|
export { textureSvg } from "../texture/index.js";
|
|
6
6
|
export { bannerTemplate, builtinTemplates, cardTemplate, codeTemplate, } from "../templates/index.js";
|
|
7
|
+
// Imported from `content/props.js` rather than from `content/index.js`, whose
|
|
8
|
+
// other exports walk and read a content tree. `extractProps` is pure, and a
|
|
9
|
+
// bundle for the browser should not have to pull `node:fs` in behind it.
|
|
10
|
+
export { extractProps } from "../content/props.js";
|
|
11
|
+
// The problems in a config, rather than an exception carrying them. A build
|
|
12
|
+
// wants the throw; an editor rendering a config as it is typed wants the list.
|
|
13
|
+
export { configProblems } from "../validate/index.js";
|
|
7
14
|
export { createMeasurer } from "../measure/index.js";
|
|
8
15
|
export { escapeXml, fitText, textElement, wrapText } from "../text/index.js";
|
|
9
16
|
export { dedent, expandTabs, highlightCode, resolveLanguage, } from "../highlight/index.js";
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAmDA,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,YAAY,GACb,MAAM,uBAAuB,CAAC;AAE/B,8EAA8E;AAC9E,4EAA4E;AAC5E,yEAAyE;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,4EAA4E;AAC5E,+EAA+E;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EACL,MAAM,EACN,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAE/B,+EAA+E;AAC/E,kEAAkE;AAClE,OAAO,EACL,cAAc,EACd,UAAU,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HighlightedCode, HighlightOptions } from "./types.js";
|
|
2
2
|
export { dedent, expandTabs } from "./normalise.js";
|
|
3
|
-
export { resolveLanguage, resolveTheme } from "./language.js";
|
|
3
|
+
export { loadTheme, resolveLanguage, resolveTheme } from "./language.js";
|
|
4
4
|
export type { CodeToken, HighlightedCode, HighlightOptions } from "./types.js";
|
|
5
5
|
/**
|
|
6
6
|
* Tokenise a snippet with Shiki and flatten it onto a character grid.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/highlight/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEpE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/highlight/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEpE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACzE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE/E;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,CAoB1B"}
|
package/dist/highlight/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { codeToTokens } from "shiki";
|
|
2
2
|
import { gridLine } from "./grid.js";
|
|
3
|
-
import {
|
|
3
|
+
import { loadTheme, resolveLanguage } from "./language.js";
|
|
4
4
|
import { normaliseSnippet } from "./normalise.js";
|
|
5
5
|
export { dedent, expandTabs } from "./normalise.js";
|
|
6
|
-
export { resolveLanguage, resolveTheme } from "./language.js";
|
|
6
|
+
export { loadTheme, resolveLanguage, resolveTheme } from "./language.js";
|
|
7
7
|
/**
|
|
8
8
|
* Tokenise a snippet with Shiki and flatten it onto a character grid.
|
|
9
9
|
*
|
|
@@ -13,7 +13,7 @@ export { resolveLanguage, resolveTheme } from "./language.js";
|
|
|
13
13
|
export async function highlightCode(code, options) {
|
|
14
14
|
const result = await codeToTokens(normaliseSnippet(code, options.tabSize), {
|
|
15
15
|
lang: resolveLanguage(options.language),
|
|
16
|
-
theme:
|
|
16
|
+
theme: await loadTheme(options.theme),
|
|
17
17
|
});
|
|
18
18
|
let longestLine = 0;
|
|
19
19
|
const lines = result.tokens.map((tokens) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/highlight/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/highlight/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGzE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,IAAY,EACZ,OAAyB;IAEzB,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE;QACzE,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC;QACvC,KAAK,EAAE,MAAM,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;KACtC,CAAC,CAAC;IAEH,IAAI,WAAW,GAAG,CAAC,CAAC;IAEpB,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACzC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;QACzC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,KAAK;QACL,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,SAAS;QAClC,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,SAAS;QAClC,WAAW;KACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BundledLanguage, BundledTheme, SpecialLanguage } from "shiki";
|
|
1
|
+
import type { BundledLanguage, BundledTheme, SpecialLanguage, ThemeRegistration } from "shiki";
|
|
2
2
|
/**
|
|
3
3
|
* Map a frontmatter language name onto one Shiki understands, falling back to
|
|
4
4
|
* plain text so an unrecognised language still produces a readable image
|
|
@@ -10,4 +10,13 @@ export declare function resolveLanguage(language: string): BundledLanguage | Spe
|
|
|
10
10
|
* fall back quietly, but a bad theme is a config mistake worth failing on.
|
|
11
11
|
*/
|
|
12
12
|
export declare function resolveTheme(theme: string): BundledTheme;
|
|
13
|
+
/**
|
|
14
|
+
* Load a configured theme's data.
|
|
15
|
+
*
|
|
16
|
+
* Shiki takes a theme as a name or as the thing itself, and this hands it the
|
|
17
|
+
* thing, so the only registry either side of the call reads is the one in
|
|
18
|
+
* `themes.ts`. See there for why that matters. The import is cached by the
|
|
19
|
+
* module system, so a build highlighting a hundred snippets loads a theme once.
|
|
20
|
+
*/
|
|
21
|
+
export declare function loadTheme(theme: string): Promise<ThemeRegistration>;
|
|
13
22
|
//# sourceMappingURL=language.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../src/highlight/language.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../src/highlight/language.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,eAAe,EACf,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAwBf;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,GACf,eAAe,GAAG,eAAe,CAOnC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAQxD;AAED;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAKzE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { bundledLanguages
|
|
1
|
+
import { bundledLanguages } from "shiki";
|
|
2
|
+
import { codeThemes } from "./themes.js";
|
|
2
3
|
/**
|
|
3
4
|
* Language names that differ between Pygments (which the original Python
|
|
4
5
|
* script used) and Shiki. Everything else is passed through, since Shiki
|
|
@@ -33,9 +34,22 @@ export function resolveLanguage(language) {
|
|
|
33
34
|
* fall back quietly, but a bad theme is a config mistake worth failing on.
|
|
34
35
|
*/
|
|
35
36
|
export function resolveTheme(theme) {
|
|
36
|
-
if (!Object.hasOwn(
|
|
37
|
+
if (!Object.hasOwn(codeThemes, theme)) {
|
|
37
38
|
throw new Error(`Unknown code theme "${theme}". See https://shiki.style/themes for the available names.`);
|
|
38
39
|
}
|
|
39
40
|
return theme;
|
|
40
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Load a configured theme's data.
|
|
44
|
+
*
|
|
45
|
+
* Shiki takes a theme as a name or as the thing itself, and this hands it the
|
|
46
|
+
* thing, so the only registry either side of the call reads is the one in
|
|
47
|
+
* `themes.ts`. See there for why that matters. The import is cached by the
|
|
48
|
+
* module system, so a build highlighting a hundred snippets loads a theme once.
|
|
49
|
+
*/
|
|
50
|
+
export async function loadTheme(theme) {
|
|
51
|
+
const load = codeThemes[resolveTheme(theme)];
|
|
52
|
+
const loaded = await load();
|
|
53
|
+
return loaded.default;
|
|
54
|
+
}
|
|
41
55
|
//# sourceMappingURL=language.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language.js","sourceRoot":"","sources":["../../src/highlight/language.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"language.js","sourceRoot":"","sources":["../../src/highlight/language.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,eAAe,GAAgC,IAAI,GAAG,CAAC;IAC3D,CAAC,iBAAiB,EAAE,YAAY,CAAC;IACjC,CAAC,aAAa,EAAE,YAAY,CAAC;IAC7B,CAAC,YAAY,EAAE,YAAY,CAAC;IAC5B,CAAC,UAAU,EAAE,KAAK,CAAC;IACnB,CAAC,SAAS,EAAE,cAAc,CAAC;IAC3B,CAAC,eAAe,EAAE,cAAc,CAAC;IACjC,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,OAAO,EAAE,WAAW,CAAC;CACvB,CAAC,CAAC;AAEH,MAAM,SAAS,GAAoB,WAAW,CAAC;AAE/C;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAgB;IAEhB,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACjD,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC;IAE9D,OAAO,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC;QAC7C,CAAC,CAAE,OAA2B;QAC9B,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CACb,uBAAuB,KAAK,4DAA4D,CACzF,CAAC;IACJ,CAAC;IAED,OAAO,KAAqB,CAAC;AAC/B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,KAAa;IAC3C,MAAM,IAAI,GAAG,UAAU,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;IAE5B,OAAO,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe.d.ts","sourceRoot":"","sources":["../../src/highlight/probe.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;CAEzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe.js","sourceRoot":"","sources":["../../src/highlight/probe.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,WAAW,CAC7C,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAC/C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BundledTheme, ThemeRegistration } from "shiki";
|
|
2
|
+
/** Loads one theme's data, which is a chunk of its own in a bundle. */
|
|
3
|
+
export type CodeThemeLoader = () => Promise<{
|
|
4
|
+
default: ThemeRegistration;
|
|
5
|
+
}>;
|
|
6
|
+
/**
|
|
7
|
+
* Every theme Shiki bundles, as a registry of Colophon's own.
|
|
8
|
+
*
|
|
9
|
+
* Shiki has this map already, and reading it was what this used to do. It does
|
|
10
|
+
* not survive every browser build. Expressive Code, which a Starlight site runs
|
|
11
|
+
* by default, rewrites Shiki's own `themes.mjs` during the build to drop every
|
|
12
|
+
* theme its configuration does not name, under an option called
|
|
13
|
+
* `removeUnusedThemes`. That transform applies to the file rather than to one
|
|
14
|
+
* importer of it, so a second Shiki caller in the same build, which is what
|
|
15
|
+
* Colophon is on a site with a browser playground, is left with an empty
|
|
16
|
+
* registry: every theme name is unknown, including the default nobody typed.
|
|
17
|
+
*
|
|
18
|
+
* Owning the map is what makes that irrelevant, since these imports are
|
|
19
|
+
* Colophon's own and nothing rewrites them. The loaded theme is then passed to
|
|
20
|
+
* `codeToTokens` as an object rather than as a name, so Shiki's registry is not
|
|
21
|
+
* consulted on the way through either.
|
|
22
|
+
*
|
|
23
|
+
* The type is what keeps the list honest: `Record<BundledTheme, ...>` fails to
|
|
24
|
+
* compile if a Shiki upgrade adds a theme that is missing here, or renames one.
|
|
25
|
+
*/
|
|
26
|
+
export declare const codeThemes: Record<BundledTheme, CodeThemeLoader>;
|
|
27
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/highlight/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE7D,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,iBAAiB,CAAA;CAAE,CAAC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,eAAe,CAuE5D,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every theme Shiki bundles, as a registry of Colophon's own.
|
|
3
|
+
*
|
|
4
|
+
* Shiki has this map already, and reading it was what this used to do. It does
|
|
5
|
+
* not survive every browser build. Expressive Code, which a Starlight site runs
|
|
6
|
+
* by default, rewrites Shiki's own `themes.mjs` during the build to drop every
|
|
7
|
+
* theme its configuration does not name, under an option called
|
|
8
|
+
* `removeUnusedThemes`. That transform applies to the file rather than to one
|
|
9
|
+
* importer of it, so a second Shiki caller in the same build, which is what
|
|
10
|
+
* Colophon is on a site with a browser playground, is left with an empty
|
|
11
|
+
* registry: every theme name is unknown, including the default nobody typed.
|
|
12
|
+
*
|
|
13
|
+
* Owning the map is what makes that irrelevant, since these imports are
|
|
14
|
+
* Colophon's own and nothing rewrites them. The loaded theme is then passed to
|
|
15
|
+
* `codeToTokens` as an object rather than as a name, so Shiki's registry is not
|
|
16
|
+
* consulted on the way through either.
|
|
17
|
+
*
|
|
18
|
+
* The type is what keeps the list honest: `Record<BundledTheme, ...>` fails to
|
|
19
|
+
* compile if a Shiki upgrade adds a theme that is missing here, or renames one.
|
|
20
|
+
*/
|
|
21
|
+
export const codeThemes = {
|
|
22
|
+
andromeeda: () => import("@shikijs/themes/andromeeda"),
|
|
23
|
+
"aurora-x": () => import("@shikijs/themes/aurora-x"),
|
|
24
|
+
"ayu-dark": () => import("@shikijs/themes/ayu-dark"),
|
|
25
|
+
"ayu-light": () => import("@shikijs/themes/ayu-light"),
|
|
26
|
+
"ayu-mirage": () => import("@shikijs/themes/ayu-mirage"),
|
|
27
|
+
"catppuccin-frappe": () => import("@shikijs/themes/catppuccin-frappe"),
|
|
28
|
+
"catppuccin-latte": () => import("@shikijs/themes/catppuccin-latte"),
|
|
29
|
+
"catppuccin-macchiato": () => import("@shikijs/themes/catppuccin-macchiato"),
|
|
30
|
+
"catppuccin-mocha": () => import("@shikijs/themes/catppuccin-mocha"),
|
|
31
|
+
"dark-plus": () => import("@shikijs/themes/dark-plus"),
|
|
32
|
+
dracula: () => import("@shikijs/themes/dracula"),
|
|
33
|
+
"dracula-soft": () => import("@shikijs/themes/dracula-soft"),
|
|
34
|
+
"everforest-dark": () => import("@shikijs/themes/everforest-dark"),
|
|
35
|
+
"everforest-light": () => import("@shikijs/themes/everforest-light"),
|
|
36
|
+
"github-dark": () => import("@shikijs/themes/github-dark"),
|
|
37
|
+
"github-dark-default": () => import("@shikijs/themes/github-dark-default"),
|
|
38
|
+
"github-dark-dimmed": () => import("@shikijs/themes/github-dark-dimmed"),
|
|
39
|
+
"github-dark-high-contrast": () => import("@shikijs/themes/github-dark-high-contrast"),
|
|
40
|
+
"github-light": () => import("@shikijs/themes/github-light"),
|
|
41
|
+
"github-light-default": () => import("@shikijs/themes/github-light-default"),
|
|
42
|
+
"github-light-high-contrast": () => import("@shikijs/themes/github-light-high-contrast"),
|
|
43
|
+
"gruvbox-dark-hard": () => import("@shikijs/themes/gruvbox-dark-hard"),
|
|
44
|
+
"gruvbox-dark-medium": () => import("@shikijs/themes/gruvbox-dark-medium"),
|
|
45
|
+
"gruvbox-dark-soft": () => import("@shikijs/themes/gruvbox-dark-soft"),
|
|
46
|
+
"gruvbox-light-hard": () => import("@shikijs/themes/gruvbox-light-hard"),
|
|
47
|
+
"gruvbox-light-medium": () => import("@shikijs/themes/gruvbox-light-medium"),
|
|
48
|
+
"gruvbox-light-soft": () => import("@shikijs/themes/gruvbox-light-soft"),
|
|
49
|
+
horizon: () => import("@shikijs/themes/horizon"),
|
|
50
|
+
"horizon-bright": () => import("@shikijs/themes/horizon-bright"),
|
|
51
|
+
houston: () => import("@shikijs/themes/houston"),
|
|
52
|
+
"kanagawa-dragon": () => import("@shikijs/themes/kanagawa-dragon"),
|
|
53
|
+
"kanagawa-lotus": () => import("@shikijs/themes/kanagawa-lotus"),
|
|
54
|
+
"kanagawa-wave": () => import("@shikijs/themes/kanagawa-wave"),
|
|
55
|
+
laserwave: () => import("@shikijs/themes/laserwave"),
|
|
56
|
+
"light-plus": () => import("@shikijs/themes/light-plus"),
|
|
57
|
+
"material-theme": () => import("@shikijs/themes/material-theme"),
|
|
58
|
+
"material-theme-darker": () => import("@shikijs/themes/material-theme-darker"),
|
|
59
|
+
"material-theme-lighter": () => import("@shikijs/themes/material-theme-lighter"),
|
|
60
|
+
"material-theme-ocean": () => import("@shikijs/themes/material-theme-ocean"),
|
|
61
|
+
"material-theme-palenight": () => import("@shikijs/themes/material-theme-palenight"),
|
|
62
|
+
"min-dark": () => import("@shikijs/themes/min-dark"),
|
|
63
|
+
"min-light": () => import("@shikijs/themes/min-light"),
|
|
64
|
+
monokai: () => import("@shikijs/themes/monokai"),
|
|
65
|
+
"night-owl": () => import("@shikijs/themes/night-owl"),
|
|
66
|
+
"night-owl-light": () => import("@shikijs/themes/night-owl-light"),
|
|
67
|
+
nord: () => import("@shikijs/themes/nord"),
|
|
68
|
+
"one-dark-pro": () => import("@shikijs/themes/one-dark-pro"),
|
|
69
|
+
"one-light": () => import("@shikijs/themes/one-light"),
|
|
70
|
+
plastic: () => import("@shikijs/themes/plastic"),
|
|
71
|
+
poimandres: () => import("@shikijs/themes/poimandres"),
|
|
72
|
+
red: () => import("@shikijs/themes/red"),
|
|
73
|
+
"rose-pine": () => import("@shikijs/themes/rose-pine"),
|
|
74
|
+
"rose-pine-dawn": () => import("@shikijs/themes/rose-pine-dawn"),
|
|
75
|
+
"rose-pine-moon": () => import("@shikijs/themes/rose-pine-moon"),
|
|
76
|
+
"slack-dark": () => import("@shikijs/themes/slack-dark"),
|
|
77
|
+
"slack-ochin": () => import("@shikijs/themes/slack-ochin"),
|
|
78
|
+
"snazzy-light": () => import("@shikijs/themes/snazzy-light"),
|
|
79
|
+
"solarized-dark": () => import("@shikijs/themes/solarized-dark"),
|
|
80
|
+
"solarized-light": () => import("@shikijs/themes/solarized-light"),
|
|
81
|
+
"synthwave-84": () => import("@shikijs/themes/synthwave-84"),
|
|
82
|
+
"tokyo-night": () => import("@shikijs/themes/tokyo-night"),
|
|
83
|
+
vesper: () => import("@shikijs/themes/vesper"),
|
|
84
|
+
"vitesse-black": () => import("@shikijs/themes/vitesse-black"),
|
|
85
|
+
"vitesse-dark": () => import("@shikijs/themes/vitesse-dark"),
|
|
86
|
+
"vitesse-light": () => import("@shikijs/themes/vitesse-light"),
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=themes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/highlight/themes.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,UAAU,GAA0C;IAC/D,UAAU,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,4BAA4B,CAAC;IACtD,UAAU,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC;IACpD,UAAU,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC;IACpD,WAAW,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,2BAA2B,CAAC;IACtD,YAAY,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,4BAA4B,CAAC;IACxD,mBAAmB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,mCAAmC,CAAC;IACtE,kBAAkB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,kCAAkC,CAAC;IACpE,sBAAsB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sCAAsC,CAAC;IAC5E,kBAAkB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,kCAAkC,CAAC;IACpE,WAAW,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,2BAA2B,CAAC;IACtD,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC;IAChD,cAAc,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,8B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,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC;IACxC,WAAW,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,2BAA2B,CAAC;IACtD,gBAAgB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,gCAAgC,CAAC;IAChE,gBAAgB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,gCAAgC,CAAC;IAChE,YAAY,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,4BAA4B,CAAC;IACxD,aAAa,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,6BAA6B,CAAC;IAC1D,cAAc,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,8BAA8B,CAAC;IAC5D,gBAAgB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,gCAAgC,CAAC;IAChE,iBAAiB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,iCAAiC,CAAC;IAClE,cAAc,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,8BAA8B,CAAC;IAC5D,aAAa,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,6BAA6B,CAAC;IAC1D,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC;IAC9C,eAAe,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,+BAA+B,CAAC;IAC9D,cAAc,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,8BAA8B,CAAC;IAC5D,eAAe,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,+BAA+B,CAAC;CAC/D,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { blockLines, box, distribute, drawLines, image, inset, measureIn, option
|
|
|
20
20
|
export type { Align, BoxStyle, Extent, ImageOptions, LinesStyle, Placed, PlacedLine, PanelStyle, Rect, RowRect, ScrimOptions, Span, StackedRect, StyledBlock, TextBlock, TextLine, } from "./layout/index.js";
|
|
21
21
|
export { defaultContentExtensions, extractProps, readContentFile, slugFromPath, walkContent, } from "./content/index.js";
|
|
22
22
|
export type { WalkOptions } from "./content/index.js";
|
|
23
|
+
export { configProblems, validateConfig } from "./validate/index.js";
|
|
23
24
|
export { metaTags, metaTagsHtml } from "./meta/index.js";
|
|
24
25
|
export { signatureParam, signParams, signedQuery, verifyParams, verifySignedQuery, } from "./sign/index.js";
|
|
25
26
|
export type { SignedParams } from "./sign/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,KAAK,EACL,WAAW,EACX,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,WAAW,EACX,OAAO,EACP,cAAc,EACd,YAAY,EACZ,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,QAAQ,EACR,eAAe,EACf,OAAO,EACP,SAAS,EACT,SAAS,EACT,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,YAAY,EAAE,MAA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,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,KAAK,EACL,WAAW,EACX,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,WAAW,EACX,OAAO,EACP,cAAc,EACd,YAAY,EACZ,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,QAAQ,EACR,eAAe,EACf,OAAO,EACP,SAAS,EACT,SAAS,EACT,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,YAAY,GACb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,M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qB,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EACL,cAAc,EACd,UAAU,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,9 @@ export { escapeXml, fitText, textElement, wrapText } from "./text/index.js";
|
|
|
19
19
|
// for a template that would rather not pull the rasteriser in with it.
|
|
20
20
|
export { blockLines, box, distribute, drawLines, image, inset, measureIn, optionalString, panel, placeLines, row, scrim, stack, } from "./layout/index.js";
|
|
21
21
|
export { defaultContentExtensions, extractProps, readContentFile, slugFromPath, walkContent, } from "./content/index.js";
|
|
22
|
+
// `resolveConfig` validates what it is given and throws, which is what a build
|
|
23
|
+
// wants. These are for a caller that would rather show the problems than stop.
|
|
24
|
+
export { configProblems, validateConfig } from "./validate/index.js";
|
|
22
25
|
export { metaTags, metaTagsHtml } from "./meta/index.js";
|
|
23
26
|
export { signatureParam, signParams, signedQuery, verifyParams, verifySignedQuery, } from "./sign/index.js";
|
|
24
27
|
export { createPlacer } from "./placement/index.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuCA,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC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,SAAS,EACT,cAAc,EACd,KAAK,EACL,UAAU,EACV,GAAG,EACH,KAAK,EACL,KAAK,GACN,MAAM,mBAAmB,CAAC;AAoB3B,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAG5B,+EAA+E;AAC/E,+EAA+E;AAC/E,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EACL,cAAc,EACd,UAAU,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -4,6 +4,11 @@ import type { ColophonConfig } from "../types.js";
|
|
|
4
4
|
*
|
|
5
5
|
* Collecting rather than throwing at the first problem is the point: a config
|
|
6
6
|
* with three typos in it should take one run to fix rather than three.
|
|
7
|
+
*
|
|
8
|
+
* `validateConfig` is this with the list turned into an exception, which is
|
|
9
|
+
* what a build wants: it has nowhere to put a problem but the end of the run.
|
|
10
|
+
* An editor rendering a config as someone types it does have somewhere, so it
|
|
11
|
+
* takes the list.
|
|
7
12
|
*/
|
|
8
|
-
export declare function
|
|
13
|
+
export declare function configProblems(config: ColophonConfig): string[];
|
|
9
14
|
//# sourceMappingURL=collect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect.d.ts","sourceRoot":"","sources":["../../src/validate/collect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAiBlD
|
|
1
|
+
{"version":3,"file":"collect.d.ts","sourceRoot":"","sources":["../../src/validate/collect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAiBlD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,EAAE,CAoC/D"}
|
package/dist/validate/collect.js
CHANGED
|
@@ -10,8 +10,13 @@ import { checkFormat, checkSlugStrategy, checkTheme } from "./values.js";
|
|
|
10
10
|
*
|
|
11
11
|
* Collecting rather than throwing at the first problem is the point: a config
|
|
12
12
|
* with three typos in it should take one run to fix rather than three.
|
|
13
|
+
*
|
|
14
|
+
* `validateConfig` is this with the list turned into an exception, which is
|
|
15
|
+
* what a build wants: it has nowhere to put a problem but the end of the run.
|
|
16
|
+
* An editor rendering a config as someone types it does have somewhere, so it
|
|
17
|
+
* takes the list.
|
|
13
18
|
*/
|
|
14
|
-
export function
|
|
19
|
+
export function configProblems(config) {
|
|
15
20
|
// The types say what should be here; validation exists for when it is not.
|
|
16
21
|
const raw = config;
|
|
17
22
|
const problems = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect.js","sourceRoot":"","sources":["../../src/validate/collect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,QAAQ,EACR,eAAe,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzE
|
|
1
|
+
{"version":3,"file":"collect.js","sourceRoot":"","sources":["../../src/validate/collect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAA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AK,EAAE,QAAQ,CAAC,CAAC;IACjC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAClD,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAChC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAClC,eAAe,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;IACxD,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC/C,cAAc,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAExC,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/validate/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAa3D"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAa3D"}
|
package/dist/validate/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { configProblems } from "./collect.js";
|
|
2
|
+
export { configProblems } from "./collect.js";
|
|
2
3
|
/**
|
|
3
4
|
* Reject a config carrying options Colophon does not know.
|
|
4
5
|
*
|
|
@@ -12,7 +13,7 @@ import { collectProblems } from "./collect.js";
|
|
|
12
13
|
* reads whatever fields it understands.
|
|
13
14
|
*/
|
|
14
15
|
export function validateConfig(config) {
|
|
15
|
-
const problems =
|
|
16
|
+
const problems = configProblems(config);
|
|
16
17
|
const [first, ...rest] = problems;
|
|
17
18
|
if (first === undefined) {
|
|
18
19
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAC,MAAsB;IACnD,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC;IAElC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO;IACT,CAAC;IAED,MAAM,IAAI,KAAK,CACb,IAAI,CAAC,MAAM,KAAK,CAAC;QACf,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,oBAAoB,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACjF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"homepage": "https://github.com/KensioSoftware/colophon#readme",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
|
-
"version": "2.
|
|
11
|
+
"version": "2.8.0",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"main": "./dist/index.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"@resvg/resvg-js": "^2.6.2",
|
|
101
|
+
"@shikijs/themes": "^4.3.1",
|
|
101
102
|
"fontkit": "^2.0.4",
|
|
102
103
|
"gray-matter": "^4.0.3",
|
|
103
104
|
"sharp": "^0.35.3",
|