@kensio/colophon 2.15.1 → 2.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates/code/chrome.d.ts +5 -5
- package/dist/templates/code/chrome.d.ts.map +1 -1
- package/dist/templates/code/chrome.js +8 -7
- package/dist/templates/code/chrome.js.map +1 -1
- package/dist/templates/code/index.d.ts.map +1 -1
- package/dist/templates/code/index.js +12 -4
- package/dist/templates/code/index.js.map +1 -1
- package/dist/templates/code/lines.d.ts +31 -0
- package/dist/templates/code/lines.d.ts.map +1 -0
- package/dist/templates/code/lines.js +58 -0
- package/dist/templates/code/lines.js.map +1 -0
- package/dist/templates/code/panel.d.ts +8 -4
- package/dist/templates/code/panel.d.ts.map +1 -1
- package/dist/templates/code/panel.js +15 -11
- package/dist/templates/code/panel.js.map +1 -1
- package/dist/templates/terminal/index.d.ts.map +1 -1
- package/dist/templates/terminal/index.js +3 -1
- package/dist/templates/terminal/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Rect } from "../../layout/index.js";
|
|
1
|
+
import type { Rect, TextLine } from "../../layout/index.js";
|
|
2
2
|
import type { Dimensions, ResolvedConfig } from "../../types.js";
|
|
3
3
|
/**
|
|
4
4
|
* The optional title, centred in the band reserved above the panel.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* The lines arrive already fitted, since the room the band has was measured
|
|
7
|
+
* from them: whether the title wrapped is what decided how much of the image
|
|
8
|
+
* the panel below it gets.
|
|
9
9
|
*/
|
|
10
|
-
export declare function codeHeading(
|
|
10
|
+
export declare function codeHeading(lines: readonly TextLine[], band: Rect, config: ResolvedConfig): string;
|
|
11
11
|
/** The configured footer, centred along the bottom of the image. */
|
|
12
12
|
export declare function codeFooter(dimensions: Dimensions, fontSize: number, config: ResolvedConfig): string;
|
|
13
13
|
//# sourceMappingURL=chrome.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/templates/code/chrome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/templates/code/chrome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAKjE;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,cAAc,GACrB,MAAM,CAWR;AAED,oEAAoE;AACpE,wBAAgB,UAAU,CACxB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,GACrB,MAAM,CAUR"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { drawLines } from "../../layout/index.js";
|
|
2
2
|
import { footerBaseline, footerElement } from "../footer.js";
|
|
3
|
+
import { titleLineHeight } from "./lines.js";
|
|
3
4
|
import { imageMargin } from "./panel.js";
|
|
4
5
|
/**
|
|
5
6
|
* The optional title, centred in the band reserved above the panel.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* The lines arrive already fitted, since the room the band has was measured
|
|
9
|
+
* from them: whether the title wrapped is what decided how much of the image
|
|
10
|
+
* the panel below it gets.
|
|
10
11
|
*/
|
|
11
|
-
export function codeHeading(
|
|
12
|
-
if (
|
|
12
|
+
export function codeHeading(lines, band, config) {
|
|
13
|
+
if (lines.length === 0) {
|
|
13
14
|
return "";
|
|
14
15
|
}
|
|
15
|
-
return drawLines(
|
|
16
|
+
return drawLines(lines, band, {
|
|
16
17
|
fontFamily: config.fontFamily,
|
|
17
18
|
fill: config.colors.foreground,
|
|
18
|
-
lineHeight:
|
|
19
|
+
lineHeight: titleLineHeight,
|
|
19
20
|
anchor: "middle",
|
|
20
21
|
});
|
|
21
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../../src/templates/code/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CACzB,
|
|
1
|
+
{"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../../src/templates/code/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CACzB,KAA0B,EAC1B,IAAU,EACV,MAAsB;IAEtB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE;QAC5B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU;QAC9B,UAAU,EAAE,eAAe;QAC3B,MAAM,EAAE,QAAQ;KACjB,CAAC,CAAC;AACL,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,UAAU,CACxB,UAAsB,EACtB,QAAgB,EAChB,MAAsB;IAEtB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;IAErC,OAAO,aAAa,CAAC,MAAM,EAAE;QAC3B,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;QACxB,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;QAC5D,QAAQ;QACR,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,QAAQ;KACjB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/code/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/code/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAgB/C;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,QAsH1B,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { blockWidth } from "./extent.js";
|
|
|
8
8
|
import { gutterColumns, numberLines } from "./gutter.js";
|
|
9
9
|
import { codeMarks } from "./mark/index.js";
|
|
10
10
|
import { fitSnippet } from "./layout.js";
|
|
11
|
+
import { codeTitleLines, titleRoom } from "./lines.js";
|
|
11
12
|
import { layoutPanel, titleBand } from "./panel.js";
|
|
12
13
|
import { hugPanel, panelSvg } from "./plate.js";
|
|
13
14
|
import { codeBody } from "./spans.js";
|
|
@@ -25,15 +26,22 @@ export const codeTemplate = {
|
|
|
25
26
|
name: "code",
|
|
26
27
|
async render({ props, config, dimensions, measure }) {
|
|
27
28
|
const { width, height } = dimensions;
|
|
28
|
-
const title = optionalString(props.title);
|
|
29
|
-
const titleFs = Math.round(height * 0.045);
|
|
30
29
|
const footerFs = footerFontSize(dimensions);
|
|
30
|
+
// Fitted before the panel is placed, because a title that wrapped to two
|
|
31
|
+
// lines takes room the panel then has to do without.
|
|
32
|
+
const titleLines = codeTitleLines(props.title, {
|
|
33
|
+
measure,
|
|
34
|
+
fontFamily: config.fontFamily,
|
|
35
|
+
fontSize: Math.round(height * 0.045),
|
|
36
|
+
dimensions,
|
|
37
|
+
});
|
|
38
|
+
const titleHeight = titleRoom(titleLines);
|
|
31
39
|
const highlighted = await highlightCode(optionalString(props["code"]) ?? "", {
|
|
32
40
|
language: optionalString(props["language"]) ?? "text",
|
|
33
41
|
theme: optionalString(props["theme"]) ?? config.code.theme,
|
|
34
42
|
tabSize: config.code.tabSize,
|
|
35
43
|
});
|
|
36
|
-
const available = layoutPanel(dimensions, config,
|
|
44
|
+
const available = layoutPanel(dimensions, config, titleHeight, footerFs, hasFooter(config));
|
|
37
45
|
const bar = barRoom(config, available.width);
|
|
38
46
|
const gutter = gutterColumns(config, highlighted.lines.length);
|
|
39
47
|
const advance = codeAdvance(measure, config.code.fontFamily);
|
|
@@ -74,7 +82,7 @@ export const codeTemplate = {
|
|
|
74
82
|
}, config, advance);
|
|
75
83
|
const shadowOffset = Math.round(Math.min(width, height) * 0.01);
|
|
76
84
|
const plate = panelSvg(panel, highlighted.background, Math.max(1, shadowOffset), config);
|
|
77
|
-
return (codeHeading(
|
|
85
|
+
return (codeHeading(titleLines, titleBand(panel, dimensions, titleHeight), config) +
|
|
78
86
|
plate +
|
|
79
87
|
windowBar(panel, bar, props, config, measure) +
|
|
80
88
|
marks +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/code/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,WA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AI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;QAChE,MAAM,KAAK,GAAG,QAAQ,CACpB,KAAK,EACL,WAAW,CAAC,UAAU,EACtB,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,EACzB,MAAM,CACP,CAAC;QAEF,OAAO,CACL,WAAW,CACT,UAAU,EACV,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC,EACzC,MAAM,CACP;YACD,KAAK;YACL,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC;YAC7C,KAAK;YACL,IAAI;YACJ,UAAU,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CACzC,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TextLine } from "../../layout/index.js";
|
|
2
|
+
import type { Dimensions, MeasureText } from "../../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* So the lines are stacked at their own size, the leading being in the gaps
|
|
5
|
+
* already. Measuring the block and placing it both go through this, or the room
|
|
6
|
+
* reserved and the room drawn in would be different heights.
|
|
7
|
+
*/
|
|
8
|
+
export declare const titleLineHeight = 1;
|
|
9
|
+
/** The space the title has, and how to measure text into it. */
|
|
10
|
+
export interface CodeTitleText {
|
|
11
|
+
readonly measure: MeasureText;
|
|
12
|
+
readonly fontFamily: string;
|
|
13
|
+
readonly fontSize: number;
|
|
14
|
+
readonly dimensions: Dimensions;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The title, wrapped and shrunk into the width the panel has.
|
|
18
|
+
*
|
|
19
|
+
* A title absent from the props produces no lines at all, which is what the
|
|
20
|
+
* layout reads as having no title to make room for.
|
|
21
|
+
*/
|
|
22
|
+
export declare function codeTitleLines(title: unknown, text: CodeTitleText): TextLine[];
|
|
23
|
+
/**
|
|
24
|
+
* The room the title's lines take, which is what the panel gives up for them.
|
|
25
|
+
*
|
|
26
|
+
* The space reserved above the panel and the band the lines are then drawn in
|
|
27
|
+
* both come from here, so a title that wrapped to two lines is placed in the
|
|
28
|
+
* room two lines were taken out of.
|
|
29
|
+
*/
|
|
30
|
+
export declare function titleRoom(lines: readonly TextLine[]): number;
|
|
31
|
+
//# sourceMappingURL=lines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lines.d.ts","sourceRoot":"","sources":["../../../src/templates/code/lines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA0B9D;;;;GAIG;AACH,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,aAAa,GAClB,QAAQ,EAAE,CAeZ;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,MAAM,CAE5D"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { blockLines, linesHeight } from "../../layout/index.js";
|
|
2
|
+
import { imageMargin } from "./panel.js";
|
|
3
|
+
/**
|
|
4
|
+
* How many lines the title may wrap to before it is shrunk instead.
|
|
5
|
+
*
|
|
6
|
+
* Two rather than the three a `card` or a `docs` title gets, because every line
|
|
7
|
+
* here comes off the panel below it. The snippet is the point of the image, and
|
|
8
|
+
* a title taking a third of the height would be a caption running the layout.
|
|
9
|
+
*/
|
|
10
|
+
const maxTitleLines = 2;
|
|
11
|
+
/** How far it may shrink before it is cut, as the other titles do. */
|
|
12
|
+
const titleFloor = 0.62;
|
|
13
|
+
/**
|
|
14
|
+
* The leading between wrapped title lines, as a fraction of their size.
|
|
15
|
+
*
|
|
16
|
+
* It is carried as a gap between the lines rather than as a line height so that
|
|
17
|
+
* one line takes exactly its own font size, which is the room this layout has
|
|
18
|
+
* always set aside for a title. A line height would space a wrapped block the
|
|
19
|
+
* same way but would also make a single line taller than the size it is drawn
|
|
20
|
+
* at, moving every existing image with a short title on it.
|
|
21
|
+
*/
|
|
22
|
+
const titleLeading = 0.2;
|
|
23
|
+
/**
|
|
24
|
+
* So the lines are stacked at their own size, the leading being in the gaps
|
|
25
|
+
* already. Measuring the block and placing it both go through this, or the room
|
|
26
|
+
* reserved and the room drawn in would be different heights.
|
|
27
|
+
*/
|
|
28
|
+
export const titleLineHeight = 1;
|
|
29
|
+
/**
|
|
30
|
+
* The title, wrapped and shrunk into the width the panel has.
|
|
31
|
+
*
|
|
32
|
+
* A title absent from the props produces no lines at all, which is what the
|
|
33
|
+
* layout reads as having no title to make room for.
|
|
34
|
+
*/
|
|
35
|
+
export function codeTitleLines(title, text) {
|
|
36
|
+
const lines = blockLines(title, text.measure, text.fontFamily, {
|
|
37
|
+
maxWidth: text.dimensions.width - imageMargin(text.dimensions) * 2,
|
|
38
|
+
maxLines: maxTitleLines,
|
|
39
|
+
fontSize: text.fontSize,
|
|
40
|
+
floor: titleFloor,
|
|
41
|
+
fontWeight: 700,
|
|
42
|
+
opacity: 0.95,
|
|
43
|
+
});
|
|
44
|
+
return lines.map((line, index) => index === 0
|
|
45
|
+
? line
|
|
46
|
+
: { ...line, gapBefore: Math.round(line.fontSize * titleLeading) });
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The room the title's lines take, which is what the panel gives up for them.
|
|
50
|
+
*
|
|
51
|
+
* The space reserved above the panel and the band the lines are then drawn in
|
|
52
|
+
* both come from here, so a title that wrapped to two lines is placed in the
|
|
53
|
+
* room two lines were taken out of.
|
|
54
|
+
*/
|
|
55
|
+
export function titleRoom(lines) {
|
|
56
|
+
return linesHeight(lines, titleLineHeight);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=lines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lines.js","sourceRoot":"","sources":["../../../src/templates/code/lines.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,sEAAsE;AACtE,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAUjC;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAc,EACd,IAAmB;IAEnB,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE;QAC7D,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAClE,QAAQ,EAAE,aAAa;QACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,KAAK,EAAE,UAAU;QACjB,UAAU,EAAE,GAAG;QACf,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAC/B,KAAK,KAAK,CAAC;QACT,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC,EAAE,CACrE,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,KAA0B;IAClD,OAAO,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -15,16 +15,20 @@ export declare function imageMargin(dimensions: Dimensions): number;
|
|
|
15
15
|
/**
|
|
16
16
|
* Place the code panel within the image, leaving room above for a title and
|
|
17
17
|
* below for a footer when either is present.
|
|
18
|
+
*
|
|
19
|
+
* The title's room is passed in already measured rather than worked out from a
|
|
20
|
+
* font size here, because how much room it wants depends on how many lines it
|
|
21
|
+
* wrapped to. A title of no room at all is one there is nothing to reserve for.
|
|
18
22
|
*/
|
|
19
|
-
export declare function layoutPanel(dimensions: Dimensions, config: ResolvedConfig,
|
|
23
|
+
export declare function layoutPanel(dimensions: Dimensions, config: ResolvedConfig, titleRoom: number, footerFontSize: number, hasFooter: boolean): Panel;
|
|
20
24
|
/**
|
|
21
|
-
* The band the title was given:
|
|
22
|
-
* the reserved gap between the two.
|
|
25
|
+
* The band the title was given: the room reserved for its lines above the
|
|
26
|
+
* panel, with the reserved gap between the two.
|
|
23
27
|
*
|
|
24
28
|
* It is measured up from the panel rather than down from the top margin, so
|
|
25
29
|
* that it follows the panel when the panel hugs a short snippet and moves
|
|
26
30
|
* down. That keeps the title with the plate it names rather than stranding it
|
|
27
31
|
* at the top of the image.
|
|
28
32
|
*/
|
|
29
|
-
export declare function titleBand(panel: Panel, dimensions: Dimensions,
|
|
33
|
+
export declare function titleBand(panel: Panel, dimensions: Dimensions, titleRoom: number): Rect;
|
|
30
34
|
//# sourceMappingURL=panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/templates/code/panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAA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E,UAAU,EACtB,SAAS,EAAE,MAAM,GAChB,IAAI,CAON"}
|
|
@@ -5,10 +5,10 @@ export function imageMargin(dimensions) {
|
|
|
5
5
|
/**
|
|
6
6
|
* Clear space between the panel and the title above it or the footer below.
|
|
7
7
|
*
|
|
8
|
-
* `layoutPanel` reserves this at each end alongside
|
|
9
|
-
* the bands those lines are then placed in take the room and leave the gap.
|
|
10
|
-
* two agree because both are measured from here, which is the whole point:
|
|
11
|
-
* gap that is reserved in one place and drawn in another drifts.
|
|
8
|
+
* `layoutPanel` reserves this at each end alongside the room the text takes,
|
|
9
|
+
* and the bands those lines are then placed in take the room and leave the gap.
|
|
10
|
+
* The two agree because both are measured from here, which is the whole point:
|
|
11
|
+
* a gap that is reserved in one place and drawn in another drifts.
|
|
12
12
|
*/
|
|
13
13
|
function gapAround(dimensions) {
|
|
14
14
|
return Math.round(Math.min(dimensions.width, dimensions.height) * 0.028);
|
|
@@ -16,13 +16,17 @@ function gapAround(dimensions) {
|
|
|
16
16
|
/**
|
|
17
17
|
* Place the code panel within the image, leaving room above for a title and
|
|
18
18
|
* below for a footer when either is present.
|
|
19
|
+
*
|
|
20
|
+
* The title's room is passed in already measured rather than worked out from a
|
|
21
|
+
* font size here, because how much room it wants depends on how many lines it
|
|
22
|
+
* wrapped to. A title of no room at all is one there is nothing to reserve for.
|
|
19
23
|
*/
|
|
20
|
-
export function layoutPanel(dimensions, config,
|
|
24
|
+
export function layoutPanel(dimensions, config, titleRoom, footerFontSize, hasFooter) {
|
|
21
25
|
const { width, height } = dimensions;
|
|
22
26
|
const shorter = Math.min(width, height);
|
|
23
27
|
const pad = imageMargin(dimensions);
|
|
24
28
|
const gap = gapAround(dimensions);
|
|
25
|
-
const top = pad + (
|
|
29
|
+
const top = pad + (titleRoom > 0 ? titleRoom + gap : 0);
|
|
26
30
|
const bottom = height - pad - (hasFooter ? footerFontSize + gap : 0);
|
|
27
31
|
return {
|
|
28
32
|
x: pad,
|
|
@@ -33,20 +37,20 @@ export function layoutPanel(dimensions, config, titleFontSize, footerFontSize, h
|
|
|
33
37
|
};
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
|
-
* The band the title was given:
|
|
37
|
-
* the reserved gap between the two.
|
|
40
|
+
* The band the title was given: the room reserved for its lines above the
|
|
41
|
+
* panel, with the reserved gap between the two.
|
|
38
42
|
*
|
|
39
43
|
* It is measured up from the panel rather than down from the top margin, so
|
|
40
44
|
* that it follows the panel when the panel hugs a short snippet and moves
|
|
41
45
|
* down. That keeps the title with the plate it names rather than stranding it
|
|
42
46
|
* at the top of the image.
|
|
43
47
|
*/
|
|
44
|
-
export function titleBand(panel, dimensions,
|
|
48
|
+
export function titleBand(panel, dimensions, titleRoom) {
|
|
45
49
|
return {
|
|
46
50
|
x: 0,
|
|
47
|
-
y: panel.y - gapAround(dimensions) -
|
|
51
|
+
y: panel.y - gapAround(dimensions) - titleRoom,
|
|
48
52
|
width: dimensions.width,
|
|
49
|
-
height:
|
|
53
|
+
height: titleRoom,
|
|
50
54
|
};
|
|
51
55
|
}
|
|
52
56
|
//# sourceMappingURL=panel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../../src/templates/code/panel.ts"],"names":[],"mappings":"AAcA,8DAA8D;AAC9D,MAAM,UAAU,WAAW,CAAC,UAAsB;IAChD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;AAC1E,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,SAAS,CAAC,UAAsB;IACvC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../../src/templ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EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;KACtD,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CACvB,KAAY,EACZ,UAAsB,EACtB,SAAiB;IAEjB,OAAO;QACL,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,SAAS;QAC9C,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,MAAM,EAAE,SAAS;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/terminal/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAa/C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/terminal/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAa/C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAwE9B,CAAC"}
|
|
@@ -29,7 +29,9 @@ export const terminalTemplate = {
|
|
|
29
29
|
const { width, height } = dimensions;
|
|
30
30
|
const footerFs = footerFontSize(dimensions);
|
|
31
31
|
const session = await terminalSession(props, config);
|
|
32
|
-
|
|
32
|
+
// No room above the window: this template's title goes in its bar rather
|
|
33
|
+
// than over it.
|
|
34
|
+
const available = layoutPanel(dimensions, config, 0, footerFs, hasFooter(config));
|
|
33
35
|
// The bar is measured against the space the window was allotted rather
|
|
34
36
|
// than against the window it ends up as, so that the room reserved for it
|
|
35
37
|
// and the bar that is drawn are the same height.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/terminal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAa;IACxC,IAAI,EAAE,UAAU;IAChB,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE;QACjD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;QACrC,MAAM,QAAQ,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAErD,MAAM,SAAS,GAAG,WAAW,CAC3B,UAAU,EACV,MAAM,EACN,CAAC,EACD,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/terminal/index.ts"],"names":[],"mappings":"AAAA,OAAO,E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IAAI,EAAE,EACjC,MAAM,EACN,OAAO,CACR;YACD,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE;gBACrB,OAAO,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO;gBAClC,OAAO,EAAE,MAAM,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;gBAC1D,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,OAAO;gBACP,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU;gBAClC,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B,CAAC;YACF,UAAU,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CACzC,CAAC;IACJ,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"repository": "https://github.com/KensioSoftware/colophon",
|
|
6
6
|
"homepage": "https://github.com/KensioSoftware/colophon#readme",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
|
-
"version": "2.15.
|
|
8
|
+
"version": "2.15.2",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "./dist/index.js",
|
|
11
11
|
"types": "./dist/index.d.ts",
|