@topol.io/editor 1.0.0-alpha.9 → 2.0.0-alpha.1

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.
Files changed (34) hide show
  1. package/README.md +89 -110
  2. package/dist/topol-plugin.es.js +126 -246
  3. package/dist/topol-plugin.umd.cjs +1 -0
  4. package/dist/types/src/email-editor/constants.d.ts +3 -3
  5. package/dist/types/src/email-editor/index.d.ts +15 -101
  6. package/dist/types/src/landing-page-editor/schemas/contentBlock/contentBlockScheme.d.ts +1 -1
  7. package/dist/types/src/landing-page-editor/schemas/openAI/openAISchema.d.ts +1 -2
  8. package/dist/types/src/landing-page-editor/schemas/premadeBlock/premadeBlockSchema.d.ts +816 -816
  9. package/dist/types/src/landing-page-editor/schemas/savedBlock/savedBlockApiSchema.d.ts +612 -612
  10. package/dist/types/src/landing-page-editor/schemas/savedBlock/savedBlockSchema.d.ts +816 -816
  11. package/dist/types/src/landing-page-editor/schemas/template/blocks/buttonBlockSchema.d.ts +2 -2
  12. package/dist/types/src/landing-page-editor/schemas/template/blocks/dividerBlockSchema.d.ts +2 -2
  13. package/dist/types/src/landing-page-editor/schemas/template/blocks/imageAnGifBlockSchema.d.ts +6 -6
  14. package/dist/types/src/landing-page-editor/schemas/template/blocks/socialBlockSchema.d.ts +2 -2
  15. package/dist/types/src/landing-page-editor/schemas/template/blocks/spacerBlockSchema.d.ts +2 -2
  16. package/dist/types/src/landing-page-editor/schemas/template/structure/blockSchema.d.ts +92 -92
  17. package/dist/types/src/landing-page-editor/schemas/template/structure/columnSchema.d.ts +94 -94
  18. package/dist/types/src/landing-page-editor/schemas/template/structure/sectionSchema.d.ts +204 -204
  19. package/dist/types/src/landing-page-editor/schemas/templateSchema.d.ts +804 -804
  20. package/dist/types/src/main.d.ts +9 -72
  21. package/dist/types/types/API/API.d.ts +8 -7
  22. package/dist/types/types/Callbacks/ICallbackPayloads.d.ts +19 -22
  23. package/dist/types/types/Callbacks/IEmailCallbacks.d.ts +64 -155
  24. package/dist/types/types/Cloud/ICloudOptions.d.ts +33 -0
  25. package/dist/types/types/ContentBlock/IContentBlockOptions.d.ts +1 -1
  26. package/dist/types/types/IEmailConfig.d.ts +190 -0
  27. package/dist/types/types/IEmailEditorInstance.d.ts +54 -0
  28. package/dist/types/types/ITopolOptions.d.ts +4 -153
  29. package/dist/types/types/ITopolPlugin.d.ts +2 -44
  30. package/dist/types/types/Language/Language.d.ts +1 -1
  31. package/dist/types/types/SavedBlock/ISavedBlock.d.ts +2 -6
  32. package/dist/types/types/Sections/ISections.d.ts +30 -0
  33. package/package.json +7 -10
  34. package/dist/topol-plugin.umd.js +0 -1
