@remit/web-client 0.0.346 → 0.0.348
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/src/components/mail/BriefPane.js +3 -3
- package/dist/src/components/mail/CheckAgainProvider.d.ts +30 -0
- package/dist/src/components/mail/CheckAgainProvider.js +194 -0
- package/dist/src/components/mail/{FlaggedList.d.ts → CollectionList.d.ts} +7 -3
- package/dist/src/components/mail/{FlaggedList.js → CollectionList.js} +29 -24
- package/dist/src/components/mail/CollectionPane.d.ts +32 -0
- package/dist/src/components/mail/{FlaggedPane.js → CollectionPane.js} +35 -33
- package/dist/src/components/mail/ConversationView.d.ts +7 -8
- package/dist/src/components/mail/ConversationView.js +4 -4
- package/dist/src/components/mail/DailyBrief.js +6 -4
- package/dist/src/components/mail/IntelligencePane.d.ts +2 -2
- package/dist/src/components/mail/IntelligencePane.js +33 -4
- package/dist/src/components/mail/MailSidebarAdapter.js +29 -7
- package/dist/src/components/mail/MailboxPane.js +10 -12
- package/dist/src/components/mail/MessageActionMenu.d.ts +3 -1
- package/dist/src/components/mail/MessageActionMenu.js +3 -3
- package/dist/src/components/mail/MessageCard.js +9 -1
- package/dist/src/components/mail/MessageList.js +11 -2
- package/dist/src/components/mail/MessageListItem.d.ts +4 -2
- package/dist/src/components/mail/MessageListItem.js +4 -6
- package/dist/src/components/mail/SpamBannerSlot.d.ts +10 -0
- package/dist/src/components/mail/SpamBannerSlot.js +56 -0
- package/dist/src/components/mail/SwipeableMessageRow.d.ts +3 -2
- package/dist/src/components/mail/SwipeableMessageRow.js +6 -6
- package/dist/src/components/mail/ThreadListInteraction.d.ts +2 -0
- package/dist/src/components/mail/ThreadListInteraction.js +12 -2
- package/dist/src/components/settings/classification/FailureBanner.js +3 -4
- package/dist/src/components/settings/spam/SpamSettingsPanel.d.ts +6 -0
- package/dist/src/components/settings/spam/SpamSettingsPanel.js +176 -0
- package/dist/src/hooks/{useStarredThreads.d.ts → useCollectionThreads.d.ts} +10 -8
- package/dist/src/hooks/{useStarredThreads.js → useCollectionThreads.js} +16 -14
- package/dist/src/hooks/useCurrentMailboxName.d.ts +1 -0
- package/dist/src/hooks/useCurrentMailboxName.js +6 -1
- package/dist/src/hooks/useIntelligenceData.d.ts +2 -4
- package/dist/src/hooks/useIntelligenceData.js +1 -127
- package/dist/src/hooks/useJunkMailboxIds.d.ts +2 -0
- package/dist/src/hooks/useJunkMailboxIds.js +17 -0
- package/dist/src/hooks/useLabels.d.ts +10 -9
- package/dist/src/hooks/useLabels.js +25 -6
- package/dist/src/lib/brief.d.ts +1 -1
- package/dist/src/lib/brief.js +3 -3
- package/dist/src/lib/check-again.d.ts +33 -0
- package/dist/src/lib/check-again.js +66 -0
- package/dist/src/lib/{flagged-criteria.d.ts → collection-criteria.d.ts} +18 -6
- package/dist/src/lib/{flagged-criteria.js → collection-criteria.js} +4 -3
- package/dist/src/lib/conversation-target.d.ts +3 -2
- package/dist/src/lib/label-folders.d.ts +6 -0
- package/dist/src/lib/label-folders.js +10 -0
- package/dist/src/lib/mail-route.d.ts +10 -5
- package/dist/src/lib/mail-route.js +9 -1
- package/dist/src/lib/mail-search.d.ts +11 -0
- package/dist/src/lib/mail-search.js +4 -0
- package/dist/src/lib/search-scope.d.ts +2 -2
- package/dist/src/lib/search-scope.js +4 -4
- package/dist/src/lib/search-tokens.d.ts +1 -1
- package/dist/src/lib/search-tokens.js +2 -2
- package/dist/src/lib/spam-overview.d.ts +23 -0
- package/dist/src/lib/spam-overview.js +44 -0
- package/dist/src/lib/spam.d.ts +32 -0
- package/dist/src/lib/spam.js +38 -0
- package/dist/src/lib/thread-search-tokens.js +3 -1
- package/dist/src/routeTree.gen.d.ts +312 -5
- package/dist/src/routeTree.gen.js +72 -0
- package/dist/src/routes/__root.js +2 -1
- package/dist/src/routes/mail/flagged/$threadId/$messageId.js +2 -2
- package/dist/src/routes/mail/flagged/$threadId/index.js +2 -2
- package/dist/src/routes/mail/flagged/index.js +2 -2
- package/dist/src/routes/mail/flagged.js +3 -2
- package/dist/src/routes/mail/label/$labelId/$threadId/$messageId/$mode.{-$outboxMessageId}.d.ts +18 -0
- package/dist/src/routes/mail/label/$labelId/$threadId/$messageId/$mode.{-$outboxMessageId}.js +8 -0
- package/dist/src/routes/mail/label/$labelId/$threadId/$messageId.d.ts +15 -0
- package/dist/src/routes/mail/label/$labelId/$threadId/$messageId.js +14 -0
- package/dist/src/routes/mail/label/$labelId/$threadId/index.d.ts +15 -0
- package/dist/src/routes/mail/label/$labelId/$threadId/index.js +9 -0
- package/dist/src/routes/mail/label/$labelId/$threadId.d.ts +15 -0
- package/dist/src/routes/mail/label/$labelId/$threadId.js +8 -0
- package/dist/src/routes/mail/label/$labelId/compose.{-$outboxMessageId}.d.ts +15 -0
- package/dist/src/routes/mail/label/$labelId/compose.{-$outboxMessageId}.js +10 -0
- package/dist/src/routes/mail/label/$labelId/index.d.ts +15 -0
- package/dist/src/routes/mail/label/$labelId/index.js +9 -0
- package/dist/src/routes/mail/label/$labelId.d.ts +15 -0
- package/dist/src/routes/mail/label/$labelId.js +30 -0
- package/dist/src/routes/mail/label/index.d.ts +29 -0
- package/dist/src/routes/mail/label/index.js +18 -0
- package/dist/src/routes/settings/filters.d.ts +6 -2
- package/dist/src/routes/settings/filters.js +10 -3
- package/dist/src/routes/settings/senders.d.ts +14 -2
- package/dist/src/routes/settings/senders.js +32 -15
- package/dist/src/routes/settings/spam.d.ts +1 -0
- package/dist/src/routes/settings/spam.js +15 -0
- package/dist/src/routes/settings.js +6 -1
- package/dist/src/routing/browsed-list.d.ts +1 -1
- package/dist/src/routing/browsed-list.js +15 -4
- package/dist/src/routing/compose.js +10 -6
- package/dist/src/routing/index.d.ts +1 -1
- package/dist/src/routing/index.js +1 -1
- package/dist/src/routing/nav-selection.d.ts +5 -0
- package/dist/src/routing/nav-selection.js +15 -0
- package/dist/src/routing/open-thread.js +23 -3
- package/dist/src/routing/reply.js +28 -11
- package/dist/src/routing/search-mirror.d.ts +5 -0
- package/dist/src/routing/search-mirror.js +20 -2
- package/dist/src/routing/spam-link.d.ts +3 -0
- package/dist/src/routing/spam-link.js +12 -0
- package/package.json +2 -2
- package/dist/src/components/mail/AuthenticityBanner.d.ts +0 -14
- package/dist/src/components/mail/AuthenticityBanner.js +0 -18
- package/dist/src/components/mail/FlaggedPane.d.ts +0 -29
|
@@ -66,8 +66,13 @@ export function useSearchMirror(target) {
|
|
|
66
66
|
const isReplying = useIsReplying();
|
|
67
67
|
const isWriting = isComposing || isReplying;
|
|
68
68
|
const { to } = target;
|
|
69
|
-
const mailboxId = "
|
|
70
|
-
const
|
|
69
|
+
const mailboxId = target.to === "/mail/$mailboxId" ? target.params.mailboxId : undefined;
|
|
70
|
+
const labelId = target.to === "/mail/label/$labelId" ? target.params.labelId : undefined;
|
|
71
|
+
const listPath = mailboxId
|
|
72
|
+
? `/mail/${mailboxId}`
|
|
73
|
+
: labelId
|
|
74
|
+
? `/mail/label/${labelId}`
|
|
75
|
+
: to;
|
|
71
76
|
useEffect(() => {
|
|
72
77
|
const mayWrite = shouldMirrorQuery({
|
|
73
78
|
searchInput,
|
|
@@ -105,6 +110,18 @@ export function useSearchMirror(target) {
|
|
|
105
110
|
});
|
|
106
111
|
return;
|
|
107
112
|
}
|
|
113
|
+
if (to === "/mail/label/$labelId") {
|
|
114
|
+
if (!labelId)
|
|
115
|
+
return;
|
|
116
|
+
navigate({
|
|
117
|
+
to,
|
|
118
|
+
params: { labelId },
|
|
119
|
+
search,
|
|
120
|
+
hash: true,
|
|
121
|
+
replace: true,
|
|
122
|
+
});
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
108
125
|
navigate({ to, search, hash: true, replace: true });
|
|
109
126
|
}, [
|
|
110
127
|
searchInput,
|
|
@@ -113,6 +130,7 @@ export function useSearchMirror(target) {
|
|
|
113
130
|
navigate,
|
|
114
131
|
to,
|
|
115
132
|
mailboxId,
|
|
133
|
+
labelId,
|
|
116
134
|
listPath,
|
|
117
135
|
pathname,
|
|
118
136
|
isWriting,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { NavLink } from "./nav-link";
|
|
3
|
+
/** The Spam check section's links, as router navigations. */
|
|
4
|
+
export function SpamVerdictLink({ target, className, children, }) {
|
|
5
|
+
if (target.kind === "SpamSettings") {
|
|
6
|
+
return (_jsx(NavLink, { to: "/settings/spam", variant: "inline", className: className, children: children }));
|
|
7
|
+
}
|
|
8
|
+
if (target.kind === "NeverInSpamSenders") {
|
|
9
|
+
return (_jsx(NavLink, { to: "/settings/senders", search: { group: "neverSpam" }, variant: "inline", className: className, children: children }));
|
|
10
|
+
}
|
|
11
|
+
return (_jsx(NavLink, { to: "/settings/filters", search: { filterId: target.filterId }, variant: "inline", className: className, children: children }));
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remit/web-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.348",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Remit web client, published as composable primitives — the app shell, auth shells, and runtime config. A distributor imports what it composes and bundles it.",
|
|
6
6
|
"exports": {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@hookform/resolvers": "5.4.0",
|
|
94
|
-
"@remit/ui": "0.0.
|
|
94
|
+
"@remit/ui": "0.0.239",
|
|
95
95
|
"@tanstack/react-query": "5.101.2",
|
|
96
96
|
"@tanstack/react-query-devtools": "5.101.2",
|
|
97
97
|
"@tanstack/react-router": "1.170.18",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { RemitImapMessageAuthenticity } from "@remit/api-http-client/types.gen.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Danger banner rendered above the thread body when DKIM mismatch is detected.
|
|
4
|
-
* Design spec (03-reading-and-intelligence.md): "a danger banner renders above
|
|
5
|
-
* the body: 'This message claims to be a company but was sent from a personal
|
|
6
|
-
* mailbox.' with a 'Why?' link that opens/highlights this section."
|
|
7
|
-
*
|
|
8
|
-
* The link sits in the sentence at the sentence's own size. Set apart as
|
|
9
|
-
* smaller, right-floated chrome it read as a label rather than the way in.
|
|
10
|
-
*/
|
|
11
|
-
export declare function AuthenticityBanner({ authenticity, onOpenIntelligence, }: {
|
|
12
|
-
authenticity: RemitImapMessageAuthenticity;
|
|
13
|
-
onOpenIntelligence?: () => void;
|
|
14
|
-
}): import("react").JSX.Element | null;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ShieldAlert } from "@remit/ui/icons";
|
|
3
|
-
/**
|
|
4
|
-
* Danger banner rendered above the thread body when DKIM mismatch is detected.
|
|
5
|
-
* Design spec (03-reading-and-intelligence.md): "a danger banner renders above
|
|
6
|
-
* the body: 'This message claims to be a company but was sent from a personal
|
|
7
|
-
* mailbox.' with a 'Why?' link that opens/highlights this section."
|
|
8
|
-
*
|
|
9
|
-
* The link sits in the sentence at the sentence's own size. Set apart as
|
|
10
|
-
* smaller, right-floated chrome it read as a label rather than the way in.
|
|
11
|
-
*/
|
|
12
|
-
export function AuthenticityBanner({ authenticity, onOpenIntelligence, }) {
|
|
13
|
-
if (!authenticity.dkimMismatch)
|
|
14
|
-
return null;
|
|
15
|
-
return (_jsxs("div", { className: "flex items-start gap-2 rounded-none border-b border-danger/20 bg-danger-soft px-5 py-2.5 text-sm", children: [_jsx(ShieldAlert, { className: "mt-0.5 size-4 shrink-0 text-danger" }), _jsxs("p", { className: "flex-1 leading-snug text-fg", children: ["This message claims to be from", " ", _jsx("span", { className: "font-semibold", children: authenticity.fromDomain }), " but was sent", authenticity.dkimDomain
|
|
16
|
-
? ` via ${authenticity.dkimDomain}`
|
|
17
|
-
: " from a different domain", ".", " ", onOpenIntelligence && (_jsx("button", { type: "button", onClick: onOpenIntelligence, className: "font-medium text-danger hover:underline", children: "Why?" }))] })] }));
|
|
18
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import { type OpenThreadPath } from "../../routing";
|
|
3
|
-
interface FlaggedPaneProps {
|
|
4
|
-
/** The open conversation, as the address states it. */
|
|
5
|
-
thread: OpenThreadPath | undefined;
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare function FlaggedPaneProvider({ thread, children }: FlaggedPaneProps): import("react").JSX.Element;
|
|
9
|
-
/** Flat starred list. Mount in the `list` slot of `AppShellSlotted`. */
|
|
10
|
-
declare function FlaggedListSlot(): import("react").JSX.Element;
|
|
11
|
-
/**
|
|
12
|
-
* Reading pane: toolbar + ConversationView.
|
|
13
|
-
* Mount in the `reading` slot of `AppShellSlotted`. Only rendered ≥ 1024px.
|
|
14
|
-
*/
|
|
15
|
-
declare function FlaggedReading(): import("react").JSX.Element;
|
|
16
|
-
/**
|
|
17
|
-
* Intelligence pane: IntelligencePane for the open thread.
|
|
18
|
-
* Mount in the `intelligence` slot of `AppShellSlotted`. Only rendered ≥ 1280px.
|
|
19
|
-
*/
|
|
20
|
-
declare function FlaggedIntelligence(): import("react").JSX.Element;
|
|
21
|
-
/** Phone view: ConversationView when a thread is open, else the flat list. */
|
|
22
|
-
declare function FlaggedPhone(): import("react").JSX.Element;
|
|
23
|
-
declare const FlaggedPane: typeof FlaggedPaneProvider & {
|
|
24
|
-
List: typeof FlaggedListSlot;
|
|
25
|
-
Reading: typeof FlaggedReading;
|
|
26
|
-
Intelligence: typeof FlaggedIntelligence;
|
|
27
|
-
Phone: typeof FlaggedPhone;
|
|
28
|
-
};
|
|
29
|
-
export { FlaggedPane };
|