@remit/web-client 0.0.324 → 0.0.326

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 (1597) hide show
  1. package/dist/harness/index.html +50 -0
  2. package/dist/harness/vite-preset.d.ts +10 -0
  3. package/dist/harness/vite-preset.js +151 -0
  4. package/dist/spellcheck/languages.d.ts +33 -0
  5. package/dist/spellcheck/languages.js +66 -0
  6. package/dist/spellcheck/vite-plugin.d.ts +43 -0
  7. package/dist/spellcheck/vite-plugin.js +294 -0
  8. package/dist/spellcheck/worker-stub.d.ts +15 -0
  9. package/dist/spellcheck/worker-stub.js +33 -0
  10. package/dist/src/auth/AccountMenu.d.ts +1 -0
  11. package/dist/src/auth/AccountMenu.js +4 -0
  12. package/dist/src/auth/AccountSession.d.ts +14 -0
  13. package/dist/src/auth/AccountSession.js +12 -0
  14. package/dist/src/auth/BetterAuthShell.d.ts +18 -0
  15. package/dist/src/auth/BetterAuthShell.js +88 -0
  16. package/dist/src/auth/SessionRateLimited.d.ts +12 -0
  17. package/dist/src/auth/SessionRateLimited.js +10 -0
  18. package/dist/src/auth/SignInAgain.d.ts +1 -0
  19. package/dist/src/auth/SignInAgain.js +6 -0
  20. package/dist/src/auth/account-menu-mode.d.ts +13 -0
  21. package/dist/src/auth/account-menu-mode.js +15 -0
  22. package/dist/src/auth/amplify-config.d.ts +9 -0
  23. package/dist/src/auth/amplify-config.js +43 -0
  24. package/dist/src/auth/auth-error.d.ts +42 -0
  25. package/dist/src/auth/auth-error.js +81 -0
  26. package/dist/src/auth/auth-interceptor.d.ts +12 -0
  27. package/dist/src/auth/auth-interceptor.js +24 -0
  28. package/dist/src/auth/better-auth/BetterAuthAccount.d.ts +7 -0
  29. package/dist/src/auth/better-auth/BetterAuthAccount.js +18 -0
  30. package/dist/src/auth/better-auth-config.d.ts +43 -0
  31. package/dist/src/auth/better-auth-config.js +215 -0
  32. package/dist/src/auth/better-auth-provider.d.ts +7 -0
  33. package/dist/src/auth/better-auth-provider.js +15 -0
  34. package/dist/src/auth/cognito/CognitoAccount.d.ts +8 -0
  35. package/dist/src/auth/cognito/CognitoAccount.js +32 -0
  36. package/dist/src/auth/cognito/CognitoShell.d.ts +6 -0
  37. package/dist/src/auth/cognito/CognitoShell.js +204 -0
  38. package/dist/src/auth/cognito/cognito-token.d.ts +9 -0
  39. package/dist/src/auth/cognito/cognito-token.js +36 -0
  40. package/dist/src/auth/cognito-provider.d.ts +8 -0
  41. package/dist/src/auth/cognito-provider.js +17 -0
  42. package/dist/src/auth/combined-provider.d.ts +2 -0
  43. package/dist/src/auth/combined-provider.js +27 -0
  44. package/dist/src/auth/provider.d.ts +51 -0
  45. package/dist/src/auth/provider.js +18 -0
  46. package/dist/src/auth/session-state.d.ts +29 -0
  47. package/dist/src/auth/session-state.js +16 -0
  48. package/dist/src/auth/sign-out-visibility.d.ts +5 -0
  49. package/dist/src/auth/sign-out-visibility.js +1 -0
  50. package/dist/src/components/calendar/AgendaStrip.d.ts +64 -0
  51. package/dist/src/components/calendar/AgendaStrip.js +19 -0
  52. package/dist/src/components/calendar/AgendaView.d.ts +42 -0
  53. package/dist/src/components/calendar/AgendaView.js +131 -0
  54. package/dist/src/components/calendar/CalendarComposePane.d.ts +49 -0
  55. package/dist/src/components/calendar/CalendarComposePane.js +8 -0
  56. package/dist/src/components/calendar/CalendarComposeSeed.d.ts +7 -0
  57. package/dist/src/components/calendar/CalendarComposeSeed.js +19 -0
  58. package/dist/src/components/calendar/CalendarEventPane.d.ts +48 -0
  59. package/dist/src/components/calendar/CalendarEventPane.js +48 -0
  60. package/dist/src/components/calendar/CalendarShell.d.ts +43 -0
  61. package/dist/src/components/calendar/CalendarShell.js +35 -0
  62. package/dist/src/components/calendar/CalendarUnavailable.d.ts +13 -0
  63. package/dist/src/components/calendar/CalendarUnavailable.js +24 -0
  64. package/dist/src/components/calendar/CalendarViewPlaceholder.d.ts +1 -0
  65. package/dist/src/components/calendar/CalendarViewPlaceholder.js +5 -0
  66. package/dist/src/components/calendar/CalendarWaiting.d.ts +25 -0
  67. package/dist/src/components/calendar/CalendarWaiting.js +14 -0
  68. package/dist/src/components/calendar/CalendarWorkspace.d.ts +49 -0
  69. package/dist/src/components/calendar/CalendarWorkspace.js +65 -0
  70. package/dist/src/components/calendar/ChangeCalendarSuggestion.d.ts +5 -0
  71. package/dist/src/components/calendar/ChangeCalendarSuggestion.js +66 -0
  72. package/dist/src/components/calendar/OpenCalendarEvent.d.ts +20 -0
  73. package/dist/src/components/calendar/OpenCalendarEvent.js +169 -0
  74. package/dist/src/components/calendar/PendingSuggestions.d.ts +9 -0
  75. package/dist/src/components/calendar/PendingSuggestions.js +50 -0
  76. package/dist/src/components/calendar/WriteCalendarEvent.d.ts +13 -0
  77. package/dist/src/components/calendar/WriteCalendarEvent.js +59 -0
  78. package/dist/src/components/calendar/calendar-story-fixtures.d.ts +21 -0
  79. package/dist/src/components/calendar/calendar-story-fixtures.js +95 -0
  80. package/dist/src/components/calendar/calendar-story-server.d.ts +37 -0
  81. package/dist/src/components/calendar/calendar-story-server.js +108 -0
  82. package/dist/src/components/compose/AddressField.d.ts +13 -0
  83. package/dist/src/components/compose/AddressField.js +23 -0
  84. package/dist/src/components/compose/ComposeForm.d.ts +31 -0
  85. package/dist/src/components/compose/ComposeForm.js +925 -0
  86. package/dist/src/components/compose/ComposeProvider.d.ts +38 -0
  87. package/dist/src/components/compose/ComposeProvider.js +101 -0
  88. package/dist/src/components/compose/ComposeSmtpMissingBanner.d.ts +8 -0
  89. package/dist/src/components/compose/ComposeSmtpMissingBanner.js +10 -0
  90. package/dist/src/components/compose/ConversationCompose.d.ts +17 -0
  91. package/dist/src/components/compose/ConversationCompose.js +46 -0
  92. package/dist/src/components/compose/FromSelector.d.ts +7 -0
  93. package/dist/src/components/compose/FromSelector.js +29 -0
  94. package/dist/src/components/compose/FullCompose.d.ts +6 -0
  95. package/dist/src/components/compose/FullCompose.js +38 -0
  96. package/dist/src/components/compose/MobileComposeSheet.d.ts +1 -0
  97. package/dist/src/components/compose/MobileComposeSheet.js +65 -0
  98. package/dist/src/components/compose/compose-spellcheck.d.ts +17 -0
  99. package/dist/src/components/compose/compose-spellcheck.js +43 -0
  100. package/dist/src/components/compose/compose-title.d.ts +9 -0
  101. package/dist/src/components/compose/compose-title.js +9 -0
  102. package/dist/src/components/compose/mail-sync-off-refusal.d.ts +1 -0
  103. package/dist/src/components/compose/mail-sync-off-refusal.js +7 -0
  104. package/dist/src/components/compose/quoted-message.d.ts +59 -0
  105. package/dist/src/components/compose/quoted-message.js +162 -0
  106. package/dist/src/components/compose/reply-with-times.d.ts +6 -0
  107. package/dist/src/components/compose/reply-with-times.js +12 -0
  108. package/dist/src/components/config-import/ConfigImportWizard.d.ts +24 -0
  109. package/dist/src/components/config-import/ConfigImportWizard.js +425 -0
  110. package/dist/src/components/config-import/config-import.fixtures.d.ts +27 -0
  111. package/dist/src/components/config-import/config-import.fixtures.js +167 -0
  112. package/dist/src/components/config-import/steps.d.ts +100 -0
  113. package/dist/src/components/config-import/steps.js +143 -0
  114. package/dist/src/components/layout/AppShellSkeleton.d.ts +9 -0
  115. package/dist/src/components/layout/AppShellSkeleton.js +12 -0
  116. package/dist/src/components/layout/ComposeFab.d.ts +12 -0
  117. package/dist/src/components/layout/ComposeFab.js +21 -0
  118. package/dist/src/components/layout/Drawer.d.ts +28 -0
  119. package/dist/src/components/layout/Drawer.js +37 -0
  120. package/dist/src/components/layout/MailShell.d.ts +51 -0
  121. package/dist/src/components/layout/MailShell.js +39 -0
  122. package/dist/src/components/layout/MailTopBar.d.ts +14 -0
  123. package/dist/src/components/layout/MailTopBar.js +44 -0
  124. package/dist/src/components/mail/AuthenticityBanner.d.ts +14 -0
  125. package/dist/src/components/mail/AuthenticityBanner.js +18 -0
  126. package/dist/src/components/mail/AutoMovedIndicator.d.ts +20 -0
  127. package/dist/src/components/mail/AutoMovedIndicator.js +25 -0
  128. package/dist/src/components/mail/BlockedImagesNotice.d.ts +17 -0
  129. package/dist/src/components/mail/BlockedImagesNotice.js +8 -0
  130. package/dist/src/components/mail/BriefPane.d.ts +33 -0
  131. package/dist/src/components/mail/BriefPane.js +255 -0
  132. package/dist/src/components/mail/BulkRunProvider.d.ts +90 -0
  133. package/dist/src/components/mail/BulkRunProvider.js +203 -0
  134. package/dist/src/components/mail/ConversationView.d.ts +52 -0
  135. package/dist/src/components/mail/ConversationView.js +279 -0
  136. package/dist/src/components/mail/DailyBrief.d.ts +46 -0
  137. package/dist/src/components/mail/DailyBrief.js +584 -0
  138. package/dist/src/components/mail/DeleteConfirmDialog.d.ts +25 -0
  139. package/dist/src/components/mail/DeleteConfirmDialog.js +70 -0
  140. package/dist/src/components/mail/DraftsView.d.ts +15 -0
  141. package/dist/src/components/mail/DraftsView.js +84 -0
  142. package/dist/src/components/mail/EmptyTrashBar.d.ts +47 -0
  143. package/dist/src/components/mail/EmptyTrashBar.js +73 -0
  144. package/dist/src/components/mail/FlaggedList.d.ts +20 -0
  145. package/dist/src/components/mail/FlaggedList.js +173 -0
  146. package/dist/src/components/mail/FlaggedPane.d.ts +29 -0
  147. package/dist/src/components/mail/FlaggedPane.js +225 -0
  148. package/dist/src/components/mail/IntelligenceDrawer.d.ts +19 -0
  149. package/dist/src/components/mail/IntelligenceDrawer.js +16 -0
  150. package/dist/src/components/mail/IntelligencePane.d.ts +59 -0
  151. package/dist/src/components/mail/IntelligencePane.js +130 -0
  152. package/dist/src/components/mail/LabelApplyTrigger.d.ts +15 -0
  153. package/dist/src/components/mail/LabelApplyTrigger.js +29 -0
  154. package/dist/src/components/mail/MailListHeader.d.ts +102 -0
  155. package/dist/src/components/mail/MailListHeader.js +303 -0
  156. package/dist/src/components/mail/MailNav.d.ts +17 -0
  157. package/dist/src/components/mail/MailNav.js +20 -0
  158. package/dist/src/components/mail/MailSidebarAdapter.d.ts +23 -0
  159. package/dist/src/components/mail/MailSidebarAdapter.js +161 -0
  160. package/dist/src/components/mail/MailViewChrome.d.ts +54 -0
  161. package/dist/src/components/mail/MailViewChrome.js +43 -0
  162. package/dist/src/components/mail/MailboxPane.d.ts +36 -0
  163. package/dist/src/components/mail/MailboxPane.js +705 -0
  164. package/dist/src/components/mail/MessageActionMenu.d.ts +36 -0
  165. package/dist/src/components/mail/MessageActionMenu.js +129 -0
  166. package/dist/src/components/mail/MessageAttachments.d.ts +21 -0
  167. package/dist/src/components/mail/MessageAttachments.js +96 -0
  168. package/dist/src/components/mail/MessageBody.d.ts +72 -0
  169. package/dist/src/components/mail/MessageBody.js +68 -0
  170. package/dist/src/components/mail/MessageBodyErrorBanner.d.ts +20 -0
  171. package/dist/src/components/mail/MessageBodyErrorBanner.js +29 -0
  172. package/dist/src/components/mail/MessageCard.d.ts +29 -0
  173. package/dist/src/components/mail/MessageCard.js +77 -0
  174. package/dist/src/components/mail/MessageList.d.ts +130 -0
  175. package/dist/src/components/mail/MessageList.js +896 -0
  176. package/dist/src/components/mail/MessageListItem.d.ts +32 -0
  177. package/dist/src/components/mail/MessageListItem.js +41 -0
  178. package/dist/src/components/mail/MessageRow.d.ts +57 -0
  179. package/dist/src/components/mail/MessageRow.js +137 -0
  180. package/dist/src/components/mail/MessageSettlementAlert.d.ts +27 -0
  181. package/dist/src/components/mail/MessageSettlementAlert.js +79 -0
  182. package/dist/src/components/mail/MessageToolbar.d.ts +58 -0
  183. package/dist/src/components/mail/MessageToolbar.js +80 -0
  184. package/dist/src/components/mail/MobileMessageBar.d.ts +25 -0
  185. package/dist/src/components/mail/MobileMessageBar.js +61 -0
  186. package/dist/src/components/mail/MoveToTrigger.d.ts +30 -0
  187. package/dist/src/components/mail/MoveToTrigger.js +114 -0
  188. package/dist/src/components/mail/NavMenuButton.d.ts +1 -0
  189. package/dist/src/components/mail/NavMenuButton.js +17 -0
  190. package/dist/src/components/mail/OutboxPane.d.ts +27 -0
  191. package/dist/src/components/mail/OutboxPane.js +247 -0
  192. package/dist/src/components/mail/PullToRefresh.d.ts +12 -0
  193. package/dist/src/components/mail/PullToRefresh.js +12 -0
  194. package/dist/src/components/mail/RawMessageView.d.ts +18 -0
  195. package/dist/src/components/mail/RawMessageView.js +30 -0
  196. package/dist/src/components/mail/RoleAppointmentPromptProvider.d.ts +39 -0
  197. package/dist/src/components/mail/RoleAppointmentPromptProvider.js +137 -0
  198. package/dist/src/components/mail/SelectionWizardHost.d.ts +110 -0
  199. package/dist/src/components/mail/SelectionWizardHost.js +721 -0
  200. package/dist/src/components/mail/SpamRescue.d.ts +17 -0
  201. package/dist/src/components/mail/SpamRescue.js +64 -0
  202. package/dist/src/components/mail/SwipeableMessageRow.d.ts +31 -0
  203. package/dist/src/components/mail/SwipeableMessageRow.js +69 -0
  204. package/dist/src/components/mail/ThreadListInteraction.d.ts +106 -0
  205. package/dist/src/components/mail/ThreadListInteraction.js +319 -0
  206. package/dist/src/components/mail/bulk-run-state.d.ts +37 -0
  207. package/dist/src/components/mail/bulk-run-state.js +64 -0
  208. package/dist/src/components/mail/intelligence-story-calendar.d.ts +7 -0
  209. package/dist/src/components/mail/intelligence-story-calendar.js +17 -0
  210. package/dist/src/components/mail/message-body-error-banner-content.d.ts +31 -0
  211. package/dist/src/components/mail/message-body-error-banner-content.js +70 -0
  212. package/dist/src/components/mail/organize-run-state.d.ts +26 -0
  213. package/dist/src/components/mail/organize-run-state.js +24 -0
  214. package/dist/src/components/mail/selection-wizard-run-controls.d.ts +66 -0
  215. package/dist/src/components/mail/selection-wizard-run-controls.js +65 -0
  216. package/dist/src/components/mail/useModifierSelect.d.ts +35 -0
  217. package/dist/src/components/mail/useModifierSelect.js +75 -0
  218. package/dist/src/components/onboarding/OnboardingWizard.d.ts +83 -0
  219. package/dist/src/components/onboarding/OnboardingWizard.js +661 -0
  220. package/dist/src/components/onboarding/credential-steps.d.ts +58 -0
  221. package/dist/src/components/onboarding/credential-steps.js +198 -0
  222. package/dist/src/components/self-update/SelfUpdateOverlay.d.ts +1 -0
  223. package/dist/src/components/self-update/SelfUpdateOverlay.js +25 -0
  224. package/dist/src/components/settings/AccountFormPanel.d.ts +29 -0
  225. package/dist/src/components/settings/AccountFormPanel.js +337 -0
  226. package/dist/src/components/settings/AccountServices.d.ts +6 -0
  227. package/dist/src/components/settings/AccountServices.js +100 -0
  228. package/dist/src/components/settings/AccountServicesCard.d.ts +16 -0
  229. package/dist/src/components/settings/AccountServicesCard.js +13 -0
  230. package/dist/src/components/settings/AdvancedNavIcon.d.ts +1 -0
  231. package/dist/src/components/settings/AdvancedNavIcon.js +17 -0
  232. package/dist/src/components/settings/CalendarCreateCard.d.ts +12 -0
  233. package/dist/src/components/settings/CalendarCreateCard.js +42 -0
  234. package/dist/src/components/settings/CalendarDetailsForm.d.ts +15 -0
  235. package/dist/src/components/settings/CalendarDetailsForm.js +34 -0
  236. package/dist/src/components/settings/CalendarFeedCard.d.ts +18 -0
  237. package/dist/src/components/settings/CalendarFeedCard.js +58 -0
  238. package/dist/src/components/settings/CalendarFeedPanel.d.ts +13 -0
  239. package/dist/src/components/settings/CalendarFeedPanel.js +7 -0
  240. package/dist/src/components/settings/CalendarSettingsPanel.d.ts +13 -0
  241. package/dist/src/components/settings/CalendarSettingsPanel.js +21 -0
  242. package/dist/src/components/settings/CalendarSubscribeCard.d.ts +11 -0
  243. package/dist/src/components/settings/CalendarSubscribeCard.js +30 -0
  244. package/dist/src/components/settings/CalendarSubscriptionStatus.d.ts +12 -0
  245. package/dist/src/components/settings/CalendarSubscriptionStatus.js +20 -0
  246. package/dist/src/components/settings/ConfigExportCard.d.ts +18 -0
  247. package/dist/src/components/settings/ConfigExportCard.js +16 -0
  248. package/dist/src/components/settings/ConfigTransferPanel.d.ts +15 -0
  249. package/dist/src/components/settings/ConfigTransferPanel.js +55 -0
  250. package/dist/src/components/settings/DangerZone.d.ts +1 -0
  251. package/dist/src/components/settings/DangerZone.js +8 -0
  252. package/dist/src/components/settings/DeleteAccountDialog.d.ts +13 -0
  253. package/dist/src/components/settings/DeleteAccountDialog.js +62 -0
  254. package/dist/src/components/settings/DeleteFolderDialog.d.ts +21 -0
  255. package/dist/src/components/settings/DeleteFolderDialog.js +116 -0
  256. package/dist/src/components/settings/FilterActionError.d.ts +8 -0
  257. package/dist/src/components/settings/FilterActionError.js +10 -0
  258. package/dist/src/components/settings/FilterEditor.d.ts +22 -0
  259. package/dist/src/components/settings/FilterEditor.js +143 -0
  260. package/dist/src/components/settings/FilterEditorSurface.d.ts +18 -0
  261. package/dist/src/components/settings/FilterEditorSurface.js +18 -0
  262. package/dist/src/components/settings/FiltersList.d.ts +31 -0
  263. package/dist/src/components/settings/FiltersList.js +58 -0
  264. package/dist/src/components/settings/LabelsList.d.ts +15 -0
  265. package/dist/src/components/settings/LabelsList.js +37 -0
  266. package/dist/src/components/settings/SelfUpdatePanel.d.ts +1 -0
  267. package/dist/src/components/settings/SelfUpdatePanel.js +19 -0
  268. package/dist/src/components/settings/TimeZoneSelect.d.ts +12 -0
  269. package/dist/src/components/settings/TimeZoneSelect.js +10 -0
  270. package/dist/src/components/settings/TlsRootCaDownload.d.ts +1 -0
  271. package/dist/src/components/settings/TlsRootCaDownload.js +15 -0
  272. package/dist/src/components/settings/WarningsNavIcon.d.ts +1 -0
  273. package/dist/src/components/settings/WarningsNavIcon.js +8 -0
  274. package/dist/src/components/settings/WarningsPanel.d.ts +21 -0
  275. package/dist/src/components/settings/WarningsPanel.js +93 -0
  276. package/dist/src/components/settings/account-form-helpers.d.ts +53 -0
  277. package/dist/src/components/settings/account-form-helpers.js +78 -0
  278. package/dist/src/components/ui/AppVersion.d.ts +12 -0
  279. package/dist/src/components/ui/AppVersion.js +19 -0
  280. package/dist/src/components/ui/BugReportButton.d.ts +6 -0
  281. package/dist/src/components/ui/BugReportButton.js +11 -0
  282. package/dist/src/components/ui/ErrorBannerProvider.d.ts +27 -0
  283. package/dist/src/components/ui/ErrorBannerProvider.js +82 -0
  284. package/dist/src/components/ui/FatalErrorOverlay.d.ts +31 -0
  285. package/dist/src/components/ui/FatalErrorOverlay.js +71 -0
  286. package/dist/src/components/ui/error-banners.d.ts +43 -0
  287. package/dist/src/components/ui/error-banners.js +69 -0
  288. package/dist/src/components/ui/folder-role-refusal.d.ts +29 -0
  289. package/dist/src/components/ui/folder-role-refusal.js +44 -0
  290. package/dist/src/components/ui/placement-refusal.d.ts +31 -0
  291. package/dist/src/components/ui/placement-refusal.js +39 -0
  292. package/dist/src/hooks/calendar/agenda-window.d.ts +110 -0
  293. package/dist/src/hooks/calendar/agenda-window.js +159 -0
  294. package/dist/src/hooks/calendar/draft.d.ts +59 -0
  295. package/dist/src/hooks/calendar/draft.js +142 -0
  296. package/dist/src/hooks/calendar/index.d.ts +24 -0
  297. package/dist/src/hooks/calendar/index.js +24 -0
  298. package/dist/src/hooks/calendar/instance.d.ts +61 -0
  299. package/dist/src/hooks/calendar/instance.js +145 -0
  300. package/dist/src/hooks/calendar/recurrence-rule.d.ts +29 -0
  301. package/dist/src/hooks/calendar/recurrence-rule.js +159 -0
  302. package/dist/src/hooks/calendar/resource.d.ts +14 -0
  303. package/dist/src/hooks/calendar/resource.js +87 -0
  304. package/dist/src/hooks/calendar/selection.d.ts +38 -0
  305. package/dist/src/hooks/calendar/selection.js +54 -0
  306. package/dist/src/hooks/calendar/suggestion-draft.d.ts +11 -0
  307. package/dist/src/hooks/calendar/suggestion-draft.js +45 -0
  308. package/dist/src/hooks/calendar/useCalendarCollectionWrites.d.ts +26 -0
  309. package/dist/src/hooks/calendar/useCalendarCollectionWrites.js +75 -0
  310. package/dist/src/hooks/calendar/useCalendarEvent.d.ts +8 -0
  311. package/dist/src/hooks/calendar/useCalendarEvent.js +32 -0
  312. package/dist/src/hooks/calendar/useCalendarEvents.d.ts +58 -0
  313. package/dist/src/hooks/calendar/useCalendarEvents.js +128 -0
  314. package/dist/src/hooks/calendar/useCalendarFeed.d.ts +29 -0
  315. package/dist/src/hooks/calendar/useCalendarFeed.js +115 -0
  316. package/dist/src/hooks/calendar/useCalendarFreeBusy.d.ts +15 -0
  317. package/dist/src/hooks/calendar/useCalendarFreeBusy.js +61 -0
  318. package/dist/src/hooks/calendar/useCalendarJump.d.ts +24 -0
  319. package/dist/src/hooks/calendar/useCalendarJump.js +95 -0
  320. package/dist/src/hooks/calendar/useCalendarSubscriptions.d.ts +17 -0
  321. package/dist/src/hooks/calendar/useCalendarSubscriptions.js +66 -0
  322. package/dist/src/hooks/calendar/useCalendarSuggestions.d.ts +45 -0
  323. package/dist/src/hooks/calendar/useCalendarSuggestions.js +171 -0
  324. package/dist/src/hooks/calendar/useCalendarWrites.d.ts +44 -0
  325. package/dist/src/hooks/calendar/useCalendarWrites.js +109 -0
  326. package/dist/src/hooks/calendar/useCalendars.d.ts +20 -0
  327. package/dist/src/hooks/calendar/useCalendars.js +30 -0
  328. package/dist/src/hooks/calendar/useDraftClashes.d.ts +15 -0
  329. package/dist/src/hooks/calendar/useDraftClashes.js +68 -0
  330. package/dist/src/hooks/calendar/window.d.ts +57 -0
  331. package/dist/src/hooks/calendar/window.js +135 -0
  332. package/dist/src/hooks/queries/keys.d.ts +5 -0
  333. package/dist/src/hooks/queries/keys.js +5 -0
  334. package/dist/src/hooks/use-system-update.d.ts +40 -0
  335. package/dist/src/hooks/use-system-update.js +237 -0
  336. package/dist/src/hooks/useApplyLabel.d.ts +17 -0
  337. package/dist/src/hooks/useApplyLabel.js +41 -0
  338. package/dist/src/hooks/useArchiveMailbox.d.ts +74 -0
  339. package/dist/src/hooks/useArchiveMailbox.js +120 -0
  340. package/dist/src/hooks/useAutoMovedBadge.d.ts +56 -0
  341. package/dist/src/hooks/useAutoMovedBadge.js +86 -0
  342. package/dist/src/hooks/useBriefSections.d.ts +70 -0
  343. package/dist/src/hooks/useBriefSections.js +210 -0
  344. package/dist/src/hooks/useCalendarData.d.ts +37 -0
  345. package/dist/src/hooks/useCalendarData.js +23 -0
  346. package/dist/src/hooks/useClauseSuggestions.d.ts +14 -0
  347. package/dist/src/hooks/useClauseSuggestions.js +39 -0
  348. package/dist/src/hooks/useComposeAttachments.d.ts +20 -0
  349. package/dist/src/hooks/useComposeAttachments.js +72 -0
  350. package/dist/src/hooks/useComposeLanguages.d.ts +11 -0
  351. package/dist/src/hooks/useComposeLanguages.js +44 -0
  352. package/dist/src/hooks/useCreateMailbox.d.ts +40 -0
  353. package/dist/src/hooks/useCreateMailbox.js +123 -0
  354. package/dist/src/hooks/useCurrentMailboxName.d.ts +39 -0
  355. package/dist/src/hooks/useCurrentMailboxName.js +109 -0
  356. package/dist/src/hooks/useDebouncedValue.d.ts +1 -0
  357. package/dist/src/hooks/useDebouncedValue.js +9 -0
  358. package/dist/src/hooks/useDeleteFolder.d.ts +36 -0
  359. package/dist/src/hooks/useDeleteFolder.js +280 -0
  360. package/dist/src/hooks/useDeleteMessages.d.ts +41 -0
  361. package/dist/src/hooks/useDeleteMessages.js +171 -0
  362. package/dist/src/hooks/useDeleteOutcome.d.ts +14 -0
  363. package/dist/src/hooks/useDeleteOutcome.js +46 -0
  364. package/dist/src/hooks/useEmptyTrash.d.ts +16 -0
  365. package/dist/src/hooks/useEmptyTrash.js +130 -0
  366. package/dist/src/hooks/useEscalatedActions.d.ts +83 -0
  367. package/dist/src/hooks/useEscalatedActions.js +175 -0
  368. package/dist/src/hooks/useFilters.d.ts +57 -0
  369. package/dist/src/hooks/useFilters.js +147 -0
  370. package/dist/src/hooks/useFolderLabelTranslator.d.ts +6 -0
  371. package/dist/src/hooks/useFolderLabelTranslator.js +11 -0
  372. package/dist/src/hooks/useFollowFocusOpen.d.ts +28 -0
  373. package/dist/src/hooks/useFollowFocusOpen.js +52 -0
  374. package/dist/src/hooks/useInitialSyncProgress.d.ts +41 -0
  375. package/dist/src/hooks/useInitialSyncProgress.js +111 -0
  376. package/dist/src/hooks/useInlineImages.d.ts +16 -0
  377. package/dist/src/hooks/useInlineImages.js +52 -0
  378. package/dist/src/hooks/useIntelligenceCalendar.d.ts +20 -0
  379. package/dist/src/hooks/useIntelligenceCalendar.js +230 -0
  380. package/dist/src/hooks/useIntelligenceData.d.ts +58 -0
  381. package/dist/src/hooks/useIntelligenceData.js +242 -0
  382. package/dist/src/hooks/useIntelligenceDrawer.d.ts +21 -0
  383. package/dist/src/hooks/useIntelligenceDrawer.js +22 -0
  384. package/dist/src/hooks/useIntelligenceSurface.d.ts +44 -0
  385. package/dist/src/hooks/useIntelligenceSurface.js +57 -0
  386. package/dist/src/hooks/useIsDark.d.ts +8 -0
  387. package/dist/src/hooks/useIsDark.js +21 -0
  388. package/dist/src/hooks/useKeyboardNavigation.d.ts +57 -0
  389. package/dist/src/hooks/useKeyboardNavigation.js +61 -0
  390. package/dist/src/hooks/useLabels.d.ts +40 -0
  391. package/dist/src/hooks/useLabels.js +98 -0
  392. package/dist/src/hooks/useLayoutTier.d.ts +33 -0
  393. package/dist/src/hooks/useLayoutTier.js +33 -0
  394. package/dist/src/hooks/useMailboxAccount.d.ts +18 -0
  395. package/dist/src/hooks/useMailboxAccount.js +48 -0
  396. package/dist/src/hooks/useMailboxNameIndex.d.ts +2 -0
  397. package/dist/src/hooks/useMailboxNameIndex.js +21 -0
  398. package/dist/src/hooks/useMarkAsRead.d.ts +59 -0
  399. package/dist/src/hooks/useMarkAsRead.js +206 -0
  400. package/dist/src/hooks/useMatchSample.d.ts +30 -0
  401. package/dist/src/hooks/useMatchSample.js +74 -0
  402. package/dist/src/hooks/useMediaQuery.d.ts +11 -0
  403. package/dist/src/hooks/useMediaQuery.js +12 -0
  404. package/dist/src/hooks/useMessageBodyContent.d.ts +148 -0
  405. package/dist/src/hooks/useMessageBodyContent.js +272 -0
  406. package/dist/src/hooks/useMoveMessages.d.ts +27 -0
  407. package/dist/src/hooks/useMoveMessages.js +128 -0
  408. package/dist/src/hooks/useOrganizeJob.d.ts +39 -0
  409. package/dist/src/hooks/useOrganizeJob.js +95 -0
  410. package/dist/src/hooks/useRailPanels.d.ts +17 -0
  411. package/dist/src/hooks/useRailPanels.js +94 -0
  412. package/dist/src/hooks/useRedirectEnded.d.ts +41 -0
  413. package/dist/src/hooks/useRedirectEnded.js +106 -0
  414. package/dist/src/hooks/useRefreshControl.d.ts +97 -0
  415. package/dist/src/hooks/useRefreshControl.js +234 -0
  416. package/dist/src/hooks/useReportSpam.d.ts +102 -0
  417. package/dist/src/hooks/useReportSpam.js +173 -0
  418. package/dist/src/hooks/useRescueCandidates.d.ts +15 -0
  419. package/dist/src/hooks/useRescueCandidates.js +41 -0
  420. package/dist/src/hooks/useResultCount.d.ts +26 -0
  421. package/dist/src/hooks/useResultCount.js +40 -0
  422. package/dist/src/hooks/useResultFolderIndex.d.ts +8 -0
  423. package/dist/src/hooks/useResultFolderIndex.js +45 -0
  424. package/dist/src/hooks/useReturnFromRedirect.d.ts +19 -0
  425. package/dist/src/hooks/useReturnFromRedirect.js +38 -0
  426. package/dist/src/hooks/useRulePreview.d.ts +28 -0
  427. package/dist/src/hooks/useRulePreview.js +77 -0
  428. package/dist/src/hooks/useSaveDraft.d.ts +31 -0
  429. package/dist/src/hooks/useSaveDraft.js +183 -0
  430. package/dist/src/hooks/useSearchScope.d.ts +15 -0
  431. package/dist/src/hooks/useSearchScope.js +30 -0
  432. package/dist/src/hooks/useSearchSuggestions.d.ts +12 -0
  433. package/dist/src/hooks/useSearchSuggestions.js +77 -0
  434. package/dist/src/hooks/useSearchTokenContext.d.ts +16 -0
  435. package/dist/src/hooks/useSearchTokenContext.js +26 -0
  436. package/dist/src/hooks/useSelectedSubjects.d.ts +6 -0
  437. package/dist/src/hooks/useSelectedSubjects.js +62 -0
  438. package/dist/src/hooks/useSignature.d.ts +9 -0
  439. package/dist/src/hooks/useSignature.js +47 -0
  440. package/dist/src/hooks/useSpamMatchCounts.d.ts +15 -0
  441. package/dist/src/hooks/useSpamMatchCounts.js +74 -0
  442. package/dist/src/hooks/useStaleAccountSync.d.ts +101 -0
  443. package/dist/src/hooks/useStaleAccountSync.js +252 -0
  444. package/dist/src/hooks/useStarredThreads.d.ts +42 -0
  445. package/dist/src/hooks/useStarredThreads.js +100 -0
  446. package/dist/src/hooks/useThreadActions.d.ts +41 -0
  447. package/dist/src/hooks/useThreadActions.js +64 -0
  448. package/dist/src/hooks/useThreadMessageIds.d.ts +10 -0
  449. package/dist/src/hooks/useThreadMessageIds.js +22 -0
  450. package/dist/src/hooks/useThreadRow.d.ts +23 -0
  451. package/dist/src/hooks/useThreadRow.js +40 -0
  452. package/dist/src/hooks/useToggleStar.d.ts +31 -0
  453. package/dist/src/hooks/useToggleStar.js +96 -0
  454. package/dist/src/hooks/useToggleTrusted.d.ts +23 -0
  455. package/dist/src/hooks/useToggleTrusted.js +100 -0
  456. package/dist/src/hooks/useTriageLayer.d.ts +80 -0
  457. package/dist/src/hooks/useTriageLayer.js +99 -0
  458. package/dist/src/hooks/useTriggerSync.d.ts +30 -0
  459. package/dist/src/hooks/useTriggerSync.js +42 -0
  460. package/dist/src/hooks/useUpdateAddressFlags.d.ts +18 -0
  461. package/dist/src/hooks/useUpdateAddressFlags.js +93 -0
  462. package/dist/src/hooks/useUpdateFilter.d.ts +16 -0
  463. package/dist/src/hooks/useUpdateFilter.js +45 -0
  464. package/dist/src/hooks/useVisualViewport.d.ts +13 -0
  465. package/dist/src/hooks/useVisualViewport.js +37 -0
  466. package/dist/src/hooks/useWarningsAttention.d.ts +9 -0
  467. package/dist/src/hooks/useWarningsAttention.js +31 -0
  468. package/dist/src/index.css +27 -0
  469. package/dist/src/lib/account-order.d.ts +3 -0
  470. package/dist/src/lib/account-order.js +6 -0
  471. package/dist/src/lib/adjacent-message.d.ts +9 -0
  472. package/dist/src/lib/adjacent-message.js +19 -0
  473. package/dist/src/lib/api.d.ts +35 -0
  474. package/dist/src/lib/api.js +73 -0
  475. package/dist/src/lib/app-info.d.ts +24 -0
  476. package/dist/src/lib/app-info.js +26 -0
  477. package/dist/src/lib/attachment-download.d.ts +63 -0
  478. package/dist/src/lib/attachment-download.js +130 -0
  479. package/dist/src/lib/auto-moved.d.ts +46 -0
  480. package/dist/src/lib/auto-moved.js +82 -0
  481. package/dist/src/lib/autodiscovery.d.ts +42 -0
  482. package/dist/src/lib/autodiscovery.js +320 -0
  483. package/dist/src/lib/brief-criteria.d.ts +69 -0
  484. package/dist/src/lib/brief-criteria.js +62 -0
  485. package/dist/src/lib/brief.d.ts +98 -0
  486. package/dist/src/lib/brief.js +164 -0
  487. package/dist/src/lib/bug-report.d.ts +67 -0
  488. package/dist/src/lib/bug-report.js +212 -0
  489. package/dist/src/lib/bulk-action-copy.d.ts +67 -0
  490. package/dist/src/lib/bulk-action-copy.js +106 -0
  491. package/dist/src/lib/bulk-actions.d.ts +228 -0
  492. package/dist/src/lib/bulk-actions.js +242 -0
  493. package/dist/src/lib/calendar-collection-copy.d.ts +7 -0
  494. package/dist/src/lib/calendar-collection-copy.js +12 -0
  495. package/dist/src/lib/calendar-density.d.ts +26 -0
  496. package/dist/src/lib/calendar-density.js +31 -0
  497. package/dist/src/lib/calendar-feed-copy.d.ts +14 -0
  498. package/dist/src/lib/calendar-feed-copy.js +16 -0
  499. package/dist/src/lib/calendar-feed-url.d.ts +9 -0
  500. package/dist/src/lib/calendar-feed-url.js +11 -0
  501. package/dist/src/lib/calendar-format.d.ts +25 -0
  502. package/dist/src/lib/calendar-format.js +57 -0
  503. package/dist/src/lib/calendar-report.d.ts +4 -0
  504. package/dist/src/lib/calendar-report.js +15 -0
  505. package/dist/src/lib/calendar-route.d.ts +93 -0
  506. package/dist/src/lib/calendar-route.js +145 -0
  507. package/dist/src/lib/calendar-subscription.d.ts +6 -0
  508. package/dist/src/lib/calendar-subscription.js +8 -0
  509. package/dist/src/lib/calendar-suggestion.d.ts +56 -0
  510. package/dist/src/lib/calendar-suggestion.js +165 -0
  511. package/dist/src/lib/client.d.ts +2 -0
  512. package/dist/src/lib/client.js +30 -0
  513. package/dist/src/lib/compose-attachment-controller.d.ts +90 -0
  514. package/dist/src/lib/compose-attachment-controller.js +359 -0
  515. package/dist/src/lib/config-import.d.ts +136 -0
  516. package/dist/src/lib/config-import.js +371 -0
  517. package/dist/src/lib/console-errors.d.ts +16 -0
  518. package/dist/src/lib/console-errors.js +80 -0
  519. package/dist/src/lib/conversation-target.d.ts +16 -0
  520. package/dist/src/lib/conversation-target.js +1 -0
  521. package/dist/src/lib/dedupe-thread-messages.d.ts +14 -0
  522. package/dist/src/lib/dedupe-thread-messages.js +23 -0
  523. package/dist/src/lib/delete-folder.d.ts +66 -0
  524. package/dist/src/lib/delete-folder.js +110 -0
  525. package/dist/src/lib/display-category.d.ts +18 -0
  526. package/dist/src/lib/display-category.js +20 -0
  527. package/dist/src/lib/drafts.d.ts +50 -0
  528. package/dist/src/lib/drafts.js +91 -0
  529. package/dist/src/lib/error-classifier.d.ts +155 -0
  530. package/dist/src/lib/error-classifier.js +213 -0
  531. package/dist/src/lib/escalation-label.d.ts +18 -0
  532. package/dist/src/lib/escalation-label.js +20 -0
  533. package/dist/src/lib/fatal-error.d.ts +68 -0
  534. package/dist/src/lib/fatal-error.js +88 -0
  535. package/dist/src/lib/filter-report.d.ts +2 -0
  536. package/dist/src/lib/filter-report.js +13 -0
  537. package/dist/src/lib/flagged-criteria.d.ts +36 -0
  538. package/dist/src/lib/flagged-criteria.js +22 -0
  539. package/dist/src/lib/folder-failure.d.ts +2 -0
  540. package/dist/src/lib/folder-failure.js +8 -0
  541. package/dist/src/lib/folder-roles.d.ts +33 -0
  542. package/dist/src/lib/folder-roles.js +83 -0
  543. package/dist/src/lib/format.d.ts +156 -0
  544. package/dist/src/lib/format.js +269 -0
  545. package/dist/src/lib/fresh-mailbox-count.d.ts +76 -0
  546. package/dist/src/lib/fresh-mailbox-count.js +37 -0
  547. package/dist/src/lib/hot-sync-window.d.ts +28 -0
  548. package/dist/src/lib/hot-sync-window.js +41 -0
  549. package/dist/src/lib/i18n.d.ts +2 -0
  550. package/dist/src/lib/i18n.js +29 -0
  551. package/dist/src/lib/inbox-filters.d.ts +76 -0
  552. package/dist/src/lib/inbox-filters.js +95 -0
  553. package/dist/src/lib/intelligence-pref.d.ts +43 -0
  554. package/dist/src/lib/intelligence-pref.js +41 -0
  555. package/dist/src/lib/json.d.ts +8 -0
  556. package/dist/src/lib/json.js +10 -0
  557. package/dist/src/lib/junk-destination.d.ts +15 -0
  558. package/dist/src/lib/junk-destination.js +24 -0
  559. package/dist/src/lib/list-focus.d.ts +14 -0
  560. package/dist/src/lib/list-focus.js +21 -0
  561. package/dist/src/lib/list-header-chrome.d.ts +40 -0
  562. package/dist/src/lib/list-header-chrome.js +12 -0
  563. package/dist/src/lib/list-narrowing.d.ts +35 -0
  564. package/dist/src/lib/list-narrowing.js +133 -0
  565. package/dist/src/lib/list-verb-request.d.ts +43 -0
  566. package/dist/src/lib/list-verb-request.js +24 -0
  567. package/dist/src/lib/mail-context.d.ts +61 -0
  568. package/dist/src/lib/mail-context.js +24 -0
  569. package/dist/src/lib/mail-freshness.d.ts +57 -0
  570. package/dist/src/lib/mail-freshness.js +158 -0
  571. package/dist/src/lib/mail-route.d.ts +103 -0
  572. package/dist/src/lib/mail-route.js +115 -0
  573. package/dist/src/lib/mail-search.d.ts +141 -0
  574. package/dist/src/lib/mail-search.js +55 -0
  575. package/dist/src/lib/mailbox-sync-wait.d.ts +54 -0
  576. package/dist/src/lib/mailbox-sync-wait.js +44 -0
  577. package/dist/src/lib/message-attachments.d.ts +20 -0
  578. package/dist/src/lib/message-attachments.js +37 -0
  579. package/dist/src/lib/message-body-source.d.ts +30 -0
  580. package/dist/src/lib/message-body-source.js +30 -0
  581. package/dist/src/lib/move-options.d.ts +30 -0
  582. package/dist/src/lib/move-options.js +33 -0
  583. package/dist/src/lib/move-targets.d.ts +16 -0
  584. package/dist/src/lib/move-targets.js +61 -0
  585. package/dist/src/lib/network-error.d.ts +31 -0
  586. package/dist/src/lib/network-error.js +68 -0
  587. package/dist/src/lib/new-folder.d.ts +23 -0
  588. package/dist/src/lib/new-folder.js +41 -0
  589. package/dist/src/lib/onboarding-completion.d.ts +15 -0
  590. package/dist/src/lib/onboarding-completion.js +17 -0
  591. package/dist/src/lib/organize/clause-suggestions.d.ts +40 -0
  592. package/dist/src/lib/organize/clause-suggestions.js +61 -0
  593. package/dist/src/lib/organize/filter-edit-model.d.ts +47 -0
  594. package/dist/src/lib/organize/filter-edit-model.js +104 -0
  595. package/dist/src/lib/organize/filter-run.d.ts +27 -0
  596. package/dist/src/lib/organize/filter-run.js +27 -0
  597. package/dist/src/lib/organize/filter-status.d.ts +30 -0
  598. package/dist/src/lib/organize/filter-status.js +84 -0
  599. package/dist/src/lib/organize/label-delete-copy.d.ts +11 -0
  600. package/dist/src/lib/organize/label-delete-copy.js +17 -0
  601. package/dist/src/lib/organize/organize-model.d.ts +110 -0
  602. package/dist/src/lib/organize/organize-model.js +81 -0
  603. package/dist/src/lib/organize/organize-poll.d.ts +11 -0
  604. package/dist/src/lib/organize/organize-poll.js +21 -0
  605. package/dist/src/lib/organize/rule-model.d.ts +69 -0
  606. package/dist/src/lib/organize/rule-model.js +98 -0
  607. package/dist/src/lib/organize/search-to-rule.d.ts +19 -0
  608. package/dist/src/lib/organize/search-to-rule.js +65 -0
  609. package/dist/src/lib/outbox-search.d.ts +34 -0
  610. package/dist/src/lib/outbox-search.js +26 -0
  611. package/dist/src/lib/outbox-status.d.ts +47 -0
  612. package/dist/src/lib/outbox-status.js +45 -0
  613. package/dist/src/lib/provider-presets.d.ts +16 -0
  614. package/dist/src/lib/provider-presets.js +82 -0
  615. package/dist/src/lib/quarantine-entries.d.ts +15 -0
  616. package/dist/src/lib/quarantine-entries.js +40 -0
  617. package/dist/src/lib/query-error-handler.d.ts +21 -0
  618. package/dist/src/lib/query-error-handler.js +30 -0
  619. package/dist/src/lib/recent-searches.d.ts +2 -0
  620. package/dist/src/lib/recent-searches.js +37 -0
  621. package/dist/src/lib/recipient-suggestions.d.ts +2 -0
  622. package/dist/src/lib/recipient-suggestions.js +11 -0
  623. package/dist/src/lib/request-breadcrumbs.d.ts +59 -0
  624. package/dist/src/lib/request-breadcrumbs.js +114 -0
  625. package/dist/src/lib/rescue-candidates.d.ts +17 -0
  626. package/dist/src/lib/rescue-candidates.js +27 -0
  627. package/dist/src/lib/rescue-telemetry.d.ts +26 -0
  628. package/dist/src/lib/rescue-telemetry.js +32 -0
  629. package/dist/src/lib/result-count.d.ts +43 -0
  630. package/dist/src/lib/result-count.js +37 -0
  631. package/dist/src/lib/result-folder.d.ts +57 -0
  632. package/dist/src/lib/result-folder.js +67 -0
  633. package/dist/src/lib/route-breadcrumbs.d.ts +27 -0
  634. package/dist/src/lib/route-breadcrumbs.js +36 -0
  635. package/dist/src/lib/row-settlement.d.ts +11 -0
  636. package/dist/src/lib/row-settlement.js +20 -0
  637. package/dist/src/lib/rum-adapter.d.ts +4 -0
  638. package/dist/src/lib/rum-adapter.js +84 -0
  639. package/dist/src/lib/search-conversion.d.ts +17 -0
  640. package/dist/src/lib/search-conversion.js +17 -0
  641. package/dist/src/lib/search-params.d.ts +23 -0
  642. package/dist/src/lib/search-params.js +58 -0
  643. package/dist/src/lib/search-query.d.ts +1 -0
  644. package/dist/src/lib/search-query.js +10 -0
  645. package/dist/src/lib/search-result.d.ts +10 -0
  646. package/dist/src/lib/search-result.js +34 -0
  647. package/dist/src/lib/search-scope.d.ts +94 -0
  648. package/dist/src/lib/search-scope.js +86 -0
  649. package/dist/src/lib/search-suggestions.d.ts +98 -0
  650. package/dist/src/lib/search-suggestions.js +202 -0
  651. package/dist/src/lib/search-surface.d.ts +30 -0
  652. package/dist/src/lib/search-surface.js +23 -0
  653. package/dist/src/lib/search-token-index.d.ts +43 -0
  654. package/dist/src/lib/search-token-index.js +92 -0
  655. package/dist/src/lib/search-tokens.d.ts +136 -0
  656. package/dist/src/lib/search-tokens.js +206 -0
  657. package/dist/src/lib/search-view.d.ts +53 -0
  658. package/dist/src/lib/search-view.js +71 -0
  659. package/dist/src/lib/selection-account-scope.d.ts +18 -0
  660. package/dist/src/lib/selection-account-scope.js +26 -0
  661. package/dist/src/lib/selection-mode.d.ts +17 -0
  662. package/dist/src/lib/selection-mode.js +14 -0
  663. package/dist/src/lib/self-update-state.d.ts +156 -0
  664. package/dist/src/lib/self-update-state.js +384 -0
  665. package/dist/src/lib/sender-address.d.ts +24 -0
  666. package/dist/src/lib/sender-address.js +28 -0
  667. package/dist/src/lib/session-storage.d.ts +1 -0
  668. package/dist/src/lib/session-storage.js +8 -0
  669. package/dist/src/lib/spam-offer.d.ts +69 -0
  670. package/dist/src/lib/spam-offer.js +90 -0
  671. package/dist/src/lib/stale-build.d.ts +10 -0
  672. package/dist/src/lib/stale-build.js +24 -0
  673. package/dist/src/lib/starred-rows.d.ts +24 -0
  674. package/dist/src/lib/starred-rows.js +32 -0
  675. package/dist/src/lib/sync-warning-entries.d.ts +4 -0
  676. package/dist/src/lib/sync-warning-entries.js +22 -0
  677. package/dist/src/lib/telemetry-context.d.ts +3 -0
  678. package/dist/src/lib/telemetry-context.js +6 -0
  679. package/dist/src/lib/telemetry.d.ts +7 -0
  680. package/dist/src/lib/telemetry.js +6 -0
  681. package/dist/src/lib/theme-preference.d.ts +16 -0
  682. package/dist/src/lib/theme-preference.js +40 -0
  683. package/dist/src/lib/theme.d.ts +11 -0
  684. package/dist/src/lib/theme.js +31 -0
  685. package/dist/src/lib/thread-cache.d.ts +41 -0
  686. package/dist/src/lib/thread-cache.js +34 -0
  687. package/dist/src/lib/thread-list-cache.d.ts +51 -0
  688. package/dist/src/lib/thread-list-cache.js +51 -0
  689. package/dist/src/lib/thread-search-tokens.d.ts +61 -0
  690. package/dist/src/lib/thread-search-tokens.js +116 -0
  691. package/dist/src/lib/wizard-selection.d.ts +27 -0
  692. package/dist/src/lib/wizard-selection.js +17 -0
  693. package/dist/src/main.d.ts +1 -0
  694. package/dist/src/main.js +9 -0
  695. package/dist/src/routeTree.gen.d.ts +1596 -0
  696. package/dist/src/routeTree.gen.js +414 -0
  697. package/dist/src/router.d.ts +12 -0
  698. package/dist/src/router.js +40 -0
  699. package/dist/src/routes/__root.d.ts +2 -0
  700. package/dist/src/routes/__root.js +46 -0
  701. package/dist/src/routes/calendar/$view.$date/$calendarObjectId/$recurrenceId.d.ts +13 -0
  702. package/dist/src/routes/calendar/$view.$date/$calendarObjectId/$recurrenceId.js +18 -0
  703. package/dist/src/routes/calendar/$view.$date/$calendarObjectId/index.d.ts +13 -0
  704. package/dist/src/routes/calendar/$view.$date/$calendarObjectId/index.js +15 -0
  705. package/dist/src/routes/calendar/$view.$date/$calendarObjectId.d.ts +13 -0
  706. package/dist/src/routes/calendar/$view.$date/$calendarObjectId.js +12 -0
  707. package/dist/src/routes/calendar/$view.$date/index.d.ts +18 -0
  708. package/dist/src/routes/calendar/$view.$date/index.js +16 -0
  709. package/dist/src/routes/calendar/$view.$date/new.d.ts +13 -0
  710. package/dist/src/routes/calendar/$view.$date/new.js +19 -0
  711. package/dist/src/routes/calendar/$view.$date/suggestion.$suggestionId.d.ts +13 -0
  712. package/dist/src/routes/calendar/$view.$date/suggestion.$suggestionId.js +15 -0
  713. package/dist/src/routes/calendar/$view.$date.d.ts +13 -0
  714. package/dist/src/routes/calendar/$view.$date.js +69 -0
  715. package/dist/src/routes/calendar/index.d.ts +13 -0
  716. package/dist/src/routes/calendar/index.js +22 -0
  717. package/dist/src/routes/calendar.d.ts +14 -0
  718. package/dist/src/routes/calendar.js +68 -0
  719. package/dist/src/routes/import.d.ts +1 -0
  720. package/dist/src/routes/import.js +45 -0
  721. package/dist/src/routes/index.d.ts +1 -0
  722. package/dist/src/routes/index.js +6 -0
  723. package/dist/src/routes/mail/$mailboxId/$threadId/$messageId/$mode.{-$outboxMessageId}.d.ts +29 -0
  724. package/dist/src/routes/mail/$mailboxId/$threadId/$messageId/$mode.{-$outboxMessageId}.js +12 -0
  725. package/dist/src/routes/mail/$mailboxId/$threadId/$messageId.d.ts +19 -0
  726. package/dist/src/routes/mail/$mailboxId/$threadId/$messageId.js +22 -0
  727. package/dist/src/routes/mail/$mailboxId/$threadId/index.d.ts +19 -0
  728. package/dist/src/routes/mail/$mailboxId/$threadId/index.js +13 -0
  729. package/dist/src/routes/mail/$mailboxId/$threadId.d.ts +19 -0
  730. package/dist/src/routes/mail/$mailboxId/$threadId.js +11 -0
  731. package/dist/src/routes/mail/$mailboxId/compose.{-$outboxMessageId}.d.ts +19 -0
  732. package/dist/src/routes/mail/$mailboxId/compose.{-$outboxMessageId}.js +11 -0
  733. package/dist/src/routes/mail/$mailboxId/index.d.ts +19 -0
  734. package/dist/src/routes/mail/$mailboxId/index.js +9 -0
  735. package/dist/src/routes/mail/$mailboxId.d.ts +19 -0
  736. package/dist/src/routes/mail/$mailboxId.js +26 -0
  737. package/dist/src/routes/mail/brief/$threadId/$messageId/$mode.{-$outboxMessageId}.d.ts +29 -0
  738. package/dist/src/routes/mail/brief/$threadId/$messageId/$mode.{-$outboxMessageId}.js +24 -0
  739. package/dist/src/routes/mail/brief/$threadId/$messageId.d.ts +19 -0
  740. package/dist/src/routes/mail/brief/$threadId/$messageId.js +22 -0
  741. package/dist/src/routes/mail/brief/$threadId/index.d.ts +19 -0
  742. package/dist/src/routes/mail/brief/$threadId/index.js +13 -0
  743. package/dist/src/routes/mail/brief/$threadId.d.ts +19 -0
  744. package/dist/src/routes/mail/brief/$threadId.js +15 -0
  745. package/dist/src/routes/mail/brief/compose.{-$outboxMessageId}.d.ts +19 -0
  746. package/dist/src/routes/mail/brief/compose.{-$outboxMessageId}.js +19 -0
  747. package/dist/src/routes/mail/brief/index.d.ts +19 -0
  748. package/dist/src/routes/mail/brief/index.js +13 -0
  749. package/dist/src/routes/mail/brief.d.ts +19 -0
  750. package/dist/src/routes/mail/brief.js +27 -0
  751. package/dist/src/routes/mail/flagged/$threadId/$messageId/$mode.{-$outboxMessageId}.d.ts +29 -0
  752. package/dist/src/routes/mail/flagged/$threadId/$messageId/$mode.{-$outboxMessageId}.js +12 -0
  753. package/dist/src/routes/mail/flagged/$threadId/$messageId.d.ts +19 -0
  754. package/dist/src/routes/mail/flagged/$threadId/$messageId.js +22 -0
  755. package/dist/src/routes/mail/flagged/$threadId/index.d.ts +19 -0
  756. package/dist/src/routes/mail/flagged/$threadId/index.js +13 -0
  757. package/dist/src/routes/mail/flagged/$threadId.d.ts +19 -0
  758. package/dist/src/routes/mail/flagged/$threadId.js +15 -0
  759. package/dist/src/routes/mail/flagged/compose.{-$outboxMessageId}.d.ts +19 -0
  760. package/dist/src/routes/mail/flagged/compose.{-$outboxMessageId}.js +10 -0
  761. package/dist/src/routes/mail/flagged/index.d.ts +19 -0
  762. package/dist/src/routes/mail/flagged/index.js +9 -0
  763. package/dist/src/routes/mail/flagged.d.ts +19 -0
  764. package/dist/src/routes/mail/flagged.js +26 -0
  765. package/dist/src/routes/mail/index.d.ts +37 -0
  766. package/dist/src/routes/mail/index.js +13 -0
  767. package/dist/src/routes/mail/outbox/compose.{-$outboxMessageId}.d.ts +19 -0
  768. package/dist/src/routes/mail/outbox/compose.{-$outboxMessageId}.js +14 -0
  769. package/dist/src/routes/mail/outbox/draft/$outboxMessageId.d.ts +19 -0
  770. package/dist/src/routes/mail/outbox/draft/$outboxMessageId.js +18 -0
  771. package/dist/src/routes/mail/outbox/index.d.ts +19 -0
  772. package/dist/src/routes/mail/outbox/index.js +9 -0
  773. package/dist/src/routes/mail/outbox.d.ts +19 -0
  774. package/dist/src/routes/mail/outbox.js +22 -0
  775. package/dist/src/routes/mail.d.ts +16 -0
  776. package/dist/src/routes/mail.js +187 -0
  777. package/dist/src/routes/onboarding.d.ts +7 -0
  778. package/dist/src/routes/onboarding.js +35 -0
  779. package/dist/src/routes/settings/-shared/help-copy.d.ts +5 -0
  780. package/dist/src/routes/settings/-shared/help-copy.js +7 -0
  781. package/dist/src/routes/settings/accounts.d.ts +38 -0
  782. package/dist/src/routes/settings/accounts.js +396 -0
  783. package/dist/src/routes/settings/advanced.d.ts +1 -0
  784. package/dist/src/routes/settings/advanced.js +28 -0
  785. package/dist/src/routes/settings/appearance.d.ts +1 -0
  786. package/dist/src/routes/settings/appearance.js +61 -0
  787. package/dist/src/routes/settings/calendars.d.ts +1 -0
  788. package/dist/src/routes/settings/calendars.js +44 -0
  789. package/dist/src/routes/settings/filters.d.ts +5 -0
  790. package/dist/src/routes/settings/filters.js +88 -0
  791. package/dist/src/routes/settings/folders.d.ts +1 -0
  792. package/dist/src/routes/settings/folders.js +142 -0
  793. package/dist/src/routes/settings/index.d.ts +1 -0
  794. package/dist/src/routes/settings/index.js +5 -0
  795. package/dist/src/routes/settings/labels.d.ts +1 -0
  796. package/dist/src/routes/settings/labels.js +71 -0
  797. package/dist/src/routes/settings/senders.d.ts +6 -0
  798. package/dist/src/routes/settings/senders.js +202 -0
  799. package/dist/src/routes/settings/suggested-vips.d.ts +1 -0
  800. package/dist/src/routes/settings/suggested-vips.js +10 -0
  801. package/dist/src/routes/settings/warnings.d.ts +1 -0
  802. package/dist/src/routes/settings/warnings.js +20 -0
  803. package/dist/src/routes/settings.d.ts +14 -0
  804. package/dist/src/routes/settings.js +64 -0
  805. package/dist/src/routing/browsed-list.d.ts +28 -0
  806. package/dist/src/routing/browsed-list.js +61 -0
  807. package/dist/src/routing/calendar.d.ts +69 -0
  808. package/dist/src/routing/calendar.js +152 -0
  809. package/dist/src/routing/compose.d.ts +52 -0
  810. package/dist/src/routing/compose.js +139 -0
  811. package/dist/src/routing/fragment.d.ts +64 -0
  812. package/dist/src/routing/fragment.js +112 -0
  813. package/dist/src/routing/index.d.ts +14 -0
  814. package/dist/src/routing/index.js +14 -0
  815. package/dist/src/routing/nav-link.d.ts +28 -0
  816. package/dist/src/routing/nav-link.js +9 -0
  817. package/dist/src/routing/nav-selection.d.ts +13 -0
  818. package/dist/src/routing/nav-selection.js +29 -0
  819. package/dist/src/routing/open-thread.d.ts +65 -0
  820. package/dist/src/routing/open-thread.js +100 -0
  821. package/dist/src/routing/outbox-draft.d.ts +13 -0
  822. package/dist/src/routing/outbox-draft.js +37 -0
  823. package/dist/src/routing/reply.d.ts +102 -0
  824. package/dist/src/routing/reply.js +238 -0
  825. package/dist/src/routing/search-field.d.ts +45 -0
  826. package/dist/src/routing/search-field.js +67 -0
  827. package/dist/src/routing/search-mirror.d.ts +63 -0
  828. package/dist/src/routing/search-mirror.js +120 -0
  829. package/dist/src/routing/search-navigation.d.ts +16 -0
  830. package/dist/src/routing/search-navigation.js +32 -0
  831. package/dist/src/routing/sections.d.ts +16 -0
  832. package/dist/src/routing/sections.js +33 -0
  833. package/dist/src/routing/wizard-history.d.ts +83 -0
  834. package/dist/src/routing/wizard-history.js +153 -0
  835. package/dist/src/runtime-config.d.ts +59 -0
  836. package/dist/src/runtime-config.js +42 -0
  837. package/dist/src/shell/index.d.ts +17 -0
  838. package/dist/src/shell/index.js +61 -0
  839. package/package.json +145 -127
  840. package/harness/build.mjs +0 -121
  841. package/harness/index.html +0 -52
  842. package/harness/vite-preset.ts +0 -31
  843. package/index.html +0 -54
  844. package/spellcheck/empty-build.test.ts +0 -160
  845. package/spellcheck/languages.test.ts +0 -80
  846. package/spellcheck/languages.ts +0 -86
  847. package/spellcheck/vite-plugin-licence.test.ts +0 -140
  848. package/spellcheck/vite-plugin.test.ts +0 -230
  849. package/spellcheck/vite-plugin.ts +0 -385
  850. package/spellcheck/worker-stub.ts +0 -36
  851. package/src/auth/AccountMenu.tsx +0 -10
  852. package/src/auth/AccountSession.tsx +0 -19
  853. package/src/auth/BetterAuthShell.tsx +0 -233
  854. package/src/auth/SessionRateLimited.stories.tsx +0 -26
  855. package/src/auth/SessionRateLimited.tsx +0 -39
  856. package/src/auth/SignInAgain.tsx +0 -18
  857. package/src/auth/account-menu-mode.test.ts +0 -64
  858. package/src/auth/account-menu-mode.ts +0 -28
  859. package/src/auth/amplify-config.test.ts +0 -50
  860. package/src/auth/amplify-config.ts +0 -59
  861. package/src/auth/auth-error.test.ts +0 -129
  862. package/src/auth/auth-error.ts +0 -120
  863. package/src/auth/auth-interceptor.test.ts +0 -104
  864. package/src/auth/auth-interceptor.ts +0 -28
  865. package/src/auth/better-auth/BetterAuthAccount.tsx +0 -25
  866. package/src/auth/better-auth-config.ts +0 -253
  867. package/src/auth/better-auth-provider.tsx +0 -20
  868. package/src/auth/better-auth-token.test.ts +0 -349
  869. package/src/auth/cognito/CognitoAccount.tsx +0 -48
  870. package/src/auth/cognito/CognitoShell.tsx +0 -266
  871. package/src/auth/cognito/cognito-token.test.ts +0 -106
  872. package/src/auth/cognito/cognito-token.ts +0 -47
  873. package/src/auth/cognito-provider.tsx +0 -22
  874. package/src/auth/cognito-sign-in.stories.tsx +0 -90
  875. package/src/auth/combined-provider.tsx +0 -42
  876. package/src/auth/composition.test.ts +0 -59
  877. package/src/auth/email-sign-in.stories.tsx +0 -128
  878. package/src/auth/provider.tsx +0 -68
  879. package/src/auth/session-gate.render.test.ts +0 -77
  880. package/src/auth/session-state.test.ts +0 -66
  881. package/src/auth/session-state.ts +0 -41
  882. package/src/auth/sign-out-visibility.test.ts +0 -40
  883. package/src/auth/sign-out-visibility.ts +0 -10
  884. package/src/auth/sign-up-disabled.test.ts +0 -23
  885. package/src/components/calendar/AgendaStrip.stories.tsx +0 -291
  886. package/src/components/calendar/AgendaStrip.tsx +0 -162
  887. package/src/components/calendar/AgendaView.stories.tsx +0 -112
  888. package/src/components/calendar/AgendaView.tsx +0 -241
  889. package/src/components/calendar/CalendarComposePane.stories.tsx +0 -151
  890. package/src/components/calendar/CalendarComposePane.tsx +0 -127
  891. package/src/components/calendar/CalendarComposeSeed.tsx +0 -35
  892. package/src/components/calendar/CalendarEventPane.stories.tsx +0 -200
  893. package/src/components/calendar/CalendarEventPane.tsx +0 -167
  894. package/src/components/calendar/CalendarShell.stories.tsx +0 -177
  895. package/src/components/calendar/CalendarShell.tsx +0 -83
  896. package/src/components/calendar/CalendarUnavailable.tsx +0 -56
  897. package/src/components/calendar/CalendarViewPlaceholder.stories.tsx +0 -41
  898. package/src/components/calendar/CalendarViewPlaceholder.tsx +0 -17
  899. package/src/components/calendar/CalendarWaiting.tsx +0 -102
  900. package/src/components/calendar/CalendarWorkspace.stories.tsx +0 -374
  901. package/src/components/calendar/CalendarWorkspace.tsx +0 -258
  902. package/src/components/calendar/ChangeCalendarSuggestion.stories.tsx +0 -187
  903. package/src/components/calendar/ChangeCalendarSuggestion.tsx +0 -159
  904. package/src/components/calendar/OpenCalendarEvent.stories.tsx +0 -273
  905. package/src/components/calendar/OpenCalendarEvent.tsx +0 -353
  906. package/src/components/calendar/PendingSuggestions.tsx +0 -100
  907. package/src/components/calendar/WriteCalendarEvent.stories.tsx +0 -90
  908. package/src/components/calendar/WriteCalendarEvent.tsx +0 -104
  909. package/src/components/calendar/agenda-address.render.test.ts +0 -493
  910. package/src/components/calendar/agenda-strip.render.test.ts +0 -241
  911. package/src/components/calendar/calendar-app.stories.tsx +0 -122
  912. package/src/components/calendar/calendar-story-fixtures.ts +0 -118
  913. package/src/components/calendar/calendar-story-server.tsx +0 -157
  914. package/src/components/calendar/calendar-workspace.render.test.ts +0 -221
  915. package/src/components/calendar/calendar-write-flow.render.test.ts +0 -373
  916. package/src/components/calendar/change-suggestion-first.render.test.ts +0 -304
  917. package/src/components/calendar/pending-suggestions.render.test.ts +0 -206
  918. package/src/components/compose/AddressField.tsx +0 -64
  919. package/src/components/compose/ComposeForm.tsx +0 -1427
  920. package/src/components/compose/ComposeProvider.tsx +0 -174
  921. package/src/components/compose/ComposeSmtpMissingBanner.tsx +0 -25
  922. package/src/components/compose/ConversationCompose.tsx +0 -88
  923. package/src/components/compose/FromSelector.render.test.ts +0 -99
  924. package/src/components/compose/FromSelector.stories.tsx +0 -61
  925. package/src/components/compose/FromSelector.tsx +0 -74
  926. package/src/components/compose/FullCompose.tsx +0 -93
  927. package/src/components/compose/MobileComposeSheet.tsx +0 -134
  928. package/src/components/compose/attachment-only-source.render.test.ts +0 -234
  929. package/src/components/compose/compose-inline-image.render.test.ts +0 -542
  930. package/src/components/compose/compose-send-stops-autosave.render.test.ts +0 -328
  931. package/src/components/compose/compose-spellcheck-failure.render.test.ts +0 -114
  932. package/src/components/compose/compose-spellcheck.test.ts +0 -157
  933. package/src/components/compose/compose-spellcheck.ts +0 -56
  934. package/src/components/compose/compose-starts-a-second-message.render.test.ts +0 -171
  935. package/src/components/compose/compose-title.ts +0 -10
  936. package/src/components/compose/compose.stories.tsx +0 -405
  937. package/src/components/compose/draft-discard-failure.render.test.ts +0 -138
  938. package/src/components/compose/forward-autosave-is-not-fatal.render.test.ts +0 -358
  939. package/src/components/compose/mail-sync-off-refusal.ts +0 -7
  940. package/src/components/compose/mobile-header-stays-expanded.render.test.ts +0 -229
  941. package/src/components/compose/quote-leaves-with-the-send.render.test.ts +0 -235
  942. package/src/components/compose/quoted-message.test.ts +0 -158
  943. package/src/components/compose/quoted-message.ts +0 -216
  944. package/src/components/compose/reopened-draft-writes-nothing.render.test.ts +0 -148
  945. package/src/components/compose/reply-all-on-resumed-draft.render.test.ts +0 -250
  946. package/src/components/compose/reply-with-times.ts +0 -22
  947. package/src/components/compose/send-from-mail-off-account.render.test.ts +0 -173
  948. package/src/components/compose/send-poll-server-error.render.test.ts +0 -120
  949. package/src/components/compose/send-watch-outlives-sent.render.test.ts +0 -121
  950. package/src/components/config-import/ConfigImportWizard.flow.test.ts +0 -326
  951. package/src/components/config-import/ConfigImportWizard.tsx +0 -721
  952. package/src/components/config-import/config-import.fixtures.ts +0 -254
  953. package/src/components/config-import/config-import.stories.tsx +0 -486
  954. package/src/components/config-import/steps.import-failure.test.ts +0 -91
  955. package/src/components/config-import/steps.tsx +0 -784
  956. package/src/components/config-import/steps.viewport.test.ts +0 -216
  957. package/src/components/layout/AppShellSkeleton.tsx +0 -53
  958. package/src/components/layout/ComposeFab.tsx +0 -22
  959. package/src/components/layout/Drawer.focus.test.ts +0 -253
  960. package/src/components/layout/Drawer.tsx +0 -108
  961. package/src/components/layout/MailShell.tsx +0 -106
  962. package/src/components/layout/MailTopBar.tsx +0 -99
  963. package/src/components/layout/mail-shell.stories.tsx +0 -142
  964. package/src/components/mail/AuthenticityBanner.tsx +0 -45
  965. package/src/components/mail/AutoMovedIndicator.tsx +0 -53
  966. package/src/components/mail/BlockedImagesNotice.render.test.ts +0 -114
  967. package/src/components/mail/BlockedImagesNotice.tsx +0 -63
  968. package/src/components/mail/BriefPane.tsx +0 -477
  969. package/src/components/mail/BulkRunProvider.tsx +0 -344
  970. package/src/components/mail/ConversationView.tsx +0 -519
  971. package/src/components/mail/DailyBrief.scope.test.ts +0 -76
  972. package/src/components/mail/DailyBrief.tsx +0 -1094
  973. package/src/components/mail/DeleteConfirmDialog.render.test.ts +0 -412
  974. package/src/components/mail/DeleteConfirmDialog.tsx +0 -143
  975. package/src/components/mail/DraftsView.tsx +0 -255
  976. package/src/components/mail/EmptyTrashBar.render.test.ts +0 -133
  977. package/src/components/mail/EmptyTrashBar.tsx +0 -181
  978. package/src/components/mail/FlaggedList.tsx +0 -359
  979. package/src/components/mail/FlaggedPane.tsx +0 -473
  980. package/src/components/mail/IntelligenceDrawer.tsx +0 -52
  981. package/src/components/mail/IntelligencePane.render.test.ts +0 -116
  982. package/src/components/mail/IntelligencePane.test.ts +0 -16
  983. package/src/components/mail/IntelligencePane.tsx +0 -391
  984. package/src/components/mail/LabelApplyTrigger.tsx +0 -67
  985. package/src/components/mail/MailListHeader.chrome-stability.render.test.ts +0 -323
  986. package/src/components/mail/MailListHeader.tsx +0 -613
  987. package/src/components/mail/MailNav.tsx +0 -70
  988. package/src/components/mail/MailSidebarAdapter.tsx +0 -319
  989. package/src/components/mail/MailViewChrome.tsx +0 -124
  990. package/src/components/mail/MailboxPane.tsx +0 -1285
  991. package/src/components/mail/MessageActionMenu.tsx +0 -296
  992. package/src/components/mail/MessageAttachments.interaction.test.ts +0 -245
  993. package/src/components/mail/MessageAttachments.tsx +0 -188
  994. package/src/components/mail/MessageBody.blocked-sender.test.ts +0 -193
  995. package/src/components/mail/MessageBody.tsx +0 -226
  996. package/src/components/mail/MessageBodyErrorBanner.render.test.ts +0 -85
  997. package/src/components/mail/MessageBodyErrorBanner.test.ts +0 -56
  998. package/src/components/mail/MessageBodyErrorBanner.tsx +0 -90
  999. package/src/components/mail/MessageCard.blocked-sender.test.ts +0 -246
  1000. package/src/components/mail/MessageCard.tsx +0 -430
  1001. package/src/components/mail/MessageList.move-guard.test.ts +0 -64
  1002. package/src/components/mail/MessageList.run-reporting.test.ts +0 -87
  1003. package/src/components/mail/MessageList.tsx +0 -1383
  1004. package/src/components/mail/MessageListItem.test.ts +0 -153
  1005. package/src/components/mail/MessageListItem.tsx +0 -106
  1006. package/src/components/mail/MessageRow.render.test.ts +0 -54
  1007. package/src/components/mail/MessageRow.tsx +0 -269
  1008. package/src/components/mail/MessageSettlementAlert.render.test.ts +0 -182
  1009. package/src/components/mail/MessageSettlementAlert.tsx +0 -126
  1010. package/src/components/mail/MessageToolbar.interaction.test.ts +0 -250
  1011. package/src/components/mail/MessageToolbar.render.test.ts +0 -124
  1012. package/src/components/mail/MessageToolbar.tsx +0 -215
  1013. package/src/components/mail/MobileMessageBar.tsx +0 -140
  1014. package/src/components/mail/MoveToTrigger.render.test.ts +0 -310
  1015. package/src/components/mail/MoveToTrigger.tsx +0 -298
  1016. package/src/components/mail/NavMenuButton.tsx +0 -25
  1017. package/src/components/mail/OutboxPane.tsx +0 -584
  1018. package/src/components/mail/PullToRefresh.tsx +0 -24
  1019. package/src/components/mail/RawMessageView.tsx +0 -84
  1020. package/src/components/mail/RoleAppointmentPromptProvider.render.test.ts +0 -294
  1021. package/src/components/mail/RoleAppointmentPromptProvider.tsx +0 -251
  1022. package/src/components/mail/SelectionWizardHost.search-entry.test.ts +0 -81
  1023. package/src/components/mail/SelectionWizardHost.tsx +0 -1078
  1024. package/src/components/mail/SpamRescue.tsx +0 -126
  1025. package/src/components/mail/SwipeableMessageRow.modifier-select.test.ts +0 -243
  1026. package/src/components/mail/SwipeableMessageRow.render.test.ts +0 -110
  1027. package/src/components/mail/SwipeableMessageRow.tsx +0 -160
  1028. package/src/components/mail/ThreadListInteraction.test.ts +0 -546
  1029. package/src/components/mail/ThreadListInteraction.tsx +0 -538
  1030. package/src/components/mail/authenticity-warning.stories.tsx +0 -116
  1031. package/src/components/mail/blocked-images-notice.stories.tsx +0 -90
  1032. package/src/components/mail/brief-server-sections.render.test.ts +0 -656
  1033. package/src/components/mail/bulk-run-state.test.ts +0 -101
  1034. package/src/components/mail/bulk-run-state.ts +0 -99
  1035. package/src/components/mail/conversation-reply-identity.render.test.ts +0 -307
  1036. package/src/components/mail/conversation-reply-reach.render.test.ts +0 -414
  1037. package/src/components/mail/daily-brief.stories.tsx +0 -264
  1038. package/src/components/mail/delete-open-message-keeps-the-list.render.test.ts +0 -154
  1039. package/src/components/mail/detail-surface.stories.tsx +0 -171
  1040. package/src/components/mail/drafts.stories.tsx +0 -61
  1041. package/src/components/mail/empty-trash-bar.stories.tsx +0 -121
  1042. package/src/components/mail/enter-cursor-late-open.render.test.ts +0 -197
  1043. package/src/components/mail/filtered-empty-state.render.test.ts +0 -240
  1044. package/src/components/mail/flagged-search-reach.render.test.ts +0 -272
  1045. package/src/components/mail/flagged.stories.tsx +0 -159
  1046. package/src/components/mail/intelligence-auto-open-pref.render.test.ts +0 -412
  1047. package/src/components/mail/intelligence-drawer.stories.tsx +0 -353
  1048. package/src/components/mail/intelligence-shortcut-surface.render.test.ts +0 -373
  1049. package/src/components/mail/intelligence-story-calendar.ts +0 -19
  1050. package/src/components/mail/intelligence-surface-reach.render.test.ts +0 -220
  1051. package/src/components/mail/mail-pickers.stories.tsx +0 -82
  1052. package/src/components/mail/message-body-error-banner-content.ts +0 -87
  1053. package/src/components/mail/message-gone.stories.tsx +0 -44
  1054. package/src/components/mail/offer-times-reply.render.test.ts +0 -557
  1055. package/src/components/mail/organize-run-state.test.ts +0 -115
  1056. package/src/components/mail/organize-run-state.ts +0 -44
  1057. package/src/components/mail/outbox.stories.tsx +0 -59
  1058. package/src/components/mail/reclassify-remove-override.render.test.ts +0 -138
  1059. package/src/components/mail/reply-verbs-reach.render.test.ts +0 -235
  1060. package/src/components/mail/search.stories.tsx +0 -280
  1061. package/src/components/mail/selection-wizard-run-controls.test.ts +0 -231
  1062. package/src/components/mail/selection-wizard-run-controls.ts +0 -101
  1063. package/src/components/mail/selection-wizard.stories.tsx +0 -160
  1064. package/src/components/mail/spam-offer-server-count.render.test.ts +0 -349
  1065. package/src/components/mail/two-window-listeners-one-key.render.test.ts +0 -593
  1066. package/src/components/mail/useModifierSelect.render.test.ts +0 -223
  1067. package/src/components/mail/useModifierSelect.ts +0 -100
  1068. package/src/components/onboarding/OnboardingWizard.flow.test.ts +0 -709
  1069. package/src/components/onboarding/OnboardingWizard.tsx +0 -1599
  1070. package/src/components/onboarding/credential-steps.tsx +0 -441
  1071. package/src/components/onboarding/onboarding-servers.stories.tsx +0 -49
  1072. package/src/components/onboarding/onboarding.stories.tsx +0 -550
  1073. package/src/components/overlay-escape.render.test.ts +0 -155
  1074. package/src/components/self-update/SelfUpdateOverlay.tsx +0 -45
  1075. package/src/components/settings/AccountFormPanel.render.test.ts +0 -269
  1076. package/src/components/settings/AccountFormPanel.test.ts +0 -37
  1077. package/src/components/settings/AccountFormPanel.tsx +0 -949
  1078. package/src/components/settings/AccountServices.render.test.ts +0 -257
  1079. package/src/components/settings/AccountServices.tsx +0 -181
  1080. package/src/components/settings/AccountServicesCard.stories.tsx +0 -71
  1081. package/src/components/settings/AccountServicesCard.tsx +0 -76
  1082. package/src/components/settings/AdvancedNavIcon.tsx +0 -23
  1083. package/src/components/settings/CalendarCreateCard.stories.tsx +0 -33
  1084. package/src/components/settings/CalendarCreateCard.tsx +0 -149
  1085. package/src/components/settings/CalendarDetailsForm.stories.tsx +0 -57
  1086. package/src/components/settings/CalendarDetailsForm.tsx +0 -136
  1087. package/src/components/settings/CalendarFeedCard.render.test.ts +0 -154
  1088. package/src/components/settings/CalendarFeedCard.stories.tsx +0 -152
  1089. package/src/components/settings/CalendarFeedCard.tsx +0 -289
  1090. package/src/components/settings/CalendarFeedPanel.tsx +0 -38
  1091. package/src/components/settings/CalendarSettingsPanel.tsx +0 -60
  1092. package/src/components/settings/CalendarSubscribeCard.stories.tsx +0 -89
  1093. package/src/components/settings/CalendarSubscribeCard.tsx +0 -115
  1094. package/src/components/settings/CalendarSubscriptionStatus.stories.tsx +0 -77
  1095. package/src/components/settings/CalendarSubscriptionStatus.tsx +0 -87
  1096. package/src/components/settings/ConfigExportCard.tsx +0 -114
  1097. package/src/components/settings/ConfigTransferPanel.tsx +0 -72
  1098. package/src/components/settings/DangerZone.tsx +0 -30
  1099. package/src/components/settings/DeleteAccountDialog.render.test.ts +0 -47
  1100. package/src/components/settings/DeleteAccountDialog.tsx +0 -224
  1101. package/src/components/settings/DeleteFolderDialog.render.test.ts +0 -836
  1102. package/src/components/settings/DeleteFolderDialog.tsx +0 -406
  1103. package/src/components/settings/FilterActionError.render.test.ts +0 -46
  1104. package/src/components/settings/FilterActionError.stories.tsx +0 -50
  1105. package/src/components/settings/FilterActionError.tsx +0 -40
  1106. package/src/components/settings/FilterEditor.render.test.ts +0 -307
  1107. package/src/components/settings/FilterEditor.tsx +0 -364
  1108. package/src/components/settings/FilterEditorSurface.tsx +0 -65
  1109. package/src/components/settings/FiltersList.render.test.ts +0 -202
  1110. package/src/components/settings/FiltersList.stories.tsx +0 -113
  1111. package/src/components/settings/FiltersList.tsx +0 -191
  1112. package/src/components/settings/LabelsList.stories.tsx +0 -134
  1113. package/src/components/settings/LabelsList.tsx +0 -112
  1114. package/src/components/settings/SelfUpdatePanel.tsx +0 -47
  1115. package/src/components/settings/TimeZoneSelect.tsx +0 -43
  1116. package/src/components/settings/TlsRootCaDownload.render.test.ts +0 -37
  1117. package/src/components/settings/TlsRootCaDownload.tsx +0 -33
  1118. package/src/components/settings/WarningsNavIcon.tsx +0 -12
  1119. package/src/components/settings/WarningsPanel.dom.test.ts +0 -201
  1120. package/src/components/settings/WarningsPanel.render.test.ts +0 -56
  1121. package/src/components/settings/WarningsPanel.tsx +0 -244
  1122. package/src/components/settings/account-form-helpers.test.ts +0 -172
  1123. package/src/components/settings/account-form-helpers.ts +0 -105
  1124. package/src/components/settings/accounts.stories.tsx +0 -386
  1125. package/src/components/settings/advanced.stories.tsx +0 -40
  1126. package/src/components/settings/appearance.stories.tsx +0 -33
  1127. package/src/components/settings/calendar-collection-cards.render.test.ts +0 -149
  1128. package/src/components/settings/calendar-feed-flow.render.test.ts +0 -449
  1129. package/src/components/settings/folders.stories.tsx +0 -89
  1130. package/src/components/settings/label-delete-confirm.stories.tsx +0 -83
  1131. package/src/components/settings/self-update.stories.tsx +0 -288
  1132. package/src/components/settings/senders.stories.tsx +0 -155
  1133. package/src/components/settings/settings-filter.stories.tsx +0 -145
  1134. package/src/components/settings/warnings.stories.tsx +0 -290
  1135. package/src/components/ui/AppVersion.stories.tsx +0 -31
  1136. package/src/components/ui/AppVersion.tsx +0 -57
  1137. package/src/components/ui/BugReportButton.stories.tsx +0 -19
  1138. package/src/components/ui/BugReportButton.tsx +0 -20
  1139. package/src/components/ui/ErrorBannerProvider.render.test.ts +0 -85
  1140. package/src/components/ui/ErrorBannerProvider.tsx +0 -134
  1141. package/src/components/ui/FatalErrorOverlay.render.test.ts +0 -66
  1142. package/src/components/ui/FatalErrorOverlay.stories.tsx +0 -55
  1143. package/src/components/ui/FatalErrorOverlay.tsx +0 -158
  1144. package/src/components/ui/banner-way-out.test.ts +0 -71
  1145. package/src/components/ui/error-banners.test.ts +0 -186
  1146. package/src/components/ui/error-banners.ts +0 -121
  1147. package/src/components/ui/folder-role-refusal.test.ts +0 -124
  1148. package/src/components/ui/folder-role-refusal.ts +0 -69
  1149. package/src/components/ui/placement-refusal.test.ts +0 -98
  1150. package/src/components/ui/placement-refusal.ts +0 -71
  1151. package/src/hooks/bulk-chunking.render.test.ts +0 -157
  1152. package/src/hooks/calendar/agenda-window.test.ts +0 -392
  1153. package/src/hooks/calendar/agenda-window.ts +0 -210
  1154. package/src/hooks/calendar/calendar-collections.render.test.ts +0 -281
  1155. package/src/hooks/calendar/calendar-reads.render.test.ts +0 -265
  1156. package/src/hooks/calendar/calendar-writes.render.test.ts +0 -326
  1157. package/src/hooks/calendar/draft.test.ts +0 -537
  1158. package/src/hooks/calendar/draft.ts +0 -204
  1159. package/src/hooks/calendar/index.ts +0 -122
  1160. package/src/hooks/calendar/instance.test.ts +0 -206
  1161. package/src/hooks/calendar/instance.ts +0 -224
  1162. package/src/hooks/calendar/recurrence-rule.test.ts +0 -134
  1163. package/src/hooks/calendar/recurrence-rule.ts +0 -177
  1164. package/src/hooks/calendar/resource.test.ts +0 -141
  1165. package/src/hooks/calendar/resource.ts +0 -104
  1166. package/src/hooks/calendar/selection.ts +0 -110
  1167. package/src/hooks/calendar/suggestion-draft.ts +0 -77
  1168. package/src/hooks/calendar/useCalendarCollectionWrites.ts +0 -131
  1169. package/src/hooks/calendar/useCalendarEvent.ts +0 -46
  1170. package/src/hooks/calendar/useCalendarEvents.ts +0 -195
  1171. package/src/hooks/calendar/useCalendarFeed.ts +0 -163
  1172. package/src/hooks/calendar/useCalendarFreeBusy.ts +0 -80
  1173. package/src/hooks/calendar/useCalendarJump.ts +0 -117
  1174. package/src/hooks/calendar/useCalendarSubscriptions.ts +0 -103
  1175. package/src/hooks/calendar/useCalendarSuggestions.ts +0 -279
  1176. package/src/hooks/calendar/useCalendarWrites.ts +0 -177
  1177. package/src/hooks/calendar/useCalendars.ts +0 -59
  1178. package/src/hooks/calendar/useDraftClashes.ts +0 -93
  1179. package/src/hooks/calendar/window.test.ts +0 -189
  1180. package/src/hooks/calendar/window.ts +0 -188
  1181. package/src/hooks/cross-account-bulk.render.test.ts +0 -164
  1182. package/src/hooks/escalated-run-lifetime.render.test.ts +0 -349
  1183. package/src/hooks/escalated-run-refusal.render.test.ts +0 -373
  1184. package/src/hooks/escalated-run-survives-navigation.render.test.ts +0 -524
  1185. package/src/hooks/intelligence-calendar.render.test.ts +0 -497
  1186. package/src/hooks/intelligence-drawer.render.test.ts +0 -99
  1187. package/src/hooks/mutation-optimism.test.ts +0 -278
  1188. package/src/hooks/queries/keys.ts +0 -9
  1189. package/src/hooks/refusal-escalation.render.test.ts +0 -243
  1190. package/src/hooks/signed-out-poll-is-not-fatal.render.test.ts +0 -126
  1191. package/src/hooks/stale-account-sync-visibility.test.ts +0 -166
  1192. package/src/hooks/update-restart-escalation.render.test.ts +0 -340
  1193. package/src/hooks/use-system-update.test.ts +0 -686
  1194. package/src/hooks/use-system-update.ts +0 -341
  1195. package/src/hooks/useApplyLabel.ts +0 -71
  1196. package/src/hooks/useArchiveMailbox.ts +0 -162
  1197. package/src/hooks/useAutoMovedBadge.ts +0 -145
  1198. package/src/hooks/useBriefSections.ts +0 -320
  1199. package/src/hooks/useCalendarData.ts +0 -94
  1200. package/src/hooks/useClauseSuggestions.ts +0 -57
  1201. package/src/hooks/useComposeAttachments.ts +0 -108
  1202. package/src/hooks/useComposeLanguages.ts +0 -69
  1203. package/src/hooks/useCreateMailbox.render.test.ts +0 -233
  1204. package/src/hooks/useCreateMailbox.ts +0 -153
  1205. package/src/hooks/useCurrentMailboxName.ts +0 -128
  1206. package/src/hooks/useDebouncedValue.ts +0 -12
  1207. package/src/hooks/useDeleteFolder.ts +0 -380
  1208. package/src/hooks/useDeleteMessages.test.ts +0 -62
  1209. package/src/hooks/useDeleteMessages.ts +0 -260
  1210. package/src/hooks/useDeleteOutcome.ts +0 -70
  1211. package/src/hooks/useEmptyTrash.render.test.ts +0 -194
  1212. package/src/hooks/useEmptyTrash.ts +0 -191
  1213. package/src/hooks/useEscalatedActions.test.ts +0 -36
  1214. package/src/hooks/useEscalatedActions.ts +0 -334
  1215. package/src/hooks/useFilters.test.ts +0 -106
  1216. package/src/hooks/useFilters.ts +0 -188
  1217. package/src/hooks/useFolderLabelTranslator.ts +0 -19
  1218. package/src/hooks/useFollowFocusOpen.render.test.ts +0 -145
  1219. package/src/hooks/useFollowFocusOpen.ts +0 -81
  1220. package/src/hooks/useInitialSyncProgress.render.test.ts +0 -314
  1221. package/src/hooks/useInitialSyncProgress.ts +0 -134
  1222. package/src/hooks/useInlineImages.ts +0 -93
  1223. package/src/hooks/useIntelligenceCalendar.ts +0 -394
  1224. package/src/hooks/useIntelligenceData.test.ts +0 -403
  1225. package/src/hooks/useIntelligenceData.ts +0 -325
  1226. package/src/hooks/useIntelligenceDrawer.ts +0 -54
  1227. package/src/hooks/useIntelligenceSurface.ts +0 -103
  1228. package/src/hooks/useIsDark.ts +0 -27
  1229. package/src/hooks/useKeyboardNavigation.ts +0 -130
  1230. package/src/hooks/useLabels.ts +0 -124
  1231. package/src/hooks/useLayoutTier.test.ts +0 -96
  1232. package/src/hooks/useLayoutTier.ts +0 -60
  1233. package/src/hooks/useMailboxAccount.ts +0 -67
  1234. package/src/hooks/useMailboxNameIndex.ts +0 -32
  1235. package/src/hooks/useMarkAsRead.test.ts +0 -307
  1236. package/src/hooks/useMarkAsRead.ts +0 -333
  1237. package/src/hooks/useMatchSample.ts +0 -104
  1238. package/src/hooks/useMediaQuery.ts +0 -13
  1239. package/src/hooks/useMessageBodyContent.test.ts +0 -370
  1240. package/src/hooks/useMessageBodyContent.ts +0 -388
  1241. package/src/hooks/useMoveMessages.ts +0 -193
  1242. package/src/hooks/useOrganizeJob.render.test.ts +0 -190
  1243. package/src/hooks/useOrganizeJob.ts +0 -146
  1244. package/src/hooks/useRailPanels.ts +0 -128
  1245. package/src/hooks/useRedirectEnded.ts +0 -116
  1246. package/src/hooks/useRefreshControl.test.ts +0 -287
  1247. package/src/hooks/useRefreshControl.ts +0 -347
  1248. package/src/hooks/useReportSpam.escalation.test.ts +0 -135
  1249. package/src/hooks/useReportSpam.render.test.ts +0 -113
  1250. package/src/hooks/useReportSpam.test.ts +0 -115
  1251. package/src/hooks/useReportSpam.ts +0 -244
  1252. package/src/hooks/useRescueCandidates.test.ts +0 -194
  1253. package/src/hooks/useRescueCandidates.ts +0 -48
  1254. package/src/hooks/useResultCount.render.test.ts +0 -161
  1255. package/src/hooks/useResultCount.ts +0 -68
  1256. package/src/hooks/useResultFolderIndex.ts +0 -88
  1257. package/src/hooks/useReturnFromRedirect.ts +0 -41
  1258. package/src/hooks/useRulePreview.ts +0 -122
  1259. package/src/hooks/useSaveDraft.ts +0 -244
  1260. package/src/hooks/useSearchScope.ts +0 -46
  1261. package/src/hooks/useSearchSuggestions.ts +0 -126
  1262. package/src/hooks/useSearchTokenContext.ts +0 -28
  1263. package/src/hooks/useSelectedSubjects.ts +0 -79
  1264. package/src/hooks/useSignature.ts +0 -69
  1265. package/src/hooks/useSpamMatchCounts.ts +0 -102
  1266. package/src/hooks/useStaleAccountSync.test.ts +0 -300
  1267. package/src/hooks/useStaleAccountSync.ts +0 -325
  1268. package/src/hooks/useStarredThreads.test.ts +0 -209
  1269. package/src/hooks/useStarredThreads.ts +0 -146
  1270. package/src/hooks/useThreadActions.star.test.ts +0 -200
  1271. package/src/hooks/useThreadActions.ts +0 -127
  1272. package/src/hooks/useThreadMessageIds.ts +0 -33
  1273. package/src/hooks/useThreadRow.ts +0 -49
  1274. package/src/hooks/useToggleStar.test.ts +0 -131
  1275. package/src/hooks/useToggleStar.ts +0 -164
  1276. package/src/hooks/useToggleTrusted.test.ts +0 -106
  1277. package/src/hooks/useToggleTrusted.ts +0 -157
  1278. package/src/hooks/useTriageLayer.ts +0 -167
  1279. package/src/hooks/useTriggerSync.test.ts +0 -18
  1280. package/src/hooks/useTriggerSync.ts +0 -64
  1281. package/src/hooks/useUpdateAddressFlags.ts +0 -152
  1282. package/src/hooks/useUpdateFilter.ts +0 -56
  1283. package/src/hooks/useVisualViewport.render.test.ts +0 -63
  1284. package/src/hooks/useVisualViewport.ts +0 -51
  1285. package/src/hooks/useWarningsAttention.ts +0 -37
  1286. package/src/index.css +0 -28
  1287. package/src/index.css.test.ts +0 -97
  1288. package/src/kit-stylesheets.test.ts +0 -64
  1289. package/src/lib/account-order.test.ts +0 -74
  1290. package/src/lib/account-order.ts +0 -13
  1291. package/src/lib/adjacent-message.test.ts +0 -34
  1292. package/src/lib/adjacent-message.ts +0 -20
  1293. package/src/lib/api.ts +0 -121
  1294. package/src/lib/app-info.ts +0 -32
  1295. package/src/lib/attachment-download.test.ts +0 -207
  1296. package/src/lib/attachment-download.ts +0 -195
  1297. package/src/lib/auto-moved.test.ts +0 -234
  1298. package/src/lib/auto-moved.ts +0 -103
  1299. package/src/lib/autodiscovery.test.ts +0 -47
  1300. package/src/lib/autodiscovery.ts +0 -354
  1301. package/src/lib/brief-chip-query.test.ts +0 -85
  1302. package/src/lib/brief-criteria.test.ts +0 -168
  1303. package/src/lib/brief-criteria.ts +0 -129
  1304. package/src/lib/brief.test.ts +0 -493
  1305. package/src/lib/brief.ts +0 -205
  1306. package/src/lib/bug-report.test.ts +0 -487
  1307. package/src/lib/bug-report.ts +0 -320
  1308. package/src/lib/bulk-action-copy.test.ts +0 -123
  1309. package/src/lib/bulk-action-copy.ts +0 -182
  1310. package/src/lib/bulk-actions.test.ts +0 -612
  1311. package/src/lib/bulk-actions.ts +0 -400
  1312. package/src/lib/calendar-collection-copy.test.ts +0 -23
  1313. package/src/lib/calendar-collection-copy.ts +0 -21
  1314. package/src/lib/calendar-density.ts +0 -46
  1315. package/src/lib/calendar-feed-copy.ts +0 -29
  1316. package/src/lib/calendar-feed-url.ts +0 -14
  1317. package/src/lib/calendar-format.ts +0 -74
  1318. package/src/lib/calendar-report.ts +0 -21
  1319. package/src/lib/calendar-route.test.ts +0 -224
  1320. package/src/lib/calendar-route.ts +0 -197
  1321. package/src/lib/calendar-subscription.ts +0 -11
  1322. package/src/lib/calendar-suggestion.test.ts +0 -189
  1323. package/src/lib/calendar-suggestion.ts +0 -263
  1324. package/src/lib/calendar-suggestion.west.test.ts +0 -61
  1325. package/src/lib/client.test.ts +0 -114
  1326. package/src/lib/client.ts +0 -33
  1327. package/src/lib/compose-attachment-controller.test.ts +0 -352
  1328. package/src/lib/compose-attachment-controller.ts +0 -519
  1329. package/src/lib/config-import.test.ts +0 -339
  1330. package/src/lib/config-import.ts +0 -512
  1331. package/src/lib/console-errors.test.ts +0 -64
  1332. package/src/lib/console-errors.ts +0 -92
  1333. package/src/lib/conversation-target.ts +0 -17
  1334. package/src/lib/dedupe-thread-messages.test.ts +0 -79
  1335. package/src/lib/dedupe-thread-messages.ts +0 -26
  1336. package/src/lib/delete-folder.test.ts +0 -304
  1337. package/src/lib/delete-folder.ts +0 -188
  1338. package/src/lib/desktop-breakpoint.test.ts +0 -76
  1339. package/src/lib/display-category.test.ts +0 -32
  1340. package/src/lib/display-category.ts +0 -24
  1341. package/src/lib/drafts.test.ts +0 -218
  1342. package/src/lib/drafts.ts +0 -122
  1343. package/src/lib/error-classifier.test.ts +0 -434
  1344. package/src/lib/error-classifier.ts +0 -260
  1345. package/src/lib/escalation-label.test.ts +0 -49
  1346. package/src/lib/escalation-label.ts +0 -32
  1347. package/src/lib/fatal-error.test.ts +0 -78
  1348. package/src/lib/fatal-error.ts +0 -165
  1349. package/src/lib/filter-report.ts +0 -19
  1350. package/src/lib/flagged-criteria.test.ts +0 -114
  1351. package/src/lib/flagged-criteria.ts +0 -62
  1352. package/src/lib/folder-failure.test.ts +0 -29
  1353. package/src/lib/folder-failure.ts +0 -10
  1354. package/src/lib/folder-roles.test.ts +0 -152
  1355. package/src/lib/folder-roles.ts +0 -110
  1356. package/src/lib/format.test.ts +0 -470
  1357. package/src/lib/format.ts +0 -397
  1358. package/src/lib/fresh-mailbox-count.test.ts +0 -145
  1359. package/src/lib/fresh-mailbox-count.ts +0 -114
  1360. package/src/lib/hot-sync-window.test.ts +0 -59
  1361. package/src/lib/hot-sync-window.ts +0 -48
  1362. package/src/lib/i18n.ts +0 -36
  1363. package/src/lib/inbox-filters.test.ts +0 -134
  1364. package/src/lib/inbox-filters.ts +0 -154
  1365. package/src/lib/intelligence-pref.test.ts +0 -201
  1366. package/src/lib/intelligence-pref.ts +0 -71
  1367. package/src/lib/json.ts +0 -11
  1368. package/src/lib/junk-destination.test.ts +0 -40
  1369. package/src/lib/junk-destination.ts +0 -37
  1370. package/src/lib/list-focus.test.ts +0 -25
  1371. package/src/lib/list-focus.ts +0 -24
  1372. package/src/lib/list-header-chrome.ts +0 -55
  1373. package/src/lib/list-narrowing.test.ts +0 -88
  1374. package/src/lib/list-narrowing.ts +0 -172
  1375. package/src/lib/list-verb-request.test.ts +0 -124
  1376. package/src/lib/list-verb-request.ts +0 -62
  1377. package/src/lib/mail-context.ts +0 -91
  1378. package/src/lib/mail-freshness.test.ts +0 -165
  1379. package/src/lib/mail-freshness.tsx +0 -244
  1380. package/src/lib/mail-route.test.ts +0 -261
  1381. package/src/lib/mail-route.ts +0 -140
  1382. package/src/lib/mail-search.ts +0 -69
  1383. package/src/lib/mailbox-sync-wait.test.ts +0 -186
  1384. package/src/lib/mailbox-sync-wait.ts +0 -102
  1385. package/src/lib/message-attachments.test.ts +0 -163
  1386. package/src/lib/message-attachments.ts +0 -70
  1387. package/src/lib/message-body-source.test.ts +0 -115
  1388. package/src/lib/message-body-source.ts +0 -51
  1389. package/src/lib/move-options.test.ts +0 -154
  1390. package/src/lib/move-options.ts +0 -60
  1391. package/src/lib/move-targets.test.ts +0 -235
  1392. package/src/lib/move-targets.ts +0 -70
  1393. package/src/lib/network-error.ts +0 -74
  1394. package/src/lib/new-folder.test.ts +0 -127
  1395. package/src/lib/new-folder.ts +0 -59
  1396. package/src/lib/onboarding-completion.test.ts +0 -48
  1397. package/src/lib/onboarding-completion.ts +0 -23
  1398. package/src/lib/organize/clause-suggestions.test.ts +0 -114
  1399. package/src/lib/organize/clause-suggestions.ts +0 -89
  1400. package/src/lib/organize/filter-edit-model.test.ts +0 -271
  1401. package/src/lib/organize/filter-edit-model.ts +0 -129
  1402. package/src/lib/organize/filter-run.test.ts +0 -79
  1403. package/src/lib/organize/filter-run.ts +0 -48
  1404. package/src/lib/organize/filter-status.test.ts +0 -120
  1405. package/src/lib/organize/filter-status.ts +0 -115
  1406. package/src/lib/organize/label-delete-copy.test.ts +0 -21
  1407. package/src/lib/organize/label-delete-copy.ts +0 -22
  1408. package/src/lib/organize/organize-model.test.ts +0 -209
  1409. package/src/lib/organize/organize-model.ts +0 -198
  1410. package/src/lib/organize/organize-poll.test.ts +0 -37
  1411. package/src/lib/organize/organize-poll.ts +0 -28
  1412. package/src/lib/organize/rule-model.test.ts +0 -211
  1413. package/src/lib/organize/rule-model.ts +0 -140
  1414. package/src/lib/organize/search-to-rule.test.ts +0 -142
  1415. package/src/lib/organize/search-to-rule.ts +0 -105
  1416. package/src/lib/outbox-search.test.ts +0 -75
  1417. package/src/lib/outbox-search.ts +0 -58
  1418. package/src/lib/outbox-status.test.ts +0 -79
  1419. package/src/lib/outbox-status.ts +0 -79
  1420. package/src/lib/provider-presets.test.ts +0 -51
  1421. package/src/lib/provider-presets.ts +0 -94
  1422. package/src/lib/quarantine-entries.test.ts +0 -77
  1423. package/src/lib/quarantine-entries.ts +0 -46
  1424. package/src/lib/query-error-handler.test.ts +0 -87
  1425. package/src/lib/query-error-handler.ts +0 -41
  1426. package/src/lib/query-escalation.integration.test.ts +0 -139
  1427. package/src/lib/recent-searches.test.ts +0 -53
  1428. package/src/lib/recent-searches.ts +0 -34
  1429. package/src/lib/recipient-suggestions.test.ts +0 -109
  1430. package/src/lib/recipient-suggestions.ts +0 -15
  1431. package/src/lib/request-breadcrumbs.test.ts +0 -162
  1432. package/src/lib/request-breadcrumbs.ts +0 -138
  1433. package/src/lib/rescue-candidates.test.ts +0 -94
  1434. package/src/lib/rescue-candidates.ts +0 -35
  1435. package/src/lib/rescue-telemetry.ts +0 -55
  1436. package/src/lib/result-count.test.ts +0 -97
  1437. package/src/lib/result-count.ts +0 -57
  1438. package/src/lib/result-folder.test.ts +0 -133
  1439. package/src/lib/result-folder.ts +0 -111
  1440. package/src/lib/route-breadcrumbs.test.ts +0 -41
  1441. package/src/lib/route-breadcrumbs.ts +0 -45
  1442. package/src/lib/route-search-query.test.ts +0 -70
  1443. package/src/lib/row-settlement.ts +0 -28
  1444. package/src/lib/rum-adapter.test.ts +0 -195
  1445. package/src/lib/rum-adapter.ts +0 -107
  1446. package/src/lib/search-conversion.ts +0 -23
  1447. package/src/lib/search-params.test.ts +0 -77
  1448. package/src/lib/search-params.ts +0 -59
  1449. package/src/lib/search-query.test.ts +0 -24
  1450. package/src/lib/search-query.ts +0 -11
  1451. package/src/lib/search-result.test.ts +0 -20
  1452. package/src/lib/search-result.ts +0 -55
  1453. package/src/lib/search-scope.test.ts +0 -174
  1454. package/src/lib/search-scope.ts +0 -140
  1455. package/src/lib/search-suggestions.test.ts +0 -249
  1456. package/src/lib/search-suggestions.ts +0 -296
  1457. package/src/lib/search-surface.test.ts +0 -74
  1458. package/src/lib/search-surface.ts +0 -34
  1459. package/src/lib/search-token-index.test.ts +0 -232
  1460. package/src/lib/search-token-index.ts +0 -120
  1461. package/src/lib/search-tokens.test.ts +0 -454
  1462. package/src/lib/search-tokens.ts +0 -319
  1463. package/src/lib/search-view.test.ts +0 -320
  1464. package/src/lib/search-view.ts +0 -97
  1465. package/src/lib/selection-account-scope.ts +0 -40
  1466. package/src/lib/selection-mode.test.ts +0 -34
  1467. package/src/lib/selection-mode.ts +0 -24
  1468. package/src/lib/self-update-state.test.ts +0 -552
  1469. package/src/lib/self-update-state.ts +0 -658
  1470. package/src/lib/sender-address.test.ts +0 -60
  1471. package/src/lib/sender-address.ts +0 -36
  1472. package/src/lib/session-storage.ts +0 -7
  1473. package/src/lib/spam-offer.test.ts +0 -192
  1474. package/src/lib/spam-offer.ts +0 -163
  1475. package/src/lib/stale-build.test.ts +0 -52
  1476. package/src/lib/stale-build.ts +0 -36
  1477. package/src/lib/starred-rows.test.ts +0 -67
  1478. package/src/lib/starred-rows.ts +0 -32
  1479. package/src/lib/sync-warning-entries.ts +0 -33
  1480. package/src/lib/telemetry-context.tsx +0 -9
  1481. package/src/lib/telemetry.ts +0 -17
  1482. package/src/lib/theme-preference.ts +0 -46
  1483. package/src/lib/theme.ts +0 -33
  1484. package/src/lib/thread-cache.test.ts +0 -65
  1485. package/src/lib/thread-cache.ts +0 -76
  1486. package/src/lib/thread-list-cache.test.ts +0 -147
  1487. package/src/lib/thread-list-cache.ts +0 -119
  1488. package/src/lib/thread-search-tokens.test.ts +0 -196
  1489. package/src/lib/thread-search-tokens.ts +0 -177
  1490. package/src/lib/wizard-selection.test.ts +0 -50
  1491. package/src/lib/wizard-selection.ts +0 -43
  1492. package/src/main.tsx +0 -10
  1493. package/src/mocks/story-frame/AppStory.tsx +0 -62
  1494. package/src/mocks/story-frame/calendar-window.ts +0 -21
  1495. package/src/mocks/story-frame/compose-world.ts +0 -191
  1496. package/src/mocks/story-frame/mail-handlers.ts +0 -556
  1497. package/src/mocks/story-frame/mail-world.ts +0 -447
  1498. package/src/mocks/story-frame/onboarding-handlers.ts +0 -97
  1499. package/src/mocks/story-frame/session.tsx +0 -19
  1500. package/src/mocks/story-frame/touch.ts +0 -22
  1501. package/src/routeTree.gen.ts +0 -1279
  1502. package/src/router.tsx +0 -59
  1503. package/src/routes/__root.tsx +0 -92
  1504. package/src/routes/calendar/$view.$date/$calendarObjectId/$recurrenceId.tsx +0 -26
  1505. package/src/routes/calendar/$view.$date/$calendarObjectId/index.tsx +0 -18
  1506. package/src/routes/calendar/$view.$date/$calendarObjectId.tsx +0 -15
  1507. package/src/routes/calendar/$view.$date/index.tsx +0 -25
  1508. package/src/routes/calendar/$view.$date/new.tsx +0 -20
  1509. package/src/routes/calendar/$view.$date/suggestion.$suggestionId.tsx +0 -22
  1510. package/src/routes/calendar/$view.$date.tsx +0 -170
  1511. package/src/routes/calendar/-calendar-tree.test.ts +0 -285
  1512. package/src/routes/calendar/index.tsx +0 -27
  1513. package/src/routes/calendar.tsx +0 -99
  1514. package/src/routes/import.tsx +0 -51
  1515. package/src/routes/index.tsx +0 -7
  1516. package/src/routes/mail/$mailboxId/$threadId/$messageId/$mode.{-$outboxMessageId}.tsx +0 -15
  1517. package/src/routes/mail/$mailboxId/$threadId/$messageId.tsx +0 -23
  1518. package/src/routes/mail/$mailboxId/$threadId/index.tsx +0 -14
  1519. package/src/routes/mail/$mailboxId/$threadId.tsx +0 -12
  1520. package/src/routes/mail/$mailboxId/compose.{-$outboxMessageId}.tsx +0 -14
  1521. package/src/routes/mail/$mailboxId/index.tsx +0 -10
  1522. package/src/routes/mail/$mailboxId.tsx +0 -38
  1523. package/src/routes/mail/brief/$threadId/$messageId/$mode.{-$outboxMessageId}.tsx +0 -27
  1524. package/src/routes/mail/brief/$threadId/$messageId.tsx +0 -23
  1525. package/src/routes/mail/brief/$threadId/index.tsx +0 -14
  1526. package/src/routes/mail/brief/$threadId.tsx +0 -16
  1527. package/src/routes/mail/brief/compose.{-$outboxMessageId}.tsx +0 -22
  1528. package/src/routes/mail/brief/index.tsx +0 -14
  1529. package/src/routes/mail/brief.tsx +0 -52
  1530. package/src/routes/mail/flagged/$threadId/$messageId/$mode.{-$outboxMessageId}.tsx +0 -15
  1531. package/src/routes/mail/flagged/$threadId/$messageId.tsx +0 -23
  1532. package/src/routes/mail/flagged/$threadId/index.tsx +0 -14
  1533. package/src/routes/mail/flagged/$threadId.tsx +0 -16
  1534. package/src/routes/mail/flagged/compose.{-$outboxMessageId}.tsx +0 -13
  1535. package/src/routes/mail/flagged/index.tsx +0 -10
  1536. package/src/routes/mail/flagged.tsx +0 -51
  1537. package/src/routes/mail/index.tsx +0 -14
  1538. package/src/routes/mail/outbox/compose.{-$outboxMessageId}.tsx +0 -17
  1539. package/src/routes/mail/outbox/draft/$outboxMessageId.tsx +0 -19
  1540. package/src/routes/mail/outbox/index.tsx +0 -10
  1541. package/src/routes/mail/outbox.tsx +0 -32
  1542. package/src/routes/mail.tsx +0 -262
  1543. package/src/routes/onboarding.tsx +0 -47
  1544. package/src/routes/settings/-accounts.test.ts +0 -340
  1545. package/src/routes/settings/-filters.test.ts +0 -209
  1546. package/src/routes/settings/-senders-remove-flag.render.test.ts +0 -105
  1547. package/src/routes/settings/-shared/help-copy.tsx +0 -91
  1548. package/src/routes/settings/accounts.tsx +0 -692
  1549. package/src/routes/settings/advanced.tsx +0 -57
  1550. package/src/routes/settings/appearance.tsx +0 -118
  1551. package/src/routes/settings/calendars.tsx +0 -134
  1552. package/src/routes/settings/filters.tsx +0 -259
  1553. package/src/routes/settings/folders.tsx +0 -330
  1554. package/src/routes/settings/index.tsx +0 -5
  1555. package/src/routes/settings/labels.tsx +0 -242
  1556. package/src/routes/settings/senders.tsx +0 -444
  1557. package/src/routes/settings/suggested-vips.tsx +0 -10
  1558. package/src/routes/settings/warnings.tsx +0 -36
  1559. package/src/routes/settings.tsx +0 -87
  1560. package/src/routing/browsed-list.ts +0 -76
  1561. package/src/routing/calendar-fragment.test.ts +0 -66
  1562. package/src/routing/calendar.ts +0 -250
  1563. package/src/routing/compose-press-opens.render.test.ts +0 -179
  1564. package/src/routing/compose.ts +0 -181
  1565. package/src/routing/fragment.render.test.ts +0 -98
  1566. package/src/routing/fragment.test.ts +0 -113
  1567. package/src/routing/fragment.ts +0 -145
  1568. package/src/routing/index.ts +0 -93
  1569. package/src/routing/nav-link.tsx +0 -64
  1570. package/src/routing/nav-selection.ts +0 -26
  1571. package/src/routing/open-thread.ts +0 -157
  1572. package/src/routing/outbox-draft.ts +0 -44
  1573. package/src/routing/reply.ts +0 -335
  1574. package/src/routing/search-field.render.test.ts +0 -216
  1575. package/src/routing/search-field.ts +0 -85
  1576. package/src/routing/search-mirror-convergence.render.test.ts +0 -198
  1577. package/src/routing/search-mirror-detail.render.test.ts +0 -226
  1578. package/src/routing/search-mirror.ts +0 -130
  1579. package/src/routing/search-navigation.ts +0 -43
  1580. package/src/routing/sections.ts +0 -55
  1581. package/src/routing/wizard-history.test.ts +0 -163
  1582. package/src/routing/wizard-history.ts +0 -219
  1583. package/src/runtime-config.test.ts +0 -43
  1584. package/src/runtime-config.ts +0 -104
  1585. package/src/shell/index.tsx +0 -101
  1586. package/src/test-support/bulk-run.ts +0 -13
  1587. package/src/test-support/dom.ts +0 -232
  1588. package/src/test-support/fixtures.ts +0 -109
  1589. package/src/test-support/http.ts +0 -82
  1590. package/src/test-support/intelligence-surface.ts +0 -42
  1591. package/src/test-support/list-search-binding.ts +0 -34
  1592. package/src/test-support/test-bundle-app.ts +0 -102
  1593. package/src/test-support/thread-router.ts +0 -54
  1594. package/vite.base.ts +0 -61
  1595. /package/{src → dist/src}/auth/auth.css +0 -0
  1596. /package/{src → dist/src}/auth/cognito/cognito.css +0 -0
  1597. /package/{src → dist/src}/vite-env.d.ts +0 -0