@@ -1,81 +1,12 @@
1
- /**
2
- * @topol.io/editor - Official Topol Editor Integration Package
3
- *
4
- * This package provides integrations for Topol's email and landing page editors.
5
- *
6
- * @example Email Editor (default export - backwards compatible)
7
- * ```typescript
8
- * import TopolPlugin from '@topol.io/editor';
9
- *
10
- * await TopolPlugin.init({
11
- * id: '#editor',
12
- * authorize: { apiKey: 'your-key', userId: 'user-123' },
13
- * callbacks: { onSave({ json, html }) { console.log('Saved'); } }
14
- * });
15
- * ```
16
- *
17
- * @example Email Editor (explicit named export)
18
- * ```typescript
19
- * import { EmailEditor } from '@topol.io/editor';
20
- *
21
- * await EmailEditor.init({ ... });
22
- * ```
23
- *
24
- * @example Landing Page Editor
25
- * ```typescript
26
- * import { LandingPageEditor } from '@topol.io/editor';
27
- *
28
- * const editor = await LandingPageEditor.init({
29
- * authorize: { apiKey: 'your-key', userId: 'user-123' },
30
- * callbacks: { onSave(data) { console.log('Saved'); } }
31
- * });
32
- * editor.render('#landing-page-editor');
33
- * ```
34
- */
35
1
  import { EmailEditor } from "./email-editor";
36
2
  /**
37
- * @deprecated Use `EmailEditor` instead. `TopolPlugin` is an alias for backwards compatibility.
3
+ * @deprecated Use `EmailEditor` instead. `TopolPlugin` is an alias as a naming alias.
38
4
  *
39
5
  * TopolPlugin is the original name for the Email Editor integration.
40
6
  * New code should use `EmailEditor` for clarity.
41
7
  */
42
8
  declare const TopolPlugin: {
43
- init: (topolOptions: ITopolOptions, options?: import("./email-editor").EmailEditorPluginOptions | undefined) => Promise<string | boolean>;
44
- save: (lang?: string | undefined) => void;
45
- load: (json: unknown) => void;
46
- togglePreview: () => void;
47
- togglePreviewSize: () => void;
48
- chooseFile: (url: string) => void;
49
- undo: () => void;
50
- redo: () => void;
51
- destroy: () => void;
52
- setSavedBlocks: (savedBlocks: ISavedBlock[]) => void;
53
- setPreviewHTML: (html: unknown) => void;
54
- createNotification: (notification: INotification) => void;
55
- setActiveMembers: (activeMembers: string[]) => void;
56
- changeEmailToMobile: () => void;
57
- changeEmailToDesktop: () => void;
58
- toggleBlocksAndStructuresVisibility: () => void;
59
- updateCustomBlockContent: (content: string) => void;
60
- refreshComments: (key: string) => void;
61
- refreshSyncedRows: () => void;
62
- openPremadeTemplatesSelection: () => void;
63
- updateApiAuthorizationHeader: (newHeader: string | Record<string, string>) => void;
64
- setTemplateName: (name: string) => void;
65
- updateOptions: (options: Partial<ITopolOptions>) => void;
66
- toggleChatAI: () => void;
67
- toggleAutosaves: () => void;
68
- toggleComments: () => void;
69
- createLanguage: (lang: string) => void;
70
- setPrimaryLanguage: (lang: string) => void;
71
- deleteLanguage: (lang: string) => void;
72
- selectLanguage: (lang: string) => void;
73
- getMutations: () => void;
74
- toggleControlPanel: () => void;
75
- updateTemplate: (json: unknown, options?: {
76
- skipSnapshot?: boolean | undefined;
77
- } | undefined) => void;
78
- toggleDarkMode: () => void;
9
+ init(options: ITopolOptions, pluginOptions?: import("./email-editor").IEmailEditorPluginOptions | undefined): Promise<import("../types/IEmailEditorInstance").default>;
79
10
  };
80
11
  import { LandingPageEditor } from "./landing-page-editor";
81
12
  import type ITopolOptions from "../types/ITopolOptions";
@@ -98,7 +29,7 @@ import type ILandingPageEditorInstance from "../types/landing-page/ILandingPageE
98
29
  import type { TopolSection } from "./landing-page-editor/schemas/template/structure/sectionSchema";
99
30
  export default TopolPlugin;
100
31
  /**
101
- * @deprecated Use `EmailEditor` instead. `TopolPlugin` is an alias for backwards compatibility.
32
+ * @deprecated Use `EmailEditor` instead. `TopolPlugin` is an alias as a naming alias.
102
33
  */
103
34
  export { TopolPlugin };
