@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
@@ -7,7 +7,7 @@ var chunkRNX5LAQK_cjs = require('../chunk-RNX5LAQK.cjs');
7
7
  require('../chunk-6NSKIS35.cjs');
8
8
  require('../chunk-6KQVTMRL.cjs');
9
9
  require('../chunk-IWLNDDPN.cjs');
10
- require('../chunk-MMSHLHTA.cjs');
10
+ require('../chunk-LM5CPXJO.cjs');
11
11
  require('../chunk-OKUXM2N4.cjs');
12
12
  require('../chunk-223D4727.cjs');
13
13
  require('../chunk-SNUBQMIS.cjs');
@@ -5,7 +5,7 @@ export { ConnectedDocumentToolsProvider } from '../chunk-KYLQRS3O.js';
5
5
  import '../chunk-E6ISR55S.js';
6
6
  import '../chunk-3PV25ICC.js';
7
7
  import '../chunk-GOJ5GHFS.js';
8
- import '../chunk-N77UYRV7.js';
8
+ import '../chunk-632JXVXY.js';
9
9
  import '../chunk-JWUCDK2F.js';
10
10
  import '../chunk-RC6VTY2H.js';
11
11
  import '../chunk-OHRWYRTH.js';
@@ -2,7 +2,7 @@
2
2
  * AddAddonDialog — confirm adding one add-on block: price today, the next charge, one line; how it is charged is
3
3
  * behind "More info".
4
4
  *