@@ -1,1599 +0,0 @@
1
- /**
2
- * OnboardingWizard — full 7-step onboarding flow.
3
- *
4
- * Steps: Welcome → Connector → Address → Servers → Credentials → Test → Sync
5
- * Microsoft path: Connector → MicrosoftEmail → redirect → MicrosoftGranted
6
- *
7
- * Entry points:
8
- * - First-run (zero accounts): full-screen wizard via /onboarding route
9
- * - Settings "Add account": steps 2-7 embedded in the settings content area
10
- *
11
- * Backend deps status:
12
- * - POST /accounts — CREATE. Exists.
13
- * - POST /accounts/test-connection — Exists.
14
- * - GET /accounts/{accountId}/sync/status — Exists (#431 syncPhase).
15
- * - POST /accounts/oauth/microsoft/start — Exists (#473).
16
- * - GET /autodiscovery?email=… — NOT YET IMPLEMENTED (TypeSpec-first, future).
17
- * Client-side autodiscovery (provider table + Mozilla autoconfig) used instead.
18
- */
19
-
20
- import {
21
- accountOperationsCreateAccountMutation,
22
- configOperationsGetConfigOptions,
23
- configOperationsGetConfigQueryKey,
24
- microsoftOAuthOperationsMicrosoftOAuthStartMutation,
25
- syncOperationsGetSyncStatusOptions,
26
- } from "@remit/api-http-client/@tanstack/react-query.gen.ts";
27
- import type { RemitImapAccountResponse } from "@remit/api-http-client/types.gen.ts";
28
- import {
29
- ACCOUNT_SERVICE_EMPTY_MESSAGE,
30
- ACCOUNT_SERVICE_ROWS,
31
- type AccountService,
32
- AccountServiceChoice,
33
- Banner,
34
- Button,
35
- CheckRow,
36
- ConnectorTile,
37
- FieldLabel,
38
- Input,
39
- Kbd,
40
- Select,
41
- ServerFields,
42
- securityToApi,
43
- WizardShell,
44
- } from "@remit/ui";
45
- import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
46
- import { AtSign, FileJson, Inbox, Loader2, Mail, Server } from "lucide-react";
47
- import { useCallback, useEffect, useRef, useState } from "react";
48
- import {
49
- REDIRECT_STALL_MESSAGE,
50
- useRedirectEnded,
51
- } from "../../hooks/useRedirectEnded.js";
52
- // useRef is kept for the hasCreatedRef guard — not for DOM refs
53
- import {
54
- type DiscoveryResult,
55
- discoverSettings,
56
- getAppPasswordUrl,
57
- getDiscoveryStatusMessage,
58
- } from "../../lib/autodiscovery.js";
59
- import {
60
- getPresetById,
61
- PROVIDER_PRESETS,
62
- presetIdForEmail,
63
- } from "../../lib/provider-presets.js";
64
- import { computeSmtpAutoFill } from "../settings/account-form-helpers.js";
65
- import {
66
- ConnectionTestStep,
67
- CredentialsStep,
68
- type ServerConfig,
69
- } from "./credential-steps.js";
70
-
71
- /* ------------------------------------------------------------------ */
72
- /* Wizard step definitions */
73
- /* ------------------------------------------------------------------ */
74
-
75
- type WizardStep =
76
- | "welcome"
77
- | "connector"
78
- | "microsoft-email"
79
- | "microsoft-granted"
80
- | "address"
81
- | "servers"
82
- | "credentials"
83
- | "test"
84
- | "sync";
85
-
86
- const STEP_LABELS = [
87
- "Connector",
88
- "Address",
89
- "Servers",
90
- "Credentials",
91
- "Test",
92
- "Sync",
93
- ];
94
-
95
- // Maps WizardStep to zero-based index in the rail (welcome hides rail)
96
- const STEP_INDEX: Record<WizardStep, number> = {
97
- welcome: 0,
98
- connector: 0,
99
- "microsoft-email": 0,
100
- "microsoft-granted": 5,
101
- address: 1,
102
- servers: 2,
103
- credentials: 3,
104
- test: 4,
105
- sync: 5,
106
- };
107
-
108
- /* ------------------------------------------------------------------ */
109
- /* State shapes */
110
- /* ------------------------------------------------------------------ */
111
-
112
- interface WizardState {
113
- email: string;
114
- displayName: string;
115
- imapConfig: ServerConfig;
116
- smtpConfig: ServerConfig;
117
- username: string;
118
- password: string;
119
- discoveryResult: DiscoveryResult | null;
120
- /** True if autodiscovery succeeded (affects subtitle copy) */
121
- discovered: boolean;
122
- /** Account ID created at step 7 */
123
- createdAccountId: string | null;
124
- }
125
-
126
- const DEFAULT_IMAP: ServerConfig = { host: "", port: 993, security: "tls" };
127
- const DEFAULT_SMTP: ServerConfig = {
128
- host: "",
129
- port: 587,
130
- security: "starttls",
131
- };
132
-
133
- /* ------------------------------------------------------------------ */
134
- /* Individual step components */
135
- /* ------------------------------------------------------------------ */
136
-
137
- /**
138
- * First run. Importing a config file sits beside adding the first account, not
139
- * under it: someone arriving from another Reader has already made every choice
140
- * the wizard is about to ask for, and the file is the shorter road.
141
- */
142
- export function StepWelcome({
143
- onStart,
144
- onImportConfig,
145
- }: {
146
- onStart: () => void;
147
- onImportConfig?: () => void;
148
- }) {
149
- // Keyboard: Enter advances
150
- useEffect(() => {
151
- const handler = (e: KeyboardEvent) => {
152
- if (e.key === "Enter") onStart();
153
- };
154
- window.addEventListener("keydown", handler);
155
- return () => window.removeEventListener("keydown", handler);
156
- }, [onStart]);
157
-
158
- return (
159
- <WizardShell
160
- steps={STEP_LABELS}
161
- activeStep={0}
162
- hideSteps
163
- title="Welcome to Remit"
164
- subtitle={
165
- onImportConfig
166
- ? "Set up your first account, or bring the settings from another Reader."
167
- : "One inbox for all your mail, with context about every message."
168
- }
169
- footer={
170
- <>
171
- {onImportConfig ? (
172
- <Button
173
- variant="secondary"
174
- icon={<FileJson className="size-4" />}
175
- onClick={onImportConfig}
176
- >
177
- Import a config file
178
- </Button>
179
- ) : (
180
- <span className="text-2xs text-fg-subtle">
181
- <Kbd>Enter</Kbd> to continue
182
- </span>
183
- )}
184
- <Button variant="primary" onClick={onStart}>
185
- Add your first account
186
- </Button>
187
- </>
188
- }
189
- >
190
- <div className="flex flex-col items-start py-5">
191
- <span className="flex size-14 items-center justify-center rounded-md bg-accent-soft">
192
- <Mail className="size-7 text-accent" />
193
- </span>
194
- <p className="mt-5 max-w-sm text-sm leading-relaxed text-fg-muted">
195
- Remit syncs your existing mailboxes and tells you who is really
196
- writing to you — sender history, authenticity checks, and similar
197
- messages, right next to every email.
198
- </p>
199
- {onImportConfig && (
200
- <p className="mt-3 max-w-sm text-sm leading-relaxed text-fg-muted">
201
- A config file carries your accounts, folder roles, rules, flagged
202
- senders and appearance from another Reader. It never carries
203
- passwords, so you sign in again here.
204
- </p>
205
- )}
206
- </div>
207
- </WizardShell>
208
- );
209
- }
210
-
211
- type ConnectorChoice = "imap" | "microsoft";
212
-
213
- function StepConnector({
214
- onContinue,
215
- onMicrosoft,
216
- onBack,
217
- showBack,
218
- }: {
219
- onContinue: () => void;
220
- onMicrosoft: () => void;
221
- onBack: () => void;
222
- showBack: boolean;
223
- }) {
224
- const [selected, setSelected] = useState<ConnectorChoice>("imap");
225
-
226
- // Keyboard: Enter advances, Esc goes back
227
- useEffect(() => {
228
- const handler = (e: KeyboardEvent) => {
229
- if (e.key === "Enter") {
230
- if (selected === "microsoft") onMicrosoft();
231
- else onContinue();
232
- }
233
- if (e.key === "Escape") onBack();
234
- };
235
- window.addEventListener("keydown", handler);
236
- return () => window.removeEventListener("keydown", handler);
237
- }, [onContinue, onMicrosoft, onBack, selected]);
238
-
239
- const handleContinue = () => {
240
- if (selected === "microsoft") onMicrosoft();
241
- else onContinue();
242
- };
243
-
244
- return (
245
- <WizardShell
246
- steps={STEP_LABELS}
247
- activeStep={STEP_INDEX.connector}
248
- title="How does this account connect?"
249
- subtitle="Choose a sign-in method. IMAP works with any provider."
250
- footer={
251
- <>
252
- {showBack ? (
253
- <Button variant="ghost" onClick={onBack}>
254
- Back
255
- </Button>
256
- ) : (
257
- <span />
258
- )}
259
- <Button variant="primary" onClick={handleContinue}>
260
- {selected === "microsoft"
261
- ? "Continue with Microsoft"
262
- : "Continue with IMAP"}
263
- </Button>
264
- </>
265
- }
266
- >
267
- <div className="grid grid-cols-1 gap-3 sm:grid-cols-2">
268
- <ConnectorTile
269
- name="IMAP / SMTP"
270
- description="Any mail provider — Fastmail, iCloud, your own server."
271
- icon={<Server className="size-5" />}
272
- selected={selected === "imap"}
273
- onSelect={() => setSelected("imap")}
274
- />
275
- <ConnectorTile
276
- name="Outlook / Microsoft 365"
277
- description="Sign in with Microsoft. Works with Outlook.com and work accounts."
278
- icon={<Inbox className="size-5" />}
279
- selected={selected === "microsoft"}
280
- onSelect={() => setSelected("microsoft")}
281
- />
282
- </div>
283
- </WizardShell>
284
- );
285
- }
286
-
287
- const MICROSOFT_SERVICES: AccountService[] = ["Mail", "Calendar"];
288
-
289
- export interface StepMicrosoftEmailProps {
290
- refusal?: MicrosoftRefusal;
291
- onBack: () => void;
292
- onConnected: (accountId: string) => void;
293
- }
294
-
295
- export function StepMicrosoftEmail({
296
- refusal,
297
- onBack,
298
- onConnected,
299
- }: StepMicrosoftEmailProps) {
300
- const [email, setEmail] = useState(refusal?.email ?? "");
301
- const [services, setServices] = useState<AccountService[]>(
302
- refusal?.services ?? MICROSOFT_SERVICES,
303
- );
304
- const [servicesRefused, setServicesRefused] = useState(false);
305
- const [error, setError] = useState<string | null>(refusal?.message ?? null);
306
- const [awaitingReturn, setAwaitingReturn] = useState(false);
307
- const [preparing, setPreparing] = useState(false);
308
- // The account read is in flight across a step the user can leave — Escape and
309
- // Back both unmount it — and it ends in a redirect that would take the whole
310
- // window with it.
311
- const stepIsMounted = useRef(true);
312
- useEffect(() => {
313
- stepIsMounted.current = true;
314
- return () => {
315
- stepIsMounted.current = false;
316
- };
317
- }, []);
318
- // The accounts this instance held when the redirect started. What comes back
319
- // is recognised as new against it, so it has to be a real list — against an
320
- // empty stand-in every account already here reads as the one just connected.
321
- const accountIdsBeforeRedirect = useRef<ReadonlySet<string>>(new Set());
322
-
323
- const { refetch: refetchConfig } = useQuery(
324
- configOperationsGetConfigOptions(),
325
- );
326
-
327
- // Microsoft's answer comes back to whichever window the platform picks, and
328
- // on iOS that is often the browser rather than the app launched from the
329
- // home screen. So this window decides on the account list rather than on
330
- // having been the one that got the redirect: an account that was not there
331
- // before carries the wizard forward.
332
- //
333
- // Every return leg is a chance to find that account, not a verdict on the
334
- // sign-in — a user who comes back mid-flow to read a password has not failed
335
- // anything, so nothing here concludes and the check stays armed until an
336
- // account appears or the user leaves the step.
337
- const markRedirectStarted = useRedirectEnded((end) => {
338
- setPreparing(false);
339
- // A redirect that never took the window says nothing about the account, so
340
- // there is nothing to read the config for — only a failure to state.
341
- if (end === "stalled") {
342
- setAwaitingReturn(false);
343
- setError(REDIRECT_STALL_MESSAGE);
344
- return;
345
- }
346
- void refetchConfig().then(({ data, isError }) => {
347
- if (!stepIsMounted.current) return;
348
- if (isError || !data) {
349
- setError(
350
- "Couldn't check whether the sign-in finished. Open Settings › Accounts to see whether the account is connected.",
351
- );
352
- return;
353
- }
354
- setError(null);
355
- const connected = data.accounts.find(
356
- (account) => !accountIdsBeforeRedirect.current.has(account.accountId),
357
- );
358
- if (connected) onConnected(connected.accountId);
359
- });
360
- });
361
-
362
- const startMutation = useMutation({
363
- ...microsoftOAuthOperationsMicrosoftOAuthStartMutation(),
364
- onSuccess: (data) => {
365
- // A step the user left while this was in flight does not get to take the
366
- // window with it. `assign` is not synchronous either — the page is still
367
- // here while the browser fetches Microsoft's — so the control stays busy
368
- // until this window has been away and come back.
369
- if (!stepIsMounted.current) return;
370
- markRedirectStarted();
371
- setAwaitingReturn(true);
372
- window.location.assign(data.authorizationUrl);
373
- },
374
- onError: (err) => {
375
- setPreparing(false);
376
- setError(err instanceof Error ? err.message : "Failed to start sign-in");
377
- },
378
- });
379
-
380
- // The account list is read first and the redirect goes from what it says, so
381
- // the window that comes back has something to recognise a new account
382
- // against. A list that cannot be read stops the flow here, where it can be
383
- // retried, rather than at the return leg where nothing can be concluded.
384
- const redirecting = preparing || startMutation.isPending;
385
-
386
- const handleSubmit = () => {
387
- if (redirecting) return;
388
- if (services.length === 0) {
389
- setServicesRefused(true);
390
- return;
391
- }
392
- setError(null);
393
- setPreparing(true);
394
- void refetchConfig().then(({ data, isError }) => {
395
- if (!stepIsMounted.current) return;
396
- if (isError || !data) {
397
- setPreparing(false);
398
- setError(
399
- "Couldn't read this instance's accounts, so sign-in can't be tracked. Check your connection and try again.",
400
- );
401
- return;
402
- }
403
- accountIdsBeforeRedirect.current = new Set(
404
- data.accounts.map((account) => account.accountId),
405
- );
406
- startMutation.mutate({
407
- body: { email: email.trim() || undefined, services },
408
- });
409
- });
410
- };
411
-
412
- // Keyboard: Enter submits, Esc goes back. The listener reads the submit
413
- // through a ref rather than closing over it, so Enter sends the address the
414
- // field holds now instead of whatever it held when the listener went on.
415
- const submitRef = useRef(handleSubmit);
416
- submitRef.current = handleSubmit;
417
- useEffect(() => {
418
- const handler = (e: KeyboardEvent) => {
419
- if (e.key === "Enter") submitRef.current();
420
- if (e.key === "Escape") onBack();
421
- };
422
- window.addEventListener("keydown", handler);
423
- return () => window.removeEventListener("keydown", handler);
424
- }, [onBack]);
425
-
426
- return (
427
- <WizardShell
428
- steps={STEP_LABELS}
429
- activeStep={STEP_INDEX.connector}
430
- title={
431
- refusal?.reconnect && refusal.email
432
- ? `Reconnect ${refusal.email}`
433
- : "Sign in with Microsoft"
434
- }
435
- subtitle="Microsoft is asked for the mail and calendar access you pick here."
436
- footer={
437
- <>
438
- <Button variant="ghost" onClick={onBack}>
439
- Back
440
- </Button>
441
- <Button
442
- variant="primary"
443
- onClick={handleSubmit}
444
- disabled={redirecting}
445
- icon={
446
- redirecting ? (
447
- <Loader2 className="size-4 animate-spin" />
448
- ) : undefined
449
- }
450
- >
451
- {redirecting
452
- ? "Redirecting…"
453
- : awaitingReturn
454
- ? "Start over"
455
- : "Sign in with Microsoft"}
456
- </Button>
457
- </>
458
- }
459
- >
460
- <div className="space-y-3">
461
- <AccountServiceChoice
462
- providerName="Microsoft"
463
- offered={MICROSOFT_SERVICES}
464
- selected={services}
465
- onChange={(next) => {
466
- setServices(next);
467
- if (next.length > 0) setServicesRefused(false);
468
- }}
469
- error={servicesRefused ? ACCOUNT_SERVICE_EMPTY_MESSAGE : undefined}
470
- />
471
- <div>
472
- <FieldLabel htmlFor="microsoft-email">
473
- Email address (optional)
474
- </FieldLabel>
475
- <Input
476
- id="microsoft-email"
477
- icon={<AtSign className="size-4" />}
478
- placeholder="you@outlook.com"
479
- value={email}
480
- onChange={(e) => setEmail(e.target.value)}
481
- type="email"
482
- autoComplete="email"
483
- />
484
- <p className="mt-1.5 text-2xs text-fg-subtle">
485
- Pre-fills the Microsoft sign-in form. Leave blank to choose on the
486
- Microsoft page.
487
- </p>
488
- </div>
489
- {awaitingReturn && (
490
- <Banner tone="info">
491
- Waiting for Microsoft. Finish signing in — this window carries on
492
- the moment the account is connected, wherever you finished.
493
- </Banner>
494
- )}
495
- {error && <Banner tone="danger">{error}</Banner>}
496
- </div>
497
- </WizardShell>
498
- );
499
- }
500
-
501
- export interface StepMicrosoftGrantedProps {
502
- accountId: string;
503
- onSignInAgain: () => void;
504
- onContinue: (accountId: string) => void;
505
- }
506
-
507
- export function StepMicrosoftGranted({
508
- accountId,
509
- onSignInAgain,
510
- onContinue,
511
- }: StepMicrosoftGrantedProps) {
512
- const {
513
- data: config,
514
- isError,
515
- isFetching,
516
- refetch,
517
- } = useQuery(configOperationsGetConfigOptions());
518
- const account = config?.accounts.find(
519
- (candidate) => candidate.accountId === accountId,
520
- );
521
-
522
- if (isError) {
523
- return (
524
- <WizardShell
525
- steps={STEP_LABELS}
526
- activeStep={STEP_INDEX["microsoft-granted"]}
527
- title="Couldn't read the new account"
528
- subtitle="Microsoft finished, but this instance did not answer."
529
- footer={
530
- <>
531
- <span />
532
- <Button
533
- variant="primary"
534
- onClick={() => void refetch()}
535
- disabled={isFetching}
536
- >
537
- Retry
538
- </Button>
539
- </>
540
- }
541
- >
542
- <Banner tone="danger">
543
- Couldn't load the account Microsoft just connected. Check your
544
- connection and retry, or open Settings › Accounts to see it.
545
- </Banner>
546
- </WizardShell>
547
- );
548
- }
549
-
550
- if (!config || (!account && isFetching)) {
551
- return (
552
- <WizardShell
553
- steps={STEP_LABELS}
554
- activeStep={STEP_INDEX["microsoft-granted"]}
555
- title="Reading the new account"
556
- subtitle="Checking what Microsoft granted."
557
- footer={
558
- <>
559
- <span className="text-2xs text-fg-subtle">Loading…</span>
560
- <span />
561
- </>
562
- }
563
- >
564
- <div className="flex items-center gap-2 py-4 text-sm text-fg-muted">
565
- <Loader2 className="size-4 animate-spin text-accent" />
566
- Loading the account…
567
- </div>
568
- </WizardShell>
569
- );
570
- }
571
-
572
- if (!account) {
573
- return (
574
- <WizardShell
575
- steps={STEP_LABELS}
576
- activeStep={STEP_INDEX["microsoft-granted"]}
577
- title="The account is not here"
578
- subtitle="Microsoft sent the sign-in back, but no account was kept."
579
- footer={
580
- <>
581
- <span />
582
- <Button variant="primary" onClick={onSignInAgain}>
583
- Sign in again
584
- </Button>
585
- </>
586
- }
587
- >
588
- <Banner tone="danger">
589
- This instance holds no account from that sign-in. Sign in with
590
- Microsoft again to connect it.
591
- </Banner>
592
- </WizardShell>
593
- );
594
- }
595
-
596
- return <AccountGranted account={account} onContinue={onContinue} />;
597
- }
598
-
599
- export interface AccountGrantedProps {
600
- account: Pick<
601
- RemitImapAccountResponse,
602
- "accountId" | "email" | "syncedServices" | "grantedScopes"
603
- >;
604
- onContinue: (accountId: string) => void;
605
- }
606
-
607
- export function AccountGranted({ account, onContinue }: AccountGrantedProps) {
608
- const syncsMail = account.syncedServices.includes("Mail");
609
- return (
610
- <WizardShell
611
- steps={STEP_LABELS}
612
- activeStep={STEP_INDEX["microsoft-granted"]}
613
- title={`Connected ${account.email}`}
614
- subtitle="Microsoft granted access to what you picked."
615
- footer={
616
- <>
617
- <span className="text-2xs text-fg-subtle">
618
- Change this later in Settings › Accounts
619
- </span>
620
- <Button
621
- variant="primary"
622
- onClick={() => onContinue(account.accountId)}
623
- >
624
- {syncsMail ? "Go to inbox" : "Continue"}
625
- </Button>
626
- </>
627
- }
628
- >
629
- <div className="space-y-3">
630
- <div className="divide-y divide-line">
631
- {ACCOUNT_SERVICE_ROWS.map((row) =>
632
- account.syncedServices.includes(row.id) ? (
633
- <CheckRow
634
- key={row.id}
635
- label={row.label}
636
- detail="Access granted — syncing"
637
- state="ok"
638
- />
639
- ) : (
640
- <CheckRow
641
- key={row.id}
642
- label={row.label}
643
- detail="Not synced. Turn it on in Settings › Accounts; Microsoft asks for access then."
644
- state="pending"
645
- />
646
- ),
647
- )}
648
- </div>
649
- <div>
650
- <p className="text-2xs text-fg-subtle">
651
- Permissions Microsoft granted
652
- </p>
653
- <code
654
- className="mt-1 block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted"
655
- data-testid="granted-scopes"
656
- >
657
- {account.grantedScopes.join(" ")}
658
- </code>
659
- </div>
660
- </div>
661
- </WizardShell>
662
- );
663
- }
664
-
665
- function StepAddress({
666
- initialEmail,
667
- initialDisplayName,
668
- onContinue,
669
- onBack,
670
- }: {
671
- initialEmail: string;
672
- initialDisplayName: string;
673
- onContinue: (
674
- email: string,
675
- displayName: string,
676
- result: DiscoveryResult | null,
677
- ) => void;
678
- onBack: () => void;
679
- }) {
680
- const [email, setEmail] = useState(initialEmail);
681
- const [displayName, setDisplayName] = useState(initialDisplayName);
682
- const [discovering, setDiscovering] = useState(false);
683
- const [statusMsg, setStatusMsg] = useState("");
684
- const [error, setError] = useState<string | null>(null);
685
-
686
- const handleSubmit = useCallback(async () => {
687
- const trimmed = email.trim();
688
- if (!trimmed.includes("@") || !trimmed.includes(".")) {
689
- setError("Enter a valid email address.");
690
- return;
691
- }
692
- setError(null);
693
-
694
- setDiscovering(true);
695
- setStatusMsg(getDiscoveryStatusMessage(trimmed));
696
- try {
697
- // Short budget — browser autoconfig fetches are CORS-blocked and
698
- // fall through to the heuristic; see discoverSettings docs.
699
- const result = await discoverSettings(trimmed);
700
- onContinue(trimmed, displayName.trim(), result);
701
- } finally {
702
- setDiscovering(false);
703
- }
704
- }, [email, displayName, onContinue]);
705
-
706
- // Keyboard: Enter submits, Esc goes back
707
- useEffect(() => {
708
- const handler = (e: KeyboardEvent) => {
709
- if (e.key === "Enter" && !discovering) void handleSubmit();
710
- if (e.key === "Escape") onBack();
711
- };
712
- window.addEventListener("keydown", handler);
713
- return () => window.removeEventListener("keydown", handler);
714
- }, [handleSubmit, discovering, onBack]);
715
-
716
- return (
717
- <WizardShell
718
- steps={STEP_LABELS}
719
- activeStep={STEP_INDEX.address}
720
- title="What's the email address?"
721
- subtitle="We'll detect the server settings for you."
722
- footer={
723
- <>
724
- <Button variant="ghost" onClick={onBack}>
725
- Back
726
- </Button>
727
- <Button
728
- variant="primary"
729
- disabled={discovering}
730
- onClick={() => void handleSubmit()}
731
- >
732
- Continue
733
- </Button>
734
- </>
735
- }
736
- >
737
- <div className="space-y-4">
738
- <div>
739
- <FieldLabel htmlFor="onboarding-email">Email address</FieldLabel>
740
- <Input
741
- id="onboarding-email"
742
- icon={<AtSign className="size-4" />}
743
- placeholder="you@example.com"
744
- value={email}
745
- onChange={(e) => {
746
- setEmail(e.target.value);
747
- setError(null);
748
- }}
749
- type="email"
750
- autoComplete="email"
751
- />
752
- </div>
753
- <div>
754
- <FieldLabel htmlFor="onboarding-display-name">
755
- Display name (optional)
756
- </FieldLabel>
757
- <Input
758
- id="onboarding-display-name"
759
- placeholder="Alice"
760
- value={displayName}
761
- onChange={(e) => setDisplayName(e.target.value)}
762
- />
763
- <p className="mt-1.5 text-2xs text-fg-subtle">
764
- What to call this account in Remit. Leave blank to use a name
765
- derived from the address.
766
- </p>
767
- </div>
768
- {discovering && (
769
- <div className="mt-3 flex items-center gap-2 text-xs text-fg-muted">
770
- <Loader2 className="size-3.5 animate-spin text-accent" />
771
- {statusMsg}
772
- </div>
773
- )}
774
- {error && !discovering && (
775
- <div className="mt-3">
776
- <Banner tone="danger">{error}</Banner>
777
- </div>
778
- )}
779
- </div>
780
- </WizardShell>
781
- );
782
- }
783
-
784
- export function StepServers({
785
- email,
786
- imapConfig,
787
- smtpConfig,
788
- discovered,
789
- onContinue,
790
- onBack,
791
- onChange,
792
- }: {
793
- email: string;
794
- imapConfig: ServerConfig;
795
- smtpConfig: ServerConfig;
796
- discovered: boolean;
797
- onContinue: () => void;
798
- onBack: () => void;
799
- onChange: (imap: ServerConfig, smtp: ServerConfig) => void;
800
- }) {
801
- const [imap, setImap] = useState<ServerConfig>(imapConfig);
802
- const [smtp, setSmtp] = useState<ServerConfig>(smtpConfig);
803
- const [providerId, setProviderId] = useState<string>(() =>
804
- presetIdForEmail(email),
805
- );
806
- const [advanced, setAdvanced] = useState(false);
807
- const [error, setError] = useState<string | null>(null);
808
-
809
- const preset = getPresetById(providerId);
810
- // A recognised provider locks the fields until the user chooses Advanced.
811
- const locked = preset !== undefined && !advanced;
812
-
813
- const applyPreset = useCallback((id: string) => {
814
- setProviderId(id);
815
- setAdvanced(false);
816
- setError(null);
817
- const next = getPresetById(id);
818
- if (!next) return;
819
- setImap({
820
- host: next.imap.host,
821
- port: next.imap.port,
822
- security: next.imap.security,
823
- });
824
- setSmtp({
825
- host: next.smtp.host,
826
- port: next.smtp.port,
827
- security: next.smtp.security,
828
- });
829
- }, []);
830
-
831
- // Propagate changes upward immediately
832
- useEffect(() => {
833
- onChange(imap, smtp);
834
- }, [imap, smtp, onChange]);
835
-
836
- const isValid = imap.host.trim() !== "";
837
-
838
- const handleContinue = useCallback(() => {
839
- if (!isValid) {
840
- setError("Enter the IMAP host.");
841
- return;
842
- }
843
- setError(null);
844
- onContinue();
845
- }, [isValid, onContinue]);
846
-
847
- // Keyboard: Enter advances, Esc goes back
848
- useEffect(() => {
849
- const handler = (e: KeyboardEvent) => {
850
- if (e.key === "Enter") handleContinue();
851
- if (e.key === "Escape") onBack();
852
- };
853
- window.addEventListener("keydown", handler);
854
- return () => window.removeEventListener("keydown", handler);
855
- }, [handleContinue, onBack]);
856
-
857
- const domain = email.split("@")[1] ?? "your domain";
858
- const subtitle = preset
859
- ? "Pick your provider to fill in the right settings — or choose Custom to enter them by hand."
860
- : discovered
861
- ? "Found via autodiscovery — adjust anything that looks off."
862
- : `We couldn't detect settings for ${domain} — enter them manually.`;
863
-
864
- const badge = locked
865
- ? ({ label: "preset", tone: "neutral" } as const)
866
- : !preset && discovered
867
- ? ({ label: "detected", tone: "positive" } as const)
868
- : undefined;
869
-
870
- const appPasswordUrl = preset?.passwordHelp.url ?? getAppPasswordUrl(email);
871
-
872
- return (
873
- <WizardShell
874
- steps={STEP_LABELS}
875
- activeStep={STEP_INDEX.servers}
876
- title="Confirm server settings"
877
- subtitle={subtitle}
878
- footer={
879
- <>
880
- <Button variant="ghost" onClick={onBack}>
881
- Back
882
- </Button>
883
- <Button variant="primary" onClick={handleContinue}>
884
- Continue
885
- </Button>
886
- </>
887
- }
888
- >
889
- <div className="space-y-5">
890
- {error && <Banner tone="danger">{error}</Banner>}
891
- <div>
892
- <FieldLabel htmlFor="provider-select">Provider</FieldLabel>
893
- <Select
894
- id="provider-select"
895
- value={providerId}
896
- onChange={(e) => applyPreset(e.target.value)}
897
- >
898
- <option value="">Custom / other</option>
899
- {PROVIDER_PRESETS.map((p) => (
900
- <option key={p.id} value={p.id}>
901
- {p.label}
902
- </option>
903
- ))}
904
- </Select>
905
- {preset && (
906
- <p className="mt-1 text-2xs text-fg-subtle">
907
- {locked ? (
908
- <>
909
- Server settings are pre-filled for {preset.label} and locked.{" "}
910
- <button
911
- type="button"
912
- className="text-accent underline"
913
- onClick={() => setAdvanced(true)}
914
- >
915
- Advanced
916
- </button>{" "}
917
- lets you edit them by hand.
918
- </>
919
- ) : (
920
- <>Editing {preset.label}'s settings by hand.</>
921
- )}
922
- </p>
923
- )}
924
- </div>
925
- <ServerFields
926
- legend="IMAP — incoming"
927
- badge={badge}
928
- readOnly={locked}
929
- host={imap.host}
930
- port={String(imap.port)}
931
- security={imap.security}
932
- hostPlaceholder="imap.example.com"
933
- portPlaceholder="993"
934
- onHostChange={(v) => {
935
- setImap((s) => ({ ...s, host: v }));
936
- setError(null);
937
- }}
938
- onPortChange={(v) => setImap((s) => ({ ...s, port: Number(v) }))}
939
- onSecurityChange={(v) => setImap((s) => ({ ...s, security: v }))}
940
- />
941
- <p className="text-2xs text-fg-subtle">
942
- Sending (SMTP) is optional — leave it blank to set up a receive-only
943
- account and add sending later in Settings.
944
- </p>
945
- <ServerFields
946
- legend="SMTP — outgoing (optional)"
947
- badge={badge}
948
- readOnly={locked}
949
- host={smtp.host}
950
- port={String(smtp.port)}
951
- security={smtp.security}
952
- hostPlaceholder="smtp.example.com"
953
- portPlaceholder="587"
954
- onHostChange={(v) => {
955
- setSmtp((s) => ({ ...s, host: v }));
956
- setError(null);
957
- }}
958
- onPortChange={(v) => setSmtp((s) => ({ ...s, port: Number(v) }))}
959
- onSecurityChange={(v) => setSmtp((s) => ({ ...s, security: v }))}
960
- />
961
- {preset && (
962
- <p className="text-2xs text-fg-subtle">
963
- {preset.passwordHelp.text}{" "}
964
- {appPasswordUrl && (
965
- <a
966
- href={appPasswordUrl}
967
- target="_blank"
968
- rel="noopener noreferrer"
969
- className="text-accent underline"
970
- >
971
- Get an app password
972
- </a>
973
- )}
974
- </p>
975
- )}
976
- </div>
977
- </WizardShell>
978
- );
979
- }
980
-
981
- /**
982
- * How long the sync step holds "Go to inbox" shut while it waits for the first
983
- * messages. Long enough for a normal IMAP handshake and first batch, short
984
- * enough that a stalled or silent sync never becomes a dead end.
985
- */
986
- const INBOX_GATE_MAX_WAIT_MS = 20_000;
987
-
988
- function StepSync({
989
- email,
990
- displayName,
991
- imapConfig,
992
- smtpConfig,
993
- username,
994
- password,
995
- onGoToInbox,
996
- }: {
997
- email: string;
998
- displayName: string;
999
- imapConfig: ServerConfig;
1000
- smtpConfig: ServerConfig;
1001
- username: string;
1002
- password: string;
1003
- onGoToInbox: (accountId: string) => void;
1004
- }) {
1005
- const queryClient = useQueryClient();
1006
- const [accountId, setAccountId] = useState<string | null>(null);
1007
- const [createError, setCreateError] = useState<string | null>(null);
1008
- const hasCreatedRef = useRef(false);
1009
-
1010
- const imapTls = securityToApi(imapConfig.security);
1011
- const smtpTls = securityToApi(smtpConfig.security);
1012
-
1013
- const createMutation = useMutation({
1014
- ...accountOperationsCreateAccountMutation(),
1015
- onSuccess: (data) => {
1016
- setAccountId(data.accountId);
1017
- queryClient.invalidateQueries({
1018
- queryKey: configOperationsGetConfigQueryKey(),
1019
- });
1020
- },
1021
- onError: (err) => {
1022
- setCreateError(
1023
- err instanceof Error ? err.message : "Failed to create account",
1024
- );
1025
- },
1026
- });
1027
-
1028
- // Create the account once on mount
1029
- // biome-ignore lint/correctness/useExhaustiveDependencies: mount-only effect guarded by hasCreatedRef; re-running on field change would trigger duplicate account creation
1030
- useEffect(() => {
1031
- if (hasCreatedRef.current) return;
1032
- hasCreatedRef.current = true;
1033
-
1034
- // SMTP is optional. When the user left the host blank the account is
1035
- // receive-only: send no SMTP host so the backend derives smtpEnabled=false.
1036
- // Only when a host was supplied do we autofill the remaining SMTP fields.
1037
- const smtpConfigured = smtpConfig.host.trim() !== "";
1038
- const autoFill = computeSmtpAutoFill({
1039
- imapHost: imapConfig.host,
1040
- smtpHost: smtpConfig.host,
1041
- smtpPort: smtpConfig.port,
1042
- smtpTls: smtpTls.tls,
1043
- smtpStartTls: smtpTls.startTls,
1044
- });
1045
- const effectiveSmtp = smtpConfigured
1046
- ? (autoFill ?? {
1047
- smtpHost: smtpConfig.host,
1048
- smtpPort: smtpConfig.port,
1049
- smtpTls: smtpTls.tls,
1050
- smtpStartTls: smtpTls.startTls,
1051
- })
1052
- : null;
1053
-
1054
- createMutation.mutate({
1055
- body: {
1056
- email,
1057
- displayName: displayName || undefined,
1058
- username: username !== email ? username : undefined,
1059
- password,
1060
- imapHost: imapConfig.host,
1061
- imapPort: imapConfig.port,
1062
- imapTls: imapTls.tls,
1063
- imapStartTls: imapTls.startTls,
1064
- smtpHost: effectiveSmtp?.smtpHost || undefined,
1065
- smtpPort: effectiveSmtp?.smtpPort || undefined,
1066
- smtpTls: effectiveSmtp?.smtpTls ?? false,
1067
- smtpStartTls: effectiveSmtp?.smtpStartTls ?? false,
1068
- },
1069
- });
1070
- }, []);
1071
-
1072
- // Poll sync status every 2s once account is created. Stop polling once the
1073
- // account reaches a terminal phase (complete/error) so we don't hammer the
1074
- // endpoint while the user lingers on this step (pattern from ComposeProvider).
1075
- const { data: syncStatus, isError: syncStatusUnavailable } = useQuery({
1076
- ...syncOperationsGetSyncStatusOptions({
1077
- path: { accountId: accountId ?? "" },
1078
- }),
1079
- enabled: !!accountId,
1080
- refetchInterval: (query) => {
1081
- const phase = query.state.data?.syncPhase;
1082
- return phase === "complete" || phase === "error" ? false : 2000;
1083
- },
1084
- });
1085
-
1086
- // When the account reaches a terminal error phase, surface its lastError
1087
- // from the config (the sync-status response carries syncPhase but not
1088
- // lastError). Only fetched once the account is created and in error.
1089
- const syncErrored = syncStatus?.syncPhase === "error";
1090
- const { data: config } = useQuery({
1091
- ...configOperationsGetConfigOptions(),
1092
- enabled: !!accountId && syncErrored,
1093
- });
1094
- const syncLastError = config?.accounts.find(
1095
- (a) => a.accountId === accountId,
1096
- )?.lastError;
1097
-
1098
- // Determine inbox progress from mailboxes array
1099
- const inboxMailbox = syncStatus?.mailboxes.find(
1100
- (m) => m.fullPath === "INBOX" || m.fullPath === "Inbox",
1101
- );
1102
- const totalMailboxes = syncStatus?.mailboxCountTotal ?? 0;
1103
- const syncedMailboxes = syncStatus?.mailboxCountSynced ?? 0;
1104
- const inboxTotal = inboxMailbox?.messagesTotal ?? 0;
1105
- const inboxSynced = inboxMailbox?.messagesSynced ?? 0;
1106
- const inboxProgress = inboxTotal > 0 ? inboxSynced / inboxTotal : 0;
1107
-
1108
- // Determine check states based on syncPhase
1109
- const syncPhase = syncStatus?.syncPhase;
1110
- const mailboxState = syncErrored
1111
- ? "failed"
1112
- : syncPhase === "idle" || syncPhase === undefined
1113
- ? "running"
1114
- : syncPhase === "discovering_mailboxes"
1115
- ? "running"
1116
- : totalMailboxes > 0
1117
- ? "ok"
1118
- : "running";
1119
-
1120
- const inboxSyncState = syncErrored
1121
- ? "failed"
1122
- : !syncPhase ||
1123
- syncPhase === "idle" ||
1124
- syncPhase === "discovering_mailboxes"
1125
- ? "pending"
1126
- : syncPhase === "syncing_inbox" || syncPhase === "syncing_others"
1127
- ? "running"
1128
- : "ok";
1129
-
1130
- const otherSyncState = syncErrored
1131
- ? "failed"
1132
- : !syncPhase ||
1133
- syncPhase === "idle" ||
1134
- syncPhase === "discovering_mailboxes" ||
1135
- syncPhase === "syncing_inbox"
1136
- ? "pending"
1137
- : syncPhase === "syncing_others"
1138
- ? "running"
1139
- : "ok";
1140
-
1141
- // The inbox has something to show once the first messages have landed, the
1142
- // INBOX mailbox is drained, or the account's sync reached a terminal phase.
1143
- // Until then "Go to inbox" leads to an empty list, so it does not offer (#452).
1144
- const inboxHasArrived =
1145
- inboxSynced > 0 ||
1146
- inboxMailbox?.phase === "complete" ||
1147
- syncPhase === "complete" ||
1148
- syncErrored;
1149
-
1150
- // Nothing above is allowed to strand the user: if the first messages have not
1151
- // landed within the wait, or the status endpoint cannot answer at all, the
1152
- // button opens regardless. The brief tells the truth about an empty list on
1153
- // the other side, so an early exit costs a wait, not a lie.
1154
- const [waitedLongEnough, setWaitedLongEnough] = useState(false);
1155
- useEffect(() => {
1156
- if (!accountId) return;
1157
- const timer = setTimeout(
1158
- () => setWaitedLongEnough(true),
1159
- INBOX_GATE_MAX_WAIT_MS,
1160
- );
1161
- return () => clearTimeout(timer);
1162
- }, [accountId]);
1163
-
1164
- const canGoToInbox =
1165
- !!accountId &&
1166
- (inboxHasArrived || syncStatusUnavailable || waitedLongEnough);
1167
-
1168
- if (createError) {
1169
- return (
1170
- <WizardShell
1171
- steps={STEP_LABELS}
1172
- activeStep={STEP_INDEX.sync}
1173
- title="Couldn't create account"
1174
- subtitle="Something went wrong saving your account."
1175
- footer={
1176
- <>
1177
- <span />
1178
- <Button
1179
- variant="primary"
1180
- onClick={() => {
1181
- hasCreatedRef.current = false;
1182
- setCreateError(null);
1183
- createMutation.mutate({
1184
- body: {
1185
- email,
1186
- displayName: displayName || undefined,
1187
- username: username !== email ? username : undefined,
1188
- password,
1189
- imapHost: imapConfig.host,
1190
- imapPort: imapConfig.port,
1191
- imapTls: imapTls.tls,
1192
- imapStartTls: imapTls.startTls,
1193
- smtpHost: smtpConfig.host || undefined,
1194
- smtpPort: smtpConfig.port || undefined,
1195
- smtpTls: smtpTls.tls,
1196
- smtpStartTls: smtpTls.startTls,
1197
- },
1198
- });
1199
- }}
1200
- >
1201
- Retry
1202
- </Button>
1203
- </>
1204
- }
1205
- >
1206
- <code className="block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted">
1207
- {createError}
1208
- </code>
1209
- </WizardShell>
1210
- );
1211
- }
1212
-
1213
- return (
1214
- <WizardShell
1215
- steps={STEP_LABELS}
1216
- activeStep={STEP_INDEX.sync}
1217
- title={`Syncing ${email}`}
1218
- subtitle="Newest mail first — you can start reading right away."
1219
- footer={
1220
- <>
1221
- <span className="text-2xs text-fg-subtle">
1222
- Sync continues in the background
1223
- </span>
1224
- {canGoToInbox ? (
1225
- <Button
1226
- variant="primary"
1227
- onClick={() => accountId && onGoToInbox(accountId)}
1228
- >
1229
- Go to inbox
1230
- </Button>
1231
- ) : (
1232
- <Button
1233
- variant="primary"
1234
- disabled
1235
- icon={<Loader2 className="size-3.5 animate-spin" />}
1236
- >
1237
- Getting your mail…
1238
- </Button>
1239
- )}
1240
- </>
1241
- }
1242
- >
1243
- {createMutation.isPending ? (
1244
- <div className="flex items-center gap-2 py-4 text-sm text-fg-muted">
1245
- <Loader2 className="size-4 animate-spin text-accent" />
1246
- Creating your account…
1247
- </div>
1248
- ) : (
1249
- <div className="space-y-3">
1250
- {inboxTotal > 0 && (
1251
- <div>
1252
- <div className="flex items-baseline justify-between text-xs">
1253
- <span className="font-medium text-fg">INBOX</span>
1254
- <span className="text-fg-subtle tabular-nums">
1255
- {inboxSynced.toLocaleString()} / {inboxTotal.toLocaleString()}{" "}
1256
- messages
1257
- </span>
1258
- </div>
1259
- <div className="mt-1 h-1.5 overflow-hidden rounded-full bg-surface-sunken">
1260
- <div
1261
- className="h-full rounded-full bg-accent transition-all duration-500"
1262
- style={{ width: `${Math.max(2, inboxProgress * 100)}%` }}
1263
- />
1264
- </div>
1265
- </div>
1266
- )}
1267
- <div className="divide-y divide-line">
1268
- <CheckRow
1269
- label="Mailboxes discovered"
1270
- detail={
1271
- totalMailboxes > 0
1272
- ? `${totalMailboxes} mailbox${totalMailboxes === 1 ? "" : "es"} found`
1273
- : "Discovering…"
1274
- }
1275
- state={mailboxState}
1276
- />
1277
- <CheckRow
1278
- label="INBOX"
1279
- detail={
1280
- inboxSyncState === "ok"
1281
- ? `${inboxSynced.toLocaleString()} messages synced`
1282
- : inboxSyncState === "running"
1283
- ? "Syncing newest first…"
1284
- : "Queued"
1285
- }
1286
- state={inboxSyncState}
1287
- />
1288
- {syncedMailboxes > 1 ||
1289
- syncPhase === "syncing_others" ||
1290
- syncPhase === "complete" ? (
1291
- <CheckRow
1292
- label="Other mailboxes"
1293
- detail={
1294
- otherSyncState === "ok"
1295
- ? `${syncedMailboxes - 1} mailboxes synced`
1296
- : otherSyncState === "running"
1297
- ? "Syncing…"
1298
- : "Queued"
1299
- }
1300
- state={otherSyncState}
1301
- />
1302
- ) : null}
1303
- </div>
1304
- {syncErrored && (
1305
- <div className="mt-2 space-y-2">
1306
- <p className="text-xs text-danger">
1307
- Sync stalled. The account is still active —{" "}
1308
- <button
1309
- type="button"
1310
- className="underline"
1311
- onClick={() => {
1312
- queryClient.invalidateQueries({
1313
- queryKey: syncOperationsGetSyncStatusOptions({
1314
- path: { accountId: accountId ?? "" },
1315
- }).queryKey,
1316
- });
1317
- }}
1318
- >
1319
- retry
1320
- </button>
1321
- </p>
1322
- {syncLastError && (
1323
- <code className="block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted">
1324
- {syncLastError}
1325
- </code>
1326
- )}
1327
- </div>
1328
- )}
1329
- </div>
1330
- )}
1331
- </WizardShell>
1332
- );
1333
- }
1334
-
1335
- /* ------------------------------------------------------------------ */
1336
- /* Main wizard orchestrator */
1337
- /* ------------------------------------------------------------------ */
1338
-
1339
- export interface OnboardingWizardProps {
1340
- /** If false, show the Welcome step first */
1341
- skipWelcome?: boolean;
1342
- /** Called when the user clicks "Go to inbox" with the new accountId */
1343
- onComplete: (accountId: string) => void;
1344
- /** Called when the user cancels (Esc from connector picker) */
1345
- onCancel?: () => void;
1346
- /**
1347
- * Offered on the welcome step only, beside adding the first account. Absent
1348
- * where the wizard is embedded to add an account to an instance that already
1349
- * has one — importing a configuration is a first-run move, not an add.
1350
- */
1351
- onImportConfig?: () => void;
1352
- microsoftReturn?: MicrosoftReturn;
1353
- }
1354
-
1355
- export interface MicrosoftRefusal {
1356
- kind: "refused";
1357
- message: string;
1358
- email?: string;
1359
- services?: AccountService[];
1360
- reconnect: boolean;
1361
- }
1362
-
1363
- export type MicrosoftReturn =
1364
- | { kind: "connected"; accountId: string }
1365
- | MicrosoftRefusal;
1366
-
1367
- const initialStep = (
1368
- skipWelcome: boolean,
1369
- microsoftReturn: MicrosoftReturn | undefined,
1370
- ): WizardStep => {
1371
- if (microsoftReturn?.kind === "connected") return "microsoft-granted";
1372
- if (microsoftReturn?.kind === "refused") return "microsoft-email";
1373
- return skipWelcome ? "connector" : "welcome";
1374
- };
1375
-
1376
- export function OnboardingWizard({
1377
- skipWelcome = false,
1378
- onComplete,
1379
- onCancel,
1380
- onImportConfig,
1381
- microsoftReturn,
1382
- }: OnboardingWizardProps) {
1383
- const [step, setStep] = useState<WizardStep>(
1384
- initialStep(skipWelcome, microsoftReturn),
1385
- );
1386
- const [microsoftRefusal, setMicrosoftRefusal] = useState<
1387
- MicrosoftRefusal | undefined
1388
- >(microsoftReturn?.kind === "refused" ? microsoftReturn : undefined);
1389
- const [microsoftAccountId, setMicrosoftAccountId] = useState<string | null>(
1390
- microsoftReturn?.kind === "connected" ? microsoftReturn.accountId : null,
1391
- );
1392
- const [state, setState] = useState<WizardState>({
1393
- email: "",
1394
- displayName: "",
1395
- imapConfig: DEFAULT_IMAP,
1396
- smtpConfig: DEFAULT_SMTP,
1397
- username: "",
1398
- password: "",
1399
- discoveryResult: null,
1400
- discovered: false,
1401
- createdAccountId: null,
1402
- });
1403
-
1404
- // Welcome → Connector
1405
- const handleWelcomeStart = useCallback(() => setStep("connector"), []);
1406
-
1407
- // Connector → Address (IMAP path) or microsoft-email (Microsoft path), or cancel
1408
- const handleConnectorContinue = useCallback(() => setStep("address"), []);
1409
- const handleConnectorMicrosoft = useCallback(
1410
- () => setStep("microsoft-email"),
1411
- [],
1412
- );
1413
- const handleConnectorBack = useCallback(() => {
1414
- if (skipWelcome) {
1415
- onCancel?.();
1416
- } else {
1417
- setStep("welcome");
1418
- }
1419
- }, [skipWelcome, onCancel]);
1420
-
1421
- // Address → Servers
1422
- const handleAddressContinue = useCallback(
1423
- (email: string, displayName: string, result: DiscoveryResult | null) => {
1424
- let imap = DEFAULT_IMAP;
1425
- let smtp = DEFAULT_SMTP;
1426
- let discovered = false;
1427
-
1428
- if (result) {
1429
- // Heuristic is a fallback, not "discovered"
1430
- discovered = result.source !== "heuristic";
1431
- imap = {
1432
- host: result.imap.host,
1433
- port: result.imap.port,
1434
- security: result.imap.security,
1435
- };
1436
- smtp = {
1437
- host: result.smtp.host,
1438
- port: result.smtp.port,
1439
- security: result.smtp.security,
1440
- };
1441
- }
1442
-
1443
- setState((s) => ({
1444
- ...s,
1445
- email,
1446
- displayName,
1447
- imapConfig: imap,
1448
- smtpConfig: smtp,
1449
- discoveryResult: result,
1450
- discovered,
1451
- username: email,
1452
- }));
1453
- setStep("servers");
1454
- },
1455
- [],
1456
- );
1457
-
1458
- // Servers → Credentials
1459
- const handleServersChange = useCallback(
1460
- (imap: ServerConfig, smtp: ServerConfig) => {
1461
- setState((s) => ({ ...s, imapConfig: imap, smtpConfig: smtp }));
1462
- },
1463
- [],
1464
- );
1465
-
1466
- // Credentials → Test
1467
- const handleCredentialsChange = useCallback(
1468
- (username: string, password: string) => {
1469
- setState((s) => ({ ...s, username, password }));
1470
- },
1471
- [],
1472
- );
1473
-
1474
- // Test → Sync
1475
- const handleTestSuccess = useCallback(() => setStep("sync"), []);
1476
-
1477
- // Sync → Inbox
1478
- const handleGoToInbox = useCallback(
1479
- (accountId: string) => {
1480
- onComplete(accountId);
1481
- },
1482
- [onComplete],
1483
- );
1484
-
1485
- const microsoftSignIn = (
1486
- <StepMicrosoftEmail
1487
- refusal={microsoftRefusal}
1488
- onBack={() => {
1489
- setMicrosoftRefusal(undefined);
1490
- setStep("connector");
1491
- }}
1492
- onConnected={(accountId) => {
1493
- setMicrosoftAccountId(accountId);
1494
- setStep("microsoft-granted");
1495
- }}
1496
- />
1497
- );
1498
-
1499
- switch (step) {
1500
- case "welcome":
1501
- return (
1502
- <StepWelcome
1503
- onStart={handleWelcomeStart}
1504
- onImportConfig={onImportConfig}
1505
- />
1506
- );
1507
-
1508
- case "connector":
1509
- return (
1510
- <StepConnector
1511
- onContinue={handleConnectorContinue}
1512
- onMicrosoft={handleConnectorMicrosoft}
1513
- onBack={handleConnectorBack}
1514
- showBack={!skipWelcome}
1515
- />
1516
- );
1517
-
1518
- case "microsoft-email":
1519
- return microsoftSignIn;
1520
-
1521
- case "microsoft-granted":
1522
- if (microsoftAccountId === null) return microsoftSignIn;
1523
- return (
1524
- <StepMicrosoftGranted
1525
- accountId={microsoftAccountId}
1526
- onSignInAgain={() => setStep("microsoft-email")}
1527
- onContinue={handleGoToInbox}
1528
- />
1529
- );
1530
-
1531
- case "address":
1532
- return (
1533
- <StepAddress
1534
- initialEmail={state.email}
1535
- initialDisplayName={state.displayName}
1536
- onContinue={handleAddressContinue}
1537
- onBack={() => setStep("connector")}
1538
- />
1539
- );
1540
-
1541
- case "servers":
1542
- return (
1543
- <StepServers
1544
- email={state.email}
1545
- imapConfig={state.imapConfig}
1546
- smtpConfig={state.smtpConfig}
1547
- discovered={state.discovered}
1548
- onContinue={() => setStep("credentials")}
1549
- onBack={() => setStep("address")}
1550
- onChange={handleServersChange}
1551
- />
1552
- );
1553
-
1554
- case "credentials":
1555
- return (
1556
- <CredentialsStep
1557
- steps={STEP_LABELS}
1558
- activeStep={STEP_INDEX.credentials}
1559
- title={`Sign in to ${state.email.split("@")[1] || "your mail server"}`}
1560
- subtitle="Many providers require an app password instead of your normal one."
1561
- email={state.email}
1562
- username={state.username}
1563
- password={state.password}
1564
- onContinue={() => setStep("test")}
1565
- onBack={() => setStep("servers")}
1566
- onChange={handleCredentialsChange}
1567
- />
1568
- );
1569
-
1570
- case "test":
1571
- return (
1572
- <ConnectionTestStep
1573
- steps={STEP_LABELS}
1574
- activeStep={STEP_INDEX.test}
1575
- email={state.email}
1576
- imapConfig={state.imapConfig}
1577
- smtpConfig={state.smtpConfig}
1578
- username={state.username}
1579
- password={state.password}
1580
- onSuccess={handleTestSuccess}
1581
- onBackToCredentials={() => setStep("credentials")}
1582
- onBackToServers={() => setStep("servers")}
1583
- />
1584
- );
1585
-
1586
- case "sync":
1587
- return (
1588
- <StepSync
1589
- email={state.email}
1590
- displayName={state.displayName}
1591
- imapConfig={state.imapConfig}
1592
- smtpConfig={state.smtpConfig}
1593
- username={state.username}
1594
- password={state.password}
1595
- onGoToInbox={handleGoToInbox}
1596
- />
1597
- );
1598
- }
1599
- }