@thanhpv102/easy-email-editor 4.19.5 → 4.19.7
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/components/Provider/EditorConfigProvider/index.d.ts +25 -0
- package/lib/components/Provider/FocusBlockLayoutProvider/index.d.ts +1 -0
- package/lib/components/Provider/PropsProvider/index.d.ts +4 -0
- package/lib/hooks/useFocusBlockLayout.d.ts +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2807 -2737
- package/lib/index.js.map +1 -1
- package/lib/utils/getImg.d.ts +2 -0
- package/lib/utils/getValidPortalNode.d.ts +5 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/isTableBlock.d.ts +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type MergeTagsType = Record<string, any>;
|
|
3
|
+
export interface EditorRuntimeConfig {
|
|
4
|
+
dashed?: boolean;
|
|
5
|
+
compact?: boolean;
|
|
6
|
+
mergeTags?: MergeTagsType;
|
|
7
|
+
socialIcons?: Array<{
|
|
8
|
+
content: string;
|
|
9
|
+
image: string;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
export interface EditorConfigContextValue {
|
|
13
|
+
runtimeConfig: EditorRuntimeConfig;
|
|
14
|
+
setRuntimeConfig: (config: Partial<EditorRuntimeConfig>) => void;
|
|
15
|
+
isConfigOpen: boolean;
|
|
16
|
+
openConfig: () => void;
|
|
17
|
+
closeConfig: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const EditorConfigContext: React.Context<EditorConfigContextValue>;
|
|
20
|
+
export declare const EditorConfigProvider: React.FC<{
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
initialConfig?: EditorRuntimeConfig;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function useEditorConfig(): EditorConfigContextValue;
|
|
25
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const FocusBlockLayoutContext: React.Context<{
|
|
3
3
|
focusBlockNode: HTMLElement | null;
|
|
4
|
+
focusBlockPortalNode: HTMLElement | null;
|
|
4
5
|
}>;
|
|
5
6
|
export declare const FocusBlockLayoutProvider: React.FC<{
|
|
6
7
|
children?: React.ReactNode;
|
|
@@ -64,6 +64,10 @@ export interface PropsProviderProps {
|
|
|
64
64
|
onBeforePreview?: (html: string, mergeTags: PropsProviderProps['previewInjectData'] | PropsProviderProps['mergeTags']) => string | Promise<string>;
|
|
65
65
|
enabledLogic?: boolean;
|
|
66
66
|
locale?: Record<string, string>;
|
|
67
|
+
enableAssetManager?: boolean;
|
|
68
|
+
toggleAssetManager?: (isOpen: boolean) => void;
|
|
69
|
+
selectedAsset?: string;
|
|
70
|
+
onSelectAssetManager?: () => Promise<string>;
|
|
67
71
|
toolbar?: {
|
|
68
72
|
tools?: AvailableTools[];
|
|
69
73
|
suffix?: (execCommand: (cmd: string, value?: any) => void) => React.ReactNode;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './components/Provider/EmailEditorProvider';
|
|
2
2
|
export { BlockAvatarWrapper } from './components/wrapper';
|
|
3
3
|
export { EmailEditor } from './components/EmailEditor';
|
|
4
|
+
export { EditorConfigProvider, useEditorConfig } from './components/Provider/EditorConfigProvider';
|
|
5
|
+
export type { EditorRuntimeConfig, EditorConfigContextValue } from './components/Provider/EditorConfigProvider';
|
|
4
6
|
export { EditEmailPreview } from './components/EmailEditor/components/EditEmailPreview';
|
|
5
7
|
export { MobileEmailPreview } from './components/EmailEditor/components/MobileEmailPreview';
|
|
6
8
|
export { DesktopEmailPreview } from './components/EmailEditor/components/DesktopEmailPreview';
|