{
    "tailapp": 2,
    "manifest": {
        "format": 2,
        "app_id": "clipboard-history",
        "name": "Clipboard History",
        "version": 1,
        "schema": "tailapps/v0",
        "exported_at": 1795564584,
        "from": "gallery",
        "connections": [],
        "files": {
            "app.json": "bcd43a04b48a57d6b6f9ebd5cc715a66aea820b0cb9f041141e5d9aa28987f8d"
        },
        "signature": "RG9kIIBxnb5xqTwF3T6OSE6hhOWNmfg8kY640+f4zTd8r0Iif8T0wy6EGLz7UNrfdrM3Qlnl+HYRqm1i+7vaAg==",
        "key_id": "gallery-1"
    },
    "app": {
        "schema": "tailapps/v0",
        "app": "clipboard-history",
        "name": "Clipboard History",
        "description": "Keeps the last 50 things you copy on your Mac, text and pictures, to copy again with a click. Passwords are skipped, and it never syncs. On the iPhone, tap Paste to keep what you copied.",
        "icon": "list.clipboard",
        "version": 1,
        "sync": "never",
        "permissions": [
            "clipboard.read",
            "clipboard.write"
        ],
        "settings": {
            "paused": {
                "type": "toggle",
                "label": "Pause (don't keep new copies)",
                "default": false,
                "platforms": [
                    "macos"
                ]
            }
        },
        "sources": {
            "clip": {
                "clipboard": [
                    "text",
                    "image"
                ],
                "on_change": {
                    "action": "keep",
                    "watch": "$clip.change"
                },
                "platforms": [
                    "macos"
                ]
            }
        },
        "state": {
            "history": {
                "type": "list",
                "default": []
            }
        },
        "actions": {
            "keep": {
                "steps": [
                    {
                        "if": "$settings.paused | map:{true:false, else:true}",
                        "then": [
                            {
                                "if": "$clip.kind | map:{text:true, image:true, else:false}",
                                "then": [
                                    {
                                        "if": "$clip.kind | map:{text:true, else:false}",
                                        "then": [
                                            {
                                                "remove": {
                                                    "history": {
                                                        "match": {
                                                            "text": "$clip.text"
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "push": {
                                            "history": {
                                                "id": "{$clip.at}-{$clip.change}",
                                                "kind": "$clip.kind",
                                                "text": "$clip.text",
                                                "image": "$clip.image",
                                                "from": "$clip.from",
                                                "at": "$clip.at"
                                            }
                                        },
                                        "max": 50
                                    }
                                ]
                            }
                        ]
                    }
                ]
            },
            "paste": {
                "steps": [
                    {
                        "clipboard.read": [
                            "text",
                            "image"
                        ],
                        "as": "pasted"
                    },
                    {
                        "if": "$pasted.kind | map:{text:true, image:true, else:false}",
                        "then": [
                            {
                                "if": "$pasted.kind | map:{text:true, else:false}",
                                "then": [
                                    {
                                        "remove": {
                                            "history": {
                                                "match": {
                                                    "text": "$pasted.text"
                                                }
                                            }
                                        }
                                    }
                                ]
                            },
                            {
                                "push": {
                                    "history": {
                                        "id": "{$pasted.at}-{$pasted.change}",
                                        "kind": "$pasted.kind",
                                        "text": "$pasted.text",
                                        "image": "$pasted.image",
                                        "from": "$pasted.from",
                                        "at": "$pasted.at"
                                    }
                                },
                                "max": 50
                            }
                        ]
                    }
                ]
            },
            "copy": {
                "args": {
                    "text": "text"
                },
                "steps": [
                    {
                        "clipboard.write": {
                            "text": "$args.text"
                        }
                    }
                ]
            },
            "copy_image": {
                "args": {
                    "id": "text",
                    "path": "text"
                },
                "steps": [
                    {
                        "clipboard.write": {
                            "image": "$args.path"
                        }
                    },
                    {
                        "if": "$settings.paused | map:{true:false, else:true}",
                        "then": [
                            {
                                "remove": {
                                    "history": {
                                        "match": {
                                            "id": "$args.id"
                                        }
                                    }
                                }
                            }
                        ]
                    }
                ]
            },
            "forget": {
                "args": {
                    "id": "text"
                },
                "steps": [
                    {
                        "remove": {
                            "history": {
                                "match": {
                                    "id": "$args.id"
                                }
                            }
                        }
                    }
                ]
            },
            "clear": {
                "confirm": "Forget everything in your clipboard history?",
                "steps": [
                    {
                        "set": {
                            "history": []
                        }
                    }
                ]
            }
        },
        "cards": [
            {
                "id": "main",
                "layout": {
                    "column": [
                        {
                            "row": [
                                {
                                    "text": "{$history | count} copies",
                                    "emphasis": "subtle",
                                    "size": "s",
                                    "grow": true
                                },
                                {
                                    "badge": "Paused",
                                    "tone": "warn",
                                    "when": "$settings.paused"
                                },
                                {
                                    "button": "Paste",
                                    "icon": "doc.on.clipboard",
                                    "on": "paste",
                                    "style": "primary",
                                    "platforms": [
                                        "ios"
                                    ]
                                },
                                {
                                    "button": "Clear",
                                    "on": "clear",
                                    "style": "plain",
                                    "when": "$history"
                                }
                            ],
                            "align": "center"
                        },
                        {
                            "text": "Copy something anywhere on your Mac and it shows up here.",
                            "emphasis": "subtle",
                            "when": "$history | count | map:{0:true, else:false}",
                            "platforms": [
                                "macos"
                            ]
                        },
                        {
                            "text": "Copy something, then tap Paste to keep it here.",
                            "emphasis": "subtle",
                            "when": "$history | count | map:{0:true, else:false}",
                            "platforms": [
                                "ios"
                            ]
                        },
                        {
                            "list": "$history",
                            "limit": 20,
                            "item": {
                                "row": [
                                    {
                                        "column": [
                                            {
                                                "text": "$item.text",
                                                "lines": 3,
                                                "size": "s",
                                                "when": "$item.kind | map:{text:true, else:false}"
                                            },
                                            {
                                                "image": "$item.image",
                                                "height": "m",
                                                "alt": "Copied picture",
                                                "preview": true,
                                                "when": "$item.kind | map:{image:true, else:false}"
                                            },
                                            {
                                                "text": "{$item.from | default:'Copied'} \u00b7 {$item.at | ago}",
                                                "size": "xs",
                                                "emphasis": "subtle"
                                            }
                                        ],
                                        "gap": "xs",
                                        "grow": true
                                    },
                                    {
                                        "button": "Copy",
                                        "icon": "doc.on.doc",
                                        "icon_only": true,
                                        "style": "plain",
                                        "on": "copy",
                                        "args": {
                                            "text": "$item.text"
                                        },
                                        "when": "$item.kind | map:{text:true, else:false}"
                                    },
                                    {
                                        "button": "Copy picture",
                                        "icon": "doc.on.doc",
                                        "icon_only": true,
                                        "style": "plain",
                                        "on": "copy_image",
                                        "args": {
                                            "id": "$item.id",
                                            "path": "$item.image"
                                        },
                                        "when": "$item.kind | map:{image:true, else:false}",
                                        "platforms": [
                                            "macos"
                                        ]
                                    },
                                    {
                                        "button": "Forget",
                                        "icon": "xmark",
                                        "icon_only": true,
                                        "style": "plain",
                                        "on": "forget",
                                        "args": {
                                            "id": "$item.id"
                                        }
                                    }
                                ],
                                "align": "center"
                            }
                        }
                    ],
                    "gap": "m"
                }
            }
        ],
        "views": {
            "menubar": {
                "icon": "list.clipboard",
                "card": "main"
            },
            "floating": {
                "card": "main",
                "width": "default"
            }
        }
    },
    "app_json": "{\n  \"schema\": \"tailapps/v0\",\n  \"app\": \"clipboard-history\",\n  \"name\": \"Clipboard History\",\n  \"description\": \"Keeps the last 50 things you copy on your Mac, text and pictures, to copy again with a click. Passwords are skipped, and it never syncs. On the iPhone, tap Paste to keep what you copied.\",\n  \"icon\": \"list.clipboard\",\n  \"version\": 1,\n  \"sync\": \"never\",\n  \"permissions\": [\"clipboard.read\", \"clipboard.write\"],\n  \"settings\": {\n    \"paused\": { \"type\": \"toggle\", \"label\": \"Pause (don't keep new copies)\", \"default\": false, \"platforms\": [\"macos\"] }\n  },\n  \"sources\": {\n    \"clip\": { \"clipboard\": [\"text\", \"image\"], \"on_change\": { \"action\": \"keep\", \"watch\": \"$clip.change\" }, \"platforms\": [\"macos\"] }\n  },\n  \"state\": {\n    \"history\": { \"type\": \"list\", \"default\": [] }\n  },\n  \"actions\": {\n    \"keep\": {\n      \"steps\": [\n        { \"if\": \"$settings.paused | map:{true:false, else:true}\", \"then\": [\n          { \"if\": \"$clip.kind | map:{text:true, image:true, else:false}\", \"then\": [\n            { \"if\": \"$clip.kind | map:{text:true, else:false}\", \"then\": [\n              { \"remove\": { \"history\": { \"match\": { \"text\": \"$clip.text\" } } } }\n            ] },\n            { \"push\": { \"history\": { \"id\": \"{$clip.at}-{$clip.change}\", \"kind\": \"$clip.kind\", \"text\": \"$clip.text\", \"image\": \"$clip.image\", \"from\": \"$clip.from\", \"at\": \"$clip.at\" } }, \"max\": 50 }\n          ] }\n        ] }\n      ]\n    },\n    \"paste\": {\n      \"steps\": [\n        { \"clipboard.read\": [\"text\", \"image\"], \"as\": \"pasted\" },\n        { \"if\": \"$pasted.kind | map:{text:true, image:true, else:false}\", \"then\": [\n          { \"if\": \"$pasted.kind | map:{text:true, else:false}\", \"then\": [\n            { \"remove\": { \"history\": { \"match\": { \"text\": \"$pasted.text\" } } } }\n          ] },\n          { \"push\": { \"history\": { \"id\": \"{$pasted.at}-{$pasted.change}\", \"kind\": \"$pasted.kind\", \"text\": \"$pasted.text\", \"image\": \"$pasted.image\", \"from\": \"$pasted.from\", \"at\": \"$pasted.at\" } }, \"max\": 50 }\n        ] }\n      ]\n    },\n    \"copy\": {\n      \"args\": { \"text\": \"text\" },\n      \"steps\": [\n        { \"clipboard.write\": { \"text\": \"$args.text\" } }\n      ]\n    },\n    \"copy_image\": {\n      \"args\": { \"id\": \"text\", \"path\": \"text\" },\n      \"steps\": [\n        { \"clipboard.write\": { \"image\": \"$args.path\" } },\n        { \"if\": \"$settings.paused | map:{true:false, else:true}\", \"then\": [\n          { \"remove\": { \"history\": { \"match\": { \"id\": \"$args.id\" } } } }\n        ] }\n      ]\n    },\n    \"forget\": {\n      \"args\": { \"id\": \"text\" },\n      \"steps\": [\n        { \"remove\": { \"history\": { \"match\": { \"id\": \"$args.id\" } } } }\n      ]\n    },\n    \"clear\": {\n      \"confirm\": \"Forget everything in your clipboard history?\",\n      \"steps\": [\n        { \"set\": { \"history\": [] } }\n      ]\n    }\n  },\n  \"cards\": [{\n    \"id\": \"main\",\n    \"layout\": {\n      \"column\": [\n        { \"row\": [\n          { \"text\": \"{$history | count} copies\", \"emphasis\": \"subtle\", \"size\": \"s\", \"grow\": true },\n          { \"badge\": \"Paused\", \"tone\": \"warn\", \"when\": \"$settings.paused\" },\n          { \"button\": \"Paste\", \"icon\": \"doc.on.clipboard\", \"on\": \"paste\", \"style\": \"primary\", \"platforms\": [\"ios\"] },\n          { \"button\": \"Clear\", \"on\": \"clear\", \"style\": \"plain\", \"when\": \"$history\" }\n        ], \"align\": \"center\" },\n        { \"text\": \"Copy something anywhere on your Mac and it shows up here.\", \"emphasis\": \"subtle\", \"when\": \"$history | count | map:{0:true, else:false}\", \"platforms\": [\"macos\"] },\n        { \"text\": \"Copy something, then tap Paste to keep it here.\", \"emphasis\": \"subtle\", \"when\": \"$history | count | map:{0:true, else:false}\", \"platforms\": [\"ios\"] },\n        { \"list\": \"$history\", \"limit\": 20, \"item\": {\n          \"row\": [\n            { \"column\": [\n              { \"text\": \"$item.text\", \"lines\": 3, \"size\": \"s\", \"when\": \"$item.kind | map:{text:true, else:false}\" },\n              { \"image\": \"$item.image\", \"height\": \"m\", \"alt\": \"Copied picture\", \"preview\": true, \"when\": \"$item.kind | map:{image:true, else:false}\" },\n              { \"text\": \"{$item.from | default:'Copied'} \u00b7 {$item.at | ago}\", \"size\": \"xs\", \"emphasis\": \"subtle\" }\n            ], \"gap\": \"xs\", \"grow\": true },\n            { \"button\": \"Copy\", \"icon\": \"doc.on.doc\", \"icon_only\": true, \"style\": \"plain\", \"on\": \"copy\", \"args\": { \"text\": \"$item.text\" }, \"when\": \"$item.kind | map:{text:true, else:false}\" },\n            { \"button\": \"Copy picture\", \"icon\": \"doc.on.doc\", \"icon_only\": true, \"style\": \"plain\", \"on\": \"copy_image\", \"args\": { \"id\": \"$item.id\", \"path\": \"$item.image\" }, \"when\": \"$item.kind | map:{image:true, else:false}\", \"platforms\": [\"macos\"] },\n            { \"button\": \"Forget\", \"icon\": \"xmark\", \"icon_only\": true, \"style\": \"plain\", \"on\": \"forget\", \"args\": { \"id\": \"$item.id\" } }\n          ], \"align\": \"center\"\n        } }\n      ],\n      \"gap\": \"m\"\n    }\n  }],\n  \"views\": {\n    \"menubar\": { \"icon\": \"list.clipboard\", \"card\": \"main\" },\n    \"floating\": { \"card\": \"main\", \"width\": \"default\" }\n  }\n}\n",
    "files": []
}