@arbidocs/blocks 0.5.131 → 0.5.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedCallDock-GJ4LO7I3.cjs → ConnectedCallDock-ZNS5BS2R.cjs} +28 -28
- package/dist/{ConnectedCallDock-GJ4LO7I3.cjs.map → ConnectedCallDock-ZNS5BS2R.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-SL3GMHO7.cjs → ConnectedCallRoom-ACNVSFH7.cjs} +20 -20
- package/dist/{ConnectedCallRoom-SL3GMHO7.cjs.map → ConnectedCallRoom-ACNVSFH7.cjs.map} +1 -1
- package/dist/ConnectedMailInviteCard-AJI7JZYJ.cjs +22 -0
- package/dist/{ConnectedMailInviteCard-EINB3THA.cjs.map → ConnectedMailInviteCard-AJI7JZYJ.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-OY4RTJKA.cjs → ConnectedNativeDocxComparison-H72RQJKH.cjs} +26 -26
- package/dist/{ConnectedNativeDocxComparison-OY4RTJKA.cjs.map → ConnectedNativeDocxComparison-H72RQJKH.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-5W26JTH6.cjs → ConnectedPresentation-3JXN6SRT.cjs} +24 -24
- package/dist/{ConnectedPresentation-5W26JTH6.cjs.map → ConnectedPresentation-3JXN6SRT.cjs.map} +1 -1
- package/dist/{ConnectedProductionSetDialog-4EAY6KAZ.cjs → ConnectedProductionSetDialog-EOWZQ6J3.cjs} +9 -9
- package/dist/{ConnectedProductionSetDialog-4EAY6KAZ.cjs.map → ConnectedProductionSetDialog-EOWZQ6J3.cjs.map} +1 -1
- package/dist/{ConnectedSlidesTab-YS2XRWUC.cjs → ConnectedSlidesTab-IECS2MJI.cjs} +21 -21
- package/dist/{ConnectedSlidesTab-YS2XRWUC.cjs.map → ConnectedSlidesTab-IECS2MJI.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-6Y24NJON.cjs → ConnectedStreamedWordArtifact-T7PZIRBY.cjs} +26 -26
- package/dist/{ConnectedStreamedWordArtifact-6Y24NJON.cjs.map → ConnectedStreamedWordArtifact-T7PZIRBY.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-DIUHU76E.cjs → DocumentReviewCard-EM2AJUF3.cjs} +24 -24
- package/dist/{DocumentReviewCard-DIUHU76E.cjs.map → DocumentReviewCard-EM2AJUF3.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-H6ZXLUO3.cjs → FilesViewerDialog-OA3HDLOI.cjs} +62 -62
- package/dist/{FilesViewerDialog-H6ZXLUO3.cjs.map → FilesViewerDialog-OA3HDLOI.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-2PTEK6ND.cjs → NativeDocxEditor-XZAEU5QU.cjs} +8 -8
- package/dist/{NativeDocxEditor-2PTEK6ND.cjs.map → NativeDocxEditor-XZAEU5QU.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-44555T3K.cjs → WorkspaceTableView-HMQ6PXUC.cjs} +11 -11
- package/dist/{WorkspaceTableView-44555T3K.cjs.map → WorkspaceTableView-HMQ6PXUC.cjs.map} +1 -1
- package/dist/agents/index.cjs +208 -208
- package/dist/{ai-V4X2E6Y4.cjs → ai-QEXZ4SYR.cjs} +30 -30
- package/dist/ai-QEXZ4SYR.cjs.map +1 -0
- package/dist/calls/index.cjs +148 -148
- package/dist/chat/index.cjs +30 -30
- package/dist/{chunk-PSIKUQYM.cjs → chunk-2FA7UVLG.cjs} +12 -12
- package/dist/{chunk-PSIKUQYM.cjs.map → chunk-2FA7UVLG.cjs.map} +1 -1
- package/dist/{chunk-ZYGAXD3N.cjs → chunk-2SWS7ESM.cjs} +3 -3
- package/dist/{chunk-ZYGAXD3N.cjs.map → chunk-2SWS7ESM.cjs.map} +1 -1
- package/dist/{chunk-YZ6YOOTF.cjs → chunk-32W2S6DE.cjs} +4 -4
- package/dist/{chunk-YZ6YOOTF.cjs.map → chunk-32W2S6DE.cjs.map} +1 -1
- package/dist/{chunk-IZBAWZTB.cjs → chunk-3RAW2ZH5.cjs} +8 -8
- package/dist/{chunk-IZBAWZTB.cjs.map → chunk-3RAW2ZH5.cjs.map} +1 -1
- package/dist/{chunk-MXBXZXXQ.cjs → chunk-3Y75LUCT.cjs} +4 -4
- package/dist/{chunk-MXBXZXXQ.cjs.map → chunk-3Y75LUCT.cjs.map} +1 -1
- package/dist/{chunk-PL7HUTM3.cjs → chunk-57LUHZLV.cjs} +8 -8
- package/dist/{chunk-PL7HUTM3.cjs.map → chunk-57LUHZLV.cjs.map} +1 -1
- package/dist/{chunk-ZEQE4I46.cjs → chunk-5GHGIDZP.cjs} +15 -15
- package/dist/{chunk-ZEQE4I46.cjs.map → chunk-5GHGIDZP.cjs.map} +1 -1
- package/dist/{chunk-Z4O324CO.cjs → chunk-5JK3232B.cjs} +20 -20
- package/dist/{chunk-Z4O324CO.cjs.map → chunk-5JK3232B.cjs.map} +1 -1
- package/dist/{chunk-Q6IKXWPG.cjs → chunk-64247UHS.cjs} +4 -4
- package/dist/{chunk-Q6IKXWPG.cjs.map → chunk-64247UHS.cjs.map} +1 -1
- package/dist/{chunk-PD23GDT7.cjs → chunk-6CGMSJLB.cjs} +5 -5
- package/dist/{chunk-PD23GDT7.cjs.map → chunk-6CGMSJLB.cjs.map} +1 -1
- package/dist/{chunk-VRK3IQAP.cjs → chunk-6RC6GYIW.cjs} +4 -4
- package/dist/{chunk-VRK3IQAP.cjs.map → chunk-6RC6GYIW.cjs.map} +1 -1
- package/dist/{chunk-VJCSEMXT.cjs → chunk-6THN5ZGA.cjs} +4 -4
- package/dist/{chunk-VJCSEMXT.cjs.map → chunk-6THN5ZGA.cjs.map} +1 -1
- package/dist/{chunk-ZESMRGDV.cjs → chunk-7NJKDJVO.cjs} +6 -6
- package/dist/{chunk-ZESMRGDV.cjs.map → chunk-7NJKDJVO.cjs.map} +1 -1
- package/dist/{chunk-SBWIA4PL.cjs → chunk-AGL7Z6Y2.cjs} +21 -21
- package/dist/{chunk-SBWIA4PL.cjs.map → chunk-AGL7Z6Y2.cjs.map} +1 -1
- package/dist/{chunk-BAA44UEC.cjs → chunk-BN33PC5F.cjs} +88 -88
- package/dist/{chunk-BAA44UEC.cjs.map → chunk-BN33PC5F.cjs.map} +1 -1
- package/dist/{chunk-XKCIDXMP.cjs → chunk-C5APAFUY.cjs} +229 -169
- package/dist/chunk-C5APAFUY.cjs.map +1 -0
- package/dist/{chunk-H7PHOTX2.cjs → chunk-C6RJQQLG.cjs} +10 -10
- package/dist/{chunk-H7PHOTX2.cjs.map → chunk-C6RJQQLG.cjs.map} +1 -1
- package/dist/{chunk-HQDR43JC.cjs → chunk-CENMN32L.cjs} +6 -6
- package/dist/{chunk-HQDR43JC.cjs.map → chunk-CENMN32L.cjs.map} +1 -1
- package/dist/{chunk-ULWRNGGE.cjs → chunk-CVPV4I7Z.cjs} +4 -3
- package/dist/chunk-CVPV4I7Z.cjs.map +1 -0
- package/dist/{chunk-QECKDZ47.cjs → chunk-CYN66TBO.cjs} +3 -3
- package/dist/chunk-CYN66TBO.cjs.map +1 -0
- package/dist/{chunk-B3BZ6MNI.cjs → chunk-DGAGSP5G.cjs} +6 -6
- package/dist/{chunk-B3BZ6MNI.cjs.map → chunk-DGAGSP5G.cjs.map} +1 -1
- package/dist/{chunk-Q6DQGGP4.cjs → chunk-ECSOXKJQ.cjs} +6 -6
- package/dist/{chunk-Q6DQGGP4.cjs.map → chunk-ECSOXKJQ.cjs.map} +1 -1
- package/dist/{chunk-GNZAH6UI.cjs → chunk-ETMSINQS.cjs} +6 -6
- package/dist/{chunk-GNZAH6UI.cjs.map → chunk-ETMSINQS.cjs.map} +1 -1
- package/dist/{chunk-2W5E62EY.cjs → chunk-EYXU32D7.cjs} +6 -6
- package/dist/{chunk-2W5E62EY.cjs.map → chunk-EYXU32D7.cjs.map} +1 -1
- package/dist/{chunk-UZHWXKS6.cjs → chunk-F6F375V7.cjs} +7 -7
- package/dist/{chunk-UZHWXKS6.cjs.map → chunk-F6F375V7.cjs.map} +1 -1
- package/dist/{chunk-JQLWKNJO.cjs → chunk-FYFL3CET.cjs} +26 -26
- package/dist/{chunk-JQLWKNJO.cjs.map → chunk-FYFL3CET.cjs.map} +1 -1
- package/dist/{chunk-NZN7SK4W.cjs → chunk-IFJBE7M5.cjs} +11 -11
- package/dist/{chunk-NZN7SK4W.cjs.map → chunk-IFJBE7M5.cjs.map} +1 -1
- package/dist/{chunk-SHPETTGW.cjs → chunk-IN3KXI3K.cjs} +6 -6
- package/dist/{chunk-SHPETTGW.cjs.map → chunk-IN3KXI3K.cjs.map} +1 -1
- package/dist/{chunk-RYVZDFVO.cjs → chunk-JJZOL5MG.cjs} +3 -3
- package/dist/{chunk-RYVZDFVO.cjs.map → chunk-JJZOL5MG.cjs.map} +1 -1
- package/dist/{chunk-4RBQ44RY.cjs → chunk-JYZ6UE5X.cjs} +28 -28
- package/dist/{chunk-4RBQ44RY.cjs.map → chunk-JYZ6UE5X.cjs.map} +1 -1
- package/dist/{chunk-QMIHLJMH.cjs → chunk-JZQ47OW5.cjs} +6 -6
- package/dist/{chunk-QMIHLJMH.cjs.map → chunk-JZQ47OW5.cjs.map} +1 -1
- package/dist/{chunk-VWTOIGX4.cjs → chunk-K3ZZ6IH3.cjs} +4 -4
- package/dist/{chunk-VWTOIGX4.cjs.map → chunk-K3ZZ6IH3.cjs.map} +1 -1
- package/dist/chunk-KWD5Q4XH.cjs +18 -0
- package/dist/{chunk-KAR326FU.cjs.map → chunk-KWD5Q4XH.cjs.map} +1 -1
- package/dist/{chunk-ESVRVZ53.cjs → chunk-L4Y6UMRC.cjs} +5 -5
- package/dist/{chunk-ESVRVZ53.cjs.map → chunk-L4Y6UMRC.cjs.map} +1 -1
- package/dist/{chunk-UXBFXF26.cjs → chunk-LFMOQALU.cjs} +76 -76
- package/dist/{chunk-UXBFXF26.cjs.map → chunk-LFMOQALU.cjs.map} +1 -1
- package/dist/{chunk-TKHCIHE2.cjs → chunk-LIKDQBNJ.cjs} +7 -7
- package/dist/{chunk-TKHCIHE2.cjs.map → chunk-LIKDQBNJ.cjs.map} +1 -1
- package/dist/{chunk-734NPQNR.cjs → chunk-LLD4PNBW.cjs} +4 -4
- package/dist/{chunk-734NPQNR.cjs.map → chunk-LLD4PNBW.cjs.map} +1 -1
- package/dist/{chunk-A2YUBDCO.cjs → chunk-MEYQLQWS.cjs} +13 -13
- package/dist/{chunk-A2YUBDCO.cjs.map → chunk-MEYQLQWS.cjs.map} +1 -1
- package/dist/{chunk-H4ID6S4P.cjs → chunk-MSJGEZHL.cjs} +6 -6
- package/dist/{chunk-H4ID6S4P.cjs.map → chunk-MSJGEZHL.cjs.map} +1 -1
- package/dist/{chunk-ORELHENJ.cjs → chunk-NZNBJF3M.cjs} +12 -2
- package/dist/chunk-NZNBJF3M.cjs.map +1 -0
- package/dist/{chunk-P5AQYC4D.cjs → chunk-OA3AN6WW.cjs} +4 -4
- package/dist/{chunk-P5AQYC4D.cjs.map → chunk-OA3AN6WW.cjs.map} +1 -1
- package/dist/{chunk-A6GBPE5E.cjs → chunk-OOHBXCDV.cjs} +5 -5
- package/dist/{chunk-A6GBPE5E.cjs.map → chunk-OOHBXCDV.cjs.map} +1 -1
- package/dist/{chunk-R7IA2F2G.cjs → chunk-OOW7H2YD.cjs} +14 -14
- package/dist/{chunk-R7IA2F2G.cjs.map → chunk-OOW7H2YD.cjs.map} +1 -1
- package/dist/{chunk-JV5TVUOU.cjs → chunk-OUGRCQM7.cjs} +4 -4
- package/dist/{chunk-JV5TVUOU.cjs.map → chunk-OUGRCQM7.cjs.map} +1 -1
- package/dist/{chunk-JH6JTI76.cjs → chunk-OUYBYZ7Y.cjs} +6 -6
- package/dist/{chunk-JH6JTI76.cjs.map → chunk-OUYBYZ7Y.cjs.map} +1 -1
- package/dist/{chunk-TXP2N3DC.cjs → chunk-P7VUIW24.cjs} +6 -6
- package/dist/{chunk-TXP2N3DC.cjs.map → chunk-P7VUIW24.cjs.map} +1 -1
- package/dist/{chunk-TW4RV3QK.cjs → chunk-R5NTEW4L.cjs} +33 -33
- package/dist/{chunk-TW4RV3QK.cjs.map → chunk-R5NTEW4L.cjs.map} +1 -1
- package/dist/{chunk-6NT377PS.cjs → chunk-RSQGDXAF.cjs} +9 -9
- package/dist/{chunk-6NT377PS.cjs.map → chunk-RSQGDXAF.cjs.map} +1 -1
- package/dist/{chunk-AFG7YCCJ.cjs → chunk-RZSBHRQL.cjs} +73 -73
- package/dist/{chunk-AFG7YCCJ.cjs.map → chunk-RZSBHRQL.cjs.map} +1 -1
- package/dist/{chunk-YVCOQHCE.cjs → chunk-S5OGPQSB.cjs} +5 -5
- package/dist/{chunk-YVCOQHCE.cjs.map → chunk-S5OGPQSB.cjs.map} +1 -1
- package/dist/{chunk-ULPTSXXO.cjs → chunk-SD7GUB44.cjs} +4 -4
- package/dist/{chunk-ULPTSXXO.cjs.map → chunk-SD7GUB44.cjs.map} +1 -1
- package/dist/{chunk-CNLIXB6S.cjs → chunk-SK6LFIU2.cjs} +11 -11
- package/dist/{chunk-CNLIXB6S.cjs.map → chunk-SK6LFIU2.cjs.map} +1 -1
- package/dist/{chunk-23I5EUZA.cjs → chunk-T2DUNNYY.cjs} +4 -4
- package/dist/{chunk-23I5EUZA.cjs.map → chunk-T2DUNNYY.cjs.map} +1 -1
- package/dist/{chunk-E3Y7RI3J.cjs → chunk-T6WA6S5T.cjs} +4 -4
- package/dist/{chunk-E3Y7RI3J.cjs.map → chunk-T6WA6S5T.cjs.map} +1 -1
- package/dist/{chunk-KUVGR5KE.cjs → chunk-TENWM7BH.cjs} +10 -13
- package/dist/chunk-TENWM7BH.cjs.map +1 -0
- package/dist/{chunk-SZCDYKS4.cjs → chunk-TOYKBRAU.cjs} +15 -15
- package/dist/{chunk-SZCDYKS4.cjs.map → chunk-TOYKBRAU.cjs.map} +1 -1
- package/dist/{chunk-GKMUXI4V.cjs → chunk-TXBXIUTX.cjs} +8 -8
- package/dist/{chunk-GKMUXI4V.cjs.map → chunk-TXBXIUTX.cjs.map} +1 -1
- package/dist/{chunk-H5OLHP2U.cjs → chunk-U6XMZG6G.cjs} +5 -5
- package/dist/{chunk-H5OLHP2U.cjs.map → chunk-U6XMZG6G.cjs.map} +1 -1
- package/dist/{chunk-4EK7TAP7.cjs → chunk-UOI6JJPG.cjs} +5 -5
- package/dist/{chunk-4EK7TAP7.cjs.map → chunk-UOI6JJPG.cjs.map} +1 -1
- package/dist/{chunk-XX5SH4WE.cjs → chunk-UOZ237OW.cjs} +26 -26
- package/dist/{chunk-XX5SH4WE.cjs.map → chunk-UOZ237OW.cjs.map} +1 -1
- package/dist/{chunk-QYX2U7TI.cjs → chunk-UWTCK5IN.cjs} +14 -14
- package/dist/{chunk-QYX2U7TI.cjs.map → chunk-UWTCK5IN.cjs.map} +1 -1
- package/dist/{chunk-PASJI6JZ.cjs → chunk-V6SFJ44C.cjs} +104 -104
- package/dist/{chunk-PASJI6JZ.cjs.map → chunk-V6SFJ44C.cjs.map} +1 -1
- package/dist/{chunk-4NPCDS2X.cjs → chunk-VCDD763Y.cjs} +4 -4
- package/dist/{chunk-4NPCDS2X.cjs.map → chunk-VCDD763Y.cjs.map} +1 -1
- package/dist/{chunk-4VZZWYEC.cjs → chunk-VF26CUE3.cjs} +29 -29
- package/dist/{chunk-4VZZWYEC.cjs.map → chunk-VF26CUE3.cjs.map} +1 -1
- package/dist/{chunk-BVAT4EVC.cjs → chunk-VIUEPJ3Y.cjs} +42 -42
- package/dist/{chunk-BVAT4EVC.cjs.map → chunk-VIUEPJ3Y.cjs.map} +1 -1
- package/dist/{chunk-W6B3RYTX.cjs → chunk-VPKKPHJY.cjs} +4 -4
- package/dist/{chunk-W6B3RYTX.cjs.map → chunk-VPKKPHJY.cjs.map} +1 -1
- package/dist/{chunk-CMGNRMPA.cjs → chunk-WNAZM2YS.cjs} +4 -4
- package/dist/{chunk-CMGNRMPA.cjs.map → chunk-WNAZM2YS.cjs.map} +1 -1
- package/dist/{chunk-IIYG542W.cjs → chunk-X46QYO4S.cjs} +4 -4
- package/dist/{chunk-IIYG542W.cjs.map → chunk-X46QYO4S.cjs.map} +1 -1
- package/dist/{chunk-5SKHK3BG.cjs → chunk-XZMYSDU4.cjs} +4 -4
- package/dist/{chunk-5SKHK3BG.cjs.map → chunk-XZMYSDU4.cjs.map} +1 -1
- package/dist/{chunk-JR2YSBD5.cjs → chunk-YKOPKLYP.cjs} +6 -6
- package/dist/{chunk-JR2YSBD5.cjs.map → chunk-YKOPKLYP.cjs.map} +1 -1
- package/dist/{chunk-JDFBEGQO.cjs → chunk-YZBDHBKI.cjs} +7 -7
- package/dist/chunk-YZBDHBKI.cjs.map +1 -0
- package/dist/{chunk-GNX3FBBX.cjs → chunk-ZM6B5WJW.cjs} +4 -4
- package/dist/{chunk-GNX3FBBX.cjs.map → chunk-ZM6B5WJW.cjs.map} +1 -1
- package/dist/{chunk-5UYFLFNR.cjs → chunk-ZOU6K6DD.cjs} +4 -4
- package/dist/{chunk-5UYFLFNR.cjs.map → chunk-ZOU6K6DD.cjs.map} +1 -1
- package/dist/{chunk-MEZ7WSW3.cjs → chunk-ZTHYJP4G.cjs} +21 -21
- package/dist/{chunk-MEZ7WSW3.cjs.map → chunk-ZTHYJP4G.cjs.map} +1 -1
- package/dist/citations/index.cjs +10 -10
- package/dist/collaboration/index.cjs +70 -70
- package/dist/components/UsageMeter.d.ts +2 -0
- package/dist/components/UsageMeter.js +10 -0
- package/dist/components/UsageMeter.js.map +2 -2
- package/dist/connect/docx.cjs +30 -30
- package/dist/connect/index.cjs +3247 -2479
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +47 -47
- package/dist/connection/billing/AddAddonDialog.js +1 -1
- package/dist/connection/billing/AddAddonDialog.js.map +2 -2
- package/dist/connection/billing/BillingCard.d.ts +1 -1
- package/dist/connection/billing/BillingCard.js.map +1 -1
- package/dist/connection/billing/ChangePlanDialog.d.ts +1 -1
- package/dist/connection/billing/ChangePlanDialog.js +2 -5
- package/dist/connection/billing/ChangePlanDialog.js.map +2 -2
- package/dist/connection/billing/ChangeProPlan.js +2 -2
- package/dist/connection/billing/ChangeProPlan.js.map +2 -2
- package/dist/connection/billing/CollaboratorPlan.d.ts +2 -1
- package/dist/connection/billing/CollaboratorPlan.js +115 -52
- package/dist/connection/billing/CollaboratorPlan.js.map +2 -2
- package/dist/connection/billing/ConnectedSubscriptionSetup.d.ts +1 -0
- package/dist/connection/billing/ConnectedSubscriptionSetup.js +198 -0
- package/dist/connection/billing/ConnectedSubscriptionSetup.js.map +7 -0
- package/dist/connection/billing/ConnectedWelcomeDialog.d.ts +3 -13
- package/dist/connection/billing/ConnectedWelcomeDialog.js +26 -30
- package/dist/connection/billing/ConnectedWelcomeDialog.js.map +2 -2
- package/dist/connection/billing/InvoicesModal.js +2 -2
- package/dist/connection/billing/InvoicesModal.js.map +1 -1
- package/dist/connection/billing/ManualSubscriptionAdjustments.d.ts +12 -0
- package/dist/connection/billing/ManualSubscriptionAdjustments.js +424 -0
- package/dist/connection/billing/ManualSubscriptionAdjustments.js.map +7 -0
- package/dist/connection/billing/MonthlySpendCap.d.ts +3 -1
- package/dist/connection/billing/MonthlySpendCap.js +11 -7
- package/dist/connection/billing/MonthlySpendCap.js.map +2 -2
- package/dist/connection/billing/NewProjectFlow.d.ts +4 -1
- package/dist/connection/billing/NewProjectFlow.js +44 -37
- package/dist/connection/billing/NewProjectFlow.js.map +2 -2
- package/dist/connection/billing/PlanChangeLines.d.ts +1 -1
- package/dist/connection/billing/PlanChangeLines.js.map +1 -1
- package/dist/connection/billing/ProjectBilling.d.ts +3 -3
- package/dist/connection/billing/ProjectBilling.js +2 -2
- package/dist/connection/billing/ProjectBilling.js.map +2 -2
- package/dist/connection/billing/ProjectDetail.js +17 -2
- package/dist/connection/billing/ProjectDetail.js.map +2 -2
- package/dist/connection/billing/ProjectPurchaseOptions.d.ts +2 -14
- package/dist/connection/billing/ProjectPurchaseOptions.js +289 -440
- package/dist/connection/billing/ProjectPurchaseOptions.js.map +2 -2
- package/dist/connection/billing/ProjectUsageCard.js +4 -4
- package/dist/connection/billing/ProjectUsageCard.js.map +2 -2
- package/dist/connection/billing/SharedProjects.js +1 -1
- package/dist/connection/billing/SharedProjects.js.map +1 -1
- package/dist/connection/billing/StripeCheckoutModal.d.ts +2 -1
- package/dist/connection/billing/StripeCheckoutModal.js +20 -4
- package/dist/connection/billing/StripeCheckoutModal.js.map +2 -2
- package/dist/connection/billing/SubscriptionIntervalToggle.d.ts +9 -0
- package/dist/connection/billing/SubscriptionIntervalToggle.js +40 -0
- package/dist/connection/billing/SubscriptionIntervalToggle.js.map +7 -0
- package/dist/connection/billing/SubscriptionPlans.d.ts +3 -4
- package/dist/connection/billing/SubscriptionPlans.js +35 -112
- package/dist/connection/billing/SubscriptionPlans.js.map +2 -2
- package/dist/connection/billing/SubscriptionSetupDialog.d.ts +26 -0
- package/dist/connection/billing/SubscriptionSetupDialog.js +248 -0
- package/dist/connection/billing/SubscriptionSetupDialog.js.map +7 -0
- package/dist/connection/billing/addon-pricing.d.ts +2 -2
- package/dist/connection/billing/addon-pricing.js +2 -2
- package/dist/connection/billing/addon-pricing.js.map +1 -1
- package/dist/connection/billing/plan-pricing.d.ts +2 -2
- package/dist/connection/billing/plan-pricing.js +1 -1
- package/dist/connection/billing/plan-pricing.js.map +2 -2
- package/dist/connection/command/ConnectedCommandPalette.js +2 -0
- package/dist/connection/command/ConnectedCommandPalette.js.map +2 -2
- package/dist/connection/command/actions.js +1 -1
- package/dist/connection/command/actions.js.map +2 -2
- package/dist/connection/contacts/ConnectedWelcomeInvitations.js +11 -11
- package/dist/connection/contacts/ConnectedWelcomeInvitations.js.map +2 -2
- package/dist/connection/conversation/ConnectedConversationPage.js +1 -1
- package/dist/connection/conversation/ConnectedConversationPage.js.map +2 -2
- package/dist/connection/dialogs/ConnectedGlobalDialogs.js +9 -5
- package/dist/connection/dialogs/ConnectedGlobalDialogs.js.map +2 -2
- package/dist/connection/export/ConnectedExportPanel.js +1 -1
- package/dist/connection/export/ConnectedExportPanel.js.map +2 -2
- package/dist/connection/files/page/DocumentsUploadButton.js +1 -1
- package/dist/connection/files/page/DocumentsUploadButton.js.map +2 -2
- package/dist/connection/projects/ConnectedProjectsPanel.js +17 -5
- package/dist/connection/projects/ConnectedProjectsPanel.js.map +2 -2
- package/dist/connection/runtime/usePaymentReturn.js +62 -18
- package/dist/connection/runtime/usePaymentReturn.js.map +3 -3
- package/dist/connection/sharing/WorkspaceMembersList.js.map +1 -1
- package/dist/connection/shell/ConnectedWorkspaceSwitcher.js +3 -3
- package/dist/connection/shell/ConnectedWorkspaceSwitcher.js.map +2 -2
- package/dist/connection/workspace-access/ConnectedGrantWorkspaceAccessDialog.d.ts +1 -1
- package/dist/connection/workspace-access/ConnectedGrantWorkspaceAccessDialog.js.map +1 -1
- package/dist/connection/workspace-form/ConnectedWorkspaceFormModal.js +2 -2
- package/dist/connection/workspace-form/ConnectedWorkspaceFormModal.js.map +2 -2
- package/dist/connection/workspace-list/ConnectedWorkspaceList.js +1 -1
- package/dist/connection/workspace-list/ConnectedWorkspaceList.js.map +2 -2
- package/dist/connection/workspace-list/WorkspaceCardsView.js +1 -1
- package/dist/connection/workspace-list/WorkspaceCardsView.js.map +1 -1
- package/dist/connection/workspace-list/projectBilling.d.ts +1 -1
- package/dist/connection/workspace-list/projectBilling.js.map +1 -1
- package/dist/connection/workspace-list/useConnectedWorkspaceList.d.ts +3 -1
- package/dist/connection/workspace-list/useConnectedWorkspaceList.js +4 -4
- package/dist/connection/workspace-list/useConnectedWorkspaceList.js.map +2 -2
- package/dist/dashboards/index.cjs +25 -25
- package/dist/document-tools/index.cjs +26 -26
- package/dist/document-tools/viewer/SignatureRequestEditor.js +1 -1
- package/dist/document-tools/viewer/SignatureRequestEditor.js.map +2 -2
- package/dist/document-tools/viewer/index.cjs +12 -12
- package/dist/document-tools/viewer/index.cjs.map +1 -1
- package/dist/docx/index.cjs +40 -40
- package/dist/embed/index.cjs +49 -49
- package/dist/facts/index.cjs +46 -46
- package/dist/files/index.cjs +227 -227
- package/dist/home/index.cjs +34 -34
- package/dist/index.cjs +1549 -1549
- package/dist/index.cjs.map +1 -1
- package/dist/nav/actions.d.ts +2 -0
- package/dist/nav/actions.js.map +2 -2
- package/dist/provider/dialog-registry.d.ts +4 -0
- package/dist/provider/dialog-registry.js.map +2 -2
- package/dist/retrieval/index.cjs +6 -6
- package/dist/settings/Billing.d.ts +1 -1
- package/dist/settings/Billing.js.map +1 -1
- package/dist/settings/IdentityVerification.js +3 -3
- package/dist/settings/IdentityVerification.js.map +2 -2
- package/dist/settings/ModalScaffold.d.ts +3 -1
- package/dist/settings/ModalScaffold.js +2 -1
- package/dist/settings/ModalScaffold.js.map +2 -2
- package/dist/settings/PanelFrame.d.ts +3 -1
- package/dist/settings/PanelFrame.js +3 -2
- package/dist/settings/PanelFrame.js.map +2 -2
- package/dist/settings/PlanCard.d.ts +1 -1
- package/dist/settings/PlanCard.js +2 -2
- package/dist/settings/PlanCard.js.map +1 -1
- package/dist/settings/SubscriptionParts.js +1 -1
- package/dist/settings/SubscriptionParts.js.map +1 -1
- package/dist/settings/WelcomeDialog.d.ts +7 -3
- package/dist/settings/WelcomeDialog.js +194 -135
- package/dist/settings/WelcomeDialog.js.map +2 -2
- package/dist/settings/index.cjs +156 -156
- package/dist/shell/index.cjs +81 -81
- package/dist/studio/index.cjs +44 -44
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/index.cjs +65 -65
- package/dist/workspaces/WorkspaceGroup.d.ts +1 -1
- package/dist/workspaces/WorkspaceGroup.js.map +1 -1
- package/dist/workspaces/index.cjs +33 -33
- package/dist/workspaces/workspace-roles.d.ts +2 -2
- package/dist/workspaces/workspace-roles.js +1 -1
- package/dist/workspaces/workspace-roles.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/src/connection/billing/project-purchase.css +362 -9
- package/dist/ConnectedMailInviteCard-EINB3THA.cjs +0 -22
- package/dist/ai-V4X2E6Y4.cjs.map +0 -1
- package/dist/chunk-JDFBEGQO.cjs.map +0 -1
- package/dist/chunk-KAR326FU.cjs +0 -18
- package/dist/chunk-KUVGR5KE.cjs.map +0 -1
- package/dist/chunk-ORELHENJ.cjs.map +0 -1
- package/dist/chunk-QECKDZ47.cjs.map +0 -1
- package/dist/chunk-ULWRNGGE.cjs.map +0 -1
- package/dist/chunk-XKCIDXMP.cjs.map +0 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/OpenConversationButton.tsx","../src/nav/actions.ts","../src/nav/manifest.ts"],"names":["hrefFor","useBlocksEnvironment","jsxs","ActionLink","cn","buttonVariants","jsx","MessagesSquare","createElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,SAAS,sBAAA,CAAuB;AAAA,EACrC,cAAA;AAAA,EACA,WAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA,GAAQ,gBAAA;AAAA,EACR,SAAA;AAAA,EACA;AACF,CAAA,EAAgC;AAC9B,EAAA,MAAM,EAAE,OAAA,EAAAA,QAAAA,EAAS,gBAAA,KAAqBC,sCAAA,EAAqB;AAC3D,EAAA,IAAI,CAAC,gBAAgB,OAAO,IAAA;AAC5B,EAAA,uBACEC,eAAA;AAAA,IAACC,4BAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAMH,SAAQ,EAAE,IAAA,EAAM,gBAAgB,cAAA,EAAgB,WAAA,EAAa,WAAW,CAAA;AAAA,MAC9E,QAAA,EAAU,MACR,gBAAA,CAAiB,cAAA,EAAgB;AAAA,QAC/B,GAAI,SAAA,IAAa,EAAE,SAAA,EAAU;AAAA,QAC7B,GAAI,WAAA,IAAe,EAAE,WAAA;AAAY,OAClC,CAAA;AAAA,MAEH,SAAA,EAAWI,KAAA,CAAGC,iBAAA,CAAe,EAAE,OAAA,EAAS,WAAW,IAAA,EAAM,IAAA,EAAM,CAAA,EAAG,SAAS,CAAA;AAAA,MAC3E,aAAA,EAAa,MAAA;AAAA,MAEb,QAAA,EAAA;AAAA,wBAAAC,cAAA,CAACC,0BAAA,EAAA,EAAe,SAAA,EAAU,UAAA,EAAW,aAAA,EAAW,IAAA,EAAC,CAAA;AAAA,QAChD;AAAA;AAAA;AAAA,GACH;AAEJ;;;
|
|
1
|
+
{"version":3,"sources":["../src/components/OpenConversationButton.tsx","../src/nav/actions.ts","../src/nav/manifest.ts"],"names":["hrefFor","useBlocksEnvironment","jsxs","ActionLink","cn","buttonVariants","jsx","MessagesSquare","createElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,SAAS,sBAAA,CAAuB;AAAA,EACrC,cAAA;AAAA,EACA,WAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA,GAAQ,gBAAA;AAAA,EACR,SAAA;AAAA,EACA;AACF,CAAA,EAAgC;AAC9B,EAAA,MAAM,EAAE,OAAA,EAAAA,QAAAA,EAAS,gBAAA,KAAqBC,sCAAA,EAAqB;AAC3D,EAAA,IAAI,CAAC,gBAAgB,OAAO,IAAA;AAC5B,EAAA,uBACEC,eAAA;AAAA,IAACC,4BAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAMH,SAAQ,EAAE,IAAA,EAAM,gBAAgB,cAAA,EAAgB,WAAA,EAAa,WAAW,CAAA;AAAA,MAC9E,QAAA,EAAU,MACR,gBAAA,CAAiB,cAAA,EAAgB;AAAA,QAC/B,GAAI,SAAA,IAAa,EAAE,SAAA,EAAU;AAAA,QAC7B,GAAI,WAAA,IAAe,EAAE,WAAA;AAAY,OAClC,CAAA;AAAA,MAEH,SAAA,EAAWI,KAAA,CAAGC,iBAA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;AACzD,EAAA,OAAO;AAAA,IACL,QAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAQ,OAAA,EAIM;AACZ,MAAA,OAAO,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,MAAU;AAAA,QAC1B,IAAI,IAAA,CAAK,EAAA;AAAA,QACT,OAAO,IAAA,CAAK,KAAA;AAAA,QACZ,MAAMC,mBAAA,CAAc,IAAA,CAAK,MAAM,EAAE,SAAA,EAAW,UAAU,CAAA;AAAA,QACtD,GAAG,OAAA,CAAQ,SAAA,GAAY,IAAI,CAAA;AAAA,QAC3B,UAAU,MAAM;AACd,UAAA,OAAA,CAAQ,cAAA,IAAiB;AACzB,UAAA,OAAA,CAAQ,WAAW,IAAI,CAAA;AAAA,QACzB;AAAA,OACF,CAAE,CAAA;AAAA,IACJ;AAAA,GACF;AACF","file":"index.cjs","sourcesContent":["import { MessagesSquare } from 'lucide-react'\nimport { buttonVariants, cn } from '@arbidocs/react/ui'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { ActionLink } from './ActionLink'\n\nexport interface OpenConversationButtonProps {\n /** The conversation behind an AI result; none: nothing is rendered. */\n conversationId: string | null | undefined\n /** The workspace it is in, for its link. */\n workspaceId?: string | null\n /** A message to scroll to. */\n messageId?: string\n /** Default \"Open in thread\". */\n label?: string\n className?: string\n testId?: string\n}\n\n/**\n * \"Open in thread\": the full conversation behind an AI result (a brief, a translation, a draft),\n * to check its sources and follow up. A real link where the host gives one (`hrefFor`), opened with\n * `openConversation`.\n */\nexport function OpenConversationButton({\n conversationId,\n workspaceId,\n messageId,\n label = 'Open in thread',\n className,\n testId,\n}: OpenConversationButtonProps) {\n const { hrefFor, openConversation } = useBlocksEnvironment()\n if (!conversationId) return null\n return (\n <ActionLink\n href={hrefFor({ kind: 'conversation', conversationId, workspaceId, messageId })}\n onSelect={() =>\n openConversation(conversationId, {\n ...(messageId && { messageId }),\n ...(workspaceId && { workspaceId }),\n })\n }\n className={cn(buttonVariants({ variant: 'outline', size: 'sm' }), className)}\n data-testid={testId}\n >\n <MessagesSquare className=\"size-3.5\" aria-hidden />\n {label}\n </ActionLink>\n )\n}\n","import type { ArbiFeature } from '@arbidocs/react'\n\n/** Who is asking, for an action's `available` (the same gates the primary UI applies). */\nexport interface ActionContext {\n /** The open workspace; `null` outside one. */\n workspaceId: string | null\n /** The viewer is a member of the open workspace. */\n isMember: boolean\n /** The viewer's role there (`owner`, `collaborator`, `guest`); `null` when not a member. */\n role: string | null\n /** A temporary-access (external) account. */\n isTemporaryAccess: boolean\n /** Whether the account may create projects; `undefined` until known. */\n canCreateProjects: boolean | undefined\n /** Whether the account may create workspaces (in projects it owns); `undefined` until known. */\n canCreateWorkspaces?: boolean | undefined\n isFeatureOn: (feature: ArbiFeature) => boolean\n}\n\n/** A parameter-light action, supplied by a host and usable outside React. */\nexport interface ActionDefinition<Id extends string = string> {\n id: Id\n label: string\n category: string\n /**\n * An icon name, so the catalogue stays independent of a renderer. The palette draws the lucide\n * icons its catalogue names (`connection/command/icons.ts`); any other name, a generic glyph.\n */\n icon: string\n keywords?: readonly string[]\n /** Offered (in the command palette) only when it says so. Dispatch is not gated. */\n available?: (context: ActionContext) => boolean\n /** `false`: dispatch only, never listed (a second name for another row's effect). */\n listed?: boolean\n run: () => void\n}\n\n/** One catalogue for picker options, tip CTAs, palettes and validated remote dispatch. */\nexport function defineActions<Id extends string, Action extends ActionDefinition<Id>>(\n actions: Partial<Record<Id, Action>>,\n options: { scopedIds?: readonly Id[]; onUnknown?: (id: Id) => void } = {}\n) {\n const scoped = new Set<string>(options.scopedIds)\n return {\n actions,\n options: (Object.values(actions) as Action[]).map(({ id, label, category }) => ({\n value: id,\n label,\n category,\n })),\n isActionId(value: string): value is Id {\n return scoped.has(value) || Object.prototype.hasOwnProperty.call(actions, value)\n },\n run(id: Id): void {\n const action = Object.prototype.hasOwnProperty.call(actions, id) ? actions[id] : undefined\n if (action) action.run()\n else options.onUnknown?.(id)\n },\n }\n}\n","import { createElement } from 'react'\nimport type { AppNavItem, AppNavSection } from './types'\nimport type { NavItem } from '../shell/types'\n\n/**\n * A host's destinations, once: the items are also the command palette's nav contract. Resolve\n * their state and handlers for ShellSidebar or MobileTabBar without copying the catalogue.\n */\nexport function defineNavigation(sections: readonly AppNavSection[]) {\n const items = sections.flatMap((section) => section.items)\n return {\n sections,\n items,\n resolve(options: {\n beforeNavigate?: () => void\n onNavigate: (item: AppNavItem) => void\n itemProps?: (item: AppNavItem) => Partial<Omit<NavItem, 'id' | 'label' | 'onSelect'>>\n }): NavItem[] {\n return items.map((item) => ({\n id: item.id,\n label: item.label,\n icon: createElement(item.icon, { className: 'size-5' }),\n ...options.itemProps?.(item),\n onSelect: () => {\n options.beforeNavigate?.()\n options.onNavigate(item)\n },\n }))\n },\n }\n}\n"]}
|
package/dist/nav/actions.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export interface ActionContext {
|
|
|
11
11
|
isTemporaryAccess: boolean;
|
|
12
12
|
/** Whether the account may create projects; `undefined` until known. */
|
|
13
13
|
canCreateProjects: boolean | undefined;
|
|
14
|
+
/** Whether the account may create workspaces (in projects it owns); `undefined` until known. */
|
|
15
|
+
canCreateWorkspaces?: boolean | undefined;
|
|
14
16
|
isFeatureOn: (feature: ArbiFeature) => boolean;
|
|
15
17
|
}
|
|
16
18
|
/** A parameter-light action, supplied by a host and usable outside React. */
|
package/dist/nav/actions.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/nav/actions.ts"],
|
|
4
|
-
"sourcesContent": ["import type { ArbiFeature } from '@arbidocs/react'\n\n/** Who is asking, for an action's `available` (the same gates the primary UI applies). */\nexport interface ActionContext {\n /** The open workspace; `null` outside one. */\n workspaceId: string | null\n /** The viewer is a member of the open workspace. */\n isMember: boolean\n /** The viewer's role there (`owner`, `collaborator`, `guest`); `null` when not a member. */\n role: string | null\n /** A temporary-access (external) account. */\n isTemporaryAccess: boolean\n /** Whether the account may create projects; `undefined` until known. */\n canCreateProjects: boolean | undefined\n isFeatureOn: (feature: ArbiFeature) => boolean\n}\n\n/** A parameter-light action, supplied by a host and usable outside React. */\nexport interface ActionDefinition<Id extends string = string> {\n id: Id\n label: string\n category: string\n /**\n * An icon name, so the catalogue stays independent of a renderer. The palette draws the lucide\n * icons its catalogue names (`connection/command/icons.ts`); any other name, a generic glyph.\n */\n icon: string\n keywords?: readonly string[]\n /** Offered (in the command palette) only when it says so. Dispatch is not gated. */\n available?: (context: ActionContext) => boolean\n /** `false`: dispatch only, never listed (a second name for another row's effect). */\n listed?: boolean\n run: () => void\n}\n\n/** One catalogue for picker options, tip CTAs, palettes and validated remote dispatch. */\nexport function defineActions<Id extends string, Action extends ActionDefinition<Id>>(\n actions: Partial<Record<Id, Action>>,\n options: { scopedIds?: readonly Id[]; onUnknown?: (id: Id) => void } = {}\n) {\n const scoped = new Set<string>(options.scopedIds)\n return {\n actions,\n options: (Object.values(actions) as Action[]).map(({ id, label, category }) => ({\n value: id,\n label,\n category,\n })),\n isActionId(value: string): value is Id {\n return scoped.has(value) || Object.prototype.hasOwnProperty.call(actions, value)\n },\n run(id: Id): void {\n const action = Object.prototype.hasOwnProperty.call(actions, id) ? actions[id] : undefined\n if (action) action.run()\n else options.onUnknown?.(id)\n },\n }\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["import type { ArbiFeature } from '@arbidocs/react'\n\n/** Who is asking, for an action's `available` (the same gates the primary UI applies). */\nexport interface ActionContext {\n /** The open workspace; `null` outside one. */\n workspaceId: string | null\n /** The viewer is a member of the open workspace. */\n isMember: boolean\n /** The viewer's role there (`owner`, `collaborator`, `guest`); `null` when not a member. */\n role: string | null\n /** A temporary-access (external) account. */\n isTemporaryAccess: boolean\n /** Whether the account may create projects; `undefined` until known. */\n canCreateProjects: boolean | undefined\n /** Whether the account may create workspaces (in projects it owns); `undefined` until known. */\n canCreateWorkspaces?: boolean | undefined\n isFeatureOn: (feature: ArbiFeature) => boolean\n}\n\n/** A parameter-light action, supplied by a host and usable outside React. */\nexport interface ActionDefinition<Id extends string = string> {\n id: Id\n label: string\n category: string\n /**\n * An icon name, so the catalogue stays independent of a renderer. The palette draws the lucide\n * icons its catalogue names (`connection/command/icons.ts`); any other name, a generic glyph.\n */\n icon: string\n keywords?: readonly string[]\n /** Offered (in the command palette) only when it says so. Dispatch is not gated. */\n available?: (context: ActionContext) => boolean\n /** `false`: dispatch only, never listed (a second name for another row's effect). */\n listed?: boolean\n run: () => void\n}\n\n/** One catalogue for picker options, tip CTAs, palettes and validated remote dispatch. */\nexport function defineActions<Id extends string, Action extends ActionDefinition<Id>>(\n actions: Partial<Record<Id, Action>>,\n options: { scopedIds?: readonly Id[]; onUnknown?: (id: Id) => void } = {}\n) {\n const scoped = new Set<string>(options.scopedIds)\n return {\n actions,\n options: (Object.values(actions) as Action[]).map(({ id, label, category }) => ({\n value: id,\n label,\n category,\n })),\n isActionId(value: string): value is Id {\n return scoped.has(value) || Object.prototype.hasOwnProperty.call(actions, value)\n },\n run(id: Id): void {\n const action = Object.prototype.hasOwnProperty.call(actions, id) ? actions[id] : undefined\n if (action) action.run()\n else options.onUnknown?.(id)\n },\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAsCO,SAAS,cACd,SACA,UAAuE,CAAC,GACxE;AACA,QAAM,SAAS,IAAI,IAAY,QAAQ,SAAS;AAChD,SAAO;AAAA,IACL;AAAA,IACA,SAAU,OAAO,OAAO,OAAO,EAAe,IAAI,CAAC,EAAE,IAAI,OAAO,SAAS,OAAO;AAAA,MAC9E,OAAO;AAAA,MACP;AAAA,MACA;AAAA,IACF,EAAE;AAAA,IACF,WAAW,OAA4B;AACrC,aAAO,OAAO,IAAI,KAAK,KAAK,OAAO,UAAU,eAAe,KAAK,SAAS,KAAK;AAAA,IACjF;AAAA,IACA,IAAI,IAAc;AAChB,YAAM,SAAS,OAAO,UAAU,eAAe,KAAK,SAAS,EAAE,IAAI,QAAQ,EAAE,IAAI;AACjF,UAAI,OAAQ,QAAO,IAAI;AAAA,UAClB,SAAQ,YAAY,EAAE;AAAA,IAC7B;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -41,6 +41,10 @@ export interface BlocksDialogProps {
|
|
|
41
41
|
quota: QuotaExceededInfo;
|
|
42
42
|
/** The first-login snapshot for free users. */
|
|
43
43
|
welcome: Record<string, never>;
|
|
44
|
+
/** Resume explicit approval of a paid project’s spending limits. */
|
|
45
|
+
subscriptionSetup: {
|
|
46
|
+
projectId: string;
|
|
47
|
+
};
|
|
44
48
|
/** Share a document or a thread by email. */
|
|
45
49
|
share: ShareRequest;
|
|
46
50
|
createWorkspace: CreateWorkspaceDialogProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/provider/dialog-registry.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * The global dialogs: one registry of what is open, so any surface (a kit, a command, code outside\n * React such as an API middleware) opens a dialog by kind, and the one `<ConnectedGlobalDialogs>`\n * mounted in the shell shows it. Each kind is open or not; an open kind holds the props it was\n * opened with. Opening a kind that is already open replaces its props.\n *\n * Kits reach it through the environment (`useBlocksEnvironment().openDialog`), which a host may\n * replace; code outside React calls `openDialog` / `closeDialog` here. Confirm and choice prompts\n * are promise-based instead (`./dialogs`).\n */\nimport { useSyncExternalStore } from 'react'\nimport type { components } from '@arbidocs/client'\nimport type { WorkflowLaunchRequest } from '../agents/workflows/launchRequest'\nimport type { QuotaExceededInfo } from '../connection/billing/ConnectedQuotaDialog'\n\ntype NotificationResponse = components['schemas']['NotificationResponse']\n\n/** Where files are added from: this device, links, or an email account. */\nexport type UploadSource = 'computer' | 'internet' | 'email'\n\n/** What `openShare` shares by email. */\nexport interface ShareRequest {\n resourceType: 'document' | 'conversation'\n resourceExtId: string\n workspaceExtId: string\n resourceName?: string\n /** Whether it is private to its owner now: the dialog offers to share it with the workspace. */\n isPrivate: boolean\n}\n\n/** The upload dialog: files or links already picked, one source, a folder to add them to. */\nexport interface UploadDialogProps {\n /** The tab it opens on (default `upload`). */\n tab?: 'upload' | 'status'\n files?: File[]\n urls?: string[]\n /** Only this source (from an \"Add\" menu). None: every source. */\n source?: UploadSource | null\n /** The folder the files go into. */\n folder?: string | null\n}\n\n/** The create-workspace dialog: in a project (locked to it), or the first-login welcome copy. */\nexport interface CreateWorkspaceDialogProps {\n projectId?: string | null\n variant?: 'default' | 'welcome'\n}\n\n/** Each global dialog, by kind, and the props it is opened with. */\nexport interface BlocksDialogProps {\n /** Personal support requests and their resolution. */\n support: { ticketId?: number }\n /** Add files (upload, links, email). */\n upload: UploadDialogProps\n /** A project's AI usage for the month is used up. */\n quota: QuotaExceededInfo\n /** The first-login snapshot for free users. */\n welcome: Record<string, never>\n /** Share a document or a thread by email. */\n share: ShareRequest\n createWorkspace: CreateWorkspaceDialogProps\n /** Export, copy or move the whole open workspace. */\n transfer: Record<string, never>\n /** Number the selected documents as a production set. */\n productionSet: Record<string, never>\n /** Invite people as contacts. */\n inviteContacts: Record<string, never>\n /** Review a workspace access request (its notification). */\n grantAccess: { notification: NotificationResponse }\n /** Browse, run and edit skills, optionally on one. */\n skillsBrowser: { skillSlug?: string }\n /** Start a workflow with some inputs preset (or at once, `autoStart`). */\n workflowLaunch: WorkflowLaunchRequest\n /** Sign out of this session or all of them. */\n logout: Record<string, never>\n /** Restore an archived workspace. */\n unarchiveWorkspace: { workspaceId: string }\n /** The caller's access to a workspace has expired (its link was opened): ask its owner to renew. */\n expiredWorkspaceAccess: { access: components['schemas']['WorkspaceAccessStatusResponse'] }\n /** The open conversation's settings. */\n conversationSettings: Record<string, never>\n /** Pick the open conversation's documents. */\n conversationDocuments: Record<string, never>\n}\n\nexport type BlocksDialogKind = keyof BlocksDialogProps\n\n/** The props argument: optional for a kind whose props are all optional. */\nexport type DialogPropsArg<K extends BlocksDialogKind> =\n Record<never, never> extends BlocksDialogProps[K]\n ? [props?: BlocksDialogProps[K]]\n : [props: BlocksDialogProps[K]]\n\ntype OpenDialogs = { readonly [K in BlocksDialogKind]?: BlocksDialogProps[K] }\n\nlet open: OpenDialogs = {}\nconst listeners = new Set<() => void>()\nconst promptCleanups = new Set<() => void>()\n\n/** Internal lifetime registration, including prompts that are fading out. */\nexport function registerPromptCleanup(cleanup: () => void): () => void {\n promptCleanups.add(cleanup)\n return () => {\n promptCleanups.delete(cleanup)\n }\n}\n\nfunction set(next: OpenDialogs) {\n open = next\n listeners.forEach((listener) => listener())\n}\n\n/** Open a dialog (replacing the props of one already open). */\nexport function openDialog<K extends BlocksDialogKind>(kind: K, ...[props]: DialogPropsArg<K>) {\n set({ ...open, [kind]: props ?? {} })\n}\n\n/** Close a dialog (nothing happens when it is not open). */\nexport function closeDialog(kind: BlocksDialogKind): void {\n if (!(kind in open)) return\n const next = { ...open }\n delete next[kind]\n set(next)\n}\n\n/** Close every dialog (signing out). */\nexport function closeAllDialogs(): void {\n for (const cleanup of promptCleanups) cleanup()\n if (Object.keys(open).length > 0) set({})\n}\n\n/** The props an open dialog was opened with, or `null` while it is closed. */\nexport function getDialog<K extends BlocksDialogKind>(kind: K): BlocksDialogProps[K] | null {\n return (open[kind] as BlocksDialogProps[K] | undefined) ?? null\n}\n\nfunction subscribe(listener: () => void) {\n listeners.add(listener)\n return () => listeners.delete(listener)\n}\n\n/** A dialog's props while it is open, `null` while closed; re-renders when it opens or closes. */\nexport function useDialogProps<K extends BlocksDialogKind>(kind: K): BlocksDialogProps[K] | null {\n const snapshot = () => getDialog(kind)\n return useSyncExternalStore(subscribe, snapshot, snapshot)\n}\n"],
|
|
5
|
-
"mappings": ";AAUA,SAAS,4BAA4B;
|
|
4
|
+
"sourcesContent": ["/**\n * The global dialogs: one registry of what is open, so any surface (a kit, a command, code outside\n * React such as an API middleware) opens a dialog by kind, and the one `<ConnectedGlobalDialogs>`\n * mounted in the shell shows it. Each kind is open or not; an open kind holds the props it was\n * opened with. Opening a kind that is already open replaces its props.\n *\n * Kits reach it through the environment (`useBlocksEnvironment().openDialog`), which a host may\n * replace; code outside React calls `openDialog` / `closeDialog` here. Confirm and choice prompts\n * are promise-based instead (`./dialogs`).\n */\nimport { useSyncExternalStore } from 'react'\nimport type { components } from '@arbidocs/client'\nimport type { WorkflowLaunchRequest } from '../agents/workflows/launchRequest'\nimport type { QuotaExceededInfo } from '../connection/billing/ConnectedQuotaDialog'\n\ntype NotificationResponse = components['schemas']['NotificationResponse']\n\n/** Where files are added from: this device, links, or an email account. */\nexport type UploadSource = 'computer' | 'internet' | 'email'\n\n/** What `openShare` shares by email. */\nexport interface ShareRequest {\n resourceType: 'document' | 'conversation'\n resourceExtId: string\n workspaceExtId: string\n resourceName?: string\n /** Whether it is private to its owner now: the dialog offers to share it with the workspace. */\n isPrivate: boolean\n}\n\n/** The upload dialog: files or links already picked, one source, a folder to add them to. */\nexport interface UploadDialogProps {\n /** The tab it opens on (default `upload`). */\n tab?: 'upload' | 'status'\n files?: File[]\n urls?: string[]\n /** Only this source (from an \"Add\" menu). None: every source. */\n source?: UploadSource | null\n /** The folder the files go into. */\n folder?: string | null\n}\n\n/** The create-workspace dialog: in a project (locked to it), or the first-login welcome copy. */\nexport interface CreateWorkspaceDialogProps {\n projectId?: string | null\n variant?: 'default' | 'welcome'\n}\n\n/** Each global dialog, by kind, and the props it is opened with. */\nexport interface BlocksDialogProps {\n /** Personal support requests and their resolution. */\n support: { ticketId?: number }\n /** Add files (upload, links, email). */\n upload: UploadDialogProps\n /** A project's AI usage for the month is used up. */\n quota: QuotaExceededInfo\n /** The first-login snapshot for free users. */\n welcome: Record<string, never>\n /** Resume explicit approval of a paid project\u2019s spending limits. */\n subscriptionSetup: { projectId: string }\n /** Share a document or a thread by email. */\n share: ShareRequest\n createWorkspace: CreateWorkspaceDialogProps\n /** Export, copy or move the whole open workspace. */\n transfer: Record<string, never>\n /** Number the selected documents as a production set. */\n productionSet: Record<string, never>\n /** Invite people as contacts. */\n inviteContacts: Record<string, never>\n /** Review a workspace access request (its notification). */\n grantAccess: { notification: NotificationResponse }\n /** Browse, run and edit skills, optionally on one. */\n skillsBrowser: { skillSlug?: string }\n /** Start a workflow with some inputs preset (or at once, `autoStart`). */\n workflowLaunch: WorkflowLaunchRequest\n /** Sign out of this session or all of them. */\n logout: Record<string, never>\n /** Restore an archived workspace. */\n unarchiveWorkspace: { workspaceId: string }\n /** The caller's access to a workspace has expired (its link was opened): ask its owner to renew. */\n expiredWorkspaceAccess: { access: components['schemas']['WorkspaceAccessStatusResponse'] }\n /** The open conversation's settings. */\n conversationSettings: Record<string, never>\n /** Pick the open conversation's documents. */\n conversationDocuments: Record<string, never>\n}\n\nexport type BlocksDialogKind = keyof BlocksDialogProps\n\n/** The props argument: optional for a kind whose props are all optional. */\nexport type DialogPropsArg<K extends BlocksDialogKind> =\n Record<never, never> extends BlocksDialogProps[K]\n ? [props?: BlocksDialogProps[K]]\n : [props: BlocksDialogProps[K]]\n\ntype OpenDialogs = { readonly [K in BlocksDialogKind]?: BlocksDialogProps[K] }\n\nlet open: OpenDialogs = {}\nconst listeners = new Set<() => void>()\nconst promptCleanups = new Set<() => void>()\n\n/** Internal lifetime registration, including prompts that are fading out. */\nexport function registerPromptCleanup(cleanup: () => void): () => void {\n promptCleanups.add(cleanup)\n return () => {\n promptCleanups.delete(cleanup)\n }\n}\n\nfunction set(next: OpenDialogs) {\n open = next\n listeners.forEach((listener) => listener())\n}\n\n/** Open a dialog (replacing the props of one already open). */\nexport function openDialog<K extends BlocksDialogKind>(kind: K, ...[props]: DialogPropsArg<K>) {\n set({ ...open, [kind]: props ?? {} })\n}\n\n/** Close a dialog (nothing happens when it is not open). */\nexport function closeDialog(kind: BlocksDialogKind): void {\n if (!(kind in open)) return\n const next = { ...open }\n delete next[kind]\n set(next)\n}\n\n/** Close every dialog (signing out). */\nexport function closeAllDialogs(): void {\n for (const cleanup of promptCleanups) cleanup()\n if (Object.keys(open).length > 0) set({})\n}\n\n/** The props an open dialog was opened with, or `null` while it is closed. */\nexport function getDialog<K extends BlocksDialogKind>(kind: K): BlocksDialogProps[K] | null {\n return (open[kind] as BlocksDialogProps[K] | undefined) ?? null\n}\n\nfunction subscribe(listener: () => void) {\n listeners.add(listener)\n return () => listeners.delete(listener)\n}\n\n/** A dialog's props while it is open, `null` while closed; re-renders when it opens or closes. */\nexport function useDialogProps<K extends BlocksDialogKind>(kind: K): BlocksDialogProps[K] | null {\n const snapshot = () => getDialog(kind)\n return useSyncExternalStore(subscribe, snapshot, snapshot)\n}\n"],
|
|
5
|
+
"mappings": ";AAUA,SAAS,4BAA4B;AAuFrC,IAAI,OAAoB,CAAC;AACzB,MAAM,YAAY,oBAAI,IAAgB;AACtC,MAAM,iBAAiB,oBAAI,IAAgB;AAGpC,SAAS,sBAAsB,SAAiC;AACrE,iBAAe,IAAI,OAAO;AAC1B,SAAO,MAAM;AACX,mBAAe,OAAO,OAAO;AAAA,EAC/B;AACF;AAEA,SAAS,IAAI,MAAmB;AAC9B,SAAO;AACP,YAAU,QAAQ,CAAC,aAAa,SAAS,CAAC;AAC5C;AAGO,SAAS,WAAuC,SAAY,CAAC,KAAK,GAAsB;AAC7F,MAAI,EAAE,GAAG,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC,EAAE,CAAC;AACtC;AAGO,SAAS,YAAY,MAA8B;AACxD,MAAI,EAAE,QAAQ,MAAO;AACrB,QAAM,OAAO,EAAE,GAAG,KAAK;AACvB,SAAO,KAAK,IAAI;AAChB,MAAI,IAAI;AACV;AAGO,SAAS,kBAAwB;AACtC,aAAW,WAAW,eAAgB,SAAQ;AAC9C,MAAI,OAAO,KAAK,IAAI,EAAE,SAAS,EAAG,KAAI,CAAC,CAAC;AAC1C;AAGO,SAAS,UAAsC,MAAsC;AAC1F,SAAQ,KAAK,IAAI,KAA0C;AAC7D;AAEA,SAAS,UAAU,UAAsB;AACvC,YAAU,IAAI,QAAQ;AACtB,SAAO,MAAM,UAAU,OAAO,QAAQ;AACxC;AAGO,SAAS,eAA2C,MAAsC;AAC/F,QAAM,WAAW,MAAM,UAAU,IAAI;AACrC,SAAO,qBAAqB,WAAW,UAAU,QAAQ;AAC3D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/retrieval/index.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkSRTSMA5K_cjs = require('../chunk-SRTSMA5K.cjs');
|
|
5
5
|
var chunkNX56DIG3_cjs = require('../chunk-NX56DIG3.cjs');
|
|
6
|
-
var
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
6
|
+
var chunkZM6B5WJW_cjs = require('../chunk-ZM6B5WJW.cjs');
|
|
7
|
+
require('../chunk-LIKDQBNJ.cjs');
|
|
8
|
+
require('../chunk-YZBDHBKI.cjs');
|
|
9
|
+
require('../chunk-CVPV4I7Z.cjs');
|
|
10
10
|
require('../chunk-PLIF5CUV.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
@@ -181,11 +181,11 @@ Object.defineProperty(exports, "stripMarkdownLinks", {
|
|
|
181
181
|
});
|
|
182
182
|
Object.defineProperty(exports, "DEFAULT_SEARCH_HIT_LABELS", {
|
|
183
183
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkZM6B5WJW_cjs.DEFAULT_SEARCH_HIT_LABELS; }
|
|
185
185
|
});
|
|
186
186
|
Object.defineProperty(exports, "SearchHit", {
|
|
187
187
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkZM6B5WJW_cjs.SearchHit; }
|
|
189
189
|
});
|
|
190
190
|
//# sourceMappingURL=index.cjs.map
|
|
191
191
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -19,7 +19,7 @@ export interface InvoiceRowView {
|
|
|
19
19
|
date: string;
|
|
20
20
|
/** Formatted amount, e.g. "$50.00". */
|
|
21
21
|
amount: string;
|
|
22
|
-
/** What the charge was for, e.g. "Plan", "
|
|
22
|
+
/** What the charge was for, e.g. "Plan", "Subscription change", "Add-on". */
|
|
23
23
|
kind?: string;
|
|
24
24
|
/** Secondary amount line, e.g. "£35 ex VAT". */
|
|
25
25
|
amountNote?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/settings/Billing.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useMemo, type ReactNode, type Ref } from 'react'\nimport { Check, ChevronDown, ChevronRight, FileText, Loader2, X } from 'lucide-react'\nimport {\n Badge,\n Button,\n cn,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n Input,\n} from '@arbidocs/react/ui'\n\n/** Every fixed string of the receipts dialog. */\nexport interface InvoicesDialogLabels {\n title: (projectName: string) => string\n description: (projectName: string) => string\n noReceipts: string\n paid: string\n}\n\nexport const DEFAULT_INVOICES_DIALOG_LABELS: InvoicesDialogLabels = {\n title: (projectName) => `Receipts \u00B7 ${projectName}`,\n description: (projectName) => `Receipts for ${projectName}`,\n noReceipts: 'No receipts yet.',\n paid: 'Paid',\n}\n\n/** Every fixed string of the daily-cap field. */\nexport interface DailyCapFieldLabels {\n noLimit: string\n ariaLabel: string\n unit: string\n save: string\n}\n\nexport const DEFAULT_DAILY_CAP_FIELD_LABELS: DailyCapFieldLabels = {\n noLimit: 'No limit',\n ariaLabel: 'Daily AI usage limit per collaborator (\u00A3)',\n unit: '\u00A3 / user / day',\n save: 'Save',\n}\n\nexport interface InvoiceRowView {\n key: string\n date: string\n /** Formatted amount, e.g. \"$50.00\". */\n amount: string\n /** What the charge was for, e.g. \"Plan\", \"
|
|
4
|
+
"sourcesContent": ["import { useMemo, type ReactNode, type Ref } from 'react'\nimport { Check, ChevronDown, ChevronRight, FileText, Loader2, X } from 'lucide-react'\nimport {\n Badge,\n Button,\n cn,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n Input,\n} from '@arbidocs/react/ui'\n\n/** Every fixed string of the receipts dialog. */\nexport interface InvoicesDialogLabels {\n title: (projectName: string) => string\n description: (projectName: string) => string\n noReceipts: string\n paid: string\n}\n\nexport const DEFAULT_INVOICES_DIALOG_LABELS: InvoicesDialogLabels = {\n title: (projectName) => `Receipts \u00B7 ${projectName}`,\n description: (projectName) => `Receipts for ${projectName}`,\n noReceipts: 'No receipts yet.',\n paid: 'Paid',\n}\n\n/** Every fixed string of the daily-cap field. */\nexport interface DailyCapFieldLabels {\n noLimit: string\n ariaLabel: string\n unit: string\n save: string\n}\n\nexport const DEFAULT_DAILY_CAP_FIELD_LABELS: DailyCapFieldLabels = {\n noLimit: 'No limit',\n ariaLabel: 'Daily AI usage limit per collaborator (\u00A3)',\n unit: '\u00A3 / user / day',\n save: 'Save',\n}\n\nexport interface InvoiceRowView {\n key: string\n date: string\n /** Formatted amount, e.g. \"$50.00\". */\n amount: string\n /** What the charge was for, e.g. \"Plan\", \"Subscription change\", \"Add-on\". */\n kind?: string\n /** Secondary amount line, e.g. \"\u00A335 ex VAT\". */\n amountNote?: string\n status: string\n isPaid: boolean\n /** Receipt (paid) or invoice (unpaid) link; omitted when none exists. */\n href?: string\n linkLabel?: string\n}\n\nexport interface InvoicesDialogProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n projectName: string\n isLoading: boolean\n invoices: InvoiceRowView[]\n labels?: Partial<InvoicesDialogLabels>\n}\n\n/** Receipts of a project: date, amount, status and a link to each. */\nexport function InvoicesDialog({\n open,\n onOpenChange,\n projectName,\n isLoading,\n invoices,\n labels,\n}: InvoicesDialogProps) {\n const l = useMemo(() => ({ ...DEFAULT_INVOICES_DIALOG_LABELS, ...labels }), [labels])\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent presentation=\"sheet\" className=\"max-w-lg\">\n <DialogHeader>\n <DialogTitle>{l.title(projectName)}</DialogTitle>\n <DialogDescription className=\"sr-only\">{l.description(projectName)}</DialogDescription>\n </DialogHeader>\n\n <div className=\"space-y-1\">\n {isLoading && (\n <div className=\"flex items-center justify-center py-8\">\n <Loader2 className=\"h-5 w-5 animate-spin text-muted-foreground\" />\n </div>\n )}\n {!isLoading && invoices.length === 0 && (\n <p className=\"py-4 text-center text-sm text-muted-foreground\">{l.noReceipts}</p>\n )}\n {!isLoading &&\n invoices.map((invoice) => (\n <div\n key={invoice.key}\n className=\"flex items-center justify-between border-b py-2 text-sm last:border-0\"\n >\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-0.5\">\n <span className=\"tabular-nums text-muted-foreground\">{invoice.date}</span>\n {invoice.kind && <span className=\"text-foreground\">{invoice.kind}</span>}\n <span className=\"font-medium tabular-nums\">{invoice.amount}</span>\n {invoice.amountNote && (\n <span className=\"text-xs tabular-nums text-muted-foreground\">\n {invoice.amountNote}\n </span>\n )}\n <Badge\n variant=\"outline\"\n className={cn(\n 'h-4 px-1.5 py-0 text-sm',\n invoice.isPaid && 'border-green-border text-green-text'\n )}\n >\n {invoice.isPaid ? l.paid : invoice.status}\n </Badge>\n </div>\n {invoice.href && (\n <a\n href={invoice.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground\"\n >\n {invoice.linkLabel} <FileText className=\"h-3 w-3\" />\n </a>\n )}\n </div>\n ))}\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport interface DailyCapFieldProps {\n value: string\n onChange: (value: string) => void\n onSave?: () => void\n canSave?: boolean\n isSaving?: boolean\n labels?: Partial<DailyCapFieldLabels>\n}\n\n/** Per-collaborator daily AI usage cap (\u00A3) input; Enter or Save commits, empty means no limit. */\nexport function DailyCapField({\n value,\n onChange,\n onSave,\n canSave,\n isSaving,\n labels,\n}: DailyCapFieldProps) {\n const l = useMemo(() => ({ ...DEFAULT_DAILY_CAP_FIELD_LABELS, ...labels }), [labels])\n return (\n <div className=\"flex flex-wrap items-center gap-3\">\n <Input\n type=\"number\"\n min={0}\n step={0.01}\n value={value}\n onChange={(e) => onChange(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') onSave?.()\n }}\n placeholder={l.noLimit}\n className=\"h-9 w-40\"\n aria-label={l.ariaLabel}\n disabled={isSaving}\n />\n <span className=\"text-sm text-muted-foreground\">{l.unit}</span>\n {onSave && (\n <Button size=\"sm\" className=\"h-9 px-4\" disabled={!canSave || isSaving} onClick={onSave}>\n {l.save}\n </Button>\n )}\n </div>\n )\n}\n"],
|
|
5
5
|
"mappings": ";AAkFQ,SACE,KADF;AAlFR,SAAS,eAAyC;AAClD,SAA2C,UAAU,eAAkB;AACvE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUA,MAAM,iCAAuD;AAAA,EAClE,OAAO,CAAC,gBAAgB,iBAAc,WAAW;AAAA,EACjD,aAAa,CAAC,gBAAgB,gBAAgB,WAAW;AAAA,EACzD,YAAY;AAAA,EACZ,MAAM;AACR;AAUO,MAAM,iCAAsD;AAAA,EACjE,SAAS;AAAA,EACT,WAAW;AAAA,EACX,MAAM;AAAA,EACN,MAAM;AACR;AA4BO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAwB;AACtB,QAAM,IAAI,QAAQ,OAAO,EAAE,GAAG,gCAAgC,GAAG,OAAO,IAAI,CAAC,MAAM,CAAC;AACpF,SACE,oBAAC,UAAO,MAAY,cAClB,+BAAC,iBAAc,cAAa,SAAQ,WAAU,YAC5C;AAAA,yBAAC,gBACC;AAAA,0BAAC,eAAa,YAAE,MAAM,WAAW,GAAE;AAAA,MACnC,oBAAC,qBAAkB,WAAU,WAAW,YAAE,YAAY,WAAW,GAAE;AAAA,OACrE;AAAA,IAEA,qBAAC,SAAI,WAAU,aACZ;AAAA,mBACC,oBAAC,SAAI,WAAU,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AAAA,QACC,MAAK;AAAA,QACL,KAAK;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA,UAAU,CAAC,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,QACxC,WAAW,CAAC,MAAM;AAChB,cAAI,EAAE,QAAQ,QAAS,UAAS;AAAA,QAClC;AAAA,QACA,aAAa,EAAE;AAAA,QACf,WAAU;AAAA,QACV,cAAY,EAAE;AAAA,QACd,UAAU;AAAA;AAAA,IACZ;AAAA,IACA,oBAAC,UAAK,WAAU,iCAAiC,YAAE,MAAK;AAAA,IACvD,UACC,oBAAC,UAAO,MAAK,MAAK,WAAU,YAAW,UAAU,CAAC,WAAW,UAAU,SAAS,QAC7E,YAAE,MACL;AAAA,KAEJ;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -9,8 +9,8 @@ const DEFAULT_IDENTITY_VERIFICATION_LABELS = {
|
|
|
9
9
|
title: "Identity verification",
|
|
10
10
|
intro: "Check your ID once to get a verified tick next to your name.",
|
|
11
11
|
priceLine: (price, attempts) => `${price} \xB7 ${attempts} attempts`,
|
|
12
|
-
proOnly: "Available on Pro
|
|
13
|
-
seePlans: "See
|
|
12
|
+
proOnly: "Available on Pro subscriptions.",
|
|
13
|
+
seePlans: "See subscriptions",
|
|
14
14
|
manageBilling: "Manage billing",
|
|
15
15
|
verify: "Verify identity",
|
|
16
16
|
continue: "Continue",
|
|
@@ -22,7 +22,7 @@ const DEFAULT_IDENTITY_VERIFICATION_LABELS = {
|
|
|
22
22
|
finish: "Finish",
|
|
23
23
|
remove: "Remove",
|
|
24
24
|
payTitle: "Verify your identity",
|
|
25
|
-
payBody: (price, attempts) => `A one-time fee of ${price} is charged to the card on your Pro
|
|
25
|
+
payBody: (price, attempts) => `A one-time fee of ${price} is charged to the card on your Pro subscription. It covers up to ${attempts} attempts. Your ID is checked by our provider, Didit; ARBI does not keep your document.`,
|
|
26
26
|
pay: "Pay and continue",
|
|
27
27
|
confirmPayment: "Confirm payment with your bank",
|
|
28
28
|
paymentConfirmed: "I\u2019ve confirmed it",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/settings/IdentityVerification.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * Identity verification blocks: the settings card, the dialog (pay \u2192 verify in Didit's frame \u2192\n * result) and a gate for deployments that require it. All take the `IdentityVerificationFlow` from\n * `@arbidocs/react` (`useIdentityVerification` with a provider, or `useIdentityVerificationFlow`\n * bound to a host's own API), so they work the same inside ARBI and on a customer's site.\n */\nimport { useMemo, type ReactNode } from 'react'\nimport { ExternalLink, Loader2, ShieldCheck } from 'lucide-react'\nimport { Button, VerifiedBadge, type IdentityVerificationFlow } from '@arbidocs/react/ui'\nimport { ModalScaffold } from './ModalScaffold'\nimport { SettingsCard, SettingsDisclosure, SettingsRow } from './SettingsPanel'\n\n/** Every fixed string of the identity verification blocks. */\nexport interface IdentityVerificationLabels {\n title: string\n intro: string\n /** \"\u00A35.00 incl. VAT \u00B7 3 attempts\" (`price` comes formatted, VAT note included). */\n priceLine: (price: string, attempts: number) => string\n proOnly: string\n seePlans: string\n manageBilling: string\n verify: string\n continue: string\n attemptsLeft: (n: number) => string\n verified: string\n verifiedDetail: (country: string) => string\n inReview: string\n finishName: string\n finish: string\n remove: string\n payTitle: string\n payBody: (price: string, attempts: number) => string\n pay: string\n confirmPayment: string\n paymentConfirmed: string\n verifyTitle: string\n embedFailed: string\n openInNewTab: string\n checkResult: string\n resultVerified: string\n resultDeclined: (attemptsLeft: number) => string\n tryAgain: string\n resultInReview: string\n nameMismatchTitle: string\n nameMismatchBody: string\n documentName: string\n accountName: string\n useDocumentName: (name: string) => string\n keepName: string\n close: string\n}\n\nexport const DEFAULT_IDENTITY_VERIFICATION_LABELS: IdentityVerificationLabels = {\n title: 'Identity verification',\n intro: 'Check your ID once to get a verified tick next to your name.',\n priceLine: (price, attempts) => `${price} \u00B7 ${attempts} attempts`,\n proOnly: 'Available on Pro plans.',\n seePlans: 'See plans',\n manageBilling: 'Manage billing',\n verify: 'Verify identity',\n continue: 'Continue',\n attemptsLeft: (n) => `${n} attempt${n === 1 ? '' : 's'} left`,\n verified: 'Verified',\n verifiedDetail: (country) => `ID issued in ${country}`,\n inReview: 'Your check is being reviewed. We\u2019ll update this when it\u2019s done.',\n finishName: 'Your ID was verified. Confirm your name to get the tick.',\n finish: 'Finish',\n remove: 'Remove',\n payTitle: 'Verify your identity',\n payBody: (price, attempts) =>\n `A one-time fee of ${price} is charged to the card on your Pro plan. It covers up to ${attempts} attempts. Your ID is checked by our provider, Didit; ARBI does not keep your document.`,\n pay: 'Pay and continue',\n confirmPayment: 'Confirm payment with your bank',\n paymentConfirmed: 'I\u2019ve confirmed it',\n verifyTitle: 'Scan your ID',\n embedFailed: 'Your camera isn\u2019t available here. Continue in a new tab, then come back.',\n openInNewTab: 'Open in a new tab',\n checkResult: 'I\u2019ve finished',\n resultVerified: 'You\u2019re verified. The tick now shows next to your name.',\n resultDeclined: (n) =>\n n > 0\n ? `We couldn\u2019t verify your ID. You have ${n} attempt${n === 1 ? '' : 's'} left.`\n : 'We couldn\u2019t verify your ID and no attempts are left.',\n tryAgain: 'Try again',\n resultInReview: 'Your check needs a manual review. We\u2019ll show the result here when it\u2019s done.',\n nameMismatchTitle: 'Your ID was verified',\n nameMismatchBody:\n 'The name on your ID differs from your account name. The tick shows only with the name on your ID.',\n documentName: 'Name on your ID',\n accountName: 'Account name',\n useDocumentName: (name) => `Change my name to ${name}`,\n keepName: 'Keep my name',\n close: 'Close',\n}\n\nfunction useLabels(labels?: Partial<IdentityVerificationLabels>) {\n return useMemo(() => ({ ...DEFAULT_IDENTITY_VERIFICATION_LABELS, ...labels }), [labels])\n}\n\n/** Refusals the user fixes in billing (plan, card, address). */\nconst BILLING_CODES = [\n 'PRO_REQUIRED',\n 'PAYMENT_METHOD_REQUIRED',\n 'BILLING_ADDRESS_REQUIRED',\n 'PAYMENT_DECLINED',\n]\n\nfunction Problem({\n flow,\n onManageBilling,\n label,\n}: {\n flow: IdentityVerificationFlow\n onManageBilling?: () => void\n label: string\n}) {\n if (!flow.problem) return null\n const billing = onManageBilling && BILLING_CODES.includes(flow.problem.code ?? '')\n return (\n <div className=\"flex flex-wrap items-center gap-2\" data-testid=\"identity-problem\">\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {flow.problem.message}\n </p>\n {billing && (\n <Button size=\"sm\" variant=\"outline\" onClick={onManageBilling}>\n {label}\n </Button>\n )}\n </div>\n )\n}\n\n// \u2500\u2500 Card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface IdentityVerificationCardProps {\n /** Secondary account settings start closed; payment and verification remain explicit actions. */\n collapsible?: boolean\n flow: IdentityVerificationFlow\n /** Open the host's plans / billing (upgrade to Pro, fix the card or address). */\n onManageBilling?: () => void\n labels?: Partial<IdentityVerificationLabels>\n}\n\n/** Settings row for the ID check: offer, progress, or the tick. Renders nothing when not offered. */\nexport function IdentityVerificationCard({\n collapsible = false,\n flow,\n onManageBilling,\n labels,\n}: IdentityVerificationCardProps) {\n const l = useLabels(labels)\n const { status } = flow\n if (!status?.enabled) return null\n const busy = flow.busy !== null\n\n let description: ReactNode\n let action: ReactNode = null\n if (status.verified) {\n description = (\n <span className=\"inline-flex items-center gap-1.5\">\n <VerifiedBadge />\n {l.verified}\n {status.document_country && (\n <span className=\"text-muted-foreground\">\n {' \u00B7 '}\n {l.verifiedDetail(status.document_country)}\n </span>\n )}\n </span>\n )\n action = (\n <Button size=\"sm\" variant=\"ghost\" onClick={flow.remove} disabled={busy}>\n {l.remove}\n </Button>\n )\n } else if (!status.eligible) {\n description = `${l.intro} ${l.proOnly}`\n action = onManageBilling ? (\n <Button size=\"sm\" variant=\"outline\" onClick={onManageBilling}>\n {l.seePlans}\n </Button>\n ) : null\n } else if (status.state === 'in_review') {\n description = l.inReview\n } else if (status.state === 'name_mismatch') {\n description = l.finishName\n action = (\n <Button size=\"sm\" onClick={flow.open}>\n {l.finish}\n </Button>\n )\n } else {\n const resuming = status.attempts_left > 0 || status.state === 'in_progress'\n description = (\n <>\n {l.intro}{' '}\n <span className=\"text-muted-foreground\">\n {resuming\n ? l.attemptsLeft(status.attempts_left)\n : l.priceLine(flow.price ?? '', status.attempts_per_fee)}\n </span>\n </>\n )\n action = (\n <Button size=\"sm\" onClick={flow.open} disabled={busy}>\n <ShieldCheck className=\"mr-1 h-4 w-4\" />\n {resuming ? l.continue : l.verify}\n </Button>\n )\n }\n\n const card = (\n <SettingsCard padding=\"sm\" data-testid=\"identity-verification-card\">\n <SettingsRow label={collapsible ? null : l.title} description={description}>\n {action}\n </SettingsRow>\n {!flow.isOpen && (\n <Problem flow={flow} onManageBilling={onManageBilling} label={l.manageBilling} />\n )}\n </SettingsCard>\n )\n return collapsible ? (\n <SettingsDisclosure title={l.title} testId=\"identity-verification-settings\">\n {card}\n </SettingsDisclosure>\n ) : (\n card\n )\n}\n\n// \u2500\u2500 Dialog \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface IdentityVerificationDialogProps {\n flow: IdentityVerificationFlow\n /** The account name as shown, compared with the name on the document. */\n accountName: string\n /** Allow closing; false blocks it. Default true. */\n dismissible?: boolean\n /** Open the host's billing to fix a refused payment (plan, card, address). */\n onManageBilling?: () => void\n labels?: Partial<IdentityVerificationLabels>\n}\n\n/** The verification dialog: pay the fee, verify in Didit's embedded frame, then the result. */\nexport function IdentityVerificationDialog({\n flow,\n accountName,\n dismissible = true,\n onManageBilling,\n labels,\n}: IdentityVerificationDialogProps) {\n const l = useLabels(labels)\n const { status } = flow\n const attempts = status?.attempts_per_fee ?? 0\n const docName = [status?.document_given_name, status?.document_family_name]\n .filter(Boolean)\n .join(' ')\n const spinner = <Loader2 className=\"mr-1 h-4 w-4 animate-spin\" />\n\n let body: ReactNode\n let footer: ReactNode = null\n if (flow.step === 'pay') {\n body = flow.paymentUrl ? (\n <a\n href={flow.paymentUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline\"\n >\n {l.confirmPayment}\n <ExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n ) : (\n <p className=\"text-sm text-muted-foreground\">{l.payBody(flow.price ?? '', attempts)}</p>\n )\n footer = flow.paymentUrl ? (\n <Button onClick={flow.recheckPayment} disabled={flow.busy !== null}>\n {flow.busy === 'start' && spinner}\n {l.paymentConfirmed}\n </Button>\n ) : (\n <Button onClick={flow.pay} disabled={flow.busy !== null} data-testid=\"identity-pay\">\n {flow.busy === 'pay' && spinner}\n {l.pay}\n </Button>\n )\n } else if (flow.step === 'verify') {\n body = (\n <div className=\"space-y-3\">\n {flow.embedFailed ? (\n <p className=\"text-sm text-muted-foreground\">{l.embedFailed}</p>\n ) : (\n <div\n id={flow.verifyContainerId}\n ref={flow.verifyContainerRef}\n className=\"h-[560px] w-full overflow-hidden rounded-md bg-muted\"\n data-testid=\"identity-didit-frame\"\n >\n {flow.busy === 'start' && (\n <div className=\"flex h-full items-center justify-center\">\n <Loader2 className=\"h-6 w-6 animate-spin text-muted-foreground\" />\n </div>\n )}\n </div>\n )}\n </div>\n )\n footer = (\n <>\n {flow.embedFailed && (\n <Button variant=\"outline\" onClick={flow.openInNewTab}>\n <ExternalLink className=\"mr-1 h-4 w-4\" />\n {l.openInNewTab}\n </Button>\n )}\n <Button variant=\"ghost\" onClick={flow.checkResult} disabled={flow.busy !== null}>\n {flow.busy === 'refresh' && spinner}\n {l.checkResult}\n </Button>\n </>\n )\n } else if (status?.state === 'name_mismatch') {\n body = (\n <div className=\"space-y-3\" data-testid=\"identity-name-mismatch\">\n <p className=\"text-sm text-muted-foreground\">{l.nameMismatchBody}</p>\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm\">\n <dt className=\"text-muted-foreground\">{l.documentName}</dt>\n <dd className=\"font-medium\">{docName}</dd>\n <dt className=\"text-muted-foreground\">{l.accountName}</dt>\n <dd>{accountName}</dd>\n </dl>\n </div>\n )\n footer = (\n <>\n <Button variant=\"ghost\" onClick={flow.keepName} disabled={flow.busy !== null}>\n {l.keepName}\n </Button>\n <Button onClick={flow.acceptName} disabled={flow.busy !== null || !docName}>\n {flow.busy === 'accept' && spinner}\n {l.useDocumentName(docName)}\n </Button>\n </>\n )\n } else if (status?.verified) {\n body = (\n <p className=\"flex items-center gap-2 text-sm\">\n <VerifiedBadge className=\"h-4 w-4\" />\n {l.resultVerified}\n </p>\n )\n footer = <Button onClick={flow.close}>{l.close}</Button>\n } else if (status?.state === 'in_review') {\n body = <p className=\"text-sm text-muted-foreground\">{l.resultInReview}</p>\n footer = <Button onClick={flow.close}>{l.close}</Button>\n } else {\n const left = status?.attempts_left ?? 0\n body = <p className=\"text-sm text-muted-foreground\">{l.resultDeclined(left)}</p>\n footer =\n left > 0 ? (\n <Button onClick={flow.retry} disabled={flow.busy !== null}>\n {l.tryAgain}\n </Button>\n ) : (\n <Button onClick={flow.close}>{l.close}</Button>\n )\n }\n\n const title =\n status?.state === 'name_mismatch' && flow.step === 'result'\n ? l.nameMismatchTitle\n : flow.step === 'verify'\n ? l.verifyTitle\n : l.payTitle\n return (\n <ModalScaffold\n open={flow.isOpen}\n onOpenChange={(open) => (open ? flow.open() : flow.close())}\n title={title}\n icon={<ShieldCheck className=\"h-5 w-5\" />}\n size={flow.step === 'verify' ? 'lg' : 'md'}\n dismissible={dismissible}\n testId=\"identity-verification-dialog\"\n >\n <ModalScaffold.Body>\n {body}\n <Problem flow={flow} onManageBilling={onManageBilling} label={l.manageBilling} />\n </ModalScaffold.Body>\n <ModalScaffold.Footer>{footer}</ModalScaffold.Footer>\n </ModalScaffold>\n )\n}\n"],
|
|
5
|
-
"mappings": ";AAuHI,SA2EE,UA1EA,KADF;AAjHJ,SAAS,eAA+B;AACxC,SAAS,cAAc,SAAS,mBAAmB;AACnD,SAAS,QAAQ,qBAAoD;AACrE,SAAS,qBAAqB;AAC9B,SAAS,cAAc,oBAAoB,mBAAmB;AA0CvD,MAAM,uCAAmE;AAAA,EAC9E,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW,CAAC,OAAO,aAAa,GAAG,KAAK,SAAM,QAAQ;AAAA,EACtD,SAAS;AAAA,EACT,UAAU;AAAA,EACV,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc,CAAC,MAAM,GAAG,CAAC,WAAW,MAAM,IAAI,KAAK,GAAG;AAAA,EACtD,UAAU;AAAA,EACV,gBAAgB,CAAC,YAAY,gBAAgB,OAAO;AAAA,EACpD,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS,CAAC,OAAO,aACf,qBAAqB,KAAK,
|
|
4
|
+
"sourcesContent": ["/**\n * Identity verification blocks: the settings card, the dialog (pay \u2192 verify in Didit's frame \u2192\n * result) and a gate for deployments that require it. All take the `IdentityVerificationFlow` from\n * `@arbidocs/react` (`useIdentityVerification` with a provider, or `useIdentityVerificationFlow`\n * bound to a host's own API), so they work the same inside ARBI and on a customer's site.\n */\nimport { useMemo, type ReactNode } from 'react'\nimport { ExternalLink, Loader2, ShieldCheck } from 'lucide-react'\nimport { Button, VerifiedBadge, type IdentityVerificationFlow } from '@arbidocs/react/ui'\nimport { ModalScaffold } from './ModalScaffold'\nimport { SettingsCard, SettingsDisclosure, SettingsRow } from './SettingsPanel'\n\n/** Every fixed string of the identity verification blocks. */\nexport interface IdentityVerificationLabels {\n title: string\n intro: string\n /** \"\u00A35.00 incl. VAT \u00B7 3 attempts\" (`price` comes formatted, VAT note included). */\n priceLine: (price: string, attempts: number) => string\n proOnly: string\n seePlans: string\n manageBilling: string\n verify: string\n continue: string\n attemptsLeft: (n: number) => string\n verified: string\n verifiedDetail: (country: string) => string\n inReview: string\n finishName: string\n finish: string\n remove: string\n payTitle: string\n payBody: (price: string, attempts: number) => string\n pay: string\n confirmPayment: string\n paymentConfirmed: string\n verifyTitle: string\n embedFailed: string\n openInNewTab: string\n checkResult: string\n resultVerified: string\n resultDeclined: (attemptsLeft: number) => string\n tryAgain: string\n resultInReview: string\n nameMismatchTitle: string\n nameMismatchBody: string\n documentName: string\n accountName: string\n useDocumentName: (name: string) => string\n keepName: string\n close: string\n}\n\nexport const DEFAULT_IDENTITY_VERIFICATION_LABELS: IdentityVerificationLabels = {\n title: 'Identity verification',\n intro: 'Check your ID once to get a verified tick next to your name.',\n priceLine: (price, attempts) => `${price} \u00B7 ${attempts} attempts`,\n proOnly: 'Available on Pro subscriptions.',\n seePlans: 'See subscriptions',\n manageBilling: 'Manage billing',\n verify: 'Verify identity',\n continue: 'Continue',\n attemptsLeft: (n) => `${n} attempt${n === 1 ? '' : 's'} left`,\n verified: 'Verified',\n verifiedDetail: (country) => `ID issued in ${country}`,\n inReview: 'Your check is being reviewed. We\u2019ll update this when it\u2019s done.',\n finishName: 'Your ID was verified. Confirm your name to get the tick.',\n finish: 'Finish',\n remove: 'Remove',\n payTitle: 'Verify your identity',\n payBody: (price, attempts) =>\n `A one-time fee of ${price} is charged to the card on your Pro subscription. It covers up to ${attempts} attempts. Your ID is checked by our provider, Didit; ARBI does not keep your document.`,\n pay: 'Pay and continue',\n confirmPayment: 'Confirm payment with your bank',\n paymentConfirmed: 'I\u2019ve confirmed it',\n verifyTitle: 'Scan your ID',\n embedFailed: 'Your camera isn\u2019t available here. Continue in a new tab, then come back.',\n openInNewTab: 'Open in a new tab',\n checkResult: 'I\u2019ve finished',\n resultVerified: 'You\u2019re verified. The tick now shows next to your name.',\n resultDeclined: (n) =>\n n > 0\n ? `We couldn\u2019t verify your ID. You have ${n} attempt${n === 1 ? '' : 's'} left.`\n : 'We couldn\u2019t verify your ID and no attempts are left.',\n tryAgain: 'Try again',\n resultInReview: 'Your check needs a manual review. We\u2019ll show the result here when it\u2019s done.',\n nameMismatchTitle: 'Your ID was verified',\n nameMismatchBody:\n 'The name on your ID differs from your account name. The tick shows only with the name on your ID.',\n documentName: 'Name on your ID',\n accountName: 'Account name',\n useDocumentName: (name) => `Change my name to ${name}`,\n keepName: 'Keep my name',\n close: 'Close',\n}\n\nfunction useLabels(labels?: Partial<IdentityVerificationLabels>) {\n return useMemo(() => ({ ...DEFAULT_IDENTITY_VERIFICATION_LABELS, ...labels }), [labels])\n}\n\n/** Refusals the user fixes in billing (plan, card, address). */\nconst BILLING_CODES = [\n 'PRO_REQUIRED',\n 'PAYMENT_METHOD_REQUIRED',\n 'BILLING_ADDRESS_REQUIRED',\n 'PAYMENT_DECLINED',\n]\n\nfunction Problem({\n flow,\n onManageBilling,\n label,\n}: {\n flow: IdentityVerificationFlow\n onManageBilling?: () => void\n label: string\n}) {\n if (!flow.problem) return null\n const billing = onManageBilling && BILLING_CODES.includes(flow.problem.code ?? '')\n return (\n <div className=\"flex flex-wrap items-center gap-2\" data-testid=\"identity-problem\">\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {flow.problem.message}\n </p>\n {billing && (\n <Button size=\"sm\" variant=\"outline\" onClick={onManageBilling}>\n {label}\n </Button>\n )}\n </div>\n )\n}\n\n// \u2500\u2500 Card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface IdentityVerificationCardProps {\n /** Secondary account settings start closed; payment and verification remain explicit actions. */\n collapsible?: boolean\n flow: IdentityVerificationFlow\n /** Open the host's plans / billing (upgrade to Pro, fix the card or address). */\n onManageBilling?: () => void\n labels?: Partial<IdentityVerificationLabels>\n}\n\n/** Settings row for the ID check: offer, progress, or the tick. Renders nothing when not offered. */\nexport function IdentityVerificationCard({\n collapsible = false,\n flow,\n onManageBilling,\n labels,\n}: IdentityVerificationCardProps) {\n const l = useLabels(labels)\n const { status } = flow\n if (!status?.enabled) return null\n const busy = flow.busy !== null\n\n let description: ReactNode\n let action: ReactNode = null\n if (status.verified) {\n description = (\n <span className=\"inline-flex items-center gap-1.5\">\n <VerifiedBadge />\n {l.verified}\n {status.document_country && (\n <span className=\"text-muted-foreground\">\n {' \u00B7 '}\n {l.verifiedDetail(status.document_country)}\n </span>\n )}\n </span>\n )\n action = (\n <Button size=\"sm\" variant=\"ghost\" onClick={flow.remove} disabled={busy}>\n {l.remove}\n </Button>\n )\n } else if (!status.eligible) {\n description = `${l.intro} ${l.proOnly}`\n action = onManageBilling ? (\n <Button size=\"sm\" variant=\"outline\" onClick={onManageBilling}>\n {l.seePlans}\n </Button>\n ) : null\n } else if (status.state === 'in_review') {\n description = l.inReview\n } else if (status.state === 'name_mismatch') {\n description = l.finishName\n action = (\n <Button size=\"sm\" onClick={flow.open}>\n {l.finish}\n </Button>\n )\n } else {\n const resuming = status.attempts_left > 0 || status.state === 'in_progress'\n description = (\n <>\n {l.intro}{' '}\n <span className=\"text-muted-foreground\">\n {resuming\n ? l.attemptsLeft(status.attempts_left)\n : l.priceLine(flow.price ?? '', status.attempts_per_fee)}\n </span>\n </>\n )\n action = (\n <Button size=\"sm\" onClick={flow.open} disabled={busy}>\n <ShieldCheck className=\"mr-1 h-4 w-4\" />\n {resuming ? l.continue : l.verify}\n </Button>\n )\n }\n\n const card = (\n <SettingsCard padding=\"sm\" data-testid=\"identity-verification-card\">\n <SettingsRow label={collapsible ? null : l.title} description={description}>\n {action}\n </SettingsRow>\n {!flow.isOpen && (\n <Problem flow={flow} onManageBilling={onManageBilling} label={l.manageBilling} />\n )}\n </SettingsCard>\n )\n return collapsible ? (\n <SettingsDisclosure title={l.title} testId=\"identity-verification-settings\">\n {card}\n </SettingsDisclosure>\n ) : (\n card\n )\n}\n\n// \u2500\u2500 Dialog \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface IdentityVerificationDialogProps {\n flow: IdentityVerificationFlow\n /** The account name as shown, compared with the name on the document. */\n accountName: string\n /** Allow closing; false blocks it. Default true. */\n dismissible?: boolean\n /** Open the host's billing to fix a refused payment (plan, card, address). */\n onManageBilling?: () => void\n labels?: Partial<IdentityVerificationLabels>\n}\n\n/** The verification dialog: pay the fee, verify in Didit's embedded frame, then the result. */\nexport function IdentityVerificationDialog({\n flow,\n accountName,\n dismissible = true,\n onManageBilling,\n labels,\n}: IdentityVerificationDialogProps) {\n const l = useLabels(labels)\n const { status } = flow\n const attempts = status?.attempts_per_fee ?? 0\n const docName = [status?.document_given_name, status?.document_family_name]\n .filter(Boolean)\n .join(' ')\n const spinner = <Loader2 className=\"mr-1 h-4 w-4 animate-spin\" />\n\n let body: ReactNode\n let footer: ReactNode = null\n if (flow.step === 'pay') {\n body = flow.paymentUrl ? (\n <a\n href={flow.paymentUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline\"\n >\n {l.confirmPayment}\n <ExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n ) : (\n <p className=\"text-sm text-muted-foreground\">{l.payBody(flow.price ?? '', attempts)}</p>\n )\n footer = flow.paymentUrl ? (\n <Button onClick={flow.recheckPayment} disabled={flow.busy !== null}>\n {flow.busy === 'start' && spinner}\n {l.paymentConfirmed}\n </Button>\n ) : (\n <Button onClick={flow.pay} disabled={flow.busy !== null} data-testid=\"identity-pay\">\n {flow.busy === 'pay' && spinner}\n {l.pay}\n </Button>\n )\n } else if (flow.step === 'verify') {\n body = (\n <div className=\"space-y-3\">\n {flow.embedFailed ? (\n <p className=\"text-sm text-muted-foreground\">{l.embedFailed}</p>\n ) : (\n <div\n id={flow.verifyContainerId}\n ref={flow.verifyContainerRef}\n className=\"h-[560px] w-full overflow-hidden rounded-md bg-muted\"\n data-testid=\"identity-didit-frame\"\n >\n {flow.busy === 'start' && (\n <div className=\"flex h-full items-center justify-center\">\n <Loader2 className=\"h-6 w-6 animate-spin text-muted-foreground\" />\n </div>\n )}\n </div>\n )}\n </div>\n )\n footer = (\n <>\n {flow.embedFailed && (\n <Button variant=\"outline\" onClick={flow.openInNewTab}>\n <ExternalLink className=\"mr-1 h-4 w-4\" />\n {l.openInNewTab}\n </Button>\n )}\n <Button variant=\"ghost\" onClick={flow.checkResult} disabled={flow.busy !== null}>\n {flow.busy === 'refresh' && spinner}\n {l.checkResult}\n </Button>\n </>\n )\n } else if (status?.state === 'name_mismatch') {\n body = (\n <div className=\"space-y-3\" data-testid=\"identity-name-mismatch\">\n <p className=\"text-sm text-muted-foreground\">{l.nameMismatchBody}</p>\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm\">\n <dt className=\"text-muted-foreground\">{l.documentName}</dt>\n <dd className=\"font-medium\">{docName}</dd>\n <dt className=\"text-muted-foreground\">{l.accountName}</dt>\n <dd>{accountName}</dd>\n </dl>\n </div>\n )\n footer = (\n <>\n <Button variant=\"ghost\" onClick={flow.keepName} disabled={flow.busy !== null}>\n {l.keepName}\n </Button>\n <Button onClick={flow.acceptName} disabled={flow.busy !== null || !docName}>\n {flow.busy === 'accept' && spinner}\n {l.useDocumentName(docName)}\n </Button>\n </>\n )\n } else if (status?.verified) {\n body = (\n <p className=\"flex items-center gap-2 text-sm\">\n <VerifiedBadge className=\"h-4 w-4\" />\n {l.resultVerified}\n </p>\n )\n footer = <Button onClick={flow.close}>{l.close}</Button>\n } else if (status?.state === 'in_review') {\n body = <p className=\"text-sm text-muted-foreground\">{l.resultInReview}</p>\n footer = <Button onClick={flow.close}>{l.close}</Button>\n } else {\n const left = status?.attempts_left ?? 0\n body = <p className=\"text-sm text-muted-foreground\">{l.resultDeclined(left)}</p>\n footer =\n left > 0 ? (\n <Button onClick={flow.retry} disabled={flow.busy !== null}>\n {l.tryAgain}\n </Button>\n ) : (\n <Button onClick={flow.close}>{l.close}</Button>\n )\n }\n\n const title =\n status?.state === 'name_mismatch' && flow.step === 'result'\n ? l.nameMismatchTitle\n : flow.step === 'verify'\n ? l.verifyTitle\n : l.payTitle\n return (\n <ModalScaffold\n open={flow.isOpen}\n onOpenChange={(open) => (open ? flow.open() : flow.close())}\n title={title}\n icon={<ShieldCheck className=\"h-5 w-5\" />}\n size={flow.step === 'verify' ? 'lg' : 'md'}\n dismissible={dismissible}\n testId=\"identity-verification-dialog\"\n >\n <ModalScaffold.Body>\n {body}\n <Problem flow={flow} onManageBilling={onManageBilling} label={l.manageBilling} />\n </ModalScaffold.Body>\n <ModalScaffold.Footer>{footer}</ModalScaffold.Footer>\n </ModalScaffold>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAuHI,SA2EE,UA1EA,KADF;AAjHJ,SAAS,eAA+B;AACxC,SAAS,cAAc,SAAS,mBAAmB;AACnD,SAAS,QAAQ,qBAAoD;AACrE,SAAS,qBAAqB;AAC9B,SAAS,cAAc,oBAAoB,mBAAmB;AA0CvD,MAAM,uCAAmE;AAAA,EAC9E,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW,CAAC,OAAO,aAAa,GAAG,KAAK,SAAM,QAAQ;AAAA,EACtD,SAAS;AAAA,EACT,UAAU;AAAA,EACV,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc,CAAC,MAAM,GAAG,CAAC,WAAW,MAAM,IAAI,KAAK,GAAG;AAAA,EACtD,UAAU;AAAA,EACV,gBAAgB,CAAC,YAAY,gBAAgB,OAAO;AAAA,EACpD,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS,CAAC,OAAO,aACf,qBAAqB,KAAK,qEAAqE,QAAQ;AAAA,EACzG,KAAK;AAAA,EACL,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,aAAa;AAAA,EACb,cAAc;AAAA,EACd,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,gBAAgB,CAAC,MACf,IAAI,IACA,6CAAwC,CAAC,WAAW,MAAM,IAAI,KAAK,GAAG,WACtE;AAAA,EACN,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,kBACE;AAAA,EACF,cAAc;AAAA,EACd,aAAa;AAAA,EACb,iBAAiB,CAAC,SAAS,qBAAqB,IAAI;AAAA,EACpD,UAAU;AAAA,EACV,OAAO;AACT;AAEA,SAAS,UAAU,QAA8C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Q,YAAE,OAAM;AAAA,EAE5C;AAEA,QAAM,QACJ,QAAQ,UAAU,mBAAmB,KAAK,SAAS,WAC/C,EAAE,oBACF,KAAK,SAAS,WACZ,EAAE,cACF,EAAE;AACV,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,KAAK;AAAA,MACX,cAAc,CAAC,SAAU,OAAO,KAAK,KAAK,IAAI,KAAK,MAAM;AAAA,MACzD;AAAA,MACA,MAAM,oBAAC,eAAY,WAAU,WAAU;AAAA,MACvC,MAAM,KAAK,SAAS,WAAW,OAAO;AAAA,MACtC;AAAA,MACA,QAAO;AAAA,MAEP;AAAA,6BAAC,cAAc,MAAd,EACE;AAAA;AAAA,UACD,oBAAC,WAAQ,MAAY,iBAAkC,OAAO,EAAE,eAAe;AAAA,WACjF;AAAA,QACA,oBAAC,cAAc,QAAd,EAAsB,kBAAO;AAAA;AAAA;AAAA,EAChC;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,6 +16,8 @@ export interface ModalScaffoldProps {
|
|
|
16
16
|
/** Accessible description; visually hidden unless `showDescription`. */
|
|
17
17
|
description?: ReactNode;
|
|
18
18
|
showDescription?: boolean;
|
|
19
|
+
/** Retain the accessible title without a visible header block. */
|
|
20
|
+
hideHeader?: boolean;
|
|
19
21
|
/** Icon shown before the title. */
|
|
20
22
|
icon?: ReactNode;
|
|
21
23
|
size?: ModalSize;
|
|
@@ -52,7 +54,7 @@ declare function ModalFooter({ className, ...props }: ComponentProps<typeof Dial
|
|
|
52
54
|
* Standard dialog: icon + title + description header, then the compound
|
|
53
55
|
* `ModalScaffold.Body` / `ModalScaffold.Footer` slots.
|
|
54
56
|
*/
|
|
55
|
-
export declare function ModalScaffold({ open, onOpenChange, title, description, showDescription, icon, size, presentation, className, testId, role, initialFocusRef, dismissible, onInteractOutside, onEscapeKeyDown, children, }: ModalScaffoldProps): import("react").JSX.Element;
|
|
57
|
+
export declare function ModalScaffold({ open, onOpenChange, title, description, showDescription, hideHeader, icon, size, presentation, className, testId, role, initialFocusRef, dismissible, onInteractOutside, onEscapeKeyDown, children, }: ModalScaffoldProps): import("react").JSX.Element;
|
|
56
58
|
export declare namespace ModalScaffold {
|
|
57
59
|
var Body: typeof ModalBody;
|
|
58
60
|
var Footer: typeof ModalFooter;
|
|
@@ -62,6 +62,7 @@ function ModalScaffold({
|
|
|
62
62
|
title,
|
|
63
63
|
description,
|
|
64
64
|
showDescription = false,
|
|
65
|
+
hideHeader = false,
|
|
65
66
|
icon,
|
|
66
67
|
size = "md",
|
|
67
68
|
presentation,
|
|
@@ -99,7 +100,7 @@ function ModalScaffold({
|
|
|
99
100
|
},
|
|
100
101
|
onCloseAutoFocus: restoreFocus.onCloseAutoFocus,
|
|
101
102
|
children: [
|
|
102
|
-
/* @__PURE__ */ jsxs(ModalHeader, { children: [
|
|
103
|
+
/* @__PURE__ */ jsxs(ModalHeader, { className: hideHeader ? "sr-only !p-0" : void 0, children: [
|
|
103
104
|
/* @__PURE__ */ jsxs(DialogTitle, { className: "flex items-center gap-2", children: [
|
|
104
105
|
icon,
|
|
105
106
|
title
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/settings/ModalScaffold.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { ComponentProps, ReactNode, RefObject } from 'react'\nimport {\n cn,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n type DialogPresentation,\n} from '@arbidocs/react/ui'\nimport { useRestoreFocus } from '../lib/useRestoreFocus'\n\n/** Tailwind classes for a modal section heading (also usable on a `Label`). */\nexport const MODAL_SECTION_TITLE_CLASS =\n 'mb-2 flex items-center gap-1 text-sm font-medium text-muted-foreground'\n\n/** Header of a hand-assembled modal: no tinted band, just space. */\nexport function ModalHeader({ className, ...props }: ComponentProps<typeof DialogHeader>) {\n return (\n <DialogHeader\n data-slot=\"modal-header\"\n className={cn('flex-shrink-0 rounded-t-lg bg-transparent p-6 pb-3 pr-12', className)}\n {...props}\n />\n )\n}\n\n/** A padded group inside a modal body. */\nexport function ModalSection({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"modal-section\" className={cn('pt-4', className)} {...props} />\n}\n\n/** Muted label above the content of a {@link ModalSection}. */\nexport function ModalSectionTitle({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"modal-section-title\"\n className={cn(MODAL_SECTION_TITLE_CLASS, className)}\n {...props}\n />\n )\n}\n\nexport type ModalSize = 'sm' | 'md' | 'lg' | 'xl'\n\nconst SIZE_CLASS: Record<ModalSize, string> = {\n sm: 'sm:max-w-sm',\n md: 'sm:max-w-md',\n lg: 'sm:max-w-2xl',\n xl: 'sm:max-w-4xl',\n}\n\nexport interface ModalScaffoldProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n title: ReactNode\n /** Accessible description; visually hidden unless `showDescription`. */\n description?: ReactNode\n showDescription?: boolean\n /** Icon shown before the title. */\n icon?: ReactNode\n size?: ModalSize\n /** Phone presentation; defaults to a bottom sheet for `lg`/`xl`, a centred box otherwise. */\n presentation?: DialogPresentation\n className?: string\n testId?: string\n /**\n * `alertdialog` for a destructive or blocking confirmation: announced as an alert, dismissed\n * only through its own buttons or Escape (not by clicking outside).\n */\n role?: 'dialog' | 'alertdialog'\n /**\n * Block dismissal by outside click AND Escape; only the dialog's own buttons close it. For a\n * dialog that shows a secret once (a new API key). Default false. An `alertdialog` already\n * ignores outside clicks.\n */\n dismissible?: boolean\n /** Called on a pointer/focus interaction outside; `preventDefault()` keeps the dialog open. */\n onInteractOutside?: (event: Event) => void\n /** Called on Escape; `preventDefault()` keeps the dialog open. */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n /** Element that receives focus when the dialog opens (an alert dialog focuses its safe action). */\n initialFocusRef?: RefObject<HTMLElement | null>\n children?: ReactNode\n}\n\nfunction ModalBody({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"modal-body\" className={cn('space-y-4', className)} {...props} />\n}\n\n/**\n * Action row. Stacked full-width on phones (primary action on top), right-aligned on wider\n * screens. Sticks to the bottom of the scrolling dialog body so the actions stay reachable.\n */\nfunction ModalFooter({ className, ...props }: ComponentProps<typeof DialogFooter>) {\n return (\n <DialogFooter\n data-slot=\"modal-footer\"\n className={cn(\n 'sticky bottom-0 -mx-6 -mb-6 mt-4 border-t border-border bg-background px-6 py-3',\n className\n )}\n {...props}\n />\n )\n}\n\n/**\n * Standard dialog: icon + title + description header, then the compound\n * `ModalScaffold.Body` / `ModalScaffold.Footer` slots.\n */\nexport function ModalScaffold({\n open,\n onOpenChange,\n title,\n description,\n showDescription = false,\n icon,\n size = 'md',\n presentation,\n className,\n testId,\n role = 'dialog',\n initialFocusRef,\n dismissible = true,\n onInteractOutside,\n onEscapeKeyDown,\n children,\n}: ModalScaffoldProps) {\n const restoreFocus = useRestoreFocus()\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n role={role}\n presentation={presentation ?? (size === 'lg' || size === 'xl' ? 'sheet' : 'center')}\n className={cn(SIZE_CLASS[size], 'flex flex-col gap-0 overflow-hidden p-0', className)}\n data-testid={testId}\n onInteractOutside={(e) => {\n if (role === 'alertdialog' || !dismissible) e.preventDefault()\n onInteractOutside?.(e)\n }}\n onEscapeKeyDown={(e) => {\n if (!dismissible) e.preventDefault()\n onEscapeKeyDown?.(e)\n }}\n onOpenAutoFocus={(e) => {\n restoreFocus.onOpenAutoFocus(e)\n if (initialFocusRef?.current) {\n e.preventDefault()\n initialFocusRef.current.focus()\n }\n }}\n onCloseAutoFocus={restoreFocus.onCloseAutoFocus}\n >\n <ModalHeader>\n <DialogTitle className=\"flex items-center gap-2\">\n {icon}\n {title}\n </DialogTitle>\n <DialogDescription className={showDescription ? undefined : 'sr-only'}>\n {description ?? title}\n </DialogDescription>\n </ModalHeader>\n <div\n data-slot=\"modal-scroll\"\n className=\"min-h-0 flex-1 space-y-4 overflow-y-auto overscroll-contain px-6 pb-6\"\n >\n {children}\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nModalScaffold.Body = ModalBody\nModalScaffold.Footer = ModalFooter\n"],
|
|
5
|
-
"mappings": ";AAoBI,
|
|
4
|
+
"sourcesContent": ["import type { ComponentProps, ReactNode, RefObject } from 'react'\nimport {\n cn,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n type DialogPresentation,\n} from '@arbidocs/react/ui'\nimport { useRestoreFocus } from '../lib/useRestoreFocus'\n\n/** Tailwind classes for a modal section heading (also usable on a `Label`). */\nexport const MODAL_SECTION_TITLE_CLASS =\n 'mb-2 flex items-center gap-1 text-sm font-medium text-muted-foreground'\n\n/** Header of a hand-assembled modal: no tinted band, just space. */\nexport function ModalHeader({ className, ...props }: ComponentProps<typeof DialogHeader>) {\n return (\n <DialogHeader\n data-slot=\"modal-header\"\n className={cn('flex-shrink-0 rounded-t-lg bg-transparent p-6 pb-3 pr-12', className)}\n {...props}\n />\n )\n}\n\n/** A padded group inside a modal body. */\nexport function ModalSection({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"modal-section\" className={cn('pt-4', className)} {...props} />\n}\n\n/** Muted label above the content of a {@link ModalSection}. */\nexport function ModalSectionTitle({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"modal-section-title\"\n className={cn(MODAL_SECTION_TITLE_CLASS, className)}\n {...props}\n />\n )\n}\n\nexport type ModalSize = 'sm' | 'md' | 'lg' | 'xl'\n\nconst SIZE_CLASS: Record<ModalSize, string> = {\n sm: 'sm:max-w-sm',\n md: 'sm:max-w-md',\n lg: 'sm:max-w-2xl',\n xl: 'sm:max-w-4xl',\n}\n\nexport interface ModalScaffoldProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n title: ReactNode\n /** Accessible description; visually hidden unless `showDescription`. */\n description?: ReactNode\n showDescription?: boolean\n /** Retain the accessible title without a visible header block. */\n hideHeader?: boolean\n /** Icon shown before the title. */\n icon?: ReactNode\n size?: ModalSize\n /** Phone presentation; defaults to a bottom sheet for `lg`/`xl`, a centred box otherwise. */\n presentation?: DialogPresentation\n className?: string\n testId?: string\n /**\n * `alertdialog` for a destructive or blocking confirmation: announced as an alert, dismissed\n * only through its own buttons or Escape (not by clicking outside).\n */\n role?: 'dialog' | 'alertdialog'\n /**\n * Block dismissal by outside click AND Escape; only the dialog's own buttons close it. For a\n * dialog that shows a secret once (a new API key). Default false. An `alertdialog` already\n * ignores outside clicks.\n */\n dismissible?: boolean\n /** Called on a pointer/focus interaction outside; `preventDefault()` keeps the dialog open. */\n onInteractOutside?: (event: Event) => void\n /** Called on Escape; `preventDefault()` keeps the dialog open. */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n /** Element that receives focus when the dialog opens (an alert dialog focuses its safe action). */\n initialFocusRef?: RefObject<HTMLElement | null>\n children?: ReactNode\n}\n\nfunction ModalBody({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"modal-body\" className={cn('space-y-4', className)} {...props} />\n}\n\n/**\n * Action row. Stacked full-width on phones (primary action on top), right-aligned on wider\n * screens. Sticks to the bottom of the scrolling dialog body so the actions stay reachable.\n */\nfunction ModalFooter({ className, ...props }: ComponentProps<typeof DialogFooter>) {\n return (\n <DialogFooter\n data-slot=\"modal-footer\"\n className={cn(\n 'sticky bottom-0 -mx-6 -mb-6 mt-4 border-t border-border bg-background px-6 py-3',\n className\n )}\n {...props}\n />\n )\n}\n\n/**\n * Standard dialog: icon + title + description header, then the compound\n * `ModalScaffold.Body` / `ModalScaffold.Footer` slots.\n */\nexport function ModalScaffold({\n open,\n onOpenChange,\n title,\n description,\n showDescription = false,\n hideHeader = false,\n icon,\n size = 'md',\n presentation,\n className,\n testId,\n role = 'dialog',\n initialFocusRef,\n dismissible = true,\n onInteractOutside,\n onEscapeKeyDown,\n children,\n}: ModalScaffoldProps) {\n const restoreFocus = useRestoreFocus()\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n role={role}\n presentation={presentation ?? (size === 'lg' || size === 'xl' ? 'sheet' : 'center')}\n className={cn(SIZE_CLASS[size], 'flex flex-col gap-0 overflow-hidden p-0', className)}\n data-testid={testId}\n onInteractOutside={(e) => {\n if (role === 'alertdialog' || !dismissible) e.preventDefault()\n onInteractOutside?.(e)\n }}\n onEscapeKeyDown={(e) => {\n if (!dismissible) e.preventDefault()\n onEscapeKeyDown?.(e)\n }}\n onOpenAutoFocus={(e) => {\n restoreFocus.onOpenAutoFocus(e)\n if (initialFocusRef?.current) {\n e.preventDefault()\n initialFocusRef.current.focus()\n }\n }}\n onCloseAutoFocus={restoreFocus.onCloseAutoFocus}\n >\n <ModalHeader className={hideHeader ? 'sr-only !p-0' : undefined}>\n <DialogTitle className=\"flex items-center gap-2\">\n {icon}\n {title}\n </DialogTitle>\n <DialogDescription className={showDescription ? undefined : 'sr-only'}>\n {description ?? title}\n </DialogDescription>\n </ModalHeader>\n <div\n data-slot=\"modal-scroll\"\n className=\"min-h-0 flex-1 space-y-4 overflow-y-auto overscroll-contain px-6 pb-6\"\n >\n {children}\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nModalScaffold.Body = ModalBody\nModalScaffold.Footer = ModalFooter\n"],
|
|
5
|
+
"mappings": ";AAoBI,cA2IM,YA3IN;AAnBJ;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,uBAAuB;AAGzB,MAAM,4BACX;AAGK,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAwC;AACxF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,4DAA4D,SAAS;AAAA,MAClF,GAAG;AAAA;AAAA,EACN;AAEJ;AAGO,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAA0B;AAC3E,SAAO,oBAAC,SAAI,aAAU,iBAAgB,WAAW,GAAG,QA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BAAiB,CAAC,MAAM;AACtB,YAAI,CAAC,YAAa,GAAE,eAAe;AACnC,0BAAkB,CAAC;AAAA,MACrB;AAAA,MACA,iBAAiB,CAAC,MAAM;AACtB,qBAAa,gBAAgB,CAAC;AAC9B,YAAI,iBAAiB,SAAS;AAC5B,YAAE,eAAe;AACjB,0BAAgB,QAAQ,MAAM;AAAA,QAChC;AAAA,MACF;AAAA,MACA,kBAAkB,aAAa;AAAA,MAE/B;AAAA,6BAAC,eAAY,WAAW,aAAa,iBAAiB,QACpD;AAAA,+BAAC,eAAY,WAAU,2BACpB;AAAA;AAAA,YACA;AAAA,aACH;AAAA,UACA,oBAAC,qBAAkB,WAAW,kBAAkB,SAAY,WACzD,yBAAe,OAClB;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,aAAU;AAAA,YACV,WAAU;AAAA,YAET;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAEA,cAAc,OAAO;AACrB,cAAc,SAAS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -34,9 +34,11 @@ export interface PanelAddButtonProps {
|
|
|
34
34
|
testId?: string;
|
|
35
35
|
/** When set, the button is disabled and this explanation is its tooltip. */
|
|
36
36
|
disabledReason?: string;
|
|
37
|
+
/** The tooltip of an enabled button (default: the label). */
|
|
38
|
+
tooltip?: string;
|
|
37
39
|
}
|
|
38
40
|
/** "+ New" button that sits right after the tabs of a panel header. */
|
|
39
|
-
export declare function PanelAddButton({ label, onClick, isCompact, icon, testId, disabledReason, }: PanelAddButtonProps): import("react").JSX.Element;
|
|
41
|
+
export declare function PanelAddButton({ label, onClick, isCompact, icon, testId, disabledReason, tooltip, }: PanelAddButtonProps): import("react").JSX.Element;
|
|
40
42
|
/** Centred muted note in a panel body ("Loading…"). */
|
|
41
43
|
export declare function PanelNote({ children }: {
|
|
42
44
|
children: ReactNode;
|
|
@@ -37,7 +37,8 @@ function PanelAddButton({
|
|
|
37
37
|
isCompact,
|
|
38
38
|
icon,
|
|
39
39
|
testId,
|
|
40
|
-
disabledReason
|
|
40
|
+
disabledReason,
|
|
41
|
+
tooltip
|
|
41
42
|
}) {
|
|
42
43
|
return /* @__PURE__ */ jsxs(
|
|
43
44
|
"button",
|
|
@@ -45,7 +46,7 @@ function PanelAddButton({
|
|
|
45
46
|
type: "button",
|
|
46
47
|
onClick,
|
|
47
48
|
disabled: !!disabledReason,
|
|
48
|
-
title: disabledReason ?? label,
|
|
49
|
+
title: disabledReason ?? tooltip ?? label,
|
|
49
50
|
"data-slot": "panel-add-button",
|
|
50
51
|
"data-testid": testId,
|
|
51
52
|
className: "flex h-8 items-center gap-1.5 rounded-md px-2 text-sm font-medium text-primary transition-colors hover:bg-primary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent pointer-coarse:h-11 pointer-coarse:min-w-11",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/settings/PanelFrame.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { ReactNode } from 'react'\nimport { cn } from '@arbidocs/react/ui'\n\nexport interface PanelFrameProps {\n testId?: string\n className?: string\n children: ReactNode\n}\n\n/** Column that fills a side/floating panel: a header slot above a body that takes the rest. */\nexport function PanelFrame({ testId, className, children }: PanelFrameProps) {\n return (\n <div\n data-slot=\"panel-frame\"\n data-testid={testId}\n className={cn('flex h-full min-h-0 flex-col bg-background', className)}\n >\n {children}\n </div>\n )\n}\n\nexport interface PanelFrameBodyProps {\n className?: string\n children: ReactNode\n}\n\n/** The panel's body: fills what the header leaves and clips; children scroll themselves. */\nexport function PanelFrameBody({ className, children }: PanelFrameBodyProps) {\n return (\n <div data-slot=\"panel-frame-body\" className={cn('min-h-0 flex-1 overflow-hidden', className)}>\n {children}\n </div>\n )\n}\n\nexport interface PanelScrollProps {\n /** `padded` is a list page (spaced sections); `flush` is a detail view that pads itself. */\n variant?: 'padded' | 'flush'\n className?: string\n children: ReactNode\n}\n\n/** Scrolling content of a panel body. */\nexport function PanelScroll({ variant = 'flush', className, children }: PanelScrollProps) {\n return (\n <div\n data-slot=\"panel-scroll\"\n className={cn('h-full overflow-auto', variant === 'padded' && 'space-y-4 p-3', className)}\n >\n {children}\n </div>\n )\n}\n\n/** Right-aligned row of list-level actions. */\nexport function PanelActionsRow({\n className,\n children,\n}: {\n className?: string\n children: ReactNode\n}) {\n return (\n <div data-slot=\"panel-actions-row\" className={cn('flex justify-end', className)}>\n {children}\n </div>\n )\n}\n\nexport interface PanelAddButtonProps {\n label: string\n onClick: () => void\n /** Icon only (a narrow header); the label stays as title/aria-label. */\n isCompact?: boolean\n icon: ReactNode\n testId?: string\n /** When set, the button is disabled and this explanation is its tooltip. */\n disabledReason?: string\n}\n\n/** \"+ New\" button that sits right after the tabs of a panel header. */\nexport function PanelAddButton({\n label,\n onClick,\n isCompact,\n icon,\n testId,\n disabledReason,\n}: PanelAddButtonProps) {\n return (\n <button\n type=\"button\"\n onClick={onClick}\n disabled={!!disabledReason}\n title={disabledReason ?? label}\n data-slot=\"panel-add-button\"\n data-testid={testId}\n className=\"flex h-8 items-center gap-1.5 rounded-md px-2 text-sm font-medium text-primary transition-colors hover:bg-primary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent pointer-coarse:h-11 pointer-coarse:min-w-11\"\n >\n {icon}\n {isCompact ? <span className=\"sr-only\">{label}</span> : <span>New</span>}\n </button>\n )\n}\n\n/** Centred muted note in a panel body (\"Loading\u2026\"). */\nexport function PanelNote({ children }: { children: ReactNode }) {\n return (\n <div data-slot=\"panel-note\" className=\"py-8 text-center text-muted-foreground\">\n {children}\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": ";AAYI,
|
|
4
|
+
"sourcesContent": ["import type { ReactNode } from 'react'\nimport { cn } from '@arbidocs/react/ui'\n\nexport interface PanelFrameProps {\n testId?: string\n className?: string\n children: ReactNode\n}\n\n/** Column that fills a side/floating panel: a header slot above a body that takes the rest. */\nexport function PanelFrame({ testId, className, children }: PanelFrameProps) {\n return (\n <div\n data-slot=\"panel-frame\"\n data-testid={testId}\n className={cn('flex h-full min-h-0 flex-col bg-background', className)}\n >\n {children}\n </div>\n )\n}\n\nexport interface PanelFrameBodyProps {\n className?: string\n children: ReactNode\n}\n\n/** The panel's body: fills what the header leaves and clips; children scroll themselves. */\nexport function PanelFrameBody({ className, children }: PanelFrameBodyProps) {\n return (\n <div data-slot=\"panel-frame-body\" className={cn('min-h-0 flex-1 overflow-hidden', className)}>\n {children}\n </div>\n )\n}\n\nexport interface PanelScrollProps {\n /** `padded` is a list page (spaced sections); `flush` is a detail view that pads itself. */\n variant?: 'padded' | 'flush'\n className?: string\n children: ReactNode\n}\n\n/** Scrolling content of a panel body. */\nexport function PanelScroll({ variant = 'flush', className, children }: PanelScrollProps) {\n return (\n <div\n data-slot=\"panel-scroll\"\n className={cn('h-full overflow-auto', variant === 'padded' && 'space-y-4 p-3', className)}\n >\n {children}\n </div>\n )\n}\n\n/** Right-aligned row of list-level actions. */\nexport function PanelActionsRow({\n className,\n children,\n}: {\n className?: string\n children: ReactNode\n}) {\n return (\n <div data-slot=\"panel-actions-row\" className={cn('flex justify-end', className)}>\n {children}\n </div>\n )\n}\n\nexport interface PanelAddButtonProps {\n label: string\n onClick: () => void\n /** Icon only (a narrow header); the label stays as title/aria-label. */\n isCompact?: boolean\n icon: ReactNode\n testId?: string\n /** When set, the button is disabled and this explanation is its tooltip. */\n disabledReason?: string\n /** The tooltip of an enabled button (default: the label). */\n tooltip?: string\n}\n\n/** \"+ New\" button that sits right after the tabs of a panel header. */\nexport function PanelAddButton({\n label,\n onClick,\n isCompact,\n icon,\n testId,\n disabledReason,\n tooltip,\n}: PanelAddButtonProps) {\n return (\n <button\n type=\"button\"\n onClick={onClick}\n disabled={!!disabledReason}\n title={disabledReason ?? tooltip ?? label}\n data-slot=\"panel-add-button\"\n data-testid={testId}\n className=\"flex h-8 items-center gap-1.5 rounded-md px-2 text-sm font-medium text-primary transition-colors hover:bg-primary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent pointer-coarse:h-11 pointer-coarse:min-w-11\"\n >\n {icon}\n {isCompact ? <span className=\"sr-only\">{label}</span> : <span>New</span>}\n </button>\n )\n}\n\n/** Centred muted note in a panel body (\"Loading\u2026\"). */\nexport function PanelNote({ children }: { children: ReactNode }) {\n return (\n <div data-slot=\"panel-note\" className=\"py-8 text-center text-muted-foreground\">\n {children}\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAYI,cAkFA,YAlFA;AAXJ,SAAS,UAAU;AASZ,SAAS,WAAW,EAAE,QAAQ,WAAW,SAAS,GAAoB;AAC3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,eAAa;AAAA,MACb,WAAW,GAAG,8CAA8C,SAAS;AAAA,MAEpE;AAAA;AAAA,EACH;AAEJ;AAQO,SAAS,eAAe,EAAE,WAAW,SAAS,GAAwB;AAC3E,SACE,oBAAC,SAAI,aAAU,oBAAmB,WAAW,GAAG,kCAAkC,SAAS,GACxF,UACH;AAEJ;AAUO,SAAS,YAAY,EAAE,UAAU,SAAS,WAAW,SAAS,GAAqB;AACxF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,wBAAwB,YAAY,YAAY,iBAAiB,SAAS;AAAA,MAEvF;AAAA;AAAA,EACH;AAEJ;AAGO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AACF,GAGG;AACD,SACE,oBAAC,SAAI,aAAU,qBAAoB,WAAW,GAAG,oBAAoB,SAAS,GAC3E,UACH;AAEJ;AAgBO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAwB;AACtB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL;AAAA,MACA,UAAU,CAAC,CAAC;AAAA,MACZ,OAAO,kBAAkB,WAAW;AAAA,MACpC,aAAU;AAAA,MACV,eAAa;AAAA,MACb,WAAU;AAAA,MAET;AAAA;AAAA,QACA,YAAY,oBAAC,UAAK,WAAU,WAAW,iBAAM,IAAU,oBAAC,UAAK,iBAAG;AAAA;AAAA;AAAA,EACnE;AAEJ;AAGO,SAAS,UAAU,EAAE,SAAS,GAA4B;AAC/D,SACE,oBAAC,SAAI,aAAU,cAAa,WAAU,0CACnC,UACH;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -57,7 +57,7 @@ export interface PlanCardProps {
|
|
|
57
57
|
onSelect: (id: number) => void;
|
|
58
58
|
labels?: Partial<PlanCardLabels>;
|
|
59
59
|
}
|
|
60
|
-
/** Selectable plan tile. The current
|
|
60
|
+
/** Selectable plan tile. The current subscription is marked and not selectable. */
|
|
61
61
|
export declare function PlanCard({ plan, onSelect, labels }: PlanCardProps): import("react").JSX.Element;
|
|
62
62
|
/** Responsive grid of {@link PlanCard}s: one column on phones, stepping up with width. */
|
|
63
63
|
export declare function PlanCardGrid({ plans, onSelect, labels, }: {
|
|
@@ -5,7 +5,7 @@ import { Check, Tag } from "lucide-react";
|
|
|
5
5
|
import { cn, Input, Label } from "@arbidocs/react/ui";
|
|
6
6
|
import { MoreInfo, MoreInfoList } from "./MoreInfo.js";
|
|
7
7
|
const DEFAULT_PLAN_CARD_LABELS = {
|
|
8
|
-
currentPlan: "Current
|
|
8
|
+
currentPlan: "Current subscription",
|
|
9
9
|
popular: "Popular",
|
|
10
10
|
noMonthlyCost: "\xA30",
|
|
11
11
|
perMonth: "/mo",
|
|
@@ -20,7 +20,7 @@ const DEFAULT_PLAN_CARD_LABELS = {
|
|
|
20
20
|
pricingExplainer: "How pricing works",
|
|
21
21
|
explainerTiers: [
|
|
22
22
|
"Compare monthly and annual prices. Annual savings apply to add-ons too.",
|
|
23
|
-
"Choose your monthly spend cap. Your
|
|
23
|
+
"Choose your monthly spend cap. Your subscription price is included.",
|
|
24
24
|
"We automatically add capacity when needed, stopping at your spend cap.",
|
|
25
25
|
"Use + and \u2212 to adjust usage add-ons. Increases start now; reductions apply at renewal if your usage fits.",
|
|
26
26
|
"Prices exclude VAT. You see the full total before paying."
|