@topol.io/editor 1.0.0-alpha.1 → 1.0.0-alpha.11
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 +153 -101
- package/dist/topol-plugin.es.js +146 -191
- package/dist/topol-plugin.umd.cjs +1 -0
- package/dist/types/src/core/script-loader.d.ts +15 -0
- package/dist/types/src/email-editor/constants.d.ts +3 -3
- package/dist/types/src/email-editor/index.d.ts +16 -91
- package/dist/types/src/landing-page-editor/constants.d.ts +1 -1
- package/dist/types/src/landing-page-editor/index.d.ts +27 -10
- package/dist/types/src/landing-page-editor/schemas/api/apiSchema.d.ts +5 -10
- package/dist/types/src/landing-page-editor/schemas/contentBlock/contentBlockScheme.d.ts +34 -18
- package/dist/types/src/landing-page-editor/schemas/language/languageSchema.d.ts +1 -1
- package/dist/types/src/landing-page-editor/schemas/mjmlStore/mjmlStoreSchema.d.ts +8 -6
- package/dist/types/src/landing-page-editor/schemas/notification/notificationSchema.d.ts +0 -1
- package/dist/types/src/landing-page-editor/schemas/openAI/openAISchema.d.ts +1 -2
- package/dist/types/src/landing-page-editor/schemas/pluginOptions/pluginOptionsSchema.d.ts +153 -17
- package/dist/types/src/landing-page-editor/schemas/premadeSection/premadeSectionSchema.d.ts +30 -0
- package/dist/types/src/landing-page-editor/schemas/template/blocks/buttonBlockSchema.d.ts +687 -5
- package/dist/types/src/landing-page-editor/schemas/template/blocks/carouselBlockSchema.d.ts +9 -2
- package/dist/types/src/landing-page-editor/schemas/template/blocks/dividerBlockSchema.d.ts +11 -3
- package/dist/types/src/landing-page-editor/schemas/template/blocks/formBlockSchema.d.ts +1069 -0
- package/dist/types/src/landing-page-editor/schemas/template/blocks/imageAnGifBlockSchema.d.ts +35 -19
- package/dist/types/src/landing-page-editor/schemas/template/blocks/rawBlockSchema.d.ts +9 -1
- package/dist/types/src/landing-page-editor/schemas/template/blocks/socialBlockSchema.d.ts +11 -3
- package/dist/types/src/landing-page-editor/schemas/template/blocks/spacerBlockSchema.d.ts +18 -10
- package/dist/types/src/landing-page-editor/schemas/template/blocks/textBlockSchema.d.ts +9 -1
- package/dist/types/src/landing-page-editor/schemas/template/blocks/videoBlockSchema.d.ts +9 -1
- package/dist/types/src/landing-page-editor/schemas/template/commonSchema.d.ts +28 -8
- package/dist/types/src/landing-page-editor/schemas/template/navbarBlocks/navbarCTASchema.d.ts +335 -0
- package/dist/types/src/landing-page-editor/schemas/template/navbarBlocks/navbarHamburgerSchema.d.ts +1109 -0
- package/dist/types/src/landing-page-editor/schemas/template/navbarBlocks/navbarLogoSchema.d.ts +252 -0
- package/dist/types/src/landing-page-editor/schemas/template/navbarBlocks/navbarMenuSchema.d.ts +1209 -0
- package/dist/types/src/landing-page-editor/schemas/template/settingsSchema.d.ts +4058 -546
- package/dist/types/src/landing-page-editor/schemas/template/structure/blockSchema.d.ts +5007 -2328
- package/dist/types/src/landing-page-editor/schemas/template/structure/columnSchema.d.ts +5501 -2412
- package/dist/types/src/landing-page-editor/schemas/template/structure/navbarSchema.d.ts +4394 -0
- package/dist/types/src/landing-page-editor/schemas/template/structure/rowSchema.d.ts +11094 -0
- package/dist/types/src/landing-page-editor/schemas/template/structure/sectionSchema.d.ts +8602 -3337
- package/dist/types/src/landing-page-editor/schemas/template/styleSchema.d.ts +55 -44
- package/dist/types/src/landing-page-editor/schemas/templateSchema.d.ts +34865 -48464
- package/dist/types/src/landing-page-editor/schemas/templateSettings/templateSettingsSchema.d.ts +4305 -794
- package/dist/types/src/landing-page-editor/schemas/theme/themeSchema.d.ts +6 -1
- package/dist/types/src/landing-page-editor/schemas/utils/cssValue.d.ts +21 -0
- package/dist/types/src/landing-page-editor/schemas/utils/transformBorder.d.ts +10 -5
- package/dist/types/src/main.d.ts +28 -101
- package/dist/types/types/API/API.d.ts +10 -9
- package/dist/types/types/APIBlocks/APIBlocks.d.ts +11 -0
- package/dist/types/types/Auth/IAuthorize.d.ts +18 -0
- package/dist/types/types/Auth/INonceAuthCallbacks.d.ts +10 -0
- package/dist/types/types/Callbacks/ICallbackPayloads.d.ts +28 -18
- package/dist/types/types/Callbacks/IEmailCallbacks.d.ts +85 -104
- package/dist/types/types/Cloud/ICloudOptions.d.ts +32 -0
- package/dist/types/types/ContentBlock/IContentBlockOptions.d.ts +1 -1
- package/dist/types/types/Countdown/ICountdownOptions.d.ts +48 -0
- package/dist/types/types/IEmailConfig.d.ts +225 -0
- package/dist/types/types/IEmailEditorInstance.d.ts +68 -0
- package/dist/types/types/IEmailOptions.d.ts +7 -0
- package/dist/types/types/Language/Language.d.ts +6 -1
- package/dist/types/types/MergeTag/IMergeTag.d.ts +18 -0
- package/dist/types/types/Notification/INotification.d.ts +2 -1
- package/dist/types/types/Sections/ISections.d.ts +41 -0
- package/dist/types/types/Shortcuts/EditorShortcut.d.ts +4 -0
- package/dist/types/types/Theme/ITheme.d.ts +12 -2
- package/dist/types/types/landing-page/ILandingPageEditorInstance.d.ts +73 -9
- package/dist/types/types/landing-page/ILandingPageOptions.d.ts +110 -62
- package/package.json +10 -13
- package/dist/topol-plugin.umd.js +0 -1
- package/dist/types/src/landing-page-editor/schemas/helpdesk/helpdeskSchema.d.ts +0 -8
- package/dist/types/src/landing-page-editor/schemas/premadeBlock/premadeBlockSchema.d.ts +0 -59750
- package/dist/types/src/landing-page-editor/schemas/savedBlock/savedBlockApiSchema.d.ts +0 -44831
- package/dist/types/src/landing-page-editor/schemas/savedBlock/savedBlockSchema.d.ts +0 -59725
- package/dist/types/src/landing-page-editor/schemas/template/blocks/index.d.ts +0 -12
- package/dist/types/types/ITopolOptions.d.ts +0 -123
- package/dist/types/types/ITopolPlugin.d.ts +0 -37
- package/dist/types/types/SavedBlock/ISavedBlock.d.ts +0 -6
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./buttonBlockSchema";
|
|
2
|
-
export * from "./carouselBlockSchema";
|
|
3
|
-
export * from "./dividerBlockSchema";
|
|
4
|
-
export * from "./imageAnGifBlockSchema";
|
|
5
|
-
export * from "./rawBlockSchema";
|
|
6
|
-
export * from "./socialBlockSchema";
|
|
7
|
-
export * from "./spacerBlockSchema";
|
|
8
|
-
export * from "./textBlockSchema";
|
|
9
|
-
export * from "./videoBlockSchema";
|
|
10
|
-
export { TopolTextStyleSchema, TopolListStyleSchema } from "../styleSchema";
|
|
11
|
-
export { TopolSectionStyleSchema, TopolContainerAttributesSchema } from "../structure/sectionSchema";
|
|
12
|
-
export { TopolColumnStyleSchema } from "../structure/columnSchema";
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import type IAPI from "./API/API";
|
|
2
|
-
import type IAPIBlockProperties from "./APIBlocks/APIBlocks";
|
|
3
|
-
import type ISavedBlock from "./SavedBlock/ISavedBlock";
|
|
4
|
-
import type IMergeTagGroup from "./MergeTag/IMergeTagGroup";
|
|
5
|
-
import type { IContentBlockOptions } from "./ContentBlock/IContentBlockOptions";
|
|
6
|
-
import type ITheme from "./Theme/ITheme";
|
|
7
|
-
import type IAuthHeaderConfig from "./AuthHeaderConfig/IAuthHeaderConfig";
|
|
8
|
-
import type IFont from "./Font/IFont";
|
|
9
|
-
import type ICustomBlockData from "./CustomBlocks/CustomBlocks";
|
|
10
|
-
import type { Language } from "./Language/Language";
|
|
11
|
-
import type IMergeTag from "./MergeTag/IMergeTag";
|
|
12
|
-
import type SmartMergeTagPattern from "./MergeTag/SmartMergeTagPattern";
|
|
13
|
-
import type IUser from "./User/User";
|
|
14
|
-
import type IHelpdesk from "./Helpdesk/Helpdesk";
|
|
15
|
-
import type IEmailCallbacks from "./Callbacks/IEmailCallbacks";
|
|
16
|
-
type TopolTagAttribute = "font-family" | "font-size" | "font-weight" | "font-style" | "letter-spacing" | "text-transform" | "text-decoration" | "background-color" | "color" | "border-collapse";
|
|
17
|
-
/**
|
|
18
|
-
* Configuration options for the Email Editor (TopolPlugin).
|
|
19
|
-
*/
|
|
20
|
-
export default interface ITopolOptions {
|
|
21
|
-
id: string;
|
|
22
|
-
authorize: {
|
|
23
|
-
apiKey: string;
|
|
24
|
-
userId: string | number;
|
|
25
|
-
};
|
|
26
|
-
api?: IAPI;
|
|
27
|
-
apiAuthorizationHeader?: IAuthHeaderConfig | string;
|
|
28
|
-
apiBlocks?: Record<string, IAPIBlockProperties>;
|
|
29
|
-
autosaveInterval?: number;
|
|
30
|
-
betaFeatures?: {
|
|
31
|
-
carousel?: boolean;
|
|
32
|
-
};
|
|
33
|
-
chatAI?: boolean;
|
|
34
|
-
colors?: Array<string>;
|
|
35
|
-
contentBlocks?: IContentBlockOptions;
|
|
36
|
-
currentUser?: IUser;
|
|
37
|
-
customBlocks?: ICustomBlockData[];
|
|
38
|
-
customFileManager?: boolean;
|
|
39
|
-
customFonts?: {
|
|
40
|
-
override?: boolean;
|
|
41
|
-
fonts: Array<IFont>;
|
|
42
|
-
};
|
|
43
|
-
defaultTemplateSettings?: {
|
|
44
|
-
emailWidth?: number;
|
|
45
|
-
emailBackgroundColor?: string;
|
|
46
|
-
blockBackgroundColor?: string;
|
|
47
|
-
buttonsBackgroundColor?: string;
|
|
48
|
-
hyperlinkColor?: string;
|
|
49
|
-
h1?: {
|
|
50
|
-
[key in TopolTagAttribute]?: string;
|
|
51
|
-
};
|
|
52
|
-
h2?: {
|
|
53
|
-
[key in TopolTagAttribute]?: string;
|
|
54
|
-
};
|
|
55
|
-
h3?: {
|
|
56
|
-
[key in TopolTagAttribute]?: string;
|
|
57
|
-
};
|
|
58
|
-
p?: {
|
|
59
|
-
[key in TopolTagAttribute]?: string;
|
|
60
|
-
};
|
|
61
|
-
button?: {
|
|
62
|
-
[key in TopolTagAttribute]?: string;
|
|
63
|
-
};
|
|
64
|
-
"line-height"?: number;
|
|
65
|
-
"structure-margin"?: string;
|
|
66
|
-
};
|
|
67
|
-
disableAiAssistant?: boolean;
|
|
68
|
-
disableAlerts?: boolean;
|
|
69
|
-
disableExtendedComparators?: boolean;
|
|
70
|
-
emailServiceProvider?: "mailchimp" | "sparkpost";
|
|
71
|
-
enableAutosaves?: boolean;
|
|
72
|
-
enableComments?: boolean;
|
|
73
|
-
enableImageToTextRatio?: boolean;
|
|
74
|
-
enableMergeTagPreview?: boolean;
|
|
75
|
-
enableSectionVariants?: boolean;
|
|
76
|
-
enableTemplateSizeInfo?: boolean;
|
|
77
|
-
fontSizes?: Array<number>;
|
|
78
|
-
googleApiKey?: string;
|
|
79
|
-
helpdesk?: IHelpdesk;
|
|
80
|
-
hideSettingsTab?: boolean;
|
|
81
|
-
htmlDesktopFirst?: boolean;
|
|
82
|
-
htmlMinified?: boolean;
|
|
83
|
-
imageCompressionOptions?: {
|
|
84
|
-
qualityJpeg?: number;
|
|
85
|
-
qualityPng?: number;
|
|
86
|
-
enableAutoResize?: boolean;
|
|
87
|
-
enableCompression?: boolean;
|
|
88
|
-
};
|
|
89
|
-
imageEditor?: boolean;
|
|
90
|
-
imageMaxSize?: number;
|
|
91
|
-
language?: Language;
|
|
92
|
-
light?: boolean;
|
|
93
|
-
logicalOperatorsInsideVariant?: boolean;
|
|
94
|
-
mainMenuAlign?: "left" | "right";
|
|
95
|
-
mergeTags?: Array<IMergeTagGroup | IMergeTag>;
|
|
96
|
-
mobileFirstEnabled?: boolean;
|
|
97
|
-
premadeBlocks?: Record<any, any> | boolean;
|
|
98
|
-
premadeTemplates?: boolean;
|
|
99
|
-
role?: "manager" | "editor" | "reader";
|
|
100
|
-
savedBlocks?: Array<ISavedBlock> | boolean;
|
|
101
|
-
showUnsavedDialogBeforeExit?: boolean;
|
|
102
|
-
smartMergeTags?: {
|
|
103
|
-
enabled: boolean;
|
|
104
|
-
patterns?: Record<string, SmartMergeTagPattern>;
|
|
105
|
-
syntax?: {
|
|
106
|
-
start: string;
|
|
107
|
-
end: string;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
syncedRowsEnable?: boolean;
|
|
111
|
-
teamUsers?: IUser[];
|
|
112
|
-
templateId?: number | string;
|
|
113
|
-
testingEmails?: boolean | string[];
|
|
114
|
-
theme?: ITheme;
|
|
115
|
-
tinyConfig?: unknown;
|
|
116
|
-
title?: string;
|
|
117
|
-
topBarOptions?: Array<string>;
|
|
118
|
-
renameTemplate?: boolean;
|
|
119
|
-
removeTopBar?: boolean;
|
|
120
|
-
windowBar?: Array<string>;
|
|
121
|
-
callbacks: IEmailCallbacks;
|
|
122
|
-
}
|
|
123
|
-
export type { IEmailCallbacks };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import INotification from "./Notification/INotification";
|
|
2
|
-
import ISavedBlock from "./SavedBlock/ISavedBlock";
|
|
3
|
-
import ITopolOptions from "./ITopolOptions";
|
|
4
|
-
import IMergeTagGroup from "./MergeTag/IMergeTagGroup";
|
|
5
|
-
import IMergeTag from "./MergeTag/IMergeTag";
|
|
6
|
-
export default interface ITopolPlugin {
|
|
7
|
-
init: (topolOptions: ITopolOptions) => void;
|
|
8
|
-
save: () => void;
|
|
9
|
-
load: (json: unknown) => void;
|
|
10
|
-
togglePreview: () => void;
|
|
11
|
-
togglePreviewSize: () => void;
|
|
12
|
-
chooseFile: (url: string) => void;
|
|
13
|
-
undo: () => void;
|
|
14
|
-
redo: () => void;
|
|
15
|
-
destroy: () => void;
|
|
16
|
-
setSavedBlocks: (savedBlocks: ISavedBlock[]) => void;
|
|
17
|
-
setPreviewHTML: (html: unknown) => void;
|
|
18
|
-
createNotification: (notification: INotification) => void;
|
|
19
|
-
setActiveMembers: (activeMemers: string[]) => void;
|
|
20
|
-
changeEmailToMobile: () => void;
|
|
21
|
-
changeEmailToDesktop: () => void;
|
|
22
|
-
toggleBlocksAndStructuresVisibility: () => void;
|
|
23
|
-
updateCustomBlockContent: (content: string) => void;
|
|
24
|
-
refreshComments: (key: string) => void;
|
|
25
|
-
refreshSyncedRows: () => void;
|
|
26
|
-
openPremadeTemplatesSelection: () => void;
|
|
27
|
-
updateApiAuthorizationHeader: (newHeader: string | Record<string, string>) => void;
|
|
28
|
-
setTemplateName: (name: string) => void;
|
|
29
|
-
setMergeTags: (mergeTags: Array<IMergeTagGroup | IMergeTag>) => void;
|
|
30
|
-
toggleChatAI: () => void;
|
|
31
|
-
toggleAutosaves: () => void;
|
|
32
|
-
toggleComments: () => void;
|
|
33
|
-
createLanguage: (lang: string) => void;
|
|
34
|
-
setPrimaryLanguage: (lang: string) => void;
|
|
35
|
-
deleteLanguage: (lang: string) => void;
|
|
36
|
-
selectLanguage: (lang: string) => void;
|
|
37
|
-
}
|