@eifi1/ui-kit 0.32.1 → 0.33.0

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 (373) hide show
  1. package/README.md +16 -8
  2. package/dist/account/delete-account-setting.d.ts +10 -10
  3. package/dist/account/delete-account-setting.js +2 -1
  4. package/dist/account/delete-account-setting.js.map +1 -1
  5. package/dist/account/email-change-setting.d.ts +5 -0
  6. package/dist/account/email-change-setting.js +4 -3
  7. package/dist/account/email-change-setting.js.map +1 -1
  8. package/dist/account/sessions-setting.d.ts +4 -0
  9. package/dist/account/sessions-setting.js +3 -2
  10. package/dist/account/sessions-setting.js.map +1 -1
  11. package/dist/admin/admin-action-confirm.d.ts +10 -10
  12. package/dist/admin/admin-action-confirm.js.map +1 -1
  13. package/dist/admin/invitations-panel.d.ts +10 -10
  14. package/dist/admin/invitations-panel.js +4 -3
  15. package/dist/admin/invitations-panel.js.map +1 -1
  16. package/dist/admin/plan-change.d.ts +100 -0
  17. package/dist/admin/plan-change.js +208 -0
  18. package/dist/admin/plan-change.js.map +1 -0
  19. package/dist/admin/reviewer-scope-editor.d.ts +10 -10
  20. package/dist/admin/reviewer-scope-editor.js.map +1 -1
  21. package/dist/admin/role-select.d.ts +7 -7
  22. package/dist/admin/role-select.js.map +1 -1
  23. package/dist/admin/transfer-ownership-dialog.d.ts +10 -10
  24. package/dist/admin/user-roster.d.ts +7 -7
  25. package/dist/admin/user-roster.js +2 -2
  26. package/dist/admin/user-roster.js.map +1 -1
  27. package/dist/auth/auth-errors.d.ts +13 -2
  28. package/dist/auth/auth-errors.js +5 -1
  29. package/dist/auth/auth-errors.js.map +1 -1
  30. package/dist/auth/complete-name-dialog.d.ts +4 -1
  31. package/dist/auth/complete-name-dialog.js +2 -1
  32. package/dist/auth/complete-name-dialog.js.map +1 -1
  33. package/dist/auth/register-form.d.ts +10 -10
  34. package/dist/billing/billing-banner.d.ts +13 -11
  35. package/dist/billing/billing-banner.js.map +1 -1
  36. package/dist/billing/billing-labels.d.ts +10 -10
  37. package/dist/billing/billing-labels.js +10 -1
  38. package/dist/billing/billing-labels.js.map +1 -1
  39. package/dist/billing/billing-lock.d.ts +39 -12
  40. package/dist/billing/billing-lock.js +9 -3
  41. package/dist/billing/billing-lock.js.map +1 -1
  42. package/dist/billing/billing-overview.d.ts +154 -0
  43. package/dist/billing/billing-overview.js +2 -0
  44. package/dist/billing/billing-overview.js.map +1 -0
  45. package/dist/billing/billing-standing.d.ts +10 -10
  46. package/dist/billing/checkout-processing.d.ts +217 -0
  47. package/dist/billing/checkout-processing.js +198 -0
  48. package/dist/billing/checkout-processing.js.map +1 -0
  49. package/dist/billing/checkout-return.d.ts +51 -0
  50. package/dist/billing/checkout-return.js +43 -0
  51. package/dist/billing/checkout-return.js.map +1 -0
  52. package/dist/billing/pay-page.d.ts +210 -0
  53. package/dist/billing/pay-page.js +113 -0
  54. package/dist/billing/pay-page.js.map +1 -0
  55. package/dist/billing/plan-card.d.ts +10 -10
  56. package/dist/billing/plan-limit-notice.d.ts +10 -10
  57. package/dist/billing/plan-limit-toast.d.ts +143 -0
  58. package/dist/billing/plan-limit-toast.js +40 -0
  59. package/dist/billing/plan-limit-toast.js.map +1 -0
  60. package/dist/billing/subscription-actions.d.ts +38 -15
  61. package/dist/billing/subscription-actions.js +9 -2
  62. package/dist/billing/subscription-actions.js.map +1 -1
  63. package/dist/billing/subscription-status-chip.d.ts +9 -9
  64. package/dist/bin/eifi1-pay-page.mjs +166 -0
  65. package/dist/chart.d.ts +10 -10
  66. package/dist/components/account-chips.d.ts +6 -1
  67. package/dist/components/account-settings.d.ts +4 -1
  68. package/dist/components/account-settings.js +2 -1
  69. package/dist/components/account-settings.js.map +1 -1
  70. package/dist/components/amount-input.d.ts +10 -10
  71. package/dist/components/autocomplete.d.ts +2 -1
  72. package/dist/components/autocomplete.js +3 -1
  73. package/dist/components/autocomplete.js.map +1 -1
  74. package/dist/components/button-group.d.ts +10 -10
  75. package/dist/components/button-group.js +1 -1
  76. package/dist/components/button-group.js.map +1 -1
  77. package/dist/components/calculator.d.ts +10 -10
  78. package/dist/components/calculator.js +3 -3
  79. package/dist/components/calculator.js.map +1 -1
  80. package/dist/components/checkbox-group.d.ts +2 -1
  81. package/dist/components/checkbox-group.js.map +1 -1
  82. package/dist/components/checkbox.d.ts +2 -1
  83. package/dist/components/checkbox.js.map +1 -1
  84. package/dist/components/chip.d.ts +2 -1
  85. package/dist/components/chip.js +19 -17
  86. package/dist/components/chip.js.map +1 -1
  87. package/dist/components/choice-card.d.ts +3 -1
  88. package/dist/components/choice-card.js +1 -1
  89. package/dist/components/choice-card.js.map +1 -1
  90. package/dist/components/combobox.d.ts +4 -3
  91. package/dist/components/combobox.js.map +1 -1
  92. package/dist/components/confirm-dialog.d.ts +10 -10
  93. package/dist/components/confirm-dialog.js +6 -3
  94. package/dist/components/confirm-dialog.js.map +1 -1
  95. package/dist/components/copy-button.d.ts +11 -11
  96. package/dist/components/country-select.d.ts +2 -1
  97. package/dist/components/country-select.js.map +1 -1
  98. package/dist/components/danger-confirm.d.ts +10 -10
  99. package/dist/components/danger-confirm.js.map +1 -1
  100. package/dist/components/data-table-cells.d.ts +12 -1
  101. package/dist/components/data-table-filter-popover.d.ts +12 -1
  102. package/dist/components/data-table-filters.d.ts +12 -1
  103. package/dist/components/data-table-labels.d.ts +12 -1
  104. package/dist/components/data-table-pagination.d.ts +12 -1
  105. package/dist/components/data-table.d.ts +12 -1
  106. package/dist/components/data-table.js +3 -3
  107. package/dist/components/data-table.js.map +1 -1
  108. package/dist/components/date-picker.js +6 -4
  109. package/dist/components/date-picker.js.map +1 -1
  110. package/dist/components/entity-combobox.d.ts +3 -2
  111. package/dist/components/entity-combobox.js.map +1 -1
  112. package/dist/components/facing-pair.d.ts +10 -10
  113. package/dist/components/field-parts.d.ts +32 -4
  114. package/dist/components/field-parts.js +54 -19
  115. package/dist/components/field-parts.js.map +1 -1
  116. package/dist/components/file-button.d.ts +10 -10
  117. package/dist/components/file-button.js +3 -2
  118. package/dist/components/file-button.js.map +1 -1
  119. package/dist/components/file-dropzone.d.ts +11 -11
  120. package/dist/components/file-dropzone.js.map +1 -1
  121. package/dist/components/floating-panel.js +5 -5
  122. package/dist/components/floating-panel.js.map +1 -1
  123. package/dist/components/form-actions.d.ts +9 -9
  124. package/dist/components/form-actions.js +3 -3
  125. package/dist/components/form-actions.js.map +1 -1
  126. package/dist/components/iban-input.d.ts +10 -10
  127. package/dist/components/inline-edit-field.d.ts +2 -1
  128. package/dist/components/inline-edit-field.js +6 -6
  129. package/dist/components/inline-edit-field.js.map +1 -1
  130. package/dist/components/language-select.d.ts +10 -10
  131. package/dist/components/legal-page.d.ts +10 -10
  132. package/dist/components/legal.d.ts +10 -10
  133. package/dist/components/list.d.ts +2 -1
  134. package/dist/components/list.js +4 -5
  135. package/dist/components/list.js.map +1 -1
  136. package/dist/components/money-field.d.ts +10 -10
  137. package/dist/components/month-picker.js +54 -44
  138. package/dist/components/month-picker.js.map +1 -1
  139. package/dist/components/multi-entity-combobox.d.ts +3 -2
  140. package/dist/components/multi-entity-combobox.js.map +1 -1
  141. package/dist/components/number-field.d.ts +10 -10
  142. package/dist/components/number-input.d.ts +10 -10
  143. package/dist/components/numpad-sheet.d.ts +10 -10
  144. package/dist/components/numpad-sheet.js +2 -2
  145. package/dist/components/numpad-sheet.js.map +1 -1
  146. package/dist/components/page-header.js +6 -1
  147. package/dist/components/page-header.js.map +1 -1
  148. package/dist/components/phone-input.d.ts +10 -10
  149. package/dist/components/popover.d.ts +1 -1
  150. package/dist/components/popover.js +2 -0
  151. package/dist/components/popover.js.map +1 -1
  152. package/dist/components/row-actions.d.ts +5 -5
  153. package/dist/components/row-actions.js +130 -38
  154. package/dist/components/row-actions.js.map +1 -1
  155. package/dist/components/series-chart.d.ts +10 -10
  156. package/dist/components/settings-fields.d.ts +10 -10
  157. package/dist/components/share-card.d.ts +7 -7
  158. package/dist/components/share-card.js +26 -10
  159. package/dist/components/share-card.js.map +1 -1
  160. package/dist/components/status-dot.d.ts +1 -0
  161. package/dist/components/status-dot.js +2 -2
  162. package/dist/components/status-dot.js.map +1 -1
  163. package/dist/components/swatch-picker.d.ts +2 -1
  164. package/dist/components/swatch-picker.js.map +1 -1
  165. package/dist/components/swipeable-row.d.ts +88 -17
  166. package/dist/components/swipeable-row.js +46 -9
  167. package/dist/components/swipeable-row.js.map +1 -1
  168. package/dist/components/switch.d.ts +2 -1
  169. package/dist/components/switch.js.map +1 -1
  170. package/dist/components/table.d.ts +2 -1
  171. package/dist/components/table.js +6 -0
  172. package/dist/components/table.js.map +1 -1
  173. package/dist/components/text-link.d.ts +9 -9
  174. package/dist/components/time-input.d.ts +10 -10
  175. package/dist/components/toggle-group.d.ts +2 -1
  176. package/dist/components/toggle-group.js +1 -1
  177. package/dist/components/toggle-group.js.map +1 -1
  178. package/dist/components/translation-review-editor.d.ts +4 -0
  179. package/dist/components/translation-review-editor.js +4 -3
  180. package/dist/components/translation-review-editor.js.map +1 -1
  181. package/dist/components/translation-review-parts.d.ts +1 -0
  182. package/dist/components/translation-review.d.ts +1 -0
  183. package/dist/components/translation-review.js +15 -18
  184. package/dist/components/translation-review.js.map +1 -1
  185. package/dist/components/ui.d.ts +9 -9
  186. package/dist/components/ui.js +48 -28
  187. package/dist/components/ui.js.map +1 -1
  188. package/dist/components/use-table-state.d.ts +12 -1
  189. package/dist/components/user-avatar.d.ts +1 -0
  190. package/dist/components/write-lock.d.ts +101 -13
  191. package/dist/components/write-lock.js +37 -13
  192. package/dist/components/write-lock.js.map +1 -1
  193. package/dist/{data-table-labels-kpAAVi6g.d.ts → data-table-labels-BJ5JE_X2.d.ts} +17 -0
  194. package/dist/data-table.d.ts +12 -1
  195. package/dist/{delete-account-setting-FLyJf-kZ.d.ts → delete-account-setting-DiPX4Vue.d.ts} +365 -47
  196. package/dist/feedback/feedback-attachment.d.ts +10 -10
  197. package/dist/feedback/feedback-attachment.js +7 -7
  198. package/dist/feedback/feedback-attachment.js.map +1 -1
  199. package/dist/feedback/feedback-context.d.ts +10 -10
  200. package/dist/feedback/feedback-crash.d.ts +10 -10
  201. package/dist/feedback/feedback-dialog.d.ts +10 -10
  202. package/dist/feedback/feedback-inbox.d.ts +9 -9
  203. package/dist/feedback/feedback-inbox.js +7 -3
  204. package/dist/feedback/feedback-inbox.js.map +1 -1
  205. package/dist/feedback/feedback-labels.d.ts +10 -10
  206. package/dist/feedback/feedback-menu.d.ts +3 -3
  207. package/dist/feedback/feedback-record.d.ts +10 -10
  208. package/dist/feedback/feedback-row-detail.d.ts +10 -10
  209. package/dist/feedback/feedback-row-detail.js.map +1 -1
  210. package/dist/feedback/feedback-status-undo.d.ts +10 -10
  211. package/dist/feedback/feedback-submit.d.ts +10 -10
  212. package/dist/feedback/feedback-swipe.d.ts +10 -10
  213. package/dist/feedback/feedback-swipe.js +3 -6
  214. package/dist/feedback/feedback-swipe.js.map +1 -1
  215. package/dist/feedback/feedback-table.d.ts +10 -10
  216. package/dist/feedback/feedback-table.js.map +1 -1
  217. package/dist/feedback/feedback-thread.d.ts +10 -10
  218. package/dist/feedback.d.ts +10 -10
  219. package/dist/hooks/use-file-drop.d.ts +10 -10
  220. package/dist/i18n/defaults.d.ts +10 -10
  221. package/dist/i18n/defaults.js +2 -0
  222. package/dist/i18n/defaults.js.map +1 -1
  223. package/dist/i18n/german.d.ts +10 -10
  224. package/dist/i18n/german.js +34 -1
  225. package/dist/i18n/german.js.map +1 -1
  226. package/dist/i18n/kit-labels.d.ts +4 -4
  227. package/dist/i18n/kit-labels.js.map +1 -1
  228. package/dist/i18n/languages.d.ts +10 -10
  229. package/dist/i18n/locales/de-CH.d.ts +10 -10
  230. package/dist/i18n/locales/en.d.ts +10 -10
  231. package/dist/i18n/locales/es.d.ts +10 -10
  232. package/dist/i18n/locales/es.js +34 -1
  233. package/dist/i18n/locales/es.js.map +1 -1
  234. package/dist/i18n/locales/fr.d.ts +10 -10
  235. package/dist/i18n/locales/fr.js +35 -1
  236. package/dist/i18n/locales/fr.js.map +1 -1
  237. package/dist/i18n/locales/hu.d.ts +10 -10
  238. package/dist/i18n/locales/hu.js +36 -1
  239. package/dist/i18n/locales/hu.js.map +1 -1
  240. package/dist/i18n/locales/it.d.ts +10 -10
  241. package/dist/i18n/locales/it.js +34 -1
  242. package/dist/i18n/locales/it.js.map +1 -1
  243. package/dist/i18n/locales/zh.d.ts +10 -10
  244. package/dist/i18n/locales/zh.js +34 -1
  245. package/dist/i18n/locales/zh.js.map +1 -1
  246. package/dist/i18n/review.d.ts +10 -10
  247. package/dist/i18n/review.js +8 -1
  248. package/dist/i18n/review.js.map +1 -1
  249. package/dist/index.d.ts +10 -5
  250. package/dist/index.js +40 -2
  251. package/dist/index.js.map +1 -1
  252. package/dist/landing/landing-actions.d.ts +10 -10
  253. package/dist/landing/landing-sections.d.ts +10 -10
  254. package/dist/landing/public-header.d.ts +10 -10
  255. package/dist/landing/routing.d.ts +10 -10
  256. package/dist/pay/.well-known/apple-developer-merchantid-domain-association +1 -0
  257. package/dist/pay/index.html +30 -0
  258. package/dist/pay/pay.css +126 -0
  259. package/dist/pay/pay.js +198 -0
  260. package/dist/rhf/fields.d.ts +10 -10
  261. package/dist/rhf/form.d.ts +10 -10
  262. package/dist/rhf.d.ts +10 -10
  263. package/dist/settings/settings-section.d.ts +10 -10
  264. package/dist/shell/app-shell.d.ts +9 -9
  265. package/dist/shell/app-shell.js +2 -1
  266. package/dist/shell/app-shell.js.map +1 -1
  267. package/dist/shell/top-bar-brand.d.ts +10 -10
  268. package/dist/shell/topbar-action-menu.d.ts +1 -0
  269. package/dist/shell.d.ts +10 -10
  270. package/dist/testing/css-variables.d.ts +74 -0
  271. package/dist/testing/css-variables.generated.d.ts +7 -0
  272. package/dist/testing/css-variables.generated.js +8 -0
  273. package/dist/testing/css-variables.generated.js.map +1 -0
  274. package/dist/testing/css-variables.js +93 -0
  275. package/dist/testing/css-variables.js.map +1 -0
  276. package/dist/testing/index.d.ts +1 -0
  277. package/dist/testing/index.js +12 -0
  278. package/dist/testing/index.js.map +1 -0
  279. package/dist/theme/contrast-tokens.d.ts +44 -1
  280. package/dist/theme/contrast-tokens.js +21 -0
  281. package/dist/theme/contrast-tokens.js.map +1 -1
  282. package/dist/theme/contrast.d.ts +2 -2
  283. package/dist/theme/palette-derive.js +60 -11
  284. package/dist/theme/palette-derive.js.map +1 -1
  285. package/dist/theme/palette-presets.js +45 -43
  286. package/dist/theme/palette-presets.js.map +1 -1
  287. package/dist/wizard/stepper-nav.d.ts +11 -11
  288. package/dist/wizard/stepper-nav.js.map +1 -1
  289. package/dist/wizard.d.ts +10 -10
  290. package/package.json +10 -2
  291. package/src/account/delete-account-setting.tsx +6 -1
  292. package/src/account/email-change-setting.tsx +9 -3
  293. package/src/account/sessions-setting.tsx +7 -2
  294. package/src/admin/admin-action-confirm.tsx +2 -1
  295. package/src/admin/invitations-panel.tsx +9 -3
  296. package/src/admin/plan-change.tsx +459 -0
  297. package/src/admin/reviewer-scope-editor.tsx +2 -1
  298. package/src/admin/role-select.tsx +2 -1
  299. package/src/admin/user-roster.tsx +5 -3
  300. package/src/auth/auth-errors.ts +25 -2
  301. package/src/auth/complete-name-dialog.tsx +6 -2
  302. package/src/billing/billing-banner.tsx +3 -1
  303. package/src/billing/billing-labels.ts +45 -0
  304. package/src/billing/billing-lock.ts +36 -3
  305. package/src/billing/billing-overview.ts +58 -0
  306. package/src/billing/checkout-processing.ts +391 -0
  307. package/src/billing/checkout-return.ts +90 -0
  308. package/src/billing/pay-page.ts +242 -0
  309. package/src/billing/plan-limit-toast.tsx +91 -0
  310. package/src/billing/subscription-actions.tsx +41 -8
  311. package/src/components/account-settings.tsx +6 -2
  312. package/src/components/autocomplete.tsx +5 -2
  313. package/src/components/button-group.tsx +4 -1
  314. package/src/components/calculator.tsx +10 -6
  315. package/src/components/checkbox-group.tsx +2 -2
  316. package/src/components/checkbox.tsx +2 -1
  317. package/src/components/chip.tsx +37 -32
  318. package/src/components/choice-card.tsx +4 -2
  319. package/src/components/combobox.tsx +4 -4
  320. package/src/components/confirm-dialog.tsx +13 -6
  321. package/src/components/country-select.tsx +2 -2
  322. package/src/components/danger-confirm.tsx +2 -2
  323. package/src/components/data-table.tsx +20 -9
  324. package/src/components/date-picker.tsx +10 -7
  325. package/src/components/entity-combobox.tsx +3 -3
  326. package/src/components/field-parts.tsx +61 -14
  327. package/src/components/file-button.tsx +5 -4
  328. package/src/components/file-dropzone.tsx +2 -2
  329. package/src/components/floating-panel.tsx +7 -5
  330. package/src/components/form-actions.tsx +12 -5
  331. package/src/components/inline-edit-field.tsx +13 -13
  332. package/src/components/list.tsx +10 -9
  333. package/src/components/month-picker.tsx +8 -2
  334. package/src/components/multi-entity-combobox.tsx +3 -3
  335. package/src/components/numpad-sheet.tsx +8 -4
  336. package/src/components/page-header.tsx +15 -1
  337. package/src/components/popover.tsx +4 -0
  338. package/src/components/row-actions.tsx +201 -50
  339. package/src/components/share-card.tsx +67 -13
  340. package/src/components/status-dot.tsx +7 -7
  341. package/src/components/swatch-picker.tsx +2 -2
  342. package/src/components/swipeable-row.tsx +138 -27
  343. package/src/components/switch.tsx +2 -1
  344. package/src/components/table.tsx +8 -1
  345. package/src/components/toggle-group.tsx +5 -3
  346. package/src/components/translation-review-editor.tsx +8 -3
  347. package/src/components/translation-review.tsx +18 -22
  348. package/src/components/ui.tsx +98 -44
  349. package/src/components/write-lock.tsx +150 -24
  350. package/src/feedback/feedback-attachment.tsx +13 -9
  351. package/src/feedback/feedback-inbox.tsx +10 -6
  352. package/src/feedback/feedback-row-detail.tsx +3 -2
  353. package/src/feedback/feedback-swipe.tsx +6 -11
  354. package/src/feedback/feedback-table.tsx +2 -1
  355. package/src/i18n/defaults.ts +2 -0
  356. package/src/i18n/german.ts +38 -0
  357. package/src/i18n/kit-labels.tsx +4 -0
  358. package/src/i18n/locales/es.ts +34 -0
  359. package/src/i18n/locales/fr.ts +39 -0
  360. package/src/i18n/locales/hu.ts +37 -0
  361. package/src/i18n/locales/it.ts +35 -0
  362. package/src/i18n/locales/zh.ts +33 -0
  363. package/src/i18n/review.ts +7 -0
  364. package/src/index.ts +48 -4
  365. package/src/shell/app-shell.tsx +11 -6
  366. package/src/testing/css-variables.generated.ts +112 -0
  367. package/src/testing/css-variables.ts +191 -0
  368. package/src/testing/index.ts +13 -0
  369. package/src/theme/contrast-tokens.ts +53 -2
  370. package/src/theme/palette-derive.ts +87 -10
  371. package/src/theme/palette-presets.ts +45 -43
  372. package/src/wizard/stepper-nav.tsx +2 -1
  373. package/tokens.css +306 -46
