Skip to content

AI-native design editor. Open-source Figma alternative.

787 B
Raw Blame
import type { ComputedRef } from 'vue'

import type { Editor } from '@open-pencil/core'

import type { useSelectionCapabilities } from '#vue/editor/selection-capabilities/use'
import type { useSelectionState } from '#vue/editor/selection-state/use'

export type CommandMessagesStore = { value: Record<string, string> }
export type SelectionState = ReturnType<typeof useSelectionState>
export type SelectionCapabilities = ReturnType<typeof useSelectionCapabilities>

export type EditorCommandMapOptions = {
  editor: Editor
  selection: SelectionState
  capabilities: SelectionCapabilities
  messages: CommandMessagesStore
  otherPages: ComputedRef<Array<{ id: string }>>
  moveSelectionToPage: (pageId: string) => void
  getOpacityTarget: () => { value: number; coalesceKey?: string }
}