@kerebron/editor 0.4.26 → 0.4.27
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/package.json +2 -1
- package/assets/base.css +0 -107
- package/assets/content.css +0 -35
- package/assets/gapcursor.css +0 -25
- package/assets/index.css +0 -2
- package/assets/main.css +0 -8
- package/assets/mobile.css +0 -33
- package/assets/prosemirror.css +0 -20
- package/assets/search.css +0 -6
- package/assets/vars.css +0 -97
- package/esm/CoreEditor.d.ts +0 -40
- package/esm/CoreEditor.d.ts.map +0 -1
- package/esm/CoreEditor.js +0 -223
- package/esm/DummyEditorView.d.ts +0 -60
- package/esm/DummyEditorView.d.ts.map +0 -1
- package/esm/DummyEditorView.js +0 -242
- package/esm/Extension.d.ts +0 -31
- package/esm/Extension.d.ts.map +0 -1
- package/esm/Extension.js +0 -34
- package/esm/ExtensionManager.d.ts +0 -32
- package/esm/ExtensionManager.d.ts.map +0 -1
- package/esm/ExtensionManager.js +0 -222
- package/esm/Mark.d.ts +0 -23
- package/esm/Mark.d.ts.map +0 -1
- package/esm/Mark.js +0 -27
- package/esm/Node.d.ts +0 -32
- package/esm/Node.d.ts.map +0 -1
- package/esm/Node.js +0 -36
- package/esm/commands/CommandManager.d.ts +0 -24
- package/esm/commands/CommandManager.d.ts.map +0 -1
- package/esm/commands/CommandManager.js +0 -100
- package/esm/commands/baseCommandFactories.d.ts +0 -3
- package/esm/commands/baseCommandFactories.d.ts.map +0 -1
- package/esm/commands/baseCommandFactories.js +0 -836
- package/esm/commands/createChainableState.d.ts +0 -3
- package/esm/commands/createChainableState.d.ts.map +0 -1
- package/esm/commands/createChainableState.js +0 -29
- package/esm/commands/keyCommandFactories.d.ts +0 -3
- package/esm/commands/keyCommandFactories.d.ts.map +0 -1
- package/esm/commands/keyCommandFactories.js +0 -10
- package/esm/commands/mod.d.ts +0 -7
- package/esm/commands/mod.d.ts.map +0 -1
- package/esm/commands/mod.js +0 -76
- package/esm/commands/replaceCommandFactories.d.ts +0 -3
- package/esm/commands/replaceCommandFactories.d.ts.map +0 -1
- package/esm/commands/replaceCommandFactories.js +0 -94
- package/esm/commands/types.d.ts +0 -18
- package/esm/commands/types.d.ts.map +0 -1
- package/esm/commands/types.js +0 -1
- package/esm/mod.d.ts +0 -9
- package/esm/mod.d.ts.map +0 -1
- package/esm/mod.js +0 -8
- package/esm/nodeToTreeString.d.ts +0 -10
- package/esm/nodeToTreeString.d.ts.map +0 -1
- package/esm/nodeToTreeString.js +0 -74
- package/esm/package.json +0 -3
- package/esm/plugins/TrackSelecionPlugin.d.ts +0 -6
- package/esm/plugins/TrackSelecionPlugin.d.ts.map +0 -1
- package/esm/plugins/TrackSelecionPlugin.js +0 -24
- package/esm/plugins/input-rules/InputRulesPlugin.d.ts +0 -23
- package/esm/plugins/input-rules/InputRulesPlugin.d.ts.map +0 -1
- package/esm/plugins/input-rules/InputRulesPlugin.js +0 -144
- package/esm/plugins/input-rules/mod.d.ts +0 -3
- package/esm/plugins/input-rules/mod.d.ts.map +0 -1
- package/esm/plugins/input-rules/mod.js +0 -2
- package/esm/plugins/input-rules/rulebuilders.d.ts +0 -5
- package/esm/plugins/input-rules/rulebuilders.d.ts.map +0 -1
- package/esm/plugins/input-rules/rulebuilders.js +0 -50
- package/esm/plugins/keymap/keymap.d.ts +0 -11
- package/esm/plugins/keymap/keymap.d.ts.map +0 -1
- package/esm/plugins/keymap/keymap.js +0 -125
- package/esm/plugins/keymap/mod.d.ts +0 -2
- package/esm/plugins/keymap/mod.d.ts.map +0 -1
- package/esm/plugins/keymap/mod.js +0 -1
- package/esm/plugins/keymap/w3c-keyname.d.ts +0 -4
- package/esm/plugins/keymap/w3c-keyname.d.ts.map +0 -1
- package/esm/plugins/keymap/w3c-keyname.js +0 -124
- package/esm/search/mod.d.ts +0 -3
- package/esm/search/mod.d.ts.map +0 -1
- package/esm/search/mod.js +0 -2
- package/esm/search/query.d.ts +0 -45
- package/esm/search/query.d.ts.map +0 -1
- package/esm/search/query.js +0 -334
- package/esm/search/search.d.ts +0 -31
- package/esm/search/search.d.ts.map +0 -1
- package/esm/search/search.js +0 -199
- package/esm/types.d.ts +0 -59
- package/esm/types.d.ts.map +0 -1
- package/esm/types.js +0 -1
- package/esm/ui.d.ts +0 -15
- package/esm/ui.d.ts.map +0 -1
- package/esm/ui.js +0 -16
- package/esm/utilities/SmartOutput.d.ts +0 -41
- package/esm/utilities/SmartOutput.d.ts.map +0 -1
- package/esm/utilities/SmartOutput.js +0 -201
- package/esm/utilities/createNodeFromContent.d.ts +0 -9
- package/esm/utilities/createNodeFromContent.d.ts.map +0 -1
- package/esm/utilities/createNodeFromContent.js +0 -32
- package/esm/utilities/getHtmlAttributes.d.ts +0 -9
- package/esm/utilities/getHtmlAttributes.d.ts.map +0 -1
- package/esm/utilities/getHtmlAttributes.js +0 -47
- package/esm/utilities/getShadowRoot.d.ts +0 -2
- package/esm/utilities/getShadowRoot.d.ts.map +0 -1
- package/esm/utilities/getShadowRoot.js +0 -16
- package/esm/utilities/mod.d.ts +0 -6
- package/esm/utilities/mod.d.ts.map +0 -1
- package/esm/utilities/mod.js +0 -5
- package/esm/utilities/toRawTextResult.d.ts +0 -3
- package/esm/utilities/toRawTextResult.d.ts.map +0 -1
- package/esm/utilities/toRawTextResult.js +0 -21
package/esm/DummyEditorView.js
DELETED
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
// Headless View to be used on Server-side
|
|
2
|
-
// TODO: remove all unnecessary props and methods
|
|
3
|
-
/// An editor view manages the DOM structure that represents an
|
|
4
|
-
/// editable document. Its state and behavior are determined by its
|
|
5
|
-
/// [props](#view.DirectEditorProps).
|
|
6
|
-
export class DummyEditorView {
|
|
7
|
-
/// @internal
|
|
8
|
-
_props;
|
|
9
|
-
directPlugins;
|
|
10
|
-
/// @internal
|
|
11
|
-
nodeViews;
|
|
12
|
-
prevDirectPlugins = [];
|
|
13
|
-
pluginViews = [];
|
|
14
|
-
/// The view's current [state](#state.EditorState).
|
|
15
|
-
state;
|
|
16
|
-
/// Create a view. `place` may be a DOM node that the editor should
|
|
17
|
-
/// be appended to, a function that will place it into the document,
|
|
18
|
-
/// or an object whose `mount` property holds the node to use as the
|
|
19
|
-
/// document container. If it is `null`, the editor will not be
|
|
20
|
-
/// added to the document.
|
|
21
|
-
constructor(props) {
|
|
22
|
-
this._props = props;
|
|
23
|
-
this.state = props.state;
|
|
24
|
-
this.directPlugins = props.plugins || [];
|
|
25
|
-
this.directPlugins.forEach(checkStateComponent);
|
|
26
|
-
this.dispatch = this.dispatch.bind(this);
|
|
27
|
-
this.editable = getEditable(this);
|
|
28
|
-
this.nodeViews = buildNodeViews(this);
|
|
29
|
-
// TODO initInput(this)
|
|
30
|
-
this.updatePluginViews();
|
|
31
|
-
}
|
|
32
|
-
/// Indicates whether the editor is currently [editable](#view.EditorProps.editable).
|
|
33
|
-
editable;
|
|
34
|
-
/// Holds `true` when a
|
|
35
|
-
/// [composition](https://w3c.github.io/uievents/#events-compositionevents)
|
|
36
|
-
/// is active.
|
|
37
|
-
get composing() {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
get dom() {
|
|
41
|
-
return {
|
|
42
|
-
addEventListener() { },
|
|
43
|
-
removeEventListener() { },
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
/// The view's current [props](#view.EditorProps).
|
|
47
|
-
get props() {
|
|
48
|
-
if (this._props.state != this.state) {
|
|
49
|
-
let prev = this._props;
|
|
50
|
-
this._props = {};
|
|
51
|
-
for (let name in prev)
|
|
52
|
-
this._props[name] = prev[name];
|
|
53
|
-
this._props.state = this.state;
|
|
54
|
-
}
|
|
55
|
-
return this._props;
|
|
56
|
-
}
|
|
57
|
-
/// Update the view's props. Will immediately cause an update to
|
|
58
|
-
/// the DOM.
|
|
59
|
-
update(props) {
|
|
60
|
-
let prevProps = this._props;
|
|
61
|
-
this._props = props;
|
|
62
|
-
if (props.plugins) {
|
|
63
|
-
props.plugins.forEach(checkStateComponent);
|
|
64
|
-
this.directPlugins = props.plugins;
|
|
65
|
-
}
|
|
66
|
-
this.updateStateInner(props.state, prevProps);
|
|
67
|
-
}
|
|
68
|
-
/// Update the view by updating existing props object with the object
|
|
69
|
-
/// given as argument. Equivalent to `view.update(Object.assign({},
|
|
70
|
-
/// view.props, props))`.
|
|
71
|
-
setProps(props) {
|
|
72
|
-
let updated = {};
|
|
73
|
-
for (let name in this._props) {
|
|
74
|
-
updated[name] = this._props[name];
|
|
75
|
-
}
|
|
76
|
-
updated.state = this.state;
|
|
77
|
-
for (let name in props)
|
|
78
|
-
updated[name] = props[name];
|
|
79
|
-
this.update(updated);
|
|
80
|
-
}
|
|
81
|
-
/// Update the editor's `state` prop, without touching any of the
|
|
82
|
-
/// other props.
|
|
83
|
-
updateState(state) {
|
|
84
|
-
this.updateStateInner(state, this._props);
|
|
85
|
-
}
|
|
86
|
-
updateStateInner(state, prevProps) {
|
|
87
|
-
let prev = this.state, redraw = false, updateSel = false;
|
|
88
|
-
// When stored marks are added, stop composition, so that they can
|
|
89
|
-
// be displayed.
|
|
90
|
-
if (state.storedMarks && this.composing) {
|
|
91
|
-
// TODO clearComposition(this)
|
|
92
|
-
updateSel = true;
|
|
93
|
-
}
|
|
94
|
-
this.state = state;
|
|
95
|
-
let pluginsChanged = prev.plugins != state.plugins ||
|
|
96
|
-
this._props.plugins != prevProps.plugins;
|
|
97
|
-
if (pluginsChanged || this._props.plugins != prevProps.plugins ||
|
|
98
|
-
this._props.nodeViews != prevProps.nodeViews) {
|
|
99
|
-
let nodeViews = buildNodeViews(this);
|
|
100
|
-
if (changedNodeViews(nodeViews, this.nodeViews)) {
|
|
101
|
-
this.nodeViews = nodeViews;
|
|
102
|
-
redraw = true;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
this.editable = getEditable(this);
|
|
106
|
-
let updateDoc = redraw;
|
|
107
|
-
if (updateDoc || !state.selection.eq(prev.selection))
|
|
108
|
-
updateSel = true;
|
|
109
|
-
if (updateSel) {
|
|
110
|
-
// Work around an issue in Chrome, IE, and Edge where changing
|
|
111
|
-
// the DOM around an active selection puts it into a broken
|
|
112
|
-
// state where the thing the user sees differs from the
|
|
113
|
-
// selection reported by the Selection object (#710, #973,
|
|
114
|
-
// #1011, #1013, #1035).
|
|
115
|
-
let forceSelUpdate = false;
|
|
116
|
-
if (updateDoc) {
|
|
117
|
-
// If the node that the selection points into is written to,
|
|
118
|
-
// Chrome sometimes starts misreporting the selection, so this
|
|
119
|
-
// tracks that and forces a selection reset when our update
|
|
120
|
-
// did write to the node.
|
|
121
|
-
// TODO if (this.composing) this.input.compositionNode = findCompositionNode(this)
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
this.updatePluginViews(prev);
|
|
125
|
-
}
|
|
126
|
-
/// @internal
|
|
127
|
-
scrollToSelection() {
|
|
128
|
-
}
|
|
129
|
-
destroyPluginViews() {
|
|
130
|
-
let view;
|
|
131
|
-
while (view = this.pluginViews.pop())
|
|
132
|
-
if (view.destroy)
|
|
133
|
-
view.destroy();
|
|
134
|
-
}
|
|
135
|
-
updatePluginViews(prevState) {
|
|
136
|
-
if (!prevState || prevState.plugins != this.state.plugins ||
|
|
137
|
-
this.directPlugins != this.prevDirectPlugins) {
|
|
138
|
-
this.prevDirectPlugins = this.directPlugins;
|
|
139
|
-
this.destroyPluginViews();
|
|
140
|
-
for (let i = 0; i < this.directPlugins.length; i++) {
|
|
141
|
-
let plugin = this.directPlugins[i];
|
|
142
|
-
if (plugin.spec.view) {
|
|
143
|
-
this.pluginViews.push(plugin.spec.view(this));
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
for (let i = 0; i < this.state.plugins.length; i++) {
|
|
147
|
-
let plugin = this.state.plugins[i];
|
|
148
|
-
if (plugin.spec.view) {
|
|
149
|
-
this.pluginViews.push(plugin.spec.view(this));
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
for (let i = 0; i < this.pluginViews.length; i++) {
|
|
155
|
-
let pluginView = this.pluginViews[i];
|
|
156
|
-
if (pluginView.update)
|
|
157
|
-
pluginView.update(this, prevState);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
someProp(propName, f) {
|
|
162
|
-
let prop = this._props && this._props[propName], value;
|
|
163
|
-
if (prop != null && (value = f ? f(prop) : prop)) {
|
|
164
|
-
return value;
|
|
165
|
-
}
|
|
166
|
-
for (let i = 0; i < this.directPlugins.length; i++) {
|
|
167
|
-
let prop = this.directPlugins[i].props[propName];
|
|
168
|
-
if (prop != null && (value = f ? f(prop) : prop)) {
|
|
169
|
-
return value;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
let plugins = this.state.plugins;
|
|
173
|
-
if (plugins) {
|
|
174
|
-
for (let i = 0; i < plugins.length; i++) {
|
|
175
|
-
let prop = plugins[i].props[propName];
|
|
176
|
-
if (prop != null && (value = f ? f(prop) : prop))
|
|
177
|
-
return value;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
/// Query whether the view has focus.
|
|
182
|
-
hasFocus() {
|
|
183
|
-
return false;
|
|
184
|
-
}
|
|
185
|
-
/// Focus the editor.
|
|
186
|
-
focus() {
|
|
187
|
-
}
|
|
188
|
-
/// Removes the editor from the DOM and destroys all [node
|
|
189
|
-
/// views](#view.NodeView).
|
|
190
|
-
destroy() {
|
|
191
|
-
this.destroyPluginViews();
|
|
192
|
-
}
|
|
193
|
-
/// This is true when the view has been
|
|
194
|
-
/// [destroyed](#view.DummyEditorView.destroy) (and thus should not be
|
|
195
|
-
/// used anymore).
|
|
196
|
-
get isDestroyed() {
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
/// Used for testing.
|
|
200
|
-
dispatchEvent(event) {
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
DummyEditorView.prototype.dispatch = function (tr) {
|
|
204
|
-
let dispatchTransaction = this.props.dispatchTransaction;
|
|
205
|
-
if (dispatchTransaction)
|
|
206
|
-
dispatchTransaction.call(this, tr);
|
|
207
|
-
else
|
|
208
|
-
this.updateState(this.state.apply(tr));
|
|
209
|
-
};
|
|
210
|
-
function getEditable(view) {
|
|
211
|
-
return !view.someProp('editable', (value) => value(view.state) === false);
|
|
212
|
-
}
|
|
213
|
-
function buildNodeViews(view) {
|
|
214
|
-
let result = Object.create(null);
|
|
215
|
-
function add(obj) {
|
|
216
|
-
for (let prop in obj) {
|
|
217
|
-
if (!Object.prototype.hasOwnProperty.call(result, prop)) {
|
|
218
|
-
result[prop] = obj[prop];
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
view.someProp('nodeViews', add);
|
|
223
|
-
view.someProp('markViews', add);
|
|
224
|
-
return result;
|
|
225
|
-
}
|
|
226
|
-
function changedNodeViews(a, b) {
|
|
227
|
-
let nA = 0, nB = 0;
|
|
228
|
-
for (let prop in a) {
|
|
229
|
-
if (a[prop] != b[prop])
|
|
230
|
-
return true;
|
|
231
|
-
nA++;
|
|
232
|
-
}
|
|
233
|
-
for (let _ in b)
|
|
234
|
-
nB++;
|
|
235
|
-
return nA != nB;
|
|
236
|
-
}
|
|
237
|
-
function checkStateComponent(plugin) {
|
|
238
|
-
if (plugin.spec.state || plugin.spec.filterTransaction ||
|
|
239
|
-
plugin.spec.appendTransaction) {
|
|
240
|
-
throw new RangeError('Plugins passed directly to the view must not have a state component');
|
|
241
|
-
}
|
|
242
|
-
}
|
package/esm/Extension.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from 'prosemirror-state';
|
|
2
|
-
import type { Node, Schema, SchemaSpec } from 'prosemirror-model';
|
|
3
|
-
import { type CoreEditor } from './CoreEditor.js';
|
|
4
|
-
import type { InputRule } from './plugins/input-rules/InputRulesPlugin.js';
|
|
5
|
-
import { CommandFactories, CommandShortcuts } from './commands/mod.js';
|
|
6
|
-
export interface ExtensionConfig {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
requires: Array<Extension | string>;
|
|
9
|
-
}
|
|
10
|
-
export interface Converter {
|
|
11
|
-
fromDoc(document: Node): Promise<Uint8Array>;
|
|
12
|
-
toDoc(content: Uint8Array): Promise<Node>;
|
|
13
|
-
}
|
|
14
|
-
export declare abstract class Extension {
|
|
15
|
-
protected config: Partial<ExtensionConfig>;
|
|
16
|
-
readonly type = "extension";
|
|
17
|
-
abstract name: string;
|
|
18
|
-
protected editor: CoreEditor;
|
|
19
|
-
readonly conflicts?: Array<string>;
|
|
20
|
-
constructor(config?: Partial<ExtensionConfig>);
|
|
21
|
-
setEditor(editor: CoreEditor): void;
|
|
22
|
-
getEditor(): CoreEditor;
|
|
23
|
-
created(): void;
|
|
24
|
-
getInputRules(): InputRule[];
|
|
25
|
-
getProseMirrorPlugins(): Plugin[];
|
|
26
|
-
getCommandFactories(editor: CoreEditor): Partial<CommandFactories>;
|
|
27
|
-
getKeyboardShortcuts(editor: CoreEditor): Partial<CommandShortcuts>;
|
|
28
|
-
getConverters(editor: CoreEditor, schema: Schema): Record<string, Converter>;
|
|
29
|
-
setupSpec(spec: SchemaSpec): void;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=Extension.d.ts.map
|
package/esm/Extension.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Extension.d.ts","sourceRoot":"","sources":["../src/Extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEvE,MAAM,WAAW,eAAe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setEditor(editor) {
|
|
10
|
-
this.editor = editor;
|
|
11
|
-
}
|
|
12
|
-
getEditor() {
|
|
13
|
-
return this.editor;
|
|
14
|
-
}
|
|
15
|
-
created() {
|
|
16
|
-
}
|
|
17
|
-
getInputRules() {
|
|
18
|
-
return [];
|
|
19
|
-
}
|
|
20
|
-
getProseMirrorPlugins() {
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
getCommandFactories(editor) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
getKeyboardShortcuts(editor) {
|
|
27
|
-
return {};
|
|
28
|
-
}
|
|
29
|
-
getConverters(editor, schema) {
|
|
30
|
-
return {};
|
|
31
|
-
}
|
|
32
|
-
setupSpec(spec) {
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'prosemirror-model';
|
|
2
|
-
import { Plugin } from 'prosemirror-state';
|
|
3
|
-
import { NodeViewConstructor } from 'prosemirror-view';
|
|
4
|
-
import { Converter, Extension } from './Extension.js';
|
|
5
|
-
import { AnyExtension, AnyExtensionOrReq } from './types.js';
|
|
6
|
-
import { CoreEditor } from './CoreEditor.js';
|
|
7
|
-
import { Mark } from './Mark.js';
|
|
8
|
-
import { Node } from './Node.js';
|
|
9
|
-
import { type CommandManager } from './commands/CommandManager.js';
|
|
10
|
-
export declare function findDuplicates(items: any[]): any[];
|
|
11
|
-
export declare function splitExtensions(extensions: Iterable<AnyExtension>): {
|
|
12
|
-
baseExtensions: Extension[];
|
|
13
|
-
nodeExtensions: Node[];
|
|
14
|
-
markExtensions: Mark[];
|
|
15
|
-
};
|
|
16
|
-
export declare class ExtensionManager {
|
|
17
|
-
private editor;
|
|
18
|
-
private commandManager;
|
|
19
|
-
readonly schema: Schema;
|
|
20
|
-
readonly extensions: Set<AnyExtension>;
|
|
21
|
-
readonly plugins: Plugin[];
|
|
22
|
-
readonly nodeViews: Record<string, NodeViewConstructor>;
|
|
23
|
-
converters: Record<string, Converter>;
|
|
24
|
-
private debug;
|
|
25
|
-
constructor(extensions: AnyExtensionOrReq[], editor: CoreEditor, commandManager: CommandManager);
|
|
26
|
-
getExtension<T extends Extension>(name: string): T | undefined;
|
|
27
|
-
private initPlugins;
|
|
28
|
-
private setupExtensions;
|
|
29
|
-
getSchemaByResolvedExtensions(editor: CoreEditor): Schema;
|
|
30
|
-
created(): void;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=ExtensionManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionManager.d.ts","sourceRoot":"","sources":["../src/ExtensionManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AASjC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAGnE,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE,CAIlD;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,YAAY,CAAC;;;;EAgBjE;AAED,qBAAa,gBAAgB;IAazB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,cAAc;IAbxB,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,SAAgB,UAAU,EAAE,GAAG,CAAC,YAAY,CAAC,CAAa;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAM;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAM;IAEtD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAM;IAElD,OAAO,CAAC,KAAK,CAAQ;gBAGnB,UAAU,EAAE,iBAAiB,EAAE,EACvB,MAAM,EAAE,UAAU,EAClB,cAAc,EAAE,cAAc;IAcxC,YAAY,CAAC,CAAC,SAAS,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAY9D,OAAO,CAAC,WAAW;IAkHnB,OAAO,CAAC,eAAe;IAwEvB,6BAA6B,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM;IAkDzD,OAAO;CAOR"}
|
package/esm/ExtensionManager.js
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'prosemirror-model';
|
|
2
|
-
import { InputRulesPlugin, } from './plugins/input-rules/InputRulesPlugin.js';
|
|
3
|
-
import { KeymapPlugin } from './plugins/keymap/keymap.js';
|
|
4
|
-
import { firstCommand } from './commands/mod.js';
|
|
5
|
-
import { addAttributesToSchema } from './utilities/getHtmlAttributes.js';
|
|
6
|
-
import { TrackSelecionPlugin } from './plugins/TrackSelecionPlugin.js';
|
|
7
|
-
export function findDuplicates(items) {
|
|
8
|
-
const filtered = items.filter((el, index) => items.indexOf(el) !== index);
|
|
9
|
-
return Array.from(new Set(filtered));
|
|
10
|
-
}
|
|
11
|
-
export function splitExtensions(extensions) {
|
|
12
|
-
const baseExtensions = Array.from(extensions).filter((extension) => extension.type === 'extension');
|
|
13
|
-
const nodeExtensions = Array.from(extensions).filter((extension) => extension.type === 'node');
|
|
14
|
-
const markExtensions = Array.from(extensions).filter((extension) => extension.type === 'mark');
|
|
15
|
-
return {
|
|
16
|
-
baseExtensions,
|
|
17
|
-
nodeExtensions,
|
|
18
|
-
markExtensions,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export class ExtensionManager {
|
|
22
|
-
editor;
|
|
23
|
-
commandManager;
|
|
24
|
-
schema;
|
|
25
|
-
extensions = new Set();
|
|
26
|
-
plugins = [];
|
|
27
|
-
nodeViews = {};
|
|
28
|
-
converters = {};
|
|
29
|
-
debug = true;
|
|
30
|
-
constructor(extensions, editor, commandManager) {
|
|
31
|
-
this.editor = editor;
|
|
32
|
-
this.commandManager = commandManager;
|
|
33
|
-
this.setupExtensions(new Set(extensions));
|
|
34
|
-
this.schema = this.getSchemaByResolvedExtensions(editor);
|
|
35
|
-
const event = new CustomEvent('schema:ready', {
|
|
36
|
-
detail: {
|
|
37
|
-
editor,
|
|
38
|
-
schema: this.schema,
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
editor.dispatchEvent(event);
|
|
42
|
-
}
|
|
43
|
-
getExtension(name) {
|
|
44
|
-
const { nodeExtensions, markExtensions, baseExtensions } = splitExtensions(this.extensions);
|
|
45
|
-
for (const extension of baseExtensions) {
|
|
46
|
-
if (extension.name === name) {
|
|
47
|
-
return extension;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
initPlugins() {
|
|
52
|
-
const inputRules = [];
|
|
53
|
-
const keyBindings = new Map();
|
|
54
|
-
const mergeShortcuts = (toInsert, extName) => {
|
|
55
|
-
for (const key in toInsert) {
|
|
56
|
-
if (!toInsert[key]) {
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
const commandFactory = this.commandManager.commandFactories[toInsert[key]];
|
|
60
|
-
if (!commandFactory) {
|
|
61
|
-
console.warn(`No command constructor: ${toInsert[key]}`);
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
const command = commandFactory();
|
|
65
|
-
const keyBinding = keyBindings.get(key);
|
|
66
|
-
if (keyBinding) {
|
|
67
|
-
keyBindings.set(key, firstCommand(command, keyBinding));
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
keyBindings.set(key, command);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
let converters = {};
|
|
75
|
-
for (const extension of this.extensions) {
|
|
76
|
-
extension.setEditor(this.editor);
|
|
77
|
-
if (extension.type === 'node') {
|
|
78
|
-
const nodeType = this.schema.nodes[extension.name];
|
|
79
|
-
inputRules.push(...extension.getInputRules(nodeType));
|
|
80
|
-
this.plugins.push(...extension.getProseMirrorPlugins());
|
|
81
|
-
this.commandManager.mergeCommandFactories(extension.getCommandFactories(this.editor, nodeType), extension.name);
|
|
82
|
-
mergeShortcuts(extension.getKeyboardShortcuts(this.editor), extension.name);
|
|
83
|
-
converters = {
|
|
84
|
-
...converters,
|
|
85
|
-
...extension.getConverters(this.editor, this.schema),
|
|
86
|
-
};
|
|
87
|
-
const nodeView = extension.getNodeView(this.editor);
|
|
88
|
-
if (nodeView) {
|
|
89
|
-
this.nodeViews[extension.name] = nodeView;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (extension.type === 'mark') {
|
|
93
|
-
const markType = this.schema.marks[extension.name];
|
|
94
|
-
inputRules.push(...extension.getInputRules(markType));
|
|
95
|
-
this.commandManager.mergeCommandFactories(extension.getCommandFactories(this.editor, markType), extension.name);
|
|
96
|
-
mergeShortcuts(extension.getKeyboardShortcuts(this.editor), extension.name);
|
|
97
|
-
}
|
|
98
|
-
if (extension.type === 'extension') {
|
|
99
|
-
this.plugins.push(...extension.getProseMirrorPlugins());
|
|
100
|
-
this.commandManager.mergeCommandFactories(extension.getCommandFactories(this.editor), extension.name);
|
|
101
|
-
mergeShortcuts(extension.getKeyboardShortcuts(this.editor), extension.name);
|
|
102
|
-
converters = {
|
|
103
|
-
...converters,
|
|
104
|
-
...extension.getConverters(this.editor, this.schema),
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (this.debug) {
|
|
109
|
-
for (const key in keyBindings) {
|
|
110
|
-
const keyBinding = keyBindings.get(key);
|
|
111
|
-
if (!keyBinding) {
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
const wrapperCommand = (state, dispatch, view) => {
|
|
115
|
-
console.debug(`Key: ${key}`);
|
|
116
|
-
return true;
|
|
117
|
-
};
|
|
118
|
-
keyBindings.set(key, firstCommand(wrapperCommand, keyBinding));
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
this.converters = converters;
|
|
122
|
-
this.plugins.push(new InputRulesPlugin(inputRules));
|
|
123
|
-
this.plugins.push(new KeymapPlugin(Object.fromEntries(keyBindings)));
|
|
124
|
-
this.plugins.push(new TrackSelecionPlugin(this.editor));
|
|
125
|
-
}
|
|
126
|
-
setupExtensions(extensions) {
|
|
127
|
-
const allExtensions = new Map();
|
|
128
|
-
const createMap = (extensions) => {
|
|
129
|
-
for (const extension of extensions) {
|
|
130
|
-
if ('name' in extension) {
|
|
131
|
-
allExtensions.set(extension.name, extension);
|
|
132
|
-
}
|
|
133
|
-
if ('requires' in extension) {
|
|
134
|
-
const childExtensions = Array.from(extension.requires).filter((e) => typeof e !== 'string');
|
|
135
|
-
createMap(new Set(childExtensions));
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
createMap(extensions);
|
|
140
|
-
const initialized = new Set();
|
|
141
|
-
const initializeExtension = (extension) => {
|
|
142
|
-
console.info(`Initialize ${extension.type} ${extension.name}`);
|
|
143
|
-
this.extensions.add(extension);
|
|
144
|
-
};
|
|
145
|
-
function recursiveInitializeExtension(extension) {
|
|
146
|
-
if ('name' in extension && initialized.has(extension.name)) {
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
if ('requires' in extension) {
|
|
150
|
-
const requires = extension.requires || [];
|
|
151
|
-
const requireNames = requires.map((e) => typeof e === 'string' ? e : ('name' in e ? e.name : ''));
|
|
152
|
-
for (const require of requireNames) {
|
|
153
|
-
if (!initialized.has(require)) {
|
|
154
|
-
const requiredExtension = allExtensions.get(require);
|
|
155
|
-
if (!requiredExtension) {
|
|
156
|
-
throw new Error(`Required extension for (${'name' in extension ? extension.name : extension}) not found: ${require}`);
|
|
157
|
-
}
|
|
158
|
-
recursiveInitializeExtension(requiredExtension);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
if ('name' in extension) {
|
|
163
|
-
initializeExtension(extension);
|
|
164
|
-
initialized.add(extension.name);
|
|
165
|
-
allExtensions.delete(extension.name);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
for (const extension of allExtensions.values()) {
|
|
169
|
-
recursiveInitializeExtension(extension);
|
|
170
|
-
}
|
|
171
|
-
if (allExtensions.size > 0) {
|
|
172
|
-
throw new Error('Not all extensions initialized: ' +
|
|
173
|
-
Array.from(allExtensions.keys()).join(', '));
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
getSchemaByResolvedExtensions(editor) {
|
|
177
|
-
const { nodeExtensions, markExtensions, baseExtensions } = splitExtensions(this.extensions);
|
|
178
|
-
for (const extension of baseExtensions) {
|
|
179
|
-
if (Array.isArray(extension.conflicts)) {
|
|
180
|
-
for (const name of extension.conflicts) {
|
|
181
|
-
if (this.getExtension(name)) {
|
|
182
|
-
throw new Error(`Extension conflict: ${extension.name} vs ${name}`);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
const nodes = {};
|
|
188
|
-
for (const extension of nodeExtensions) {
|
|
189
|
-
nodes[extension.name] = extension.getNodeSpec();
|
|
190
|
-
addAttributesToSchema(nodes[extension.name], extension);
|
|
191
|
-
}
|
|
192
|
-
const marks = {};
|
|
193
|
-
for (const extension of markExtensions) {
|
|
194
|
-
marks[extension.name] = extension.getMarkSpec();
|
|
195
|
-
addAttributesToSchema(marks[extension.name], extension);
|
|
196
|
-
}
|
|
197
|
-
const spec = {
|
|
198
|
-
topNode: this.editor.config.topNode || 'doc',
|
|
199
|
-
nodes,
|
|
200
|
-
marks,
|
|
201
|
-
};
|
|
202
|
-
for (const extension of baseExtensions) {
|
|
203
|
-
if ('setupSpec' in baseExtensions) {
|
|
204
|
-
extension.setupSpec(spec);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
const event = new CustomEvent('schema:spec', {
|
|
208
|
-
detail: {
|
|
209
|
-
editor,
|
|
210
|
-
spec,
|
|
211
|
-
},
|
|
212
|
-
});
|
|
213
|
-
editor.dispatchEvent(event);
|
|
214
|
-
return new Schema(spec);
|
|
215
|
-
}
|
|
216
|
-
created() {
|
|
217
|
-
this.initPlugins();
|
|
218
|
-
for (const extension of this.extensions) {
|
|
219
|
-
extension.created();
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
package/esm/Mark.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { MarkSpec, MarkType } from 'prosemirror-model';
|
|
2
|
-
import type { InputRule } from './plugins/input-rules/InputRulesPlugin.js';
|
|
3
|
-
import type { CoreEditor } from './CoreEditor.js';
|
|
4
|
-
import type { CommandFactories, CommandShortcuts } from './commands/mod.js';
|
|
5
|
-
import { Attribute } from './types.js';
|
|
6
|
-
export interface MarkConfig {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}
|
|
9
|
-
export declare abstract class Mark {
|
|
10
|
-
protected config: Partial<MarkConfig>;
|
|
11
|
-
readonly type = "mark";
|
|
12
|
-
name: string;
|
|
13
|
-
protected editor: CoreEditor;
|
|
14
|
-
readonly attributes: Record<string, Attribute<any>>;
|
|
15
|
-
constructor(config?: Partial<MarkConfig>);
|
|
16
|
-
setEditor(editor: CoreEditor): void;
|
|
17
|
-
created(): void;
|
|
18
|
-
getMarkSpec(): MarkSpec;
|
|
19
|
-
getInputRules(type: MarkType): InputRule[];
|
|
20
|
-
getCommandFactories(editor: CoreEditor, type: MarkType): Partial<CommandFactories>;
|
|
21
|
-
getKeyboardShortcuts(editor: CoreEditor): Partial<CommandShortcuts>;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=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|
3
|
-
type = 'mark';
|
|
4
|
-
name = 'node';
|
|
5
|
-
editor;
|
|
6
|
-
attributes = {};
|
|
7
|
-
constructor(config = {}) {
|
|
8
|
-
this.config = config;
|
|
9
|
-
}
|
|
10
|
-
setEditor(editor) {
|
|
11
|
-
this.editor = editor;
|
|
12
|
-
}
|
|
13
|
-
created() {
|
|
14
|
-
}
|
|
15
|
-
getMarkSpec() {
|
|
16
|
-
throw new Error('MarkSpec not defined: ' + this.name);
|
|
17
|
-
}
|
|
18
|
-
getInputRules(type) {
|
|
19
|
-
return [];
|
|
20
|
-
}
|
|
21
|
-
getCommandFactories(editor, type) {
|
|
22
|
-
return {};
|
|
23
|
-
}
|
|
24
|
-
getKeyboardShortcuts(editor) {
|
|
25
|
-
return {};
|
|
26
|
-
}
|
|
27
|
-
}
|
package/esm/Node.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { NodeSpec, NodeType, Schema } from 'prosemirror-model';
|
|
2
|
-
import type { NodeViewConstructor } from 'prosemirror-view';
|
|
3
|
-
import type { Plugin } from 'prosemirror-state';
|
|
4
|
-
import type { InputRule } from './plugins/input-rules/InputRulesPlugin.js';
|
|
5
|
-
import type { CoreEditor } from './CoreEditor.js';
|
|
6
|
-
import type { Command, CommandShortcuts } from './commands/mod.js';
|
|
7
|
-
import type { Converter } from './Extension.js';
|
|
8
|
-
import { Attribute } from './types.js';
|
|
9
|
-
export interface NodeConfig {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}
|
|
12
|
-
export interface CommandFactories {
|
|
13
|
-
[key: string]: () => Command;
|
|
14
|
-
}
|
|
15
|
-
export declare abstract class Node {
|
|
16
|
-
protected config: Partial<NodeConfig>;
|
|
17
|
-
readonly type = "node";
|
|
18
|
-
name: string;
|
|
19
|
-
protected editor: CoreEditor;
|
|
20
|
-
readonly attributes: Record<string, Attribute<any>>;
|
|
21
|
-
constructor(config?: Partial<NodeConfig>);
|
|
22
|
-
setEditor(editor: CoreEditor): void;
|
|
23
|
-
created(): void;
|
|
24
|
-
getNodeSpec(): NodeSpec;
|
|
25
|
-
getInputRules(type: NodeType): InputRule[];
|
|
26
|
-
getProseMirrorPlugins(): Plugin[];
|
|
27
|
-
getCommandFactories(editor: CoreEditor, type: NodeType): Partial<CommandFactories>;
|
|
28
|
-
getKeyboardShortcuts(editor: CoreEditor): Partial<CommandShortcuts>;
|
|
29
|
-
getNodeView(editor: CoreEditor): NodeViewConstructor | undefined;
|
|
30
|
-
getConverters(editor: CoreEditor, schema: Schema): Record<string, Converter>;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=Node.d.ts.map
|
package/esm/Node.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../src/Node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,WAAW,UAAU;IAEzB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,OAAO,CAAC;CAC9B;AAED,8BAAsB,IAAI;IAOL,SAAS,CAAC,MAAM,EAAE,OAAO,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