104
35
  export { EmailEditor };
@@ -106,3 +37,9 @@ export { LandingPageEditor };
106
37
  export type { ITopolOptions, IEmailCallbacks, INotification, ISavedBlock, IMergeTagGroup, IMergeTag, IContentBlockOptions, ITheme, IAuthHeaderConfig, IFont, IAPI, ICustomBlockData, Stage as IStage };
107
38
  export type { ISaveData, IErrorData, ISendTestData };
108
39
  export type { ILandingPageOptions, ILandingPageCallbacks, ILandingPageEditorInstance, TopolSection, ILandingPageSavePayload, ILandingPageDeletedItem, ILandingPageErrorPayload };
40
+ export type { default as IEmailConfig } from "../types/IEmailConfig";
41
+ export type { default as IEmailEditorInstance, IUpdateTemplateOptions } from "../types/IEmailEditorInstance";
42
+ export type { IEmailEditorPluginOptions } from "./email-editor";
43
+ export type { ICloudFeatures, ICloudOptions, ICloudCallbacks, ICloudSavePayload, ICloudTemplateChangePayload } from "../types/Cloud/ICloudOptions";
44
+ export type { ISavedSection, IPremadeSection, IPremadeSections, ILegacyPremadeSections, IPremadeSectionsOptions } from "../types/Sections/ISections";
45
+ export type { ILanguageMutation, ILanguageChangePayload, IEmailDeletedItem } from "../types/Callbacks/ICallbackPayloads";
@@ -1,18 +1,19 @@
1
1
  export default interface IAPI {
2
- AUTOSAVE?: string;
3
2
  AUTOSAVES?: string;
4
- GET_AUTOSAVE?: string;
5
3
  CONVERSATIONS?: string;
6
4
  COMMENTS?: string;
7
5
  IMAGE_UPLOAD?: string;
8
6
  IMAGE_EDITOR_UPLOAD?: string;
9
7
  FOLDERS?: string;
10
- LOAD?: string;
11
- PREVIEW?: string;
8
+ GENERATE_TEXT?: string;
9
+ GENERATE_PREHEADER?: string;
10
+ GENERATE_TRANSLATION?: string;
12
11
  PRODUCTS?: string;
13
12
  FEEDS?: string;
14
- SAVE?: string;
15
- SYNCED_ROWS?: string;
16
- SAVED_BLOCKS?: string;
13
+ PRODUCT_CATEGORIES?: string;
14
+ SAVED_SECTIONS?: string;
17
15
  TEST_EMAIL?: string;
16
+ PREMADE_TEMPLATES?: string;
17
+ PREMADE_TEMPLATE_CATEGORIES?: string;
18
+ PREMADE_TEMPLATES_KEYWORDS?: string;
18
19
  }
@@ -1,35 +1,32 @@
1
- /**
2
- * Shared callback payload types for framework wrappers (Vue, React, Svelte).
3
- * These types represent the transformed callback arguments used by wrapper components.
4
- */
5
- /**
6
- * Payload for onSave and onSaveAndClose callbacks.
7
- * Used when transforming (json, html) arguments into a single object.
8
- */
1
+ /** Language identifiers use code in editor v4. */
2
+ export interface ILanguageMutation {
3
+ code: string;
4
+ primary: boolean;
5
+ }
9
6
  export interface ISaveData {
10
7
  json: unknown;
11
8
  html: unknown;
12
- mutations?: {
13
- key: string;
14
- primary: boolean;
15
- }[];
9
+ mutations?: ILanguageMutation[];
16
10
  syncedSections?: number[];
17
11
  }
18
- /**
19
- * Payload for onError callback.
20
- * Used when transforming (type, message, responseBody) arguments into a single object.
21
- */
22
12
  export interface IErrorData {
23
- type: string;
13
+ source: string;
24
14
  message: string;
25
- responseBody?: unknown;
15
+ detail?: unknown;
26
16
  }
