From 203acc8f29ae5d9a41b224e905c485507735c3d7 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Sun, 17 Mar 2024 02:29:08 +0100 Subject: [PATCH 01/29] introduce settings component in sherlock --- inlang/source-code/ide-extension/package.json | 13 +- inlang/source-code/ide-extension/src/main.ts | 8 ++ .../src/utilities/settings/settingsView.ts | 56 ++++++++ pnpm-lock.yaml | 136 ++++-------------- 4 files changed, 105 insertions(+), 108 deletions(-) create mode 100644 inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts diff --git a/inlang/source-code/ide-extension/package.json b/inlang/source-code/ide-extension/package.json index efe96861a6..e18761fec0 100644 --- a/inlang/source-code/ide-extension/package.json +++ b/inlang/source-code/ide-extension/package.json @@ -60,19 +60,26 @@ "type": "tree", "group": "sherlock@3" }, + { + "when": "sherlock:hasProjectInWorkspace", + "id": "settingsView", + "name": "Settings", + "type": "webview", + "group": "sherlock@4" + }, { "when": "sherlock:hasProjectInWorkspace", "id": "messageView", "name": "Messages", "type": "webview", - "group": "sherlock@4" + "group": "sherlock@5" }, { "when": "sherlock:hasProjectInWorkspace", "id": "errorView", "name": "Errors", "type": "tree", - "group": "sherlock@5" + "group": "sherlock@6" } ] }, @@ -156,11 +163,13 @@ "dependencies": { "@inlang/result": "workspace:*", "@inlang/sdk": "workspace:*", + "@inlang/settings-component": "workspace:*", "@inlang/telemetry": "workspace:*", "@lix-js/client": "workspace:*", "@lix-js/fs": "workspace:*", "@vitest/coverage-v8": "0.34.6", "https-proxy-agent": "7.0.2", + "lit-html": "^3.1.2", "require-from-string": "^2.0.2", "throttle-debounce": "^5.0.0", "vitest": "0.34.6" diff --git a/inlang/source-code/ide-extension/src/main.ts b/inlang/source-code/ide-extension/src/main.ts index 7f935cd109..92b73dec1c 100644 --- a/inlang/source-code/ide-extension/src/main.ts +++ b/inlang/source-code/ide-extension/src/main.ts @@ -19,6 +19,7 @@ import { recommendationBannerView } from "./utilities/recommendation/recommendat import { telemetry } from "./services/telemetry/implementation.js" import { version } from "../package.json" import { statusBar } from "./utilities/settings/statusBar.js" +import { settingsView } from "./utilities/settings/settingsView.js" //import { initErrorMonitoring } from "./services/error-monitoring/implementation.js" // Entry Point @@ -83,10 +84,17 @@ async function main(args: { vscode.commands.executeCommand("setContext", "sherlock:hasProjectInWorkspace", true) + // Recommendation Banner await recommendationBannerView(args) + // Project Listings await projectView(args) + // Settings + await settingsView(args) + // Messages await messageView(args) + // Errors await errorView(args) + // Status Bar await statusBar(args) registerExtensionComponents(args) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts new file mode 100644 index 0000000000..4b1b3577d6 --- /dev/null +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -0,0 +1,56 @@ +import * as vscode from "vscode" +import { state } from "../state.js" + +export function createSettingsWebviewProvider(args: { context: vscode.ExtensionContext }) { + return { + resolveWebviewView(webviewView: vscode.WebviewView) { + webviewView.webview.options = { + enableScripts: true, + localResourceRoots: [vscode.Uri.file(args.context.extensionPath)], + } + + // Set the HTML content for the webview + webviewView.webview.html = getWebviewContent({ + context: args.context, + webview: webviewView.webview, + }) + }, + } +} + +function getWebviewContent(args: { + context: vscode.ExtensionContext + webview: vscode.Webview +}): string { + const scriptUri = args.webview.asWebviewUri( + vscode.Uri.joinPath( + args.context.extensionUri, + "node_modules", + "@inlang", + "settings-component", + "dist", + "index.mjs" + ) + ) + + return ` + + + + + Settings + + + + + + ` +} + +export async function settingsView(args: { context: vscode.ExtensionContext }) { + const provider = createSettingsWebviewProvider({ ...args }) + + args.context.subscriptions.push( + vscode.window.registerWebviewViewProvider("settingsView", provider) + ) +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2ee7431317..93dd02a648 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -613,6 +613,9 @@ importers: '@inlang/sdk': specifier: workspace:* version: link:../sdk + '@inlang/settings-component': + specifier: workspace:* + version: link:../settings-component '@inlang/telemetry': specifier: workspace:* version: link:../telemetry @@ -628,6 +631,9 @@ importers: https-proxy-agent: specifier: 7.0.2 version: 7.0.2 + lit-html: + specifier: ^3.1.2 + version: 3.1.2 require-from-string: specifier: ^2.0.2 version: 2.0.2 @@ -1219,7 +1225,7 @@ importers: version: 3.0.4 '@astrojs/svelte': specifier: ^5.0.3 - version: 5.2.0(astro@4.0.8)(svelte@4.2.12)(typescript@5.3.3)(vite@5.1.6) + version: 5.2.0(astro@4.0.8)(svelte@4.2.12)(typescript@5.3.3)(vite@4.5.2) astro: specifier: 4.0.8 version: 4.0.8(typescript@5.3.3) @@ -3065,7 +3071,7 @@ packages: zod: 3.22.4 dev: false - /@astrojs/svelte@5.2.0(astro@4.0.8)(svelte@4.2.12)(typescript@5.3.3)(vite@5.1.6): + /@astrojs/svelte@5.2.0(astro@4.0.8)(svelte@4.2.12)(typescript@5.3.3)(vite@4.5.2): resolution: {integrity: sha512-GmwbXks2WMkmAfl0rlPM/2gA1RtmZzjGV2mOceV3g7QNyjIsSYBPKrlEnSFnuR+YMvlAtWdbMFBsb3gtGxnTTg==} engines: {node: '>=18.14.1'} peerDependencies: @@ -3073,7 +3079,7 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.56 typescript: ^5.3.3 dependencies: - '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.1.6) + '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@4.5.2) astro: 4.0.8(typescript@5.3.3) svelte: 4.2.12 svelte2tsx: 0.6.27(svelte@4.2.12)(typescript@5.3.3) @@ -7314,7 +7320,7 @@ packages: resolution: {integrity: sha512-a9KV4opdj17X2gOFuGup0aE+sXYABX/tJi/QDptOrleX4FlnoZgDWvz45tHOdVfrZX+3uvVsIYPHxRsTerkDNA==} peerDependencies: '@babel/core': 7.x - vite: 2.x || 3.x || 4.x || 5.x + vite: 4.5.2 dependencies: '@babel/core': 7.24.0 '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.24.0) @@ -7353,7 +7359,7 @@ packages: resolution: {integrity: sha512-iForDVJ2M8gQYnm5pHumvTEJjGGc7YNYC0GVKnHFL+GvFfKHfH9Rpq67nUAzNbjuLEpqEOUuQVQajMazWu2ZNQ==} peerDependencies: preact: ^10.4.0 - vite: '>=2.0.0' + vite: 4.5.2 dependencies: '@babel/core': 7.24.0 '@prefresh/babel-plugin': 0.5.1 @@ -8958,7 +8964,7 @@ packages: peerDependencies: '@preact/preset-vite': '*' typescript: '>= 4.3.x' - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: 4.5.2 vite-plugin-glimmerx: '*' peerDependenciesMeta: '@preact/preset-vite': @@ -9438,7 +9444,7 @@ packages: peerDependencies: '@sveltejs/vite-plugin-svelte': ^3.0.0 svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.3 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@4.5.2) '@types/cookie': 0.6.0 @@ -9479,7 +9485,7 @@ packages: peerDependencies: '@sveltejs/vite-plugin-svelte': ^2.2.0 svelte: ^3.54.0 || ^4.0.0 - vite: ^4.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte': 2.4.2(svelte@4.0.5)(vite@4.5.2) debug: 4.3.4(supports-color@8.1.1) @@ -9495,7 +9501,7 @@ packages: peerDependencies: '@sveltejs/vite-plugin-svelte': ^3.0.0 svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@4.5.2) debug: 4.3.4(supports-color@8.1.1) @@ -9504,28 +9510,12 @@ packages: transitivePeerDependencies: - supports-color - /@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6): - resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==} - engines: {node: ^18.0.0 || >=20} - peerDependencies: - '@sveltejs/vite-plugin-svelte': ^3.0.0 - svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.0 - dependencies: - '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.1.6) - debug: 4.3.4(supports-color@8.1.1) - svelte: 4.2.12 - vite: 5.1.6 - transitivePeerDependencies: - - supports-color - dev: false - /@sveltejs/vite-plugin-svelte@2.4.2(svelte@4.0.5)(vite@4.5.2): resolution: {integrity: sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==} engines: {node: ^14.18.0 || >= 16} peerDependencies: svelte: ^3.54.0 || ^4.0.0 - vite: ^4.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.0.5)(vite@4.5.2) debug: 4.3.4(supports-color@8.1.1) @@ -9545,7 +9535,7 @@ packages: engines: {node: ^18.0.0 || >=20} peerDependencies: svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@4.5.2) debug: 4.3.4(supports-color@8.1.1) @@ -9559,26 +9549,6 @@ packages: transitivePeerDependencies: - supports-color - /@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.6): - resolution: {integrity: sha512-MpmF/cju2HqUls50WyTHQBZUV3ovV/Uk8k66AN2gwHogNAG8wnW8xtZDhzNBsFJJuvmq1qnzA5kE7YfMJNFv2Q==} - engines: {node: ^18.0.0 || >=20} - peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.0 - dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6) - debug: 4.3.4(supports-color@8.1.1) - deepmerge: 4.3.1 - kleur: 4.1.5 - magic-string: 0.30.8 - svelte: 4.2.12 - svelte-hmr: 0.15.3(svelte@4.2.12) - vite: 5.1.6 - vitefu: 0.2.5(vite@5.1.6) - transitivePeerDependencies: - - supports-color - dev: false - /@swc/helpers@0.5.2: resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} dependencies: @@ -11014,7 +10984,7 @@ packages: resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - vite: ^4.2.0 || ^5.0.0 + vite: 4.5.2 dependencies: '@babel/core': 7.24.0 '@babel/plugin-transform-react-jsx-self': 7.23.3(@babel/core@7.24.0) @@ -11029,7 +10999,7 @@ packages: /@vitest/coverage-v8@0.34.6(vitest@0.34.6): resolution: {integrity: sha512-fivy/OK2d/EsJFoEoxHFEnNGTg+MmdZBAVK9Ka4qhXR2K3J0DS08vcGVwzDtXSuUMabLv4KtPcpSKkcMXFDViw==} peerDependencies: - vitest: '>=0.32.0 <1' + vitest: 0.34.6 dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -26027,7 +25997,7 @@ packages: peerDependencies: solid-js: ^1.8.7 vike: ^0.4.163 - vite: ^4.4 || ^5.0.2 + vite: 4.5.2 dependencies: solid-js: 1.7.11 vike: 0.4.156(vite@4.5.2) @@ -26044,7 +26014,7 @@ packages: hasBin: true peerDependencies: react-streaming: '>=0.3.5' - vite: '>=3.1.0' + vite: 4.5.2 peerDependenciesMeta: react-streaming: optional: true @@ -26070,7 +26040,7 @@ packages: hasBin: true peerDependencies: react-streaming: '>=0.3.5' - vite: '>=3.1.0' + vite: 4.5.2 peerDependenciesMeta: react-streaming: optional: true @@ -26196,7 +26166,7 @@ packages: engines: {node: '>=14'} peerDependencies: '@nuxt/kit': '*' - vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 + vite: 4.5.2 peerDependenciesMeta: '@nuxt/kit': optional: true @@ -26218,7 +26188,7 @@ packages: /vite-plugin-node-polyfills@0.16.0(vite@4.5.2): resolution: {integrity: sha512-uj1ymOmk7TliMxiivmXokpMY5gVMBpFPSZPLQSCv/LjkJGGKwyLjpbFL64dbYZEdFSUQ3tM7pbrxNh25yvhqOA==} peerDependencies: - vite: ^2.0.0 || ^3.0.0 || ^4.0.0 + vite: 4.5.2 dependencies: '@rollup/plugin-inject': 5.0.5(rollup@4.13.0) buffer-polyfill: /buffer@6.0.3 @@ -26232,7 +26202,7 @@ packages: /vite-plugin-node-polyfills@0.17.0(vite@4.5.2): resolution: {integrity: sha512-iPmPn7376e5u6QvoTSJa16hf5Q0DFwHFXJk2uYpsNlmI3JdPms7hWyh55o+OysJ5jo9J5XPhLC9sMOYifwFd1w==} peerDependencies: - vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: 4.5.2 dependencies: '@rollup/plugin-inject': 5.0.5(rollup@4.13.0) buffer-polyfill: /buffer@6.0.3 @@ -26248,7 +26218,7 @@ packages: peerDependencies: '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* solid-js: ^1.7.2 - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: 4.5.2 peerDependenciesMeta: '@testing-library/jest-dom': optional: true @@ -26270,7 +26240,7 @@ packages: peerDependencies: '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* solid-js: ^1.7.2 - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: 4.5.2 peerDependenciesMeta: '@testing-library/jest-dom': optional: true @@ -26291,7 +26261,7 @@ packages: resolution: {integrity: sha512-avp/Jl5zOp/Itfo67xtDB2O61U7idviaIp4mLsjhCa13PjKNasz+IID0jYTyqUp9SFx6/PmBr6v4KgDppqompg==} peerDependencies: solid-js: ^1.7.2 - vite: ^3.0.0 || ^4.0.0 + vite: 4.5.2 dependencies: '@babel/core': 7.24.0 '@babel/preset-typescript': 7.23.3(@babel/core@7.24.0) @@ -26310,7 +26280,7 @@ packages: resolution: {integrity: sha512-avp/Jl5zOp/Itfo67xtDB2O61U7idviaIp4mLsjhCa13PjKNasz+IID0jYTyqUp9SFx6/PmBr6v4KgDppqompg==} peerDependencies: solid-js: ^1.7.2 - vite: ^3.0.0 || ^4.0.0 + vite: 4.5.2 dependencies: '@babel/core': 7.24.0 '@babel/preset-typescript': 7.23.3(@babel/core@7.24.0) @@ -26437,62 +26407,16 @@ packages: optionalDependencies: fsevents: 2.3.3 - /vite@5.1.6: - resolution: {integrity: sha512-yYIAZs9nVfRJ/AiOLCA91zzhjsHUgMjB+EigzFb6W2XTLO8JixBCKCjvhKZaye+NKYHCrkv3Oh50dH9EdLU2RA==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - esbuild: 0.19.12 - postcss: 8.4.35 - rollup: 4.13.0 - optionalDependencies: - fsevents: 2.3.3 - dev: false - /vitefu@0.2.5(vite@4.5.2): resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: 4.5.2 peerDependenciesMeta: vite: optional: true dependencies: vite: 4.5.2(@types/node@20.5.9) - /vitefu@0.2.5(vite@5.1.6): - resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} - peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - peerDependenciesMeta: - vite: - optional: true - dependencies: - vite: 5.1.6 - dev: false - /vitest@0.34.6(jsdom@22.1.0): resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} engines: {node: '>=v14.18.0'} From 84268d500a8432d24859a56bbf9b216c8dfb4b2a Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Sun, 17 Mar 2024 02:37:06 +0100 Subject: [PATCH 02/29] add changeset --- .changeset/flat-parents-hang.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/flat-parents-hang.md diff --git a/.changeset/flat-parents-hang.md b/.changeset/flat-parents-hang.md new file mode 100644 index 0000000000..a656036a41 --- /dev/null +++ b/.changeset/flat-parents-hang.md @@ -0,0 +1,5 @@ +--- +"vs-code-extension": minor +--- + +introduce inlang settings component From abe70bce8e465690d1a7e6343347a5ba6765176e Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Sun, 17 Mar 2024 03:19:27 +0100 Subject: [PATCH 03/29] test json stringify --- .../ide-extension/src/utilities/settings/settingsView.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index 4b1b3577d6..fae1125940 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -41,7 +41,9 @@ function getWebviewContent(args: { Settings - + ` From fd45e79f1137fc5588e93dbbc45f5b6019dbabd5 Mon Sep 17 00:00:00 2001 From: Nils Jacobsen Date: Tue, 19 Mar 2024 11:30:35 +0100 Subject: [PATCH 04/29] add eventlistener --- .../ide-extension/src/utilities/settings/settingsView.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index fae1125940..59a84d0cb7 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -41,10 +41,15 @@ function getWebviewContent(args: { Settings - + ` } From 25e45912efa3c3a97d6d607a2648d10e3c0760cf Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Wed, 20 Mar 2024 02:36:36 +0100 Subject: [PATCH 05/29] add `lit-html` and render component with new API --- .../src/utilities/settings/settingsView.ts | 68 +++++++++++-------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index 59a84d0cb7..d8b0c94d71 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -22,36 +22,48 @@ function getWebviewContent(args: { context: vscode.ExtensionContext webview: vscode.Webview }): string { - const scriptUri = args.webview.asWebviewUri( - vscode.Uri.joinPath( - args.context.extensionUri, - "node_modules", - "@inlang", - "settings-component", - "dist", - "index.mjs" + const scriptUri = args.webview.asWebviewUri( + vscode.Uri.joinPath( + args.context.extensionUri, + "node_modules", + "@inlang", + "settings-component", + "dist", + "index.mjs" + ) ) - ) - return ` - - - - - Settings - - - - - - - ` + const litHtmlUri = args.webview.asWebviewUri( + vscode.Uri.joinPath(args.context.extensionUri, "node_modules", "lit-html", "lit-html.js") + ) + + const project = state().project + + return ` + + + + + Settings + + + + +
+ + + ` } export async function settingsView(args: { context: vscode.ExtensionContext }) { From 37355a2ea699863848ebd7f71304ead70acc46de Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Fri, 22 Mar 2024 11:42:40 +0100 Subject: [PATCH 06/29] add logging help to debug cc @NilsJacobsen please check your console in the extension host to see the error of the settings component. option + cmd + i --- .../ide-extension/src/utilities/settings/settingsView.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index d8b0c94d71..70a7e8d004 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -39,6 +39,8 @@ function getWebviewContent(args: { const project = state().project + console.log(project.settings()) + return ` @@ -50,6 +52,7 @@ function getWebviewContent(args: {
+

Current Date:

+ + + + + +
+

+ + - - - -
-

Current Date:

- - - ` + updateSettings(project); + } catch (error) { + console.error('Failed to load project:', error); + // Optionally, handle error by displaying a message in the webview + } + } + + function updateSettings(project) { + const inlangSettingsElement = document.createElement('inlang-settings'); + inlangSettingsElement.project = project; // Dynamically set the project data + settingsContainer.innerHTML = ''; + settingsContainer.appendChild(inlangSettingsElement); + } + + + + ` } export async function settingsView(args: { context: vscode.ExtensionContext }) { From b70f67de1a31bd95a5d4d8918d5e773db8ebcdb9 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Tue, 26 Mar 2024 16:11:26 +0100 Subject: [PATCH 08/29] update web component rendering --- .../src/utilities/settings/settingsView.ts | 149 +++++------------- 1 file changed, 41 insertions(+), 108 deletions(-) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index b83ff74676..4aa8517596 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -1,6 +1,5 @@ import * as vscode from "vscode" import { state } from "../state.js" -import { CONFIGURATION } from "../../configuration.js" export function createSettingsWebviewProvider(args: { context: vscode.ExtensionContext }) { return { @@ -16,10 +15,13 @@ export function createSettingsWebviewProvider(args: { context: vscode.ExtensionC webview: webviewView.webview, }) - // Immediately send the project data to the webview - webviewView.webview.postMessage({ command: "setAppId", appId: CONFIGURATION.STRINGS.APP_ID }) - const projectPath = state().selectedProjectPath - webviewView.webview.postMessage({ command: "setProjectPath", projectPath }) + webviewView.webview.onDidReceiveMessage(async (message) => { + switch (message.command) { + case "setSettings": + state().project.setSettings(message.settings) + break + } + }) }, } } @@ -28,7 +30,7 @@ function getWebviewContent(args: { context: vscode.ExtensionContext webview: vscode.Webview }): string { - const settingsComponentUri = args.webview.asWebviewUri( + const scriptUri = args.webview.asWebviewUri( vscode.Uri.joinPath( args.context.extensionUri, "node_modules", @@ -39,114 +41,45 @@ function getWebviewContent(args: { ) ) - const inlangSdkUri = args.webview.asWebviewUri( - vscode.Uri.joinPath( - args.context.extensionUri, - "node_modules", - "@inlang", - "sdk", - "dist", - "index.js" - ) - ) - - const lixFsUri = args.webview.asWebviewUri( - vscode.Uri.joinPath( - args.context.extensionUri, - "node_modules", - "@lix-js", - "fs", - "dist", - "index.js" - ) + const litHtmlUri = args.webview.asWebviewUri( + vscode.Uri.joinPath(args.context.extensionUri, "node_modules", "lit-html", "lit-html.js") ) - const lixClientUri = args.webview.asWebviewUri( - vscode.Uri.joinPath( - args.context.extensionUri, - "node_modules", - "@lix-js", - "client", - "dist", - "index.js" - ) - ) + const settings = state().project.settings() return ` - - - - - Settings - - - - - - -
-

- - + + + +
+ - - - ` + + + ` } export async function settingsView(args: { context: vscode.ExtensionContext }) { From c01898618f6c9827e418186bf3fef3124dd7a0e7 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Tue, 26 Mar 2024 17:38:46 +0100 Subject: [PATCH 09/29] add tests for `settingsView` --- .../utilities/settings/settingsView.test.ts | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts new file mode 100644 index 0000000000..61a1c58911 --- /dev/null +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts @@ -0,0 +1,110 @@ +import * as vscode from "vscode" +import { beforeEach, describe, expect, it, vi } from "vitest" +import { settingsView, createSettingsWebviewProvider } from "./settingsView.js" +import { state } from "../state.js" + +vi.mock("vscode", () => ({ + Uri: { + file: vi.fn().mockImplementation((path) => ({ + // Mock `toString` to return the expected string path directly + toString: () => path, + })), + // @ts-expect-error + joinPath: vi.fn().mockImplementation((...args) => ({ + // Ensure the mock URI object's `toString` returns a concatenated path + toString: () => args.join("/"), + })), + }, + window: { + createWebviewView: () => ({ + webview: { + options: {}, + html: "", + onDidReceiveMessage: vi.fn(), + asWebviewUri: vi.fn().mockImplementation((uri) => `mockedUriFor(${uri})`), + }, + }), + registerWebviewViewProvider: vi.fn(), + }, + WebviewView: vi.fn(), +})) + +vi.mock("../state", () => ({ + state: vi.fn().mockImplementation(() => ({ + project: { + settings: vi.fn().mockReturnValue({ + /* Mock settings here */ + }), + setSettings: vi.fn(), + }, + })), +})) + +describe("settingsView", () => { + beforeEach(() => { + vi.clearAllMocks() + }) + + it("registers the webview view provider correctly", async () => { + const context = { subscriptions: { push: vi.fn() } } as unknown as vscode.ExtensionContext + await settingsView({ context }) + + expect(context.subscriptions.push).toHaveBeenCalled() + expect(vscode.window.registerWebviewViewProvider).toHaveBeenCalledWith( + "settingsView", + expect.anything() + ) + }) +}) + +describe("createSettingsWebviewProvider", () => { + beforeEach(() => { + vi.clearAllMocks() + }) + + it("sets up webview options and HTML content correctly", () => { + const mockExtensionPath = "path/to/extension" + const context = { extensionPath: mockExtensionPath } as unknown as vscode.ExtensionContext + const webviewView = { + webview: { + options: {}, + html: "", + onDidReceiveMessage: vi.fn(), + asWebviewUri: vi.fn((uri) => `mockedUriFor(${uri.toString()})`), + }, + } as unknown as vscode.WebviewView + + const provider = createSettingsWebviewProvider({ context }) + provider.resolveWebviewView(webviewView) + + // Extract the string values from the mock Uri objects' toString method + const localResourceRootsStrings = webviewView.webview.options.localResourceRoots?.map((uri) => + uri.toString() + ) + + // Assert the localResourceRoots contains the expected path strings + expect(localResourceRootsStrings).toEqual([mockExtensionPath]) + + // Assert the expected structure of the HTML content and other tests as before + expect(webviewView.webview.html).toContain('') + + // Simulate a message and test handling. + const mockSetSettings = vi.fn() + vi.mocked(state).mockImplementation(() => ({ + // @ts-expect-error + project: { + setSettings: mockSetSettings, + }, + })) + + // @ts-expect-error + webviewView.webview.onDidReceiveMessage.mock.calls[0][0]({ + command: "setSettings", + settings: { + /* Mock settings here */ + }, + }) + + expect(mockSetSettings).toHaveBeenCalled() + }) +}) From dcc224e1ab86d256629c5e404c7af6fdbc3368eb Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Tue, 26 Mar 2024 17:41:30 +0100 Subject: [PATCH 10/29] update test --- .../src/utilities/settings/settingsView.test.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts index 61a1c58911..dce2e51b39 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts @@ -6,12 +6,10 @@ import { state } from "../state.js" vi.mock("vscode", () => ({ Uri: { file: vi.fn().mockImplementation((path) => ({ - // Mock `toString` to return the expected string path directly toString: () => path, })), // @ts-expect-error joinPath: vi.fn().mockImplementation((...args) => ({ - // Ensure the mock URI object's `toString` returns a concatenated path toString: () => args.join("/"), })), }, @@ -32,9 +30,7 @@ vi.mock("vscode", () => ({ vi.mock("../state", () => ({ state: vi.fn().mockImplementation(() => ({ project: { - settings: vi.fn().mockReturnValue({ - /* Mock settings here */ - }), + settings: vi.fn().mockReturnValue({ some: "settings" }), setSettings: vi.fn(), }, })), @@ -77,15 +73,11 @@ describe("createSettingsWebviewProvider", () => { const provider = createSettingsWebviewProvider({ context }) provider.resolveWebviewView(webviewView) - // Extract the string values from the mock Uri objects' toString method const localResourceRootsStrings = webviewView.webview.options.localResourceRoots?.map((uri) => uri.toString() ) - // Assert the localResourceRoots contains the expected path strings expect(localResourceRootsStrings).toEqual([mockExtensionPath]) - - // Assert the expected structure of the HTML content and other tests as before expect(webviewView.webview.html).toContain('') // Simulate a message and test handling. @@ -100,9 +92,7 @@ describe("createSettingsWebviewProvider", () => { // @ts-expect-error webviewView.webview.onDidReceiveMessage.mock.calls[0][0]({ command: "setSettings", - settings: { - /* Mock settings here */ - }, + settings: { some: "settings" }, }) expect(mockSetSettings).toHaveBeenCalled() From 75a379cf09d2438e04147476c3415f4366175361 Mon Sep 17 00:00:00 2001 From: Nils Jacobsen Date: Wed, 27 Mar 2024 12:32:38 +0100 Subject: [PATCH 11/29] fix: usage of settings component in sherlock --- .vscode/launch.json | 3 +-- .../src/utilities/settings/settingsView.ts | 13 ++++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index e8248d6b3a..20ddce1610 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -22,8 +22,7 @@ "--extensionDevelopmentPath=${workspaceFolder}/inlang/source-code/ide-extension", // change this path to specify what folder should be opened upon running this configuration "${workspaceFolder}/inlang/source-code/end-to-end-tests/inlang-nextjs" - ], - "outFiles": [] + ] }, { "name": "debug vs-code-extension e2e", diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index 4aa8517596..0ffc34fabd 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -46,6 +46,8 @@ function getWebviewContent(args: { ) const settings = state().project.settings() + const installedPlugins = state().project.installed.plugins() + const installedMessageLintRules = state().project.installed.messageLintRules() return ` @@ -64,11 +66,12 @@ function getWebviewContent(args: { // RENDER WEB COMPONENT const settingsContainer = document.getElementById('settings-container'); - const settingsTemplate = html\` - - \`; - - render(settingsTemplate, settingsContainer); + const settings = document.createElement('inlang-settings'); + settings.installedPlugins = ${JSON.stringify(installedPlugins)}; + settings.installedMessageLintRules = ${JSON.stringify(installedMessageLintRules)}; + settings.settings = ${JSON.stringify(settings)}; + + settingsContainer.appendChild(settings); // EVENTS document.querySelector('inlang-settings').addEventListener('onSetSettings', (settings) => { From 5d33d36754c25b1da0704a2f2fe896b9acbbe3b8 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Wed, 27 Mar 2024 17:43:15 +0100 Subject: [PATCH 12/29] update test --- .../ide-extension/src/utilities/settings/settingsView.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts index dce2e51b39..39352dc08a 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts @@ -32,6 +32,10 @@ vi.mock("../state", () => ({ project: { settings: vi.fn().mockReturnValue({ some: "settings" }), setSettings: vi.fn(), + installed: { + plugins: vi.fn().mockReturnValue([]), + messageLintRules: vi.fn().mockReturnValue([]), + }, }, })), })) From 2138d279e200122875e5aeb2917ced92b375018e Mon Sep 17 00:00:00 2001 From: Nils Jacobsen Date: Thu, 28 Mar 2024 08:48:52 +0100 Subject: [PATCH 13/29] feat: update event name --- .../ide-extension/src/utilities/settings/settingsView.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index 0ffc34fabd..90e94c8f4f 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -74,10 +74,10 @@ function getWebviewContent(args: { settingsContainer.appendChild(settings); // EVENTS - document.querySelector('inlang-settings').addEventListener('onSetSettings', (settings) => { + document.querySelector('inlang-settings').addEventListener('set-settings', (settings) => { vscode.postMessage({ command: 'setSettings', - settings: settings + settings: settings.detail.argument }); }); From 0b7918a24f27cca70e4983dd51e524f02cc6c3a0 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Thu, 4 Apr 2024 14:47:46 +0200 Subject: [PATCH 14/29] update settings view display --- .vscode/launch.json | 2 +- .../ide-extension/assets/settings-view.css | 30 +++++ inlang/source-code/ide-extension/package.json | 24 ++-- .../src/commands/openSettingsView.ts | 18 +++ .../ide-extension/src/configuration.ts | 2 + inlang/source-code/ide-extension/src/main.ts | 3 - .../src/services/telemetry/events.ts | 1 + .../src/utilities/project/project.ts | 13 +- .../src/utilities/settings/settingsView.ts | 122 +++++++++--------- 9 files changed, 135 insertions(+), 80 deletions(-) create mode 100644 inlang/source-code/ide-extension/assets/settings-view.css create mode 100644 inlang/source-code/ide-extension/src/commands/openSettingsView.ts diff --git a/.vscode/launch.json b/.vscode/launch.json index 20ddce1610..ab438c739c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -21,7 +21,7 @@ //"--noLazy", "--extensionDevelopmentPath=${workspaceFolder}/inlang/source-code/ide-extension", // change this path to specify what folder should be opened upon running this configuration - "${workspaceFolder}/inlang/source-code/end-to-end-tests/inlang-nextjs" + "${workspaceFolder}/inlang/source-code/paraglide/paraglide-js-adapter-next/examples/app" ] }, { diff --git a/inlang/source-code/ide-extension/assets/settings-view.css b/inlang/source-code/ide-extension/assets/settings-view.css new file mode 100644 index 0000000000..7023d405cb --- /dev/null +++ b/inlang/source-code/ide-extension/assets/settings-view.css @@ -0,0 +1,30 @@ +/* settings webview */ + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html, body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WUI", "Ubuntu", sans-serif; + color: var(--vscode-foreground); + background-color: var(--vscode-sideBar-background); + margin: 0; + padding: 0; + box-sizing: border-box; + user-select: text; + -webkit-user-select: text; +} + +main { + padding: 20px; +} + +inlang-settings { + --sl-input-background-color: var(--vscode-input-background); + --sl-input-border-color: var(--vscode-input-border); + --sl-input-border-radius: 4px; + --sl-input-border-width: 1px; + --sl-input-color: var(--vscode-input-foreground); +} diff --git a/inlang/source-code/ide-extension/package.json b/inlang/source-code/ide-extension/package.json index d172d637f2..995b458249 100644 --- a/inlang/source-code/ide-extension/package.json +++ b/inlang/source-code/ide-extension/package.json @@ -60,26 +60,19 @@ "type": "tree", "group": "sherlock@3" }, - { - "when": "sherlock:hasProjectInWorkspace", - "id": "settingsView", - "name": "Settings", - "type": "webview", - "group": "sherlock@4" - }, { "when": "sherlock:hasProjectInWorkspace", "id": "messageView", "name": "Messages", "type": "webview", - "group": "sherlock@5" + "group": "sherlock@4" }, { "when": "sherlock:hasProjectInWorkspace", "id": "errorView", "name": "Errors", "type": "tree", - "group": "sherlock@6" + "group": "sherlock@5" } ] }, @@ -93,6 +86,11 @@ "title": "Open settings file", "icon": "$(go-to-file)" }, + { + "command": "sherlock.openSettingsView", + "title": "Open settings view", + "icon": "$(settings-gear)" + }, { "command": "sherlock.copyError", "title": "Copy Error", @@ -102,13 +100,13 @@ "menus": { "view/item/context": [ { - "when": "view == projectView && viewItem == projectViewNode", - "command": "sherlock.openProject", + "when": "view == projectView", + "command": "sherlock.openSettingsFile", "group": "navigation" }, { - "when": "view == projectView && viewItem == projectViewNode", - "command": "sherlock.openSettingsFile", + "when": "view == projectView && viewItem == projectViewNodeSelected", + "command": "sherlock.openSettingsView", "group": "inline" }, { diff --git a/inlang/source-code/ide-extension/src/commands/openSettingsView.ts b/inlang/source-code/ide-extension/src/commands/openSettingsView.ts new file mode 100644 index 0000000000..4e86e24391 --- /dev/null +++ b/inlang/source-code/ide-extension/src/commands/openSettingsView.ts @@ -0,0 +1,18 @@ +import { commands } from "vscode" +import { telemetry } from "../services/telemetry/implementation.js" +import { settingsPanel } from "../utilities/settings/settingsView.js" +import type { ProjectViewNode } from "../utilities/project/project.js" + +export const openSettingsViewCommand = { + command: "sherlock.openSettingsView", + title: "Sherlock: Open Settings View", + register: commands.registerCommand, + callback: async function (node: ProjectViewNode) { + await settingsPanel({ context: node.context }) + + telemetry.capture({ + event: "IDE-EXTENSION Settings View opened", + }) + return undefined + }, +} diff --git a/inlang/source-code/ide-extension/src/configuration.ts b/inlang/source-code/ide-extension/src/configuration.ts index e034fcbc49..96bac31ec7 100644 --- a/inlang/source-code/ide-extension/src/configuration.ts +++ b/inlang/source-code/ide-extension/src/configuration.ts @@ -10,6 +10,7 @@ import { copyErrorCommand } from "./commands/copyError.js" import { previewLanguageTagCommand } from "./commands/previewLanguageTagCommand.js" import { jumpToPositionCommand } from "./commands/jumpToPosition.js" import { machineTranslateMessageCommand } from "./commands/machineTranslate.js" +import { openSettingsViewCommand } from "./commands/openSettingsView.js" export const CONFIGURATION = { EVENTS: { @@ -27,6 +28,7 @@ export const CONFIGURATION = { OPEN_IN_EDITOR: openInEditorCommand, OPEN_PROJECT: openProjectCommand, OPEN_SETTINGS_FILE: openSettingsFileCommand, + OPEN_SETTINGS_VIEW: openSettingsViewCommand, COPY_ERROR: copyErrorCommand, MACHINE_TRANSLATE_MESSAGE: machineTranslateMessageCommand, }, diff --git a/inlang/source-code/ide-extension/src/main.ts b/inlang/source-code/ide-extension/src/main.ts index 92b73dec1c..b63bcd5cc0 100644 --- a/inlang/source-code/ide-extension/src/main.ts +++ b/inlang/source-code/ide-extension/src/main.ts @@ -19,7 +19,6 @@ import { recommendationBannerView } from "./utilities/recommendation/recommendat import { telemetry } from "./services/telemetry/implementation.js" import { version } from "../package.json" import { statusBar } from "./utilities/settings/statusBar.js" -import { settingsView } from "./utilities/settings/settingsView.js" //import { initErrorMonitoring } from "./services/error-monitoring/implementation.js" // Entry Point @@ -88,8 +87,6 @@ async function main(args: { await recommendationBannerView(args) // Project Listings await projectView(args) - // Settings - await settingsView(args) // Messages await messageView(args) // Errors diff --git a/inlang/source-code/ide-extension/src/services/telemetry/events.ts b/inlang/source-code/ide-extension/src/services/telemetry/events.ts index c3a8941023..258b594712 100644 --- a/inlang/source-code/ide-extension/src/services/telemetry/events.ts +++ b/inlang/source-code/ide-extension/src/services/telemetry/events.ts @@ -12,3 +12,4 @@ export type TelemetryEvents = | "IDE-EXTENSION completed create config file" | "IDE-EXTENSION loaded project" | "IDE-EXTENSION Editor opened via tooltip" + | "IDE-EXTENSION Settings View opened" diff --git a/inlang/source-code/ide-extension/src/utilities/project/project.ts b/inlang/source-code/ide-extension/src/utilities/project/project.ts index 196b1652fb..791c7fe1e7 100644 --- a/inlang/source-code/ide-extension/src/utilities/project/project.ts +++ b/inlang/source-code/ide-extension/src/utilities/project/project.ts @@ -16,9 +16,12 @@ export interface ProjectViewNode { path: string isSelected: boolean collapsibleState: vscode.TreeItemCollapsibleState + context: vscode.ExtensionContext } -export function createProjectViewNodes(): ProjectViewNode[] { +export function createProjectViewNodes(args: { + context: vscode.ExtensionContext +}): ProjectViewNode[] { const projectsInWorkspace = state().projectsInWorkspace if (!projectsInWorkspace) { @@ -34,6 +37,7 @@ export function createProjectViewNodes(): ProjectViewNode[] { path: "", isSelected: false, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: args.context, } as ProjectViewNode } @@ -45,6 +49,7 @@ export function createProjectViewNodes(): ProjectViewNode[] { path: project.projectPath, isSelected: project.projectPath === state().selectedProjectPath, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: args.context, } as ProjectViewNode }) @@ -62,7 +67,7 @@ export function getTreeItem(args: { iconPath: args.element.isSelected ? new vscode.ThemeIcon("pass-filled", new vscode.ThemeColor("sideBar.foreground")) : new vscode.ThemeIcon("circle-large-outline", new vscode.ThemeColor("sideBar.foreground")), - contextValue: "projectViewNode", + contextValue: args.element.isSelected ? "projectViewNodeSelected" : "projectViewNode", command: { command: "sherlock.openProject", title: "Open File", @@ -133,11 +138,12 @@ export async function handleTreeSelection(args: { export function createTreeDataProvider(args: { nodeishFs: NodeishFilesystem workspaceFolder: vscode.WorkspaceFolder + context: vscode.ExtensionContext }): vscode.TreeDataProvider { return { getTreeItem: (element: ProjectViewNode) => getTreeItem({ element, nodeishFs: args.nodeishFs, workspaceFolder: args.workspaceFolder }), - getChildren: () => createProjectViewNodes(), + getChildren: () => createProjectViewNodes({ context: args.context }), onDidChangeTreeData: CONFIGURATION.EVENTS.ON_DID_PROJECT_TREE_VIEW_CHANGE.event, } } @@ -150,6 +156,7 @@ export const projectView = async (args: { const treeDataProvider = createTreeDataProvider({ nodeishFs: args.nodeishFs, workspaceFolder: args.workspaceFolder, + context: args.context, }) treeDataProvider.getChildren() diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index 90e94c8f4f..0c3e175c56 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -1,35 +1,39 @@ import * as vscode from "vscode" import { state } from "../state.js" -export function createSettingsWebviewProvider(args: { context: vscode.ExtensionContext }) { - return { - resolveWebviewView(webviewView: vscode.WebviewView) { - webviewView.webview.options = { - enableScripts: true, - localResourceRoots: [vscode.Uri.file(args.context.extensionPath)], - } +export async function settingsPanel(args: { context: vscode.ExtensionContext }) { + const panel = vscode.window.createWebviewPanel( + "settingsPanel", + "Settings", + vscode.ViewColumn.One, + { + enableScripts: true, + localResourceRoots: [vscode.Uri.file(args.context.extensionPath)], + } + ) - // Set the HTML content for the webview - webviewView.webview.html = getWebviewContent({ - context: args.context, - webview: webviewView.webview, - }) + panel.webview.html = getWebviewContent({ + context: args.context, + webview: panel.webview, + }) - webviewView.webview.onDidReceiveMessage(async (message) => { - switch (message.command) { - case "setSettings": - state().project.setSettings(message.settings) - break - } - }) - }, - } + panel.webview.onDidReceiveMessage(async (message) => { + switch (message.command) { + case "setSettings": + state().project.setSettings(message.settings) + break + } + }) } function getWebviewContent(args: { context: vscode.ExtensionContext webview: vscode.Webview }): string { + const styleUri = args.webview.asWebviewUri( + vscode.Uri.joinPath(args.context.extensionUri, "assets", "settings-view.css") + ) + const scriptUri = args.webview.asWebviewUri( vscode.Uri.joinPath( args.context.extensionUri, @@ -50,45 +54,43 @@ function getWebviewContent(args: { const installedMessageLintRules = state().project.installed.messageLintRules() return ` - - - - - Settings - - - - -
- + + + +
+

Settings

+
+
+ - - ` -} - -export async function settingsView(args: { context: vscode.ExtensionContext }) { - const provider = createSettingsWebviewProvider({ ...args }) - - args.context.subscriptions.push( - vscode.window.registerWebviewViewProvider("settingsView", provider) - ) + // EVENTS + document.querySelector('inlang-settings').addEventListener('set-settings', (event) => { + vscode.postMessage({ + command: 'setSettings', + settings: event.detail.argument + }); + }); + + + ` } From 4c46b92e1a662e4706866327584af7a1b6e4db94 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Mon, 8 Apr 2024 12:19:25 +0200 Subject: [PATCH 15/29] ad newline removal --- inlang/source-code/markdown/src/convert.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/inlang/source-code/markdown/src/convert.ts b/inlang/source-code/markdown/src/convert.ts index b0b8f5e992..39f5f566bc 100644 --- a/inlang/source-code/markdown/src/convert.ts +++ b/inlang/source-code/markdown/src/convert.ts @@ -190,4 +190,3 @@ export async function convert(markdown: string): Promise { return String(` ${content}`) } - From ad4953f23bb2bcd7abcf87565320f75de49a2cc0 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Mon, 8 Apr 2024 19:06:30 +0200 Subject: [PATCH 16/29] fix tests --- .../src/utilities/project/project.test.ts | 31 +++-- .../utilities/settings/settingsView.test.ts | 110 ++++++------------ .../src/utilities/settings/settingsView.ts | 2 +- 3 files changed, 57 insertions(+), 86 deletions(-) diff --git a/inlang/source-code/ide-extension/src/utilities/project/project.test.ts b/inlang/source-code/ide-extension/src/utilities/project/project.test.ts index 4aa8e55c90..90dc5b009f 100644 --- a/inlang/source-code/ide-extension/src/utilities/project/project.test.ts +++ b/inlang/source-code/ide-extension/src/utilities/project/project.test.ts @@ -99,12 +99,9 @@ vi.mock("@lix-js/client", () => ({ findRepoRoot: vi.fn(), })) -beforeEach(() => { - // Reset all mocks before each test - vi.clearAllMocks() -}) - describe("createProjectViewNodes", () => { + const mockContext = {} as vscode.ExtensionContext + beforeEach(() => { vi.resetAllMocks() }) @@ -123,7 +120,7 @@ describe("createProjectViewNodes", () => { selectedProjectPath: "/path/to/project2", }) - const nodes = createProjectViewNodes() + const nodes = createProjectViewNodes({ context: mockContext }) expect(nodes.length).toBe(2) expect(nodes[0]?.label).toBe("to/project1") expect(nodes[1]?.isSelected).toBe(true) @@ -135,7 +132,7 @@ describe("createProjectViewNodes", () => { projectsInWorkspace: [], selectedProjectPath: "/path/to/project2", }) - const nodes = createProjectViewNodes() + const nodes = createProjectViewNodes({ context: mockContext }) expect(nodes).toEqual([]) }) @@ -149,18 +146,21 @@ describe("createProjectViewNodes", () => { ], selectedProjectPath: "/path/to/project2", }) - const nodes = createProjectViewNodes() + const nodes = createProjectViewNodes({ context: mockContext }) expect(nodes.some((node) => node.label === "")).toBe(true) }) }) describe("getTreeItem", () => { + const mockContext = {} as vscode.ExtensionContext + it("should return a TreeItem for a given ProjectViewNode", () => { const node: ProjectViewNode = { label: "TestProject", path: "/path/to/testproject", isSelected: true, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: mockContext, } const workspaceFolder = { uri: { @@ -179,12 +179,15 @@ describe("getTreeItem", () => { }) describe("handleTreeSelection", () => { + const mockContext = {} as vscode.ExtensionContext + it("should handle tree selection and update state", async () => { const selectedNode: ProjectViewNode = { label: "SelectedProject", path: "/path/to/selected", isSelected: true, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: mockContext, } const nodeishFs = {} as NodeishFilesystem const workspaceFolder = { @@ -213,6 +216,7 @@ describe("handleTreeSelection", () => { path: "/path/to/selected", isSelected: true, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: mockContext, } const nodeishFs = {} as NodeishFilesystem const workspaceFolder = { @@ -236,11 +240,14 @@ describe("handleTreeSelection", () => { }) it("should handle error when project loading fails", async () => { + const mockContext = {} as vscode.ExtensionContext + const selectedNode: ProjectViewNode = { label: "selected/project.inlang", path: "/path/to/selected/project.inlang", isSelected: true, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: mockContext, } const nodeishFs = {} as NodeishFilesystem const workspaceFolder = { @@ -262,6 +269,8 @@ describe("handleTreeSelection", () => { }) describe("createTreeDataProvider", () => { + const mockContext = {} as vscode.ExtensionContext + it("should create a TreeDataProvider", () => { const nodeishFs = {} as NodeishFilesystem const workspaceFolder = { @@ -269,7 +278,11 @@ describe("createTreeDataProvider", () => { fsPath: "/path/to/workspace", }, } as vscode.WorkspaceFolder - const treeDataProvider = createTreeDataProvider({ nodeishFs, workspaceFolder }) + const treeDataProvider = createTreeDataProvider({ + nodeishFs, + workspaceFolder, + context: mockContext, + }) expect(treeDataProvider).toBeDefined() expect(treeDataProvider.getTreeItem).toBeInstanceOf(Function) expect(treeDataProvider.getChildren).toBeInstanceOf(Function) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts index 39352dc08a..7935c4d7ba 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts @@ -1,104 +1,62 @@ +import { describe, it, expect, vi } from "vitest" +import { settingsPanel, getWebviewContent } from "./settingsView.js" import * as vscode from "vscode" -import { beforeEach, describe, expect, it, vi } from "vitest" -import { settingsView, createSettingsWebviewProvider } from "./settingsView.js" -import { state } from "../state.js" vi.mock("vscode", () => ({ - Uri: { - file: vi.fn().mockImplementation((path) => ({ - toString: () => path, - })), - // @ts-expect-error - joinPath: vi.fn().mockImplementation((...args) => ({ - toString: () => args.join("/"), - })), - }, window: { - createWebviewView: () => ({ + createWebviewPanel: vi.fn().mockReturnValue({ webview: { - options: {}, html: "", onDidReceiveMessage: vi.fn(), - asWebviewUri: vi.fn().mockImplementation((uri) => `mockedUriFor(${uri})`), + asWebviewUri: vi.fn().mockImplementation((uri: vscode.Uri) => uri), }, }), - registerWebviewViewProvider: vi.fn(), }, - WebviewView: vi.fn(), + Uri: { + file: vi.fn().mockReturnValue("mock-file-uri"), + joinPath: vi.fn().mockReturnValue("mock-join-path-uri"), + }, + ViewColumn: { + One: 1, + }, })) -vi.mock("../state", () => ({ - state: vi.fn().mockImplementation(() => ({ +vi.mock("../state.js", () => ({ + state: () => ({ project: { - settings: vi.fn().mockReturnValue({ some: "settings" }), - setSettings: vi.fn(), + settings: vi.fn().mockReturnValue({}), installed: { plugins: vi.fn().mockReturnValue([]), messageLintRules: vi.fn().mockReturnValue([]), }, }, - })), + }), })) -describe("settingsView", () => { - beforeEach(() => { - vi.clearAllMocks() - }) - - it("registers the webview view provider correctly", async () => { - const context = { subscriptions: { push: vi.fn() } } as unknown as vscode.ExtensionContext - await settingsView({ context }) - - expect(context.subscriptions.push).toHaveBeenCalled() - expect(vscode.window.registerWebviewViewProvider).toHaveBeenCalledWith( - "settingsView", - expect.anything() +describe("settingsPanel", () => { + it("should create a webview panel with the correct properties", async () => { + const mockContext = { extensionPath: "path/to/extension" } as unknown as vscode.ExtensionContext + await settingsPanel({ context: mockContext }) + expect(vscode.window.createWebviewPanel).toHaveBeenCalledWith( + "settingsPanel", + "Settings", + vscode.ViewColumn.One, + expect.objectContaining({ + enableScripts: true, + localResourceRoots: [expect.anything()], + }) ) }) }) -describe("createSettingsWebviewProvider", () => { - beforeEach(() => { - vi.clearAllMocks() - }) - - it("sets up webview options and HTML content correctly", () => { - const mockExtensionPath = "path/to/extension" - const context = { extensionPath: mockExtensionPath } as unknown as vscode.ExtensionContext - const webviewView = { - webview: { - options: {}, - html: "", - onDidReceiveMessage: vi.fn(), - asWebviewUri: vi.fn((uri) => `mockedUriFor(${uri.toString()})`), - }, - } as unknown as vscode.WebviewView - - const provider = createSettingsWebviewProvider({ context }) - provider.resolveWebviewView(webviewView) - - const localResourceRootsStrings = webviewView.webview.options.localResourceRoots?.map((uri) => - uri.toString() - ) - - expect(localResourceRootsStrings).toEqual([mockExtensionPath]) - expect(webviewView.webview.html).toContain('') - - // Simulate a message and test handling. - const mockSetSettings = vi.fn() - vi.mocked(state).mockImplementation(() => ({ - // @ts-expect-error - project: { - setSettings: mockSetSettings, - }, - })) - +describe("getWebviewContent", () => { + it("should return expected HTML content", () => { + const mockWebview = { asWebviewUri: vi.fn() } as unknown as vscode.Webview + const mockContext = { extensionUri: "uri" } as unknown as vscode.ExtensionContext // @ts-expect-error - webviewView.webview.onDidReceiveMessage.mock.calls[0][0]({ - command: "setSettings", - settings: { some: "settings" }, - }) + mockWebview.asWebviewUri.mockImplementation((uri: any) => uri) - expect(mockSetSettings).toHaveBeenCalled() + const htmlContent = getWebviewContent({ context: mockContext, webview: mockWebview }) + expect(htmlContent).toContain("Settings") }) }) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index 0c3e175c56..a5f9e17679 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -26,7 +26,7 @@ export async function settingsPanel(args: { context: vscode.ExtensionContext }) }) } -function getWebviewContent(args: { +export function getWebviewContent(args: { context: vscode.ExtensionContext webview: vscode.Webview }): string { From 4c02ae7940b73b3b6d8472dc4073f5d52c195920 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Mon, 8 Apr 2024 19:13:53 +0200 Subject: [PATCH 17/29] update lock --- pnpm-lock.yaml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a928563cde..d36227e154 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7726,6 +7726,7 @@ packages: resolution: {integrity: sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==} engines: {node: '>=16.3.0'} hasBin: true + requiresBuild: true peerDependencies: typescript: '>= 4.7.4' peerDependenciesMeta: @@ -12308,6 +12309,7 @@ packages: /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} + requiresBuild: true dependencies: event-target-shim: 5.0.1 dev: true @@ -12550,6 +12552,7 @@ packages: /archiver-utils@5.0.2: resolution: {integrity: sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==} engines: {node: '>= 14'} + requiresBuild: true dependencies: glob: 10.3.12 graceful-fs: 4.2.11 @@ -12576,6 +12579,7 @@ packages: /archiver@7.0.1: resolution: {integrity: sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==} engines: {node: '>= 14'} + requiresBuild: true dependencies: archiver-utils: 5.0.2 async: 3.2.5 @@ -13083,6 +13087,7 @@ packages: /b4a@1.6.6: resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} + requiresBuild: true /babel-core@7.0.0-bridge.0(@babel/core@7.24.4): resolution: {integrity: sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==} @@ -13561,6 +13566,7 @@ packages: /buffer-crc32@1.0.0: resolution: {integrity: sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==} engines: {node: '>=8.0.0'} + requiresBuild: true dev: true /buffer-equal-constant-time@1.0.1: @@ -13898,6 +13904,7 @@ packages: /chromium-bidi@0.4.16(devtools-protocol@0.0.1147663): resolution: {integrity: sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==} + requiresBuild: true peerDependencies: devtools-protocol: '*' dependencies: @@ -14208,6 +14215,7 @@ packages: /compress-commons@6.0.2: resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} engines: {node: '>= 14'} + requiresBuild: true dependencies: crc-32: 1.2.2 crc32-stream: 6.0.0 @@ -14375,6 +14383,7 @@ packages: /crc32-stream@6.0.0: resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==} engines: {node: '>= 14'} + requiresBuild: true dependencies: crc-32: 1.2.2 readable-stream: 4.5.2 @@ -14422,6 +14431,7 @@ packages: /cross-fetch@4.0.0: resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} + requiresBuild: true dependencies: node-fetch: 2.7.0 transitivePeerDependencies: @@ -14516,6 +14526,7 @@ packages: /css-shorthand-properties@1.1.1: resolution: {integrity: sha512-Md+Juc7M3uOdbAFwOYlTrccIZ7oCFuzrhKYQjdeUEW/sE1hv17Jp/Bws+ReOPpGVBTYCBoYo+G17V5Qo8QQ75A==} + requiresBuild: true dev: true /css-to-react-native@3.2.0: @@ -14535,6 +14546,7 @@ packages: /css-value@0.0.1: resolution: {integrity: sha512-FUV3xaJ63buRLgHrLQVlVgQnQdR4yqdLGaDu7g8CQcWjInDfM9plBTPI9FRfpahju1UBSaMckeb2/46ApS/V1Q==} + requiresBuild: true dev: true /css-what@6.1.0: @@ -15010,10 +15022,12 @@ packages: /devtools-protocol@0.0.1147663: resolution: {integrity: sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==} + requiresBuild: true dev: true /devtools-protocol@0.0.1273771: resolution: {integrity: sha512-QDbb27xcTVReQQW/GHJsdQqGKwYBE7re7gxehj467kKP2DKuYBUj6i2k5LRiAC66J1yZG/9gsxooz/s9pcm0Og==} + requiresBuild: true dev: true /didyoumean@1.2.2: @@ -16526,6 +16540,7 @@ packages: /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} + requiresBuild: true dev: true /eventemitter3@4.0.7: @@ -16740,6 +16755,7 @@ packages: /fast-deep-equal@2.0.1: resolution: {integrity: sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==} + requiresBuild: true dev: true /fast-deep-equal@3.1.3: @@ -16751,6 +16767,7 @@ packages: /fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} + requiresBuild: true /fast-glob@3.2.7: resolution: {integrity: sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==} @@ -19752,6 +19769,7 @@ packages: /lodash.zip@4.2.0: resolution: {integrity: sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==} + requiresBuild: true dev: true /lodash@4.17.21: @@ -21170,6 +21188,7 @@ packages: /mitt@3.0.0: resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} + requiresBuild: true dev: true /mixme@0.5.10: @@ -23136,6 +23155,7 @@ packages: /proxy-agent@6.3.0: resolution: {integrity: sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==} engines: {node: '>= 14'} + requiresBuild: true dependencies: agent-base: 7.1.1 debug: 4.3.4(supports-color@8.1.1) @@ -23242,6 +23262,7 @@ packages: /puppeteer-core@20.9.0(typescript@5.3.2): resolution: {integrity: sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==} engines: {node: '>=16.3.0'} + requiresBuild: true peerDependencies: typescript: '>= 4.7.4' peerDependenciesMeta: @@ -23289,6 +23310,7 @@ packages: /query-selector-shadow-dom@1.0.1: resolution: {integrity: sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==} + requiresBuild: true dev: true /query-string@5.1.1: @@ -23312,6 +23334,7 @@ packages: /queue-tick@1.0.1: resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} + requiresBuild: true /quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} @@ -24017,6 +24040,7 @@ packages: /resq@1.11.0: resolution: {integrity: sha512-G10EBz+zAAy3zUd/CDoBbXRL6ia9kOo3xRHrMDsHljI0GDkhYlyjwoCx5+3eCC4swi1uCoZQhskuJkj7Gp57Bw==} + requiresBuild: true dependencies: fast-deep-equal: 2.0.1 dev: true @@ -24087,6 +24111,7 @@ packages: /rgb2hex@0.2.5: resolution: {integrity: sha512-22MOP1Rh7sAo1BZpDG6R5RFYzR2lYEgwq7HEmyW2qcsOqR2lQKmn+O//xV3YG/0rrhMC6KVX2hU+ZXuaw9a5bw==} + requiresBuild: true dev: true /rimraf@2.6.3: @@ -24413,6 +24438,7 @@ packages: /serialize-error@11.0.3: resolution: {integrity: sha512-2G2y++21dhj2R7iHAdd0FIzjGwuKZld+7Pl/bTU6YIkrC2ZMbVUjm+luj6A6V34Rv9XfKJDKpTWu9W4Gse1D9g==} engines: {node: '>=14.16'} + requiresBuild: true dependencies: type-fest: 2.19.0 dev: true @@ -25058,6 +25084,7 @@ packages: /streamx@2.16.1: resolution: {integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==} + requiresBuild: true dependencies: fast-fifo: 1.3.2 queue-tick: 1.0.1 @@ -28392,6 +28419,7 @@ packages: /ws@8.13.0: resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} engines: {node: '>=10.0.0'} + requiresBuild: true peerDependencies: bufferutil: ^4.0.1 utf-8-validate: '>=5.0.2' @@ -28531,6 +28559,7 @@ packages: /yargs@17.7.1: resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==} engines: {node: '>=12'} + requiresBuild: true dependencies: cliui: 8.0.1 escalade: 3.1.2 @@ -28607,6 +28636,7 @@ packages: /zip-stream@6.0.1: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} + requiresBuild: true dependencies: archiver-utils: 5.0.2 compress-commons: 6.0.2 @@ -28622,7 +28652,7 @@ packages: file:..: resolution: {directory: .., type: directory} - name: dev + name: git dev: true file:inlang/source-code/cli: From c39fdf7679b8fc4d57e817b9a3bf67b0ccc4819e Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Tue, 9 Apr 2024 11:45:38 +0200 Subject: [PATCH 18/29] update styling --- .../ide-extension/assets/settings-view.css | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/inlang/source-code/ide-extension/assets/settings-view.css b/inlang/source-code/ide-extension/assets/settings-view.css index 7023d405cb..a4b2d311ed 100644 --- a/inlang/source-code/ide-extension/assets/settings-view.css +++ b/inlang/source-code/ide-extension/assets/settings-view.css @@ -21,10 +21,54 @@ main { padding: 20px; } +main > h1 { + font-size: 24px; + margin-block-end: 20px; +} + inlang-settings { + /* Input */ --sl-input-background-color: var(--vscode-input-background); --sl-input-border-color: var(--vscode-input-border); + --sl-input-border-color-hover: var(--vscode-input-activeBorder); + --sl-input-border-color-focus: var(--vscode-input-activeBorder); --sl-input-border-radius: 4px; --sl-input-border-width: 1px; --sl-input-color: var(--vscode-input-foreground); + --sl-input-color-hover: var(--vscode-input-foreground); + --sl-input-color-focus: var(--vscode-input-foreground); + --sl-input-color-disabled: var(--vscode-disabledForeground); + --sl-input-focus-ring-color: var(--vscode-focusBorder); + /* Input Filled */ + --sl-input-filled-background-color: var(--vscode-input-background); + --sl-input-filled-background-color-hover: var(--vscode-input-background); + --sl-input-filled-background-color-focus: var(--vscode-input-background); + --sl-input-filled-background-color-disabled: var(--vscode-input-background); + --sl-input-filled-color: var(--vscode-input-foreground); + --sl-input-filled-color-hover: var(--vscode-input-foreground); + --sl-input-filled-color-focus: var(--vscode-disabledForeground); + --sl-input-filled-color-disabled: var(--vscode-); + --sl-input-help-text-color: var(--vscode-descriptionForeground); + /* Focus Ring */ + --sl-focus-ring-color: var(--vscode-focusBorder); + --sl-focus-ring-width: 3px; + --sl-focus-ring-offset: 1px; + /* Tooltip */ + --sl-tooltip-background-color: var(--vscode-button-background); + --sl-tooltip-color: var(--vscode-button-foreground); + /* Panels */ + --sl-panel-background-color: var(--vscode-sideBar-background); + --sl-panel-border-color: var(--vscode-sideBar-background); + --sl-panel-border-width: 1px; +} + + +inlang-settings::part(property-title) { + font-size: 16px; + font-weight: 600; +} + +inlang-settings::part(property-paragraph) { + font-size: 14px; + color: var(--vscode-descriptionForeground); } From fc7cd9596753bc4d78642a9f25be8f81119a684d Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Tue, 9 Apr 2024 11:50:10 +0200 Subject: [PATCH 19/29] update styling with more variables --- .../ide-extension/assets/settings-view.css | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/inlang/source-code/ide-extension/assets/settings-view.css b/inlang/source-code/ide-extension/assets/settings-view.css index a4b2d311ed..0fc4a1a342 100644 --- a/inlang/source-code/ide-extension/assets/settings-view.css +++ b/inlang/source-code/ide-extension/assets/settings-view.css @@ -22,7 +22,7 @@ main { } main > h1 { - font-size: 24px; + font-size: 22px; margin-block-end: 20px; } @@ -39,6 +39,11 @@ inlang-settings { --sl-input-color-focus: var(--vscode-input-foreground); --sl-input-color-disabled: var(--vscode-disabledForeground); --sl-input-focus-ring-color: var(--vscode-focusBorder); + --sl-input-icon-color: var(--vscode-input-foreground); + --sl-input-icon-color-hover: var(--vscode-input-foreground); + --sl-input-icon-color-focus: var(--vscode-input-foreground); + --sl-input-placeholder-color: var(--vscode-input-foreground); + --sl-input-placeholder-color-disabled: var(--vscode-disabledForeground); /* Input Filled */ --sl-input-filled-background-color: var(--vscode-input-background); --sl-input-filled-background-color-hover: var(--vscode-input-background); @@ -64,11 +69,11 @@ inlang-settings { inlang-settings::part(property-title) { - font-size: 16px; + font-size: 14px; font-weight: 600; } inlang-settings::part(property-paragraph) { - font-size: 14px; + font-size: 12px; color: var(--vscode-descriptionForeground); } From a584aa84ecd85b068afb1f31d25375ada929069e Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Tue, 9 Apr 2024 11:58:28 +0200 Subject: [PATCH 20/29] add more styling --- .../ide-extension/assets/settings-view.css | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/inlang/source-code/ide-extension/assets/settings-view.css b/inlang/source-code/ide-extension/assets/settings-view.css index 0fc4a1a342..3143352a8f 100644 --- a/inlang/source-code/ide-extension/assets/settings-view.css +++ b/inlang/source-code/ide-extension/assets/settings-view.css @@ -67,13 +67,21 @@ inlang-settings { --sl-panel-border-width: 1px; } +inlang-settings::part(base) { + gap: 36px; +} + +inlang-settings::part(module) { + gap: 28px; +} + inlang-settings::part(property-title) { - font-size: 14px; + font-size: 16px; font-weight: 600; } inlang-settings::part(property-paragraph) { - font-size: 12px; + font-size: 14px; color: var(--vscode-descriptionForeground); } From ba28a87ab0d2c86eb35535256f96fae3dbcf3e65 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Tue, 9 Apr 2024 11:58:34 +0200 Subject: [PATCH 21/29] fix typo --- .../message-lint-rules/identicalPattern/src/identicalPattern.ts | 2 +- inlang/source-code/plugins/i18next/src/settings.test.ts | 2 +- inlang/source-code/plugins/next-intl/src/settings.test.ts | 2 +- inlang/source-code/sdk/src/api.ts | 2 +- inlang/source-code/settings-component/src/mock/project.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inlang/source-code/message-lint-rules/identicalPattern/src/identicalPattern.ts b/inlang/source-code/message-lint-rules/identicalPattern/src/identicalPattern.ts index 2071e29d69..94edb07bd6 100644 --- a/inlang/source-code/message-lint-rules/identicalPattern/src/identicalPattern.ts +++ b/inlang/source-code/message-lint-rules/identicalPattern/src/identicalPattern.ts @@ -13,7 +13,7 @@ const RuleSettings = Type.Object({ description: "All items in the array need quotaion marks at the end and beginning", }), { - title: "DEPRICATED. Ignore paths", + title: "DEPRECATED. Ignore paths", description: "Set a path that should be ignored.", } ) diff --git a/inlang/source-code/plugins/i18next/src/settings.test.ts b/inlang/source-code/plugins/i18next/src/settings.test.ts index f3b05d70e4..a417d4e9a5 100644 --- a/inlang/source-code/plugins/i18next/src/settings.test.ts +++ b/inlang/source-code/plugins/i18next/src/settings.test.ts @@ -56,7 +56,7 @@ test("if curly brackets {} does to cointain the word languageTag", async () => { }) expect(isValid).toBe(false) }) -test("if pathPattern doesn't includes a '*' wildcard. This was depricated in version 3.0.0.", async () => { +test("if pathPattern doesn't includes a '*' wildcard. This was deprecated in version 3.0.0.", async () => { const pathPattern = "./{languageTag}/*.json" const isValid = Value.Check(plugin.settingsSchema!, { pathPattern, diff --git a/inlang/source-code/plugins/next-intl/src/settings.test.ts b/inlang/source-code/plugins/next-intl/src/settings.test.ts index ae896c175c..f64bc6060a 100644 --- a/inlang/source-code/plugins/next-intl/src/settings.test.ts +++ b/inlang/source-code/plugins/next-intl/src/settings.test.ts @@ -56,7 +56,7 @@ test("if curly brackets {} does to cointain the word languageTag", async () => { }) expect(isValid).toBe(false) }) -test("if pathPattern doesn't includes a '*' wildcard. This was depricated in version 3.0.0.", async () => { +test("if pathPattern doesn't includes a '*' wildcard. This was deprecated in version 3.0.0.", async () => { const pathPattern = "./{languageTag}/*.json" const isValid = Value.Check(plugin.settingsSchema!, { pathPattern, diff --git a/inlang/source-code/sdk/src/api.ts b/inlang/source-code/sdk/src/api.ts index 1043f09bfa..890963ddb5 100644 --- a/inlang/source-code/sdk/src/api.ts +++ b/inlang/source-code/sdk/src/api.ts @@ -80,7 +80,7 @@ export type MessageQueryApi = { } includedMessageIds: Subscribable /* - * getAll is depricated do not use it + * getAll is deprecated do not use it */ getAll: Subscribable> update: (args: { where: { id: Message["id"] }; data: Partial }) => boolean diff --git a/inlang/source-code/settings-component/src/mock/project.ts b/inlang/source-code/settings-component/src/mock/project.ts index 05ffe1f6fc..a9f82ee3ca 100644 --- a/inlang/source-code/settings-component/src/mock/project.ts +++ b/inlang/source-code/settings-component/src/mock/project.ts @@ -170,7 +170,7 @@ export const mockInstalledMessageLintRules = [ description: "All items in the array need quotaion marks at the end and beginning", type: "string", }, - title: "DEPRICATED. Ignore paths", + title: "DEPRECATED. Ignore paths", description: "Set a path that should be ignored.", }, }, From bc00427dee7aade549d0b03a295bcf7ecff40703 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Tue, 9 Apr 2024 12:00:04 +0200 Subject: [PATCH 22/29] add changeset --- .changeset/quick-ties-kneel.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/quick-ties-kneel.md diff --git a/.changeset/quick-ties-kneel.md b/.changeset/quick-ties-kneel.md new file mode 100644 index 0000000000..16973ca55d --- /dev/null +++ b/.changeset/quick-ties-kneel.md @@ -0,0 +1,7 @@ +--- +"@inlang/message-lint-rule-identical-pattern": patch +"@inlang/plugin-next-intl": patch +"@inlang/plugin-i18next": patch +--- + +fix typo From e4360bb3b97cb7e9a8a296bd9ae7a8d035bc1719 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Tue, 9 Apr 2024 16:06:59 +0200 Subject: [PATCH 23/29] update lock --- pnpm-lock.yaml | 160 ++++++++++++++++++++----------------------------- 1 file changed, 64 insertions(+), 96 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a7be74125e..0125029dbc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -500,7 +500,7 @@ importers: version: 3.1.2 posthog-js: specifier: ^1.91.1 - version: 1.120.2 + version: 1.120.3 prosemirror-history: specifier: ^1.3.0 version: 1.4.0 @@ -902,7 +902,7 @@ importers: version: 8.4.38 posthog-js: specifier: ^1.91.1 - version: 1.120.2 + version: 1.120.3 tsx: specifier: ^4.6.2 version: 4.7.2 @@ -2355,7 +2355,7 @@ importers: version: 2.0.6(@types/express@4.17.17) posthog-js: specifier: ^1.53.2 - version: 1.120.2 + version: 1.120.3 posthog-node: specifier: ^3.0.0 version: 3.1.3 @@ -7680,7 +7680,7 @@ packages: resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} dev: false - /@preact/preset-vite@2.8.2(@babel/core@7.24.4)(preact@10.20.1)(vite@4.5.2): + /@preact/preset-vite@2.8.2(@babel/core@7.24.4)(preact@10.20.2)(vite@4.5.2): resolution: {integrity: sha512-m3tl+M8IO8jgiHnk+7LSTFl8axdPXloewi7iGVLdmCwf34XOzEUur0bZVewW4DUbUipFjTS2CXu27+5f/oexBA==} peerDependencies: '@babel/core': 7.x @@ -7689,7 +7689,7 @@ packages: '@babel/core': 7.24.4 '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.24.4) '@babel/plugin-transform-react-jsx-development': 7.22.5(@babel/core@7.24.4) - '@prefresh/vite': 2.4.5(preact@10.20.1)(vite@4.5.2) + '@prefresh/vite': 2.4.5(preact@10.20.2)(vite@4.5.2) '@rollup/pluginutils': 4.2.1 babel-plugin-transform-hook-names: 1.0.2(@babel/core@7.24.4) debug: 4.3.4(supports-color@8.1.1) @@ -7709,19 +7709,19 @@ packages: resolution: {integrity: sha512-uG3jGEAysxWoyG3XkYfjYHgaySFrSsaEb4GagLzYaxlydbuREtaX+FTxuIidp241RaLl85XoHg9Ej6E4+V1pcg==} dev: false - /@prefresh/core@1.5.2(preact@10.20.1): + /@prefresh/core@1.5.2(preact@10.20.2): resolution: {integrity: sha512-A/08vkaM1FogrCII5PZKCrygxSsc11obExBScm3JF1CryK2uDS3ZXeni7FeKCx1nYdUkj4UcJxzPzc1WliMzZA==} peerDependencies: preact: ^10.0.0 dependencies: - preact: 10.20.1 + preact: 10.20.2 dev: false /@prefresh/utils@1.2.0: resolution: {integrity: sha512-KtC/fZw+oqtwOLUFM9UtiitB0JsVX0zLKNyRTA332sqREqSALIIQQxdUCS1P3xR/jT1e2e8/5rwH6gdcMLEmsQ==} dev: false - /@prefresh/vite@2.4.5(preact@10.20.1)(vite@4.5.2): + /@prefresh/vite@2.4.5(preact@10.20.2)(vite@4.5.2): resolution: {integrity: sha512-iForDVJ2M8gQYnm5pHumvTEJjGGc7YNYC0GVKnHFL+GvFfKHfH9Rpq67nUAzNbjuLEpqEOUuQVQajMazWu2ZNQ==} peerDependencies: preact: ^10.4.0 @@ -7729,10 +7729,10 @@ packages: dependencies: '@babel/core': 7.24.4 '@prefresh/babel-plugin': 0.5.1 - '@prefresh/core': 1.5.2(preact@10.20.1) + '@prefresh/core': 1.5.2(preact@10.20.2) '@prefresh/utils': 1.2.0 '@rollup/pluginutils': 4.2.1 - preact: 10.20.1 + preact: 10.20.2 vite: 4.5.2(@types/node@20.12.6) transitivePeerDependencies: - supports-color @@ -7742,7 +7742,6 @@ packages: resolution: {integrity: sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==} engines: {node: '>=16.3.0'} hasBin: true - requiresBuild: true peerDependencies: typescript: '>= 4.7.4' peerDependenciesMeta: @@ -10261,32 +10260,32 @@ packages: '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-blockquote@2.2.6(@tiptap/core@2.0.3): - resolution: {integrity: sha512-Qoq4Tl4wyEGfuBrMFth5hWP1SroJtgDYPnyzAZeLiGzF3Yxtu7FFqjGtD1/Bos9ftnFVCAj+nIXnuKsM1YUaGg==} + /@tiptap/extension-blockquote@2.3.0(@tiptap/core@2.0.3): + resolution: {integrity: sha512-Cztt77t7f+f0fuPy+FWUL8rKTIpcdsVT0z0zYQFFafvGaom0ZALQSOdTR/q+Kle9I4DaCMO3/Q0mwax/D4k4+A==} peerDependencies: '@tiptap/core': ^2.0.0 dependencies: '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-bold@2.2.6(@tiptap/core@2.0.3): - resolution: {integrity: sha512-PI/jNH7rmi6hBvWy/z+3KUTYqeaDXBUjidM74gWP6OLV28HTJ5SkIPCriYe4u2j2Wc/nk3gPxs4/hPOAu/YiXA==} + /@tiptap/extension-bold@2.3.0(@tiptap/core@2.0.3): + resolution: {integrity: sha512-SzkbJibHXFNU7TRaAebTtwbXUEhGZ8+MhlBn12aQ4QhdjNtFpQwKXQPyYeDyZGcyiOFgtFTb+WIfCGm8ZX0Fpw==} peerDependencies: '@tiptap/core': ^2.0.0 dependencies: '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-bullet-list@2.2.6(@tiptap/core@2.0.3): - resolution: {integrity: sha512-bSrmYlWfj/bXXoBMVB+gCTlsficVVzWi1jcAjAn+qNAENkhampmlFIUG4DiKGYtn18ZoTbyLgQGDMCO3SBdeDQ==} + /@tiptap/extension-bullet-list@2.3.0(@tiptap/core@2.0.3): + resolution: {integrity: sha512-4nU4vJ5FjRDLqHm085vYAkuo68UK84Wl6CDSjm7sPVcu0FvQX02Okqt65azoSYQeS1SSSd5qq9YZuGWcYdp4Cw==} peerDependencies: '@tiptap/core': ^2.0.0 dependencies: '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-code-block@2.2.6(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): - resolution: {integrity: sha512-834gVybNyI4nY6NINqnOosFPa4WKylMQTraEY2KhUH2XU1mh0Ni7EgyK10dfZvOUj90OjaxZtXkyZrZ89RTxog==} + /@tiptap/extension-code-block@2.3.0(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-+Ne6PRBwQt70Pp8aW2PewaEy4bHrNYn4N+y8MObsFtqLutXBz4nXnsXWiNYFQZwzlUY+CHG4XS73mx8oMOFfDw==} peerDependencies: '@tiptap/core': ^2.0.0 '@tiptap/pm': ^2.0.0 @@ -10295,8 +10294,8 @@ packages: '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-code@2.2.6(@tiptap/core@2.0.3): - resolution: {integrity: sha512-UGsSFvVWrWWWQFU4atk+b/qeewTLadOZG/BHZXQDloyP5eJ1SkgUVy9nv3y2cT8QWRbvF6sxkV+SdFoWnvaG3Q==} + /@tiptap/extension-code@2.3.0(@tiptap/core@2.0.3): + resolution: {integrity: sha512-O2FZmosiIRoVbW82fZy8xW4h4gb2xAzxWzHEcsHPlwCbE3vYvcBMmbkQ5p+33eRtuRQInzl3Q/cwupv9ctIepQ==} peerDependencies: '@tiptap/core': ^2.0.0 dependencies: @@ -10311,8 +10310,8 @@ packages: '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-dropcursor@2.2.6(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): - resolution: {integrity: sha512-mCeIbbfe4rl8CuxVQvT7iYSKGVX/ls1LOwALwlHJz5Uw5l3VknAJdjEmHt6hNFdHu162JivL02Il0QYQ8BZwvA==} + /@tiptap/extension-dropcursor@2.3.0(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-WWxxGQPWdbzxyYP6jtBYSq4wMRhINhI0wBC8pgkxTVwCIWftMuYj++FP4LLIpuWgj78PWApuoM0QQxk4Lj7FOw==} peerDependencies: '@tiptap/core': ^2.0.0 '@tiptap/pm': ^2.0.0 @@ -10332,8 +10331,8 @@ packages: tippy.js: 6.3.7 dev: false - /@tiptap/extension-gapcursor@2.2.6(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): - resolution: {integrity: sha512-HDYu+FmL9V+khsiT5904Dy2qG6KrAvnXEjZk1+vVul0TabnQvl2rqHjTxmev3P1rOYTgePmaWXazxAWFIvbMBQ==} + /@tiptap/extension-gapcursor@2.3.0(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-OxcXcfD0uzNcXdXu2ZpXFAtXIsgK2MBHvFUs0t0gxtcL/t43pTOQBLy+29Ei30BxpwLghtX8jQ6IDzMiybq/sA==} peerDependencies: '@tiptap/core': ^2.0.0 '@tiptap/pm': ^2.0.0 @@ -10350,8 +10349,8 @@ packages: '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-heading@2.2.6(@tiptap/core@2.0.3): - resolution: {integrity: sha512-XOmY+uezm42xSO1ero2bRBMdQxWytpxLJS+2shK0QogZ3sDplnfWfP5KV9Z2juXjTdPgPWG0ZaHzIIaLquEcfA==} + /@tiptap/extension-heading@2.3.0(@tiptap/core@2.0.3): + resolution: {integrity: sha512-YcZoUYfqb0nohoPgem4f8mjn5OqDomFrbJiC9VRHUOCIuEu+aJEYwp8mmdkLnS3f+LRCZ6G76cJJ50lkzSAZRw==} peerDependencies: '@tiptap/core': ^2.0.0 dependencies: @@ -10368,8 +10367,8 @@ packages: '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-horizontal-rule@2.2.6(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): - resolution: {integrity: sha512-zyLU+Xlk8y3yBCblE8pFwqAP2Rju1csyAu45hi3NCJ6HDGQGdjy8oh+Xa8y2kTPxRNMZARxqB+vCiEoW3YZn2A==} + /@tiptap/extension-horizontal-rule@2.3.0(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-4DB8GU3uuDzzyqUmONIb3CHXcQ6Nuy4mHHkFSmUyEjg1i5eMQU5H7S6mNvZbltcJB2ImgCSwSMlj1kVN3MLIPg==} peerDependencies: '@tiptap/core': ^2.0.0 '@tiptap/pm': ^2.0.0 @@ -10378,16 +10377,16 @@ packages: '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-italic@2.2.6(@tiptap/core@2.0.3): - resolution: {integrity: sha512-wB+Y6p2gbc1f2hKYeGNXRQ7P2xi3+JzD3PjSyC9Ss/yyujZhxSOtxBF0nzFXdI+7nmN0Qm4inwPDU/DVrIPb+A==} + /@tiptap/extension-italic@2.3.0(@tiptap/core@2.0.3): + resolution: {integrity: sha512-jdFjLjdt5JtPlGMpoS6TEq5rznjbAYVlPwcw5VkYENVIYIGIR1ylIw2JwK1nUEsQ+OgYwVxHLejcUXWG1dCi2g==} peerDependencies: '@tiptap/core': ^2.0.0 dependencies: '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-list-item@2.2.6(@tiptap/core@2.0.3): - resolution: {integrity: sha512-3xig1q0jtOyV49TkAbvxBoOJdNypwq6vLYerfblhj6dK+hIIZUM33S+SmGl2+QaB25VwyeSHjiCvrJjB9PKWHQ==} + /@tiptap/extension-list-item@2.3.0(@tiptap/core@2.0.3): + resolution: {integrity: sha512-mHU+IuRa56OT6YCtxf5Z7OSUrbWdKhGCEX7RTrteDVs5oMB6W3oF9j88M5qQmZ1WDcxvQhAOoXctnMt6eX9zcA==} peerDependencies: '@tiptap/core': ^2.0.0 dependencies: @@ -10406,8 +10405,8 @@ packages: '@tiptap/suggestion': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) dev: false - /@tiptap/extension-ordered-list@2.2.6(@tiptap/core@2.0.3): - resolution: {integrity: sha512-h4HOv+TAMnoueh3CzUY2/Pp2n8eCdEQtKSfiMtHSO3NTTSlst0XEvq+3Z4K81F+ni3baXc+JUALP5dRVpI4apQ==} + /@tiptap/extension-ordered-list@2.3.0(@tiptap/core@2.0.3): + resolution: {integrity: sha512-gkf0tltXjlUj0cqyfDV2r7xy9YPKtcVSWwlCPun6OOi0KzKFiAMqQpA9hy2W6gJ+KCp8+KNRMClZOfH4TnnBfg==} peerDependencies: '@tiptap/core': ^2.0.0 dependencies: @@ -10432,8 +10431,8 @@ packages: '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false - /@tiptap/extension-strike@2.2.6(@tiptap/core@2.0.3): - resolution: {integrity: sha512-0fRh0SwPgqi+ZKD2NpRrmIAHdsgf27ddEUfvlIuFG5b9zqFa6pRZGpXW/6LyBwU0+0bkjW8/Wg3otyaRGjvZGw==} + /@tiptap/extension-strike@2.3.0(@tiptap/core@2.0.3): + resolution: {integrity: sha512-gOW4ALeH8gkJiUGGXVy/AOd5lAPTX0bzoOW1+sCLcTA7t8dluBW7M2ngNYxTEtlKqyv7aLfrgsYSiqucmmfSLw==} peerDependencies: '@tiptap/core': ^2.0.0 dependencies: @@ -10478,23 +10477,23 @@ packages: resolution: {integrity: sha512-t4WG4w93zTpL2VxhVyJJvl3kdLF001ZrhpOuEiZqEMBMUMbM56Uiigv1CnUQpTFrjDAh3IM8hkqzAh20TYw2iQ==} dependencies: '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) - '@tiptap/extension-blockquote': 2.2.6(@tiptap/core@2.0.3) - '@tiptap/extension-bold': 2.2.6(@tiptap/core@2.0.3) - '@tiptap/extension-bullet-list': 2.2.6(@tiptap/core@2.0.3) - '@tiptap/extension-code': 2.2.6(@tiptap/core@2.0.3) - '@tiptap/extension-code-block': 2.2.6(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-blockquote': 2.3.0(@tiptap/core@2.0.3) + '@tiptap/extension-bold': 2.3.0(@tiptap/core@2.0.3) + '@tiptap/extension-bullet-list': 2.3.0(@tiptap/core@2.0.3) + '@tiptap/extension-code': 2.3.0(@tiptap/core@2.0.3) + '@tiptap/extension-code-block': 2.3.0(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) '@tiptap/extension-document': 2.0.3(@tiptap/core@2.0.3) - '@tiptap/extension-dropcursor': 2.2.6(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) - '@tiptap/extension-gapcursor': 2.2.6(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-dropcursor': 2.3.0(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-gapcursor': 2.3.0(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) '@tiptap/extension-hard-break': 2.0.3(@tiptap/core@2.0.3) - '@tiptap/extension-heading': 2.2.6(@tiptap/core@2.0.3) + '@tiptap/extension-heading': 2.3.0(@tiptap/core@2.0.3) '@tiptap/extension-history': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) - '@tiptap/extension-horizontal-rule': 2.2.6(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) - '@tiptap/extension-italic': 2.2.6(@tiptap/core@2.0.3) - '@tiptap/extension-list-item': 2.2.6(@tiptap/core@2.0.3) - '@tiptap/extension-ordered-list': 2.2.6(@tiptap/core@2.0.3) + '@tiptap/extension-horizontal-rule': 2.3.0(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/extension-italic': 2.3.0(@tiptap/core@2.0.3) + '@tiptap/extension-list-item': 2.3.0(@tiptap/core@2.0.3) + '@tiptap/extension-ordered-list': 2.3.0(@tiptap/core@2.0.3) '@tiptap/extension-paragraph': 2.0.3(@tiptap/core@2.0.3) - '@tiptap/extension-strike': 2.2.6(@tiptap/core@2.0.3) + '@tiptap/extension-strike': 2.3.0(@tiptap/core@2.0.3) '@tiptap/extension-text': 2.0.3(@tiptap/core@2.0.3) transitivePeerDependencies: - '@tiptap/pm' @@ -11572,10 +11571,10 @@ packages: - supports-color dev: false - /@vinxi/devtools@0.1.1(@babel/core@7.24.4)(preact@10.20.1)(vite@4.5.2): + /@vinxi/devtools@0.1.1(@babel/core@7.24.4)(preact@10.20.2)(vite@4.5.2): resolution: {integrity: sha512-/A7X1hoNBsgC2n7nKOWbIa4cTt9dJq9nehyLGdNxgjEcGzbsaJrofUDrFLt+0YJlyb7OOhFEPYHRCat3tsrytw==} dependencies: - '@preact/preset-vite': 2.8.2(@babel/core@7.24.4)(preact@10.20.1)(vite@4.5.2) + '@preact/preset-vite': 2.8.2(@babel/core@7.24.4)(preact@10.20.2)(vite@4.5.2) '@solidjs/router': 0.8.4(solid-js@1.8.16) birpc: 0.2.17 solid-js: 1.8.16 @@ -11604,7 +11603,7 @@ packages: consola: 3.2.3 defu: 6.1.4 get-port-please: 3.1.2 - h3: 1.11.1 + h3: 1.10.1 http-shutdown: 1.2.2 jiti: 1.21.0 mlly: 1.6.1 @@ -11614,8 +11613,6 @@ packages: ufo: 1.5.3 untun: 0.1.3 uqr: 0.1.2 - transitivePeerDependencies: - - uWebSockets.js dev: false /@vinxi/plugin-directives@0.1.3(vinxi@0.1.10): @@ -11632,7 +11629,7 @@ packages: magicast: 0.2.11 recast: 0.23.6 tslib: 2.6.2 - vinxi: 0.1.10(@types/node@20.12.6)(preact@10.20.1) + vinxi: 0.1.10(@types/node@20.12.6)(preact@10.20.2) dev: false /@vinxi/server-components@0.1.3(vinxi@0.1.10): @@ -11647,7 +11644,7 @@ packages: astring: 1.8.6 magicast: 0.2.11 recast: 0.23.6 - vinxi: 0.1.10(@types/node@20.12.6)(preact@10.20.1) + vinxi: 0.1.10(@types/node@20.12.6)(preact@10.20.2) dev: false /@vinxi/server-functions@0.1.4(vinxi@0.1.10): @@ -11662,7 +11659,7 @@ packages: astring: 1.8.6 magicast: 0.2.11 recast: 0.23.6 - vinxi: 0.1.10(@types/node@20.12.6)(preact@10.20.1) + vinxi: 0.1.10(@types/node@20.12.6)(preact@10.20.2) dev: false /@vitejs/plugin-react@4.2.1(vite@4.5.2): @@ -12329,7 +12326,6 @@ packages: /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} - requiresBuild: true dependencies: event-target-shim: 5.0.1 dev: true @@ -12583,7 +12579,6 @@ packages: /archiver-utils@5.0.2: resolution: {integrity: sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==} engines: {node: '>= 14'} - requiresBuild: true dependencies: glob: 10.3.12 graceful-fs: 4.2.11 @@ -12610,7 +12605,6 @@ packages: /archiver@7.0.1: resolution: {integrity: sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==} engines: {node: '>= 14'} - requiresBuild: true dependencies: archiver-utils: 5.0.2 async: 3.2.5 @@ -13118,7 +13112,6 @@ packages: /b4a@1.6.6: resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} - requiresBuild: true /babel-core@7.0.0-bridge.0(@babel/core@7.24.4): resolution: {integrity: sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==} @@ -13597,7 +13590,6 @@ packages: /buffer-crc32@1.0.0: resolution: {integrity: sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==} engines: {node: '>=8.0.0'} - requiresBuild: true dev: true /buffer-equal-constant-time@1.0.1: @@ -13939,7 +13931,6 @@ packages: /chromium-bidi@0.4.16(devtools-protocol@0.0.1147663): resolution: {integrity: sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==} - requiresBuild: true peerDependencies: devtools-protocol: '*' dependencies: @@ -14250,7 +14241,6 @@ packages: /compress-commons@6.0.2: resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} engines: {node: '>= 14'} - requiresBuild: true dependencies: crc-32: 1.2.2 crc32-stream: 6.0.0 @@ -14418,7 +14408,6 @@ packages: /crc32-stream@6.0.0: resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==} engines: {node: '>= 14'} - requiresBuild: true dependencies: crc-32: 1.2.2 readable-stream: 4.5.2 @@ -14466,7 +14455,6 @@ packages: /cross-fetch@4.0.0: resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} - requiresBuild: true dependencies: node-fetch: 2.7.0 transitivePeerDependencies: @@ -14561,7 +14549,6 @@ packages: /css-shorthand-properties@1.1.1: resolution: {integrity: sha512-Md+Juc7M3uOdbAFwOYlTrccIZ7oCFuzrhKYQjdeUEW/sE1hv17Jp/Bws+ReOPpGVBTYCBoYo+G17V5Qo8QQ75A==} - requiresBuild: true dev: true /css-to-react-native@3.2.0: @@ -14581,7 +14568,6 @@ packages: /css-value@0.0.1: resolution: {integrity: sha512-FUV3xaJ63buRLgHrLQVlVgQnQdR4yqdLGaDu7g8CQcWjInDfM9plBTPI9FRfpahju1UBSaMckeb2/46ApS/V1Q==} - requiresBuild: true dev: true /css-what@6.1.0: @@ -15057,12 +15043,10 @@ packages: /devtools-protocol@0.0.1147663: resolution: {integrity: sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==} - requiresBuild: true dev: true /devtools-protocol@0.0.1273771: resolution: {integrity: sha512-QDbb27xcTVReQQW/GHJsdQqGKwYBE7re7gxehj467kKP2DKuYBUj6i2k5LRiAC66J1yZG/9gsxooz/s9pcm0Og==} - requiresBuild: true dev: true /didyoumean@1.2.2: @@ -16575,7 +16559,6 @@ packages: /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} - requiresBuild: true dev: true /eventemitter3@4.0.7: @@ -16790,7 +16773,6 @@ packages: /fast-deep-equal@2.0.1: resolution: {integrity: sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==} - requiresBuild: true dev: true /fast-deep-equal@3.1.3: @@ -16802,7 +16784,6 @@ packages: /fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} - requiresBuild: true /fast-glob@3.2.7: resolution: {integrity: sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==} @@ -19804,7 +19785,6 @@ packages: /lodash.zip@4.2.0: resolution: {integrity: sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==} - requiresBuild: true dev: true /lodash@4.17.21: @@ -21223,7 +21203,6 @@ packages: /mitt@3.0.0: resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} - requiresBuild: true dev: true /mixme@0.5.10: @@ -21520,7 +21499,7 @@ packages: fs-extra: 11.2.0 globby: 14.0.1 gzip-size: 7.0.0 - h3: 1.11.1 + h3: 1.10.1 hookable: 5.5.3 httpxy: 0.1.5 is-primitive: 3.0.1 @@ -22864,11 +22843,11 @@ packages: picocolors: 1.0.0 source-map-js: 1.2.0 - /posthog-js@1.120.2: - resolution: {integrity: sha512-19LehjKgcmOzdj5OOicyzCXdxN4SVMX2IC1FvQR9gozxxxxhh6lCwWoe3y955S2KRLRP/8BjQ3zmMezV1ZCSQQ==} + /posthog-js@1.120.3: + resolution: {integrity: sha512-J5o2aRNIrSCt6/kei+UN9RhTpZDa9bcRkwkauhjrtCz9Ne3yjCP9phfIlP5HJrJBpNGIzK/YlFuy8/57Tw+piQ==} dependencies: fflate: 0.4.8 - preact: 10.20.1 + preact: 10.20.2 dev: false /posthog-node@3.1.3: @@ -22880,8 +22859,8 @@ packages: transitivePeerDependencies: - debug - /preact@10.20.1: - resolution: {integrity: sha512-JIFjgFg9B2qnOoGiYMVBtrcFxHqn+dNXbq76bVmcaHYJFYR4lW67AOcXgAYQQTDYXDOg/kTZrKPNCdRgJ2UJmw==} + /preact@10.20.2: + resolution: {integrity: sha512-S1d1ernz3KQ+Y2awUxKakpfOg2CEmJmwOP+6igPx6dgr6pgDvenqYviyokWso2rhHvGtTlWWnJDa7RaPbQerTg==} dev: false /prebuild-install@7.1.2: @@ -23190,7 +23169,6 @@ packages: /proxy-agent@6.3.0: resolution: {integrity: sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==} engines: {node: '>= 14'} - requiresBuild: true dependencies: agent-base: 7.1.1 debug: 4.3.4(supports-color@8.1.1) @@ -23297,7 +23275,6 @@ packages: /puppeteer-core@20.9.0(typescript@5.3.2): resolution: {integrity: sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==} engines: {node: '>=16.3.0'} - requiresBuild: true peerDependencies: typescript: '>= 4.7.4' peerDependenciesMeta: @@ -23345,7 +23322,6 @@ packages: /query-selector-shadow-dom@1.0.1: resolution: {integrity: sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==} - requiresBuild: true dev: true /query-string@5.1.1: @@ -23369,7 +23345,6 @@ packages: /queue-tick@1.0.1: resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} - requiresBuild: true /quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} @@ -24075,7 +24050,6 @@ packages: /resq@1.11.0: resolution: {integrity: sha512-G10EBz+zAAy3zUd/CDoBbXRL6ia9kOo3xRHrMDsHljI0GDkhYlyjwoCx5+3eCC4swi1uCoZQhskuJkj7Gp57Bw==} - requiresBuild: true dependencies: fast-deep-equal: 2.0.1 dev: true @@ -24146,7 +24120,6 @@ packages: /rgb2hex@0.2.5: resolution: {integrity: sha512-22MOP1Rh7sAo1BZpDG6R5RFYzR2lYEgwq7HEmyW2qcsOqR2lQKmn+O//xV3YG/0rrhMC6KVX2hU+ZXuaw9a5bw==} - requiresBuild: true dev: true /rimraf@2.6.3: @@ -24473,7 +24446,6 @@ packages: /serialize-error@11.0.3: resolution: {integrity: sha512-2G2y++21dhj2R7iHAdd0FIzjGwuKZld+7Pl/bTU6YIkrC2ZMbVUjm+luj6A6V34Rv9XfKJDKpTWu9W4Gse1D9g==} engines: {node: '>=14.16'} - requiresBuild: true dependencies: type-fest: 2.19.0 dev: true @@ -25119,7 +25091,6 @@ packages: /streamx@2.16.1: resolution: {integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==} - requiresBuild: true dependencies: fast-fifo: 1.3.2 queue-tick: 1.0.1 @@ -27363,7 +27334,7 @@ packages: source-map-support: 0.5.21 vite: 4.5.2(@types/node@20.5.9) - /vinxi@0.1.10(@types/node@20.12.6)(preact@10.20.1): + /vinxi@0.1.10(@types/node@20.12.6)(preact@10.20.2): resolution: {integrity: sha512-MndPaR3fUx6FERfB2adWVkTw7qTAhSStM+A2KaqU2qUGMEk51krkKB28ouf+iG6IJGoAtuE+fANUs0hqOLMk2A==} hasBin: true dependencies: @@ -27373,7 +27344,7 @@ packages: '@types/micromatch': 4.0.6 '@types/serve-static': 1.15.7 '@types/ws': 8.5.10 - '@vinxi/devtools': 0.1.1(@babel/core@7.24.4)(preact@10.20.1)(vite@4.5.2) + '@vinxi/devtools': 0.1.1(@babel/core@7.24.4)(preact@10.20.2)(vite@4.5.2) '@vinxi/listhen': 1.5.6 boxen: 7.1.1 c12: 1.10.0 @@ -28454,7 +28425,6 @@ packages: /ws@8.13.0: resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} engines: {node: '>=10.0.0'} - requiresBuild: true peerDependencies: bufferutil: ^4.0.1 utf-8-validate: '>=5.0.2' @@ -28594,7 +28564,6 @@ packages: /yargs@17.7.1: resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==} engines: {node: '>=12'} - requiresBuild: true dependencies: cliui: 8.0.1 escalade: 3.1.2 @@ -28671,7 +28640,6 @@ packages: /zip-stream@6.0.1: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} - requiresBuild: true dependencies: archiver-utils: 5.0.2 compress-commons: 6.0.2 @@ -28687,7 +28655,7 @@ packages: file:..: resolution: {directory: .., type: directory} - name: monorepo + name: git dev: true file:inlang/source-code/cli: From 2da1fa342d851a9bb8d3a56e7d033775dda9d5d1 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Tue, 9 Apr 2024 18:10:06 +0200 Subject: [PATCH 24/29] update styling and updating --- .../ide-extension/assets/settings-view.css | 21 +++++++++++++++++++ .../ide-extension/src/configuration.ts | 1 + .../src/utilities/messages/messages.ts | 7 +++++++ .../src/utilities/settings/settingsView.ts | 2 ++ 4 files changed, 31 insertions(+) diff --git a/inlang/source-code/ide-extension/assets/settings-view.css b/inlang/source-code/ide-extension/assets/settings-view.css index 3143352a8f..170da5df77 100644 --- a/inlang/source-code/ide-extension/assets/settings-view.css +++ b/inlang/source-code/ide-extension/assets/settings-view.css @@ -27,8 +27,12 @@ main > h1 { } inlang-settings { + /* Primary */ + --inlang-color-primary: var(--vscode-button-background); + --inlang-color-neutral: var(--vscode-foreground); /* Input */ --sl-input-background-color: var(--vscode-input-background); + --sl-input-background-color-disabled: var(--vscode-input-background); --sl-input-border-color: var(--vscode-input-border); --sl-input-border-color-hover: var(--vscode-input-activeBorder); --sl-input-border-color-focus: var(--vscode-input-activeBorder); @@ -85,3 +89,20 @@ inlang-settings::part(property-paragraph) { font-size: 14px; color: var(--vscode-descriptionForeground); } + +inlang-settings::part(option) { + color: var(--vscode-input-foreground); + font-size: 14px; + padding: 8px 12px; +} + + +inlang-settings::part(float) { + background-color: var(--vscode-sideBar-background); + color: var(--vscode-sideBar-foreground); + border: 1px solid var(--vscode-sideBar-border); +} +inlang-settings::part(cancel) { + background-color: var(--vscode-foreground); + color: #fff; +} diff --git a/inlang/source-code/ide-extension/src/configuration.ts b/inlang/source-code/ide-extension/src/configuration.ts index 96bac31ec7..52020fa0d8 100644 --- a/inlang/source-code/ide-extension/src/configuration.ts +++ b/inlang/source-code/ide-extension/src/configuration.ts @@ -19,6 +19,7 @@ export const CONFIGURATION = { ON_DID_PROJECT_TREE_VIEW_CHANGE: new EventEmitter(), ON_DID_ERROR_TREE_VIEW_CHANGE: new EventEmitter(), ON_DID_PREVIEW_LANGUAGE_TAG_CHANGE: new EventEmitter(), + ON_DID_SETTINGS_VIEW_CHANGE: new EventEmitter(), }, COMMANDS: { EDIT_MESSAGE: editMessageCommand, diff --git a/inlang/source-code/ide-extension/src/utilities/messages/messages.ts b/inlang/source-code/ide-extension/src/utilities/messages/messages.ts index bc04875075..a83f3f3d7e 100644 --- a/inlang/source-code/ide-extension/src/utilities/messages/messages.ts +++ b/inlang/source-code/ide-extension/src/utilities/messages/messages.ts @@ -103,6 +103,13 @@ export function createMessageWebviewProvider(args: { }) ) + // when settings view changes, update webview + args.context.subscriptions.push( + CONFIGURATION.EVENTS.ON_DID_SETTINGS_VIEW_CHANGE.event(() => { + updateMessages() + }) + ) + const updateWebviewContent = async () => { const activeEditor = vscode.window.activeTextEditor const fileContent = activeEditor ? activeEditor.document.getText() : "" diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index a5f9e17679..d6dc9aba6e 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -1,5 +1,6 @@ import * as vscode from "vscode" import { state } from "../state.js" +import { CONFIGURATION } from "../../configuration.js" export async function settingsPanel(args: { context: vscode.ExtensionContext }) { const panel = vscode.window.createWebviewPanel( @@ -21,6 +22,7 @@ export async function settingsPanel(args: { context: vscode.ExtensionContext }) switch (message.command) { case "setSettings": state().project.setSettings(message.settings) + CONFIGURATION.EVENTS.ON_DID_SETTINGS_VIEW_CHANGE.fire() break } }) From ec67223e986ff025c4616f18e3f531e074b2d432 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Wed, 10 Apr 2024 11:17:58 +0200 Subject: [PATCH 25/29] update lock --- pnpm-lock.yaml | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0125029dbc..492437df99 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7742,6 +7742,7 @@ packages: resolution: {integrity: sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==} engines: {node: '>=16.3.0'} hasBin: true + requiresBuild: true peerDependencies: typescript: '>= 4.7.4' peerDependenciesMeta: @@ -11603,7 +11604,7 @@ packages: consola: 3.2.3 defu: 6.1.4 get-port-please: 3.1.2 - h3: 1.10.1 + h3: 1.11.1 http-shutdown: 1.2.2 jiti: 1.21.0 mlly: 1.6.1 @@ -11613,6 +11614,8 @@ packages: ufo: 1.5.3 untun: 0.1.3 uqr: 0.1.2 + transitivePeerDependencies: + - uWebSockets.js dev: false /@vinxi/plugin-directives@0.1.3(vinxi@0.1.10): @@ -12326,6 +12329,7 @@ packages: /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} + requiresBuild: true dependencies: event-target-shim: 5.0.1 dev: true @@ -12579,6 +12583,7 @@ packages: /archiver-utils@5.0.2: resolution: {integrity: sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==} engines: {node: '>= 14'} + requiresBuild: true dependencies: glob: 10.3.12 graceful-fs: 4.2.11 @@ -12605,6 +12610,7 @@ packages: /archiver@7.0.1: resolution: {integrity: sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==} engines: {node: '>= 14'} + requiresBuild: true dependencies: archiver-utils: 5.0.2 async: 3.2.5 @@ -13112,6 +13118,7 @@ packages: /b4a@1.6.6: resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} + requiresBuild: true /babel-core@7.0.0-bridge.0(@babel/core@7.24.4): resolution: {integrity: sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==} @@ -13590,6 +13597,7 @@ packages: /buffer-crc32@1.0.0: resolution: {integrity: sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==} engines: {node: '>=8.0.0'} + requiresBuild: true dev: true /buffer-equal-constant-time@1.0.1: @@ -13931,6 +13939,7 @@ packages: /chromium-bidi@0.4.16(devtools-protocol@0.0.1147663): resolution: {integrity: sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==} + requiresBuild: true peerDependencies: devtools-protocol: '*' dependencies: @@ -14241,6 +14250,7 @@ packages: /compress-commons@6.0.2: resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} engines: {node: '>= 14'} + requiresBuild: true dependencies: crc-32: 1.2.2 crc32-stream: 6.0.0 @@ -14408,6 +14418,7 @@ packages: /crc32-stream@6.0.0: resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==} engines: {node: '>= 14'} + requiresBuild: true dependencies: crc-32: 1.2.2 readable-stream: 4.5.2 @@ -14455,6 +14466,7 @@ packages: /cross-fetch@4.0.0: resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} + requiresBuild: true dependencies: node-fetch: 2.7.0 transitivePeerDependencies: @@ -14549,6 +14561,7 @@ packages: /css-shorthand-properties@1.1.1: resolution: {integrity: sha512-Md+Juc7M3uOdbAFwOYlTrccIZ7oCFuzrhKYQjdeUEW/sE1hv17Jp/Bws+ReOPpGVBTYCBoYo+G17V5Qo8QQ75A==} + requiresBuild: true dev: true /css-to-react-native@3.2.0: @@ -14568,6 +14581,7 @@ packages: /css-value@0.0.1: resolution: {integrity: sha512-FUV3xaJ63buRLgHrLQVlVgQnQdR4yqdLGaDu7g8CQcWjInDfM9plBTPI9FRfpahju1UBSaMckeb2/46ApS/V1Q==} + requiresBuild: true dev: true /css-what@6.1.0: @@ -15043,10 +15057,12 @@ packages: /devtools-protocol@0.0.1147663: resolution: {integrity: sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==} + requiresBuild: true dev: true /devtools-protocol@0.0.1273771: resolution: {integrity: sha512-QDbb27xcTVReQQW/GHJsdQqGKwYBE7re7gxehj467kKP2DKuYBUj6i2k5LRiAC66J1yZG/9gsxooz/s9pcm0Og==} + requiresBuild: true dev: true /didyoumean@1.2.2: @@ -16559,6 +16575,7 @@ packages: /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} + requiresBuild: true dev: true /eventemitter3@4.0.7: @@ -16773,6 +16790,7 @@ packages: /fast-deep-equal@2.0.1: resolution: {integrity: sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==} + requiresBuild: true dev: true /fast-deep-equal@3.1.3: @@ -16784,6 +16802,7 @@ packages: /fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} + requiresBuild: true /fast-glob@3.2.7: resolution: {integrity: sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==} @@ -19785,6 +19804,7 @@ packages: /lodash.zip@4.2.0: resolution: {integrity: sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==} + requiresBuild: true dev: true /lodash@4.17.21: @@ -21203,6 +21223,7 @@ packages: /mitt@3.0.0: resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} + requiresBuild: true dev: true /mixme@0.5.10: @@ -21499,7 +21520,7 @@ packages: fs-extra: 11.2.0 globby: 14.0.1 gzip-size: 7.0.0 - h3: 1.10.1 + h3: 1.11.1 hookable: 5.5.3 httpxy: 0.1.5 is-primitive: 3.0.1 @@ -23169,6 +23190,7 @@ packages: /proxy-agent@6.3.0: resolution: {integrity: sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==} engines: {node: '>= 14'} + requiresBuild: true dependencies: agent-base: 7.1.1 debug: 4.3.4(supports-color@8.1.1) @@ -23275,6 +23297,7 @@ packages: /puppeteer-core@20.9.0(typescript@5.3.2): resolution: {integrity: sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==} engines: {node: '>=16.3.0'} + requiresBuild: true peerDependencies: typescript: '>= 4.7.4' peerDependenciesMeta: @@ -23322,6 +23345,7 @@ packages: /query-selector-shadow-dom@1.0.1: resolution: {integrity: sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==} + requiresBuild: true dev: true /query-string@5.1.1: @@ -23345,6 +23369,7 @@ packages: /queue-tick@1.0.1: resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} + requiresBuild: true /quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} @@ -24050,6 +24075,7 @@ packages: /resq@1.11.0: resolution: {integrity: sha512-G10EBz+zAAy3zUd/CDoBbXRL6ia9kOo3xRHrMDsHljI0GDkhYlyjwoCx5+3eCC4swi1uCoZQhskuJkj7Gp57Bw==} + requiresBuild: true dependencies: fast-deep-equal: 2.0.1 dev: true @@ -24120,6 +24146,7 @@ packages: /rgb2hex@0.2.5: resolution: {integrity: sha512-22MOP1Rh7sAo1BZpDG6R5RFYzR2lYEgwq7HEmyW2qcsOqR2lQKmn+O//xV3YG/0rrhMC6KVX2hU+ZXuaw9a5bw==} + requiresBuild: true dev: true /rimraf@2.6.3: @@ -24446,6 +24473,7 @@ packages: /serialize-error@11.0.3: resolution: {integrity: sha512-2G2y++21dhj2R7iHAdd0FIzjGwuKZld+7Pl/bTU6YIkrC2ZMbVUjm+luj6A6V34Rv9XfKJDKpTWu9W4Gse1D9g==} engines: {node: '>=14.16'} + requiresBuild: true dependencies: type-fest: 2.19.0 dev: true @@ -25091,6 +25119,7 @@ packages: /streamx@2.16.1: resolution: {integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==} + requiresBuild: true dependencies: fast-fifo: 1.3.2 queue-tick: 1.0.1 @@ -28425,6 +28454,7 @@ packages: /ws@8.13.0: resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} engines: {node: '>=10.0.0'} + requiresBuild: true peerDependencies: bufferutil: ^4.0.1 utf-8-validate: '>=5.0.2' @@ -28564,6 +28594,7 @@ packages: /yargs@17.7.1: resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==} engines: {node: '>=12'} + requiresBuild: true dependencies: cliui: 8.0.1 escalade: 3.1.2 @@ -28640,6 +28671,7 @@ packages: /zip-stream@6.0.1: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} + requiresBuild: true dependencies: archiver-utils: 5.0.2 compress-commons: 6.0.2 From e4acce0b02d3ebada31226fa55b0211e715056b7 Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Wed, 10 Apr 2024 12:36:11 +0200 Subject: [PATCH 26/29] updating styling & lock --- .../ide-extension/assets/settings-view.css | 12 +- pnpm-lock.yaml | 166 ++++++------------ 2 files changed, 64 insertions(+), 114 deletions(-) diff --git a/inlang/source-code/ide-extension/assets/settings-view.css b/inlang/source-code/ide-extension/assets/settings-view.css index 170da5df77..511b9554a7 100644 --- a/inlang/source-code/ide-extension/assets/settings-view.css +++ b/inlang/source-code/ide-extension/assets/settings-view.css @@ -92,10 +92,18 @@ inlang-settings::part(property-paragraph) { inlang-settings::part(option) { color: var(--vscode-input-foreground); + /* FIXME after */ + background-color: var(--vscode-input-background) !important; font-size: 14px; padding: 8px 12px; } +inlang-settings::part(button) { + color: var(--vscode-button-secondaryForeground); + background-color: var(--vscode-button-secondaryBackground); + border-color: var(--vscode-button-secondaryBackground); +} + inlang-settings::part(float) { background-color: var(--vscode-sideBar-background); @@ -103,6 +111,6 @@ inlang-settings::part(float) { border: 1px solid var(--vscode-sideBar-border); } inlang-settings::part(cancel) { - background-color: var(--vscode-foreground); - color: #fff; + background-color: var(--vscode-button-secondaryBackground); + color: var(--vscode-button-secondaryForeground); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f07e284015..c5b04adc8d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1366,7 +1366,7 @@ importers: version: 3.0.4 '@astrojs/svelte': specifier: ^5.0.3 - version: 5.3.0(astro@4.0.8)(svelte@4.2.12)(typescript@5.3.3)(vite@5.2.8) + version: 5.3.0(astro@4.0.8)(svelte@4.2.12)(typescript@5.3.3)(vite@4.5.2) astro: specifier: 4.0.8 version: 4.0.8(typescript@5.3.3) @@ -3222,7 +3222,7 @@ packages: zod: 3.22.4 dev: false - /@astrojs/svelte@5.3.0(astro@4.0.8)(svelte@4.2.12)(typescript@5.3.3)(vite@5.2.8): + /@astrojs/svelte@5.3.0(astro@4.0.8)(svelte@4.2.12)(typescript@5.3.3)(vite@4.5.2): resolution: {integrity: sha512-7jKT6uQo6V4XNS4DmlZTlliO4qn9dOTsbRB3PyIzAnbTNqJnDBPY6Hj0X5uhELXSmKkn/o+ncJ46kLtFLqEq8w==} engines: {node: '>=18.14.1'} peerDependencies: @@ -3230,7 +3230,7 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.90 typescript: ^5.3.3 dependencies: - '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.2.8) + '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@4.5.2) astro: 4.0.8(typescript@5.3.3) svelte: 4.2.12 svelte2tsx: 0.6.27(svelte@4.2.12)(typescript@5.3.3) @@ -5020,6 +5020,7 @@ packages: cpu: [ppc64] os: [aix] requiresBuild: true + dev: true optional: true /@esbuild/android-arm64@0.17.19: @@ -5053,6 +5054,7 @@ packages: cpu: [arm64] os: [android] requiresBuild: true + dev: true optional: true /@esbuild/android-arm@0.17.19: @@ -5086,6 +5088,7 @@ packages: cpu: [arm] os: [android] requiresBuild: true + dev: true optional: true /@esbuild/android-x64@0.17.19: @@ -5119,6 +5122,7 @@ packages: cpu: [x64] os: [android] requiresBuild: true + dev: true optional: true /@esbuild/darwin-arm64@0.17.19: @@ -5152,6 +5156,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /@esbuild/darwin-x64@0.17.19: @@ -5185,6 +5190,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /@esbuild/freebsd-arm64@0.17.19: @@ -5218,6 +5224,7 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true + dev: true optional: true /@esbuild/freebsd-x64@0.17.19: @@ -5251,6 +5258,7 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true + dev: true optional: true /@esbuild/linux-arm64@0.17.19: @@ -5284,6 +5292,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-arm@0.17.19: @@ -5317,6 +5326,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-ia32@0.17.19: @@ -5350,6 +5360,7 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-loong64@0.17.19: @@ -5383,6 +5394,7 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-mips64el@0.17.19: @@ -5416,6 +5428,7 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-ppc64@0.17.19: @@ -5449,6 +5462,7 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-riscv64@0.17.19: @@ -5482,6 +5496,7 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-s390x@0.17.19: @@ -5515,6 +5530,7 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-x64@0.17.19: @@ -5548,6 +5564,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/netbsd-x64@0.17.19: @@ -5581,6 +5598,7 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true + dev: true optional: true /@esbuild/openbsd-x64@0.17.19: @@ -5614,6 +5632,7 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true + dev: true optional: true /@esbuild/sunos-x64@0.17.19: @@ -5647,6 +5666,7 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true + dev: true optional: true /@esbuild/win32-arm64@0.17.19: @@ -5680,6 +5700,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true /@esbuild/win32-ia32@0.17.19: @@ -5713,6 +5734,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true /@esbuild/win32-x64@0.17.19: @@ -5746,6 +5768,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /@eslint-community/eslint-utils@4.4.0(eslint@8.41.0): @@ -7664,7 +7687,7 @@ packages: resolution: {integrity: sha512-m3tl+M8IO8jgiHnk+7LSTFl8axdPXloewi7iGVLdmCwf34XOzEUur0bZVewW4DUbUipFjTS2CXu27+5f/oexBA==} peerDependencies: '@babel/core': 7.x - vite: 2.x || 3.x || 4.x || 5.x + vite: 4.5.2 dependencies: '@babel/core': 7.24.4 '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.24.4) @@ -7705,7 +7728,7 @@ packages: resolution: {integrity: sha512-iForDVJ2M8gQYnm5pHumvTEJjGGc7YNYC0GVKnHFL+GvFfKHfH9Rpq67nUAzNbjuLEpqEOUuQVQajMazWu2ZNQ==} peerDependencies: preact: ^10.4.0 - vite: '>=2.0.0' + vite: 4.5.2 dependencies: '@babel/core': 7.24.4 '@prefresh/babel-plugin': 0.5.1 @@ -9456,7 +9479,7 @@ packages: peerDependencies: '@preact/preset-vite': '*' typescript: '>= 4.3.x' - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: 4.5.2 vite-plugin-glimmerx: '*' peerDependenciesMeta: '@preact/preset-vite': @@ -9965,7 +9988,7 @@ packages: requiresBuild: true peerDependencies: svelte: ^3.54.0 || ^4.0.0-next.0 || ^5.0.0-next.0 - vite: ^4.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte': 2.5.3(svelte@3.59.2)(vite@4.5.2) '@types/cookie': 0.5.4 @@ -9994,7 +10017,7 @@ packages: peerDependencies: '@sveltejs/vite-plugin-svelte': ^3.0.0 svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.3 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@4.5.2) '@types/cookie': 0.6.0 @@ -10035,7 +10058,7 @@ packages: peerDependencies: '@sveltejs/vite-plugin-svelte': ^2.2.0 svelte: ^3.54.0 || ^4.0.0 - vite: ^4.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte': 2.4.2(svelte@4.0.5)(vite@4.5.2) debug: 4.3.4(supports-color@8.1.1) @@ -10051,7 +10074,7 @@ packages: peerDependencies: '@sveltejs/vite-plugin-svelte': ^2.2.0 svelte: ^3.54.0 || ^4.0.0 - vite: ^4.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte': 2.5.3(svelte@3.59.2)(vite@4.5.2) debug: 4.3.4(supports-color@8.1.1) @@ -10067,7 +10090,7 @@ packages: peerDependencies: '@sveltejs/vite-plugin-svelte': ^3.0.0 svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@4.5.2) debug: 4.3.4(supports-color@8.1.1) @@ -10076,28 +10099,12 @@ packages: transitivePeerDependencies: - supports-color - /@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.2.8): - resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==} - engines: {node: ^18.0.0 || >=20} - peerDependencies: - '@sveltejs/vite-plugin-svelte': ^3.0.0 - svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.0 - dependencies: - '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.2.8) - debug: 4.3.4(supports-color@8.1.1) - svelte: 4.2.12 - vite: 5.2.8 - transitivePeerDependencies: - - supports-color - dev: false - /@sveltejs/vite-plugin-svelte@2.4.2(svelte@4.0.5)(vite@4.5.2): resolution: {integrity: sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==} engines: {node: ^14.18.0 || >= 16} peerDependencies: svelte: ^3.54.0 || ^4.0.0 - vite: ^4.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.0.5)(vite@4.5.2) debug: 4.3.4(supports-color@8.1.1) @@ -10117,7 +10124,7 @@ packages: engines: {node: ^14.18.0 || >= 16} peerDependencies: svelte: ^3.54.0 || ^4.0.0 || ^5.0.0-next.0 - vite: ^4.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.5.3)(svelte@3.59.2)(vite@4.5.2) debug: 4.3.4(supports-color@8.1.1) @@ -10137,7 +10144,7 @@ packages: engines: {node: ^18.0.0 || >=20} peerDependencies: svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.0 + vite: 4.5.2 dependencies: '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@4.5.2) debug: 4.3.4(supports-color@8.1.1) @@ -10151,26 +10158,6 @@ packages: transitivePeerDependencies: - supports-color - /@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.8): - resolution: {integrity: sha512-MpmF/cju2HqUls50WyTHQBZUV3ovV/Uk8k66AN2gwHogNAG8wnW8xtZDhzNBsFJJuvmq1qnzA5kE7YfMJNFv2Q==} - engines: {node: ^18.0.0 || >=20} - peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.0 - dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.2.8) - debug: 4.3.4(supports-color@8.1.1) - deepmerge: 4.3.1 - kleur: 4.1.5 - magic-string: 0.30.9 - svelte: 4.2.12 - svelte-hmr: 0.15.3(svelte@4.2.12) - vite: 5.2.8 - vitefu: 0.2.5(vite@5.2.8) - transitivePeerDependencies: - - supports-color - dev: false - /@swc/counter@0.1.3: resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} dev: false @@ -11689,7 +11676,7 @@ packages: resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - vite: ^4.2.0 || ^5.0.0 + vite: 4.5.2 dependencies: '@babel/core': 7.24.4 '@babel/plugin-transform-react-jsx-self': 7.24.1(@babel/core@7.24.4) @@ -11704,7 +11691,7 @@ packages: /@vitest/coverage-v8@0.34.6(vitest@0.34.6): resolution: {integrity: sha512-fivy/OK2d/EsJFoEoxHFEnNGTg+MmdZBAVK9Ka4qhXR2K3J0DS08vcGVwzDtXSuUMabLv4KtPcpSKkcMXFDViw==} peerDependencies: - vitest: '>=0.32.0 <1' + vitest: 0.34.6 dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -15697,6 +15684,7 @@ packages: '@esbuild/win32-arm64': 0.20.2 '@esbuild/win32-ia32': 0.20.2 '@esbuild/win32-x64': 0.20.2 + dev: true /escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} @@ -27350,7 +27338,7 @@ packages: peerDependencies: solid-js: ^1.8.7 vike: ^0.4.163 - vite: ^4.4 || ^5.0.2 + vite: 4.5.2 dependencies: solid-js: 1.7.11 vike: 0.4.156(vite@4.5.2) @@ -27367,7 +27355,7 @@ packages: hasBin: true peerDependencies: react-streaming: '>=0.3.5' - vite: '>=3.1.0' + vite: 4.5.2 peerDependenciesMeta: react-streaming: optional: true @@ -27393,7 +27381,7 @@ packages: hasBin: true peerDependencies: react-streaming: '>=0.3.5' - vite: '>=3.1.0' + vite: 4.5.2 peerDependenciesMeta: react-streaming: optional: true @@ -27520,7 +27508,7 @@ packages: engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: typescript: '*' - vite: '*' + vite: 4.5.2 peerDependenciesMeta: vite: optional: true @@ -27545,7 +27533,7 @@ packages: engines: {node: '>=14'} peerDependencies: '@nuxt/kit': '*' - vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 + vite: 4.5.2 peerDependenciesMeta: '@nuxt/kit': optional: true @@ -27567,7 +27555,7 @@ packages: /vite-plugin-node-polyfills@0.16.0(vite@4.5.2): resolution: {integrity: sha512-uj1ymOmk7TliMxiivmXokpMY5gVMBpFPSZPLQSCv/LjkJGGKwyLjpbFL64dbYZEdFSUQ3tM7pbrxNh25yvhqOA==} peerDependencies: - vite: ^2.0.0 || ^3.0.0 || ^4.0.0 + vite: 4.5.2 dependencies: '@rollup/plugin-inject': 5.0.5(rollup@4.14.1) buffer-polyfill: /buffer@6.0.3 @@ -27581,7 +27569,7 @@ packages: /vite-plugin-node-polyfills@0.17.0(vite@4.5.2): resolution: {integrity: sha512-iPmPn7376e5u6QvoTSJa16hf5Q0DFwHFXJk2uYpsNlmI3JdPms7hWyh55o+OysJ5jo9J5XPhLC9sMOYifwFd1w==} peerDependencies: - vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: 4.5.2 dependencies: '@rollup/plugin-inject': 5.0.5(rollup@4.14.1) buffer-polyfill: /buffer@6.0.3 @@ -27597,7 +27585,7 @@ packages: peerDependencies: '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* solid-js: ^1.7.2 - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: 4.5.2 peerDependenciesMeta: '@testing-library/jest-dom': optional: true @@ -27619,7 +27607,7 @@ packages: peerDependencies: '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* solid-js: ^1.7.2 - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: 4.5.2 peerDependenciesMeta: '@testing-library/jest-dom': optional: true @@ -27640,7 +27628,7 @@ packages: resolution: {integrity: sha512-avp/Jl5zOp/Itfo67xtDB2O61U7idviaIp4mLsjhCa13PjKNasz+IID0jYTyqUp9SFx6/PmBr6v4KgDppqompg==} peerDependencies: solid-js: ^1.7.2 - vite: ^3.0.0 || ^4.0.0 + vite: 4.5.2 dependencies: '@babel/core': 7.24.4 '@babel/preset-typescript': 7.24.1(@babel/core@7.24.4) @@ -27659,7 +27647,7 @@ packages: resolution: {integrity: sha512-avp/Jl5zOp/Itfo67xtDB2O61U7idviaIp4mLsjhCa13PjKNasz+IID0jYTyqUp9SFx6/PmBr6v4KgDppqompg==} peerDependencies: solid-js: ^1.7.2 - vite: ^3.0.0 || ^4.0.0 + vite: 4.5.2 dependencies: '@babel/core': 7.24.4 '@babel/preset-typescript': 7.24.1(@babel/core@7.24.4) @@ -27683,7 +27671,7 @@ packages: /vite-tsconfig-paths@4.3.2(typescript@5.2.2)(vite@4.5.2): resolution: {integrity: sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==} peerDependencies: - vite: '*' + vite: 4.5.2 peerDependenciesMeta: vite: optional: true @@ -27802,62 +27790,16 @@ packages: optionalDependencies: fsevents: 2.3.3 - /vite@5.2.8: - resolution: {integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - esbuild: 0.20.2 - postcss: 8.4.38 - rollup: 4.14.1 - optionalDependencies: - fsevents: 2.3.3 - dev: false - /vitefu@0.2.5(vite@4.5.2): resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: 4.5.2 peerDependenciesMeta: vite: optional: true dependencies: vite: 4.5.2(@types/node@20.5.9) - /vitefu@0.2.5(vite@5.2.8): - resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} - peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - peerDependenciesMeta: - vite: - optional: true - dependencies: - vite: 5.2.8 - dev: false - /vitest@0.34.6(jsdom@22.1.0): resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} engines: {node: '>=v14.18.0'} @@ -28782,7 +28724,7 @@ packages: file:..: resolution: {directory: .., type: directory} - name: code + name: git dev: true file:inlang/source-code/cli: From 26fb39d645655114223104990fd3ec800294212c Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Wed, 10 Apr 2024 13:41:36 +0200 Subject: [PATCH 27/29] update styling --- inlang/source-code/ide-extension/assets/settings-view.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inlang/source-code/ide-extension/assets/settings-view.css b/inlang/source-code/ide-extension/assets/settings-view.css index 511b9554a7..cb08cb0ac0 100644 --- a/inlang/source-code/ide-extension/assets/settings-view.css +++ b/inlang/source-code/ide-extension/assets/settings-view.css @@ -90,9 +90,14 @@ inlang-settings::part(property-paragraph) { color: var(--vscode-descriptionForeground); } +inlang-settings::part(option-wrapper) { + /* FIXME after https://github.com/shoelace-style/shoelace/issues/1968 */ + background-color: var(--vscode-input-background) !important; +} + inlang-settings::part(option) { color: var(--vscode-input-foreground); - /* FIXME after */ + /* FIXME after https://github.com/shoelace-style/shoelace/issues/1968 */ background-color: var(--vscode-input-background) !important; font-size: 14px; padding: 8px 12px; @@ -104,7 +109,6 @@ inlang-settings::part(button) { border-color: var(--vscode-button-secondaryBackground); } - inlang-settings::part(float) { background-color: var(--vscode-sideBar-background); color: var(--vscode-sideBar-foreground); From b123c3dc441b1fcb9a50ebe17a177e5f0ceb0c8d Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Wed, 10 Apr 2024 15:13:44 +0200 Subject: [PATCH 28/29] update test --- .../ide-extension/src/utilities/settings/settingsView.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts index 7935c4d7ba..cc12ecd66d 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts @@ -19,6 +19,10 @@ vi.mock("vscode", () => ({ ViewColumn: { One: 1, }, + EventEmitter: vi.fn(), + commands: { + executeCommand: vi.fn(), + }, })) vi.mock("../state.js", () => ({ From e58678b483906fc783a0e95ca5b1dc50b20b119d Mon Sep 17 00:00:00 2001 From: Felix Haeberle Date: Thu, 11 Apr 2024 14:56:10 +0200 Subject: [PATCH 29/29] update project view --- .../ide-extension/src/utilities/settings/settingsView.test.ts | 3 ++- .../ide-extension/src/utilities/settings/settingsView.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts index cc12ecd66d..3ea9aca9c5 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts @@ -27,6 +27,7 @@ vi.mock("vscode", () => ({ vi.mock("../state.js", () => ({ state: () => ({ + selectedProjectPath: "Users/username/happy-elephant.inlang", project: { settings: vi.fn().mockReturnValue({}), installed: { @@ -43,7 +44,7 @@ describe("settingsPanel", () => { await settingsPanel({ context: mockContext }) expect(vscode.window.createWebviewPanel).toHaveBeenCalledWith( "settingsPanel", - "Settings", + "happy-elephant.inlang", vscode.ViewColumn.One, expect.objectContaining({ enableScripts: true, diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts index d6dc9aba6e..abe22a8606 100644 --- a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -5,7 +5,7 @@ import { CONFIGURATION } from "../../configuration.js" export async function settingsPanel(args: { context: vscode.ExtensionContext }) { const panel = vscode.window.createWebviewPanel( "settingsPanel", - "Settings", + state().selectedProjectPath.split("/").pop() ?? "Settings", vscode.ViewColumn.One, { enableScripts: true, @@ -67,7 +67,7 @@ export function getWebviewContent(args: {
-

Settings

+

Project settings