{
  "name": "test-helper",
  "publisher": "typst",
  "displayName": "Typst Test Helper",
  "description": "Helps to run, compare and update Typst tests.",
  "version": "0.0.1",
  "engines": {
    "vscode": "^1.71.0"
  },
  "categories": [
    "Other"
  ],
  "activationEvents": [
    "onCommand:Typst.test-helper.openFromSource",
    "onCommand:Typst.test-helper.refreshFromSource",
    "onCommand:Typst.test-helper.refreshFromPreview",
    "onCommand:Typst.test-helper.runFromSource",
    "onCommand:Typst.test-helper.runFromPreview",
    "onCommand:Typst.test-helper.updateFromSource",
    "onCommand:Typst.test-helper.updateFromPreview",
    "onCommand:Typst.test-helper.copyImageFilePathFromPreviewContext"
  ],
  "main": "./extension.js",
  "contributes": {
    "commands": [
      {
        "command": "Typst.test-helper.openFromSource",
        "title": "Open test output",
        "category": "Typst.test-helper",
        "icon": "$(plus)"
      },
      {
        "command": "Typst.test-helper.refreshFromSource",
        "title": "Refresh preview",
        "category": "Typst.test-helper",
        "icon": "$(refresh)"
      },
      {
        "command": "Typst.test-helper.refreshFromPreview",
        "title": "Refresh preview",
        "category": "Typst.test-helper",
        "icon": "$(refresh)"
      },
      {
        "command": "Typst.test-helper.runFromSource",
        "title": "Run test",
        "category": "Typst.test-helper",
        "icon": "$(debug-start)",
        "enablement": "!Typst.test-helper.disableRunTestButton"
      },
      {
        "command": "Typst.test-helper.runFromPreview",
        "title": "Run test",
        "category": "Typst.test-helper",
        "icon": "$(debug-start)",
        "enablement": "!Typst.test-helper.disableRunTestButton"
      },
      {
        "command": "Typst.test-helper.updateFromSource",
        "title": "Update reference image",
        "category": "Typst.test-helper",
        "icon": "$(save)"
      },
      {
        "command": "Typst.test-helper.updateFromPreview",
        "title": "Update reference image",
        "category": "Typst.test-helper",
        "icon": "$(save)"
      },
      {
        "command": "Typst.test-helper.copyImageFilePathFromPreviewContext",
        "title": "Copy image file path"
      }
    ],
    "menus": {
      "editor/title": [
        {
          "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
          "command": "Typst.test-helper.openFromSource",
          "group": "navigation@1"
        },
        {
          "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
          "command": "Typst.test-helper.refreshFromSource",
          "group": "navigation@2"
        },
        {
          "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
          "command": "Typst.test-helper.runFromSource",
          "group": "navigation@3"
        },
        {
          "when": "resourceExtname == .typ && resourcePath =~ /.*tests.*/",
          "command": "Typst.test-helper.updateFromSource",
          "group": "navigation@4"
        },
        {
          "when": "activeWebviewPanelId == Typst.test-helper.preview",
          "command": "Typst.test-helper.refreshFromPreview",
          "group": "navigation@1"
        },
        {
          "when": "activeWebviewPanelId == Typst.test-helper.preview",
          "command": "Typst.test-helper.runFromPreview",
          "group": "navigation@2"
        },
        {
          "when": "activeWebviewPanelId == Typst.test-helper.preview",
          "command": "Typst.test-helper.updateFromPreview",
          "group": "navigation@3"
        }
      ],
      "webview/context": [
        {
          "command": "Typst.test-helper.copyImageFilePathFromPreviewContext",
          "when": "webviewId == Typst.test-helper.preview && (webviewSection == png || webviewSection == ref)"
        }
      ]
    }
  },
  "devDependencies": {
    "@types/vscode": "^1.53.0",
    "@types/node": "^12.11.7"
  }
}