ct-rich-text-editor 1.0.8 → 1.1.0
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.
- package/dist/App.d.ts +4 -0
- package/dist/Provider/EditorProvider.d.ts +19 -0
- package/dist/Provider/LexicalProvider.d.ts +7 -0
- package/dist/api/ai/index.d.ts +15 -0
- package/dist/api/auth.d.ts +102 -0
- package/dist/api/config/axios.d.ts +3 -0
- package/dist/api/config/endpoints.d.ts +11 -0
- package/dist/assets/style.css +1 -0
- package/dist/babel-1c4a328b.js +7479 -0
- package/dist/babel-1c4a328b.js.map +1 -0
- package/dist/components/AiPlugin/index.d.ts +4 -0
- package/dist/components/AlignMenu/AlignMenu.d.ts +10 -0
- package/dist/components/AlignMenu/index.d.ts +1 -0
- package/dist/components/BlockFormatMenu/BlockFormatMenu.d.ts +5 -0
- package/dist/components/BlockFormatMenu/constants.d.ts +14 -0
- package/dist/components/BlockFormatMenu/index.d.ts +1 -0
- package/dist/components/CodeActionMenuPlugin/components/CopyButton/index.d.ts +8 -0
- package/dist/components/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +10 -0
- package/dist/components/CodeActionMenuPlugin/index.d.ts +5 -0
- package/dist/components/CodeActionMenuPlugin/utils.d.ts +1 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +5 -0
- package/dist/components/ColorPicker/index.d.ts +1 -0
- package/dist/components/ConfigurableEditorWithAuth.d.ts +15 -0
- package/dist/components/EmojiPickerWidget/EmojiPickerWidget.d.ts +5 -0
- package/dist/components/EmojiPickerWidget/index.d.ts +1 -0
- package/dist/components/FileUpload/InsertFileDialog.d.ts +7 -0
- package/dist/components/FileUpload/InsertFileUploadedDialogBody.d.ts +6 -0
- package/dist/components/FontFamilySelect/FontFamilyMenu.d.ts +9 -0
- package/dist/components/FontSizePicker/FontSizeControl.d.ts +4 -0
- package/dist/components/FormatTextMenu/FormatTextMenu.d.ts +5 -0
- package/dist/components/FormatTextMenu/index.d.ts +1 -0
- package/dist/components/HighlightColorPicker/HighlightColorPicker.d.ts +8 -0
- package/dist/components/HtmlViewDisplay.d.ts +4 -0
- package/dist/components/ImageInsertTest.d.ts +4 -0
- package/dist/components/ImageView/ImageDialog/ImageUploadDialogBody.d.ts +10 -0
- package/dist/components/ImageView/ImageDialog/index.d.ts +7 -0
- package/dist/components/ImageView/ImageResizer.d.ts +17 -0
- package/dist/components/ImageView/index.d.ts +15 -0
- package/dist/components/InsertMenu/InsertMenu.d.ts +10 -0
- package/dist/components/InsertMenu/index.d.ts +1 -0
- package/dist/components/Placeholder/Placeholder.d.ts +5 -0
- package/dist/components/Placeholder/index.d.ts +1 -0
- package/dist/components/Placeholder/styles.d.ts +1 -0
- package/dist/components/ScopedEditor.d.ts +8 -0
- package/dist/components/TableColorPicker/index.d.ts +9 -0
- package/dist/components/TableModal/TableModal.d.ts +11 -0
- package/dist/components/Toolbar/Toolbar.d.ts +5 -0
- package/dist/components/Toolbar/index.d.ts +1 -0
- package/dist/components/Toolbar/styles.d.ts +6 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/constants.d.ts +36 -0
- package/dist/context/HtmlViewContext.d.ts +18 -0
- package/dist/context/ToolbarContext.d.ts +56 -0
- package/dist/editorConfig.d.ts +43 -0
- package/dist/estree-2cbea43c.js +4668 -0
- package/dist/estree-2cbea43c.js.map +1 -0
- package/dist/hooks/useBlockFormat.d.ts +22 -0
- package/dist/hooks/useColorPicker.d.ts +6 -0
- package/dist/hooks/useCustomCommands.d.ts +4 -0
- package/dist/hooks/useDebounce.d.ts +1 -0
- package/dist/hooks/useEditorToolbar.d.ts +11 -0
- package/dist/hooks/useInsertMenu.d.ts +9 -0
- package/dist/hooks/useModal.d.ts +5 -0
- package/dist/hooks/useS3Uploader.d.ts +11 -0
- package/dist/html-c18fb60e.js +2842 -0
- package/dist/html-c18fb60e.js.map +1 -0
- package/dist/index-17957a89.js +33013 -0
- package/dist/index-17957a89.js.map +1 -0
- package/dist/index-6f1ddbc9.js +632 -0
- package/dist/index-6f1ddbc9.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/main.d.ts +1 -0
- package/dist/markdown-39c3822b.js +3548 -0
- package/dist/markdown-39c3822b.js.map +1 -0
- package/dist/nodes/EmbedNode.d.ts +27 -0
- package/dist/nodes/ImageNode.d.ts +48 -0
- package/dist/nodes/MentionNode.d.ts +76 -0
- package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +14 -0
- package/dist/pages/ConfigurableEditor/index.d.ts +2 -0
- package/dist/pages/NotFound.d.ts +2 -0
- package/dist/pages/RichTextEditor.d.ts +6 -0
- package/dist/pages/TextareaEditor.d.ts +6 -0
- package/dist/pages/styles.d.ts +5 -0
- package/dist/plugins/AIChatPlugin.d.ts +6 -0
- package/dist/plugins/AutocompletePlugin.d.ts +26 -0
- package/dist/plugins/CodeHighlightPlugin.d.ts +4 -0
- package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +31 -0
- package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRulePlugin.d.ts +3 -0
- package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +9 -0
- package/dist/plugins/CustomHorizontalRulePlugin/index.d.ts +3 -0
- package/dist/plugins/DragDropPastePlugin/index.d.ts +8 -0
- package/dist/plugins/EmbedPreviewPlugin/FloatingEmbedMenuPlugin.d.ts +4 -0
- package/dist/plugins/EmbedPreviewPlugin/index.d.ts +7 -0
- package/dist/plugins/FilePlugin.d.ts +8 -0
- package/dist/plugins/FloatingLinkEditorPlugin/index.d.ts +7 -0
- package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +25 -0
- package/dist/plugins/HtmlCodeViewPlugin/index.d.ts +2 -0
- package/dist/plugins/HtmlImportPlugin.d.ts +5 -0
- package/dist/plugins/HtmlSyncPlugin.d.ts +3 -0
- package/dist/plugins/ImagePlugin.d.ts +10 -0
- package/dist/plugins/LinkPlugin/index.d.ts +7 -0
- package/dist/plugins/LocalStoragePlugin.d.ts +9 -0
- package/dist/plugins/MentionsPlugin/index.d.ts +8 -0
- package/dist/plugins/RichTextPastePlugin/index.d.ts +1 -0
- package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasDialog.d.ts +7 -0
- package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasPlugin.d.ts +3 -0
- package/dist/plugins/SignatureCanvasPlugin/index.d.ts +2 -0
- package/dist/plugins/TableActionMenuPlugin/index.d.ts +7 -0
- package/dist/plugins/TableCellResizer/index.d.ts +3 -0
- package/dist/plugins/TableHoverActionsPlugin/index.d.ts +11 -0
- package/dist/plugins/TablePlugin.d.ts +1 -0
- package/dist/plugins/TreeViewPlugin.d.ts +4 -0
- package/dist/postcss-bbcc713e.js +5152 -0
- package/dist/postcss-bbcc713e.js.map +1 -0
- package/dist/standalone-36ad3877.js +2601 -0
- package/dist/standalone-36ad3877.js.map +1 -0
- package/dist/styles/PlaygroundEditorTheme.d.ts +4 -0
- package/dist/types.d.ts +143 -0
- package/dist/typescript-39d06710.js +13534 -0
- package/dist/typescript-39d06710.js.map +1 -0
- package/dist/ui/ColorPicker.d.ts +14 -0
- package/dist/ui/Icons.d.ts +35 -0
- package/dist/ui/TextInput.d.ts +12 -0
- package/dist/utils/debounce.d.ts +7 -0
- package/dist/utils/getDOMRangeRect.d.ts +13 -0
- package/dist/utils/getSelectedNode.d.ts +4 -0
- package/dist/utils/helper.d.ts +3 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/invarient.d.ts +1 -0
- package/dist/utils/setFloatingElemPosition.d.ts +8 -0
- package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
- package/dist/utils/url.d.ts +9 -0
- package/package.json +2 -4
- package/dist/assets/babel-70ddf1b3.js +0 -16
- package/dist/assets/babel-70ddf1b3.js.map +0 -1
- package/dist/assets/chevron-down-7ab1bec2.svg +0 -1
- package/dist/assets/close-5a175ff6.svg +0 -1
- package/dist/assets/code-211c00f3.svg +0 -1
- package/dist/assets/copy-0a348586.svg +0 -1
- package/dist/assets/estree-e637acda.js +0 -37
- package/dist/assets/estree-e637acda.js.map +0 -1
- package/dist/assets/html-132cf17b.js +0 -23
- package/dist/assets/html-132cf17b.js.map +0 -1
- package/dist/assets/index-92719fbf.js +0 -2
- package/dist/assets/index-92719fbf.js.map +0 -1
- package/dist/assets/index-a2d0e228.js +0 -443
- package/dist/assets/index-a2d0e228.js.map +0 -1
- package/dist/assets/index-db471160.css +0 -1
- package/dist/assets/link-dabc7da5.svg +0 -1
- package/dist/assets/markdown-d8306e54.js +0 -64
- package/dist/assets/markdown-d8306e54.js.map +0 -1
- package/dist/assets/pencil-fill-633b2c8d.svg +0 -1
- package/dist/assets/plus-cc33d039.svg +0 -1
- package/dist/assets/postcss-25dc98df.js +0 -55
- package/dist/assets/postcss-25dc98df.js.map +0 -1
- package/dist/assets/prettier-6c905155.svg +0 -1
- package/dist/assets/prettier-error-0ed0d492.svg +0 -1
- package/dist/assets/standalone-e79c0887.js +0 -40
- package/dist/assets/standalone-e79c0887.js.map +0 -1
- package/dist/assets/success-e7e6caa5.svg +0 -1
- package/dist/assets/trash-e93c6b1b.svg +0 -1
- package/dist/assets/type-bold-1f17e5da.svg +0 -1
- package/dist/assets/type-capitalize-2bd9e890.svg +0 -1
- package/dist/assets/type-italic-f9cdcec5.svg +0 -1
- package/dist/assets/type-lowercase-e9b820a3.svg +0 -3
- package/dist/assets/type-strikethrough-ea22e2f6.svg +0 -1
- package/dist/assets/type-subscript-84ecc6bb.svg +0 -1
- package/dist/assets/type-superscript-fd5795bc.svg +0 -1
- package/dist/assets/type-underline-9639e1cd.svg +0 -1
- package/dist/assets/type-uppercase-cd9fe147.svg +0 -3
- package/dist/assets/typescript-c6c5f850.js +0 -21
- package/dist/assets/typescript-c6c5f850.js.map +0 -1
- package/dist/assets/user-085d4653.svg +0 -1
- package/dist/index.html +0 -18
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const AI_REPHRASE_COMMAND: import('../../../node_modules/lexical').LexicalCommand<unknown>;
|
|
2
|
+
export declare const AI_IMAGE_COMMAND: import('../../../node_modules/lexical').LexicalCommand<unknown>;
|
|
3
|
+
declare const AIRephrasePlugin: () => null;
|
|
4
|
+
export default AIRephrasePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './AlignMenu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './BlockFormatMenu';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LexicalEditor } from '../../../../../node_modules/lexical';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
editor: LexicalEditor;
|
|
5
|
+
getCodeDOMNode: () => HTMLElement | null;
|
|
6
|
+
}
|
|
7
|
+
export declare function CopyButton({ editor, getCodeDOMNode }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LexicalEditor } from '../../../../../node_modules/lexical';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
lang: string;
|
|
5
|
+
editor: LexicalEditor;
|
|
6
|
+
getCodeDOMNode: () => HTMLElement | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function canBePrettier(lang: string): boolean;
|
|
9
|
+
export declare function PrettierButton({ lang, editor, getCodeDOMNode }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDebounce<T extends (...args: never[]) => void>(fn: T, ms: number, maxWait?: number): import('lodash-es').DebouncedFunc<(...args: Parameters<T>) => void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ColorPicker';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ApiResponse } from '../api/auth';
|
|
3
|
+
|
|
4
|
+
interface ConfigurableEditorWithAuthProps {
|
|
5
|
+
apiKey: string;
|
|
6
|
+
initialContent?: string;
|
|
7
|
+
onChange?: (content: string) => void;
|
|
8
|
+
defaultFontFamilies?: string[];
|
|
9
|
+
mentionUserList?: string[];
|
|
10
|
+
onAuthSuccess?: () => void;
|
|
11
|
+
onAuthError?: (error: string) => void;
|
|
12
|
+
customVerifyKey?: (apiKey: string) => Promise<ApiResponse>;
|
|
13
|
+
}
|
|
14
|
+
declare const ConfigurableEditorWithAuth: React.FC<ConfigurableEditorWithAuthProps>;
|
|
15
|
+
export default ConfigurableEditorWithAuth;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './EmojiPickerWidget';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LexicalEditor } from '../../../node_modules/lexical';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
|
|
4
|
+
interface FontFamilyMenuProps {
|
|
5
|
+
fonts?: string[];
|
|
6
|
+
activeEditor: LexicalEditor;
|
|
7
|
+
}
|
|
8
|
+
declare const FontFamilyMenu: FC<FontFamilyMenuProps>;
|
|
9
|
+
export default FontFamilyMenu;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './FormatTextMenu';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InsertImagePayload } from '../../../types';
|
|
2
|
+
|
|
3
|
+
declare const InsertImageUploadedDialogBody: ({ onClick, }: {
|
|
4
|
+
onClick: (payload: InsertImagePayload) => void;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const InsertImageUrlDialogBody: ({ onClick, }: {
|
|
7
|
+
onClick: (payload: InsertImagePayload) => void;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default InsertImageUploadedDialogBody;
|
|
10
|
+
export { InsertImageUrlDialogBody };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LexicalEditor } from '../../../node_modules/lexical';
|
|
2
|
+
|
|
3
|
+
export default function ImageResizer({ onResizeStart, onResizeEnd, buttonRef, imageRef, maxWidth, editor, showCaption, setShowCaption, captionsEnabled, }: {
|
|
4
|
+
editor: LexicalEditor;
|
|
5
|
+
buttonRef: {
|
|
6
|
+
current: null | HTMLButtonElement;
|
|
7
|
+
};
|
|
8
|
+
imageRef: {
|
|
9
|
+
current: null | HTMLElement;
|
|
10
|
+
};
|
|
11
|
+
maxWidth?: number;
|
|
12
|
+
onResizeEnd: (width: "inherit" | number, height: "inherit" | number) => void;
|
|
13
|
+
onResizeStart: () => void;
|
|
14
|
+
setShowCaption: (show: boolean) => void;
|
|
15
|
+
showCaption: boolean;
|
|
16
|
+
captionsEnabled: boolean;
|
|
17
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LexicalCommand, LexicalEditor, NodeKey } from '../../../node_modules/lexical';
|
|
2
|
+
|
|
3
|
+
export declare const RIGHT_CLICK_IMAGE_COMMAND: LexicalCommand<MouseEvent>;
|
|
4
|
+
export default function ImageComponent({ src, altText, nodeKey, width, height, maxWidth, resizable, showCaption, caption, captionsEnabled, }: {
|
|
5
|
+
altText: string;
|
|
6
|
+
caption: LexicalEditor;
|
|
7
|
+
height: "inherit" | number;
|
|
8
|
+
maxWidth: number;
|
|
9
|
+
nodeKey: NodeKey;
|
|
10
|
+
resizable: boolean;
|
|
11
|
+
showCaption: boolean;
|
|
12
|
+
src: string;
|
|
13
|
+
width: "inherit" | number;
|
|
14
|
+
captionsEnabled: boolean;
|
|
15
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export type ModalState = {
|
|
4
|
+
show: (renderModal: (onClose: () => void) => ReactNode) => void;
|
|
5
|
+
hide: () => void;
|
|
6
|
+
activeModal: ReactNode | null;
|
|
7
|
+
};
|
|
8
|
+
export declare const useModal: () => ModalState;
|
|
9
|
+
declare const InsertMenu: FC;
|
|
10
|
+
export default InsertMenu;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './InsertMenu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Placeholder';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PlaceholderContainer: any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface CustomModalProps {
|
|
4
|
+
title: string;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
footer: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export default function TableModal({ title, isOpen, onClose, children, footer, }: CustomModalProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Toolbar';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare const buttonVariants: (props?: ({
|
|
5
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "toolbar" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "md" | "lg" | "icon" | "icon-sm" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DialogHeader: {
|
|
10
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const DialogFooter: {
|
|
14
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean | undefined;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean | undefined;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean | undefined;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: {
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/dist/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CodeHighlightNode, CodeNode } from '../node_modules/@lexical/code';
|
|
2
|
+
import { LinkNode } from '../node_modules/@lexical/link';
|
|
3
|
+
import { ListItemNode, ListNode } from '../node_modules/@lexical/list';
|
|
4
|
+
import { InitialConfigType } from '../node_modules/@lexical/react/LexicalComposer';
|
|
5
|
+
import { HorizontalRuleNode } from '../node_modules/@lexical/react/LexicalHorizontalRuleNode';
|
|
6
|
+
import { HeadingNode, QuoteNode } from '../node_modules/@lexical/rich-text';
|
|
7
|
+
import { TableCellNode, TableNode, TableRowNode } from '../node_modules/@lexical/table';
|
|
8
|
+
import { TextFormatType } from '../node_modules/lexical';
|
|
9
|
+
import { EditorThemeClasses } from '../node_modules/lexical/LexicalEditor';
|
|
10
|
+
import { EmbedNode } from './nodes/EmbedNode';
|
|
11
|
+
import { ImageNode } from './nodes/ImageNode';
|
|
12
|
+
import { MentionNode } from './nodes/MentionNode';
|
|
13
|
+
import { CustomHorizontalRuleNode } from './plugins/CustomHorizontalRulePlugin';
|
|
14
|
+
import { AlignMenuItem, FormatTextMenuItem } from './types';
|
|
15
|
+
|
|
16
|
+
export declare const theme: EditorThemeClasses;
|
|
17
|
+
export declare const EDITOR_NODES: (typeof EmbedNode | typeof LinkNode | typeof CodeNode | typeof ImageNode | typeof MentionNode | typeof CustomHorizontalRuleNode | typeof HorizontalRuleNode | typeof CodeHighlightNode | typeof HeadingNode | typeof QuoteNode | typeof ListNode | typeof ListItemNode | typeof TableNode | typeof TableCellNode | typeof TableRowNode)[];
|
|
18
|
+
export declare const initialConfig: InitialConfigType;
|
|
19
|
+
export declare const blockTypeToBlockName: {
|
|
20
|
+
bullet: string;
|
|
21
|
+
check: string;
|
|
22
|
+
code: string;
|
|
23
|
+
h1: string;
|
|
24
|
+
h2: string;
|
|
25
|
+
h3: string;
|
|
26
|
+
h4: string;
|
|
27
|
+
h5: string;
|
|
28
|
+
h6: string;
|
|
29
|
+
number: string;
|
|
30
|
+
paragraph: string;
|
|
31
|
+
quote: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const initialHasFormat: Record<TextFormatType, boolean>;
|
|
34
|
+
export declare const alignMenuItems: AlignMenuItem[];
|
|
35
|
+
export declare const formatMenuItems: FormatTextMenuItem[];
|
|
36
|
+
export declare const LOWEST_PRIORITY = 1;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
|
|
3
|
+
interface HtmlViewContextType {
|
|
4
|
+
isHtmlView: boolean;
|
|
5
|
+
setIsHtmlView: Dispatch<SetStateAction<boolean>>;
|
|
6
|
+
htmlContent: string;
|
|
7
|
+
setHtmlContent: Dispatch<SetStateAction<string>>;
|
|
8
|
+
isUserTyping: boolean;
|
|
9
|
+
setIsUserTyping: Dispatch<SetStateAction<boolean>>;
|
|
10
|
+
canUpdateFromEditor: boolean;
|
|
11
|
+
setCanUpdateFromEditor: Dispatch<SetStateAction<boolean>>;
|
|
12
|
+
}
|
|
13
|
+
export declare const useHtmlView: () => HtmlViewContextType;
|
|
14
|
+
interface HtmlViewProviderProps {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const HtmlViewProvider: React.FC<HtmlViewProviderProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ElementFormatType } from '../../node_modules/lexical';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const MIN_ALLOWED_FONT_SIZE = 8;
|
|
5
|
+
export declare const MAX_ALLOWED_FONT_SIZE = 72;
|
|
6
|
+
export declare const DEFAULT_FONT_SIZE = 15;
|
|
7
|
+
export declare const blockTypeToBlockName: {
|
|
8
|
+
bullet: string;
|
|
9
|
+
check: string;
|
|
10
|
+
code: string;
|
|
11
|
+
h1: string;
|
|
12
|
+
h2: string;
|
|
13
|
+
h3: string;
|
|
14
|
+
h4: string;
|
|
15
|
+
h5: string;
|
|
16
|
+
h6: string;
|
|
17
|
+
number: string;
|
|
18
|
+
paragraph: string;
|
|
19
|
+
quote: string;
|
|
20
|
+
};
|
|
21
|
+
declare const INITIAL_TOOLBAR_STATE: {
|
|
22
|
+
bgColor: string;
|
|
23
|
+
blockType: "number" | "code" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "paragraph" | "quote" | "bullet" | "check";
|
|
24
|
+
canRedo: boolean;
|
|
25
|
+
canUndo: boolean;
|
|
26
|
+
codeLanguage: string;
|
|
27
|
+
elementFormat: ElementFormatType;
|
|
28
|
+
fontColor: string;
|
|
29
|
+
fontFamily: string;
|
|
30
|
+
fontSize: string;
|
|
31
|
+
fontSizeInputValue: string;
|
|
32
|
+
isBold: boolean;
|
|
33
|
+
isCode: boolean;
|
|
34
|
+
isHighlight: boolean;
|
|
35
|
+
isImageCaption: boolean;
|
|
36
|
+
isItalic: boolean;
|
|
37
|
+
isLink: boolean;
|
|
38
|
+
isRTL: boolean;
|
|
39
|
+
isStrikethrough: boolean;
|
|
40
|
+
isSubscript: boolean;
|
|
41
|
+
isSuperscript: boolean;
|
|
42
|
+
isUnderline: boolean;
|
|
43
|
+
rootType: "table" | "root";
|
|
44
|
+
};
|
|
45
|
+
type ToolbarState = typeof INITIAL_TOOLBAR_STATE;
|
|
46
|
+
type ToolbarStateKey = keyof ToolbarState;
|
|
47
|
+
type ToolbarStateValue<Key extends ToolbarStateKey> = ToolbarState[Key];
|
|
48
|
+
type ContextShape = {
|
|
49
|
+
toolbarState: ToolbarState;
|
|
50
|
+
updateToolbarState<Key extends ToolbarStateKey>(key: Key, value: ToolbarStateValue<Key>): void;
|
|
51
|
+
};
|
|
52
|
+
export declare const ToolbarContext: ({ children, }: {
|
|
53
|
+
children: ReactNode;
|
|
54
|
+
}) => JSX.Element;
|
|
55
|
+
export declare const useToolbarState: () => ContextShape;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const editorConfig: {
|
|
2
|
+
enableToolbar: boolean;
|
|
3
|
+
toolbarOptions: {
|
|
4
|
+
enableUndoRedo: boolean;
|
|
5
|
+
enableTextFormatting: boolean;
|
|
6
|
+
enableAlignment: boolean;
|
|
7
|
+
enableFontControls: boolean;
|
|
8
|
+
enableTableOptions: boolean;
|
|
9
|
+
enableInsertMenu: boolean;
|
|
10
|
+
enableColorPicker: boolean;
|
|
11
|
+
enableClearOptions: boolean;
|
|
12
|
+
enableEmojiPicker: boolean;
|
|
13
|
+
enableLinks: boolean;
|
|
14
|
+
enableFormatTextMenu: boolean;
|
|
15
|
+
enableCodeFormat: boolean;
|
|
16
|
+
enableAIChat: boolean;
|
|
17
|
+
enableTodoList: boolean;
|
|
18
|
+
enableHtmlViewToggle: boolean;
|
|
19
|
+
};
|
|
20
|
+
enableFloatingMenu: boolean;
|
|
21
|
+
htmlViewOption: boolean;
|
|
22
|
+
floatingMenuOptions: {
|
|
23
|
+
bold: boolean;
|
|
24
|
+
italic: boolean;
|
|
25
|
+
underline: boolean;
|
|
26
|
+
uppercase: boolean;
|
|
27
|
+
lowercase: boolean;
|
|
28
|
+
capitalize: boolean;
|
|
29
|
+
strikethrough: boolean;
|
|
30
|
+
subscript: boolean;
|
|
31
|
+
superscript: boolean;
|
|
32
|
+
code: boolean;
|
|
33
|
+
link: boolean;
|
|
34
|
+
aiChat: boolean;
|
|
35
|
+
};
|
|
36
|
+
enableAutocomplete: boolean;
|
|
37
|
+
autocompleteOptions: {
|
|
38
|
+
minMatchLength: number;
|
|
39
|
+
maxSuggestions: number;
|
|
40
|
+
};
|
|
41
|
+
defaultFontFamilies: string[];
|
|
42
|
+
mentionUserList: string[];
|
|
43
|
+
};
|