Skip to content

Commit 94ae80f

Browse files
committed
Remove 'slate-react' imports from the main codebase
1 parent 124bc5c commit 94ae80f

File tree

18 files changed

+18
-18
lines changed

18 files changed

+18
-18
lines changed

packages/slate-commons/src/types/RenderElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RenderElementProps } from 'slate-react';
1+
import { type RenderElementProps } from '@udecode/plate';
22

33
/**
44
* To customize the rendering of each element components.

packages/slate-commons/src/types/RenderLeaf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RenderLeafProps } from 'slate-react';
1+
import { type RenderLeafProps } from '@udecode/plate';
22

33
/**
44
* To customize the rendering of each leaf.

packages/slate-editor/src/extensions/button-block/ButtonBlockExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createDeserializeElement, type Extension } from '@prezly/slate-commons';
2+
import { type RenderElementProps } from '@udecode/plate';
23
import React from 'react';
3-
import type { RenderElementProps } from 'slate-react';
44

55
import type { InfoText } from '#components';
66

packages/slate-editor/src/extensions/divider/DividerExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Extension } from '@prezly/slate-commons';
22
import { createDeserializeElement } from '@prezly/slate-commons';
33
import { DIVIDER_NODE_TYPE, isDividerNode } from '@prezly/slate-types';
4+
import { type RenderElementProps } from '@udecode/plate';
45
import React from 'react';
5-
import type { RenderElementProps } from 'slate-react';
66

77
import { composeElementDeserializer } from '#modules/html-deserialization';
88

packages/slate-editor/src/extensions/divider/components/DividerElement.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { DividerNode } from '@prezly/slate-types';
2+
import { type RenderElementProps } from '@udecode/plate';
23
import type { PropsWithChildren } from 'react';
34
import React from 'react';
4-
import type { RenderElementProps } from 'slate-react';
55

66
import { EditorBlock } from '#components';
77

packages/slate-editor/src/extensions/embed/EmbedExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { OEmbedInfo } from '@prezly/sdk';
22
import type { Extension } from '@prezly/slate-commons';
33
import { createDeserializeElement } from '@prezly/slate-commons';
4+
import { type RenderElementProps } from '@udecode/plate';
45
import React from 'react';
5-
import type { RenderElementProps } from 'slate-react';
66

77
import type { InfoText } from '#components';
88

packages/slate-editor/src/extensions/html/HtmlExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Extension } from '@prezly/slate-commons';
22
import { createDeserializeElement } from '@prezly/slate-commons';
33
import { HTML_NODE_TYPE, isHtmlNode } from '@prezly/slate-types';
4+
import { type RenderElementProps } from '@udecode/plate';
45
import React from 'react';
5-
import type { RenderElementProps } from 'slate-react';
66

77
import { composeElementDeserializer } from '#modules/html-deserialization';
88

packages/slate-editor/src/extensions/html/components/HtmlElement.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { HtmlNode } from '@prezly/slate-types';
2+
import { type RenderElementProps } from '@udecode/plate';
23
import type { PropsWithChildren } from 'react';
34
import React from 'react';
4-
import type { RenderElementProps } from 'slate-react';
55

66
import { EditorBlock } from '#components';
77

packages/slate-editor/src/extensions/inline-links/InlineLinksExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { createDeserializeElement } from '@prezly/slate-commons';
33
import type { LinkNode } from '@prezly/slate-types';
44
import { isLinkNode, LINK_NODE_TYPE } from '@prezly/slate-types';
55
import { flow } from '@technically/lodash';
6+
import { type RenderElementProps } from '@udecode/plate';
67
import React from 'react';
7-
import type { RenderElementProps } from 'slate-react';
88

99
import { composeElementDeserializer } from '#modules/html-deserialization';
1010

packages/slate-editor/src/extensions/paragraphs/ParagraphsExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { Extension } from '@prezly/slate-commons';
22
import { createDeserializeElement } from '@prezly/slate-commons';
33
import type { Alignment } from '@prezly/slate-types';
44
import { PARAGRAPH_NODE_TYPE, isParagraphNode } from '@prezly/slate-types';
5+
import { type RenderElementProps } from '@udecode/plate';
56
import React from 'react';
6-
import type { RenderElementProps } from 'slate-react';
77

88
import { composeElementDeserializer } from '#modules/html-deserialization';
99

packages/slate-editor/src/extensions/paragraphs/components/ParagraphElement.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Alignment } from '@prezly/slate-types';
22
import { type ParagraphNode } from '@prezly/slate-types';
3+
import { type RenderElementProps } from '@udecode/plate';
34
import classNames from 'classnames';
45
import type { HTMLAttributes } from 'react';
56
import React from 'react';
6-
import type { RenderElementProps } from 'slate-react';
77

88
import styles from './ParagraphElement.module.scss';
99

packages/slate-editor/src/extensions/story-bookmark/StoryBookmarkExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Extension } from '@prezly/slate-commons';
22
import { createDeserializeElement } from '@prezly/slate-commons';
33
import { STORY_BOOKMARK_NODE_TYPE, isStoryBookmarkNode } from '@prezly/slate-types';
4+
import { type RenderElementProps } from '@udecode/plate';
45
import React from 'react';
5-
import type { RenderElementProps } from 'slate-react';
66

77
import { composeElementDeserializer } from '#modules/html-deserialization';
88

packages/slate-editor/src/extensions/story-embed/StoryEmbedExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Extension } from '@prezly/slate-commons';
22
import { createDeserializeElement } from '@prezly/slate-commons';
33
import { STORY_EMBED_NODE_TYPE, isStoryEmbedNode } from '@prezly/slate-types';
4+
import { type RenderElementProps } from '@udecode/plate';
45
import React from 'react';
5-
import type { RenderElementProps } from 'slate-react';
66

77
import { composeElementDeserializer } from '#modules/html-deserialization';
88

packages/slate-editor/src/extensions/text-styling/components/Text.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { type RenderLeafProps } from '@udecode/plate';
12
import React from 'react';
2-
import type { RenderLeafProps } from 'slate-react';
33

44
import { MarkType } from '../types';
55

packages/slate-editor/src/extensions/user-mentions/UserMentionsExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Extension } from '@prezly/slate-commons';
22
import { isMentionNode, MENTION_NODE_TYPE } from '@prezly/slate-types';
3+
import { type RenderElementProps } from '@udecode/plate';
34
import React from 'react';
4-
import type { RenderElementProps } from 'slate-react';
55

66
import { MentionElement, MentionsExtension } from '#extensions/mentions';
77

packages/slate-editor/src/extensions/variables/VariablesExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Extension } from '@prezly/slate-commons';
22
import { isVariableNode, VARIABLE_NODE_TYPE } from '@prezly/slate-types';
3+
import { type RenderElementProps } from '@udecode/plate';
34
import React from 'react';
4-
import type { RenderElementProps } from 'slate-react';
55

66
import { MentionsExtension } from '#extensions/mentions';
77

packages/slate-editor/src/extensions/web-bookmark/WebBookmarkExtension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Extension } from '@prezly/slate-commons';
22
import { createDeserializeElement } from '@prezly/slate-commons';
33
import { BookmarkNode } from '@prezly/slate-types';
4+
import { type RenderElementProps } from '@udecode/plate';
45
import React from 'react';
5-
import type { RenderElementProps } from 'slate-react';
66

77
import { composeElementDeserializer } from '#modules/html-deserialization';
88

packages/slate-editor/src/modules/editable/lib/combineRenderLeaf.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Extension, RenderLeaf } from '@prezly/slate-commons';
2+
import { type RenderLeafProps } from '@udecode/plate';
23
import React from 'react';
3-
import type { RenderLeafProps } from 'slate-react';
44

55
export function combineRenderLeaf(extensions: Extension[], renderLeafList: RenderLeaf[]) {
66
return function RenderLeaf({ attributes, children, leaf, text }: RenderLeafProps) {

0 commit comments

Comments
 (0)