@prosekit/extensions 0.0.0-next-20230709094459 → 0.0.0-next-20231120040948
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 +459 -0
- package/dist/list/style.css +2 -2
- package/dist/prosekit-extensions-autocomplete.d.ts +3 -0
- package/dist/prosekit-extensions-autocomplete.js +190 -0
- package/dist/prosekit-extensions-blockquote.d.ts +2 -11
- package/dist/prosekit-extensions-blockquote.js +13 -15
- package/dist/prosekit-extensions-bold.d.ts +4 -20
- package/dist/prosekit-extensions-bold.js +35 -37
- package/dist/prosekit-extensions-code-block.d.ts +5 -0
- package/dist/prosekit-extensions-code-block.js +118 -0
- package/dist/prosekit-extensions-code.d.ts +4 -16
- package/dist/prosekit-extensions-code.js +28 -12
- package/dist/prosekit-extensions-heading.d.ts +6 -15
- package/dist/prosekit-extensions-heading.js +67 -39
- package/dist/prosekit-extensions-image.d.ts +4 -0
- package/dist/prosekit-extensions-image.js +48 -0
- package/dist/prosekit-extensions-italic.d.ts +4 -20
- package/dist/prosekit-extensions-italic.js +29 -31
- package/dist/prosekit-extensions-link.d.ts +4 -0
- package/dist/prosekit-extensions-link.js +44 -0
- package/dist/prosekit-extensions-list.d.ts +6 -14
- package/dist/prosekit-extensions-list.js +54 -24
- package/dist/prosekit-extensions-mention.d.ts +3 -0
- package/dist/prosekit-extensions-mention.js +43 -0
- package/dist/prosekit-extensions-placeholder.d.ts +2 -23
- package/dist/prosekit-extensions-placeholder.js +8 -7
- package/dist/prosekit-extensions-strike.d.ts +4 -0
- package/dist/prosekit-extensions-strike.js +47 -0
- package/dist/prosekit-extensions-suggestion.d.ts +3 -37
- package/dist/prosekit-extensions-suggestion.js +7 -5
- package/dist/prosekit-extensions-underline.d.ts +4 -0
- package/dist/prosekit-extensions-underline.js +45 -0
- package/dist/prosekit-extensions.d.ts +1 -2
- package/package.json +65 -7
@@ -0,0 +1,44 @@
|
|
1
|
+
// src/link/index.ts
|
2
|
+
import {
|
3
|
+
defineCommands,
|
4
|
+
addMark,
|
5
|
+
defineMarkSpec,
|
6
|
+
union,
|
7
|
+
toggleMark
|
8
|
+
} from "@prosekit/core";
|
9
|
+
function defineLinkSpec() {
|
10
|
+
return defineMarkSpec({
|
11
|
+
name: "link",
|
12
|
+
parseDOM: [
|
13
|
+
{
|
14
|
+
tag: "a[href]",
|
15
|
+
getAttrs: (dom) => {
|
16
|
+
return {
|
17
|
+
href: dom.getAttribute("href")
|
18
|
+
};
|
19
|
+
}
|
20
|
+
}
|
21
|
+
],
|
22
|
+
attrs: {
|
23
|
+
href: {}
|
24
|
+
},
|
25
|
+
toDOM(node) {
|
26
|
+
const { href } = node.attrs;
|
27
|
+
return ["a", { href }, 0];
|
28
|
+
}
|
29
|
+
});
|
30
|
+
}
|
31
|
+
function defineLinkCommands() {
|
32
|
+
return defineCommands({
|
33
|
+
addLink: (attrs) => addMark({ type: "link", attrs }),
|
34
|
+
toggleLink: (attrs) => toggleMark({ type: "link", attrs })
|
35
|
+
});
|
36
|
+
}
|
37
|
+
function defineLink() {
|
38
|
+
return union([defineLinkSpec(), defineLinkCommands()]);
|
39
|
+
}
|
40
|
+
export {
|
41
|
+
defineLink,
|
42
|
+
defineLinkCommands,
|
43
|
+
defineLinkSpec
|
44
|
+
};
|
@@ -1,14 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
}
|
6
|
-
|
7
|
-
declare function addListKeymap(): _prosekit_core.Extension<_prosekit_core.ExtensionTyping<string, string, _prosekit_core.CommandArgs>>;
|
8
|
-
declare function addListInputRules(): _prosekit_core.Extension<_prosekit_core.ExtensionTyping<string, string, _prosekit_core.CommandArgs>>;
|
9
|
-
/** @public */
|
10
|
-
declare function addList(): _prosekit_core.Extension<{
|
11
|
-
NODES: "list";
|
12
|
-
}>;
|
13
|
-
|
14
|
-
export { addList, addListInputRules, addListKeymap, addListPlugins, addListSpec };
|
1
|
+
export { defineListSpec } from './_tsup-dts-rollup';
|
2
|
+
export { defineListPlugins } from './_tsup-dts-rollup';
|
3
|
+
export { defineListKeymap } from './_tsup-dts-rollup';
|
4
|
+
export { defineListInputRules } from './_tsup-dts-rollup';
|
5
|
+
export { defineListCommands } from './_tsup-dts-rollup';
|
6
|
+
export { defineList } from './_tsup-dts-rollup';
|
@@ -1,41 +1,71 @@
|
|
1
1
|
// src/list/index.ts
|
2
2
|
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
Priority,
|
4
|
+
defineCommands,
|
5
|
+
defineInputRule,
|
6
|
+
defineKeymap,
|
7
|
+
defineNodeSpec,
|
8
|
+
definePlugin,
|
9
|
+
insertNode,
|
10
|
+
union,
|
11
|
+
withPriority
|
8
12
|
} from "@prosekit/core";
|
9
13
|
import {
|
14
|
+
createDedentListCommand,
|
15
|
+
createIndentListCommand,
|
10
16
|
createListPlugins,
|
11
17
|
createListSpec,
|
18
|
+
createMoveListCommand,
|
19
|
+
createSplitListCommand,
|
20
|
+
createToggleCollapsedCommand,
|
21
|
+
createToggleListCommand,
|
22
|
+
createUnwrapListCommand,
|
23
|
+
createWrapInListCommand,
|
12
24
|
listInputRules,
|
13
25
|
listKeymap
|
14
26
|
} from "prosemirror-flat-list";
|
15
|
-
function
|
16
|
-
return
|
27
|
+
function defineListSpec() {
|
28
|
+
return defineNodeSpec({ ...createListSpec(), name: "list" });
|
17
29
|
}
|
18
|
-
function
|
19
|
-
return
|
30
|
+
function defineListPlugins() {
|
31
|
+
return definePlugin(({ schema }) => createListPlugins({ schema }));
|
20
32
|
}
|
21
|
-
function
|
22
|
-
return
|
33
|
+
function defineListKeymap() {
|
34
|
+
return defineKeymap(listKeymap);
|
23
35
|
}
|
24
|
-
function
|
25
|
-
return
|
36
|
+
function defineListInputRules() {
|
37
|
+
return defineInputRule(() => listInputRules);
|
26
38
|
}
|
27
|
-
function
|
28
|
-
return
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
39
|
+
function defineListCommands() {
|
40
|
+
return defineCommands({
|
41
|
+
dedentList: createDedentListCommand,
|
42
|
+
indentList: createIndentListCommand,
|
43
|
+
moveList: createMoveListCommand,
|
44
|
+
splitList: createSplitListCommand,
|
45
|
+
toggleCollapsed: createToggleCollapsedCommand,
|
46
|
+
toggleList: createToggleListCommand,
|
47
|
+
unwrapList: createUnwrapListCommand,
|
48
|
+
wrapInList: createWrapInListCommand,
|
49
|
+
insertList: (attrs) => {
|
50
|
+
return insertNode({ type: "list", attrs });
|
51
|
+
}
|
52
|
+
});
|
53
|
+
}
|
54
|
+
function defineList() {
|
55
|
+
return union([
|
56
|
+
defineListSpec(),
|
57
|
+
defineListPlugins(),
|
58
|
+
// Use a high priority to override the default key bindings.
|
59
|
+
withPriority(defineListKeymap(), Priority.high),
|
60
|
+
defineListInputRules(),
|
61
|
+
defineListCommands()
|
33
62
|
]);
|
34
63
|
}
|
35
64
|
export {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
65
|
+
defineList,
|
66
|
+
defineListCommands,
|
67
|
+
defineListInputRules,
|
68
|
+
defineListKeymap,
|
69
|
+
defineListPlugins,
|
70
|
+
defineListSpec
|
41
71
|
};
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// src/mention/index.ts
|
2
|
+
import { defineNodeSpec, union } from "@prosekit/core";
|
3
|
+
function defineMentionSpec() {
|
4
|
+
return defineNodeSpec({
|
5
|
+
name: "mention",
|
6
|
+
atom: true,
|
7
|
+
group: "inline",
|
8
|
+
attrs: {
|
9
|
+
id: {},
|
10
|
+
value: {},
|
11
|
+
kind: { default: "" }
|
12
|
+
},
|
13
|
+
inline: true,
|
14
|
+
leafText: (node) => node.attrs.value.toString(),
|
15
|
+
parseDOM: [
|
16
|
+
{
|
17
|
+
tag: `span[data-mention]`,
|
18
|
+
getAttrs: (dom) => ({
|
19
|
+
id: dom.getAttribute("data-id") || "",
|
20
|
+
kind: dom.getAttribute("data-mention") || "",
|
21
|
+
value: dom.textContent || ""
|
22
|
+
})
|
23
|
+
}
|
24
|
+
],
|
25
|
+
toDOM(node) {
|
26
|
+
return [
|
27
|
+
"span",
|
28
|
+
{
|
29
|
+
"data-id": node.attrs.id.toString(),
|
30
|
+
"data-mention": node.attrs.kind.toString()
|
31
|
+
},
|
32
|
+
node.attrs.value.toString()
|
33
|
+
];
|
34
|
+
}
|
35
|
+
});
|
36
|
+
}
|
37
|
+
function defineMention() {
|
38
|
+
return union([defineMentionSpec()]);
|
39
|
+
}
|
40
|
+
export {
|
41
|
+
defineMention,
|
42
|
+
defineMentionSpec
|
43
|
+
};
|
@@ -1,23 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
interface PlaceholderOptions {
|
4
|
-
/**
|
5
|
-
* The placeholder text to use.
|
6
|
-
*/
|
7
|
-
placeholder: string;
|
8
|
-
/**
|
9
|
-
* By default, the placeholder text will be shown whenever the current text
|
10
|
-
* cursor is in an empty node. If you only want to show the placeholder when
|
11
|
-
* the whole doc is empty, you can set this option to 'doc'.
|
12
|
-
*
|
13
|
-
* @default 'block'
|
14
|
-
*/
|
15
|
-
strategy?: 'doc' | 'block';
|
16
|
-
}
|
17
|
-
/**
|
18
|
-
* Add a placeholder text to the editor when the current block or document is
|
19
|
-
* empty.
|
20
|
-
*/
|
21
|
-
declare function addPlaceholder(options: PlaceholderOptions): _prosekit_core.Extension<_prosekit_core.ExtensionTyping<string, string, _prosekit_core.CommandArgs>>;
|
22
|
-
|
23
|
-
export { PlaceholderOptions, addPlaceholder };
|
1
|
+
export { definePlaceholder } from './_tsup-dts-rollup';
|
2
|
+
export { PlaceholderOptions } from './_tsup-dts-rollup';
|
@@ -1,14 +1,14 @@
|
|
1
1
|
// src/placeholder/index.ts
|
2
|
-
import {
|
3
|
-
import
|
2
|
+
import { definePlugin } from "@prosekit/core";
|
3
|
+
import "@prosekit/pm/model";
|
4
|
+
import { Plugin, PluginKey } from "@prosekit/pm/state";
|
4
5
|
import { Decoration, DecorationSet } from "@prosekit/pm/view";
|
5
|
-
function
|
6
|
-
return
|
7
|
-
plugins: [createPlaceholderPlugin(options)]
|
8
|
-
});
|
6
|
+
function definePlaceholder(options) {
|
7
|
+
return definePlugin(createPlaceholderPlugin(options));
|
9
8
|
}
|
10
9
|
function createPlaceholderPlugin(options) {
|
11
10
|
return new Plugin({
|
11
|
+
key: placeholderPluginKey,
|
12
12
|
props: {
|
13
13
|
decorations: (state) => {
|
14
14
|
if (options.strategy === "doc" && !isDocEmpty(state.doc)) {
|
@@ -24,6 +24,7 @@ function createPlaceholderPlugin(options) {
|
|
24
24
|
}
|
25
25
|
});
|
26
26
|
}
|
27
|
+
var placeholderPluginKey = new PluginKey("prosekit-placeholder");
|
27
28
|
function isDocEmpty(doc) {
|
28
29
|
var _a;
|
29
30
|
return doc.childCount <= 1 && !((_a = doc.firstChild) == null ? void 0 : _a.content.size);
|
@@ -43,5 +44,5 @@ function createPlaceholderDecoration(state, placeholderText) {
|
|
43
44
|
});
|
44
45
|
}
|
45
46
|
export {
|
46
|
-
|
47
|
+
definePlaceholder
|
47
48
|
};
|
@@ -0,0 +1,47 @@
|
|
1
|
+
// src/strike/index.ts
|
2
|
+
import {
|
3
|
+
defineCommands,
|
4
|
+
defineKeymap,
|
5
|
+
defineMarkSpec,
|
6
|
+
union,
|
7
|
+
toggleMark
|
8
|
+
} from "@prosekit/core";
|
9
|
+
function defineStrikeSpec() {
|
10
|
+
return defineMarkSpec({
|
11
|
+
name: "strike",
|
12
|
+
parseDOM: [
|
13
|
+
{ tag: "s" },
|
14
|
+
{ tag: "strike" },
|
15
|
+
{ tag: "del" },
|
16
|
+
{ style: "text-decoration=line-through" },
|
17
|
+
{ style: "text-decoration-line=line-through" }
|
18
|
+
],
|
19
|
+
toDOM() {
|
20
|
+
return ["s", 0];
|
21
|
+
}
|
22
|
+
});
|
23
|
+
}
|
24
|
+
function defineStrikeCommands() {
|
25
|
+
return defineCommands({
|
26
|
+
toggleStrike: () => toggleMark({ type: "strike" })
|
27
|
+
});
|
28
|
+
}
|
29
|
+
function defineStrikeKeymap() {
|
30
|
+
return defineKeymap({
|
31
|
+
"Mod-shift-s": toggleMark({ type: "strike" }),
|
32
|
+
"Mod-shift-x": toggleMark({ type: "strike" })
|
33
|
+
});
|
34
|
+
}
|
35
|
+
function defineStrike() {
|
36
|
+
return union([
|
37
|
+
defineStrikeSpec(),
|
38
|
+
defineStrikeCommands(),
|
39
|
+
defineStrikeKeymap()
|
40
|
+
]);
|
41
|
+
}
|
42
|
+
export {
|
43
|
+
defineStrike,
|
44
|
+
defineStrikeCommands,
|
45
|
+
defineStrikeKeymap,
|
46
|
+
defineStrikeSpec
|
47
|
+
};
|
@@ -1,37 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
interface PredictionRule {
|
5
|
-
match: RegExp;
|
6
|
-
matchAfter?: RegExp;
|
7
|
-
}
|
8
|
-
/**
|
9
|
-
* @returns Return a Transaction object if you want to append a transaction to current state (using )
|
10
|
-
*/
|
11
|
-
type MatchHandler = (options: {
|
12
|
-
rule: PredictionRule;
|
13
|
-
match: RegExpMatchArray;
|
14
|
-
matchAfter: RegExpMatchArray | null;
|
15
|
-
state: EditorState;
|
16
|
-
dismiss: VoidFunction;
|
17
|
-
deleteMatch: VoidFunction;
|
18
|
-
}) => void;
|
19
|
-
interface SuggestionOptions {
|
20
|
-
rules: PredictionRule[];
|
21
|
-
onMatch: MatchHandler;
|
22
|
-
onDeactivate: VoidFunction;
|
23
|
-
/**
|
24
|
-
* You can pass this function if you want to skip the matching in some cases.
|
25
|
-
* By default, the plugin will only run the matching if the current selection
|
26
|
-
* is empty, and the selection is not inside a
|
27
|
-
* [code](https://prosemirror.net/docs/ref/#model.NodeSpec.code) node nor
|
28
|
-
* inside a mark with the name as `code`.
|
29
|
-
*/
|
30
|
-
isValid?: (options: {
|
31
|
-
state: EditorState;
|
32
|
-
}) => boolean;
|
33
|
-
}
|
34
|
-
|
35
|
-
declare function addSuggestion(options: SuggestionOptions): _prosekit_core.Extension<_prosekit_core.ExtensionTyping<string, string, _prosekit_core.CommandArgs>>;
|
36
|
-
|
37
|
-
export { PredictionRule, SuggestionOptions, addSuggestion };
|
1
|
+
export { defineSuggestion } from './_tsup-dts-rollup';
|
2
|
+
export { PredictionRule } from './_tsup-dts-rollup';
|
3
|
+
export { SuggestionOptions } from './_tsup-dts-rollup';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// src/suggestion/index.ts
|
2
|
-
import {
|
2
|
+
import { definePlugin } from "@prosekit/core";
|
3
3
|
|
4
4
|
// src/suggestion/plugin.ts
|
5
5
|
import { ProseKitError } from "@prosekit/core";
|
@@ -7,6 +7,8 @@ import { Plugin, PluginKey } from "@prosekit/pm/state";
|
|
7
7
|
import { Decoration, DecorationSet } from "@prosekit/pm/view";
|
8
8
|
|
9
9
|
// src/suggestion/is-valid.ts
|
10
|
+
import "@prosekit/pm/model";
|
11
|
+
import "@prosekit/pm/state";
|
10
12
|
function defaultIsValid({ state }) {
|
11
13
|
return state.selection.empty && !isInsideCode(state.selection.$from);
|
12
14
|
}
|
@@ -129,7 +131,7 @@ function calcPluginState(state, rules) {
|
|
129
131
|
for (const rule of rules) {
|
130
132
|
const match = textBefore.match(rule.match);
|
131
133
|
const matchAfter2 = rule.matchAfter ? textAfter.match(rule.matchAfter) : null;
|
132
|
-
if (match
|
134
|
+
if ((match == null ? void 0 : match.index) != null) {
|
133
135
|
const from = $anchor.pos - textBefore.length + match.index;
|
134
136
|
const to = $anchor.pos + (matchAfter2 ? matchAfter2[0].length : 0);
|
135
137
|
return {
|
@@ -150,10 +152,10 @@ function calcPluginState(state, rules) {
|
|
150
152
|
var MAX_MATCH = 200;
|
151
153
|
|
152
154
|
// src/suggestion/index.ts
|
153
|
-
function
|
155
|
+
function defineSuggestion(options) {
|
154
156
|
const plugin = createPredictionPlugin(options);
|
155
|
-
return
|
157
|
+
return definePlugin(plugin);
|
156
158
|
}
|
157
159
|
export {
|
158
|
-
|
160
|
+
defineSuggestion
|
159
161
|
};
|
@@ -0,0 +1,45 @@
|
|
1
|
+
// src/underline/index.ts
|
2
|
+
import {
|
3
|
+
defineCommands,
|
4
|
+
defineKeymap,
|
5
|
+
defineMarkSpec,
|
6
|
+
union,
|
7
|
+
toggleMark
|
8
|
+
} from "@prosekit/core";
|
9
|
+
function defineUnderlineSpec() {
|
10
|
+
return defineMarkSpec({
|
11
|
+
name: "underline",
|
12
|
+
parseDOM: [
|
13
|
+
{ tag: "u" },
|
14
|
+
{ tag: "underline" },
|
15
|
+
{ style: "text-decoration=underline" },
|
16
|
+
{ style: "text-decoration-line=underline" }
|
17
|
+
],
|
18
|
+
toDOM() {
|
19
|
+
return ["u", 0];
|
20
|
+
}
|
21
|
+
});
|
22
|
+
}
|
23
|
+
function defineUnderlineCommands() {
|
24
|
+
return defineCommands({
|
25
|
+
toggleUnderline: () => toggleMark({ type: "underline" })
|
26
|
+
});
|
27
|
+
}
|
28
|
+
function defineUnderlineKeymap() {
|
29
|
+
return defineKeymap({
|
30
|
+
"Mod-u": toggleMark({ type: "underline" })
|
31
|
+
});
|
32
|
+
}
|
33
|
+
function defineUnderline() {
|
34
|
+
return union([
|
35
|
+
defineUnderlineSpec(),
|
36
|
+
defineUnderlineCommands(),
|
37
|
+
defineUnderlineKeymap()
|
38
|
+
]);
|
39
|
+
}
|
40
|
+
export {
|
41
|
+
defineUnderline,
|
42
|
+
defineUnderlineCommands,
|
43
|
+
defineUnderlineKeymap,
|
44
|
+
defineUnderlineSpec
|
45
|
+
};
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export { }
|
1
|
+
export {};
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/extensions",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.0-next-
|
4
|
+
"version": "0.0.0-next-20231120040948",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -30,6 +30,11 @@
|
|
30
30
|
"import": "./dist/prosekit-extensions.js",
|
31
31
|
"default": "./dist/prosekit-extensions.js"
|
32
32
|
},
|
33
|
+
"./autocomplete": {
|
34
|
+
"types": "./dist/prosekit-extensions-autocomplete.d.ts",
|
35
|
+
"import": "./dist/prosekit-extensions-autocomplete.js",
|
36
|
+
"default": "./dist/prosekit-extensions-autocomplete.js"
|
37
|
+
},
|
33
38
|
"./blockquote": {
|
34
39
|
"types": "./dist/prosekit-extensions-blockquote.d.ts",
|
35
40
|
"import": "./dist/prosekit-extensions-blockquote.js",
|
@@ -45,16 +50,31 @@
|
|
45
50
|
"import": "./dist/prosekit-extensions-code.js",
|
46
51
|
"default": "./dist/prosekit-extensions-code.js"
|
47
52
|
},
|
53
|
+
"./code-block": {
|
54
|
+
"types": "./dist/prosekit-extensions-code-block.d.ts",
|
55
|
+
"import": "./dist/prosekit-extensions-code-block.js",
|
56
|
+
"default": "./dist/prosekit-extensions-code-block.js"
|
57
|
+
},
|
48
58
|
"./heading": {
|
49
59
|
"types": "./dist/prosekit-extensions-heading.d.ts",
|
50
60
|
"import": "./dist/prosekit-extensions-heading.js",
|
51
61
|
"default": "./dist/prosekit-extensions-heading.js"
|
52
62
|
},
|
63
|
+
"./image": {
|
64
|
+
"types": "./dist/prosekit-extensions-image.d.ts",
|
65
|
+
"import": "./dist/prosekit-extensions-image.js",
|
66
|
+
"default": "./dist/prosekit-extensions-image.js"
|
67
|
+
},
|
53
68
|
"./italic": {
|
54
69
|
"types": "./dist/prosekit-extensions-italic.d.ts",
|
55
70
|
"import": "./dist/prosekit-extensions-italic.js",
|
56
71
|
"default": "./dist/prosekit-extensions-italic.js"
|
57
72
|
},
|
73
|
+
"./link": {
|
74
|
+
"types": "./dist/prosekit-extensions-link.d.ts",
|
75
|
+
"import": "./dist/prosekit-extensions-link.js",
|
76
|
+
"default": "./dist/prosekit-extensions-link.js"
|
77
|
+
},
|
58
78
|
"./list": {
|
59
79
|
"types": "./dist/prosekit-extensions-list.d.ts",
|
60
80
|
"import": "./dist/prosekit-extensions-list.js",
|
@@ -63,6 +83,11 @@
|
|
63
83
|
"./list/style.css": {
|
64
84
|
"default": "./dist/list/style.css"
|
65
85
|
},
|
86
|
+
"./mention": {
|
87
|
+
"types": "./dist/prosekit-extensions-mention.d.ts",
|
88
|
+
"import": "./dist/prosekit-extensions-mention.js",
|
89
|
+
"default": "./dist/prosekit-extensions-mention.js"
|
90
|
+
},
|
66
91
|
"./placeholder": {
|
67
92
|
"types": "./dist/prosekit-extensions-placeholder.d.ts",
|
68
93
|
"import": "./dist/prosekit-extensions-placeholder.js",
|
@@ -71,25 +96,37 @@
|
|
71
96
|
"./placeholder/style.css": {
|
72
97
|
"default": "./dist/placeholder/style.css"
|
73
98
|
},
|
99
|
+
"./strike": {
|
100
|
+
"types": "./dist/prosekit-extensions-strike.d.ts",
|
101
|
+
"import": "./dist/prosekit-extensions-strike.js",
|
102
|
+
"default": "./dist/prosekit-extensions-strike.js"
|
103
|
+
},
|
74
104
|
"./suggestion": {
|
75
105
|
"types": "./dist/prosekit-extensions-suggestion.d.ts",
|
76
106
|
"import": "./dist/prosekit-extensions-suggestion.js",
|
77
107
|
"default": "./dist/prosekit-extensions-suggestion.js"
|
108
|
+
},
|
109
|
+
"./underline": {
|
110
|
+
"types": "./dist/prosekit-extensions-underline.d.ts",
|
111
|
+
"import": "./dist/prosekit-extensions-underline.js",
|
112
|
+
"default": "./dist/prosekit-extensions-underline.js"
|
78
113
|
}
|
79
114
|
},
|
80
115
|
"files": [
|
81
116
|
"dist"
|
82
117
|
],
|
83
118
|
"dependencies": {
|
84
|
-
"@prosekit/core": "0.0.0-next-
|
85
|
-
"@prosekit/pm": "0.0.0-next-
|
86
|
-
"
|
119
|
+
"@prosekit/core": "0.0.0-next-20231120040948",
|
120
|
+
"@prosekit/pm": "0.0.0-next-20231120040948",
|
121
|
+
"highlight.js": "^11.9.0",
|
122
|
+
"prosemirror-flat-list": "^0.4.3",
|
123
|
+
"prosemirror-highlightjs": "^0.9.1"
|
87
124
|
},
|
88
125
|
"devDependencies": {
|
89
126
|
"@prosekit/dev": "*",
|
90
|
-
"tsup": "^
|
91
|
-
"typescript": "^5.
|
92
|
-
"vitest": "^0.
|
127
|
+
"tsup": "^8.0.0",
|
128
|
+
"typescript": "^5.2.2",
|
129
|
+
"vitest": "^0.34.6"
|
93
130
|
},
|
94
131
|
"scripts": {
|
95
132
|
"build:tsup": "tsup",
|
@@ -101,6 +138,9 @@
|
|
101
138
|
".": [
|
102
139
|
"./dist/prosekit-extensions.d.ts"
|
103
140
|
],
|
141
|
+
"autocomplete": [
|
142
|
+
"./dist/prosekit-extensions-autocomplete.d.ts"
|
143
|
+
],
|
104
144
|
"blockquote": [
|
105
145
|
"./dist/prosekit-extensions-blockquote.d.ts"
|
106
146
|
],
|
@@ -110,20 +150,38 @@
|
|
110
150
|
"code": [
|
111
151
|
"./dist/prosekit-extensions-code.d.ts"
|
112
152
|
],
|
153
|
+
"code-block": [
|
154
|
+
"./dist/prosekit-extensions-code-block.d.ts"
|
155
|
+
],
|
113
156
|
"heading": [
|
114
157
|
"./dist/prosekit-extensions-heading.d.ts"
|
115
158
|
],
|
159
|
+
"image": [
|
160
|
+
"./dist/prosekit-extensions-image.d.ts"
|
161
|
+
],
|
116
162
|
"italic": [
|
117
163
|
"./dist/prosekit-extensions-italic.d.ts"
|
118
164
|
],
|
165
|
+
"link": [
|
166
|
+
"./dist/prosekit-extensions-link.d.ts"
|
167
|
+
],
|
119
168
|
"list": [
|
120
169
|
"./dist/prosekit-extensions-list.d.ts"
|
121
170
|
],
|
171
|
+
"mention": [
|
172
|
+
"./dist/prosekit-extensions-mention.d.ts"
|
173
|
+
],
|
122
174
|
"placeholder": [
|
123
175
|
"./dist/prosekit-extensions-placeholder.d.ts"
|
124
176
|
],
|
177
|
+
"strike": [
|
178
|
+
"./dist/prosekit-extensions-strike.d.ts"
|
179
|
+
],
|
125
180
|
"suggestion": [
|
126
181
|
"./dist/prosekit-extensions-suggestion.d.ts"
|
182
|
+
],
|
183
|
+
"underline": [
|
184
|
+
"./dist/prosekit-extensions-underline.d.ts"
|
127
185
|
]
|
128
186
|
}
|
129
187
|
}
|