easy-email-pro-core 1.2.2 → 1.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.
@@ -0,0 +1,4 @@
1
+ import { Element } from "..";
2
+ export declare const SlateNodePlaceholder: ({ node }: {
3
+ node: Element;
4
+ }) => JSX.Element;
@@ -2,4 +2,4 @@ export * from "./BlockRenderer";
2
2
  export * from "./BasicBlock";
3
3
  export * from "./ContentLeaf";
4
4
  export * from "./Elements";
5
- export * from "./ContentEditableBlock";
5
+ export * from "./SlateNodePlaceholder";
@@ -1 +1,2 @@
1
1
  export declare const CONTENT_EDITABLE_CLASSNAME = "easy_email_pro_preview_content_editable";
2
+ export declare const SLATE_NODE_PLACEHOLDER_CLASSNAME = "easy_email_pro_slate_node_placeholder";
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import { ElementCategoryType, PageElement } from "./element";
3
3
  import { Element, PickObjectValueByKey } from "./custom-types";
4
4
  import { RecursivePartial } from "./helper";
5
+ import { EmailRenderProps } from "../utils/EditorCore/contexts/EmailRenderContext";
5
6
  export * from "./element";
6
7
  export * from "./custom-types";
7
8
  export * from "./element-logic";
@@ -25,6 +26,7 @@ export type ElementDefinition<T extends Element = Element> = {
25
26
  idx?: string | null;
26
27
  keepEmptyAttributes: boolean;
27
28
  mergetagsData?: Record<string, any>;
29
+ displayMode: EmailRenderProps["displayMode"];
28
30
  }) => React.ReactNode;
29
31
  };
30
32
  export type ElementMap = {
@@ -1,7 +1,7 @@
1
1
  import { PageElement } from "../../../typings";
2
2
  import type { JsonToMjmlOption } from "../../../utils/isProductionMode";
3
3
  import React from "react";
4
- type EmailRenderInputProps = {
4
+ export type EmailRenderInputProps = {
5
5
  mode: JsonToMjmlOption["mode"];
6
6
  context: {
7
7
  content: PageElement;
@@ -12,11 +12,10 @@ type EmailRenderInputProps = {
12
12
  mergetagsData?: Record<string, any>;
13
13
  attributesVariables?: Record<string, any>;
14
14
  };
15
- type EmailRenderProps = EmailRenderInputProps & {
15
+ export type EmailRenderProps = EmailRenderInputProps & {
16
16
  pageVariables: Record<string, any>;
17
17
  };
18
18
  export declare const useEmailRenderContext: () => EmailRenderProps;
19
19
  export declare const EmailRenderProvider: React.FC<EmailRenderInputProps & {
20
20
  children: React.ReactNode;
21
21
  }>;
22
- export {};
@@ -24,6 +24,7 @@ export declare class NodeUtils {
24
24
  static isImageElement: (node: TextNode | Node) => node is ImageElement;
25
25
  static isSocialElement: (node: TextNode | Node) => node is SocialElement;
26
26
  static isWrapperElement: (node: TextNode | Node) => node is WrapperElement;
27
+ static isRawElement: (node: TextNode | Node) => node is GroupElement;
27
28
  static isGroupElement: (node: TextNode | Node) => node is GroupElement;
28
29
  static isColumnElement: (node: TextNode | Node) => node is ColumnElement;
29
30
  static isContentElement: (node: TextNode | Node) => node is ElementType;
@@ -1,10 +1 @@
1
- import { LogicCondition, LogicIteration } from "../../typings";
2
- import React from "react";
3
- import { TemplateEnginePlugin } from "./PluginManager";
4
- export declare class VelocityTemplateEngine 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
- isVariable(value: string): boolean;
9
- renderWithData(html: string, data: Record<string, any>): string;
10
- }
1
+ export {};
@@ -1,4 +1,3 @@
1
1
  export * from "./PluginManager";
2
2
  export * from "./TemplateEngine";
3
3
  export * from "./Responsive";
4
- export * from "./VelocityTemplateEngine";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-core",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"
@@ -1,4 +0,0 @@
1
- import { TextElement } from "..";
2
- export declare const ContentEditableBlock: ({ node }: {
3
- node: TextElement;
4
- }) => JSX.Element;