export declare const TABLE_CELL_OVERRIDABLE_KEYS: readonly ["fontSize", "fontFamily", "fontWeight", "fontStyle", "textDecoration", "textTransform", "fill", "align", "verticalAlign", "lineHeight", "letterSpacing", "strokeWidth", "stroke", "cellBackground", "cellPadding"]; /** * Resolve cell inheritance: every overridable text property a cell leaves * undefined is filled from the table element (canvas parity — no fallback * literals downstream). Returns shallow clones; the input is untouched * (source may be frozen JSON). */ export declare const resolveTableCellDefaults: (element: Record) => any[]; /** * Per-side border resolution: a cell's `borders[side]` overrides win over * the table element's `border{Width,Style,Color}` (canvas table-model * parity). Shared by the svg/html/pdf exporters. */ export declare const resolveTableCellBorder: (cell: Record, element: Record, side: string) => { width: number; style: string; color: string; }; /** * How many pixels each border eats from a cell's interior — the inset between * the cell rect and the box its text is laid out in. * * Outer perimeter borders are fully inset (the whole stroke lies inside the * cell); inner gridlines are centred on the shared boundary, so only half the * stroke intrudes and the other half lives in the neighbour. `cell` must carry * its grid position (`row`, `col`, and the spans when it spans). * * Mirrors the editor's `TableCell.borderInsets` (polotno's table-model.ts), * which is what the canvas places cell text with — that model still owns its * own copy because it resolves borders through MST views with an isAlive * guard. */ export declare const tableCellBorderInsets: (cell: Record, element: Record) => { top: number; right: number; bottom: number; left: number; }; export declare const TEXT_DEFAULTS: { readonly fontSize: 14; readonly fontFamily: "Roboto"; readonly fontWeight: "normal"; readonly fontStyle: "normal"; readonly lineHeight: 1.2; readonly letterSpacing: 0; readonly textTransform: "none"; readonly textDecoration: ""; readonly align: "center"; readonly fill: "black"; readonly stroke: "black"; readonly strokeWidth: 0; readonly strokeLineJoin: "round"; readonly curveEnabled: false; readonly curvePower: 0.5; }; /** * The smallest font size a text element, a table or a table cell can hold. Not * a rendering preference — an INVARIANT of the format: each of those models * clamps `fontSize` below it at both doors, a loaded snapshot and `set()`, so * no element the canvas has ever touched holds less. Clamping one door only is * how the table path drifted: `set()` held the floor while a loaded design * kept its sub-1 size, and the canvas and the exporters disagreed again. * `schema-equivalence.test.ts` is the seam that proves they no longer do. * * The schema clamps to it for the same reason: a renderer that meets a smaller * value has no canvas behavior to mirror, so it invents one. pdf-export read * `font-size: 0px` as *absent* and inherited a 16px root default, svg-export's * shrink loop walked to `-1px`, html-export emitted an invisible `0px`. Three * renderers, three answers, none of them the canvas. * * @polotno/core's `FIT_MIN_FONT_SIZE` (the floor its fit loops converge to) and * the editor's model clamps both derive from this — one rule, stated once. */ export declare const MIN_FONT_SIZE = 1; /** * Apply that floor. The one implementation: the zod schema, the text model and * the table model all call this, so the rule cannot be spelled two ways. * `undefined` passes through — an omitted table-cell size means "inherit from * the table", which is not a size to clamp. */ export declare const clampFontSize: (size: T) => T;