@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.
Files changed (51) hide show
  1. package/dist/drop-indicator-E7nCfdnR.js +58 -0
  2. package/dist/drop-indicator-E7nCfdnR.js.map +1 -0
  3. package/dist/file-DVUhe5KJ.js +134 -0
  4. package/dist/file-DVUhe5KJ.js.map +1 -0
  5. package/dist/index-DY6lIIYV.d.ts +134 -0
  6. package/dist/index-DY6lIIYV.d.ts.map +1 -0
  7. package/dist/{mark-rule-BCqIZMDu.js → mark-rule-CGmswjQ_.js} +1 -1
  8. package/dist/{mark-rule-BCqIZMDu.js.map → mark-rule-CGmswjQ_.js.map} +1 -1
  9. package/dist/{paste-rule-DIEJKIje.js → paste-rule-BIztzELg.js} +1 -1
  10. package/dist/{paste-rule-DIEJKIje.js.map → paste-rule-BIztzELg.js.map} +1 -1
  11. package/dist/prosekit-extensions-code-block.d.ts +1 -1
  12. package/dist/prosekit-extensions-drop-indicator.d.ts +3 -106
  13. package/dist/prosekit-extensions-drop-indicator.d.ts.map +1 -1
  14. package/dist/prosekit-extensions-drop-indicator.js +1 -1
  15. package/dist/prosekit-extensions-file.d.ts +2 -126
  16. package/dist/prosekit-extensions-file.js +2 -128
  17. package/dist/prosekit-extensions-hard-break.d.ts +0 -4
  18. package/dist/prosekit-extensions-hard-break.d.ts.map +1 -1
  19. package/dist/prosekit-extensions-image.d.ts +79 -3
  20. package/dist/prosekit-extensions-image.d.ts.map +1 -1
  21. package/dist/prosekit-extensions-image.js +88 -8
  22. package/dist/prosekit-extensions-image.js.map +1 -1
  23. package/dist/prosekit-extensions-link.js +2 -2
  24. package/dist/prosekit-extensions-list.js +2 -2
  25. package/dist/prosekit-extensions-mark-rule.js +1 -1
  26. package/dist/prosekit-extensions-paragraph.d.ts +0 -4
  27. package/dist/prosekit-extensions-paragraph.d.ts.map +1 -1
  28. package/dist/prosekit-extensions-paste-rule.js +1 -1
  29. package/dist/prosekit-extensions-placeholder.js +2 -2
  30. package/dist/prosekit-extensions-table.js +2 -2
  31. package/dist/prosekit-extensions.d.ts +1 -1
  32. package/dist/{shiki-highlighter-chunk-DSPM0T27.d.ts → shiki-highlighter-chunk-Cwu1Jr9o.d.ts} +1 -1
  33. package/dist/{shiki-highlighter-chunk-DSPM0T27.d.ts.map → shiki-highlighter-chunk-Cwu1Jr9o.d.ts.map} +1 -1
  34. package/dist/shiki-highlighter-chunk.d.ts +1 -1
  35. package/dist/{table-Bi7WsMI3.js → table-BNwuK7xg.js} +2 -2
  36. package/dist/{table-Bi7WsMI3.js.map → table-BNwuK7xg.js.map} +1 -1
  37. package/package.json +7 -6
  38. package/src/drop-indicator/drop-indicator-facet.ts +6 -28
  39. package/src/drop-indicator/drop-indicator.ts +3 -5
  40. package/src/drop-indicator/index.ts +6 -6
  41. package/src/file/file-upload.ts +29 -8
  42. package/src/image/image-commands.ts +12 -3
  43. package/src/image/image-upload-handler.ts +156 -0
  44. package/src/image/index.ts +9 -0
  45. package/dist/drop-indicator-D1eHOhSi.js +0 -267
  46. package/dist/drop-indicator-D1eHOhSi.js.map +0 -1
  47. package/dist/prosekit-extensions-file.d.ts.map +0 -1
  48. package/dist/prosekit-extensions-file.js.map +0 -1
  49. package/src/drop-indicator/drop-indicator-plugin.ts +0 -147
  50. package/src/drop-indicator/drop-target.ts +0 -168
  51. 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
- }