{
  "$schema": "https://www.raycast.com/schemas/extension.json",
  "version": "1.0.0",
  "name": "thingtime-commander",
  "title": "Thingtime Commander",
  "description": "Next generation command runner for software",
  "scripts": {
    "build": "ray build -e dist",
    "dev": "ray develop",
    "fix-lint": "ray lint --fix",
    "lint": "ray lint",
    "publish": "ray publish"
  },
  "keywords": [
    "Lopu",
    "Thingtime",
    "Commander"
  ],
  "icon": "command-icon.png",
  "author": "nikolajfrey",
  "contributors": [
    "arronhunt"
  ],
  "categories": [
    "Media",
    "Productivity",
    "Design Tools"
  ],
  "license": "MIT",
  "preferences": [
    {
      "title": "Image Input",
      "name": "inputMethod",
      "description": "Where to obtain the image to modify.",
      "type": "dropdown",
      "data": [
        {
          "title": "Selection In Finder",
          "value": "Finder"
        },
        {
          "title": "Selection In Path Finder",
          "value": "Path Finder"
        },
        {
          "title": "Clipboard",
          "value": "Clipboard"
        }
      ],
      "default": "Finder",
      "required": false
    },
    {
      "title": "Image Output",
      "name": "imageResultHandling",
      "description": "How to handle the result of the image modification, i.e. where to save the modified image, or whether to copy it to the clipboard.",
      "type": "dropdown",
      "data": [
        {
          "title": "Replace Original",
          "value": "replaceOriginal"
        },
        {
          "title": "Save In Containing Folder",
          "value": "saveInContainingFolder"
        },
        {
          "title": "Copy to Clipboard",
          "value": "copyToClipboard"
        },
        {
          "title": "Open in Preview",
          "value": "openInPreview"
        },
        {
          "title": "Save To Downloads",
          "value": "saveToDownloads"
        },
        {
          "title": "Save to Desktop",
          "value": "saveToDesktop"
        }
      ],
      "default": "replaceOriginal",
      "required": false
    },
    {
      "title": "cwebp Lossless",
      "name": "cwebpLossless",
      "description": "Whether to use lossless conversion",
      "label": "Lossless",
      "type": "checkbox",
      "default": true,
      "required": false
    }
  ],
  "disabledCommands": [
    {
      "name": "commanderMagicInput",
      "title": "Magic Input",
      "description": "Evaluates a Magic Input",
      "mode": "no-view",
      "keywords": [
        "commander",
        "thingtime",
        "ai"
      ],
      "arguments": [
        {
          "placeholder": "Path",
          "name": "path",
          "type": "text",
          "description": "The path to open the new finder window at",
          "required": false
        }
      ],
      "preferences": [
        {
          "name": "name-openNewFinderWindow",
          "required": false,
          "type": "textfield",
          "key": "name",
          "title": "Name of Command to run",
          "description": "The name of the command/function to run",
          "defaultValue": "openNewFinderWindow"
        }
      ]
    }
  ],
  "commands": [
    {
      "name": "commander",
      "title": "Commander",
      "description": "Open Thingtime Commander",
      "mode": "view",
      "keywords": [
        "commander",
        "thingtime",
        "ai"
      ],
      "preferences": [
        {
          "name": "name-MagicInput",
          "required": false,
          "type": "textfield",
          "key": "name",
          "title": "Name of Command to run",
          "description": "The name of the command/function to run",
          "defaultValue": "MagicInput"
        }
      ]
    },
    {
      "name": "commanderOpenNewFinderWindow",
      "title": "Open New Finder Window",
      "description": "Open new finder window",
      "mode": "no-view",
      "keywords": [
        "commander",
        "thingtime",
        "ai"
      ],
      "arguments": [
        {
          "placeholder": "Path",
          "name": "path",
          "type": "text",
          "description": "The path to open the new finder window at",
          "required": false
        }
      ],
      "preferences": [
        {
          "name": "name-openNewFinderWindow",
          "required": false,
          "type": "textfield",
          "key": "name",
          "title": "Name of Command to run",
          "description": "The name of the command/function to run",
          "defaultValue": "openNewFinderWindow"
        }
      ]
    },
    {
      "name": "commanderTrim",
      "title": "Trim image",
      "description": "Will trim all whitespace from an image",
      "mode": "no-view",
      "keywords": [
        "commander",
        "thingtime",
        "ai"
      ],
      "preferences": [
        {
          "name": "name-trim",
          "required": false,
          "type": "textfield",
          "key": "name",
          "title": "Name of Command to run",
          "description": "The name of the command/function to run",
          "defaultValue": "trim"
        }
      ]
    },
    {
      "name": "commanderMp4ToMp3",
      "title": "mp4 to mp3",
      "description": "Converts an mp4 into an mp3 using ffmpeg at 320Kbps",
      "mode": "no-view",
      "keywords": [
        "commander",
        "thingtime",
        "ai"
      ],
      "preferences": [
        {
          "name": "name-mp4ToMp3",
          "required": false,
          "type": "textfield",
          "key": "name",
          "title": "Name of Command to run",
          "description": "The name of the command/function to run",
          "defaultValue": "mp4ToMp3"
        }
      ]
    },
    {
      "name": "commanderConvert",
      "title": "Convert Images",
      "description": "Convert the selected images to the specified format",
      "mode": "view",
      "preferences": [
        {
          "name": "name-convert",
          "required": false,
          "type": "textfield",
          "key": "name",
          "title": "Name of Command to run",
          "description": "The name of the command/function to run",
          "defaultValue": "convert"
        },
        {
          "title": "Additional",
          "label": "Trim",
          "name": "trim",
          "description": "Whether to trim the image",
          "type": "checkbox",
          "default": false,
          "required": false
        },
        {
          "title": "Enabled Formats",
          "label": "WEBP",
          "name": "showWEBP",
          "description": "Whether to show WEBP as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "ASTC",
          "name": "showASTC",
          "description": "Whether to show ASTC as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "BMP",
          "name": "showBMP",
          "description": "Whether to show BMP as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "DDS",
          "name": "showDDS",
          "description": "Whether to show DDS as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "EXR",
          "name": "showEXR",
          "description": "Whether to show EXR as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "GIF",
          "name": "showGIF",
          "description": "Whether to show GIF as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "HEIC",
          "name": "showHEIC",
          "description": "Whether to show HEIC as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "HEICS",
          "name": "showHEICS",
          "description": "Whether to show HEICS as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "ICNS",
          "name": "showICNS",
          "description": "Whether to show ICNS as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "ICO",
          "name": "showICO",
          "description": "Whether to show ICO as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "JPEG",
          "name": "showJPEG",
          "description": "Whether to show JPEG as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "JP2",
          "name": "showJP2",
          "description": "Whether to show JP2 as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "KTX",
          "name": "showKTX",
          "description": "Whether to show KTX as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "PBM",
          "name": "showPBM",
          "description": "Whether to show PBM as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "PDF",
          "name": "showPDF",
          "description": "Whether to show PDF as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "PNG",
          "name": "showPNG",
          "description": "Whether to show PNG as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "PSD",
          "name": "showPSD",
          "description": "Whether to show PSD as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "PVR",
          "name": "showPVR",
          "description": "Whether to show PVR as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "TGA",
          "name": "showTGA",
          "description": "Whether to show TGA as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "TIFF",
          "name": "showTIFF",
          "description": "Whether to show TIFF as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        },
        {
          "label": "SVG",
          "name": "showSVG",
          "description": "Whether to show SVG as a conversion option",
          "type": "checkbox",
          "default": true,
          "required": false
        }
      ],
      "keywords": [
        "change",
        "transform"
      ]
    },
    {
      "name": "commanderRegexTrim",
      "title": "Regex Trim - Whitespace to (\\s*\\r*) Replacement",
      "description": "Will replace whitespace in the clipboard contents with (\\s*\\r*) to make find-all-replace easier",
      "mode": "no-view",
      "keywords": [
        "commander",
        "thingtime",
        "ai"
      ],
      "preferences": [
        {
          "name": "name-regexTrim",
          "required": false,
          "type": "textfield",
          "key": "name",
          "title": "Name of Command to run",
          "description": "The name of the command/function to run",
          "defaultValue": "regexTrim"
        }
      ]
    },
    {
      "name": "commanderRegexToReplacementConverter",
      "title": "Regex Replacement - Special Replacement",
      "description": "Will replace all regex (\\s*\\r*) in the clipboard contents with $1,$2,$3.. etc.. to make find-all-replace easier",
      "mode": "no-view",
      "keywords": [
        "commander",
        "thingtime",
        "ai"
      ],
      "preferences": [
        {
          "name": "name-regexToReplacementConverter",
          "required": false,
          "type": "textfield",
          "key": "name",
          "title": "Name of Command to run",
          "description": "The name of the command/function to run",
          "defaultValue": "regexToReplacementConverter"
        }
      ]
    }
  ],
  "dependencies": {
    "@raycast/api": "^1.69.3",
    "@raycast/utils": "^1.4.18",
    "fuse.js": "^7.0.0",
    "mathjs": "^11.8.2",
    "run-applescript": "^6.1.0",
    "svgo": "^3.0.2",
    "tar": "^6.2.0"
  },
  "devDependencies": {
    "@types/node": "20.8.10",
    "@types/react": "18.2.27",
    "@types/tar": "^6.1.11",
    "@typescript-eslint/eslint-plugin": "^5.0.0",
    "@typescript-eslint/parser": "^5.0.0",
    "eslint": "^7.32.0",
    "eslint-config-prettier": "^8.3.0",
    "prettier": "^2.5.1",
    "typescript": "^4.4.3"
  }
}
