import type { ReactNode } from 'react';
/**
* What a value may be, which is anything that draws.
*
* `ReactNode` admits `true` and `false`, and both render as nothing at all —
* so `known && `, the ordinary conditional child, spells a fact with
* a blank where its value goes and type-checks. Out of the union it is
* unspellable, and a call that may not have a value goes through `fact` below.
*/
type Drawn = Exclude, boolean>;
/**
* One term, and either what was read for it or the sentence standing where the
* value would be.
*
* The two are alternatives in the type because of what goes wrong otherwise: a
* fact renders anyway. A zero for a supply that never answered, a dash for a
* price nobody quoted, an em dash meaning "none" to whoever wrote it and "we
* did not look" to whoever reads it. Those are indistinguishable on screen and
* they are not the same fact — one is a thing nobody holds, the other is a node
* that timed out — so there is no way to spell a fact here without either a
* value or a stated reason there is none.
*
* `unread` is that reason, and it is about the read: the register did not
* answer, nobody quotes this, the record was never opened. A thing that was
* read and found to be nothing is a VALUE — "none", "not restricted", "no
* ticker" — and belongs on the other side of the union.
*/
export type Fact = {
term: string;
} & ({
value: Drawn;
unread?: undefined;
} | {
value?: undefined;
unread: string;
});
/**
* A fact out of a read that may not have answered, so the branch is written
* once instead of at every call site. `why` is what the page will say in the
* value's place, so it names what failed rather than announcing that something
* did.
*/
export declare const fact: (term: string, value: ReactNode, why: string) => Fact;
/**
* The facts themselves, which a block can also use on its own — the frame below
* is one caller of this and not its owner.
*
* A definition list, because that is what a screen reader navigates these by,
* so the grid goes on the `dl` itself. Each term sits ABOVE its value in a cell
* of its own, and that is the whole arrangement: a term-then-value ROW spends
* one of its two tracks on short labels, which leaves a wide screen running a
* single tall list down its left with nothing beside it. Stacked, the same
* facts go three across a desktop, two a tablet and one a phone, off the same
* track list the rest of the surface lays blocks out with, and no breakpoint is
* written down anywhere.
*
* The pair travels inside a box because a grid places CHILDREN: left bare, a
* term would land in one cell and its value in the next, and three facts would
* read as six. `dl > div > dt, dd` is the spelling the content model gives for
* grouping exactly this, so the list is still a list to anything reading it.
*
* A value arrives rendered, because whoever read it knows how it should read: a
* figure comes in the mono face, an address comes as code, a sentence comes as
* prose. What this decides is the other case, and it decides it the same way
* every time.
*/
export declare function Facts({ of, min, max }: {
of: readonly Fact[];
min?: number;
max?: number;
}): import("react").JSX.Element;
export interface DetailProps {
/**
* Where this came from, named.
*
* A rendered trail rather than a route and a word: navigation belongs to the
* application, and a component that took an address would need the
* application's router to follow it.
*/
trail?: ReactNode;
/** What this page is about, said as a person would say it. */
title: ReactNode;
/** The line under it — a ticker, an address, an issuer. One line, not a
* summary. */
subtitle?: ReactNode;
/** States worth seeing before anything else: restricted, frozen, out of
* range. Badges, in a row that wraps. */
badges?: ReactNode;
/**
* What a person can do about the thing on this page.
*
* Beside the title rather than at the bottom, because a screen that describes
* something and offers no way to act on it sends the reader back to a list to
* find the verb.
*/
actions?: ReactNode;
/** What is known, which includes what could not be read. */
facts?: readonly Fact[];
/**
* The blocks. Two across where there is room, stacked where there is not, on
* the same track the rest of the surface pairs blocks on. One that wants the
* full width — a table, or the only block there is — says so with the grid's
* own `Cell col="1 / -1"` rather than a second arrangement invented here.
*/
children?: ReactNode;
}
export declare function Detail({ trail, title, subtitle, badges, actions, facts, children }: DetailProps): import("react").JSX.Element;
export {};
//# sourceMappingURL=detail.d.ts.map