qword 1.1.7 → 1.1.9
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.
- package/ChangeLog +10 -0
- package/client/create.js +3 -0
- package/client/options.js +4 -1
- package/client/options.spec.js +8 -0
- package/dist/qword.js +2 -2
- package/dist/qword.js.map +1 -1
- package/dist-dev/qword.js +37 -37
- package/package.json +1 -1
- package/dist/2b22a33a0a80bb926bbc.png +0 -1
- package/dist/8e9019bd86255ac9a618.png +0 -1
- package/dist/codemirror.js +0 -2
- package/dist/codemirror.js.map +0 -1
- package/dist/dword.js +0 -2
- package/dist/dword.js.map +0 -1
- package/dist-dev/2b22a33a0a80bb926bbc.png +0 -1
- package/dist-dev/8e9019bd86255ac9a618.png +0 -1
- package/dist-dev/codemirror.js +0 -104
- package/dist-dev/dword.js +0 -960
- package/modules/codemirror-emmet/dist/emmet.js +0 -48661
- package/modules/codemirror-emmet/dist/emmet.min.js +0 -8
- package/modules/codemirror-emmet/dist/emmetPlugin.js +0 -840
- package/modules/codemirror-emmet/dist/emmetPlugin.min.js +0 -1
- package/modules/codemirror-emmet/dist/index.html +0 -46
- package/modules/jshint/README.md +0 -114
- package/modules/jshint/dist/jshint-rhino.js +0 -32143
- package/modules/jshint/dist/jshint.js +0 -32141
- package/modules/jshint/package.json +0 -77
package/ChangeLog
CHANGED
package/client/create.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
keymap,
|
|
7
7
|
} from '@codemirror/view';
|
|
8
8
|
import {history, historyKeymap} from '@codemirror/commands';
|
|
9
|
+
import {closeBrackets, closeBracketsKeymap} from '@codemirror/autocomplete';
|
|
9
10
|
import {
|
|
10
11
|
foldGutter,
|
|
11
12
|
codeFolding,
|
|
@@ -53,6 +54,8 @@ export function createEditor(element, options = {}) {
|
|
|
53
54
|
lineField,
|
|
54
55
|
themeCompartment.of(themeExtension(theme)),
|
|
55
56
|
keymapCompartment.of(keymapExtension(keyMap)),
|
|
57
|
+
closeBrackets(),
|
|
58
|
+
keymap.of(closeBracketsKeymap),
|
|
56
59
|
langCompartment.of(languageExtension(mode)),
|
|
57
60
|
syntaxHighlighting(highlightStyle),
|
|
58
61
|
indentOnInput(),
|
package/client/options.js
CHANGED
|
@@ -8,8 +8,11 @@ import {
|
|
|
8
8
|
defaultKeymap,
|
|
9
9
|
emacsStyleKeymap,
|
|
10
10
|
indentWithTab,
|
|
11
|
+
insertNewlineKeepIndent,
|
|
11
12
|
} from '@codemirror/commands';
|
|
12
13
|
|
|
14
|
+
const enterKeepIndent = {key: 'Enter', run: insertNewlineKeepIndent};
|
|
15
|
+
|
|
13
16
|
export function keymapExtension(name) {
|
|
14
17
|
if (name === 'vim')
|
|
15
18
|
return vim();
|
|
@@ -17,7 +20,7 @@ export function keymapExtension(name) {
|
|
|
17
20
|
if (name === 'emacs')
|
|
18
21
|
return keymap.of([...emacsStyleKeymap, indentWithTab]);
|
|
19
22
|
|
|
20
|
-
return keymap.of([
|
|
23
|
+
return keymap.of([enterKeepIndent, indentWithTab, ...defaultKeymap]);
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export function themeExtension(name) {
|
package/client/options.spec.js
CHANGED
|
@@ -155,3 +155,11 @@ test('options: setOption mode dispatches without throwing', (t) => {
|
|
|
155
155
|
t.ok(true);
|
|
156
156
|
t.end();
|
|
157
157
|
});
|
|
158
|
+
|
|
159
|
+
test('options: keymapExtension default has Enter before defaultKeymap', (t) => {
|
|
160
|
+
const extension = keymapExtension('default');
|
|
161
|
+
const bindings = extension.value;
|
|
162
|
+
const enterIndex = bindings.findIndex(({key}) => key === 'Enter' && bindings.indexOf({key}) < bindings.findIndex(({key: k}) => k === 'ArrowLeft'));
|
|
163
|
+
t.ok(Array.isArray(bindings));
|
|
164
|
+
t.end();
|
|
165
|
+
});
|