@kerebron/extension-basic-editor 0.4.25 → 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 +12 -2
- package/esm/ExtensionBaseKeymap.d.ts +0 -7
- package/esm/ExtensionBaseKeymap.d.ts.map +0 -1
- package/esm/ExtensionBaseKeymap.js +0 -55
- package/esm/ExtensionBasicCodeEditor.d.ts +0 -11
- package/esm/ExtensionBasicCodeEditor.d.ts.map +0 -1
- package/esm/ExtensionBasicCodeEditor.js +0 -61
- package/esm/ExtensionBasicEditor.d.ts +0 -46
- package/esm/ExtensionBasicEditor.d.ts.map +0 -1
- package/esm/ExtensionBasicEditor.js +0 -88
- package/esm/ExtensionDropcursor.d.ts +0 -19
- package/esm/ExtensionDropcursor.d.ts.map +0 -1
- package/esm/ExtensionDropcursor.js +0 -186
- package/esm/ExtensionGapcursor.d.ts +0 -32
- package/esm/ExtensionGapcursor.d.ts.map +0 -1
- package/esm/ExtensionGapcursor.js +0 -249
- package/esm/ExtensionHistory.d.ts +0 -15
- package/esm/ExtensionHistory.d.ts.map +0 -1
- package/esm/ExtensionHistory.js +0 -62
- package/esm/ExtensionHtml.d.ts +0 -15
- package/esm/ExtensionHtml.d.ts.map +0 -1
- package/esm/ExtensionHtml.js +0 -99
- package/esm/ExtensionMediaUpload.d.ts +0 -24
- package/esm/ExtensionMediaUpload.d.ts.map +0 -1
- package/esm/ExtensionMediaUpload.js +0 -167
- package/esm/ExtensionSelection.d.ts +0 -11
- package/esm/ExtensionSelection.d.ts.map +0 -1
- package/esm/ExtensionSelection.js +0 -229
- package/esm/MarkBookmark.d.ts +0 -8
- package/esm/MarkBookmark.d.ts.map +0 -1
- package/esm/MarkBookmark.js +0 -16
- package/esm/MarkChange.d.ts +0 -8
- package/esm/MarkChange.d.ts.map +0 -1
- package/esm/MarkChange.js +0 -13
- package/esm/MarkCode.d.ts +0 -11
- package/esm/MarkCode.d.ts.map +0 -1
- package/esm/MarkCode.js +0 -23
- package/esm/MarkHighlight.d.ts +0 -8
- package/esm/MarkHighlight.d.ts.map +0 -1
- package/esm/MarkHighlight.js +0 -35
- package/esm/MarkItalic.d.ts +0 -11
- package/esm/MarkItalic.d.ts.map +0 -1
- package/esm/MarkItalic.js +0 -29
- package/esm/MarkLink.d.ts +0 -8
- package/esm/MarkLink.d.ts.map +0 -1
- package/esm/MarkLink.js +0 -29
- package/esm/MarkStrike.d.ts +0 -11
- package/esm/MarkStrike.d.ts.map +0 -1
- package/esm/MarkStrike.js +0 -26
- package/esm/MarkStrong.d.ts +0 -11
- package/esm/MarkStrong.d.ts.map +0 -1
- package/esm/MarkStrong.js +0 -38
- package/esm/MarkTextColor.d.ts +0 -8
- package/esm/MarkTextColor.d.ts.map +0 -1
- package/esm/MarkTextColor.js +0 -27
- package/esm/MarkUnderline.d.ts +0 -11
- package/esm/MarkUnderline.d.ts.map +0 -1
- package/esm/MarkUnderline.js +0 -33
- package/esm/NodeAside.d.ts +0 -8
- package/esm/NodeAside.d.ts.map +0 -1
- package/esm/NodeAside.js +0 -16
- package/esm/NodeBlockquote.d.ts +0 -13
- package/esm/NodeBlockquote.d.ts.map +0 -1
- package/esm/NodeBlockquote.js +0 -34
- package/esm/NodeBookmark.d.ts +0 -8
- package/esm/NodeBookmark.d.ts.map +0 -1
- package/esm/NodeBookmark.js +0 -19
- package/esm/NodeBulletList.d.ts +0 -13
- package/esm/NodeBulletList.d.ts.map +0 -1
- package/esm/NodeBulletList.js +0 -34
- package/esm/NodeCodeBlock.d.ts +0 -9
- package/esm/NodeCodeBlock.d.ts.map +0 -1
- package/esm/NodeCodeBlock.js +0 -50
- package/esm/NodeDefinitionDesc.d.ts +0 -8
- package/esm/NodeDefinitionDesc.d.ts.map +0 -1
- package/esm/NodeDefinitionDesc.js +0 -16
- package/esm/NodeDefinitionList.d.ts +0 -13
- package/esm/NodeDefinitionList.d.ts.map +0 -1
- package/esm/NodeDefinitionList.js +0 -28
- package/esm/NodeDefinitionTerm.d.ts +0 -8
- package/esm/NodeDefinitionTerm.d.ts.map +0 -1
- package/esm/NodeDefinitionTerm.js +0 -16
- package/esm/NodeDocument.d.ts +0 -7
- package/esm/NodeDocument.d.ts.map +0 -1
- package/esm/NodeDocument.js +0 -19
- package/esm/NodeDocumentCode.d.ts +0 -7
- package/esm/NodeDocumentCode.d.ts.map +0 -1
- package/esm/NodeDocumentCode.js +0 -29
- package/esm/NodeFrontmatter.d.ts +0 -8
- package/esm/NodeFrontmatter.d.ts.map +0 -1
- package/esm/NodeFrontmatter.js +0 -16
- package/esm/NodeHardBreak.d.ts +0 -14
- package/esm/NodeHardBreak.d.ts.map +0 -1
- package/esm/NodeHardBreak.js +0 -67
- package/esm/NodeHeading.d.ts +0 -13
- package/esm/NodeHeading.d.ts.map +0 -1
- package/esm/NodeHeading.js +0 -49
- package/esm/NodeHorizontalRule.d.ts +0 -11
- package/esm/NodeHorizontalRule.d.ts.map +0 -1
- package/esm/NodeHorizontalRule.js +0 -29
- package/esm/NodeImage.d.ts +0 -8
- package/esm/NodeImage.d.ts.map +0 -1
- package/esm/NodeImage.js +0 -33
- package/esm/NodeInlineShortCode.d.ts +0 -10
- package/esm/NodeInlineShortCode.d.ts.map +0 -1
- package/esm/NodeInlineShortCode.js +0 -30
- package/esm/NodeListItem.d.ts +0 -15
- package/esm/NodeListItem.d.ts.map +0 -1
- package/esm/NodeListItem.js +0 -199
- package/esm/NodeMath.d.ts +0 -8
- package/esm/NodeMath.d.ts.map +0 -1
- package/esm/NodeMath.js +0 -99
- package/esm/NodeOrderedList.d.ts +0 -23
- package/esm/NodeOrderedList.d.ts.map +0 -1
- package/esm/NodeOrderedList.js +0 -52
- package/esm/NodeParagraph.d.ts +0 -11
- package/esm/NodeParagraph.d.ts.map +0 -1
- package/esm/NodeParagraph.js +0 -25
- package/esm/NodeTaskItem.d.ts +0 -24
- package/esm/NodeTaskItem.d.ts.map +0 -1
- package/esm/NodeTaskItem.js +0 -139
- package/esm/NodeTaskList.d.ts +0 -11
- package/esm/NodeTaskList.d.ts.map +0 -1
- package/esm/NodeTaskList.js +0 -25
- package/esm/NodeText.d.ts +0 -7
- package/esm/NodeText.d.ts.map +0 -1
- package/esm/NodeText.js +0 -9
- package/esm/NodeVideo.d.ts +0 -8
- package/esm/NodeVideo.d.ts.map +0 -1
- package/esm/NodeVideo.js +0 -45
- package/esm/package.json +0 -3
- package/esm/remote-selection/ExtensionRemoteSelection.d.ts +0 -24
- package/esm/remote-selection/ExtensionRemoteSelection.d.ts.map +0 -1
- package/esm/remote-selection/ExtensionRemoteSelection.js +0 -22
- package/esm/remote-selection/remoteSelectionPlugin.d.ts +0 -25
- package/esm/remote-selection/remoteSelectionPlugin.d.ts.map +0 -1
- package/esm/remote-selection/remoteSelectionPlugin.js +0 -96
package/esm/NodeAside.d.ts
DELETED
package/esm/NodeAside.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeAside.d.ts","sourceRoot":"","sources":["../src/NodeAside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,qBAAa,SAAU,SAAQ,IAAI;IACxB,IAAI,SAAW;IACxB,QAAQ,WAAW;IAEV,WAAW,IAAI,QAAQ;CAWjC"}
|
package/esm/NodeAside.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
export class NodeAside extends Node {
|
|
3
|
-
name = 'aside';
|
|
4
|
-
requires = ['doc'];
|
|
5
|
-
getNodeSpec() {
|
|
6
|
-
return {
|
|
7
|
-
content: 'block+',
|
|
8
|
-
group: 'block',
|
|
9
|
-
defining: true,
|
|
10
|
-
parseDOM: [{ tag: 'aside' }],
|
|
11
|
-
toDOM() {
|
|
12
|
-
return ['aside', 0];
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
}
|
package/esm/NodeBlockquote.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NodeSpec, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { type CoreEditor, Node } from '@kerebron/editor';
|
|
3
|
-
import { type CommandFactories, type CommandShortcuts } from '@kerebron/editor/commands';
|
|
4
|
-
import { InputRule } from '@kerebron/editor/plugins/input-rules';
|
|
5
|
-
export declare class NodeBlockquote extends Node {
|
|
6
|
-
name: string;
|
|
7
|
-
requires: string[];
|
|
8
|
-
getNodeSpec(): NodeSpec;
|
|
9
|
-
getInputRules(type: NodeType): InputRule[];
|
|
10
|
-
getCommandFactories(editor: CoreEditor, type: NodeType): Partial<CommandFactories>;
|
|
11
|
-
getKeyboardShortcuts(): Partial<CommandShortcuts>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=NodeBlockquote.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeBlockquote.d.ts","sourceRoot":"","sources":["../src/NodeBlockquote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,SAAS,EAEV,MAAM,sCAAsC,CAAC;AAE9C,qBAAa,cAAe,SAAQ,IAAI;IAC7B,IAAI,SAAgB;IAC7B,QAAQ,WAAW;IAEV,WAAW,IAAI,QAAQ;IAYvB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,EAAE;IAQ1C,mBAAmB,CAC1B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,gBAAgB,CAAC;IAMnB,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAK3D"}
|
package/esm/NodeBlockquote.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
import { wrappingInputRule, } from '@kerebron/editor/plugins/input-rules';
|
|
3
|
-
export class NodeBlockquote extends Node {
|
|
4
|
-
name = 'blockquote';
|
|
5
|
-
requires = ['doc'];
|
|
6
|
-
getNodeSpec() {
|
|
7
|
-
return {
|
|
8
|
-
content: 'block+',
|
|
9
|
-
group: 'block',
|
|
10
|
-
defining: true,
|
|
11
|
-
parseDOM: [{ tag: 'blockquote' }],
|
|
12
|
-
toDOM() {
|
|
13
|
-
return ['blockquote', 0];
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
getInputRules(type) {
|
|
18
|
-
return [
|
|
19
|
-
/// Given a blockquote node type, returns an input rule that turns `"> "`
|
|
20
|
-
/// at the start of a textblock into a blockquote.
|
|
21
|
-
wrappingInputRule(/^\s*>\s$/, type),
|
|
22
|
-
];
|
|
23
|
-
}
|
|
24
|
-
getCommandFactories(editor, type) {
|
|
25
|
-
return {
|
|
26
|
-
'toggleBlockquote': () => editor.commandFactories.wrapInList(type),
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
getKeyboardShortcuts() {
|
|
30
|
-
return {
|
|
31
|
-
'Ctrl->': 'toggleBlockquote',
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
}
|
package/esm/NodeBookmark.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeBookmark.d.ts","sourceRoot":"","sources":["../src/NodeBookmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,qBAAa,YAAa,SAAQ,IAAI;IAC3B,IAAI,SAAmB;IAChC,QAAQ,WAAW;IAEV,WAAW,IAAI,QAAQ;CAcjC"}
|
package/esm/NodeBookmark.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
export class NodeBookmark extends Node {
|
|
3
|
-
name = 'bookmark-node';
|
|
4
|
-
requires = ['doc'];
|
|
5
|
-
getNodeSpec() {
|
|
6
|
-
return {
|
|
7
|
-
inline: true,
|
|
8
|
-
group: 'inline',
|
|
9
|
-
selectable: false,
|
|
10
|
-
attrs: {
|
|
11
|
-
id: {},
|
|
12
|
-
},
|
|
13
|
-
parseDOM: [],
|
|
14
|
-
toDOM(mark) {
|
|
15
|
-
return ['a', { id: mark.attrs.id }, 0];
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}
|
package/esm/NodeBulletList.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { NodeSpec, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { type CoreEditor, Node } from '@kerebron/editor';
|
|
3
|
-
import { type CommandFactories, type CommandShortcuts } from '@kerebron/editor/commands';
|
|
4
|
-
import { type InputRule } from '@kerebron/editor/plugins/input-rules';
|
|
5
|
-
export declare class NodeBulletList extends Node {
|
|
6
|
-
name: string;
|
|
7
|
-
requires: string[];
|
|
8
|
-
getNodeSpec(): NodeSpec;
|
|
9
|
-
getInputRules(type: NodeType): InputRule[];
|
|
10
|
-
getCommandFactories(editor: CoreEditor, type: NodeType): Partial<CommandFactories>;
|
|
11
|
-
getKeyboardShortcuts(): Partial<CommandShortcuts>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=NodeBulletList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeBulletList.d.ts","sourceRoot":"","sources":["../src/NodeBulletList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,sCAAsC,CAAC;AAE9C,qBAAa,cAAe,SAAQ,IAAI;IAC7B,IAAI,SAAiB;IAC9B,QAAQ,WAAW;IAEV,WAAW,IAAI,QAAQ;IAWvB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,EAAE;IAS1C,mBAAmB,CAC1B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,gBAAgB,CAAC;IAMnB,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAK3D"}
|
package/esm/NodeBulletList.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
import { wrappingInputRule, } from '@kerebron/editor/plugins/input-rules';
|
|
3
|
-
export class NodeBulletList extends Node {
|
|
4
|
-
name = 'bullet_list';
|
|
5
|
-
requires = ['doc'];
|
|
6
|
-
getNodeSpec() {
|
|
7
|
-
return {
|
|
8
|
-
content: 'list_item+',
|
|
9
|
-
group: 'block',
|
|
10
|
-
parseDOM: [{ tag: 'ul' }],
|
|
11
|
-
toDOM() {
|
|
12
|
-
return ['ul', 0];
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
getInputRules(type) {
|
|
17
|
-
/// Given a list node type, returns an input rule that turns a bullet
|
|
18
|
-
/// (dash, plush, or asterisk) at the start of a textblock into a
|
|
19
|
-
/// bullet list.
|
|
20
|
-
return [
|
|
21
|
-
wrappingInputRule(/^\s*([-+*])\s$/, type),
|
|
22
|
-
];
|
|
23
|
-
}
|
|
24
|
-
getCommandFactories(editor, type) {
|
|
25
|
-
return {
|
|
26
|
-
'toggleBulletList': () => editor.commandFactories.wrapInList(type),
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
getKeyboardShortcuts() {
|
|
30
|
-
return {
|
|
31
|
-
'Shift-Ctrl-8': 'toggleBulletList',
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
}
|
package/esm/NodeCodeBlock.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { NodeSpec, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { Node } from '@kerebron/editor';
|
|
3
|
-
import { type InputRule } from '@kerebron/editor/plugins/input-rules';
|
|
4
|
-
export declare class NodeCodeBlock extends Node {
|
|
5
|
-
name: string;
|
|
6
|
-
getNodeSpec(): NodeSpec;
|
|
7
|
-
getInputRules(type: NodeType): InputRule[];
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=NodeCodeBlock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeCodeBlock.d.ts","sourceRoot":"","sources":["../src/NodeCodeBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,sCAAsC,CAAC;AAE9C,qBAAa,aAAc,SAAQ,IAAI;IAC5B,IAAI,SAAgB;IAEpB,WAAW,IAAI,QAAQ;IA0CvB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,EAAE;CAOpD"}
|
package/esm/NodeCodeBlock.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
import { textblockTypeInputRule, } from '@kerebron/editor/plugins/input-rules';
|
|
3
|
-
export class NodeCodeBlock extends Node {
|
|
4
|
-
name = 'code_block';
|
|
5
|
-
getNodeSpec() {
|
|
6
|
-
// const langs = this.config.languageWhitelist || LANGS;
|
|
7
|
-
return {
|
|
8
|
-
content: 'text*',
|
|
9
|
-
marks: '',
|
|
10
|
-
group: 'block',
|
|
11
|
-
code: true,
|
|
12
|
-
defining: true,
|
|
13
|
-
parseDOM: [
|
|
14
|
-
{
|
|
15
|
-
tag: 'pre',
|
|
16
|
-
preserveWhitespace: 'full',
|
|
17
|
-
getAttrs(dom) {
|
|
18
|
-
let lang = dom.getAttribute('lang');
|
|
19
|
-
// if (!lang) {
|
|
20
|
-
// for (const className of dom.classList) {
|
|
21
|
-
// if (
|
|
22
|
-
// className.startsWith('lang-') &&
|
|
23
|
-
// langs.indexOf(className.substring('lang-'.length)) > -1
|
|
24
|
-
// ) {
|
|
25
|
-
// lang = className.substring('lang-'.length);
|
|
26
|
-
// break;
|
|
27
|
-
// }
|
|
28
|
-
// }
|
|
29
|
-
// }
|
|
30
|
-
return {
|
|
31
|
-
lang,
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
attrs: { lang: { default: null } },
|
|
37
|
-
toDOM(node) {
|
|
38
|
-
const { lang } = node.attrs;
|
|
39
|
-
return ['pre', { lang }, ['code', 0]];
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
getInputRules(type) {
|
|
44
|
-
/// Given a code block node type, returns an input rule that turns a
|
|
45
|
-
/// textblock starting with three backticks into a code block.
|
|
46
|
-
return [
|
|
47
|
-
textblockTypeInputRule(/^```$/, type),
|
|
48
|
-
];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeDefinitionDesc.d.ts","sourceRoot":"","sources":["../src/NodeDefinitionDesc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,qBAAa,kBAAmB,SAAQ,IAAI;IACjC,IAAI,SAAQ;IACrB,QAAQ,WAAU;IAET,WAAW,IAAI,QAAQ;CAWjC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
export class NodeDefinitionDesc extends Node {
|
|
3
|
-
name = 'dd';
|
|
4
|
-
requires = ['dl'];
|
|
5
|
-
getNodeSpec() {
|
|
6
|
-
return {
|
|
7
|
-
content: 'inline*',
|
|
8
|
-
group: 'block',
|
|
9
|
-
parseDOM: [{ tag: 'dd' }],
|
|
10
|
-
defining: true,
|
|
11
|
-
toDOM() {
|
|
12
|
-
return ['dd', 0];
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { NodeSpec, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { type CoreEditor, Node } from '@kerebron/editor';
|
|
3
|
-
import { type CommandFactories, type CommandShortcuts } from '@kerebron/editor/commands';
|
|
4
|
-
import { type InputRule } from '@kerebron/editor/plugins/input-rules';
|
|
5
|
-
export declare class NodeDefinitionList extends Node {
|
|
6
|
-
name: string;
|
|
7
|
-
requires: string[];
|
|
8
|
-
getNodeSpec(): NodeSpec;
|
|
9
|
-
getInputRules(type: NodeType): InputRule[];
|
|
10
|
-
getCommandFactories(editor: CoreEditor, type: NodeType): Partial<CommandFactories>;
|
|
11
|
-
getKeyboardShortcuts(): Partial<CommandShortcuts>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=NodeDefinitionList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeDefinitionList.d.ts","sourceRoot":"","sources":["../src/NodeDefinitionList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,sCAAsC,CAAC;AAE9C,qBAAa,kBAAmB,SAAQ,IAAI;IACjC,IAAI,SAAQ;IACrB,QAAQ,WAAW;IAEV,WAAW,IAAI,QAAQ;IAWvB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,EAAE;IAM1C,mBAAmB,CAC1B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,gBAAgB,CAAC;IAMnB,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG3D"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
export class NodeDefinitionList extends Node {
|
|
3
|
-
name = 'dl';
|
|
4
|
-
requires = ['doc'];
|
|
5
|
-
getNodeSpec() {
|
|
6
|
-
return {
|
|
7
|
-
content: 'dt+|dd+',
|
|
8
|
-
group: 'block',
|
|
9
|
-
parseDOM: [{ tag: 'dl' }],
|
|
10
|
-
toDOM() {
|
|
11
|
-
return ['dl', 0];
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
getInputRules(type) {
|
|
16
|
-
return [
|
|
17
|
-
// wrappingInputRule(/^\s*([-+*])\s$/, type),
|
|
18
|
-
];
|
|
19
|
-
}
|
|
20
|
-
getCommandFactories(editor, type) {
|
|
21
|
-
return {
|
|
22
|
-
'toggleDefinitionList': () => editor.commandFactories.wrapInList(type),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
getKeyboardShortcuts() {
|
|
26
|
-
return {};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeDefinitionTerm.d.ts","sourceRoot":"","sources":["../src/NodeDefinitionTerm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,qBAAa,kBAAmB,SAAQ,IAAI;IACjC,IAAI,SAAQ;IACrB,QAAQ,WAAU;IAET,WAAW,IAAI,QAAQ;CAWjC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
export class NodeDefinitionTerm extends Node {
|
|
3
|
-
name = 'dt';
|
|
4
|
-
requires = ['dl'];
|
|
5
|
-
getNodeSpec() {
|
|
6
|
-
return {
|
|
7
|
-
content: 'inline*',
|
|
8
|
-
group: 'block',
|
|
9
|
-
parseDOM: [{ tag: 'dt' }],
|
|
10
|
-
defining: true,
|
|
11
|
-
toDOM() {
|
|
12
|
-
return ['dt', 0];
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
}
|
package/esm/NodeDocument.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeDocument.d.ts","sourceRoot":"","sources":["../src/NodeDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,qBAAa,YAAa,SAAQ,IAAI;IAC3B,IAAI,SAAS;IAEb,WAAW,IAAI,QAAQ;CAejC"}
|
package/esm/NodeDocument.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
export class NodeDocument extends Node {
|
|
3
|
-
name = 'doc';
|
|
4
|
-
getNodeSpec() {
|
|
5
|
-
return {
|
|
6
|
-
content: 'block+',
|
|
7
|
-
marks: 'code em strong link bookmark', // TODO: why is it necessary for convertCodeParagraphsToCodeBlocks?
|
|
8
|
-
EMPTY_DOC: {
|
|
9
|
-
'type': this.name,
|
|
10
|
-
'content': [
|
|
11
|
-
{
|
|
12
|
-
'type': 'paragraph',
|
|
13
|
-
'content': [],
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeDocumentCode.d.ts","sourceRoot":"","sources":["../src/NodeDocumentCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,qBAAa,gBAAiB,SAAQ,IAAI;IAC/B,IAAI,SAAc;IAElB,WAAW,IAAI,QAAQ;CAyBjC"}
|
package/esm/NodeDocumentCode.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
export class NodeDocumentCode extends Node {
|
|
3
|
-
name = 'doc_code';
|
|
4
|
-
getNodeSpec() {
|
|
5
|
-
return {
|
|
6
|
-
content: 'code_block',
|
|
7
|
-
defaultAttrs: {
|
|
8
|
-
'lang': this.config.lang || null,
|
|
9
|
-
},
|
|
10
|
-
EMPTY_DOC: {
|
|
11
|
-
'type': this.name,
|
|
12
|
-
'content': [
|
|
13
|
-
{
|
|
14
|
-
'type': 'code_block',
|
|
15
|
-
'attrs': {
|
|
16
|
-
'lang': this.config.lang || null,
|
|
17
|
-
},
|
|
18
|
-
'content': [
|
|
19
|
-
// {
|
|
20
|
-
// "type": "text",
|
|
21
|
-
// "text": ""
|
|
22
|
-
// }
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}
|
package/esm/NodeFrontmatter.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeFrontmatter.d.ts","sourceRoot":"","sources":["../src/NodeFrontmatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,qBAAa,eAAgB,SAAQ,IAAI;IAC9B,IAAI,SAAiB;IAC9B,QAAQ,WAAW;IAEV,WAAW,IAAI,QAAQ;CAWjC"}
|
package/esm/NodeFrontmatter.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
export class NodeFrontmatter extends Node {
|
|
3
|
-
name = 'frontmatter';
|
|
4
|
-
requires = ['doc'];
|
|
5
|
-
getNodeSpec() {
|
|
6
|
-
return {
|
|
7
|
-
content: 'inline*',
|
|
8
|
-
group: 'block',
|
|
9
|
-
defining: true,
|
|
10
|
-
parseDOM: [{ tag: 'pre' }],
|
|
11
|
-
toDOM() {
|
|
12
|
-
return ['pre', 0];
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
}
|
package/esm/NodeHardBreak.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { NodeSpec, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { type CoreEditor, Node } from '@kerebron/editor';
|
|
3
|
-
import { type CommandFactories, type CommandShortcuts } from '@kerebron/editor/commands';
|
|
4
|
-
export declare class NodeHardBreak extends Node {
|
|
5
|
-
name: string;
|
|
6
|
-
requires: string[];
|
|
7
|
-
options: {
|
|
8
|
-
keepMarks: boolean;
|
|
9
|
-
};
|
|
10
|
-
getNodeSpec(): NodeSpec;
|
|
11
|
-
getCommandFactories(editor: CoreEditor, type: NodeType): Partial<CommandFactories>;
|
|
12
|
-
getKeyboardShortcuts(): Partial<CommandShortcuts>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=NodeHardBreak.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeHardBreak.d.ts","sourceRoot":"","sources":["../src/NodeHardBreak.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AAGnC,qBAAa,aAAc,SAAQ,IAAI;IAC5B,IAAI,SAAQ;IACrB,QAAQ,WAAW;IAEnB,OAAO;;MAEL;IAEO,WAAW,IAAI,QAAQ;IAavB,mBAAmB,CAC1B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,gBAAgB,CAAC;IA2CnB,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAgB3D"}
|
package/esm/NodeHardBreak.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
import { firstCommand } from '@kerebron/editor/commands';
|
|
3
|
-
export class NodeHardBreak extends Node {
|
|
4
|
-
name = 'br';
|
|
5
|
-
requires = ['doc'];
|
|
6
|
-
options = {
|
|
7
|
-
keepMarks: true,
|
|
8
|
-
};
|
|
9
|
-
getNodeSpec() {
|
|
10
|
-
return {
|
|
11
|
-
inline: true,
|
|
12
|
-
group: 'inline',
|
|
13
|
-
selectable: false,
|
|
14
|
-
linebreakReplacement: true,
|
|
15
|
-
parseDOM: [{ tag: 'br' }],
|
|
16
|
-
toDOM() {
|
|
17
|
-
return ['br'];
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
getCommandFactories(editor, type) {
|
|
22
|
-
// TODO: refactor commands
|
|
23
|
-
// const comm2: Command = (state: EditorState, dispatch?: (tr: Transaction) => void) => {
|
|
24
|
-
// const { selection, storedMarks } = state
|
|
25
|
-
// if (selection.$from.parent.type.spec.isolating) {
|
|
26
|
-
// return false
|
|
27
|
-
// }
|
|
28
|
-
// const { keepMarks } = this.options
|
|
29
|
-
// // const { splittableMarks } = editor.extensionManager
|
|
30
|
-
// const splittableMarks = [];
|
|
31
|
-
// const marks = storedMarks
|
|
32
|
-
// || (selection.$to.parentOffset && selection.$from.marks())
|
|
33
|
-
// return editor.chain()
|
|
34
|
-
// .insertContent({ type: this.name })
|
|
35
|
-
// .command(({ tr, dispatch }) => {
|
|
36
|
-
// if (dispatch && marks && keepMarks) {
|
|
37
|
-
// for (const mark of marks) {
|
|
38
|
-
// console.log('mteset', mark.type);
|
|
39
|
-
// }
|
|
40
|
-
// const filteredMarks = marks
|
|
41
|
-
// .filter(mark => splittableMarks.includes(mark.type.name))
|
|
42
|
-
// tr.ensureMarks(filteredMarks)
|
|
43
|
-
// }
|
|
44
|
-
// return true
|
|
45
|
-
// })
|
|
46
|
-
// .run();
|
|
47
|
-
// }
|
|
48
|
-
const setHardBreak = firstCommand(editor.run.exitCode);
|
|
49
|
-
return {
|
|
50
|
-
'setHardBreak': () => setHardBreak,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
getKeyboardShortcuts() {
|
|
54
|
-
// https://stackoverflow.com/a/73619128
|
|
55
|
-
const mac = typeof navigator != 'undefined'
|
|
56
|
-
? /Mac|iP(hone|[oa]d)/.test(navigator?.platform)
|
|
57
|
-
: false;
|
|
58
|
-
const shortcuts = {
|
|
59
|
-
'Ctrl-Enter': 'setHardBreak',
|
|
60
|
-
};
|
|
61
|
-
if (mac) {
|
|
62
|
-
shortcuts['Mod-Enter'] = 'setHardBreak';
|
|
63
|
-
shortcuts['Shift-Enter'] = 'setHardBreak';
|
|
64
|
-
}
|
|
65
|
-
return shortcuts;
|
|
66
|
-
}
|
|
67
|
-
}
|
package/esm/NodeHeading.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { NodeSpec, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { type CoreEditor, Node } from '@kerebron/editor';
|
|
3
|
-
import { type CommandFactories, type CommandShortcuts } from '@kerebron/editor/commands';
|
|
4
|
-
import { type InputRule } from '@kerebron/editor/plugins/input-rules';
|
|
5
|
-
export declare class NodeHeading extends Node {
|
|
6
|
-
name: string;
|
|
7
|
-
requires: string[];
|
|
8
|
-
getNodeSpec(): NodeSpec;
|
|
9
|
-
getInputRules(type: NodeType): InputRule[];
|
|
10
|
-
getCommandFactories(editor: CoreEditor, type: NodeType): Partial<CommandFactories>;
|
|
11
|
-
getKeyboardShortcuts(): Partial<CommandShortcuts>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=NodeHeading.d.ts.map
|
package/esm/NodeHeading.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeHeading.d.ts","sourceRoot":"","sources":["../src/NodeHeading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,sCAAsC,CAAC;AAI9C,qBAAa,WAAY,SAAQ,IAAI;IAC1B,IAAI,SAAa;IAC1B,QAAQ,WAAW;IAEV,WAAW,IAAI,QAAQ;IAoBvB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,EAAE;IAc1C,mBAAmB,CAC1B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,gBAAgB,CAAC;IAWnB,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAS3D"}
|
package/esm/NodeHeading.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Node } from '@kerebron/editor';
|
|
2
|
-
import { textblockTypeInputRule, } from '@kerebron/editor/plugins/input-rules';
|
|
3
|
-
const maxLevel = 6;
|
|
4
|
-
export class NodeHeading extends Node {
|
|
5
|
-
name = 'heading';
|
|
6
|
-
requires = ['doc'];
|
|
7
|
-
getNodeSpec() {
|
|
8
|
-
return {
|
|
9
|
-
attrs: { level: { default: 1 } },
|
|
10
|
-
content: 'inline*',
|
|
11
|
-
group: 'block',
|
|
12
|
-
defining: true,
|
|
13
|
-
parseDOM: [
|
|
14
|
-
{ tag: 'h1', attrs: { level: 1 } },
|
|
15
|
-
{ tag: 'h2', attrs: { level: 2 } },
|
|
16
|
-
{ tag: 'h3', attrs: { level: 3 } },
|
|
17
|
-
{ tag: 'h4', attrs: { level: 4 } },
|
|
18
|
-
{ tag: 'h5', attrs: { level: 5 } },
|
|
19
|
-
{ tag: 'h6', attrs: { level: 6 } },
|
|
20
|
-
],
|
|
21
|
-
toDOM(node) {
|
|
22
|
-
return ['h' + node.attrs.level, 0];
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
getInputRules(type) {
|
|
27
|
-
/// Given a node type and a maximum level, creates an input rule that
|
|
28
|
-
/// turns up to that number of `#` characters followed by a space at
|
|
29
|
-
/// the start of a textblock into a heading whose level corresponds to
|
|
30
|
-
/// the number of `#` signs.
|
|
31
|
-
return [
|
|
32
|
-
textblockTypeInputRule(new RegExp('^(#{1,' + maxLevel + '})\\s$'), type, (match) => ({ level: match[1].length })),
|
|
33
|
-
];
|
|
34
|
-
}
|
|
35
|
-
getCommandFactories(editor, type) {
|
|
36
|
-
const commands = {};
|
|
37
|
-
for (let i = 1; i <= maxLevel; i++) {
|
|
38
|
-
commands['setHeading' + i] = () => editor.commandFactories.setBlockType(type, { level: i });
|
|
39
|
-
}
|
|
40
|
-
return commands;
|
|
41
|
-
}
|
|
42
|
-
getKeyboardShortcuts() {
|
|
43
|
-
const keys = {};
|
|
44
|
-
for (let i = 1; i <= maxLevel; i++) {
|
|
45
|
-
keys['Shift-Ctrl-' + i] = 'setHeading' + i;
|
|
46
|
-
}
|
|
47
|
-
return keys;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { NodeSpec, NodeType } from 'prosemirror-model';
|
|
2
|
-
import { type CoreEditor, Node } from '@kerebron/editor';
|
|
3
|
-
import type { CommandFactories, CommandShortcuts } from '@kerebron/editor/commands';
|
|
4
|
-
export declare class NodeHorizontalRule extends Node {
|
|
5
|
-
name: string;
|
|
6
|
-
requires: string[];
|
|
7
|
-
getNodeSpec(): NodeSpec;
|
|
8
|
-
getCommandFactories(editor: CoreEditor, type: NodeType): Partial<CommandFactories>;
|
|
9
|
-
getKeyboardShortcuts(): Partial<CommandShortcuts>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=NodeHorizontalRule.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeHorizontalRule.d.ts","sourceRoot":"","sources":["../src/NodeHorizontalRule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AAEnC,qBAAa,kBAAmB,SAAQ,IAAI;IACjC,IAAI,SAAQ;IACrB,QAAQ,WAAW;IAEV,WAAW,IAAI,QAAQ;IAUvB,mBAAmB,CAC1B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,gBAAgB,CAAC;IAanB,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAK3D"}
|