diff --git a/frontend/src/components/common/motd-modal/motd-modal.spec.tsx b/frontend/src/components/common/motd-modal/motd-modal.spec.tsx index ff62ddbb8..279b3ca3b 100644 --- a/frontend/src/components/common/motd-modal/motd-modal.spec.tsx +++ b/frontend/src/components/common/motd-modal/motd-modal.spec.tsx @@ -6,7 +6,7 @@ import * as UseBaseUrlModule from '../../../hooks/common/use-base-url' import { mockI18n } from '../../../test-utils/mock-i18n' import { testId } from '../../../utils/test-id' -import * as RenderIframeModule from '../../editor-page/renderer-pane/render-iframe' +import * as RenderIframeModule from '../../common/render-iframe/render-iframe' import type { CommonModalProps } from '../modals/common-modal' import * as CommonModalModule from '../modals/common-modal' import * as fetchMotdModule from './fetch-motd' @@ -17,7 +17,7 @@ import React from 'react' jest.mock('./fetch-motd') jest.mock('../modals/common-modal') -jest.mock('../../editor-page/renderer-pane/render-iframe') +jest.mock('../../common/render-iframe/render-iframe') jest.mock('../../../hooks/common/use-base-url') describe('motd modal', () => { diff --git a/frontend/src/components/common/motd-modal/motd-modal.tsx b/frontend/src/components/common/motd-modal/motd-modal.tsx index f3e4c5f96..01c809869 100644 --- a/frontend/src/components/common/motd-modal/motd-modal.tsx +++ b/frontend/src/components/common/motd-modal/motd-modal.tsx @@ -7,9 +7,9 @@ import { cypressId } from '../../../utils/cypress-attribute' import { Logger } from '../../../utils/logger' import { testId } from '../../../utils/test-id' import { EditorToRendererCommunicatorContextProvider } from '../../editor-page/render-context/editor-to-renderer-communicator-context-provider' -import { RenderIframe } from '../../editor-page/renderer-pane/render-iframe' import { RendererType } from '../../render-page/window-post-message-communicator/rendering-message' import { CommonModal } from '../modals/common-modal' +import { RenderIframe } from '../render-iframe/render-iframe' import { fetchMotd, MOTD_LOCAL_STORAGE_KEY } from './fetch-motd' import React, { useCallback, useMemo, useEffect, useState } from 'react' import { Button, Modal } from 'react-bootstrap' diff --git a/frontend/src/components/editor-page/renderer-pane/hooks/use-effect-on-render-type-change.ts b/frontend/src/components/common/render-iframe/hooks/use-effect-on-render-type-change.ts similarity index 100% rename from frontend/src/components/editor-page/renderer-pane/hooks/use-effect-on-render-type-change.ts rename to frontend/src/components/common/render-iframe/hooks/use-effect-on-render-type-change.ts diff --git a/frontend/src/components/editor-page/renderer-pane/hooks/use-force-render-page-url-on-iframe-load-callback.ts b/frontend/src/components/common/render-iframe/hooks/use-force-render-page-url-on-iframe-load-callback.ts similarity index 93% rename from frontend/src/components/editor-page/renderer-pane/hooks/use-force-render-page-url-on-iframe-load-callback.ts rename to frontend/src/components/common/render-iframe/hooks/use-force-render-page-url-on-iframe-load-callback.ts index 541c1442c..644670aad 100644 --- a/frontend/src/components/editor-page/renderer-pane/hooks/use-force-render-page-url-on-iframe-load-callback.ts +++ b/frontend/src/components/common/render-iframe/hooks/use-force-render-page-url-on-iframe-load-callback.ts @@ -5,7 +5,7 @@ */ import { ORIGIN, useBaseUrl } from '../../../../hooks/common/use-base-url' import { Logger } from '../../../../utils/logger' -import { useEditorToRendererCommunicator } from '../../render-context/editor-to-renderer-communicator-context-provider' +import { useEditorToRendererCommunicator } from '../../../editor-page/render-context/editor-to-renderer-communicator-context-provider' import type { RefObject } from 'react' import { useCallback, useEffect, useMemo, useRef } from 'react' diff --git a/frontend/src/components/editor-page/renderer-pane/hooks/use-send-additional-configuration-to-renderer.ts b/frontend/src/components/common/render-iframe/hooks/use-send-additional-configuration-to-renderer.ts similarity index 100% rename from frontend/src/components/editor-page/renderer-pane/hooks/use-send-additional-configuration-to-renderer.ts rename to frontend/src/components/common/render-iframe/hooks/use-send-additional-configuration-to-renderer.ts diff --git a/frontend/src/components/editor-page/renderer-pane/hooks/use-send-markdown-to-renderer.ts b/frontend/src/components/common/render-iframe/hooks/use-send-markdown-to-renderer.ts similarity index 100% rename from frontend/src/components/editor-page/renderer-pane/hooks/use-send-markdown-to-renderer.ts rename to frontend/src/components/common/render-iframe/hooks/use-send-markdown-to-renderer.ts diff --git a/frontend/src/components/editor-page/renderer-pane/hooks/use-send-scroll-state.ts b/frontend/src/components/common/render-iframe/hooks/use-send-scroll-state.ts similarity index 93% rename from frontend/src/components/editor-page/renderer-pane/hooks/use-send-scroll-state.ts rename to frontend/src/components/common/render-iframe/hooks/use-send-scroll-state.ts index 1d219de84..a6f1925c1 100644 --- a/frontend/src/components/editor-page/renderer-pane/hooks/use-send-scroll-state.ts +++ b/frontend/src/components/common/render-iframe/hooks/use-send-scroll-state.ts @@ -3,9 +3,9 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ +import type { ScrollState } from '../../../editor-page/synced-scroll/scroll-props' import { useSendToRenderer } from '../../../render-page/window-post-message-communicator/hooks/use-send-to-renderer' import { CommunicationMessageType } from '../../../render-page/window-post-message-communicator/rendering-message' -import type { ScrollState } from '../../synced-scroll/scroll-props' import equal from 'fast-deep-equal' import { useMemo, useRef } from 'react' diff --git a/frontend/src/components/editor-page/renderer-pane/render-iframe.tsx b/frontend/src/components/common/render-iframe/render-iframe.tsx similarity index 95% rename from frontend/src/components/editor-page/renderer-pane/render-iframe.tsx rename to frontend/src/components/common/render-iframe/render-iframe.tsx index 900f764c5..e037ca97c 100644 --- a/frontend/src/components/editor-page/renderer-pane/render-iframe.tsx +++ b/frontend/src/components/common/render-iframe/render-iframe.tsx @@ -7,8 +7,8 @@ import type { DarkModePreference } from '../../../redux/dark-mode/types' import { cypressAttribute, cypressId } from '../../../utils/cypress-attribute' import { Logger } from '../../../utils/logger' import { isTestMode } from '../../../utils/test-modes' -import { ShowIf } from '../../common/show-if/show-if' -import { WaitSpinner } from '../../common/wait-spinner/wait-spinner' +import { useEditorToRendererCommunicator } from '../../editor-page/render-context/editor-to-renderer-communicator-context-provider' +import type { ScrollProps } from '../../editor-page/synced-scroll/scroll-props' import { useExtensionEventEmitter } from '../../markdown-renderer/hooks/use-extension-event-emitter' import type { CommonMarkdownRendererProps } from '../../render-page/renderers/common-markdown-renderer-props' import { useEditorReceiveHandler } from '../../render-page/window-post-message-communicator/hooks/use-editor-receive-handler' @@ -19,8 +19,8 @@ import type { } from '../../render-page/window-post-message-communicator/rendering-message' import type { RendererType } from '../../render-page/window-post-message-communicator/rendering-message' import { CommunicationMessageType } from '../../render-page/window-post-message-communicator/rendering-message' -import { useEditorToRendererCommunicator } from '../render-context/editor-to-renderer-communicator-context-provider' -import type { ScrollProps } from '../synced-scroll/scroll-props' +import { ShowIf } from '../show-if/show-if' +import { WaitSpinner } from '../wait-spinner/wait-spinner' import { useEffectOnRenderTypeChange } from './hooks/use-effect-on-render-type-change' import { useForceRenderPageUrlOnIframeLoadCallback } from './hooks/use-force-render-page-url-on-iframe-load-callback' import { useSendAdditionalConfigurationToRenderer } from './hooks/use-send-additional-configuration-to-renderer' diff --git a/frontend/src/components/document-read-only-page/document-read-only-page-content.tsx b/frontend/src/components/document-read-only-page/document-read-only-page-content.tsx index e6ade2a3c..ceba69c93 100644 --- a/frontend/src/components/document-read-only-page/document-read-only-page-content.tsx +++ b/frontend/src/components/document-read-only-page/document-read-only-page-content.tsx @@ -5,7 +5,7 @@ */ import { useTrimmedNoteMarkdownContentWithoutFrontmatter } from '../../hooks/common/use-trimmed-note-markdown-content-without-frontmatter' import { setRendererStatus } from '../../redux/renderer-status/methods' -import { RenderIframe } from '../editor-page/renderer-pane/render-iframe' +import { RenderIframe } from '../common/render-iframe/render-iframe' import { RendererType } from '../render-page/window-post-message-communicator/rendering-message' import { DocumentInfobar } from './document-infobar' import React, { Fragment } from 'react' diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-entry-pane.tsx b/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-entry-pane.tsx index 2ed458880..aba094264 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-entry-pane.tsx +++ b/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-entry-pane.tsx @@ -5,11 +5,11 @@ */ import HighlightedCode from '../../../common/highlighted-code/highlighted-code' import { HtmlToReact } from '../../../common/html-to-react/html-to-react' +import { RenderIframe } from '../../../common/render-iframe/render-iframe' import { ExtensionEventEmitterProvider } from '../../../markdown-renderer/hooks/use-extension-event-emitter' import { RendererType } from '../../../render-page/window-post-message-communicator/rendering-message' import type { CheatsheetEntry } from '../../cheatsheet/cheatsheet-extension' import { EditorToRendererCommunicatorContextProvider } from '../../render-context/editor-to-renderer-communicator-context-provider' -import { RenderIframe } from '../../renderer-pane/render-iframe' import { ReadMoreLinkItem } from './read-more-link-item' import { useComponentsFromAppExtensions } from './use-components-from-app-extensions' import MarkdownIt from 'markdown-it' diff --git a/frontend/src/components/editor-page/editor-document-renderer/editor-document-renderer.tsx b/frontend/src/components/editor-page/editor-document-renderer/editor-document-renderer.tsx index b620a8475..cc5bcc138 100644 --- a/frontend/src/components/editor-page/editor-document-renderer/editor-document-renderer.tsx +++ b/frontend/src/components/editor-page/editor-document-renderer/editor-document-renderer.tsx @@ -6,9 +6,9 @@ import { useApplicationState } from '../../../hooks/common/use-application-state' import { useTrimmedNoteMarkdownContentWithoutFrontmatter } from '../../../hooks/common/use-trimmed-note-markdown-content-without-frontmatter' import { setRendererStatus } from '../../../redux/renderer-status/methods' +import type { RenderIframeProps } from '../../common/render-iframe/render-iframe' +import { RenderIframe } from '../../common/render-iframe/render-iframe' import { RendererType } from '../../render-page/window-post-message-communicator/rendering-message' -import type { RenderIframeProps } from '../renderer-pane/render-iframe' -import { RenderIframe } from '../renderer-pane/render-iframe' import { useOnScrollWithLineOffset } from './hooks/use-on-scroll-with-line-offset' import { useScrollStateWithoutLineOffset } from './hooks/use-scroll-state-without-line-offset' import { NoteType } from '@hedgedoc/commons' diff --git a/frontend/src/components/intro-page/intro-custom-content.tsx b/frontend/src/components/intro-page/intro-custom-content.tsx index d77ef276f..b85f96154 100644 --- a/frontend/src/components/intro-page/intro-custom-content.tsx +++ b/frontend/src/components/intro-page/intro-custom-content.tsx @@ -6,7 +6,7 @@ import { DarkModePreference } from '../../redux/dark-mode/types' import { Logger } from '../../utils/logger' import { AsyncLoadingBoundary } from '../common/async-loading-boundary/async-loading-boundary' -import { RenderIframe } from '../editor-page/renderer-pane/render-iframe' +import { RenderIframe } from '../common/render-iframe/render-iframe' import { RendererType } from '../render-page/window-post-message-communicator/rendering-message' import { fetchFrontPageContent } from './requests' import React, { useEffect } from 'react' diff --git a/frontend/src/components/slide-show-page/slide-show-page-content.tsx b/frontend/src/components/slide-show-page/slide-show-page-content.tsx index 0235f2c5d..3f405be50 100644 --- a/frontend/src/components/slide-show-page/slide-show-page-content.tsx +++ b/frontend/src/components/slide-show-page/slide-show-page-content.tsx @@ -6,7 +6,7 @@ import { useApplicationState } from '../../hooks/common/use-application-state' import { useTrimmedNoteMarkdownContentWithoutFrontmatter } from '../../hooks/common/use-trimmed-note-markdown-content-without-frontmatter' import { setRendererStatus } from '../../redux/renderer-status/methods' -import { RenderIframe } from '../editor-page/renderer-pane/render-iframe' +import { RenderIframe } from '../common/render-iframe/render-iframe' import { useSendToRenderer } from '../render-page/window-post-message-communicator/hooks/use-send-to-renderer' import { CommunicationMessageType,