// Generated by tools/write-iframe-wrapper.ts. // Edit the contract or guest source and regenerate this wrapper. import { type Default, NAME, pattern, type PerUser, UI, type VNode, Writable, } from "commonfabric"; import { DEFAULT_INPUT, DEFAULT_OUTPUT, DEFAULT_STATE, type IframeInputData, type IframeOutputData, type IframeStateData, } from "./contract.ts"; export interface RingLoopsFrameInput { input?: Default; output?: PerUser>>; } export interface RingLoopsFrameOutput { [NAME]: string; [UI]: VNode; state: IframeStateData; output: IframeOutputData; } interface IframeContextInput { input: IframeInputData; state: Writable>; output: Writable>; "jam": Writable>; } interface IframeContextOutput extends IframeContextInput {} const IframeContext = pattern( (context) => context, ); const GUEST_HTML = '\n\n \n \n \n Ring Loops\n \n \n \n
\n \n \n\n'; export default pattern(({ input, output, }) => { const state = new Writable(DEFAULT_STATE); const iframeInput = input ?? DEFAULT_INPUT; const context = IframeContext({ input: iframeInput, state, output, ["jam"]: state, }); return { [NAME]: "Ring Loops", [UI]: (
), state, output, }; });