@kerebron/extension-codemirror 0.2.0 → 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 +31 -0
- package/esm/editor/src/CoreEditor.d.ts.map +1 -0
- package/esm/editor/src/CoreEditor.js +198 -0
- 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 +26 -0
- package/esm/editor/src/Extension.d.ts.map +1 -0
- package/esm/editor/src/Extension.js +33 -0
- package/esm/editor/src/ExtensionManager.d.ts +33 -0
- package/esm/editor/src/ExtensionManager.d.ts.map +1 -0
- package/esm/editor/src/ExtensionManager.js +272 -0
- package/esm/editor/src/Mark.d.ts +20 -0
- package/esm/editor/src/Mark.d.ts.map +1 -0
- package/esm/editor/src/Mark.js +40 -0
- package/esm/editor/src/Node.d.ts +29 -0
- package/esm/editor/src/Node.d.ts.map +1 -0
- package/esm/editor/src/Node.js +49 -0
- package/esm/editor/src/commands/CommandManager.d.ts +16 -0
- package/esm/editor/src/commands/CommandManager.d.ts.map +1 -0
- package/esm/editor/src/commands/CommandManager.js +61 -0
- package/esm/editor/src/commands/createChainableState.d.ts +3 -0
- package/esm/editor/src/commands/createChainableState.d.ts.map +1 -0
- package/esm/editor/src/commands/createChainableState.js +29 -0
- package/esm/editor/src/commands/mod.d.ts +55 -0
- package/esm/editor/src/commands/mod.d.ts.map +1 -0
- package/esm/editor/src/commands/mod.js +883 -0
- package/esm/editor/src/mod.d.ts +7 -0
- package/esm/editor/src/mod.d.ts.map +1 -0
- package/esm/editor/src/mod.js +6 -0
- package/esm/editor/src/nodeToTreeString.d.ts +4 -0
- package/esm/editor/src/nodeToTreeString.d.ts.map +1 -0
- package/esm/editor/src/nodeToTreeString.js +58 -0
- package/esm/editor/src/plugins/input-rules/InputRulesPlugin.d.ts +23 -0
- package/esm/editor/src/plugins/input-rules/InputRulesPlugin.d.ts.map +1 -0
- package/esm/editor/src/plugins/input-rules/InputRulesPlugin.js +163 -0
- package/esm/editor/src/plugins/input-rules/mod.d.ts +3 -0
- package/esm/editor/src/plugins/input-rules/mod.d.ts.map +1 -0
- package/esm/editor/src/plugins/input-rules/mod.js +2 -0
- package/esm/editor/src/plugins/input-rules/rulebuilders.d.ts +5 -0
- package/esm/editor/src/plugins/input-rules/rulebuilders.d.ts.map +1 -0
- package/esm/editor/src/plugins/input-rules/rulebuilders.js +50 -0
- 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 +34 -0
- package/esm/editor/src/types.d.ts.map +1 -0
- package/esm/editor/src/types.js +1 -0
- package/esm/editor/src/utilities/createNodeFromContent.d.ts +9 -0
- package/esm/editor/src/utilities/createNodeFromContent.d.ts.map +1 -0
- package/esm/editor/src/utilities/createNodeFromContent.js +32 -0
- package/esm/editor/src/utilities/getHtmlAttributes.d.ts +9 -0
- package/esm/editor/src/utilities/getHtmlAttributes.d.ts.map +1 -0
- package/esm/editor/src/utilities/getHtmlAttributes.js +47 -0
- package/esm/editor/src/utilities/mod.d.ts +3 -0
- package/esm/editor/src/utilities/mod.d.ts.map +1 -0
- package/esm/editor/src/utilities/mod.js +2 -0
- package/esm/extension-codemirror/src/ExtensionCodeMirror.d.ts +5 -0
- package/esm/extension-codemirror/src/ExtensionCodeMirror.d.ts.map +1 -0
- package/esm/extension-codemirror/src/ExtensionCodeMirror.js +4 -0
- package/esm/extension-codemirror/src/NodeCodeMirror.d.ts +16 -0
- package/esm/extension-codemirror/src/NodeCodeMirror.d.ts.map +1 -0
- package/esm/extension-codemirror/src/NodeCodeMirror.js +186 -0
- package/esm/extension-codemirror/src/NodeDocumentCode.d.ts +7 -0
- package/esm/extension-codemirror/src/NodeDocumentCode.d.ts.map +1 -0
- package/esm/extension-codemirror/src/NodeDocumentCode.js +37 -0
- package/esm/extension-codemirror/src/codeMirrorBlockNodeView.d.ts +6 -0
- package/esm/extension-codemirror/src/codeMirrorBlockNodeView.d.ts.map +1 -0
- package/esm/extension-codemirror/src/codeMirrorBlockNodeView.js +267 -0
- package/esm/extension-codemirror/src/defaults.d.ts +6 -0
- package/esm/extension-codemirror/src/defaults.d.ts.map +1 -0
- package/esm/extension-codemirror/src/defaults.js +57 -0
- package/esm/extension-codemirror/src/languageLoaders.d.ts +5 -0
- package/esm/extension-codemirror/src/languageLoaders.d.ts.map +1 -0
- package/esm/extension-codemirror/src/languageLoaders.js +113 -0
- package/esm/extension-codemirror/src/languages.d.ts +109 -0
- package/esm/extension-codemirror/src/languages.d.ts.map +1 -0
- package/esm/extension-codemirror/src/languages.js +110 -0
- package/esm/extension-codemirror/src/types.d.ts +30 -0
- package/esm/extension-codemirror/src/types.d.ts.map +1 -0
- package/esm/extension-codemirror/src/types.js +1 -0
- package/esm/extension-codemirror/src/utils.d.ts +39 -0
- package/esm/extension-codemirror/src/utils.d.ts.map +1 -0
- package/esm/extension-codemirror/src/utils.js +199 -0
- package/esm/extension-codemirror/src/y-remote-selections.d.ts +15 -0
- package/esm/extension-codemirror/src/y-remote-selections.d.ts.map +1 -0
- package/esm/extension-codemirror/src/y-remote-selections.js +273 -0
- package/esm/extension-codemirror/src/y-sync.d.ts +11 -0
- package/esm/extension-codemirror/src/y-sync.d.ts.map +1 -0
- package/esm/extension-codemirror/src/y-sync.js +29 -0
- package/esm/package.json +3 -0
- package/package.json +2 -6
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import * as cmView from '@codemirror/view';
|
|
2
|
+
import * as cmState from '@codemirror/state';
|
|
3
|
+
import * as dom from 'lib0/dom';
|
|
4
|
+
import * as pair from 'lib0/pair';
|
|
5
|
+
import * as math from 'lib0/math';
|
|
6
|
+
import { ySyncFacet } from './y-sync.js';
|
|
7
|
+
export const yRemoteSelectionsTheme = cmView.EditorView.baseTheme({
|
|
8
|
+
'.cm-ySelection': {},
|
|
9
|
+
'.cm-yLineSelection': {
|
|
10
|
+
padding: 0,
|
|
11
|
+
margin: '0px 2px 0px 4px',
|
|
12
|
+
},
|
|
13
|
+
'.cm-ySelectionCaret': {
|
|
14
|
+
position: 'relative',
|
|
15
|
+
borderLeft: '1px solid black',
|
|
16
|
+
borderRight: '1px solid black',
|
|
17
|
+
marginLeft: '-1px',
|
|
18
|
+
marginRight: '-1px',
|
|
19
|
+
boxSizing: 'border-box',
|
|
20
|
+
display: 'inline',
|
|
21
|
+
},
|
|
22
|
+
'.cm-ySelectionCaretDot': {
|
|
23
|
+
borderRadius: '50%',
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
width: '.4em',
|
|
26
|
+
height: '.4em',
|
|
27
|
+
top: '-.2em',
|
|
28
|
+
left: '-.2em',
|
|
29
|
+
backgroundColor: 'inherit',
|
|
30
|
+
transition: 'transform .3s ease-in-out',
|
|
31
|
+
boxSizing: 'border-box',
|
|
32
|
+
},
|
|
33
|
+
'.cm-ySelectionCaret:hover > .cm-ySelectionCaretDot': {
|
|
34
|
+
transformOrigin: 'bottom center',
|
|
35
|
+
transform: 'scale(0)',
|
|
36
|
+
},
|
|
37
|
+
'.cm-ySelectionInfo': {
|
|
38
|
+
position: 'absolute',
|
|
39
|
+
top: '-1.05em',
|
|
40
|
+
left: '-1px',
|
|
41
|
+
fontSize: '.75em',
|
|
42
|
+
fontFamily: 'serif',
|
|
43
|
+
fontStyle: 'normal',
|
|
44
|
+
fontWeight: 'normal',
|
|
45
|
+
lineHeight: 'normal',
|
|
46
|
+
userSelect: 'none',
|
|
47
|
+
color: 'white',
|
|
48
|
+
paddingLeft: '2px',
|
|
49
|
+
paddingRight: '2px',
|
|
50
|
+
zIndex: 101,
|
|
51
|
+
transition: 'opacity .3s ease-in-out',
|
|
52
|
+
backgroundColor: 'inherit',
|
|
53
|
+
// these should be separate
|
|
54
|
+
opacity: 0,
|
|
55
|
+
transitionDelay: '0s',
|
|
56
|
+
whiteSpace: 'nowrap',
|
|
57
|
+
},
|
|
58
|
+
'.cm-ySelectionCaret:hover > .cm-ySelectionInfo': {
|
|
59
|
+
opacity: 1,
|
|
60
|
+
transitionDelay: '0s',
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
const yRemoteSelectionsAnnotation = cmState.Annotation.define();
|
|
64
|
+
class YRemoteCaretWidget extends cmView.WidgetType {
|
|
65
|
+
constructor(color, name) {
|
|
66
|
+
super();
|
|
67
|
+
Object.defineProperty(this, "color", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
configurable: true,
|
|
70
|
+
writable: true,
|
|
71
|
+
value: color
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(this, "name", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
configurable: true,
|
|
76
|
+
writable: true,
|
|
77
|
+
value: name
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
toDOM() {
|
|
81
|
+
return (dom.element('span', [
|
|
82
|
+
pair.create('class', 'kb-yjs__cursor kb-widget'),
|
|
83
|
+
pair.create('style', `border-color: ${this.color};`),
|
|
84
|
+
], [
|
|
85
|
+
dom.text('\u2060'),
|
|
86
|
+
dom.element('div', [
|
|
87
|
+
pair.create('style', `background-color: ${this.color}`),
|
|
88
|
+
], [
|
|
89
|
+
dom.text(this.name),
|
|
90
|
+
]),
|
|
91
|
+
dom.text('\u2060'),
|
|
92
|
+
]));
|
|
93
|
+
}
|
|
94
|
+
eq(widget) {
|
|
95
|
+
return widget.color === this.color;
|
|
96
|
+
}
|
|
97
|
+
compare(widget) {
|
|
98
|
+
return widget.color === this.color;
|
|
99
|
+
}
|
|
100
|
+
updateDOM() {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
get estimatedHeight() {
|
|
104
|
+
return -1;
|
|
105
|
+
}
|
|
106
|
+
ignoreEvent() {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
export class YRemoteSelectionsPluginValue {
|
|
111
|
+
constructor(view) {
|
|
112
|
+
Object.defineProperty(this, "conf", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
configurable: true,
|
|
115
|
+
writable: true,
|
|
116
|
+
value: void 0
|
|
117
|
+
});
|
|
118
|
+
Object.defineProperty(this, "_listener", {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
configurable: true,
|
|
121
|
+
writable: true,
|
|
122
|
+
value: void 0
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(this, "_awareness", {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
configurable: true,
|
|
127
|
+
writable: true,
|
|
128
|
+
value: void 0
|
|
129
|
+
});
|
|
130
|
+
Object.defineProperty(this, "decorations", {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
configurable: true,
|
|
133
|
+
writable: true,
|
|
134
|
+
value: void 0
|
|
135
|
+
});
|
|
136
|
+
this.conf = view.state.facet(ySyncFacet);
|
|
137
|
+
this._listener = ({ added, updated, removed }) => {
|
|
138
|
+
const clients = added.concat(updated).concat(removed);
|
|
139
|
+
if (clients.findIndex((id) => id !== this.conf.awareness.doc.clientID) >= 0) {
|
|
140
|
+
view.dispatch({ annotations: [yRemoteSelectionsAnnotation.of([])] });
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
this._awareness = this.conf.awareness;
|
|
144
|
+
this._awareness.on('change', this._listener);
|
|
145
|
+
this.decorations = cmState.RangeSet.of([]);
|
|
146
|
+
}
|
|
147
|
+
destroy() {
|
|
148
|
+
this._awareness.off('change', this._listener);
|
|
149
|
+
}
|
|
150
|
+
update(update) {
|
|
151
|
+
const awareness = this.conf.awareness;
|
|
152
|
+
const decorations = [];
|
|
153
|
+
const localAwarenessState = this.conf.awareness.getLocalState();
|
|
154
|
+
// set local awareness state (update cursors)
|
|
155
|
+
if (localAwarenessState != null) {
|
|
156
|
+
const hasFocus = update.view.hasFocus &&
|
|
157
|
+
update.view.dom.ownerDocument.hasFocus();
|
|
158
|
+
const sel = hasFocus ? update.state.selection.main : null;
|
|
159
|
+
if (sel != null && 'function' === typeof this.conf.getPmPos) {
|
|
160
|
+
const nodePos = this.conf.getPmPos();
|
|
161
|
+
const currentAnchor = localAwarenessState['cm-cursor'] == null
|
|
162
|
+
? -1
|
|
163
|
+
: localAwarenessState['cm-cursor'].anchor - nodePos;
|
|
164
|
+
const currentHead = localAwarenessState['cm-cursor'] == null
|
|
165
|
+
? -1
|
|
166
|
+
: localAwarenessState['cm-cursor'].head - nodePos;
|
|
167
|
+
const anchor = nodePos + sel.anchor;
|
|
168
|
+
const head = nodePos + sel.head;
|
|
169
|
+
if (localAwarenessState['cm-cursor'] == null ||
|
|
170
|
+
(currentAnchor != anchor) || (currentHead != head)) {
|
|
171
|
+
awareness.setLocalStateField('cm-cursor', {
|
|
172
|
+
anchor,
|
|
173
|
+
head,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else if (localAwarenessState['cm-cursor'] != null && hasFocus) {
|
|
178
|
+
awareness.setLocalStateField('cm-cursor', null);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// update decorations (remote selections)
|
|
182
|
+
awareness.getStates().forEach((state, clientId) => {
|
|
183
|
+
if (clientId === awareness.doc.clientID) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
if (!state.user) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const cursor = state['cm-cursor'];
|
|
190
|
+
if (cursor == null || cursor.anchor == null || cursor.head == null) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if ('function' === typeof this.conf.getPmPos) {
|
|
194
|
+
const nodeAnchor = this.conf.getPmPos();
|
|
195
|
+
const nodeHead = this.conf.getPmPos() + this.conf.getNode().nodeSize;
|
|
196
|
+
if (cursor.anchor >= nodeAnchor && cursor.anchor <= nodeHead) {
|
|
197
|
+
const anchor = { index: cursor.anchor - nodeAnchor };
|
|
198
|
+
const head = { index: cursor.head - nodeAnchor };
|
|
199
|
+
try {
|
|
200
|
+
const { color = '#ffa500', name = `User: ${clientId}` } = state.user || {};
|
|
201
|
+
const colorLight = (state.user && state.user.colorLight) ||
|
|
202
|
+
color + '33';
|
|
203
|
+
const start = math.min(anchor.index, head.index);
|
|
204
|
+
const end = math.max(anchor.index, head.index);
|
|
205
|
+
const startLine = update.view.state.doc.lineAt(start);
|
|
206
|
+
const endLine = update.view.state.doc.lineAt(end);
|
|
207
|
+
if (startLine.number === endLine.number) {
|
|
208
|
+
// selected content in a single line.
|
|
209
|
+
decorations.push({
|
|
210
|
+
from: start,
|
|
211
|
+
to: end,
|
|
212
|
+
value: cmView.Decoration.mark({
|
|
213
|
+
attributes: { style: `background-color: ${colorLight}` },
|
|
214
|
+
class: 'cm-ySelection',
|
|
215
|
+
}),
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
// selected content in multiple lines
|
|
220
|
+
// first, render text-selection in the first line
|
|
221
|
+
decorations.push({
|
|
222
|
+
from: start,
|
|
223
|
+
to: startLine.from + startLine.length,
|
|
224
|
+
value: cmView.Decoration.mark({
|
|
225
|
+
attributes: { style: `background-color: ${colorLight}` },
|
|
226
|
+
class: 'cm-ySelection',
|
|
227
|
+
}),
|
|
228
|
+
});
|
|
229
|
+
// render text-selection in the last line
|
|
230
|
+
decorations.push({
|
|
231
|
+
from: endLine.from,
|
|
232
|
+
to: end,
|
|
233
|
+
value: cmView.Decoration.mark({
|
|
234
|
+
attributes: { style: `background-color: ${colorLight}` },
|
|
235
|
+
class: 'cm-ySelection',
|
|
236
|
+
}),
|
|
237
|
+
});
|
|
238
|
+
for (let i = startLine.number + 1; i < endLine.number; i++) {
|
|
239
|
+
const linePos = update.view.state.doc.line(i).from;
|
|
240
|
+
decorations.push({
|
|
241
|
+
from: linePos,
|
|
242
|
+
to: linePos,
|
|
243
|
+
value: cmView.Decoration.line({
|
|
244
|
+
attributes: {
|
|
245
|
+
style: `background-color: ${colorLight}`,
|
|
246
|
+
class: 'cm-yLineSelection',
|
|
247
|
+
},
|
|
248
|
+
}),
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
decorations.push({
|
|
253
|
+
from: head.index,
|
|
254
|
+
to: head.index,
|
|
255
|
+
value: cmView.Decoration.widget({
|
|
256
|
+
side: head.index - anchor.index > 0 ? -1 : 1, // the local cursor should be rendered outside the remote selection
|
|
257
|
+
block: false,
|
|
258
|
+
widget: new YRemoteCaretWidget(color, name),
|
|
259
|
+
}),
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
catch (err) {
|
|
263
|
+
console.warn(err, `User: ${clientId}`);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
this.decorations = cmView.Decoration.set(decorations, true);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
export const yRemoteSelections = cmView.ViewPlugin.fromClass(YRemoteSelectionsPluginValue, {
|
|
272
|
+
decorations: (v) => v.decorations,
|
|
273
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as cmState from '@codemirror/state';
|
|
2
|
+
import { Node } from 'prosemirror-model';
|
|
3
|
+
import * as awarenessProtocol from 'y-protocols/awareness';
|
|
4
|
+
export declare class YSyncConfig {
|
|
5
|
+
getNode: () => Node;
|
|
6
|
+
getPmPos: boolean | (() => number);
|
|
7
|
+
awareness: awarenessProtocol.Awareness;
|
|
8
|
+
constructor(getNode: () => Node, getPmPos: boolean | (() => number), awareness: awarenessProtocol.Awareness);
|
|
9
|
+
}
|
|
10
|
+
export declare const ySyncFacet: cmState.Facet<YSyncConfig, YSyncConfig>;
|
|
11
|
+
//# sourceMappingURL=y-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"y-sync.d.ts","sourceRoot":"","sources":["../../../src/extension-codemirror/src/y-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,KAAK,iBAAiB,MAAM,uBAAuB,CAAC;AAE3D,qBAAa,WAAW;IAEb,OAAO,EAAE,MAAM,IAAI;IACnB,QAAQ,EAAE,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC;IAClC,SAAS,EAAE,iBAAiB,CAAC,SAAS;gBAFtC,OAAO,EAAE,MAAM,IAAI,EACnB,QAAQ,EAAE,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,EAClC,SAAS,EAAE,iBAAiB,CAAC,SAAS;CAGhD;AAED,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAK3D,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as cmState from '@codemirror/state'; // eslint-disable-line
|
|
2
|
+
export class YSyncConfig {
|
|
3
|
+
constructor(getNode, getPmPos, awareness) {
|
|
4
|
+
Object.defineProperty(this, "getNode", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true,
|
|
8
|
+
value: getNode
|
|
9
|
+
});
|
|
10
|
+
Object.defineProperty(this, "getPmPos", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: getPmPos
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(this, "awareness", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: awareness
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export const ySyncFacet = cmState.Facet
|
|
25
|
+
.define({
|
|
26
|
+
combine(inputs) {
|
|
27
|
+
return inputs[inputs.length - 1];
|
|
28
|
+
},
|
|
29
|
+
});
|
package/esm/package.json
ADDED
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": {
|
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"scripts": {},
|
|
15
|
-
"files": [
|
|
16
|
-
"assets/*.css"
|
|
17
|
-
],
|
|
18
15
|
"dependencies": {
|
|
19
16
|
"@codemirror/autocomplete": "6.18.6",
|
|
20
17
|
"@codemirror/commands": "6.8.1",
|
|
@@ -36,8 +33,7 @@
|
|
|
36
33
|
"@codemirror/search": "6.5.10",
|
|
37
34
|
"@codemirror/state": "6.5.2",
|
|
38
35
|
"@codemirror/view": "6.38.1",
|
|
39
|
-
"prosemirror-
|
|
40
|
-
"prosemirror-model": "1.25.1",
|
|
36
|
+
"prosemirror-model": "1.25.2",
|
|
41
37
|
"prosemirror-state": "1.4.3",
|
|
42
38
|
"prosemirror-transform": "1.10.4",
|
|
43
39
|
"prosemirror-view": "1.40.0"
|