@happyvertical/smrt-messages 0.30.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.
Files changed (153) hide show
  1. package/AGENTS.md +31 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +7 -0
  4. package/README.md +103 -0
  5. package/dist/__smrt-register__.d.ts +2 -0
  6. package/dist/__smrt-register__.d.ts.map +1 -0
  7. package/dist/collections/AccountCollection.d.ts +42 -0
  8. package/dist/collections/AccountCollection.d.ts.map +1 -0
  9. package/dist/collections/AttachmentCollection.d.ts +67 -0
  10. package/dist/collections/AttachmentCollection.d.ts.map +1 -0
  11. package/dist/collections/BlacklistCollection.d.ts +14 -0
  12. package/dist/collections/BlacklistCollection.d.ts.map +1 -0
  13. package/dist/collections/EmailAccountCollection.d.ts +74 -0
  14. package/dist/collections/EmailAccountCollection.d.ts.map +1 -0
  15. package/dist/collections/EmailAttachmentCollection.d.ts +38 -0
  16. package/dist/collections/EmailAttachmentCollection.d.ts.map +1 -0
  17. package/dist/collections/EmailCollection.d.ts +81 -0
  18. package/dist/collections/EmailCollection.d.ts.map +1 -0
  19. package/dist/collections/EmailFolderCollection.d.ts +85 -0
  20. package/dist/collections/EmailFolderCollection.d.ts.map +1 -0
  21. package/dist/collections/MessageCollection.d.ts +74 -0
  22. package/dist/collections/MessageCollection.d.ts.map +1 -0
  23. package/dist/collections/WhitelistCollection.d.ts +18 -0
  24. package/dist/collections/WhitelistCollection.d.ts.map +1 -0
  25. package/dist/index.d.ts +27 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +3068 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/manifest.json +10576 -0
  30. package/dist/models/Account.d.ts +47 -0
  31. package/dist/models/Account.d.ts.map +1 -0
  32. package/dist/models/Attachment.d.ts +48 -0
  33. package/dist/models/Attachment.d.ts.map +1 -0
  34. package/dist/models/Blacklist.d.ts +21 -0
  35. package/dist/models/Blacklist.d.ts.map +1 -0
  36. package/dist/models/Email.d.ts +98 -0
  37. package/dist/models/Email.d.ts.map +1 -0
  38. package/dist/models/EmailAccount.d.ts +65 -0
  39. package/dist/models/EmailAccount.d.ts.map +1 -0
  40. package/dist/models/EmailAttachment.d.ts +19 -0
  41. package/dist/models/EmailAttachment.d.ts.map +1 -0
  42. package/dist/models/EmailFolder.d.ts +65 -0
  43. package/dist/models/EmailFolder.d.ts.map +1 -0
  44. package/dist/models/Message.d.ts +105 -0
  45. package/dist/models/Message.d.ts.map +1 -0
  46. package/dist/models/SlackAccount.d.ts +13 -0
  47. package/dist/models/SlackAccount.d.ts.map +1 -0
  48. package/dist/models/SlackMessage.d.ts +34 -0
  49. package/dist/models/SlackMessage.d.ts.map +1 -0
  50. package/dist/models/Tweet.d.ts +31 -0
  51. package/dist/models/Tweet.d.ts.map +1 -0
  52. package/dist/models/TwitterAccount.d.ts +12 -0
  53. package/dist/models/TwitterAccount.d.ts.map +1 -0
  54. package/dist/models/Whitelist.d.ts +21 -0
  55. package/dist/models/Whitelist.d.ts.map +1 -0
  56. package/dist/playground.d.ts +2 -0
  57. package/dist/playground.d.ts.map +1 -0
  58. package/dist/playground.js +176 -0
  59. package/dist/playground.js.map +1 -0
  60. package/dist/senders/EmailSender.d.ts +13 -0
  61. package/dist/senders/EmailSender.d.ts.map +1 -0
  62. package/dist/senders/SlackSender.d.ts +11 -0
  63. package/dist/senders/SlackSender.d.ts.map +1 -0
  64. package/dist/senders/TweetSender.d.ts +11 -0
  65. package/dist/senders/TweetSender.d.ts.map +1 -0
  66. package/dist/smrt-knowledge.json +4234 -0
  67. package/dist/svelte/components/AccountAvatar.svelte +107 -0
  68. package/dist/svelte/components/AccountAvatar.svelte.d.ts +12 -0
  69. package/dist/svelte/components/AccountAvatar.svelte.d.ts.map +1 -0
  70. package/dist/svelte/components/AccountCard.svelte +173 -0
  71. package/dist/svelte/components/AccountCard.svelte.d.ts +12 -0
  72. package/dist/svelte/components/AccountCard.svelte.d.ts.map +1 -0
  73. package/dist/svelte/components/AccountList.svelte +90 -0
  74. package/dist/svelte/components/AccountList.svelte.d.ts +12 -0
  75. package/dist/svelte/components/AccountList.svelte.d.ts.map +1 -0
  76. package/dist/svelte/components/AttachmentChip.svelte +99 -0
  77. package/dist/svelte/components/AttachmentChip.svelte.d.ts +12 -0
  78. package/dist/svelte/components/AttachmentChip.svelte.d.ts.map +1 -0
  79. package/dist/svelte/components/AttachmentUpload.svelte +160 -0
  80. package/dist/svelte/components/AttachmentUpload.svelte.d.ts +11 -0
  81. package/dist/svelte/components/AttachmentUpload.svelte.d.ts.map +1 -0
  82. package/dist/svelte/components/ComposeForm.svelte +387 -0
  83. package/dist/svelte/components/ComposeForm.svelte.d.ts +13 -0
  84. package/dist/svelte/components/ComposeForm.svelte.d.ts.map +1 -0
  85. package/dist/svelte/components/EmailAccountManager.svelte +690 -0
  86. package/dist/svelte/components/EmailAccountManager.svelte.d.ts +15 -0
  87. package/dist/svelte/components/EmailAccountManager.svelte.d.ts.map +1 -0
  88. package/dist/svelte/components/EmailFilterManager.svelte +687 -0
  89. package/dist/svelte/components/EmailFilterManager.svelte.d.ts +14 -0
  90. package/dist/svelte/components/EmailFilterManager.svelte.d.ts.map +1 -0
  91. package/dist/svelte/components/FolderNav.svelte +171 -0
  92. package/dist/svelte/components/FolderNav.svelte.d.ts +11 -0
  93. package/dist/svelte/components/FolderNav.svelte.d.ts.map +1 -0
  94. package/dist/svelte/components/ForwardForm.svelte +166 -0
  95. package/dist/svelte/components/ForwardForm.svelte.d.ts +10 -0
  96. package/dist/svelte/components/ForwardForm.svelte.d.ts.map +1 -0
  97. package/dist/svelte/components/MessageCard.svelte +336 -0
  98. package/dist/svelte/components/MessageCard.svelte.d.ts +20 -0
  99. package/dist/svelte/components/MessageCard.svelte.d.ts.map +1 -0
  100. package/dist/svelte/components/MessageDetail.svelte +309 -0
  101. package/dist/svelte/components/MessageDetail.svelte.d.ts +18 -0
  102. package/dist/svelte/components/MessageDetail.svelte.d.ts.map +1 -0
  103. package/dist/svelte/components/MessageFilters.svelte +228 -0
  104. package/dist/svelte/components/MessageFilters.svelte.d.ts +13 -0
  105. package/dist/svelte/components/MessageFilters.svelte.d.ts.map +1 -0
  106. package/dist/svelte/components/MessageList.svelte +101 -0
  107. package/dist/svelte/components/MessageList.svelte.d.ts +23 -0
  108. package/dist/svelte/components/MessageList.svelte.d.ts.map +1 -0
  109. package/dist/svelte/components/MessageStatusIndicator.svelte +82 -0
  110. package/dist/svelte/components/MessageStatusIndicator.svelte.d.ts +11 -0
  111. package/dist/svelte/components/MessageStatusIndicator.svelte.d.ts.map +1 -0
  112. package/dist/svelte/components/MessageToolbar.svelte +131 -0
  113. package/dist/svelte/components/MessageToolbar.svelte.d.ts +14 -0
  114. package/dist/svelte/components/MessageToolbar.svelte.d.ts.map +1 -0
  115. package/dist/svelte/components/MessageTypeBadge.svelte +59 -0
  116. package/dist/svelte/components/MessageTypeBadge.svelte.d.ts +9 -0
  117. package/dist/svelte/components/MessageTypeBadge.svelte.d.ts.map +1 -0
  118. package/dist/svelte/components/RecipientInput.svelte +150 -0
  119. package/dist/svelte/components/RecipientInput.svelte.d.ts +11 -0
  120. package/dist/svelte/components/RecipientInput.svelte.d.ts.map +1 -0
  121. package/dist/svelte/components/ReplyForm.svelte +159 -0
  122. package/dist/svelte/components/ReplyForm.svelte.d.ts +11 -0
  123. package/dist/svelte/components/ReplyForm.svelte.d.ts.map +1 -0
  124. package/dist/svelte/components/SendStatusBadge.svelte +64 -0
  125. package/dist/svelte/components/SendStatusBadge.svelte.d.ts +8 -0
  126. package/dist/svelte/components/SendStatusBadge.svelte.d.ts.map +1 -0
  127. package/dist/svelte/components/ThreadView.svelte +240 -0
  128. package/dist/svelte/components/ThreadView.svelte.d.ts +12 -0
  129. package/dist/svelte/components/ThreadView.svelte.d.ts.map +1 -0
  130. package/dist/svelte/i18n.d.ts +42 -0
  131. package/dist/svelte/i18n.d.ts.map +1 -0
  132. package/dist/svelte/i18n.js +60 -0
  133. package/dist/svelte/i18n.messages.d.ts +32 -0
  134. package/dist/svelte/i18n.messages.d.ts.map +1 -0
  135. package/dist/svelte/i18n.messages.js +46 -0
  136. package/dist/svelte/index.d.ts +54 -0
  137. package/dist/svelte/index.d.ts.map +1 -0
  138. package/dist/svelte/index.js +44 -0
  139. package/dist/svelte/playground.d.ts +341 -0
  140. package/dist/svelte/playground.d.ts.map +1 -0
  141. package/dist/svelte/playground.js +171 -0
  142. package/dist/svelte/types.d.ts +195 -0
  143. package/dist/svelte/types.d.ts.map +1 -0
  144. package/dist/svelte/types.js +6 -0
  145. package/dist/types.d.ts +316 -0
  146. package/dist/types.d.ts.map +1 -0
  147. package/dist/types.js +2 -0
  148. package/dist/types.js.map +1 -0
  149. package/dist/ui.d.ts +4 -0
  150. package/dist/ui.d.ts.map +1 -0
  151. package/dist/ui.js +103 -0
  152. package/dist/ui.js.map +1 -0
  153. package/package.json +104 -0
