diff --git a/.github/workflows/main-docker-alpine.yml b/.github/workflows/main-docker-alpine.yml index 3f9e24eea..cbf195c86 100644 --- a/.github/workflows/main-docker-alpine.yml +++ b/.github/workflows/main-docker-alpine.yml @@ -1,14 +1,4 @@ on: - push: - branches: - - "develop" - - "feature/update**" - - "feature/server_esm**" - paths-ignore: - - "docs/**" - - "bin/**" - tags: - - "v*" workflow_dispatch: env: diff --git a/.github/workflows/main-docker.yml b/.github/workflows/main-docker.yml index 52421b969..70a3592b1 100644 --- a/.github/workflows/main-docker.yml +++ b/.github/workflows/main-docker.yml @@ -16,7 +16,7 @@ env: DOCKERHUB_REGISTRY: docker.io IMAGE_NAME: ${{ github.repository }} TEST_TAG: triliumnext/notes:test - PLATFORMS: linux/arm64,linux/arm/v7 + PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7 jobs: test_docker: diff --git a/.vscode/i18n-ally-custom-framework.yml b/.vscode/i18n-ally-custom-framework.yml index 539a82b45..32ec786aa 100644 --- a/.vscode/i18n-ally-custom-framework.yml +++ b/.vscode/i18n-ally-custom-framework.yml @@ -3,6 +3,7 @@ languageIds: - javascript - typescript + - html # An array of RegExes to find the key usage. **The key should be captured in the first match group**. # You should unescape RegEx strings in order to fit in the YAML file @@ -25,6 +26,7 @@ scopeRangeRegex: "useTranslation\\(\\s*\\[?\\s*['\"`](.*?)['\"`]" refactorTemplates: - t("$1") - ${t("$1")} + - <%= t("$1") %> # If set to true, only enables this custom framework (will disable all built-in frameworks) diff --git a/.vscode/settings.json b/.vscode/settings.json index a2203a03b..805d4b906 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,8 @@ "i18n-ally.sourceLanguage": "en", "i18n-ally.keystyle": "nested", "i18n-ally.localesPaths": [ - "./src/public/translations" + "./src/public/translations", + "./translations" ], "[jsonc]": { "editor.defaultFormatter": "vscode.json-language-features" diff --git a/bin/build-server.sh b/bin/build-server.sh index a0357b046..be00cf592 100755 --- a/bin/build-server.sh +++ b/bin/build-server.sh @@ -22,7 +22,7 @@ rm -r $PKG_DIR/node/lib/node_modules/npm rm -r $PKG_DIR/node/include/node rm -r $PKG_DIR/node_modules/electron* -rm -r $PKG_DIR/electron.js +rm -r $PKG_DIR/electron*.js printf "#!/bin/sh\n./node/bin/node src/www" > $PKG_DIR/trilium.sh chmod 755 $PKG_DIR/trilium.sh diff --git a/bin/copy-trilium.sh b/bin/copy-trilium.sh index 25b881dd7..ca2acf674 100755 --- a/bin/copy-trilium.sh +++ b/bin/copy-trilium.sh @@ -37,11 +37,11 @@ for f in 'package.json' 'package-lock.json' 'README.md' 'LICENSE' 'config-sample done # Patch package.json main -sed -i 's/.\/dist\/electron.js/electron.js/g' "$DIR/package.json" +sed -i 's/.\/dist\/electron-main.js/electron-main.js/g' "$DIR/package.json" script_dir=$(realpath $(dirname $0)) cp -R "$script_dir/../build/src" "$DIR" -cp "$script_dir/../build/electron.js" "$DIR" +cp "$script_dir/../build/electron-main.js" "$DIR" # run in subshell (so we return to original dir) (cd $DIR && npm install --omit=dev) diff --git a/electron-main.ts b/electron-main.ts new file mode 100644 index 000000000..6fff6ae6b --- /dev/null +++ b/electron-main.ts @@ -0,0 +1,4 @@ +import { initializeTranslations } from "./src/services/i18n.js"; + +await initializeTranslations(); +await import("./electron.js") \ No newline at end of file diff --git a/electron.ts b/electron.ts index 0f0e03cd0..6ebf9a9cf 100644 --- a/electron.ts +++ b/electron.ts @@ -70,4 +70,4 @@ electron.app.on("will-quit", () => { // this is to disable electron warning spam in the dev console (local development only) process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true"; -await import('./src/www.js'); +await import('./src/main.js'); diff --git a/nodemon.json b/nodemon.json index 1266e1b4c..efaf5f759 100644 --- a/nodemon.json +++ b/nodemon.json @@ -3,7 +3,10 @@ "ignore": [".git", "node_modules/**/node_modules", "src/public/"], "verbose": false, "exec": "tsx", - "watch": ["src/"], + "watch": [ + "src/", + "translations/" + ], "signal": "SIGTERM", "env": { "NODE_ENV": "development" diff --git a/package-lock.json b/package-lock.json index f00135316..2c2e3ab39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "trilium", - "version": "0.90.5-beta", + "version": "0.90.6-beta", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "trilium", - "version": "0.90.5-beta", + "version": "0.90.6-beta", "license": "AGPL-3.0-only", "dependencies": { "@braintree/sanitize-url": "^7.1.0", @@ -16,7 +16,7 @@ "archiver": "^7.0.1", "async-mutex": "^0.5.0", "autocomplete.js": "^0.38.1", - "axios": "^1.7.2", + "axios": "^1.7.7", "better-sqlite3": "^11.1.2", "bootstrap": "^4.6.2", "boxicons": "2.1.4", @@ -26,17 +26,17 @@ "compression": "1.7.4", "cookie-parser": "1.4.6", "csurf": "1.11.0", - "dayjs": "^1.11.12", + "dayjs": "^1.11.13", "dayjs-plugin-utc": "0.1.2", "debounce": "^2.1.0", "dotenv": "^16.4.5", "ejs": "^3.1.10", - "electron-debug": "3.2.0", - "electron-dl": "3.5.2", + "electron-debug": "^4.0.1", + "electron-dl": "^4.0.0", "electron-squirrel-startup": "^1.0.0", "electron-window-state": "5.0.3", "escape-html": "1.0.3", - "eslint": "^9.9.0", + "eslint": "^9.10.0", "express": "^4.19.2", "express-openid-connect": "^2.17.1", "express-partial-content": "1.0.2", @@ -50,9 +50,10 @@ "http-proxy-agent": "7.0.2", "https-proxy-agent": "^7.0.5", "i18next": "^23.14.0", + "i18next-fs-backend": "^2.3.2", "i18next-http-backend": "^2.6.1", "image-type": "4.1.0", - "ini": "^4.1.3", + "ini": "^5.0.0", "is-animated": "2.0.2", "is-svg": "4.3.2", "jimp": "0.22.12", @@ -60,13 +61,13 @@ "jquery": "3.7.1", "jquery-hotkeys": "0.2.2", "jquery.fancytree": "^2.38.3", - "jsdom": "^24.1.0", + "jsdom": "^25.0.0", "jsplumb": "^2.15.6", "katex": "^0.16.11", "knockout": "^3.5.1", "mark.js": "^8.11.1", - "marked": "^13.0.2", - "mermaid": "^10.9.1", + "marked": "^14.1.2", + "mermaid": "^11.1.1", "mime-types": "2.1.35", "mind-elixir": "^4.0.5", "multer": "1.4.5-lts.1", @@ -101,7 +102,7 @@ "yauzl": "^3.1.3" }, "bin": { - "trilium": "src/www.js" + "trilium": "src/main.js" }, "devDependencies": { "@electron-forge/cli": "^7.4.0", @@ -161,6 +162,26 @@ "webpack-cli": "5.1.4" } }, + "node_modules/@antfu/install-pkg": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-0.4.1.tgz", + "integrity": "sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==", + "dependencies": { + "package-manager-detector": "^0.2.0", + "tinyexec": "^0.3.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@antfu/utils": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.10.tgz", + "integrity": "sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/@babel/parser": { "version": "7.21.4", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", @@ -194,6 +215,40 @@ "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.0.tgz", "integrity": "sha512-o+UlMLt49RvtCASlOMW0AkHnabN9wR9rwCCherxO0yG4Npy34GkvrAqdXQvrhNs+jh+gkK8gB8Lf05qL/O7KWg==" }, + "node_modules/@chevrotain/cst-dts-gen": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", + "integrity": "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==", + "dependencies": { + "@chevrotain/gast": "11.0.3", + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/@chevrotain/gast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz", + "integrity": "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==", + "dependencies": { + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/@chevrotain/regexp-to-ast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz", + "integrity": "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==" + }, + "node_modules/@chevrotain/types": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz", + "integrity": "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==" + }, + "node_modules/@chevrotain/utils": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz", + "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==" + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -2309,10 +2364,9 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.17.1.tgz", - "integrity": "sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==", - "license": "Apache-2.0", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", "dependencies": { "@eslint/object-schema": "^2.1.4", "debug": "^4.3.1", @@ -2358,10 +2412,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.9.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.9.0.tgz", - "integrity": "sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==", - "license": "MIT", + "version": "9.10.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.10.0.tgz", + "integrity": "sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -2370,7 +2423,17 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", - "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.1.0.tgz", + "integrity": "sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==", + "dependencies": { + "levn": "^0.4.1" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -2429,6 +2492,25 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@iconify/types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", + "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==" + }, + "node_modules/@iconify/utils": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-2.1.32.tgz", + "integrity": "sha512-LeifFZPPKu28O3AEDpYJNdEbvS4/ojAPyIW+pF/vUpJTYnbTiXUHkCh0bwgFRzKvdpb8H4Fbfd/742++MF4fPQ==", + "dependencies": { + "@antfu/install-pkg": "^0.4.0", + "@antfu/utils": "^0.7.10", + "@iconify/types": "^2.0.0", + "debug": "^4.3.6", + "kolorist": "^1.8.0", + "local-pkg": "^0.5.0", + "mlly": "^1.7.1" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -2964,6 +3046,14 @@ "url": "https://github.com/malept/cross-spawn-promise?sponsor=1" } }, + "node_modules/@mermaid-js/parser": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-0.3.0.tgz", + "integrity": "sha512-HsvL6zgE5sUPGgkIDlmAWR1HTNHz2Iy11BAWPTa4Jjabkpguy4Ze2gzfLrg6pdRuBvFwgUYyxiaNqZwrEEXepA==", + "dependencies": { + "langium": "3.0.0" + } + }, "node_modules/@mixmark-io/domino": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@mixmark-io/domino/-/domino-2.2.0.tgz", @@ -3253,38 +3343,12 @@ "@types/express-serve-static-core": "*" } }, - "node_modules/@types/d3-scale": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.8.tgz", - "integrity": "sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ==", - "dependencies": { - "@types/d3-time": "*" - } - }, - "node_modules/@types/d3-scale-chromatic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.3.tgz", - "integrity": "sha512-laXM4+1o5ImZv3RpFAsTRn3TEkzqkytiOY0Dz0sq5cnd1dtNlk6sHLon4OvqaiJb28T0S/TdsBI3Sjsy+keJrw==" - }, - "node_modules/@types/d3-time": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.3.tgz", - "integrity": "sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw==" - }, "node_modules/@types/debounce": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.4.tgz", "integrity": "sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==", "dev": true }, - "node_modules/@types/debug": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.9.tgz", - "integrity": "sha512-8Hz50m2eoS56ldRlepxSBa6PWEVCtzUo/92HgLc2qTMnotJNIm7xP+UZhyWoYsyOdd5dxZ+NZLb24rsKyFs2ow==", - "dependencies": { - "@types/ms": "*" - } - }, "node_modules/@types/ejs": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/@types/ejs/-/ejs-3.1.5.tgz", @@ -3476,14 +3540,6 @@ "@types/mdurl": "^2" } }, - "node_modules/@types/mdast": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", - "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", - "dependencies": { - "@types/unist": "^2" - } - }, "node_modules/@types/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", @@ -3509,11 +3565,6 @@ "dev": true, "optional": true }, - "node_modules/@types/ms": { - "version": "0.7.32", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.32.tgz", - "integrity": "sha512-xPSg0jm4mqgEkNhowKgZFBNtwoEwF6gJ4Dhww+GFpm3IgtNseHQZ5IqdNwnquZEoANxyDAKDRAdVo4Z72VvD/g==" - }, "node_modules/@types/multer": { "version": "1.4.12", "resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.12.tgz", @@ -3740,11 +3791,6 @@ "integrity": "sha512-TL2IgGgc7B5j78rIccBtlYAnkuv8nUQqhQc+DSYV5j9Be9XOcm/SKOVRuA47xAVI3680Tk9B1d8flK2GWT2+4w==", "dev": true }, - "node_modules/@types/unist": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", - "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" - }, "node_modules/@types/ws": { "version": "8.5.12", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", @@ -4681,9 +4727,9 @@ "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -5370,15 +5416,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/character-entities": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", - "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/cheerio": { "version": "1.0.0-rc.10", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", @@ -5414,6 +5451,30 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/chevrotain": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", + "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", + "dependencies": { + "@chevrotain/cst-dts-gen": "11.0.3", + "@chevrotain/gast": "11.0.3", + "@chevrotain/regexp-to-ast": "11.0.3", + "@chevrotain/types": "11.0.3", + "@chevrotain/utils": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/chevrotain-allstar": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz", + "integrity": "sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==", + "dependencies": { + "lodash-es": "^4.17.21" + }, + "peerDependencies": { + "chevrotain": "^11.0.0" + } + }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -5862,6 +5923,11 @@ "typedarray": "^0.0.6" } }, + "node_modules/confbox": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", + "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==" + }, "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", @@ -6219,13 +6285,9 @@ } }, "node_modules/cytoscape": { - "version": "3.28.1", - "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.28.1.tgz", - "integrity": "sha512-xyItz4O/4zp9/239wCcH8ZcFuuZooEeF8KHRmzjDfGdXsj3OG9MFSMA0pJE0uX3uCN/ygof6hHf4L7lst+JaDg==", - "dependencies": { - "heap": "^0.2.6", - "lodash": "^4.17.21" - }, + "version": "3.30.2", + "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.30.2.tgz", + "integrity": "sha512-oICxQsjW8uSaRmn4UK/jkczKOqTrVqt5/1WL0POiJUT2EKNc9STM4hYFHv917yu55aTBMFNRzymlJhVAiWPCxw==", "engines": { "node": ">=0.10" } @@ -6241,10 +6303,34 @@ "cytoscape": "^3.2.0" } }, + "node_modules/cytoscape-fcose": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz", + "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==", + "dependencies": { + "cose-base": "^2.2.0" + }, + "peerDependencies": { + "cytoscape": "^3.2.0" + } + }, + "node_modules/cytoscape-fcose/node_modules/cose-base": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz", + "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==", + "dependencies": { + "layout-base": "^2.0.0" + } + }, + "node_modules/cytoscape-fcose/node_modules/layout-base": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz", + "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==" + }, "node_modules/d3": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/d3/-/d3-7.8.5.tgz", - "integrity": "sha512-JgoahDG51ncUfJu6wX/1vWQEqOflgXyl4MaHqlcSruTez7yhaRKR9i8VjjcQGeS2en/jnFivXuaIMnseMMt0XA==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", + "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==", "dependencies": { "d3-array": "3", "d3-axis": "3", @@ -6712,9 +6798,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.12", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.12.tgz", - "integrity": "sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==" + "version": "1.11.13", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", + "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" }, "node_modules/dayjs-plugin-utc": { "version": "0.1.2", @@ -6733,11 +6819,11 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -6749,27 +6835,15 @@ } }, "node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/decimal.js": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" }, - "node_modules/decode-named-character-reference": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", - "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", - "dependencies": { - "character-entities": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/decompress-response": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", @@ -6893,14 +6967,6 @@ "node": ">= 0.6" } }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "engines": { - "node": ">=6" - } - }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -6955,14 +7021,6 @@ "resolved": "https://registry.npmjs.org/detect-touch-events/-/detect-touch-events-2.0.2.tgz", "integrity": "sha512-g8GWBkJLiIDRJfRXEdrd1wMXpNyGId2DkbfuwFahSb4OCvn717hyRJtAcEDISfp3zkwEhZ4Y4woHPA6DeyB3Fw==" }, - "node_modules/diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/dir-compare": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/dir-compare/-/dir-compare-3.3.0.tgz", @@ -7029,9 +7087,9 @@ } }, "node_modules/dompurify": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.6.tgz", - "integrity": "sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w==" + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.6.tgz", + "integrity": "sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ==" }, "node_modules/domutils": { "version": "2.8.0", @@ -7121,28 +7179,31 @@ } }, "node_modules/electron-debug": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/electron-debug/-/electron-debug-3.2.0.tgz", - "integrity": "sha512-7xZh+LfUvJ52M9rn6N+tPuDw6oRAjxUj9SoxAZfJ0hVCXhZCsdkrSt7TgXOiWiEOBgEV8qwUIO/ScxllsPS7ow==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/electron-debug/-/electron-debug-4.0.1.tgz", + "integrity": "sha512-PdUG3SvcK70P05z99PFLUzn0+lPZl5c4quG1bXI7OtPaXxidwh8UONcdRLsr+6J9kf5y1FycJD5nBd80dYrcsA==", "dependencies": { - "electron-is-dev": "^1.1.0", - "electron-localshortcut": "^3.1.0" + "electron-is-dev": "^3.0.1", + "electron-localshortcut": "^3.2.1" + }, + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/electron-dl": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-3.5.2.tgz", - "integrity": "sha512-i104cl+u8yJ0lhpRAtUWfeGuWuL1PL6TBiw2gLf0MMIBjfgE485Ags2mcySx4uWU9P9uj/vsD3jd7X+w1lzZxw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-4.0.0.tgz", + "integrity": "sha512-USiB9816d2JzKv0LiSbreRfTg5lDk3lWh0vlx/gugCO92ZIJkHVH0UM18EHvKeadErP6Xn4yiTphWzYfbA2Ong==", "dependencies": { "ext-name": "^5.0.0", - "pupa": "^2.0.1", - "unused-filename": "^2.1.0" + "pupa": "^3.1.0", + "unused-filename": "^4.0.1" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7336,9 +7397,15 @@ "integrity": "sha1-UJ5RDCala1Xhf4Y6SwThEYRqsns=" }, "node_modules/electron-is-dev": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-1.2.0.tgz", - "integrity": "sha512-R1oD5gMBPS7PVU8gJwH6CtT0e6VSoD0+SzSnYpNm+dBkcijgA+K7VAMHDfnRq/lkKPZArpzplTW6jfiMYosdzw==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-3.0.1.tgz", + "integrity": "sha512-8TjjAh8Ec51hUi3o4TaU0mD3GMTOESi866oRNavj9A3IQJ7pmv+MJVmdZBFGw4GFT36X7bkqnuDNYvkQgvyI8Q==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/electron-localshortcut": { "version": "3.2.1", @@ -7591,11 +7658,6 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, - "node_modules/elkjs": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/elkjs/-/elkjs-0.9.2.tgz", - "integrity": "sha512-2Y/RaA1pdgSHpY0YG4TYuYCD2wh97CRvu22eLG3Kz0pgQ/6KbIFTxsTnDc4MH/6hFlg2L/9qXrDMG0nMjP63iw==" - }, "node_modules/emitter-listener": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz", @@ -7759,11 +7821,14 @@ } }, "node_modules/escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", + "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/escape-html": { @@ -7781,16 +7846,16 @@ } }, "node_modules/eslint": { - "version": "9.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.9.0.tgz", - "integrity": "sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==", - "license": "MIT", + "version": "9.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.10.0.tgz", + "integrity": "sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.11.0", - "@eslint/config-array": "^0.17.1", + "@eslint/config-array": "^0.18.0", "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.9.0", + "@eslint/js": "9.10.0", + "@eslint/plugin-kit": "^0.1.0", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.3.0", "@nodelib/fs.walk": "^1.2.8", @@ -7813,7 +7878,6 @@ "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", @@ -9457,6 +9521,11 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/hachure-fill": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz", + "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==" + }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -9544,11 +9613,6 @@ "he": "bin/he" } }, - "node_modules/heap": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", - "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==" - }, "node_modules/helmet": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/helmet/-/helmet-7.1.0.tgz", @@ -9795,6 +9859,11 @@ "@babel/runtime": "^7.23.2" } }, + "node_modules/i18next-fs-backend": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-2.3.2.tgz", + "integrity": "sha512-LIwUlkqDZnUI8lnUxBnEj8K/FrHQTT/Sc+1rvDm9E8YvvY5YxzoEAASNx+W5M9DfD5s77lI5vSAFWeTp26B/3Q==" + }, "node_modules/i18next-http-backend": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.6.1.tgz", @@ -10535,11 +10604,11 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ini": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", - "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-5.0.0.tgz", + "integrity": "sha512-+N0ngpO3e7cRUWOJAS7qw0IZIVc6XPrW4MlFBdD066F2L4k1L6ker3hLqSq7iXxU5tgS4WGkIUElWn5vogAEnw==", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/internmap": { @@ -11166,9 +11235,9 @@ } }, "node_modules/jsdom": { - "version": "24.1.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.1.tgz", - "integrity": "sha512-5O1wWV99Jhq4DV7rCLIoZ/UIhyQeDR7wHVyZAHAshbrvZsLs+Xzz7gtwnlJTJDjleiTKh54F4dXrX70vJQTyJQ==", + "version": "25.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-25.0.0.tgz", + "integrity": "sha512-OhoFVT59T7aEq75TVw9xxEfkXgacpqAhQaYgP9y/fDqWQCMB/b1H66RfmPm/MaeaAIU9nDwMOVTlPN51+ao6CQ==", "dependencies": { "cssstyle": "^4.0.1", "data-urls": "^5.0.0", @@ -11400,20 +11469,17 @@ "graceful-fs": "^4.1.9" } }, - "node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "engines": { - "node": ">=6" - } - }, "node_modules/knockout": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/knockout/-/knockout-3.5.1.tgz", "integrity": "sha512-wRJ9I4az0QcsH7A4v4l0enUpkS++MBx0BnL/68KaLzJg7x1qmbjSlwEoCNol7KTYZ+pmtI7Eh2J0Nu6/2Z5J/Q==", "license": "MIT" }, + "node_modules/kolorist": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", + "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==" + }, "node_modules/kruptein": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/kruptein/-/kruptein-2.2.1.tgz", @@ -11425,6 +11491,21 @@ "node": ">6" } }, + "node_modules/langium": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/langium/-/langium-3.0.0.tgz", + "integrity": "sha512-+Ez9EoiByeoTu/2BXmEaZ06iPNXM6thWJp02KfBO/raSMyCJ4jw7AkWWa+zBCTm0+Tw1Fj9FOxdqSskyN5nAwg==", + "dependencies": { + "chevrotain": "~11.0.3", + "chevrotain-allstar": "~0.3.0", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-textdocument": "~1.0.11", + "vscode-uri": "~3.0.8" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/layout-base": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz", @@ -11524,6 +11605,21 @@ "node": ">=6.11.5" } }, + "node_modules/local-pkg": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "dependencies": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", @@ -11886,9 +11982,9 @@ } }, "node_modules/marked": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-13.0.2.tgz", - "integrity": "sha512-J6CPjP8pS5sgrRqxVRvkCIkZ6MFdRIjDkwUwgJ9nL2fbmM6qGQeB2C16hi8Cc9BOzj6xXzy0jyi0iPIfnMHYzA==", + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-14.1.2.tgz", + "integrity": "sha512-f3r0yqpz31VXiDB/wj9GaOB0a2PRLQl6vJmXiFrniNwjkKdvakqJRULhjFKJpxOchlCRiG5fcacoUZY5Xa6PEQ==", "bin": { "marked": "bin/marked.js" }, @@ -11920,41 +12016,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mdast-util-from-markdown": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz", - "integrity": "sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==", - "dependencies": { - "@types/mdast": "^3.0.0", - "@types/unist": "^2.0.0", - "decode-named-character-reference": "^1.0.0", - "mdast-util-to-string": "^3.1.0", - "micromark": "^3.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-decode-string": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "unist-util-stringify-position": "^3.0.0", - "uvu": "^0.5.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", - "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==", - "dependencies": { - "@types/mdast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", @@ -12004,36 +12065,41 @@ } }, "node_modules/mermaid": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.9.1.tgz", - "integrity": "sha512-Mx45Obds5W1UkW1nv/7dHRsbfMM1aOKA2+Pxs/IGHNonygDHwmng8xTHyS9z4KWVi0rbko8gjiBmuwwXQ7tiNA==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.1.1.tgz", + "integrity": "sha512-bdHVu86yrjCkTPRxWHG+B5YucXE8wGaniTnWwhMJe/l253QdX1cuLgYt4ZVvApV1ZXCTsz5ilxoS8KX95U7gdw==", "dependencies": { - "@braintree/sanitize-url": "^6.0.1", - "@types/d3-scale": "^4.0.3", - "@types/d3-scale-chromatic": "^3.0.0", - "cytoscape": "^3.28.1", + "@braintree/sanitize-url": "^7.0.1", + "@iconify/utils": "^2.1.32", + "@mermaid-js/parser": "^0.3.0", + "cytoscape": "^3.29.2", "cytoscape-cose-bilkent": "^4.1.0", - "d3": "^7.4.0", + "cytoscape-fcose": "^2.2.0", + "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.10", - "dayjs": "^1.11.7", - "dompurify": "^3.0.5", - "elkjs": "^0.9.0", + "dayjs": "^1.11.10", + "dompurify": "^3.0.11", "katex": "^0.16.9", - "khroma": "^2.0.0", + "khroma": "^2.1.0", "lodash-es": "^4.17.21", - "mdast-util-from-markdown": "^1.3.0", - "non-layered-tidy-tree-layout": "^2.0.2", - "stylis": "^4.1.3", + "marked": "^13.0.2", + "roughjs": "^4.6.6", + "stylis": "^4.3.1", "ts-dedent": "^2.2.0", - "uuid": "^9.0.0", - "web-worker": "^1.2.0" + "uuid": "^9.0.1" } }, - "node_modules/mermaid/node_modules/@braintree/sanitize-url": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz", - "integrity": "sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==" + "node_modules/mermaid/node_modules/marked": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-13.0.3.tgz", + "integrity": "sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA==", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } }, "node_modules/mermaid/node_modules/uuid": { "version": "9.0.1", @@ -12055,427 +12121,6 @@ "node": ">= 0.6" } }, - "node_modules/micromark": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.2.0.tgz", - "integrity": "sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "micromark-core-commonmark": "^1.0.1", - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-chunked": "^1.0.0", - "micromark-util-combine-extensions": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-sanitize-uri": "^1.0.0", - "micromark-util-subtokenize": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.1", - "uvu": "^0.5.0" - } - }, - "node_modules/micromark-core-commonmark": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz", - "integrity": "sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-factory-destination": "^1.0.0", - "micromark-factory-label": "^1.0.0", - "micromark-factory-space": "^1.0.0", - "micromark-factory-title": "^1.0.0", - "micromark-factory-whitespace": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-chunked": "^1.0.0", - "micromark-util-classify-character": "^1.0.0", - "micromark-util-html-tag-name": "^1.0.0", - "micromark-util-normalize-identifier": "^1.0.0", - "micromark-util-resolve-all": "^1.0.0", - "micromark-util-subtokenize": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.1", - "uvu": "^0.5.0" - } - }, - "node_modules/micromark-factory-destination": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz", - "integrity": "sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-factory-label": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz", - "integrity": "sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - } - }, - "node_modules/micromark-factory-space": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.1.0.tgz", - "integrity": "sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-factory-title": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz", - "integrity": "sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-factory-whitespace": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz", - "integrity": "sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-factory-space": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-util-character": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.2.0.tgz", - "integrity": "sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-util-chunked": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz", - "integrity": "sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/micromark-util-classify-character": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz", - "integrity": "sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-util-combine-extensions": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz", - "integrity": "sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-util-decode-numeric-character-reference": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz", - "integrity": "sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/micromark-util-decode-string": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz", - "integrity": "sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/micromark-util-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz", - "integrity": "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromark-util-html-tag-name": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz", - "integrity": "sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromark-util-normalize-identifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz", - "integrity": "sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/micromark-util-resolve-all": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz", - "integrity": "sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-types": "^1.0.0" - } - }, - "node_modules/micromark-util-sanitize-uri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz", - "integrity": "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-character": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-symbol": "^1.0.0" - } - }, - "node_modules/micromark-util-subtokenize": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz", - "integrity": "sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - } - }, - "node_modules/micromark-util-symbol": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.1.0.tgz", - "integrity": "sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, - "node_modules/micromark-util-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.1.0.tgz", - "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ] - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -12679,20 +12324,15 @@ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, - "node_modules/modify-filename": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/modify-filename/-/modify-filename-1.1.0.tgz", - "integrity": "sha1-mi3sg4Bvuy2XXyK+7IWcoms5OqE=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", - "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "engines": { - "node": ">=4" + "node_modules/mlly": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.1.tgz", + "integrity": "sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==", + "dependencies": { + "acorn": "^8.11.3", + "pathe": "^1.1.2", + "pkg-types": "^1.1.1", + "ufo": "^1.5.3" } }, "node_modules/ms": { @@ -13009,11 +12649,6 @@ "node": ">=4" } }, - "node_modules/non-layered-tidy-tree-layout": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/non-layered-tidy-tree-layout/-/non-layered-tidy-tree-layout-2.0.2.tgz", - "integrity": "sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw==" - }, "node_modules/nopt": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", @@ -13415,6 +13050,11 @@ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" }, + "node_modules/package-manager-detector": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.0.tgz", + "integrity": "sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==" + }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -13555,6 +13195,11 @@ "node": ">= 0.8" } }, + "node_modules/path-data-parser": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz", + "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==" + }, "node_modules/path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -13638,6 +13283,11 @@ "node": ">=4" } }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, "node_modules/pe-library": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/pe-library/-/pe-library-1.0.1.tgz", @@ -13737,6 +13387,16 @@ "node": ">=8" } }, + "node_modules/pkg-types": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.0.tgz", + "integrity": "sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==", + "dependencies": { + "confbox": "^0.1.7", + "mlly": "^1.7.1", + "pathe": "^1.1.2" + } + }, "node_modules/playwright": { "version": "1.46.0", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.46.0.tgz", @@ -13805,6 +13465,20 @@ "node": ">=12.13.0" } }, + "node_modules/points-on-curve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", + "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==" + }, + "node_modules/points-on-path": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz", + "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==", + "dependencies": { + "path-data-parser": "0.1.0", + "points-on-curve": "0.2.0" + } + }, "node_modules/popper.js": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", @@ -14007,14 +13681,17 @@ } }, "node_modules/pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz", + "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==", "dependencies": { - "escape-goat": "^2.0.0" + "escape-goat": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/qs": { @@ -14786,6 +14463,17 @@ "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" }, + "node_modules/roughjs": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz", + "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==", + "dependencies": { + "hachure-fill": "^0.5.2", + "path-data-parser": "^0.1.0", + "points-on-curve": "^0.2.0", + "points-on-path": "^0.2.1" + } + }, "node_modules/rrweb-cssom": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", @@ -14818,17 +14506,6 @@ "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" }, - "node_modules/sade": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", - "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", - "dependencies": { - "mri": "^1.1.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -15678,9 +15355,9 @@ } }, "node_modules/stylis": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.0.tgz", - "integrity": "sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ==" + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.4.tgz", + "integrity": "sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==" }, "node_modules/sudo-prompt": { "version": "9.2.1", @@ -15946,6 +15623,11 @@ "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==" }, + "node_modules/tinyexec": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz", + "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==" + }, "node_modules/tmp": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", @@ -16308,6 +15990,11 @@ "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "dev": true }, + "node_modules/ufo": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==" + }, "node_modules/uid-safe": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", @@ -16365,18 +16052,6 @@ "imurmurhash": "^0.1.4" } }, - "node_modules/unist-util-stringify-position": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", - "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", - "dependencies": { - "@types/unist": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -16405,23 +16080,37 @@ } }, "node_modules/unused-filename": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unused-filename/-/unused-filename-2.1.0.tgz", - "integrity": "sha512-BMiNwJbuWmqCpAM1FqxCTD7lXF97AvfQC8Kr/DIeA6VtvhJaMDupZ82+inbjl5yVP44PcxOuCSxye1QMS0wZyg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/unused-filename/-/unused-filename-4.0.1.tgz", + "integrity": "sha512-ZX6U1J04K1FoSUeoX1OicAhw4d0aro2qo+L8RhJkiGTNtBNkd/Fi1Wxoc9HzcVu6HfOzm0si/N15JjxFmD1z6A==", "dependencies": { - "modify-filename": "^1.1.0", - "path-exists": "^4.0.0" + "escape-string-regexp": "^5.0.0", + "path-exists": "^5.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unused-filename/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/unused-filename/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/update-browserslist-db": { @@ -16533,23 +16222,6 @@ "uuid": "bin/uuid" } }, - "node_modules/uvu": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", - "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", - "dependencies": { - "dequal": "^2.0.0", - "diff": "^5.0.0", - "kleur": "^4.0.3", - "sade": "^1.7.3" - }, - "bin": { - "uvu": "bin.js" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -16598,6 +16270,49 @@ "extsprintf": "^1.2.0" } }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==" + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" + }, + "node_modules/vscode-uri": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==" + }, "node_modules/w3c-xmlserializer": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", @@ -16639,11 +16354,6 @@ "defaults": "^1.0.3" } }, - "node_modules/web-worker": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz", - "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==" - }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", diff --git a/package.json b/package.json index 93f111ab8..0cea16bc1 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "trilium", "productName": "TriliumNext Notes", "description": "Build your personal knowledge base with TriliumNext Notes", - "version": "0.90.5-beta", + "version": "0.90.6-beta", "license": "AGPL-3.0-only", - "main": "./dist/electron.js", + "main": "./dist/electron-main.js", "author": { "name": "TriliumNext Notes Team", "email": "contact@eliandoran.me", @@ -12,7 +12,7 @@ }, "copyright": "", "bin": { - "trilium": "src/www.js" + "trilium": "src/main.js" }, "repository": { "type": "git", @@ -20,12 +20,12 @@ }, "type": "module", "scripts": { - "start-server": "cross-env TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/www.ts", - "start-server-safe": "cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/www.ts", - "start-server-no-dir": "cross-env TRILIUM_SAFE_MODE=1 TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/www.ts", - "start-test-server": "npm run switch-server; rimraf ./data-test; cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data-test TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev TRILIUM_PORT=9999 ts-node src/www.ts", + "start-server": "cross-env TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/main.ts", + "start-server-safe": "cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/main.ts", + "start-server-no-dir": "cross-env TRILIUM_SAFE_MODE=1 TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/main.ts", + "start-test-server": "npm run switch-server; rimraf ./data-test; cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data-test TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev TRILIUM_PORT=9999 ts-node src/main.ts", "qstart-server": "npm run switch-server && npm run start-server", - "start-electron": "npm run prepare-dist && cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron.js --inspect=5858 .", + "start-electron": "npm run prepare-dist && cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .", "start-electron-no-dir": "cross-env TRILIUM_SAFE_MODE=1 TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 electron --inspect=5858 .", "qstart-electron": "npm run switch-electron && npm run start-electron", "switch-server": "rimraf ./node_modules/better-sqlite3 && npm install", @@ -43,9 +43,9 @@ "prepare-dist": "rimraf ./dist && tsc && tsx ./bin/copy-dist.ts", "update-build-info": "tsx bin/update-build-info.ts", "errors": "tsc --watch --noEmit", - "integration-edit-db": "cross-env TRILIUM_INTEGRATION_TEST=edit TRILIUM_PORT=8081 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/www.ts", - "integration-mem-db": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/www.ts", - "integration-mem-db-dev": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db nodemon src/www.ts", + "integration-edit-db": "cross-env TRILIUM_INTEGRATION_TEST=edit TRILIUM_PORT=8081 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts", + "integration-mem-db": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts", + "integration-mem-db-dev": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts", "generate-document": "cross-env nodemon src/tools/generate_document.ts 1000" }, "dependencies": { @@ -56,7 +56,7 @@ "archiver": "^7.0.1", "async-mutex": "^0.5.0", "autocomplete.js": "^0.38.1", - "axios": "^1.7.2", + "axios": "^1.7.7", "better-sqlite3": "^11.1.2", "bootstrap": "^4.6.2", "boxicons": "2.1.4", @@ -66,17 +66,17 @@ "compression": "1.7.4", "cookie-parser": "1.4.6", "csurf": "1.11.0", - "dayjs": "^1.11.12", + "dayjs": "^1.11.13", "dayjs-plugin-utc": "0.1.2", "debounce": "^2.1.0", "dotenv": "^16.4.5", "ejs": "^3.1.10", - "electron-debug": "3.2.0", - "electron-dl": "3.5.2", + "electron-debug": "^4.0.1", + "electron-dl": "^4.0.0", "electron-squirrel-startup": "^1.0.0", "electron-window-state": "5.0.3", "escape-html": "1.0.3", - "eslint": "^9.9.0", + "eslint": "^9.10.0", "express": "^4.19.2", "express-openid-connect": "^2.17.1", "express-partial-content": "1.0.2", @@ -90,9 +90,10 @@ "http-proxy-agent": "7.0.2", "https-proxy-agent": "^7.0.5", "i18next": "^23.14.0", + "i18next-fs-backend": "^2.3.2", "i18next-http-backend": "^2.6.1", "image-type": "4.1.0", - "ini": "^4.1.3", + "ini": "^5.0.0", "is-animated": "2.0.2", "is-svg": "4.3.2", "jimp": "0.22.12", @@ -100,13 +101,13 @@ "jquery": "3.7.1", "jquery-hotkeys": "0.2.2", "jquery.fancytree": "^2.38.3", - "jsdom": "^24.1.0", + "jsdom": "^25.0.0", "jsplumb": "^2.15.6", "katex": "^0.16.11", "knockout": "^3.5.1", "mark.js": "^8.11.1", - "marked": "^13.0.2", - "mermaid": "^10.9.1", + "marked": "^14.1.2", + "mermaid": "^11.1.1", "mime-types": "2.1.35", "mind-elixir": "^4.0.5", "multer": "1.4.5-lts.1", diff --git a/src/app.ts b/src/app.ts index 4b5c9b828..d7aa3fa3b 100644 --- a/src/app.ts +++ b/src/app.ts @@ -17,6 +17,7 @@ import sql_init from "./services/sql_init.js"; import oidc from "express-openid-connect"; import openID from "./services/open_id.js"; import * as dotenv from "dotenv"; +import { t } from "i18next"; await import('./services/handlers.js'); await import('./becca/becca_loader.js'); @@ -35,6 +36,11 @@ sql_init.initializeDb(); app.set('views', path.join(scriptDir, 'views')); app.set('view engine', 'ejs'); +app.use((req, res, next) => { + res.locals.t = t; + return next(); +}); + if (!utils.isElectron()) { app.use(compression()); // HTTP compression } diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 000000000..c38b85933 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,13 @@ +/* + * Make sure not to import any modules that depend on localized messages via i18next here, as the initializations + * are loaded later and will result in an empty string. + */ + +import { initializeTranslations } from "./services/i18n.js"; + +async function startApplication() { + await import("./www.js"); +} + +await initializeTranslations(); +await startApplication(); \ No newline at end of file diff --git a/src/public/app/menus/tree_context_menu.js b/src/public/app/menus/tree_context_menu.js index e3e19dc93..684b31c99 100644 --- a/src/public/app/menus/tree_context_menu.js +++ b/src/public/app/menus/tree_context_menu.js @@ -8,6 +8,7 @@ import noteTypesService from "../services/note_types.js"; import server from "../services/server.js"; import toastService from "../services/toast.js"; import dialogService from "../services/dialog.js"; +import { t } from "../services/i18n.js"; export default class TreeContextMenu { /** @@ -48,55 +49,55 @@ export default class TreeContextMenu { const insertNoteAfterEnabled = isNotRoot && !isHoisted && parentNotSearch; return [ - { title: 'Open in a new tab Ctrl+Click', command: "openInTab", uiIcon: "bx bx-empty", enabled: noSelectedNotes }, - { title: 'Open in a new split', command: "openNoteInSplit", uiIcon: "bx bx-dock-right", enabled: noSelectedNotes }, - { title: 'Insert note after ', command: "insertNoteAfter", uiIcon: "bx bx-plus", + { title: `${t("tree-context-menu.open-in-a-new-tab")} Ctrl+Click`, command: "openInTab", uiIcon: "bx bx-empty", enabled: noSelectedNotes }, + { title: t("tree-context-menu.open-in-a-new-split"), command: "openNoteInSplit", uiIcon: "bx bx-dock-right", enabled: noSelectedNotes }, + { title: `${t("tree-context-menu.insert-note-after")} `, command: "insertNoteAfter", uiIcon: "bx bx-plus", items: insertNoteAfterEnabled ? await noteTypesService.getNoteTypeItems("insertNoteAfter") : null, enabled: insertNoteAfterEnabled && noSelectedNotes && notOptions }, - { title: 'Insert child note ', command: "insertChildNote", uiIcon: "bx bx-plus", + { title: `${t("tree-context-menu.insert-child-note")} `, command: "insertChildNote", uiIcon: "bx bx-plus", items: notSearch ? await noteTypesService.getNoteTypeItems("insertChildNote") : null, enabled: notSearch && noSelectedNotes && notOptions }, - { title: 'Delete ', command: "deleteNotes", uiIcon: "bx bx-trash", + { title: `${t("tree-context-menu.delete")} `, command: "deleteNotes", uiIcon: "bx bx-trash", enabled: isNotRoot && !isHoisted && parentNotSearch && notOptions }, { title: "----" }, - { title: 'Search in subtree ', command: "searchInSubtree", uiIcon: "bx bx-search", + { title: `${t("tree-context-menu.search-in-subtree")} `, command: "searchInSubtree", uiIcon: "bx bx-search", enabled: notSearch && noSelectedNotes }, isHoisted ? null : { title: 'Hoist note ', command: "toggleNoteHoisting", uiIcon: "bx bx-empty", enabled: noSelectedNotes && notSearch }, !isHoisted || !isNotRoot ? null : { title: 'Unhoist note ', command: "toggleNoteHoisting", uiIcon: "bx bx-door-open" }, - { title: 'Edit branch prefix ', command: "editBranchPrefix", uiIcon: "bx bx-empty", + { title: `${t("tree-context-menu.edit-branch-prefix")} `, command: "editBranchPrefix", uiIcon: "bx bx-empty", enabled: isNotRoot && parentNotSearch && noSelectedNotes && notOptions }, - { title: "Advanced", uiIcon: "bx bx-empty", enabled: true, items: [ - { title: 'Expand subtree ', command: "expandSubtree", uiIcon: "bx bx-expand", enabled: noSelectedNotes }, - { title: 'Collapse subtree ', command: "collapseSubtree", uiIcon: "bx bx-collapse", enabled: noSelectedNotes }, - { title: 'Sort by ... ', command: "sortChildNotes", uiIcon: "bx bx-empty", enabled: noSelectedNotes && notSearch }, - { title: 'Recent changes in subtree', command: "recentChangesInSubtree", uiIcon: "bx bx-history", enabled: noSelectedNotes && notOptions }, - { title: 'Convert to attachment', command: "convertNoteToAttachment", uiIcon: "bx bx-empty", enabled: isNotRoot && !isHoisted && notOptions }, - { title: 'Copy note path to clipboard', command: "copyNotePathToClipboard", uiIcon: "bx bx-empty", enabled: true } + { title: t("tree-context-menu.advanced"), uiIcon: "bx bx-empty", enabled: true, items: [ + { title: `${t("tree-context-menu.expand-subtree")} `, command: "expandSubtree", uiIcon: "bx bx-expand", enabled: noSelectedNotes }, + { title: `${t("tree-context-menu.collapse-subtree")} `, command: "collapseSubtree", uiIcon: "bx bx-collapse", enabled: noSelectedNotes }, + { title: `${t("tree-context-menu.sort-by")} `, command: "sortChildNotes", uiIcon: "bx bx-empty", enabled: noSelectedNotes && notSearch }, + { title: t("tree-context-menu.recent-changes-in-subtree"), command: "recentChangesInSubtree", uiIcon: "bx bx-history", enabled: noSelectedNotes && notOptions }, + { title: t("tree-context-menu.convert-to-attachment"), command: "convertNoteToAttachment", uiIcon: "bx bx-empty", enabled: isNotRoot && !isHoisted && notOptions }, + { title: t("tree-context-menu.copy-note-path-to-clipboard"), command: "copyNotePathToClipboard", uiIcon: "bx bx-empty", enabled: true } ] }, { title: "----" }, - { title: "Protect subtree", command: "protectSubtree", uiIcon: "bx bx-check-shield", enabled: noSelectedNotes }, - { title: "Unprotect subtree", command: "unprotectSubtree", uiIcon: "bx bx-shield", enabled: noSelectedNotes }, + { title: t("tree-context-menu.protect-subtree"), command: "protectSubtree", uiIcon: "bx bx-check-shield", enabled: noSelectedNotes }, + { title: t("tree-context-menu.unprotect-subtree"), command: "unprotectSubtree", uiIcon: "bx bx-shield", enabled: noSelectedNotes }, { title: "----" }, - { title: 'Copy / clone ', command: "copyNotesToClipboard", uiIcon: "bx bx-copy", + { title: `${t("tree-context-menu.copy-clone")} `, command: "copyNotesToClipboard", uiIcon: "bx bx-copy", enabled: isNotRoot && !isHoisted }, - { title: 'Clone to ... ', command: "cloneNotesTo", uiIcon: "bx bx-empty", + { title: `${t("tree-context-menu.clone-to")} `, command: "cloneNotesTo", uiIcon: "bx bx-empty", enabled: isNotRoot && !isHoisted }, - { title: 'Cut ', command: "cutNotesToClipboard", uiIcon: "bx bx-cut", + { title: `${t("tree-context-menu.cut")} `, command: "cutNotesToClipboard", uiIcon: "bx bx-cut", enabled: isNotRoot && !isHoisted && parentNotSearch }, - { title: 'Move to ... ', command: "moveNotesTo", uiIcon: "bx bx-empty", + { title: `${t("tree-context-menu.move-to")} `, command: "moveNotesTo", uiIcon: "bx bx-empty", enabled: isNotRoot && !isHoisted && parentNotSearch }, - { title: 'Paste into ', command: "pasteNotesFromClipboard", uiIcon: "bx bx-paste", + { title: `${t("tree-context-menu.paste-into")} `, command: "pasteNotesFromClipboard", uiIcon: "bx bx-paste", enabled: !clipboard.isClipboardEmpty() && notSearch && noSelectedNotes }, - { title: 'Paste after', command: "pasteNotesAfterFromClipboard", uiIcon: "bx bx-paste", + { title: t("tree-context-menu.paste-after"), command: "pasteNotesAfterFromClipboard", uiIcon: "bx bx-paste", enabled: !clipboard.isClipboardEmpty() && isNotRoot && !isHoisted && parentNotSearch && noSelectedNotes }, - { title: `Duplicate subtree `, command: "duplicateSubtree", uiIcon: "bx bx-empty", + { title: `${t("tree-context-menu.duplicate-subtree")} `, command: "duplicateSubtree", uiIcon: "bx bx-empty", enabled: parentNotSearch && isNotRoot && !isHoisted && notOptions }, { title: "----" }, - { title: "Export", command: "exportNote", uiIcon: "bx bx-empty", + { title: t("tree-context-menu.export"), command: "exportNote", uiIcon: "bx bx-empty", enabled: notSearch && noSelectedNotes && notOptions }, - { title: "Import into note", command: "importIntoNote", uiIcon: "bx bx-empty", + { title: t("tree-context-menu.import-into-note"), command: "importIntoNote", uiIcon: "bx bx-empty", enabled: notSearch && noSelectedNotes && notOptions }, - { title: "Apply bulk actions", command: "openBulkActionsDialog", uiIcon: "bx bx-list-plus", + { title: t("tree-context-menu.apply-bulk-actions"), command: "openBulkActionsDialog", uiIcon: "bx bx-list-plus", enabled: true } ].filter(row => row !== null); } diff --git a/src/public/app/services/i18n.js b/src/public/app/services/i18n.js index feb01f4d7..8be771f9b 100644 --- a/src/public/app/services/i18n.js +++ b/src/public/app/services/i18n.js @@ -12,7 +12,7 @@ export async function initLocale() { lng: locale, fallbackLng: "en", backend: { - loadPath: `/${window.glob.assetPath}/translations/{{lng}}/{{ns}}.json` + loadPath: `${window.glob.assetPath}/translations/{{lng}}/{{ns}}.json` } }); } diff --git a/src/public/app/services/note_types.js b/src/public/app/services/note_types.js index 73314245d..242df1a54 100644 --- a/src/public/app/services/note_types.js +++ b/src/public/app/services/note_types.js @@ -1,19 +1,20 @@ import server from "./server.js"; import froca from "./froca.js"; +import { t } from "./i18n.js"; async function getNoteTypeItems(command) { const items = [ - { title: "Text", command: command, type: "text", uiIcon: "bx bx-note" }, - { title: "Code", command: command, type: "code", uiIcon: "bx bx-code" }, - { title: "Saved Search", command: command, type: "search", uiIcon: "bx bx-file-find" }, - { title: "Relation Map", command: command, type: "relationMap", uiIcon: "bx bx-map-alt" }, - { title: "Note Map", command: command, type: "noteMap", uiIcon: "bx bx-map-alt" }, - { title: "Render Note", command: command, type: "render", uiIcon: "bx bx-extension" }, - { title: "Book", command: command, type: "book", uiIcon: "bx bx-book" }, - { title: "Mermaid Diagram", command: command, type: "mermaid", uiIcon: "bx bx-selection" }, - { title: "Canvas", command: command, type: "canvas", uiIcon: "bx bx-pen" }, - { title: "Web View", command: command, type: "webView", uiIcon: "bx bx-globe-alt" }, - { title: "Mind Map", command, type: "mindMap", uiIcon: "bx bx-sitemap" } + { title: t("note_types.text"), command: command, type: "text", uiIcon: "bx bx-note" }, + { title: t("note_types.code"), command: command, type: "code", uiIcon: "bx bx-code" }, + { title: t("note_types.saved-search"), command: command, type: "search", uiIcon: "bx bx-file-find" }, + { title: t("note_types.relation-map"), command: command, type: "relationMap", uiIcon: "bx bx-map-alt" }, + { title: t("note_types.note-map"), command: command, type: "noteMap", uiIcon: "bx bx-map-alt" }, + { title: t("note_types.render-note"), command: command, type: "render", uiIcon: "bx bx-extension" }, + { title: t("note_types.book"), command: command, type: "book", uiIcon: "bx bx-book" }, + { title: t("note_types.mermaid-diagram"), command: command, type: "mermaid", uiIcon: "bx bx-selection" }, + { title: t("note_types.canvas"), command: command, type: "canvas", uiIcon: "bx bx-pen" }, + { title: t("note_types.web-view"), command: command, type: "webView", uiIcon: "bx bx-globe-alt" }, + { title: t("note_types.mind-map"), command, type: "mindMap", uiIcon: "bx bx-sitemap" } ]; const templateNoteIds = await server.get("search-templates"); diff --git a/src/public/app/widgets/buttons/note_actions.js b/src/public/app/widgets/buttons/note_actions.js index fa3a14de6..1c8e53f3f 100644 --- a/src/public/app/widgets/buttons/note_actions.js +++ b/src/public/app/widgets/buttons/note_actions.js @@ -17,7 +17,7 @@ const TPL = ` } .note-actions .dropdown-menu { - width: 15em; + min-width: 15em; } .note-actions .dropdown-item[disabled], .note-actions .dropdown-item[disabled]:hover { diff --git a/src/public/app/widgets/note_map.js b/src/public/app/widgets/note_map.js index ab7d2c0e0..f4b00dc81 100644 --- a/src/public/app/widgets/note_map.js +++ b/src/public/app/widgets/note_map.js @@ -6,6 +6,7 @@ import appContext from "../components/app_context.js"; import NoteContextAwareWidget from "./note_context_aware_widget.js"; import linkContextMenuService from "../menus/link_context_menu.js"; import utils from "../services/utils.js"; +import { t } from "../services/i18n.js"; const esc = utils.escapeHtml; @@ -30,8 +31,8 @@ const TPL = `
- - + +
diff --git a/src/public/app/widgets/note_type.js b/src/public/app/widgets/note_type.js index 66e699eff..1bf121888 100644 --- a/src/public/app/widgets/note_type.js +++ b/src/public/app/widgets/note_type.js @@ -2,25 +2,26 @@ import server from '../services/server.js'; import mimeTypesService from '../services/mime_types.js'; import NoteContextAwareWidget from "./note_context_aware_widget.js"; import dialogService from "../services/dialog.js"; +import { t } from '../services/i18n.js'; const NOTE_TYPES = [ - { type: "file", title: "File", selectable: false }, - { type: "image", title: "Image", selectable: false }, - { type: "search", title: "Saved Search", selectable: false }, - { type: "noteMap", mime: '', title: "Note Map", selectable: false }, - { type: "launcher", mime: '', title: "Launcher", selectable: false }, - { type: "doc", mime: '', title: "Doc", selectable: false }, - { type: "contentWidget", mime: '', title: "Widget", selectable: false }, + { type: "file", title: t("note_types.file"), selectable: false }, + { type: "image", title: t("note_types.image"), selectable: false }, + { type: "search", title: t("note_types.saved-search"), selectable: false }, + { type: "noteMap", mime: '', title: t("note_types.note-map"), selectable: false }, + { type: "launcher", mime: '', title: t("note_types.launcher"), selectable: false }, + { type: "doc", mime: '', title: t("note_types.doc"), selectable: false }, + { type: "contentWidget", mime: '', title: t("note_types.widget"), selectable: false }, - { type: "text", mime: "text/html", title: "Text", selectable: true }, - { type: "relationMap", mime: "application/json", title: "Relation Map", selectable: true }, - { type: "mindMap", mime: "application/json", "title": "Mind Map", selectable: true }, - { type: "render", mime: '', title: "Render Note", selectable: true }, - { type: "canvas", mime: 'application/json', title: "Canvas", selectable: true }, - { type: "mermaid", mime: 'text/mermaid', title: "Mermaid Diagram", selectable: true }, - { type: "book", mime: '', title: "Book", selectable: true }, - { type: "webView", mime: '', title: "Web View", selectable: true }, - { type: "code", mime: 'text/plain', title: "Code", selectable: true } + { type: "text", mime: "text/html", title: t("note_types.text"), selectable: true }, + { type: "relationMap", mime: "application/json", title: t("note_types.relation-map"), selectable: true }, + { type: "mindMap", mime: "application/json", "title": t("note_types.mind-map"), selectable: true }, + { type: "render", mime: '', title: t("note_types.render-note"), selectable: true }, + { type: "canvas", mime: 'application/json', title: t("note_types.canvas"), selectable: true }, + { type: "mermaid", mime: 'text/mermaid', title: t("note_types.mermaid-diagram"), selectable: true }, + { type: "book", mime: '', title: t("note_types.book"), selectable: true }, + { type: "webView", mime: '', title: t("note_types.web-view"), selectable: true }, + { type: "code", mime: 'text/plain', title: t("note_types.code"), selectable: true } ]; const NOT_SELECTABLE_NOTE_TYPES = NOTE_TYPES.filter(nt => !nt.selectable).map(nt => nt.type); diff --git a/src/public/app/widgets/protected_note_switch.js b/src/public/app/widgets/protected_note_switch.js index e06bf973d..c7cd5c41a 100644 --- a/src/public/app/widgets/protected_note_switch.js +++ b/src/public/app/widgets/protected_note_switch.js @@ -1,3 +1,4 @@ +import { t } from "../services/i18n.js"; import protectedSessionService from "../services/protected_session.js"; import SwitchWidget from "./switch.js"; @@ -5,11 +6,11 @@ export default class ProtectedNoteSwitchWidget extends SwitchWidget { doRender() { super.doRender(); - this.$switchOnName.text("Protect the note"); - this.$switchOnButton.attr("title", "Note is not protected, click to make it protected"); + this.$switchOnName.text(t("protect_note.toggle-on")); + this.$switchOnButton.attr("title", t("protect_note.toggle-on-hint")); - this.$switchOffName.text("Unprotect the note"); - this.$switchOffButton.attr("title", "Note is protected, click to make it unprotected"); + this.$switchOffName.text(t("protect_note.toggle-off")); + this.$switchOffButton.attr("title", t("protect_note.toggle-off-hint")); } switchOn() { diff --git a/src/public/app/widgets/shared_info.js b/src/public/app/widgets/shared_info.js index 9183a5c2c..e6a6ad33e 100644 --- a/src/public/app/widgets/shared_info.js +++ b/src/public/app/widgets/shared_info.js @@ -1,6 +1,7 @@ import NoteContextAwareWidget from "./note_context_aware_widget.js"; import options from "../services/options.js"; import attributeService from "../services/attributes.js"; +import { t } from "../services/i18n.js"; const TPL = `
@@ -13,7 +14,7 @@ const TPL = ` } - . For help visit wiki. + . ${t("shared_info.help_link")}
`; export default class SharedInfoWidget extends NoteContextAwareWidget { @@ -36,7 +37,7 @@ export default class SharedInfoWidget extends NoteContextAwareWidget { if (syncServerHost) { link = `${syncServerHost}/share/${shareId}`; - this.$sharedText.text("This note is shared publicly on"); + this.$sharedText.text(t("shared_info.shared_publicly")); } else { let host = location.host; @@ -47,7 +48,7 @@ export default class SharedInfoWidget extends NoteContextAwareWidget { } link = `${location.protocol}//${host}${location.pathname}share/${shareId}`; - this.$sharedText.text("This note is shared locally on"); + this.$sharedText.text(t("shared_info.shared_locally")); } this.$sharedLink.attr("href", link).text(link); diff --git a/src/public/app/widgets/shared_switch.js b/src/public/app/widgets/shared_switch.js index 65f654c14..2a51eddc8 100644 --- a/src/public/app/widgets/shared_switch.js +++ b/src/public/app/widgets/shared_switch.js @@ -4,6 +4,7 @@ import server from "../services/server.js"; import utils from "../services/utils.js"; import syncService from "../services/sync.js"; import dialogService from "../services/dialog.js"; +import { t } from "../services/i18n.js"; export default class SharedSwitchWidget extends SwitchWidget { isEnabled() { @@ -15,11 +16,11 @@ export default class SharedSwitchWidget extends SwitchWidget { doRender() { super.doRender(); - this.$switchOnName.text("Shared"); - this.$switchOnButton.attr("title", "Share the note"); + this.$switchOnName.text(t("shared_switch.shared")); + this.$switchOnButton.attr("title", t("shared_switch.toggle-on-title")); - this.$switchOffName.text("Shared"); - this.$switchOffButton.attr("title", "Unshare the note"); + this.$switchOffName.text(t("shared_switch.shared")); + this.$switchOffButton.attr("title", t("shared_switch.toggle-off-title")); this.$helpButton.attr("data-help-page", "sharing.html").show(); this.$helpButton.on('click', e => utils.openHelp($(e.target))); @@ -39,9 +40,7 @@ export default class SharedSwitchWidget extends SwitchWidget { } if (this.note.getParentBranches().length === 1) { - const text = "This note exists only as a shared note, unsharing would delete it. Do you want to continue and thus delete this note?"; - - if (!await dialogService.confirm(text)) { + if (!await dialogService.confirm(t("shared_switch.shared-branch"))) { return; } } @@ -60,7 +59,7 @@ export default class SharedSwitchWidget extends SwitchWidget { this.$switchOff.toggle(!!isShared); if (switchDisabled) { - this.$widget.attr("title", "Note cannot be unshared here because it is shared through inheritance from an ancestor."); + this.$widget.attr("title", t("shared_switch.inherited")); this.$switchOff.addClass("switch-disabled"); } else { diff --git a/src/public/app/widgets/switch.js b/src/public/app/widgets/switch.js index e70fb5612..c59126f81 100644 --- a/src/public/app/widgets/switch.js +++ b/src/public/app/widgets/switch.js @@ -1,3 +1,4 @@ +import { t } from "../services/i18n.js"; import NoteContextAwareWidget from "./note_context_aware_widget.js"; const TPL = ` @@ -90,7 +91,7 @@ const TPL = `
- + `; export default class SwitchWidget extends NoteContextAwareWidget { diff --git a/src/public/app/widgets/template_switch.js b/src/public/app/widgets/template_switch.js index f18440973..0c2c064ca 100644 --- a/src/public/app/widgets/template_switch.js +++ b/src/public/app/widgets/template_switch.js @@ -1,5 +1,6 @@ import SwitchWidget from "./switch.js"; import attributeService from "../services/attributes.js"; +import { t } from "../services/i18n.js"; /** * Switch for the basic properties widget which allows the user to select whether the note is a template or not, which toggles the `#template` attribute. @@ -14,11 +15,11 @@ export default class TemplateSwitchWidget extends SwitchWidget { doRender() { super.doRender(); - this.$switchOnName.text("Template"); - this.$switchOnButton.attr("title", "Make the note a template"); + this.$switchOnName.text(t("template_switch.template")); + this.$switchOnButton.attr("title", t("template_switch.toggle-on-hint")); this.$switchOffName.text("Template"); - this.$switchOffButton.attr("title", "Remove the note as a template"); + this.$switchOffButton.attr("title", t("template_switch.toggle-off-hint")); this.$helpButton.attr("data-help-page", "template.html").show(); this.$helpButton.on('click', e => utils.openHelp($(e.target))); diff --git a/src/public/app/widgets/type_widgets/mind_map.js b/src/public/app/widgets/type_widgets/mind_map.js index 54aa54537..17429b607 100644 --- a/src/public/app/widgets/type_widgets/mind_map.js +++ b/src/public/app/widgets/type_widgets/mind_map.js @@ -34,6 +34,12 @@ export default class MindMapWidget extends TypeWidget { if (e.key === "F1") { e.stopPropagation(); } + + // Zoom controls + const isCtrl = e.ctrlKey && !e.altKey && !e.metaKey; + if (isCtrl && (e.key == "-" || e.key == "=" || e.key == "0")) { + e.stopPropagation(); + } }); super.doRender(); diff --git a/src/public/app/widgets/type_widgets/options/appearance/max_content_width.js b/src/public/app/widgets/type_widgets/options/appearance/max_content_width.js index a832cb5db..a874dff3f 100644 --- a/src/public/app/widgets/type_widgets/options/appearance/max_content_width.js +++ b/src/public/app/widgets/type_widgets/options/appearance/max_content_width.js @@ -9,7 +9,7 @@ const TPL = `

${t("max_content_width.default_description")}

-
+
diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json index 950a24805..8cdf4e411 100644 --- a/src/public/translations/cn/translation.json +++ b/src/public/translations/cn/translation.json @@ -1023,8 +1023,8 @@ "title": "下拉菜单可用的MIME文件类型" }, "vim_key_bindings": { - "use_vim_keybindings_in_code_notes": "在代码笔记中使用Vim键绑定(无ex模式)", - "enable_vim_keybindings": "启用Vim键绑定" + "use_vim_keybindings_in_code_notes": "", + "enable_vim_keybindings": "" }, "wrap_lines": { "wrap_lines_in_code_notes": "代码笔记自动换行", diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index d92f2fe60..d2579f789 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -1026,8 +1026,8 @@ "title": "Available MIME types in the dropdown" }, "vim_key_bindings": { - "use_vim_keybindings_in_code_notes": "Use vim keybindings in code notes (no ex mode)", - "enable_vim_keybindings": "Enable Vim Keybindings" + "use_vim_keybindings_in_code_notes": "Vim keybindings", + "enable_vim_keybindings": "Enable Vim keybindings in code notes (no ex mode)" }, "wrap_lines": { "wrap_lines_in_code_notes": "Wrap lines in code notes", @@ -1244,5 +1244,79 @@ "note_is_editable": "Note is editable if it's not too long.", "note_is_read_only": "Note is read-only, but can be edited with a button click.", "note_is_always_editable": "Note is always editable, regardless of its length." - } + }, + "note-map": { + "button-link-map": "Link Map", + "button-tree-map": "Tree map" + }, + "tree-context-menu": { + "open-in-a-new-tab": "Open in a new tab", + "open-in-a-new-split": "Open in a new split", + "insert-note-after": "Insert note after", + "insert-child-note": "Insert child note", + "delete": "Delete", + "search-in-subtree": "Search in subtree", + "edit-branch-prefix": "Edit branch prefix", + "advanced": "Advanced", + "expand-subtree": "Expand subtree", + "collapse-subtree": "Collapse subtree", + "sort-by": "Sort by...", + "recent-changes-in-subtree": "Recent changes in subtree", + "convert-to-attachment": "Convert to attachment", + "copy-note-path-to-clipboard": "Copy note path to clipboard", + "protect-subtree": "Protect subtree", + "unprotect-subtree": "Unprotect subtree", + "copy-clone": "Copy / clone", + "clone-to": "Clone to...", + "cut": "Cut", + "move-to": "Move to...", + "paste-into": "Paste into", + "paste-after": "Paste after", + "duplicate-subtree": "Duplicate subtree", + "export": "Export", + "import-into-note": "Import into note", + "apply-bulk-actions": "Apply bulk actions" + }, + "shared_info": { + "shared_publicly": "This note is shared publicly on", + "shared_locally": "This note is shared locally on", + "help_link": "For help visit wiki." + }, + "note_types": { + "text": "Text", + "code": "Code", + "saved-search": "Saved Search", + "relation-map": "Relation Map", + "note-map": "Note Map", + "render-note": "Render Note", + "book": "Book", + "mermaid-diagram": "Mermaid Diagram", + "canvas": "Canvas", + "web-view": "Web View", + "mind-map": "Mind Map", + "file": "File", + "image": "Image", + "launcher": "Launcher", + "doc": "Doc", + "widget": "Widget" + }, + "protect_note": { + "toggle-on": "Protect the note", + "toggle-off": "Unprotect the note", + "toggle-on-hint": "Note is not protected, click to make it protected", + "toggle-off-hint": "Note is protected, click to make it unprotected" + }, + "shared_switch": { + "shared": "Shared", + "toggle-on-title": "Share the note", + "toggle-off-title": "Unshare the note", + "shared-branch": "This note exists only as a shared note, unsharing would delete it. Do you want to continue and thus delete this note?", + "inherited": "Note cannot be unshared here because it is shared through inheritance from an ancestor." + }, + "template_switch": { + "template": "Template", + "toggle-on-hint": "Make the note a template", + "toggle-off-hint": "Remove the note as a template" + }, + "open-help-page": "Open help page" } diff --git a/src/public/translations/es/translation.json b/src/public/translations/es/translation.json index 638658c61..c1176ad22 100644 --- a/src/public/translations/es/translation.json +++ b/src/public/translations/es/translation.json @@ -1026,8 +1026,8 @@ "title": "Tipos MIME disponibles en el menú desplegable" }, "vim_key_bindings": { - "use_vim_keybindings_in_code_notes": "Utilizar combinaciones de teclas Vim en notas de código (no modo ex)", - "enable_vim_keybindings": "Habilitar combinaciones de teclas de Vim" + "use_vim_keybindings_in_code_notes": "", + "enable_vim_keybindings": "" }, "wrap_lines": { "wrap_lines_in_code_notes": "Ajustar líneas en notas de código", @@ -1046,7 +1046,7 @@ "attachment_auto_deletion_description": "Los archivos adjuntos se eliminan (y borran) automáticamente si ya no se hace referencia a ellos en su nota después de un tiempo de espera definido.", "erase_attachments_after_x_seconds": "Borrar archivos adjuntos después de X segundos de no usarse en su nota", "manual_erasing_description": "También puede activar el borrado manualmente (sin considerar el tiempo de espera definido anteriormente):", - "erase_unused_attachments_now": "Borrar ahora los archivos adjuntos no utilizados en la nota ", + "erase_unused_attachments_now": "Borrar ahora los archivos adjuntos no utilizados en la nota", "unused_attachments_erased": "Los archivos adjuntos no utilizados se han eliminado." }, "network_connections": { diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.json index f3285c4e7..6bc64185d 100644 --- a/src/public/translations/ro/translation.json +++ b/src/public/translations/ro/translation.json @@ -77,7 +77,7 @@ "attachment_auto_deletion_description": "Atașamentele se șterg automat (permanent) dacă nu sunt referențiate de către notița lor părinte după un timp prestabilit de timp.", "attachment_erasure_timeout": "Perioadă de ștergere a atașamentelor", "erase_attachments_after_x_seconds": "Șterge atașamentele după X secunde după ce acestea n-au mai fost folosite într-o notiță", - "erase_unused_attachments_now": "Se poate lansa o ștergere manuală (fără a mai considera perioada de grație definită anterior):", + "erase_unused_attachments_now": "Elimină atașamentele șterse acum", "manual_erasing_description": "Șterge acum toate atașamentele nefolosite din notițe", "unused_attachments_erased": "Atașamentele nefolosite au fost șterse." }, @@ -142,8 +142,8 @@ "icon_class": "valoarea acestei etichete este adăugată ca o clasă CSS la iconița notiței din ierarhia notițelor, fapt ce poate ajuta la identificarea vizuală mai rapidă a notițelor. Un exemplu ar fi „bx bx-home” pentru iconițe preluate din boxicons. Poate fi folosită în notițe de tip șablon.", "inbox": "locația implicită în care vor apărea noile notițe atunci când se crează o noitiță utilizând butonul „Crează notiță” din bara laterală, notițele vor fi create în interiorul notiței cu această etichetă.", "inherit": "atributele acestei notițe vor fi moștenite chiar dacă nu există o relație părinte-copil între notițe. A se vedea relația de tip șablon pentru un concept similar. De asemenea, a se vedea moștenirea atributelor în documentație.", - "inheritable": "Moștenibil", - "inheritable_title": "Atributele moștenibile vor fi moștenite tuturor descendenților acestei notițe.", + "inheritable": "Moștenibilă", + "inheritable_title": "Atributele moștenibile vor fi moștenite de către toți descendenții acestei notițe.", "inverse_relation": "Relație inversă", "inverse_relation_title": "Setare opțională pentru a defini relația inversă. Exemplu: Tată - Fiu sunt două relații inverse.", "is_owned_by_note": "este deținut(ă) de notița", @@ -1219,8 +1219,8 @@ "vacuuming_database": "Baza de date este în curs de compactare..." }, "vim_key_bindings": { - "enable_vim_keybindings": "Activează combinațiile de taste Vim", - "use_vim_keybindings_in_code_notes": "Permite utilizarea combinațiilor de taste în stil Vim pentru notițeled e tip cod (fără modul ex)" + "enable_vim_keybindings": "Permite utilizarea combinațiilor de taste în stil Vim pentru notițele de tip cod (fără modul ex)", + "use_vim_keybindings_in_code_notes": "Combinații de taste Vim" }, "web_view": { "create_label": "Pentru a începe, creați o etichetă cu adresa URL de încorporat, e.g. #webViewSrc=\"https://www.google.com\"", @@ -1244,5 +1244,79 @@ }, "svg_export_button": { "button_title": "Exportă diagrama ca SVG" - } + }, + "note-map": { + "button-link-map": "Harta legăturilor", + "button-tree-map": "Harta ierarhiei" + }, + "tree-context-menu": { + "advanced": "Opțiuni avansate", + "apply-bulk-actions": "Aplică acțiuni în masă", + "clone-to": "Clonare în...", + "collapse-subtree": "Minimizează subnotițele", + "convert-to-attachment": "Convertește în atașament", + "copy-clone": "Copiază/clonează", + "copy-note-path-to-clipboard": "Copiază calea notiței în clipboard", + "cut": "Decupează", + "delete": "Șterge", + "duplicate-subtree": "Dublifică ierarhia", + "edit-branch-prefix": "Editează prefixul ramurii", + "expand-subtree": "Expandează subnotițele", + "export": "Exportă", + "import-into-note": "Importă în notiță", + "insert-child-note": "Inserează subnotiță", + "insert-note-after": "Inserează după notiță", + "move-to": "Mutare la...", + "open-in-a-new-split": "Deschide în lateral", + "open-in-a-new-tab": "Deschide în tab nou", + "paste-after": "Lipește după notiță", + "paste-into": "Lipește în notiță", + "protect-subtree": "Protejează ierarhia", + "recent-changes-in-subtree": "Schimbări recente în ierarhie", + "search-in-subtree": "Caută în ierarhie", + "sort-by": "Ordonare după...", + "unprotect-subtree": "Deprotejează ierarhia" + }, + "shared_info": { + "help_link": "Pentru informații vizitați wiki-ul.", + "shared_locally": "Această notiță este partajată local la", + "shared_publicly": "Această notiță este partajată public la" + }, + "note_types": { + "book": "Carte", + "canvas": "Schiță", + "code": "Cod sursă", + "mermaid-diagram": "Diagramă Mermaid", + "mind-map": "Hartă mentală", + "note-map": "Hartă notițe", + "relation-map": "Hartă relații", + "render-note": "Randare notiță", + "saved-search": "Căutare salvată", + "text": "Text", + "web-view": "Vizualizare web", + "doc": "Document", + "file": "Fișier", + "image": "Imagine", + "launcher": "Scurtătură", + "widget": "Widget" + }, + "protect_note": { + "toggle-off": "Deprotejează notița", + "toggle-off-hint": "Notița este protejată, click pentru a o deproteja", + "toggle-on": "Protejează notița", + "toggle-on-hint": "Notița nu este protejată, clic pentru a o proteja" + }, + "shared_switch": { + "inherited": "Nu se poate înlătura partajarea deoarece notița este partajată prin moștenirea de la o notiță părinte.", + "shared": "Partajată", + "shared-branch": "Această notiță există doar ca o notiță partajată, anularea partajării ar cauza ștergerea ei. Sigur doriți ștergerea notiței?", + "toggle-off-title": "Anulează partajarea notițeii", + "toggle-on-title": "Partajează notița" + }, + "template_switch": { + "template": "Șablon", + "toggle-off-hint": "Înlătură notița ca șablon", + "toggle-on-hint": "Marchează notița drept șablon" + }, + "open-help-page": "Deschide pagina de informații" } diff --git a/src/services/build.ts b/src/services/build.ts index 01dbdd5d0..ea9553c7f 100644 --- a/src/services/build.ts +++ b/src/services/build.ts @@ -1,4 +1,4 @@ export default { - buildDate: "2024-09-07T07:02:55Z", - buildRevision: "4f6392ce14f2cd727f6ce93499fd0c8ba686321e" + buildDate: "2024-09-07T18:36:34Z", + buildRevision: "7c0d6930fa8f20d269dcfbcbc8f636a25f6bb9a7" }; diff --git a/src/services/i18n.ts b/src/services/i18n.ts new file mode 100644 index 000000000..ea109499c --- /dev/null +++ b/src/services/i18n.ts @@ -0,0 +1,31 @@ +import i18next from "i18next"; +import Backend from "i18next-fs-backend"; +import options from "./options.js"; +import sql_init from "./sql_init.js"; + +export async function initializeTranslations() { + // Initialize translations + await i18next.use(Backend).init({ + lng: await getCurrentLanguage(), + fallbackLng: "en", + ns: "server", + backend: { + loadPath: "translations/{{lng}}/{{ns}}.json" + }, + debug: true + }); +} + +function getCurrentLanguage() { + let language; + if (sql_init.isDbInitialized()) { + language = options.getOption("locale"); + } + + if (!language) { + console.info("Language option not found, falling back to en."); + language = "en"; + } + + return language; +} \ No newline at end of file diff --git a/src/services/keyboard_actions.ts b/src/services/keyboard_actions.ts index 28e3aeeb4..c00186ef6 100644 --- a/src/services/keyboard_actions.ts +++ b/src/services/keyboard_actions.ts @@ -4,6 +4,7 @@ import optionService from "./options.js"; import log from "./log.js"; import utils from "./utils.js"; import { KeyboardShortcut } from './keyboard_actions_interface.js'; +import { t } from "i18next"; const isMac = process.platform === "darwin"; const isElectron = utils.isElectron(); @@ -19,7 +20,7 @@ const isElectron = utils.isElectron(); const DEFAULT_KEYBOARD_ACTIONS: KeyboardShortcut[] = [ { - separator: "Note navigation" + separator: t("keyboard_actions.note-navigation") }, { actionName: "backInNoteHistory", @@ -36,7 +37,7 @@ const DEFAULT_KEYBOARD_ACTIONS: KeyboardShortcut[] = [ { actionName: "jumpToNote", defaultShortcuts: ["CommandOrControl+J"], - description: 'Open "Jump to note" dialog', + description: t("keyboard_actions.open-jump-to-note-dialog"), scope: "window" }, { @@ -52,37 +53,37 @@ const DEFAULT_KEYBOARD_ACTIONS: KeyboardShortcut[] = [ { actionName: "searchInSubtree", defaultShortcuts: ["CommandOrControl+Shift+S"], - description: "Search for notes in the active note's subtree", + description: t("keyboard_actions.search-in-subtree"), scope: "note-tree" }, { actionName: "expandSubtree", defaultShortcuts: [], - description: "Expand subtree of current note", + description: t("keyboard_actions.expand-subtree"), scope: "note-tree" }, { actionName: "collapseTree", defaultShortcuts: ["Alt+C"], - description: "Collapses the complete note tree", + description: t("keyboard_actions.collapse-tree"), scope: "window" }, { actionName: "collapseSubtree", defaultShortcuts: ["Alt+-"], - description: "Collapses subtree of current note", + description: t("keyboard_actions.collapse-subtree"), scope: "note-tree" }, { actionName: "sortChildNotes", defaultShortcuts: ["Alt+S"], - description: "Sort child notes", + description: t("keyboard_actions.sort-child-notes"), scope: "note-tree" }, { - separator: "Creating and moving notes" + separator: t("keyboard_actions.creating-and-moving-notes") }, { actionName: "createNoteAfter", @@ -97,49 +98,49 @@ const DEFAULT_KEYBOARD_ACTIONS: KeyboardShortcut[] = [ { actionName: "createNoteIntoInbox", defaultShortcuts: ["global:CommandOrControl+Alt+P"], - description: "Create and open in the inbox (if defined) or day note", + description: t("keyboard_actions.create-note-into-inbox"), scope: "window" }, { actionName: "deleteNotes", defaultShortcuts: ["Delete"], - description: "Delete note", + description: t("keyboard_actions.delete-note"), scope: "note-tree" }, { actionName: "moveNoteUp", defaultShortcuts: isMac ? ["Alt+Up"] : ["CommandOrControl+Up"], - description: "Move note up", + description: t("keyboard_actions.move-note-up"), scope: "note-tree" }, { actionName: "moveNoteDown", defaultShortcuts: isMac ? ["Alt+Down"] : ["CommandOrControl+Down"], - description: "Move note down", + description: t("keyboard_actions.move-note-down"), scope: "note-tree" }, { actionName: "moveNoteUpInHierarchy", defaultShortcuts: isMac ? ["Alt+Left"] : ["CommandOrControl+Left"], - description: "Move note up in hierarchy", + description: t("keyboard_actions.move-note-up-in-hierarchy"), scope: "note-tree" }, { actionName: "moveNoteDownInHierarchy", defaultShortcuts: isMac ? ["Alt+Right"] : ["CommandOrControl+Right"], - description: "Move note down in hierarchy", + description: t("keyboard_actions.move-note-down-in-hierarchy"), scope: "note-tree" }, { actionName: "editNoteTitle", defaultShortcuts: ["Enter"], - description: "Jump from tree to the note detail and edit title", + description: t("keyboard_actions.edit-note-title"), scope: "note-tree" }, { actionName: "editBranchPrefix", defaultShortcuts: ["F2"], - description: "Show Edit branch prefix dialog", + description: t("keyboard_actions.edit-branch-prefix"), scope: "note-tree" }, { @@ -154,399 +155,398 @@ const DEFAULT_KEYBOARD_ACTIONS: KeyboardShortcut[] = [ }, { - separator: "Note clipboard" + separator: t("keyboard_actions.note-clipboard") }, - { actionName: "copyNotesToClipboard", defaultShortcuts: ["CommandOrControl+C"], - description: "Copy selected notes to the clipboard", + description: t("keyboard_actions.copy-notes-to-clipboard"), scope: "note-tree" }, { actionName: "pasteNotesFromClipboard", defaultShortcuts: ["CommandOrControl+V"], - description: "Paste notes from the clipboard into active note", + description: t("keyboard_actions.paste-notes-from-clipboard"), scope: "note-tree" }, { actionName: "cutNotesToClipboard", defaultShortcuts: ["CommandOrControl+X"], - description: "Cut selected notes to the clipboard", + description: t("keyboard_actions.cut-notes-to-clipboard"), scope: "note-tree" }, { actionName: "selectAllNotesInParent", defaultShortcuts: ["CommandOrControl+A"], - description: "Select all notes from the current note level", + description: t("keyboard_actions.select-all-notes-in-parent"), scope: "note-tree" }, { actionName: "addNoteAboveToSelection", defaultShortcuts: ["Shift+Up"], - description: "Add note above to the selection", + description: t("keyboard_actions.add-note-above-to-the-selection"), scope: "note-tree" }, { actionName: "addNoteBelowToSelection", defaultShortcuts: ["Shift+Down"], - description: "Add note above to the selection", + description: t("keyboard_actions.add-note-below-to-selection"), scope: "note-tree" }, { actionName: "duplicateSubtree", defaultShortcuts: [], - description: "Duplicate subtree", + description: t("keyboard_actions.duplicate-subtree"), scope: "note-tree" }, { - separator: "Tabs & Windows" + separator: t("keyboard_actions.tabs-and-windows") }, { actionName: "openNewTab", defaultShortcuts: isElectron ? ["CommandOrControl+T"] : [], - description: "Opens new tab", + description: t("keyboard_actions.open-new-tab"), scope: "window" }, { actionName: "closeActiveTab", defaultShortcuts: isElectron ? ["CommandOrControl+W"] : [], - description: "Closes active tab", + description: t("keyboard_actions.close-active-tab"), scope: "window" }, { actionName: "reopenLastTab", defaultShortcuts: isElectron ? ["CommandOrControl+Shift+T"] : [], - description: "Reopens the last closed tab", + description: t("keyboard_actions.reopen-last-tab"), scope: "window" }, { actionName: "activateNextTab", defaultShortcuts: isElectron ? ["CommandOrControl+Tab", "CommandOrControl+PageDown"] : [], - description: "Activates tab on the right", + description: t("keyboard_actions.activate-next-tab"), scope: "window" }, { actionName: "activatePreviousTab", defaultShortcuts: isElectron ? ["CommandOrControl+Shift+Tab", "CommandOrControl+PageUp"] : [], - description: "Activates tab on the left", + description: t("keyboard_actions.activate-previous-tab"), scope: "window" }, { actionName: "openNewWindow", defaultShortcuts: [], - description: "Open new empty window", + description: t("keyboard_actions.open-new-window"), scope: "window" }, { actionName: "toggleTray", defaultShortcuts: [], - description: "Shows/hides the application from the system tray", + description: t("keyboard_actions.toggle-tray"), scope: "window" }, { actionName: "firstTab", defaultShortcuts: ["CommandOrControl+1"], - description: "Activates the first tab in the list", + description: t("keyboard_actions.first-tab"), scope: "window" }, { actionName: "secondTab", defaultShortcuts: ["CommandOrControl+2"], - description: "Activates the second tab in the list", + description: t("keyboard_actions.second-tab"), scope: "window" }, { actionName: "thirdTab", defaultShortcuts: ["CommandOrControl+3"], - description: "Activates the third tab in the list", + description: t("keyboard_actions.third-tab"), scope: "window" }, { actionName: "fourthTab", defaultShortcuts: ["CommandOrControl+4"], - description: "Activates the fourth tab in the list", + description: t("keyboard_actions.fourth-tab"), scope: "window" }, { actionName: "fifthTab", defaultShortcuts: ["CommandOrControl+5"], - description: "Activates the fifth tab in the list", + description: t("keyboard_actions.fifth-tab"), scope: "window" }, { actionName: "sixthTab", defaultShortcuts: ["CommandOrControl+6"], - description: "Activates the sixth tab in the list", + description: t("keyboard_actions.sixth-tab"), scope: "window" }, { actionName: "seventhTab", defaultShortcuts: ["CommandOrControl+7"], - description: "Activates the seventh tab in the list", + description: t("keyboard_actions.seventh-tab"), scope: "window" }, { actionName: "eigthTab", defaultShortcuts: ["CommandOrControl+8"], - description: "Activates the eighth tab in the list", + description: t("keyboard_actions.eight-tab"), scope: "window" }, { actionName: "ninthTab", defaultShortcuts: ["CommandOrControl+9"], - description: "Activates the ninth tab in the list", + description: t("keyboard_actions.ninth-tab"), scope: "window" }, { actionName: "lastTab", defaultShortcuts: [], - description: "Activates the last tab in the list", + description: t("keyboard_actions.last-tab"), scope: "window" }, { - separator: "Dialogs" + separator: t("keyboard_actions.dialogs") }, { actionName: "showNoteSource", defaultShortcuts: [], - description: "Shows Note Source dialog", + description: t("keyboard_actions.show-note-source"), scope: "window" }, { actionName: "showOptions", defaultShortcuts: [], - description: "Shows Options dialog", + description: t("keyboard_actions.show-options"), scope: "window" }, { actionName: "showRevisions", defaultShortcuts: [], - description: "Shows Note Revisions dialog", + description: t("keyboard_actions.show-revisions"), scope: "window" }, { actionName: "showRecentChanges", defaultShortcuts: [], - description: "Shows Recent Changes dialog", + description: t("keyboard_actions.show-recent-changes"), scope: "window" }, { actionName: "showSQLConsole", defaultShortcuts: ["Alt+O"], - description: "Shows SQL Console dialog", + description: t("keyboard_actions.show-sql-console"), scope: "window" }, { actionName: "showBackendLog", defaultShortcuts: [], - description: "Shows Backend Log dialog", + description: t("keyboard_actions.show-backend-log"), scope: "window" }, { actionName: "showHelp", defaultShortcuts: ["F1"], - description: "Shows built-in Help / cheatsheet", + description: t("keyboard_actions.show-help"), scope: "window" }, { - separator: "Text note operations" + separator: t("keyboard_actions.text-note-operations") }, { actionName: "addLinkToText", defaultShortcuts: ["CommandOrControl+L"], - description: "Open dialog to add link to the text", + description: t("keyboard_actions.add-link-to-text"), scope: "text-detail" }, { actionName: "followLinkUnderCursor", defaultShortcuts: ["CommandOrControl+Enter"], - description: "Follow link within which the caret is placed", + description: t("keyboard_actions.follow-link-under-cursor"), scope: "text-detail" }, { actionName: "insertDateTimeToText", defaultShortcuts: ["Alt+T"], - description: "Insert current date & time into text", + description: t("keyboard_actions.insert-date-and-time-to-text"), scope: "text-detail" }, { actionName: "pasteMarkdownIntoText", defaultShortcuts: [], - description: "Pastes Markdown from clipboard into text note", + description: t("keyboard_actions.paste-markdown-into-text"), scope: "text-detail" }, { actionName: "cutIntoNote", defaultShortcuts: [], - description: "Cuts the selection from the current note and creates subnote with the selected text", + description: t("keyboard_actions.cut-into-note"), scope: "text-detail" }, { actionName: "addIncludeNoteToText", defaultShortcuts: [], - description: "Opens the dialog to include a note", + description: t("keyboard_actions.add-include-note-to-text"), scope: "text-detail" }, { actionName: "editReadOnlyNote", defaultShortcuts: [], - description: "Edit a read-only note", + description: t("keyboard_actions.edit-readonly-note"), scope: "window" }, { - separator: "Attributes (labels & relations)" + separator: t("keyboard_actions.attributes-labels-and-relations") }, { actionName: "addNewLabel", defaultShortcuts: ["Alt+L"], - description: "Create new label", + description: t("keyboard_actions.add-new-label"), scope: "window" }, { actionName: "addNewRelation", defaultShortcuts: ["Alt+R"], - description: "Create new relation", + description: t("keyboard_actions.create-new-relation"), scope: "window" }, { - separator: "Ribbon tabs" + separator: t("keyboard_actions.ribbon-tabs") }, { actionName: "toggleRibbonTabBasicProperties", defaultShortcuts: [], - description: "Toggle Basic Properties", + description: t("keyboard_actions.toggle-basic-properties"), scope: "window" }, { actionName: "toggleRibbonTabBookProperties", defaultShortcuts: [], - description: "Toggle Book Properties", + description: t("keyboard_actions.toggle-book-properties"), scope: "window" }, { actionName: "toggleRibbonTabFileProperties", defaultShortcuts: [], - description: "Toggle File Properties", + description: t("keyboard_actions.toggle-file-properties"), scope: "window" }, { actionName: "toggleRibbonTabImageProperties", defaultShortcuts: [], - description: "Toggle Image Properties", + description: t("keyboard_actions.toggle-image-properties"), scope: "window" }, { actionName: "toggleRibbonTabOwnedAttributes", defaultShortcuts: ["Alt+A"], - description: "Toggle Owned Attributes", + description: t("keyboard_actions.toggle-owned-attributes"), scope: "window" }, { actionName: "toggleRibbonTabInheritedAttributes", defaultShortcuts: [], - description: "Toggle Inherited Attributes", + description: t("keyboard_actions.toggle-inherited-attributes"), scope: "window" }, { actionName: "toggleRibbonTabPromotedAttributes", defaultShortcuts: [], - description: "Toggle Promoted Attributes", + description: t("keyboard_actions.toggle-promoted-attributes"), scope: "window" }, { actionName: "toggleRibbonTabNoteMap", defaultShortcuts: [], - description: "Toggle Link Map", + description: t("keyboard_actions.toggle-link-map"), scope: "window" }, { actionName: "toggleRibbonTabNoteInfo", defaultShortcuts: [], - description: "Toggle Note Info", + description: t("keyboard_actions.toggle-note-info"), scope: "window" }, { actionName: "toggleRibbonTabNotePaths", defaultShortcuts: [], - description: "Toggle Note Paths", + description: t("keyboard_actions.toggle-note-paths"), scope: "window" }, { actionName: "toggleRibbonTabSimilarNotes", defaultShortcuts: [], - description: "Toggle Similar Notes", + description: t("keyboard_actions.toggle-similar-notes"), scope: "window" }, { - separator: "Other" + separator: t("keyboard_actions.other") }, { actionName: "toggleRightPane", defaultShortcuts: [], - description: "Toggle the display of the right pane, which includes Table of Contents and Highlights", + description: t("keyboard_actions.toggle-right-pane"), scope: "window" }, { actionName: "printActiveNote", defaultShortcuts: [], - description: "Print active note", + description: t("keyboard_actions.print-active-note"), scope: "window" }, { actionName: "openNoteExternally", defaultShortcuts: [], - description: "Open note as a file with default application", + description: t("keyboard_actions.open-note-externally"), scope: "window" }, { actionName: "renderActiveNote", defaultShortcuts: [], - description: "Render (re-render) active note", + description: t("keyboard_actions.render-active-note"), scope: "window" }, { actionName: "runActiveNote", defaultShortcuts: ["CommandOrControl+Enter"], - description: "Run active JavaScript (frontend/backend) code note", + description: t("keyboard_actions.run-active-note"), scope: "code-detail" }, { actionName: "toggleNoteHoisting", defaultShortcuts: ["Alt+H"], - description: "Toggles note hoisting of active note", + description: t("keyboard_actions.toggle-note-hoisting"), scope: "window" }, { actionName: "unhoist", defaultShortcuts: ["Alt+U"], - description: "Unhoist from anywhere", + description: t("keyboard_actions.unhoist"), scope: "window" }, { actionName: "reloadFrontendApp", defaultShortcuts: ["F5", "CommandOrControl+R"], - description: "Reload frontend App", + description: t("keyboard_actions.reload-frontend-app"), scope: "window" }, { actionName: "openDevTools", defaultShortcuts: isElectron ? ["CommandOrControl+Shift+I"] : [], - description: "Open dev tools", + description: t("keyboard_actions.open-dev-tools"), scope: "window" }, { @@ -557,43 +557,43 @@ const DEFAULT_KEYBOARD_ACTIONS: KeyboardShortcut[] = [ { actionName: "toggleLeftPane", defaultShortcuts: [], - description: "Toggle left (note tree) panel", + description: t("keyboard_actions.toggle-left-note-tree-panel"), scope: "window" }, { actionName: "toggleFullscreen", defaultShortcuts: ["F11"], - description: "Toggle full screen", + description: t("keyboard_actions.toggle-full-screen"), scope: "window" }, { actionName: "zoomOut", defaultShortcuts: isElectron ? ["CommandOrControl+-"] : [], - description: "Zoom Out", + description: t("keyboard_actions.zoom-out"), scope: "window" }, { actionName: "zoomIn", - description: "Zoom In", + description: t("keyboard_actions.zoom-in"), defaultShortcuts: isElectron ? ["CommandOrControl+="] : [], scope: "window" }, { actionName: "zoomReset", - description: "Reset zoom level", + description: t("keyboard_actions.reset-zoom-level"), defaultShortcuts: isElectron ? ["CommandOrControl+0"] : [], scope: "window" }, { actionName: "copyWithoutFormatting", defaultShortcuts: ["CommandOrControl+Alt+C"], - description: "Copy selected text without formatting", + description: t("keyboard_actions.copy-without-formatting"), scope: "text-detail" }, { actionName: "forceSaveRevision", defaultShortcuts: [], - description: "Force creating / saving new note revision of the active note", + description: t("keyboard_actions.force-save-revision"), scope: "window" } ]; diff --git a/src/views/desktop.ejs b/src/views/desktop.ejs index 64135659a..59a4b2b4f 100644 --- a/src/views/desktop.ejs +++ b/src/views/desktop.ejs @@ -7,7 +7,7 @@ TriliumNext Notes - +