@kensio/colophon 2.3.0 → 2.4.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/README.md +62 -801
- package/dist/background.d.ts +7 -2
- package/dist/background.d.ts.map +1 -1
- package/dist/background.js +44 -1
- package/dist/background.js.map +1 -1
- package/dist/cli/args.d.ts +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +1 -1
- package/dist/cli/config.d.ts +1 -1
- package/dist/cli/config.js +1 -1
- package/dist/config/defaults.d.ts +8 -7
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +8 -8
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +5 -3
- package/dist/config/index.js.map +1 -1
- package/dist/config/resolve.d.ts +7 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +16 -0
- package/dist/config/resolve.js.map +1 -1
- package/dist/config/size.d.ts +1 -1
- package/dist/config/size.d.ts.map +1 -1
- package/dist/config/size.js +3 -2
- package/dist/config/size.js.map +1 -1
- package/dist/content/props.d.ts +2 -2
- package/dist/content/props.js +2 -2
- package/dist/content/slug.d.ts +5 -5
- package/dist/content/slug.js +6 -6
- package/dist/content/slug.js.map +1 -1
- package/dist/content/walk.d.ts +1 -1
- package/dist/content/walk.js +1 -1
- package/dist/fonts/index.d.ts +3 -2
- package/dist/fonts/index.d.ts.map +1 -1
- package/dist/fonts/index.js +3 -2
- package/dist/fonts/index.js.map +1 -1
- package/dist/fonts/resolve.js +1 -1
- package/dist/generate/extra.js +4 -4
- package/dist/generate/extra.js.map +1 -1
- package/dist/generate/options.d.ts +1 -1
- package/dist/generate/outputs.d.ts +4 -4
- package/dist/generate/outputs.js +4 -4
- package/dist/highlight/language.d.ts +2 -3
- package/dist/highlight/language.d.ts.map +1 -1
- package/dist/highlight/language.js +3 -4
- package/dist/highlight/language.js.map +1 -1
- package/dist/highlight/normalise.d.ts +2 -2
- package/dist/highlight/normalise.js +2 -2
- package/dist/image/index.d.ts +18 -0
- package/dist/image/index.d.ts.map +1 -0
- package/dist/image/index.js +42 -0
- package/dist/image/index.js.map +1 -0
- package/dist/image/jpeg.d.ts +10 -0
- package/dist/image/jpeg.d.ts.map +1 -0
- package/dist/image/jpeg.js +57 -0
- package/dist/image/jpeg.js.map +1 -0
- package/dist/image/load.d.ts +4 -0
- package/dist/image/load.d.ts.map +1 -0
- package/dist/image/load.js +60 -0
- package/dist/image/load.js.map +1 -0
- package/dist/image/media.d.ts +10 -0
- package/dist/image/media.d.ts.map +1 -0
- package/dist/image/media.js +37 -0
- package/dist/image/media.js.map +1 -0
- package/dist/image/resolve.d.ts +13 -0
- package/dist/image/resolve.d.ts.map +1 -0
- package/dist/image/resolve.js +38 -0
- package/dist/image/resolve.js.map +1 -0
- package/dist/image/size.d.ts +22 -0
- package/dist/image/size.d.ts.map +1 -0
- package/dist/image/size.js +60 -0
- package/dist/image/size.js.map +1 -0
- package/dist/image/svg.d.ts +12 -0
- package/dist/image/svg.d.ts.map +1 -0
- package/dist/image/svg.js +61 -0
- package/dist/image/svg.js.map +1 -0
- package/dist/image/uri.d.ts +9 -0
- package/dist/image/uri.d.ts.map +1 -0
- package/dist/image/uri.js +22 -0
- package/dist/image/uri.js.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/block.d.ts +37 -0
- package/dist/layout/block.d.ts.map +1 -0
- package/dist/layout/block.js +26 -0
- package/dist/layout/block.js.map +1 -0
- package/dist/layout/box.d.ts +20 -0
- package/dist/layout/box.d.ts.map +1 -0
- package/dist/layout/box.js +61 -0
- package/dist/layout/box.js.map +1 -0
- package/dist/layout/distribute.d.ts +15 -0
- package/dist/layout/distribute.d.ts.map +1 -0
- package/dist/layout/distribute.js +30 -0
- package/dist/layout/distribute.js.map +1 -0
- package/dist/layout/image.d.ts +42 -0
- package/dist/layout/image.d.ts.map +1 -0
- package/dist/layout/image.js +34 -0
- package/dist/layout/image.js.map +1 -0
- package/dist/layout/index.d.ts +40 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +30 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/lines.d.ts +45 -0
- package/dist/layout/lines.d.ts.map +1 -0
- package/dist/layout/lines.js +71 -0
- package/dist/layout/lines.js.map +1 -0
- package/dist/layout/measure.d.ts +11 -0
- package/dist/layout/measure.d.ts.map +1 -0
- package/dist/layout/measure.js +11 -0
- package/dist/layout/measure.js.map +1 -0
- package/dist/layout/panel.d.ts +20 -0
- package/dist/layout/panel.d.ts.map +1 -0
- package/dist/layout/panel.js +22 -0
- package/dist/layout/panel.js.map +1 -0
- package/dist/layout/row.d.ts +15 -0
- package/dist/layout/row.d.ts.map +1 -0
- package/dist/layout/row.js +20 -0
- package/dist/layout/row.js.map +1 -0
- package/dist/layout/scrim.d.ts +23 -0
- package/dist/layout/scrim.d.ts.map +1 -0
- package/dist/layout/scrim.js +38 -0
- package/dist/layout/scrim.js.map +1 -0
- package/dist/layout/stack.d.ts +14 -0
- package/dist/layout/stack.d.ts.map +1 -0
- package/dist/layout/stack.js +19 -0
- package/dist/layout/stack.js.map +1 -0
- package/dist/layout/types.d.ts +49 -0
- package/dist/layout/types.d.ts.map +1 -0
- package/dist/layout/types.js +2 -0
- package/dist/layout/types.js.map +1 -0
- package/dist/manifest/build.d.ts +1 -1
- package/dist/manifest/build.js +1 -1
- package/dist/manifest/index.d.ts +1 -1
- package/dist/manifest/index.js +1 -1
- package/dist/manifest/order.d.ts +1 -1
- package/dist/manifest/order.js +1 -1
- package/dist/manifest/page.d.ts +2 -2
- package/dist/manifest/page.js +3 -3
- package/dist/measure/estimate.d.ts +10 -0
- package/dist/measure/estimate.d.ts.map +1 -0
- package/dist/measure/estimate.js +58 -0
- package/dist/measure/estimate.js.map +1 -0
- package/dist/measure/faces.d.ts +15 -0
- package/dist/measure/faces.d.ts.map +1 -0
- package/dist/measure/faces.js +70 -0
- package/dist/measure/faces.js.map +1 -0
- package/dist/measure/index.d.ts +16 -0
- package/dist/measure/index.d.ts.map +1 -0
- package/dist/measure/index.js +0 -0
- package/dist/measure/index.js.map +1 -0
- package/dist/measure/runs.d.ts +17 -0
- package/dist/measure/runs.d.ts.map +1 -0
- package/dist/measure/runs.js +39 -0
- package/dist/measure/runs.js.map +1 -0
- package/dist/measure/select.d.ts +13 -0
- package/dist/measure/select.d.ts.map +1 -0
- package/dist/measure/select.js +47 -0
- package/dist/measure/select.js.map +1 -0
- package/dist/meta/tags.d.ts +6 -6
- package/dist/meta/tags.js +6 -6
- package/dist/meta/url.d.ts +4 -4
- package/dist/meta/url.js +4 -4
- package/dist/placement/check.d.ts +1 -1
- package/dist/placement/check.js +1 -1
- package/dist/placement/index.js +1 -1
- package/dist/placement/relative.d.ts +3 -3
- package/dist/placement/relative.js +3 -3
- package/dist/pool.d.ts +2 -2
- package/dist/pool.js +3 -3
- package/dist/pool.js.map +1 -1
- package/dist/props.d.ts +7 -0
- package/dist/props.d.ts.map +1 -0
- package/dist/props.js +17 -0
- package/dist/props.js.map +1 -0
- package/dist/render/svg.d.ts +4 -2
- package/dist/render/svg.d.ts.map +1 -1
- package/dist/render/svg.js +19 -4
- package/dist/render/svg.js.map +1 -1
- package/dist/stamp/config-digest.d.ts.map +1 -1
- package/dist/stamp/config-digest.js +20 -1
- package/dist/stamp/config-digest.js.map +1 -1
- package/dist/stamp/index.js +2 -2
- package/dist/stamp/index.js.map +1 -1
- package/dist/stamp/read.d.ts +1 -1
- package/dist/stamp/read.js +4 -4
- package/dist/templates/attribution.d.ts +17 -0
- package/dist/templates/attribution.d.ts.map +1 -0
- package/dist/templates/attribution.js +39 -0
- package/dist/templates/attribution.js.map +1 -0
- package/dist/templates/banner/badge.d.ts.map +1 -1
- package/dist/templates/banner/badge.js +3 -6
- package/dist/templates/banner/badge.js.map +1 -1
- package/dist/templates/banner/index.d.ts +3 -0
- package/dist/templates/banner/index.d.ts.map +1 -1
- package/dist/templates/banner/index.js +37 -35
- package/dist/templates/banner/index.js.map +1 -1
- package/dist/templates/banner/lines.d.ts +7 -12
- package/dist/templates/banner/lines.d.ts.map +1 -1
- package/dist/templates/banner/lines.js +23 -34
- package/dist/templates/banner/lines.js.map +1 -1
- package/dist/templates/banner/version.d.ts +9 -0
- package/dist/templates/banner/version.d.ts.map +1 -0
- package/dist/templates/banner/version.js +21 -0
- package/dist/templates/banner/version.js.map +1 -0
- package/dist/templates/card/index.d.ts +4 -1
- package/dist/templates/card/index.d.ts.map +1 -1
- package/dist/templates/card/index.js +37 -25
- package/dist/templates/card/index.js.map +1 -1
- package/dist/templates/card/lines.d.ts +17 -13
- package/dist/templates/card/lines.d.ts.map +1 -1
- package/dist/templates/card/lines.js +24 -20
- package/dist/templates/card/lines.js.map +1 -1
- package/dist/templates/code/chrome.d.ts +7 -3
- package/dist/templates/code/chrome.d.ts.map +1 -1
- package/dist/templates/code/chrome.js +12 -11
- package/dist/templates/code/chrome.js.map +1 -1
- package/dist/templates/code/clip.d.ts +1 -1
- package/dist/templates/code/clip.js +1 -1
- package/dist/templates/code/fit.d.ts +2 -2
- package/dist/templates/code/fit.d.ts.map +1 -1
- package/dist/templates/code/fit.js +4 -4
- package/dist/templates/code/fit.js.map +1 -1
- package/dist/templates/code/index.d.ts.map +1 -1
- package/dist/templates/code/index.js +7 -6
- package/dist/templates/code/index.js.map +1 -1
- package/dist/templates/code/layout.d.ts +1 -1
- package/dist/templates/code/layout.d.ts.map +1 -1
- package/dist/templates/code/layout.js +6 -6
- package/dist/templates/code/layout.js.map +1 -1
- package/dist/templates/code/panel.d.ts +13 -0
- package/dist/templates/code/panel.d.ts.map +1 -1
- package/dist/templates/code/panel.js +34 -2
- package/dist/templates/code/panel.js.map +1 -1
- package/dist/templates/code/plate.d.ts +3 -1
- package/dist/templates/code/plate.d.ts.map +1 -1
- package/dist/templates/code/plate.js +11 -9
- package/dist/templates/code/plate.js.map +1 -1
- package/dist/templates/code/spans.js +1 -1
- package/dist/templates/code/spans.js.map +1 -1
- package/dist/templates/code/width.d.ts +10 -0
- package/dist/templates/code/width.d.ts.map +1 -0
- package/dist/templates/code/width.js +26 -0
- package/dist/templates/code/width.js.map +1 -0
- package/dist/templates/footer.d.ts +8 -0
- package/dist/templates/footer.d.ts.map +1 -1
- package/dist/templates/footer.js +11 -1
- package/dist/templates/footer.js.map +1 -1
- package/dist/templates/index.d.ts +1 -1
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +1 -1
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/logo.d.ts +15 -0
- package/dist/templates/logo.d.ts.map +1 -0
- package/dist/templates/logo.js +30 -0
- package/dist/templates/logo.js.map +1 -0
- package/dist/templates/measure.d.ts +11 -0
- package/dist/templates/measure.d.ts.map +1 -0
- package/dist/templates/measure.js +11 -0
- package/dist/templates/measure.js.map +1 -0
- package/dist/templates/props.d.ts +2 -2
- package/dist/templates/props.js +2 -2
- package/dist/templates/text.d.ts +37 -0
- package/dist/templates/text.d.ts.map +1 -0
- package/dist/templates/text.js +26 -0
- package/dist/templates/text.js.map +1 -0
- package/dist/text/break.d.ts +11 -0
- package/dist/text/break.d.ts.map +1 -0
- package/dist/text/break.js +30 -0
- package/dist/text/break.js.map +1 -0
- package/dist/text/fit.d.ts +30 -0
- package/dist/text/fit.d.ts.map +1 -0
- package/dist/text/fit.js +29 -0
- package/dist/text/fit.js.map +1 -0
- package/dist/text/index.d.ts +5 -3
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.js +3 -2
- package/dist/text/index.js.map +1 -1
- package/dist/text/wrap.d.ts +17 -7
- package/dist/text/wrap.d.ts.map +1 -1
- package/dist/text/wrap.js +25 -17
- package/dist/text/wrap.js.map +1 -1
- package/dist/types.d.ts +161 -45
- package/dist/types.d.ts.map +1 -1
- package/dist/validate/index.d.ts +1 -1
- 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/dist/validate/keys.d.ts +19 -2
- package/dist/validate/keys.d.ts.map +1 -1
- package/dist/validate/keys.js +40 -3
- package/dist/validate/keys.js.map +1 -1
- package/dist/validate/suggest.d.ts.map +1 -1
- package/dist/validate/suggest.js +21 -3
- package/dist/validate/suggest.js.map +1 -1
- package/dist/validate/values.d.ts +2 -2
- package/dist/validate/values.d.ts.map +1 -1
- package/dist/validate/values.js +17 -3
- package/dist/validate/values.js.map +1 -1
- package/package.json +7 -1
package/dist/background.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import type { Background, Dimensions } from "./types.js";
|
|
1
|
+
import type { Background, Dimensions, ImageAsset } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Render a full-bleed background as SVG. For a gradient, this emits a `<defs>`
|
|
4
4
|
* block with a `<linearGradient>` (using the given `id`) followed by a filled
|
|
5
5
|
* rect; for a solid colour it emits just the rect.
|
|
6
|
+
*
|
|
7
|
+
* A background image has to be read before it can be drawn, which is the
|
|
8
|
+
* renderer's job. Called without one, an image background is the colour behind
|
|
9
|
+
* it, so a caller assembling an SVG by hand gets a plain image rather than a
|
|
10
|
+
* reference to something that is not there.
|
|
6
11
|
*/
|
|
7
|
-
export declare function backgroundSvg(background: Background, dimensions: Dimensions, id: string): string;
|
|
12
|
+
export declare function backgroundSvg(background: Background, dimensions: Dimensions, id: string, asset?: ImageAsset): string;
|
|
8
13
|
//# sourceMappingURL=background.d.ts.map
|
package/dist/background.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../src/background.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../src/background.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAS,MAAM,YAAY,CAAC;AAiD5E;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,UAAU,GACjB,MAAM,CA8BR"}
|
package/dist/background.js
CHANGED
|
@@ -1,13 +1,56 @@
|
|
|
1
|
+
import { box, image as imageElement, scrim } from "./layout/index.js";
|
|
2
|
+
/** Behind a background image, and either side of one that is `contain`ed. */
|
|
3
|
+
const defaultBackdrop = "#000000";
|
|
4
|
+
/**
|
|
5
|
+
* How heavily the default scrim shades, top and bottom.
|
|
6
|
+
*
|
|
7
|
+
* It starts at a quarter rather than at nothing, because a template is free to
|
|
8
|
+
* put its text anywhere and a wash that only darkens the bottom leaves a
|
|
9
|
+
* centred title sitting on whatever the middle of the photograph happens to
|
|
10
|
+
* be. Shading the whole picture a little and the bottom a lot covers both, and
|
|
11
|
+
* a project that wants the picture untouched at the top sets `from: 0`.
|
|
12
|
+
*/
|
|
13
|
+
const defaultScrim = { from: 0.25, to: 0.65 };
|
|
14
|
+
/**
|
|
15
|
+
* A photograph behind the text: the backdrop, the picture, and the wash over
|
|
16
|
+
* it that keeps the text readable.
|
|
17
|
+
*
|
|
18
|
+
* The scrim is on by default and has to be turned off rather than on. Text
|
|
19
|
+
* over an unshaded photo is the failure this would otherwise ship with, and it
|
|
20
|
+
* is not one an author notices unless they look at every image.
|
|
21
|
+
*/
|
|
22
|
+
function imageBackground(background, area, id, asset) {
|
|
23
|
+
const backdrop = box(area, { fill: background.color ?? defaultBackdrop });
|
|
24
|
+
if (asset === undefined) {
|
|
25
|
+
return backdrop;
|
|
26
|
+
}
|
|
27
|
+
const shade = background.scrim ?? {};
|
|
28
|
+
return (backdrop +
|
|
29
|
+
imageElement(area, asset.href, { fit: background.fit ?? "cover" }) +
|
|
30
|
+
scrim(area, `${id}-scrim`, {
|
|
31
|
+
...(shade.color !== undefined && { color: shade.color }),
|
|
32
|
+
from: shade.from ?? defaultScrim.from,
|
|
33
|
+
to: shade.to ?? defaultScrim.to,
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
1
36
|
/**
|
|
2
37
|
* Render a full-bleed background as SVG. For a gradient, this emits a `<defs>`
|
|
3
38
|
* block with a `<linearGradient>` (using the given `id`) followed by a filled
|
|
4
39
|
* rect; for a solid colour it emits just the rect.
|
|
40
|
+
*
|
|
41
|
+
* A background image has to be read before it can be drawn, which is the
|
|
42
|
+
* renderer's job. Called without one, an image background is the colour behind
|
|
43
|
+
* it, so a caller assembling an SVG by hand gets a plain image rather than a
|
|
44
|
+
* reference to something that is not there.
|
|
5
45
|
*/
|
|
6
|
-
export function backgroundSvg(background, dimensions, id) {
|
|
46
|
+
export function backgroundSvg(background, dimensions, id, asset) {
|
|
7
47
|
const { width, height } = dimensions;
|
|
8
48
|
if (background.type === "solid") {
|
|
9
49
|
return `<rect width="${String(width)}" height="${String(height)}" fill="${background.color}"/>`;
|
|
10
50
|
}
|
|
51
|
+
if (background.type === "image") {
|
|
52
|
+
return imageBackground(background, { x: 0, y: 0, width, height }, id, asset);
|
|
53
|
+
}
|
|
11
54
|
const from = background.from ?? { x: 0, y: 0 };
|
|
12
55
|
const to = background.to ?? { x: 1, y: 1 };
|
|
13
56
|
const stops = background.stops
|
package/dist/background.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background.js","sourceRoot":"","sources":["../src/background.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"background.js","sourceRoot":"","sources":["../src/background.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,KAAK,IAAI,YAAY,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAGtE,6EAA6E;AAC7E,MAAM,eAAe,GAAG,SAAS,CAAC;AAElC;;;;;;;;GAQG;AACH,MAAM,YAAY,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AAE9C;;;;;;;GAOG;AACH,SAAS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AAE,KAAK,EAAE,MAAM,EAAE,EAC7B,EAAE,EACF,KAAK,CACN,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAC/C,MAAM,EAAE,GAAG,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAE3C,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK;SAC3B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,IAAI,CAAC,MAAM,iBAAiB,IAAI,CAAC,KAAK,KAAK,CAAC;SAC3E,IAAI,CAAC,EAAE,CAAC,CAAC;IAEZ,OAAO,CACL,QAAQ;QACR,uBAAuB,EAAE,SAAS,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG;QAC1E,QAAQ,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,mBAAmB;QACtE,SAAS;QACT,gBAAgB,MAAM,CAAC,KAAK,CAAC,aAAa,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CACjF,CAAC;AACJ,CAAC"}
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface CliArgs {
|
|
|
8
8
|
readonly concurrency: number | undefined;
|
|
9
9
|
}
|
|
10
10
|
/** Help text for `--help`, and for a run that asks for nothing else. */
|
|
11
|
-
export declare const usage = "colophon
|
|
11
|
+
export declare const usage = "colophon: generate social meta images from frontmatter\n\nUsage:\n colophon [contentDir] [options]\n\nImages carry a stamp of the props, config and size they came from, so a rebuild\nrenders only the ones that have actually changed.\n\nOptions:\n -c, --config <path> Load a config module. Its default export is either a\n ColophonConfig or a function (async or not) returning\n one, for a config that has to compute something.\n -f, --force Re-render every image, ignoring the stamps\n -o, --overwrite Alias for --force\n --concurrency <n> How many images to render at once\n -h, --help Show this help\n\nDefaults:\n contentDir content\n --concurrency one per available CPU";
|
|
12
12
|
/** Read the command line into the options `generate` takes. */
|
|
13
13
|
export declare function parseCliArgs(argv: readonly string[]): CliArgs;
|
|
14
14
|
//# sourceMappingURL=args.d.ts.map
|
package/dist/cli/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED,wEAAwE;AACxE,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED,wEAAwE;AACxE,eAAO,MAAM,KAAK,gxBAmB4B,CAAC;AAwB/C,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CA4B7D"}
|
package/dist/cli/args.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Help text for `--help`, and for a run that asks for nothing else. */
|
|
2
|
-
export const usage = `colophon
|
|
2
|
+
export const usage = `colophon: generate social meta images from frontmatter
|
|
3
3
|
|
|
4
4
|
Usage:
|
|
5
5
|
colophon [contentDir] [options]
|
package/dist/cli/config.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { ColophonConfig } from "../types.js";
|
|
|
5
5
|
* The default export may be the config itself or a function returning one,
|
|
6
6
|
* possibly async. A config that has to compute something cannot be written as
|
|
7
7
|
* a literal, and without the function form such a project has to abandon the
|
|
8
|
-
* CLI and call `generate` from a script of its own
|
|
8
|
+
* CLI and call `generate` from a script of its own, reimplementing the
|
|
9
9
|
* reporting the CLI already does along the way.
|
|
10
10
|
*/
|
|
11
11
|
export declare function loadConfig(configPath: string | undefined): Promise<ColophonConfig | undefined>;
|
package/dist/cli/config.js
CHANGED
|
@@ -22,7 +22,7 @@ function assertConfig(value, source) {
|
|
|
22
22
|
* The default export may be the config itself or a function returning one,
|
|
23
23
|
* possibly async. A config that has to compute something cannot be written as
|
|
24
24
|
* a literal, and without the function form such a project has to abandon the
|
|
25
|
-
* CLI and call `generate` from a script of its own
|
|
25
|
+
* CLI and call `generate` from a script of its own, reimplementing the
|
|
26
26
|
* reporting the CLI already does along the way.
|
|
27
27
|
*/
|
|
28
28
|
export async function loadConfig(configPath) {
|
|
@@ -3,11 +3,11 @@ import type { BrandColors, CodeStyle, OutputSize } from "../types.js";
|
|
|
3
3
|
* Named output-size presets covering the common social-image standards. Each
|
|
4
4
|
* `name` becomes the filename suffix (e.g. `my-post-og.png`).
|
|
5
5
|
*
|
|
6
|
-
* - `og
|
|
6
|
+
* - `og`: 1.91:1, the Open Graph standard (`og:image`). Facebook, LinkedIn,
|
|
7
7
|
* Slack, Discord, WhatsApp, Mastodon, and the usual `twitter:image` reuse.
|
|
8
|
-
* - `square
|
|
9
|
-
* - `twitter
|
|
10
|
-
* - `pinterest
|
|
8
|
+
* - `square`: 1:1, X/Twitter `summary` card and a universal fallback.
|
|
9
|
+
* - `twitter`: 2:1, X/Twitter `summary_large_image` card.
|
|
10
|
+
* - `pinterest`: 2:3 tall pin.
|
|
11
11
|
*/
|
|
12
12
|
export declare const SIZE_PRESETS: {
|
|
13
13
|
readonly og: {
|
|
@@ -51,9 +51,10 @@ export declare const DEFAULT_COLORS: Required<BrandColors>;
|
|
|
51
51
|
*/
|
|
52
52
|
export declare const DEFAULT_CODE_FONT_FAMILY = "\"JetBrains Mono\", \"Source Code Pro\", \"DejaVu Sans Mono\", Menlo, Consolas, monospace";
|
|
53
53
|
/**
|
|
54
|
-
* Default `code` template styling. `
|
|
55
|
-
*
|
|
56
|
-
*
|
|
54
|
+
* Default `code` template styling. `lineHeight` sets the monospace grid the
|
|
55
|
+
* snippet is laid out on, along with the character width, which is measured
|
|
56
|
+
* from the font rather than configured. The font-size bounds are fractions of
|
|
57
|
+
* the image width so they hold at every output size.
|
|
57
58
|
*
|
|
58
59
|
* `minFontScale` of `0.025` is roughly 30px on a 1200px-wide image, which
|
|
59
60
|
* still reads when a feed shows that image at half size. A snippet too long to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtE;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY;;iBACjB,IAAI,EAAE,IAAI;iBAAE,KAAK,EAAE,IAAI;iBAAE,MAAM,EAAE,GAAG;;;iBAChC,IAAI,EAAE,QAAQ;iBAAE,KAAK,EAAE,IAAI;iBAAE,MAAM,EAAE,IAAI;;;iBACxC,IAAI,EAAE,SAAS;iBAAE,KAAK,EAAE,IAAI;iBAAE,MAAM,EAAE,GAAG;;;iBACvC,IAAI,EAAE,WAAW;iBAAE,KAAK,EAAE,IAAI;iBAAE,MAAM,EAAE,IAAI;;CACZ,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,UAAU,EAG9C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,iCAAiC,CAAC;AAElE,wEAAwE;AACxE,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAKhD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,8FACkD,CAAC;AAExF
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtE;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY;;iBACjB,IAAI,EAAE,IAAI;iBAAE,KAAK,EAAE,IAAI;iBAAE,MAAM,EAAE,GAAG;;;iBAChC,IAAI,EAAE,QAAQ;iBAAE,KAAK,EAAE,IAAI;iBAAE,MAAM,EAAE,IAAI;;;iBACxC,IAAI,EAAE,SAAS;iBAAE,KAAK,EAAE,IAAI;iBAAE,MAAM,EAAE,GAAG;;;iBACvC,IAAI,EAAE,WAAW;iBAAE,KAAK,EAAE,IAAI;iBAAE,MAAM,EAAE,IAAI;;CACZ,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,UAAU,EAG9C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,iCAAiC,CAAC;AAElE,wEAAwE;AACxE,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAKhD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,8FACkD,CAAC;AAExF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,SAAS,CAQlD,CAAC"}
|
package/dist/config/defaults.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Named output-size presets covering the common social-image standards. Each
|
|
3
3
|
* `name` becomes the filename suffix (e.g. `my-post-og.png`).
|
|
4
4
|
*
|
|
5
|
-
* - `og
|
|
5
|
+
* - `og`: 1.91:1, the Open Graph standard (`og:image`). Facebook, LinkedIn,
|
|
6
6
|
* Slack, Discord, WhatsApp, Mastodon, and the usual `twitter:image` reuse.
|
|
7
|
-
* - `square
|
|
8
|
-
* - `twitter
|
|
9
|
-
* - `pinterest
|
|
7
|
+
* - `square`: 1:1, X/Twitter `summary` card and a universal fallback.
|
|
8
|
+
* - `twitter`: 2:1, X/Twitter `summary_large_image` card.
|
|
9
|
+
* - `pinterest`: 2:3 tall pin.
|
|
10
10
|
*/
|
|
11
11
|
export const SIZE_PRESETS = {
|
|
12
12
|
og: { name: "og", width: 1200, height: 630 },
|
|
@@ -42,9 +42,10 @@ export const DEFAULT_COLORS = {
|
|
|
42
42
|
*/
|
|
43
43
|
export const DEFAULT_CODE_FONT_FAMILY = '"JetBrains Mono", "Source Code Pro", "DejaVu Sans Mono", Menlo, Consolas, monospace';
|
|
44
44
|
/**
|
|
45
|
-
* Default `code` template styling. `
|
|
46
|
-
*
|
|
47
|
-
*
|
|
45
|
+
* Default `code` template styling. `lineHeight` sets the monospace grid the
|
|
46
|
+
* snippet is laid out on, along with the character width, which is measured
|
|
47
|
+
* from the font rather than configured. The font-size bounds are fractions of
|
|
48
|
+
* the image width so they hold at every output size.
|
|
48
49
|
*
|
|
49
50
|
* `minFontScale` of `0.025` is roughly 30px on a 1200px-wide image, which
|
|
50
51
|
* still reads when a feed shows that image at half size. A snippet too long to
|
|
@@ -54,7 +55,6 @@ export const DEFAULT_CODE_FONT_FAMILY = '"JetBrains Mono", "Source Code Pro", "D
|
|
|
54
55
|
export const DEFAULT_CODE_STYLE = {
|
|
55
56
|
theme: "github-dark",
|
|
56
57
|
fontFamily: DEFAULT_CODE_FONT_FAMILY,
|
|
57
|
-
charWidthRatio: 0.6,
|
|
58
58
|
lineHeight: 1.55,
|
|
59
59
|
tabSize: 2,
|
|
60
60
|
cornerScale: 0.025,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;IAC5C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACrD,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;IACtD,SAAS,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;CACd,CAAC;AAEhD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAA0B;IAClD,YAAY,CAAC,EAAE;IACf,YAAY,CAAC,MAAM;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAElE,wEAAwE;AACxE,MAAM,CAAC,MAAM,cAAc,GAA0B;IACnD,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,SAAS;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GACnC,qFAAqF,CAAC;AAExF
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;IAC5C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACrD,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;IACtD,SAAS,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;CACd,CAAC;AAEhD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAA0B;IAClD,YAAY,CAAC,EAAE;IACf,YAAY,CAAC,MAAM;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAElE,wEAAwE;AACxE,MAAM,CAAC,MAAM,cAAc,GAA0B;IACnD,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,SAAS;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GACnC,qFAAqF,CAAC;AAExF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAwB;IACrD,KAAK,EAAE,aAAa;IACpB,UAAU,EAAE,wBAAwB;IACpC,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,KAAK;CACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EAErB,cAAc,EACf,MAAM,aAAa,CAAC;AAYrB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,YAAY,GACb,MAAM,eAAe,CAAC;AAcvB;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAAC;AACrE;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,qBAAqB,GAC7B,qBAAqB,CAAC;AAUzB;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,GAAE,cAAmB,GAAG,cAAc,CAsBzE"}
|
package/dist/config/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { resolveFonts } from "../fonts/index.js";
|
|
2
|
+
import { resolveOptionalImage } from "../image/index.js";
|
|
2
3
|
import { builtinTemplates } from "../templates/index.js";
|
|
3
4
|
import { validateConfig } from "../validate/index.js";
|
|
4
5
|
import { DEFAULT_FONT_FAMILY } from "./defaults.js";
|
|
5
|
-
import { defaultBackground, resolveCode, resolveColors, resolveSizes, shouldLoadSystemFonts, } from "./resolve.js";
|
|
6
|
+
import { defaultBackground, resolveBackground, resolveCode, resolveColors, resolveSizes, shouldLoadSystemFonts, } from "./resolve.js";
|
|
6
7
|
export { DEFAULT_CODE_FONT_FAMILY, DEFAULT_CODE_STYLE, DEFAULT_COLORS, DEFAULT_FONT_FAMILY, DEFAULT_SIZES, SIZE_PRESETS, } from "./defaults.js";
|
|
7
8
|
/**
|
|
8
9
|
* Default warning handler. Colophon runs at build time, so a compromise the
|
|
9
|
-
* renderer had to make belongs in the build log by default
|
|
10
|
+
* renderer had to make belongs in the build log by default. Silence is opt-in
|
|
10
11
|
* via `config.onWarning`.
|
|
11
12
|
*/
|
|
12
13
|
function warnToConsole(message) {
|
|
@@ -36,13 +37,14 @@ export function resolveConfig(config = {}) {
|
|
|
36
37
|
const fonts = resolveFonts(config.fonts);
|
|
37
38
|
return {
|
|
38
39
|
colors,
|
|
39
|
-
background: config.background ?? defaultBackground(colors),
|
|
40
|
+
background: resolveBackground(config.background) ?? defaultBackground(colors),
|
|
40
41
|
fonts,
|
|
41
42
|
systemFonts: shouldLoadSystemFonts(config.systemFonts, fonts),
|
|
42
43
|
// A project that supplies one font should not have to name it twice.
|
|
43
44
|
fontFamily: config.fontFamily ?? fonts[0]?.family ?? DEFAULT_FONT_FAMILY,
|
|
44
45
|
footer: config.footer,
|
|
45
46
|
badge: config.badge,
|
|
47
|
+
logo: resolveOptionalImage(config.logo, "logo"),
|
|
46
48
|
code: resolveCode(config.code),
|
|
47
49
|
onWarning: config.onWarning ?? warnToConsole,
|
|
48
50
|
sizes: resolveSizes(config.sizes),
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAOzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB;;;;GAIG;AACH,SAAS,aAAa,CAAC,OAAe;IACpC,4EAA4E;IAC5E,iCAAiC;IACjC,sCAAsC;IACtC,OAAO,CAAC,IAAI,CAAC,aAAa,OAAO,EAAE,CAAC,CAAC;AACvC,CAAC;AAeD;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,MAA2B;IACtD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,MAAM,GAAmB,EAAE;IACvD,cAAc,CAAC,MAAM,CAAC,CAAC;IAEvB,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CA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UAAU,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC;QACnE,KAAK;QACL,WAAW,EAAE,qBAAqB,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC;QAC7D,qEAAqE;QACrE,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,mBAAmB;QACxE,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;QAC/C,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;QAC9B,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,aAAa;QAC5C,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC;QACjC,SAAS,EAAE,EAAE,GAAG,gBAAgB,EAAE,GAAG,MAAM,CAAC,SAAS,EAAE;KACxD,CAAC;AACJ,CAAC"}
|
package/dist/config/resolve.d.ts
CHANGED
|
@@ -6,6 +6,13 @@ import type { Background, BrandColors, CodeStyle, FontSource, OutputSize } from
|
|
|
6
6
|
* than mixing in the neutral defaults, which would clash.
|
|
7
7
|
*/
|
|
8
8
|
export declare function resolveColors(colors: BrandColors | undefined): Required<BrandColors>;
|
|
9
|
+
/**
|
|
10
|
+
* Check a background's image up front, the way `fonts` and `logo` are checked.
|
|
11
|
+
* A background that cannot be read is every image in the build rendered as a
|
|
12
|
+
* flat colour, which is a failure worth hearing about before the build runs
|
|
13
|
+
* rather than after looking at the output.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveBackground(background: Background | undefined): Background | undefined;
|
|
9
16
|
/** The gradient a config with no background of its own is drawn on. */
|
|
10
17
|
export declare function defaultBackground(colors: Required<BrandColors>): Background;
|
|
11
18
|
/** Fill in the `code` styling a project did not name. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACX,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACX,MAAM,aAAa,CAAC;AAQrB;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,WAAW,GAAG,SAAS,GAC9B,QAAQ,CAAC,WAAW,CAAC,CAWvB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,GAAG,SAAS,GACjC,UAAU,GAAG,SAAS,CASxB;AAED,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,UAAU,CAS3E;AAED,yDAAyD;AACzD,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAE5E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,GACvC,SAAS,UAAU,EAAE,CAgBvB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,OAAO,GAAG,SAAS,EAChC,KAAK,EAAE,SAAS,UAAU,EAAE,GAC3B,OAAO,CAaT"}
|
package/dist/config/resolve.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolveImageSource } from "../image/index.js";
|
|
1
2
|
import { DEFAULT_CODE_STYLE, DEFAULT_COLORS, DEFAULT_SIZES, } from "./defaults.js";
|
|
2
3
|
/**
|
|
3
4
|
* Fill in the palette a project did not name.
|
|
@@ -16,6 +17,21 @@ export function resolveColors(colors) {
|
|
|
16
17
|
foreground: colors.foreground ?? DEFAULT_COLORS.foreground,
|
|
17
18
|
};
|
|
18
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Check a background's image up front, the way `fonts` and `logo` are checked.
|
|
22
|
+
* A background that cannot be read is every image in the build rendered as a
|
|
23
|
+
* flat colour, which is a failure worth hearing about before the build runs
|
|
24
|
+
* rather than after looking at the output.
|
|
25
|
+
*/
|
|
26
|
+
export function resolveBackground(background) {
|
|
27
|
+
if (background?.type !== "image") {
|
|
28
|
+
return background;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
...background,
|
|
32
|
+
source: resolveImageSource(background.source, "background.source"),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
19
35
|
/** The gradient a config with no background of its own is drawn on. */
|
|
20
36
|
export function defaultBackground(colors) {
|
|
21
37
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAC3B,MAA+B;IAE/B,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,KAAK;QAC3C,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,KAAK;QAC3C,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,cAAc,CAAC,UAAU;KAC3D,CAAC;AACJ,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,iBAAiB,CAAC,MAA6B;IAC7D,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE;YACL,EAAE,MAAM,EAAE,IAAI,EAAE,KA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,CAAC,IAA2B;IACrD,OAAO,EAAE,GAAG,kBAAkB,EAAE,GAAG,IAAI,EAAE,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAwC;IAExC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,+BAA+B,IAAI,CAAC,IAAI,iEAAiE,CAC1G,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,WAAgC,EAChC,KAA4B;IAE5B,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CACb,uEAAuE;YACrE,mDAAmD,CACtD,CAAC;IACJ,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
package/dist/config/size.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { ColophonConfig, OutputSize, ResolvedConfig } from "../types.js";
|
|
|
5
5
|
*
|
|
6
6
|
* The overrides are folded into the user config and the whole thing resolved
|
|
7
7
|
* again, rather than patched onto an already-resolved config, so that anything
|
|
8
|
-
* derived stays consistent
|
|
8
|
+
* derived stays consistent. A size that overrides `colors.brand` gets the
|
|
9
9
|
* default gradient rebuilt around its brand, exactly as a config setting the
|
|
10
10
|
* same colour at the top level would.
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../src/config/size.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,UAAU,EACV,cAAc,EACf,MAAM,aAAa,CAAC;AAoBrB;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,cAAc,GAAG,SAAS,EAClC,IAAI,EAAE,UAAU,GACf,cAAc,
|
|
1
|
+
{"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../src/config/size.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,UAAU,EACV,cAAc,EACf,MAAM,aAAa,CAAC;AAoBrB;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,cAAc,GAAG,SAAS,EAClC,IAAI,EAAE,UAAU,GACf,cAAc,CAehB"}
|
package/dist/config/size.js
CHANGED
|
@@ -7,7 +7,7 @@ import { resolveConfig } from "./index.js";
|
|
|
7
7
|
* palette when the config sets no colours of its own. Starting from nothing
|
|
8
8
|
* instead would hand `resolveColors` a lone `foreground`, and its rule that a
|
|
9
9
|
* bare `brand` colours the whole gradient would then flatten the default
|
|
10
|
-
* gradient
|
|
10
|
+
* gradient, so a size asking only for darker text would silently lose it.
|
|
11
11
|
*/
|
|
12
12
|
function mergeColors(base, overrides) {
|
|
13
13
|
return { ...(base ?? DEFAULT_COLORS), ...overrides };
|
|
@@ -18,7 +18,7 @@ function mergeColors(base, overrides) {
|
|
|
18
18
|
*
|
|
19
19
|
* The overrides are folded into the user config and the whole thing resolved
|
|
20
20
|
* again, rather than patched onto an already-resolved config, so that anything
|
|
21
|
-
* derived stays consistent
|
|
21
|
+
* derived stays consistent. A size that overrides `colors.brand` gets the
|
|
22
22
|
* default gradient rebuilt around its brand, exactly as a config setting the
|
|
23
23
|
* same colour at the top level would.
|
|
24
24
|
*
|
|
@@ -41,6 +41,7 @@ export function resolveConfigForSize(config, size) {
|
|
|
41
41
|
...(size.fontFamily !== undefined && { fontFamily: size.fontFamily }),
|
|
42
42
|
...(size.footer !== undefined && { footer: size.footer }),
|
|
43
43
|
...(size.badge !== undefined && { badge: size.badge }),
|
|
44
|
+
...(size.logo !== undefined && { logo: size.logo }),
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
47
|
//# sourceMappingURL=size.js.map
|
package/dist/config/size.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../src/config/size.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;;;GAQG;AACH,SAAS,WAAW,CAClB,IAA6B,EAC7B,SAA+B;IAE/B,OAAO,EAAE,GAAG,CAAC,IAAI,IAAI,cAAc,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC;AACvD,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAkC,EAClC,IAAgB;IAEhB,MAAM,IAAI,GAAG,MAAM,IAAI,EAAE,CAAC;IAE1B,OAAO,aAAa,CAAC;QACnB,GAAG,IAAI;QACP,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI;YAC/B,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;SAC9C,CAAC;QACF,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;QACxE,GAAG,CAAC,IAAI,CAAC,UAAU,KAAK,SAAS,IA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E,IAAI,CAAC,UAAU,EAAE,CAAC;QACrE,GAAG,CAAC,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;QACrE,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QACzD,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;QACtD,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;KACpD,CAAC,CAAC;AACL,CAAC"}
|
package/dist/content/props.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ export declare function coerceString(value: unknown): string | undefined;
|
|
|
4
4
|
/**
|
|
5
5
|
* Extract {@link MetaImageProps} from a parsed frontmatter object, or return
|
|
6
6
|
* `undefined` if this file should be skipped (nothing to build props from, or
|
|
7
|
-
* no usable template). Pure
|
|
7
|
+
* no usable template). Pure, with no filesystem access.
|
|
8
8
|
*
|
|
9
9
|
* Props can come from two places: the post's own props object, and a project's
|
|
10
10
|
* `props` mapper reading the frontmatter it already has. Where both speak the
|
|
11
|
-
* post wins, field by field
|
|
11
|
+
* post wins, field by field. The mapper describes the site's usual shape, and
|
|
12
12
|
* a post that says otherwise is saying so on purpose.
|
|
13
13
|
*/
|
|
14
14
|
export declare function extractProps(frontmatter: Record<string, unknown>, options?: Pick<ContentOptions, "propsKey" | "templateField" | "defaultTemplate" | "props">): MetaImageProps | undefined;
|
package/dist/content/props.js
CHANGED
|
@@ -20,11 +20,11 @@ const namedFields = new Set(["template", "title", "subtitle", "version"]);
|
|
|
20
20
|
/**
|
|
21
21
|
* Extract {@link MetaImageProps} from a parsed frontmatter object, or return
|
|
22
22
|
* `undefined` if this file should be skipped (nothing to build props from, or
|
|
23
|
-
* no usable template). Pure
|
|
23
|
+
* no usable template). Pure, with no filesystem access.
|
|
24
24
|
*
|
|
25
25
|
* Props can come from two places: the post's own props object, and a project's
|
|
26
26
|
* `props` mapper reading the frontmatter it already has. Where both speak the
|
|
27
|
-
* post wins, field by field
|
|
27
|
+
* post wins, field by field. The mapper describes the site's usual shape, and
|
|
28
28
|
* a post that says otherwise is saying so on purpose.
|
|
29
29
|
*/
|
|
30
30
|
export function extractProps(frontmatter, options = {}) {
|
package/dist/content/slug.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import type { SlugStrategy } from "../types.js";
|
|
|
3
3
|
* Derive a slug from a content file's path, relative to the root of the walk.
|
|
4
4
|
*
|
|
5
5
|
* `basename` gives the filename without extension, or the parent directory for
|
|
6
|
-
* `index
|
|
7
|
-
* `route` keeps the directories, so a site addressed by route gets a slug
|
|
8
|
-
* matches the address rather than just its last segment.
|
|
6
|
+
* `index.*`, which is the page-bundle convention where an image sits beside its
|
|
7
|
+
* post. `route` keeps the directories, so a site addressed by route gets a slug
|
|
8
|
+
* that matches the address rather than just its last segment.
|
|
9
9
|
*
|
|
10
10
|
* The path must be relative to the content root for `route` to mean anything;
|
|
11
11
|
* `basename` reads the same either way.
|
|
@@ -14,8 +14,8 @@ export declare function slugFromPath(contentPath: string, strategy?: SlugStrateg
|
|
|
14
14
|
/**
|
|
15
15
|
* Reject a slug that would name a file outside the tree it came from.
|
|
16
16
|
*
|
|
17
|
-
* A slug is a filename, and may carry directories under the `route` strategy
|
|
18
|
-
*
|
|
17
|
+
* A slug is a filename, and may carry directories under the `route` strategy.
|
|
18
|
+
* But a declared one is written by hand, and `slug: ../../../tmp/x` would have
|
|
19
19
|
* `generate` create directories and write an image there. Nothing derived from
|
|
20
20
|
* a path can look like this, so the check only ever fires on frontmatter.
|
|
21
21
|
*/
|
package/dist/content/slug.js
CHANGED
|
@@ -3,9 +3,9 @@ import path from "node:path";
|
|
|
3
3
|
* Derive a slug from a content file's path, relative to the root of the walk.
|
|
4
4
|
*
|
|
5
5
|
* `basename` gives the filename without extension, or the parent directory for
|
|
6
|
-
* `index
|
|
7
|
-
* `route` keeps the directories, so a site addressed by route gets a slug
|
|
8
|
-
* matches the address rather than just its last segment.
|
|
6
|
+
* `index.*`, which is the page-bundle convention where an image sits beside its
|
|
7
|
+
* post. `route` keeps the directories, so a site addressed by route gets a slug
|
|
8
|
+
* that matches the address rather than just its last segment.
|
|
9
9
|
*
|
|
10
10
|
* The path must be relative to the content root for `route` to mean anything;
|
|
11
11
|
* `basename` reads the same either way.
|
|
@@ -25,15 +25,15 @@ export function slugFromPath(contentPath, strategy = "basename") {
|
|
|
25
25
|
}
|
|
26
26
|
const route = base === "index" ? directory : path.join(directory, base);
|
|
27
27
|
// `path.dirname` of a root-level file is ".", which as a route is the site
|
|
28
|
-
// root
|
|
28
|
+
// root, and the one place there is no directory name to fall back on.
|
|
29
29
|
const normalised = route === "." ? "index" : route.split(path.sep).join("/");
|
|
30
30
|
return normalised;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Reject a slug that would name a file outside the tree it came from.
|
|
34
34
|
*
|
|
35
|
-
* A slug is a filename, and may carry directories under the `route` strategy
|
|
36
|
-
*
|
|
35
|
+
* A slug is a filename, and may carry directories under the `route` strategy.
|
|
36
|
+
* But a declared one is written by hand, and `slug: ../../../tmp/x` would have
|
|
37
37
|
* `generate` create directories and write an image there. Nothing derived from
|
|
38
38
|
* a path can look like this, so the check only ever fires on frontmatter.
|
|
39
39
|
*/
|
package/dist/content/slug.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slug.js","sourceRoot":"","sources":["../../src/content/slug.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAI7B;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAC1B,WAAmB,EACnB,QAAQ,GAAiB,UAAU;IAEnC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAA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,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACxC,OAAO,MAAM,KAAK,EAAE,IAAI,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACzD,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACxE,2EAA2E;IAC3E,sEAAsE;IACtE,MAAM,UAAU,GAAG,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7E,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY,EAAE,WAAmB;IACrE,0EAA0E;IAC1E,yDAAyD;IACzD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IACzC,MAAM,UAAU,GACd,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3D,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE1B,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,iBAAiB,IAAI,QAAQ,WAAW,gCAAgC;YACtE,mEAAmE;YACnE,YAAY,CACf,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/content/walk.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface WalkOptions extends ContentOptions {
|
|
|
10
10
|
/**
|
|
11
11
|
* Walk a content tree, read each file's frontmatter with `gray-matter`, and
|
|
12
12
|
* return the files that image props can be built for. This is the host-project
|
|
13
|
-
* concern
|
|
13
|
+
* concern of finding content and reading frontmatter, kept separate from
|
|
14
14
|
* rendering.
|
|
15
15
|
*/
|
|
16
16
|
export declare function walkContent(options: WalkOptions): Promise<ContentFile[]>;
|
package/dist/content/walk.js
CHANGED
|
@@ -24,7 +24,7 @@ async function collectContentFiles(dir, extensions) {
|
|
|
24
24
|
/**
|
|
25
25
|
* Walk a content tree, read each file's frontmatter with `gray-matter`, and
|
|
26
26
|
* return the files that image props can be built for. This is the host-project
|
|
27
|
-
* concern
|
|
27
|
+
* concern of finding content and reading frontmatter, kept separate from
|
|
28
28
|
* rendering.
|
|
29
29
|
*/
|
|
30
30
|
export async function walkContent(options) {
|
package/dist/fonts/index.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ export { fontFilePaths } from "./materialise.js";
|
|
|
3
3
|
export { resolveFonts } from "./resolve.js";
|
|
4
4
|
/**
|
|
5
5
|
* The family the rasteriser should fall back to when a `font-family` names
|
|
6
|
-
* something it has not loaded
|
|
7
|
-
* the same wherever the build runs rather than whichever font
|
|
6
|
+
* something it has not loaded. It is the first declared family, so the
|
|
7
|
+
* fallback is the same wherever the build runs rather than whichever font
|
|
8
|
+
* loaded first.
|
|
8
9
|
*/
|
|
9
10
|
export declare function fallbackFamily(fonts: readonly FontSource[]): string | undefined;
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fonts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fonts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,UAAU,EAAE,GAC3B,MAAM,GAAG,SAAS,CAEpB"}
|
package/dist/fonts/index.js
CHANGED
|
@@ -2,8 +2,9 @@ export { fontFilePaths } from "./materialise.js";
|
|
|
2
2
|
export { resolveFonts } from "./resolve.js";
|
|
3
3
|
/**
|
|
4
4
|
* The family the rasteriser should fall back to when a `font-family` names
|
|
5
|
-
* something it has not loaded
|
|
6
|
-
* the same wherever the build runs rather than whichever font
|
|
5
|
+
* something it has not loaded. It is the first declared family, so the
|
|
6
|
+
* fallback is the same wherever the build runs rather than whichever font
|
|
7
|
+
* loaded first.
|
|
7
8
|
*/
|
|
8
9
|
export function fallbackFamily(fonts) {
|
|
9
10
|
return fonts.find((font) => font.family !== undefined)?.family;
|
package/dist/fonts/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fonts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fonts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,KAA4B;IAE5B,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,EAAE,MAAM,CAAC;AACjE,CAAC"}
|
package/dist/fonts/resolve.js
CHANGED
|
@@ -7,7 +7,7 @@ function label(index) {
|
|
|
7
7
|
* Validate one font source and make its path absolute.
|
|
8
8
|
*
|
|
9
9
|
* The rasteriser ignores a font file it cannot read and renders the text in
|
|
10
|
-
* whatever else it has loaded
|
|
10
|
+
* whatever else it has loaded, or, with system fonts off, renders no text at
|
|
11
11
|
* all. A typo in a path would therefore show up as a blank image rather than
|
|
12
12
|
* an error, so the path is checked here instead.
|
|
13
13
|
*/
|
package/dist/generate/extra.js
CHANGED
|
@@ -8,7 +8,7 @@ import { isRecord } from "../validate/check.js";
|
|
|
8
8
|
* JavaScript with nothing checking it, and neither omission fails anywhere
|
|
9
9
|
* near the config: a missing `output` surfaces as a complaint about an
|
|
10
10
|
* argument to `path`, and missing props as a property read on `undefined`.
|
|
11
|
-
* Key validation is no help either
|
|
11
|
+
* Key validation is no help either, since it is the option that is not there.
|
|
12
12
|
*/
|
|
13
13
|
function checkImage(image, index) {
|
|
14
14
|
// The types say what should be here; this exists for when it is not.
|
|
@@ -48,9 +48,9 @@ export function extraJobs(config, resolved, stamper) {
|
|
|
48
48
|
// relative path against the working directory anyway, and the build log
|
|
49
49
|
// reads better saying what the config said.
|
|
50
50
|
outputPath: image.output,
|
|
51
|
-
// An extra names its own path,
|
|
52
|
-
//
|
|
53
|
-
//
|
|
51
|
+
// An extra names its own path, and the placement maps posts to paths, so
|
|
52
|
+
// it has nothing to say about where this one is served, nor about hashing
|
|
53
|
+
// a filename it did not choose.
|
|
54
54
|
url: undefined,
|
|
55
55
|
stamp: stamper.stamp(image.props, size),
|
|
56
56
|
config: resolveConfigForSize(config, size),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extra.js","sourceRoot":"","sources":["../../src/generate/extra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB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E;YACxE,wEAAwE;YACxE,4CAA4C;YAC5C,UAAU,EAAE,KAAK,CAAC,MAAM;YACxB,yEAAyE;YACzE,0EAA0E;YAC1E,gCAAgC;YAChC,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC;YACvC,MAAM,EAAE,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC;SAC3C,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -7,7 +7,7 @@ export interface GeneratedImage {
|
|
|
7
7
|
/**
|
|
8
8
|
* The content file this image came from, relative to the content root.
|
|
9
9
|
* `undefined` for a config `extra` image: there is no post behind it, and
|
|
10
|
-
* naming one
|
|
10
|
+
* naming one after its output path would quietly break anything grouping
|
|
11
11
|
* results by the post they belong to.
|
|
12
12
|
*/
|
|
13
13
|
readonly contentPath: string | undefined;
|