mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
537673cdf6
IDE scope store and emitter with fixed PDF URLs GitOrigin-RevId: 9d33bad8a006bb55714878332f78932538dd8921
23 lines
863 B
TypeScript
23 lines
863 B
TypeScript
import { Emitter } from 'strict-event-emitter'
|
|
import { Project } from '../../../../types/project'
|
|
import { PermissionsLevel } from '@/features/ide-react/types/permissions-level'
|
|
import { GotoLineOptions } from '@/features/ide-react/types/goto-line-options'
|
|
import { CursorPosition } from '@/features/ide-react/types/cursor-position'
|
|
|
|
export type IdeEvents = {
|
|
'project:joined': [{ project: Project; permissionsLevel: PermissionsLevel }]
|
|
|
|
'editor:gotoOffset': [gotoOffset: number]
|
|
'editor:gotoLine': [options: GotoLineOptions]
|
|
'outline-toggled': [isOpen: boolean]
|
|
'cursor:editor:update': [position: CursorPosition]
|
|
'cursor:editor:syncToPdf': []
|
|
'scroll:editor:update': []
|
|
'comment:start_adding': []
|
|
}
|
|
|
|
export type IdeEventEmitter = Emitter<IdeEvents>
|
|
|
|
export function createIdeEventEmitter(): IdeEventEmitter {
|
|
return new Emitter<IdeEvents>()
|
|
}
|