@kensio/colophon 2.2.0 → 2.3.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.
Files changed (350) hide show
  1. package/README.md +560 -24
  2. package/dist/cli/args.d.ts +14 -0
  3. package/dist/cli/args.d.ts.map +1 -0
  4. package/dist/cli/args.js +67 -0
  5. package/dist/cli/args.js.map +1 -0
  6. package/dist/cli/config.d.ts +12 -0
  7. package/dist/cli/config.d.ts.map +1 -0
  8. package/dist/cli/config.js +43 -0
  9. package/dist/cli/config.js.map +1 -0
  10. package/dist/cli/index.d.ts +3 -0
  11. package/dist/cli/index.d.ts.map +1 -0
  12. package/dist/cli/index.js +35 -0
  13. package/dist/cli/index.js.map +1 -0
  14. package/dist/cli.js +34 -6
  15. package/dist/cli.js.map +1 -1
  16. package/dist/config/defaults.d.ts +64 -0
  17. package/dist/config/defaults.d.ts.map +1 -0
  18. package/dist/config/defaults.js +64 -0
  19. package/dist/config/defaults.js.map +1 -0
  20. package/dist/config/index.d.ts +22 -0
  21. package/dist/config/index.d.ts.map +1 -0
  22. package/dist/config/index.js +52 -0
  23. package/dist/config/index.js.map +1 -0
  24. package/dist/config/resolve.d.ts +24 -0
  25. package/dist/config/resolve.d.ts.map +1 -0
  26. package/dist/config/resolve.js +66 -0
  27. package/dist/config/resolve.js.map +1 -0
  28. package/dist/config/size.d.ts +20 -0
  29. package/dist/config/size.d.ts.map +1 -0
  30. package/dist/config/size.js +46 -0
  31. package/dist/config/size.js.map +1 -0
  32. package/dist/config.d.ts +27 -1
  33. package/dist/config.d.ts.map +1 -1
  34. package/dist/config.js +78 -2
  35. package/dist/config.js.map +1 -1
  36. package/dist/content/index.d.ts +5 -51
  37. package/dist/content/index.d.ts.map +1 -1
  38. package/dist/content/index.js +3 -115
  39. package/dist/content/index.js.map +1 -1
  40. package/dist/content/props.d.ts +15 -0
  41. package/dist/content/props.d.ts.map +1 -0
  42. package/dist/content/props.js +71 -0
  43. package/dist/content/props.js.map +1 -0
  44. package/dist/content/slug.d.ts +23 -0
  45. package/dist/content/slug.d.ts.map +1 -0
  46. package/dist/content/slug.js +52 -0
  47. package/dist/content/slug.js.map +1 -0
  48. package/dist/content/walk.d.ts +17 -0
  49. package/dist/content/walk.d.ts.map +1 -0
  50. package/dist/content/walk.js +57 -0
  51. package/dist/content/walk.js.map +1 -0
  52. package/dist/fonts/index.d.ts +10 -0
  53. package/dist/fonts/index.d.ts.map +1 -0
  54. package/dist/fonts/index.js +11 -0
  55. package/dist/fonts/index.js.map +1 -0
  56. package/dist/fonts/materialise.d.ts +7 -0
  57. package/dist/fonts/materialise.d.ts.map +1 -0
  58. package/dist/fonts/materialise.js +47 -0
  59. package/dist/fonts/materialise.js.map +1 -0
  60. package/dist/fonts/resolve.d.ts +7 -0
  61. package/dist/fonts/resolve.d.ts.map +1 -0
  62. package/dist/fonts/resolve.js +50 -0
  63. package/dist/fonts/resolve.js.map +1 -0
  64. package/dist/fonts.d.ts +18 -0
  65. package/dist/fonts.d.ts.map +1 -0
  66. package/dist/fonts.js +102 -0
  67. package/dist/fonts.js.map +1 -0
  68. package/dist/generate/extra.d.ts +16 -0
  69. package/dist/generate/extra.d.ts.map +1 -0
  70. package/dist/generate/extra.js +60 -0
  71. package/dist/generate/extra.js.map +1 -0
  72. package/dist/generate/index.d.ts +19 -0
  73. package/dist/generate/index.d.ts.map +1 -0
  74. package/dist/generate/index.js +46 -0
  75. package/dist/generate/index.js.map +1 -0
  76. package/dist/generate/job.d.ts +35 -0
  77. package/dist/generate/job.d.ts.map +1 -0
  78. package/dist/generate/job.js +2 -0
  79. package/dist/generate/job.js.map +1 -0
  80. package/dist/generate/options.d.ts +56 -0
  81. package/dist/generate/options.d.ts.map +1 -0
  82. package/dist/generate/options.js +17 -0
  83. package/dist/generate/options.js.map +1 -0
  84. package/dist/generate/output-path.d.ts +12 -0
  85. package/dist/generate/output-path.d.ts.map +1 -0
  86. package/dist/generate/output-path.js +18 -0
  87. package/dist/generate/output-path.js.map +1 -0
  88. package/dist/generate/outputs.d.ts +28 -0
  89. package/dist/generate/outputs.d.ts.map +1 -0
  90. package/dist/generate/outputs.js +71 -0
  91. package/dist/generate/outputs.js.map +1 -0
  92. package/dist/generate/plan.d.ts +21 -0
  93. package/dist/generate/plan.d.ts.map +1 -0
  94. package/dist/generate/plan.js +72 -0
  95. package/dist/generate/plan.js.map +1 -0
  96. package/dist/generate/render-image.d.ts +11 -0
  97. package/dist/generate/render-image.d.ts.map +1 -0
  98. package/dist/generate/render-image.js +27 -0
  99. package/dist/generate/render-image.js.map +1 -0
  100. package/dist/generate.d.ts +27 -6
  101. package/dist/generate.d.ts.map +1 -1
  102. package/dist/generate.js +69 -15
  103. package/dist/generate.js.map +1 -1
  104. package/dist/highlight/color.d.ts +9 -0
  105. package/dist/highlight/color.d.ts.map +1 -0
  106. package/dist/highlight/color.js +15 -0
  107. package/dist/highlight/color.js.map +1 -0
  108. package/dist/highlight/grid.d.ts +14 -0
  109. package/dist/highlight/grid.d.ts.map +1 -0
  110. package/dist/highlight/grid.js +36 -0
  111. package/dist/highlight/grid.js.map +1 -0
  112. package/dist/highlight/index.d.ts +12 -0
  113. package/dist/highlight/index.d.ts.map +1 -0
  114. package/dist/highlight/index.js +31 -0
  115. package/dist/highlight/index.js.map +1 -0
  116. package/dist/highlight/language.d.ts +14 -0
  117. package/dist/highlight/language.d.ts.map +1 -0
  118. package/dist/highlight/language.js +42 -0
  119. package/dist/highlight/language.js.map +1 -0
  120. package/dist/highlight/normalise.d.ts +17 -0
  121. package/dist/highlight/normalise.d.ts.map +1 -0
  122. package/dist/highlight/normalise.js +37 -0
  123. package/dist/highlight/normalise.js.map +1 -0
  124. package/dist/highlight/types.d.ts +40 -0
  125. package/dist/highlight/types.d.ts.map +1 -0
  126. package/dist/highlight/types.js +2 -0
  127. package/dist/highlight/types.js.map +1 -0
  128. package/dist/index.d.ts +15 -9
  129. package/dist/index.d.ts.map +1 -1
  130. package/dist/index.js +9 -5
  131. package/dist/index.js.map +1 -1
  132. package/dist/manifest/build.d.ts +14 -0
  133. package/dist/manifest/build.d.ts.map +1 -0
  134. package/dist/manifest/build.js +43 -0
  135. package/dist/manifest/build.js.map +1 -0
  136. package/dist/manifest/index.d.ts +27 -0
  137. package/dist/manifest/index.d.ts.map +1 -0
  138. package/dist/manifest/index.js +31 -0
  139. package/dist/manifest/index.js.map +1 -0
  140. package/dist/manifest/order.d.ts +12 -0
  141. package/dist/manifest/order.d.ts.map +1 -0
  142. package/dist/manifest/order.js +17 -0
  143. package/dist/manifest/order.js.map +1 -0
  144. package/dist/manifest/page.d.ts +24 -0
  145. package/dist/manifest/page.d.ts.map +1 -0
  146. package/dist/manifest/page.js +55 -0
  147. package/dist/manifest/page.js.map +1 -0
  148. package/dist/meta/html.d.ts +14 -0
  149. package/dist/meta/html.d.ts.map +1 -0
  150. package/dist/meta/html.js +24 -0
  151. package/dist/meta/html.js.map +1 -0
  152. package/dist/meta/index.d.ts +11 -0
  153. package/dist/meta/index.d.ts.map +1 -0
  154. package/dist/meta/index.js +11 -0
  155. package/dist/meta/index.js.map +1 -0
  156. package/dist/meta/tags.d.ts +21 -0
  157. package/dist/meta/tags.d.ts.map +1 -0
  158. package/dist/meta/tags.js +72 -0
  159. package/dist/meta/tags.js.map +1 -0
  160. package/dist/meta/url.d.ts +15 -0
  161. package/dist/meta/url.d.ts.map +1 -0
  162. package/dist/meta/url.js +34 -0
  163. package/dist/meta/url.js.map +1 -0
  164. package/dist/placement/check.d.ts +16 -0
  165. package/dist/placement/check.d.ts.map +1 -0
  166. package/dist/placement/check.js +40 -0
  167. package/dist/placement/check.js.map +1 -0
  168. package/dist/placement/index.d.ts +29 -0
  169. package/dist/placement/index.d.ts.map +1 -0
  170. package/dist/placement/index.js +61 -0
  171. package/dist/placement/index.js.map +1 -0
  172. package/dist/placement/relative.d.ts +31 -0
  173. package/dist/placement/relative.d.ts.map +1 -0
  174. package/dist/placement/relative.js +53 -0
  175. package/dist/placement/relative.js.map +1 -0
  176. package/dist/pool.d.ts +18 -0
  177. package/dist/pool.d.ts.map +1 -0
  178. package/dist/pool.js +56 -0
  179. package/dist/pool.js.map +1 -0
  180. package/dist/render/index.d.ts +10 -0
  181. package/dist/render/index.d.ts.map +1 -0
  182. package/dist/render/index.js +27 -0
  183. package/dist/render/index.js.map +1 -0
  184. package/dist/render/png.d.ts +10 -0
  185. package/dist/render/png.d.ts.map +1 -0
  186. package/dist/render/png.js +30 -0
  187. package/dist/render/png.js.map +1 -0
  188. package/dist/render/svg.d.ts +10 -0
  189. package/dist/render/svg.d.ts.map +1 -0
  190. package/dist/render/svg.js +20 -0
  191. package/dist/render/svg.js.map +1 -0
  192. package/dist/render/template.d.ts +9 -0
  193. package/dist/render/template.d.ts.map +1 -0
  194. package/dist/render/template.js +17 -0
  195. package/dist/render/template.js.map +1 -0
  196. package/dist/render.d.ts +6 -2
  197. package/dist/render.d.ts.map +1 -1
  198. package/dist/render.js +31 -10
  199. package/dist/render.js.map +1 -1
  200. package/dist/stamp/chunk.d.ts +16 -0
  201. package/dist/stamp/chunk.d.ts.map +1 -0
  202. package/dist/stamp/chunk.js +46 -0
  203. package/dist/stamp/chunk.js.map +1 -0
  204. package/dist/stamp/config-digest.d.ts +11 -0
  205. package/dist/stamp/config-digest.d.ts.map +1 -0
  206. package/dist/stamp/config-digest.js +43 -0
  207. package/dist/stamp/config-digest.js.map +1 -0
  208. package/dist/stamp/digest.d.ts +8 -0
  209. package/dist/stamp/digest.d.ts.map +1 -0
  210. package/dist/stamp/digest.js +20 -0
  211. package/dist/stamp/digest.js.map +1 -0
  212. package/dist/stamp/index.d.ts +20 -0
  213. package/dist/stamp/index.d.ts.map +1 -0
  214. package/dist/stamp/index.js +40 -0
  215. package/dist/stamp/index.js.map +1 -0
  216. package/dist/stamp/read.d.ts +7 -0
  217. package/dist/stamp/read.d.ts.map +1 -0
  218. package/dist/stamp/read.js +62 -0
  219. package/dist/stamp/read.js.map +1 -0
  220. package/dist/stamp.d.ts +29 -0
  221. package/dist/stamp.d.ts.map +1 -0
  222. package/dist/stamp.js +198 -0
  223. package/dist/stamp.js.map +1 -0
  224. package/dist/templates/banner/badge.d.ts +7 -0
  225. package/dist/templates/banner/badge.d.ts.map +1 -0
  226. package/dist/templates/banner/badge.js +24 -0
  227. package/dist/templates/banner/badge.js.map +1 -0
  228. package/dist/templates/banner/index.d.ts +9 -0
  229. package/dist/templates/banner/index.d.ts.map +1 -0
  230. package/dist/templates/banner/index.js +66 -0
  231. package/dist/templates/banner/index.js.map +1 -0
  232. package/dist/templates/banner/lines.d.ts +27 -0
  233. package/dist/templates/banner/lines.d.ts.map +1 -0
  234. package/dist/templates/banner/lines.js +46 -0
  235. package/dist/templates/banner/lines.js.map +1 -0
  236. package/dist/templates/card/index.d.ts +7 -0
  237. package/dist/templates/card/index.d.ts.map +1 -0
  238. package/dist/templates/card/index.js +43 -0
  239. package/dist/templates/card/index.js.map +1 -0
  240. package/dist/templates/card/lines.d.ts +17 -0
  241. package/dist/templates/card/lines.d.ts.map +1 -0
  242. package/dist/templates/card/lines.js +32 -0
  243. package/dist/templates/card/lines.js.map +1 -0
  244. package/dist/templates/code/chrome.d.ts +9 -0
  245. package/dist/templates/code/chrome.d.ts.map +1 -0
  246. package/dist/templates/code/chrome.js +32 -0
  247. package/dist/templates/code/chrome.js.map +1 -0
  248. package/dist/templates/code/clip.d.ts +18 -0
  249. package/dist/templates/code/clip.d.ts.map +1 -0
  250. package/dist/templates/code/clip.js +44 -0
  251. package/dist/templates/code/clip.js.map +1 -0
  252. package/dist/templates/code/ellipsis.d.ts +3 -0
  253. package/dist/templates/code/ellipsis.d.ts.map +1 -0
  254. package/dist/templates/code/ellipsis.js +3 -0
  255. package/dist/templates/code/ellipsis.js.map +1 -0
  256. package/dist/templates/code/fit.d.ts +27 -0
  257. package/dist/templates/code/fit.d.ts.map +1 -0
  258. package/dist/templates/code/fit.js +59 -0
  259. package/dist/templates/code/fit.js.map +1 -0
  260. package/dist/templates/code/index.d.ts +12 -0
  261. package/dist/templates/code/index.d.ts.map +1 -0
  262. package/dist/templates/code/index.js +64 -0
  263. package/dist/templates/code/index.js.map +1 -0
  264. package/dist/templates/code/layout.d.ts +21 -0
  265. package/dist/templates/code/layout.d.ts.map +1 -0
  266. package/dist/templates/code/layout.js +21 -0
  267. package/dist/templates/code/layout.js.map +1 -0
  268. package/dist/templates/code/panel.d.ts +17 -0
  269. package/dist/templates/code/panel.d.ts.map +1 -0
  270. package/dist/templates/code/panel.js +20 -0
  271. package/dist/templates/code/panel.js.map +1 -0
  272. package/dist/templates/code/plate.d.ts +15 -0
  273. package/dist/templates/code/plate.d.ts.map +1 -0
  274. package/dist/templates/code/plate.js +32 -0
  275. package/dist/templates/code/plate.js.map +1 -0
  276. package/dist/templates/code/spans.d.ts +19 -0
  277. package/dist/templates/code/spans.d.ts.map +1 -0
  278. package/dist/templates/code/spans.js +36 -0
  279. package/dist/templates/code/spans.js.map +1 -0
  280. package/dist/templates/code/warn.d.ts +11 -0
  281. package/dist/templates/code/warn.d.ts.map +1 -0
  282. package/dist/templates/code/warn.js +24 -0
  283. package/dist/templates/code/warn.js.map +1 -0
  284. package/dist/templates/footer.d.ts +21 -0
  285. package/dist/templates/footer.d.ts.map +1 -0
  286. package/dist/templates/footer.js +25 -0
  287. package/dist/templates/footer.js.map +1 -0
  288. package/dist/templates/index.d.ts +3 -3
  289. package/dist/templates/index.d.ts.map +1 -1
  290. package/dist/templates/index.js +6 -6
  291. package/dist/templates/index.js.map +1 -1
  292. package/dist/text/element.d.ts +18 -0
  293. package/dist/text/element.d.ts.map +1 -0
  294. package/dist/text/element.js +19 -0
  295. package/dist/text/element.js.map +1 -0
  296. package/dist/text/escape.d.ts +5 -0
  297. package/dist/text/escape.d.ts.map +1 -0
  298. package/dist/text/escape.js +12 -0
  299. package/dist/text/escape.js.map +1 -0
  300. package/dist/text/index.d.ts +7 -0
  301. package/dist/text/index.d.ts.map +1 -0
  302. package/dist/text/index.js +5 -0
  303. package/dist/text/index.js.map +1 -0
  304. package/dist/text/stack.d.ts +24 -0
  305. package/dist/text/stack.d.ts.map +1 -0
  306. package/dist/text/stack.js +18 -0
  307. package/dist/text/stack.js.map +1 -0
  308. package/dist/text/wrap.d.ts +12 -0
  309. package/dist/text/wrap.d.ts.map +1 -0
  310. package/dist/text/wrap.js +33 -0
  311. package/dist/text/wrap.js.map +1 -0
  312. package/dist/types.d.ts +326 -2
  313. package/dist/types.d.ts.map +1 -1
  314. package/dist/validate/check.d.ts +13 -0
  315. package/dist/validate/check.d.ts.map +1 -0
  316. package/dist/validate/check.js +34 -0
  317. package/dist/validate/check.js.map +1 -0
  318. package/dist/validate/index.d.ts +15 -0
  319. package/dist/validate/index.d.ts.map +1 -0
  320. package/dist/validate/index.js +41 -0
  321. package/dist/validate/index.js.map +1 -0
  322. package/dist/validate/keys.d.ts +58 -0
  323. package/dist/validate/keys.d.ts.map +1 -0
  324. package/dist/validate/keys.js +166 -0
  325. package/dist/validate/keys.js.map +1 -0
  326. package/dist/validate/overrides.d.ts +5 -0
  327. package/dist/validate/overrides.d.ts.map +1 -0
  328. package/dist/validate/overrides.js +43 -0
  329. package/dist/validate/overrides.js.map +1 -0
  330. package/dist/validate/placement.d.ts +10 -0
  331. package/dist/validate/placement.d.ts.map +1 -0
  332. package/dist/validate/placement.js +38 -0
  333. package/dist/validate/placement.js.map +1 -0
  334. package/dist/validate/sizes.d.ts +9 -0
  335. package/dist/validate/sizes.d.ts.map +1 -0
  336. package/dist/validate/sizes.js +27 -0
  337. package/dist/validate/sizes.js.map +1 -0
  338. package/dist/validate/suggest.d.ts +10 -0
  339. package/dist/validate/suggest.d.ts.map +1 -0
  340. package/dist/validate/suggest.js +55 -0
  341. package/dist/validate/suggest.js.map +1 -0
  342. package/dist/validate/values.d.ts +21 -0
  343. package/dist/validate/values.d.ts.map +1 -0
  344. package/dist/validate/values.js +57 -0
  345. package/dist/validate/values.js.map +1 -0
  346. package/dist/validate.d.ts +15 -0
  347. package/dist/validate.d.ts.map +1 -0
  348. package/dist/validate.js +300 -0
  349. package/dist/validate.js.map +1 -0
  350. package/package.json +13 -6
