@arbidocs/blocks 0.4.147 → 0.4.150
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/ConnectedNativeDocxComparison-3XQSINPQ.cjs +44 -0
- package/dist/ConnectedNativeDocxComparison-3XQSINPQ.cjs.map +1 -0
- package/dist/ConnectedNativeDocxComparison-XQSXVGHR.js +35 -0
- package/dist/ConnectedNativeDocxComparison-XQSXVGHR.js.map +1 -0
- package/dist/ConnectedNativeDocxEditor-IPEZDERL.js +33 -0
- package/dist/ConnectedNativeDocxEditor-IPEZDERL.js.map +1 -0
- package/dist/ConnectedNativeDocxEditor-OUWFMIPH.cjs +46 -0
- package/dist/ConnectedNativeDocxEditor-OUWFMIPH.cjs.map +1 -0
- package/dist/ConnectedStreamedWordArtifact-D5LSMDO4.cjs +44 -0
- package/dist/ConnectedStreamedWordArtifact-D5LSMDO4.cjs.map +1 -0
- package/dist/ConnectedStreamedWordArtifact-UZVNBKQB.js +35 -0
- package/dist/ConnectedStreamedWordArtifact-UZVNBKQB.js.map +1 -0
- package/dist/FactTextEditor-YESAU2IJ.js +25 -0
- package/dist/FactTextEditor-YESAU2IJ.js.map +1 -0
- package/dist/FactTextEditor-YUPBCTXK.cjs +27 -0
- package/dist/FactTextEditor-YUPBCTXK.cjs.map +1 -0
- package/dist/{NativeDocxEditor-BE2OEOTJ.cjs → NativeDocxEditor-5VBNM5I7.cjs} +8 -8
- package/dist/{NativeDocxEditor-BE2OEOTJ.cjs.map → NativeDocxEditor-5VBNM5I7.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-KOPFMRYW.js → NativeDocxEditor-XT5ZLFGU.js} +4 -4
- package/dist/{NativeDocxEditor-KOPFMRYW.js.map → NativeDocxEditor-XT5ZLFGU.js.map} +1 -1
- package/dist/agents/index.cjs +265 -266
- package/dist/agents/index.js +8 -9
- package/dist/calendar/index.cjs +117 -125
- package/dist/calendar/index.d.ts +0 -1
- package/dist/calendar/index.js +1 -1
- package/dist/calls/index.cjs +3 -3
- package/dist/calls/index.js +2 -2
- package/dist/chat/index.cjs +78 -78
- package/dist/chat/index.js +3 -3
- package/dist/{chunk-2FL7QJKJ.js → chunk-265GOG4W.js} +3 -3
- package/dist/{chunk-2FL7QJKJ.js.map → chunk-265GOG4W.js.map} +1 -1
- package/dist/{chunk-VUR63NMQ.js → chunk-3E2F4AHD.js} +8 -8
- package/dist/{chunk-VUR63NMQ.js.map → chunk-3E2F4AHD.js.map} +1 -1
- package/dist/{chunk-U37AYUPI.cjs → chunk-3FSXWVHW.cjs} +47 -234
- package/dist/chunk-3FSXWVHW.cjs.map +1 -0
- package/dist/{chunk-IL3WB3YX.cjs → chunk-4JNKXOFZ.cjs} +3 -3
- package/dist/{chunk-IL3WB3YX.cjs.map → chunk-4JNKXOFZ.cjs.map} +1 -1
- package/dist/{chunk-ODRHHWHY.cjs → chunk-4KMLM3GY.cjs} +4 -4
- package/dist/chunk-4KMLM3GY.cjs.map +1 -0
- package/dist/{chunk-MHFF5N65.cjs → chunk-757OYF6G.cjs} +4 -38
- package/dist/chunk-757OYF6G.cjs.map +1 -0
- package/dist/chunk-AXTDDWMR.js +16 -0
- package/dist/chunk-AXTDDWMR.js.map +1 -0
- package/dist/{chunk-B3AHCIV5.js → chunk-BJ24VPOA.js} +4 -55
- package/dist/chunk-BJ24VPOA.js.map +1 -0
- package/dist/chunk-C7PTF6BQ.cjs +172 -0
- package/dist/chunk-C7PTF6BQ.cjs.map +1 -0
- package/dist/{chunk-LZRMXJIE.js → chunk-COA3S3CZ.js} +3 -3
- package/dist/{chunk-LZRMXJIE.js.map → chunk-COA3S3CZ.js.map} +1 -1
- package/dist/{chunk-SUUPR735.js → chunk-CQPFW64W.js} +5 -5
- package/dist/{chunk-SUUPR735.js.map → chunk-CQPFW64W.js.map} +1 -1
- package/dist/chunk-D3WFIFRY.cjs +659 -0
- package/dist/chunk-D3WFIFRY.cjs.map +1 -0
- package/dist/{chunk-QXMR5YHC.js → chunk-DIB4JYUY.js} +19 -3
- package/dist/chunk-DIB4JYUY.js.map +1 -0
- package/dist/chunk-DVB5ZKOF.js +22 -0
- package/dist/chunk-DVB5ZKOF.js.map +1 -0
- package/dist/{chunk-VHJHY7TT.js → chunk-ECERC6TI.js} +3 -3
- package/dist/{chunk-VHJHY7TT.js.map → chunk-ECERC6TI.js.map} +1 -1
- package/dist/chunk-EDV7CYG6.cjs +18 -0
- package/dist/chunk-EDV7CYG6.cjs.map +1 -0
- package/dist/chunk-FAXXN7KI.cjs +213 -0
- package/dist/chunk-FAXXN7KI.cjs.map +1 -0
- package/dist/{chunk-2MJWWPHY.js → chunk-G4IYES7G.js} +140 -15
- package/dist/chunk-G4IYES7G.js.map +1 -0
- package/dist/{chunk-AINU3EJ6.cjs → chunk-GGTUMLCT.cjs} +93 -91
- package/dist/chunk-GGTUMLCT.cjs.map +1 -0
- package/dist/{chunk-QI6AIHWP.cjs → chunk-GOWXP5KT.cjs} +145 -14
- package/dist/chunk-GOWXP5KT.cjs.map +1 -0
- package/dist/{chunk-H74HEPKT.js → chunk-HGLC566X.js} +598 -13
- package/dist/chunk-HGLC566X.js.map +1 -0
- package/dist/{chunk-AO7SK6WP.cjs → chunk-ILM42LE6.cjs} +33 -33
- package/dist/{chunk-AO7SK6WP.cjs.map → chunk-ILM42LE6.cjs.map} +1 -1
- package/dist/{chunk-LTU35TQN.cjs → chunk-IPQ5MJ4Z.cjs} +636 -31
- package/dist/chunk-IPQ5MJ4Z.cjs.map +1 -0
- package/dist/{chunk-NRFAWUVD.js → chunk-JAANWQGB.js} +157 -157
- package/dist/chunk-JAANWQGB.js.map +1 -0
- package/dist/{chunk-7RJTEWYM.js → chunk-JGOST4IL.js} +350 -64
- package/dist/chunk-JGOST4IL.js.map +1 -0
- package/dist/chunk-KHXEIEXN.js +41 -0
- package/dist/chunk-KHXEIEXN.js.map +1 -0
- package/dist/chunk-KLPRAQCE.cjs +22 -0
- package/dist/chunk-KLPRAQCE.cjs.map +1 -0
- package/dist/chunk-KQYPP72K.js +644 -0
- package/dist/chunk-KQYPP72K.js.map +1 -0
- package/dist/chunk-KUT2Y7JF.cjs +43 -0
- package/dist/chunk-KUT2Y7JF.cjs.map +1 -0
- package/dist/{chunk-6YTHQ73P.cjs → chunk-LLYZGH3L.cjs} +3 -56
- package/dist/chunk-LLYZGH3L.cjs.map +1 -0
- package/dist/{chunk-YSHIC4NJ.cjs → chunk-LXTOOUEN.cjs} +159 -154
- package/dist/chunk-LXTOOUEN.cjs.map +1 -0
- package/dist/{chunk-EVUEIBNU.js → chunk-M4S75AEJ.js} +44 -5
- package/dist/chunk-M4S75AEJ.js.map +1 -0
- package/dist/{chunk-V5OAXIBN.cjs → chunk-NPR5BGFF.cjs} +11 -11
- package/dist/{chunk-V5OAXIBN.cjs.map → chunk-NPR5BGFF.cjs.map} +1 -1
- package/dist/{chunk-PLJ7PHWU.cjs → chunk-NS7NVX4E.cjs} +3 -3
- package/dist/{chunk-PLJ7PHWU.cjs.map → chunk-NS7NVX4E.cjs.map} +1 -1
- package/dist/{chunk-T5I4NRFP.cjs → chunk-NWNAYXC7.cjs} +9 -9
- package/dist/{chunk-T5I4NRFP.cjs.map → chunk-NWNAYXC7.cjs.map} +1 -1
- package/dist/{chunk-WIZ7Z7FN.js → chunk-Q6N6MZKO.js} +47 -222
- package/dist/chunk-Q6N6MZKO.js.map +1 -0
- package/dist/{chunk-I2QSDQQV.cjs → chunk-QT3A4PFC.cjs} +21 -2
- package/dist/chunk-QT3A4PFC.cjs.map +1 -0
- package/dist/{chunk-ZM26YEOT.js → chunk-RY2SODRN.js} +3 -3
- package/dist/{chunk-ZM26YEOT.js.map → chunk-RY2SODRN.js.map} +1 -1
- package/dist/chunk-SDOEHEJP.js +208 -0
- package/dist/chunk-SDOEHEJP.js.map +1 -0
- package/dist/{chunk-DETZZBG2.cjs → chunk-SIB6C7P7.cjs} +43 -2
- package/dist/chunk-SIB6C7P7.cjs.map +1 -0
- package/dist/{chunk-MFY2ZNP6.cjs → chunk-SMN32BQ3.cjs} +4 -4
- package/dist/chunk-SMN32BQ3.cjs.map +1 -0
- package/dist/chunk-TAWPVD6C.cjs +1956 -0
- package/dist/chunk-TAWPVD6C.cjs.map +1 -0
- package/dist/chunk-TC25LGIM.js +6584 -0
- package/dist/chunk-TC25LGIM.js.map +1 -0
- package/dist/{chunk-DAHCRVPM.js → chunk-TL45OJQE.js} +85 -83
- package/dist/chunk-TL45OJQE.js.map +1 -0
- package/dist/{chunk-AOSUHWIL.js → chunk-TZOQKV64.js} +4 -37
- package/dist/chunk-TZOQKV64.js.map +1 -0
- package/dist/chunk-UTVY63DG.js +16 -0
- package/dist/chunk-UTVY63DG.js.map +1 -0
- package/dist/chunk-V4YZXGXR.cjs +6751 -0
- package/dist/chunk-V4YZXGXR.cjs.map +1 -0
- package/dist/chunk-XRWHFMHK.js +19 -0
- package/dist/chunk-XRWHFMHK.js.map +1 -0
- package/dist/{chunk-O4YPVYPO.cjs → chunk-YAEXSCUW.cjs} +364 -60
- package/dist/chunk-YAEXSCUW.cjs.map +1 -0
- package/dist/chunk-YIFCLNII.cjs +18 -0
- package/dist/chunk-YIFCLNII.cjs.map +1 -0
- package/dist/chunk-Z27QMJ6S.cjs +25 -0
- package/dist/chunk-Z27QMJ6S.cjs.map +1 -0
- package/dist/{chunk-CSI2B2H5.js → chunk-Z4NQ3TED.js} +4 -4
- package/dist/chunk-Z4NQ3TED.js.map +1 -0
- package/dist/{chunk-DWZXSPMB.cjs → chunk-ZAVEMQ37.cjs} +3 -3
- package/dist/{chunk-DWZXSPMB.cjs.map → chunk-ZAVEMQ37.cjs.map} +1 -1
- package/dist/{chunk-DGV7HQA7.js → chunk-ZLEYLCE4.js} +4 -4
- package/dist/chunk-ZLEYLCE4.js.map +1 -0
- package/dist/chunk-ZNLTEZEF.js +170 -0
- package/dist/chunk-ZNLTEZEF.js.map +1 -0
- package/dist/chunk-ZO7PJMCO.js +1907 -0
- package/dist/chunk-ZO7PJMCO.js.map +1 -0
- package/dist/citations/index.cjs +14 -14
- package/dist/citations/index.js +2 -2
- package/dist/collaboration/index.cjs +36 -36
- package/dist/collaboration/index.js +2 -2
- package/dist/connect/docx.cjs +23 -28
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/docx.js +12 -28
- package/dist/connect/docx.js.map +1 -1
- package/dist/connect/index.cjs +8661 -2823
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +10 -2
- package/dist/connect/index.js +8468 -2671
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/viewer.cjs +1229 -0
- package/dist/connect/viewer.cjs.map +1 -0
- package/dist/connect/viewer.d.ts +8 -0
- package/dist/connect/viewer.js +1226 -0
- package/dist/connect/viewer.js.map +1 -0
- package/dist/connection/ConnectedWorkflowsTable.d.ts +2 -12
- package/dist/connection/ai.d.ts +2 -9
- package/dist/connection/billing/AddAddonDialog.d.ts +24 -0
- package/dist/connection/billing/BillingCard.d.ts +18 -0
- package/dist/connection/billing/BillingProjectEntity.d.ts +9 -0
- package/dist/connection/billing/ChangePlanDialog.d.ts +20 -0
- package/dist/connection/billing/ChangeProPlan.d.ts +20 -0
- package/dist/connection/billing/CheckoutTotal.d.ts +12 -0
- package/dist/connection/billing/DailyCapEditor.d.ts +4 -0
- package/dist/connection/billing/InvoicesModal.d.ts +6 -0
- package/dist/connection/billing/NewProjectFlow.d.ts +14 -0
- package/dist/connection/billing/PlanChangeLines.d.ts +13 -0
- package/dist/connection/billing/PlanSelector.d.ts +50 -0
- package/dist/connection/billing/ProjectBilling.d.ts +24 -0
- package/dist/connection/billing/ProjectDetail.d.ts +16 -0
- package/dist/connection/billing/ProjectUsageCard.d.ts +21 -0
- package/dist/connection/billing/ProjectUsageContent.d.ts +18 -0
- package/dist/connection/billing/ProjectsTable.d.ts +13 -0
- package/dist/connection/billing/ReduceAddonDialog.d.ts +18 -0
- package/dist/connection/billing/ReferralReward.d.ts +32 -0
- package/dist/connection/billing/SharedProjects.d.ts +13 -0
- package/dist/connection/billing/StripeCheckoutModal.d.ts +32 -0
- package/dist/connection/billing/SubscriptionPlans.d.ts +15 -0
- package/dist/connection/billing/SubscriptionStatus.d.ts +10 -0
- package/dist/connection/billing/addon-pricing.d.ts +97 -0
- package/dist/connection/billing/api-error.d.ts +6 -0
- package/dist/connection/billing/billing-country.d.ts +14 -0
- package/dist/connection/billing/billing-focus.d.ts +11 -0
- package/dist/connection/billing/index.d.ts +22 -0
- package/dist/connection/billing/plan-badge.d.ts +15 -0
- package/dist/connection/billing/plan-change-outcome.d.ts +15 -0
- package/dist/connection/billing/plan-constants.d.ts +29 -0
- package/dist/connection/billing/plan-pricing.d.ts +67 -0
- package/dist/connection/billing/quota-items.d.ts +33 -0
- package/dist/connection/billing/referral-reward.d.ts +28 -0
- package/dist/connection/billing/refusal-copy.d.ts +5 -0
- package/dist/connection/billing/reward-balance.d.ts +19 -0
- package/dist/connection/billing/support.d.ts +35 -0
- package/dist/connection/billing/tax-quote.d.ts +36 -0
- package/dist/connection/billing/useAddonPurchase.d.ts +32 -0
- package/dist/connection/billing/useAutoRefreshPendingProjects.d.ts +11 -0
- package/dist/connection/billing/useCheckoutQuote.d.ts +30 -0
- package/dist/connection/billing/useOpenBillingPortal.d.ts +12 -0
- package/dist/connection/calendar/CalendarSettingsDialog.d.ts +1 -1
- package/dist/connection/facts/ConnectedFactsPage.d.ts +50 -0
- package/dist/connection/facts/FactMarkdownEditor.d.ts +57 -0
- package/dist/connection/facts/FactSourcesPopover.d.ts +38 -0
- package/dist/connection/facts/FactTextEditor.d.ts +2 -0
- package/dist/connection/facts/factNouns.d.ts +4 -0
- package/dist/connection/facts/factPageColumns.d.ts +37 -0
- package/dist/connection/facts/types.d.ts +127 -0
- package/dist/connection/facts/useFactActions.d.ts +10 -0
- package/dist/connection/facts/useFactComposer.d.ts +54 -0
- package/dist/connection/facts/useFactFilters.d.ts +101 -0
- package/dist/connection/facts/useFactSelection.d.ts +82 -0
- package/dist/connection/facts/useFactsGrid.d.ts +87 -0
- package/dist/connection/facts/useFactsPageView.d.ts +4 -0
- package/dist/connection/mail/ConnectedMailComposer.d.ts +3 -1
- package/dist/connection/mail/ConnectedMailbox.d.ts +4 -2
- package/dist/connection/mail/MailComposerForm.d.ts +4 -2
- package/dist/connection/mail/MailRecipientInput.d.ts +14 -0
- package/dist/connection/mail/index.d.ts +1 -1
- package/dist/connection/mail/types.d.ts +10 -0
- package/dist/connection/search/ConnectedSearchPage.d.ts +64 -0
- package/dist/connection/search/SearchResultRows.d.ts +38 -0
- package/dist/connection/search/index.d.ts +2 -0
- package/dist/connection/tags/ConnectedTagTable.d.ts +108 -0
- package/dist/connection/tags/ConnectedTagsPage.d.ts +55 -0
- package/dist/connection/tags/DocTagPassages.d.ts +25 -0
- package/dist/connection/tags/GlossaryExport.d.ts +7 -0
- package/dist/connection/tags/TagCombineFilter.d.ts +14 -0
- package/dist/connection/tags/TagPlacement.d.ts +16 -0
- package/dist/connection/tags/TagsPageSections.d.ts +36 -0
- package/dist/connection/tags/tagCombine.d.ts +55 -0
- package/dist/connection/useConnectedWorkNotifications.d.ts +7 -24
- package/dist/connection/viewer/ConnectedDocumentToolsProvider.d.ts +11 -0
- package/dist/connection/viewer/ConnectedDocumentViewer.d.ts +21 -0
- package/dist/connection/viewer/FinaliseTranslationButton.d.ts +15 -0
- package/dist/connection/viewer/ViewerPdfPane.d.ts +46 -0
- package/dist/connection/viewer/support.d.ts +79 -0
- package/dist/connection/viewer/useImageCrop.d.ts +13 -0
- package/dist/connection/viewer/useViewedDocument.d.ts +70 -0
- package/dist/connection/viewer/useViewerBlobs.d.ts +15 -0
- package/dist/connection/viewer/useViewerTabs.d.ts +18 -0
- package/dist/connection/viewer/useViewerVersions.d.ts +11 -0
- package/dist/connection/workspace-settings/useConnectedWorkspaceSettings.d.ts +6 -0
- package/dist/document-tools/index.cjs +59 -652
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.js +2 -641
- package/dist/document-tools/index.js.map +1 -1
- package/dist/docx/index.cjs +48 -47
- package/dist/docx/index.js +4 -3
- package/dist/facts/FactsBulkBar.d.ts +6 -3
- package/dist/facts/cited-version-ref.d.ts +1 -0
- package/dist/facts/index.cjs +206 -1942
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.d.ts +1 -0
- package/dist/facts/index.js +15 -1897
- package/dist/facts/index.js.map +1 -1
- package/dist/files/ViewerChrome.d.ts +5 -4
- package/dist/files/ViewerControlBar.d.ts +12 -0
- package/dist/files/doc-labels.d.ts +35 -0
- package/dist/files/grid/FilterButton.d.ts +12 -0
- package/dist/files/grid/RowDensityControl.d.ts +18 -0
- package/dist/files/grid/row-density.d.ts +27 -0
- package/dist/files/index.cjs +779 -7100
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.d.ts +5 -0
- package/dist/files/index.js +14 -6919
- package/dist/files/index.js.map +1 -1
- package/dist/home/index.cjs +2 -2
- package/dist/home/index.js +2 -2
- package/dist/index.cjs +1041 -1257
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -357
- package/dist/index.js.map +1 -1
- package/dist/retrieval/SearchSnippet.d.ts +6 -0
- package/dist/retrieval/index.cjs +75 -42
- package/dist/retrieval/index.d.ts +2 -0
- package/dist/retrieval/index.js +3 -2
- package/dist/retrieval/search-results.d.ts +46 -0
- package/dist/settings/Billing.d.ts +0 -66
- package/dist/settings/SubscriptionParts.d.ts +1 -50
- package/dist/settings/index.cjs +170 -218
- package/dist/settings/index.d.ts +3 -2
- package/dist/settings/index.js +3 -3
- package/dist/settings/inverted-index-filter.d.ts +26 -0
- package/dist/shell/index.cjs +2 -2
- package/dist/shell/index.js +2 -2
- package/dist/studio/index.cjs +5 -5
- package/dist/studio/index.js +4 -4
- package/dist/tags/definitions.d.ts +10 -0
- package/dist/tags/index.d.ts +4 -1
- package/dist/tags/page/ExtractEntitiesDialog.d.ts +24 -0
- package/dist/tags/page/TagPicker.d.ts +16 -0
- package/dist/tags/page/tagsPageLabels.d.ts +36 -0
- package/dist/workflow-canvas/index.cjs +21 -22
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +8 -9
- package/dist/workflow-canvas/index.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +13 -4
- package/dist/calendar/access-setup.d.ts +0 -8
- package/dist/chunk-2MJWWPHY.js.map +0 -1
- package/dist/chunk-3AFWGEDJ.cjs +0 -53
- package/dist/chunk-3AFWGEDJ.cjs.map +0 -1
- package/dist/chunk-6YTHQ73P.cjs.map +0 -1
- package/dist/chunk-7RJTEWYM.js.map +0 -1
- package/dist/chunk-AINU3EJ6.cjs.map +0 -1
- package/dist/chunk-AOSUHWIL.js.map +0 -1
- package/dist/chunk-B3AHCIV5.js.map +0 -1
- package/dist/chunk-CSI2B2H5.js.map +0 -1
- package/dist/chunk-DAHCRVPM.js.map +0 -1
- package/dist/chunk-DETZZBG2.cjs.map +0 -1
- package/dist/chunk-DGV7HQA7.js.map +0 -1
- package/dist/chunk-EVUEIBNU.js.map +0 -1
- package/dist/chunk-H74HEPKT.js.map +0 -1
- package/dist/chunk-I2QSDQQV.cjs.map +0 -1
- package/dist/chunk-J5CWKFSC.js +0 -170
- package/dist/chunk-J5CWKFSC.js.map +0 -1
- package/dist/chunk-LTU35TQN.cjs.map +0 -1
- package/dist/chunk-MFY2ZNP6.cjs.map +0 -1
- package/dist/chunk-MHFF5N65.cjs.map +0 -1
- package/dist/chunk-NRFAWUVD.js.map +0 -1
- package/dist/chunk-O4YPVYPO.cjs.map +0 -1
- package/dist/chunk-ODRHHWHY.cjs.map +0 -1
- package/dist/chunk-QI6AIHWP.cjs.map +0 -1
- package/dist/chunk-QXMR5YHC.js.map +0 -1
- package/dist/chunk-RFXJYIDV.js +0 -50
- package/dist/chunk-RFXJYIDV.js.map +0 -1
- package/dist/chunk-U37AYUPI.cjs.map +0 -1
- package/dist/chunk-WIZ7Z7FN.js.map +0 -1
- package/dist/chunk-XVUOMWMD.cjs +0 -177
- package/dist/chunk-XVUOMWMD.cjs.map +0 -1
- package/dist/chunk-YSHIC4NJ.cjs.map +0 -1
- package/dist/connection/ConnectedTagTable.d.ts +0 -32
- package/dist/connection/calendar/CopyField.d.ts +0 -9
- package/dist/connection/calendar/OpenAccessPanel.d.ts +0 -7
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProjectUsageContent — inline AI usage breakdown for a project.
|
|
3
|
+
*
|
|
4
|
+
* SVG line chart with composite color-coded lines.
|
|
5
|
+
* Toggle between breakdowns: User (default), Workspace, Model Tier.
|
|
6
|
+
* Resolves usr-xxx / wrk-xxx IDs to real names via workspace data.
|
|
7
|
+
* Data from LiteLLM via /v1/user/projects/{id}/usage.
|
|
8
|
+
*
|
|
9
|
+
* Rendered inline in the project card expander (no dialog).
|
|
10
|
+
*/
|
|
11
|
+
interface ProjectUsageContentProps {
|
|
12
|
+
projectExtId: string;
|
|
13
|
+
projectName: string;
|
|
14
|
+
/** Monthly AI usage quota in £ (quotas.ai_usage.limit) — enables the % indicator */
|
|
15
|
+
aiUsageLimit?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function ProjectUsageContent({ projectExtId, projectName, aiUsageLimit, }: ProjectUsageContentProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProjectsTable
|
|
3
|
+
*
|
|
4
|
+
* Compact list of the user's own projects. Each project is a single clickable
|
|
5
|
+
* line that opens the project's usage detail in its own tab; rename / delete /
|
|
6
|
+
* invoices / upgrade live as hover actions on the right. Plan + quota info only
|
|
7
|
+
* appears when Stripe billing is enabled (no plan concept otherwise).
|
|
8
|
+
*
|
|
9
|
+
* Projects owned by someone else aren't listed here — they're surfaced on the
|
|
10
|
+
* workspace cards the user collaborates on.
|
|
11
|
+
*/
|
|
12
|
+
/** The user's own projects: plan, usage, upgrade and invoices; a row opens the project. */
|
|
13
|
+
export declare function ProjectsTable(): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReduceAddonDialog — confirm removing one AI usage / storage block (−£25 / −25 GB) from the next period.
|
|
3
|
+
*
|
|
4
|
+
* One click on "−" opens it; one click confirms. The reduction applies from the next renewal (`period_end`): this
|
|
5
|
+
* period's allowance stays until then and nothing is refunded, so an automatic top-up can be turned back down to
|
|
6
|
+
* cover only the current period. Each confirm removes one more block from what renews (today's blocks go first;
|
|
7
|
+
* legacy blocks keep their old size). Storage can't renew below what the files need (`storage_blocks_min`).
|
|
8
|
+
*/
|
|
9
|
+
import type { components } from '@arbidocs/client';
|
|
10
|
+
import { type AddonKind } from './useAddonPurchase';
|
|
11
|
+
type ProjectResponse = components['schemas']['ProjectResponse'];
|
|
12
|
+
export declare function ReduceAddonDialog({ kind, project, open, onOpenChange, }: {
|
|
13
|
+
kind: AddonKind;
|
|
14
|
+
project: ProjectResponse;
|
|
15
|
+
open: boolean;
|
|
16
|
+
onOpenChange: (open: boolean) => void;
|
|
17
|
+
}): import("react").JSX.Element | null;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReferralReward — binds the user's referral reward to the reward blocks.
|
|
3
|
+
*
|
|
4
|
+
* The reward is a single GLOBAL per-user Stripe account balance (mirrored read-only
|
|
5
|
+
* into `settings.extra_discount`) that auto-applies to the user's NEXT invoice. Surfaced as:
|
|
6
|
+
* - `ReferralRewardBadge` — standing indicator in the Projects tab header.
|
|
7
|
+
* - `ReferralRewardSummary` — "subtotal / −reward / you pay now" where the charge is known
|
|
8
|
+
* exactly (new-project first invoice == the shown total).
|
|
9
|
+
* - `ReferralRewardNote` — a one-line note where the exact charge is a proration we
|
|
10
|
+
* can't compute client-side (switching an existing Pro plan).
|
|
11
|
+
*
|
|
12
|
+
* Logic + the `useReferralReward` hook live in `./referral-reward`; the presentation in
|
|
13
|
+
* `@arbidocs/blocks`.
|
|
14
|
+
*/
|
|
15
|
+
/** Standing pill for the Projects tab header — the global available reward. */
|
|
16
|
+
export declare function ReferralRewardBadge(): import("react").JSX.Element | null;
|
|
17
|
+
/**
|
|
18
|
+
* Available referral reward shown alongside a new-project purchase. When the exact charge is
|
|
19
|
+
* known (`totalCents` + `currency`), we do the math and show subtotal / −reward / you pay now;
|
|
20
|
+
* otherwise we fall back to a one-line note. Renders nothing when there's no reward.
|
|
21
|
+
*/
|
|
22
|
+
export declare function ReferralRewardSummary({ totalCents, currency, }: {
|
|
23
|
+
/** The known charge for this purchase, in minor units (e.g. pennies). */
|
|
24
|
+
totalCents?: number;
|
|
25
|
+
/** Currency of the charge — must match the reward's currency to apply. */
|
|
26
|
+
currency?: string;
|
|
27
|
+
}): import("react").JSX.Element | null;
|
|
28
|
+
/**
|
|
29
|
+
* One-line note for charges whose exact amount is a proration we don't compute client-side
|
|
30
|
+
* (switching an existing Pro subscription). Stripe applies the reward at charge time.
|
|
31
|
+
*/
|
|
32
|
+
export declare function ReferralRewardNote(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Projects shared with you — the collaborator's view of other people's
|
|
3
|
+
* projects. You draw on their budget under a personal daily cap, and that
|
|
4
|
+
* allowance is the ONLY number that is yours to see: no plan, no billing,
|
|
5
|
+
* no project totals (the backend doesn't share them with non-owners, and
|
|
6
|
+
* pretending otherwise is what made this surface cryptic). Renders on every
|
|
7
|
+
* deployment — quotas are not a billing feature.
|
|
8
|
+
*
|
|
9
|
+
* `used_gbp` is the user's deployment-wide spend today; pairing it with
|
|
10
|
+
* each project's `daily_cap_per_user` is the sanctioned reading (see
|
|
11
|
+
* useUserUsageToday of @arbidocs/react).
|
|
12
|
+
*/
|
|
13
|
+
export declare function SharedProjects(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StripeCheckoutModal Component
|
|
3
|
+
*
|
|
4
|
+
* Modal with embedded Stripe checkout for a Pro subscription.
|
|
5
|
+
* Uses Stripe Elements for secure payment processing.
|
|
6
|
+
* Checkout is scoped to a specific project.
|
|
7
|
+
*/
|
|
8
|
+
import { type TaxQuote } from './tax-quote';
|
|
9
|
+
interface StripeCheckoutModalProps {
|
|
10
|
+
projectExtId: string;
|
|
11
|
+
/** Pro billing interval: monthly or annual. */
|
|
12
|
+
interval: 'month' | 'year';
|
|
13
|
+
/** Monthly usage cap chosen at checkout (pence); null/omitted keeps the default. */
|
|
14
|
+
addonBudgetPence?: number | null;
|
|
15
|
+
/** Add-on blocks bought with the plan (+£25 of AI usage a month / +25 GB each): on the first invoice. */
|
|
16
|
+
aiBlocks?: number;
|
|
17
|
+
storageBlocks?: number;
|
|
18
|
+
promoCode?: string;
|
|
19
|
+
/** ISO-2 billing country picked before checkout; prefills the Stripe customer's address. */
|
|
20
|
+
billingCountry?: string;
|
|
21
|
+
/** ZIP / postcode, where the tax depends on it (e.g. the US). */
|
|
22
|
+
postalCode?: string;
|
|
23
|
+
/** The total quoted before checkout, repeated above Stripe's summary. */
|
|
24
|
+
quote?: TaxQuote;
|
|
25
|
+
open: boolean;
|
|
26
|
+
onOpenChange: (open: boolean) => void;
|
|
27
|
+
/** Called when Stripe reports the payment completed (before the dialog closes),
|
|
28
|
+
* so callers can distinguish a successful checkout from a cancel/close. */
|
|
29
|
+
onCompleted?: () => void;
|
|
30
|
+
}
|
|
31
|
+
export declare function StripeCheckoutModal({ projectExtId, interval, addonBudgetPence, aiBlocks, storageBlocks, promoCode, billingCountry, postalCode, quote, open, onOpenChange, onCompleted, }: StripeCheckoutModalProps): import("react").JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SubscriptionPlans — upgrade a Free project to Pro (monthly or annual).
|
|
3
|
+
* Rendered inside the plan dialog. The total for the billing country (incl. tax) is quoted here,
|
|
4
|
+
* before Stripe Checkout opens.
|
|
5
|
+
*/
|
|
6
|
+
interface SubscriptionPlansProps {
|
|
7
|
+
projectExtId: string;
|
|
8
|
+
/** Declining the upgrade. When set, an explicit opt-out sits under Subscribe —
|
|
9
|
+
* a dialog that opens on you (the welcome modal) needs a way out that isn't the
|
|
10
|
+
* corner ✕. Omitted where the plans render inline (settings), which has no
|
|
11
|
+
* dialog to close. */
|
|
12
|
+
onDismiss?: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function SubscriptionPlans({ projectExtId, onDismiss }: SubscriptionPlansProps): import("react").JSX.Element | null;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SubscriptionStatus: binds a project's quotas and billing state to the blocks status view
|
|
3
|
+
* (AI usage reset date, canceling notice, quota meters).
|
|
4
|
+
*/
|
|
5
|
+
import type { components } from '@arbidocs/client';
|
|
6
|
+
interface SubscriptionStatusProps {
|
|
7
|
+
project: components['schemas']['ProjectResponse'];
|
|
8
|
+
}
|
|
9
|
+
export declare function SubscriptionStatus({ project }: SubscriptionStatusProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/** Add-on block price helpers (VAT-inclusive pence from `project.addons`). */
|
|
2
|
+
import type { components } from '@arbidocs/client';
|
|
3
|
+
import type { AddonKind } from './useAddonPurchase';
|
|
4
|
+
type ProjectAddons = components['schemas']['ProjectAddons'];
|
|
5
|
+
/** "3 Nov 2026". */
|
|
6
|
+
export declare function formatPeriodEnd(unix: number | null | undefined): string | null;
|
|
7
|
+
/** What one more block of this kind costs right now, incl. UK VAT. */
|
|
8
|
+
export declare function addonPricePence(kind: AddonKind, addons: ProjectAddons): number;
|
|
9
|
+
/** The same price ex VAT. */
|
|
10
|
+
export declare function addonPriceExVatPence(kind: AddonKind, addons: ProjectAddons): number;
|
|
11
|
+
/**
|
|
12
|
+
* The PUT /addons/settings body (the monthly usage cap and the automatic add-on trigger) from the current add-on
|
|
13
|
+
* state with the given changes applied.
|
|
14
|
+
*/
|
|
15
|
+
export declare function addonSettingsBody(addons: ProjectAddons, change?: Partial<{
|
|
16
|
+
spend_cap_pence: number | null;
|
|
17
|
+
auto_topup_threshold_gbp: number;
|
|
18
|
+
}>): {
|
|
19
|
+
spend_cap_pence: number | null;
|
|
20
|
+
auto_topup_threshold_gbp: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Of `count` blocks of a kind, how many are on an earlier catalogue's price (legacy, at their old size: £10 of AI
|
|
24
|
+
* usage or 10 GB) and how many on today's. A reduction removes today's blocks first, so the legacy ones are the
|
|
25
|
+
* last kept.
|
|
26
|
+
*/
|
|
27
|
+
export declare function splitBlocks(kind: AddonKind, count: number, addons: ProjectAddons): {
|
|
28
|
+
legacy: number;
|
|
29
|
+
current: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* "2 × £25 of AI usage", "1 × £10 + 1 × £25 of AI usage", "1 × 10 GB + 2 × 25 GB": `count` blocks of a kind, the
|
|
33
|
+
* legacy ones (kept last on a reduction) at their old size.
|
|
34
|
+
*/
|
|
35
|
+
export declare function blocksLabel(kind: AddonKind, count: number, addons: ProjectAddons): string;
|
|
36
|
+
/**
|
|
37
|
+
* Bounds for "Reduce from next period": keep `min`..`current` blocks. `next` is what renews
|
|
38
|
+
* now (a pending reduction, or the current count). Storage can't go below what usage needs.
|
|
39
|
+
*/
|
|
40
|
+
export declare function reduceBounds(kind: AddonKind, addons: ProjectAddons): {
|
|
41
|
+
min: number;
|
|
42
|
+
current: number;
|
|
43
|
+
next: number;
|
|
44
|
+
};
|
|
45
|
+
/** What one add-on renews at: "£25/month + VAT" or "£225/year + VAT". */
|
|
46
|
+
export declare function blockRenewalShort(kind: AddonKind, addons: ProjectAddons, isAnnual: boolean): string;
|
|
47
|
+
/** The extra line annual plans show beside an AI usage add-on or upgrade price. */
|
|
48
|
+
export declare const ANNUAL_PREMIUM_AI_NOTE = "No markup on Premium AI on annual plans";
|
|
49
|
+
/** The confirm dialog's figures: charged now (incl. / ex VAT), what it covers until, then what renews. */
|
|
50
|
+
export declare function addonCharge(kind: AddonKind, addons: ProjectAddons, isAnnual: boolean, periodEnd: number | null | undefined): {
|
|
51
|
+
now: string;
|
|
52
|
+
nowExVat: string;
|
|
53
|
+
nowVat: string;
|
|
54
|
+
until: string | null;
|
|
55
|
+
then: string;
|
|
56
|
+
};
|
|
57
|
+
/** Why automatic top-ups stopped (one line; the price of a step is on the Add button). */
|
|
58
|
+
export declare const CAP_REACHED_MESSAGE = "Usage cap reached: no more automatic top-ups this month.";
|
|
59
|
+
/** The £0 usage cap: no automatic top-ups (adding by hand still works). */
|
|
60
|
+
export declare const ZERO_BUDGET_MESSAGE = "Automatic top-ups are off (\u00A30 usage cap).";
|
|
61
|
+
/** The usage cap's heading wherever it is edited or shown. */
|
|
62
|
+
export declare const USAGE_CAP_LABEL = "Usage cap";
|
|
63
|
+
/** What the usage cap means (in "More info"): £0 and "No limit" explained. */
|
|
64
|
+
export declare const USAGE_CAP_HELP: string;
|
|
65
|
+
/** A £0 cap turns automatic top-ups off (manual adds still work). */
|
|
66
|
+
export declare function isAddonBudgetZero(addons: Pick<ProjectAddons, 'spend_cap_pence'>): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* How much more of a resource automatic top-ups may add this month before the usage cap stops them, in the
|
|
69
|
+
* resource's unit (£ of AI usage / GB): the whole blocks the cap left pays for at today's ex-VAT price. `null` =
|
|
70
|
+
* no limit; 0 with a £0 cap or when not even one block fits.
|
|
71
|
+
*/
|
|
72
|
+
export declare function autoRoom(kind: AddonKind, addons: ProjectAddons): number | null;
|
|
73
|
+
/** The size of the block a one-step reduction removes from what renews (today's blocks go first). */
|
|
74
|
+
export declare function nextRemovedBlockSize(kind: AddonKind, addons: ProjectAddons): number;
|
|
75
|
+
/**
|
|
76
|
+
* Pounds typed into a usage cap field → pence. '' → the default (null); invalid → undefined.
|
|
77
|
+
* Equal to the default is also sent as null ("keep the default").
|
|
78
|
+
*/
|
|
79
|
+
export declare function parseBudgetPounds(value: string): number | null | undefined;
|
|
80
|
+
/** Toast after saving the usage cap. */
|
|
81
|
+
export declare function budgetSavedMessage(capPence: number | null): string;
|
|
82
|
+
/** "£25 of AI usage" / "25 GB". */
|
|
83
|
+
export declare function stepLabel(kind: AddonKind, size: number): string;
|
|
84
|
+
/** The PUT /addons/next-period body that renews `keep` blocks of `kind` (the other kind unchanged). */
|
|
85
|
+
export declare function nextPeriodBody(kind: AddonKind, keep: number): {
|
|
86
|
+
ai_blocks: number;
|
|
87
|
+
storage_blocks: null;
|
|
88
|
+
} | {
|
|
89
|
+
ai_blocks: null;
|
|
90
|
+
storage_blocks: number;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* The "+" step's price line, ex VAT: "£25/month · today £25" (annual: "£18.75/month · today £150");
|
|
94
|
+
* storage, charged for the rest of the period: "£25/month · prorated today £8.33".
|
|
95
|
+
*/
|
|
96
|
+
export declare function addStepCaption(kind: AddonKind, addons: ProjectAddons): string;
|
|
97
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `detail` of a refused billing call: the response body's `detail` (a string, or the
|
|
3
|
+
* `{code, message}` of a payment refusal), whether the error is an SDK `ArbiApiError` (body in
|
|
4
|
+
* `apiError`) or the body itself.
|
|
5
|
+
*/
|
|
6
|
+
export declare function apiErrorDetail(error: unknown): unknown;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Billing country chosen before checkout (ISO 3166-1 alpha-2). Sent to the checkout API as
|
|
3
|
+
* `billing_country` so the backend can prefill the Stripe customer's address, and Stripe Tax shows
|
|
4
|
+
* the tax-inclusive total from the first frame.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEFAULT_BILLING_COUNTRY = "GB";
|
|
7
|
+
export declare const BILLING_COUNTRY_CODES: readonly string[];
|
|
8
|
+
/** The select's options: the United Kingdom first, then every other country by name. */
|
|
9
|
+
export declare function billingCountryOptions(): {
|
|
10
|
+
code: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}[];
|
|
13
|
+
/** The region of the browser's first locale that names a country ("en-US" → "US"), else GB. */
|
|
14
|
+
export declare function defaultBillingCountry(languages?: readonly string[]): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ProjectBillingFocus {
|
|
2
|
+
projectExtId: string;
|
|
3
|
+
/** Open the project's upgrade dialog. */
|
|
4
|
+
openUpgrade: boolean;
|
|
5
|
+
/** Scroll to and focus this card of the project's billing. */
|
|
6
|
+
section?: 'spend-cap';
|
|
7
|
+
}
|
|
8
|
+
/** Ask the billing UI to focus a project (or clear the request with `null`). */
|
|
9
|
+
export declare function requestProjectBillingFocus(next: ProjectBillingFocus | null): void;
|
|
10
|
+
/** The pending billing focus request, if any. */
|
|
11
|
+
export declare function useProjectBillingFocus(): ProjectBillingFocus | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The billing kit: a host's projects (plan, usage, add-ons, invoices), the plan picker and checkout,
|
|
3
|
+
* new projects, and the projects shared with the user. Stripe stays the host's
|
|
4
|
+
* (`BillingSupportProvider`); without it projects show their limits and usage only.
|
|
5
|
+
*/
|
|
6
|
+
export { BillingSupportProvider, useBillingSupport, type BillingSupport, type BillingCheckoutSupport, } from './support';
|
|
7
|
+
export { requestProjectBillingFocus, useProjectBillingFocus, type ProjectBillingFocus, } from './billing-focus';
|
|
8
|
+
export { ProjectsTable } from './ProjectsTable';
|
|
9
|
+
export { SharedProjects } from './SharedProjects';
|
|
10
|
+
export { ProjectDetail, type ProjectDetailProps } from './ProjectDetail';
|
|
11
|
+
export { NewProjectFlow } from './NewProjectFlow';
|
|
12
|
+
export { ChangePlanDialog } from './ChangePlanDialog';
|
|
13
|
+
export { AddAddonDialog } from './AddAddonDialog';
|
|
14
|
+
export { InvoicesModal } from './InvoicesModal';
|
|
15
|
+
export { BillingProjectEntity, type BillingProjectEntityProps } from './BillingProjectEntity';
|
|
16
|
+
export { useOpenBillingPortal } from './useOpenBillingPortal';
|
|
17
|
+
export { useAutoRefreshPendingProjects } from './useAutoRefreshPendingProjects';
|
|
18
|
+
export { formatMoney, useRewardBalance, type RewardBalance } from './reward-balance';
|
|
19
|
+
export { REFERRAL_OFFER, useReferralReward } from './referral-reward';
|
|
20
|
+
export { isProProject, planBadgeView, planName } from './plan-badge';
|
|
21
|
+
export { aiUsageResetTimestamp, formatResetDate, getQuotaItems } from './quota-items';
|
|
22
|
+
export { CAP_REACHED_MESSAGE, ZERO_BUDGET_MESSAGE, isAddonBudgetZero } from './addon-pricing';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PlanBadgeProps } from '../../settings';
|
|
2
|
+
import type { components } from '@arbidocs/client';
|
|
3
|
+
type ProjectBillingFields = Pick<components['schemas']['ProjectResponse'], 'subscription' | 'plan_interval'> & Partial<Pick<components['schemas']['ProjectResponse'], 'packs' | 'addons'>>;
|
|
4
|
+
/** A project is on Pro when it has a billing interval (null = Free or checkout pending). */
|
|
5
|
+
export declare function isProProject(project: Pick<ProjectBillingFields, 'plan_interval'>): boolean;
|
|
6
|
+
/** "Pro", or a legacy multi-pack plan's name ("Pro ×N") — the API's name when it sends one (owner view). */
|
|
7
|
+
export declare function proTierName(project: ProjectBillingFields): string;
|
|
8
|
+
/** "Free", "Pro monthly", "Pro annual", "Pro ×3 monthly" (legacy) or "Dev" — the full plan name. */
|
|
9
|
+
export declare function planName(project: ProjectBillingFields): string;
|
|
10
|
+
/**
|
|
11
|
+
* Maps a project's billing state to the `PlanBadge` block's label + tone.
|
|
12
|
+
* Pro reads as accent, Free/dev as neutral, payment trouble or cancelling as pending.
|
|
13
|
+
*/
|
|
14
|
+
export declare function planBadgeView(project: ProjectBillingFields): Pick<PlanBadgeProps, 'label' | 'tone'>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What change-plan did, from `ProjectResponse.plan_change`, as one notification:
|
|
3
|
+
* - upgraded → "Upgraded to Pro · £48.00 charged"
|
|
4
|
+
* - scheduled → "Scheduled for 16 Nov 2026"
|
|
5
|
+
* - requires_action → "Confirm with your bank. Nothing is charged until you do." + Confirm
|
|
6
|
+
* - unchanged / no outcome → the caller's own message.
|
|
7
|
+
*/
|
|
8
|
+
import type { components } from '@arbidocs/client';
|
|
9
|
+
type ProjectResponse = components['schemas']['ProjectResponse'];
|
|
10
|
+
export declare const BANK_CONFIRM_PLAN_CHANGE = "Confirm with your bank. Nothing is charged until you do.";
|
|
11
|
+
/** Returns the outcome's result, so callers can tell a finished upgrade from one still waiting. */
|
|
12
|
+
export declare function notifyPlanChange(data: ProjectResponse | undefined, fallback: string,
|
|
13
|
+
/** The plan an upgrade went to, when the caller knows it. */
|
|
14
|
+
planName?: string): 'upgraded' | 'scheduled' | 'unchanged' | 'requires_action' | null;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Pro's allowance per month (one licence) — must match the backend. Legacy multi-pack plans get it per pack.
|
|
2
|
+
* The live numbers for an existing project come from `project.addons`; these are only for
|
|
3
|
+
* describing the plan before a project exists (new-project dialog, upgrade picker). */
|
|
4
|
+
export declare const PRO_AI_GBP = 10;
|
|
5
|
+
export declare const PRO_STORAGE_GB = 5;
|
|
6
|
+
/**
|
|
7
|
+
* Add-on block sizes (£25 of AI usage or 25 GB), the same on every plan. Their prices come from the
|
|
8
|
+
* products API (`addon_prices`) before a project exists, and from `project.addons` after.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ADDON_BLOCK_AI_GBP = 25;
|
|
11
|
+
export declare const STORAGE_BLOCK_GB = 25;
|
|
12
|
+
/** Default monthly usage cap for a new Pro project (pence); it limits automatic top-ups only. 0 = no automatic
|
|
13
|
+
* top-ups, null = no limit. */
|
|
14
|
+
export declare const DEFAULT_SPEND_CAP_PENCE = 10000;
|
|
15
|
+
/** The automatic add-on triggers when less than this much AI usage (£) remains; the backend minimum. */
|
|
16
|
+
export declare const MIN_AUTO_TOPUP_THRESHOLD_GBP = 1;
|
|
17
|
+
/** Free-tier quotas — must match backend FREE_* constants in src/constants.py
|
|
18
|
+
* (FREE_AI_GBP=1, FREE_STORAGE_GB=0.05 → 50 MB, FREE_COLLABORATORS=0). */
|
|
19
|
+
export declare const FREE_AI_GBP = 1;
|
|
20
|
+
export declare const FREE_STORAGE_MB = 50;
|
|
21
|
+
export declare const FREE_COLLABORATORS = 0;
|
|
22
|
+
/** Collaborator limits at or above this are "unlimited" (the backend reports 999 for Pro/dev). */
|
|
23
|
+
export declare const UNLIMITED_COLLABORATORS = 999;
|
|
24
|
+
/**
|
|
25
|
+
* Suggested initial daily per-user AI usage cap (£), pre-filled when creating
|
|
26
|
+
* a new project. The user can clear it to create a project with no cap.
|
|
27
|
+
* Backend treats null as "no enforcement" — there is no server-side default.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SUGGESTED_DAILY_CAP_PER_USER = 10;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pro plan price helpers. Prices come from Stripe via GET /v1/user/products (source of truth).
|
|
3
|
+
* One plan is sold: Pro, one licence (£10 of AI usage + 5 GB a month). Each price lists
|
|
4
|
+
* `pack_prices` for that one licence — `amount` incl. UK VAT and `amount_ex_vat` — and
|
|
5
|
+
* `addon_prices` (one add-on block on that interval). Display them as-is.
|
|
6
|
+
* Legacy subscriptions with several packs keep working; their name and price come from the project.
|
|
7
|
+
*/
|
|
8
|
+
import type { components } from '@arbidocs/client';
|
|
9
|
+
type PlanChangePreview = components['schemas']['PlanChangePreview'];
|
|
10
|
+
type ProductPrice = components['schemas']['ProductPrice'];
|
|
11
|
+
type ProductResponse = components['schemas']['ProductResponse'];
|
|
12
|
+
type PackPrice = components['schemas']['PackPrice'];
|
|
13
|
+
type AddonPrice = components['schemas']['AddonPrice'];
|
|
14
|
+
export type PlanInterval = 'month' | 'year';
|
|
15
|
+
/** The headline price: "£40 + VAT". */
|
|
16
|
+
export declare function plusVat(exVatPence: number, currency?: string): string;
|
|
17
|
+
/** The one licence Pro sells. Other pack counts exist only on legacy subscriptions (displayed, not sold). */
|
|
18
|
+
export declare const PRO_PACKS = 1;
|
|
19
|
+
/** A plan the pickers offer. */
|
|
20
|
+
export type PlanChoice = 'free' | 'pro';
|
|
21
|
+
/** Packs per plan choice (0 = Free). */
|
|
22
|
+
export declare const PLAN_CHOICE_PACKS: Record<PlanChoice, number>;
|
|
23
|
+
/** "Free" (0), "Pro" (1), otherwise "Pro ×N" (a legacy multi-pack plan; the API's own name wins). */
|
|
24
|
+
export declare function planNameForPacks(packs: number | null | undefined): string;
|
|
25
|
+
/** The plan-change panel's fixed lines, each with a test id. */
|
|
26
|
+
export interface PlanChangeLine {
|
|
27
|
+
id: 'pay-today' | 'from' | 'current-until' | 'no-change' | 'awaiting-bank';
|
|
28
|
+
text: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* What a plan change costs, from the backend's Stripe invoice preview (taxed for the customer's
|
|
32
|
+
* address), as fixed lines:
|
|
33
|
+
* - "Pay today £42.00 incl. VAT (£35.00 + £7.00 VAT 20%)" ("Pay today £0" for a change that waits)
|
|
34
|
+
* - "From 16 Nov 2026: £210.00 incl. VAT (£175.00 + £35.00 VAT 20%) a month"
|
|
35
|
+
* - "Current plan until 16 Nov 2026" for a change that waits for the period end.
|
|
36
|
+
* "No change" when the selection is what the project already has; "Waiting for your bank" while
|
|
37
|
+
* an earlier upgrade payment awaits 3-D Secure.
|
|
38
|
+
*/
|
|
39
|
+
export declare function planPreviewLines(preview: PlanChangePreview): PlanChangeLine[];
|
|
40
|
+
/** Stand-in for "Pay today" when the preview failed for an upgrade. */
|
|
41
|
+
export declare const PAY_TODAY_UNPRICED = "Pay today: the difference for the rest of this period";
|
|
42
|
+
/** One add-on block's price on this interval's plan price (`addon_prices`), if listed. */
|
|
43
|
+
export declare function addonPrice(price: ProductPrice | undefined, kind?: 'ai_usage' | 'storage'): AddonPrice | undefined;
|
|
44
|
+
/** Per add-on block of `kind` per month, ex VAT (annual plans: the monthly equivalent). */
|
|
45
|
+
export declare function addonMonthlyExVat(price: ProductPrice | undefined, kind?: 'ai_usage' | 'storage'): number | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The add-on offer on this interval's price, each block with its own price:
|
|
48
|
+
* "£25 of AI usage for £25/month + VAT or 25 GB for £25/month + VAT". Null when unlisted.
|
|
49
|
+
*/
|
|
50
|
+
export declare function addonOfferText(price: ProductPrice | undefined): string | null;
|
|
51
|
+
/** What a checkout buys: "Pro", "Pro + 2 × £25 of AI usage + 1 × 25 GB". */
|
|
52
|
+
export declare function checkoutItemsLabel(aiBlocks: number, storageBlocks: number): string;
|
|
53
|
+
/** The price of `packs` packs on this interval's price, if Stripe lists it (only one licence is listed). */
|
|
54
|
+
export declare function packPrice(price: ProductPrice | undefined, packs?: number): PackPrice | undefined;
|
|
55
|
+
export interface ProPrices {
|
|
56
|
+
monthly?: ProductPrice;
|
|
57
|
+
annual?: ProductPrice;
|
|
58
|
+
}
|
|
59
|
+
/** The Pro product's monthly and annual prices (default price per interval wins). */
|
|
60
|
+
export declare function findProPrices(products: ProductResponse[] | undefined): ProPrices;
|
|
61
|
+
/** Annual savings vs 12 × monthly, as a whole percent (e.g. £360 vs £480 → 25). */
|
|
62
|
+
export declare function calcSavingsPercent(monthlyPrice: ProductPrice | undefined, annualPrice: ProductPrice | undefined): number | null;
|
|
63
|
+
/** Most add-on blocks of each kind a checkout may include (the backend's limit). */
|
|
64
|
+
export declare const MAX_CHECKOUT_BLOCKS = 100;
|
|
65
|
+
/** "£25/month + VAT each", annual: "£225/year + VAT each": one block on the chosen interval. */
|
|
66
|
+
export declare function checkoutBlockPriceText(price: ProductPrice | undefined, kind: 'ai_usage' | 'storage'): string | null;
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quota display — single source of truth.
|
|
3
|
+
*
|
|
4
|
+
* Builds the icon / label / formatted used-of-limit strings for a project's
|
|
5
|
+
* quotas (AI usage in £, storage, collaborators). Shared by QuotaBadges and the
|
|
6
|
+
* project tooltip so the numbers and units can never disagree (storage in GB on
|
|
7
|
+
* plans of 1 GB or more, MB below).
|
|
8
|
+
*/
|
|
9
|
+
import type { QuotaMeterItem } from '../../settings';
|
|
10
|
+
import type { components } from '@arbidocs/client';
|
|
11
|
+
type Quotas = components['schemas']['ProjectResponse']['quotas'];
|
|
12
|
+
/** "May 31, 2025" — the one format every AI-usage-reset mention uses. */
|
|
13
|
+
export declare function formatResetDate(unixTimestamp: number | null | undefined): string | null;
|
|
14
|
+
/**
|
|
15
|
+
* When the project's AI usage allowance next resets, as a unix timestamp.
|
|
16
|
+
* Pro projects report it directly (`addons.ai_usage_reset_at` — monthly, even on an
|
|
17
|
+
* annual plan); monthly subscriptions otherwise reset with the billing period
|
|
18
|
+
* (`current_period_end`); free projects reset on the backend-stamped signup
|
|
19
|
+
* anniversary (`quotas.budget_reset_at`). Only a FUTURE date is returned — a stale
|
|
20
|
+
* past stamp would read as a bug, not a promise.
|
|
21
|
+
*/
|
|
22
|
+
export declare function aiUsageResetTimestamp(project: {
|
|
23
|
+
quotas?: {
|
|
24
|
+
budget_reset_at?: number | null;
|
|
25
|
+
} | null;
|
|
26
|
+
current_period_end?: number | null;
|
|
27
|
+
plan_interval?: string | null;
|
|
28
|
+
addons?: {
|
|
29
|
+
ai_usage_reset_at?: number | null;
|
|
30
|
+
} | null;
|
|
31
|
+
}): number | null;
|
|
32
|
+
export declare function getQuotaItems(quotas: Quotas): QuotaMeterItem[];
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Referral-reward logic (hook + pure helpers) shared across the pricing UI.
|
|
3
|
+
*
|
|
4
|
+
* The reward is a single GLOBAL per-user number — a Stripe account balance mirrored
|
|
5
|
+
* read-only into `settings.extra_discount`. It auto-applies to the user's NEXT invoice.
|
|
6
|
+
* `applyReferralReward` mirrors Stripe's customer-balance logic: applied to the charge,
|
|
7
|
+
* clamped at zero, remainder rolls forward. Components live in `./ReferralReward`.
|
|
8
|
+
*/
|
|
9
|
+
export { formatMoney } from './reward-balance';
|
|
10
|
+
export interface ReferralReward {
|
|
11
|
+
amount: number;
|
|
12
|
+
currency: string;
|
|
13
|
+
}
|
|
14
|
+
/** The standing referral offer — what one successful invite earns. One constant
|
|
15
|
+
* so the welcome modal and the rewards modal can never quote different money. */
|
|
16
|
+
export declare const REFERRAL_OFFER: ReferralReward;
|
|
17
|
+
/** The user's available referral reward, or null if none. */
|
|
18
|
+
export declare function useReferralReward(): ReferralReward | null;
|
|
19
|
+
/**
|
|
20
|
+
* Apply the reward to a charge, mirroring Stripe's customer-balance behaviour.
|
|
21
|
+
* Returns null when there's no usable reward or the currency doesn't match the price.
|
|
22
|
+
*/
|
|
23
|
+
export declare function applyReferralReward(totalCents: number, reward: ReferralReward | null, priceCurrency: string): {
|
|
24
|
+
bonus: number;
|
|
25
|
+
youPay: number;
|
|
26
|
+
remaining: number;
|
|
27
|
+
currency: string;
|
|
28
|
+
} | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reward-balance logic (hook + money formatter).
|
|
3
|
+
*
|
|
4
|
+
* A user's reward balance is their available account balance — a single GLOBAL per-user
|
|
5
|
+
* number, the Stripe customer account balance mirrored read-only into
|
|
6
|
+
* `settings.extra_discount`. It auto-applies to the user's NEXT invoice.
|
|
7
|
+
*
|
|
8
|
+
* "Rewards" is the broad concept: the balance can be fed by several sources (referral
|
|
9
|
+
* reward is just one). The referral pricing surfaces of the billing kit
|
|
10
|
+
* speak to the referral source specifically; this module owns the balance itself.
|
|
11
|
+
*/
|
|
12
|
+
export interface RewardBalance {
|
|
13
|
+
amount: number;
|
|
14
|
+
currency: string;
|
|
15
|
+
}
|
|
16
|
+
/** The user's available reward balance (all sources), or null if none. */
|
|
17
|
+
export declare function useRewardBalance(): RewardBalance | null;
|
|
18
|
+
/** Format minor units as a localized money string, e.g. `£20` (whole) or `£29.99`. */
|
|
19
|
+
export declare function formatMoney(cents: number, currency?: string): string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a host adds to the billing kit. Selling plans needs Stripe, which stays the host's: whether
|
|
3
|
+
* this deployment sells plans (a publishable key is configured), and its embedded checkout. Without
|
|
4
|
+
* a `BillingSupportProvider` nothing is for sale: projects show their limits and usage only.
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from 'react';
|
|
7
|
+
export interface BillingCheckoutSupport {
|
|
8
|
+
/** Load the host's Stripe (lazily, when a checkout opens); `null` when it cannot. */
|
|
9
|
+
load(): Promise<unknown> | null;
|
|
10
|
+
/** Stripe's embedded checkout for a session, on the loaded Stripe. */
|
|
11
|
+
render(stripe: unknown, session: {
|
|
12
|
+
clientSecret: string;
|
|
13
|
+
onComplete: () => void;
|
|
14
|
+
}): ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface BillingSupport {
|
|
17
|
+
/** This deployment sells plans (Stripe is configured). */
|
|
18
|
+
stripeEnabled: boolean;
|
|
19
|
+
checkout?: BillingCheckoutSupport;
|
|
20
|
+
/**
|
|
21
|
+
* Add-on blocks the user just bought here, so the host does not announce them later as having
|
|
22
|
+
* arrived on their own.
|
|
23
|
+
*/
|
|
24
|
+
onAddonBlocksBought?: (projectExtId: string, blocks: {
|
|
25
|
+
ai: number;
|
|
26
|
+
storage: number;
|
|
27
|
+
}) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare function BillingSupportProvider({ value, children, }: {
|
|
30
|
+
value: BillingSupport;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
}): import("react").JSX.Element;
|
|
33
|
+
export declare function useBillingSupport(): BillingSupport;
|
|
34
|
+
/** The signed-in user's id (`usr-…`), to tell the projects they own from the others. */
|
|
35
|
+
export declare function useSelfExtId(): string | undefined;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tax-inclusive totals from the backend's Stripe Tax quotes (`TaxQuoteResponse`, plan-change
|
|
3
|
+
* previews, add-on quotes): "£48.00 incl. VAT (£40.00 + £8.00 VAT 20%)", "£40.00 · no VAT
|
|
4
|
+
* (reverse charge)", "£40.00 · no tax".
|
|
5
|
+
*/
|
|
6
|
+
import type { components } from '@arbidocs/client';
|
|
7
|
+
export type TaxQuote = components['schemas']['TaxQuoteResponse'];
|
|
8
|
+
/** Countries whose tax depends on the postcode: the field is shown up front. */
|
|
9
|
+
export declare const POSTCODE_COUNTRIES: readonly string[];
|
|
10
|
+
/** The quote error that asks for a ZIP / postal code. */
|
|
11
|
+
export declare const TAX_LOCATION_INVALID = "TAX_LOCATION_INVALID";
|
|
12
|
+
/** "£42.00" — always pence, so the parts of a total add up on screen. */
|
|
13
|
+
export declare function money2(pence: number, currency?: string): string;
|
|
14
|
+
export interface TaxParts {
|
|
15
|
+
subtotal: number;
|
|
16
|
+
tax: number;
|
|
17
|
+
total: number;
|
|
18
|
+
/** "VAT 20%"; null when no tax is due. */
|
|
19
|
+
label?: string | null;
|
|
20
|
+
reverseCharge?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** What follows the total: "incl. VAT (£40.00 + £8.00 VAT 20%)", "· no VAT (reverse charge)", "· no tax". */
|
|
23
|
+
export declare function taxDetail({ subtotal, tax, label, reverseCharge }: TaxParts): string;
|
|
24
|
+
/** "£48.00 incl. VAT (£40.00 + £8.00 VAT 20%)", "£40.00 · no VAT (reverse charge)", "£40.00 · no tax". */
|
|
25
|
+
export declare function taxSummary(parts: TaxParts): string;
|
|
26
|
+
/** "£21.00 incl. VAT" / "£17.50" — a total with only the word for its tax. */
|
|
27
|
+
export declare function totalWithTaxWord({ total, tax, label }: TaxParts): string;
|
|
28
|
+
/** The parts of a quote response. */
|
|
29
|
+
export declare function quoteParts(quote: TaxQuote): TaxParts;
|
|
30
|
+
/** "Total today £48.00 incl. VAT (£40.00 + £8.00 VAT 20%)". */
|
|
31
|
+
export declare function quoteTotalLine(quote: TaxQuote): string;
|
|
32
|
+
/** The API error code (`detail.code`) and message, if any. */
|
|
33
|
+
export declare function quoteError(error: unknown): {
|
|
34
|
+
code?: string;
|
|
35
|
+
message?: string;
|
|
36
|
+
};
|