@qwanyx/stack 0.2.14 → 0.2.16
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/client/MailClient.d.ts +28 -1
- package/dist/components/SelectableList.d.ts +26 -0
- package/dist/index.cjs.js +39 -12
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +4460 -1154
- package/dist/types/index.d.ts +2 -0
- package/package.json +4 -2
|
@@ -84,7 +84,7 @@ export declare class MailClient {
|
|
|
84
84
|
*/
|
|
85
85
|
listEmailsSorted(accountId: string, folder?: string, limit?: number): Promise<MailListResult>;
|
|
86
86
|
/**
|
|
87
|
-
* Get a single email by UID with full body content
|
|
87
|
+
* Get a single email by UID with full body content (server-side parsing)
|
|
88
88
|
*/
|
|
89
89
|
getEmail(accountId: string, uid: number, folder?: string): Promise<{
|
|
90
90
|
uid: number;
|
|
@@ -94,6 +94,33 @@ export declare class MailClient {
|
|
|
94
94
|
body: string;
|
|
95
95
|
seen: boolean;
|
|
96
96
|
} | null>;
|
|
97
|
+
/**
|
|
98
|
+
* Get email with client-side parsing using postal-mime
|
|
99
|
+
* This handles CID embedded images by converting them to base64 data URIs
|
|
100
|
+
*/
|
|
101
|
+
getEmailParsed(accountId: string, uid: number, folder?: string): Promise<{
|
|
102
|
+
uid: number;
|
|
103
|
+
from: string;
|
|
104
|
+
subject: string;
|
|
105
|
+
date: string;
|
|
106
|
+
body: string;
|
|
107
|
+
html: string;
|
|
108
|
+
text: string;
|
|
109
|
+
seen: boolean;
|
|
110
|
+
attachments: Array<{
|
|
111
|
+
filename: string;
|
|
112
|
+
mimeType: string;
|
|
113
|
+
size: number;
|
|
114
|
+
}>;
|
|
115
|
+
} | null>;
|
|
116
|
+
/**
|
|
117
|
+
* Convert content (string | ArrayBuffer | Uint8Array) to base64 string
|
|
118
|
+
*/
|
|
119
|
+
private contentToBase64;
|
|
120
|
+
/**
|
|
121
|
+
* Get size of content (string | ArrayBuffer | Uint8Array)
|
|
122
|
+
*/
|
|
123
|
+
private getContentSize;
|
|
97
124
|
/**
|
|
98
125
|
* Send an email via SMTP
|
|
99
126
|
* Uses the email coprocessor which handles SMTP configuration
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SelectableList Component
|
|
3
|
+
* Multi-select list with navigation chevrons for preview
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface SelectableItem {
|
|
7
|
+
id: string;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface SelectableListProps<T extends SelectableItem> {
|
|
11
|
+
items: T[];
|
|
12
|
+
renderItem: (item: T, isSelected: boolean, isCurrent: boolean) => React.ReactNode;
|
|
13
|
+
onSelectionChange?: (selectedIds: string[]) => void;
|
|
14
|
+
onCurrentChange?: (currentItem: T | null, index: number) => void;
|
|
15
|
+
onAction?: (action: string, selectedItems: T[], currentItem: T | null) => void;
|
|
16
|
+
actions?: Array<{
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
icon?: string;
|
|
20
|
+
disabled?: (selectedItems: T[]) => boolean;
|
|
21
|
+
}>;
|
|
22
|
+
emptyMessage?: string;
|
|
23
|
+
showSelectAll?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function SelectableList<T extends SelectableItem>({ items, renderItem, onSelectionChange, onCurrentChange, onAction, actions, emptyMessage, showSelectAll, className, }: SelectableListProps<T>): import("react/jsx-runtime").JSX.Element;
|