diff --git a/extensions/vscode/builtin-themes/dark_modern.json b/extensions/vscode/builtin-themes/dark_modern.json new file mode 100644 index 000000000..b1c49c79b --- /dev/null +++ b/extensions/vscode/builtin-themes/dark_modern.json @@ -0,0 +1,128 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Default Dark Modern", + "include": "./dark_plus.json", + "colors": { + "activityBar.activeBorder": "#0078D4", + "activityBar.background": "#181818", + "activityBar.border": "#2B2B2B", + "activityBar.foreground": "#D7D7D7", + "activityBar.inactiveForeground": "#868686", + "activityBarBadge.background": "#0078D4", + "activityBarBadge.foreground": "#FFFFFF", + "badge.background": "#616161", + "badge.foreground": "#F8F8F8", + "button.background": "#0078D4", + "button.border": "#FFFFFF12", + "button.foreground": "#FFFFFF", + "button.hoverBackground": "#026EC1", + "button.secondaryBackground": "#313131", + "button.secondaryForeground": "#CCCCCC", + "button.secondaryHoverBackground": "#3C3C3C", + "chat.slashCommandBackground": "#34414B", + "chat.slashCommandForeground": "#40A6FF", + "checkbox.background": "#313131", + "checkbox.border": "#3C3C3C", + "debugToolBar.background": "#181818", + "descriptionForeground": "#9D9D9D", + "dropdown.background": "#313131", + "dropdown.border": "#3C3C3C", + "dropdown.foreground": "#CCCCCC", + "dropdown.listBackground": "#1F1F1F", + "editor.background": "#1F1F1F", + "editor.findMatchBackground": "#9E6A03", + "editor.foreground": "#CCCCCC", + "editorGroup.border": "#FFFFFF17", + "editorGroupHeader.tabsBackground": "#181818", + "editorGroupHeader.tabsBorder": "#2B2B2B", + "editorGutter.addedBackground": "#2EA043", + "editorGutter.deletedBackground": "#F85149", + "editorGutter.modifiedBackground": "#0078D4", + "editorLineNumber.activeForeground": "#CCCCCC", + "editorLineNumber.foreground": "#6E7681", + "editorOverviewRuler.border": "#010409", + "editorWidget.background": "#202020", + "errorForeground": "#F85149", + "focusBorder": "#0078D4", + "foreground": "#CCCCCC", + "icon.foreground": "#CCCCCC", + "input.background": "#313131", + "input.border": "#3C3C3C", + "input.foreground": "#CCCCCC", + "input.placeholderForeground": "#989898", + "inputOption.activeBackground": "#2489DB82", + "inputOption.activeBorder": "#2488DB", + "keybindingLabel.foreground": "#CCCCCC", + "menu.background": "#1F1F1F", + "notificationCenterHeader.background": "#1F1F1F", + "notificationCenterHeader.foreground": "#CCCCCC", + "notifications.background": "#1F1F1F", + "notifications.border": "#2B2B2B", + "notifications.foreground": "#CCCCCC", + "panel.background": "#181818", + "panel.border": "#2B2B2B", + "panelInput.border": "#2B2B2B", + "panelTitle.activeBorder": "#0078D4", + "panelTitle.activeForeground": "#CCCCCC", + "panelTitle.inactiveForeground": "#9D9D9D", + "peekViewEditor.background": "#1F1F1F", + "peekViewEditor.matchHighlightBackground": "#BB800966", + "peekViewResult.background": "#1F1F1F", + "peekViewResult.matchHighlightBackground": "#BB800966", + "pickerGroup.border": "#3C3C3C", + "progressBar.background": "#0078D4", + "quickInput.background": "#222222", + "quickInput.foreground": "#CCCCCC", + "settings.dropdownBackground": "#313131", + "settings.dropdownBorder": "#3C3C3C", + "settings.headerForeground": "#FFFFFF", + "settings.modifiedItemIndicator": "#BB800966", + "sideBar.background": "#181818", + "sideBar.border": "#2B2B2B", + "sideBar.foreground": "#CCCCCC", + "sideBarSectionHeader.background": "#181818", + "sideBarSectionHeader.border": "#2B2B2B", + "sideBarSectionHeader.foreground": "#CCCCCC", + "sideBarTitle.foreground": "#CCCCCC", + "statusBar.background": "#181818", + "statusBar.border": "#2B2B2B", + "statusBar.debuggingBackground": "#0078D4", + "statusBar.debuggingForeground": "#FFFFFF", + "statusBar.focusBorder": "#0078D4", + "statusBar.foreground": "#CCCCCC", + "statusBar.noFolderBackground": "#1F1F1F", + "statusBarItem.focusBorder": "#0078D4", + "statusBarItem.prominentBackground": "#6E768166", + "statusBarItem.remoteBackground": "#0078D4", + "statusBarItem.remoteForeground": "#FFFFFF", + "tab.activeBackground": "#1F1F1F", + "tab.activeBorder": "#1F1F1F", + "tab.activeBorderTop": "#0078D4", + "tab.activeForeground": "#FFFFFF", + "tab.border": "#2B2B2B", + "tab.hoverBackground": "#1F1F1F", + "tab.inactiveBackground": "#181818", + "tab.inactiveForeground": "#9D9D9D", + "tab.unfocusedActiveBorder": "#1F1F1F", + "tab.unfocusedActiveBorderTop": "#2B2B2B", + "tab.unfocusedHoverBackground": "#1F1F1F", + "terminal.foreground": "#CCCCCC", + "terminal.tab.activeBorder": "#0078D4", + "textBlockQuote.background": "#2B2B2B", + "textBlockQuote.border": "#616161", + "textCodeBlock.background": "#2B2B2B", + "textLink.activeForeground": "#4daafc", + "textLink.foreground": "#4daafc", + "textPreformat.foreground": "#D0D0D0", + "textPreformat.background": "#3C3C3C", + "textSeparator.foreground": "#21262D", + "titleBar.activeBackground": "#181818", + "titleBar.activeForeground": "#CCCCCC", + "titleBar.border": "#2B2B2B", + "titleBar.inactiveBackground": "#1F1F1F", + "titleBar.inactiveForeground": "#9D9D9D", + "welcomePage.tileBackground": "#2B2B2B", + "welcomePage.progress.foreground": "#0078D4", + "widget.border": "#313131" + } +} diff --git a/extensions/vscode/builtin-themes/dark_plus.json b/extensions/vscode/builtin-themes/dark_plus.json new file mode 100644 index 000000000..c13c17a3e --- /dev/null +++ b/extensions/vscode/builtin-themes/dark_plus.json @@ -0,0 +1,193 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Dark+", + "include": "./dark_vs.json", + "tokenColors": [ + { + "name": "Function declarations", + "scope": [ + "entity.name.function", + "support.function", + "support.constant.handlebars", + "source.powershell variable.other.member", + "entity.name.operator.custom-literal" + ], + "settings": { + "foreground": "#DCDCAA" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "support.class", + "support.type", + "entity.name.type", + "entity.name.namespace", + "entity.other.attribute", + "entity.name.scope-resolution", + "entity.name.class", + "storage.type.numeric.go", + "storage.type.byte.go", + "storage.type.boolean.go", + "storage.type.string.go", + "storage.type.uintptr.go", + "storage.type.error.go", + "storage.type.rune.go", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" + ], + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "name": "Types declaration and references, TS grammar specific", + "scope": [ + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "name": "Control flow / Special keywords", + "scope": [ + "keyword.control", + "source.cpp keyword.operator.new", + "keyword.operator.delete", + "keyword.other.using", + "keyword.other.directive.using", + "keyword.other.operator", + "entity.name.operator" + ], + "settings": { + "foreground": "#C586C0" + } + }, + { + "name": "Variable and parameter name", + "scope": [ + "variable", + "meta.definition.variable.name", + "support.variable", + "entity.name.variable", + "constant.other.placeholder" + ], + "settings": { + "foreground": "#9CDCFE" + } + }, + { + "name": "Constants and enums", + "scope": ["variable.other.constant", "variable.other.enummember"], + "settings": { + "foreground": "#4FC1FF" + } + }, + { + "name": "Object keys, TS grammar specific", + "scope": ["meta.object-literal.key"], + "settings": { + "foreground": "#9CDCFE" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#CE9178" + } + }, + { + "name": "Regular expression groups", + "scope": [ + "punctuation.definition.group.regexp", + "punctuation.definition.group.assertion.regexp", + "punctuation.definition.character-class.regexp", + "punctuation.character.set.begin.regexp", + "punctuation.character.set.end.regexp", + "keyword.operator.negation.regexp", + "support.other.parenthesis.regexp" + ], + "settings": { + "foreground": "#CE9178" + } + }, + { + "scope": [ + "constant.character.character-class.regexp", + "constant.other.character-class.set.regexp", + "constant.other.character-class.regexp", + "constant.character.set.regexp" + ], + "settings": { + "foreground": "#d16969" + } + }, + { + "scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"], + "settings": { + "foreground": "#DCDCAA" + } + }, + { + "scope": "keyword.operator.quantifier.regexp", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": ["constant.character", "constant.other.option"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "constant.character.escape", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "entity.name.label", + "settings": { + "foreground": "#C8C8C8" + } + } + ], + "semanticTokenColors": { + "newOperator": "#C586C0", + "stringLiteral": "#ce9178", + "customLiteral": "#DCDCAA", + "numberLiteral": "#b5cea8" + } +} diff --git a/extensions/vscode/builtin-themes/dark_vs.json b/extensions/vscode/builtin-themes/dark_vs.json new file mode 100644 index 000000000..0bf6a194e --- /dev/null +++ b/extensions/vscode/builtin-themes/dark_vs.json @@ -0,0 +1,394 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Dark (Visual Studio)", + "colors": { + "checkbox.border": "#6B6B6B", + "editor.background": "#1E1E1E", + "editor.foreground": "#D4D4D4", + "editor.inactiveSelectionBackground": "#3A3D41", + "editorIndentGuide.background1": "#404040", + "editorIndentGuide.activeBackground1": "#707070", + "editor.selectionHighlightBackground": "#ADD6FF26", + "list.dropBackground": "#383B3D", + "activityBarBadge.background": "#007ACC", + "sideBarTitle.foreground": "#BBBBBB", + "input.placeholderForeground": "#A6A6A6", + "menu.background": "#252526", + "menu.foreground": "#CCCCCC", + "menu.separatorBackground": "#454545", + "menu.border": "#454545", + "statusBarItem.remoteForeground": "#FFF", + "statusBarItem.remoteBackground": "#16825D", + "ports.iconRunningProcessForeground": "#369432", + "sideBarSectionHeader.background": "#0000", + "sideBarSectionHeader.border": "#ccc3", + "tab.lastPinnedBorder": "#ccc3", + "list.activeSelectionIconForeground": "#FFF", + "terminal.inactiveSelectionBackground": "#3A3D41", + "widget.border": "#303031", + "actionBar.toggledBackground": "#383a49" + }, + "tokenColors": [ + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#D4D4D4" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "header", + "settings": { + "foreground": "#000080" + } + }, + { + "scope": "comment", + "settings": { + "foreground": "#6A9955" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": [ + "constant.numeric", + "variable.other.enummember", + "keyword.operator.plus.exponent", + "keyword.operator.minus.exponent" + ], + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#646695" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": ["entity.name.tag.css", "entity.name.tag.less"], + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "source.css entity.other.attribute-name.class", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.parent.less", + "source.css entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element.css", + "source.css.less entity.other.attribute-name.id", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#569cd6" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#569cd6" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "punctuation.definition.quote.begin.markdown", + "settings": { + "foreground": "#6A9955" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#ce9178" + } + }, + { + "name": "brackets of XML/HTML tags", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#808080" + } + }, + { + "scope": ["meta.preprocessor", "entity.name.function.preprocessor"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": ["storage.modifier", "keyword.operator.noexcept"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": ["string", "meta.embedded.assembly"], + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#d16969" + } + }, + { + "name": "String interpolation", + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": ["meta.template.expression"], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "source.css variable", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.alignof", + "keyword.operator.typeid", + "keyword.operator.alignas", + "keyword.operator.instanceof", + "keyword.operator.logical.python", + "keyword.operator.wordlike" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": [ + "punctuation.section.embedded.begin.php", + "punctuation.section.embedded.end.php" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "name": "coloring of the Java import and package identifiers", + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#569cd6" + } + } + ], + "semanticHighlighting": true, + "semanticTokenColors": { + "newOperator": "#d4d4d4", + "stringLiteral": "#ce9178", + "customLiteral": "#D4D4D4", + "numberLiteral": "#b5cea8" + } +} diff --git a/extensions/vscode/builtin-themes/hc_black.json b/extensions/vscode/builtin-themes/hc_black.json new file mode 100644 index 000000000..ebb49d986 --- /dev/null +++ b/extensions/vscode/builtin-themes/hc_black.json @@ -0,0 +1,468 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Dark High Contrast", + "colors": { + "editor.background": "#000000", + "editor.foreground": "#FFFFFF", + "editorIndentGuide.background1": "#FFFFFF", + "editorIndentGuide.activeBackground1": "#FFFFFF", + "sideBarTitle.foreground": "#FFFFFF", + "selection.background": "#008000", + "editor.selectionBackground": "#FFFFFF", + "statusBarItem.remoteBackground": "#00000000", + "ports.iconRunningProcessForeground": "#FFFFFF", + "editorWhitespace.foreground": "#7c7c7c", + "actionBar.toggledBackground": "#383a49" + }, + "tokenColors": [ + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#FFFFFF" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#000080" + } + }, + { + "scope": "comment", + "settings": { + "foreground": "#7ca668" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": [ + "constant.numeric", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#b46695" + } + }, + { + "scope": "constant.character", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": [ + "entity.name.tag.css", + "entity.name.tag.less" + ], + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "source.css entity.other.attribute-name.class", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.parent.less", + "source.css entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element.css", + "source.css.less entity.other.attribute-name.id", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#6796e6" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "brackets of XML/HTML tags", + "scope": [ + "punctuation.definition.tag" + ], + "settings": { + "foreground": "#808080" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.modifier", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#d16969" + } + }, + { + "name": "String interpolation", + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": [ + "meta.template.expression" + ], + "settings": { + "foreground": "#ffffff" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "source.css variable", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.logical.python" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "name": "coloring of the Java import and package identifiers", + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "name": "coloring of the TS this", + "scope": "variable.language.this", + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "Function declarations", + "scope": [ + "entity.name.function", + "support.function", + "support.constant.handlebars", + "source.powershell variable.other.member" + ], + "settings": { + "foreground": "#DCDCAA" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "support.class", + "support.type", + "entity.name.type", + "entity.name.namespace", + "entity.name.scope-resolution", + "entity.name.class", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" + ], + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "name": "Types declaration and references, TS grammar specific", + "scope": [ + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "name": "Control flow / Special keywords", + "scope": [ + "keyword.control", + "source.cpp keyword.operator.new", + "source.cpp keyword.operator.delete", + "keyword.other.using", + "keyword.other.directive.using", + "keyword.other.operator" + ], + "settings": { + "foreground": "#C586C0" + } + }, + { + "name": "Variable and parameter name", + "scope": [ + "variable", + "meta.definition.variable.name", + "support.variable" + ], + "settings": { + "foreground": "#9CDCFE" + } + }, + { + "name": "Object keys, TS grammar specific", + "scope": [ + "meta.object-literal.key" + ], + "settings": { + "foreground": "#9CDCFE" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#CE9178" + } + }, + { + "name": "HC Search Editor context line override", + "scope": "meta.resultLinePrefix.contextLinePrefix.search", + "settings": { + "foreground": "#CBEDCB" + } + } + ], + "semanticHighlighting": true, + "semanticTokenColors": { + "newOperator": "#FFFFFF", + "stringLiteral": "#ce9178", + "customLiteral": "#DCDCAA", + "numberLiteral": "#b5cea8" + } +} diff --git a/extensions/vscode/builtin-themes/hc_light.json b/extensions/vscode/builtin-themes/hc_light.json new file mode 100644 index 000000000..460f26ad7 --- /dev/null +++ b/extensions/vscode/builtin-themes/hc_light.json @@ -0,0 +1,573 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Light High Contrast", + "tokenColors": [ + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#292929" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#062F4A" + } + }, + { + "scope": "comment", + "settings": { + "foreground": "#515151" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": [ + "constant.numeric", + "variable.other.enummember", + "keyword.operator.plus.exponent", + "keyword.operator.minus.exponent" + ], + "settings": { + "foreground": "#096d48" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#811F3F" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#264F78" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "source.css entity.other.attribute-name.class", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.parent.less", + "source.css entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element.css", + "source.css.less entity.other.attribute-name.id", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#B5200D" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "foreground": "#000080", + "fontStyle": "bold" + } + }, + { + "scope": "markup.heading", + "settings": { + "foreground": "#0F4A85", + "fontStyle": "bold" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#096d48" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#5A5A5A" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": [ + "punctuation.definition.quote.begin.markdown", + "punctuation.definition.list.begin.markdown" + ], + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": ["meta.preprocessor", "entity.name.function.preprocessor"], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#b5200d" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#096d48" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": ["storage.modifier", "keyword.operator.noexcept"], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": ["string", "meta.embedded.assembly"], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": [ + "string.comment.buffered.block.pug", + "string.quoted.pug", + "string.interpolated.pug", + "string.unquoted.plain.in.yaml", + "string.unquoted.plain.out.yaml", + "string.unquoted.block.yaml", + "string.quoted.single.yaml", + "string.quoted.double.xml", + "string.quoted.single.xml", + "string.unquoted.cdata.xml", + "string.quoted.double.html", + "string.quoted.single.html", + "string.unquoted.html", + "string.quoted.single.handlebars", + "string.quoted.double.handlebars" + ], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#811F3F" + } + }, + { + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": ["meta.template.expression"], + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "source.css variable", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#264F78" + } + }, + { + "scope": ["support.type.property-name.json"], + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.alignof", + "keyword.operator.typeid", + "keyword.operator.alignas", + "keyword.operator.instanceof", + "keyword.operator.logical.python", + "keyword.operator.wordlike" + ], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#096d48" + } + }, + { + "scope": [ + "punctuation.section.embedded.begin.php", + "punctuation.section.embedded.end.php" + ], + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#096d48" + } + }, + { + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], + "settings": { + "foreground": "#000000" + } + }, + { + "scope": "variable.language", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": [ + "entity.name.function", + "support.function", + "support.constant.handlebars", + "source.powershell variable.other.member", + "entity.name.operator.custom-literal" + ], + "settings": { + "foreground": "#5e2cbc" + } + }, + { + "scope": [ + "support.class", + "support.type", + "entity.name.type", + "entity.name.namespace", + "entity.other.attribute", + "entity.name.scope-resolution", + "entity.name.class", + "storage.type.numeric.go", + "storage.type.byte.go", + "storage.type.boolean.go", + "storage.type.string.go", + "storage.type.uintptr.go", + "storage.type.error.go", + "storage.type.rune.go", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" + ], + "settings": { + "foreground": "#185E73" + } + }, + { + "scope": [ + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#185E73" + } + }, + { + "scope": [ + "keyword.control", + "source.cpp keyword.operator.new", + "source.cpp keyword.operator.delete", + "keyword.other.using", + "keyword.other.directive.using", + "keyword.other.operator", + "entity.name.operator" + ], + "settings": { + "foreground": "#b5200d" + } + }, + { + "scope": [ + "variable", + "meta.definition.variable.name", + "support.variable", + "entity.name.variable", + "constant.other.placeholder" + ], + "settings": { + "foreground": "#001080" + } + }, + { + "scope": ["variable.other.constant", "variable.other.enummember"], + "settings": { + "foreground": "#02715D" + } + }, + { + "scope": ["meta.object-literal.key"], + "settings": { + "foreground": "#001080" + } + }, + { + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#0451A5" + } + }, + { + "scope": [ + "punctuation.definition.group.regexp", + "punctuation.definition.group.assertion.regexp", + "punctuation.definition.character-class.regexp", + "punctuation.character.set.begin.regexp", + "punctuation.character.set.end.regexp", + "keyword.operator.negation.regexp", + "support.other.parenthesis.regexp" + ], + "settings": { + "foreground": "#D16969" + } + }, + { + "scope": [ + "constant.character.character-class.regexp", + "constant.other.character-class.set.regexp", + "constant.other.character-class.regexp", + "constant.character.set.regexp" + ], + "settings": { + "foreground": "#811F3F" + } + }, + { + "scope": "keyword.operator.quantifier.regexp", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"], + "settings": { + "foreground": "#EE0000" + } + }, + { + "scope": "constant.character", + "settings": { + "foreground": "#0F4A85" + } + }, + { + "scope": "constant.character.escape", + "settings": { + "foreground": "#EE0000" + } + }, + { + "scope": "entity.name.label", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#316BCD" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#CD9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#CD3131" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#800080" + } + } + ], + "colors": { + "actionBar.toggledBackground": "#dddddd" + } +} diff --git a/extensions/vscode/builtin-themes/light_modern.json b/extensions/vscode/builtin-themes/light_modern.json new file mode 100644 index 000000000..c8f37deb7 --- /dev/null +++ b/extensions/vscode/builtin-themes/light_modern.json @@ -0,0 +1,145 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Default Light Modern", + "include": "./light_plus.json", + "colors": { + "activityBar.activeBorder": "#005FB8", + "activityBar.background": "#F8F8F8", + "activityBar.border": "#E5E5E5", + "activityBar.foreground": "#1F1F1F", + "activityBar.inactiveForeground": "#616161", + "activityBarBadge.background": "#005FB8", + "activityBarBadge.foreground": "#FFFFFF", + "badge.background": "#CCCCCC", + "badge.foreground": "#3B3B3B", + "button.background": "#005FB8", + "button.border": "#0000001a", + "button.foreground": "#FFFFFF", + "button.hoverBackground": "#0258A8", + "button.secondaryBackground": "#E5E5E5", + "button.secondaryForeground": "#3B3B3B", + "button.secondaryHoverBackground": "#CCCCCC", + "chat.slashCommandBackground": "#D2ECFF", + "chat.slashCommandForeground": "#306CA2", + "checkbox.background": "#F8F8F8", + "checkbox.border": "#CECECE", + "descriptionForeground": "#3B3B3B", + "dropdown.background": "#FFFFFF", + "dropdown.border": "#CECECE", + "dropdown.foreground": "#3B3B3B", + "dropdown.listBackground": "#FFFFFF", + "editor.background": "#FFFFFF", + "editor.foreground": "#3B3B3B", + "editor.inactiveSelectionBackground": "#E5EBF1", + "editor.selectionHighlightBackground": "#ADD6FF80", + "editorGroup.border": "#E5E5E5", + "editorGroupHeader.tabsBackground": "#F8F8F8", + "editorGroupHeader.tabsBorder": "#E5E5E5", + "editorGutter.addedBackground": "#2EA043", + "editorGutter.deletedBackground": "#F85149", + "editorGutter.modifiedBackground": "#005FB8", + "editorIndentGuide.background1": "#D3D3D3", + "editorLineNumber.activeForeground": "#171184", + "editorLineNumber.foreground": "#6E7681", + "editorOverviewRuler.border": "#E5E5E5", + "editorSuggestWidget.background": "#F8F8F8", + "editorWidget.background": "#F8F8F8", + "errorForeground": "#F85149", + "focusBorder": "#005FB8", + "foreground": "#3B3B3B", + "icon.foreground": "#3B3B3B", + "input.background": "#FFFFFF", + "input.border": "#CECECE", + "input.foreground": "#3B3B3B", + "input.placeholderForeground": "#767676", + "inputOption.activeBackground": "#BED6ED", + "inputOption.activeBorder": "#005FB8", + "inputOption.activeForeground": "#000000", + "keybindingLabel.foreground": "#3B3B3B", + "list.activeSelectionBackground": "#E8E8E8", + "list.activeSelectionForeground": "#000000", + "list.activeSelectionIconForeground": "#000000", + "list.hoverBackground": "#F2F2F2", + "list.focusAndSelectionOutline": "#005FB8", + "menu.border": "#CECECE", + "notebook.cellBorderColor": "#E5E5E5", + "notebook.selectedCellBackground": "#C8DDF150", + "notificationCenterHeader.background": "#FFFFFF", + "notificationCenterHeader.foreground": "#3B3B3B", + "notifications.background": "#FFFFFF", + "notifications.border": "#E5E5E5", + "notifications.foreground": "#3B3B3B", + "panel.background": "#F8F8F8", + "panel.border": "#E5E5E5", + "panelInput.border": "#E5E5E5", + "panelTitle.activeBorder": "#005FB8", + "panelTitle.activeForeground": "#3B3B3B", + "panelTitle.inactiveForeground": "#3B3B3B", + "peekViewEditor.matchHighlightBackground": "#BB800966", + "peekViewResult.background": "#FFFFFF", + "peekViewResult.matchHighlightBackground": "#BB800966", + "pickerGroup.border": "#E5E5E5", + "pickerGroup.foreground": "#8B949E", + "ports.iconRunningProcessForeground": "#369432", + "progressBar.background": "#005FB8", + "quickInput.background": "#F8F8F8", + "quickInput.foreground": "#3B3B3B", + "searchEditor.textInputBorder": "#CECECE", + "settings.dropdownBackground": "#FFFFFF", + "settings.dropdownBorder": "#CECECE", + "settings.headerForeground": "#1F1F1F", + "settings.modifiedItemIndicator": "#BB800966", + "settings.numberInputBorder": "#CECECE", + "settings.textInputBorder": "#CECECE", + "sideBar.background": "#F8F8F8", + "sideBar.border": "#E5E5E5", + "sideBar.foreground": "#3B3B3B", + "sideBarSectionHeader.background": "#F8F8F8", + "sideBarSectionHeader.border": "#E5E5E5", + "sideBarSectionHeader.foreground": "#3B3B3B", + "sideBarTitle.foreground": "#3B3B3B", + "statusBar.background": "#F8F8F8", + "statusBar.foreground": "#3B3B3B", + "statusBar.border": "#E5E5E5", + "statusBar.debuggingBackground": "#FD716C", + "statusBar.debuggingForeground": "#000000", + "statusBar.focusBorder": "#005FB8", + "statusBar.noFolderBackground": "#F8F8F8", + "statusBarItem.errorBackground": "#C72E0F", + "statusBarItem.focusBorder": "#005FB8", + "statusBarItem.prominentBackground": "#6E768166", + "statusBarItem.remoteBackground": "#005FB8", + "statusBarItem.remoteForeground": "#FFFFFF", + "tab.activeBackground": "#FFFFFF", + "tab.activeBorder": "#F8F8F8", + "tab.activeBorderTop": "#005FB8", + "tab.activeForeground": "#3B3B3B", + "tab.border": "#E5E5E5", + "tab.hoverBackground": "#FFFFFF", + "tab.inactiveBackground": "#F8F8F8", + "tab.inactiveForeground": "#868686", + "tab.lastPinnedBorder": "#D4D4D4", + "tab.unfocusedActiveBorder": "#F8F8F8", + "tab.unfocusedActiveBorderTop": "#E5E5E5", + "tab.unfocusedHoverBackground": "#F8F8F8", + "terminalCursor.foreground": "#005FB8", + "terminal.foreground": "#3B3B3B", + "terminal.inactiveSelectionBackground": "#E5EBF1", + "terminal.tab.activeBorder": "#005FB8", + "textBlockQuote.background": "#F8F8F8", + "textBlockQuote.border": "#E5E5E5", + "textCodeBlock.background": "#F8F8F8", + "textLink.activeForeground": "#005FB8", + "textLink.foreground": "#005FB8", + "textPreformat.foreground": "#3B3B3B", + "textPreformat.background": "#0000001F", + "textSeparator.foreground": "#21262D", + "titleBar.activeBackground": "#F8F8F8", + "titleBar.activeForeground": "#1E1E1E", + "titleBar.border": "#E5E5E5", + "titleBar.inactiveBackground": "#F8F8F8", + "titleBar.inactiveForeground": "#8B949E", + "welcomePage.tileBackground": "#F3F3F3", + "widget.border": "#E5E5E5" + } +} diff --git a/extensions/vscode/builtin-themes/light_plus.json b/extensions/vscode/builtin-themes/light_plus.json new file mode 100644 index 000000000..cb7fb77fa --- /dev/null +++ b/extensions/vscode/builtin-themes/light_plus.json @@ -0,0 +1,194 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Light+", + "include": "./light_vs.json", + "tokenColors": [ + { + "name": "Function declarations", + "scope": [ + "entity.name.function", + "support.function", + "support.constant.handlebars", + "source.powershell variable.other.member", + "entity.name.operator.custom-literal" + ], + "settings": { + "foreground": "#795E26" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "support.class", + "support.type", + "entity.name.type", + "entity.name.namespace", + "entity.other.attribute", + "entity.name.scope-resolution", + "entity.name.class", + "storage.type.numeric.go", + "storage.type.byte.go", + "storage.type.boolean.go", + "storage.type.string.go", + "storage.type.uintptr.go", + "storage.type.error.go", + "storage.type.rune.go", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" + ], + "settings": { + "foreground": "#267f99" + } + }, + { + "name": "Types declaration and references, TS grammar specific", + "scope": [ + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#267f99" + } + }, + { + "name": "Control flow / Special keywords", + "scope": [ + "keyword.control", + "source.cpp keyword.operator.new", + "source.cpp keyword.operator.delete", + "keyword.other.using", + "keyword.other.directive.using", + "keyword.other.operator", + "entity.name.operator" + ], + "settings": { + "foreground": "#AF00DB" + } + }, + { + "name": "Variable and parameter name", + "scope": [ + "variable", + "meta.definition.variable.name", + "support.variable", + "entity.name.variable", + "constant.other.placeholder" + ], + "settings": { + "foreground": "#001080" + } + }, + { + "name": "Constants and enums", + "scope": ["variable.other.constant", "variable.other.enummember"], + "settings": { + "foreground": "#0070C1" + } + }, + { + "name": "Object keys, TS grammar specific", + "scope": ["meta.object-literal.key"], + "settings": { + "foreground": "#001080" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#0451a5" + } + }, + { + "name": "Regular expression groups", + "scope": [ + "punctuation.definition.group.regexp", + "punctuation.definition.group.assertion.regexp", + "punctuation.definition.character-class.regexp", + "punctuation.character.set.begin.regexp", + "punctuation.character.set.end.regexp", + "keyword.operator.negation.regexp", + "support.other.parenthesis.regexp" + ], + "settings": { + "foreground": "#d16969" + } + }, + { + "scope": [ + "constant.character.character-class.regexp", + "constant.other.character-class.set.regexp", + "constant.other.character-class.regexp", + "constant.character.set.regexp" + ], + "settings": { + "foreground": "#811f3f" + } + }, + { + "scope": "keyword.operator.quantifier.regexp", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"], + "settings": { + "foreground": "#EE0000" + } + }, + { + "scope": ["constant.character", "constant.other.option"], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "constant.character.escape", + "settings": { + "foreground": "#EE0000" + } + }, + { + "scope": "entity.name.label", + "settings": { + "foreground": "#000000" + } + } + ], + "semanticHighlighting": true, + "semanticTokenColors": { + "newOperator": "#AF00DB", + "stringLiteral": "#a31515", + "customLiteral": "#795E26", + "numberLiteral": "#098658" + } +} diff --git a/extensions/vscode/builtin-themes/light_vs.json b/extensions/vscode/builtin-themes/light_vs.json new file mode 100644 index 000000000..ac4365aec --- /dev/null +++ b/extensions/vscode/builtin-themes/light_vs.json @@ -0,0 +1,422 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "Light (Visual Studio)", + "colors": { + "checkbox.border": "#919191", + "editor.background": "#FFFFFF", + "editor.foreground": "#000000", + "editor.inactiveSelectionBackground": "#E5EBF1", + "editorIndentGuide.background1": "#D3D3D3", + "editorIndentGuide.activeBackground1": "#939393", + "editor.selectionHighlightBackground": "#ADD6FF80", + "editorSuggestWidget.background": "#F3F3F3", + "activityBarBadge.background": "#007ACC", + "sideBarTitle.foreground": "#6F6F6F", + "list.hoverBackground": "#E8E8E8", + "menu.border": "#D4D4D4", + "input.placeholderForeground": "#767676", + "searchEditor.textInputBorder": "#CECECE", + "settings.textInputBorder": "#CECECE", + "settings.numberInputBorder": "#CECECE", + "statusBarItem.remoteForeground": "#FFF", + "statusBarItem.remoteBackground": "#16825D", + "ports.iconRunningProcessForeground": "#369432", + "sideBarSectionHeader.background": "#0000", + "sideBarSectionHeader.border": "#61616130", + "tab.lastPinnedBorder": "#61616130", + "notebook.cellBorderColor": "#E8E8E8", + "notebook.selectedCellBackground": "#c8ddf150", + "statusBarItem.errorBackground": "#c72e0f", + "list.activeSelectionIconForeground": "#FFF", + "list.focusAndSelectionOutline": "#90C2F9", + "terminal.inactiveSelectionBackground": "#E5EBF1", + "widget.border": "#d4d4d4", + "actionBar.toggledBackground": "#dddddd", + "diffEditor.unchangedRegionBackground": "#f8f8f8" + }, + "tokenColors": [ + { + "scope": [ + "meta.embedded", + "source.groovy.embedded", + "string meta.image.inline.markdown", + "variable.legacy.builtin.python" + ], + "settings": { + "foreground": "#000000ff" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#000080" + } + }, + { + "scope": "comment", + "settings": { + "foreground": "#008000" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": [ + "constant.numeric", + "variable.other.enummember", + "keyword.operator.plus.exponent", + "keyword.operator.minus.exponent" + ], + "settings": { + "foreground": "#098658" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#811f3f" + } + }, + { + "name": "css tags in selectors, xml tags", + "scope": "entity.name.tag", + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "entity.name.selector", + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#e50000" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "source.css entity.other.attribute-name.class", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.parent.less", + "source.css entity.other.attribute-name.pseudo-class", + "entity.other.attribute-name.pseudo-element.css", + "source.css.less entity.other.attribute-name.id", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#cd3131" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#000080" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#800000" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#098658" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#a31515" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": [ + "punctuation.definition.quote.begin.markdown", + "punctuation.definition.list.begin.markdown" + ], + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#800000" + } + }, + { + "name": "brackets of XML/HTML tags", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#800000" + } + }, + { + "scope": ["meta.preprocessor", "entity.name.function.preprocessor"], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#a31515" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#098658" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": ["storage.modifier", "keyword.operator.noexcept"], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": ["string", "meta.embedded.assembly"], + "settings": { + "foreground": "#a31515" + } + }, + { + "scope": [ + "string.comment.buffered.block.pug", + "string.quoted.pug", + "string.interpolated.pug", + "string.unquoted.plain.in.yaml", + "string.unquoted.plain.out.yaml", + "string.unquoted.block.yaml", + "string.quoted.single.yaml", + "string.quoted.double.xml", + "string.quoted.single.xml", + "string.unquoted.cdata.xml", + "string.quoted.double.html", + "string.quoted.single.html", + "string.unquoted.html", + "string.quoted.single.handlebars", + "string.quoted.double.handlebars" + ], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#811f3f" + } + }, + { + "name": "String interpolation", + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#0000ff" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": ["meta.template.expression"], + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "source.css variable", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#e50000" + } + }, + { + "scope": ["support.type.property-name.json"], + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#000000" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.alignof", + "keyword.operator.typeid", + "keyword.operator.alignas", + "keyword.operator.instanceof", + "keyword.operator.logical.python", + "keyword.operator.wordlike" + ], + "settings": { + "foreground": "#0000ff" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#098658" + } + }, + { + "scope": [ + "punctuation.section.embedded.begin.php", + "punctuation.section.embedded.end.php" + ], + "settings": { + "foreground": "#800000" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#0451a5" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#098658" + } + }, + { + "name": "coloring of the Java import and package identifiers", + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], + "settings": { + "foreground": "#000000" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#0000ff" + } + } + ], + "semanticHighlighting": true, + "semanticTokenColors": { + "newOperator": "#0000ff", + "stringLiteral": "#a31515", + "customLiteral": "#000000", + "numberLiteral": "#098658" + } +} diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index f3f195695..a4f4ee7fd 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.53", + "version": "0.9.56", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.53", + "version": "0.9.56", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 102adfee0..74e31b4ee 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.53", + "version": "0.9.56", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" diff --git a/extensions/vscode/src/util/getTheme.ts b/extensions/vscode/src/util/getTheme.ts index 0f8ac2961..81a0ad909 100644 --- a/extensions/vscode/src/util/getTheme.ts +++ b/extensions/vscode/src/util/getTheme.ts @@ -1,17 +1,45 @@ +import mergeJson from "core/util/merge"; import * as fs from "fs"; import { convertTheme } from "monaco-vscode-textmate-theme-converter/lib/cjs"; import * as path from "path"; import * as vscode from "vscode"; +import { getExtensionUri } from "./vscode"; + +const builtinThemes: any = { + "Default Dark Modern": "dark_modern", + "Dark+": "dark_plus", + "Default Dark+": "dark_plus", + "Dark (Visual Studio)": "dark_vs", + "Visual Studio Dark": "dark_vs", + "Dark High Contrast": "hc_black", + "Default High Contrast": "hc_black", + "Light High Contrast": "hc_light", + "Default High Contrast Light": "hc_light", + "Default Light Modern": "light_modern", + "Light+": "light_plus", + "Default Light+": "light_plus", + "Light (Visual Studio)": "light_vs", + "Visual Studio Light": "light_vs", +}; + +function parseThemeString(themeString: string | undefined): any { + themeString = themeString + ?.split("\n") + .filter((line) => { + return !line.trim().startsWith("//"); + }) + .join("\n"); + return JSON.parse(themeString || "{}"); +} export function getTheme() { let currentTheme = undefined; + const colorTheme = + vscode.workspace.getConfiguration("workbench").get("colorTheme") || + "Default Dark Modern"; try { // Pass color theme to webview for syntax highlighting - const colorTheme = vscode.workspace - .getConfiguration("workbench") - .get("colorTheme"); - for (let i = vscode.extensions.all.length - 1; i >= 0; i--) { if (currentTheme) { break; @@ -28,19 +56,41 @@ export function getTheme() { } } - // Strip comments from theme - currentTheme = currentTheme - ?.split("\n") - .filter((line) => { - return !line.trim().startsWith("//"); - }) - .join("\n"); + if (currentTheme === undefined && builtinThemes[colorTheme]) { + const filename = builtinThemes[colorTheme] + ".json"; + currentTheme = fs + .readFileSync( + path.join(getExtensionUri().fsPath, "builtin-themes", filename) + ) + .toString(); + } - const converted = convertTheme(JSON.parse(currentTheme || "{}")); + // Strip comments from theme + let parsed = parseThemeString(currentTheme); + + if (parsed.include) { + const includeThemeString = fs + .readFileSync( + path.join(getExtensionUri().fsPath, "builtin-themes", parsed.include) + ) + .toString(); + const includeTheme = parseThemeString(includeThemeString); + parsed = mergeJson(parsed, includeTheme); + } + + const converted = convertTheme(parsed); + + converted.base = ( + ["vs", "hc-black"].includes(converted.base) + ? converted.base + : colorTheme.includes("Light") + ? "vs" + : "vs-dark" + ) as any; return converted; } catch (e) { - console.log("Error adding .continueignore file icon: ", e); + console.log("Error loading color theme: ", e); } return undefined; } diff --git a/gui/package-lock.json b/gui/package-lock.json index 70890bcbc..d49c6b1c0 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -23,11 +23,9 @@ "core": "file:../core", "dompurify": "^3.0.6", "downshift": "^7.6.0", + "hast-util-select": "^6.0.2", "lodash": "^4.17.21", "minisearch": "^6.3.0", - "monaco-editor-textmate": "^4.0.0", - "monaco-textmate": "^3.0.1", - "monaco-vscode-textmate-theme-converter": "^0.1.7", "onigasm": "^2.2.5", "posthog-js": "^1.58.0", "prismjs": "^1.29.0", @@ -36,7 +34,6 @@ "react-error-boundary": "^4.0.11", "react-hook-form": "^7.47.0", "react-markdown": "^9.0.1", - "react-monaco-editor": "^0.55.0", "react-redux": "^8.0.5", "react-remark": "^2.1.0", "react-router-dom": "^6.14.2", @@ -45,7 +42,9 @@ "react-tooltip": "^5.18.0", "redux-persist": "^6.0.0", "redux-persist-transform-filter": "^0.0.22", + "rehype-highlight": "^7.0.0", "rehype-katex": "^7.0.0", + "rehype-rewrite": "^4.0.2", "rehype-wrap-all": "^1.1.0", "remark-math": "^6.0.0", "seti-file-icons": "^0.0.8", @@ -69,8 +68,7 @@ "postcss": "^8.4.21", "tailwindcss": "^3.2.7", "typescript": "^4.9.3", - "vite": "^4.1.0", - "vite-plugin-monaco-editor": "^1.1.0" + "vite": "^4.1.0" } }, "../core": { @@ -1348,9 +1346,9 @@ } }, "node_modules/@tiptap/core": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.2.1.tgz", - "integrity": "sha512-9G6N2d5q4M5i/elK61qu28uO5MBDKEbStQnHuVKNe+LVNpb6xZal1AcIilmq1FVeuCUh3kYl3cFH3nBQOXtZUw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.2.2.tgz", + "integrity": "sha512-fec26LtNgYFGhKzEA9+Of+qLKIKUxDL/XZQofoPcxP71NffcmpZ+ZjAx9NjnvuYtvylUSySZiPauY6WhN3aprw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1360,9 +1358,9 @@ } }, "node_modules/@tiptap/extension-blockquote": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.2.1.tgz", - "integrity": "sha512-KfL7c28ueH8yKTkZiO9LlErAVjZyi5j+Kw42pu06aOrXWNH6TW8CSufR6UB2XZcFX6Sixi2qYpwxs1YNnItmcg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.2.2.tgz", + "integrity": "sha512-ENCGx/yhNdUQ0epGOeTN4HFeUSfQDK2CQBy2szkQVtzG/Vhv8ExxBWTxHJcMoeSfEVmKag4B506vfRkKH24IMA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1372,9 +1370,9 @@ } }, "node_modules/@tiptap/extension-bold": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.2.1.tgz", - "integrity": "sha512-MSFbbrUG0hErM9sUmJenGPRBjQV/HfcLf7kqpxduPoxA4r2XOsbUKGSbPEQ3vU3vMi9Obkknt0JLnS5WofIIGw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.2.2.tgz", + "integrity": "sha512-8/KLpPHwO+GXlWsXEION7ppLfFIaSpnw5m2QYXz/LGRK32hzpTavbdXV3rx9+Vu+7Z+0yQF9G/ro1z9dqTQHpw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1384,9 +1382,9 @@ } }, "node_modules/@tiptap/extension-bubble-menu": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.2.1.tgz", - "integrity": "sha512-FQO1CDS777E34T8jwnYDBz3VmGyVzv3Olj0o01c3fHR7OSnA7urAxx+z9Z4CWqUJhRMV9td0v0wiZjQ4q1DdYw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.2.2.tgz", + "integrity": "sha512-W3OvoHxgBdQSrlX8FXvIs5wA+eHXe/0jGsqQdwLXPtqZOSR4Ks9OLmxDk2+O8ci0KCLPb6/doJYg7j/8Ic4KRg==", "dependencies": { "tippy.js": "^6.3.7" }, @@ -1400,9 +1398,9 @@ } }, "node_modules/@tiptap/extension-bullet-list": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.2.1.tgz", - "integrity": "sha512-MvMQRykJUdIocLNmilHO8smbttWwuXUGlnlW+DpIAK7DNih3aHjdFlRbixPqVQLicFMiI5+ixw+EM1ZQr0S59A==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.2.2.tgz", + "integrity": "sha512-mZznxwymWitQRHYxEN8LX7theJdQ1/O6kUsvwDyHw42+jaCsZumTHEWGckBwkxk3BWWKbrkRGv/cC78sa3cNJw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1412,9 +1410,9 @@ } }, "node_modules/@tiptap/extension-code": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.2.1.tgz", - "integrity": "sha512-nRYeiw9MtV6x3klcQd2X3fJ7r8J1Zy+KHTvfJFYsK8SacSVl+tYi8/FsjbmzGmnO3NYUlDzdyPq/woT+cKk20Q==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.2.2.tgz", + "integrity": "sha512-CHMHK76fGFrY3TpsyNmPB393VvRgjnvLVOfc0Qx4KKEkntDQ1v2jg90XupLf0+H0aq0KQBHlSooW0Bh+7SxbmQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1424,9 +1422,9 @@ } }, "node_modules/@tiptap/extension-code-block": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.2.1.tgz", - "integrity": "sha512-8Urq8OvdBXDs8cX7Tgw71uyHQknqOeEgU0w4PvhFlOnDKUyehiUGys86k/NUJwP2P9O+YGToM3sVJF0ONdlNGQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.2.2.tgz", + "integrity": "sha512-CKn4xqhpCfwkVdkj//A+LVf0hFrRkBbDx8u3KG+I7cegjXxvDSqb2OGhn/tXpFatLAE50GJiPIvqf+TmhIWBvA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1437,9 +1435,9 @@ } }, "node_modules/@tiptap/extension-document": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-2.2.1.tgz", - "integrity": "sha512-Pb0jSY6wYSKd8fgDotKiQN3mc4dKLWVq0IzYOpBGTLn+37WmyPzWCnA1vWjp81u2XRXvr3gFQBEa+zYXonG//w==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-2.2.2.tgz", + "integrity": "sha512-eUhpYq8ErVAlxuTg5wslc96mniEQs+VN+tFmRrx9Q0n0nG/aDKUQFDgcSMpAMpHK7+h7tGc/rDq+ydpzZhFXlQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1449,9 +1447,9 @@ } }, "node_modules/@tiptap/extension-dropcursor": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.2.1.tgz", - "integrity": "sha512-Y9MmqRv0MMzhy8efVvHV1zAwr4oEiodggYOLC8Vav0IubWXqd8mVDCdz3DjEqGOdeR9Qy/zt4ohQlbkRno9twA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.2.2.tgz", + "integrity": "sha512-HxXEf6m+W3PnT63Ib49qAmcwmapZvmyWgq9cvB5kSfl/znQT04wBgShEigkgUBLqgcM/R/RI8NS1GQl1Zpv9iQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1462,9 +1460,9 @@ } }, "node_modules/@tiptap/extension-floating-menu": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.2.1.tgz", - "integrity": "sha512-2lQaEIUbexw8yCGDLxNqhCwpZMoclnDtAdObDKCgufLcA+tVSdVirfcx7HJZ4kmRXmUhdG3uvawQVchZJ7FGiw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.2.2.tgz", + "integrity": "sha512-DRz9kzcPt7S8s22EQC+KS/ghnHRV6j7Qequ+0kLjfLYPdqj2u4G5xTrFM7sWfzUqf2HdH8SS8Yo9WFMYm69D9w==", "dependencies": { "tippy.js": "^6.3.7" }, @@ -1478,9 +1476,9 @@ } }, "node_modules/@tiptap/extension-gapcursor": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.2.1.tgz", - "integrity": "sha512-/OCQDwa1/LwFVEFWCkU4dnUt4pGt1IJKOEzT2JETrRQB4VzP1flIpwPAy5tJ3i2abkCZtnEGOJ5ZsXC01LgOxg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.2.2.tgz", + "integrity": "sha512-qsE8yI9nZOLHg6XdFwn4BYMhR2f/50gppHJdsHx53575y2ci6uowMI+WjdEentl6yR9ctgV1jelHLs9ShmPzwQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1491,9 +1489,9 @@ } }, "node_modules/@tiptap/extension-hard-break": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.2.1.tgz", - "integrity": "sha512-wKRujmJlaBOv+PEnaUL2C9fEjiq1YDsm/SbHzAPYn/+8CRHOLrcJpUAq9rUo7u6+bEBD2PxbN1pPNrfS3QtPLw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.2.2.tgz", + "integrity": "sha512-zbG6/7xyMim2fnRESIx2FiFHjdY7BXKMe+GUgLGPnRfXrJqSZhdVguBrtYGBnBFCnuSiOZZ6rFy+k5uORGSrhA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1503,9 +1501,9 @@ } }, "node_modules/@tiptap/extension-heading": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.2.1.tgz", - "integrity": "sha512-BI14qTOWTcabvobSo8QBAXQqmz4vQ9HjInK9btKEAJ027BHFk08n6YoovQDcTH5Z2nvwPN4N3RW0JupmgwflAQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.2.2.tgz", + "integrity": "sha512-oCd8VsLnrqJFY+lgA+5I/2EjBa4mQzB5DFLzCI460PfZnQJ2DmaNUdpY38BpHUv8E2PbBXzxxWS9h88yycW6yw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1515,9 +1513,9 @@ } }, "node_modules/@tiptap/extension-history": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.2.1.tgz", - "integrity": "sha512-MZyIKWgNLzsEysyzWwsUE705+x4GRuLluS5cWGzZ/CKjSEUO152DVlM50MPpKqH+o1SW3cR7RUvDPJlpM7Lymw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.2.2.tgz", + "integrity": "sha512-hcCEh7mP5H38ZY3YtbyyUOTNfKWAvITkJhVqjKbrRI3E+FOlG3pWPH3wz4srW5bHK38oUsiKwyP9FqC3C2Mixg==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1528,9 +1526,9 @@ } }, "node_modules/@tiptap/extension-horizontal-rule": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.2.1.tgz", - "integrity": "sha512-M6mi6CPMeO/1i/0qqEIVbObB3VDT6HhO4cxvjiaWxRXsU+79kdvx33Mk6GHKuXZizAYN1qxeM7byAtFiRu/aIw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.2.2.tgz", + "integrity": "sha512-5hun56M9elO6slOoDH03q2of06KB1rX8MLvfiKpfAvjbhmuQJav20fz2MQ2lCunek0D8mUIySwhfMvBrTcd90A==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1541,9 +1539,9 @@ } }, "node_modules/@tiptap/extension-image": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.2.1.tgz", - "integrity": "sha512-Rbj3dwcAfmLmKgv6ymfLUWlpb5xS3W4Bl/xC9EKbTFvRG+OHJyDjKxUipjNlaycuhgO01i2N9Jftclg4ZVed+g==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.2.2.tgz", + "integrity": "sha512-fqZ2VB3K/c/Mi/2QTfav6CmTe33yGRkeQEivllSCCxgDD+kNYGto/P9maHSIJSG3RZWZHYfIPHmUJKfUlJRTXQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1553,9 +1551,9 @@ } }, "node_modules/@tiptap/extension-italic": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.2.1.tgz", - "integrity": "sha512-x3cWWgup7SZIq8ugfJ8IFpvOROwU0KuAZFJlSk9eL9Qszff2ZG8kPUuQ8HklSdmoafSluv0mUhDSFTc52E/Yzg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.2.2.tgz", + "integrity": "sha512-l9NZK4vYqYY9Y5UskLQpdbvi0sXG4I/MuhRxPdjitK8E3SVhZxMnoNwCTkq0+I1xBjCD/jSrDMV4FqkKesrl2w==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1565,9 +1563,9 @@ } }, "node_modules/@tiptap/extension-list-item": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.2.1.tgz", - "integrity": "sha512-6seOMXbji+ptW9OiOig8BVBxnGZhHgWEU6tmsMxsf61dt8b1CElf04oTbvn1hzkCjQQXJbsztU87Q7FLTfLE0w==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.2.2.tgz", + "integrity": "sha512-VuHlbhLePXvKTx55X0iIZ1EXARAoOf6lpbKJK8180jny2gpYxGhk7rwG1G8s6G6ZDST+kyVa04gncxz8F/z6oA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1577,9 +1575,9 @@ } }, "node_modules/@tiptap/extension-mention": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-mention/-/extension-mention-2.2.1.tgz", - "integrity": "sha512-6MIYlqHtjJSbKIKi8RvXZOGAHw/7Z+t+jTVy6QhYhVKyqcKsHBF5gNlFhsBEq/w6/iL3RKP3vSk5Jzyia5Ga+A==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-mention/-/extension-mention-2.2.2.tgz", + "integrity": "sha512-REmjd01kyoZryORdFbkdo+8E4ZHq1sPK6fePXo0+5LYEFnVGs9k2EvpENkZ94pzVZgV6V1K6s8oEQAxSy45oOQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1591,9 +1589,9 @@ } }, "node_modules/@tiptap/extension-ordered-list": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.2.1.tgz", - "integrity": "sha512-6OcdBALgYnj/TKSV+ouT202U1ydJGenGL9ofhpdogC1scE0oMaR25f1T9k7RMUGAv+7FNIcVZp2+bf1SLCTX1A==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.2.2.tgz", + "integrity": "sha512-TgG+mJyQB5CfeqCD65B9CLesl2IQTjc7tAKm8ZxRzF80GrCrmWNnoXi424TWmSF6cUV/4TY0G5dTkc9kB+S2tw==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1603,9 +1601,9 @@ } }, "node_modules/@tiptap/extension-paragraph": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.2.1.tgz", - "integrity": "sha512-SaSnWml4DTzG9kTEq/diL6XQGSgNaZJPOIGTPL2/1idHrx4/JrZ87VIbChJwVqbDuAvAxbidAqxKJuYObSzhhg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.2.2.tgz", + "integrity": "sha512-USTzajni/hsQXsBF0Lbw++FyPJKCDlROyaKbZi77QQoUsU2MbJIka7k4tGc0kwyTB04aAl+E6+0iS4xIhC3rug==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1615,9 +1613,9 @@ } }, "node_modules/@tiptap/extension-placeholder": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-2.2.1.tgz", - "integrity": "sha512-QEUEhzvUOLRjdvzm45CGNqdzqNalKjYgnkmdiNr7HPsmXJ+Teoe/dP7HTo2ssGRqkziE9OJrDRu12kCr+H73MQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-2.2.2.tgz", + "integrity": "sha512-dPN15nVu+HlONJSCiKjEl9n5/61CltTLSefhyRVQJeE7lmtMUGrsErUdOYMxGskehDQWIQW1VM0OiF63ln/3sA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1628,9 +1626,9 @@ } }, "node_modules/@tiptap/extension-strike": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.2.1.tgz", - "integrity": "sha512-4XntI9CLteDeu1ZBWqTygiuut2mJbS5E6SxDD0LZ6EtXM1LdTkh5xhDdviErsqlAe1PUtrFcGUAfdyMOdp26uQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.2.2.tgz", + "integrity": "sha512-0wsqiZPatw9QrK3DJ1jCMukenc8DRQtEXo4/dQjtnzNDhe7ZySed6kPpGO9A4lASG7NV7GmYZ/k5iEELr+iE6Q==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1640,9 +1638,9 @@ } }, "node_modules/@tiptap/extension-text": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.2.1.tgz", - "integrity": "sha512-1zjPuGyhLIODsYpCYeRSUgzfzdzk5uSo8PsV/WaF75ouilJYE3QvMQegivkuNmPBLz0nukPkOcXfQUI/D8wNOA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.2.2.tgz", + "integrity": "sha512-Zj53Vp/9MSQj5uiaObFaD3y7grUpMy+PfHmrK5XAZSFhRx+QpGUp+oItlKod6IJEIu8rq4dChgE7i6kT9uwWlA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1652,9 +1650,9 @@ } }, "node_modules/@tiptap/pm": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.2.1.tgz", - "integrity": "sha512-jfbrvUlDZ5t6zgk7pXT6GtHX7v48PL6K9TfDEzROywJS2iXSt/0iHUi2Ap8u8hvfv4rBDO7m7LVLS0+rRa5Cyg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.2.2.tgz", + "integrity": "sha512-TcUxqevVcqLYOcbAGlmvZfOB5LL5zZmb6jxSHyevl41SRpGZLe9Jt0e1v98jS0o9GMS7nvcTK/scYQu9e0HqTA==", "dependencies": { "prosemirror-changeset": "^2.2.1", "prosemirror-collab": "^1.3.1", @@ -1681,12 +1679,12 @@ } }, "node_modules/@tiptap/react": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/react/-/react-2.2.1.tgz", - "integrity": "sha512-bKrW38l1mezJDAjQzDTOAXu0RFjNkGl7QR0n0tYjLsOinlUjNIKFAmOe9+Qy/bxvfsQWlPDOSSGjRYafe5zvVA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/react/-/react-2.2.2.tgz", + "integrity": "sha512-9jRaY7Clrtb23itFyTGgLEo5SO0shR/kxlFN3G6Wyda6S6SduY9ERX93ffRdvzbJKcbEptcko0KqUZ/MD0eDnA==", "dependencies": { - "@tiptap/extension-bubble-menu": "^2.2.1", - "@tiptap/extension-floating-menu": "^2.2.1" + "@tiptap/extension-bubble-menu": "^2.2.2", + "@tiptap/extension-floating-menu": "^2.2.2" }, "funding": { "type": "github", @@ -1700,29 +1698,29 @@ } }, "node_modules/@tiptap/starter-kit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.2.1.tgz", - "integrity": "sha512-x6Xm5KnecorskpCSdDxaPDU2kSB4cWCy/DCEANbOrVyj1ukg8mEnVPkW6/v4LzqJHZb0Ah9rKVOQw9oOeoFb9A==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.2.2.tgz", + "integrity": "sha512-J8nbrVBggGJwO7CPEwdUqG6Q8btiQJjjnYWZEs+ImM9GMUfXJ8lyaGT0My3wDvTeq537N9BjTEcQ88pMtOqbOw==", "dependencies": { - "@tiptap/core": "^2.2.1", - "@tiptap/extension-blockquote": "^2.2.1", - "@tiptap/extension-bold": "^2.2.1", - "@tiptap/extension-bullet-list": "^2.2.1", - "@tiptap/extension-code": "^2.2.1", - "@tiptap/extension-code-block": "^2.2.1", - "@tiptap/extension-document": "^2.2.1", - "@tiptap/extension-dropcursor": "^2.2.1", - "@tiptap/extension-gapcursor": "^2.2.1", - "@tiptap/extension-hard-break": "^2.2.1", - "@tiptap/extension-heading": "^2.2.1", - "@tiptap/extension-history": "^2.2.1", - "@tiptap/extension-horizontal-rule": "^2.2.1", - "@tiptap/extension-italic": "^2.2.1", - "@tiptap/extension-list-item": "^2.2.1", - "@tiptap/extension-ordered-list": "^2.2.1", - "@tiptap/extension-paragraph": "^2.2.1", - "@tiptap/extension-strike": "^2.2.1", - "@tiptap/extension-text": "^2.2.1" + "@tiptap/core": "^2.2.2", + "@tiptap/extension-blockquote": "^2.2.2", + "@tiptap/extension-bold": "^2.2.2", + "@tiptap/extension-bullet-list": "^2.2.2", + "@tiptap/extension-code": "^2.2.2", + "@tiptap/extension-code-block": "^2.2.2", + "@tiptap/extension-document": "^2.2.2", + "@tiptap/extension-dropcursor": "^2.2.2", + "@tiptap/extension-gapcursor": "^2.2.2", + "@tiptap/extension-hard-break": "^2.2.2", + "@tiptap/extension-heading": "^2.2.2", + "@tiptap/extension-history": "^2.2.2", + "@tiptap/extension-horizontal-rule": "^2.2.2", + "@tiptap/extension-italic": "^2.2.2", + "@tiptap/extension-list-item": "^2.2.2", + "@tiptap/extension-ordered-list": "^2.2.2", + "@tiptap/extension-paragraph": "^2.2.2", + "@tiptap/extension-strike": "^2.2.2", + "@tiptap/extension-text": "^2.2.2" }, "funding": { "type": "github", @@ -1730,9 +1728,9 @@ } }, "node_modules/@tiptap/suggestion": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@tiptap/suggestion/-/suggestion-2.2.1.tgz", - "integrity": "sha512-DIT4zR5CoP0Q5n9BJj68EqmbFGzdyDgDon8yfX1NkynW8PtDrcfGhe5/31tcH6YuM6ZijqNV3fdCt+LPrVr/Nw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@tiptap/suggestion/-/suggestion-2.2.2.tgz", + "integrity": "sha512-3Po78jqoWwYCYP9gMqO7bV5oV63cL1Y6KS1RzTVhBUTdpRoLc2rHCDPqbL9EqKBwyHeTrp37fjUz9T54/LBNpA==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -1839,9 +1837,9 @@ "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" }, "node_modules/@types/react": { - "version": "18.2.54", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.54.tgz", - "integrity": "sha512-039k+vrVJymDoe2y+HLk3O3oI3sa+C8KNjuDKofqrIJK26ramnqLNj9VJTaxAzFGMvpW/79HrrAJapHzpQ9fGQ==", + "version": "18.2.55", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz", + "integrity": "sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -1849,9 +1847,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.18", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.18.tgz", - "integrity": "sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==", + "version": "18.2.19", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", + "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", "devOptional": true, "dependencies": { "@types/react": "*" @@ -2067,9 +2065,9 @@ "dev": true }, "node_modules/bcp-47-match": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-1.0.3.tgz", - "integrity": "sha512-LggQ4YTdjWQSKELZF5JwchnBa1u0pIQSZf5lSdOHEdbVP55h0qICA/FUp3+W99q0xqxYa1ZQizTUH87gecII5w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-2.0.3.tgz", + "integrity": "sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -2159,9 +2157,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001584", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001584.tgz", - "integrity": "sha512-LOz7CCQ9M1G7OjJOF9/mzmqmj3jE/7VOmrfw6Mgs0E8cjOsbRXQJHsPBfmBOXDskXKrHLyyW3n7kpDW/4BsfpQ==", + "version": "1.0.30001585", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz", + "integrity": "sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==", "funding": [ { "type": "opencollective", @@ -2255,16 +2253,10 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -2277,6 +2269,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -2388,9 +2383,19 @@ } }, "node_modules/css-selector-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.4.1.tgz", - "integrity": "sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==" + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-3.0.4.tgz", + "integrity": "sha512-pnmS1dbKsz6KA4EW4BznyPL2xxkNDRg62hcD0v8g6DEw2W7hxOln5M953jsp9hmw5Dg57S6o/A8GOn37mbAgcQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ] }, "node_modules/css-to-react-native": { "version": "3.2.0", @@ -2496,9 +2501,9 @@ "dev": true }, "node_modules/direction": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/direction/-/direction-1.0.4.tgz", - "integrity": "sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/direction/-/direction-2.0.1.tgz", + "integrity": "sha512-9S6m9Sukh1cZNknO1CWAr2QAWsbKLafQiyM5gZ7VgXHeuaoUwffKN4q6NC4A/Mf9iiPlOXQEKW/Mv/mh9/3YFA==", "bin": { "direction": "cli.js" }, @@ -2545,9 +2550,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.657", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.657.tgz", - "integrity": "sha512-On2ymeleg6QbRuDk7wNgDdXtNqlJLM2w4Agx1D/RiTmItiL+a9oq5p7HUa2ZtkAtGBe/kil2dq/7rPfkbe0r5w==" + "version": "1.4.661", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.661.tgz", + "integrity": "sha512-AFg4wDHSOk5F+zA8aR+SVIOabu7m0e7BiJnigCvPXzIGy731XENw/lmNxTySpVFtkFEy+eyt4oHhh5FF3NjQNw==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -2689,11 +2694,6 @@ "node": ">= 6" } }, - "node_modules/fast-plist": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/fast-plist/-/fast-plist-0.1.3.tgz", - "integrity": "sha512-d9cEfo/WcOezgPLAC/8t8wGb6YOD6JTCPMw2QcG2nAdFmyY+9rTUizCTaGjIZAloWENTEUMAPpkUAIJJJ0i96A==" - }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -2784,16 +2784,16 @@ } }, "node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=12" } }, "node_modules/fsevents": { @@ -2970,6 +2970,15 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hast-to-hyperscript/node_modules/web-namespaces": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", + "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/hast-util-from-dom": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/hast-util-from-dom/-/hast-util-from-dom-5.0.0.tgz", @@ -3012,15 +3021,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/hast-util-from-dom/node_modules/web-namespaces": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", - "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/hast-util-from-html": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.1.tgz", @@ -3100,28 +3100,25 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/hast-util-from-parse5/node_modules/web-namespaces": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", - "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/hast-util-has-property": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-1.0.4.tgz", - "integrity": "sha512-ghHup2voGfgFoHMGnaLHOjbYFACKrRh9KFttdCzMCbFoBMJXiNi2+XTrPP8+q6cDJM/RSqlCfVWrjp1H201rZg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-3.0.0.tgz", + "integrity": "sha512-MNilsvEKLFpV604hwfhVStK0usFY/QmM5zX16bo7EjnAEGofr5YyI37kzopBlZJkHD4t887i+q/C8/tr5Q94cA==", + "dependencies": { + "@types/hast": "^3.0.0" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, "node_modules/hast-util-is-element": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz", - "integrity": "sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz", + "integrity": "sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==", + "dependencies": { + "@types/hast": "^3.0.0" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -3137,119 +3134,32 @@ } }, "node_modules/hast-util-select": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-4.0.2.tgz", - "integrity": "sha512-8EEG2//bN5rrzboPWD2HdS3ugLijNioS1pqOTIolXNf67xxShYw4SQEmVXd3imiBG+U2bC2nVTySr/iRAA7Cjg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-6.0.2.tgz", + "integrity": "sha512-hT/SD/d/Meu+iobvgkffo1QecV8WeKWxwsNMzcTJsKw1cKTQKSR/7ArJeURLNJF9HDjp9nVoORyNNJxrvBye8Q==", "dependencies": { - "bcp-47-match": "^1.0.0", - "comma-separated-tokens": "^1.0.0", - "css-selector-parser": "^1.0.0", - "direction": "^1.0.0", - "hast-util-has-property": "^1.0.0", - "hast-util-is-element": "^1.0.0", - "hast-util-to-string": "^1.0.0", - "hast-util-whitespace": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "bcp-47-match": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "css-selector-parser": "^3.0.0", + "devlop": "^1.0.0", + "direction": "^2.0.0", + "hast-util-has-property": "^3.0.0", + "hast-util-to-string": "^3.0.0", + "hast-util-whitespace": "^3.0.0", "not": "^0.1.0", "nth-check": "^2.0.0", - "property-information": "^5.0.0", - "space-separated-tokens": "^1.0.0", - "unist-util-visit": "^2.0.0", - "zwitch": "^1.0.0" + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "unist-util-visit": "^5.0.0", + "zwitch": "^2.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, - "node_modules/hast-util-select/node_modules/@types/unist": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", - "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" - }, - "node_modules/hast-util-select/node_modules/comma-separated-tokens": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", - "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/hast-util-select/node_modules/hast-util-whitespace": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-1.0.4.tgz", - "integrity": "sha512-I5GTdSfhYfAPNztx2xJRQpG8cuDSNt599/7YUn7Gx/WxNMsG+a835k97TDkFgk123cwjfwINaZknkKkphx/f2A==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-select/node_modules/property-information": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", - "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", - "dependencies": { - "xtend": "^4.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/hast-util-select/node_modules/space-separated-tokens": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", - "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/hast-util-select/node_modules/unist-util-is": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", - "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-select/node_modules/unist-util-visit": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", - "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^4.0.0", - "unist-util-visit-parents": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-select/node_modules/unist-util-visit-parents": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", - "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-select/node_modules/zwitch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", - "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/hast-util-to-jsx-runtime": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.0.tgz", @@ -3277,9 +3187,12 @@ } }, "node_modules/hast-util-to-string": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-1.0.4.tgz", - "integrity": "sha512-eK0MxRX47AV2eZ+Lyr18DCpQgodvaS3fAQO2+b9Two9F5HEoRPhiUMNzoXArMJfZi2yieFzUBMRl3HNJ3Jus3w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.0.tgz", + "integrity": "sha512-OGkAxX1Ua3cbcW6EJ5pT/tslVb90uViVkcJ4ZZIMW/R33DX/AkcJcRrPebPwJkHYwlDHXz4aIwvAAaAdtrACFA==", + "dependencies": { + "@types/hast": "^3.0.0" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -3300,18 +3213,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/hast-util-to-text/node_modules/hast-util-is-element": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz", - "integrity": "sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==", - "dependencies": { - "@types/hast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/hast-util-whitespace": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", @@ -3655,9 +3556,12 @@ } }, "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -4500,47 +4404,11 @@ "integrity": "sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==" }, "node_modules/monaco-editor": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.44.0.tgz", - "integrity": "sha512-5SmjNStN6bSuSE5WPT2ZV+iYn1/yI9sd4Igtk23ChvqB7kDk9lZbB9F5frsuvpB+2njdIeGGFf2G4gbE6rCC9Q==", + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.45.0.tgz", + "integrity": "sha512-mjv1G1ZzfEE3k9HZN0dQ2olMdwIfaeAAjFiwNprLfYNRSz7ctv9XuCT7gPtBGrMUeV1/iZzYKj17Khu1hxoHOA==", "peer": true }, - "node_modules/monaco-editor-textmate": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/monaco-editor-textmate/-/monaco-editor-textmate-4.0.0.tgz", - "integrity": "sha512-Clwup5LJzVfwURQrS+odSEC5/hZBEG36pQnvBKt4OtBndF8r2xLeXUZcK/AqEBK2u0Npy7frFp9hG7m66Ol9hA==", - "peerDependencies": { - "monaco-editor": "0.x.x", - "monaco-textmate": "^3.0.0" - } - }, - "node_modules/monaco-textmate": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/monaco-textmate/-/monaco-textmate-3.0.1.tgz", - "integrity": "sha512-ZxxY3OsqUczYP1sGqo97tu+CJmMBwuSW+dL0WEBdDhOZ5G1zntw72hvBc68ZQAirosWvbDKgN1dL5k173QtFww==", - "dependencies": { - "fast-plist": "^0.1.2" - }, - "peerDependencies": { - "onigasm": "^2.0.0" - } - }, - "node_modules/monaco-vscode-textmate-theme-converter": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/monaco-vscode-textmate-theme-converter/-/monaco-vscode-textmate-theme-converter-0.1.7.tgz", - "integrity": "sha512-ZMsq1RPWwOD3pvXD0n+9ddnhfzZoiUMwNIWPNUqYqEiQeH2HjyZ9KYOdt/pqe0kkN8WnYWLrxT9C/SrtIsAu2Q==", - "dependencies": { - "commander": "^8.1.0", - "fs-extra": "^7.0.1", - "tslib": "^2.3.0" - }, - "bin": { - "mvttc": "lib/cjs/npx-script.js" - }, - "peerDependencies": { - "tslib": "^2.0.1" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4776,9 +4644,9 @@ } }, "node_modules/postcss": { - "version": "8.4.34", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.34.tgz", - "integrity": "sha512-4eLTO36woPSocqZ1zIrFD2K1v6wH7pY1uBh0JIM2KKfrVtGvPFiAku6aNOP0W1Wr9qwnaCsF0Z+CrVnryB2A8Q==", + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", "dev": true, "funding": [ { @@ -4921,9 +4789,9 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/posthog-js": { - "version": "1.104.4", - "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.104.4.tgz", - "integrity": "sha512-eZyNh0mhyfC129udFh5ln1QnUy67cPnRITVFvcOK4hdniM1v+T+cPxAkQK+4CjdHvvLM8hjh6OhiMWfppYqUzA==", + "version": "1.105.4", + "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.105.4.tgz", + "integrity": "sha512-hazxQYi4nxSqktu0Hh1xCV+sJCpN8mp5E5Ei/cfEa2nsb13xQbzn81Lf3VIDA0xMU1mXxNRStntlY267eQVC/w==", "dependencies": { "fflate": "^0.4.8", "preact": "^10.19.3" @@ -5210,9 +5078,9 @@ } }, "node_modules/react-hook-form": { - "version": "7.50.0", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.50.0.tgz", - "integrity": "sha512-AOhuzM3RdP09ZCnq+Z0yvKGHK25yiOX5phwxjV9L7U6HMla10ezkBnvQ+Pk4GTuDfsC5P2zza3k8mawFwFLVuQ==", + "version": "7.50.1", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.50.1.tgz", + "integrity": "sha512-3PCY82oE0WgeOgUtIr3nYNNtNvqtJ7BZjsbxh6TnYNbXButaD5WpjOmTjdxZfheuHKR68qfeFnEDVYoSSFPMTQ==", "engines": { "node": ">=12.22.0" }, @@ -5254,19 +5122,6 @@ "react": ">=18" } }, - "node_modules/react-monaco-editor": { - "version": "0.55.0", - "resolved": "https://registry.npmjs.org/react-monaco-editor/-/react-monaco-editor-0.55.0.tgz", - "integrity": "sha512-GdEP0Q3Rn1dczfKEEyY08Nes5plWwIYU4sWRBQO0+jsQWQsKMHKCC6+hPRwR7G/4aA3V/iU9jSmWPzVJYMVFSQ==", - "dependencies": { - "prop-types": "^15.8.1" - }, - "peerDependencies": { - "@types/react": ">=16 <= 18", - "monaco-editor": "^0.44.0", - "react": ">=16 <= 18" - } - }, "node_modules/react-redux": { "version": "8.1.3", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.1.3.tgz", @@ -5881,6 +5736,44 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, + "node_modules/rehype-highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/rehype-highlight/-/rehype-highlight-7.0.0.tgz", + "integrity": "sha512-QtobgRgYoQaK6p1eSr2SD1i61f7bjF2kZHAQHxeCHAuJf7ZUDMvQ7owDq9YTkmar5m5TSUol+2D3bp3KfJf/oA==", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-to-text": "^4.0.0", + "lowlight": "^3.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-highlight/node_modules/highlight.js": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", + "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/rehype-highlight/node_modules/lowlight": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.1.0.tgz", + "integrity": "sha512-CEbNVoSikAxwDMDPjXlqlFYiZLkDJHwyGu/MfOsJnF3d7f3tds5J3z8s/l9TMXhzfsJCCJEAsD78842mwmg0PQ==", + "dependencies": { + "@types/hast": "^3.0.0", + "devlop": "^1.0.0", + "highlight.js": "~11.9.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/rehype-katex": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/rehype-katex/-/rehype-katex-7.0.0.tgz", @@ -5912,6 +5805,22 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/rehype-rewrite": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rehype-rewrite/-/rehype-rewrite-4.0.2.tgz", + "integrity": "sha512-rjLJ3z6fIV11phwCqHp/KRo8xuUCO8o9bFJCNw5o6O2wlLk6g8r323aRswdGBQwfXPFYeSuZdAjp4tzo6RGqEg==", + "dependencies": { + "hast-util-select": "^6.0.0", + "unified": "^11.0.3", + "unist-util-visit": "^5.0.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + } + }, "node_modules/rehype-wrap-all": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/rehype-wrap-all/-/rehype-wrap-all-1.1.0.tgz", @@ -5930,6 +5839,123 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, + "node_modules/rehype-wrap-all/node_modules/bcp-47-match": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-1.0.3.tgz", + "integrity": "sha512-LggQ4YTdjWQSKELZF5JwchnBa1u0pIQSZf5lSdOHEdbVP55h0qICA/FUp3+W99q0xqxYa1ZQizTUH87gecII5w==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/rehype-wrap-all/node_modules/comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/rehype-wrap-all/node_modules/css-selector-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.4.1.tgz", + "integrity": "sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==" + }, + "node_modules/rehype-wrap-all/node_modules/direction": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/direction/-/direction-1.0.4.tgz", + "integrity": "sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ==", + "bin": { + "direction": "cli.js" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/rehype-wrap-all/node_modules/hast-util-has-property": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-1.0.4.tgz", + "integrity": "sha512-ghHup2voGfgFoHMGnaLHOjbYFACKrRh9KFttdCzMCbFoBMJXiNi2+XTrPP8+q6cDJM/RSqlCfVWrjp1H201rZg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-wrap-all/node_modules/hast-util-is-element": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz", + "integrity": "sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-wrap-all/node_modules/hast-util-select": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-4.0.2.tgz", + "integrity": "sha512-8EEG2//bN5rrzboPWD2HdS3ugLijNioS1pqOTIolXNf67xxShYw4SQEmVXd3imiBG+U2bC2nVTySr/iRAA7Cjg==", + "dependencies": { + "bcp-47-match": "^1.0.0", + "comma-separated-tokens": "^1.0.0", + "css-selector-parser": "^1.0.0", + "direction": "^1.0.0", + "hast-util-has-property": "^1.0.0", + "hast-util-is-element": "^1.0.0", + "hast-util-to-string": "^1.0.0", + "hast-util-whitespace": "^1.0.0", + "not": "^0.1.0", + "nth-check": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0", + "unist-util-visit": "^2.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-wrap-all/node_modules/hast-util-to-string": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-1.0.4.tgz", + "integrity": "sha512-eK0MxRX47AV2eZ+Lyr18DCpQgodvaS3fAQO2+b9Two9F5HEoRPhiUMNzoXArMJfZi2yieFzUBMRl3HNJ3Jus3w==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-wrap-all/node_modules/hast-util-whitespace": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-1.0.4.tgz", + "integrity": "sha512-I5GTdSfhYfAPNztx2xJRQpG8cuDSNt599/7YUn7Gx/WxNMsG+a835k97TDkFgk123cwjfwINaZknkKkphx/f2A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-wrap-all/node_modules/property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "dependencies": { + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/rehype-wrap-all/node_modules/space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/rehype-wrap-all/node_modules/unist-util-is": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", @@ -5966,6 +5992,15 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/rehype-wrap-all/node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/remark-math": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/remark-math/-/remark-math-6.0.0.tgz", @@ -6681,11 +6716,11 @@ } }, "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "engines": { - "node": ">= 4.0.0" + "node": ">= 10.0.0" } }, "node_modules/update-browserslist-db": { @@ -6838,15 +6873,6 @@ } } }, - "node_modules/vite-plugin-monaco-editor": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vite-plugin-monaco-editor/-/vite-plugin-monaco-editor-1.1.0.tgz", - "integrity": "sha512-IvtUqZotrRoVqwT0PBBDIZPNraya3BxN/bfcNfnxZ5rkJiGcNtO5eAOWWSgT7zullIAEqQwxMU83yL9J5k7gww==", - "dev": true, - "peerDependencies": { - "monaco-editor": ">=0.33.0" - } - }, "node_modules/vscode-webview": { "version": "1.0.1-beta.1", "resolved": "https://registry.npmjs.org/vscode-webview/-/vscode-webview-1.0.1-beta.1.tgz", @@ -6855,47 +6881,15 @@ "fs-extra": "^10.0.0" } }, - "node_modules/vscode-webview/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/vscode-webview/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/vscode-webview/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/w3c-keyname": { "version": "2.2.8", "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==" }, "node_modules/web-namespaces": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", - "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", + "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" diff --git a/gui/package.json b/gui/package.json index 369b0de87..32e04f937 100644 --- a/gui/package.json +++ b/gui/package.json @@ -27,9 +27,6 @@ "downshift": "^7.6.0", "lodash": "^4.17.21", "minisearch": "^6.3.0", - "monaco-editor-textmate": "^4.0.0", - "monaco-textmate": "^3.0.1", - "monaco-vscode-textmate-theme-converter": "^0.1.7", "onigasm": "^2.2.5", "posthog-js": "^1.58.0", "prismjs": "^1.29.0", @@ -38,7 +35,6 @@ "react-error-boundary": "^4.0.11", "react-hook-form": "^7.47.0", "react-markdown": "^9.0.1", - "react-monaco-editor": "^0.55.0", "react-redux": "^8.0.5", "react-remark": "^2.1.0", "react-router-dom": "^6.14.2", @@ -47,6 +43,7 @@ "react-tooltip": "^5.18.0", "redux-persist": "^6.0.0", "redux-persist-transform-filter": "^0.0.22", + "rehype-highlight": "^7.0.0", "rehype-katex": "^7.0.0", "rehype-wrap-all": "^1.1.0", "remark-math": "^6.0.0", @@ -71,7 +68,6 @@ "postcss": "^8.4.21", "tailwindcss": "^3.2.7", "typescript": "^4.9.3", - "vite": "^4.1.0", - "vite-plugin-monaco-editor": "^1.1.0" + "vite": "^4.1.0" } } diff --git a/gui/src/App.tsx b/gui/src/App.tsx index 12da09412..f32324081 100644 --- a/gui/src/App.tsx +++ b/gui/src/App.tsx @@ -14,8 +14,8 @@ import MonacoPage from "./pages/monaco"; import SettingsPage from "./pages/settings"; import { ContextSubmenuItem } from "core"; -import { useMonacoTheme } from "./hooks/useMonacoTheme"; import useSubmenuContextProviders from "./hooks/useSubmenuContextProviders"; +import { useVscTheme } from "./hooks/useVscTheme"; const router = createMemoryRouter([ { @@ -78,24 +78,24 @@ export const SubmenuContextProvidersContext = createContext<{ addItem: () => {}, }); -export const MonacoThemeContext = createContext(undefined); +export const VscThemeContext = createContext(undefined); function App() { const dispatch = useDispatch(); useSetup(dispatch); - const monacoTheme = useMonacoTheme(); + const vscTheme = useVscTheme(); const submenuContextProvidersMethods = useSubmenuContextProviders(); return ( - + - + ); } diff --git a/gui/src/components/markdown/CodeBlockToolbar.tsx b/gui/src/components/markdown/CodeBlockToolbar.tsx index bac9cb732..97aa7ede0 100644 --- a/gui/src/components/markdown/CodeBlockToolbar.tsx +++ b/gui/src/components/markdown/CodeBlockToolbar.tsx @@ -25,6 +25,7 @@ const SecondDiv = styled.div` right: 4px; display: flex; gap: 4px; + background-color: ${vscEditorBackground}; `; interface CodeBlockToolBarProps { diff --git a/gui/src/components/markdown/CodeSnippetPreview.tsx b/gui/src/components/markdown/CodeSnippetPreview.tsx index 213f3e01e..5116cc9b0 100644 --- a/gui/src/components/markdown/CodeSnippetPreview.tsx +++ b/gui/src/components/markdown/CodeSnippetPreview.tsx @@ -1,4 +1,9 @@ -import { PaintBrushIcon, XMarkIcon } from "@heroicons/react/24/outline"; +import { + ChevronDownIcon, + ChevronUpIcon, + PaintBrushIcon, + XMarkIcon, +} from "@heroicons/react/24/outline"; import { ContextItemWithId } from "core"; import { ExtensionIde } from "core/ide"; import { getMarkdownLanguageTagForFile } from "core/util"; @@ -51,19 +56,22 @@ const StyledHeaderButtonWithText = styled(HeaderButtonWithText)<{ ${(props) => props.color && `background-color: ${props.color};`} `; +const MAX_PREVIEW_HEIGHT = 300; + // Pre-compile the regular expression outside of the function const backticksRegex = /`{3,}/gm; function CodeSnippetPreview(props: CodeSnippetPreviewProps) { - const [scrollLocked, setScrollLocked] = React.useState(true); + const [collapsed, setCollapsed] = React.useState(true); const [hovered, setHovered] = React.useState(false); - const codeBlockRef = React.useRef(null); const fence = React.useMemo(() => { const backticks = props.item.content.match(backticksRegex); return backticks ? backticks.sort().at(-1) + "`" : "```"; }, [props.item.content]); + const codeBlockRef = React.useRef(null); + return ( setHovered(true)} @@ -128,9 +136,20 @@ function CodeSnippetPreview(props: CodeSnippetPreviewProps) { -
+
- {/* {hovered && codeBlockRef.current?.scrollHeight > MAX_PREVIEW_HEIGHT && ( + {codeBlockRef.current?.scrollHeight > MAX_PREVIEW_HEIGHT && ( - {scrollLocked ? ( + {collapsed ? ( setScrollLocked(false)} + onClick={() => setCollapsed(false)} /> ) : ( setScrollLocked(true)} + onClick={() => setCollapsed(true)} /> )} - )} */} + )} ); } diff --git a/gui/src/components/markdown/MonacoCodeBlock.tsx b/gui/src/components/markdown/MonacoCodeBlock.tsx index 7e1024616..2ad2d3e64 100644 --- a/gui/src/components/markdown/MonacoCodeBlock.tsx +++ b/gui/src/components/markdown/MonacoCodeBlock.tsx @@ -1,285 +1,281 @@ -import { wireTmGrammars } from "monaco-editor-textmate"; -import { Registry } from "monaco-textmate"; -import { useEffect, useMemo, useRef } from "react"; -import MonacoEditor, { monaco } from "react-monaco-editor"; -import styled from "styled-components"; -import { - VSC_EDITOR_BACKGROUND_VAR, - defaultBorderRadius, - parseColorForHex, -} from ".."; -import "./monaco.css"; +export {}; +// import { wireTmGrammars } from "monaco-editor-textmate"; +// import { Registry } from "monaco-textmate"; +// import { useEffect, useMemo, useRef } from "react"; +// import MonacoEditor, { monaco } from "react-monaco-editor"; +// import styled from "styled-components"; +// import { +// VSC_EDITOR_BACKGROUND_VAR, +// defaultBorderRadius, +// parseColorForHex, +// } from ".."; +// import { useAppendedString } from "../../hooks/useAppendedString"; +// import "./monaco.css"; -const fetchTextMateGrammar = async (lang: string): Promise => { - return ( - await fetch(`${(window as any).vscMediaUrl}/textmate-syntaxes/${lang}`) - ).text(); -}; +// const fetchTextMateGrammar = async (lang: string): Promise => { +// return ( +// await fetch(`${(window as any).vscMediaUrl}/textmate-syntaxes/${lang}`) +// ).text(); +// }; -const supportedLanguages = { - "source.ts": ["typescript", "TypeScript.tmLanguage.json"], - "source.js": ["javascript", "JavaScript.tmLanguage.json"], - "source.rust": ["rust", "rust.json"], - // "source.batchfile": ["batchfile", "Batch File.tmLanguage"], - "source.c": ["c", "c.json"], - "source.cpp": ["cpp", "c++.json"], - // "source.clojure": ["clojure", "Clojure.tmLanguage"], - // "source.coffeescript": ["coffeescript", "coffeescript.json"], - // "source.cshtml": ["cshtml", "cshtml.json"], - // "source.css": ["css", "css.plist"], - // "source.diff": ["diff", "diff.tmLanguage"], - // "source.dockerfile": ["dockerfile", "Dockerfile.tmLanguage"], - // "source.fsharp": ["fsharp", "fsharp.json"], - // "source.git-commit": ["git-commit", "git-commit.tmLanguage"], - // "source.git-rebase": ["git-rebase", "git-rebase.tmLanguage"], - "source.go": ["go", "go.json"], - // "source.groovy": ["groovy", "Groovy.tmLanguage"], - // "source.handlebars": ["handlebars", "Handlebars.json"], - // "source.html": ["html", "html.json"], - // "source.jade": ["jade", "Jade.json"], - // "source.java": ["java", "java.json"], - // "source.javascript": ["javascript", "JavaScript.tmLanguage.json"], - // // "source.json": ["json", "JSON.tmLanguage"], - // "source.less": ["less", "less.tmLanguage.json"], - // "source.lua": ["lua", "lua.json"], - "source.python": ["python", "MagicPython.tmLanguage.json"], - // "source.magicregexp": ["magicregexp", "MagicRegExp.tmLanguage.json"], - // "source.makefile": ["makefile", "Makefile.json"], - // // "source.markdown": ["markdown", "markdown.tmLanguage"], - // // "source.objective-c": ["objective-c", "Objective-C.tmLanguage"], - // // "source.perl6": ["perl6", "Perl 6.tmLanguage"], - // // "source.perl": ["perl", "Perl.plist"], - // "source.php": ["php", "php.json"], - // // "source.platform": ["platform", "Platform.tmLanguage"], - // // "source.powershell": ["powershell", "PowershellSyntax.tmLanguage"], - // // "source.properties": ["properties", "properties.plist"], - // // "source.r": ["r", "R.plist"], - // // "source.regexp": ["regexp", "Regular Expressions (JavaScript).tmLanguage"], - // // "source.ruby": ["ruby", "Ruby.plist"], - // "source.scss": ["scss", "scss.json"], - // "source.shaderlab": ["shaderlab", "shaderlab.json"], - // "source.shell-unix-bash": [ - // "shell-unix-bash", - // "Shell-Unix-Bash.tmLanguage.json", - // ], - // // "source.sql": ["sql", "SQL.plist"], - "source.swift": ["swift", "swift.json"], - "source.tsx": ["tsx", "TypeScriptReact.tmLanguage.json"], - // "source.xml": ["xml", "xml.json"], - // "source.xsl": ["xsl", "xsl.json"], - "source.yaml": ["yaml", "yaml.json"], -}; +// const supportedLanguages = { +// "source.ts": ["typescript", "TypeScript.tmLanguage.json"], +// "source.js": ["javascript", "JavaScript.tmLanguage.json"], +// "source.rust": ["rust", "rust.json"], +// // "source.batchfile": ["batchfile", "Batch File.tmLanguage"], +// "source.c": ["c", "c.json"], +// "source.cpp": ["cpp", "c++.json"], +// // "source.clojure": ["clojure", "Clojure.tmLanguage"], +// // "source.coffeescript": ["coffeescript", "coffeescript.json"], +// // "source.cshtml": ["cshtml", "cshtml.json"], +// // "source.css": ["css", "css.plist"], +// // "source.diff": ["diff", "diff.tmLanguage"], +// // "source.dockerfile": ["dockerfile", "Dockerfile.tmLanguage"], +// // "source.fsharp": ["fsharp", "fsharp.json"], +// // "source.git-commit": ["git-commit", "git-commit.tmLanguage"], +// // "source.git-rebase": ["git-rebase", "git-rebase.tmLanguage"], +// "source.go": ["go", "go.json"], +// // "source.groovy": ["groovy", "Groovy.tmLanguage"], +// // "source.handlebars": ["handlebars", "Handlebars.json"], +// // "source.html": ["html", "html.json"], +// // "source.jade": ["jade", "Jade.json"], +// // "source.java": ["java", "java.json"], +// // "source.javascript": ["javascript", "JavaScript.tmLanguage.json"], +// // // "source.json": ["json", "JSON.tmLanguage"], +// // "source.less": ["less", "less.tmLanguage.json"], +// // "source.lua": ["lua", "lua.json"], +// "source.python": ["python", "MagicPython.tmLanguage.json"], +// // "source.magicregexp": ["magicregexp", "MagicRegExp.tmLanguage.json"], +// // "source.makefile": ["makefile", "Makefile.json"], +// // // "source.markdown": ["markdown", "markdown.tmLanguage"], +// // // "source.objective-c": ["objective-c", "Objective-C.tmLanguage"], +// // // "source.perl6": ["perl6", "Perl 6.tmLanguage"], +// // // "source.perl": ["perl", "Perl.plist"], +// // "source.php": ["php", "php.json"], +// // // "source.platform": ["platform", "Platform.tmLanguage"], +// // // "source.powershell": ["powershell", "PowershellSyntax.tmLanguage"], +// // // "source.properties": ["properties", "properties.plist"], +// // // "source.r": ["r", "R.plist"], +// // // "source.regexp": ["regexp", "Regular Expressions (JavaScript).tmLanguage"], +// // // "source.ruby": ["ruby", "Ruby.plist"], +// // "source.scss": ["scss", "scss.json"], +// // "source.shaderlab": ["shaderlab", "shaderlab.json"], +// // "source.shell-unix-bash": [ +// // "shell-unix-bash", +// // "Shell-Unix-Bash.tmLanguage.json", +// // ], +// // // "source.sql": ["sql", "SQL.plist"], +// "source.swift": ["swift", "swift.json"], +// "source.tsx": ["tsx", "TypeScriptReact.tmLanguage.json"], +// // "source.xml": ["xml", "xml.json"], +// // "source.xsl": ["xsl", "xsl.json"], +// "source.yaml": ["yaml", "yaml.json"], +// }; -export const supportedLanguagesArray = Object.keys(supportedLanguages).map( - (l) => supportedLanguages[l][0] -); +// export const supportedLanguagesArray = Object.keys(supportedLanguages).map( +// (l) => supportedLanguages[l][0] +// ); -const registry = new Registry({ - getGrammarDefinition: async (scopeName) => { - if (scopeName in supportedLanguages) { - const [_, tmFilename] = supportedLanguages[scopeName]; - let content; - try { - content = await fetchTextMateGrammar(tmFilename); - } catch (e) { - console.warn("Error fetching grammar for language", scopeName, e); - content = await fetchTextMateGrammar("TypeScript.tmLanguage.json"); - } +// const registry = new Registry({ +// getGrammarDefinition: async (scopeName) => { +// if (scopeName in supportedLanguages) { +// const [_, tmFilename] = supportedLanguages[scopeName]; +// let content; +// try { +// content = await fetchTextMateGrammar(tmFilename); +// } catch (e) { +// console.warn("Error fetching grammar for language", scopeName, e); +// content = await fetchTextMateGrammar("TypeScript.tmLanguage.json"); +// } - return { - format: "json", - content, - }; - } else { - return null; - } - }, -}); +// return { +// format: "json", +// content, +// }; +// } else { +// return null; +// } +// }, +// }); -const getThemeFromWindow = () => ({ - ...(window as any).fullColorTheme, - base: "vs-dark", - inherit: true, - encodedTokensColors: undefined, - // rules: [], - colors: { - "editor.background": parseColorForHex(VSC_EDITOR_BACKGROUND_VAR), - }, -}); +// const getThemeFromWindow = () => { +// const colorTheme = (window as any).fullColorTheme; +// return { +// ...colorTheme, +// base: colorTheme.base || "vs-dark", +// inherit: true, +// encodedTokensColors: undefined, +// // rules: [], +// colors: { +// "editor.background": parseColorForHex(VSC_EDITOR_BACKGROUND_VAR), +// }, +// }; +// }; -const Container = styled.div<{ showBorder: 0 | 1 }>` - border-radius: ${defaultBorderRadius}; - overflow: hidden; - margin: 0; -`; +// const Container = styled.div<{ showBorder: 0 | 1 }>` +// border-radius: ${defaultBorderRadius}; +// overflow: hidden; +// margin: 0; +// `; -interface MonacoCodeBlockProps { - codeString: string; - preProps: any; - language: string; - showBorder: boolean; - scrollLocked?: boolean; - maxHeight?: number; -} +// interface MonacoCodeBlockProps { +// codeString: string; +// preProps: any; +// language: string; +// showBorder: boolean; +// } -export const MonacoCodeBlock = (props: MonacoCodeBlockProps) => { - const monacoRef = useRef(null); - const editorRef = useRef(null); +// export const MonacoCodeBlock = (props: MonacoCodeBlockProps) => { +// const monacoRef = useRef(null); +// const editorRef = useRef(null); - const liftOff = async (monaco) => { - try { - const grammars = new Map(); - for (const [scopeName, [languageId, _]] of Object.entries( - supportedLanguages - )) { - grammars.set(languageId, scopeName); - monaco.languages.register({ id: languageId }); - } - await wireTmGrammars(monaco, registry, grammars, editorRef.current); - } catch (e) { - console.error("Error wiring grammars", e); - } - }; +// /* THEMING */ - const onEditorDidMount = (editor, monaco) => { - monacoRef.current = monaco; - editorRef.current = editor; +// const liftOff = async (monaco) => { +// try { +// const grammars = new Map(); +// for (const [scopeName, [languageId, _]] of Object.entries( +// supportedLanguages +// )) { +// grammars.set(languageId, scopeName); +// monaco.languages.register({ id: languageId }); +// } +// await wireTmGrammars(monaco, registry, grammars, editorRef.current); +// } catch (e) { +// console.error("Error wiring grammars", e); +// } +// }; - monacoRef.current.editor.defineTheme("custom-theme", getThemeFromWindow()); - liftOff(monacoRef.current).then(() => { - monacoRef.current.editor.setTheme("custom-theme"); - }); +// const onEditorDidMount = ( +// editor: monaco.editor.IStandaloneCodeEditor, +// monaco: any +// ) => { +// monacoRef.current = monaco; +// editorRef.current = editor; - if (!(props.maxHeight && !props.scrollLocked)) { - editorRef.current.onDidContentSizeChange(() => { - const contentHeight = editorRef.current.getContentHeight(); - const layoutInfo = editorRef.current.getLayoutInfo(); - const width = layoutInfo.width; - editorRef.current.layout({ height: contentHeight, width }); - }); - } - }; +// monacoRef.current.editor.defineTheme("custom-theme", getThemeFromWindow()); +// liftOff(monacoRef.current).then(() => { +// monacoRef.current.editor.setTheme("custom-theme"); +// }); - useEffect(() => { - const listener = (e) => { - if (e.data.type === "setTheme") { - (window as any).fullColorTheme = e.data.theme; - monacoRef.current.editor.defineTheme( - "custom-theme", - getThemeFromWindow() - ); - monacoRef.current.editor.setTheme("custom-theme"); - } - }; - window.addEventListener("message", listener); - return () => { - window.removeEventListener("message", listener); - }; - }, [monacoRef.current]); +// editorRef.current.onDidContentSizeChange(() => { +// editorRef.current.layout({ +// width: editorRef.current.getLayoutInfo().width, +// height: editorRef.current.getContentHeight(), +// }); +// }); +// }; - const prevFullTextRef = useRef(""); +// useEffect(() => { +// const listener = (e) => { +// if (e.data.type === "setTheme") { +// (window as any).fullColorTheme = e.data.theme; +// monacoRef.current.editor.defineTheme( +// "custom-theme", +// getThemeFromWindow() +// ); +// monacoRef.current.editor.setTheme("custom-theme"); +// } +// }; +// window.addEventListener("message", listener); +// return () => { +// window.removeEventListener("message", listener); +// }; +// }, [monacoRef.current]); - const appendText = (text: string) => { - const editor = editorRef.current; - const model = editor.getModel(); - if (!model) return; +// /* STREAMING UPDATES */ - let lineCount = prevFullTextRef.current.split("\n").length; - const modelLineCount = model.getLineCount(); - lineCount = lineCount === 0 ? 1 : lineCount; - lineCount = Math.min(lineCount, modelLineCount); - const lastLineColumn = model.getLineMaxColumn(lineCount); +// const appendText = (text: string, lineCount: number) => { +// const editor = editorRef.current; +// const model = editor.getModel(); +// if (!model) return; - const id = { major: 1, minor: 1 }; - const op = { - identifier: id, - range: { - startLineNumber: lineCount, - startColumn: lastLineColumn, - endLineNumber: lineCount + 1, - endColumn: 0, - }, - text: text, - forceMoveMarkers: true, - }; +// const modelLineCount = model.getLineCount(); +// lineCount = lineCount === 0 ? 1 : lineCount; +// lineCount = Math.min(lineCount, modelLineCount); +// const lastLineColumn = model.getLineMaxColumn(lineCount); - editor.getModel().applyEdits([op]); - }; +// const id = { major: 1, minor: 1 }; +// const op = { +// identifier: id, +// range: { +// startLineNumber: lineCount, +// startColumn: lastLineColumn, +// endLineNumber: lineCount + 1, +// endColumn: 0, +// }, +// text: text, +// forceMoveMarkers: true, +// }; - useEffect(() => { - if (props.codeString === prevFullTextRef.current) return; +// editor.getModel().applyEdits([op]); +// }; - let newText = props.codeString.slice(prevFullTextRef.current.length); - if (newText === "") return; +// // useEffect(() => { +// // if (props.codeString === prevFullTextRef.current) return; - // To avoid the optimistic code block fences. Because the unwanted ones are always at the end of the block, this solves the problem - if (newText.endsWith("`") || newText.endsWith("`\n")) { - newText = newText.slice(0, newText.indexOf("`")); - } +// // let newText = props.codeString.slice(prevFullTextRef.current.length); +// // if (newText === "") return; - appendText(newText); - prevFullTextRef.current = props.codeString; - }, [props.codeString, prevFullTextRef.current]); +// // // To avoid the optimistic code block fences. Because the unwanted ones are always at the end of the block, this solves the problem +// // if (newText.endsWith("`") || newText.endsWith("`\n")) { +// // newText = newText.slice(0, newText.indexOf("`")); +// // } - useEffect(() => { - appendText(props.codeString); - }, []); +// // appendText(newText); +// // prevFullTextRef.current = props.codeString; +// // }, [props.codeString, prevFullTextRef.current]); - const memoizedEditor = useMemo(() => { - const rootStyle = getComputedStyle(document.documentElement); - const fontFamily = rootStyle - .getPropertyValue("--vscode-editor-font-family") - .trim(); +// useAppendedString(props.codeString, appendText); - return ( - props.maxHeight - ? props.maxHeight - : null - } - options={{ - automaticLayout: !(props.maxHeight && !props.scrollLocked), - readOnly: true, - minimap: { enabled: false }, - scrollBeyondLastLine: false, - scrollbar: { - alwaysConsumeMouseWheel: false, - verticalScrollbarSize: 4, - horizontalScrollbarSize: 4, - }, - hover: {}, - renderWhitespace: "none", - overviewRulerLanes: 0, - lineNumbers: "off", - folding: false, - guides: { - indentation: false, - }, - renderLineHighlight: "none", - fontLigatures: true, - fontVariations: true, - padding: { top: 4, bottom: 4 }, - fontFamily, - trimAutoWhitespace: false, - }} - /> - ); - }, [props.scrollLocked, props.maxHeight]); +// const memoizedEditor = useMemo(() => { +// const rootStyle = getComputedStyle(document.documentElement); +// const fontFamily = rootStyle +// .getPropertyValue("--vscode-editor-font-family") +// .trim(); - return ( - - {memoizedEditor} - - ); -}; +// return ( +// +// ); +// }, []); + +// return ( +// +// {memoizedEditor} +// +// ); +// }; diff --git a/gui/src/components/markdown/PreWithToolbar.tsx b/gui/src/components/markdown/PreWithToolbar.tsx index afe411a98..19f5f8857 100644 --- a/gui/src/components/markdown/PreWithToolbar.tsx +++ b/gui/src/components/markdown/PreWithToolbar.tsx @@ -1,40 +1,50 @@ -import { useState } from "react"; +import { debounce } from "lodash"; +import { useEffect, useState } from "react"; import CodeBlockToolBar from "./CodeBlockToolbar"; -function PreWithToolbar(props: any) { +function childToText(child: any) { + if (typeof child === "string") { + return child; + } else if (child?.props) { + return childToText(child.props?.children); + } else if (Array.isArray(child)) { + return childrenToText(child); + } else { + return ""; + } +} + +function childrenToText(children: any) { + return children.map((child: any) => childToText(child)).join(""); +} + +function PreWithToolbar(props: { children: any }) { const [hovering, setHovering] = useState(false); - function childToText(child: any) { - if (typeof child === "string") { - return child; - } else if (child?.props) { - return childToText(child.props?.children); - } else if (Array.isArray(child)) { - return childrenToText(child); - } else { - return ""; - } - } + const [copyValue, setCopyValue] = useState(""); - function childrenToText(child: any) { - return child.props.codeString || ""; - } + useEffect(() => { + const debouncedEffect = debounce(() => { + setCopyValue(childrenToText(props.children.props.children)); + }, 100); + + debouncedEffect(); + + return () => { + debouncedEffect.cancel(); + }; + }, [props.children]); return ( -
 setHovering(true)}
       onMouseLeave={() => setHovering(false)}
     >
