'use client' import type { ContentEditorTextStyle } from '@admin/utils/editor/content-editor-text-style' import type { Editor } from '@tiptap/react' import { MarkButton } from '@admin/components/custom/content-editor/tiptap-ui/mark-button' import { UndoRedoButton } from '@admin/components/custom/content-editor/tiptap-ui/undo-redo-button' import { Button } from '@admin/components/ui/button' import { ButtonGroup } from '@admin/components/ui/button-group' import { ChevronDown, Ellipsis, LinkIcon, List } from 'lucide-react' // The rich-text dock right above the keyboard in the phone focus view (Paper // `Posts / New ยท Writing / Mobile`, `EditorDock`): text style, bold, italic, bullets, link and the // overflow as one `ButtonGroup` of outline keys across the bar (like the markdown key row), an // active mark or open sheet on the muted fill, then undo as a ghost key. Link and the overflow open // sheets inside the focus view (`ContentEditorLinkSheet`, `ContentEditorMoreSheet`); every key // prevents the pointer default so the editor keeps focus. A selected block swaps the dock for // `ContentEditorBlockDock`. export function ContentEditorFocusToolbar({ editor, activeStyle, isTextStyleOpen, isLinkOpen, isMoreOpen, onTextStyleOpen, onLinkOpen, onMoreOpen }: { editor: Editor activeStyle: ContentEditorTextStyle isTextStyleOpen: boolean isLinkOpen: boolean isMoreOpen: boolean onTextStyleOpen: () => void onLinkOpen: () => void onMoreOpen: () => void }) { return (
event.preventDefault()} /> event.preventDefault()} /> event.preventDefault()} />
) }