27
- /**
28
- * Payload for onTestSend callback (Email Editor only).
29
- * Used when transforming (email, json, html) arguments into a single object.
30
- */
31
17
  export interface ISendTestData {
32
18
  email: string | string[];
33
19
  json: unknown;
34
20
  html: unknown;
35
21
  }
22
+ export interface ILanguageChangePayload {
23
+ code: string;
24
+ mutations: ILanguageMutation[];
25
+ }
26
+ export interface IEmailDeletedItem {
27
+ name: string;
28
+ type: "file" | "folder";
29
+ path: string;
30
+ url?: string;
31
+ key: string | null;
32
+ }
@@ -1,160 +1,69 @@
1
- import type ISavedBlock from "../SavedBlock/ISavedBlock";
2
1
  import type INotification from "../Notification/INotification";
3
- /**
4
- * Callback functions for Email Editor events.
5
- */
6
- export default interface IEmailCallbacks {
7
- /**
8
- * Called when the user saves the email template.
9
- * @param json - The email template JSON structure
10
- * @param html - The generated HTML output
11
- * @param mutations - The mutations applied to the email template
12
- * @param syncedSections - The synced sections id that were in the email template at the time of saving
13
- */
14
- onSave?(json: unknown, html: unknown, mutations: {
15
- key: string;
16
- primary: boolean;
17
- }[], syncedSections: number[]): void;
18
- /**
19
- * Called when the user clicks "Save and Close".
20
- * @param json - The email template JSON structure
21
- * @param html - The generated HTML output
22
- * @param mutations - The mutations applied to the email template
23
- * @param syncedSections - The synced sections id that were in the email template at the time of saving
24
- */
25
- onSaveAndClose?(json: unknown, html: unknown, mutations: {
26
- key: string;
27
- primary: boolean;
28
- }[], syncedSections: number[]): void;
29
- /**
30
- * Called when the user sends a test email.
31
- * @param email - The email address(es) to send to
32
- * @param json - The email template JSON structure
33
- * @param html - The generated HTML output
34
- */
35
- onTestSend?(email: string | string[], json: unknown, html: unknown): void;
36
- /**
37
- * Called when the user clicks the banner (free version only).
38
- * @param json - The email template JSON structure
39
- * @param html - The generated HTML output
40
- */
41
- onBannerClick?(json: unknown, html: unknown): void;
42
- /**
43
- * Called when the custom file manager should be opened.
44
- */
2
+ import type { ISavedSection } from "../Sections/ISections";
3
+ import type { ICloudCallbacks } from "../Cloud/ICloudOptions";
4
+ import type { ISaveData, ISendTestData, IErrorData, ILanguageChangePayload, ILanguageMutation, IEmailDeletedItem } from "./ICallbackPayloads";
5
+ /** v4 host callbacks. Return save promises so the editor can await persistence. */
6
+ export default interface IEmailCallbacks extends ICloudCallbacks {
7
+ onSave?(payload: ISaveData): void | Promise<void>;
8
+ onSaveAndClose?(payload: ISaveData): void | Promise<void>;
9
+ onTestSend?(payload: ISendTestData): void;
10
+ onBannerClick?(payload: {
11
+ json: unknown;
12
+ html: unknown;
13
+ }): void;
45
14
  onOpenFileManager?(): void;
46
- /**
47
- * Called when the editor has finished loading.
48
- */
49
15
  onLoaded?(): void;
50
- /**
51
- * Called when a block is saved.
52
- * @param block - The saved block data
53
- */
54
- onBlockSave?(block: ISavedBlock): void;
55
- /**
56
- * Called when a block is removed.
57
- * @param blockId - The ID of the removed block
58
- */
59
- onBlockRemove?(blockId: number): void;
60
- /**
61
- * Called when a block is being edited.
62
- * @param blockId - The ID of the block being edited
63
- */
64
- onBlockEdit?(blockId: number): void;
65
- /**
66
- * Called when the editor is initialized.
67
- */
16
+ onSavedSectionSave?(payload: {
17
+ section: ISavedSection;
18
+ }): void;
19
+ onSavedSectionRemove?(payload: {
20
+ id: number | string;
21
+ }): void;
22
+ onSavedSectionEdit?(payload: {
23
+ id: number | string;
24
+ }): void;
25
+ onImageDelete?(payload: {
26
+ items: IEmailDeletedItem[];
27
+ }): void;
68
28
  onInit?(): void;
69
- /**
70
- * Called when the undo stack changes.
71
- * @param count - Number of undo steps available
72
- */
73
- onUndoChange?(count: number): void;
74
- /**
75
- * Called when the redo stack changes.
76
- * @param count - Number of redo steps available
77
- */
78
- onRedoChange?(count: number): void;
79
- /**
80
- * Called when the user requests a preview.
81
- * @param html - The preview HTML
82
- */
83
- onPreview?(html: unknown): void;
84
- /**
85
- * Called when an alert/notification is triggered.
86
- * @param notification - The notification object
87
- */
88
- onAlert?(notification: INotification): void;
89
- /**
90
- * Called when the user closes the editor.
91
- */
92
- onClose?(): void;
93
- /**
94
- * Called when the edited-without-save state changes.
95
- * @param hasUnsavedChanges - Whether there are unsaved changes
96
- */
97
- onEdittedWithoutSaveChanged?(hasUnsavedChanges: boolean): void;
98
- /**
99
- * Called when a custom block dialog should be opened.
100
- * @param customBlock - The custom block data
101
- */
102
- onOpenCustomBlockDialog?(customBlock: unknown): void;
103
- /**
104
- * Called when the template is renamed.
105
- * @param title - The new template title
106
- */
107
- onTemplateRename?(title: string): void;
108
- /**
109
- * Called when testing email addresses are updated.
110
- * @param emails - The updated email addresses
111
- */
112
- updateTestingEmailAddresses?(emails: string[]): void;
113
- /**
114
- * Called when an error occurs.
115
- * @param type - The error type
116
- * @param message - The error message
117
- * @param responseBody - The response body (optional)
118
- */
119
- onError?(type: string, message: string, responseBody?: unknown): void;
120
- /**
121
- * Called when a new language variant is created.
122
- * @param lang - The language code that was created
123
- * @param mutations - The mutations applied to the email template at the time of language creation
124
- */
125
- onLanguageCreated?(lang: string, mutations: {
126
- key: string;
127
- primary: boolean;
128
- }[]): void;
129
- /**
130
- * Called when a language variant is deleted.
131
- * @param lang - The language code that was deleted
132
- * @param mutations - The mutations applied to the email template at the time of language deletion
133
- */
134
- onLanguageDeleted?(lang: string, mutations: {
135
- key: string;
136
- primary: boolean;
137
- }[]): void;
138
- /**
139
- * Called when a language variant is selected/switched to.
140
- * @param lang - The language code that was selected
141
- */
142
- onLanguageSelected?(lang: string): void;
143
- /**
144
- * Called when the primary language is changed.
145
- * @param lang - The language code that was set as primary
146
- * @param mutations - The mutations applied to the email template at the time of primary language change
147
- */
148
- onPrimaryLanguageChanged?(lang: string, mutations: {
149
- key: string;
150
- primary: boolean;
151
- }[]): void;
152
- /**
153
- * Called when mutations are requested via `getMutations`.
154
- * @param mutations - The mutations currently applied to the email template
155
- */
156
- onGetMutations?(mutations: {
157
- key: string;
158
- primary: boolean;
159
- }[]): void;
29
+ onUndoChange?(payload: {
30
+ count: number;
31
+ }): void;
32
+ onRedoChange?(payload: {
33
+ count: number;
34
+ }): void;
35
+ onPreview?(payload: {
36
+ html: unknown;
37
+ }): void;
38
+ onPreviewClose?(): void;
39
+ onAlert?(payload: {
40
+ notification: INotification;
41
+ }): void;
42
+ onEditorClose?(): void;
43
+ onEdittedWithoutSaveChanged?(payload: {
44
+ value: boolean;
45
+ }): void;
46
+ onBlocksAndStructuresVisibilityChange?(payload: {
47
+ value: boolean;
48
+ }): void;
49
+ onOpenCustomBlockDialog?(payload: {
50
+ block: unknown;
51
+ }): void;
52
+ onTemplateRename?(payload: {
53
+ name: string;
54
+ }): void;
55
+ onTemplateUpdated?(): void;
56
+ updateTestingEmailAddresses?(payload: {
57
+ emails: string[];
58
+ }): void;
59
+ onEditorError?(payload: IErrorData): void;
60
+ onLanguageCreated?(payload: ILanguageChangePayload): void;
61
+ onLanguageDeleted?(payload: ILanguageChangePayload): void;
62
+ onLanguageSelected?(payload: {
63
+ code: string;
64
+ }): void;
65
+ onPrimaryLanguageChanged?(payload: ILanguageChangePayload): void;
66
+ onGetMutations?(payload: {
67
+ mutations: ILanguageMutation[];
68
+ }): void;
160
69
  }
@@ -0,0 +1,33 @@
1
+ /** Enabling Cloud opts in to all features; set individual features to false to use your own backend. */
2
+ export interface ICloudFeatures {
3
+ templates?: boolean;
4
+ autosaves?: boolean;
5
+ images?: boolean;
6
+ comments?: boolean;
7
+ sections?: boolean;
8
+ multilanguage?: boolean;
9
+ testSend?: boolean;
10
+ }
11
+ export interface ICloudOptions {
12
+ enabled: boolean;
13
+ /** Cloud template to open. Top-level config.templateId is ignored in Cloud mode. */
14
+ templateId?: number | string;
15
+ features?: ICloudFeatures;
16
+ }
17
+ export interface ICloudSavePayload {
18
+ templateId: number | string;
19
+ name?: string;
20
+ langCode?: string;
21
+ }
22
+ export interface ICloudTemplateChangePayload {
23
+ type: "rename" | "delete" | "duplicate" | "move";
24
+ templateId: number | string;
25
+ name?: string;
26
+ folderId?: number | null;
27
+ }
28
+ export interface ICloudCallbacks {
29
+ /** Fetch a fresh nc_ nonce from your authenticated backend. Never expose an sk_ secret in the browser. */
30
+ getNonce?(): Promise<string>;
31
+ onCloudSave?(payload: ICloudSavePayload): void;
32
+ onCloudTemplateChange?(payload: ICloudTemplateChangePayload): void;
33
+ }
@@ -1,4 +1,4 @@
1
- type BlockType = "text" | "image" | "gif" | "button" | "divider" | "spacer" | "social" | "video" | "html" | "product" | "dynamic" | "article" | "carousel" | "raw" | "custom-raw" | "apiBlock";
1
+ type BlockType = "text" | "image" | "gif" | "button" | "divider" | "spacer" | "social" | "video" | "html" | "product" | "dynamic" | "article" | "carousel" | "raw" | "custom-raw" | "apiBlock" | "countdown" | "loop" | "rating";
2
2
  export type IContentBlockOption = {
3
3
  disabled?: boolean;
4
4
  disabledText?: string;
@@ -0,0 +1,190 @@
1
+ import type IAPI from "./API/API";
2
+ import type IAPIBlockProperties from "./APIBlocks/APIBlocks";
3
+ import type { ISavedSection, IPremadeSectionsOptions } from "./Sections/ISections";
4
+ import type { ICloudOptions } from "./Cloud/ICloudOptions";
5
+ import type IMergeTagGroup from "./MergeTag/IMergeTagGroup";
6
+ import type { IContentBlockOptions } from "./ContentBlock/IContentBlockOptions";
7
+ import type ITheme from "./Theme/ITheme";
8
+ import type IAuthHeaderConfig from "./AuthHeaderConfig/IAuthHeaderConfig";
9
+ import type IFont from "./Font/IFont";
10
+ import type ICustomBlockData from "./CustomBlocks/CustomBlocks";
11
+ import type { Language, IMultilingualLanguage } from "./Language/Language";
12
+ import type IMergeTag from "./MergeTag/IMergeTag";
13
+ import type SmartMergeTagPattern from "./MergeTag/SmartMergeTagPattern";
14
+ import type IUser from "./User/User";
15
+ import type IHelpdesk from "./Helpdesk/Helpdesk";
16
+ type TopolTagAttribute = "font-family" | "font-size" | "font-weight" | "font-style" | "letter-spacing" | "text-transform" | "text-decoration" | "background-color" | "color" | "border-collapse";
17
+ type DefaultTemplateLangsSchema = {
18
+ code: string;
19
+ primary: boolean;
20
+ }[];
21
+ /**
22
+ * Configuration options for the Email Editor (TopolPlugin).
23
+ */
24
+ export default interface IEmailConfig {
25
+ authorize: {
26
+ apiKey: string;
27
+ /** URL-safe [A-Za-z0-9_-]+ string or a non-negative integer. */
28
+ userId: string | number;
29
+ };
30
+ aiLabeledElements?: boolean;
31
+ api?: IAPI;
32
+ apiAuthorizationHeader?: IAuthHeaderConfig | string;
33
+ apiBlocks?: Record<string, IAPIBlockProperties>;
34
+ autosaveInterval?: number;
35
+ betaFeatures?: {
36
+ carousel?: boolean;
37
+ loop?: boolean;
38
+ rating?: boolean;
39
+ };
40
+ chatAI?: boolean;
41
+ chatAIOnSegment?: boolean;
42
+ cloud?: ICloudOptions;
43
+ colors?: Array<string>;
44
+ contentBlocks?: IContentBlockOptions;
45
+ currentUser?: IUser;
46
+ customBlocks?: ICustomBlockData[];
47
+ customFileManager?: boolean;
48
+ customFonts?: {
49
+ override?: boolean;
50
+ fonts: Array<IFont>;
51
+ };
52
+ customLanguagePreset?: {
53
+ langs: IMultilingualLanguage;
54
+ override?: boolean;
55
+ };
56
+ defaultTemplateSettings?: {
57
+ emailWidth?: number;
58
+ emailBackgroundColor?: string;
59
+ blockBackgroundColor?: string;
60
+ buttonsBackgroundColor?: string;
61
+ hyperlinkColor?: string;
62
+ h1?: {
63
+ [key in TopolTagAttribute]?: string;
64
+ };
65
+ h2?: {
66
+ [key in TopolTagAttribute]?: string;
67
+ };
68
+ h3?: {
69
+ [key in TopolTagAttribute]?: string;
70
+ };
71
+ p?: {
72
+ [key in TopolTagAttribute]?: string;
73
+ };
74
+ button?: Record<string, unknown>;
75
+ carousel?: Record<string, unknown>;
76
+ divider?: Record<string, unknown>;
77
+ gif?: Record<string, unknown>;
78
+ image?: Record<string, unknown>;
79
+ loop?: Record<string, unknown>;
80
+ social?: Record<string, unknown>;
81
+ text?: Record<string, unknown>;
82
+ column?: Record<string, unknown>;
83
+ section?: Record<string, unknown>;
84
+ "line-height"?: number;
85
+ "structure-margin"?: string;
86
+ "stack-columns"?: boolean;
87
+ langs?: DefaultTemplateLangsSchema;
88
+ };
89
+ disableAiAssistant?: boolean;
90
+ disableAlerts?: boolean;
91
+ disableExtendedComparators?: boolean;
92
+ emailServiceProvider?: "mailchimp" | "sparkpost";
93
+ enableAutosaves?: boolean;
94
+ enableComments?: boolean;
95
+ enableDarkMode?: boolean;
96
+ enableFileManagerInGif?: boolean;
97
+ enableSubjectLine?: boolean;
98
+ enableImageToTextRatio?: boolean;
99
+ enableMergeTagPreview?: boolean;
100
+ enableSectionVariants?: boolean;
101
+ enableTemplateSizeInfo?: boolean;
102
+ fileManagerPreferences?: {
103
+ defaultTilesView?: boolean;
104
+ hidePexelsIntegration?: boolean;
105
+ maxUploadingFiles?: number;
106
+ };
107
+ fontSizes?: Array<number>;
108
+ googleApiKey?: string;
109
+ googlePromotionalAnnotation?: boolean;
110
+ helpdesk?: IHelpdesk;
111
+ hideSettingsTab?: boolean;
112
+ hideControlPanel?: boolean;
113
+ htmlDesktopFirst?: boolean;
114
+ htmlMinified?: boolean;
115
+ imageCompressionOptions?: {
116
+ qualityJpeg?: number;
117
+ qualityPng?: number;
118
+ enableAutoResize?: boolean;
119
+ enableCompression?: boolean;
120
+ };
121
+ imageEditor?: boolean;
122
+ imageEditorV2?: boolean;
123
+ imageEditorOptions?: {
124
+ hideControls?: Array<string>;
125
+ };
126
+ imageMaxSize?: number;
127
+ lambdaStage?: "local" | "production" | "stage1" | "stage2" | "stage3" | "v4";
128
+ language?: Language;
129
+ languageMergeTag?: string;
130
+ light?: boolean;
131
+ logicalOperatorsInsideVariant?: boolean;
132
+ mainMenuAlign?: "left" | "right";
133
+ mergeTags?: Array<IMergeTagGroup | IMergeTag>;
134
+ mobileFirstEnabled?: boolean;
135
+ multilingual?: boolean;
136
+ premadeSections?: IPremadeSectionsOptions;
137
+ premadeTemplates?: boolean;
138
+ premadeTemplatesOptions?: {
139
+ hideSearch?: boolean;
140
+ showDelete?: boolean;
141
+ };
142
+ productMergetagTags?: {
143
+ label: string;
144
+ value: string;
145
+ }[];
146
+ permissions?: {
147
+ canLockBlocks?: boolean;
148
+ canLockSections?: boolean;
149
+ canEditLockedSections?: boolean;
150
+ canEditLockedBlocks?: boolean;
151
+ canRemoveFiles?: boolean;
152
+ };
153
+ ecm?: {
154
+ articleFeeds?: string;
155
+ articles?: string;
156
+ dataFeeds?: string;
157
+ showArticleBlock?: boolean;
158
+ };
159
+ removeTopBar?: boolean;
160
+ renameTemplate?: boolean;
161
+ role?: "manager" | "editor" | "reader";
162
+ savedSections?: ISavedSection[] | boolean | null;
163
+ showControlPanelExpand?: boolean;
164
+ showUnsavedDialogBeforeExit?: boolean;
165
+ smartMergeTags?: {
166
+ enabled: boolean;
167
+ patterns?: Record<string, SmartMergeTagPattern>;
168
+ syntax?: {
169
+ start: string;
170
+ end: string;
171
+ };
172
+ };
173
+ syncedSectionsEnabled?: boolean;
174
+ teamUsers?: IUser[];
175
+ templateId?: number | string;
176
+ testingEmails?: boolean | string[];
177
+ textEditor?: "tinymce" | "tiptap";
178
+ textEditorToolbarBottomPosition?: "left" | "center" | "right";
179
+ textOverride?: Record<string, string>;
180
+ theme?: ITheme;
181
+ tinyConfig?: unknown;
182
+ tiptapConfig?: {
183
+ light?: boolean;
184
+ showMergeTagText?: boolean;
185
+ };
186
+ title?: string;
187
+ hideTopbarControls?: string[];
188
+ windowBar?: Array<string>;
189
+ }
190
+ export {};