@@ -1,18 +1,23 @@
1
- export { bH as BillingLabels, cp as DEFAULT_BILLING_LABELS, eW as SUBSCRIPTION_STATUSES, fb as SubscriptionStatus, f$ as useBillingLabels } from '../delete-account-setting-FLyJf-kZ.js';
1
+ export { bH as BillingLabels, cp as DEFAULT_BILLING_LABELS, f6 as SUBSCRIPTION_STATUSES, fn as SubscriptionStatus, gc as useBillingLabels } from '../delete-account-setting-DiPX4Vue.js';
2
2
  import 'react';
3
3
  import '../components/tooltip.js';
4
4
  import '../hooks/use-anchored-rect.js';
5
5
  import '../lib/clipping.js';
6
- import '../data-table-labels-kpAAVi6g.js';
6
+ import '../data-table-labels-BJ5JE_X2.js';
7
7
  import '../components/data-table-sort.js';
8
8
  import '../components/swipeable-row.js';
9
+ import '../components/status-dot.js';
10
+ import '../components/progress-bar.js';
11
+ import '../components/signed-amount.js';
12
+ import '../components/stat-tile.js';
13
+ import '../components/chip.js';
14
+ import 'lucide-react';
15
+ import '../components/field-parts.js';
16
+ import '../components/write-lock.js';
9
17
  import '../components/mini-calendar.js';
