@open-workspace/email 0.5.1 → 0.5.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/package.json +34 -34
- package/src/client.tsx +3 -1
- package/src/mail/composer-asset-bookmarks.ts +3 -3
- package/src/mail/mail-mailbox-sheet.tsx +2 -2
- package/src/mail/mail-prefetch.ts +1 -1
- package/src/mail/unread-document-indicator.tsx +4 -3
- package/src/mail/use-composer-attachment-preflight.ts +2 -1
- package/src/mail/use-composer-core.ts +4 -6
- package/worker/jmap/eventsource.ts +4 -1
- package/worker/mail/routes.ts +8 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-workspace/email",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Team mail for OpenWorkspace: personal and shared inboxes, mailing lists, previews, safety, and AI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"alchemy",
|
|
@@ -53,63 +53,63 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@hono/zod-validator": "0.9.1",
|
|
56
|
-
"@hookform/resolvers": "7.0.
|
|
56
|
+
"@hookform/resolvers": "7.0.10",
|
|
57
57
|
"@mmmike/web-push": "1.5.0",
|
|
58
58
|
"@modelcontextprotocol/server": "2.4.0",
|
|
59
|
-
"@tanstack/react-query": "5.
|
|
60
|
-
"@tiptap/extension-placeholder": "3.
|
|
61
|
-
"@tiptap/extension-table": "3.
|
|
62
|
-
"@tiptap/pm": "3.
|
|
63
|
-
"@tiptap/react": "3.
|
|
64
|
-
"@tiptap/starter-kit": "3.
|
|
59
|
+
"@tanstack/react-query": "5.108.4",
|
|
60
|
+
"@tiptap/extension-placeholder": "3.35.1",
|
|
61
|
+
"@tiptap/extension-table": "3.35.1",
|
|
62
|
+
"@tiptap/pm": "3.35.1",
|
|
63
|
+
"@tiptap/react": "3.35.1",
|
|
64
|
+
"@tiptap/starter-kit": "3.35.1",
|
|
65
65
|
"aws4fetch": "1.0.20",
|
|
66
66
|
"date-fns": "4.4.0",
|
|
67
|
-
"dompurify": "3.
|
|
67
|
+
"dompurify": "3.5.0",
|
|
68
68
|
"drizzle-orm": "0.45.4",
|
|
69
|
-
"hono": "4.13.
|
|
69
|
+
"hono": "4.13.23",
|
|
70
70
|
"html-to-text": "10.0.1",
|
|
71
71
|
"linkifyjs": "4.4.0",
|
|
72
|
-
"lucide-react": "1.
|
|
72
|
+
"lucide-react": "1.84.0",
|
|
73
73
|
"nuqs": "2.10.3",
|
|
74
74
|
"pdfjs-dist": "6.5.438",
|
|
75
75
|
"postal-mime": "4.2.1",
|
|
76
76
|
"react": "19.3.1",
|
|
77
77
|
"react-hook-form": "7.92.0",
|
|
78
|
-
"react-router": "8.5.
|
|
78
|
+
"react-router": "8.5.3",
|
|
79
79
|
"sanitize-html": "2.18.2",
|
|
80
80
|
"sonner": "2.0.8",
|
|
81
|
-
"tldts": "7.4
|
|
81
|
+
"tldts": "7.6.4",
|
|
82
82
|
"zod": "4.6.7"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@alchemy.run/cloudflare": "2.0.0-beta.
|
|
86
|
-
"@alchemy.run/test": "2.0.0-beta.
|
|
87
|
-
"@effect/platform-bun": "4.1.
|
|
88
|
-
"@effect/platform-node": "4.1.
|
|
89
|
-
"@open-workspace/core": "0.5.
|
|
90
|
-
"@open-workspace/create": "0.5.
|
|
91
|
-
"@types/bun": "1.4.
|
|
85
|
+
"@alchemy.run/cloudflare": "2.0.0-beta.87",
|
|
86
|
+
"@alchemy.run/test": "2.0.0-beta.87",
|
|
87
|
+
"@effect/platform-bun": "4.1.7",
|
|
88
|
+
"@effect/platform-node": "4.1.7",
|
|
89
|
+
"@open-workspace/core": "0.5.2",
|
|
90
|
+
"@open-workspace/create": "0.5.2",
|
|
91
|
+
"@types/bun": "1.4.5",
|
|
92
92
|
"@types/html-to-text": "9.0.4",
|
|
93
93
|
"@types/jsdom": "30.0.0",
|
|
94
|
-
"@types/node": "26.6.
|
|
95
|
-
"@types/react": "19.3.
|
|
94
|
+
"@types/node": "26.6.11",
|
|
95
|
+
"@types/react": "19.3.3",
|
|
96
96
|
"@types/react-dom": "19.3.0",
|
|
97
97
|
"@types/sanitize-html": "2.16.2",
|
|
98
|
-
"ai": "7.0.
|
|
99
|
-
"alchemy": "2.0.0-beta.
|
|
98
|
+
"ai": "7.0.185",
|
|
99
|
+
"alchemy": "2.0.0-beta.87",
|
|
100
100
|
"drizzle-kit": "0.31.11",
|
|
101
|
-
"effect": "4.1.
|
|
102
|
-
"jsdom": "
|
|
103
|
-
"openid-client": "6.
|
|
104
|
-
"playwright": "1.65.
|
|
105
|
-
"standardwebhooks": "1.
|
|
101
|
+
"effect": "4.1.7",
|
|
102
|
+
"jsdom": "31.0.1",
|
|
103
|
+
"openid-client": "6.9.1",
|
|
104
|
+
"playwright": "1.65.1",
|
|
105
|
+
"standardwebhooks": "1.3.0",
|
|
106
106
|
"typescript": "7.0.2",
|
|
107
|
-
"vite": "8.
|
|
107
|
+
"vite": "8.4.0"
|
|
108
108
|
},
|
|
109
109
|
"peerDependencies": {
|
|
110
|
-
"@alchemy.run/cloudflare": "2.0.0-beta.
|
|
111
|
-
"@open-workspace/core": "0.5.
|
|
112
|
-
"alchemy": "2.0.0-beta.
|
|
113
|
-
"effect": "4.1.
|
|
110
|
+
"@alchemy.run/cloudflare": "2.0.0-beta.87",
|
|
111
|
+
"@open-workspace/core": "0.5.2",
|
|
112
|
+
"alchemy": "2.0.0-beta.87",
|
|
113
|
+
"effect": "4.1.7"
|
|
114
114
|
}
|
|
115
115
|
}
|
package/src/client.tsx
CHANGED
|
@@ -188,7 +188,9 @@ const mail: ClientModule = {
|
|
|
188
188
|
background: mailBackground.Component,
|
|
189
189
|
preload: async () => {
|
|
190
190
|
// Message bodies need the sanitizer (DOMPurify); the screen need not wait for it.
|
|
191
|
-
loadSanitizer().catch(() =>
|
|
191
|
+
loadSanitizer().catch((error) =>
|
|
192
|
+
console.warn("Could not preload the sanitizer", error)
|
|
193
|
+
);
|
|
192
194
|
|
|
193
195
|
await Promise.all([mailboxRoute.preload(), mailBackground.preload()]);
|
|
194
196
|
},
|
|
@@ -80,9 +80,9 @@ class AssetBookmarkStep extends Step {
|
|
|
80
80
|
try {
|
|
81
81
|
Step.jsonID("openworkspaceAssetBookmark", AssetBookmarkStep);
|
|
82
82
|
} catch (error) {
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
) {
|
|
83
|
+
if (!(
|
|
84
|
+
error instanceof RangeError && error.message.includes("Duplicate use")
|
|
85
|
+
)) {
|
|
86
86
|
throw error;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -119,8 +119,8 @@ function MailboxSheet({
|
|
|
119
119
|
if (!open) return;
|
|
120
120
|
|
|
121
121
|
for (const id of otherIds.split(" ").filter(Boolean)) {
|
|
122
|
-
void prefetchMailboxSwitch(queryClient, id, folder).catch(
|
|
123
|
-
(
|
|
122
|
+
void prefetchMailboxSwitch(queryClient, id, folder).catch((error) =>
|
|
123
|
+
console.warn("Mailbox prefetch failed", error)
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
}, [open, otherIds, folder, queryClient]);
|
|
@@ -18,9 +18,10 @@ function updateAppBadge(count: number) {
|
|
|
18
18
|
const operation =
|
|
19
19
|
count > 0 ? navigator.setAppBadge?.(count) : navigator.clearAppBadge?.();
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
// Badging is optional and can be denied independently of notifications.
|
|
22
|
+
void operation?.catch((error) =>
|
|
23
|
+
console.debug("Could not update the app badge", error)
|
|
24
|
+
);
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export function UnreadDocumentIndicator() {
|
|
@@ -124,8 +124,9 @@ export function useComposerAttachmentPreflight(
|
|
|
124
124
|
const resolvePlan = useEffectEvent((signal: AbortSignal) => {
|
|
125
125
|
if (!hasAttachments || assets.some((asset) => !asset.uploadId)) return;
|
|
126
126
|
void resolveComposerAttachmentPlan(session, context, assets, signal).catch(
|
|
127
|
-
() => {
|
|
127
|
+
(error) => {
|
|
128
128
|
// Background preflight is advisory. Final submission reports failures.
|
|
129
|
+
if (!signal.aborted) console.warn("Attachment preflight failed", error);
|
|
129
130
|
}
|
|
130
131
|
);
|
|
131
132
|
});
|
|
@@ -253,12 +253,10 @@ export function useComposerCore(input: {
|
|
|
253
253
|
event.dataTransfer.dropEffect = busy ? "none" : "copy";
|
|
254
254
|
},
|
|
255
255
|
onDragLeave: (event: DragEvent<HTMLFormElement>) => {
|
|
256
|
-
if (
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
)
|
|
261
|
-
) {
|
|
256
|
+
if (!(
|
|
257
|
+
event.relatedTarget instanceof Node &&
|
|
258
|
+
event.currentTarget.contains(event.relatedTarget)
|
|
259
|
+
)) {
|
|
262
260
|
setDragging(false);
|
|
263
261
|
}
|
|
264
262
|
},
|
|
@@ -80,7 +80,10 @@ export async function jmapEventStream(input: {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
// Closing fails when the client has already gone.
|
|
84
|
+
writer
|
|
85
|
+
.close()
|
|
86
|
+
.catch((error) => console.debug("Event stream already closed", error));
|
|
84
87
|
finished();
|
|
85
88
|
};
|
|
86
89
|
|
package/worker/mail/routes.ts
CHANGED
|
@@ -1294,7 +1294,10 @@ export const mailRoutes = new Hono<AppEnv>()
|
|
|
1294
1294
|
])
|
|
1295
1295
|
);
|
|
1296
1296
|
|
|
1297
|
-
|
|
1297
|
+
// Awaited below, unless the mailbox call fails or finds nothing first.
|
|
1298
|
+
workspace.catch((error) =>
|
|
1299
|
+
console.warn("Workspace inputs failed to load", error)
|
|
1300
|
+
);
|
|
1298
1301
|
|
|
1299
1302
|
const view = await timed(c, "do", "conversation", () =>
|
|
1300
1303
|
mailbox.getConversationView(
|
|
@@ -1538,7 +1541,10 @@ export const mailRoutes = new Hono<AppEnv>()
|
|
|
1538
1541
|
])
|
|
1539
1542
|
);
|
|
1540
1543
|
|
|
1541
|
-
|
|
1544
|
+
// Awaited below, unless the mailbox call fails or finds nothing first.
|
|
1545
|
+
workspace.catch((error) =>
|
|
1546
|
+
console.warn("Workspace inputs failed to load", error)
|
|
1547
|
+
);
|
|
1542
1548
|
|
|
1543
1549
|
const view = await timed(c, "do", "message", () =>
|
|
1544
1550
|
mailbox.getMessageSenderView(c.req.param("id"))
|