'use client' import type { ContentEditorTextStyle } from '@admin/utils/editor/content-editor-text-style' import type { Editor } from '@tiptap/react' import { Button } from '@admin/components/ui/button' import { deleteTopLevelBlock } from '@admin/utils/editor/delete-top-level-block' import { duplicateTopLevelBlock } from '@admin/utils/editor/duplicate-top-level-block' import { getContentEditorTextStyleLabel } from '@admin/utils/editor/get-content-editor-text-style-label' import { moveTopLevelBlock } from '@admin/utils/editor/move-top-level-block' import { ChevronDown, ChevronUp, Copy, Trash2, X } from 'lucide-react' // The phone focus view's dock while a block is selected (Paper `Posts / New · Writing · Block / // Mobile`, `EditorDock · block mode`): it takes the formatting keys' place right above the keyboard. // Close returns to formatting; the type select opens the text-style sheet. Every control prevents // the pointer default and hands focus back to the editor, so the keyboard stays up, and // `data-content-editor-chrome` keeps the iOS blur from a tap from hiding the selection. export function ContentEditorBlockDock({ editor, activeStyle, isTextStyleOpen, onTurnInto, onClose }: { editor: Editor activeStyle: ContentEditorTextStyle isTextStyleOpen: boolean onTurnInto: () => void onClose: () => void }) { const blockIndex = editor.state.selection.$from.index(0) return (
) }