@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
@@ -7,25 +7,16 @@ export declare const BUTTON_LINK = "button-link";
7
7
  export declare const BUTTON_SUBSCRIBE = "button-subscribe";
8
8
  export declare const COLORS: string[];
9
9
  export declare const PLACEHOLDER = "This is a placeholder";
10
- export declare const DEFAULT_CONTENT: ({
10
+ export declare const DEFAULT_CONTENT: {
11
11
  children: {
12
12
  text: string;
13
13
  }[];
14
- questionAnswerId: string;
15
- type: string;
16
- id?: undefined;
17
- } | {
18
- children: {
19
- text: string;
20
- }[];
21
- id: number;
22
14
  type: string;
23
- questionAnswerId?: undefined;
24
- } | {
15
+ }[];
16
+ export declare const DEFAULT_Q_N_A: {
25
17
  children: {
26
18
  text: string;
27
19
  }[];
20
+ questionAnswerId: string;
28
21
  type: string;
29
- questionAnswerId?: undefined;
30
- id?: undefined;
31
- })[];
22
+ }[];
@@ -16,30 +16,23 @@ export const COLORS = [
16
16
  ];
17
17
  export const PLACEHOLDER = 'This is a placeholder';
18
18
  export const DEFAULT_CONTENT = [
19
- {
20
- children: [
21
- {
22
- text: 'What are you struggling with today and how is it affecting the people you love? This is a longer sentence to see what it looks like.',
23
- },
24
- ],
25
- questionAnswerId: 'q-n-a-ac0396ed-62ed-4a30-ba12-98f4fa2d364c',
26
- type: ELEMENT_QA,
27
- },
28
19
  {
29
20
  children: [
30
21
  {
31
22
  text: '',
32
23
  },
33
24
  ],
34
- id: 1,
35
- type: ELEMENT_VIDEO,
25
+ type: 'p',
36
26
  },
27
+ ];
28
+ export const DEFAULT_Q_N_A = [
37
29
  {
38
30
  children: [
39
31
  {
40
- text: '',
32
+ text: 'What is your question?',
41
33
  },
42
34
  ],
43
- type: 'p',
35
+ questionAnswerId: 'q-n-a-16d648b0-e7db-4365-af08-61833b59e29d',
36
+ type: ELEMENT_QA,
44
37
  },
45
38
  ];
@@ -5,9 +5,9 @@ import { createPlugins, Plate, PlateContent } from '@udecode/plate';
5
5
  import { PLACEHOLDER } from './constants';
6
6
  import { EditorContext } from './context';
7
7
  import { EditorBar } from './navbar';
