@kerebron/extension-codemirror 0.2.1 → 0.3.0
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/README.md +4 -3
- package/esm/editor/src/CoreEditor.d.ts +11 -5
- package/esm/editor/src/CoreEditor.d.ts.map +1 -1
- package/esm/editor/src/CoreEditor.js +62 -61
- package/esm/editor/src/DummyEditorView.d.ts +60 -0
- package/esm/editor/src/DummyEditorView.d.ts.map +1 -0
- package/esm/editor/src/DummyEditorView.js +277 -0
- package/esm/editor/src/Extension.d.ts +9 -9
- package/esm/editor/src/Extension.d.ts.map +1 -1
- package/esm/editor/src/Extension.js +2 -2
- package/esm/editor/src/ExtensionManager.d.ts +8 -7
- package/esm/editor/src/ExtensionManager.d.ts.map +1 -1
- package/esm/editor/src/ExtensionManager.js +58 -39
- package/esm/editor/src/Mark.d.ts +8 -6
- package/esm/editor/src/Mark.d.ts.map +1 -1
- package/esm/editor/src/Mark.js +8 -2
- package/esm/editor/src/Node.d.ts +14 -12
- package/esm/editor/src/Node.d.ts.map +1 -1
- package/esm/editor/src/Node.js +10 -4
- package/esm/editor/src/commands/CommandManager.d.ts +5 -9
- package/esm/editor/src/commands/CommandManager.d.ts.map +1 -1
- package/esm/editor/src/commands/CommandManager.js +7 -6
- package/esm/editor/src/commands/mod.d.ts +12 -6
- package/esm/editor/src/commands/mod.d.ts.map +1 -1
- package/esm/editor/src/commands/mod.js +0 -45
- package/esm/editor/src/mod.d.ts +1 -0
- package/esm/editor/src/mod.d.ts.map +1 -1
- package/esm/editor/src/mod.js +1 -0
- package/esm/editor/src/nodeToTreeString.d.ts.map +1 -1
- package/esm/editor/src/nodeToTreeString.js +23 -21
- package/esm/editor/src/plugins/input-rules/InputRulesPlugin.js +2 -2
- package/esm/editor/src/plugins/keymap/keymap.d.ts +11 -0
- package/esm/editor/src/plugins/keymap/keymap.d.ts.map +1 -0
- package/esm/editor/src/plugins/keymap/keymap.js +125 -0
- package/esm/editor/src/plugins/keymap/w3c-keyname.d.ts +4 -0
- package/esm/editor/src/plugins/keymap/w3c-keyname.d.ts.map +1 -0
- package/esm/editor/src/plugins/keymap/w3c-keyname.js +124 -0
- package/esm/editor/src/types.d.ts +10 -5
- package/esm/editor/src/types.d.ts.map +1 -1
- package/esm/editor/src/utilities/createNodeFromContent.d.ts +4 -3
- package/esm/editor/src/utilities/createNodeFromContent.d.ts.map +1 -1
- package/esm/editor/src/utilities/createNodeFromContent.js +4 -5
- package/esm/editor/src/utilities/getHtmlAttributes.d.ts +8 -3
- package/esm/editor/src/utilities/getHtmlAttributes.d.ts.map +1 -1
- package/esm/extension-codemirror/src/NodeCodeMirror.d.ts +2 -13
- package/esm/extension-codemirror/src/NodeCodeMirror.d.ts.map +1 -1
- package/esm/extension-codemirror/src/NodeCodeMirror.js +4 -16
- package/esm/extension-codemirror/src/defaults.d.ts.map +1 -1
- package/esm/extension-codemirror/src/utils.d.ts.map +1 -1
- package/package.json +2 -3
|
@@ -22,28 +22,30 @@ export function nodeToTreeString(node, level = 0, currentPos = 0) {
|
|
|
22
22
|
// https://prosemirror.net/docs/guide/#doc.indexing
|
|
23
23
|
let line = '';
|
|
24
24
|
// if (node.type) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
if ('type' in node) {
|
|
26
|
+
line += ` - [${node.type.name}] `;
|
|
27
|
+
// } else {
|
|
28
|
+
// line += ` - `;
|
|
29
|
+
// }
|
|
30
|
+
line += `pos: ${currentPos}, `;
|
|
31
|
+
line += `nodeSize: ${node.nodeSize}, `; // isLeaf ? 1 : 2 + this.content.size
|
|
32
|
+
line += `epos: ${currentPos + node.nodeSize}, `; // isLeaf ? 1 : 2 + this.content.size
|
|
33
|
+
if (node.content) {
|
|
34
|
+
line += `fragment.size: ${node.content.size}, `;
|
|
35
|
+
}
|
|
36
|
+
output += (delim + line) + '\n';
|
|
37
|
+
let marksLine = '';
|
|
38
|
+
if (node.marks) {
|
|
39
|
+
for (const mark of node.marks) {
|
|
40
|
+
marksLine += `(${mark.type.name}), `;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (marksLine) {
|
|
44
|
+
output += (delim + ' ' + marksLine) + '\n';
|
|
45
|
+
}
|
|
46
|
+
if (node.text) {
|
|
47
|
+
output += (delim + ' "' + trimText(node.text) + '"') + '\n';
|
|
40
48
|
}
|
|
41
|
-
}
|
|
42
|
-
if (marksLine) {
|
|
43
|
-
output += (delim + ' ' + marksLine) + '\n';
|
|
44
|
-
}
|
|
45
|
-
if (node.text) {
|
|
46
|
-
output += (delim + ' "' + trimText(node.text) + '"') + '\n';
|
|
47
49
|
}
|
|
48
50
|
node.forEach((child, offset) => {
|
|
49
51
|
output +=
|
|
@@ -92,14 +92,14 @@ export class InputRulesPlugin extends Plugin {
|
|
|
92
92
|
},
|
|
93
93
|
props: {
|
|
94
94
|
handleTextInput(view, from, to, text) {
|
|
95
|
-
return run(view, from, to, text, rules,
|
|
95
|
+
return run(view, from, to, text, rules, this);
|
|
96
96
|
},
|
|
97
97
|
handleDOMEvents: {
|
|
98
98
|
compositionend: (view) => {
|
|
99
99
|
setTimeout(() => {
|
|
100
100
|
let { $cursor } = view.state.selection;
|
|
101
101
|
if ($cursor) {
|
|
102
|
-
run(view, $cursor.pos, $cursor.pos, '', rules,
|
|
102
|
+
run(view, $cursor.pos, $cursor.pos, '', rules, this);
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
105
|
},
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command, Plugin } from 'prosemirror-state';
|
|
2
|
+
import { EditorView } from 'prosemirror-view';
|
|
3
|
+
export declare class KeymapPlugin extends Plugin {
|
|
4
|
+
constructor(bindings: {
|
|
5
|
+
[key: string]: Command;
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export declare function keydownHandler(bindings: {
|
|
9
|
+
[key: string]: Command;
|
|
10
|
+
}): (view: EditorView, event: KeyboardEvent) => boolean;
|
|
11
|
+
//# sourceMappingURL=keymap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keymap.d.ts","sourceRoot":"","sources":["../../../../../src/editor/src/plugins/keymap/keymap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAyE9C,qBAAa,YAAa,SAAQ,MAAM;gBAC1B,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE;CAGjD;AAKD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GACnC,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,KAAK,OAAO,CA6BrD"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
|
+
import { base, keyName } from './w3c-keyname.js';
|
|
3
|
+
const mac = typeof navigator != 'undefined' &&
|
|
4
|
+
/Mac|iP(hone|[oa]d)/.test(navigator?.platform);
|
|
5
|
+
const windows = typeof navigator != 'undefined' &&
|
|
6
|
+
/Win/.test(navigator?.platform);
|
|
7
|
+
function normalizeKeyName(name) {
|
|
8
|
+
let parts = name.split(/-(?!$)/), result = parts[parts.length - 1];
|
|
9
|
+
if (result == 'Space')
|
|
10
|
+
result = ' ';
|
|
11
|
+
let alt, ctrl, shift, meta;
|
|
12
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
13
|
+
let mod = parts[i];
|
|
14
|
+
if (/^(cmd|meta|m)$/i.test(mod))
|
|
15
|
+
meta = true;
|
|
16
|
+
else if (/^a(lt)?$/i.test(mod))
|
|
17
|
+
alt = true;
|
|
18
|
+
else if (/^(c|ctrl|control)$/i.test(mod))
|
|
19
|
+
ctrl = true;
|
|
20
|
+
else if (/^s(hift)?$/i.test(mod))
|
|
21
|
+
shift = true;
|
|
22
|
+
else if (/^mod$/i.test(mod)) {
|
|
23
|
+
if (mac)
|
|
24
|
+
meta = true;
|
|
25
|
+
else
|
|
26
|
+
ctrl = true;
|
|
27
|
+
}
|
|
28
|
+
else
|
|
29
|
+
throw new Error('Unrecognized modifier name: ' + mod);
|
|
30
|
+
}
|
|
31
|
+
if (alt)
|
|
32
|
+
result = 'Alt-' + result;
|
|
33
|
+
if (ctrl)
|
|
34
|
+
result = 'Ctrl-' + result;
|
|
35
|
+
if (meta)
|
|
36
|
+
result = 'Meta-' + result;
|
|
37
|
+
if (shift)
|
|
38
|
+
result = 'Shift-' + result;
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
function normalize(map) {
|
|
42
|
+
let copy = Object.create(null);
|
|
43
|
+
for (let prop in map)
|
|
44
|
+
copy[normalizeKeyName(prop)] = map[prop];
|
|
45
|
+
return copy;
|
|
46
|
+
}
|
|
47
|
+
function modifiers(name, event, shift = true) {
|
|
48
|
+
if (event.altKey)
|
|
49
|
+
name = 'Alt-' + name;
|
|
50
|
+
if (event.ctrlKey)
|
|
51
|
+
name = 'Ctrl-' + name;
|
|
52
|
+
if (event.metaKey)
|
|
53
|
+
name = 'Meta-' + name;
|
|
54
|
+
if (shift && event.shiftKey)
|
|
55
|
+
name = 'Shift-' + name;
|
|
56
|
+
return name;
|
|
57
|
+
}
|
|
58
|
+
/// Create a keymap plugin for the given set of bindings.
|
|
59
|
+
///
|
|
60
|
+
/// Bindings should map key names to [command](#commands)-style
|
|
61
|
+
/// functions, which will be called with `(EditorState, dispatch,
|
|
62
|
+
/// EditorView)` arguments, and should return true when they've handled
|
|
63
|
+
/// the key. Note that the view argument isn't part of the command
|
|
64
|
+
/// protocol, but can be used as an escape hatch if a binding needs to
|
|
65
|
+
/// directly interact with the UI.
|
|
66
|
+
///
|
|
67
|
+
/// Key names may be strings like `"Shift-Ctrl-Enter"`—a key
|
|
68
|
+
/// identifier prefixed with zero or more modifiers. Key identifiers
|
|
69
|
+
/// are based on the strings that can appear in
|
|
70
|
+
/// [`KeyEvent.key`](https:///developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).
|
|
71
|
+
/// Use lowercase letters to refer to letter keys (or uppercase letters
|
|
72
|
+
/// if you want shift to be held). You may use `"Space"` as an alias
|
|
73
|
+
/// for the `" "` name.
|
|
74
|
+
///
|
|
75
|
+
/// Modifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or
|
|
76
|
+
/// `a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or
|
|
77
|
+
/// `Meta-`) are recognized. For characters that are created by holding
|
|
78
|
+
/// shift, the `Shift-` prefix is implied, and should not be added
|
|
79
|
+
/// explicitly.
|
|
80
|
+
///
|
|
81
|
+
/// You can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on
|
|
82
|
+
/// other platforms.
|
|
83
|
+
///
|
|
84
|
+
/// You can add multiple keymap plugins to an editor. The order in
|
|
85
|
+
/// which they appear determines their precedence (the ones early in
|
|
86
|
+
/// the array get to dispatch first).
|
|
87
|
+
export class KeymapPlugin extends Plugin {
|
|
88
|
+
constructor(bindings) {
|
|
89
|
+
super({ props: { handleKeyDown: keydownHandler(bindings) } });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/// Given a set of bindings (using the same format as
|
|
93
|
+
/// [`keymap`](#keymap.keymap)), return a [keydown
|
|
94
|
+
/// handler](#view.EditorProps.handleKeyDown) that handles them.
|
|
95
|
+
export function keydownHandler(bindings) {
|
|
96
|
+
let map = normalize(bindings);
|
|
97
|
+
return function (view, event) {
|
|
98
|
+
let name = keyName(event), baseName, direct = map[modifiers(name, event)];
|
|
99
|
+
if (direct && direct(view.state, view.dispatch, view))
|
|
100
|
+
return true;
|
|
101
|
+
// A character key
|
|
102
|
+
if (name.length == 1 && name != ' ') {
|
|
103
|
+
if (event.shiftKey) {
|
|
104
|
+
// In case the name was already modified by shift, try looking
|
|
105
|
+
// it up without its shift modifier
|
|
106
|
+
let noShift = map[modifiers(name, event, false)];
|
|
107
|
+
if (noShift && noShift(view.state, view.dispatch, view))
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
if ((event.altKey || event.metaKey || event.ctrlKey) &&
|
|
111
|
+
// Ctrl-Alt may be used for AltGr on Windows
|
|
112
|
+
!(windows && event.ctrlKey && event.altKey) &&
|
|
113
|
+
(baseName = base[event.keyCode]) && baseName != name) {
|
|
114
|
+
// Try falling back to the keyCode when there's a modifier
|
|
115
|
+
// active or the character produced isn't ASCII, and our table
|
|
116
|
+
// produces a different name from the the keyCode. See #668,
|
|
117
|
+
// #1060, #1529.
|
|
118
|
+
let fromCode = map[modifiers(baseName, event)];
|
|
119
|
+
if (fromCode && fromCode(view.state, view.dispatch, view))
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return false;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"w3c-keyname.d.ts","sourceRoot":"","sources":["../../../../../src/editor/src/plugins/keymap/w3c-keyname.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqDvC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAyBxC,CAAC;AAuBF,wBAAgB,OAAO,CAAC,KAAK,EAAE,aAAa,UAmB3C"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export const base = {
|
|
2
|
+
8: 'Backspace',
|
|
3
|
+
9: 'Tab',
|
|
4
|
+
10: 'Enter',
|
|
5
|
+
12: 'NumLock',
|
|
6
|
+
13: 'Enter',
|
|
7
|
+
16: 'Shift',
|
|
8
|
+
17: 'Control',
|
|
9
|
+
18: 'Alt',
|
|
10
|
+
20: 'CapsLock',
|
|
11
|
+
27: 'Escape',
|
|
12
|
+
32: ' ',
|
|
13
|
+
33: 'PageUp',
|
|
14
|
+
34: 'PageDown',
|
|
15
|
+
35: 'End',
|
|
16
|
+
36: 'Home',
|
|
17
|
+
37: 'ArrowLeft',
|
|
18
|
+
38: 'ArrowUp',
|
|
19
|
+
39: 'ArrowRight',
|
|
20
|
+
40: 'ArrowDown',
|
|
21
|
+
44: 'PrintScreen',
|
|
22
|
+
45: 'Insert',
|
|
23
|
+
46: 'Delete',
|
|
24
|
+
59: ';',
|
|
25
|
+
61: '=',
|
|
26
|
+
91: 'Meta',
|
|
27
|
+
92: 'Meta',
|
|
28
|
+
106: '*',
|
|
29
|
+
107: '+',
|
|
30
|
+
108: ',',
|
|
31
|
+
109: '-',
|
|
32
|
+
110: '.',
|
|
33
|
+
111: '/',
|
|
34
|
+
144: 'NumLock',
|
|
35
|
+
145: 'ScrollLock',
|
|
36
|
+
160: 'Shift',
|
|
37
|
+
161: 'Shift',
|
|
38
|
+
162: 'Control',
|
|
39
|
+
163: 'Control',
|
|
40
|
+
164: 'Alt',
|
|
41
|
+
165: 'Alt',
|
|
42
|
+
173: '-',
|
|
43
|
+
186: ';',
|
|
44
|
+
187: '=',
|
|
45
|
+
188: ',',
|
|
46
|
+
189: '-',
|
|
47
|
+
190: '.',
|
|
48
|
+
191: '/',
|
|
49
|
+
192: '`',
|
|
50
|
+
219: '[',
|
|
51
|
+
220: '\\',
|
|
52
|
+
221: ']',
|
|
53
|
+
222: "'",
|
|
54
|
+
};
|
|
55
|
+
export const shift = {
|
|
56
|
+
48: ')',
|
|
57
|
+
49: '!',
|
|
58
|
+
50: '@',
|
|
59
|
+
51: '#',
|
|
60
|
+
52: '$',
|
|
61
|
+
53: '%',
|
|
62
|
+
54: '^',
|
|
63
|
+
55: '&',
|
|
64
|
+
56: '*',
|
|
65
|
+
57: '(',
|
|
66
|
+
59: ':',
|
|
67
|
+
61: '+',
|
|
68
|
+
173: '_',
|
|
69
|
+
186: ':',
|
|
70
|
+
187: '+',
|
|
71
|
+
188: '<',
|
|
72
|
+
189: '_',
|
|
73
|
+
190: '>',
|
|
74
|
+
191: '?',
|
|
75
|
+
192: '~',
|
|
76
|
+
219: '{',
|
|
77
|
+
220: '|',
|
|
78
|
+
221: '}',
|
|
79
|
+
222: '"',
|
|
80
|
+
};
|
|
81
|
+
const mac = typeof navigator != 'undefined' && /Mac/.test(navigator.platform);
|
|
82
|
+
const ie = typeof navigator != 'undefined' &&
|
|
83
|
+
/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
84
|
+
// Fill in the digit keys
|
|
85
|
+
for (let i = 0; i < 10; i++)
|
|
86
|
+
base[48 + i] = base[96 + i] = String(i);
|
|
87
|
+
// The function keys
|
|
88
|
+
for (let i = 1; i <= 24; i++)
|
|
89
|
+
base[i + 111] = 'F' + i;
|
|
90
|
+
// And the alphabetic keys
|
|
91
|
+
for (let i = 65; i <= 90; i++) {
|
|
92
|
+
base[i] = String.fromCharCode(i + 32);
|
|
93
|
+
shift[i] = String.fromCharCode(i);
|
|
94
|
+
}
|
|
95
|
+
// For each code that doesn't have a shift-equivalent, copy the base name
|
|
96
|
+
for (const code in base) {
|
|
97
|
+
if (!shift.hasOwnProperty(code))
|
|
98
|
+
shift[code] = base[code];
|
|
99
|
+
}
|
|
100
|
+
export function keyName(event) {
|
|
101
|
+
// On macOS, keys held with Shift and Cmd don't reflect the effect of Shift in `.key`.
|
|
102
|
+
// On IE, shift effect is never included in `.key`.
|
|
103
|
+
const ignoreKey = mac && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey ||
|
|
104
|
+
ie && event.shiftKey && event.key && event.key.length == 1 ||
|
|
105
|
+
event.key == 'Unidentified';
|
|
106
|
+
let name = (!ignoreKey && event.key) ||
|
|
107
|
+
(event.shiftKey ? shift : base)[event.keyCode] ||
|
|
108
|
+
event.key || 'Unidentified';
|
|
109
|
+
// Edge sometimes produces wrong names (Issue #3)
|
|
110
|
+
if (name == 'Esc')
|
|
111
|
+
name = 'Escape';
|
|
112
|
+
if (name == 'Del')
|
|
113
|
+
name = 'Delete';
|
|
114
|
+
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/
|
|
115
|
+
if (name == 'Left')
|
|
116
|
+
name = 'ArrowLeft';
|
|
117
|
+
if (name == 'Up')
|
|
118
|
+
name = 'ArrowUp';
|
|
119
|
+
if (name == 'Right')
|
|
120
|
+
name = 'ArrowRight';
|
|
121
|
+
if (name == 'Down')
|
|
122
|
+
name = 'ArrowDown';
|
|
123
|
+
return name;
|
|
124
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { ParseOptions } from 'prosemirror-model';
|
|
1
|
+
import type { Node as ProseMirrorNode, ParseOptions } from 'prosemirror-model';
|
|
2
2
|
import type { Extension } from './Extension.js';
|
|
3
3
|
import type { Mark } from './Mark.js';
|
|
4
4
|
import type { Node } from './Node.js';
|
|
5
|
-
export type AnyExtension =
|
|
6
|
-
|
|
5
|
+
export type AnyExtension = Extension | Node | Mark;
|
|
6
|
+
export type AnyExtensionOrReq = AnyExtension | {
|
|
7
|
+
requires: Array<AnyExtensionOrReq | string>;
|
|
7
8
|
};
|
|
8
|
-
export type Extensions = AnyExtension[];
|
|
9
9
|
export type Content = JSONContent | JSONContent[] | null;
|
|
10
10
|
export interface EditorOptions {
|
|
11
11
|
element: Element;
|
|
12
12
|
content: Content;
|
|
13
13
|
parseOptions: ParseOptions;
|
|
14
|
-
extensions:
|
|
14
|
+
extensions: AnyExtensionOrReq[];
|
|
15
15
|
topNode?: string;
|
|
16
16
|
}
|
|
17
17
|
export type JSONContent = {
|
|
@@ -26,4 +26,9 @@ export type JSONContent = {
|
|
|
26
26
|
text?: string;
|
|
27
27
|
[key: string]: any;
|
|
28
28
|
};
|
|
29
|
+
export type Attribute<T> = {
|
|
30
|
+
fromDom?: (element: HTMLElement) => T;
|
|
31
|
+
default: T;
|
|
32
|
+
toDom?: (node: ProseMirrorNode) => T;
|
|
33
|
+
};
|
|
29
34
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/editor/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/editor/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;AACnD,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,QAAQ,EAAE,KAAK,CAAC,iBAAiB,GAAG,MAAM,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,WAAW,EAAE,GAAG,IAAI,CAAC;AAEzD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,EAAE,CAAC;IACJ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACzB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,CAAC,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC;IACX,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,CAAC,CAAC;CACtC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Fragment, Node as ProseMirrorNode, Schema } from 'prosemirror-model';
|
|
2
|
-
import type {
|
|
2
|
+
import type { JSONContent } from '../types.js';
|
|
3
3
|
export type CreateNodeFromContentOptions = {
|
|
4
4
|
errorOnInvalidContent?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare function createNodeFromObject(content:
|
|
7
|
-
export declare function
|
|
6
|
+
export declare function createNodeFromObject(content: JSONContent | ProseMirrorNode | Fragment, schema: Schema, options?: CreateNodeFromContentOptions): ProseMirrorNode;
|
|
7
|
+
export declare function createNodeFromArray(content: JSONContent[], schema: Schema): Fragment;
|
|
8
|
+
export declare function createNodeFromContent(content: JSONContent | ProseMirrorNode | Fragment, schema: Schema, options?: CreateNodeFromContentOptions): ProseMirrorNode | Fragment;
|
|
8
9
|
//# sourceMappingURL=createNodeFromContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNodeFromContent.d.ts","sourceRoot":"","sources":["../../../../src/editor/src/utilities/createNodeFromContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"createNodeFromContent.d.ts","sourceRoot":"","sources":["../../../../src/editor/src/utilities/createNodeFromContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,4BAA4B,GAAG;IACzC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,WAAW,GAAG,eAAe,GAAG,QAAQ,EACjD,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,eAAe,CA0BjB;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,EAAE,EACtB,MAAM,EAAE,MAAM,GACb,QAAQ,CAIV;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GAAG,eAAe,GAAG,QAAQ,EACjD,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,eAAe,GAAG,QAAQ,CAY5B"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { Fragment, Node as ProseMirrorNode } from 'prosemirror-model';
|
|
2
2
|
export function createNodeFromObject(content, schema, options) {
|
|
3
3
|
try {
|
|
4
|
-
// if the JSON Content is an array of nodes, create a fragment for each node
|
|
5
|
-
if (Array.isArray(content) && content.length > 0) {
|
|
6
|
-
return Fragment.fromArray(content.map((item) => schema.nodeFromJSON(item)));
|
|
7
|
-
}
|
|
8
4
|
const node = schema.nodeFromJSON(content);
|
|
9
5
|
if (options?.errorOnInvalidContent) {
|
|
10
6
|
node.check();
|
|
@@ -21,13 +17,16 @@ export function createNodeFromObject(content, schema, options) {
|
|
|
21
17
|
return schema.topNodeType.createAndFill(null, []);
|
|
22
18
|
}
|
|
23
19
|
}
|
|
20
|
+
export function createNodeFromArray(content, schema) {
|
|
21
|
+
return Fragment.fromArray(content.map((item) => schema.nodeFromJSON(item)));
|
|
22
|
+
}
|
|
24
23
|
export function createNodeFromContent(content, schema, options) {
|
|
25
24
|
if (content instanceof ProseMirrorNode || content instanceof Fragment) {
|
|
26
25
|
return content;
|
|
27
26
|
}
|
|
28
27
|
const isJSONContent = typeof content === 'object' && content !== null;
|
|
29
28
|
if (isJSONContent) {
|
|
30
|
-
createNodeFromObject(content, schema, options);
|
|
29
|
+
return createNodeFromObject(content, schema, options);
|
|
31
30
|
}
|
|
32
31
|
return schema.topNodeType.createAndFill(null, []);
|
|
33
32
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { MarkSpec, Node as ProseMirrorNode, NodeSpec } from 'prosemirror-model';
|
|
2
|
+
import type { Mark } from '../Mark.js';
|
|
3
|
+
import type { Node } from '../Node.js';
|
|
4
|
+
type MarkOfNode = Mark | Node;
|
|
5
|
+
export declare function getHtmlAttributes(extension: MarkOfNode, node: ProseMirrorNode): Record<string, any>;
|
|
6
|
+
export declare function setHtmlAttributes(extension: MarkOfNode, element: HTMLElement): Record<string, any>;
|
|
7
|
+
export declare function addAttributesToSchema(spec: MarkSpec | NodeSpec, extension: MarkOfNode): void;
|
|
8
|
+
export {};
|
|
4
9
|
//# sourceMappingURL=getHtmlAttributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHtmlAttributes.d.ts","sourceRoot":"","sources":["../../../../src/editor/src/utilities/getHtmlAttributes.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"getHtmlAttributes.d.ts","sourceRoot":"","sources":["../../../../src/editor/src/utilities/getHtmlAttributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,IAAI,IAAI,eAAe,EACvB,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9B,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,UAAU,EACrB,IAAI,EAAE,eAAe,uBAmBtB;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,uBAc5E;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,GAAG,QAAQ,EACzB,SAAS,EAAE,UAAU,QAetB"}
|
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
import { Plugin, PluginKey } from 'prosemirror-state';
|
|
2
2
|
import type { NodeSpec, NodeType, Schema } from 'prosemirror-model';
|
|
3
3
|
import { Converter, type CoreEditor, Node } from '../../editor/src/mod.js';
|
|
4
|
-
import { type
|
|
4
|
+
import { type CommandFactories, type CommandShortcuts } from '../../editor/src/commands/mod.js';
|
|
5
5
|
import { type InputRule } from '../../editor/src/plugins/input-rules/mod.js';
|
|
6
6
|
export declare const codeMirrorBlockKey: PluginKey<any>;
|
|
7
7
|
export declare class NodeCodeMirror extends Node {
|
|
8
8
|
name: string;
|
|
9
|
-
automerge: {
|
|
10
|
-
block: string;
|
|
11
|
-
attrParsers: {
|
|
12
|
-
fromAutomerge: (block: any) => {
|
|
13
|
-
lang: any;
|
|
14
|
-
};
|
|
15
|
-
fromProsemirror: (node: any) => {
|
|
16
|
-
lang: any;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
9
|
getConverters(editor: CoreEditor, schema: Schema): Record<string, Converter>;
|
|
21
10
|
getNodeSpec(): NodeSpec;
|
|
22
11
|
getInputRules(type: NodeType): InputRule[];
|
|
23
|
-
|
|
12
|
+
getCommandFactories(editor: CoreEditor, type: NodeType): Partial<CommandFactories>;
|
|
24
13
|
getKeyboardShortcuts(): Partial<CommandShortcuts>;
|
|
25
14
|
getProseMirrorPlugins(editor: CoreEditor): Plugin[];
|
|
26
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeCodeMirror.d.ts","sourceRoot":"","sources":["../../../src/extension-codemirror/src/NodeCodeMirror.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAC;AAC9E,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"NodeCodeMirror.d.ts","sourceRoot":"","sources":["../../../src/extension-codemirror/src/NodeCodeMirror.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAC;AAC9E,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAEtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,6CAA6C,CAAC;AAOrD,eAAO,MAAM,kBAAkB,gBAAoC,CAAC;AAyCpE,qBAAa,cAAe,SAAQ,IAAI;IAC7B,IAAI,SAAgB;IAGpB,aAAa,CACpB,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,MAAM,GACb,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;IAgDnB,WAAW,IAAI,QAAQ;IA0CvB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,EAAE;IAQ1C,mBAAmB,CAC1B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,gBAAgB,CAAC;IAUnB,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAUjD,qBAAqB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE;CA8B7D"}
|
|
@@ -50,24 +50,12 @@ export class NodeCodeMirror extends Node {
|
|
|
50
50
|
writable: true,
|
|
51
51
|
value: 'code_block'
|
|
52
52
|
});
|
|
53
|
-
// requires = ['doc'];
|
|
54
|
-
Object.defineProperty(this, "automerge", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
configurable: true,
|
|
57
|
-
writable: true,
|
|
58
|
-
value: {
|
|
59
|
-
block: this.name,
|
|
60
|
-
attrParsers: {
|
|
61
|
-
fromAutomerge: (block) => ({ lang: block.attrs.lang }),
|
|
62
|
-
fromProsemirror: (node) => ({ lang: node.attrs.lang }),
|
|
63
|
-
},
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
53
|
}
|
|
54
|
+
// requires = ['doc'];
|
|
67
55
|
getConverters(editor, schema) {
|
|
68
56
|
return {
|
|
69
57
|
'text/code-only': {
|
|
70
|
-
fromDoc(document) {
|
|
58
|
+
fromDoc: async (document) => {
|
|
71
59
|
const retVal = [];
|
|
72
60
|
if (document.content) {
|
|
73
61
|
for (const node of document.content.toJSON()) {
|
|
@@ -80,7 +68,7 @@ export class NodeCodeMirror extends Node {
|
|
|
80
68
|
}
|
|
81
69
|
return retVal.join('');
|
|
82
70
|
},
|
|
83
|
-
toDoc(
|
|
71
|
+
toDoc: async (buffer) => {
|
|
84
72
|
const content = {
|
|
85
73
|
'type': 'doc_code',
|
|
86
74
|
'content': [
|
|
@@ -149,7 +137,7 @@ export class NodeCodeMirror extends Node {
|
|
|
149
137
|
textblockTypeInputRule(/^```$/, type),
|
|
150
138
|
];
|
|
151
139
|
}
|
|
152
|
-
|
|
140
|
+
getCommandFactories(editor, type) {
|
|
153
141
|
return {
|
|
154
142
|
'setCodeBlock': (lang) => setBlockType(type, { lang }),
|
|
155
143
|
ArrowLeft: () => arrowHandler('left'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/extension-codemirror/src/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/extension-codemirror/src/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,mBAAmB,GAC9B,UAAU,iBAAiB,EAC3B,KAAK,WAAW,EAChB,MAAM,IAAI,EACV,MAAM,UAAU,EAChB,QAAQ,CAAC,MAAM,MAAM,CAAC,GAAG,OAAO,eAwCjC,CAAC;AAmBF,eAAO,MAAM,eAAe,EAAE,iBAS7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/extension-codemirror/src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,WAAW,EAEX,aAAa,EACb,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAa,MAAM,mBAAmB,CAAC;AAI3D,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAM9C,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;SAoB3D;AAED,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/extension-codemirror/src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,WAAW,EAEX,aAAa,EACb,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAa,MAAM,mBAAmB,CAAC;AAI3D,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAM9C,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;SAoB3D;AAED,eAAO,MAAM,sBAAsB,GACjC,OAAO,IAAI,EACX,QAAQ,UAAU,EAClB,QAAQ,CAAC,MAAM,MAAM,CAAC,GAAG,OAAO,kBAMjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,UAAU,EAClB,QAAQ,YAAY,EACpB,QAAQ,CAAC,MAAM,MAAM,CAAC,GAAG,OAAO,SAOjC,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,YAAY,MAAM,EAClB,MAAM,IAAI,EACV,QAAQ,CAAC,MAAM,MAAM,CAAC,GAAG,OAAO,EAChC,MAAM,YAAY,SAenB,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,MAAM,MAAM,GAAG,MAAM,EACrB,KAAK,CAAC,CAAC,GAAG,CAAC,EACX,IAAI,UAAU,EACd,MAAM,YAAY,EAClB,QAAQ,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,YAqBjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,YAAY,EAAE,MAAM,UAAU,YAWtE,CAAC;AAEF,eAAO,MAAM,OAAO,GAClB,MAAM,MAAM,EACZ,QAAQ,UAAU,EAClB,UAAU,iBAAiB,EAC3B,cAAc,WAAW,kBAQ1B,CAAC;AAcF,eAAO,MAAM,QAAQ,GACnB,QAAQ,UAAU,EAClB,aAAa,WAAW,EACxB,OAAO,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC,kBAOpC,CAAC;AA2BF,eAAO,MAAM,eAAe,GAC1B,OAAO,WAAW,EAClB,UAAU,CAAC,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS,EACjD,YAAY,MAAM,YA4DnB,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,OAAO,WAAW,EAClB,UAAU,CAAC,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS,YAwBlD,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,OAAO,WAAW,EAClB,UAAU,CAAC,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS,EACjD,YAAY,MAAM,YAanB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;CAKlC,CAAC;AAEF,eAAO,MAAM,uBAAuB;iBACF,OAAO;CACxC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;iBAHM,OAAO;CAMxC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kerebron/extension-codemirror",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "./esm/extension-codemirror/src/ExtensionCodeMirror.js",
|
|
6
6
|
"exports": {
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
"@codemirror/search": "6.5.10",
|
|
34
34
|
"@codemirror/state": "6.5.2",
|
|
35
35
|
"@codemirror/view": "6.38.1",
|
|
36
|
-
"prosemirror-
|
|
37
|
-
"prosemirror-model": "1.25.1",
|
|
36
|
+
"prosemirror-model": "1.25.2",
|
|
38
37
|
"prosemirror-state": "1.4.3",
|
|
39
38
|
"prosemirror-transform": "1.10.4",
|
|
40
39
|
"prosemirror-view": "1.40.0"
|