import type { FieldRow } from '../db/schema.js'; /** * One field's value as a plain string, or `''` when it has nothing to show. * * Exported because the admin's list columns will want exactly this, and a second copy of "how does a * date field read" is how two screens start disagreeing about the same row. */ export declare function fieldValueText(field: FieldRow | undefined, value: unknown): string; /** * Fill a template, dropping empty tokens along with the punctuation that separated them. * * The separator rule is why this is not a `String.replace` one-liner: replacing a token with `''` * leaves whatever sat between it and its neighbour, which is the dangling-bullet bug. */ export declare function renderSummary(template: string | null | undefined, fields: FieldRow[], data: Record, builtIns?: Record): string; /** * What to call this thing, with the fallback chain applied. * * The template is an override, not a requirement: most content types never set one and their items * are known by their title. A block has no title of its own, so its type's name is the floor — * "Hero" beats an empty disclosure that says nothing about what it holds. */ export declare function summaryLabel(template: string | null | undefined, fields: FieldRow[], data: Record, fallback: string, builtIns?: Record): string; /** * The values a content item has that are not fields — its title, where it lives, what state it is in. * * **These are the tokens `{{ title }}` needed to mean something.** The seed has been setting * `summary_template: '{{ title }}'` on three content types since templates shipped, and it resolved * to nothing every time: `title` is a column on `content_items`, not a key in `data`, so the token * collapsed and `summaryLabel`'s fallback — the item's title — produced the right answer by * accident. Identical output, so nothing looked wrong. That is the fourth stored-value-nothing-reads * defect found in this repo and the second in `summary_template` alone, after `title_field`. * * The vocabulary is deliberately the **same names the list columns use** (`BUILT_IN_COLUMNS`), plus * `published`, so an admin who has arranged one has already learned the other. Values come back * pre-rendered as text through `fieldValueText`, so a date in a summary line and a date in a column * cannot disagree about how the same instant reads. */ export declare function itemSummaryValues(item: { title: string; path: string; slug: string; status: string; published_at?: string | null; updated_at?: string | null; created_at?: string | null; }): Record; /** The token names `itemSummaryValues` answers, for a screen that has to list them. */ export declare const ITEM_SUMMARY_TOKENS: readonly ["title", "path", "slug", "status", "published", "updated", "created"]; /** * Load stored `data` for a page of items, keyed by id. * * `ContentItemSummary` is `Omit` on purpose — a menu picker asking * for two hundred candidates by title must not start paying for two hundred page bodies, and that * default is what keeps every other caller cheap. A list rendering a summary template does need the * values, so it opts in here. * * **One query for the whole page, never one per row.** Same rule `resolveDelivery` follows for its * media and term lookups: the cost is per page, not per item. An empty `ids` short-circuits rather * than sending `in ()`, which is a syntax error — the same trap `listMedia` documents. */ export declare function loadItemData(db: { selectFrom: (table: 'content_items') => any; }, ids: string[]): Promise>>;