10
18
  import '../components/calendar-heatmap.js';
11
19
  import '../components/popover.js';
12
20
  import '../hooks/use-breakpoint.js';
13
- import '../components/chip.js';
14
- import 'lucide-react';
15
- import '../components/field-parts.js';
16
21
  import '../components/field-sync.js';
17
22
  import '../wizard/types.js';
18
23
  import '../tour/tour.js';
@@ -24,7 +29,6 @@ import '../components/page-contents.js';
24
29
  import '../components/series-chart-labels.js';
25
30
  import '../components/pie-chart-labels.js';
26
31
  import '../components/sparkline.js';
27
- import '../components/stat-tile.js';
28
32
  import '../components/signature-pad.js';
29
33
  import '../components/password-strength.js';
30
34
  import '../components/swatch-picker.js';
@@ -36,9 +40,6 @@ import '../hooks/use-search-param-state.js';
36
40
  import '../components/measured-grid.js';
37
41
  import '../components/user-avatar.js';
38
42
  import '../lib/person-name.js';
39
- import '../components/status-dot.js';
40
- import '../components/progress-bar.js';
41
- import '../components/signed-amount.js';
42
43
  import '../shell/topbar-action-menu.js';
43
44
  import '../components/menu-item.js';
44
45
  import '../components/floating-panel.js';
@@ -54,7 +55,6 @@ import '../components/error-boundary.js';
54
55
  import '../components/authed-image.js';
55
56
  import '../components/image-grid.js';
56
57
  import '../components/lightbox.js';
57
- import '../components/write-lock.js';
58
58
  import '../auth/sign-in-form.js';
59
59
  import '../landing/access.js';
60
60
  import '../landing/landing-labels.js';
@@ -58,12 +58,21 @@ const DEFAULT_BILLING_LABELS = {
58
58
  askForMore: "Ask for more",
59
59
  usage: (used, limit) => `${used} of ${limit}`,
60
60
  contactSubject: (dimension) => `Plan limit: ${dimension}`,
61
+ limitUsageLine: (dimension, used, limit) => `${dimension}: ${used} of ${limit}`,
61
62
  manage: "Payment and invoices",
62
63
  cancel: "Cancel subscription",
64
+ notAtProvider: "Nothing to manage yet. Payments and invoices appear here once you have a paid plan.",
65
+ payOpening: "Opening the secure checkout\u2026",
66
+ payNothing: "There\u2019s no payment to make here. To choose a plan, go back to the app.",
67
+ payFailed: "The checkout couldn\u2019t be opened. Please go back and try again in a moment.",
68
+ payBack: "The checkout was closed. You can go back, or reload this page to open it again.",
63
69
  waitingChanges: (count) => count === 1 ? "1 change waiting for a plan" : `${count} changes waiting for a plan`,
64
70
  discardWaiting: "Discard waiting changes",
65
71
  notConfigured: "Payments aren't set up yet. Please try again later.",
66
- disabled: "Subscriptions aren't available here."
72
+ disabled: "Subscriptions aren't available here.",
73
+ providerUnavailable: "The payment provider can\u2019t be reached right now. Please try again in a moment.",
74
+ alreadySubscribed: "You already have a subscription. To change your plan, go to \u201CPayment and invoices\u201D.",
75
+ planNotSold: "This plan isn\u2019t offered for that billing period or currency. Please choose another."
67
76
  };
