diff --git a/packages/hoppscotch-common/package.json b/packages/hoppscotch-common/package.json index 66bea4446..a60dc0e7c 100644 --- a/packages/hoppscotch-common/package.json +++ b/packages/hoppscotch-common/package.json @@ -40,7 +40,7 @@ "@hoppscotch/httpsnippet": "3.0.9", "@hoppscotch/js-sandbox": "workspace:^", "@hoppscotch/kernel": "workspace:^", - "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf", + "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6", "@hoppscotch/ui": "0.2.5", "@hoppscotch/vue-toasted": "0.1.0", "@lezer/highlight": "1.2.1", diff --git a/packages/hoppscotch-common/src/components.d.ts b/packages/hoppscotch-common/src/components.d.ts index 8ab704d4f..46b4f3976 100644 --- a/packages/hoppscotch-common/src/components.d.ts +++ b/packages/hoppscotch-common/src/components.d.ts @@ -242,9 +242,12 @@ declare module 'vue' { IconLucideAlertTriangle: typeof import('~icons/lucide/alert-triangle')['default'] IconLucideArrowLeft: typeof import('~icons/lucide/arrow-left')['default'] IconLucideArrowUpRight: typeof import('~icons/lucide/arrow-up-right')['default'] + IconLucideBrush: typeof import('~icons/lucide/brush')['default'] IconLucideCheck: typeof import('~icons/lucide/check')['default'] IconLucideCheckCircle: typeof import('~icons/lucide/check-circle')['default'] + IconLucideChevronDown: typeof import('~icons/lucide/chevron-down')['default'] IconLucideChevronRight: typeof import('~icons/lucide/chevron-right')['default'] + IconLucideCircleCheck: typeof import('~icons/lucide/circle-check')['default'] IconLucideFileQuestion: typeof import('~icons/lucide/file-question')['default'] IconLucideFileText: typeof import('~icons/lucide/file-text')['default'] IconLucideFileX: typeof import('~icons/lucide/file-x')['default'] @@ -258,10 +261,14 @@ declare module 'vue' { IconLucideListEnd: typeof import('~icons/lucide/list-end')['default'] IconLucideLoader2: typeof import('~icons/lucide/loader2')['default'] IconLucideMinus: typeof import('~icons/lucide/minus')['default'] + IconLucidePlusCircle: typeof import('~icons/lucide/plus-circle')['default'] IconLucideRefreshCw: typeof import('~icons/lucide/refresh-cw')['default'] + IconLucideRss: typeof import('~icons/lucide/rss')['default'] IconLucideSearch: typeof import('~icons/lucide/search')['default'] IconLucideTerminal: typeof import('~icons/lucide/terminal')['default'] + IconLucideTriangleAlert: typeof import('~icons/lucide/triangle-alert')['default'] IconLucideUsers: typeof import('~icons/lucide/users')['default'] + IconLucideVerified: typeof import('~icons/lucide/verified')['default'] IconLucideX: typeof import('~icons/lucide/x')['default'] ImportExportBase: typeof import('./components/importExport/Base.vue')['default'] ImportExportImportExportList: typeof import('./components/importExport/ImportExportList.vue')['default'] diff --git a/packages/hoppscotch-common/src/composables/desktop-settings.ts b/packages/hoppscotch-common/src/composables/desktop-settings.ts index c5080a3bc..e48152e8b 100644 --- a/packages/hoppscotch-common/src/composables/desktop-settings.ts +++ b/packages/hoppscotch-common/src/composables/desktop-settings.ts @@ -10,11 +10,11 @@ import { invoke } from "@tauri-apps/api/core" // writes to a different file and the shell would never see them. // // Relative imports rather than the `~/` alias because this module is -// consumed by both the selfhost-web entry (where `~` resolves to -// common's src) and the desktop shell entry (where `~` resolves to the -// shell's own src). The package-name alias `@hoppscotch/common/...` -// would work under Vite dev but fails under Rollup build, which treats -// the rewritten `@hoppscotch/common/src/...` as an unresolved package +// consumed by both the web entry (where `~` resolves to common's src) +// and the desktop shell entry (where `~` resolves to the shell's own +// src). The package-name alias `@hoppscotch/common/...` would work +// under Vite dev but fails under Rollup build, which treats the +// rewritten `@hoppscotch/common/src/...` as an unresolved package // specifier. Relative paths resolve identically under TS, both Vite // configs, and the production build. import { UnifiedStore as Store } from "../kernel/store" diff --git a/packages/hoppscotch-common/src/composables/desktop-zoom.ts b/packages/hoppscotch-common/src/composables/desktop-zoom.ts index 9d26b0e28..4709ed53d 100644 --- a/packages/hoppscotch-common/src/composables/desktop-zoom.ts +++ b/packages/hoppscotch-common/src/composables/desktop-zoom.ts @@ -1,9 +1,9 @@ import { watch, type WatchStopHandle } from "vue" import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow" // Relative imports rather than the `~/` alias because this module is -// consumed by both the selfhost-web entry (where `~` resolves to -// common's src) and the desktop shell entry (where `~` resolves to the -// shell's own src). The package-name alias `@hoppscotch/common/...` +// consumed by both the web entry (where `~` resolves to common's src) +// and the desktop shell entry (where `~` resolves to the shell's own +// src). The package-name alias `@hoppscotch/common/...` // would work under Vite dev (which honors pnpm symlinks via esbuild) // but fails under Rollup build, which treats the rewritten // `@hoppscotch/common/src/...` as an unresolved package specifier. @@ -19,9 +19,8 @@ const LOG_TAG = "useDesktopZoomEffect" * and keeps it in sync with the setting. * * Each desktop entry point calls this once during startup. The launcher - * window (`hoppscotch-desktop/src/main.ts`) and the bundled selfhost-web - * window (`hoppscotch-selfhost-web/src/main.ts`) each get their own - * invocation, and each watcher addresses its own window through + * window and the bundled web window each get their own invocation, and + * each watcher addresses its own window through * `getCurrentWebviewWindow()`, which is the only window the webview can * see. The settings store is the shared source of truth between the two * windows, so a write in one reaches the other through the unified store diff --git a/packages/hoppscotch-common/src/helpers/keyboard-strategy.ts b/packages/hoppscotch-common/src/helpers/keyboard-strategy.ts index 44d5d1045..c58f222d5 100644 --- a/packages/hoppscotch-common/src/helpers/keyboard-strategy.ts +++ b/packages/hoppscotch-common/src/helpers/keyboard-strategy.ts @@ -1,4 +1,9 @@ -import type { DesktopSettings } from "~/platform/desktop-settings" +// Relative import rather than the `~/` alias because this module is +// consumed transitively by both the web entry (where `~` resolves to +// common's src) and the desktop shell entry (where `~` resolves to the +// shell's own src). See `composables/desktop-settings.ts` for the full +// rationale. +import type { DesktopSettings } from "../platform/desktop-settings" /** * Web-safe holder for the keyboard layout strategy. diff --git a/packages/hoppscotch-desktop/package.json b/packages/hoppscotch-desktop/package.json index 37c9d03bf..928fb22b1 100644 --- a/packages/hoppscotch-desktop/package.json +++ b/packages/hoppscotch-desktop/package.json @@ -27,7 +27,7 @@ "@fontsource-variable/roboto-mono": "5.2.8", "@hoppscotch/common": "workspace:^", "@hoppscotch/kernel": "workspace:^", - "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf", + "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6", "@hoppscotch/ui": "0.2.5", "@tauri-apps/api": "2.1.1", "@tauri-apps/plugin-fs": "2.0.2", diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts index 1d2f6c2b9..34a23edd5 100644 --- a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts +++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts @@ -12,6 +12,13 @@ export interface WindowOptions { width?: number; height?: number; resizable?: boolean; + /** + * Initial WebView zoom factor applied between window creation and first + * paint. When omitted, the WebView opens at its native default of 1.0. + * Pass a persisted user preference here to avoid the 100% flash that a + * post-mount setZoom from the bundle would produce. + */ + zoomLevel?: number; } export interface LoadOptions { bundleName: string; diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts.map b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts.map index 3c7dafd96..5862ab3b6 100644 --- a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts.map +++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../guest-js/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,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,OAAO,CAAC,IAAI,CAAC,CAE3C"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../guest-js/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAElF;AAED,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAEtE;AAED,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAEzE;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAE5E;AAED,wBAAsB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3C"} \ No newline at end of file diff --git a/packages/hoppscotch-desktop/src-tauri/Cargo.lock b/packages/hoppscotch-desktop/src-tauri/Cargo.lock index 5f0fd21fa..4367ca117 100644 --- a/packages/hoppscotch-desktop/src-tauri/Cargo.lock +++ b/packages/hoppscotch-desktop/src-tauri/Cargo.lock @@ -5566,7 +5566,7 @@ dependencies = [ [[package]] name = "tauri-plugin-appload" version = "0.1.0" -source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload?rev=1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf" +source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload?rev=9d4528be4f385bccbe46859631d31aa2ee1ec0b6#9d4528be4f385bccbe46859631d31aa2ee1ec0b6" dependencies = [ "base64 0.22.1", "blake3", diff --git a/packages/hoppscotch-desktop/src-tauri/Cargo.toml b/packages/hoppscotch-desktop/src-tauri/Cargo.toml index 178f3a4a1..916fea534 100644 --- a/packages/hoppscotch-desktop/src-tauri/Cargo.toml +++ b/packages/hoppscotch-desktop/src-tauri/Cargo.toml @@ -29,7 +29,7 @@ tauri-plugin-store = "2.2.0" tauri-plugin-dialog = "2.2.0" tauri-plugin-fs = "2.2.0" tauri-plugin-deep-link = "2.2.0" -tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload", rev = "1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf" } +tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload", rev = "9d4528be4f385bccbe46859631d31aa2ee1ec0b6" } tauri-plugin-relay = { git = "https://github.com/CuriousCorrelation/tauri-plugin-relay", rev = "42f449e1c5657679fecf0374b0ce5047ad03c069" } axum = "0.8.1" tower-http = { version = "0.6.2", features = ["cors"] } diff --git a/packages/hoppscotch-selfhost-web/package.json b/packages/hoppscotch-selfhost-web/package.json index 3635ece35..a426a894f 100644 --- a/packages/hoppscotch-selfhost-web/package.json +++ b/packages/hoppscotch-selfhost-web/package.json @@ -29,7 +29,7 @@ "@hoppscotch/common": "workspace:^", "@hoppscotch/data": "workspace:^", "@hoppscotch/kernel": "workspace:^", - "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf", + "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6", "@hoppscotch/ui": "0.2.5", "@import-meta-env/unplugin": "0.6.3", "@tauri-apps/api": "2.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3e6b0f987..df1e7dfa6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -557,8 +557,8 @@ importers: specifier: workspace:^ version: link:../hoppscotch-kernel '@hoppscotch/plugin-appload': - specifier: github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf - version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf' + specifier: github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6 + version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6' '@hoppscotch/ui': specifier: 0.2.5 version: 0.2.5(eslint@9.39.2(jiti@2.6.1))(terser@5.46.1)(typescript@5.9.3)(vite@7.3.2(@types/node@24.10.1)(jiti@2.6.1)(sass@1.99.0)(terser@5.46.1)(yaml@2.8.3))(vue@3.5.34(typescript@5.9.3)) @@ -1054,8 +1054,8 @@ importers: specifier: workspace:^ version: link:../hoppscotch-kernel '@hoppscotch/plugin-appload': - specifier: github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf - version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf' + specifier: github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6 + version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6' '@hoppscotch/ui': specifier: 0.2.5 version: 0.2.5(eslint@9.39.2(jiti@2.6.1))(terser@5.46.1)(typescript@5.9.3)(vite@7.3.2(@types/node@25.9.0)(jiti@2.6.1)(sass@1.99.0)(terser@5.46.1)(yaml@2.8.3))(vue@3.5.34(typescript@5.9.3)) @@ -1396,8 +1396,8 @@ importers: specifier: workspace:^ version: link:../hoppscotch-kernel '@hoppscotch/plugin-appload': - specifier: github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf - version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf' + specifier: github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6 + version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6' '@hoppscotch/ui': specifier: 0.2.5 version: 0.2.5(eslint@9.39.2(jiti@2.6.1))(terser@5.46.1)(typescript@5.9.3)(vite@7.3.2(@types/node@25.9.0)(jiti@2.6.1)(sass@1.99.0)(terser@5.46.1)(yaml@2.8.3))(vue@3.5.34(typescript@5.9.3)) @@ -1771,8 +1771,8 @@ packages: graphql: optional: true - '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf': - resolution: {gitHosted: true, tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf} + '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6': + resolution: {gitHosted: true, tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6} version: 0.1.0 '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/42f449e1c5657679fecf0374b0ce5047ad03c069': @@ -13428,7 +13428,7 @@ snapshots: optionalDependencies: graphql: 16.14.0 - '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf': + '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6': dependencies: '@tauri-apps/api': 2.9.1