import type { ToolbarAlign } from "./FloatingToolbar"; /** The current character format at the selection/caret — drives the B/I/U/S toggles + the size/color display. * `sizePt`/`color` mirror the marked cell's first run (비편집) or the caret's computed style (편집 중). */ export interface RibbonFmt { bold: boolean; italic: boolean; underline: boolean; strike: boolean; sizePt: number; color: string | null; } /** A format delta — exactly the changed attribute(s). The host routes it (편집 중 → applyLiveStyle, else → * useSelectionActions). `shade`/`align` are cell-level ops (no live-run equivalent), so the ribbon only * fires them when NOT editing; `underline`/`strike` are live-run styles, only fired while editing. */ export interface FormatRibbonPatch { bold?: boolean; italic?: boolean; underline?: boolean; strike?: boolean; sizePt?: number; /** 서체(글꼴). BOTH modes: 편집 중 → applyLiveStyle wraps the live selection; 비편집 → fmtActions.setFont * (SetCellRangeFmt font). Like 크기/글자색 it applies to the selection, so it is gated with inline (not cell). */ font?: string; color?: string; shade?: string | null; align?: ToolbarAlign; } export interface FormatRibbonProps { /** The current format at the selection/caret (toggle + display state). */ fmt: RibbonFmt; /** True while the in-place editor is OPEN (the host routes onPatch → applyLiveStyle). Drives which * controls are enabled: 밑줄/취소선 need edit mode; 배경/정렬 are cell ops (비편집 only). */ editing: boolean; /** Apply a format delta. HOST-routed: 편집 중 → richedit.applyLiveStyle; else → useSelectionActions. */ onPatch: (patch: FormatRibbonPatch) => void; /** Optional 서체 catalog (family names) for the 글꼴 dropdown; each option previews in its own family * (best-effort). Omitted/empty → the 서체 select is not rendered (opt-in, like the desktop FontPicker). */ fonts?: readonly string[]; /** Reason the ALWAYS-controls (B/I/크기/글자색) are disabled — set when NOT editing AND no formattable * cell/range is marked (미지원 조합은 조용한 무시 금지 — 비활성+사유, issue 027 rule). */ inlineDisabledReason?: string; /** Reason the EDIT-ONLY controls (밑줄/취소선) are disabled — set when NOT editing (they have no * SetCellRangeFmt equivalent — 신규 op 금지, so they apply only to the live selection). */ liveOnlyDisabledReason?: string; /** Reason the CELL-OP-ONLY controls (배경/정렬) are disabled — set while editing (no live-run equivalent) * OR when no formattable cell/range is marked. */ cellOnlyDisabledReason?: string; } export declare function FormatRibbon(props: FormatRibbonProps): import("react").JSX.Element; //# sourceMappingURL=FormatRibbon.d.ts.map