@trycourier/react-designer 0.6.0 → 0.7.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 +5 -3
- package/dist/cjs/index.js +58 -57
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/styles.css +496 -235
- package/dist/components/BrandEditor/Editor/BrandFooter/BrandFooter.d.ts +3 -1
- package/dist/components/TemplateEditor/Channels/Inbox/Inbox.d.ts +3 -0
- package/dist/components/TemplateEditor/Layout/Layout.d.ts +1 -0
- package/dist/components/TemplateEditor/TemplateEditor.d.ts +2 -0
- package/dist/components/TemplateEditor/VariableViewModeSync.d.ts +3 -0
- package/dist/components/TemplateEditor/index.d.ts +1 -0
- package/dist/components/TemplateEditor/store.d.ts +3 -0
- package/dist/components/extensions/Blockquote/Blockquote.d.ts +4 -0
- package/dist/components/extensions/Button/Button.types.d.ts +8 -4
- package/dist/components/extensions/ImageBlock/components/ImageBlockView.d.ts +1 -3
- package/dist/components/extensions/MessagingChannelPaste/MessagingChannelPaste.d.ts +11 -0
- package/dist/components/extensions/MessagingChannelPaste/index.d.ts +2 -0
- package/dist/components/extensions/Variable/Variable.d.ts +5 -0
- package/dist/components/ui/TextMenu/components/ContentTypePicker.d.ts +1 -1
- package/dist/components/ui/TextMenu/hooks/useTextmenuStates.d.ts +1 -0
- package/dist/components/ui/VariableEditor/VariableChipBase.d.ts +8 -0
- package/dist/components/ui/VariableEditor/VariableInput.d.ts +18 -0
- package/dist/esm/index.js +58 -57
- package/dist/esm/index.js.map +4 -4
- package/dist/esm/styles.css +496 -235
- package/dist/index.d.ts +2 -0
- package/dist/lib/constants/block-defaults.d.ts +43 -0
- package/dist/lib/constants/email-editor-tiptap-styles.d.ts +62 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/styles.css +496 -235
- package/dist/types/elemental.types.d.ts +3 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export { Status as TemplateStatus } from "@/components/ui/Status";
|
|
|
16
16
|
export { ToggleGroup, ToggleGroupItem, Toggle, Divider, Input, InputColor, } from "@/components/ui-kit";
|
|
17
17
|
export { FacebookIcon, InstagramIcon, LinkedinIcon, MediumIcon, XIcon, } from "@/components/ui-kit/Icon";
|
|
18
18
|
export { cn, convertElementalToTiptap, convertTiptapToElemental } from "@/lib/utils";
|
|
19
|
+
export { blockDefaults } from "@/lib/constants/block-defaults";
|
|
20
|
+
export { EMAIL_EDITOR_TEXT_STYLES, EMAIL_EDITOR_FONT_FAMILY, } from "@/lib/constants/email-editor-tiptap-styles";
|
|
19
21
|
export { useAutoSave } from "@/hooks/useAutoSave";
|
|
20
22
|
export { MonacoCodeEditor } from "@/components/extensions/CustomCode/MonacoCodeEditor";
|
|
21
23
|
export { applyShadowDomDndFix } from "@/components/utils/shadowDomDndFix";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central re-export of block default props. Each block's defaults live in its own
|
|
3
|
+
* extension (e.g. Blockquote/Blockquote.ts); this file only aggregates them for
|
|
4
|
+
* consumers (e.g. Studio's elemental-to-HTML converter) via blockDefaults.
|
|
5
|
+
*/
|
|
6
|
+
export { defaultBlockquoteProps, QUOTE_TEXT_STYLE, QUOTE_TEXT_STYLE_VARIANTS, } from "@/components/extensions/Blockquote/Blockquote";
|
|
7
|
+
export { defaultButtonProps } from "@/components/extensions/Button/Button";
|
|
8
|
+
export { defaultDividerProps, defaultSpacerProps } from "@/components/extensions/Divider/Divider";
|
|
9
|
+
export { defaultImageProps } from "@/components/extensions/ImageBlock/ImageBlock";
|
|
10
|
+
export { defaultTextBlockProps } from "@/components/extensions/TextBlock/TextBlock.types";
|
|
11
|
+
export { defaultListProps } from "@/components/extensions/List";
|
|
12
|
+
/**
|
|
13
|
+
* Single namespace for all block defaults.
|
|
14
|
+
* Use: import { blockDefaults } from '@trycourier/react-designer'
|
|
15
|
+
* Then: blockDefaults.blockquote, blockDefaults.button, blockDefaults.quoteTextStyle, etc.
|
|
16
|
+
*/
|
|
17
|
+
export declare const blockDefaults: {
|
|
18
|
+
readonly blockquote: {
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
borderColor: string;
|
|
21
|
+
paddingVertical: number;
|
|
22
|
+
paddingHorizontal: number;
|
|
23
|
+
borderLeftWidth: number;
|
|
24
|
+
id?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
readonly button: import("../../components/extensions/Button").ButtonProps;
|
|
27
|
+
readonly divider: import("../../components/extensions/Divider").DividerProps;
|
|
28
|
+
readonly spacer: import("../../components/extensions/Divider").DividerProps;
|
|
29
|
+
readonly image: import("../../components/extensions/ImageBlock").ImageBlockProps;
|
|
30
|
+
readonly text: import("@/components/extensions/TextBlock/TextBlock.types").TextBlockProps;
|
|
31
|
+
readonly list: import("@/components/extensions/List").ListProps;
|
|
32
|
+
readonly quoteTextStyle: {
|
|
33
|
+
readonly color: "#696969";
|
|
34
|
+
readonly fontSize: "14px";
|
|
35
|
+
readonly lineHeight: "18px";
|
|
36
|
+
readonly fontStyle: "italic";
|
|
37
|
+
};
|
|
38
|
+
readonly quoteTextStyleVariants: Record<"h1" | "h2" | "h3" | "subtext" | "quote", {
|
|
39
|
+
fontSize: string;
|
|
40
|
+
fontWeight: string;
|
|
41
|
+
lineHeight: string;
|
|
42
|
+
}>;
|
|
43
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for .courier-email-editor .tiptap font styles.
|
|
3
|
+
* These values are applied via CSS custom properties from EmailEditorContainer
|
|
4
|
+
* so styles.css can use var(--email-editor-*) and stay in sync.
|
|
5
|
+
*/
|
|
6
|
+
export declare const EMAIL_EDITOR_FONT_FAMILY = "Helvetica, Arial, sans-serif";
|
|
7
|
+
/** Paragraph and heading styles (non-blockquote) for email editor. */
|
|
8
|
+
export declare const EMAIL_EDITOR_TEXT_STYLES: {
|
|
9
|
+
readonly p: {
|
|
10
|
+
readonly color: "#000000";
|
|
11
|
+
readonly fontSize: "14px";
|
|
12
|
+
readonly lineHeight: "18px";
|
|
13
|
+
};
|
|
14
|
+
readonly h1: {
|
|
15
|
+
readonly color: "#000000";
|
|
16
|
+
readonly fontSize: "32px";
|
|
17
|
+
readonly fontWeight: "600";
|
|
18
|
+
readonly lineHeight: "40px";
|
|
19
|
+
};
|
|
20
|
+
readonly h2: {
|
|
21
|
+
readonly color: "#000000";
|
|
22
|
+
readonly fontSize: "24px";
|
|
23
|
+
readonly fontWeight: "600";
|
|
24
|
+
readonly lineHeight: "32px";
|
|
25
|
+
};
|
|
26
|
+
readonly h3: {
|
|
27
|
+
readonly color: "#000000";
|
|
28
|
+
readonly fontSize: "18.72px";
|
|
29
|
+
readonly fontWeight: "600";
|
|
30
|
+
readonly lineHeight: "24px";
|
|
31
|
+
};
|
|
32
|
+
readonly subtext: {
|
|
33
|
+
readonly color: "#8F8F8F";
|
|
34
|
+
readonly fontSize: "11px";
|
|
35
|
+
readonly lineHeight: "15px";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Text style applied to quote body content.
|
|
40
|
+
* Matches backend courier-email-text-style quote defaults.
|
|
41
|
+
*/
|
|
42
|
+
export declare const QUOTE_TEXT_STYLE: {
|
|
43
|
+
readonly color: "#696969";
|
|
44
|
+
readonly fontSize: "14px";
|
|
45
|
+
readonly lineHeight: "18px";
|
|
46
|
+
readonly fontStyle: "italic";
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Quote text style variants when text_style is h1/h2/h3/subtext.
|
|
50
|
+
* Derives sizing from EMAIL_EDITOR_TEXT_STYLES to stay in sync.
|
|
51
|
+
*/
|
|
52
|
+
export declare const QUOTE_TEXT_STYLE_VARIANTS: Record<"h1" | "h2" | "h3" | "subtext" | "quote", {
|
|
53
|
+
fontSize: string;
|
|
54
|
+
fontWeight: string;
|
|
55
|
+
lineHeight: string;
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns CSS custom properties to set on .courier-email-editor so that
|
|
59
|
+
* .courier-email-editor .tiptap rules in styles.css (using var(--email-editor-*))
|
|
60
|
+
* resolve from this single source of truth.
|
|
61
|
+
*/
|
|
62
|
+
export declare function getEmailEditorTiptapCssVars(): Record<string, string>;
|
package/dist/lib/index.d.ts
CHANGED