-
Notifications
You must be signed in to change notification settings - Fork 1
/
presets.mts
100 lines (90 loc) · 2.18 KB
/
presets.mts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import { AsciifyOptions, DEFAULT_CHARACTER_SET } from './common.mjs'
/**
* @ignore
*/
export type OptionPreset = Partial<
Pick<AsciifyOptions, 'characterSet' | 'fontSize' | 'fontFamily' | 'characterSpacingRatio' | 'contrastRatio'>
>
/**
* A collection of ready-made character presets.
* @category Configuration
*/
export const OptionPresets = {
/**
* A default character set to use for the ASCII art.
* This looks good with both black and white and color output.
*/
ascii: {
characterSet: DEFAULT_CHARACTER_SET,
},
/**
* A richer character set made of dithered blocks.
*/
blocks: {
characterSet: `░▒▓█`,
},
/**
* A character set made of dithered stacks.
*/
stacks: {
characterSet: `▁▂▃▄▅▆▇█`,
},
/**
* A character set made of thin blocks.
*/
thin: {
characterSet: `▖▗▘▙▝▞▟▀█`,
},
/**
* A character set made of numerals.
*/
numerals: {
characterSet: `➀➁➂➃➄➅➆➇➈➉❶❷❸❹❺❻❼❽❾❿`,
fontSize: 20,
characterSpacingRatio: 1,
contrastRatio: 0,
},
/**
* A character set made of squares.
*/
squares: {
characterSet: `■□▢▣▤▥▦▧▨▩`,
},
/**
* A character set made of circular shapes.
*/
circles: {
characterSet: `⬬⬭⬯⬮⬲⭑⭒⬤`,
characterSpacingRatio: 1,
contrastRatio: 2,
},
/**
* A character set made of diamond shapes.
*/
diamonds: {
characterSet: `⬫⬪⬨⬧⬦⬥❖⭔⭓`,
characterSpacingRatio: 1,
contrastRatio: 2,
},
chess: {
characterSet: `♙♘♗♖♕♔♟♞♝♜♛♚`,
fontSize: 12,
characterSpacingRatio: 1,
contrastRatio: 0,
},
asterisks: {
characterSet: `.✴✲✳✵✶✷✸✹✺✱✼✻✽✾✿`,
fontSize: 8,
characterSpacingRatio: 1.5,
contrastRatio: 2,
},
hands: {
characterSet: `✌🏻🫶👐👏👋✋✊`,
fontFamily: `Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, Segoe UI Symbol, Noto Emoji, EmojiSymbols`,
contrastRatio: 0,
},
faces: {
characterSet: '🫥😶😑😐😏😵🤩',
contrastRatio: 0,
},
} satisfies Record<string, OptionPreset>