From 1a0f643d87afe50e0106dbbcf5d35e67d2f1fabc Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 2 Jun 2025 19:03:06 +0700 Subject: [PATCH] refactor: clean up repo (#5165) * chore: remove legacy themes * refactor: clean up dependencies * chore: remove cuda 11 dependency - fix linux LD_LIBRARY_PATH * fix: load models issue on Linux # Conflicts: # src-tauri/src/core/setup.rs * chore: do not download cuda 11 by default * chore: remove cuda 11 from installer * fix: cuda lookup on Linux --- .../template-tauri-build-linux-x64.yml | 2 +- core/src/node/api/processors/app.ts | 19 --- core/src/types/api/index.ts | 9 +- .../inference-cortex-extension/src/index.ts | 5 +- package.json | 4 +- src-tauri/binaries/download.bat | 5 +- src-tauri/binaries/download.sh | 4 +- src-tauri/src/core/cmd.rs | 31 ---- src-tauri/src/core/setup.rs | 11 +- src-tauri/src/lib.rs | 2 - src-tauri/tauri.bundle.windows.nsis.template | 15 -- src-tauri/tauri.conf.json | 1 - themes/dark-dimmed/theme.json | 143 ------------------ themes/joi-dark/theme.json | 143 ------------------ themes/joi-light/theme.json | 143 ------------------ themes/night-blue/theme.json | 143 ------------------ 16 files changed, 21 insertions(+), 659 deletions(-) delete mode 100644 themes/dark-dimmed/theme.json delete mode 100644 themes/joi-dark/theme.json delete mode 100644 themes/joi-light/theme.json delete mode 100644 themes/night-blue/theme.json diff --git a/.github/workflows/template-tauri-build-linux-x64.yml b/.github/workflows/template-tauri-build-linux-x64.yml index 6a15a2ee0..a5a676afa 100644 --- a/.github/workflows/template-tauri-build-linux-x64.yml +++ b/.github/workflows/template-tauri-build-linux-x64.yml @@ -105,7 +105,7 @@ jobs: run: | echo "Version: ${{ inputs.new_version }}" # Update tauri.conf.json - jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true | .bundle.resources = ["resources/themes/**/*", "resources/pre-install/**/*"] | .bundle.externalBin = ["binaries/cortex-server", "resources/bin/uv"]' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json + jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true | .bundle.resources = ["resources/pre-install/**/*"] | .bundle.externalBin = ["binaries/cortex-server", "resources/bin/uv"]' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json if [ "${{ inputs.channel }}" != "stable" ]; then jq '.bundle.linux.deb.files = {"usr/bin/bun": "resources/bin/bun", diff --git a/core/src/node/api/processors/app.ts b/core/src/node/api/processors/app.ts index 4fbd8648f..d35fd1fd6 100644 --- a/core/src/node/api/processors/app.ts +++ b/core/src/node/api/processors/app.ts @@ -77,25 +77,6 @@ export class App implements Processor { return appConfiguration() } - /** - * Get themes from the app data folder. - * @returns - */ - getThemes() { - const themesPath = join(getJanDataFolderPath(), 'themes') - return readdirSync(themesPath) - } - - /** - * Read theme.json - * @param theme - * @returns - */ - readTheme({ theme }: { theme: string }) { - const themePath = join(getJanDataFolderPath(), 'themes', theme, 'theme.json') - return readFileSync(themePath, { encoding: 'utf-8' }) - } - async updateAppConfiguration(args: any) { await updateAppConfiguration(args) } diff --git a/core/src/types/api/index.ts b/core/src/types/api/index.ts index d96ba6d06..b9584725d 100644 --- a/core/src/types/api/index.ts +++ b/core/src/types/api/index.ts @@ -40,7 +40,7 @@ export enum NativeRoute { /** * App Route APIs * @description Enum of all the routes exposed by the app -*/ + */ export enum AppRoute { getAppConfigurations = 'getAppConfigurations', updateAppConfiguration = 'updateAppConfiguration', @@ -51,8 +51,6 @@ export enum AppRoute { log = 'log', systemInformation = 'systemInformation', showToast = 'showToast', - getThemes = 'getThemes', - readTheme = 'readTheme' } export enum AppEvent { @@ -150,10 +148,7 @@ export const CoreRoutes = [ ] export const APIRoutes = [...CoreRoutes, ...Object.values(NativeRoute)] -export const APIEvents = [ - ...Object.values(AppEvent), - ...Object.values(DownloadEvent), -] +export const APIEvents = [...Object.values(AppEvent), ...Object.values(DownloadEvent)] export type PayloadType = { messages: ChatCompletionMessage[] model: string diff --git a/extensions/inference-cortex-extension/src/index.ts b/extensions/inference-cortex-extension/src/index.ts index befec36b0..c453281c5 100644 --- a/extensions/inference-cortex-extension/src/index.ts +++ b/extensions/inference-cortex-extension/src/index.ts @@ -90,7 +90,7 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine { Authorization: `Bearer ${apiKey}`, } : {}, - retry: 10, + retry: 4, }) return this.api } @@ -256,6 +256,9 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine { api .post('v1/models/stop', { json: { model: model.id }, + retry: { + limit: 0, + }, }) .json() .finally(() => { diff --git a/package.json b/package.json index 373205e01..4d9f8382e 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "install:cortex:linux:darwin": "cd src-tauri/binaries && ./download.sh", "install:cortex:win32": "cd src-tauri/binaries && download.bat", "install:cortex": "run-script-os", - "copy:assets:tauri": "cpx \"pre-install/*.tgz\" \"src-tauri/resources/pre-install/\" && cpx \"themes/**\" \"src-tauri/resources/themes\"", + "copy:assets:tauri": "cpx \"pre-install/*.tgz\" \"src-tauri/resources/pre-install/\"", "copy:lib": "run-script-os", "copy:lib:linux": "cpx \"./lib/linux/*.so\" \"./src-tauri/resources/lib/\"", "copy:lib:win32": "cpx \"./lib/windows/*.dll\" \"./src-tauri/resources/lib/\"", @@ -56,6 +56,6 @@ }, "packageManager": "yarn@4.5.3", "dependencies": { - "@tanstack/router": "0.0.1-beta.53" + "download-cli": "^1.1.1" } } diff --git a/src-tauri/binaries/download.bat b/src-tauri/binaries/download.bat index e9323fd95..a70366440 100644 --- a/src-tauri/binaries/download.bat +++ b/src-tauri/binaries/download.bat @@ -7,7 +7,7 @@ set ENGINE_DOWNLOAD_GGML_URL=https://github.com/ggml-org/llama.cpp/releases/down set CUDA_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/%ENGINE_VERSION% @REM set SUBFOLDERS=windows-amd64-noavx-cuda-12-0 windows-amd64-noavx-cuda-11-7 windows-amd64-avx2-cuda-12-0 windows-amd64-avx2-cuda-11-7 windows-amd64-noavx windows-amd64-avx windows-amd64-avx2 windows-amd64-avx512 windows-amd64-vulkan set BIN_PATH="./" -set DOWNLOAD_TOOL=..\..\extensions\inference-cortex-extension\node_modules\.bin\download +set DOWNLOAD_TOOL=..\..\node_modules\.bin\download @REM Download llama.cpp binaries call %DOWNLOAD_TOOL% -e --strip 1 -o %BIN_PATH% https://github.com/menloresearch/cortex.cpp/releases/download/v%CORTEX_VERSION%/cortex-%CORTEX_VERSION%-windows-amd64.tar.gz @@ -21,7 +21,8 @@ call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_URL%-avx2-x64.tar.gz -e --strip 2 -o./engi call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_URL%-avx512-x64.tar.gz -e --strip 2 -o./engines/llama.cpp/win-avx512-x64/%ENGINE_VERSION% call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_GGML_URL%-vulkan-x64.zip -e --strip 1 -o./engines/llama.cpp/win-vulkan-x64/%ENGINE_VERSION% call %DOWNLOAD_TOOL% %CUDA_DOWNLOAD_URL%/cudart-llama-bin-win-cu12.0-x64.tar.gz -e --strip 1 -o %BIN_PATH% -call %DOWNLOAD_TOOL% %CUDA_DOWNLOAD_URL%/cudart-llama-bin-win-cu11.7-x64.tar.gz -e --strip 1 -o %BIN_PATH% +@REM Should not bundle cuda11, users should install it themselves, it bloats the app size a lot +@REM call %DOWNLOAD_TOOL% %CUDA_DOWNLOAD_URL%/cudart-llama-bin-win-cu11.7-x64.tar.gz -e --strip 1 -o %BIN_PATH% move %BIN_PATH%cortex-server-beta.exe %BIN_PATH%cortex-server.exe copy %BIN_PATH%cortex-server.exe %BIN_PATH%cortex-server-x86_64-pc-windows-msvc.exe diff --git a/src-tauri/binaries/download.sh b/src-tauri/binaries/download.sh index 8a86b85c4..0e7723026 100755 --- a/src-tauri/binaries/download.sh +++ b/src-tauri/binaries/download.sh @@ -49,7 +49,9 @@ if [ "$OS_TYPE" == "Linux" ]; then download "${ENGINE_DOWNLOAD_URL}-linux-noavx-cuda-cu11.7-x64.tar.gz" 2 "${SHARED_PATH}/engines/llama.cpp/linux-noavx-cuda-cu11.7-x64/${ENGINE_VERSION}" download "${ENGINE_DOWNLOAD_URL}-linux-vulkan-x64.tar.gz" 2 "${SHARED_PATH}/engines/llama.cpp/linux-vulkan-x64/${ENGINE_VERSION}" download "${CUDA_DOWNLOAD_URL}/cudart-llama-bin-linux-cu12.0-x64.tar.gz" 0 "${BIN_PATH}/deps" - download "${CUDA_DOWNLOAD_URL}/cudart-llama-bin-linux-cu11.7-x64.tar.gz" 0 "${BIN_PATH}/deps" + # Should not bundle this by default, users can install cuda runtime separately + # Ship cuda 12.0 by default only for now + # download "${CUDA_DOWNLOAD_URL}/cudart-llama-bin-linux-cu11.7-x64.tar.gz" 0 "${BIN_PATH}/deps" elif [ "$OS_TYPE" == "Darwin" ]; then # macOS downloads diff --git a/src-tauri/src/core/cmd.rs b/src-tauri/src/core/cmd.rs index 3af5deb62..a84d59135 100644 --- a/src-tauri/src/core/cmd.rs +++ b/src-tauri/src/core/cmd.rs @@ -106,37 +106,6 @@ pub fn get_jan_extensions_path(app_handle: tauri::AppHandle) -> PathBuf { get_jan_data_folder_path(app_handle).join("extensions") } -#[tauri::command] -pub fn get_themes(app_handle: tauri::AppHandle) -> Vec { - let mut themes = vec![]; - let themes_path = get_jan_data_folder_path(app_handle).join("themes"); - if themes_path.exists() { - for entry in fs::read_dir(themes_path).unwrap() { - let entry = entry.unwrap(); - if entry.path().is_dir() { - if let Some(name) = entry.file_name().to_str() { - themes.push(name.to_string()); - } - } - } - } - themes -} - -#[tauri::command] -pub fn read_theme(app_handle: tauri::AppHandle, theme_name: String) -> Result { - let themes_path = get_jan_data_folder_path(app_handle) - .join("themes") - .join(theme_name.clone()) - .join("theme.json"); - if themes_path.exists() { - let content = fs::read_to_string(themes_path).map_err(|e| e.to_string())?; - Ok(content) - } else { - Err(format!("Theme {} not found", theme_name.clone())) - } -} - #[tauri::command] pub fn get_configuration_file_path(app_handle: tauri::AppHandle) -> PathBuf { let app_path = app_handle.path().app_data_dir().unwrap_or_else(|err| { diff --git a/src-tauri/src/core/setup.rs b/src-tauri/src/core/setup.rs index e007fb87e..21863a199 100644 --- a/src-tauri/src/core/setup.rs +++ b/src-tauri/src/core/setup.rs @@ -259,10 +259,11 @@ pub fn setup_sidecar(app: &App) -> Result<(), String> { #[cfg(not(target_os = "windows"))] { cmd = cmd.env("LD_LIBRARY_PATH", { - let current_app_data_dir = app_handle.path().app_data_dir().unwrap(); + let current_app_data_dir = + app_handle.path().resource_dir().unwrap().join("binaries"); let dest = current_app_data_dir.to_str().unwrap(); let ld_path_env = std::env::var("LD_LIBRARY_PATH").unwrap_or_default(); - format!("{}{}{}", ld_path_env, std::path::MAIN_SEPARATOR, dest) + format!("{}{}{}", ld_path_env, ":", dest) }); } cmd @@ -428,7 +429,7 @@ pub fn setup_engine_binaries(app: &App) -> Result<(), String> { // Copy engine binaries to app_data let app_data_dir = get_jan_data_folder_path(app.handle().clone()); let binaries_dir = app.handle().path().resource_dir().unwrap().join("binaries"); - let themes_dir = app + let resources_dir = app .handle() .path() .resource_dir() @@ -438,8 +439,8 @@ pub fn setup_engine_binaries(app: &App) -> Result<(), String> { if let Err(e) = copy_dir_all(binaries_dir, app_data_dir.clone()) { log::error!("Failed to copy binaries: {}", e); } - if let Err(e) = copy_dir_all(themes_dir, app_data_dir.clone()) { - log::error!("Failed to copy themes: {}", e); + if let Err(e) = copy_dir_all(resources_dir, app_data_dir.clone()) { + log::error!("Failed to copy resources: {}", e); } Ok(()) } diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 6e5b9e1c5..23343bc43 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -33,7 +33,6 @@ pub fn run() { core::fs::file_stat, core::fs::write_file_sync, // App commands - core::cmd::get_themes, core::cmd::get_app_configurations, core::cmd::get_active_extensions, core::cmd::get_user_home_path, @@ -44,7 +43,6 @@ pub fn run() { core::cmd::open_app_directory, core::cmd::open_file_explorer, core::cmd::install_extensions, - core::cmd::read_theme, core::cmd::app_token, core::cmd::start_server, core::cmd::stop_server, diff --git a/src-tauri/tauri.bundle.windows.nsis.template b/src-tauri/tauri.bundle.windows.nsis.template index 70e009c35..ad037ebf8 100644 --- a/src-tauri/tauri.bundle.windows.nsis.template +++ b/src-tauri/tauri.bundle.windows.nsis.template @@ -633,16 +633,12 @@ Section Install CreateDirectory "$INSTDIR\binaries\engines" CreateDirectory "$INSTDIR\resources" CreateDirectory "$INSTDIR\resources\pre-install" - CreateDirectory "$INSTDIR\resources\themes" SetOutPath "$INSTDIR\binaries\engines" File /nonfatal /a /r "D:\a\jan\jan\src-tauri\binaries\engines\" SetOutPath $INSTDIR - File /a "/oname=cublas64_11.dll" "D:\a\jan\jan\src-tauri\binaries\cublas64_11.dll" File /a "/oname=cublas64_12.dll" "D:\a\jan\jan\src-tauri\binaries\cublas64_12.dll" - File /a "/oname=cublasLt64_11.dll" "D:\a\jan\jan\src-tauri\binaries\cublasLt64_11.dll" File /a "/oname=cublasLt64_12.dll" "D:\a\jan\jan\src-tauri\binaries\cublasLt64_12.dll" File /a "/oname=cudart64_12.dll" "D:\a\jan\jan\src-tauri\binaries\cudart64_12.dll" - File /a "/oname=cudart64_110.dll" "D:\a\jan\jan\src-tauri\binaries\cudart64_110.dll" File /a "/oname=msvcp140.dll" "D:\a\jan\jan\src-tauri\binaries\msvcp140.dll" ; File /a "/oname=vcomp140.dll" "D:\a\jan\jan\src-tauri\binaries\vcomp140.dll" File /a "/oname=vcruntime140_1.dll" "D:\a\jan\jan\src-tauri\binaries\vcruntime140_1.dll" @@ -650,8 +646,6 @@ Section Install File /a "/oname=vulkan-1.dll" "D:\a\jan\jan\src-tauri\binaries\vulkan-1.dll" SetOutPath "$INSTDIR\resources\pre-install" File /nonfatal /a /r "D:\a\jan\jan\src-tauri\resources\pre-install\" - SetOutPath "$INSTDIR\resources\themes" - File /nonfatal /a /r "D:\a\jan\jan\src-tauri\resources\themes\" SetOutPath $INSTDIR ; Copy external binaries @@ -781,10 +775,6 @@ Section Uninstall Delete "$INSTDIR\resources\pre-install\janhq-hardware-management-extension-1.0.0.tgz" Delete "$INSTDIR\resources\pre-install\janhq-inference-cortex-extension-1.0.25.tgz" Delete "$INSTDIR\resources\pre-install\janhq-model-extension-1.0.36.tgz" - Delete "$INSTDIR\resources\themes\dark-dimmed\theme.json" - Delete "$INSTDIR\resources\themes\joi-dark\theme.json" - Delete "$INSTDIR\resources\themes\joi-light\theme.json" - Delete "$INSTDIR\resources\themes\night-blue\theme.json" ; Delete external binaries Delete "$INSTDIR\cortex-server.exe" @@ -799,13 +789,8 @@ Section Uninstall ; Delete uninstaller Delete "$INSTDIR\uninstall.exe" - RMDir /REBOOTOK "$INSTDIR\resources\themes\dark-dimmed" - RMDir /REBOOTOK "$INSTDIR\resources\themes\joi-dark" - RMDir /REBOOTOK "$INSTDIR\resources\themes\joi-light" - RMDir /REBOOTOK "$INSTDIR\resources\themes\night-blue" RMDir /r /REBOOTOK "$INSTDIR\binaries\engines" RMDir /REBOOTOK "$INSTDIR\resources\pre-install" - RMDir /REBOOTOK "$INSTDIR\resources\themes" RMDir /r /REBOOTOK "$INSTDIR\binaries" RMDir /r /REBOOTOK "$INSTDIR\resources" RMDir /r "$INSTDIR" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 67ec24876..4219d61c8 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -83,7 +83,6 @@ ], "resources": [ "binaries/engines/**/*", - "resources/themes/**/*", "resources/pre-install/**/*", "resources/lib/" ], diff --git a/themes/dark-dimmed/theme.json b/themes/dark-dimmed/theme.json deleted file mode 100644 index 2ca59f226..000000000 --- a/themes/dark-dimmed/theme.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "id": "dark-dimmed", - "displayName": "Dark Dimmed", - "reduceTransparent": false, - "nativeTheme": "dark", - "variables": { - "app": { - "bg": "215, 25%, 9%, 1", - "transparent": "0, 0%, 13%, 0.3", - "border": "0, 0%, 100%, 0.1", - "link": "221, 79%, 59%, 1" - }, - - "primary": { - "bg": { - "__default": "175, 84%, 32%, 1", - "soft": "175, 84%, 10%, 1" - }, - "fg": "0, 0%, 100%, 1" - }, - - "secondary": { - "bg": "0, 0%, 100%, 0.2", - "fg": "0, 0%, 80%, 1" - }, - - "tertiary": { - "bg": "0, 0%, 0%, 0.02" - }, - - "disabled": { - "bg": "0, 0%, 0%, 0.2", - "fg": "0, 0%, 100%, 0.2" - }, - - "top-panel": { - "bg": "0, 0%, 13%, 0.3" - }, - - "bottom-panel": { - "bg": "0, 0%, 13%, 0.3" - }, - - "ribbon-panel": { - "bg": "0, 0%, 13%, 0.3", - "border": "0, 0%, 100%, 0.1", - "icon": "0, 0%, 68%, 1", - "icon-hover": "0, 0%, 28%, 0.2", - "icon-active": "0, 0%, 100%, 1", - "icon-active-bg": "175, 84%, 32%, 1" - }, - - "left-panel": { - "bg": "215, 25%, 9%, 1", - "menu": "0, 0%, 95%, 1", - "menu-hover": "0, 0%, 28%, 0.2", - "menu-active": "0, 0%, 100%, 1", - "icon-active-bg": "175, 84%, 20%, 0.2" - }, - - "center-panel": { - "bg": "215, 25%, 9%, 1" - }, - - "right-panel": { - "bg": "215, 25%, 9%, 1" - }, - - "tooltip": { - "bg": "0, 0%, 100%, 1", - "fg": "0, 0%, 0%, 1" - }, - - "switch": { - "bg": "0, 0%, 80%, 0.1", - "fg": "0, 0%, 100%, 1" - }, - - "dropdown-menu": { - "hover-bg": "0, 0%, 28%, 0.2" - }, - - "scrollbar": { - "tracker": "0, 0%, 28%, 0.2", - "thumb": "0, 0%, 20%, 1" - }, - - "input": { - "bg": "0, 0%, 13%, 0", - "placeholder": "0, 0%, 70%, 0.5", - "icon": "0, 0%, 68%, 1", - "border": "0, 0%, 100%, 0.1" - }, - - "textarea": { - "bg": "0, 0%, 13%, 0", - "placeholder": "0, 0%, 70%, 0.5", - "icon": "0, 0%, 68%, 1", - "border": "0, 0%, 100%, 0.1" - }, - - "select": { - "input-bg": "0, 0%, 13%, 0", - "bg": "215, 25%, 9%, 1", - "placeholder": "0, 0%, 70%, 0.5", - "icon": "0, 0%, 68%, 1", - "options-active-bg": "0, 0%, 28%, 0.2", - "border": "0, 0%, 100%, 0.1" - }, - - "progress-track": { - "bg": "0, 0%, 100%, 0.1" - }, - - "modal": { - "overlay": "0, 0%, 0%, 0.7", - "bg": "215, 25%, 9%, 1", - "fg": "0, 0%, 100%, 11" - }, - - "loader": { - "bg": "221, 83%, 53%, 0.1", - "fg": "0, 0%, 80%, 1", - "active-bg": "221, 83%, 53%, 0.2" - }, - - "toaster": { - "bg": "240, 6%, 10%, 1", - "text-title": "0, 0%, 100%, 1", - "close-icon": "0, 0%, 100%, 0.8", - "text-desc": "0, 0%, 100%, 0.88" - }, - - "slider": { - "track-bg": "0, 0%, 100%, 0.1", - "thumb-bg": "0, 0%, 100%, 1" - }, - - "resize": { - "bg": "0, 0%, 0%, 0.1" - } - } -} diff --git a/themes/joi-dark/theme.json b/themes/joi-dark/theme.json deleted file mode 100644 index 30e01af79..000000000 --- a/themes/joi-dark/theme.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "id": "joi-dark", - "displayName": "Joi Dark", - "reduceTransparent": true, - "nativeTheme": "dark", - "variables": { - "app": { - "bg": "0, 0%, 13%, 1", - "transparent": "0, 0%, 13%, 0.3", - "border": "0, 0%, 100%, 0.1", - "link": "221, 83%, 53%, 1" - }, - - "primary": { - "bg": { - "__default": "221, 79%, 59%, 1", - "soft": "221, 79%, 59%, 0.2" - }, - "fg": "0, 0%, 100%, 1" - }, - - "secondary": { - "bg": "0, 0%, 100%, 0.2", - "fg": "0, 0%, 80%, 1" - }, - - "tertiary": { - "bg": "0, 0%, 0%, 0.02" - }, - - "disabled": { - "bg": "0, 0%, 0%, 0.2", - "fg": "0, 0%, 100%, 0.2" - }, - - "top-panel": { - "bg": "0, 0%, 13%, 0.3" - }, - - "bottom-panel": { - "bg": "0, 0%, 13%, 0.3" - }, - - "ribbon-panel": { - "bg": "0, 0%, 13%, 0.3", - "border": "0, 0%, 100%, 0.1", - "icon": "0, 0%, 68%, 1", - "icon-hover": "0, 0%, 28%, 0.2", - "icon-active": "0, 0%, 100%, 1", - "icon-active-bg": "0, 0%, 100%, 0.1" - }, - - "left-panel": { - "bg": "0, 0%, 13%, 1", - "menu": "0, 0%, 95%, 1", - "menu-hover": "0, 0%, 28%, 0.2", - "menu-active": "0, 0%, 100%, 1", - "icon-active-bg": "0, 0%, 100%, 0.1" - }, - - "center-panel": { - "bg": "0, 0%, 13%, 1" - }, - - "right-panel": { - "bg": "0, 0%, 13%, 1" - }, - - "tooltip": { - "bg": "0, 0%, 100%, 1", - "fg": "0, 0%, 0%, 1" - }, - - "switch": { - "bg": "0, 0%, 80%, 0.1", - "fg": "0, 0%, 100%, 1" - }, - - "dropdown-menu": { - "hover-bg": "0, 0%, 28%, 0.2" - }, - - "scrollbar": { - "tracker": "0, 0%, 28%, 0.2", - "thumb": "0, 0%, 50%, 1" - }, - - "input": { - "bg": "0, 0%, 13%, 0", - "placeholder": "0, 0%, 70%, 0.5", - "icon": "0, 0%, 68%, 1", - "border": "0, 0%, 100%, 0.1" - }, - - "textarea": { - "bg": "0, 0%, 13%, 0", - "placeholder": "0, 0%, 70%, 0.5", - "icon": "0, 0%, 68%, 1", - "border": "0, 0%, 100%, 0.1" - }, - - "select": { - "input-bg": "0, 0%, 13%, 0", - "bg": "0, 0%, 13%, 1", - "placeholder": "0, 0%, 70%, 0.5", - "icon": "0, 0%, 68%, 1", - "options-active-bg": "0, 0%, 28%, 0.2", - "border": "0, 0%, 100%, 0.1" - }, - - "progress-track": { - "bg": "0, 0%, 100%, 0.1" - }, - - "modal": { - "overlay": "0, 0%, 0%, 0.7", - "bg": "0, 0%, 13%, 1", - "fg": "0, 0%, 100%, 11" - }, - - "loader": { - "bg": "221, 83%, 53%, 0.1", - "fg": "0, 0%, 80%, 1", - "active-bg": "221, 83%, 53%, 0.2" - }, - - "toaster": { - "bg": "240, 6%, 10%, 1", - "text-title": "0, 0%, 100%, 1", - "close-icon": "0, 0%, 100%, 0.8", - "text-desc": "0, 0%, 100%, 0.88" - }, - - "slider": { - "track-bg": "0, 0%, 100%, 0.1", - "thumb-bg": "0, 0%, 100%, 1" - }, - - "resize": { - "bg": "0, 0%, 0%, 0.1" - } - } -} diff --git a/themes/joi-light/theme.json b/themes/joi-light/theme.json deleted file mode 100644 index 77654d1fd..000000000 --- a/themes/joi-light/theme.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "id": "joi-light", - "displayName": "Joi Light", - "reduceTransparent": true, - "nativeTheme": "light", - "variables": { - "app": { - "bg": "0, 0%, 100%, 1", - "transparent": "0, 0%, 100%, 0.8", - "border": "0, 0%, 0%, 0.1", - "link": "221, 83%, 53%, 1" - }, - - "primary": { - "bg": { - "__default": "221, 83%, 53%, 1", - "soft": "221, 83%, 53%, 0.1" - }, - "fg": "0, 0%, 100%, 1" - }, - - "secondary": { - "bg": " 0, 0%, 0%, 0.1", - "fg": " 0, 0%, 0%, 1" - }, - - "tertiary": { - "bg": "0, 0%, 0%, 0.02" - }, - - "disabled": { - "bg": " 0, 0%, 0%, 0.05", - "fg": " 0, 0%, 0%, 0.2" - }, - - "top-panel": { - "bg": "0, 0%, 100%, 0.8" - }, - - "bottom-panel": { - "bg": "0, 0%, 100%, 0.8" - }, - - "ribbon-panel": { - "bg": "0, 0%, 100%, 0.8", - "border": "0, 0%, 0%, 0.1", - "icon": "0, 0%, 0%, 0.5", - "icon-hover": "0, 0%, 0%, 0.03", - "icon-active": "0, 0%, 0%, 1", - "icon-active-bg": "0, 0%, 0%, 0.05" - }, - - "left-panel": { - "bg": "0, 0%, 100%, 1", - "menu": "0, 0%, 0%, 0.8", - "menu-hover": "0, 0%, 0%, 0.03", - "menu-active": "0, 0%, 0%, 1", - "icon-active-bg": "0, 0%, 0%, 0.05" - }, - - "center-panel": { - "bg": "0, 0%, 100%, 1" - }, - - "right-panel": { - "bg": "0, 0%, 100%, 1" - }, - - "tooltip": { - "bg": "0, 0%, 0%, 1", - "fg": "0, 0%, 100%, 1" - }, - - "switch": { - "bg": "0, 0%, 0%, 0.1", - "fg": "0, 0%, 100%, 1" - }, - - "dropdown-menu": { - "hover-bg": "0, 0%, 0%, 0.03" - }, - - "scrollbar": { - "tracker": "0, 0%, 95%, 0.1", - "thumb": "0, 0%, 0%, 0.1" - }, - - "input": { - "bg": "0, 0%, 100%, 0", - "placeholder": "0, 0%, 0%, 0.5", - "icon": "0, 0%, 0%, 0.5", - "border": "0, 0%, 0%, 0.1" - }, - - "textarea": { - "bg": "0, 0%, 100%, 0", - "placeholder": "0, 0%, 0%, 0.5", - "icon": "0, 0%, 0%, 0.5", - "border": "0, 0%, 0%, 0.1" - }, - - "select": { - "input-bg": "0, 0%, 100%, 0", - "bg": "0, 0%, 100%, 1", - "placeholder": "0, 0%, 0%, 0.5", - "icon": "0, 0%, 0%, 0.5", - "options-active-bg": "0, 0%, 0%, 0.03", - "border": "0, 0%, 0%, 0.1" - }, - - "progress-track": { - "bg": "0, 0%, 0%, 0.1" - }, - - "modal": { - "overlay": "0, 0%, 0%, 0.7", - "bg": "0, 0%, 100%, 1", - "fg": "0, 0%, 0%, 1" - }, - - "loader": { - "bg": "221, 83%, 53%, 0.1", - "fg": "221, 83%, 53%, 1", - "active-bg": "221, 83%, 53%, 0.2" - }, - - "toaster": { - "bg": "240, 6%, 10%, 1", - "text-title": "0, 0%, 100%, 1", - "close-icon": "0, 0%, 100%, 0.8", - "text-desc": "0, 0%, 100%, 0.8" - }, - - "slider": { - "track-bg": "0, 0%, 0%, 0.1", - "thumb-bg": "0, 0%, 100%, 1" - }, - - "resize": { - "bg": "0, 0%, 0%, 0.1" - } - } -} diff --git a/themes/night-blue/theme.json b/themes/night-blue/theme.json deleted file mode 100644 index 65c907728..000000000 --- a/themes/night-blue/theme.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "id": "night-blue", - "displayName": "Night Blue", - "reduceTransparent": false, - "nativeTheme": "dark", - "variables": { - "app": { - "bg": "211, 100%, 15%, 1", - "transparent": "221, 79%, 59%, 0.08", - "border": "0, 0%, 100%, 0.1", - "link": "142, 76%, 36%, 1" - }, - - "primary": { - "bg": { - "__default": "221, 79%, 59%, 1", - "soft": "221, 79%, 59%, 0.2" - }, - "fg": "0, 0%, 100%, 1" - }, - - "secondary": { - "bg": "0, 0%, 100%, 0.2", - "fg": "0, 0%, 80%, 1" - }, - - "tertiary": { - "bg": "0, 0%, 0%, 0.02" - }, - - "disabled": { - "bg": "0, 0%, 0%, 0.2", - "fg": "0, 0%, 100%, 0.2" - }, - - "top-panel": { - "bg": "211, 100%, 9%, 1" - }, - - "bottom-panel": { - "bg": "211, 100%, 9%, 1" - }, - - "ribbon-panel": { - "bg": "211, 100%, 10%, 1", - "border": "0, 0%, 100%, 0.1", - "icon": "0, 0%, 68%, 1", - "icon-hover": "0, 0%, 28%, 0.2", - "icon-active": "0, 0%, 100%, 1", - "icon-active-bg": "0, 0%, 100%, 0.1" - }, - - "left-panel": { - "bg": "211, 100%, 12%, 1", - "menu": "0, 0%, 95%, 1", - "menu-hover": "0, 0%, 28%, 0.2", - "menu-active": "0, 0%, 100%, 1", - "icon-active-bg": "0, 0%, 100%, 0.1" - }, - - "center-panel": { - "bg": "211, 100%, 15%, 1" - }, - - "right-panel": { - "bg": "211, 100%, 12%, 1" - }, - - "tooltip": { - "bg": "0, 0%, 100%, 1", - "fg": "0, 0%, 0%, 1" - }, - - "switch": { - "bg": "0, 0%, 80%, 0.1", - "fg": "0, 0%, 100%, 1" - }, - - "dropdown-menu": { - "hover-bg": "0, 0%, 28%, 0.2" - }, - - "scrollbar": { - "tracker": "0, 0%, 28%, 0.2", - "thumb": "0, 0%, 50%, 1" - }, - - "input": { - "bg": "0, 0%, 13%, 0", - "placeholder": "0, 0%, 70%, 0.5", - "icon": "0, 0%, 68%, 1", - "border": "0, 0%, 100%, 0.1" - }, - - "textarea": { - "bg": "0, 0%, 13%, 0", - "placeholder": "0, 0%, 70%, 0.5", - "icon": "0, 0%, 68%, 1", - "border": "0, 0%, 100%, 0.1" - }, - - "select": { - "input-bg": "0, 0%, 13%, 0", - "bg": "211, 100%, 15%, 1", - "placeholder": "0, 0%, 70%, 0.5", - "icon": "0, 0%, 68%, 1", - "options-active-bg": "0, 0%, 28%, 0.2", - "border": "0, 0%, 100%, 0.1" - }, - - "progress-track": { - "bg": "0, 0%, 100%, 0.1" - }, - - "modal": { - "overlay": "0, 0%, 0%, 0.7", - "bg": "222, 96%, 16%, 1", - "fg": "0, 0%, 100%, 11" - }, - - "loader": { - "bg": "221, 83%, 53%, 0.1", - "fg": "0, 0%, 80%, 1", - "active-bg": "221, 83%, 53%, 0.2" - }, - - "toaster": { - "bg": "222, 100%, 15%, 1", - "text-title": "0, 0%, 100%, 1", - "close-icon": "0, 0%, 100%, 0.8", - "text-desc": "0, 0%, 100%, 0.88" - }, - - "slider": { - "track-bg": "0, 0%, 100%, 0.1", - "thumb-bg": "0, 0%, 100%, 1" - }, - - "resize": { - "bg": "0, 0%, 0%, 0.1" - } - } -}