@@ -1,6 +1,6 @@
1
- import { bannerTemplate } from "./banner.js";
2
- import { cardTemplate } from "./card.js";
3
- import { codeTemplate } from "./code.js";
1
+ import { bannerTemplate } from "./banner/index.js";
2
+ import { cardTemplate } from "./card/index.js";
3
+ import { codeTemplate } from "./code/index.js";
4
4
  /**
5
5
  * Templates registered out of the box. Projects can add to or override these
6
6
  * via `config.templates`.
@@ -10,8 +10,8 @@ export const builtinTemplates = {
10
10
  [cardTemplate.name]: cardTemplate,
11
11
  [codeTemplate.name]: codeTemplate,
12
12
  };
13
- export { bannerTemplate } from "./banner.js";
14
- export { cardTemplate } from "./card.js";
15
- export { codeTemplate } from "./code.js";
13
+ export { bannerTemplate } from "./banner/index.js";
14
+ export { cardTemplate } from "./card/index.js";
15
+ export { codeTemplate } from "./code/index.js";
16
16
  export { optionalString } from "./props.js";
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAuC;IAClE,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,cAAc;IACrC,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,YAAY;IACjC,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,YAAY;CAClC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAuC;IAClE,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,cAAc;IACrC,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,YAAY;IACjC,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,YAAY;CAClC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Attributes accepted by {@link textElement}. Colour and opacity are optional.
3
+ */
4
+ export interface TextAttributes {
5
+ readonly x: number;
6
+ readonly y: number;
7
+ readonly fontFamily: string;
8
+ readonly fontSize: number;
9
+ readonly fontWeight: number;
10
+ readonly fill: string;
11
+ readonly fillOpacity?: number;
12
+ readonly anchor?: "start" | "middle" | "end";
13
+ }
14
+ /**
15
+ * Build a single `<text>` element. The content is XML-escaped.
16
+ */
17
+ export declare function textElement(content: string, attributes: TextAttributes): string;
18
+ //# sourceMappingURL=element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/text/element.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CAC9C;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,cAAc,GACzB,MAAM,CAkBR"}
@@ -0,0 +1,19 @@
1
+ import { escapeXml } from "./escape.js";
2
+ /**
3
+ * Build a single `<text>` element. The content is XML-escaped.
4
+ */
5
+ export function textElement(content, attributes) {
6
+ const opacity = attributes.fillOpacity === undefined
7
+ ? ""
8
+ : ` fill-opacity="${String(attributes.fillOpacity)}"`;
9
+ const anchor = attributes.anchor === undefined
10
+ ? ""
11
+ : ` text-anchor="${attributes.anchor}"`;
12
+ return (`<text x="${String(attributes.x)}" y="${String(attributes.y)}"` +
13
+ ` font-family="${escapeXml(attributes.fontFamily)}"` +
14
+ ` font-size="${String(attributes.fontSize)}"` +
15
+ ` font-weight="${String(attributes.fontWeight)}"` +
16
+ ` fill="${attributes.fill}"${opacity}${anchor}>` +
17
+ `${escapeXml(content)}</text>`);
18
+ }
19
+ //# sourceMappingURL=element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.js","sourceRoot":"","sources":["../../src/text/element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAgBxC;;GAEG;AACH,MAAM,UAAU,WAAW,CACzB,OAAe,EACf,UAA0B;IAE1B,MAAM,OAAO,GACX,UAAU,CAAC,WAAW,KAAK,SAAS;QAClC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,kBAAkB,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC;IAC1D,MAAM,MAAM,GACV,UAAU,CAAC,MAAM,KAAK,SAAS;QAC7B,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,iBAAiB,UAAU,CAAC,MAAM,GAAG,CAAC;IAE5C,OAAO,CACL,YAAY,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG;QAC/D,iBAAiB,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG;QACpD,eAAe,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG;QAC7C,iBAAiB,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG;QACjD,UAAU,UAAU,CAAC,IAAI,IAAI,OAAO,GAAG,MAAM,GAAG;QAChD,GAAG,SAAS,CAAC,OAAO,CAAC,SAAS,CAC/B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Escape a string for safe inclusion in SVG/XML text content or attributes.
3
+ */
4
+ export declare function escapeXml(value: string): string;
5
+ //# sourceMappingURL=escape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/text/escape.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO/C"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Escape a string for safe inclusion in SVG/XML text content or attributes.
3
+ */
4
+ export function escapeXml(value) {
5
+ return value
6
+ .replaceAll("&", "&amp;")
7
+ .replaceAll("<", "&lt;")
8
+ .replaceAll(">", "&gt;")
9
+ .replaceAll('"', "&quot;")
10
+ .replaceAll("'", "&apos;");
11
+ }
12
+ //# sourceMappingURL=escape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/text/escape.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO,KAAK;SACT,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC;SACzB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { escapeXml } from "./escape.js";
2
+ export { textElement } from "./element.js";
3
+ export type { TextAttributes } from "./element.js";
4
+ export { layoutStack } from "./stack.js";
5
+ export type { PlacedLine, StackLine } from "./stack.js";
6
+ export { estimateCharsPerLine, wrapText } from "./wrap.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { escapeXml } from "./escape.js";
2
+ export { textElement } from "./element.js";
3
+ export { layoutStack } from "./stack.js";
4
+ export { estimateCharsPerLine, wrapText } from "./wrap.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * A single line to place in a vertical stack.
3
+ */
4
+ export interface StackLine {
5
+ readonly fontSize: number;
6
+ /** Multiplier applied to `fontSize` for this line's total advance. */
7
+ readonly lineHeight?: number;
8
+ /** Extra space, in pixels, inserted before this line. Defaults to `0`. */
9
+ readonly gapBefore?: number;
10
+ }
11
+ /**
12
+ * A stack line with its computed text baseline `y` coordinate.
13
+ */
14
+ export interface PlacedLine {
15
+ readonly y: number;
16
+ readonly index: number;
17
+ }
18
+ /**
19
+ * Vertically centre a stack of lines within `[top, bottom]` and return the
20
+ * text baseline for each. The block is centred as a whole; if it is taller
21
+ * than the available area it simply starts at `top`.
22
+ */
23
+ export declare function layoutStack(lines: readonly StackLine[], top: number, bottom: number): PlacedLine[];
24
+ //# sourceMappingURL=stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../src/text/stack.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACb,UAAU,EAAE,CAed"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Vertically centre a stack of lines within `[top, bottom]` and return the
3
+ * text baseline for each. The block is centred as a whole; if it is taller
4
+ * than the available area it simply starts at `top`.
5
+ */
6
+ export function layoutStack(lines, top, bottom) {
7
+ const advances = lines.map((line) => (line.gapBefore ?? 0) + line.fontSize * (line.lineHeight ?? 1.2));
8
+ const total = advances.reduce((sum, advance) => sum + advance, 0);
9
+ let cursor = top + Math.max(0, (bottom - top - total) / 2);
10
+ return lines.map((line, index) => {
11
+ // Approximate the ascent as 80% of the font size to sit the baseline
12
+ // sensibly within each line's advance box, after any leading gap.
13
+ const baseline = cursor + (line.gapBefore ?? 0) + line.fontSize * 0.8;
14
+ cursor += advances[index] ?? 0;
15
+ return { y: Math.round(baseline), index };
16
+ });
17
+ }
18
+ //# sourceMappingURL=stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack.js","sourceRoot":"","sources":["../../src/text/stack.ts"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,MAAM,UAAU,WAAW,CACzB,KAA2B,EAC3B,GAAW,EACX,MAAc;IAEd,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CACxB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC,CAC3E,CAAC;IACF,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC;IAElE,IAAI,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAE3D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAC/B,qEAAqE;QACrE,kEAAkE;QAClE,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACtE,MAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Naive greedy word-wrap by character count. Words longer than the limit are
3
+ * kept intact on their own line rather than being split.
4
+ */
5
+ export declare function wrapText(text: string, charactersPerLine: number): string[];
6
+ /**
7
+ * Estimate how many characters of the given font size fit within `widthPx`.
8
+ * The `widthFactor` approximates average glyph width as a fraction of the font
9
+ * size (bolder/wider faces want a larger factor).
10
+ */
11
+ export declare function estimateCharsPerLine(widthPx: number, fontSize: number, widthFactor?: number): number;
12
+ //# sourceMappingURL=wrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrap.d.ts","sourceRoot":"","sources":["../../src/text/wrap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,MAAM,EAAE,CAsB1E;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,SAAO,GACjB,MAAM,CAER"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Naive greedy word-wrap by character count. Words longer than the limit are
3
+ * kept intact on their own line rather than being split.
4
+ */
5
+ export function wrapText(text, charactersPerLine) {
6
+ const limit = Math.max(1, Math.floor(charactersPerLine));
7
+ const words = text.split(/\s+/).filter((word) => word !== "");
8
+ const lines = [];
9
+ let currentLine = "";
10
+ for (const word of words) {
11
+ const nextLine = currentLine === "" ? word : `${currentLine} ${word}`;
12
+ if (nextLine.length > limit && currentLine !== "") {
13
+ lines.push(currentLine);
14
+ currentLine = word;
15
+ }
16
+ else {
17
+ currentLine = nextLine;
18
+ }
19
+ }
20
+ if (currentLine !== "") {
21
+ lines.push(currentLine);
22
+ }
23
+ return lines;
24
+ }
25
+ /**
26
+ * Estimate how many characters of the given font size fit within `widthPx`.
27
+ * The `widthFactor` approximates average glyph width as a fraction of the font
28
+ * size (bolder/wider faces want a larger factor).
29
+ */
30
+ export function estimateCharsPerLine(widthPx, fontSize, widthFactor = 0.58) {
31
+ return Math.max(1, Math.floor(widthPx / (fontSize * widthFactor)));
32
+ }
33
+ //# sourceMappingURL=wrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrap.js","sourceRoot":"","sources":["../../src/text/wrap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,iBAAyB;IAC9D,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAC9D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,WAAW,GAAG,EAAE,CAAC;IAErB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,QAAQ,GAAG,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,IAAI,EAAE,CAAC;QAEtE,IAAI,QAAQ,CAAC,MAAM,GAAG,KAAK,IAAI,WAAW,KAAK,EAAE,EAAE,CAAC;YAClD,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACxB,WAAW,GAAG,IAAI,CAAC;QACrB,CAAC;aAAM,CAAC;YACN,WAAW,GAAG,QAAQ,CAAC;QACzB,CAAC;IACH,CAAC;IAED,IAAI,WAAW,KAAK,EAAE,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAe,EACf,QAAgB,EAChB,WAAW,GAAG,IAAI;IAElB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC"}
package/dist/types.d.ts CHANGED
@@ -9,8 +9,10 @@ export interface Dimensions {
9
9
  * A named output size. The `name` identifies the size in output filenames
10
10
  * (e.g. `og`, `square`) and must be unique within a config, so every
11
11
  * generated image gets a distinct, descriptive filename.
12
+ *
13
+ * A size may also carry {@link SizeOverrides}, applied only when rendering it.
12
14
  */
13
- export interface OutputSize {
15
+ export interface OutputSize extends SizeOverrides {
14
16
  readonly name: string;
15
17
  readonly width: number;
16
18
  readonly height: number;
@@ -75,7 +77,10 @@ export interface Badge {
75
77
  export interface CodeStyle {
76
78
  /** Shiki theme name, e.g. `github-dark`, `monokai`, `catppuccin-mocha`. */
77
79
  readonly theme?: string;
78
- /** Monospace font stack. Must resolve to a font available to `sharp`. */
80
+ /**
81
+ * Monospace font stack. Must resolve to a configured font, or to an
82
+ * installed one when `systemFonts` is on.
83
+ */
79
84
  readonly fontFamily?: string;
80
85
  /**
81
86
  * Glyph advance width as a fraction of the font size. `0.6` matches most
@@ -100,6 +105,31 @@ export interface CodeStyle {
100
105
  */
101
106
  readonly minFontScale?: number;
102
107
  }
108
+ /**
109
+ * A font to load into the rasteriser, given either as a file path or as the
110
+ * font's bytes. Supply one entry per font file: weight and style are read from
111
+ * the file itself, so a bold and a regular face are two entries, and the SVG's
112
+ * `font-weight` picks between them.
113
+ *
114
+ * `family` is optional and does not affect matching — the family name in the
115
+ * font file does that. When given on the first font it seeds `fontFamily`,
116
+ * which saves repeating the name for the common single-font case.
117
+ */
118
+ export type FontSource = {
119
+ readonly family?: string;
120
+ /**
121
+ * Path to a `.ttf`, `.otf`, `.ttc` or `.otc` file, resolved from the
122
+ * current working directory when relative.
123
+ */
124
+ readonly path: string;
125
+ } | {
126
+ readonly family?: string;
127
+ /**
128
+ * The font file's bytes, for fonts loaded from a bundle or fetched at
129
+ * build time rather than read from disk.
130
+ */
131
+ readonly data: Uint8Array;
132
+ };
103
133
  /**
104
134
  * Image properties, typically read from a post's frontmatter. The schema is
105
135
  * intentionally open: templates read whatever fields they understand, so a
@@ -113,6 +143,192 @@ export interface MetaImageProps {
113
143
  readonly version?: string | number;
114
144
  readonly [key: string]: unknown;
115
145
  }
146
+ /**
147
+ * Build image props from a post's whole frontmatter, so a project can use the
148
+ * fields it already has rather than adding a props block to every file.
149
+ *
150
+ * Return `undefined` to leave a post without images. That is the filter for
151
+ * drafts, section indexes and anything else in the tree that is not a page
152
+ * worth sharing — without it, mapping frontmatter would mean an image for every
153
+ * markdown file there is. It only settles posts that say nothing for
154
+ * themselves, though: one declaring a props block is rendered either way, since
155
+ * asking for an image outright beats a blanket rule.
156
+ *
157
+ * The returned fields need not be complete: they are merged under whatever the
158
+ * post declares explicitly, and a missing template falls back to
159
+ * {@link ContentOptions.defaultTemplate}.
160
+ */
161
+ export type PropsFromFrontmatter = (frontmatter: Record<string, unknown>) => Record<string, unknown> | undefined;
162
+ /**
163
+ * How a post's slug — the base name for its images — is derived from its path
164
+ * when the frontmatter does not declare one.
165
+ *
166
+ * - `basename`: the filename without extension, or the parent directory for
167
+ * `index.*`. Suits page bundles, where the image sits beside the content.
168
+ * - `route`: the whole path without extension, with `index.*` standing for its
169
+ * directory, so `services/iam/index.md` becomes `services/iam` and a root
170
+ * `index.md` becomes `index`. Suits a site addressed by route.
171
+ */
172
+ export type SlugStrategy = "basename" | "route";
173
+ /**
174
+ * How to read image props out of a content tree. Every field is optional.
175
+ *
176
+ * This is the host-project half of the job — finding posts and understanding
177
+ * their frontmatter — and is deliberately absent from {@link ResolvedConfig}:
178
+ * a template is handed the resolved config, and where the props came from is
179
+ * none of its business.
180
+ */
181
+ export interface ContentOptions {
182
+ /** Frontmatter key holding the image props object. Default `meta_img_props`. */
183
+ readonly propsKey?: string;
184
+ /** Field within the props object naming the template. Default `template`. */
185
+ readonly templateField?: string;
186
+ /** Template to use when the template field is absent. */
187
+ readonly defaultTemplate?: string;
188
+ /**
189
+ * Derive props from a post's existing frontmatter, for a site whose posts
190
+ * already carry the fields an image needs under different names. An explicit
191
+ * props object still wins field by field, so per-post overrides keep working.
192
+ */
193
+ readonly props?: PropsFromFrontmatter;
194
+ /**
195
+ * Top-level frontmatter field to read the post slug from (used as the base
196
+ * filename). Default `slug`; falls back to the file/directory name.
197
+ */
198
+ readonly slugField?: string;
199
+ /**
200
+ * How to derive a slug from a post's path when its frontmatter declares
201
+ * none. Default `basename`.
202
+ */
203
+ readonly slugStrategy?: SlugStrategy;
204
+ /** File extensions to include. Default `.md` and `.markdown`. */
205
+ readonly extensions?: readonly string[];
206
+ }
207
+ /**
208
+ * A discovered content file with the image props read from its frontmatter.
209
+ *
210
+ * It lives here rather than with the walker so that {@link Placement} can name
211
+ * it without the config module depending on the content module, for the reason
212
+ * {@link ContentOptions} does.
213
+ */
214
+ export interface ContentFile {
215
+ /** Path relative to the walk `dir`. */
216
+ readonly contentPath: string;
217
+ /** Absolute path on disk. */
218
+ readonly absolutePath: string;
219
+ /** Base filename for this post's images (frontmatter slug, or path-derived). */
220
+ readonly slug: string;
221
+ readonly props: MetaImageProps;
222
+ }
223
+ /**
224
+ * Where an image is written, and the URL it is served at once it is.
225
+ *
226
+ * `outputPath` alone says where the bytes go and nothing about how anyone
227
+ * reaches them, so every site ends up rebuilding that mapping in its own
228
+ * templates — from information Colophon had at generate time and threw away.
229
+ *
230
+ * - `beside-content`: next to the post, which is the page-bundle convention
231
+ * and what Colophon has always done. Still the default.
232
+ * - `public-dir`: gathered into one directory, as Astro, Eleventy and Vite
233
+ * expect. A slug carrying directories keeps them underneath it.
234
+ * - `custom`: for a site whose mapping is its own — images under a dated
235
+ * directory, say.
236
+ *
237
+ * `urlBase` is what makes a URL: it is prefixed to the image's path under the
238
+ * root that placed it, and without one there is no URL, because no directory
239
+ * on disk says by itself how it is served. It can be a site-relative path
240
+ * (`/og`) or an absolute one, for images served from a CDN.
241
+ *
242
+ * `hash` puts a digest of the image's inputs in its filename, so that changing
243
+ * a post gives its image a URL nobody has cached yet. It is opt-in because it
244
+ * also means the filename moves whenever the image does, which not every setup
245
+ * wants. `custom` has no say in it: a placement naming its own paths is the
246
+ * one that can hash them itself.
247
+ */
248
+ export type Placement = {
249
+ readonly strategy: "beside-content";
250
+ readonly urlBase?: string;
251
+ readonly hash?: boolean;
252
+ } | {
253
+ readonly strategy: "public-dir";
254
+ /** Directory to gather images into, relative to the working directory. */
255
+ readonly dir: string;
256
+ readonly urlBase?: string;
257
+ readonly hash?: boolean;
258
+ } | {
259
+ readonly strategy: "custom";
260
+ readonly path: (file: ContentFile, size: OutputSize) => string;
261
+ /** Omit for images that are written but not served. */
262
+ readonly url?: (file: ContentFile, size: OutputSize) => string | undefined;
263
+ };
264
+ /**
265
+ * One image in the manifest.
266
+ *
267
+ * The dimensions are the ones it was actually rendered at, which is the point:
268
+ * sites hardcode 1200 and 630 into their meta tags because nothing told them
269
+ * otherwise, and a size they later change leaves the tags behind.
270
+ */
271
+ export interface ManifestImage {
272
+ /** Absent where the placement knows no URL — see {@link Placement}. */
273
+ readonly url?: string;
274
+ readonly width: number;
275
+ readonly height: number;
276
+ }
277
+ /** One page's images, keyed by output size name. */
278
+ export interface ManifestPage {
279
+ readonly images: Readonly<Record<string, ManifestImage>>;
280
+ /**
281
+ * The name of the most landscape image, by aspect ratio, with ties going to
282
+ * the first size configured. It is what a `summary_large_image` card wants,
283
+ * and picking it is a check every site currently writes for itself.
284
+ */
285
+ readonly widest: string;
286
+ /** Alt text, from the props' title. Absent for a page that has no title. */
287
+ readonly alt?: string;
288
+ }
289
+ /**
290
+ * What a build generated, for the site to read back: a JSON file listing every
291
+ * page's images, their URLs and the dimensions they were rendered at.
292
+ *
293
+ * Without it a site reconstructs all of that in template code — globbing for
294
+ * `*-og.png` to find the landscape variant, or writing image paths back into
295
+ * each post's frontmatter. All of it is known while generating.
296
+ *
297
+ * Pages are keyed by slug, which is what a site addresses a page by: with
298
+ * `slugStrategy: "route"` that is the route itself.
299
+ */
300
+ export interface Manifest {
301
+ /** Schema version, so a reader can tell what it is holding. */
302
+ readonly version: 1;
303
+ readonly pages: Readonly<Record<string, ManifestPage>>;
304
+ }
305
+ /**
306
+ * One `<meta>` tag, as the attributes it carries.
307
+ *
308
+ * Open Graph names its tags with `property` and Twitter with `name`, which is
309
+ * a distinction sites get wrong routinely. Keeping them apart in the type
310
+ * means a component can spread a tag — `<meta {...tag} />` — and be right
311
+ * either way.
312
+ */
313
+ export type MetaTag = {
314
+ readonly property: string;
315
+ readonly content: string;
316
+ } | {
317
+ readonly name: string;
318
+ readonly content: string;
319
+ };
320
+ /** Options for {@link MetaTag} generation. */
321
+ export interface MetaTagOptions {
322
+ /**
323
+ * Absolute base for a site-relative image URL, e.g. `https://example.com`.
324
+ *
325
+ * Open Graph wants an absolute URL — a crawler has no page to resolve a
326
+ * relative one against — and a manifest records whatever the placement's
327
+ * `urlBase` said, which is usually site-relative. A URL that is already
328
+ * absolute is left alone, so a CDN base needs nothing here.
329
+ */
330
+ readonly baseUrl?: string;
331
+ }
116
332
  /**
117
333
  * Reports something a template had to compromise on — code truncated to stay
118
334
  * legible, so far. Rendering carries on regardless: a share image is worth
@@ -149,6 +365,24 @@ export interface ColophonConfig {
149
365
  readonly colors?: BrandColors;
150
366
  /** Explicit background, overriding the gradient derived from `colors`. */
151
367
  readonly background?: Background;
368
+ /**
369
+ * Fonts to load into the rasteriser, so the output does not depend on what
370
+ * the build machine happens to have installed. Supplying any font turns
371
+ * {@link ColophonConfig.systemFonts} off by default, which is the point:
372
+ * a laptop, CI and a Docker image then render the same image.
373
+ */
374
+ readonly fonts?: readonly FontSource[];
375
+ /**
376
+ * Whether to also load the machine's installed fonts. Defaults to `true`
377
+ * when no `fonts` are configured (nothing else would render) and `false`
378
+ * when they are. Turn it on alongside `fonts` to fall back to system fonts
379
+ * for families you have not supplied — at the cost of determinism.
380
+ */
381
+ readonly systemFonts?: boolean;
382
+ /**
383
+ * Font stack for template text. Defaults to the `family` of the first
384
+ * configured font, or to `DEFAULT_FONT_FAMILY` when there is none.
385
+ */
152
386
  readonly fontFamily?: string;
153
387
  /** Footer text drawn along the bottom edge. Omit (the default) for none. */
154
388
  readonly footer?: string;
@@ -168,6 +402,93 @@ export interface ColophonConfig {
168
402
  readonly sizes?: readonly OutputSize[];
169
403
  /** Extra templates, merged over (and able to override) the built-ins. */
170
404
  readonly templates?: Readonly<Record<string, Template>>;
405
+ /**
406
+ * How to read props out of the content tree. Used by `generate` and the CLI;
407
+ * the render core never sees it.
408
+ */
409
+ readonly content?: ContentOptions;
410
+ /**
411
+ * Where images are written and what URL they end up at. Defaults to
412
+ * `beside-content`, which is what Colophon did before there was a choice.
413
+ */
414
+ readonly placement?: Placement;
415
+ /**
416
+ * Where to write a {@link Manifest} of everything the build generated,
417
+ * relative to the working directory. Omit (the default) to write none.
418
+ *
419
+ * Somewhere the site reads data from: `data/colophon.json` for Hugo,
420
+ * `src/data/` for Astro, `_data/` for Eleventy and Jekyll.
421
+ */
422
+ readonly manifest?: string;
423
+ /**
424
+ * One-off images that belong to the project rather than to any post — a
425
+ * package card, a repository social preview. Rendered by the same build, and
426
+ * skipped or re-rendered on the same stamps.
427
+ */
428
+ readonly extra?: readonly ExtraImage[];
429
+ }
430
+ /**
431
+ * A function a config module may export instead of a config object, so that a
432
+ * config which has to compute something — brand colours read out of the site's
433
+ * own stylesheet, say — can still be a config module rather than a script.
434
+ *
435
+ * It takes no arguments. Anything it might be handed is either already on the
436
+ * command line or a decision the config itself is making.
437
+ */
438
+ export type ColophonConfigFactory = () => ColophonConfig | Promise<ColophonConfig>;
439
+ /** What a config module's default export may be. */
440
+ export type ColophonConfigInput = ColophonConfig | ColophonConfigFactory;
441
+ /**
442
+ * Config an {@link OutputSize} may override for itself.
443
+ *
444
+ * Some settings only make sense per size: `code.minFontScale` is the clearest
445
+ * case, because a 1:1 square and a 1.91:1 landscape have very different amounts
446
+ * of vertical room for the same snippet. Without this the only way to vary one
447
+ * is a `generate` pass per size, which walks and parses the whole content tree
448
+ * again for each.
449
+ *
450
+ * Only what a template reads while drawing is overridable. `fonts`,
451
+ * `systemFonts` and `templates` are shared build inputs rather than part of the
452
+ * picture; `onWarning` is where messages go, not what they say; and `sizes`
453
+ * inside a size would be nonsense.
454
+ */
455
+ export interface SizeOverrides {
456
+ /**
457
+ * Merged over the config's `colors`, so a size can change one shade on its
458
+ * own — `brand` is optional here precisely because the rest are kept.
459
+ */
460
+ readonly colors?: Partial<BrandColors>;
461
+ /** Replaces the config's background outright — see the note on merging. */
462
+ readonly background?: Background;
463
+ readonly fontFamily?: string;
464
+ readonly footer?: string;
465
+ readonly badge?: Badge;
466
+ /** Merged over the config's `code`, so a size can change one setting. */
467
+ readonly code?: CodeStyle;
468
+ }
469
+ /**
470
+ * A single image that is not tied to a content file: props, somewhere to write
471
+ * it, and the size to draw it at.
472
+ *
473
+ * The alternative is a script that calls `renderMetaImages` and writes the
474
+ * bytes itself, which is a lot of machinery for one card — and one that keeps
475
+ * neither the rebuild stamps nor the build log a content image gets.
476
+ */
477
+ export interface ExtraImage {
478
+ readonly props: MetaImageProps;
479
+ /**
480
+ * Where to write the PNG, resolved from the current working directory when
481
+ * relative. This image has no post to sit beside, so there is nothing to
482
+ * derive a path from and `generate`'s `outputPath` is not consulted.
483
+ */
484
+ readonly output: string;
485
+ /**
486
+ * The size to render at, {@link SizeOverrides} and all — an inline size is
487
+ * how a one-off image gets its own footer or palette without a whole entry
488
+ * in `sizes`. Defaults to the first configured size, since a one-off card
489
+ * usually wants to match the site's primary share format.
490
+ */
491
+ readonly size?: OutputSize;
171
492
  }
172
493
  /**
173
494
  * Fully-resolved configuration with all defaults applied.
@@ -175,6 +496,9 @@ export interface ColophonConfig {
175
496
  export interface ResolvedConfig {
176
497
  readonly colors: Required<BrandColors>;
177
498
  readonly background: Background;
499
+ /** Configured fonts, with every `path` made absolute. */
500
+ readonly fonts: readonly FontSource[];
501
+ readonly systemFonts: boolean;
178
502
  readonly fontFamily: string;
179
503
  readonly footer: string | undefined;
180
504
  readonly badge: Badge | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClD;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,Q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