diff --git a/dist/basic-setup.d.ts b/dist/basic-setup.d.ts index 58b00d3..e8d81e4 100644 --- a/dist/basic-setup.d.ts +++ b/dist/basic-setup.d.ts @@ -1,7 +1,7 @@ import { EditorState, EditorSelection, Compartment, SelectionRange, Facet, StateField, StateEffect, Transaction, Text, ChangeSet, combineConfig, Annotation } from "@codemirror/state"; import { julia as julia_andrey } from "@plutojl/lang-julia"; import { keymap, EditorView, highlightSpecialChars, drawSelection, placeholder, Decoration, ViewUpdate, ViewPlugin, WidgetType, lineNumbers, rectangularSelection, tooltips, showTooltip, Tooltip } from "@codemirror/view"; -import { defaultKeymap, indentMore, indentLess, historyKeymap, history } from "@codemirror/commands"; +import { defaultKeymap, indentMore, indentLess, moveLineUp, moveLineDown, historyKeymap, history } from "@codemirror/commands"; import { indentOnInput, indentUnit, syntaxTree, syntaxTreeAvailable, bracketMatching, foldGutter, foldKeymap, HighlightStyle, defaultHighlightStyle, syntaxHighlighting } from "@codemirror/language"; import { tags } from "@lezer/highlight"; import { closeBrackets, closeBracketsKeymap } from "@codemirror/autocomplete"; @@ -19,4 +19,4 @@ import { python, pythonLanguage } from "@codemirror/lang-python"; import { collab, receiveUpdates, sendableUpdates, getSyncedVersion, getClientID } from "@codemirror/collab"; import { linter, setDiagnostics, Diagnostic } from "@codemirror/lint"; export { css, cssLanguage }; -export { Facet, StateField, StateEffect, Transaction, ChangeSet, indentUnit, EditorState, EditorSelection, Compartment, EditorView, SelectionRange, placeholder, julia_andrey, keymap, history, historyKeymap, defaultKeymap, indentMore, indentLess, tags, HighlightStyle, syntaxHighlighting, syntaxTree, syntaxTreeAvailable, autocomplete, lineNumbers, highlightSpecialChars, foldGutter, drawSelection, indentOnInput, defaultHighlightStyle, bracketMatching, closeBrackets, rectangularSelection, highlightSelectionMatches, closeBracketsKeymap, searchKeymap, selectNextOccurrence, foldKeymap, completionKeymap, Decoration, ViewUpdate, ViewPlugin, WidgetType, TreeCursor, Text, Annotation, combineConfig, NodeProp, Tooltip, tooltips, showTooltip, markdown, markdownLanguage, parseCode, parseMixed, html, htmlLanguage, javascript, javascriptLanguage, sql, PostgreSQL, python, pythonLanguage, collab, receiveUpdates, sendableUpdates, getSyncedVersion, getClientID, linter, setDiagnostics, Diagnostic, }; +export { Facet, StateField, StateEffect, Transaction, ChangeSet, indentUnit, EditorState, EditorSelection, Compartment, EditorView, SelectionRange, placeholder, julia_andrey, keymap, history, historyKeymap, defaultKeymap, indentMore, indentLess, moveLineUp, moveLineDown, tags, HighlightStyle, syntaxHighlighting, syntaxTree, syntaxTreeAvailable, autocomplete, lineNumbers, highlightSpecialChars, foldGutter, drawSelection, indentOnInput, defaultHighlightStyle, bracketMatching, closeBrackets, rectangularSelection, highlightSelectionMatches, closeBracketsKeymap, searchKeymap, selectNextOccurrence, foldKeymap, completionKeymap, Decoration, ViewUpdate, ViewPlugin, WidgetType, TreeCursor, Text, Annotation, combineConfig, NodeProp, Tooltip, tooltips, showTooltip, markdown, markdownLanguage, parseCode, parseMixed, html, htmlLanguage, javascript, javascriptLanguage, sql, PostgreSQL, python, pythonLanguage, collab, receiveUpdates, sendableUpdates, getSyncedVersion, getClientID, linter, setDiagnostics, Diagnostic, }; diff --git a/dist/index.d.ts b/dist/index.d.ts index 11151ce..b2af50e 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -5542,6 +5542,14 @@ Default key bindings for the undo history. */ declare const historyKeymap: readonly KeyBinding[]; /** +Move the selected lines up one line. +*/ +declare const moveLineUp: StateCommand; +/** +Move the selected lines down one line. +*/ +declare const moveLineDown: StateCommand; +/** Add a [unit](https://codemirror.net/6/docs/ref/#language.indentUnit) of indentation to all selected lines. */ @@ -6878,4 +6886,4 @@ Get this editor's collaborative editing client ID. */ declare function getClientID(state: EditorState): string; -export { Annotation, ChangeSet, Compartment, Decoration, Diagnostic, EditorSelection, EditorState, EditorView, Facet, HighlightStyle, NodeProp, PostgreSQL, SelectionRange, StateEffect, StateField, Text, Tooltip, Transaction, TreeCursor, ViewPlugin, ViewUpdate, WidgetType, index_d as autocomplete, bracketMatching, closeBrackets, closeBracketsKeymap, collab, combineConfig, completionKeymap, css, cssLanguage, defaultHighlightStyle, defaultKeymap, drawSelection, foldGutter, foldKeymap, getClientID, getSyncedVersion, highlightSelectionMatches, highlightSpecialChars, history, historyKeymap, html, htmlLanguage, indentLess, indentMore, indentOnInput, indentUnit, javascript, javascriptLanguage, julia as julia_andrey, keymap, lineNumbers, linter, markdown, markdownLanguage, parseCode, parseMixed, placeholder, python, pythonLanguage, receiveUpdates, rectangularSelection, searchKeymap, selectNextOccurrence, sendableUpdates, setDiagnostics, showTooltip, sql, syntaxHighlighting, syntaxTree, syntaxTreeAvailable, tags, tooltips }; +export { Annotation, ChangeSet, Compartment, Decoration, Diagnostic, EditorSelection, EditorState, EditorView, Facet, HighlightStyle, NodeProp, PostgreSQL, SelectionRange, StateEffect, StateField, Text, Tooltip, Transaction, TreeCursor, ViewPlugin, ViewUpdate, WidgetType, index_d as autocomplete, bracketMatching, closeBrackets, closeBracketsKeymap, collab, combineConfig, completionKeymap, css, cssLanguage, defaultHighlightStyle, defaultKeymap, drawSelection, foldGutter, foldKeymap, getClientID, getSyncedVersion, highlightSelectionMatches, highlightSpecialChars, history, historyKeymap, html, htmlLanguage, indentLess, indentMore, indentOnInput, indentUnit, javascript, javascriptLanguage, julia as julia_andrey, keymap, lineNumbers, linter, markdown, markdownLanguage, moveLineDown, moveLineUp, parseCode, parseMixed, placeholder, python, pythonLanguage, receiveUpdates, rectangularSelection, searchKeymap, selectNextOccurrence, sendableUpdates, setDiagnostics, showTooltip, sql, syntaxHighlighting, syntaxTree, syntaxTreeAvailable, tags, tooltips }; diff --git a/dist/index.es.js b/dist/index.es.js index bb09c67..071f7c5 100644 --- a/dist/index.es.js +++ b/dist/index.es.js @@ -32356,4 +32356,4 @@ const lintExtensions = [ baseTheme ]; -export { Annotation, ChangeSet, Compartment, Decoration, EditorSelection, EditorState, EditorView, Facet, HighlightStyle, NodeProp, PostgreSQL, SelectionRange, StateEffect, StateField, Text, Transaction, TreeCursor, ViewPlugin, ViewUpdate, WidgetType, index as autocomplete, bracketMatching, closeBrackets, closeBracketsKeymap, collab, combineConfig, completionKeymap, css, cssLanguage, defaultHighlightStyle, defaultKeymap, drawSelection, foldGutter, foldKeymap, getClientID, getSyncedVersion, highlightSelectionMatches, highlightSpecialChars, history, historyKeymap, html, htmlLanguage, indentLess, indentMore, indentOnInput, indentUnit, javascript, javascriptLanguage, julia as julia_andrey, keymap, lineNumbers, linter, markdown, markdownLanguage, parseCode, parseMixed, placeholder, python, pythonLanguage, receiveUpdates, rectangularSelection, searchKeymap, selectNextOccurrence, sendableUpdates, setDiagnostics, showTooltip, sql, syntaxHighlighting, syntaxTree, syntaxTreeAvailable, tags$1 as tags, tooltips }; +export { Annotation, ChangeSet, Compartment, Decoration, EditorSelection, EditorState, EditorView, Facet, HighlightStyle, NodeProp, PostgreSQL, SelectionRange, StateEffect, StateField, Text, Transaction, TreeCursor, ViewPlugin, ViewUpdate, WidgetType, index as autocomplete, bracketMatching, closeBrackets, closeBracketsKeymap, collab, combineConfig, completionKeymap, css, cssLanguage, defaultHighlightStyle, defaultKeymap, drawSelection, foldGutter, foldKeymap, getClientID, getSyncedVersion, highlightSelectionMatches, highlightSpecialChars, history, historyKeymap, html, htmlLanguage, indentLess, indentMore, indentOnInput, indentUnit, javascript, javascriptLanguage, julia as julia_andrey, keymap, lineNumbers, linter, markdown, markdownLanguage, moveLineDown, moveLineUp, parseCode, parseMixed, placeholder, python, pythonLanguage, receiveUpdates, rectangularSelection, searchKeymap, selectNextOccurrence, sendableUpdates, setDiagnostics, showTooltip, sql, syntaxHighlighting, syntaxTree, syntaxTreeAvailable, tags$1 as tags, tooltips }; diff --git a/package.json b/package.json index 7fe79d5..2785f06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@plutojl/codemirror-pluto-setup", - "version": "1234.1.0", + "version": "1234.2.0", "description": "Example configuration for the CodeMirror code editor - as used by Pluto.jl", "scripts": { "bundle": "rollup -c" diff --git a/src/basic-setup.ts b/src/basic-setup.ts index e561b95..295a11e 100644 --- a/src/basic-setup.ts +++ b/src/basic-setup.ts @@ -34,6 +34,8 @@ import { defaultKeymap, indentMore, indentLess, + moveLineUp, + moveLineDown, historyKeymap, history, } from "@codemirror/commands" @@ -91,6 +93,8 @@ export { defaultKeymap, indentMore, indentLess, + moveLineUp, + moveLineDown, tags, HighlightStyle, syntaxHighlighting,