Full document, spreadsheet, slideshow, and diagram tooling
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 56 lines 1.8 kB view raw
1/** 2 * Slides App Types — shared interfaces for the slides editor modules. 3 * 4 * Dependency-injection context that wires modules together without 5 * circular imports. Each module receives the parts of AppContext it needs. 6 */ 7 8import type { DeckState } from './canvas-engine.js'; 9import type { ThemedDeck } from './layouts-themes.js'; 10import type { SlideTransitions } from './transitions.js'; 11import type { PresenterState } from './presenter-mode.js'; 12import type { SlideAnimations } from './element-animations.js'; 13 14/** Mutable application state — single source of truth in main.ts. */ 15export interface AppState { 16 deck: DeckState; 17 themedDeck: ThemedDeck; 18 transitions: SlideTransitions; 19 presenter: PresenterState; 20 animations: SlideAnimations; 21 selectedElementId: string | null; 22 isDragging: boolean; 23 dragStartX: number; 24 dragStartY: number; 25 dragElStartX: number; 26 dragElStartY: number; 27 cryptoKey: CryptoKey | null; 28 docId: string; 29} 30 31/** DOM element references used across modules. */ 32export interface DOMRefs { 33 deckTitle: HTMLInputElement; 34 thumbnailList: HTMLElement; 35 slideCanvas: HTMLElement; 36 layoutSelect: HTMLSelectElement; 37 masterSelect: HTMLSelectElement; 38 themeSelect: HTMLSelectElement; 39 transitionSelect: HTMLSelectElement; 40 notesInput: HTMLTextAreaElement; 41 presenterOverlay: HTMLElement; 42 presenterCurrent: HTMLElement; 43 presenterNextPreview: HTMLElement; 44 presenterNotesEl: HTMLElement; 45 presenterTimerEl: HTMLElement; 46 presenterProgressEl: HTMLElement; 47} 48 49/** Operations that modules call back into the main orchestrator. */ 50export interface AppActions { 51 getState: () => AppState; 52 setState: (patch: Partial<AppState>) => void; 53 syncDeckToYjs: () => void; 54 render: () => void; 55 renderCanvas: () => void; 56}