diff --git a/package.json b/package.json index 72879ed..90b8d74 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "license": "MIT", "devDependencies": { "@tsconfig/svelte": "^3.0.0", - "@types/lodash-es": "^4.17.6", "@types/node": "^16.11.6", "@typescript-eslint/eslint-plugin": "^5.18.0", "@typescript-eslint/parser": "^5.18.0", @@ -36,7 +35,6 @@ "typescript": "^4.6.3" }, "dependencies": { - "lodash-es": "^4.17.21", "minisearch": "^5.0.0-beta1" } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2b0de27..275e171 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2,7 +2,6 @@ lockfileVersion: 5.3 specifiers: '@tsconfig/svelte': ^3.0.0 - '@types/lodash-es': ^4.17.6 '@types/node': ^16.11.6 '@typescript-eslint/eslint-plugin': ^5.18.0 '@typescript-eslint/parser': ^5.18.0 @@ -16,7 +15,6 @@ specifiers: eslint-plugin-node: 11.1.0 eslint-plugin-promise: 5.0.0 eslint-plugin-svelte3: ^3.4.1 - lodash-es: ^4.17.21 minisearch: ^5.0.0-beta1 obsidian: latest prettier: ^2.6.2 @@ -27,12 +25,10 @@ specifiers: typescript: ^4.6.3 dependencies: - lodash-es: 4.17.21 minisearch: 5.0.0-beta1 devDependencies: '@tsconfig/svelte': 3.0.0 - '@types/lodash-es': 4.17.6 '@types/node': 16.11.26 '@typescript-eslint/eslint-plugin': 5.18.0_2e93aa916703472007e9b5dfec98785b '@typescript-eslint/parser': 5.18.0_eslint@7.12.1+typescript@4.6.3 @@ -168,16 +164,6 @@ packages: resolution: {integrity: sha1-7ihweulOEdK4J7y+UnC86n8+ce4=} dev: true - /@types/lodash-es/4.17.6: - resolution: {integrity: sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==} - dependencies: - '@types/lodash': 4.14.181 - dev: true - - /@types/lodash/4.14.181: - resolution: {integrity: sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag==} - dev: true - /@types/node/16.11.26: resolution: {integrity: sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==} dev: true @@ -1561,10 +1547,6 @@ packages: path-exists: 3.0.0 dev: true - /lodash-es/4.17.21: - resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} - dev: false - /lodash.merge/4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true diff --git a/src/CmpInput.svelte b/src/CmpInput.svelte index c85973f..492a910 100644 --- a/src/CmpInput.svelte +++ b/src/CmpInput.svelte @@ -11,6 +11,7 @@ onMount(async () => { await tick() input.focus() input.select() + input.value = $searchQuery }) const debouncedOnInput = debounce(() => $searchQuery = inputValue, 100) @@ -41,6 +42,9 @@ function moveNoteSelection(ev: KeyboardEvent): void { } else if (ev.shiftKey) { // Create a new note dispatch("shift-enter", $selectedNote) + } else if (ev.altKey) { + // Create a new note + dispatch("alt-enter", $selectedNote) } else { // Open in current pane dispatch("enter", $selectedNote) diff --git a/src/CmpModal.svelte b/src/CmpModal.svelte index a7f7d08..767f15d 100644 --- a/src/CmpModal.svelte +++ b/src/CmpModal.svelte @@ -1,11 +1,13 @@ + -
- {#each $resultNotes as result} - - {/each} -
-
-
- ↑↓to navigate +