68
77
  function useBillingLabels(labels) {
69
78
  return useKitLabels("billing", DEFAULT_BILLING_LABELS, labels);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/billing/billing-labels.ts"],"sourcesContent":["import { useKitLabels } from \"../i18n/kit-labels\";\nimport type { LabelOverride } from \"../i18n/kit-labels\";\n\n/**\n * The subscription's status vocabulary (docs/billing-harmonization.md §3.2) — server-kit's\n * `SubscriptionStatus`, value for value:\n *\n * - `trialing` — the 30-day trial without a card (§2.7), or a pure guest's row whose trial\n * has not started (§12.9, `trial_ends_at` empty);\n * - `active` — paid;\n * - `past_due` — a payment failed; in good standing during the provider's retries (§3.3);\n * - `canceled` — the payer cancelled; the American spelling is the wire's, the word shown\n * is \"Cancelled\";\n * - `expired` — a trial, a grant or a failed subscription ran out: read-only (§2.3);\n * - `comped` — free by the operator's grant or as a beta user (§3.2, `comped_until`).\n */\nexport type SubscriptionStatus = \"trialing\" | \"active\" | \"past_due\" | \"canceled\" | \"expired\" | \"comped\";\n\n/** Every status, in the order a lifecycle reads: trial, paid, trouble, ended, granted. */\nexport const SUBSCRIPTION_STATUSES: readonly SubscriptionStatus[] = Object.freeze([\n \"trialing\",\n \"active\",\n \"past_due\",\n \"canceled\",\n \"expired\",\n \"comped\",\n]);\n\n/**\n * The words of the subscription parts — the `billing` namespace of `<UiKitProvider labels>`\n * (docs/billing-harmonization.md §7, §10; ui-kit 0.32.0).\n *\n * WORDING (§12.24): the English group is \"Subscription\", never \"Plan\" — keksdose's \"plan\"\n * is the month's budget plan (\"One plan per month\"), and two meanings of one word on one\n * settings page is the clash the review found. \"Plan\" stays the word for WHAT is bought\n * (Free, Pro), \"subscription\" for the standing arrangement. German says \"Tarif\" for the\n * plan and \"Abonnement\" for the subscription (§10).\n *\n * Prices are GROSS (§12.17): Swiss consumer law (PBV) wants a consumer price with the\n * MWST in it, so the cards say so (`vatIncluded`).\n */\nexport interface BillingLabels {\n /** The settings group or admin section the parts live on (§7, §12.24): \"Subscription\". */\n group: string;\n\n /* ── PlanPicker / PlanCard (§7) ── */\n /** The picker's name when it has no visible `legend`: \"Plans\". */\n plans: string;\n /** The name of the billing-period switch: \"Billing period\". */\n interval: string;\n /** The switch's two options — yearly first (§12.17). */\n yearly: string;\n monthly: string;\n /** The name of the currency switch: \"Currency\". */\n currency: string;\n /** After a price: \"per year\", \"per month\". */\n perYear: string;\n perMonth: string;\n /** Under a price (§12.17): \"VAT included\". German: \"inkl. MWST\". */\n vatIncluded: string;\n /** A plan with no price, or a price of 0: \"Free\". */\n free: string;\n /** A plan with prices, but none for this currency and period. */\n notOffered: string;\n /** A limit of `null` (§3.1): \"Unlimited\". */\n unlimited: string;\n /** The accessible names of a card's two lists. */\n limits: string;\n features: string;\n /** The chip on the payer's current plan. */\n current: string;\n /** The picker's button for `plan` (the plan's display name) with no current plan —\n * during a trial, or after a plan ended: \"Choose Pro\". */\n choose: (plan: string) => string;\n /** …for a plan after the current one in the catalogue's order: \"Upgrade to Pro\". */\n upgrade: (plan: string) => string;\n /** …for a plan before it: \"Switch to Free\". */\n downgrade: (plan: string) => string;\n /** Why the button is off while the current plan is the one picked. */\n isCurrent: string;\n /** Why it is off while nothing is picked. */\n pickFirst: string;\n\n /* ── SubscriptionStatusChip (§6) ── */\n /** One word per status. */\n status: Record<SubscriptionStatus, string>;\n\n /* ── BillingBanner (§3.3, §12.6, §12.21) ── */\n /** A trial ends in `days` calendar days — 0 is today, 1 tomorrow. */\n trialEnding: (days: number) => string;\n /** A free grant (`comped_until`: a beta user's 12 months, an operator's grant) ends in\n * `days` calendar days. */\n grantEnding: (days: number) => string;\n /** The first failed payment (`past_due`), while the provider retries. */\n paymentFailed: string;\n /** Out of good standing: read-only, never locked (§2.3). */\n planEnded: string;\n /**\n * A guest in someone else's item that is read-only for billing (§12.6). It never says\n * WHY beyond \"for now\": the owner's payment status is the owner's personal data.\n * `item` is the item's own name (\"Household 2026\"), shown in quotes — or `undefined`.\n */\n guestReadOnly: (item?: string) => string;\n /** Back from checkout before the provider's webhook landed (§12.21). */\n processing: string;\n /** The action of the trial, grant and plan-ended banners, and of `PlanLimitNotice`'s\n * `upgrade` mode: \"Choose a plan\". */\n choosePlan: string;\n /** The payment-failed banner's action, to the provider's portal: \"Update payment method\". */\n updatePayment: string;\n /** The processing banner's action, when the app gives one: \"Check again\". */\n checkAgain: string;\n\n /* ── The read-only lock (§3.3, §12.6) ── */\n /** The `WriteLockProvider` reason for the payer (§3.3, verbatim). A guest's reason is\n * {@link guestReadOnly}. */\n lockReason: string;\n\n /* ── PlanLimitNotice (§3.4) ── */\n /** The notice's first line: \"Plan limit reached\". */\n limitReached: string;\n /** Mode `upgrade`: what the action does. */\n limitUpgrade: string;\n /** Mode `contact` (the operator grants plans by hand, keksdose's today). */\n limitContact: string;\n /** Mode `contact`'s action, a mail to support: \"Ask for more\". */\n askForMore: string;\n /** The meter's value: \"3 of 3\". Both figures are formatted already. */\n usage: (used: string, limit: string) => string;\n /** The subject of the `contact` mail; `dimension` is the app's name for it (\"Budgets\"). */\n contactSubject: (dimension: string) => string;\n\n /* ── The provider's portal (§7, §12.26) ── */\n /** The portal: payment method and invoices (§2.8, the provider hosts both). */\n manage: string;\n /**\n * The visible cancel link on the app's subscription page (§12.26). German: §312k BGB\n * wants the button that leads to the cancellation labelled \"Verträge hier kündigen\" or\n * as unambiguously — a translator should use exactly that.\n */\n cancel: string;\n\n /* ── Offline (§12.5) ── */\n /** Changes refused as `billing_read_only` inside a sync reply, kept queued and sent\n * after payment: \"3 changes waiting for a plan\". */\n waitingChanges: (count: number) => string;\n /** The sign-out guard's way out for someone who will not pay. */\n discardWaiting: string;\n\n /* ── Refusals with no part of their own (0.32.1, kastlan's 0.32 report) ── */\n /**\n * `billing_not_configured`: billing is on but the provider's settings are missing — the\n * operator's mistake, so the words ask the payer to wait, not to act. For the toast or\n * alert after \"Choose a plan\" or \"Payment and invoices\" (`isBillingError(err,\n * \"billing_not_configured\")`). `billing_read_only` and `plan_limit` need none: the\n * write lock, the banner and `PlanLimitNotice` say them.\n */\n notConfigured: string;\n /** `billing_disabled`: billing is switched off on this server (§2.9), for a page or a\n * link that reached it anyway. */\n disabled: string;\n}\n\n/** \"today\", \"tomorrow\", \"in 5 days\". */\nfunction inDays(days: number): string {\n if (days <= 0) return \"today\";\n if (days === 1) return \"tomorrow\";\n return `in ${days} days`;\n}\n\nexport const DEFAULT_BILLING_LABELS: BillingLabels = {\n group: \"Subscription\",\n\n plans: \"Plans\",\n interval: \"Billing period\",\n yearly: \"Yearly\",\n monthly: \"Monthly\",\n currency: \"Currency\",\n perYear: \"per year\",\n perMonth: \"per month\",\n vatIncluded: \"VAT included\",\n free: \"Free\",\n notOffered: \"Not offered for this billing period\",\n unlimited: \"Unlimited\",\n limits: \"Limits\",\n features: \"Included\",\n current: \"Current plan\",\n choose: (plan) => `Choose ${plan}`,\n upgrade: (plan) => `Upgrade to ${plan}`,\n downgrade: (plan) => `Switch to ${plan}`,\n isCurrent: \"This is your current plan.\",\n pickFirst: \"Pick a plan first.\",\n\n status: {\n trialing: \"Trial\",\n active: \"Active\",\n past_due: \"Payment overdue\",\n canceled: \"Cancelled\",\n expired: \"Expired\",\n comped: \"Complimentary\",\n },\n\n trialEnding: (days) =>\n `Your trial ends ${inDays(days)}. After that you can still view everything, but changes need a plan.`,\n grantEnding: (days) =>\n `Your free access ends ${inDays(days)}. After that you can still view everything, but changes need a plan.`,\n paymentFailed: \"Your last payment didn’t go through. Update your payment method to keep your plan.\",\n planEnded: \"Your plan has ended. You can still view and export everything; choose a plan to make changes again.\",\n guestReadOnly: (item) =>\n item ? `“${item}” is read-only for now; its owner can lift that.` : \"This is read-only for now; its owner can lift that.\",\n processing: \"Your payment is being processed. Your plan starts as soon as it’s confirmed; this page updates by itself.\",\n choosePlan: \"Choose a plan\",\n updatePayment: \"Update payment method\",\n checkAgain: \"Check again\",\n\n lockReason: \"Your plan has ended. Choose a plan to make changes again.\",\n\n limitReached: \"Plan limit reached\",\n limitUpgrade: \"To add more, choose a plan with a higher limit.\",\n limitContact: \"To add more, ask us for a higher limit.\",\n askForMore: \"Ask for more\",\n usage: (used, limit) => `${used} of ${limit}`,\n contactSubject: (dimension) => `Plan limit: ${dimension}`,\n\n manage: \"Payment and invoices\",\n cancel: \"Cancel subscription\",\n\n waitingChanges: (count) =>\n count === 1 ? \"1 change waiting for a plan\" : `${count} changes waiting for a plan`,\n discardWaiting: \"Discard waiting changes\",\n\n notConfigured: \"Payments aren't set up yet. Please try again later.\",\n disabled: \"Subscriptions aren't available here.\",\n};\n\n/** The `billing` namespace, resolved: English, then the provider, then `labels` — which\n * may be partial at every depth (`{ status: { comped: \"Beta\" } }`). */\nexport function useBillingLabels(labels?: LabelOverride<BillingLabels>): BillingLabels {\n return useKitLabels(\"billing\", DEFAULT_BILLING_LABELS, labels as Partial<BillingLabels> | undefined);\n}\n"],"mappings":";AAAA,SAAS,oBAAoB;AAmBtB,MAAM,wBAAuD,OAAO,OAAO;AAAA,EAChF;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AA0ID,SAAS,OAAO,MAAsB;AACpC,MAAI,QAAQ,EAAG,QAAO;AACtB,MAAI,SAAS,EAAG,QAAO;AACvB,SAAO,MAAM,IAAI;AACnB;AAEO,MAAM,yBAAwC;AAAA,EACnD,OAAO;AAAA,EAEP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,aAAa;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ,CAAC,SAAS,UAAU,IAAI;AAAA,EAChC,SAAS,CAAC,SAAS,cAAc,IAAI;AAAA,EACrC,WAAW,CAAC,SAAS,aAAa,IAAI;AAAA,EACtC,WAAW;AAAA,EACX,WAAW;AAAA,EAEX,QAAQ;AAAA,IACN,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,EACV;AAAA,EAEA,aAAa,CAAC,SACZ,mBAAmB,OAAO,IAAI,CAAC;AAAA,EACjC,aAAa,CAAC,SACZ,yBAAyB,OAAO,IAAI,CAAC;AAAA,EACvC,eAAe;AAAA,EACf,WAAW;AAAA,EACX,eAAe,CAAC,SACd,OAAO,SAAI,IAAI,0DAAqD;AAAA,EACtE,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,YAAY;AAAA,EAEZ,YAAY;AAAA,EAEZ,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,OAAO,CAAC,MAAM,UAAU,GAAG,IAAI,OAAO,KAAK;AAAA,EAC3C,gBAAgB,CAAC,cAAc,eAAe,SAAS;AAAA,EAEvD,QAAQ;AAAA,EACR,QAAQ;AAAA,EAER,gBAAgB,CAAC,UACf,UAAU,IAAI,gCAAgC,GAAG,KAAK;AAAA,EACxD,gBAAgB;AAAA,EAEhB,eAAe;AAAA,EACf,UAAU;AACZ;AAIO,SAAS,iBAAiB,QAAsD;AACrF,SAAO,aAAa,WAAW,wBAAwB,MAA4C;AACrG;","names":[]}
