@prosekit/extensions 0.11.5 → 0.11.6
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-E7nCfdnR.js +58 -0
- package/dist/drop-indicator-E7nCfdnR.js.map +1 -0
- package/dist/file-DVUhe5KJ.js +134 -0
- package/dist/file-DVUhe5KJ.js.map +1 -0
- package/dist/index-DY6lIIYV.d.ts +134 -0
- package/dist/index-DY6lIIYV.d.ts.map +1 -0
- package/dist/{mark-rule-BCqIZMDu.js → mark-rule-CGmswjQ_.js} +1 -1
- package/dist/{mark-rule-BCqIZMDu.js.map → mark-rule-CGmswjQ_.js.map} +1 -1
- package/dist/{paste-rule-DIEJKIje.js → paste-rule-BIztzELg.js} +1 -1
- package/dist/{paste-rule-DIEJKIje.js.map → paste-rule-BIztzELg.js.map} +1 -1
- package/dist/prosekit-extensions-code-block.d.ts +1 -1
- package/dist/prosekit-extensions-drop-indicator.d.ts +3 -106
- package/dist/prosekit-extensions-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-extensions-drop-indicator.js +1 -1
- package/dist/prosekit-extensions-file.d.ts +2 -126
- package/dist/prosekit-extensions-file.js +2 -128
- package/dist/prosekit-extensions-hard-break.d.ts +0 -4
- package/dist/prosekit-extensions-hard-break.d.ts.map +1 -1
- package/dist/prosekit-extensions-image.d.ts +79 -3
- package/dist/prosekit-extensions-image.d.ts.map +1 -1
- package/dist/prosekit-extensions-image.js +88 -8
- package/dist/prosekit-extensions-image.js.map +1 -1
- package/dist/prosekit-extensions-link.js +2 -2
- package/dist/prosekit-extensions-list.js +2 -2
- package/dist/prosekit-extensions-mark-rule.js +1 -1
- package/dist/prosekit-extensions-paragraph.d.ts +0 -4
- package/dist/prosekit-extensions-paragraph.d.ts.map +1 -1
- package/dist/prosekit-extensions-paste-rule.js +1 -1
- package/dist/prosekit-extensions-placeholder.js +2 -2
- package/dist/prosekit-extensions-table.js +2 -2
- package/dist/prosekit-extensions.d.ts +1 -1
- package/dist/{shiki-highlighter-chunk-DSPM0T27.d.ts → shiki-highlighter-chunk-Cwu1Jr9o.d.ts} +1 -1
- package/dist/{shiki-highlighter-chunk-DSPM0T27.d.ts.map → shiki-highlighter-chunk-Cwu1Jr9o.d.ts.map} +1 -1
- package/dist/shiki-highlighter-chunk.d.ts +1 -1
- package/dist/{table-Bi7WsMI3.js → table-BNwuK7xg.js} +2 -2
- package/dist/{table-Bi7WsMI3.js.map → table-BNwuK7xg.js.map} +1 -1
- package/package.json +7 -6
- package/src/drop-indicator/drop-indicator-facet.ts +6 -28
- package/src/drop-indicator/drop-indicator.ts +3 -5
- package/src/drop-indicator/index.ts +6 -6
- package/src/file/file-upload.ts +29 -8
- package/src/image/image-commands.ts +12 -3
- package/src/image/image-upload-handler.ts +156 -0
- package/src/image/index.ts +9 -0
- package/dist/drop-indicator-D1eHOhSi.js +0 -267
- package/dist/drop-indicator-D1eHOhSi.js.map +0 -1
- package/dist/prosekit-extensions-file.d.ts.map +0 -1
- package/dist/prosekit-extensions-file.js.map +0 -1
- package/src/drop-indicator/drop-indicator-plugin.ts +0 -147
- package/src/drop-indicator/drop-target.ts +0 -168
- package/src/drop-indicator/types.ts +0 -90
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import type { Slice } from '@prosekit/pm/model'
|
|
2
|
-
import type { NodeSelection } from '@prosekit/pm/state'
|
|
3
|
-
import type { EditorView } from '@prosekit/pm/view'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* A function that will be called when the `dragover` event is fired. You can
|
|
7
|
-
* return `false` to disable the current drop point and thus hide the drop
|
|
8
|
-
* indicator.
|
|
9
|
-
*
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export type DragEventHandler = (options: DragEventHandlerOptions) => boolean
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Options for {@link DragEventHandler}.
|
|
16
|
-
*
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
export interface DragEventHandlerOptions {
|
|
20
|
-
/**
|
|
21
|
-
* The editor's view.
|
|
22
|
-
*/
|
|
23
|
-
view: EditorView
|
|
24
|
-
/**
|
|
25
|
-
* The drop position in current document.
|
|
26
|
-
*/
|
|
27
|
-
pos: number
|
|
28
|
-
/**
|
|
29
|
-
* The `dragover` event.
|
|
30
|
-
*/
|
|
31
|
-
event: DragEvent
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* A function that will be called when the drop indicator should be shown.
|
|
36
|
-
*
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
export type ShowHandler = (options: ShowHandlerOptions) => void
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Options for {@link ShowHandler}.
|
|
43
|
-
*
|
|
44
|
-
* @public
|
|
45
|
-
*/
|
|
46
|
-
export interface ShowHandlerOptions {
|
|
47
|
-
/**
|
|
48
|
-
* The editor's view.
|
|
49
|
-
*/
|
|
50
|
-
view: EditorView
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* The ProseMirror position that the drop indicator should be shown at.
|
|
54
|
-
*/
|
|
55
|
-
pos: number
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* The line that the drop indicator should be shown at.
|
|
59
|
-
*/
|
|
60
|
-
line: Line
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
66
|
-
export interface Point {
|
|
67
|
-
readonly x: number
|
|
68
|
-
readonly y: number
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @internal
|
|
73
|
-
*/
|
|
74
|
-
export interface Line {
|
|
75
|
-
readonly p1: Point
|
|
76
|
-
readonly p2: Point
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* An interface matching the internal ProseMirror implementation.
|
|
81
|
-
*
|
|
82
|
-
* See https://github.com/ProseMirror/prosemirror-view/blob/1.38.1/src/input.ts#L657
|
|
83
|
-
*
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
export interface ViewDragging {
|
|
87
|
-
readonly slice: Slice
|
|
88
|
-
readonly move: boolean
|
|
89
|
-
readonly node?: NodeSelection
|
|
90
|
-
}
|