hanbiro-react16-sdk 1.0.27 → 1.0.28

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.
Files changed (45) hide show
  1. package/dist/components/ChatAIDraft/ChatList/LoadingDots.js +4 -3
  2. package/dist/components/ChatAIDraft/ChatList/MessageItem.js +4 -4
  3. package/dist/components/ChatAIDraft/ReplyPanel/BaseModal.d.ts +15 -0
  4. package/dist/components/ChatAIDraft/ReplyPanel/BaseModal.js +101 -0
  5. package/dist/components/ChatAIDraft/ReplyPanel/ContextPreviewModal.d.ts +13 -0
  6. package/dist/components/ChatAIDraft/ReplyPanel/ContextPreviewModal.js +63 -0
  7. package/dist/components/ChatAIDraft/ReplyPanel/EmptyState.d.ts +1 -8
  8. package/dist/components/ChatAIDraft/ReplyPanel/EmptyState.js +1 -217
  9. package/dist/components/ChatAIDraft/ReplyPanel/Header/SelectedChip.d.ts +10 -0
  10. package/dist/components/ChatAIDraft/ReplyPanel/Header/SelectedChip.js +79 -0
  11. package/dist/components/ChatAIDraft/ReplyPanel/Header/SourceCard.d.ts +8 -0
  12. package/dist/components/ChatAIDraft/ReplyPanel/Header/SourceCard.js +52 -0
  13. package/dist/components/ChatAIDraft/ReplyPanel/Header/index.d.ts +12 -0
  14. package/dist/components/ChatAIDraft/ReplyPanel/Header/index.js +135 -0
  15. package/dist/components/ChatAIDraft/ReplyPanel/MailListSelect.d.ts +1 -0
  16. package/dist/components/ChatAIDraft/ReplyPanel/MailListSelect.js +62 -149
  17. package/dist/components/ChatAIDraft/ReplyPanel/index.d.ts +5 -1
  18. package/dist/components/ChatAIDraft/ReplyPanel/index.js +35 -196
  19. package/dist/components/Pagination/index.d.ts +20 -0
  20. package/dist/components/Pagination/index.js +131 -0
  21. package/dist/components/SummaryAIEmails/FilterTabs.d.ts +8 -0
  22. package/dist/components/SummaryAIEmails/FilterTabs.js +57 -0
  23. package/dist/components/SummaryAIEmails/LanguagePopover.d.ts +24 -0
  24. package/dist/components/SummaryAIEmails/LanguagePopover.js +110 -0
  25. package/dist/components/SummaryAIEmails/SummaryItem.d.ts +7 -0
  26. package/dist/components/SummaryAIEmails/SummaryItem.js +74 -0
  27. package/dist/components/SummaryAIEmails/TargetInfoBar.d.ts +9 -0
  28. package/dist/components/SummaryAIEmails/TargetInfoBar.js +81 -0
  29. package/dist/components/SummaryAIEmails/index.d.ts +34 -0
  30. package/dist/components/SummaryAIEmails/index.js +213 -0
  31. package/dist/components/SummaryAIEmails/types.d.ts +16 -0
  32. package/dist/components/SummaryAIEmails/utils.d.ts +11 -0
  33. package/dist/components/SummaryAIEmails/utils.js +46 -0
  34. package/dist/components/index.d.ts +2 -4
  35. package/dist/hanbiro-react16-sdk.style.css +7 -2
  36. package/dist/hanbiro-react16-sdk.umd.js +1958 -965
  37. package/dist/index.js +11 -13
  38. package/dist/node_modules/react-feather/dist/icons/arrow-down.js +73 -0
  39. package/dist/node_modules/react-feather/dist/icons/chevron-left.js +68 -0
  40. package/dist/node_modules/react-feather/dist/icons/chevron-right.js +68 -0
  41. package/dist/node_modules/react-feather/dist/icons/globe.js +77 -0
  42. package/dist/node_modules/react-feather/dist/icons/x.js +76 -0
  43. package/dist/utils/index.d.ts +1 -1
  44. package/dist/utils/url.js +0 -13
  45. package/package.json +1 -1
