'use client'; import { AlignCenter, AlignLeft, AlignRight, Bold, BringToFront, Italic, List, SendToBack, Trash2, Underline, } from 'lucide-react'; import { useEffect, useLayoutEffect, useRef, useState } from 'react'; import type { MouseEvent } from 'react'; import { createPortal } from 'react-dom'; import { DEFAULT_TEXT_TOOLBAR_FONTS, resolveTextToolbarLabels } from '../labels'; import type { TextFormatToolbarProps, TextToolbarFont } from '../types'; import { DefaultColorPicker } from './DefaultColorPicker'; import { FontSizeControl } from './FontSizeControl'; const COLOR_POPOVER_WIDTH = 248; const COLOR_POPOVER_OFFSET = 8; const VIEWPORT_EDGE_OFFSET = 12; const useColorPopoverLayoutEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect; function Divider() { return