@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,6 @@
|
|
|
1
|
+
import type { Theme } from "../ui-kit/ThemeProvider/ThemeProvider.types";
|
|
2
|
+
import { type EditorProps } from "./Editor";
|
|
3
|
+
export interface BrandEditorProps extends EditorProps {
|
|
4
|
+
theme?: Theme | string;
|
|
5
|
+
}
|
|
6
|
+
export declare const BrandEditor: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<BrandEditorProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const brandEditorSchema: z.ZodObject<{
|
|
3
|
+
headerStyle: z.ZodEnum<["plain", "border"]>;
|
|
4
|
+
isUnsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
isPreferences: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
link: z.ZodOptional<z.ZodString>;
|
|
7
|
+
brandColor: z.ZodString;
|
|
8
|
+
textColor: z.ZodString;
|
|
9
|
+
subtleColor: z.ZodString;
|
|
10
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
11
|
+
facebookLink: z.ZodOptional<z.ZodString>;
|
|
12
|
+
linkedinLink: z.ZodOptional<z.ZodString>;
|
|
13
|
+
instagramLink: z.ZodOptional<z.ZodString>;
|
|
14
|
+
mediumLink: z.ZodOptional<z.ZodString>;
|
|
15
|
+
xLink: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
textColor: string;
|
|
18
|
+
headerStyle: "border" | "plain";
|
|
19
|
+
brandColor: string;
|
|
20
|
+
subtleColor: string;
|
|
21
|
+
link?: string | undefined;
|
|
22
|
+
isUnsubscribe?: boolean | undefined;
|
|
23
|
+
isPreferences?: boolean | undefined;
|
|
24
|
+
logo?: string | undefined;
|
|
25
|
+
facebookLink?: string | undefined;
|
|
26
|
+
linkedinLink?: string | undefined;
|
|
27
|
+
instagramLink?: string | undefined;
|
|
28
|
+
mediumLink?: string | undefined;
|
|
29
|
+
xLink?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
textColor: string;
|
|
32
|
+
headerStyle: "border" | "plain";
|
|
33
|
+
brandColor: string;
|
|
34
|
+
subtleColor: string;
|
|
35
|
+
link?: string | undefined;
|
|
36
|
+
isUnsubscribe?: boolean | undefined;
|
|
37
|
+
isPreferences?: boolean | undefined;
|
|
38
|
+
logo?: string | undefined;
|
|
39
|
+
facebookLink?: string | undefined;
|
|
40
|
+
linkedinLink?: string | undefined;
|
|
41
|
+
instagramLink?: string | undefined;
|
|
42
|
+
mediumLink?: string | undefined;
|
|
43
|
+
xLink?: string | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export type BrandEditorFormValues = z.infer<typeof brandEditorSchema>;
|
|
46
|
+
export declare const defaultBrandEditorFormValues: BrandEditorFormValues;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Editor as TiptapEditor } from "@tiptap/react";
|
|
2
|
+
interface BrandFooterProps {
|
|
3
|
+
variables?: Record<string, unknown>;
|
|
4
|
+
setEditor?: (editor: TiptapEditor | null) => void;
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
facebookLink?: string;
|
|
7
|
+
linkedinLink?: string;
|
|
8
|
+
instagramLink?: string;
|
|
9
|
+
mediumLink?: string;
|
|
10
|
+
xLink?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const BrandFooter: import("react").MemoExoticComponent<({ variables, facebookLink, linkedinLink, instagramLink, mediumLink, xLink, readOnly, setEditor, }: BrandFooterProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./BrandFooter";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
interface BrandSettings {
|
|
2
|
+
colors?: {
|
|
3
|
+
primary?: string;
|
|
4
|
+
secondary?: string;
|
|
5
|
+
tertiary?: string;
|
|
6
|
+
};
|
|
7
|
+
email?: {
|
|
8
|
+
header?: {
|
|
9
|
+
barColor?: string;
|
|
10
|
+
logo?: {
|
|
11
|
+
href?: string;
|
|
12
|
+
image?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
footer?: {
|
|
16
|
+
markdown?: string;
|
|
17
|
+
social?: {
|
|
18
|
+
facebook?: {
|
|
19
|
+
url?: string;
|
|
20
|
+
};
|
|
21
|
+
instagram?: {
|
|
22
|
+
url?: string;
|
|
23
|
+
};
|
|
24
|
+
linkedin?: {
|
|
25
|
+
url?: string;
|
|
26
|
+
};
|
|
27
|
+
medium?: {
|
|
28
|
+
url?: string;
|
|
29
|
+
};
|
|
30
|
+
twitter?: {
|
|
31
|
+
url?: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface EditorProps {
|
|
38
|
+
hidePublish?: boolean;
|
|
39
|
+
autoSaveDebounce?: number;
|
|
40
|
+
autoSave?: boolean;
|
|
41
|
+
templateEditor?: boolean;
|
|
42
|
+
isVisible?: boolean;
|
|
43
|
+
variables?: Record<string, unknown>;
|
|
44
|
+
value?: BrandSettings;
|
|
45
|
+
onChange?: (value: BrandSettings) => void;
|
|
46
|
+
}
|
|
47
|
+
export declare const Editor: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<EditorProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LogoUploader";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/react";
|
|
2
|
+
import type { BrandEditorFormValues } from "../../BrandEditor.types";
|
|
3
|
+
export declare const SideBar: ({ editor, setForm, currentForm, }: {
|
|
4
|
+
editor: Editor;
|
|
5
|
+
setForm: (form: BrandEditorFormValues) => void;
|
|
6
|
+
currentForm?: BrandEditorFormValues;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SideBar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Editor";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ElementalContent } from "@/types";
|
|
2
|
+
import type { Editor } from "@tiptap/core";
|
|
3
|
+
import type { Node } from "@tiptap/pm/model";
|
|
4
|
+
import type { Doc as YDoc } from "yjs";
|
|
5
|
+
declare global {
|
|
6
|
+
interface Window {
|
|
7
|
+
editor: Editor | null;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
interface UseBlockEditorProps {
|
|
11
|
+
initialContent?: ElementalContent;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
subject?: string | null;
|
|
14
|
+
variables?: Record<string, unknown>;
|
|
15
|
+
ydoc: YDoc;
|
|
16
|
+
onDestroy?: () => void;
|
|
17
|
+
onUpdate?: () => void;
|
|
18
|
+
setSelectedNode?: (node: Node | null) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const useBlockEditor: ({ initialContent, readOnly, variables, ydoc, onDestroy, setSelectedNode, }: UseBlockEditorProps) => {
|
|
21
|
+
editor: Editor;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./BrandEditor";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const BrandEditorContentAtom: import("jotai").PrimitiveAtom<string | null> & {
|
|
2
|
+
init: string | null;
|
|
3
|
+
};
|
|
4
|
+
export declare const BrandEditorFormAtom: import("jotai").PrimitiveAtom<{
|
|
5
|
+
textColor: string;
|
|
6
|
+
headerStyle: "border" | "plain";
|
|
7
|
+
brandColor: string;
|
|
8
|
+
subtleColor: string;
|
|
9
|
+
link?: string | undefined;
|
|
10
|
+
isUnsubscribe?: boolean | undefined;
|
|
11
|
+
isPreferences?: boolean | undefined;
|
|
12
|
+
logo?: string | undefined;
|
|
13
|
+
facebookLink?: string | undefined;
|
|
14
|
+
linkedinLink?: string | undefined;
|
|
15
|
+
instagramLink?: string | undefined;
|
|
16
|
+
mediumLink?: string | undefined;
|
|
17
|
+
xLink?: string | undefined;
|
|
18
|
+
} | null> & {
|
|
19
|
+
init: {
|
|
20
|
+
textColor: string;
|
|
21
|
+
headerStyle: "border" | "plain";
|
|
22
|
+
brandColor: string;
|
|
23
|
+
subtleColor: string;
|
|
24
|
+
link?: string | undefined;
|
|
25
|
+
isUnsubscribe?: boolean | undefined;
|
|
26
|
+
isPreferences?: boolean | undefined;
|
|
27
|
+
logo?: string | undefined;
|
|
28
|
+
facebookLink?: string | undefined;
|
|
29
|
+
linkedinLink?: string | undefined;
|
|
30
|
+
instagramLink?: string | undefined;
|
|
31
|
+
mediumLink?: string | undefined;
|
|
32
|
+
xLink?: string | undefined;
|
|
33
|
+
} | null;
|
|
34
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ElementalContent } from "@/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface ElementalValueProps {
|
|
4
|
+
value?: ElementalContent;
|
|
5
|
+
onChange?: (value: string, isValid: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ElementalValue: React.FC<ElementalValueProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ElementalValue } from "./ElementalValue";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BasicProviderProps } from "./Providers.types";
|
|
2
|
+
export declare function useBrandActions(): {
|
|
3
|
+
getTenant: (options?: {
|
|
4
|
+
includeBrand?: boolean;
|
|
5
|
+
} | undefined) => Promise<void>;
|
|
6
|
+
saveBrand: (settings?: Record<string, unknown> | undefined) => Promise<any>;
|
|
7
|
+
publishBrand: () => Promise<any>;
|
|
8
|
+
isTenantLoading: boolean | null;
|
|
9
|
+
isTenantSaving: boolean | null;
|
|
10
|
+
isTenantPublishing: boolean | null;
|
|
11
|
+
tenantError: string | null;
|
|
12
|
+
tenantData: import("./store").TenantData | null;
|
|
13
|
+
};
|
|
14
|
+
export declare const BrandProvider: import("react").NamedExoticComponent<BasicProviderProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BasicProviderProps } from "./Providers.types";
|
|
2
|
+
export declare function useTemplateActions(): {
|
|
3
|
+
getTenant: (options?: {
|
|
4
|
+
includeBrand?: boolean;
|
|
5
|
+
} | undefined) => Promise<void>;
|
|
6
|
+
saveTemplate: () => Promise<any>;
|
|
7
|
+
publishTemplate: () => Promise<any>;
|
|
8
|
+
isTenantLoading: boolean | null;
|
|
9
|
+
isTenantSaving: boolean | null;
|
|
10
|
+
isTenantPublishing: boolean | null;
|
|
11
|
+
tenantError: string | null;
|
|
12
|
+
tenantData: import("./store").TenantData | null;
|
|
13
|
+
};
|
|
14
|
+
type TemplateProviderProps = BasicProviderProps & {
|
|
15
|
+
templateId: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const TemplateProvider: import("react").NamedExoticComponent<TemplateProviderProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const saveBrandAtom: import("jotai").WritableAtom<null, [settings?: Record<string, unknown> | undefined], Promise<any>> & {
|
|
2
|
+
init: null;
|
|
3
|
+
};
|
|
4
|
+
export declare const publishBrandAtom: import("jotai").WritableAtom<null, [], Promise<any>> & {
|
|
5
|
+
init: null;
|
|
6
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/react";
|
|
2
|
+
import type { ElementalContent } from "@/types/elemental.types";
|
|
3
|
+
export interface TenantData {
|
|
4
|
+
data?: {
|
|
5
|
+
tenant?: {
|
|
6
|
+
tenantId?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
notification?: {
|
|
9
|
+
createdAt?: string;
|
|
10
|
+
notificationId?: string;
|
|
11
|
+
version?: string;
|
|
12
|
+
data?: {
|
|
13
|
+
content?: ElementalContent;
|
|
14
|
+
routing?: {
|
|
15
|
+
method?: string;
|
|
16
|
+
channels?: string[];
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
brand?: {
|
|
24
|
+
brandId?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
settings?: {
|
|
27
|
+
colors?: {
|
|
28
|
+
primary?: string;
|
|
29
|
+
secondary?: string;
|
|
30
|
+
tertiary?: string;
|
|
31
|
+
};
|
|
32
|
+
email?: {
|
|
33
|
+
header?: {
|
|
34
|
+
barColor?: string;
|
|
35
|
+
logo?: {
|
|
36
|
+
href?: string;
|
|
37
|
+
image?: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
footer?: {
|
|
41
|
+
content?: string;
|
|
42
|
+
markdown?: string | null;
|
|
43
|
+
social?: {
|
|
44
|
+
facebook?: {
|
|
45
|
+
url?: string;
|
|
46
|
+
};
|
|
47
|
+
instagram?: {
|
|
48
|
+
url?: string;
|
|
49
|
+
};
|
|
50
|
+
linkedin?: {
|
|
51
|
+
url?: string;
|
|
52
|
+
};
|
|
53
|
+
medium?: {
|
|
54
|
+
url?: string;
|
|
55
|
+
};
|
|
56
|
+
twitter?: {
|
|
57
|
+
url?: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
[key: string]: unknown;
|
|
65
|
+
};
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
};
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
[key: string]: unknown;
|
|
71
|
+
}
|
|
72
|
+
export declare const editorStore: {
|
|
73
|
+
get: <Value>(atom: import("jotai").Atom<Value>) => Value;
|
|
74
|
+
set: <Value, Args extends unknown[], Result>(atom: import("jotai").WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
75
|
+
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
|
76
|
+
} | ({
|
|
77
|
+
get: <Value>(atom: import("jotai").Atom<Value>) => Value;
|
|
78
|
+
set: <Value, Args extends unknown[], Result>(atom: import("jotai").WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
79
|
+
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
|
80
|
+
} & import("jotai/vanilla/store").INTERNAL_DevStoreRev4);
|
|
81
|
+
export declare const apiUrlAtom: import("jotai").PrimitiveAtom<string> & {
|
|
82
|
+
init: string;
|
|
83
|
+
};
|
|
84
|
+
export declare const tokenAtom: import("jotai").PrimitiveAtom<string> & {
|
|
85
|
+
init: string;
|
|
86
|
+
};
|
|
87
|
+
export declare const tenantIdAtom: import("jotai").PrimitiveAtom<string> & {
|
|
88
|
+
init: string;
|
|
89
|
+
};
|
|
90
|
+
export declare const templateIdAtom: import("jotai").PrimitiveAtom<string> & {
|
|
91
|
+
init: string;
|
|
92
|
+
};
|
|
93
|
+
export declare const clientKeyAtom: import("jotai").PrimitiveAtom<string> & {
|
|
94
|
+
init: string;
|
|
95
|
+
};
|
|
96
|
+
export declare const tenantDataAtom: import("jotai").PrimitiveAtom<TenantData | null> & {
|
|
97
|
+
init: TenantData | null;
|
|
98
|
+
};
|
|
99
|
+
export declare const isTenantLoadingAtom: import("jotai").PrimitiveAtom<boolean | null> & {
|
|
100
|
+
init: boolean | null;
|
|
101
|
+
};
|
|
102
|
+
export declare const isTenantSavingAtom: import("jotai").PrimitiveAtom<boolean | null> & {
|
|
103
|
+
init: boolean | null;
|
|
104
|
+
};
|
|
105
|
+
export declare const isTenantPublishingAtom: import("jotai").PrimitiveAtom<boolean | null> & {
|
|
106
|
+
init: boolean | null;
|
|
107
|
+
};
|
|
108
|
+
export declare const tenantErrorAtom: import("jotai").PrimitiveAtom<string | null> & {
|
|
109
|
+
init: string | null;
|
|
110
|
+
};
|
|
111
|
+
export declare const brandApplyAtom: import("jotai").PrimitiveAtom<boolean> & {
|
|
112
|
+
init: boolean;
|
|
113
|
+
};
|
|
114
|
+
export declare const tenantEditorAtom: import("jotai").PrimitiveAtom<Editor | null> & {
|
|
115
|
+
init: Editor | null;
|
|
116
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Editor as TiptapEditor } from "@tiptap/react";
|
|
2
|
+
export interface EditorProps {
|
|
3
|
+
editor: TiptapEditor;
|
|
4
|
+
handleEditorClick: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
isVisible?: boolean;
|
|
7
|
+
hidePublish?: boolean;
|
|
8
|
+
brandEditor?: boolean;
|
|
9
|
+
variables?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
export declare const Editor: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<EditorProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/react";
|
|
2
|
+
interface SideBarItemProps {
|
|
3
|
+
element: {
|
|
4
|
+
key: string;
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
label: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
editor: Editor | null;
|
|
10
|
+
}
|
|
11
|
+
export declare const SideBarItem: ({ element, editor }: SideBarItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SideBarItem";
|
package/dist/components/TemplateEditor/Editor/SideBar/SideBarItemDetails/SideBarItemDetails.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
|
|
2
|
+
import type { Editor } from "@tiptap/react";
|
|
3
|
+
interface SideBarItemDetailsProps {
|
|
4
|
+
element?: ProseMirrorNode;
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const SideBarItemDetails: ({ element, editor }: SideBarItemDetailsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SideBarItemDetails";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { DraggableSyntheticListeners } from "@dnd-kit/core";
|
|
2
|
+
import type { Transform } from "@dnd-kit/utilities";
|
|
3
|
+
import React from "react";
|
|
4
|
+
export interface SideBarSortableItemWrapperProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
id: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SideBarSortableItemWrapper: ({ children, id, className, }: SideBarSortableItemWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export interface SideBarSortableItemProps {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
id?: string;
|
|
13
|
+
dragOverlay?: boolean;
|
|
14
|
+
color?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
dragging?: boolean;
|
|
17
|
+
handle?: boolean;
|
|
18
|
+
handleProps?: Record<string, unknown>;
|
|
19
|
+
height?: number;
|
|
20
|
+
index?: number;
|
|
21
|
+
fadeIn?: boolean;
|
|
22
|
+
transform?: Transform | null;
|
|
23
|
+
listeners?: DraggableSyntheticListeners;
|
|
24
|
+
sorting?: boolean;
|
|
25
|
+
style?: React.CSSProperties;
|
|
26
|
+
transition?: string | null;
|
|
27
|
+
wrapperStyle?: React.CSSProperties;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const SideBarSortableItem: React.ForwardRefExoticComponent<SideBarSortableItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SideBarSortableItemWrapper";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SideBar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Editor";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ElementalContent } from "@/types";
|
|
2
|
+
import type { Editor } from "@tiptap/core";
|
|
3
|
+
import type { Doc as YDoc } from "yjs";
|
|
4
|
+
import type { Node } from "@tiptap/pm/model";
|
|
5
|
+
declare global {
|
|
6
|
+
interface Window {
|
|
7
|
+
editor: Editor | null;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
interface UseBlockEditorProps {
|
|
11
|
+
initialContent?: ElementalContent;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
subject?: string | null;
|
|
14
|
+
variables?: Record<string, unknown>;
|
|
15
|
+
ydoc: YDoc;
|
|
16
|
+
onDestroy?: () => void;
|
|
17
|
+
onUpdate?: () => void;
|
|
18
|
+
setSelectedNode?: (node: Node | null) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const useBlockEditor: ({ initialContent, readOnly, variables, ydoc, onDestroy, setSelectedNode, }: UseBlockEditorProps) => {
|
|
21
|
+
editor: Editor;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ElementalContent } from "@/types/elemental.types";
|
|
2
|
+
import type { BrandEditorProps } from "../BrandEditor";
|
|
3
|
+
import type { Theme } from "../ui-kit/ThemeProvider/ThemeProvider.types";
|
|
4
|
+
export interface TemplateEditorProps {
|
|
5
|
+
theme?: Theme | string;
|
|
6
|
+
value?: ElementalContent;
|
|
7
|
+
onChange?: (value: ElementalContent) => void;
|
|
8
|
+
variables?: Record<string, unknown>;
|
|
9
|
+
hidePublish?: boolean;
|
|
10
|
+
autoSave?: boolean;
|
|
11
|
+
autoSaveDebounce?: number;
|
|
12
|
+
brandEditor?: boolean;
|
|
13
|
+
brandProps?: BrandEditorProps;
|
|
14
|
+
}
|
|
15
|
+
export declare const TemplateEditor: import("react").NamedExoticComponent<TemplateEditorProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./TemplateEditor";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ElementalContent } from "@/types/elemental.types";
|
|
2
|
+
export declare const subjectAtom: import("jotai").PrimitiveAtom<string | null> & {
|
|
3
|
+
init: string | null;
|
|
4
|
+
};
|
|
5
|
+
export declare const templateEditorContentAtom: import("jotai").PrimitiveAtom<ElementalContent | null | undefined> & {
|
|
6
|
+
init: ElementalContent | null | undefined;
|
|
7
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BlockquoteProps } from "./Blockquote.types";
|
|
2
|
+
export declare const defaultBlockquoteProps: BlockquoteProps;
|
|
3
|
+
export declare const Blockquote: import("@tiptap/core").Node<import("@tiptap/extension-blockquote").BlockquoteOptions, any>;
|
|
4
|
+
export default Blockquote;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const blockquoteSchema: z.ZodObject<{
|
|
3
|
+
paddingHorizontal: z.ZodNumber;
|
|
4
|
+
paddingVertical: z.ZodNumber;
|
|
5
|
+
backgroundColor: z.ZodString;
|
|
6
|
+
borderLeftWidth: z.ZodNumber;
|
|
7
|
+
borderColor: z.ZodString;
|
|
8
|
+
id: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
paddingVertical: number;
|
|
11
|
+
paddingHorizontal: number;
|
|
12
|
+
borderColor: string;
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
borderLeftWidth: number;
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
paddingVertical: number;
|
|
18
|
+
paddingHorizontal: number;
|
|
19
|
+
borderColor: string;
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
borderLeftWidth: number;
|
|
22
|
+
id?: string | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export type BlockquoteProps = z.infer<typeof blockquoteSchema>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type NodeViewProps } from "@tiptap/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { BlockquoteProps } from "./Blockquote.types";
|
|
4
|
+
export declare const BlockquoteComponent: React.FC<BlockquoteProps>;
|
|
5
|
+
export declare const BlockquoteComponentNode: (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 BlockquoteFormProps {
|
|
4
|
+
element?: ProseMirrorNode;
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const BlockquoteForm: ({ element, editor }: BlockquoteFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Node } from "@tiptap/core";
|
|
2
|
+
import type { ButtonProps } from "./Button.types";
|
|
3
|
+
declare module "@tiptap/core" {
|
|
4
|
+
interface Commands<ReturnType> {
|
|
5
|
+
button: {
|
|
6
|
+
setButton: (props: Partial<ButtonProps>) => ReturnType;
|
|
7
|
+
toggleBold: () => ReturnType;
|
|
8
|
+
toggleItalic: () => ReturnType;
|
|
9
|
+
toggleUnderline: () => ReturnType;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare const defaultButtonProps: ButtonProps;
|
|
14
|
+
export declare const Button: Node<any, any>;
|