mardora 1.2.1 → 1.2.2
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/dist/{chunk-PCXW2FUR.js → chunk-SMHHXYOS.js} +12 -5
- package/dist/chunk-SMHHXYOS.js.map +1 -0
- package/dist/{chunk-OHZKW7YE.cjs → chunk-U3D2P2CM.cjs} +12 -5
- package/dist/chunk-U3D2P2CM.cjs.map +1 -0
- package/dist/index.cjs +25 -25
- package/dist/index.js +1 -1
- package/dist/plugins/index.cjs +25 -25
- package/dist/plugins/index.js +1 -1
- package/package.json +1 -1
- package/src/plugins/image-plugin.ts +10 -3
- package/dist/chunk-OHZKW7YE.cjs.map +0 -1
- package/dist/chunk-PCXW2FUR.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkU3D2P2CM_cjs = require('./chunk-U3D2P2CM.cjs');
|
|
4
4
|
var chunkMLBEBFHB_cjs = require('./chunk-MLBEBFHB.cjs');
|
|
5
5
|
var chunkKNDWF2DP_cjs = require('./chunk-KNDWF2DP.cjs');
|
|
6
6
|
var chunk3ZOCCFDL_cjs = require('./chunk-3ZOCCFDL.cjs');
|
|
@@ -11,99 +11,99 @@ var chunkWFVCG4LD_cjs = require('./chunk-WFVCG4LD.cjs');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "CODE_COPY_SUCCESS_ICON", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkU3D2P2CM_cjs.CODE_COPY_SUCCESS_ICON; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "CodePlugin", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkU3D2P2CM_cjs.CodePlugin; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "EmojiPlugin", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkU3D2P2CM_cjs.EmojiPlugin; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "HRPlugin", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkU3D2P2CM_cjs.HRPlugin; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "HTMLPlugin", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkU3D2P2CM_cjs.HTMLPlugin; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "HeadingPlugin", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkU3D2P2CM_cjs.HeadingPlugin; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "ImagePlugin", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkU3D2P2CM_cjs.ImagePlugin; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "InlinePlugin", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkU3D2P2CM_cjs.InlinePlugin; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "LinkPlugin", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkU3D2P2CM_cjs.LinkPlugin; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "ListPlugin", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkU3D2P2CM_cjs.ListPlugin; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "MathPlugin", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkU3D2P2CM_cjs.MathPlugin; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "MermaidPlugin", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkU3D2P2CM_cjs.MermaidPlugin; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "ParagraphPlugin", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkU3D2P2CM_cjs.ParagraphPlugin; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "QuotePlugin", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkU3D2P2CM_cjs.QuotePlugin; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "TablePlugin", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkU3D2P2CM_cjs.TablePlugin; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "allPlugins", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkU3D2P2CM_cjs.allPlugins; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "bindCodeCopyButtons", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkU3D2P2CM_cjs.bindCodeCopyButtons; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "bindImagePreviewButtons", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkU3D2P2CM_cjs.bindImagePreviewButtons; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "copyCodeTextToClipboard", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkU3D2P2CM_cjs.copyCodeTextToClipboard; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "decodeCodeCopyPayload", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkU3D2P2CM_cjs.decodeCodeCopyPayload; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "encodeCodeCopyPayload", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkU3D2P2CM_cjs.encodeCodeCopyPayload; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "essentialPlugins", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkU3D2P2CM_cjs.essentialPlugins; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "resolveCalloutTitleInputTarget", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkU3D2P2CM_cjs.resolveCalloutTitleInputTarget; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "resolveCalloutTypeChange", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkU3D2P2CM_cjs.resolveCalloutTypeChange; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "Compartment", {
|
|
109
109
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CODE_COPY_SUCCESS_ICON, CodePlugin, EmojiPlugin, HRPlugin, HTMLPlugin, HeadingPlugin, ImagePlugin, InlinePlugin, LinkPlugin, ListPlugin, MathPlugin, MermaidPlugin, ParagraphPlugin, QuotePlugin, TablePlugin, allPlugins, bindCodeCopyButtons, bindImagePreviewButtons, copyCodeTextToClipboard, decodeCodeCopyPayload, encodeCodeCopyPayload, essentialPlugins, resolveCalloutTitleInputTarget, resolveCalloutTypeChange } from './chunk-
|
|
1
|
+
export { CODE_COPY_SUCCESS_ICON, CodePlugin, EmojiPlugin, HRPlugin, HTMLPlugin, HeadingPlugin, ImagePlugin, InlinePlugin, LinkPlugin, ListPlugin, MathPlugin, MermaidPlugin, ParagraphPlugin, QuotePlugin, TablePlugin, allPlugins, bindCodeCopyButtons, bindImagePreviewButtons, copyCodeTextToClipboard, decodeCodeCopyPayload, encodeCodeCopyPayload, essentialPlugins, resolveCalloutTitleInputTarget, resolveCalloutTypeChange } from './chunk-SMHHXYOS.js';
|
|
2
2
|
export { Compartment, DecorationPlugin, EditorSelection, EditorState, EditorView, MardoraPlugin, StateEffect, StateField, SyntaxPlugin, attachments, buildBlockTypeChange, buildInlineFormatChange, buildLinkChange, buildListChange, buildSlashReplacement, computeSelectionToolbarLayout, createSelectionToolbarElement, createSlashMenuElement, createSlashRuntimeConfig, createUploadMarker, defaultMardoraLocale, defaultSlashCommands, detectAttachmentKind, detectSelectionBlockType, detectSlashQuery, extractHeadingFoldRangesFromState, filterSlashCommands, formatAttachmentMarkdown, getDefaultSlashCommands, getSelectionToolbarMessages, getSlashMessages, headingFold, headingFoldTheme, highlightActiveLine, isAcceptedAttachment, keymap, mardora, mardoraBaseTheme, markdownResetExtension, parseSelectedLink, resolveHeadingFoldConfig, resolveMardoraLocale, selectionToolbar, selectionToolbarTheme, slashCommands, slashMenuTheme, uploadAttachmentFile } from './chunk-XL6WFGJT.js';
|
|
3
3
|
export { createWrapSelectionInputHandler } from './chunk-BIKZQZ6W.js';
|
|
4
4
|
export { extractPreviewTocFromMarkdown, generateCSS, preview } from './chunk-G4SE26YY.js';
|
package/dist/plugins/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkU3D2P2CM_cjs = require('../chunk-U3D2P2CM.cjs');
|
|
4
4
|
require('../chunk-MLBEBFHB.cjs');
|
|
5
5
|
require('../chunk-KNDWF2DP.cjs');
|
|
6
6
|
require('../chunk-SWFUKJDO.cjs');
|
|
@@ -10,99 +10,99 @@ require('../chunk-WFVCG4LD.cjs');
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "CODE_COPY_SUCCESS_ICON", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkU3D2P2CM_cjs.CODE_COPY_SUCCESS_ICON; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "CodePlugin", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkU3D2P2CM_cjs.CodePlugin; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "EmojiPlugin", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkU3D2P2CM_cjs.EmojiPlugin; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "HRPlugin", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkU3D2P2CM_cjs.HRPlugin; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "HTMLPlugin", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkU3D2P2CM_cjs.HTMLPlugin; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "HeadingPlugin", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkU3D2P2CM_cjs.HeadingPlugin; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "ImagePlugin", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkU3D2P2CM_cjs.ImagePlugin; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "InlinePlugin", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkU3D2P2CM_cjs.InlinePlugin; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "LinkPlugin", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkU3D2P2CM_cjs.LinkPlugin; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "ListPlugin", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkU3D2P2CM_cjs.ListPlugin; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "MathPlugin", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkU3D2P2CM_cjs.MathPlugin; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "MermaidPlugin", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkU3D2P2CM_cjs.MermaidPlugin; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "ParagraphPlugin", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkU3D2P2CM_cjs.ParagraphPlugin; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "QuotePlugin", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkU3D2P2CM_cjs.QuotePlugin; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "TablePlugin", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkU3D2P2CM_cjs.TablePlugin; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "allPlugins", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkU3D2P2CM_cjs.allPlugins; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "bindCodeCopyButtons", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkU3D2P2CM_cjs.bindCodeCopyButtons; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "bindImagePreviewButtons", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkU3D2P2CM_cjs.bindImagePreviewButtons; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "copyCodeTextToClipboard", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkU3D2P2CM_cjs.copyCodeTextToClipboard; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "decodeCodeCopyPayload", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkU3D2P2CM_cjs.decodeCodeCopyPayload; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "encodeCodeCopyPayload", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkU3D2P2CM_cjs.encodeCodeCopyPayload; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "essentialPlugins", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkU3D2P2CM_cjs.essentialPlugins; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "resolveCalloutTitleInputTarget", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkU3D2P2CM_cjs.resolveCalloutTitleInputTarget; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "resolveCalloutTypeChange", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkU3D2P2CM_cjs.resolveCalloutTypeChange; }
|
|
106
106
|
});
|
|
107
107
|
//# sourceMappingURL=index.cjs.map
|
|
108
108
|
//# sourceMappingURL=index.cjs.map
|
package/dist/plugins/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CODE_COPY_SUCCESS_ICON, CodePlugin, EmojiPlugin, HRPlugin, HTMLPlugin, HeadingPlugin, ImagePlugin, InlinePlugin, LinkPlugin, ListPlugin, MathPlugin, MermaidPlugin, ParagraphPlugin, QuotePlugin, TablePlugin, allPlugins, bindCodeCopyButtons, bindImagePreviewButtons, copyCodeTextToClipboard, decodeCodeCopyPayload, encodeCodeCopyPayload, essentialPlugins, resolveCalloutTitleInputTarget, resolveCalloutTypeChange } from '../chunk-
|
|
1
|
+
export { CODE_COPY_SUCCESS_ICON, CodePlugin, EmojiPlugin, HRPlugin, HTMLPlugin, HeadingPlugin, ImagePlugin, InlinePlugin, LinkPlugin, ListPlugin, MathPlugin, MermaidPlugin, ParagraphPlugin, QuotePlugin, TablePlugin, allPlugins, bindCodeCopyButtons, bindImagePreviewButtons, copyCodeTextToClipboard, decodeCodeCopyPayload, encodeCodeCopyPayload, essentialPlugins, resolveCalloutTitleInputTarget, resolveCalloutTypeChange } from '../chunk-SMHHXYOS.js';
|
|
2
2
|
import '../chunk-XL6WFGJT.js';
|
|
3
3
|
import '../chunk-BIKZQZ6W.js';
|
|
4
4
|
import '../chunk-EQJESPP2.js';
|
package/package.json
CHANGED
|
@@ -44,6 +44,14 @@ interface ImageMarkdownRange {
|
|
|
44
44
|
|
|
45
45
|
const imageWidthAttributePattern = /^(\s*)\{width=(\d+)\}/;
|
|
46
46
|
const minImageWidth = 120;
|
|
47
|
+
const imageWidgetEditorSelectionEventTypes = new Set([
|
|
48
|
+
"mousedown",
|
|
49
|
+
"mouseup",
|
|
50
|
+
"mousemove",
|
|
51
|
+
"pointerdown",
|
|
52
|
+
"pointermove",
|
|
53
|
+
"pointerup",
|
|
54
|
+
]);
|
|
47
55
|
const previewImageIcon =
|
|
48
56
|
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 3h6v6"></path><path d="m21 3-7 7"></path><path d="M9 21H3v-6"></path><path d="m3 21 7-7"></path></svg>';
|
|
49
57
|
|
|
@@ -261,9 +269,8 @@ class ImageWidget extends WidgetType {
|
|
|
261
269
|
}
|
|
262
270
|
|
|
263
271
|
override ignoreEvent(event: Event) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
);
|
|
272
|
+
if (imageWidgetEditorSelectionEventTypes.has(event.type)) return true;
|
|
273
|
+
return event.type !== "click";
|
|
267
274
|
}
|
|
268
275
|
|
|
269
276
|
private createToolbar(view: EditorView, figure: HTMLElement): HTMLElement {
|