@kensio/colophon 2.11.0 → 2.12.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 (186) hide show
  1. package/README.md +1 -1
  2. package/dist/astro/index.d.ts.map +1 -1
  3. package/dist/astro/index.js +0 -1
  4. package/dist/astro/index.js.map +1 -1
  5. package/dist/cli/index.js +0 -0
  6. package/dist/config/defaults.d.ts.map +1 -1
  7. package/dist/config/defaults.js +5 -0
  8. package/dist/config/defaults.js.map +1 -1
  9. package/dist/config/index.js +1 -1
  10. package/dist/image/media.d.ts.map +1 -1
  11. package/dist/image/media.js.map +1 -1
  12. package/dist/image/svg.js +1 -1
  13. package/dist/measure/faces.d.ts.map +1 -1
  14. package/dist/measure/faces.js.map +1 -1
  15. package/dist/platform/base64.d.ts.map +1 -1
  16. package/dist/platform/base64.js +0 -2
  17. package/dist/platform/base64.js.map +1 -1
  18. package/dist/pool.js +1 -1
  19. package/dist/templates/banner/index.js +2 -2
  20. package/dist/templates/banner/index.js.map +1 -1
  21. package/dist/templates/card/index.js +2 -2
  22. package/dist/templates/card/index.js.map +1 -1
  23. package/dist/templates/code/bar.d.ts +24 -0
  24. package/dist/templates/code/bar.d.ts.map +1 -0
  25. package/dist/templates/code/bar.js +31 -0
  26. package/dist/templates/code/bar.js.map +1 -0
  27. package/dist/templates/code/gutter.d.ts +30 -0
  28. package/dist/templates/code/gutter.d.ts.map +1 -0
  29. package/dist/templates/code/gutter.js +64 -0
  30. package/dist/templates/code/gutter.js.map +1 -0
  31. package/dist/templates/code/index.d.ts.map +1 -1
  32. package/dist/templates/code/index.js +34 -15
  33. package/dist/templates/code/index.js.map +1 -1
  34. package/dist/templates/code/layout.d.ts +6 -1
  35. package/dist/templates/code/layout.d.ts.map +1 -1
  36. package/dist/templates/code/layout.js +8 -3
  37. package/dist/templates/code/layout.js.map +1 -1
  38. package/dist/templates/code/mark/draw.d.ts +26 -0
  39. package/dist/templates/code/mark/draw.d.ts.map +1 -0
  40. package/dist/templates/code/mark/draw.js +41 -0
  41. package/dist/templates/code/mark/draw.js.map +1 -0
  42. package/dist/templates/code/mark/index.d.ts +16 -0
  43. package/dist/templates/code/mark/index.d.ts.map +1 -0
  44. package/dist/templates/code/mark/index.js +34 -0
  45. package/dist/templates/code/mark/index.js.map +1 -0
  46. package/dist/templates/code/mark/locate.d.ts +20 -0
  47. package/dist/templates/code/mark/locate.d.ts.map +1 -0
  48. package/dist/templates/code/mark/locate.js +56 -0
  49. package/dist/templates/code/mark/locate.js.map +1 -0
  50. package/dist/templates/code/mark/read.d.ts +30 -0
  51. package/dist/templates/code/mark/read.d.ts.map +1 -0
  52. package/dist/templates/code/mark/read.js +61 -0
  53. package/dist/templates/code/mark/read.js.map +1 -0
  54. package/dist/templates/code/plate.d.ts +7 -1
  55. package/dist/templates/code/plate.d.ts.map +1 -1
  56. package/dist/templates/code/plate.js +14 -4
  57. package/dist/templates/code/plate.js.map +1 -1
  58. package/dist/templates/footer.d.ts +9 -1
  59. package/dist/templates/footer.d.ts.map +1 -1
  60. package/dist/templates/footer.js +24 -0
  61. package/dist/templates/footer.js.map +1 -1
  62. package/dist/templates/frame.d.ts.map +1 -1
  63. package/dist/templates/frame.js +5 -7
  64. package/dist/templates/frame.js.map +1 -1
  65. package/dist/templates/terminal/index.js +4 -4
  66. package/dist/templates/terminal/index.js.map +1 -1
  67. package/dist/templates/window/dots.d.ts +11 -0
  68. package/dist/templates/window/dots.d.ts.map +1 -0
  69. package/dist/templates/window/dots.js +32 -0
  70. package/dist/templates/window/dots.js.map +1 -0
  71. package/dist/templates/{terminal/window.d.ts → window/index.d.ts} +4 -2
  72. package/dist/templates/window/index.d.ts.map +1 -0
  73. package/dist/templates/window/index.js +48 -0
  74. package/dist/templates/window/index.js.map +1 -0
  75. package/dist/templates/window/title.d.ts +9 -0
  76. package/dist/templates/window/title.d.ts.map +1 -0
  77. package/dist/templates/window/title.js +24 -0
  78. package/dist/templates/window/title.js.map +1 -0
  79. package/dist/texture/chevrons.d.ts +13 -0
  80. package/dist/texture/chevrons.d.ts.map +1 -0
  81. package/dist/texture/chevrons.js +22 -0
  82. package/dist/texture/chevrons.js.map +1 -0
  83. package/dist/texture/color.d.ts +10 -0
  84. package/dist/texture/color.d.ts.map +1 -0
  85. package/dist/texture/color.js +10 -0
  86. package/dist/texture/color.js.map +1 -0
  87. package/dist/texture/grid.d.ts +14 -0
  88. package/dist/texture/grid.d.ts.map +1 -0
  89. package/dist/texture/grid.js +38 -0
  90. package/dist/texture/grid.js.map +1 -0
  91. package/dist/texture/halftone.d.ts +14 -0
  92. package/dist/texture/halftone.d.ts.map +1 -0
  93. package/dist/texture/halftone.js +55 -0
  94. package/dist/texture/halftone.js.map +1 -0
  95. package/dist/texture/honeycomb.d.ts +14 -0
  96. package/dist/texture/honeycomb.d.ts.map +1 -0
  97. package/dist/texture/honeycomb.js +43 -0
  98. package/dist/texture/honeycomb.js.map +1 -0
  99. package/dist/texture/index.d.ts.map +1 -1
  100. package/dist/texture/index.js +44 -8
  101. package/dist/texture/index.js.map +1 -1
  102. package/dist/texture/moire.d.ts +18 -0
  103. package/dist/texture/moire.d.ts.map +1 -0
  104. package/dist/texture/moire.js +44 -0
  105. package/dist/texture/moire.js.map +1 -0
  106. package/dist/texture/pattern.d.ts +10 -0
  107. package/dist/texture/pattern.d.ts.map +1 -1
  108. package/dist/texture/pattern.js +37 -15
  109. package/dist/texture/pattern.js.map +1 -1
  110. package/dist/texture/rays.d.ts +13 -0
  111. package/dist/texture/rays.d.ts.map +1 -0
  112. package/dist/texture/rays.js +36 -0
  113. package/dist/texture/rays.js.map +1 -0
  114. package/dist/texture/resolve.d.ts +5 -4
  115. package/dist/texture/resolve.d.ts.map +1 -1
  116. package/dist/texture/resolve.js +5 -4
  117. package/dist/texture/resolve.js.map +1 -1
  118. package/dist/texture/scallops.d.ts +14 -0
  119. package/dist/texture/scallops.d.ts.map +1 -0
  120. package/dist/texture/scallops.js +29 -0
  121. package/dist/texture/scallops.js.map +1 -0
  122. package/dist/texture/tile.d.ts +14 -0
  123. package/dist/texture/tile.d.ts.map +1 -0
  124. package/dist/texture/tile.js +23 -0
  125. package/dist/texture/tile.js.map +1 -0
  126. package/dist/texture/topographic/contours.d.ts +13 -0
  127. package/dist/texture/topographic/contours.d.ts.map +1 -0
  128. package/dist/texture/topographic/contours.js +72 -0
  129. package/dist/texture/topographic/contours.js.map +1 -0
  130. package/dist/texture/topographic/field.d.ts +8 -0
  131. package/dist/texture/topographic/field.d.ts.map +1 -0
  132. package/dist/texture/topographic/field.js +29 -0
  133. package/dist/texture/topographic/field.js.map +1 -0
  134. package/dist/texture/topographic/index.d.ts +17 -0
  135. package/dist/texture/topographic/index.d.ts.map +1 -0
  136. package/dist/texture/topographic/index.js +48 -0
  137. package/dist/texture/topographic/index.js.map +1 -0
  138. package/dist/texture/waves.d.ts +18 -0
  139. package/dist/texture/waves.d.ts.map +1 -0
  140. package/dist/texture/waves.js +55 -0
  141. package/dist/texture/waves.js.map +1 -0
  142. package/dist/theme/presets.d.ts +13 -5
  143. package/dist/theme/presets.d.ts.map +1 -1
  144. package/dist/theme/presets.js +16 -5
  145. package/dist/theme/presets.js.map +1 -1
  146. package/dist/types.d.ts +256 -7
  147. package/dist/types.d.ts.map +1 -1
  148. package/dist/validate/collect.d.ts.map +1 -1
  149. package/dist/validate/collect.js +2 -1
  150. package/dist/validate/collect.js.map +1 -1
  151. package/dist/validate/keys.d.ts +41 -2
  152. package/dist/validate/keys.d.ts.map +1 -1
  153. package/dist/validate/keys.js +141 -4
  154. package/dist/validate/keys.js.map +1 -1
  155. package/dist/validate/texture.d.ts +4 -5
  156. package/dist/validate/texture.d.ts.map +1 -1
  157. package/dist/validate/texture.js +11 -16
  158. package/dist/validate/texture.js.map +1 -1
  159. package/dist/validate/values.d.ts +6 -0
  160. package/dist/validate/values.d.ts.map +1 -1
  161. package/dist/validate/values.js +16 -1
  162. package/dist/validate/values.js.map +1 -1
  163. package/package.json +23 -31
  164. package/dist/highlight/probe.d.ts +0 -4
  165. package/dist/highlight/probe.d.ts.map +0 -1
  166. package/dist/highlight/probe.js +0 -4
  167. package/dist/highlight/probe.js.map +0 -1
  168. package/dist/jpeg/index.d.ts +0 -10
  169. package/dist/jpeg/index.d.ts.map +0 -1
  170. package/dist/jpeg/index.js +0 -2
  171. package/dist/jpeg/index.js.map +0 -1
  172. package/dist/render/png.d.ts +0 -20
  173. package/dist/render/png.d.ts.map +0 -1
  174. package/dist/render/png.js +0 -29
  175. package/dist/render/png.js.map +0 -1
  176. package/dist/stamp/chunk.d.ts +0 -14
  177. package/dist/stamp/chunk.d.ts.map +0 -1
  178. package/dist/stamp/chunk.js +0 -38
  179. package/dist/stamp/chunk.js.map +0 -1
  180. package/dist/templates/code/ellipsis.d.ts +0 -3
  181. package/dist/templates/code/ellipsis.d.ts.map +0 -1
  182. package/dist/templates/code/ellipsis.js +0 -3
  183. package/dist/templates/code/ellipsis.js.map +0 -1
  184. package/dist/templates/terminal/window.d.ts.map +0 -1
  185. package/dist/templates/terminal/window.js +0 -84
  186. package/dist/templates/terminal/window.js.map +0 -1
