mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-21 00:49:17 +01:00
Theme plugins (#231)
This commit is contained in:
505
package-lock.json
generated
505
package-lock.json
generated
@@ -34,6 +34,7 @@
|
||||
"plugins/template-function-response",
|
||||
"plugins/template-function-uuid",
|
||||
"plugins/template-function-xml",
|
||||
"plugins/themes-yaak",
|
||||
"src-tauri/yaak-crypto",
|
||||
"src-tauri/yaak-git",
|
||||
"src-tauri/yaak-fonts",
|
||||
@@ -54,7 +55,7 @@
|
||||
"@eslint/compat": "^1.3.0",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@eslint/js": "^9.29.0",
|
||||
"@tauri-apps/cli": "2.4.1",
|
||||
"@tauri-apps/cli": "^2.6.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
||||
"@typescript-eslint/parser": "^8.27.0",
|
||||
"@yaakapp/cli": "^0.1.5",
|
||||
@@ -1146,17 +1147,20 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint-community/eslint-utils": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
|
||||
"integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
|
||||
"version": "4.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz",
|
||||
"integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
"eslint-visitor-keys": "^3.4.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
|
||||
}
|
||||
@@ -2939,9 +2943,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.4.1.tgz",
|
||||
"integrity": "sha512-9Ta81jx9+57FhtU/mPIckDcOBtPTUdKM75t4+aA0X84b8Sclb0jy1xA8NplmcRzp2fsfIHNngU2NiRxsW5+yOQ==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.6.2.tgz",
|
||||
"integrity": "sha512-s1/eyBHxk0wG1blLeOY2IDjgZcxVrkxU5HFL8rNDwjYGr0o7yr3RAtwmuUPhz13NO+xGAL1bJZaLFBdp+5joKg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0 OR MIT",
|
||||
"bin": {
|
||||
@@ -2955,23 +2959,23 @@
|
||||
"url": "https://opencollective.com/tauri"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@tauri-apps/cli-darwin-arm64": "2.4.1",
|
||||
"@tauri-apps/cli-darwin-x64": "2.4.1",
|
||||
"@tauri-apps/cli-linux-arm-gnueabihf": "2.4.1",
|
||||
"@tauri-apps/cli-linux-arm64-gnu": "2.4.1",
|
||||
"@tauri-apps/cli-linux-arm64-musl": "2.4.1",
|
||||
"@tauri-apps/cli-linux-riscv64-gnu": "2.4.1",
|
||||
"@tauri-apps/cli-linux-x64-gnu": "2.4.1",
|
||||
"@tauri-apps/cli-linux-x64-musl": "2.4.1",
|
||||
"@tauri-apps/cli-win32-arm64-msvc": "2.4.1",
|
||||
"@tauri-apps/cli-win32-ia32-msvc": "2.4.1",
|
||||
"@tauri-apps/cli-win32-x64-msvc": "2.4.1"
|
||||
"@tauri-apps/cli-darwin-arm64": "2.6.2",
|
||||
"@tauri-apps/cli-darwin-x64": "2.6.2",
|
||||
"@tauri-apps/cli-linux-arm-gnueabihf": "2.6.2",
|
||||
"@tauri-apps/cli-linux-arm64-gnu": "2.6.2",
|
||||
"@tauri-apps/cli-linux-arm64-musl": "2.6.2",
|
||||
"@tauri-apps/cli-linux-riscv64-gnu": "2.6.2",
|
||||
"@tauri-apps/cli-linux-x64-gnu": "2.6.2",
|
||||
"@tauri-apps/cli-linux-x64-musl": "2.6.2",
|
||||
"@tauri-apps/cli-win32-arm64-msvc": "2.6.2",
|
||||
"@tauri-apps/cli-win32-ia32-msvc": "2.6.2",
|
||||
"@tauri-apps/cli-win32-x64-msvc": "2.6.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-darwin-arm64": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.4.1.tgz",
|
||||
"integrity": "sha512-QME7s8XQwy3LWClTVlIlwXVSLKkeJ/z88pr917Mtn9spYOjnBfsgHAgGdmpWD3NfJxjg7CtLbhH49DxoFL+hLg==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.6.2.tgz",
|
||||
"integrity": "sha512-YlvT+Yb7u2HplyN2Cf/nBplCQARC/I4uedlYHlgtxg6rV7xbo9BvG1jLOo29IFhqA2rOp5w1LtgvVGwsOf2kxw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2986,9 +2990,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-darwin-x64": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.4.1.tgz",
|
||||
"integrity": "sha512-/r89IcW6Ya1sEsFUEH7wLNruDTj7WmDWKGpPy7gATFtQr5JEY4heernqE82isjTUimnHZD8SCr0jA3NceI4ybw==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.6.2.tgz",
|
||||
"integrity": "sha512-21gdPWfv1bP8rkTdCL44in70QcYcPaDM70L+y78N8TkBuC+/+wqnHcwwjzb+mUyck6UoEw2DORagSI/oKKUGJw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3003,9 +3007,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.4.1.tgz",
|
||||
"integrity": "sha512-9tDijkRB+CchAGjXxYdY9l/XzFpLp1yihUtGXJz9eh+3qIoRI043n3e+6xmU8ZURr7XPnu+R4sCmXs6HD+NCEQ==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.6.2.tgz",
|
||||
"integrity": "sha512-MW8Y6HqHS5yzQkwGoLk/ZyE1tWpnz/seDoY4INsbvUZdknuUf80yn3H+s6eGKtT/0Bfqon/W9sY7pEkgHRPQgA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -3020,9 +3024,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-arm64-gnu": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.4.1.tgz",
|
||||
"integrity": "sha512-pnFGDEXBAzS4iDYAVxTRhAzNu3K2XPGflYyBc0czfHDBXopqRgMyj5Q9Wj7HAwv6cM8BqzXINxnb2ZJFGmbSgA==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.6.2.tgz",
|
||||
"integrity": "sha512-9PdINTUtnyrnQt9hvC4y1m0NoxKSw/wUB9OTBAQabPj8WLAdvySWiUpEiqJjwLhlu4T6ltXZRpNTEzous3/RXg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -3037,9 +3041,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-arm64-musl": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.1.tgz",
|
||||
"integrity": "sha512-Hp0zXgeZNKmT+eoJSCxSBUm2QndNuRxR55tmIeNm3vbyUMJN/49uW7nurZ5fBPsacN4Pzwlx1dIMK+Gnr9A69w==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.6.2.tgz",
|
||||
"integrity": "sha512-LrcJTRr7FrtQlTDkYaRXIGo/8YU/xkWmBPC646WwKNZ/S6yqCiDcOMoPe7Cx4ZvcG6sK6LUCLQMfaSNEL7PT0A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -3054,9 +3058,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-riscv64-gnu": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.4.1.tgz",
|
||||
"integrity": "sha512-3T3bo2E4fdYRvzcXheWUeQOVB+LunEEi92iPRgOyuSVexVE4cmHYl+MPJF+EUV28Et0hIVTsHibmDO0/04lAFg==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.6.2.tgz",
|
||||
"integrity": "sha512-GnTshO/BaZ9KGIazz2EiFfXGWgLur5/pjqklRA/ck42PGdUQJhV/Ao7A7TdXPjqAzpFxNo6M/Hx0GCH2iMS7IA==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -3071,9 +3075,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-x64-gnu": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.4.1.tgz",
|
||||
"integrity": "sha512-kLN0FdNONO+2i+OpU9+mm6oTGufRC00e197TtwjpC0N6K2K8130w7Q3FeODIM2CMyg0ov3tH+QWqKW7GNhHFzg==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.6.2.tgz",
|
||||
"integrity": "sha512-QDG3WeJD6UJekmrtVPCJRzlKgn9sGzhvD58oAw5gIU+DRovgmmG2U1jH9fS361oYGjWWO7d/KM9t0kugZzi4lQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3088,9 +3092,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-x64-musl": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.1.tgz",
|
||||
"integrity": "sha512-a8exvA5Ub9eg66a6hsMQKJIkf63QAf9OdiuFKOsEnKZkNN2x0NLgfvEcqdw88VY0UMs9dBoZ1AGbWMeYnLrLwQ==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.6.2.tgz",
|
||||
"integrity": "sha512-TNVTDDtnWzuVqWBFdZ4+8ZTg17tc21v+CT5XBQ+KYCoYtCrIaHpW04fS5Tmudi+vYdBwoPDfwpKEB6LhCeFraQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3105,9 +3109,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-win32-arm64-msvc": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.4.1.tgz",
|
||||
"integrity": "sha512-4JFrslsMCJQG1c573T9uqQSAbF3j/tMKkMWzsIssv8jvPiP++OG61A2/F+y9te9/Q/O95cKhDK63kaiO5xQaeg==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.6.2.tgz",
|
||||
"integrity": "sha512-z77C1oa/hMLO/jM1JF39tK3M3v9nou7RsBnQoOY54z5WPcpVAbS0XdFhXB7sSN72BOiO3moDky9lQANQz6L3CA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -3122,9 +3126,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-win32-ia32-msvc": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.4.1.tgz",
|
||||
"integrity": "sha512-9eXfFORehYSCRwxg2KodfmX/mhr50CI7wyBYGbPLePCjr5z0jK/9IyW6r0tC+ZVjwpX48dkk7hKiUgI25jHjzA==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.6.2.tgz",
|
||||
"integrity": "sha512-TmD8BbzbjluBw8+QEIWUVmFa9aAluSkT1N937n1mpYLXcPbTpbunqRFiIznTwupoJNJIdtpF/t7BdZDRh5rrcg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -3139,9 +3143,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-win32-x64-msvc": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.4.1.tgz",
|
||||
"integrity": "sha512-60a4Ov7Jrwqz2hzDltlS7301dhSAmM9dxo+IRBD3xz7yobKrgaHXYpWvnRomYItHcDd51VaKc9292H8/eE/gsw==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.6.2.tgz",
|
||||
"integrity": "sha512-ItB8RCKk+nCmqOxOvbNtltz6x1A4QX6cSM21kj3NkpcnjT9rHSMcfyf8WVI2fkoMUJR80iqCblUX6ARxC3lj6w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3497,21 +3501,21 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.27.0.tgz",
|
||||
"integrity": "sha512-4henw4zkePi5p252c8ncBLzLce52SEUz2Ebj8faDnuUXz2UuHEONYcJ+G0oaCF+bYCWVZtrGzq3FD7YXetmnSA==",
|
||||
"version": "8.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.35.1.tgz",
|
||||
"integrity": "sha512-9XNTlo7P7RJxbVeICaIIIEipqxLKguyh+3UbXuT2XQuFp6d8VOeDEGuz5IiX0dgZo8CiI6aOFLg4e8cF71SFVg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.10.0",
|
||||
"@typescript-eslint/scope-manager": "8.27.0",
|
||||
"@typescript-eslint/type-utils": "8.27.0",
|
||||
"@typescript-eslint/utils": "8.27.0",
|
||||
"@typescript-eslint/visitor-keys": "8.27.0",
|
||||
"@typescript-eslint/scope-manager": "8.35.1",
|
||||
"@typescript-eslint/type-utils": "8.35.1",
|
||||
"@typescript-eslint/utils": "8.35.1",
|
||||
"@typescript-eslint/visitor-keys": "8.35.1",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.3.1",
|
||||
"ignore": "^7.0.0",
|
||||
"natural-compare": "^1.4.0",
|
||||
"ts-api-utils": "^2.0.1"
|
||||
"ts-api-utils": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3521,22 +3525,32 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0",
|
||||
"@typescript-eslint/parser": "^8.35.1",
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
|
||||
"version": "7.0.5",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
|
||||
"integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.27.0.tgz",
|
||||
"integrity": "sha512-XGwIabPallYipmcOk45DpsBSgLC64A0yvdAkrwEzwZ2viqGqRUJ8eEYoPz0CWnutgAFbNMPdsGGvzjSmcWVlEA==",
|
||||
"version": "8.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.35.1.tgz",
|
||||
"integrity": "sha512-3MyiDfrfLeK06bi/g9DqJxP5pV74LNv4rFTyvGDmT3x2p1yp1lOd+qYZfiRPIOf/oON+WRZR5wxxuF85qOar+w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.27.0",
|
||||
"@typescript-eslint/types": "8.27.0",
|
||||
"@typescript-eslint/typescript-estree": "8.27.0",
|
||||
"@typescript-eslint/visitor-keys": "8.27.0",
|
||||
"@typescript-eslint/scope-manager": "8.35.1",
|
||||
"@typescript-eslint/types": "8.35.1",
|
||||
"@typescript-eslint/typescript-estree": "8.35.1",
|
||||
"@typescript-eslint/visitor-keys": "8.35.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3551,15 +3565,37 @@
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.27.0.tgz",
|
||||
"integrity": "sha512-8oI9GwPMQmBryaaxG1tOZdxXVeMDte6NyJA4i7/TWa4fBwgnAXYlIQP+uYOeqAaLJ2JRxlG9CAyL+C+YE9Xknw==",
|
||||
"node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.35.1.tgz",
|
||||
"integrity": "sha512-VYxn/5LOpVxADAuP3NrnxxHYfzVtQzLKeldIhDhzC8UHaiQvYlXvKuVho1qLduFbJjjy5U5bkGwa3rUGUb1Q6Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.27.0",
|
||||
"@typescript-eslint/visitor-keys": "8.27.0"
|
||||
"@typescript-eslint/tsconfig-utils": "^8.35.1",
|
||||
"@typescript-eslint/types": "^8.35.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.35.1.tgz",
|
||||
"integrity": "sha512-s/Bpd4i7ht2934nG+UoSPlYXd08KYz3bmjLEb7Ye1UVob0d1ENiT3lY8bsCmik4RqfSbPw9xJJHbugpPpP5JUg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.35.1",
|
||||
"@typescript-eslint/visitor-keys": "8.35.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3569,17 +3605,34 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.35.1.tgz",
|
||||
"integrity": "sha512-K5/U9VmT9dTHoNowWZpz+/TObS3xqC5h0xAIjXPw+MNcKV9qg6eSatEnmeAwkjHijhACH0/N7bkhKvbt1+DXWQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.27.0.tgz",
|
||||
"integrity": "sha512-wVArTVcz1oJOIEJxui/nRhV0TXzD/zMSOYi/ggCfNq78EIszddXcJb7r4RCp/oBrjt8n9A0BSxRMKxHftpDxDA==",
|
||||
"version": "8.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.35.1.tgz",
|
||||
"integrity": "sha512-HOrUBlfVRz5W2LIKpXzZoy6VTZzMu2n8q9C2V/cFngIC5U1nStJgv0tMV4sZPzdf4wQm9/ToWUFPMN9Vq9VJQQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "8.27.0",
|
||||
"@typescript-eslint/utils": "8.27.0",
|
||||
"@typescript-eslint/typescript-estree": "8.35.1",
|
||||
"@typescript-eslint/utils": "8.35.1",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^2.0.1"
|
||||
"ts-api-utils": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3594,9 +3647,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "8.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.27.0.tgz",
|
||||
"integrity": "sha512-/6cp9yL72yUHAYq9g6DsAU+vVfvQmd1a8KyA81uvfDE21O2DwQ/qxlM4AR8TSdAu+kJLBDrEHKC5/W2/nxsY0A==",
|
||||
"version": "8.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.35.1.tgz",
|
||||
"integrity": "sha512-q/O04vVnKHfrrhNAscndAn1tuQhIkwqnaW+eu5waD5IPts2eX1dgJxgqcPx5BX109/qAz7IG6VrEPTOYKCNfRQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3608,20 +3661,22 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.27.0.tgz",
|
||||
"integrity": "sha512-BnKq8cqPVoMw71O38a1tEb6iebEgGA80icSxW7g+kndx0o6ot6696HjG7NdgfuAVmVEtwXUr3L8R9ZuVjoQL6A==",
|
||||
"version": "8.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.35.1.tgz",
|
||||
"integrity": "sha512-Vvpuvj4tBxIka7cPs6Y1uvM7gJgdF5Uu9F+mBJBPY4MhvjrjWGK4H0lVgLJd/8PWZ23FTqsaJaLEkBCFUk8Y9g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.27.0",
|
||||
"@typescript-eslint/visitor-keys": "8.27.0",
|
||||
"@typescript-eslint/project-service": "8.35.1",
|
||||
"@typescript-eslint/tsconfig-utils": "8.35.1",
|
||||
"@typescript-eslint/types": "8.35.1",
|
||||
"@typescript-eslint/visitor-keys": "8.35.1",
|
||||
"debug": "^4.3.4",
|
||||
"fast-glob": "^3.3.2",
|
||||
"is-glob": "^4.0.3",
|
||||
"minimatch": "^9.0.4",
|
||||
"semver": "^7.6.0",
|
||||
"ts-api-utils": "^2.0.1"
|
||||
"ts-api-utils": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3635,16 +3690,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.27.0.tgz",
|
||||
"integrity": "sha512-njkodcwH1yvmo31YWgRHNb/x1Xhhq4/m81PhtvmRngD8iHPehxffz1SNCO+kwaePhATC+kOa/ggmvPoPza5i0Q==",
|
||||
"version": "8.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.35.1.tgz",
|
||||
"integrity": "sha512-lhnwatFmOFcazAsUm3ZnZFpXSxiwoa1Lj50HphnDe1Et01NF4+hrdXONSUHIcbVu2eFb1bAf+5yjXkGVkXBKAQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@typescript-eslint/scope-manager": "8.27.0",
|
||||
"@typescript-eslint/types": "8.27.0",
|
||||
"@typescript-eslint/typescript-estree": "8.27.0"
|
||||
"@eslint-community/eslint-utils": "^4.7.0",
|
||||
"@typescript-eslint/scope-manager": "8.35.1",
|
||||
"@typescript-eslint/types": "8.35.1",
|
||||
"@typescript-eslint/typescript-estree": "8.35.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3659,14 +3714,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.27.0.tgz",
|
||||
"integrity": "sha512-WsXQwMkILJvffP6z4U3FYJPlbf/j07HIxmDjZpbNvBJkMfvwXj5ACRkkHwBDvLBbDbtX5TdU64/rcvKJ/vuInQ==",
|
||||
"version": "8.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.35.1.tgz",
|
||||
"integrity": "sha512-VRwixir4zBWCSTP/ljEo091lbpypz57PoeAQ9imjG+vbeof9LplljsL1mos4ccG6H9IjfrVGM359RozUnuFhpw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.27.0",
|
||||
"eslint-visitor-keys": "^4.2.0"
|
||||
"@typescript-eslint/types": "8.35.1",
|
||||
"eslint-visitor-keys": "^4.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3677,9 +3732,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz",
|
||||
"integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==",
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
|
||||
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
@@ -3730,6 +3785,102 @@
|
||||
"integrity": "sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@yaak/auth-basic": {
|
||||
"resolved": "plugins/auth-basic",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/auth-bearer": {
|
||||
"resolved": "plugins/auth-bearer",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/auth-jwt": {
|
||||
"resolved": "plugins/auth-jwt",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/auth-oauth2": {
|
||||
"resolved": "plugins/auth-oauth2",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/exporter-curl": {
|
||||
"resolved": "plugins/exporter-curl",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/filter-jsonpath": {
|
||||
"resolved": "plugins/filter-jsonpath",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/filter-xpath": {
|
||||
"resolved": "plugins/filter-xpath",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/importer-curl": {
|
||||
"resolved": "plugins/importer-curl",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/importer-insomnia": {
|
||||
"resolved": "plugins/importer-insomnia",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/importer-openapi": {
|
||||
"resolved": "plugins/importer-openapi",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/importer-postman": {
|
||||
"resolved": "plugins/importer-postman",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/importer-yaak": {
|
||||
"resolved": "plugins/importer-yaak",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-cookie": {
|
||||
"resolved": "plugins/template-function-cookie",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-encode": {
|
||||
"resolved": "plugins/template-function-encode",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-fs": {
|
||||
"resolved": "plugins/template-function-fs",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-hash": {
|
||||
"resolved": "plugins/template-function-hash",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-json": {
|
||||
"resolved": "plugins/template-function-json",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-prompt": {
|
||||
"resolved": "plugins/template-function-prompt",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-regex": {
|
||||
"resolved": "plugins/template-function-regex",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-request": {
|
||||
"resolved": "plugins/template-function-request",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-response": {
|
||||
"resolved": "plugins/template-function-response",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-uuid": {
|
||||
"resolved": "plugins/template-function-uuid",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/template-function-xml": {
|
||||
"resolved": "plugins/template-function-xml",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaak/themes-yaak": {
|
||||
"resolved": "plugins/themes-yaak",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp-internal/crypto": {
|
||||
"resolved": "src-tauri/yaak-crypto",
|
||||
"link": true
|
||||
@@ -3790,22 +3941,6 @@
|
||||
"resolved": "src-web",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/auth-basic": {
|
||||
"resolved": "plugins/auth-basic",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/auth-bearer": {
|
||||
"resolved": "plugins/auth-bearer",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/auth-jwt": {
|
||||
"resolved": "plugins/auth-jwt",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/auth-oauth2": {
|
||||
"resolved": "plugins/auth-oauth2",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/cli": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@yaakapp/cli/-/cli-0.1.5.tgz",
|
||||
@@ -3879,82 +4014,6 @@
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@yaakapp/exporter-curl": {
|
||||
"resolved": "plugins/exporter-curl",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/filter-jsonpath": {
|
||||
"resolved": "plugins/filter-jsonpath",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/filter-xpath": {
|
||||
"resolved": "plugins/filter-xpath",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/importer-curl": {
|
||||
"resolved": "plugins/importer-curl",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/importer-insomnia": {
|
||||
"resolved": "plugins/importer-insomnia",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/importer-openapi": {
|
||||
"resolved": "plugins/importer-openapi",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/importer-postman": {
|
||||
"resolved": "plugins/importer-postman",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/importer-yaak": {
|
||||
"resolved": "plugins/importer-yaak",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-cookie": {
|
||||
"resolved": "plugins/template-function-cookie",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-encode": {
|
||||
"resolved": "plugins/template-function-encode",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-fs": {
|
||||
"resolved": "plugins/template-function-fs",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-hash": {
|
||||
"resolved": "plugins/template-function-hash",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-json": {
|
||||
"resolved": "plugins/template-function-json",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-prompt": {
|
||||
"resolved": "plugins/template-function-prompt",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-regex": {
|
||||
"resolved": "plugins/template-function-regex",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-request": {
|
||||
"resolved": "plugins/template-function-request",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-response": {
|
||||
"resolved": "plugins/template-function-response",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-uuid": {
|
||||
"resolved": "plugins/template-function-uuid",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@yaakapp/template-function-xml": {
|
||||
"resolved": "plugins/template-function-xml",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
@@ -17550,7 +17609,7 @@
|
||||
},
|
||||
"packages/plugin-runtime-types": {
|
||||
"name": "@yaakapp/api",
|
||||
"version": "0.6.4",
|
||||
"version": "0.6.5",
|
||||
"dependencies": {
|
||||
"@types/node": "^22.5.4"
|
||||
},
|
||||
@@ -17608,15 +17667,15 @@
|
||||
}
|
||||
},
|
||||
"plugins/auth-basic": {
|
||||
"name": "@yaakapp/auth-basic",
|
||||
"name": "@yaak/auth-basic",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/auth-bearer": {
|
||||
"name": "@yaakapp/auth-bearer",
|
||||
"name": "@yaak/auth-bearer",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/auth-jwt": {
|
||||
"name": "@yaakapp/auth-jwt",
|
||||
"name": "@yaak/auth-jwt",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"jsonwebtoken": "^9.0.2"
|
||||
@@ -17626,15 +17685,15 @@
|
||||
}
|
||||
},
|
||||
"plugins/auth-oauth2": {
|
||||
"name": "@yaakapp/auth-oauth2",
|
||||
"name": "@yaak/auth-oauth2",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/exporter-curl": {
|
||||
"name": "@yaakapp/exporter-curl",
|
||||
"name": "@yaak/exporter-curl",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/filter-jsonpath": {
|
||||
"name": "@yaakapp/filter-jsonpath",
|
||||
"name": "@yaak/filter-jsonpath",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"jsonpath-plus": "^10.3.0"
|
||||
@@ -17644,7 +17703,7 @@
|
||||
}
|
||||
},
|
||||
"plugins/filter-xpath": {
|
||||
"name": "@yaakapp/filter-xpath",
|
||||
"name": "@yaak/filter-xpath",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"@xmldom/xmldom": "^0.8.10",
|
||||
@@ -17652,7 +17711,7 @@
|
||||
}
|
||||
},
|
||||
"plugins/importer-curl": {
|
||||
"name": "@yaakapp/importer-curl",
|
||||
"name": "@yaak/importer-curl",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"shell-quote": "^1.8.1"
|
||||
@@ -17662,14 +17721,14 @@
|
||||
}
|
||||
},
|
||||
"plugins/importer-insomnia": {
|
||||
"name": "@yaakapp/importer-insomnia",
|
||||
"name": "@yaak/importer-insomnia",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"yaml": "^2.4.2"
|
||||
}
|
||||
},
|
||||
"plugins/importer-openapi": {
|
||||
"name": "@yaakapp/importer-openapi",
|
||||
"name": "@yaak/importer-openapi",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"openapi-to-postmanv2": "^5.0.0",
|
||||
@@ -17680,31 +17739,31 @@
|
||||
}
|
||||
},
|
||||
"plugins/importer-postman": {
|
||||
"name": "@yaakapp/importer-postman",
|
||||
"name": "@yaak/importer-postman",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/importer-yaak": {
|
||||
"name": "@yaakapp/importer-yaak",
|
||||
"name": "@yaak/importer-yaak",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/template-function-cookie": {
|
||||
"name": "@yaakapp/template-function-cookie",
|
||||
"name": "@yaak/template-function-cookie",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/template-function-encode": {
|
||||
"name": "@yaakapp/template-function-encode",
|
||||
"name": "@yaak/template-function-encode",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/template-function-fs": {
|
||||
"name": "@yaakapp/template-function-fs",
|
||||
"name": "@yaak/template-function-fs",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/template-function-hash": {
|
||||
"name": "@yaakapp/template-function-hash",
|
||||
"name": "@yaak/template-function-hash",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/template-function-json": {
|
||||
"name": "@yaakapp/template-function-json",
|
||||
"name": "@yaak/template-function-json",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"jsonpath-plus": "^10.3.0"
|
||||
@@ -17714,19 +17773,19 @@
|
||||
}
|
||||
},
|
||||
"plugins/template-function-prompt": {
|
||||
"name": "@yaakapp/template-function-prompt",
|
||||
"name": "@yaak/template-function-prompt",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/template-function-regex": {
|
||||
"name": "@yaakapp/template-function-regex",
|
||||
"name": "@yaak/template-function-regex",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/template-function-request": {
|
||||
"name": "@yaakapp/template-function-request",
|
||||
"name": "@yaak/template-function-request",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"plugins/template-function-response": {
|
||||
"name": "@yaakapp/template-function-response",
|
||||
"name": "@yaak/template-function-response",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"@xmldom/xmldom": "^0.8.10",
|
||||
@@ -17738,7 +17797,7 @@
|
||||
}
|
||||
},
|
||||
"plugins/template-function-uuid": {
|
||||
"name": "@yaakapp/template-function-uuid",
|
||||
"name": "@yaak/template-function-uuid",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"uuid": "^11.1.0"
|
||||
@@ -17758,13 +17817,17 @@
|
||||
}
|
||||
},
|
||||
"plugins/template-function-xml": {
|
||||
"name": "@yaakapp/template-function-xml",
|
||||
"name": "@yaak/template-function-xml",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"@xmldom/xmldom": "^0.8.10",
|
||||
"xpath": "^0.0.34"
|
||||
}
|
||||
},
|
||||
"plugins/themes-yaak": {
|
||||
"name": "@yaak/themes-yaak",
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"src-tauri/yaak_git": {
|
||||
"name": "@yaakapp-internal/git",
|
||||
"version": "1.0.0",
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"plugins/template-function-response",
|
||||
"plugins/template-function-uuid",
|
||||
"plugins/template-function-xml",
|
||||
"plugins/themes-yaak",
|
||||
"src-tauri/yaak-crypto",
|
||||
"src-tauri/yaak-git",
|
||||
"src-tauri/yaak-fonts",
|
||||
@@ -70,7 +71,7 @@
|
||||
"@eslint/compat": "^1.3.0",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@eslint/js": "^9.29.0",
|
||||
"@tauri-apps/cli": "2.4.1",
|
||||
"@tauri-apps/cli": "^2.6.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
||||
"@typescript-eslint/parser": "^8.27.0",
|
||||
"@yaakapp/cli": "^0.1.5",
|
||||
|
||||
@@ -12,7 +12,7 @@ export type CallHttpAuthenticationActionRequest = { index: number, pluginRefId:
|
||||
|
||||
export type CallHttpAuthenticationRequest = { contextId: string, values: { [key in string]?: JsonPrimitive }, method: string, url: string, headers: Array<HttpHeader>, };
|
||||
|
||||
export type CallHttpAuthenticationResponse = {
|
||||
export type CallHttpAuthenticationResponse = {
|
||||
/**
|
||||
* HTTP headers to add to the request. Existing headers will be replaced, while
|
||||
* new headers will be added.
|
||||
@@ -53,7 +53,7 @@ export type ExportHttpRequestRequest = { httpRequest: HttpRequest, };
|
||||
|
||||
export type ExportHttpRequestResponse = { content: string, };
|
||||
|
||||
export type FileFilter = { name: string,
|
||||
export type FileFilter = { name: string,
|
||||
/**
|
||||
* File extensions to require
|
||||
*/
|
||||
@@ -73,176 +73,176 @@ export type FormInputAccordion = { label: string, inputs?: Array<FormInput>, hid
|
||||
|
||||
export type FormInputBanner = { inputs?: Array<FormInput>, hidden?: boolean, color?: Color, };
|
||||
|
||||
export type FormInputBase = {
|
||||
export type FormInputBase = {
|
||||
/**
|
||||
* The name of the input. The value will be stored at this object attribute in the resulting data
|
||||
*/
|
||||
name: string,
|
||||
name: string,
|
||||
/**
|
||||
* Whether this input is visible for the given configuration. Use this to
|
||||
* make branching forms.
|
||||
*/
|
||||
hidden?: boolean,
|
||||
hidden?: boolean,
|
||||
/**
|
||||
* Whether the user must fill in the argument
|
||||
*/
|
||||
optional?: boolean,
|
||||
optional?: boolean,
|
||||
/**
|
||||
* The label of the input
|
||||
*/
|
||||
label?: string,
|
||||
label?: string,
|
||||
/**
|
||||
* Visually hide the label of the input
|
||||
*/
|
||||
hideLabel?: boolean,
|
||||
hideLabel?: boolean,
|
||||
/**
|
||||
* The default value
|
||||
*/
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
/**
|
||||
* Longer description of the input, likely shown in a tooltip
|
||||
*/
|
||||
description?: string, };
|
||||
|
||||
export type FormInputCheckbox = {
|
||||
export type FormInputCheckbox = {
|
||||
/**
|
||||
* The name of the input. The value will be stored at this object attribute in the resulting data
|
||||
*/
|
||||
name: string,
|
||||
name: string,
|
||||
/**
|
||||
* Whether this input is visible for the given configuration. Use this to
|
||||
* make branching forms.
|
||||
*/
|
||||
hidden?: boolean,
|
||||
hidden?: boolean,
|
||||
/**
|
||||
* Whether the user must fill in the argument
|
||||
*/
|
||||
optional?: boolean,
|
||||
optional?: boolean,
|
||||
/**
|
||||
* The label of the input
|
||||
*/
|
||||
label?: string,
|
||||
label?: string,
|
||||
/**
|
||||
* Visually hide the label of the input
|
||||
*/
|
||||
hideLabel?: boolean,
|
||||
hideLabel?: boolean,
|
||||
/**
|
||||
* The default value
|
||||
*/
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
/**
|
||||
* Longer description of the input, likely shown in a tooltip
|
||||
*/
|
||||
description?: string, };
|
||||
|
||||
export type FormInputEditor = {
|
||||
export type FormInputEditor = {
|
||||
/**
|
||||
* Placeholder for the text input
|
||||
*/
|
||||
placeholder?: string | null,
|
||||
placeholder?: string | null,
|
||||
/**
|
||||
* Don't show the editor gutter (line numbers, folds, etc.)
|
||||
*/
|
||||
hideGutter?: boolean,
|
||||
hideGutter?: boolean,
|
||||
/**
|
||||
* Language for syntax highlighting
|
||||
*/
|
||||
language?: EditorLanguage, readOnly?: boolean, completionOptions?: Array<GenericCompletionOption>,
|
||||
language?: EditorLanguage, readOnly?: boolean, completionOptions?: Array<GenericCompletionOption>,
|
||||
/**
|
||||
* The name of the input. The value will be stored at this object attribute in the resulting data
|
||||
*/
|
||||
name: string,
|
||||
name: string,
|
||||
/**
|
||||
* Whether this input is visible for the given configuration. Use this to
|
||||
* make branching forms.
|
||||
*/
|
||||
hidden?: boolean,
|
||||
hidden?: boolean,
|
||||
/**
|
||||
* Whether the user must fill in the argument
|
||||
*/
|
||||
optional?: boolean,
|
||||
optional?: boolean,
|
||||
/**
|
||||
* The label of the input
|
||||
*/
|
||||
label?: string,
|
||||
label?: string,
|
||||
/**
|
||||
* Visually hide the label of the input
|
||||
*/
|
||||
hideLabel?: boolean,
|
||||
hideLabel?: boolean,
|
||||
/**
|
||||
* The default value
|
||||
*/
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
/**
|
||||
* Longer description of the input, likely shown in a tooltip
|
||||
*/
|
||||
description?: string, };
|
||||
|
||||
export type FormInputFile = {
|
||||
export type FormInputFile = {
|
||||
/**
|
||||
* The title of the file selection window
|
||||
*/
|
||||
title: string,
|
||||
title: string,
|
||||
/**
|
||||
* Allow selecting multiple files
|
||||
*/
|
||||
multiple?: boolean, directory?: boolean, defaultPath?: string, filters?: Array<FileFilter>,
|
||||
multiple?: boolean, directory?: boolean, defaultPath?: string, filters?: Array<FileFilter>,
|
||||
/**
|
||||
* The name of the input. The value will be stored at this object attribute in the resulting data
|
||||
*/
|
||||
name: string,
|
||||
name: string,
|
||||
/**
|
||||
* Whether this input is visible for the given configuration. Use this to
|
||||
* make branching forms.
|
||||
*/
|
||||
hidden?: boolean,
|
||||
hidden?: boolean,
|
||||
/**
|
||||
* Whether the user must fill in the argument
|
||||
*/
|
||||
optional?: boolean,
|
||||
optional?: boolean,
|
||||
/**
|
||||
* The label of the input
|
||||
*/
|
||||
label?: string,
|
||||
label?: string,
|
||||
/**
|
||||
* Visually hide the label of the input
|
||||
*/
|
||||
hideLabel?: boolean,
|
||||
hideLabel?: boolean,
|
||||
/**
|
||||
* The default value
|
||||
*/
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
/**
|
||||
* Longer description of the input, likely shown in a tooltip
|
||||
*/
|
||||
description?: string, };
|
||||
|
||||
export type FormInputHttpRequest = {
|
||||
export type FormInputHttpRequest = {
|
||||
/**
|
||||
* The name of the input. The value will be stored at this object attribute in the resulting data
|
||||
*/
|
||||
name: string,
|
||||
name: string,
|
||||
/**
|
||||
* Whether this input is visible for the given configuration. Use this to
|
||||
* make branching forms.
|
||||
*/
|
||||
hidden?: boolean,
|
||||
hidden?: boolean,
|
||||
/**
|
||||
* Whether the user must fill in the argument
|
||||
*/
|
||||
optional?: boolean,
|
||||
optional?: boolean,
|
||||
/**
|
||||
* The label of the input
|
||||
*/
|
||||
label?: string,
|
||||
label?: string,
|
||||
/**
|
||||
* Visually hide the label of the input
|
||||
*/
|
||||
hideLabel?: boolean,
|
||||
hideLabel?: boolean,
|
||||
/**
|
||||
* The default value
|
||||
*/
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
/**
|
||||
* Longer description of the input, likely shown in a tooltip
|
||||
*/
|
||||
@@ -250,36 +250,36 @@ description?: string, };
|
||||
|
||||
export type FormInputMarkdown = { content: string, hidden?: boolean, };
|
||||
|
||||
export type FormInputSelect = {
|
||||
export type FormInputSelect = {
|
||||
/**
|
||||
* The options that will be available in the select input
|
||||
*/
|
||||
options: Array<FormInputSelectOption>,
|
||||
options: Array<FormInputSelectOption>,
|
||||
/**
|
||||
* The name of the input. The value will be stored at this object attribute in the resulting data
|
||||
*/
|
||||
name: string,
|
||||
name: string,
|
||||
/**
|
||||
* Whether this input is visible for the given configuration. Use this to
|
||||
* make branching forms.
|
||||
*/
|
||||
hidden?: boolean,
|
||||
hidden?: boolean,
|
||||
/**
|
||||
* Whether the user must fill in the argument
|
||||
*/
|
||||
optional?: boolean,
|
||||
optional?: boolean,
|
||||
/**
|
||||
* The label of the input
|
||||
*/
|
||||
label?: string,
|
||||
label?: string,
|
||||
/**
|
||||
* Visually hide the label of the input
|
||||
*/
|
||||
hideLabel?: boolean,
|
||||
hideLabel?: boolean,
|
||||
/**
|
||||
* The default value
|
||||
*/
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
/**
|
||||
* Longer description of the input, likely shown in a tooltip
|
||||
*/
|
||||
@@ -287,44 +287,44 @@ description?: string, };
|
||||
|
||||
export type FormInputSelectOption = { label: string, value: string, };
|
||||
|
||||
export type FormInputText = {
|
||||
export type FormInputText = {
|
||||
/**
|
||||
* Placeholder for the text input
|
||||
*/
|
||||
placeholder?: string | null,
|
||||
placeholder?: string | null,
|
||||
/**
|
||||
* Placeholder for the text input
|
||||
*/
|
||||
password?: boolean,
|
||||
password?: boolean,
|
||||
/**
|
||||
* Whether to allow newlines in the input, like a <textarea/>
|
||||
*/
|
||||
multiLine?: boolean, completionOptions?: Array<GenericCompletionOption>,
|
||||
multiLine?: boolean, completionOptions?: Array<GenericCompletionOption>,
|
||||
/**
|
||||
* The name of the input. The value will be stored at this object attribute in the resulting data
|
||||
*/
|
||||
name: string,
|
||||
name: string,
|
||||
/**
|
||||
* Whether this input is visible for the given configuration. Use this to
|
||||
* make branching forms.
|
||||
*/
|
||||
hidden?: boolean,
|
||||
hidden?: boolean,
|
||||
/**
|
||||
* Whether the user must fill in the argument
|
||||
*/
|
||||
optional?: boolean,
|
||||
optional?: boolean,
|
||||
/**
|
||||
* The label of the input
|
||||
*/
|
||||
label?: string,
|
||||
label?: string,
|
||||
/**
|
||||
* Visually hide the label of the input
|
||||
*/
|
||||
hideLabel?: boolean,
|
||||
hideLabel?: boolean,
|
||||
/**
|
||||
* The default value
|
||||
*/
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
defaultValue?: string, disabled?: boolean,
|
||||
/**
|
||||
* Longer description of the input, likely shown in a tooltip
|
||||
*/
|
||||
@@ -356,6 +356,10 @@ export type GetKeyValueResponse = { value?: string, };
|
||||
|
||||
export type GetTemplateFunctionsResponse = { functions: Array<TemplateFunction>, pluginRefId: string, };
|
||||
|
||||
export type GetThemesRequest = Record<string, never>;
|
||||
|
||||
export type GetThemesResponse = { themes: Array<Theme>, };
|
||||
|
||||
export type HttpAuthenticationAction = { label: string, icon?: Icon, };
|
||||
|
||||
export type HttpHeader = { name: string, value: string, };
|
||||
@@ -372,7 +376,7 @@ export type ImportResponse = { resources: ImportResources, };
|
||||
|
||||
export type InternalEvent = { id: string, pluginRefId: string, pluginName: string, replyId: string | null, windowContext: PluginWindowContext, payload: InternalEventPayload, };
|
||||
|
||||
export type InternalEventPayload = { "type": "boot_request" } & BootRequest | { "type": "boot_response" } & BootResponse | { "type": "reload_request" } & EmptyPayload | { "type": "reload_response" } & BootResponse | { "type": "terminate_request" } | { "type": "terminate_response" } | { "type": "import_request" } & ImportRequest | { "type": "import_response" } & ImportResponse | { "type": "filter_request" } & FilterRequest | { "type": "filter_response" } & FilterResponse | { "type": "export_http_request_request" } & ExportHttpRequestRequest | { "type": "export_http_request_response" } & ExportHttpRequestResponse | { "type": "send_http_request_request" } & SendHttpRequestRequest | { "type": "send_http_request_response" } & SendHttpRequestResponse | { "type": "list_cookie_names_request" } & ListCookieNamesRequest | { "type": "list_cookie_names_response" } & ListCookieNamesResponse | { "type": "get_cookie_value_request" } & GetCookieValueRequest | { "type": "get_cookie_value_response" } & GetCookieValueResponse | { "type": "get_http_request_actions_request" } & EmptyPayload | { "type": "get_http_request_actions_response" } & GetHttpRequestActionsResponse | { "type": "call_http_request_action_request" } & CallHttpRequestActionRequest | { "type": "get_template_functions_request" } | { "type": "get_template_functions_response" } & GetTemplateFunctionsResponse | { "type": "call_template_function_request" } & CallTemplateFunctionRequest | { "type": "call_template_function_response" } & CallTemplateFunctionResponse | { "type": "get_http_authentication_summary_request" } & EmptyPayload | { "type": "get_http_authentication_summary_response" } & GetHttpAuthenticationSummaryResponse | { "type": "get_http_authentication_config_request" } & GetHttpAuthenticationConfigRequest | { "type": "get_http_authentication_config_response" } & GetHttpAuthenticationConfigResponse | { "type": "call_http_authentication_request" } & CallHttpAuthenticationRequest | { "type": "call_http_authentication_response" } & CallHttpAuthenticationResponse | { "type": "call_http_authentication_action_request" } & CallHttpAuthenticationActionRequest | { "type": "call_http_authentication_action_response" } & EmptyPayload | { "type": "copy_text_request" } & CopyTextRequest | { "type": "copy_text_response" } & EmptyPayload | { "type": "render_http_request_request" } & RenderHttpRequestRequest | { "type": "render_http_request_response" } & RenderHttpRequestResponse | { "type": "get_key_value_request" } & GetKeyValueRequest | { "type": "get_key_value_response" } & GetKeyValueResponse | { "type": "set_key_value_request" } & SetKeyValueRequest | { "type": "set_key_value_response" } & SetKeyValueResponse | { "type": "delete_key_value_request" } & DeleteKeyValueRequest | { "type": "delete_key_value_response" } & DeleteKeyValueResponse | { "type": "open_window_request" } & OpenWindowRequest | { "type": "window_navigate_event" } & WindowNavigateEvent | { "type": "window_close_event" } | { "type": "close_window_request" } & CloseWindowRequest | { "type": "template_render_request" } & TemplateRenderRequest | { "type": "template_render_response" } & TemplateRenderResponse | { "type": "show_toast_request" } & ShowToastRequest | { "type": "show_toast_response" } & EmptyPayload | { "type": "prompt_text_request" } & PromptTextRequest | { "type": "prompt_text_response" } & PromptTextResponse | { "type": "get_http_request_by_id_request" } & GetHttpRequestByIdRequest | { "type": "get_http_request_by_id_response" } & GetHttpRequestByIdResponse | { "type": "find_http_responses_request" } & FindHttpResponsesRequest | { "type": "find_http_responses_response" } & FindHttpResponsesResponse | { "type": "empty_response" } & EmptyPayload | { "type": "error_response" } & ErrorResponse;
|
||||
export type InternalEventPayload = { "type": "boot_request" } & BootRequest | { "type": "boot_response" } & BootResponse | { "type": "reload_request" } & EmptyPayload | { "type": "reload_response" } & BootResponse | { "type": "terminate_request" } | { "type": "terminate_response" } | { "type": "import_request" } & ImportRequest | { "type": "import_response" } & ImportResponse | { "type": "filter_request" } & FilterRequest | { "type": "filter_response" } & FilterResponse | { "type": "export_http_request_request" } & ExportHttpRequestRequest | { "type": "export_http_request_response" } & ExportHttpRequestResponse | { "type": "send_http_request_request" } & SendHttpRequestRequest | { "type": "send_http_request_response" } & SendHttpRequestResponse | { "type": "list_cookie_names_request" } & ListCookieNamesRequest | { "type": "list_cookie_names_response" } & ListCookieNamesResponse | { "type": "get_cookie_value_request" } & GetCookieValueRequest | { "type": "get_cookie_value_response" } & GetCookieValueResponse | { "type": "get_http_request_actions_request" } & EmptyPayload | { "type": "get_http_request_actions_response" } & GetHttpRequestActionsResponse | { "type": "call_http_request_action_request" } & CallHttpRequestActionRequest | { "type": "get_template_functions_request" } | { "type": "get_template_functions_response" } & GetTemplateFunctionsResponse | { "type": "call_template_function_request" } & CallTemplateFunctionRequest | { "type": "call_template_function_response" } & CallTemplateFunctionResponse | { "type": "get_http_authentication_summary_request" } & EmptyPayload | { "type": "get_http_authentication_summary_response" } & GetHttpAuthenticationSummaryResponse | { "type": "get_http_authentication_config_request" } & GetHttpAuthenticationConfigRequest | { "type": "get_http_authentication_config_response" } & GetHttpAuthenticationConfigResponse | { "type": "call_http_authentication_request" } & CallHttpAuthenticationRequest | { "type": "call_http_authentication_response" } & CallHttpAuthenticationResponse | { "type": "call_http_authentication_action_request" } & CallHttpAuthenticationActionRequest | { "type": "call_http_authentication_action_response" } & EmptyPayload | { "type": "copy_text_request" } & CopyTextRequest | { "type": "copy_text_response" } & EmptyPayload | { "type": "render_http_request_request" } & RenderHttpRequestRequest | { "type": "render_http_request_response" } & RenderHttpRequestResponse | { "type": "get_key_value_request" } & GetKeyValueRequest | { "type": "get_key_value_response" } & GetKeyValueResponse | { "type": "set_key_value_request" } & SetKeyValueRequest | { "type": "set_key_value_response" } & SetKeyValueResponse | { "type": "delete_key_value_request" } & DeleteKeyValueRequest | { "type": "delete_key_value_response" } & DeleteKeyValueResponse | { "type": "open_window_request" } & OpenWindowRequest | { "type": "window_navigate_event" } & WindowNavigateEvent | { "type": "window_close_event" } | { "type": "close_window_request" } & CloseWindowRequest | { "type": "template_render_request" } & TemplateRenderRequest | { "type": "template_render_response" } & TemplateRenderResponse | { "type": "show_toast_request" } & ShowToastRequest | { "type": "show_toast_response" } & EmptyPayload | { "type": "prompt_text_request" } & PromptTextRequest | { "type": "prompt_text_response" } & PromptTextResponse | { "type": "get_http_request_by_id_request" } & GetHttpRequestByIdRequest | { "type": "get_http_request_by_id_response" } & GetHttpRequestByIdResponse | { "type": "find_http_responses_request" } & FindHttpResponsesRequest | { "type": "find_http_responses_response" } & FindHttpResponsesResponse | { "type": "get_themes_request" } & GetThemesRequest | { "type": "get_themes_response" } & GetThemesResponse | { "type": "empty_response" } & EmptyPayload | { "type": "error_response" } & ErrorResponse;
|
||||
|
||||
export type JsonPrimitive = string | number | boolean | null;
|
||||
|
||||
@@ -380,7 +384,7 @@ export type ListCookieNamesRequest = {};
|
||||
|
||||
export type ListCookieNamesResponse = { names: Array<string>, };
|
||||
|
||||
export type OpenWindowRequest = { url: string,
|
||||
export type OpenWindowRequest = { url: string,
|
||||
/**
|
||||
* Label for the window. If not provided, a random one will be generated.
|
||||
*/
|
||||
@@ -388,15 +392,15 @@ label: string, title?: string, size?: WindowSize, dataDirKey?: string, };
|
||||
|
||||
export type PluginWindowContext = { "type": "none" } | { "type": "label", label: string, workspace_id: string | null, };
|
||||
|
||||
export type PromptTextRequest = { id: string, title: string, label: string, description?: string, defaultValue?: string, placeholder?: string,
|
||||
export type PromptTextRequest = { id: string, title: string, label: string, description?: string, defaultValue?: string, placeholder?: string,
|
||||
/**
|
||||
* Text to add to the confirmation button
|
||||
*/
|
||||
confirmText?: string,
|
||||
confirmText?: string,
|
||||
/**
|
||||
* Text to add to the cancel button
|
||||
*/
|
||||
cancelText?: string,
|
||||
cancelText?: string,
|
||||
/**
|
||||
* Require the user to enter a non-empty value
|
||||
*/
|
||||
@@ -420,7 +424,7 @@ export type SetKeyValueResponse = {};
|
||||
|
||||
export type ShowToastRequest = { message: string, color?: Color, icon?: Icon, };
|
||||
|
||||
export type TemplateFunction = { name: string, description?: string,
|
||||
export type TemplateFunction = { name: string, description?: string,
|
||||
/**
|
||||
* Also support alternative names. This is useful for not breaking existing
|
||||
* tags when changing the `name` property
|
||||
@@ -436,6 +440,32 @@ export type TemplateRenderRequest = { data: JsonValue, purpose: RenderPurpose, }
|
||||
|
||||
export type TemplateRenderResponse = { data: JsonValue, };
|
||||
|
||||
export type Theme = {
|
||||
/**
|
||||
* How the theme is identified. This should never be changed
|
||||
*/
|
||||
id: string,
|
||||
/**
|
||||
* The friendly name of the theme to be displayed to the user
|
||||
*/
|
||||
label: string,
|
||||
/**
|
||||
* Whether the theme will be used for dark or light appearance
|
||||
*/
|
||||
dark: boolean,
|
||||
/**
|
||||
* The default top-level colors for the theme
|
||||
*/
|
||||
base: ThemeComponentColors,
|
||||
/**
|
||||
* Optionally override theme for individual UI components for more control
|
||||
*/
|
||||
components?: ThemeComponents, };
|
||||
|
||||
export type ThemeComponentColors = { surface?: string, surfaceHighlight?: string, surfaceActive?: string, text?: string, textSubtle?: string, textSubtlest?: string, border?: string, borderSubtle?: string, borderFocus?: string, shadow?: string, backdrop?: string, selection?: string, primary?: string, secondary?: string, info?: string, success?: string, notice?: string, warning?: string, danger?: string, };
|
||||
|
||||
export type ThemeComponents = { dialog?: ThemeComponentColors, menu?: ThemeComponentColors, toast?: ThemeComponentColors, sidebar?: ThemeComponentColors, responsePane?: ThemeComponentColors, appHeader?: ThemeComponentColors, button?: ThemeComponentColors, banner?: ThemeComponentColors, templateTag?: ThemeComponentColors, urlBar?: ThemeComponentColors, editor?: ThemeComponentColors, input?: ThemeComponentColors, };
|
||||
|
||||
export type WindowNavigateEvent = { url: string, };
|
||||
|
||||
export type WindowSize = { width: number, height: number, };
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
import { Index } from "../themes";
|
||||
import { Context } from "./Context";
|
||||
import { Theme } from '../bindings/gen_events';
|
||||
|
||||
export type ThemePlugin = {
|
||||
name: string;
|
||||
description?: string;
|
||||
getTheme(ctx: Context, fileContents: string): Promise<Index>;
|
||||
};
|
||||
export type ThemePlugin = Theme;
|
||||
|
||||
@@ -12,7 +12,7 @@ export type { Context } from './Context';
|
||||
*/
|
||||
export type PluginDefinition = {
|
||||
importer?: ImporterPlugin;
|
||||
theme?: ThemePlugin;
|
||||
themes?: ThemePlugin[];
|
||||
filter?: FilterPlugin;
|
||||
authentication?: AuthenticationPlugin;
|
||||
httpRequestActions?: HttpRequestActionPlugin[];
|
||||
|
||||
@@ -2,12 +2,17 @@
|
||||
"compilerOptions": {
|
||||
"module": "node16",
|
||||
"target": "es6",
|
||||
"lib": ["es2021"],
|
||||
"lib": [
|
||||
"es2021",
|
||||
"dom"
|
||||
],
|
||||
"declaration": true,
|
||||
"declarationDir": "./lib",
|
||||
"outDir": "./lib",
|
||||
"strict": true,
|
||||
"types": ["node"]
|
||||
"types": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/index.ts"
|
||||
|
||||
@@ -163,6 +163,15 @@ export class PluginInstance {
|
||||
return;
|
||||
}
|
||||
|
||||
if (payload.type === 'get_themes_request' && Array.isArray(this.#mod?.themes)) {
|
||||
const replyPayload: InternalEventPayload = {
|
||||
type: 'get_themes_response',
|
||||
themes: this.#mod.themes,
|
||||
};
|
||||
this.#sendPayload(windowContext, replyPayload, replyId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
payload.type === 'get_template_functions_request' &&
|
||||
Array.isArray(this.#mod?.templateFunctions)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/auth-basic",
|
||||
"name": "@yaak/auth-basic",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/auth-bearer",
|
||||
"name": "@yaak/auth-bearer",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/auth-jwt",
|
||||
"name": "@yaak/auth-jwt",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/auth-oauth2",
|
||||
"name": "@yaak/auth-oauth2",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/exporter-curl",
|
||||
"name": "@yaak/exporter-curl",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/filter-jsonpath",
|
||||
"name": "@yaak/filter-jsonpath",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/filter-xpath",
|
||||
"name": "@yaak/filter-xpath",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/importer-curl",
|
||||
"name": "@yaak/importer-curl",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/importer-insomnia",
|
||||
"name": "@yaak/importer-insomnia",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/importer-openapi",
|
||||
"name": "@yaak/importer-openapi",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/importer-postman",
|
||||
"name": "@yaak/importer-postman",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"main": "./build/index.js",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/importer-yaak",
|
||||
"name": "@yaak/importer-yaak",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-cookie",
|
||||
"name": "@yaak/template-function-cookie",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-encode",
|
||||
"name": "@yaak/template-function-encode",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-fs",
|
||||
"name": "@yaak/template-function-fs",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-hash",
|
||||
"name": "@yaak/template-function-hash",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-json",
|
||||
"name": "@yaak/template-function-json",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-prompt",
|
||||
"name": "@yaak/template-function-prompt",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-regex",
|
||||
"name": "@yaak/template-function-regex",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-request",
|
||||
"name": "@yaak/template-function-request",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-response",
|
||||
"name": "@yaak/template-function-response",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-uuid",
|
||||
"name": "@yaak/template-function-uuid",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api';
|
||||
import type { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api';
|
||||
import { v1, v3, v4, v5, v6, v7 } from 'uuid';
|
||||
|
||||
export const plugin: PluginDefinition = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp/template-function-xml",
|
||||
"name": "@yaak/template-function-xml",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,29 +1,37 @@
|
||||
import { DOMParser } from '@xmldom/xmldom';
|
||||
import { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api';
|
||||
import type { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api';
|
||||
import xpath from 'xpath';
|
||||
|
||||
export const plugin: PluginDefinition = {
|
||||
templateFunctions: [{
|
||||
name: 'xml.xpath',
|
||||
description: 'Filter XML-formatted text using XPath syntax',
|
||||
args: [
|
||||
{ type: 'text', name: 'input', label: 'Input', multiLine: true, placeholder: '<foo></foo>' },
|
||||
{ type: 'text', name: 'query', label: 'Query', placeholder: '//foo' },
|
||||
],
|
||||
async onRender(_ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null> {
|
||||
try {
|
||||
const doc = new DOMParser().parseFromString(String(args.values.input), 'text/xml');
|
||||
let result = xpath.select(String(args.values.query), doc, false);
|
||||
if (Array.isArray(result)) {
|
||||
return String(result.map(c => String(c.firstChild))[0] ?? '');
|
||||
} else if (result instanceof Node) {
|
||||
return String(result.firstChild);
|
||||
} else {
|
||||
return String(result);
|
||||
templateFunctions: [
|
||||
{
|
||||
name: 'xml.xpath',
|
||||
description: 'Filter XML-formatted text using XPath syntax',
|
||||
args: [
|
||||
{
|
||||
type: 'text',
|
||||
name: 'input',
|
||||
label: 'Input',
|
||||
multiLine: true,
|
||||
placeholder: '<foo></foo>',
|
||||
},
|
||||
{ type: 'text', name: 'query', label: 'Query', placeholder: '//foo' },
|
||||
],
|
||||
async onRender(_ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null> {
|
||||
try {
|
||||
const doc = new DOMParser().parseFromString(String(args.values.input), 'text/xml');
|
||||
const result = xpath.select(String(args.values.query), doc, false);
|
||||
if (Array.isArray(result)) {
|
||||
return String(result.map((c) => String(c.firstChild))[0] ?? '');
|
||||
} else if (result instanceof Node) {
|
||||
return String(result.firstChild);
|
||||
} else {
|
||||
return String(result);
|
||||
}
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
},
|
||||
}],
|
||||
],
|
||||
};
|
||||
|
||||
9
plugins/themes-yaak/package.json
Normal file
9
plugins/themes-yaak/package.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "@yaak/themes-yaak",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"build": "yaakcli build ./src/index.ts",
|
||||
"dev": "yaakcli dev ./src/index.js"
|
||||
}
|
||||
}
|
||||
599
plugins/themes-yaak/src/index.ts
Normal file
599
plugins/themes-yaak/src/index.ts
Normal file
@@ -0,0 +1,599 @@
|
||||
import type { PluginDefinition } from '@yaakapp/api';
|
||||
|
||||
export const plugin: PluginDefinition = {
|
||||
themes: [
|
||||
{
|
||||
id: 'catppuccin-frappe',
|
||||
label: 'Catppuccin Frappé',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(231,19%,20%)',
|
||||
text: 'hsl(227,70%,87%)',
|
||||
textSubtle: 'hsl(228,29%,73%)',
|
||||
textSubtlest: 'hsl(227,17%,58%)',
|
||||
primary: 'hsl(277,59%,76%)',
|
||||
secondary: 'hsl(228,39%,80%)',
|
||||
info: 'hsl(222,74%,74%)',
|
||||
success: 'hsl(96,44%,68%)',
|
||||
notice: 'hsl(40,62%,73%)',
|
||||
warning: 'hsl(20,79%,70%)',
|
||||
danger: 'hsl(359,68%,71%)',
|
||||
},
|
||||
components: {
|
||||
dialog: {
|
||||
surface: 'hsl(240,21%,12%)',
|
||||
},
|
||||
sidebar: {
|
||||
surface: 'hsl(229,19%,23%)',
|
||||
border: 'hsl(229,19%,27%)',
|
||||
},
|
||||
appHeader: {
|
||||
surface: 'hsl(229,20%,17%)',
|
||||
border: 'hsl(229,20%,25%)',
|
||||
},
|
||||
responsePane: {
|
||||
surface: 'hsl(229,19%,23%)',
|
||||
border: 'hsl(229,19%,27%)',
|
||||
},
|
||||
button: {
|
||||
primary: 'hsl(277,59%,68%)',
|
||||
secondary: 'hsl(228,39%,72%)',
|
||||
info: 'hsl(222,74%,67%)',
|
||||
success: 'hsl(96,44%,61%)',
|
||||
notice: 'hsl(40,62%,66%)',
|
||||
warning: 'hsl(20,79%,63%)',
|
||||
danger: 'hsl(359,68%,64%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'catppuccin-macchiato',
|
||||
label: 'Catppuccin Macchiato',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(233,23%,15%)',
|
||||
text: 'hsl(227,68%,88%)',
|
||||
textSubtle: 'hsl(227,27%,72%)',
|
||||
textSubtlest: 'hsl(228,15%,57%)',
|
||||
primary: 'hsl(267,83%,80%)',
|
||||
secondary: 'hsl(228,39%,80%)',
|
||||
info: 'hsl(220,83%,75%)',
|
||||
success: 'hsl(105,48%,72%)',
|
||||
notice: 'hsl(40,70%,78%)',
|
||||
warning: 'hsl(21,86%,73%)',
|
||||
danger: 'hsl(351,74%,73%)',
|
||||
},
|
||||
components: {
|
||||
dialog: {
|
||||
surface: 'hsl(240,21%,12%)',
|
||||
},
|
||||
sidebar: {
|
||||
surface: 'hsl(232,23%,18%)',
|
||||
border: 'hsl(231,23%,22%)',
|
||||
},
|
||||
appHeader: {
|
||||
surface: 'hsl(236,23%,12%)',
|
||||
border: 'hsl(236,23%,21%)',
|
||||
},
|
||||
responsePane: {
|
||||
surface: 'hsl(232,23%,18%)',
|
||||
border: 'hsl(231,23%,22%)',
|
||||
},
|
||||
button: {
|
||||
primary: 'hsl(267,82%,72%)',
|
||||
secondary: 'hsl(228,39%,72%)',
|
||||
info: 'hsl(220,83%,68%)',
|
||||
success: 'hsl(105,48%,65%)',
|
||||
notice: 'hsl(40,70%,70%)',
|
||||
warning: 'hsl(21,86%,66%)',
|
||||
danger: 'hsl(351,74%,66%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'catppuccin-mocha',
|
||||
label: 'Catppuccin Mocha',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(240,21%,12%)',
|
||||
text: 'hsl(226,64%,88%)',
|
||||
textSubtle: 'hsl(228,24%,72%)',
|
||||
textSubtlest: 'hsl(230,13%,55%)',
|
||||
primary: 'hsl(267,83%,80%)',
|
||||
secondary: 'hsl(227,35%,80%)',
|
||||
info: 'hsl(217,92%,76%)',
|
||||
success: 'hsl(115,54%,76%)',
|
||||
notice: 'hsl(41,86%,83%)',
|
||||
warning: 'hsl(23,92%,75%)',
|
||||
danger: 'hsl(343,81%,75%)',
|
||||
},
|
||||
components: {
|
||||
dialog: {
|
||||
surface: 'hsl(240,21%,12%)',
|
||||
},
|
||||
sidebar: {
|
||||
surface: 'hsl(240,21%,15%)',
|
||||
border: 'hsl(240,21%,19%)',
|
||||
},
|
||||
appHeader: {
|
||||
surface: 'hsl(240,23%,9%)',
|
||||
border: 'hsl(240,22%,18%)',
|
||||
},
|
||||
responsePane: {
|
||||
surface: 'hsl(240,21%,15%)',
|
||||
border: 'hsl(240,21%,19%)',
|
||||
},
|
||||
button: {
|
||||
primary: 'hsl(267,67%,65%)',
|
||||
secondary: 'hsl(227,28%,64%)',
|
||||
info: 'hsl(217,74%,61%)',
|
||||
success: 'hsl(115,43%,61%)',
|
||||
notice: 'hsl(41,69%,66%)',
|
||||
warning: 'hsl(23,74%,60%)',
|
||||
danger: 'hsl(343,65%,60%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'catppuccin-latte',
|
||||
label: 'Catppuccin Latte',
|
||||
dark: false,
|
||||
base: {
|
||||
surface: 'hsl(220,23%,95%)',
|
||||
text: 'hsl(234,16%,35%)',
|
||||
textSubtle: 'hsl(233,10%,47%)',
|
||||
textSubtlest: 'hsl(231,10%,59%)',
|
||||
primary: 'hsl(266,85%,58%)',
|
||||
secondary: 'hsl(233,10%,47%)',
|
||||
info: 'hsl(231,97%,72%)',
|
||||
success: 'hsl(183,74%,35%)',
|
||||
notice: 'hsl(35,77%,49%)',
|
||||
warning: 'hsl(22,99%,52%)',
|
||||
danger: 'hsl(355,76%,59%)',
|
||||
},
|
||||
components: {
|
||||
sidebar: {
|
||||
surface: 'hsl(220,22%,92%)',
|
||||
border: 'hsl(220,22%,87%)',
|
||||
},
|
||||
appHeader: {
|
||||
surface: 'hsl(220,21%,89%)',
|
||||
border: 'hsl(220,22%,87%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'dracula',
|
||||
label: 'Dracula',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(231,15%,18%)',
|
||||
surfaceHighlight: 'hsl(230,15%,24%)',
|
||||
text: 'hsl(60,30%,96%)',
|
||||
textSubtle: 'hsl(232,14%,65%)',
|
||||
textSubtlest: 'hsl(232,14%,50%)',
|
||||
primary: 'hsl(265,89%,78%)',
|
||||
secondary: 'hsl(225,27%,51%)',
|
||||
info: 'hsl(191,97%,77%)',
|
||||
success: 'hsl(135,94%,65%)',
|
||||
notice: 'hsl(65,92%,76%)',
|
||||
warning: 'hsl(31,100%,71%)',
|
||||
danger: 'hsl(0,100%,67%)',
|
||||
},
|
||||
components: {
|
||||
sidebar: {
|
||||
backdrop: 'hsl(230,15%,24%)',
|
||||
},
|
||||
appHeader: {
|
||||
backdrop: 'hsl(235,14%,15%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'github-dark',
|
||||
label: 'GitHub',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(213,30%,7%)',
|
||||
surfaceHighlight: 'hsl(213,16%,13%)',
|
||||
text: 'hsl(212,27%,89%)',
|
||||
textSubtle: 'hsl(212,9%,57%)',
|
||||
textSubtlest: 'hsl(217,8%,45%)',
|
||||
border: 'hsl(215,21%,11%)',
|
||||
primary: 'hsl(262,78%,74%)',
|
||||
secondary: 'hsl(217,8%,50%)',
|
||||
info: 'hsl(215,84%,64%)',
|
||||
success: 'hsl(129,48%,52%)',
|
||||
notice: 'hsl(39,71%,58%)',
|
||||
warning: 'hsl(22,83%,60%)',
|
||||
danger: 'hsl(3,83%,65%)',
|
||||
},
|
||||
components: {
|
||||
button: {
|
||||
primary: 'hsl(262,79%,71%)',
|
||||
secondary: 'hsl(217,8%,45%)',
|
||||
info: 'hsl(215,84%,60%)',
|
||||
success: 'hsl(129,48%,47%)',
|
||||
notice: 'hsl(39,71%,53%)',
|
||||
warning: 'hsl(22,83%,56%)',
|
||||
danger: 'hsl(3,83%,61%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'github-light',
|
||||
label: 'GitHub',
|
||||
dark: false,
|
||||
base: {
|
||||
surface: 'hsl(0,0%,100%)',
|
||||
surfaceHighlight: 'hsl(210,29%,94%)',
|
||||
text: 'hsl(213,13%,14%)',
|
||||
textSubtle: 'hsl(212,9%,43%)',
|
||||
textSubtlest: 'hsl(203,8%,55%)',
|
||||
border: 'hsl(210,15%,92%)',
|
||||
borderSubtle: 'hsl(210,15%,92%)',
|
||||
primary: 'hsl(261,69%,59%)',
|
||||
secondary: 'hsl(212,8%,47%)',
|
||||
info: 'hsl(212,92%,48%)',
|
||||
success: 'hsl(137,66%,32%)',
|
||||
notice: 'hsl(40,100%,40%)',
|
||||
warning: 'hsl(24,100%,44%)',
|
||||
danger: 'hsl(356,71%,48%)',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'gruvbox',
|
||||
label: 'Gruvbox',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(0,0%,16%)',
|
||||
surfaceHighlight: 'hsl(20,3%,19%)',
|
||||
text: 'hsl(53,74%,91%)',
|
||||
textSubtle: 'hsl(39,24%,66%)',
|
||||
textSubtlest: 'hsl(30,12%,51%)',
|
||||
primary: 'hsl(344,47%,68%)',
|
||||
secondary: 'hsl(157,16%,58%)',
|
||||
info: 'hsl(104,35%,62%)',
|
||||
success: 'hsl(61,66%,44%)',
|
||||
notice: 'hsl(42,95%,58%)',
|
||||
warning: 'hsl(27,99%,55%)',
|
||||
danger: 'hsl(6,96%,59%)',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'hotdog-stand',
|
||||
label: 'Hotdog Stand',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(0,100%,50%)',
|
||||
surfaceHighlight: 'hsl(0,0%,0%)',
|
||||
text: 'hsl(0,0%,100%)',
|
||||
textSubtle: 'hsl(0,0%,100%)',
|
||||
textSubtlest: 'hsl(60,100%,50%)',
|
||||
border: 'hsl(0,0%,0%)',
|
||||
primary: 'hsl(60,100%,50%)',
|
||||
secondary: 'hsl(60,100%,50%)',
|
||||
info: 'hsl(60,100%,50%)',
|
||||
success: 'hsl(60,100%,50%)',
|
||||
notice: 'hsl(60,100%,50%)',
|
||||
warning: 'hsl(60,100%,50%)',
|
||||
danger: 'hsl(60,100%,50%)',
|
||||
},
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: 'hsl(0,0%,0%)',
|
||||
text: 'hsl(0,0%,100%)',
|
||||
textSubtle: 'hsl(60,100%,50%)',
|
||||
textSubtlest: 'hsl(0,100%,50%)',
|
||||
},
|
||||
menu: {
|
||||
surface: 'hsl(0,0%,0%)',
|
||||
border: 'hsl(0,100%,50%)',
|
||||
surfaceHighlight: 'hsl(0,100%,50%)',
|
||||
text: 'hsl(0,0%,100%)',
|
||||
textSubtle: 'hsl(60,100%,50%)',
|
||||
textSubtlest: 'hsl(60,100%,50%)',
|
||||
},
|
||||
button: {
|
||||
surface: 'hsl(0,0%,0%)',
|
||||
text: 'hsl(0,0%,100%)',
|
||||
primary: 'hsl(0,0%,0%)',
|
||||
secondary: 'hsl(0,0%,100%)',
|
||||
info: 'hsl(0,0%,0%)',
|
||||
success: 'hsl(60,100%,50%)',
|
||||
notice: 'hsl(60,100%,50%)',
|
||||
warning: 'hsl(0,0%,0%)',
|
||||
danger: 'hsl(0,100%,50%)',
|
||||
},
|
||||
editor: {
|
||||
primary: 'hsl(0,0%,100%)',
|
||||
secondary: 'hsl(0,0%,100%)',
|
||||
info: 'hsl(0,0%,100%)',
|
||||
success: 'hsl(0,0%,100%)',
|
||||
notice: 'hsl(60,100%,50%)',
|
||||
warning: 'hsl(0,0%,100%)',
|
||||
danger: 'hsl(0,0%,100%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'monokai-pro',
|
||||
label: 'Monokai Pro',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(285,5%,17%)',
|
||||
text: 'hsl(60,25%,98%)',
|
||||
textSubtle: 'hsl(0,1%,75%)',
|
||||
textSubtlest: 'hsl(300,0%,57%)',
|
||||
primary: 'hsl(250,77%,78%)',
|
||||
secondary: 'hsl(0,1%,75%)',
|
||||
info: 'hsl(186,71%,69%)',
|
||||
success: 'hsl(90,59%,66%)',
|
||||
notice: 'hsl(45,100%,70%)',
|
||||
warning: 'hsl(20,96%,70%)',
|
||||
danger: 'hsl(345,100%,69%)',
|
||||
},
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: 'hsl(300,5%,13%)',
|
||||
text: 'hsl(0,1%,75%)',
|
||||
textSubtle: 'hsl(300,0%,57%)',
|
||||
textSubtlest: 'hsl(300,1%,44%)',
|
||||
},
|
||||
button: {
|
||||
primary: 'hsl(250,77%,70%)',
|
||||
secondary: 'hsl(0,1%,68%)',
|
||||
info: 'hsl(186,71%,62%)',
|
||||
success: 'hsl(90,59%,59%)',
|
||||
notice: 'hsl(45,100%,63%)',
|
||||
warning: 'hsl(20,96%,63%)',
|
||||
danger: 'hsl(345,100%,62%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'monokai-pro-classic',
|
||||
label: 'Monokai Pro Classic',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(70,8%,15%)',
|
||||
text: 'hsl(69,100%,97%)',
|
||||
textSubtle: 'hsl(65,9%,73%)',
|
||||
textSubtlest: 'hsl(66,4%,55%)',
|
||||
primary: 'hsl(261,100%,75%)',
|
||||
secondary: 'hsl(202,8%,72%)',
|
||||
info: 'hsl(190,81%,67%)',
|
||||
success: 'hsl(80,76%,53%)',
|
||||
notice: 'hsl(54,70%,68%)',
|
||||
warning: 'hsl(32,98%,56%)',
|
||||
danger: 'hsl(338,95%,56%)',
|
||||
},
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: 'hsl(72,9%,11%)',
|
||||
text: 'hsl(202,8%,72%)',
|
||||
textSubtle: 'hsl(213,4%,48%)',
|
||||
textSubtlest: 'hsl(223,6%,44%)',
|
||||
},
|
||||
button: {
|
||||
primary: 'hsl(261,100%,68%)',
|
||||
secondary: 'hsl(202,8%,65%)',
|
||||
info: 'hsl(190,81%,60%)',
|
||||
success: 'hsl(80,76%,48%)',
|
||||
notice: 'hsl(54,71%,61%)',
|
||||
warning: 'hsl(32,98%,50%)',
|
||||
danger: 'hsl(338,95%,50%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'monokai-pro-machine',
|
||||
label: 'Monokai Pro Machine',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(200,16%,18%)',
|
||||
text: 'hsl(173,24%,93%)',
|
||||
textSubtle: 'hsl(185,6%,57%)',
|
||||
textSubtlest: 'hsl(189,6%,45%)',
|
||||
primary: 'hsl(258,86%,80%)',
|
||||
secondary: 'hsl(175,9%,75%)',
|
||||
info: 'hsl(194,81%,72%)',
|
||||
success: 'hsl(98,67%,69%)',
|
||||
notice: 'hsl(52,100%,72%)',
|
||||
warning: 'hsl(28,100%,72%)',
|
||||
danger: 'hsl(353,100%,71%)',
|
||||
},
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: 'hsl(196,16%,14%)',
|
||||
text: 'hsl(202,8%,72%)',
|
||||
textSubtle: 'hsl(213,4%,48%)',
|
||||
textSubtlest: 'hsl(223,6%,44%)',
|
||||
},
|
||||
button: {
|
||||
primary: 'hsl(258,86%,72%)',
|
||||
secondary: 'hsl(175,9%,68%)',
|
||||
info: 'hsl(194,80%,65%)',
|
||||
success: 'hsl(98,67%,62%)',
|
||||
notice: 'hsl(52,100%,65%)',
|
||||
warning: 'hsl(28,100%,65%)',
|
||||
danger: 'hsl(353,100%,64%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'monokai-pro-octagon',
|
||||
label: 'Monokai Pro Octagon',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(233,18%,19%)',
|
||||
text: 'hsl(173,24%,93%)',
|
||||
textSubtle: 'hsl(202,8%,72%)',
|
||||
textSubtlest: 'hsl(213,4%,48%)',
|
||||
primary: 'hsl(292,30%,70%)',
|
||||
secondary: 'hsl(202,8%,72%)',
|
||||
info: 'hsl(155,37%,72%)',
|
||||
success: 'hsl(75,60%,61%)',
|
||||
notice: 'hsl(44,100%,71%)',
|
||||
warning: 'hsl(23,100%,68%)',
|
||||
danger: 'hsl(352,100%,70%)',
|
||||
},
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: 'hsl(235,18%,14%)',
|
||||
text: 'hsl(202,8%,72%)',
|
||||
textSubtle: 'hsl(213,4%,48%)',
|
||||
textSubtlest: 'hsl(223,6%,44%)',
|
||||
},
|
||||
button: {
|
||||
primary: 'hsl(292,26%,63%)',
|
||||
secondary: 'hsl(201,7%,65%)',
|
||||
info: 'hsl(155,33%,65%)',
|
||||
success: 'hsl(75,54%,55%)',
|
||||
notice: 'hsl(44,90%,64%)',
|
||||
warning: 'hsl(23,90%,61%)',
|
||||
danger: 'hsl(352,90%,63%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'monokai-pro-ristretto',
|
||||
label: 'Monokai Pro Ristretto',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(0,9%,16%)',
|
||||
text: 'hsl(351,100%,97%)',
|
||||
textSubtle: 'hsl(355,9%,74%)',
|
||||
textSubtlest: 'hsl(354,4%,56%)',
|
||||
primary: 'hsl(239,63%,79%)',
|
||||
secondary: 'hsl(355,9%,74%)',
|
||||
info: 'hsl(170,53%,69%)',
|
||||
success: 'hsl(88,57%,66%)',
|
||||
notice: 'hsl(41,92%,70%)',
|
||||
warning: 'hsl(13,85%,70%)',
|
||||
danger: 'hsl(349,97%,70%)',
|
||||
},
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: 'hsl(0,8%,12%)',
|
||||
text: 'hsl(355,9%,74%)',
|
||||
textSubtle: 'hsl(354,4%,56%)',
|
||||
textSubtlest: 'hsl(353,4%,43%)',
|
||||
},
|
||||
button: {
|
||||
primary: 'hsl(239,63%,71%)',
|
||||
secondary: 'hsl(355,9%,67%)',
|
||||
info: 'hsl(170,53%,62%)',
|
||||
success: 'hsl(88,57%,59%)',
|
||||
notice: 'hsl(41,92%,63%)',
|
||||
warning: 'hsl(13,86%,63%)',
|
||||
danger: 'hsl(349,97%,63%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'monokai-pro-spectrum',
|
||||
label: 'Monokai Pro Spectrum',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(0,0%,13%)',
|
||||
text: 'hsl(266,100%,97%)',
|
||||
textSubtle: 'hsl(264,7%,73%)',
|
||||
textSubtlest: 'hsl(266,3%,55%)',
|
||||
primary: 'hsl(247,61%,72%)',
|
||||
secondary: 'hsl(264,7%,73%)',
|
||||
info: 'hsl(188,74%,63%)',
|
||||
success: 'hsl(133,54%,66%)',
|
||||
notice: 'hsl(51,96%,69%)',
|
||||
warning: 'hsl(23,98%,66%)',
|
||||
danger: 'hsl(343,96%,68%)',
|
||||
},
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: 'hsl(0,0%,10%)',
|
||||
text: 'hsl(264,7%,73%)',
|
||||
textSubtle: 'hsl(266,3%,55%)',
|
||||
textSubtlest: 'hsl(264,2%,41%)',
|
||||
},
|
||||
button: {
|
||||
primary: 'hsl(247,61%,65%)',
|
||||
secondary: 'hsl(264,7%,66%)',
|
||||
info: 'hsl(188,74%,57%)',
|
||||
success: 'hsl(133,54%,59%)',
|
||||
notice: 'hsl(51,96%,62%)',
|
||||
warning: 'hsl(23,98%,59%)',
|
||||
danger: 'hsl(343,96%,61%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'moonlight',
|
||||
label: 'Moonlight',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(234,23%,17%)',
|
||||
text: 'hsl(225,71%,90%)',
|
||||
textSubtle: 'hsl(230,28%,62%)',
|
||||
textSubtlest: 'hsl(232,26%,43%)',
|
||||
primary: 'hsl(262,100%,82%)',
|
||||
secondary: 'hsl(232,18%,65%)',
|
||||
info: 'hsl(217,100%,74%)',
|
||||
success: 'hsl(174,66%,54%)',
|
||||
notice: 'hsl(35,100%,73%)',
|
||||
warning: 'hsl(17,100%,71%)',
|
||||
danger: 'hsl(356,100%,73%)',
|
||||
},
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: 'hsl(233,23%,15%)',
|
||||
},
|
||||
sidebar: {
|
||||
surface: 'hsl(233,23%,15%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'nord',
|
||||
label: 'Nord',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(220,16%,22%)',
|
||||
surfaceHighlight: 'hsl(220,14%,28%)',
|
||||
text: 'hsl(220,28%,93%)',
|
||||
textSubtle: 'hsl(220,26%,90%)',
|
||||
textSubtlest: 'hsl(220,24%,86%)',
|
||||
primary: 'hsl(193,38%,68%)',
|
||||
secondary: 'hsl(210,34%,63%)',
|
||||
info: 'hsl(174,25%,69%)',
|
||||
success: 'hsl(89,26%,66%)',
|
||||
notice: 'hsl(40,66%,73%)',
|
||||
warning: 'hsl(17,48%,64%)',
|
||||
danger: 'hsl(353,43%,56%)',
|
||||
},
|
||||
components: {
|
||||
sidebar: {
|
||||
backdrop: 'hsl(220,16%,22%)',
|
||||
},
|
||||
appHeader: {
|
||||
backdrop: 'hsl(220,14%,28%)',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'relaxing',
|
||||
label: 'Relaxing',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(267,33%,17%)',
|
||||
text: 'hsl(275,49%,92%)',
|
||||
primary: 'hsl(267,84%,81%)',
|
||||
secondary: 'hsl(227,35%,80%)',
|
||||
info: 'hsl(217,92%,76%)',
|
||||
success: 'hsl(115,54%,76%)',
|
||||
notice: 'hsl(41,86%,83%)',
|
||||
warning: 'hsl(23,92%,75%)',
|
||||
danger: 'hsl(343,81%,75%)',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
366
src-tauri/Cargo.lock
generated
366
src-tauri/Cargo.lock
generated
@@ -207,7 +207,7 @@ version = "0.4.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b37fc50485c4f3f736a4fb14199f6d5f5ba008d7f28fe710306c92780f004c07"
|
||||
dependencies = [
|
||||
"brotli 8.0.1",
|
||||
"brotli",
|
||||
"flate2",
|
||||
"futures-core",
|
||||
"memchr",
|
||||
@@ -394,7 +394,7 @@ dependencies = [
|
||||
"http",
|
||||
"http-body",
|
||||
"http-body-util",
|
||||
"itoa 1.0.15",
|
||||
"itoa",
|
||||
"matchit",
|
||||
"memchr",
|
||||
"mime",
|
||||
@@ -566,17 +566,6 @@ dependencies = [
|
||||
"syn 2.0.101",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brotli"
|
||||
version = "7.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd"
|
||||
dependencies = [
|
||||
"alloc-no-stdlib",
|
||||
"alloc-stdlib",
|
||||
"brotli-decompressor 4.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brotli"
|
||||
version = "8.0.1"
|
||||
@@ -585,17 +574,7 @@ checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d"
|
||||
dependencies = [
|
||||
"alloc-no-stdlib",
|
||||
"alloc-stdlib",
|
||||
"brotli-decompressor 5.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brotli-decompressor"
|
||||
version = "4.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a334ef7c9e23abf0ce748e8cd309037da93e606ad52eb372e4ce327a0dcfbdfd"
|
||||
dependencies = [
|
||||
"alloc-no-stdlib",
|
||||
"alloc-stdlib",
|
||||
"brotli-decompressor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1143,16 +1122,25 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cssparser"
|
||||
version = "0.27.2"
|
||||
name = "csscolorparser"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a"
|
||||
checksum = "5fda6aace1fbef3aa217b27f4c8d7d071ef2a70a5ca51050b1f17d40299d3f16"
|
||||
dependencies = [
|
||||
"phf 0.11.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cssparser"
|
||||
version = "0.29.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa"
|
||||
dependencies = [
|
||||
"cssparser-macros",
|
||||
"dtoa-short",
|
||||
"itoa 0.4.8",
|
||||
"itoa",
|
||||
"matches",
|
||||
"phf 0.8.0",
|
||||
"phf 0.10.1",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"smallvec",
|
||||
@@ -1318,7 +1306,7 @@ dependencies = [
|
||||
"libc",
|
||||
"option-ext",
|
||||
"redox_users",
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.60.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2275,15 +2263,6 @@ version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||
|
||||
[[package]]
|
||||
name = "hex_color"
|
||||
version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d37f101bf4c633f7ca2e4b5e136050314503dd198e78e325ea602c327c484ef0"
|
||||
dependencies = [
|
||||
"rand 0.8.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hkdf"
|
||||
version = "0.12.4"
|
||||
@@ -2304,16 +2283,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "html5ever"
|
||||
version = "0.26.0"
|
||||
version = "0.29.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7"
|
||||
checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c"
|
||||
dependencies = [
|
||||
"log",
|
||||
"mac",
|
||||
"markup5ever",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"match_token",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2324,7 +2301,7 @@ checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"fnv",
|
||||
"itoa 1.0.15",
|
||||
"itoa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2382,7 +2359,7 @@ dependencies = [
|
||||
"http-body",
|
||||
"httparse",
|
||||
"httpdate",
|
||||
"itoa 1.0.15",
|
||||
"itoa",
|
||||
"pin-project-lite",
|
||||
"smallvec",
|
||||
"tokio",
|
||||
@@ -2756,12 +2733,6 @@ dependencies = [
|
||||
"either",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.15"
|
||||
@@ -2907,14 +2878,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kuchikiki"
|
||||
version = "0.8.2"
|
||||
version = "0.8.8-speedreader"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8"
|
||||
checksum = "02cb977175687f33fa4afa0c95c112b987ea1443e5a51c8f8ff27dc618270cc2"
|
||||
dependencies = [
|
||||
"cssparser",
|
||||
"html5ever",
|
||||
"indexmap 1.9.3",
|
||||
"matches",
|
||||
"indexmap 2.9.0",
|
||||
"selectors",
|
||||
]
|
||||
|
||||
@@ -3130,18 +3100,29 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "markup5ever"
|
||||
version = "0.11.0"
|
||||
version = "0.14.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
|
||||
checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18"
|
||||
dependencies = [
|
||||
"log",
|
||||
"phf 0.10.1",
|
||||
"phf_codegen 0.10.0",
|
||||
"phf 0.11.3",
|
||||
"phf_codegen 0.11.3",
|
||||
"string_cache",
|
||||
"string_cache_codegen",
|
||||
"tendril",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "match_token"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.101",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "matches"
|
||||
version = "0.1.10"
|
||||
@@ -3160,6 +3141,12 @@ version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"
|
||||
|
||||
[[package]]
|
||||
name = "md5"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae960838283323069879657ca3de837e9f7bbb4c7bf6ea7f1b290d5e9476d2e0"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.4"
|
||||
@@ -3227,9 +3214,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "muda"
|
||||
version = "0.16.1"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4de14a9b5d569ca68d7c891d613b390cf5ab4f851c77aaa2f9e435555d3d9492"
|
||||
checksum = "58b89bf91c19bf036347f1ab85a81c560f08c0667c8601bece664d860a600988"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"dpi",
|
||||
@@ -3961,9 +3948,7 @@ version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
|
||||
dependencies = [
|
||||
"phf_macros 0.8.0",
|
||||
"phf_shared 0.8.0",
|
||||
"proc-macro-hack",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3972,7 +3957,9 @@ version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
|
||||
dependencies = [
|
||||
"phf_macros 0.10.0",
|
||||
"phf_shared 0.10.0",
|
||||
"proc-macro-hack",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3997,12 +3984,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "phf_codegen"
|
||||
version = "0.10.0"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
|
||||
checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a"
|
||||
dependencies = [
|
||||
"phf_generator 0.10.0",
|
||||
"phf_shared 0.10.0",
|
||||
"phf_generator 0.11.3",
|
||||
"phf_shared 0.11.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4037,12 +4024,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "phf_macros"
|
||||
version = "0.8.0"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c"
|
||||
checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0"
|
||||
dependencies = [
|
||||
"phf_generator 0.8.0",
|
||||
"phf_shared 0.8.0",
|
||||
"phf_generator 0.10.0",
|
||||
"phf_shared 0.10.0",
|
||||
"proc-macro-hack",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -5116,22 +5103,20 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "selectors"
|
||||
version = "0.22.0"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe"
|
||||
checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"cssparser",
|
||||
"derive_more",
|
||||
"fxhash",
|
||||
"log",
|
||||
"matches",
|
||||
"phf 0.8.0",
|
||||
"phf_codegen 0.8.0",
|
||||
"precomputed-hash",
|
||||
"servo_arc",
|
||||
"smallvec",
|
||||
"thin-slice",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5212,7 +5197,7 @@ version = "1.0.140"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
|
||||
dependencies = [
|
||||
"itoa 1.0.15",
|
||||
"itoa",
|
||||
"memchr",
|
||||
"ryu",
|
||||
"serde",
|
||||
@@ -5245,7 +5230,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"itoa 1.0.15",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
@@ -5287,7 +5272,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
|
||||
dependencies = [
|
||||
"indexmap 2.9.0",
|
||||
"itoa 1.0.15",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
"unsafe-libyaml",
|
||||
@@ -5338,9 +5323,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "servo_arc"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432"
|
||||
checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741"
|
||||
dependencies = [
|
||||
"nodrop",
|
||||
"stable_deref_trait",
|
||||
@@ -5637,9 +5622,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tao"
|
||||
version = "0.33.0"
|
||||
version = "0.34.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e59c1f38e657351a2e822eadf40d6a2ad4627b9c25557bc1180ec1b3295ef82"
|
||||
checksum = "49c380ca75a231b87b6c9dd86948f035012e7171d1a7c40a9c2890489a7ffd8a"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"core-foundation 0.10.1",
|
||||
@@ -5710,17 +5695,16 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "2.5.1"
|
||||
version = "2.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7b0bc1aec81bda6bc455ea98fcaed26b3c98c1648c627ad6ff1c704e8bf8cbc"
|
||||
checksum = "124e129c9c0faa6bec792c5948c89e86c90094133b0b9044df0ce5f0a8efaa0d"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
"dirs",
|
||||
"dunce",
|
||||
"embed_plist",
|
||||
"futures-util",
|
||||
"getrandom 0.2.16",
|
||||
"getrandom 0.3.3",
|
||||
"glob",
|
||||
"gtk",
|
||||
"heck 0.5.0",
|
||||
@@ -5762,9 +5746,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-build"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7a0350f0df1db385ca5c02888a83e0e66655c245b7443db8b78a70da7d7f8fc"
|
||||
checksum = "12f025c389d3adb83114bec704da973142e82fc6ec799c7c750c5e21cefaec83"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_toml",
|
||||
@@ -5784,12 +5768,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f93f035551bf7b11b3f51ad9bc231ebbe5e085565527991c16cf326aa38cdf47"
|
||||
checksum = "f5df493a1075a241065bc865ed5ef8d0fbc1e76c7afdc0bf0eccfaa7d4f0e406"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"brotli 7.0.0",
|
||||
"brotli",
|
||||
"ico",
|
||||
"json-patch",
|
||||
"plist",
|
||||
@@ -5811,9 +5795,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-macros"
|
||||
version = "2.2.0"
|
||||
version = "2.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8db4df25e2d9d45de0c4c910da61cd5500190da14ae4830749fee3466dddd112"
|
||||
checksum = "f237fbea5866fa5f2a60a21bea807a2d6e0379db070d89c3a10ac0f2d4649bbc"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"proc-macro2",
|
||||
@@ -5825,9 +5809,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37a5ebe6a610d1b78a94650896e6f7c9796323f408800cef436e0fa0539de601"
|
||||
checksum = "1d9a0bd00bf1930ad1a604d08b0eb6b2a9c1822686d65d7f4731a7723b8901d3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"glob",
|
||||
@@ -5842,9 +5826,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-clipboard-manager"
|
||||
version = "2.2.2"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ab4cb42fdf745229b768802e9180920a4be63122cf87ed1c879103f7609d98e"
|
||||
checksum = "adddd9e9275b20e77af3061d100a25a884cced3c4c9ef680bd94dd0f7e26c1ca"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"log",
|
||||
@@ -5857,9 +5841,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-deep-link"
|
||||
version = "2.3.0"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e4976ac728ebc0487515aa956cfdf200abcc52b784e441493fc544bc6ce369c8"
|
||||
checksum = "ab261eb006db10ab478e3fbb5a4e2692df3f7eb3e28300ee2b64428979167ed0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"rust-ini",
|
||||
@@ -5877,9 +5861,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-dialog"
|
||||
version = "2.2.2"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a33318fe222fc2a612961de8b0419e2982767f213f54a4d3a21b0d7b85c41df8"
|
||||
checksum = "1aefb14219b492afb30b12647b5b1247cadd2c0603467310c36e0f7ae1698c28"
|
||||
dependencies = [
|
||||
"log",
|
||||
"raw-window-handle",
|
||||
@@ -5895,9 +5879,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-fs"
|
||||
version = "2.3.0"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33ead0daec5d305adcefe05af9d970fc437bcc7996052d564e7393eb291252da"
|
||||
checksum = "c341290d31991dbca38b31d412c73dfbdb070bb11536784f19dd2211d13b778f"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"dunce",
|
||||
@@ -5917,9 +5901,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-log"
|
||||
version = "2.4.0"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8d2b582d860eb214f28323f4ce4f2797ae3b78f197e27b11677f976f9f52aedb"
|
||||
checksum = "a59139183e0907cec1499dddee4e085f5a801dc659efa0848ee224f461371426"
|
||||
dependencies = [
|
||||
"android_logger",
|
||||
"byte-unit",
|
||||
@@ -5939,9 +5923,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-opener"
|
||||
version = "2.2.7"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66644b71a31ec1a8a52c4a16575edd28cf763c87cf4a7da24c884122b5c77097"
|
||||
checksum = "ecee219f11cdac713ab32959db5d0cceec4810ba4f4458da992292ecf9660321"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"glob",
|
||||
@@ -5961,9 +5945,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-os"
|
||||
version = "2.2.1"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "424f19432397850c2ddd42aa58078630c15287bbce3866eb1d90e7dbee680637"
|
||||
checksum = "05bccb4c6de4299beec5a9b070878a01bce9e2c945aa7a75bcea38bcba4c675d"
|
||||
dependencies = [
|
||||
"gethostname 1.0.2",
|
||||
"log",
|
||||
@@ -5979,9 +5963,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-shell"
|
||||
version = "2.2.1"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69d5eb3368b959937ad2aeaf6ef9a8f5d11e01ffe03629d3530707bbcb27ff5d"
|
||||
checksum = "2b9ffadec5c3523f11e8273465cacb3d86ea7652a28e6e2a2e9b5c182f791d25"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"log",
|
||||
@@ -6000,9 +5984,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-single-instance"
|
||||
version = "2.2.4"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "97d0e07b40fb2eb13778e30778f5979347a2bf30e1b9d47f78ff7fe92d2e4b3d"
|
||||
checksum = "b441b6d5d1a194e9fee0b358fe0d602ded845d0f580e1f8c8ef78ebc3c8b225d"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -6010,15 +5994,15 @@ dependencies = [
|
||||
"tauri-plugin-deep-link",
|
||||
"thiserror 2.0.12",
|
||||
"tracing",
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.60.2",
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-updater"
|
||||
version = "2.7.1"
|
||||
version = "2.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "73f05c38afd77a4b8fd98e8fb6f1cdbb5fbb8a46ba181eb2758b05321e3c6209"
|
||||
checksum = "27cbc31740f4d507712550694749572ec0e43bdd66992db7599b89fbfd6b167b"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"dirs",
|
||||
@@ -6042,15 +6026,15 @@ dependencies = [
|
||||
"time",
|
||||
"tokio",
|
||||
"url",
|
||||
"windows-sys 0.59.0",
|
||||
"zip 2.4.2",
|
||||
"windows-sys 0.60.2",
|
||||
"zip",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-window-state"
|
||||
version = "2.2.2"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a27a3fe49de72adbe0d84aee33c89a0b059722cd0b42aaeab29eaaee7f7535cd"
|
||||
checksum = "5a3d22b21b9cec73601b512a868f7c74f93c044d44fd6ca1c84e9d6afb6b1559"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"log",
|
||||
@@ -6063,9 +6047,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "2.6.0"
|
||||
version = "2.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00f004905d549854069e6774533d742b03cacfd6f03deb08940a8677586cbe39"
|
||||
checksum = "9e7bb73d1bceac06c20b3f755b2c8a2cb13b20b50083084a8cf3700daf397ba4"
|
||||
dependencies = [
|
||||
"cookie",
|
||||
"dpi",
|
||||
@@ -6085,9 +6069,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime-wry"
|
||||
version = "2.6.0"
|
||||
version = "2.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f85d056f4d4b014fe874814034f3416d57114b617a493a4fe552580851a3f3a2"
|
||||
checksum = "902b5aa9035e16f342eb64f8bf06ccdc2808e411a2525ed1d07672fa4e780bad"
|
||||
dependencies = [
|
||||
"gtk",
|
||||
"http",
|
||||
@@ -6112,12 +6096,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-utils"
|
||||
version = "2.4.0"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b2900399c239a471bcff7f15c4399eb1a8c4fe511ba2853e07c996d771a5e0a4"
|
||||
checksum = "41743bbbeb96c3a100d234e5a0b60a46d5aa068f266160862c7afdbf828ca02e"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"brotli 7.0.0",
|
||||
"brotli",
|
||||
"cargo_metadata",
|
||||
"ctor",
|
||||
"dunce",
|
||||
@@ -6192,12 +6176,6 @@ dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thin-slice"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.69"
|
||||
@@ -6256,7 +6234,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
|
||||
dependencies = [
|
||||
"deranged",
|
||||
"itoa 1.0.15",
|
||||
"itoa",
|
||||
"libc",
|
||||
"num-conv",
|
||||
"num_threads",
|
||||
@@ -6609,9 +6587,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tray-icon"
|
||||
version = "0.20.1"
|
||||
version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f7eee98ec5c90daf179d55c20a49d8c0d043054ce7c26336c09a24d31f14fa0"
|
||||
checksum = "2da75ec677957aa21f6e0b361df0daab972f13a5bee3606de0638fd4ee1c666a"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"dirs",
|
||||
@@ -7186,9 +7164,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webview2-com"
|
||||
version = "0.37.0"
|
||||
version = "0.38.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b542b5cfbd9618c46c2784e4d41ba218c336ac70d44c55e47b251033e7d85601"
|
||||
checksum = "d4ba622a989277ef3886dd5afb3e280e3dd6d974b766118950a08f8f678ad6a4"
|
||||
dependencies = [
|
||||
"webview2-com-macros",
|
||||
"webview2-com-sys",
|
||||
@@ -7211,9 +7189,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webview2-com-sys"
|
||||
version = "0.37.0"
|
||||
version = "0.38.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ae2d11c4a686e4409659d7891791254cf9286d3cfe0eef54df1523533d22295"
|
||||
checksum = "36695906a1b53a3bf5c4289621efedac12b73eeb0b89e7e1a89b517302d5d75c"
|
||||
dependencies = [
|
||||
"thiserror 2.0.12",
|
||||
"windows",
|
||||
@@ -7412,6 +7390,15 @@ dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.60.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
|
||||
dependencies = [
|
||||
"windows-targets 0.53.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.42.2"
|
||||
@@ -7451,13 +7438,29 @@ dependencies = [
|
||||
"windows_aarch64_gnullvm 0.52.6",
|
||||
"windows_aarch64_msvc 0.52.6",
|
||||
"windows_i686_gnu 0.52.6",
|
||||
"windows_i686_gnullvm",
|
||||
"windows_i686_gnullvm 0.52.6",
|
||||
"windows_i686_msvc 0.52.6",
|
||||
"windows_x86_64_gnu 0.52.6",
|
||||
"windows_x86_64_gnullvm 0.52.6",
|
||||
"windows_x86_64_msvc 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.53.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.53.0",
|
||||
"windows_aarch64_msvc 0.53.0",
|
||||
"windows_i686_gnu 0.53.0",
|
||||
"windows_i686_gnullvm 0.53.0",
|
||||
"windows_i686_msvc 0.53.0",
|
||||
"windows_x86_64_gnu 0.53.0",
|
||||
"windows_x86_64_gnullvm 0.53.0",
|
||||
"windows_x86_64_msvc 0.53.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-threading"
|
||||
version = "0.1.0"
|
||||
@@ -7494,6 +7497,12 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.53.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.42.2"
|
||||
@@ -7512,6 +7521,12 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.53.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.42.2"
|
||||
@@ -7530,12 +7545,24 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.53.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.53.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.42.2"
|
||||
@@ -7554,6 +7581,12 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.53.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.42.2"
|
||||
@@ -7572,6 +7605,12 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.53.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.42.2"
|
||||
@@ -7590,6 +7629,12 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.53.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.42.2"
|
||||
@@ -7608,6 +7653,12 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.53.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.5.40"
|
||||
@@ -7672,9 +7723,9 @@ checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb"
|
||||
|
||||
[[package]]
|
||||
name = "wry"
|
||||
version = "0.51.2"
|
||||
version = "0.52.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c886a0a9d2a94fd90cfa1d929629b79cfefb1546e2c7430c63a47f0664c0e4e2"
|
||||
checksum = "12a714d9ba7075aae04a6e50229d6109e3d584774b99a6a8c60de1698ca111b9"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"block2 0.6.1",
|
||||
@@ -7781,7 +7832,7 @@ dependencies = [
|
||||
"eventsource-client",
|
||||
"http",
|
||||
"log",
|
||||
"md5",
|
||||
"md5 0.8.0",
|
||||
"mime_guess",
|
||||
"openssl-sys",
|
||||
"rand 0.9.1",
|
||||
@@ -7889,7 +7940,7 @@ dependencies = [
|
||||
"hyper-rustls",
|
||||
"hyper-util",
|
||||
"log",
|
||||
"md5",
|
||||
"md5 0.7.0",
|
||||
"prost",
|
||||
"prost-reflect",
|
||||
"prost-types",
|
||||
@@ -7938,7 +7989,7 @@ name = "yaak-mac-window"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cocoa",
|
||||
"hex_color",
|
||||
"csscolorparser",
|
||||
"log",
|
||||
"objc",
|
||||
"rand 0.9.1",
|
||||
@@ -7981,7 +8032,7 @@ dependencies = [
|
||||
"futures-util",
|
||||
"hex",
|
||||
"log",
|
||||
"md5",
|
||||
"md5 0.7.0",
|
||||
"path-slash",
|
||||
"rand 0.9.1",
|
||||
"regex",
|
||||
@@ -8051,7 +8102,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"log",
|
||||
"md5",
|
||||
"md5 0.7.0",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
@@ -8244,21 +8295,6 @@ dependencies = [
|
||||
"syn 2.0.101",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
version = "2.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"crc32fast",
|
||||
"crossbeam-utils",
|
||||
"displaydoc",
|
||||
"indexmap 2.9.0",
|
||||
"memchr",
|
||||
"thiserror 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
version = "4.0.0"
|
||||
@@ -8293,7 +8329,7 @@ checksum = "aed5f10c571472911e37d8f7601a8dfba52b4f7f73a344015291b82ab292faf6"
|
||||
dependencies = [
|
||||
"log",
|
||||
"thiserror 2.0.12",
|
||||
"zip 4.0.0",
|
||||
"zip",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -46,7 +46,7 @@ encoding_rs = "0.8.35"
|
||||
eventsource-client = { git = "https://github.com/yaakapp/rust-eventsource-client", version = "0.14.0" }
|
||||
http = { version = "1.2.0", default-features = false }
|
||||
log = "0.4.27"
|
||||
md5 = "0.7.0"
|
||||
md5 = "0.8.0"
|
||||
mime_guess = "2.0.5"
|
||||
rand = "0.9.0"
|
||||
reqwest = { workspace = true, features = ["multipart", "cookies", "gzip", "brotli", "deflate", "json", "rustls-tls-manual-roots-no-provider", "socks"] }
|
||||
@@ -54,17 +54,17 @@ reqwest_cookie_store = "0.8.0"
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true, features = ["raw_value"] }
|
||||
tauri = { workspace = true, features = ["devtools", "protocol-asset"] }
|
||||
tauri-plugin-clipboard-manager = "2.2.2"
|
||||
tauri-plugin-clipboard-manager = "2.3.0"
|
||||
tauri-plugin-dialog = { workspace = true }
|
||||
tauri-plugin-fs = "2.3.0"
|
||||
tauri-plugin-log = { version = "2.4.0", features = ["colored"] }
|
||||
tauri-plugin-opener = "2.2.6"
|
||||
tauri-plugin-os = "2.2.1"
|
||||
tauri-plugin-fs = "2.4.0"
|
||||
tauri-plugin-log = { version = "2.6.0", features = ["colored"] }
|
||||
tauri-plugin-opener = "2.4.0"
|
||||
tauri-plugin-os = "2.3.0"
|
||||
tauri-plugin-shell = { workspace = true }
|
||||
tauri-plugin-deep-link = "2.3.0"
|
||||
tauri-plugin-single-instance = { version = "2.2.4", features = ["deep-link"] }
|
||||
tauri-plugin-updater = "2.7.1"
|
||||
tauri-plugin-window-state = "2.2.2"
|
||||
tauri-plugin-deep-link = "2.4.0"
|
||||
tauri-plugin-single-instance = { version = "2.3.0", features = ["deep-link"] }
|
||||
tauri-plugin-updater = "2.9.0"
|
||||
tauri-plugin-window-state = "2.3.0"
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true, features = ["sync"] }
|
||||
tokio-stream = "0.1.17"
|
||||
@@ -90,10 +90,10 @@ hex = "0.4.3"
|
||||
reqwest = "0.12.20"
|
||||
serde = "1.0.219"
|
||||
serde_json = "1.0.140"
|
||||
tauri = "2.5.1"
|
||||
tauri-plugin = "2.2.0"
|
||||
tauri-plugin-dialog = "2.2.2"
|
||||
tauri-plugin-shell = "2.2.1"
|
||||
tauri = "2.6.2"
|
||||
tauri-plugin = "2.3.0"
|
||||
tauri-plugin-dialog = "2.3.0"
|
||||
tauri-plugin-shell = "2.3.0"
|
||||
tokio = "1.45.1"
|
||||
thiserror = "2.0.12"
|
||||
ts-rs = "11.0.1"
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
use crate::error::Result;
|
||||
use tauri::{command, AppHandle, Manager, Runtime, WebviewWindow};
|
||||
use tauri::{command, AppHandle, Manager, Runtime, State, WebviewWindow};
|
||||
use tauri_plugin_dialog::{DialogExt, MessageDialogKind};
|
||||
use yaak_crypto::manager::EncryptionManagerExt;
|
||||
use yaak_plugins::events::PluginWindowContext;
|
||||
use yaak_plugins::native_template_functions::{decrypt_secure_template_function, encrypt_secure_template_function};
|
||||
use yaak_plugins::events::{GetThemesResponse, PluginWindowContext};
|
||||
use yaak_plugins::manager::PluginManager;
|
||||
use yaak_plugins::native_template_functions::{
|
||||
decrypt_secure_template_function, encrypt_secure_template_function,
|
||||
};
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn cmd_show_workspace_key<R: Runtime>(
|
||||
@@ -38,3 +41,11 @@ pub(crate) async fn cmd_secure_template<R: Runtime>(
|
||||
let window_context = &PluginWindowContext::new(&window);
|
||||
Ok(encrypt_secure_template_function(&app_handle, window_context, template)?)
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn cmd_get_themes<R: Runtime>(
|
||||
window: WebviewWindow<R>,
|
||||
plugin_manager: State<'_, PluginManager>,
|
||||
) -> Result<Vec<GetThemesResponse>> {
|
||||
Ok(plugin_manager.get_themes(&window).await?)
|
||||
}
|
||||
|
||||
@@ -1255,6 +1255,7 @@ pub fn run() {
|
||||
//
|
||||
// Migrated commands
|
||||
crate::commands::cmd_decrypt_template,
|
||||
crate::commands::cmd_get_themes,
|
||||
crate::commands::cmd_secure_template,
|
||||
crate::commands::cmd_show_workspace_key,
|
||||
])
|
||||
|
||||
@@ -10,10 +10,10 @@ tauri-plugin = { workspace = true, features = ["build"] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
cocoa = "0.26.0"
|
||||
hex_color = "3.0.0"
|
||||
log = "0.4.27"
|
||||
objc = "0.2.7"
|
||||
rand = "0.9.0"
|
||||
csscolorparser = "0.7.2"
|
||||
|
||||
[dependencies]
|
||||
tauri = { workspace = true }
|
||||
|
||||
@@ -18,7 +18,7 @@ pub(crate) fn set_title<R: Runtime>(window: Window<R>, title: &str) {
|
||||
pub(crate) fn set_theme<R: Runtime>(window: Window<R>, bg_color: &str) {
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
match hex_color::HexColor::parse_rgb(bg_color.trim()) {
|
||||
match csscolorparser::parse(bg_color.trim()) {
|
||||
Ok(color) => {
|
||||
crate::mac::update_window_theme(window, color);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#![allow(deprecated)]
|
||||
use hex_color::HexColor;
|
||||
use csscolorparser::Color;
|
||||
use objc::{msg_send, sel, sel_impl};
|
||||
use tauri::{Emitter, Runtime, Window};
|
||||
|
||||
@@ -35,7 +35,7 @@ pub(crate) fn update_window_title<R: Runtime>(window: Window<R>, title: String)
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn update_window_theme<R: Runtime>(window: Window<R>, color: HexColor) {
|
||||
pub(crate) fn update_window_theme<R: Runtime>(window: Window<R>, color: Color) {
|
||||
use cocoa::appkit::{
|
||||
NSAppearance, NSAppearanceNameVibrantDark, NSAppearanceNameVibrantLight, NSWindow,
|
||||
};
|
||||
|
||||
@@ -356,6 +356,10 @@ export type GetKeyValueResponse = { value?: string, };
|
||||
|
||||
export type GetTemplateFunctionsResponse = { functions: Array<TemplateFunction>, pluginRefId: string, };
|
||||
|
||||
export type GetThemesRequest = Record<string, never>;
|
||||
|
||||
export type GetThemesResponse = { themes: Array<Theme>, };
|
||||
|
||||
export type HttpAuthenticationAction = { label: string, icon?: Icon, };
|
||||
|
||||
export type HttpHeader = { name: string, value: string, };
|
||||
@@ -372,7 +376,7 @@ export type ImportResponse = { resources: ImportResources, };
|
||||
|
||||
export type InternalEvent = { id: string, pluginRefId: string, pluginName: string, replyId: string | null, windowContext: PluginWindowContext, payload: InternalEventPayload, };
|
||||
|
||||
export type InternalEventPayload = { "type": "boot_request" } & BootRequest | { "type": "boot_response" } & BootResponse | { "type": "reload_request" } & EmptyPayload | { "type": "reload_response" } & BootResponse | { "type": "terminate_request" } | { "type": "terminate_response" } | { "type": "import_request" } & ImportRequest | { "type": "import_response" } & ImportResponse | { "type": "filter_request" } & FilterRequest | { "type": "filter_response" } & FilterResponse | { "type": "export_http_request_request" } & ExportHttpRequestRequest | { "type": "export_http_request_response" } & ExportHttpRequestResponse | { "type": "send_http_request_request" } & SendHttpRequestRequest | { "type": "send_http_request_response" } & SendHttpRequestResponse | { "type": "list_cookie_names_request" } & ListCookieNamesRequest | { "type": "list_cookie_names_response" } & ListCookieNamesResponse | { "type": "get_cookie_value_request" } & GetCookieValueRequest | { "type": "get_cookie_value_response" } & GetCookieValueResponse | { "type": "get_http_request_actions_request" } & EmptyPayload | { "type": "get_http_request_actions_response" } & GetHttpRequestActionsResponse | { "type": "call_http_request_action_request" } & CallHttpRequestActionRequest | { "type": "get_template_functions_request" } | { "type": "get_template_functions_response" } & GetTemplateFunctionsResponse | { "type": "call_template_function_request" } & CallTemplateFunctionRequest | { "type": "call_template_function_response" } & CallTemplateFunctionResponse | { "type": "get_http_authentication_summary_request" } & EmptyPayload | { "type": "get_http_authentication_summary_response" } & GetHttpAuthenticationSummaryResponse | { "type": "get_http_authentication_config_request" } & GetHttpAuthenticationConfigRequest | { "type": "get_http_authentication_config_response" } & GetHttpAuthenticationConfigResponse | { "type": "call_http_authentication_request" } & CallHttpAuthenticationRequest | { "type": "call_http_authentication_response" } & CallHttpAuthenticationResponse | { "type": "call_http_authentication_action_request" } & CallHttpAuthenticationActionRequest | { "type": "call_http_authentication_action_response" } & EmptyPayload | { "type": "copy_text_request" } & CopyTextRequest | { "type": "copy_text_response" } & EmptyPayload | { "type": "render_http_request_request" } & RenderHttpRequestRequest | { "type": "render_http_request_response" } & RenderHttpRequestResponse | { "type": "get_key_value_request" } & GetKeyValueRequest | { "type": "get_key_value_response" } & GetKeyValueResponse | { "type": "set_key_value_request" } & SetKeyValueRequest | { "type": "set_key_value_response" } & SetKeyValueResponse | { "type": "delete_key_value_request" } & DeleteKeyValueRequest | { "type": "delete_key_value_response" } & DeleteKeyValueResponse | { "type": "open_window_request" } & OpenWindowRequest | { "type": "window_navigate_event" } & WindowNavigateEvent | { "type": "window_close_event" } | { "type": "close_window_request" } & CloseWindowRequest | { "type": "template_render_request" } & TemplateRenderRequest | { "type": "template_render_response" } & TemplateRenderResponse | { "type": "show_toast_request" } & ShowToastRequest | { "type": "show_toast_response" } & EmptyPayload | { "type": "prompt_text_request" } & PromptTextRequest | { "type": "prompt_text_response" } & PromptTextResponse | { "type": "get_http_request_by_id_request" } & GetHttpRequestByIdRequest | { "type": "get_http_request_by_id_response" } & GetHttpRequestByIdResponse | { "type": "find_http_responses_request" } & FindHttpResponsesRequest | { "type": "find_http_responses_response" } & FindHttpResponsesResponse | { "type": "empty_response" } & EmptyPayload | { "type": "error_response" } & ErrorResponse;
|
||||
export type InternalEventPayload = { "type": "boot_request" } & BootRequest | { "type": "boot_response" } & BootResponse | { "type": "reload_request" } & EmptyPayload | { "type": "reload_response" } & BootResponse | { "type": "terminate_request" } | { "type": "terminate_response" } | { "type": "import_request" } & ImportRequest | { "type": "import_response" } & ImportResponse | { "type": "filter_request" } & FilterRequest | { "type": "filter_response" } & FilterResponse | { "type": "export_http_request_request" } & ExportHttpRequestRequest | { "type": "export_http_request_response" } & ExportHttpRequestResponse | { "type": "send_http_request_request" } & SendHttpRequestRequest | { "type": "send_http_request_response" } & SendHttpRequestResponse | { "type": "list_cookie_names_request" } & ListCookieNamesRequest | { "type": "list_cookie_names_response" } & ListCookieNamesResponse | { "type": "get_cookie_value_request" } & GetCookieValueRequest | { "type": "get_cookie_value_response" } & GetCookieValueResponse | { "type": "get_http_request_actions_request" } & EmptyPayload | { "type": "get_http_request_actions_response" } & GetHttpRequestActionsResponse | { "type": "call_http_request_action_request" } & CallHttpRequestActionRequest | { "type": "get_template_functions_request" } | { "type": "get_template_functions_response" } & GetTemplateFunctionsResponse | { "type": "call_template_function_request" } & CallTemplateFunctionRequest | { "type": "call_template_function_response" } & CallTemplateFunctionResponse | { "type": "get_http_authentication_summary_request" } & EmptyPayload | { "type": "get_http_authentication_summary_response" } & GetHttpAuthenticationSummaryResponse | { "type": "get_http_authentication_config_request" } & GetHttpAuthenticationConfigRequest | { "type": "get_http_authentication_config_response" } & GetHttpAuthenticationConfigResponse | { "type": "call_http_authentication_request" } & CallHttpAuthenticationRequest | { "type": "call_http_authentication_response" } & CallHttpAuthenticationResponse | { "type": "call_http_authentication_action_request" } & CallHttpAuthenticationActionRequest | { "type": "call_http_authentication_action_response" } & EmptyPayload | { "type": "copy_text_request" } & CopyTextRequest | { "type": "copy_text_response" } & EmptyPayload | { "type": "render_http_request_request" } & RenderHttpRequestRequest | { "type": "render_http_request_response" } & RenderHttpRequestResponse | { "type": "get_key_value_request" } & GetKeyValueRequest | { "type": "get_key_value_response" } & GetKeyValueResponse | { "type": "set_key_value_request" } & SetKeyValueRequest | { "type": "set_key_value_response" } & SetKeyValueResponse | { "type": "delete_key_value_request" } & DeleteKeyValueRequest | { "type": "delete_key_value_response" } & DeleteKeyValueResponse | { "type": "open_window_request" } & OpenWindowRequest | { "type": "window_navigate_event" } & WindowNavigateEvent | { "type": "window_close_event" } | { "type": "close_window_request" } & CloseWindowRequest | { "type": "template_render_request" } & TemplateRenderRequest | { "type": "template_render_response" } & TemplateRenderResponse | { "type": "show_toast_request" } & ShowToastRequest | { "type": "show_toast_response" } & EmptyPayload | { "type": "prompt_text_request" } & PromptTextRequest | { "type": "prompt_text_response" } & PromptTextResponse | { "type": "get_http_request_by_id_request" } & GetHttpRequestByIdRequest | { "type": "get_http_request_by_id_response" } & GetHttpRequestByIdResponse | { "type": "find_http_responses_request" } & FindHttpResponsesRequest | { "type": "find_http_responses_response" } & FindHttpResponsesResponse | { "type": "get_themes_request" } & GetThemesRequest | { "type": "get_themes_response" } & GetThemesResponse | { "type": "empty_response" } & EmptyPayload | { "type": "error_response" } & ErrorResponse;
|
||||
|
||||
export type JsonPrimitive = string | number | boolean | null;
|
||||
|
||||
@@ -436,6 +440,32 @@ export type TemplateRenderRequest = { data: JsonValue, purpose: RenderPurpose, }
|
||||
|
||||
export type TemplateRenderResponse = { data: JsonValue, };
|
||||
|
||||
export type Theme = {
|
||||
/**
|
||||
* How the theme is identified. This should never be changed
|
||||
*/
|
||||
id: string,
|
||||
/**
|
||||
* The friendly name of the theme to be displayed to the user
|
||||
*/
|
||||
label: string,
|
||||
/**
|
||||
* Whether the theme will be used for dark or light appearance
|
||||
*/
|
||||
dark: boolean,
|
||||
/**
|
||||
* The default top-level colors for the theme
|
||||
*/
|
||||
base: ThemeComponentColors,
|
||||
/**
|
||||
* Optionally override theme for individual UI components for more control
|
||||
*/
|
||||
components?: ThemeComponents, };
|
||||
|
||||
export type ThemeComponentColors = { surface?: string, surfaceHighlight?: string, surfaceActive?: string, text?: string, textSubtle?: string, textSubtlest?: string, border?: string, borderSubtle?: string, borderFocus?: string, shadow?: string, backdrop?: string, selection?: string, primary?: string, secondary?: string, info?: string, success?: string, notice?: string, warning?: string, danger?: string, };
|
||||
|
||||
export type ThemeComponents = { dialog?: ThemeComponentColors, menu?: ThemeComponentColors, toast?: ThemeComponentColors, sidebar?: ThemeComponentColors, responsePane?: ThemeComponentColors, appHeader?: ThemeComponentColors, button?: ThemeComponentColors, banner?: ThemeComponentColors, templateTag?: ThemeComponentColors, urlBar?: ThemeComponentColors, editor?: ThemeComponentColors, input?: ThemeComponentColors, };
|
||||
|
||||
export type WindowNavigateEvent = { url: string, };
|
||||
|
||||
export type WindowSize = { width: number, height: number, };
|
||||
|
||||
@@ -143,6 +143,9 @@ pub enum InternalEventPayload {
|
||||
FindHttpResponsesRequest(FindHttpResponsesRequest),
|
||||
FindHttpResponsesResponse(FindHttpResponsesResponse),
|
||||
|
||||
GetThemesRequest(GetThemesRequest),
|
||||
GetThemesResponse(GetThemesResponse),
|
||||
|
||||
/// Returned when a plugin doesn't get run, just so the server
|
||||
/// has something to listen for
|
||||
EmptyResponse(EmptyPayload),
|
||||
@@ -284,6 +287,113 @@ pub struct RenderHttpRequestResponse {
|
||||
pub http_request: HttpRequest,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, TS)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "gen_events.ts")]
|
||||
pub struct GetThemesRequest {}
|
||||
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, TS)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "gen_events.ts")]
|
||||
pub struct ThemeComponents {
|
||||
#[ts(optional)]
|
||||
pub dialog: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub menu: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub toast: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub sidebar: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub response_pane: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub app_header: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub button: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub banner: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub template_tag: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub url_bar: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub editor: Option<ThemeComponentColors>,
|
||||
#[ts(optional)]
|
||||
pub input: Option<ThemeComponentColors>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, TS)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "gen_events.ts")]
|
||||
pub struct ThemeComponentColors {
|
||||
#[ts(optional)]
|
||||
pub surface: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub surface_highlight: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub surface_active: Option<String>,
|
||||
|
||||
#[ts(optional)]
|
||||
pub text: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub text_subtle: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub text_subtlest: Option<String>,
|
||||
|
||||
#[ts(optional)]
|
||||
pub border: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub border_subtle: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub border_focus: Option<String>,
|
||||
|
||||
#[ts(optional)]
|
||||
pub shadow: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub backdrop: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub selection: Option<String>,
|
||||
|
||||
#[ts(optional)]
|
||||
pub primary: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub secondary: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub info: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub success: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub notice: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub warning: Option<String>,
|
||||
#[ts(optional)]
|
||||
pub danger: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, TS)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "gen_events.ts")]
|
||||
pub struct Theme {
|
||||
/// How the theme is identified. This should never be changed
|
||||
pub id: String,
|
||||
/// The friendly name of the theme to be displayed to the user
|
||||
pub label: String,
|
||||
/// Whether the theme will be used for dark or light appearance
|
||||
pub dark: bool,
|
||||
/// The default top-level colors for the theme
|
||||
pub base: ThemeComponentColors,
|
||||
/// Optionally override theme for individual UI components for more control
|
||||
#[ts(optional)]
|
||||
pub components: Option<ThemeComponents>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, TS)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "gen_events.ts")]
|
||||
pub struct GetThemesResponse {
|
||||
pub themes: Vec<Theme>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, TS)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "gen_events.ts")]
|
||||
|
||||
@@ -8,8 +8,9 @@ use crate::events::{
|
||||
CallTemplateFunctionArgs, CallTemplateFunctionRequest, CallTemplateFunctionResponse,
|
||||
EmptyPayload, FilterRequest, FilterResponse, GetHttpAuthenticationConfigRequest,
|
||||
GetHttpAuthenticationConfigResponse, GetHttpAuthenticationSummaryResponse,
|
||||
GetHttpRequestActionsResponse, GetTemplateFunctionsResponse, ImportRequest, ImportResponse,
|
||||
InternalEvent, InternalEventPayload, JsonPrimitive, PluginWindowContext, RenderPurpose,
|
||||
GetHttpRequestActionsResponse, GetTemplateFunctionsResponse, GetThemesRequest,
|
||||
GetThemesResponse, ImportRequest, ImportResponse, InternalEvent, InternalEventPayload,
|
||||
JsonPrimitive, PluginWindowContext, RenderPurpose,
|
||||
};
|
||||
use crate::native_template_functions::template_function_secure;
|
||||
use crate::nodejs::start_nodejs_plugin_runtime;
|
||||
@@ -404,6 +405,27 @@ impl PluginManager {
|
||||
Ok(events)
|
||||
}
|
||||
|
||||
pub async fn get_themes<R: Runtime>(
|
||||
&self,
|
||||
window: &WebviewWindow<R>,
|
||||
) -> Result<Vec<GetThemesResponse>> {
|
||||
let reply_events = self
|
||||
.send_and_wait(
|
||||
&PluginWindowContext::new(window),
|
||||
&InternalEventPayload::GetThemesRequest(GetThemesRequest {}),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let mut themes = Vec::new();
|
||||
for event in reply_events {
|
||||
if let InternalEventPayload::GetThemesResponse(resp) = event.payload {
|
||||
themes.push(resp.clone());
|
||||
}
|
||||
}
|
||||
|
||||
Ok(themes)
|
||||
}
|
||||
|
||||
pub async fn get_http_request_actions<R: Runtime>(
|
||||
&self,
|
||||
window: &WebviewWindow<R>,
|
||||
@@ -670,9 +692,9 @@ impl PluginManager {
|
||||
content_type: &str,
|
||||
) -> Result<FilterResponse> {
|
||||
let plugin_name = if content_type.to_lowercase().contains("json") {
|
||||
"@yaakapp/filter-jsonpath"
|
||||
"@yaak/filter-jsonpath"
|
||||
} else {
|
||||
"@yaakapp/filter-xpath"
|
||||
"@yaak/filter-xpath"
|
||||
};
|
||||
|
||||
let plugin = self
|
||||
|
||||
@@ -3,7 +3,6 @@ import type { InternalEvent } from '@yaakapp-internal/plugins';
|
||||
import type { ShowToastRequest } from '@yaakapp/api';
|
||||
import { useSubscribeActiveWorkspaceId } from '../hooks/useActiveWorkspace';
|
||||
import { useActiveWorkspaceChangedToast } from '../hooks/useActiveWorkspaceChangedToast';
|
||||
import { useGenerateThemeCss } from '../hooks/useGenerateThemeCss';
|
||||
import { useSubscribeHttpAuthentication } from '../hooks/useHttpAuthentication';
|
||||
import { useListenToTauriEvent } from '../hooks/useListenToTauriEvent';
|
||||
import { useNotificationToast } from '../hooks/useNotificationToast';
|
||||
@@ -18,7 +17,6 @@ import { showToast } from '../lib/toast';
|
||||
export function GlobalHooks() {
|
||||
useSyncZoomSetting();
|
||||
useSyncFontSizeSetting();
|
||||
useGenerateThemeCss();
|
||||
|
||||
useSubscribeActiveWorkspaceId();
|
||||
|
||||
|
||||
@@ -4,15 +4,13 @@ import React from 'react';
|
||||
import { activeWorkspaceAtom } from '../../hooks/useActiveWorkspace';
|
||||
import { useResolvedAppearance } from '../../hooks/useResolvedAppearance';
|
||||
import { useResolvedTheme } from '../../hooks/useResolvedTheme';
|
||||
import { getThemes } from '../../lib/theme/themes';
|
||||
import { isThemeDark } from '../../lib/theme/window';
|
||||
import type { ButtonProps } from '../core/Button';
|
||||
import { Editor } from '../core/Editor/Editor';
|
||||
import type { IconProps } from '../core/Icon';
|
||||
import { Icon } from '../core/Icon';
|
||||
import { IconButton } from '../core/IconButton';
|
||||
import { Select } from '../core/Select';
|
||||
import type { SelectProps } from '../core/Select';
|
||||
import { Select } from '../core/Select';
|
||||
import { HStack, VStack } from '../core/Stacks';
|
||||
|
||||
const buttonColors: ButtonProps['color'][] = [
|
||||
@@ -44,29 +42,27 @@ const icons: IconProps['icon'][] = [
|
||||
'send_horizontal',
|
||||
];
|
||||
|
||||
const { themes } = getThemes();
|
||||
|
||||
export function SettingsTheme() {
|
||||
const workspace = useAtomValue(activeWorkspaceAtom);
|
||||
const settings = useAtomValue(settingsAtom);
|
||||
const appearance = useResolvedAppearance();
|
||||
const activeTheme = useResolvedTheme();
|
||||
|
||||
if (settings == null || workspace == null) {
|
||||
if (settings == null || workspace == null || activeTheme.data == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const lightThemes: SelectProps<string>['options'] = themes
|
||||
.filter((theme) => !isThemeDark(theme))
|
||||
const lightThemes: SelectProps<string>['options'] = activeTheme.data.themes
|
||||
.filter((theme) => !theme.dark)
|
||||
.map((theme) => ({
|
||||
label: theme.name,
|
||||
label: theme.label,
|
||||
value: theme.id,
|
||||
}));
|
||||
|
||||
const darkThemes: SelectProps<string>['options'] = themes
|
||||
.filter((theme) => isThemeDark(theme))
|
||||
const darkThemes: SelectProps<string>['options'] = activeTheme.data.themes
|
||||
.filter((theme) => theme.dark)
|
||||
.map((theme) => ({
|
||||
label: theme.name,
|
||||
label: theme.label,
|
||||
value: theme.id,
|
||||
}));
|
||||
|
||||
@@ -94,7 +90,7 @@ export function SettingsTheme() {
|
||||
label="Light Theme"
|
||||
size="sm"
|
||||
className="flex-1"
|
||||
value={activeTheme.light.id}
|
||||
value={activeTheme.data.light.id}
|
||||
options={lightThemes}
|
||||
onChange={(themeLight) => patchModel(settings, { themeLight })}
|
||||
/>
|
||||
@@ -107,7 +103,7 @@ export function SettingsTheme() {
|
||||
label="Dark Theme"
|
||||
leftSlot={<Icon icon="moon" color="secondary" />}
|
||||
size="sm"
|
||||
value={activeTheme.dark.id}
|
||||
value={activeTheme.data.dark.id}
|
||||
options={darkThemes}
|
||||
onChange={(themeDark) => patchModel(settings, { themeDark })}
|
||||
/>
|
||||
@@ -120,7 +116,7 @@ export function SettingsTheme() {
|
||||
>
|
||||
<HStack className="text" space={1.5}>
|
||||
<Icon icon={appearance === 'dark' ? 'moon' : 'sun'} />
|
||||
<strong>{activeTheme.active.name}</strong>
|
||||
<strong>{activeTheme.data.active.label}</strong>
|
||||
<em>(preview)</em>
|
||||
</HStack>
|
||||
<HStack space={1.5} className="w-full">
|
||||
|
||||
@@ -220,7 +220,7 @@ export const SidebarItem = memo(function SidebarItem({
|
||||
|
||||
return (
|
||||
<li ref={ref} draggable>
|
||||
<div className={classNames(className, 'block relative group/item px-1.5 pb-0.5')}>
|
||||
<div className={classNames(className, 'block relative group/item pl-2 pb-0.5')}>
|
||||
{showContextMenu && (
|
||||
<SidebarItemContextMenu
|
||||
child={child}
|
||||
|
||||
@@ -1,27 +1,12 @@
|
||||
import { copyToClipboard } from '../lib/copy';
|
||||
import { catppuccinMacchiato } from '../lib/theme/themes/catppuccin';
|
||||
import { githubLight } from '../lib/theme/themes/github';
|
||||
import { gruvboxDefault } from '../lib/theme/themes/gruvbox';
|
||||
import { hotdogStandDefault } from '../lib/theme/themes/hotdog-stand';
|
||||
import { monokaiProDefault } from '../lib/theme/themes/monokai-pro';
|
||||
import { rosePineDefault } from '../lib/theme/themes/rose-pine';
|
||||
import { yaakDark } from '../lib/theme/themes/yaak';
|
||||
import { getThemes } from '../lib/theme/themes';
|
||||
import { getThemeCSS } from '../lib/theme/window';
|
||||
import { useListenToTauriEvent } from './useListenToTauriEvent';
|
||||
|
||||
export function useGenerateThemeCss() {
|
||||
useListenToTauriEvent('generate_theme_css', () => {
|
||||
const themesCss = [
|
||||
yaakDark,
|
||||
monokaiProDefault,
|
||||
rosePineDefault,
|
||||
catppuccinMacchiato,
|
||||
githubLight,
|
||||
gruvboxDefault,
|
||||
hotdogStandDefault,
|
||||
]
|
||||
.map(getThemeCSS)
|
||||
.join('\n\n');
|
||||
useListenToTauriEvent('generate_theme_css', async () => {
|
||||
const themes = await getThemes();
|
||||
const themesCss = themes.themes.map(getThemeCSS).join('\n\n');
|
||||
copyToClipboard(themesCss);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,15 +1,25 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { settingsAtom } from '@yaakapp-internal/models';
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { getResolvedTheme } from '../lib/theme/themes';
|
||||
import { getResolvedTheme, getThemes } from '../lib/theme/themes';
|
||||
import { usePluginsKey } from './usePlugins';
|
||||
import { usePreferredAppearance } from './usePreferredAppearance';
|
||||
|
||||
export function useResolvedTheme() {
|
||||
const preferredAppearance = usePreferredAppearance();
|
||||
const settings = useAtomValue(settingsAtom);
|
||||
return getResolvedTheme(
|
||||
preferredAppearance,
|
||||
settings.appearance,
|
||||
settings.themeLight,
|
||||
settings.themeDark,
|
||||
);
|
||||
const pluginKey = usePluginsKey();
|
||||
return useQuery({
|
||||
placeholderData: (prev) => prev,
|
||||
queryKey: ['resolved_theme', preferredAppearance, settings.updatedAt, pluginKey],
|
||||
queryFn: async () => {
|
||||
const data = await getResolvedTheme(
|
||||
preferredAppearance,
|
||||
settings.appearance,
|
||||
settings.themeLight,
|
||||
settings.themeDark,
|
||||
);
|
||||
return { ...data, ...await getThemes() };
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { InvokeArgs } from '@tauri-apps/api/core';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
|
||||
type TauriCmd =
|
||||
| 'cmd_get_themes'
|
||||
| 'cmd_call_http_authentication_action'
|
||||
| 'cmd_call_http_request_action'
|
||||
| 'cmd_check_for_updates'
|
||||
|
||||
@@ -1,63 +1,108 @@
|
||||
import type { GetThemesResponse } from '@yaakapp-internal/plugins';
|
||||
import { invokeCmd } from '../tauri';
|
||||
import type { Appearance } from './appearance';
|
||||
import { resolveAppearance } from './appearance';
|
||||
import { catppuccin } from './themes/catppuccin';
|
||||
import { dracula } from './themes/dracula';
|
||||
import { github } from './themes/github';
|
||||
import { gruvbox } from './themes/gruvbox';
|
||||
import { hotdogStand } from './themes/hotdog-stand';
|
||||
import { monokaiPro } from './themes/monokai-pro';
|
||||
import { nord } from './themes/nord';
|
||||
import { moonlight } from './themes/moonlight';
|
||||
import { relaxing } from './themes/relaxing';
|
||||
import { rosePine } from './themes/rose-pine';
|
||||
import { yaak, yaakDark, yaakLight } from './themes/yaak';
|
||||
import { isThemeDark } from './window';
|
||||
|
||||
export const defaultDarkTheme = yaakDark;
|
||||
export const defaultLightTheme = yaakLight;
|
||||
|
||||
const allThemes = [
|
||||
...yaak,
|
||||
...catppuccin,
|
||||
...dracula,
|
||||
...relaxing,
|
||||
...rosePine,
|
||||
...github,
|
||||
...gruvbox,
|
||||
...monokaiPro,
|
||||
...nord,
|
||||
...moonlight,
|
||||
...hotdogStand,
|
||||
];
|
||||
|
||||
export function getThemes() {
|
||||
const dark = defaultDarkTheme;
|
||||
const light = defaultLightTheme;
|
||||
|
||||
const otherThemes = allThemes
|
||||
.filter((t) => t.id !== dark.id && t.id !== light.id)
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
const themes = [dark, light, ...otherThemes];
|
||||
return { themes, fallback: { dark, light } };
|
||||
export async function getThemes() {
|
||||
const themes = (await invokeCmd<GetThemesResponse[]>('cmd_get_themes')).flatMap((t) => t.themes);
|
||||
themes.sort((a, b) => a.label.localeCompare(b.label));
|
||||
return { themes: [yaakDark, yaakLight, ...themes] };
|
||||
}
|
||||
|
||||
export function getResolvedTheme(
|
||||
export async function getResolvedTheme(
|
||||
preferredAppearance: Appearance,
|
||||
appearanceSetting: string,
|
||||
themeLight: string,
|
||||
themeDark: string,
|
||||
) {
|
||||
const appearance = resolveAppearance(preferredAppearance, appearanceSetting);
|
||||
const { themes, fallback } = getThemes();
|
||||
const { themes } = await getThemes();
|
||||
|
||||
const darkThemes = themes.filter((t) => isThemeDark(t));
|
||||
const lightThemes = themes.filter((t) => !isThemeDark(t));
|
||||
const darkThemes = themes.filter((t) => t.dark);
|
||||
const lightThemes = themes.filter((t) => !t.dark);
|
||||
|
||||
const dark = darkThemes.find((t) => t.id === themeDark) ?? fallback.dark;
|
||||
const light = lightThemes.find((t) => t.id === themeLight) ?? fallback.light;
|
||||
const dark = darkThemes.find((t) => t.id === themeDark) ?? darkThemes[0] ?? yaakDark;
|
||||
const light = lightThemes.find((t) => t.id === themeLight) ?? lightThemes[0] ?? yaakLight;
|
||||
|
||||
const active = appearance === 'dark' ? dark : light;
|
||||
|
||||
return { dark, light, active };
|
||||
}
|
||||
|
||||
const yaakDark = {
|
||||
id: 'yaak-dark',
|
||||
label: 'Yaak',
|
||||
dark: true,
|
||||
base: {
|
||||
surface: 'hsl(244,23%,14%)',
|
||||
surfaceHighlight: 'hsl(244,23%,20%)',
|
||||
text: 'hsl(245,23%,84%)',
|
||||
textSubtle: 'hsl(245,18%,58%)',
|
||||
textSubtlest: 'hsl(245,18%,45%)',
|
||||
border: 'hsl(244,23%,25%)',
|
||||
primary: 'hsl(266,100%,79%)',
|
||||
secondary: 'hsl(245,23%,60%)',
|
||||
info: 'hsl(206,100%,63%)',
|
||||
success: 'hsl(150,99%,44%)',
|
||||
notice: 'hsl(48,80%,63%)',
|
||||
warning: 'hsl(28,100%,61%)',
|
||||
danger: 'hsl(342,90%,68%)',
|
||||
},
|
||||
components: {
|
||||
button: {
|
||||
primary: 'hsl(266,100%,71.1%)',
|
||||
secondary: 'hsl(244,23%,54%)',
|
||||
info: 'hsl(206,100%,56.7%)',
|
||||
success: 'hsl(150,99%,37.4%)',
|
||||
notice: 'hsl(48,80%,50.4%)',
|
||||
warning: 'hsl(28,100%,54.9%)',
|
||||
danger: 'hsl(342,90%,61.2%)',
|
||||
},
|
||||
dialog: {
|
||||
border: 'hsl(244,23%,24%)',
|
||||
},
|
||||
sidebar: {
|
||||
surface: 'hsl(243,23%,16%)',
|
||||
border: 'hsl(244,23%,22%)',
|
||||
},
|
||||
responsePane: {
|
||||
surface: 'hsl(243,23%,16%)',
|
||||
border: 'hsl(246,23%,22.72%)',
|
||||
},
|
||||
appHeader: {
|
||||
surface: 'hsl(244,23%,12%)',
|
||||
border: 'hsl(244,23%,20.8%)',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const yaakLight = {
|
||||
id: 'yaak-light',
|
||||
label: 'Yaak',
|
||||
dark: false,
|
||||
base: {
|
||||
surface: 'hsl(0,0%,100%)',
|
||||
surfaceHighlight: 'hsl(218,24%,87%)',
|
||||
text: 'hsl(217,24%,15%)',
|
||||
textSubtle: 'hsl(217,24%,40%)',
|
||||
textSubtlest: 'hsl(217,24%,58%)',
|
||||
border: 'hsl(217,22%,93%)',
|
||||
primary: 'hsl(266,100%,70%)',
|
||||
secondary: 'hsl(220,24%,59%)',
|
||||
info: 'hsl(206,100%,48%)',
|
||||
success: 'hsl(155,95%,33%)',
|
||||
notice: 'hsl(45,100%,41%)',
|
||||
warning: 'hsl(30,100%,43%)',
|
||||
danger: 'hsl(335,75%,57%)',
|
||||
},
|
||||
components: {
|
||||
sidebar: {
|
||||
surface: 'hsl(220,20%,97%)',
|
||||
border: 'hsl(217,22%,93%)',
|
||||
surfaceHighlight: 'hsl(217,25%,90%)',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const defaultDarkTheme = yaakDark;
|
||||
export const defaultLightTheme = yaakLight;
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
import { YaakColor } from '../yaakColor';
|
||||
import type { YaakTheme } from '../window';
|
||||
|
||||
export const catppuccinLatte: YaakTheme = {
|
||||
name: 'Catppuccin Latte',
|
||||
id: 'catppuccin-latte',
|
||||
surface: new YaakColor('#eff1f5', 'light'),
|
||||
text: new YaakColor('#4c4f69', 'dark'),
|
||||
textSubtle: new YaakColor('#6c6f85', 'light'),
|
||||
textSubtlest: new YaakColor('#8c8fa1', 'light'),
|
||||
primary: new YaakColor('#8839ef', 'light'),
|
||||
secondary: new YaakColor('#6c6f85', 'light'),
|
||||
info: new YaakColor('#7287fd', 'light'),
|
||||
success: new YaakColor('#179299', 'light'),
|
||||
notice: new YaakColor('#df8e1d', 'light'),
|
||||
warning: new YaakColor('#fe640b', 'light'),
|
||||
danger: new YaakColor('#e64553', 'light'),
|
||||
components: {
|
||||
sidebar: {
|
||||
surface: new YaakColor('#e6e9ef', 'light'),
|
||||
border: new YaakColor('#e6e9ef', 'light').lift(0.05),
|
||||
},
|
||||
appHeader: {
|
||||
surface: new YaakColor('#dce0e8', 'light'),
|
||||
border: new YaakColor('#e6e9ef', 'light').lift(0.05),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const catppuccinMacchiato: YaakTheme = {
|
||||
name: 'Catppuccin Macchiato',
|
||||
id: 'catppuccin-macchiato',
|
||||
surface: new YaakColor('#1e2030', 'dark'),
|
||||
text: new YaakColor('#cad3f5', 'dark'),
|
||||
textSubtle: new YaakColor('#a5adcb', 'dark'),
|
||||
textSubtlest: new YaakColor('#8087a2', 'dark'),
|
||||
primary: new YaakColor('#c6a0f6', 'dark'),
|
||||
secondary: new YaakColor('#b8c0e0', 'dark'),
|
||||
info: new YaakColor('#8aadf4', 'dark'),
|
||||
success: new YaakColor('#a6da95', 'dark'),
|
||||
notice: new YaakColor('#eed49f', 'dark'),
|
||||
warning: new YaakColor('#f5a97f', 'dark'),
|
||||
danger: new YaakColor('#ed8796', 'dark'),
|
||||
components: {
|
||||
dialog: {
|
||||
surface: new YaakColor('#181825', 'dark'),
|
||||
},
|
||||
sidebar: {
|
||||
surface: new YaakColor('#24273a', 'dark'),
|
||||
border: new YaakColor('#24273a', 'dark').lift(0.05),
|
||||
},
|
||||
appHeader: {
|
||||
surface: new YaakColor('#181926', 'dark'),
|
||||
border: new YaakColor('#181926', 'dark').lift(0.1),
|
||||
},
|
||||
responsePane: {
|
||||
surface: new YaakColor('#24273a', 'dark'),
|
||||
border: new YaakColor('#24273a', 'dark').lift(0.05),
|
||||
},
|
||||
button: {
|
||||
primary: new YaakColor('#c6a0f6', 'dark').lower(0.1),
|
||||
secondary: new YaakColor('#b8c0e0', 'dark').lower(0.1),
|
||||
info: new YaakColor('#8aadf4', 'dark').lower(0.1),
|
||||
success: new YaakColor('#a6da95', 'dark').lower(0.1),
|
||||
notice: new YaakColor('#eed49f', 'dark').lower(0.1),
|
||||
warning: new YaakColor('#f5a97f', 'dark').lower(0.1),
|
||||
danger: new YaakColor('#ed8796', 'dark').lower(0.1),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const catppuccinFrappe: YaakTheme = {
|
||||
name: 'Catppuccin Frappé',
|
||||
id: 'catppuccin-frappe',
|
||||
surface: new YaakColor('#292c3c', 'dark'),
|
||||
text: new YaakColor('#c6d0f5', 'dark'),
|
||||
textSubtle: new YaakColor('#a5adce', 'dark'),
|
||||
textSubtlest: new YaakColor('#838ba7', 'dark'),
|
||||
primary: new YaakColor('#ca9ee6', 'dark'),
|
||||
secondary: new YaakColor('#b8c0e0', 'dark'),
|
||||
info: new YaakColor('#8caaee', 'dark'),
|
||||
success: new YaakColor('#a6d189', 'dark'),
|
||||
notice: new YaakColor('#e5c890', 'dark'),
|
||||
warning: new YaakColor('#ef9f76', 'dark'),
|
||||
danger: new YaakColor('#e78284', 'dark'),
|
||||
components: {
|
||||
dialog: {
|
||||
surface: new YaakColor('#181825', 'dark'),
|
||||
},
|
||||
sidebar: {
|
||||
surface: new YaakColor('#303446', 'dark'),
|
||||
border: new YaakColor('#303446', 'dark').lift(0.05),
|
||||
},
|
||||
appHeader: {
|
||||
surface: new YaakColor('#232634', 'dark'),
|
||||
border: new YaakColor('#232634', 'dark').lift(0.1),
|
||||
},
|
||||
responsePane: {
|
||||
surface: new YaakColor('#303446', 'dark'),
|
||||
border: new YaakColor('#303446', 'dark').lift(0.05),
|
||||
},
|
||||
button: {
|
||||
primary: new YaakColor('#ca9ee6', 'dark').lower(0.1),
|
||||
secondary: new YaakColor('#b8c0e0', 'dark').lower(0.1),
|
||||
info: new YaakColor('#8caaee', 'dark').lower(0.1),
|
||||
success: new YaakColor('#a6d189', 'dark').lower(0.1),
|
||||
notice: new YaakColor('#e5c890', 'dark').lower(0.1),
|
||||
warning: new YaakColor('#ef9f76', 'dark').lower(0.1),
|
||||
danger: new YaakColor('#e78284', 'dark').lower(0.1),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const catppuccinMocha: YaakTheme = {
|
||||
name: 'Catppuccin Mocha',
|
||||
id: 'catppuccin-mocha',
|
||||
surface: new YaakColor('#181825', 'dark'),
|
||||
text: new YaakColor('#cdd6f4', 'dark'),
|
||||
textSubtle: new YaakColor('#a6adc8', 'dark'),
|
||||
textSubtlest: new YaakColor('#7f849c', 'dark'),
|
||||
primary: new YaakColor('#c6a0f6', 'dark'),
|
||||
secondary: new YaakColor('#bac2de', 'dark'),
|
||||
info: new YaakColor('#89b4fa', 'dark'),
|
||||
success: new YaakColor('#a6e3a1', 'dark'),
|
||||
notice: new YaakColor('#f9e2af', 'dark'),
|
||||
warning: new YaakColor('#fab387', 'dark'),
|
||||
danger: new YaakColor('#f38ba8', 'dark'),
|
||||
components: {
|
||||
dialog: {
|
||||
surface: new YaakColor('#181825', 'dark'),
|
||||
},
|
||||
sidebar: {
|
||||
surface: new YaakColor('#1e1e2e', 'dark'),
|
||||
border: new YaakColor('#1e1e2e', 'dark').lift(0.05),
|
||||
},
|
||||
appHeader: {
|
||||
surface: new YaakColor('#11111b', 'dark'),
|
||||
border: new YaakColor('#11111b', 'dark').lift(0.1),
|
||||
},
|
||||
responsePane: {
|
||||
surface: new YaakColor('#1e1e2e', 'dark'),
|
||||
border: new YaakColor('#1e1e2e', 'dark').lift(0.05),
|
||||
},
|
||||
button: {
|
||||
primary: new YaakColor('#cba6f7', 'dark').lower(0.2).desaturate(0.2),
|
||||
secondary: new YaakColor('#bac2de', 'dark').lower(0.2).desaturate(0.2),
|
||||
info: new YaakColor('#89b4fa', 'dark').lower(0.2).desaturate(0.2),
|
||||
success: new YaakColor('#a6e3a1', 'dark').lower(0.2).desaturate(0.2),
|
||||
notice: new YaakColor('#f9e2af', 'dark').lower(0.2).desaturate(0.2),
|
||||
warning: new YaakColor('#fab387', 'dark').lower(0.2).desaturate(0.2),
|
||||
danger: new YaakColor('#f38ba8', 'dark').lower(0.2).desaturate(0.2),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const catppuccin = [catppuccinFrappe, catppuccinMacchiato, catppuccinMocha, catppuccinLatte];
|
||||
@@ -1,29 +0,0 @@
|
||||
import type { YaakTheme } from '../window';
|
||||
import { YaakColor } from '../yaakColor';
|
||||
|
||||
const draculaDefault: YaakTheme = {
|
||||
id: 'dracula',
|
||||
name: 'Dracula',
|
||||
surface: new YaakColor('#282A36', 'dark'),
|
||||
surfaceHighlight: new YaakColor('#343746', 'dark'),
|
||||
text: new YaakColor('#F8F8F2', 'dark'),
|
||||
textSubtle: new YaakColor('hsl(232,14%,65%)', 'dark'),
|
||||
textSubtlest: new YaakColor('hsl(232,14%,50%)', 'dark'),
|
||||
primary: new YaakColor('#BD93F9', 'dark'),
|
||||
secondary: new YaakColor('#6272A4', 'dark'),
|
||||
info: new YaakColor('#8BE9FD', 'dark'),
|
||||
success: new YaakColor('#50FA7B', 'dark'),
|
||||
notice: new YaakColor('#F1FA8C', 'dark'),
|
||||
warning: new YaakColor('#FFB86C', 'dark'),
|
||||
danger: new YaakColor('#FF5555', 'dark'),
|
||||
components: {
|
||||
sidebar: {
|
||||
backdrop: new YaakColor('hsl(230,15%,24%)', 'dark'),
|
||||
},
|
||||
appHeader: {
|
||||
backdrop: new YaakColor('#21222C', 'dark'),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const dracula = [draculaDefault];
|
||||
@@ -1,52 +0,0 @@
|
||||
import { YaakColor } from '../yaakColor';
|
||||
import type { YaakTheme } from '../window';
|
||||
|
||||
const githubDark: YaakTheme = {
|
||||
id: 'github-dark',
|
||||
name: 'GitHub',
|
||||
surface: new YaakColor('#0d1218', 'dark'),
|
||||
border: new YaakColor('#171c23', 'dark'),
|
||||
surfaceHighlight: new YaakColor('#1c2127', 'dark'),
|
||||
text: new YaakColor('#dce3eb', 'dark'),
|
||||
textSubtle: new YaakColor('#88919b', 'dark'),
|
||||
textSubtlest: new YaakColor('#6b727d', 'dark'),
|
||||
primary: new YaakColor('#a579ef', 'dark').lift(0.1),
|
||||
secondary: new YaakColor('#6b727d', 'dark').lift(0.1),
|
||||
info: new YaakColor('#458def', 'dark').lift(0.1),
|
||||
success: new YaakColor('#3eb24f', 'dark').lift(0.1),
|
||||
notice: new YaakColor('#dca132', 'dark').lift(0.1),
|
||||
warning: new YaakColor('#ec7934', 'dark').lift(0.1),
|
||||
danger: new YaakColor('#ee5049', 'dark').lift(0.1),
|
||||
components: {
|
||||
button: {
|
||||
primary: new YaakColor('#a579ef', 'dark'),
|
||||
secondary: new YaakColor('#6b727d', 'dark'),
|
||||
info: new YaakColor('#458def', 'dark'),
|
||||
success: new YaakColor('#3eb24f', 'dark'),
|
||||
notice: new YaakColor('#dca132', 'dark'),
|
||||
warning: new YaakColor('#ec7934', 'dark'),
|
||||
danger: new YaakColor('#ee5049', 'dark'),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const githubLight: YaakTheme = {
|
||||
id: 'github-light',
|
||||
name: 'GitHub',
|
||||
surface: new YaakColor('#ffffff', 'light'),
|
||||
surfaceHighlight: new YaakColor('hsl(210,29%,94%)', 'light'),
|
||||
border: new YaakColor('hsl(210,15%,92%)', 'light'),
|
||||
borderSubtle: new YaakColor('hsl(210,15%,92%)', 'light'),
|
||||
text: new YaakColor('#1f2328', 'light'),
|
||||
textSubtle: new YaakColor('#636c76', 'light'),
|
||||
textSubtlest: new YaakColor('#828d94', 'light'),
|
||||
primary: new YaakColor('#8250df', 'light'),
|
||||
secondary: new YaakColor('#6e7781', 'light'),
|
||||
info: new YaakColor('hsl(212,92%,48%)', 'light'),
|
||||
success: new YaakColor('hsl(137,66%,32%)', 'light'),
|
||||
notice: new YaakColor('hsl(40,100%,40%)', 'light'),
|
||||
warning: new YaakColor('hsl(24,100%,44%)', 'light'),
|
||||
danger: new YaakColor('#d1242f', 'light'),
|
||||
};
|
||||
|
||||
export const github = [githubDark, githubLight];
|
||||
@@ -1,21 +0,0 @@
|
||||
import type { YaakTheme } from '../window';
|
||||
import { YaakColor } from '../yaakColor';
|
||||
|
||||
export const gruvboxDefault: YaakTheme = {
|
||||
id: 'gruvbox',
|
||||
name: 'Gruvbox',
|
||||
surface: new YaakColor('#282828', 'dark'),
|
||||
surfaceHighlight: new YaakColor('#32302f', 'dark'),
|
||||
text: new YaakColor('#f9f5d7', 'dark'),
|
||||
textSubtle: new YaakColor('#bdae93', 'dark'),
|
||||
textSubtlest: new YaakColor('#928374', 'dark'),
|
||||
primary: new YaakColor('#d3869b', 'dark'),
|
||||
secondary: new YaakColor('#83a598', 'dark'),
|
||||
info: new YaakColor('#8ec07c', 'dark'),
|
||||
success: new YaakColor('#b8bb26', 'dark'),
|
||||
notice: new YaakColor('#fabd2f', 'dark'),
|
||||
warning: new YaakColor('#fe8019', 'dark'),
|
||||
danger: new YaakColor('#fb4934', 'dark'),
|
||||
};
|
||||
|
||||
export const gruvbox = [gruvboxDefault];
|
||||
@@ -1,58 +0,0 @@
|
||||
import { YaakColor } from '../yaakColor';
|
||||
import type { YaakTheme } from '../window';
|
||||
|
||||
export const hotdogStandDefault: YaakTheme = {
|
||||
id: 'hotdog-stand',
|
||||
name: 'Hotdog Stand',
|
||||
surface: new YaakColor('#ff0000', 'dark'),
|
||||
border: new YaakColor('#000000', 'dark'),
|
||||
surfaceHighlight: new YaakColor('#000000', 'dark'),
|
||||
text: new YaakColor('#ffffff', 'dark'),
|
||||
textSubtle: new YaakColor('#ffffff', 'dark'),
|
||||
textSubtlest: new YaakColor('#ffff00', 'dark'),
|
||||
primary: new YaakColor('#ffff00', 'dark'),
|
||||
secondary: new YaakColor('#ffff00', 'dark'),
|
||||
info: new YaakColor('#ffff00', 'dark'),
|
||||
success: new YaakColor('#ffff00', 'dark'),
|
||||
notice: new YaakColor('#ffff00', 'dark'),
|
||||
warning: new YaakColor('#ffff00', 'dark'),
|
||||
danger: new YaakColor('#ffff00', 'dark'),
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: new YaakColor('#000000', 'dark'),
|
||||
text: new YaakColor('#ffffff', 'dark'),
|
||||
textSubtle: new YaakColor('#ffff00', 'dark'),
|
||||
textSubtlest: new YaakColor('#ff0000', 'dark'),
|
||||
},
|
||||
menu: {
|
||||
surface: new YaakColor('#000000', 'dark'),
|
||||
border: new YaakColor('#ff0000', 'dark'),
|
||||
surfaceHighlight: new YaakColor('#ff0000', 'dark'),
|
||||
text: new YaakColor('#ffffff', 'dark'),
|
||||
textSubtle: new YaakColor('#ffff00', 'dark'),
|
||||
textSubtlest: new YaakColor('#ffff00', 'dark'),
|
||||
},
|
||||
button: {
|
||||
surface: new YaakColor('#000000', 'dark'),
|
||||
text: new YaakColor('#ffffff', 'dark'),
|
||||
primary: new YaakColor('#000000', 'dark'),
|
||||
secondary: new YaakColor('#ffffff', 'dark'),
|
||||
info: new YaakColor('#000000', 'dark'),
|
||||
success: new YaakColor('#ffff00', 'dark'),
|
||||
notice: new YaakColor('#ffff00', 'dark'),
|
||||
warning: new YaakColor('#000000', 'dark'),
|
||||
danger: new YaakColor('#ff0000', 'dark'),
|
||||
},
|
||||
editor: {
|
||||
primary: new YaakColor('#ffffff', 'dark'),
|
||||
secondary: new YaakColor('#ffffff', 'dark'),
|
||||
info: new YaakColor('#ffffff', 'dark'),
|
||||
success: new YaakColor('#ffffff', 'dark'),
|
||||
notice: new YaakColor('#ffff00', 'dark'),
|
||||
warning: new YaakColor('#ffffff', 'dark'),
|
||||
danger: new YaakColor('#ffffff', 'dark'),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const hotdogStand = [hotdogStandDefault];
|
||||
@@ -1,221 +0,0 @@
|
||||
import { YaakColor } from '../yaakColor';
|
||||
import type { YaakTheme } from '../window';
|
||||
|
||||
export const monokaiProDefault: YaakTheme = {
|
||||
id: 'monokai-pro',
|
||||
name: 'Monokai Pro',
|
||||
surface: new YaakColor('#2d2a2e', 'dark'),
|
||||
text: new YaakColor('#fcfcfa', 'dark'),
|
||||
textSubtle: new YaakColor('#c1c0c0', 'dark'),
|
||||
textSubtlest: new YaakColor('#939293', 'dark'),
|
||||
|
||||
primary: new YaakColor('#ab9df2', 'dark'),
|
||||
secondary: new YaakColor('#c1c0c0', 'dark'),
|
||||
info: new YaakColor('#78dce8', 'dark'),
|
||||
success: new YaakColor('#a9dc76', 'dark'),
|
||||
notice: new YaakColor('#ffd866', 'dark'),
|
||||
warning: new YaakColor('#fc9867', 'dark'),
|
||||
danger: new YaakColor('#ff6188', 'dark'),
|
||||
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: new YaakColor('#221f22', 'dark'),
|
||||
text: new YaakColor('#c1c0c0', 'dark'),
|
||||
textSubtle: new YaakColor('#939293', 'dark'),
|
||||
textSubtlest: new YaakColor('#727072', 'dark'),
|
||||
},
|
||||
button: {
|
||||
primary: new YaakColor('#ab9df2', 'dark').lower(0.1),
|
||||
secondary: new YaakColor('#c1c0c0', 'dark').lower(0.1),
|
||||
info: new YaakColor('#78dce8', 'dark').lower(0.1),
|
||||
success: new YaakColor('#a9dc76', 'dark').lower(0.1),
|
||||
notice: new YaakColor('#ffd866', 'dark').lower(0.1),
|
||||
warning: new YaakColor('#fc9867', 'dark').lower(0.1),
|
||||
danger: new YaakColor('#ff6188', 'dark').lower(0.1),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const monokaiProClassic: YaakTheme = {
|
||||
id: 'monokai-pro-classic',
|
||||
name: 'Monokai Pro Classic',
|
||||
surface: new YaakColor('#272822', 'dark'),
|
||||
text: new YaakColor('#fdfff1', 'dark'),
|
||||
textSubtle: new YaakColor('#c0c1b5', 'dark'),
|
||||
textSubtlest: new YaakColor('#919288', 'dark'),
|
||||
|
||||
primary: new YaakColor('#ae81ff', 'dark'),
|
||||
secondary: new YaakColor('#b2b9bd', 'dark'),
|
||||
info: new YaakColor('#66d9ef', 'dark'),
|
||||
success: new YaakColor('#a6e22e', 'dark'),
|
||||
notice: new YaakColor('#e6db74', 'dark'),
|
||||
warning: new YaakColor('#fd971f', 'dark'),
|
||||
danger: new YaakColor('#f92672', 'dark'),
|
||||
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: new YaakColor('#1d1e19', 'dark'),
|
||||
text: new YaakColor('#b2b9bd', 'dark'),
|
||||
textSubtle: new YaakColor('#767b81', 'dark'),
|
||||
textSubtlest: new YaakColor('#696d77', 'dark'),
|
||||
},
|
||||
button: {
|
||||
primary: new YaakColor('#ae81ff', 'dark').lower(0.1),
|
||||
secondary: new YaakColor('#b2b9bd', 'dark').lower(0.1),
|
||||
info: new YaakColor('#66d9ef', 'dark').lower(0.1),
|
||||
success: new YaakColor('#a6e22e', 'dark').lower(0.1),
|
||||
notice: new YaakColor('#e6db74', 'dark').lower(0.1),
|
||||
warning: new YaakColor('#fd971f', 'dark').lower(0.1),
|
||||
danger: new YaakColor('#f92672', 'dark').lower(0.1),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const monokaiProMachine: YaakTheme = {
|
||||
id: 'monokai-pro-machine',
|
||||
name: 'Monokai Pro Machine',
|
||||
surface: new YaakColor('#273136', 'dark'),
|
||||
text: new YaakColor('#eaf2f1', 'dark'),
|
||||
textSubtle: new YaakColor('#8b9798', 'dark'),
|
||||
textSubtlest: new YaakColor('#6b7678', 'dark'),
|
||||
|
||||
primary: new YaakColor('#baa0f8', 'dark'),
|
||||
secondary: new YaakColor('#b8c4c3', 'dark'),
|
||||
info: new YaakColor('#7cd5f1', 'dark'),
|
||||
success: new YaakColor('#a2e57b', 'dark'),
|
||||
notice: new YaakColor('#ffed72', 'dark'),
|
||||
warning: new YaakColor('#ffb270', 'dark'),
|
||||
danger: new YaakColor('#ff6d7e', 'dark'),
|
||||
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: new YaakColor('#1d2528', 'dark'),
|
||||
text: new YaakColor('#b2b9bd', 'dark'),
|
||||
textSubtle: new YaakColor('#767b81', 'dark'),
|
||||
textSubtlest: new YaakColor('#696d77', 'dark'),
|
||||
},
|
||||
button: {
|
||||
primary: new YaakColor('#baa0f8', 'dark').lower(0.1),
|
||||
secondary: new YaakColor('#b8c4c3', 'dark').lower(0.1),
|
||||
info: new YaakColor('#7cd5f1', 'dark').lower(0.1),
|
||||
success: new YaakColor('#a2e57b', 'dark').lower(0.1),
|
||||
notice: new YaakColor('#ffed72', 'dark').lower(0.1),
|
||||
warning: new YaakColor('#ffb270', 'dark').lower(0.1),
|
||||
danger: new YaakColor('#ff6d7e', 'dark').lower(0.1),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const monokaiProOctagon: YaakTheme = {
|
||||
id: 'monokai-pro-octagon',
|
||||
name: 'Monokai Pro Octagon',
|
||||
surface: new YaakColor('#282a3a', 'dark'),
|
||||
text: new YaakColor('#eaf2f1', 'dark'),
|
||||
textSubtle: new YaakColor('#b2b9bd', 'dark'),
|
||||
textSubtlest: new YaakColor('#767b81', 'dark'),
|
||||
|
||||
primary: new YaakColor('#c39ac9', 'dark'),
|
||||
secondary: new YaakColor('#b2b9bd', 'dark'),
|
||||
info: new YaakColor('#9cd1bb', 'dark'),
|
||||
success: new YaakColor('#bad761', 'dark'),
|
||||
notice: new YaakColor('#ffd76d', 'dark'),
|
||||
warning: new YaakColor('#ff9b5e', 'dark'),
|
||||
danger: new YaakColor('#ff657a', 'dark'),
|
||||
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: new YaakColor('#1e1f2b', 'dark'),
|
||||
text: new YaakColor('#b2b9bd', 'dark'),
|
||||
textSubtle: new YaakColor('#767b81', 'dark'),
|
||||
textSubtlest: new YaakColor('#696d77', 'dark'),
|
||||
},
|
||||
button: {
|
||||
primary: new YaakColor('#c39ac9', 'dark').lower(0.1).desaturate(0.1),
|
||||
secondary: new YaakColor('#b2b9bd', 'dark').lower(0.1).desaturate(0.1),
|
||||
info: new YaakColor('#9cd1bb', 'dark').lower(0.1).desaturate(0.1),
|
||||
success: new YaakColor('#bad761', 'dark').lower(0.1).desaturate(0.1),
|
||||
notice: new YaakColor('#ffd76d', 'dark').lower(0.1).desaturate(0.1),
|
||||
warning: new YaakColor('#ff9b5e', 'dark').lower(0.1).desaturate(0.1),
|
||||
danger: new YaakColor('#ff657a', 'dark').lower(0.1).desaturate(0.1),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const monokaiProRistretto: YaakTheme = {
|
||||
id: 'monokai-pro-ristretto',
|
||||
name: 'Monokai Pro Ristretto',
|
||||
surface: new YaakColor('#2c2525', 'dark'),
|
||||
text: new YaakColor('#fff1f3', 'dark'),
|
||||
textSubtle: new YaakColor('#c3b7b8', 'dark'),
|
||||
textSubtlest: new YaakColor('#948a8b', 'dark'),
|
||||
|
||||
primary: new YaakColor('#a8a9eb', 'dark'),
|
||||
secondary: new YaakColor('#c3b7b8', 'dark'),
|
||||
info: new YaakColor('#85dacc', 'dark'),
|
||||
success: new YaakColor('#adda78', 'dark'),
|
||||
notice: new YaakColor('#f9cc6c', 'dark'),
|
||||
warning: new YaakColor('#f38d70', 'dark'),
|
||||
danger: new YaakColor('#fd6883', 'dark'),
|
||||
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: new YaakColor('#211c1c', 'dark'),
|
||||
text: new YaakColor('#c3b7b8', 'dark'),
|
||||
textSubtle: new YaakColor('#948a8b', 'dark'),
|
||||
textSubtlest: new YaakColor('#72696a', 'dark'),
|
||||
},
|
||||
button: {
|
||||
primary: new YaakColor('#a8a9eb', 'dark').lower(0.1),
|
||||
secondary: new YaakColor('#c3b7b8', 'dark').lower(0.1),
|
||||
info: new YaakColor('#85dacc', 'dark').lower(0.1),
|
||||
success: new YaakColor('#adda78', 'dark').lower(0.1),
|
||||
notice: new YaakColor('#f9cc6c', 'dark').lower(0.1),
|
||||
warning: new YaakColor('#f38d70', 'dark').lower(0.1),
|
||||
danger: new YaakColor('#fd6883', 'dark').lower(0.1),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const monokaiProSpectrum: YaakTheme = {
|
||||
id: 'monokai-pro-spectrum',
|
||||
name: 'Monokai Pro Spectrum',
|
||||
surface: new YaakColor('#222222', 'dark'),
|
||||
text: new YaakColor('#f7f1ff', 'dark'),
|
||||
textSubtle: new YaakColor('#bab6c0', 'dark'),
|
||||
textSubtlest: new YaakColor('#8b888f', 'dark'),
|
||||
|
||||
primary: new YaakColor('#948ae3', 'dark'),
|
||||
secondary: new YaakColor('#bab6c0', 'dark'),
|
||||
info: new YaakColor('#5ad4e6', 'dark'),
|
||||
success: new YaakColor('#7bd88f', 'dark'),
|
||||
notice: new YaakColor('#fce566', 'dark'),
|
||||
warning: new YaakColor('#fd9353', 'dark'),
|
||||
danger: new YaakColor('#fc618d', 'dark'),
|
||||
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: new YaakColor('#191919', 'dark'),
|
||||
text: new YaakColor('#bab6c0', 'dark'),
|
||||
textSubtle: new YaakColor('#8b888f', 'dark'),
|
||||
textSubtlest: new YaakColor('#69676c', 'dark'),
|
||||
},
|
||||
button: {
|
||||
primary: new YaakColor('#948ae3', 'dark').lower(0.1),
|
||||
secondary: new YaakColor('#bab6c0', 'dark').lower(0.1),
|
||||
info: new YaakColor('#5ad4e6', 'dark').lower(0.1),
|
||||
success: new YaakColor('#7bd88f', 'dark').lower(0.1),
|
||||
notice: new YaakColor('#fce566', 'dark').lower(0.1),
|
||||
warning: new YaakColor('#fd9353', 'dark').lower(0.1),
|
||||
danger: new YaakColor('#fc618d', 'dark').lower(0.1),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const monokaiPro = [
|
||||
monokaiProDefault,
|
||||
monokaiProClassic,
|
||||
monokaiProMachine,
|
||||
monokaiProOctagon,
|
||||
monokaiProRistretto,
|
||||
monokaiProSpectrum,
|
||||
];
|
||||
@@ -1,64 +0,0 @@
|
||||
import type { YaakTheme } from '../window';
|
||||
import { YaakColor } from '../yaakColor';
|
||||
|
||||
export const colors = {
|
||||
lightRed: '#ff98a4',
|
||||
red: '#ff757f',
|
||||
darkRed: '#ff5370',
|
||||
lightOrange: '#f8b576',
|
||||
orange: '#ff966c',
|
||||
darkOrange: '#fc7b7b',
|
||||
yellow: '#ffc777',
|
||||
green: '#c3e88d',
|
||||
lightTeal: '#7af8ca',
|
||||
teal: '#3ad7c7',
|
||||
lightCyan: '#b4f9f8',
|
||||
cyan: '#78dbff',
|
||||
sky: '#60bdff',
|
||||
blue: '#7cafff',
|
||||
darkBlue: '#3d6fe0',
|
||||
darkestBlue: '#3b63cf',
|
||||
indigo: '#af9fff',
|
||||
purple: '#c4a2ff',
|
||||
pink: '#fca7ea',
|
||||
darkPink: '#fd8aca',
|
||||
saturatedGray: '#7a88cf',
|
||||
desaturatedGray: '#979bb6',
|
||||
gray11: '#d5def8',
|
||||
gray10: '#c8d3f5',
|
||||
gray9: '#b4c2f0',
|
||||
gray8: '#a9b8e8',
|
||||
gray7: '#828bb8',
|
||||
gray6: '#444a73',
|
||||
gray5: '#2f334d',
|
||||
gray4: '#222436',
|
||||
gray3: '#1e2030',
|
||||
gray2: '#191a2a',
|
||||
gray1: '#131421',
|
||||
} as const;
|
||||
|
||||
const moonlightDefault: YaakTheme = {
|
||||
id: 'moonlight',
|
||||
name: 'Moonlight',
|
||||
surface: new YaakColor('#222436', 'dark'),
|
||||
text: new YaakColor('#d5def8', 'dark'),
|
||||
textSubtle: new YaakColor('#828bb8', 'dark'),
|
||||
textSubtlest: new YaakColor('hsl(232,26%,43%)', 'dark'),
|
||||
primary: new YaakColor(colors.purple, 'dark'),
|
||||
secondary: new YaakColor(colors.desaturatedGray, 'dark'),
|
||||
info: new YaakColor(colors.blue, 'dark'),
|
||||
success: new YaakColor(colors.teal, 'dark'),
|
||||
notice: new YaakColor(colors.yellow, 'dark'),
|
||||
warning: new YaakColor(colors.orange, 'dark'),
|
||||
danger: new YaakColor(colors.red, 'dark'),
|
||||
components: {
|
||||
appHeader: {
|
||||
surface: new YaakColor(colors.gray3, 'dark'),
|
||||
},
|
||||
sidebar: {
|
||||
surface: new YaakColor(colors.gray3, 'dark'),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const moonlight = [moonlightDefault];
|
||||
@@ -1,30 +0,0 @@
|
||||
import type { YaakTheme } from '../window';
|
||||
import { YaakColor } from '../yaakColor';
|
||||
|
||||
const nordDefault: YaakTheme = {
|
||||
id: 'nord',
|
||||
name: 'Nord',
|
||||
surface: new YaakColor('hsl(220, 16%, 22%)', 'dark'), // Nord0 (#2e3440)
|
||||
surfaceHighlight: new YaakColor('hsl(220, 14%, 28%)', 'dark'), // Nord1 (#3b4252)
|
||||
text: new YaakColor('hsl(220, 28%, 93%)', 'dark'), // Nord6 (#ECEFF4)
|
||||
textSubtle: new YaakColor('hsl(220, 26%, 90%)', 'dark'), // Nord5 (#E5E9F0)
|
||||
textSubtlest: new YaakColor('hsl(220, 24%, 86%)', 'dark'), // Nord4 (#D8DEE9)
|
||||
primary: new YaakColor('hsl(193, 38%, 68%)', 'dark'), // Nord8 (#88C0D0)
|
||||
secondary: new YaakColor('hsl(210, 34%, 63%)', 'dark'), // Nord9 (#81A1C1)
|
||||
info: new YaakColor('hsl(174, 25%, 69%)', 'dark'), // Nord7 (#8FBCBB)
|
||||
success: new YaakColor('hsl(89, 26%, 66%)', 'dark'), // Nord14 (#A3BE8C)
|
||||
notice: new YaakColor('hsl(40, 66%, 73%)', 'dark'), // Nord13 (#EBCB8B)
|
||||
warning: new YaakColor('hsl(17, 48%, 64%)', 'dark'), // Nord12 (#D08770)
|
||||
danger: new YaakColor('hsl(353, 43%, 56%)', 'dark'), // Nord11 (#BF616A)
|
||||
components: {
|
||||
sidebar: {
|
||||
backdrop: new YaakColor('hsl(220, 16%, 22%)', 'dark'), // Nord0 (#2e3440)
|
||||
},
|
||||
appHeader: {
|
||||
backdrop: new YaakColor('hsl(220, 14%, 28%)', 'dark'), // Nord1 (#3b4252)
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const nord = [nordDefault];
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import { YaakColor } from '../yaakColor';
|
||||
import type { YaakTheme } from '../window';
|
||||
|
||||
const relaxingDefault: YaakTheme = {
|
||||
name: 'Relaxing',
|
||||
id: 'relaxing',
|
||||
surface: new YaakColor('#2b1e3b', 'dark'),
|
||||
text: new YaakColor('#ede2f5', 'dark'),
|
||||
primary: new YaakColor('#cba6f7', 'dark'),
|
||||
secondary: new YaakColor('#bac2de', 'dark'),
|
||||
info: new YaakColor('#89b4fa', 'dark'),
|
||||
success: new YaakColor('#a6e3a1', 'dark'),
|
||||
notice: new YaakColor('#f9e2af', 'dark'),
|
||||
warning: new YaakColor('#fab387', 'dark'),
|
||||
danger: new YaakColor('#f38ba8', 'dark'),
|
||||
};
|
||||
|
||||
export const relaxing = [relaxingDefault];
|
||||
@@ -1,105 +0,0 @@
|
||||
import { YaakColor } from '../yaakColor';
|
||||
import type { YaakTheme } from '../window';
|
||||
|
||||
export const rosePineDefault: YaakTheme = {
|
||||
id: 'rose-pine',
|
||||
name: 'Rosé Pine',
|
||||
surface: new YaakColor('#191724', 'dark'),
|
||||
text: new YaakColor('#e0def4', 'dark'),
|
||||
textSubtle: new YaakColor('#908caa', 'dark'),
|
||||
textSubtlest: new YaakColor('#6e6a86', 'dark'),
|
||||
primary: new YaakColor('#c4a7e7', 'dark'),
|
||||
secondary: new YaakColor('#6e6a86', 'dark'),
|
||||
info: new YaakColor('#67abcb', 'dark'),
|
||||
success: new YaakColor('#9cd8d8', 'dark'),
|
||||
notice: new YaakColor('#f6c177', 'dark'),
|
||||
warning: new YaakColor('#f1a3a1', 'dark'),
|
||||
danger: new YaakColor('#eb6f92', 'dark'),
|
||||
components: {
|
||||
responsePane: {
|
||||
surface: new YaakColor('#1f1d2e', 'dark'),
|
||||
},
|
||||
sidebar: {
|
||||
surface: new YaakColor('#1f1d2e', 'dark'),
|
||||
},
|
||||
menu: {
|
||||
surface: new YaakColor('#393552', 'dark'),
|
||||
textSubtle: new YaakColor('#908caa', 'dark').lift(0.15),
|
||||
textSubtlest: new YaakColor('#6e6a86', 'dark').lift(0.15),
|
||||
border: new YaakColor('#393552', 'dark').lift(0.2),
|
||||
borderSubtle: new YaakColor('#393552', 'dark').lift(0.12),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const rosePineMoon: YaakTheme = {
|
||||
id: 'rose-pine-moon',
|
||||
name: 'Rosé Pine Moon',
|
||||
surface: new YaakColor('#232136', 'dark'),
|
||||
text: new YaakColor('#e0def4', 'dark'),
|
||||
textSubtle: new YaakColor('#908caa', 'dark'),
|
||||
textSubtlest: new YaakColor('#6e6a86', 'dark'),
|
||||
primary: new YaakColor('#c4a7e7', 'dark'),
|
||||
secondary: new YaakColor('#908caa', 'dark'),
|
||||
info: new YaakColor('#68aeca', 'dark'),
|
||||
success: new YaakColor('#9ccfd8', 'dark'),
|
||||
notice: new YaakColor('#f6c177', 'dark'),
|
||||
warning: new YaakColor('#ea9a97', 'dark'),
|
||||
danger: new YaakColor('#eb6f92', 'dark'),
|
||||
components: {
|
||||
responsePane: {
|
||||
surface: new YaakColor('#2a273f', 'dark'),
|
||||
},
|
||||
sidebar: {
|
||||
surface: new YaakColor('#2a273f', 'dark'),
|
||||
},
|
||||
menu: {
|
||||
surface: new YaakColor('#393552', 'dark'),
|
||||
textSubtle: new YaakColor('#908caa', 'dark').lift(0.15),
|
||||
textSubtlest: new YaakColor('#6e6a86', 'dark').lift(0.15),
|
||||
border: new YaakColor('#393552', 'dark').lift(0.2),
|
||||
borderSubtle: new YaakColor('#393552', 'dark').lift(0.12),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const rosePineDawn: YaakTheme = {
|
||||
id: 'rose-pine-dawn',
|
||||
name: 'Rosé Pine Dawn',
|
||||
surface: new YaakColor('#faf4ed', 'light'),
|
||||
border: new YaakColor('#dfdad9', 'light'),
|
||||
surfaceHighlight: new YaakColor('#f4ede8', 'light'),
|
||||
text: new YaakColor('#575279', 'light'),
|
||||
textSubtle: new YaakColor('#797593', 'light'),
|
||||
textSubtlest: new YaakColor('#9893a5', 'light'),
|
||||
primary: new YaakColor('#9070ad', 'light'),
|
||||
secondary: new YaakColor('#6e6a86', 'light'),
|
||||
info: new YaakColor('#2d728d', 'light'),
|
||||
success: new YaakColor('#4f8c96', 'light'),
|
||||
notice: new YaakColor('#cb862d', 'light'),
|
||||
warning: new YaakColor('#ce7b78', 'light'),
|
||||
danger: new YaakColor('#b4637a', 'light'),
|
||||
components: {
|
||||
responsePane: {
|
||||
border: new YaakColor('#e8e4e2', 'light'),
|
||||
},
|
||||
sidebar: {
|
||||
border: new YaakColor('#e8e4e2', 'light'),
|
||||
},
|
||||
appHeader: {
|
||||
border: new YaakColor('#e8e4e2', 'light'),
|
||||
},
|
||||
input: {
|
||||
border: new YaakColor('#dfdad9', 'light'),
|
||||
},
|
||||
dialog: {
|
||||
border: new YaakColor('#e8e4e2', 'light'),
|
||||
},
|
||||
menu: {
|
||||
surface: new YaakColor('#f2e9e1', 'light'),
|
||||
border: new YaakColor('#dfdad9', 'light'),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const rosePine = [rosePineDefault, rosePineDawn, rosePineMoon];
|
||||
@@ -1,74 +0,0 @@
|
||||
import { YaakColor } from '../yaakColor';
|
||||
import type { YaakTheme } from '../window';
|
||||
|
||||
export const yaakLight: YaakTheme = {
|
||||
id: 'yaak-light',
|
||||
name: 'Yaak',
|
||||
surface: new YaakColor('hsl(216,24%,100%)', 'light'),
|
||||
border: new YaakColor('hsl(216,24%,93%)', 'light'),
|
||||
surfaceHighlight: new YaakColor('hsl(216,24%,87%)', 'light'),
|
||||
text: new YaakColor('hsl(219,23%,15%)', 'light'),
|
||||
textSubtle: new YaakColor('hsl(219,23%,15%)', 'light').lower(0.3),
|
||||
textSubtlest: new YaakColor('hsl(219,23%,15%)', 'light').lower(0.5),
|
||||
primary: new YaakColor('hsl(266,100%,70%)', 'light'),
|
||||
secondary: new YaakColor('hsl(220,24%,59%)', 'light'),
|
||||
info: new YaakColor('hsl(206,100%,48%)', 'light'),
|
||||
success: new YaakColor('hsl(155,95%,33%)', 'light'),
|
||||
notice: new YaakColor('hsl(45,100%,41%)', 'light'),
|
||||
warning: new YaakColor('hsl(30,100%,43%)', 'light'),
|
||||
danger: new YaakColor('hsl(335,75%,57%)', 'light'),
|
||||
components: {
|
||||
sidebar: {
|
||||
surface: new YaakColor('hsl(216,24%,97%)', 'light'),
|
||||
border: new YaakColor('hsl(216,24%,93%)', 'light'),
|
||||
surfaceHighlight: new YaakColor('hsl(216,24%,90%)', 'light'),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const yaakDark: YaakTheme = {
|
||||
id: 'yaak-dark',
|
||||
name: 'Yaak',
|
||||
surface: new YaakColor('hsl(244,23%,14%)', 'dark'),
|
||||
border: new YaakColor('hsl(244,23%,25%)', 'dark'),
|
||||
surfaceHighlight: new YaakColor('hsl(244,23%,20%)', 'dark'),
|
||||
text: new YaakColor('hsl(245,23%,84%)', 'dark'),
|
||||
textSubtle: new YaakColor('hsl(245,18%,58%)', 'dark'),
|
||||
textSubtlest: new YaakColor('hsl(245,18%,45%)', 'dark'),
|
||||
primary: new YaakColor('hsl(266,100%,79%)', 'dark'),
|
||||
secondary: new YaakColor('hsl(245,23%,60%)', 'dark'),
|
||||
info: new YaakColor('hsl(206,100%,63%)', 'dark'),
|
||||
success: new YaakColor('hsl(150,99%,44%)', 'dark'),
|
||||
notice: new YaakColor('hsl(48,80%,63%)', 'dark'),
|
||||
warning: new YaakColor('hsl(28,100%,61%)', 'dark'),
|
||||
danger: new YaakColor('hsl(342,90%,68%)', 'dark'),
|
||||
|
||||
components: {
|
||||
button: {
|
||||
primary: new YaakColor('hsl(266,100%,79%)', 'dark').lower(0.1),
|
||||
secondary: new YaakColor('hsl(245,23%,60%)', 'dark').lower(0.1),
|
||||
info: new YaakColor('hsl(206,100%,63%)', 'dark').lower(0.1),
|
||||
success: new YaakColor('hsl(150,99%,44%)', 'dark').lower(0.15),
|
||||
notice: new YaakColor('hsl(48,80%,63%)', 'dark').lower(0.2),
|
||||
warning: new YaakColor('hsl(28,100%,61%)', 'dark').lower(0.1),
|
||||
danger: new YaakColor('hsl(342,90%,68%)', 'dark').lower(0.1),
|
||||
},
|
||||
dialog: {
|
||||
border: new YaakColor('hsl(244,23%,24%)', 'dark'),
|
||||
},
|
||||
sidebar: {
|
||||
surface: new YaakColor('hsl(243,23%,16%)', 'dark'),
|
||||
border: new YaakColor('hsl(244,23%,22%)', 'dark'),
|
||||
},
|
||||
responsePane: {
|
||||
surface: new YaakColor('hsl(243,23%,16%)', 'dark'),
|
||||
border: new YaakColor('hsl(244,23%,16%)', 'dark').lift(0.08),
|
||||
},
|
||||
appHeader: {
|
||||
surface: new YaakColor('hsl(244,23%,12%)', 'dark'),
|
||||
border: new YaakColor('hsl(244,23%,12%)', 'dark').lift(0.1),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const yaak = [yaakDark, yaakLight];
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Theme, ThemeComponentColors } from '@yaakapp-internal/plugins';
|
||||
import { defaultDarkTheme, defaultLightTheme } from './themes';
|
||||
import { YaakColor } from './yaakColor';
|
||||
|
||||
@@ -27,9 +28,10 @@ export type YaakColors = {
|
||||
danger?: YaakColor;
|
||||
};
|
||||
|
||||
export type YaakTheme = YaakColors & {
|
||||
export type YaakTheme = {
|
||||
id: string;
|
||||
name: string;
|
||||
base: YaakColors;
|
||||
components?: Partial<{
|
||||
dialog: Partial<YaakColors>;
|
||||
menu: Partial<YaakColors>;
|
||||
@@ -46,35 +48,46 @@ export type YaakTheme = YaakColors & {
|
||||
}>;
|
||||
};
|
||||
|
||||
export type YaakColorKey = keyof YaakColors;
|
||||
export type YaakColorKey = keyof ThemeComponentColors;
|
||||
|
||||
type ComponentName = keyof NonNullable<YaakTheme['components']>;
|
||||
|
||||
type CSSVariables = Record<YaakColorKey, YaakColor | undefined>;
|
||||
type CSSVariables = Record<YaakColorKey, string | undefined>;
|
||||
|
||||
function themeVariables(theme?: Partial<YaakColors>, base?: CSSVariables): CSSVariables | null {
|
||||
function themeVariables(
|
||||
theme: Theme,
|
||||
component?: ComponentName,
|
||||
base?: CSSVariables,
|
||||
): CSSVariables | null {
|
||||
const cmp =
|
||||
component == null
|
||||
? theme.base
|
||||
: (theme.components?.[component] ?? ({} as ThemeComponentColors));
|
||||
const c = (s: string | undefined) => yc(theme, s);
|
||||
const vars: CSSVariables = {
|
||||
surface: theme?.surface,
|
||||
surfaceHighlight: theme?.surfaceHighlight ?? theme?.surface?.lift(0.06),
|
||||
surfaceActive: theme?.surfaceActive ?? theme?.primary?.lower(0.2).translucify(0.8),
|
||||
backdrop: theme?.surface?.lower(0.2).translucify(0.2),
|
||||
selection: theme?.primary?.lower(0.1).translucify(0.7),
|
||||
border: theme?.border ?? theme?.surface?.lift(0.11),
|
||||
borderSubtle: theme?.borderSubtle ?? theme?.border?.lower(0.06),
|
||||
borderFocus: theme?.info?.translucify(0.5),
|
||||
text: theme?.text,
|
||||
textSubtle: theme?.textSubtle ?? theme?.text?.lower(0.2),
|
||||
textSubtlest: theme?.textSubtlest ?? theme?.text?.lower(0.3),
|
||||
surface: cmp.surface,
|
||||
surfaceHighlight: cmp.surfaceHighlight ?? c(cmp.surface)?.lift(0.06).css(),
|
||||
surfaceActive: cmp.surfaceActive ?? c(cmp.primary)?.lower(0.2).translucify(0.8).css(),
|
||||
backdrop: cmp.backdrop ?? c(cmp.surface)?.lower(0.2).translucify(0.2).css(),
|
||||
selection: cmp.selection ?? c(cmp.primary)?.lower(0.1).translucify(0.7).css(),
|
||||
border: cmp.border ?? c(cmp.surface)?.lift(0.11)?.css(),
|
||||
borderSubtle: cmp.borderSubtle ?? c(cmp.border)?.lower(0.06)?.css(),
|
||||
borderFocus: c(cmp.info)?.translucify(0.5)?.css(),
|
||||
text: cmp.text,
|
||||
textSubtle: cmp.textSubtle ?? c(cmp.text)?.lower(0.2)?.css(),
|
||||
textSubtlest: cmp.textSubtlest ?? c(cmp.text)?.lower(0.3)?.css(),
|
||||
shadow:
|
||||
theme?.shadow ??
|
||||
YaakColor.black().translucify(isThemeDark(theme ?? ({} as Partial<YaakColors>)) ? 0.7 : 0.93),
|
||||
primary: theme?.primary,
|
||||
secondary: theme?.secondary,
|
||||
info: theme?.info,
|
||||
success: theme?.success,
|
||||
notice: theme?.notice,
|
||||
warning: theme?.warning,
|
||||
danger: theme?.danger,
|
||||
cmp.shadow ??
|
||||
YaakColor.black()
|
||||
.translucify(theme.dark ? 0.7 : 0.93)
|
||||
.css(),
|
||||
primary: cmp.primary,
|
||||
secondary: cmp.secondary,
|
||||
info: cmp.info,
|
||||
success: cmp.success,
|
||||
notice: cmp.notice,
|
||||
warning: cmp.warning,
|
||||
danger: cmp.danger,
|
||||
};
|
||||
|
||||
// Extend with base
|
||||
@@ -87,76 +100,86 @@ function themeVariables(theme?: Partial<YaakColors>, base?: CSSVariables): CSSVa
|
||||
return vars;
|
||||
}
|
||||
|
||||
function templateTagColorVariables(color: YaakColor): Partial<CSSVariables> {
|
||||
function templateTagColorVariables(color: YaakColor | null): Partial<CSSVariables> {
|
||||
if (color == null) return {};
|
||||
|
||||
return {
|
||||
text: color.lift(0.6),
|
||||
textSubtle: color.lift(0.4),
|
||||
textSubtlest: color,
|
||||
surface: color.lower(0.2).translucify(0.8),
|
||||
border: color.lower(0.2).translucify(0.2),
|
||||
surfaceHighlight: color.lower(0.1).translucify(0.7),
|
||||
text: color.lift(0.6).css(),
|
||||
textSubtle: color.lift(0.4).css(),
|
||||
textSubtlest: color.css(),
|
||||
surface: color.lower(0.2).translucify(0.8).css(),
|
||||
border: color.lower(0.2).translucify(0.2).css(),
|
||||
surfaceHighlight: color.lower(0.1).translucify(0.7).css(),
|
||||
};
|
||||
}
|
||||
|
||||
function toastColorVariables(color: YaakColor): Partial<CSSVariables> {
|
||||
function toastColorVariables(color: YaakColor | null): Partial<CSSVariables> {
|
||||
if (color == null) return {};
|
||||
|
||||
return {
|
||||
text: color.lift(0.8),
|
||||
textSubtle: color,
|
||||
surface: color.translucify(0.9),
|
||||
surfaceHighlight: color.translucify(0.8),
|
||||
border: color.lift(0.3).translucify(0.6),
|
||||
text: color.lift(0.8).css(),
|
||||
textSubtle: color.css(),
|
||||
surface: color.translucify(0.9).css(),
|
||||
surfaceHighlight: color.translucify(0.8).css(),
|
||||
border: color.lift(0.3).translucify(0.6).css(),
|
||||
};
|
||||
}
|
||||
|
||||
function bannerColorVariables(color: YaakColor): Partial<CSSVariables> {
|
||||
function bannerColorVariables(color: YaakColor | null): Partial<CSSVariables> {
|
||||
if (color == null) return {};
|
||||
|
||||
return {
|
||||
text: color.lift(0.8),
|
||||
textSubtle: color.translucify(0.3),
|
||||
textSubtlest: color.translucify(0.6),
|
||||
surface: color.translucify(0.95),
|
||||
border: color.lift(0.3).translucify(0.8),
|
||||
text: color.lift(0.8).css(),
|
||||
textSubtle: color.translucify(0.3).css(),
|
||||
textSubtlest: color.translucify(0.6).css(),
|
||||
surface: color.translucify(0.95).css(),
|
||||
border: color.lift(0.3).translucify(0.8).css(),
|
||||
};
|
||||
}
|
||||
|
||||
function buttonSolidColorVariables(
|
||||
color: YaakColor,
|
||||
color: YaakColor | null,
|
||||
isDefault: boolean = false,
|
||||
): Partial<CSSVariables> {
|
||||
const theme: Partial<YaakTheme> = {
|
||||
text: new YaakColor('white', 'dark'),
|
||||
surface: color.lower(0.3),
|
||||
surfaceHighlight: color.lower(0.1),
|
||||
border: color,
|
||||
if (color == null) return {};
|
||||
|
||||
const theme: Partial<ThemeComponentColors> = {
|
||||
text: 'white',
|
||||
surface: color.lower(0.3).css(),
|
||||
surfaceHighlight: color.lower(0.1).css(),
|
||||
border: color.css(),
|
||||
};
|
||||
|
||||
if (isDefault) {
|
||||
theme.text = color.lift(0.8);
|
||||
theme.surface = undefined; // Inherit from root
|
||||
theme.surfaceHighlight = color.lift(0.08);
|
||||
theme.text = undefined; // Inherit from parent
|
||||
theme.surface = undefined; // Inherit from parent
|
||||
theme.surfaceHighlight = color.lift(0.08).css();
|
||||
}
|
||||
|
||||
return theme;
|
||||
}
|
||||
|
||||
function buttonBorderColorVariables(
|
||||
color: YaakColor,
|
||||
color: YaakColor | null,
|
||||
isDefault: boolean = false,
|
||||
): Partial<CSSVariables> {
|
||||
const theme = {
|
||||
text: color.lift(0.8),
|
||||
textSubtle: color.lift(0.55),
|
||||
textSubtlest: color.lift(0.4).translucify(0.6),
|
||||
surfaceHighlight: color.translucify(0.8),
|
||||
borderSubtle: color.translucify(0.5),
|
||||
border: color.translucify(0.3),
|
||||
if (color == null) return {};
|
||||
|
||||
const vars: Partial<CSSVariables> = {
|
||||
text: color.lift(0.8).css(),
|
||||
textSubtle: color.lift(0.55).css(),
|
||||
textSubtlest: color.lift(0.4).translucify(0.6).css(),
|
||||
surfaceHighlight: color.translucify(0.8).css(),
|
||||
borderSubtle: color.translucify(0.5).css(),
|
||||
border: color.translucify(0.3).css(),
|
||||
};
|
||||
|
||||
if (isDefault) {
|
||||
theme.borderSubtle = color.lift(0.28);
|
||||
theme.border = color.lift(0.5);
|
||||
vars.borderSubtle = color.lift(0.28).css();
|
||||
vars.border = color.lift(0.5).css();
|
||||
}
|
||||
|
||||
return theme;
|
||||
return vars;
|
||||
}
|
||||
|
||||
function variablesToCSS(
|
||||
@@ -169,26 +192,27 @@ function variablesToCSS(
|
||||
|
||||
const css = Object.entries(vars ?? {})
|
||||
.filter(([, value]) => value)
|
||||
.map(([name, value]) => `--${name}: ${value?.css()};`)
|
||||
.map(([name, value]) => `--${name}: ${value};`)
|
||||
.join('\n');
|
||||
|
||||
return selector == null ? css : `${selector} {\n${indent(css)}\n}`;
|
||||
}
|
||||
|
||||
function componentCSS(
|
||||
component: ComponentName,
|
||||
components?: YaakTheme['components'],
|
||||
): string | null {
|
||||
if (components == null) {
|
||||
function componentCSS(theme: Theme, component: ComponentName): string | null {
|
||||
if (theme.components == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const themeVars = themeVariables(components[component]);
|
||||
const themeVars = themeVariables(theme, component);
|
||||
return variablesToCSS(`.x-theme-${component}`, themeVars);
|
||||
}
|
||||
|
||||
function buttonCSS(color: YaakColorKey, colors?: Partial<YaakColors>): string | null {
|
||||
const yaakColor = colors?.[color];
|
||||
function buttonCSS(
|
||||
theme: Theme,
|
||||
color: YaakColorKey,
|
||||
colors?: ThemeComponentColors,
|
||||
): string | null {
|
||||
const yaakColor = yc(theme, colors?.[color]);
|
||||
if (yaakColor == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -199,8 +223,12 @@ function buttonCSS(color: YaakColorKey, colors?: Partial<YaakColors>): string |
|
||||
].join('\n\n');
|
||||
}
|
||||
|
||||
function bannerCSS(color: YaakColorKey, colors?: Partial<YaakColors>): string | null {
|
||||
const yaakColor = colors?.[color];
|
||||
function bannerCSS(
|
||||
theme: Theme,
|
||||
color: YaakColorKey,
|
||||
colors?: ThemeComponentColors,
|
||||
): string | null {
|
||||
const yaakColor = yc(theme, colors?.[color]);
|
||||
if (yaakColor == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -210,8 +238,8 @@ function bannerCSS(color: YaakColorKey, colors?: Partial<YaakColors>): string |
|
||||
);
|
||||
}
|
||||
|
||||
function toastCSS(color: YaakColorKey, colors?: Partial<YaakColors>): string | null {
|
||||
const yaakColor = colors?.[color];
|
||||
function toastCSS(theme: Theme, color: YaakColorKey, colors?: ThemeComponentColors): string | null {
|
||||
const yaakColor = yc(theme, colors?.[color]);
|
||||
if (yaakColor == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -219,8 +247,12 @@ function toastCSS(color: YaakColorKey, colors?: Partial<YaakColors>): string | n
|
||||
return [variablesToCSS(`.x-theme-toast--${color}`, toastColorVariables(yaakColor))].join('\n\n');
|
||||
}
|
||||
|
||||
function templateTagCSS(color: YaakColorKey, colors?: Partial<YaakColors>): string | null {
|
||||
const yaakColor = colors?.[color];
|
||||
function templateTagCSS(
|
||||
theme: Theme,
|
||||
color: YaakColorKey,
|
||||
colors?: ThemeComponentColors,
|
||||
): string | null {
|
||||
const yaakColor = yc(theme, colors?.[color]);
|
||||
if (yaakColor == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -230,63 +262,56 @@ function templateTagCSS(color: YaakColorKey, colors?: Partial<YaakColors>): stri
|
||||
].join('\n\n');
|
||||
}
|
||||
|
||||
export function isThemeDark(theme: Partial<YaakColors>): boolean {
|
||||
if (theme.surface && theme.text) {
|
||||
return theme.text.lighterThan(theme.surface);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export function getThemeCSS(theme: YaakTheme): string {
|
||||
export function getThemeCSS(theme: Theme): string {
|
||||
theme.components = theme.components ?? {};
|
||||
// Toast defaults to menu styles
|
||||
theme.components.toast = theme.components.toast ?? theme.components.menu ?? {};
|
||||
const { components, id, name } = theme;
|
||||
const colors = Object.keys(theme)
|
||||
.filter((key) => theme[key as YaakColorKey] instanceof YaakColor)
|
||||
.reduce((prev, key) => {
|
||||
return { ...prev, [key]: theme[key as YaakColorKey] };
|
||||
}, {});
|
||||
const { components, id, label } = theme;
|
||||
const colors = Object.keys(theme.base).reduce((prev, key) => {
|
||||
return { ...prev, [key]: theme.base[key as YaakColorKey] };
|
||||
}, {}) as ThemeComponentColors;
|
||||
|
||||
let themeCSS = '';
|
||||
try {
|
||||
const baseCss = variablesToCSS(null, themeVariables(theme));
|
||||
themeCSS = [
|
||||
baseCss,
|
||||
...Object.keys(components ?? {}).map((key) =>
|
||||
componentCSS(key as ComponentName, theme.components),
|
||||
),
|
||||
...Object.keys(components ?? {}).map((key) => componentCSS(theme, key as ComponentName)),
|
||||
variablesToCSS(
|
||||
`.x-theme-button--solid--default`,
|
||||
buttonSolidColorVariables(theme.surface, true),
|
||||
buttonSolidColorVariables(yc(theme, theme.base.surface), true),
|
||||
),
|
||||
variablesToCSS(
|
||||
`.x-theme-button--border--default`,
|
||||
buttonBorderColorVariables(theme.surface, true),
|
||||
buttonBorderColorVariables(yc(theme, theme.base.surface), true),
|
||||
),
|
||||
...Object.keys(colors ?? {}).map((key) =>
|
||||
buttonCSS(key as YaakColorKey, theme.components?.button ?? colors),
|
||||
buttonCSS(theme, key as YaakColorKey, theme.components?.button ?? colors),
|
||||
),
|
||||
...Object.keys(colors ?? {}).map((key) =>
|
||||
bannerCSS(key as YaakColorKey, theme.components?.banner ?? colors),
|
||||
bannerCSS(theme, key as YaakColorKey, theme.components?.banner ?? colors),
|
||||
),
|
||||
...Object.keys(colors ?? {}).map((key) =>
|
||||
toastCSS(key as YaakColorKey, theme.components?.banner ?? colors),
|
||||
toastCSS(theme, key as YaakColorKey, theme.components?.banner ?? colors),
|
||||
),
|
||||
...Object.keys(colors ?? {}).map((key) =>
|
||||
templateTagCSS(key as YaakColorKey, theme.components?.templateTag ?? colors),
|
||||
templateTagCSS(theme, key as YaakColorKey, theme.components?.templateTag ?? colors),
|
||||
),
|
||||
].join('\n\n');
|
||||
} catch (err) {
|
||||
console.error('Failed to generate CSS', err);
|
||||
}
|
||||
|
||||
return [`/* ${name} */`, `[data-theme="${id}"] {`, indent(themeCSS), '}'].join('\n');
|
||||
return [`/* ${label} */`, `[data-theme="${id}"] {`, indent(themeCSS), '}'].join('\n');
|
||||
}
|
||||
|
||||
export function addThemeStylesToDocument(theme: YaakTheme) {
|
||||
theme = completeTheme(theme);
|
||||
export function addThemeStylesToDocument(rawTheme: Theme | null) {
|
||||
if (rawTheme == null) {
|
||||
console.error('Failed to add theme styles: theme is null');
|
||||
return;
|
||||
}
|
||||
|
||||
const theme = completeTheme(rawTheme);
|
||||
let styleEl = document.head.querySelector(`style[data-theme]`);
|
||||
if (!styleEl) {
|
||||
styleEl = document.createElement('style');
|
||||
@@ -298,7 +323,12 @@ export function addThemeStylesToDocument(theme: YaakTheme) {
|
||||
styleEl.textContent = getThemeCSS(theme);
|
||||
}
|
||||
|
||||
export function setThemeOnDocument(theme: YaakTheme) {
|
||||
export function setThemeOnDocument(theme: Theme | null) {
|
||||
if (theme == null) {
|
||||
console.error('Failed to set theme: theme is null');
|
||||
return;
|
||||
}
|
||||
|
||||
document.documentElement.setAttribute('data-theme', theme.id);
|
||||
}
|
||||
|
||||
@@ -309,72 +339,36 @@ export function indent(text: string, space = ' '): string {
|
||||
.join('\n');
|
||||
}
|
||||
|
||||
export function completeTheme(theme: YaakTheme): YaakTheme {
|
||||
const isDark = isThemeDark(theme);
|
||||
function yc<T extends string | null | undefined>(
|
||||
theme: Theme,
|
||||
s: T,
|
||||
): T extends string ? YaakColor : null {
|
||||
if (s == null) return null as never;
|
||||
return new YaakColor(s, theme.dark ? 'dark' : 'light') as never;
|
||||
}
|
||||
|
||||
// Clone the theme
|
||||
theme = deserializeTheme(serializeTheme(theme), isDark ? 'dark' : 'light');
|
||||
export function completeTheme(theme: Theme): Theme {
|
||||
const fallback = theme.dark ? defaultDarkTheme.base : defaultLightTheme.base;
|
||||
const c = (s: string | null | undefined) => yc(theme, s);
|
||||
|
||||
const base = isDark ? defaultDarkTheme : defaultLightTheme;
|
||||
theme.base.primary ??= fallback.primary;
|
||||
theme.base.secondary ??= fallback.secondary;
|
||||
theme.base.info ??= fallback.info;
|
||||
theme.base.success ??= fallback.success;
|
||||
theme.base.notice ??= fallback.notice;
|
||||
theme.base.warning ??= fallback.warning;
|
||||
theme.base.danger ??= fallback.danger;
|
||||
|
||||
theme.primary = theme.primary ?? base.primary;
|
||||
theme.secondary = theme.secondary ?? base.secondary;
|
||||
theme.info = theme.info ?? base.info;
|
||||
theme.success = theme.success ?? base.success;
|
||||
theme.notice = theme.notice ?? base.notice;
|
||||
theme.warning = theme.warning ?? base.warning;
|
||||
theme.danger = theme.danger ?? base.danger;
|
||||
theme.base.surface ??= fallback.surface;
|
||||
theme.base.surfaceHighlight ??= c(theme.base.surface)?.lift(0.06)?.css();
|
||||
theme.base.surfaceActive ??= c(theme.base.primary)?.lower(0.2).translucify(0.8).css();
|
||||
|
||||
theme.surface = theme.surface ?? base.surface;
|
||||
theme.surfaceHighlight = theme.surfaceHighlight ?? theme.surface?.lift(0.06);
|
||||
theme.surfaceActive = theme.surfaceActive ?? theme.primary?.lower(0.2).translucify(0.8);
|
||||
theme.base.border ??= c(theme.base.surface)?.lift(0.12)?.css();
|
||||
theme.base.borderSubtle ??= c(theme.base.border)?.lower(0.08)?.css();
|
||||
|
||||
theme.border = theme.border ?? theme.surface?.lift(0.12);
|
||||
theme.borderSubtle = theme.borderSubtle ?? theme.border?.lower(0.08);
|
||||
|
||||
theme.text = theme.text ?? theme.border?.lift(1).lower(0.2);
|
||||
theme.textSubtle = theme.textSubtle ?? theme.text?.lower(0.3);
|
||||
theme.textSubtlest = theme.textSubtlest ?? theme.text?.lower(0.5);
|
||||
theme.base.text ??= fallback.text;
|
||||
theme.base.textSubtle ??= c(theme.base.text)?.lower(0.3)?.css();
|
||||
theme.base.textSubtlest ??= c(theme.base.text)?.lower(0.5)?.css();
|
||||
|
||||
return theme;
|
||||
}
|
||||
|
||||
export function serializeTheme(theme: YaakTheme): string {
|
||||
function next(o: Record<string, unknown>) {
|
||||
o = { ...o }; // Clone first
|
||||
|
||||
for (const k of Object.keys(o)) {
|
||||
const v = o[k];
|
||||
if (v instanceof YaakColor) {
|
||||
o[k] = v.css();
|
||||
} else if (Object.prototype.toString.call(v) === '[object Object]') {
|
||||
o[k] = next(v as Record<string, unknown>);
|
||||
} else {
|
||||
o[k] = v;
|
||||
}
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
return JSON.stringify(next(theme));
|
||||
}
|
||||
|
||||
export function deserializeTheme(theme: string, appearance: 'dark' | 'light'): YaakTheme {
|
||||
function next(o: Record<string, unknown>) {
|
||||
for (const k of Object.keys(o)) {
|
||||
const v = o[k];
|
||||
if (v instanceof YaakColor) {
|
||||
o[k] = v;
|
||||
} else if (typeof v === 'string' && v.match(/^(#|hsla\()/)) {
|
||||
o[k] = new YaakColor(v, appearance);
|
||||
} else if (Object.prototype.toString.call(v) === '[object Object]') {
|
||||
o[k] = next(v as Record<string, unknown>);
|
||||
} else {
|
||||
o[k] = v;
|
||||
}
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
return next(JSON.parse(theme)) as YaakTheme;
|
||||
}
|
||||
|
||||
@@ -27,13 +27,14 @@ configureTheme().then(
|
||||
|
||||
// Listen for settings changes, the re-compute theme
|
||||
listen<ModelPayload>('upserted_model', async (event) => {
|
||||
if (event.payload.model.model !== 'settings') return;
|
||||
const model = event.payload.model.model;
|
||||
if (model !== 'settings' && model !== 'plugin') return;
|
||||
await configureTheme();
|
||||
}).catch(console.error);
|
||||
|
||||
async function configureTheme() {
|
||||
const settings = await getSettings();
|
||||
const theme = getResolvedTheme(
|
||||
const theme = await getResolvedTheme(
|
||||
preferredAppearance,
|
||||
settings.appearance,
|
||||
settings.themeLight,
|
||||
@@ -41,7 +42,7 @@ async function configureTheme() {
|
||||
);
|
||||
addThemeStylesToDocument(theme.active);
|
||||
setThemeOnDocument(theme.active);
|
||||
if (theme.active.surface != null) {
|
||||
setWindowTheme(theme.active.surface.hexNoAlpha());
|
||||
if (theme.active.base.surface != null) {
|
||||
setWindowTheme(theme.active.base.surface);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user