From fa819c290a5cdaeb1113c627e65cc81c9974c690 Mon Sep 17 00:00:00 2001 From: Erik Michelson Date: Thu, 29 Jun 2023 21:25:10 +0200 Subject: [PATCH] refactor: move cheatsheet to global components Signed-off-by: Erik Michelson --- .../cheatsheet/category-accordion.tsx | 2 +- .../cheatsheet/cheatsheet-button.tsx | 10 +++++----- .../cheatsheet/cheatsheet-content.tsx | 4 ++-- .../cheatsheet/cheatsheet-entry-pane.tsx | 14 +++++++------- .../cheatsheet/cheatsheet-extension.ts | 0 .../cheatsheet/cheatsheet-in-new-tab-button.tsx | 6 +++--- .../cheatsheet/cheatsheet-search.tsx | 16 ++++++++-------- .../cheatsheet/cheatsheet.module.scss | 0 .../app-bar => }/cheatsheet/entry-list.tsx | 2 +- .../cheatsheet/read-more-link-item.tsx | 2 +- .../app-bar => }/cheatsheet/topic-selection.tsx | 4 ++-- .../use-components-from-app-extensions.tsx | 6 +++--- .../components/editor-page/app-bar/app-bar.tsx | 4 ++-- .../extensions/_base-classes/app-extension.ts | 2 +- .../alert/alert-app-extension.ts | 4 ++-- .../basic-markdown-syntax-app-extension.ts | 2 +- .../blockquote/blockquote-app-extension.ts | 2 +- .../bootstrap-icon-app-extension.ts | 2 +- .../csv/csv-table-app-extension.ts | 2 +- .../emoji/emoji-app-extension.ts | 2 +- .../highlighted-code-fence-app-extension.ts | 2 +- .../iframe-capsule-app-extension.ts | 2 +- .../image-placeholder-app-extension.ts | 2 +- .../spoiler/spoiler-app-extension.ts | 4 ++-- .../table-of-contents-app-extension.ts | 2 +- .../task-list/set-checkbox-in-cheatsheet.tsx | 4 ++-- .../task-list-checkbox-app-extension.ts | 2 +- .../abcjs/abcjs-app-extension.ts | 4 ++-- .../asciinema/asciinema-app-extension.ts | 4 ++-- .../flowchart/flowchart-app-extension.ts | 4 ++-- .../gist/gist-app-extension.ts | 4 ++-- .../graphviz/graphviz-app-extension.ts | 4 ++-- .../katex/katex-app-extension.ts | 4 ++-- .../mermaid/mermaid-app-extension.ts | 4 ++-- .../plantuml/plantuml-app-extension.ts | 2 +- .../vega-lite/vega-lite-app-extension.ts | 4 ++-- .../vimeo/vimeo-app-extension.ts | 4 ++-- .../youtube/youtube-app-extension.ts | 4 ++-- frontend/src/pages/cheatsheet.tsx | 2 +- 39 files changed, 74 insertions(+), 74 deletions(-) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/category-accordion.tsx (96%) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/cheatsheet-button.tsx (79%) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/cheatsheet-content.tsx (94%) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/cheatsheet-entry-pane.tsx (82%) rename frontend/src/components/{editor-page => }/cheatsheet/cheatsheet-extension.ts (100%) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/cheatsheet-in-new-tab-button.tsx (82%) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/cheatsheet-search.tsx (86%) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/cheatsheet.module.scss (100%) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/entry-list.tsx (95%) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/read-more-link-item.tsx (92%) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/topic-selection.tsx (93%) rename frontend/src/components/{editor-page/app-bar => }/cheatsheet/use-components-from-app-extensions.tsx (80%) diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/category-accordion.tsx b/frontend/src/components/cheatsheet/category-accordion.tsx similarity index 96% rename from frontend/src/components/editor-page/app-bar/cheatsheet/category-accordion.tsx rename to frontend/src/components/cheatsheet/category-accordion.tsx index e16a2d649..15f4f2094 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/category-accordion.tsx +++ b/frontend/src/components/cheatsheet/category-accordion.tsx @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from './cheatsheet-extension' import { EntryList } from './entry-list' import React, { useMemo } from 'react' import { Accordion } from 'react-bootstrap' diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-button.tsx b/frontend/src/components/cheatsheet/cheatsheet-button.tsx similarity index 79% rename from frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-button.tsx rename to frontend/src/components/cheatsheet/cheatsheet-button.tsx index adc737b6b..54fd723e9 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-button.tsx +++ b/frontend/src/components/cheatsheet/cheatsheet-button.tsx @@ -3,11 +3,11 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { useBooleanState } from '../../../../hooks/common/use-boolean-state' -import { useTranslatedText } from '../../../../hooks/common/use-translated-text' -import { useOutlineButtonVariant } from '../../../../hooks/dark-mode/use-outline-button-variant' -import { cypressId } from '../../../../utils/cypress-attribute' -import { CommonModal } from '../../../common/modals/common-modal' +import { useBooleanState } from '../../hooks/common/use-boolean-state' +import { useTranslatedText } from '../../hooks/common/use-translated-text' +import { useOutlineButtonVariant } from '../../hooks/dark-mode/use-outline-button-variant' +import { cypressId } from '../../utils/cypress-attribute' +import { CommonModal } from '../common/modals/common-modal' import { CheatsheetContent } from './cheatsheet-content' import { CheatsheetInNewTabButton } from './cheatsheet-in-new-tab-button' import React, { Fragment } from 'react' diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-content.tsx b/frontend/src/components/cheatsheet/cheatsheet-content.tsx similarity index 94% rename from frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-content.tsx rename to frontend/src/components/cheatsheet/cheatsheet-content.tsx index 6d6f2e001..e042e6e37 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-content.tsx +++ b/frontend/src/components/cheatsheet/cheatsheet-content.tsx @@ -3,10 +3,10 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetSingleEntry, CheatsheetExtension } from '../../cheatsheet/cheatsheet-extension' -import { hasCheatsheetTopics } from '../../cheatsheet/cheatsheet-extension' import { CategoryAccordion } from './category-accordion' import { CheatsheetEntryPane } from './cheatsheet-entry-pane' +import type { CheatsheetSingleEntry, CheatsheetExtension } from './cheatsheet-extension' +import { hasCheatsheetTopics } from './cheatsheet-extension' import { CheatsheetSearch } from './cheatsheet-search' import styles from './cheatsheet.module.scss' import { TopicSelection } from './topic-selection' diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-entry-pane.tsx b/frontend/src/components/cheatsheet/cheatsheet-entry-pane.tsx similarity index 82% rename from frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-entry-pane.tsx rename to frontend/src/components/cheatsheet/cheatsheet-entry-pane.tsx index b38282670..8e1624324 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-entry-pane.tsx +++ b/frontend/src/components/cheatsheet/cheatsheet-entry-pane.tsx @@ -3,13 +3,13 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import HighlightedCode from '../../../common/highlighted-code/highlighted-code' -import { HtmlToReact } from '../../../common/html-to-react/html-to-react' -import { RendererIframe } from '../../../common/renderer-iframe/renderer-iframe' -import { ExtensionEventEmitterProvider } from '../../../markdown-renderer/hooks/use-extension-event-emitter' -import { RendererType } from '../../../render-page/window-post-message-communicator/rendering-message' -import type { CheatsheetSingleEntry } from '../../cheatsheet/cheatsheet-extension' -import { EditorToRendererCommunicatorContextProvider } from '../../render-context/editor-to-renderer-communicator-context-provider' +import HighlightedCode from '../common/highlighted-code/highlighted-code' +import { HtmlToReact } from '../common/html-to-react/html-to-react' +import { RendererIframe } from '../common/renderer-iframe/renderer-iframe' +import { EditorToRendererCommunicatorContextProvider } from '../editor-page/render-context/editor-to-renderer-communicator-context-provider' +import { ExtensionEventEmitterProvider } from '../markdown-renderer/hooks/use-extension-event-emitter' +import { RendererType } from '../render-page/window-post-message-communicator/rendering-message' +import type { CheatsheetSingleEntry } from './cheatsheet-extension' 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/cheatsheet/cheatsheet-extension.ts b/frontend/src/components/cheatsheet/cheatsheet-extension.ts similarity index 100% rename from frontend/src/components/editor-page/cheatsheet/cheatsheet-extension.ts rename to frontend/src/components/cheatsheet/cheatsheet-extension.ts diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-in-new-tab-button.tsx b/frontend/src/components/cheatsheet/cheatsheet-in-new-tab-button.tsx similarity index 82% rename from frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-in-new-tab-button.tsx rename to frontend/src/components/cheatsheet/cheatsheet-in-new-tab-button.tsx index 21e5cf3ef..adf64010e 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-in-new-tab-button.tsx +++ b/frontend/src/components/cheatsheet/cheatsheet-in-new-tab-button.tsx @@ -3,9 +3,9 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { useTranslatedText } from '../../../../hooks/common/use-translated-text' -import { useOutlineButtonVariant } from '../../../../hooks/dark-mode/use-outline-button-variant' -import { IconButton } from '../../../common/icon-button/icon-button' +import { useTranslatedText } from '../../hooks/common/use-translated-text' +import { useOutlineButtonVariant } from '../../hooks/dark-mode/use-outline-button-variant' +import { IconButton } from '../common/icon-button/icon-button' import type { MouseEvent } from 'react' import React, { useCallback } from 'react' import { BoxArrowUpRight } from 'react-bootstrap-icons' diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-search.tsx b/frontend/src/components/cheatsheet/cheatsheet-search.tsx similarity index 86% rename from frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-search.tsx rename to frontend/src/components/cheatsheet/cheatsheet-search.tsx index 80f13ada7..e0cfd61c6 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-search.tsx +++ b/frontend/src/components/cheatsheet/cheatsheet-search.tsx @@ -3,14 +3,14 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { allAppExtensions } from '../../../../extensions/all-app-extensions' -import type { SearchIndexEntry } from '../../../../hooks/common/use-document-search' -import { useDocumentSearch } from '../../../../hooks/common/use-document-search' -import { useOnInputChange } from '../../../../hooks/common/use-on-input-change' -import { useTranslatedText } from '../../../../hooks/common/use-translated-text' -import { UiIcon } from '../../../common/icons/ui-icon' -import type { CheatsheetSingleEntry, CheatsheetExtension } from '../../cheatsheet/cheatsheet-extension' -import { hasCheatsheetTopics } from '../../cheatsheet/cheatsheet-extension' +import { allAppExtensions } from '../../extensions/all-app-extensions' +import type { SearchIndexEntry } from '../../hooks/common/use-document-search' +import { useDocumentSearch } from '../../hooks/common/use-document-search' +import { useOnInputChange } from '../../hooks/common/use-on-input-change' +import { useTranslatedText } from '../../hooks/common/use-translated-text' +import { UiIcon } from '../common/icons/ui-icon' +import type { CheatsheetSingleEntry, CheatsheetExtension } from './cheatsheet-extension' +import { hasCheatsheetTopics } from './cheatsheet-extension' import styles from './cheatsheet.module.scss' import type { IndexOptionsForDocumentSearch, StoreOption } from 'flexsearch-ts' import React, { useCallback, useEffect, useMemo, useState } from 'react' diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet.module.scss b/frontend/src/components/cheatsheet/cheatsheet.module.scss similarity index 100% rename from frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet.module.scss rename to frontend/src/components/cheatsheet/cheatsheet.module.scss diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/entry-list.tsx b/frontend/src/components/cheatsheet/entry-list.tsx similarity index 95% rename from frontend/src/components/editor-page/app-bar/cheatsheet/entry-list.tsx rename to frontend/src/components/cheatsheet/entry-list.tsx index 094ab6062..4cf8ca899 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/entry-list.tsx +++ b/frontend/src/components/cheatsheet/entry-list.tsx @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from './cheatsheet-extension' import styles from './cheatsheet.module.scss' import React, { useMemo } from 'react' import { ListGroup, ListGroupItem } from 'react-bootstrap' diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/read-more-link-item.tsx b/frontend/src/components/cheatsheet/read-more-link-item.tsx similarity index 92% rename from frontend/src/components/editor-page/app-bar/cheatsheet/read-more-link-item.tsx rename to frontend/src/components/cheatsheet/read-more-link-item.tsx index fadbacd2e..b17797d05 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/read-more-link-item.tsx +++ b/frontend/src/components/cheatsheet/read-more-link-item.tsx @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { ExternalLink } from '../../../common/links/external-link' +import { ExternalLink } from '../common/links/external-link' import React from 'react' import { ListGroupItem } from 'react-bootstrap' import { Trans } from 'react-i18next' diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/topic-selection.tsx b/frontend/src/components/cheatsheet/topic-selection.tsx similarity index 93% rename from frontend/src/components/editor-page/app-bar/cheatsheet/topic-selection.tsx rename to frontend/src/components/cheatsheet/topic-selection.tsx index f54e66e3c..91fc12706 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/topic-selection.tsx +++ b/frontend/src/components/cheatsheet/topic-selection.tsx @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetSingleEntry, CheatsheetExtension } from '../../cheatsheet/cheatsheet-extension' -import { hasCheatsheetTopics } from '../../cheatsheet/cheatsheet-extension' +import type { CheatsheetSingleEntry, CheatsheetExtension } from './cheatsheet-extension' +import { hasCheatsheetTopics } from './cheatsheet-extension' import React, { useMemo } from 'react' import { Button, ButtonGroup, ListGroupItem } from 'react-bootstrap' import { Trans } from 'react-i18next' diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/use-components-from-app-extensions.tsx b/frontend/src/components/cheatsheet/use-components-from-app-extensions.tsx similarity index 80% rename from frontend/src/components/editor-page/app-bar/cheatsheet/use-components-from-app-extensions.tsx rename to frontend/src/components/cheatsheet/use-components-from-app-extensions.tsx index 550678543..e550fe8f7 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/use-components-from-app-extensions.tsx +++ b/frontend/src/components/cheatsheet/use-components-from-app-extensions.tsx @@ -3,9 +3,9 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { allAppExtensions } from '../../../../extensions/all-app-extensions' -import type { CheatsheetExtensionComponentProps } from '../../cheatsheet/cheatsheet-extension' -import { hasCheatsheetTopics } from '../../cheatsheet/cheatsheet-extension' +import { allAppExtensions } from '../../extensions/all-app-extensions' +import type { CheatsheetExtensionComponentProps } from './cheatsheet-extension' +import { hasCheatsheetTopics } from './cheatsheet-extension' import type { ReactElement } from 'react' import React, { Fragment, useMemo } from 'react' diff --git a/frontend/src/components/editor-page/app-bar/app-bar.tsx b/frontend/src/components/editor-page/app-bar/app-bar.tsx index 3bba9445c..f00c60aad 100644 --- a/frontend/src/components/editor-page/app-bar/app-bar.tsx +++ b/frontend/src/components/editor-page/app-bar/app-bar.tsx @@ -1,16 +1,16 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ import { useApplicationState } from '../../../hooks/common/use-application-state' import { useOutlineButtonVariant } from '../../../hooks/dark-mode/use-outline-button-variant' +import { CheatsheetButton } from '../../cheatsheet/cheatsheet-button' import { NewNoteButton } from '../../common/new-note-button/new-note-button' import { ShowIf } from '../../common/show-if/show-if' import { SignInButton } from '../../landing-layout/navigation/sign-in-button' import { UserDropdown } from '../../landing-layout/navigation/user-dropdown' import { SettingsButton } from '../../layout/settings-dialog/settings-button' -import { CheatsheetButton } from './cheatsheet/cheatsheet-button' import { HelpButton } from './help-button/help-button' import { NavbarBranding } from './navbar-branding' import { ReadOnlyModeButton } from './read-only-mode-button' diff --git a/frontend/src/extensions/_base-classes/app-extension.ts b/frontend/src/extensions/_base-classes/app-extension.ts index 063cf0a68..57f146c9e 100644 --- a/frontend/src/extensions/_base-classes/app-extension.ts +++ b/frontend/src/extensions/_base-classes/app-extension.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import type { FrontendConfig } from '../../api/config/types' -import type { CheatsheetExtension } from '../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../components/cheatsheet/cheatsheet-extension' import type { Linter } from '../../components/editor-page/editor-pane/linter/linter' import type { MarkdownRendererExtension } from '../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type { RendererType } from '../../components/render-page/window-post-message-communicator/rendering-message' diff --git a/frontend/src/extensions/essential-app-extensions/alert/alert-app-extension.ts b/frontend/src/extensions/essential-app-extensions/alert/alert-app-extension.ts index 4775a4cee..c2ba8cc57 100644 --- a/frontend/src/extensions/essential-app-extensions/alert/alert-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/alert/alert-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' diff --git a/frontend/src/extensions/essential-app-extensions/basic-markdown-syntax/basic-markdown-syntax-app-extension.ts b/frontend/src/extensions/essential-app-extensions/basic-markdown-syntax/basic-markdown-syntax-app-extension.ts index 350e0ed91..30bc990a8 100644 --- a/frontend/src/extensions/essential-app-extensions/basic-markdown-syntax/basic-markdown-syntax-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/basic-markdown-syntax/basic-markdown-syntax-app-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' diff --git a/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-app-extension.ts b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-app-extension.ts index b0b7e6032..0bb7b2119 100644 --- a/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-app-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' diff --git a/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-app-extension.ts b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-app-extension.ts index d0d7f13d1..8af42bdc0 100644 --- a/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-app-extension.ts @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { BootstrapLazyIcons } from '../../../components/common/icons/bootstrap-icons' -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' import { regexCompletion } from '../../../components/editor-page/editor-pane/autocompletions/regex-completion' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' diff --git a/frontend/src/extensions/essential-app-extensions/csv/csv-table-app-extension.ts b/frontend/src/extensions/essential-app-extensions/csv/csv-table-app-extension.ts index a50f12ae5..918cfc532 100644 --- a/frontend/src/extensions/essential-app-extensions/csv/csv-table-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/csv/csv-table-app-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion, codeFenceRegex diff --git a/frontend/src/extensions/essential-app-extensions/emoji/emoji-app-extension.ts b/frontend/src/extensions/essential-app-extensions/emoji/emoji-app-extension.ts index 4bd2c51c8..c86f8c400 100644 --- a/frontend/src/extensions/essential-app-extensions/emoji/emoji-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/emoji/emoji-app-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { regexCompletion } from '../../../components/editor-page/editor-pane/autocompletions/regex-completion' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' diff --git a/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-fence-app-extension.ts b/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-fence-app-extension.ts index 731e80057..1352fcafd 100644 --- a/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-fence-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-fence-app-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { codeFenceRegex } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' diff --git a/frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-app-extension.ts b/frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-app-extension.ts index 45b356c78..d7fb5daf8 100644 --- a/frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-app-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' import { IframeCapsuleMarkdownExtension } from './iframe-capsule-markdown-extension' diff --git a/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-app-extension.ts b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-app-extension.ts index 89ba6076c..98c212679 100644 --- a/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-app-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' diff --git a/frontend/src/extensions/essential-app-extensions/spoiler/spoiler-app-extension.ts b/frontend/src/extensions/essential-app-extensions/spoiler/spoiler-app-extension.ts index 66b559a4e..3a0e39883 100644 --- a/frontend/src/extensions/essential-app-extensions/spoiler/spoiler-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/spoiler/spoiler-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' diff --git a/frontend/src/extensions/essential-app-extensions/table-of-contents/table-of-contents-app-extension.ts b/frontend/src/extensions/essential-app-extensions/table-of-contents/table-of-contents-app-extension.ts index a6a0d5e47..867a2c0dd 100644 --- a/frontend/src/extensions/essential-app-extensions/table-of-contents/table-of-contents-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/table-of-contents/table-of-contents-app-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type { MarkdownRendererExtensionOptions } from '../../_base-classes/app-extension' diff --git a/frontend/src/extensions/essential-app-extensions/task-list/set-checkbox-in-cheatsheet.tsx b/frontend/src/extensions/essential-app-extensions/task-list/set-checkbox-in-cheatsheet.tsx index 905991aad..da8ed3a5e 100644 --- a/frontend/src/extensions/essential-app-extensions/task-list/set-checkbox-in-cheatsheet.tsx +++ b/frontend/src/extensions/essential-app-extensions/task-list/set-checkbox-in-cheatsheet.tsx @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtensionComponentProps } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtensionComponentProps } from '../../../components/cheatsheet/cheatsheet-extension' import { useExtensionEventEmitterHandler } from '../../../components/markdown-renderer/hooks/use-extension-event-emitter' import { createCheckboxContent } from './create-checkbox-content' import type { TaskCheckedEventPayload } from './event-emitting-task-list-checkbox' diff --git a/frontend/src/extensions/essential-app-extensions/task-list/task-list-checkbox-app-extension.ts b/frontend/src/extensions/essential-app-extensions/task-list/task-list-checkbox-app-extension.ts index 165470c50..06abcf3a5 100644 --- a/frontend/src/extensions/essential-app-extensions/task-list/task-list-checkbox-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/task-list/task-list-checkbox-app-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import type { MarkdownRendererExtensionOptions } from '../../_base-classes/app-extension' import { AppExtension } from '../../_base-classes/app-extension' import { SetCheckboxInCheatsheet } from './set-checkbox-in-cheatsheet' diff --git a/frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-app-extension.ts index 21686e25a..52e92f0f4 100644 --- a/frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion, codeFenceRegex diff --git a/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-app-extension.ts index bd55f593e..a12b90922 100644 --- a/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' import { AsciinemaMarkdownExtension } from './asciinema-markdown-extension' diff --git a/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-app-extension.ts index 089152986..ba82c2ba6 100644 --- a/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion, codeFenceRegex diff --git a/frontend/src/extensions/external-lib-app-extensions/gist/gist-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/gist/gist-app-extension.ts index 1ac6b175b..0f24554e9 100644 --- a/frontend/src/extensions/external-lib-app-extensions/gist/gist-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/gist/gist-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' import { GistMarkdownExtension } from './gist-markdown-extension' diff --git a/frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-app-extension.ts index abf9873f5..312ffe637 100644 --- a/frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion, codeFenceRegex diff --git a/frontend/src/extensions/external-lib-app-extensions/katex/katex-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/katex/katex-app-extension.ts index e066ab412..bfd02fc6a 100644 --- a/frontend/src/extensions/external-lib-app-extensions/katex/katex-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/katex/katex-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { AppExtension } from '../../_base-classes/app-extension' import { KatexMarkdownExtension } from './katex-markdown-extension' diff --git a/frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-app-extension.ts index 0b0180a03..a27d37f99 100644 --- a/frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion, codeFenceRegex diff --git a/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-app-extension.ts index c0d34d5dd..ae2bae4f1 100644 --- a/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-app-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion, codeFenceRegex diff --git a/frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-app-extension.ts index 20b121c2a..771c67276 100644 --- a/frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import { basicCompletion, codeFenceRegex diff --git a/frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-app-extension.ts index 3912b789b..74ced4b02 100644 --- a/frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import type { Linter } from '../../../components/editor-page/editor-pane/linter/linter' import { SingleLineRegexLinter } from '../../../components/editor-page/editor-pane/linter/single-line-regex-linter' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' diff --git a/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-app-extension.ts index 8ed44faa2..67f40330c 100644 --- a/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-app-extension.ts @@ -1,9 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' +import type { CheatsheetExtension } from '../../../components/cheatsheet/cheatsheet-extension' import type { Linter } from '../../../components/editor-page/editor-pane/linter/linter' import { SingleLineRegexLinter } from '../../../components/editor-page/editor-pane/linter/single-line-regex-linter' import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' diff --git a/frontend/src/pages/cheatsheet.tsx b/frontend/src/pages/cheatsheet.tsx index 0b3969cfe..96ee0a091 100644 --- a/frontend/src/pages/cheatsheet.tsx +++ b/frontend/src/pages/cheatsheet.tsx @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { CheatsheetContent } from '../components/editor-page/app-bar/cheatsheet/cheatsheet-content' +import { CheatsheetContent } from '../components/cheatsheet/cheatsheet-content' import { useApplyDarkModeStyle } from '../hooks/dark-mode/use-apply-dark-mode-style' import type { NextPage } from 'next' import { Container } from 'react-bootstrap'