@remit/web-client-dist 0.0.690 → 0.0.692
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{BriefPane-uF6csCem.js → BriefPane-B8ecM3zB.js} +1 -1
- package/assets/{CalendarEventEditor-B0SWzPqQ.js → CalendarEventEditor-9IlkB0YL.js} +1 -1
- package/assets/{CalendarEventPopup-V9BZRnwN.js → CalendarEventPopup-Dgio1io7.js} +1 -1
- package/assets/{CalendarLoadFailed-CU4C4nFf.js → CalendarLoadFailed-BrNZqBKA.js} +1 -1
- package/assets/CalendarQuickCreate-By7rnSuh.js +1 -0
- package/assets/{CalendarSession-Ub9ZzsQN.js → CalendarSession-CjfkNnKN.js} +1 -1
- package/assets/DesktopChrome-CjDc9EdH.js +1 -0
- package/assets/{DropdownMenu-CGhv-K3k.js → DropdownMenu-D4QQzyrH.js} +1 -1
- package/assets/{EmptyState-B_Kthrla.js → EmptyState-DiS0VQW5.js} +1 -1
- package/assets/{ErrorState-BB0xpcCi.js → ErrorState-BmGgdm41.js} +1 -1
- package/assets/{FlaggedPane-CyyX0x8y.js → FlaggedPane-kBIob-rC.js} +1 -1
- package/assets/{FullCompose-sAZlqUaR.js → FullCompose-ZjHfjPwG.js} +1 -1
- package/assets/{LabelApplyTrigger-ChzWyjHs.js → LabelApplyTrigger-OJ81BaYH.js} +1 -1
- package/assets/{MailShell-DY2Ot0ah.js → MailShell-BO8c-sH6.js} +1 -1
- package/assets/{MailViewChrome-U9YpZx_B.js → MailViewChrome-DfgW3Ikc.js} +1 -1
- package/assets/{MailboxPane-DszlAx2f.js → MailboxPane-BRUYtKC7.js} +1 -1
- package/assets/MessageBody-BIp2OZY6.js +84 -0
- package/assets/MessageToolbar-BzxIP4DM.js +1 -0
- package/assets/{NavMenuButton-B_c3nIpV.js → NavMenuButton-CkmJu7iR.js} +1 -1
- package/assets/OnboardingWizard-reo_AB5t.js +1 -0
- package/assets/{OutboxPane-D47KP_dW.js → OutboxPane-qaAt9-sk.js} +1 -1
- package/assets/{ReportLink-C4yyzfnn.js → ReportLink-DVR5iYy8.js} +1 -1
- package/assets/_calendarObjectId-DNhcPvtT.js +1 -0
- package/assets/_mailboxId-ThNYujv3.js +1 -0
- package/assets/_messageId-CKJI1yyc.js +1 -0
- package/assets/_messageId-ChPDqFRo.js +1 -0
- package/assets/_messageId-zm_VBLaY.js +1 -0
- package/assets/_outboxMessageId-DcDyjoYW.js +1 -0
- package/assets/_recurrenceId-C0Y19B2U.js +1 -0
- package/assets/_slotId-BwEkuNG8.js +1 -0
- package/assets/_threadId-CmA2aUrS.js +1 -0
- package/assets/_threadId-Cqj7hjyS.js +1 -0
- package/assets/_threadId-DI4EN6E1.js +1 -0
- package/assets/_view._date-XDQ3AudE.js +1 -0
- package/assets/account-service-status-DJyM-qfq.js +1 -0
- package/assets/accounts-Dei0QQHb.js +1 -0
- package/assets/advanced-CmaLt1-e.js +1 -0
- package/assets/agenda-time-9aN7iZnW.js +1 -0
- package/assets/{app-chrome-BI9iJnw3.js → app-chrome-DEclDxYQ.js} +1 -1
- package/assets/appearance-UFpWVtEM.js +1 -0
- package/assets/{avatar-COXPYlBH.js → avatar-DZNFp-l_.js} +1 -1
- package/assets/{badge-DLlDkvBl.js → badge-DXTfgcBt.js} +1 -1
- package/assets/{bottom-sheet-BUOc_BG6.js → bottom-sheet-CBxZPIwF.js} +1 -1
- package/assets/brief-MY0I_pcw.js +1 -0
- package/assets/{brief-iq8Ra5O_.js → brief-fIZB7Fkj.js} +1 -1
- package/assets/{calendar-DCTglXEB.js → calendar-BIfjhUb1.js} +1 -1
- package/assets/{calendar-Cmzt0eKc.js → calendar-CmjULz3U.js} +1 -1
- package/assets/{calendar-event-popup-BvI6Qwla.js → calendar-event-popup-By-Wnzww.js} +1 -1
- package/assets/{calendar-event-sidebar-Dx3WbbPv.js → calendar-event-sidebar-DqoVNv2n.js} +1 -1
- package/assets/{calendar-failure-note-BRyIsChq.js → calendar-failure-note-CmQObVh4.js} +1 -1
- package/assets/calendar-guests-DivZiKa8.js +1 -0
- package/assets/calendar-suggestion-CO8Q4tfB.js +1 -0
- package/assets/calendars-Dpds3q2Z.js +1 -0
- package/assets/{card-XAEgDd1b.js → card-BkVHxya_.js} +1 -1
- package/assets/checkbox-Cxv99wmn.js +1 -0
- package/assets/chevron-down-CuQovlNy.js +1 -0
- package/assets/chevron-left-CO-V7AVZ.js +1 -0
- package/assets/circle-check-H4iBGaFc.js +1 -0
- package/assets/circle-check-big-Q5xMZBl1.js +1 -0
- package/assets/circle-question-mark-Dt4vUSbc.js +1 -0
- package/assets/classification-0ZO1lOyG.js +1 -0
- package/assets/clock-Ctw4TG15.js +1 -0
- package/assets/compose._-_outboxMessageId_-B1VRxkLN.js +1 -0
- package/assets/compose._-_outboxMessageId_-C46VmFN6.js +1 -0
- package/assets/compose._-_outboxMessageId_-CNjOOJSh.js +1 -0
- package/assets/compose._-_outboxMessageId_-P_jyR3kH.js +1 -0
- package/assets/{config-import-DZkZ73sW.js → config-import-_7OioB2-.js} +1 -1
- package/assets/{confirm-dialog-D33DXPkQ.js → confirm-dialog-C8W1RcOV.js} +1 -1
- package/assets/copy-Eu3Pxnsn.js +1 -0
- package/assets/credential-steps-D8_QxBU3.js +1 -0
- package/assets/download-B9mjNNRB.js +1 -0
- package/assets/{draft--MHSP3BT.js → draft-OCADnKfj.js} +1 -1
- package/assets/edit-AzkegsLe.js +1 -0
- package/assets/edit-qD-xofN1.js +1 -0
- package/assets/external-link-Byo-O3sb.js +1 -0
- package/assets/file-braces-CskVbU-i.js +1 -0
- package/assets/filters-DEBkAOGr.js +1 -0
- package/assets/{flagged-C-DEfMAa.js → flagged-A9fk8Fz2.js} +1 -1
- package/assets/flagged-D6O3EhIo.js +1 -0
- package/assets/folder-input-hWCgPqfm.js +1 -0
- package/assets/folders-Dfg9m7Cm.js +1 -0
- package/assets/{help-copy-DodnPf1K.js → help-copy-CnlNZ8sK.js} +1 -1
- package/assets/import-BIxL3HZr.js +1 -0
- package/assets/index-BA_isERD.js +1 -0
- package/assets/index-BI3VHL-i.js +1 -0
- package/assets/index-C-PJeYPQ.js +1 -0
- package/assets/index-CKJI1yyc.js +1 -0
- package/assets/index-COXNp0IG.js +1 -0
- package/assets/index-CfV5o-lD.js +1 -0
- package/assets/index-ChPDqFRo.js +1 -0
- package/assets/index-CkmUVU7Z.js +1 -0
- package/assets/{index-9JWzpiiR.js → index-CmOAOx38.js} +65 -65
- package/assets/{index-DqlUjB9k.js → index-CpNGDsVT.js} +15 -15
- package/assets/index-CrZmkeYk.js +1 -0
- package/assets/index-zm_VBLaY.js +1 -0
- package/assets/{kbd-D_0s6Sx_.js → kbd-BMGsOR5H.js} +1 -1
- package/assets/{label-chip-zJi2r8mQ.js → label-chip-OfJL52HU.js} +1 -1
- package/assets/labels-jKncGvQ3.js +1 -0
- package/assets/mail-Bf1kTy2y.js +1 -0
- package/assets/mail-qvbIZwSA.js +1 -0
- package/assets/menu-g1nN4c6m.js +1 -0
- package/assets/{nav-link-8l24_oWF.js → nav-link-Bdv8kjEd.js} +1 -1
- package/assets/new-Dcxxskrf.js +1 -0
- package/assets/onboarding-cRvBetgB.js +1 -0
- package/assets/{onboarding-completion-Z1EOTA33.js → onboarding-completion-CjqVIsEV.js} +1 -1
- package/assets/outbox-CTC-6RuN.js +1 -0
- package/assets/pencil-C3mJE9QO.js +1 -0
- package/assets/people-ClLsRDo6.js +1 -0
- package/assets/plus-B9Kjb5MA.js +1 -0
- package/assets/popover-menu-kMqLztgE.js +1 -0
- package/assets/refresh-cw-DdZ8vtf2.js +1 -0
- package/assets/{reply-BUVhW3yq.js → reply-BBXEHuds.js} +1 -1
- package/assets/{rich-text-HpMiPjFH.js → rich-text-DTsRvBWK.js} +23 -23
- package/assets/{rich-text-spellcheck-worker-provider-BfhfcGZ2.js → rich-text-spellcheck-worker-provider-Bf2g3xpp.js} +1 -1
- package/assets/rotate-ccw-DU-xqseJ.js +1 -0
- package/assets/{roving-focus-C87O2raY.js → roving-focus-h-W142Au.js} +1 -1
- package/assets/{row-actions-cUhOCilI.js → row-actions-CJJYnXCz.js} +1 -1
- package/assets/{search-mirror-B0C9oCpr.js → search-mirror-CqXcmXWg.js} +1 -1
- package/assets/{search-scope-aZ2AZX-k.js → search-scope-BCz9qlCH.js} +1 -1
- package/assets/search-token-index-e0cXuR4s.js +1 -0
- package/assets/{sections-BtFAPYYy.js → sections-40tp2E7G.js} +1 -1
- package/assets/{segmented-control-tpWp-yev.js → segmented-control-CMCgmRqX.js} +1 -1
- package/assets/{select-Dv65Mqkl.js → select-CpLCf4_c.js} +1 -1
- package/assets/senders-DjPDuDhf.js +1 -0
- package/assets/settings-CWQQ_e-3.js +1 -0
- package/assets/settings-screen-Bx-jomcC.js +1 -0
- package/assets/shield-check-BbVUhw_R.js +1 -0
- package/assets/{suggest-list-xX77W_hF.js → suggest-list-gj7TdgNf.js} +1 -1
- package/assets/{suggested-vips-DRijwoFY.js → suggested-vips-D9pkriav.js} +1 -1
- package/assets/suggestion._suggestionId-BsoCLJDm.js +1 -0
- package/assets/{switch-CGmUk-Wh.js → switch-D9ilXr2Z.js} +1 -1
- package/assets/task._calendarTaskId-c5dsQ5Rn.js +1 -0
- package/assets/undo-2-B0kA9_bY.js +1 -0
- package/assets/{useCalendarData-D07VZ1QE.js → useCalendarData-QcaY0Cgc.js} +1 -1
- package/assets/{useCalendarScheduling-CnlDrC-W.js → useCalendarScheduling-BXMaoFja.js} +1 -1
- package/assets/useCalendarSuggestions-iprVdeF2.js +1 -0
- package/assets/{useCalendarTasks-CV-ORktM.js → useCalendarTasks-D9R56VL3.js} +1 -1
- package/assets/{useDebouncedValue-DRrHzwce.js → useDebouncedValue-M5m0kaQD.js} +1 -1
- package/assets/{useFilters-DdYKMP_s.js → useFilters-BybioZf1.js} +1 -1
- package/assets/{useLabels-ouqsQR1c.js → useLabels-iMMBj-Ba.js} +1 -1
- package/assets/{useLayoutTier-CeBSbbkD.js → useLayoutTier-BpSsrmgl.js} +1 -1
- package/assets/{useMediaQuery-BzGo-bVp.js → useMediaQuery-uf6mjwPE.js} +1 -1
- package/assets/{useMessageBodyContent-D9UpR1Dh.js → useMessageBodyContent-CsZ9VCHu.js} +1 -1
- package/assets/{useQueries-Des6lpmI.js → useQueries-DeYJYa06.js} +1 -1
- package/assets/{useRefreshControl-CWSpNwGo.js → useRefreshControl-ByEWNZY9.js} +1 -1
- package/assets/useResultFolderIndex-BksYikib.js +1 -0
- package/assets/{useSignature-CQsNwcJm.js → useSignature-klArqmQ3.js} +1 -1
- package/assets/{warnings-CDdQ-K5m.js → warnings-B1lLZh5p.js} +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
- package/assets/CalendarQuickCreate-CaO2GHZr.js +0 -1
- package/assets/DesktopChrome-H9yEQYFf.js +0 -1
- package/assets/MessageBody-zT-at0bi.js +0 -84
- package/assets/MessageToolbar-mGmOl_Xf.js +0 -1
- package/assets/OnboardingWizard-ezuAE6sx.js +0 -1
- package/assets/_calendarObjectId-5z-o0pQB.js +0 -1
- package/assets/_mailboxId-CBxHNU1m.js +0 -1
- package/assets/_messageId-DHvQcDnk.js +0 -1
- package/assets/_messageId-Dk8Pv3WS.js +0 -1
- package/assets/_messageId-q5-pR6qn.js +0 -1
- package/assets/_outboxMessageId-Akv-3HPP.js +0 -1
- package/assets/_recurrenceId-DrNRvEqM.js +0 -1
- package/assets/_slotId-BbhN8swS.js +0 -1
- package/assets/_threadId-9uIkuh2L.js +0 -1
- package/assets/_threadId-DdQZmst0.js +0 -1
- package/assets/_threadId-mITrrqLR.js +0 -1
- package/assets/_view._date-DyseRkCh.js +0 -1
- package/assets/account-service-status-HIGoykok.js +0 -1
- package/assets/accounts-DwJx265B.js +0 -1
- package/assets/advanced-4BQF-R7r.js +0 -1
- package/assets/agenda-time-hKUG2dhl.js +0 -1
- package/assets/appearance-BHnbKYJT.js +0 -1
- package/assets/brief-CJySko3D.js +0 -1
- package/assets/calendar-guests-7MqnVXzX.js +0 -1
- package/assets/calendar-suggestion-CpOWds4W.js +0 -1
- package/assets/calendars-CbchUImt.js +0 -1
- package/assets/checkbox-CzFLh5Dk.js +0 -1
- package/assets/chevron-down-Q4i_URUt.js +0 -1
- package/assets/chevron-left-gBxhdHb5.js +0 -1
- package/assets/circle-check-BucqMsie.js +0 -1
- package/assets/circle-check-big-CDjntmXC.js +0 -1
- package/assets/circle-help-B6Fn573l.js +0 -1
- package/assets/classification-DzmiHklC.js +0 -1
- package/assets/clock-jwuPTxhb.js +0 -1
- package/assets/compose._-_outboxMessageId_-B7D1W3Sx.js +0 -1
- package/assets/compose._-_outboxMessageId_-CO4UJXl9.js +0 -1
- package/assets/compose._-_outboxMessageId_-D0T64VP0.js +0 -1
- package/assets/compose._-_outboxMessageId_-pcn-0-gQ.js +0 -1
- package/assets/copy-Be7MLulJ.js +0 -1
- package/assets/credential-steps-MLDe683C.js +0 -1
- package/assets/download-BSz8KKlH.js +0 -1
- package/assets/edit-DCtOcxf9.js +0 -1
- package/assets/edit-DbSsj2wh.js +0 -1
- package/assets/external-link-o4VBX-Sp.js +0 -1
- package/assets/file-json-B3Qb4sPC.js +0 -1
- package/assets/filters-Mgogmt5O.js +0 -1
- package/assets/flagged-D0pl5Vka.js +0 -1
- package/assets/folder-input-C8-nffA0.js +0 -1
- package/assets/folders-DodnBZua.js +0 -1
- package/assets/import-C-0_jeuq.js +0 -1
- package/assets/index-BnElevbT.js +0 -1
- package/assets/index-DHvQcDnk.js +0 -1
- package/assets/index-DcMLhAhx.js +0 -1
- package/assets/index-DfAafcCq.js +0 -1
- package/assets/index-Dk8Pv3WS.js +0 -1
- package/assets/index-Dvms4bLC.js +0 -1
- package/assets/index-DxDWr9QM.js +0 -1
- package/assets/index-JdYKPBmV.js +0 -1
- package/assets/index-Tl1Nlwxt.js +0 -1
- package/assets/index-q5-pR6qn.js +0 -1
- package/assets/labels-BLy-VSyB.js +0 -1
- package/assets/mail-Bh469T8t.js +0 -1
- package/assets/mail-CXavFmSm.js +0 -1
- package/assets/menu-Dro5vzLW.js +0 -1
- package/assets/new-D7laO9Pg.js +0 -1
- package/assets/onboarding-D-4ZdWHj.js +0 -1
- package/assets/outbox-DzVji2w9.js +0 -1
- package/assets/pencil-Dz-yZ9zw.js +0 -1
- package/assets/people-DoJm1MLz.js +0 -1
- package/assets/plus-Cp9K9QJ4.js +0 -1
- package/assets/popover-menu-BCEzStJs.js +0 -1
- package/assets/refresh-cw-0FbK4O4v.js +0 -1
- package/assets/rotate-ccw-DCzt84SY.js +0 -1
- package/assets/search-token-index--Pzg9wI2.js +0 -1
- package/assets/senders-BjvP6Oq9.js +0 -1
- package/assets/settings-fP9o8EL9.js +0 -1
- package/assets/settings-screen-DPboZsK5.js +0 -1
- package/assets/shield-check-BbF5QmrH.js +0 -1
- package/assets/suggestion._suggestionId-Ca3k8ej7.js +0 -1
- package/assets/task._calendarTaskId-CvuxUcFe.js +0 -1
- package/assets/undo-2-CGWL2haZ.js +0 -1
- package/assets/useCalendarSuggestions-DW7WFMvd.js +0 -1
- package/assets/useResultFolderIndex-DRfqL3r_.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./index-CmOAOx38.js";import{O as t}from"./OutboxPane-qaAt9-sk.js";import"./MessageBody-BIp2OZY6.js";import"./kbd-BMGsOR5H.js";import"./search-scope-BCz9qlCH.js";import"./app-chrome-DEclDxYQ.js";import"./nav-link-Bdv8kjEd.js";import"./useMediaQuery-uf6mjwPE.js";import"./reply-BBXEHuds.js";import"./useMessageBodyContent-CsZ9VCHu.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-CkmJu7iR.js";import"./menu-g1nN4c6m.js";import"./roving-focus-h-W142Au.js";import"./circle-check-big-Q5xMZBl1.js";import"./clock-Ctw4TG15.js";import"./row-actions-CJJYnXCz.js";import"./rotate-ccw-DU-xqseJ.js";function P(){return o.jsx(t.Reading,{})}export{P as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./index-CmOAOx38.js";import{B as o}from"./BriefPane-B8ecM3zB.js";import"./MessageToolbar-BzxIP4DM.js";import"./MessageBody-BIp2OZY6.js";import"./kbd-BMGsOR5H.js";import"./search-scope-BCz9qlCH.js";import"./app-chrome-DEclDxYQ.js";import"./nav-link-Bdv8kjEd.js";import"./useMediaQuery-uf6mjwPE.js";import"./reply-BBXEHuds.js";import"./useMessageBodyContent-CsZ9VCHu.js";import"./roving-focus-h-W142Au.js";import"./chevron-down-CuQovlNy.js";import"./search-token-index-e0cXuR4s.js";import"./useQueries-DeYJYa06.js";import"./index-CpNGDsVT.js";import"./useSignature-klArqmQ3.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-M5m0kaQD.js";import"./suggest-list-gj7TdgNf.js";import"./sections-40tp2E7G.js";import"./badge-DXTfgcBt.js";import"./undo-2-B0kA9_bY.js";import"./DropdownMenu-D4QQzyrH.js";import"./popover-menu-kMqLztgE.js";import"./ErrorState-BmGgdm41.js";import"./mail-qvbIZwSA.js";import"./download-B9mjNNRB.js";import"./avatar-DZNFp-l_.js";import"./EmptyState-DiS0VQW5.js";import"./calendar-suggestion-CO8Q4tfB.js";import"./useCalendarSuggestions-iprVdeF2.js";import"./agenda-time-9aN7iZnW.js";import"./plus-B9Kjb5MA.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-CmjULz3U.js";import"./calendar-failure-note-CmQObVh4.js";import"./checkbox-Cxv99wmn.js";import"./clock-Ctw4TG15.js";import"./segmented-control-CMCgmRqX.js";import"./shield-check-BbVUhw_R.js";import"./useLayoutTier-BpSsrmgl.js";import"./menu-g1nN4c6m.js";import"./useFilters-BybioZf1.js";import"./select-CpLCf4_c.js";import"./folder-input-hWCgPqfm.js";import"./confirm-dialog-C8W1RcOV.js";import"./label-chip-OfJL52HU.js";import"./LabelApplyTrigger-OJ81BaYH.js";import"./useLabels-iMMBj-Ba.js";import"./useRefreshControl-ByEWNZY9.js";import"./circle-check-big-Q5xMZBl1.js";import"./refresh-cw-DdZ8vtf2.js";import"./wizard-selection-zWa1qc6-.js";function tr(){return r.jsx(o.Reading,{})}export{tr as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,p as t}from"./index-
|
|
1
|
+
import{j as s,p as t}from"./index-CmOAOx38.js";function x({className:e,...n}){return s.jsx("kbd",{className:t("inline-flex h-4 min-w-4 items-center justify-center rounded-xs border border-line bg-surface-sunken px-1 font-sans text-2xs text-fg-muted",e),...n})}export{x as K};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l,p as n}from"./index-
|
|
1
|
+
import{j as l,p as n}from"./index-CmOAOx38.js";const a={Default:"bg-fg-subtle",Red:"bg-red-500",Orange:"bg-orange-500",Yellow:"bg-yellow-500",Green:"bg-green-500",Teal:"bg-teal-500",Blue:"bg-blue-500",Purple:"bg-purple-500",Gray:"bg-gray-500"},c=["Default","Red","Orange","Yellow","Green","Teal","Blue","Purple","Gray"],o=e=>Object.hasOwn(a,e);function g({label:e,onRemove:s,className:t}){const r=o(e.color)?a[e.color]:a.Default;return l.jsxs("span",{className:n("inline-flex items-center gap-1 rounded-full bg-surface-sunken px-2 py-0.5 text-2xs font-medium text-fg-muted shrink-0",t),children:[l.jsx("span",{className:n("size-1.5 shrink-0 rounded-full",r)}),l.jsx("span",{className:"truncate",children:e.name}),s&&l.jsx("button",{type:"button",onClick:()=>s(e.labelId),"aria-label":`Remove label ${e.name}`,className:"ml-0.5 rounded-full text-fg-subtle hover:text-fg",children:"×"})]})}export{g as L,a,o as i,c as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as e,ao as h,B as b,T as y,u as N,ac as C,a as L,c as I,d as S}from"./index-CmOAOx38.js";import{L as D,l as g}from"./label-chip-OfJL52HU.js";import{S as v}from"./select-CpLCf4_c.js";import{a as w,b as $,c as E,u as k}from"./useLabels-iMMBj-Ba.js";import{a as R}from"./sections-40tp2E7G.js";import{S as O}from"./settings-screen-Bx-jomcC.js";import{E as j}from"./ErrorState-BmGgdm41.js";import{C as B}from"./confirm-dialog-C8W1RcOV.js";import"./chevron-down-CuQovlNy.js";import"./avatar-DZNFp-l_.js";import"./badge-DXTfgcBt.js";import"./chevron-left-CO-V7AVZ.js";import"./menu-g1nN4c6m.js";import"./circle-question-mark-Dt4vUSbc.js";function P({labels:n,onRename:i,onRecolor:l,onDelete:u,deletingLabelId:c}){const[d,r]=f.useState(),[o,m]=f.useState("");if(n.length===0)return e.jsx("p",{className:"py-6 text-sm text-fg-muted",children:"No labels yet. Create one below, then use it in a filter or apply it to mail directly."});const a=t=>{const s=o.trim();s!==""&&i(t,s),r(void 0)};return e.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:n.map(t=>e.jsxs("li",{className:"flex items-center gap-3 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[d===t.labelId?e.jsx(h,{autoFocus:!0,value:o,onChange:s=>m(s.target.value),onBlur:()=>a(t.labelId),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),a(t.labelId)),s.key==="Escape"&&(s.preventDefault(),r(void 0))},"aria-label":`Rename label ${t.name}`}):e.jsx("button",{type:"button",onClick:()=>{r(t.labelId),m(t.name)},"aria-label":`Rename label ${t.name}`,className:"flex items-center gap-2 rounded-sm text-left hover:opacity-80",children:e.jsx(D,{label:t})}),e.jsx("p",{className:"mt-0.5 text-xs text-fg-subtle",children:t.filterCount===0?"Not used in any filter":`Used in ${t.filterCount} ${t.filterCount===1?"filter":"filters"}`})]}),e.jsx(v,{"aria-label":`Color for ${t.name}`,value:t.color,onChange:s=>l(t.labelId,s.target.value),className:"w-28 shrink-0",children:g.map(s=>e.jsx("option",{value:s,children:s},s))}),e.jsx(b,{variant:"ghost",size:"sm",icon:e.jsx(y,{className:"size-4 text-danger"}),onClick:()=>u(t),disabled:c===t.labelId,"aria-label":`Delete label ${t.name}`})]},t.labelId))})}const T=(n,i)=>{if(i===0)return{title:`Delete the "${n}" label?`};const l=i===1?"filter":"filters";return{title:`Delete the "${n}" label?`,description:`This also deletes ${i} ${l} that ${i===1?"applies":"apply"} it — they can't be recovered.`}},H=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Labels mark mail without moving it — a message can carry any number of them alongside whichever folder it lives in."}),e.jsx("p",{children:"Use a label in a filter's action to have new (and existing) mail label itself automatically, or apply one to a selection directly from the mailbox."}),e.jsx("p",{children:"Deleting a label removes it from every message, and deletes every filter that applies it — the confirmation names how many."})]});function U({accountId:n}){const{createLabel:i,isPending:l,isError:u}=k(n),[c,d]=f.useState(""),[r,o]=f.useState("Default"),m=()=>{const a=c.trim();a!==""&&i(a,r).then(()=>{d(""),o("Default")})};return e.jsxs("div",{className:"space-y-2 rounded-sm border border-line bg-surface p-3",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:"New label"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Name"}),e.jsx(h,{value:c,onChange:a=>d(a.target.value),placeholder:"e.g. Receipts","aria-label":"Label name",onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),m())}})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Color"}),e.jsx(v,{value:r,onChange:a=>o(a.target.value),"aria-label":"Label color",className:"w-28",children:g.map(a=>e.jsx("option",{value:a,children:a},a))})]}),e.jsx(b,{variant:"primary",onClick:m,disabled:l||c.trim()==="",children:l?"Creating…":"Create label"})]}),u&&e.jsx(S,{tone:"danger",variant:"soft",children:"Couldn't create that label. Please try again."})]})}function z({account:n}){const i=n.accountId,{labels:l,isPending:u,isError:c,error:d,refetch:r}=w(i),{updateLabel:o}=$(i),{deleteLabel:m,deletingLabelId:a}=E(i),[t,s]=f.useState();return e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-fg",children:n.email}),u?e.jsx("div",{className:"h-16 animate-pulse rounded-md border border-line bg-surface","aria-busy":"true","aria-label":`Loading labels for ${n.email}`}):c?e.jsx(j,{variant:"inline",title:`Couldn't load labels for ${n.email}`,error:d,onRetry:()=>{r()}}):e.jsx(P,{labels:l,onRename:(p,x)=>o(p,{name:x}),onRecolor:(p,x)=>o(p,{color:x}),onDelete:s,deletingLabelId:a}),e.jsx(U,{accountId:i}),t&&(()=>{const p=T(t.name,t.filterCount);return e.jsx(B,{isOpen:!0,title:p.title,description:p.description,confirmLabel:"Delete label",destructive:!0,isBusy:a===t.labelId,onConfirm:()=>{m(t.labelId),s(void 0)},onCancel:()=>s(void 0)})})()]})}function ee(){const n=N(),i=C(),l=R(),[u,c]=f.useState(!0),{data:d,isPending:r,isError:o,error:m,refetch:a}=L(I());return e.jsx(O,{items:i,activeId:"labels",title:"Labels",description:"Mark mail without moving it, per account.",help:H,helpOpen:u,onToggleHelp:()=>c(t=>!t),onSelect:l,onBackToMail:()=>{n({to:"/mail"})},children:r?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):o?e.jsx(j,{title:"Couldn't load accounts",error:m,onRetry:()=>{a()}}):d.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:d.accounts.map(t=>e.jsx(z,{account:t},t.accountId))})})}export{ee as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as Ee,j as e,r as p,n as Pe,o as Le,D as Te,X as Fe,p as I,S as Ae,C as ze,q as oe,t as Q,v as re,w as ie,F as De,T as _e,x as Be,M as Ke,y as Qe,z as qe,I as He,B as E,E as le,G as $e,H as Ve,J as ce,e as B,K as ue,N as de,P as Ue,Q as We,R as Ge,U as me,a as xe,V as Ye,W as Je,Y as z,Z as Xe,_ as Ze,$ as es,a0 as ss,a1 as ts,a2 as as,a3 as ns,a4 as os,a5 as rs,u as is,c as ls,a6 as cs,O as us}from"./index-CmOAOx38.js";import{l as O,u as D,m as q,a as ds,b as ms,c as xs}from"./reply-BBXEHuds.js";import{A as fs,S as fe,a as ps,c as hs,L as gs,b as bs,D as vs,d as ys}from"./DesktopChrome-CjDc9EdH.js";import{u as js,N as C,a as Ns,b as Ss,i as Cs}from"./nav-link-Bdv8kjEd.js";import{u as K,a as Is}from"./useMessageBodyContent-CsZ9VCHu.js";import{P as ws}from"./pencil-C3mJE9QO.js";import{c as Os,s as ks,M as Rs}from"./MailShell-BO8c-sH6.js";import{u as Ms,a as Es,R as Ps,s as Ls,i as Ts,H as Fs,M as As}from"./useRefreshControl-ByEWNZY9.js";import{K as zs,B as Ds,S as _s,u as Bs,s as Ks,b as Qs,a as qs,c as Hs,d as $s}from"./search-token-index-e0cXuR4s.js";import{u as Vs}from"./sections-40tp2E7G.js";import{u as pe}from"./search-scope-BCz9qlCH.js";import{M as Us}from"./menu-g1nN4c6m.js";import{B as he,u as Ws}from"./useResultFolderIndex-BksYikib.js";import{u as ge}from"./useQueries-DeYJYa06.js";import{f as Gs}from"./folder-failure-CqkVSsrb.js";import{i as Ys}from"./outbox-status-BlKn6P0x.js";import{u as Js}from"./roving-focus-h-W142Au.js";import{C as Xs,A as Zs}from"./account-service-status-DJyM-qfq.js";import{C as H}from"./chevron-down-CuQovlNy.js";import{u as et}from"./index-CpNGDsVT.js";import{u as be,i as st}from"./useLayoutTier-BpSsrmgl.js";import{u as tt}from"./useDebouncedValue-M5m0kaQD.js";import{E as at}from"./ErrorState-BmGgdm41.js";import{K as $}from"./kbd-BMGsOR5H.js";import"./avatar-DZNFp-l_.js";import"./popover-menu-kMqLztgE.js";import"./mail-qvbIZwSA.js";import"./app-chrome-DEclDxYQ.js";import"./useMediaQuery-uf6mjwPE.js";import"./FullCompose-ZjHfjPwG.js";import"./confirm-dialog-C8W1RcOV.js";import"./circle-check-big-Q5xMZBl1.js";import"./refresh-cw-DdZ8vtf2.js";import"./useSignature-klArqmQ3.js";import"./account-form-helpers-DhckT_PN.js";import"./suggest-list-gj7TdgNf.js";const ve={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};ve.node;const nt=Ee(ve);function ot({onCompose:s}){return e.jsx("button",{type:"button",onClick:s,"aria-label":"Compose new message",className:"lg:hidden fixed right-4 z-30 h-14 w-14 rounded-full bg-accent text-accent-fg shadow-lg flex items-center justify-center hover:opacity-90 active:scale-95 transition-all",style:{bottom:"calc(var(--app-tab-bar, 0px) + env(safe-area-inset-bottom, 0px) + 1rem)"},children:e.jsx(ws,{className:"size-6"})})}const rt=({isOpen:s,onClose:t})=>{const a=p.useRef(null);return Pe({id:"shortcuts",open:s,answers:{back:t}}),Le(a,s),s?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[e.jsx(Te,{label:"Dismiss keyboard shortcuts",onDismiss:t,className:"backdrop-blur-sm"}),e.jsxs("div",{ref:a,role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",tabIndex:-1,className:I("relative z-10 max-h-[85vh] w-full max-w-2xl overflow-y-auto","rounded-lg border border-line bg-surface shadow-lg","p-6"),children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Keyboard shortcuts"}),e.jsx("button",{type:"button",onClick:t,className:"p-1 text-fg-muted transition-colors hover:text-fg","aria-label":"Close",children:e.jsx(Fe,{className:"size-5"})})]}),e.jsx("div",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2",children:zs.map(n=>e.jsxs("div",{children:[e.jsx("h3",{className:"mb-3 text-sm font-medium text-fg-muted",children:n.title}),e.jsx("div",{className:"space-y-2",children:n.hints.map(o=>e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-sm",children:o.description}),e.jsx("span",{className:"flex shrink-0 items-center gap-1",children:o.keys.map((r,c)=>e.jsxs(p.Fragment,{children:[c>0&&o.keys[0]==="g"&&e.jsx("span",{className:"text-2xs text-fg-subtle",children:"then"}),e.jsx($,{children:r})]},r))})]},`${o.action}-${o.keys.join("+")}`))})]},n.title))}),e.jsx("div",{className:"mt-6 border-t border-line pt-4",children:e.jsxs("p",{className:"text-center text-xs text-fg-muted",children:["Press ",e.jsx($,{children:"Esc"})," to close"]})})]})]}):null},it="button:not([disabled]), a[href]",P="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface-sunken";function lt({active:s,dimmed:t,indent:a}){return I("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors",P,a&&"pl-7",s?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg",t&&"opacity-55")}function ct({icon:s,label:t,count:a,active:n,failure:o}){return e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:I("shrink-0",n?"text-accent-2":"text-fg-subtle"),children:s}),e.jsx("span",{className:"flex-1 truncate",children:t}),o&&e.jsx(re,{className:"size-3.5 shrink-0 text-danger","aria-hidden":"true"}),a!=null&&a>0&&e.jsx("span",{className:I("text-2xs tabular-nums",n?"text-accent-2":"text-fg-subtle"),children:a})]})}function w({icon:s,label:t,count:a,active:n,dimmed:o,indent:r,navId:c,linkComponent:u,ariaLabel:x,title:d,failure:h,onClick:y}){const g=lt({active:n,dimmed:o,indent:r}),l=e.jsx(ct,{icon:s,label:t,count:a,active:n,failure:h}),v=x??t,m=h?`${v} — ${h}`:v,f=h?`${d??t} — ${h}`:d;return c&&u?u({navId:c,className:g,ariaLabel:m,title:f,onClick:y,children:l}):e.jsx("button",{type:"button",onClick:y,className:g,"aria-label":h?m:x,title:f,children:l})}const V={inbox:0,flagged:1,drafts:2,sent:3,archive:4,all:5,junk:6,trash:7};function ut(s){switch(s){case"inbox":return e.jsx(He,{className:"size-4"});case"flagged":return e.jsx(oe,{className:"size-4"});case"drafts":return e.jsx(qe,{className:"size-4"});case"sent":return e.jsx(ie,{className:"size-4"});case"archive":return e.jsx(Qe,{className:"size-4"});case"all":return e.jsx(Ke,{className:"size-4"});case"junk":return e.jsx(Be,{className:"size-4"});case"trash":return e.jsx(_e,{className:"size-4"})}}const U=s=>s.role!=null,A=8,W="remit.nav.folders.open.",G="remit.nav.account.open.";function Y(s,t,a){if(typeof localStorage>"u")return a;const n=localStorage.getItem(s+t);return n===null?a:n!=="0"}function J(s,t,a){typeof localStorage>"u"||localStorage.setItem(s+t,a?"1":"0")}function dt({account:s,selectedNavId:t,onSelectNav:a,linkComponent:n}){const[o,r]=p.useState(()=>Y(G,s.id,!0)),[c,u]=p.useState(()=>Y(W,s.id,!0)),[x,d]=p.useState(!1),h=()=>{r(i=>{const j=!i;return J(G,s.id,j),j})},y=()=>{u(i=>{const j=!i;return J(W,s.id,j),j})},g=s.mailboxes.filter(U).sort((i,j)=>V[i.role]-V[j.role]),l=s.mailboxes.filter(i=>!U(i)),v=x||l.length<=A?l:l.slice(0,A),m=l.length-v.length,f=s.status??"ready",b=s.syncedServices!==void 0&&!s.syncedServices.includes("Mail"),N=f==="ready"&&g.length===0&&l.length===0;return e.jsxs("div",{className:"mt-3",children:[e.jsxs("button",{type:"button",onClick:h,"aria-expanded":o,className:I("flex w-full items-center gap-1.5 px-2 pb-1 text-left transition-colors hover:text-fg",P,s.muted&&"opacity-55"),children:[o?e.jsx(H,{className:"size-3 shrink-0 text-fg-subtle"}):e.jsx(Q,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"truncate text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:s.label}),s.muted&&e.jsxs(e.Fragment,{children:[e.jsx(Ds,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"text-2xs text-fg-subtle",children:"muted"})]}),b&&e.jsxs(e.Fragment,{children:[e.jsx(Xs,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"text-2xs text-fg-subtle",children:Zs.Mail})]})]}),o&&e.jsxs(e.Fragment,{children:[f==="loading"&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"Loading…"}),f==="error"&&e.jsxs("div",{role:"alert",className:"mx-2 my-1 flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-2 py-1.5 text-sm",children:[e.jsx(re,{className:"mt-0.5 size-4 shrink-0 text-danger","aria-hidden":"true"}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx("p",{className:"font-medium text-danger",children:"Couldn't load mailboxes"})}),s.onRetry&&e.jsx("button",{type:"button",onClick:s.onRetry,className:"shrink-0 text-sm font-medium text-accent hover:underline",children:"Retry"})]}),N&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"No mailboxes"}),f==="ready"&&e.jsxs(e.Fragment,{children:[g.map(i=>e.jsx(w,{navId:i.id,linkComponent:n,icon:ut(i.role),label:i.name,ariaLabel:i.name,title:i.fullPath??i.name,failure:i.failure,count:i.unseen,active:t===i.id,dimmed:s.muted,onClick:()=>a?.(i.id)},i.id)),s.outboxPending!==void 0&&e.jsx(w,{navId:"outbox",linkComponent:n,icon:e.jsx(ie,{className:"size-4"}),label:"Outbox",ariaLabel:"Outbox",count:s.outboxPending>0?s.outboxPending:void 0,active:t==="outbox",dimmed:s.muted,onClick:()=>a?.("outbox")}),l.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:y,"aria-expanded":c,className:I("mt-1 flex w-full items-center gap-1 px-2 py-1 text-left text-2xs font-semibold uppercase tracking-wider text-fg-subtle transition-colors hover:text-fg",P),children:[c?e.jsx(H,{className:"size-3 shrink-0"}):e.jsx(Q,{className:"size-3 shrink-0"}),e.jsx("span",{className:"flex-1",children:"Folders"}),e.jsx("span",{className:"tabular-nums opacity-70",children:l.length})]}),c&&e.jsxs(e.Fragment,{children:[v.map(i=>e.jsx(w,{navId:i.id,linkComponent:n,icon:e.jsx(De,{className:"size-4"}),label:i.name,ariaLabel:i.name,title:i.fullPath??i.name,failure:i.failure,count:i.unseen,active:t===i.id,dimmed:s.muted,onClick:()=>a?.(i.id)},i.id)),(m>0||x)&&l.length>A&&e.jsx("button",{type:"button",onClick:()=>d(i=>!i),className:I("ml-7 flex items-center px-2 py-1 text-2xs font-medium text-accent transition-colors hover:underline",P),children:x?"Show less":`Show all (${l.length})`})]})]})]})]})]})}function mt({accounts:s,selectedNavId:t,briefUnseen:a,onSelectNav:n,variant:o="desktop",linkComponent:r,calendarNav:c="hidden"}){const u=p.useRef(null);Js({containerRef:u,itemSelector:it});const x=o==="drawer",d=e.jsxs("nav",{ref:x?u:void 0,className:x?"px-2 py-2":"flex-1 overflow-y-auto px-2 py-2","aria-label":"Mailboxes",children:[e.jsx(w,{navId:"brief",linkComponent:r,icon:e.jsx(Ae,{className:"size-4"}),label:"Daily brief",ariaLabel:"Daily brief",count:a,active:t==="brief",onClick:()=>n?.("brief")}),c==="shown"&&e.jsx(w,{navId:"calendar",linkComponent:r,icon:e.jsx(ze,{className:"size-4"}),label:"Calendar",ariaLabel:"Calendar",active:t==="calendar",onClick:()=>n?.("calendar")}),e.jsx(w,{navId:"flagged",linkComponent:r,icon:e.jsx(oe,{className:"size-4"}),label:"Starred",ariaLabel:"Starred",active:t==="flagged",onClick:()=>n?.("flagged")}),s.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-sm text-fg-muted",children:"No accounts configured"}):s.map(h=>e.jsx(dt,{account:h,selectedNavId:t,onSelectNav:n,linkComponent:r},h.id))]});return x?d:e.jsx("aside",{ref:u,className:"flex h-full w-full flex-col bg-surface-sunken",children:d})}function xt(){const s=pe();if(!s)return null;const t=s.showNavPane?!s.navCollapsed:!1;return e.jsx(E,{variant:"ghost",size:"sm",icon:e.jsx(Us,{className:"size-4"}),onClick:s.toggleNav,"aria-label":t?"Hide folders":"Show folders","aria-expanded":t,title:"Folders",className:"shrink-0"})}const ft={global:"Search all mail",pending:"Search mail",scoped:"Search this folder"};function pt({search:s,onCompose:t,onReportBug:a,onOpenSettings:n,settingsAttention:o,composeShortcut:r,refreshControl:c,account:u}){return e.jsx(fs,{leading:e.jsx(xt,{}),search:e.jsx(_s,{value:s.value,onChange:s.onChange,onClear:s.onClear,onClearQuery:s.onClearQuery,chips:s.chips,onRemoveChip:s.onRemoveChip,placeholder:ft[s.scope]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(E,{variant:"ghost",size:"sm",icon:e.jsx(nt,{className:"size-4"}),title:r?`Compose (${r})`:"Compose","aria-label":"Compose",onClick:t}),e.jsx(E,{variant:"ghost",size:"sm",icon:e.jsx(he,{className:"size-4"}),title:"Report a bug","aria-label":"Report a bug",onClick:a}),e.jsx(E,{variant:"ghost",size:"sm",icon:e.jsx(le,{label:o,children:e.jsx(fe,{className:"size-4"})}),title:"Settings","aria-label":o?`Settings — ${o}`:"Settings",onClick:n}),c,u]})})}function ht(){const{pathname:s}=js(),t=$e({from:"/mail/$mailboxId",shouldThrow:!1});return O(s,"/settings")?"settings":O(s,"/calendar")?"calendar":O(s,"/mail/outbox")?"outbox":O(s,"/mail/flagged")?"flagged":O(s,"/mail/brief")?"brief":t?.mailboxId??""}function gt(){const s=Ve(),t=D({select:d=>q(d.location.pathname)}),a=D({select:d=>ds(d.location.search)}),[n,o]=p.useState(a),r=tt(n,200),[c,u]=p.useState(t);if(c!==t){const d=ks(c,t,a);u(t),d!==void 0&&o(d)}const x=p.useCallback(d=>{u(q(s.state.location.pathname)),o(d)},[s]);return{searchInput:n,committedQuery:Os(n,r),viewKey:t,setSearchInput:x}}const bt=()=>{const s=K();return ms()?null:e.jsx(ot,{onCompose:s})};function X({accounts:s}){const{searchInput:t,onSearchChange:a,onSearchClear:n,onSearchClearQuery:o,resultFolderIndex:r}=ce(),c=B(),u=Vs(),x=K(),{scope:d,clearScope:h}=Bs(s),y=ue(),g=d.kind==="scoped"?[{id:d.chip.id,label:d.chip.label,tone:"scope"}]:void 0,l=p.useMemo(()=>s.map(N=>N.accountId),[s]),{hasNewMail:v}=Ms(),{state:m,errorMessage:f,refresh:b}=Es(l,{onSettled:()=>Ue(c,We(r.keys()))});return e.jsx(pt,{search:{value:t,scope:d.kind,chips:g,onChange:a,onClear:n,onClearQuery:o,onRemoveChip:h},onCompose:x,onReportBug:de,onOpenSettings:()=>u("accounts"),settingsAttention:y,composeShortcut:Ks("compose"),refreshControl:e.jsx(Ps,{state:m,onRefresh:b,label:"Refresh all accounts",errorMessage:f,hasUpdate:v(l)}),account:e.jsx(ps,{})})}function vt(){return e.jsxs("button",{type:"button",onClick:de,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg",children:[e.jsx(he,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Report a bug"})]})}const Z=s=>/^\d/.test(s),yt=(s,t)=>{const a=Z(s),n=Z(t);return a&&!n?-1:!a&&n?1:s.localeCompare(t,void 0,{sensitivity:"base",numeric:!0})};function jt(s,t,a){const n=[],o=[];for(const r of s)t.has(r.mailboxId)?n.push(r):o.push(r);return o.sort((r,c)=>yt(z(r,void 0,a),z(c,void 0,a))),{system:n,labels:o}}function Nt(s,t,a){const n=Xe(t)&&s.unseenCount>0;return{id:s.mailboxId,name:z(s,t,a),unseen:n?s.unseenCount:void 0,role:t,fullPath:s.fullPath,failure:Gs(s)}}function ee({accounts:s,onMailboxSelect:t,variant:a="desktop"}){const n=B(),o=ht(),{onSearchChange:r}=ce(),{t:c}=Ge("mail",{useSuspense:!1}),u=p.useCallback((m,f)=>c(m,{defaultValue:f}),[c]),x=ge({queries:s.map(m=>({...me({path:{accountId:m.accountId}}),staleTime:1/0}))}),{data:d}=xe(Ye()),h=p.useMemo(()=>(d?.items??[]).filter(m=>Ys(m.status)).length,[d?.items]),y=p.useMemo(()=>s.map((m,f)=>{const b=x[f],N=b?.data?.items??[],i=Je(m.folderAppointments),{system:j,labels:L}=jt(N,i,u),T=b?.isError?"error":b?.isLoading?"loading":"ready";return{id:m.accountId,label:m.email,email:m.email,muted:!!m.muted,outboxPending:h,status:T,onRetry:()=>b?.refetch(),mailboxes:[...j,...L].map(k=>Nt(k,i.get(k.mailboxId),u))}}),[s,x,h,u]),g=m=>{n.invalidateQueries({queryKey:Ze({path:{mailboxId:m},query:{order:"desc"}})})},l=({navId:m,className:f,ariaLabel:b,title:N,children:i,onClick:j})=>m==="brief"?e.jsx(C,{to:"/mail/brief",search:{q:void 0},activeOptions:{includeSearch:!1},onClick:()=>j?.(),className:f,"aria-label":b,title:N,children:i}):m==="calendar"?e.jsx(C,{to:"/calendar",onClick:()=>j?.(),className:f,"aria-label":b,title:N,children:i}):m==="outbox"?e.jsx(C,{to:"/mail/outbox",search:{q:void 0},onClick:()=>j?.(),className:f,"aria-label":b,title:N,children:i}):m==="flagged"?e.jsx(C,{to:"/mail/flagged",search:{q:void 0},onClick:()=>j?.(),className:f,"aria-label":b,title:N,children:i}):m==="settings"?e.jsx(C,{to:"/settings/accounts",onClick:()=>j?.(),className:f,"aria-label":b,title:N,children:i}):e.jsx(C,{to:"/mail/$mailboxId",params:{mailboxId:m},search:{q:void 0},onClick:()=>{g(m),j?.()},className:f,"aria-label":b,title:N,children:i}),v=()=>{r(""),t?.()};return e.jsx(mt,{accounts:y,selectedNavId:o,onSelectNav:v,linkComponent:l,variant:a})}function St({accounts:s,onMailboxSelect:t}){const n=pe()?.showNavPane??!0,o=ue();return n?e.jsx(ee,{accounts:s}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(ee,{accounts:s,onMailboxSelect:t,variant:"drawer"})}),e.jsxs("div",{className:"border-t border-line px-2 py-2",children:[e.jsxs(C,{to:"/settings/accounts",onClick:t,children:[e.jsx(le,{label:o,children:e.jsx(fe,{className:"size-4 shrink-0"})}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Settings"})]}),e.jsx(vt,{}),e.jsx(hs,{children:({signOut:r})=>e.jsxs("button",{type:"button",onClick:()=>{t?.(),r()},className:"flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg","data-testid":"sign-out-button",children:[e.jsx(gs,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Sign out"})]})})]})]})}function Ct(s){const t=ge({queries:s.map(a=>({...me({path:{accountId:a.accountId}}),staleTime:1/0}))});return p.useMemo(()=>Qs(t.map(a=>a.data?.items??[])),[t])}const ye="remit:intelligence-open";function It(){try{return localStorage.getItem(ye)!=="closed"}catch{return!0}}function wt(s){try{localStorage.setItem(ye,s?"open":"closed")}catch{}}function se({panels:s,prefersOpen:t,isDesktop:a,hasThread:n,raisedFor:o,openMessage:r}){if(o!==null&&o===r)return!0;const c=s.filter(u=>u!=="sidebar");return c.length>0?c.includes("intelligence"):a&&n&&t}const Ot=()=>{const s=be(),t=Ns(),a=Ss(),n=t.find(Cs),o=qs(),[r,c]=p.useState(It),u=o?`${o.threadId}/${o.messageId??""}`:null,[x,d]=p.useState(null),h={panels:t,prefersOpen:r,isDesktop:s==="desktop",hasThread:o!==void 0,openMessage:u},y=se({...h,raisedFor:x}),g=se({...h,raisedFor:null}),l=p.useCallback((b,N)=>{a([...b?["intelligence"]:[],...N?[N]:[]])},[a]),v=p.useCallback(b=>{l(g,b)},[g,l]),m=p.useCallback(()=>{if(y&&!g){d(null);return}const b=!y;wt(b),c(b),d(null),l(b,n)},[g,y,n,l]),f=p.useCallback(()=>{d(u)},[u]);return{openOverlay:n,intelligenceOpen:y,showOverlay:v,toggleIntelligence:m,raiseIntelligence:f}};var R={exports:{}},te;function kt(){if(te)return R.exports;te=1;const s=(t,a,n)=>new Promise((o,r)=>{if(n=Object.assign({concurrency:1/0},n),typeof a!="function")throw new TypeError("Mapper function is required");const{concurrency:c}=n;if(!(typeof c=="number"&&c>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${c}\` (${typeof c})`);const u=[],x=t[Symbol.iterator]();let d=!1,h=!1,y=0,g=0;const l=()=>{if(d)return;const v=x.next(),m=g;if(g++,v.done){h=!0,y===0&&o(u);return}y++,Promise.resolve(v.value).then(f=>a(f,m)).then(f=>{u[m]=f,y--,l()},f=>{d=!0,r(f)})};for(let v=0;v<c&&(l(),!h);v++);});return R.exports=s,R.exports.default=s,R.exports}var Rt=kt();const Mt=es(Rt),Et=900*1e3,Pt=30,Lt=(s,t)=>{if(!s)return t;const a=Number.parseInt(s,10);return Number.isFinite(a)&&a>0?a:t},Tt=30*1e3,Ft=s=>Math.max(Lt(s,Pt)*1e3,Tt),je=Ft(rs().mailboxPollIntervalSeconds),M=(s=Date.now(),t=je)=>Ts(s)?Math.min(Fs,t):t,At=5,_=new Set,zt=(s,t,a=Et)=>s.filter(n=>{const o=n.lastSyncAt;return o==null?!0:t-o>a}).map(n=>n.accountId),Dt=(s,t,a=je)=>s-t>=a,_t=(s,t)=>s.filter(a=>!t.has(a)),ae=(s,t)=>{if(_.delete(s),as(t)||ns(t,{softError:!0})){os(t,{softError:!0});return}console.warn("[remit] background mailbox sync failed",{accountId:s,error:t})},ne=(s,t)=>ss({path:{accountId:s},throwOnError:!0}).then(()=>{t.invalidateQueries({queryKey:ts({path:{accountId:s}})})}),Bt=s=>{const t=B(),a=p.useRef(s);a.current=s;const n=s.map(o=>o.accountId).join(",");p.useEffect(()=>{const o=Date.now(),c=zt(a.current,o).filter(u=>!_.has(u));if(c.length!==0)for(const u of c)_.add(u),ne(u,t).catch(x=>{ae(u,x)})},[n,t]),p.useEffect(()=>{let o=Date.now(),r;const c=new Set,u=()=>{o=Date.now();const g=_t(a.current.map(l=>l.accountId),c);for(const l of g)c.add(l);Mt(g,l=>ne(l,t).catch(v=>{ae(l,v)}).finally(()=>{c.delete(l)}),{concurrency:At})},x=()=>{if(document.visibilityState==="visible"){u(),r=setTimeout(x,M());return}},d=()=>{if(document.visibilityState!=="visible")return;r!==void 0&&clearTimeout(r);const g=Date.now(),l=M(g);if(Dt(g,o,l)){u(),r=setTimeout(x,l);return}r=setTimeout(x,o+l-g)},h=()=>{document.visibilityState==="visible"&&(r!==void 0&&clearTimeout(r),o=Date.now(),r=setTimeout(x,M()))};r=setTimeout(x,M()),document.addEventListener("visibilitychange",d);const y=Ls(h);return()=>{r!==void 0&&clearTimeout(r),document.removeEventListener("visibilitychange",d),y()}},[n,t])};function Sa(){const s=is(),t=be(),a=st(t),{openOverlay:n,intelligenceOpen:o,showOverlay:r,toggleIntelligence:c,raiseIntelligence:u}=Ot(),x=n==="shortcuts",d=n==="nav",{searchInput:h,committedQuery:y,viewKey:g,setSearchInput:l}=gt(),{data:v,isLoading:m,isError:f,error:b,refetch:N}=xe({...ls(),staleTime:1/0}),i=!!(v&&(v.accounts?.length??0)===0);p.useEffect(()=>{i&&s({to:"/onboarding",replace:!0})},[i,s]),et({enabled:!x,bindings:[{key:"?",action:"help",handler:()=>r("shortcuts"),noModifiers:!1,preventDefault:!0}]});const j=K(),L=Is(),T=D({select:F=>xs(F.matches)?.list==="mailbox"}),k=p.useMemo(()=>({compose:j}),[j]);Hs({enabled:!T&&!L,handlers:k});const Ne=p.useCallback(()=>{l("")},[l]),Se=p.useCallback(()=>{l("")},[l]),S=v?.accounts??[],Ce=p.useMemo(()=>S.map(F=>F.accountId),[S]),Ie=Ct(S),we=Ws(S).index,Oe=p.useMemo(()=>$s(S),[S]);Bt(S);const ke=p.useCallback(()=>{n==="nav"&&r(void 0)},[n,r]),Re={accounts:S,mailboxNameIndex:Ie,accountNameIndex:Oe,resultFolderIndex:we,searchQuery:y,searchInput:h,searchViewKey:g,onSearchChange:l,onSearchClear:Ne,onSearchClearQuery:Se,intelligenceOpen:o,onToggleIntelligence:c,onRaiseIntelligence:u},Me={isSinglePane:a,isLoading:m||i,intelligenceOpen:o,nav:e.jsx(St,{accounts:S,onMailboxSelect:ke}),topBar:a?void 0:e.jsx(X,{accounts:S}),appBar:t==="phone"?void 0:e.jsx(ys,{}),overlay:a?e.jsx(bt,{}):void 0,navOpen:d,onOpenNav:()=>r("nav"),onCloseNav:()=>r(void 0)};return e.jsx(cs.Provider,{value:Re,children:e.jsxs(As,{accountIds:Ce,children:[e.jsx(bs,{children:f?e.jsx(vs,{topBar:e.jsx(X,{accounts:S}),children:e.jsx("div",{className:"flex h-full items-center justify-center bg-canvas p-4",children:e.jsx(at,{title:"Couldn't load your account",error:b,onRetry:()=>{N()}})})}):e.jsx(Rs,{chrome:Me,children:e.jsx(us,{})})}),e.jsx(rt,{isOpen:x,onClose:()=>r(void 0)})]})})}export{Sa as component,ce as useMailContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./index-CmOAOx38.js";const e={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};e.node;const t=a(e);export{t as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./index-CmOAOx38.js";const e={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};e.node;const n=a(e);export{n as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f,p as s,H as b,cb as d,cc as x,r as i,u as P,cd as S,ce as N}from"./index-
|
|
1
|
+
import{j as f,p as s,H as b,cb as d,cc as x,r as i,u as P,cd as S,ce as N}from"./index-CmOAOx38.js";import{u as O}from"./useMediaQuery-uf6mjwPE.js";const l="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface",k="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",R={nav:{base:s("flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors",l),rest:"text-fg-muted hover:bg-surface hover:text-fg",current:"bg-accent-2-soft font-medium text-accent-2"},row:{base:s("relative flex w-full items-start text-left transition-colors",k),rest:"hover:bg-surface-sunken",current:"bg-accent-2-soft"},inline:{base:s("rounded-sm underline-offset-2 transition-colors hover:underline",l),rest:"text-accent hover:text-accent-hover",current:"font-medium text-accent"}};function j(e){return e!==void 0&&e!==!1&&e!=="false"}function w({variant:e="nav",current:n,"aria-current":t,className:p,children:v,ref:h,...g}){const u=n??t,r=R[e];return f.jsx("a",{ref:h,"aria-current":u,className:s(r.base,j(u)?r.current:r.rest,p),...g,children:v})}function I(e){const n=b();return d(n.stores.location,x(e,n))}const o=["intelligence","sidebar","nav","shortcuts"],L=["nav","shortcuts"],m=e=>L.includes(e);function G(e,n){return[...e.filter(t=>!m(t)),...n?[n]:[]]}const y=S(o);function a(e){const n=new Set(e.split(",").map(t=>y.safeParse(t)).filter(t=>t.success).map(t=>t.data));return o.filter(t=>n.has(t))}function c(e){return o.filter(n=>e.includes(n)).join(",")}function M(){const e=I({select:n=>c(a(n.hash))});return i.useMemo(()=>a(e),[e])}const E=(e,n)=>!m(e)&&n;function F(e){return(n="")=>c(a(n).filter(t=>E(t,e)))}function T(){const e=O();return i.useMemo(()=>F(e),[e])}function A(){const e=P();return i.useCallback(n=>{e({search:!0,hash:c(n),replace:!0,hashScrollIntoView:!1})},[e])}const _=N(w);function H({fragment:e,...n}){const t=T();return f.jsx(_,{...n,hash:e??t})}export{H as N,M as a,A as b,T as c,m as i,G as p,I as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as o}from"./CalendarEventEditor-9IlkB0YL.js";import"./index-CmOAOx38.js";import"./draft-OCADnKfj.js";import"./agenda-time-9aN7iZnW.js";import"./calendar-guests-DivZiKa8.js";import"./calendar-event-popup-By-Wnzww.js";import"./useCalendarSuggestions-iprVdeF2.js";import"./ErrorState-BmGgdm41.js";import"./useQueries-DeYJYa06.js";import"./pencil-C3mJE9QO.js";import"./circle-question-mark-Dt4vUSbc.js";import"./useCalendarData-QcaY0Cgc.js";import"./useCalendarTasks-D9R56VL3.js";import"./useCalendarScheduling-BXMaoFja.js";import"./useDebouncedValue-M5m0kaQD.js";import"./calendar-format-BwCpz-JZ.js";import"./nav-link-Bdv8kjEd.js";import"./useMediaQuery-uf6mjwPE.js";import"./calendar-CmjULz3U.js";import"./reply-BBXEHuds.js";import"./CalendarQuickCreate-By7rnSuh.js";import"./CalendarSession-CjfkNnKN.js";import"./calendar-event-sidebar-DqoVNv2n.js";import"./select-CpLCf4_c.js";import"./chevron-down-CuQovlNy.js";import"./confirm-dialog-C8W1RcOV.js";const u=o;export{u as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as i,e as n,u as a,r as m,j as p}from"./index-CmOAOx38.js";import{O as s}from"./OnboardingWizard-reo_AB5t.js";import{c}from"./onboarding-completion-CjqVIsEV.js";import"./credential-steps-D8_QxBU3.js";import"./select-CpLCf4_c.js";import"./chevron-down-CuQovlNy.js";import"./badge-DXTfgcBt.js";import"./card-BkVHxya_.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-qvbIZwSA.js";import"./file-braces-CskVbU-i.js";import"./kbd-BMGsOR5H.js";import"./checkbox-Cxv99wmn.js";function k(){const o=i(),t=n(),e=a(),r=m.useCallback(l=>{c({queryClient:t,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[o,t]);return p.jsx(s,{skipWelcome:!1,onComplete:r,onImportConfig:()=>{e({to:"/import"})}})}export{k as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as o}from"./index-
|
|
1
|
+
import{k as o}from"./index-CmOAOx38.js";async function n(e){e.recordCompleted(),await e.queryClient.refetchQueries({queryKey:o()}),e.navigateToInbox()}export{n as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o,O as i}from"./index-CmOAOx38.js";import{a as m}from"./MailShell-BO8c-sH6.js";import{u as p,O as t}from"./OutboxPane-qaAt9-sk.js";import"./nav-link-Bdv8kjEd.js";import"./reply-BBXEHuds.js";import{u as s}from"./search-mirror-CqXcmXWg.js";import"./useMessageBodyContent-CsZ9VCHu.js";import"./FullCompose-ZjHfjPwG.js";import"./index-CpNGDsVT.js";import"./useSignature-klArqmQ3.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-M5m0kaQD.js";import"./suggest-list-gj7TdgNf.js";import"./sections-40tp2E7G.js";import"./useMediaQuery-uf6mjwPE.js";import"./chevron-down-CuQovlNy.js";import"./ErrorState-BmGgdm41.js";import"./confirm-dialog-C8W1RcOV.js";import"./search-scope-BCz9qlCH.js";import"./app-chrome-DEclDxYQ.js";import"./MessageBody-BIp2OZY6.js";import"./kbd-BMGsOR5H.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-CkmJu7iR.js";import"./menu-g1nN4c6m.js";import"./roving-focus-h-W142Au.js";import"./circle-check-big-Q5xMZBl1.js";import"./clock-Ctw4TG15.js";import"./row-actions-CJJYnXCz.js";import"./rotate-ccw-DU-xqseJ.js";function C(){const r=p();return s({to:"/mail/outbox"}),o.jsx(t,{outboxMessageId:r,children:o.jsx(m,{phone:o.jsx(t.Phone,{}),list:o.jsx(t.List,{}),reading:o.jsx(i,{})})})}export{C as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./index-CmOAOx38.js";const a={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};a.node;const n=e(a);export{n as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as O,e as I,f as R,bI as E,bJ as T,bK as A,bL as L,bM as z,bN as F,bO as M,bP as v,r as c,j as e,aB as k,B as x,X as U,ap as B,bQ as g,b5 as H,aq as Q,bR as _,d as b,bS as q,bT as C,bU as w,u as K,ac as W}from"./index-CmOAOx38.js";import{R as S}from"./ReportLink-DVR5iYy8.js";import{C as Y}from"./copy-Eu3Pxnsn.js";import{D as G,a as h,b as $}from"./DropdownMenu-D4QQzyrH.js";import{a as J}from"./sections-40tp2E7G.js";import{S as X}from"./settings-screen-Bx-jomcC.js";import"./avatar-DZNFp-l_.js";import"./badge-DXTfgcBt.js";import"./chevron-left-CO-V7AVZ.js";import"./menu-g1nN4c6m.js";import"./circle-question-mark-Dt4vUSbc.js";const P={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};P.node;const V=O(P),Z=async({action:s,person:t},r)=>{const n={userId:t.userId};if(s==="SignOut"){const{data:a}=await z({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a,resetUrl:void 0}}if(s==="ResetPassword"){const{data:a}=await F({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a.person,resetUrl:a.resetUrl}}const{data:o}=await M({path:n,body:{status:s==="Disable"?"Disabled":"Active",stepUpToken:r},throwOnError:!0});return{person:o,resetUrl:void 0}},ee=s=>{const t=I();return R({meta:E,gcTime:0,mutationFn:async r=>{const{data:n}=await L({body:{password:s,action:r.action,userId:r.person.userId},throwOnError:!0});return Z(r,n.stepUpToken)},onSuccess:({person:r})=>{t.setQueryData(T(),n=>n&&{people:A(n.people,r)})}})},se="That is not your password. Try again.",te="Five wrong passwords in 15 minutes. Wait 15 minutes, then try again.";function ne({action:s,person:t,onCancel:r,onDone:n,onFailed:o}){const a=v(s,t.email),[l,p]=c.useState(""),[u,m]=c.useState(null),i=ee(l),d=()=>{i.isPending||r()},D=f=>{f.preventDefault(),!(i.isPending||l==="")&&(m(null),i.mutate({action:s,person:t},{onSuccess:n,onError:y=>{const j=g(y);if(j.kind==="wrongPassword"){p(""),m(se);return}if(j.kind==="locked"){p(""),m(te);return}if(j.kind==="signedOut"){r(),H();return}o(y)}}))};return e.jsx(k,{open:!0,onClose:d,title:a.title,children:e.jsxs("form",{onSubmit:D,children:[e.jsxs("header",{className:"flex items-center gap-2 border-b border-line px-5 py-3",children:[e.jsx("span",{className:"flex-1 text-sm font-semibold text-fg",children:a.title}),e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(U,{className:"size-3.5"}),onClick:d,"aria-label":"Close"})]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:a.body}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"people-step-up-password",className:"text-xs font-medium text-fg",children:"Your password"}),e.jsx(B,{id:"people-step-up-password",autoComplete:"current-password",value:l,onChange:f=>{p(f.target.value),m(null)},"aria-invalid":u!==null,"aria-describedby":"people-step-up-hint",required:!0}),e.jsx("p",{id:"people-step-up-hint",className:"text-xs",children:u?e.jsx("span",{className:"text-danger",role:"alert",children:u}):"Confirm with your own password. It counts for this one action."})]})]}),e.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:[e.jsx(x,{variant:"secondary",size:"sm",onClick:d,children:"Cancel"}),e.jsx(x,{type:"submit",variant:a.destructive?"danger":"primary",size:"sm",disabled:l==="","aria-busy":i.isPending,children:a.confirmLabel})]})]})})}const re=()=>{};function ae({email:s,resetUrl:t,onDone:r}){const[n,o]=c.useState(!1),[a,l]=c.useState(!1),p=()=>{navigator.clipboard.writeText(t).then(()=>{l(!1),o(!0)}).catch(()=>l(!0))};return e.jsxs(k,{open:!0,onClose:re,title:`Reset link for ${s}`,children:[e.jsxs("header",{className:"border-b border-line px-5 py-3 text-sm font-semibold text-fg",children:["Reset link for ",s]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:"They are signed out everywhere. Give them this link, by message or in person. It works once, for 24 hours."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx(x,{variant:"primary",size:"sm",icon:n?e.jsx(Q,{className:"size-3.5"}):e.jsx(Y,{className:"size-3.5"}),onClick:p,children:n?"Copied":"Copy"}),e.jsx("input",{readOnly:!0,tabIndex:-1,value:t,"aria-label":`Reset link for ${s}`,onFocus:u=>u.currentTarget.select(),className:"min-w-0 flex-1 rounded-sm border border-line bg-surface px-2 py-1.5 font-mono text-xs text-fg sm:order-first"})]}),a&&e.jsx("p",{className:"text-xs text-danger",role:"alert",children:"Copying did not work in this browser. Select the link and copy it by hand."}),e.jsx("p",{children:"You see this link only now. Close this window and it is gone. Make a new one if it gets lost."})]}),e.jsx("footer",{className:"flex justify-end border-t border-line px-5 py-3",children:e.jsx(x,{variant:"secondary",size:"sm",onClick:r,children:"Done"})})]})}const N="The list of people did not load";function oe({failure:s}){const t=c.useRef(null);return c.useEffect(()=>{t.current?.focus()},[]),e.jsx("div",{ref:t,tabIndex:-1,className:"outline-none",children:e.jsxs(b,{tone:"danger",children:[e.jsx("p",{className:"font-medium",children:s.title}),e.jsx("p",{className:"mt-1 text-fg-muted",children:s.reason}),e.jsx("p",{className:"mt-1",children:e.jsx(S,{href:C(s.title,s.error)})})]})})}function ie({person:s,onPick:t}){const r=s.status==="Disabled";return e.jsxs(G,{trigger:e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"size-4","aria-hidden":"true"}),e.jsxs("span",{className:"sr-only",children:["Actions for ",s.email]})]}),children:[e.jsx(h,{onClick:()=>t("SignOut"),children:"Sign out everywhere"}),e.jsx(h,{onClick:()=>t("ResetPassword"),children:"Reset password"}),e.jsx($,{}),r?e.jsx(h,{onClick:()=>t("Enable"),children:"Enable"}):e.jsx(h,{onClick:()=>t("Disable"),disabled:s.isCaller,destructive:!s.isCaller,children:e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{children:"Disable"}),s.isCaller&&e.jsx("span",{className:"text-xs text-fg-subtle",children:"Not your own account"})]})})]})}function le({people:s,onPick:t}){const r=new Date;return e.jsx("div",{className:"overflow-x-auto rounded-sm border border-line bg-surface",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"border-b border-line text-xs text-fg-muted",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Email"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Created"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Last sign-in"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Sessions"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Status"}),e.jsx("th",{scope:"col",className:"w-12 px-1 py-2",children:e.jsx("span",{className:"sr-only",children:"Actions"})})]})}),e.jsx("tbody",{children:s.map(n=>e.jsxs("tr",{className:"border-b border-line last:border-b-0",children:[e.jsxs("td",{className:"px-3 py-1 text-fg",children:[n.email,n.isCaller&&e.jsx("span",{className:"text-fg-muted",children:" (you)"})]}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.createdAt,r)}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.lastSignInAt,r)}),e.jsx("td",{className:"px-3 py-1 tabular-nums text-fg-muted",children:n.sessionCount}),e.jsx("td",{className:n.status==="Disabled"?"px-3 py-1 text-danger":"px-3 py-1 text-fg-muted",children:n.status}),e.jsx("td",{className:"px-1 py-1",children:e.jsx(ie,{person:n,onPick:o=>t(o,n)})})]},n.userId))})]})})}function ce(){const s=_(),[t,r]=c.useState(null),[n,o]=c.useState(null),[a,l]=c.useState(null);if(s.isPending)return e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading people"});if(s.unavailable)return e.jsx(b,{tone:"info",children:"This server has no People page. It shows on a self-hosted server once self sign-up is turned off."});if(s.isError)return g(s.error).kind==="signedOut"?null:e.jsxs(b,{tone:"danger",children:[e.jsxs("p",{className:"font-medium",children:[N,"."]}),e.jsx("p",{className:"mt-1 text-fg-muted",children:q(s.error)}),e.jsxs("p",{className:"mt-2 flex items-center gap-3",children:[e.jsx(x,{variant:"secondary",size:"sm",onClick:()=>{s.refetch()},children:"Try again"}),e.jsx(S,{href:C(N,s.error)})]})]});const p=(i,d)=>{o(null),r({action:i,person:d})},u=i=>{i.resetUrl&&t&&l({email:t.person.email,resetUrl:i.resetUrl}),r(null)},m=i=>{if(!t)return;const d=g(i);o({title:v(t.action,t.person.email).failedTitle,reason:d.kind==="failed"?d.reason:"Something went wrong. Nothing changed. Try again.",error:i}),r(null)};return e.jsxs("div",{className:"space-y-4",children:[n&&e.jsx(oe,{failure:n}),e.jsx(le,{people:s.data.people,onPick:p}),t&&e.jsx(ne,{action:t.action,person:t.person,onCancel:()=>r(null),onDone:u,onFailed:m}),a&&e.jsx(ae,{email:a.email,resetUrl:a.resetUrl,onDone:()=>l(null)})]})}const de=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Anyone signed in here can manage every account. Each action asks for your own password first, and is recorded with who took it and from where."}),e.jsx("p",{children:"Disabling an account signs that person out within 15 minutes and stops their calendar feed links. Their mail stays. You cannot disable your own account, so one account always stays on."}),e.jsx("p",{children:"A reset link works once, for 24 hours, and is shown only once. Making one stops the old password at once."}),e.jsxs("p",{children:["The person who runs this server can turn all sign-in off with"," ",e.jsx("code",{children:"remit sign-in off"}),", and recover an account from the host with"," ",e.jsx("code",{children:"remit people enable"})," or ",e.jsx("code",{children:"remit people reset"}),"."]})]});function Ne(){const s=K(),t=W(),r=J(),[n,o]=c.useState(!0);return e.jsx(X,{items:t,activeId:"people",title:"People",description:"Everyone with an account on this server.",help:de,helpOpen:n,onToggleHelp:()=>o(a=>!a),onSelect:r,onBackToMail:()=>{s({to:"/mail"})},children:e.jsx(ce,{})})}export{Ne as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./index-CmOAOx38.js";const e={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};e.node;const s=a(e);export{s as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as P,r as f,n as R,c3 as E,j as l,p as b,B as j}from"./index-CmOAOx38.js";const y={name:"ellipsis-vertical",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],aliases:["more-vertical"]};y.node;const k=P(y),g=4,v=8;function z(e,t,n){const o=Math.max(v,window.innerWidth-t.width-v),s=n==="end"?e.right-t.width:e.left,r=Math.min(Math.max(s,v),o),c=e.bottom+g,i=e.top-g-t.height,d=c+t.height<=window.innerHeight-v||i<v?c:i;return{left:r,top:d}}function L(e,t,n,o){const[s,r]=f.useState(null),c=f.useRef(o);return c.current=o,f.useLayoutEffect(()=>{if(!t){r(null);return}const i=()=>{const x=e.current,h=c.current();if(!x||!h)return;const m=x.getBoundingClientRect(),w={width:m.right-m.left,height:m.bottom-m.top},p=z(h,w,n);r(a=>a?.left===p.left&&a.top===p.top?a:{position:"fixed",left:p.left,top:p.top})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);const u=e.current;let d=null;return u&&typeof ResizeObserver<"u"&&(d=new ResizeObserver(i),d.observe(u)),()=>{d?.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0)}},[t,n,e]),s}function M(e,t){const[n,o]=f.useState(!1),s=f.useRef(null),r=f.useRef(null);return R({id:e,open:n,answers:{back:()=>{o(!1),t?.()}}}),f.useEffect(()=>{if(!n)return;const c=i=>{const u=i.target;s.current?.contains(u)||r.current?.contains(u)||o(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]),{open:n,setOpen:o,containerRef:s,panelRef:r,getAnchor:()=>s.current?.getBoundingClientRect()??null}}function N({open:e,align:t="start",getAnchor:n,panelRef:o,children:s}){const r=L(o,e,t,n);return e?E.createPortal(l.jsx("div",{className:"z-50",style:r??{position:"fixed",visibility:"hidden"},children:s}),document.body):null}function O({label:e,children:t,className:n,ref:o,onKeyDown:s,"data-testid":r}){return l.jsx("div",{ref:o,role:"menu","aria-label":e,tabIndex:-1,onKeyDown:s,"data-testid":r,className:b("z-50 flex max-h-[60dvh] min-w-44 flex-col overflow-y-auto overscroll-contain rounded-md border border-line bg-surface py-1 shadow-lg outline-none",n),children:t})}function S({label:e,icon:t,onSelect:n,className:o,lang:s,"data-testid":r}){return l.jsxs("button",{type:"button",role:"menuitem",lang:s,onClick:n,"data-testid":r,className:b("flex min-h-11 items-center gap-3 px-4 py-2.5 text-left text-sm text-fg transition-colors hover:bg-surface-sunken",o),children:[t&&l.jsx("span",{className:"shrink-0 text-fg-subtle",children:t}),e]})}function B({triggerLabel:e,triggerIcon:t,triggerText:n,items:o,align:s="end",touch:r=!0,className:c,triggerClassName:i,nested:u=!1,children:d}){const{open:x,setOpen:h,containerRef:m,panelRef:w,getAnchor:p}=M("popover-menu");return o.length===0&&!d?null:l.jsxs("div",{ref:m,className:b("relative",c),...u?{role:"none"}:{},children:[l.jsx(j,{variant:"ghost",size:"sm",icon:t??l.jsx(k,{className:"size-5"}),onClick:()=>h(a=>!a),"aria-label":e,"aria-haspopup":"menu","aria-expanded":x,...u?{role:"menuitem"}:{},className:b(r&&"min-h-11 min-w-11 px-0",i),children:n}),l.jsx(N,{open:x,align:s,panelRef:w,getAnchor:p,children:l.jsxs(O,{ref:w,children:[o.map(a=>l.jsx(S,{label:a.label,icon:a.icon,onSelect:()=>{h(!1),a.onSelect()}},a.key)),d]})})]})}export{k as E,N as P,O as a,S as b,B as c,M as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./index-CmOAOx38.js";const e={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};e.node;const o=a(e);export{o as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as L,cb as T,cc as w,G as u,r as i,u as d,cf as f,cd as O,ch as x}from"./index-
|
|
1
|
+
import{H as L,cb as T,cc as w,G as u,r as i,u as d,cf as f,cd as O,ch as x}from"./index-CmOAOx38.js";import{u as E,c as m}from"./nav-link-Bdv8kjEd.js";function k(e){const s=L({warn:e?.router===void 0}),t=e?.router||s;return T(t.stores.__store,w(e,t))}const y="/mail/brief",$="/mail/$mailboxId",R="/mail/outbox",v="/mail/flagged";function B(e){for(const s of e){if(s.routeId===y)return{list:"brief"};if(s.routeId===v)return{list:"flagged"};if(s.routeId===R)return{list:"outbox"};if(s.routeId===$)return{list:"mailbox",mailboxId:s.params?.mailboxId}}}function X(e){const s=e.split(/[?#]/)[0].split("/").filter(Boolean);if(s[0]!=="mail")return"";const t=s[1];return t?t==="brief"?y:t==="flagged"?v:t==="outbox"?R:D(t):""}function Y(e){if(typeof e!="object"||e===null)return"";const{q:s}=e;return typeof s=="string"?s:""}function D(e){return`${$}:${e}`}function j(e,s){return e===s?!0:e.startsWith(`${s}/`)}function S(e){const s=e.split(/[?#]/)[0].split("/").filter(Boolean);return s[0]==="mail"&&s.length>2}function l(){const e=k({select:o=>B(o.matches)?.list}),t=u({from:"/mail/$mailboxId",shouldThrow:!1})?.mailboxId;return i.useMemo(()=>({list:e,mailboxId:t}),[e,t])}function K(){const{pathname:e}=E();return S(e)}function N(){const e=d(),s=m(),{list:t,mailboxId:o}=l();return i.useCallback(()=>{const r=n=>n,a=s;if(t==="flagged"){e({to:"/mail/flagged",search:r,hash:a});return}if(t==="outbox"){e({to:"/mail/outbox",search:r,hash:a});return}if(t==="mailbox"&&o){e({to:"/mail/$mailboxId",params:{mailboxId:o},search:r,hash:a});return}e({to:"/mail/brief",search:r,hash:a})},[e,s,t,o])}const A=["reply","reply-all","forward"],P=O(A),I="/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}",g="/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}",b="/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}";function _(){const e=u({from:I,shouldThrow:!1}),s=u({from:g,shouldThrow:!1}),t=u({from:b,shouldThrow:!1});return e??s??t}function C(){const e=f({from:I,shouldThrow:!1}),s=f({from:g,shouldThrow:!1}),t=f({from:b,shouldThrow:!1});return(e??s??t)?.body}const h=e=>s=>e===void 0?x(s):{...x(s),body:e.body};function p(){const e=_(),s=C();return i.useMemo(()=>{if(!e)return;const t=P.safeParse(e.mode);return t.success?{kind:"reply",mode:t.data,threadId:e.threadId,sourceMessageId:e.messageId,outboxMessageId:e.outboxMessageId,seed:s===void 0?void 0:{body:s}}:{kind:"unknown",segment:e.mode}},[e,s])}function V(){return p()?.kind==="reply"}function M(e,s,t,o){return e==="flagged"?{to:g,params:{...t,outboxMessageId:o}}:e==="mailbox"&&s?{to:b,params:{...t,mailboxId:s,outboxMessageId:o}}:{to:I,params:{...t,outboxMessageId:o}}}function G(e,s){if(e?.kind==="reply"&&e.threadId===s.threadId&&e.sourceMessageId===s.messageId)return e.outboxMessageId}function q(){const e=d(),s=m(),{list:t,mailboxId:o}=l(),r=p();return i.useCallback((a,n)=>{e({...M(t,o,a,n===void 0?G(r,a):void 0),search:h(n),hash:s})},[e,s,t,o,r])}function H(e,s,t){if(!(!s||!t))return o=>e({threadId:s,messageId:t,mode:o})}function Q(){const e=d(),{list:s,mailboxId:t}=l(),o=p();return i.useCallback(r=>{o?.kind==="reply"&&e({...M(s,t,{threadId:o.threadId,messageId:o.sourceMessageId,mode:o.mode},r),search:h(void 0),hash:!0,replace:!0})},[e,s,t,o])}function W(){const e=d(),s=m(),{list:t,mailboxId:o}=l(),r=_();return i.useCallback(()=>{if(!r)return;const a=h(void 0),n=s,c={threadId:r.threadId,messageId:r.messageId};if(t==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:c,search:a,hash:n});return}if(t==="mailbox"&&o){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{...c,mailboxId:o},search:a,hash:n});return}e({to:"/mail/brief/$threadId/$messageId",params:c,search:a,hash:n})},[e,s,t,o,r])}export{Y as a,K as b,B as c,V as d,l as e,N as f,q as g,Q as h,W as i,p as j,j as l,X as m,H as r,k as u};
|