@kensio/colophon 2.14.1 → 2.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/config/defaults.d.ts +9 -5
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +8 -4
- package/dist/config/defaults.js.map +1 -1
- package/dist/highlight/grid.d.ts +5 -8
- package/dist/highlight/grid.d.ts.map +1 -1
- package/dist/highlight/grid.js +5 -5
- package/dist/highlight/grid.js.map +1 -1
- package/dist/highlight/index.d.ts.map +1 -1
- package/dist/highlight/index.js +1 -8
- package/dist/highlight/index.js.map +1 -1
- package/dist/highlight/types.d.ts +9 -6
- package/dist/highlight/types.d.ts.map +1 -1
- package/dist/measure/index.js +0 -0
- package/dist/measure/index.js.map +1 -1
- package/dist/measure/runs.d.ts +13 -2
- package/dist/measure/runs.d.ts.map +1 -1
- package/dist/measure/runs.js +37 -2
- package/dist/measure/runs.js.map +1 -1
- package/dist/templates/code/advance.d.ts +25 -0
- package/dist/templates/code/advance.d.ts.map +1 -0
- package/dist/templates/code/advance.js +36 -0
- package/dist/templates/code/advance.js.map +1 -0
- package/dist/templates/code/clip.d.ts +4 -3
- package/dist/templates/code/clip.d.ts.map +1 -1
- package/dist/templates/code/clip.js +18 -11
- package/dist/templates/code/clip.js.map +1 -1
- package/dist/templates/code/extent.d.ts +39 -0
- package/dist/templates/code/extent.d.ts.map +1 -0
- package/dist/templates/code/extent.js +54 -0
- package/dist/templates/code/extent.js.map +1 -0
- package/dist/templates/code/fit.d.ts +10 -8
- package/dist/templates/code/fit.d.ts.map +1 -1
- package/dist/templates/code/fit.js +5 -18
- package/dist/templates/code/fit.js.map +1 -1
- package/dist/templates/code/index.d.ts.map +1 -1
- package/dist/templates/code/index.js +7 -6
- package/dist/templates/code/index.js.map +1 -1
- package/dist/templates/code/layout.d.ts +6 -3
- package/dist/templates/code/layout.d.ts.map +1 -1
- package/dist/templates/code/layout.js +20 -7
- package/dist/templates/code/layout.js.map +1 -1
- package/dist/templates/code/mark/draw.d.ts +1 -0
- package/dist/templates/code/mark/draw.d.ts.map +1 -1
- package/dist/templates/code/mark/draw.js +3 -3
- package/dist/templates/code/mark/draw.js.map +1 -1
- package/dist/templates/code/mark/index.d.ts +2 -1
- package/dist/templates/code/mark/index.d.ts.map +1 -1
- package/dist/templates/code/mark/index.js +2 -2
- package/dist/templates/code/mark/index.js.map +1 -1
- package/dist/templates/code/mark/locate.d.ts +9 -7
- package/dist/templates/code/mark/locate.d.ts.map +1 -1
- package/dist/templates/code/mark/locate.js +28 -26
- package/dist/templates/code/mark/locate.js.map +1 -1
- package/dist/templates/code/spans.d.ts +5 -3
- package/dist/templates/code/spans.d.ts.map +1 -1
- package/dist/templates/code/spans.js +8 -6
- package/dist/templates/code/spans.js.map +1 -1
- package/dist/templates/code/truncate.d.ts +13 -0
- package/dist/templates/code/truncate.d.ts.map +1 -0
- package/dist/templates/code/truncate.js +23 -0
- package/dist/templates/code/truncate.js.map +1 -0
- package/dist/templates/terminal/index.d.ts.map +1 -1
- package/dist/templates/terminal/index.js +7 -5
- package/dist/templates/terminal/index.js.map +1 -1
- package/dist/templates/terminal/session.d.ts.map +1 -1
- package/dist/templates/terminal/session.js +1 -12
- package/dist/templates/terminal/session.js.map +1 -1
- package/dist/texture/chevrons.js +1 -1
- package/dist/texture/grid.js +1 -1
- package/dist/texture/grid.js.map +1 -1
- package/dist/texture/halftone.js +2 -2
- package/dist/texture/honeycomb.js +1 -1
- package/dist/texture/honeycomb.js.map +1 -1
- package/dist/texture/index.d.ts.map +1 -1
- package/dist/texture/index.js +1 -3
- package/dist/texture/index.js.map +1 -1
- package/dist/texture/moire.js +1 -1
- package/dist/texture/moire.js.map +1 -1
- package/dist/texture/pattern.js +3 -3
- package/dist/texture/pattern.js.map +1 -1
- package/dist/texture/rays.js +1 -1
- package/dist/texture/resolve.d.ts +1 -2
- package/dist/texture/resolve.d.ts.map +1 -1
- package/dist/texture/resolve.js +4 -6
- package/dist/texture/resolve.js.map +1 -1
- package/dist/texture/scallops.js +1 -1
- package/dist/texture/topographic/index.js +2 -2
- package/dist/texture/topographic/index.js.map +1 -1
- package/dist/texture/waves.js +1 -1
- package/dist/theme/presets.d.ts +6 -6
- package/dist/theme/presets.js +6 -6
- package/dist/types.d.ts +36 -40
- package/dist/types.d.ts.map +1 -1
- package/dist/validate/keys.d.ts +0 -2
- package/dist/validate/keys.d.ts.map +1 -1
- package/dist/validate/keys.js +0 -8
- package/dist/validate/keys.js.map +1 -1
- package/dist/validate/values.d.ts.map +1 -1
- package/dist/validate/values.js +21 -0
- package/dist/validate/values.js.map +1 -1
- package/package.json +1 -1
- package/dist/templates/code/width.d.ts +0 -10
- package/dist/templates/code/width.d.ts.map +0 -1
- package/dist/templates/code/width.js +0 -26
- package/dist/templates/code/width.js.map +0 -1
- package/dist/texture/grain.d.ts +0 -17
- package/dist/texture/grain.d.ts.map +0 -1
- package/dist/texture/grain.js +0 -29
- package/dist/texture/grain.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ellipsis } from "../../text/ellipsis.js";
|
|
2
|
+
/**
|
|
3
|
+
* The longest run of `text` that leaves room for an ellipsis after it, with
|
|
4
|
+
* the ellipsis on the end.
|
|
5
|
+
*
|
|
6
|
+
* It goes character by character rather than slicing at a count, because how
|
|
7
|
+
* many characters fit is a question about the face rather than about the
|
|
8
|
+
* string: a line of ideographs runs out of room in half the characters a line
|
|
9
|
+
* of Latin does. Iterating the string also keeps a surrogate pair together,
|
|
10
|
+
* which slicing at an index did not.
|
|
11
|
+
*/
|
|
12
|
+
export function truncate(text, room, advance) {
|
|
13
|
+
const mark = advance(ellipsis);
|
|
14
|
+
let kept = "";
|
|
15
|
+
for (const character of text) {
|
|
16
|
+
if (advance(kept + character) + mark > room) {
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
kept += character;
|
|
20
|
+
}
|
|
21
|
+
return kept + ellipsis;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=truncate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"truncate.js","sourceRoot":"","sources":["../../../src/templates/code/truncate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,IAAY,EAAE,OAAgB;IACnE,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/B,IAAI,IAAI,GAAG,EAAE,CAAC;IAEd,KAAK,MAAM,SAAS,IAAI,IAAI,EAAE,CAAC;QAC7B,IAAI,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC;YAC5C,MAAM;QACR,CAAC;QAED,IAAI,IAAI,SAAS,CAAC;IACpB,CAAC;IAED,OAAO,IAAI,GAAG,QAAQ,CAAC;AACzB,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,QAuE9B,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { optionalString } from "../../props.js";
|
|
2
|
+
import { codeAdvance } from "../code/advance.js";
|
|
2
3
|
import { codeFooter } from "../code/chrome.js";
|
|
3
|
-
import {
|
|
4
|
+
import { blockWidth } from "../code/extent.js";
|
|
4
5
|
import { fitSnippet } from "../code/layout.js";
|
|
5
6
|
import { layoutPanel } from "../code/panel.js";
|
|
6
7
|
import { hugPanel, panelSvg } from "../code/plate.js";
|
|
7
8
|
import { codeBody } from "../code/spans.js";
|
|
8
9
|
import { warnIfTruncated } from "../code/warn.js";
|
|
9
|
-
import { charWidthRatio } from "../code/width.js";
|
|
10
10
|
import { footerFontSize, hasFooter } from "../footer.js";
|
|
11
11
|
import { barHeight, titleBar } from "../window/index.js";
|
|
12
12
|
import { terminalSession } from "./session.js";
|
|
@@ -34,14 +34,16 @@ export const terminalTemplate = {
|
|
|
34
34
|
// than against the window it ends up as, so that the room reserved for it
|
|
35
35
|
// and the bar that is drawn are the same height.
|
|
36
36
|
const bar = barHeight(available.width);
|
|
37
|
-
const
|
|
37
|
+
const advance = codeAdvance(measure, config.code.fontFamily);
|
|
38
|
+
const fitted = fitSnippet(session, { ...available, y: available.y + bar, height: available.height - bar }, width, config, advance);
|
|
38
39
|
warnIfTruncated(config, dimensions, {
|
|
39
40
|
dropped: session.lines.length - fitted.lines.length,
|
|
40
41
|
clipped: fitted.clipped,
|
|
41
42
|
}, session.lines.length, "terminal session");
|
|
42
43
|
const body = fitted.lines.length * fitted.step;
|
|
43
44
|
const window = hugPanel(available, {
|
|
44
|
-
width:
|
|
45
|
+
width: blockWidth(fitted.lines, advance) * fitted.fontSize +
|
|
46
|
+
fitted.padding * 2,
|
|
45
47
|
height: bar + body + fitted.padding * 2,
|
|
46
48
|
});
|
|
47
49
|
const shadow = Math.max(1, Math.round(Math.min(width, height) * 0.01));
|
|
@@ -51,7 +53,7 @@ export const terminalTemplate = {
|
|
|
51
53
|
originX: window.x + fitted.padding,
|
|
52
54
|
originY: window.y + bar + (window.height - bar - body) / 2,
|
|
53
55
|
fontSize: fitted.fontSize,
|
|
54
|
-
|
|
56
|
+
advance,
|
|
55
57
|
step: fitted.step,
|
|
56
58
|
fontFamily: config.code.fontFamily,
|
|
57
59
|
foreground: session.foreground,
|
|
@@ -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,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,
|
|
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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AI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QAEvE,OAAO,CACL,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC;YACpD,QAAQ,CACN,MAAM,EACN,GAAG,EACH,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/templates/terminal/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/templates/terminal/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAkCrE;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,eAAe,CAAC,CAoC1B"}
|
|
@@ -28,17 +28,6 @@ function promptToken(prompt, accent) {
|
|
|
28
28
|
italic: false,
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
/** The width of the widest line, in characters. */
|
|
32
|
-
function widest(lines) {
|
|
33
|
-
let longest = 0;
|
|
34
|
-
for (const tokens of lines) {
|
|
35
|
-
const last = tokens.at(-1);
|
|
36
|
-
if (last !== undefined) {
|
|
37
|
-
longest = Math.max(longest, last.column + last.text.length);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return longest;
|
|
41
|
-
}
|
|
42
31
|
/**
|
|
43
32
|
* The session as one grid of lines: the commands, then what they printed.
|
|
44
33
|
*
|
|
@@ -81,6 +70,6 @@ export async function terminalSession(props, config) {
|
|
|
81
70
|
.split("\n")
|
|
82
71
|
.map((line) => outputLine(line, tabSize));
|
|
83
72
|
const lines = [...(command === "" ? [] : commands), ...printed];
|
|
84
|
-
return { ...highlighted, lines
|
|
73
|
+
return { ...highlighted, lines };
|
|
85
74
|
}
|
|
86
75
|
//# sourceMappingURL=session.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/templates/terminal/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,oEAAoE;AACpE,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B,qEAAqE;AACrE,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B,yEAAyE;AACzE,SAAS,UAAU,CAAC,IAAY,EAAE,OAAe;IAC/C,OAAO;QACL;YACE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC;YAC/B,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,KAAK;SACd;KACF,CAAC;AACJ,CAAC;AAED,sDAAsD;AACtD,SAAS,WAAW,CAAC,MAAc,EAAE,MAAc;IACjD,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,KAAK;KACd,CAAC;AACJ,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/templates/terminal/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,oEAAoE;AACpE,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B,qEAAqE;AACrE,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B,yEAAyE;AACzE,SAAS,UAAU,CAAC,IAAY,EAAE,OAAe;IAC/C,OAAO;QACL;YACE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC;YAC/B,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,KAAK;SACd;KACF,CAAC;AACJ,CAAC;AAED,sDAAsD;AACtD,SAAS,WAAW,CAAC,MAAc,EAAE,MAAc;IACjD,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,KAAK;KACd,C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AE,CAAC,CAAC;KACxE,CAAC,CAAC;IAEH,MAAM,OAAO,GACX,MAAM,KAAK,EAAE;QACX,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,MAAM;aACH,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC;aACxB,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;aACnB,KAAK,CAAC,IAAI,CAAC;aACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAElD,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC;IAEhE,OAAO,EAAE,GAAG,WAAW,EAAE,KAAK,EAAE,CAAC;AACnC,CAAC"}
|
package/dist/texture/chevrons.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fallbackColor } from "./color.js";
|
|
2
2
|
import { tile } from "./tile.js";
|
|
3
|
-
const chevronDefaults = { opacity: 0.07, width:
|
|
3
|
+
const chevronDefaults = { opacity: 0.07, width: 3, gap: 54 };
|
|
4
4
|
/**
|
|
5
5
|
* Rows of chevrons: one V to a tile, meeting its neighbours at the tile edge.
|
|
6
6
|
*
|
package/dist/texture/grid.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fallbackColor } from "./color.js";
|
|
2
2
|
import { tile } from "./tile.js";
|
|
3
|
-
const gridDefaults = { opacity: 0.07, width: 1, gap:
|
|
3
|
+
const gridDefaults = { opacity: 0.07, width: 1.5, gap: 48, major: 5 };
|
|
4
4
|
/** How much heavier the every-so-often line is than the rest. */
|
|
5
5
|
const majorScale = 2;
|
|
6
6
|
/** One square's worth of grid: a line along two of its edges. */
|
package/dist/texture/grid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.js","sourceRoot":"","sources":["../../src/texture/grid.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,YAAY,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"grid.js","sourceRoot":"","sources":["../../src/texture/grid.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,YAAY,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAEtE,iEAAiE;AACjE,MAAM,UAAU,GAAG,CAAC,CAAC;AAErB,iEAAiE;AACjE,SAAS,MAAM,CACb,OAAoD,EACpD,GAAW,EACX,KAAa;IAEb,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IAC/B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAEzB,4EAA4E;IAC5E,4EAA4E;IAC5E,oEAAoE;IACpE,OAAO,CACL,eAAe,MAAM,IAAI,IAAI,IAAI,MAAM,MAAM,IAAI,GAAG;QACpD,YAAY,OAAO,CAAC,KAAK,IAAI,aAAa,GAAG;QAC7C,kBAAkB,MAAM,CAAC,KAAK,CAAC,iBAAiB,CACjD,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CACrB,OAAoD,EACpD,UAAsB,EACtB,EAAU;IAEV,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,YAAY,CAAC,GAAG,CAAC;IAC5C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,YAAY,CAAC,KAAK,CAAC;IAClD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC;IACxD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,YAAY,CAAC,KAAK,CAAC;IAElD,MAAM,IAAI,GAAG,IAAI,CACf,GAAG,EAAE,GAAG,EACR,GAAG,EACH,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,EAC3B,EAAE,EACF,UAAU,EACV,OAAO,CACR,CAAC;IAEF,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,IAAI;QACJ,IAAI,CACF,GAAG,EAAE,GAAG,EACR,GAAG,GAAG,KAAK,EACX,MAAM,CAAC,OAAO,EAAE,GAAG,GAAG,KAAK,EAAE,KAAK,GAAG,UAAU,CAAC,EAChD,EAAE,EACF,UAAU,EACV,OAAO,CACR,CACF,CAAC;AACJ,CAAC"}
|
package/dist/texture/halftone.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fallbackColor } from "./color.js";
|
|
2
2
|
import { tile } from "./tile.js";
|
|
3
|
-
const combDefaults = { opacity: 0.07, width:
|
|
3
|
+
const combDefaults = { opacity: 0.07, width: 2, size: 39 };
|
|
4
4
|
/** Rounded to keep the path short, since it is written out twice a tile. */
|
|
5
5
|
function at(value) {
|
|
6
6
|
return String(Math.round(value * 100) / 100);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"honeycomb.js","sourceRoot":"","sources":["../../src/texture/honeycomb.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,YAAY,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"honeycomb.js","sourceRoot":"","sources":["../../src/texture/honeycomb.ts"],"names":[],"mappings":"AACA,OA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AsB,EACtB,EAAU;IAEV,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC;IAC/C,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC;IAEvB,MAAM,IAAI,GACR,YAAY,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,OAAO,CACnD,IAAI,GAAG,GAAG,EACV,CAAC,EACD,IAAI,CACL,GAAG,OAAO,CAAC,IAAI,GAAG,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,OAAO,CAAC,KAAK,IAAI,aAAa,GAAG;QACnF,kBAAkB,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,YAAY,CAAC,KAAK,CAAC,GAAG;QAChE,gBAAgB,CAAC;IAEnB,4EAA4E;IAC5E,oDAAoD;IACpD,OAAO,IAAI,CACT,EAAE,EACF,EAAE,KAAK,EAAE,MAAM,EAAE,EACjB,IAAI,EACJ,EAAE,EACF,UAAU,EACV,OAAO,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,CACxC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/texture/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/texture/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAYvD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAsCnE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,MAAM,EACV,KAAK,SAAI,GACR,MAAM,CAgBR"}
|
package/dist/texture/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { chevronsSvg } from "./chevrons.js";
|
|
2
|
-
import { grainSvg } from "./grain.js";
|
|
3
2
|
import { halftoneSvg } from "./halftone.js";
|
|
4
3
|
import { gridSvg } from "./grid.js";
|
|
5
4
|
import { honeycombSvg } from "./honeycomb.js";
|
|
@@ -14,7 +13,7 @@ export { resolveTexture, resolveTextureScale } from "./resolve.js";
|
|
|
14
13
|
* Which function draws which treatment.
|
|
15
14
|
*
|
|
16
15
|
* A table rather than a chain of `if`s, because the chain had a branch per
|
|
17
|
-
* texture and there are
|
|
16
|
+
* texture and there are a dozen of them: the file was close to the complexity
|
|
18
17
|
* threshold and every new treatment made it worse. The type is what keeps this
|
|
19
18
|
* honest, and it does the job the chain's final `return` used to do badly: a
|
|
20
19
|
* variant added to `Texture` with no entry here fails to compile, where before
|
|
@@ -25,7 +24,6 @@ export { resolveTexture, resolveTextureScale } from "./resolve.js";
|
|
|
25
24
|
* says what it uses.
|
|
26
25
|
*/
|
|
27
26
|
const drawers = {
|
|
28
|
-
grain: grainSvg,
|
|
29
27
|
dots: dotsSvg,
|
|
30
28
|
rules: rulesSvg,
|
|
31
29
|
grid: gridSvg,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/texture/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/texture/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,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E;IAC7E,+DAA+D;IAC/D,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAA0B,CAAC;IAE5D,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,OAAO,GAAG;QACd,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;QAC1C,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC;KAC7C,CAAC;IAEF,OAAO,uBAAuB,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC;AACpF,CAAC"}
|
package/dist/texture/moire.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fallbackColor } from "./color.js";
|
|
2
2
|
import { tile } from "./tile.js";
|
|
3
|
-
const moireDefaults = { opacity: 0.1, width: 1, gap:
|
|
3
|
+
const moireDefaults = { opacity: 0.1, width: 1.5, gap: 24, angle: 4 };
|
|
4
4
|
/**
|
|
5
5
|
* How much fainter the turned grid is than the square one.
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moire.js","sourceRoot":"","sources":["../../src/texture/moire.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,aAAa,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"moire.js","sourceRoot":"","sources":["../../src/texture/moire.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,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CACF,OAAO,EACP,UAAU,EACV,GAAG,EAAE,GAAG,EACR,OAAO,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,EACpC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,cAAc,GAAG,IAAI,CAAC,GAAG,IAAI,CACnD,CACF,CAAC;AACJ,CAAC"}
|
package/dist/texture/pattern.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { fallbackColor } from "./color.js";
|
|
2
2
|
import { tile } from "./tile.js";
|
|
3
|
-
const dotDefaults = { opacity: 0.08, size:
|
|
4
|
-
const ruleDefaults = { opacity: 0.06, width:
|
|
5
|
-
const crossDefaults = { opacity: 0.09, size:
|
|
3
|
+
const dotDefaults = { opacity: 0.08, size: 8, gap: 66 };
|
|
4
|
+
const ruleDefaults = { opacity: 0.06, width: 3, gap: 42, angle: 45 };
|
|
5
|
+
const crossDefaults = { opacity: 0.09, size: 14, width: 2, gap: 72 };
|
|
6
6
|
/**
|
|
7
7
|
* How much fainter the crossing set of rules is than the first.
|
|
8
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/texture/pattern.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,WAAW,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;AACxD,MAAM,YAAY,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AACrE,MAAM,aAAa,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/texture/pattern.ts"],"names":[],"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,KAAK,CAAC;IAClD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC;IAExD,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,KAAa,EAAU,EAAE,CAC9D,IAAI,CACF,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,6BAA6B,MAAM,CAAC,EAAE,CAAC,IAAI,EAC3C,UAAU,EACV,KAAK,CACN,CAAC;IAEJ,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;QAC3B,yEAAyE;QACzE,oCAAoC;QACpC,OAAO,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,CACL,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC;QAC7B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CACtE,CAAC;AACJ,CAAC"}
|
package/dist/texture/rays.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fallbackColor } from "./color.js";
|
|
2
|
-
const rayDefaults = { opacity: 0.07, width:
|
|
2
|
+
const rayDefaults = { opacity: 0.07, width: 3, count: 24, x: 0.5, y: 1.15 };
|
|
3
3
|
/** How far a ray has to run to leave the image from where it starts. */
|
|
4
4
|
function reach(origin, dimensions) {
|
|
5
5
|
return Math.hypot(Math.max(origin.x, dimensions.width - origin.x), Math.max(origin.y, dimensions.height - origin.y));
|
|
@@ -6,8 +6,7 @@ import type { BrandColors, Texture } from "../types.js";
|
|
|
6
6
|
* A dot grid, a set of rules or a set of rings has to be the foreground colour
|
|
7
7
|
* by default, because that is the one colour known to contrast with the
|
|
8
8
|
* background: a fixed white would disappear on a light theme, which is a
|
|
9
|
-
* texture that silently does nothing.
|
|
10
|
-
* noise.
|
|
9
|
+
* texture that silently does nothing.
|
|
11
10
|
*
|
|
12
11
|
* It happens here rather than while drawing so that the resolved config says
|
|
13
12
|
* what will actually be drawn, which is also what the rebuild stamp hashes: a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/texture/resolve.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAExD
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/texture/resolve.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAExD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,GAC5B,OAAO,GAAG,SAAS,CAIrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAIrE"}
|
package/dist/texture/resolve.js
CHANGED
|
@@ -6,18 +6,16 @@ import { DEFAULT_TEXTURE_SCALE } from "../config/defaults.js";
|
|
|
6
6
|
* A dot grid, a set of rules or a set of rings has to be the foreground colour
|
|
7
7
|
* by default, because that is the one colour known to contrast with the
|
|
8
8
|
* background: a fixed white would disappear on a light theme, which is a
|
|
9
|
-
* texture that silently does nothing.
|
|
10
|
-
* noise.
|
|
9
|
+
* texture that silently does nothing.
|
|
11
10
|
*
|
|
12
11
|
* It happens here rather than while drawing so that the resolved config says
|
|
13
12
|
* what will actually be drawn, which is also what the rebuild stamp hashes: a
|
|
14
13
|
* palette change then re-renders the texture that follows it.
|
|
15
14
|
*/
|
|
16
15
|
export function resolveTexture(texture, colors) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return { color: colors.foreground, ...texture };
|
|
16
|
+
return texture === undefined
|
|
17
|
+
? undefined
|
|
18
|
+
: { color: colors.foreground, ...texture };
|
|
21
19
|
}
|
|
22
20
|
/**
|
|
23
21
|
* The texture scale a config asked for, or `1`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/texture/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAG9D
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/texture/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAG9D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,cAAc,CAC5B,OAA4B,EAC5B,MAA6B;IAE7B,OAAO,OAAO,KAAK,SAAS;QAC1B,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,OAAO,EAAE,CAAC;AAC/C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAyB;IAC3D,OAAO,KAAK,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC;QACjE,CAAC,CAAC,qBAAqB;QACvB,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC"}
|
package/dist/texture/scallops.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fallbackColor } from "./color.js";
|
|
2
2
|
import { tile } from "./tile.js";
|
|
3
|
-
const scallopDefaults = { opacity: 0.07, width:
|
|
3
|
+
const scallopDefaults = { opacity: 0.07, width: 3, size: 60 };
|
|
4
4
|
/** One arc of a row, bulging downwards from the two points it spans. */
|
|
5
5
|
function scallop(cx, y, radius) {
|
|
6
6
|
return (`M${String(cx - radius)} ${String(y)}` +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/texture/topographic/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/texture/topographic/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,CAAC;IACR,GAAG,EAAE,EAAE;IACP,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,CAAC;CACR,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAC5B,OAA2D,EAC3D,UAAsB;IAEtB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC;IAC/C,MAAM,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;IAChE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,eAAe,CAAC,IAAI,CAAC;IAClD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC;IAExD,IAAI,KAAK,GAAG,EAAE,CAAC;IAEf,6EAA6E;IAC7E,4EAA4E;IAC5E,6EAA6E;IAC7E,KAAK,IAAI,KAAK,GAAG,GAAG,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,GAAG,EAAE,CAAC;QACvD,KAAK,IAAI,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC1D,KAAK,IAAI,SAAS,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,CACL,YAAY,KAAK,eAAe;QAChC,YAAY,OAAO,CAAC,KAAK,IAAI,aAAa,GAAG;QAC7C,kBAAkB,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG;QACnE,aAAa,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,KAAK,CACrE,CAAC;AACJ,CAAC"}
|
package/dist/texture/waves.js
CHANGED
package/dist/theme/presets.d.ts
CHANGED
|
@@ -29,12 +29,12 @@ export interface Theme {
|
|
|
29
29
|
* `ember` from 99KB to 192KB, which is the largest jump here and still the
|
|
30
30
|
* smallest image of the three.
|
|
31
31
|
*
|
|
32
|
-
* None of them turns
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* their posts.
|
|
32
|
+
* None of them turns `waves` or `moire` on, which are the two that do not
|
|
33
|
+
* compress: either takes a 1200x1200 PNG from around 36KB to several hundred,
|
|
34
|
+
* because a turned or crossed set of lines meets itself somewhere different in
|
|
35
|
+
* every row and there is nothing for the compression to fold up. That is a
|
|
36
|
+
* cost worth paying on purpose, and not one to hand someone who picked a theme
|
|
37
|
+
* by its name and is committing the images next to their posts.
|
|
38
38
|
*/
|
|
39
39
|
export declare const THEMES: Readonly<Record<ThemeName, Theme>>;
|
|
40
40
|
/**
|
package/dist/theme/presets.js
CHANGED
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
* `ember` from 99KB to 192KB, which is the largest jump here and still the
|
|
19
19
|
* smallest image of the three.
|
|
20
20
|
*
|
|
21
|
-
* None of them turns
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* their posts.
|
|
21
|
+
* None of them turns `waves` or `moire` on, which are the two that do not
|
|
22
|
+
* compress: either takes a 1200x1200 PNG from around 36KB to several hundred,
|
|
23
|
+
* because a turned or crossed set of lines meets itself somewhere different in
|
|
24
|
+
* every row and there is nothing for the compression to fold up. That is a
|
|
25
|
+
* cost worth paying on purpose, and not one to hand someone who picked a theme
|
|
26
|
+
* by its name and is committing the images next to their posts.
|
|
27
27
|
*/
|
|
28
28
|
export const THEMES = {
|
|
29
29
|
midnight: {
|
package/dist/types.d.ts
CHANGED
|
@@ -157,34 +157,30 @@ export type Background = {
|
|
|
157
157
|
* A treatment laid over the background, under everything a template draws.
|
|
158
158
|
*
|
|
159
159
|
* A flat fill or a gradient is clean but a little bare, and these are the
|
|
160
|
-
* cheap ways to give one some surface:
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
160
|
+
* cheap ways to give one some surface: a dot grid, ruled lines, or rings drawn
|
|
161
|
+
* in from either side. Each of them is a few elements of SVG rather than an
|
|
162
|
+
* image to load, and each is meant to be felt rather than seen, so the
|
|
163
|
+
* defaults are faint.
|
|
164
|
+
*
|
|
165
|
+
* They are not, however, fine. A share image is looked at somewhere between a
|
|
166
|
+
* third and a sixth of the size it was rendered at, so a treatment pitched to
|
|
167
|
+
* look right on the full-size picture disappears in the feed the picture is
|
|
168
|
+
* for. The lengths below are what carries through that, and a project wanting
|
|
169
|
+
* the finer version of one says so.
|
|
164
170
|
*
|
|
165
171
|
* Lengths are in pixels at the size being rendered, so a texture is a little
|
|
166
172
|
* finer on a large image than on a small one, which is what keeps a dot grid
|
|
167
173
|
* looking like the same grid across a set of sizes.
|
|
168
174
|
*/
|
|
169
175
|
export type Texture = {
|
|
170
|
-
/**
|
|
171
|
-
* Film grain, from one turbulence filter. It lightens what is under it
|
|
172
|
-
* slightly, since the noise it lays down is grey.
|
|
173
|
-
*/
|
|
174
|
-
readonly type: "grain";
|
|
175
|
-
/** Defaults to `0.1`. */
|
|
176
|
-
readonly opacity?: number;
|
|
177
|
-
/** Roughly the size of a speck, in pixels. Defaults to `1.4`. */
|
|
178
|
-
readonly scale?: number;
|
|
179
|
-
} | {
|
|
180
176
|
readonly type: "dots";
|
|
181
177
|
/** Defaults to the foreground colour. */
|
|
182
178
|
readonly color?: string;
|
|
183
179
|
/** Defaults to `0.08`. */
|
|
184
180
|
readonly opacity?: number;
|
|
185
|
-
/** Dot diameter. Defaults to `
|
|
181
|
+
/** Dot diameter. Defaults to `8`. */
|
|
186
182
|
readonly size?: number;
|
|
187
|
-
/** Centre-to-centre spacing. Defaults to `
|
|
183
|
+
/** Centre-to-centre spacing. Defaults to `66`. */
|
|
188
184
|
readonly gap?: number;
|
|
189
185
|
} | {
|
|
190
186
|
readonly type: "rules";
|
|
@@ -192,9 +188,9 @@ export type Texture = {
|
|
|
192
188
|
readonly color?: string;
|
|
193
189
|
/** Defaults to `0.06`. */
|
|
194
190
|
readonly opacity?: number;
|
|
195
|
-
/** Line thickness. Defaults to `
|
|
191
|
+
/** Line thickness. Defaults to `3`. */
|
|
196
192
|
readonly width?: number;
|
|
197
|
-
/** Spacing between lines. Defaults to `
|
|
193
|
+
/** Spacing between lines. Defaults to `42`. */
|
|
198
194
|
readonly gap?: number;
|
|
199
195
|
/** Degrees clockwise from vertical. Defaults to `45`. */
|
|
200
196
|
readonly angle?: number;
|
|
@@ -222,9 +218,9 @@ export type Texture = {
|
|
|
222
218
|
* Defaults to `0.14`.
|
|
223
219
|
*/
|
|
224
220
|
readonly opacity?: number;
|
|
225
|
-
/** Ring thickness. Defaults to `
|
|
221
|
+
/** Ring thickness. Defaults to `3`. */
|
|
226
222
|
readonly width?: number;
|
|
227
|
-
/** Distance between one ring and the next. Defaults to `
|
|
223
|
+
/** Distance between one ring and the next. Defaults to `36`. */
|
|
228
224
|
readonly gap?: number;
|
|
229
225
|
} | {
|
|
230
226
|
/**
|
|
@@ -238,12 +234,12 @@ export type Texture = {
|
|
|
238
234
|
readonly color?: string;
|
|
239
235
|
/** Defaults to `0.07`. */
|
|
240
236
|
readonly opacity?: number;
|
|
241
|
-
/** Line thickness. Defaults to `
|
|
237
|
+
/** Line thickness. Defaults to `3`. */
|
|
242
238
|
readonly width?: number;
|
|
243
239
|
/**
|
|
244
240
|
* Rays around the whole circle, of which only those pointing into the
|
|
245
241
|
* image are seen. Counting the full circle is what keeps the spacing the
|
|
246
|
-
* same when the origin moves. Defaults to `
|
|
242
|
+
* same when the origin moves. Defaults to `24`, a ray every fifteen degrees.
|
|
247
243
|
*/
|
|
248
244
|
readonly count?: number;
|
|
249
245
|
/** Origin across, as a fraction of the image. Defaults to `0.5`. */
|
|
@@ -264,9 +260,9 @@ export type Texture = {
|
|
|
264
260
|
readonly color?: string;
|
|
265
261
|
/** Defaults to `0.07`. */
|
|
266
262
|
readonly opacity?: number;
|
|
267
|
-
/** Line thickness. Defaults to `1`. */
|
|
263
|
+
/** Line thickness. Defaults to `1.5`. */
|
|
268
264
|
readonly width?: number;
|
|
269
|
-
/** Spacing between one line and the next. Defaults to `
|
|
265
|
+
/** Spacing between one line and the next. Defaults to `48`. */
|
|
270
266
|
readonly gap?: number;
|
|
271
267
|
/**
|
|
272
268
|
* How many squares apart the heavier lines are, drawn at twice the
|
|
@@ -282,9 +278,9 @@ export type Texture = {
|
|
|
282
278
|
readonly color?: string;
|
|
283
279
|
/** Defaults to `0.07`. */
|
|
284
280
|
readonly opacity?: number;
|
|
285
|
-
/** Line thickness. Defaults to `
|
|
281
|
+
/** Line thickness. Defaults to `3`. */
|
|
286
282
|
readonly width?: number;
|
|
287
|
-
/** How wide one chevron is, and how far apart the rows are. Default `
|
|
283
|
+
/** How wide one chevron is, and how far apart the rows are. Default `54`. */
|
|
288
284
|
readonly gap?: number;
|
|
289
285
|
} | {
|
|
290
286
|
/**
|
|
@@ -296,9 +292,9 @@ export type Texture = {
|
|
|
296
292
|
readonly color?: string;
|
|
297
293
|
/** Defaults to `0.07`. */
|
|
298
294
|
readonly opacity?: number;
|
|
299
|
-
/** Line thickness. Defaults to `
|
|
295
|
+
/** Line thickness. Defaults to `2`. */
|
|
300
296
|
readonly width?: number;
|
|
301
|
-
/** The length of one side of a hexagon. Defaults to `
|
|
297
|
+
/** The length of one side of a hexagon. Defaults to `39`. */
|
|
302
298
|
readonly size?: number;
|
|
303
299
|
} | {
|
|
304
300
|
/**
|
|
@@ -310,11 +306,11 @@ export type Texture = {
|
|
|
310
306
|
readonly color?: string;
|
|
311
307
|
/** Defaults to `0.09`. */
|
|
312
308
|
readonly opacity?: number;
|
|
313
|
-
/** How far a cross reaches across. Defaults to `
|
|
309
|
+
/** How far a cross reaches across. Defaults to `14`. */
|
|
314
310
|
readonly size?: number;
|
|
315
|
-
/** Line thickness. Defaults to `
|
|
311
|
+
/** Line thickness. Defaults to `2`. */
|
|
316
312
|
readonly width?: number;
|
|
317
|
-
/** Centre-to-centre spacing. Defaults to `
|
|
313
|
+
/** Centre-to-centre spacing. Defaults to `72`. */
|
|
318
314
|
readonly gap?: number;
|
|
319
315
|
} | {
|
|
320
316
|
/**
|
|
@@ -327,9 +323,9 @@ export type Texture = {
|
|
|
327
323
|
readonly color?: string;
|
|
328
324
|
/** Defaults to `0.07`. */
|
|
329
325
|
readonly opacity?: number;
|
|
330
|
-
/** Line thickness. Defaults to `
|
|
326
|
+
/** Line thickness. Defaults to `3`. */
|
|
331
327
|
readonly width?: number;
|
|
332
|
-
/** How wide one scale is. Defaults to `
|
|
328
|
+
/** How wide one scale is. Defaults to `60`. */
|
|
333
329
|
readonly size?: number;
|
|
334
330
|
} | {
|
|
335
331
|
/**
|
|
@@ -341,9 +337,9 @@ export type Texture = {
|
|
|
341
337
|
readonly color?: string;
|
|
342
338
|
/** Defaults to `0.12`. */
|
|
343
339
|
readonly opacity?: number;
|
|
344
|
-
/** Diameter of the largest dot. Defaults to `
|
|
340
|
+
/** Diameter of the largest dot. Defaults to `18`. */
|
|
345
341
|
readonly size?: number;
|
|
346
|
-
/** Centre-to-centre spacing. Defaults to `
|
|
342
|
+
/** Centre-to-centre spacing. Defaults to `45`. */
|
|
347
343
|
readonly gap?: number;
|
|
348
344
|
/**
|
|
349
345
|
* The direction the dots grow in, in degrees, where `0` runs to the
|
|
@@ -366,9 +362,9 @@ export type Texture = {
|
|
|
366
362
|
readonly color?: string;
|
|
367
363
|
/** Defaults to `0.09`. */
|
|
368
364
|
readonly opacity?: number;
|
|
369
|
-
/** Line thickness. Defaults to `
|
|
365
|
+
/** Line thickness. Defaults to `2`. */
|
|
370
366
|
readonly width?: number;
|
|
371
|
-
/** Distance between one contour and the next. Defaults to `
|
|
367
|
+
/** Distance between one contour and the next. Defaults to `51`. */
|
|
372
368
|
readonly gap?: number;
|
|
373
369
|
/**
|
|
374
370
|
* How tall the landscape is, as a multiple of the gap, which is the
|
|
@@ -397,9 +393,9 @@ export type Texture = {
|
|
|
397
393
|
* what makes the crossings read as one surface. Defaults to `0.1`.
|
|
398
394
|
*/
|
|
399
395
|
readonly opacity?: number;
|
|
400
|
-
/** Line thickness. Defaults to `1`. */
|
|
396
|
+
/** Line thickness. Defaults to `1.5`. */
|
|
401
397
|
readonly width?: number;
|
|
402
|
-
/** Spacing between one line and the next. Defaults to `
|
|
398
|
+
/** Spacing between one line and the next. Defaults to `24`. */
|
|
403
399
|
readonly gap?: number;
|
|
404
400
|
/**
|
|
405
401
|
* Degrees the second grid is turned by, which is the whole texture.
|
|
@@ -909,7 +905,7 @@ export interface ColophonConfig {
|
|
|
909
905
|
/** Explicit background, overriding the gradient derived from `colors`. */
|
|
910
906
|
readonly background?: Background;
|
|
911
907
|
/**
|
|
912
|
-
* A treatment over the background:
|
|
908
|
+
* A treatment over the background: a dot grid, ruled lines, contours. Omit
|
|
913
909
|
* (the default) for none, unless a theme brings one.
|
|
914
910
|
*/
|
|
915
911
|
readonly texture?: Texture;
|