@@ -67,9 +67,7 @@ export const customPlacementKeys = knownKeys({
67
67
  * point of it.
68
68
  */
69
69
  export const placementStrategies = knownKeys({
70
- // eslint-disable-next-line @typescript-eslint/naming-convention
71
70
  "beside-content": true,
72
- // eslint-disable-next-line @typescript-eslint/naming-convention
73
71
  "public-dir": true,
74
72
  custom: true,
75
73
  });
@@ -111,6 +109,21 @@ export const codeKeys = knownKeys({
111
109
  cornerScale: true,
112
110
  maxFontScale: true,
113
111
  minFontScale: true,
112
+ lineNumbers: true,
113
+ chrome: true,
114
+ panelOpacity: true,
115
+ borderColor: true,
116
+ borderOpacity: true,
117
+ });
118
+ /**
119
+ * The window chrome styles, as values, for the reason {@link backgroundTypes}
120
+ * are: the template draws anything it does not recognise as a bar with the
121
+ * neutral buttons, so a mistyped `macOS` would quietly lose the traffic lights.
122
+ */
123
+ export const codeChromeStyles = knownKeys({
124
+ none: true,
125
+ mono: true,
126
+ macos: true,
114
127
  });
115
128
  /** One output size, including the overrides it may carry. */
116
129
  export const sizeKeys = knownKeys({
@@ -239,16 +252,140 @@ export const rulesTextureKeys = knownKeys({
239
252
  width: true,
240
253
  gap: true,
241
254
  angle: true,
255
+ cross: true,
256
+ });
257
+ /** Keys of the rings drawn in from either side. */
258
+ export const wavesTextureKeys = knownKeys({
259
+ type: true,
260
+ color: true,
261
+ opacity: true,
262
+ width: true,
263
+ gap: true,
264
+ });
265
+ /** Keys of the fan of straight lines. */
266
+ export const raysTextureKeys = knownKeys({
267
+ type: true,
268
+ color: true,
269
+ opacity: true,
270
+ width: true,
271
+ count: true,
272
+ x: true,
273
+ y: true,
274
+ });
275
+ /** Keys of the two crossed grids. */
276
+ export const moireTextureKeys = knownKeys({
277
+ type: true,
278
+ color: true,
279
+ opacity: true,
280
+ width: true,
281
+ gap: true,
282
+ angle: true,
283
+ });
284
+ /** Keys of squared paper. */
285
+ export const gridTextureKeys = knownKeys({
286
+ type: true,
287
+ color: true,
288
+ opacity: true,
289
+ width: true,
290
+ gap: true,
291
+ major: true,
292
+ });
293
+ /** Keys of the grid of crosses. */
294
+ export const crossesTextureKeys = knownKeys({
295
+ type: true,
296
+ color: true,
297
+ opacity: true,
298
+ size: true,
299
+ width: true,
300
+ gap: true,
242
301
  });
302
+ /** Keys of the rows of chevrons. */
303
+ export const chevronsTextureKeys = knownKeys({
304
+ type: true,
305
+ color: true,
306
+ opacity: true,
307
+ width: true,
308
+ gap: true,
309
+ });
310
+ /** Keys of the honeycomb. */
311
+ export const honeycombTextureKeys = knownKeys({
312
+ type: true,
313
+ color: true,
314
+ opacity: true,
315
+ width: true,
316
+ size: true,
317
+ });
318
+ /** Keys of the fish scales. */
319
+ export const scallopsTextureKeys = knownKeys({
320
+ type: true,
321
+ color: true,
322
+ opacity: true,
323
+ width: true,
324
+ size: true,
325
+ });
326
+ /** Keys of the growing dots. */
327
+ export const halftoneTextureKeys = knownKeys({
328
+ type: true,
329
+ color: true,
330
+ opacity: true,
331
+ size: true,
332
+ gap: true,
333
+ angle: true,
334
+ from: true,
335
+ });
336
+ /** Keys of the contour lines. */
337
+ export const topographicTextureKeys = knownKeys({
338
+ type: true,
339
+ color: true,
340
+ opacity: true,
341
+ width: true,
342
+ gap: true,
343
+ relief: true,
344
+ seed: true,
345
+ });
346
+ /**
347
+ * The keys each treatment accepts, by the name it declares.
348
+ *
349
+ * A table rather than a chain of `if`s in `checkTexture`, which had a branch
350
+ * per texture and there are ten of them. It lives here, beside the lists it is
351
+ * made of, because it is one more list rather than a piece of checking. The
352
+ * type is what stops it going stale: a treatment added to `Texture` with no
353
+ * entry here fails to compile.
354
+ */
355
+ export const textureKeysByType = {
356
+ grain: grainTextureKeys,
357
+ dots: dotsTextureKeys,
358
+ rules: rulesTextureKeys,
359
+ grid: gridTextureKeys,
360
+ crosses: crossesTextureKeys,
361
+ chevrons: chevronsTextureKeys,
362
+ honeycomb: honeycombTextureKeys,
363
+ moire: moireTextureKeys,
364
+ waves: wavesTextureKeys,
365
+ rays: raysTextureKeys,
366
+ scallops: scallopsTextureKeys,
367
+ halftone: halftoneTextureKeys,
368
+ topographic: topographicTextureKeys,
369
+ };
243
370
  /**
244
371
  * The texture variants, as values, for the reason {@link backgroundTypes} are:
245
- * the three have different keys, so a mistyped `type` has to be reported as
246
- * itself rather than as a list of keys that do not apply.
372
+ * they have different keys, so a mistyped `type` has to be reported as itself
373
+ * rather than as a list of keys that do not apply.
247
374
  */
248
375
  export const textureTypes = knownKeys({
249
376
  grain: true,
250
377
  dots: true,
251
378
  rules: true,
379
+ waves: true,
380
+ rays: true,
381
+ moire: true,
382
+ grid: true,
383
+ crosses: true,
384
+ chevrons: true,
385
+ honeycomb: true,
386
+ scallops: true,
387
+ halftone: true,
388
+ topographic: true,
252
389
  });
253
390
  /**
254
391
  * The output formats, as values, for the reason {@link backgroundTypes} are:
@@ -1 +1 @@
1
- {"version":3,"file":"keys.js","sourceRoot":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Aa,GAAG,SAAS,CAAgC;IACpE,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACX,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAgC;IACrE,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;CACZ,CAAC,CAAC"}
@@ -1,11 +1,10 @@
1
1
  /**
2
2
  * Check a texture against the keys of whichever treatment it declares.
3
3
  *
4
- * The same reasoning as a background's: `textureSvg` draws anything it does
5
- * not recognise as the last variant it checks for, so an unknown `type` would
6
- * come out as a set of ruled lines nobody asked for. A texture with no `type`
7
- * is left to the type checker, since without one there is no telling which
8
- * keys were meant.
4
+ * The same reasoning as a background's: a mistyped `type` has to be reported
5
+ * as itself rather than as a list of keys that do not apply. A texture with no
6
+ * `type` is left to the type checker, since without one there is no telling
7
+ * which keys were meant.
9
8
  */
10
9
  export declare function checkTexture(texture: unknown, path: string, problems: string[]): void;
11
10
  //# sourceMappingURL=texture.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"texture.d.ts","sourceRoot":"","sources":["../../src/validate/texture.ts"],"names":[],"mappings":"AASA;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAAE,GACjB,IAAI,CA2BN"}
1
+ {"version":3,"file":"texture.d.ts","sourceRoot":"","sources":["../../src/validate/texture.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAAE,GACjB,IAAI,CAiBN"}
@@ -1,30 +1,25 @@
1
1
  import { checkKeys, isRecord } from "./check.js";
2
- import { dotsTextureKeys, grainTextureKeys, rulesTextureKeys, textureTypes, } from "./keys.js";
2
+ import { textureKeysByType, textureTypes } from "./keys.js";
3
3
  import { describeUnknownValue } from "./values.js";
4
+ /** Whether a declared type is one of the treatments there are. */
5
+ function isTextureType(type) {
6
+ return typeof type === "string" && type in textureKeysByType;
7
+ }
4
8
  /**
5
9
  * Check a texture against the keys of whichever treatment it declares.
6
10
  *
7
- * The same reasoning as a background's: `textureSvg` draws anything it does
8
- * not recognise as the last variant it checks for, so an unknown `type` would
9
- * come out as a set of ruled lines nobody asked for. A texture with no `type`
10
- * is left to the type checker, since without one there is no telling which
11
- * keys were meant.
11
+ * The same reasoning as a background's: a mistyped `type` has to be reported
12
+ * as itself rather than as a list of keys that do not apply. A texture with no
13
+ * `type` is left to the type checker, since without one there is no telling
14
+ * which keys were meant.
12
15
  */
13
16
  export function checkTexture(texture, path, problems) {
14
17
  if (!isRecord(texture)) {
15
18
  return;
16
19
  }
17
20
  const { type } = texture;
18
- if (type === "grain") {
19
- checkKeys(texture, path, grainTextureKeys, problems);
20
- return;
21
- }
22
- if (type === "dots") {
23
- checkKeys(texture, path, dotsTextureKeys, problems);
24
- return;
25
- }
26
- if (type === "rules") {
27
- checkKeys(texture, path, rulesTextureKeys, problems);
21
+ if (isTextureType(type)) {
22
+ checkKeys(texture, path, textureKeysByType[type], problems);
28
23
  return;
29
24
  }
30
25
  if (typeof type === "string") {
@@ -1 +1 @@
1
- {"version":3,"file":"texture.js","sourceRoot":"","sources":["../../src/validate/texture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAC1B,OAAgB,EAChB,IAAY,EACZ,QAAkB;IAElB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE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E,GAAG,OAAO,CAAC;IAEzB,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;QAC5D,OAAO;IACT,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,QAAQ,CAAC,IAAI,CACX,oBAAoB,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,CAAC,CAClE,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -8,6 +8,12 @@ export declare function describeUnknownValue(noun: string, plural: string, value
8
8
  * anything else is a shape the type checker already covers, as elsewhere here.
9
9
  */
10
10
  export declare function checkSlugStrategy(content: unknown, problems: string[]): void;
11
+ /**
12
+ * Check the window chrome names one of the three there are. A name the
13
+ * template does not know draws the neutral bar, so `macOS` would silently be
14
+ * the wrong window rather than a build that says so.
15
+ */
16
+ export declare function checkCodeChrome(code: unknown, problems: string[]): void;
11
17
  /**
12
18
  * Check the output format names one the encoder has. `jpg` is the spelling
13
19
  * people reach for, and the suggestion is what turns it into `jpeg` rather than
@@ -1 +1 @@
1
- {"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/validate/values.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,MAAM,CAMR;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAmB5E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAQrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAUnE"}
1
+ {"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/validate/values.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,MAAM,CAMR;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAmB5E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAcvE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAQrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAUnE"}
@@ -1,6 +1,6 @@
1
1
  import { themeNames } from "../theme/index.js";
2
2
  import { isRecord } from "./check.js";
3
- import { outputFormats, slugStrategies } from "./keys.js";
3
+ import { codeChromeStyles, outputFormats, slugStrategies } from "./keys.js";
4
4
  import { nearestName } from "./suggest.js";
5
5
  /**
6
6
  * Report a value that is not one of the names a field accepts. `noun` names
@@ -26,6 +26,21 @@ export function checkSlugStrategy(content, problems) {
26
26
  }
27
27
  problems.push(describeUnknownValue("slug strategy", "strategies", strategy, slugStrategies));
28
28
  }
29
+ /**
30
+ * Check the window chrome names one of the three there are. A name the
31
+ * template does not know draws the neutral bar, so `macOS` would silently be
32
+ * the wrong window rather than a build that says so.
33
+ */
34
+ export function checkCodeChrome(code, problems) {
35
+ if (!isRecord(code)) {
36
+ return;
37
+ }
38
+ const chrome = code["chrome"];
39
+ if (typeof chrome !== "string" || codeChromeStyles.includes(chrome)) {
40
+ return;
41
+ }
42
+ problems.push(describeUnknownValue("window chrome", "styles", chrome, codeChromeStyles));
43
+ }
29
44
  /**
30
45
  * Check the output format names one the encoder has. `jpg` is the spelling
31
46
  * people reach for, and the suggestion is what turns it into `jpeg` rather than
@@ -1 +1 @@
1
- {"version":3,"file":"values.js","sourceRoot":"","sources":["../../src/validate/values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,MAAc,EACd,KAAa,EACb,KAAwB;IAExB,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAE7C,OAAO,UAAU,KAAK,SAAS;QAC7B,CAAC,CAAC,WAAW,IAAI,KAAK,KAAK,YAAY,MAAM,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;QACrE,CAAC,CAAC,WAAW,IAAI,KAAK,KAAK,oBAAoB,UAAU,IAAI,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAgB,EAAE,QAAkB;IACpE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAEzC,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtE,OAAO;IACT,CAAC;IAED,QAAQ,CAAC,IAA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ED,QAAQ,CAAC,IAAI,CACX,oBAAoB,CAAC,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,CACxE,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc,EAAE,QAAkB;IAC3D,2EAA2E;IAC3E,uEAAuE;IACvE,MAAM,KAAK,GAAsB,UAAU,CAAC;IAE5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACvD,OAAO;IACT,CAAC;IAED,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AACvE,CAAC"}
package/package.json CHANGED
@@ -2,13 +2,10 @@
2
2
  "name": "@kensio/colophon",
3
3
  "description": "Generate social meta images for posts from frontmatter",
4
4
  "author": "Kensio Software",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/KensioSoftware/colophon"
8
- },
5
+ "repository": "https://github.com/KensioSoftware/colophon",
9
6
  "homepage": "https://github.com/KensioSoftware/colophon#readme",
10
7
  "license": "Apache-2.0",
11
- "version": "2.11.0",
8
+ "version": "2.12.0",
12
9
  "type": "module",
13
10
  "main": "./dist/index.js",
14
11
  "types": "./dist/index.d.ts",
@@ -55,9 +52,23 @@
55
52
  "access": "public"
56
53
  },
57
54
  "sideEffects": false,
55
+ "packageManager": "pnpm@11.17.0+sha512.cca3cea332ad254bb84145f966d19f4879615210346fc92c79a047f23a0d7b3cca3c3792f0076ba1f1831d277efbcf0a9119b31a9a60eca7fb3d6231f331ef72",
58
56
  "engines": {
59
57
  "node": ">=22.2.0"
60
58
  },
59
+ "scripts": {
60
+ "build": "tsc -p tsconfig.build.json",
61
+ "prepack": "pnpm build",
62
+ "build:check": "tsc -p tsconfig.json --noEmit",
63
+ "fmt": "oxlint --fix && oxfmt",
64
+ "lint": "oxlint && oxfmt --check",
65
+ "test": "vitest run",
66
+ "test:coverage": "vitest run --coverage",
67
+ "samples": "pnpm build && node scripts/gen-samples.ts",
68
+ "baselines": "COLOPHON_UPDATE_BASELINES=1 vitest run src/visual.test.ts",
69
+ "fta": "./scripts/sh/fta.sh",
70
+ "check": "pnpm fmt && pnpm fta && pnpm build:check && pnpm build && pnpm test:coverage"
71
+ },
61
72
  "keywords": [
62
73
  "open-graph",
63
74
  "og-image",
@@ -73,27 +84,20 @@
73
84
  "shiki"
74
85
  ],
75
86
  "devDependencies": {
76
- "@eslint/js": "^10.0.1",
77
87
  "@kensio/smartass": "^1.33.0",
78
- "@types/eslint-plugin-security": "^3.0.1",
88
+ "@semantic-release/exec": "7.1.0",
79
89
  "@types/fontkit": "^2.0.9",
80
90
  "@types/node": "^26.0.0",
81
91
  "@typescript/native": "npm:typescript@^7.0.2",
82
92
  "@vitest/coverage-v8": "^4.1.10",
83
- "@vitest/eslint-plugin": "^1.6.22",
93
+ "conventional-changelog-conventionalcommits": "9.3.1",
84
94
  "dejavu-fonts-ttf": "^2.37.3",
85
- "eslint": "^10.6.0",
86
- "eslint-config-prettier": "^10.1.8",
87
- "eslint-plugin-jsdoc": "^63.0.13",
88
- "eslint-plugin-no-secrets": "^2.3.3",
89
- "eslint-plugin-security": "^4.0.1",
90
- "eslint-plugin-unicorn": "^71.1.0",
91
95
  "fta-cli": "^3.0.0",
92
- "globals": "^17.7.0",
93
- "jiti": "^2.7.0",
94
- "prettier": "^3.9.5",
96
+ "oxfmt": "^0.62.0",
97
+ "oxlint": "^1.77.0",
98
+ "oxlint-tsgolint": "^7.0.2001",
99
+ "semantic-release": "25.0.9",
95
100
  "typescript": "npm:@typescript/typescript6@^6.0.2",
96
- "typescript-eslint": "^8.63.0",
97
101
  "vitest": "^4.1.10"
98
102
  },
99
103
  "dependencies": {
@@ -103,17 +107,5 @@
103
107
  "gray-matter": "^4.0.3",
104
108
  "sharp": "^0.35.3",
105
109
  "shiki": "^4.3.1"
106
- },
107
- "scripts": {
108
- "build": "tsc -p tsconfig.build.json",
109
- "build:check": "tsc -p tsconfig.json --noEmit",
110
- "fmt": "eslint --fix . && prettier --write .",
111
- "lint": "eslint . && prettier --check .",
112
- "test": "vitest run",
113
- "test:coverage": "vitest run --coverage",
114
- "samples": "pnpm build && node scripts/gen-samples.ts",
115
- "baselines": "COLOPHON_UPDATE_BASELINES=1 vitest run src/visual.test.ts",
116
- "fta": "./scripts/sh/fta.sh",
117
- "check": "pnpm fmt && pnpm fta && pnpm build:check && pnpm build && pnpm test:coverage"
118
110
  }
119
- }
111
+ }
@@ -1,4 +0,0 @@
1
- export declare const probeFromInfo: {
2
- [k: string]: import("shiki").DynamicImportThemeRegistration;
3
- };
4
- //# sourceMappingURL=probe.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"probe.d.ts","sourceRoot":"","sources":["../../src/highlight/probe.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;CAEzB,CAAC"}
@@ -1,4 +0,0 @@
1
- /* eslint-disable */
2
- import { bundledThemesInfo } from "shiki";
3
- export const probeFromInfo = Object.fromEntries(bundledThemesInfo.map((i) => [i.id, i.import]));
4
- //# sourceMappingURL=probe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"probe.js","sourceRoot":"","sources":["../../src/highlight/probe.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,WAAW,CAC7C,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAC/C,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Reading the JPEG container itself, as against the picture in it.
3
- *
4
- * The counterpart of `png/`, and here for the same reason: two things in the
5
- * package have to walk a JPEG's segments, the size reader that a template draws
6
- * a logo from and the rebuild stamp that a build writes into a comment.
7
- */
8
- export type { JpegSegment } from "./segments.js";
9
- export { jpegSegments } from "./segments.js";
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jpeg/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
@@ -1,2 +0,0 @@
1
- export { jpegSegments } from "./segments.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/jpeg/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
@@ -1,20 +0,0 @@
1
- import type { Dimensions, ResolvedConfig } from "../types.js";
2
- /**
3
- * Rasterise an SVG string to image bytes at `dimensions`.
4
- *
5
- * Every path that produces an image goes through here, so this is the one place
6
- * the configured rasteriser has to be chosen. A project that supplies its own
7
- * gets it used by `renderMetaImages`, by `generate` and by `colophon preview`
8
- * alike, none of which knows there was a choice to make.
9
- *
10
- * It is also where the bytes are compressed again, for the same reason and on
11
- * the same terms: an image is worth shrinking whoever asked for it, and a
12
- * caller taking the bytes away to write itself should not have to know that the
13
- * rasteriser left three quarters of the saving on the table.
14
- *
15
- * The name is what it was before the backend became configurable. PNG is still
16
- * what comes back by default, and renaming this would break every caller to say
17
- * something the config already says.
18
- */
19
- export declare function renderSvgToPng(svg: string, dimensions: Dimensions, config?: ResolvedConfig): Promise<Buffer>;
20
- //# sourceMappingURL=png.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"png.d.ts","sourceRoot":"","sources":["../../src/render/png.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9D;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,UAAU,EACtB,MAAM,GAAE,cAAgC,GACvC,OAAO,CAAC,MAAM,CAAC,CAUjB"}
@@ -1,29 +0,0 @@
1
- import { resolveConfig } from "../config/index.js";
2
- import { recompressPng } from "../png/recompress.js";
3
- /**
4
- * Rasterise an SVG string to image bytes at `dimensions`.
5
- *
6
- * Every path that produces an image goes through here, so this is the one place
7
- * the configured rasteriser has to be chosen. A project that supplies its own
8
- * gets it used by `renderMetaImages`, by `generate` and by `colophon preview`
9
- * alike, none of which knows there was a choice to make.
10
- *
11
- * It is also where the bytes are compressed again, for the same reason and on
12
- * the same terms: an image is worth shrinking whoever asked for it, and a
13
- * caller taking the bytes away to write itself should not have to know that the
14
- * rasteriser left three quarters of the saving on the table.
15
- *
16
- * The name is what it was before the backend became configurable. PNG is still
17
- * what comes back by default, and renaming this would break every caller to say
18
- * something the config already says.
19
- */
20
- export async function renderSvgToPng(svg, dimensions, config = resolveConfig()) {
21
- const bytes = await config.rasteriser(svg, dimensions, config);
22
- // A rasteriser returns bytes, since not every one of them has a `Buffer` to
23
- // return. Everything downstream of here is Node, and the stamp reads the PNG
24
- // with `Buffer`'s own methods, so this is where the two meet. A `Buffer`
25
- // arrives as itself rather than being copied.
26
- const png = Buffer.isBuffer(bytes) ? bytes : Buffer.from(bytes);
27
- return recompressPng(png, config.compressionLevel);
28
- }
29
- //# sourceMappingURL=png.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"png.js","sourceRoot":"","sources":["../../src/render/png.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,GAAW,EACX,UAAsB,EACtB,MAAM,GAAmB,aAAa,EAAE;IAExC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAE/D,4EAA4E;IAC5E,6EAA6E;IAC7E,yEAAyE;IACzE,8CAA8C;IAC9C,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAEhE,OAAO,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACrD,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * PNG `tEXt` keyword the stamp is stored under. Keeping it in the image means
3
- * there is no sidecar file to fall out of sync, and deleting an image deletes
4
- * its stamp with it.
5
- */
6
- export declare const stampKeyword = "colophon";
7
- /** Signature + the whole `IHDR` chunk: length, type, 13 bytes of data, CRC. */
8
- export declare const afterHeader: number;
9
- /**
10
- * Return `png` with the stamp embedded as a `tEXt` chunk, inserted straight
11
- * after the header so it can be read back without decoding the image.
12
- */
13
- export declare function stampPng(png: Buffer, stamp: string): Buffer;
14
- //# sourceMappingURL=chunk.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk.d.ts","sourceRoot":"","sources":["../../src/stamp/chunk.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC,+EAA+E;AAC/E,eAAO,MAAM,WAAW,QAAuC,CAAC;AAWhE;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAoB3D"}
@@ -1,38 +0,0 @@
1
- import { chunkBytes, pngSignature } from "../png/chunk.js";
2
- /**
3
- * PNG `tEXt` keyword the stamp is stored under. Keeping it in the image means
4
- * there is no sidecar file to fall out of sync, and deleting an image deletes
5
- * its stamp with it.
6
- */
7
- export const stampKeyword = "colophon";
8
- /** Signature + the whole `IHDR` chunk: length, type, 13 bytes of data, CRC. */
9
- export const afterHeader = pngSignature.length + 4 + 4 + 13 + 4;
10
- /** What a `tEXt` chunk carries: `keyword\0text`. */
11
- function textData(keyword, text) {
12
- return Buffer.concat([
13
- Buffer.from(keyword, "latin1"),
14
- Buffer.from([0]),
15
- Buffer.from(text, "latin1"),
16
- ]);
17
- }
18
- /**
19
- * Return `png` with the stamp embedded as a `tEXt` chunk, inserted straight
20
- * after the header so it can be read back without decoding the image.
21
- */
22
- export function stampPng(png, stamp) {
23
- if (png.length < afterHeader ||
24
- !png.subarray(0, pngSignature.length).equals(pngSignature) ||
25
- png.toString("latin1", 12, 16) !== "IHDR") {
26
- // Reachable in practice only through a configured rasteriser, since resvg
27
- // writes nothing else. Saying why beats leaving someone to work out that
28
- // the stamp is the reason their WebP backend cannot be used yet.
29
- throw new Error("Cannot stamp: not a PNG image. The rebuild stamp is a PNG chunk, so a" +
30
- " rasteriser has to produce PNG for a build to be able to skip it.");
31
- }
32
- return Buffer.concat([
33
- png.subarray(0, afterHeader),
34
- chunkBytes("tEXt", textData(stampKeyword, stamp)),
35
- png.subarray(afterHeader),
36
- ]);
37
- }
38
- //# sourceMappingURL=chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk.js","sourceRoot":"","sources":["../../src/stamp/chunk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEvC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAEhE,oDAAoD;AACpD,SAAS,QAAQ,CAAC,OAAe,EAAE,IAAY;IAC7C,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;KAC5B,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW,EAAE,KAAa;IACjD,IACE,GAAG,CAAC,MAAM,GAAG,WAAW;QACxB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;QAC1D,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,KAAK,MAAM,EACzC,CAAC;QACD,0EAA0E;QAC1E,yEAAyE;QACzE,iEAAiE;QACjE,MAAM,IAAI,KAAK,CACb,uEAAuE;YACrE,mEAAmE,CACtE,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC;QAC5B,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACjD,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;KAC1B,CAAC,CAAC;AACL,CAAC"}
@@ -1,3 +0,0 @@
1
- /** The mark a truncated line or block ends with. */
2
- export declare const ellipsis = "\u2026";
3
- //# sourceMappingURL=ellipsis.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ellipsis.d.ts","sourceRoot":"","sources":["../../../src/templates/code/ellipsis.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,eAAO,MAAM,QAAQ,WAAM,CAAC"}
@@ -1,3 +0,0 @@
1
- /** The mark a truncated line or block ends with. */
2
- export const ellipsis = "…";
3
- //# sourceMappingURL=ellipsis.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ellipsis.js","sourceRoot":"","sources":["../../../src/templates/code/ellipsis.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/templates/terminal/window.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAiB9C,2DAA2D;AAC3D,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAErD;AAwBD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,WAAW,GACnB,MAAM,CA6BR"}