30 lines
1.2 KiB
TypeScript
30 lines
1.2 KiB
TypeScript
import { commandIds } from "./ids";
|
|
import type { DocumentAddArtboardPayload } from "./document";
|
|
import type { SelectionAddLayerPayload, SelectionSetPayload } from "./selection";
|
|
import type { ToolSetActivePayload } from "./tool";
|
|
import type {
|
|
ViewportFitArtboardPayload,
|
|
ViewportPanPayload,
|
|
ViewportSetSizePayload,
|
|
ViewportSetZoomPayload,
|
|
ViewportZoomAroundPointPayload,
|
|
} from "./viewport";
|
|
|
|
export type CommandPayloads = {
|
|
[commandIds.documentAddArtboard]: DocumentAddArtboardPayload;
|
|
[commandIds.selectionSet]: SelectionSetPayload;
|
|
[commandIds.selectionClear]: void;
|
|
[commandIds.selectionAddLayer]: SelectionAddLayerPayload;
|
|
[commandIds.toolSetActive]: ToolSetActivePayload;
|
|
[commandIds.toolEnterTemporaryPan]: void;
|
|
[commandIds.toolExitTemporaryPan]: void;
|
|
[commandIds.viewportPan]: ViewportPanPayload;
|
|
[commandIds.viewportSetZoom]: ViewportSetZoomPayload;
|
|
[commandIds.viewportZoomAroundPoint]: ViewportZoomAroundPointPayload;
|
|
[commandIds.viewportSetSize]: ViewportSetSizePayload;
|
|
[commandIds.viewportReset]: void;
|
|
[commandIds.viewportFitArtboard]: ViewportFitArtboardPayload | undefined;
|
|
};
|
|
|
|
export type CommandId = keyof CommandPayloads;
|