Skip to content

Commit

Permalink
Remove 'slate-react' imports from the main codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
kudlajz committed Jan 16, 2025
1 parent 124bc5c commit 94ae80f
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/slate-commons/src/types/RenderElement.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RenderElementProps } from 'slate-react';
import { type RenderElementProps } from '@udecode/plate';

/**
* To customize the rendering of each element components.
Expand Down
2 changes: 1 addition & 1 deletion packages/slate-commons/src/types/RenderLeaf.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RenderLeafProps } from 'slate-react';
import { type RenderLeafProps } from '@udecode/plate';

/**
* To customize the rendering of each leaf.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createDeserializeElement, type Extension } from '@prezly/slate-commons';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

import type { InfoText } from '#components';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Extension } from '@prezly/slate-commons';
import { createDeserializeElement } from '@prezly/slate-commons';
import { DIVIDER_NODE_TYPE, isDividerNode } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { DividerNode } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import type { PropsWithChildren } from 'react';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

import { EditorBlock } from '#components';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { OEmbedInfo } from '@prezly/sdk';
import type { Extension } from '@prezly/slate-commons';
import { createDeserializeElement } from '@prezly/slate-commons';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

import type { InfoText } from '#components';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Extension } from '@prezly/slate-commons';
import { createDeserializeElement } from '@prezly/slate-commons';
import { HTML_NODE_TYPE, isHtmlNode } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { HtmlNode } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import type { PropsWithChildren } from 'react';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

import { EditorBlock } from '#components';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { createDeserializeElement } from '@prezly/slate-commons';
import type { LinkNode } from '@prezly/slate-types';
import { isLinkNode, LINK_NODE_TYPE } from '@prezly/slate-types';
import { flow } from '@technically/lodash';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { Extension } from '@prezly/slate-commons';
import { createDeserializeElement } from '@prezly/slate-commons';
import type { Alignment } from '@prezly/slate-types';
import { PARAGRAPH_NODE_TYPE, isParagraphNode } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Alignment } from '@prezly/slate-types';
import { type ParagraphNode } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import classNames from 'classnames';
import type { HTMLAttributes } from 'react';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Extension } from '@prezly/slate-commons';
import { createDeserializeElement } from '@prezly/slate-commons';
import { STORY_BOOKMARK_NODE_TYPE, isStoryBookmarkNode } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Extension } from '@prezly/slate-commons';
import { createDeserializeElement } from '@prezly/slate-commons';
import { STORY_EMBED_NODE_TYPE, isStoryEmbedNode } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type RenderLeafProps } from '@udecode/plate';
import React from 'react';
import type { RenderLeafProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Extension } from '@prezly/slate-commons';
import { isMentionNode, MENTION_NODE_TYPE } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Extension } from '@prezly/slate-commons';
import { isVariableNode, VARIABLE_NODE_TYPE } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Extension } from '@prezly/slate-commons';
import { createDeserializeElement } from '@prezly/slate-commons';
import { BookmarkNode } from '@prezly/slate-types';
import { type RenderElementProps } from '@udecode/plate';
import React from 'react';
import type { RenderElementProps } from 'slate-react';

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Extension, RenderLeaf } from '@prezly/slate-commons';
import { type RenderLeafProps } from '@udecode/plate';
import React from 'react';
import type { RenderLeafProps } from 'slate-react';

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

0 comments on commit 94ae80f

Please sign in to comment.