import type { DocxDiagram } from './diagram.js'; import type { StRelFromH, StRelFromV } from './generated/wml-simple-types.js'; /** An inline drawing (`w:drawing` or legacy `w:pict`) modeled at run granularity. */ export interface InlineImage { /** Relationship id in `word/_rels/document.xml.rels` pointing at the media part. */ relId: string; /** Package part name holding the image bytes, e.g. `word/media/image1.png`. */ partName: string; contentType: string; /** An SVG original (`asvg:svgBlip`) shown instead of the raster `partName`, which is its PNG fallback. */ svgPartName?: string; /** Display size in CSS pixels (96 dpi), derived from the drawing extent in EMU (may be fractional). */ widthPx: number; heightPx: number; /** From `wp:docPr/@descr`. */ altText?: string; /** From `wp:docPr/@title` or `@name`. */ title?: string; /** `wp:anchor` (floating) drawings render as sized inline placeholders; wrapping/position is lost. */ anchored?: boolean; /** Floating (`wp:anchor`) wrapping and horizontal position, read-only; the anchor XML is preserved. */ placement?: PicturePlacement; /** Set for non-picture drawings (chart, SmartArt, shape, unresolved legacy VML): rendered as a labeled placeholder with no editable bytes. */ unsupported?: string; /** For a text box (`wps:txbx`): its paragraphs' text, shown read-only; the box XML is preserved on save. */ textBoxText?: string[]; /** The text box is the simple form this editor writes, so its text, size and outline can change. */ watermark?: WatermarkSpec; textBoxEditable?: boolean; /** For an editable text box: whether it draws an outline (default true). */ textBoxBorder?: boolean; /** For SmartArt (`unsupported: "SmartArt"`): its parts, extent and cached drawing; the markup and parts are preserved on save. */ diagram?: DocxDiagram; } /** A Word text watermark (`PowerPlusWaterMarkObject`), carried by an inline object run in a header. */ export interface WatermarkSpec { text: string; fontFamily?: string; /** `#rrggbb`. */ color: string; /** Drawn at half opacity. */ semitransparent: boolean; layout: 'diagonal' | 'horizontal'; } /** How a floating picture sits relative to text. */ export interface PicturePlacement { wrap: 'square' | 'tight' | 'through' | 'topAndBottom' | 'none'; /** `behindDoc`: with `wrap: 'none'`, the picture is behind rather than in front of text. */ behindText?: boolean; /** `wp:positionH/wp:align`, when the picture is aligned rather than offset. */ align?: 'left' | 'center' | 'right' | 'inside' | 'outside'; /** `wp:positionH/wp:posOffset` in CSS pixels, relative to `relativeFrom`. */ offsetXPx?: number; relativeFrom?: StRelFromH; /** `wp:positionV/wp:align`, when the picture is aligned vertically rather than offset. */ alignV?: 'top' | 'center' | 'bottom' | 'inside' | 'outside'; /** `wp:positionV/wp:posOffset` in CSS pixels, relative to `relativeFromV`. */ offsetYPx?: number; /** `wp:positionV/@relativeFrom`, e.g. `paragraph`, `page` or `margin`. */ relativeFromV?: StRelFromV; } /** A `w:hyperlink` target, resolved from its relationship (external) or `w:anchor` (internal). */ export interface HyperlinkInfo { href?: string; anchor?: string; tooltip?: string; } //# sourceMappingURL=inline-model.d.ts.map