'use client' import type { ContentEditorFocusBlock } from '@admin/utils/editor/content-editor-focus-block' import type { Editor } from '@tiptap/react' import { useContentEditorBlockDrag } from '@admin/hooks/content-editor/use-content-editor-block-drag' import { cn } from '@admin/utils/shared/cn' import { GripVertical } from 'lucide-react' // The handle in the right gutter beside the block holding the cursor in the phone focus view (Paper // `Posts / New · Writing · Block / Mobile`): a tap switches the dock to block actions, a drag // reorders the block (`useContentEditorBlockDrag`) with a drop line between blocks. It opts out of // touch actions, selection and the iOS callout so the press never raises the text magnifier, its // touch target reaches 44px, and `data-content-editor-chrome` keeps the iOS blur from a tap from // hiding it. export function ContentEditorBlockHandle({ editor, block, onTap }: { editor: Editor block: ContentEditorFocusBlock onTap: () => void }) { const { drag, onPointerDown, onPointerMove, onPointerUp, onPointerCancel } = useContentEditorBlockDrag(editor, onTap) return ( <>
{drag?.dropTop != null ? ( ) : null} > ) }