From aca891dad134b58ab295aacc2e17ba77106e0f7b Mon Sep 17 00:00:00 2001 From: Felix Feng Date: Mon, 2 Dec 2024 21:33:47 +0800 Subject: [PATCH] draft --- .../default/example/playground-demo.tsx | 93 +++++++--- .../default/plate-ui/heading-element.tsx | 17 ++ .../default/plate-ui/paragraph-element.tsx | 24 ++- .../core/src/react/components/PlateView.tsx | 121 ++++++++++++ packages/core/src/react/components/index.ts | 1 + .../src/react/stores/element/useElement.ts | 18 +- .../src/react/utils/pluginRenderElement.tsx | 54 +++--- .../core/src/react/utils/pluginRenderLeaf.tsx | 16 +- yarn.lock | 174 +++++++++--------- 9 files changed, 365 insertions(+), 153 deletions(-) create mode 100644 packages/core/src/react/components/PlateView.tsx diff --git a/apps/www/src/registry/default/example/playground-demo.tsx b/apps/www/src/registry/default/example/playground-demo.tsx index af3a9d45ae..ddf564426d 100644 --- a/apps/www/src/registry/default/example/playground-demo.tsx +++ b/apps/www/src/registry/default/example/playground-demo.tsx @@ -25,7 +25,13 @@ import { import { CaptionPlugin } from '@udecode/plate-caption/react'; import { CodeBlockPlugin } from '@udecode/plate-code-block/react'; import { CommentsPlugin } from '@udecode/plate-comments/react'; -import { ParagraphPlugin, Plate } from '@udecode/plate-common/react'; +import { + ParagraphPlugin, + Plate, + PlateLeaf, + PlateView, + usePlateEditor, +} from '@udecode/plate-common/react'; import { DndPlugin } from '@udecode/plate-dnd'; import { DocxPlugin } from '@udecode/plate-docx'; import { EmojiPlugin } from '@udecode/plate-emoji/react'; @@ -35,10 +41,10 @@ import { FontColorPlugin, FontSizePlugin, } from '@udecode/plate-font/react'; -import { HEADING_KEYS } from '@udecode/plate-heading'; import { HeadingPlugin } from '@udecode/plate-heading/react'; import { HighlightPlugin } from '@udecode/plate-highlight/react'; import { HorizontalRulePlugin } from '@udecode/plate-horizontal-rule/react'; +import { serializeHtml } from '@udecode/plate-html/react'; import { IndentPlugin } from '@udecode/plate-indent/react'; import { IndentListPlugin } from '@udecode/plate-indent-list/react'; import { JuicePlugin } from '@udecode/plate-juice'; @@ -52,7 +58,6 @@ import { ImagePlugin, MediaEmbedPlugin } from '@udecode/plate-media/react'; import { MentionPlugin } from '@udecode/plate-mention/react'; import { NodeIdPlugin } from '@udecode/plate-node-id'; import { NormalizeTypesPlugin } from '@udecode/plate-normalizers'; -import { PlaywrightPlugin } from '@udecode/plate-playwright'; import { ResetNodePlugin } from '@udecode/plate-reset-node/react'; import { DeletePlugin, SelectOnBackspacePlugin } from '@udecode/plate-select'; import { @@ -65,8 +70,6 @@ import { TogglePlugin } from '@udecode/plate-toggle/react'; import { TrailingBlockPlugin } from '@udecode/plate-trailing-block'; import { settingsStore } from '@/components/context/settings-store'; -import { copilotPlugins } from '@/registry/default/components/editor/plugins/copilot-plugins'; -import { editorPlugins } from '@/registry/default/components/editor/plugins/editor-plugins'; import { useCreateEditor } from '@/registry/default/components/editor/use-create-editor'; import { aiValue } from '@/registry/default/example/values/ai-value'; import { alignValue } from '@/registry/default/example/values/align-value'; @@ -110,6 +113,22 @@ import { tocPlaygroundValue } from '@/registry/default/example/values/toc-value' import { toggleValue } from '@/registry/default/example/values/toggle-value'; import { Editor, EditorContainer } from '@/registry/default/plate-ui/editor'; +import { basicNodesPlugins } from '../components/editor/plugins/basic-nodes-plugins'; +import { Button } from '../plate-ui/button'; +import { basicNodesValue } from './values/basic-nodes-value'; +import { withProps } from '@udecode/cn'; +import { + HeadingElement, + HeadingElementView, +} from '../plate-ui/heading-element'; +import { HEADING_KEYS } from '@udecode/plate-heading'; +import { + ParagraphElement, + ParagraphElementView, + PlateViewLeaf, +} from '../plate-ui/paragraph-element'; + + export default function PlaygroundDemo({ className }: { className?: string }) { const value = usePlaygroundValue(); const enabled = usePlaygroundEnabled(); @@ -118,31 +137,61 @@ export default function PlaygroundDemo({ className }: { className?: string }) { { override: { enabled }, plugins: [ - ...copilotPlugins, - ...editorPlugins, + // HtmlPlugin, + ...basicNodesPlugins, + // ...copilotPlugins, + // ...editorPlugins, - NormalizeTypesPlugin.configure({ - options: { - rules: [{ path: [0], strictType: HEADING_KEYS.h1 }], - }, - }), + // NormalizeTypesPlugin.configure({ + // options: { + // rules: [{ path: [0], strictType: HEADING_KEYS.h1 }], + // }, + // }), - // Testing - PlaywrightPlugin.configure({ - enabled: process.env.NODE_ENV !== 'production', - }), + // // Testing + // PlaywrightPlugin.configure({ + // enabled: process.env.NODE_ENV !== 'production', + // }), ], - value: value, + value: basicNodesValue, }, [] ); + const editorView = usePlateEditor({ + override: { + components: { + // [HEADING_KEYS.h1]: withProps(HeadingElementView, { variant: 'h1' }), + [ParagraphPlugin.key]: ParagraphElementView, + [BoldPlugin.key]: withProps(PlateViewLeaf, { as: 'strong' }), + }, + }, + plugins: [ParagraphPlugin, BoldPlugin], + value: [ + { + type: 'p', + children: [{ text: 'Playground' }, { bold: true, text: 'paragraph' }], + }, + ], + }); + return ( - - - - - + <> + {/* + + + + + */} + + + ); } diff --git a/apps/www/src/registry/default/plate-ui/heading-element.tsx b/apps/www/src/registry/default/plate-ui/heading-element.tsx index 9386d1df2d..9a188d410a 100644 --- a/apps/www/src/registry/default/plate-ui/heading-element.tsx +++ b/apps/www/src/registry/default/plate-ui/heading-element.tsx @@ -38,3 +38,20 @@ export const HeadingElement = withRef( ); } ); + + +export const HeadingElementView = withRef( + ({ children, variant = 'h1', className, ...props }, ref) => { + console.log("🚀 ~ ({children,variant ~ props:", props) + const Tag = variant; + + return ( + + {children} + + ); + } +); diff --git a/apps/www/src/registry/default/plate-ui/paragraph-element.tsx b/apps/www/src/registry/default/plate-ui/paragraph-element.tsx index a9388efb0c..274a92a47e 100644 --- a/apps/www/src/registry/default/plate-ui/paragraph-element.tsx +++ b/apps/www/src/registry/default/plate-ui/paragraph-element.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { cn } from '@udecode/cn'; -import { withRef } from '@udecode/plate-common/react'; +import { PlateLeaf, withRef } from '@udecode/plate-common/react'; import { PlateElement } from './plate-element'; @@ -20,3 +20,25 @@ export const ParagraphElement = withRef( ); } ); + +export const ParagraphElementView = withRef( + ({ children, className, ...props }, ref) => { + return ( +
+ {children} +
+ ); + } +); + +export const PlateViewLeaf = withRef( + ({ children, className, as }, ref) => { + const Component = as ?? 'span'; + + return ( + + {children} + + ); + } +); diff --git a/packages/core/src/react/components/PlateView.tsx b/packages/core/src/react/components/PlateView.tsx new file mode 100644 index 0000000000..868334562c --- /dev/null +++ b/packages/core/src/react/components/PlateView.tsx @@ -0,0 +1,121 @@ +/* eslint-disable react/no-children-prop */ +import React from 'react'; + +import type { RenderElementFn, RenderLeafFn } from '@udecode/slate-react'; +import type { + EditableProps, + RenderElementProps, + RenderLeafProps, +} from 'slate-react/dist/components/editable'; + +import { isObject } from 'lodash'; +import { TDescendant, TElement, TText } from '@udecode/slate'; +import { pipeRenderElement, pipeRenderLeaf } from '../utils'; +import { PlateEditor } from '../editor'; + +export type ChildrenProps = { + children: TDescendant[]; +}; + +export type ElementProps = { + element: TElement; +}; + +export type LeafProps = { + leaf: TText; +}; + +export type PlateViewContextProps = { + editor: PlateEditor; + renderElement: RenderElementFn; + renderLeaf: RenderLeafFn; +}; + +export type PlateViewProps = { + renderElement?: EditableProps['renderElement']; + renderLeaf?: EditableProps['renderLeaf']; + editor: PlateEditor; +}; + +const PlateViewContext = React.createContext( + null +); + +export function usePlateView() { + return React.useContext(PlateViewContext) as PlateViewContextProps; +} + +function Element({ element = { children: [], type: '' } }: ElementProps) { + const { editor } = usePlateView(); + + const renderElement = pipeRenderElement(editor); + + return ( + + {renderElement?.({ + attributes: {} as any, + children: , + element, + })} + + ); +} + +function Leaf({ leaf = { text: '' } }: LeafProps) { + const { editor } = usePlateView(); + + const renderLeaf = pipeRenderLeaf(editor); + + return renderLeaf!({ + attributes: {} as any, + children: {leaf.text === '' ? '\uFEFF' : leaf.text}, + leaf, + text: leaf, + }); +} + +function PlateViewContent({ children = [] }: ChildrenProps) { + return ( + + {children.map((child, i) => { + return isElement(child) ? ( + + ) : ( + + ); + })} + + ); +} + +export function PlateView(props: PlateViewProps) { + const { + renderElement = (props) => , + renderLeaf = (props) => , + editor, + } = props; + + return ( + + + + ); +} + +function DefaultElement({ children }: RenderElementProps) { + return
{children}
; +} + +function DefaultLeaf({ children }: RenderLeafProps) { + return {children}; +} + +export function isText(value: any): value is Text { + return isObject(value) && 'text' in value && typeof value.text === 'string'; +} + +export function isElement(value: any): value is TElement { + return ( + isObject(value) && 'children' in value && Array.isArray(value.children) + ); +} diff --git a/packages/core/src/react/components/index.ts b/packages/core/src/react/components/index.ts index 1b9478c28e..e2a784b529 100644 --- a/packages/core/src/react/components/index.ts +++ b/packages/core/src/react/components/index.ts @@ -12,4 +12,5 @@ export * from './PlateContent'; export * from './PlateControllerEffect'; export * from './PlateSlate'; export * from './PlateTest'; +export * from './PlateView'; export * from './withHOC'; diff --git a/packages/core/src/react/stores/element/useElement.ts b/packages/core/src/react/stores/element/useElement.ts index 2b32967aad..856b1698b4 100644 --- a/packages/core/src/react/stores/element/useElement.ts +++ b/packages/core/src/react/stores/element/useElement.ts @@ -2,6 +2,7 @@ import type { TElement } from '@udecode/slate'; import { useEditorRef } from '../plate'; import { SCOPE_ELEMENT, useElementStore } from './useElementStore'; +import { usePlateView } from '../../components'; /** * Get the element by plugin key. If no element is found in the context, it will @@ -10,17 +11,18 @@ import { SCOPE_ELEMENT, useElementStore } from './useElementStore'; export const useElement = ( pluginKey = SCOPE_ELEMENT ): T => { - const editor = useEditorRef(); + // const editor = useEditorRef(); const value = useElementStore(pluginKey).get.element(); - if (!value) { - editor.api.debug.warn( - `useElement(${pluginKey}) hook must be used inside the node component's context`, - 'USE_ELEMENT_CONTEXT' - ); + // if (!value) { + // editor.api.debug.warn( + // `useElement(${pluginKey}) hook must be used inside the node component's context`, + // 'USE_ELEMENT_CONTEXT' + // ); - return {} as T; - } + // return {} as T; + // } return value as T; }; + diff --git a/packages/core/src/react/utils/pluginRenderElement.tsx b/packages/core/src/react/utils/pluginRenderElement.tsx index 40e510caef..65ad6133aa 100644 --- a/packages/core/src/react/utils/pluginRenderElement.tsx +++ b/packages/core/src/react/utils/pluginRenderElement.tsx @@ -28,45 +28,45 @@ function ElementContent({ nodeProps: PlateRenderElementProps; plugin: AnyEditorPlatePlugin; }) { - const element = useElement(); + // const element = useElement(); const { children: _children } = nodeProps; - const key = plugin.key; + // const key = plugin.key; const Element = plugin.render?.node ?? (DefaultElement as any); - const aboveNodes = editor.pluginList.flatMap( - (o) => o.render?.aboveNodes ?? [] - ); - const belowNodes = editor.pluginList.flatMap( - (o) => o.render?.belowNodes ?? [] - ); + // const aboveNodes = editor.pluginList.flatMap( + // (o) => o.render?.aboveNodes ?? [] + // ); + // const belowNodes = editor.pluginList.flatMap( + // (o) => o.render?.belowNodes ?? [] + // ); - nodeProps = getRenderNodeProps({ - attributes: element.attributes as any, - editor, - plugin, - props: nodeProps as any, - }) as any; + // nodeProps = getRenderNodeProps({ + // attributes: element.attributes as any, + // editor, + // plugin, + // props: nodeProps as any, + // }) as any; let children = _children; - belowNodes.forEach((withHOC) => { - const hoc = withHOC({ ...nodeProps, key } as any); + // belowNodes.forEach((withHOC) => { + // const hoc = withHOC({ ...nodeProps, key } as any); - if (hoc) { - children = hoc({ ...nodeProps, children } as any); - } - }); + // if (hoc) { + // children = hoc({ ...nodeProps, children } as any); + // } + // }); - let component: React.ReactNode = {children}; + let component: React.ReactNode = {children}; - aboveNodes.forEach((withHOC) => { - const hoc = withHOC({ ...nodeProps, key } as any); + // aboveNodes.forEach((withHOC) => { + // const hoc = withHOC({ ...nodeProps, key } as any); - if (hoc) { - component = hoc({ ...nodeProps, children: component } as any); - } - }); + // if (hoc) { + // component = hoc({ ...nodeProps, children: component } as any); + // } + // }); return component; } diff --git a/packages/core/src/react/utils/pluginRenderLeaf.tsx b/packages/core/src/react/utils/pluginRenderLeaf.tsx index 7b4fc7fde3..dc5d01b0ea 100644 --- a/packages/core/src/react/utils/pluginRenderLeaf.tsx +++ b/packages/core/src/react/utils/pluginRenderLeaf.tsx @@ -25,16 +25,16 @@ export const pluginRenderLeaf = ( const { children, leaf } = nodeProps; if (leaf[plugin.node.type ?? plugin.key]) { - const Leaf = node ?? DefaultLeaf; + const Leaf = node ?? 'span'; - const ctxProps = getRenderNodeProps({ - attributes: leaf.attributes as any, - editor, - plugin, - props: nodeProps as any, - }) as any; + // const ctxProps = getRenderNodeProps({ + // attributes: leaf.attributes as any, + // editor, + // plugin, + // props: nodeProps as any, + // }) as any; - return {children}; + return {children}; } return children; diff --git a/yarn.lock b/yarn.lock index e47c9970e7..b513c71a5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6370,7 +6370,7 @@ __metadata: version: 0.0.0-use.local resolution: "@udecode/cn@workspace:packages/cn" dependencies: - "@udecode/react-utils": "npm:39.0.0" + "@udecode/react-utils": "npm:40.2.8" peerDependencies: class-variance-authority: ">=0.7.0" react: ">=16.8.0" @@ -6385,7 +6385,7 @@ __metadata: dependencies: "@udecode/plate-combobox": "npm:40.0.0" "@udecode/plate-markdown": "npm:40.2.2" - "@udecode/plate-selection": "npm:40.1.0" + "@udecode/plate-selection": "npm:40.2.9" ai: "npm:^3.4.10" lodash: "npm:^4.17.21" peerDependencies: @@ -6406,7 +6406,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6424,7 +6424,7 @@ __metadata: "@udecode/plate-common": "workspace:^" lodash: "npm:^4.17.21" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6444,7 +6444,7 @@ __metadata: "@udecode/plate-common": "workspace:^" "@udecode/plate-heading": "npm:40.2.6" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6461,7 +6461,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6478,7 +6478,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6495,7 +6495,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6512,7 +6512,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6530,7 +6530,7 @@ __metadata: "@udecode/plate-common": "workspace:^" react-textarea-autosize: "npm:^8.5.3" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6550,7 +6550,7 @@ __metadata: delay: "npm:5.0.0" p-defer: "npm:^4.0.1" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6568,7 +6568,7 @@ __metadata: "@udecode/plate-common": "workspace:^" prismjs: "npm:^1.29.0" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6585,7 +6585,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6603,7 +6603,7 @@ __metadata: "@udecode/plate-common": "workspace:^" lodash: "npm:^4.17.21" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6614,17 +6614,17 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-common@npm:40.0.3, @udecode/plate-common@workspace:^, @udecode/plate-common@workspace:packages/common": +"@udecode/plate-common@npm:40.2.8, @udecode/plate-common@workspace:^, @udecode/plate-common@workspace:packages/common": version: 0.0.0-use.local resolution: "@udecode/plate-common@workspace:packages/common" dependencies: - "@udecode/plate-core": "npm:40.0.3" - "@udecode/plate-utils": "npm:40.0.3" + "@udecode/plate-core": "npm:40.2.8" + "@udecode/plate-utils": "npm:40.2.8" "@udecode/react-hotkeys": "npm:37.0.0" - "@udecode/react-utils": "npm:39.0.0" + "@udecode/react-utils": "npm:40.2.8" "@udecode/slate": "npm:39.2.1" - "@udecode/slate-react": "npm:40.0.0" - "@udecode/slate-utils": "npm:39.2.20" + "@udecode/slate-react": "npm:40.2.8" + "@udecode/slate-utils": "npm:40.2.7" "@udecode/utils": "npm:37.0.0" peerDependencies: react: ">=16.8.0" @@ -6637,15 +6637,15 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-core@npm:40.0.3, @udecode/plate-core@workspace:^, @udecode/plate-core@workspace:packages/core": +"@udecode/plate-core@npm:40.2.8, @udecode/plate-core@workspace:^, @udecode/plate-core@workspace:packages/core": version: 0.0.0-use.local resolution: "@udecode/plate-core@workspace:packages/core" dependencies: "@udecode/react-hotkeys": "npm:37.0.0" - "@udecode/react-utils": "npm:39.0.0" + "@udecode/react-utils": "npm:40.2.8" "@udecode/slate": "npm:39.2.1" - "@udecode/slate-react": "npm:40.0.0" - "@udecode/slate-utils": "npm:39.2.20" + "@udecode/slate-react": "npm:40.2.8" + "@udecode/slate-utils": "npm:40.2.7" "@udecode/utils": "npm:37.0.0" clsx: "npm:^2.1.1" is-hotkey: "npm:^0.2.0" @@ -6678,7 +6678,7 @@ __metadata: "@udecode/plate-table": "npm:40.0.0" papaparse: "npm:^5.4.1" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6695,7 +6695,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6712,7 +6712,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.94.0" @@ -6730,7 +6730,7 @@ __metadata: diff-match-patch-ts: "npm:^0.6.0" lodash: "npm:^4.17.21" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6749,7 +6749,7 @@ __metadata: lodash: "npm:^4.17.21" raf: "npm:^3.4.1" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dnd: ">=14.0.0" react-dnd-html5-backend: ">=14.0.0" @@ -6762,7 +6762,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-docx@npm:40.2.6, @udecode/plate-docx@workspace:^, @udecode/plate-docx@workspace:packages/docx": +"@udecode/plate-docx@npm:40.2.7, @udecode/plate-docx@workspace:^, @udecode/plate-docx@workspace:packages/docx": version: 0.0.0-use.local resolution: "@udecode/plate-docx@workspace:packages/docx" dependencies: @@ -6770,11 +6770,11 @@ __metadata: "@udecode/plate-heading": "npm:40.2.6" "@udecode/plate-indent": "npm:40.0.0" "@udecode/plate-indent-list": "npm:40.0.0" - "@udecode/plate-media": "npm:40.2.4" + "@udecode/plate-media": "npm:40.2.7" "@udecode/plate-table": "npm:40.0.0" validator: "npm:^13.12.0" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6793,7 +6793,7 @@ __metadata: "@udecode/plate-combobox": "npm:40.0.0" "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6811,7 +6811,7 @@ __metadata: "@excalidraw/excalidraw": "npm:0.16.4" "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6822,13 +6822,13 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-find-replace@npm:40.0.0, @udecode/plate-find-replace@workspace:^, @udecode/plate-find-replace@workspace:packages/find-replace": +"@udecode/plate-find-replace@npm:40.2.8, @udecode/plate-find-replace@workspace:^, @udecode/plate-find-replace@workspace:packages/find-replace": version: 0.0.0-use.local resolution: "@udecode/plate-find-replace@workspace:packages/find-replace" dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6847,7 +6847,7 @@ __metadata: "@floating-ui/react": "npm:^0.26.23" "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6865,7 +6865,7 @@ __metadata: "@udecode/plate-common": "workspace:^" lodash: "npm:^4.17.21" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6882,7 +6882,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6899,7 +6899,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6916,7 +6916,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6935,7 +6935,7 @@ __metadata: "@udecode/plate-common": "workspace:^" html-entities: "npm:^2.5.2" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6955,7 +6955,7 @@ __metadata: "@udecode/plate-list": "npm:40.0.0" clsx: "npm:^2.1.1" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6972,7 +6972,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -6990,7 +6990,7 @@ __metadata: "@udecode/plate-common": "workspace:^" juice: "npm:^8.1.0" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7007,7 +7007,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7024,7 +7024,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7041,7 +7041,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7060,7 +7060,7 @@ __metadata: "@udecode/plate-floating": "npm:40.0.0" "@udecode/plate-normalizers": "npm:40.0.0" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7079,7 +7079,7 @@ __metadata: "@udecode/plate-reset-node": "npm:40.0.0" lodash: "npm:^4.17.21" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7100,7 +7100,7 @@ __metadata: remark-parse: "npm:^11.0.0" unified: "npm:^11.0.5" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7119,7 +7119,7 @@ __metadata: "@udecode/plate-common": "workspace:^" katex: "npm:0.16.11" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7130,14 +7130,14 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-media@npm:40.2.4, @udecode/plate-media@workspace:^, @udecode/plate-media@workspace:packages/media": +"@udecode/plate-media@npm:40.2.7, @udecode/plate-media@workspace:^, @udecode/plate-media@workspace:packages/media": version: 0.0.0-use.local resolution: "@udecode/plate-media@workspace:packages/media" dependencies: "@udecode/plate-common": "workspace:^" js-video-url-parser: "npm:^0.5.1" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7155,7 +7155,7 @@ __metadata: "@udecode/plate-combobox": "npm:40.0.0" "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7173,7 +7173,7 @@ __metadata: "@udecode/plate-common": "workspace:^" lodash: "npm:^4.17.21" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7191,7 +7191,7 @@ __metadata: "@udecode/plate-common": "workspace:^" lodash: "npm:^4.17.21" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7209,7 +7209,7 @@ __metadata: "@udecode/plate-common": "workspace:^" peerDependencies: "@playwright/test": ">=1.42.1" - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7226,7 +7226,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7243,7 +7243,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7260,7 +7260,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7271,14 +7271,14 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-selection@npm:40.1.0, @udecode/plate-selection@workspace:^, @udecode/plate-selection@workspace:packages/selection": +"@udecode/plate-selection@npm:40.2.9, @udecode/plate-selection@workspace:^, @udecode/plate-selection@workspace:packages/selection": version: 0.0.0-use.local resolution: "@udecode/plate-selection@workspace:packages/selection" dependencies: "@udecode/plate-common": "workspace:^" copy-to-clipboard: "npm:^3.3.3" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7296,7 +7296,7 @@ __metadata: "@udecode/plate-combobox": "npm:40.0.0" "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7307,7 +7307,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-suggestion@npm:40.0.0, @udecode/plate-suggestion@workspace:^, @udecode/plate-suggestion@workspace:packages/suggestion": +"@udecode/plate-suggestion@npm:40.2.8, @udecode/plate-suggestion@workspace:^, @udecode/plate-suggestion@workspace:packages/suggestion": version: 0.0.0-use.local resolution: "@udecode/plate-suggestion@workspace:packages/suggestion" dependencies: @@ -7315,7 +7315,7 @@ __metadata: "@udecode/plate-diff": "npm:40.0.0" lodash: "npm:^4.17.21" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7333,7 +7333,7 @@ __metadata: "@udecode/plate-common": "workspace:^" tabbable: "npm:^6.2.0" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7352,7 +7352,7 @@ __metadata: "@udecode/plate-resizable": "npm:40.0.0" lodash: "npm:^4.17.21" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7368,7 +7368,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7397,7 +7397,7 @@ __metadata: "@udecode/plate-node-id": "npm:40.0.0" lodash: "npm:^4.17.21" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7414,7 +7414,7 @@ __metadata: dependencies: "@udecode/plate-common": "workspace:^" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7425,15 +7425,15 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-utils@npm:40.0.3, @udecode/plate-utils@workspace:^, @udecode/plate-utils@workspace:packages/plate-utils": +"@udecode/plate-utils@npm:40.2.8, @udecode/plate-utils@workspace:^, @udecode/plate-utils@workspace:packages/plate-utils": version: 0.0.0-use.local resolution: "@udecode/plate-utils@workspace:packages/plate-utils" dependencies: - "@udecode/plate-core": "npm:40.0.3" - "@udecode/react-utils": "npm:39.0.0" + "@udecode/plate-core": "npm:40.2.8" + "@udecode/react-utils": "npm:40.2.8" "@udecode/slate": "npm:39.2.1" - "@udecode/slate-react": "npm:40.0.0" - "@udecode/slate-utils": "npm:39.2.20" + "@udecode/slate-react": "npm:40.2.8" + "@udecode/slate-utils": "npm:40.2.7" "@udecode/utils": "npm:37.0.0" clsx: "npm:^2.1.1" lodash: "npm:^4.17.21" @@ -7456,7 +7456,7 @@ __metadata: "@udecode/plate-common": "workspace:^" yjs: "npm:^13.6.19" peerDependencies: - "@udecode/plate-common": ">=40.0.3" + "@udecode/plate-common": ">=40.2.8" react: ">=16.8.0" react-dom: ">=16.8.0" slate: ">=0.103.0" @@ -7480,11 +7480,11 @@ __metadata: "@udecode/plate-code-block": "npm:40.0.0" "@udecode/plate-combobox": "npm:40.0.0" "@udecode/plate-comments": "npm:40.0.0" - "@udecode/plate-common": "npm:40.0.3" + "@udecode/plate-common": "npm:40.2.8" "@udecode/plate-csv": "npm:40.0.0" "@udecode/plate-diff": "npm:40.0.0" - "@udecode/plate-docx": "npm:40.2.6" - "@udecode/plate-find-replace": "npm:40.0.0" + "@udecode/plate-docx": "npm:40.2.7" + "@udecode/plate-find-replace": "npm:40.2.8" "@udecode/plate-floating": "npm:40.0.0" "@udecode/plate-font": "npm:40.0.0" "@udecode/plate-heading": "npm:40.2.6" @@ -7499,16 +7499,16 @@ __metadata: "@udecode/plate-link": "npm:40.0.0" "@udecode/plate-list": "npm:40.0.0" "@udecode/plate-markdown": "npm:40.2.2" - "@udecode/plate-media": "npm:40.2.4" + "@udecode/plate-media": "npm:40.2.7" "@udecode/plate-mention": "npm:40.0.0" "@udecode/plate-node-id": "npm:40.0.0" "@udecode/plate-normalizers": "npm:40.0.0" "@udecode/plate-reset-node": "npm:40.0.0" "@udecode/plate-resizable": "npm:40.0.0" "@udecode/plate-select": "npm:40.0.0" - "@udecode/plate-selection": "npm:40.1.0" + "@udecode/plate-selection": "npm:40.2.9" "@udecode/plate-slash-command": "npm:40.0.0" - "@udecode/plate-suggestion": "npm:40.0.0" + "@udecode/plate-suggestion": "npm:40.2.8" "@udecode/plate-tabbable": "npm:40.0.0" "@udecode/plate-table": "npm:40.0.0" "@udecode/plate-toggle": "npm:40.0.0" @@ -7533,7 +7533,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/react-utils@npm:39.0.0, @udecode/react-utils@workspace:^, @udecode/react-utils@workspace:packages/react-utils": +"@udecode/react-utils@npm:40.2.8, @udecode/react-utils@workspace:^, @udecode/react-utils@workspace:packages/react-utils": version: 0.0.0-use.local resolution: "@udecode/react-utils@workspace:packages/react-utils" dependencies: @@ -7546,11 +7546,11 @@ __metadata: languageName: unknown linkType: soft -"@udecode/slate-react@npm:40.0.0, @udecode/slate-react@workspace:^, @udecode/slate-react@workspace:packages/slate-react": +"@udecode/slate-react@npm:40.2.8, @udecode/slate-react@workspace:^, @udecode/slate-react@workspace:packages/slate-react": version: 0.0.0-use.local resolution: "@udecode/slate-react@workspace:packages/slate-react" dependencies: - "@udecode/react-utils": "npm:39.0.0" + "@udecode/react-utils": "npm:40.2.8" "@udecode/slate": "npm:39.2.1" "@udecode/utils": "npm:37.0.0" peerDependencies: @@ -7562,7 +7562,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/slate-utils@npm:39.2.20, @udecode/slate-utils@workspace:^, @udecode/slate-utils@workspace:packages/slate-utils": +"@udecode/slate-utils@npm:40.2.7, @udecode/slate-utils@workspace:^, @udecode/slate-utils@workspace:packages/slate-utils": version: 0.0.0-use.local resolution: "@udecode/slate-utils@workspace:packages/slate-utils" dependencies: