@arbidocs/blocks 0.4.115 → 0.4.117

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.
@@ -1417,9 +1417,9 @@ var DEFAULT_PLAN_CARD_LABELS = {
1417
1417
  pricingExplainer: "How pricing works",
1418
1418
  explainerTiers: [
1419
1419
  "AI usage and storage are shared by everyone in the project. AI usage resets monthly.",
1420
- "Need more? Add \xA310 of AI usage or 10 GB at a time. Add-ons renew until you remove them.",
1421
- "Automatic add-ons stay within your monthly add-on budget (\xA3250 by default, \xA30 turns them off).",
1422
- "Upgrades start now: you pay the difference for the rest of this period. Downgrades start at the end of the period. No refunds.",
1420
+ "Need more? Add \xA325 of AI usage or 25 GB at a time. Add-ons renew until you reduce them.",
1421
+ "Add-ons, manual and automatic, stay within your monthly usage cap (\xA3100 by default; \xA30 = no extra usage, or no limit).",
1422
+ "Add-ons start now. Downgrades, billing switches and add-on reductions start at the end of the period. No refunds.",
1423
1423
  "Prices are shown + VAT; the total for your country is shown before you pay."
1424
1424
  ],
1425
1425
  explainerAiUsage: "About 1p of AI usage buys one moderately complex request, or reading ~25 documents, on a Standard model. Premium models can cost 10\u2013100\xD7 more.",
@@ -1493,7 +1493,7 @@ function PlanCardGrid({
1493
1493
  {
1494
1494
  className: cn(
1495
1495
  "grid gap-2",
1496
- plans.length === 4 ? "grid-cols-1 @xl:grid-cols-2 @4xl:grid-cols-4" : "grid-cols-1 @2xl:grid-cols-3"
1496
+ plans.length === 4 ? "grid-cols-1 @xl:grid-cols-2 @4xl:grid-cols-4" : plans.length === 2 ? "grid-cols-1 @xl:grid-cols-2" : "grid-cols-1 @2xl:grid-cols-3"
1497
1497
  ),
1498
1498
  children: plans.map((plan) => /* @__PURE__ */ jsx(PlanCard, { plan, onSelect, labels }, plan.id))
1499
1499
  }
@@ -2031,15 +2031,18 @@ function RenameDialog({
2031
2031
  }
2032
2032
  var DEFAULT_FIRM_POOL_SECTION_LABELS = {
2033
2033
  title: "Firm AI usage",
2034
+ licence: "Licence",
2034
2035
  used: "This month",
2035
2036
  premiumOnly: "Standard AI is unlimited; the allowance applies to Premium AI.",
2036
2037
  resets: (date) => `resets ${date}`,
2037
2038
  usageUnknown: "Usage is being calculated.",
2038
- autoAddons: (count) => `Auto add-ons (${count})`,
2039
- topUpLabel: "Add-ons to buy",
2039
+ autoAddons: (count) => `Automatic top-ups: ${count}`,
2040
+ autoAddonsOff: "Automatic top-ups are off (\xA30 usage budget).",
2041
+ topUpLabel: "Steps to add",
2040
2042
  topUp: "Add AI usage",
2041
2043
  toppingUp: "Adding\u2026",
2042
- topUpHelp: (perAddon) => `Each add-on adds ${perAddon} of AI usage a month, pooled across the firm.`
2044
+ topUpHelp: (perStep) => `Each step adds ${perStep} of AI usage a month, pooled across the firm, and renews until reduced.`,
2045
+ topUpTotal: (total) => `+${total} of AI usage a month`
2043
2046
  };
2044
2047
  var FIRM_POOL_MAX_TOP_UP = 100;
2045
2048
  var defaultFormat = (gbp) => `\xA3${gbp.toLocaleString("en-GB", { maximumFractionDigits: 2 })}`;
@@ -2056,9 +2059,17 @@ function FirmPoolSection({
2056
2059
  const valid = Number.isInteger(count) && count >= 1 && count <= FIRM_POOL_MAX_TOP_UP;
2057
2060
  const used = view.usedGbp;
2058
2061
  const pct = used != null && view.totalGbp > 0 ? used / view.totalGbp * 100 : 0;
2062
+ const step = view.addonGbp ?? 25;
2059
2063
  return /* @__PURE__ */ jsxs("section", { className: "space-y-3", "data-testid": testId, children: [
2060
2064
  /* @__PURE__ */ jsx("h3", { className: "px-1 text-sm font-semibold text-foreground", children: l.title }),
2061
2065
  /* @__PURE__ */ jsxs("div", { className: "space-y-3 px-1", children: [
2066
+ view.licence && /* @__PURE__ */ jsxs("div", { className: "space-y-0.5 text-sm", "data-testid": `${testId}-licence`, children: [
2067
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline justify-between gap-x-4", children: [
2068
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: l.licence }),
2069
+ /* @__PURE__ */ jsx("span", { className: "tabular-nums text-muted-foreground", children: view.licence })
2070
+ ] }),
2071
+ view.renews && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", "data-testid": `${testId}-renews`, children: view.renews })
2072
+ ] }),
2062
2073
  /* @__PURE__ */ jsx(
2063
2074
  UsageMeter,
2064
2075
  {
@@ -2076,9 +2087,11 @@ function FirmPoolSection({
2076
2087
  label: l.autoAddons(view.autoAddons.count),
2077
2088
  value: `${view.autoAddons.spent} / ${view.autoAddons.limit}`,
2078
2089
  pct: view.autoAddons.pct,
2090
+ hint: view.autoAddons.added,
2079
2091
  testId: `${testId}-auto-addons`
2080
2092
  }
2081
2093
  ),
2094
+ view.autoAddonsOff && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", "data-testid": `${testId}-auto-addons-off`, children: l.autoAddonsOff }),
2082
2095
  view.premiumOnly && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", "data-testid": `${testId}-premium-only`, children: l.premiumOnly }),
2083
2096
  onTopUp && /* @__PURE__ */ jsxs(
2084
2097
  "form",
@@ -2116,7 +2129,15 @@ function FirmPoolSection({
2116
2129
  children: isToppingUp ? l.toppingUp : l.topUp
2117
2130
  }
2118
2131
  ),
2119
- /* @__PURE__ */ jsx("p", { className: "w-full text-xs text-muted-foreground", children: l.topUpHelp(formatAmount(view.addonGbp ?? 10)) })
2132
+ valid && /* @__PURE__ */ jsx(
2133
+ "span",
2134
+ {
2135
+ className: "self-center text-sm tabular-nums text-foreground",
2136
+ "data-testid": `${testId}-top-up-total`,
2137
+ children: l.topUpTotal(formatAmount(count * step))
2138
+ }
2139
+ ),
2140
+ /* @__PURE__ */ jsx("p", { className: "w-full text-xs text-muted-foreground", children: l.topUpHelp(formatAmount(step)) })
2120
2141
  ]
2121
2142
  }
2122
2143
  )