8
- import { plateUI } from './plate';
9
- import { blocks, inline, marks, utils } from './plugins';
10
- const plugins = createPlugins([...blocks, ...inline, ...marks, ...utils], {
8
+ import { plateUI } from './plugins/plate';
9
+ import { blocks, leafs, marks, utils } from './plugins';
10
+ const plugins = createPlugins([...blocks, ...leafs, ...marks, ...utils], {
11
11
  components: plateUI,
12
12
  });
13
13
  export const Editor = ({ commentInputLoader, commentLoader, editable, handleUploadImage, handleVideoClick, onChange, previousContent, videoTitleLoader, }) => {
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { LucideProps } from 'lucide-react';
3
+ export declare const BorderAll: (props: LucideProps) => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export const BorderAll = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
3
+ React.createElement("path", { d: "M3 6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6zm10 13h5a1 1 0 0 0 1-1v-5h-6v6zm-2-6H5v5a1 1 0 0 0 1 1h5v-6zm2-2h6V6a1 1 0 0 0-1-1h-5v6zm-2-6H6a1 1 0 0 0-1 1v5h6V5z" })));
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { LucideProps } from 'lucide-react';
3
+ export declare const BorderBottom: (props: LucideProps) => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export const BorderBottom = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
3
+ React.createElement("path", { d: "M13 5a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2h2zm-8 6a1 1 0 1 0-2 0v2a1 1 0 1 0 2 0v-2zm-2 7a1 1 0 1 1 2 0 1 1 0 0 0 1 1h12a1 1 0 0 0 1-1 1 1 0 1 1 2 0 3 3 0 0 1-3 3H6a3 3 0 0 1-3-3zm17-8a1 1 0 0 0-1 1v2a1 1 0 1 0 2 0v-2a1 1 0 0 0-1-1zM7 4a1 1 0 0 0-1-1 3 3 0 0 0-3 3 1 1 0 0 0 2 0 1 1 0 0 1 1-1 1 1 0 0 0 1-1zm11-1a1 1 0 1 0 0 2 1 1 0 0 1 1 1 1 1 0 1 0 2 0 3 3 0 0 0-3-3z" })));
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { LucideProps } from 'lucide-react';
3
+ export declare const BorderLeft: (props: LucideProps) => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export const BorderLeft = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
3
+ React.createElement("path", { d: "M6 21a1 1 0 1 0 0-2 1 1 0 0 1-1-1V6a1 1 0 0 1 1-1 1 1 0 0 0 0-2 3 3 0 0 0-3 3v12a3 3 0 0 0 3 3zm7-16a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2h2zm6 6a1 1 0 1 1 2 0v2a1 1 0 1 1-2 0v-2zm-5 9a1 1 0 0 1-1 1h-2a1 1 0 1 1 0-2h2a1 1 0 0 1 1 1zm4-17a1 1 0 1 0 0 2 1 1 0 0 1 1 1 1 1 0 1 0 2 0 3 3 0 0 0-3-3zm-1 17a1 1 0 0 0 1 1 3 3 0 0 0 3-3 1 1 0 1 0-2 0 1 1 0 0 1-1 1 1 1 0 0 0-1 1z" })));
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { LucideProps } from 'lucide-react';
3
+ export declare const BorderNone: (props: LucideProps) => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export const BorderNone = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
3
+ React.createElement("path", { d: "M14 4a1 1 0 0 1-1 1h-2a1 1 0 1 1 0-2h2a1 1 0 0 1 1 1zm-9 7a1 1 0 1 0-2 0v2a1 1 0 1 0 2 0v-2zm14 0a1 1 0 1 1 2 0v2a1 1 0 1 1-2 0v-2zm-6 10a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2h2zM7 4a1 1 0 0 0-1-1 3 3 0 0 0-3 3 1 1 0 0 0 2 0 1 1 0 0 1 1-1 1 1 0 0 0 1-1zm11-1a1 1 0 1 0 0 2 1 1 0 0 1 1 1 1 1 0 1 0 2 0 3 3 0 0 0-3-3zM7 20a1 1 0 0 1-1 1 3 3 0 0 1-3-3 1 1 0 1 1 2 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1zm11 1a1 1 0 1 1 0-2 1 1 0 0 0 1-1 1 1 0 1 1 2 0 3 3 0 0 1-3 3z" })));
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { LucideProps } from 'lucide-react';
3
+ export declare const BorderRight: (props: LucideProps) => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export const BorderRight = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
3
+ React.createElement("path", { d: "M13 5a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2h2zm-8 6a1 1 0 1 0-2 0v2a1 1 0 1 0 2 0v-2zm9 9a1 1 0 0 1-1 1h-2a1 1 0 1 1 0-2h2a1 1 0 0 1 1 1zM6 3a1 1 0 0 1 0 2 1 1 0 0 0-1 1 1 1 0 0 1-2 0 3 3 0 0 1 3-3zm1 17a1 1 0 0 1-1 1 3 3 0 0 1-3-3 1 1 0 1 1 2 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1zm11 1a1 1 0 1 1 0-2 1 1 0 0 0 1-1V6a1 1 0 0 0-1-1 1 1 0 1 1 0-2 3 3 0 0 1 3 3v12a3 3 0 0 1-3 3z" })));
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { LucideProps } from 'lucide-react';
3
+ export declare const BorderTop: (props: LucideProps) => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export const BorderTop = (props) => (React.createElement("svg", { viewBox: "0 0 24 24", height: "48", width: "48", focusable: "false", role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props },
3
+ React.createElement("path", { d: "M3 6a1 1 0 0 0 2 0 1 1 0 0 1 1-1h12a1 1 0 0 1 1 1 1 1 0 1 0 2 0 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3zm2 5a1 1 0 1 0-2 0v2a1 1 0 1 0 2 0v-2zm14 0a1 1 0 1 1 2 0v2a1 1 0 1 1-2 0v-2zm-5 9a1 1 0 0 1-1 1h-2a1 1 0 1 1 0-2h2a1 1 0 0 1 1 1zm-8 1a1 1 0 1 0 0-2 1 1 0 0 1-1-1 1 1 0 1 0-2 0 3 3 0 0 0 3 3zm11-1a1 1 0 0 0 1 1 3 3 0 0 0 3-3 1 1 0 1 0-2 0 1 1 0 0 1-1 1 1 1 0 0 0-1 1z" })));
@@ -0,0 +1,6 @@
1
+ export { BorderAll } from './border-all';
2
+ export { BorderBottom } from './border-bottom';
3
+ export { BorderLeft } from './border-left';
4
+ export { BorderNone } from './border-none';
5
+ export { BorderRight } from './border-right';
6
+ export { BorderTop } from './border-top';
@@ -0,0 +1,6 @@
1
+ export { BorderAll } from './border-all';
2
+ export { BorderBottom } from './border-bottom';
3
+ export { BorderLeft } from './border-left';
4
+ export { BorderNone } from './border-none';
5
+ export { BorderRight } from './border-right';
6
+ export { BorderTop } from './border-top';
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
- import { getPluginType, insertImage, insertNodes, toggleNodeType, useLinkToolbarButton, useLinkToolbarButtonState, useListToolbarButton, useListToolbarButtonState, useMarkToolbarButton, useMarkToolbarButtonState, useEditorRef, useEditorState, } from '@udecode/plate';
3
+ import { getPluginType, insertImage, insertNodes, insertTable, toggleNodeType, useLinkToolbarButton, useLinkToolbarButtonState, useListToolbarButton, useListToolbarButtonState, useMarkToolbarButton, useMarkToolbarButtonState, useEditorRef, useEditorState, } from '@udecode/plate';
4
4
  import { Tooltip } from '../../';