5
- * - ai_usage: +£25 of AI usage a month, charged now at `ai_block_price_pence` (monthly: one
5
+ * - ai_usage: +£25 of AI credits a month, charged now at `ai_block_price_pence` (monthly: one
6
6
  * month; annual: the monthly rate × the months left, covering until the annual renewal).
7
7
  * - storage: +25 GB, charged now at `storage_block_price_pence`, prorated by days for the rest of
8
8
  * the period.
@@ -0,0 +1,7 @@
1
+ import type { components } from '@arbidocs/client';
2
+ type Project = components['schemas']['ProjectResponse'];
3
+ /** Seat purchases are explicit, with a tax quote before the saved card is charged. */
4
+ export declare function CollaboratorPlan({ project }: {
5
+ project: Project;
6
+ }): import("react").JSX.Element | null;
7
+ export {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The dialog shown when a project's AI usage for the month is used up (a 402 `QUOTA_EXCEEDED`: an
2
+ * The dialog shown when a project's AI credits for the month is used up (a 402 `QUOTA_EXCEEDED`: an
3
3
  * API call, a chat send, a document's processing). The host decides when (`info`), and what a Box
4
4
  * deployment's admin opens the portal (`runtimeConfig.licenceUrl`); billing opens through
5
5
  * `environment.openProject`.
@@ -7,7 +7,7 @@
7
7
  * One sentence and the actions that get the user going again, by project (the add-on state is only
8
8
  * visible to the owner of a Pro project). The usage cap limits automatic top-ups only, so adding AI
9
9
  * usage by hand is always offered on Pro:
10
- * - Pro, usage cap £0 → "Automatic top-ups are off (£0 usage cap)." / "Add £25 of AI usage · £25 + VAT"
10
+ * - Pro, usage cap £0 → "Automatic top-ups are off (£0 usage cap)." / "Add £25 of AI credits · £25 ex VAT"
11
11
  * and "Set cap".
12
12
  * - Pro, cap reached → "Usage cap reached: no more automatic top-ups this month." / Add and "Raise cap".
13
13
  * - Pro otherwise (the automatic top-up failed) → the billing error / Add.
@@ -2,7 +2,7 @@
2
2
  * The first-login snapshot (once per user) for free users. The host decides when (`open`).
3
3
  *
4
4
  * A reminder, not a gate: it answers "where do I stand" at a glance — plan,
5
- * the three quotas (AI usage, storage, collaborators — the same
5
+ * the three quotas (AI credits, storage, collaborators — the same
6
6
  * getQuotaItems numbers every other usage surface shows), any reward balance,
7
7
  * and the standing referral offer — then gets out of the way. Continue is the
8
8
  * primary action because 99% of opens end in it; the conversion doors are
@@ -15,7 +15,7 @@
15
15
  * - Earn: "+ Invite contact" swaps to the invite form itself (`ConnectedAddContacts`,
16
16
  * which carries the referral pitch) — earning IS inviting.
17
17
  *
18
- * AI usage is a per-project quota, not a per-user number, so the modal
18
+ * AI credits is a per-project quota, not a per-user number, so the modal
19
19
  * always shows which project the numbers belong to via a corner picker.
20
20
  * Meters render through the portable `UsageMeter` block.
21
21
  *
@@ -0,0 +1,12 @@
1
+ import { type Ref } from 'react';
2
+ /** Monthly budget for automatic upgrades. Defaults are owned by the caller. */
3
+ export declare function MonthlySpendCap({ value, minimum, maximum, stepPence, onChange, inputRef, testId, compact, }: {
4
+ value: number;
5
+ minimum: number;
6
+ maximum?: number;
7
+ stepPence?: number;
8
+ onChange: (pence: number) => void;
9
+ inputRef?: Ref<HTMLInputElement>;
10
+ compact?: boolean;
11
+ testId?: string;
12
+ }): import("react").JSX.Element;
@@ -1,10 +1,3 @@
1
- /**
2
- * NewProjectFlow — unified dialog: name → Free or Pro → monthly/annual + promo → checkout.
3
- * When Stripe is disabled, just creates a project with a name (no plan selection).
4
- * Free creates a usable project immediately. Pro creates a 'pending' project and opens the
5
- * embedded Stripe Checkout; a cancelled checkout discards the pending project.
6
- * The total for the billing country (incl. tax) is quoted before Stripe opens.
7
- */
8
1
  interface NewProjectFlowProps {
9
2
  open: boolean;
10
3
  onOpenChange: (open: boolean) => void;
@@ -2,7 +2,7 @@
2
2
  * ProjectBilling — the owner's billing view of one project: Plan / Usage and plan.
3
3
  *
4
4
  * - Plan card: what you have (plan, renewal date, price), any scheduled change with Undo, and
5
- * billing problems (Free / Dev: also the AI usage and storage meters). "Change plan" is its one
5
+ * billing problems (Free / Dev: also the AI credits and storage meters). "Change plan" is its one
6
6
  * action.
7
7
  * - Usage and plan card (Pro only, `ProjectUsageCard`): a usage meter per resource with + / −
8
8
  * beside it, and the monthly usage cap, which limits automatic top-ups only (£100 by default for
@@ -4,7 +4,7 @@
4
4
  * Content of an opened per-project tab. Only your OWN projects are openable
5
5
  * (the table gates this), so this is purely the deep detail: the daily-cap
6
6
  * setter for others on the project, plus the usage breakdown. The high-level
7
- * summary (plan, AI usage, storage, collaborators) lives in the projects list;
7
+ * summary (plan, AI credits, storage, collaborators) lives in the projects list;
8
8
  * renaming the project is done here, from the pencil beside its name.
9
9
  */
10
10
  import { type ReactNode } from 'react';
@@ -0,0 +1,22 @@
1
+ import type { components } from '@arbidocs/client';
2
+ import { type PlanInterval } from './plan-pricing';
3
+ import type { TaxQuote } from './tax-quote';
4
+ type Product = components['schemas']['ProductResponse'];
5
+ type Price = components['schemas']['ProductPrice'];
6
+ export declare function purchaseNet(price: Price | undefined, ai: number, storage: number, collaborators: number): number | null;
7
+ /** The purchase decision is monthly or annual; both buttons show the actual starting charge. */
8
+ export declare function ProjectPurchaseOptions({ products, projectExtId, aiBlocks, storageBlocks, collaboratorBlocks, onAiBlocksChange, onStorageBlocksChange, onCollaboratorBlocksChange, disabled, busy, enabled, onChoose, }: {
9
+ products: Product[] | undefined;
10
+ projectExtId?: string;
11
+ aiBlocks: number;
12
+ storageBlocks: number;
13
+ collaboratorBlocks: number;
14
+ onAiBlocksChange: (count: number) => void;
15
+ onStorageBlocksChange: (count: number) => void;
16
+ onCollaboratorBlocksChange: (count: number) => void;
17
+ disabled?: boolean;
18
+ busy?: boolean;
19
+ enabled?: boolean;
20
+ onChoose: (interval: PlanInterval, capPence: number, quote?: TaxQuote) => void;
21
+ }): import("react").JSX.Element;
22
+ export {};
@@ -1,16 +1,3 @@
1
- /**
2
- * ProjectUsageCard — a Pro project's "Usage and plan" card: one usage meter per resource (AI usage this month,
3
- * storage) and the monthly usage cap. Short labels and one-line facts only; how top-ups, proration, the cap and
4
- * reductions work is behind the card's "More info" link.
5
- *
6
- * Each meter shows used vs the allowance now, marking the plan's part and shading the top-ups, hatches how much more
7
- * automatic top-ups may add before the usage cap stops them ("No limit" / £0 states), says what renews from the next
8
- * period when that differs (with Undo), and has + / − beside it with the price of one step:
9
- * - "+" opens the add confirm (charged now: AI usage the full block, storage prorated for the rest of the period);
10
- * the usage cap never blocks it.
11
- * - "−" opens a one-click confirm that removes one block from the next renewal; this period's allowance stays.
12
- * The usage cap limits automatic top-ups only (default £100; £0 = no automatic top-ups; or no limit).
13
- */
14
1
  import type { components } from '@arbidocs/client';
15
2
  type ProjectResponse = components['schemas']['ProjectResponse'];
16
3
  type ProjectAddons = components['schemas']['ProjectAddons'];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * ProjectUsageContent — inline AI usage breakdown for a project.
2
+ * ProjectUsageContent — inline AI credits breakdown for a project.
3
3
  *
4
4
  * SVG line chart with composite color-coded lines.
5
5
  * Toggle between breakdowns: User (default), Workspace, Model Tier, and (opt in) Feature.
@@ -8,12 +8,12 @@
8
8
  *
9
9
  * Rendered inline in the project card expander (no dialog).
10
10
  */
11
- /** What the breakdown groups AI usage by. */
11
+ /** What the breakdown groups AI credits by. */
12
12
  export type UsageBreakdownKey = 'user' | 'workspace' | 'model' | 'feature';
13
13
  export interface ProjectUsageContentProps {
14
14
  projectExtId: string;
15
15
  projectName: string;
16
- /** Monthly AI usage quota in £ (quotas.ai_usage.limit) — enables the % indicator */
16
+ /** Monthly AI credits quota in £ (quotas.ai_usage.limit) — enables the % indicator */
17
17
  aiUsageLimit?: number;
18
18
  /** The breakdowns offered, the first selected. Default: user, workspace, model tier. */
19
19
  breakdowns?: readonly UsageBreakdownKey[];
@@ -1,10 +1,10 @@
1
1
  /**
2
- * ReduceAddonDialog — confirm removing one AI usage / storage block (−£25 / −25 GB) from the next period.
2
+ * ReduceAddonDialog — confirm removing one AI credits / storage block (−£25 / −25 GB) from the next period.
3
3
  *
4
4
  * One click on "−" opens it; one click confirms. The reduction applies from the next renewal (`period_end`): this
5
5
  * period's allowance stays until then and nothing is refunded, so an automatic top-up can be turned back down to
6
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`).
7
+ * legacy blocks keep their old size). Storage is checked against the requested allowance at renewal.
8
8
  */
9
9
  import type { components } from '@arbidocs/client';
10
10
  import { type AddonKind } from './useAddonPurchase';
@@ -5,15 +5,18 @@
5
5
  * Uses Stripe Elements for secure payment processing.
6
6
  * Checkout is scoped to a specific project.
7
7
  */
8
+ import type { components } from '@arbidocs/client';
8
9
  import { type TaxQuote } from './tax-quote';
9
10
  interface StripeCheckoutModalProps {
10
11
  projectExtId: string;
12
+ price?: components['schemas']['ProductPrice'];
11
13
  /** Pro billing interval: monthly or annual. */
12
14
  interval: 'month' | 'year';
13
15
  /** Monthly usage cap chosen at checkout (pence); null/omitted keeps the default. */
14
16
  addonBudgetPence?: number | null;
15
- /** Add-on blocks bought with the plan (+£25 of AI usage a month / +25 GB each): on the first invoice. */
17
+ /** Add-on blocks bought with the plan (+£25 of AI credits a month / +25 GB each): on the first invoice. */
16
18
  aiBlocks?: number;
19
+ collaboratorBlocks?: number;
17
20
  storageBlocks?: number;
18
21
  promoCode?: string;
19
22
  /** ISO-2 billing country picked before checkout; prefills the Stripe customer's address. */
@@ -28,5 +31,5 @@ interface StripeCheckoutModalProps {
28
31
  * so callers can distinguish a successful checkout from a cancel/close. */
29
32
  onCompleted?: () => void;
30
33
  }
31
- export declare function StripeCheckoutModal({ projectExtId, interval, addonBudgetPence, aiBlocks, storageBlocks, promoCode, billingCountry, postalCode, quote, open, onOpenChange, onCompleted, }: StripeCheckoutModalProps): import("react").JSX.Element;
34
+ export declare function StripeCheckoutModal({ projectExtId, price, interval, addonBudgetPence, aiBlocks, storageBlocks, collaboratorBlocks, promoCode, billingCountry, postalCode, quote, open, onOpenChange, onCompleted, }: StripeCheckoutModalProps): import("react").JSX.Element;
32
35
  export {};
@@ -1,15 +1,7 @@
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
1
  interface SubscriptionPlansProps {
7
2
  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. */
3
+ isPersonal?: boolean;
12
4
  onDismiss?: () => void;
13
5
  }
14
- export declare function SubscriptionPlans({ projectExtId, onDismiss }: SubscriptionPlansProps): import("react").JSX.Element | null;
6
+ export declare function SubscriptionPlans({ projectExtId, onDismiss }: SubscriptionPlansProps): import("react").JSX.Element;
15
7
  export {};
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * SubscriptionStatus: binds a project's quotas and billing state to the blocks status view
3
- * (AI usage reset date, canceling notice, quota meters).
3
+ * (AI credits reset date, canceling notice, quota meters).
4
4
  */
5
5
  import type { components } from '@arbidocs/client';
6
6
  interface SubscriptionStatusProps {
@@ -0,0 +1,8 @@
1
+ import type { components } from '@arbidocs/client';
2
+ type Project = components['schemas']['ProjectResponse'];
3
+ /** Export, delete and resubscribe remain available to the owner during recovery. */
4
+ export declare function SuspendedProjectRecovery({ project, onResubscribe, }: {
5
+ project: Project;
6
+ onResubscribe: () => void;
7
+ }): import("react").JSX.Element;
8
+ export {};
@@ -27,7 +27,7 @@ export declare function splitBlocks(kind: AddonKind, count: number, addons: Proj
27
27
  current: number;
28
28
  };
29
29
  /**
30
- * "2 × £25 of AI usage", "1 × £10 + 1 × £25 of AI usage", "1 × 10 GB + 2 × 25 GB": `count` blocks of a kind, the
30
+ * "2 × £25 of AI credits", "1 × £10 + 1 × £25 of AI credits", "1 × 10 GB + 2 × 25 GB": `count` blocks of a kind, the
31
31
  * legacy ones (kept last on a reduction) at their old size.
32
32
  */
33
33
  export declare function blocksLabel(kind: AddonKind, count: number, addons: ProjectAddons): string;
@@ -40,7 +40,7 @@ export declare function reduceBounds(kind: AddonKind, addons: ProjectAddons): {
40
40
  current: number;
41
41
  next: number;
42
42
  };
43
- /** The extra line annual plans show beside an AI usage add-on or upgrade price. */
43
+ /** The extra line annual plans show beside an AI credits add-on or upgrade price. */
44
44
  export declare const ANNUAL_PREMIUM_AI_NOTE = "No markup on Premium AI on annual plans";
45
45
  /** The confirm dialog's figures: charged now (incl. / ex VAT), what it covers until, then what renews. */
46
46
  export declare function addonCharge(kind: AddonKind, addons: ProjectAddons, isAnnual: boolean, periodEnd: number | null | undefined): {
@@ -55,14 +55,14 @@ export declare const CAP_REACHED_MESSAGE = "Usage cap reached: no more automatic
55
55
  /** The £0 usage cap: no automatic top-ups (adding by hand still works). */
56
56
  export declare const ZERO_BUDGET_MESSAGE = "Automatic top-ups are off (\u00A30 usage cap).";
57
57
  /** The usage cap's heading wherever it is edited or shown. */
58
- export declare const USAGE_CAP_LABEL = "Usage cap";
59
- /** What the usage cap means (in "More info"): £0 and "No limit" explained. */
58
+ export declare const USAGE_CAP_LABEL = "Auto-upgrade limit";
59
+ /** Automatic-upgrade spending is separate from explicitly selected allowances. */
60
60
  export declare const USAGE_CAP_HELP: string;
61
61
  /** A £0 cap turns automatic top-ups off (manual adds still work). */
62
62
  export declare function isAddonBudgetZero(addons: Pick<ProjectAddons, 'spend_cap_pence'>): boolean;
63
63
  /**
64
64
  * How much more of a resource automatic top-ups may add this month before the usage cap stops them, in the
65
- * resource's unit (£ of AI usage / GB): the whole blocks the cap left pays for at today's ex-VAT price. `null` =
65
+ * resource's unit (£ of AI credits / GB): the whole blocks the cap left pays for at today's ex-VAT price. `null` =
66
66
  * no limit; 0 with a £0 cap or when not even one block fits.
67
67
  */
68
68
  export declare function autoRoom(kind: AddonKind, addons: ProjectAddons): number | null;
@@ -75,7 +75,7 @@ export declare function nextRemovedBlockSize(kind: AddonKind, addons: ProjectAdd
75
75
  export declare function parseBudgetPounds(value: string): number | null | undefined;
76
76
  /** Toast after saving the usage cap. */
77
77
  export declare function budgetSavedMessage(capPence: number | null): string;
78
- /** "£25 of AI usage" / "25 GB". */
78
+ /** "£25 of AI credits" / "25 GB". */
79
79
  export declare function stepLabel(kind: AddonKind, size: number): string;
80
80
  /** The PUT /addons/next-period body that renews `keep` blocks of `kind` (the other kind unchanged). */
81
81
  export declare function nextPeriodBody(kind: AddonKind, keep: number): {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * What a host shows for an HTTP 402 (Payment Required). Every 402 must reach the user somehow:
3
- * - `quota-modal` — structured QUOTA_EXCEEDED (the project's AI usage is used up): the quota
3
+ * - `quota-modal` — structured QUOTA_EXCEEDED (the project's AI credits is used up): the quota
4
4
  * dialog (`ConnectedQuotaDialog`, opened through the dialog registry).
5
5
  * - `caller` — a structured add-on refusal (declined card, no card, …) from the add-on
6
6
  * endpoints, or an identity verification refusal from the identity endpoints:
@@ -34,7 +34,7 @@ export declare function paymentConfirmationUrl(detail: unknown): string | null;
34
34
  */
35
35
  export declare function surfacePaymentRequired(url: string, detail: unknown, { onUpgrade }: PaymentRequiredOptions): void;
36
36
  /**
37
- * Open the quota dialog when the workspace's project has used up its AI usage, as cached (a
37
+ * Open the quota dialog when the workspace's project has used up its AI credits, as cached (a
38
38
  * failure that carried no structured quota signal, e.g. a failed background response). Returns
39
39
  * whether it opened; nothing cached is nothing to show.
40
40
  */
@@ -3,8 +3,10 @@
3
3
  * describing the plan before a project exists (new-project dialog, upgrade picker). */
4
4
  export declare const PRO_AI_GBP = 10;
5
5
  export declare const PRO_STORAGE_GB = 5;
6
+ export declare const PRO_COLLABORATORS = 1;
7
+ export declare const COLLABORATOR_BLOCK_SIZE = 5;
6
8
  /**
7
- * Add-on block sizes (£25 of AI usage or 25 GB), the same on every plan. Their prices come from the
9
+ * Add-on block sizes (£25 of AI credits or 25 GB), the same on every plan. Their prices come from the
8
10
  * products API (`addon_prices`) before a project exists, and from `project.addons` after.
9
11
  */
10
12
  export declare const ADDON_BLOCK_AI_GBP = 25;
@@ -12,17 +14,17 @@ export declare const STORAGE_BLOCK_GB = 25;
12
14
  /** Default monthly usage cap for a new Pro project (pence); it limits automatic top-ups only. 0 = no automatic
13
15
  * top-ups, null = no limit. */
14
16
  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. */
17
+ /** The automatic add-on triggers when less than this much AI credits (£) remains; the backend minimum. */
16
18
  export declare const MIN_AUTO_TOPUP_THRESHOLD_GBP = 1;
17
19
  /** Free-tier quotas — must match backend FREE_* constants in src/constants.py
18
20
  * (FREE_AI_GBP=1, FREE_STORAGE_GB=0.05 → 50 MB, FREE_COLLABORATORS=0). */
19
21
  export declare const FREE_AI_GBP = 1;
20
22
  export declare const FREE_STORAGE_MB = 50;
21
23
  export declare const FREE_COLLABORATORS = 0;
22
- /** Collaborator limits at or above this are "unlimited" (the backend reports 999 for Pro/dev). */
24
+ /** Collaborator limits at or above this are "unlimited" (the backend reports 999 for dev). */
23
25
  export declare const UNLIMITED_COLLABORATORS = 999;
24
26
  /**
25
- * Suggested initial daily per-user AI usage cap (£), pre-filled when creating
27
+ * Suggested initial daily per-user AI credits cap (£), pre-filled when creating
26
28
  * a new project. The user can clear it to create a project with no cap.
27
29
  * Backend treats null as "no enforcement" — there is no server-side default.
28
30
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
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
3
+ * One plan is sold: Pro, one licence (£10 of AI credits + 5 GB a month). Each price lists
4
4
  * `pack_prices` for that one licence — `amount` incl. UK VAT and `amount_ex_vat` — and
5
5
  * `addon_prices` (one add-on block on that interval). Display them as-is.
6
6
  * Legacy subscriptions with several packs keep working; their name and price come from the project.
@@ -12,7 +12,7 @@ type ProductResponse = components['schemas']['ProductResponse'];
12
12
  type PackPrice = components['schemas']['PackPrice'];
13
13
  type AddonPrice = components['schemas']['AddonPrice'];
14
14
  export type PlanInterval = 'month' | 'year';
15
- /** The headline price: "£40 + VAT". */
15
+ /** The headline price: "£40 ex VAT". */
16
16
  export declare function plusVat(exVatPence: number, currency?: string): string;
17
17
  /** The one licence Pro sells. Other pack counts exist only on legacy subscriptions (displayed, not sold). */
18
18
  export declare const PRO_PACKS = 1;
@@ -43,8 +43,8 @@ export declare const PAY_TODAY_UNPRICED = "Pay today: the difference for the res
43
43
  export declare function addonPrice(price: ProductPrice | undefined, kind?: 'ai_usage' | 'storage'): AddonPrice | undefined;
44
44
  /** Per add-on block of `kind` per month, ex VAT (annual plans: the monthly equivalent). */
45
45
  export declare function addonMonthlyExVat(price: ProductPrice | undefined, kind?: 'ai_usage' | 'storage'): number | undefined;
46
- /** What a checkout buys: "Pro", "Pro + 2 × £25 of AI usage + 1 × 25 GB". */
47
- export declare function checkoutItemsLabel(aiBlocks: number, storageBlocks: number): string;
46
+ /** What a checkout buys: "Pro", "Pro + 2 × £25 of AI credits + 1 × 25 GB". */
47
+ export declare function checkoutItemsLabel(aiBlocks: number, storageBlocks: number, collaboratorBlocks?: number, price?: ProductPrice): string;
48
48
  /** The price of `packs` packs on this interval's price, if Stripe lists it (only one licence is listed). */
49
49
  export declare function packPrice(price: ProductPrice | undefined, packs?: number): PackPrice | undefined;
50
50
  export interface ProPrices {
@@ -57,6 +57,6 @@ export declare function findProPrices(products: ProductResponse[] | undefined):
57
57
  export declare function calcSavingsPercent(monthlyPrice: ProductPrice | undefined, annualPrice: ProductPrice | undefined): number | null;
58
58
  /** Most add-on blocks of each kind a checkout may include (the backend's limit). */
59
59
  export declare const MAX_CHECKOUT_BLOCKS = 100;
60
- /** "£25/month + VAT each", annual: "£225/year + VAT each": one block on the chosen interval. */
60
+ /** "£25/month ex VAT each", annual: "£225/year ex VAT each": one block on the chosen interval. */
61
61
  export declare function checkoutBlockPriceText(price: ProductPrice | undefined, kind: 'ai_usage' | 'storage'): string | null;
62
62
  export {};
@@ -2,7 +2,7 @@
2
2
  * Quota display — single source of truth.
3
3
  *
4
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
5
+ * quotas (AI credits in £, storage, collaborators). Shared by QuotaBadges and the
6
6
  * project tooltip so the numbers and units can never disagree (storage in GB on
7
7
  * plans of 1 GB or more, MB below).
8
8
  */
@@ -12,7 +12,7 @@ type Quotas = components['schemas']['ProjectResponse']['quotas'];
12
12
  /** "May 31, 2025" — the one format every AI-usage-reset mention uses. */
13
13
  export declare function formatResetDate(unixTimestamp: number | null | undefined): string | null;
14
14
  /**
15
- * When the project's AI usage allowance next resets, as a unix timestamp.
15
+ * When the project's AI credits allowance next resets, as a unix timestamp.
16
16
  * Pro projects report it directly (`addons.ai_usage_reset_at` — monthly, even on an
17
17
  * annual plan); monthly subscriptions otherwise reset with the billing period
18
18
  * (`current_period_end`); free projects reset on the backend-stamped signup
@@ -1,5 +1,5 @@
1
1
  /**
2
- * useAddonPurchase — buy one add-on block (+£25 of AI usage or +25 GB) for a Pro project and tell
2
+ * useAddonPurchase — buy one add-on block (+£25 of AI credits or +25 GB) for a Pro project and tell
3
3
  * the user what happened. The monthly usage cap limits automatic top-ups only, so it never refuses a block
4
4
  * bought here. The block is charged now for the current period and then renews every
5
5
  * period until the user reduces it. Shared by the add-on confirm dialog (project Add-ons card,