@bearcove/monaco-lang-styx 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.
@@ -0,0 +1,103 @@
1
+ import * as monaco from 'monaco-editor';
2
+
3
+ /**
4
+ * Monaco tokens provider for Styx language.
5
+ * Handles context-aware tokenization including heredocs and embedded language injection.
6
+ */
7
+ declare class StyxTokensProvider implements monaco.languages.TokensProvider {
8
+ private monacoEditor;
9
+ /**
10
+ * @param monacoEditor Optional monaco.editor reference for embedded language tokenization.
11
+ * If not provided, heredocs will be styled as plain heredoc strings.
12
+ */
13
+ constructor(monacoEditor?: typeof monaco.editor);
14
+ getInitialState(): monaco.languages.IState;
15
+ tokenize(line: string, inputState: monaco.languages.IState): monaco.languages.ILineTokens;
16
+ }
17
+
18
+ declare const mocha: {
19
+ rosewater: string;
20
+ flamingo: string;
21
+ pink: string;
22
+ mauve: string;
23
+ red: string;
24
+ maroon: string;
25
+ peach: string;
26
+ yellow: string;
27
+ green: string;
28
+ teal: string;
29
+ sky: string;
30
+ sapphire: string;
31
+ blue: string;
32
+ lavender: string;
33
+ text: string;
34
+ subtext1: string;
35
+ subtext0: string;
36
+ overlay2: string;
37
+ overlay1: string;
38
+ overlay0: string;
39
+ surface2: string;
40
+ surface1: string;
41
+ surface0: string;
42
+ base: string;
43
+ mantle: string;
44
+ crust: string;
45
+ };
46
+ /**
47
+ * Catppuccin Mocha theme for Monaco editor.
48
+ * A dark theme with warm, readable colors optimized for Styx syntax highlighting.
49
+ */
50
+ declare const catppuccinMocha: monaco.editor.IStandaloneThemeData;
51
+
52
+ /**
53
+ * Styx language configuration for Monaco editor.
54
+ * Defines brackets, comments, and auto-closing pairs.
55
+ */
56
+ declare const styxLanguageConfig: monaco.languages.LanguageConfiguration;
57
+ /**
58
+ * Options for registering the Styx language.
59
+ */
60
+ interface RegisterStyxOptions {
61
+ /**
62
+ * Whether to define the Catppuccin Mocha theme.
63
+ * @default true
64
+ */
65
+ defineTheme?: boolean;
66
+ /**
67
+ * Whether to register embedded languages for heredoc injection (SQL, JavaScript, etc.)
68
+ * @default true
69
+ */
70
+ registerEmbeddedLanguages?: boolean;
71
+ }
72
+ /**
73
+ * Language definitions for embedded language support in heredocs.
74
+ */
75
+ interface EmbeddedLanguage {
76
+ id: string;
77
+ def: {
78
+ conf: monaco.languages.LanguageConfiguration;
79
+ language: monaco.languages.IMonarchLanguage;
80
+ };
81
+ }
82
+ /**
83
+ * Register the Styx language with Monaco editor.
84
+ *
85
+ * @param monacoInstance - The monaco module
86
+ * @param embeddedLanguages - Optional array of embedded languages for heredoc injection.
87
+ * These are the monaco basic language definitions (sql, javascript, etc.)
88
+ * @param options - Registration options
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * import * as monaco from 'monaco-editor';
93
+ * import * as sqlLang from 'monaco-editor/esm/vs/basic-languages/sql/sql';
94
+ * import { registerStyxLanguage } from '@bearcove/monaco-lang-styx';
95
+ *
96
+ * registerStyxLanguage(monaco, [
97
+ * { id: 'sql', def: sqlLang },
98
+ * ]);
99
+ * ```
100
+ */
101
+ declare function registerStyxLanguage(monacoInstance: typeof monaco, embeddedLanguages?: EmbeddedLanguage[], options?: RegisterStyxOptions): void;
102
+
103
+ export { type RegisterStyxOptions, StyxTokensProvider, catppuccinMocha, mocha, registerStyxLanguage, styxLanguageConfig };
package/dist/index.js ADDED
@@ -0,0 +1,476 @@
1
+ // src/tokenizer.ts
2
+ function createInitialState() {
3
+ return {
4
+ contextStack: ["object"],
5
+ // document is implicit root object
6
+ entryPhase: "key",
7
+ heredoc: null,
8
+ rawStringHashes: null,
9
+ inString: false,
10
+ stringIsKey: false,
11
+ clone() {
12
+ return {
13
+ contextStack: [...this.contextStack],
14
+ entryPhase: this.entryPhase,
15
+ heredoc: this.heredoc ? { ...this.heredoc } : null,
16
+ rawStringHashes: this.rawStringHashes,
17
+ inString: this.inString,
18
+ stringIsKey: this.stringIsKey,
19
+ clone: this.clone,
20
+ equals: this.equals
21
+ };
22
+ },
23
+ equals(other) {
24
+ const o = other;
25
+ return this.contextStack.length === o.contextStack.length && this.contextStack.every((v, i) => v === o.contextStack[i]) && this.entryPhase === o.entryPhase && JSON.stringify(this.heredoc) === JSON.stringify(o.heredoc) && this.rawStringHashes === o.rawStringHashes && this.inString === o.inString && this.stringIsKey === o.stringIsKey;
26
+ }
27
+ };
28
+ }
29
+ function currentContext(state) {
30
+ return state.contextStack[state.contextStack.length - 1] || "object";
31
+ }
32
+ function isInObjectContext(state) {
33
+ return currentContext(state) === "object";
34
+ }
35
+ var TOKEN = {
36
+ WHITE: "white",
37
+ COMMENT: "comment",
38
+ COMMENT_DOC: "comment.doc",
39
+ KEY: "key",
40
+ STRING_KEY: "string.key",
41
+ TAG_KEY: "tag.key",
42
+ VALUE: "value",
43
+ TAG: "tag",
44
+ STRING: "string",
45
+ STRING_HEREDOC: "string.heredoc",
46
+ STRING_ESCAPE: "string.escape",
47
+ DELIMITER_CURLY: "delimiter.curly",
48
+ DELIMITER_PAREN: "delimiter.parenthesis",
49
+ DELIMITER_COMMA: "delimiter.comma",
50
+ INVALID: "invalid"
51
+ };
52
+ var WHITESPACE = /^[ \t]+/;
53
+ var DOC_COMMENT = /^\/\/\/.*/;
54
+ var LINE_COMMENT = /^\/\/.*/;
55
+ var TAG_IDENT = /^@[A-Za-z_][A-Za-z0-9_-]*/;
56
+ var UNIT = /^@(?![A-Za-z_])/;
57
+ var HEREDOC_START = /^<<([A-Z][A-Z0-9_]*)(?:,([a-z][a-z0-9_.-]*))?/;
58
+ var RAW_STRING_START = /^r(#+)"/;
59
+ var BARE_FIRST_CHAR = /^[^\s{}()\,\"=@>\r\n]/;
60
+ var BARE_CONT_CHAR = /^[^\s{}()\,\">\r\n]/;
61
+ var StyxTokensProvider = class {
62
+ /**
63
+ * @param monacoEditor Optional monaco.editor reference for embedded language tokenization.
64
+ * If not provided, heredocs will be styled as plain heredoc strings.
65
+ */
66
+ constructor(monacoEditor) {
67
+ this.monacoEditor = monacoEditor;
68
+ }
69
+ getInitialState() {
70
+ return createInitialState();
71
+ }
72
+ tokenize(line, inputState) {
73
+ const state = inputState.clone();
74
+ const tokens = [];
75
+ let pos = 0;
76
+ const addToken = (start, type) => {
77
+ tokens.push({ startIndex: start, scopes: type });
78
+ };
79
+ const atomType = (isTag) => {
80
+ if (!isInObjectContext(state)) {
81
+ return isTag ? TOKEN.TAG : TOKEN.VALUE;
82
+ }
83
+ if (state.entryPhase === "key") {
84
+ return isTag ? TOKEN.TAG_KEY : TOKEN.KEY;
85
+ }
86
+ return isTag ? TOKEN.TAG : TOKEN.VALUE;
87
+ };
88
+ const stringType = () => {
89
+ if (!isInObjectContext(state)) {
90
+ return TOKEN.STRING;
91
+ }
92
+ return state.entryPhase === "key" ? TOKEN.STRING_KEY : TOKEN.STRING;
93
+ };
94
+ const afterAtom = () => {
95
+ if (isInObjectContext(state)) {
96
+ if (state.entryPhase === "key") {
97
+ state.entryPhase = "value";
98
+ } else {
99
+ state.entryPhase = "key";
100
+ }
101
+ }
102
+ };
103
+ if (state.heredoc) {
104
+ const delim = state.heredoc.delimiter;
105
+ const closeMatch = line.match(new RegExp(`^(\\s*)(${delim})\\s*$`));
106
+ if (closeMatch) {
107
+ addToken(0, TOKEN.STRING_HEREDOC);
108
+ state.heredoc = null;
109
+ afterAtom();
110
+ return { tokens, endState: state };
111
+ }
112
+ const lang = state.heredoc.language;
113
+ if (lang && this.monacoEditor) {
114
+ try {
115
+ const embeddedTokens = this.monacoEditor.tokenize(line, lang);
116
+ if (embeddedTokens.length > 0 && embeddedTokens[0].length > 0) {
117
+ for (const token of embeddedTokens[0]) {
118
+ tokens.push({
119
+ startIndex: token.offset,
120
+ scopes: token.type
121
+ });
122
+ }
123
+ return { tokens, endState: state };
124
+ }
125
+ } catch {
126
+ }
127
+ }
128
+ addToken(0, TOKEN.STRING_HEREDOC);
129
+ return { tokens, endState: state };
130
+ }
131
+ if (state.inString) {
132
+ const tokenType = state.stringIsKey ? TOKEN.STRING_KEY : TOKEN.STRING;
133
+ while (pos < line.length) {
134
+ const ch = line[pos];
135
+ if (ch === "\\" && pos + 1 < line.length) {
136
+ if (tokens.length === 0 || tokens[tokens.length - 1].startIndex !== pos) {
137
+ addToken(pos, TOKEN.STRING_ESCAPE);
138
+ }
139
+ pos += 2;
140
+ if (pos < line.length) {
141
+ addToken(pos, tokenType);
142
+ }
143
+ } else if (ch === '"') {
144
+ addToken(pos, tokenType);
145
+ pos++;
146
+ state.inString = false;
147
+ afterAtom();
148
+ break;
149
+ } else {
150
+ if (tokens.length === 0) {
151
+ addToken(pos, tokenType);
152
+ }
153
+ pos++;
154
+ }
155
+ }
156
+ if (pos >= line.length && state.inString) {
157
+ if (tokens.length === 0) {
158
+ addToken(0, tokenType);
159
+ }
160
+ return { tokens, endState: state };
161
+ }
162
+ }
163
+ if (state.rawStringHashes !== null) {
164
+ const hashes = state.rawStringHashes;
165
+ const tokenType = state.stringIsKey ? TOKEN.STRING_KEY : TOKEN.STRING;
166
+ const closePattern = '"' + "#".repeat(hashes);
167
+ while (pos < line.length) {
168
+ const idx = line.indexOf(closePattern, pos);
169
+ if (idx >= 0) {
170
+ addToken(pos, tokenType);
171
+ pos = idx + closePattern.length;
172
+ state.rawStringHashes = null;
173
+ afterAtom();
174
+ break;
175
+ } else {
176
+ addToken(pos, tokenType);
177
+ return { tokens, endState: state };
178
+ }
179
+ }
180
+ }
181
+ while (pos < line.length) {
182
+ const rest = line.slice(pos);
183
+ let match;
184
+ if (match = rest.match(WHITESPACE)) {
185
+ addToken(pos, TOKEN.WHITE);
186
+ pos += match[0].length;
187
+ continue;
188
+ }
189
+ if (match = rest.match(DOC_COMMENT)) {
190
+ addToken(pos, TOKEN.COMMENT_DOC);
191
+ pos += match[0].length;
192
+ continue;
193
+ }
194
+ if (match = rest.match(LINE_COMMENT)) {
195
+ addToken(pos, TOKEN.COMMENT);
196
+ pos += match[0].length;
197
+ continue;
198
+ }
199
+ if (rest[0] === "{") {
200
+ addToken(pos, TOKEN.DELIMITER_CURLY);
201
+ pos++;
202
+ state.contextStack.push("object");
203
+ state.entryPhase = "key";
204
+ continue;
205
+ }
206
+ if (rest[0] === "}") {
207
+ addToken(pos, TOKEN.DELIMITER_CURLY);
208
+ pos++;
209
+ state.contextStack.pop();
210
+ if (isInObjectContext(state) && state.entryPhase === "value") {
211
+ state.entryPhase = "key";
212
+ }
213
+ continue;
214
+ }
215
+ if (rest[0] === "(") {
216
+ addToken(pos, TOKEN.DELIMITER_PAREN);
217
+ pos++;
218
+ state.contextStack.push("sequence");
219
+ continue;
220
+ }
221
+ if (rest[0] === ")") {
222
+ addToken(pos, TOKEN.DELIMITER_PAREN);
223
+ pos++;
224
+ state.contextStack.pop();
225
+ if (isInObjectContext(state) && state.entryPhase === "value") {
226
+ state.entryPhase = "key";
227
+ }
228
+ continue;
229
+ }
230
+ if (rest[0] === ",") {
231
+ addToken(pos, TOKEN.DELIMITER_COMMA);
232
+ pos++;
233
+ if (isInObjectContext(state)) {
234
+ state.entryPhase = "key";
235
+ }
236
+ continue;
237
+ }
238
+ if (match = rest.match(HEREDOC_START)) {
239
+ addToken(pos, TOKEN.STRING_HEREDOC);
240
+ pos += match[0].length;
241
+ state.heredoc = {
242
+ delimiter: match[1],
243
+ language: match[2] || null,
244
+ indentation: null
245
+ };
246
+ return { tokens, endState: state };
247
+ }
248
+ if (match = rest.match(RAW_STRING_START)) {
249
+ const hashes = match[1].length;
250
+ const isKey = isInObjectContext(state) && state.entryPhase === "key";
251
+ addToken(pos, isKey ? TOKEN.STRING_KEY : TOKEN.STRING);
252
+ pos += match[0].length;
253
+ const closePattern = '"' + "#".repeat(hashes);
254
+ const closeIdx = line.indexOf(closePattern, pos);
255
+ if (closeIdx >= 0) {
256
+ pos = closeIdx + closePattern.length;
257
+ afterAtom();
258
+ } else {
259
+ state.rawStringHashes = hashes;
260
+ state.stringIsKey = isKey;
261
+ return { tokens, endState: state };
262
+ }
263
+ continue;
264
+ }
265
+ if (rest[0] === '"') {
266
+ const isKey = isInObjectContext(state) && state.entryPhase === "key";
267
+ const tokenType = isKey ? TOKEN.STRING_KEY : TOKEN.STRING;
268
+ addToken(pos, tokenType);
269
+ pos++;
270
+ while (pos < line.length) {
271
+ const ch = line[pos];
272
+ if (ch === "\\" && pos + 1 < line.length) {
273
+ addToken(pos, TOKEN.STRING_ESCAPE);
274
+ pos += 2;
275
+ if (pos < line.length && line[pos] !== '"') {
276
+ addToken(pos, tokenType);
277
+ }
278
+ } else if (ch === '"') {
279
+ addToken(pos, tokenType);
280
+ pos++;
281
+ afterAtom();
282
+ break;
283
+ } else {
284
+ pos++;
285
+ }
286
+ }
287
+ if (pos >= line.length && line[line.length - 1] !== '"') {
288
+ state.inString = true;
289
+ state.stringIsKey = isKey;
290
+ }
291
+ continue;
292
+ }
293
+ if (match = rest.match(UNIT)) {
294
+ addToken(pos, atomType(true));
295
+ pos += match[0].length;
296
+ afterAtom();
297
+ continue;
298
+ }
299
+ if (match = rest.match(TAG_IDENT)) {
300
+ addToken(pos, atomType(true));
301
+ pos += match[0].length;
302
+ const afterTag = line.slice(pos);
303
+ if (afterTag[0] === "{" || afterTag[0] === "(") {
304
+ continue;
305
+ } else if (afterTag[0] === '"' || afterTag.match(/^r#+"/)) {
306
+ continue;
307
+ } else if (afterTag.match(/^<<[A-Z]/)) {
308
+ continue;
309
+ }
310
+ afterAtom();
311
+ continue;
312
+ }
313
+ if (rest.match(BARE_FIRST_CHAR)) {
314
+ const startPos = pos;
315
+ pos++;
316
+ while (pos < line.length && line.slice(pos).match(BARE_CONT_CHAR)) {
317
+ pos++;
318
+ }
319
+ addToken(startPos, atomType(false));
320
+ afterAtom();
321
+ continue;
322
+ }
323
+ addToken(pos, TOKEN.INVALID);
324
+ pos++;
325
+ }
326
+ if (isInObjectContext(state)) {
327
+ state.entryPhase = "key";
328
+ }
329
+ return { tokens, endState: state };
330
+ }
331
+ };
332
+
333
+ // src/theme.ts
334
+ var mocha = {
335
+ rosewater: "f5e0dc",
336
+ flamingo: "f2cdcd",
337
+ pink: "f5c2e7",
338
+ mauve: "cba6f7",
339
+ red: "f38ba8",
340
+ maroon: "eba0ac",
341
+ peach: "fab387",
342
+ yellow: "f9e2af",
343
+ green: "a6e3a1",
344
+ teal: "94e2d5",
345
+ sky: "89dceb",
346
+ sapphire: "74c7ec",
347
+ blue: "89b4fa",
348
+ lavender: "b4befe",
349
+ text: "cdd6f4",
350
+ subtext1: "bac2de",
351
+ subtext0: "a6adc8",
352
+ overlay2: "9399b2",
353
+ overlay1: "7f849c",
354
+ overlay0: "6c7086",
355
+ surface2: "585b70",
356
+ surface1: "45475a",
357
+ surface0: "313244",
358
+ base: "1e1e2e",
359
+ mantle: "181825",
360
+ crust: "11111b"
361
+ };
362
+ var catppuccinMocha = {
363
+ base: "vs-dark",
364
+ inherit: true,
365
+ rules: [
366
+ // Comments
367
+ { token: "comment", foreground: mocha.overlay1, fontStyle: "italic" },
368
+ { token: "comment.doc", foreground: mocha.overlay2, fontStyle: "italic" },
369
+ // Keys - pink/flamingo for that warm feel
370
+ { token: "key", foreground: mocha.flamingo },
371
+ { token: "string.key", foreground: mocha.flamingo },
372
+ { token: "tag.key", foreground: mocha.mauve },
373
+ // Values - sapphire/blue
374
+ { token: "value", foreground: mocha.sapphire },
375
+ // Tags - mauve (purple)
376
+ { token: "tag", foreground: mocha.mauve },
377
+ // Strings - green
378
+ { token: "string", foreground: mocha.green },
379
+ { token: "string.heredoc", foreground: mocha.green },
380
+ { token: "string.escape", foreground: mocha.peach },
381
+ // Delimiters
382
+ { token: "delimiter.curly", foreground: mocha.yellow },
383
+ { token: "delimiter.parenthesis", foreground: mocha.pink },
384
+ { token: "delimiter.comma", foreground: mocha.overlay2 },
385
+ // Invalid
386
+ { token: "invalid", foreground: mocha.red },
387
+ // Additional token types for embedded languages
388
+ { token: "keyword", foreground: mocha.mauve },
389
+ { token: "keyword.sql", foreground: mocha.mauve },
390
+ { token: "operator", foreground: mocha.sky },
391
+ { token: "operator.sql", foreground: mocha.sky },
392
+ { token: "number", foreground: mocha.peach },
393
+ { token: "number.json", foreground: mocha.peach },
394
+ { token: "identifier", foreground: mocha.text },
395
+ { token: "type", foreground: mocha.yellow },
396
+ { token: "type.identifier.json", foreground: mocha.blue },
397
+ { token: "predefined", foreground: mocha.blue },
398
+ { token: "predefined.sql", foreground: mocha.blue },
399
+ // JSON specific
400
+ { token: "string.key.json", foreground: mocha.flamingo },
401
+ { token: "string.value.json", foreground: mocha.green },
402
+ { token: "keyword.json", foreground: mocha.mauve },
403
+ { token: "delimiter.bracket.json", foreground: mocha.overlay2 },
404
+ { token: "delimiter.array.json", foreground: mocha.pink },
405
+ { token: "delimiter.colon.json", foreground: mocha.overlay2 },
406
+ { token: "delimiter.comma.json", foreground: mocha.overlay2 }
407
+ ],
408
+ colors: {
409
+ "editor.background": "#" + mocha.base,
410
+ "editor.foreground": "#" + mocha.text,
411
+ "editor.lineHighlightBackground": "#" + mocha.surface0,
412
+ "editorCursor.foreground": "#" + mocha.rosewater,
413
+ "editor.selectionBackground": "#" + mocha.surface2 + "80",
414
+ "editorLineNumber.foreground": "#" + mocha.surface2,
415
+ "editorLineNumber.activeForeground": "#" + mocha.lavender,
416
+ "editorIndentGuide.background": "#" + mocha.surface1,
417
+ "editorIndentGuide.activeBackground": "#" + mocha.surface2,
418
+ "editorBracketMatch.background": "#" + mocha.surface2 + "80",
419
+ "editorBracketMatch.border": "#" + mocha.mauve,
420
+ "editor.findMatchBackground": "#" + mocha.peach + "40",
421
+ "editor.findMatchHighlightBackground": "#" + mocha.yellow + "30",
422
+ "editorWidget.background": "#" + mocha.mantle,
423
+ "editorWidget.border": "#" + mocha.surface1,
424
+ "input.background": "#" + mocha.surface0,
425
+ "input.border": "#" + mocha.surface1,
426
+ "input.foreground": "#" + mocha.text,
427
+ "scrollbarSlider.background": "#" + mocha.surface1 + "80",
428
+ "scrollbarSlider.hoverBackground": "#" + mocha.surface2 + "80",
429
+ "scrollbarSlider.activeBackground": "#" + mocha.surface2
430
+ }
431
+ };
432
+
433
+ // src/index.ts
434
+ var styxLanguageConfig = {
435
+ comments: { lineComment: "//" },
436
+ brackets: [
437
+ ["{", "}"],
438
+ ["(", ")"]
439
+ ],
440
+ autoClosingPairs: [
441
+ { open: "{", close: "}" },
442
+ { open: "(", close: ")" },
443
+ { open: '"', close: '"' }
444
+ ],
445
+ surroundingPairs: [
446
+ { open: "{", close: "}" },
447
+ { open: "(", close: ")" },
448
+ { open: '"', close: '"' }
449
+ ]
450
+ };
451
+ function registerStyxLanguage(monacoInstance, embeddedLanguages, options = {}) {
452
+ const { defineTheme = true, registerEmbeddedLanguages = true } = options;
453
+ if (registerEmbeddedLanguages && embeddedLanguages) {
454
+ for (const { id, def } of embeddedLanguages) {
455
+ const existing = monacoInstance.languages.getLanguages().find((l) => l.id === id);
456
+ if (!existing) {
457
+ monacoInstance.languages.register({ id });
458
+ }
459
+ monacoInstance.languages.setMonarchTokensProvider(id, def.language);
460
+ monacoInstance.languages.setLanguageConfiguration(id, def.conf);
461
+ }
462
+ }
463
+ monacoInstance.languages.register({ id: "styx" });
464
+ monacoInstance.languages.setTokensProvider("styx", new StyxTokensProvider(monacoInstance.editor));
465
+ monacoInstance.languages.setLanguageConfiguration("styx", styxLanguageConfig);
466
+ if (defineTheme) {
467
+ monacoInstance.editor.defineTheme("catppuccin-mocha", catppuccinMocha);
468
+ }
469
+ }
470
+ export {
471
+ StyxTokensProvider,
472
+ catppuccinMocha,
473
+ mocha,
474
+ registerStyxLanguage,
475
+ styxLanguageConfig
476
+ };
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@bearcove/monaco-lang-styx",
3
+ "version": "0.1.0",
4
+ "description": "Styx language support for Monaco Editor",
5
+ "type": "module",
6
+ "main": "dist/index.cjs",
7
+ "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "src"
19
+ ],
20
+ "keywords": [
21
+ "monaco",
22
+ "styx",
23
+ "syntax-highlighting",
24
+ "editor"
25
+ ],
26
+ "author": "Amos Wenger <amos@bearcove.net>",
27
+ "license": "MIT",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/bearcove/styx.git",
31
+ "directory": "editors/monaco-styx"
32
+ },
33
+ "bugs": {
34
+ "url": "https://github.com/bearcove/styx/issues"
35
+ },
36
+ "homepage": "https://styx.bearcove.net",
37
+ "devDependencies": {
38
+ "tsup": "^8.0.0",
39
+ "typescript": "^5.3.0"
40
+ },
41
+ "peerDependencies": {
42
+ "monaco-editor": "^0.40.0 || ^0.50.0"
43
+ },
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
47
+ "scripts": {
48
+ "build": "tsup src/index.ts --format esm,cjs --dts --clean",
49
+ "dev": "tsup src/index.ts --format esm,cjs --dts --watch"
50
+ }
51
+ }