From ac48e72d776115757e480ea3eb5c0461910f798d Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sun, 1 Nov 2026 20:45:26 -0800 Subject: [PATCH] fix(plugins): import custom editor host types from their own module to restore main lint (#37319) --- .../src/components/editor/PluginCustomEditorFrame.tsx | 10 +++++----- .../components/editor/editor-bytes-document-boxes.ts | 2 +- .../src/components/editor/editor-bytes-documents.ts | 2 +- .../editor/plugin-custom-editor-host.test.ts | 3 ++- .../src/components/editor/plugin-custom-editor-host.ts | 8 -------- 5 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/renderer/src/components/editor/PluginCustomEditorFrame.tsx b/src/renderer/src/components/editor/PluginCustomEditorFrame.tsx index 22ea5bfa56b..f96afe0d043 100644 --- a/src/renderer/src/components/editor/PluginCustomEditorFrame.tsx +++ b/src/renderer/src/components/editor/PluginCustomEditorFrame.tsx @@ -20,11 +20,11 @@ import { editorShortcutMatches } from './editor-shortcuts' import { registerEditorFrameFlush } from './editor-pending-flush' import { useCustomEditorReloadFlush } from './use-custom-editor-reload-flush' import { PluginEditorNeedsDesktopNotice } from './PluginEditorNeedsDesktopNotice' -import { - createCustomEditorHost, - type CustomEditorBinaryDocument, - type CustomEditorEditRefusal -} from './plugin-custom-editor-host' +import { createCustomEditorHost } from './plugin-custom-editor-host' +import type { + CustomEditorBinaryDocument, + CustomEditorEditRefusal +} from './plugin-custom-editor-host-types' type PluginCustomEditorFrameProps = { editor: ActivePluginCustomEditor diff --git a/src/renderer/src/components/editor/editor-bytes-document-boxes.ts b/src/renderer/src/components/editor/editor-bytes-document-boxes.ts index 09c5fd0eb2e..08263fa1b30 100644 --- a/src/renderer/src/components/editor/editor-bytes-document-boxes.ts +++ b/src/renderer/src/components/editor/editor-bytes-document-boxes.ts @@ -1,4 +1,4 @@ -import type { CustomEditorBinaryDocument } from './plugin-custom-editor-host' +import type { CustomEditorBinaryDocument } from './plugin-custom-editor-host-types' /** * A binary custom editor's bytes last read or saved, and the unsaved edit. Kept apart from the diff --git a/src/renderer/src/components/editor/editor-bytes-documents.ts b/src/renderer/src/components/editor/editor-bytes-documents.ts index a41cd91847c..5571e78e473 100644 --- a/src/renderer/src/components/editor/editor-bytes-documents.ts +++ b/src/renderer/src/components/editor/editor-bytes-documents.ts @@ -4,7 +4,7 @@ import type { OpenFile } from '@/store/slices/editor' import { editorTabFileAccess } from '@/lib/local-file-access' import type { RuntimeFileOperationArgs } from '@/runtime/runtime-file-client-types' import { writeRuntimeFileBytes } from '@/runtime/runtime-file-bytes-write' -import type { CustomEditorBinaryDocument } from './plugin-custom-editor-host' +import type { CustomEditorBinaryDocument } from './plugin-custom-editor-host-types' import type { EditorSaveResult, EditorSaveTrigger } from './editor-save-disk-precondition' import { clearSelfWrite, diff --git a/src/renderer/src/components/editor/plugin-custom-editor-host.test.ts b/src/renderer/src/components/editor/plugin-custom-editor-host.test.ts index acf873b32b0..154c01a86c0 100644 --- a/src/renderer/src/components/editor/plugin-custom-editor-host.test.ts +++ b/src/renderer/src/components/editor/plugin-custom-editor-host.test.ts @@ -3,7 +3,8 @@ import { CUSTOM_EDITOR_DOCUMENT_MAX_BYTES } from '../../../../shared/plugins/fra import { isPluginJsonObject } from '../../../../shared/plugins/manifest/plugin-json-object' import { createPanelMessageBudget } from '../../../../shared/plugins/frames/plugin-panel-message-budget' import { createPluginFrameMessageHandler } from '../right-sidebar/plugin-frame-host' -import { createCustomEditorHost, type CustomEditorHostOptions } from './plugin-custom-editor-host' +import { createCustomEditorHost } from './plugin-custom-editor-host' +import type { CustomEditorHostOptions } from './plugin-custom-editor-host-types' vi.mock('../right-sidebar/plugin-panel-design-token-css', () => ({ currentPluginFrameTheme: () => ({ colorScheme: 'light', tokens: '' }) diff --git a/src/renderer/src/components/editor/plugin-custom-editor-host.ts b/src/renderer/src/components/editor/plugin-custom-editor-host.ts index 08f742975e1..6d2fe0e18c3 100644 --- a/src/renderer/src/components/editor/plugin-custom-editor-host.ts +++ b/src/renderer/src/components/editor/plugin-custom-editor-host.ts @@ -35,14 +35,6 @@ import type { CustomEditorUnappliedEdit } from './plugin-custom-editor-host-types' -export type { - CustomEditorBinaryDocument, - CustomEditorEditRefusal, - CustomEditorHost, - CustomEditorHostOptions, - CustomEditorUnappliedEdit -} from './plugin-custom-editor-host-types' - /** The frame only ever holds the document: Orca owns the buffer, dirty state and save. */ export function createCustomEditorHost(options: CustomEditorHostOptions): CustomEditorHost { const budget =