limn-hl 0.0.0 → 0.1.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 (62) hide show
  1. package/README.md +306 -0
  2. package/dist/cursor.d.ts +32 -0
  3. package/dist/cursor.js +322 -0
  4. package/dist/detect.d.ts +5 -0
  5. package/dist/detect.js +565 -0
  6. package/dist/engine.d.ts +78 -0
  7. package/dist/engine.js +268 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.js +17 -0
  10. package/dist/lang/clike.d.ts +15 -0
  11. package/dist/lang/clike.js +35 -0
  12. package/dist/lang/clike_helpers.d.ts +8 -0
  13. package/dist/lang/clike_helpers.js +220 -0
  14. package/dist/lang/code.d.ts +45 -0
  15. package/dist/lang/code.js +779 -0
  16. package/dist/lang/config.d.ts +5 -0
  17. package/dist/lang/config.js +164 -0
  18. package/dist/lang/css.d.ts +5 -0
  19. package/dist/lang/css.js +125 -0
  20. package/dist/lang/docs.d.ts +12 -0
  21. package/dist/lang/docs.js +462 -0
  22. package/dist/lang/formats.d.ts +10 -0
  23. package/dist/lang/formats.js +295 -0
  24. package/dist/lang/html.d.ts +11 -0
  25. package/dist/lang/html.js +298 -0
  26. package/dist/lang/index.d.ts +20 -0
  27. package/dist/lang/index.js +167 -0
  28. package/dist/lang/js.d.ts +9 -0
  29. package/dist/lang/js.js +532 -0
  30. package/dist/lang/js_helpers.d.ts +7 -0
  31. package/dist/lang/js_helpers.js +308 -0
  32. package/dist/lang/json.d.ts +3 -0
  33. package/dist/lang/json.js +136 -0
  34. package/dist/lang/markdown.d.ts +3 -0
  35. package/dist/lang/markdown.js +249 -0
  36. package/dist/lang/python.d.ts +3 -0
  37. package/dist/lang/python.js +335 -0
  38. package/dist/lang/scripting.d.ts +7 -0
  39. package/dist/lang/scripting.js +216 -0
  40. package/dist/lang/shell.d.ts +7 -0
  41. package/dist/lang/shell.js +278 -0
  42. package/dist/lang/specs_gen.d.ts +66 -0
  43. package/dist/lang/specs_gen.js +381 -0
  44. package/dist/lang/terminal.d.ts +9 -0
  45. package/dist/lang/terminal.js +550 -0
  46. package/dist/lang/yaml.d.ts +4 -0
  47. package/dist/lang/yaml.js +176 -0
  48. package/dist/render/ansi.d.ts +7 -0
  49. package/dist/render/ansi.js +70 -0
  50. package/dist/render/html.d.ts +20 -0
  51. package/dist/render/html.js +212 -0
  52. package/dist/render/index.d.ts +2 -0
  53. package/dist/render/index.js +2 -0
  54. package/dist/theme/generated.d.ts +57 -0
  55. package/dist/theme/generated.js +736 -0
  56. package/dist/theme/index.d.ts +12 -0
  57. package/dist/theme/index.js +1 -0
  58. package/dist/token.d.ts +38 -0
  59. package/dist/token.js +67 -0
  60. package/dist/wordtable.d.ts +23 -0
  61. package/dist/wordtable.js +65 -0
  62. package/package.json +44 -9
