{
    "tailapp": 2,
    "manifest": {
        "format": 2,
        "app_id": "todo",
        "name": "To-do",
        "version": 1,
        "schema": "tailapps/v0",
        "exported_at": 1795564629,
        "from": "gallery",
        "connections": [],
        "files": {
            "app.json": "1a8da0cc45331e444734280d23ea2666e7c31df79b8aecf3e0365df011b08f8a"
        },
        "signature": "LxmiHjV8D9ynk6fCZBG0aNbKl9tB4bRymy78mrIXTjWIBmy8y2aABrlzDk1mU8GHq/+1EyqHJeW6IWxa9YjiBA==",
        "key_id": "gallery-1"
    },
    "app": {
        "schema": "tailapps/v0",
        "app": "todo",
        "name": "To-do",
        "description": "A to-do list: add with Return, tick to finish, see what's left at a glance, and clear what's done. With Sync to My Devices on, it's the same on your Mac and iPhone.",
        "icon": "checklist",
        "version": 2,
        "permissions": [],
        "state": {
            "todos": {
                "type": "list",
                "sync": true,
                "default": [
                    {
                        "id": "1",
                        "title": "Reply to the design review",
                        "note": "Before Friday",
                        "done": false,
                        "hue": "orange"
                    },
                    {
                        "id": "2",
                        "title": "Book the car service",
                        "note": "",
                        "done": false,
                        "hue": "blue"
                    },
                    {
                        "id": "3",
                        "title": "Send the March invoice",
                        "note": "",
                        "done": true,
                        "hue": "green"
                    },
                    {
                        "id": "4",
                        "title": "Water the plants",
                        "note": "",
                        "done": false,
                        "hue": "teal"
                    }
                ]
            },
            "draft": {
                "type": "text",
                "default": ""
            }
        },
        "actions": {
            "add": {
                "steps": [
                    {
                        "if": "$draft",
                        "then": [
                            {
                                "push": {
                                    "todos": {
                                        "id": "{$now}-{$todos | count}",
                                        "title": "$draft",
                                        "note": "",
                                        "done": false,
                                        "hue": "blue"
                                    }
                                },
                                "at": "end"
                            },
                            {
                                "set": {
                                    "draft": ""
                                }
                            }
                        ]
                    }
                ]
            },
            "tick": {
                "args": {
                    "id": "text"
                },
                "steps": [
                    {
                        "update": {
                            "todos": {
                                "match": {
                                    "id": "$args.id"
                                },
                                "set": {
                                    "done": "$args.value"
                                }
                            }
                        }
                    },
                    {
                        "haptic": "selection"
                    }
                ]
            },
            "remove_todo": {
                "args": {
                    "id": "text"
                },
                "steps": [
                    {
                        "remove": {
                            "todos": {
                                "match": {
                                    "id": "$args.id"
                                }
                            }
                        }
                    }
                ]
            },
            "clear_done": {
                "confirm": "Clear the finished to-dos?",
                "steps": [
                    {
                        "remove": {
                            "todos": {
                                "match": {
                                    "done": true
                                }
                            }
                        }
                    }
                ]
            }
        },
        "cards": [
            {
                "id": "main",
                "layout": {
                    "column": [
                        {
                            "progress": "$todos | share:'done'",
                            "label": "{$todos | where:'done' | count} of {$todos | count} done",
                            "percent": true,
                            "split": "$todos | count",
                            "size": "m",
                            "when": "$todos"
                        },
                        {
                            "field": "",
                            "type": "text",
                            "bind": "$draft",
                            "placeholder": "Add a to-do\u2026",
                            "on_submit": "add"
                        },
                        {
                            "column": [
                                {
                                    "list": "$todos",
                                    "empty": "Nothing to do. Add one above.",
                                    "item": {
                                        "cell": "$item.title",
                                        "subtitle": "$item.note",
                                        "check": "$item.done",
                                        "on_check": "tick",
                                        "check_hue": "$item.hue",
                                        "args": {
                                            "id": "$item.id"
                                        },
                                        "trailing": {
                                            "menu": "More for {$item.title}",
                                            "icon": "ellipsis",
                                            "icon_only": true,
                                            "items": [
                                                {
                                                    "label": "Delete",
                                                    "on": "remove_todo",
                                                    "args": {
                                                        "id": "$item.id"
                                                    },
                                                    "style": "destructive"
                                                }
                                            ]
                                        }
                                    }
                                }
                            ],
                            "style": "inset"
                        }
                    ],
                    "gap": "m"
                },
                "footer": {
                    "row": [
                        {
                            "text": "{$todos | where:{done:false} | count} left",
                            "size": "s",
                            "emphasis": "subtle"
                        },
                        {
                            "spacer": true
                        },
                        {
                            "button": "Clear done",
                            "icon": "checkmark.circle",
                            "style": "plain",
                            "on": "clear_done",
                            "disabled": "$todos | where:'done' | count | map:{0:true, else:false}"
                        }
                    ],
                    "align": "center"
                }
            }
        ],
        "views": {
            "menubar": {
                "icon": "checklist",
                "label": "{$todos | where:{done:false} | count} left",
                "in_menu": "card"
            },
            "floating": {
                "card": "main",
                "width": "default"
            }
        }
    },
    "app_json": "{\n  \"schema\": \"tailapps/v0\",\n  \"app\": \"todo\",\n  \"name\": \"To-do\",\n  \"description\": \"A to-do list: add with Return, tick to finish, see what's left at a glance, and clear what's done. With Sync to My Devices on, it's the same on your Mac and iPhone.\",\n  \"icon\": \"checklist\",\n  \"version\": 2,\n  \"permissions\": [],\n  \"state\": {\n    \"todos\": {\n      \"type\": \"list\",\n      \"sync\": true,\n      \"default\": [\n        {\n          \"id\": \"1\",\n          \"title\": \"Reply to the design review\",\n          \"note\": \"Before Friday\",\n          \"done\": false,\n          \"hue\": \"orange\"\n        },\n        {\n          \"id\": \"2\",\n          \"title\": \"Book the car service\",\n          \"note\": \"\",\n          \"done\": false,\n          \"hue\": \"blue\"\n        },\n        {\n          \"id\": \"3\",\n          \"title\": \"Send the March invoice\",\n          \"note\": \"\",\n          \"done\": true,\n          \"hue\": \"green\"\n        },\n        {\n          \"id\": \"4\",\n          \"title\": \"Water the plants\",\n          \"note\": \"\",\n          \"done\": false,\n          \"hue\": \"teal\"\n        }\n      ]\n    },\n    \"draft\": {\n      \"type\": \"text\",\n      \"default\": \"\"\n    }\n  },\n  \"actions\": {\n    \"add\": {\n      \"steps\": [\n        {\n          \"if\": \"$draft\",\n          \"then\": [\n            {\n              \"push\": {\n                \"todos\": {\n                  \"id\": \"{$now}-{$todos | count}\",\n                  \"title\": \"$draft\",\n                  \"note\": \"\",\n                  \"done\": false,\n                  \"hue\": \"blue\"\n                }\n              },\n              \"at\": \"end\"\n            },\n            {\n              \"set\": {\n                \"draft\": \"\"\n              }\n            }\n          ]\n        }\n      ]\n    },\n    \"tick\": {\n      \"args\": {\n        \"id\": \"text\"\n      },\n      \"steps\": [\n        {\n          \"update\": {\n            \"todos\": {\n              \"match\": {\n                \"id\": \"$args.id\"\n              },\n              \"set\": {\n                \"done\": \"$args.value\"\n              }\n            }\n          }\n        },\n        {\n          \"haptic\": \"selection\"\n        }\n      ]\n    },\n    \"remove_todo\": {\n      \"args\": {\n        \"id\": \"text\"\n      },\n      \"steps\": [\n        {\n          \"remove\": {\n            \"todos\": {\n              \"match\": {\n                \"id\": \"$args.id\"\n              }\n            }\n          }\n        }\n      ]\n    },\n    \"clear_done\": {\n      \"confirm\": \"Clear the finished to-dos?\",\n      \"steps\": [\n        {\n          \"remove\": {\n            \"todos\": {\n              \"match\": {\n                \"done\": true\n              }\n            }\n          }\n        }\n      ]\n    }\n  },\n  \"cards\": [\n    {\n      \"id\": \"main\",\n      \"layout\": {\n        \"column\": [\n          {\n            \"progress\": \"$todos | share:'done'\",\n            \"label\": \"{$todos | where:'done' | count} of {$todos | count} done\",\n            \"percent\": true,\n            \"split\": \"$todos | count\",\n            \"size\": \"m\",\n            \"when\": \"$todos\"\n          },\n          {\n            \"field\": \"\",\n            \"type\": \"text\",\n            \"bind\": \"$draft\",\n            \"placeholder\": \"Add a to-do\u2026\",\n            \"on_submit\": \"add\"\n          },\n          {\n            \"column\": [\n              {\n                \"list\": \"$todos\",\n                \"empty\": \"Nothing to do. Add one above.\",\n                \"item\": {\n                  \"cell\": \"$item.title\",\n                  \"subtitle\": \"$item.note\",\n                  \"check\": \"$item.done\",\n                  \"on_check\": \"tick\",\n                  \"check_hue\": \"$item.hue\",\n                  \"args\": {\n                    \"id\": \"$item.id\"\n                  },\n                  \"trailing\": {\n                    \"menu\": \"More for {$item.title}\",\n                    \"icon\": \"ellipsis\",\n                    \"icon_only\": true,\n                    \"items\": [\n                      {\n                        \"label\": \"Delete\",\n                        \"on\": \"remove_todo\",\n                        \"args\": {\n                          \"id\": \"$item.id\"\n                        },\n                        \"style\": \"destructive\"\n                      }\n                    ]\n                  }\n                }\n              }\n            ],\n            \"style\": \"inset\"\n          }\n        ],\n        \"gap\": \"m\"\n      },\n      \"footer\": {\n        \"row\": [\n          {\n            \"text\": \"{$todos | where:{done:false} | count} left\",\n            \"size\": \"s\",\n            \"emphasis\": \"subtle\"\n          },\n          {\n            \"spacer\": true\n          },\n          {\n            \"button\": \"Clear done\",\n            \"icon\": \"checkmark.circle\",\n            \"style\": \"plain\",\n            \"on\": \"clear_done\",\n            \"disabled\": \"$todos | where:'done' | count | map:{0:true, else:false}\"\n          }\n        ],\n        \"align\": \"center\"\n      }\n    }\n  ],\n  \"views\": {\n    \"menubar\": {\n      \"icon\": \"checklist\",\n      \"label\": \"{$todos | where:{done:false} | count} left\",\n      \"in_menu\": \"card\"\n    },\n    \"floating\": {\n      \"card\": \"main\",\n      \"width\": \"default\"\n    }\n  }\n}\n",
    "files": []
}