@blocknote/xl-email-exporter 0.34.0 → 0.36.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/LICENSE +674 -373
- package/dist/blocknote-xl-email-exporter.js +443 -208
- package/dist/blocknote-xl-email-exporter.js.map +1 -1
- package/dist/blocknote-xl-email-exporter.umd.cjs +1 -1
- package/dist/blocknote-xl-email-exporter.umd.cjs.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +4 -4
- package/src/react-email/__snapshots__/reactEmailExporter.test.tsx.snap +17 -17
- package/src/react-email/defaultSchema/blocks.tsx +230 -28
- package/src/react-email/defaultSchema/index.ts +71 -3
- package/src/react-email/defaultSchema/inlinecontent.tsx +21 -5
- package/src/react-email/defaultSchema/styles.tsx +28 -10
- package/src/react-email/reactEmailExporter.tsx +26 -7
- package/types/src/react-email/defaultSchema/blocks.d.ts +632 -4
- package/types/src/react-email/defaultSchema/index.d.ts +16 -0
- package/types/src/react-email/defaultSchema/inlinecontent.d.ts +66 -3
- package/types/src/react-email/defaultSchema/styles.d.ts +54 -1
- package/types/src/react-email/reactEmailExporter.d.ts +6 -0
|
@@ -1,4 +1,67 @@
|
|
|
1
|
-
import { DefaultInlineContentSchema, DefaultStyleSchema } from "@blocknote/core";
|
|
2
|
-
import { InlineContentMapping } from "@blocknote/core/src/exporter/mapping.js";
|
|
1
|
+
import { DefaultInlineContentSchema, DefaultStyleSchema, InlineContentMapping } from "@blocknote/core";
|
|
3
2
|
import { Link } from "@react-email/components";
|
|
4
|
-
export
|
|
3
|
+
export interface ReactEmailLinkStyles {
|
|
4
|
+
link?: Partial<React.ComponentPropsWithoutRef<typeof Link>>;
|
|
5
|
+
}
|
|
6
|
+
export declare const defaultReactEmailLinkStyles: ReactEmailLinkStyles;
|
|
7
|
+
export declare const createReactEmailInlineContentMappingForDefaultSchema: (linkStyles?: ReactEmailLinkStyles) => InlineContentMapping<DefaultInlineContentSchema, DefaultStyleSchema, React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>, React.ReactElement<HTMLSpanElement>>;
|
|
8
|
+
export declare const reactEmailInlineContentMappingForDefaultSchema: InlineContentMapping<import("@blocknote/core").InlineContentSchemaFromSpecs<{
|
|
9
|
+
text: {
|
|
10
|
+
config: "text";
|
|
11
|
+
implementation: any;
|
|
12
|
+
};
|
|
13
|
+
link: {
|
|
14
|
+
config: "link";
|
|
15
|
+
implementation: any;
|
|
16
|
+
};
|
|
17
|
+
}>, import("@blocknote/core").StyleSchemaFromSpecs<{
|
|
18
|
+
bold: {
|
|
19
|
+
config: {
|
|
20
|
+
type: string;
|
|
21
|
+
propSchema: "boolean";
|
|
22
|
+
};
|
|
23
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
24
|
+
};
|
|
25
|
+
italic: {
|
|
26
|
+
config: {
|
|
27
|
+
type: string;
|
|
28
|
+
propSchema: "boolean";
|
|
29
|
+
};
|
|
30
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
31
|
+
};
|
|
32
|
+
underline: {
|
|
33
|
+
config: {
|
|
34
|
+
type: string;
|
|
35
|
+
propSchema: "boolean";
|
|
36
|
+
};
|
|
37
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
38
|
+
};
|
|
39
|
+
strike: {
|
|
40
|
+
config: {
|
|
41
|
+
type: string;
|
|
42
|
+
propSchema: "boolean";
|
|
43
|
+
};
|
|
44
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
45
|
+
};
|
|
46
|
+
code: {
|
|
47
|
+
config: {
|
|
48
|
+
type: string;
|
|
49
|
+
propSchema: "boolean";
|
|
50
|
+
};
|
|
51
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
52
|
+
};
|
|
53
|
+
textColor: {
|
|
54
|
+
config: {
|
|
55
|
+
type: string;
|
|
56
|
+
propSchema: "string";
|
|
57
|
+
};
|
|
58
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
59
|
+
};
|
|
60
|
+
backgroundColor: {
|
|
61
|
+
config: {
|
|
62
|
+
type: string;
|
|
63
|
+
propSchema: "string";
|
|
64
|
+
};
|
|
65
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
66
|
+
};
|
|
67
|
+
}>, import("react").ReactElement<import("react").ForwardRefExoticComponent<Readonly<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">> & import("react").RefAttributes<HTMLAnchorElement>>, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<HTMLSpanElement, string | import("react").JSXElementConstructor<any>>, import("react").ReactElement<HTMLSpanElement, string | import("react").JSXElementConstructor<any>>>;
|
|
@@ -1,3 +1,56 @@
|
|
|
1
1
|
import { DefaultStyleSchema, StyleMapping } from "@blocknote/core";
|
|
2
2
|
import { CSSProperties } from "react";
|
|
3
|
-
export
|
|
3
|
+
export type ReactEmailStyleTransformStyles = Record<string, never>;
|
|
4
|
+
export declare const defaultReactEmailStyleTransformStyles: ReactEmailStyleTransformStyles;
|
|
5
|
+
export declare const createReactEmailStyleMappingForDefaultSchema: (_styleTransformStyles?: ReactEmailStyleTransformStyles) => StyleMapping<DefaultStyleSchema, CSSProperties>;
|
|
6
|
+
export declare const reactEmailStyleMappingForDefaultSchema: StyleMapping<import("@blocknote/core").StyleSchemaFromSpecs<{
|
|
7
|
+
bold: {
|
|
8
|
+
config: {
|
|
9
|
+
type: string;
|
|
10
|
+
propSchema: "boolean";
|
|
11
|
+
};
|
|
12
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
13
|
+
};
|
|
14
|
+
italic: {
|
|
15
|
+
config: {
|
|
16
|
+
type: string;
|
|
17
|
+
propSchema: "boolean";
|
|
18
|
+
};
|
|
19
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
20
|
+
};
|
|
21
|
+
underline: {
|
|
22
|
+
config: {
|
|
23
|
+
type: string;
|
|
24
|
+
propSchema: "boolean";
|
|
25
|
+
};
|
|
26
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
27
|
+
};
|
|
28
|
+
strike: {
|
|
29
|
+
config: {
|
|
30
|
+
type: string;
|
|
31
|
+
propSchema: "boolean";
|
|
32
|
+
};
|
|
33
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
34
|
+
};
|
|
35
|
+
code: {
|
|
36
|
+
config: {
|
|
37
|
+
type: string;
|
|
38
|
+
propSchema: "boolean";
|
|
39
|
+
};
|
|
40
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
41
|
+
};
|
|
42
|
+
textColor: {
|
|
43
|
+
config: {
|
|
44
|
+
type: string;
|
|
45
|
+
propSchema: "string";
|
|
46
|
+
};
|
|
47
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
48
|
+
};
|
|
49
|
+
backgroundColor: {
|
|
50
|
+
config: {
|
|
51
|
+
type: string;
|
|
52
|
+
propSchema: "string";
|
|
53
|
+
};
|
|
54
|
+
implementation: import("@blocknote/core").StyleImplementation;
|
|
55
|
+
};
|
|
56
|
+
}>, CSSProperties>;
|
|
@@ -31,6 +31,12 @@ export declare class ReactEmailExporter<B extends BlockSchema, S extends StyleSc
|
|
|
31
31
|
* @see https://react.email/components
|
|
32
32
|
*/
|
|
33
33
|
footer?: React.ReactElement;
|
|
34
|
+
/**
|
|
35
|
+
* Customize the container element
|
|
36
|
+
*/
|
|
37
|
+
container?: React.FC<{
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
}>;
|
|
34
40
|
}): Promise<string>;
|
|
35
41
|
protected blocknoteDefaultPropsToReactEmailStyle(props: Partial<DefaultProps>): any;
|
|
36
42
|
}
|