/** * Orientation marks for vertical text (#190): `:tcy[12]` sets its text * side by side in one upright cell (tate-chu-yoko), `:upright[GDP]` stands * each character upright in a cell of its own, `:sideways[12]` turns the * whole run with the line. They keep their text in the plain text (like * `:smallcaps[…]`) and only change how it stands in vertical text * (`layout.writingMode: 'vertical-rl'`); in horizontal text they change * nothing. * * The parser replaces each mark by its text between two private-use marks * before the emphasis scanners run ({@link markOrientation}) and turns the * marks into span fields once the spans exist ({@link applyOrientationMarks}). */ import type { InlineSpan } from './types.js'; /** The openers of `:tcy[…]`, `:upright[…]` and `:sideways[…]` (one line, * not empty, other inline marks allowed inside, `\]` for a literal * bracket; see {@link orientationMarkAt}). */ export declare const ORIENTATION_OPENERS: readonly string[]; /** The kind of an orientation mark. */ export type OrientationMark = 'tcy' | 'upright' | 'sideways'; type Mark = OrientationMark; /** An orientation mark opened at `at`: its kind, the start of its text * and the index of its closing `]` (before `end`, on the same line), or * undefined when `at` opens none. The closing bracket is the one that * balances the opener, so a mark may hold another mark or a link * (`:tcy[:upright[AB]]`, `:sideways[[iPhone](…)]`); when the brackets * inside never balance on the line, the first `]` closes it. `\]` is a * literal bracket. The text is never empty. */ export declare function orientationMarkAt(text: string, at: number, end?: number): { kind: Mark; start: number; close: number; } | undefined; /** Replace every orientation mark by its text between its private-use * marks (a mark inside another one too). */ export declare function markOrientation(text: string): string; /** The text of every orientation mark without its markup, each wrapped in * `boundary` (the plain text `stripInlineFormatting` gives). */ export declare function stripOrientationMarks(text: string, boundary: string): string; /** Split the spans at the orientation marks, setting `combineUpright` or * `orientation` on the text between them and dropping the marks (and any * piece left empty). The innermost mark wins. */ export declare function applyOrientationMarks(spans: InlineSpan[]): InlineSpan[]; /** An orientation mark's opener at `r` that the parser took as markup: its * closing `]` comes later on the same line (see {@link orientationMarkAt}). * The length of the opener, or 0. */ export declare function orientationOpenerAt(markdown: string, r: number, end: number): number; export {}; //# sourceMappingURL=orientationMarks.d.ts.map