@kerebron/extension-basic-editor 0.9.1 → 0.9.3
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/esm/BasicEditorKit.d.ts +0 -1
- package/esm/ExtensionBaseKeymap.d.ts +0 -1
- package/esm/ExtensionBasicCodeEditor.d.ts +0 -1
- package/esm/ExtensionBasicEditor.d.ts +0 -1
- package/esm/ExtensionDropcursor.d.ts +0 -1
- package/esm/ExtensionGapcursor.d.ts +0 -1
- package/esm/ExtensionSelection.d.ts +14 -1
- package/esm/ExtensionSelection.js.map +1 -1
- package/esm/ExtensionTextAlign.d.ts +12 -1
- package/esm/ExtensionTextAlign.js.map +1 -1
- package/esm/ExtensionUser.d.ts +10 -1
- package/esm/ExtensionUser.js.map +1 -1
- package/esm/MarkBookmark.d.ts +0 -1
- package/esm/MarkChange.d.ts +0 -1
- package/esm/MarkCode.d.ts +6 -1
- package/esm/MarkCode.js.map +1 -1
- package/esm/MarkHighlight.d.ts +0 -1
- package/esm/MarkItalic.d.ts +6 -1
- package/esm/MarkItalic.js.map +1 -1
- package/esm/MarkLink.d.ts +0 -1
- package/esm/MarkStrike.d.ts +6 -1
- package/esm/MarkStrike.js.map +1 -1
- package/esm/MarkStrong.d.ts +6 -1
- package/esm/MarkStrong.js.map +1 -1
- package/esm/MarkSubscript.d.ts +6 -1
- package/esm/MarkSubscript.js.map +1 -1
- package/esm/MarkSuperscript.d.ts +6 -1
- package/esm/MarkSuperscript.js.map +1 -1
- package/esm/MarkTextColor.d.ts +0 -1
- package/esm/MarkUnderline.d.ts +6 -1
- package/esm/MarkUnderline.js.map +1 -1
- package/esm/NodeAside.d.ts +0 -1
- package/esm/NodeBlockquote.d.ts +6 -1
- package/esm/NodeBlockquote.js.map +1 -1
- package/esm/NodeBookmark.d.ts +0 -1
- package/esm/NodeCodeBlock.d.ts +0 -1
- package/esm/NodeCommentAnchor.d.ts +11 -1
- package/esm/NodeCommentAnchor.js.map +1 -1
- package/esm/NodeDefinitionDesc.d.ts +0 -1
- package/esm/NodeDefinitionList.d.ts +6 -1
- package/esm/NodeDefinitionList.js.map +1 -1
- package/esm/NodeDefinitionTerm.d.ts +0 -1
- package/esm/NodeDocument.d.ts +22 -1
- package/esm/NodeDocument.js.map +1 -1
- package/esm/NodeDocumentCode.d.ts +0 -1
- package/esm/NodeHardBreak.d.ts +6 -1
- package/esm/NodeHardBreak.js.map +1 -1
- package/esm/NodeHeading.d.ts +16 -1
- package/esm/NodeHeading.js.map +1 -1
- package/esm/NodeHorizontalRule.d.ts +6 -1
- package/esm/NodeHorizontalRule.js.map +1 -1
- package/esm/NodeIframe.d.ts +0 -1
- package/esm/NodeImage.d.ts +0 -1
- package/esm/NodeInlineShortCode.d.ts +11 -2
- package/esm/NodeInlineShortCode.js.map +1 -1
- package/esm/NodeMath.d.ts +0 -1
- package/esm/NodeParagraph.d.ts +6 -1
- package/esm/NodeParagraph.js.map +1 -1
- package/esm/NodeSoftBreak.d.ts +0 -1
- package/esm/NodeText.d.ts +0 -1
- package/esm/NodeVideo.d.ts +0 -1
- package/esm/history/ExtensionHistory.d.ts +0 -1
- package/esm/history/RopeSequence.d.ts +0 -1
- package/esm/history/history.d.ts +0 -1
- package/esm/lists/NodeBulletList.d.ts +6 -1
- package/esm/lists/NodeBulletList.js.map +1 -1
- package/esm/lists/NodeListItem.d.ts +10 -1
- package/esm/lists/NodeListItem.js.map +1 -1
- package/esm/lists/NodeOrderedList.d.ts +6 -1
- package/esm/lists/NodeOrderedList.js.map +1 -1
- package/esm/lists/NodeTaskItem.d.ts +10 -1
- package/esm/lists/NodeTaskItem.js.map +1 -1
- package/esm/lists/NodeTaskList.d.ts +6 -1
- package/esm/lists/NodeTaskList.js.map +1 -1
- package/esm/lists/NodeViewTaskItem.d.ts +0 -1
- package/esm/lists/commands.d.ts +0 -1
- package/esm/media/ExtensionHtml.d.ts +0 -1
- package/esm/media/ExtensionMediaUpload.d.ts +0 -1
- package/esm/media/ExtensionPaste.d.ts +16 -1
- package/esm/media/ExtensionPaste.js +2 -2
- package/esm/media/ExtensionPaste.js.map +1 -1
- package/esm/pairing/ExtensionPairing.d.ts +0 -1
- package/esm/pairing/PairNodesPlugin.d.ts +0 -1
- package/esm/pairing/pairNodes.d.ts +0 -1
- package/esm/remote-selection/ExtensionRemoteSelection.d.ts +0 -1
- package/esm/remote-selection/remoteSelectionPlugin.d.ts +0 -1
- package/package.json +93 -42
- package/src/ExtensionSelection.ts +19 -0
- package/src/ExtensionTextAlign.ts +13 -0
- package/src/ExtensionUser.ts +11 -0
- package/src/MarkCode.ts +7 -0
- package/src/MarkItalic.ts +7 -0
- package/src/MarkStrike.ts +7 -0
- package/src/MarkStrong.ts +7 -0
- package/src/MarkSubscript.ts +7 -0
- package/src/MarkSuperscript.ts +7 -0
- package/src/MarkUnderline.ts +7 -0
- package/src/NodeBlockquote.ts +7 -0
- package/src/NodeCommentAnchor.ts +12 -0
- package/src/NodeDefinitionList.ts +8 -4
- package/src/NodeDocument.ts +23 -0
- package/src/NodeHardBreak.ts +7 -0
- package/src/NodeHeading.ts +17 -0
- package/src/NodeHorizontalRule.ts +8 -0
- package/src/NodeInlineShortCode.ts +16 -0
- package/src/NodeParagraph.ts +7 -0
- package/src/lists/NodeBulletList.ts +7 -0
- package/src/lists/NodeListItem.ts +11 -0
- package/src/lists/NodeOrderedList.ts +8 -0
- package/src/lists/NodeTaskItem.ts +11 -0
- package/src/lists/NodeTaskList.ts +9 -2
- package/src/media/ExtensionPaste.ts +19 -2
- package/esm/BasicEditorKit.d.ts.map +0 -1
- package/esm/ExtensionBaseKeymap.d.ts.map +0 -1
- package/esm/ExtensionBasicCodeEditor.d.ts.map +0 -1
- package/esm/ExtensionBasicEditor.d.ts.map +0 -1
- package/esm/ExtensionDropcursor.d.ts.map +0 -1
- package/esm/ExtensionGapcursor.d.ts.map +0 -1
- package/esm/ExtensionSelection.d.ts.map +0 -1
- package/esm/ExtensionTextAlign.d.ts.map +0 -1
- package/esm/ExtensionUser.d.ts.map +0 -1
- package/esm/MarkBookmark.d.ts.map +0 -1
- package/esm/MarkChange.d.ts.map +0 -1
- package/esm/MarkCode.d.ts.map +0 -1
- package/esm/MarkHighlight.d.ts.map +0 -1
- package/esm/MarkItalic.d.ts.map +0 -1
- package/esm/MarkLink.d.ts.map +0 -1
- package/esm/MarkStrike.d.ts.map +0 -1
- package/esm/MarkStrong.d.ts.map +0 -1
- package/esm/MarkSubscript.d.ts.map +0 -1
- package/esm/MarkSuperscript.d.ts.map +0 -1
- package/esm/MarkTextColor.d.ts.map +0 -1
- package/esm/MarkUnderline.d.ts.map +0 -1
- package/esm/NodeAside.d.ts.map +0 -1
- package/esm/NodeBlockquote.d.ts.map +0 -1
- package/esm/NodeBookmark.d.ts.map +0 -1
- package/esm/NodeCodeBlock.d.ts.map +0 -1
- package/esm/NodeCommentAnchor.d.ts.map +0 -1
- package/esm/NodeDefinitionDesc.d.ts.map +0 -1
- package/esm/NodeDefinitionList.d.ts.map +0 -1
- package/esm/NodeDefinitionTerm.d.ts.map +0 -1
- package/esm/NodeDocument.d.ts.map +0 -1
- package/esm/NodeDocumentCode.d.ts.map +0 -1
- package/esm/NodeHardBreak.d.ts.map +0 -1
- package/esm/NodeHeading.d.ts.map +0 -1
- package/esm/NodeHorizontalRule.d.ts.map +0 -1
- package/esm/NodeIframe.d.ts.map +0 -1
- package/esm/NodeImage.d.ts.map +0 -1
- package/esm/NodeInlineShortCode.d.ts.map +0 -1
- package/esm/NodeMath.d.ts.map +0 -1
- package/esm/NodeParagraph.d.ts.map +0 -1
- package/esm/NodeSoftBreak.d.ts.map +0 -1
- package/esm/NodeText.d.ts.map +0 -1
- package/esm/NodeVideo.d.ts.map +0 -1
- package/esm/history/ExtensionHistory.d.ts.map +0 -1
- package/esm/history/RopeSequence.d.ts.map +0 -1
- package/esm/history/history.d.ts.map +0 -1
- package/esm/lists/NodeBulletList.d.ts.map +0 -1
- package/esm/lists/NodeListItem.d.ts.map +0 -1
- package/esm/lists/NodeOrderedList.d.ts.map +0 -1
- package/esm/lists/NodeTaskItem.d.ts.map +0 -1
- package/esm/lists/NodeTaskList.d.ts.map +0 -1
- package/esm/lists/NodeViewTaskItem.d.ts.map +0 -1
- package/esm/lists/commands.d.ts.map +0 -1
- package/esm/media/ExtensionHtml.d.ts.map +0 -1
- package/esm/media/ExtensionMediaUpload.d.ts.map +0 -1
- package/esm/media/ExtensionPaste.d.ts.map +0 -1
- package/esm/pairing/ExtensionPairing.d.ts.map +0 -1
- package/esm/pairing/PairNodesPlugin.d.ts.map +0 -1
- package/esm/pairing/pairNodes.d.ts.map +0 -1
- package/esm/remote-selection/ExtensionRemoteSelection.d.ts.map +0 -1
- package/esm/remote-selection/remoteSelectionPlugin.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,125 +1,176 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kerebron/extension-basic-editor",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "./esm/BasicEditorKit.js",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./BasicEditorKit": {
|
|
8
|
-
"import": "./esm/BasicEditorKit.js"
|
|
8
|
+
"import": "./esm/BasicEditorKit.js",
|
|
9
|
+
"default": "./esm/BasicEditorKit.js"
|
|
9
10
|
},
|
|
10
11
|
"./ExtensionBasicEditor": {
|
|
11
|
-
"import": "./esm/ExtensionBasicEditor.js"
|
|
12
|
+
"import": "./esm/ExtensionBasicEditor.js",
|
|
13
|
+
"default": "./esm/ExtensionBasicEditor.js"
|
|
12
14
|
},
|
|
13
15
|
"./ExtensionBasicCodeEditor": {
|
|
14
|
-
"import": "./esm/ExtensionBasicCodeEditor.js"
|
|
16
|
+
"import": "./esm/ExtensionBasicCodeEditor.js",
|
|
17
|
+
"default": "./esm/ExtensionBasicCodeEditor.js"
|
|
15
18
|
},
|
|
16
19
|
"./ExtensionSelection": {
|
|
17
|
-
"import": "./esm/ExtensionSelection.js"
|
|
20
|
+
"import": "./esm/ExtensionSelection.js",
|
|
21
|
+
"default": "./esm/ExtensionSelection.js"
|
|
18
22
|
},
|
|
19
23
|
"./ExtensionBaseKeymap": {
|
|
20
|
-
"import": "./esm/ExtensionBaseKeymap.js"
|
|
24
|
+
"import": "./esm/ExtensionBaseKeymap.js",
|
|
25
|
+
"default": "./esm/ExtensionBaseKeymap.js"
|
|
21
26
|
},
|
|
22
27
|
"./ExtensionHistory": {
|
|
23
|
-
"import": "./esm/history/ExtensionHistory.js"
|
|
28
|
+
"import": "./esm/history/ExtensionHistory.js",
|
|
29
|
+
"default": "./esm/history/ExtensionHistory.js"
|
|
24
30
|
},
|
|
25
31
|
"./ExtensionDropcursor": {
|
|
26
|
-
"import": "./esm/ExtensionDropcursor.js"
|
|
32
|
+
"import": "./esm/ExtensionDropcursor.js",
|
|
33
|
+
"default": "./esm/ExtensionDropcursor.js"
|
|
27
34
|
},
|
|
28
35
|
"./ExtensionGapcursor": {
|
|
29
|
-
"import": "./esm/ExtensionGapcursor.js"
|
|
36
|
+
"import": "./esm/ExtensionGapcursor.js",
|
|
37
|
+
"default": "./esm/ExtensionGapcursor.js"
|
|
30
38
|
},
|
|
31
39
|
"./ExtensionRemoteSelection": {
|
|
32
|
-
"import": "./esm/remote-selection/ExtensionRemoteSelection.js"
|
|
40
|
+
"import": "./esm/remote-selection/ExtensionRemoteSelection.js",
|
|
41
|
+
"default": "./esm/remote-selection/ExtensionRemoteSelection.js"
|
|
33
42
|
},
|
|
34
43
|
"./ExtensionMediaUpload": {
|
|
35
|
-
"import": "./esm/media/ExtensionMediaUpload.js"
|
|
44
|
+
"import": "./esm/media/ExtensionMediaUpload.js",
|
|
45
|
+
"default": "./esm/media/ExtensionMediaUpload.js"
|
|
36
46
|
},
|
|
37
47
|
"./ExtensionHtml": {
|
|
38
|
-
"import": "./esm/media/ExtensionHtml.js"
|
|
48
|
+
"import": "./esm/media/ExtensionHtml.js",
|
|
49
|
+
"default": "./esm/media/ExtensionHtml.js"
|
|
39
50
|
},
|
|
40
51
|
"./ExtensionPaste": {
|
|
41
|
-
"import": "./esm/media/ExtensionPaste.js"
|
|
52
|
+
"import": "./esm/media/ExtensionPaste.js",
|
|
53
|
+
"default": "./esm/media/ExtensionPaste.js"
|
|
42
54
|
},
|
|
43
55
|
"./ExtensionTextAlign": {
|
|
44
|
-
"import": "./esm/ExtensionTextAlign.js"
|
|
56
|
+
"import": "./esm/ExtensionTextAlign.js",
|
|
57
|
+
"default": "./esm/ExtensionTextAlign.js"
|
|
45
58
|
},
|
|
46
59
|
"./ExtensionUser": {
|
|
47
|
-
"import": "./esm/ExtensionUser.js"
|
|
60
|
+
"import": "./esm/ExtensionUser.js",
|
|
61
|
+
"default": "./esm/ExtensionUser.js"
|
|
48
62
|
},
|
|
49
63
|
"./NodeDocument": {
|
|
50
|
-
"import": "./esm/NodeDocument.js"
|
|
64
|
+
"import": "./esm/NodeDocument.js",
|
|
65
|
+
"default": "./esm/NodeDocument.js"
|
|
51
66
|
},
|
|
52
67
|
"./NodeDocumentCode": {
|
|
53
|
-
"import": "./esm/NodeDocumentCode.js"
|
|
68
|
+
"import": "./esm/NodeDocumentCode.js",
|
|
69
|
+
"default": "./esm/NodeDocumentCode.js"
|
|
54
70
|
},
|
|
55
71
|
"./NodeCodeBlock": {
|
|
56
|
-
"import": "./esm/NodeCodeBlock.js"
|
|
72
|
+
"import": "./esm/NodeCodeBlock.js",
|
|
73
|
+
"default": "./esm/NodeCodeBlock.js"
|
|
57
74
|
},
|
|
58
75
|
"./NodeText": {
|
|
59
|
-
"import": "./esm/NodeText.js"
|
|
76
|
+
"import": "./esm/NodeText.js",
|
|
77
|
+
"default": "./esm/NodeText.js"
|
|
60
78
|
},
|
|
61
79
|
"./NodeParagraph": {
|
|
62
|
-
"import": "./esm/NodeParagraph.js"
|
|
80
|
+
"import": "./esm/NodeParagraph.js",
|
|
81
|
+
"default": "./esm/NodeParagraph.js"
|
|
63
82
|
},
|
|
64
83
|
"./NodeHardBreak": {
|
|
65
|
-
"import": "./esm/NodeHardBreak.js"
|
|
84
|
+
"import": "./esm/NodeHardBreak.js",
|
|
85
|
+
"default": "./esm/NodeHardBreak.js"
|
|
66
86
|
},
|
|
67
87
|
"./NodeSoftBreak": {
|
|
68
|
-
"import": "./esm/NodeSoftBreak.js"
|
|
88
|
+
"import": "./esm/NodeSoftBreak.js",
|
|
89
|
+
"default": "./esm/NodeSoftBreak.js"
|
|
69
90
|
},
|
|
70
91
|
"./NodeHorizontalRule": {
|
|
71
|
-
"import": "./esm/NodeHorizontalRule.js"
|
|
92
|
+
"import": "./esm/NodeHorizontalRule.js",
|
|
93
|
+
"default": "./esm/NodeHorizontalRule.js"
|
|
72
94
|
},
|
|
73
95
|
"./NodeOrderedList": {
|
|
74
|
-
"import": "./esm/lists/NodeOrderedList.js"
|
|
96
|
+
"import": "./esm/lists/NodeOrderedList.js",
|
|
97
|
+
"default": "./esm/lists/NodeOrderedList.js"
|
|
75
98
|
},
|
|
76
99
|
"./NodeBulletList": {
|
|
77
|
-
"import": "./esm/lists/NodeBulletList.js"
|
|
100
|
+
"import": "./esm/lists/NodeBulletList.js",
|
|
101
|
+
"default": "./esm/lists/NodeBulletList.js"
|
|
78
102
|
},
|
|
79
103
|
"./NodeListItem": {
|
|
80
|
-
"import": "./esm/lists/NodeListItem.js"
|
|
104
|
+
"import": "./esm/lists/NodeListItem.js",
|
|
105
|
+
"default": "./esm/lists/NodeListItem.js"
|
|
81
106
|
},
|
|
82
107
|
"./NodeTaskList": {
|
|
83
|
-
"import": "./esm/lists/NodeTaskList.js"
|
|
108
|
+
"import": "./esm/lists/NodeTaskList.js",
|
|
109
|
+
"default": "./esm/lists/NodeTaskList.js"
|
|
84
110
|
},
|
|
85
111
|
"./NodeTaskItem": {
|
|
86
|
-
"import": "./esm/lists/NodeTaskItem.js"
|
|
112
|
+
"import": "./esm/lists/NodeTaskItem.js",
|
|
113
|
+
"default": "./esm/lists/NodeTaskItem.js"
|
|
87
114
|
},
|
|
88
115
|
"./NodeImage": {
|
|
89
|
-
"import": "./esm/NodeImage.js"
|
|
116
|
+
"import": "./esm/NodeImage.js",
|
|
117
|
+
"default": "./esm/NodeImage.js"
|
|
90
118
|
},
|
|
91
119
|
"./NodeVideo": {
|
|
92
|
-
"import": "./esm/NodeVideo.js"
|
|
120
|
+
"import": "./esm/NodeVideo.js",
|
|
121
|
+
"default": "./esm/NodeVideo.js"
|
|
93
122
|
},
|
|
94
123
|
"./NodeBlockquote": {
|
|
95
|
-
"import": "./esm/NodeBlockquote.js"
|
|
124
|
+
"import": "./esm/NodeBlockquote.js",
|
|
125
|
+
"default": "./esm/NodeBlockquote.js"
|
|
96
126
|
},
|
|
97
127
|
"./NodeAside": {
|
|
98
|
-
"import": "./esm/NodeAside.js"
|
|
128
|
+
"import": "./esm/NodeAside.js",
|
|
129
|
+
"default": "./esm/NodeAside.js"
|
|
99
130
|
},
|
|
100
131
|
"./NodeHeading": {
|
|
101
|
-
"import": "./esm/NodeHeading.js"
|
|
132
|
+
"import": "./esm/NodeHeading.js",
|
|
133
|
+
"default": "./esm/NodeHeading.js"
|
|
134
|
+
},
|
|
135
|
+
"./NodeDefinitionList": {
|
|
136
|
+
"import": "./esm/NodeDefinitionList.js",
|
|
137
|
+
"default": "./esm/NodeDefinitionList.js"
|
|
138
|
+
},
|
|
139
|
+
"./NodeDefinitionTerm": {
|
|
140
|
+
"import": "./esm/NodeDefinitionTerm.js",
|
|
141
|
+
"default": "./esm/NodeDefinitionTerm.js"
|
|
142
|
+
},
|
|
143
|
+
"./NodeDefinitionDesc": {
|
|
144
|
+
"import": "./esm/NodeDefinitionDesc.js",
|
|
145
|
+
"default": "./esm/NodeDefinitionDesc.js"
|
|
102
146
|
},
|
|
103
147
|
"./MarkCode": {
|
|
104
|
-
"import": "./esm/MarkCode.js"
|
|
148
|
+
"import": "./esm/MarkCode.js",
|
|
149
|
+
"default": "./esm/MarkCode.js"
|
|
105
150
|
},
|
|
106
151
|
"./MarkLink": {
|
|
107
|
-
"import": "./esm/MarkLink.js"
|
|
152
|
+
"import": "./esm/MarkLink.js",
|
|
153
|
+
"default": "./esm/MarkLink.js"
|
|
108
154
|
},
|
|
109
155
|
"./MarkItalic": {
|
|
110
|
-
"import": "./esm/MarkItalic.js"
|
|
156
|
+
"import": "./esm/MarkItalic.js",
|
|
157
|
+
"default": "./esm/MarkItalic.js"
|
|
111
158
|
},
|
|
112
159
|
"./MarkStrong": {
|
|
113
|
-
"import": "./esm/MarkStrong.js"
|
|
160
|
+
"import": "./esm/MarkStrong.js",
|
|
161
|
+
"default": "./esm/MarkStrong.js"
|
|
114
162
|
},
|
|
115
163
|
"./MarkUnderline": {
|
|
116
|
-
"import": "./esm/MarkUnderline.js"
|
|
164
|
+
"import": "./esm/MarkUnderline.js",
|
|
165
|
+
"default": "./esm/MarkUnderline.js"
|
|
117
166
|
},
|
|
118
167
|
"./MarkSuperscript": {
|
|
119
|
-
"import": "./esm/MarkSuperscript.js"
|
|
168
|
+
"import": "./esm/MarkSuperscript.js",
|
|
169
|
+
"default": "./esm/MarkSuperscript.js"
|
|
120
170
|
},
|
|
121
171
|
"./MarkSubscript": {
|
|
122
|
-
"import": "./esm/MarkSubscript.js"
|
|
172
|
+
"import": "./esm/MarkSubscript.js",
|
|
173
|
+
"default": "./esm/MarkSubscript.js"
|
|
123
174
|
},
|
|
124
175
|
"./assets/image-resize.css": "./assets/image-resize.css",
|
|
125
176
|
"./assets/task-list.css": "./assets/task-list.css"
|
|
@@ -131,7 +182,7 @@
|
|
|
131
182
|
"assets"
|
|
132
183
|
],
|
|
133
184
|
"dependencies": {
|
|
134
|
-
"@kerebron/editor": "0.9.
|
|
185
|
+
"@kerebron/editor": "0.9.3",
|
|
135
186
|
"prosemirror-model": "1.25.11",
|
|
136
187
|
"prosemirror-state": "1.4.4",
|
|
137
188
|
"prosemirror-transform": "1.10.4",
|
|
@@ -141,5 +192,5 @@
|
|
|
141
192
|
"devDependencies": {
|
|
142
193
|
"@types/node": "^20.9.0"
|
|
143
194
|
},
|
|
144
|
-
"_generatedBy": "dnt@
|
|
195
|
+
"_generatedBy": "dnt@0.44.0"
|
|
145
196
|
}
|
|
@@ -20,6 +20,25 @@ import type {
|
|
|
20
20
|
import { createNodeFromObject } from '@kerebron/editor/utilities';
|
|
21
21
|
import { EditorView } from 'prosemirror-view';
|
|
22
22
|
|
|
23
|
+
declare module '@kerebron/editor/commands' {
|
|
24
|
+
interface Commands<ReturnType = any> {
|
|
25
|
+
/** Select the entire document. */
|
|
26
|
+
selectAll: () => ReturnType;
|
|
27
|
+
/**
|
|
28
|
+
* Create a text selection from character offsets within a paragraph.
|
|
29
|
+
*
|
|
30
|
+
* @param textStart Zero-based character offset inside the paragraph.
|
|
31
|
+
* @param length Length of the selection in characters.
|
|
32
|
+
* @param paraNum Index of the target paragraph.
|
|
33
|
+
*/
|
|
34
|
+
selectText: (
|
|
35
|
+
textStart: number,
|
|
36
|
+
length: number,
|
|
37
|
+
paraNum?: number,
|
|
38
|
+
) => ReturnType;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
23
42
|
function normalizeSiblings(fragment: Fragment, $context: ResolvedPos) {
|
|
24
43
|
if (fragment.childCount < 2) return fragment;
|
|
25
44
|
for (let d = $context.depth; d >= 0; d--) {
|
|
@@ -2,6 +2,19 @@ import { type CoreEditor, Extension } from '@kerebron/editor';
|
|
|
2
2
|
import { type EditorState, type Transaction } from 'prosemirror-state';
|
|
3
3
|
import { type CommandFactories } from '@kerebron/editor/commands';
|
|
4
4
|
|
|
5
|
+
declare module '@kerebron/editor/commands' {
|
|
6
|
+
interface Commands<ReturnType = any> {
|
|
7
|
+
/** Reset `textAlign` on the selected blocks (align left). */
|
|
8
|
+
setTextAlignLeft: () => ReturnType;
|
|
9
|
+
/** Center-align the selected blocks. */
|
|
10
|
+
setTextAlignCenter: () => ReturnType;
|
|
11
|
+
/** Right-align the selected blocks. */
|
|
12
|
+
setTextAlignRight: () => ReturnType;
|
|
13
|
+
/** Justify the selected blocks. */
|
|
14
|
+
setTextAlignJustify: () => ReturnType;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
5
18
|
type TextAlign = undefined | 'center' | 'right' | 'justify';
|
|
6
19
|
|
|
7
20
|
/**
|
package/src/ExtensionUser.ts
CHANGED
|
@@ -4,6 +4,17 @@ import { CommandFactories, Extension } from '@kerebron/editor';
|
|
|
4
4
|
import { CommandFactory } from '@kerebron/editor/commands';
|
|
5
5
|
import { ColorMapper, generateRandomUser, User } from '@kerebron/editor/user';
|
|
6
6
|
|
|
7
|
+
declare module '@kerebron/editor/commands' {
|
|
8
|
+
interface Commands<ReturnType = any> {
|
|
9
|
+
/**
|
|
10
|
+
* Change the active user.
|
|
11
|
+
*
|
|
12
|
+
* @param user The new user to associate with subsequent edits.
|
|
13
|
+
*/
|
|
14
|
+
changeUser: (user: User) => ReturnType;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
7
18
|
export const userPluginKey = new PluginKey<UserPluginState>('user');
|
|
8
19
|
|
|
9
20
|
interface UserPluginState {
|
package/src/MarkCode.ts
CHANGED
|
@@ -5,6 +5,13 @@ import {
|
|
|
5
5
|
type CommandShortcuts,
|
|
6
6
|
} from '@kerebron/editor/commands';
|
|
7
7
|
|
|
8
|
+
declare module '@kerebron/editor/commands' {
|
|
9
|
+
interface Commands<ReturnType = any> {
|
|
10
|
+
/** Toggle the `code` mark on the current selection. */
|
|
11
|
+
toggleCode: () => ReturnType;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export class MarkCode extends Mark {
|
|
9
16
|
override name = 'code';
|
|
10
17
|
requires = ['doc'];
|
package/src/MarkItalic.ts
CHANGED
|
@@ -5,6 +5,13 @@ import {
|
|
|
5
5
|
} from '@kerebron/editor/commands';
|
|
6
6
|
import type { MarkSpec, MarkType } from 'prosemirror-model';
|
|
7
7
|
|
|
8
|
+
declare module '@kerebron/editor/commands' {
|
|
9
|
+
interface Commands<ReturnType = any> {
|
|
10
|
+
/** Toggle the `em` (italic) mark on the current selection. */
|
|
11
|
+
toggleItalic: () => ReturnType;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export class MarkItalic extends Mark {
|
|
9
16
|
override name = 'em';
|
|
10
17
|
requires = ['doc'];
|
package/src/MarkStrike.ts
CHANGED
|
@@ -5,6 +5,13 @@ import {
|
|
|
5
5
|
type CommandShortcuts,
|
|
6
6
|
} from '@kerebron/editor/commands';
|
|
7
7
|
|
|
8
|
+
declare module '@kerebron/editor/commands' {
|
|
9
|
+
interface Commands<ReturnType = any> {
|
|
10
|
+
/** Toggle the `strike` (strikethrough) mark on the current selection. */
|
|
11
|
+
toggleStrike: () => ReturnType;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export class MarkStrike extends Mark {
|
|
9
16
|
override name = 'strike';
|
|
10
17
|
requires = ['doc'];
|
package/src/MarkStrong.ts
CHANGED
|
@@ -5,6 +5,13 @@ import {
|
|
|
5
5
|
} from '@kerebron/editor/commands';
|
|
6
6
|
import { MarkSpec, type MarkType } from 'prosemirror-model';
|
|
7
7
|
|
|
8
|
+
declare module '@kerebron/editor/commands' {
|
|
9
|
+
interface Commands<ReturnType = any> {
|
|
10
|
+
/** Toggle the `strong` (bold) mark on the current selection. */
|
|
11
|
+
toggleStrong: () => ReturnType;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export class MarkStrong extends Mark {
|
|
9
16
|
override name = 'strong';
|
|
10
17
|
requires = ['doc'];
|
package/src/MarkSubscript.ts
CHANGED
|
@@ -5,6 +5,13 @@ import {
|
|
|
5
5
|
type CommandShortcuts,
|
|
6
6
|
} from '@kerebron/editor/commands';
|
|
7
7
|
|
|
8
|
+
declare module '@kerebron/editor/commands' {
|
|
9
|
+
interface Commands<ReturnType = any> {
|
|
10
|
+
/** Toggle the `subscript` mark on current selection. */
|
|
11
|
+
toggleSubscript: () => ReturnType;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export class MarkSubscript extends Mark {
|
|
9
16
|
override name = 'subscript';
|
|
10
17
|
requires = ['doc'];
|
package/src/MarkSuperscript.ts
CHANGED
|
@@ -5,6 +5,13 @@ import {
|
|
|
5
5
|
type CommandShortcuts,
|
|
6
6
|
} from '@kerebron/editor/commands';
|
|
7
7
|
|
|
8
|
+
declare module '@kerebron/editor/commands' {
|
|
9
|
+
interface Commands<ReturnType = any> {
|
|
10
|
+
/** Toggle the `superscript` mark on current selection. */
|
|
11
|
+
toggleSuperscript: () => ReturnType;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export class MarkSuperscript extends Mark {
|
|
9
16
|
override name = 'superscript';
|
|
10
17
|
requires = ['doc'];
|
package/src/MarkUnderline.ts
CHANGED
|
@@ -5,6 +5,13 @@ import {
|
|
|
5
5
|
} from '@kerebron/editor/commands';
|
|
6
6
|
import type { MarkSpec, MarkType } from 'prosemirror-model';
|
|
7
7
|
|
|
8
|
+
declare module '@kerebron/editor/commands' {
|
|
9
|
+
interface Commands<ReturnType = any> {
|
|
10
|
+
/** Toggle the `underline` mark on the current selection. */
|
|
11
|
+
toggleUnderline: () => ReturnType;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export class MarkUnderline extends Mark {
|
|
9
16
|
override name = 'underline';
|
|
10
17
|
requires = ['doc'];
|
package/src/NodeBlockquote.ts
CHANGED
|
@@ -10,6 +10,13 @@ import {
|
|
|
10
10
|
wrappingInputRule,
|
|
11
11
|
} from '@kerebron/editor/plugins/input-rules';
|
|
12
12
|
|
|
13
|
+
declare module '@kerebron/editor/commands' {
|
|
14
|
+
interface Commands<ReturnType = any> {
|
|
15
|
+
/** Wrap the selection in a blockquote, or lift it out if already wrapped. */
|
|
16
|
+
toggleBlockquote: () => ReturnType;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
export class NodeBlockquote extends Node {
|
|
14
21
|
override name = 'blockquote';
|
|
15
22
|
requires = ['doc'];
|
package/src/NodeCommentAnchor.ts
CHANGED
|
@@ -12,6 +12,18 @@ import { type CommandFactories } from '@kerebron/editor/commands';
|
|
|
12
12
|
import { Decoration, DecorationSet } from 'prosemirror-view';
|
|
13
13
|
import { CommandFactory } from '@kerebron/editor/commands';
|
|
14
14
|
|
|
15
|
+
declare module '@kerebron/editor/commands' {
|
|
16
|
+
interface Commands<ReturnType = any> {
|
|
17
|
+
/**
|
|
18
|
+
* Insert opening/closing `comment` anchor nodes around the current selection.
|
|
19
|
+
*
|
|
20
|
+
* @param id Unique comment identifier.
|
|
21
|
+
* @param active Whether the comment anchor is active.
|
|
22
|
+
*/
|
|
23
|
+
addComment: (id: string, active: boolean) => ReturnType;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
15
27
|
function collectCommentAnchors(doc: PmNode) {
|
|
16
28
|
const starts = new Map();
|
|
17
29
|
const ends = new Map();
|
|
@@ -5,10 +5,14 @@ import {
|
|
|
5
5
|
type CommandFactories,
|
|
6
6
|
type CommandShortcuts,
|
|
7
7
|
} from '@kerebron/editor/commands';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { type InputRule } from '@kerebron/editor/plugins/input-rules';
|
|
9
|
+
|
|
10
|
+
declare module '@kerebron/editor/commands' {
|
|
11
|
+
interface Commands<ReturnType = any> {
|
|
12
|
+
/** Toggle a definition list around the selection. */
|
|
13
|
+
toggleDefinitionList: () => ReturnType;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
12
16
|
|
|
13
17
|
export class NodeDefinitionList extends Node {
|
|
14
18
|
override name = 'dl';
|
package/src/NodeDocument.ts
CHANGED
|
@@ -4,6 +4,29 @@ import { CoreEditor, Node } from '@kerebron/editor';
|
|
|
4
4
|
import { CommandFactories, CommandFactory } from '@kerebron/editor/commands';
|
|
5
5
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
6
6
|
|
|
7
|
+
declare module '@kerebron/editor/commands' {
|
|
8
|
+
interface Commands<ReturnType = any> {
|
|
9
|
+
/**
|
|
10
|
+
* Read the document's `meta` attribute.
|
|
11
|
+
*
|
|
12
|
+
* @param cb Called with a structured clone of the current `meta` value.
|
|
13
|
+
*/
|
|
14
|
+
getMeta: (cb: (meta: any) => void) => ReturnType;
|
|
15
|
+
/**
|
|
16
|
+
* Replace the document's `meta` attribute.
|
|
17
|
+
*
|
|
18
|
+
* @param meta New `meta` value.
|
|
19
|
+
*/
|
|
20
|
+
setMeta: (meta: any) => ReturnType;
|
|
21
|
+
/**
|
|
22
|
+
* Update the document's `meta` attribute in place.
|
|
23
|
+
*
|
|
24
|
+
* @param updater Receives the current `meta`, returns the new one.
|
|
25
|
+
*/
|
|
26
|
+
updateMeta: (updater: (meta: unknown) => unknown) => ReturnType;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
7
30
|
export class NodeDocument extends Node {
|
|
8
31
|
override name = 'doc';
|
|
9
32
|
|
package/src/NodeHardBreak.ts
CHANGED
|
@@ -8,6 +8,13 @@ import {
|
|
|
8
8
|
type CommandShortcuts,
|
|
9
9
|
} from '@kerebron/editor/commands';
|
|
10
10
|
|
|
11
|
+
declare module '@kerebron/editor/commands' {
|
|
12
|
+
interface Commands<ReturnType = any> {
|
|
13
|
+
/** Replace the selection with a hard break (`br`) node. */
|
|
14
|
+
setHardBreak: () => ReturnType;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
11
18
|
export class NodeHardBreak extends Node {
|
|
12
19
|
override name = 'br';
|
|
13
20
|
requires = ['doc'];
|
package/src/NodeHeading.ts
CHANGED
|
@@ -10,6 +10,23 @@ import {
|
|
|
10
10
|
textblockTypeInputRule,
|
|
11
11
|
} from '@kerebron/editor/plugins/input-rules';
|
|
12
12
|
|
|
13
|
+
declare module '@kerebron/editor/commands' {
|
|
14
|
+
interface Commands<ReturnType = any> {
|
|
15
|
+
/** Set the textblock type to a level-1 heading. */
|
|
16
|
+
setHeading1: () => ReturnType;
|
|
17
|
+
/** Set the textblock type to a level-2 heading. */
|
|
18
|
+
setHeading2: () => ReturnType;
|
|
19
|
+
/** Set the textblock type to a level-3 heading. */
|
|
20
|
+
setHeading3: () => ReturnType;
|
|
21
|
+
/** Set the textblock type to a level-4 heading. */
|
|
22
|
+
setHeading4: () => ReturnType;
|
|
23
|
+
/** Set the textblock type to a level-5 heading. */
|
|
24
|
+
setHeading5: () => ReturnType;
|
|
25
|
+
/** Set the textblock type to a level-6 heading. */
|
|
26
|
+
setHeading6: () => ReturnType;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
13
30
|
const maxLevel = 6;
|
|
14
31
|
|
|
15
32
|
export class NodeHeading extends Node {
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import type { NodeSpec, NodeType } from 'prosemirror-model';
|
|
2
|
+
|
|
2
3
|
import { type CoreEditor, Node } from '@kerebron/editor';
|
|
3
4
|
import type {
|
|
4
5
|
CommandFactories,
|
|
5
6
|
CommandShortcuts,
|
|
6
7
|
} from '@kerebron/editor/commands';
|
|
7
8
|
|
|
9
|
+
declare module '@kerebron/editor/commands' {
|
|
10
|
+
interface Commands<ReturnType = any> {
|
|
11
|
+
/** Replace the selection with a horizontal rule (`hr`) node, scrolling into view. */
|
|
12
|
+
setHorizontalRule: () => ReturnType;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
export class NodeHorizontalRule extends Node {
|
|
9
17
|
override name = 'hr';
|
|
10
18
|
requires = ['doc'];
|
|
@@ -13,6 +13,22 @@ import {
|
|
|
13
13
|
replaceInlineNode,
|
|
14
14
|
} from '@kerebron/editor/plugins/input-rules';
|
|
15
15
|
|
|
16
|
+
declare module '@kerebron/editor/commands' {
|
|
17
|
+
interface Commands<ReturnType = any> {
|
|
18
|
+
/**
|
|
19
|
+
* Replace every `shortcode_inline` node in the document.
|
|
20
|
+
*
|
|
21
|
+
* @param createReplacementNode Builds the replacement node for each match.
|
|
22
|
+
*/
|
|
23
|
+
renderShortCode: (
|
|
24
|
+
createReplacementNode: (
|
|
25
|
+
oldNode: PmNode,
|
|
26
|
+
schema: Schema,
|
|
27
|
+
) => PmNode,
|
|
28
|
+
) => ReturnType;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
16
32
|
export function fixCharacters(text: string) {
|
|
17
33
|
return text
|
|
18
34
|
.replace(/’/g, "'")
|
package/src/NodeParagraph.ts
CHANGED
|
@@ -5,6 +5,13 @@ import {
|
|
|
5
5
|
type CommandShortcuts,
|
|
6
6
|
} from '@kerebron/editor/commands';
|
|
7
7
|
|
|
8
|
+
declare module '@kerebron/editor/commands' {
|
|
9
|
+
interface Commands<ReturnType = any> {
|
|
10
|
+
/** Set the textblock type to a paragraph. */
|
|
11
|
+
setParagraph: () => ReturnType;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export type TextAlign = 'left' | 'center' | 'right' | 'justify' | undefined;
|
|
9
16
|
|
|
10
17
|
export class NodeParagraph extends Node {
|
|
@@ -11,6 +11,13 @@ import {
|
|
|
11
11
|
} from '@kerebron/editor/plugins/input-rules';
|
|
12
12
|
import { toggleList } from './commands.js';
|
|
13
13
|
|
|
14
|
+
declare module '@kerebron/editor/commands' {
|
|
15
|
+
interface Commands<ReturnType = any> {
|
|
16
|
+
/** Toggle a bullet list around the selection. */
|
|
17
|
+
toggleBulletList: () => ReturnType;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
export class NodeBulletList extends Node {
|
|
15
22
|
override name = 'bullet_list';
|
|
16
23
|
requires = ['doc'];
|
|
@@ -11,6 +11,17 @@ import {
|
|
|
11
11
|
} from '@kerebron/editor/utilities';
|
|
12
12
|
import { liftListItem, sinkListItem, splitListItem } from './commands.js';
|
|
13
13
|
|
|
14
|
+
declare module '@kerebron/editor/commands' {
|
|
15
|
+
interface Commands<ReturnType = any> {
|
|
16
|
+
/** Split the current list item at the cursor (Enter). */
|
|
17
|
+
splitListItem: () => ReturnType;
|
|
18
|
+
/** Lift the list item, decreasing nesting (Shift-Tab). */
|
|
19
|
+
liftListItem: () => ReturnType;
|
|
20
|
+
/** Increase nesting of the list item (Tab). */
|
|
21
|
+
sinkListItem: () => ReturnType;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
14
25
|
export class NodeListItem extends Node {
|
|
15
26
|
override name = 'list_item';
|
|
16
27
|
requires = ['doc'];
|
|
@@ -14,8 +14,16 @@ import {
|
|
|
14
14
|
type CommandFactories,
|
|
15
15
|
type CommandShortcuts,
|
|
16
16
|
} from '@kerebron/editor/commands';
|
|
17
|
+
|
|
17
18
|
import { toggleList } from './commands.js';
|
|
18
19
|
|
|
20
|
+
declare module '@kerebron/editor/commands' {
|
|
21
|
+
interface Commands<ReturnType = any> {
|
|
22
|
+
/** Toggle an ordered list around the selection. */
|
|
23
|
+
toggleOrderedList: () => ReturnType;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
19
27
|
export class NodeOrderedList extends Node {
|
|
20
28
|
override name = 'ordered_list';
|
|
21
29
|
requires = ['doc'];
|
|
@@ -10,6 +10,17 @@ import { liftListItem, sinkListItem, splitListItem } from './commands.js';
|
|
|
10
10
|
import { NodeViewConstructor } from '@kerebron/editor/DummyEditorView';
|
|
11
11
|
import { NodeViewTaskItem } from './NodeViewTaskItem.js';
|
|
12
12
|
|
|
13
|
+
declare module '@kerebron/editor/commands' {
|
|
14
|
+
interface Commands<ReturnType = any> {
|
|
15
|
+
/** Split the current task item at the cursor (Enter). */
|
|
16
|
+
splitListItem: () => ReturnType;
|
|
17
|
+
/** Lift the task item, decreasing nesting (Shift-Tab). */
|
|
18
|
+
liftListItem: () => ReturnType;
|
|
19
|
+
/** Increase nesting of the task item (Tab). */
|
|
20
|
+
sinkListItem: () => ReturnType;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
export interface TaskItemOptions {
|
|
14
25
|
onReadOnlyChecked?: (node: PmNode, checked: boolean) => boolean;
|
|
15
26
|
nested: boolean;
|