@trycourier/react-designer 0.2.0 → 0.3.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/README.md +150 -49
- package/dist/cjs/index.js +70 -47
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/styles.css +1592 -497
- package/dist/components/BrandEditor/BrandEditor.d.ts +1 -0
- package/dist/components/BrandEditor/Editor/BrandFooter/BrandFooter.d.ts +1 -1
- package/dist/components/BrandEditor/Editor/Editor.d.ts +1 -0
- package/dist/components/Providers/api/template.d.ts +33 -1
- package/dist/components/Providers/store.d.ts +6 -0
- package/dist/components/Providers/useBrandActions.d.ts +1 -1
- package/dist/components/Providers/useTemplateActions.d.ts +4 -2
- package/dist/components/TemplateEditor/Channels/Email/Email.d.ts +5 -6
- package/dist/components/TemplateEditor/Channels/Email/EmailEditor.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/Email/EmailLayout.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/Email/SideBar/SideBar.d.ts +9 -3
- package/dist/components/TemplateEditor/Channels/Email/SideBar/SideBarSortableItemWrapper/SideBarSortableItemWrapper.d.ts +4 -18
- package/dist/components/TemplateEditor/Channels/Inbox/Inbox.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/Inbox/InboxLayout.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/MSTeams/MSTeams.d.ts +5 -3
- package/dist/components/TemplateEditor/Channels/MSTeams/MSTeamsEditor.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/MSTeams/MSTeamsLayout.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/MSTeams/SideBar/SideBar.d.ts +5 -3
- package/dist/components/TemplateEditor/Channels/Push/Push.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/SMS/SMS.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/SMS/SMSLayout.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/Slack/SideBar/SideBar.d.ts +5 -3
- package/dist/components/TemplateEditor/Channels/Slack/Slack.d.ts +5 -3
- package/dist/components/TemplateEditor/Channels/Slack/SlackEditor.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/Slack/SlackLayout.d.ts +1 -1
- package/dist/components/TemplateEditor/Channels/useChannels.d.ts +1 -1
- package/dist/components/TemplateEditor/TemplateEditor.d.ts +2 -1
- package/dist/components/TemplateEditor/hooks/index.d.ts +1 -0
- package/dist/components/TemplateEditor/hooks/useDebouncedFlush.d.ts +10 -0
- package/dist/components/TemplateEditor/hooks/useDndRef.d.ts +18 -0
- package/dist/components/TemplateEditor/hooks/useEditorDnd.d.ts +12 -16
- package/dist/components/TemplateEditor/hooks/usePragmaticDnd.d.ts +22 -0
- package/dist/components/TemplateEditor/hooks/useSyncEditorItems.d.ts +3 -2
- package/dist/components/TemplateEditor/index.d.ts +4 -1
- package/dist/components/TemplateEditor/store.d.ts +140 -0
- package/dist/components/extensions/Blockquote/Blockquote.types.d.ts +2 -2
- package/dist/components/extensions/Button/Button.types.d.ts +18 -24
- package/dist/components/extensions/Button/ButtonComponent.d.ts +1 -0
- package/dist/components/extensions/ButtonRow/ButtonRowComponent.d.ts +5 -1
- package/dist/components/extensions/Column/Column.d.ts +11 -0
- package/dist/components/extensions/Column/Column.types.d.ts +44 -0
- package/dist/components/extensions/Column/ColumnComponent.d.ts +9 -0
- package/dist/components/extensions/Column/ColumnForm.d.ts +8 -0
- package/dist/components/extensions/Column/index.d.ts +5 -0
- package/dist/components/extensions/ColumnCell/ColumnCell.d.ts +10 -0
- package/dist/components/extensions/ColumnCell/ColumnCellComponent.d.ts +2 -0
- package/dist/components/extensions/ColumnCell/index.d.ts +2 -0
- package/dist/components/extensions/ColumnRow/ColumnRow.d.ts +10 -0
- package/dist/components/extensions/ColumnRow/ColumnRowComponent.d.ts +2 -0
- package/dist/components/extensions/ColumnRow/index.d.ts +2 -0
- package/dist/components/extensions/ImageBlock/ImageBlock.types.d.ts +2 -6
- package/dist/components/extensions/Selection/Selection.d.ts +1 -0
- package/dist/components/extensions/TextBlock/TextBlock.types.d.ts +4 -12
- package/dist/components/extensions/Variable/Variable.d.ts +14 -2
- package/dist/components/extensions/Variable/Variable.types.d.ts +33 -18
- package/dist/components/extensions/Variable/VariableIcon.d.ts +5 -1
- package/dist/components/extensions/extension-kit.d.ts +1 -1
- package/dist/components/extensions/index.d.ts +4 -1
- package/dist/components/hooks/index.d.ts +2 -0
- package/dist/components/hooks/useBlockConfig.d.ts +110 -0
- package/dist/components/hooks/useVariables.d.ts +40 -0
- package/dist/components/ui/Blocks/ColumnBlock/ColumnBlock.d.ts +3 -0
- package/dist/components/ui/Blocks/ColumnBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/CustomCodeBlock/index.d.ts +1 -1
- package/dist/components/ui/Blocks/index.d.ts +1 -0
- package/dist/components/ui/ContentIcon/ContentIcon.d.ts +1 -0
- package/dist/components/ui/DraggableItem/DraggableItem.d.ts +16 -0
- package/dist/components/ui/DraggableItem/index.d.ts +1 -0
- package/dist/components/ui/DropIndicatorPlaceholder/DropIndicatorPlaceholder.d.ts +5 -0
- package/dist/components/ui/DropIndicatorPlaceholder/index.d.ts +1 -0
- package/dist/components/ui/FormHeader/FormHeader.d.ts +2 -1
- package/dist/components/ui/MainLayout/MainLayout.d.ts +1 -1
- package/dist/components/ui/SortableItemWrapper/SortableItemWrapper.d.ts +11 -8
- package/dist/components/ui/TextInput/TextInput.d.ts +0 -1
- package/dist/components/ui/TextMenu/config.d.ts +16 -0
- package/dist/components/ui/TextMenu/hooks/useConditionalRules.d.ts +18 -0
- package/dist/components/ui/TextMenu/hooks/useTextmenuCommands.d.ts +15 -1
- package/dist/components/ui/VariableEditor/VariableChipBase.d.ts +35 -0
- package/dist/components/ui/VariableEditor/VariableEditorToolbar.d.ts +15 -0
- package/dist/components/ui/VariableEditor/VariableInput.d.ts +13 -0
- package/dist/components/ui/VariableEditor/VariableTextarea.d.ts +11 -0
- package/dist/components/ui/VariableEditor/index.d.ts +8 -0
- package/dist/components/ui/VariableEditor/shared.d.ts +47 -0
- package/dist/components/ui-kit/Icon/EmailIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/MSTeamsIcon.d.ts +1 -1
- package/dist/components/ui-kit/Icon/PushIcon.d.ts +1 -1
- package/dist/components/ui-kit/Icon/VariableIcon.d.ts +1 -1
- package/dist/components/ui-kit/Icon/index.d.ts +1 -0
- package/dist/components/ui-kit/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/components/ui-kit/Toggle/Toggle.d.ts +2 -2
- package/dist/components/ui-kit/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/components/utils/extractVariablesFromContent.d.ts +13 -0
- package/dist/components/utils/index.d.ts +1 -0
- package/dist/components/utils/multipleContainersKeyboardCoordinates.d.ts +1 -2
- package/dist/components/utils/validateVariableName.d.ts +9 -0
- package/dist/esm/index.js +70 -47
- package/dist/esm/index.js.map +4 -4
- package/dist/esm/styles.css +1592 -497
- package/dist/hooks/useAutoSave.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/lib/utils/image.d.ts +5 -0
- package/dist/styles.css +1592 -497
- package/dist/types/elemental.schema.d.ts +3 -3
- package/dist/types/elemental.types.d.ts +48 -4
- package/package.json +7 -6
- package/dist/cjs/index.css +0 -2
- package/dist/cjs/index.css.map +0 -7
- package/dist/components/extensions/Variable/VariableSuggestions.d.ts +0 -7
- package/dist/components/extensions/Variable/suggestion.d.ts +0 -2
- package/dist/esm/index.css +0 -2
- package/dist/esm/index.css.map +0 -7
|
@@ -2,5 +2,6 @@ import type { Theme } from "../ui-kit/ThemeProvider/ThemeProvider.types";
|
|
|
2
2
|
import { type EditorProps } from "./Editor";
|
|
3
3
|
export interface BrandEditorProps extends EditorProps {
|
|
4
4
|
theme?: Theme | string;
|
|
5
|
+
colorScheme?: "light" | "dark";
|
|
5
6
|
}
|
|
6
7
|
export declare const BrandEditor: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<BrandEditorProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -14,5 +14,5 @@ interface BrandFooterProps {
|
|
|
14
14
|
transaction: Transaction;
|
|
15
15
|
}) => void;
|
|
16
16
|
}
|
|
17
|
-
export declare const BrandFooter: import("react").MemoExoticComponent<({
|
|
17
|
+
export declare const BrandFooter: import("react").MemoExoticComponent<({ facebookLink, linkedinLink, instagramLink, mediumLink, xLink, readOnly, value, onUpdate, }: BrandFooterProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
18
|
export {};
|
|
@@ -4,6 +4,7 @@ export interface EditorProps {
|
|
|
4
4
|
autoSaveDebounce?: number;
|
|
5
5
|
autoSave?: boolean;
|
|
6
6
|
templateEditor?: boolean;
|
|
7
|
+
/** @deprecated The variables prop is no longer used. Users can now type any variable directly without autocomplete suggestions. */
|
|
7
8
|
variables?: Record<string, unknown>;
|
|
8
9
|
value?: BrandEditorFormValues;
|
|
9
10
|
}
|
|
@@ -1,7 +1,39 @@
|
|
|
1
1
|
import { type MessageRouting } from "../store";
|
|
2
|
-
|
|
2
|
+
import type { ElementalContent } from "@/types";
|
|
3
|
+
export interface SaveTemplateOptions {
|
|
4
|
+
routing?: MessageRouting;
|
|
5
|
+
content?: ElementalContent;
|
|
6
|
+
}
|
|
7
|
+
export interface DuplicateTemplateOptions {
|
|
8
|
+
/** The ID for the new duplicated template. If not provided, uses "{currentTemplateId}-copy" */
|
|
9
|
+
targetTemplateId?: string;
|
|
10
|
+
/** Optional: Override the content to duplicate (defaults to current editor content) */
|
|
11
|
+
content?: ElementalContent;
|
|
12
|
+
/** Optional: Custom name for the new template (defaults to targetTemplateId) */
|
|
13
|
+
name?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DuplicateTemplateResult {
|
|
16
|
+
success: boolean;
|
|
17
|
+
templateId: string;
|
|
18
|
+
version?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Saves the current template to the backend.
|
|
22
|
+
*
|
|
23
|
+
* @param options - Optional save configuration
|
|
24
|
+
* @param options.content - Content to save (defaults to current editor content)
|
|
25
|
+
* @param options.routing - Routing configuration (defaults to value from TemplateEditor's routing prop)
|
|
26
|
+
*
|
|
27
|
+
* @deprecated Passing routing as an argument is deprecated.
|
|
28
|
+
* The routing is now automatically synced from TemplateEditor's routing prop.
|
|
29
|
+
* If you need to override routing, pass it as options.routing, but this should rarely be needed.
|
|
30
|
+
*/
|
|
31
|
+
export declare const saveTemplateAtom: import("jotai").WritableAtom<null, [options?: SaveTemplateOptions | MessageRouting | undefined], Promise<any>> & {
|
|
3
32
|
init: null;
|
|
4
33
|
};
|
|
5
34
|
export declare const publishTemplateAtom: import("jotai").WritableAtom<null, [], Promise<any>> & {
|
|
6
35
|
init: null;
|
|
7
36
|
};
|
|
37
|
+
export declare const duplicateTemplateAtom: import("jotai").WritableAtom<null, [options?: DuplicateTemplateOptions | undefined], Promise<DuplicateTemplateResult | undefined>> & {
|
|
38
|
+
init: null;
|
|
39
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ElementalContent } from "@/types/elemental.types";
|
|
2
2
|
import type { TemplateError } from "@/lib/utils/errors";
|
|
3
3
|
import type { ContentTransformer } from "../TemplateEditor/store";
|
|
4
|
+
import type { DuplicateTemplateOptions, DuplicateTemplateResult } from "./api/template";
|
|
4
5
|
export type MessageRoutingMethod = "all" | "single";
|
|
5
6
|
export type MessageRoutingChannel = string | MessageRouting;
|
|
6
7
|
export interface MessageRouting {
|
|
@@ -73,6 +74,7 @@ export interface TenantData {
|
|
|
73
74
|
};
|
|
74
75
|
[key: string]: unknown;
|
|
75
76
|
}
|
|
77
|
+
export declare const DEFAULT_ROUTING: MessageRouting;
|
|
76
78
|
export declare const apiUrlAtom: import("jotai").PrimitiveAtom<string> & {
|
|
77
79
|
init: string;
|
|
78
80
|
};
|
|
@@ -85,6 +87,9 @@ export declare const tenantIdAtom: import("jotai").PrimitiveAtom<string> & {
|
|
|
85
87
|
export declare const templateIdAtom: import("jotai").PrimitiveAtom<string> & {
|
|
86
88
|
init: string;
|
|
87
89
|
};
|
|
90
|
+
export declare const routingAtom: import("jotai").PrimitiveAtom<MessageRouting> & {
|
|
91
|
+
init: MessageRouting;
|
|
92
|
+
};
|
|
88
93
|
export declare const templateDataAtom: import("jotai").PrimitiveAtom<TenantData | null> & {
|
|
89
94
|
init: TenantData | null;
|
|
90
95
|
};
|
|
@@ -109,6 +114,7 @@ export interface TemplateActions {
|
|
|
109
114
|
}) => Promise<void>;
|
|
110
115
|
saveTemplate: (options?: MessageRouting) => Promise<void>;
|
|
111
116
|
publishTemplate: () => Promise<unknown>;
|
|
117
|
+
duplicateTemplate: (options?: DuplicateTemplateOptions) => Promise<DuplicateTemplateResult | undefined>;
|
|
112
118
|
isTemplateLoading: boolean | null;
|
|
113
119
|
setIsTemplateLoading: (loading: boolean | null) => void;
|
|
114
120
|
isTemplateSaving: boolean | null;
|
|
@@ -3,7 +3,7 @@ export declare function useBrandActions(): {
|
|
|
3
3
|
getTemplate: (options?: {
|
|
4
4
|
includeBrand?: boolean;
|
|
5
5
|
} | undefined) => Promise<void>;
|
|
6
|
-
saveTemplate: (
|
|
6
|
+
saveTemplate: (options?: import("./api").SaveTemplateOptions | import("./store").MessageRouting | undefined) => Promise<any>;
|
|
7
7
|
saveBrand: (settings?: Record<string, unknown> | undefined) => Promise<any>;
|
|
8
8
|
publishBrand: () => Promise<any>;
|
|
9
9
|
isTemplateLoading: boolean | null;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { type ContentTransformer } from "../TemplateEditor/store";
|
|
2
2
|
import { type TemplateError } from "@/lib/utils/errors";
|
|
3
|
-
|
|
3
|
+
import { type DuplicateTemplateOptions, type DuplicateTemplateResult } from "./api";
|
|
4
|
+
export type { ContentTransformer, DuplicateTemplateOptions, DuplicateTemplateResult };
|
|
4
5
|
export declare function useTemplateActions(): {
|
|
5
6
|
getTemplate: (options?: {
|
|
6
7
|
includeBrand?: boolean;
|
|
7
8
|
} | undefined) => Promise<void>;
|
|
8
|
-
saveTemplate: (
|
|
9
|
+
saveTemplate: (options?: import("./api").SaveTemplateOptions | import("./store").MessageRouting | undefined) => Promise<any>;
|
|
9
10
|
publishTemplate: () => Promise<any>;
|
|
11
|
+
duplicateTemplate: (options?: DuplicateTemplateOptions | undefined) => Promise<DuplicateTemplateResult | undefined>;
|
|
10
12
|
isTemplateLoading: boolean | null;
|
|
11
13
|
setIsTemplateLoading: (args_0: boolean | ((prev: boolean | null) => boolean | null) | null) => void;
|
|
12
14
|
isTemplateSaving: boolean | null;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { TiptapDoc } from "@/lib/utils";
|
|
2
2
|
import type { ChannelType } from "@/store";
|
|
3
3
|
import type { ElementalNode } from "@/types/elemental.types";
|
|
4
|
-
import type { UniqueIdentifier } from "@dnd-kit/core";
|
|
5
|
-
import type { SortingStrategy } from "@dnd-kit/sortable";
|
|
6
4
|
import type { Node } from "@tiptap/pm/model";
|
|
7
5
|
import type { Editor } from "@tiptap/react";
|
|
8
6
|
import type { HTMLAttributes } from "react";
|
|
9
7
|
import type { MessageRouting, TenantData } from "../../../Providers/store";
|
|
8
|
+
import { type VisibleBlockItem } from "../../store";
|
|
10
9
|
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
11
10
|
interface BrandSettingsData {
|
|
12
11
|
brandColor?: string;
|
|
@@ -21,7 +20,7 @@ interface BrandSettingsData {
|
|
|
21
20
|
mediumLink?: string;
|
|
22
21
|
xLink?: string;
|
|
23
22
|
}
|
|
24
|
-
export interface EmailProps extends Pick<TemplateEditorProps, "hidePublish" | "brandEditor" | "channels" | "variables" | "theme" | "routing" | "value" | "
|
|
23
|
+
export interface EmailProps extends Pick<TemplateEditorProps, "hidePublish" | "brandEditor" | "channels" | "variables" | "theme" | "routing" | "value" | "colorScheme">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
25
24
|
isLoading?: boolean;
|
|
26
25
|
headerRenderer?: ({ hidePublish, channels, routing, }: {
|
|
27
26
|
hidePublish?: boolean;
|
|
@@ -29,7 +28,7 @@ export interface EmailProps extends Pick<TemplateEditorProps, "hidePublish" | "b
|
|
|
29
28
|
routing?: MessageRouting;
|
|
30
29
|
}) => React.ReactNode;
|
|
31
30
|
hidePreviewPanelExitButton?: boolean;
|
|
32
|
-
render?: ({ subject, handleSubjectChange, selectedNode, setSelectedNode, previewMode, templateEditor, ref, isBrandApply, brandSettings, items, content,
|
|
31
|
+
render?: ({ subject, handleSubjectChange, selectedNode, setSelectedNode, previewMode, templateEditor, ref, isBrandApply, brandSettings, items, content, syncEditorItems, brandEditorContent, templateData, togglePreviewMode, }: {
|
|
33
32
|
subject: string | null;
|
|
34
33
|
handleSubjectChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
35
34
|
selectedNode: Node | null;
|
|
@@ -41,7 +40,6 @@ export interface EmailProps extends Pick<TemplateEditorProps, "hidePublish" | "b
|
|
|
41
40
|
brandSettings: BrandSettingsData | null;
|
|
42
41
|
items: Items;
|
|
43
42
|
content: TiptapDoc | null;
|
|
44
|
-
strategy: SortingStrategy;
|
|
45
43
|
syncEditorItems: (editor: Editor) => void;
|
|
46
44
|
brandEditorContent: string | null;
|
|
47
45
|
templateData: TenantData | null;
|
|
@@ -49,9 +47,10 @@ export interface EmailProps extends Pick<TemplateEditorProps, "hidePublish" | "b
|
|
|
49
47
|
hidePreviewPanelExitButton?: boolean;
|
|
50
48
|
}) => React.ReactNode;
|
|
51
49
|
}
|
|
50
|
+
type UniqueIdentifier = string | number;
|
|
52
51
|
interface Items {
|
|
53
52
|
Editor: UniqueIdentifier[];
|
|
54
|
-
Sidebar:
|
|
53
|
+
Sidebar: VisibleBlockItem[];
|
|
55
54
|
}
|
|
56
55
|
export declare const defaultEmailContent: ElementalNode[];
|
|
57
56
|
export declare const Email: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<EmailProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -8,5 +8,5 @@ export interface EmailEditorProps {
|
|
|
8
8
|
onDestroy?: () => void;
|
|
9
9
|
onUpdate?: (editor: Editor) => void;
|
|
10
10
|
}
|
|
11
|
-
declare const EmailEditor: ({ value, readOnly,
|
|
11
|
+
declare const EmailEditor: ({ value, readOnly, onDestroy, onUpdate, subject: propSubject, }: EmailEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export default EmailEditor;
|
|
@@ -6,4 +6,4 @@ export declare const EmailEditorMain: import("react").ForwardRefExoticComponent<
|
|
|
6
6
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
7
|
export interface EmailLayoutProps extends EmailProps {
|
|
8
8
|
}
|
|
9
|
-
export declare const EmailLayout: ({ variables, theme, isLoading, hidePublish, channels, brandEditor, routing,
|
|
9
|
+
export declare const EmailLayout: ({ variables, theme, isLoading, hidePublish, channels, brandEditor, routing, colorScheme, ...rest }: EmailLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type VisibleBlockItem } from "../../../store";
|
|
2
|
+
import type { Editor } from "@tiptap/react";
|
|
2
3
|
export interface SideBarProps {
|
|
3
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Optional items to display. If not provided, uses visibleBlocksAtom.
|
|
6
|
+
* @deprecated Use useBlockConfig().setVisibleBlocks() instead
|
|
7
|
+
*/
|
|
8
|
+
items?: VisibleBlockItem[];
|
|
4
9
|
brandEditor?: boolean;
|
|
5
10
|
label?: string;
|
|
11
|
+
editor?: Editor;
|
|
6
12
|
}
|
|
7
|
-
export declare const SideBar: ({ items, brandEditor, label }: SideBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const SideBar: ({ items, brandEditor, label, editor }: SideBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,30 +1,16 @@
|
|
|
1
|
-
import type { DraggableSyntheticListeners } from "@dnd-kit/core";
|
|
2
|
-
import type { Transform } from "@dnd-kit/utilities";
|
|
3
1
|
import React from "react";
|
|
2
|
+
import type { Editor } from "@tiptap/react";
|
|
4
3
|
export interface SideBarSortableItemWrapperProps {
|
|
5
4
|
children: React.ReactNode;
|
|
6
5
|
id: string;
|
|
7
6
|
className?: string;
|
|
7
|
+
editor?: Editor;
|
|
8
8
|
}
|
|
9
|
-
export declare const SideBarSortableItemWrapper: ({ children, id, className, }: SideBarSortableItemWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const SideBarSortableItemWrapper: ({ children, id, className, editor, }: SideBarSortableItemWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export interface SideBarSortableItemProps {
|
|
11
11
|
children: React.ReactNode;
|
|
12
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
13
|
className?: string;
|
|
14
|
+
editor?: Editor;
|
|
29
15
|
}
|
|
30
16
|
export declare const SideBarSortableItem: React.ForwardRefExoticComponent<SideBarSortableItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -21,7 +21,7 @@ export interface InboxRenderProps {
|
|
|
21
21
|
editor: Editor;
|
|
22
22
|
}) => void;
|
|
23
23
|
}
|
|
24
|
-
export interface InboxProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
24
|
+
export interface InboxProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value" | "colorScheme">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
25
25
|
readOnly?: boolean;
|
|
26
26
|
headerRenderer?: ({ hidePublish, channels, routing, }: {
|
|
27
27
|
hidePublish?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { InboxProps } from "./Inbox";
|
|
2
2
|
export interface InboxLayoutProps extends InboxProps {
|
|
3
3
|
}
|
|
4
|
-
export declare const InboxLayout: ({ hidePublish, theme, variables, channels, routing, ...rest }: InboxLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const InboxLayout: ({ hidePublish, theme, variables, channels, routing, colorScheme, ...rest }: InboxLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { MessageRouting } from "@/components/Providers/store";
|
|
2
|
+
import { type VisibleBlockItem } from "@/components/TemplateEditor/store";
|
|
2
3
|
import type { TextMenuConfig } from "@/components/ui/TextMenu/config";
|
|
3
4
|
import type { TiptapDoc } from "@/lib/utils";
|
|
4
5
|
import type { ChannelType } from "@/store";
|
|
5
6
|
import type { ElementalNode } from "@/types/elemental.types";
|
|
6
|
-
import { type UniqueIdentifier } from "@dnd-kit/core";
|
|
7
7
|
import type { Node } from "@tiptap/pm/model";
|
|
8
8
|
import type { AnyExtension, Editor } from "@tiptap/react";
|
|
9
9
|
import React, { type HTMLAttributes } from "react";
|
|
10
10
|
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
11
|
+
type UniqueIdentifier = string | number;
|
|
11
12
|
export declare const defaultMSTeamsContent: ElementalNode[];
|
|
12
13
|
export declare const MSTeamsEditorContent: ({ value }: {
|
|
13
14
|
value?: TiptapDoc;
|
|
@@ -21,13 +22,13 @@ export interface MSTeamsRenderProps {
|
|
|
21
22
|
editor: Editor;
|
|
22
23
|
}) => void;
|
|
23
24
|
items: {
|
|
24
|
-
Sidebar:
|
|
25
|
+
Sidebar: VisibleBlockItem[];
|
|
25
26
|
Editor: UniqueIdentifier[];
|
|
26
27
|
};
|
|
27
28
|
selectedNode: Node | null;
|
|
28
29
|
msteamsEditor: Editor | null;
|
|
29
30
|
}
|
|
30
|
-
export interface MSTeamsProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
31
|
+
export interface MSTeamsProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value" | "colorScheme">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
31
32
|
readOnly?: boolean;
|
|
32
33
|
headerRenderer?: ({ hidePublish, channels, routing, }: {
|
|
33
34
|
hidePublish?: boolean;
|
|
@@ -38,3 +39,4 @@ export interface MSTeamsProps extends Pick<TemplateEditorProps, "hidePublish" |
|
|
|
38
39
|
}
|
|
39
40
|
export declare const MSTeamsConfig: TextMenuConfig;
|
|
40
41
|
export declare const MSTeams: React.MemoExoticComponent<React.ForwardRefExoticComponent<MSTeamsProps & React.RefAttributes<HTMLDivElement>>>;
|
|
42
|
+
export {};
|
|
@@ -2,4 +2,4 @@ import type { MSTeamsRenderProps } from "./MSTeams";
|
|
|
2
2
|
export interface MSTeamsEditorProps extends MSTeamsRenderProps {
|
|
3
3
|
readOnly?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const MSTeamsEditor: ({ content, extensions, editable, autofocus, onUpdate,
|
|
5
|
+
export declare const MSTeamsEditor: ({ content, extensions, editable, autofocus, onUpdate, readOnly, }: MSTeamsEditorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -4,4 +4,4 @@ export interface MSTeamsLayoutProps extends MSTeamsProps {
|
|
|
4
4
|
}
|
|
5
5
|
export declare const MSTeamsEditorContainer: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export declare const MSTeamsEditorMain: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export declare const MSTeamsLayout: ({ hidePublish, theme, variables, channels, routing, }: MSTeamsLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const MSTeamsLayout: ({ hidePublish, theme, variables, channels, routing, colorScheme, }: MSTeamsLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Editor } from "@tiptap/react";
|
|
2
|
+
import { type VisibleBlockItem } from "@/components/TemplateEditor/store";
|
|
2
3
|
export interface MSTeamsSideBarProps {
|
|
3
|
-
items:
|
|
4
|
+
items: VisibleBlockItem[];
|
|
4
5
|
label?: string;
|
|
6
|
+
editor?: Editor;
|
|
5
7
|
}
|
|
6
|
-
export declare const MSTeamsSideBar: ({ items, label }: MSTeamsSideBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const MSTeamsSideBar: ({ items, label, editor }: MSTeamsSideBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,7 +18,7 @@ export interface PushRenderProps {
|
|
|
18
18
|
editor: Editor;
|
|
19
19
|
}) => void;
|
|
20
20
|
}
|
|
21
|
-
export interface PushProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
21
|
+
export interface PushProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value" | "colorScheme">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
22
22
|
readOnly?: boolean;
|
|
23
23
|
headerRenderer?: ({ hidePublish, channels, routing, }: {
|
|
24
24
|
hidePublish?: boolean;
|
|
@@ -19,7 +19,7 @@ export interface SMSRenderProps {
|
|
|
19
19
|
editor: Editor;
|
|
20
20
|
}) => void;
|
|
21
21
|
}
|
|
22
|
-
export interface SMSProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value" | "
|
|
22
|
+
export interface SMSProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value" | "colorScheme">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
23
23
|
readOnly?: boolean;
|
|
24
24
|
headerRenderer?: ({ hidePublish, channels, routing, }: {
|
|
25
25
|
hidePublish?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SMSProps } from "./SMS";
|
|
2
2
|
export interface SMSLayoutProps extends SMSProps {
|
|
3
3
|
}
|
|
4
|
-
export declare const SMSLayout: ({ hidePublish, theme, variables, channels, routing,
|
|
4
|
+
export declare const SMSLayout: ({ hidePublish, theme, variables, channels, routing, colorScheme, ...rest }: SMSLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Editor } from "@tiptap/react";
|
|
2
|
+
import { type VisibleBlockItem } from "@/components/TemplateEditor/store";
|
|
2
3
|
export interface SlackSideBarProps {
|
|
3
|
-
items:
|
|
4
|
+
items: VisibleBlockItem[];
|
|
4
5
|
label?: string;
|
|
6
|
+
editor?: Editor;
|
|
5
7
|
}
|
|
6
|
-
export declare const SlackSideBar: ({ items, label }: SlackSideBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const SlackSideBar: ({ items, label, editor }: SlackSideBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { MessageRouting } from "@/components/Providers/store";
|
|
2
|
+
import { type VisibleBlockItem } from "@/components/TemplateEditor/store";
|
|
2
3
|
import type { TextMenuConfig } from "@/components/ui/TextMenu/config";
|
|
3
4
|
import type { TiptapDoc } from "@/lib/utils";
|
|
4
5
|
import type { ChannelType } from "@/store";
|
|
5
6
|
import type { ElementalNode } from "@/types/elemental.types";
|
|
6
|
-
import { type UniqueIdentifier } from "@dnd-kit/core";
|
|
7
7
|
import type { Node } from "@tiptap/pm/model";
|
|
8
8
|
import type { AnyExtension, Editor } from "@tiptap/react";
|
|
9
9
|
import React, { type HTMLAttributes } from "react";
|
|
10
10
|
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
11
|
+
type UniqueIdentifier = string | number;
|
|
11
12
|
export declare const defaultSlackContent: ElementalNode[];
|
|
12
13
|
export declare const SlackEditorContent: ({ value }: {
|
|
13
14
|
value?: TiptapDoc;
|
|
@@ -21,13 +22,13 @@ export interface SlackRenderProps {
|
|
|
21
22
|
editor: Editor;
|
|
22
23
|
}) => void;
|
|
23
24
|
items: {
|
|
24
|
-
Sidebar:
|
|
25
|
+
Sidebar: VisibleBlockItem[];
|
|
25
26
|
Editor: UniqueIdentifier[];
|
|
26
27
|
};
|
|
27
28
|
selectedNode: Node | null;
|
|
28
29
|
slackEditor: Editor | null;
|
|
29
30
|
}
|
|
30
|
-
export interface SlackProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
31
|
+
export interface SlackProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels" | "routing" | "value" | "colorScheme">, Omit<HTMLAttributes<HTMLDivElement>, "value" | "onChange"> {
|
|
31
32
|
readOnly?: boolean;
|
|
32
33
|
headerRenderer?: ({ hidePublish, channels, routing, }: {
|
|
33
34
|
hidePublish?: boolean;
|
|
@@ -38,3 +39,4 @@ export interface SlackProps extends Pick<TemplateEditorProps, "hidePublish" | "t
|
|
|
38
39
|
}
|
|
39
40
|
export declare const SlackConfig: TextMenuConfig;
|
|
40
41
|
export declare const Slack: React.MemoExoticComponent<React.ForwardRefExoticComponent<SlackProps & React.RefAttributes<HTMLDivElement>>>;
|
|
42
|
+
export {};
|
|
@@ -2,4 +2,4 @@ import type { SlackRenderProps } from "./Slack";
|
|
|
2
2
|
export interface SlackEditorProps extends SlackRenderProps {
|
|
3
3
|
readOnly?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const SlackEditor: ({ content, extensions, editable, autofocus, onUpdate,
|
|
5
|
+
export declare const SlackEditor: ({ content, extensions, editable, autofocus, onUpdate, readOnly, }: SlackEditorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -4,4 +4,4 @@ export interface SlackLayoutProps extends SlackProps {
|
|
|
4
4
|
}
|
|
5
5
|
export declare const SlackEditorContainer: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export declare const SlackEditorMain: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export declare const SlackLayout: ({ hidePublish, theme, variables, channels, routing, }: SlackLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const SlackLayout: ({ hidePublish, theme, variables, channels, routing, colorScheme, }: SlackLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,5 +11,5 @@ export declare const useChannels: ({ channels, routing, }: {
|
|
|
11
11
|
channelOptions: Channel[];
|
|
12
12
|
setChannel: (channelType: ChannelType) => void;
|
|
13
13
|
addChannel: (channelType: ChannelType) => void;
|
|
14
|
-
removeChannel: (channelToRemove: ChannelType) =>
|
|
14
|
+
removeChannel: (channelToRemove: ChannelType) => void;
|
|
15
15
|
};
|
|
@@ -8,6 +8,7 @@ export interface TemplateEditorProps extends Omit<HTMLAttributes<HTMLDivElement>
|
|
|
8
8
|
theme?: Theme | string;
|
|
9
9
|
value?: ElementalContent | null;
|
|
10
10
|
onChange?: (value: ElementalContent) => void;
|
|
11
|
+
/** @deprecated The variables prop is no longer used. Users can now type any variable directly without autocomplete suggestions. */
|
|
11
12
|
variables?: Record<string, unknown>;
|
|
12
13
|
hidePublish?: boolean;
|
|
13
14
|
autoSave?: boolean;
|
|
@@ -17,6 +18,6 @@ export interface TemplateEditorProps extends Omit<HTMLAttributes<HTMLDivElement>
|
|
|
17
18
|
/** @deprecated Use routing.channels instead. Will be removed in a future version. */
|
|
18
19
|
channels?: ChannelType[];
|
|
19
20
|
routing?: MessageRouting;
|
|
20
|
-
|
|
21
|
+
colorScheme?: "light" | "dark";
|
|
21
22
|
}
|
|
22
23
|
export declare const TemplateEditor: import("react").NamedExoticComponent<TemplateEditorProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./useDebouncedFlush";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A hook that provides a debounced update function which is also registered
|
|
3
|
+
* with the global flush mechanism to ensure updates are saved before unload/save.
|
|
4
|
+
*
|
|
5
|
+
* @param id Unique identifier for the flush function
|
|
6
|
+
* @param callback The function to execute (must be stable or wrapped in useCallback)
|
|
7
|
+
* @param delay Debounce delay in milliseconds
|
|
8
|
+
* @returns A trigger function that initiates the debounced update
|
|
9
|
+
*/
|
|
10
|
+
export declare function useDebouncedFlush<T = void>(id: string, callback: (args: T) => void, delay?: number): (args: T) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React 19 compatibility wrapper for DnD Kit refs
|
|
3
|
+
*
|
|
4
|
+
* React 19 made refs regular props instead of special properties,
|
|
5
|
+
* which breaks DnD Kit's setNodeRef callback pattern.
|
|
6
|
+
* This hook converts DnD Kit's setNodeRef into a React 19-compatible callback ref.
|
|
7
|
+
*
|
|
8
|
+
* @param setNodeRef - The setNodeRef function from useSortable or useDroppable
|
|
9
|
+
* @returns A callback ref compatible with React 19
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const { setNodeRef } = useSortable({ id: 'item-1' });
|
|
14
|
+
* const ref = useDndRef(setNodeRef);
|
|
15
|
+
* return <div ref={ref}>Content</div>;
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function useDndRef<T extends HTMLElement>(setNodeRef: ((node: T | null) => void) | undefined): (element: T | null) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MeasuringStrategy, type CollisionDetection, type DragEndEvent, type DragMoveEvent, type DragStartEvent, type UniqueIdentifier } from "@dnd-kit/core";
|
|
2
1
|
import type { Editor } from "@tiptap/react";
|
|
2
|
+
type UniqueIdentifier = string | number;
|
|
3
3
|
interface UseEditorDndProps {
|
|
4
4
|
items: {
|
|
5
5
|
Sidebar: string[];
|
|
@@ -11,21 +11,17 @@ interface UseEditorDndProps {
|
|
|
11
11
|
}>>;
|
|
12
12
|
editor?: Editor | null;
|
|
13
13
|
}
|
|
14
|
-
export declare const useEditorDnd: ({
|
|
15
|
-
dndProps: {
|
|
16
|
-
sensors: import("@dnd-kit/core").SensorDescriptor<import("@dnd-kit/core").SensorOptions>[];
|
|
17
|
-
collisionDetection: CollisionDetection;
|
|
18
|
-
measuring: {
|
|
19
|
-
droppable: {
|
|
20
|
-
strategy: MeasuringStrategy;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
onDragStart: ({ active }: DragStartEvent) => void;
|
|
24
|
-
onDragMove: ({ active, over }: DragMoveEvent) => void;
|
|
25
|
-
onDragEnd: ({ active, over }: DragEndEvent) => void;
|
|
26
|
-
onDragCancel: () => void;
|
|
27
|
-
};
|
|
28
|
-
activeDragType: string | null;
|
|
14
|
+
export declare const useEditorDnd: ({ setItems, editor }: UseEditorDndProps) => {
|
|
29
15
|
activeId: UniqueIdentifier | null;
|
|
16
|
+
activeDragType: string | null;
|
|
17
|
+
onDragStartHandler: () => void;
|
|
18
|
+
onDragEndHandler: () => void;
|
|
19
|
+
onDragMoveHandler: () => void;
|
|
20
|
+
onDragCancelHandler: () => void;
|
|
21
|
+
lastPlaceholderIndex: number | null;
|
|
22
|
+
cleanupPlaceholder: () => void;
|
|
23
|
+
sensors: undefined;
|
|
24
|
+
measuringProps: undefined;
|
|
25
|
+
collisionDetectionStrategy: undefined;
|
|
30
26
|
};
|
|
31
27
|
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/react";
|
|
2
|
+
import { type VisibleBlockItem } from "../store";
|
|
3
|
+
type UniqueIdentifier = string | number;
|
|
4
|
+
interface UsePragmaticDndProps {
|
|
5
|
+
items: {
|
|
6
|
+
Sidebar: VisibleBlockItem[];
|
|
7
|
+
Editor: UniqueIdentifier[];
|
|
8
|
+
};
|
|
9
|
+
setItems: React.Dispatch<React.SetStateAction<{
|
|
10
|
+
Sidebar: VisibleBlockItem[];
|
|
11
|
+
Editor: UniqueIdentifier[];
|
|
12
|
+
}>>;
|
|
13
|
+
editor?: Editor | null;
|
|
14
|
+
}
|
|
15
|
+
export declare const usePragmaticDnd: ({ items, setItems, editor }: UsePragmaticDndProps) => {
|
|
16
|
+
activeId: UniqueIdentifier | null;
|
|
17
|
+
activeDragType: string | null;
|
|
18
|
+
dndMode: "outer" | "inner";
|
|
19
|
+
lastPlaceholderIndex: number | null;
|
|
20
|
+
cleanupPlaceholder: () => void;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { UniqueIdentifier } from "@dnd-kit/core";
|
|
2
1
|
import type { Editor } from "@tiptap/react";
|
|
2
|
+
import { type VisibleBlockItem } from "../store";
|
|
3
|
+
type UniqueIdentifier = string | number;
|
|
3
4
|
interface UseSyncEditorItemsProps {
|
|
4
5
|
setItems: React.Dispatch<React.SetStateAction<{
|
|
5
|
-
Sidebar:
|
|
6
|
+
Sidebar: VisibleBlockItem[];
|
|
6
7
|
Editor: UniqueIdentifier[];
|
|
7
8
|
}>>;
|
|
8
9
|
rafId: React.MutableRefObject<number | null>;
|
|
@@ -2,7 +2,8 @@ export { BrandFooter } from "@/components/BrandEditor/Editor/BrandFooter";
|
|
|
2
2
|
export { PreviewPanel } from "@/components/ui/PreviewPanel";
|
|
3
3
|
export { TextMenu } from "@/components/ui/TextMenu";
|
|
4
4
|
export { cn, convertElementalToTiptap, convertTiptapToElemental } from "@/lib/utils";
|
|
5
|
-
export {
|
|
5
|
+
export { VariableInput, VariableTextarea } from "@/components/ui/VariableEditor";
|
|
6
|
+
export { getFlattenedVariables } from "@/components/utils/getFlattenedVariables";
|
|
6
7
|
export { useChannels } from "./Channels";
|
|
7
8
|
export { default as EmailEditor } from "./Channels/Email/EmailEditor";
|
|
8
9
|
export * from "./TemplateEditor";
|
|
@@ -17,11 +18,13 @@ export declare const InboxChannel: import("react").MemoExoticComponent<import("r
|
|
|
17
18
|
export declare const MSTeamsChannel: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./Channels").MSTeamsProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
18
19
|
export declare const SlackChannel: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./Channels").SlackProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
19
20
|
export { EmailEditorContainer, EmailEditorMain, type EmailEditorProps, type InboxEditorProps, type MSTeamsEditorProps, type PushEditorProps, type SlackEditorProps, type SMSEditorProps, } from "./Channels";
|
|
21
|
+
export { CHANNELS } from "@/channels";
|
|
20
22
|
export type { ChannelType } from "@/store";
|
|
21
23
|
export type { ElementalContent } from "@/types";
|
|
22
24
|
export { ChannelRootContainer, EditorSidebar } from "./Layout";
|
|
23
25
|
export { InboxEditor, MSTeamsEditor, PushEditor, SlackEditor, SMSEditor } from "./Channels";
|
|
24
26
|
export { useAutoSave } from "@/hooks/useAutoSave";
|
|
27
|
+
export { useDebouncedFlush } from "./hooks/useDebouncedFlush";
|
|
25
28
|
export { Status as TemplateStatus } from "@/components/ui/Status";
|
|
26
29
|
export { MonacoCodeEditor } from "@/components/extensions/CustomCode/MonacoCodeEditor";
|
|
27
30
|
export { ToggleGroup } from "@/components/ui-kit";
|