5
- import { Bold, FileCode, Headphones, Image, Italic, Link, ListOrdered, ListUnordered, Quote, Redo, Strikethrough, Underline, Undo, Video, } from '../../../icons';
5
+ import { Bold, FileCode, Grid, Headphones, Image, Italic, Link, ListOrdered, ListUnordered, Quote, Redo, Strikethrough, Underline, Undo, Video, } from '../../../icons';
6
6
  import { ELEMENT_BLOCKQUOTE, ELEMENT_BUTTON, ELEMENT_OL, ELEMENT_UL, MARK_BOLD, MARK_CODE, MARK_ITALIC, MARK_STRIKETHROUGH, MARK_UNDERLINE, } from '../constants';
7
7
  import { AlignmentDropdown } from './alignment_dropdown';
8
8
  import { ButtonModal } from './button_modal';
@@ -143,7 +143,12 @@ export const EditorBar = ({ handleUploadImage }) => {
143
143
  React.createElement(ListUnordered, { size: 24, color: "grey-5" }))),
144
144
  React.createElement(Tooltip, { content: "Ordered List", place: "top" },
145
145
  React.createElement(MenuButton, { "$active": currOrderedList, onClick: handleOrderedList },
146
- React.createElement(ListOrdered, { size: 24, color: "grey-5" })))))));
146
+ React.createElement(ListOrdered, { size: 24, color: "grey-5" }))),
147
+ React.createElement(Tooltip, { content: "Add a button", place: "top" },
148
+ React.createElement(MenuButton, { "$active": currOrderedList, onClick: () => {
149
+ insertTable(editorRef);
150
+ } },
151
+ React.createElement(Grid, { size: 24, color: "grey-5" })))))));
147
152
  };
