@@ -0,0 +1,1023 @@
2+var monacoEditor = require("@monaco-editor/react");
4+exports.editorImpl = monacoEditor.default;
6+exports.initMonacoImpl = function() {
7+ return monacoEditor.monaco.init();
10+exports.getValue = function(editor) {
12+ return editor.getValue();
16+exports.defineThemeImpl = function(monacoInstance) {
17+ return function(name) {
18+ return function(theme) {
20+ return monacoInstance.editor.defineTheme(name, theme);
26+exports.setThemeImpl = function(monacoInstance) {
27+ return function(theme) {
29+ return monacoInstance.editor.setTheme(theme);
34+exports.registerLanguageImpl = function(monacoInstance) {
35+ return function(languageId) {
37+ monacoInstance.languages.register({ id: languageId });
42+exports.setMonarchTokensProviderImpl = function(monacoInstance) {
43+ return function(name) {
44+ return function(monarchLanguage) {
46+ return monacoInstance.languages.setMonarchTokensProvider(
55+exports.vsCodeTheme = {
60+ foreground: "008e00",
64+ foreground: "7d4726",
65+ token: "meta.preprocessor"
68+ foreground: "7d4726",
69+ token: "keyword.control.import"
72+ foreground: "df0002",
76+ foreground: "3a00dc",
77+ token: "constant.numeric"
80+ foreground: "c800a4",
81+ token: "constant.language"
84+ foreground: "275a5e",
85+ token: "constant.character"
88+ foreground: "275a5e",
89+ token: "constant.other"
92+ foreground: "c800a4",
93+ token: "variable.language"
96+ foreground: "c800a4",
97+ token: "variable.other"
100+ foreground: "c800a4",
104+ foreground: "c900a4",
108+ foreground: "438288",
109+ token: "entity.name.class"
112+ foreground: "790ead",
113+ token: "entity.name.tag"
116+ foreground: "450084",
117+ token: "entity.other.attribute-name"
120+ foreground: "450084",
121+ token: "support.function"
124+ foreground: "450084",
125+ token: "support.constant"
128+ foreground: "790ead",
129+ token: "support.type"
132+ foreground: "790ead",
133+ token: "support.class"
136+ foreground: "790ead",
137+ token: "support.other.variable"
141+ "editor.foreground": "#000000",
142+ "editor.background": "#FFFFFF",
143+ "editor.selectionBackground": "#B5D5FF",
144+ "editor.lineHighlightBackground": "#00000012",
145+ "editorCursor.foreground": "#000000",
146+ "editorWhitespace.foreground": "#BFBFBF"
150+exports.nightOwlTheme = {
155+ foreground: "637777",
159+ foreground: "addb67",
163+ foreground: "ecc48d",
164+ token: "vstring.quoted"
167+ foreground: "ecc48d",
168+ token: "variable.other.readwrite.js"
171+ foreground: "5ca7e4",
172+ token: "string.regexp"
175+ foreground: "5ca7e4",
176+ token: "string.regexp keyword.other"
179+ foreground: "5f7e97",
180+ token: "meta.function punctuation.separator.comma"
183+ foreground: "f78c6c",
184+ token: "constant.numeric"
187+ foreground: "f78c6c",
188+ token: "constant.character.numeric"
191+ foreground: "addb67",
195+ foreground: "c792ea",
199+ foreground: "c792ea",
200+ token: "punctuation.accessor"
203+ foreground: "c792ea",
207+ foreground: "c792ea",
208+ token: "meta.var.expr"
211+ foreground: "c792ea",
212+ token: "meta.class meta.method.declaration meta.var.expr storage.type.jsm"
215+ foreground: "c792ea",
216+ token: "storage.type.property.js"
219+ foreground: "c792ea",
220+ token: "storage.type.property.ts"
223+ foreground: "c792ea",
224+ token: "storage.type.property.tsx"
227+ foreground: "82aaff",
228+ token: "storage.type"
231+ foreground: "ffcb8b",
232+ token: "entity.name.class"
235+ foreground: "ffcb8b",
236+ token: "meta.class entity.name.type.class"
239+ foreground: "addb67",
240+ token: "entity.other.inherited-class"
243+ foreground: "82aaff",
244+ token: "entity.name.function"
247+ foreground: "addb67",
248+ token: "punctuation.definition.variable"
251+ foreground: "d3423e",
252+ token: "punctuation.section.embedded"
255+ foreground: "d6deeb",
256+ token: "punctuation.terminator.expression"
259+ foreground: "d6deeb",
260+ token: "punctuation.definition.arguments"
263+ foreground: "d6deeb",
264+ token: "punctuation.definition.array"
267+ foreground: "d6deeb",
268+ token: "punctuation.section.array"
271+ foreground: "d6deeb",
275+ foreground: "d9f5dd",
276+ token: "punctuation.definition.list.begin"
279+ foreground: "d9f5dd",
280+ token: "punctuation.definition.list.end"
283+ foreground: "d9f5dd",
284+ token: "punctuation.separator.arguments"
287+ foreground: "d9f5dd",
288+ token: "punctuation.definition.list"
291+ foreground: "d3423e",
292+ token: "string.template meta.template.expression"
295+ foreground: "d6deeb",
296+ token: "string.template punctuation.definition.string"
299+ foreground: "c792ea",
300+ fontStyle: "italic",
304+ foreground: "addb67",
309+ foreground: "82aaff",
310+ token: "constant.language"
313+ foreground: "82aaff",
314+ token: "punctuation.definition.constant"
317+ foreground: "82aaff",
318+ token: "variable.other.constant"
321+ foreground: "7fdbca",
322+ token: "support.function.construct"
325+ foreground: "7fdbca",
326+ token: "keyword.other.new"
329+ foreground: "82aaff",
330+ token: "constant.character"
333+ foreground: "82aaff",
334+ token: "constant.other"
337+ foreground: "f78c6c",
338+ token: "constant.character.escape"
341+ foreground: "addb67",
342+ token: "entity.other.inherited-class"
345+ foreground: "d7dbe0",
346+ token: "variable.parameter"
349+ foreground: "7fdbca",
350+ token: "entity.name.tag"
353+ foreground: "cc2996",
354+ token: "punctuation.definition.tag.html"
357+ foreground: "cc2996",
358+ token: "punctuation.definition.tag.begin"
361+ foreground: "cc2996",
362+ token: "punctuation.definition.tag.end"
365+ foreground: "addb67",
366+ token: "entity.other.attribute-name"
369+ foreground: "addb67",
370+ token: "entity.name.tag.custom"
373+ foreground: "82aaff",
374+ token: "support.function"
377+ foreground: "82aaff",
378+ token: "support.constant"
381+ foreground: "7fdbca",
382+ token: "upport.constant.meta.property-value"
385+ foreground: "addb67",
386+ token: "support.type"
389+ foreground: "addb67",
390+ token: "support.class"
393+ foreground: "addb67",
394+ token: "support.variable.dom"
397+ foreground: "7fdbca",
398+ token: "support.constant"
401+ foreground: "7fdbca",
402+ token: "keyword.other.special-method"
405+ foreground: "7fdbca",
406+ token: "keyword.other.new"
409+ foreground: "7fdbca",
410+ token: "keyword.other.debugger"
413+ foreground: "7fdbca",
414+ token: "keyword.control"
417+ foreground: "c792ea",
418+ token: "keyword.operator.comparison"
421+ foreground: "c792ea",
422+ token: "keyword.control.flow.js"
425+ foreground: "c792ea",
426+ token: "keyword.control.flow.ts"
429+ foreground: "c792ea",
430+ token: "keyword.control.flow.tsx"
433+ foreground: "c792ea",
434+ token: "keyword.control.ruby"
437+ foreground: "c792ea",
438+ token: "keyword.control.module.ruby"
441+ foreground: "c792ea",
442+ token: "keyword.control.class.ruby"
445+ foreground: "c792ea",
446+ token: "keyword.control.def.ruby"
449+ foreground: "c792ea",
450+ token: "keyword.control.loop.js"
453+ foreground: "c792ea",
454+ token: "keyword.control.loop.ts"
457+ foreground: "c792ea",
458+ token: "keyword.control.import.js"
461+ foreground: "c792ea",
462+ token: "keyword.control.import.ts"
465+ foreground: "c792ea",
466+ token: "keyword.control.import.tsx"
469+ foreground: "c792ea",
470+ token: "keyword.control.from.js"
473+ foreground: "c792ea",
474+ token: "keyword.control.from.ts"
477+ foreground: "c792ea",
478+ token: "keyword.control.from.tsx"
481+ foreground: "ffffff",
482+ background: "ff2c83",
486+ foreground: "ffffff",
487+ background: "d3423e",
488+ token: "invalid.deprecated"
491+ foreground: "7fdbca",
492+ token: "keyword.operator"
495+ foreground: "c792ea",
496+ token: "keyword.operator.relational"
499+ foreground: "c792ea",
500+ token: "keyword.operator.assignement"
503+ foreground: "c792ea",
504+ token: "keyword.operator.arithmetic"
507+ foreground: "c792ea",
508+ token: "keyword.operator.bitwise"
511+ foreground: "c792ea",
512+ token: "keyword.operator.increment"
515+ foreground: "c792ea",
516+ token: "keyword.operator.ternary"
519+ foreground: "637777",
520+ token: "comment.line.double-slash"
523+ foreground: "cdebf7",
527+ foreground: "ff5874",
528+ token: "constant.language.null"
531+ foreground: "d6deeb",
535+ foreground: "c792ea",
536+ token: "meta.delimiter.period"
539+ foreground: "d9f5dd",
540+ token: "punctuation.definition.string"
543+ foreground: "ff5874",
544+ token: "constant.language.boolean"
547+ foreground: "ffffff",
548+ token: "object.comma"
551+ foreground: "7fdbca",
552+ token: "variable.parameter.function"
555+ foreground: "80cbc4",
556+ token: "support.type.vendor.property-name"
559+ foreground: "80cbc4",
560+ token: "support.constant.vendor.property-value"
563+ foreground: "80cbc4",
564+ token: "support.type.property-name"
567+ foreground: "80cbc4",
568+ token: "meta.property-list entity.name.tag"
571+ foreground: "57eaf1",
572+ token: "meta.property-list entity.name.tag.reference"
575+ foreground: "f78c6c",
576+ token: "constant.other.color.rgb-value punctuation.definition.constant"
579+ foreground: "ffeb95",
580+ token: "constant.other.color"
583+ foreground: "ffeb95",
584+ token: "keyword.other.unit"
587+ foreground: "c792ea",
588+ token: "meta.selector"
591+ foreground: "fad430",
592+ token: "entity.other.attribute-name.id"
595+ foreground: "80cbc4",
596+ token: "meta.property-name"
599+ foreground: "c792ea",
600+ token: "entity.name.tag.doctype"
603+ foreground: "c792ea",
604+ token: "meta.tag.sgml.doctype"
607+ foreground: "d9f5dd",
608+ token: "punctuation.definition.parameters"
611+ foreground: "ecc48d",
612+ token: "string.quoted"
615+ foreground: "ecc48d",
616+ token: "string.quoted.double"
619+ foreground: "ecc48d",
620+ token: "string.quoted.single"
623+ foreground: "addb67",
624+ token: "support.constant.math"
627+ foreground: "addb67",
628+ token: "support.type.property-name.json"
631+ foreground: "addb67",
632+ token: "support.constant.json"
635+ foreground: "c789d6",
636+ token: "meta.structure.dictionary.value.json string.quoted.double"
639+ foreground: "80cbc4",
640+ token: "string.quoted.double.json punctuation.definition.string.json"
643+ foreground: "ff5874",
645+ "meta.structure.dictionary.json meta.structure.dictionary.value constant.language"
648+ foreground: "d6deeb",
649+ token: "variable.other.ruby"
652+ foreground: "ecc48d",
653+ token: "entity.name.type.class.ruby"
656+ foreground: "ecc48d",
657+ token: "keyword.control.class.ruby"
660+ foreground: "ecc48d",
661+ token: "meta.class.ruby"
664+ foreground: "7fdbca",
665+ token: "constant.language.symbol.hashkey.ruby"
668+ foreground: "e0eddd",
669+ background: "a57706",
670+ fontStyle: "italic",
674+ foreground: "e0eddd",
675+ background: "a57706",
676+ fontStyle: "italic",
677+ token: "meta.diff.header"
680+ foreground: "ef535090",
681+ fontStyle: "italic",
682+ token: "markup.deleted"
685+ foreground: "a2bffc",
686+ fontStyle: "italic",
687+ token: "markup.changed"
690+ foreground: "a2bffc",
691+ fontStyle: "italic",
692+ token: "meta.diff.header.git"
695+ foreground: "a2bffc",
696+ fontStyle: "italic",
697+ token: "meta.diff.header.from-file"
700+ foreground: "a2bffc",
701+ fontStyle: "italic",
702+ token: "meta.diff.header.to-file"
705+ foreground: "219186",
706+ background: "eae3ca",
707+ token: "markup.inserted"
710+ foreground: "d3201f",
711+ token: "other.package.exclude"
714+ foreground: "d3201f",
715+ token: "other.remove"
718+ foreground: "269186",
722+ foreground: "ff5874",
723+ token: "constant.language.python"
726+ foreground: "82aaff",
727+ token: "variable.parameter.function.python"
730+ foreground: "82aaff",
731+ token: "meta.function-call.arguments.python"
734+ foreground: "b2ccd6",
735+ token: "meta.function-call.python"
738+ foreground: "b2ccd6",
739+ token: "meta.function-call.generic.python"
742+ foreground: "d6deeb",
743+ token: "punctuation.python"
746+ foreground: "addb67",
747+ token: "entity.name.function.decorator.python"
750+ foreground: "8eace3",
751+ token: "source.python variable.language.special"
754+ foreground: "82b1ff",
755+ token: "markup.heading.markdown"
758+ foreground: "c792ea",
759+ fontStyle: "italic",
760+ token: "markup.italic.markdown"
763+ foreground: "addb67",
765+ token: "markup.bold.markdown"
768+ foreground: "697098",
769+ token: "markup.quote.markdown"
772+ foreground: "80cbc4",
773+ token: "markup.inline.raw.markdown"
776+ foreground: "ff869a",
777+ token: "markup.underline.link.markdown"
780+ foreground: "ff869a",
781+ token: "markup.underline.link.image.markdown"
784+ foreground: "d6deeb",
785+ token: "string.other.link.title.markdown"
788+ foreground: "d6deeb",
789+ token: "string.other.link.description.markdown"
792+ foreground: "82b1ff",
793+ token: "punctuation.definition.string.markdown"
796+ foreground: "82b1ff",
797+ token: "punctuation.definition.string.begin.markdown"
800+ foreground: "82b1ff",
801+ token: "punctuation.definition.string.end.markdown"
804+ foreground: "82b1ff",
805+ token: "meta.link.inline.markdown punctuation.definition.string"
808+ foreground: "7fdbca",
809+ token: "punctuation.definition.metadata.markdown"
812+ foreground: "82b1ff",
813+ token: "beginning.punctuation.definition.list.markdown"
817+ "editor.foreground": "#d6deeb",
818+ "editor.background": "#011627",
819+ "editor.selectionBackground": "#5f7e9779",
820+ "editor.lineHighlightBackground": "#010E17",
821+ "editorCursor.foreground": "#80a4c2",
822+ "editorWhitespace.foreground": "#2e2040",
823+ "editorIndentGuide.background": "#5e81ce52",
824+ "editor.selectionHighlightBorder": "#122d42"
828+exports.purescriptSyntax = {
829+ displayName: "Purescript",
830+ name: "purescrript",
831+ mimeTypes: ["text/purescript"],
832+ fileExtensions: ["purs"],
834+ editorOptions: { tabSize: 2, insertSpaces: true },
837+ blockCommentStart: "{-",
838+ blockCommentEnd: "-}",
877+ dataStart: ["^data"],
879+ typeStart: ["class", "instance", "type", "derive"],
882+ "\\\\(?:[nrt\\\\\"'\\?]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{6})",
883+ symbols0: "[\\$%&\\*\\+@!\\/\\\\\\^~=\\.:\\-\\?]",
884+ symbols: "(?:@symbols0|[\\|<>])+",
885+ idchars: "(?:[\\w'])*",
890+ "((?:[A-Z]@idchars\\.)+)([a-z]@idchars)",
891+ ["identifier.namespace", "identifier"]
894+ "((?:[A-Z]@idchars\\.)+)([A-Z]@idchars)",
895+ ["identifier.namespace", "constructor"]
899+ "[a-z]@idchars(?!\\.)",
902+ "@dataStart": { token: "keyword", next: "@type_data" },
903+ "@typeStart": { token: "keyword", next: "@type_type" },
904+ "@keywords": "keyword",
905+ "@extraKeywords": "keyword",
906+ "@default": "identifier"
911+ ["[A-Z]@idchars", "type.identifier"],
913+ ["_@idchars", "identifier.wildcard"],
915+ ["([a-z]@idchars\\.)+", "identifier.namespace"],
917+ { include: "@whitespace" },
919+ ["[{}()\\[\\]]", "@brackets"],
920+ ["[,`]", "delimiter"],
922+ ["::(?!@symbols0)", "type.operator", "@type_line"],
927+ "@keywords": "keyword.operator",
928+ "@extraKeywords": "keyword.operator",
929+ "@default": "operator"
934+ ["[0-9]+\\.[0-9]+([eE][\\-+]?[0-9]+)?", "number.float"],
935+ ["0[xX][0-9a-fA-F]+", "number.hex"],
936+ ["[0-9]+", "number"],
938+ ['"([^"\\\\]|\\\\.)*$', "string.invalid"],
939+ ['"', { token: "string.quote", bracket: "@open", next: "@string" }],
941+ ["'[^\\\\']'", "string"],
942+ ["(')(@escapes)(')", ["string", "string.escape", "string"]],
943+ ["'", "string.invalid"],
945+ ["^[ ]*#.*", "namespace"]
950+ ["{-", "comment", "@comment"],
951+ ["--.*$", "comment"]
955+ ["[^\\{\\-]+", "comment"],
956+ ["{-", "comment", "@push"],
957+ ["-}", "comment", "@pop"],
958+ ["[\\{\\-]", "comment"]
962+ ['[^\\\\"]+', "string"],
963+ ["@escapes", "string.escape"],
964+ ["\\\\.", "string.escape.invalid"],
965+ ['"', { token: "string.quote", bracket: "@close", next: "@pop" }]
970+ ["^\\s*(?!\\-\\-|\\{\\-)[^\\s]", { token: "@rematch", next: "@pop" }],
971+ { include: "@type" }
975+ ["([=|])(\\s*)([A-Z]@idchars)", ["keyword.operator", "", "constructor"]],
976+ ["^\\s*$", { token: "", next: "@pop" }],
977+ { include: "@type" }
981+ ["^\\s*(?!\\-\\-|\\{\\-)[_a-z]", { token: "@rematch", next: "@pop" }],
982+ ["[^=]*=", { token: "@rematch", next: "@pop" }],
983+ { include: "@type" }
987+ ["[(\\[]", { token: "@brackets.type" }, "@type_nested"],
988+ { include: "@type_content" }
992+ ["[)\\]]", { token: "@brackets.type" }, "@pop"],
993+ ["[(\\[]", { token: "@brackets.type" }, "@push"],
994+ [",", "delimiter.type"],
995+ { include: "@type_content" }
999+ { include: "@whitespace" },
1001+ ["[a-z]\\d*\\b", "type.identifier.typevar"],
1002+ ["_@idchars", "type.identifier.typevar"],
1005+ "((?:[A-Z]@idchars\\.)*)([A-Z]@idchars)",
1006+ ["type.identifier.namespace", "type.identifier"]
1009+ "((?:[A-Z]@idchars\\.)*)([a-z]@idchars)",
1012+ "@typeKeywords": ["type.identifier.namespace", "type.keyword"],
1013+ "@keywords": { token: "@rematch", next: "@pop" },
1014+ "@default": ["type.identifier.namespace", "type.identifier"]
1019+ ["::|->|[\\.:|]", "type.operator"],
1020+ ["[\\s\\S]", "@rematch", "@pop"]