easy-email-pro-editor 1.52.0 → 1.53.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.
@@ -1,10 +1,9 @@
1
1
  import React from "react";
2
2
  import { RenderElementProps } from "slate-react";
3
- import { Element, PageElement } from "easy-email-pro-core";
3
+ import { Element } from "easy-email-pro-core";
4
4
  export type BaseElementProps<T extends Element> = Omit<RenderElementProps, "element"> & {
5
5
  element: T;
6
6
  elementAttributes: T["attributes"];
7
- context: PageElement;
8
7
  placeholder?: React.ReactNode;
9
8
  isMobileActive: boolean;
10
9
  attributesVariables?: Record<string, any>;
@@ -1,10 +1,11 @@
1
- import { Element } from "easy-email-pro-core";
1
+ import { Element, PageElement } from "easy-email-pro-core";
2
2
  import { BaseElementProps } from "./BaseElement";
3
3
  import React from "react";
4
4
  declare const ElementMap: Record<string, React.FC<Omit<BaseElementProps<any>, "attributes"> & {
5
5
  attributes?: BaseElementProps<any>["attributes"] | undefined;
6
6
  }> | undefined>;
7
- export declare const MJMLElementRender: React.FC<Pick<BaseElementProps<Element>, "context" | "isMobileActive"> & {
7
+ export declare const MJMLElementRender: React.FC<Pick<BaseElementProps<Element>, "isMobileActive"> & {
8
8
  mjmlString: string;
9
+ context: PageElement;
9
10
  }>;
10
11
  export { ElementMap };
@@ -0,0 +1,13 @@
1
+ import { PageElement } from "easy-email-pro-core";
2
+ import React from "react";
3
+ export declare const PageElementContext: React.Context<{
4
+ context: PageElement;
5
+ }>;
6
+ export declare const PageElementContextProvider: ({ children, context: pageElement, isMobileActive, }: {
7
+ children: React.ReactElement;
8
+ context: PageElement;
9
+ isMobileActive: boolean;
10
+ }) => React.JSX.Element;
11
+ export declare const usePageElementContext: () => {
12
+ context: PageElement;
13
+ };
@@ -1,10 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { Element } from "easy-email-pro-core";
2
+ import { Element, PageElement } from "easy-email-pro-core";
3
3
  import { BaseElement, BaseElementProps } from "./BaseElement";
4
- export declare const useElement: <T extends Element>({ element, context, attributesVariables, defaultAttributes, allowedAttributes, getDefaultStyles, Com, isWrapperParent, ...rest }: Omit<import("slate-react").RenderElementProps, "element"> & {
4
+ export declare const useElement: <T extends Element>({ element, attributesVariables, defaultAttributes, allowedAttributes, getDefaultStyles, Com, isWrapperParent, ...rest }: Omit<import("slate-react").RenderElementProps, "element"> & {
5
5
  element: T;
6
6
  elementAttributes: T["attributes"];
7
- context: import("easy-email-pro-core").PageElement;
8
7
  placeholder?: import("react").ReactNode;
9
8
  isMobileActive: boolean;
10
9
  attributesVariables?: Record<string, any> | undefined;
@@ -14,6 +13,7 @@ export declare const useElement: <T extends Element>({ element, context, attribu
14
13
  getDefaultStyles?: ((attrs: T["attributes"]) => Record<string, any>) | undefined;
15
14
  Com: BaseElement<T>;
16
15
  isWrapperParent?: boolean | undefined;
16
+ context?: PageElement | undefined;
17
17
  }) => {
18
18
  attributes: T["attributes"];
19
19
  getHtmlAttributes: (attributes: Record<string, any> | string) => {};
@@ -96,6 +96,7 @@ export interface BasicEditorProps extends Partial<Pick<EditableProps, "onDOMBefo
96
96
  showPreviousLevelIcon?: boolean;
97
97
  showBlockPaths?: boolean;
98
98
  loadingElement?: React.ReactNode;
99
+ enabledAutoComplete?: boolean;
99
100
  handleUploadClick?: ({ onChange, accept, }: {
100
101
  onChange: (url: string) => void;
101
102
  accept?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-editor",
3
- "version": "1.52.0",
3
+ "version": "1.53.1",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes