import type { LinkState, Linked, LinkedConversation, LinkedKind } from './linked'; /** A person as interop names them: a profile, possibly empty. */ export interface LinkedProfile { displayName?: string; picture?: string; } /** One of interop's resolved slots. */ export interface LinkedSlot { value: string; label?: string; colour?: string; isPubkey?: boolean; field?: string; } /** One of interop's resolved actions: what the file's own app lets a reader change. */ export interface LinkedAction { id: string; label: string; control: string; field?: string; current?: string; options?: { value: string; label: string; colour?: string; }[]; } /** The part of interop's `ForeignObject` a link is built from. */ export interface LinkedSource { ref: string; address?: string; eventId?: string; kind: number; widget: string | string[]; noun?: string; appName?: string; slots: Record; meta: LinkedSlot[]; children?: LinkedSource[]; people?: Record; actions: LinkedAction[]; parentField?: string; openUrl?: string; unreachable?: boolean; archived?: unknown; /** When it last changed, in seconds (interop 0.64). */ changedAt?: number; } /** `T` is the app's own object type (interop's `ForeignObject`), so `hrefOf` takes it as it is. */ export interface LinkedFromOptions { /** * Where a file opens in this app: the linked file itself (`top`), or one of * the rows on its card. Another app's address comes from a manifest anyone * may publish, so the app keeps it to https. */ hrefOf: (object: T, top: boolean) => string; /** A message's words for a one-line preview: marks stripped, references read as words. */ previewText: (body: string, people: Record | undefined) => string; /** The workspace's people, for the owner picker's options. */ directory?: Record; /** * Changes the file from its card. Without it the values read as words * (Decided 16 Oct: any reader may change a file from its card; words only in * a preview and for a file that cannot be read). An archived file's read as * words whatever is passed: its page is read-only. */ onAct?: (actionId: string, value: string) => void; /** What was said about it, when the app has read that. */ conversation?: LinkedConversation; } /** The file a reference names, as the kit's chip, row and card draw it. */ export declare function linkedFrom(object: T, options: LinkedFromOptions): Linked; /** * Where a reference's read stands, for the kit: `undefined` is still read, * `null` an answer of nothing. `unread` is what the app knows from the address * alone, for those two. Nothing, and a file the reader may not read, draw * alike: "not available." (Miky, 15 Oct). */ export declare function linkStateFrom(object: T | null | undefined, unread: { kind: LinkedKind; noun: string; }, options: LinkedFromOptions): LinkState; //# sourceMappingURL=linkedFrom.d.ts.map