@@ -0,0 +1,341 @@
1
+ declare const _default: {
2
+ packageName: string;
3
+ displayName: string;
4
+ description: string | undefined;
5
+ moduleMeta: import("@happyvertical/smrt-types").SmrtModuleMeta;
6
+ entries: ({
7
+ id: string;
8
+ title: string;
9
+ description: string;
10
+ loadComponent: () => Promise<typeof import("./components/AccountList.svelte")>;
11
+ order: number;
12
+ props: {
13
+ accounts: ({
14
+ id: string;
15
+ name: string;
16
+ email: string;
17
+ providerType: string;
18
+ isActive: boolean;
19
+ unreadCount: number;
20
+ totalCount: number;
21
+ lastSyncAt: string;
22
+ } | {
23
+ id: string;
24
+ name: string;
25
+ providerType: string;
26
+ isActive: boolean;
27
+ unreadCount: number;
28
+ totalCount: number;
29
+ lastSyncAt: string;
30
+ email?: undefined;
31
+ })[];
32
+ onaccountclick: () => void;
33
+ onsync: () => void;
34
+ onremove: () => void;
35
+ messages?: undefined;
36
+ activeMessageId?: undefined;
37
+ showAccount?: undefined;
38
+ onmessageclick?: undefined;
39
+ onselect?: undefined;
40
+ onflag?: undefined;
41
+ message?: undefined;
42
+ attachments?: undefined;
43
+ account?: undefined;
44
+ onreply?: undefined;
45
+ onforward?: undefined;
46
+ ondelete?: undefined;
47
+ type?: undefined;
48
+ initialState?: undefined;
49
+ onsend?: undefined;
50
+ onsavedraft?: undefined;
51
+ ondiscard?: undefined;
52
+ };
53
+ modes: {
54
+ mock: {
55
+ label: string;
56
+ };
57
+ };
58
+ } | {
59
+ id: string;
60
+ title: string;
61
+ description: string;
62
+ loadComponent: () => Promise<typeof import("./components/MessageList.svelte")>;
63
+ order: number;
64
+ props: {
65
+ messages: ({
66
+ id: string;
67
+ type: string;
68
+ accountId: string;
69
+ subject: string;
70
+ body: string;
71
+ senderName: string;
72
+ senderAddress: string;
73
+ recipientAddresses: {
74
+ address: string;
75
+ name: string;
76
+ }[];
77
+ ccAddresses: {
78
+ address: string;
79
+ name: string;
80
+ }[];
81
+ threadId: string;
82
+ isRead: boolean;
83
+ isFlagged: boolean;
84
+ hasAttachments: boolean;
85
+ attachments: {
86
+ id: string;
87
+ filename: string;
88
+ contentType: string;
89
+ size: number;
90
+ }[];
91
+ date: string;
92
+ folderPath: string;
93
+ labels: string[];
94
+ sendStatus: string;
95
+ meta?: undefined;
96
+ } | {
97
+ id: string;
98
+ type: string;
99
+ accountId: string;
100
+ subject: string;
101
+ body: string;
102
+ senderName: string;
103
+ senderAddress: string;
104
+ recipientAddresses: {
105
+ address: string;
106
+ }[];
107
+ isRead: boolean;
108
+ isFlagged: boolean;
109
+ hasAttachments: boolean;
110
+ date: string;
111
+ folderPath: string;
112
+ meta: {
113
+ channelName: string;
114
+ };
115
+ ccAddresses?: undefined;
116
+ threadId?: undefined;
117
+ attachments?: undefined;
118
+ labels?: undefined;
119
+ sendStatus?: undefined;
120
+ })[];
121
+ activeMessageId: string;
122
+ accounts: ({
123
+ id: string;
124
+ name: string;
125
+ email: string;
126
+ providerType: string;
127
+ isActive: boolean;
128
+ unreadCount: number;
129
+ totalCount: number;
130
+ lastSyncAt: string;
131
+ } | {
132
+ id: string;
133
+ name: string;
134
+ providerType: string;
135
+ isActive: boolean;
136
+ unreadCount: number;
137
+ totalCount: number;
138
+ lastSyncAt: string;
139
+ email?: undefined;
140
+ })[];
141
+ showAccount: boolean;
142
+ onmessageclick: () => void;
143
+ onselect: () => void;
144
+ onflag: () => void;
145
+ onaccountclick?: undefined;
146
+ onsync?: undefined;
147
+ onremove?: undefined;
148
+ message?: undefined;
149
+ attachments?: undefined;
150
+ account?: undefined;
151
+ onreply?: undefined;
152
+ onforward?: undefined;
153
+ ondelete?: undefined;
154
+ type?: undefined;
155
+ initialState?: undefined;
156
+ onsend?: undefined;
157
+ onsavedraft?: undefined;
158
+ ondiscard?: undefined;
159
+ };
160
+ modes: {
161
+ mock: {
162
+ label: string;
163
+ };
164
+ };
165
+ } | {
166
+ id: string;
167
+ title: string;
168
+ description: string;
169
+ loadComponent: () => Promise<typeof import("./components/MessageDetail.svelte")>;
170
+ order: number;
171
+ props: {
172
+ message: {
173
+ id: string;
174
+ type: string;
175
+ accountId: string;
176
+ subject: string;
177
+ body: string;
178
+ senderName: string;
179
+ senderAddress: string;
180
+ recipientAddresses: {
181
+ address: string;
182
+ name: string;
183
+ }[];
184
+ ccAddresses: {
185
+ address: string;
186
+ name: string;
187
+ }[];
188
+ threadId: string;
189
+ isRead: boolean;
190
+ isFlagged: boolean;
191
+ hasAttachments: boolean;
192
+ attachments: {
193
+ id: string;
194
+ filename: string;
195
+ contentType: string;
196
+ size: number;
197
+ }[];
198
+ date: string;
199
+ folderPath: string;
200
+ labels: string[];
201
+ sendStatus: string;
202
+ meta?: undefined;
203
+ } | {
204
+ id: string;
205
+ type: string;
206
+ accountId: string;
207
+ subject: string;
208
+ body: string;
209
+ senderName: string;
210
+ senderAddress: string;
211
+ recipientAddresses: {
212
+ address: string;
213
+ }[];
214
+ isRead: boolean;
215
+ isFlagged: boolean;
216
+ hasAttachments: boolean;
217
+ date: string;
218
+ folderPath: string;
219
+ meta: {
220
+ channelName: string;
221
+ };
222
+ ccAddresses?: undefined;
223
+ threadId?: undefined;
224
+ attachments?: undefined;
225
+ labels?: undefined;
226
+ sendStatus?: undefined;
227
+ };
228
+ attachments: {
229
+ id: string;
230
+ filename: string;
231
+ contentType: string;
232
+ size: number;
233
+ }[];
234
+ account: {
235
+ id: string;
236
+ name: string;
237
+ email: string;
238
+ providerType: string;
239
+ isActive: boolean;
240
+ unreadCount: number;
241
+ totalCount: number;
242
+ lastSyncAt: string;
243
+ } | {
244
+ id: string;
245
+ name: string;
246
+ providerType: string;
247
+ isActive: boolean;
248
+ unreadCount: number;
249
+ totalCount: number;
250
+ lastSyncAt: string;
251
+ email?: undefined;
252
+ };
253
+ onreply: () => void;
254
+ onforward: () => void;
255
+ ondelete: () => void;
256
+ accounts?: undefined;
257
+ onaccountclick?: undefined;
258
+ onsync?: undefined;
259
+ onremove?: undefined;
260
+ messages?: undefined;
261
+ activeMessageId?: undefined;
262
+ showAccount?: undefined;
263
+ onmessageclick?: undefined;
264
+ onselect?: undefined;
265
+ onflag?: undefined;
266
+ type?: undefined;
267
+ initialState?: undefined;
268
+ onsend?: undefined;
269
+ onsavedraft?: undefined;
270
+ ondiscard?: undefined;
271
+ };
272
+ modes: {
273
+ mock: {
274
+ label: string;
275
+ };
276
+ };
277
+ } | {
278
+ id: string;
279
+ title: string;
280
+ description: string;
281
+ loadComponent: () => Promise<typeof import("./components/ComposeForm.svelte")>;
282
+ order: number;
283
+ props: {
284
+ type: string;
285
+ accounts: ({
286
+ id: string;
287
+ name: string;
288
+ email: string;
289
+ providerType: string;
290
+ isActive: boolean;
291
+ unreadCount: number;
292
+ totalCount: number;
293
+ lastSyncAt: string;
294
+ } | {
295
+ id: string;
296
+ name: string;
297
+ providerType: string;
298
+ isActive: boolean;
299
+ unreadCount: number;
300
+ totalCount: number;
301
+ lastSyncAt: string;
302
+ email?: undefined;
303
+ })[];
304
+ initialState: {
305
+ accountId: string;
306
+ to: {
307
+ address: string;
308
+ name: string;
309
+ isValid: boolean;
310
+ }[];
311
+ subject: string;
312
+ body: string;
313
+ };
314
+ onsend: () => void;
315
+ onsavedraft: () => void;
316
+ ondiscard: () => void;
317
+ onaccountclick?: undefined;
318
+ onsync?: undefined;
319
+ onremove?: undefined;
320
+ messages?: undefined;
321
+ activeMessageId?: undefined;
322
+ showAccount?: undefined;
323
+ onmessageclick?: undefined;
324
+ onselect?: undefined;
325
+ onflag?: undefined;
326
+ message?: undefined;
327
+ attachments?: undefined;
328
+ account?: undefined;
329
+ onreply?: undefined;
330
+ onforward?: undefined;
331
+ ondelete?: undefined;
332
+ };
333
+ modes: {
334
+ mock: {
335
+ label: string;
336
+ };
337
+ };
338
+ })[];
339
+ };
340
+ export default _default;
341
+ //# sourceMappingURL=playground.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../../src/svelte/playground.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,wBAiGE"}
@@ -0,0 +1,171 @@
1
+ import { MESSAGES_MODULE_META } from '../ui.js';
2
+ const noop = () => { };
3
+ const sampleAccounts = [
4
+ {
5
+ id: 'account-editorial',
6
+ name: 'Editorial Inbox',
7
+ email: 'editorial@example.com',
8
+ providerType: 'email',
9
+ isActive: true,
10
+ unreadCount: 12,
11
+ totalCount: 438,
12
+ lastSyncAt: '2026-03-21T16:12:00.000Z',
13
+ },
14
+ {
15
+ id: 'account-social',
16
+ name: 'Community Slack',
17
+ providerType: 'slack',
18
+ isActive: true,
19
+ unreadCount: 3,
20
+ totalCount: 91,
21
+ lastSyncAt: '2026-03-21T16:05:00.000Z',
22
+ },
23
+ ];
24
+ const sampleAttachments = [
25
+ {
26
+ id: 'attachment-proof',
27
+ filename: 'proofing-notes.pdf',
28
+ contentType: 'application/pdf',
29
+ size: 248512,
30
+ },
31
+ ];
32
+ const sampleMessages = [
33
+ {
34
+ id: 'message-1',
35
+ type: 'email',
36
+ accountId: 'account-editorial',
37
+ subject: 'Governance review complete',
38
+ body: 'The editorial governance review is complete and the draft is ready for publication.',
39
+ senderName: 'Taylor Rowan',
40
+ senderAddress: 'taylor@example.com',
41
+ recipientAddresses: [
42
+ { address: 'editorial@example.com', name: 'Editorial Desk' },
43
+ ],
44
+ ccAddresses: [{ address: 'governance@example.com', name: 'Governance' }],
45
+ threadId: 'thread-1',
46
+ isRead: true,
47
+ isFlagged: false,
48
+ hasAttachments: true,
49
+ attachments: sampleAttachments,
50
+ date: '2026-03-21T15:30:00.000Z',
51
+ folderPath: 'Inbox',
52
+ labels: ['governance', 'release'],
53
+ sendStatus: 'sent',
54
+ },
55
+ {
56
+ id: 'message-2',
57
+ type: 'slack',
58
+ accountId: 'account-social',
59
+ subject: 'Release coordination',
60
+ body: 'Can we confirm the package rollout order for this afternoon?',
61
+ senderName: 'Jordan Lee',
62
+ senderAddress: 'jordan@example.com',
63
+ recipientAddresses: [{ address: '#release-coordination' }],
64
+ isRead: false,
65
+ isFlagged: true,
66
+ hasAttachments: false,
67
+ date: '2026-03-21T16:02:00.000Z',
68
+ folderPath: 'Slack / release-coordination',
69
+ meta: {
70
+ channelName: 'release-coordination',
71
+ },
72
+ },
73
+ ];
74
+ const loadAccountList = () => import('./components/AccountList.svelte');
75
+ const loadComposeForm = () => import('./components/ComposeForm.svelte');
76
+ const loadMessageDetail = () => import('./components/MessageDetail.svelte');
77
+ const loadMessageList = () => import('./components/MessageList.svelte');
78
+ export default {
79
+ packageName: '@happyvertical/smrt-messages',
80
+ displayName: MESSAGES_MODULE_META.displayName,
81
+ description: MESSAGES_MODULE_META.description,
82
+ moduleMeta: MESSAGES_MODULE_META,
83
+ entries: [
84
+ {
85
+ id: 'account-list',
86
+ title: 'Account List',
87
+ description: 'Connected messaging accounts with sync state and unread counts.',
88
+ loadComponent: loadAccountList,
89
+ order: 1,
90
+ props: {
91
+ accounts: sampleAccounts,
92
+ onaccountclick: noop,
93
+ onsync: noop,
94
+ onremove: noop,
95
+ },
96
+ modes: {
97
+ mock: {
98
+ label: 'Mock',
99
+ },
100
+ },
101
+ },
102
+ {
103
+ id: 'message-list',
104
+ title: 'Message List',
105
+ description: 'Inbox-style message listing with selection, account context, and type-aware cards.',
106
+ loadComponent: loadMessageList,
107
+ order: 2,
108
+ props: {
109
+ messages: sampleMessages,
110
+ activeMessageId: 'message-1',
111
+ accounts: sampleAccounts,
112
+ showAccount: true,
113
+ onmessageclick: noop,
114
+ onselect: noop,
115
+ onflag: noop,
116
+ },
117
+ modes: {
118
+ mock: {
119
+ label: 'Mock',
120
+ },
121
+ },
122
+ },
123
+ {
124
+ id: 'message-detail',
125
+ title: 'Message Detail',
126
+ description: 'Full message view for reading, attachments, and follow-up actions.',
127
+ loadComponent: loadMessageDetail,
128
+ order: 3,
129
+ props: {
130
+ message: sampleMessages[0],
131
+ attachments: sampleAttachments,
132
+ account: sampleAccounts[0],
133
+ onreply: noop,
134
+ onforward: noop,
135
+ ondelete: noop,
136
+ },
137
+ modes: {
138
+ mock: {
139
+ label: 'Mock',
140
+ },
141
+ },
142
+ },
143
+ {
144
+ id: 'compose-form',
145
+ title: 'Compose Form',
146
+ description: 'Channel-aware compose experience for email, Slack, and short-form posts.',
147
+ loadComponent: loadComposeForm,
148
+ order: 4,
149
+ props: {
150
+ type: 'email',
151
+ accounts: sampleAccounts,
152
+ initialState: {
153
+ accountId: 'account-editorial',
154
+ to: [
155
+ { address: 'ops@example.com', name: 'Operations', isValid: true },
156
+ ],
157
+ subject: 'Launch checklist follow-up',
158
+ body: 'Please confirm the remaining package rollout items for issue #1047.',
159
+ },
160
+ onsend: noop,
161
+ onsavedraft: noop,
162
+ ondiscard: noop,
163
+ },
164
+ modes: {
165
+ mock: {
166
+ label: 'Mock',
167
+ },
168
+ },
169
+ },
170
+ ],
171
+ };
@@ -0,0 +1,195 @@
1
+ /**
2
+ * Svelte component types for @happyvertical/smrt-messages
3
+ *
4
+ * UI data interfaces decoupled from ORM models.
5
+ */
6
+ /**
7
+ * Message type identifier
8
+ */
9
+ export type MessageType = 'email' | 'tweet' | 'slack' | string;
10
+ /**
11
+ * Bulk actions for message management
12
+ */
13
+ export type BulkAction = 'markRead' | 'markUnread' | 'flag' | 'unflag' | 'delete' | 'archive';
14
+ /**
15
+ * Message data for UI components
16
+ */
17
+ export interface MessageData {
18
+ id: string;
19
+ type: MessageType;
20
+ accountId: string;
21
+ subject: string;
22
+ body: string;
23
+ htmlBody?: string;
24
+ senderName: string;
25
+ senderAddress: string;
26
+ recipientAddresses: Array<{
27
+ address: string;
28
+ name?: string;
29
+ }>;
30
+ ccAddresses?: Array<{
31
+ address: string;
32
+ name?: string;
33
+ }>;
34
+ threadId?: string;
35
+ isRead: boolean;
36
+ isFlagged: boolean;
37
+ hasAttachments: boolean;
38
+ attachments?: AttachmentData[];
39
+ date: string | Date;
40
+ folderPath?: string;
41
+ labels?: string[];
42
+ meta?: Record<string, any>;
43
+ sendStatus?: 'draft' | 'pending' | 'sending' | 'sent' | 'failed' | 'scheduled';
44
+ isDraft?: boolean;
45
+ }
46
+ /**
47
+ * Account data for UI components
48
+ */
49
+ export interface AccountData {
50
+ id: string;
51
+ name: string;
52
+ email?: string;
53
+ providerType: string;
54
+ isActive: boolean;
55
+ lastSyncAt?: string | Date | null;
56
+ unreadCount?: number;
57
+ totalCount?: number;
58
+ }
59
+ /**
60
+ * Email account data for account manager workflows
61
+ */
62
+ export interface EmailAccountData {
63
+ id: string;
64
+ name: string;
65
+ email: string;
66
+ providerType: 'imap' | 'gmail' | 'outlook' | 'exchange';
67
+ isActive: boolean;
68
+ imapHost?: string;
69
+ imapPort?: number;
70
+ imapSecurity?: 'ssl' | 'starttls' | 'none';
71
+ smtpHost?: string;
72
+ smtpPort?: number;
73
+ smtpSecurity?: 'ssl' | 'starttls' | 'none';
74
+ username?: string;
75
+ password?: string;
76
+ lastSyncAt?: string | Date | null;
77
+ }
78
+ /**
79
+ * Folder data for navigation
80
+ */
81
+ export interface FolderData {
82
+ id: string;
83
+ accountId: string;
84
+ name: string;
85
+ path: string;
86
+ specialUse?: string;
87
+ messageCount: number;
88
+ unreadCount: number;
89
+ }
90
+ /**
91
+ * Attachment data for display
92
+ */
93
+ export interface AttachmentData {
94
+ id: string;
95
+ filename: string;
96
+ contentType: string;
97
+ size: number;
98
+ isInline?: boolean;
99
+ }
100
+ /**
101
+ * Filter state for message lists
102
+ */
103
+ export interface MessageFilterState {
104
+ type?: MessageType;
105
+ accountId?: string;
106
+ isRead?: boolean;
107
+ isFlagged?: boolean;
108
+ dateFrom?: string;
109
+ dateTo?: string;
110
+ search?: string;
111
+ }
112
+ /**
113
+ * Sort configuration
114
+ */
115
+ export interface MessageSort {
116
+ field: 'date' | 'sender' | 'subject' | 'type';
117
+ direction: 'asc' | 'desc';
118
+ }
119
+ /**
120
+ * Send status display configuration
121
+ */
122
+ export interface SendStatusDisplay {
123
+ status: 'draft' | 'pending' | 'sending' | 'sent' | 'failed' | 'scheduled';
124
+ label: string;
125
+ color: string;
126
+ icon: string;
127
+ }
128
+ /**
129
+ * Recipient entry for compose forms
130
+ */
131
+ export interface RecipientEntry {
132
+ address: string;
133
+ name?: string;
134
+ isValid: boolean;
135
+ }
136
+ /**
137
+ * Compose form state
138
+ */
139
+ export interface ComposeState {
140
+ accountId: string;
141
+ to: RecipientEntry[];
142
+ cc: RecipientEntry[];
143
+ bcc: RecipientEntry[];
144
+ subject: string;
145
+ body: string;
146
+ attachments: AttachmentData[];
147
+ channelId?: string;
148
+ isDirty: boolean;
149
+ isSending: boolean;
150
+ }
151
+ /**
152
+ * Draft data for persistence
153
+ */
154
+ export interface DraftData {
155
+ id?: string;
156
+ accountId: string;
157
+ type: MessageType;
158
+ to: Array<{
159
+ address: string;
160
+ name?: string;
161
+ }>;
162
+ cc?: Array<{
163
+ address: string;
164
+ name?: string;
165
+ }>;
166
+ bcc?: Array<{
167
+ address: string;
168
+ name?: string;
169
+ }>;
170
+ subject: string;
171
+ body: string;
172
+ channelId?: string;
173
+ inReplyToMessageId?: string;
174
+ }
175
+ /**
176
+ * Whitelist entry for email filtering
177
+ */
178
+ export interface WhitelistEntry {
179
+ id: string;
180
+ pattern: string;
181
+ type: 'email' | 'domain' | 'regex';
182
+ category?: string | null;
183
+ description?: string;
184
+ }
185
+ /**
186
+ * Blacklist entry for email filtering
187
+ */
188
+ export interface BlacklistEntry {
189
+ id: string;
190
+ pattern: string;
191
+ type: 'email' | 'domain' | 'regex';
192
+ reason?: string;
193
+ autoArchive?: boolean;
194
+ }
195
+ //# sourceMappingURL=types.d.ts.map