@arbidocs/blocks 0.5.104 → 0.5.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/{DocumentReviewCard-MSHD73S3.cjs → DocumentReviewCard-QVQ2LGFH.cjs} +3 -3
  2. package/dist/{DocumentReviewCard-MSHD73S3.cjs.map → DocumentReviewCard-QVQ2LGFH.cjs.map} +1 -1
  3. package/dist/{DocumentReviewCard-WZNBPG72.js → DocumentReviewCard-UOLXZKZE.js} +3 -3
  4. package/dist/{DocumentReviewCard-WZNBPG72.js.map → DocumentReviewCard-UOLXZKZE.js.map} +1 -1
  5. package/dist/{FilesViewerDialog-XETOHORQ.js → FilesViewerDialog-5ELQYWAZ.js} +3 -3
  6. package/dist/{FilesViewerDialog-XETOHORQ.js.map → FilesViewerDialog-5ELQYWAZ.js.map} +1 -1
  7. package/dist/{FilesViewerDialog-DV2U4USR.cjs → FilesViewerDialog-XNGHHWYS.cjs} +4 -4
  8. package/dist/{FilesViewerDialog-DV2U4USR.cjs.map → FilesViewerDialog-XNGHHWYS.cjs.map} +1 -1
  9. package/dist/{WorkspaceTableView-WD754UBK.js → WorkspaceTableView-DIMTW5P5.js} +4 -4
  10. package/dist/{WorkspaceTableView-WD754UBK.js.map → WorkspaceTableView-DIMTW5P5.js.map} +1 -1
  11. package/dist/{WorkspaceTableView-3D6SYOWT.cjs → WorkspaceTableView-HRCV6WR7.cjs} +6 -6
  12. package/dist/{WorkspaceTableView-3D6SYOWT.cjs.map → WorkspaceTableView-HRCV6WR7.cjs.map} +1 -1
  13. package/dist/{chunk-N77UYRV7.js → chunk-632JXVXY.js} +51 -26
  14. package/dist/chunk-632JXVXY.js.map +1 -0
  15. package/dist/{chunk-5R67KX2O.cjs → chunk-6XNWGOS3.cjs} +70 -19
  16. package/dist/chunk-6XNWGOS3.cjs.map +1 -0
  17. package/dist/{chunk-TQFDPCWU.js → chunk-7Q6EVFMT.js} +3 -3
  18. package/dist/{chunk-TQFDPCWU.js.map → chunk-7Q6EVFMT.js.map} +1 -1
  19. package/dist/{chunk-MMSHLHTA.cjs → chunk-LM5CPXJO.cjs} +51 -26
  20. package/dist/chunk-LM5CPXJO.cjs.map +1 -0
  21. package/dist/{chunk-DDIV3MYQ.cjs → chunk-MW7FGIF4.cjs} +25 -59
  22. package/dist/chunk-MW7FGIF4.cjs.map +1 -0
  23. package/dist/{chunk-BSPPKX6X.cjs → chunk-OXHAZN43.cjs} +4 -4
  24. package/dist/{chunk-BSPPKX6X.cjs.map → chunk-OXHAZN43.cjs.map} +1 -1
  25. package/dist/{chunk-4UOXUWX3.js → chunk-QFKL4HV2.js} +54 -3
  26. package/dist/chunk-QFKL4HV2.js.map +1 -0
  27. package/dist/{chunk-FNGFSHVE.js → chunk-TRI3LQVR.js} +24 -50
  28. package/dist/chunk-TRI3LQVR.js.map +1 -0
  29. package/dist/connect/index.cjs +1874 -1860
  30. package/dist/connect/index.cjs.map +1 -1
  31. package/dist/connect/index.js +1518 -1504
  32. package/dist/connect/index.js.map +1 -1
  33. package/dist/connect/viewer.cjs +1 -1
  34. package/dist/connect/viewer.js +1 -1
  35. package/dist/connection/billing/AddAddonDialog.d.ts +1 -1
  36. package/dist/connection/billing/CollaboratorPlan.d.ts +7 -0
  37. package/dist/connection/billing/ConnectedQuotaDialog.d.ts +2 -2
  38. package/dist/connection/billing/ConnectedWelcomeDialog.d.ts +2 -2
  39. package/dist/connection/billing/MonthlySpendCap.d.ts +12 -0
  40. package/dist/connection/billing/NewProjectFlow.d.ts +0 -7
  41. package/dist/connection/billing/ProjectBilling.d.ts +1 -1
  42. package/dist/connection/billing/ProjectDetail.d.ts +1 -1
  43. package/dist/connection/billing/ProjectPurchaseOptions.d.ts +22 -0
  44. package/dist/connection/billing/ProjectUsageCard.d.ts +0 -13
  45. package/dist/connection/billing/ProjectUsageContent.d.ts +3 -3
  46. package/dist/connection/billing/ReduceAddonDialog.d.ts +2 -2
  47. package/dist/connection/billing/StripeCheckoutModal.d.ts +5 -2
  48. package/dist/connection/billing/SubscriptionPlans.d.ts +2 -10
  49. package/dist/connection/billing/SubscriptionStatus.d.ts +1 -1
  50. package/dist/connection/billing/SuspendedProjectRecovery.d.ts +8 -0
  51. package/dist/connection/billing/addon-pricing.d.ts +6 -6
  52. package/dist/connection/billing/payment-required.d.ts +2 -2
  53. package/dist/connection/billing/plan-constants.d.ts +6 -4
  54. package/dist/connection/billing/plan-pricing.d.ts +5 -5
  55. package/dist/connection/billing/quota-items.d.ts +2 -2
  56. package/dist/connection/billing/useAddonPurchase.d.ts +1 -1
  57. package/dist/connection/billing/usePaidWorkspaceMembers.d.ts +397 -0
  58. package/dist/connection/workspace-list/useConnectedWorkspaceList.d.ts +17 -1
  59. package/dist/embed/index.cjs +8 -8
  60. package/dist/embed/index.js +2 -2
  61. package/dist/settings/PlanCard.d.ts +2 -2
  62. package/dist/settings/SubscriptionParts.d.ts +3 -1
  63. package/dist/settings/index.cjs +150 -150
  64. package/dist/settings/index.js +1 -1
  65. package/dist/styles.css +1 -1
  66. package/dist/workflow-canvas/index.cjs +7 -7
  67. package/dist/workflow-canvas/index.js +2 -2
  68. package/node_modules/@arbidocs/coedit/package.json +1 -1
  69. package/package.json +6 -5
  70. package/src/blocks.css +2 -0
  71. package/src/connection/billing/project-purchase.css +453 -0
  72. package/dist/chunk-4UOXUWX3.js.map +0 -1
  73. package/dist/chunk-5R67KX2O.cjs.map +0 -1
  74. package/dist/chunk-DDIV3MYQ.cjs.map +0 -1
  75. package/dist/chunk-FNGFSHVE.js.map +0 -1
  76. package/dist/chunk-MMSHLHTA.cjs.map +0 -1
  77. package/dist/chunk-N77UYRV7.js.map +0 -1
  78. package/dist/connection/billing/CheckoutTotal.d.ts +0 -12
  79. package/dist/connection/billing/PlanSelector.d.ts +0 -50
  80. package/dist/connection/billing/billing-country.d.ts +0 -13
  81. package/dist/connection/billing/useCheckoutQuote.d.ts +0 -30
