@deephaven/console 0.37.2 → 0.37.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonacoUtils.d.ts","sourceRoot":"","sources":["../../src/monaco/MonacoUtils.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAUjD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAI3C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,iBAAiB,CAAC,EAAE,WAAW,CAAC;KACjC;CACF;AAED,cAAM,WAAW;IACf;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,EACV,SAAS,GACV,GAAE;QAAE,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAA;KAAO,GAAG,IAAI;IA8HvD;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI;IAOnE;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAI3C,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI;IAkBrD,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAUjD;;;;OAIG;IACH,MAAM,CAAC,MAAM,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAC3C,WAAW,kCAAqC,GAC/C,IAAI;IAIP;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CACjB,MAAM,EAAE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,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,IAAI;IA8BP,MAAM,CAAC,4BAA4B,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM;IA8B/D,MAAM,CAAC,YAAY,CACjB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,GAC9B;QAAE,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,CAAA;KAAE;CA0BvC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -396,7 +396,13 @@ class MonacoUtils {
|
|
|
396
396
|
var newTokens = [];
|
|
397
397
|
var _loop = function _loop(i) {
|
|
398
398
|
var lineText = model.getLineContent(i);
|
|
399
|
-
var
|
|
399
|
+
var originalTokens = linkifyFind(lineText);
|
|
400
|
+
var tokens = originalTokens.filter(token => {
|
|
401
|
+
if (token.type === 'url') {
|
|
402
|
+
return /^https?:\/\//.test(token.value);
|
|
403
|
+
}
|
|
404
|
+
return true;
|
|
405
|
+
});
|
|
400
406
|
// map the tokens to the ranges - you know the line number now, use the token start/end as the startColumn/endColumn
|
|
401
407
|
tokens.forEach(token => {
|
|
402
408
|
newTokens.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonacoUtils.js","names":["assertNotNull","find","linkifyFind","monaco","KeyCodeUtils","Log","MonacoTheme","PyLang","GroovyLang","ScalaLang","DbLang","LogLang","log","module","MonacoUtils","init","getWorker","debug","undefined","registerGetWorker","registerLanguages","removeHashtag","dhDarkRules","token","foreground","string","keyword","delimiter","comment","number","storage","identifier","operator","predefined","substring","dhDarkColors","errorForeground","background","focusBorder","editor","defineTheme","base","inherit","rules","colors","debug2","setTheme","window","MonacoEnvironment","color","languages","languageIds","map","id","getLanguages","filter","includes","forEach","languageParam","language","registerLanguage","register","onLanguage","setLanguageConfiguration","conf","setMonarchTokensProvider","setEOL","eolSequence","EndOfLineSequence","LF","getModel","openDocument","session","model","didOpenDocumentParams","textDocument","uri","languageId","getLanguageId","version","getVersionId","text","getValue","dispose","onDidChangeModelContent","changedEvent","changes","versionId","contentChanges","i","length","change","range","rangeLength","contentChange","start","line","startLineNumber","character","startColumn","end","endLineNumber","endColumn","push","didChangeDocumentParams","changeDocument","closeDocument","didCloseDocumentParams","registerPasteHandler","onDidPaste","pasteEvent","smartQuotes","invalidChars","invalidSpaces","editorModel","pastedText","getValueInRange","test","applyEdits","replace","isMacPlatform","platform","navigator","startsWith","removeConflictingKeybindings","keybindings","windows","mac","keybinding","removeKeybinding","err","error","_standaloneKeybindingService","_getResolver","_map","get","elem","command","addDynamicKeybinding","warn","getMonacoKeyCodeFromShortcut","shortcut","keyState","keyValue","isMac","metaKey","KeyMod","CtrlCmd","shiftKey","Shift","altKey","Alt","ctrlKey","WinCtrl","fromString","provideLinks","newTokens","lineText","getLineContent","tokens","url","href","Range","getLineCount","links"],"sources":["../../src/monaco/MonacoUtils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\n/**\n * Exports a function for initializing monaco with the deephaven theme/config\n */\nimport { Shortcut } from '@deephaven/components';\nimport { IdeSession } from '@deephaven/jsapi-shim';\nimport { assertNotNull } from '@deephaven/utils';\nimport { find as linkifyFind } from 'linkifyjs';\nimport * as monaco from 'monaco-editor';\nimport type { Environment } from 'monaco-editor';\n// @ts-ignore\nimport { KeyCodeUtils } from 'monaco-editor/esm/vs/base/common/keyCodes.js';\nimport Log from '@deephaven/log';\nimport MonacoTheme from './MonacoTheme.module.scss';\nimport PyLang from './lang/python';\nimport GroovyLang from './lang/groovy';\nimport ScalaLang from './lang/scala';\nimport DbLang from './lang/db';\nimport LogLang from './lang/log';\nimport { Language } from './lang/Language';\n\nconst log = Log.module('MonacoUtils');\n\ndeclare global {\n interface Window {\n MonacoEnvironment?: Environment;\n }\n}\n\nclass MonacoUtils {\n /**\n * Initializes Monaco for the environment\n * @param getWorker The getWorker function Monaco should use\n * The workers should be provided by the caller and bundled by their build system (e.g. Vite, Webpack)\n */\n static init({\n getWorker,\n }: { getWorker?: Environment['getWorker'] } = {}): void {\n log.debug('Initializing Monaco...');\n\n if (getWorker !== undefined) {\n MonacoUtils.registerGetWorker(getWorker);\n }\n\n const { registerLanguages, removeHashtag } = MonacoUtils;\n\n const dhDarkRules = [\n { token: '', foreground: removeHashtag(MonacoTheme.foreground) },\n { token: 'string', foreground: removeHashtag(MonacoTheme.string) },\n {\n token: 'string.delim',\n foreground: removeHashtag(MonacoTheme['string-delim']),\n },\n { token: 'keyword', foreground: removeHashtag(MonacoTheme.keyword) },\n {\n token: 'identifier.js',\n foreground: removeHashtag(MonacoTheme['identifier-js']),\n },\n {\n token: 'delimiter',\n foreground: removeHashtag(MonacoTheme.delimiter),\n },\n { token: 'comment', foreground: removeHashtag(MonacoTheme.comment) },\n { token: 'number', foreground: removeHashtag(MonacoTheme.number) },\n { token: 'storage', foreground: removeHashtag(MonacoTheme.storage) },\n {\n token: 'identifier',\n foreground: removeHashtag(MonacoTheme.identifier),\n },\n {\n token: 'namespace.identifier',\n foreground: removeHashtag(MonacoTheme['namespace-identifier']),\n },\n { token: 'operator', foreground: removeHashtag(MonacoTheme.operator) },\n {\n token: 'predefined',\n foreground: removeHashtag(MonacoTheme.predefined),\n },\n {\n token: 'error.log',\n foreground: MonacoTheme['log-error'].substring(1),\n },\n {\n token: 'warn.log',\n foreground: removeHashtag(MonacoTheme['log-warn']),\n },\n {\n token: 'info.log',\n foreground: removeHashtag(MonacoTheme['log-info']),\n },\n {\n token: 'stdout.log',\n foreground: removeHashtag(MonacoTheme['log-stdout']),\n },\n {\n token: 'trace.log',\n foreground: removeHashtag(MonacoTheme['log-trace']),\n },\n {\n token: 'debug.log',\n foreground: removeHashtag(MonacoTheme['log-debug']),\n },\n {\n token: 'date.log',\n foreground: removeHashtag(MonacoTheme['log-date']),\n },\n ];\n\n const dhDarkColors = {\n errorForeground: MonacoTheme['error-foreground'],\n 'inputOption.activeBorder': MonacoTheme['input-option-active-border'],\n 'editor.background': MonacoTheme.background,\n 'editor.foreground': MonacoTheme.foreground,\n 'editor.lineHighlightBackground': MonacoTheme['editor-line-highlight-bg'],\n 'editorLineNumber.foreground':\n MonacoTheme['editor-line-number-foreground'],\n 'editor.selectionBackground': MonacoTheme['editor-selection-background'],\n 'editor.findMatchBackground': MonacoTheme['editor-find-match-background'],\n 'editor.findMatchHighlightBackground':\n MonacoTheme['editor-find-match-highlight-background'],\n 'editorSuggestWidget.background':\n MonacoTheme['editor-suggest-widget-background'],\n 'editorSuggestWidget.border': MonacoTheme['editor-suggest-widget-border'],\n 'editorSuggestWidget.foreground':\n MonacoTheme['editor-suggest-widget-foreground'],\n 'editorSuggestWidget.selectedBackground':\n MonacoTheme['editor-suggest-widget-selected-background'],\n 'editorSuggestWidget.highlightForeground':\n MonacoTheme['editor-suggest-widget-highlightForeground'],\n 'list.hoverBackground': MonacoTheme['list-hover-background'],\n 'dropdown.background': MonacoTheme['context-menu-background'],\n 'dropdown.foreground': MonacoTheme['context-menu-foreground'],\n 'menu.selectionBackground': MonacoTheme['menu-selection-background'],\n 'list.focusBackground': MonacoTheme['menu-selection-background'],\n 'editorWidget.background': MonacoTheme['editor-widget-background'],\n 'inputOption.activeBackground':\n MonacoTheme['input-option-active-background'],\n 'inputOption.activeForeground':\n MonacoTheme['input-option-active-foreground'],\n focusBorder: MonacoTheme['focus-border'],\n 'input.background': MonacoTheme['input-background'],\n 'input.foreground': MonacoTheme['input-foreground'],\n 'input.border': MonacoTheme['input-border'],\n 'textLink.foreground': MonacoTheme['text-link-foreground'],\n 'textLink.activeForeground': MonacoTheme['text-link-active-foreground'],\n 'editorLink.activeForeground':\n MonacoTheme['editor-link-active-foreground'],\n };\n\n monaco.editor.defineTheme('dh-dark', {\n base: 'vs-dark',\n inherit: true,\n rules: dhDarkRules,\n colors: dhDarkColors,\n });\n log.debug2('monaco theme: ', MonacoTheme);\n monaco.editor.setTheme('dh-dark');\n\n registerLanguages([DbLang, PyLang, GroovyLang, LogLang, ScalaLang]);\n\n log.debug('Monaco initialized.');\n }\n\n /**\n * Register the getWorker function for Monaco\n * @param getWorker The getWorker function for Monaco\n */\n static registerGetWorker(getWorker: Environment['getWorker']): void {\n window.MonacoEnvironment = {\n ...window.MonacoEnvironment,\n getWorker,\n };\n }\n\n /**\n * Remove the hashtag prefix from a CSS color string.\n * Monaco expects colors to be the value only, no hashtag.\n * @param color The hex color string to remove the hashtag from, eg. '#ffffff'\n */\n static removeHashtag(color: string): string {\n return color.substring(1);\n }\n\n static registerLanguages(languages: Language[]): void {\n // First override the default loader for any language we have a custom definition for\n // https://github.com/Microsoft/monaco-editor/issues/252#issuecomment-482786867\n const languageIds = languages.map(({ id }) => id);\n monaco.languages\n .getLanguages()\n .filter(({ id }) => languageIds.includes(id))\n .forEach(languageParam => {\n const language = languageParam;\n log.debug2('Overriding default language loader:', language.id);\n });\n\n // Then register our language definitions\n languages.forEach(language => {\n MonacoUtils.registerLanguage(language);\n });\n }\n\n static registerLanguage(language: Language): void {\n log.debug2('Registering language: ', language.id);\n monaco.languages.register(language);\n\n monaco.languages.onLanguage(language.id, () => {\n monaco.languages.setLanguageConfiguration(language.id, language.conf);\n monaco.languages.setMonarchTokensProvider(language.id, language.language);\n });\n }\n\n /**\n * Set EOL preference for the editor\n * @param editor The editor to set the EOL for\n * @param eolSequence EOL sequence\n */\n static setEOL(\n editor: monaco.editor.IStandaloneCodeEditor,\n eolSequence = monaco.editor.EndOfLineSequence.LF\n ): void {\n editor.getModel()?.setEOL(eolSequence);\n }\n\n /**\n * Links an editor with a provided session to provide completion items.\n * @param session The IdeSession to link\n * @param editor The editor to link the session to\n * @returns A cleanup function for disposing of the created listeners\n */\n static openDocument(\n editor: monaco.editor.IStandaloneCodeEditor,\n session: IdeSession\n ): monaco.IDisposable {\n const model = editor.getModel();\n assertNotNull(model);\n const didOpenDocumentParams = {\n textDocument: {\n uri: `${model.uri}`,\n languageId: model.getLanguageId(),\n version: model.getVersionId(),\n text: model.getValue(),\n },\n };\n log.debug2('didOpenDocumentParams: ', didOpenDocumentParams);\n\n session.openDocument(didOpenDocumentParams);\n\n const dispose = editor.onDidChangeModelContent(changedEvent => {\n const { changes, versionId } = changedEvent;\n\n const contentChanges = [];\n for (let i = 0; i < changes.length; i += 1) {\n const change = changes[i];\n const { range, rangeLength, text } = change;\n const contentChange = {\n range: {\n start: {\n line: range.startLineNumber - 1,\n character: range.startColumn - 1,\n },\n end: {\n line: range.endLineNumber - 1,\n character: range.endColumn - 1,\n },\n },\n rangeLength,\n text,\n };\n\n contentChanges.push(contentChange);\n }\n\n if (contentChanges.length > 0) {\n const didChangeDocumentParams = {\n textDocument: {\n version: versionId,\n uri: `${model.uri}`,\n },\n contentChanges,\n };\n log.debug2('didChangeDocumentParams', didChangeDocumentParams);\n session.changeDocument(didChangeDocumentParams);\n }\n });\n\n return dispose;\n }\n\n static closeDocument(\n editor: monaco.editor.IStandaloneCodeEditor,\n session: IdeSession\n ): void {\n const model = editor.getModel();\n assertNotNull(model);\n const didCloseDocumentParams = {\n textDocument: {\n uri: `${model.uri}`,\n },\n };\n session.closeDocument(didCloseDocumentParams);\n }\n\n /**\n * Register a paste handle to clean up any garbage code pasted.\n * Most of this comes from copying from Slack, which has a bad habit of injecting their own characters in your code snippets.\n * I've emailed Slack about the issue and they're working on it. I can't reference a ticket number because their ticket system is entirely internally facing.\n * @param editor The editor the register the paste handler for\n */\n static registerPasteHandler(\n editor: monaco.editor.IStandaloneCodeEditor\n ): void {\n editor.onDidPaste(pasteEvent => {\n const smartQuotes = /“|”/g;\n const invalidChars = /\\u200b/g; // zero width space\n const invalidSpaces = /\\u00A0/g; // non-breaking space\n const editorModel = editor.getModel();\n assertNotNull(editorModel);\n const pastedText = editorModel.getValueInRange(pasteEvent.range);\n if (\n smartQuotes.test(pastedText) ||\n invalidChars.test(pastedText) ||\n invalidSpaces.test(pastedText)\n ) {\n editorModel.applyEdits([\n {\n range: pasteEvent.range,\n text: pastedText\n .replace(smartQuotes, '\"')\n .replace(invalidChars, '')\n .replace(invalidSpaces, ' '),\n },\n ]);\n }\n });\n }\n\n static isMacPlatform(): boolean {\n const { platform } = window.navigator;\n return platform.startsWith('Mac');\n }\n\n /**\n * Remove any keybindings which are used for our own shortcuts.\n * This allows the key events to bubble up so a component higher up can capture them\n * @param editor The editor to remove the keybindings from\n */\n static removeConflictingKeybindings(\n editor: monaco.editor.IStandaloneCodeEditor\n ): void {\n // Multi-mod key events have a specific order\n // E.g. ctrl+alt+UpArrow is not found, but alt+ctrl+UpArrow is found\n // meta is WindowsKey on Windows and cmd on Mac\n // ctrl is ctrl Windows and ctrl on Mac\n // alt is alt on Windows and option on Mac\n const keybindings = [\n {\n windows: 'ctrl+D',\n mac: 'meta+D',\n },\n {\n windows: 'ctrl+H',\n },\n ];\n\n try {\n keybindings.forEach(keybinding => {\n if (\n (MonacoUtils.isMacPlatform() && keybinding.mac === '') ||\n (!MonacoUtils.isMacPlatform() && keybinding.windows === '')\n ) {\n return;\n }\n MonacoUtils.removeKeybinding(\n editor,\n MonacoUtils.isMacPlatform() ? keybinding.mac : keybinding.windows\n );\n });\n } catch (err) {\n // This is probably only caused by Monaco changing private methods used here\n log.error(err);\n }\n }\n\n /**\n * Remove a keybinding and allow the events to bubble up\n * If you want the keybinding removed for all editors, add it to removeConflictingKeybindings\n * Monaco still captures the event if you choose to override the keybinding with a no-op function\n *\n * Based on the following comment to remove a keybinding and let the event bubble up\n * https://github.com/microsoft/monaco-editor/issues/287#issuecomment-331447475\n * The issue for an API for this has apparently been open since 2016. Link below\n * https://github.com/microsoft/monaco-editor/issues/102\n * @param editor The editor to remove the keybinding from\n * @param keybinding The key string to remove. E.g. 'ctrl+C' for copy on Windows\n */\n static removeKeybinding(\n editor: monaco.editor.IStandaloneCodeEditor,\n keybinding: string | undefined\n ): void {\n if (keybinding === undefined) {\n return;\n }\n\n /* eslint-disable no-underscore-dangle */\n // It's possible a single keybinding has multiple commands depending on context\n // @ts-ignore\n const keybindings = editor._standaloneKeybindingService\n ._getResolver()\n ._map.get(keybinding);\n\n if (keybindings != null) {\n keybindings.forEach((elem: { command: unknown }) => {\n log.debug2(\n `Removing Monaco keybinding ${keybinding} for ${elem.command}`\n );\n // @ts-ignore\n editor._standaloneKeybindingService.addDynamicKeybinding(\n `-${elem.command}`,\n null,\n () => undefined\n );\n });\n } else {\n log.warn(`Did not find any keybindings to remove for ${keybinding}`);\n }\n /* eslint-enable no-underscore-dangle */\n }\n\n static getMonacoKeyCodeFromShortcut(shortcut: Shortcut): number {\n const { keyState } = shortcut;\n const { keyValue } = keyState;\n if (keyValue === null) {\n return 0;\n }\n\n const isMac = MonacoUtils.isMacPlatform();\n\n if (isMac) {\n return (\n // eslint-disable-next-line no-bitwise\n (keyState.metaKey ? monaco.KeyMod.CtrlCmd : 0) |\n (keyState.shiftKey ? monaco.KeyMod.Shift : 0) |\n (keyState.altKey ? monaco.KeyMod.Alt : 0) |\n (keyState.ctrlKey ? monaco.KeyMod.WinCtrl : 0) |\n KeyCodeUtils.fromString(keyValue)\n );\n }\n\n return (\n // eslint-disable-next-line no-bitwise\n (keyState.ctrlKey ? monaco.KeyMod.CtrlCmd : 0) |\n (keyState.shiftKey ? monaco.KeyMod.Shift : 0) |\n (keyState.altKey ? monaco.KeyMod.Alt : 0) |\n (keyState.metaKey ? monaco.KeyMod.WinCtrl : 0) |\n KeyCodeUtils.fromString(keyValue)\n );\n }\n\n static provideLinks(\n model: monaco.editor.ITextModel\n ): { links: monaco.languages.ILink[] } {\n const newTokens: monaco.languages.ILink[] = [];\n\n for (let i = 1; i <= model.getLineCount(); i += 1) {\n const lineText = model.getLineContent(i);\n const tokens = linkifyFind(lineText);\n // map the tokens to the ranges - you know the line number now, use the token start/end as the startColumn/endColumn\n tokens.forEach(token => {\n newTokens.push({\n url: token.href,\n range: new monaco.Range(i, token.start + 1, i, token.end + 1),\n });\n });\n }\n\n return {\n links: newTokens,\n };\n }\n}\n\nexport default MonacoUtils;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,kBAAk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tils.js","names":["assertNotNull","find","linkifyFind","monaco","KeyCodeUtils","Log","MonacoTheme","PyLang","GroovyLang","ScalaLang","DbLang","LogLang","log","module","MonacoUtils","init","getWorker","debug","undefined","registerGetWorker","registerLanguages","removeHashtag","dhDarkRules","token","foreground","string","keyword","delimiter","comment","number","storage","identifier","operator","predefined","substring","dhDarkColors","errorForeground","background","focusBorder","editor","defineTheme","base","inherit","rules","colors","debug2","setTheme","window","MonacoEnvironment","color","languages","languageIds","map","id","getLanguages","filter","includes","forEach","languageParam","language","registerLanguage","register","onLanguage","setLanguageConfiguration","conf","setMonarchTokensProvider","setEOL","eolSequence","EndOfLineSequence","LF","getModel","openDocument","session","model","didOpenDocumentParams","textDocument","uri","languageId","getLanguageId","version","getVersionId","text","getValue","dispose","onDidChangeModelContent","changedEvent","changes","versionId","contentChanges","i","length","change","range","rangeLength","contentChange","start","line","startLineNumber","character","startColumn","end","endLineNumber","endColumn","push","didChangeDocumentParams","changeDocument","closeDocument","didCloseDocumentParams","registerPasteHandler","onDidPaste","pasteEvent","smartQuotes","invalidChars","invalidSpaces","editorModel","pastedText","getValueInRange","test","applyEdits","replace","isMacPlatform","platform","navigator","startsWith","removeConflictingKeybindings","keybindings","windows","mac","keybinding","removeKeybinding","err","error","_standaloneKeybindingService","_getResolver","_map","get","elem","command","addDynamicKeybinding","warn","getMonacoKeyCodeFromShortcut","shortcut","keyState","keyValue","isMac","metaKey","KeyMod","CtrlCmd","shiftKey","Shift","altKey","Alt","ctrlKey","WinCtrl","fromString","provideLinks","newTokens","lineText","getLineContent","originalTokens","tokens","type","value","url","href","Range","getLineCount","links"],"sources":["../../src/monaco/MonacoUtils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\n/**\n * Exports a function for initializing monaco with the deephaven theme/config\n */\nimport { Shortcut } from '@deephaven/components';\nimport { IdeSession } from '@deephaven/jsapi-shim';\nimport { assertNotNull } from '@deephaven/utils';\nimport { find as linkifyFind } from 'linkifyjs';\nimport * as monaco from 'monaco-editor';\nimport type { Environment } from 'monaco-editor';\n// @ts-ignore\nimport { KeyCodeUtils } from 'monaco-editor/esm/vs/base/common/keyCodes.js';\nimport Log from '@deephaven/log';\nimport MonacoTheme from './MonacoTheme.module.scss';\nimport PyLang from './lang/python';\nimport GroovyLang from './lang/groovy';\nimport ScalaLang from './lang/scala';\nimport DbLang from './lang/db';\nimport LogLang from './lang/log';\nimport { Language } from './lang/Language';\n\nconst log = Log.module('MonacoUtils');\n\ndeclare global {\n interface Window {\n MonacoEnvironment?: Environment;\n }\n}\n\nclass MonacoUtils {\n /**\n * Initializes Monaco for the environment\n * @param getWorker The getWorker function Monaco should use\n * The workers should be provided by the caller and bundled by their build system (e.g. Vite, Webpack)\n */\n static init({\n getWorker,\n }: { getWorker?: Environment['getWorker'] } = {}): void {\n log.debug('Initializing Monaco...');\n\n if (getWorker !== undefined) {\n MonacoUtils.registerGetWorker(getWorker);\n }\n\n const { registerLanguages, removeHashtag } = MonacoUtils;\n\n const dhDarkRules = [\n { token: '', foreground: removeHashtag(MonacoTheme.foreground) },\n { token: 'string', foreground: removeHashtag(MonacoTheme.string) },\n {\n token: 'string.delim',\n foreground: removeHashtag(MonacoTheme['string-delim']),\n },\n { token: 'keyword', foreground: removeHashtag(MonacoTheme.keyword) },\n {\n token: 'identifier.js',\n foreground: removeHashtag(MonacoTheme['identifier-js']),\n },\n {\n token: 'delimiter',\n foreground: removeHashtag(MonacoTheme.delimiter),\n },\n { token: 'comment', foreground: removeHashtag(MonacoTheme.comment) },\n { token: 'number', foreground: removeHashtag(MonacoTheme.number) },\n { token: 'storage', foreground: removeHashtag(MonacoTheme.storage) },\n {\n token: 'identifier',\n foreground: removeHashtag(MonacoTheme.identifier),\n },\n {\n token: 'namespace.identifier',\n foreground: removeHashtag(MonacoTheme['namespace-identifier']),\n },\n { token: 'operator', foreground: removeHashtag(MonacoTheme.operator) },\n {\n token: 'predefined',\n foreground: removeHashtag(MonacoTheme.predefined),\n },\n {\n token: 'error.log',\n foreground: MonacoTheme['log-error'].substring(1),\n },\n {\n token: 'warn.log',\n foreground: removeHashtag(MonacoTheme['log-warn']),\n },\n {\n token: 'info.log',\n foreground: removeHashtag(MonacoTheme['log-info']),\n },\n {\n token: 'stdout.log',\n foreground: removeHashtag(MonacoTheme['log-stdout']),\n },\n {\n token: 'trace.log',\n foreground: removeHashtag(MonacoTheme['log-trace']),\n },\n {\n token: 'debug.log',\n foreground: removeHashtag(MonacoTheme['log-debug']),\n },\n {\n token: 'date.log',\n foreground: removeHashtag(MonacoTheme['log-date']),\n },\n ];\n\n const dhDarkColors = {\n errorForeground: MonacoTheme['error-foreground'],\n 'inputOption.activeBorder': MonacoTheme['input-option-active-border'],\n 'editor.background': MonacoTheme.background,\n 'editor.foreground': MonacoTheme.foreground,\n 'editor.lineHighlightBackground': MonacoTheme['editor-line-highlight-bg'],\n 'editorLineNumber.foreground':\n MonacoTheme['editor-line-number-foreground'],\n 'editor.selectionBackground': MonacoTheme['editor-selection-background'],\n 'editor.findMatchBackground': MonacoTheme['editor-find-match-background'],\n 'editor.findMatchHighlightBackground':\n MonacoTheme['editor-find-match-highlight-background'],\n 'editorSuggestWidget.background':\n MonacoTheme['editor-suggest-widget-background'],\n 'editorSuggestWidget.border': MonacoTheme['editor-suggest-widget-border'],\n 'editorSuggestWidget.foreground':\n MonacoTheme['editor-suggest-widget-foreground'],\n 'editorSuggestWidget.selectedBackground':\n MonacoTheme['editor-suggest-widget-selected-background'],\n 'editorSuggestWidget.highlightForeground':\n MonacoTheme['editor-suggest-widget-highlightForeground'],\n 'list.hoverBackground': MonacoTheme['list-hover-background'],\n 'dropdown.background': MonacoTheme['context-menu-background'],\n 'dropdown.foreground': MonacoTheme['context-menu-foreground'],\n 'menu.selectionBackground': MonacoTheme['menu-selection-background'],\n 'list.focusBackground': MonacoTheme['menu-selection-background'],\n 'editorWidget.background': MonacoTheme['editor-widget-background'],\n 'inputOption.activeBackground':\n MonacoTheme['input-option-active-background'],\n 'inputOption.activeForeground':\n MonacoTheme['input-option-active-foreground'],\n focusBorder: MonacoTheme['focus-border'],\n 'input.background': MonacoTheme['input-background'],\n 'input.foreground': MonacoTheme['input-foreground'],\n 'input.border': MonacoTheme['input-border'],\n 'textLink.foreground': MonacoTheme['text-link-foreground'],\n 'textLink.activeForeground': MonacoTheme['text-link-active-foreground'],\n 'editorLink.activeForeground':\n MonacoTheme['editor-link-active-foreground'],\n };\n\n monaco.editor.defineTheme('dh-dark', {\n base: 'vs-dark',\n inherit: true,\n rules: dhDarkRules,\n colors: dhDarkColors,\n });\n log.debug2('monaco theme: ', MonacoTheme);\n monaco.editor.setTheme('dh-dark');\n\n registerLanguages([DbLang, PyLang, GroovyLang, LogLang, ScalaLang]);\n\n log.debug('Monaco initialized.');\n }\n\n /**\n * Register the getWorker function for Monaco\n * @param getWorker The getWorker function for Monaco\n */\n static registerGetWorker(getWorker: Environment['getWorker']): void {\n window.MonacoEnvironment = {\n ...window.MonacoEnvironment,\n getWorker,\n };\n }\n\n /**\n * Remove the hashtag prefix from a CSS color string.\n * Monaco expects colors to be the value only, no hashtag.\n * @param color The hex color string to remove the hashtag from, eg. '#ffffff'\n */\n static removeHashtag(color: string): string {\n return color.substring(1);\n }\n\n static registerLanguages(languages: Language[]): void {\n // First override the default loader for any language we have a custom definition for\n // https://github.com/Microsoft/monaco-editor/issues/252#issuecomment-482786867\n const languageIds = languages.map(({ id }) => id);\n monaco.languages\n .getLanguages()\n .filter(({ id }) => languageIds.includes(id))\n .forEach(languageParam => {\n const language = languageParam;\n log.debug2('Overriding default language loader:', language.id);\n });\n\n // Then register our language definitions\n languages.forEach(language => {\n MonacoUtils.registerLanguage(language);\n });\n }\n\n static registerLanguage(language: Language): void {\n log.debug2('Registering language: ', language.id);\n monaco.languages.register(language);\n\n monaco.languages.onLanguage(language.id, () => {\n monaco.languages.setLanguageConfiguration(language.id, language.conf);\n monaco.languages.setMonarchTokensProvider(language.id, language.language);\n });\n }\n\n /**\n * Set EOL preference for the editor\n * @param editor The editor to set the EOL for\n * @param eolSequence EOL sequence\n */\n static setEOL(\n editor: monaco.editor.IStandaloneCodeEditor,\n eolSequence = monaco.editor.EndOfLineSequence.LF\n ): void {\n editor.getModel()?.setEOL(eolSequence);\n }\n\n /**\n * Links an editor with a provided session to provide completion items.\n * @param session The IdeSession to link\n * @param editor The editor to link the session to\n * @returns A cleanup function for disposing of the created listeners\n */\n static openDocument(\n editor: monaco.editor.IStandaloneCodeEditor,\n session: IdeSession\n ): monaco.IDisposable {\n const model = editor.getModel();\n assertNotNull(model);\n const didOpenDocumentParams = {\n textDocument: {\n uri: `${model.uri}`,\n languageId: model.getLanguageId(),\n version: model.getVersionId(),\n text: model.getValue(),\n },\n };\n log.debug2('didOpenDocumentParams: ', didOpenDocumentParams);\n\n session.openDocument(didOpenDocumentParams);\n\n const dispose = editor.onDidChangeModelContent(changedEvent => {\n const { changes, versionId } = changedEvent;\n\n const contentChanges = [];\n for (let i = 0; i < changes.length; i += 1) {\n const change = changes[i];\n const { range, rangeLength, text } = change;\n const contentChange = {\n range: {\n start: {\n line: range.startLineNumber - 1,\n character: range.startColumn - 1,\n },\n end: {\n line: range.endLineNumber - 1,\n character: range.endColumn - 1,\n },\n },\n rangeLength,\n text,\n };\n\n contentChanges.push(contentChange);\n }\n\n if (contentChanges.length > 0) {\n const didChangeDocumentParams = {\n textDocument: {\n version: versionId,\n uri: `${model.uri}`,\n },\n contentChanges,\n };\n log.debug2('didChangeDocumentParams', didChangeDocumentParams);\n session.changeDocument(didChangeDocumentParams);\n }\n });\n\n return dispose;\n }\n\n static closeDocument(\n editor: monaco.editor.IStandaloneCodeEditor,\n session: IdeSession\n ): void {\n const model = editor.getModel();\n assertNotNull(model);\n const didCloseDocumentParams = {\n textDocument: {\n uri: `${model.uri}`,\n },\n };\n session.closeDocument(didCloseDocumentParams);\n }\n\n /**\n * Register a paste handle to clean up any garbage code pasted.\n * Most of this comes from copying from Slack, which has a bad habit of injecting their own characters in your code snippets.\n * I've emailed Slack about the issue and they're working on it. I can't reference a ticket number because their ticket system is entirely internally facing.\n * @param editor The editor the register the paste handler for\n */\n static registerPasteHandler(\n editor: monaco.editor.IStandaloneCodeEditor\n ): void {\n editor.onDidPaste(pasteEvent => {\n const smartQuotes = /“|”/g;\n const invalidChars = /\\u200b/g; // zero width space\n const invalidSpaces = /\\u00A0/g; // non-breaking space\n const editorModel = editor.getModel();\n assertNotNull(editorModel);\n const pastedText = editorModel.getValueInRange(pasteEvent.range);\n if (\n smartQuotes.test(pastedText) ||\n invalidChars.test(pastedText) ||\n invalidSpaces.test(pastedText)\n ) {\n editorModel.applyEdits([\n {\n range: pasteEvent.range,\n text: pastedText\n .replace(smartQuotes, '\"')\n .replace(invalidChars, '')\n .replace(invalidSpaces, ' '),\n },\n ]);\n }\n });\n }\n\n static isMacPlatform(): boolean {\n const { platform } = window.navigator;\n return platform.startsWith('Mac');\n }\n\n /**\n * Remove any keybindings which are used for our own shortcuts.\n * This allows the key events to bubble up so a component higher up can capture them\n * @param editor The editor to remove the keybindings from\n */\n static removeConflictingKeybindings(\n editor: monaco.editor.IStandaloneCodeEditor\n ): void {\n // Multi-mod key events have a specific order\n // E.g. ctrl+alt+UpArrow is not found, but alt+ctrl+UpArrow is found\n // meta is WindowsKey on Windows and cmd on Mac\n // ctrl is ctrl Windows and ctrl on Mac\n // alt is alt on Windows and option on Mac\n const keybindings = [\n {\n windows: 'ctrl+D',\n mac: 'meta+D',\n },\n {\n windows: 'ctrl+H',\n },\n ];\n\n try {\n keybindings.forEach(keybinding => {\n if (\n (MonacoUtils.isMacPlatform() && keybinding.mac === '') ||\n (!MonacoUtils.isMacPlatform() && keybinding.windows === '')\n ) {\n return;\n }\n MonacoUtils.removeKeybinding(\n editor,\n MonacoUtils.isMacPlatform() ? keybinding.mac : keybinding.windows\n );\n });\n } catch (err) {\n // This is probably only caused by Monaco changing private methods used here\n log.error(err);\n }\n }\n\n /**\n * Remove a keybinding and allow the events to bubble up\n * If you want the keybinding removed for all editors, add it to removeConflictingKeybindings\n * Monaco still captures the event if you choose to override the keybinding with a no-op function\n *\n * Based on the following comment to remove a keybinding and let the event bubble up\n * https://github.com/microsoft/monaco-editor/issues/287#issuecomment-331447475\n * The issue for an API for this has apparently been open since 2016. Link below\n * https://github.com/microsoft/monaco-editor/issues/102\n * @param editor The editor to remove the keybinding from\n * @param keybinding The key string to remove. E.g. 'ctrl+C' for copy on Windows\n */\n static removeKeybinding(\n editor: monaco.editor.IStandaloneCodeEditor,\n keybinding: string | undefined\n ): void {\n if (keybinding === undefined) {\n return;\n }\n\n /* eslint-disable no-underscore-dangle */\n // It's possible a single keybinding has multiple commands depending on context\n // @ts-ignore\n const keybindings = editor._standaloneKeybindingService\n ._getResolver()\n ._map.get(keybinding);\n\n if (keybindings != null) {\n keybindings.forEach((elem: { command: unknown }) => {\n log.debug2(\n `Removing Monaco keybinding ${keybinding} for ${elem.command}`\n );\n // @ts-ignore\n editor._standaloneKeybindingService.addDynamicKeybinding(\n `-${elem.command}`,\n null,\n () => undefined\n );\n });\n } else {\n log.warn(`Did not find any keybindings to remove for ${keybinding}`);\n }\n /* eslint-enable no-underscore-dangle */\n }\n\n static getMonacoKeyCodeFromShortcut(shortcut: Shortcut): number {\n const { keyState } = shortcut;\n const { keyValue } = keyState;\n if (keyValue === null) {\n return 0;\n }\n\n const isMac = MonacoUtils.isMacPlatform();\n\n if (isMac) {\n return (\n // eslint-disable-next-line no-bitwise\n (keyState.metaKey ? monaco.KeyMod.CtrlCmd : 0) |\n (keyState.shiftKey ? monaco.KeyMod.Shift : 0) |\n (keyState.altKey ? monaco.KeyMod.Alt : 0) |\n (keyState.ctrlKey ? monaco.KeyMod.WinCtrl : 0) |\n KeyCodeUtils.fromString(keyValue)\n );\n }\n\n return (\n // eslint-disable-next-line no-bitwise\n (keyState.ctrlKey ? monaco.KeyMod.CtrlCmd : 0) |\n (keyState.shiftKey ? monaco.KeyMod.Shift : 0) |\n (keyState.altKey ? monaco.KeyMod.Alt : 0) |\n (keyState.metaKey ? monaco.KeyMod.WinCtrl : 0) |\n KeyCodeUtils.fromString(keyValue)\n );\n }\n\n static provideLinks(\n model: monaco.editor.ITextModel\n ): { links: monaco.languages.ILink[] } {\n const newTokens: monaco.languages.ILink[] = [];\n\n for (let i = 1; i <= model.getLineCount(); i += 1) {\n const lineText = model.getLineContent(i);\n const originalTokens = linkifyFind(lineText);\n\n const tokens = originalTokens.filter(token => {\n if (token.type === 'url') {\n return /^https?:\\/\\//.test(token.value);\n }\n return true;\n });\n // map the tokens to the ranges - you know the line number now, use the token start/end as the startColumn/endColumn\n tokens.forEach(token => {\n newTokens.push({\n url: token.href,\n range: new monaco.Range(i, token.start + 1, i, token.end + 1),\n });\n });\n }\n\n return {\n links: newTokens,\n };\n }\n}\n\nexport default MonacoUtils;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,kBAAkB;AAChD,SAASC,IAAI,IAAIC,WAAW,QAAQ,WAAW;AAC/C,OAAO,KAAKC,MAAM,MAAM,eAAe;AAEvC;AACA,SAASC,YAAY,QAAQ,8CAA8C;AAC3E,OAAOC,GAAG,MAAM,gBAAgB;AAAC,OAC1BC,WAAW;AAAA,OACXC,MAAM;AAAA,OACNC,UAAU;AAAA,OACVC,SAAS;AAAA,OACTC,MAAM;AAAA,OACNC,OAAO;AAGd,IAAMC,GAAG,GAAGP,GAAG,CAACQ,MAAM,CAAC,aAAa,CAAC;AAQrC,MAAMC,WAAW,CAAC;EAChB;AACF;AACA;AACA;AACA;EACE,OAAOC,IAAI,GAE6C;IAAA,IAF5C;MACVC;IACwC,CAAC,uEAAG,CAAC,CAAC;IAC9CJ,GAAG,CAACK,KAAK,CAAC,wBAAwB,CAAC;IAEnC,IAAID,SAAS,KAAKE,SAAS,EAAE;MAC3BJ,WAAW,CAACK,iBAAiB,CAACH,SAAS,CAAC;IAC1C;IAEA,IAAM;MAAEI,iBAAiB;MAAEC;IAAc,CAAC,GAAGP,WAAW;I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,CAAC;MAE5C,IAAMG,MAAM,GAAGD,cAAc,CAACxG,MAAM,CAAChC,KAAK,IAAI;QAC5C,IAAIA,KAAK,CAAC0I,IAAI,KAAK,KAAK,EAAE;UACxB,OAAO,cAAc,CAAC5C,IAAI,CAAC9F,KAAK,CAAC2I,KAAK,CAAC;QACzC;QACA,OAAO,IAAI;MACb,CAAC,CAAC;MACF;MACAF,MAAM,CAACvG,OAAO,CAAClC,KAAK,IAAI;QACtBqI,SAAS,CAACrD,IAAI,CAAC;UACb4D,GAAG,EAAE5I,KAAK,CAAC6I,IAAI;UACfxE,KAAK,EAAE,IAAIzF,MAAM,CAACkK,KAAK,CAAC5E,CAAC,EAAElE,KAAK,CAACwE,KAAK,GAAG,CAAC,EAAEN,CAAC,EAAElE,KAAK,CAAC6E,GAAG,GAAG,CAAC;QAC9D,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ,CAAC;IAjBD,KAAK,IAAIX,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIhB,KAAK,CAAC6F,YAAY,EAAE,EAAE7E,CAAC,IAAI,CAAC;MAAA;IAAA;IAmBjD,OAAO;MACL8E,KAAK,EAAEX;IACT,CAAC;EACH;AACF;AAEA,eAAe9I,WAAW"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/console",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.4-beta.1+769d7533",
|
|
4
4
|
"description": "Deephaven Console",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@deephaven/chart": "^0.37.
|
|
27
|
-
"@deephaven/components": "^0.37.
|
|
28
|
-
"@deephaven/icons": "^0.37.
|
|
29
|
-
"@deephaven/jsapi-shim": "^0.37.
|
|
30
|
-
"@deephaven/log": "^0.37.
|
|
31
|
-
"@deephaven/storage": "^0.37.
|
|
32
|
-
"@deephaven/utils": "^0.37.
|
|
26
|
+
"@deephaven/chart": "^0.37.4-beta.1+769d7533",
|
|
27
|
+
"@deephaven/components": "^0.37.4-beta.1+769d7533",
|
|
28
|
+
"@deephaven/icons": "^0.37.4-beta.1+769d7533",
|
|
29
|
+
"@deephaven/jsapi-shim": "^0.37.4-beta.1+769d7533",
|
|
30
|
+
"@deephaven/log": "^0.37.4-beta.1+769d7533",
|
|
31
|
+
"@deephaven/storage": "^0.37.4-beta.1+769d7533",
|
|
32
|
+
"@deephaven/utils": "^0.37.4-beta.1+769d7533",
|
|
33
33
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
34
34
|
"classnames": "^2.3.1",
|
|
35
35
|
"linkifyjs": "^4.1.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"react-dom": "^17.x"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@deephaven/mocks": "^0.37.
|
|
52
|
-
"@deephaven/tsconfig": "^0.37.
|
|
51
|
+
"@deephaven/mocks": "^0.37.4-beta.1+769d7533",
|
|
52
|
+
"@deephaven/tsconfig": "^0.37.4-beta.1+769d7533"
|
|
53
53
|
},
|
|
54
54
|
"files": [
|
|
55
55
|
"dist"
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "769d7533cc2e840c83e2189d7ae20dce61eff3be"
|
|
64
64
|
}
|