From 1e4709c08740b4f1d81b45236141eee0b7557298 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Fri, 14 Apr 2023 09:13:37 +0200 Subject: [PATCH] refactor: organize app extensions Signed-off-by: Tilman Vatteroth --- .../highlighted-code.spec.tsx.snap | 0 .../highlighted-code.module.scss | 0 .../highlighted-code.spec.tsx | 0 .../highlighted-code}/highlighted-code.tsx | 0 .../hooks/use-async-highlight-js-import.tsx | 0 .../hooks/use-attach-line-numbers.tsx | 0 .../highlighted-code}/hooks/use-code-dom.tsx | 0 .../preconfigured-highlight-js.ts | 0 .../app-bar/cheatsheet/cheatsheet-content.tsx | 7 +- .../cheatsheet/cheatsheet-entry-pane.tsx | 2 +- .../use-components-from-app-extensions.tsx | 2 +- .../editor-page/editor-pane/editor-pane.tsx | 2 +- ...e-code-mirror-autocompletions-extension.ts | 2 +- .../use-components-from-app-extensions.tsx | 2 +- .../editor-page/editor-pane/linter/linter.ts | 2 +- .../code-block-markdown-plugin.ts | 0 .../code-block-markdown-renderer-extension.ts | 0 .../code-block-parameters.spec.ts | 0 .../code-block-parameters.ts | 0 .../find-language-by-code-block-name.spec.ts | 0 .../find-language-by-code-block-name.ts | 0 .../event-markdown-renderer-extension.ts | 0 .../markdown-renderer-extension.ts | 0 .../extensions/debugger-markdown-extension.ts | 2 +- .../image/proxy-image-markdown-extension.ts | 2 +- .../linemarker-markdown-extension.ts | 2 +- .../link-adjustment-markdown-extension.ts | 2 +- .../linkify-fix-markdown-extension.ts | 2 +- .../reveal/reveal-markdown-extension.ts | 2 +- .../upload-indicating-frame.tsx | 2 +- ...dicating-image-frame-markdown-extension.ts | 2 +- .../hooks/use-markdown-extensions.ts | 4 +- .../hooks/use-combined-node-preprocessor.ts | 2 +- .../hooks/use-configured-markdown-it.ts | 2 +- .../markdown-to-react/markdown-to-react.tsx | 2 +- .../test-markdown-renderer-extension.ts | 2 +- .../test-utils/test-markdown-renderer.tsx | 2 +- .../document/document-markdown-renderer.tsx | 9 +-- .../document/document-toc-sidebar.tsx | 2 +- .../{base => _base-classes}/app-extension.ts | 2 +- frontend/src/extensions/all-app-extensions.ts | 10 +++ .../alert/alert-app-extension.ts | 4 +- .../alert/alert-markdown-extension.ts | 2 +- .../basic-markdown-syntax-app-extension.ts | 8 +-- ...asic-markdown-syntax-markdown-extension.ts | 2 +- ...extra-tag-markdown-extension.spec.tsx.snap | 0 .../blockquote/blockquote-app-extension.ts | 4 +- ...ockquote-border-color-node-preprocessor.ts | 0 .../blockquote-color-extra-tag-replacer.tsx | 0 ...uote-extra-tag-markdown-extension.spec.tsx | 0 ...blockquote-extra-tag-markdown-extension.ts | 2 +- ...quote-extra-tag-markdown-it-plugin.spec.ts | 0 ...blockquote-extra-tag-markdown-it-plugin.ts | 0 .../blockquote-extra-tag-replacer.tsx | 0 ...trap-icon-markdown-extension.spec.tsx.snap | 0 .../bootstrap-icon-app-extension.ts | 10 +-- .../bootstrap-icon-component-replacer.ts | 11 +-- ...bootstrap-icon-markdown-extension.spec.tsx | 2 +- .../bootstrap-icon-markdown-extension.ts | 4 +- .../replace-bootstrap-icons.spec.ts | 0 .../replace-bootstrap-icons.ts | 4 +- ...csv-table-markdown-extension.spec.tsx.snap | 0 .../csv/__snapshots__/csv-table.spec.tsx.snap | 0 .../csv/csv-parser.spec.ts | 0 .../csv/csv-parser.ts | 0 .../csv/csv-replacer.tsx | 0 .../csv/csv-table-app-extension.ts | 4 +- .../csv/csv-table-markdown-extension.spec.tsx | 0 .../csv/csv-table-markdown-extension.ts | 2 +- .../csv/csv-table.spec.tsx | 0 .../csv/csv-table.tsx | 0 .../emoji-markdown-extension.spec.tsx.snap | 0 .../emoji/emoji-app-extension.ts | 12 ++-- .../emoji/emoji-markdown-extension.spec.tsx | 14 ++-- .../emoji-markdown-renderer-extension.ts} | 4 +- .../emoji/mapping.ts | 0 .../essential-app-extensions.ts | 43 ++++++++++++ .../extract-first-headline-app-extension.ts | 8 +-- ...xtract-first-headline-editor-extension.tsx | 4 +- ...ract-first-headline-markdown-extension.tsx | 4 +- .../extract-first-headline-node-processor.ts | 2 +- .../fork-awesome-html-tag-app-extension.ts | 2 +- .../headline-anchors-app-extension.ts | 19 +++++ ...ne-anchors-markdown-renderer-extension.ts} | 6 +- ...hted-code-markdown-extension.spec.tsx.snap | 0 .../highlighted-code-fence-app-extension.ts | 4 +- ...ghlighted-code-markdown-extension.spec.tsx | 6 +- .../highlighted-code-markdown-extension.ts | 2 +- .../highlighted-code-replacer.tsx | 2 +- .../iframe-capsule-app-extension.ts | 6 +- .../iframe-capsule-markdown-extension.ts | 4 +- .../iframe-capsule-replacer.tsx | 13 +++- .../add-line-to-placeholder-image-tags.ts | 0 .../hooks/use-on-image-upload.ts | 8 +-- .../hooks/use-placeholder-size-style.ts | 0 .../image-placeholder-app-extension.ts | 8 +-- .../image-placeholder-markdown-extension.ts | 4 +- .../image-placeholder-replacer.tsx | 7 +- .../image-placeholder.module.scss | 0 .../image-placeholder/image-placeholder.tsx | 6 +- .../utils/build-placeholder-size-css.spec.ts | 0 .../utils/build-placeholder-size-css.ts | 0 ...hortcodes-markdown-extension.spec.tsx.snap | 0 .../legacy-shortcodes-app-extension.ts | 4 +- ...acy-shortcodes-markdown-extension.spec.tsx | 0 .../legacy-shortcodes-markdown-extension.ts | 2 +- .../replace-legacy-pdf-short-code.spec.ts | 0 .../replace-legacy-pdf-short-code.ts | 0 ...place-legacy-slideshare-short-code.spec.ts | 0 .../replace-legacy-slideshare-short-code.ts | 0 ...lace-legacy-speakerdeck-short-code.spec.ts | 0 .../replace-legacy-speakerdeck-short-code.ts | 0 .../spoiler/spoiler-app-extension.ts | 4 +- .../spoiler/spoiler-markdown-extension.ts | 2 +- .../table-of-contents-app-extension.ts | 10 +-- .../table-of-contents-markdown-extension.ts | 4 +- .../task-list/create-checkbox-content.ts | 0 .../event-emitting-task-list-checkbox.tsx | 0 .../task-list/find-check-box.ts | 0 .../task-list/set-checkbox-in-cheatsheet.tsx | 0 .../task-list/set-checkbox-in-editor.tsx | 0 .../task-list-checkbox-app-extension.ts | 4 +- .../task-list/task-list-checkbox.tsx | 0 .../task-list/task-list-markdown-extension.ts | 2 +- .../task-list/task-list-replacer.tsx | 0 .../__snapshots__/abc-frame.spec.tsx.snap | 0 .../abcjs-markdown-extension.spec.tsx.snap | 0 .../abcjs/abc-frame.spec.tsx | 0 .../abcjs/abc-frame.tsx | 0 .../abcjs/abc.module.scss | 0 .../abcjs/abcjs-app-extension.ts | 4 +- .../abcjs/abcjs-markdown-extension.spec.tsx | 0 .../abcjs/abcjs-markdown-extension.ts | 2 +- .../asciinema-frame.spec.tsx.snap | 0 ...asciinema-markdown-extension.spec.tsx.snap | 0 .../asciinema/asciinema-app-extension.ts | 4 +- .../asciinema/asciinema-frame.spec.tsx | 0 .../asciinema/asciinema-frame.tsx | 0 .../asciinema-markdown-extension.spec.tsx | 0 .../asciinema/asciinema-markdown-extension.ts | 2 +- .../asciinema/replace-asciinema-link.spec.ts | 0 .../asciinema/replace-asciinema-link.ts | 0 .../external-lib-app-extensions.ts | 34 +++++++++ ...flowchart-markdown-extension.spec.tsx.snap | 0 .../__snapshots__/flowchart.spec.tsx.snap | 0 .../flowchart/flowchart-app-extension.ts | 4 +- .../flowchart-markdown-extension.spec.tsx | 0 .../flowchart/flowchart-markdown-extension.ts | 2 +- .../flowchart/flowchart.spec.tsx | 0 .../flowchart/flowchart.tsx | 0 .../gist/gist-app-extension.ts | 4 +- .../gist/gist-frame.module.scss | 0 .../gist/gist-frame.tsx | 0 .../gist/gist-markdown-extension.ts | 2 +- .../gist/replace-gist-link.ts | 0 .../gist/replace-legacy-gist-short-code.ts | 0 .../gist/use-resize-gist-frame.ts | 0 .../graphviz-markdown-extension.spec.tsx.snap | 0 .../graphviz/graphviz-app-extension.ts | 4 +- .../graphviz/graphviz-frame.tsx | 0 .../graphviz-markdown-extension.spec.tsx | 0 .../graphviz/graphviz-markdown-extension.ts | 2 +- .../__snapshots__/katex-frame.spec.tsx.snap | 0 .../katex-markdown-extension.spec.tsx.snap | 0 .../katex/katex-app-extension.ts | 4 +- .../katex/katex-frame.spec.tsx | 0 .../katex/katex-frame.tsx | 0 .../katex/katex-markdown-extension.spec.tsx | 0 .../katex/katex-markdown-extension.ts | 2 +- .../katex/katex-replacer.tsx | 0 .../mermaid/mermaid-app-extension.ts | 4 +- .../mermaid/mermaid-chart.tsx | 0 .../mermaid/mermaid-markdown-extension.ts | 2 +- .../mermaid/mermaid.module.scss | 0 .../plantuml-markdown-extension.spec.tsx.snap | 0 .../plantuml/plantuml-app-extension.ts | 6 +- .../plantuml-markdown-extension.spec.tsx | 0 .../plantuml/plantuml-markdown-extension.ts | 2 +- .../plantuml-not-configured-alert.tsx | 0 ...tuml-not-configured-component-replacer.tsx | 0 .../legacy-sequence-diagram-app-extension.ts | 4 +- ...acy-sequence-diagram-markdown-extension.ts | 2 +- .../sequence-diagram/sequence-diagram.tsx | 0 ...vega-lite-markdown-extension.spec.tsx.snap | 0 .../vega-lite/vega-lite-app-extension.ts | 4 +- .../vega-lite/vega-lite-chart.tsx | 0 .../vega-lite-markdown-extension.spec.tsx | 0 .../vega-lite/vega-lite-markdown-extension.ts | 2 +- .../__snapshots__/vimeo-frame.spec.tsx.snap | 0 .../replace-legacy-vimeo-short-code.spec.ts | 0 .../vimeo/replace-legacy-vimeo-short-code.ts | 0 .../vimeo/replace-vimeo-link.spec.ts | 0 .../vimeo/replace-vimeo-link.ts | 0 .../vimeo/vimeo-app-extension.ts | 4 +- .../vimeo/vimeo-frame.spec.tsx | 0 .../vimeo/vimeo-frame.tsx | 0 .../vimeo/vimeo-markdown-extension.ts | 2 +- .../__snapshots__/youtube-frame.spec.tsx.snap | 0 .../youtube-markdown-extension.spec.tsx.snap | 0 .../replace-legacy-youtube-short-code.spec.ts | 0 .../replace-legacy-youtube-short-code.ts | 0 .../youtube/replace-youtube-link.spec.ts | 0 .../youtube/replace-youtube-link.ts | 0 .../youtube/youtube-app-extension.ts | 4 +- .../youtube/youtube-frame.spec.tsx | 0 .../youtube/youtube-frame.tsx | 0 .../youtube-markdown-extension.spec.tsx | 0 .../youtube/youtube-markdown-extension.ts | 2 +- .../extra-integrations/all-app-extensions.ts | 70 ------------------- 209 files changed, 286 insertions(+), 243 deletions(-) rename frontend/src/{extensions/extra-integrations/highlighted-code-fence => components/common/highlighted-code}/__snapshots__/highlighted-code.spec.tsx.snap (100%) rename frontend/src/{extensions/extra-integrations/highlighted-code-fence => components/common/highlighted-code}/highlighted-code.module.scss (100%) rename frontend/src/{extensions/extra-integrations/highlighted-code-fence => components/common/highlighted-code}/highlighted-code.spec.tsx (100%) rename frontend/src/{extensions/extra-integrations/highlighted-code-fence => components/common/highlighted-code}/highlighted-code.tsx (100%) rename frontend/src/{extensions/extra-integrations/highlighted-code-fence => components/common/highlighted-code}/hooks/use-async-highlight-js-import.tsx (100%) rename frontend/src/{extensions/extra-integrations/highlighted-code-fence => components/common/highlighted-code}/hooks/use-attach-line-numbers.tsx (100%) rename frontend/src/{extensions/extra-integrations/highlighted-code-fence => components/common/highlighted-code}/hooks/use-code-dom.tsx (100%) rename frontend/src/{extensions/extra-integrations/highlighted-code-fence => components/common/highlighted-code}/preconfigured-highlight-js.ts (100%) rename frontend/src/components/markdown-renderer/extensions/{base => _base-classes}/code-block-markdown-extension/code-block-markdown-plugin.ts (100%) rename frontend/src/components/markdown-renderer/extensions/{base => _base-classes}/code-block-markdown-extension/code-block-markdown-renderer-extension.ts (100%) rename frontend/src/components/markdown-renderer/extensions/{base => _base-classes}/code-block-markdown-extension/code-block-parameters.spec.ts (100%) rename frontend/src/components/markdown-renderer/extensions/{base => _base-classes}/code-block-markdown-extension/code-block-parameters.ts (100%) rename frontend/src/components/markdown-renderer/extensions/{base => _base-classes}/code-block-markdown-extension/find-language-by-code-block-name.spec.ts (100%) rename frontend/src/components/markdown-renderer/extensions/{base => _base-classes}/code-block-markdown-extension/find-language-by-code-block-name.ts (100%) rename frontend/src/components/markdown-renderer/extensions/{base => _base-classes}/event-markdown-renderer-extension.ts (100%) rename frontend/src/components/markdown-renderer/extensions/{base => _base-classes}/markdown-renderer-extension.ts (100%) rename frontend/src/extensions/{base => _base-classes}/app-extension.ts (95%) create mode 100644 frontend/src/extensions/all-app-extensions.ts rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/alert/alert-app-extension.ts (91%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/alert/alert-markdown-extension.ts (93%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/basic-markdown-syntax/basic-markdown-syntax-app-extension.ts (80%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/basic-markdown-syntax/basic-markdown-syntax-markdown-extension.ts (87%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/blockquote/__snapshots__/blockquote-extra-tag-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/blockquote/blockquote-app-extension.ts (91%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/blockquote/blockquote-border-color-node-preprocessor.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/blockquote/blockquote-color-extra-tag-replacer.tsx (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/blockquote/blockquote-extra-tag-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/blockquote/blockquote-extra-tag-markdown-extension.ts (96%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/blockquote/blockquote-extra-tag-markdown-it-plugin.spec.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/blockquote/blockquote-extra-tag-markdown-it-plugin.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/blockquote/blockquote-extra-tag-replacer.tsx (100%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/bootstrap-icons/__snapshots__/bootstrap-icon-markdown-extension.spec.tsx.snap (100%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/bootstrap-icons/bootstrap-icon-app-extension.ts (66%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/bootstrap-icons/bootstrap-icon-component-replacer.ts (69%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/bootstrap-icons/bootstrap-icon-markdown-extension.spec.tsx (90%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/bootstrap-icons/bootstrap-icon-markdown-extension.ts (77%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/bootstrap-icons/replace-bootstrap-icons.spec.ts (100%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/bootstrap-icons/replace-bootstrap-icons.ts (84%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/csv/__snapshots__/csv-table-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/csv/__snapshots__/csv-table.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/csv/csv-parser.spec.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/csv/csv-parser.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/csv/csv-replacer.tsx (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/csv/csv-table-app-extension.ts (88%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/csv/csv-table-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/csv/csv-table-markdown-extension.ts (89%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/csv/csv-table.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/csv/csv-table.tsx (100%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/emoji/__snapshots__/emoji-markdown-extension.spec.tsx.snap (100%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/emoji/emoji-app-extension.ts (62%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/emoji/emoji-markdown-extension.spec.tsx (51%) rename frontend/src/{components/markdown-renderer/extensions/emoji/emoji-markdown-extension.ts => extensions/essential-app-extensions/emoji/emoji-markdown-renderer-extension.ts} (66%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/emoji/mapping.ts (100%) create mode 100644 frontend/src/extensions/essential-app-extensions/essential-app-extensions.ts rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/extract-first-headline/extract-first-headline-app-extension.ts (66%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/extract-first-headline/extract-first-headline-editor-extension.tsx (74%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/extract-first-headline/extract-first-headline-markdown-extension.tsx (65%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/extract-first-headline/extract-first-headline-node-processor.ts (89%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/fork-awesome-html-tag/fork-awesome-html-tag-app-extension.ts (92%) create mode 100644 frontend/src/extensions/essential-app-extensions/headline-anchors/headline-anchors-app-extension.ts rename frontend/src/{components/markdown-renderer/extensions/headline-anchors-markdown-extension.ts => extensions/essential-app-extensions/headline-anchors/headline-anchors-markdown-renderer-extension.ts} (64%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/highlighted-code-fence/__snapshots__/highlighted-code-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/highlighted-code-fence/highlighted-code-fence-app-extension.ts (92%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/highlighted-code-fence/highlighted-code-markdown-extension.spec.tsx (93%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/highlighted-code-fence/highlighted-code-markdown-extension.ts (85%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/highlighted-code-fence/highlighted-code-replacer.tsx (95%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/iframe-capsule/iframe-capsule-app-extension.ts (64%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/iframe-capsule/iframe-capsule-markdown-extension.ts (66%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/iframe-capsule/iframe-capsule-replacer.tsx (66%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/image-placeholder/add-line-to-placeholder-image-tags.ts (100%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/image-placeholder/hooks/use-on-image-upload.ts (75%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/image-placeholder/hooks/use-placeholder-size-style.ts (100%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/image-placeholder/image-placeholder-app-extension.ts (69%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/image-placeholder/image-placeholder-markdown-extension.ts (74%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/image-placeholder/image-placeholder-replacer.tsx (85%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/image-placeholder/image-placeholder.module.scss (100%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/image-placeholder/image-placeholder.tsx (94%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/image-placeholder/utils/build-placeholder-size-css.spec.ts (100%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/image-placeholder/utils/build-placeholder-size-css.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/legacy-short-codes/__snapshots__/legacy-shortcodes-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/legacy-short-codes/legacy-shortcodes-app-extension.ts (92%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/legacy-short-codes/legacy-shortcodes-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/legacy-short-codes/legacy-shortcodes-markdown-extension.ts (92%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/legacy-short-codes/replace-legacy-pdf-short-code.spec.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/legacy-short-codes/replace-legacy-pdf-short-code.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/legacy-short-codes/replace-legacy-slideshare-short-code.spec.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/legacy-short-codes/replace-legacy-slideshare-short-code.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/legacy-short-codes/replace-legacy-speakerdeck-short-code.spec.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/legacy-short-codes/replace-legacy-speakerdeck-short-code.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/spoiler/spoiler-app-extension.ts (89%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/spoiler/spoiler-markdown-extension.ts (94%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/table-of-contents/table-of-contents-app-extension.ts (65%) rename frontend/src/{components/markdown-renderer/extensions => extensions/essential-app-extensions}/table-of-contents/table-of-contents-markdown-extension.ts (81%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/task-list/create-checkbox-content.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/task-list/event-emitting-task-list-checkbox.tsx (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/task-list/find-check-box.ts (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/task-list/set-checkbox-in-cheatsheet.tsx (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/task-list/set-checkbox-in-editor.tsx (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/task-list/task-list-checkbox-app-extension.ts (87%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/task-list/task-list-checkbox.tsx (100%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/task-list/task-list-markdown-extension.ts (91%) rename frontend/src/extensions/{extra-integrations => essential-app-extensions}/task-list/task-list-replacer.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/abcjs/__snapshots__/abc-frame.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/abcjs/__snapshots__/abcjs-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/abcjs/abc-frame.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/abcjs/abc-frame.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/abcjs/abc.module.scss (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/abcjs/abcjs-app-extension.ts (87%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/abcjs/abcjs-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/abcjs/abcjs-markdown-extension.ts (84%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/asciinema/__snapshots__/asciinema-frame.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/asciinema/__snapshots__/asciinema-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/asciinema/asciinema-app-extension.ts (85%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/asciinema/asciinema-frame.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/asciinema/asciinema-frame.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/asciinema/asciinema-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/asciinema/asciinema-markdown-extension.ts (94%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/asciinema/replace-asciinema-link.spec.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/asciinema/replace-asciinema-link.ts (100%) create mode 100644 frontend/src/extensions/external-lib-app-extensions/external-lib-app-extensions.ts rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/flowchart/__snapshots__/flowchart-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/flowchart/__snapshots__/flowchart.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/flowchart/flowchart-app-extension.ts (88%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/flowchart/flowchart-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/flowchart/flowchart-markdown-extension.ts (84%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/flowchart/flowchart.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/flowchart/flowchart.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/gist/gist-app-extension.ts (84%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/gist/gist-frame.module.scss (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/gist/gist-frame.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/gist/gist-markdown-extension.ts (95%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/gist/replace-gist-link.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/gist/replace-legacy-gist-short-code.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/gist/use-resize-gist-frame.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/graphviz/__snapshots__/graphviz-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/graphviz/graphviz-app-extension.ts (88%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/graphviz/graphviz-frame.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/graphviz/graphviz-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/graphviz/graphviz-markdown-extension.ts (85%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/katex/__snapshots__/katex-frame.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/katex/__snapshots__/katex-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/katex/katex-app-extension.ts (84%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/katex/katex-frame.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/katex/katex-frame.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/katex/katex-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/katex/katex-markdown-extension.ts (94%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/katex/katex-replacer.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/mermaid/mermaid-app-extension.ts (88%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/mermaid/mermaid-chart.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/mermaid/mermaid-markdown-extension.ts (85%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/mermaid/mermaid.module.scss (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/plantuml/__snapshots__/plantuml-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/plantuml/plantuml-app-extension.ts (84%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/plantuml/plantuml-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/plantuml/plantuml-markdown-extension.ts (96%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/plantuml/plantuml-not-configured-alert.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/plantuml/plantuml-not-configured-component-replacer.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/sequence-diagram/legacy-sequence-diagram-app-extension.ts (87%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/sequence-diagram/legacy-sequence-diagram-markdown-extension.ts (85%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/sequence-diagram/sequence-diagram.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vega-lite/__snapshots__/vega-lite-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vega-lite/vega-lite-app-extension.ts (89%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vega-lite/vega-lite-chart.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vega-lite/vega-lite-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vega-lite/vega-lite-markdown-extension.ts (85%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vimeo/__snapshots__/vimeo-frame.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vimeo/replace-legacy-vimeo-short-code.spec.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vimeo/replace-legacy-vimeo-short-code.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vimeo/replace-vimeo-link.spec.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vimeo/replace-vimeo-link.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vimeo/vimeo-app-extension.ts (90%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vimeo/vimeo-frame.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vimeo/vimeo-frame.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/vimeo/vimeo-markdown-extension.ts (94%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/__snapshots__/youtube-frame.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/__snapshots__/youtube-markdown-extension.spec.tsx.snap (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/replace-legacy-youtube-short-code.spec.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/replace-legacy-youtube-short-code.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/replace-youtube-link.spec.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/replace-youtube-link.ts (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/youtube-app-extension.ts (90%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/youtube-frame.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/youtube-frame.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/youtube-markdown-extension.spec.tsx (100%) rename frontend/src/extensions/{extra-integrations => external-lib-app-extensions}/youtube/youtube-markdown-extension.ts (95%) delete mode 100644 frontend/src/extensions/extra-integrations/all-app-extensions.ts diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/__snapshots__/highlighted-code.spec.tsx.snap b/frontend/src/components/common/highlighted-code/__snapshots__/highlighted-code.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/__snapshots__/highlighted-code.spec.tsx.snap rename to frontend/src/components/common/highlighted-code/__snapshots__/highlighted-code.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code.module.scss b/frontend/src/components/common/highlighted-code/highlighted-code.module.scss similarity index 100% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code.module.scss rename to frontend/src/components/common/highlighted-code/highlighted-code.module.scss diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code.spec.tsx b/frontend/src/components/common/highlighted-code/highlighted-code.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code.spec.tsx rename to frontend/src/components/common/highlighted-code/highlighted-code.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code.tsx b/frontend/src/components/common/highlighted-code/highlighted-code.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code.tsx rename to frontend/src/components/common/highlighted-code/highlighted-code.tsx diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/hooks/use-async-highlight-js-import.tsx b/frontend/src/components/common/highlighted-code/hooks/use-async-highlight-js-import.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/hooks/use-async-highlight-js-import.tsx rename to frontend/src/components/common/highlighted-code/hooks/use-async-highlight-js-import.tsx diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/hooks/use-attach-line-numbers.tsx b/frontend/src/components/common/highlighted-code/hooks/use-attach-line-numbers.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/hooks/use-attach-line-numbers.tsx rename to frontend/src/components/common/highlighted-code/hooks/use-attach-line-numbers.tsx diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/hooks/use-code-dom.tsx b/frontend/src/components/common/highlighted-code/hooks/use-code-dom.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/hooks/use-code-dom.tsx rename to frontend/src/components/common/highlighted-code/hooks/use-code-dom.tsx diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/preconfigured-highlight-js.ts b/frontend/src/components/common/highlighted-code/preconfigured-highlight-js.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/preconfigured-highlight-js.ts rename to frontend/src/components/common/highlighted-code/preconfigured-highlight-js.ts diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-content.tsx b/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-content.tsx index 55d89f517..14d76ffbe 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-content.tsx +++ b/frontend/src/components/editor-page/app-bar/cheatsheet/cheatsheet-content.tsx @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { allAppExtensions } from '../../../../extensions/extra-integrations/all-app-extensions' +import { allAppExtensions } from '../../../../extensions/all-app-extensions' import type { CheatsheetEntry, CheatsheetExtension } from '../../cheatsheet/cheatsheet-extension' import { isCheatsheetGroup } from '../../cheatsheet/cheatsheet-extension' import { CategoryAccordion } from './category-accordion' @@ -25,10 +25,7 @@ export const CheatsheetContent: React.FC = () => { setSelectedEntry(isCheatsheetGroup(value) ? value.entries[0] : value) }, []) - const extensions = useMemo( - () => allAppExtensions.flatMap((extension) => extension.buildCheatsheetExtensions()), - [] - ) + const extensions = useMemo(() => allAppExtensions.flatMap((extension) => extension.buildCheatsheetExtensions()), []) return ( 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 7d2cd7b2c..2ed458880 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 @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import HighlightedCode from '../../../../extensions/extra-integrations/highlighted-code-fence/highlighted-code' +import HighlightedCode from '../../../common/highlighted-code/highlighted-code' import { HtmlToReact } from '../../../common/html-to-react/html-to-react' import { ExtensionEventEmitterProvider } from '../../../markdown-renderer/hooks/use-extension-event-emitter' import { RendererType } from '../../../render-page/window-post-message-communicator/rendering-message' diff --git a/frontend/src/components/editor-page/app-bar/cheatsheet/use-components-from-app-extensions.tsx b/frontend/src/components/editor-page/app-bar/cheatsheet/use-components-from-app-extensions.tsx index f2f23ec40..e154bf967 100644 --- a/frontend/src/components/editor-page/app-bar/cheatsheet/use-components-from-app-extensions.tsx +++ b/frontend/src/components/editor-page/app-bar/cheatsheet/use-components-from-app-extensions.tsx @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { allAppExtensions } from '../../../../extensions/extra-integrations/all-app-extensions' +import { allAppExtensions } from '../../../../extensions/all-app-extensions' import type { CheatsheetExtensionComponentProps } from '../../cheatsheet/cheatsheet-extension' import { isCheatsheetGroup } from '../../cheatsheet/cheatsheet-extension' import type { ReactElement } from 'react' diff --git a/frontend/src/components/editor-page/editor-pane/editor-pane.tsx b/frontend/src/components/editor-page/editor-pane/editor-pane.tsx index b5ff3fab3..2f77524eb 100644 --- a/frontend/src/components/editor-page/editor-pane/editor-pane.tsx +++ b/frontend/src/components/editor-page/editor-pane/editor-pane.tsx @@ -8,7 +8,7 @@ import { ORIGIN, useBaseUrl } from '../../../hooks/common/use-base-url' import { useDarkModeState } from '../../../hooks/common/use-dark-mode-state' import { useMayEdit } from '../../../hooks/common/use-may-edit' import { cypressAttribute, cypressId } from '../../../utils/cypress-attribute' -import { findLanguageByCodeBlockName } from '../../markdown-renderer/extensions/base/code-block-markdown-extension/find-language-by-code-block-name' +import { findLanguageByCodeBlockName } from '../../markdown-renderer/extensions/_base-classes/code-block-markdown-extension/find-language-by-code-block-name' import type { ScrollProps } from '../synced-scroll/scroll-props' import styles from './extended-codemirror/codemirror.module.scss' import { useCodeMirrorAutocompletionsExtension } from './hooks/codemirror-extensions/use-code-mirror-autocompletions-extension' diff --git a/frontend/src/components/editor-page/editor-pane/hooks/codemirror-extensions/use-code-mirror-autocompletions-extension.ts b/frontend/src/components/editor-page/editor-pane/hooks/codemirror-extensions/use-code-mirror-autocompletions-extension.ts index f0176d292..650a864d7 100644 --- a/frontend/src/components/editor-page/editor-pane/hooks/codemirror-extensions/use-code-mirror-autocompletions-extension.ts +++ b/frontend/src/components/editor-page/editor-pane/hooks/codemirror-extensions/use-code-mirror-autocompletions-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { allAppExtensions } from '../../../../../extensions/extra-integrations/all-app-extensions' +import { allAppExtensions } from '../../../../../extensions/all-app-extensions' import { autocompletion } from '@codemirror/autocomplete' import type { Extension } from '@codemirror/state' import { useMemo } from 'react' diff --git a/frontend/src/components/editor-page/editor-pane/hooks/use-components-from-app-extensions.tsx b/frontend/src/components/editor-page/editor-pane/hooks/use-components-from-app-extensions.tsx index 1918b9d21..01b149e3d 100644 --- a/frontend/src/components/editor-page/editor-pane/hooks/use-components-from-app-extensions.tsx +++ b/frontend/src/components/editor-page/editor-pane/hooks/use-components-from-app-extensions.tsx @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { allAppExtensions } from '../../../../extensions/extra-integrations/all-app-extensions' +import { allAppExtensions } from '../../../../extensions/all-app-extensions' import type { ReactElement } from 'react' import React, { Fragment, useMemo } from 'react' diff --git a/frontend/src/components/editor-page/editor-pane/linter/linter.ts b/frontend/src/components/editor-page/editor-pane/linter/linter.ts index e33f37c79..f80df8336 100644 --- a/frontend/src/components/editor-page/editor-pane/linter/linter.ts +++ b/frontend/src/components/editor-page/editor-pane/linter/linter.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { allAppExtensions } from '../../../../extensions/extra-integrations/all-app-extensions' +import { allAppExtensions } from '../../../../extensions/all-app-extensions' import { useDarkModeState } from '../../../../hooks/common/use-dark-mode-state' import { FrontmatterLinter } from './frontmatter-linter' import type { Diagnostic } from '@codemirror/lint' diff --git a/frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-plugin.ts b/frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-plugin.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-plugin.ts rename to frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-plugin.ts diff --git a/frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-renderer-extension.ts b/frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-renderer-extension.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-renderer-extension.ts rename to frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-renderer-extension.ts diff --git a/frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-parameters.spec.ts b/frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-parameters.spec.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-parameters.spec.ts rename to frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-parameters.spec.ts diff --git a/frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-parameters.ts b/frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-parameters.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-parameters.ts rename to frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-parameters.ts diff --git a/frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/find-language-by-code-block-name.spec.ts b/frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/find-language-by-code-block-name.spec.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/find-language-by-code-block-name.spec.ts rename to frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/find-language-by-code-block-name.spec.ts diff --git a/frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/find-language-by-code-block-name.ts b/frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/find-language-by-code-block-name.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/base/code-block-markdown-extension/find-language-by-code-block-name.ts rename to frontend/src/components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/find-language-by-code-block-name.ts diff --git a/frontend/src/components/markdown-renderer/extensions/base/event-markdown-renderer-extension.ts b/frontend/src/components/markdown-renderer/extensions/_base-classes/event-markdown-renderer-extension.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/base/event-markdown-renderer-extension.ts rename to frontend/src/components/markdown-renderer/extensions/_base-classes/event-markdown-renderer-extension.ts diff --git a/frontend/src/components/markdown-renderer/extensions/base/markdown-renderer-extension.ts b/frontend/src/components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/base/markdown-renderer-extension.ts rename to frontend/src/components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension.ts diff --git a/frontend/src/components/markdown-renderer/extensions/debugger-markdown-extension.ts b/frontend/src/components/markdown-renderer/extensions/debugger-markdown-extension.ts index e498fa3c1..50e6d5786 100644 --- a/frontend/src/components/markdown-renderer/extensions/debugger-markdown-extension.ts +++ b/frontend/src/components/markdown-renderer/extensions/debugger-markdown-extension.ts @@ -5,7 +5,7 @@ */ import { Logger } from '../../../utils/logger' import { isDevMode } from '../../../utils/test-modes' -import { MarkdownRendererExtension } from './base/markdown-renderer-extension' +import { MarkdownRendererExtension } from './_base-classes/markdown-renderer-extension' import type MarkdownIt from 'markdown-it' const log = new Logger('DebuggerMarkdownExtension') diff --git a/frontend/src/components/markdown-renderer/extensions/image/proxy-image-markdown-extension.ts b/frontend/src/components/markdown-renderer/extensions/image/proxy-image-markdown-extension.ts index 43eafbb01..220006943 100644 --- a/frontend/src/components/markdown-renderer/extensions/image/proxy-image-markdown-extension.ts +++ b/frontend/src/components/markdown-renderer/extensions/image/proxy-image-markdown-extension.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import type { ComponentReplacer } from '../../replace-components/component-replacer' -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../_base-classes/markdown-renderer-extension' import { ProxyImageReplacer } from './proxy-image-replacer' /** diff --git a/frontend/src/components/markdown-renderer/extensions/linemarker/linemarker-markdown-extension.ts b/frontend/src/components/markdown-renderer/extensions/linemarker/linemarker-markdown-extension.ts index 72b2a57ad..6c72af08d 100644 --- a/frontend/src/components/markdown-renderer/extensions/linemarker/linemarker-markdown-extension.ts +++ b/frontend/src/components/markdown-renderer/extensions/linemarker/linemarker-markdown-extension.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import type { ComponentReplacer } from '../../replace-components/component-replacer' -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../_base-classes/markdown-renderer-extension' import type { LineMarkers } from './add-line-marker-markdown-it-plugin' import { addLineMarkerMarkdownItPlugin } from './add-line-marker-markdown-it-plugin' import { LinemarkerReplacer } from './linemarker-replacer' diff --git a/frontend/src/components/markdown-renderer/extensions/link-replacer/link-adjustment-markdown-extension.ts b/frontend/src/components/markdown-renderer/extensions/link-replacer/link-adjustment-markdown-extension.ts index 8a78c5674..ec32d8dd5 100644 --- a/frontend/src/components/markdown-renderer/extensions/link-replacer/link-adjustment-markdown-extension.ts +++ b/frontend/src/components/markdown-renderer/extensions/link-replacer/link-adjustment-markdown-extension.ts @@ -5,7 +5,7 @@ */ import type { NodeProcessor } from '../../node-preprocessors/node-processor' import type { ComponentReplacer } from '../../replace-components/component-replacer' -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../_base-classes/markdown-renderer-extension' import { AnchorNodePreprocessor } from './anchor-node-preprocessor' import { JumpAnchorReplacer } from './jump-anchor-replacer' diff --git a/frontend/src/components/markdown-renderer/extensions/linkify-fix/linkify-fix-markdown-extension.ts b/frontend/src/components/markdown-renderer/extensions/linkify-fix/linkify-fix-markdown-extension.ts index f333983b6..8a27847ff 100644 --- a/frontend/src/components/markdown-renderer/extensions/linkify-fix/linkify-fix-markdown-extension.ts +++ b/frontend/src/components/markdown-renderer/extensions/linkify-fix/linkify-fix-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../_base-classes/markdown-renderer-extension' import type MarkdownIt from 'markdown-it' import linkify from 'markdown-it/lib/rules_core/linkify' import tlds from 'tlds' diff --git a/frontend/src/components/markdown-renderer/extensions/reveal/reveal-markdown-extension.ts b/frontend/src/components/markdown-renderer/extensions/reveal/reveal-markdown-extension.ts index 42c58dca1..61df9028d 100644 --- a/frontend/src/components/markdown-renderer/extensions/reveal/reveal-markdown-extension.ts +++ b/frontend/src/components/markdown-renderer/extensions/reveal/reveal-markdown-extension.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import type { NodeProcessor } from '../../node-preprocessors/node-processor' -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../_base-classes/markdown-renderer-extension' import { RevealCommentCommandNodePreprocessor } from './process-reveal-comment-nodes' import { addSlideSectionsMarkdownItPlugin } from './reveal-sections' import type MarkdownIt from 'markdown-it' diff --git a/frontend/src/components/markdown-renderer/extensions/upload-indicating-image-frame/upload-indicating-frame.tsx b/frontend/src/components/markdown-renderer/extensions/upload-indicating-image-frame/upload-indicating-frame.tsx index 6802d669f..e6dd93451 100644 --- a/frontend/src/components/markdown-renderer/extensions/upload-indicating-image-frame/upload-indicating-frame.tsx +++ b/frontend/src/components/markdown-renderer/extensions/upload-indicating-image-frame/upload-indicating-frame.tsx @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ +import { usePlaceholderSizeStyle } from '../../../../extensions/essential-app-extensions/image-placeholder/hooks/use-placeholder-size-style' import { UiIcon } from '../../../common/icons/ui-icon' -import { usePlaceholderSizeStyle } from '../image-placeholder/hooks/use-placeholder-size-style' import React from 'react' import { GearFill as IconGearFill } from 'react-bootstrap-icons' import { Trans, useTranslation } from 'react-i18next' diff --git a/frontend/src/components/markdown-renderer/extensions/upload-indicating-image-frame/upload-indicating-image-frame-markdown-extension.ts b/frontend/src/components/markdown-renderer/extensions/upload-indicating-image-frame/upload-indicating-image-frame-markdown-extension.ts index 68246de95..16a2611a7 100644 --- a/frontend/src/components/markdown-renderer/extensions/upload-indicating-image-frame/upload-indicating-image-frame-markdown-extension.ts +++ b/frontend/src/components/markdown-renderer/extensions/upload-indicating-image-frame/upload-indicating-image-frame-markdown-extension.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import type { ComponentReplacer } from '../../replace-components/component-replacer' -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../_base-classes/markdown-renderer-extension' import { UploadIndicatingImageFrameReplacer } from './upload-indicating-image-frame-replacer' /** diff --git a/frontend/src/components/markdown-renderer/hooks/use-markdown-extensions.ts b/frontend/src/components/markdown-renderer/hooks/use-markdown-extensions.ts index e9f924882..84b602320 100644 --- a/frontend/src/components/markdown-renderer/hooks/use-markdown-extensions.ts +++ b/frontend/src/components/markdown-renderer/hooks/use-markdown-extensions.ts @@ -3,10 +3,10 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { allAppExtensions } from '../../../extensions/extra-integrations/all-app-extensions' +import { allAppExtensions } from '../../../extensions/all-app-extensions' import { useFrontendConfig } from '../../common/frontend-config-context/use-frontend-config' import type { RendererType } from '../../render-page/window-post-message-communicator/rendering-message' -import type { MarkdownRendererExtension } from '../extensions/base/markdown-renderer-extension' +import type { MarkdownRendererExtension } from '../extensions/_base-classes/markdown-renderer-extension' import { DebuggerMarkdownExtension } from '../extensions/debugger-markdown-extension' import { ProxyImageMarkdownExtension } from '../extensions/image/proxy-image-markdown-extension' import { LinkAdjustmentMarkdownExtension } from '../extensions/link-replacer/link-adjustment-markdown-extension' diff --git a/frontend/src/components/markdown-renderer/markdown-to-react/hooks/use-combined-node-preprocessor.ts b/frontend/src/components/markdown-renderer/markdown-to-react/hooks/use-combined-node-preprocessor.ts index dd7594c7c..44a1b06a8 100644 --- a/frontend/src/components/markdown-renderer/markdown-to-react/hooks/use-combined-node-preprocessor.ts +++ b/frontend/src/components/markdown-renderer/markdown-to-react/hooks/use-combined-node-preprocessor.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { MarkdownRendererExtension } from '../../extensions/base/markdown-renderer-extension' +import type { MarkdownRendererExtension } from '../../extensions/_base-classes/markdown-renderer-extension' import type { Document } from 'domhandler' import { useMemo } from 'react' diff --git a/frontend/src/components/markdown-renderer/markdown-to-react/hooks/use-configured-markdown-it.ts b/frontend/src/components/markdown-renderer/markdown-to-react/hooks/use-configured-markdown-it.ts index 7057839bb..b1f8e3332 100644 --- a/frontend/src/components/markdown-renderer/markdown-to-react/hooks/use-configured-markdown-it.ts +++ b/frontend/src/components/markdown-renderer/markdown-to-react/hooks/use-configured-markdown-it.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { MarkdownRendererExtension } from '../../extensions/base/markdown-renderer-extension' +import type { MarkdownRendererExtension } from '../../extensions/_base-classes/markdown-renderer-extension' import MarkdownIt from 'markdown-it/lib' import { useMemo } from 'react' diff --git a/frontend/src/components/markdown-renderer/markdown-to-react/markdown-to-react.tsx b/frontend/src/components/markdown-renderer/markdown-to-react/markdown-to-react.tsx index cdb8840f8..0c251dfa1 100644 --- a/frontend/src/components/markdown-renderer/markdown-to-react/markdown-to-react.tsx +++ b/frontend/src/components/markdown-renderer/markdown-to-react/markdown-to-react.tsx @@ -4,7 +4,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import { HtmlToReact } from '../../common/html-to-react/html-to-react' -import type { MarkdownRendererExtension } from '../extensions/base/markdown-renderer-extension' +import type { MarkdownRendererExtension } from '../extensions/_base-classes/markdown-renderer-extension' import { useCombinedNodePreprocessor } from './hooks/use-combined-node-preprocessor' import { useConfiguredMarkdownIt } from './hooks/use-configured-markdown-it' import { LineContentToLineIdMapper } from './utils/line-content-to-line-id-mapper' diff --git a/frontend/src/components/markdown-renderer/markdown-to-react/test-utils/test-markdown-renderer-extension.ts b/frontend/src/components/markdown-renderer/markdown-to-react/test-utils/test-markdown-renderer-extension.ts index 4e5350dac..147498a94 100644 --- a/frontend/src/components/markdown-renderer/markdown-to-react/test-utils/test-markdown-renderer-extension.ts +++ b/frontend/src/components/markdown-renderer/markdown-to-react/test-utils/test-markdown-renderer-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../extensions/_base-classes/markdown-renderer-extension' import type { NodeProcessor } from '../../node-preprocessors/node-processor' import type { ComponentReplacer } from '../../replace-components/component-replacer' import { TestNodeProcessor } from './test-node-processor' diff --git a/frontend/src/components/markdown-renderer/test-utils/test-markdown-renderer.tsx b/frontend/src/components/markdown-renderer/test-utils/test-markdown-renderer.tsx index 13a6f8e7a..48cc1ed0e 100644 --- a/frontend/src/components/markdown-renderer/test-utils/test-markdown-renderer.tsx +++ b/frontend/src/components/markdown-renderer/test-utils/test-markdown-renderer.tsx @@ -4,7 +4,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import { StoreProvider } from '../../../redux/store-provider' -import type { MarkdownRendererExtension } from '../extensions/base/markdown-renderer-extension' +import type { MarkdownRendererExtension } from '../extensions/_base-classes/markdown-renderer-extension' import { MarkdownToReact } from '../markdown-to-react/markdown-to-react' import React, { useMemo } from 'react' diff --git a/frontend/src/components/render-page/renderers/document/document-markdown-renderer.tsx b/frontend/src/components/render-page/renderers/document/document-markdown-renderer.tsx index a17f45643..f2104d305 100644 --- a/frontend/src/components/render-page/renderers/document/document-markdown-renderer.tsx +++ b/frontend/src/components/render-page/renderers/document/document-markdown-renderer.tsx @@ -5,7 +5,6 @@ */ import { cypressId } from '../../../../utils/cypress-attribute' import type { ScrollProps } from '../../../editor-page/synced-scroll/scroll-props' -import { HeadlineAnchorsMarkdownExtension } from '../../../markdown-renderer/extensions/headline-anchors-markdown-extension' import type { LineMarkers } from '../../../markdown-renderer/extensions/linemarker/add-line-marker-markdown-it-plugin' import { LinemarkerMarkdownExtension } from '../../../markdown-renderer/extensions/linemarker/linemarker-markdown-extension' import { useCalculateLineMarkerPosition } from '../../../markdown-renderer/hooks/use-calculate-line-marker-positions' @@ -69,13 +68,7 @@ export const DocumentMarkdownRenderer: React.FC = const extensions = useMarkdownExtensions( baseUrl, RendererType.DOCUMENT, - useMemo( - () => [ - new HeadlineAnchorsMarkdownExtension(), - new LinemarkerMarkdownExtension((values) => (currentLineMarkers.current = values)) - ], - [] - ) + useMemo(() => [new LinemarkerMarkdownExtension((values) => (currentLineMarkers.current = values))], []) ) useCalculateLineMarkerPosition(markdownBodyRef, currentLineMarkers.current, recalculateLineMarkers) diff --git a/frontend/src/components/render-page/renderers/document/document-toc-sidebar.tsx b/frontend/src/components/render-page/renderers/document/document-toc-sidebar.tsx index 61f867d3d..1ecf3af7b 100644 --- a/frontend/src/components/render-page/renderers/document/document-toc-sidebar.tsx +++ b/frontend/src/components/render-page/renderers/document/document-toc-sidebar.tsx @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { TableOfContentsMarkdownExtension } from '../../../markdown-renderer/extensions/table-of-contents/table-of-contents-markdown-extension' +import { TableOfContentsMarkdownExtension } from '../../../../extensions/essential-app-extensions/table-of-contents/table-of-contents-markdown-extension' import { useExtensionEventEmitterHandler } from '../../../markdown-renderer/hooks/use-extension-event-emitter' import styles from './markdown-document.module.scss' import { WidthBasedTableOfContents } from './width-based-table-of-contents' diff --git a/frontend/src/extensions/base/app-extension.ts b/frontend/src/extensions/_base-classes/app-extension.ts similarity index 95% rename from frontend/src/extensions/base/app-extension.ts rename to frontend/src/extensions/_base-classes/app-extension.ts index 558f79ad3..063cf0a68 100644 --- a/frontend/src/extensions/base/app-extension.ts +++ b/frontend/src/extensions/_base-classes/app-extension.ts @@ -6,7 +6,7 @@ import type { FrontendConfig } from '../../api/config/types' import type { CheatsheetExtension } from '../../components/editor-page/cheatsheet/cheatsheet-extension' import type { Linter } from '../../components/editor-page/editor-pane/linter/linter' -import type { MarkdownRendererExtension } from '../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +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' import type { CompletionSource } from '@codemirror/autocomplete' import type { EventEmitter2 } from 'eventemitter2' diff --git a/frontend/src/extensions/all-app-extensions.ts b/frontend/src/extensions/all-app-extensions.ts new file mode 100644 index 000000000..f72669a68 --- /dev/null +++ b/frontend/src/extensions/all-app-extensions.ts @@ -0,0 +1,10 @@ +/* + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ +import type { AppExtension } from './_base-classes/app-extension' +import { essentialAppExtensions } from './essential-app-extensions/essential-app-extensions' +import { externalLibAppExtensions } from './external-lib-app-extensions/external-lib-app-extensions' + +export const allAppExtensions: AppExtension[] = [...essentialAppExtensions, ...externalLibAppExtensions] diff --git a/frontend/src/extensions/extra-integrations/alert/alert-app-extension.ts b/frontend/src/extensions/essential-app-extensions/alert/alert-app-extension.ts similarity index 91% rename from frontend/src/extensions/extra-integrations/alert/alert-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/alert/alert-app-extension.ts index ff416de87..4775a4cee 100644 --- a/frontend/src/extensions/extra-integrations/alert/alert-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/alert/alert-app-extension.ts @@ -5,8 +5,8 @@ */ import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' import { basicCompletion } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { AlertMarkdownExtension } from './alert-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' import { t } from 'i18next' diff --git a/frontend/src/extensions/extra-integrations/alert/alert-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/alert/alert-markdown-extension.ts similarity index 93% rename from frontend/src/extensions/extra-integrations/alert/alert-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/alert/alert-markdown-extension.ts index 0dca09cc1..1f585e768 100644 --- a/frontend/src/extensions/extra-integrations/alert/alert-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/alert/alert-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type MarkdownIt from 'markdown-it' import markdownItContainer from 'markdown-it-container' import type Renderer from 'markdown-it/lib/renderer' diff --git a/frontend/src/components/markdown-renderer/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 similarity index 80% rename from frontend/src/components/markdown-renderer/extensions/basic-markdown-syntax/basic-markdown-syntax-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/basic-markdown-syntax/basic-markdown-syntax-app-extension.ts index c1ea81dd0..a0dfc611c 100644 --- a/frontend/src/components/markdown-renderer/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,10 +3,10 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { AppExtension } from '../../../../extensions/base/app-extension' -import type { CheatsheetExtension } from '../../../editor-page/cheatsheet/cheatsheet-extension' -import { basicCompletion } from '../../../editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import type { CheatsheetExtension } from '../../../components/editor-page/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' import { BasicMarkdownSyntaxMarkdownExtension } from './basic-markdown-syntax-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' import { t } from 'i18next' diff --git a/frontend/src/components/markdown-renderer/extensions/basic-markdown-syntax/basic-markdown-syntax-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/basic-markdown-syntax/basic-markdown-syntax-markdown-extension.ts similarity index 87% rename from frontend/src/components/markdown-renderer/extensions/basic-markdown-syntax/basic-markdown-syntax-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/basic-markdown-syntax/basic-markdown-syntax-markdown-extension.ts index 456e5899b..1fc3c6c0d 100644 --- a/frontend/src/components/markdown-renderer/extensions/basic-markdown-syntax/basic-markdown-syntax-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/basic-markdown-syntax/basic-markdown-syntax-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { imageSize } from '@hedgedoc/markdown-it-plugins' import type MarkdownIt from 'markdown-it' import abbreviation from 'markdown-it-abbr' diff --git a/frontend/src/extensions/extra-integrations/blockquote/__snapshots__/blockquote-extra-tag-markdown-extension.spec.tsx.snap b/frontend/src/extensions/essential-app-extensions/blockquote/__snapshots__/blockquote-extra-tag-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/blockquote/__snapshots__/blockquote-extra-tag-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/essential-app-extensions/blockquote/__snapshots__/blockquote-extra-tag-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/blockquote/blockquote-app-extension.ts b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-app-extension.ts similarity index 91% rename from frontend/src/extensions/extra-integrations/blockquote/blockquote-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/blockquote/blockquote-app-extension.ts index bdec2bcd7..61491ba40 100644 --- a/frontend/src/extensions/extra-integrations/blockquote/blockquote-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-app-extension.ts @@ -5,8 +5,8 @@ */ import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' import { basicCompletion } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { BlockquoteExtraTagMarkdownExtension } from './blockquote-extra-tag-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' import { t } from 'i18next' diff --git a/frontend/src/extensions/extra-integrations/blockquote/blockquote-border-color-node-preprocessor.ts b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-border-color-node-preprocessor.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/blockquote/blockquote-border-color-node-preprocessor.ts rename to frontend/src/extensions/essential-app-extensions/blockquote/blockquote-border-color-node-preprocessor.ts diff --git a/frontend/src/extensions/extra-integrations/blockquote/blockquote-color-extra-tag-replacer.tsx b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-color-extra-tag-replacer.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/blockquote/blockquote-color-extra-tag-replacer.tsx rename to frontend/src/extensions/essential-app-extensions/blockquote/blockquote-color-extra-tag-replacer.tsx diff --git a/frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-markdown-extension.spec.tsx b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-markdown-extension.spec.tsx rename to frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-markdown-extension.ts similarity index 96% rename from frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-markdown-extension.ts index ea41e5483..b84c5acdd 100644 --- a/frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type { NodeProcessor } from '../../../components/markdown-renderer/node-preprocessors/node-processor' import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { BlockquoteBorderColorNodePreprocessor } from './blockquote-border-color-node-preprocessor' diff --git a/frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-markdown-it-plugin.spec.ts b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-markdown-it-plugin.spec.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-markdown-it-plugin.spec.ts rename to frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-markdown-it-plugin.spec.ts diff --git a/frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-markdown-it-plugin.ts b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-markdown-it-plugin.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-markdown-it-plugin.ts rename to frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-markdown-it-plugin.ts diff --git a/frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-replacer.tsx b/frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-replacer.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/blockquote/blockquote-extra-tag-replacer.tsx rename to frontend/src/extensions/essential-app-extensions/blockquote/blockquote-extra-tag-replacer.tsx diff --git a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/__snapshots__/bootstrap-icon-markdown-extension.spec.tsx.snap b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/__snapshots__/bootstrap-icon-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/bootstrap-icons/__snapshots__/bootstrap-icon-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/essential-app-extensions/bootstrap-icons/__snapshots__/bootstrap-icon-markdown-extension.spec.tsx.snap diff --git a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-app-extension.ts b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-app-extension.ts similarity index 66% rename from frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-app-extension.ts index cc0ba6c7f..d0d7f13d1 100644 --- a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-app-extension.ts @@ -3,11 +3,11 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { AppExtension } from '../../../../extensions/base/app-extension' -import { BootstrapLazyIcons } from '../../../common/icons/bootstrap-icons' -import type { CheatsheetExtension } from '../../../editor-page/cheatsheet/cheatsheet-extension' -import { regexCompletion } from '../../../editor-page/editor-pane/autocompletions/regex-completion' -import type { MarkdownRendererExtension } from '../base/markdown-renderer-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' import { BootstrapIconMarkdownExtension } from './bootstrap-icon-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' import { t } from 'i18next' diff --git a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-component-replacer.ts b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-component-replacer.ts similarity index 69% rename from frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-component-replacer.ts rename to frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-component-replacer.ts index 4f10ab5f4..5b7cba7a3 100644 --- a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-component-replacer.ts +++ b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-component-replacer.ts @@ -3,10 +3,13 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { isBootstrapIconName } from '../../../common/icons/bootstrap-icons' -import { LazyBootstrapIcon } from '../../../common/icons/lazy-bootstrap-icon' -import type { NodeReplacement } from '../../replace-components/component-replacer' -import { ComponentReplacer, DO_NOT_REPLACE } from '../../replace-components/component-replacer' +import { isBootstrapIconName } from '../../../components/common/icons/bootstrap-icons' +import { LazyBootstrapIcon } from '../../../components/common/icons/lazy-bootstrap-icon' +import type { NodeReplacement } from '../../../components/markdown-renderer/replace-components/component-replacer' +import { + ComponentReplacer, + DO_NOT_REPLACE +} from '../../../components/markdown-renderer/replace-components/component-replacer' import { BootstrapIconMarkdownExtension } from './bootstrap-icon-markdown-extension' import type { Element } from 'domhandler' import React from 'react' diff --git a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-markdown-extension.spec.tsx b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-markdown-extension.spec.tsx similarity index 90% rename from frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-markdown-extension.spec.tsx rename to frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-markdown-extension.spec.tsx index 56aa6b90f..5915cffca 100644 --- a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-markdown-extension.spec.tsx +++ b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-markdown-extension.spec.tsx @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { TestMarkdownRenderer } from '../../test-utils/test-markdown-renderer' +import { TestMarkdownRenderer } from '../../../components/markdown-renderer/test-utils/test-markdown-renderer' import { BootstrapIconMarkdownExtension } from './bootstrap-icon-markdown-extension' import { render, screen } from '@testing-library/react' import React from 'react' diff --git a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-markdown-extension.ts similarity index 77% rename from frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-markdown-extension.ts index 9f765ae31..7f959f5aa 100644 --- a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/bootstrap-icon-markdown-extension.ts @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { ComponentReplacer } from '../../replace-components/component-replacer' -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { BootstrapIconComponentReplacer } from './bootstrap-icon-component-replacer' import { replaceBootstrapIconsMarkdownItPlugin } from './replace-bootstrap-icons' import type MarkdownIt from 'markdown-it' diff --git a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/replace-bootstrap-icons.spec.ts b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/replace-bootstrap-icons.spec.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/bootstrap-icons/replace-bootstrap-icons.spec.ts rename to frontend/src/extensions/essential-app-extensions/bootstrap-icons/replace-bootstrap-icons.spec.ts diff --git a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/replace-bootstrap-icons.ts b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/replace-bootstrap-icons.ts similarity index 84% rename from frontend/src/components/markdown-renderer/extensions/bootstrap-icons/replace-bootstrap-icons.ts rename to frontend/src/extensions/essential-app-extensions/bootstrap-icons/replace-bootstrap-icons.ts index 7fdd3e0bb..3e3e755f8 100644 --- a/frontend/src/components/markdown-renderer/extensions/bootstrap-icons/replace-bootstrap-icons.ts +++ b/frontend/src/extensions/essential-app-extensions/bootstrap-icons/replace-bootstrap-icons.ts @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { RegexOptions } from '../../../../external-types/markdown-it-regex/interface' -import { isBootstrapIconName } from '../../../common/icons/bootstrap-icons' +import { isBootstrapIconName } from '../../../components/common/icons/bootstrap-icons' +import type { RegexOptions } from '../../../external-types/markdown-it-regex/interface' import { BootstrapIconMarkdownExtension } from './bootstrap-icon-markdown-extension' import type MarkdownIt from 'markdown-it' import markdownItRegex from 'markdown-it-regex' diff --git a/frontend/src/extensions/extra-integrations/csv/__snapshots__/csv-table-markdown-extension.spec.tsx.snap b/frontend/src/extensions/essential-app-extensions/csv/__snapshots__/csv-table-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/csv/__snapshots__/csv-table-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/essential-app-extensions/csv/__snapshots__/csv-table-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/csv/__snapshots__/csv-table.spec.tsx.snap b/frontend/src/extensions/essential-app-extensions/csv/__snapshots__/csv-table.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/csv/__snapshots__/csv-table.spec.tsx.snap rename to frontend/src/extensions/essential-app-extensions/csv/__snapshots__/csv-table.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/csv/csv-parser.spec.ts b/frontend/src/extensions/essential-app-extensions/csv/csv-parser.spec.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/csv/csv-parser.spec.ts rename to frontend/src/extensions/essential-app-extensions/csv/csv-parser.spec.ts diff --git a/frontend/src/extensions/extra-integrations/csv/csv-parser.ts b/frontend/src/extensions/essential-app-extensions/csv/csv-parser.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/csv/csv-parser.ts rename to frontend/src/extensions/essential-app-extensions/csv/csv-parser.ts diff --git a/frontend/src/extensions/extra-integrations/csv/csv-replacer.tsx b/frontend/src/extensions/essential-app-extensions/csv/csv-replacer.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/csv/csv-replacer.tsx rename to frontend/src/extensions/essential-app-extensions/csv/csv-replacer.tsx diff --git a/frontend/src/extensions/extra-integrations/csv/csv-table-app-extension.ts b/frontend/src/extensions/essential-app-extensions/csv/csv-table-app-extension.ts similarity index 88% rename from frontend/src/extensions/extra-integrations/csv/csv-table-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/csv/csv-table-app-extension.ts index 75df77cd9..518cae564 100644 --- a/frontend/src/extensions/extra-integrations/csv/csv-table-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/csv/csv-table-app-extension.ts @@ -8,8 +8,8 @@ import { basicCompletion, codeFenceRegex } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { CsvTableMarkdownExtension } from './csv-table-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' diff --git a/frontend/src/extensions/extra-integrations/csv/csv-table-markdown-extension.spec.tsx b/frontend/src/extensions/essential-app-extensions/csv/csv-table-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/csv/csv-table-markdown-extension.spec.tsx rename to frontend/src/extensions/essential-app-extensions/csv/csv-table-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/csv/csv-table-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/csv/csv-table-markdown-extension.ts similarity index 89% rename from frontend/src/extensions/extra-integrations/csv/csv-table-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/csv/csv-table-markdown-extension.ts index 8207c9108..ce661c585 100644 --- a/frontend/src/extensions/extra-integrations/csv/csv-table-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/csv/csv-table-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { CsvReplacer } from './csv-replacer' diff --git a/frontend/src/extensions/extra-integrations/csv/csv-table.spec.tsx b/frontend/src/extensions/essential-app-extensions/csv/csv-table.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/csv/csv-table.spec.tsx rename to frontend/src/extensions/essential-app-extensions/csv/csv-table.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/csv/csv-table.tsx b/frontend/src/extensions/essential-app-extensions/csv/csv-table.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/csv/csv-table.tsx rename to frontend/src/extensions/essential-app-extensions/csv/csv-table.tsx diff --git a/frontend/src/components/markdown-renderer/extensions/emoji/__snapshots__/emoji-markdown-extension.spec.tsx.snap b/frontend/src/extensions/essential-app-extensions/emoji/__snapshots__/emoji-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/emoji/__snapshots__/emoji-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/essential-app-extensions/emoji/__snapshots__/emoji-markdown-extension.spec.tsx.snap diff --git a/frontend/src/components/markdown-renderer/extensions/emoji/emoji-app-extension.ts b/frontend/src/extensions/essential-app-extensions/emoji/emoji-app-extension.ts similarity index 62% rename from frontend/src/components/markdown-renderer/extensions/emoji/emoji-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/emoji/emoji-app-extension.ts index ff2d801be..4bd2c51c8 100644 --- a/frontend/src/components/markdown-renderer/extensions/emoji/emoji-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/emoji/emoji-app-extension.ts @@ -3,18 +3,18 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { AppExtension } from '../../../../extensions/base/app-extension' -import type { CheatsheetExtension } from '../../../editor-page/cheatsheet/cheatsheet-extension' -import { regexCompletion } from '../../../editor-page/editor-pane/autocompletions/regex-completion' -import type { MarkdownRendererExtension } from '../base/markdown-renderer-extension' -import { EmojiMarkdownExtension } from './emoji-markdown-extension' +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' +import { EmojiMarkdownRendererExtension } from './emoji-markdown-renderer-extension' import { emojiShortcodes } from './mapping' import type { CompletionSource } from '@codemirror/autocomplete' import { t } from 'i18next' export class EmojiAppExtension extends AppExtension { buildMarkdownRendererExtensions(): MarkdownRendererExtension[] { - return [new EmojiMarkdownExtension()] + return [new EmojiMarkdownRendererExtension()] } buildCheatsheetExtensions(): CheatsheetExtension[] { diff --git a/frontend/src/components/markdown-renderer/extensions/emoji/emoji-markdown-extension.spec.tsx b/frontend/src/extensions/essential-app-extensions/emoji/emoji-markdown-extension.spec.tsx similarity index 51% rename from frontend/src/components/markdown-renderer/extensions/emoji/emoji-markdown-extension.spec.tsx rename to frontend/src/extensions/essential-app-extensions/emoji/emoji-markdown-extension.spec.tsx index fe420f990..10b9bd69f 100644 --- a/frontend/src/components/markdown-renderer/extensions/emoji/emoji-markdown-extension.spec.tsx +++ b/frontend/src/extensions/essential-app-extensions/emoji/emoji-markdown-extension.spec.tsx @@ -3,9 +3,9 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { mockI18n } from '../../../../test-utils/mock-i18n' -import { TestMarkdownRenderer } from '../../test-utils/test-markdown-renderer' -import { EmojiMarkdownExtension } from './emoji-markdown-extension' +import { TestMarkdownRenderer } from '../../../components/markdown-renderer/test-utils/test-markdown-renderer' +import { mockI18n } from '../../../test-utils/mock-i18n' +import { EmojiMarkdownRendererExtension } from './emoji-markdown-renderer-extension' import { render } from '@testing-library/react' import React from 'react' @@ -20,12 +20,16 @@ describe('Emoji Markdown Extension', () => { }) it('renders an emoji code', () => { - const view = render() + const view = render( + + ) expect(view.container).toMatchSnapshot() }) it('renders a skin tone code', () => { - const view = render() + const view = render( + + ) expect(view.container).toMatchSnapshot() }) }) diff --git a/frontend/src/components/markdown-renderer/extensions/emoji/emoji-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/emoji/emoji-markdown-renderer-extension.ts similarity index 66% rename from frontend/src/components/markdown-renderer/extensions/emoji/emoji-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/emoji/emoji-markdown-renderer-extension.ts index 6bdcc52a8..602d8f85b 100644 --- a/frontend/src/components/markdown-renderer/extensions/emoji/emoji-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/emoji/emoji-markdown-renderer-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { combinedEmojiData } from './mapping' import type MarkdownIt from 'markdown-it' import emoji from 'markdown-it-emoji/bare' @@ -11,7 +11,7 @@ import emoji from 'markdown-it-emoji/bare' /** * Adds support for utf-8 emojis. */ -export class EmojiMarkdownExtension extends MarkdownRendererExtension { +export class EmojiMarkdownRendererExtension extends MarkdownRendererExtension { public configureMarkdownIt(markdownIt: MarkdownIt): void { markdownIt.use(emoji, { defs: combinedEmojiData diff --git a/frontend/src/components/markdown-renderer/extensions/emoji/mapping.ts b/frontend/src/extensions/essential-app-extensions/emoji/mapping.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/emoji/mapping.ts rename to frontend/src/extensions/essential-app-extensions/emoji/mapping.ts diff --git a/frontend/src/extensions/essential-app-extensions/essential-app-extensions.ts b/frontend/src/extensions/essential-app-extensions/essential-app-extensions.ts new file mode 100644 index 000000000..f20663872 --- /dev/null +++ b/frontend/src/extensions/essential-app-extensions/essential-app-extensions.ts @@ -0,0 +1,43 @@ +/* + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ +import { AlertAppExtension } from './alert/alert-app-extension' +import { BasicMarkdownSyntaxAppExtension } from './basic-markdown-syntax/basic-markdown-syntax-app-extension' +import { BlockquoteAppExtension } from './blockquote/blockquote-app-extension' +import { BootstrapIconAppExtension } from './bootstrap-icons/bootstrap-icon-app-extension' +import { CsvTableAppExtension } from './csv/csv-table-app-extension' +import { EmojiAppExtension } from './emoji/emoji-app-extension' +import { ExtractFirstHeadlineAppExtension } from './extract-first-headline/extract-first-headline-app-extension' +import { ForkAwesomeHtmlTagAppExtension } from './fork-awesome-html-tag/fork-awesome-html-tag-app-extension' +import { HeadlineAnchorsAppExtension } from './headline-anchors/headline-anchors-app-extension' +import { HighlightedCodeFenceAppExtension } from './highlighted-code-fence/highlighted-code-fence-app-extension' +import { IframeCapsuleAppExtension } from './iframe-capsule/iframe-capsule-app-extension' +import { ImagePlaceholderAppExtension } from './image-placeholder/image-placeholder-app-extension' +import { LegacyShortcodesAppExtension } from './legacy-short-codes/legacy-shortcodes-app-extension' +import { SpoilerAppExtension } from './spoiler/spoiler-app-extension' +import { TableOfContentsAppExtension } from './table-of-contents/table-of-contents-app-extension' +import { TaskListCheckboxAppExtension } from './task-list/task-list-checkbox-app-extension' + +/** + * Contains all app extensions that are adding essential features or additional features developed by the HedgeDoc maintainers. + */ +export const essentialAppExtensions = [ + new AlertAppExtension(), + new BasicMarkdownSyntaxAppExtension(), + new BlockquoteAppExtension(), + new BootstrapIconAppExtension(), + new CsvTableAppExtension(), + new EmojiAppExtension(), + new ExtractFirstHeadlineAppExtension(), + new ForkAwesomeHtmlTagAppExtension(), + new HighlightedCodeFenceAppExtension(), + new IframeCapsuleAppExtension(), + new ImagePlaceholderAppExtension(), + new LegacyShortcodesAppExtension(), + new SpoilerAppExtension(), + new TableOfContentsAppExtension(), + new TaskListCheckboxAppExtension(), + new HeadlineAnchorsAppExtension() +] diff --git a/frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-app-extension.ts b/frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-app-extension.ts similarity index 66% rename from frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-app-extension.ts index 1ac658cdf..bf501ba89 100644 --- a/frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-app-extension.ts @@ -3,10 +3,10 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { MarkdownRendererExtensionOptions } from '../../../../extensions/base/app-extension' -import { AppExtension } from '../../../../extensions/base/app-extension' -import { RendererType } from '../../../render-page/window-post-message-communicator/rendering-message' -import type { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { RendererType } from '../../../components/render-page/window-post-message-communicator/rendering-message' +import type { MarkdownRendererExtensionOptions } from '../../_base-classes/app-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { ExtractFirstHeadlineEditorExtension } from './extract-first-headline-editor-extension' import { ExtractFirstHeadlineMarkdownExtension } from './extract-first-headline-markdown-extension' diff --git a/frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-editor-extension.tsx b/frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-editor-extension.tsx similarity index 74% rename from frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-editor-extension.tsx rename to frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-editor-extension.tsx index 8188cfbc0..7682b23a8 100644 --- a/frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-editor-extension.tsx +++ b/frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-editor-extension.tsx @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { updateNoteTitleByFirstHeading } from '../../../../redux/note-details/methods' -import { useExtensionEventEmitterHandler } from '../../hooks/use-extension-event-emitter' +import { useExtensionEventEmitterHandler } from '../../../components/markdown-renderer/hooks/use-extension-event-emitter' +import { updateNoteTitleByFirstHeading } from '../../../redux/note-details/methods' import { ExtractFirstHeadlineNodeProcessor } from './extract-first-headline-node-processor' import type React from 'react' diff --git a/frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-markdown-extension.tsx b/frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-markdown-extension.tsx similarity index 65% rename from frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-markdown-extension.tsx rename to frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-markdown-extension.tsx index 400707f30..f7feb3aa9 100644 --- a/frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-markdown-extension.tsx +++ b/frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-markdown-extension.tsx @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { NodeProcessor } from '../../node-preprocessors/node-processor' -import { EventMarkdownRendererExtension } from '../base/event-markdown-renderer-extension' +import { EventMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/event-markdown-renderer-extension' +import type { NodeProcessor } from '../../../components/markdown-renderer/node-preprocessors/node-processor' import { ExtractFirstHeadlineNodeProcessor } from './extract-first-headline-node-processor' /** diff --git a/frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-node-processor.ts b/frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-node-processor.ts similarity index 89% rename from frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-node-processor.ts rename to frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-node-processor.ts index 382fc74b8..f7fb5bd94 100644 --- a/frontend/src/components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-node-processor.ts +++ b/frontend/src/extensions/essential-app-extensions/extract-first-headline/extract-first-headline-node-processor.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { NodeProcessor } from '../../node-preprocessors/node-processor' +import { NodeProcessor } from '../../../components/markdown-renderer/node-preprocessors/node-processor' import { extractFirstHeading } from '@hedgedoc/commons' import { Optional } from '@mrdrogdrog/optional' import type { Document } from 'domhandler' diff --git a/frontend/src/extensions/extra-integrations/fork-awesome-html-tag/fork-awesome-html-tag-app-extension.ts b/frontend/src/extensions/essential-app-extensions/fork-awesome-html-tag/fork-awesome-html-tag-app-extension.ts similarity index 92% rename from frontend/src/extensions/extra-integrations/fork-awesome-html-tag/fork-awesome-html-tag-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/fork-awesome-html-tag/fork-awesome-html-tag-app-extension.ts index 4eef52412..dc9ee50dd 100644 --- a/frontend/src/extensions/extra-integrations/fork-awesome-html-tag/fork-awesome-html-tag-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/fork-awesome-html-tag/fork-awesome-html-tag-app-extension.ts @@ -5,7 +5,7 @@ */ 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 { AppExtension } from '../../base/app-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { t } from 'i18next' const forkAwesomeRegex = /]*\/?>(?:<\/i>)?/ diff --git a/frontend/src/extensions/essential-app-extensions/headline-anchors/headline-anchors-app-extension.ts b/frontend/src/extensions/essential-app-extensions/headline-anchors/headline-anchors-app-extension.ts new file mode 100644 index 000000000..17f588038 --- /dev/null +++ b/frontend/src/extensions/essential-app-extensions/headline-anchors/headline-anchors-app-extension.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { RendererType } from '../../../components/render-page/window-post-message-communicator/rendering-message' +import type { MarkdownRendererExtensionOptions } from '../../_base-classes/app-extension' +import { AppExtension } from '../../_base-classes/app-extension' +import { HeadlineAnchorsMarkdownRendererExtension } from './headline-anchors-markdown-renderer-extension' + +/** + * Provides anchor links for headlines + */ +export class HeadlineAnchorsAppExtension extends AppExtension { + buildMarkdownRendererExtensions(options: MarkdownRendererExtensionOptions): MarkdownRendererExtension[] { + return options.rendererType === RendererType.DOCUMENT ? [new HeadlineAnchorsMarkdownRendererExtension()] : [] + } +} diff --git a/frontend/src/components/markdown-renderer/extensions/headline-anchors-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/headline-anchors/headline-anchors-markdown-renderer-extension.ts similarity index 64% rename from frontend/src/components/markdown-renderer/extensions/headline-anchors-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/headline-anchors/headline-anchors-markdown-renderer-extension.ts index 707a35bb0..71f2c1338 100644 --- a/frontend/src/components/markdown-renderer/extensions/headline-anchors-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/headline-anchors/headline-anchors-markdown-renderer-extension.ts @@ -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 { MarkdownRendererExtension } from './base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type MarkdownIt from 'markdown-it' import anchor from 'markdown-it-anchor' /** * Adds headline anchors to the markdown rendering. */ -export class HeadlineAnchorsMarkdownExtension extends MarkdownRendererExtension { +export class HeadlineAnchorsMarkdownRendererExtension extends MarkdownRendererExtension { public configureMarkdownIt(markdownIt: MarkdownIt): void { anchor(markdownIt, { permalink: anchor.permalink.ariaHidden({ diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/__snapshots__/highlighted-code-markdown-extension.spec.tsx.snap b/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/__snapshots__/highlighted-code-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/__snapshots__/highlighted-code-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/essential-app-extensions/highlighted-code-fence/__snapshots__/highlighted-code-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/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 similarity index 92% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code-fence-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-fence-app-extension.ts index 4f356849c..1e94410ce 100644 --- a/frontend/src/extensions/extra-integrations/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 @@ -5,8 +5,8 @@ */ import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' import { codeFenceRegex } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { HighlightedCodeMarkdownExtension } from './highlighted-code-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' import type { CompletionContext, CompletionResult } from '@codemirror/autocomplete' diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code-markdown-extension.spec.tsx b/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-markdown-extension.spec.tsx similarity index 93% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code-markdown-extension.spec.tsx rename to frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-markdown-extension.spec.tsx index 2512933a8..f419a2f79 100644 --- a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code-markdown-extension.spec.tsx +++ b/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-markdown-extension.spec.tsx @@ -3,15 +3,15 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ +import * as HighlightedCodeModule from '../../../components/common/highlighted-code/highlighted-code' +import type { HighlightedCodeProps } from '../../../components/common/highlighted-code/highlighted-code' import { TestMarkdownRenderer } from '../../../components/markdown-renderer/test-utils/test-markdown-renderer' import { mockI18n } from '../../../test-utils/mock-i18n' -import type { HighlightedCodeProps } from './highlighted-code' -import * as HighlightedCodeModule from './highlighted-code' import { HighlightedCodeMarkdownExtension } from './highlighted-code-markdown-extension' import { render } from '@testing-library/react' import React from 'react' -jest.mock('./highlighted-code') +jest.mock('../../../components/common/highlighted-code/highlighted-code') describe('Highlighted code markdown extension', () => { describe('renders', () => { diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-markdown-extension.ts similarity index 85% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-markdown-extension.ts index 9ee8fadf9..a9a238633 100644 --- a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-renderer-extension' +import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-renderer-extension' import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { HighlightedCodeReplacer } from './highlighted-code-replacer' diff --git a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code-replacer.tsx b/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-replacer.tsx similarity index 95% rename from frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code-replacer.tsx rename to frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-replacer.tsx index 56377c382..5ed2ff893 100644 --- a/frontend/src/extensions/extra-integrations/highlighted-code-fence/highlighted-code-replacer.tsx +++ b/frontend/src/extensions/essential-app-extensions/highlighted-code-fence/highlighted-code-replacer.tsx @@ -3,12 +3,12 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ +import HighlightedCode from '../../../components/common/highlighted-code/highlighted-code' import { ComponentReplacer, DO_NOT_REPLACE } from '../../../components/markdown-renderer/replace-components/component-replacer' import type { NodeReplacement } from '../../../components/markdown-renderer/replace-components/component-replacer' -import { HighlightedCode } from './highlighted-code' import type { Element } from 'domhandler' import React from 'react' diff --git a/frontend/src/components/markdown-renderer/extensions/iframe-capsule/iframe-capsule-app-extension.ts b/frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-app-extension.ts similarity index 64% rename from frontend/src/components/markdown-renderer/extensions/iframe-capsule/iframe-capsule-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-app-extension.ts index a9a093ab1..45b356c78 100644 --- a/frontend/src/components/markdown-renderer/extensions/iframe-capsule/iframe-capsule-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-app-extension.ts @@ -3,9 +3,9 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { AppExtension } from '../../../../extensions/base/app-extension' -import type { CheatsheetExtension } from '../../../editor-page/cheatsheet/cheatsheet-extension' -import type { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import type { CheatsheetExtension } from '../../../components/editor-page/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' export class IframeCapsuleAppExtension extends AppExtension { diff --git a/frontend/src/components/markdown-renderer/extensions/iframe-capsule/iframe-capsule-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-markdown-extension.ts similarity index 66% rename from frontend/src/components/markdown-renderer/extensions/iframe-capsule/iframe-capsule-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-markdown-extension.ts index 21600c2d1..e52660ffe 100644 --- a/frontend/src/components/markdown-renderer/extensions/iframe-capsule/iframe-capsule-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-markdown-extension.ts @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { ComponentReplacer } from '../../replace-components/component-replacer' -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { IframeCapsuleReplacer } from './iframe-capsule-replacer' /** diff --git a/frontend/src/components/markdown-renderer/extensions/iframe-capsule/iframe-capsule-replacer.tsx b/frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-replacer.tsx similarity index 66% rename from frontend/src/components/markdown-renderer/extensions/iframe-capsule/iframe-capsule-replacer.tsx rename to frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-replacer.tsx index 662d9e8c0..b4110de90 100644 --- a/frontend/src/components/markdown-renderer/extensions/iframe-capsule/iframe-capsule-replacer.tsx +++ b/frontend/src/extensions/essential-app-extensions/iframe-capsule/iframe-capsule-replacer.tsx @@ -3,9 +3,16 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { ClickShield } from '../../replace-components/click-shield/click-shield' -import type { NativeRenderer, NodeReplacement, SubNodeTransform } from '../../replace-components/component-replacer' -import { ComponentReplacer, DO_NOT_REPLACE } from '../../replace-components/component-replacer' +import { ClickShield } from '../../../components/markdown-renderer/replace-components/click-shield/click-shield' +import type { + NativeRenderer, + NodeReplacement, + SubNodeTransform +} from '../../../components/markdown-renderer/replace-components/component-replacer' +import { + ComponentReplacer, + DO_NOT_REPLACE +} from '../../../components/markdown-renderer/replace-components/component-replacer' import type { Element } from 'domhandler' import React from 'react' import { Globe as IconGlobe } from 'react-bootstrap-icons' diff --git a/frontend/src/components/markdown-renderer/extensions/image-placeholder/add-line-to-placeholder-image-tags.ts b/frontend/src/extensions/essential-app-extensions/image-placeholder/add-line-to-placeholder-image-tags.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/image-placeholder/add-line-to-placeholder-image-tags.ts rename to frontend/src/extensions/essential-app-extensions/image-placeholder/add-line-to-placeholder-image-tags.ts diff --git a/frontend/src/components/markdown-renderer/extensions/image-placeholder/hooks/use-on-image-upload.ts b/frontend/src/extensions/essential-app-extensions/image-placeholder/hooks/use-on-image-upload.ts similarity index 75% rename from frontend/src/components/markdown-renderer/extensions/image-placeholder/hooks/use-on-image-upload.ts rename to frontend/src/extensions/essential-app-extensions/image-placeholder/hooks/use-on-image-upload.ts index 3d75eac14..19eabaa61 100644 --- a/frontend/src/components/markdown-renderer/extensions/image-placeholder/hooks/use-on-image-upload.ts +++ b/frontend/src/extensions/essential-app-extensions/image-placeholder/hooks/use-on-image-upload.ts @@ -3,10 +3,10 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { Logger } from '../../../../../utils/logger' -import { FileContentFormat, readFile } from '../../../../../utils/read-file' -import { useRendererToEditorCommunicator } from '../../../../editor-page/render-context/renderer-to-editor-communicator-context-provider' -import { CommunicationMessageType } from '../../../../render-page/window-post-message-communicator/rendering-message' +import { useRendererToEditorCommunicator } from '../../../../components/editor-page/render-context/renderer-to-editor-communicator-context-provider' +import { CommunicationMessageType } from '../../../../components/render-page/window-post-message-communicator/rendering-message' +import { Logger } from '../../../../utils/logger' +import { FileContentFormat, readFile } from '../../../../utils/read-file' import { useCallback } from 'react' const log = new Logger('useOnImageUpload') diff --git a/frontend/src/components/markdown-renderer/extensions/image-placeholder/hooks/use-placeholder-size-style.ts b/frontend/src/extensions/essential-app-extensions/image-placeholder/hooks/use-placeholder-size-style.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/image-placeholder/hooks/use-placeholder-size-style.ts rename to frontend/src/extensions/essential-app-extensions/image-placeholder/hooks/use-placeholder-size-style.ts diff --git a/frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder-app-extension.ts b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-app-extension.ts similarity index 69% rename from frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-app-extension.ts index 2568f6563..89ba6076c 100644 --- a/frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-app-extension.ts @@ -3,10 +3,10 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { AppExtension } from '../../../../extensions/base/app-extension' -import type { CheatsheetExtension } from '../../../editor-page/cheatsheet/cheatsheet-extension' -import { basicCompletion } from '../../../editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import type { CheatsheetExtension } from '../../../components/editor-page/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' import { ImagePlaceholderMarkdownExtension } from './image-placeholder-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' import { t } from 'i18next' diff --git a/frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-markdown-extension.ts similarity index 74% rename from frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-markdown-extension.ts index 89b5405a6..e2e388482 100644 --- a/frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-markdown-extension.ts @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { ComponentReplacer } from '../../replace-components/component-replacer' -import { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { addLineToPlaceholderImageTags } from './add-line-to-placeholder-image-tags' import { ImagePlaceholderReplacer } from './image-placeholder-replacer' import type MarkdownIt from 'markdown-it/lib' diff --git a/frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder-replacer.tsx b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-replacer.tsx similarity index 85% rename from frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder-replacer.tsx rename to frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-replacer.tsx index eb21bf1d9..cf79d55ba 100644 --- a/frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder-replacer.tsx +++ b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder-replacer.tsx @@ -3,8 +3,11 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { NodeReplacement } from '../../replace-components/component-replacer' -import { ComponentReplacer, DO_NOT_REPLACE } from '../../replace-components/component-replacer' +import type { NodeReplacement } from '../../../components/markdown-renderer/replace-components/component-replacer' +import { + ComponentReplacer, + DO_NOT_REPLACE +} from '../../../components/markdown-renderer/replace-components/component-replacer' import { ImagePlaceholder } from './image-placeholder' import { ImagePlaceholderMarkdownExtension } from './image-placeholder-markdown-extension' import type { Element } from 'domhandler' diff --git a/frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder.module.scss b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder.module.scss similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder.module.scss rename to frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder.module.scss diff --git a/frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder.tsx b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder.tsx similarity index 94% rename from frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder.tsx rename to frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder.tsx index 1a9aacdce..9c380e795 100644 --- a/frontend/src/components/markdown-renderer/extensions/image-placeholder/image-placeholder.tsx +++ b/frontend/src/extensions/essential-app-extensions/image-placeholder/image-placeholder.tsx @@ -3,9 +3,9 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { cypressId } from '../../../../utils/cypress-attribute' -import { UiIcon } from '../../../common/icons/ui-icon' -import { acceptedMimeTypes } from '../../../common/upload-image-mimetypes' +import { UiIcon } from '../../../components/common/icons/ui-icon' +import { acceptedMimeTypes } from '../../../components/common/upload-image-mimetypes' +import { cypressId } from '../../../utils/cypress-attribute' import { useOnImageUpload } from './hooks/use-on-image-upload' import { usePlaceholderSizeStyle } from './hooks/use-placeholder-size-style' import styles from './image-placeholder.module.scss' diff --git a/frontend/src/components/markdown-renderer/extensions/image-placeholder/utils/build-placeholder-size-css.spec.ts b/frontend/src/extensions/essential-app-extensions/image-placeholder/utils/build-placeholder-size-css.spec.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/image-placeholder/utils/build-placeholder-size-css.spec.ts rename to frontend/src/extensions/essential-app-extensions/image-placeholder/utils/build-placeholder-size-css.spec.ts diff --git a/frontend/src/components/markdown-renderer/extensions/image-placeholder/utils/build-placeholder-size-css.ts b/frontend/src/extensions/essential-app-extensions/image-placeholder/utils/build-placeholder-size-css.ts similarity index 100% rename from frontend/src/components/markdown-renderer/extensions/image-placeholder/utils/build-placeholder-size-css.ts rename to frontend/src/extensions/essential-app-extensions/image-placeholder/utils/build-placeholder-size-css.ts diff --git a/frontend/src/extensions/extra-integrations/legacy-short-codes/__snapshots__/legacy-shortcodes-markdown-extension.spec.tsx.snap b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/__snapshots__/legacy-shortcodes-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/legacy-short-codes/__snapshots__/legacy-shortcodes-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/essential-app-extensions/legacy-short-codes/__snapshots__/legacy-shortcodes-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/legacy-short-codes/legacy-shortcodes-app-extension.ts b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/legacy-shortcodes-app-extension.ts similarity index 92% rename from frontend/src/extensions/extra-integrations/legacy-short-codes/legacy-shortcodes-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/legacy-short-codes/legacy-shortcodes-app-extension.ts index 6e2a37852..60b37e1b3 100644 --- a/frontend/src/extensions/extra-integrations/legacy-short-codes/legacy-shortcodes-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/legacy-shortcodes-app-extension.ts @@ -5,8 +5,8 @@ */ 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/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { LegacyShortcodesMarkdownExtension } from './legacy-shortcodes-markdown-extension' import { legacyPdfRegex } from './replace-legacy-pdf-short-code' import { legacySlideshareRegex } from './replace-legacy-slideshare-short-code' diff --git a/frontend/src/extensions/extra-integrations/legacy-short-codes/legacy-shortcodes-markdown-extension.spec.tsx b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/legacy-shortcodes-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/legacy-short-codes/legacy-shortcodes-markdown-extension.spec.tsx rename to frontend/src/extensions/essential-app-extensions/legacy-short-codes/legacy-shortcodes-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/legacy-short-codes/legacy-shortcodes-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/legacy-shortcodes-markdown-extension.ts similarity index 92% rename from frontend/src/extensions/extra-integrations/legacy-short-codes/legacy-shortcodes-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/legacy-short-codes/legacy-shortcodes-markdown-extension.ts index 04ecf1f35..2456d4668 100644 --- a/frontend/src/extensions/extra-integrations/legacy-short-codes/legacy-shortcodes-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/legacy-shortcodes-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import { legacyPdfShortCode } from './replace-legacy-pdf-short-code' import { legacySlideshareShortCode } from './replace-legacy-slideshare-short-code' import { legacySpeakerdeckShortCode } from './replace-legacy-speakerdeck-short-code' diff --git a/frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-pdf-short-code.spec.ts b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-pdf-short-code.spec.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-pdf-short-code.spec.ts rename to frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-pdf-short-code.spec.ts diff --git a/frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-pdf-short-code.ts b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-pdf-short-code.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-pdf-short-code.ts rename to frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-pdf-short-code.ts diff --git a/frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-slideshare-short-code.spec.ts b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-slideshare-short-code.spec.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-slideshare-short-code.spec.ts rename to frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-slideshare-short-code.spec.ts diff --git a/frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-slideshare-short-code.ts b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-slideshare-short-code.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-slideshare-short-code.ts rename to frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-slideshare-short-code.ts diff --git a/frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-speakerdeck-short-code.spec.ts b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-speakerdeck-short-code.spec.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-speakerdeck-short-code.spec.ts rename to frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-speakerdeck-short-code.spec.ts diff --git a/frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-speakerdeck-short-code.ts b/frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-speakerdeck-short-code.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/legacy-short-codes/replace-legacy-speakerdeck-short-code.ts rename to frontend/src/extensions/essential-app-extensions/legacy-short-codes/replace-legacy-speakerdeck-short-code.ts diff --git a/frontend/src/extensions/extra-integrations/spoiler/spoiler-app-extension.ts b/frontend/src/extensions/essential-app-extensions/spoiler/spoiler-app-extension.ts similarity index 89% rename from frontend/src/extensions/extra-integrations/spoiler/spoiler-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/spoiler/spoiler-app-extension.ts index 8e5a359e6..66b559a4e 100644 --- a/frontend/src/extensions/extra-integrations/spoiler/spoiler-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/spoiler/spoiler-app-extension.ts @@ -5,8 +5,8 @@ */ import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' import { basicCompletion } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { SpoilerMarkdownExtension } from './spoiler-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' import { t } from 'i18next' diff --git a/frontend/src/extensions/extra-integrations/spoiler/spoiler-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/spoiler/spoiler-markdown-extension.ts similarity index 94% rename from frontend/src/extensions/extra-integrations/spoiler/spoiler-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/spoiler/spoiler-markdown-extension.ts index 2dce1821b..a515d71cb 100644 --- a/frontend/src/extensions/extra-integrations/spoiler/spoiler-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/spoiler/spoiler-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type MarkdownIt from 'markdown-it' import markdownItContainer from 'markdown-it-container' import { escapeHtml } from 'markdown-it/lib/common/utils' diff --git a/frontend/src/components/markdown-renderer/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 similarity index 65% rename from frontend/src/components/markdown-renderer/extensions/table-of-contents/table-of-contents-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/table-of-contents/table-of-contents-app-extension.ts index 197786dc5..00098dc43 100644 --- a/frontend/src/components/markdown-renderer/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,11 +3,11 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import type { MarkdownRendererExtensionOptions } from '../../../../extensions/base/app-extension' -import { AppExtension } from '../../../../extensions/base/app-extension' -import type { CheatsheetExtension } from '../../../editor-page/cheatsheet/cheatsheet-extension' -import { basicCompletion } from '../../../editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../base/markdown-renderer-extension' +import type { CheatsheetExtension } from '../../../components/editor-page/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' +import { AppExtension } from '../../_base-classes/app-extension' import { TableOfContentsMarkdownExtension } from './table-of-contents-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' import { t } from 'i18next' diff --git a/frontend/src/components/markdown-renderer/extensions/table-of-contents/table-of-contents-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/table-of-contents/table-of-contents-markdown-extension.ts similarity index 81% rename from frontend/src/components/markdown-renderer/extensions/table-of-contents/table-of-contents-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/table-of-contents/table-of-contents-markdown-extension.ts index 00d956c8b..f6f1b9404 100644 --- a/frontend/src/components/markdown-renderer/extensions/table-of-contents/table-of-contents-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/table-of-contents/table-of-contents-markdown-extension.ts @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { tocSlugify } from '../../../editor-page/table-of-contents/toc-slugify' -import { EventMarkdownRendererExtension } from '../base/event-markdown-renderer-extension' +import { tocSlugify } from '../../../components/editor-page/table-of-contents/toc-slugify' +import { EventMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/event-markdown-renderer-extension' import type { TocAst } from '@hedgedoc/markdown-it-plugins' import { toc } from '@hedgedoc/markdown-it-plugins' import equal from 'fast-deep-equal' diff --git a/frontend/src/extensions/extra-integrations/task-list/create-checkbox-content.ts b/frontend/src/extensions/essential-app-extensions/task-list/create-checkbox-content.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/task-list/create-checkbox-content.ts rename to frontend/src/extensions/essential-app-extensions/task-list/create-checkbox-content.ts diff --git a/frontend/src/extensions/extra-integrations/task-list/event-emitting-task-list-checkbox.tsx b/frontend/src/extensions/essential-app-extensions/task-list/event-emitting-task-list-checkbox.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/task-list/event-emitting-task-list-checkbox.tsx rename to frontend/src/extensions/essential-app-extensions/task-list/event-emitting-task-list-checkbox.tsx diff --git a/frontend/src/extensions/extra-integrations/task-list/find-check-box.ts b/frontend/src/extensions/essential-app-extensions/task-list/find-check-box.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/task-list/find-check-box.ts rename to frontend/src/extensions/essential-app-extensions/task-list/find-check-box.ts diff --git a/frontend/src/extensions/extra-integrations/task-list/set-checkbox-in-cheatsheet.tsx b/frontend/src/extensions/essential-app-extensions/task-list/set-checkbox-in-cheatsheet.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/task-list/set-checkbox-in-cheatsheet.tsx rename to frontend/src/extensions/essential-app-extensions/task-list/set-checkbox-in-cheatsheet.tsx diff --git a/frontend/src/extensions/extra-integrations/task-list/set-checkbox-in-editor.tsx b/frontend/src/extensions/essential-app-extensions/task-list/set-checkbox-in-editor.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/task-list/set-checkbox-in-editor.tsx rename to frontend/src/extensions/essential-app-extensions/task-list/set-checkbox-in-editor.tsx diff --git a/frontend/src/extensions/extra-integrations/task-list/task-list-checkbox-app-extension.ts b/frontend/src/extensions/essential-app-extensions/task-list/task-list-checkbox-app-extension.ts similarity index 87% rename from frontend/src/extensions/extra-integrations/task-list/task-list-checkbox-app-extension.ts rename to frontend/src/extensions/essential-app-extensions/task-list/task-list-checkbox-app-extension.ts index ea9767612..165470c50 100644 --- a/frontend/src/extensions/extra-integrations/task-list/task-list-checkbox-app-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/task-list/task-list-checkbox-app-extension.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' -import type { MarkdownRendererExtensionOptions } from '../../base/app-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtensionOptions } from '../../_base-classes/app-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { SetCheckboxInCheatsheet } from './set-checkbox-in-cheatsheet' import { SetCheckboxInEditor } from './set-checkbox-in-editor' import { TaskListMarkdownExtension } from './task-list-markdown-extension' diff --git a/frontend/src/extensions/extra-integrations/task-list/task-list-checkbox.tsx b/frontend/src/extensions/essential-app-extensions/task-list/task-list-checkbox.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/task-list/task-list-checkbox.tsx rename to frontend/src/extensions/essential-app-extensions/task-list/task-list-checkbox.tsx diff --git a/frontend/src/extensions/extra-integrations/task-list/task-list-markdown-extension.ts b/frontend/src/extensions/essential-app-extensions/task-list/task-list-markdown-extension.ts similarity index 91% rename from frontend/src/extensions/extra-integrations/task-list/task-list-markdown-extension.ts rename to frontend/src/extensions/essential-app-extensions/task-list/task-list-markdown-extension.ts index e65a8fa86..c08911fdc 100644 --- a/frontend/src/extensions/extra-integrations/task-list/task-list-markdown-extension.ts +++ b/frontend/src/extensions/essential-app-extensions/task-list/task-list-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { EventMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/event-markdown-renderer-extension' +import { EventMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/event-markdown-renderer-extension' import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { TaskListReplacer } from './task-list-replacer' import { taskLists } from '@hedgedoc/markdown-it-plugins' diff --git a/frontend/src/extensions/extra-integrations/task-list/task-list-replacer.tsx b/frontend/src/extensions/essential-app-extensions/task-list/task-list-replacer.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/task-list/task-list-replacer.tsx rename to frontend/src/extensions/essential-app-extensions/task-list/task-list-replacer.tsx diff --git a/frontend/src/extensions/extra-integrations/abcjs/__snapshots__/abc-frame.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/abcjs/__snapshots__/abc-frame.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/abcjs/__snapshots__/abc-frame.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/abcjs/__snapshots__/abc-frame.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/abcjs/__snapshots__/abcjs-markdown-extension.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/abcjs/__snapshots__/abcjs-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/abcjs/__snapshots__/abcjs-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/abcjs/__snapshots__/abcjs-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/abcjs/abc-frame.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/abcjs/abc-frame.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/abcjs/abc-frame.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/abcjs/abc-frame.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/abcjs/abc-frame.tsx b/frontend/src/extensions/external-lib-app-extensions/abcjs/abc-frame.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/abcjs/abc-frame.tsx rename to frontend/src/extensions/external-lib-app-extensions/abcjs/abc-frame.tsx diff --git a/frontend/src/extensions/extra-integrations/abcjs/abc.module.scss b/frontend/src/extensions/external-lib-app-extensions/abcjs/abc.module.scss similarity index 100% rename from frontend/src/extensions/extra-integrations/abcjs/abc.module.scss rename to frontend/src/extensions/external-lib-app-extensions/abcjs/abc.module.scss diff --git a/frontend/src/extensions/extra-integrations/abcjs/abcjs-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-app-extension.ts similarity index 87% rename from frontend/src/extensions/extra-integrations/abcjs/abcjs-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-app-extension.ts index 587ddf8e0..21686e25a 100644 --- a/frontend/src/extensions/extra-integrations/abcjs/abcjs-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-app-extension.ts @@ -8,8 +8,8 @@ import { basicCompletion, codeFenceRegex } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { AbcjsMarkdownExtension } from './abcjs-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' diff --git a/frontend/src/extensions/extra-integrations/abcjs/abcjs-markdown-extension.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/abcjs/abcjs-markdown-extension.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/abcjs/abcjs-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-markdown-extension.ts similarity index 84% rename from frontend/src/extensions/extra-integrations/abcjs/abcjs-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-markdown-extension.ts index 247ebb29b..95e0caffe 100644 --- a/frontend/src/extensions/extra-integrations/abcjs/abcjs-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/abcjs/abcjs-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-renderer-extension' +import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-renderer-extension' import { CodeBlockComponentReplacer } from '../../../components/markdown-renderer/replace-components/code-block-component-replacer' import { AbcFrame } from './abc-frame' diff --git a/frontend/src/extensions/extra-integrations/asciinema/__snapshots__/asciinema-frame.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/asciinema/__snapshots__/asciinema-frame.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/asciinema/__snapshots__/asciinema-frame.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/asciinema/__snapshots__/asciinema-frame.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/asciinema/__snapshots__/asciinema-markdown-extension.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/asciinema/__snapshots__/asciinema-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/asciinema/__snapshots__/asciinema-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/asciinema/__snapshots__/asciinema-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/asciinema/asciinema-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-app-extension.ts similarity index 85% rename from frontend/src/extensions/extra-integrations/asciinema/asciinema-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-app-extension.ts index 2df365a9e..bd55f593e 100644 --- a/frontend/src/extensions/extra-integrations/asciinema/asciinema-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-app-extension.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-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/extra-integrations/asciinema/asciinema-frame.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-frame.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/asciinema/asciinema-frame.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-frame.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/asciinema/asciinema-frame.tsx b/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-frame.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/asciinema/asciinema-frame.tsx rename to frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-frame.tsx diff --git a/frontend/src/extensions/extra-integrations/asciinema/asciinema-markdown-extension.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/asciinema/asciinema-markdown-extension.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/asciinema/asciinema-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-markdown-extension.ts similarity index 94% rename from frontend/src/extensions/extra-integrations/asciinema/asciinema-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-markdown-extension.ts index a8f4fbdc9..970926121 100644 --- a/frontend/src/extensions/extra-integrations/asciinema/asciinema-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/asciinema/asciinema-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { CustomTagWithIdComponentReplacer } from '../../../components/markdown-renderer/replace-components/custom-tag-with-id-component-replacer' import { AsciinemaFrame } from './asciinema-frame' diff --git a/frontend/src/extensions/extra-integrations/asciinema/replace-asciinema-link.spec.ts b/frontend/src/extensions/external-lib-app-extensions/asciinema/replace-asciinema-link.spec.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/asciinema/replace-asciinema-link.spec.ts rename to frontend/src/extensions/external-lib-app-extensions/asciinema/replace-asciinema-link.spec.ts diff --git a/frontend/src/extensions/extra-integrations/asciinema/replace-asciinema-link.ts b/frontend/src/extensions/external-lib-app-extensions/asciinema/replace-asciinema-link.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/asciinema/replace-asciinema-link.ts rename to frontend/src/extensions/external-lib-app-extensions/asciinema/replace-asciinema-link.ts diff --git a/frontend/src/extensions/external-lib-app-extensions/external-lib-app-extensions.ts b/frontend/src/extensions/external-lib-app-extensions/external-lib-app-extensions.ts new file mode 100644 index 000000000..1d8e96417 --- /dev/null +++ b/frontend/src/extensions/external-lib-app-extensions/external-lib-app-extensions.ts @@ -0,0 +1,34 @@ +/* + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ +import type { AppExtension } from '../_base-classes/app-extension' +import { AbcjsAppExtension } from './abcjs/abcjs-app-extension' +import { AsciinemaAppExtension } from './asciinema/asciinema-app-extension' +import { FlowchartAppExtension } from './flowchart/flowchart-app-extension' +import { GistAppExtension } from './gist/gist-app-extension' +import { GraphvizAppExtension } from './graphviz/graphviz-app-extension' +import { KatexAppExtension } from './katex/katex-app-extension' +import { MermaidAppExtension } from './mermaid/mermaid-app-extension' +import { PlantumlAppExtension } from './plantuml/plantuml-app-extension' +import { VegaLiteAppExtension } from './vega-lite/vega-lite-app-extension' +import { VimeoAppExtension } from './vimeo/vimeo-app-extension' +import { YoutubeAppExtension } from './youtube/youtube-app-extension' + +/** + * Contains all app extensions that add third party libraries. + */ +export const externalLibAppExtensions: AppExtension[] = [ + new AbcjsAppExtension(), + new FlowchartAppExtension(), + new GistAppExtension(), + new GraphvizAppExtension(), + new KatexAppExtension(), + new AsciinemaAppExtension(), + new MermaidAppExtension(), + new PlantumlAppExtension(), + new VegaLiteAppExtension(), + new VimeoAppExtension(), + new YoutubeAppExtension() +] diff --git a/frontend/src/extensions/extra-integrations/flowchart/__snapshots__/flowchart-markdown-extension.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/flowchart/__snapshots__/flowchart-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/flowchart/__snapshots__/flowchart-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/flowchart/__snapshots__/flowchart-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/flowchart/__snapshots__/flowchart.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/flowchart/__snapshots__/flowchart.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/flowchart/__snapshots__/flowchart.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/flowchart/__snapshots__/flowchart.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/flowchart/flowchart-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-app-extension.ts similarity index 88% rename from frontend/src/extensions/extra-integrations/flowchart/flowchart-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-app-extension.ts index 2758a508e..089152986 100644 --- a/frontend/src/extensions/extra-integrations/flowchart/flowchart-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-app-extension.ts @@ -8,8 +8,8 @@ import { basicCompletion, codeFenceRegex } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { FlowchartMarkdownExtension } from './flowchart-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' diff --git a/frontend/src/extensions/extra-integrations/flowchart/flowchart-markdown-extension.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/flowchart/flowchart-markdown-extension.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/flowchart/flowchart-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-markdown-extension.ts similarity index 84% rename from frontend/src/extensions/extra-integrations/flowchart/flowchart-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-markdown-extension.ts index 5ab0a3aee..b67a6db76 100644 --- a/frontend/src/extensions/extra-integrations/flowchart/flowchart-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-renderer-extension' +import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-renderer-extension' import { CodeBlockComponentReplacer } from '../../../components/markdown-renderer/replace-components/code-block-component-replacer' import { FlowChart } from './flowchart' diff --git a/frontend/src/extensions/extra-integrations/flowchart/flowchart.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/flowchart/flowchart.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/flowchart/flowchart.tsx b/frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/flowchart/flowchart.tsx rename to frontend/src/extensions/external-lib-app-extensions/flowchart/flowchart.tsx diff --git a/frontend/src/extensions/extra-integrations/gist/gist-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/gist/gist-app-extension.ts similarity index 84% rename from frontend/src/extensions/extra-integrations/gist/gist-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/gist/gist-app-extension.ts index 0c68af9ae..1ac6b175b 100644 --- a/frontend/src/extensions/extra-integrations/gist/gist-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/gist/gist-app-extension.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-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/extra-integrations/gist/gist-frame.module.scss b/frontend/src/extensions/external-lib-app-extensions/gist/gist-frame.module.scss similarity index 100% rename from frontend/src/extensions/extra-integrations/gist/gist-frame.module.scss rename to frontend/src/extensions/external-lib-app-extensions/gist/gist-frame.module.scss diff --git a/frontend/src/extensions/extra-integrations/gist/gist-frame.tsx b/frontend/src/extensions/external-lib-app-extensions/gist/gist-frame.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/gist/gist-frame.tsx rename to frontend/src/extensions/external-lib-app-extensions/gist/gist-frame.tsx diff --git a/frontend/src/extensions/extra-integrations/gist/gist-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/gist/gist-markdown-extension.ts similarity index 95% rename from frontend/src/extensions/extra-integrations/gist/gist-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/gist/gist-markdown-extension.ts index 6dd79a359..decb3af30 100644 --- a/frontend/src/extensions/extra-integrations/gist/gist-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/gist/gist-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { CustomTagWithIdComponentReplacer } from '../../../components/markdown-renderer/replace-components/custom-tag-with-id-component-replacer' import { GistFrame } from './gist-frame' diff --git a/frontend/src/extensions/extra-integrations/gist/replace-gist-link.ts b/frontend/src/extensions/external-lib-app-extensions/gist/replace-gist-link.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/gist/replace-gist-link.ts rename to frontend/src/extensions/external-lib-app-extensions/gist/replace-gist-link.ts diff --git a/frontend/src/extensions/extra-integrations/gist/replace-legacy-gist-short-code.ts b/frontend/src/extensions/external-lib-app-extensions/gist/replace-legacy-gist-short-code.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/gist/replace-legacy-gist-short-code.ts rename to frontend/src/extensions/external-lib-app-extensions/gist/replace-legacy-gist-short-code.ts diff --git a/frontend/src/extensions/extra-integrations/gist/use-resize-gist-frame.ts b/frontend/src/extensions/external-lib-app-extensions/gist/use-resize-gist-frame.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/gist/use-resize-gist-frame.ts rename to frontend/src/extensions/external-lib-app-extensions/gist/use-resize-gist-frame.ts diff --git a/frontend/src/extensions/extra-integrations/graphviz/__snapshots__/graphviz-markdown-extension.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/graphviz/__snapshots__/graphviz-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/graphviz/__snapshots__/graphviz-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/graphviz/__snapshots__/graphviz-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/graphviz/graphviz-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-app-extension.ts similarity index 88% rename from frontend/src/extensions/extra-integrations/graphviz/graphviz-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-app-extension.ts index 20a2ed83f..abf9873f5 100644 --- a/frontend/src/extensions/extra-integrations/graphviz/graphviz-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-app-extension.ts @@ -8,8 +8,8 @@ import { basicCompletion, codeFenceRegex } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { GraphvizMarkdownExtension } from './graphviz-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' diff --git a/frontend/src/extensions/extra-integrations/graphviz/graphviz-frame.tsx b/frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-frame.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/graphviz/graphviz-frame.tsx rename to frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-frame.tsx diff --git a/frontend/src/extensions/extra-integrations/graphviz/graphviz-markdown-extension.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/graphviz/graphviz-markdown-extension.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/graphviz/graphviz-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-markdown-extension.ts similarity index 85% rename from frontend/src/extensions/extra-integrations/graphviz/graphviz-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-markdown-extension.ts index 81ba5ede1..7b95299bb 100644 --- a/frontend/src/extensions/extra-integrations/graphviz/graphviz-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/graphviz/graphviz-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-renderer-extension' +import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-renderer-extension' import { CodeBlockComponentReplacer } from '../../../components/markdown-renderer/replace-components/code-block-component-replacer' import { GraphvizFrame } from './graphviz-frame' diff --git a/frontend/src/extensions/extra-integrations/katex/__snapshots__/katex-frame.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/katex/__snapshots__/katex-frame.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/katex/__snapshots__/katex-frame.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/katex/__snapshots__/katex-frame.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/katex/__snapshots__/katex-markdown-extension.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/katex/__snapshots__/katex-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/katex/__snapshots__/katex-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/katex/__snapshots__/katex-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/katex/katex-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/katex/katex-app-extension.ts similarity index 84% rename from frontend/src/extensions/extra-integrations/katex/katex-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/katex/katex-app-extension.ts index 38ac2b263..e066ab412 100644 --- a/frontend/src/extensions/extra-integrations/katex/katex-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/katex/katex-app-extension.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: AGPL-3.0-only */ import type { CheatsheetExtension } from '../../../components/editor-page/cheatsheet/cheatsheet-extension' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-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/extra-integrations/katex/katex-frame.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/katex/katex-frame.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/katex/katex-frame.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/katex/katex-frame.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/katex/katex-frame.tsx b/frontend/src/extensions/external-lib-app-extensions/katex/katex-frame.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/katex/katex-frame.tsx rename to frontend/src/extensions/external-lib-app-extensions/katex/katex-frame.tsx diff --git a/frontend/src/extensions/extra-integrations/katex/katex-markdown-extension.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/katex/katex-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/katex/katex-markdown-extension.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/katex/katex-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/katex/katex-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/katex/katex-markdown-extension.ts similarity index 94% rename from frontend/src/extensions/extra-integrations/katex/katex-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/katex/katex-markdown-extension.ts index 32a3baee5..81a0c38c5 100644 --- a/frontend/src/extensions/extra-integrations/katex/katex-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/katex/katex-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { KatexReplacer } from './katex-replacer' import type MarkdownIt from 'markdown-it' diff --git a/frontend/src/extensions/extra-integrations/katex/katex-replacer.tsx b/frontend/src/extensions/external-lib-app-extensions/katex/katex-replacer.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/katex/katex-replacer.tsx rename to frontend/src/extensions/external-lib-app-extensions/katex/katex-replacer.tsx diff --git a/frontend/src/extensions/extra-integrations/mermaid/mermaid-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-app-extension.ts similarity index 88% rename from frontend/src/extensions/extra-integrations/mermaid/mermaid-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-app-extension.ts index aa033a8f1..0b0180a03 100644 --- a/frontend/src/extensions/extra-integrations/mermaid/mermaid-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-app-extension.ts @@ -8,8 +8,8 @@ import { basicCompletion, codeFenceRegex } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { MermaidMarkdownExtension } from './mermaid-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' diff --git a/frontend/src/extensions/extra-integrations/mermaid/mermaid-chart.tsx b/frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-chart.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/mermaid/mermaid-chart.tsx rename to frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-chart.tsx diff --git a/frontend/src/extensions/extra-integrations/mermaid/mermaid-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-markdown-extension.ts similarity index 85% rename from frontend/src/extensions/extra-integrations/mermaid/mermaid-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-markdown-extension.ts index 5449894a0..f49c4a1c3 100644 --- a/frontend/src/extensions/extra-integrations/mermaid/mermaid-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-renderer-extension' +import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-renderer-extension' import { CodeBlockComponentReplacer } from '../../../components/markdown-renderer/replace-components/code-block-component-replacer' import { MermaidChart } from './mermaid-chart' diff --git a/frontend/src/extensions/extra-integrations/mermaid/mermaid.module.scss b/frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid.module.scss similarity index 100% rename from frontend/src/extensions/extra-integrations/mermaid/mermaid.module.scss rename to frontend/src/extensions/external-lib-app-extensions/mermaid/mermaid.module.scss diff --git a/frontend/src/extensions/extra-integrations/plantuml/__snapshots__/plantuml-markdown-extension.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/plantuml/__snapshots__/plantuml-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/plantuml/__snapshots__/plantuml-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/plantuml/__snapshots__/plantuml-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/plantuml/plantuml-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-app-extension.ts similarity index 84% rename from frontend/src/extensions/extra-integrations/plantuml/plantuml-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-app-extension.ts index 8130f0b74..c0d34d5dd 100644 --- a/frontend/src/extensions/extra-integrations/plantuml/plantuml-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-app-extension.ts @@ -8,9 +8,9 @@ import { basicCompletion, codeFenceRegex } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import type { MarkdownRendererExtensionOptions } from '../../base/app-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import type { MarkdownRendererExtensionOptions } from '../../_base-classes/app-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { PlantumlMarkdownExtension } from './plantuml-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' diff --git a/frontend/src/extensions/extra-integrations/plantuml/plantuml-markdown-extension.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/plantuml/plantuml-markdown-extension.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/plantuml/plantuml-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-markdown-extension.ts similarity index 96% rename from frontend/src/extensions/extra-integrations/plantuml/plantuml-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-markdown-extension.ts index 40bd25dd4..bd97594cd 100644 --- a/frontend/src/extensions/extra-integrations/plantuml/plantuml-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { PlantumlNotConfiguredComponentReplacer } from './plantuml-not-configured-component-replacer' import { Optional } from '@mrdrogdrog/optional' diff --git a/frontend/src/extensions/extra-integrations/plantuml/plantuml-not-configured-alert.tsx b/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-not-configured-alert.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/plantuml/plantuml-not-configured-alert.tsx rename to frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-not-configured-alert.tsx diff --git a/frontend/src/extensions/extra-integrations/plantuml/plantuml-not-configured-component-replacer.tsx b/frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-not-configured-component-replacer.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/plantuml/plantuml-not-configured-component-replacer.tsx rename to frontend/src/extensions/external-lib-app-extensions/plantuml/plantuml-not-configured-component-replacer.tsx diff --git a/frontend/src/extensions/extra-integrations/sequence-diagram/legacy-sequence-diagram-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/sequence-diagram/legacy-sequence-diagram-app-extension.ts similarity index 87% rename from frontend/src/extensions/extra-integrations/sequence-diagram/legacy-sequence-diagram-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/sequence-diagram/legacy-sequence-diagram-app-extension.ts index 2170d9b91..951aaed46 100644 --- a/frontend/src/extensions/extra-integrations/sequence-diagram/legacy-sequence-diagram-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/sequence-diagram/legacy-sequence-diagram-app-extension.ts @@ -5,8 +5,8 @@ */ 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/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { LegacySequenceDiagramMarkdownExtension } from './legacy-sequence-diagram-markdown-extension' import { t } from 'i18next' diff --git a/frontend/src/extensions/extra-integrations/sequence-diagram/legacy-sequence-diagram-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/sequence-diagram/legacy-sequence-diagram-markdown-extension.ts similarity index 85% rename from frontend/src/extensions/extra-integrations/sequence-diagram/legacy-sequence-diagram-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/sequence-diagram/legacy-sequence-diagram-markdown-extension.ts index b9068a6a1..2d298d1fd 100644 --- a/frontend/src/extensions/extra-integrations/sequence-diagram/legacy-sequence-diagram-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/sequence-diagram/legacy-sequence-diagram-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-renderer-extension' +import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-renderer-extension' import { CodeBlockComponentReplacer } from '../../../components/markdown-renderer/replace-components/code-block-component-replacer' import { SequenceDiagram } from './sequence-diagram' diff --git a/frontend/src/extensions/extra-integrations/sequence-diagram/sequence-diagram.tsx b/frontend/src/extensions/external-lib-app-extensions/sequence-diagram/sequence-diagram.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/sequence-diagram/sequence-diagram.tsx rename to frontend/src/extensions/external-lib-app-extensions/sequence-diagram/sequence-diagram.tsx diff --git a/frontend/src/extensions/extra-integrations/vega-lite/__snapshots__/vega-lite-markdown-extension.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/vega-lite/__snapshots__/vega-lite-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/vega-lite/__snapshots__/vega-lite-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/vega-lite/__snapshots__/vega-lite-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/vega-lite/vega-lite-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-app-extension.ts similarity index 89% rename from frontend/src/extensions/extra-integrations/vega-lite/vega-lite-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-app-extension.ts index fd9ce89b4..20b121c2a 100644 --- a/frontend/src/extensions/extra-integrations/vega-lite/vega-lite-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-app-extension.ts @@ -8,8 +8,8 @@ import { basicCompletion, codeFenceRegex } from '../../../components/editor-page/editor-pane/autocompletions/basic-completion' -import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { VegaLiteMarkdownExtension } from './vega-lite-markdown-extension' import type { CompletionSource } from '@codemirror/autocomplete' diff --git a/frontend/src/extensions/extra-integrations/vega-lite/vega-lite-chart.tsx b/frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-chart.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/vega-lite/vega-lite-chart.tsx rename to frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-chart.tsx diff --git a/frontend/src/extensions/extra-integrations/vega-lite/vega-lite-markdown-extension.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/vega-lite/vega-lite-markdown-extension.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/vega-lite/vega-lite-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-markdown-extension.ts similarity index 85% rename from frontend/src/extensions/extra-integrations/vega-lite/vega-lite-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-markdown-extension.ts index d5895bb2e..b6ff10362 100644 --- a/frontend/src/extensions/extra-integrations/vega-lite/vega-lite-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/vega-lite/vega-lite-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/code-block-markdown-extension/code-block-markdown-renderer-extension' +import { CodeBlockMarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/code-block-markdown-extension/code-block-markdown-renderer-extension' import { CodeBlockComponentReplacer } from '../../../components/markdown-renderer/replace-components/code-block-component-replacer' import { VegaLiteChart } from './vega-lite-chart' diff --git a/frontend/src/extensions/extra-integrations/vimeo/__snapshots__/vimeo-frame.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/vimeo/__snapshots__/vimeo-frame.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/vimeo/__snapshots__/vimeo-frame.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/vimeo/__snapshots__/vimeo-frame.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/vimeo/replace-legacy-vimeo-short-code.spec.ts b/frontend/src/extensions/external-lib-app-extensions/vimeo/replace-legacy-vimeo-short-code.spec.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/vimeo/replace-legacy-vimeo-short-code.spec.ts rename to frontend/src/extensions/external-lib-app-extensions/vimeo/replace-legacy-vimeo-short-code.spec.ts diff --git a/frontend/src/extensions/extra-integrations/vimeo/replace-legacy-vimeo-short-code.ts b/frontend/src/extensions/external-lib-app-extensions/vimeo/replace-legacy-vimeo-short-code.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/vimeo/replace-legacy-vimeo-short-code.ts rename to frontend/src/extensions/external-lib-app-extensions/vimeo/replace-legacy-vimeo-short-code.ts diff --git a/frontend/src/extensions/extra-integrations/vimeo/replace-vimeo-link.spec.ts b/frontend/src/extensions/external-lib-app-extensions/vimeo/replace-vimeo-link.spec.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/vimeo/replace-vimeo-link.spec.ts rename to frontend/src/extensions/external-lib-app-extensions/vimeo/replace-vimeo-link.spec.ts diff --git a/frontend/src/extensions/extra-integrations/vimeo/replace-vimeo-link.ts b/frontend/src/extensions/external-lib-app-extensions/vimeo/replace-vimeo-link.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/vimeo/replace-vimeo-link.ts rename to frontend/src/extensions/external-lib-app-extensions/vimeo/replace-vimeo-link.ts diff --git a/frontend/src/extensions/extra-integrations/vimeo/vimeo-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-app-extension.ts similarity index 90% rename from frontend/src/extensions/extra-integrations/vimeo/vimeo-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-app-extension.ts index ee3531f7a..3912b789b 100644 --- a/frontend/src/extensions/extra-integrations/vimeo/vimeo-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-app-extension.ts @@ -6,8 +6,8 @@ import type { CheatsheetExtension } from '../../../components/editor-page/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/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { legacyVimeoRegex } from './replace-legacy-vimeo-short-code' import { VimeoMarkdownExtension } from './vimeo-markdown-extension' import { t } from 'i18next' diff --git a/frontend/src/extensions/extra-integrations/vimeo/vimeo-frame.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-frame.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/vimeo/vimeo-frame.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-frame.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/vimeo/vimeo-frame.tsx b/frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-frame.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/vimeo/vimeo-frame.tsx rename to frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-frame.tsx diff --git a/frontend/src/extensions/extra-integrations/vimeo/vimeo-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-markdown-extension.ts similarity index 94% rename from frontend/src/extensions/extra-integrations/vimeo/vimeo-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-markdown-extension.ts index b998bcbfe..012f149e6 100644 --- a/frontend/src/extensions/extra-integrations/vimeo/vimeo-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/vimeo/vimeo-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { CustomTagWithIdComponentReplacer } from '../../../components/markdown-renderer/replace-components/custom-tag-with-id-component-replacer' import { replaceLegacyVimeoShortCodeMarkdownItPlugin } from './replace-legacy-vimeo-short-code' diff --git a/frontend/src/extensions/extra-integrations/youtube/__snapshots__/youtube-frame.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/youtube/__snapshots__/youtube-frame.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/youtube/__snapshots__/youtube-frame.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/youtube/__snapshots__/youtube-frame.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/youtube/__snapshots__/youtube-markdown-extension.spec.tsx.snap b/frontend/src/extensions/external-lib-app-extensions/youtube/__snapshots__/youtube-markdown-extension.spec.tsx.snap similarity index 100% rename from frontend/src/extensions/extra-integrations/youtube/__snapshots__/youtube-markdown-extension.spec.tsx.snap rename to frontend/src/extensions/external-lib-app-extensions/youtube/__snapshots__/youtube-markdown-extension.spec.tsx.snap diff --git a/frontend/src/extensions/extra-integrations/youtube/replace-legacy-youtube-short-code.spec.ts b/frontend/src/extensions/external-lib-app-extensions/youtube/replace-legacy-youtube-short-code.spec.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/youtube/replace-legacy-youtube-short-code.spec.ts rename to frontend/src/extensions/external-lib-app-extensions/youtube/replace-legacy-youtube-short-code.spec.ts diff --git a/frontend/src/extensions/extra-integrations/youtube/replace-legacy-youtube-short-code.ts b/frontend/src/extensions/external-lib-app-extensions/youtube/replace-legacy-youtube-short-code.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/youtube/replace-legacy-youtube-short-code.ts rename to frontend/src/extensions/external-lib-app-extensions/youtube/replace-legacy-youtube-short-code.ts diff --git a/frontend/src/extensions/extra-integrations/youtube/replace-youtube-link.spec.ts b/frontend/src/extensions/external-lib-app-extensions/youtube/replace-youtube-link.spec.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/youtube/replace-youtube-link.spec.ts rename to frontend/src/extensions/external-lib-app-extensions/youtube/replace-youtube-link.spec.ts diff --git a/frontend/src/extensions/extra-integrations/youtube/replace-youtube-link.ts b/frontend/src/extensions/external-lib-app-extensions/youtube/replace-youtube-link.ts similarity index 100% rename from frontend/src/extensions/extra-integrations/youtube/replace-youtube-link.ts rename to frontend/src/extensions/external-lib-app-extensions/youtube/replace-youtube-link.ts diff --git a/frontend/src/extensions/extra-integrations/youtube/youtube-app-extension.ts b/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-app-extension.ts similarity index 90% rename from frontend/src/extensions/extra-integrations/youtube/youtube-app-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/youtube/youtube-app-extension.ts index 3509c87e4..8ed44faa2 100644 --- a/frontend/src/extensions/extra-integrations/youtube/youtube-app-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-app-extension.ts @@ -6,8 +6,8 @@ import type { CheatsheetExtension } from '../../../components/editor-page/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/markdown-renderer-extension' -import { AppExtension } from '../../base/app-extension' +import type { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' +import { AppExtension } from '../../_base-classes/app-extension' import { legacyYouTubeRegex } from './replace-legacy-youtube-short-code' import { YoutubeMarkdownExtension } from './youtube-markdown-extension' import { t } from 'i18next' diff --git a/frontend/src/extensions/extra-integrations/youtube/youtube-frame.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-frame.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/youtube/youtube-frame.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/youtube/youtube-frame.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/youtube/youtube-frame.tsx b/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-frame.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/youtube/youtube-frame.tsx rename to frontend/src/extensions/external-lib-app-extensions/youtube/youtube-frame.tsx diff --git a/frontend/src/extensions/extra-integrations/youtube/youtube-markdown-extension.spec.tsx b/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-markdown-extension.spec.tsx similarity index 100% rename from frontend/src/extensions/extra-integrations/youtube/youtube-markdown-extension.spec.tsx rename to frontend/src/extensions/external-lib-app-extensions/youtube/youtube-markdown-extension.spec.tsx diff --git a/frontend/src/extensions/extra-integrations/youtube/youtube-markdown-extension.ts b/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-markdown-extension.ts similarity index 95% rename from frontend/src/extensions/extra-integrations/youtube/youtube-markdown-extension.ts rename to frontend/src/extensions/external-lib-app-extensions/youtube/youtube-markdown-extension.ts index 1cf77de92..fbc2be3a1 100644 --- a/frontend/src/extensions/extra-integrations/youtube/youtube-markdown-extension.ts +++ b/frontend/src/extensions/external-lib-app-extensions/youtube/youtube-markdown-extension.ts @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ -import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/base/markdown-renderer-extension' +import { MarkdownRendererExtension } from '../../../components/markdown-renderer/extensions/_base-classes/markdown-renderer-extension' import type { ComponentReplacer } from '../../../components/markdown-renderer/replace-components/component-replacer' import { CustomTagWithIdComponentReplacer } from '../../../components/markdown-renderer/replace-components/custom-tag-with-id-component-replacer' import { replaceLegacyYoutubeShortCodeMarkdownItPlugin } from './replace-legacy-youtube-short-code' diff --git a/frontend/src/extensions/extra-integrations/all-app-extensions.ts b/frontend/src/extensions/extra-integrations/all-app-extensions.ts deleted file mode 100644 index 076dfbba2..000000000 --- a/frontend/src/extensions/extra-integrations/all-app-extensions.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) - * - * SPDX-License-Identifier: AGPL-3.0-only - */ -import { BasicMarkdownSyntaxAppExtension } from '../../components/markdown-renderer/extensions/basic-markdown-syntax/basic-markdown-syntax-app-extension' -import { BootstrapIconAppExtension } from '../../components/markdown-renderer/extensions/bootstrap-icons/bootstrap-icon-app-extension' -import { EmojiAppExtension } from '../../components/markdown-renderer/extensions/emoji/emoji-app-extension' -import { ExtractFirstHeadlineAppExtension } from '../../components/markdown-renderer/extensions/extract-first-headline/extract-first-headline-app-extension' -import { IframeCapsuleAppExtension } from '../../components/markdown-renderer/extensions/iframe-capsule/iframe-capsule-app-extension' -import { ImagePlaceholderAppExtension } from '../../components/markdown-renderer/extensions/image-placeholder/image-placeholder-app-extension' -import { TableOfContentsAppExtension } from '../../components/markdown-renderer/extensions/table-of-contents/table-of-contents-app-extension' -import type { AppExtension } from '../base/app-extension' -import { AbcjsAppExtension } from './abcjs/abcjs-app-extension' -import { AlertAppExtension } from './alert/alert-app-extension' -import { AsciinemaAppExtension } from './asciinema/asciinema-app-extension' -import { BlockquoteAppExtension } from './blockquote/blockquote-app-extension' -import { CsvTableAppExtension } from './csv/csv-table-app-extension' -import { FlowchartAppExtension } from './flowchart/flowchart-app-extension' -import { ForkAwesomeHtmlTagAppExtension } from './fork-awesome-html-tag/fork-awesome-html-tag-app-extension' -import { GistAppExtension } from './gist/gist-app-extension' -import { GraphvizAppExtension } from './graphviz/graphviz-app-extension' -import { HighlightedCodeFenceAppExtension } from './highlighted-code-fence/highlighted-code-fence-app-extension' -import { KatexAppExtension } from './katex/katex-app-extension' -import { LegacyShortcodesAppExtension } from './legacy-short-codes/legacy-shortcodes-app-extension' -import { MermaidAppExtension } from './mermaid/mermaid-app-extension' -import { PlantumlAppExtension } from './plantuml/plantuml-app-extension' -import { LegacySequenceDiagramAppExtension } from './sequence-diagram/legacy-sequence-diagram-app-extension' -import { SpoilerAppExtension } from './spoiler/spoiler-app-extension' -import { TaskListCheckboxAppExtension } from './task-list/task-list-checkbox-app-extension' -import { VegaLiteAppExtension } from './vega-lite/vega-lite-app-extension' -import { VimeoAppExtension } from './vimeo/vimeo-app-extension' -import { YoutubeAppExtension } from './youtube/youtube-app-extension' - -const thirdPartyIntegrationAppExtensions: AppExtension[] = [ - new AbcjsAppExtension(), - new FlowchartAppExtension(), - new GistAppExtension(), - new GraphvizAppExtension(), - new KatexAppExtension(), - new AsciinemaAppExtension(), - new MermaidAppExtension(), - new PlantumlAppExtension(), - new VegaLiteAppExtension(), - new VimeoAppExtension(), - new YoutubeAppExtension() -] - -/** - * This array defines additional app extensions that are used in the editor, read only page and slideshow. - */ -export const allAppExtensions: AppExtension[] = [ - ...thirdPartyIntegrationAppExtensions, - new AlertAppExtension(), - new BlockquoteAppExtension(), - new CsvTableAppExtension(), - new LegacyShortcodesAppExtension(), - new LegacySequenceDiagramAppExtension(), - new SpoilerAppExtension(), - new TaskListCheckboxAppExtension(), - new HighlightedCodeFenceAppExtension(), - new ForkAwesomeHtmlTagAppExtension(), - new BootstrapIconAppExtension(), - new EmojiAppExtension(), - new TableOfContentsAppExtension(), - new ImagePlaceholderAppExtension(), - new IframeCapsuleAppExtension(), - new BasicMarkdownSyntaxAppExtension(), - new ExtractFirstHeadlineAppExtension() -]