@soul-refiner/design-system 1.4.2 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/components/editor/constants.d.ts +5 -14
  2. package/dist/components/editor/constants.js +6 -13
  3. package/dist/components/editor/editor.js +3 -3
  4. package/dist/components/editor/icons/border-all.d.ts +3 -0
  5. package/dist/components/editor/icons/border-all.js +3 -0
  6. package/dist/components/editor/icons/border-bottom.d.ts +3 -0
  7. package/dist/components/editor/icons/border-bottom.js +3 -0
  8. package/dist/components/editor/icons/border-left.d.ts +3 -0
  9. package/dist/components/editor/icons/border-left.js +3 -0
  10. package/dist/components/editor/icons/border-none.d.ts +3 -0
  11. package/dist/components/editor/icons/border-none.js +3 -0
  12. package/dist/components/editor/icons/border-right.d.ts +3 -0
  13. package/dist/components/editor/icons/border-right.js +3 -0
  14. package/dist/components/editor/icons/border-top.d.ts +3 -0
  15. package/dist/components/editor/icons/border-top.js +3 -0
  16. package/dist/components/editor/icons/index.d.ts +6 -0
  17. package/dist/components/editor/icons/index.js +6 -0
  18. package/dist/components/editor/navbar/navbar.js +8 -3
  19. package/dist/components/editor/plugins/{blockquote.js → blocks/blockquote.js} +1 -1
  20. package/dist/components/editor/plugins/blocks/blocks.d.ts +1 -0
  21. package/dist/components/editor/plugins/blocks/blocks.js +50 -0
  22. package/dist/components/editor/plugins/{buttons.js → blocks/buttons.js} +2 -2
  23. package/dist/components/editor/plugins/blocks/dropdown-menu.d.ts +29 -0
  24. package/dist/components/editor/plugins/blocks/dropdown-menu.js +62 -0
  25. package/dist/components/editor/plugins/blocks/index.d.ts +1 -0
  26. package/dist/components/editor/plugins/blocks/index.js +1 -0
  27. package/dist/components/editor/plugins/blocks/plate-button.d.ts +14 -0
  28. package/dist/components/editor/plugins/blocks/plate-button.js +37 -0
  29. package/dist/components/editor/plugins/blocks/popover.d.ts +7 -0
  30. package/dist/components/editor/plugins/blocks/popover.js +11 -0
  31. package/dist/components/editor/plugins/{qa.js → blocks/qa.js} +8 -8
  32. package/dist/components/editor/plugins/blocks/resizable.d.ts +39 -0
  33. package/dist/components/editor/plugins/blocks/resizable.js +37 -0
  34. package/dist/components/editor/plugins/blocks/separator.d.ts +5 -0
  35. package/dist/components/editor/plugins/blocks/separator.js +19 -0
  36. package/dist/components/editor/plugins/blocks/table-cell.d.ts +23 -0
  37. package/dist/components/editor/plugins/blocks/table-cell.js +38 -0
  38. package/dist/components/editor/plugins/blocks/table-row.d.ts +11 -0
  39. package/dist/components/editor/plugins/blocks/table-row.js +7 -0
  40. package/dist/components/editor/plugins/blocks/table.d.ts +12 -0
  41. package/dist/components/editor/plugins/blocks/table.js +82 -0
  42. package/dist/components/editor/plugins/{text.js → blocks/text.js} +3 -3
  43. package/dist/components/editor/plugins/{video.js → blocks/video.js} +2 -2
  44. package/dist/components/editor/plugins/index.d.ts +4 -7
  45. package/dist/components/editor/plugins/index.js +4 -112
  46. package/dist/components/editor/plugins/leafs/index.d.ts +1 -0
  47. package/dist/components/editor/plugins/leafs/index.js +1 -0
  48. package/dist/components/editor/plugins/leafs/leafs.d.ts +1 -0
  49. package/dist/components/editor/plugins/leafs/leafs.js +33 -0
  50. package/dist/components/editor/plugins/{link.js → leafs/link.js} +2 -2
  51. package/dist/components/editor/plugins/marks/index.d.ts +1 -0
  52. package/dist/components/editor/plugins/marks/index.js +1 -0
  53. package/dist/components/editor/plugins/marks/marks.d.ts +1 -0
  54. package/dist/components/editor/plugins/marks/marks.js +12 -0
  55. package/dist/components/editor/plugins/plate.d.ts +74 -0
  56. package/dist/components/editor/{plate.js → plugins/plate.js} +14 -7
  57. package/dist/components/editor/plugins/{exitBreak.js → utils/exitBreak.js} +1 -1
  58. package/dist/components/editor/plugins/utils/index.d.ts +1 -0
  59. package/dist/components/editor/plugins/utils/index.js +1 -0
  60. package/dist/components/editor/plugins/{resetBlockType.js → utils/resetBlockType.js} +1 -1
  61. package/dist/components/editor/plugins/{selectOnBackspace.js → utils/selectOnBackspace.js} +1 -1
  62. package/dist/components/editor/plugins/utils/utils.d.ts +1 -0
  63. package/dist/components/editor/plugins/utils/utils.js +12 -0
  64. package/dist/components/editor/simple_editor/plugins.js +7 -7
  65. package/dist/styles/output.css +1723 -0
  66. package/package.json +15 -4
  67. package/dist/components/editor/plate.d.ts +0 -34
  68. /package/dist/components/editor/plugins/{blockquote.d.ts → blocks/blockquote.d.ts} +0 -0
  69. /package/dist/components/editor/plugins/{buttons.d.ts → blocks/buttons.d.ts} +0 -0
  70. /package/dist/components/editor/plugins/{image.d.ts → blocks/image.d.ts} +0 -0
  71. /package/dist/components/editor/plugins/{image.js → blocks/image.js} +0 -0
  72. /package/dist/components/editor/plugins/{list.d.ts → blocks/list.d.ts} +0 -0
  73. /package/dist/components/editor/plugins/{list.js → blocks/list.js} +0 -0
  74. /package/dist/components/editor/plugins/{qa.d.ts → blocks/qa.d.ts} +0 -0
  75. /package/dist/components/editor/plugins/{text.d.ts → blocks/text.d.ts} +0 -0
  76. /package/dist/components/editor/plugins/{video.d.ts → blocks/video.d.ts} +0 -0
  77. /package/dist/components/editor/plugins/{link.d.ts → leafs/link.d.ts} +0 -0
  78. /package/dist/components/editor/plugins/{exitBreak.d.ts → utils/exitBreak.d.ts} +0 -0
  79. /package/dist/components/editor/plugins/{resetBlockType.d.ts → utils/resetBlockType.d.ts} +0 -0
  80. /package/dist/components/editor/plugins/{selectOnBackspace.d.ts → utils/selectOnBackspace.d.ts} +0 -0
  81. /package/dist/components/editor/plugins/{softBreak.d.ts → utils/softBreak.d.ts} +0 -0
  82. /package/dist/components/editor/plugins/{softBreak.js → utils/softBreak.js} +0 -0
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import { cn, withProps, withRef } from '@udecode/cn';
3
+ import { PlateElement } from '@udecode/plate-common';
4
+ import { useTableCellElement, useTableCellElementResizable, useTableCellElementResizableState, useTableCellElementState, } from '@udecode/plate-table';
5
+ import { ResizeHandle } from './resizable';
6
+ export const TableCellElement = withRef(({ children, className, style, hideBorder, isHeader, ...props }, ref) => {
7
+ const { element } = props;
8
+ const { colIndex, rowIndex, readOnly, selected, hovered, hoveredLeft, rowSize, borders, isSelectingCell, colSpan, } = useTableCellElementState();
9
+ const { props: cellProps } = useTableCellElement({ element: props.element });
10
+ const resizableState = useTableCellElementResizableState({
11
+ colIndex,
12
+ rowIndex,
13
+ colSpan,
14
+ });
15
+ const { rightProps, bottomProps, leftProps, hiddenLeft } = useTableCellElementResizable(resizableState);
16
+ const Cell = isHeader ? 'th' : 'td';
17
+ return (React.createElement(PlateElement, { ref: ref, asChild: true, className: cn('relative h-full overflow-visible border-none bg-background p-0', hideBorder && 'before:border-none', element.background ? 'bg-[--cellBackground]' : 'bg-background', !hideBorder &&
18
+ cn(isHeader && 'text-left [&_>_*]:m-0', 'before:h-full before:w-full', selected && 'before:z-10 before:bg-muted', "before:absolute before:box-border before:select-none before:content-['']", borders &&
19
+ cn(borders.bottom?.size &&
20
+ `before:border-b before:border-b-border`, borders.right?.size && `before:border-r before:border-r-border`, borders.left?.size && `before:border-l before:border-l-border`, borders.top?.size && `before:border-t before:border-t-border`)), className), ...cellProps, ...props, style: {
21
+ '--cellBackground': element.background,
22
+ ...style,
23
+ } },
24
+ React.createElement(Cell, null,
25
+ React.createElement("div", { className: "relative z-20 box-border h-full px-3 py-2", style: {
26
+ minHeight: rowSize,
27
+ } }, children),
28
+ !isSelectingCell && (React.createElement("div", { className: "group absolute top-0 h-full w-full select-none", contentEditable: false, suppressContentEditableWarning: true }, !readOnly && (React.createElement(React.Fragment, null,
29
+ React.createElement(ResizeHandle, { ...rightProps, className: "-top-3 right-[-5px] w-[10px]" }),
30
+ React.createElement(ResizeHandle, { ...bottomProps, className: "bottom-[-5px] h-[10px]" }),
31
+ !hiddenLeft && (React.createElement(ResizeHandle, { ...leftProps, className: "-top-3 left-[-5px] w-[10px]" })),
32
+ hovered && (React.createElement("div", { className: cn('absolute -top-3 z-30 h-[calc(100%_+_12px)] w-1 bg-ring', 'right-[-1.5px]') })),
33
+ hoveredLeft && (React.createElement("div", { className: cn('absolute -top-3 z-30 h-[calc(100%_+_12px)] w-1 bg-ring', 'left-[-1.5px]') })))))))));
34
+ });
35
+ TableCellElement.displayName = 'TableCellElement';
36
+ export const TableCellHeaderElement = withProps(TableCellElement, {
37
+ isHeader: true,
38
+ });
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export declare const TableRowElement: React.ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
3
+ element: import("@udecode/slate").TElement;
4
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
+ as?: React.ElementType<any> | undefined;
6
+ asChild?: boolean | undefined;
7
+ } & React.RefAttributes<any> & {
8
+ elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
9
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ hideBorder?: boolean | undefined;
11
+ } & React.RefAttributes<any>>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { cn, withRef } from '@udecode/cn';
3
+ import { PlateElement } from '@udecode/plate-common';
4
+ export const TableRowElement = withRef(({ hideBorder, children, ...props }, ref) => {
5
+ return (React.createElement(PlateElement, { asChild: true, ref: ref, className: cn('h-full', hideBorder && 'border-none'), ...props },
6
+ React.createElement("tr", null, children)));
7
+ });
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+ export declare const TableBordersDropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const TableFloatingToolbar: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-popover").PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ export declare const TableElement: React.ForwardRefExoticComponent<Omit<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
6
+ element: import("@udecode/slate").TElement;
7
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
+ as?: React.ElementType<any> | undefined;
9
+ asChild?: boolean | undefined;
10
+ } & React.RefAttributes<any> & {
11
+ elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
12
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<any>, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,82 @@
1
+ import React from 'react';
2
+ import { cn, withRef } from '@udecode/cn';
3
+ import { isSelectionExpanded, PlateElement, useEditorRef, useEditorSelector, useElement, useRemoveNodeButton, withHOC, } from '@udecode/plate-common';
4
+ import { mergeTableCells, TableProvider, unmergeTableCells, useTableBordersDropdownMenuContentState, useTableElement, useTableElementState, useTableMergeState, } from '@udecode/plate-table';
5
+ import { useReadOnly, useSelected } from 'slate-react';
6
+ import { PopoverAnchor } from '@radix-ui/react-popover';
7
+ import { Combine, Trash, Ungroup } from 'lucide-react';
8
+ import { Button } from './plate-button';
9
+ import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuPortal, DropdownMenuTrigger, } from './dropdown-menu';
10
+ import { Popover, PopoverContent, popoverVariants } from './popover';
11
+ import { Separator } from './separator';
12
+ import { BorderAll, BorderBottom, BorderLeft, BorderNone, BorderRight, BorderTop, } from '../../icons';
13
+ export const TableBordersDropdownMenuContent = withRef((props, ref) => {
14
+ const { getOnSelectTableBorder, hasOuterBorders, hasBottomBorder, hasLeftBorder, hasNoBorders, hasRightBorder, hasTopBorder, } = useTableBordersDropdownMenuContentState();
15
+ return (React.createElement(DropdownMenuContent, { ref: ref, className: cn('min-w-[220px]'), side: "right", align: "start", sideOffset: 0, ...props },
16
+ React.createElement(DropdownMenuCheckboxItem, { checked: hasBottomBorder, onCheckedChange: getOnSelectTableBorder('bottom') },
17
+ React.createElement(BorderBottom, { className: "mr-2 h-4 w-4" }),
18
+ React.createElement("div", null, "Bottom Border")),
19
+ React.createElement(DropdownMenuCheckboxItem, { checked: hasTopBorder, onCheckedChange: getOnSelectTableBorder('top') },
20
+ React.createElement(BorderTop, { className: "mr-2 h-4 w-4" }),
21
+ React.createElement("div", null, "Top Border")),
22
+ React.createElement(DropdownMenuCheckboxItem, { checked: hasLeftBorder, onCheckedChange: getOnSelectTableBorder('left') },
23
+ React.createElement(BorderLeft, { className: "mr-2 h-4 w-4" }),
24
+ React.createElement("div", null, "Left Border")),
25
+ React.createElement(DropdownMenuCheckboxItem, { checked: hasRightBorder, onCheckedChange: getOnSelectTableBorder('right') },
26
+ React.createElement(BorderRight, { className: "mr-2 h-4 w-4" }),
27
+ React.createElement("div", null, "Right Border")),
28
+ React.createElement(Separator, null),
29
+ React.createElement(DropdownMenuCheckboxItem, { checked: hasNoBorders, onCheckedChange: getOnSelectTableBorder('none') },
30
+ React.createElement(BorderNone, { className: "mr-2 h-4 w-4" }),
31
+ React.createElement("div", null, "No Border")),
32
+ React.createElement(DropdownMenuCheckboxItem, { checked: hasOuterBorders, onCheckedChange: getOnSelectTableBorder('outer') },
33
+ React.createElement(BorderAll, { className: "mr-2 h-4 w-4" }),
34
+ React.createElement("div", null, "Outside Borders"))));
35
+ });
36
+ export const TableFloatingToolbar = withRef(({ children, ...props }, ref) => {
37
+ const element = useElement();
38
+ const { props: buttonProps } = useRemoveNodeButton({ element });
39
+ const selectionCollapsed = useEditorSelector((editor) => !isSelectionExpanded(editor), []);
40
+ const readOnly = useReadOnly();
41
+ const selected = useSelected();
42
+ const editor = useEditorRef();
43
+ const collapsed = !readOnly && selected && selectionCollapsed;
44
+ const open = !readOnly && selected;
45
+ const { canMerge, canUnmerge } = useTableMergeState();
46
+ const mergeContent = canMerge && (React.createElement(Button, { contentEditable: false, variant: "ghost", isMenu: true, onClick: () => mergeTableCells(editor) },
47
+ React.createElement(Combine, { className: "mr-2 h-4 w-4" }),
48
+ "Merge"));
49
+ const unmergeButton = canUnmerge && (React.createElement(Button, { contentEditable: false, variant: "ghost", isMenu: true, onClick: () => unmergeTableCells(editor) },
50
+ React.createElement(Ungroup, { className: "mr-2 h-4 w-4" }),
51
+ "Unmerge"));
52
+ const bordersContent = collapsed && (React.createElement(React.Fragment, null,
53
+ React.createElement(DropdownMenu, { modal: false },
54
+ React.createElement(DropdownMenuTrigger, { asChild: true },
55
+ React.createElement(Button, { variant: "ghost", isMenu: true },
56
+ React.createElement(BorderAll, { className: "mr-2 h-4 w-4" }),
57
+ "Borders")),
58
+ React.createElement(DropdownMenuPortal, null,
59
+ React.createElement(TableBordersDropdownMenuContent, null))),
60
+ React.createElement(Button, { contentEditable: false, variant: "ghost", isMenu: true, ...buttonProps },
61
+ React.createElement(Trash, { className: "mr-2 h-4 w-4" }),
62
+ "Delete")));
63
+ return (React.createElement(Popover, { open: open, modal: false },
64
+ React.createElement(PopoverAnchor, { asChild: true }, children),
65
+ (canMerge || canUnmerge || collapsed) && (React.createElement(PopoverContent, { ref: ref, className: cn(popoverVariants(), 'flex w-[220px] flex-col gap-1 p-1'), onOpenAutoFocus: (e) => e.preventDefault(), ...props },
66
+ unmergeButton,
67
+ mergeContent,
68
+ bordersContent))));
69
+ });
70
+ export const TableElement = withHOC(TableProvider, withRef(({ className, children, ...props }, ref) => {
71
+ const { colSizes, isSelectingCell, minColumnWidth, marginLeft } = useTableElementState();
72
+ const { props: tableProps, colGroupProps } = useTableElement();
73
+ return (React.createElement(TableFloatingToolbar, null,
74
+ React.createElement("div", { style: { paddingLeft: marginLeft } },
75
+ React.createElement(PlateElement, { ref: ref, asChild: true, className: cn('my-4 ml-px mr-0 table h-px w-full table-fixed border-collapse', isSelectingCell && '[&_*::selection]:bg-none', className), ...tableProps, ...props },
76
+ React.createElement("table", null,
77
+ React.createElement("colgroup", { ...colGroupProps }, colSizes.map((width, index) => (React.createElement("col", { key: index, style: {
78
+ minWidth: minColumnWidth,
79
+ width: width || undefined,
80
+ } })))),
81
+ React.createElement("tbody", { className: "min-w-full" }, children))))));
82
+ }));
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { createPluginFactory, PlateElement, } from '@udecode/plate';
3
- import { P } from '../../atoms/typography/paragraph';
4
- import { H } from '../../atoms/typography/heading';
5
- import * as Elements from '../constants';
3
+ import { P } from '../../../atoms/typography/paragraph';
4
+ import { H } from '../../../atoms/typography/heading';
5
+ import * as Elements from '../../constants';
6
6
  export const ParagraphElement = React.forwardRef(({ children, ...props }, ref) => {
7
7
  const textAlign = props?.style?.textAlign;
8
8
  return (React.createElement(PlateElement, { asChild: true, ref: ref, ...props },
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { createPluginFactory, isEditorReadOnly, PlateElement, } from '@udecode/plate';
3
- import { ELEMENT_H2, ELEMENT_VIDEO } from '../constants';
4
- import { EditorContext } from '../context';
3
+ import { ELEMENT_H2, ELEMENT_VIDEO } from '../../constants';
4
+ import { EditorContext } from '../../context';
5
5
  export const VideoTitleElement = React.forwardRef(function VideoTitle({ editor, element, ...props }, ref) {
6
6
  const editable = !isEditorReadOnly(editor);
7
7
  const { id } = element;
@@ -1,7 +1,4 @@
1
- /**
2
- * ELEMENT TYPES
3
- */
4
- export declare const blocks: (import("@udecode/plate-core").PlatePlugin<import("@udecode/utils").AnyObject, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").HotkeyPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-code-block").CodeBlockPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-heading").HeadingsPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-media").ImagePlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-indent").IndentPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-indent-list").IndentListPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-media").MediaPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-reset-node").ResetNodePlugin<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>>, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-table").TablePlugin<import("@udecode/slate").Value>, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>>)[];
5
- export declare const marks: (import("@udecode/plate-core").PlatePlugin<import("@udecode/utils").AnyObject, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>>)[];
6
- export declare const inline: (import("@udecode/plate-core").PlatePlugin<import("@udecode/utils").AnyObject, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-indent").IndentPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-link").LinkPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>>)[];
7
- export declare const utils: (import("@udecode/plate-core").PlatePlugin<import("@udecode/utils").AnyObject, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-reset-node").ResetNodePlugin<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>>, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-break").ExitBreakPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-select").SelectOnBackspacePlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-break").SoftBreakPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>>)[];
1
+ export { blocks } from './blocks';
2
+ export { leafs } from './leafs';
3
+ export { marks } from './marks';
4
+ export { utils } from './utils';
@@ -1,112 +1,4 @@
1
- /**
2
- * PLUGINS
3
- */
4
- import { createBlockquotePlugin, createCodeBlockPlugin, createHeadingPlugin, createHorizontalRulePlugin, createIndentListPlugin, createImagePlugin, createTextIndentPlugin, createListPlugin, createMediaEmbedPlugin, createResetNodePlugin, createTablePlugin, createBoldPlugin, createCodePlugin, createFontBackgroundColorPlugin, createFontSizePlugin, createFontFamilyPlugin, createItalicPlugin, createStrikethroughPlugin, createSubscriptPlugin, createSuperscriptPlugin, createUnderlinePlugin, createAlignPlugin, createIndentPlugin, createLineHeightPlugin, createExitBreakPlugin, createHistoryPlugin, createSelectOnBackspacePlugin, createSoftBreakPlugin, } from '@udecode/plate';
5
- import { createLinkPlugin } from '@udecode/plate-link';
6
- import { createButtonsPlugin } from './buttons';
7
- import { exitBreakPlugin } from './exitBreak';
8
- import { resetBlockTypePlugin } from './resetBlockType';
9
- import { selectOnBackspace } from './selectOnBackspace';
10
- import { softBreakPlugin } from './softBreak';
11
- import { createParagraphPlugin, createHOnePlugin, createHTwoPlugin, createHThreePlugin, createHFourPlugin, createHFivePlugin, createHSixPlugin, } from './text';
12
- import { LinkFloatingMenu } from './link';
13
- import { createQAPlugin } from './qa';
14
- import { createVideoTitlePlugin } from './video';
15
- /**
16
- * ELEMENT TYPES
17
- */
18
- import { ELEMENT_PARAGRAPH, ELEMENT_H1, ELEMENT_H2, ELEMENT_H3, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, ELEMENT_OL, ELEMENT_UL, } from '../constants';
19
- /**
20
- * ELEMENT TYPES
21
- */
22
- export const blocks = [
23
- createButtonsPlugin(),
24
- createBlockquotePlugin(),
25
- createCodeBlockPlugin(),
26
- createHeadingPlugin(),
27
- createHorizontalRulePlugin(),
28
- createImagePlugin({
29
- options: {
30
- disableUploadInsert: true,
31
- disableEmbedInsert: true,
32
- },
33
- }),
34
- createQAPlugin(),
35
- createTextIndentPlugin(),
36
- createIndentListPlugin({
37
- inject: {
38
- props: {
39
- validTypes: [
40
- ELEMENT_PARAGRAPH,
41
- ELEMENT_H1,
42
- ELEMENT_H2,
43
- ELEMENT_H3,
44
- ELEMENT_H4,
45
- ELEMENT_H5,
46
- ELEMENT_H6,
47
- ELEMENT_OL,
48
- ELEMENT_UL,
49
- ],
50
- },
51
- },
52
- }),
53
- createListPlugin(),
54
- createMediaEmbedPlugin(),
55
- createParagraphPlugin(),
56
- createHOnePlugin(),
57
- createHTwoPlugin(),
58
- createHThreePlugin(),
59
- createHFourPlugin(),
60
- createHFivePlugin(),
61
- createHSixPlugin(),
62
- createResetNodePlugin(),
63
- createTablePlugin(),
64
- createVideoTitlePlugin(),
65
- ];
66
- export const marks = [
67
- createBoldPlugin(),
68
- createCodePlugin(),
69
- createFontBackgroundColorPlugin(),
70
- createFontSizePlugin(),
71
- createFontFamilyPlugin(),
72
- createItalicPlugin(),
73
- createStrikethroughPlugin(),
74
- createSubscriptPlugin(),
75
- createSuperscriptPlugin(),
76
- createUnderlinePlugin(),
77
- ];
78
- export const inline = [
79
- createAlignPlugin({
80
- inject: {
81
- props: {
82
- validTypes: [
83
- ELEMENT_PARAGRAPH,
84
- ELEMENT_H1,
85
- ELEMENT_H2,
86
- ELEMENT_H3,
87
- ELEMENT_H4,
88
- ELEMENT_H5,
89
- ELEMENT_H6,
90
- ],
91
- },
92
- },
93
- }),
94
- createIndentPlugin({
95
- inject: {
96
- props: {
97
- validTypes: [ELEMENT_PARAGRAPH, ELEMENT_H1],
98
- },
99
- },
100
- }),
101
- createLineHeightPlugin(),
102
- createLinkPlugin({
103
- renderBeforeEditable: LinkFloatingMenu,
104
- }),
105
- ];
106
- export const utils = [
107
- createExitBreakPlugin(exitBreakPlugin),
108
- createHistoryPlugin(),
109
- createResetNodePlugin(resetBlockTypePlugin),
110
- createSelectOnBackspacePlugin(selectOnBackspace),
111
- createSoftBreakPlugin(softBreakPlugin),
112
- ];
1
+ export { blocks } from './blocks';
2
+ export { leafs } from './leafs';
3
+ export { marks } from './marks';
4
+ export { utils } from './utils';
@@ -0,0 +1 @@
1
+ export { leafs } from './leafs';
@@ -0,0 +1 @@
1
+ export { leafs } from './leafs';
@@ -0,0 +1 @@
1
+ export declare const leafs: (import("@udecode/plate-core").PlatePlugin<import("@udecode/utils").AnyObject, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-indent").IndentPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-link").LinkPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>>)[];
@@ -0,0 +1,33 @@
1
+ import { createAlignPlugin, createCodePlugin, createIndentPlugin, createLineHeightPlugin, } from '@udecode/plate';
2
+ import { createLinkPlugin } from '@udecode/plate-link';
3
+ import { LinkFloatingMenu } from './link';
4
+ import { ELEMENT_PARAGRAPH, ELEMENT_H1, ELEMENT_H2, ELEMENT_H3, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, } from '../../constants';
5
+ export const leafs = [
6
+ createAlignPlugin({
7
+ inject: {
8
+ props: {
9
+ validTypes: [
10
+ ELEMENT_PARAGRAPH,
11
+ ELEMENT_H1,
12
+ ELEMENT_H2,
13
+ ELEMENT_H3,
14
+ ELEMENT_H4,
15
+ ELEMENT_H5,
16
+ ELEMENT_H6,
17
+ ],
18
+ },
19
+ },
20
+ }),
21
+ createIndentPlugin({
22
+ inject: {
23
+ props: {
24
+ validTypes: [ELEMENT_PARAGRAPH, ELEMENT_H1],
25
+ },
26
+ },
27
+ }),
28
+ createLineHeightPlugin(),
29
+ createCodePlugin(),
30
+ createLinkPlugin({
31
+ renderBeforeEditable: LinkFloatingMenu,
32
+ }),
33
+ ];
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { FloatingLinkUrlInput, LinkOpenButton, PlateElement, useFloatingLinkEdit, useFloatingLinkEditState, useFloatingLinkInsert, useFloatingLinkInsertState, useFloatingLinkSelectors, useLink, } from '@udecode/plate';
4
- import { Box } from '../../';
5
- import { AASansSerif, Link, Upload } from '../../../icons';
4
+ import { Box } from '../../..';
5
+ import { AASansSerif, Link, Upload } from '../../../../icons';
6
6
  export const LinkElement = React.forwardRef(({ children, ...props }, ref) => {
7
7
  const { props: linkProps } = useLink({ element: props.element });
8
8
  return (React.createElement(PlateElement, { asChild: true, ref: ref, ...linkProps, ...props },
@@ -0,0 +1 @@
1
+ export { marks } from './marks';
@@ -0,0 +1 @@
1
+ export { marks } from './marks';
@@ -0,0 +1 @@
1
+ export declare const marks: (import("@udecode/plate-core").PlatePlugin<import("@udecode/utils").AnyObject, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").ToggleMarkPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>>)[];
@@ -0,0 +1,12 @@
1
+ import { createBoldPlugin, createFontBackgroundColorPlugin, createFontSizePlugin, createFontFamilyPlugin, createItalicPlugin, createStrikethroughPlugin, createSubscriptPlugin, createSuperscriptPlugin, createUnderlinePlugin, } from '@udecode/plate';
2
+ export const marks = [
3
+ createBoldPlugin(),
4
+ createFontBackgroundColorPlugin(),
5
+ createFontSizePlugin(),
6
+ createFontFamilyPlugin(),
7
+ createItalicPlugin(),
8
+ createStrikethroughPlugin(),
9
+ createSubscriptPlugin(),
10
+ createSuperscriptPlugin(),
11
+ createUnderlinePlugin(),
12
+ ];
@@ -0,0 +1,74 @@
1
+ /// <reference types="react" />
2
+ export declare const plateUI: {
3
+ p: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
4
+ h1: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
5
+ h2: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
6
+ h3: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
7
+ h4: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
8
+ h5: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
9
+ h6: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
10
+ blockquote: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
11
+ a: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps<import("@udecode/slate").Value, import("@udecode/plate-link").TLinkElement>, "ref"> & import("react").RefAttributes<any>>;
12
+ ol: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
13
+ element: import("@udecode/slate").TElement;
14
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
15
+ as?: import("react").ElementType<any> | undefined;
16
+ asChild?: boolean | undefined;
17
+ } & import("react").RefAttributes<any> & {
18
+ elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
19
+ } & {
20
+ variant: "ol" | "ul";
21
+ }, "ref"> & import("react").RefAttributes<any>>;
22
+ ul: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
23
+ element: import("@udecode/slate").TElement;
24
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
25
+ as?: import("react").ElementType<any> | undefined;
26
+ asChild?: boolean | undefined;
27
+ } & import("react").RefAttributes<any> & {
28
+ elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
29
+ } & {
30
+ variant: "ol" | "ul";
31
+ }, "ref"> & import("react").RefAttributes<any>>;
32
+ img: ({ ...props }: import("@udecode/plate-utils").PlateElementProps<import("@udecode/slate").Value, import("@udecode/plate-media").TImageElement>) => import("react").JSX.Element;
33
+ button: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
34
+ table: import("react").ForwardRefExoticComponent<Omit<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
35
+ element: import("@udecode/slate").TElement;
36
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
37
+ as?: import("react").ElementType<any> | undefined;
38
+ asChild?: boolean | undefined;
39
+ } & import("react").RefAttributes<any> & {
40
+ elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
41
+ } & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<any>, "ref"> & import("react").RefAttributes<unknown>>;
42
+ td: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
43
+ element: import("@udecode/slate").TElement;
44
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
45
+ as?: import("react").ElementType<any> | undefined;
46
+ asChild?: boolean | undefined;
47
+ } & import("react").RefAttributes<any> & {
48
+ elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
49
+ } & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
50
+ hideBorder?: boolean | undefined;
51
+ isHeader?: boolean | undefined;
52
+ } & import("react").RefAttributes<any>>;
53
+ th: import("react").ForwardRefExoticComponent<Omit<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
54
+ element: import("@udecode/slate").TElement;
55
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
56
+ as?: import("react").ElementType<any> | undefined;
57
+ asChild?: boolean | undefined;
58
+ } & import("react").RefAttributes<any> & {
59
+ elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
60
+ } & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
61
+ hideBorder?: boolean | undefined;
62
+ isHeader?: boolean | undefined;
63
+ } & import("react").RefAttributes<any>, "ref"> & import("react").RefAttributes<any>>;
64
+ tr: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
65
+ element: import("@udecode/slate").TElement;
66
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
67
+ as?: import("react").ElementType<any> | undefined;
68
+ asChild?: boolean | undefined;
69
+ } & import("react").RefAttributes<any> & {
70
+ elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
71
+ } & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
72
+ hideBorder?: boolean | undefined;
73
+ } & import("react").RefAttributes<any>>;
74
+ };
@@ -1,11 +1,14 @@
1
1
  import { withProps } from '@udecode/cn';
