From 849953829d13e4e2fc4003fe34e228c7d5e81c33 Mon Sep 17 00:00:00 2001 From: d3m1d0v Date: Thu, 17 Oct 2024 18:19:21 +0300 Subject: [PATCH] refactor(extensions)!: move YfmHtmlBlock extension from yfm to additional folder --- demo/Playground.tsx | 4 ++-- .../{yfm => additional}/YfmHtmlBlock/YfmHtmlBlock.test.ts | 2 +- .../YfmHtmlBlock/YfmHtmlBlockNodeView/NodeView.tsx | 0 .../YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlock.scss | 0 .../YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlockView.tsx | 0 .../YfmHtmlBlock/YfmHtmlBlockNodeView/index.ts | 0 .../YfmHtmlBlock/YfmHtmlBlockSpecs/const.ts | 0 .../YfmHtmlBlock/YfmHtmlBlockSpecs/index.tsx | 0 src/extensions/{yfm => additional}/YfmHtmlBlock/actions.ts | 0 src/extensions/{yfm => additional}/YfmHtmlBlock/const.ts | 0 src/extensions/{yfm => additional}/YfmHtmlBlock/index.ts | 0 src/extensions/{yfm => additional}/YfmHtmlBlock/utils.test.ts | 0 src/extensions/{yfm => additional}/YfmHtmlBlock/utils.ts | 0 13 files changed, 3 insertions(+), 3 deletions(-) rename src/extensions/{yfm => additional}/YfmHtmlBlock/YfmHtmlBlock.test.ts (93%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/YfmHtmlBlockNodeView/NodeView.tsx (100%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlock.scss (100%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlockView.tsx (100%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/YfmHtmlBlockNodeView/index.ts (100%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/YfmHtmlBlockSpecs/const.ts (100%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/YfmHtmlBlockSpecs/index.tsx (100%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/actions.ts (100%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/const.ts (100%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/index.ts (100%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/utils.test.ts (100%) rename src/extensions/{yfm => additional}/YfmHtmlBlock/utils.ts (100%) diff --git a/demo/Playground.tsx b/demo/Playground.tsx index c2240c6f..6f0140f8 100644 --- a/demo/Playground.tsx +++ b/demo/Playground.tsx @@ -24,8 +24,8 @@ import {Extension} from '../src/cm/state'; import {FoldingHeading} from '../src/extensions/additional/FoldingHeading'; import {Math} from '../src/extensions/additional/Math'; import {Mermaid} from '../src/extensions/additional/Mermaid'; -import {YfmHtmlBlock} from '../src/extensions/yfm/YfmHtmlBlock'; -import {getSanitizeYfmHtmlBlock} from '../src/extensions/yfm/YfmHtmlBlock/utils'; +import {YfmHtmlBlock} from '../src/extensions/additional/YfmHtmlBlock'; +import {getSanitizeYfmHtmlBlock} from '../src/extensions/additional/YfmHtmlBlock/utils'; import {cloneDeep} from '../src/lodash'; import {CodeEditor} from '../src/markup/editor'; import type {FileUploadHandler} from '../src/utils/upload'; diff --git a/src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlock.test.ts b/src/extensions/additional/YfmHtmlBlock/YfmHtmlBlock.test.ts similarity index 93% rename from src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlock.test.ts rename to src/extensions/additional/YfmHtmlBlock/YfmHtmlBlock.test.ts index 1de493be..ca1d589e 100644 --- a/src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlock.test.ts +++ b/src/extensions/additional/YfmHtmlBlock/YfmHtmlBlock.test.ts @@ -2,7 +2,7 @@ import {builders} from 'prosemirror-test-builder'; import {createMarkupChecker} from '../../../../tests/sameMarkup'; import {ExtensionsManager} from '../../../core'; -import {BaseNode, BaseSchemaSpecs} from '../../../extensions/specs'; +import {BaseNode, BaseSchemaSpecs} from '../../specs'; import {YfmHtmlBlockSpecs} from './YfmHtmlBlockSpecs'; import {YfmHtmlBlockAttrs, yfmHtmlBlockNodeName} from './const'; diff --git a/src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/NodeView.tsx b/src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockNodeView/NodeView.tsx similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/NodeView.tsx rename to src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockNodeView/NodeView.tsx diff --git a/src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlock.scss b/src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlock.scss similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlock.scss rename to src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlock.scss diff --git a/src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlockView.tsx b/src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlockView.tsx similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlockView.tsx rename to src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlockView.tsx diff --git a/src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/index.ts b/src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockNodeView/index.ts similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/index.ts rename to src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockNodeView/index.ts diff --git a/src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockSpecs/const.ts b/src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockSpecs/const.ts similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockSpecs/const.ts rename to src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockSpecs/const.ts diff --git a/src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockSpecs/index.tsx b/src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockSpecs/index.tsx similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockSpecs/index.tsx rename to src/extensions/additional/YfmHtmlBlock/YfmHtmlBlockSpecs/index.tsx diff --git a/src/extensions/yfm/YfmHtmlBlock/actions.ts b/src/extensions/additional/YfmHtmlBlock/actions.ts similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/actions.ts rename to src/extensions/additional/YfmHtmlBlock/actions.ts diff --git a/src/extensions/yfm/YfmHtmlBlock/const.ts b/src/extensions/additional/YfmHtmlBlock/const.ts similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/const.ts rename to src/extensions/additional/YfmHtmlBlock/const.ts diff --git a/src/extensions/yfm/YfmHtmlBlock/index.ts b/src/extensions/additional/YfmHtmlBlock/index.ts similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/index.ts rename to src/extensions/additional/YfmHtmlBlock/index.ts diff --git a/src/extensions/yfm/YfmHtmlBlock/utils.test.ts b/src/extensions/additional/YfmHtmlBlock/utils.test.ts similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/utils.test.ts rename to src/extensions/additional/YfmHtmlBlock/utils.test.ts diff --git a/src/extensions/yfm/YfmHtmlBlock/utils.ts b/src/extensions/additional/YfmHtmlBlock/utils.ts similarity index 100% rename from src/extensions/yfm/YfmHtmlBlock/utils.ts rename to src/extensions/additional/YfmHtmlBlock/utils.ts