dot-language-monaco
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -5,3 +5,3 @@ import type * as monaco from "monaco-editor-core"; | ||
createMonacoLanguageSupport(): MonacoService; | ||
registerCommands(editorInstance: monaco.editor.IStandaloneCodeEditor): void; | ||
registerCommands(monacoInstance: typeof monaco, getEditor: () => monaco.editor.IStandaloneCodeEditor): void; | ||
}; |
@@ -127,7 +127,8 @@ "use strict"; | ||
}, | ||
registerCommands(editorInstance) { | ||
const cmds = new monaco_languageclient_1.MonacoCommands(editorInstance); | ||
registerCommands(monacoInstance, getEditor) { | ||
const cmds = new monaco_languageclient_1.MonacoCommands(monacoInstance); | ||
for (const command of ls.getAvailableCommands()) { | ||
cmds.registerCommand(command, (...args) => { | ||
const m = editorInstance.getModel(); | ||
console.log(args); | ||
const m = getEditor().getModel(); | ||
if (m === null) | ||
@@ -134,0 +135,0 @@ return; |
@@ -5,3 +5,3 @@ import type * as monaco from "monaco-editor-core"; | ||
createMonacoLanguageSupport(): MonacoService; | ||
registerCommands(editorInstance: monaco.editor.IStandaloneCodeEditor): void; | ||
registerCommands(monacoInstance: typeof monaco, getEditor: () => monaco.editor.IStandaloneCodeEditor): void; | ||
}; |
@@ -124,7 +124,8 @@ import { MonacoToProtocolConverter, ProtocolToMonacoConverter, MonacoCommands, TextDocument } from "monaco-languageclient"; | ||
}, | ||
registerCommands(editorInstance) { | ||
const cmds = new MonacoCommands(editorInstance); | ||
registerCommands(monacoInstance, getEditor) { | ||
const cmds = new MonacoCommands(monacoInstance); | ||
for (const command of ls.getAvailableCommands()) { | ||
cmds.registerCommand(command, (...args) => { | ||
const m = editorInstance.getModel(); | ||
console.log(args); | ||
const m = getEditor().getModel(); | ||
if (m === null) | ||
@@ -131,0 +132,0 @@ return; |
{ | ||
"name": "dot-language-monaco", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Graphviz support for the Monaco editor component", | ||
@@ -5,0 +5,0 @@ "author": "Niklas Mollenhauer", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32614
681