easy-email-pro-core 0.2.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/lib/index.cjs.js +105 -0
- package/lib/index.es.js +7244 -0
- package/lib/typings/blocks/basic/Button/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Column/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Divider/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Group/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Hero/index.d.ts +2 -0
- package/lib/typings/blocks/basic/HtmlNode/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Image/index.d.ts +2 -0
- package/lib/typings/blocks/basic/LineBreak/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Mergetag/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Navbar/index.d.ts +2 -0
- package/lib/typings/blocks/basic/NavbarLink/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Page/index.d.ts +3 -0
- package/lib/typings/blocks/basic/Placeholder/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Raw/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Section/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Social/index.d.ts +2 -0
- package/lib/typings/blocks/basic/SocialElement/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Spacer/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Text/index.d.ts +2 -0
- package/lib/typings/blocks/basic/Wrapper/index.d.ts +2 -0
- package/lib/typings/blocks/basic/index.d.ts +23 -0
- package/lib/typings/blocks/index.d.ts +45 -0
- package/lib/typings/blocks/logic/ForEach/index.d.ts +3 -0
- package/lib/typings/blocks/logic/Show/index.d.ts +2 -0
- package/lib/typings/blocks/logic/index.d.ts +5 -0
- package/lib/typings/blocks/standard/Button/index.d.ts +2 -0
- package/lib/typings/blocks/standard/Column/index.d.ts +2 -0
- package/lib/typings/blocks/standard/Divider/index.d.ts +2 -0
- package/lib/typings/blocks/standard/Group/index.d.ts +2 -0
- package/lib/typings/blocks/standard/Hero/index.d.ts +2 -0
- package/lib/typings/blocks/standard/Image/index.d.ts +2 -0
- package/lib/typings/blocks/standard/Navbar/index.d.ts +2 -0
- package/lib/typings/blocks/standard/NavbarLink/index.d.ts +2 -0
- package/lib/typings/blocks/standard/Section/index.d.ts +2 -0
- package/lib/typings/blocks/standard/Social/index.d.ts +2 -0
- package/lib/typings/blocks/standard/SocialElement/index.d.ts +2 -0
- package/lib/typings/blocks/standard/Spacer/index.d.ts +2 -0
- package/lib/typings/blocks/standard/Text/generateTextBlock.d.ts +4 -0
- package/lib/typings/blocks/standard/Text/index.d.ts +7 -0
- package/lib/typings/blocks/standard/TextList/TextListItem.d.ts +2 -0
- package/lib/typings/blocks/standard/TextList/index.d.ts +3 -0
- package/lib/typings/blocks/standard/Wrapper/index.d.ts +2 -0
- package/lib/typings/blocks/standard/index.d.ts +24 -0
- package/lib/typings/components/BasicBlock.d.ts +7 -0
- package/lib/typings/components/BlockRenderer.d.ts +9 -0
- package/lib/typings/components/ContentEditableBlock.d.ts +4 -0
- package/lib/typings/components/ContentLeaf.d.ts +4 -0
- package/lib/typings/components/Elements/Button.d.ts +9 -0
- package/lib/typings/components/Elements/Column.d.ts +8 -0
- package/lib/typings/components/Elements/Divider.d.ts +8 -0
- package/lib/typings/components/Elements/ForEach.d.ts +6 -0
- package/lib/typings/components/Elements/Group.d.ts +8 -0
- package/lib/typings/components/Elements/Hero.d.ts +8 -0
- package/lib/typings/components/Elements/HtmlNode.d.ts +9 -0
- package/lib/typings/components/Elements/Image.d.ts +8 -0
- package/lib/typings/components/Elements/Navbar.d.ts +8 -0
- package/lib/typings/components/Elements/NavbarLink.d.ts +8 -0
- package/lib/typings/components/Elements/Raw.d.ts +8 -0
- package/lib/typings/components/Elements/Section.d.ts +8 -0
- package/lib/typings/components/Elements/Show.d.ts +6 -0
- package/lib/typings/components/Elements/Social.d.ts +8 -0
- package/lib/typings/components/Elements/SocialElement.d.ts +8 -0
- package/lib/typings/components/Elements/Spacer.d.ts +8 -0
- package/lib/typings/components/Elements/Text.d.ts +8 -0
- package/lib/typings/components/Elements/Wrapper.d.ts +8 -0
- package/lib/typings/components/Elements/index.d.ts +19 -0
- package/lib/typings/components/index.d.ts +5 -0
- package/lib/typings/constants/blockCategory.d.ts +20 -0
- package/lib/typings/constants/blockType.d.ts +100 -0
- package/lib/typings/constants/editor.d.ts +1 -0
- package/lib/typings/constants/index.d.ts +4 -0
- package/lib/typings/constants/regexp.d.ts +2 -0
- package/lib/typings/constants/responsive.d.ts +4 -0
- package/lib/typings/index.d.ts +8 -0
- package/lib/typings/typings/custom-types.d.ts +22 -0
- package/lib/typings/typings/element-logic.d.ts +38 -0
- package/lib/typings/typings/element.d.ts +609 -0
- package/lib/typings/typings/helper.d.ts +6 -0
- package/lib/typings/typings/index.d.ts +35 -0
- package/lib/typings/typings/mergeTagGenerate.d.ts +18 -0
- package/lib/typings/utils/BeacasCore/contexts/EmailGlobalContext.d.ts +32 -0
- package/lib/typings/utils/BeacasCore/contexts/EmailRenderContext.d.ts +18 -0
- package/lib/typings/utils/BeacasCore/index.d.ts +14 -0
- package/lib/typings/utils/BeacasCore/universalElement.d.ts +11 -0
- package/lib/typings/utils/BlockManager.d.ts +7 -0
- package/lib/typings/utils/I18nManager.d.ts +9 -0
- package/lib/typings/utils/NodeUtils.d.ts +37 -0
- package/lib/typings/utils/classnames.d.ts +1 -0
- package/lib/typings/utils/createBlock.d.ts +5 -0
- package/lib/typings/utils/getAdapterAttributesString.d.ts +10 -0
- package/lib/typings/utils/index.d.ts +9 -0
- package/lib/typings/utils/isProductionMode.d.ts +15 -0
- package/lib/typings/utils/isValidReactChildren.d.ts +2 -0
- package/lib/typings/utils/mergeBlock.d.ts +2 -0
- package/lib/typings/utils/plugins/PluginManager.d.ts +43 -0
- package/lib/typings/utils/plugins/TemplateEngine.d.ts +9 -0
- package/lib/typings/utils/plugins/index.d.ts +2 -0
- package/package.json +34 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JsonToMjmlOption } from "../../../utils/isProductionMode";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export declare const useEmailGlobalContext: () => {
|
|
4
|
+
context: GlobalEmailContext;
|
|
5
|
+
};
|
|
6
|
+
export declare const EmailGlobalContextProvider: React.FC<{
|
|
7
|
+
context: GlobalEmailContext;
|
|
8
|
+
} & {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
export declare class GlobalEmailContext {
|
|
12
|
+
mode: JsonToMjmlOption["mode"];
|
|
13
|
+
constructor(options: {
|
|
14
|
+
mode: JsonToMjmlOption["mode"];
|
|
15
|
+
});
|
|
16
|
+
headItems: Array<{
|
|
17
|
+
content: string;
|
|
18
|
+
id?: string;
|
|
19
|
+
type: "style" | "selector" | "head";
|
|
20
|
+
}>;
|
|
21
|
+
getHeadContent(): string;
|
|
22
|
+
addStyle: (params: {
|
|
23
|
+
content: string;
|
|
24
|
+
inline?: "inline";
|
|
25
|
+
id?: string;
|
|
26
|
+
}) => void;
|
|
27
|
+
addAttributeBySelector(params: {
|
|
28
|
+
selector: string;
|
|
29
|
+
attributes: Record<string, string | number>;
|
|
30
|
+
}): void;
|
|
31
|
+
addHeadItems(params: GlobalEmailContext["headItems"][0]): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PageElement } from "../../../typings";
|
|
2
|
+
import type { JsonToMjmlOption } from "../../../utils/isProductionMode";
|
|
3
|
+
import React from "react";
|
|
4
|
+
type EmailRenderInputProps = {
|
|
5
|
+
mode: JsonToMjmlOption["mode"];
|
|
6
|
+
context: {
|
|
7
|
+
content: PageElement;
|
|
8
|
+
};
|
|
9
|
+
displayMode?: "desktop-mobile" | "only-desktop" | "only-mobile";
|
|
10
|
+
universalElements: JsonToMjmlOption["universalElements"];
|
|
11
|
+
keepEmptyAttributes: boolean;
|
|
12
|
+
mergetagsData?: Record<string, any>;
|
|
13
|
+
};
|
|
14
|
+
export declare const useEmailRenderContext: () => EmailRenderInputProps;
|
|
15
|
+
export declare const EmailRenderProvider: React.FC<EmailRenderInputProps & {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TextNode, Element as BeacasElement, PageElement } from "../../typings";
|
|
2
|
+
import { JsonToMjmlOption } from "../isProductionMode";
|
|
3
|
+
import { getUniversalElements, transformUniversalElements } from "./universalElement";
|
|
4
|
+
export declare class BeacasCore {
|
|
5
|
+
static version: string;
|
|
6
|
+
static toMJML(options: JsonToMjmlOption): string;
|
|
7
|
+
static elementToMjml(node: BeacasElement, options: Omit<JsonToMjmlOption, "element"> & {
|
|
8
|
+
pageElement: BeacasElement;
|
|
9
|
+
}): string;
|
|
10
|
+
static mjmlToBlockElement(mjml: string): BeacasElement | TextNode;
|
|
11
|
+
static getPageDataVariables: (page: PageElement) => Record<string, any>;
|
|
12
|
+
static getUniversalElements: typeof getUniversalElements;
|
|
13
|
+
static transformUniversalElements: typeof transformUniversalElements;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Element as BeacasElement } from "../../typings";
|
|
2
|
+
export declare function getUniversalElements(data: {
|
|
3
|
+
content: BeacasElement;
|
|
4
|
+
}): Record<string, {
|
|
5
|
+
idx: string;
|
|
6
|
+
blockData: BeacasElement;
|
|
7
|
+
}[]>;
|
|
8
|
+
export declare function transformUniversalElements<T extends {
|
|
9
|
+
content: BeacasElement;
|
|
10
|
+
universalElements: Record<string, BeacasElement>;
|
|
11
|
+
}>(data: T): T["content"];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ElementDefinition, Element, ElementMap } from "../typings";
|
|
2
|
+
export declare class BlockManager {
|
|
3
|
+
static registerBlocks(blocks: Array<ElementDefinition<any>>): void;
|
|
4
|
+
static getBlockByType<T extends Element["type"]>(type: T): ElementMap[T];
|
|
5
|
+
static getBlocks(): (ElementDefinition<import("../typings").PageElement> | ElementDefinition<import("../typings").HeroElement> | ElementDefinition<import("../typings").WrapperElement> | ElementDefinition<import("../typings").SectionElement> | ElementDefinition<import("../typings").GroupElement> | ElementDefinition<import("../typings").ColumnElement> | ElementDefinition<import("../typings").TextElement> | ElementDefinition<import("../typings").ImageElement> | ElementDefinition<import("../typings").ButtonElement> | ElementDefinition<import("../typings").SpacerElement> | ElementDefinition<import("../typings").DividerElement> | ElementDefinition<import("../typings").SocialElement> | ElementDefinition<import("../typings").SocialItemElement> | ElementDefinition<import("../typings").NavbarElement> | ElementDefinition<import("../typings").NavbarLinkElement> | ElementDefinition<import("../typings").RawElement> | ElementDefinition<import("../typings").MergetagElement> | ElementDefinition<import("../typings").LineBreakElement> | ElementDefinition<import("../typings").PlaceholderElement> | ElementDefinition<import("../typings").HtmlNodeElement> | ElementDefinition<import("../typings").StandardHeroElement> | ElementDefinition<import("../typings").StandardDividerElement> | ElementDefinition<import("../typings").StandardWrapperElement> | ElementDefinition<import("../typings").StandardSectionElement> | ElementDefinition<import("../typings").StandardGroupElement> | ElementDefinition<import("../typings").StandardSocialElement> | ElementDefinition<import("../typings").StandardSocialItemElement> | ElementDefinition<import("../typings").StandardColumnElement> | ElementDefinition<import("../typings").StandardButtonElement> | ElementDefinition<import("../typings").StandardSpacerElement> | ElementDefinition<import("../typings").StandardImageElement> | ElementDefinition<import("../typings").StandardTextElement> | ElementDefinition<import("../typings").StandardNavbarElement> | ElementDefinition<import("../typings").StandardNavbarLinkElement> | ElementDefinition<import("../typings").StandardParagraphElement> | ElementDefinition<import("../typings").StandardH1Element> | ElementDefinition<import("../typings").StandardH2Element> | ElementDefinition<import("../typings").StandardH3Element> | ElementDefinition<import("../typings").StandardH4Element> | ElementDefinition<import("../typings").StandardTextListElement> | ElementDefinition<import("../typings").StandardTextListItemElement> | ElementDefinition<import("../typings").ForEachElement> | ElementDefinition<import("../typings").ShowElement>)[];
|
|
6
|
+
static getBlockTitle(blockData: Element): string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare class I18nManager {
|
|
3
|
+
static localeData: Record<string, string>;
|
|
4
|
+
static setLocaleData(localeData: Record<string, string>): void;
|
|
5
|
+
static translate(key: string, placeholder?: React.ReactNode): string;
|
|
6
|
+
private static translateDefault;
|
|
7
|
+
private static translateWithParams;
|
|
8
|
+
}
|
|
9
|
+
export declare const t: typeof I18nManager.translate;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ColumnElement, Element as ElementType, SectionElement, StandardTextListElement, TextElement, TextNode, ElementCategoryType, Element, GroupElement, PlaceholderElement, WrapperElement, SocialElement, PageElement, HeroElement, ImageElement, ButtonElement } from "../typings";
|
|
2
|
+
import type { Node } from "slate";
|
|
3
|
+
export declare class NodeUtils {
|
|
4
|
+
static getPageIdx(): string;
|
|
5
|
+
static getUniversalElementsIdx(appId: string): string;
|
|
6
|
+
static getChildIdx(idx: string, index: number): string;
|
|
7
|
+
static getNodeIdxClassName(idx: string): string;
|
|
8
|
+
static getParentIdx(idx: string): string;
|
|
9
|
+
static isVoidBlockElement(node: TextNode | Node): boolean;
|
|
10
|
+
static isUnsetElement(node: TextNode | Node): boolean;
|
|
11
|
+
static isTextNode(node: TextNode | Node): node is TextNode;
|
|
12
|
+
static isElement(node: TextNode | Node): node is ElementType;
|
|
13
|
+
static isBlockElement(node: TextNode | Node): node is ElementType;
|
|
14
|
+
static isUniversalElement(node: TextNode | Node): node is ElementType & {
|
|
15
|
+
uid: string;
|
|
16
|
+
};
|
|
17
|
+
static isInlineElement(node: TextNode | Node): node is ElementType;
|
|
18
|
+
static isMergetagElement(node: TextNode | Node): node is ElementType;
|
|
19
|
+
static isContentElementCategory: (type: ElementCategoryType) => boolean;
|
|
20
|
+
static isPageElement: (node: Node | TextNode) => node is PageElement;
|
|
21
|
+
static isSectionElement: (node: TextNode | Node) => node is SectionElement;
|
|
22
|
+
static isHeroElement: (node: TextNode | Node) => node is HeroElement;
|
|
23
|
+
static isButtonElement: (node: TextNode | Node) => node is ButtonElement;
|
|
24
|
+
static isImageElement: (node: TextNode | Node) => node is ImageElement;
|
|
25
|
+
static isSocialElement: (node: TextNode | Node) => node is SocialElement;
|
|
26
|
+
static isWrapperElement: (node: TextNode | Node) => node is WrapperElement;
|
|
27
|
+
static isGroupElement: (node: TextNode | Node) => node is GroupElement;
|
|
28
|
+
static isColumnElement: (node: TextNode | Node) => node is ColumnElement;
|
|
29
|
+
static isContentElement: (node: TextNode | Node) => node is ElementType;
|
|
30
|
+
static isTextElement: (node: TextNode | Node) => node is TextElement;
|
|
31
|
+
static isPlaceholderElement: (node: TextNode | Node) => node is PlaceholderElement;
|
|
32
|
+
static isTextListElement: (node: TextNode | Node) => node is StandardTextListElement;
|
|
33
|
+
static isTextListItemElement: (node: TextNode | Node) => node is StandardTextListElement;
|
|
34
|
+
static isMergeTag(value: string): boolean;
|
|
35
|
+
static isParentCategory(cat: ElementCategoryType, parentCat: ElementCategoryType): boolean;
|
|
36
|
+
static isParentCategoryType(childType: Element["type"], parentType: Element["type"]): boolean;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function classnames(...rest: any[]): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ElementDefinition, Element } from "../typings";
|
|
2
|
+
export declare function createBlock<T extends Element>(block: ElementDefinition<T>): ElementDefinition<T>;
|
|
3
|
+
export declare function createCustomBlock<T extends Element>(block: ElementDefinition<T> & {
|
|
4
|
+
void: boolean;
|
|
5
|
+
}): ElementDefinition<T>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Element, ElementDefinition } from "..";
|
|
2
|
+
export declare function getAdapterAttributesString(params: {
|
|
3
|
+
node: {
|
|
4
|
+
attributes: Parameters<ElementDefinition["render"]>[0]["node"]["attributes"];
|
|
5
|
+
type: Element["type"];
|
|
6
|
+
};
|
|
7
|
+
}, options?: {
|
|
8
|
+
keepEmptyAttributes?: boolean;
|
|
9
|
+
removeDefaultAttributes?: boolean;
|
|
10
|
+
}): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./classnames";
|
|
2
|
+
export * from "./createBlock";
|
|
3
|
+
export * from "./mergeBlock";
|
|
4
|
+
export * from "./I18nManager";
|
|
5
|
+
export * from "./BlockManager";
|
|
6
|
+
export * from "./NodeUtils";
|
|
7
|
+
export * from "./BeacasCore";
|
|
8
|
+
export * from "./plugins";
|
|
9
|
+
export * from "./getAdapterAttributesString";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Element, PageElement } from "../typings";
|
|
2
|
+
export type JsonToMjmlOption = {
|
|
3
|
+
element: Element;
|
|
4
|
+
pageElement?: PageElement;
|
|
5
|
+
mode: "testing" | "production";
|
|
6
|
+
beautify?: boolean;
|
|
7
|
+
universalElements?: {
|
|
8
|
+
elements: Record<string, Element>;
|
|
9
|
+
};
|
|
10
|
+
displayMode?: "desktop-mobile" | "only-desktop" | "only-mobile";
|
|
11
|
+
keepEmptyAttributes?: boolean;
|
|
12
|
+
idx?: string;
|
|
13
|
+
mergetagsData?: Record<string, any>;
|
|
14
|
+
};
|
|
15
|
+
export declare const isProductionMode: (option: JsonToMjmlOption) => boolean;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Element, LogicCondition, LogicIteration, PageElement } from "../../typings";
|
|
2
|
+
export declare enum PluginType {
|
|
3
|
+
RESPONSIVE = "RESPONSIVE",
|
|
4
|
+
TEMPLATE_ENGINE = "TEMPLATE_ENGINE"
|
|
5
|
+
}
|
|
6
|
+
export declare abstract class ResponsivePlugin {
|
|
7
|
+
static type: PluginType;
|
|
8
|
+
enabledResponsive: boolean;
|
|
9
|
+
abstract generateResponsive(params: {
|
|
10
|
+
node: Element;
|
|
11
|
+
mode: "testing" | "production";
|
|
12
|
+
context: {
|
|
13
|
+
content: PageElement;
|
|
14
|
+
};
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
displayMode: "only-desktop" | "only-mobile" | "desktop-mobile" | undefined;
|
|
17
|
+
keepEmptyAttributes: boolean;
|
|
18
|
+
mergetagsData?: Record<string, any>;
|
|
19
|
+
idx?: string | null | undefined;
|
|
20
|
+
desktopContent: React.ReactNode;
|
|
21
|
+
}): React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare abstract class TemplateEnginePlugin {
|
|
24
|
+
static type: PluginType;
|
|
25
|
+
abstract generateIterationTemplate(option: LogicIteration, content: React.ReactNode): React.ReactNode;
|
|
26
|
+
abstract generateConditionTemplate(option: LogicCondition | string, content: React.ReactNode, fallback?: React.ReactNode): React.ReactNode;
|
|
27
|
+
abstract generateVariable(variable: string, defaultValue?: string): string;
|
|
28
|
+
abstract renderWithData(html: string, data: Record<string, any>): string;
|
|
29
|
+
}
|
|
30
|
+
export declare abstract class ElementPlugin {
|
|
31
|
+
abstract generateElement(): void;
|
|
32
|
+
}
|
|
33
|
+
type Plugin = ResponsivePlugin | TemplateEnginePlugin | ElementPlugin;
|
|
34
|
+
export declare class PluginManager {
|
|
35
|
+
static enabledResponsive: boolean;
|
|
36
|
+
static generateResponsive: ResponsivePlugin["generateResponsive"];
|
|
37
|
+
static generateIterationTemplate: TemplateEnginePlugin["generateIterationTemplate"];
|
|
38
|
+
static generateConditionTemplate: TemplateEnginePlugin["generateConditionTemplate"];
|
|
39
|
+
static generateVariable: TemplateEnginePlugin["generateVariable"];
|
|
40
|
+
static renderWithData: TemplateEnginePlugin["renderWithData"];
|
|
41
|
+
static registerPlugin(Plug: new () => Plugin): void;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LogicCondition, LogicIteration } from "../../typings";
|
|
2
|
+
import { TemplateEnginePlugin } from "./PluginManager";
|
|
3
|
+
import React from "react";
|
|
4
|
+
export declare class TemplateEngine extends TemplateEnginePlugin {
|
|
5
|
+
generateIterationTemplate(option: LogicIteration, content: React.ReactNode): React.ReactNode;
|
|
6
|
+
generateConditionTemplate(option: LogicCondition | string, content: React.ReactNode, fallback?: React.ReactNode): React.ReactNode;
|
|
7
|
+
generateVariable(variable: string, defaultValue?: string): string;
|
|
8
|
+
renderWithData(html: string, data: Record<string, any>): string;
|
|
9
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "easy-email-pro-core",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"files": [
|
|
6
|
+
"lib"
|
|
7
|
+
],
|
|
8
|
+
"main": "lib/index.cjs.js",
|
|
9
|
+
"module": "lib/index.es.js",
|
|
10
|
+
"types": "lib/typings/index.d.ts",
|
|
11
|
+
"keywords": [],
|
|
12
|
+
"author": "",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@types/crypto-js": "^4.1.1",
|
|
15
|
+
"@types/gif.js": "^0.2.2",
|
|
16
|
+
"axios": "^1.4.0",
|
|
17
|
+
"crypto-js": "^4.1.1",
|
|
18
|
+
"dayjs": "^1.11.7",
|
|
19
|
+
"gif.js": "^0.2.0",
|
|
20
|
+
"he": "^1.2.0",
|
|
21
|
+
"js-beautify": "^1.14.7",
|
|
22
|
+
"liquidjs": "^10.4.0",
|
|
23
|
+
"lodash": "^4.17.21"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": "^18.2.0",
|
|
27
|
+
"react-dom": "^18.2.0"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "vite build && npm run typings",
|
|
31
|
+
"typings": "tsc --declaration --emitDeclarationOnly --project tsconfig.json && tsc-alias",
|
|
32
|
+
"lint": "eslint --fix --ext .tsx,.ts src/"
|
|
33
|
+
}
|
|
34
|
+
}
|