mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-18 22:11:43 +01:00
chore(CommandPalette): one fuse per group
This commit is contained in:
23
src/runtime/types/command-palette.d.ts
vendored
Normal file
23
src/runtime/types/command-palette.d.ts
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { UseFuseOptions } from '@vueuse/integrations/useFuse'
|
||||
import Fuse from 'fuse.js'
|
||||
|
||||
export interface Command {
|
||||
disabled?: boolean
|
||||
icon?: string
|
||||
iconColor?: string
|
||||
iconClass?: string
|
||||
avatar?: string
|
||||
label: string
|
||||
group?: string
|
||||
}
|
||||
|
||||
export interface Group {
|
||||
key: string
|
||||
label: string
|
||||
commands: Command[]
|
||||
options: Partial<UseFuseOptions<Command>>
|
||||
}
|
||||
|
||||
export interface ComputedGroup extends Omit<Group, 'options' | 'commands'> {
|
||||
commands: Fuse.FuseResult<Command>[]
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
export interface Command {
|
||||
disabled?: boolean
|
||||
icon?: string
|
||||
iconColor?: string
|
||||
iconClass?: string
|
||||
avatar?: string
|
||||
label: string
|
||||
group?: string
|
||||
}
|
||||
|
||||
export interface Group {
|
||||
key: string
|
||||
label: string
|
||||
commands: Command[]
|
||||
}
|
||||
Reference in New Issue
Block a user