1
+ {"version":3,"sources":["../../src/billing/billing-labels.ts"],"sourcesContent":["import { useKitLabels } from \"../i18n/kit-labels\";\nimport type { LabelOverride } from \"../i18n/kit-labels\";\n\n/**\n * The subscription's status vocabulary (docs/billing-harmonization.md §3.2) — server-kit's\n * `SubscriptionStatus`, value for value:\n *\n * - `trialing` — the 30-day trial without a card (§2.7), or a pure guest's row whose trial\n * has not started (§12.9, `trial_ends_at` empty);\n * - `active` — paid;\n * - `past_due` — a payment failed; in good standing during the provider's retries (§3.3);\n * - `canceled` — the payer cancelled; the American spelling is the wire's, the word shown\n * is \"Cancelled\";\n * - `expired` — a trial, a grant or a failed subscription ran out: read-only (§2.3);\n * - `comped` — free by the operator's grant or as a beta user (§3.2, `comped_until`).\n */\nexport type SubscriptionStatus = \"trialing\" | \"active\" | \"past_due\" | \"canceled\" | \"expired\" | \"comped\";\n\n/** Every status, in the order a lifecycle reads: trial, paid, trouble, ended, granted. */\nexport const SUBSCRIPTION_STATUSES: readonly SubscriptionStatus[] = Object.freeze([\n \"trialing\",\n \"active\",\n \"past_due\",\n \"canceled\",\n \"expired\",\n \"comped\",\n]);\n\n/**\n * The words of the subscription parts — the `billing` namespace of `<UiKitProvider labels>`\n * (docs/billing-harmonization.md §7, §10; ui-kit 0.32.0).\n *\n * WORDING (§12.24): the English group is \"Subscription\", never \"Plan\" — keksdose's \"plan\"\n * is the month's budget plan (\"One plan per month\"), and two meanings of one word on one\n * settings page is the clash the review found. \"Plan\" stays the word for WHAT is bought\n * (Free, Pro), \"subscription\" for the standing arrangement. German says \"Tarif\" for the\n * plan and \"Abonnement\" for the subscription (§10).\n *\n * Prices are GROSS (§12.17): Swiss consumer law (PBV) wants a consumer price with the\n * MWST in it, so the cards say so (`vatIncluded`).\n */\nexport interface BillingLabels {\n /** The settings group or admin section the parts live on (§7, §12.24): \"Subscription\". */\n group: string;\n\n /* ── PlanPicker / PlanCard (§7) ── */\n /** The picker's name when it has no visible `legend`: \"Plans\". */\n plans: string;\n /** The name of the billing-period switch: \"Billing period\". */\n interval: string;\n /** The switch's two options — yearly first (§12.17). */\n yearly: string;\n monthly: string;\n /** The name of the currency switch: \"Currency\". */\n currency: string;\n /** After a price: \"per year\", \"per month\". */\n perYear: string;\n perMonth: string;\n /** Under a price (§12.17): \"VAT included\". German: \"inkl. MWST\". */\n vatIncluded: string;\n /** A plan with no price, or a price of 0: \"Free\". */\n free: string;\n /** A plan with prices, but none for this currency and period. */\n notOffered: string;\n /** A limit of `null` (§3.1): \"Unlimited\". */\n unlimited: string;\n /** The accessible names of a card's two lists. */\n limits: string;\n features: string;\n /** The chip on the payer's current plan. */\n current: string;\n /** The picker's button for `plan` (the plan's display name) with no current plan —\n * during a trial, or after a plan ended: \"Choose Pro\". */\n choose: (plan: string) => string;\n /** …for a plan after the current one in the catalogue's order: \"Upgrade to Pro\". */\n upgrade: (plan: string) => string;\n /** …for a plan before it: \"Switch to Free\". */\n downgrade: (plan: string) => string;\n /** Why the button is off while the current plan is the one picked. */\n isCurrent: string;\n /** Why it is off while nothing is picked. */\n pickFirst: string;\n\n /* ── SubscriptionStatusChip (§6) ── */\n /** One word per status. */\n status: Record<SubscriptionStatus, string>;\n\n /* ── BillingBanner (§3.3, §12.6, §12.21) ── */\n /** A trial ends in `days` calendar days — 0 is today, 1 tomorrow. */\n trialEnding: (days: number) => string;\n /** A free grant (`comped_until`: a beta user's 12 months, an operator's grant) ends in\n * `days` calendar days. */\n grantEnding: (days: number) => string;\n /** The first failed payment (`past_due`), while the provider retries. */\n paymentFailed: string;\n /** Out of good standing: read-only, never locked (§2.3). */\n planEnded: string;\n /**\n * A guest in someone else's item that is read-only for billing (§12.6). It never says\n * WHY beyond \"for now\": the owner's payment status is the owner's personal data.\n * `item` is the item's own name (\"Household 2026\"), shown in quotes — or `undefined`.\n */\n guestReadOnly: (item?: string) => string;\n /** Back from checkout before the provider's webhook landed (§12.21). */\n processing: string;\n /** The action of the trial, grant and plan-ended banners, and of `PlanLimitNotice`'s\n * `upgrade` mode: \"Choose a plan\". */\n choosePlan: string;\n /** The payment-failed banner's action, to the provider's portal: \"Update payment method\". */\n updatePayment: string;\n /** The processing banner's action, when the app gives one: \"Check again\". */\n checkAgain: string;\n\n /* ── The read-only lock (§3.3, §12.6) ── */\n /** The `WriteLockProvider` reason for the payer (§3.3, verbatim). A guest's reason is\n * {@link guestReadOnly}. */\n lockReason: string;\n\n /* ── PlanLimitNotice (§3.4) ── */\n /** The notice's first line: \"Plan limit reached\". */\n limitReached: string;\n /** Mode `upgrade`: what the action does. */\n limitUpgrade: string;\n /** Mode `contact` (the operator grants plans by hand, keksdose's today). */\n limitContact: string;\n /** Mode `contact`'s action, a mail to support: \"Ask for more\". */\n askForMore: string;\n /** The meter's value: \"3 of 3\". Both figures are formatted already. */\n usage: (used: string, limit: string) => string;\n /** The subject of the `contact` mail; `dimension` is the app's name for it (\"Budgets\"). */\n contactSubject: (dimension: string) => string;\n /**\n * The figure line of the limit's toast (`usePlanLimitToast`, §14.11) and of an\n * operator's plan change over the new limit (§14.12): \"Budgets: 3 of 3\". A key of its\n * own rather than `${dimension}: ${usage}`, because French puts a space before the\n * colon. Both figures are formatted already.\n */\n limitUsageLine: (dimension: string, used: string, limit: string) => string;\n\n /* ── The provider's portal (§7, §12.26) ── */\n /** The portal: payment method and invoices (§2.8, the provider hosts both). */\n manage: string;\n /**\n * The visible cancel link on the app's subscription page (§12.26). German: §312k BGB\n * wants the button that leads to the cancellation labelled \"Verträge hier kündigen\" or\n * as unambiguously — a translator should use exactly that.\n */\n cancel: string;\n /**\n * In place of both while the payer hasn't reached the provider (the overview's\n * `at_provider` is false, §14.5): there is no customer to open a portal for yet. Also\n * the words for `409 billing_not_at_provider`, a stale page that asked anyway.\n */\n notAtProvider: string;\n\n /* ── The pay page (§14.4) ── */\n /* Built into the static page `dist/pay/` at the kit's build: it has no React and no\n provider, so an app's override never reaches it. */\n /** While the checkout opens. */\n payOpening: string;\n /** A link without a transaction, or billing switched off: nothing to pay. */\n payNothing: string;\n /** Paddle's script didn't load, or the page's configuration is wrong. */\n payFailed: string;\n /** The buyer closed the checkout without paying. */\n payBack: string;\n\n /* ── Offline (§12.5) ── */\n /** Changes refused as `billing_read_only` inside a sync reply, kept queued and sent\n * after payment: \"3 changes waiting for a plan\". */\n waitingChanges: (count: number) => string;\n /** The sign-out guard's way out for someone who will not pay. */\n discardWaiting: string;\n\n /* ── Refusals with no part of their own (0.32.1, kastlan's 0.32 report) ── */\n /**\n * `billing_not_configured`: billing is on but the provider's settings are missing — the\n * operator's mistake, so the words ask the payer to wait, not to act. For the toast or\n * alert after \"Choose a plan\" or \"Payment and invoices\" (`isBillingError(err,\n * \"billing_not_configured\")`). `billing_read_only` and `plan_limit` need none: the\n * write lock, the banner and `PlanLimitNotice` say them.\n */\n notConfigured: string;\n /** `billing_disabled`: billing is switched off on this server (§2.9), for a page or a\n * link that reached it anyway. */\n disabled: string;\n /* 0.33.0 — server-kit 0.7's refusals (§14.2). `billing_not_at_provider` is\n {@link notAtProvider}'s: a stale page that asked for the portal anyway. */\n /** `billing_provider_unavailable` (502): the provider didn't answer. Try again. */\n providerUnavailable: string;\n /** `billing_already_subscribed` (409): a second checkout while a subscription runs\n * (§14.6) — plan changes go through the portal. */\n alreadySubscribed: string;\n /** `billing_plan_not_sold` (422): the catalogue doesn't sell this plan with that\n * period or currency. */\n planNotSold: string;\n}\n\n/** \"today\", \"tomorrow\", \"in 5 days\". */\nfunction inDays(days: number): string {\n if (days <= 0) return \"today\";\n if (days === 1) return \"tomorrow\";\n return `in ${days} days`;\n}\n\nexport const DEFAULT_BILLING_LABELS: BillingLabels = {\n group: \"Subscription\",\n\n plans: \"Plans\",\n interval: \"Billing period\",\n yearly: \"Yearly\",\n monthly: \"Monthly\",\n currency: \"Currency\",\n perYear: \"per year\",\n perMonth: \"per month\",\n vatIncluded: \"VAT included\",\n free: \"Free\",\n notOffered: \"Not offered for this billing period\",\n unlimited: \"Unlimited\",\n limits: \"Limits\",\n features: \"Included\",\n current: \"Current plan\",\n choose: (plan) => `Choose ${plan}`,\n upgrade: (plan) => `Upgrade to ${plan}`,\n downgrade: (plan) => `Switch to ${plan}`,\n isCurrent: \"This is your current plan.\",\n pickFirst: \"Pick a plan first.\",\n\n status: {\n trialing: \"Trial\",\n active: \"Active\",\n past_due: \"Payment overdue\",\n canceled: \"Cancelled\",\n expired: \"Expired\",\n comped: \"Complimentary\",\n },\n\n trialEnding: (days) =>\n `Your trial ends ${inDays(days)}. After that you can still view everything, but changes need a plan.`,\n grantEnding: (days) =>\n `Your free access ends ${inDays(days)}. After that you can still view everything, but changes need a plan.`,\n paymentFailed: \"Your last payment didn’t go through. Update your payment method to keep your plan.\",\n planEnded: \"Your plan has ended. You can still view and export everything; choose a plan to make changes again.\",\n guestReadOnly: (item) =>\n item ? `“${item}” is read-only for now; its owner can lift that.` : \"This is read-only for now; its owner can lift that.\",\n processing: \"Your payment is being processed. Your plan starts as soon as it’s confirmed; this page updates by itself.\",\n choosePlan: \"Choose a plan\",\n updatePayment: \"Update payment method\",\n checkAgain: \"Check again\",\n\n lockReason: \"Your plan has ended. Choose a plan to make changes again.\",\n\n limitReached: \"Plan limit reached\",\n limitUpgrade: \"To add more, choose a plan with a higher limit.\",\n limitContact: \"To add more, ask us for a higher limit.\",\n askForMore: \"Ask for more\",\n usage: (used, limit) => `${used} of ${limit}`,\n contactSubject: (dimension) => `Plan limit: ${dimension}`,\n limitUsageLine: (dimension, used, limit) => `${dimension}: ${used} of ${limit}`,\n\n manage: \"Payment and invoices\",\n cancel: \"Cancel subscription\",\n notAtProvider: \"Nothing to manage yet. Payments and invoices appear here once you have a paid plan.\",\n\n payOpening: \"Opening the secure checkout…\",\n payNothing: \"There’s no payment to make here. To choose a plan, go back to the app.\",\n payFailed: \"The checkout couldn’t be opened. Please go back and try again in a moment.\",\n payBack: \"The checkout was closed. You can go back, or reload this page to open it again.\",\n\n waitingChanges: (count) =>\n count === 1 ? \"1 change waiting for a plan\" : `${count} changes waiting for a plan`,\n discardWaiting: \"Discard waiting changes\",\n\n notConfigured: \"Payments aren't set up yet. Please try again later.\",\n disabled: \"Subscriptions aren't available here.\",\n providerUnavailable: \"The payment provider can’t be reached right now. Please try again in a moment.\",\n alreadySubscribed: \"You already have a subscription. To change your plan, go to “Payment and invoices”.\",\n planNotSold: \"This plan isn’t offered for that billing period or currency. Please choose another.\",\n};\n\n/** The `billing` namespace, resolved: English, then the provider, then `labels` — which\n * may be partial at every depth (`{ status: { comped: \"Beta\" } }`). */\nexport function useBillingLabels(labels?: LabelOverride<BillingLabels>): BillingLabels {\n return useKitLabels(\"billing\", DEFAULT_BILLING_LABELS, labels as Partial<BillingLabels> | undefined);\n}\n"],"mappings":";AAAA,SAAS,oBAAoB;AAmBtB,MAAM,wBAAuD,OAAO,OAAO;AAAA,EAChF;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AA6KD,SAAS,OAAO,MAAsB;AACpC,MAAI,QAAQ,EAAG,QAAO;AACtB,MAAI,SAAS,EAAG,QAAO;AACvB,SAAO,MAAM,IAAI;AACnB;AAEO,MAAM,yBAAwC;AAAA,EACnD,OAAO;AAAA,EAEP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,aAAa;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ,CAAC,SAAS,UAAU,IAAI;AAAA,EAChC,SAAS,CAAC,SAAS,cAAc,IAAI;AAAA,EACrC,WAAW,CAAC,SAAS,aAAa,IAAI;AAAA,EACtC,WAAW;AAAA,EACX,WAAW;AAAA,EAEX,QAAQ;AAAA,IACN,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,EACV;AAAA,EAEA,aAAa,CAAC,SACZ,mBAAmB,OAAO,IAAI,CAAC;AAAA,EACjC,aAAa,CAAC,SACZ,yBAAyB,OAAO,IAAI,CAAC;AAAA,EACvC,eAAe;AAAA,EACf,WAAW;AAAA,EACX,eAAe,CAAC,SACd,OAAO,SAAI,IAAI,0DAAqD;AAAA,EACtE,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,YAAY;AAAA,EAEZ,YAAY;AAAA,EAEZ,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,OAAO,CAAC,MAAM,UAAU,GAAG,IAAI,OAAO,KAAK;AAAA,EAC3C,gBAAgB,CAAC,cAAc,eAAe,SAAS;AAAA,EACvD,gBAAgB,CAAC,WAAW,MAAM,UAAU,GAAG,SAAS,KAAK,IAAI,OAAO,KAAK;AAAA,EAE7E,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,eAAe;AAAA,EAEf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,SAAS;AAAA,EAET,gBAAgB,CAAC,UACf,UAAU,IAAI,gCAAgC,GAAG,KAAK;AAAA,EACxD,gBAAgB;AAAA,EAEhB,eAAe;AAAA,EACf,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,aAAa;AACf;AAIO,SAAS,iBAAiB,QAAsD;AACrF,SAAO,aAAa,WAAW,wBAAwB,MAA4C;AACrG;","names":[]}
@@ -1,18 +1,23 @@
1
1
  import { ReactNode } from 'react';
