@blocknote/xl-email-exporter 0.32.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 +373 -0
- package/dist/blocknote-xl-email-exporter.js +1097 -0
- package/dist/blocknote-xl-email-exporter.js.map +1 -0
- package/dist/blocknote-xl-email-exporter.umd.cjs +31 -0
- package/dist/blocknote-xl-email-exporter.umd.cjs.map +1 -0
- package/dist/webpack-stats.json +1 -0
- package/package.json +87 -0
- package/src/index.ts +1 -0
- package/src/react-email/__snapshots__/reactEmailExporter.test.tsx.snap +35 -0
- package/src/react-email/defaultSchema/blocks.tsx +350 -0
- package/src/react-email/defaultSchema/index.ts +9 -0
- package/src/react-email/defaultSchema/inlinecontent.tsx +26 -0
- package/src/react-email/defaultSchema/styles.tsx +61 -0
- package/src/react-email/index.ts +2 -0
- package/src/react-email/reactEmailExporter.test.tsx +780 -0
- package/src/react-email/reactEmailExporter.tsx +334 -0
- package/src/vite-env.d.ts +11 -0
- package/types/src/index.d.ts +1 -0
- package/types/src/react-email/defaultSchema/blocks.d.ts +4 -0
- package/types/src/react-email/defaultSchema/index.d.ts +654 -0
- package/types/src/react-email/defaultSchema/inlinecontent.d.ts +4 -0
- package/types/src/react-email/defaultSchema/styles.d.ts +3 -0
- package/types/src/react-email/index.d.ts +2 -0
- package/types/src/react-email/reactEmailExporter.d.ts +36 -0
- package/types/src/react-email/reactEmailExporter.test.d.ts +1 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Block, BlockNoteSchema, BlockSchema, DefaultProps, Exporter, ExporterOptions, InlineContentSchema, StyleSchema, StyledText } from "@blocknote/core";
|
|
2
|
+
import { Link } from "@react-email/components";
|
|
3
|
+
import React, { CSSProperties } from "react";
|
|
4
|
+
export declare class ReactEmailExporter<B extends BlockSchema, S extends StyleSchema, I extends InlineContentSchema> extends Exporter<B, I, S, React.ReactElement<any>, React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>, CSSProperties, React.ReactElement<HTMLSpanElement>> {
|
|
5
|
+
readonly schema: BlockNoteSchema<B, I, S>;
|
|
6
|
+
constructor(schema: BlockNoteSchema<B, I, S>, mappings: Exporter<NoInfer<B>, NoInfer<I>, NoInfer<S>, React.ReactElement<any>, React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>, CSSProperties, React.ReactElement<HTMLSpanElement>>["mappings"], options?: Partial<ExporterOptions>);
|
|
7
|
+
transformStyledText(styledText: StyledText<S>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
private renderGroupedListBlocks;
|
|
9
|
+
private renderNestedLists;
|
|
10
|
+
transformBlocks(blocks: Block<B, I, S>[], nestingLevel?: number): Promise<React.ReactElement<any>[]>;
|
|
11
|
+
toReactEmailDocument(blocks: Block<B, I, S>[], options?: {
|
|
12
|
+
/**
|
|
13
|
+
* Inject elements into the {@link Head} element
|
|
14
|
+
* @see https://react.email/docs/components/head
|
|
15
|
+
*/
|
|
16
|
+
head?: React.ReactElement;
|
|
17
|
+
/**
|
|
18
|
+
* Set the preview text for the email
|
|
19
|
+
* @see https://react.email/docs/components/preview
|
|
20
|
+
*/
|
|
21
|
+
preview?: string | string[];
|
|
22
|
+
/**
|
|
23
|
+
* Add a header to every page.
|
|
24
|
+
* The React component passed must be a React-Email component
|
|
25
|
+
* @see https://react.email/components
|
|
26
|
+
*/
|
|
27
|
+
header?: React.ReactElement;
|
|
28
|
+
/**
|
|
29
|
+
* Add a footer to every page.
|
|
30
|
+
* The React component passed must be a React-Email component
|
|
31
|
+
* @see https://react.email/components
|
|
32
|
+
*/
|
|
33
|
+
footer?: React.ReactElement;
|
|
34
|
+
}): Promise<string>;
|
|
35
|
+
protected blocknoteDefaultPropsToReactEmailStyle(props: Partial<DefaultProps>): any;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|