From db6933d72ffa2d220d0a1a9f8a8a8ad0b7b3117d Mon Sep 17 00:00:00 2001
From: Michiel Dral <m.c.dral@gmail.com>
Date: Tue, 15 Nov 2022 12:36:21 +0100
Subject: [PATCH] Fonsi made a PR to codemirror and we need that! (#9)

* :O

* 0.28.2
---
 dist/index.d.ts  |  12 ++++
 dist/index.es.js | 167 +++++++++++++++++++++++++++++++----------------
 package.json     |   6 +-
 yarn.lock        |  66 +++++++++----------
 4 files changed, 158 insertions(+), 93 deletions(-)

diff --git a/dist/index.d.ts b/dist/index.d.ts
index fd3c2bd..4b13057 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -1192,6 +1192,18 @@ declare class EditorState {
     /**
     Find the values for a given language data field, provided by the
     the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
+    
+    Examples of language data fields are...
+    
+    - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
+      comment syntax.
+    - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
+      for providing language-specific completion sources.
+    - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
+      characters that should be considered part of words in this
+      language.
+    - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
+      bracket closing behavior.
     */
     languageDataAt<T>(name: string, pos: number, side?: -1 | 0 | 1): readonly T[];
     /**
diff --git a/dist/index.es.js b/dist/index.es.js
index 3fedab2..463a33e 100644
--- a/dist/index.es.js
+++ b/dist/index.es.js
@@ -1659,18 +1659,20 @@ class FacetProvider {
                 return 0;
             },
             reconfigure: (state, oldState) => {
-                let newVal = getter(state);
-                let oldAddr = oldState.config.address[id];
+                let newVal, oldAddr = oldState.config.address[id];
                 if (oldAddr != null) {
                     let oldVal = getAddr(oldState, oldAddr);
                     if (this.dependencies.every(dep => {
                         return dep instanceof Facet ? oldState.facet(dep) === state.facet(dep) :
                             dep instanceof StateField ? oldState.field(dep, false) == state.field(dep, false) : true;
-                    }) || (multi ? compareArray(newVal, oldVal, compare) : compare(newVal, oldVal))) {
+                    }) || (multi ? compareArray(newVal = getter(state), oldVal, compare) : compare(newVal = getter(state), oldVal))) {
                         state.values[idx] = oldVal;
                         return 0;
                     }
                 }
+                else {
+                    newVal = getter(state);
+                }
                 state.values[idx] = newVal;
                 return 1 /* SlotStatus.Changed */;
             }
@@ -2804,6 +2806,18 @@ class EditorState {
     /**
     Find the values for a given language data field, provided by the
     the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
+    
+    Examples of language data fields are...
+    
+    - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
+      comment syntax.
+    - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
+      for providing language-specific completion sources.
+    - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
+      characters that should be considered part of words in this
+      language.
+    - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
+      bracket closing behavior.
     */
     languageDataAt(name, pos, side = -1) {
         let values = [];
@@ -3308,7 +3322,7 @@ class RangeSet {
     */
     static eq(oldSets, newSets, from = 0, to) {
         if (to == null)
-            to = 1000000000 /* C.Far */;
+            to = 1000000000 /* C.Far */ - 1;
         let a = oldSets.filter(set => !set.isEmpty && newSets.indexOf(set) < 0);
         let b = newSets.filter(set => !set.isEmpty && oldSets.indexOf(set) < 0);
         if (a.length != b.length)
@@ -12122,9 +12136,9 @@ handlers.beforeinput = (view, event) => {
 
 const wrappingWhiteSpace = ["pre-wrap", "normal", "pre-line", "break-spaces"];
 class HeightOracle {
-    constructor() {
+    constructor(lineWrapping) {
+        this.lineWrapping = lineWrapping;
         this.doc = Text.empty;
-        this.lineWrapping = false;
         this.heightSamples = {};
         this.lineHeight = 14;
         this.charWidth = 7;
@@ -12863,7 +12877,6 @@ class ViewState {
         this.contentDOMHeight = 0;
         this.editorHeight = 0;
         this.editorWidth = 0;
-        this.heightOracle = new HeightOracle;
         // See VP.MaxDOMHeight
         this.scaler = IdScaler;
         this.scrollTarget = null;
@@ -12883,6 +12896,8 @@ class ViewState {
         // boundary and, if so, reset it to make sure it is positioned in
         // the right place.
         this.mustEnforceCursorAssoc = false;
+        let guessWrapping = state.facet(contentAttributes).some(v => typeof v != "function" && v.class == "cm-lineWrapping");
+        this.heightOracle = new HeightOracle(guessWrapping);
         this.stateDeco = state.facet(decorations).filter(d => typeof d != "function");
         this.heightMap = HeightMap.empty().applyChanges(this.stateDeco, Text.empty, this.heightOracle.setDoc(state.doc), [new ChangedRange(0, 0, 0, state.doc.length)]);
         this.viewport = this.getViewport(0, null);
@@ -13001,9 +13016,7 @@ class ViewState {
             oracle.heightChanged = false;
             for (let vp of this.viewports) {
                 let heights = vp.from == this.viewport.from ? lineHeights : view.docView.measureVisibleLineHeights(vp);
-                this.heightMap = refresh
-                    ? HeightMap.empty().applyChanges(this.stateDeco, Text.empty, this.heightOracle, [new ChangedRange(0, 0, 0, view.state.doc.length)])
-                    : this.heightMap.updateHeight(oracle, 0, refresh, new MeasuredHeights(vp.from, heights));
+                this.heightMap = (refresh ? HeightMap.empty().applyChanges(this.stateDeco, Text.empty, this.heightOracle, [new ChangedRange(0, 0, 0, view.state.doc.length)]) : this.heightMap).updateHeight(oracle, 0, refresh, new MeasuredHeights(vp.from, heights));
             }
             if (oracle.heightChanged)
                 result |= 2 /* UpdateFlag.Height */;
@@ -13569,7 +13582,11 @@ class DOMChange {
         this.bounds = null;
         this.text = "";
         let { impreciseHead: iHead, impreciseAnchor: iAnchor } = view.docView;
-        if (start > -1 && !view.state.readOnly && (this.bounds = view.docView.domBoundsAround(start, end, 0))) {
+        if (view.state.readOnly && start > -1) {
+            // Ignore changes when the editor is read-only
+            this.newSel = null;
+        }
+        else if (start > -1 && (this.bounds = view.docView.domBoundsAround(start, end, 0))) {
             let selPoints = iHead || iAnchor ? [] : selectionPoints(view);
             let reader = new DOMReader(selPoints, view.state);
             reader.readRange(this.bounds.startDOM, this.bounds.endDOM);
@@ -15356,7 +15373,7 @@ function runHandlers(map, event, view, scope) {
     if (scopeObj) {
         if (runFor(scopeObj[prefix + modifiers(name, event, !isChar)]))
             return true;
-        if (isChar && (event.shiftKey || event.altKey || event.metaKey || charCode > 127) &&
+        if (isChar && (event.altKey || event.metaKey || event.ctrlKey) &&
             (baseName = base[event.keyCode]) && baseName != name) {
             if (runFor(scopeObj[prefix + modifiers(baseName, event, true)]))
                 return true;
@@ -16235,7 +16252,7 @@ const tooltipPlugin = /*@__PURE__*/ViewPlugin.fromClass(class {
             dom.classList.toggle("cm-tooltip-above", above);
             dom.classList.toggle("cm-tooltip-below", !above);
             if (tView.positioned)
-                tView.positioned();
+                tView.positioned(measured.space);
         }
     }
     maybeMeasure() {
@@ -18294,8 +18311,10 @@ class LanguageDescription {
 Facet that defines a way to provide a function that computes the
 appropriate indentation depth, as a column number (see
 [`indentString`](https://codemirror.net/6/docs/ref/#language.indentString)), at the start of a given
-line, or `null` to indicate no appropriate indentation could be
-determined.
+line. A return value of `null` indicates no indentation can be
+determined, and the line should inherit the indentation of the one
+above it. A return value of `undefined` defers to the next indent
+service.
 */
 const indentService = /*@__PURE__*/Facet.define();
 /**
@@ -18353,7 +18372,7 @@ function getIndentation(context, pos) {
         context = new IndentContext(context);
     for (let service of context.state.facet(indentService)) {
         let result = service(context, pos);
-        if (result != null)
+        if (result !== undefined)
             return result;
     }
     let tree = syntaxTree(context.state);
@@ -18689,7 +18708,7 @@ function syntaxFolding(state, start, end) {
     let tree = syntaxTree(state);
     if (tree.length < end)
         return null;
-    let inner = tree.resolveInner(end);
+    let inner = tree.resolveInner(end, 1);
     let found = null;
     for (let cur = inner; cur; cur = cur.parent) {
         if (cur.to <= end || cur.from > end)
@@ -19566,7 +19585,7 @@ function applyCompletion(view, option) {
     const apply = option.completion.apply || option.completion.label;
     let result = option.source;
     if (typeof apply == "string")
-        view.dispatch(insertCompletionText(view.state, apply, result.from, result.to));
+        view.dispatch(Object.assign(Object.assign({}, insertCompletionText(view.state, apply, result.from, result.to)), { annotations: pickedCompletion.of(option.completion) }));
     else
         apply(view, option.completion, result.from, result.to);
 }
@@ -19801,6 +19820,7 @@ class CompletionTooltip {
             write: (pos) => this.positionInfo(pos),
             key: this
         };
+        this.space = null;
         let cState = view.state.field(stateField);
         let { options, selected } = cState.open;
         let config = view.state.facet(completionConfig);
@@ -19826,10 +19846,17 @@ class CompletionTooltip {
     }
     mount() { this.updateSel(); }
     update(update) {
-        if (update.state.field(this.stateField) != update.startState.field(this.stateField))
+        var _a, _b, _c;
+        let cState = update.state.field(this.stateField);
+        let prevState = update.startState.field(this.stateField);
+        if (cState != prevState) {
             this.updateSel();
+            if (((_a = cState.open) === null || _a === void 0 ? void 0 : _a.disabled) != ((_b = prevState.open) === null || _b === void 0 ? void 0 : _b.disabled))
+                this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!((_c = cState.open) === null || _c === void 0 ? void 0 : _c.disabled));
+        }
     }
-    positioned() {
+    positioned(space) {
+        this.space = space;
         if (this.info)
             this.view.requestMeasure(this.placeInfo);
     }
@@ -19896,27 +19923,32 @@ class CompletionTooltip {
         let sel = this.dom.querySelector("[aria-selected]");
         if (!sel || !this.info)
             return null;
-        let win = this.dom.ownerDocument.defaultView || window;
         let listRect = this.dom.getBoundingClientRect();
         let infoRect = this.info.getBoundingClientRect();
         let selRect = sel.getBoundingClientRect();
-        if (selRect.top > Math.min(win.innerHeight, listRect.bottom) - 10 || selRect.bottom < Math.max(0, listRect.top) + 10)
+        let space = this.space;
+        if (!space) {
+            let win = this.dom.ownerDocument.defaultView || window;
+            space = { left: 0, top: 0, right: win.innerWidth, bottom: win.innerHeight };
+        }
+        if (selRect.top > Math.min(space.bottom, listRect.bottom) - 10 ||
+            selRect.bottom < Math.max(space.top, listRect.top) + 10)
             return null;
         let rtl = this.view.textDirection == Direction.RTL, left = rtl, narrow = false, maxWidth;
         let top = "", bottom = "";
-        let spaceLeft = listRect.left, spaceRight = win.innerWidth - listRect.right;
+        let spaceLeft = listRect.left - space.left, spaceRight = space.right - listRect.right;
         if (left && spaceLeft < Math.min(infoRect.width, spaceRight))
             left = false;
         else if (!left && spaceRight < Math.min(infoRect.width, spaceLeft))
             left = true;
         if (infoRect.width <= (left ? spaceLeft : spaceRight)) {
-            top = (Math.max(0, Math.min(selRect.top, win.innerHeight - infoRect.height)) - listRect.top) + "px";
+            top = (Math.max(space.top, Math.min(selRect.top, space.bottom - infoRect.height)) - listRect.top) + "px";
             maxWidth = Math.min(400 /* Info.Width */, left ? spaceLeft : spaceRight) + "px";
         }
         else {
             narrow = true;
-            maxWidth = Math.min(400 /* Info.Width */, (rtl ? listRect.right : win.innerWidth - listRect.left) - 30 /* Info.Margin */) + "px";
-            let spaceBelow = win.innerHeight - listRect.bottom;
+            maxWidth = Math.min(400 /* Info.Width */, (rtl ? listRect.right : space.right - listRect.left) - 30 /* Info.Margin */) + "px";
+            let spaceBelow = space.bottom - listRect.bottom;
             if (spaceBelow >= infoRect.height || spaceBelow > listRect.top) // Below the completion
                 top = (selRect.bottom - listRect.top) + "px";
             else // Above it
@@ -20025,21 +20057,24 @@ function sortOptions(active, state) {
     return result;
 }
 class CompletionDialog {
-    constructor(options, attrs, tooltip, timestamp, selected) {
+    constructor(options, attrs, tooltip, timestamp, selected, disabled) {
         this.options = options;
         this.attrs = attrs;
         this.tooltip = tooltip;
         this.timestamp = timestamp;
         this.selected = selected;
+        this.disabled = disabled;
     }
     setSelected(selected, id) {
         return selected == this.selected || selected >= this.options.length ? this
-            : new CompletionDialog(this.options, makeAttrs(id, selected), this.tooltip, this.timestamp, selected);
+            : new CompletionDialog(this.options, makeAttrs(id, selected), this.tooltip, this.timestamp, selected, this.disabled);
     }
     static build(active, state, id, prev, conf) {
         let options = sortOptions(active, state);
-        if (!options.length)
-            return null;
+        if (!options.length) {
+            return prev && active.some(a => a.state == 1 /* State.Pending */) ?
+                new CompletionDialog(prev.options, prev.attrs, prev.tooltip, prev.timestamp, prev.selected, true) : null;
+        }
         let selected = state.facet(completionConfig).selectOnOpen ? 0 : -1;
         if (prev && prev.selected != selected && prev.selected != -1) {
             let selectedValue = prev.options[prev.selected].completion;
@@ -20053,10 +20088,10 @@ class CompletionDialog {
             pos: active.reduce((a, b) => b.hasResult() ? Math.min(a, b.from) : a, 1e8),
             create: completionTooltip(completionState),
             above: conf.aboveCursor,
-        }, prev ? prev.timestamp : Date.now(), selected);
+        }, prev ? prev.timestamp : Date.now(), selected, false);
     }
     map(changes) {
-        return new CompletionDialog(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: changes.mapPos(this.tooltip.pos) }), this.timestamp, this.selected);
+        return new CompletionDialog(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: changes.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled);
     }
 }
 class CompletionState {
@@ -20079,9 +20114,12 @@ class CompletionState {
         });
         if (active.length == this.active.length && active.every((a, i) => a == this.active[i]))
             active = this.active;
-        let open = tr.selection || active.some(a => a.hasResult() && tr.changes.touchesRange(a.from, a.to)) ||
-            !sameResults(active, this.active) ? CompletionDialog.build(active, state, this.id, this.open, conf)
-            : this.open && tr.docChanged ? this.open.map(tr.changes) : this.open;
+        let open = this.open;
+        if (tr.selection || active.some(a => a.hasResult() && tr.changes.touchesRange(a.from, a.to)) ||
+            !sameResults(active, this.active))
+            open = CompletionDialog.build(active, state, this.id, this.open, conf);
+        else if (open && tr.docChanged)
+            open = open.map(tr.changes);
         if (!open && active.every(a => a.state != 1 /* State.Pending */) && active.some(a => a.hasResult()))
             active = active.map(a => a.hasResult() ? new ActiveSource(a.source, 0 /* State.Inactive */) : a);
         for (let effect of tr.effects)
@@ -20221,7 +20259,7 @@ backward by the given amount.
 function moveCompletionSelection(forward, by = "option") {
     return (view) => {
         let cState = view.state.field(completionState, false);
-        if (!cState || !cState.open ||
+        if (!cState || !cState.open || cState.open.disabled ||
             Date.now() - cState.open.timestamp < view.state.facet(completionConfig).interactionDelay)
             return false;
         let step = 1, tooltip;
@@ -20246,7 +20284,8 @@ const acceptCompletion = (view) => {
     if (view.state.readOnly || !cState || !cState.open || cState.open.selected < 0 ||
         Date.now() - cState.open.timestamp < view.state.facet(completionConfig).interactionDelay)
         return false;
-    applyCompletion(view, cState.open.options[cState.open.selected]);
+    if (!cState.open.disabled)
+        applyCompletion(view, cState.open.options[cState.open.selected]);
     return true;
 };
 /**
@@ -20451,10 +20490,16 @@ const baseTheme$2 = /*@__PURE__*/EditorView.baseTheme({
         background: "#17c",
         color: "white",
     },
+    "&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
+        background: "#777",
+    },
     "&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
         background: "#347",
         color: "white",
     },
+    "&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
+        background: "#444",
+    },
     ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
         content: '"···"',
         opacity: 0.5,
@@ -21163,7 +21208,7 @@ Returns the available completions as an array.
 function currentCompletions(state) {
     var _a;
     let open = (_a = state.field(completionState, false)) === null || _a === void 0 ? void 0 : _a.open;
-    if (!open)
+    if (!open || open.disabled)
         return [];
     let completions = completionArrayCache.get(open.options);
     if (!completions)
@@ -21176,7 +21221,7 @@ Return the currently selected completion, if any.
 function selectedCompletion(state) {
     var _a;
     let open = (_a = state.field(completionState, false)) === null || _a === void 0 ? void 0 : _a.open;
-    return open && open.selected >= 0 ? open.options[open.selected].completion : null;
+    return open && !open.disabled && open.selected >= 0 ? open.options[open.selected].completion : null;
 }
 /**
 Returns the currently selected position in the active completion
@@ -21185,7 +21230,7 @@ list, or null if no completions are active.
 function selectedCompletionIndex(state) {
     var _a;
     let open = (_a = state.field(completionState, false)) === null || _a === void 0 ? void 0 : _a.open;
-    return open && open.selected >= 0 ? open.selected : null;
+    return open && !open.disabled && open.selected >= 0 ? open.selected : null;
 }
 /**
 Create an effect that can be attached to a transaction to change
@@ -23822,14 +23867,14 @@ class SearchPanel {
                 crelt("br"),
                 this.replaceField,
                 button("replace", () => replaceNext(view), [phrase(view, "replace")]),
-                button("replaceAll", () => replaceAll(view), [phrase(view, "replace all")]),
-                crelt("button", {
-                    name: "close",
-                    onclick: () => closeSearchPanel(view),
-                    "aria-label": phrase(view, "close"),
-                    type: "button"
-                }, ["×"])
-            ]
+                button("replaceAll", () => replaceAll(view), [phrase(view, "replace all")])
+            ],
+            crelt("button", {
+                name: "close",
+                onclick: () => closeSearchPanel(view),
+                "aria-label": phrase(view, "close"),
+                type: "button"
+            }, ["×"])
         ]);
     }
     commit() {
@@ -27467,6 +27512,15 @@ const htmlLanguage = /*@__PURE__*/LRLanguage.define({
             })
         ],
         wrap: /*@__PURE__*/configureNesting([
+            { tag: "script",
+                attrs: attrs => attrs.type == "text/typescript" || attrs.lang == "ts",
+                parser: typescriptLanguage.parser },
+            { tag: "script",
+                attrs: attrs => attrs.type == "text/jsx",
+                parser: jsxLanguage.parser },
+            { tag: "script",
+                attrs: attrs => attrs.type == "text/typescript-jsx",
+                parser: tsxLanguage.parser },
             { tag: "script",
                 attrs(attrs) {
                     return !attrs.type || /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(attrs.type);
@@ -27725,9 +27779,8 @@ const insertNewlineContinueMarkup = ({ state, dispatch }) => {
             }
             else { // Move this line down
                 let insert = "";
-                for (let i = 0, pos = 0, e = context.length - 2; i <= e; i++) {
-                    insert += context[i].blank(i < e ? context[i + 1].from - pos : null, i < e);
-                    pos = context[i].to;
+                for (let i = 0, e = context.length - 2; i <= e; i++) {
+                    insert += context[i].blank(i < e ? context[i + 1].from - insert.length : null, i < e);
                 }
                 insert += state.lineBreak;
                 return { range: EditorSelection.cursor(pos + insert.length), changes: { from: line.from, insert } };
@@ -27745,19 +27798,19 @@ const insertNewlineContinueMarkup = ({ state, dispatch }) => {
         let changes = [];
         if (inner.node.name == "OrderedList")
             renumberList(inner.item, doc, changes);
-        let insert = state.lineBreak;
         let continued = inner.item && inner.item.from < line.from;
+        let insert = "";
         // If not dedented
         if (!continued || /^[\s\d.)\-+*>]*/.exec(line.text)[0].length >= inner.to) {
-            for (let i = 0, pos = 0, e = context.length - 1; i <= e; i++) {
+            for (let i = 0, e = context.length - 1; i <= e; i++) {
                 insert += i == e && !continued ? context[i].marker(doc, 1)
-                    : context[i].blank(i < e ? context[i + 1].from - pos : null);
-                pos = context[i].to;
+                    : context[i].blank(i < e ? context[i + 1].from - insert.length : null);
             }
         }
         let from = pos;
         while (from > line.from && /\s/.test(line.text.charAt(from - line.from - 1)))
             from--;
+        insert = state.lineBreak + insert;
         changes.push({ from, to: pos, insert });
         return { range: EditorSelection.cursor(from + insert.length), changes };
     });
@@ -28003,7 +28056,7 @@ const defaults = {
     spaceAfterDashes: false,
     slashComments: false,
     doubleQuotedStrings: false,
-    doubleDollarStrings: false,
+    doubleDollarQuotedStrings: false,
     unquotedBitLiterals: false,
     treatBitsAsBytes: false,
     charSetCasts: false,
@@ -28030,7 +28083,7 @@ function tokensFor(d) {
                 input.advance();
             input.acceptToken(whitespace);
         }
-        else if (next == 36 /* Ch.Dollar */ && input.next == 36 /* Ch.Dollar */ && d.doubleDollarStrings) {
+        else if (next == 36 /* Ch.Dollar */ && input.next == 36 /* Ch.Dollar */ && d.doubleDollarQuotedStrings) {
             readDoubleDollarLiteral(input);
             input.acceptToken(String$1);
         }
diff --git a/package.json b/package.json
index 83d4b7d..17bf436 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
     "name": "@plutojl/codemirror-pluto-setup",
-    "version": "0.28.1",
+    "version": "0.28.2",
     "description": "Example configuration for the CodeMirror code editor - as used by Pluto.jl",
     "scripts": {
         "bundle": "rollup -c"
@@ -34,7 +34,7 @@
         "tabWidth": 4
     },
     "dependencies": {
-        "@codemirror/autocomplete": "^6.3.0",
+        "@codemirror/autocomplete": "^6.3.1",
         "@codemirror/collab": "^6.0.0",
         "@codemirror/commands": "^6.1.2",
         "@codemirror/lang-css": "^6.0.1",
@@ -47,7 +47,7 @@
         "@codemirror/lint": "^6.0.0",
         "@codemirror/search": "^6.2.2",
         "@codemirror/state": "^6.1.2",
-        "@codemirror/view": "^6.4.0",
+        "@codemirror/view": "^6.5.0",
         "@lezer/common": "^1.0.1",
         "@lezer/highlight": "^1.1.2",
         "@lezer/markdown": "^1.0.2",
diff --git a/yarn.lock b/yarn.lock
index b1657e9..dcca784 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -23,14 +23,14 @@
     chalk "^2.0.0"
     js-tokens "^4.0.0"
 
-"@codemirror/autocomplete@^6.0.0", "@codemirror/autocomplete@^6.3.0":
-  version "6.3.0"
-  resolved "https://registry.yarnpkg.com/@codemirror/autocomplete/-/autocomplete-6.3.0.tgz#217e16bb6ce63374ec7b9d2a01d007ba53ff0aff"
-  integrity sha512-4jEvh3AjJZTDKazd10J6ZsCIqaYxDMCeua5ouQxY8hlFIml+nr7le0SgBhT3SIytFBmdzPK3AUhXGuW3T79nVg==
+"@codemirror/autocomplete@^6.0.0", "@codemirror/autocomplete@^6.3.0", "@codemirror/autocomplete@^6.3.1":
+  version "6.3.1"
+  resolved "https://registry.yarnpkg.com/@codemirror/autocomplete/-/autocomplete-6.3.1.tgz#1dae99f69fd93b4b6275bb85e1a72f7b903369d7"
+  integrity sha512-t7oq6gz7fkZsrnGDrtFLfk4l3YivTpq/fqqxtzOAV/YGlr16jQFxIqOpUrjE2Eb914GXOwERfUz+TYOxx4L76w==
   dependencies:
     "@codemirror/language" "^6.0.0"
     "@codemirror/state" "^6.0.0"
-    "@codemirror/view" "^6.0.0"
+    "@codemirror/view" "^6.5.0"
     "@lezer/common" "^1.0.0"
 
 "@codemirror/collab@^6.0.0":
@@ -61,9 +61,9 @@
     "@lezer/css" "^1.0.0"
 
 "@codemirror/lang-html@^6.0.0", "@codemirror/lang-html@^6.1.3":
-  version "6.1.3"
-  resolved "https://registry.yarnpkg.com/@codemirror/lang-html/-/lang-html-6.1.3.tgz#b13f542e50c210f8f8ada2fb08f12836593e07fe"
-  integrity sha512-LmtIElopGK6bBfddAyjBitS6hz8nFr/PVUtvqmfomXlHB4m+Op2d5eGk/X9/CSby6Y8NqXXkGa3yDd9lfJ6Qlg==
+  version "6.1.4"
+  resolved "https://registry.yarnpkg.com/@codemirror/lang-html/-/lang-html-6.1.4.tgz#0c3cab2907dd557f214dd7b1be5a6f71bda0b709"
+  integrity sha512-sMXDSmOzQkvQdJq+v/Bfs7y29wDdhsFZfKftchfHBF6aBD+x7lGCBFzBpn5+JCdyvAYi7LLfQcjVvIxy41PkAw==
   dependencies:
     "@codemirror/autocomplete" "^6.0.0"
     "@codemirror/lang-css" "^6.0.0"
@@ -88,9 +88,9 @@
     "@lezer/javascript" "^1.0.0"
 
 "@codemirror/lang-markdown@^6.0.4":
-  version "6.0.4"
-  resolved "https://registry.yarnpkg.com/@codemirror/lang-markdown/-/lang-markdown-6.0.4.tgz#184eebadb232a5fb60cfcb66163da838ba646983"
-  integrity sha512-w50etMCYnm4btsVwOkREVc73sHk2+ZXA0q0nb7hNhjQ/NeEix9jRa63l/FUgrsfG2jjuRqsXTNjGdmmcorkTBQ==
+  version "6.0.5"
+  resolved "https://registry.yarnpkg.com/@codemirror/lang-markdown/-/lang-markdown-6.0.5.tgz#61393c7e2552528daee6aa4eca63428aa00832bd"
+  integrity sha512-qH0THRYc2M7pIJoAp6jstXZkv8ZMVhNaBm7Bs4+0SLHhHlwX53txFy98AcPwrfq0Sh8Zi6RAuj9j/GyL8E1MKw==
   dependencies:
     "@codemirror/lang-html" "^6.0.0"
     "@codemirror/language" "^6.3.0"
@@ -108,9 +108,9 @@
     "@lezer/python" "^1.0.0"
 
 "@codemirror/lang-sql@^6.3.2":
-  version "6.3.2"
-  resolved "https://registry.yarnpkg.com/@codemirror/lang-sql/-/lang-sql-6.3.2.tgz#478bbe741daa5b2f53b647ec6d1b5ca19f1ed297"
-  integrity sha512-lbk2jBVvVK6NkIEn6HU3RwLh368qEcGP5bknwv6kiLGffFZHNoXj/J/F/YNXSynsgswapBofb3J6yVwsjXYQPw==
+  version "6.3.3"
+  resolved "https://registry.yarnpkg.com/@codemirror/lang-sql/-/lang-sql-6.3.3.tgz#3a0cad06cd5be5557850035c5f6592ea41dd21c2"
+  integrity sha512-VNsHju8500fkiDyDU8jZyGQ8M0iXU0SmfeCoCeAYkACcEFlX63BOT8311pICXyw43VYRbS23w54RgSEQmixGjQ==
   dependencies:
     "@codemirror/autocomplete" "^6.0.0"
     "@codemirror/language" "^6.0.0"
@@ -119,9 +119,9 @@
     "@lezer/lr" "^1.0.0"
 
 "@codemirror/language@^6.0.0", "@codemirror/language@^6.3.0":
-  version "6.3.0"
-  resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.3.0.tgz#141c715e1fce5f6dcca3b1b984ed8f03f583dd5c"
-  integrity sha512-6jOE5DEt6sKD46SXhn3xPbBehn+l48ACcA6Uxs2k+E2YNH9XGF5WdGMTYr2DlggfK4h0QZBK6zEb5S7lkTriWA==
+  version "6.3.1"
+  resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.3.1.tgz#1d61f33aa5de9aa74a713ee1f5ce600adc74df6b"
+  integrity sha512-MK+G1QKaGfSEUg9YEFaBkMBI6j1ge4VMBPZv9fDYotw7w695c42x5Ba1mmwBkesYnzYFBfte6Hh9TDcKa6xORQ==
   dependencies:
     "@codemirror/state" "^6.0.0"
     "@codemirror/view" "^6.0.0"
@@ -131,32 +131,32 @@
     style-mod "^4.0.0"
 
 "@codemirror/lint@^6.0.0":
-  version "6.0.0"
-  resolved "https://registry.yarnpkg.com/@codemirror/lint/-/lint-6.0.0.tgz#a249b021ac9933b94fe312d994d220f0ef11a157"
-  integrity sha512-nUUXcJW1Xp54kNs+a1ToPLK8MadO0rMTnJB8Zk4Z8gBdrN0kqV7uvUraU/T2yqg+grDNR38Vmy/MrhQN/RgwiA==
+  version "6.1.0"
+  resolved "https://registry.yarnpkg.com/@codemirror/lint/-/lint-6.1.0.tgz#f006142d3a580fdb8ffc2faa3361b2232c08e079"
+  integrity sha512-mdvDQrjRmYPvQ3WrzF6Ewaao+NWERYtpthJvoQ3tK3t/44Ynhk8ZGjTSL9jMEv8CgSMogmt75X8ceOZRDSXHtQ==
   dependencies:
     "@codemirror/state" "^6.0.0"
     "@codemirror/view" "^6.0.0"
     crelt "^1.0.5"
 
 "@codemirror/search@^6.2.2":
-  version "6.2.2"
-  resolved "https://registry.yarnpkg.com/@codemirror/search/-/search-6.2.2.tgz#278ac204bd19a038271595ce060ad32c13eb70a6"
-  integrity sha512-2pWY599zXk+lSoJ2iv9EuTO4gB7lhgBPLPwFb/zTbimFH4NmZSaKzJSV51okjABZ7/Rj0DYy5klWbIgaJh2LoQ==
+  version "6.2.3"
+  resolved "https://registry.yarnpkg.com/@codemirror/search/-/search-6.2.3.tgz#fab933fef1b1de8ef40cda275c73d9ac7a1ff40f"
+  integrity sha512-V9n9233lopQhB1dyjsBK2Wc1i+8hcCqxl1wQ46c5HWWLePoe4FluV3TGHoZ04rBRlGjNyz9DTmpJErig8UE4jw==
   dependencies:
     "@codemirror/state" "^6.0.0"
     "@codemirror/view" "^6.0.0"
     crelt "^1.0.5"
 
 "@codemirror/state@^6.0.0", "@codemirror/state@^6.1.2":
-  version "6.1.2"
-  resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.1.2.tgz#182d46eabcc17c95508984d6add5a5a641dcd517"
-  integrity sha512-Mxff85Hp5va+zuj+H748KbubXjrinX/k28lj43H14T2D0+4kuvEFIEIO7hCEcvBT8ubZyIelt9yGOjj2MWOEQA==
+  version "6.1.3"
+  resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.1.3.tgz#39bf545c589f51b6978716d188d34f7d7c483350"
+  integrity sha512-0Rn7vadZ6EgHaKdIOwyhBWLdPDh1JM5USYqXjxwrvpmTKWu4wQ77twgAYEg1MU282XcrnV4ZqFf+00bu6UPCyg==
 
-"@codemirror/view@^6.0.0", "@codemirror/view@^6.2.2", "@codemirror/view@^6.4.0", "@codemirror/view@^6.4.1":
-  version "6.4.1"
-  resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.4.1.tgz#7526bd473b8e5e5f7bade834121864b8f7d2649f"
-  integrity sha512-QdBpD6E5HYx6YFXXhqwrRyQ83w7CxWZnchM4QpWBVkkmV7/oJT8N+yz2KAi2iRaLObc/aOf7C2RCQTO2yswF8A==
+"@codemirror/view@^6.0.0", "@codemirror/view@^6.2.2", "@codemirror/view@^6.4.1", "@codemirror/view@^6.5.0":
+  version "6.5.0"
+  resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.5.0.tgz#b9a4f9741d65c4e00159956a94c249fe0c864fb6"
+  integrity sha512-dapE7AywjyYoHBHn4n+wCRKFqMEmYZHHlfyoSO+e1P6MK4az1wg9t7mfwbdI9mXuBzmPBX7NmU3Xmq+qmxDOLw==
   dependencies:
     "@codemirror/state" "^6.0.0"
     style-mod "^4.0.0"
@@ -417,9 +417,9 @@ rollup-plugin-dts@^5.0.0:
     "@babel/code-frame" "^7.18.6"
 
 rollup@^3.2.5:
-  version "3.2.5"
-  resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.2.5.tgz#9452168ac083218c8212bf53d2448bdc6b8b0de7"
-  integrity sha512-/Ha7HhVVofduy+RKWOQJrxe4Qb3xyZo+chcpYiD8SoQa4AG7llhupUtyfKSSrdBM2mWJjhM8wZwmbY23NmlIYw==
+  version "3.3.0"
+  resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.3.0.tgz#ae8dc84808a9c75d775d8b2ed8db1adada31a581"
+  integrity sha512-wqOV/vUJCYEbWsXvwCkgGWvgaEnsbn4jxBQWKpN816CqsmCimDmCNJI83c6if7QVD4v/zlyRzxN7U2yDT5rfoA==
   optionalDependencies:
     fsevents "~2.3.2"