@limetech/lime-elements 39.5.0 → 39.5.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.
@@ -16,4 +16,33 @@ import { Email } from './email-viewer.types';
16
16
  * @returns A simplified `Email` object for rendering.
17
17
  */
18
18
  export declare function loadEmail(url: string): Promise<Email>;
19
+ declare function extractAttachments(email: any): {
20
+ attachments: Email['attachments'];
21
+ cidUrlById: Map<string, string>;
22
+ };
23
+ /**
24
+ * Normalizes a Content-ID by removing surrounding angle brackets.
25
+ *
26
+ * Example: `<image@id>` -> `image@id`
27
+ *
28
+ * @param contentId - The Content-ID to normalize, optionally surrounded by angle brackets.
29
+ */
30
+ declare function normalizeContentId(contentId?: string): string;
31
+ declare function replaceCidReferences(html: string, cidUrlById: Map<string, string>): string;
32
+ declare function decodeCidReference(cid: string): string;
33
+ declare function getAttachmentBytes(content: unknown): Uint8Array | undefined;
34
+ declare function resolveDataUrlMimeType(mimeType: unknown, bytes: Uint8Array, filename?: string): string;
35
+ declare function detectImageMimeTypeFromBytes(bytes: Uint8Array): string | undefined;
36
+ declare function detectImageMimeTypeFromFilename(filename?: string): string | undefined;
37
+ export declare const emailLoaderHelpers: {
38
+ normalizeContentId: typeof normalizeContentId;
39
+ decodeCidReference: typeof decodeCidReference;
40
+ replaceCidReferences: typeof replaceCidReferences;
41
+ getAttachmentBytes: typeof getAttachmentBytes;
42
+ detectImageMimeTypeFromBytes: typeof detectImageMimeTypeFromBytes;
43
+ detectImageMimeTypeFromFilename: typeof detectImageMimeTypeFromFilename;
44
+ resolveDataUrlMimeType: typeof resolveDataUrlMimeType;
45
+ extractAttachments: typeof extractAttachments;
46
+ };
47
+ export {};
19
48
  //# sourceMappingURL=email-loader.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "39.5.0",
3
+ "version": "39.5.1",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",