@trycourier/react-designer 0.0.0-canary-20250424162557
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/README.md +402 -0
- package/dist/cjs/index.css +2 -0
- package/dist/cjs/index.css.map +7 -0
- package/dist/cjs/index.js +187 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/styles.css +3151 -0
- package/dist/components/BrandEditor/BrandEditor.d.ts +6 -0
- package/dist/components/BrandEditor/BrandEditor.types.d.ts +46 -0
- package/dist/components/BrandEditor/Editor/BrandFooter/BrandFooter.d.ts +13 -0
- package/dist/components/BrandEditor/Editor/BrandFooter/index.d.ts +1 -0
- package/dist/components/BrandEditor/Editor/Editor.d.ts +48 -0
- package/dist/components/BrandEditor/Editor/LogoUploader/LogoUploader.d.ts +4 -0
- package/dist/components/BrandEditor/Editor/LogoUploader/index.d.ts +1 -0
- package/dist/components/BrandEditor/Editor/SideBar/SideBar.d.ts +7 -0
- package/dist/components/BrandEditor/Editor/SideBar/index.d.ts +1 -0
- package/dist/components/BrandEditor/Editor/index.d.ts +1 -0
- package/dist/components/BrandEditor/Editor/useBlockEditor.d.ts +23 -0
- package/dist/components/BrandEditor/index.d.ts +1 -0
- package/dist/components/BrandEditor/store.d.ts +34 -0
- package/dist/components/ElementalValue/ElementalValue.d.ts +8 -0
- package/dist/components/ElementalValue/index.d.ts +1 -0
- package/dist/components/Providers/BrandProvider.d.ts +14 -0
- package/dist/components/Providers/Providers.types.d.ts +8 -0
- package/dist/components/Providers/TemplateProvider.d.ts +18 -0
- package/dist/components/Providers/api/brand.d.ts +6 -0
- package/dist/components/Providers/api/common.d.ts +5 -0
- package/dist/components/Providers/api/index.d.ts +3 -0
- package/dist/components/Providers/api/template.d.ts +6 -0
- package/dist/components/Providers/index.d.ts +3 -0
- package/dist/components/Providers/store.d.ts +116 -0
- package/dist/components/TemplateEditor/Editor/Editor.d.ts +11 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBar.d.ts +7 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarItem/SideBarItem.d.ts +12 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarItem/index.d.ts +1 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarItemDetails/SideBarItemDetails.d.ts +8 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarItemDetails/index.d.ts +1 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarSortableItemWrapper/SideBarSortableItemWrapper.d.ts +30 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarSortableItemWrapper/index.d.ts +1 -0
- package/dist/components/TemplateEditor/Editor/SideBar/index.d.ts +1 -0
- package/dist/components/TemplateEditor/Editor/index.d.ts +1 -0
- package/dist/components/TemplateEditor/Editor/useBlockEditor.d.ts +23 -0
- package/dist/components/TemplateEditor/TemplateEditor.d.ts +15 -0
- package/dist/components/TemplateEditor/index.d.ts +1 -0
- package/dist/components/TemplateEditor/store.d.ts +7 -0
- package/dist/components/extensions/Blockquote/Blockquote.d.ts +4 -0
- package/dist/components/extensions/Blockquote/Blockquote.types.d.ts +24 -0
- package/dist/components/extensions/Blockquote/BlockquoteComponent.d.ts +5 -0
- package/dist/components/extensions/Blockquote/BlockquoteForm.d.ts +8 -0
- package/dist/components/extensions/Blockquote/index.d.ts +3 -0
- package/dist/components/extensions/Button/Button.d.ts +14 -0
- package/dist/components/extensions/Button/Button.types.d.ts +63 -0
- package/dist/components/extensions/Button/ButtonComponent.d.ts +11 -0
- package/dist/components/extensions/Button/ButtonForm.d.ts +8 -0
- package/dist/components/extensions/Button/ButtonIcon.d.ts +6 -0
- package/dist/components/extensions/Button/index.d.ts +3 -0
- package/dist/components/extensions/Divider/Divider.d.ts +12 -0
- package/dist/components/extensions/Divider/Divider.types.d.ts +27 -0
- package/dist/components/extensions/Divider/DividerComponent.d.ts +9 -0
- package/dist/components/extensions/Divider/DividerForm.d.ts +8 -0
- package/dist/components/extensions/Divider/index.d.ts +4 -0
- package/dist/components/extensions/Document/Document.d.ts +2 -0
- package/dist/components/extensions/Document/index.d.ts +1 -0
- package/dist/components/extensions/DragPlaceholder/DragPlaceholder.d.ts +17 -0
- package/dist/components/extensions/DragPlaceholder/DragPlaceholderComponent.d.ts +3 -0
- package/dist/components/extensions/DragPlaceholder/index.d.ts +2 -0
- package/dist/components/extensions/FileHandler/FileHandler.d.ts +11 -0
- package/dist/components/extensions/FileHandler/index.d.ts +1 -0
- package/dist/components/extensions/Heading/Heading.d.ts +19 -0
- package/dist/components/extensions/Heading/index.d.ts +1 -0
- package/dist/components/extensions/Image/Image.d.ts +2 -0
- package/dist/components/extensions/Image/index.d.ts +1 -0
- package/dist/components/extensions/ImageBlock/ImageBlock.d.ts +17 -0
- package/dist/components/extensions/ImageBlock/ImageBlock.types.d.ts +47 -0
- package/dist/components/extensions/ImageBlock/components/ImageBlockForm.d.ts +7 -0
- package/dist/components/extensions/ImageBlock/components/ImageBlockMenu.d.ts +8 -0
- package/dist/components/extensions/ImageBlock/components/ImageBlockView.d.ts +13 -0
- package/dist/components/extensions/ImageBlock/components/ImageBlockWidth.d.ts +5 -0
- package/dist/components/extensions/ImageBlock/index.d.ts +4 -0
- package/dist/components/extensions/Link/Link.d.ts +2 -0
- package/dist/components/extensions/Link/LinkForm.d.ts +12 -0
- package/dist/components/extensions/Link/index.d.ts +2 -0
- package/dist/components/extensions/Paragraph/Paragraph.d.ts +13 -0
- package/dist/components/extensions/Paragraph/index.d.ts +1 -0
- package/dist/components/extensions/Selection/Selection.d.ts +16 -0
- package/dist/components/extensions/Selection/index.d.ts +1 -0
- package/dist/components/extensions/SlashMenu/MenuList.d.ts +2 -0
- package/dist/components/extensions/SlashMenu/SlashMenu.d.ts +2 -0
- package/dist/components/extensions/SlashMenu/SlashMenu.types.d.ts +19 -0
- package/dist/components/extensions/SlashMenu/commands.d.ts +2 -0
- package/dist/components/extensions/SlashMenu/index.d.ts +2 -0
- package/dist/components/extensions/TextBlock/TextBlock.types.d.ts +48 -0
- package/dist/components/extensions/TextBlock/TextBlockComponent.d.ts +10 -0
- package/dist/components/extensions/TextBlock/TextBlockForm.d.ts +8 -0
- package/dist/components/extensions/TextBlock/index.d.ts +3 -0
- package/dist/components/extensions/UniqueId/UniqueId.d.ts +14 -0
- package/dist/components/extensions/UniqueId/index.d.ts +1 -0
- package/dist/components/extensions/Variable/Variable.d.ts +4 -0
- package/dist/components/extensions/Variable/Variable.types.d.ts +40 -0
- package/dist/components/extensions/Variable/VariableSuggestions.d.ts +7 -0
- package/dist/components/extensions/Variable/VariableView.d.ts +3 -0
- package/dist/components/extensions/Variable/index.d.ts +2 -0
- package/dist/components/extensions/Variable/suggestion.d.ts +2 -0
- package/dist/components/extensions/extension-kit.d.ts +9 -0
- package/dist/components/extensions/index.d.ts +23 -0
- package/dist/components/hooks/index.d.ts +1 -0
- package/dist/components/hooks/useNodeAttributes.d.ts +13 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/ui/Blocks/Block.d.ts +7 -0
- package/dist/components/ui/Blocks/BlockquoteBlock/BlockquoteBlock.d.ts +2 -0
- package/dist/components/ui/Blocks/BlockquoteBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/ButtonBlock/ButtonBlock.d.ts +3 -0
- package/dist/components/ui/Blocks/ButtonBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/DividerBlock/DividerBlock.d.ts +3 -0
- package/dist/components/ui/Blocks/DividerBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/HeadingBlock/Heading.d.ts +3 -0
- package/dist/components/ui/Blocks/HeadingBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/ImageBlock/ImageBlock.d.ts +3 -0
- package/dist/components/ui/Blocks/ImageBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/SpacerBlock/SpacerBlock.d.ts +2 -0
- package/dist/components/ui/Blocks/SpacerBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/TextBlock/TextBlock.d.ts +3 -0
- package/dist/components/ui/Blocks/TextBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/index.d.ts +8 -0
- package/dist/components/ui/ContentIcon/ContentIcon.d.ts +7 -0
- package/dist/components/ui/ContentIcon/index.d.ts +1 -0
- package/dist/components/ui/ContentItemMenu/ContentItemMenu.d.ts +5 -0
- package/dist/components/ui/ContentItemMenu/hooks/useContentItemActions.d.ts +10 -0
- package/dist/components/ui/ContentItemMenu/hooks/useData.d.ts +13 -0
- package/dist/components/ui/ContentItemMenu/index.d.ts +1 -0
- package/dist/components/ui/Dropdown/Dropdown.d.ts +11 -0
- package/dist/components/ui/Dropdown/index.d.ts +1 -0
- package/dist/components/ui/EditorLayout/EditorLayout.d.ts +6 -0
- package/dist/components/ui/EditorLayout/index.d.ts +1 -0
- package/dist/components/ui/FormHeader/FormHeader.d.ts +5 -0
- package/dist/components/ui/FormHeader/index.d.ts +1 -0
- package/dist/components/ui/Handle/Handle.d.ts +1 -0
- package/dist/components/ui/Handle/index.d.ts +1 -0
- package/dist/components/ui/Header/Header.d.ts +5 -0
- package/dist/components/ui/Header/index.d.ts +1 -0
- package/dist/components/ui/Loader/Loader.d.ts +3 -0
- package/dist/components/ui/Loader/index.d.ts +1 -0
- package/dist/components/ui/Panel/index.d.ts +25 -0
- package/dist/components/ui/PreviewPanel/PreviewPanel.d.ts +6 -0
- package/dist/components/ui/PreviewPanel/index.d.ts +1 -0
- package/dist/components/ui/SortableItemWrapper/SortableItemWrapper.d.ts +26 -0
- package/dist/components/ui/SortableItemWrapper/index.d.ts +1 -0
- package/dist/components/ui/Spinner/Spinner.d.ts +2 -0
- package/dist/components/ui/Spinner/index.d.ts +1 -0
- package/dist/components/ui/Status/Status.d.ts +7 -0
- package/dist/components/ui/Status/index.d.ts +1 -0
- package/dist/components/ui/Surface.d.ts +6 -0
- package/dist/components/ui/TextInput/TextInput.d.ts +9 -0
- package/dist/components/ui/TextInput/index.d.ts +2 -0
- package/dist/components/ui/TextMenu/TextMenu.d.ts +5 -0
- package/dist/components/ui/TextMenu/components/ContentTypePicker.d.ts +22 -0
- package/dist/components/ui/TextMenu/components/index.d.ts +1 -0
- package/dist/components/ui/TextMenu/config.d.ts +20 -0
- package/dist/components/ui/TextMenu/hooks/useTextmenuCommands.d.ts +14 -0
- package/dist/components/ui/TextMenu/hooks/useTextmenuContentTypes.d.ts +3 -0
- package/dist/components/ui/TextMenu/hooks/useTextmenuStates.d.ts +18 -0
- package/dist/components/ui/TextMenu/index.d.ts +1 -0
- package/dist/components/ui/TextMenu/store.d.ts +89 -0
- package/dist/components/ui/Toggle/Toggle.d.ts +6 -0
- package/dist/components/ui/Toggle/index.d.ts +1 -0
- package/dist/components/ui/Toolbar.d.ts +27 -0
- package/dist/components/ui/Tooltip/index.d.ts +3 -0
- package/dist/components/ui/Tooltip/types.d.ts +15 -0
- package/dist/components/ui/index.d.ts +6 -0
- package/dist/components/ui-kit/Button/Button.d.ts +19 -0
- package/dist/components/ui-kit/Button/index.d.ts +1 -0
- package/dist/components/ui-kit/Divider/Divider.d.ts +2 -0
- package/dist/components/ui-kit/Divider/index.d.ts +1 -0
- package/dist/components/ui-kit/DropdownMenu/DropdownMenu.d.ts +29 -0
- package/dist/components/ui-kit/DropdownMenu/index.d.ts +1 -0
- package/dist/components/ui-kit/Form/Form.d.ts +23 -0
- package/dist/components/ui-kit/Form/index.d.ts +1 -0
- package/dist/components/ui-kit/Icon/ArrowUpIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/BinIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/BoldIcon.d.ts +2 -0
- package/dist/components/ui-kit/Icon/BorderRadiusIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/BorderWidthIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/BulletListIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/CenterAlignIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/CloseIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/ColorIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/CopyIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/DesktopIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/DistributeIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/DownIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/DuplicateIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/FacebookIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/FontSizeIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/H1Icon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/H2Icon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/H3Icon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/Icon.d.ts +9 -0
- package/dist/components/ui-kit/Icon/InstagramIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/ItalicIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/LeftAlignIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/LetterSpacingIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/LineHeightIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/LinkIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/LinkedinIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/MediumIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/MobileIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/NumberedListIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/PaddingHorizontalIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/PaddingVerticalIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/ParagraphIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/QuoteIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/RemoveFormattingIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/RightAlignIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/RightArrowIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/StrikethroughIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/UnderlineIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/UpIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/VariableIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/XIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/index.d.ts +42 -0
- package/dist/components/ui-kit/Input/Input.d.ts +6 -0
- package/dist/components/ui-kit/Input/index.d.ts +1 -0
- package/dist/components/ui-kit/InputColor/ColorPicker.d.ts +9 -0
- package/dist/components/ui-kit/InputColor/InputColor.d.ts +12 -0
- package/dist/components/ui-kit/InputColor/index.d.ts +1 -0
- package/dist/components/ui-kit/Label/Label.d.ts +6 -0
- package/dist/components/ui-kit/Label/index.d.ts +1 -0
- package/dist/components/ui-kit/Popover/Popover.d.ts +9 -0
- package/dist/components/ui-kit/Popover/index.d.ts +1 -0
- package/dist/components/ui-kit/Slider/Slider.d.ts +4 -0
- package/dist/components/ui-kit/Slider/index.d.ts +1 -0
- package/dist/components/ui-kit/Switch/Switch.d.ts +4 -0
- package/dist/components/ui-kit/Switch/index.d.ts +1 -0
- package/dist/components/ui-kit/Tabs/Tabs.d.ts +7 -0
- package/dist/components/ui-kit/Tabs/index.d.ts +1 -0
- package/dist/components/ui-kit/Textarea/Textarea.d.ts +5 -0
- package/dist/components/ui-kit/Textarea/index.d.ts +1 -0
- package/dist/components/ui-kit/ThemeProvider/ThemeContext.d.ts +2 -0
- package/dist/components/ui-kit/ThemeProvider/ThemeProvider.d.ts +9 -0
- package/dist/components/ui-kit/ThemeProvider/ThemeProvider.types.d.ts +23 -0
- package/dist/components/ui-kit/ThemeProvider/index.d.ts +1 -0
- package/dist/components/ui-kit/Toaster/Toaster.d.ts +4 -0
- package/dist/components/ui-kit/Toaster/index.d.ts +1 -0
- package/dist/components/ui-kit/Toggle/Toggle.d.ts +12 -0
- package/dist/components/ui-kit/Toggle/index.d.ts +1 -0
- package/dist/components/ui-kit/ToggleGroup/ToggleGroup.d.ts +12 -0
- package/dist/components/ui-kit/ToggleGroup/index.d.ts +1 -0
- package/dist/components/ui-kit/index.d.ts +16 -0
- package/dist/components/utils/createOrDuplicateNode.d.ts +3 -0
- package/dist/components/utils/generateNodeIds.d.ts +8 -0
- package/dist/components/utils/getFlattenedVariables.d.ts +14 -0
- package/dist/components/utils/index.d.ts +6 -0
- package/dist/components/utils/isCustomNodeSelected.d.ts +4 -0
- package/dist/components/utils/isTextSelected.d.ts +5 -0
- package/dist/components/utils/multipleContainersKeyboardCoordinates.d.ts +2 -0
- package/dist/esm/index.css +2 -0
- package/dist/esm/index.css.map +7 -0
- package/dist/esm/index.js +187 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/styles.css +3151 -0
- package/dist/hooks/useAutoSave.d.ts +12 -0
- package/dist/index.d.ts +4 -0
- package/dist/lib/api/UploadImageAPI.d.ts +4 -0
- package/dist/lib/api/uploadImage.d.ts +6 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/utils/convertElementalToTiptap/convertElementalToTiptap.d.ts +3 -0
- package/dist/lib/utils/convertElementalToTiptap/index.d.ts +1 -0
- package/dist/lib/utils/convertMarkdownToTiptap/convertMarkdownToTiptap.d.ts +2 -0
- package/dist/lib/utils/convertMarkdownToTiptap/index.d.ts +1 -0
- package/dist/lib/utils/convertTiptapToElemental/convertTiptapToElemental.d.ts +17 -0
- package/dist/lib/utils/convertTiptapToElemental/index.d.ts +1 -0
- package/dist/lib/utils/convertTiptapToMarkdown/convertTiptapToMarkdown.d.ts +2 -0
- package/dist/lib/utils/getRenderContainer/getRenderContainer.d.ts +3 -0
- package/dist/lib/utils/getRenderContainer/index.d.ts +1 -0
- package/dist/lib/utils/image.d.ts +7 -0
- package/dist/lib/utils/index.d.ts +7 -0
- package/dist/lib/utils/useForwardedRefCallback/index.d.ts +1 -0
- package/dist/lib/utils/useForwardedRefCallback/useForwardedRefCallback.d.ts +21 -0
- package/dist/lib/utils/useForwardedRefCallback/useForwardedRefCallback.test.d.ts +1 -0
- package/dist/store.d.ts +3 -0
- package/dist/styles.css +3151 -0
- package/dist/types/elemental.schema.d.ts +25 -0
- package/dist/types/elemental.types.d.ts +195 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/tiptap.types.d.ts +15 -0
- package/package.json +150 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const buttonSchema: z.ZodObject<{
|
|
3
|
+
label: z.ZodString;
|
|
4
|
+
link: z.ZodOptional<z.ZodString>;
|
|
5
|
+
alignment: z.ZodEnum<["left", "center", "right"]>;
|
|
6
|
+
size: z.ZodEnum<["default", "full"]>;
|
|
7
|
+
backgroundColor: z.ZodString;
|
|
8
|
+
textColor: z.ZodString;
|
|
9
|
+
borderWidth: z.ZodNumber;
|
|
10
|
+
borderRadius: z.ZodNumber;
|
|
11
|
+
borderColor: z.ZodString;
|
|
12
|
+
padding: z.ZodNumber;
|
|
13
|
+
fontWeight: z.ZodEnum<["normal", "bold"]>;
|
|
14
|
+
fontStyle: z.ZodEnum<["normal", "italic"]>;
|
|
15
|
+
isUnderline: z.ZodBoolean;
|
|
16
|
+
isStrike: z.ZodBoolean;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
padding: number;
|
|
19
|
+
borderWidth: number;
|
|
20
|
+
borderColor: string;
|
|
21
|
+
size: "full" | "default";
|
|
22
|
+
borderRadius: number;
|
|
23
|
+
textColor: string;
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
label: string;
|
|
26
|
+
alignment: "left" | "center" | "right";
|
|
27
|
+
fontStyle: "italic" | "normal";
|
|
28
|
+
fontWeight: "bold" | "normal";
|
|
29
|
+
isUnderline: boolean;
|
|
30
|
+
isStrike: boolean;
|
|
31
|
+
link?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
padding: number;
|
|
34
|
+
borderWidth: number;
|
|
35
|
+
borderColor: string;
|
|
36
|
+
size: "full" | "default";
|
|
37
|
+
borderRadius: number;
|
|
38
|
+
textColor: string;
|
|
39
|
+
backgroundColor: string;
|
|
40
|
+
label: string;
|
|
41
|
+
alignment: "left" | "center" | "right";
|
|
42
|
+
fontStyle: "italic" | "normal";
|
|
43
|
+
fontWeight: "bold" | "normal";
|
|
44
|
+
isUnderline: boolean;
|
|
45
|
+
isStrike: boolean;
|
|
46
|
+
link?: string | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
export interface ButtonProps {
|
|
49
|
+
label: string;
|
|
50
|
+
link?: string;
|
|
51
|
+
alignment: "left" | "center" | "right";
|
|
52
|
+
size: "default" | "full";
|
|
53
|
+
backgroundColor: string;
|
|
54
|
+
textColor: string;
|
|
55
|
+
borderWidth: number;
|
|
56
|
+
borderRadius: number;
|
|
57
|
+
borderColor: string;
|
|
58
|
+
padding: number;
|
|
59
|
+
fontWeight: "normal" | "bold";
|
|
60
|
+
fontStyle: "normal" | "italic";
|
|
61
|
+
isUnderline: boolean;
|
|
62
|
+
isStrike: boolean;
|
|
63
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type NodeViewProps } from "@tiptap/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { ButtonProps } from "./Button.types";
|
|
4
|
+
export declare const ButtonComponent: React.FC<ButtonProps & {
|
|
5
|
+
nodeKey?: string;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
fontWeight?: string;
|
|
8
|
+
isUnderline?: boolean;
|
|
9
|
+
isStrike?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const ButtonComponentNode: (props: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
|
|
2
|
+
import type { Editor } from "@tiptap/react";
|
|
3
|
+
interface ButtonFormProps {
|
|
4
|
+
element?: ProseMirrorNode;
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const ButtonForm: ({ element, editor }: ButtonFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type IconProps } from "@/components/ui-kit/Icon/Icon";
|
|
2
|
+
export declare const ButtonAlignLeftIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const ButtonAlignCenterIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const ButtonAlignRightIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const ButtonSizeDefaultIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const ButtonSizeFullIcon: ({ color, width, height, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DividerProps } from "./Divider.types";
|
|
2
|
+
declare module "@tiptap/core" {
|
|
3
|
+
interface Commands<ReturnType> {
|
|
4
|
+
divider: {
|
|
5
|
+
setDivider: (props: Partial<DividerProps>) => ReturnType;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare const defaultDividerProps: DividerProps;
|
|
10
|
+
export declare const defaultSpacerProps: DividerProps;
|
|
11
|
+
export declare const Divider: import("@tiptap/core").Node<import("@tiptap/extension-horizontal-rule").HorizontalRuleOptions, any>;
|
|
12
|
+
export default Divider;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const dividerSchema: z.ZodObject<{
|
|
3
|
+
padding: z.ZodNumber;
|
|
4
|
+
color: z.ZodString;
|
|
5
|
+
size: z.ZodNumber;
|
|
6
|
+
radius: z.ZodNumber;
|
|
7
|
+
variant: z.ZodDefault<z.ZodEnum<["divider", "spacer"]>>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
color: string;
|
|
10
|
+
padding: number;
|
|
11
|
+
size: number;
|
|
12
|
+
radius: number;
|
|
13
|
+
variant: "divider" | "spacer";
|
|
14
|
+
}, {
|
|
15
|
+
color: string;
|
|
16
|
+
padding: number;
|
|
17
|
+
size: number;
|
|
18
|
+
radius: number;
|
|
19
|
+
variant?: "divider" | "spacer" | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export interface DividerProps {
|
|
22
|
+
padding: number;
|
|
23
|
+
color: string;
|
|
24
|
+
size: number;
|
|
25
|
+
radius: number;
|
|
26
|
+
variant: "divider" | "spacer";
|
|
27
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type NodeViewProps } from "@tiptap/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { DividerProps } from "./Divider.types";
|
|
4
|
+
export declare const DividerComponent: React.FC<DividerProps & {
|
|
5
|
+
nodeKey?: string;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
draggable?: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const DividerComponentNode: (props: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
|
|
2
|
+
import type { Editor } from "@tiptap/react";
|
|
3
|
+
interface DividerFormProps {
|
|
4
|
+
element?: ProseMirrorNode;
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const DividerForm: ({ element, editor }: DividerFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Document";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Node } from "@tiptap/core";
|
|
2
|
+
export interface DragPlaceholderOptions {
|
|
3
|
+
HTMLAttributes: Record<string, unknown>;
|
|
4
|
+
}
|
|
5
|
+
declare module "@tiptap/core" {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
dragPlaceholder: {
|
|
8
|
+
setDragPlaceholder: (options: {
|
|
9
|
+
id: string;
|
|
10
|
+
type: string;
|
|
11
|
+
pos?: number;
|
|
12
|
+
}) => ReturnType;
|
|
13
|
+
removeDragPlaceholder: () => ReturnType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare const DragPlaceholder: Node<any, any>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/core";
|
|
2
|
+
import { Extension } from "@tiptap/core";
|
|
3
|
+
import { PluginKey } from "@tiptap/pm/state";
|
|
4
|
+
export interface FileHandlerOptions {
|
|
5
|
+
allowedMimeTypes?: string[];
|
|
6
|
+
onDrop?: (editor: Editor, files: File[], pos: number) => void;
|
|
7
|
+
onPaste?: (editor: Editor, files: File[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const FileHandlerPlugin: PluginKey<any>;
|
|
10
|
+
export declare const FileHandler: Extension<FileHandlerOptions, any>;
|
|
11
|
+
export default FileHandler;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FileHandler } from "./FileHandler";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Level } from "@tiptap/extension-heading";
|
|
2
|
+
declare module "@tiptap/core" {
|
|
3
|
+
interface Commands<ReturnType> {
|
|
4
|
+
heading: {
|
|
5
|
+
setHeading: (attributes: {
|
|
6
|
+
level: Level;
|
|
7
|
+
}) => ReturnType;
|
|
8
|
+
toggleHeading: (attributes: {
|
|
9
|
+
level: Level;
|
|
10
|
+
}) => ReturnType;
|
|
11
|
+
};
|
|
12
|
+
textAlign: {
|
|
13
|
+
setTextAlign: (alignment: string) => ReturnType;
|
|
14
|
+
unsetTextAlign: () => ReturnType;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export declare const Heading: import("@tiptap/core").Node<import("@tiptap/extension-heading").HeadingOptions, any>;
|
|
19
|
+
export default Heading;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Heading";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Image";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Node } from "@tiptap/core";
|
|
2
|
+
import type { ImageBlockProps } from "./ImageBlock.types";
|
|
3
|
+
declare module "@tiptap/core" {
|
|
4
|
+
interface Commands<ReturnType> {
|
|
5
|
+
imageBlock: {
|
|
6
|
+
setImageBlock: (props: Partial<ImageBlockProps>) => ReturnType;
|
|
7
|
+
setImageBlockAt: (props: {
|
|
8
|
+
pos: number;
|
|
9
|
+
src: string;
|
|
10
|
+
}) => ReturnType;
|
|
11
|
+
setImageBlockAlign: (alignment: "left" | "center" | "right") => ReturnType;
|
|
12
|
+
setImageBlockWidth: (width: number) => ReturnType;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export declare const defaultImageProps: ImageBlockProps;
|
|
17
|
+
export declare const ImageBlock: Node<any, any>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const imageBlockSchema: z.ZodObject<{
|
|
3
|
+
sourcePath: z.ZodString;
|
|
4
|
+
link: z.ZodOptional<z.ZodString>;
|
|
5
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
6
|
+
alignment: z.ZodEnum<["left", "center", "right"]>;
|
|
7
|
+
width: z.ZodNumber;
|
|
8
|
+
borderWidth: z.ZodNumber;
|
|
9
|
+
borderRadius: z.ZodNumber;
|
|
10
|
+
borderColor: z.ZodString;
|
|
11
|
+
isUploading: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
imageNaturalWidth: z.ZodNumber;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
width: number;
|
|
15
|
+
borderWidth: number;
|
|
16
|
+
borderColor: string;
|
|
17
|
+
borderRadius: number;
|
|
18
|
+
alignment: "left" | "center" | "right";
|
|
19
|
+
sourcePath: string;
|
|
20
|
+
imageNaturalWidth: number;
|
|
21
|
+
link?: string | undefined;
|
|
22
|
+
alt?: string | undefined;
|
|
23
|
+
isUploading?: boolean | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
width: number;
|
|
26
|
+
borderWidth: number;
|
|
27
|
+
borderColor: string;
|
|
28
|
+
borderRadius: number;
|
|
29
|
+
alignment: "left" | "center" | "right";
|
|
30
|
+
sourcePath: string;
|
|
31
|
+
imageNaturalWidth: number;
|
|
32
|
+
link?: string | undefined;
|
|
33
|
+
alt?: string | undefined;
|
|
34
|
+
isUploading?: boolean | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
export interface ImageBlockProps {
|
|
37
|
+
sourcePath: string;
|
|
38
|
+
link?: string;
|
|
39
|
+
alt?: string;
|
|
40
|
+
alignment: "left" | "center" | "right";
|
|
41
|
+
width: number;
|
|
42
|
+
borderWidth: number;
|
|
43
|
+
borderRadius: number;
|
|
44
|
+
borderColor: string;
|
|
45
|
+
isUploading?: boolean;
|
|
46
|
+
imageNaturalWidth: number;
|
|
47
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
|
|
2
|
+
import type { Editor } from "@tiptap/react";
|
|
3
|
+
export interface ImageBlockFormProps {
|
|
4
|
+
element?: ProseMirrorNode;
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const ImageBlockForm: ({ element, editor }: ImageBlockFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/react";
|
|
2
|
+
export interface MenuProps {
|
|
3
|
+
editor: Editor;
|
|
4
|
+
appendTo?: React.RefObject<HTMLElement>;
|
|
5
|
+
shouldHide?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ImageBlockMenu: ({ editor, appendTo }: MenuProps) => JSX.Element;
|
|
8
|
+
export default ImageBlockMenu;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Editor, NodeViewProps } from "@tiptap/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { ImageBlockProps } from "../ImageBlock.types";
|
|
4
|
+
export declare const ImageBlockComponent: React.FC<ImageBlockProps & {
|
|
5
|
+
nodeKey?: string;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
draggable?: boolean;
|
|
8
|
+
onFileSelect?: (file: File) => void;
|
|
9
|
+
width: number;
|
|
10
|
+
imageNaturalWidth: number;
|
|
11
|
+
editor?: Editor;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const ImageBlockView: (props: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Mark } from "@tiptap/pm/model";
|
|
2
|
+
import type { Editor } from "@tiptap/react";
|
|
3
|
+
interface LinkFormProps {
|
|
4
|
+
editor: Editor | null;
|
|
5
|
+
mark?: Mark;
|
|
6
|
+
pendingLink?: {
|
|
7
|
+
from: number;
|
|
8
|
+
to: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare const LinkForm: ({ editor, mark, pendingLink }: LinkFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare module "@tiptap/core" {
|
|
2
|
+
interface Commands<ReturnType> {
|
|
3
|
+
paragraph: {
|
|
4
|
+
setParagraph: () => ReturnType;
|
|
5
|
+
};
|
|
6
|
+
textAlign: {
|
|
7
|
+
setTextAlign: (alignment: string) => ReturnType;
|
|
8
|
+
unsetTextAlign: () => ReturnType;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare const Paragraph: import("@tiptap/core").Node<import("@tiptap/extension-paragraph").ParagraphOptions, any>;
|
|
13
|
+
export default Paragraph;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Paragraph";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Node } from "@tiptap/pm/model";
|
|
2
|
+
import { Extension } from "@tiptap/core";
|
|
3
|
+
import { PluginKey } from "@tiptap/pm/state";
|
|
4
|
+
export interface SelectionOptions {
|
|
5
|
+
HTMLAttributes: Record<string, unknown>;
|
|
6
|
+
setSelectedNode: (node: Node) => void;
|
|
7
|
+
}
|
|
8
|
+
declare module "@tiptap/core" {
|
|
9
|
+
interface Commands<ReturnType> {
|
|
10
|
+
selection: {
|
|
11
|
+
updateSelectionState: (node: Node | null) => ReturnType;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export declare const SelectionPlugin: PluginKey<any>;
|
|
16
|
+
export declare const Selection: Extension<SelectionOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Selection";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/core";
|
|
2
|
+
import type { SuggestionProps } from "@tiptap/suggestion";
|
|
3
|
+
export interface Command {
|
|
4
|
+
label: string;
|
|
5
|
+
aliases?: string[];
|
|
6
|
+
action: (editor: Editor) => void;
|
|
7
|
+
shouldBeHidden?: (editor: Editor) => boolean;
|
|
8
|
+
isEnabled?: boolean;
|
|
9
|
+
icon: JSX.Element;
|
|
10
|
+
description: string;
|
|
11
|
+
}
|
|
12
|
+
export interface MenuListProps extends SuggestionProps {
|
|
13
|
+
selected: number;
|
|
14
|
+
items: Command[];
|
|
15
|
+
command: (item: Command) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface SlashMenuOptions {
|
|
18
|
+
suggestion: SuggestionProps;
|
|
19
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const textBlockSchema: z.ZodObject<{
|
|
3
|
+
paddingVertical: z.ZodNumber;
|
|
4
|
+
paddingHorizontal: z.ZodNumber;
|
|
5
|
+
backgroundColor: z.ZodString;
|
|
6
|
+
borderWidth: z.ZodNumber;
|
|
7
|
+
borderRadius: z.ZodNumber;
|
|
8
|
+
borderColor: z.ZodString;
|
|
9
|
+
textColor: z.ZodString;
|
|
10
|
+
textAlign: z.ZodDefault<z.ZodEnum<["left", "center", "right", "justify"]>>;
|
|
11
|
+
selected: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
id: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
borderWidth: number;
|
|
15
|
+
paddingVertical: number;
|
|
16
|
+
paddingHorizontal: number;
|
|
17
|
+
borderColor: string;
|
|
18
|
+
borderRadius: number;
|
|
19
|
+
textAlign: "left" | "center" | "right" | "justify";
|
|
20
|
+
textColor: string;
|
|
21
|
+
backgroundColor: string;
|
|
22
|
+
selected: boolean;
|
|
23
|
+
id?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
borderWidth: number;
|
|
26
|
+
paddingVertical: number;
|
|
27
|
+
paddingHorizontal: number;
|
|
28
|
+
borderColor: string;
|
|
29
|
+
borderRadius: number;
|
|
30
|
+
textColor: string;
|
|
31
|
+
backgroundColor: string;
|
|
32
|
+
id?: string | undefined;
|
|
33
|
+
textAlign?: "left" | "center" | "right" | "justify" | undefined;
|
|
34
|
+
selected?: boolean | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
export interface TextBlockProps {
|
|
37
|
+
paddingVertical: number;
|
|
38
|
+
paddingHorizontal: number;
|
|
39
|
+
backgroundColor: string;
|
|
40
|
+
borderWidth: number;
|
|
41
|
+
borderRadius: number;
|
|
42
|
+
borderColor: string;
|
|
43
|
+
textColor: string;
|
|
44
|
+
textAlign: "left" | "center" | "right" | "justify";
|
|
45
|
+
selected: boolean;
|
|
46
|
+
id?: string;
|
|
47
|
+
}
|
|
48
|
+
export declare const defaultTextBlockProps: TextBlockProps;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type NodeViewProps } from "@tiptap/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { TextBlockProps } from "./TextBlock.types";
|
|
4
|
+
export declare const TextBlockComponent: React.FC<TextBlockProps & {
|
|
5
|
+
nodeKey?: string;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
level?: number;
|
|
8
|
+
type?: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const TextBlockComponentNode: (props: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
|
|
2
|
+
import type { Editor } from "@tiptap/react";
|
|
3
|
+
interface TextBlockFormProps {
|
|
4
|
+
element?: ProseMirrorNode;
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const TextBlockForm: ({ element, editor }: TextBlockFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Extension } from "@tiptap/core";
|
|
2
|
+
import { PluginKey } from "@tiptap/pm/state";
|
|
3
|
+
export interface UniqueIdOptions {
|
|
4
|
+
types: string[];
|
|
5
|
+
}
|
|
6
|
+
declare module "@tiptap/core" {
|
|
7
|
+
interface Commands<ReturnType> {
|
|
8
|
+
uniqueId: {
|
|
9
|
+
setUniqueId: () => ReturnType;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare const UniqueIdPluginKey: PluginKey<any>;
|
|
14
|
+
export declare const UniqueId: Extension<UniqueIdOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./UniqueId";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Editor, Range } from "@tiptap/core";
|
|
2
|
+
import type { SuggestionOptions, SuggestionProps } from "@tiptap/suggestion";
|
|
3
|
+
interface Props {
|
|
4
|
+
editor: Editor;
|
|
5
|
+
range: Range;
|
|
6
|
+
clientRect: () => DOMRect | null;
|
|
7
|
+
items: string[];
|
|
8
|
+
command: (props: {
|
|
9
|
+
editor: Editor;
|
|
10
|
+
range: Range;
|
|
11
|
+
props: string;
|
|
12
|
+
}) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface VariableOptions {
|
|
15
|
+
HTMLAttributes?: Record<string, unknown>;
|
|
16
|
+
suggestion?: Partial<SuggestionOptions>;
|
|
17
|
+
variables?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface VariableCommandProps {
|
|
20
|
+
editor: Editor;
|
|
21
|
+
range: Range;
|
|
22
|
+
props: string;
|
|
23
|
+
}
|
|
24
|
+
export interface VariableSuggestionProps extends Props {
|
|
25
|
+
selected: number;
|
|
26
|
+
}
|
|
27
|
+
export interface VariableNodeOptions {
|
|
28
|
+
HTMLAttributes?: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
export interface VariableNodeAttributes {
|
|
31
|
+
id: string | null;
|
|
32
|
+
}
|
|
33
|
+
export interface VariableSuggestionsProps extends SuggestionProps {
|
|
34
|
+
items: string[];
|
|
35
|
+
command: (item: string) => void;
|
|
36
|
+
editor: Editor;
|
|
37
|
+
query: string;
|
|
38
|
+
selected: number;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Node } from "@tiptap/pm/model";
|
|
2
|
+
export declare const ExtensionKit: (options?: {
|
|
3
|
+
variables?: Record<string, unknown>;
|
|
4
|
+
setSelectedNode?: (node: Node) => void;
|
|
5
|
+
}) => (import("@tiptap/core").Node<any, any> | import("@tiptap/core").Extension<import("./FileHandler/FileHandler").FileHandlerOptions, any> | import("@tiptap/core").Extension<import("./Selection").SelectionOptions, any> | import("@tiptap/core").Extension<import("./Variable").VariableOptions, any> | import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | {
|
|
6
|
+
new (): History;
|
|
7
|
+
prototype: History;
|
|
8
|
+
} | import("@tiptap/core").Extension<import("@tiptap/extension-color").ColorOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-underline").UnderlineOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-typography").TypographyOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-placeholder").PlaceholderOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-dropcursor").DropcursorOptions, any>)[];
|
|
9
|
+
export default ExtensionKit;
|