2
- import { e4 as LabelOverride, bH as BillingLabels } from '../delete-account-setting-FLyJf-kZ.js';
2
+ import { e5 as LabelOverride, bH as BillingLabels } from '../delete-account-setting-DiPX4Vue.js';
3
+ import { WriteLockHold, WriteLockKind } from '../components/write-lock.js';
3
4
  import '../components/tooltip.js';
4
5
  import '../hooks/use-anchored-rect.js';
5
6
  import '../lib/clipping.js';
6
- import '../data-table-labels-kpAAVi6g.js';
7
+ import '../data-table-labels-BJ5JE_X2.js';
7
8
  import '../components/data-table-sort.js';
8
9
  import '../components/swipeable-row.js';
10
+ import '../components/status-dot.js';
11
+ import '../components/progress-bar.js';
12
+ import '../components/signed-amount.js';
13
+ import '../components/stat-tile.js';
14
+ import '../components/chip.js';
15
+ import 'lucide-react';
16
+ import '../components/field-parts.js';
9
17
  import '../components/mini-calendar.js';
10
18
  import '../components/calendar-heatmap.js';
11
19
  import '../components/popover.js';
12
20
  import '../hooks/use-breakpoint.js';
13
- import '../components/chip.js';
14
- import 'lucide-react';
15
- import '../components/field-parts.js';
16
21
  import '../components/field-sync.js';
17
22
  import '../wizard/types.js';
18
23
  import '../tour/tour.js';
@@ -24,7 +29,6 @@ import '../components/page-contents.js';
24
29
  import '../components/series-chart-labels.js';
25
30
  import '../components/pie-chart-labels.js';
26
31
  import '../components/sparkline.js';
27
- import '../components/stat-tile.js';
28
32
  import '../components/signature-pad.js';
29
33
  import '../components/password-strength.js';
30
34
  import '../components/swatch-picker.js';
@@ -36,9 +40,6 @@ import '../hooks/use-search-param-state.js';
36
40
  import '../components/measured-grid.js';
37
41
  import '../components/user-avatar.js';
38
42
  import '../lib/person-name.js';
39
- import '../components/status-dot.js';
40
- import '../components/progress-bar.js';
41
- import '../components/signed-amount.js';
42
43
  import '../shell/topbar-action-menu.js';
43
44
  import '../components/menu-item.js';
44
45
  import '../components/floating-panel.js';
@@ -54,7 +55,6 @@ import '../components/error-boundary.js';
54
55
  import '../components/authed-image.js';
55
56
  import '../components/image-grid.js';
56
57
  import '../components/lightbox.js';
57
- import '../components/write-lock.js';
58
58
  import '../auth/sign-in-form.js';
59
59
  import '../landing/access.js';
60
60
  import '../landing/landing-labels.js';
@@ -99,17 +99,26 @@ import '../lib/column-mapping.js';
99
99
  import '../lib/table-text.js';
100
100
  import '../components/focus-ring.js';
101
101
 
102
- /** One reason an app may lock writing: whether it locks now, and its one sentence. */
102
+ /** One reason an app may lock writing: whether it locks now, its one sentence, and what
103
+ * kind of lock it is. */
103
104
  interface WriteLockSource {
104
105
  locked: boolean;
105
106
  /** The sentence a locked commit shows ("Not possible in the demo."). */
106
107
  reason?: ReactNode;
108
+ /**
109
+ * `"demo"`, `"billing"`, or the app's own (§12.36): a control's `commit` may be exempt
110
+ * from a kind — `COMMIT_EXCEPT_BILLING`. Left out, no control can be exempt from it.
111
+ */
112
+ kind?: WriteLockKind;
107
113
  }
108
114
  /** What {@link combineWriteLocks} answers: the props of one `WriteLockProvider`. */
109
115
  interface CombinedWriteLock {
110
116
  locked: boolean;
111
117
  /** The first locked source's reason; `undefined` while nothing locks. */
112
118
  reason: ReactNode | undefined;
119
+ /** EVERY locked source, kind and reason, in the order given (§12.36) — so a control
120
+ * exempt from billing under the demo's lock and billing's still finds the demo's. */
121
+ holds: WriteLockHold[];
113
122
  }
114
123
  /**
115
124
  * Several reasons to lock writing, as ONE `WriteLockProvider` (docs/billing-harmonization.md
@@ -134,6 +143,12 @@ interface CombinedWriteLock {
134
143
  * not two joined: a tooltip answers "why can't I?" once, and in practice one source locks
135
144
  * at a time — demo users have no subscription row and are never gated (§12.7). `null`,
136
145
  * `undefined` and `false` entries are skipped, for `cond && { … }`.
146
+ *
147
+ * 0.33 (§12.36): name each source's `kind` — `{ locked, reason, kind: "demo" }`,
148
+ * {@link useBillingWriteLock} for billing — and `holds` carries every locked one, in
149
+ * order, so the kit's parts that a lapsed plan still allows (removing access, the
150
+ * account's own settings, an operator's plan change) reopen under billing by themselves
151
+ * while the demo's lock still holds them.
137
152
  */
138
153
  declare function combineWriteLocks(sources: ReadonlyArray<WriteLockSource | null | undefined | false>): CombinedWriteLock;
