{
    "tailapp": 2,
    "manifest": {
        "format": 2,
        "app_id": "tray",
        "name": "File Tray",
        "version": 1,
        "schema": "tailapps/v0",
        "exported_at": 1795564632,
        "from": "gallery",
        "connections": [],
        "files": {
            "app.json": "46b92eeb76f99371c1f99fc408b04204cd0c794b5a914df4b7b74664c898bc85"
        },
        "signature": "iPp20itQEEB4kCNmvApdNNBI6dhZXgyi9dfNNqY6eQnbqX5JEMvcqk/7sGB1hoGj0Ri6oPXMCg8jeOQouoxCAw==",
        "key_id": "gallery-1"
    },
    "app": {
        "schema": "tailapps/v0",
        "app": "tray",
        "name": "File Tray",
        "description": "A shelf for files: drop them on it, then drag one or all of them out to Finder or any app on your Mac, or share them from your iPhone. Files stay a day.",
        "icon": "tray",
        "version": 1,
        "permissions": [
            "share"
        ],
        "settings": {
            "clear_on_drag": {
                "type": "toggle",
                "label": "Take a file off the tray once it's dragged out",
                "default": true
            }
        },
        "state": {
            "tray": {
                "type": "list",
                "default": []
            }
        },
        "actions": {
            "add": {
                "steps": [
                    {
                        "each": "$args.files",
                        "do": [
                            {
                                "push": {
                                    "tray": "$item"
                                },
                                "max": 50
                            }
                        ],
                        "max": 100
                    }
                ]
            },
            "took": {
                "steps": [
                    {
                        "if": "$settings.clear_on_drag",
                        "then": [
                            {
                                "remove": {
                                    "tray": {
                                        "match": {
                                            "path": "$args.item.path"
                                        }
                                    }
                                }
                            }
                        ]
                    }
                ]
            },
            "took_all": {
                "steps": [
                    {
                        "if": "$settings.clear_on_drag",
                        "then": [
                            {
                                "set": {
                                    "tray": []
                                }
                            }
                        ]
                    }
                ]
            },
            "share_one": {
                "args": {
                    "path": "text"
                },
                "steps": [
                    {
                        "share": {
                            "file": "$args.path"
                        }
                    }
                ]
            },
            "drop_one": {
                "args": {
                    "path": "text"
                },
                "steps": [
                    {
                        "remove": {
                            "tray": {
                                "match": {
                                    "path": "$args.path"
                                }
                            }
                        }
                    }
                ]
            },
            "clear": {
                "steps": [
                    {
                        "set": {
                            "tray": []
                        }
                    }
                ]
            }
        },
        "cards": [
            {
                "id": "main",
                "layout": {
                    "column": [
                        {
                            "drop": "Drop files here",
                            "multiple": true,
                            "max": 50,
                            "size": "s",
                            "on": "add"
                        },
                        {
                            "column": [
                                {
                                    "list": "$tray",
                                    "limit": 50,
                                    "empty": "Nothing on the tray.",
                                    "item": {
                                        "cell": "$item.name",
                                        "subtitle": "{$item.size | bytes} \u00b7 {$item.modified | ago}",
                                        "leading": "doc",
                                        "drag": "$item.path",
                                        "on_dragged": "took",
                                        "context_menu": [
                                            {
                                                "label": "Share\u2026",
                                                "icon": "square.and.arrow.up",
                                                "on": "share_one",
                                                "args": {
                                                    "path": "$item.path"
                                                }
                                            },
                                            {
                                                "label": "Remove",
                                                "icon": "xmark",
                                                "on": "drop_one",
                                                "args": {
                                                    "path": "$item.path"
                                                }
                                            }
                                        ]
                                    }
                                }
                            ],
                            "style": "inset"
                        },
                        {
                            "row": [
                                {
                                    "badge": "Drag all",
                                    "tone": "accent",
                                    "drag": {
                                        "files": "$tray"
                                    },
                                    "on_dragged": "took_all",
                                    "platforms": [
                                        "macos"
                                    ]
                                },
                                {
                                    "spacer": true
                                },
                                {
                                    "button": "Clear",
                                    "on": "clear",
                                    "style": "plain"
                                }
                            ],
                            "align": "center",
                            "when": "$tray"
                        }
                    ],
                    "gap": "m"
                }
            }
        ],
        "views": {
            "menubar": {
                "icon": "tray",
                "card": "main"
            }
        }
    },
    "app_json": "{\n  \"schema\": \"tailapps/v0\",\n  \"app\": \"tray\",\n  \"name\": \"File Tray\",\n  \"description\": \"A shelf for files: drop them on it, then drag one or all of them out to Finder or any app on your Mac, or share them from your iPhone. Files stay a day.\",\n  \"icon\": \"tray\",\n  \"version\": 1,\n  \"permissions\": [\"share\"],\n  \"settings\": {\n    \"clear_on_drag\": { \"type\": \"toggle\", \"label\": \"Take a file off the tray once it's dragged out\", \"default\": true }\n  },\n  \"state\": {\n    \"tray\": { \"type\": \"list\", \"default\": [] }\n  },\n  \"actions\": {\n    \"add\": {\n      \"steps\": [\n        { \"each\": \"$args.files\", \"do\": [{ \"push\": { \"tray\": \"$item\" }, \"max\": 50 }], \"max\": 100 }\n      ]\n    },\n    \"took\": {\n      \"steps\": [\n        { \"if\": \"$settings.clear_on_drag\", \"then\": [{ \"remove\": { \"tray\": { \"match\": { \"path\": \"$args.item.path\" } } } }] }\n      ]\n    },\n    \"took_all\": {\n      \"steps\": [{ \"if\": \"$settings.clear_on_drag\", \"then\": [{ \"set\": { \"tray\": [] } }] }]\n    },\n    \"share_one\": {\n      \"args\": { \"path\": \"text\" },\n      \"steps\": [{ \"share\": { \"file\": \"$args.path\" } }]\n    },\n    \"drop_one\": {\n      \"args\": { \"path\": \"text\" },\n      \"steps\": [{ \"remove\": { \"tray\": { \"match\": { \"path\": \"$args.path\" } } } }]\n    },\n    \"clear\": {\n      \"steps\": [{ \"set\": { \"tray\": [] } }]\n    }\n  },\n  \"cards\": [\n    {\n      \"id\": \"main\",\n      \"layout\": {\n        \"column\": [\n          { \"drop\": \"Drop files here\", \"multiple\": true, \"max\": 50, \"size\": \"s\", \"on\": \"add\" },\n          {\n            \"column\": [{\n            \"list\": \"$tray\",\n            \"limit\": 50,\n            \"empty\": \"Nothing on the tray.\",\n            \"item\": {\n              \"cell\": \"$item.name\",\n              \"subtitle\": \"{$item.size | bytes} \u00b7 {$item.modified | ago}\",\n              \"leading\": \"doc\",\n              \"drag\": \"$item.path\",\n              \"on_dragged\": \"took\",\n              \"context_menu\": [\n                { \"label\": \"Share\u2026\", \"icon\": \"square.and.arrow.up\", \"on\": \"share_one\", \"args\": { \"path\": \"$item.path\" } },\n                { \"label\": \"Remove\", \"icon\": \"xmark\", \"on\": \"drop_one\", \"args\": { \"path\": \"$item.path\" } }\n              ]\n            }\n            }],\n            \"style\": \"inset\"\n          },\n          {\n            \"row\": [\n              { \"badge\": \"Drag all\", \"tone\": \"accent\", \"drag\": { \"files\": \"$tray\" }, \"on_dragged\": \"took_all\", \"platforms\": [\"macos\"] },\n              { \"spacer\": true },\n              { \"button\": \"Clear\", \"on\": \"clear\", \"style\": \"plain\" }\n            ],\n            \"align\": \"center\",\n            \"when\": \"$tray\"\n          }\n        ],\n        \"gap\": \"m\"\n      }\n    }\n  ],\n  \"views\": {\n    \"menubar\": { \"icon\": \"tray\", \"card\": \"main\" }\n  }\n}\n",
    "files": []
}