From f7b16680d511cfff92e79ef7ab8a6c29c482a0bf Mon Sep 17 00:00:00 2001 From: PJ Date: Fri, 8 Nov 2024 09:44:10 -0500 Subject: [PATCH] Add vim-style navigation hotkeys (mod-hjkl) --- README.md | 2 + manifest.json | 2 +- package.json | 8 +- pnpm-lock.yaml | 531 +++++++++++++++++++++++++--------------------- src/FolderMenu.ts | 2 +- src/menus.ts | 5 +- versions.json | 2 +- 7 files changed, 301 insertions(+), 251 deletions(-) diff --git a/README.md b/README.md index 59a4a09..f5b12fe 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ ## Quick Explorer for Obsidian +> New in 0.2.11: Vim-style navigation hotkeys: Mod+h/j/k/l (Mod=Cmd on Mac, Ctrl on PC) > New in 0.2.0: If you're using Obsidian 0.16.3 and have tab titlebars turned on, Quick Explorer can use them in addition to (or in place of) the main title bar or status bar. If you want to hide QE's default breadcrumbs, you can turn them off using the [Style Settings](https://github.com/mgmeyers/obsidian-style-settings) plugin. [Obsidian](https://obsidian.md)'s in-app file explorer is pretty flexible, but it's almost 100% mouse-driven and not at all keyboard-friendly. Worse, if you have a lot of folders with lots of files in them, you can spend a lot of time expanding and collapsing folders, and scrolling around to find what you're looking for. This can be especially annoying when all you want is to do something with the "current" folder, or a parent of it... *without* needing to open a sidebar and close it again afterwards. (And last, but not least, trying to rapidly preview the contents of a lot of notes with the mouse is a giant PITA.) @@ -42,6 +43,7 @@ And an extensive set of keyboard operations is available as well: * Typing normal text searches item names within a folder (or context menu), selecting the next matching item * Up, Down, Home, and End move within a folder or context menu * Left and Right arrows select parent or child folders +* Vim enjoyer? Use Mod-j/k for up and down, Mod-h/l for left and right (Mod=Cmd on Mac, Ctrl on PC) * Enter selects an item to open, Ctrl-or-Cmd + Enter opens a file in a new pane * Backslash (`\`), the "Context Menu" key, or Alt + Enter opens a context menu for the selected file or folder * F2 initiates a rename of the current file or folder, Shift+F2 begins a move diff --git a/manifest.json b/manifest.json index 2cf0801..acb3626 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "Quick Explorer", "author": "PJ Eby", "authorUrl": "https://github.com/pjeby", - "version": "0.2.10", + "version": "0.2.11", "description": "Perform file explorer operations (and see your current file path) from the title bar, using the mouse or keyboard", "minAppVersion": "1.5.8", "isDesktopOnly": true diff --git a/package.json b/package.json index 1aebdd9..555bd18 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,10 @@ }, "license": "ISC", "devDependencies": { - "@ophidian/build": "^1.0.1", - "@ophidian/core": "git://github.com/ophidian-lib/core.git", - "monkey-around": "^2.1", - "obsidian": "0.15.9", + "@ophidian/build": "^1.2", + "@ophidian/core": "0.0.24", + "monkey-around": "^3", + "obsidian": "1.3.5", "redom": "^3.27.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9147677..1eab6c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,17 +1,17 @@ lockfileVersion: 5.4 specifiers: - '@ophidian/build': ^1.0.1 - '@ophidian/core': git://github.com/ophidian-lib/core.git - monkey-around: ^2.1 - obsidian: 0.15.9 + '@ophidian/build': ^1.2 + '@ophidian/core': 0.0.24 + monkey-around: ^3 + obsidian: 1.3.5 redom: ^3.27.1 devDependencies: - '@ophidian/build': 1.0.1 - '@ophidian/core': github.com/ophidian-lib/core/4a67726fd4108a49eb191aaf44ea069d2d37b824 - monkey-around: 2.3.0 - obsidian: 0.15.9 + '@ophidian/build': 1.2.1 + '@ophidian/core': 0.0.24 + monkey-around: 3.0.0 + obsidian: 1.3.5 redom: 3.27.1 packages: @@ -23,6 +23,204 @@ packages: regenerator-runtime: 0.13.9 dev: true + /@esbuild/android-arm/0.17.6: + resolution: {integrity: sha512-bSC9YVUjADDy1gae8RrioINU6e1lCkg3VGVwm0QQ2E1CWcC4gnMce9+B6RpxuSsrsXsk1yojn7sp1fnG8erE2g==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.17.6: + resolution: {integrity: sha512-YnYSCceN/dUzUr5kdtUzB+wZprCafuD89Hs0Aqv9QSdwhYQybhXTaSTcrl6X/aWThn1a/j0eEpUBGOE7269REg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.17.6: + resolution: {integrity: sha512-MVcYcgSO7pfu/x34uX9u2QIZHmXAB7dEiLQC5bBl5Ryqtpj9lT2sg3gNDEsrPEmimSJW2FXIaxqSQ501YLDsZQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.17.6: + resolution: {integrity: sha512-bsDRvlbKMQMt6Wl08nHtFz++yoZHsyTOxnjfB2Q95gato+Yi4WnRl13oC2/PJJA9yLCoRv9gqT/EYX0/zDsyMA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.17.6: + resolution: {integrity: sha512-xh2A5oPrYRfMFz74QXIQTQo8uA+hYzGWJFoeTE8EvoZGHb+idyV4ATaukaUvnnxJiauhs/fPx3vYhU4wiGfosg==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.17.6: + resolution: {integrity: sha512-EnUwjRc1inT4ccZh4pB3v1cIhohE2S4YXlt1OvI7sw/+pD+dIE4smwekZlEPIwY6PhU6oDWwITrQQm5S2/iZgg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.17.6: + resolution: {integrity: sha512-Uh3HLWGzH6FwpviUcLMKPCbZUAFzv67Wj5MTwK6jn89b576SR2IbEp+tqUHTr8DIl0iDmBAf51MVaP7pw6PY5Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.17.6: + resolution: {integrity: sha512-7YdGiurNt7lqO0Bf/U9/arrPWPqdPqcV6JCZda4LZgEn+PTQ5SMEI4MGR52Bfn3+d6bNEGcWFzlIxiQdS48YUw==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.17.6: + resolution: {integrity: sha512-bUR58IFOMJX523aDVozswnlp5yry7+0cRLCXDsxnUeQYJik1DukMY+apBsLOZJblpH+K7ox7YrKrHmJoWqVR9w==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.17.6: + resolution: {integrity: sha512-ujp8uoQCM9FRcbDfkqECoARsLnLfCUhKARTP56TFPog8ie9JG83D5GVKjQ6yVrEVdMie1djH86fm98eY3quQkQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.17.6: + resolution: {integrity: sha512-y2NX1+X/Nt+izj9bLoiaYB9YXT/LoaQFYvCkVD77G/4F+/yuVXYCWz4SE9yr5CBMbOxOfBcy/xFL4LlOeNlzYQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.17.6: + resolution: {integrity: sha512-09AXKB1HDOzXD+j3FdXCiL/MWmZP0Ex9eR8DLMBVcHorrWJxWmY8Nms2Nm41iRM64WVx7bA/JVHMv081iP2kUA==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.17.6: + resolution: {integrity: sha512-AmLhMzkM8JuqTIOhxnX4ubh0XWJIznEynRnZAVdA2mMKE6FAfwT2TWKTwdqMG+qEaeyDPtfNoZRpJbD4ZBv0Tg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.17.6: + resolution: {integrity: sha512-Y4Ri62PfavhLQhFbqucysHOmRamlTVK10zPWlqjNbj2XMea+BOs4w6ASKwQwAiqf9ZqcY9Ab7NOU4wIgpxwoSQ==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.17.6: + resolution: {integrity: sha512-SPUiz4fDbnNEm3JSdUW8pBJ/vkop3M1YwZAVwvdwlFLoJwKEZ9L98l3tzeyMzq27CyepDQ3Qgoba44StgbiN5Q==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.17.6: + resolution: {integrity: sha512-a3yHLmOodHrzuNgdpB7peFGPx1iJ2x6m+uDvhP2CKdr2CwOaqEFMeSqYAHU7hG+RjCq8r2NFujcd/YsEsFgTGw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.17.6: + resolution: {integrity: sha512-EanJqcU/4uZIBreTrnbnre2DXgXSa+Gjap7ifRfllpmyAU7YMvaXmljdArptTHmjrkkKm9BK6GH5D5Yo+p6y5A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.17.6: + resolution: {integrity: sha512-xaxeSunhQRsTNGFanoOkkLtnmMn5QbA0qBhNet/XLVsc+OVkpIWPHcr3zTW2gxVU5YOHFbIHR9ODuaUdNza2Vw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.17.6: + resolution: {integrity: sha512-gnMnMPg5pfMkZvhHee21KbKdc6W3GR8/JuE0Da1kjwpK6oiFU3nqfHuVPgUX2rsOx9N2SadSQTIYV1CIjYG+xw==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.17.6: + resolution: {integrity: sha512-G95n7vP1UnGJPsVdKXllAJPtqjMvFYbN20e8RK8LVLhlTiSOH1sd7+Gt7rm70xiG+I5tM58nYgwWrLs6I1jHqg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.17.6: + resolution: {integrity: sha512-96yEFzLhq5bv9jJo5JhTs1gI+1cKQ83cUpyxHuGqXVwQtY5Eq54ZEsKs8veKtiKwlrNimtckHEkj4mRh4pPjsg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.17.6: + resolution: {integrity: sha512-n6d8MOyUrNp6G4VSpRcgjs5xj4A91svJSaiwLIDWVWEsZtpN5FA9NlBbZHDmAJc2e8e6SF4tkBD3HAvPF+7igA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -44,20 +242,40 @@ packages: fastq: 1.13.0 dev: true - /@ophidian/build/1.0.1: - resolution: {integrity: sha512-0JGtb1GdCIcC91qUM4GuWzySKIXNg0wvlDeDThAIpruzJjDS3w5OrBmx1XVHqksKHPml3zpuRYhD9eXPUx+sJA==} + /@ophidian/build/1.2.1: + resolution: {integrity: sha512-ulefYLGwlWmsP5WgkOunujhU57dB5slENQ7VvwFh0h0Yk6id4Osg3jN0yONtB9gF6awfjzfK4OxzfOhmuzWx7g==} dependencies: builtin-modules: 3.3.0 copy-newer: 2.1.2 - esbuild: 0.14.51 - esbuild-plugin-copy: 1.3.0_esbuild@0.14.51 - esbuild-plugin-sass: 1.0.1_esbuild@0.14.51 + esbuild: 0.17.6 + esbuild-plugin-copy: 2.1.1_esbuild@0.17.6 + esbuild-plugin-sass: 1.0.1_esbuild@0.17.6 fs-extra: 10.1.0 monkey-around: 2.3.0 + sass: 1.47.0 + dev: true + + /@ophidian/core/0.0.24: + resolution: {integrity: sha512-VaHJsM0YNhLT8NTap6Dw/gnHgdei94WuyzHTHg9K/PBCOau+gWtBQUs7+TS+/QQ8obUjAmqzcguI5QtZY5vNNQ==} + dependencies: + '@preact/signals-core': 1.8.0 + defaults: 2.0.2 + i18next: 20.6.1 + monkey-around: 3.0.0 + obsidian: 1.3.5 + to-use: 0.3.3 + wonka: 6.3.4 + transitivePeerDependencies: + - '@codemirror/state' + - '@codemirror/view' dev: true - /@types/codemirror/0.0.108: - resolution: {integrity: sha512-3FGFcus0P7C2UOGCNUVENqObEb4SFk+S8Dnxq7K6aIsLVs/vDtlangl3PEO0ykaKXyK56swVF6Nho7VsA44uhw==} + /@preact/signals-core/1.8.0: + resolution: {integrity: sha512-OBvUsRZqNmjzCZXWLxkZfhcgT+Fk8DDcT/8vD6a1xhDemodyy87UJRJfASMuSD8FaAIeGgGm85ydXhm7lr4fyA==} + dev: true + + /@types/codemirror/5.60.8: + resolution: {integrity: sha512-VjFgDF/eB+Aklcy15TtOTLQeMjTo07k7KAjql8OK5Dirr7a6sJY4T1uVBDuTVG9VEmn1uUsohOpYnVfgC6/jyw==} dependencies: '@types/tern': 0.23.4 dev: true @@ -172,7 +390,7 @@ packages: dev: true /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true /copy-newer/2.1.2: @@ -200,6 +418,11 @@ packages: source-map: 0.6.1 dev: true + /defaults/2.0.2: + resolution: {integrity: sha512-cuIw0PImdp76AOfgkjbW4VhQODRmNNcKR73vdCH5cLd/ifj7aamfoXvYgfGkEAjNJZ3ozMIy9Gu2LutUkGEPbA==} + engines: {node: '>=16'} + dev: true + /dir-glob/3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -207,235 +430,58 @@ packages: path-type: 4.0.0 dev: true - /esbuild-android-64/0.14.51: - resolution: {integrity: sha512-6FOuKTHnC86dtrKDmdSj2CkcKF8PnqkaIXqvgydqfJmqBazCPdw+relrMlhGjkvVdiiGV70rpdnyFmA65ekBCQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-android-arm64/0.14.51: - resolution: {integrity: sha512-vBtp//5VVkZWmYYvHsqBRCMMi1MzKuMIn5XDScmnykMTu9+TD9v0NMEDqQxvtFToeYmojdo5UCV2vzMQWJcJ4A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-64/0.14.51: - resolution: {integrity: sha512-YFmXPIOvuagDcwCejMRtCDjgPfnDu+bNeh5FU2Ryi68ADDVlWEpbtpAbrtf/lvFTWPexbgyKgzppNgsmLPr8PA==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-arm64/0.14.51: - resolution: {integrity: sha512-juYD0QnSKwAMfzwKdIF6YbueXzS6N7y4GXPDeDkApz/1RzlT42mvX9jgNmyOlWKN7YzQAYbcUEJmZJYQGdf2ow==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-64/0.14.51: - resolution: {integrity: sha512-cLEI/aXjb6vo5O2Y8rvVSQ7smgLldwYY5xMxqh/dQGfWO+R1NJOFsiax3IS4Ng300SVp7Gz3czxT6d6qf2cw0g==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-arm64/0.14.51: - resolution: {integrity: sha512-TcWVw/rCL2F+jUgRkgLa3qltd5gzKjIMGhkVybkjk6PJadYInPtgtUBp1/hG+mxyigaT7ib+od1Xb84b+L+1Mg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-32/0.14.51: - resolution: {integrity: sha512-RFqpyC5ChyWrjx8Xj2K0EC1aN0A37H6OJfmUXIASEqJoHcntuV3j2Efr9RNmUhMfNE6yEj2VpYuDteZLGDMr0w==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-64/0.14.51: - resolution: {integrity: sha512-dxjhrqo5i7Rq6DXwz5v+MEHVs9VNFItJmHBe1CxROWNf4miOGoQhqSG8StStbDkQ1Mtobg6ng+4fwByOhoQoeA==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm/0.14.51: - resolution: {integrity: sha512-LsJynDxYF6Neg7ZC7748yweCDD+N8ByCv22/7IAZglIEniEkqdF4HCaa49JNDLw1UQGlYuhOB8ZT/MmcSWzcWg==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm64/0.14.51: - resolution: {integrity: sha512-D9rFxGutoqQX3xJPxqd6o+kvYKeIbM0ifW2y0bgKk5HPgQQOo2k9/2Vpto3ybGYaFPCE5qTGtqQta9PoP6ZEzw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-mips64le/0.14.51: - resolution: {integrity: sha512-vS54wQjy4IinLSlb5EIlLoln8buh1yDgliP4CuEHumrPk4PvvP4kTRIG4SzMXm6t19N0rIfT4bNdAxzJLg2k6A==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-ppc64le/0.14.51: - resolution: {integrity: sha512-xcdd62Y3VfGoyphNP/aIV9LP+RzFw5M5Z7ja+zdpQHHvokJM7d0rlDRMN+iSSwvUymQkqZO+G/xjb4/75du8BQ==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-riscv64/0.14.51: - resolution: {integrity: sha512-syXHGak9wkAnFz0gMmRBoy44JV0rp4kVCEA36P5MCeZcxFq8+fllBC2t6sKI23w3qd8Vwo9pTADCgjTSf3L3rA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-s390x/0.14.51: - resolution: {integrity: sha512-kFAJY3dv+Wq8o28K/C7xkZk/X34rgTwhknSsElIqoEo8armCOjMJ6NsMxm48KaWY2h2RUYGtQmr+RGuUPKBhyw==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-netbsd-64/0.14.51: - resolution: {integrity: sha512-ZZBI7qrR1FevdPBVHz/1GSk1x5GDL/iy42Zy8+neEm/HA7ma+hH/bwPEjeHXKWUDvM36CZpSL/fn1/y9/Hb+1A==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-openbsd-64/0.14.51: - resolution: {integrity: sha512-7R1/p39M+LSVQVgDVlcY1KKm6kFKjERSX1lipMG51NPcspJD1tmiZSmmBXoY5jhHIu6JL1QkFDTx94gMYK6vfA==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-plugin-copy/1.3.0_esbuild@0.14.51: - resolution: {integrity: sha512-LOx1xJOlAaCFMRtokHjsJfEkrosy3RDRa8SUHmn7loo0gwrouBQQwLAmOyMECshf7gSR1cPSRtAHu3KF/kQsyw==} + /esbuild-plugin-copy/2.1.1_esbuild@0.17.6: + resolution: {integrity: sha512-Bk66jpevTcV8KMFzZI1P7MZKZ+uDcrZm2G2egZ2jNIvVnivDpodZI+/KnpL3Jnap0PBdIHU7HwFGB8r+vV5CVw==} peerDependencies: - esbuild: ^0.14.0 + esbuild: '>= 0.14.0' dependencies: chalk: 4.1.2 - esbuild: 0.14.51 + chokidar: 3.5.3 + esbuild: 0.17.6 fs-extra: 10.1.0 globby: 11.1.0 dev: true - /esbuild-plugin-sass/1.0.1_esbuild@0.14.51: + /esbuild-plugin-sass/1.0.1_esbuild@0.17.6: resolution: {integrity: sha512-YFxjzD9Z1vz92QCJcAmCO15WVCUiOobw9ypdVeMsW+xa6S+zqryLUIh8d3fe/UkRHRO5PODZz/3xDAQuEXZwmQ==} peerDependencies: esbuild: '>=0.11.14' dependencies: css-tree: 1.1.3 - esbuild: 0.14.51 + esbuild: 0.17.6 fs-extra: 10.0.0 sass: 1.47.0 tmp: 0.2.1 dev: true - /esbuild-sunos-64/0.14.51: - resolution: {integrity: sha512-HoHaCswHxLEYN8eBTtyO0bFEWvA3Kdb++hSQ/lLG7TyKF69TeSG0RNoBRAs45x/oCeWaTDntEZlYwAfQlhEtJA==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-32/0.14.51: - resolution: {integrity: sha512-4rtwSAM35A07CBt1/X8RWieDj3ZUHQqUOaEo5ZBs69rt5WAFjP4aqCIobdqOy4FdhYw1yF8Z0xFBTyc9lgPtEg==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-64/0.14.51: - resolution: {integrity: sha512-HoN/5HGRXJpWODprGCgKbdMvrC3A2gqvzewu2eECRw2sYxOUoh2TV1tS+G7bHNapPGI79woQJGV6pFH7GH7qnA==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-arm64/0.14.51: - resolution: {integrity: sha512-JQDqPjuOH7o+BsKMSddMfmVJXrnYZxXDHsoLHc0xgmAZkOOCflRmC43q31pk79F9xuyWY45jDBPolb5ZgGOf9g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild/0.14.51: - resolution: {integrity: sha512-+CvnDitD7Q5sT7F+FM65sWkF8wJRf+j9fPcprxYV4j+ohmzVj2W7caUqH2s5kCaCJAfcAICjSlKhDCcvDpU7nw==} + /esbuild/0.17.6: + resolution: {integrity: sha512-TKFRp9TxrJDdRWfSsSERKEovm6v30iHnrjlcGhLBOtReE28Yp1VSBRfO3GTaOFMoxsNerx4TjrhzSuma9ha83Q==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - esbuild-android-64: 0.14.51 - esbuild-android-arm64: 0.14.51 - esbuild-darwin-64: 0.14.51 - esbuild-darwin-arm64: 0.14.51 - esbuild-freebsd-64: 0.14.51 - esbuild-freebsd-arm64: 0.14.51 - esbuild-linux-32: 0.14.51 - esbuild-linux-64: 0.14.51 - esbuild-linux-arm: 0.14.51 - esbuild-linux-arm64: 0.14.51 - esbuild-linux-mips64le: 0.14.51 - esbuild-linux-ppc64le: 0.14.51 - esbuild-linux-riscv64: 0.14.51 - esbuild-linux-s390x: 0.14.51 - esbuild-netbsd-64: 0.14.51 - esbuild-openbsd-64: 0.14.51 - esbuild-sunos-64: 0.14.51 - esbuild-windows-32: 0.14.51 - esbuild-windows-64: 0.14.51 - esbuild-windows-arm64: 0.14.51 + '@esbuild/android-arm': 0.17.6 + '@esbuild/android-arm64': 0.17.6 + '@esbuild/android-x64': 0.17.6 + '@esbuild/darwin-arm64': 0.17.6 + '@esbuild/darwin-x64': 0.17.6 + '@esbuild/freebsd-arm64': 0.17.6 + '@esbuild/freebsd-x64': 0.17.6 + '@esbuild/linux-arm': 0.17.6 + '@esbuild/linux-arm64': 0.17.6 + '@esbuild/linux-ia32': 0.17.6 + '@esbuild/linux-loong64': 0.17.6 + '@esbuild/linux-mips64el': 0.17.6 + '@esbuild/linux-ppc64': 0.17.6 + '@esbuild/linux-riscv64': 0.17.6 + '@esbuild/linux-s390x': 0.17.6 + '@esbuild/linux-x64': 0.17.6 + '@esbuild/netbsd-x64': 0.17.6 + '@esbuild/openbsd-x64': 0.17.6 + '@esbuild/sunos-x64': 0.17.6 + '@esbuild/win32-arm64': 0.17.6 + '@esbuild/win32-ia32': 0.17.6 + '@esbuild/win32-x64': 0.17.6 dev: true /fast-glob/3.2.11: @@ -482,6 +528,7 @@ packages: /fs-write-stream-atomic/1.0.10: resolution: {integrity: sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA==} + deprecated: This package is no longer supported. dependencies: graceful-fs: 4.2.10 iferr: 0.1.5 @@ -510,6 +557,7 @@ packages: /glob/6.0.4: resolution: {integrity: sha512-MKZeRNyYZAVVVG1oZeLaWie1uweH40m9AZwIwxyPbTSX4hHrVYSzLg0Ro5Z5R7XKkIX+Cc6oD1rqeDJnwsB8/A==} + deprecated: Glob versions prior to v9 are no longer supported dependencies: inflight: 1.0.6 inherits: 2.0.4 @@ -520,6 +568,7 @@ packages: /glob/7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -588,6 +637,7 @@ packages: /inflight/1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. dependencies: once: 1.4.0 wrappy: 1.0.2 @@ -675,6 +725,10 @@ packages: resolution: {integrity: sha512-QWcCUWjqE/MCk9cXlSKZ1Qc486LD439xw/Ak8Nt6l2PuL9+yrc9TJakt7OHDuOqPRYY4nTWBAEFKn32PE/SfXA==} dev: true + /monkey-around/3.0.0: + resolution: {integrity: sha512-jL6uY2lEAoaHxZep1cNRkCZjoIWY4g5VYCjriEWmcyHU7w8NU1+JH57xE251UVTohK0lCxMjv0ZV4ByDLIXEpw==} + dev: true + /normalize-path/3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -685,13 +739,13 @@ packages: engines: {node: '>=0.10.0'} dev: true - /obsidian/0.15.9: - resolution: {integrity: sha512-w3JL/IM3/U61rjFSFIFDSv+pcHn3mH1EIRN40kBkC/lGYqjFSPbr6daQe08QkskBz/GAYIeBoaKQIcgU9vV3LQ==} + /obsidian/1.3.5: + resolution: {integrity: sha512-2Zg9vlaEZw6fd2AohcdrC1kV+lZcb4a1Ju6GcIwdWaGOWj6l//7wbKD6vVhO2GlfoQRGARYu++eLo7FEc+f6Tw==} peerDependencies: '@codemirror/state': ^6.0.0 '@codemirror/view': ^6.0.0 dependencies: - '@types/codemirror': 0.0.108 + '@types/codemirror': 5.60.8 moment: 2.29.4 dev: true @@ -775,6 +829,7 @@ packages: /rimraf/3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true dependencies: glob: 7.2.3 @@ -842,8 +897,8 @@ packages: is-number: 7.0.0 dev: true - /to-use/0.2.1: - resolution: {integrity: sha512-FwF0QIePeaY/Wk2thTjjV41KltJZsMTidH33R64u76Ai+IDyXI4cLYA5PH2PjQRyxAKVtDgcN1ZPK5JJh102Vw==} + /to-use/0.3.3: + resolution: {integrity: sha512-i5hrYhcDyrjl4tF2EvZnmL8VAMdMYnMFeX1bIF0ekn2gKgs76UhZcHt+hLIUKh0fIii+Ix6uUp5W6yYlU5+Z8A==} dev: true /universalify/2.0.0: @@ -855,20 +910,10 @@ packages: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true - /wrappy/1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + /wonka/6.3.4: + resolution: {integrity: sha512-CjpbqNtBGNAeyNS/9W6q3kSkKE52+FjIj7AkFlLr11s/VWGUu6a2CdYSdGxocIhIVjaW/zchesBQUKPVU69Cqg==} dev: true - github.com/ophidian-lib/core/4a67726fd4108a49eb191aaf44ea069d2d37b824: - resolution: {tarball: https://codeload.github.com/ophidian-lib/core/tar.gz/4a67726fd4108a49eb191aaf44ea069d2d37b824} - name: '@ophidian/core' - version: 0.0.12 - dependencies: - i18next: 20.6.1 - monkey-around: 2.3.0 - obsidian: 0.15.9 - to-use: 0.2.1 - transitivePeerDependencies: - - '@codemirror/state' - - '@codemirror/view' + /wrappy/1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true diff --git a/src/FolderMenu.ts b/src/FolderMenu.ts index d0a69e1..e02288b 100644 --- a/src/FolderMenu.ts +++ b/src/FolderMenu.ts @@ -452,7 +452,7 @@ export class FolderMenu extends PopupMenu implements HoverParent { if (file instanceof TFile) { if (this.app.viewRegistry.isExtensionRegistered(file.extension)) { - this.app.workspace.openLinkText(file.path, "", event && Keymap.isModEvent(event)); + this.app.workspace.openLinkText(file.path, "", (event && Keymap.isModEvent(event)) || false); // Close the entire menu tree this.rootMenu().hide(); event?.stopPropagation(); diff --git a/src/menus.ts b/src/menus.ts index c69ce70..b23c724 100644 --- a/src/menus.ts +++ b/src/menus.ts @@ -17,7 +17,6 @@ declare module "obsidian" { onArrowUp(e: KeyboardEvent): false sort?(): void - setUseNativeMenu?(flag: boolean): void; // 0.16 to force HTML menu onMouseOver?(): void; } @@ -59,14 +58,18 @@ export class PopupMenu extends (Menu as new (app: App) => Menu) { // XXX fixme w this.scope = new Scope; this.scope.register([], "ArrowUp", this.onArrowUp.bind(this)); + this.scope.register(["Mod"], "k", this.onArrowUp.bind(this)); this.scope.register([], "ArrowDown", this.onArrowDown.bind(this)); + this.scope.register(["Mod"], "j", this.onArrowDown.bind(this)); this.scope.register([], "Enter", this.onEnter.bind(this)); this.scope.register([], "Escape", this.onEscape.bind(this)); this.scope.register([], "ArrowLeft", this.onArrowLeft.bind(this)); + this.scope.register(["Mod"], "h", this.onArrowLeft.bind(this)); this.scope.register([], "Home", this.onHome.bind(this)); this.scope.register([], "End", this.onEnd.bind(this)); this.scope.register([], "ArrowRight", this.onArrowRight.bind(this)); + this.scope.register(["Mod"], "l", this.onArrowRight.bind(this)); // Make obsidian.Menu think mousedowns on our child menu(s) are happening // on us, so we won't close before an actual click occurs diff --git a/versions.json b/versions.json index 5b53d4a..396b48f 100644 --- a/versions.json +++ b/versions.json @@ -1,5 +1,5 @@ { - "0.2.10": "1.5.8", + "0.2.11": "1.5.8", "0.2.8": "0.15.9", "0.1.41": "0.15.9", "0.1.37": "0.14.5",