state.ts 752 B

1234567891011121314151617181920212223242526272829303132
  1. import { Slide } from '@/types/slides'
  2. import { slides } from '@/mocks/index'
  3. export type State = {
  4. activeElementIdList: string[];
  5. handleElementId: string;
  6. isShowGridLines: boolean;
  7. editorAreaShowScale: number;
  8. canvasScale: number;
  9. thumbnailsFocus: boolean;
  10. editorAreaFocus: boolean;
  11. availableFonts: string[];
  12. slides: Slide[];
  13. slideIndex: number;
  14. cursor: number;
  15. historyRecordLength: number;
  16. }
  17. export const state: State = {
  18. activeElementIdList: [],
  19. handleElementId: '',
  20. isShowGridLines: false,
  21. editorAreaShowScale: 85,
  22. canvasScale: 1,
  23. thumbnailsFocus: false,
  24. editorAreaFocus: false,
  25. availableFonts: [],
  26. slides: slides,
  27. slideIndex: 0,
  28. cursor: -1,
  29. historyRecordLength: 0,
  30. }