@prosekit/extensions 0.7.21 → 0.7.23
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/_tsup-dts-rollup.d.ts +18 -4
- package/dist/{chunk-4WHSS2ZE.js → chunk-6UYLCVBX.js} +2 -2
- package/dist/chunk-KNFGQ3MV.js +308 -0
- package/dist/prosekit-extensions-autocomplete.js +7 -2
- package/dist/prosekit-extensions-blockquote.js +12 -4
- package/dist/prosekit-extensions-bold.js +14 -4
- package/dist/prosekit-extensions-code-block.js +21 -8
- package/dist/prosekit-extensions-code.js +14 -4
- package/dist/prosekit-extensions-commit.js +8 -5
- package/dist/prosekit-extensions-drop-cursor.d.ts +2 -2
- package/dist/prosekit-extensions-drop-cursor.js +3 -1
- package/dist/prosekit-extensions-enter-rule.js +1 -1
- package/dist/prosekit-extensions-file.d.ts +5 -5
- package/dist/prosekit-extensions-file.js +23 -23
- package/dist/prosekit-extensions-gap-cursor.js +3 -1
- package/dist/prosekit-extensions-heading.js +7 -3
- package/dist/prosekit-extensions-horizontal-rule.js +18 -5
- package/dist/prosekit-extensions-image.js +10 -3
- package/dist/prosekit-extensions-italic.js +14 -4
- package/dist/prosekit-extensions-link.js +2 -2
- package/dist/prosekit-extensions-list.js +21 -9
- package/dist/prosekit-extensions-loro.d.ts +4 -4
- package/dist/prosekit-extensions-loro.js +33 -13
- package/dist/prosekit-extensions-mark-rule.js +1 -1
- package/dist/prosekit-extensions-mod-click-prevention.js +8 -2
- package/dist/prosekit-extensions-placeholder.js +27 -8
- package/dist/prosekit-extensions-readonly.js +4 -1
- package/dist/prosekit-extensions-search.js +6 -3
- package/dist/prosekit-extensions-strike.js +2 -2
- package/dist/prosekit-extensions-table.d.ts +1 -0
- package/dist/prosekit-extensions-table.js +17 -276
- package/dist/prosekit-extensions-virtual-selection.js +7 -2
- package/dist/prosekit-extensions-yjs.js +12 -6
- package/package.json +13 -13
- package/dist/{chunk-RE23OQPF.js → chunk-TWEOBBYZ.js} +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
// src/file/file-
|
1
|
+
// src/file/file-drop-handler.ts
|
2
2
|
import {
|
3
3
|
defineFacet,
|
4
4
|
defineFacetPayload,
|
@@ -26,56 +26,56 @@ function handleEvent(view, event, handlers, getFiles3) {
|
|
26
26
|
return handled;
|
27
27
|
}
|
28
28
|
|
29
|
-
// src/file/file-
|
30
|
-
function
|
29
|
+
// src/file/file-drop-handler.ts
|
30
|
+
function defineFileDropHandler(handler) {
|
31
31
|
return defineFacetPayload(facet, [handler]);
|
32
32
|
}
|
33
33
|
function getFiles(event) {
|
34
34
|
var _a, _b;
|
35
|
-
return Array.from((_b = (_a = event.
|
35
|
+
return Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);
|
36
36
|
}
|
37
37
|
var facet = defineFacet({
|
38
38
|
parent: editorEventFacet,
|
39
39
|
singleton: true,
|
40
40
|
reducer: (handlers) => {
|
41
|
-
const
|
42
|
-
|
41
|
+
const dropHandler = (view, event) => {
|
42
|
+
const position = view.posAtCoords({ left: event.x, top: event.y });
|
43
|
+
if (!position) {
|
44
|
+
return false;
|
45
|
+
}
|
46
|
+
const pos = position.inside > 0 ? position.inside : position.pos;
|
47
|
+
return handleEvent(
|
48
|
+
view,
|
49
|
+
event,
|
50
|
+
handlers.map((handler) => (options) => handler({ ...options, pos })),
|
51
|
+
getFiles
|
52
|
+
);
|
43
53
|
};
|
44
|
-
return ["
|
54
|
+
return ["drop", dropHandler];
|
45
55
|
}
|
46
56
|
});
|
47
57
|
|
48
|
-
// src/file/file-
|
58
|
+
// src/file/file-paste-handler.ts
|
49
59
|
import {
|
50
60
|
defineFacet as defineFacet2,
|
51
61
|
defineFacetPayload as defineFacetPayload2,
|
52
62
|
editorEventFacet as editorEventFacet2
|
53
63
|
} from "@prosekit/core";
|
54
|
-
function
|
64
|
+
function defineFilePasteHandler(handler) {
|
55
65
|
return defineFacetPayload2(facet2, [handler]);
|
56
66
|
}
|
57
67
|
function getFiles2(event) {
|
58
68
|
var _a, _b;
|
59
|
-
return Array.from((_b = (_a = event.
|
69
|
+
return Array.from((_b = (_a = event.clipboardData) == null ? void 0 : _a.files) != null ? _b : []);
|
60
70
|
}
|
61
71
|
var facet2 = defineFacet2({
|
62
72
|
parent: editorEventFacet2,
|
63
73
|
singleton: true,
|
64
74
|
reducer: (handlers) => {
|
65
|
-
const
|
66
|
-
|
67
|
-
if (!position) {
|
68
|
-
return false;
|
69
|
-
}
|
70
|
-
const pos = position.inside > 0 ? position.inside : position.pos;
|
71
|
-
return handleEvent(
|
72
|
-
view,
|
73
|
-
event,
|
74
|
-
handlers.map((handler) => (options) => handler({ ...options, pos })),
|
75
|
-
getFiles2
|
76
|
-
);
|
75
|
+
const pasteHandler = (view, event) => {
|
76
|
+
return handleEvent(view, event, handlers, getFiles2);
|
77
77
|
};
|
78
|
-
return ["
|
78
|
+
return ["paste", pasteHandler];
|
79
79
|
}
|
80
80
|
});
|
81
81
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
// src/gap-cursor/gap-cursor.ts
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
definePlugin
|
4
|
+
} from "@prosekit/core";
|
3
5
|
import { gapCursor } from "prosemirror-gapcursor";
|
4
6
|
import { GapCursor } from "prosemirror-gapcursor";
|
5
7
|
function defineGapCursor() {
|
@@ -3,7 +3,9 @@ import {
|
|
3
3
|
} from "./chunk-LAQZC3ZM.js";
|
4
4
|
|
5
5
|
// src/heading/heading.ts
|
6
|
-
import {
|
6
|
+
import {
|
7
|
+
union
|
8
|
+
} from "@prosekit/core";
|
7
9
|
|
8
10
|
// src/heading/heading-commands.ts
|
9
11
|
import {
|
@@ -65,12 +67,14 @@ function defineHeadingKeymap() {
|
|
65
67
|
"mod-4": toggleHeadingKeybinding(4),
|
66
68
|
"mod-5": toggleHeadingKeybinding(5),
|
67
69
|
"mod-6": toggleHeadingKeybinding(6),
|
68
|
-
Backspace: backspaceUnsetHeading
|
70
|
+
"Backspace": backspaceUnsetHeading
|
69
71
|
});
|
70
72
|
}
|
71
73
|
|
72
74
|
// src/heading/heading-spec.ts
|
73
|
-
import {
|
75
|
+
import {
|
76
|
+
defineNodeSpec
|
77
|
+
} from "@prosekit/core";
|
74
78
|
function defineHeadingSpec() {
|
75
79
|
return defineNodeSpec({
|
76
80
|
name: "heading",
|
@@ -3,11 +3,19 @@ import {
|
|
3
3
|
} from "./chunk-LAQZC3ZM.js";
|
4
4
|
|
5
5
|
// src/horizontal-rule/horizontal-rule.ts
|
6
|
-
import {
|
6
|
+
import {
|
7
|
+
union as union2
|
8
|
+
} from "@prosekit/core";
|
7
9
|
|
8
10
|
// src/horizontal-rule/horizontal-rule-commands.ts
|
9
|
-
import {
|
10
|
-
|
11
|
+
import {
|
12
|
+
defineCommands,
|
13
|
+
getNodeType
|
14
|
+
} from "@prosekit/core";
|
15
|
+
import {
|
16
|
+
Fragment,
|
17
|
+
Slice
|
18
|
+
} from "@prosekit/pm/model";
|
11
19
|
import "@prosekit/pm/state";
|
12
20
|
function insertHorizontalRule() {
|
13
21
|
return (state, dispatch) => {
|
@@ -26,7 +34,10 @@ function defineHorizontalRuleCommands() {
|
|
26
34
|
}
|
27
35
|
|
28
36
|
// src/horizontal-rule/horizontal-rule-input-rule.ts
|
29
|
-
import {
|
37
|
+
import {
|
38
|
+
getNodeType as getNodeType2,
|
39
|
+
union
|
40
|
+
} from "@prosekit/core";
|
30
41
|
import { InputRule } from "@prosekit/pm/inputrules";
|
31
42
|
function defineHorizontalRuleInputRule() {
|
32
43
|
return union(
|
@@ -44,7 +55,9 @@ function defineHorizontalRuleInputRule() {
|
|
44
55
|
}
|
45
56
|
|
46
57
|
// src/horizontal-rule/horizontal-rule-spec.ts
|
47
|
-
import {
|
58
|
+
import {
|
59
|
+
defineNodeSpec
|
60
|
+
} from "@prosekit/core";
|
48
61
|
function defineHorizontalRuleSpec() {
|
49
62
|
return defineNodeSpec({
|
50
63
|
name: "horizontalRule",
|
@@ -1,8 +1,13 @@
|
|
1
1
|
// src/image/image.ts
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
union
|
4
|
+
} from "@prosekit/core";
|
3
5
|
|
4
6
|
// src/image/image-commands.ts
|
5
|
-
import {
|
7
|
+
import {
|
8
|
+
defineCommands,
|
9
|
+
insertNode
|
10
|
+
} from "@prosekit/core";
|
6
11
|
function defineImageCommands() {
|
7
12
|
return defineCommands({
|
8
13
|
insertImage: (attrs) => {
|
@@ -12,7 +17,9 @@ function defineImageCommands() {
|
|
12
17
|
}
|
13
18
|
|
14
19
|
// src/image/image-spec.ts
|
15
|
-
import {
|
20
|
+
import {
|
21
|
+
defineNodeSpec
|
22
|
+
} from "@prosekit/core";
|
16
23
|
function defineImageSpec() {
|
17
24
|
return defineNodeSpec({
|
18
25
|
name: "image",
|
@@ -3,10 +3,15 @@ import {
|
|
3
3
|
} from "./chunk-LAQZC3ZM.js";
|
4
4
|
|
5
5
|
// src/italic/italic.ts
|
6
|
-
import {
|
6
|
+
import {
|
7
|
+
union
|
8
|
+
} from "@prosekit/core";
|
7
9
|
|
8
10
|
// src/italic/italic-commands.ts
|
9
|
-
import {
|
11
|
+
import {
|
12
|
+
defineCommands,
|
13
|
+
toggleMark
|
14
|
+
} from "@prosekit/core";
|
10
15
|
function defineItalicCommands() {
|
11
16
|
return defineCommands({
|
12
17
|
toggleItalic: () => toggleMark({ type: "italic" })
|
@@ -23,7 +28,10 @@ function defineItalicInputRule() {
|
|
23
28
|
}
|
24
29
|
|
25
30
|
// src/italic/italic-keymap.ts
|
26
|
-
import {
|
31
|
+
import {
|
32
|
+
defineKeymap,
|
33
|
+
toggleMark as toggleMark2
|
34
|
+
} from "@prosekit/core";
|
27
35
|
function defineItalicKeymap() {
|
28
36
|
return defineKeymap({
|
29
37
|
"Mod-i": toggleMark2({ type: "italic" })
|
@@ -31,7 +39,9 @@ function defineItalicKeymap() {
|
|
31
39
|
}
|
32
40
|
|
33
41
|
// src/italic/italic-spec.ts
|
34
|
-
import {
|
42
|
+
import {
|
43
|
+
defineMarkSpec
|
44
|
+
} from "@prosekit/core";
|
35
45
|
function defineItalicSpec() {
|
36
46
|
return defineMarkSpec({
|
37
47
|
name: "italic",
|
@@ -6,10 +6,15 @@ import {
|
|
6
6
|
import { ListDOMSerializer as ListDOMSerializer2 } from "prosemirror-flat-list";
|
7
7
|
|
8
8
|
// src/list/list.ts
|
9
|
-
import {
|
9
|
+
import {
|
10
|
+
union as union2
|
11
|
+
} from "@prosekit/core";
|
10
12
|
|
11
13
|
// src/list/list-commands.ts
|
12
|
-
import {
|
14
|
+
import {
|
15
|
+
defineCommands,
|
16
|
+
insertNode
|
17
|
+
} from "@prosekit/core";
|
13
18
|
import {
|
14
19
|
createDedentListCommand as dedentList,
|
15
20
|
createIndentListCommand as indentList,
|
@@ -38,7 +43,9 @@ function defineListCommands() {
|
|
38
43
|
}
|
39
44
|
|
40
45
|
// src/list/list-input-rules.ts
|
41
|
-
import {
|
46
|
+
import {
|
47
|
+
union
|
48
|
+
} from "@prosekit/core";
|
42
49
|
import { listInputRules } from "prosemirror-flat-list";
|
43
50
|
function defineListInputRules() {
|
44
51
|
return union(listInputRules.map(defineInputRule));
|
@@ -46,7 +53,10 @@ function defineListInputRules() {
|
|
46
53
|
|
47
54
|
// src/list/list-keymap.ts
|
48
55
|
import { defineKeymap } from "@prosekit/core";
|
49
|
-
import {
|
56
|
+
import {
|
57
|
+
chainCommands,
|
58
|
+
deleteSelection
|
59
|
+
} from "@prosekit/pm/commands";
|
50
60
|
import {
|
51
61
|
createDedentListCommand,
|
52
62
|
createIndentListCommand,
|
@@ -65,12 +75,12 @@ var backspaceCommand = chainCommands(
|
|
65
75
|
var dedentListCommand = createDedentListCommand();
|
66
76
|
var indentListCommand = createIndentListCommand();
|
67
77
|
var listKeymap = {
|
68
|
-
Enter: enterCommand,
|
69
|
-
Backspace: backspaceCommand,
|
70
|
-
Delete: deleteCommand,
|
78
|
+
"Enter": enterCommand,
|
79
|
+
"Backspace": backspaceCommand,
|
80
|
+
"Delete": deleteCommand,
|
71
81
|
"Mod-]": indentListCommand,
|
72
82
|
"Mod-[": dedentListCommand,
|
73
|
-
Tab: indentListCommand,
|
83
|
+
"Tab": indentListCommand,
|
74
84
|
"Shift-Tab": dedentListCommand
|
75
85
|
};
|
76
86
|
function defineListKeymap() {
|
@@ -85,7 +95,9 @@ function defineListPlugins() {
|
|
85
95
|
}
|
86
96
|
|
87
97
|
// src/list/list-spec.ts
|
88
|
-
import {
|
98
|
+
import {
|
99
|
+
defineNodeSpec
|
100
|
+
} from "@prosekit/core";
|
89
101
|
import { createListSpec } from "prosemirror-flat-list";
|
90
102
|
function defineListSpec() {
|
91
103
|
return defineNodeSpec({
|
@@ -1,11 +1,11 @@
|
|
1
1
|
export { LoroSyncPluginProps } from './_tsup-dts-rollup.js';
|
2
2
|
export { LoroUndoPluginProps } from './_tsup-dts-rollup.js';
|
3
|
+
export { defineLoro } from './_tsup-dts-rollup.js';
|
4
|
+
export { LoroExtension } from './_tsup-dts-rollup.js';
|
5
|
+
export { LoroOptions } from './_tsup-dts-rollup.js';
|
3
6
|
export { defineLoroCommands } from './_tsup-dts-rollup.js';
|
4
|
-
export { LoroCursorOptions } from './_tsup-dts-rollup.js';
|
5
7
|
export { defineLoroCursorPlugin } from './_tsup-dts-rollup.js';
|
8
|
+
export { LoroCursorOptions } from './_tsup-dts-rollup.js';
|
6
9
|
export { defineLoroKeymap } from './_tsup-dts-rollup.js';
|
7
10
|
export { defineLoroSyncPlugin } from './_tsup-dts-rollup.js';
|
8
11
|
export { defineLoroUndoPlugin } from './_tsup-dts-rollup.js';
|
9
|
-
export { defineLoro } from './_tsup-dts-rollup.js';
|
10
|
-
export { LoroExtension } from './_tsup-dts-rollup.js';
|
11
|
-
export { LoroOptions } from './_tsup-dts-rollup.js';
|
@@ -1,6 +1,18 @@
|
|
1
|
+
// src/loro/loro.ts
|
2
|
+
import {
|
3
|
+
Priority,
|
4
|
+
union,
|
5
|
+
withPriority
|
6
|
+
} from "@prosekit/core";
|
7
|
+
|
1
8
|
// src/loro/loro-commands.ts
|
2
|
-
import {
|
3
|
-
|
9
|
+
import {
|
10
|
+
defineCommands
|
11
|
+
} from "@prosekit/core";
|
12
|
+
import {
|
13
|
+
redo,
|
14
|
+
undo
|
15
|
+
} from "loro-prosemirror";
|
4
16
|
var commands = {
|
5
17
|
undo: () => undo,
|
6
18
|
redo: () => redo
|
@@ -10,8 +22,12 @@ function defineLoroCommands() {
|
|
10
22
|
}
|
11
23
|
|
12
24
|
// src/loro/loro-cursor-plugin.ts
|
13
|
-
import {
|
14
|
-
|
25
|
+
import {
|
26
|
+
definePlugin
|
27
|
+
} from "@prosekit/core";
|
28
|
+
import {
|
29
|
+
LoroCursorPlugin
|
30
|
+
} from "loro-prosemirror";
|
15
31
|
function defineLoroCursorPlugin(options) {
|
16
32
|
const { awareness, ...rest } = options;
|
17
33
|
return definePlugin(LoroCursorPlugin(awareness, rest));
|
@@ -22,7 +38,10 @@ import {
|
|
22
38
|
defineKeymap,
|
23
39
|
isApple
|
24
40
|
} from "@prosekit/core";
|
25
|
-
import {
|
41
|
+
import {
|
42
|
+
redo as redo2,
|
43
|
+
undo as undo2
|
44
|
+
} from "loro-prosemirror";
|
26
45
|
var keymap = {
|
27
46
|
"Mod-z": undo2,
|
28
47
|
"Shift-Mod-z": redo2
|
@@ -35,25 +54,26 @@ function defineLoroKeymap() {
|
|
35
54
|
}
|
36
55
|
|
37
56
|
// src/loro/loro-sync-plugin.ts
|
38
|
-
import {
|
39
|
-
|
57
|
+
import {
|
58
|
+
definePlugin as definePlugin2
|
59
|
+
} from "@prosekit/core";
|
60
|
+
import {
|
61
|
+
LoroSyncPlugin
|
62
|
+
} from "loro-prosemirror";
|
40
63
|
function defineLoroSyncPlugin(options) {
|
41
64
|
return definePlugin2(LoroSyncPlugin(options));
|
42
65
|
}
|
43
66
|
|
44
67
|
// src/loro/loro-undo-plugin.ts
|
45
68
|
import { definePlugin as definePlugin3 } from "@prosekit/core";
|
46
|
-
import {
|
69
|
+
import {
|
70
|
+
LoroUndoPlugin
|
71
|
+
} from "loro-prosemirror";
|
47
72
|
function defineLoroUndoPlugin(options) {
|
48
73
|
return definePlugin3(LoroUndoPlugin(options));
|
49
74
|
}
|
50
75
|
|
51
76
|
// src/loro/loro.ts
|
52
|
-
import {
|
53
|
-
Priority,
|
54
|
-
union,
|
55
|
-
withPriority
|
56
|
-
} from "@prosekit/core";
|
57
77
|
function defineLoro(options) {
|
58
78
|
const { doc, awareness, sync, undo: undo3, cursor } = options;
|
59
79
|
return withPriority(
|
@@ -1,6 +1,12 @@
|
|
1
1
|
// src/mod-click-prevention/index.ts
|
2
|
-
import {
|
3
|
-
|
2
|
+
import {
|
3
|
+
definePlugin,
|
4
|
+
isApple
|
5
|
+
} from "@prosekit/core";
|
6
|
+
import {
|
7
|
+
Plugin,
|
8
|
+
PluginKey
|
9
|
+
} from "@prosekit/pm/state";
|
4
10
|
function defineModClickPrevention() {
|
5
11
|
return definePlugin(new Plugin({ key, props: { handleClick } }));
|
6
12
|
}
|
@@ -1,7 +1,21 @@
|
|
1
|
+
import {
|
2
|
+
findTable
|
3
|
+
} from "./chunk-KNFGQ3MV.js";
|
4
|
+
|
1
5
|
// src/placeholder/index.ts
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
6
|
+
import {
|
7
|
+
definePlugin,
|
8
|
+
isInCodeBlock,
|
9
|
+
maybeRun
|
10
|
+
} from "@prosekit/core";
|
11
|
+
import {
|
12
|
+
Plugin,
|
13
|
+
PluginKey
|
14
|
+
} from "@prosekit/pm/state";
|
15
|
+
import {
|
16
|
+
Decoration,
|
17
|
+
DecorationSet
|
18
|
+
} from "@prosekit/pm/view";
|
5
19
|
function definePlaceholder(options) {
|
6
20
|
return definePlugin(createPlaceholderPlugin(options));
|
7
21
|
}
|
@@ -13,10 +27,8 @@ function createPlaceholderPlugin({
|
|
13
27
|
key: new PluginKey("prosekit-placeholder"),
|
14
28
|
props: {
|
15
29
|
decorations: (state) => {
|
16
|
-
|
17
|
-
|
18
|
-
}
|
19
|
-
if (isInCodeBlock(state.selection)) {
|
30
|
+
const strategyFn = typeof strategy === "function" ? strategy : strategy === "doc" ? docStrategy : defaultStrategy;
|
31
|
+
if (!strategyFn(state)) {
|
20
32
|
return null;
|
21
33
|
}
|
22
34
|
const placeholderText = maybeRun(placeholder, state);
|
@@ -29,11 +41,18 @@ function createPlaceholderPlugin({
|
|
29
41
|
}
|
30
42
|
});
|
31
43
|
}
|
44
|
+
function defaultStrategy(state) {
|
45
|
+
return !isInCodeBlock(state.selection) && !findTable(state.selection.$from);
|
46
|
+
}
|
47
|
+
function docStrategy(state) {
|
48
|
+
return isDocEmpty(state.doc) && defaultStrategy(state);
|
49
|
+
}
|
32
50
|
function isDocEmpty(doc) {
|
33
51
|
var _a;
|
34
52
|
return doc.childCount <= 1 && !((_a = doc.firstChild) == null ? void 0 : _a.content.size);
|
35
53
|
}
|
36
54
|
function createPlaceholderDecoration(state, placeholderText) {
|
55
|
+
if (!placeholderText) return null;
|
37
56
|
const { selection } = state;
|
38
57
|
if (!selection.empty) return null;
|
39
58
|
const $pos = selection.$anchor;
|
@@ -41,7 +60,7 @@ function createPlaceholderDecoration(state, placeholderText) {
|
|
41
60
|
if (node.content.size > 0) return null;
|
42
61
|
const before = $pos.before();
|
43
62
|
return Decoration.node(before, before + node.nodeSize, {
|
44
|
-
class: "prosekit-placeholder",
|
63
|
+
"class": "prosekit-placeholder",
|
45
64
|
"data-placeholder": placeholderText
|
46
65
|
});
|
47
66
|
}
|
@@ -1,6 +1,9 @@
|
|
1
1
|
// src/readonly/index.ts
|
2
2
|
import { definePlugin } from "@prosekit/core";
|
3
|
-
import {
|
3
|
+
import {
|
4
|
+
PluginKey,
|
5
|
+
ProseMirrorPlugin
|
6
|
+
} from "@prosekit/pm/state";
|
4
7
|
function defineReadonly() {
|
5
8
|
return definePlugin(plugin);
|
6
9
|
}
|
@@ -1,7 +1,9 @@
|
|
1
1
|
// src/search/index.ts
|
2
|
-
import { defineCommands, definePlugin } from "@prosekit/core";
|
3
2
|
import {
|
4
|
-
|
3
|
+
defineCommands,
|
4
|
+
definePlugin
|
5
|
+
} from "@prosekit/core";
|
6
|
+
import {
|
5
7
|
findNext,
|
6
8
|
findNextNoWrap,
|
7
9
|
findPrev,
|
@@ -10,7 +12,8 @@ import {
|
|
10
12
|
replaceCurrent,
|
11
13
|
replaceNext,
|
12
14
|
replaceNextNoWrap,
|
13
|
-
search
|
15
|
+
search,
|
16
|
+
SearchQuery
|
14
17
|
} from "prosemirror-search";
|
15
18
|
function defineSearchQuery(options) {
|
16
19
|
const query = new SearchQuery(options);
|
@@ -4,12 +4,12 @@ import {
|
|
4
4
|
|
5
5
|
// src/strike/index.ts
|
6
6
|
import {
|
7
|
+
canUseRegexLookbehind,
|
7
8
|
defineCommands,
|
8
9
|
defineKeymap,
|
9
10
|
defineMarkSpec,
|
10
|
-
union,
|
11
11
|
toggleMark,
|
12
|
-
|
12
|
+
union
|
13
13
|
} from "@prosekit/core";
|
14
14
|
function defineStrikeSpec() {
|
15
15
|
return defineMarkSpec({
|
@@ -22,4 +22,5 @@ export { TableCellSpecExtension } from './_tsup-dts-rollup.js';
|
|
22
22
|
export { TableHeaderCellSpecExtension } from './_tsup-dts-rollup.js';
|
23
23
|
export { TableRowSpecExtension } from './_tsup-dts-rollup.js';
|
24
24
|
export { TableSpecExtension } from './_tsup-dts-rollup.js';
|
25
|
+
export { findTable } from './_tsup-dts-rollup.js';
|
25
26
|
export { isCellSelection } from './_tsup-dts-rollup.js';
|