@@ -0,0 +1,176 @@
1
+ import { Cursor, emitCommentWithTodo, isDigit } from "../cursor.js";
2
+ import { Grammar } from "../engine.js";
3
+ import { TokenKind } from "../token.js";
4
+ import { onceGrammar } from "./code.js";
5
+ export function looksLikeNumber(w) {
6
+ if (w === "")
7
+ return false;
8
+ let i = 0;
9
+ const first = w.charCodeAt(0);
10
+ if (first === 45 || first === 43) {
11
+ i++;
12
+ if (i >= w.length)
13
+ return false;
14
+ }
15
+ if (!isDigit(w.charCodeAt(i)))
16
+ return false;
17
+ for (;i < w.length; i++) {
18
+ const c = w.charCodeAt(i);
19
+ if (isDigit(c) || c === 46 || c === 95 || c === 120 || c === 88 || c === 101 || c === 69 || c === 43 || c === 45 || c >= 97 && c <= 102 || c >= 65 && c <= 70) {
20
+ continue;
21
+ }
22
+ return false;
23
+ }
24
+ return true;
25
+ }
26
+ function findYAMLKeyColon(src, start, end) {
27
+ for (let i = start;i < end; i++) {
28
+ const ch = src.charCodeAt(i);
29
+ if (ch === 35 && i > start && src.charCodeAt(i - 1) === 32) {
30
+ return -1;
31
+ }
32
+ if (ch === 58 && (i + 1 === end || src.charCodeAt(i + 1) === 32 || src.charCodeAt(i + 1) === 9)) {
33
+ return i;
34
+ }
35
+ }
36
+ return -1;
37
+ }
38
+ function scanYAMLValue(src, start, end, e) {
39
+ let i = start;
40
+ while (i < end && !e.stopped()) {
41
+ const ch = src.charCodeAt(i);
42
+ if (ch === 32 || ch === 9) {
43
+ i++;
44
+ } else if (ch === 35 && (i === start || src.charCodeAt(i - 1) === 32 || src.charCodeAt(i - 1) === 9)) {
45
+ emitCommentWithTodo(src, i, end, e);
46
+ return;
47
+ } else if (ch === 34 || ch === 39) {
48
+ const cur = new Cursor(src.slice(0, end), i);
49
+ cur.scanQuoted(ch, false, ch === 39);
50
+ let k = cur.pos;
51
+ while (k < end && (src.charCodeAt(k) === 32 || src.charCodeAt(k) === 9))
52
+ k++;
53
+ if (k < end && src.charCodeAt(k) === 58 && (k + 1 === end || src.charCodeAt(k + 1) === 32)) {
54
+ e.emit(i, cur.pos, TokenKind.Property);
55
+ } else {
56
+ e.emit(i, cur.pos, TokenKind.String);
57
+ }
58
+ i = cur.pos;
59
+ } else if (ch === 38 || ch === 42) {
60
+ const s = i;
61
+ i++;
62
+ while (i < end) {
63
+ const b = src.charCodeAt(i);
64
+ if (b !== 32 && b !== 9 && b !== 44 && b !== 93 && b !== 125)
65
+ i++;
66
+ else
67
+ break;
68
+ }
69
+ e.emit(s, i, TokenKind.Variable);
70
+ } else if (ch === 33 && i + 1 < end) {
71
+ const s = i;
72
+ i++;
73
+ while (i < end && src.charCodeAt(i) !== 32 && src.charCodeAt(i) !== 9)
74
+ i++;
75
+ e.emit(s, i, TokenKind.Type);
76
+ } else if (ch === 91 || ch === 93 || ch === 123 || ch === 125 || ch === 44 || ch === 58) {
77
+ e.emit(i, i + 1, TokenKind.Punctuation);
78
+ i++;
79
+ } else if (ch === 124 || ch === 62) {
80
+ if (i === start || src.charCodeAt(i - 1) === 32) {
81
+ e.emit(i, i + 1, TokenKind.Operator);
82
+ }
83
+ i++;
84
+ } else {
85
+ const s = i;
86
+ while (i < end) {
87
+ const b = src.charCodeAt(i);
88
+ if (b === 32 || b === 9 || b === 44 || b === 93 || b === 125)
89
+ break;
90
+ if (b === 35 && src.charCodeAt(i - 1) === 32)
91
+ break;
92
+ i++;
93
+ }
94
+ const w = src.slice(s, i);
95
+ switch (w) {
96
+ case "true":
97
+ case "false":
98
+ case "yes":
99
+ case "no":
100
+ case "on":
101
+ case "off":
102
+ case "null":
103
+ case "~":
104
+ case "True":
105
+ case "False":
106
+ case "Null":
107
+ case "TRUE":
108
+ case "FALSE":
109
+ case "NULL":
110
+ e.emit(s, i, TokenKind.Constant);
111
+ break;
112
+ default:
113
+ e.emit(s, i, looksLikeNumber(w) ? TokenKind.Number : TokenKind.String);
114
+ break;
115
+ }
116
+ }
117
+ }
118
+ }
119
+ function scanYAMLLine(src, start, end, e) {
120
+ let i = start;
121
+ while (i < end && (src.charCodeAt(i) === 32 || src.charCodeAt(i) === 9))
122
+ i++;
123
+ if (i >= end)
124
+ return;
125
+ if (src.charCodeAt(i) === 35) {
126
+ emitCommentWithTodo(src, i, end, e);
127
+ return;
128
+ }
129
+ if (i === start && end - i >= 3 && (src.startsWith("---", i) || src.startsWith("...", i))) {
130
+ const rest = i + 3;
131
+ if (rest === end || src.charCodeAt(rest) === 32) {
132
+ e.emit(i, rest, TokenKind.Section);
133
+ if (rest < end)
134
+ scanYAMLValue(src, rest, end, e);
135
+ return;
136
+ }
137
+ }
138
+ if (src.charCodeAt(i) === 45 && (i + 1 === end || src.charCodeAt(i + 1) === 32)) {
139
+ e.emit(i, i + 1, TokenKind.Operator);
140
+ i++;
141
+ while (i < end && (src.charCodeAt(i) === 32 || src.charCodeAt(i) === 9))
142
+ i++;
143
+ if (i >= end)
144
+ return;
145
+ }
146
+ const ch = src.charCodeAt(i);
147
+ if (ch !== 34 && ch !== 39 && ch !== 91 && ch !== 123) {
148
+ const colon = findYAMLKeyColon(src, i, end);
149
+ if (colon >= 0) {
150
+ let keyEnd = colon;
151
+ while (keyEnd > i && (src.charCodeAt(keyEnd - 1) === 32 || src.charCodeAt(keyEnd - 1) === 9)) {
152
+ keyEnd--;
153
+ }
154
+ if (keyEnd > i)
155
+ e.emit(i, keyEnd, TokenKind.Property);
156
+ e.emit(colon, colon + 1, TokenKind.Punctuation);
157
+ scanYAMLValue(src, colon + 1, end, e);
158
+ return;
159
+ }
160
+ }
161
+ scanYAMLValue(src, i, end, e);
162
+ }
163
+ function scanYAML(src, e) {
164
+ const n = src.length;
165
+ let pos = 0;
166
+ while (pos < n && !e.stopped()) {
167
+ const nl = src.indexOf(`
168
+ `, pos);
169
+ const lineEnd = nl >= 0 ? nl : n;
170
+ scanYAMLLine(src, pos, lineEnd, e);
171
+ if (nl < 0)
172
+ break;
173
+ pos = lineEnd + 1;
174
+ }
175
+ }
176
+ export const yaml = /* @__PURE__ */ onceGrammar(() => new Grammar("yaml", scanYAML, "yml"));
@@ -0,0 +1,7 @@
1
+ import { type Registry } from "../engine.js";
2
+ import type { Theme } from "../theme/index.js";
3
+ import { type Token } from "../token.js";
4
+ /** Tokenizes src using reg and highlights it with 24-bit ANSI truecolor escape sequences. */
5
+ export declare function ansi(reg: Registry, src: string, lang: string, theme: Theme | undefined): string;
6
+ /** Renders pre-computed tokens for src with 24-bit ANSI escape sequences. */
7
+ export declare function ansiTokens(src: string, tokens: readonly Token[], theme: Theme | undefined): string;
@@ -0,0 +1,70 @@
1
+ import { tokenize } from "../engine.js";
2
+ import { KIND_COUNT } from "../token.js";
3
+ export function ansi(reg, src, lang, theme) {
4
+ const toks = tokenize(src, reg.lookup(lang), reg);
5
+ return ansiTokens(src, toks, theme);
6
+ }
7
+ export function ansiTokens(src, tokens, theme) {
8
+ const seqs = new Array(KIND_COUNT).fill("");
9
+ if (theme !== undefined) {
10
+ for (let k = 1;k < KIND_COUNT; k++) {
11
+ seqs[k] = hexToANSI(theme.tokens[k] ?? "");
12
+ }
13
+ }
14
+ let out = "";
15
+ for (let i = 0;i < tokens.length; i++) {
16
+ const tok = tokens[i];
17
+ const seq = seqs[tok.kind];
18
+ const text = src.slice(tok.start, tok.end);
19
+ if (seq === "") {
20
+ out += text;
21
+ } else {
22
+ out += seq + text + "\x1B[0m";
23
+ }
24
+ }
25
+ return out;
26
+ }
27
+ function parseHexNibble(c) {
28
+ if (c >= 48 && c <= 57)
29
+ return c - 48;
30
+ if (c >= 97 && c <= 102)
31
+ return c - 87;
32
+ if (c >= 65 && c <= 70)
33
+ return c - 55;
34
+ return -1;
35
+ }
36
+ function parseHexByte(hi, lo) {
37
+ const a = parseHexNibble(hi);
38
+ const b = parseHexNibble(lo);
39
+ if (a < 0 || b < 0)
40
+ return -1;
41
+ return a << 4 | b;
42
+ }
43
+ function hexToANSI(color) {
44
+ if (color.length === 0 || color.charCodeAt(0) !== 35) {
45
+ return "";
46
+ }
47
+ const hexLen = color.length - 1;
48
+ let r;
49
+ let g;
50
+ let b;
51
+ if (hexLen === 3 || hexLen === 4) {
52
+ const r0 = parseHexNibble(color.charCodeAt(1));
53
+ const g0 = parseHexNibble(color.charCodeAt(2));
54
+ const b0 = parseHexNibble(color.charCodeAt(3));
55
+ if (r0 < 0 || g0 < 0 || b0 < 0)
56
+ return "";
57
+ r = r0 * 17;
58
+ g = g0 * 17;
59
+ b = b0 * 17;
60
+ } else if (hexLen === 6 || hexLen === 8) {
61
+ r = parseHexByte(color.charCodeAt(1), color.charCodeAt(2));
62
+ g = parseHexByte(color.charCodeAt(3), color.charCodeAt(4));
63
+ b = parseHexByte(color.charCodeAt(5), color.charCodeAt(6));
64
+ if (r < 0 || g < 0 || b < 0)
65
+ return "";
66
+ } else {
67
+ return "";
68
+ }
69
+ return `\x1B[38;2;${r};${g};${b}m`;
70
+ }
@@ -0,0 +1,20 @@
1
+ import { type Registry } from "../engine.js";
2
+ import type { Theme } from "../theme/index.js";
3
+ import { type Token } from "../token.js";
4
+ /** Options configuring HTML rendering. */
5
+ export interface HtmlOptions {
6
+ lang?: string;
7
+ theme?: Theme;
8
+ classes?: boolean;
9
+ classPrefix?: string;
10
+ inline?: boolean;
11
+ hideLineNumbers?: boolean;
12
+ }
13
+ /** Tokenizes src using reg and returns self-contained HTML markup. */
14
+ export declare function html(reg: Registry, src: string, opts?: HtmlOptions): string;
15
+ /** Renders pre-computed tokens for src as self-contained HTML markup. */
16
+ export declare function htmlTokens(src: string, tokens: readonly Token[], opts?: HtmlOptions): string;
17
+ /** Generates stylesheet rules for theme matching html(..., { classes: true }). */
18
+ export declare function css(theme: Theme | undefined, prefix?: string): string;
19
+ /** Generates --<prefix>-* CSS custom property declarations for theme. */
20
+ export declare function cssVars(theme: Theme | undefined, prefix?: string): string;
@@ -0,0 +1,212 @@
1
+ import { tokenize } from "../engine.js";
2
+ import { KIND_COUNT, kindName, TokenKind } from "../token.js";
3
+ const DEFAULT_FONT = "normal 15px ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace";
4
+ export function html(reg, src, opts = {}) {
5
+ const lang = opts.lang ?? "";
6
+ const toks = tokenize(src, reg.lookup(lang), reg);
7
+ return htmlTokens(src, toks, opts);
8
+ }
9
+ export function htmlTokens(src, tokens, opts = {}) {
10
+ const lang = opts.lang && opts.lang !== "" ? opts.lang : "plain";
11
+ const prefix = opts.classPrefix && opts.classPrefix !== "" ? opts.classPrefix : "limn";
12
+ const inline = Boolean(opts.inline);
13
+ const multiline = !inline && src.includes(`
14
+ `);
15
+ const lineNumbers = !opts.hideLineNumbers;
16
+ const classes = Boolean(opts.classes);
17
+ const mode = inline ? "inline" : multiline ? "multiline" : "oneline";
18
+ const tag = inline ? "code" : "div";
19
+ const openTags = buildOpenTags(prefix, classes, opts.theme);
20
+ const escLang = escapeAttr(lang);
21
+ let out = `<${tag} class="${prefix} ${prefix}-lang-${escLang} ${prefix}-${mode}" data-lang="${escLang}"`;
22
+ if (!classes) {
23
+ out += ` style="${buildBlockStyle(opts.theme, mode)}"`;
24
+ }
25
+ out += ">";
26
+ if (multiline) {
27
+ out += classes ? `<div class="${prefix}-scroll">` : '<div style="display:flex;overflow:auto">';
28
+ if (lineNumbers) {
29
+ let lines = 1;
30
+ let pos = 0;
31
+ while ((pos = src.indexOf(`
32
+ `, pos)) >= 0) {
33
+ lines++;
34
+ pos++;
35
+ }
36
+ out += buildGutter(lines, prefix, classes, opts.theme);
37
+ }
38
+ out += classes ? `<div class="${prefix}-code">` : '<div style="flex:1;outline:none">';
39
+ }
40
+ for (let i = 0;i < tokens.length; i++) {
41
+ const tok = tokens[i];
42
+ const text = src.slice(tok.start, tok.end);
43
+ const open = openTags[tok.kind];
44
+ if (open === "") {
45
+ out += escapeHTML(text);
46
+ } else {
47
+ out += open + escapeHTML(text) + "</span>";
48
+ }
49
+ }
50
+ if (multiline) {
51
+ out += "</div></div>";
52
+ }
53
+ out += `</${tag}>`;
54
+ return out;
55
+ }
56
+ function buildOpenTags(prefix, classes, theme) {
57
+ const tags = new Array(KIND_COUNT).fill("");
58
+ const cols = theme?.tokens;
59
+ for (let k = 1;k < KIND_COUNT; k++) {
60
+ const kind = k;
61
+ if (classes) {
62
+ tags[k] = `<span class="${prefix}-${kindName(kind)}">`;
63
+ continue;
64
+ }
65
+ const col = cols?.[k] ?? "";
66
+ if (col === "" && kind !== TokenKind.Comment) {
67
+ continue;
68
+ }
69
+ if (col !== "") {
70
+ tags[k] = kind === TokenKind.Comment ? `<span style="color:${col};font-style:italic">` : `<span style="color:${col}">`;
71
+ } else {
72
+ tags[k] = '<span style="font-style:italic">';
73
+ }
74
+ }
75
+ return tags;
76
+ }
77
+ function buildBlockStyle(theme, mode) {
78
+ let s = `white-space:pre;box-sizing:border-box;max-width:min(100%,100vw);font:${DEFAULT_FONT};line-height:1.5;`;
79
+ if (theme !== undefined) {
80
+ if (theme.scheme)
81
+ s += `color-scheme:${theme.scheme};`;
82
+ if (theme.bg !== "")
83
+ s += `background:${theme.bg};`;
84
+ if (theme.fg !== "")
85
+ s += `color:${theme.fg};`;
86
+ }
87
+ if (mode === "inline") {
88
+ return s + "display:inline-block;margin:0;padding:2px 5px;border-radius:5px";
89
+ }
90
+ if (mode === "oneline") {
91
+ return s + "margin:10px 0;padding:12px 10px;border-radius:10px";
92
+ }
93
+ return s + "margin:10px 0;padding:20px 16px;border-radius:10px";
94
+ }
95
+ function buildGutter(lines, prefix, classes, theme) {
96
+ let out = `<div class="${prefix}-numbers"`;
97
+ if (!classes) {
98
+ const col = theme ? themeNumColor(theme) || "inherit" : "inherit";
99
+ out += ` style="padding-left:5px;padding-right:12px;text-align:right;opacity:0.5;user-select:none;color:${col}"`;
100
+ }
101
+ out += ">";
102
+ for (let i = 1;i <= lines; i++) {
103
+ out += `<div>${i}</div>`;
104
+ }
105
+ return out + "</div>";
106
+ }
107
+ function themeNumColor(theme) {
108
+ return theme.numbers !== "" ? theme.numbers : theme.tokens[TokenKind.Comment] ?? "";
109
+ }
110
+ export function css(theme, prefix = "") {
111
+ if (theme === undefined) {
112
+ return "";
113
+ }
114
+ const p = prefix === "" ? "limn" : prefix;
115
+ let out = "";
116
+ if (theme.scheme || theme.bg !== "" || theme.fg !== "") {
117
+ out += `.${p} {`;
118
+ if (theme.scheme)
119
+ out += ` color-scheme: ${theme.scheme};`;
120
+ if (theme.bg !== "")
121
+ out += ` background: ${theme.bg};`;
122
+ if (theme.fg !== "")
123
+ out += ` color: ${theme.fg};`;
124
+ out += ` }
125
+ `;
126
+ }
127
+ const num = themeNumColor(theme);
128
+ if (num !== "") {
129
+ out += `.${p}-numbers { color: ${num}; }
130
+ `;
131
+ }
132
+ for (let k = 1;k < KIND_COUNT; k++) {
133
+ const kind = k;
134
+ const col = theme.tokens[k] ?? "";
135
+ if (col === "" && kind !== TokenKind.Comment) {
136
+ continue;
137
+ }
138
+ out += `.${p}-${kindName(kind)} {`;
139
+ if (col !== "")
140
+ out += ` color: ${col};`;
141
+ if (kind === TokenKind.Comment)
142
+ out += " font-style: italic;";
143
+ out += ` }
144
+ `;
145
+ }
146
+ return out;
147
+ }
148
+ export function cssVars(theme, prefix = "") {
149
+ if (theme === undefined) {
150
+ return "";
151
+ }
152
+ const p = prefix === "" ? "limn" : prefix;
153
+ let out = "";
154
+ if (theme.bg !== "")
155
+ out += `--${p}-bg: ${theme.bg};
156
+ `;
157
+ if (theme.fg !== "")
158
+ out += `--${p}-fg: ${theme.fg};
159
+ `;
160
+ const num = themeNumColor(theme);
161
+ if (num !== "")
162
+ out += `--${p}-numbers: ${num};
163
+ `;
164
+ for (let k = 1;k < KIND_COUNT; k++) {
165
+ const col = theme.tokens[k] ?? "";
166
+ if (col === "")
167
+ continue;
168
+ out += `--${p}-${kindName(k)}: ${col};
169
+ `;
170
+ }
171
+ return out;
172
+ }
173
+ function escapeHTML(s) {
174
+ let out = "";
175
+ let last = 0;
176
+ for (let i = 0;i < s.length; i++) {
177
+ const ch = s.charCodeAt(i);
178
+ let rep;
179
+ if (ch === 38)
180
+ rep = "&amp;";
181
+ else if (ch === 60)
182
+ rep = "&lt;";
183
+ else if (ch === 62)
184
+ rep = "&gt;";
185
+ else
186
+ continue;
187
+ out += s.slice(last, i) + rep;
188
+ last = i + 1;
189
+ }
190
+ return last === 0 ? s : out + s.slice(last);
191
+ }
192
+ function escapeAttr(s) {
193
+ let out = "";
194
+ let last = 0;
195
+ for (let i = 0;i < s.length; i++) {
196
+ const ch = s.charCodeAt(i);
197
+ let rep;
198
+ if (ch === 38)
199
+ rep = "&amp;";
200
+ else if (ch === 60)
201
+ rep = "&lt;";
202
+ else if (ch === 62)
203
+ rep = "&gt;";
204
+ else if (ch === 34)
205
+ rep = "&#34;";
206
+ else
207
+ continue;
208
+ out += s.slice(last, i) + rep;
209
+ last = i + 1;
210
+ }
211
+ return last === 0 ? s : out + s.slice(last);
212
+ }
@@ -0,0 +1,2 @@
1
+ export { ansi, ansiTokens } from "./ansi.js";
2
+ export { css, cssVars, html, htmlTokens, type HtmlOptions } from "./html.js";
@@ -0,0 +1,2 @@
1
+ export { ansi, ansiTokens } from "./ansi.js";
2
+ export { css, cssVars, html, htmlTokens } from "./html.js";
@@ -0,0 +1,57 @@
1
+ import type { Theme } from "./index.js";
2
+ /** Built-in light theme. */
3
+ export declare const defaultTheme: Theme;
4
+ /** Built-in dark theme. */
5
+ export declare const dark: Theme;
6
+ /** GitHub's light default theme. */
7
+ export declare const githubLight: Theme;
8
+ /** GitHub's dark default theme. */
9
+ export declare const githubDark: Theme;
10
+ /** GitHub's dark dimmed theme. */
11
+ export declare const githubDim: Theme;
12
+ /** Catppuccin Latte light theme. */
13
+ export declare const catppuccinLatte: Theme;
14
+ /** Catppuccin Mocha dark theme. */
15
+ export declare const catppuccinMocha: Theme;
16
+ /** Everforest Light Medium theme. */
17
+ export declare const everforestLight: Theme;
18
+ /** Everforest Dark Medium theme. */
19
+ export declare const everforestDark: Theme;
20
+ /** Gruvbox Light theme. */
21
+ export declare const gruvboxLight: Theme;
22
+ /** Gruvbox Dark theme. */
23
+ export declare const gruvboxDark: Theme;
24
+ /** Solarized Light theme. */
25
+ export declare const solarizedLight: Theme;
26
+ /** Solarized Dark theme. */
27
+ export declare const solarizedDark: Theme;
28
+ /** Geist Light theme. */
29
+ export declare const geistLight: Theme;
30
+ /** Geist Dark theme. */
31
+ export declare const geistDark: Theme;
32
+ /** VS Code Light Modern theme. */
33
+ export declare const vscodeLightModern: Theme;
34
+ /** VS Code Dark Modern theme. */
35
+ export declare const vscodeDarkModern: Theme;
36
+ /** Tokyo Night theme. */
37
+ export declare const tokyoNight: Theme;
38
+ /** Nord theme. */
39
+ export declare const nord: Theme;
40
+ /** Dracula theme. */
41
+ export declare const dracula: Theme;
42
+ /** Monokai theme. */
43
+ export declare const monokai: Theme;
44
+ /** Atom One Light theme. */
45
+ export declare const oneLight: Theme;
46
+ /** Atom One Dark theme. */
47
+ export declare const atomDark: Theme;
48
+ /** Night Owl theme. */
49
+ export declare const nightOwl: Theme;
50
+ /** Vesper theme. */
51
+ export declare const vesper: Theme;
52
+ /** Sorted list of all built-in theme names. */
53
+ export declare const NAMES: readonly string[];
54
+ /** Returns all built-in theme names in sorted order. */
55
+ export declare function names(): string[];
56
+ /** Looks up a built-in theme by name (case-insensitive, trimmed). */
57
+ export declare function byName(name: string): Theme | undefined;