@@ -1,12 +0,0 @@
1
- /**
2
- * CheckoutTotal — the tax-inclusive total of a plan purchase, shown before Stripe opens:
3
- * "Total today £48.00 incl. VAT (£40.00 + £8.00 VAT 20%)". Priced by the backend (Stripe Tax)
4
- * for the chosen country, plus a ZIP / postcode where the tax depends on it (e.g. the US).
5
- */
6
- import type { CheckoutQuoteState } from './useCheckoutQuote';
7
- /** The postcode field (when needed) and the total line. */
8
- export declare function CheckoutTotal({ state, postalCode, onPostalCodeChange, }: {
9
- state: CheckoutQuoteState;
10
- postalCode: string;
11
- onPostalCodeChange: (value: string) => void;
12
- }): import("react").JSX.Element;
@@ -1,50 +0,0 @@
1
- /**
2
- * PlanSelector — binds the Pro prices to the plan-picker blocks.
3
- *
4
- * Two plans: Free and Pro (one licence), Pro billed monthly or annually. Used by NewProjectFlow (choose
5
- * Free or Pro for a new project) and SubscriptionPlans (upgrade a Free project).
6
- * Prices come from Stripe (source of truth): ex VAT, with the UK-inclusive figure under it; the
7
- * total for the buyer's country is quoted before checkout. Presentation lives in `@arbidocs/blocks`.
8
- */
9
- import { type PlanChoice, type ProPrices } from './plan-pricing';
10
- import type { components } from '@arbidocs/client';
11
- type ProductPrice = components['schemas']['ProductPrice'];
12
- /**
13
- * Free and Pro plan cards. `isOnFree` marks Free as the current (unselectable) plan when
14
- * upgrading an existing Free project; omit it for a brand-new project, where both are choices.
15
- */
16
- export declare function PlanChoiceCards({ selected, onSelect, isAnnual, prices, isOnFree, }: {
17
- selected: PlanChoice | null;
18
- onSelect: (plan: PlanChoice) => void;
19
- isAnnual: boolean;
20
- prices: ProPrices;
21
- isOnFree?: boolean;
22
- }): import("react").JSX.Element;
23
- /** "How pricing works" popover; its link opens the AI model list in user settings. */
24
- export declare function PlanInfoPopover(): import("react").JSX.Element;
25
- /**
26
- * The monthly usage cap at checkout, editable inline, with one short line (the rest is in "How pricing works").
27
- * `value` is in pounds; an untouched default is sent as `addon_budget_pence: null`.
28
- */
29
- export declare function CheckoutAddonBudget({ value, onChange, }: {
30
- value: string;
31
- onChange: (value: string) => void;
32
- }): import("react").JSX.Element;
33
- /**
34
- * Add-on blocks bought with Pro at checkout: "+£25 of AI usage" and "+25 GB storage" steppers (0..100 each), priced
35
- * per block on the chosen interval. They are on the first invoice and renew until reduced ("How pricing works").
36
- */
37
- export declare function CheckoutAddonBlocks({ aiBlocks, storageBlocks, onAiBlocksChange, onStorageBlocksChange, price, }: {
38
- aiBlocks: number;
39
- storageBlocks: number;
40
- onAiBlocksChange: (value: number) => void;
41
- onStorageBlocksChange: (value: number) => void;
42
- /** The plan price on the chosen interval; its `addon_prices` price each block. */
43
- price?: ProductPrice;
44
- }): import("react").JSX.Element;
45
- /** The billing country, chosen before checkout so Stripe prices it with the right tax. */
46
- export declare function CheckoutCountrySelect({ value, onChange, }: {
47
- value: string;
48
- onChange: (code: string) => void;
49
- }): import("react").JSX.Element;
50
- export {};
@@ -1,13 +0,0 @@
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 BILLING_COUNTRY_CODES: readonly string[];
7
- /** The select's options: the United Kingdom first, then every other country by name. */
8
- export declare function billingCountryOptions(): {
9
- code: string;
10
- name: string;
11
- }[];
12
- /** The region of the browser's first locale that names a country ("en-US" → "US"), else GB. */
13
- export declare function defaultBillingCountry(languages?: readonly string[]): string;
@@ -1,30 +0,0 @@
1
- /**
2
- * useCheckoutQuote — the tax-inclusive total of a plan purchase for the billing country (and
3
- * ZIP / postcode where the tax depends on it), from the backend's Stripe Tax quote. Shown by
4
- * `CheckoutTotal` before Stripe opens.
5
- */
6
- import type { PlanInterval } from './plan-pricing';
7
- import { type TaxQuote } from './tax-quote';
8
- export interface CheckoutQuoteState {
9
- quote?: TaxQuote;
10
- isLoading: boolean;
11
- /** Show the ZIP / postcode field. */
12
- showPostcode: boolean;
13
- /** Why there is no total (e.g. "Enter your ZIP / postal code to see the total."). */
14
- error: string | null;
15
- /** Continue to payment: priced, or the pricing failed for a reason other than the address. */
16
- canContinue: boolean;
17
- }
18
- /**
19
- * Prices the plan, plus any add-on blocks picked at checkout (one period of each), for the billing address.
20
- * `projectExtId` for an existing project.
21
- */
22
- export declare function useCheckoutQuote({ projectExtId, interval, country, postalCode, aiBlocks, storageBlocks, enabled, }: {
23
- projectExtId?: string | null;
24
- interval: PlanInterval;
25
- country: string;
26
- postalCode: string;
27
- aiBlocks?: number;
28
- storageBlocks?: number;
29
- enabled?: boolean;
30
- }): CheckoutQuoteState;