События между приложением и редактором
Полный перечень: семь событий от приложения к редактору и одиннадцать обратно, с сигнатурой и именем канала.
От приложения к редактору — 7 событий
Заголовок раздела «От приложения к редактору — 7 событий»onDocumentSessionSnapshot
Заголовок раздела «onDocumentSessionSnapshot»onDocumentSessionSnapshot(callback: (snapshot: ShellDocumentSessionSnapshot) => void): () => voidКанал: fastdoc-shell:document-session-snapshot
onMenuCommand
Заголовок раздела «onMenuCommand»onMenuCommand(callback: (command: MenuCommand) => void): () => voidКанал: fastdoc-shell:menu-command
onSaveBeforeClose
Заголовок раздела «onSaveBeforeClose»onSaveBeforeClose(callback: () => void): () => voidКанал: fastdoc-shell:save-before-close
onSaveBeforeCloseFailed
Заголовок раздела «onSaveBeforeCloseFailed»onSaveBeforeCloseFailed(callback: (payload: { message: string }) => void): () => voidКанал: fastdoc-shell:save-before-close-failed
onSaveBeforeDocumentSwitch
Заголовок раздела «onSaveBeforeDocumentSwitch»onSaveBeforeDocumentSwitch(callback: (request: { requestId: number }) => void): () => voidКанал: fastdoc-shell:save-before-document-switch
onStateChanged
Заголовок раздела «onStateChanged»onStateChanged(callback: (state: ShellBridgeState) => void): () => voidКанал: fastdoc-shell:state-changed
onSystemPaste
Заголовок раздела «onSystemPaste»onSystemPaste(callback: (payload: SystemPastePayload) => void): () => voidКанал: fastdoc-shell:system-paste
От редактора к приложению — 11 событий
Заголовок раздела «От редактора к приложению — 11 событий»completeSaveBeforeClose
Заголовок раздела «completeSaveBeforeClose»completeSaveBeforeClose(payload: { saved: boolean; message?: string | null }): voidКанал: fastdoc-shell:save-before-close-result
completeSaveBeforeDocumentSwitch
Заголовок раздела «completeSaveBeforeDocumentSwitch»completeSaveBeforeDocumentSwitch(result: { requestId: number; saved: boolean; savedPath: string | null; errorMessage: string | null; }): voidКанал: fastdoc-shell:document-switch-save-result
notifyCanonicalEditDropped
Заголовок раздела «notifyCanonicalEditDropped»notifyCanonicalEditDropped(payload: { code: string; requestId: string; commandType: string; }): voidКанал: fastdoc-shell:canonical-edit-dropped
notifyCurrentDocumentTruthViewerReady
Заголовок раздела «notifyCurrentDocumentTruthViewerReady»notifyCurrentDocumentTruthViewerReady(payload: { availability: string; fixtureId: string | null; blockedStatesVisible: boolean; forbiddenClaimsVisible: boolean; unavailableStateVisible: boolean; genericFixtureListVisible: boolean; }): voidКанал: fastdoc-shell:current-document-truth-viewer-ready
notifyDocumentRendered
Заголовок раздела «notifyDocumentRendered»notifyDocumentRendered(renderedPath: string | null): voidКанал: fastdoc-shell:document-rendered
notifyEditKeyDropped
Заголовок раздела «notifyEditKeyDropped»notifyEditKeyDropped(payload: { code: string; inputType: string; selectionShape: string; inputRoute: string; contextRefusal: string; pressIndex: number; }): voidКанал: fastdoc-shell:edit-key-dropped
notifyPageHydrationDropped
Заголовок раздела «notifyPageHydrationDropped»notifyPageHydrationDropped(payload: { code: string; stage: string }): voidКанал: fastdoc-shell:page-hydration-dropped
notifyPersistentSaveRefused
Заголовок раздела «notifyPersistentSaveRefused»notifyPersistentSaveRefused(payload: { code: string; requestId: string; saveAs: boolean; }): voidКанал: fastdoc-shell:persistent-save-refused
notifyRendererReady
Заголовок раздела «notifyRendererReady»notifyRendererReady(): voidКанал: fastdoc-shell:renderer-ready
notifySmokeCheckpoint
Заголовок раздела «notifySmokeCheckpoint»notifySmokeCheckpoint(checkpoint: string, payload?: { screenshotDataUrl?: string | null; screenshots?: Array<{ name?: string | null; dataUrl?: string | null }>; telemetry?: unknown; reserveCyclesCompleted?: number; reserveElapsedMs?: number; reserveRichPayloadBytes?: number; }): voidКанал: fastdoc-shell:smoke-checkpoint
notifyUnsavedState
Заголовок раздела «notifyUnsavedState»notifyUnsavedState(hasUnsavedChanges: boolean): voidКанал: fastdoc-shell:unsaved-state
Жизненный цикл подписки. Каждый метод on* возвращает функцию отписки — вызывайте её, когда убираете компонент или закрываете окно, иначе обработчики останутся висеть.