@templatical/import-html 0.10.0 → 0.10.2
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/dist/index.d.ts +22 -21
- package/dist/index.js +895 -803
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/types.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Type definitions for the HTML email importer.
|
|
5
4
|
*/
|
|
@@ -11,35 +10,36 @@ type ConversionStatus = "converted" | "approximated" | "html-fallback" | "skippe
|
|
|
11
10
|
* A single entry in the import report.
|
|
12
11
|
*/
|
|
13
12
|
interface ImportReportEntry {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
/** The source HTML element tag name (e.g. "h1", "img", "table"). */
|
|
14
|
+
sourceTag: string;
|
|
15
|
+
/** The Templatical block type produced, or null if skipped. */
|
|
16
|
+
templaticalBlockType: string | null;
|
|
17
|
+
status: ConversionStatus;
|
|
18
|
+
note?: string;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* The full import report returned alongside the converted template.
|
|
23
22
|
*/
|
|
24
23
|
interface ImportReport {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
entries: ImportReportEntry[];
|
|
25
|
+
warnings: string[];
|
|
26
|
+
summary: {
|
|
27
|
+
total: number;
|
|
28
|
+
converted: number;
|
|
29
|
+
approximated: number;
|
|
30
|
+
htmlFallback: number;
|
|
31
|
+
skipped: number;
|
|
32
|
+
};
|
|
34
33
|
}
|
|
35
34
|
/**
|
|
36
35
|
* The result of an HTML import operation.
|
|
37
36
|
*/
|
|
38
37
|
interface ImportResult {
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
content: import("@templatical/types").TemplateContent;
|
|
39
|
+
report: ImportReport;
|
|
41
40
|
}
|
|
42
|
-
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/converter.d.ts
|
|
43
43
|
/**
|
|
44
44
|
* Converts an HTML email template to Templatical TemplateContent.
|
|
45
45
|
*
|
|
@@ -64,5 +64,6 @@ interface ImportResult {
|
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
66
|
declare function convertHtmlTemplate(html: string): ImportResult;
|
|
67
|
-
|
|
67
|
+
//#endregion
|
|
68
68
|
export { type ConversionStatus, type ImportReport, type ImportReportEntry, type ImportResult, convertHtmlTemplate };
|
|
69
|
+
//# sourceMappingURL=index.d.ts.map
|