Skip to content

Commit d209025

Browse files
authored
refactor: 💡 migrate to prosemirror-drop-indicator package (#2111)
1 parent fb42e7a commit d209025

File tree

7 files changed

+26
-398
lines changed

7 files changed

+26
-398
lines changed

packages/plugins/plugin-cursor/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"dependencies": {
4040
"@milkdown/ctx": "workspace:*",
4141
"@milkdown/prose": "workspace:*",
42-
"@milkdown/utils": "workspace:*"
42+
"@milkdown/utils": "workspace:*",
43+
"prosemirror-drop-indicator": "^0.1.0"
4344
}
4445
}

packages/plugins/plugin-cursor/src/drop-indicator/drop-indicator-plugin.ts

Lines changed: 0 additions & 158 deletions
This file was deleted.

packages/plugins/plugin-cursor/src/drop-indicator/drop-target.ts

Lines changed: 0 additions & 180 deletions
This file was deleted.

packages/plugins/plugin-cursor/src/drop-indicator/plugin.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { $prose } from '@milkdown/utils'
2-
3-
import type { ShowHandler } from './types'
2+
import {
3+
createDropIndicatorPlugin,
4+
type ShowHandler,
5+
} from 'prosemirror-drop-indicator'
46

57
import { withMeta } from '../__internal__/with-meta'
6-
import { createDropIndicatorPlugin } from './drop-indicator-plugin'
78
import { dropIndicatorState } from './state'
89

910
/// Drop indicator plugin to update the drop indicator state.

packages/plugins/plugin-cursor/src/drop-indicator/state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { $ctx } from '@milkdown/utils'
1+
import type { ShowHandlerOptions } from 'prosemirror-drop-indicator'
22

3-
import type { ShowHandlerOptions } from './types'
3+
import { $ctx } from '@milkdown/utils'
44

55
import { withMeta } from '../__internal__/with-meta'
66

0 commit comments

Comments
 (0)