import { IDMLSpreadPackageContext } from '../SpreadPackage.js'; import { GeometricSprite, GeometricSpriteOpts } from './GeometricSprite.js'; import { CornerOptions } from './Rectangle.js'; /** Vertical text alignment within a frame (InDesign `VerticalJustification`). */ export type VerticalJustification = 'top' | 'center' | 'bottom' | 'justify'; /** * Parsed `` — the frame-level text layout settings, read * abstractly (typed fields) rather than by poking the raw XML at call sites. Only * the fields the converter consumes are modeled; `sourceElement` is retained so * {@link TextFrame.serialize} round-trips the attributes we don't model. */ export type TextFramePreference = { /** Vertical text alignment (default `'top'`). */ verticalJustification: VerticalJustification; /** First-baseline offset mode, e.g. `'Ascent'`/`'AscentOffset'` (informational). */ firstBaselineOffset?: string; /** Minimum first-baseline offset in pt. */ minimumFirstBaselineOffset?: number; /** The raw element, kept so serialize preserves unmodeled attributes. */ sourceElement: Element; }; export declare class TextFrame extends GeometricSprite { private parentStoryId; textFramePreference?: TextFramePreference; private cornerOptions?; constructor(id: string, parentStoryId: string, opts: GeometricSpriteOpts & { textFramePreference?: TextFramePreference; cornerOptions?: CornerOptions; }, context: IDMLSpreadPackageContext); /** Per-corner options — a text frame is a rectangular graphic frame too. */ getCornerOptions(): CornerOptions | undefined; getDefaultFillColor(): import("../Color.js").Color | undefined; getBBox(): import("../../types/index.js").GeometricBounds; setBBox(x: number, y: number, width: number, height: number): void; getStory(): import("../Story.js").Story | undefined; /** * The frame's vertical text alignment as a 0..1 fraction (0 top, 0.5 center, * 1 bottom). Defaults to top. `justify` (distribute lines) has no core equivalent * for the anchor → treated as top (see {@link isVerticalJustify}). */ getVerticalAlign(): number; /** * `VerticalJustification="JustifyAlign"` — InDesign distributes the lines to fill * the frame height (equal gaps, first line at top, last at bottom). Core has no * such mode, so the converter reproduces it by WIDENING the line advance (see * idml2serial). Rendered top-anchored (getVerticalAlign stays 0). */ isVerticalJustify(): boolean; serialize(): import("../../util/xml.js").ElementNode; /** Parse a `` element into its typed representation. */ static parseTextFramePreference(element: Element): TextFramePreference; static parseElement(element: Element, context: IDMLSpreadPackageContext): TextFrame; } //# sourceMappingURL=TextFrame.d.ts.map