2
- import { BlockquoteElement } from './plugins/blockquote';
3
- import { Button } from './plugins/buttons';
4
- import { ImageElement } from './plugins/image';
5
- import { LinkElement } from './plugins/link';
6
- import { ListElement } from './plugins/list';
7
- import { ParagraphElement, HOneElement, HTwoElement, HThreeElement, HFourElement, HFiveElement, HSixElement, } from './plugins/text';
8
- import * as Elements from './constants';
2
+ import { BlockquoteElement } from './blocks/blockquote';
3
+ import { Button } from './blocks/buttons';
4
+ import { ImageElement } from './blocks/image';
5
+ import { ListElement } from './blocks/list';
6
+ import { TableElement } from './blocks/table';
7
+ import { TableCellElement, TableCellHeaderElement } from './blocks/table-cell';
8
+ import { TableRowElement } from './blocks/table-row';
9
+ import { ParagraphElement, HOneElement, HTwoElement, HThreeElement, HFourElement, HFiveElement, HSixElement, } from './blocks/text';
10
+ import { LinkElement } from './leafs/link';
11
+ import * as Elements from '../constants';
9
12
  export const plateUI = {
10
13
  [Elements.ELEMENT_PARAGRAPH]: ParagraphElement,
11
14
  [Elements.ELEMENT_H1]: HOneElement,
@@ -24,4 +27,8 @@ export const plateUI = {
24
27
  }),
