refactor keybinding files

This commit is contained in:
bymyself
2025-09-23 22:18:34 -07:00
parent ac72999e26
commit 42ffdb2141
25 changed files with 330 additions and 29 deletions

View File

@@ -1,15 +1,15 @@
import { createPinia, setActivePinia } from 'pinia'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { CORE_KEYBINDINGS } from '@/constants/coreKeybindings'
import { useKeybindingService } from '@/services/keybindingService'
import { CORE_KEYBINDINGS } from '@/platform/keybinding/constants/coreKeybindings'
import { useCommandStore } from '@/stores/commandStore'
import { useDialogStore } from '@/stores/dialogStore'
import { useKeybindingService } from '@/workbench/keybindings/services/keybindingService'
import {
KeyComboImpl,
KeybindingImpl,
useKeybindingStore
} from '@/stores/keybindingStore'
} from '@/workbench/keybindings/stores/keybindingStore'
// Mock stores
vi.mock('@/platform/settings/settingStore', () => ({

View File

@@ -2,9 +2,9 @@ import { createPinia, setActivePinia } from 'pinia'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { app } from '@/scripts/app'
import { useKeybindingService } from '@/services/keybindingService'
import { useCommandStore } from '@/stores/commandStore'
import { useDialogStore } from '@/stores/dialogStore'
import { useKeybindingService } from '@/workbench/keybindings/services/keybindingService'
// Mock the app and canvas using factory functions
vi.mock('@/scripts/app', () => {

View File

@@ -1,7 +1,10 @@
import { createPinia, setActivePinia } from 'pinia'
import { beforeEach, describe, expect, it } from 'vitest'
import { KeybindingImpl, useKeybindingStore } from '@/stores/keybindingStore'
import {
KeybindingImpl,
useKeybindingStore
} from '@/workbench/keybindings/stores/keybindingStore'
describe('useKeybindingStore', () => {
beforeEach(() => {