@prosekit/extensions 0.11.0 → 0.11.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/{drop-indicator-CCCaHFvw.js → drop-indicator-B8P652g2.js} +30 -3
- package/dist/prosekit-extensions-autocomplete.d.ts +47 -47
- package/dist/prosekit-extensions-blockquote.d.ts +11 -11
- package/dist/prosekit-extensions-bold.d.ts +16 -16
- package/dist/prosekit-extensions-code-block.d.ts +82 -82
- package/dist/prosekit-extensions-code.d.ts +16 -16
- package/dist/prosekit-extensions-commit.d.ts +20 -20
- package/dist/prosekit-extensions-doc.d.ts +4 -4
- package/dist/prosekit-extensions-drop-cursor.d.ts +20 -20
- package/dist/prosekit-extensions-drop-indicator.d.ts +77 -63
- package/dist/prosekit-extensions-drop-indicator.js +1 -1
- package/dist/prosekit-extensions-enter-rule.d.ts +57 -57
- package/dist/prosekit-extensions-file.d.ts +54 -54
- package/dist/prosekit-extensions-gap-cursor.d.ts +15 -15
- package/dist/prosekit-extensions-hard-break.d.ts +16 -16
- package/dist/prosekit-extensions-heading.d.ts +19 -19
- package/dist/prosekit-extensions-horizontal-rule.d.ts +6 -6
- package/dist/prosekit-extensions-image.d.ts +14 -14
- package/dist/prosekit-extensions-input-rule.d.ts +70 -70
- package/dist/prosekit-extensions-italic.d.ts +16 -16
- package/dist/prosekit-extensions-link.d.ts +24 -24
- package/dist/prosekit-extensions-list.d.ts +38 -38
- package/dist/prosekit-extensions-list.js +1 -1
- package/dist/prosekit-extensions-loro.d.ts +19 -19
- package/dist/prosekit-extensions-mark-rule.d.ts +17 -17
- package/dist/prosekit-extensions-mention.d.ts +10 -10
- package/dist/prosekit-extensions-mod-click-prevention.d.ts +7 -7
- package/dist/prosekit-extensions-paragraph.d.ts +23 -23
- package/dist/prosekit-extensions-placeholder.d.ts +20 -20
- package/dist/prosekit-extensions-readonly.d.ts +2 -2
- package/dist/prosekit-extensions-search.d.ts +36 -36
- package/dist/prosekit-extensions-strike.d.ts +16 -16
- package/dist/prosekit-extensions-table.d.ts +134 -134
- package/dist/prosekit-extensions-text-align.d.ts +29 -29
- package/dist/prosekit-extensions-text.d.ts +4 -4
- package/dist/prosekit-extensions-underline.d.ts +14 -14
- package/dist/prosekit-extensions-virtual-selection.d.ts +11 -11
- package/dist/prosekit-extensions-virtual-selection.js +1 -1
- package/dist/prosekit-extensions-yjs.d.ts +27 -27
- package/dist/{shiki-highlighter-chunk-NV2F_Qjl.d.ts → shiki-highlighter-chunk-D7gKY7Kr.d.ts} +1 -1
- package/dist/shiki-highlighter-chunk.d.ts +1 -1
- package/package.json +8 -8
|
@@ -4,40 +4,40 @@ import { Attrs } from "@prosekit/pm/model";
|
|
|
4
4
|
//#region src/underline/index.d.ts
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
9
|
type UnderlineSpecExtension = Extension<{
|
|
10
10
|
Marks: {
|
|
11
11
|
underline: Attrs;
|
|
12
12
|
};
|
|
13
13
|
}>;
|
|
14
14
|
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
17
|
declare function defineUnderlineSpec(): UnderlineSpecExtension;
|
|
18
18
|
/**
|
|
19
|
-
* @internal
|
|
20
|
-
*/
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
21
|
type UnderlineCommandsExtension = Extension<{
|
|
22
22
|
Commands: {
|
|
23
23
|
toggleUnderline: [];
|
|
24
24
|
};
|
|
25
25
|
}>;
|
|
26
26
|
/**
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
29
|
declare function defineUnderlineCommands(): UnderlineCommandsExtension;
|
|
30
30
|
/**
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
33
|
declare function defineUnderlineKeymap(): PlainExtension;
|
|
34
34
|
/**
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
37
|
type UnderlineExtension = Union<[UnderlineSpecExtension, UnderlineCommandsExtension]>;
|
|
38
38
|
/**
|
|
39
|
-
* @public
|
|
40
|
-
*/
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
41
|
declare function defineUnderline(): UnderlineExtension;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { UnderlineCommandsExtension, UnderlineExtension, UnderlineSpecExtension, defineUnderline, defineUnderlineCommands, defineUnderlineKeymap, defineUnderlineSpec };
|
|
@@ -3,19 +3,19 @@ import { PlainExtension } from "@prosekit/core";
|
|
|
3
3
|
//#region src/virtual-selection/index.d.ts
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
8
|
type VirtualSelectionExtension = PlainExtension;
|
|
9
9
|
/**
|
|
10
|
-
* Shows a virtual selection when the editor is not focused. When the editor is
|
|
11
|
-
* not focused, the selected inline content will be wrapped in a `<span>`
|
|
12
|
-
* element with the class `prosekit-virtual-selection`.
|
|
13
|
-
*
|
|
14
|
-
* This is useful when you want to move the focus to an element outside the
|
|
15
|
-
* editor, but still want to show the selection.
|
|
16
|
-
*
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
10
|
+
* Shows a virtual selection when the editor is not focused. When the editor is
|
|
11
|
+
* not focused, the selected inline content will be wrapped in a `<span>`
|
|
12
|
+
* element with the class `prosekit-virtual-selection`.
|
|
13
|
+
*
|
|
14
|
+
* This is useful when you want to move the focus to an element outside the
|
|
15
|
+
* editor, but still want to show the selection.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
19
|
declare function defineVirtualSelection(): VirtualSelectionExtension;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { VirtualSelectionExtension, defineVirtualSelection };
|
|
@@ -48,7 +48,7 @@ const virtualSelectionPlugin = new ProseMirrorPlugin({
|
|
|
48
48
|
},
|
|
49
49
|
decorations: (state) => {
|
|
50
50
|
const { selection, doc } = state;
|
|
51
|
-
if (selection.empty || !getFocusState(state)) return null;
|
|
51
|
+
if (selection.empty || !getFocusState(state) || !selection.visible) return null;
|
|
52
52
|
return DecorationSet.create(doc, [Decoration.inline(selection.from, selection.to, { class: "prosekit-virtual-selection" })]);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -5,8 +5,8 @@ import * as Y from "yjs";
|
|
|
5
5
|
|
|
6
6
|
//#region src/yjs/yjs-commands.d.ts
|
|
7
7
|
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
10
|
type YjsCommandsExtension = Extension<{
|
|
11
11
|
Commands: {
|
|
12
12
|
undo: [];
|
|
@@ -17,8 +17,8 @@ declare function defineYjsCommands(): YjsCommandsExtension;
|
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/yjs/yjs-cursor-plugin.d.ts
|
|
19
19
|
/**
|
|
20
|
-
* Options for `y-prosemirror`'s `yCursorPlugin`.
|
|
21
|
-
*/
|
|
20
|
+
* Options for `y-prosemirror`'s `yCursorPlugin`.
|
|
21
|
+
*/
|
|
22
22
|
type YjsCursorPluginOptions = NonNullable<Parameters<typeof yCursorPlugin>[1]>;
|
|
23
23
|
interface YjsCursorOptions extends YjsCursorPluginOptions {
|
|
24
24
|
awareness: Awareness;
|
|
@@ -27,8 +27,8 @@ declare function defineYjsCursorPlugin(options: YjsCursorOptions): PlainExtensio
|
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/yjs/yjs-sync-plugin.d.ts
|
|
29
29
|
/**
|
|
30
|
-
* Options for `y-prosemirror`'s `ySyncPlugin`.
|
|
31
|
-
*/
|
|
30
|
+
* Options for `y-prosemirror`'s `ySyncPlugin`.
|
|
31
|
+
*/
|
|
32
32
|
type YjsSyncPluginOptions = NonNullable<Parameters<typeof ySyncPlugin>[1]>;
|
|
33
33
|
interface YjsSyncOptions extends YjsSyncPluginOptions {
|
|
34
34
|
fragment: Y.XmlFragment;
|
|
@@ -37,50 +37,50 @@ declare function defineYjsSyncPlugin(options: YjsSyncOptions): PlainExtension;
|
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/yjs/yjs-undo-plugin.d.ts
|
|
39
39
|
/**
|
|
40
|
-
* Options for the `y-prosemirror`'s `yUndoPlugin`.
|
|
41
|
-
*/
|
|
40
|
+
* Options for the `y-prosemirror`'s `yUndoPlugin`.
|
|
41
|
+
*/
|
|
42
42
|
type YjsUndoPluginOptions = NonNullable<Parameters<typeof yUndoPlugin>[0]>;
|
|
43
43
|
interface YjsUndoOptions extends YjsUndoPluginOptions {}
|
|
44
44
|
/**
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
47
|
declare function defineYjsUndoPlugin(options: YjsUndoOptions): PlainExtension;
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region src/yjs/yjs.d.ts
|
|
50
50
|
interface YjsOptions {
|
|
51
51
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
* The Yjs instance handles the state of shared data.
|
|
53
|
+
*/
|
|
54
54
|
doc: Y.Doc;
|
|
55
55
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
* The Awareness instance.
|
|
57
|
+
*/
|
|
58
58
|
awareness: Awareness;
|
|
59
59
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
* The Yjs XmlFragment to use. If not provided,
|
|
61
|
+
* `doc.getXmlFragment('prosemirror')` will be used.
|
|
62
|
+
*/
|
|
63
63
|
fragment?: Y.XmlFragment;
|
|
64
64
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
* Options for `y-prosemirror`'s `ySyncPlugin`.
|
|
66
|
+
*/
|
|
67
67
|
sync?: YjsSyncPluginOptions;
|
|
68
68
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
* Options for the `y-prosemirror`'s `yUndoPlugin`.
|
|
70
|
+
*/
|
|
71
71
|
undo?: YjsUndoPluginOptions;
|
|
72
72
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
* Options for `y-prosemirror`'s `yCursorPlugin`.
|
|
74
|
+
*/
|
|
75
75
|
cursor?: YjsCursorPluginOptions;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* @internal
|
|
79
|
-
*/
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
80
|
type YjsExtension = Union<[YjsCommandsExtension, PlainExtension]>;
|
|
81
81
|
/**
|
|
82
|
-
* @public
|
|
83
|
-
*/
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
84
|
declare function defineYjs(options: YjsOptions): YjsExtension;
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region src/yjs/yjs-keymap.d.ts
|
package/dist/{shiki-highlighter-chunk-NV2F_Qjl.d.ts → shiki-highlighter-chunk-D7gKY7Kr.d.ts}
RENAMED
|
@@ -2,7 +2,7 @@ import { BundledHighlighterOptions, BundledLanguage, BundledTheme, Highlighter,
|
|
|
2
2
|
|
|
3
3
|
//#region src/code-block/shiki-highlighter-chunk.d.ts
|
|
4
4
|
interface ShikiHighlighterOptions extends BundledHighlighterOptions<BundledLanguage, BundledTheme> {}
|
|
5
|
-
interface HighlighterOptions extends Omit<ShikiHighlighterOptions,
|
|
5
|
+
interface HighlighterOptions extends Omit<ShikiHighlighterOptions, 'langs' | 'themes'> {
|
|
6
6
|
themes: BundledTheme[];
|
|
7
7
|
langs: (BundledLanguage | SpecialLanguage)[];
|
|
8
8
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HighlighterOptions, HighlighterResult, ShikiHighlighterOptions, createOrGetHighlighter } from "./shiki-highlighter-chunk-
|
|
1
|
+
import { HighlighterOptions, HighlighterResult, ShikiHighlighterOptions, createOrGetHighlighter } from "./shiki-highlighter-chunk-D7gKY7Kr.js";
|
|
2
2
|
export { HighlighterOptions, HighlighterResult, ShikiHighlighterOptions, createOrGetHighlighter };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosekit/extensions",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "A collection of common extensions for ProseKit",
|
|
7
7
|
"author": {
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"funding": "https://github.com/sponsors/ocavue",
|
|
13
|
-
"homepage": "https://github.com/
|
|
13
|
+
"homepage": "https://github.com/prosekit/prosekit#readme",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/
|
|
16
|
+
"url": "git+https://github.com/prosekit/prosekit.git",
|
|
17
17
|
"directory": "packages/extensions"
|
|
18
18
|
},
|
|
19
19
|
"bugs": {
|
|
20
|
-
"url": "https://github.com/
|
|
20
|
+
"url": "https://github.com/prosekit/prosekit/issues"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"ProseMirror"
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"dist"
|
|
203
203
|
],
|
|
204
204
|
"dependencies": {
|
|
205
|
-
"@ocavue/utils": "^0.
|
|
205
|
+
"@ocavue/utils": "^0.7.1",
|
|
206
206
|
"prosemirror-changeset": "^2.3.1",
|
|
207
207
|
"prosemirror-dropcursor": "^1.8.2",
|
|
208
208
|
"prosemirror-flat-list": "^0.5.5",
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
"remark-html": "^16.0.1",
|
|
247
247
|
"remark-parse": "^11.0.0",
|
|
248
248
|
"remark-stringify": "^11.0.0",
|
|
249
|
-
"tsdown": "^0.13.
|
|
249
|
+
"tsdown": "^0.13.2",
|
|
250
250
|
"type-fest": "^4.41.0",
|
|
251
251
|
"typescript": "~5.8.3",
|
|
252
252
|
"unified": "^11.0.5",
|
|
@@ -254,8 +254,8 @@
|
|
|
254
254
|
"y-prosemirror": "^1.3.7",
|
|
255
255
|
"y-protocols": "^1.0.6",
|
|
256
256
|
"yjs": "^13.6.27",
|
|
257
|
-
"@prosekit/config-
|
|
258
|
-
"@prosekit/config-
|
|
257
|
+
"@prosekit/config-tsdown": "0.0.0",
|
|
258
|
+
"@prosekit/config-vitest": "0.0.0"
|
|
259
259
|
},
|
|
260
260
|
"publishConfig": {
|
|
261
261
|
"dev": {}
|