@prosekit/web 0.7.8 → 0.7.10
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/{get-default-state-Bqluw34o.js → get-default-state-BzBimBWi.js} +1 -1
- package/dist/get-default-state-BzBimBWi.js.map +1 -0
- package/dist/{get-safe-editor-view-DJlcheeV.js → get-safe-editor-view-Dt9Amrcn.js} +1 -1
- package/dist/{get-safe-editor-view-DJlcheeV.js.map → get-safe-editor-view-Dt9Amrcn.js.map} +1 -1
- package/dist/{inject-style-DYQXx-cE.js → inject-style-BaFaVQvj.js} +7 -7
- package/dist/inject-style-BaFaVQvj.js.map +1 -0
- package/dist/prosekit-web-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-web-autocomplete.js +3 -3
- package/dist/prosekit-web-autocomplete.js.map +1 -1
- package/dist/prosekit-web-block-handle.d.ts.map +1 -1
- package/dist/prosekit-web-block-handle.js +4 -4
- package/dist/prosekit-web-block-handle.js.map +1 -1
- package/dist/prosekit-web-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-web-drop-indicator.js +2 -2
- package/dist/prosekit-web-drop-indicator.js.map +1 -1
- package/dist/prosekit-web-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-web-inline-popover.js +1 -1
- package/dist/prosekit-web-inline-popover.js.map +1 -1
- package/dist/prosekit-web-popover.d.ts.map +1 -1
- package/dist/prosekit-web-popover.js.map +1 -1
- package/dist/prosekit-web-resizable.d.ts.map +1 -1
- package/dist/prosekit-web-resizable.js.map +1 -1
- package/dist/prosekit-web-table-handle.d.ts.map +1 -1
- package/dist/prosekit-web-table-handle.js +25 -25
- package/dist/prosekit-web-table-handle.js.map +1 -1
- package/dist/prosekit-web-tooltip.d.ts.map +1 -1
- package/dist/prosekit-web-tooltip.js.map +1 -1
- package/dist/prosekit-web.d.ts +80 -1
- package/dist/prosekit-web.d.ts.map +1 -0
- package/dist/prosekit-web.js +95 -1
- package/dist/prosekit-web.js.map +1 -0
- package/dist/{use-editor-extension-B_5BbYvf.js → use-editor-extension-B2WuUfnd.js} +1 -1
- package/dist/use-editor-extension-B2WuUfnd.js.map +1 -0
- package/dist/{use-scrolling-BjI3cuLt.js → use-scrolling-BjVzAkiZ.js} +3 -1
- package/dist/use-scrolling-BjVzAkiZ.js.map +1 -0
- package/package.json +10 -10
- package/src/components/autocomplete/autocomplete-empty/types.ts +1 -4
- package/src/components/autocomplete/autocomplete-item/setup.ts +2 -10
- package/src/components/autocomplete/autocomplete-item/types.ts +2 -8
- package/src/components/autocomplete/autocomplete-list/setup.ts +5 -21
- package/src/components/autocomplete/autocomplete-list/types.ts +2 -10
- package/src/components/autocomplete/autocomplete-popover/helpers.spec.ts +1 -5
- package/src/components/autocomplete/autocomplete-popover/setup.ts +4 -20
- package/src/components/autocomplete/autocomplete-popover/types.ts +1 -4
- package/src/components/autocomplete/context.ts +1 -4
- package/src/components/block-handle/block-handle-add/setup.ts +1 -5
- package/src/components/block-handle/block-handle-add/types.ts +1 -4
- package/src/components/block-handle/block-handle-draggable/setup.ts +3 -18
- package/src/components/block-handle/block-handle-draggable/types.ts +1 -4
- package/src/components/block-handle/block-handle-popover/pointer-move.ts +2 -10
- package/src/components/block-handle/block-handle-popover/setup.ts +4 -22
- package/src/components/block-handle/block-handle-popover/types.ts +1 -4
- package/src/components/block-handle/context.ts +1 -4
- package/src/components/drop-indicator/drop-indicator/setup.ts +3 -15
- package/src/components/drop-indicator/drop-indicator/types.ts +1 -4
- package/src/components/inline-popover/inline-popover/setup.ts +1 -4
- package/src/components/inline-popover/inline-popover/types.ts +1 -4
- package/src/components/inline-popover/inline-popover/virtual-selection-element.ts +1 -5
- package/src/components/popover/popover-content/types.ts +2 -8
- package/src/components/popover/popover-root/types.ts +2 -8
- package/src/components/popover/popover-trigger/types.ts +2 -8
- package/src/components/resizable/context.ts +1 -4
- package/src/components/resizable/resizable-handle/calc-resize.spec.ts +1 -4
- package/src/components/resizable/resizable-handle/setup.ts +2 -15
- package/src/components/resizable/resizable-handle/types.ts +1 -4
- package/src/components/resizable/resizable-root/setup.ts +4 -20
- package/src/components/resizable/resizable-root/types.ts +1 -4
- package/src/components/table-handle/context.ts +2 -8
- package/src/components/table-handle/dnd.ts +11 -17
- package/src/components/table-handle/hooks/use-drop.ts +2 -11
- package/src/components/table-handle/table-handle-column-root/setup.ts +2 -13
- package/src/components/table-handle/table-handle-column-root/types.ts +1 -4
- package/src/components/table-handle/table-handle-column-trigger/setup.ts +3 -14
- package/src/components/table-handle/table-handle-column-trigger/types.ts +1 -4
- package/src/components/table-handle/table-handle-drag-preview/render-preview.ts +2 -5
- package/src/components/table-handle/table-handle-drag-preview/setup.ts +3 -13
- package/src/components/table-handle/table-handle-drag-preview/types.ts +1 -4
- package/src/components/table-handle/table-handle-drag-preview/updater.ts +3 -14
- package/src/components/table-handle/table-handle-drop-indicator/setup.ts +6 -10
- package/src/components/table-handle/table-handle-drop-indicator/types.ts +1 -4
- package/src/components/table-handle/table-handle-drop-indicator/updater.ts +5 -19
- package/src/components/table-handle/table-handle-popover-content/setup.ts +2 -9
- package/src/components/table-handle/table-handle-popover-content/types.ts +2 -10
- package/src/components/table-handle/table-handle-popover-item/setup.ts +2 -8
- package/src/components/table-handle/table-handle-popover-item/types.ts +2 -10
- package/src/components/table-handle/table-handle-root/setup.ts +2 -9
- package/src/components/table-handle/table-handle-root/types.ts +1 -4
- package/src/components/table-handle/table-handle-row-root/setup.ts +2 -9
- package/src/components/table-handle/table-handle-row-root/types.ts +2 -9
- package/src/components/table-handle/table-handle-row-trigger/setup.ts +3 -14
- package/src/components/table-handle/table-handle-row-trigger/types.ts +1 -4
- package/src/components/table-handle/utils.ts +1 -4
- package/src/components/tooltip/tooltip-content/types.ts +2 -8
- package/src/components/tooltip/tooltip-root/types.ts +2 -8
- package/src/components/tooltip/tooltip-trigger/types.ts +2 -8
- package/src/hooks/use-editor-extension.ts +2 -9
- package/src/hooks/use-editor-focus-event.ts +2 -9
- package/src/hooks/use-editor-typing.ts +2 -10
- package/src/hooks/use-editor-update-event.ts +2 -9
- package/src/hooks/use-first-rendering.ts +1 -6
- package/src/hooks/use-keymap.ts +2 -9
- package/src/hooks/use-scrolling.ts +3 -6
- package/src/hooks/use-selecting.ts +1 -5
- package/src/index.ts +1 -1
- package/src/queue-extension.ts +93 -0
- package/src/utils/get-default-state.spec.ts +2 -10
- package/src/utils/get-default-state.ts +1 -5
- package/dist/get-default-state-Bqluw34o.js.map +0 -1
- package/dist/inject-style-DYQXx-cE.js.map +0 -1
- package/dist/use-editor-extension-B_5BbYvf.js.map +0 -1
- package/dist/use-scrolling-BjI3cuLt.js.map +0 -1
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
useEffect,
|
|
4
|
-
type ConnectableElement,
|
|
5
|
-
type ReadonlySignal,
|
|
6
|
-
} from '@aria-ui/core'
|
|
7
|
-
import {
|
|
8
|
-
computePosition,
|
|
9
|
-
offset,
|
|
10
|
-
} from '@floating-ui/dom'
|
|
1
|
+
import { createComputed, useEffect, type ConnectableElement, type ReadonlySignal } from '@aria-ui/core'
|
|
2
|
+
import { computePosition, offset } from '@floating-ui/dom'
|
|
11
3
|
import { isHTMLElement } from '@ocavue/utils'
|
|
12
4
|
import type { Editor } from '@prosekit/core'
|
|
13
5
|
import type { EditorView } from '@prosekit/pm/view'
|
|
@@ -15,10 +7,7 @@ import type { EditorView } from '@prosekit/pm/view'
|
|
|
15
7
|
import { assignStyles } from '../../utils/assign-styles'
|
|
16
8
|
import { getSafeEditorView } from '../../utils/get-safe-editor-view'
|
|
17
9
|
|
|
18
|
-
import {
|
|
19
|
-
tableHandleDndContext,
|
|
20
|
-
tableHandleRootContext,
|
|
21
|
-
} from './context'
|
|
10
|
+
import { tableHandleDndContext, tableHandleRootContext } from './context'
|
|
22
11
|
|
|
23
12
|
export type OnInitParams = {
|
|
24
13
|
host: ConnectableElement
|
|
@@ -116,16 +105,21 @@ function getTableDOMByPos(view: EditorView, pos: number): HTMLTableElement | und
|
|
|
116
105
|
function getTargetFirstCellDOM(table: HTMLTableElement, index: number, direction: 'row' | 'col'): HTMLTableCellElement | undefined {
|
|
117
106
|
if (direction === 'row') {
|
|
118
107
|
const row = table.querySelectorAll('tr')[index]
|
|
119
|
-
const cell = row?.querySelector('td')
|
|
108
|
+
const cell = row?.querySelector<HTMLTableCellElement>('td, th')
|
|
120
109
|
return cell ?? undefined
|
|
121
110
|
} else {
|
|
122
111
|
const row = table.querySelector('tr')
|
|
123
|
-
const cell = row?.querySelectorAll('td')[index]
|
|
112
|
+
const cell = row?.querySelectorAll<HTMLTableCellElement>('td, th')[index]
|
|
124
113
|
return cell ?? undefined
|
|
125
114
|
}
|
|
126
115
|
}
|
|
127
116
|
|
|
128
|
-
export function getDndRelatedDOMs(
|
|
117
|
+
export function getDndRelatedDOMs(
|
|
118
|
+
view: EditorView,
|
|
119
|
+
cellPos: number | undefined,
|
|
120
|
+
draggingIndex: number,
|
|
121
|
+
direction: 'row' | 'col',
|
|
122
|
+
): { table: HTMLTableElement; cell: HTMLTableCellElement } | undefined {
|
|
129
123
|
if (cellPos == null) return
|
|
130
124
|
const table = getTableDOMByPos(view, cellPos)
|
|
131
125
|
if (!table) return
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createComputed,
|
|
3
|
-
useEffect,
|
|
4
|
-
type ConnectableElement,
|
|
5
|
-
type ReadonlySignal,
|
|
6
|
-
type Signal,
|
|
7
|
-
} from '@aria-ui/core'
|
|
1
|
+
import { createComputed, useEffect, type ConnectableElement, type ReadonlySignal, type Signal } from '@aria-ui/core'
|
|
8
2
|
import type { Editor } from '@prosekit/core'
|
|
9
|
-
import {
|
|
10
|
-
moveTableColumn,
|
|
11
|
-
moveTableRow,
|
|
12
|
-
} from '@prosekit/extensions/table'
|
|
3
|
+
import { moveTableColumn, moveTableRow } from '@prosekit/extensions/table'
|
|
13
4
|
|
|
14
5
|
import { getSafeEditorView } from '../../../utils/get-safe-editor-view'
|
|
15
6
|
import type { TableHandleDndContext } from '../context'
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
createSignal,
|
|
4
|
-
useAttribute,
|
|
5
|
-
useEffect,
|
|
6
|
-
type ConnectableElement,
|
|
7
|
-
type SignalState,
|
|
8
|
-
} from '@aria-ui/core'
|
|
9
|
-
import {
|
|
10
|
-
menuRootProps,
|
|
11
|
-
useMenuRoot,
|
|
12
|
-
type MenuRootProps,
|
|
13
|
-
} from '@aria-ui/menu/elements'
|
|
1
|
+
import { createComputed, createSignal, useAttribute, useEffect, type ConnectableElement, type SignalState } from '@aria-ui/core'
|
|
2
|
+
import { menuRootProps, useMenuRoot, type MenuRootProps } from '@aria-ui/menu/elements'
|
|
14
3
|
import { useOverlayPositionerState } from '@aria-ui/overlay/elements'
|
|
15
4
|
import { usePresence } from '@aria-ui/presence'
|
|
16
5
|
|
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useEffect,
|
|
3
|
-
useEventListener,
|
|
4
|
-
type ConnectableElement,
|
|
5
|
-
type SetupOptions,
|
|
6
|
-
} from '@aria-ui/core'
|
|
1
|
+
import { useEffect, useEventListener, type ConnectableElement, type SetupOptions } from '@aria-ui/core'
|
|
7
2
|
import { useMenuTrigger } from '@aria-ui/menu/elements'
|
|
8
3
|
import { selectTableColumn } from '@prosekit/extensions/table'
|
|
9
4
|
|
|
10
|
-
import {
|
|
11
|
-
tableHandleDndContext,
|
|
12
|
-
tableHandleRootContext,
|
|
13
|
-
} from '../context'
|
|
5
|
+
import { tableHandleDndContext, tableHandleRootContext } from '../context'
|
|
14
6
|
import { useEmptyImage } from '../hooks/use-empty-image'
|
|
15
7
|
|
|
16
|
-
import type {
|
|
17
|
-
TableHandleColumnTriggerEvents,
|
|
18
|
-
TableHandleColumnTriggerProps,
|
|
19
|
-
} from './types'
|
|
8
|
+
import type { TableHandleColumnTriggerEvents, TableHandleColumnTriggerProps } from './types'
|
|
20
9
|
|
|
21
10
|
/**
|
|
22
11
|
* @internal
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
EventDeclarations,
|
|
3
|
-
PropDeclarations,
|
|
4
|
-
} from '@aria-ui/core'
|
|
1
|
+
import type { EventDeclarations, PropDeclarations } from '@aria-ui/core'
|
|
5
2
|
import type { Editor } from '@prosekit/core'
|
|
6
3
|
import type { defineTableCommands } from '@prosekit/extensions/table'
|
|
7
4
|
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { assignStyles } from '../../../utils/assign-styles'
|
|
2
|
-
import {
|
|
3
|
-
cloneElement,
|
|
4
|
-
deepCloneElement,
|
|
5
|
-
} from '../../../utils/clone-element'
|
|
2
|
+
import { cloneElement, deepCloneElement } from '../../../utils/clone-element'
|
|
6
3
|
import { fadeColor } from '../../../utils/fade-color'
|
|
7
4
|
import { getEffectiveBackgroundColor } from '../../../utils/get-effective-background-color'
|
|
8
5
|
import { injectStyle } from '../../../utils/inject-style'
|
|
@@ -56,7 +53,7 @@ export function createPreviewDOM(
|
|
|
56
53
|
const [previewRow, previewRowStyle] = cloneElement(row)
|
|
57
54
|
injectStyle(previewRoot, previewRowStyle)
|
|
58
55
|
unsetSize(previewRow)
|
|
59
|
-
const cells = row.querySelectorAll('td')
|
|
56
|
+
const cells = row.querySelectorAll('td, th')
|
|
60
57
|
const cell = cells[index]
|
|
61
58
|
if (cell) {
|
|
62
59
|
const [previewCell, previewCellStyle] = deepCloneElement(cell)
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useEffect,
|
|
3
|
-
type ConnectableElement,
|
|
4
|
-
type SignalState,
|
|
5
|
-
} from '@aria-ui/core'
|
|
1
|
+
import { useEffect, type ConnectableElement, type SignalState } from '@aria-ui/core'
|
|
6
2
|
|
|
7
3
|
import { assignStyles } from '../../../utils/assign-styles'
|
|
8
|
-
import {
|
|
9
|
-
useInitDndPosition,
|
|
10
|
-
type OnInitParams,
|
|
11
|
-
} from '../dnd'
|
|
4
|
+
import { useInitDndPosition, type OnInitParams } from '../dnd'
|
|
12
5
|
|
|
13
|
-
import {
|
|
14
|
-
clearPreviewDOM,
|
|
15
|
-
createPreviewDOM,
|
|
16
|
-
} from './render-preview'
|
|
6
|
+
import { clearPreviewDOM, createPreviewDOM } from './render-preview'
|
|
17
7
|
import type { TableHandleDragPreviewProps } from './types'
|
|
18
8
|
import { useUpdatePreviewPosition } from './updater'
|
|
19
9
|
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
useEffect,
|
|
4
|
-
type ConnectableElement,
|
|
5
|
-
type ReadonlySignal,
|
|
6
|
-
} from '@aria-ui/core'
|
|
7
|
-
import {
|
|
8
|
-
computePosition,
|
|
9
|
-
type ReferenceElement,
|
|
10
|
-
} from '@floating-ui/dom'
|
|
1
|
+
import { createComputed, useEffect, type ConnectableElement, type ReadonlySignal } from '@aria-ui/core'
|
|
2
|
+
import { computePosition, type ReferenceElement } from '@floating-ui/dom'
|
|
11
3
|
import type { Editor } from '@prosekit/core'
|
|
12
4
|
|
|
13
5
|
import { assignStyles } from '../../../utils/assign-styles'
|
|
14
6
|
import { getSafeEditorView } from '../../../utils/get-safe-editor-view'
|
|
15
|
-
import {
|
|
16
|
-
tableHandleDndContext,
|
|
17
|
-
tableHandleRootContext,
|
|
18
|
-
} from '../context'
|
|
7
|
+
import { tableHandleDndContext, tableHandleRootContext } from '../context'
|
|
19
8
|
import { getDndRelatedDOMs } from '../dnd'
|
|
20
9
|
|
|
21
10
|
export function useUpdatePreviewPosition(host: ConnectableElement, editor: ReadonlySignal<Editor | null>): void {
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useEffect,
|
|
3
|
-
type ConnectableElement,
|
|
4
|
-
type SignalState,
|
|
5
|
-
} from '@aria-ui/core'
|
|
1
|
+
import { useEffect, type ConnectableElement, type SignalState } from '@aria-ui/core'
|
|
6
2
|
|
|
7
3
|
import { assignStyles } from '../../../utils/assign-styles'
|
|
8
|
-
import {
|
|
9
|
-
useInitDndPosition,
|
|
10
|
-
type OnInitParams,
|
|
11
|
-
} from '../dnd'
|
|
4
|
+
import { useInitDndPosition, type OnInitParams } from '../dnd'
|
|
12
5
|
|
|
13
6
|
import type { TableHandleDropIndicatorProps } from './types'
|
|
14
7
|
import { useUpdateIndicatorPosition } from './updater'
|
|
@@ -18,7 +11,10 @@ const HANDLE_WIDTH = 2
|
|
|
18
11
|
/**
|
|
19
12
|
* @internal
|
|
20
13
|
*/
|
|
21
|
-
export function useTableHandleDropIndicator(
|
|
14
|
+
export function useTableHandleDropIndicator(
|
|
15
|
+
host: ConnectableElement,
|
|
16
|
+
{ state }: { state: SignalState<TableHandleDropIndicatorProps> },
|
|
17
|
+
): void {
|
|
22
18
|
const { editor } = state
|
|
23
19
|
|
|
24
20
|
useEffect(host, () => {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
EventDeclarations,
|
|
3
|
-
PropDeclarations,
|
|
4
|
-
} from '@aria-ui/core'
|
|
1
|
+
import type { EventDeclarations, PropDeclarations } from '@aria-ui/core'
|
|
5
2
|
import type { Editor } from '@prosekit/core'
|
|
6
3
|
import type { TableCommandsExtension } from '@prosekit/extensions/table'
|
|
7
4
|
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
useEffect,
|
|
4
|
-
type ConnectableElement,
|
|
5
|
-
type ReadonlySignal,
|
|
6
|
-
} from '@aria-ui/core'
|
|
7
|
-
import {
|
|
8
|
-
computePosition,
|
|
9
|
-
offset,
|
|
10
|
-
} from '@floating-ui/dom'
|
|
1
|
+
import { createComputed, useEffect, type ConnectableElement, type ReadonlySignal } from '@aria-ui/core'
|
|
2
|
+
import { computePosition, offset } from '@floating-ui/dom'
|
|
11
3
|
import type { Editor } from '@prosekit/core'
|
|
12
4
|
|
|
13
5
|
import { assignStyles } from '../../../utils/assign-styles'
|
|
14
6
|
import { getSafeEditorView } from '../../../utils/get-safe-editor-view'
|
|
15
|
-
import {
|
|
16
|
-
tableHandleDndContext,
|
|
17
|
-
tableHandleRootContext,
|
|
18
|
-
} from '../context'
|
|
7
|
+
import { tableHandleDndContext, tableHandleRootContext } from '../context'
|
|
19
8
|
import { getDndRelatedDOMs } from '../dnd'
|
|
20
9
|
|
|
21
|
-
import {
|
|
22
|
-
getDragOverColumn,
|
|
23
|
-
getDragOverRow,
|
|
24
|
-
} from './calc-drag-over'
|
|
10
|
+
import { getDragOverColumn, getDragOverRow } from './calc-drag-over'
|
|
25
11
|
|
|
26
12
|
export function useUpdateIndicatorPosition(host: ConnectableElement, editor: ReadonlySignal<Editor | null>, handleWidth: number): void {
|
|
27
13
|
const dndContext = tableHandleDndContext.consume(host)
|
|
@@ -65,7 +51,7 @@ export function useUpdateIndicatorPosition(host: ConnectableElement, editor: Rea
|
|
|
65
51
|
const { table } = relatedDOMs
|
|
66
52
|
|
|
67
53
|
let cancelled = false
|
|
68
|
-
|
|
54
|
+
const cleanup = () => {
|
|
69
55
|
cancelled = true
|
|
70
56
|
}
|
|
71
57
|
|
|
@@ -8,19 +8,12 @@ import {
|
|
|
8
8
|
type SignalState,
|
|
9
9
|
type TypedEventTarget,
|
|
10
10
|
} from '@aria-ui/core'
|
|
11
|
-
import {
|
|
12
|
-
menuContentProps,
|
|
13
|
-
useMenuContent,
|
|
14
|
-
type MenuContentProps,
|
|
15
|
-
} from '@aria-ui/menu/elements'
|
|
11
|
+
import { menuContentProps, useMenuContent, type MenuContentProps } from '@aria-ui/menu/elements'
|
|
16
12
|
|
|
17
13
|
import { getStateWithDefaults } from '../../../utils/get-default-state'
|
|
18
14
|
import { tableHandleRootContext } from '../context'
|
|
19
15
|
|
|
20
|
-
import type {
|
|
21
|
-
TableHandlePopoverContentEvents,
|
|
22
|
-
TableHandlePopoverContentProps,
|
|
23
|
-
} from './types'
|
|
16
|
+
import type { TableHandlePopoverContentEvents, TableHandlePopoverContentProps } from './types'
|
|
24
17
|
|
|
25
18
|
/**
|
|
26
19
|
* @internal
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
PropDeclarations,
|
|
4
|
-
} from '@aria-ui/core'
|
|
5
|
-
import {
|
|
6
|
-
menuContentEvents,
|
|
7
|
-
menuContentProps,
|
|
8
|
-
type MenuContentEvents,
|
|
9
|
-
type MenuContentProps,
|
|
10
|
-
} from '@aria-ui/menu/elements'
|
|
1
|
+
import type { EventDeclarations, PropDeclarations } from '@aria-ui/core'
|
|
2
|
+
import { menuContentEvents, menuContentProps, type MenuContentEvents, type MenuContentProps } from '@aria-ui/menu/elements'
|
|
11
3
|
import type { Editor } from '@prosekit/core'
|
|
12
4
|
|
|
13
5
|
export interface TableHandlePopoverContentProps extends Omit<MenuContentProps, 'placement' | 'offset'> {
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ConnectableElement,
|
|
3
|
-
SetupOptions,
|
|
4
|
-
} from '@aria-ui/core'
|
|
1
|
+
import type { ConnectableElement, SetupOptions } from '@aria-ui/core'
|
|
5
2
|
import { useMenuItem } from '@aria-ui/menu/elements'
|
|
6
3
|
|
|
7
|
-
import type {
|
|
8
|
-
TableHandlePopoverItemEvents,
|
|
9
|
-
TableHandlePopoverItemProps,
|
|
10
|
-
} from './types'
|
|
4
|
+
import type { TableHandlePopoverItemEvents, TableHandlePopoverItemProps } from './types'
|
|
11
5
|
|
|
12
6
|
/**
|
|
13
7
|
* @internal
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
PropDeclarations,
|
|
4
|
-
} from '@aria-ui/core'
|
|
5
|
-
import {
|
|
6
|
-
menuItemEvents,
|
|
7
|
-
menuItemProps,
|
|
8
|
-
type MenuItemEvents,
|
|
9
|
-
type MenuItemProps,
|
|
10
|
-
} from '@aria-ui/menu'
|
|
1
|
+
import type { EventDeclarations, PropDeclarations } from '@aria-ui/core'
|
|
2
|
+
import { menuItemEvents, menuItemProps, type MenuItemEvents, type MenuItemProps } from '@aria-ui/menu'
|
|
11
3
|
|
|
12
4
|
export interface TableHandlePopoverItemProps extends MenuItemProps {}
|
|
13
5
|
|
|
@@ -7,10 +7,7 @@ import {
|
|
|
7
7
|
type Signal,
|
|
8
8
|
type SignalState,
|
|
9
9
|
} from '@aria-ui/core'
|
|
10
|
-
import {
|
|
11
|
-
defineDOMEventHandler,
|
|
12
|
-
type Editor,
|
|
13
|
-
} from '@prosekit/core'
|
|
10
|
+
import { defineDOMEventHandler, type Editor } from '@prosekit/core'
|
|
14
11
|
import type { EditorView } from '@prosekit/pm/view'
|
|
15
12
|
|
|
16
13
|
import { useEditorExtension } from '../../../hooks/use-editor-extension'
|
|
@@ -25,11 +22,7 @@ import {
|
|
|
25
22
|
type TableHandleRootContext,
|
|
26
23
|
} from '../context'
|
|
27
24
|
import { useDrop } from '../hooks/use-drop'
|
|
28
|
-
import {
|
|
29
|
-
getHoveringCell,
|
|
30
|
-
isHoveringCellInfoEqual,
|
|
31
|
-
type HoveringCellInfo,
|
|
32
|
-
} from '../utils'
|
|
25
|
+
import { getHoveringCell, isHoveringCellInfoEqual, type HoveringCellInfo } from '../utils'
|
|
33
26
|
|
|
34
27
|
import type { TableHandleRootProps } from './types'
|
|
35
28
|
|
|
@@ -7,11 +7,7 @@ import {
|
|
|
7
7
|
type ConnectableElement,
|
|
8
8
|
type SetupOptions,
|
|
9
9
|
} from '@aria-ui/core'
|
|
10
|
-
import {
|
|
11
|
-
menuRootEvents,
|
|
12
|
-
menuRootProps,
|
|
13
|
-
useMenuRoot,
|
|
14
|
-
} from '@aria-ui/menu/elements'
|
|
10
|
+
import { menuRootEvents, menuRootProps, useMenuRoot } from '@aria-ui/menu/elements'
|
|
15
11
|
import { useOverlayPositionerState } from '@aria-ui/overlay/elements'
|
|
16
12
|
import { usePresence } from '@aria-ui/presence'
|
|
17
13
|
|
|
@@ -19,10 +15,7 @@ import { getStateWithDefaults } from '../../../utils/get-default-state'
|
|
|
19
15
|
import { getSafeEditorView } from '../../../utils/get-safe-editor-view'
|
|
20
16
|
import { tableHandleRootContext } from '../context'
|
|
21
17
|
|
|
22
|
-
import type {
|
|
23
|
-
TableHandleRowRootEvents,
|
|
24
|
-
TableHandleRowRootProps,
|
|
25
|
-
} from './types'
|
|
18
|
+
import type { TableHandleRowRootEvents, TableHandleRowRootProps } from './types'
|
|
26
19
|
|
|
27
20
|
/**
|
|
28
21
|
* @internal
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
PropDeclarations,
|
|
4
|
-
} from '@aria-ui/core'
|
|
5
|
-
import {
|
|
6
|
-
overlayPositionerProps,
|
|
7
|
-
type OverlayPositionerEvents,
|
|
8
|
-
type OverlayPositionerProps,
|
|
9
|
-
} from '@aria-ui/overlay'
|
|
1
|
+
import type { EventDeclarations, PropDeclarations } from '@aria-ui/core'
|
|
2
|
+
import { overlayPositionerProps, type OverlayPositionerEvents, type OverlayPositionerProps } from '@aria-ui/overlay'
|
|
10
3
|
import type { Placement } from '@floating-ui/dom'
|
|
11
4
|
import type { Editor } from '@prosekit/core'
|
|
12
5
|
|
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useEffect,
|
|
3
|
-
useEventListener,
|
|
4
|
-
type ConnectableElement,
|
|
5
|
-
type SetupOptions,
|
|
6
|
-
} from '@aria-ui/core'
|
|
1
|
+
import { useEffect, useEventListener, type ConnectableElement, type SetupOptions } from '@aria-ui/core'
|
|
7
2
|
import { useMenuTrigger } from '@aria-ui/menu/elements'
|
|
8
3
|
import { selectTableRow } from '@prosekit/extensions/table'
|
|
9
4
|
|
|
10
|
-
import {
|
|
11
|
-
tableHandleDndContext,
|
|
12
|
-
tableHandleRootContext,
|
|
13
|
-
} from '../context'
|
|
5
|
+
import { tableHandleDndContext, tableHandleRootContext } from '../context'
|
|
14
6
|
import { useEmptyImage } from '../hooks/use-empty-image'
|
|
15
7
|
|
|
16
|
-
import type {
|
|
17
|
-
TableHandleRowTriggerEvents,
|
|
18
|
-
TableHandleRowTriggerProps,
|
|
19
|
-
} from './types'
|
|
8
|
+
import type { TableHandleRowTriggerEvents, TableHandleRowTriggerProps } from './types'
|
|
20
9
|
|
|
21
10
|
/**
|
|
22
11
|
* @internal
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
EventDeclarations,
|
|
3
|
-
PropDeclarations,
|
|
4
|
-
} from '@aria-ui/core'
|
|
1
|
+
import type { EventDeclarations, PropDeclarations } from '@aria-ui/core'
|
|
5
2
|
import type { Editor } from '@prosekit/core'
|
|
6
3
|
import type { defineTableCommands } from '@prosekit/extensions/table'
|
|
7
4
|
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
TooltipContentEvents as Events,
|
|
3
|
-
TooltipContentProps as Props,
|
|
4
|
-
} from '@aria-ui/tooltip/elements'
|
|
1
|
+
import type { TooltipContentEvents as Events, TooltipContentProps as Props } from '@aria-ui/tooltip/elements'
|
|
5
2
|
|
|
6
|
-
export {
|
|
7
|
-
tooltipContentEvents,
|
|
8
|
-
tooltipContentProps,
|
|
9
|
-
} from '@aria-ui/tooltip/elements'
|
|
3
|
+
export { tooltipContentEvents, tooltipContentProps } from '@aria-ui/tooltip/elements'
|
|
10
4
|
|
|
11
5
|
export interface TooltipContentProps extends Props {}
|
|
12
6
|
export interface TooltipContentEvents extends Events {}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
TooltipRootEvents as Events,
|
|
3
|
-
TooltipRootProps as Props,
|
|
4
|
-
} from '@aria-ui/tooltip/elements'
|
|
1
|
+
import type { TooltipRootEvents as Events, TooltipRootProps as Props } from '@aria-ui/tooltip/elements'
|
|
5
2
|
|
|
6
|
-
export {
|
|
7
|
-
tooltipRootEvents,
|
|
8
|
-
tooltipRootProps,
|
|
9
|
-
} from '@aria-ui/tooltip/elements'
|
|
3
|
+
export { tooltipRootEvents, tooltipRootProps } from '@aria-ui/tooltip/elements'
|
|
10
4
|
|
|
11
5
|
export interface TooltipRootProps extends Props {}
|
|
12
6
|
export interface TooltipRootEvents extends Events {}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
TooltipTriggerEvents as Events,
|
|
3
|
-
TooltipTriggerProps as Props,
|
|
4
|
-
} from '@aria-ui/tooltip/elements'
|
|
1
|
+
import type { TooltipTriggerEvents as Events, TooltipTriggerProps as Props } from '@aria-ui/tooltip/elements'
|
|
5
2
|
|
|
6
|
-
export {
|
|
7
|
-
tooltipTriggerEvents,
|
|
8
|
-
tooltipTriggerProps,
|
|
9
|
-
} from '@aria-ui/tooltip/elements'
|
|
3
|
+
export { tooltipTriggerEvents, tooltipTriggerProps } from '@aria-ui/tooltip/elements'
|
|
10
4
|
|
|
11
5
|
export interface TooltipTriggerProps extends Props {}
|
|
12
6
|
export interface TooltipTriggerEvents extends Events {}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type ConnectableElement,
|
|
4
|
-
type ReadonlySignal,
|
|
5
|
-
} from '@aria-ui/core'
|
|
6
|
-
import type {
|
|
7
|
-
Editor,
|
|
8
|
-
Extension,
|
|
9
|
-
} from '@prosekit/core'
|
|
1
|
+
import { useEffect, type ConnectableElement, type ReadonlySignal } from '@aria-ui/core'
|
|
2
|
+
import type { Editor, Extension } from '@prosekit/core'
|
|
10
3
|
|
|
11
4
|
export function useEditorExtension(
|
|
12
5
|
host: ConnectableElement,
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
ReadonlySignal,
|
|
4
|
-
} from '@aria-ui/core'
|
|
5
|
-
import {
|
|
6
|
-
defineFocusChangeHandler,
|
|
7
|
-
type Editor,
|
|
8
|
-
type FocusChangeHandler,
|
|
9
|
-
} from '@prosekit/core'
|
|
1
|
+
import type { ConnectableElement, ReadonlySignal } from '@aria-ui/core'
|
|
2
|
+
import { defineFocusChangeHandler, type Editor, type FocusChangeHandler } from '@prosekit/core'
|
|
10
3
|
|
|
11
4
|
import { useEditorExtension } from './use-editor-extension'
|
|
12
5
|
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type ConnectableElement,
|
|
4
|
-
type ReadonlySignal,
|
|
5
|
-
} from '@aria-ui/core'
|
|
6
|
-
import {
|
|
7
|
-
defineDOMEventHandler,
|
|
8
|
-
union,
|
|
9
|
-
type Editor,
|
|
10
|
-
} from '@prosekit/core'
|
|
1
|
+
import { createSignal, type ConnectableElement, type ReadonlySignal } from '@aria-ui/core'
|
|
2
|
+
import { defineDOMEventHandler, union, type Editor } from '@prosekit/core'
|
|
11
3
|
|
|
12
4
|
import { useEditorExtension } from './use-editor-extension'
|
|
13
5
|
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
ReadonlySignal,
|
|
4
|
-
} from '@aria-ui/core'
|
|
5
|
-
import {
|
|
6
|
-
defineUpdateHandler,
|
|
7
|
-
type Editor,
|
|
8
|
-
type UpdateHandler,
|
|
9
|
-
} from '@prosekit/core'
|
|
1
|
+
import type { ConnectableElement, ReadonlySignal } from '@aria-ui/core'
|
|
2
|
+
import { defineUpdateHandler, type Editor, type UpdateHandler } from '@prosekit/core'
|
|
10
3
|
|
|
11
4
|
import { useEditorExtension } from './use-editor-extension'
|
|
12
5
|
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createSignal,
|
|
3
|
-
useEffect,
|
|
4
|
-
type ConnectableElement,
|
|
5
|
-
type ReadonlySignal,
|
|
6
|
-
} from '@aria-ui/core'
|
|
1
|
+
import { createSignal, useEffect, type ConnectableElement, type ReadonlySignal } from '@aria-ui/core'
|
|
7
2
|
|
|
8
3
|
export function useFirstRendering(
|
|
9
4
|
host: ConnectableElement,
|
package/src/hooks/use-keymap.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
ReadonlySignal,
|
|
4
|
-
} from '@aria-ui/core'
|
|
5
|
-
import {
|
|
6
|
-
defineKeymap,
|
|
7
|
-
type Editor,
|
|
8
|
-
type Keymap,
|
|
9
|
-
} from '@prosekit/core'
|
|
1
|
+
import type { ConnectableElement, ReadonlySignal } from '@aria-ui/core'
|
|
2
|
+
import { defineKeymap, type Editor, type Keymap } from '@prosekit/core'
|
|
10
3
|
|
|
11
4
|
import { useEditorExtension } from './use-editor-extension'
|
|
12
5
|
|