139
154
  interface BillingLockReasonOptions {
@@ -154,5 +169,17 @@ interface BillingLockReasonOptions {
154
169
  * to {@link combineWriteLocks} beside the demo's.
155
170
  */
156
171
  declare function useBillingLockReason(options?: BillingLockReasonOptions): string;
172
+ /**
173
+ * Billing's lock as one source for {@link combineWriteLocks}: `{ locked, reason, kind:
174
+ * "billing" }`, the reason the payer's or a guest's as {@link useBillingLockReason} says
175
+ * it (§12.36). The kind is what lets the kit's parts that §3.3 and §12.13 allow stay live
176
+ * under it.
177
+ *
178
+ * <WriteLockProvider {...combineWriteLocks([
179
+ * { locked: demoReadOnly, reason: demo.writeLocked, kind: "demo" },
180
+ * useBillingWriteLock(budget.locked === "billing", { guest: !isOwner, item: budget.name }),
181
+ * ])}>
182
+ */
183
+ declare function useBillingWriteLock(locked: boolean, options?: BillingLockReasonOptions): WriteLockSource;
157
184
 
158
- export { type BillingLockReasonOptions, type CombinedWriteLock, type WriteLockSource, combineWriteLocks, useBillingLockReason };
185
+ export { type BillingLockReasonOptions, type CombinedWriteLock, type WriteLockSource, combineWriteLocks, useBillingLockReason, useBillingWriteLock };
@@ -1,17 +1,23 @@
1
1
  "use client";
2
2
  import { useBillingLabels } from "./billing-labels.js";
3
3
  function combineWriteLocks(sources) {
4
+ const holds = [];
4
5
  for (const source of sources) {
5
- if (source && source.locked) return { locked: true, reason: source.reason };
6
+ if (source && source.locked) holds.push({ kind: source.kind, reason: source.reason });
6
7
  }
7
- return { locked: false, reason: void 0 };
8
+ return { locked: holds.length > 0, reason: holds[0]?.reason, holds };
8
9
  }
9
10
  function useBillingLockReason(options = {}) {
10
11
  const labels = useBillingLabels(options.labels);
11
12
  return options.guest ? labels.guestReadOnly(options.item) : labels.lockReason;
12
13
  }
14
+ function useBillingWriteLock(locked, options = {}) {
15
+ const reason = useBillingLockReason(options);
16
+ return { locked, reason, kind: "billing" };
17
+ }
13
18
  export {
14
19
  combineWriteLocks,
15
- useBillingLockReason
20
+ useBillingLockReason,
21
+ useBillingWriteLock
16
22
  };
17
23
  //# sourceMappingURL=billing-lock.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/billing/billing-lock.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport { useBillingLabels } from \"./billing-labels\";\nimport type { BillingLabels } from \"./billing-labels\";\n\n/** One reason an app may lock writing: whether it locks now, and its one sentence. */\nexport interface WriteLockSource {\n locked: boolean;\n /** The sentence a locked commit shows (\"Not possible in the demo.\"). */\n reason?: ReactNode;\n}\n\n/** What {@link combineWriteLocks} answers: the props of one `WriteLockProvider`. */\nexport interface CombinedWriteLock {\n locked: boolean;\n /** The first locked source's reason; `undefined` while nothing locks. */\n reason: ReactNode | undefined;\n}\n\n/**\n * Several reasons to lock writing, as ONE `WriteLockProvider` (docs/billing-harmonization.md\n * §12.6): the demo's read-only data and billing's read-only lapse, in keksdose's case on\n * the same budget page.\n *\n * const demo = useDemoLabels();\n * const billingReason = useBillingLockReason({ guest: !isOwner, item: budget.name });\n * <WriteLockProvider {...combineWriteLocks([\n * { locked: demoReadOnly, reason: demo.writeLocked },\n * { locked: budget.locked === \"billing\", reason: billingReason },\n * ])}>\n *\n * WHY NOT TWO NESTED PROVIDERS: the nearest provider wins (write-lock.tsx), and an inner\n * `locked={false}` REOPENS an outer lock on purpose — a viewer's own notes on a shared\n * curve. So `<Demo locked><Billing locked={false}>` would unlock the demo's data, and an\n * app would have to mount the inner provider only while it locks. One provider fed by\n * this function has no such order to get wrong.\n *\n * Locked when any source is; the reason is the FIRST locked source's, so list them in the\n * order the server refuses them (§12.3): the demo's 403 before billing's 402. One sentence,\n * not two joined: a tooltip answers \"why can't I?\" once, and in practice one source locks\n * at a time — demo users have no subscription row and are never gated (§12.7). `null`,\n * `undefined` and `false` entries are skipped, for `cond && { … }`.\n */\nexport function combineWriteLocks(\n sources: ReadonlyArray<WriteLockSource | null | undefined | false>,\n): CombinedWriteLock {\n for (const source of sources) {\n if (source && source.locked) return { locked: true, reason: source.reason };\n }\n return { locked: false, reason: undefined };\n}\n\nexport interface BillingLockReasonOptions {\n /**\n * The reader is a GUEST in someone else's item (§12.6): the reason never says why\n * beyond \"for now\", because the owner's payment status is the owner's personal data —\n * \"This budget is read-only for now; its owner can lift that.\" Default false: the\n * reader is the payer, \"Your plan has ended. Choose a plan to make changes again.\"\n */\n guest?: boolean;\n /** A guest's item, by its own name (\"Household 2026\"). Ignored for the payer. */\n item?: string;\n labels?: LabelOverride<BillingLabels>;\n}\n\n/**\n * The billing lock's sentence for a `WriteLockProvider` (§3.3), in the `billing` words of\n * the nearest provider: the payer's `lockReason`, or a guest's `guestReadOnly`. Feed it\n * to {@link combineWriteLocks} beside the demo's.\n */\nexport function useBillingLockReason(options: BillingLockReasonOptions = {}): string {\n const labels = useBillingLabels(options.labels);\n return options.guest ? labels.guestReadOnly(options.item) : labels.lockReason;\n}\n"],"mappings":";AAGA,SAAS,wBAAwB;AAyC1B,SAAS,kBACd,SACmB;AACnB,aAAW,UAAU,SAAS;AAC5B,QAAI,UAAU,OAAO,OAAQ,QAAO,EAAE,QAAQ,MAAM,QAAQ,OAAO,OAAO;AAAA,EAC5E;AACA,SAAO,EAAE,QAAQ,OAAO,QAAQ,OAAU;AAC5C;AAoBO,SAAS,qBAAqB,UAAoC,CAAC,GAAW;AACnF,QAAM,SAAS,iBAAiB,QAAQ,MAAM;AAC9C,SAAO,QAAQ,QAAQ,OAAO,cAAc,QAAQ,IAAI,IAAI,OAAO;AACrE;","names":[]}
1
+ {"version":3,"sources":["../../src/billing/billing-lock.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport type { WriteLockHold, WriteLockKind } from \"../components/write-lock\";\nimport { useBillingLabels } from \"./billing-labels\";\nimport type { BillingLabels } from \"./billing-labels\";\n\n/** One reason an app may lock writing: whether it locks now, its one sentence, and what\n * kind of lock it is. */\nexport interface WriteLockSource {\n locked: boolean;\n /** The sentence a locked commit shows (\"Not possible in the demo.\"). */\n reason?: ReactNode;\n /**\n * `\"demo\"`, `\"billing\"`, or the app's own (§12.36): a control's `commit` may be exempt\n * from a kind — `COMMIT_EXCEPT_BILLING`. Left out, no control can be exempt from it.\n */\n kind?: WriteLockKind;\n}\n\n/** What {@link combineWriteLocks} answers: the props of one `WriteLockProvider`. */\nexport interface CombinedWriteLock {\n locked: boolean;\n /** The first locked source's reason; `undefined` while nothing locks. */\n reason: ReactNode | undefined;\n /** EVERY locked source, kind and reason, in the order given (§12.36) — so a control\n * exempt from billing under the demo's lock and billing's still finds the demo's. */\n holds: WriteLockHold[];\n}\n\n/**\n * Several reasons to lock writing, as ONE `WriteLockProvider` (docs/billing-harmonization.md\n * §12.6): the demo's read-only data and billing's read-only lapse, in keksdose's case on\n * the same budget page.\n *\n * const demo = useDemoLabels();\n * const billingReason = useBillingLockReason({ guest: !isOwner, item: budget.name });\n * <WriteLockProvider {...combineWriteLocks([\n * { locked: demoReadOnly, reason: demo.writeLocked },\n * { locked: budget.locked === \"billing\", reason: billingReason },\n * ])}>\n *\n * WHY NOT TWO NESTED PROVIDERS: the nearest provider wins (write-lock.tsx), and an inner\n * `locked={false}` REOPENS an outer lock on purpose — a viewer's own notes on a shared\n * curve. So `<Demo locked><Billing locked={false}>` would unlock the demo's data, and an\n * app would have to mount the inner provider only while it locks. One provider fed by\n * this function has no such order to get wrong.\n *\n * Locked when any source is; the reason is the FIRST locked source's, so list them in the\n * order the server refuses them (§12.3): the demo's 403 before billing's 402. One sentence,\n * not two joined: a tooltip answers \"why can't I?\" once, and in practice one source locks\n * at a time — demo users have no subscription row and are never gated (§12.7). `null`,\n * `undefined` and `false` entries are skipped, for `cond && { … }`.\n *\n * 0.33 (§12.36): name each source's `kind` — `{ locked, reason, kind: \"demo\" }`,\n * {@link useBillingWriteLock} for billing — and `holds` carries every locked one, in\n * order, so the kit's parts that a lapsed plan still allows (removing access, the\n * account's own settings, an operator's plan change) reopen under billing by themselves\n * while the demo's lock still holds them.\n */\nexport function combineWriteLocks(\n sources: ReadonlyArray<WriteLockSource | null | undefined | false>,\n): CombinedWriteLock {\n const holds: WriteLockHold[] = [];\n for (const source of sources) {\n if (source && source.locked) holds.push({ kind: source.kind, reason: source.reason });\n }\n return { locked: holds.length > 0, reason: holds[0]?.reason, holds };\n}\n\nexport interface BillingLockReasonOptions {\n /**\n * The reader is a GUEST in someone else's item (§12.6): the reason never says why\n * beyond \"for now\", because the owner's payment status is the owner's personal data —\n * \"This budget is read-only for now; its owner can lift that.\" Default false: the\n * reader is the payer, \"Your plan has ended. Choose a plan to make changes again.\"\n */\n guest?: boolean;\n /** A guest's item, by its own name (\"Household 2026\"). Ignored for the payer. */\n item?: string;\n labels?: LabelOverride<BillingLabels>;\n}\n\n/**\n * The billing lock's sentence for a `WriteLockProvider` (§3.3), in the `billing` words of\n * the nearest provider: the payer's `lockReason`, or a guest's `guestReadOnly`. Feed it\n * to {@link combineWriteLocks} beside the demo's.\n */\nexport function useBillingLockReason(options: BillingLockReasonOptions = {}): string {\n const labels = useBillingLabels(options.labels);\n return options.guest ? labels.guestReadOnly(options.item) : labels.lockReason;\n}\n\n/**\n * Billing's lock as one source for {@link combineWriteLocks}: `{ locked, reason, kind:\n * \"billing\" }`, the reason the payer's or a guest's as {@link useBillingLockReason} says\n * it (§12.36). The kind is what lets the kit's parts that §3.3 and §12.13 allow stay live\n * under it.\n *\n * <WriteLockProvider {...combineWriteLocks([\n * { locked: demoReadOnly, reason: demo.writeLocked, kind: \"demo\" },\n * useBillingWriteLock(budget.locked === \"billing\", { guest: !isOwner, item: budget.name }),\n * ])}>\n */\nexport function useBillingWriteLock(locked: boolean, options: BillingLockReasonOptions = {}): WriteLockSource {\n const reason = useBillingLockReason(options);\n return { locked, reason, kind: \"billing\" };\n}\n"],"mappings":";AAIA,SAAS,wBAAwB;AAwD1B,SAAS,kBACd,SACmB;AACnB,QAAM,QAAyB,CAAC;AAChC,aAAW,UAAU,SAAS;AAC5B,QAAI,UAAU,OAAO,OAAQ,OAAM,KAAK,EAAE,MAAM,OAAO,MAAM,QAAQ,OAAO,OAAO,CAAC;AAAA,EACtF;AACA,SAAO,EAAE,QAAQ,MAAM,SAAS,GAAG,QAAQ,MAAM,CAAC,GAAG,QAAQ,MAAM;AACrE;AAoBO,SAAS,qBAAqB,UAAoC,CAAC,GAAW;AACnF,QAAM,SAAS,iBAAiB,QAAQ,MAAM;AAC9C,SAAO,QAAQ,QAAQ,OAAO,cAAc,QAAQ,IAAI,IAAI,OAAO;AACrE;AAaO,SAAS,oBAAoB,QAAiB,UAAoC,CAAC,GAAoB;AAC5G,QAAM,SAAS,qBAAqB,OAAO;AAC3C,SAAO,EAAE,QAAQ,QAAQ,MAAM,UAAU;AAC3C;","names":[]}
@@ -0,0 +1,154 @@
1
+ import { DateInput } from '../lib/format.js';
2
+ import { fn as SubscriptionStatus } from '../delete-account-setting-DiPX4Vue.js';
3
+ import { BillingCurrency } from './plan-price.js';
4
+ import 'react';
5
+ import '../components/tooltip.js';
6
+ import '../hooks/use-anchored-rect.js';
7
+ import '../lib/clipping.js';
8
+ import '../data-table-labels-BJ5JE_X2.js';
9
+ import '../components/data-table-sort.js';
10
+ import '../components/swipeable-row.js';
11
+ import '../components/status-dot.js';
12
+ import '../components/progress-bar.js';
13
+ import '../components/signed-amount.js';
14
+ import '../components/stat-tile.js';
15
+ import '../components/chip.js';
16
+ import 'lucide-react';
17
+ import '../components/field-parts.js';
18
+ import '../components/write-lock.js';
19
+ import '../components/mini-calendar.js';
20
+ import '../components/calendar-heatmap.js';
21
+ import '../components/popover.js';
22
+ import '../hooks/use-breakpoint.js';
23
+ import '../components/field-sync.js';
24
+ import '../wizard/types.js';
25
+ import '../tour/tour.js';
26
+ import '../search/command-palette.js';
27
+ import '../search/global-search.js';
28
+ import '../search/search-index.js';
29
+ import '../components/month-picker.js';
30
+ import '../components/page-contents.js';
31
+ import '../components/series-chart-labels.js';
32
+ import '../components/pie-chart-labels.js';
33
+ import '../components/sparkline.js';
34
+ import '../components/signature-pad.js';
35
+ import '../components/password-strength.js';
36
+ import '../components/swatch-picker.js';
37
+ import '../components/tile-radio.js';
38
+ import '../components/icon-picker.js';
39
+ import '../components/dialog-frame.js';
40
+ import '../components/modal.js';
41
+ import '../hooks/use-search-param-state.js';
42
+ import '../components/measured-grid.js';
43
+ import '../components/user-avatar.js';
44
+ import '../lib/person-name.js';
45
+ import '../shell/topbar-action-menu.js';
46
+ import '../components/menu-item.js';
47
+ import '../components/floating-panel.js';
48
+ import '../hooks/use-authed-src.js';
49
+ import '../components/account-settings-labels.js';
50
+ import '../components/bulk-action-bar.js';
51
+ import '../components/list.js';
52
+ import '../components/breadcrumbs.js';
53
+ import '../components/toast.js';
54
+ import '../components/description-list.js';
55
+ import '../components/line-items.js';
56
+ import '../components/error-boundary.js';
57
+ import '../components/authed-image.js';
58
+ import '../components/image-grid.js';
59
+ import '../components/lightbox.js';
60
+ import '../auth/sign-in-form.js';
61
+ import '../landing/access.js';
62
+ import '../landing/landing-labels.js';
63
+ import '../shell/topbar-controls.js';
64
+ import '../theme/palette-presets.js';
65
+ import '../theme/chart-palette.js';
66
+ import '../theme/theme-store.js';
67
+ import 'zustand/middleware';
68
+ import 'zustand';
69
+ import '../auth/complete-name-dialog.js';
70
+ import '../auth/forgot-password-form.js';
71
+ import '../auth/status-parts.js';
72
+ import '../auth/reset-password-form.js';
73
+ import '../auth/verify-email.js';
74
+ import '../auth/not-found-page.js';
75
+ import '../auth/accept-invitation.js';
76
+ import '../shell/company-switcher.js';
77
+ import '../account/email-change-setting.js';
78
+ import '../account/sessions-setting.js';
79
+ import '../account/data-export-setting.js';
80
+ import '../components/account-chips.js';
81
+ import '../admin/admin-parts.js';
82
+ import '../admin/admin-action-log.js';
83
+ import '../settings/settings-labels.js';
84
+ import '../demo/demo-labels.js';
85
+ import '../components/appearance-labels.js';
86
+ import '../theme/contrast.js';
87
+ import '../theme/text-size.js';
88
+ import '../components/reauth-dialog.js';
89
+ import '../components/server-wake.js';
90
+ import '../lib/server-wake.js';
91
+ import '../components/translation-review-labels.js';
92
+ import '../lib/translation-review.js';
93
+ import '../components/country-select.js';
94
+ import '../components/inline-edit-field.js';
95
+ import '../lib/iban.js';
96
+ import '../lib/phone.js';
97
+ import '../components/sign-chip.js';
98
+ import '../components/column-mapper.js';
99
+ import '../lib/column-mapping.js';
100
+ import '../lib/table-text.js';
101
+ import '../components/focus-ring.js';
102
+
103
+ /**
104
+ * The billing API's shapes the kit's parts read (docs/billing-harmonization.md §4,
105
+ * §14.5) — server-kit 0.7's schemas, field for field under their wire names, for an app
106
+ * whose client is hand-written (kastlan's `features/billing/types.ts`, Kurvenschmiede's
107
+ * `shared/types/billing.ts`, which no mirror test covers).
108
+ */
109
+ /** Where a row's current state came from (server-kit's `SubscriptionSource`, §3.2). */
110
+ type SubscriptionSource = "trial" | "provider" | "manual" | "beta";
111
+ /** `GET /billing/overview` (§4): where the payer's subscription stands, what the plan
112
+ * allows and what is used. Only ever the payer's own (§12.6). */
113
+ interface BillingOverview {
114
+ /** The plan's code, lowercase (§3.1). */
115
+ plan: string;
116
+ status: SubscriptionStatus;
117
+ source: SubscriptionSource;
118
+ /** False: read-only (§3.3). */
119
+ in_good_standing: boolean;
120
+ trial_ends_at: DateInput;
121
+ /** When the free grant ends; null: no end. */
122
+ comped_until: DateInput;
123
+ current_period_end: DateInput;
124
+ cancel_at_period_end: boolean;
125
+ /** Dimension → limit; null for unlimited. */
126
+ limits: Record<string, number | null>;
127
+ /** What the payer has, per dimension (§12.15). */
128
+ usage: Record<string, number>;
129
+ currency: BillingCurrency;
130
+ /**
131
+ * 0.7 (§14.5): the provider has a customer for this payer, whatever the status or the
132
+ * source — `SubscriptionActions`' `atProvider`. False: "nothing to manage yet", and a
133
+ * portal request would answer `409 billing_not_at_provider`.
134
+ */
135
+ at_provider: boolean;
136
+ }
137
+ /**
138
+ * Where in the provider's portal a request lands (server-kit's `PortalTarget`, §14.5):
139
+ *
140
+ * - `overview` — "Payment and invoices";
141
+ * - `cancel` — "Cancel subscription": the subscription's cancel link (§12.26);
142
+ * - `payment_method` — the payment-failed banner's "Update payment method".
143
+ *
144
+ * The server answers the overview where Paddle gives no such link (a paused or cancelled
145
+ * subscription).
146
+ */
147
+ type PortalTarget = "overview" | "cancel" | "payment_method";
148
+ /** `POST /billing/portal`'s optional body (server-kit's `PortalRequest`, §14.5); left
149
+ * out, the overview. The answer is `{url}`, a fresh link that is never stored. */
150
+ interface PortalRequest {
151
+ target?: PortalTarget;
152
+ }
153
+
154
+ export type { BillingOverview, PortalRequest, PortalTarget, SubscriptionSource };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ //# sourceMappingURL=billing-overview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,19 +1,24 @@
1
1
  import { DateInput } from '../lib/format.js';
2
- import { fb as SubscriptionStatus } from '../delete-account-setting-FLyJf-kZ.js';
2
+ import { fn as SubscriptionStatus } from '../delete-account-setting-DiPX4Vue.js';
3
3
  import 'react';
4
4
  import '../components/tooltip.js';
5
5
  import '../hooks/use-anchored-rect.js';
6
6
  import '../lib/clipping.js';
7
- import '../data-table-labels-kpAAVi6g.js';
7
+ import '../data-table-labels-BJ5JE_X2.js';
8
8
  import '../components/data-table-sort.js';
9
9
  import '../components/swipeable-row.js';
10
+ import '../components/status-dot.js';
11
+ import '../components/progress-bar.js';
12
+ import '../components/signed-amount.js';
13
+ import '../components/stat-tile.js';
14
+ import '../components/chip.js';
15
+ import 'lucide-react';
16
+ import '../components/field-parts.js';
17
+ import '../components/write-lock.js';
10
18
  import '../components/mini-calendar.js';
11
19
  import '../components/calendar-heatmap.js';
12
20
  import '../components/popover.js';
13
21
  import '../hooks/use-breakpoint.js';
14
- import '../components/chip.js';
15
- import 'lucide-react';
16
- import '../components/field-parts.js';
17
22
  import '../components/field-sync.js';
18
23
  import '../wizard/types.js';
19
24
  import '../tour/tour.js';
@@ -25,7 +30,6 @@ import '../components/page-contents.js';
25
30
  import '../components/series-chart-labels.js';
26
31
  import '../components/pie-chart-labels.js';
27
32
  import '../components/sparkline.js';
28
- import '../components/stat-tile.js';
29
33
  import '../components/signature-pad.js';
30
34
  import '../components/password-strength.js';
31
35
  import '../components/swatch-picker.js';
@@ -37,9 +41,6 @@ import '../hooks/use-search-param-state.js';
37
41
  import '../components/measured-grid.js';
38
42
  import '../components/user-avatar.js';
39
43
  import '../lib/person-name.js';
40
- import '../components/status-dot.js';
41
- import '../components/progress-bar.js';
42
- import '../components/signed-amount.js';
43
44
  import '../shell/topbar-action-menu.js';
44
45
  import '../components/menu-item.js';
45
46
  import '../components/floating-panel.js';
@@ -55,7 +56,6 @@ import '../components/error-boundary.js';
55
56
  import '../components/authed-image.js';
56
57
  import '../components/image-grid.js';
57
58
  import '../components/lightbox.js';
58
- import '../components/write-lock.js';
59
59
  import '../auth/sign-in-form.js';
60
60
  import '../landing/access.js';
61
61
  import '../landing/landing-labels.js';