import type { Property } from "@rebasepro/types"; /** * Whether a property can stand in for a record in *one line*. * * Preview surfaces — the reference card, a list row, a board card — have a * single line per property and no way to grow. That is a constraint on the * *value*, not on the property's importance: a Markdown biography is the most * interesting column on an author, and it is still the wrong thing to paste * into a 44px card. Ranking it here means the picker can skip it without * anyone having to configure their way out of a broken card. * * Kept beside {@link getTitlePropertyCandidates} because the two answer * neighbouring questions — "what is this record called" and "what else can be * said about it in a line" — from the same property schema. * * @group Collections */ export declare const SUMMARY_RANK: { /** * No single-line form exists. A map renders as a key/value table and an * array of maps as a stack of them; there is no first line to take. */ readonly UNUSABLE: 0; /** * Readable in one line, but only as an excerpt — the property holds a * document, and the line is its opening. Worth showing when nothing better * is available, never in preference to a value that fits whole. */ readonly EXCERPT: 1; /** Short and self-contained: the line *is* the value. */ readonly DIRECT: 2; }; /** One of the three summary ranks. */ export type SummaryRank = typeof SUMMARY_RANK[keyof typeof SUMMARY_RANK]; /** * File-storage backed content (single image, array of images, generic upload…). * Preview surfaces give these their own image slot, so they are never also a * text line. * * @group Collections */ export declare function isStorageProperty(property: Property | undefined): boolean; /** * True when the property holds free text long enough to be a document rather * than a value — Markdown, or an explicitly multi-line string. * * @group Collections */ export declare function isLongTextProperty(property: Property | undefined): boolean; /** * How well a property reads as one line of a preview. See {@link SUMMARY_RANK}. * * Decided from the property *schema* only: no values are consulted, so the * answer is stable for a collection and can be memoised per collection rather * than per row. * * @group Collections */ export declare function rankSummaryProperty(property: Property | undefined): SummaryRank; /** * True when the property has any single-line form at all. * * @group Collections */ export declare function canSummariseProperty(property: Property | undefined): boolean;