-      {hovering && (
-        
-      )}
+      {hovering && }
       {props.children}
-    
+
); } diff --git a/gui/src/components/markdown/StyledMarkdownPreview.tsx b/gui/src/components/markdown/StyledMarkdownPreview.tsx index 77bcfd028..27108d35e 100644 --- a/gui/src/components/markdown/StyledMarkdownPreview.tsx +++ b/gui/src/components/markdown/StyledMarkdownPreview.tsx @@ -2,7 +2,9 @@ import React, { memo, useEffect } from "react"; import { useRemark } from "react-remark"; // import rehypeKatex from "rehype-katex"; // import remarkMath from "remark-math"; +import rehypeHighlight from "rehype-highlight"; import styled from "styled-components"; +import { visit } from "unist-util-visit"; import { defaultBorderRadius, vscBackground, @@ -10,8 +12,8 @@ import { vscForeground, } from ".."; import { getFontSize } from "../../util"; -import { MonacoCodeBlock } from "./MonacoCodeBlock"; import PreWithToolbar from "./PreWithToolbar"; +import { SyntaxHighlightedPre } from "./SyntaxHighlightedPre"; import "./markdown.css"; const StyledMarkdown = styled.div<{ @@ -24,8 +26,7 @@ const StyledMarkdown = styled.div<{ max-width: calc(100vw - 24px); overflow-x: scroll; - - font-size: 12px; + overflow-y: hidden; ${(props) => { if (props.showBorder) { @@ -41,7 +42,6 @@ const StyledMarkdown = styled.div<{ span.line:empty { display: none; } - color: #f78383; word-wrap: break-word; border-radius: ${defaultBorderRadius}; background-color: ${vscEditorBackground}; @@ -51,6 +51,7 @@ const StyledMarkdown = styled.div<{ code:not(pre > code) { font-family: monospace; + color: #f78383; } background-color: ${vscBackground}; @@ -114,6 +115,20 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( const [reactContent, setMarkdownSource] = useRemark({ // remarkPlugins: [remarkMath], // rehypePlugins: [rehypeKatex as any, {}], + remarkPlugins: [ + () => { + return (tree) => { + visit(tree, "code", (node: any) => { + if (!node.lang) { + node.lang === "javascript"; + } else if (node.lang.includes(".")) { + node.lang = node.lang.split(".").slice(-1)[0]; + } + }); + }; + }, + ], + rehypePlugins: [rehypeHighlight as any, {}], rehypeReactOptions: { components: { a: ({ node, ...props }) => { @@ -124,30 +139,39 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( ); }, pre: ({ node, ...preProps }) => { - const monacoEditor = ( - - ); return props.showCodeBorder ? ( - {monacoEditor} + + + ) : ( - monacoEditor + ); }, - // p: ({ node, ...props }) => { - // return ; - // }, + // pre: ({ node, ...preProps }) => { + // const codeString = + // preProps.children?.[0]?.props?.children?.[0].trim() || ""; + // const monacoEditor = ( + // + // ); + // return props.showCodeBorder ? ( + // + // + // + // ) : ( + // + // ); + // }, + // // p: ({ node, ...props }) => { + // // return ; + // // }, }, }, }); diff --git a/gui/src/components/markdown/SyntaxHighlightedPre.tsx b/gui/src/components/markdown/SyntaxHighlightedPre.tsx new file mode 100644 index 000000000..acec86461 --- /dev/null +++ b/gui/src/components/markdown/SyntaxHighlightedPre.tsx @@ -0,0 +1,27 @@ +import { useContext } from "react"; +import styled from "styled-components"; +import { vscForeground } from ".."; +import { VscThemeContext } from "../../App"; + +const StyledPre = styled.pre<{ theme: any }>` + & .hljs { + color: ${vscForeground}; + } + + ${(props) => + Object.keys(props.theme) + .map((key, index) => { + return ` + & ${key} { + color: ${props.theme[key]}; + } + `; + }) + .join("")} +`; + +export const SyntaxHighlightedPre = (props: any) => { + const currentTheme = useContext(VscThemeContext); + + return ; +}; diff --git a/gui/src/hooks/useAppendedString.ts b/gui/src/hooks/useAppendedString.ts new file mode 100644 index 000000000..18eb08217 --- /dev/null +++ b/gui/src/hooks/useAppendedString.ts @@ -0,0 +1,35 @@ +import { useEffect, useRef, useState } from "react"; + +export function useAppendedString( + fullString: string, + append: (chunk: string, lineCount: number) => void +) { + // Queue of fullString updated versions to be processed atomically + const [updateQueue, setUpdateQueue] = useState([]); + const lastString = useRef(""); + const processing = useRef(false); + + useEffect(() => { + setUpdateQueue((prev) => [...prev, fullString]); + }, [fullString]); + + useEffect(() => { + if (updateQueue.length === 0 || processing.current) return; + + processing.current = true; + setUpdateQueue((currentQueue) => { + while (currentQueue.length > 0) { + const nextString = currentQueue.shift()!; + if (!nextString.startsWith(lastString.current)) { + // Invalid + continue; + } + const appendedPart = nextString.slice(lastString.current.length); + lastString.current = nextString; + append(appendedPart, lastString.current.split("\n").length); + } + return currentQueue; + }); + processing.current = false; + }, [updateQueue]); +} diff --git a/gui/src/hooks/useMonacoTheme.ts b/gui/src/hooks/useMonacoTheme.ts deleted file mode 100644 index 4d195fac7..000000000 --- a/gui/src/hooks/useMonacoTheme.ts +++ /dev/null @@ -1,23 +0,0 @@ -// import { convertTheme } from 'monaco-vscode-textmate-theme-converter/lib/cjs'; -import { Registry } from "monaco-textmate"; -// import { wireTmGrammars } from 'monaco-editor-textmate'; - -const registry = new Registry({ - getGrammarDefinition: async (scopeName) => { - if (scopeName == "source.ts") { - return { - format: "json", - content: await (await fetch("./TypeScript.tmLanguage.json")).text(), - }; - } else if (scopeName == "source.js") { - return { - format: "json", - content: await (await fetch("./JavaScript.tmLanguage.json")).text(), - }; - } else { - return null; - } - }, -}); - -export function useMonacoTheme() {} diff --git a/gui/src/hooks/useVscTheme.ts b/gui/src/hooks/useVscTheme.ts new file mode 100644 index 000000000..6b1e86ea0 --- /dev/null +++ b/gui/src/hooks/useVscTheme.ts @@ -0,0 +1,98 @@ +import { useEffect, useState } from "react"; + +const hljsToTextMate = { + ".hljs-comment": ["comment"], + ".hljs-tag": ["tag"], + + ".hljs-doctag": ["keyword"], + ".hljs-keyword": ["keyword"], + ".hljs-meta .hljs-keyword": ["keyword"], + ".hljs-template-tag": ["keyword"], + ".hljs-template-variable": ["keyword"], + ".hljs-type": ["keyword"], + ".hljs-variable.language_": ["keyword"], + + ".hljs-title": ["title", "function", "class"], + ".hljs-title.class_": ["title", "function", "class", "variable"], + ".hljs-title.class_.inherited__": ["title", "function", "class", "variable"], + ".hljs-title.function_": [ + "support.function", + "entity.name.function", + "title", + "function", + "class", + ], + + ".hljs-built_in": [ + "support.function", + "entity.name.function", + "title", + "function", + "class", + ], + + ".hljs-name": ["constant"], + + ".hljs-attr": ["variable", "operator", "number"], + ".hljs-attribute": ["attribute", "variable", "operator", "number"], + ".hljs-literal": ["variable", "operator", "number"], + ".hljs-meta": ["variable", "operator", "number"], + ".hljs-number": ["constant.numeric", "number", "variable", "operator"], + ".hljs-operator": ["variable", "operator", "number"], + ".hljs-variable": ["variable", "operator", "number"], + ".hljs-selector-attr": ["variable", "operator", "number"], + ".hljs-selector-class": ["variable", "operator", "number"], + ".hljs-selector-id": ["variable", "operator", "number"], + + ".hljs-regexp": ["string"], + ".hljs-string": ["string"], + ".hljs-meta .hljs-string": ["string"], + + ".hljs-params": ["variable", "operator", "number"], +}; + +function constructTheme(tmTheme: any): any { + const rules = tmTheme["rules"] || []; + + const tokenToForeground = {}; + rules.forEach(({ token, foreground }) => { + if (!foreground || !token) { + return; + } + tokenToForeground[token] = foreground; + }); + + const theme = {}; + Object.keys(hljsToTextMate).forEach((className) => { + const tokens = hljsToTextMate[className]; + for (const scope of tokens) { + if (tokenToForeground[scope]) { + theme[className] = tokenToForeground[scope]; + break; + } + } + }); + + return theme; +} + +export function useVscTheme() { + const [theme, setTheme] = useState( + constructTheme((window as any).fullColorTheme || {}) + ); + + useEffect(() => { + const listener = (e) => { + if (e.data.type === "setTheme") { + (window as any).fullColorTheme = e.data.theme; + setTheme(constructTheme(e.data.theme)); + } + }; + window.addEventListener("message", listener); + return () => { + window.removeEventListener("message", listener); + }; + }, []); + + return theme; +}