148
153
  const Wrapper = styled.div `
149
154
  position: sticky;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { PlateElement, } from '@udecode/plate';
3
- import { P } from '../../';
3
+ import { P } from '../../../atoms/typography';
4
4
  export const BlockquoteElement = React.forwardRef(({ children, ...props }, ref) => {
5
5
  return (React.createElement(PlateElement, { asChild: true, ref: ref, ...props },
6
6
  React.createElement(React.Fragment, null,
@@ -0,0 +1 @@
1
+ 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>>)[];
@@ -0,0 +1,50 @@
1
+ import { createBlockquotePlugin, createCodeBlockPlugin, createHeadingPlugin, createHorizontalRulePlugin, createIndentListPlugin, createImagePlugin, createTextIndentPlugin, createListPlugin, createMediaEmbedPlugin, createResetNodePlugin, createTablePlugin, } from '@udecode/plate';
2
+ import { createButtonsPlugin } from './buttons';
3
+ import { createQAPlugin } from './qa';
4
+ import { createParagraphPlugin, createHOnePlugin, createHTwoPlugin, createHThreePlugin, createHFourPlugin, createHFivePlugin, createHSixPlugin, } from './text';
5
+ import { createVideoTitlePlugin } from './video';
6
+ import { ELEMENT_PARAGRAPH, ELEMENT_H1, ELEMENT_H2, ELEMENT_H3, ELEMENT_H4, ELEMENT_H5, ELEMENT_H6, ELEMENT_OL, ELEMENT_UL, } from '../../constants';
7
+ export const blocks = [
8
+ createButtonsPlugin(),
9
+ createBlockquotePlugin(),
10
+ createCodeBlockPlugin(),
11
+ createHeadingPlugin(),
12
+ createHorizontalRulePlugin(),
13
+ createImagePlugin({
14
+ options: {
15
+ disableUploadInsert: true,
16
+ disableEmbedInsert: true,
17
+ },
18
+ }),
19
+ createQAPlugin(),
20
+ createTextIndentPlugin(),
21
+ createIndentListPlugin({
22
+ inject: {
23
+ props: {
24
+ validTypes: [
25
+ ELEMENT_PARAGRAPH,
26
+ ELEMENT_H1,
27
+ ELEMENT_H2,
28
+ ELEMENT_H3,
29
+ ELEMENT_H4,
30
+ ELEMENT_H5,
31
+ ELEMENT_H6,
32
+ ELEMENT_OL,
33
+ ELEMENT_UL,
34
+ ],
35
+ },
36
+ },
37
+ }),
38
+ createListPlugin(),
39
+ createMediaEmbedPlugin(),
40
+ createParagraphPlugin(),
41
+ createHOnePlugin(),
42
+ createHTwoPlugin(),
43
+ createHThreePlugin(),
44
+ createHFourPlugin(),
45
+ createHFivePlugin(),
46
+ createHSixPlugin(),
47
+ createResetNodePlugin(),
48
+ createTablePlugin(),
49
+ createVideoTitlePlugin(),
50
+ ];
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { createPluginFactory, getBlockAbove, getPluginType, isEditorReadOnly, setNodes, someNode, PlateElement, } from '@udecode/plate';
4
- import { Button as UIButton } from '../../';
5
- import { COLORS, ELEMENT_BUTTON, ELEMENT_PARAGRAPH } from '../constants';
4
+ import { Button as UIButton } from '../../..';
5
+ import { COLORS, ELEMENT_BUTTON, ELEMENT_PARAGRAPH } from '../../constants';
6
6
  export const Button = React.forwardRef(({ children, editor, element, ...props }, ref) => {
7
7
  const { buttonType, color } = element;
8
8
  const pressed = !!editor?.selection &&
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+ export declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ export declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ export declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ export declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ export declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ export declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ export declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean | undefined;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ export declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ export declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ export declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: ({
15
+ inset?: boolean | null | undefined;
16
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
17
+ export declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ export declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
19
+ hideIcon?: boolean | undefined;
20
+ } & React.RefAttributes<HTMLDivElement>>;
21
+ export declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: ({
22
+ inset?: boolean | null | undefined;
23
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
24
+ export declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
+ export declare const DropdownMenuShortcut: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
26
+ export declare const useOpenState: () => {
27
+ open: boolean;
28
+ onOpenChange: (_value?: boolean) => void;
29
+ };
@@ -0,0 +1,62 @@
1
+ 'use client';
2
+ import * as React from 'react';
3
+ import { useCallback, useState } from 'react';
4
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
5
+ import { cn, createPrimitiveElement, withCn, withProps, withRef, withVariants, } from '@udecode/cn';
6
+ import { cva } from 'class-variance-authority';
7
+ import { ChevronRight } from '../../../../icons/arrow/chevron_right';
8
+ import { Checkmark } from '../../../../icons/basic/checkmark';
9
+ export const DropdownMenu = DropdownMenuPrimitive.Root;
10
+ export const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
11
+ export const DropdownMenuGroup = DropdownMenuPrimitive.Group;
12
+ export const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
13
+ export const DropdownMenuSub = DropdownMenuPrimitive.Sub;
14
+ export const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
15
+ export const DropdownMenuSubTrigger = withRef(({ className, inset, children, ...props }, ref) => (React.createElement(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn('flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent', 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', className), ...props },
16
+ children,
17
+ React.createElement(ChevronRight, { className: "ml-auto h-4 w-4" }))));
18
+ export const DropdownMenuSubContent = withCn(DropdownMenuPrimitive.SubContent, 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2');
19
+ const DropdownMenuContentVariants = withProps(DropdownMenuPrimitive.Content, {
20
+ sideOffset: 4,
21
+ className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2'),
22
+ });
23
+ export const DropdownMenuContent = withRef(({ ...props }, ref) => (React.createElement(DropdownMenuPrimitive.Portal, null,
24
+ React.createElement(DropdownMenuContentVariants, { ref: ref, ...props }))));
25
+ const menuItemVariants = cva(cn('relative flex h-9 cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors', 'focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50'), {
26
+ variants: {
27
+ inset: {
28
+ true: 'pl-8',
29
+ },
30
+ },
31
+ });
32
+ export const DropdownMenuItem = withVariants(DropdownMenuPrimitive.Item, menuItemVariants, ['inset']);
33
+ export const DropdownMenuCheckboxItem = withRef(({ className, children, ...props }, ref) => (React.createElement(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn('relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', 'cursor-pointer', className), ...props },
34
+ React.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" },
35
+ React.createElement(DropdownMenuPrimitive.ItemIndicator, null,
36
+ React.createElement(Checkmark, { className: "h-4 w-4" }))),
37
+ children)));
38
+ export const DropdownMenuRadioItem = withRef(({ className, children, hideIcon, ...props }, ref) => (React.createElement(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn('relative flex select-none items-center rounded-sm pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', 'h-9 cursor-pointer px-2 data-[state=checked]:bg-accent data-[state=checked]:text-accent-foreground', className), ...props },
39
+ !hideIcon && (React.createElement("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center" },
40
+ React.createElement(DropdownMenuPrimitive.ItemIndicator, null,
41
+ React.createElement(Checkmark, { className: "h-4 w-4" })))),
42
+ children)));
43
+ const dropdownMenuLabelVariants = cva(cn('select-none px-2 py-1.5 text-sm font-semibold'), {
44
+ variants: {
45
+ inset: {
46
+ true: 'pl-8',
47
+ },
48
+ },
49
+ });
50
+ export const DropdownMenuLabel = withVariants(DropdownMenuPrimitive.Label, dropdownMenuLabelVariants, ['inset']);
51
+ export const DropdownMenuSeparator = withCn(DropdownMenuPrimitive.Separator, '-mx-1 my-1 h-px bg-muted');
52
+ export const DropdownMenuShortcut = withCn(createPrimitiveElement('span'), 'ml-auto text-xs tracking-widest opacity-60');
53
+ export const useOpenState = () => {
54
+ const [open, setOpen] = useState(false);
55
+ const onOpenChange = useCallback((_value = !open) => {
56
+ setOpen(_value);
57
+ }, [open]);
58
+ return {
59
+ open,
60
+ onOpenChange,
61
+ };
62
+ };
@@ -0,0 +1 @@
1
+ export { blocks } from './blocks';
@@ -0,0 +1 @@
1
+ export { blocks } from './blocks';
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ export declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | "inlineLink" | null | undefined;
5
+ size?: "none" | "icon" | "default" | "sm" | "xs" | "sms" | "lg" | null | undefined;
6
+ isMenu?: boolean | null | undefined;
7
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
+ export declare const Button: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
9
+ variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | "inlineLink" | null | undefined;
10
+ size?: "none" | "icon" | "default" | "sm" | "xs" | "sms" | "lg" | null | undefined;
11
+ isMenu?: boolean | null | undefined;
12
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & {
13
+ asChild?: boolean | undefined;
14
+ } & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,37 @@
1
+ import * as React from 'react';
2
+ import { Slot } from '@radix-ui/react-slot';
3
+ import { cn, withRef } from '@udecode/cn';
4
+ import { cva } from 'class-variance-authority';
5
+ export const buttonVariants = cva('inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', {
6
+ variants: {
7
+ variant: {
8
+ default: 'bg-primary text-primary-foreground hover:bg-primary/90',
9
+ destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
10
+ outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
11
+ secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
12
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
13
+ link: 'text-primary underline-offset-4 hover:underline',
14
+ inlineLink: 'text-base text-primary underline underline-offset-4',
15
+ },
16
+ size: {
17
+ default: 'h-10 px-4 py-2',
18
+ xs: 'h-8 rounded-md px-3',
19
+ sm: 'h-9 rounded-md px-3',
20
+ sms: 'h-9 w-9 rounded-md px-0',
21
+ lg: 'h-11 rounded-md px-8',
22
+ icon: 'h-10 w-10',
23
+ none: '',
24
+ },
25
+ isMenu: {
26
+ true: 'h-auto w-full cursor-pointer justify-start',
27
+ },
28
+ },
29
+ defaultVariants: {
30
+ variant: 'default',
31
+ size: 'default',
32
+ },
33
+ });
34
+ export const Button = withRef(({ className, isMenu, variant, size, asChild = false, ...props }, ref) => {
35
+ const Comp = asChild ? Slot : 'button';
36
+ return (React.createElement(Comp, { className: cn(buttonVariants({ isMenu, variant, size, className })), ref: ref, ...props }));
37
+ });
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+ export declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
+ export declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ export declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
6
+ export declare const popoverVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
7
+ export declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import * as React from 'react';
3
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
4
+ import { cn, withRef } from '@udecode/cn';
5
+ import { cva } from 'class-variance-authority';
6
+ export const Popover = PopoverPrimitive.Root;
7
+ export const PopoverTrigger = PopoverPrimitive.Trigger;
8
+ export const PopoverAnchor = PopoverPrimitive.Anchor;
9
+ export const popoverVariants = cva('w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 print:hidden');
10
+ export const PopoverContent = withRef(({ className, style, align = 'center', sideOffset = 4, ...props }, ref) => (React.createElement(PopoverPrimitive.Portal, null,
11
+ React.createElement(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn(popoverVariants(), className), style: { zIndex: 1000, ...style }, ...props }))));
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import { createPluginFactory, PlateElement, } from '@udecode/plate';
3
3
  import styled from 'styled-components';
4
- import { ELEMENT_QA } from '../constants';
5
- import { EditorContext } from '../context';
6
- import { Button } from '../../actions';
7
- import { Box } from '../../atoms/box';
8
- import { HideButRender } from '../../atoms/hide';
9
- import { H } from '../../atoms/typography';
10
- import { ChevronDown } from '../../../icons/arrow/chevron_down';
11
- import { ChevronUp } from '../../../icons/arrow/chevron_up';
4
+ import { ELEMENT_QA } from '../../constants';
5
+ import { EditorContext } from '../../context';
6
+ import { Button } from '../../../actions';
7
+ import { Box } from '../../../atoms/box';
8
+ import { HideButRender } from '../../../atoms/hide';
9
+ import { H } from '../../../atoms/typography';
10
+ import { ChevronDown } from '../../../../icons/arrow/chevron_down';
11
+ import { ChevronUp } from '../../../../icons/arrow/chevron_up';
12
12
  export const QuestionAnswerElement = React.forwardRef(({ children, element, ...props }, ref) => {
13
13
  const { questionAnswerId } = element;
14
14
  const { commentInputLoader: CommentInput, commentLoader: Comments } = React.useContext(EditorContext);
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ export declare const mediaResizeHandleVariants: (props?: ({
3
+ direction?: "right" | "left" | null | undefined;
4
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
5
+ export declare const ResizeHandle: React.ForwardRefExoticComponent<Omit<{
6
+ as?: React.ElementType<any> | undefined;
7
+ asChild?: boolean | undefined;
8
+ className?: string | undefined;
9
+ style?: React.CSSProperties | undefined;
10
+ options?: import("@udecode/plate-resizable").ResizeHandleOptions | undefined;
11
+ state?: {
12
+ isResizing: boolean;
13
+ setIsResizing: React.Dispatch<React.SetStateAction<boolean>>;
14
+ initialPosition: number;
15
+ setInitialPosition: React.Dispatch<React.SetStateAction<number>>;
16
+ initialSize: number;
17
+ setInitialSize: React.Dispatch<React.SetStateAction<number>>;
18
+ isHorizontal: boolean;
19
+ direction: import("@udecode/plate-resizable").ResizeDirection;
20
+ onResize: (event: import("@udecode/plate-resizable").ResizeEvent) => void;
21
+ onMouseDown: React.MouseEventHandler<Element> | undefined;
22
+ onTouchStart: React.TouchEventHandler<Element> | undefined;
23
+ onHover: (() => void) | undefined;
24
+ onHoverEnd: (() => void) | undefined;
25
+ } | undefined;
26
+ setProps?: ((hookProps: {
27
+ onMouseDown: React.MouseEventHandler<Element>;
28
+ onTouchStart: React.TouchEventHandler<Element>;
29
+ onMouseOver: () => void;
30
+ onMouseOut: () => void;
31
+ onTouchMove: () => void;
32
+ onTouchEnd: () => void;
33
+ }) => Omit<React.HTMLAttributes<HTMLDivElement>, "onResize">) | undefined;
34
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "onResize"> & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;
35
+ export declare const Resizable: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement> & {
36
+ options: import("@udecode/plate-resizable").ResizableOptions;
37
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: ({
38
+ align?: "center" | "right" | "left" | null | undefined;
39
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,37 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ import { cn, withRef, withVariants } from '@udecode/cn';
4
+ import { Resizable as ResizablePrimitive, ResizeHandle as ResizeHandlePrimitive, } from '@udecode/plate-resizable';
5
+ import { cva } from 'class-variance-authority';
6
+ export const mediaResizeHandleVariants = cva(cn('top-0 flex w-6 select-none flex-col justify-center', "after:flex after:h-16 after:w-[3px] after:rounded-[6px] after:bg-ring after:opacity-0 after:content-['_'] group-hover:after:opacity-100"), {
7
+ variants: {
8
+ direction: {
9
+ left: '-left-3 -ml-3 pl-3',
10
+ right: '-right-3 -mr-3 items-end pr-3',
11
+ },
12
+ },
13
+ });
14
+ const resizeHandleVariants = cva(cn('absolute z-40'), {
15
+ variants: {
16
+ direction: {
17
+ left: 'h-full cursor-col-resize',
18
+ right: 'h-full cursor-col-resize',
19
+ top: 'w-full cursor-row-resize',
20
+ bottom: 'w-full cursor-row-resize',
21
+ },
22
+ },
23
+ });
24
+ const ResizeHandleVariants = withVariants(ResizeHandlePrimitive, resizeHandleVariants, ['direction']);
25
+ export const ResizeHandle = withRef((props, ref) => (React.createElement(ResizeHandleVariants, { ref: ref, direction: props.options?.direction, ...props })));
26
+ const resizableVariants = cva('', {
27
+ variants: {
28
+ align: {
29
+ left: 'mr-auto',
30
+ center: 'mx-auto',
31
+ right: 'ml-auto',
32
+ },
33
+ },
34
+ });
35
+ export const Resizable = withVariants(ResizablePrimitive, resizableVariants, [
36
+ 'align',
37
+ ]);
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+ export declare const Separator: import("react").ForwardRefExoticComponent<Omit<Omit<SeparatorPrimitive.SeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: ({
4
+ orientation?: "vertical" | "horizontal" | null | undefined;
5
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+ import { withProps, withVariants } from '@udecode/cn';
4
+ import { cva } from 'class-variance-authority';
5
+ const separatorVariants = cva('shrink-0 bg-border', {
6
+ variants: {
7
+ orientation: {
8
+ horizontal: 'h-[1px] w-full',
9
+ vertical: 'h-full w-[1px]',
10
+ },
11
+ },
12
+ defaultVariants: {
13
+ orientation: 'horizontal',
14
+ },
15
+ });
16
+ export const Separator = withVariants(withProps(SeparatorPrimitive.Root, {
17
+ orientation: 'horizontal',
18
+ decorative: true,
19
+ }), separatorVariants);
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ export declare const TableCellElement: 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
+ isHeader?: boolean | undefined;
12
+ } & React.RefAttributes<any>>;
13
+ export declare const TableCellHeaderElement: 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"> & {
14
+ element: import("@udecode/slate").TElement;
15
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
16
+ as?: React.ElementType<any> | undefined;
17
+ asChild?: boolean | undefined;
18
+ } & React.RefAttributes<any> & {
19
+ elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
20
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & {
21
+ hideBorder?: boolean | undefined;
22
+ isHeader?: boolean | undefined;
23
+ } & React.RefAttributes<any>, "ref"> & React.RefAttributes<any>>;