@@ -9,11 +9,12 @@ const LoadingDots = ({
9
9
  alignItems: "center",
10
10
  gap: 6,
11
11
  background: "var(--background-softGrey)",
12
- borderRadius: 8,
13
- borderTopLeftRadius: 0,
12
+ borderRadius: 16,
13
+ borderTopLeftRadius: 4,
14
14
  padding: "8px 12px",
15
15
  fontSize: 13,
16
- color: "var(--text-secondary)"
16
+ color: "var(--text-secondary)",
17
+ width: "fit-content"
17
18
  }
18
19
  },
19
20
  /* @__PURE__ */ React.createElement("span", null, label),
@@ -61,8 +61,8 @@ const MessageItem = ({
61
61
  {
62
62
  data: { question: item.question },
63
63
  style: {
64
- borderRadius: 8,
65
- borderTopRightRadius: 0,
64
+ borderRadius: 12,
65
+ borderTopRightRadius: 4,
66
66
  padding: "8px 12px",
67
67
  background: "var(--primary-main)",
68
68
  color: "var(--primary-contrasttext)"
@@ -100,8 +100,8 @@ const MessageItem = ({
100
100
  data: { subject: item.subject, body: item.body },
101
101
  style: {
102
102
  background: "var(--background-softGrey)",
103
- borderRadius: 8,
104
- borderTopLeftRadius: 0,
103
+ borderRadius: 12,
104
+ borderTopLeftRadius: 4,
105
105
  padding: "8px 12px"
106
106
  }
107
107
  }
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ interface BaseModalProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ header?: React.ReactNode;
6
+ children?: React.ReactNode;
7
+ maxWidth?: number;
8
+ }
9
+ declare class BaseModal extends React.Component<BaseModalProps> {
10
+ componentDidMount(): void;
11
+ componentWillUnmount(): void;
12
+ handleKeyDown: (e: KeyboardEvent) => void;
13
+ render(): React.ReactPortal | null;
14
+ }
15
+ export default BaseModal;
@@ -0,0 +1,101 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import * as React from "react";
5
+ import * as ReactDOM from "react-dom";
6
+ import X from "../../../node_modules/react-feather/dist/icons/x.js";
7
+ class BaseModal extends React.Component {
8
+ constructor() {
9
+ super(...arguments);
10
+ __publicField(this, "handleKeyDown", (e) => {
11
+ if (e.key === "Escape" && this.props.isOpen) this.props.onClose();
12
+ });
13
+ }
14
+ componentDidMount() {
15
+ document.addEventListener("keydown", this.handleKeyDown);
16
+ }
17
+ componentWillUnmount() {
18
+ document.removeEventListener("keydown", this.handleKeyDown);
19
+ }
20
+ render() {
21
+ const { isOpen, onClose, header, children, maxWidth = 600 } = this.props;
22
+ if (!isOpen) return null;
23
+ return ReactDOM.createPortal(
24
+ /* @__PURE__ */ React.createElement(
25
+ "div",
26
+ {
27
+ onClick: onClose,
28
+ style: {
29
+ position: "fixed",
30
+ inset: 0,
31
+ background: "rgba(0, 0, 0, 0.1)",
32
+ display: "flex",
33
+ alignItems: "center",
34
+ justifyContent: "center",
35
+ zIndex: 1100,
36
+ padding: 16
37
+ }
38
+ },
39
+ /* @__PURE__ */ React.createElement(
40
+ "div",
41
+ {
42
+ onClick: (e) => e.stopPropagation(),
43
+ style: {
44
+ background: "#fff",
45
+ borderRadius: 12,
46
+ maxWidth,
47
+ width: "100%",
48
+ maxHeight: "80vh",
49
+ display: "flex",
50
+ flexDirection: "column",
51
+ boxShadow: "0 10px 40px rgba(0, 0, 0, 0.15)",
52
+ overflow: "hidden",
53
+ fontFamily: "inherit"
54
+ }
55
+ },
56
+ /* @__PURE__ */ React.createElement(
57
+ "div",
58
+ {
59
+ style: {
60
+ display: "flex",
61
+ alignItems: "flex-start",
62
+ gap: 8,
63
+ padding: "16px 16px 12px",
64
+ borderBottom: "1px solid var(--border-light)"
65
+ }
66
+ },
67
+ /* @__PURE__ */ React.createElement("div", { style: { flex: 1, minWidth: 0 } }, header),
68
+ /* @__PURE__ */ React.createElement(
69
+ "button",
70
+ {
71
+ type: "button",
72
+ onClick: onClose,
73
+ className: "icon-button small"
74
+ },
75
+ /* @__PURE__ */ React.createElement(X, { size: 16 })
76
+ )
77
+ ),
78
+ /* @__PURE__ */ React.createElement(
79
+ "div",
80
+ {
81
+ style: {
82
+ flex: 1,
83
+ minHeight: 0,
84
+ overflowY: "auto",
85
+ padding: 16,
86
+ fontSize: 13,
87
+ lineHeight: 1.6,
88
+ color: "var(--text-primary)"
89
+ }
90
+ },
91
+ children
92
+ )
93
+ )
94
+ ),
95
+ document.body
96
+ );
97
+ }
98
+ }
99
+ export {
100
+ BaseModal as default
101
+ };
@@ -0,0 +1,13 @@
1
+ import { ContextMail } from '../types';
2
+ import * as React from "react";
3
+ export type PreviewMode = "ai" | "html";
4
+ export interface PreviewState {
5
+ mail: ContextMail;
6
+ mode: PreviewMode;
7
+ }
8
+ interface ContextPreviewModalProps {
9
+ preview: PreviewState | null;
10
+ onClose: () => void;
11
+ }
12
+ declare const ContextPreviewModal: React.FunctionComponent<ContextPreviewModalProps>;
13
+ export default ContextPreviewModal;
@@ -0,0 +1,63 @@
1
+ import * as React from "react";
2
+ import { marked } from "../../../node_modules/marked/lib/marked.esm.js";
3
+ import BaseModal from "./BaseModal.js";
4
+ const renderMarkdown = (md) => {
5
+ try {
6
+ return marked.parse(md, { async: false });
7
+ } catch (e) {
8
+ return md;
9
+ }
10
+ };
11
+ const MailHeader = ({
12
+ mail
13
+ }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
14
+ "div",
15
+ {
16
+ style: {
17
+ fontSize: 14,
18
+ fontWeight: 600,
19
+ color: "var(--text-primary)",
20
+ whiteSpace: "nowrap",
21
+ overflow: "hidden",
22
+ textOverflow: "ellipsis"
23
+ }
24
+ },
25
+ mail.subject || "(no subject)"
26
+ ), /* @__PURE__ */ React.createElement(
27
+ "div",
28
+ {
29
+ style: {
30
+ fontSize: 12,
31
+ color: "var(--text-secondary)",
32
+ marginTop: 2,
33
+ whiteSpace: "nowrap",
34
+ overflow: "hidden",
35
+ textOverflow: "ellipsis"
36
+ }
37
+ },
38
+ mail.from_name,
39
+ mail.from_addr ? ` <${mail.from_addr}>` : "",
40
+ mail.date ? ` · ${mail.date}` : ""
41
+ ));
42
+ const ContextPreviewModal = ({ preview, onClose }) => {
43
+ const html = preview ? preview.mode === "html" ? preview.mail.contents || "" : renderMarkdown(preview.mail.ai_contents || "") : "";
44
+ return /* @__PURE__ */ React.createElement(
45
+ BaseModal,
46
+ {
47
+ isOpen: !!preview,
48
+ onClose,
49
+ header: preview && /* @__PURE__ */ React.createElement(MailHeader, { mail: preview.mail }),
50
+ maxWidth: (preview == null ? void 0 : preview.mode) === "html" ? 900 : 600
51
+ },
52
+ preview && /* @__PURE__ */ React.createElement(
53
+ "div",
54
+ {
55
+ className: "chat-ai-context-preview",
56
+ dangerouslySetInnerHTML: { __html: html }
57
+ }
58
+ )
59
+ );
60
+ };
61
+ export {
62
+ ContextPreviewModal as default
63
+ };
@@ -1,10 +1,3 @@
1
- import { ContextMail } from '../types';
2
1
  import * as React from "react";
3
- interface EmptyStateProps {
4
- sourceMail: ContextMail | null;
5
- selectedMails: ContextMail[];
6
- onAddClick: () => void;
7
- onRemoveSelected: (mid: string) => void;
8
- }
9
- declare const EmptyState: React.FunctionComponent<EmptyStateProps>;
2
+ declare const EmptyState: React.FunctionComponent;
10
3
  export default EmptyState;
@@ -1,7 +1,5 @@
1
1
  import * as React from "react";
2
2
  import CustomAiIcon from "../CustomAIIcon.js";
3
- import Lock from "../../../node_modules/react-feather/dist/icons/lock.js";
4
- import Plus from "../../../node_modules/react-feather/dist/icons/plus.js";
5
3
  import Mail from "../../../node_modules/react-feather/dist/icons/mail.js";
6
4
  import MessageCircle from "../../../node_modules/react-feather/dist/icons/message-circle.js";
7
5
  const FEATURES = [
@@ -21,122 +19,7 @@ const FEATURES = [
21
19
  desc: "Get an AI draft, then adjust freely with chips or messages."
22
20
  }
23
21
  ];
24
- const SourceCard = ({
25
- mail
26
- }) => /* @__PURE__ */ React.createElement(
27
- "div",
28
- {
29
- style: {
30
- border: "1px solid var(--border-light)",
31
- borderRadius: 8,
32
- padding: 10,
33
- display: "flex",
34
- gap: 8,
35
- alignItems: "flex-start",
36
- background: "#fff"
37
- }
38
- },
39
- /* @__PURE__ */ React.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React.createElement(
40
- "div",
41
- {
42
- style: {
43
- fontSize: 13,
44
- fontWeight: 600,
45
- color: "var(--text-primary)",
46
- whiteSpace: "nowrap",
47
- overflow: "hidden",
48
- textOverflow: "ellipsis"
49
- }
50
- },
51
- mail.subject || "(no subject)"
52
- ), /* @__PURE__ */ React.createElement(
53
- "div",
54
- {
55
- style: {
56
- fontSize: 12,
57
- color: "var(--text-secondary)",
58
- marginTop: 2,
59
- whiteSpace: "nowrap",
60
- overflow: "hidden",
61
- textOverflow: "ellipsis"
62
- }
63
- },
64
- mail.from_name,
65
- mail.from_addr ? ` <${mail.from_addr}>` : "",
66
- mail.date ? ` · ${mail.date}` : ""
67
- ))
68
- );
69
- const SelectedChip = ({ index, mail, onRemove }) => /* @__PURE__ */ React.createElement(
70
- "div",
71
- {
72
- style: {
73
- display: "inline-flex",
74
- alignItems: "center",
75
- gap: 6,
76
- padding: "6px 8px",
77
- borderRadius: 8,
78
- border: "1px solid var(--border-light)",
79
- background: "var(--primary-lighter)",
80
- fontSize: 12,
81
- maxWidth: 160
82
- }
83
- },
84
- /* @__PURE__ */ React.createElement(
85
- "span",
86
- {
87
- style: {
88
- width: 16,
89
- height: 16,
90
- borderRadius: "50%",
91
- background: "var(--primary-main)",
92
- color: "var(--primary-contrasttext)",
93
- fontSize: 10,
94
- fontWeight: 700,
95
- display: "inline-flex",
96
- alignItems: "center",
97
- justifyContent: "center",
98
- flexShrink: 0
99
- }
100
- },
101
- index + 1
102
- ),
103
- /* @__PURE__ */ React.createElement(
104
- "span",
105
- {
106
- style: {
107
- whiteSpace: "nowrap",
108
- overflow: "hidden",
109
- textOverflow: "ellipsis",
110
- color: "var(--text-primary)"
111
- }
112
- },
113
- mail.subject || "(no subject)"
114
- ),
115
- /* @__PURE__ */ React.createElement(
116
- "button",
117
- {
118
- type: "button",
119
- onClick: () => onRemove(mail.mid),
120
- style: {
121
- border: "none",
122
- background: "transparent",
123
- color: "var(--text-secondary)",
124
- cursor: "pointer",
125
- padding: 0,
126
- display: "inline-flex",
127
- alignItems: "center",
128
- flexShrink: 0
129
- }
130
- },
131
- "×"
132
- )
133
- );
134
- const EmptyState = ({
135
- sourceMail,
136
- selectedMails,
137
- onAddClick,
138
- onRemoveSelected
139
- }) => {
22
+ const EmptyState = () => {
140
23
  return /* @__PURE__ */ React.createElement(
141
24
  "div",
142
25
  {
@@ -152,105 +35,6 @@ const EmptyState = ({
152
35
  gap: 12
153
36
  }
154
37
  },
155
- sourceMail && /* @__PURE__ */ React.createElement("div", { style: { display: "flex", flexDirection: "column", gap: 6 } }, /* @__PURE__ */ React.createElement(
156
- "div",
157
- {
158
- style: {
159
- display: "flex",
160
- alignItems: "center",
161
- gap: 6,
162
- fontSize: 12,
163
- color: "var(--text-primary)",
164
- fontWeight: 600
165
- }
166
- },
167
- /* @__PURE__ */ React.createElement("span", null, "Source context"),
168
- /* @__PURE__ */ React.createElement(
169
- "span",
170
- {
171
- style: {
172
- background: "var(--primary-main)",
173
- color: "var(--primary-contrasttext)",
174
- fontSize: 10,
175
- padding: "1px 6px",
176
- borderRadius: 999,
177
- fontWeight: 600
178
- }
179
- },
180
- "1"
181
- ),
182
- /* @__PURE__ */ React.createElement(
183
- "span",
184
- {
185
- style: {
186
- display: "inline-flex",
187
- alignItems: "center",
188
- gap: 2,
189
- fontSize: 11,
190
- color: "var(--text-secondary)",
191
- fontWeight: 500
192
- }
193
- },
194
- /* @__PURE__ */ React.createElement(Lock, { size: 11 }),
195
- " Auto"
196
- )
197
- ), /* @__PURE__ */ React.createElement(SourceCard, { mail: sourceMail })),
198
- /* @__PURE__ */ React.createElement("div", { style: { display: "flex", flexDirection: "column", gap: 6 } }, /* @__PURE__ */ React.createElement(
199
- "div",
200
- {
201
- style: {
202
- display: "flex",
203
- alignItems: "center",
204
- justifyContent: "space-between"
205
- }
206
- },
207
- /* @__PURE__ */ React.createElement(
208
- "div",
209
- {
210
- style: {
211
- display: "flex",
212
- alignItems: "center",
213
- gap: 6,
214
- fontSize: 12,
215
- color: "var(--text-primary)",
216
- fontWeight: 600
217
- }
218
- },
219
- /* @__PURE__ */ React.createElement("span", null, "Selected context"),
220
- /* @__PURE__ */ React.createElement(
221
- "span",
222
- {
223
- style: {
224
- background: "var(--background-softGrey)",
225
- color: "var(--text-primary)",
226
- fontSize: 10,
227
- padding: "1px 6px",
228
- borderRadius: 999,
229
- fontWeight: 600
230
- }
231
- },
232
- selectedMails.length
233
- )
234
- ),
235
- /* @__PURE__ */ React.createElement(
236
- "button",
237
- {
238
- type: "button",
239
- onClick: onAddClick,
240
- className: "text-button primary"
241
- },
242
- /* @__PURE__ */ React.createElement(Plus, { size: 12 }),
243
- " Add"
244
- )
245
- ), selectedMails.length > 0 && /* @__PURE__ */ React.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: 6 } }, selectedMails.map((m, i) => /* @__PURE__ */ React.createElement(
246
- SelectedChip,
247
- {
248
- key: m.mid,
249
- index: i,
250
- mail: m,
251
- onRemove: onRemoveSelected
252
- }
253
- )))),
254
38
  /* @__PURE__ */ React.createElement("div", { style: { textAlign: "center", marginTop: 8 } }, /* @__PURE__ */ React.createElement(
255
39
  "div",
256
40
  {
@@ -0,0 +1,10 @@
1
+ import { ContextMail } from '../../types';
2
+ import * as React from "react";
3
+ interface SelectedChipProps {
4
+ index: number;
5
+ mail: ContextMail;
6
+ onClick: (mail: ContextMail) => void;
7
+ onRemove: (mid: string) => void;
8
+ }
9
+ declare const SelectedChip: React.FunctionComponent<SelectedChipProps>;
10
+ export default SelectedChip;
@@ -0,0 +1,79 @@
1
+ import * as React from "react";
2
+ const SelectedChip = ({
3
+ index,
4
+ mail,
5
+ onClick,
6
+ onRemove
7
+ }) => /* @__PURE__ */ React.createElement(
8
+ "div",
9
+ {
10
+ onClick: () => onClick(mail),
11
+ style: {
12
+ display: "inline-flex",
13
+ alignItems: "center",
14
+ gap: 6,
15
+ padding: "6px 8px",
16
+ borderRadius: 8,
17
+ border: "1px solid var(--border-light)",
18
+ background: "var(--primary-lighter)",
19
+ fontSize: 12,
20
+ maxWidth: 160,
21
+ cursor: "pointer"
22
+ }
23
+ },
24
+ /* @__PURE__ */ React.createElement(
25
+ "span",
26
+ {
27
+ style: {
28
+ width: 16,
29
+ height: 16,
30
+ borderRadius: "50%",
31
+ background: "var(--primary-main)",
32
+ color: "var(--primary-contrasttext)",
33
+ fontSize: 10,
34
+ fontWeight: 700,
35
+ display: "inline-flex",
36
+ alignItems: "center",
37
+ justifyContent: "center",
38
+ flexShrink: 0
39
+ }
40
+ },
41
+ index + 1
42
+ ),
43
+ /* @__PURE__ */ React.createElement(
44
+ "span",
45
+ {
46
+ style: {
47
+ whiteSpace: "nowrap",
48
+ overflow: "hidden",
49
+ textOverflow: "ellipsis",
50
+ color: "var(--text-primary)"
51
+ }
52
+ },
53
+ mail.subject || "(no subject)"
54
+ ),
55
+ /* @__PURE__ */ React.createElement(
56
+ "button",
57
+ {
58
+ type: "button",
59
+ onClick: (e) => {
60
+ e.stopPropagation();
61
+ onRemove(mail.mid);
62
+ },
63
+ style: {
64
+ border: "none",
65
+ background: "transparent",
66
+ color: "var(--text-secondary)",
67
+ cursor: "pointer",
68
+ padding: 0,
69
+ display: "inline-flex",
70
+ alignItems: "center",
71
+ flexShrink: 0
72
+ }
73
+ },
74
+ "×"
75
+ )
76
+ );
77
+ export {
78
+ SelectedChip as default
79
+ };
@@ -0,0 +1,8 @@
1
+ import { ContextMail } from '../../types';
2
+ import * as React from "react";
3
+ interface SourceCardProps {
4
+ mail: ContextMail;
5
+ onClick?: () => void;
6
+ }
7
+ declare const SourceCard: React.FunctionComponent<SourceCardProps>;
8
+ export default SourceCard;
@@ -0,0 +1,52 @@
1
+ import * as React from "react";
2
+ const SourceCard = ({
3
+ mail,
4
+ onClick
5
+ }) => /* @__PURE__ */ React.createElement(
6
+ "div",
7
+ {
8
+ onClick,
9
+ style: {
10
+ border: "1px solid var(--border-light)",
11
+ borderRadius: 8,
12
+ padding: 10,
13
+ display: "flex",
14
+ gap: 8,
15
+ alignItems: "flex-start",
16
+ background: "#fff",
17
+ cursor: onClick ? "pointer" : "default"
18
+ }
19
+ },
20
+ /* @__PURE__ */ React.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React.createElement(
21
+ "div",
22
+ {
23
+ style: {
24
+ fontSize: 13,
25
+ fontWeight: 600,
26
+ color: "var(--text-primary)",
27
+ whiteSpace: "nowrap",
28
+ overflow: "hidden",
29
+ textOverflow: "ellipsis"
30
+ }
31
+ },
32
+ mail.subject || "(no subject)"
33
+ ), /* @__PURE__ */ React.createElement(
34
+ "div",
35
+ {
36
+ style: {
37
+ fontSize: 12,
38
+ color: "var(--text-secondary)",
39
+ marginTop: 2,
40
+ whiteSpace: "nowrap",
41
+ overflow: "hidden",
42
+ textOverflow: "ellipsis"
43
+ }
44
+ },
45
+ mail.from_name,
46
+ mail.from_addr ? ` <${mail.from_addr}>` : "",
47
+ mail.date ? ` · ${mail.date}` : ""
48
+ ))
49
+ );
50
+ export {
51
+ SourceCard as default
52
+ };
@@ -0,0 +1,12 @@
1
+ import { ContextMail } from '../../types';
2
+ import * as React from "react";
3
+ interface ContextHeaderProps {
4
+ sourceMail: ContextMail | null;
5
+ selectedMails: ContextMail[];
6
+ onAddClick: () => void;
7
+ onSourceClick: (mail: ContextMail) => void;
8
+ onChipClick: (mail: ContextMail) => void;
9
+ onRemoveChip: (mid: string) => void;
10
+ }
11
+ declare const ContextHeader: React.FunctionComponent<ContextHeaderProps>;
12
+ export default ContextHeader;