25
28
  [Elements.ELEMENT_IMAGE]: ImageElement,
26
29
  [Elements.ELEMENT_BUTTON]: Button,
30
+ [Elements.ELEMENT_TABLE]: TableElement,
31
+ [Elements.ELEMENT_TD]: TableCellElement,
32
+ [Elements.ELEMENT_TH]: TableCellHeaderElement,
33
+ [Elements.ELEMENT_TR]: TableRowElement,
27
34
  };
@@ -1,5 +1,5 @@
1
1
  import { KEYS_HEADING } from '@udecode/plate';
2
- import { ELEMENT_BLOCKQUOTE, ELEMENT_BUTTON, ELEMENT_MEDIA, ELEMENT_MEDIA_EMBED, ELEMENT_OL, ELEMENT_UL, } from '../constants';
2
+ import { ELEMENT_BLOCKQUOTE, ELEMENT_BUTTON, ELEMENT_MEDIA, ELEMENT_MEDIA_EMBED, ELEMENT_OL, ELEMENT_UL, } from '../../constants';
3
3
  export const exitBreakPlugin = {
4
4
  options: {
5
5
  rules: [
@@ -0,0 +1 @@
1
+ export { utils } from './utils';
@@ -0,0 +1 @@
1
+ export { utils } from './utils';
@@ -1,5 +1,5 @@
1
1
  import { isBlockAboveEmpty, isSelectionAtBlockStart } from '@udecode/plate';
2
- import { ELEMENT_BLOCKQUOTE, ELEMENT_PARAGRAPH, ELEMENT_TODO_LI, } from '../constants';
2
+ import { ELEMENT_BLOCKQUOTE, ELEMENT_PARAGRAPH, ELEMENT_TODO_LI, } from '../../constants';
3
3
  const resetBlockTypesCommonRule = {
4
4
  types: [ELEMENT_BLOCKQUOTE, ELEMENT_TODO_LI],
5
5
  defaultType: ELEMENT_PARAGRAPH,
@@ -1,4 +1,4 @@
1
- import { ELEMENT_HR, ELEMENT_IMAGE, ELEMENT_MEDIA_EMBED } from '../constants';
1
+ import { ELEMENT_HR, ELEMENT_IMAGE, ELEMENT_MEDIA_EMBED, } from '../../constants';
2
2
  export const selectOnBackspace = {
3
3
  options: {
4
4
  query: { allow: [ELEMENT_HR, ELEMENT_IMAGE, ELEMENT_MEDIA_EMBED] },
@@ -0,0 +1 @@
1
+ export declare const utils: (import("@udecode/plate-core").PlatePlugin<import("@udecode/utils").AnyObject, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-reset-node").ResetNodePlugin<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>>, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-break").ExitBreakPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-select").SelectOnBackspacePlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> | import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-break").SoftBreakPlugin, import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>>)[];
@@ -0,0 +1,12 @@
1
+ import { createResetNodePlugin, createExitBreakPlugin, createHistoryPlugin, createSelectOnBackspacePlugin, createSoftBreakPlugin, } from '@udecode/plate';
2
+ import { exitBreakPlugin } from './exitBreak';
3
+ import { resetBlockTypePlugin } from './resetBlockType';
4
+ import { selectOnBackspace } from './selectOnBackspace';
5
+ import { softBreakPlugin } from './softBreak';
6
+ export const utils = [
7
+ createExitBreakPlugin(exitBreakPlugin),
8
+ createHistoryPlugin(),
9
+ createResetNodePlugin(resetBlockTypePlugin),
10
+ createSelectOnBackspacePlugin(selectOnBackspace),
11
+ createSoftBreakPlugin(softBreakPlugin),
12
+ ];
@@ -1,12 +1,12 @@
1
1
  import { createPlugins, createHeadingPlugin, createIndentListPlugin, createImagePlugin, createTextIndentPlugin, createListPlugin, createMediaEmbedPlugin, createResetNodePlugin, createBoldPlugin, createCodePlugin, createFontBackgroundColorPlugin, createFontSizePlugin, createFontFamilyPlugin, createItalicPlugin, createStrikethroughPlugin, createSubscriptPlugin, createSuperscriptPlugin, createUnderlinePlugin, createAlignPlugin, createIndentPlugin, createLineHeightPlugin, createLinkPlugin, createExitBreakPlugin, createHistoryPlugin, createSelectOnBackspacePlugin, createSoftBreakPlugin, } from '@udecode/plate';
2
- import { createParagraphPlugin, createHOnePlugin, createHTwoPlugin, createHThreePlugin, createHFourPlugin, createHFivePlugin, createHSixPlugin, } from '../plugins/text';
2
+ import { createParagraphPlugin, createHOnePlugin, createHTwoPlugin, createHThreePlugin, createHFourPlugin, createHFivePlugin, createHSixPlugin, } from '../plugins/blocks/text';
3
3
  import { ELEMENT_PARAGRAPH, ELEMENT_H1, ELEMENT_H2, ELEMENT_H3, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, ELEMENT_OL, ELEMENT_UL, } from '../constants';
4
- import { exitBreakPlugin } from '../plugins/exitBreak';
5
- import { LinkFloatingMenu } from '../plugins/link';
6
- import { resetBlockTypePlugin } from '../plugins/resetBlockType';
7
- import { selectOnBackspace } from '../plugins/selectOnBackspace';
8
- import { softBreakPlugin } from '../plugins/softBreak';
9
- import { plateUI } from '../plate';
4
+ import { exitBreakPlugin } from '../plugins/utils/exitBreak';
5
+ import { LinkFloatingMenu } from '../plugins/leafs/link';
6
+ import { resetBlockTypePlugin } from '../plugins/utils/resetBlockType';
7
+ import { selectOnBackspace } from '../plugins/utils/selectOnBackspace';
8
+ import { softBreakPlugin } from '../plugins/utils/softBreak';
9
+ import { plateUI } from '../plugins/plate';
10
10
  export const plugins = createPlugins([
11
11
  createHeadingPlugin(),
12
12
  createImagePlugin({