// Generated by tools/write-iframe-wrapper.ts. // Edit the contract or guest source and regenerate this wrapper. import { cfSqlite, type Default, NAME, pattern, type PerSession, type PerUser, sqliteDatabase, type SqliteDb, UI, type VNode, Writable, } from "commonfabric"; import { DEFAULT_INPUT, DEFAULT_OUTPUT, DEFAULT_STATE, type IframeInputData, type IframeOutputData, type IframeStateData, } from "./contract.ts"; export interface SignalPropagationAtlasInput { input?: Default; output?: PerSession< Writable> >; } export interface SignalPropagationAtlasOutput { [NAME]: string; [UI]: VNode; state: IframeStateData; output: IframeOutputData; } interface IframeContextInput { input: IframeInputData; state: Writable>; output: Writable>; "personalAtlas": SqliteDb; } interface IframeContextOutput extends IframeContextInput {} const IframeContext = pattern( (context) => context, ); const GUEST_HTML = '\n\n \n \n \n Signal Propagation Atlas\n \n \n \n
\n
\n
\n

Pelagic research commons

\n

Loading atlas

\n

\n
\n
\n \n Synchronizing field records\n
\n
\n
\n
\n
\n \n \n
\n \n \n \n
\n
\n
\n \n Scroll or drag to explore. View movement stays local until you choose Save view.
\n
\n \n
\n 0visible\n \n \n
\n \n

Plot a relay

\n
\n \n
\n \n \n
\n \n \n
\n
\n
\n \n

Viewport checkpoint

\n
\n \n \n
\n
\n
\n \n

Bookmark selected signal

\n
\n \n \n
    \n
    \n
    \n
    \n \n

    Record a hypothesis

    \n
    \n \n \n \n
      \n
      \n
      \n \n \n \n \n \n \n\n'; export default pattern< SignalPropagationAtlasInput, SignalPropagationAtlasOutput >(({ input, output, }) => { const state = new Writable(DEFAULT_STATE); const { table } = cfSqlite; const iframeDatabase0Tables = { ["atlas_bookmarks"]: table({ ["id"]: "text primary key", ["observation_id"]: "text not null", ["note"]: "text not null", ["created_at"]: "integer not null", }), ["atlas_hypotheses"]: table({ ["id"]: "text primary key", ["title"]: "text not null", ["narrative"]: "text not null", ["status"]: "text not null", ["created_at"]: "integer not null", }), }; const iframeDatabase0: PerUser = sqliteDatabase({ tables: iframeDatabase0Tables, }); const iframeInput = input ?? DEFAULT_INPUT; const context = IframeContext({ input: iframeInput, state, output, ["personalAtlas"]: iframeDatabase0, }); return { [NAME]: "Signal Propagation Atlas", [UI]: (
      ), state, output, }; });