diff --git a/.changeset/few-coins-drum.md b/.changeset/few-coins-drum.md new file mode 100644 index 0000000000..197f015c68 --- /dev/null +++ b/.changeset/few-coins-drum.md @@ -0,0 +1,5 @@ +--- +'@udecode/plate-excalidraw': patch +--- + +Fix useExcalidrawElement typo diff --git a/apps/www/content/docs/alignment.mdx b/apps/www/content/docs/alignment.mdx index 7a8741cdd2..a36c92c9f4 100644 --- a/apps/www/content/docs/alignment.mdx +++ b/apps/www/content/docs/alignment.mdx @@ -54,6 +54,66 @@ const plugins = [ ### setAlign +Sets the alignment for the specified block elements in the editor. + + + +The editor instance. + + + + +The plugin key. + +- **Default:** `KEY_ALIGN` + + + +The alignment value. + + + + + + + + ## API Components +### useAlignDropdownMenuState + + + + The alignment value. + + + ### useAlignDropdownMenu + + + + The alignment value. + + + + + + Props for the radio group. + + + The alignment value. + + + Callback to set the alignment value. + + + + diff --git a/apps/www/content/docs/api/core.mdx b/apps/www/content/docs/api/core.mdx index 8db7856f14..f59b75e106 100644 --- a/apps/www/content/docs/api/core.mdx +++ b/apps/www/content/docs/api/core.mdx @@ -363,7 +363,7 @@ Get an editor reference which is never updated. - The id of the plate editor. Useful only when nesting editors. + The ID of the plate editor. Useful only when nesting editors. @@ -382,7 +382,7 @@ Get the Slate editor reference. Re-renders on editor change. - The id of the plate editor. + The ID of the plate editor. @@ -397,7 +397,7 @@ Get the editor's `readOnly` state. - The id of the plate editor. + The ID of the plate editor. @@ -412,7 +412,7 @@ Get the editor's selection which is updated on each editor change. - The id of the plate editor. + The ID of the plate editor. The current selection in the editor. diff --git a/apps/www/content/docs/api/core/plate.mdx b/apps/www/content/docs/api/core/plate.mdx index acc3da4b6d..f961433d62 100644 --- a/apps/www/content/docs/api/core/plate.mdx +++ b/apps/www/content/docs/api/core/plate.mdx @@ -11,7 +11,7 @@ description: API reference for Plate component. -A unique identifier to store the editor state by id. This is mandatory when nesting **`Plate`** instances but optional otherwise. +A unique ID to store the editor state by ID. This is mandatory when nesting **`Plate`** instances but optional otherwise. - **Default:** `'main'`. diff --git a/apps/www/content/docs/api/core/store.mdx b/apps/www/content/docs/api/core/store.mdx index 3beefb07de..5c7b33b928 100644 --- a/apps/www/content/docs/api/core/store.mdx +++ b/apps/www/content/docs/api/core/store.mdx @@ -14,12 +14,12 @@ description: API reference for Plate store. ### State -The PlateStoreState object stores the state of the Plate editor. It contains information about the editor's id, its current value, its plugins, and other settings. +The PlateStoreState object stores the state of the Plate editor. It contains information about the editor's ID, its current value, its plugins, and other settings. -A unique id used as a provider scope. Use it if you have multiple `PlateProvider` in the same React tree. +A unique ID used as a provider scope. Use it if you have multiple `PlateProvider` in the same React tree. - **Default:** `PLATE_SCOPE` @@ -135,7 +135,7 @@ Redecorate the editor. - Editor id. + Editor ID. @@ -146,14 +146,14 @@ Reset an editor with the same plugins. -Editor id. +Editor ID. ## Event Editor Store -This store is an object whose property keys are event names (e.g. `'focus'`) and whose property values are [editor ids](Plate#id). +This store is an object whose property keys are event names (e.g. `'focus'`) and whose property values are [editor IDs](Plate#id). - This is useful when having [multiple editors](multiple-editors) and get one based on DOM events (e.g. the last focused editor). - One of the core plugins of [Plate](Plate) will store the following events. @@ -163,19 +163,19 @@ This store is an object whose property keys are event names (e.g. `'focus'`) and -Last editor id that has been blurred. +Last editor ID that has been blurred. -Editor id that is currently being focused. +Editor ID that is currently being focused. -Last editor id. +Last editor ID. @@ -185,21 +185,21 @@ Last editor id. Hook selectors. - **Example:** `useEventEditorSelectors().focus()` will get the - last focused editor id. + last focused editor ID. ### `useEventPlateId` -Get the last event editor id. +Get the last event editor ID. -Returned id if defined. +Returned ID if defined. The `PlateId` from the context if available, otherwise the last event editor - id or `PLATE_SCOPE`. + ID or `PLATE_SCOPE`. diff --git a/apps/www/content/docs/autoformat.mdx b/apps/www/content/docs/autoformat.mdx index ed35d69b37..d632313c98 100644 --- a/apps/www/content/docs/autoformat.mdx +++ b/apps/www/content/docs/autoformat.mdx @@ -47,18 +47,49 @@ import { createAutoformatPlugin } from '@udecode/plate-autoformat'; const plugins = [ // ...otherPlugins, createAutoformatPlugin({ - // options + rules: autoformatRules, + enableUndoOnDelete: true, }), ]; ``` +## Examples + +### `autoformatRules` + + + +### `autoformatBlocks` + + + +### `autoformatIndentLists` + +If using the [Indent List plugin](/docs/indent-list), you can use the following rules: + + + +### `autoformatLists` + +If using the [List plugin](/docs/list), you can use the following rules: + + + +### `autoformatMarks` + + + +### `autoformatUtils` + + + ## API ### createAutoformatPlugin - +[//]: # '- **`key: KEY_AUTOFORMAT`**' -Options. + @@ -73,7 +104,7 @@ A list of triggering rules. Enable undo on delete. - + ### Rules @@ -91,12 +122,12 @@ You can import the following rules: | | Converts `<-` to `←`. | | | Converts `=>` to `⇒`. | | | Converts `<=` and `≤=` to `⇐`. | -| `autoformatLegal` | Converts `(tm)` and `(TM)` to `™`. | -| | Converts `(r)` and `(R)` to `®`. | -| | Converts `(c)` and `(C)` to `©`. | -| `autoformatLegalHtml` | Converts `™` to `™`. | -| | Converts `®` to `®`. | -| | Converts `©` to `©`. | +| `autoformatLegal` | Converts `(tm)` and `(TM)` to `™`. | +| | Converts `(r)` and `(R)` to `®`. | +| | Converts `(c)` and `(C)` to `©`. | +| `autoformatLegalHtml` | Converts `™` to `™`. | +| | Converts `®` to `®`. | +| | Converts `©` to `©`. | | | Converts `§` to `§`. | | `autoformatComparison` | Converts `!>` to `!>`. | | | Converts `!<` to `≮`. | diff --git a/apps/www/content/docs/basic-elements.mdx b/apps/www/content/docs/basic-elements.mdx index 3ec6485751..855971c4d5 100644 --- a/apps/www/content/docs/basic-elements.mdx +++ b/apps/www/content/docs/basic-elements.mdx @@ -52,6 +52,21 @@ const plugins = [ ]; ``` +## Keyboard Interactions + + + Toggle paragraph block. + Toggle heading 1 block. + Toggle heading 2 block. + Toggle heading 3 block. + + Toggle the blockquote formatting for selected text. + + + Select all text in the code block. + + + ## API ### createBasicElementsPlugin @@ -64,12 +79,12 @@ const plugins = [ ### createHeadingPlugin - + Specifies the heading levels supported, ranging from 1 to the specified levels. - + ## API Paragraph @@ -79,9 +94,7 @@ Specifies the heading levels supported, ranging from 1 to the specified levels. ### createCodeBlockPlugin - - -Options. + Determines if syntax highlighting is enabled. @@ -99,45 +112,199 @@ Defines deserializers for the code block plugin. Hotkeys to trigger a code block action. - + ### isCodeBlockEmpty +Checks if the selection is inside an empty code block. + + + + The editor instance. + + + + + + Returns true if the selection is in an empty code block. + + + ### isSelectionAtCodeBlockStart +Checks if the selection is at the start of the first code line in a code block. + + + + The editor instance. + + + + + + Returns true if the selection is at the start of the first code line in a + code block. + + + ### indentCodeLine +Indents the code line if the selection is expanded or there are no non-whitespace characters at left of the cursor. The indentation is 2 spaces by default. + + + +The editor instance. + + + + + The code line to be indented. + + +The size of indentation for the code line. + +- **Default:** `2` + + + + + + + ### insertCodeBlock +Inserts a code block by setting the node to code line and wrapping it with a code block. If the cursor is not at the block start, it inserts a break before the code block. + + + + The editor instance. + + + + ### insertCodeLine +Inserts a code line starting with the specified indentation depth. + + + + The editor instance. + + + The depth of indentation for the code line. + + - **Default:** `0` + + + + ### outdentCodeLine +Outdents a code line, removing two whitespace characters if present. + + + + The editor instance. + + + + + The code line to be outdented. + + + The code block containing the code line to be outdented. + + + + + ### toggleCodeBlock +Toggles the code block in the editor. + + + + The editor instance. + + + ### unwrapCodeBlock -### useCodeBlockCombobox +Unwraps the code block in the editor. -### useCodeBlockComboboxState + + + The editor instance. + + -### useCodeBlockElement +### useCodeBlockCombobox + + + + The code block element. + + + Set element value callback. + + + + + + The props for the command item. + + + The function to call when the command item is selected. + + + + ### useCodeBlockElementState -### useCodeSyntaxLeaf + + + The code block element. + + + + + + The CSS class name for the code block element, representing the selected + language. + + + The syntax plugin option. + + -## Keyboard Interactions +### useCodeSyntaxLeaf - - Toggle paragraph block. - Toggle heading 1 block. - Toggle heading 2 block. - Toggle heading 3 block. - - Toggle the blockquote formatting for selected text. - - - Select all text in the code block. - - + + + + + The leaf node representing a code syntax token. + + + + + + + + The props for the token. + + + The CSS class name for the token. + + + + diff --git a/apps/www/content/docs/basic-marks.mdx b/apps/www/content/docs/basic-marks.mdx index 450bfbc1df..74d5a3701f 100644 --- a/apps/www/content/docs/basic-marks.mdx +++ b/apps/www/content/docs/basic-marks.mdx @@ -43,13 +43,39 @@ const plugins = [ ]; ``` +## Keyboard Interactions + + + + Toggle the bold formatting for the selected text. + + + Toggle the italic formatting for the selected text. + + + Toggle the underline formatting for the selected text. + + + Toggle the code formatting for the selected text. + + + Toggle the strikethrough formatting for the selected text. + + + Toggle the subscript formatting for the selected text. + + + Toggle the superscript formatting for the selected text. + + + ## API ### createBasicMarksPlugin ### createBoldPlugin - + Node properties to delete. @@ -58,11 +84,11 @@ Node properties to delete. Hotkey to toggle mark. - + ### createCodePlugin - + Node properties to delete. @@ -71,11 +97,11 @@ Node properties to delete. Hotkey to toggle mark. - + ### createItalicPlugin - + Node properties to delete. @@ -84,11 +110,11 @@ Node properties to delete. Hotkey to toggle mark. - + ### createUnderlinePlugin - + Node properties to delete. @@ -97,11 +123,11 @@ Node properties to delete. Hotkey to toggle mark. - + ### createStrikethroughPlugin - + Node properties to delete. @@ -110,11 +136,11 @@ Node properties to delete. Hotkey to toggle mark. - + ### createSubscriptPlugin - + Node properties to delete. @@ -123,11 +149,11 @@ Node properties to delete. Hotkey to toggle mark. - + ### createSuperscriptPlugin - + Node properties to delete. @@ -136,30 +162,4 @@ Node properties to delete. Hotkey to toggle mark. - - -## Keyboard Interactions - - - - Toggle the bold formatting for the selected text. - - - Toggle the italic formatting for the selected text. - - - Toggle the underline formatting for the selected text. - - - Toggle the code formatting for the selected text. - - - Toggle the strikethrough formatting for the selected text. - - - Toggle the subscript formatting for the selected text. - - - Toggle the superscript formatting for the selected text. - - + diff --git a/apps/www/content/docs/block-selection.mdx b/apps/www/content/docs/block-selection.mdx index 25e2cff412..ba44179de0 100644 --- a/apps/www/content/docs/block-selection.mdx +++ b/apps/www/content/docs/block-selection.mdx @@ -50,7 +50,7 @@ You can style the selection area by using the `slate-selection-area` class: ### createBlockSelectionPlugin - + - + ### copySelectedBlocks -### extractSelectableIds +Copies the selected blocks in the editor to the clipboard. + + + + The editor instance. + + ### getSelectedBlocks +Gets the selected blocks in the editor. + + + + The editor instance. + + + ### pasteSelectedBlocks +Pastes the selected blocks from the clipboard into the editor. + + + + The editor instance. + + + The clipboard event containing the clipboard data. + + + ### selectInsertedBlocks +Selects the inserted blocks from the last editor insert operations. + + + + The editor instance. + + + ## API Components ### BlockSelectable -### BlockSelectionArea - -### blockSelectionStore + + + + + The element to render the block selectable. + + + The color of the selected block. + + + Whether the selection is active. + + + + ### BlockStartArea +A primitive component for rendering the start area of a block. + + + +The placement of the start area. + +- **Default:** `'left'` + + + +The size of the start area. + +- **Default:** `'auto'` + + + + + + + + + The class name of the start area. + + + The style of the start area. + + + + + +### useBlockSelectionArea + +The behavior hook for the `BlockSelectionArea` component. + + + + + + The class name of the start area. + + + The style of the start area. + + + + + + + ### SelectionArea + + + + The callback to execute before the selection starts. + + + The callback to execute when the selection starts. + + + The callback to execute when the selection moves. + + + The callback to execute when the selection stops. + + + Function to calculate the boundaries of the selection area. + + diff --git a/apps/www/content/docs/cloud.mdx b/apps/www/content/docs/cloud.mdx index ca4d76b371..ab175dbca9 100644 --- a/apps/www/content/docs/cloud.mdx +++ b/apps/www/content/docs/cloud.mdx @@ -36,34 +36,334 @@ To get the value to save to your database, use `editor.cloud.getSaveValue()`. Th ### createCloudImagePlugin + + + The maximum initial width of the cloud image. + + + The maximum initial height of the cloud image. + + + The minimum width of the cloud image after resize. + + + The maximum width of the cloud image after resize. + + + ### createCloudPlugin + + +Extends `ClientOptions`. + + +The initial state of the upload store. Each record maps a string key to an upload object. + + + ### createUploadStore + + + + The lookup for origin files, where the keys are the IDs and the values are + upload information. + + + + ### finishUploads +Finds all the in-progress uploads and waits for them all to finish before resolving the returned promise. + + + +The editor instance. + + + + +The maximum timeout in milliseconds. If the timeout is reached, the method +will return. + +- **Default:** `TEN_MINUTES` + + + + + + + ### generateSrcAndSrcSet +Generates the `src` and `srcSet` attributes for an image. + + + + + + The URL of the image. + + + The desired size of the image in pixels. + + + The maximum size of the image in pixels. + + + + + + + +An object containing the `src` and `srcSet` attributes. + + + ### getInProgressUploads +Takes an array of `nodes` and a lookup for `origins` and normalizes the nodes by replacing the `id` values with actual URLs for successfully uploaded files. + + + + The array of nodes to be normalized. + + + The lookup for origin files, where the keys are the IDs and the values are + upload information. + + + ### getSaveValue +Normalizes the save value by replacing the `id` values with actual URLs for successfully uploaded files. + + + + The save value to be normalized. + + + The lookup for origin files, where the keys are the IDs and the values are + upload information. + + + + + +The normalized save value with replaced `id` values. + + + ### onDropCloud +Handles the drop event of cloud files. + + + + The editor instance. + + + The drag event object. + + + + + A boolean indicating whether the drop event was handled successfully. + + ### onPasteCloud +Handles the paste event of cloud files. + + + + The editor instance. + + + The clipboard event object. + + + + + A boolean indicating whether the paste event was handled successfully. + + ### uploadFiles +Uploads a single file to the cloud. + + + + The editor instance. + + + The file to be uploaded. + + + +### CloudEditorProps + + + + Object containing methods and properties related to cloud operations. + + + The client object for the cloud operations. + + + A function to handle file upload. + + + The upload store object. + + + Handlers for generic file upload events. + + + Handlers for image file upload events. + + + A function to get the current value of the editor. + + + A function to wait for all uploads to finish. + + + + + +### CloudImageEditorProps + + + + Object containing the dimensions of the cloud image. + + + The maximum initial width of the cloud image. + + + The maximum initial height of the cloud image. + + + The minimum width of the cloud image after resize. + + + The maximum width of the cloud image after resize. + + + + + ### TCloudAttachmentElement + + + The URL of the cloud attachment. + + + The filename of the cloud attachment. + + + The size of the cloud attachment in bytes. + + + +### TCloudImageElement + + + + The URL of the cloud image. + + + The size of the image in bytes. + + + The width of the cloud image. + + + The height of the cloud image. + + + The maximum width of the cloud image. + + + The maximum height of the cloud image. + + + ## API Plugins ### withCloud +A higher-order function that enhances a Plate editor with cloud-related functionality. + + + + The Plate editor instance. + + + The cloud plugin. + + + + + The enhanced Plate editor instance with cloud functionality. + + ### withCloudAttachment +A higher-order function that enhances a Plate Cloud editor with cloud attachment functionality. + + + + The Plate editor instance. + + + The cloud attachment plugin. + + + + + The enhanced Plate Cloud editor instance with cloud attachment functionality. + + ### withCloudImage +A higher-order function that enhances a Plate Cloud Image editor with cloud image functionality. + + + + The Plate editor instance. + + + The cloud image plugin. + + + + + The enhanced Plate Cloud Image editor instance with cloud image functionality. + + ## API Components ### useCloudAttachmentElement diff --git a/apps/www/content/docs/combobox.mdx b/apps/www/content/docs/combobox.mdx index 158350dc5e..032f83049c 100644 --- a/apps/www/content/docs/combobox.mdx +++ b/apps/www/content/docs/combobox.mdx @@ -51,6 +51,24 @@ const plugins = [ Then render the combobox component inside `Plate`. You can use the [Combobox component](/docs/components/combobox) or create your own. +## Keyboard Interactions + + + + Highlights the next item in the list. + + + Highlights the previous item in the list. + + Closes the combobox. + + Selects the currently highlighted item. + + + Selects the currently highlighted item. + + + ## API ### createComboboxPlugin @@ -107,7 +125,7 @@ Represents a combobox's state. The state resides in `comboboxStore`, which uses -Opened combobox id. +Opened combobox ID. A collection of combobox configuration stores, each identified by a unique combobox ID (e.g., one for tags, one for mentions). @@ -117,7 +135,7 @@ A collection of combobox configuration stores, each identified by a unique combo -Combobox id. +Combobox ID. An optional function to filter items by text. @@ -208,28 +226,24 @@ Data available to `onRenderItem`. ## API Components -### useComboboxControls - -Used in `Combobox` to control the combobox state. See [useCombobox](https://www.downshift-js.com/use-combobox). - -### useComboboxContentState - ### useComboboxContent -## Keyboard Interactions - - - - Highlights the next item in the list. - - - Highlights the previous item in the list. - - Closes the combobox. - - Selects the currently highlighted item. - - - Selects the currently highlighted item. - - +A behavior hook for the `ComboboxContent` component. + + + + The items for the combobox. + + + The combobox store. + + + + + + The menu props for the combobox content. + + + The target range of the combobox. + + diff --git a/apps/www/content/docs/comments.mdx b/apps/www/content/docs/comments.mdx index c236ad3c3a..e28f7ccd3d 100644 --- a/apps/www/content/docs/comments.mdx +++ b/apps/www/content/docs/comments.mdx @@ -39,80 +39,292 @@ const plugins = [ ]; ``` +## Keyboard Interactions + + + + Add a comment on the selected text. + + + ## API ### createCommentsPlugin - - -Options. + The hotkey used to add a comment. - + ### findCommentNode +Finds the comment node in the editor. + + + + The editor instance. + + + Additional options for finding the node. + + + ### findCommentNodeById +Finds the comment node in the editor by its ID. + + + + The editor instance. + + + The ID of the comment node to find. + + + ### getCommentCount +Gets the count of comments in a comment node. + + + + The comment node. + + + ### getCommentKey +Generates a comment key based on the provided ID. + + + + The ID of the comment. + + + ### getCommentKeyId +Extracts the comment ID from a comment key. + + + + The comment key. + + + ### getCommentKeys +Returns an array of comment keys present in the given node. + + + + The node to check for comment keys. + + + ### getCommentNodeEntries +Returns an array of node entries for comment nodes in the editor. + + + + The editor instance. + + + ### getCommentNodesById +Returns an array of node entries for comment nodes with a specific ID in the editor. + + + + The editor instance. + + + The ID of the comment nodes to retrieve. + + + ### getCommentPosition +Calculates the position of a comment node relative to the editor. + + + + The editor instance. + + + The comment node for which to calculate the position. + + + ### getCommentUrl +Generates a URL with a query parameter for a specific comment ID. + + + + The ID of the comment. + + + ### getElementAbsolutePosition +Calculates the absolute position of an HTML element relative to the document. + + + + The HTML element for which to calculate the absolute position. + + + ### isCommentKey +Checks if a given key is a comment key. + + + + The key to check. + + + ### isCommentNodeById +Checks if a given node is a comment with the specified ID. + + + + The node to check. + + + The ID of the comment. + + + ### isCommentText +Checks if a given node is a comment text node. + + + + The node to check. + + + + + `true` if the node is a comment text node. + + ### removeCommentMark +Removes the comment mark from the editor. + + + + The editor instance. + + + ### unsetCommentNodesById +Unsets comment nodes with the specified ID from the editor. + + + + The editor instance. + + + The ID of the comment nodes to unset. + + + ### CommentUser - - -A unique identifier for the comment user. +An interface representing a user who can make comments. - - -The name of the comment user. + + + The unique ID of the user. + + + The name of the user. + + + The URL of the user's avatar. + + - - -URL to the avatar of the comment user. +### CommentStoreState - - + + + The unique ID of the comment. + + + A flag indicating whether the menu associated with this comment is currently + open. + + + The value currently being edited for this comment. If no editing is in + progress, this value is null. + + + +### CommentsStoreState + +An interface representing the state of the comments store. + + + + The unique ID of the currently logged in or active user. + + + An object where each key is a user's unique ID and the corresponding value + is an instance of the `CommentUser` type, representing the user's data. + + + An object where each key is a comment's unique ID and the corresponding + value is an instance of the `TComment` type, representing the comment's + data. + + + The unique ID of the currently active or focused comment. + + + The unique ID of the comment that is currently being added. + + + The new value to be added to the comments. + + + Indicates whether the comment textarea is focused. + + + A function that is invoked when a new comment is added. It accepts a partial + comment object, which must include the user's ID. + + + A function that is invoked when a comment is updated. It accepts a comment + object, which must include the comment's ID. + + + A function that is invoked when a comment is deleted. It accepts the unique + ID of the comment to be deleted. + + ### TComment -A unique identifier for the comment. - +A unique ID for the comment. -The Slate value of the document. - +The Slate value of the comment. Timestamp when the comment was created. @@ -121,147 +333,364 @@ Timestamp when the comment was created. -Identifier of the author of the comment. - +Id of the author of the comment. -Identifier of the parent comment it replies to. - +Id of the parent comment it replies to. Whether the comment is resolved. - ### TCommentText - -Indicates whether this is a comment. + + Indicates whether this is a comment. Multiple comments can be present in a + single text node. + - - -Records of comments. Each record's key is a string and its value is a boolean. +[//]: # ' ' +[//]: # " Records of comments. Each record's key is a string and its value is a" +[//]: # ' boolean.' +[//]: # ' ' - -### `CommentUser` +## API Plugins + +### useHooksComments -An interface representing a user who can make comments. +Plugin hook for handling comments functionality in the editor. - - The unique identifier of the user. + + The editor instance. - - The name of the user. - - - The URL of the user's avatar. + + The comments plugin. -### `TComment` +### withComments -An interface representing a comment in the editor. +Enhances the editor with comment-related functionality. - - The unique identifier of the comment. + + The editor instance. - - The Slate value of the document. + + The comments plugin. - - The time the comment was created. Default is the current time - (`Date.now()`). + + +## API Components + +### CommentDeleteButton + +A button component for deleting a comment. + + + + The ID of the active comment. + + + The editor instance. - - The identifier of the user who made the comment. + + The ID of the comment. - - The identifier of the parent comment this comment replies to. + + A function to call when the comment is deleted. - - Indicates whether the comment is resolved. + + A function to remove the comment. - + + A function to set the active comment ID. + + -### `TCommentText` +### CommentEditButton -An interface extending TText with additional properties for managing -comments. +A button component for editing a comment. - - - Indicates whether the text includes a comment. + + + A function to set the menu open state. - - An object containing boolean values for each comment associated with the - text, with the comment id as the key. + + The comment object. - + + A function to set the editing value. + + -## API Plugins +### CommentEditCancelButton -### useHooksComments +A button component for canceling the editing of a comment. -### withComments +### CommentEditSaveButton -## API Components +A button component for saving the editing of a comment. -### CommentDeleteButton + + + The value of the editing value. + + + A function to set the editing value. + + + The ID of the comment. + + + A function to call when the comment is updated. + + + A function to update the comment. + + + The value of the comment. + + -### CommentEditActions +### CommentEditTextarea -### CommentEditButton +A textarea component for editing a comment. -### CommentEditCancelButton + + + A function to set the editing value. + + + The textarea ref. + + + The value of the textarea. + + -### CommentEditSaveButton +### CommentNewSubmitButton -### CommentEditTextarea +A button component for submitting a new comment. -### CommentNewSubmitButton + + + The text of the comment being edited. + + + A function to reset the new comment value. + + + A function to add a comment. + + + Whether the comment is a reply. + + + The text of the submit button. + + + A function to call when the comment is added. + + + The ID of the active comment. + + + The comment object. + + + The value of the edited comment. + + ### CommentNewTextarea +A textarea component for adding a new comment. + + + + The textarea ref. + + + The placeholder of the textarea. + + + The value of the textarea. + + + A function to set the new value. + + + ### CommentProvider +A jotai provider for comment data. + + + Extends `CommentStoreState`. + + + The scope of the provider. + + + ### CommentResolveButton +A button component for resolving/unresolving a comment. + ### CommentUserName +A div component for displaying the name of a comment user. + ### CommentsPositioner +A div component for positioning comments in the editor. + + + + The ID for the active comment. + + + An object representing the current position of the comment (top and left + coordinates). + + + ### CommentsProvider +A jotai provider for comments data and users data. + + + +Extends `CommentsStoreState`. + + + ### useActiveCommentNode +A custom hook that retrieves the active comment node based on the active comment ID. + + + +- If there is an active comment ID, it returns the corresponding comment node. + +- If there is no active comment ID or the comment node is not found, it returns `null`. + + + ### useAddCommentMark +A custom hook that adds a comment mark to the selected text in the editor. + + + A function that can be called to add a comment mark to the selected text. + + ### useCommentAddButton -### useCommentItemContent +A custom hook that provides functionality for adding a comment mark to the selected text and setting focus to the comment textarea. + + + + + + A function to call when the button is clicked. + + + + + +### useCommentItemContentState + +A state hook for the comment item content component. + + + + The comment object. + + + A boolean indicating whether the comment is a reply comment. + + + The text content of the comment. + + + The user associated with the comment. + + + The ID of the current user. + + + The value of the comment being edited. + + + A boolean indicating whether the comment is authored by the current user. + + ### useCommentLeaf +A behavior hook for the comment leaf component. + + + + The function to set the active comment ID. + + + The ID of the last comment in the leaf. + + + + + + + + A function to call when the button is clicked. + + + + + ### useCommentValue +A custom hook that focuses and selects the text inside a textarea. + + + + A ref to the textarea element. + + + ### useCommentsResolved -### useCommentsShowResolvedButton +A custom hook that returns an array of resolved comments. -### useFloatingCommentsContentState + + -### useFloatingCommentsState +An array of resolved comments. -## Keyboard Interactions + + - - - Add a comment on the selected text. - - +### useCommentsShowResolvedButton + +A custom hook that returns the props for a button component used to show resolved comments. + + + + + + A boolean indicating whether the button is pressed. + + + A function to call when the button is clicked. + + + + diff --git a/apps/www/content/docs/components/list-element.mdx b/apps/www/content/docs/components/list-element.mdx index f4039ca0b9..04167349ab 100644 --- a/apps/www/content/docs/components/list-element.mdx +++ b/apps/www/content/docs/components/list-element.mdx @@ -59,4 +59,4 @@ Update the import paths to match your project setup. ## Examples - + diff --git a/apps/www/content/docs/dnd.mdx b/apps/www/content/docs/dnd.mdx index 4e5a3f58ba..4881f55f2b 100644 --- a/apps/www/content/docs/dnd.mdx +++ b/apps/www/content/docs/dnd.mdx @@ -41,7 +41,7 @@ Then, wrap your plugin components with [Draggable](/docs/components/draggable). ### createDndPlugin - + Enables the scroller feature. @@ -50,36 +50,336 @@ Enables the scroller feature. Props for the `Scroller` component. - + ### focusBlockStartById +Selects the start of a block by ID and focuses the editor. + + + + The editor instance. + + + The ID of the block to be focused. + + + ### getBlocksWithId +Returns an array of blocks that have an ID. + + + + The editor instance. + + + The options for getting node entries. + + + + + + + +An array of blocks that have an ID. + + + + + ### selectBlockById + + + The editor instance. + + + The ID of the block to select. + + + ## API Plugins ### withDraggable +Enhances a component with draggable behavior. + + + + The draggable component to be rendered. + + + The component to be enhanced with draggable behavior. + + + + + The level of the draggable component. + + + A function that returns whether the component should be draggable. + + + Whether the component should be draggable in read-only mode. + + + The props to be passed to the draggable component. + + + + + ## API Components ### DndScroller -### dndStore +A wrapper component for the `Scroller` component that is conditionally rendered based on the dragging state from the `dndStore`. + + + + A flag indicating whether the scroll area is enabled. If set to false, the + scroll functionality is disabled. + + + The height of the scrollable area, specified in pixels. + + + The stack order of the scrollable area. An element with a higher z-index is + drawn in front of an element with a lower one. + + + The minimum strength (speed) of the scrolling action. Higher values will + make the scroll action more sensitive. + + + A multiplier that increases the scroll speed. Higher values will result in + faster scrolling. + + + A reference to the DOM element of the scrollable container. + + + Additional props that can be spread onto the scroll area div element. + + ### useDndBlock +A custom hook that wraps the `useDndNode` hook and configures it for dragging block items. + + + + Options for the `useDndNode` hook, with the `type` property set to + `DRAG_ITEM_BLOCK`. + + + ### useDndNode +A custom hook that combines the `useDragNode` and `useDropNode` hooks to enable dragging and dropping of a node from the editor. It provides a default preview for the dragged node, which can be customized or disabled. + + + + + + The ID of the node to be dragged. + + + The type of the node to be dragged. + + + The ref of the node to be dragged. + + + The preview options for the dragged node. + + - **Default:** `{}` + + + The drag options for the dragged node. + + + The drop options for the dragged node. + + + The handler to be called when the node is dropped. + + + + + + + + + + Indicates whether the node is currently being dragged. + + + Indicates whether the dragged node is currently over a drop target. + + + The direction of the drop line, indicating the position where the node can be + dropped. + + + The drag reference that should be assigned to the draggable element. + + + + ### useDragBlock +A custom hook that enables dragging of a block node from the editor. It internally uses the `useDragNode` hook. + + + + The editor instance. + + + The unique ID of the block node to be dragged. + + + ### useDragNode +A custom hook that enables dragging of a node from the editor using the `useDrag` hook from `react-dnd`. + + + + The editor instance. + + + The options for the drag behavior, including the unique ID of the node to be + dragged. + + + The unique ID of the node to be dragged. + + + The drag object or a factory function that returns the drag object. + + + + + ### useDraggable -### useDraggableState +A custom hook that provides the necessary properties and event handlers for making an element draggable. + + + + The direction of the drop line, indicating the position where the node can + be dropped. + + + Indicates whether the node is currently being dragged. + + + The ref of the node to be dragged. + + + The drag reference that should be assigned to the draggable element. + + + + + + A reference to the HTML `div` element that serves as the preview during + drag. + + + A reference to the drag source connector provided by `react-dnd`. + + + Additional props to be applied to the dropline element. + + + Indicates whether the dropline element should be editable. + + + + + Additional props to be applied to the left gutter element. + + + Indicates whether the dropline element should be editable. + + + + ### useDropBlock +A custom hook that enables dropping a block into the editor. It internally uses the `useDropNode` hook to handle the drop behavior. + + + + The editor instance. + + + + ### useDropNode + +A custom hook that enables dropping a node on the editor. It uses the `useDrop` hook from `react-dnd` to handle the drop behavior. + + + + The editor instance. + + + Options for the drop behavior. + + + + The reference to the node being dragged. + + + The ID of the node. + + + The current value of the drop line. + + + A callback called when the drop line changes. + + + A callback function that intercepts the drop handling. + + - If `false` is returned, the default drop behavior is called after. + + - If `true` is returned, the default behavior is not called. + + + + + diff --git a/apps/www/content/docs/emoji.mdx b/apps/www/content/docs/emoji.mdx index 25cf968b8c..f6a1f9d82f 100644 --- a/apps/www/content/docs/emoji.mdx +++ b/apps/www/content/docs/emoji.mdx @@ -44,9 +44,7 @@ const plugins = [ ### createEmojiPlugin - - -Options. + The trigger character(s) for the emoji. @@ -99,4 +97,4 @@ A function that resets the triggering controller. The ID of the plugin. - + diff --git a/apps/www/content/docs/excalidraw.mdx b/apps/www/content/docs/excalidraw.mdx index f6eba3c7a9..8989e0e832 100644 --- a/apps/www/content/docs/excalidraw.mdx +++ b/apps/www/content/docs/excalidraw.mdx @@ -26,9 +26,9 @@ npm install @udecode/plate-excalidraw ```tsx import { + createExcalidrawPlugin, ELEMENT_EXCALIDRAW, ExcalidrawElement, - createExcalidrawPlugin, } from '@udecode/plate-excalidraw'; import { createSelectOnBackspacePlugin } from '@udecode/plate-select'; @@ -47,6 +47,63 @@ const plugins = [ ### insertExcalidraw +Inserts an Excalidraw element into the editor. + + + + The editor instance. + + +The props and key for the Excalidraw element. + + +The key for the Excalidraw element. + +- **Default:** `ELEMENT_EXCALIDRAW` + + + + + + + + The options for inserting the Excalidraw element. + + + ## API Components -### useExalidawElement +### useExcalidrawElement + +A behavior hook for the Excalidraw component. + + + +The Excalidraw element. + + +The library items to be displayed in the Excalidraw component. + +- **Default:** `[]` + + + +Determines whether to scroll to the content inside the Excalidraw component. + +- **Default:** `true` + + + + + + + The Excalidraw component. + + + The props to be passed to the Excalidraw component. + + diff --git a/apps/www/content/docs/exit-break.mdx b/apps/www/content/docs/exit-break.mdx index 55e19a3140..4afab2c07d 100644 --- a/apps/www/content/docs/exit-break.mdx +++ b/apps/www/content/docs/exit-break.mdx @@ -52,13 +52,22 @@ const plugins = [ ]; ``` +## Keyboard Interactions + + + + Start a new block after the selected block. + + + Start a new block before the selected block. + + + ## API ### createExitBreakPlugin - - -Options. + @@ -104,19 +113,83 @@ The default type of the node to be inserted upon exit. - + ### exitBreak +Exit a large block using a shortcut. + + + +The editor instance. + + +The options for the exit break operation. + + +Path level where to exit. + +- **Default:** `0` + + + +If true, exit relative to the selection. + +- **Default:** `false` + + + +The default type of the node to be inserted upon exit. + +- **Default:** `getPluginType(editor, ELEMENT_DEFAULT)` + + + +Object determining the conditions under which to exit. + + + +If true, exit before the selected block. + + + + + + + + + Indicates whether the exit break was successful. + + + ### exitBreakAtEdges -## Keyboard Interactions +Checks if the selection is at the edge of its parent block and performs an "exit break" operation if specified. - - - Start a new block after the selected block. - - - Start a new block before the selected block. - - + + + The editor instance. + + + + + If true, check if the selection is at the start of its parent block. + + + If true, check if the selection is at the end of its parent block. + + + + + + + + Indicates whether the edge of the selection was queried. + + + Indicates whether the selection is at the edge of its parent block. + + + Indicates whether the selection is at the start of its parent block. + + diff --git a/apps/www/content/docs/font.mdx b/apps/www/content/docs/font.mdx index 4127c0d7a4..f6d6a6050e 100644 --- a/apps/www/content/docs/font.mdx +++ b/apps/www/content/docs/font.mdx @@ -63,6 +63,92 @@ const plugins = [ ### useColorDropdownMenu +A behavior hook for the color dropdown menu component. + + + + A boolean indicating whether the dropdown menu is open. + + + A callback function to toggle the open state of the dropdown menu. + + + + + + The props to be spread on the menu component. + + + A boolean indicating whether the dropdown menu is open. + + + A callback function to toggle the open state of the dropdown menu. + + + + + The props to be spread on the button component. + + + A boolean indicating whether the dropdown menu is open. + + + + + ### useColorInput +A behavior hook for the color input component. + + + + A ref object that should be assigned to the color input element. + + + The props to be spread on the child component that triggers the color + picker. + + + A callback function to handle the click event of the child component. + + + + + ### useColorsCustom + +A behavior hook for custom colors in a color picker. + + + + The callback function to update the custom color. + + + The current value of the color input. + + + The callback function to update the value of the color input. + + + + + + The props to be spread on the color input element. + + + The current value of the color input. + + + A callback function to handle the change event of the color input. + + + + + The props to be spread on the menu item elements in the color picker. + + + A callback function to handle the select event of the menu item. + + + + diff --git a/apps/www/content/docs/highlight.mdx b/apps/www/content/docs/highlight.mdx index bc76c02e84..45198074ed 100644 --- a/apps/www/content/docs/highlight.mdx +++ b/apps/www/content/docs/highlight.mdx @@ -34,11 +34,19 @@ const plugins = [ ]; ``` +## Keyboard Interactions + + + + Apply a highlight to the selected text. + + + ## API ### createHighlightPlugin - + Node properties to delete. @@ -47,12 +55,4 @@ Node properties to delete. Hotkey to toggle mark. - - -## Keyboard Interactions - - - - Apply a highlight to the selected text. - - + diff --git a/apps/www/content/docs/indent-list.mdx b/apps/www/content/docs/indent-list.mdx index 8d69013a84..2a28a4b46f 100644 --- a/apps/www/content/docs/indent-list.mdx +++ b/apps/www/content/docs/indent-list.mdx @@ -59,7 +59,7 @@ const plugins = [ ### createIndentListPlugin - + A function mapping HTML elements to list style types. - + ### getNextIndentList + + + The editor instance. + + + The entry of the current element. + + + + + + + The entry of the next sibling with an indent list, or `undefined` if not + found. + + + ### getPreviousIndentList +Gets the previous sibling entry with an indent list. + + + + The editor instance. + + + The entry of the current element. + + + + + + + The entry of the previous sibling with an indent list, or `undefined` if not + found. + + + ### indentList -Increase the list indentation of the selected blocks. +Increases the indentation of the selected blocks. + + + +The editor instance. + + + +Extends `SetIndentOptions`. + + + +The list style type to use. + +- **Default:** `ListStyleType.Disc` + + + + + + ### outdentList -Decrease the list indentation of the selected blocks. +Decreases the indentation of the selected blocks. + + + +The editor instance. + + + +Extends `SetIndentOptions`. + + + +The list style type to use. + +- **Default:** `ListStyleType.Disc` + + + + + + ### someIndentList +Checks if some of the selected blocks have a specific list style type. + + + + The editor instance. + + + The list style type to check. + + + ### toggleIndentList -Toggle indent list. +Toggles the indent list. + + + +The editor instance. + + +The options for toggling the indent list. + + +The list style type to use. + + + + + + + +### GetSiblingIndentListOptions + +Used to provide options for getting the sibling indent list in a block of text. + + + + This function is used to get the previous sibling entry from a given entry. + + + This function is used to get the next sibling entry from a given entry. + + + This function is used to validate a sibling node during the lookup process. + If it returns false, the next sibling is checked. + + + Indicates whether to break the lookup when the sibling node has an indent + level equal to the current node. If true, the lookup stops when a sibling + node with the same indent level is found. + + + A function that takes a `TNode` and returns a boolean value or undefined. + This function is used to specify a condition under which the lookup process + should be stopped. + + + Indicates whether to break the lookup when a sibling node with a lower + indent level is found. If true, the lookup stops when a sibling node with a + lower indent level is found. + + + Indicates whether to break the lookup when a sibling node with the same + indent level but a different list style type is found. If true, the lookup + stops when such a sibling node is found. + + ## API Components ### useIndentListToolbarButton + +A behavior hook for the indent list toolbar button. + + + + The list style type. + + + A boolean indicating whether the button is pressed or not. + + + + + + + + A boolean indicating whether the button is pressed or not. + + + A callback function to handle the click event of the button. It toggles + the indent list of the specified node type in the editor and focuses the + editor. + + + + diff --git a/apps/www/content/docs/indent.mdx b/apps/www/content/docs/indent.mdx index ee83e94472..e7e09d0167 100644 --- a/apps/www/content/docs/indent.mdx +++ b/apps/www/content/docs/indent.mdx @@ -48,7 +48,7 @@ const plugins = [ ### createIndentPlugin - + The indentation offset used in `(offset * element.indent) + unit`. @@ -64,24 +64,132 @@ The indentation unit used in `(offset * element.indent) + unit`. The maximum number of indentations that can be applied to an element. - + ### createTextIndentPlugin ### indent -Increase the indentation of the selected blocks. +Indents the selected block(s) in the editor. + + + + The editor instance. + + + ### outdent Decrease the indentation of the selected blocks. + + + The editor instance. + + + + ### setIndent Add offset to the indentation of the selected blocks. + + +The editor instance. + + + + +The indentation offset used in `(offset * element.indent) + unit`. + +- **Default:** `1` + + + +Options to get the nodes to indent. + + +Additional props to set on the nodes to indent. + + +Additional props to unset on the nodes to indent. + +- **Default:** `[]` + + + + + + + +### SetIndentOptions + +Used to provide options for setting the indentation of a block of text. + + + + Defines the change in indentation. A value of 1 increases the indentation + (indents the block), whereas a value of -1 decreases the indentation + (outdents the block). By default, the offset is set to 1. + + + Additional `getNodes` options. + + + Additional `setNodes` options. + + + A list of property names that should be unset when the indentation is 0. + + + ## API Components ### useIndentButton +A behavior hook for the indent button component. + + + + + + A callback function to handle the click event of the button. It indents + the selected content in the editor and focuses the editor. + + + + + ### useOutdentButton + +A behavior hook for the outdent button component. + + + + + + A callback function to handle the click event of the button. It outdents + the selected content in the editor and focuses the editor. + + + + diff --git a/apps/www/content/docs/line-height.mdx b/apps/www/content/docs/line-height.mdx index c3c5b6382b..11f8f2a73a 100644 --- a/apps/www/content/docs/line-height.mdx +++ b/apps/www/content/docs/line-height.mdx @@ -39,6 +39,55 @@ const plugins = [ ### setLineHeight +Sets the line height for selected nodes in the editor. + + + + The editor instance. + + + The options for setting the line height. + + + The line height value to be set. + + + Additional options for setting nodes. + + + + + ## API Components ### useLineHeightDropdownMenu + +The behavior hook for the line height dropdown menu. + + + + The line height value. + + + + + + The props for the radio group. + + + The line height value. + + + Callback to set the line height value. + + + + diff --git a/apps/www/content/docs/link.mdx b/apps/www/content/docs/link.mdx index 706fb00cb2..90cf24d0d9 100644 --- a/apps/www/content/docs/link.mdx +++ b/apps/www/content/docs/link.mdx @@ -37,11 +37,17 @@ const plugins = [ ]; ``` +## Keyboard Interactions + + + Add a link on the selected text. + + ## API ### createLinkPlugin - + Determines whether to force the submission of the link form. @@ -102,25 +108,92 @@ Callback function to optionally get the href for a URL. It returns an optional l On keyboard shortcut or toolbar mousedown, this function is called to get the link URL. The default behavior is to use the browser's native `prompt`. - + ### getLinkAttributes +Gets the attributes for a link element. + + + + The editor instance. + + + The link element. + + + ### insertLink -Insert a link node. +Inserts a link node into the editor. + + + + The editor instance. + + + + ### submitFloatingLink +Inserts a link if the URL is valid, closes the floating link, and focuses the editor. + - Insert link if url is valid. - Text is url if empty. - Close floating link. - Focus editor. + + + The editor instance. + + + + + + +Returns `true` if the link was inserted. + + + + ### triggerFloatingLink +Triggers the floating link. + + + +The editor instance. + + + + + + + + + + + ### triggerFloatingLinkEdit +Triggers the floating link edit. + + + + The editor instance. + + + + + + +Returns `true` if the link was edited. + + + + ### triggerFloatingLinkInsert Trigger floating link. @@ -132,62 +205,405 @@ Do not trigger when: - Lowest selection is not text. - Selection has a link node. + + +The editor instance. + + + + + + + + + + + + Returns `true` if the link was inserted. + + ### unwrapLink -Unwrap link node. +Unwraps a link node. + + + + The editor instance. + + + + + If `true`, split the nodes if the selection is inside the link. + + + + ### upsertLink -If selection in a link or is not url: +If the selection is in a link or the selection is not a URL: -- Insert text with url, exit. +- If `insertTextInLink` is `true`, insert the `url` as text in the link and exit. +- Otherwise, if the `text` is defined and empty, set it to the `url`. +- If `skipValidation` is `false` (default), validate the `url` using the `validateUrl` function. If the validation fails, exit. -If selection is expanded or `update` in a link: +If the selection is expanded or the `update` option is set to `true` in a link: -- Remove link node, get link text. +- Remove the link node and get the link text. Then: -- Insert link node. +- Insert the link node with the updated `url` and `target`. +- If `text` is defined and not empty, replace the link text with the new `text`. + + + +The editor instance. + + + + +The URL of the link. + + +The text content of the link. + + +The target attribute of the link. + + +If `true`, insert the `url` as text in the link. + + +The options for inserting nodes. + + +If `true`, skips URL validation. + +- **Default:** `false` + + + + + + + + + + Returns `true` if the link was inserted or updated. + + ### upsertLinkText -If the text is different than the link above text, replace link children by a new text. The new text has the same marks than the first text replaced. +If the text is different from the link above text, replaces the link children with a new text node. The new text node has the same marks as the first text node in the link. + + + + The editor instance. + + + + + The new text to replace the link children with. + + + + ### validateUrl +Validates a URL based on the plugin options. + + + + The editor instance. + + + The URL to validate. + + + + + Returns `true` if the URL is valid. + + ### wrapLink Wrap a link node with split. + + + The editor instance. + + + + + The URL of the link. + + + The target attribute of the link. + + + + + +### CreateLinkNodeOptions + + + + The URL of the link node that is being created. + + + The text that is displayed for the link node. This text is what users see + and click on. If not provided, the URL is used as the display text. + + + Specifies where to open the URL. This can be `_blank` for a new tab, `_self` + for the same frame, `_parent` for the parent frame, or `_top` for the full + body of the window. + + + An array of `TText` objects that represent the child nodes of the link node. + These child nodes are displayed as the contents of the link node. + + + ## API Components ### FloatingLinkNewTabInput +The input for the link new tab. + + + + Whether the link should open in a new tab. + + + The ref of the input element. + + + Sets the checked state. + + + ### FloatingLinkUrlInput +The input for the link URL. + + + + The ref of the input element. + + + ### LinkOpenButton -### floatingLinkStore +The button to open the link. + + + + The link element to open. + + ### useFloatingLinkEdit +The behavior hook for the floating link edit. + + + + The virtual floating returned object. + + + + + + + + + The style of the floating link. + + + + + + + The function to call when the edit button is clicked. + + + + + + + The function to call when the unlink button is clicked. + + + + + ### useFloatingLinkEnter +Listens for the Enter key press event and submits the floating link in the editor. + ### useFloatingLinkEscape +Listens for the Escape key press event and handles the behavior of the floating link in the editor. + ### useFloatingLinkInsert +The behavior hook for inserting a link. + + + + The virtual floating returned object. + + + + The ref of the floating element. + + + + + + The ref of the floating element. + + + + + + The style of the floating link. + + + + + + + The function to call when the text input value changes. + + + The default value of the text input. + + + + + + +### useFloatingLinkStore + +The store for the floating link. + + + + The ID of the editor that has the floating link. + + + Whether the mouse is down. + + + Whether the floating link has been updated. + + + The URL of the floating link. + + + The text of the floating link. + + + Whether the floating link should open in a new tab. + + + The mode of the floating link. + + + Whether the floating link is being edited. + + + ### useLink +The behavior hook for the link element. + + + + + + The link element. + + + + + + + + + + The function to call when the mouse is over the link. + + + + + ### useLinkToolbarButton +The behavior hook for the link toolbar button. + + + + Whether the selection is in a link. + + + + + + + + Whether the link is pressed. + + + The function to call when the button is clicked. + + + + + ### useVirtualFloatingLink -## Keyboard Interactions +Custom hook for managing virtual floating of a link. - - - Add a link on the selected text. - - + + + The ID of the editor to which the link belongs. + + + Options for virtual floating. + + + + + + The return value of the `useVirtualFloating` hook. + + diff --git a/apps/www/content/docs/list.mdx b/apps/www/content/docs/list.mdx index 7e97ceac4b..f12d5554c2 100644 --- a/apps/www/content/docs/list.mdx +++ b/apps/www/content/docs/list.mdx @@ -18,7 +18,7 @@ docs: - Supports both unordered (bulleted) and ordered (numbered) lists. - Supports nesting to create complex hierarchical list structures. -- Combined with the autoformat plugin, use markdown shortcuts (**``-, *``**, **`1.`**) to create lists. +- Combined with the autoformat plugin, use markdown shortcuts (**`-, *`**, **`1.`**) to create lists. @@ -60,11 +60,25 @@ const plugins = [ ]; ``` +## Keyboard Interactions + + + Insert a numbered list. + Insert a numbered list. + + ## API ### createListPlugin - +- `key: 'list'` +- Contains the following element plugins: + - `ELEMENT_UL`: plugin options below. + - `ELEMENT_OL`: plugin options below. + - `ELEMENT_LI` + - `ELEMENT_LIC` + + Specifies valid child node types for list items, in addition to `p` and `ul` types. @@ -72,78 +86,734 @@ const plugins = [ Determines whether pressing Shift+Tab should reset the list indent level. - + ### getHighestEmptyList +Finds the highest end list that can be deleted. The path of the list should be different from `diffListPath`. If the highest end list has 2 or more items, returns `liPath`. It traverses up the parent lists until: + +- The list has less than 2 items. +- Its path is not equal to `diffListPath`. + + + + The editor instance. + + + + + The path of the list item. + + + The path of a different list. + + + + + + + + The path of the highest end list that can be deleted. + + + ### getListItemEntry +Returns the nearest `li` and `ul`/`ol` wrapping node entries for a given path (`default = selection`). + + + +The editor instance. + + + + +The location to retrieve the nearest entries from. If not provided, uses +the current selection. + +- **Default:** `editor.selection` + + + + + + + + + + The nearest `li` and `ul`/`ol` wrapping node entries. + + + ### getListRoot +Searches upward for the root list element. + + + + The editor instance. + + + The location to start the search from. If not provided, uses the current + selection. + + - **Default:** `editor.selection` + + + + + + + The root list element entry. + + + ### getListTypes +Returns an array of list types supported by the editor. + + + + The editor instance. + + + + + The list types. + + ### hasListChild +Checks if a node has a list child. + + + + The editor instance. + + + The node to check. + + + + + + +`true` if the node has a list child, `false` otherwise. + + + + ### indentListItems +Indents the list items in the editor. + + + + The editor instance. + + + ### insertListItem +Inserts a list item if the selection is in an li>p element. + + + + The editor instance. + + + + + + `true` if the list items were indented, `false` otherwise. + + + ### insertTodoListItem +Inserts a todo list item if the selection is in an li>p element. + + + +The editor instance. + + + + +Whether to inherit the check state of the previous line when inserting a +new todo item at the start of a line. + +- **Default:** `false` + + + +Whether to inherit the check state of the previous line when inserting a +new todo item at the end of a line. + +- **Default:** `false` + + + + + + + + + + `true` if the list items were indented, `false` otherwise. + + + ### isAcrossListItems +Checks if the selection is across blocks with list items. + + + + The editor instance. + + + + + + `true` if the selection is across blocks with list items, `false` otherwise. + + + ### isListNested +Checks if the list is nested, i.e., its parent is a list item. + + + + The editor instance. + + + The path of the list. + + + + + + `true` if the list is nested, `false` otherwise. + + + ### isListRoot +Checks if a node is the root of a list. + + + + The editor instance. + + + The node to check. + + + + + + `true` if the node is the root of a list, `false` otherwise. + + + ### moveListItemDown +Moves a list item down to the next list item. + + + + The editor instance. + + + + + The entry of the list node. + + + The entry of the list item node to move. + + + + + + + + `true` if the list item was moved, `false` otherwise. + + + ### moveListItemSublistItemsToListItemSublist +Moves sublist items from one list item to another list item's sublist. + + + +The editor instance. + + + + +The entry of the list item containing the sublist items to move. + + +The entry of the list item where the sublist items will be moved. + + +Move the sublist items to the start of the sublist instead of the end. + +- **Default:** `false` + + + + + + + + + The number of sublist items moved. + + ### moveListItemUp +Moves a list item up. + + + + The editor instance. + + + + + The entry of the list containing the list item to move. + + + The entry of the list item to move. + + + + + + + + `true` if the list item was moved, `false` otherwise. + + + ### moveListItems +Moves the selected list items up or down within their respective lists or increases/decreases their indentation level. + + + +The editor instance. + + + + +Determines whether to increase the indentation level + +- **Default:** true. + + + +The location to move the list items. If not specified, the current +selection will be used. + +- **Default:** `editor.selection ?? undefined`. + + + +Enables resetting the indentation level to the parent list when using +Shift+Tab + +- **Default:** false. + + + + + + + + + + `true` if the list items were moved, `false` otherwise. + + + ### moveListItemsToList +Moves the list items from a sublist or a list to another list. + + + +The editor instance. + + + + +The list whose list items will be moved. + + +The list item whose sublist items will be moved. + + +The starting index of the list items to move (default: 0). + + +The specific path where the list items will be moved to. If specified, +it overrides the `toList` and `toListIndex` options. + + +The list where the list items will be moved to. + + +The index in the destination list where the list items will be inserted. +If not specified, the list items will be inserted at the end of the +list. + +- **Default:** `null`. + + + +The specific path where the list items will be moved to. If specified, +it overrides the `toList` and `toListIndex` options. + + +Determines whether to delete the sublist or list from which the items +are moved. + +- **Default:** `true`. + + + + + + + + + + `true` if the list items were moved, `false` otherwise. + + + ### moveListSiblingsAfterCursor +Moves the list siblings after the cursor position to a specified path. + + + + The editor instance. + + + + + The path of the cursor position. + + + The path where the list siblings will be moved to. + + + + + + + The number of list siblings moved. + + ### removeFirstListItem +Removes the first list item if the list is not nested and the list item is not the first child. + + + + The editor instance. + + + + + The list entry containing the list item. + + + The list item entry to be removed. + + + + + + + + `true` if the list item was removed, `false` otherwise. + + + ### removeListItem +Removes a list item and moves its sublist to the parent list if any. + + + +The editor instance. + + + + +The list entry containing the list item. + + +The list item entry to be removed. + + +Whether to reverse the sublist items before moving them. + +- **Default:** `true` + + + + + + + + + + `true` if the list item was removed, `false` otherwise. + + + ### someList +Checks if the current selection is inside a list of a specific type. + + + + The editor instance. + + + The type of list to check. + + + + + + `true` if the selection is inside a list of the specified type, `false` + otherwise. + + + ### toggleList +Toggles a list in the editor. + + + +The editor instance. + + + + +The type of the list to toggle. + + +The key of the plugin associated with the list. + +- **Default:** `type` + + + + + + + ### unindentListItems +Decreases the indentation level of the list items in the editor. + + + + The editor instance. + + + The target path at which to unindent the list items. If not provided, the + list items will be unindented at the current selection. + + + ### unwrapList +Removes the list formatting from the selected list items or the list items at the specified path. + + + + The editor instance. + + + + + The target path at which to remove the list formatting. If not provided, + the list formatting will be removed from the current selection. + + + + + ## API Components ### useListToolbarButton -## API Todo List - - - - Determines whether a new todo item created at the start of a line should - inherit the check state of the previous item. - - - Determines whether a new todo item created at the end of a line should - inherit the check state of the current item. +A behavior hook for a list toolbar button. + + + +The pressed state of the button. + + + +The node type of the list. + +- **Default:** `ELEMENT_UL` + + + + + + + + + The pressed state of the button. + + + A callback function to handle the click event of the button. It toggles + the list of the specified node type in the editor and focuses the + editor. + + - + + +## API Todo List ### getTodoListItemEntry +Returns the nearest list and list item node entries for a given path (default = selection) in a todo list. + + + +The editor instance. + + + + + +The location or path at which to search for the nearest list and list item nodes. Default is the current selection. + +- **Default:** `editor.selection` + + + + + + + + +- If a list item is found at the given location, it returns an object with the `list` and `listItem` node entries. + +- If no list item is found, it returns `undefined`. + + + ### useTodoListElement -## Keyboard Interactions +A behavior hook a todo list item element. - - Insert a numbered list. - Insert a numbered list. - + + + The checked state of the todo list item. + + + Whether the todo list item is read-only. + + + The todo list item element. + + + The editor instance. + + + + + + + + The checked state of the todo list item. + + + A callback function to handle the todo list item checked state change. + It takes a boolean value as the parameter. + + + + diff --git a/apps/www/content/docs/media.mdx b/apps/www/content/docs/media.mdx index aa99b08ab3..4ad2255736 100644 --- a/apps/www/content/docs/media.mdx +++ b/apps/www/content/docs/media.mdx @@ -36,10 +36,10 @@ npm install @udecode/plate-media ```tsx import { - ELEMENT_IMAGE, - ELEMENT_MEDIA_EMBED, createImagePlugin, createMediaEmbedPlugin, + ELEMENT_IMAGE, + ELEMENT_MEDIA_EMBED, } from '@udecode/plate-media'; import { createSelectOnBackspacePlugin } from '@udecode/plate-select'; @@ -59,26 +59,94 @@ const plugins = [ ## API Media +### insertMedia + +Inserts media (image or media embed) into the editor. The type of media to insert is determined by the `type` parameter. + + + +The editor instance. + + + + +A function that returns a promise resolving to the URL of the media to +be inserted. If not provided, a prompt will be displayed to enter the +URL. + + +The type of media to insert. Defaults to the editor's image element +type. + +- **Default:** `getPluginType(editor, ELEMENT_IMAGE)` + + + + + + + +### parseMediaUrl + +Parses a media URL and returns the data associated with it based on the configured rules of the media plugin. + + + + The editor instance. + + + + + The key of the media plugin. + + + The URL of the media to be parsed. + + + + + +### submitFloatingMedia + +Submits the floating media element by setting its URL and performing necessary transformations. + + + + The editor instance. + + + + + The floating media element to be submitted. + + + The key of the media plugin. + + + + + ### MediaPlugin Common attributes shared by image and media embed plugins. - + A function to check whether a text string is a URL. - + A function to transform the URL. - + List of rules. The first rule that matches the URL will be used, i.e. its component will be used to render the media. - + A function that parses the URL and returns data for embedding. - The unique identifier for the embedded content. + The unique ID for the embedded content. - + The component to be rendered for the embedded content. -### insertMedia - -### parseMediaUrl - -### submitFloatingMedia - ## API Image ### createImagePlugin - + -Options extends `MediaPlugin`. +Extends `MediaPlugin`. @@ -144,16 +202,65 @@ Disables file upload on data insertion if set to true. Disables URL embed on data insertion if set to true. - + ### insertImage +Inserts an image element into the editor. + + + + The editor instance. + + + The URL or ArrayBuffer of the image. + + + Additional options for inserting the image element. + + + + If true, the image will be inserted in the next block. + + + + ### isImageUrl +Checks if a given URL is a valid image URL. + + + + The URL to check. + + + ### withImageUpload +Enhances the editor to support pasting images from the clipboard. + + + + The editor instance. + + + The plate plugin. + + + ### withImageEmbed +Enhances the editor to automatically insert an image when a URL is pasted. + + + + The editor instance. + + + The plate plugin. + + + ## API Media Embed ### createMediaEmbedPlugin @@ -162,38 +269,359 @@ Options extends `MediaPlugin`. ### insertMediaEmbed +Inserts a media embed element at the current selection. + + + +The editor instance. + + + + +The URL of the media embed. + +- **Default:** `''` + + + +The key of the media embed element. + +- **Default:** `ELEMENT_MEDIA_EMBED` + + + + + + + + + ### parseIframeUrl +Parses the URL of an iframe embed. + + + + The URL or embed code of the iframe. + + + ### parseTwitterUrl +Parses a Twitter URL and extracts the tweet ID. + + + + The Twitter URL. + + + + + + An object containing the tweet ID and provider if the parsing is successful. + Returns undefined if the URL is not valid or does not match any supported + video providers. + + + ### parseVideoUrl -## API Components +Parses a video URL and extracts the video ID and provider-specific embed URL. + + + + The video URL. + + -### floatingMediaStore + + + An object containing the video ID and provider if the parsing is successful. + Returns undefined if the URL is not valid or does not match any supported + video providers. + + + +## API Components -### mediaStore +### useResizable -### resizableStore +A behavior hook for resizable elements. -### Resizable + + + The alignment of the content within the resizable element. + + + Specifies whether the resizable element is read-only. If `true`, the element + cannot be resized. + + + The minimum width that the resizable element can be adjusted to. + + + The maximum width that the resizable element can be adjusted to. + + + A function to render the left resize handle. This is typically a component + or JSX element. + + + A function to render the right resize handle. This is typically a component + or JSX element. + + + A function to set the width of the node, which is used when resizing. + + + A function to set the width of the resizable element directly. + + + The current width of the resizable element. This can be a string (e.g., a + percentage or 'auto') or a number (representing pixels). + + -### useFloatingMedia + + + A React reference to the outermost div wrapping the resizable element. + + + Props to be spread on the outermost div wrapping the resizable element. + + + CSS styles to be applied to the wrapper div. + + + + + Props to be spread on the resizable element. + + + CSS styles to be applied to the resizable element. + + + + + The element to be used as the left handle for resizing. If `false`, there + will be no left handle. + + + The element to be used as the right handle for resizing. If `false`, there + will be no right handle. + + ### useFloatingMediaEditButton +A behavior hook for a floating media edit button. + + + + + + A callback function to handle the button click. + + + + + ### useFloatingMediaUrlInput +A behavior hook for a floating media URL input. + + + + The default value for the URL input field. + + + + + + + + A callback function to handle the button click. + + + If true, the URL input field will be focused on mount. + + + The default value for the URL input field. + + + + + ### useImage +A behavior hook for an image element. + + + + + + The URL of the media element. + + + The caption string for the image. + + + Indicates whether the image is draggable. + + + + + ### useMediaEmbed +A behavior hook for a media embed element. + + + +The component for rendering the media embed. + +- **Default:** `'iframe'` + + + + + +The ID of the media embed. + + +The URL of the media embed. + + + + + ### useMediaEmbedTweet +A behavior hook for a media embed tweet element. + + + + The ID of the tweet. + + + + + + An object containing the tweet ID and provider. + + + ### useMediaEmbedVideo +A behavior hook for a media embed video element. + + + + + The title of the embed. + + + The frame border of the embed. + + + Whether the embed allows fullscreen mode. + + + The URL of the video. + + + + ### useMediaState +A state hook for a media element. + + + + + +The key of the media plugin. + +- **Default:** `ELEMENT_MEDIA_EMBED` + + + + + + + + + Whether the media element is currently focused. + + + Whether the media element is currently selected. + + + Whether the editor is in read-only mode. + + + The media provider of the element. + + + ### useMediaToolbarButton +A behavior hook for a media toolbar button. + + + + + + The type of the media node to be inserted. + + + + + + + + + + A callback function that inserts the media node into the editor and + focuses the editor. + + + + + ### Tweet + +A React component for rendering a Tweet. + + + +The ID of the tweet to embed. + + +A callback function that handles errors that occur during the embedding process. + + +A callback function that is called when the tweet is successfully loaded. + + +A loading component to be rendered while the tweet is being loaded. + + +An object that contains options for customizing the embedded tweet. + +- **Default:** `{}` + + + diff --git a/apps/www/content/docs/mention.mdx b/apps/www/content/docs/mention.mdx index 728dd13afd..3431c0bc45 100644 --- a/apps/www/content/docs/mention.mdx +++ b/apps/www/content/docs/mention.mdx @@ -46,9 +46,7 @@ const plugins = [ ### createMentionPlugin - - -Options. + @@ -56,7 +54,7 @@ A function to create the mention node. - A unique identifier for the mention plugin. + A unique ID for the mention plugin. Whether to insert a space after the mention. @@ -84,20 +82,134 @@ An object containing the key-value pair for creating an input. A query function to enable the behavior. - + ### getMentionOnSelectItem -`Combobox.onSelectItem` prop value. +Gets the `ComboboxOnSelectItem` handler for selecting an item in the mention combobox. + + + + + +The plugin key of the mention plugin. + +- **Default:** `ELEMENT_MENTION` + + + + + + + + + The `ComboboxOnSelectItem` handler for selecting an item in the mention + combobox. + + ### findMentionInput +Finds the mention input node in the editor. + + + +The editor instance. + + + +Additional options for finding the mention input node. + + + + + + + The mention input node entry if found, otherwise `undefined`. + + + ### isNodeMentionInput +Checks if a node is a mention input node in the editor. + + + + The editor instance. + + + The node to check. + + + + + + `true` if the node is a mention input node, otherwise `false`. + + + ### isSelectionInMentionInput +Checks if the current selection in the editor is within a mention input. + + + + The editor instance. + + + + + + `true` if the selection is within a mention input, otherwise `false`. + + + ### mentionOnKeyDownHandler +Handles keydown events for mention-related functionality, such as removing mention inputs and moving the selection by offset. + + + + Options for moving the selection by offset. + + + A query function to enable the behavior. + + + + + ### moveSelectionByOffset +Moves the selection by offset based on the keyboard arrow keys. + + + + The editor instance. + + + Options for moving the selection by offset. This is an optional parameter. + + + A query function to enable the behavior. + + + + + ### removeMentionInput + +Removes the mention input node at the specified path. + + + + The editor instance. + + + The path of the mention input node to remove. + + diff --git a/apps/www/content/docs/reset-node.mdx b/apps/www/content/docs/reset-node.mdx index dffab2441a..ecf74cc847 100644 --- a/apps/www/content/docs/reset-node.mdx +++ b/apps/www/content/docs/reset-node.mdx @@ -76,9 +76,7 @@ const plugins = [ ### createResetNodePlugin - - -Options. + An array of rules which govern how the node reset will be performed. Each rule includes: @@ -106,4 +104,4 @@ Whether to disable reset for the first block in the editor. Whether to disable the reset operation for the entire editor. - + diff --git a/apps/www/content/docs/serializing-csv.mdx b/apps/www/content/docs/serializing-csv.mdx index 37d1345b03..201cbff8e3 100644 --- a/apps/www/content/docs/serializing-csv.mdx +++ b/apps/www/content/docs/serializing-csv.mdx @@ -40,9 +40,7 @@ const plugins = [ ### createDeserializeCsvPlugin - - -Options. + @@ -60,6 +58,44 @@ Options to be passed to the PapaParse library for parsing CSV data. Refer to **[PapaParse documentation](https://www.papaparse.com/docs#config)** for more details about these options. - + ### deserializeCsv + +Takes a CSV (Comma Separated Values) string and converts it into a Slate compatible format. This function uses the `papaparse` library to parse the CSV data. + + + +The editor instance. + + +The CSV data string to be deserialized. + + +Percentage in decimal form, from 0 to a very large number, 0 for no errors allowed. Percentage is based on number of errors compared to number of rows. + +- **Default:** `0.25` + + + + +Options to be passed to the PapaParse library for parsing CSV data. + +- **Default:** **`{ header: true }`** (Indicating that the first row of the CSV data should be treated as a header.) + +Refer to **[PapaParse documentation](https://www.papaparse.com/docs#config)** for more details about these options. + + + + + + + Returns an array of `TDescendant` objects that represent the structure of + the CSV data in a Slate compatible format. If parsing of the CSV data fails + or the data is not valid, this function returns `undefined`. + + + +This function creates a table representation of the CSV data. If the CSV file includes headers, they are added as the first row of the table. Each subsequent row represents the values from the CSV file. If the CSV file does not include headers, each row of data is represented as a row in the table. + +Please note that the function assumes the usage of specific plugins corresponding to `ELEMENT_DEFAULT`, `ELEMENT_TABLE`, `ELEMENT_TH`, `ELEMENT_TR`, and `ELEMENT_TD`. diff --git a/apps/www/content/docs/serializing-html.mdx b/apps/www/content/docs/serializing-html.mdx index f6bb382dbd..e8dba7c7d6 100644 --- a/apps/www/content/docs/serializing-html.mdx +++ b/apps/www/content/docs/serializing-html.mdx @@ -123,5 +123,7 @@ Specifies a component to be used for wrapping the rendered elements during a dra -The function returns a string representing the serialized HTML. + +A HTML string representing the Slate nodes. + diff --git a/apps/www/content/docs/serializing-md.mdx b/apps/www/content/docs/serializing-md.mdx index e8f5e72cd1..15fb91dbd5 100644 --- a/apps/www/content/docs/serializing-md.mdx +++ b/apps/www/content/docs/serializing-md.mdx @@ -44,7 +44,7 @@ Use [remark-slate](https://github.com/hanford/remark-slate#slate-object-to-markd ### createDeserializeMdPlugin - + Object where each key is a Markdown syntax element type and the value is a transformation function. @@ -87,4 +87,4 @@ An optional function that takes a string (the Markdown text) as argument and ret - + diff --git a/apps/www/content/docs/soft-break.mdx b/apps/www/content/docs/soft-break.mdx index 1522f96ab8..e222c090c8 100644 --- a/apps/www/content/docs/soft-break.mdx +++ b/apps/www/content/docs/soft-break.mdx @@ -43,13 +43,19 @@ const plugins = [ ]; ``` +## Keyboard Interactions + + + + Insert a line break within a block of text without starting a new block. + + + ## API ### createSoftBreakPlugin - - -Options. + An array of rule objects specifying the hotkey to activate the soft break and an optional filter query. @@ -62,12 +68,4 @@ Filter options to determine the block types where the rule applies. - - -## Keyboard Interactions - - - - Insert a line break within a block of text without starting a new block. - - + diff --git a/apps/www/content/docs/tabbable.mdx b/apps/www/content/docs/tabbable.mdx index 47017c677d..b2f00d38cc 100644 --- a/apps/www/content/docs/tabbable.mdx +++ b/apps/www/content/docs/tabbable.mdx @@ -98,7 +98,7 @@ insertTabbableEntries: (editor) => { ### createTabbablePlugin - + Dynamically enables or disables the plugin. Returns `true` by default. @@ -123,7 +123,7 @@ Determines whether an element should be included in the tabbable list. Returns ` - **Default:** **`(editor, tabbableEntry) => isVoid(editor, tabbableEntry.slateNode)`** - + ### TabbableEntry diff --git a/apps/www/content/docs/table.mdx b/apps/www/content/docs/table.mdx index 2eb4d1cac5..42184d7f05 100644 --- a/apps/www/content/docs/table.mdx +++ b/apps/www/content/docs/table.mdx @@ -48,13 +48,31 @@ const plugins = [ ]; ``` +## Keyboard Interactions + + + + Add the cell above to selection. + + + Add the cell below to selection. + + + Add the left cell to selection. + + + Add the right cell to selection. + + Select the previous cell. + Select the next cell. + Select all the table cells. + + ## API ### createTablePlugin - - -Options. + Disables the expansion of the table when inserting cells. @@ -92,126 +110,1154 @@ The minimum width of a column in the table. - **Default:** **`48`** - + ### deleteColumn +Deletes the column containing the selected cell in a table. + + + + The editor instance. + + + ### deleteRow +Deletes the row containing the selected cell in a table. + + + + The editor instance. + + + ### deleteTable +Deletes the entire table. + + + + The editor instance. + + + ### getCellInNextTableRow +Gets the cell in the next row. + + + + The editor instance. + + + The path of the current row. + + + + + + + The node entry of the cell in the next row, or `undefined` if the current row + is the last row. + + + + ### getCellInPreviousTableRow +Gets the node entry of the cell in the previous row, given the current row's path. + + + + The editor instance. + + + The path of the current row. + + + + + + + The node entry of the cell in the previous row, or `undefined` if the current + row is the first row. + + + + ### getCellType +Get the plugin cell types. + + + + The editor instance. + + + + + + + An array of element types for table cells (td and th) in the editor. + + + + ### getEmptyCellNode +Returns an empty cell node for a table. + + + +The editor instance. + + +Extends `TablePlugin`. + + +Specify `true` if the cell is a header cell. + + +The children of the new cell node. + +- **Default:** `[editor.blockFactory()]` + + + + + + + + + + +The cell node. + + + + ### getEmptyRowNode +Creates an empty row node with the specified number of columns. + + + +The editor instance. + + +Extends `GetEmptyCellNodeOptions`. + + +The number of columns in the row. + +- **Default:** `1` + + + + + + + + + + +The row node. + + + + ### getEmptyTableNode + + +The editor instance. + + +Extends `GetEmptyRowNodeOptions`. + + +Specify `true` if the table has a header row. + + +The number of rows in the table. + +- **Default:** `0` + + + +The number of columns in the table. + + +The children of the new cell node. Defaults to an empty block. + + + + + + + + + +The table node. + + + + ### getLeftTableCell +Gets the cell to the left of the current cell in a table. + + + + The editor instance. + + + + + The path of the current cell. + + + + + + + + The node entry of the cell to the left of the current cell, or `undefined` + if the current cell is the first cell in the row. + + + ### getNextTableCell +Gets the next cell in the table. + + + + The editor instance. + + + The entry of the current cell. + + + The path of the current cell. + + + The entry of the current row. + + + + + + The node entry of the cell in the next row, or `undefined` if the current + row is the last row. + + + ### getPreviousTableCell +Gets the previous cell in the table. + + + + The editor instance. + + + The entry of the current cell. + + + The path of the current cell. + + + The entry of the current row. + + + + + + The node entry of the cell in the previous row, or `undefined` if the + current row is the first row. + + + ### getTableAbove +Gets the table node above the current selection. + + + + The editor instance. + + + + + + + The table node entry above the current selection, or `undefined` if there is + none. + + + ### getTableColumnCount +Gets the number of columns in a table. + + + + The table node for which to retrieve the column count. + + + + + + +The number of columns in the table. + + + + ### getTableColumnIndex +Gets the column index of a cell node within a table. + + + + The editor instance. + + + The cell node for which to retrieve the column index. + + + + + + +The column index of the cell node. + + + + ### getTableEntries +Gets the table, row, and cell node entries based on the current selection or a specified location. + + + +The editor instance. + + + + +The location where the table cell is located. + +- **Default:** `editor.selection` + + + + + + + + + + The table node entry. + + + The row node entry. + + + The cell node entry. + + + ### getTableGridAbove +Gets the sub table above the anchor and focus positions based on the specified format (tables or cells). + + + +The editor instance. + + + + +The format of the sub table to retrieve. + +- **Default:** `'table'` + + + + + + + + + The sub table entries. + + ### getTableGridByRange +Gets the sub table between two cell paths within a given range. + + + +The editor instance. + + + + +The range specifying the start and end cell paths. + + +The format of the output. + +- **Default:** `'table'` + + + + + + + + + The sub table entries. + + ### getTableOverriddenColSizes +Gets the column sizes of a table node, with overrides applied if provided. + + + + The table node from which to retrieve the column sizes. + + + Optional overrides for the column sizes. It should be a map-like object + where the keys are column indices and the values are the overridden sizes. + + + + + + An array of column sizes, with overrides applied if provided. If no column + sizes are defined in the table node, it returns a 0-filled array. + + + ### getTableRowIndex +Gets the row index of a cell node within a table. + + + + The editor instance. + + + The cell node for which to retrieve the row index. + + + + + + +The row index of the cell node. + + + + ### getTopTableCell +Gets the cell above the current cell in the table. + + + + The editor instance. + + + The path to the current cell. If not provided, the function will search for + the current cell in the editor. + + + + + + +The cell node entry. + + + + ### insertTable +Inserts a table at the current selection if there is no existing table in the editor. Selects the start of the inserted table. + + + +The editor instance. + + +Extends `GetEmptyRowNodeOptions`. + + +The number of rows in the table. + +- **Default:** `2` + + + +The number of columns in the table. + +- **Default:** `2` + + + +If true, the first row of the table will be treated as a header row. + + + + + + +The options for inserting the table nodes. + + + ### insertTableColumn +Inserts a column into the table at the current selection or a specified cell path. + + + + The editor instance. + + + + + If true, the inserted column will be treated as a header column. + + + The path of the cell to insert the column from. + + + The exact path of the cell to insert the column at. This overrules the + `fromCell` option. + + + If true, selection will be disabled after insertion. + + + + + ### insertTableRow +Inserts a row into the table at the current selection or a specified row path. + + + + The editor instance. + + + + + If true, the inserted row will be treated as a header row. + + + The path of the row to insert the new row from. + + + The exact path of the row to insert the new row at. This overrules the + `fromRow` option. + + + If true, selection will be disabled after insertion. + + + + + ### isTableBorderHidden +Checks if the border of a table cell or the table itself is hidden based on the specified border direction. + + + + The editor instance. + + + The border direction to check. + + + + + + +`true` if the border is hidden, `false` otherwise. + + + + ### moveSelectionFromCell +Moves the selection by cell unit within a table. + + + + The editor instance. + + + + + The location to move the selection from. + + + Set to `true` to move the selection to the cell above, `false` to move + the selection to the cell below. + + + The edge to expand the cell selection to. + + + Set to `true` to move the selection from only one selected cell. + + + + + ### overrideSelectionFromCell +Overrides the new selection if the previous selection and the new one are in different cells. + + + + The editor instance. + + + The new selection to be checked and overridden. + + + ### setBorderSize +Sets the size of the specified border in a table cell. + + + +The editor instance. + + +The size of the border. + + + + +The location of the cell to set the border size. + + +The border direction to set the size. + +- **Default:** `'all'` + + + + + + + ### setTableColSize +Sets the width of a specific column in a table. + + + + The editor instance. + + + + + The index of the column to set the width. + + + The desired width of the column. + + + + + Additional options for finding the table node. + + + ### setTableMarginLeft +Sets the margin left of a table. + + + + The editor instance. + + + + + An object containing the desired margin left value. + + + + + Additional options for finding the table node. + + + ### setTableRowSize +Sets the size (height) of a table row. + + + + The editor instance. + + + + + The index of the row to set the size. + + + The desired height of the row. + + + + + Additional options for finding the table node. + + + ## API Plugin ### onKeyDownTable +Handles the keyboard events for tables. + + + + The editor instance. + + + The plate plugin. + + + + + + The keyboard handler return type. + + + ### withDeleteTable +Prevents the deletion of cells in tables. + + + + The editor instance. + + + ### withGetFragmentTable +If the selection is inside a table, it retrieves the subtable above the selection as the fragment. This is useful when copying and pasting table cells. + + + + The editor instance. + + + ### withInsertFragmentTable +If inserting a table: + +- If the block above the anchor of the selection is a table, replace each cell above with the inserted table until out of bounds. Select the inserted cells. +- If there is no table above the anchor, check if the selection is inside a table. If it is, find the cell at the anchor position and replace its children with the inserted fragment. + + + + The editor instance. + + + The plate plugin. + + + ### withInsertTextTable +If the selection is expanded: + +- Check if the selection is inside a table. If it is, collapse the selection to the focus edge. + + + + The editor instance. + + + The plate plugin. + + + ### withNormalizeTable +Normalize table structure by performing the following actions: + +- Wrap cell children in a paragraph if they are texts. +- Unwrap nodes that are not valid table elements. +- Set initial column sizes for tables if specified. + + + + The editor instance. + + + ### withSelectionTable +Handle table selections by performing the following actions: + +- Adjust the focus of the selection when the anchor is inside a table and the focus is in a block before or after the table. +- Adjust the focus of the selection when the focus is inside a table and the anchor is in a block before or after the table. +- Override the selection from a cell if the previous and new selections are in different cells. + + + + The editor instance. + + + ### withSetFragmentDataTable +Handle setting data to the clipboard when copying or cutting table data by performing the following actions: + +- Check if a table entry and selected cell entries exist. +- Handle single-cell copy or cut operations by copying the cell content instead of the table structure. +- Create a table structure with the selected cells' content. +- Set the text, HTML, CSV, TSV, and Slate fragment data to the clipboard. + + + + The editor instance. + + + ### withTable +Enhance the editor instance with table-related functionality by applying the following higher-order functions: + +- `withNormalizeTable`: Normalize table structure and content. +- `withDeleteTable`: Prevent cell deletion within a table. +- `withGetFragmentTable`: Handle getting the fragment data when copying or cutting table cells. +- `withInsertFragmentTable`: Handle inserting table fragments. +- `withInsertTextTable`: Handle inserting text within a table. +- `withSelectionTable`: Handle adjusting the selection within a table. +- `withSetFragmentDataTable`: Handle setting the fragment data when copying or cutting table data. + + + + The editor instance. + + + The plate plugin. + + + ## API Components ### TableCellElementResizable +A component that represents the resizable handles for a table cell element. + + + + The index of the column of the cell. + + + The index of the row of the cell. + + + The step size for resizing the table cell element. + + + The step size for resizing the table cell element horizontally. + + - **Default:** `step` + + + + The step size for resizing the table cell element vertically. + + - **Default:** `step` + + + + ### getOnSelectTableBorderFactory +Gets the `onSelectTableBorder` handler for a table cell element. + + + + The editor instance. + + + The selected cells. + + + ### getTableCellBorders +Gets the border styles for a table cell. + + + +The table cell element. + + + + +Whether the cell is the first cell in the row. + + +Whether the cell is in the first row. + + +The default border style. + + + +The border size. + +- **Default:** `size : 1` + + + +The border style. + +- **Default:** `style : 'solid'` + + + +The border color. + +- **Default:** `color : 'rgb(209 213 219)'` + + + + + + + + + + + + The border style for the bottom side of the cell. + + + The border style for the right side of the cell. + + + The border style for the left side of the cell. Only present if `isFirstCell` is `true`. + + - Only present if `isFirstCell` is `true`. + + + + The border style for the top side of the cell. Only present if `isFirstRow` is `true`. + + - Only present if `isFirstRow` is `true`. + + + + ### roundCellSizeToStep -### tableStore +Rounds a cell size to the nearest step, or returns the size if the step is not set. + + + + The cell size to be rounded. + + + The step value used for rounding. If not provided, the size is returned as + is. + + + +### useTableStore + +The table store stores the state of the table plugin. + + + + The column size overrides. + + + The row size overrides. + + + The margin left override. + + + The hovered column index. + + + The selected cells. + + ### useIsCellSelected +Custom hook that checks if a table cell is selected. + + + + The table cell element to check. + + + ### useSelectedCells +A hook that manages the selection of cells in a table. + +It keeps track of the currently selected cells and updates them based on changes in editor selection. + ### useTableBordersDropdownMenuContentState -### useTableCellElementState +A state hook for the table borders dropdown menu content. + + +An object with the following properties: + +Indicates whether the selected table cells have a bottom border. + + +Indicates whether the selected table cells have a top border. + + +Indicates whether the selected table cells have a left border. + + +Indicates whether the selected table cells have a right border. + + +Indicates whether the selected table cells have no borders. + + +Indicates whether the selected table cells have outer borders (i.e., +borders on all sides). + + +A factory function that returns the `onSelectTableBorder` handler for a +specific border type. + +- The `onSelectTableBorder` handler is responsible for setting the border style for the selected table cells. + + + + ### useTableColSizes -### useTableElement +Custom hook that returns the column sizes of a table with overrides applied. If the `colCount` of the table updates to 1 and the `enableUnsetSingleColSize` option is enabled, it unsets the `colSizes` node. -## Keyboard Interactions + + +The table node. + + +Additional options. + + +If `true`, disables applying overrides to the column sizes. - - Add the cell above to selection. - Add the cell below to selection. - - Add the left cell to selection. - - - Add the right cell to selection. - - Select the previous cell. - Select the next cell. - Select all the table cells. - +- **Default:** `false` + + + + + + + + + + The column sizes of the table with overrides applied. + + + +### useTableElement + +A behavior hook for a table element. + + + + The props of the table element. + + + A function that is called when the table is clicked. + + + + + The props of the table element. + + + A function that is called when the table is clicked. + + + A function that is called when the table is clicked. + + + + diff --git a/apps/www/public/registry/styles/default/excalidraw-element.json b/apps/www/public/registry/styles/default/excalidraw-element.json index 1796537601..8184910b90 100644 --- a/apps/www/public/registry/styles/default/excalidraw-element.json +++ b/apps/www/public/registry/styles/default/excalidraw-element.json @@ -7,7 +7,7 @@ "files": [ { "name": "excalidraw-element.tsx", - "content": "import React from 'react';\nimport { PlateElement, PlateElementProps, Value } from '@udecode/plate-common';\nimport {\n TExcalidrawElement,\n useExalidawElement,\n} from '@udecode/plate-excalidraw';\n\nexport function ExcalidrawElement({\n nodeProps,\n ...props\n}: PlateElementProps) {\n const { children, element } = props;\n\n const { Excalidraw, excalidrawProps } = useExalidawElement({\n element,\n });\n\n return (\n \n
\n
\n {Excalidraw && (\n \n )}\n
\n
\n {children}\n
\n );\n}\n" + "content": "import React from 'react';\nimport { PlateElement, PlateElementProps, Value } from '@udecode/plate-common';\nimport {\n TExcalidrawElement,\n useExcalidrawElement,\n} from '@udecode/plate-excalidraw';\n\nexport function ExcalidrawElement({\n nodeProps,\n ...props\n}: PlateElementProps) {\n const { children, element } = props;\n\n const { Excalidraw, excalidrawProps } = useExcalidrawElement({\n element,\n });\n\n return (\n \n
\n
\n {Excalidraw && (\n \n )}\n
\n
\n {children}\n
\n );\n}\n" } ], "type": "components:plate-ui" diff --git a/apps/www/src/components/api-list.tsx b/apps/www/src/components/api-list.tsx index 21f2c9592c..9cf9080637 100644 --- a/apps/www/src/components/api-list.tsx +++ b/apps/www/src/components/api-list.tsx @@ -77,6 +77,30 @@ export function APIAttributes({ children, ...props }: APIListProps) { ); } +export function APIOptions({ children, ...props }: APIListProps) { + return ( + + {children} + + ); +} + +export function APIProps({ children, ...props }: APIListProps) { + return ( + + {children} + + ); +} + +export function APIState({ children, ...props }: APIListProps) { + return ( + + {children} + + ); +} + export function APIReturns({ children, ...props }: APIListProps) { return ( @@ -127,6 +151,9 @@ export function APIList({ {type === 'parameters' && 'Parameters'} {type === 'attributes' && 'Attributes'} {type === 'returns' && 'Returns'} + {type === 'props' && 'Props'} + {type === 'state' && 'State'} + {type === 'options' && 'Options'} {hasItems && ( diff --git a/apps/www/src/components/mdx-components.tsx b/apps/www/src/components/mdx-components.tsx index 5003e84c47..b8210bc612 100644 --- a/apps/www/src/components/mdx-components.tsx +++ b/apps/www/src/components/mdx-components.tsx @@ -1,7 +1,7 @@ 'use client'; -import { ReactNode } from 'react'; import * as React from 'react'; +import { ReactNode } from 'react'; import Image from 'next/image'; import Link from 'next/link'; import { Provider } from 'jotai'; @@ -18,8 +18,11 @@ import { APIAttributes, APIItem, APIList, + APIOptions, APIParameters, + APIProps, APIReturns, + APIState, APISubList, APISubListItem, } from './api-list'; @@ -349,7 +352,10 @@ const components = { BadgePopover, APIParameters, APIAttributes, + APIProps, + APIState, APIReturns, + APIOptions, APIList, APISubList, APISubListItem, diff --git a/apps/www/src/lib/plate/demo/plugins/autoformatBlocks.ts b/apps/www/src/lib/plate/demo/plugins/autoformatBlocks.ts index d9ed6127f9..1b5da1dcf8 100644 --- a/apps/www/src/lib/plate/demo/plugins/autoformatBlocks.ts +++ b/apps/www/src/lib/plate/demo/plugins/autoformatBlocks.ts @@ -1,3 +1,4 @@ +import { AutoformatRule } from '@udecode/plate-autoformat'; import { ELEMENT_BLOCKQUOTE } from '@udecode/plate-block-quote'; import { ELEMENT_CODE_BLOCK, @@ -14,11 +15,9 @@ import { } from '@udecode/plate-heading'; import { ELEMENT_HR } from '@udecode/plate-horizontal-rule'; -import { MyAutoformatRule } from '@/types/plate-types'; - import { preFormat } from './autoformatUtils'; -export const autoformatBlocks: MyAutoformatRule[] = [ +export const autoformatBlocks: AutoformatRule[] = [ { mode: 'block', type: ELEMENT_H1, diff --git a/apps/www/src/lib/plate/demo/plugins/autoformatIndentLists.ts b/apps/www/src/lib/plate/demo/plugins/autoformatIndentLists.ts new file mode 100644 index 0000000000..9d5aa0676d --- /dev/null +++ b/apps/www/src/lib/plate/demo/plugins/autoformatIndentLists.ts @@ -0,0 +1,24 @@ +import { AutoformatRule } from '@udecode/plate-autoformat'; +import { ListStyleType, toggleIndentList } from '@udecode/plate-indent-list'; + +export const autoformatIndentLists: AutoformatRule[] = [ + { + mode: 'block', + type: 'list', + match: ['* ', '- '], + format: (editor) => { + toggleIndentList(editor, { + listStyleType: ListStyleType.Disc, + }); + }, + }, + { + mode: 'block', + type: 'list', + match: ['1. ', '1) '], + format: (editor) => + toggleIndentList(editor, { + listStyleType: ListStyleType.Decimal, + }), + }, +]; diff --git a/apps/www/src/lib/plate/demo/plugins/autoformatLists.ts b/apps/www/src/lib/plate/demo/plugins/autoformatLists.ts index e074dc6234..a0664e46c9 100644 --- a/apps/www/src/lib/plate/demo/plugins/autoformatLists.ts +++ b/apps/www/src/lib/plate/demo/plugins/autoformatLists.ts @@ -1,3 +1,4 @@ +import { AutoformatRule } from '@udecode/plate-autoformat'; import { isBlock, setNodes } from '@udecode/plate-common'; import { ELEMENT_LI, @@ -7,11 +8,9 @@ import { TTodoListItemElement, } from '@udecode/plate-list'; -import { MyAutoformatRule } from '@/types/plate-types'; - import { formatList, preFormat } from './autoformatUtils'; -export const autoformatLists: MyAutoformatRule[] = [ +export const autoformatLists: AutoformatRule[] = [ { mode: 'block', type: ELEMENT_LI, diff --git a/apps/www/src/lib/plate/demo/plugins/autoformatMarks.ts b/apps/www/src/lib/plate/demo/plugins/autoformatMarks.ts index c87c536a76..28f06986ff 100644 --- a/apps/www/src/lib/plate/demo/plugins/autoformatMarks.ts +++ b/apps/www/src/lib/plate/demo/plugins/autoformatMarks.ts @@ -1,3 +1,4 @@ +import { AutoformatRule } from '@udecode/plate-autoformat'; import { MARK_BOLD, MARK_CODE, @@ -9,9 +10,7 @@ import { } from '@udecode/plate-basic-marks'; import { MARK_HIGHLIGHT } from '@udecode/plate-highlight'; -import { MyAutoformatRule } from '@/types/plate-types'; - -export const autoformatMarks: MyAutoformatRule[] = [ +export const autoformatMarks: AutoformatRule[] = [ { mode: 'mark', type: [MARK_BOLD, MARK_ITALIC], diff --git a/apps/www/src/lib/plate/demo/plugins/autoformatPlugin.ts b/apps/www/src/lib/plate/demo/plugins/autoformatPlugin.ts index cb49a97b60..e43daebde0 100644 --- a/apps/www/src/lib/plate/demo/plugins/autoformatPlugin.ts +++ b/apps/www/src/lib/plate/demo/plugins/autoformatPlugin.ts @@ -2,13 +2,14 @@ import { AutoformatPlugin } from '@udecode/plate-autoformat'; import { MyEditor, MyPlatePlugin, MyValue } from '@/types/plate-types'; +import { autoformatLists } from './autoformatLists'; import { autoformatRules } from './autoformatRules'; export const autoformatPlugin: Partial< MyPlatePlugin> > = { options: { - rules: autoformatRules as any, + rules: [...autoformatRules, ...autoformatLists] as any, enableUndoOnDelete: true, }, }; diff --git a/apps/www/src/lib/plate/demo/plugins/autoformatRules.ts b/apps/www/src/lib/plate/demo/plugins/autoformatRules.ts index f1610c08bc..96e4cbd6a2 100644 --- a/apps/www/src/lib/plate/demo/plugins/autoformatRules.ts +++ b/apps/www/src/lib/plate/demo/plugins/autoformatRules.ts @@ -4,23 +4,20 @@ import { autoformatLegalHtml, autoformatMath, autoformatPunctuation, + AutoformatRule, autoformatSmartQuotes, } from '@udecode/plate-autoformat'; -import { MyAutoformatRule } from '@/types/plate-types'; - import { autoformatBlocks } from './autoformatBlocks'; -import { autoformatLists } from './autoformatLists'; import { autoformatMarks } from './autoformatMarks'; -export const autoformatRules = [ +export const autoformatRules: AutoformatRule[] = [ ...autoformatBlocks, - ...autoformatLists, ...autoformatMarks, - ...(autoformatSmartQuotes as MyAutoformatRule[]), - ...(autoformatPunctuation as MyAutoformatRule[]), - ...(autoformatLegal as MyAutoformatRule[]), - ...(autoformatLegalHtml as MyAutoformatRule[]), - ...(autoformatArrow as MyAutoformatRule[]), - ...(autoformatMath as MyAutoformatRule[]), + ...autoformatSmartQuotes, + ...autoformatPunctuation, + ...autoformatLegal, + ...autoformatLegalHtml, + ...autoformatArrow, + ...autoformatMath, ]; diff --git a/apps/www/src/lib/plate/demo/plugins/autoformatUtils.ts b/apps/www/src/lib/plate/demo/plugins/autoformatUtils.ts index 219ff43bc6..2ad1adc90f 100644 --- a/apps/www/src/lib/plate/demo/plugins/autoformatUtils.ts +++ b/apps/www/src/lib/plate/demo/plugins/autoformatUtils.ts @@ -3,16 +3,18 @@ import { ELEMENT_CODE_BLOCK, ELEMENT_CODE_LINE, } from '@udecode/plate-code-block'; -import { getParentNode, isElement, isType } from '@udecode/plate-common'; +import { + getParentNode, + isElement, + isType, + PlateEditor, +} from '@udecode/plate-common'; import { toggleList, unwrapList } from '@udecode/plate-list'; -import { MyEditor, MyValue } from '@/types/plate-types'; - -export const preFormat: AutoformatBlockRule['preFormat'] = ( - editor -) => unwrapList(editor); +export const preFormat: AutoformatBlockRule['preFormat'] = (editor) => + unwrapList(editor); -export const format = (editor: MyEditor, customFormatting: any) => { +export const format = (editor: PlateEditor, customFormatting: any) => { if (editor.selection) { const parentEntry = getParentNode(editor, editor.selection); if (!parentEntry) return; @@ -27,7 +29,7 @@ export const format = (editor: MyEditor, customFormatting: any) => { } }; -export const formatList = (editor: MyEditor, elementType: string) => { +export const formatList = (editor: PlateEditor, elementType: string) => { format(editor, () => toggleList(editor, { type: elementType, @@ -35,6 +37,6 @@ export const formatList = (editor: MyEditor, elementType: string) => { ); }; -export const formatText = (editor: MyEditor, text: string) => { +export const formatText = (editor: PlateEditor, text: string) => { format(editor, () => editor.insertText(text)); }; diff --git a/apps/www/src/registry/default/example/playground-demo.tsx b/apps/www/src/registry/default/example/playground-demo.tsx index da67856629..cbf449aa48 100644 --- a/apps/www/src/registry/default/example/playground-demo.tsx +++ b/apps/www/src/registry/default/example/playground-demo.tsx @@ -6,7 +6,9 @@ import { CommentsProvider } from '@/plate/demo/comments/CommentsProvider'; import { editableProps } from '@/plate/demo/editableProps'; import { isEnabled } from '@/plate/demo/is-enabled'; import { alignPlugin } from '@/plate/demo/plugins/alignPlugin'; -import { autoformatPlugin } from '@/plate/demo/plugins/autoformatPlugin'; +import { autoformatIndentLists } from '@/plate/demo/plugins/autoformatIndentLists'; +import { autoformatLists } from '@/plate/demo/plugins/autoformatLists'; +import { autoformatRules } from '@/plate/demo/plugins/autoformatRules'; import { dragOverCursorPlugin } from '@/plate/demo/plugins/dragOverCursorPlugin'; import { emojiPlugin } from '@/plate/demo/plugins/emojiPlugin'; import { exitBreakPlugin } from '@/plate/demo/plugins/exitBreakPlugin'; @@ -109,6 +111,21 @@ export const usePlaygroundPlugins = ({ } = {}) => { const enabled = settingsStore.use.checkedPlugins(); + const autoformatOptions = { + rules: [...autoformatRules], + enableUndoOnDelete: true, + }; + + if (id === 'indentlist') { + autoformatOptions.rules.push(...autoformatIndentLists); + } else if (id === 'list') { + autoformatOptions.rules.push(...autoformatLists); + } else if (!!enabled.listStyleType) { + autoformatOptions.rules.push(...autoformatIndentLists); + } else if (!!enabled.list) { + autoformatOptions.rules.push(...autoformatLists); + } + return useMemo( () => createMyPlugins( @@ -121,7 +138,7 @@ export const usePlaygroundPlugins = ({ createHorizontalRulePlugin({ enabled: !!enabled.hr }), createLinkPlugin({ ...linkPlugin, enabled: !!enabled.a }), createListPlugin({ - enabled: isEnabled('list', id) || !!enabled.list, + enabled: id === 'list' || !!enabled.list, }), createImagePlugin({ enabled: !!enabled.img }), createMediaEmbedPlugin({ enabled: !!enabled.media_embed }), @@ -150,7 +167,7 @@ export const usePlaygroundPlugins = ({ createAlignPlugin({ ...alignPlugin, enabled: !!enabled.align }), createIndentPlugin({ ...indentPlugin, enabled: !!enabled.indent }), createIndentListPlugin({ - enabled: isEnabled('indentlist', id) || !!enabled.listStyleType, + enabled: id === 'indentlist' || !!enabled.listStyleType, }), createLineHeightPlugin({ ...lineHeightPlugin, @@ -159,8 +176,8 @@ export const usePlaygroundPlugins = ({ // Functionality createAutoformatPlugin({ - ...(autoformatPlugin as any), enabled: !!enabled.autoformat, + options: autoformatOptions, }), createBlockSelectionPlugin({ options: { diff --git a/apps/www/src/registry/default/plate-ui/excalidraw-element.tsx b/apps/www/src/registry/default/plate-ui/excalidraw-element.tsx index 8fa7bfdeb3..4b4d6cfe31 100644 --- a/apps/www/src/registry/default/plate-ui/excalidraw-element.tsx +++ b/apps/www/src/registry/default/plate-ui/excalidraw-element.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { PlateElement, PlateElementProps, Value } from '@udecode/plate-common'; import { TExcalidrawElement, - useExalidawElement, + useExcalidrawElement, } from '@udecode/plate-excalidraw'; export function ExcalidrawElement({ @@ -11,7 +11,7 @@ export function ExcalidrawElement({ }: PlateElementProps) { const { children, element } = props; - const { Excalidraw, excalidrawProps } = useExalidawElement({ + const { Excalidraw, excalidrawProps } = useExcalidrawElement({ element, }); diff --git a/package.json b/package.json index 7dd252784b..f76a768fdc 100644 --- a/package.json +++ b/package.json @@ -63,8 +63,7 @@ }, "workspaces": [ "apps/*", - "packages/*", - "templates/*" + "packages/*" ], "resolutions": { "terser": "4.8.0", diff --git a/packages/excalidraw/CHANGELOG.md b/packages/excalidraw/CHANGELOG.md index c0f4536785..0ae339740a 100644 --- a/packages/excalidraw/CHANGELOG.md +++ b/packages/excalidraw/CHANGELOG.md @@ -10,4 +10,4 @@ - [#2471](https://github.com/udecode/plate/pull/2471) by [@zbeyens](https://github.com/zbeyens) – Renamed package to `@udecode/plate-excalidraw`. New hooks: - - `useExalidawElement` + - `useExcalidrawElement` diff --git a/packages/excalidraw/src/hooks/index.ts b/packages/excalidraw/src/hooks/index.ts index b5c34ae1e5..8f9e4059ba 100644 --- a/packages/excalidraw/src/hooks/index.ts +++ b/packages/excalidraw/src/hooks/index.ts @@ -2,4 +2,4 @@ * @file Automatically generated by barrelsby. */ -export * from './useExalidawElement'; +export * from './useExcalidrawElement'; diff --git a/packages/excalidraw/src/hooks/useExalidawElement.ts b/packages/excalidraw/src/hooks/useExcalidrawElement.ts similarity index 97% rename from packages/excalidraw/src/hooks/useExalidawElement.ts rename to packages/excalidraw/src/hooks/useExcalidrawElement.ts index 3676055c9e..710a5573ff 100644 --- a/packages/excalidraw/src/hooks/useExalidawElement.ts +++ b/packages/excalidraw/src/hooks/useExcalidrawElement.ts @@ -6,7 +6,7 @@ import { import { TExcalidrawElement, TExcalidrawProps } from '..'; -export const useExalidawElement = ({ +export const useExcalidrawElement = ({ element, libraryItems = [], scrollToContent = true, diff --git a/templates/plate-playground-template/src/components/plate-ui/excalidraw-element.tsx b/templates/plate-playground-template/src/components/plate-ui/excalidraw-element.tsx index 8fa7bfdeb3..4b4d6cfe31 100644 --- a/templates/plate-playground-template/src/components/plate-ui/excalidraw-element.tsx +++ b/templates/plate-playground-template/src/components/plate-ui/excalidraw-element.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { PlateElement, PlateElementProps, Value } from '@udecode/plate-common'; import { TExcalidrawElement, - useExalidawElement, + useExcalidrawElement, } from '@udecode/plate-excalidraw'; export function ExcalidrawElement({ @@ -11,7 +11,7 @@ export function ExcalidrawElement({ }: PlateElementProps) { const { children, element } = props; - const { Excalidraw, excalidrawProps } = useExalidawElement({ + const { Excalidraw, excalidrawProps } = useExcalidrawElement({ element, }); diff --git a/templates/plate-template/package.json b/templates/plate-template/package.json index d93e41439a..eb1100e86a 100644 --- a/templates/plate-template/package.json +++ b/templates/plate-template/package.json @@ -31,8 +31,8 @@ "next": "^13.4.9", "next-themes": "^0.2.1", "react": "^18.2.0", - "react-dnd": "16.0.1", - "react-dnd-html5-backend": "16.0.1", + "react-dnd": "15.1.2", + "react-dnd-html5-backend": "15.1.3", "react-dom": "^18.2.0", "sharp": "^0.32.1", "slate": "0.94.1", diff --git a/yarn.lock b/yarn.lock index d572e9c3ba..99d8b8583a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3381,13 +3381,6 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:13.4.10": - version: 13.4.10 - resolution: "@next/env@npm:13.4.10" - checksum: 6e12940aac2f8a383a5dfe5efcece80d53c4f5d267728074fba08fe1f68b7a31084357df91a015e4cee4406da5baf5fb48b4c347a99e0857b5d77b28ce96b520 - languageName: node - linkType: hard - "@next/env@npm:13.4.9": version: 13.4.9 resolution: "@next/env@npm:13.4.9" @@ -3404,22 +3397,6 @@ __metadata: languageName: node linkType: hard -"@next/eslint-plugin-next@npm:13.4.9": - version: 13.4.9 - resolution: "@next/eslint-plugin-next@npm:13.4.9" - dependencies: - glob: "npm:7.1.7" - checksum: 11da1ae67718cad20c00d83fbad2be0c095d9de402442b382d894d77f8a215312d473c9e6040da0bcec449c96d1095d2d44a62831957571f7e9976623c22be60 - languageName: node - linkType: hard - -"@next/swc-darwin-arm64@npm:13.4.10": - version: 13.4.10 - resolution: "@next/swc-darwin-arm64@npm:13.4.10" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "@next/swc-darwin-arm64@npm:13.4.9": version: 13.4.9 resolution: "@next/swc-darwin-arm64@npm:13.4.9" @@ -3427,13 +3404,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-x64@npm:13.4.10": - version: 13.4.10 - resolution: "@next/swc-darwin-x64@npm:13.4.10" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@next/swc-darwin-x64@npm:13.4.9": version: 13.4.9 resolution: "@next/swc-darwin-x64@npm:13.4.9" @@ -3441,13 +3411,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:13.4.10": - version: 13.4.10 - resolution: "@next/swc-linux-arm64-gnu@npm:13.4.10" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - "@next/swc-linux-arm64-gnu@npm:13.4.9": version: 13.4.9 resolution: "@next/swc-linux-arm64-gnu@npm:13.4.9" @@ -3455,13 +3418,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:13.4.10": - version: 13.4.10 - resolution: "@next/swc-linux-arm64-musl@npm:13.4.10" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - "@next/swc-linux-arm64-musl@npm:13.4.9": version: 13.4.9 resolution: "@next/swc-linux-arm64-musl@npm:13.4.9" @@ -3469,13 +3425,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:13.4.10": - version: 13.4.10 - resolution: "@next/swc-linux-x64-gnu@npm:13.4.10" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - "@next/swc-linux-x64-gnu@npm:13.4.9": version: 13.4.9 resolution: "@next/swc-linux-x64-gnu@npm:13.4.9" @@ -3483,13 +3432,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:13.4.10": - version: 13.4.10 - resolution: "@next/swc-linux-x64-musl@npm:13.4.10" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - "@next/swc-linux-x64-musl@npm:13.4.9": version: 13.4.9 resolution: "@next/swc-linux-x64-musl@npm:13.4.9" @@ -3497,13 +3439,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:13.4.10": - version: 13.4.10 - resolution: "@next/swc-win32-arm64-msvc@npm:13.4.10" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - "@next/swc-win32-arm64-msvc@npm:13.4.9": version: 13.4.9 resolution: "@next/swc-win32-arm64-msvc@npm:13.4.9" @@ -3511,13 +3446,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:13.4.10": - version: 13.4.10 - resolution: "@next/swc-win32-ia32-msvc@npm:13.4.10" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - "@next/swc-win32-ia32-msvc@npm:13.4.9": version: 13.4.9 resolution: "@next/swc-win32-ia32-msvc@npm:13.4.9" @@ -3525,13 +3453,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:13.4.10": - version: 13.4.10 - resolution: "@next/swc-win32-x64-msvc@npm:13.4.10" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@next/swc-win32-x64-msvc@npm:13.4.9": version: 13.4.9 resolution: "@next/swc-win32-x64-msvc@npm:13.4.9" @@ -4427,7 +4348,7 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-dropdown-menu@npm:2.0.5, @radix-ui/react-dropdown-menu@npm:^2.0.5": +"@radix-ui/react-dropdown-menu@npm:^2.0.5": version: 2.0.5 resolution: "@radix-ui/react-dropdown-menu@npm:2.0.5" dependencies: @@ -5220,7 +5141,7 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-toolbar@npm:1.0.4, @radix-ui/react-toolbar@npm:^1.0.4": +"@radix-ui/react-toolbar@npm:^1.0.4": version: 1.0.4 resolution: "@radix-ui/react-toolbar@npm:1.0.4" dependencies: @@ -5246,7 +5167,7 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-tooltip@npm:1.0.6, @radix-ui/react-tooltip@npm:^1.0.6": +"@radix-ui/react-tooltip@npm:^1.0.6": version: 1.0.6 resolution: "@radix-ui/react-tooltip@npm:1.0.6" dependencies: @@ -5494,13 +5415,6 @@ __metadata: languageName: node linkType: hard -"@react-dnd/asap@npm:^5.0.1": - version: 5.0.2 - resolution: "@react-dnd/asap@npm:5.0.2" - checksum: 6775539cf4cfc368791dc935e42ed33137af683d7de291dea5d475a50d24531689e9efc249da1fce9c707c04d52c30ee6b86c83c6de034f6cf4c7ea6ed541093 - languageName: node - linkType: hard - "@react-dnd/invariant@npm:3.0.1": version: 3.0.1 resolution: "@react-dnd/invariant@npm:3.0.1" @@ -5508,13 +5422,6 @@ __metadata: languageName: node linkType: hard -"@react-dnd/invariant@npm:^4.0.1": - version: 4.0.2 - resolution: "@react-dnd/invariant@npm:4.0.2" - checksum: b69665aab308b9bdd0eb231dd839b6cf803e7df5d15231c5f3e96b6b42d7471dd188ee924301466d86e4df056e4e95376f603afad50b78773458103d1b83f02b - languageName: node - linkType: hard - "@react-dnd/shallowequal@npm:3.0.1": version: 3.0.1 resolution: "@react-dnd/shallowequal@npm:3.0.1" @@ -5522,13 +5429,6 @@ __metadata: languageName: node linkType: hard -"@react-dnd/shallowequal@npm:^4.0.1": - version: 4.0.2 - resolution: "@react-dnd/shallowequal@npm:4.0.2" - checksum: 1c23d7038e88a658b7264c6818ff6e9bcff9c1773153ce604a5e5f3728978a99b8966595733d97ebd444be7737fb62c9505ce35e43c5033ecfb151feab2e95e0 - languageName: node - linkType: hard - "@react-stately/utils@npm:^3.6.0": version: 3.7.0 resolution: "@react-stately/utils@npm:3.7.0" @@ -6267,7 +6167,7 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:18.2.7, @types/react-dom@npm:^18.2.7": +"@types/react-dom@npm:18.2.7": version: 18.2.7 resolution: "@types/react-dom@npm:18.2.7" dependencies: @@ -6296,7 +6196,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:18.2.14, @types/react@npm:^18.2.14": +"@types/react@npm:18.2.14": version: 18.2.14 resolution: "@types/react@npm:18.2.14" dependencies: @@ -6690,7 +6590,7 @@ __metadata: languageName: node linkType: hard -"@udecode/plate-alignment@npm:22.0.2, @udecode/plate-alignment@npm:^22.0.2, @udecode/plate-alignment@workspace:^, @udecode/plate-alignment@workspace:packages/alignment": +"@udecode/plate-alignment@npm:22.0.2, @udecode/plate-alignment@workspace:^, @udecode/plate-alignment@workspace:packages/alignment": version: 0.0.0-use.local resolution: "@udecode/plate-alignment@workspace:packages/alignment" dependencies: @@ -6704,7 +6604,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-autoformat@npm:22.0.2, @udecode/plate-autoformat@npm:^22.0.2, @udecode/plate-autoformat@workspace:^, @udecode/plate-autoformat@workspace:packages/autoformat": +"@udecode/plate-autoformat@npm:22.0.2, @udecode/plate-autoformat@workspace:^, @udecode/plate-autoformat@workspace:packages/autoformat": version: 0.0.0-use.local resolution: "@udecode/plate-autoformat@workspace:packages/autoformat" dependencies: @@ -6736,7 +6636,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-basic-marks@npm:22.0.2, @udecode/plate-basic-marks@npm:^22.0.2, @udecode/plate-basic-marks@workspace:*, @udecode/plate-basic-marks@workspace:^, @udecode/plate-basic-marks@workspace:packages/basic-marks": +"@udecode/plate-basic-marks@npm:22.0.2, @udecode/plate-basic-marks@workspace:^, @udecode/plate-basic-marks@workspace:packages/basic-marks": version: 0.0.0-use.local resolution: "@udecode/plate-basic-marks@workspace:packages/basic-marks" dependencies: @@ -6750,7 +6650,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-block-quote@npm:22.0.2, @udecode/plate-block-quote@npm:^22.0.2, @udecode/plate-block-quote@workspace:*, @udecode/plate-block-quote@workspace:^, @udecode/plate-block-quote@workspace:packages/block-quote": +"@udecode/plate-block-quote@npm:22.0.2, @udecode/plate-block-quote@workspace:^, @udecode/plate-block-quote@workspace:packages/block-quote": version: 0.0.0-use.local resolution: "@udecode/plate-block-quote@workspace:packages/block-quote" dependencies: @@ -6764,7 +6664,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-break@npm:22.0.2, @udecode/plate-break@npm:^22.0.2, @udecode/plate-break@workspace:^, @udecode/plate-break@workspace:packages/break": +"@udecode/plate-break@npm:22.0.2, @udecode/plate-break@workspace:^, @udecode/plate-break@workspace:packages/break": version: 0.0.0-use.local resolution: "@udecode/plate-break@workspace:packages/break" dependencies: @@ -6795,7 +6695,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-code-block@npm:22.0.2, @udecode/plate-code-block@npm:^22.0.2, @udecode/plate-code-block@workspace:^, @udecode/plate-code-block@workspace:packages/code-block": +"@udecode/plate-code-block@npm:22.0.2, @udecode/plate-code-block@workspace:^, @udecode/plate-code-block@workspace:packages/code-block": version: 0.0.0-use.local resolution: "@udecode/plate-code-block@workspace:packages/code-block" dependencies: @@ -6810,7 +6710,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-combobox@npm:22.0.2, @udecode/plate-combobox@npm:^22.0.2, @udecode/plate-combobox@workspace:^, @udecode/plate-combobox@workspace:packages/combobox": +"@udecode/plate-combobox@npm:22.0.2, @udecode/plate-combobox@workspace:^, @udecode/plate-combobox@workspace:packages/combobox": version: 0.0.0-use.local resolution: "@udecode/plate-combobox@workspace:packages/combobox" dependencies: @@ -6825,7 +6725,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-comments@npm:22.0.2, @udecode/plate-comments@npm:^22.0.2, @udecode/plate-comments@workspace:^, @udecode/plate-comments@workspace:packages/comments": +"@udecode/plate-comments@npm:22.0.2, @udecode/plate-comments@workspace:^, @udecode/plate-comments@workspace:packages/comments": version: 0.0.0-use.local resolution: "@udecode/plate-comments@workspace:packages/comments" dependencies: @@ -6839,7 +6739,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-common@npm:22.0.2, @udecode/plate-common@npm:^22.0.2, @udecode/plate-common@workspace:*, @udecode/plate-common@workspace:^, @udecode/plate-common@workspace:packages/common": +"@udecode/plate-common@npm:22.0.2, @udecode/plate-common@workspace:^, @udecode/plate-common@workspace:packages/common": version: 0.0.0-use.local resolution: "@udecode/plate-common@workspace:packages/common" dependencies: @@ -6882,7 +6782,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-cursor@npm:^22.0.2, @udecode/plate-cursor@workspace:^, @udecode/plate-cursor@workspace:packages/cursor": +"@udecode/plate-cursor@workspace:^, @udecode/plate-cursor@workspace:packages/cursor": version: 0.0.0-use.local resolution: "@udecode/plate-cursor@workspace:packages/cursor" dependencies: @@ -6896,7 +6796,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-dnd@npm:^22.0.2, @udecode/plate-dnd@workspace:^, @udecode/plate-dnd@workspace:packages/dnd": +"@udecode/plate-dnd@workspace:^, @udecode/plate-dnd@workspace:packages/dnd": version: 0.0.0-use.local resolution: "@udecode/plate-dnd@workspace:packages/dnd" dependencies: @@ -6913,7 +6813,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-emoji@npm:^22.0.2, @udecode/plate-emoji@workspace:^, @udecode/plate-emoji@workspace:packages/emoji": +"@udecode/plate-emoji@workspace:^, @udecode/plate-emoji@workspace:packages/emoji": version: 0.0.0-use.local resolution: "@udecode/plate-emoji@workspace:packages/emoji" dependencies: @@ -6929,7 +6829,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-excalidraw@npm:^22.0.2, @udecode/plate-excalidraw@workspace:^, @udecode/plate-excalidraw@workspace:packages/excalidraw": +"@udecode/plate-excalidraw@workspace:^, @udecode/plate-excalidraw@workspace:packages/excalidraw": version: 0.0.0-use.local resolution: "@udecode/plate-excalidraw@workspace:packages/excalidraw" dependencies: @@ -6958,7 +6858,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-floating@npm:22.0.2, @udecode/plate-floating@npm:^22.0.2, @udecode/plate-floating@workspace:*, @udecode/plate-floating@workspace:^, @udecode/plate-floating@workspace:packages/floating": +"@udecode/plate-floating@npm:22.0.2, @udecode/plate-floating@workspace:^, @udecode/plate-floating@workspace:packages/floating": version: 0.0.0-use.local resolution: "@udecode/plate-floating@workspace:packages/floating" dependencies: @@ -6974,7 +6874,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-font@npm:22.0.2, @udecode/plate-font@npm:^22.0.2, @udecode/plate-font@workspace:^, @udecode/plate-font@workspace:packages/font": +"@udecode/plate-font@npm:22.0.2, @udecode/plate-font@workspace:^, @udecode/plate-font@workspace:packages/font": version: 0.0.0-use.local resolution: "@udecode/plate-font@workspace:packages/font" dependencies: @@ -6988,7 +6888,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-heading@npm:22.0.2, @udecode/plate-heading@npm:^22.0.2, @udecode/plate-heading@workspace:*, @udecode/plate-heading@workspace:^, @udecode/plate-heading@workspace:packages/heading": +"@udecode/plate-heading@npm:22.0.2, @udecode/plate-heading@workspace:^, @udecode/plate-heading@workspace:packages/heading": version: 0.0.0-use.local resolution: "@udecode/plate-heading@workspace:packages/heading" dependencies: @@ -7002,7 +6902,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-highlight@npm:22.0.2, @udecode/plate-highlight@npm:^22.0.2, @udecode/plate-highlight@workspace:^, @udecode/plate-highlight@workspace:packages/highlight": +"@udecode/plate-highlight@npm:22.0.2, @udecode/plate-highlight@workspace:^, @udecode/plate-highlight@workspace:packages/highlight": version: 0.0.0-use.local resolution: "@udecode/plate-highlight@workspace:packages/highlight" dependencies: @@ -7016,7 +6916,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-horizontal-rule@npm:22.0.2, @udecode/plate-horizontal-rule@npm:^22.0.2, @udecode/plate-horizontal-rule@workspace:^, @udecode/plate-horizontal-rule@workspace:packages/horizontal-rule": +"@udecode/plate-horizontal-rule@npm:22.0.2, @udecode/plate-horizontal-rule@workspace:^, @udecode/plate-horizontal-rule@workspace:packages/horizontal-rule": version: 0.0.0-use.local resolution: "@udecode/plate-horizontal-rule@workspace:packages/horizontal-rule" dependencies: @@ -7030,7 +6930,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-indent-list@npm:22.0.2, @udecode/plate-indent-list@npm:^22.0.2, @udecode/plate-indent-list@workspace:^, @udecode/plate-indent-list@workspace:packages/indent-list": +"@udecode/plate-indent-list@npm:22.0.2, @udecode/plate-indent-list@workspace:^, @udecode/plate-indent-list@workspace:packages/indent-list": version: 0.0.0-use.local resolution: "@udecode/plate-indent-list@workspace:packages/indent-list" dependencies: @@ -7046,7 +6946,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-indent@npm:22.0.2, @udecode/plate-indent@npm:^22.0.2, @udecode/plate-indent@workspace:^, @udecode/plate-indent@workspace:packages/indent": +"@udecode/plate-indent@npm:22.0.2, @udecode/plate-indent@workspace:^, @udecode/plate-indent@workspace:packages/indent": version: 0.0.0-use.local resolution: "@udecode/plate-indent@workspace:packages/indent" dependencies: @@ -7060,7 +6960,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-juice@npm:^22.0.2, @udecode/plate-juice@workspace:^, @udecode/plate-juice@workspace:packages/juice": +"@udecode/plate-juice@workspace:^, @udecode/plate-juice@workspace:packages/juice": version: 0.0.0-use.local resolution: "@udecode/plate-juice@workspace:packages/juice" dependencies: @@ -7075,7 +6975,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-kbd@npm:22.0.2, @udecode/plate-kbd@npm:^22.0.2, @udecode/plate-kbd@workspace:^, @udecode/plate-kbd@workspace:packages/kbd": +"@udecode/plate-kbd@npm:22.0.2, @udecode/plate-kbd@workspace:^, @udecode/plate-kbd@workspace:packages/kbd": version: 0.0.0-use.local resolution: "@udecode/plate-kbd@workspace:packages/kbd" dependencies: @@ -7089,7 +6989,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-line-height@npm:22.0.2, @udecode/plate-line-height@npm:^22.0.2, @udecode/plate-line-height@workspace:^, @udecode/plate-line-height@workspace:packages/line-height": +"@udecode/plate-line-height@npm:22.0.2, @udecode/plate-line-height@workspace:^, @udecode/plate-line-height@workspace:packages/line-height": version: 0.0.0-use.local resolution: "@udecode/plate-line-height@workspace:packages/line-height" dependencies: @@ -7103,7 +7003,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-link@npm:22.0.2, @udecode/plate-link@npm:^22.0.2, @udecode/plate-link@workspace:^, @udecode/plate-link@workspace:packages/link": +"@udecode/plate-link@npm:22.0.2, @udecode/plate-link@workspace:^, @udecode/plate-link@workspace:packages/link": version: 0.0.0-use.local resolution: "@udecode/plate-link@workspace:packages/link" dependencies: @@ -7118,7 +7018,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-list@npm:22.0.2, @udecode/plate-list@npm:^22.0.2, @udecode/plate-list@workspace:^, @udecode/plate-list@workspace:packages/list": +"@udecode/plate-list@npm:22.0.2, @udecode/plate-list@workspace:^, @udecode/plate-list@workspace:packages/list": version: 0.0.0-use.local resolution: "@udecode/plate-list@workspace:packages/list" dependencies: @@ -7133,7 +7033,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-media@npm:22.0.2, @udecode/plate-media@npm:^22.0.2, @udecode/plate-media@workspace:^, @udecode/plate-media@workspace:packages/media": +"@udecode/plate-media@npm:22.0.2, @udecode/plate-media@workspace:^, @udecode/plate-media@workspace:packages/media": version: 0.0.0-use.local resolution: "@udecode/plate-media@workspace:packages/media" dependencies: @@ -7151,7 +7051,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-mention@npm:22.0.2, @udecode/plate-mention@npm:^22.0.2, @udecode/plate-mention@workspace:^, @udecode/plate-mention@workspace:packages/mention": +"@udecode/plate-mention@npm:22.0.2, @udecode/plate-mention@workspace:^, @udecode/plate-mention@workspace:packages/mention": version: 0.0.0-use.local resolution: "@udecode/plate-mention@workspace:packages/mention" dependencies: @@ -7166,7 +7066,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-node-id@npm:22.0.2, @udecode/plate-node-id@npm:^22.0.2, @udecode/plate-node-id@workspace:^, @udecode/plate-node-id@workspace:packages/node-id": +"@udecode/plate-node-id@npm:22.0.2, @udecode/plate-node-id@workspace:^, @udecode/plate-node-id@workspace:packages/node-id": version: 0.0.0-use.local resolution: "@udecode/plate-node-id@workspace:packages/node-id" dependencies: @@ -7180,7 +7080,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-normalizers@npm:22.0.2, @udecode/plate-normalizers@npm:^22.0.2, @udecode/plate-normalizers@workspace:^, @udecode/plate-normalizers@workspace:packages/normalizers": +"@udecode/plate-normalizers@npm:22.0.2, @udecode/plate-normalizers@workspace:^, @udecode/plate-normalizers@workspace:packages/normalizers": version: 0.0.0-use.local resolution: "@udecode/plate-normalizers@workspace:packages/normalizers" dependencies: @@ -7194,7 +7094,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-paragraph@npm:22.0.2, @udecode/plate-paragraph@npm:^22.0.2, @udecode/plate-paragraph@workspace:*, @udecode/plate-paragraph@workspace:^, @udecode/plate-paragraph@workspace:packages/paragraph": +"@udecode/plate-paragraph@npm:22.0.2, @udecode/plate-paragraph@workspace:^, @udecode/plate-paragraph@workspace:packages/paragraph": version: 0.0.0-use.local resolution: "@udecode/plate-paragraph@workspace:packages/paragraph" dependencies: @@ -7208,7 +7108,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-reset-node@npm:22.0.2, @udecode/plate-reset-node@npm:^22.0.2, @udecode/plate-reset-node@workspace:^, @udecode/plate-reset-node@workspace:packages/reset-node": +"@udecode/plate-reset-node@npm:22.0.2, @udecode/plate-reset-node@workspace:^, @udecode/plate-reset-node@workspace:packages/reset-node": version: 0.0.0-use.local resolution: "@udecode/plate-reset-node@workspace:packages/reset-node" dependencies: @@ -7222,7 +7122,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-select@npm:22.0.2, @udecode/plate-select@npm:^22.0.2, @udecode/plate-select@workspace:^, @udecode/plate-select@workspace:packages/select": +"@udecode/plate-select@npm:22.0.2, @udecode/plate-select@workspace:^, @udecode/plate-select@workspace:packages/select": version: 0.0.0-use.local resolution: "@udecode/plate-select@workspace:packages/select" dependencies: @@ -7236,7 +7136,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-selection@npm:^22.0.2, @udecode/plate-selection@workspace:^, @udecode/plate-selection@workspace:packages/selection": +"@udecode/plate-selection@workspace:^, @udecode/plate-selection@workspace:packages/selection": version: 0.0.0-use.local resolution: "@udecode/plate-selection@workspace:packages/selection" dependencies: @@ -7252,7 +7152,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-serializer-csv@npm:22.0.2, @udecode/plate-serializer-csv@npm:^22.0.2, @udecode/plate-serializer-csv@workspace:^, @udecode/plate-serializer-csv@workspace:packages/serializer-csv": +"@udecode/plate-serializer-csv@npm:22.0.2, @udecode/plate-serializer-csv@workspace:^, @udecode/plate-serializer-csv@workspace:packages/serializer-csv": version: 0.0.0-use.local resolution: "@udecode/plate-serializer-csv@workspace:packages/serializer-csv" dependencies: @@ -7270,7 +7170,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-serializer-docx@npm:22.0.2, @udecode/plate-serializer-docx@npm:^22.0.2, @udecode/plate-serializer-docx@workspace:^, @udecode/plate-serializer-docx@workspace:packages/serializer-docx": +"@udecode/plate-serializer-docx@npm:22.0.2, @udecode/plate-serializer-docx@workspace:^, @udecode/plate-serializer-docx@workspace:packages/serializer-docx": version: 0.0.0-use.local resolution: "@udecode/plate-serializer-docx@workspace:packages/serializer-docx" dependencies: @@ -7292,7 +7192,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-serializer-html@npm:22.0.2, @udecode/plate-serializer-html@npm:^22.0.2, @udecode/plate-serializer-html@workspace:^, @udecode/plate-serializer-html@workspace:packages/serializer-html": +"@udecode/plate-serializer-html@npm:22.0.2, @udecode/plate-serializer-html@workspace:^, @udecode/plate-serializer-html@workspace:packages/serializer-html": version: 0.0.0-use.local resolution: "@udecode/plate-serializer-html@workspace:packages/serializer-html" dependencies: @@ -7309,7 +7209,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-serializer-md@npm:22.0.2, @udecode/plate-serializer-md@npm:^22.0.2, @udecode/plate-serializer-md@workspace:^, @udecode/plate-serializer-md@workspace:packages/serializer-md": +"@udecode/plate-serializer-md@npm:22.0.2, @udecode/plate-serializer-md@workspace:^, @udecode/plate-serializer-md@workspace:packages/serializer-md": version: 0.0.0-use.local resolution: "@udecode/plate-serializer-md@workspace:packages/serializer-md" dependencies: @@ -7345,7 +7245,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-tabbable@npm:22.0.2, @udecode/plate-tabbable@npm:^22.0.2, @udecode/plate-tabbable@workspace:^, @udecode/plate-tabbable@workspace:packages/tabbable": +"@udecode/plate-tabbable@npm:22.0.2, @udecode/plate-tabbable@workspace:^, @udecode/plate-tabbable@workspace:packages/tabbable": version: 0.0.0-use.local resolution: "@udecode/plate-tabbable@workspace:packages/tabbable" dependencies: @@ -7360,7 +7260,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-table@npm:22.0.2, @udecode/plate-table@npm:^22.0.2, @udecode/plate-table@workspace:^, @udecode/plate-table@workspace:packages/table": +"@udecode/plate-table@npm:22.0.2, @udecode/plate-table@workspace:^, @udecode/plate-table@workspace:packages/table": version: 0.0.0-use.local resolution: "@udecode/plate-table@workspace:packages/table" dependencies: @@ -7384,7 +7284,7 @@ __metadata: languageName: unknown linkType: soft -"@udecode/plate-trailing-block@npm:22.0.2, @udecode/plate-trailing-block@npm:^22.0.2, @udecode/plate-trailing-block@workspace:^, @udecode/plate-trailing-block@workspace:packages/trailing-block": +"@udecode/plate-trailing-block@npm:22.0.2, @udecode/plate-trailing-block@workspace:^, @udecode/plate-trailing-block@workspace:packages/trailing-block": version: 0.0.0-use.local resolution: "@udecode/plate-trailing-block@workspace:packages/trailing-block" dependencies: @@ -8438,7 +8338,7 @@ __metadata: languageName: node linkType: hard -"bl@npm:^4.0.3, bl@npm:^4.1.0": +"bl@npm:^4.1.0": version: 4.1.0 resolution: "bl@npm:4.1.0" dependencies: @@ -9061,13 +8961,6 @@ __metadata: languageName: node linkType: hard -"chownr@npm:^1.1.1": - version: 1.1.4 - resolution: "chownr@npm:1.1.4" - checksum: 011dfe9853fe7feed4fdcb25d2d3b2bf67957948f8e7988d7540aaf56e9cbfb5384d5b56808dfa140277be02401acdfa75f5b67b78576497e482ea8036666ed2 - languageName: node - linkType: hard - "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -9099,7 +8992,7 @@ __metadata: languageName: node linkType: hard -"class-variance-authority@npm:0.6.1, class-variance-authority@npm:^0.6.1": +"class-variance-authority@npm:^0.6.1": version: 0.6.1 resolution: "class-variance-authority@npm:0.6.1" dependencies: @@ -9217,7 +9110,7 @@ __metadata: languageName: node linkType: hard -"cmdk@npm:0.2.0, cmdk@npm:^0.2.0": +"cmdk@npm:^0.2.0": version: 0.2.0 resolution: "cmdk@npm:0.2.0" dependencies: @@ -9276,23 +9169,13 @@ __metadata: languageName: node linkType: hard -"color-name@npm:^1.0.0, color-name@npm:^1.1.4, color-name@npm:~1.1.4": +"color-name@npm:^1.1.4, color-name@npm:~1.1.4": version: 1.1.4 resolution: "color-name@npm:1.1.4" checksum: 80acf64638343898f5b36825f4c9715ced380e738400b308f3f90ca2327f2f98f0c2cfb1f1a6447f267a2e1d1ea2214f26e948d8acab547e5478e2b0816c7c30 languageName: node linkType: hard -"color-string@npm:^1.9.0": - version: 1.9.1 - resolution: "color-string@npm:1.9.1" - dependencies: - color-name: "npm:^1.0.0" - simple-swizzle: "npm:^0.2.2" - checksum: cf76db4143e9d375401d56831ec6bffdfff17aa90276a41dcbdb1723fd7242b2cb6ed2058901544af5823fdf152cdea02eda8546cdd3fe96d4a6a16920166902 - languageName: node - linkType: hard - "color-support@npm:^1.1.3": version: 1.1.3 resolution: "color-support@npm:1.1.3" @@ -9302,16 +9185,6 @@ __metadata: languageName: node linkType: hard -"color@npm:^4.2.3": - version: 4.2.3 - resolution: "color@npm:4.2.3" - dependencies: - color-convert: "npm:^2.0.1" - color-string: "npm:^1.9.0" - checksum: 6163589829b503c36000a0f2a5854661ecc1c1660d98a703a3230fb1b44b00a6b9804ac1cf8e77d05eab084e6ecac35c0a59d1791c6ff1508bee9636ae0b78b7 - languageName: node - linkType: hard - "colord@npm:^2.9.1": version: 2.9.3 resolution: "colord@npm:2.9.3" @@ -9984,15 +9857,6 @@ __metadata: languageName: node linkType: hard -"decompress-response@npm:^6.0.0": - version: 6.0.0 - resolution: "decompress-response@npm:6.0.0" - dependencies: - mimic-response: "npm:^3.1.0" - checksum: b4575b109e38fe4bc10a8dc1a9167490da2efc07449bdc2ac9e3444592ee892e84fa89974448639388ad1f56f3a16e95606f3ab9d0c3dbdb84f1cbe432252b9f - languageName: node - linkType: hard - "dedent@npm:^0.7.0": version: 0.7.0 resolution: "dedent@npm:0.7.0" @@ -10035,13 +9899,6 @@ __metadata: languageName: node linkType: hard -"deep-extend@npm:^0.6.0": - version: 0.6.0 - resolution: "deep-extend@npm:0.6.0" - checksum: 9320ad7378ceb509703180d40da1625393906f55beeb10b55d9a1d39dc77e6e56e76c09eef905320330f89738df2c40bdf0e85777d14d5d3a8059c3cabbf3919 - languageName: node - linkType: hard - "deep-is@npm:^0.1.3, deep-is@npm:~0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" @@ -10211,13 +10068,6 @@ __metadata: languageName: node linkType: hard -"detect-libc@npm:^2.0.0, detect-libc@npm:^2.0.1": - version: 2.0.1 - resolution: "detect-libc@npm:2.0.1" - checksum: 056a7941c5d60b4f40aa23b77f0bed29de4b3fe281f063812a67e4e6320a0efb1e4b811bf7b01e72b2b643ea009b14165e0b72588c08e1c8de2412945b4dcc6f - languageName: node - linkType: hard - "detect-newline@npm:^3.0.0": version: 3.1.0 resolution: "detect-newline@npm:3.1.0" @@ -10307,17 +10157,6 @@ __metadata: languageName: node linkType: hard -"dnd-core@npm:^16.0.1": - version: 16.0.1 - resolution: "dnd-core@npm:16.0.1" - dependencies: - "@react-dnd/asap": "npm:^5.0.1" - "@react-dnd/invariant": "npm:^4.0.1" - redux: "npm:^4.2.0" - checksum: 9d9fdeb65e70f644d9b941b2fa28c78e86a1ec574a7048186a50f4f62b838e1bbf5188700452eb85ed5ab4be12b26209dc5c7dde9a9226cbd079bc67360eb896 - languageName: node - linkType: hard - "doctrine@npm:^2.1.0": version: 2.1.0 resolution: "doctrine@npm:2.1.0" @@ -10523,15 +10362,6 @@ __metadata: languageName: node linkType: hard -"end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1": - version: 1.4.4 - resolution: "end-of-stream@npm:1.4.4" - dependencies: - once: "npm:^1.4.0" - checksum: fa73674a01c2e7a3e17c801cb916c1e0c77f2cc719a42cee1bb3ce3550b9425369e4d0a2b2ce6670cb8eff07d34e67333949c83a30e7ec94625cec68aa07664e - languageName: node - linkType: hard - "enhanced-resolve@npm:^5.12.0": version: 5.15.0 resolution: "enhanced-resolve@npm:5.15.0" @@ -10988,29 +10818,6 @@ __metadata: languageName: node linkType: hard -"eslint-config-next@npm:13.4.9": - version: 13.4.9 - resolution: "eslint-config-next@npm:13.4.9" - dependencies: - "@next/eslint-plugin-next": "npm:13.4.9" - "@rushstack/eslint-patch": "npm:^1.1.3" - "@typescript-eslint/parser": "npm:^5.42.0" - eslint-import-resolver-node: "npm:^0.3.6" - eslint-import-resolver-typescript: "npm:^3.5.2" - eslint-plugin-import: "npm:^2.26.0" - eslint-plugin-jsx-a11y: "npm:^6.5.1" - eslint-plugin-react: "npm:^7.31.7" - eslint-plugin-react-hooks: "npm:5.0.0-canary-7118f5dd7-20230705" - peerDependencies: - eslint: ^7.23.0 || ^8.0.0 - typescript: ">=3.3.1" - peerDependenciesMeta: - typescript: - optional: true - checksum: ef630d6cfad15632a9114d05253ed14fa31147c4d16138a6800c8ff8ed1dc93ef98a29eeb392ce892ef59c4b639bb7098541c62c998153dd28795e57357a28ed - languageName: node - linkType: hard - "eslint-config-next@npm:^13.4.9": version: 13.4.10 resolution: "eslint-config-next@npm:13.4.10" @@ -11449,7 +11256,7 @@ __metadata: languageName: node linkType: hard -"eslint@npm:8.44.0, eslint@npm:^8.44.0": +"eslint@npm:8.44.0": version: 8.44.0 resolution: "eslint@npm:8.44.0" dependencies: @@ -11722,13 +11529,6 @@ __metadata: languageName: node linkType: hard -"expand-template@npm:^2.0.3": - version: 2.0.3 - resolution: "expand-template@npm:2.0.3" - checksum: 11824d593f92f9ea6b8b29574db3bf904d1d910570176e5abbaba6e891a052784a0131f67d1d7c0831d9ea21630cf649d5aa661f21c22e0b2536635cfb6cb1a8 - languageName: node - linkType: hard - "expand-tilde@npm:^2.0.0, expand-tilde@npm:^2.0.2": version: 2.0.2 resolution: "expand-tilde@npm:2.0.2" @@ -12188,13 +11988,6 @@ __metadata: languageName: node linkType: hard -"fs-constants@npm:^1.0.0": - version: 1.0.0 - resolution: "fs-constants@npm:1.0.0" - checksum: fc080f48eec0d9cef6750e804f31c6ceac3f4222dfd7003c7ac350f6be91979b084d27e4249e8e66f54caf5ea0465721078934ce44302d9d725209830c8fd730 - languageName: node - linkType: hard - "fs-extra@npm:^10.0.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" @@ -12442,13 +12235,6 @@ __metadata: languageName: node linkType: hard -"github-from-package@npm:0.0.0": - version: 0.0.0 - resolution: "github-from-package@npm:0.0.0" - checksum: 5ef16dcb4ca336ddff2c479227ea252c808d785608f2851826d880e1c63c3e03855ffbf90f2f97f88a1858cba8c23e0687eba094da9b4f9fddde843bb7ca7502 - languageName: node - linkType: hard - "github-slugger@npm:^2.0.0": version: 2.0.0 resolution: "github-slugger@npm:2.0.0" @@ -13322,7 +13108,7 @@ __metadata: languageName: node linkType: hard -"ini@npm:^1.3.4, ini@npm:~1.3.0": +"ini@npm:^1.3.4": version: 1.3.8 resolution: "ini@npm:1.3.8" checksum: 37fad549288bc1d016dce7360166c87d28cd1e3ca4077bd30a1bd648285b9a4f6212062a121bec0f06673687a23642b1f945e940998055427c8c15fead710c3a @@ -13472,13 +13258,6 @@ __metadata: languageName: node linkType: hard -"is-arrayish@npm:^0.3.1": - version: 0.3.2 - resolution: "is-arrayish@npm:0.3.2" - checksum: aed0a701c526d97138e196db5e445da84fea5b649e9466c1d592d2fa7a2a12aa37acb03ca313c38341787dcec5c45b20559bb2abc101dad585d82227e6bc5480 - languageName: node - linkType: hard - "is-bigint@npm:^1.0.1": version: 1.0.4 resolution: "is-bigint@npm:1.0.4" @@ -16517,13 +16296,6 @@ __metadata: languageName: node linkType: hard -"mimic-response@npm:^3.1.0": - version: 3.1.0 - resolution: "mimic-response@npm:3.1.0" - checksum: 1d485ca418ab93d27d5a90b0ad701eee79fdf6a7dfd0342f7c83e1f2b421703eadadf9d1c968bff4749dcb42bb2148dc4b6bce795b7b357b46d47731353b7077 - languageName: node - linkType: hard - "min-indent@npm:^1.0.0, min-indent@npm:^1.0.1": version: 1.0.1 resolution: "min-indent@npm:1.0.1" @@ -16592,7 +16364,7 @@ __metadata: languageName: node linkType: hard -"minimist@npm:^1.2.0, minimist@npm:^1.2.3, minimist@npm:^1.2.5, minimist@npm:^1.2.6": +"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6": version: 1.2.8 resolution: "minimist@npm:1.2.8" checksum: 8598f846f2b7546b22b01ce486df27da216a302367afe17f2a032da12fcb8d33bfbf2c523051230864abf0b806748bd60d4cd0863fae35fe104da1ff6194a185 @@ -16690,13 +16462,6 @@ __metadata: languageName: node linkType: hard -"mkdirp-classic@npm:^0.5.2, mkdirp-classic@npm:^0.5.3": - version: 0.5.3 - resolution: "mkdirp-classic@npm:0.5.3" - checksum: 5afc1f004d905d299db7f58035f77a23b8703802e89486f09635971be0e6d09f409c2c862fe4c9a5bcba563675e831840fd0fd8b5c2f5bd41f6aa5a9e4b3bb3a - languageName: node - linkType: hard - "mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": version: 1.0.4 resolution: "mkdirp@npm:1.0.4" @@ -16784,13 +16549,6 @@ __metadata: languageName: node linkType: hard -"napi-build-utils@npm:^1.0.1": - version: 1.0.2 - resolution: "napi-build-utils@npm:1.0.2" - checksum: f8135037d1e07905c414f8bfbd40e6cc28473c6b24becee470dde4599eb2e431e248f5cb2af9af3f6cc92dc82a3158de739550c24e32c8a13d2441df23b3536a - languageName: node - linkType: hard - "natural-compare-lite@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare-lite@npm:1.4.0" @@ -16904,65 +16662,6 @@ __metadata: languageName: node linkType: hard -"next@npm:^13.4.9": - version: 13.4.10 - resolution: "next@npm:13.4.10" - dependencies: - "@next/env": "npm:13.4.10" - "@next/swc-darwin-arm64": "npm:13.4.10" - "@next/swc-darwin-x64": "npm:13.4.10" - "@next/swc-linux-arm64-gnu": "npm:13.4.10" - "@next/swc-linux-arm64-musl": "npm:13.4.10" - "@next/swc-linux-x64-gnu": "npm:13.4.10" - "@next/swc-linux-x64-musl": "npm:13.4.10" - "@next/swc-win32-arm64-msvc": "npm:13.4.10" - "@next/swc-win32-ia32-msvc": "npm:13.4.10" - "@next/swc-win32-x64-msvc": "npm:13.4.10" - "@swc/helpers": "npm:0.5.1" - busboy: "npm:1.6.0" - caniuse-lite: "npm:^1.0.30001406" - postcss: "npm:8.4.14" - styled-jsx: "npm:5.1.1" - watchpack: "npm:2.4.0" - zod: "npm:3.21.4" - peerDependencies: - "@opentelemetry/api": ^1.1.0 - fibers: ">= 3.1.0" - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - dependenciesMeta: - "@next/swc-darwin-arm64": - optional: true - "@next/swc-darwin-x64": - optional: true - "@next/swc-linux-arm64-gnu": - optional: true - "@next/swc-linux-arm64-musl": - optional: true - "@next/swc-linux-x64-gnu": - optional: true - "@next/swc-linux-x64-musl": - optional: true - "@next/swc-win32-arm64-msvc": - optional: true - "@next/swc-win32-ia32-msvc": - optional: true - "@next/swc-win32-x64-msvc": - optional: true - peerDependenciesMeta: - "@opentelemetry/api": - optional: true - fibers: - optional: true - sass: - optional: true - bin: - next: dist/bin/next - checksum: 9764810930e0b838c8598940b3292bd887cc8a92ac22b7e79429b26a2545530033a448361fa4bc2449a87f316b8a2ef06f6f0c2acc7bed5bd02305b5faea9f71 - languageName: node - linkType: hard - "no-case@npm:^3.0.4": version: 3.0.4 resolution: "no-case@npm:3.0.4" @@ -16973,24 +16672,6 @@ __metadata: languageName: node linkType: hard -"node-abi@npm:^3.3.0": - version: 3.45.0 - resolution: "node-abi@npm:3.45.0" - dependencies: - semver: "npm:^7.3.5" - checksum: 3d88d1503ba4e54a9f81389e6b70e03c9cded0a581fe4203e899ce68968844a2661cffae9bd9e8d705f0275bea91c6ad4c3e74feb44c3e3a8fe4ca60f9a2057b - languageName: node - linkType: hard - -"node-addon-api@npm:^6.1.0": - version: 6.1.0 - resolution: "node-addon-api@npm:6.1.0" - dependencies: - node-gyp: "npm:latest" - checksum: 868881a258ec40c180a540bc2eaf07844c44aad6965a5335a76eb05019790ef238412a6a23e757e462f5d1d9d9332dde97fb09a8642f7048b20c4313f708d98d - languageName: node - linkType: hard - "node-domexception@npm:^1.0.0": version: 1.0.0 resolution: "node-domexception@npm:1.0.0" @@ -17343,7 +17024,7 @@ __metadata: languageName: node linkType: hard -"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": +"once@npm:^1.3.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -18089,149 +17770,6 @@ __metadata: languageName: node linkType: hard -"plate-playground-template@workspace:templates/plate-playground-template": - version: 0.0.0-use.local - resolution: "plate-playground-template@workspace:templates/plate-playground-template" - dependencies: - "@ianvs/prettier-plugin-sort-imports": "npm:^4.0.2" - "@radix-ui/react-avatar": "npm:^1.0.3" - "@radix-ui/react-checkbox": "npm:^1.0.4" - "@radix-ui/react-dialog": "npm:^1.0.4" - "@radix-ui/react-dropdown-menu": "npm:2.0.5" - "@radix-ui/react-popover": "npm:^1.0.6" - "@radix-ui/react-scroll-area": "npm:^1.0.4" - "@radix-ui/react-separator": "npm:^1.0.3" - "@radix-ui/react-slot": "npm:^1.0.2" - "@radix-ui/react-toggle": "npm:^1.0.3" - "@radix-ui/react-toolbar": "npm:^1.0.4" - "@radix-ui/react-tooltip": "npm:^1.0.6" - "@types/node": "npm:^20.4.2" - "@types/react": "npm:^18.2.14" - "@types/react-dom": "npm:^18.2.7" - "@typescript-eslint/parser": "npm:^6.0.0" - "@udecode/plate-alignment": "npm:^22.0.2" - "@udecode/plate-autoformat": "npm:^22.0.2" - "@udecode/plate-basic-marks": "npm:^22.0.2" - "@udecode/plate-block-quote": "npm:^22.0.2" - "@udecode/plate-break": "npm:^22.0.2" - "@udecode/plate-code-block": "npm:^22.0.2" - "@udecode/plate-combobox": "npm:^22.0.2" - "@udecode/plate-comments": "npm:^22.0.2" - "@udecode/plate-common": "npm:^22.0.2" - "@udecode/plate-cursor": "npm:^22.0.2" - "@udecode/plate-dnd": "npm:^22.0.2" - "@udecode/plate-emoji": "npm:^22.0.2" - "@udecode/plate-excalidraw": "npm:^22.0.2" - "@udecode/plate-floating": "npm:^22.0.2" - "@udecode/plate-font": "npm:^22.0.2" - "@udecode/plate-heading": "npm:^22.0.2" - "@udecode/plate-highlight": "npm:^22.0.2" - "@udecode/plate-horizontal-rule": "npm:^22.0.2" - "@udecode/plate-indent": "npm:^22.0.2" - "@udecode/plate-indent-list": "npm:^22.0.2" - "@udecode/plate-juice": "npm:^22.0.2" - "@udecode/plate-kbd": "npm:^22.0.2" - "@udecode/plate-line-height": "npm:^22.0.2" - "@udecode/plate-link": "npm:^22.0.2" - "@udecode/plate-list": "npm:^22.0.2" - "@udecode/plate-media": "npm:^22.0.2" - "@udecode/plate-mention": "npm:^22.0.2" - "@udecode/plate-node-id": "npm:^22.0.2" - "@udecode/plate-normalizers": "npm:^22.0.2" - "@udecode/plate-paragraph": "npm:^22.0.2" - "@udecode/plate-reset-node": "npm:^22.0.2" - "@udecode/plate-select": "npm:^22.0.2" - "@udecode/plate-selection": "npm:^22.0.2" - "@udecode/plate-serializer-csv": "npm:^22.0.2" - "@udecode/plate-serializer-docx": "npm:^22.0.2" - "@udecode/plate-serializer-html": "npm:^22.0.2" - "@udecode/plate-serializer-md": "npm:^22.0.2" - "@udecode/plate-tabbable": "npm:^22.0.2" - "@udecode/plate-table": "npm:^22.0.2" - "@udecode/plate-trailing-block": "npm:^22.0.2" - autoprefixer: "npm:^10.4.14" - class-variance-authority: "npm:0.6.1" - clsx: "npm:1.2.1" - cmdk: "npm:0.2.0" - date-fns: "npm:^2.30.0" - encoding: "npm:^0.1.13" - eslint: "npm:^8.44.0" - eslint-config-next: "npm:13.4.9" - eslint-config-prettier: "npm:^8.8.0" - eslint-plugin-prettier: "npm:^5.0.0" - eslint-plugin-react: "npm:^7.32.2" - eslint-plugin-tailwindcss: "npm:^3.13.0" - eslint-plugin-unused-imports: "npm:^3.0.0" - lucide-react: "npm:0.260.0" - next: "npm:^13.4.9" - next-themes: "npm:^0.2.1" - postcss: "npm:^8.4.25" - prettier: "npm:^3.0.0" - react: "npm:^18.2.0" - react-dnd: "npm:15.1.2" - react-dnd-html5-backend: "npm:15.1.3" - react-dom: "npm:^18.2.0" - slate: "npm:0.94.1" - slate-history: "npm:0.93.0" - slate-react: "npm:^0.97.2" - tailwind-merge: "npm:1.13.2" - tailwindcss: "npm:^3.3.2" - tailwindcss-animate: "npm:1.0.6" - typescript: "npm:5.1.6" - languageName: unknown - linkType: soft - -"plate-template@workspace:templates/plate-template": - version: 0.0.0-use.local - resolution: "plate-template@workspace:templates/plate-template" - dependencies: - "@ianvs/prettier-plugin-sort-imports": "npm:^4.0.2" - "@radix-ui/react-dropdown-menu": "npm:2.0.5" - "@radix-ui/react-separator": "npm:1.0.3" - "@radix-ui/react-slot": "npm:1.0.2" - "@radix-ui/react-toggle": "npm:1.0.3" - "@radix-ui/react-toolbar": "npm:1.0.4" - "@radix-ui/react-tooltip": "npm:1.0.6" - "@types/node": "npm:^20.4.2" - "@types/react": "npm:^18.2.14" - "@types/react-dom": "npm:^18.2.7" - "@typescript-eslint/parser": "npm:^6.0.0" - "@udecode/plate-basic-marks": "workspace:*" - "@udecode/plate-block-quote": "workspace:*" - "@udecode/plate-common": "workspace:*" - "@udecode/plate-floating": "workspace:*" - "@udecode/plate-heading": "workspace:*" - "@udecode/plate-paragraph": "workspace:*" - autoprefixer: "npm:^10.4.14" - class-variance-authority: "npm:0.6.1" - clsx: "npm:1.2.1" - cmdk: "npm:0.2.0" - eslint: "npm:^8.44.0" - eslint-config-next: "npm:13.4.9" - eslint-config-prettier: "npm:^8.8.0" - eslint-plugin-react: "npm:^7.32.2" - eslint-plugin-tailwindcss: "npm:^3.13.0" - eslint-plugin-unused-imports: "npm:^3.0.0" - lucide-react: "npm:0.260.0" - next: "npm:^13.4.9" - next-themes: "npm:^0.2.1" - postcss: "npm:^8.4.25" - prettier: "npm:^3.0.0" - react: "npm:^18.2.0" - react-dnd: "npm:16.0.1" - react-dnd-html5-backend: "npm:16.0.1" - react-dom: "npm:^18.2.0" - sharp: "npm:^0.32.1" - slate: "npm:0.94.1" - slate-history: "npm:0.93.0" - slate-react: "npm:^0.97.1" - tailwind-merge: "npm:1.13.2" - tailwindcss: "npm:^3.3.2" - tailwindcss-animate: "npm:1.0.6" - typescript: "npm:5.1.6" - languageName: unknown - linkType: soft - "playwright-core@npm:1.36.0": version: 1.36.0 resolution: "playwright-core@npm:1.36.0" @@ -18764,28 +18302,6 @@ __metadata: languageName: node linkType: hard -"prebuild-install@npm:^7.1.1": - version: 7.1.1 - resolution: "prebuild-install@npm:7.1.1" - dependencies: - detect-libc: "npm:^2.0.0" - expand-template: "npm:^2.0.3" - github-from-package: "npm:0.0.0" - minimist: "npm:^1.2.3" - mkdirp-classic: "npm:^0.5.3" - napi-build-utils: "npm:^1.0.1" - node-abi: "npm:^3.3.0" - pump: "npm:^3.0.0" - rc: "npm:^1.2.7" - simple-get: "npm:^4.0.0" - tar-fs: "npm:^2.0.0" - tunnel-agent: "npm:^0.6.0" - bin: - prebuild-install: bin.js - checksum: 3ad2c49cbd7e7d52a6c6967ee3ca6f3f333f301a70866f21accadb9e29dbbf905e76ac543cfe3a1911fbd583bbe39f05b944278439e6ae402f0e9df768c3a0ee - languageName: node - linkType: hard - "preferred-pm@npm:^3.0.0": version: 3.0.3 resolution: "preferred-pm@npm:3.0.3" @@ -19078,16 +18594,6 @@ __metadata: languageName: node linkType: hard -"pump@npm:^3.0.0": - version: 3.0.0 - resolution: "pump@npm:3.0.0" - dependencies: - end-of-stream: "npm:^1.1.0" - once: "npm:^1.3.1" - checksum: b2e6702ce154c091b2895cf6f09b35d4db783a3b9658c177387ff6ad00c0e9f6dd9fc5c70f64a3b360bc3624340fca69ff565fad586a206d6818f5e87d836420 - languageName: node - linkType: hard - "punycode@npm:^2.1.0, punycode@npm:^2.1.1": version: 2.3.0 resolution: "punycode@npm:2.3.0" @@ -19151,21 +18657,7 @@ __metadata: languageName: node linkType: hard -"rc@npm:^1.2.7": - version: 1.2.8 - resolution: "rc@npm:1.2.8" - dependencies: - deep-extend: "npm:^0.6.0" - ini: "npm:~1.3.0" - minimist: "npm:^1.2.0" - strip-json-comments: "npm:~2.0.1" - bin: - rc: ./cli.js - checksum: 3dec0a5ac3d9400f510ed9eccc86c5a503ba6bf6865c30e16d57bcf6c53f4f2854138ede1e645d7e3fa6f6cd293daa384a1e4e0bd505688e79b0150ef2642949 - languageName: node - linkType: hard - -"react-dnd-html5-backend@npm:15.1.3, react-dnd-html5-backend@npm:^15.1.3": +"react-dnd-html5-backend@npm:^15.1.3": version: 15.1.3 resolution: "react-dnd-html5-backend@npm:15.1.3" dependencies: @@ -19174,15 +18666,6 @@ __metadata: languageName: node linkType: hard -"react-dnd-html5-backend@npm:16.0.1": - version: 16.0.1 - resolution: "react-dnd-html5-backend@npm:16.0.1" - dependencies: - dnd-core: "npm:^16.0.1" - checksum: 03286ab7d67799264ded9014919972474a1249809e47bdb95ef91c594e85ea98f750b7fc2844758145fc50d5061a9ef4a2fc9bf7e7f4a0af6162743758ed4a73 - languageName: node - linkType: hard - "react-dnd-test-backend@npm:^15.1.2": version: 15.1.2 resolution: "react-dnd-test-backend@npm:15.1.2" @@ -19217,31 +18700,6 @@ __metadata: languageName: node linkType: hard -"react-dnd@npm:16.0.1": - version: 16.0.1 - resolution: "react-dnd@npm:16.0.1" - dependencies: - "@react-dnd/invariant": "npm:^4.0.1" - "@react-dnd/shallowequal": "npm:^4.0.1" - dnd-core: "npm:^16.0.1" - fast-deep-equal: "npm:^3.1.3" - hoist-non-react-statics: "npm:^3.3.2" - peerDependencies: - "@types/hoist-non-react-statics": ">= 3.3.1" - "@types/node": ">= 12" - "@types/react": ">= 16" - react: ">= 16.14" - peerDependenciesMeta: - "@types/hoist-non-react-statics": - optional: true - "@types/node": - optional: true - "@types/react": - optional: true - checksum: 371835b01d0e6e9163bf0cea0ebc43ab09a6b492b2e4c98ec48169aa09d5569fcd29c5030aa7a06e73ecd70a5bdeb9dcfdc38966b89dfe0cb5beb7f5b79d9a8d - languageName: node - linkType: hard - "react-dnd@patch:react-dnd@npm%3A15.1.2#~/.yarn/patches/react-dnd-npm-15.1.2-0351d81431.patch": version: 15.1.2 resolution: "react-dnd@patch:react-dnd@npm%3A15.1.2#~/.yarn/patches/react-dnd-npm-15.1.2-0351d81431.patch::version=15.1.2&hash=b9133b" @@ -19592,7 +19050,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^3.0.2, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": +"readable-stream@npm:^3.0.2, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -19643,7 +19101,7 @@ __metadata: languageName: node linkType: hard -"redux@npm:^4.1.2, redux@npm:^4.2.0": +"redux@npm:^4.1.2": version: 4.2.1 resolution: "redux@npm:4.2.1" dependencies: @@ -20791,23 +20249,6 @@ __metadata: languageName: node linkType: hard -"sharp@npm:^0.32.1": - version: 0.32.1 - resolution: "sharp@npm:0.32.1" - dependencies: - color: "npm:^4.2.3" - detect-libc: "npm:^2.0.1" - node-addon-api: "npm:^6.1.0" - node-gyp: "npm:latest" - prebuild-install: "npm:^7.1.1" - semver: "npm:^7.5.0" - simple-get: "npm:^4.0.1" - tar-fs: "npm:^2.1.1" - tunnel-agent: "npm:^0.6.0" - checksum: 3bd31f361efae39f11ea0d74573beead26eeeb4a14b3ccea84c142d9f0fc57d32b7808c53f8e3f6b3ca1f31214d975b379478741d3c5f1097d2a0e5640957a03 - languageName: node - linkType: hard - "shebang-command@npm:^1.2.0": version: 1.2.0 resolution: "shebang-command@npm:1.2.0" @@ -20901,33 +20342,6 @@ __metadata: languageName: node linkType: hard -"simple-concat@npm:^1.0.0": - version: 1.0.1 - resolution: "simple-concat@npm:1.0.1" - checksum: 1a041737314d8b49247072adf25990fa56430c2f71f3c129013fa275e0d725d935c2e2ca33bd10c22f1391047a8a94e01db3c149bda30b8e2480a833c99b9a30 - languageName: node - linkType: hard - -"simple-get@npm:^4.0.0, simple-get@npm:^4.0.1": - version: 4.0.1 - resolution: "simple-get@npm:4.0.1" - dependencies: - decompress-response: "npm:^6.0.0" - once: "npm:^1.3.1" - simple-concat: "npm:^1.0.0" - checksum: f44b953899a2df12012150e834cc1d731d366e3e7b72f6e5d04d48d6750098afd21b7813a7e7aa1f8dcbf24915c80730df63c6c27c1b0f851b9245211cf8f0a2 - languageName: node - linkType: hard - -"simple-swizzle@npm:^0.2.2": - version: 0.2.2 - resolution: "simple-swizzle@npm:0.2.2" - dependencies: - is-arrayish: "npm:^0.3.1" - checksum: da2f0812cd395009bbe2fd2fe803300a63025f7f330c1492ea41e2b4a819138806a2a99c05ae1527cb750da43ff9dc2ccde294ad1e998cedbd459cb068dc68a3 - languageName: node - linkType: hard - "sisteransi@npm:^1.0.5": version: 1.0.5 resolution: "sisteransi@npm:1.0.5" @@ -20999,27 +20413,6 @@ __metadata: languageName: node linkType: hard -"slate-react@npm:^0.97.2": - version: 0.97.2 - resolution: "slate-react@npm:0.97.2" - dependencies: - "@juggle/resize-observer": "npm:^3.4.0" - "@types/is-hotkey": "npm:^0.1.1" - "@types/lodash": "npm:^4.14.149" - direction: "npm:^1.0.3" - is-hotkey: "npm:^0.1.6" - is-plain-object: "npm:^5.0.0" - lodash: "npm:^4.17.4" - scroll-into-view-if-needed: "npm:^2.2.20" - tiny-invariant: "npm:1.0.6" - peerDependencies: - react: ">=16.8.0" - react-dom: ">=16.8.0" - slate: ">=0.65.3" - checksum: d4d7670a28dbc04802ca84f6392381e945ce4c07b2ce59cb8b42ab65d2710a56761fab3c93905968856e6a05e66112f50dd36382e471c9cb68cabc79577cfdc5 - languageName: node - linkType: hard - "slate-test-utils@npm:1.3.2": version: 1.3.2 resolution: "slate-test-utils@npm:1.3.2" @@ -21530,13 +20923,6 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:~2.0.1": - version: 2.0.1 - resolution: "strip-json-comments@npm:2.0.1" - checksum: 4c86af52d848e6cddafdf933702453a3ab3210e9a014c882ce7e271a7d09d413642b796b07c9b597bc0ea5b93d5aab71756cf3d4b2a5ca2d9db2a7be84ae49d9 - languageName: node - linkType: hard - "strip-literal@npm:^1.0.1": version: 1.0.1 resolution: "strip-literal@npm:1.0.1" @@ -21704,14 +21090,14 @@ __metadata: languageName: node linkType: hard -"tailwind-merge@npm:1.13.2, tailwind-merge@npm:^1.13.2": +"tailwind-merge@npm:^1.13.2": version: 1.13.2 resolution: "tailwind-merge@npm:1.13.2" checksum: 9e4ecc2f26ce40bd632fdf21e4bfa4c0669950b3b35422fede0083eede46a272314dc35109fab4cff58270c3b702a6857cee1d29100b6f159b51829fecf0a406 languageName: node linkType: hard -"tailwindcss-animate@npm:1.0.6, tailwindcss-animate@npm:^1.0.6": +"tailwindcss-animate@npm:^1.0.6": version: 1.0.6 resolution: "tailwindcss-animate@npm:1.0.6" peerDependencies: @@ -21761,31 +21147,6 @@ __metadata: languageName: node linkType: hard -"tar-fs@npm:^2.0.0, tar-fs@npm:^2.1.1": - version: 2.1.1 - resolution: "tar-fs@npm:2.1.1" - dependencies: - chownr: "npm:^1.1.1" - mkdirp-classic: "npm:^0.5.2" - pump: "npm:^3.0.0" - tar-stream: "npm:^2.1.4" - checksum: eedd9484fb8f7301e7dfda1177c8db76427b99fbd6ea9c3bb056bce44301f59890bb4143dfc02aed30d454e92a3ca63189167a71595476f2f5b293d993a14d6d - languageName: node - linkType: hard - -"tar-stream@npm:^2.1.4": - version: 2.2.0 - resolution: "tar-stream@npm:2.2.0" - dependencies: - bl: "npm:^4.0.3" - end-of-stream: "npm:^1.4.1" - fs-constants: "npm:^1.0.0" - inherits: "npm:^2.0.3" - readable-stream: "npm:^3.1.1" - checksum: c0c8df70dbca1da9fc5dc89046b972ee9703ee0d07e096749e5c60f4847dd912e99da1dbb9cb9bd87be0deba550e60dbec2477a1c44c000435ceb5a909f5db5f - languageName: node - linkType: hard - "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.1.15 resolution: "tar@npm:6.1.15" @@ -22282,15 +21643,6 @@ __metadata: languageName: node linkType: hard -"tunnel-agent@npm:^0.6.0": - version: 0.6.0 - resolution: "tunnel-agent@npm:0.6.0" - dependencies: - safe-buffer: "npm:^5.0.1" - checksum: 04bb1f31a4f757d78547536d3c58bf7d24645735ecc5af75536cf9ee46e8d4d8c802518a16062d9c07f78874946dd2ea600d2df42e5c538cdd9a414994bce54d - languageName: node - linkType: hard - "turbo-darwin-64@npm:1.10.7": version: 1.10.7 resolution: "turbo-darwin-64@npm:1.10.7"