{ "argumentSchema": { "$defs": { "ListItem": { "properties": { "id": { "description": "Stable id, minted by whoever asked for the item.", "type": "string" }, "text": { "description": "What the entry says.", "type": "string" } }, "required": [ "id", "text" ], "type": "object" } }, "description": "What a verb list is instantiated with.", "properties": { "items": { "asCell": [ "cell" ], "default": [], "description": "The items on the list. Left out, the list starts empty.", "items": { "$ref": "#/$defs/ListItem" }, "type": "array" } }, "type": "object" }, "pattern": "iframe-verb-list/main.tsx", "resultSchema": { "$defs": { "AddItemEvent": { "properties": { "id": { "description": "Id for the new item. An id the list already holds adds nothing.", "type": "string" }, "text": { "description": "Text of the new item. Whitespace around it is dropped.", "type": "string" } }, "required": [ "id", "text" ], "type": "object" }, "IframeOutputData": { "properties": { "hideChecked": { "description": "Whether the list hides the items that are checked off.", "type": "boolean" } }, "required": [ "hideChecked" ], "type": "object" }, "IframeStateData": { "properties": { "checked": { "additionalProperties": { "type": "boolean" }, "description": "Whether each item is checked off, by item id.", "properties": {}, "type": "object" } }, "required": [ "checked" ], "type": "object" }, "ListItem": { "properties": { "id": { "description": "Stable id, minted by whoever asked for the item.", "type": "string" }, "text": { "description": "What the entry says.", "type": "string" } }, "required": [ "id", "text" ], "type": "object" } }, "description": "A list of items, each of which can be checked off. Read `items` for what is\non it, and add to it with `addItem`.", "properties": { "$NAME": { "type": "string" }, "$UI": { "$ref": "https://commonfabric.org/schemas/vnode.json" }, "addItem": { "$ref": "#/$defs/AddItemEvent", "asCell": [ "stream" ], "description": "Add one item. Mint a fresh `id` for each item; sending an id the list\nholds already adds nothing, so sending the same event again is safe." }, "items": { "description": "Every item on the list, in the order they were added.", "items": { "$ref": "#/$defs/ListItem" }, "type": "array" }, "output": { "$ref": "#/$defs/IframeOutputData", "description": "Whether the frame hides checked-off items, for everyone on the piece." }, "state": { "$ref": "#/$defs/IframeStateData", "description": "Which items are checked off, by item id, as the frame stores it." } }, "required": [ "items", "state", "output", "addItem", "$NAME", "$UI" ], "type": "object" } }