@eifi1/ui-kit 0.41.0 → 0.43.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 (190) hide show
  1. package/README.md +26 -7
  2. package/dist/admin/admin-area-labels.d.ts +59 -0
  3. package/dist/admin/admin-area-labels.js +35 -0
  4. package/dist/admin/admin-area-labels.js.map +1 -0
  5. package/dist/admin/admin-forbidden.d.ts +35 -0
  6. package/dist/admin/admin-forbidden.js +36 -0
  7. package/dist/admin/admin-forbidden.js.map +1 -0
  8. package/dist/admin/admin-overview.d.ts +110 -0
  9. package/dist/admin/admin-overview.js +92 -0
  10. package/dist/admin/admin-overview.js.map +1 -0
  11. package/dist/admin/admin-sections.d.ts +94 -0
  12. package/dist/admin/admin-sections.js +81 -0
  13. package/dist/admin/admin-sections.js.map +1 -0
  14. package/dist/admin/admin-tool-links.d.ts +48 -0
  15. package/dist/admin/admin-tool-links.js +31 -0
  16. package/dist/admin/admin-tool-links.js.map +1 -0
  17. package/dist/billing/billing-banner.d.ts +33 -2
  18. package/dist/billing/billing-banner.js +29 -3
  19. package/dist/billing/billing-banner.js.map +1 -1
  20. package/dist/billing/billing-labels.d.ts +36 -0
  21. package/dist/billing/billing-labels.js +10 -0
  22. package/dist/billing/billing-labels.js.map +1 -1
  23. package/dist/billing/billing-overview.d.ts +33 -0
  24. package/dist/billing/billing-overview.js +6 -0
  25. package/dist/billing/billing-overview.js.map +1 -1
  26. package/dist/billing/billing-standing.d.ts +8 -0
  27. package/dist/billing/billing-standing.js.map +1 -1
  28. package/dist/billing/cancel-request.d.ts +53 -0
  29. package/dist/billing/cancel-request.js +21 -0
  30. package/dist/billing/cancel-request.js.map +1 -0
  31. package/dist/billing/cancel-subscription.d.ts +46 -0
  32. package/dist/billing/cancel-subscription.js +57 -0
  33. package/dist/billing/cancel-subscription.js.map +1 -0
  34. package/dist/billing/plan-card.d.ts +45 -1
  35. package/dist/billing/plan-card.js +53 -2
  36. package/dist/billing/plan-card.js.map +1 -1
  37. package/dist/billing/plan-switch.d.ts +10 -1
  38. package/dist/billing/plan-switch.js +22 -13
  39. package/dist/billing/plan-switch.js.map +1 -1
  40. package/dist/billing/provider-page.d.ts +40 -0
  41. package/dist/billing/provider-page.js +33 -0
  42. package/dist/billing/provider-page.js.map +1 -0
  43. package/dist/billing/subscription-actions.d.ts +68 -4
  44. package/dist/billing/subscription-actions.js +65 -5
  45. package/dist/billing/subscription-actions.js.map +1 -1
  46. package/dist/components/account-chips.d.ts +50 -2
  47. package/dist/components/account-chips.js +33 -0
  48. package/dist/components/account-chips.js.map +1 -1
  49. package/dist/components/empty-state.d.ts +2 -1
  50. package/dist/components/empty-state.js.map +1 -1
  51. package/dist/eslint/index.js +1 -1
  52. package/dist/feedback/feedback-menu.d.ts +7 -4
  53. package/dist/feedback/feedback-menu.js +4 -2
  54. package/dist/feedback/feedback-menu.js.map +1 -1
  55. package/dist/hooks/use-search-param-state.js +4 -1
  56. package/dist/hooks/use-search-param-state.js.map +1 -1
  57. package/dist/i18n/defaults.js +7 -1
  58. package/dist/i18n/defaults.js.map +1 -1
  59. package/dist/i18n/german.js +113 -0
  60. package/dist/i18n/german.js.map +1 -1
  61. package/dist/i18n/kit-labels.d.ts +12 -0
  62. package/dist/i18n/kit-labels.js.map +1 -1
  63. package/dist/i18n/locales/en.js +142 -1
  64. package/dist/i18n/locales/en.js.map +3 -3
  65. package/dist/i18n/locales/es.js +110 -0
  66. package/dist/i18n/locales/es.js.map +1 -1
  67. package/dist/i18n/locales/fr.js +109 -0
  68. package/dist/i18n/locales/fr.js.map +1 -1
  69. package/dist/i18n/locales/hu.js +110 -0
  70. package/dist/i18n/locales/hu.js.map +1 -1
  71. package/dist/i18n/locales/it.js +110 -0
  72. package/dist/i18n/locales/it.js.map +1 -1
  73. package/dist/i18n/locales/zh.js +109 -0
  74. package/dist/i18n/locales/zh.js.map +1 -1
  75. package/dist/i18n/review.js +34 -1
  76. package/dist/i18n/review.js.map +1 -1
  77. package/dist/index.d.ts +24 -2
  78. package/dist/index.js +29 -1
  79. package/dist/index.js.map +1 -1
  80. package/dist/search/global-search.d.ts +3 -0
  81. package/dist/search/global-search.js +3 -1
  82. package/dist/search/global-search.js.map +1 -1
  83. package/dist/settings/settings-catalogue.d.ts +9 -1
  84. package/dist/settings/settings-catalogue.js +1 -1
  85. package/dist/settings/settings-catalogue.js.map +1 -1
  86. package/dist/settings/settings-layout.d.ts +7 -1
  87. package/dist/settings/settings-layout.js +35 -27
  88. package/dist/settings/settings-layout.js.map +1 -1
  89. package/dist/shell/account-menu-language.d.ts +46 -0
  90. package/dist/shell/account-menu-language.js +64 -0
  91. package/dist/shell/account-menu-language.js.map +1 -0
  92. package/dist/shell/admin-menu.d.ts +69 -0
  93. package/dist/shell/admin-menu.js +64 -0
  94. package/dist/shell/admin-menu.js.map +1 -0
  95. package/dist/shell/app-shell.d.ts +10 -0
  96. package/dist/shell/app-shell.js +22 -4
  97. package/dist/shell/app-shell.js.map +1 -1
  98. package/dist/shell/dev-switchers.d.ts +53 -0
  99. package/dist/shell/dev-switchers.js +107 -0
  100. package/dist/shell/dev-switchers.js.map +1 -0
  101. package/dist/shell/sync-status-indicator.d.ts +86 -0
  102. package/dist/shell/sync-status-indicator.js +170 -0
  103. package/dist/shell/sync-status-indicator.js.map +1 -0
  104. package/dist/shell/top-bar-actions.d.ts +49 -0
  105. package/dist/shell/top-bar-actions.js +31 -0
  106. package/dist/shell/top-bar-actions.js.map +1 -0
  107. package/dist/shell/top-bar-parts-labels.d.ts +90 -0
  108. package/dist/shell/top-bar-parts-labels.js +51 -0
  109. package/dist/shell/top-bar-parts-labels.js.map +1 -0
  110. package/dist/shell/topbar-action-menu.d.ts +13 -1
  111. package/dist/shell/topbar-action-menu.js +5 -2
  112. package/dist/shell/topbar-action-menu.js.map +1 -1
  113. package/dist/shell/topbar-controls.d.ts +16 -3
  114. package/dist/shell/topbar-controls.js +5 -1
  115. package/dist/shell/topbar-controls.js.map +1 -1
  116. package/dist/shell/tour-menu.d.ts +67 -0
  117. package/dist/shell/tour-menu.js +87 -0
  118. package/dist/shell/tour-menu.js.map +1 -0
  119. package/dist/shell.d.ts +16 -0
  120. package/dist/shell.js +21 -0
  121. package/dist/shell.js.map +1 -1
  122. package/dist/tour/tour-catalogue-labels.d.ts +44 -0
  123. package/dist/tour/tour-catalogue-labels.js +32 -0
  124. package/dist/tour/tour-catalogue-labels.js.map +1 -0
  125. package/dist/tour/tour-catalogue.d.ts +68 -0
  126. package/dist/tour/tour-catalogue.js +189 -0
  127. package/dist/tour/tour-catalogue.js.map +1 -0
  128. package/dist/tour/tour-info.d.ts +112 -0
  129. package/dist/tour/tour-info.js +36 -0
  130. package/dist/tour/tour-info.js.map +1 -0
  131. package/dist/tour/use-tour-progress.d.ts +61 -0
  132. package/dist/tour/use-tour-progress.js +116 -0
  133. package/dist/tour/use-tour-progress.js.map +1 -0
  134. package/dist/tour/use-tour-url-sync.d.ts +58 -0
  135. package/dist/tour/use-tour-url-sync.js +110 -0
  136. package/dist/tour/use-tour-url-sync.js.map +1 -0
  137. package/dist/tour.d.ts +8 -0
  138. package/dist/tour.js +18 -0
  139. package/dist/tour.js.map +1 -1
  140. package/package.json +1 -1
  141. package/src/admin/admin-area-labels.ts +91 -0
  142. package/src/admin/admin-forbidden.tsx +75 -0
  143. package/src/admin/admin-overview.tsx +217 -0
  144. package/src/admin/admin-sections.tsx +198 -0
  145. package/src/admin/admin-tool-links.tsx +84 -0
  146. package/src/billing/billing-banner.tsx +57 -6
  147. package/src/billing/billing-labels.ts +59 -0
  148. package/src/billing/billing-overview.ts +37 -0
  149. package/src/billing/billing-standing.ts +8 -0
  150. package/src/billing/cancel-request.ts +75 -0
  151. package/src/billing/cancel-subscription.tsx +102 -0
  152. package/src/billing/plan-card.tsx +97 -1
  153. package/src/billing/plan-switch.tsx +16 -0
  154. package/src/billing/provider-page.ts +75 -0
  155. package/src/billing/subscription-actions.tsx +155 -20
  156. package/src/components/account-chips.tsx +89 -2
  157. package/src/components/empty-state.tsx +2 -1
  158. package/src/feedback/feedback-menu.tsx +8 -3
  159. package/src/hooks/use-search-param-state.ts +6 -1
  160. package/src/i18n/defaults.ts +6 -0
  161. package/src/i18n/german.ts +127 -0
  162. package/src/i18n/kit-labels.tsx +12 -0
  163. package/src/i18n/locales/en.ts +32 -0
  164. package/src/i18n/locales/es.ts +121 -0
  165. package/src/i18n/locales/fr.ts +121 -0
  166. package/src/i18n/locales/hu.ts +119 -0
  167. package/src/i18n/locales/it.ts +122 -0
  168. package/src/i18n/locales/zh.ts +114 -0
  169. package/src/i18n/review.ts +33 -0
  170. package/src/index.ts +38 -2
  171. package/src/search/global-search.tsx +5 -0
  172. package/src/settings/settings-catalogue.ts +10 -2
  173. package/src/settings/settings-layout.tsx +58 -34
  174. package/src/shell/account-menu-language.tsx +116 -0
  175. package/src/shell/admin-menu.tsx +146 -0
  176. package/src/shell/app-shell.tsx +44 -3
  177. package/src/shell/dev-switchers.tsx +179 -0
  178. package/src/shell/sync-status-indicator.tsx +301 -0
  179. package/src/shell/top-bar-actions.tsx +79 -0
  180. package/src/shell/top-bar-parts-labels.ts +142 -0
  181. package/src/shell/topbar-action-menu.tsx +15 -2
  182. package/src/shell/topbar-controls.tsx +20 -3
  183. package/src/shell/tour-menu.tsx +179 -0
  184. package/src/shell.ts +27 -0
  185. package/src/tour/tour-catalogue-labels.ts +75 -0
  186. package/src/tour/tour-catalogue.tsx +316 -0
  187. package/src/tour/tour-info.ts +144 -0
  188. package/src/tour/use-tour-progress.ts +198 -0
  189. package/src/tour/use-tour-url-sync.ts +221 -0
  190. package/src/tour.ts +11 -0
@@ -11,6 +11,7 @@ import type { CharacterCountLabels, PasswordRevealLabels } from "../components/f
11
11
  import type { TabsLabels } from "../components/tabs.js";
12
12
  import type { WizardLabels } from "../wizard/types.js";
13
13
  import type { TourLabels } from "../tour/tour.js";
14
+ import type { TourCatalogueLabels } from "../tour/tour-catalogue-labels.js";
14
15
  import type { CommandPaletteLabels } from "../search/command-palette.js";
15
16
  import type { GlobalSearchLabels } from "../search/global-search.js";
16
17
  import type { MonthPickerLabels } from "../components/month-picker.js";
@@ -100,6 +101,8 @@ import type { PhoneInputLabels } from "../components/phone-input.js";
100
101
  import type { SignChipLabels } from "../components/sign-chip.js";
101
102
  import type { ColumnMapperLabels } from "../components/column-mapper.js";
102
103
  import type { NotificationsLabels } from "../notifications/notifications-labels.js";
104
+ import type { AdminAreaLabels } from "../admin/admin-area-labels.js";
105
+ import type { TopBarPartsLabels } from "../shell/top-bar-parts-labels.js";
103
106
  /**
104
107
  * EVERY string the kit renders, as one typed tree — and an optional provider that
105
108
  * hands it to every component at once.
@@ -286,6 +289,8 @@ export interface UiKitLabels {
286
289
  file: FileLabels;
287
290
  wizard: WizardLabels;
288
291
  tour: TourLabels;
292
+ /** 0.43.0: the tours page — `TourCatalogue` and its card (docs/tours-harmonization.md §3). */
293
+ tourCatalogue: TourCatalogueLabels;
289
294
  commandPalette: CommandPaletteLabels;
290
295
  globalSearch: GlobalSearchLabels;
291
296
  seriesChart: SeriesChartLabels;
@@ -442,6 +447,13 @@ export interface UiKitLabels {
442
447
  * device's push, the device list, and the unsubscribe page
443
448
  * (docs/notifications-harmonization.md §4.2). */
444
449
  notifications: NotificationsLabels;
450
+ /** 0.42.0: the admin area's shared words — the account menu's "Administration" row, the
451
+ * 403 page, the shared sections, the overview's tiles and the Tools list
452
+ * (docs/admin-harmonization.md §3.1). */
453
+ adminArea: AdminAreaLabels;
454
+ /** 0.42.0: the top bar's shared parts — `TourMenu`, `SyncStatusIndicator`, `DevSwitchers`
455
+ * (docs/top-bar-harmonization.md §3.1). */
456
+ topBarParts: TopBarPartsLabels;
445
457
  }
446
458
  /**
447
459
  * A label override, as deep as the labels go: an object of labels (a namespace, or a
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/i18n/kit-labels.tsx"],"sourcesContent":["import { createContext, useContext, useEffect, useMemo } from \"react\";\nimport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n formatFileSize,\n} from \"./shared-labels\";\nimport type { AnchorHTMLAttributes, ReactElement, Ref } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type { DataTableLabels } from \"../components/data-table-labels\";\nimport type { MiniCalendarLabels, WeekDay } from \"../components/mini-calendar\";\nimport type { CalendarHeatmapLabels } from \"../components/calendar-heatmap\";\nimport type { PopoverLabels } from \"../components/popover\";\nimport type { ChipInputLabels } from \"../components/chip\";\nimport type { FieldSyncLabels } from \"../components/field-sync\";\nimport type { CharacterCountLabels, PasswordRevealLabels } from \"../components/field-base\";\nimport type { TabsLabels } from \"../components/tabs\";\nimport type { WizardLabels } from \"../wizard/types\";\nimport type { TourLabels } from \"../tour/tour\";\nimport type { CommandPaletteLabels } from \"../search/command-palette\";\nimport type { GlobalSearchLabels } from \"../search/global-search\";\nimport type { MonthPickerLabels } from \"../components/month-picker\";\nimport type { PageContentsLabels } from \"../components/page-contents\";\nimport type { SeriesChartLabels } from \"../components/series-chart-labels\";\nimport type { PieChartLabels } from \"../components/pie-chart-labels\";\nimport type { SparklineLabels } from \"../components/sparkline\";\nimport type { StatTileLabels } from \"../components/stat-tile\";\nimport type { SignaturePadLabels } from \"../components/signature-pad\";\nimport type { PasswordStrengthLabels } from \"../components/password-strength\";\nimport type { DangerConfirmLabels } from \"../components/danger-confirm\";\nimport type { SwatchPickerLabels } from \"../components/swatch-picker\";\nimport type { IconPickerLabels } from \"../components/icon-picker\";\nimport type { DialogFrameLabels } from \"../components/dialog-frame\";\nimport type { FilePickerLabels } from \"../components/file-button\";\nimport type { MeasuredGridLabels } from \"../components/measured-grid\";\nimport type { FeedbackAttachmentFieldLabels } from \"../feedback/feedback-attachment\";\nimport type { FeedbackDialogTextLabels } from \"../feedback/feedback-dialog\";\nimport type { FeedbackComposerLabels, FeedbackThreadLabels } from \"../feedback/feedback-thread\";\nimport type {\n FeedbackCategoryLabels,\n FeedbackStatusLabels,\n FeedbackToastLabels,\n} from \"../feedback/feedback-labels\";\nimport type { FeedbackMenuLabels } from \"../feedback/feedback-menu\";\nimport type { FeedbackPublicLabels } from \"../feedback/feedback-public-labels\";\nimport type { FeedbackNotificationTypesLabels } from \"../notifications/feedback-notification-types-labels\";\nimport type { FeedbackContextLabels } from \"../feedback/feedback-context\";\nimport type { FeedbackPageLabels } from \"../feedback/feedback-table\";\nimport type { FeedbackDetailLabels } from \"../feedback/feedback-row-detail\";\nimport type { FeedbackVoteLabels } from \"../feedback/feedback-vote-button\";\nimport type { FeedbackCommentsLabels } from \"../feedback/feedback-comment-thread\";\nimport type { FeedbackRepliesLabels } from \"../feedback/feedback-replies\";\nimport type { AccountSettingsLabels } from \"../account/account-settings-labels\";\nimport type { ConfirmDialogLabels } from \"../components/confirm-dialog\";\nimport type { FloatingPanelLabels } from \"../components/floating-panel\";\nimport type { CopyButtonLabels } from \"../components/copy-button\";\nimport type { BulkActionBarLabels } from \"../components/bulk-action-bar\";\nimport type { ListLabels } from \"../components/list\";\nimport type { BreadcrumbsLabels } from \"../components/breadcrumbs\";\nimport type { ToastLabels } from \"../components/toast\";\nimport type { FormActionsLabels } from \"../components/form-actions\";\nimport type { DescriptionListLabels } from \"../components/description-list\";\nimport type { LineItemsLabels } from \"../components/line-items\";\nimport type { ProgressBarLabels } from \"../components/progress-bar\";\nimport type { SignedAmountLabels } from \"../components/signed-amount\";\nimport type { ErrorBoundaryLabels } from \"../components/error-boundary\";\nimport type { AuthedImageLabels } from \"../components/authed-image\";\nimport type { ImageGridLabels } from \"../components/image-grid\";\nimport type { LightboxLabels } from \"../components/lightbox\";\nimport type { WriteLockLabels } from \"../components/write-lock\";\nimport type { LegalLabels } from \"../components/legal\";\nimport type { SignInLabels } from \"../auth/sign-in-form\";\nimport type { RegisterLabels } from \"../auth/register-form\";\nimport type { CompleteNameLabels } from \"../auth/complete-name-dialog\";\nimport type { ForgotPasswordLabels } from \"../auth/forgot-password-form\";\nimport type { ResetPasswordLabels } from \"../auth/reset-password-form\";\nimport type { VerifyEmailLabels } from \"../auth/verify-email\";\nimport type { NotFoundLabels } from \"../auth/not-found-page\";\nimport type { AcceptInvitationLabels } from \"../auth/accept-invitation\";\nimport type { CompanySwitcherLabels } from \"../shell/company-switcher\";\nimport type { EmailChangeLabels } from \"../account/email-change-setting\";\nimport type { SessionsLabels } from \"../account/sessions-setting\";\nimport type { DeleteAccountLabels } from \"../account/delete-account-setting\";\nimport type { DataExportLabels } from \"../account/data-export-setting\";\nimport type { UserRosterLabels } from \"../admin/user-roster\";\nimport type { RoleSelectLabels } from \"../admin/role-select\";\nimport type { ReviewerScopeLabels } from \"../admin/reviewer-scope-editor\";\nimport type { AdminActionLabels } from \"../admin/admin-action-confirm\";\nimport type { AdminActionLogLabels } from \"../admin/admin-action-log\";\nimport type { TransferOwnershipLabels } from \"../admin/transfer-ownership-dialog\";\nimport type { InvitationsLabels } from \"../admin/invitations-panel\";\nimport type { SettingsLabels } from \"../settings/settings-labels\";\nimport type { LandingLabels } from \"../landing/landing-labels\";\nimport type { DemoLabels } from \"../demo/demo-labels\";\nimport type { BillingLabels } from \"../billing/billing-labels\";\nimport type { PlanChangeLabels } from \"../admin/plan-change\";\nimport type { AppearanceLabels } from \"../components/appearance-labels\";\nimport type { DeviceResetLabels } from \"../settings/device-reset-setting\";\nimport type { RowActionsLabels } from \"../components/row-actions\";\nimport type { AppShellMoreLabels } from \"../shell/app-shell\";\nimport type { AccountStateLabels } from \"../components/account-chips\";\nimport type { ShareCardLabels } from \"../components/share-card\";\nimport type { ReauthDialogLabels } from \"../components/reauth-dialog\";\nimport type { ServerWakeLabels } from \"../components/server-wake\";\nimport type { TranslationReviewLabels } from \"../components/translation-review-labels\";\nimport type { CountrySelectLabels } from \"../components/country-select\";\nimport type { InlineEditLabels } from \"../components/inline-edit-field\";\nimport type { IbanInputLabels } from \"../components/iban-input\";\nimport type { PhoneInputLabels } from \"../components/phone-input\";\nimport type { SignChipLabels } from \"../components/sign-chip\";\nimport type { ColumnMapperLabels } from \"../components/column-mapper\";\nimport type { NotificationsLabels } from \"../notifications/notifications-labels\";\n\n/**\n * EVERY string the kit renders, as one typed tree — and an optional provider that\n * hands it to every component at once.\n *\n * WHY THIS EXISTS. The kit renders only labels; it ships seven catalogues (since 0.7.0,\n * `@eifi1/ui-kit/i18n/<code>`); the app decides the language and hands the words in.\n * What was wrong was HOW it had to hand them in —\n * one `labels` prop per component instance, under a different prop name per\n * component (`labels`, `calendarLabels`, `passwordLabels`, `clearLabel`,\n * `searchPlaceholder`, `ariaLabel` …). A translated app therefore rendered English\n * wherever one call site forgot one prop, and nothing told it so: a German showcase\n * still said \"Rows per page\", \"Collapse sidebar\" and \"Popover\" in seven languages.\n *\n * Now there is one key per string, addressed by a dot path (`dataTable.pageSize`,\n * `datePicker.today`), and three sources in a fixed order of precedence:\n *\n * the component's own prop > <UiKitProvider labels> > English default\n *\n * A consumer loads a shipped catalogue (`loadUiKitLabels(code)`) or writes its own\n * `UiKitLabels` (or a partial of one), mounts `<UiKitProvider labels={…} locale={…}>`\n * at the root, and every kit component\n * below speaks that language — including the ones nested inside other kit components\n * (the calendar inside the data table's date filter, the popover inside the date\n * picker), which no prop at the outer call site could reach before.\n *\n * Messages that carry a value are FUNCTIONS of that value, never a template to fill:\n * a number glued into an English sentence is untranslatable, because the grammar\n * around it moves with it in most languages.\n */\n\n/* ── Namespaces that had no labels type of their own ─────────────────────── */\n\n/** The words several components share. A component's own namespace wins over these\n * where both exist; these are what a new component reaches for first. */\nexport interface CommonLabels {\n close: string;\n clear: string;\n search: string;\n done: string;\n cancel: string;\n save: string;\n back: string;\n next: string;\n remove: string;\n loading: string;\n noResults: string;\n /** \"Name: value\" — how a field's accessible name is composed with its value.\n * A colon-and-space is not universal punctuation (French puts a space before\n * the colon, Chinese uses a full-width one). */\n fieldValue: (field: string, value: string) => string;\n /** The × that puts away a banner or a notice (`AlertBanner onDismiss`). Not `close`:\n * nothing opened, and \"Close\" on a banner reads as closing the page it sits on. */\n dismiss: string;\n /** Read after a link that opens a new tab (`<Button href external>`, TextLink):\n * nothing else tells a screen reader the page is about to change tabs. */\n opensInNewTab: string;\n /** The name of a field's `help` \"?\" and its panel (round 0.36): \"About “<field>”\", the\n * field's label as the argument, quoted so a capitalised label reads as a name — \"About\n * “Jerk shape”\" (round 0.37; the other locales quoted it already). A `HelpPopover`\n * passed as `help` keeps its own name. */\n aboutField: (field: string) => string;\n /** …and of a `help` \"?\" on a field with no label and no `aria-label` to name it by. */\n help: string;\n}\n\n/** `DatePicker` / `DateRangePicker` chrome. The calendar inside has its own\n * namespace, `miniCalendar`. */\nexport interface DatePickerLabels {\n /** Accessible name of the popover panel the calendar opens in. */\n panel: string;\n /** The same, for `DateRangePicker`'s panel. */\n rangePanel: string;\n clear: string;\n previousDay: string;\n nextDay: string;\n today: string;\n /** `DateRangePicker commit=\"apply\"`: the button that commits the drafted range. */\n apply: string;\n /** …and the one that discards it. */\n cancel: string;\n /** Accessible name of `DateRangePicker`'s preset column. */\n presets: string;\n}\n\n/** The whole combobox family: `Combobox`, `EntityCombobox`,\n * `MultiEntityCombobox`, `InlineEntityCombobox`, `Autocomplete`. */\nexport interface ComboboxLabels {\n search: string;\n noResults: string;\n clear: string;\n loading: string;\n /** The \"add this\" row when free entry is allowed. */\n create: (query: string) => string;\n /** Trigger summary once more than one value is picked. */\n selectedCount: (count: number) => string;\n /** An async lookup (`loadOptions`) failed. */\n loadError: string;\n /** Announced (live region) when the list settles on `count` > 0 rows. */\n resultCount: (count: number) => string;\n /** The query is shorter than the `minChars` a lookup needs. */\n minChars: (count: number) => string;\n}\n\nexport interface MultiSelectLabels {\n search: string;\n selectAll: string;\n clear: string;\n /** Trigger text when nothing is picked, which a multi-select reads as \"all\". */\n all: string;\n /** Trigger summary once some (but not all) values are picked. The English\n * default is the bare count, which is what the trigger has always shown. */\n selectedCount: (count: number) => string;\n}\n\n/** `CalculatorButton` (desktop popover keypad) and `NumberPadSheet` (phone sheet). */\nexport interface CalculatorLabels {\n /** The button that opens the calculator. */\n open: string;\n /** The popover / sheet itself. */\n panel: string;\n calculation: string;\n backspace: string;\n clear: string;\n equals: string;\n /** The primary key of the phone pad — visible text, not an aria-label. */\n done: string;\n /** Names of the operator keys and the decimal key. Their glyphs are not names a\n * screen reader agrees on — \"÷\" is read as \"division sign\", \"divided by\" or\n * nothing at all depending on the reader — so each says what it does. */\n plus: string;\n minus: string;\n times: string;\n divide: string;\n decimal: string;\n}\n\n/** `CurrencySelect` and the currency half of `AmountInput`. */\nexport interface CurrencyLabels {\n currency: string;\n search: string;\n}\n\nexport interface AppShellLabels {\n collapse: string;\n expand: string;\n /** Accessible name of an inline group's disclosure button (`subNav=\"inline\"`). */\n toggleGroup: (groupLabel: string) => string;\n}\n\nexport interface TopBarLabels {\n theme: string;\n palette: string;\n language: string;\n switchRole: string;\n /** The role switcher's tooltip, given the active role's name. */\n role: (value: string) => string;\n}\n\nexport interface PickerSheetLabels {\n close: string;\n /** The sticky footer button that closes a multi-select sheet once the rows are ticked\n * (0.40) — the ticks are already applied, so it confirms rather than saves. */\n done: string;\n}\n\nexport interface SwipeableRowLabels {\n actions: string;\n}\n\nexport interface FileLabels {\n /** A file size for display, given its size in BYTES. The default uses\n * `Intl.NumberFormat`'s unit formatting in the provider's locale. */\n size: (bytes: number) => string;\n}\n\n/** The complete tree. `UiKitProvider` takes any partial of it. */\nexport interface UiKitLabels {\n common: CommonLabels;\n dataTable: DataTableLabels;\n miniCalendar: MiniCalendarLabels;\n calendarHeatmap: CalendarHeatmapLabels;\n datePicker: DatePickerLabels;\n monthPicker: MonthPickerLabels;\n popover: PopoverLabels;\n combobox: ComboboxLabels;\n multiSelect: MultiSelectLabels;\n calculator: CalculatorLabels;\n currency: CurrencyLabels;\n chipInput: ChipInputLabels;\n fieldSync: FieldSyncLabels;\n passwordReveal: PasswordRevealLabels;\n tabs: TabsLabels;\n appShell: AppShellLabels;\n pageContents: PageContentsLabels;\n topBar: TopBarLabels;\n pickerSheet: PickerSheetLabels;\n swipeableRow: SwipeableRowLabels;\n file: FileLabels;\n wizard: WizardLabels;\n tour: TourLabels;\n commandPalette: CommandPaletteLabels;\n globalSearch: GlobalSearchLabels;\n seriesChart: SeriesChartLabels;\n pieChart: PieChartLabels;\n sparkline: SparklineLabels;\n statTile: StatTileLabels;\n signaturePad: SignaturePadLabels;\n passwordStrength: PasswordStrengthLabels;\n dangerConfirm: DangerConfirmLabels;\n swatchPicker: SwatchPickerLabels;\n iconPicker: IconPickerLabels;\n dialogFrame: DialogFrameLabels;\n filePicker: FilePickerLabels;\n measuredGrid: MeasuredGridLabels;\n feedbackAttachment: FeedbackAttachmentFieldLabels;\n /** 0.12.0: `FeedbackDialog`'s own strings; `FeedbackThread` / `FeedbackComposer`. */\n feedbackDialog: FeedbackDialogTextLabels;\n feedbackThread: FeedbackThreadLabels;\n feedbackComposer: FeedbackComposerLabels;\n /** 0.27.0: the feedback harmonisation (docs/feedback-harmonization.md §4) — a report's\n * status and category words, keyed by the enum value; the toasts a feedback page\n * shows; `FeedbackMenu`; `FeedbackContextBox`; the two pages' table; the row detail.\n * keksdose's wording is the canon, in every language. */\n feedbackStatus: FeedbackStatusLabels;\n feedbackCategory: FeedbackCategoryLabels;\n feedbackToast: FeedbackToastLabels;\n feedbackMenu: FeedbackMenuLabels;\n /** 0.38.0: the public feedback pages — `FeedbackPublicList`, `FeedbackPublicDetail`,\n * `FeedbackPublicSwitch` (docs/feedback-harmonization.md §9.15). */\n feedbackPublic: FeedbackPublicLabels;\n /** 0.38.0: `useFeedbackNotificationTypes` — the two feedback types' setting words\n * (§9.11). */\n feedbackNotificationTypes: FeedbackNotificationTypesLabels;\n feedbackContext: FeedbackContextLabels;\n feedbackPage: FeedbackPageLabels;\n feedbackDetail: FeedbackDetailLabels;\n /** 0.38.0: public feedback (docs/feedback-harmonization.md §9.15) — the vote button,\n * the comment thread, the replies' timeline and composer. */\n feedbackVote: FeedbackVoteLabels;\n feedbackComments: FeedbackCommentsLabels;\n feedbackReplies: FeedbackRepliesLabels;\n /** 0.12.0: `ProfileSetting`, `PasswordSetting`, `TwoFactorSetting`, `PasskeysSetting`\n * — one record per section. The provider takes a whole section record; the\n * components merge it key by key, as a prop. */\n accountSettings: AccountSettingsLabels;\n confirmDialog: ConfirmDialogLabels;\n floatingPanel: FloatingPanelLabels;\n copyButton: CopyButtonLabels;\n bulkActionBar: BulkActionBarLabels;\n list: ListLabels;\n breadcrumbs: BreadcrumbsLabels;\n toast: ToastLabels;\n form: FormActionsLabels;\n descriptionList: DescriptionListLabels;\n lineItems: LineItemsLabels;\n progressBar: ProgressBarLabels;\n signedAmount: SignedAmountLabels;\n errorBoundary: ErrorBoundaryLabels;\n authedImage: AuthedImageLabels;\n imageGrid: ImageGridLabels;\n lightbox: LightboxLabels;\n /** 0.18.0: `WriteLockProvider`'s fallback reason, `AccountStateChip`, `SharePanel` /\n * `ShareCard` / `ShareDialog`, `ReauthDialog`. */\n writeLock: WriteLockLabels;\n accountState: AccountStateLabels;\n shareCard: ShareCardLabels;\n reauthDialog: ReauthDialogLabels;\n /** 0.18.0: `ServerWakeNotice` — keksdose's cold-start notice, for every app. */\n serverWake: ServerWakeLabels;\n /** 0.19.0: the translation-review parts (`TranslationReviewPanel`, its editor, chip,\n * progress, locale tabs and export) — keksdose's /translations, for every app. */\n translationReview: TranslationReviewLabels;\n /** 0.19.0: `LegalLinks`' navigation name. 0.28.0: every kit-owned word of the legal\n * pages — the link labels, titles, back link, terms checkbox and notices, and the\n * sections that are the same in every app, filled in with the app's operator\n * (docs/legal-harmonization.md §4.3/§4.4). */\n legal: LegalLabels;\n /** 0.29.0: sign-in form: credentials, passkey, 2FA, forced new password (docs/auth-harmonization.md §5). */\n signIn: SignInLabels;\n /** 0.29.0: the sign-up form, with the +app address tag (§4.1, §4.5). */\n register: RegisterLabels;\n /** 0.29.0: asking a migrated account for first and last name once (§3.3). */\n completeName: CompleteNameLabels;\n /** 0.29.0: requesting a reset link (always the same answer). */\n forgotPassword: ForgotPasswordLabels;\n /** 0.29.0: choosing a new password from a reset link; not a sign-in (§6.3). */\n resetPassword: ResetPasswordLabels;\n /** 0.29.0: the verify-email page and the unverified banner. */\n verifyEmail: VerifyEmailLabels;\n /** 0.29.0: the 404 page. */\n notFound: NotFoundLabels;\n /** 0.29.0: accepting an invitation with an account (§4.4). */\n acceptInvitation: AcceptInvitationLabels;\n /** 0.29.0: kastlan's switcher between a user's companies (§5.3). */\n companySwitcher: CompanySwitcherLabels;\n /** 0.30.0: changing the account's address with re-verification (docs/user-admin-harmonization.md §6.2). */\n emailChange: EmailChangeLabels;\n /** 0.30.0: sign out everywhere, and kastlan's device list (§6.3). */\n sessions: SessionsLabels;\n /** 0.30.0: deletion in two stages (§6.4). */\n deleteAccount: DeleteAccountLabels;\n /** 0.30.0: the self-service JSON export (§6.5). */\n dataExport: DataExportLabels;\n /** 0.30.0: the admin user list's columns (§3). */\n userRoster: UserRosterLabels;\n /** 0.30.0: picking one or several roles, with the reasons a choice is locked (§4.1). */\n roleSelect: RoleSelectLabels;\n /** 0.30.0: a translation reviewer's languages and areas. */\n reviewerScope: ReviewerScopeLabels;\n /** 0.30.0: an admin action's confirmation and refusals (§4.2). */\n adminAction: AdminActionLabels;\n /** 0.30.0: the admin_actions list (§4.3). */\n adminActionLog: AdminActionLogLabels;\n /** 0.30.0: handing an account's work to another (Kurvenschmiede). */\n transferOwnership: TransferOwnershipLabels;\n /** 0.30.0: the invitations panel (§5). */\n invitations: InvitationsLabels;\n /** 0.31.0: the settings and admin pages' shell (docs/settings-harmonization.md §4.3). */\n settings: SettingsLabels;\n /** 0.31.0: the public landing page's kit words (docs/landing-demo-harmonization.md §4). */\n landing: LandingLabels;\n /** 0.31.0: the demo's start, banner and end (§5). */\n demo: DemoLabels;\n /** 0.32.0: plans, standing, banners and the limit notice (docs/billing-harmonization.md §7). */\n billing: BillingLabels;\n /** 0.33.0: the operator's plan parts — `planColumn`, `PlanChangeConfirm` and the\n * lines of `usePlanChangeResult` (docs/billing-harmonization.md §14.12). */\n planChange: PlanChangeLabels;\n /** 0.32.0: the text-size and contrast settings (docs/text-size-harmonization.md §6). */\n appearance: AppearanceLabels;\n /** 0.36.0: resetting this device's settings, the appearance group's last card\n * (docs/settings-harmonization.md §11.3). */\n deviceReset: DeviceResetLabels;\n /** 0.32.0: a row's actions folded into a \"⋯\" menu at Large (text size §10.8). */\n rowActions: RowActionsLabels;\n /** 0.32.0: the phone bar's \"More\" cell and sheet (text size §10.7). */\n appShellMore: AppShellMoreLabels;\n /** 0.22.0: the screen-reader words of `Input` / `Textarea`'s `showCount` counter. */\n characterCount: CharacterCountLabels;\n /** 0.22.0: `CountrySelect`. Its list's \"no results\" and counts are `combobox`'s. */\n countrySelect: CountrySelectLabels;\n /** 0.22.0: `InlineEditField` — keksdose K9. */\n inlineEdit: InlineEditLabels;\n /** 0.22.0: `IbanInput`'s messages, one per problem. */\n ibanInput: IbanInputLabels;\n /** 0.22.0: `PhoneInput`'s country-code select. */\n phoneInput: PhoneInputLabels;\n /** 0.22.0: `SignChip` — the outflow / inflow toggle beside an amount. */\n signChip: SignChipLabels;\n /** 0.23.0: `ColumnMapper` / `ColumnRoleTable` — a pasted or dropped table, a role per\n * column. */\n columnMapper: ColumnMapperLabels;\n /** 0.36.0: the notification cards — the types, quiet hours and the zone picker, this\n * device's push, the device list, and the unsubscribe page\n * (docs/notifications-harmonization.md §4.2). */\n notifications: NotificationsLabels;\n}\n\n/**\n * A label override, as deep as the labels go: an object of labels (a namespace, or a\n * record inside one such as `accountSettings.passkeys` or `dataTable.presets`) may be\n * partial at every level, because the provider merges it key by key at every level.\n * A leaf stays as it is: a string, a function-valued label (`(n) => …`), and anything\n * that is not purely an object (a `ReactNode` union) is given whole.\n */\nexport type LabelOverride<T> = [T] extends [(...args: never[]) => unknown]\n ? T\n : [T] extends [readonly unknown[]]\n ? T\n : [T] extends [object]\n ? { [K in keyof T]?: LabelOverride<T[K]> }\n : T;\n\n/** Any subset of the tree — each namespace may be partial, and so may any record\n * inside one (`accountSettings.passkeys`, `dataTable.presets`): they are merged key\n * by key, at every depth. */\nexport type UiKitLabelOverrides = { [K in keyof UiKitLabels]?: LabelOverride<UiKitLabels[K]> };\n\n/* ── English defaults for the namespaces defined here ────────────────────── */\n\n// They live in ./shared-labels, a module of words, as every component's defaults live in\n// its `*-labels.ts` (round 0.34). Imported and exported as this module's own, as each\n// component does with its defaults: the names, and where the README lists them, stay.\nexport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n formatFileSize,\n};\n\n/* ── The provider ────────────────────────────────────────────────────────── */\n\ninterface KitI18n {\n labels?: UiKitLabelOverrides;\n locale?: string;\n weekStartsOn?: WeekDay;\n linkComponent?: KitLinkComponent;\n chartTooltipPlacement?: ChartTooltipPlacement;\n formatDate?: KitDateFormatter;\n tableStorageKeyPrefix?: string;\n}\n\n/** What a {@link KitDateFormatter} is told about the date it is formatting. */\nexport interface KitDateFormatContext {\n /**\n * How much of a date the string is: `\"day\"` — the `iso` is `\"YYYY-MM-DD\"`; `\"month\"` —\n * `\"YYYY-MM\"` (a `MonthPicker`); `\"year\"` — `\"YYYY\"` (`MonthPicker mode=\"year\"`).\n */\n unit: \"day\" | \"month\" | \"year\";\n /** Which kit surface asks: the trigger of a `DatePicker`, of a `DateRangePicker`\n * (called once per end), of a `MonthPicker`, or a `DateMark`. */\n source: \"datePicker\" | \"dateRangePicker\" | \"monthPicker\" | \"dateMark\";\n /** The locale the kit would have formatted in — the component's `locale` prop, else\n * the provider's — or `undefined` for the runtime's. */\n locale: string | undefined;\n /**\n * The kit's suggestion: whether this date stands alone where the day of the week\n * helps — `true` for a `DatePicker`'s trigger and a `DateMark`, `false` for the two\n * ends of a range (twice the width, in a sentence-like \"from – to\") and for a month\n * or a year. keksdose's rule, which this follows: *\"A date in a COLUMN carries the\n * weekday. A date in a SENTENCE does not.\"* (date-cell.tsx, dev#546). A formatter\n * is free to ignore it.\n */\n weekday: boolean;\n}\n\n/**\n * The app's ONE answer to \"what does a date look like here\" — keksdose K12. Returns the\n * text for an ISO date (see {@link KitDateFormatContext.unit} for the three shapes).\n * Return `\"\"` to fall back to the kit's own formatting for that date.\n */\nexport type KitDateFormatter = (iso: string, context: KitDateFormatContext) => string;\n\n/** Where a chart shows the values under the pointer — see `SeriesChartTooltip.placement`. */\nexport type ChartTooltipPlacement = \"cursor\" | \"above\" | \"below\" | \"auto\";\n\n/**\n * What every kit link receives: the anchor attributes the kit decided (href, class,\n * aria-current, handlers, children, ref). An app's router link maps them —\n * `({ href, ...p }) => <Link to={href} {...p} />` — ONCE, on the provider.\n *\n * `replace` is the one prop that is not an anchor attribute: see there. Map it\n * explicitly if your router link is not react-router's —\n * `({ href, replace, ...p }) => <Link to={href} replace={replace} {...p} />` — and never\n * spread it onto a DOM `<a>`, where React warns about an unknown attribute.\n */\nexport type KitLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n ref?: Ref<HTMLAnchorElement>;\n /**\n * Navigate by REPLACING the current history entry, so Back skips it — keksdose F1:\n * a one-shot URL (a magic-link landing, `?checkout=done`, a wizard's \"finish\" hop)\n * that must not come back when the user presses Back. Present ONLY when the kit link\n * was given `replace` (`true`), so a provider link that spreads its props onto a\n * plain `<a>` keeps working for every link that never asks for it. react-router's\n * `<Link>` takes the same prop, so `({ href, ...p }) => <Link to={href} {...p} />`\n * honours it with no change; any other router maps it to its own replace option.\n * The kit never puts it on a DOM element itself.\n */\n replace?: boolean;\n};\nexport type KitLinkComponent = (props: KitLinkProps) => ReactElement;\n\nconst KitI18nContext = createContext<KitI18n>({});\n\nexport interface UiKitProviderProps {\n /** Any part of {@link UiKitLabels}. Missing keys fall back to English. */\n labels?: UiKitLabelOverrides;\n /**\n * BCP 47 tag used by every kit component that formats something — dates, numbers,\n * month and weekday names, file sizes — when it is not handed a `locale` prop of\n * its own. Without a provider, and without a prop, those use the runtime default.\n */\n locale?: string;\n /**\n * The first day of the week (0 = Sunday, 1 = Monday …) for every calendar below —\n * `MiniCalendar` and the pickers built on it — that is not handed a `weekStartsOn`\n * of its own. Without it the week start follows `locale`'s week info.\n *\n * Separate from `locale` because the two are separate decisions: a German-built\n * app running in English (`locale=\"en\"`) would otherwise start its weeks on Sunday,\n * and switching it to `en-GB` to get Monday changes every date and number format.\n */\n weekStartsOn?: WeekDay;\n /**\n * The app's router link, used by every kit component that renders an in-app link\n * and was not handed its own `renderLink` — so `renderLink` stops being repeated on\n * each ListItem, Breadcrumbs, StatTile, Chip… (kastlan). A component's own\n * `renderLink` wins; external links and in-page `#anchor`s stay plain `<a>`, and a\n * hash-router `#/path` is handed to it like `/path` (see `pickLinkRenderer`).\n */\n linkComponent?: KitLinkComponent;\n /**\n * Where every `SeriesChart` below shows its tooltip when it does not say so itself\n * (`tooltip.placement`) — set once so an app's phone charts stop putting the box under\n * the reader's finger (keksdose #359). Default: `\"cursor\"`, the box that follows the\n * pointer, as before.\n */\n chartTooltipPlacement?: ChartTooltipPlacement;\n /**\n * How every kit date below is written, when the component is not told otherwise —\n * keksdose K12. keksdose has a date-format preference (Settings ▸ date format, feedback\n * #180) that is not the UI language, and a weekday in the UI language beside digits\n * in the preference's order (live #246, dev#546): two locales in one string, which\n * no `locale` + `Intl` options can say. Its `DateField` wraps every `DatePicker` to\n * pass `formatValue`, and its report range field formats both ends by hand; with this\n * set once on the provider, those wrappers thin to nothing.\n *\n * Used for the trigger text of `DatePicker`, `DateRangePicker` and `MonthPicker`\n * (month and year mode), and for `DateMark display=\"date\"`. A component's own\n * `formatValue` or `formatOptions` (`dateStyle` on a DateMark) wins: prop >\n * provider > the kit's `Intl` default, the order every kit setting resolves in. Left\n * out (or returning `\"\"`), everything formats exactly as before.\n *\n * Keep it stable (`useCallback`, or a module function): it is in the provider's\n * context value, so a new function every render re-renders every consumer.\n */\n formatDate?: KitDateFormatter;\n /**\n * The `localStorage` prefix every kit table below keeps its view under (sort, filters,\n * page size, widths, hidden columns), when the table is not handed a\n * `storageKeyPrefix` of its own — round 0.34 C5, KS U4. Left out, it is the kit's\n * `\"hbui-table:\"`, as before.\n *\n * Set once here rather than per table because not every table is the app's to pass a\n * prop to: `TranslationReviewPanel` wraps a `DataTable`, and until this the panel's\n * view landed under the kit's prefix whatever the app's was — so an app that lists\n * what it stores (a privacy page) had to list the kit's prefix as a key of its own.\n * Resolves like every kit setting: the table's own prop > this > the default. The\n * key is the prefix plus the table's `storageKey`, verbatim, so an app that wrapped\n * `DataTable` to pass its prefix (Keksdose's `keksdose-table:`) keeps every stored\n * view when it moves the prefix here.\n */\n tableStorageKeyPrefix?: string;\n children: ReactNode;\n}\n\n/**\n * Hand every kit component below this point its strings and its locale.\n *\n * Optional: a component outside any provider behaves exactly as it did before the\n * provider existed. Nesting works as a merge — an inner provider overrides only what\n * it names, so a page can re-label one table's `dataTable.table` without restating\n * the language.\n */\nexport function UiKitProvider({\n labels,\n locale,\n weekStartsOn,\n linkComponent,\n chartTooltipPlacement,\n formatDate,\n tableStorageKeyPrefix,\n children,\n}: UiKitProviderProps) {\n const outer = useContext(KitI18nContext);\n const value = useMemo<KitI18n>(\n () => ({\n locale: locale ?? outer.locale,\n weekStartsOn: weekStartsOn ?? outer.weekStartsOn,\n labels: mergeOverrides(outer.labels, labels),\n linkComponent: linkComponent ?? outer.linkComponent,\n chartTooltipPlacement: chartTooltipPlacement ?? outer.chartTooltipPlacement,\n formatDate: formatDate ?? outer.formatDate,\n tableStorageKeyPrefix: tableStorageKeyPrefix ?? outer.tableStorageKeyPrefix,\n }),\n [outer, labels, locale, weekStartsOn, linkComponent, chartTooltipPlacement, formatDate, tableStorageKeyPrefix],\n );\n useTableViewsJoin(value.tableStorageKeyPrefix ?? DEFAULT_TABLE_STORAGE_KEY_PREFIX);\n return <KitI18nContext.Provider value={value}>{children}</KitI18nContext.Provider>;\n}\n\n/** The kit's own table prefix: `DEFAULT_PERSIST_PREFIX` of components/use-table-state,\n * restated because that module imports the router (a test pins the two equal). */\nconst DEFAULT_TABLE_STORAGE_KEY_PREFIX = \"hbui-table:\";\n\n/**\n * Reset this device's settings (docs/settings-harmonization.md §11.4): the tables below a\n * provider keep their views under its prefix, so the provider joins the registry with\n * that prefix — a view, no `reset`, since a table reads its view when it next mounts —\n * while it is mounted. Nested providers with one prefix hold one entry.\n *\n * Through a literal `import()`, not a static import: every catalogue reaches this module,\n * and a catalogue may reach nothing outside i18n/ (scripts/check-module-graph.mjs,\n * english-catalogue-graph.test.ts). The theme stores and the shell import the registry\n * statically, so it is loaded already and the join lands a microtask after the mount.\n */\nfunction useTableViewsJoin(prefix: string): void {\n useEffect(() => {\n let leave: (() => void) | undefined;\n let gone = false;\n import(\"../lib/device-settings\").then(\n ({ registerDeviceSetting }) => {\n if (!gone) leave = registerDeviceSetting({ key: prefix, prefix: true, kind: \"view\" });\n },\n // A module of the kit's own that fails to load has nothing to join; the provider\n // and its tables work as before.\n () => undefined,\n );\n return () => {\n gone = true;\n leave?.();\n };\n }, [prefix]);\n}\n\nfunction isRecord(v: unknown): v is Record<string, unknown> {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n\n/** A record of labels to merge into — not a React element, which is an object too but\n * is a label given whole. */\nfunction isLabelRecord(v: unknown): v is Record<string, unknown> {\n return isRecord(v) && !(\"$$typeof\" in v);\n}\n\n/** Merged key by key at EVERY depth — a namespace, a record inside it\n * (`accountSettings.passkeys`, `dataTable.presets`), and so on down — to match\n * {@link LabelOverride}. An `undefined` is skipped at every depth, so it never blanks\n * out what is under it. */\nfunction mergeNamespace<T extends object>(base: T, over: LabelOverride<T> | Partial<T> | undefined): T {\n if (!over) return base;\n const out = { ...base } as Record<string, unknown>;\n for (const [k, v] of Object.entries(over)) {\n if (v === undefined) continue;\n const prev = out[k];\n out[k] = isLabelRecord(prev) && isLabelRecord(v) ? mergeNamespace(prev, v) : v;\n }\n return out as T;\n}\n\nfunction mergeOverrides(\n a: UiKitLabelOverrides | undefined,\n b: UiKitLabelOverrides | undefined,\n): UiKitLabelOverrides | undefined {\n if (!a) return b;\n if (!b) return a;\n const out: Record<string, unknown> = { ...a };\n for (const [ns, v] of Object.entries(b)) {\n out[ns] = mergeNamespace((out[ns] as object | undefined) ?? {}, v as object);\n }\n return out as UiKitLabelOverrides;\n}\n\n/**\n * What the nearest provider says about one namespace — `undefined` outside one. Nested\n * providers' words come merged, at every depth; no English default is filled in.\n *\n * A {@link LabelOverride}, partial at every depth, like the components' `labels` props\n * that take it: a provider that names one key of a section (`accountSettings.passkeys`)\n * or one preset (`dataTable.presets`) hands over just that (round 0.35 R3 — until then\n * it was typed partial at the top only, so a nested section read as complete).\n *\n * For a component whose own resolver does more than a merge (the data table derives\n * `columnsCount` from `columns`): merge the component's prop over it — a record key by\n * key — and feed the result to that resolver.\n */\nexport function useKitLabelOverrides<K extends keyof UiKitLabels>(\n ns: K,\n): LabelOverride<UiKitLabels[K]> | undefined {\n return useContext(KitI18nContext).labels?.[ns];\n}\n\n/**\n * One namespace, resolved: `defaults`, then the provider, then the component's own\n * `prop`. Record-valued keys are merged key by key at each step — so `prop` is a\n * {@link LabelOverride}, partial at every depth as the provider's labels are, and a\n * component's `labels` prop, typed the same, is handed over without a cast (refactor\n * audit 2026-10, API-9).\n */\nexport function useKitLabels<K extends keyof UiKitLabels>(\n ns: K,\n defaults: UiKitLabels[K],\n prop?: LabelOverride<UiKitLabels[K]>,\n): UiKitLabels[K] {\n const fromProvider = useKitLabelOverrides(ns);\n return useMemo(\n () => mergeNamespace(mergeNamespace(defaults, fromProvider), prop),\n [defaults, fromProvider, prop],\n );\n}\n\n/** The component's own `locale` prop, else the provider's, else `undefined` (which\n * every `Intl` API reads as \"the runtime's default\"). */\nexport function useKitLocale(prop?: string): string | undefined {\n const fromProvider = useContext(KitI18nContext).locale;\n return prop ?? fromProvider;\n}\n\n/** The week start the nearest `<UiKitProvider weekStartsOn>` pins, else `undefined`\n * (the caller then asks the locale). A component's own prop goes first:\n * `prop ?? useKitWeekStart()`. */\n/** The provider's router link, or `undefined` — a component's own `renderLink` should\n * win over it: `const Link = renderLink ?? useKitLink()`. */\nexport function useKitLink(): KitLinkComponent | undefined {\n return useContext(KitI18nContext).linkComponent;\n}\n\nexport function useKitWeekStart(): WeekDay | undefined {\n return useContext(KitI18nContext).weekStartsOn;\n}\n\n/** The provider's `chartTooltipPlacement`, or `undefined` — a chart's own prop wins. */\nexport function useKitChartTooltipPlacement(): ChartTooltipPlacement | undefined {\n return useContext(KitI18nContext).chartTooltipPlacement;\n}\n\n/** The nearest provider's `formatDate`, or `undefined` — a component's own\n * `formatValue` / `formatOptions` wins over it. See {@link KitDateFormatter}. */\nexport function useKitDateFormatter(): KitDateFormatter | undefined {\n return useContext(KitI18nContext).formatDate;\n}\n\n/** The nearest provider's `tableStorageKeyPrefix`, or `undefined` — a table's own\n * `storageKeyPrefix` wins over it, and the kit's `\"hbui-table:\"` comes after both. */\nexport function useKitTableStorageKeyPrefix(): string | undefined {\n return useContext(KitI18nContext).tableStorageKeyPrefix;\n}\n\n/** {@link DEFAULT_FILE_LABELS}, but formatting in the provider's locale. */\nexport function useKitFileLabels(prop?: Partial<FileLabels>): FileLabels {\n const locale = useKitLocale();\n const defaults = useMemo<FileLabels>(\n () => ({ size: (bytes) => formatFileSize(bytes, locale) }),\n [locale],\n );\n return useKitLabels(\"file\", defaults, prop);\n}\n\n/**\n * The dot paths of every key `labels` does NOT supply — the ones a translated app is\n * still showing in English. Assert on it in the app's own test:\n *\n * expect(missingKitLabels(labels, DEFAULT_UI_KIT_LABELS)).toEqual([]);\n *\n * `reference` is the complete tree to check against — pass\n * {@link DEFAULT_UI_KIT_LABELS} (src/i18n/defaults.ts). It is a parameter rather than an import\n * because the defaults live beside their components, and this module is imported BY\n * those components. Left out (a test file is not type-checked), it throws saying so\n * rather than \"Cannot convert undefined or null to object\" (keksdose, 0.18).\n */\nexport function missingKitLabels(\n labels: UiKitLabelOverrides | undefined,\n reference: UiKitLabels,\n): string[] {\n if (!isRecord(reference)) {\n throw new TypeError(\n \"missingKitLabels(labels, reference): pass DEFAULT_UI_KIT_LABELS as the reference — \" +\n \"it is the tree the labels are checked against.\",\n );\n }\n const missing: string[] = [];\n for (const [ns, keys] of Object.entries(reference)) {\n const given = (labels as Record<string, Record<string, unknown> | undefined> | undefined)?.[ns];\n for (const [key, value] of Object.entries(keys as Record<string, unknown>)) {\n const got = given?.[key];\n if (got === undefined) {\n missing.push(`${ns}.${key}`);\n } else if (isRecord(value) && isRecord(got)) {\n for (const sub of Object.keys(value)) {\n if (got[sub] === undefined) missing.push(`${ns}.${key}.${sub}`);\n }\n }\n }\n }\n return missing;\n}\n"],"mappings":"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","names":[]}
1
+ {"version":3,"sources":["../../src/i18n/kit-labels.tsx"],"sourcesContent":["import { createContext, useContext, useEffect, useMemo } from \"react\";\nimport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n formatFileSize,\n} from \"./shared-labels\";\nimport type { AnchorHTMLAttributes, ReactElement, Ref } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type { DataTableLabels } from \"../components/data-table-labels\";\nimport type { MiniCalendarLabels, WeekDay } from \"../components/mini-calendar\";\nimport type { CalendarHeatmapLabels } from \"../components/calendar-heatmap\";\nimport type { PopoverLabels } from \"../components/popover\";\nimport type { ChipInputLabels } from \"../components/chip\";\nimport type { FieldSyncLabels } from \"../components/field-sync\";\nimport type { CharacterCountLabels, PasswordRevealLabels } from \"../components/field-base\";\nimport type { TabsLabels } from \"../components/tabs\";\nimport type { WizardLabels } from \"../wizard/types\";\nimport type { TourLabels } from \"../tour/tour\";\nimport type { TourCatalogueLabels } from \"../tour/tour-catalogue-labels\";\nimport type { CommandPaletteLabels } from \"../search/command-palette\";\nimport type { GlobalSearchLabels } from \"../search/global-search\";\nimport type { MonthPickerLabels } from \"../components/month-picker\";\nimport type { PageContentsLabels } from \"../components/page-contents\";\nimport type { SeriesChartLabels } from \"../components/series-chart-labels\";\nimport type { PieChartLabels } from \"../components/pie-chart-labels\";\nimport type { SparklineLabels } from \"../components/sparkline\";\nimport type { StatTileLabels } from \"../components/stat-tile\";\nimport type { SignaturePadLabels } from \"../components/signature-pad\";\nimport type { PasswordStrengthLabels } from \"../components/password-strength\";\nimport type { DangerConfirmLabels } from \"../components/danger-confirm\";\nimport type { SwatchPickerLabels } from \"../components/swatch-picker\";\nimport type { IconPickerLabels } from \"../components/icon-picker\";\nimport type { DialogFrameLabels } from \"../components/dialog-frame\";\nimport type { FilePickerLabels } from \"../components/file-button\";\nimport type { MeasuredGridLabels } from \"../components/measured-grid\";\nimport type { FeedbackAttachmentFieldLabels } from \"../feedback/feedback-attachment\";\nimport type { FeedbackDialogTextLabels } from \"../feedback/feedback-dialog\";\nimport type { FeedbackComposerLabels, FeedbackThreadLabels } from \"../feedback/feedback-thread\";\nimport type {\n FeedbackCategoryLabels,\n FeedbackStatusLabels,\n FeedbackToastLabels,\n} from \"../feedback/feedback-labels\";\nimport type { FeedbackMenuLabels } from \"../feedback/feedback-menu\";\nimport type { FeedbackPublicLabels } from \"../feedback/feedback-public-labels\";\nimport type { FeedbackNotificationTypesLabels } from \"../notifications/feedback-notification-types-labels\";\nimport type { FeedbackContextLabels } from \"../feedback/feedback-context\";\nimport type { FeedbackPageLabels } from \"../feedback/feedback-table\";\nimport type { FeedbackDetailLabels } from \"../feedback/feedback-row-detail\";\nimport type { FeedbackVoteLabels } from \"../feedback/feedback-vote-button\";\nimport type { FeedbackCommentsLabels } from \"../feedback/feedback-comment-thread\";\nimport type { FeedbackRepliesLabels } from \"../feedback/feedback-replies\";\nimport type { AccountSettingsLabels } from \"../account/account-settings-labels\";\nimport type { ConfirmDialogLabels } from \"../components/confirm-dialog\";\nimport type { FloatingPanelLabels } from \"../components/floating-panel\";\nimport type { CopyButtonLabels } from \"../components/copy-button\";\nimport type { BulkActionBarLabels } from \"../components/bulk-action-bar\";\nimport type { ListLabels } from \"../components/list\";\nimport type { BreadcrumbsLabels } from \"../components/breadcrumbs\";\nimport type { ToastLabels } from \"../components/toast\";\nimport type { FormActionsLabels } from \"../components/form-actions\";\nimport type { DescriptionListLabels } from \"../components/description-list\";\nimport type { LineItemsLabels } from \"../components/line-items\";\nimport type { ProgressBarLabels } from \"../components/progress-bar\";\nimport type { SignedAmountLabels } from \"../components/signed-amount\";\nimport type { ErrorBoundaryLabels } from \"../components/error-boundary\";\nimport type { AuthedImageLabels } from \"../components/authed-image\";\nimport type { ImageGridLabels } from \"../components/image-grid\";\nimport type { LightboxLabels } from \"../components/lightbox\";\nimport type { WriteLockLabels } from \"../components/write-lock\";\nimport type { LegalLabels } from \"../components/legal\";\nimport type { SignInLabels } from \"../auth/sign-in-form\";\nimport type { RegisterLabels } from \"../auth/register-form\";\nimport type { CompleteNameLabels } from \"../auth/complete-name-dialog\";\nimport type { ForgotPasswordLabels } from \"../auth/forgot-password-form\";\nimport type { ResetPasswordLabels } from \"../auth/reset-password-form\";\nimport type { VerifyEmailLabels } from \"../auth/verify-email\";\nimport type { NotFoundLabels } from \"../auth/not-found-page\";\nimport type { AcceptInvitationLabels } from \"../auth/accept-invitation\";\nimport type { CompanySwitcherLabels } from \"../shell/company-switcher\";\nimport type { EmailChangeLabels } from \"../account/email-change-setting\";\nimport type { SessionsLabels } from \"../account/sessions-setting\";\nimport type { DeleteAccountLabels } from \"../account/delete-account-setting\";\nimport type { DataExportLabels } from \"../account/data-export-setting\";\nimport type { UserRosterLabels } from \"../admin/user-roster\";\nimport type { RoleSelectLabels } from \"../admin/role-select\";\nimport type { ReviewerScopeLabels } from \"../admin/reviewer-scope-editor\";\nimport type { AdminActionLabels } from \"../admin/admin-action-confirm\";\nimport type { AdminActionLogLabels } from \"../admin/admin-action-log\";\nimport type { TransferOwnershipLabels } from \"../admin/transfer-ownership-dialog\";\nimport type { InvitationsLabels } from \"../admin/invitations-panel\";\nimport type { SettingsLabels } from \"../settings/settings-labels\";\nimport type { LandingLabels } from \"../landing/landing-labels\";\nimport type { DemoLabels } from \"../demo/demo-labels\";\nimport type { BillingLabels } from \"../billing/billing-labels\";\nimport type { PlanChangeLabels } from \"../admin/plan-change\";\nimport type { AppearanceLabels } from \"../components/appearance-labels\";\nimport type { DeviceResetLabels } from \"../settings/device-reset-setting\";\nimport type { RowActionsLabels } from \"../components/row-actions\";\nimport type { AppShellMoreLabels } from \"../shell/app-shell\";\nimport type { AccountStateLabels } from \"../components/account-chips\";\nimport type { ShareCardLabels } from \"../components/share-card\";\nimport type { ReauthDialogLabels } from \"../components/reauth-dialog\";\nimport type { ServerWakeLabels } from \"../components/server-wake\";\nimport type { TranslationReviewLabels } from \"../components/translation-review-labels\";\nimport type { CountrySelectLabels } from \"../components/country-select\";\nimport type { InlineEditLabels } from \"../components/inline-edit-field\";\nimport type { IbanInputLabels } from \"../components/iban-input\";\nimport type { PhoneInputLabels } from \"../components/phone-input\";\nimport type { SignChipLabels } from \"../components/sign-chip\";\nimport type { ColumnMapperLabels } from \"../components/column-mapper\";\nimport type { NotificationsLabels } from \"../notifications/notifications-labels\";\nimport type { AdminAreaLabels } from \"../admin/admin-area-labels\";\nimport type { TopBarPartsLabels } from \"../shell/top-bar-parts-labels\";\n\n/**\n * EVERY string the kit renders, as one typed tree — and an optional provider that\n * hands it to every component at once.\n *\n * WHY THIS EXISTS. The kit renders only labels; it ships seven catalogues (since 0.7.0,\n * `@eifi1/ui-kit/i18n/<code>`); the app decides the language and hands the words in.\n * What was wrong was HOW it had to hand them in —\n * one `labels` prop per component instance, under a different prop name per\n * component (`labels`, `calendarLabels`, `passwordLabels`, `clearLabel`,\n * `searchPlaceholder`, `ariaLabel` …). A translated app therefore rendered English\n * wherever one call site forgot one prop, and nothing told it so: a German showcase\n * still said \"Rows per page\", \"Collapse sidebar\" and \"Popover\" in seven languages.\n *\n * Now there is one key per string, addressed by a dot path (`dataTable.pageSize`,\n * `datePicker.today`), and three sources in a fixed order of precedence:\n *\n * the component's own prop > <UiKitProvider labels> > English default\n *\n * A consumer loads a shipped catalogue (`loadUiKitLabels(code)`) or writes its own\n * `UiKitLabels` (or a partial of one), mounts `<UiKitProvider labels={…} locale={…}>`\n * at the root, and every kit component\n * below speaks that language — including the ones nested inside other kit components\n * (the calendar inside the data table's date filter, the popover inside the date\n * picker), which no prop at the outer call site could reach before.\n *\n * Messages that carry a value are FUNCTIONS of that value, never a template to fill:\n * a number glued into an English sentence is untranslatable, because the grammar\n * around it moves with it in most languages.\n */\n\n/* ── Namespaces that had no labels type of their own ─────────────────────── */\n\n/** The words several components share. A component's own namespace wins over these\n * where both exist; these are what a new component reaches for first. */\nexport interface CommonLabels {\n close: string;\n clear: string;\n search: string;\n done: string;\n cancel: string;\n save: string;\n back: string;\n next: string;\n remove: string;\n loading: string;\n noResults: string;\n /** \"Name: value\" — how a field's accessible name is composed with its value.\n * A colon-and-space is not universal punctuation (French puts a space before\n * the colon, Chinese uses a full-width one). */\n fieldValue: (field: string, value: string) => string;\n /** The × that puts away a banner or a notice (`AlertBanner onDismiss`). Not `close`:\n * nothing opened, and \"Close\" on a banner reads as closing the page it sits on. */\n dismiss: string;\n /** Read after a link that opens a new tab (`<Button href external>`, TextLink):\n * nothing else tells a screen reader the page is about to change tabs. */\n opensInNewTab: string;\n /** The name of a field's `help` \"?\" and its panel (round 0.36): \"About “<field>”\", the\n * field's label as the argument, quoted so a capitalised label reads as a name — \"About\n * “Jerk shape”\" (round 0.37; the other locales quoted it already). A `HelpPopover`\n * passed as `help` keeps its own name. */\n aboutField: (field: string) => string;\n /** …and of a `help` \"?\" on a field with no label and no `aria-label` to name it by. */\n help: string;\n}\n\n/** `DatePicker` / `DateRangePicker` chrome. The calendar inside has its own\n * namespace, `miniCalendar`. */\nexport interface DatePickerLabels {\n /** Accessible name of the popover panel the calendar opens in. */\n panel: string;\n /** The same, for `DateRangePicker`'s panel. */\n rangePanel: string;\n clear: string;\n previousDay: string;\n nextDay: string;\n today: string;\n /** `DateRangePicker commit=\"apply\"`: the button that commits the drafted range. */\n apply: string;\n /** …and the one that discards it. */\n cancel: string;\n /** Accessible name of `DateRangePicker`'s preset column. */\n presets: string;\n}\n\n/** The whole combobox family: `Combobox`, `EntityCombobox`,\n * `MultiEntityCombobox`, `InlineEntityCombobox`, `Autocomplete`. */\nexport interface ComboboxLabels {\n search: string;\n noResults: string;\n clear: string;\n loading: string;\n /** The \"add this\" row when free entry is allowed. */\n create: (query: string) => string;\n /** Trigger summary once more than one value is picked. */\n selectedCount: (count: number) => string;\n /** An async lookup (`loadOptions`) failed. */\n loadError: string;\n /** Announced (live region) when the list settles on `count` > 0 rows. */\n resultCount: (count: number) => string;\n /** The query is shorter than the `minChars` a lookup needs. */\n minChars: (count: number) => string;\n}\n\nexport interface MultiSelectLabels {\n search: string;\n selectAll: string;\n clear: string;\n /** Trigger text when nothing is picked, which a multi-select reads as \"all\". */\n all: string;\n /** Trigger summary once some (but not all) values are picked. The English\n * default is the bare count, which is what the trigger has always shown. */\n selectedCount: (count: number) => string;\n}\n\n/** `CalculatorButton` (desktop popover keypad) and `NumberPadSheet` (phone sheet). */\nexport interface CalculatorLabels {\n /** The button that opens the calculator. */\n open: string;\n /** The popover / sheet itself. */\n panel: string;\n calculation: string;\n backspace: string;\n clear: string;\n equals: string;\n /** The primary key of the phone pad — visible text, not an aria-label. */\n done: string;\n /** Names of the operator keys and the decimal key. Their glyphs are not names a\n * screen reader agrees on — \"÷\" is read as \"division sign\", \"divided by\" or\n * nothing at all depending on the reader — so each says what it does. */\n plus: string;\n minus: string;\n times: string;\n divide: string;\n decimal: string;\n}\n\n/** `CurrencySelect` and the currency half of `AmountInput`. */\nexport interface CurrencyLabels {\n currency: string;\n search: string;\n}\n\nexport interface AppShellLabels {\n collapse: string;\n expand: string;\n /** Accessible name of an inline group's disclosure button (`subNav=\"inline\"`). */\n toggleGroup: (groupLabel: string) => string;\n}\n\nexport interface TopBarLabels {\n theme: string;\n palette: string;\n language: string;\n switchRole: string;\n /** The role switcher's tooltip, given the active role's name. */\n role: (value: string) => string;\n}\n\nexport interface PickerSheetLabels {\n close: string;\n /** The sticky footer button that closes a multi-select sheet once the rows are ticked\n * (0.40) — the ticks are already applied, so it confirms rather than saves. */\n done: string;\n}\n\nexport interface SwipeableRowLabels {\n actions: string;\n}\n\nexport interface FileLabels {\n /** A file size for display, given its size in BYTES. The default uses\n * `Intl.NumberFormat`'s unit formatting in the provider's locale. */\n size: (bytes: number) => string;\n}\n\n/** The complete tree. `UiKitProvider` takes any partial of it. */\nexport interface UiKitLabels {\n common: CommonLabels;\n dataTable: DataTableLabels;\n miniCalendar: MiniCalendarLabels;\n calendarHeatmap: CalendarHeatmapLabels;\n datePicker: DatePickerLabels;\n monthPicker: MonthPickerLabels;\n popover: PopoverLabels;\n combobox: ComboboxLabels;\n multiSelect: MultiSelectLabels;\n calculator: CalculatorLabels;\n currency: CurrencyLabels;\n chipInput: ChipInputLabels;\n fieldSync: FieldSyncLabels;\n passwordReveal: PasswordRevealLabels;\n tabs: TabsLabels;\n appShell: AppShellLabels;\n pageContents: PageContentsLabels;\n topBar: TopBarLabels;\n pickerSheet: PickerSheetLabels;\n swipeableRow: SwipeableRowLabels;\n file: FileLabels;\n wizard: WizardLabels;\n tour: TourLabels;\n /** 0.43.0: the tours page — `TourCatalogue` and its card (docs/tours-harmonization.md §3). */\n tourCatalogue: TourCatalogueLabels;\n commandPalette: CommandPaletteLabels;\n globalSearch: GlobalSearchLabels;\n seriesChart: SeriesChartLabels;\n pieChart: PieChartLabels;\n sparkline: SparklineLabels;\n statTile: StatTileLabels;\n signaturePad: SignaturePadLabels;\n passwordStrength: PasswordStrengthLabels;\n dangerConfirm: DangerConfirmLabels;\n swatchPicker: SwatchPickerLabels;\n iconPicker: IconPickerLabels;\n dialogFrame: DialogFrameLabels;\n filePicker: FilePickerLabels;\n measuredGrid: MeasuredGridLabels;\n feedbackAttachment: FeedbackAttachmentFieldLabels;\n /** 0.12.0: `FeedbackDialog`'s own strings; `FeedbackThread` / `FeedbackComposer`. */\n feedbackDialog: FeedbackDialogTextLabels;\n feedbackThread: FeedbackThreadLabels;\n feedbackComposer: FeedbackComposerLabels;\n /** 0.27.0: the feedback harmonisation (docs/feedback-harmonization.md §4) — a report's\n * status and category words, keyed by the enum value; the toasts a feedback page\n * shows; `FeedbackMenu`; `FeedbackContextBox`; the two pages' table; the row detail.\n * keksdose's wording is the canon, in every language. */\n feedbackStatus: FeedbackStatusLabels;\n feedbackCategory: FeedbackCategoryLabels;\n feedbackToast: FeedbackToastLabels;\n feedbackMenu: FeedbackMenuLabels;\n /** 0.38.0: the public feedback pages — `FeedbackPublicList`, `FeedbackPublicDetail`,\n * `FeedbackPublicSwitch` (docs/feedback-harmonization.md §9.15). */\n feedbackPublic: FeedbackPublicLabels;\n /** 0.38.0: `useFeedbackNotificationTypes` — the two feedback types' setting words\n * (§9.11). */\n feedbackNotificationTypes: FeedbackNotificationTypesLabels;\n feedbackContext: FeedbackContextLabels;\n feedbackPage: FeedbackPageLabels;\n feedbackDetail: FeedbackDetailLabels;\n /** 0.38.0: public feedback (docs/feedback-harmonization.md §9.15) — the vote button,\n * the comment thread, the replies' timeline and composer. */\n feedbackVote: FeedbackVoteLabels;\n feedbackComments: FeedbackCommentsLabels;\n feedbackReplies: FeedbackRepliesLabels;\n /** 0.12.0: `ProfileSetting`, `PasswordSetting`, `TwoFactorSetting`, `PasskeysSetting`\n * — one record per section. The provider takes a whole section record; the\n * components merge it key by key, as a prop. */\n accountSettings: AccountSettingsLabels;\n confirmDialog: ConfirmDialogLabels;\n floatingPanel: FloatingPanelLabels;\n copyButton: CopyButtonLabels;\n bulkActionBar: BulkActionBarLabels;\n list: ListLabels;\n breadcrumbs: BreadcrumbsLabels;\n toast: ToastLabels;\n form: FormActionsLabels;\n descriptionList: DescriptionListLabels;\n lineItems: LineItemsLabels;\n progressBar: ProgressBarLabels;\n signedAmount: SignedAmountLabels;\n errorBoundary: ErrorBoundaryLabels;\n authedImage: AuthedImageLabels;\n imageGrid: ImageGridLabels;\n lightbox: LightboxLabels;\n /** 0.18.0: `WriteLockProvider`'s fallback reason, `AccountStateChip`, `SharePanel` /\n * `ShareCard` / `ShareDialog`, `ReauthDialog`. */\n writeLock: WriteLockLabels;\n accountState: AccountStateLabels;\n shareCard: ShareCardLabels;\n reauthDialog: ReauthDialogLabels;\n /** 0.18.0: `ServerWakeNotice` — keksdose's cold-start notice, for every app. */\n serverWake: ServerWakeLabels;\n /** 0.19.0: the translation-review parts (`TranslationReviewPanel`, its editor, chip,\n * progress, locale tabs and export) — keksdose's /translations, for every app. */\n translationReview: TranslationReviewLabels;\n /** 0.19.0: `LegalLinks`' navigation name. 0.28.0: every kit-owned word of the legal\n * pages — the link labels, titles, back link, terms checkbox and notices, and the\n * sections that are the same in every app, filled in with the app's operator\n * (docs/legal-harmonization.md §4.3/§4.4). */\n legal: LegalLabels;\n /** 0.29.0: sign-in form: credentials, passkey, 2FA, forced new password (docs/auth-harmonization.md §5). */\n signIn: SignInLabels;\n /** 0.29.0: the sign-up form, with the +app address tag (§4.1, §4.5). */\n register: RegisterLabels;\n /** 0.29.0: asking a migrated account for first and last name once (§3.3). */\n completeName: CompleteNameLabels;\n /** 0.29.0: requesting a reset link (always the same answer). */\n forgotPassword: ForgotPasswordLabels;\n /** 0.29.0: choosing a new password from a reset link; not a sign-in (§6.3). */\n resetPassword: ResetPasswordLabels;\n /** 0.29.0: the verify-email page and the unverified banner. */\n verifyEmail: VerifyEmailLabels;\n /** 0.29.0: the 404 page. */\n notFound: NotFoundLabels;\n /** 0.29.0: accepting an invitation with an account (§4.4). */\n acceptInvitation: AcceptInvitationLabels;\n /** 0.29.0: kastlan's switcher between a user's companies (§5.3). */\n companySwitcher: CompanySwitcherLabels;\n /** 0.30.0: changing the account's address with re-verification (docs/user-admin-harmonization.md §6.2). */\n emailChange: EmailChangeLabels;\n /** 0.30.0: sign out everywhere, and kastlan's device list (§6.3). */\n sessions: SessionsLabels;\n /** 0.30.0: deletion in two stages (§6.4). */\n deleteAccount: DeleteAccountLabels;\n /** 0.30.0: the self-service JSON export (§6.5). */\n dataExport: DataExportLabels;\n /** 0.30.0: the admin user list's columns (§3). */\n userRoster: UserRosterLabels;\n /** 0.30.0: picking one or several roles, with the reasons a choice is locked (§4.1). */\n roleSelect: RoleSelectLabels;\n /** 0.30.0: a translation reviewer's languages and areas. */\n reviewerScope: ReviewerScopeLabels;\n /** 0.30.0: an admin action's confirmation and refusals (§4.2). */\n adminAction: AdminActionLabels;\n /** 0.30.0: the admin_actions list (§4.3). */\n adminActionLog: AdminActionLogLabels;\n /** 0.30.0: handing an account's work to another (Kurvenschmiede). */\n transferOwnership: TransferOwnershipLabels;\n /** 0.30.0: the invitations panel (§5). */\n invitations: InvitationsLabels;\n /** 0.31.0: the settings and admin pages' shell (docs/settings-harmonization.md §4.3). */\n settings: SettingsLabels;\n /** 0.31.0: the public landing page's kit words (docs/landing-demo-harmonization.md §4). */\n landing: LandingLabels;\n /** 0.31.0: the demo's start, banner and end (§5). */\n demo: DemoLabels;\n /** 0.32.0: plans, standing, banners and the limit notice (docs/billing-harmonization.md §7). */\n billing: BillingLabels;\n /** 0.33.0: the operator's plan parts — `planColumn`, `PlanChangeConfirm` and the\n * lines of `usePlanChangeResult` (docs/billing-harmonization.md §14.12). */\n planChange: PlanChangeLabels;\n /** 0.32.0: the text-size and contrast settings (docs/text-size-harmonization.md §6). */\n appearance: AppearanceLabels;\n /** 0.36.0: resetting this device's settings, the appearance group's last card\n * (docs/settings-harmonization.md §11.3). */\n deviceReset: DeviceResetLabels;\n /** 0.32.0: a row's actions folded into a \"⋯\" menu at Large (text size §10.8). */\n rowActions: RowActionsLabels;\n /** 0.32.0: the phone bar's \"More\" cell and sheet (text size §10.7). */\n appShellMore: AppShellMoreLabels;\n /** 0.22.0: the screen-reader words of `Input` / `Textarea`'s `showCount` counter. */\n characterCount: CharacterCountLabels;\n /** 0.22.0: `CountrySelect`. Its list's \"no results\" and counts are `combobox`'s. */\n countrySelect: CountrySelectLabels;\n /** 0.22.0: `InlineEditField` — keksdose K9. */\n inlineEdit: InlineEditLabels;\n /** 0.22.0: `IbanInput`'s messages, one per problem. */\n ibanInput: IbanInputLabels;\n /** 0.22.0: `PhoneInput`'s country-code select. */\n phoneInput: PhoneInputLabels;\n /** 0.22.0: `SignChip` — the outflow / inflow toggle beside an amount. */\n signChip: SignChipLabels;\n /** 0.23.0: `ColumnMapper` / `ColumnRoleTable` — a pasted or dropped table, a role per\n * column. */\n columnMapper: ColumnMapperLabels;\n /** 0.36.0: the notification cards — the types, quiet hours and the zone picker, this\n * device's push, the device list, and the unsubscribe page\n * (docs/notifications-harmonization.md §4.2). */\n notifications: NotificationsLabels;\n /** 0.42.0: the admin area's shared words — the account menu's \"Administration\" row, the\n * 403 page, the shared sections, the overview's tiles and the Tools list\n * (docs/admin-harmonization.md §3.1). */\n adminArea: AdminAreaLabels;\n /** 0.42.0: the top bar's shared parts — `TourMenu`, `SyncStatusIndicator`, `DevSwitchers`\n * (docs/top-bar-harmonization.md §3.1). */\n topBarParts: TopBarPartsLabels;\n}\n\n/**\n * A label override, as deep as the labels go: an object of labels (a namespace, or a\n * record inside one such as `accountSettings.passkeys` or `dataTable.presets`) may be\n * partial at every level, because the provider merges it key by key at every level.\n * A leaf stays as it is: a string, a function-valued label (`(n) => …`), and anything\n * that is not purely an object (a `ReactNode` union) is given whole.\n */\nexport type LabelOverride<T> = [T] extends [(...args: never[]) => unknown]\n ? T\n : [T] extends [readonly unknown[]]\n ? T\n : [T] extends [object]\n ? { [K in keyof T]?: LabelOverride<T[K]> }\n : T;\n\n/** Any subset of the tree — each namespace may be partial, and so may any record\n * inside one (`accountSettings.passkeys`, `dataTable.presets`): they are merged key\n * by key, at every depth. */\nexport type UiKitLabelOverrides = { [K in keyof UiKitLabels]?: LabelOverride<UiKitLabels[K]> };\n\n/* ── English defaults for the namespaces defined here ────────────────────── */\n\n// They live in ./shared-labels, a module of words, as every component's defaults live in\n// its `*-labels.ts` (round 0.34). Imported and exported as this module's own, as each\n// component does with its defaults: the names, and where the README lists them, stay.\nexport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n formatFileSize,\n};\n\n/* ── The provider ────────────────────────────────────────────────────────── */\n\ninterface KitI18n {\n labels?: UiKitLabelOverrides;\n locale?: string;\n weekStartsOn?: WeekDay;\n linkComponent?: KitLinkComponent;\n chartTooltipPlacement?: ChartTooltipPlacement;\n formatDate?: KitDateFormatter;\n tableStorageKeyPrefix?: string;\n}\n\n/** What a {@link KitDateFormatter} is told about the date it is formatting. */\nexport interface KitDateFormatContext {\n /**\n * How much of a date the string is: `\"day\"` — the `iso` is `\"YYYY-MM-DD\"`; `\"month\"` —\n * `\"YYYY-MM\"` (a `MonthPicker`); `\"year\"` — `\"YYYY\"` (`MonthPicker mode=\"year\"`).\n */\n unit: \"day\" | \"month\" | \"year\";\n /** Which kit surface asks: the trigger of a `DatePicker`, of a `DateRangePicker`\n * (called once per end), of a `MonthPicker`, or a `DateMark`. */\n source: \"datePicker\" | \"dateRangePicker\" | \"monthPicker\" | \"dateMark\";\n /** The locale the kit would have formatted in — the component's `locale` prop, else\n * the provider's — or `undefined` for the runtime's. */\n locale: string | undefined;\n /**\n * The kit's suggestion: whether this date stands alone where the day of the week\n * helps — `true` for a `DatePicker`'s trigger and a `DateMark`, `false` for the two\n * ends of a range (twice the width, in a sentence-like \"from – to\") and for a month\n * or a year. keksdose's rule, which this follows: *\"A date in a COLUMN carries the\n * weekday. A date in a SENTENCE does not.\"* (date-cell.tsx, dev#546). A formatter\n * is free to ignore it.\n */\n weekday: boolean;\n}\n\n/**\n * The app's ONE answer to \"what does a date look like here\" — keksdose K12. Returns the\n * text for an ISO date (see {@link KitDateFormatContext.unit} for the three shapes).\n * Return `\"\"` to fall back to the kit's own formatting for that date.\n */\nexport type KitDateFormatter = (iso: string, context: KitDateFormatContext) => string;\n\n/** Where a chart shows the values under the pointer — see `SeriesChartTooltip.placement`. */\nexport type ChartTooltipPlacement = \"cursor\" | \"above\" | \"below\" | \"auto\";\n\n/**\n * What every kit link receives: the anchor attributes the kit decided (href, class,\n * aria-current, handlers, children, ref). An app's router link maps them —\n * `({ href, ...p }) => <Link to={href} {...p} />` — ONCE, on the provider.\n *\n * `replace` is the one prop that is not an anchor attribute: see there. Map it\n * explicitly if your router link is not react-router's —\n * `({ href, replace, ...p }) => <Link to={href} replace={replace} {...p} />` — and never\n * spread it onto a DOM `<a>`, where React warns about an unknown attribute.\n */\nexport type KitLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n ref?: Ref<HTMLAnchorElement>;\n /**\n * Navigate by REPLACING the current history entry, so Back skips it — keksdose F1:\n * a one-shot URL (a magic-link landing, `?checkout=done`, a wizard's \"finish\" hop)\n * that must not come back when the user presses Back. Present ONLY when the kit link\n * was given `replace` (`true`), so a provider link that spreads its props onto a\n * plain `<a>` keeps working for every link that never asks for it. react-router's\n * `<Link>` takes the same prop, so `({ href, ...p }) => <Link to={href} {...p} />`\n * honours it with no change; any other router maps it to its own replace option.\n * The kit never puts it on a DOM element itself.\n */\n replace?: boolean;\n};\nexport type KitLinkComponent = (props: KitLinkProps) => ReactElement;\n\nconst KitI18nContext = createContext<KitI18n>({});\n\nexport interface UiKitProviderProps {\n /** Any part of {@link UiKitLabels}. Missing keys fall back to English. */\n labels?: UiKitLabelOverrides;\n /**\n * BCP 47 tag used by every kit component that formats something — dates, numbers,\n * month and weekday names, file sizes — when it is not handed a `locale` prop of\n * its own. Without a provider, and without a prop, those use the runtime default.\n */\n locale?: string;\n /**\n * The first day of the week (0 = Sunday, 1 = Monday …) for every calendar below —\n * `MiniCalendar` and the pickers built on it — that is not handed a `weekStartsOn`\n * of its own. Without it the week start follows `locale`'s week info.\n *\n * Separate from `locale` because the two are separate decisions: a German-built\n * app running in English (`locale=\"en\"`) would otherwise start its weeks on Sunday,\n * and switching it to `en-GB` to get Monday changes every date and number format.\n */\n weekStartsOn?: WeekDay;\n /**\n * The app's router link, used by every kit component that renders an in-app link\n * and was not handed its own `renderLink` — so `renderLink` stops being repeated on\n * each ListItem, Breadcrumbs, StatTile, Chip… (kastlan). A component's own\n * `renderLink` wins; external links and in-page `#anchor`s stay plain `<a>`, and a\n * hash-router `#/path` is handed to it like `/path` (see `pickLinkRenderer`).\n */\n linkComponent?: KitLinkComponent;\n /**\n * Where every `SeriesChart` below shows its tooltip when it does not say so itself\n * (`tooltip.placement`) — set once so an app's phone charts stop putting the box under\n * the reader's finger (keksdose #359). Default: `\"cursor\"`, the box that follows the\n * pointer, as before.\n */\n chartTooltipPlacement?: ChartTooltipPlacement;\n /**\n * How every kit date below is written, when the component is not told otherwise —\n * keksdose K12. keksdose has a date-format preference (Settings ▸ date format, feedback\n * #180) that is not the UI language, and a weekday in the UI language beside digits\n * in the preference's order (live #246, dev#546): two locales in one string, which\n * no `locale` + `Intl` options can say. Its `DateField` wraps every `DatePicker` to\n * pass `formatValue`, and its report range field formats both ends by hand; with this\n * set once on the provider, those wrappers thin to nothing.\n *\n * Used for the trigger text of `DatePicker`, `DateRangePicker` and `MonthPicker`\n * (month and year mode), and for `DateMark display=\"date\"`. A component's own\n * `formatValue` or `formatOptions` (`dateStyle` on a DateMark) wins: prop >\n * provider > the kit's `Intl` default, the order every kit setting resolves in. Left\n * out (or returning `\"\"`), everything formats exactly as before.\n *\n * Keep it stable (`useCallback`, or a module function): it is in the provider's\n * context value, so a new function every render re-renders every consumer.\n */\n formatDate?: KitDateFormatter;\n /**\n * The `localStorage` prefix every kit table below keeps its view under (sort, filters,\n * page size, widths, hidden columns), when the table is not handed a\n * `storageKeyPrefix` of its own — round 0.34 C5, KS U4. Left out, it is the kit's\n * `\"hbui-table:\"`, as before.\n *\n * Set once here rather than per table because not every table is the app's to pass a\n * prop to: `TranslationReviewPanel` wraps a `DataTable`, and until this the panel's\n * view landed under the kit's prefix whatever the app's was — so an app that lists\n * what it stores (a privacy page) had to list the kit's prefix as a key of its own.\n * Resolves like every kit setting: the table's own prop > this > the default. The\n * key is the prefix plus the table's `storageKey`, verbatim, so an app that wrapped\n * `DataTable` to pass its prefix (Keksdose's `keksdose-table:`) keeps every stored\n * view when it moves the prefix here.\n */\n tableStorageKeyPrefix?: string;\n children: ReactNode;\n}\n\n/**\n * Hand every kit component below this point its strings and its locale.\n *\n * Optional: a component outside any provider behaves exactly as it did before the\n * provider existed. Nesting works as a merge — an inner provider overrides only what\n * it names, so a page can re-label one table's `dataTable.table` without restating\n * the language.\n */\nexport function UiKitProvider({\n labels,\n locale,\n weekStartsOn,\n linkComponent,\n chartTooltipPlacement,\n formatDate,\n tableStorageKeyPrefix,\n children,\n}: UiKitProviderProps) {\n const outer = useContext(KitI18nContext);\n const value = useMemo<KitI18n>(\n () => ({\n locale: locale ?? outer.locale,\n weekStartsOn: weekStartsOn ?? outer.weekStartsOn,\n labels: mergeOverrides(outer.labels, labels),\n linkComponent: linkComponent ?? outer.linkComponent,\n chartTooltipPlacement: chartTooltipPlacement ?? outer.chartTooltipPlacement,\n formatDate: formatDate ?? outer.formatDate,\n tableStorageKeyPrefix: tableStorageKeyPrefix ?? outer.tableStorageKeyPrefix,\n }),\n [outer, labels, locale, weekStartsOn, linkComponent, chartTooltipPlacement, formatDate, tableStorageKeyPrefix],\n );\n useTableViewsJoin(value.tableStorageKeyPrefix ?? DEFAULT_TABLE_STORAGE_KEY_PREFIX);\n return <KitI18nContext.Provider value={value}>{children}</KitI18nContext.Provider>;\n}\n\n/** The kit's own table prefix: `DEFAULT_PERSIST_PREFIX` of components/use-table-state,\n * restated because that module imports the router (a test pins the two equal). */\nconst DEFAULT_TABLE_STORAGE_KEY_PREFIX = \"hbui-table:\";\n\n/**\n * Reset this device's settings (docs/settings-harmonization.md §11.4): the tables below a\n * provider keep their views under its prefix, so the provider joins the registry with\n * that prefix — a view, no `reset`, since a table reads its view when it next mounts —\n * while it is mounted. Nested providers with one prefix hold one entry.\n *\n * Through a literal `import()`, not a static import: every catalogue reaches this module,\n * and a catalogue may reach nothing outside i18n/ (scripts/check-module-graph.mjs,\n * english-catalogue-graph.test.ts). The theme stores and the shell import the registry\n * statically, so it is loaded already and the join lands a microtask after the mount.\n */\nfunction useTableViewsJoin(prefix: string): void {\n useEffect(() => {\n let leave: (() => void) | undefined;\n let gone = false;\n import(\"../lib/device-settings\").then(\n ({ registerDeviceSetting }) => {\n if (!gone) leave = registerDeviceSetting({ key: prefix, prefix: true, kind: \"view\" });\n },\n // A module of the kit's own that fails to load has nothing to join; the provider\n // and its tables work as before.\n () => undefined,\n );\n return () => {\n gone = true;\n leave?.();\n };\n }, [prefix]);\n}\n\nfunction isRecord(v: unknown): v is Record<string, unknown> {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n\n/** A record of labels to merge into — not a React element, which is an object too but\n * is a label given whole. */\nfunction isLabelRecord(v: unknown): v is Record<string, unknown> {\n return isRecord(v) && !(\"$$typeof\" in v);\n}\n\n/** Merged key by key at EVERY depth — a namespace, a record inside it\n * (`accountSettings.passkeys`, `dataTable.presets`), and so on down — to match\n * {@link LabelOverride}. An `undefined` is skipped at every depth, so it never blanks\n * out what is under it. */\nfunction mergeNamespace<T extends object>(base: T, over: LabelOverride<T> | Partial<T> | undefined): T {\n if (!over) return base;\n const out = { ...base } as Record<string, unknown>;\n for (const [k, v] of Object.entries(over)) {\n if (v === undefined) continue;\n const prev = out[k];\n out[k] = isLabelRecord(prev) && isLabelRecord(v) ? mergeNamespace(prev, v) : v;\n }\n return out as T;\n}\n\nfunction mergeOverrides(\n a: UiKitLabelOverrides | undefined,\n b: UiKitLabelOverrides | undefined,\n): UiKitLabelOverrides | undefined {\n if (!a) return b;\n if (!b) return a;\n const out: Record<string, unknown> = { ...a };\n for (const [ns, v] of Object.entries(b)) {\n out[ns] = mergeNamespace((out[ns] as object | undefined) ?? {}, v as object);\n }\n return out as UiKitLabelOverrides;\n}\n\n/**\n * What the nearest provider says about one namespace — `undefined` outside one. Nested\n * providers' words come merged, at every depth; no English default is filled in.\n *\n * A {@link LabelOverride}, partial at every depth, like the components' `labels` props\n * that take it: a provider that names one key of a section (`accountSettings.passkeys`)\n * or one preset (`dataTable.presets`) hands over just that (round 0.35 R3 — until then\n * it was typed partial at the top only, so a nested section read as complete).\n *\n * For a component whose own resolver does more than a merge (the data table derives\n * `columnsCount` from `columns`): merge the component's prop over it — a record key by\n * key — and feed the result to that resolver.\n */\nexport function useKitLabelOverrides<K extends keyof UiKitLabels>(\n ns: K,\n): LabelOverride<UiKitLabels[K]> | undefined {\n return useContext(KitI18nContext).labels?.[ns];\n}\n\n/**\n * One namespace, resolved: `defaults`, then the provider, then the component's own\n * `prop`. Record-valued keys are merged key by key at each step — so `prop` is a\n * {@link LabelOverride}, partial at every depth as the provider's labels are, and a\n * component's `labels` prop, typed the same, is handed over without a cast (refactor\n * audit 2026-10, API-9).\n */\nexport function useKitLabels<K extends keyof UiKitLabels>(\n ns: K,\n defaults: UiKitLabels[K],\n prop?: LabelOverride<UiKitLabels[K]>,\n): UiKitLabels[K] {\n const fromProvider = useKitLabelOverrides(ns);\n return useMemo(\n () => mergeNamespace(mergeNamespace(defaults, fromProvider), prop),\n [defaults, fromProvider, prop],\n );\n}\n\n/** The component's own `locale` prop, else the provider's, else `undefined` (which\n * every `Intl` API reads as \"the runtime's default\"). */\nexport function useKitLocale(prop?: string): string | undefined {\n const fromProvider = useContext(KitI18nContext).locale;\n return prop ?? fromProvider;\n}\n\n/** The week start the nearest `<UiKitProvider weekStartsOn>` pins, else `undefined`\n * (the caller then asks the locale). A component's own prop goes first:\n * `prop ?? useKitWeekStart()`. */\n/** The provider's router link, or `undefined` — a component's own `renderLink` should\n * win over it: `const Link = renderLink ?? useKitLink()`. */\nexport function useKitLink(): KitLinkComponent | undefined {\n return useContext(KitI18nContext).linkComponent;\n}\n\nexport function useKitWeekStart(): WeekDay | undefined {\n return useContext(KitI18nContext).weekStartsOn;\n}\n\n/** The provider's `chartTooltipPlacement`, or `undefined` — a chart's own prop wins. */\nexport function useKitChartTooltipPlacement(): ChartTooltipPlacement | undefined {\n return useContext(KitI18nContext).chartTooltipPlacement;\n}\n\n/** The nearest provider's `formatDate`, or `undefined` — a component's own\n * `formatValue` / `formatOptions` wins over it. See {@link KitDateFormatter}. */\nexport function useKitDateFormatter(): KitDateFormatter | undefined {\n return useContext(KitI18nContext).formatDate;\n}\n\n/** The nearest provider's `tableStorageKeyPrefix`, or `undefined` — a table's own\n * `storageKeyPrefix` wins over it, and the kit's `\"hbui-table:\"` comes after both. */\nexport function useKitTableStorageKeyPrefix(): string | undefined {\n return useContext(KitI18nContext).tableStorageKeyPrefix;\n}\n\n/** {@link DEFAULT_FILE_LABELS}, but formatting in the provider's locale. */\nexport function useKitFileLabels(prop?: Partial<FileLabels>): FileLabels {\n const locale = useKitLocale();\n const defaults = useMemo<FileLabels>(\n () => ({ size: (bytes) => formatFileSize(bytes, locale) }),\n [locale],\n );\n return useKitLabels(\"file\", defaults, prop);\n}\n\n/**\n * The dot paths of every key `labels` does NOT supply — the ones a translated app is\n * still showing in English. Assert on it in the app's own test:\n *\n * expect(missingKitLabels(labels, DEFAULT_UI_KIT_LABELS)).toEqual([]);\n *\n * `reference` is the complete tree to check against — pass\n * {@link DEFAULT_UI_KIT_LABELS} (src/i18n/defaults.ts). It is a parameter rather than an import\n * because the defaults live beside their components, and this module is imported BY\n * those components. Left out (a test file is not type-checked), it throws saying so\n * rather than \"Cannot convert undefined or null to object\" (keksdose, 0.18).\n */\nexport function missingKitLabels(\n labels: UiKitLabelOverrides | undefined,\n reference: UiKitLabels,\n): string[] {\n if (!isRecord(reference)) {\n throw new TypeError(\n \"missingKitLabels(labels, reference): pass DEFAULT_UI_KIT_LABELS as the reference — \" +\n \"it is the tree the labels are checked against.\",\n );\n }\n const missing: string[] = [];\n for (const [ns, keys] of Object.entries(reference)) {\n const given = (labels as Record<string, Record<string, unknown> | undefined> | undefined)?.[ns];\n for (const [key, value] of Object.entries(keys as Record<string, unknown>)) {\n const got = given?.[key];\n if (got === undefined) {\n missing.push(`${ns}.${key}`);\n } else if (isRecord(value) && isRecord(got)) {\n for (const sub of Object.keys(value)) {\n if (got[sub] === undefined) missing.push(`${ns}.${key}.${sub}`);\n }\n }\n }\n }\n return missing;\n}\n"],"mappings":"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","names":[]}
@@ -185,6 +185,35 @@ var DEFAULT_TOUR_LABELS = {
185
185
  step: (c, t) => `${c} / ${t}`
186
186
  };
187
187
 
188
+ // src/tour/tour-catalogue-labels.ts
189
+ var DEFAULT_TOUR_CATALOGUE_LABELS = {
190
+ searchLabel: "Search tours",
191
+ searchPlaceholder: "Search tours\u2026",
192
+ groupLabel: "Topic",
193
+ groupAll: (count) => `All topics (${count})`,
194
+ groupOption: (group, count) => `${group} (${count})`,
195
+ stateLabel: "Filter tours",
196
+ stateAll: (count) => `All (${count})`,
197
+ stateTodo: (count) => `To do (${count})`,
198
+ stateDone: (count) => `Completed (${count})`,
199
+ showing: (shown, total) => `Showing ${shown} of ${total} tours`,
200
+ noMatches: "No tour matches",
201
+ noMatchesHint: "Try another word, or clear the filters.",
202
+ clearFilters: "Clear filters",
203
+ badgeNew: "New",
204
+ badgeUpdated: "Updated",
205
+ resetOn: (date, reason) => reason ? `Reset on ${date}: ${reason}` : `Reset on ${date}`,
206
+ points: (count) => `+${count} pts`,
207
+ steps: (count) => count === 1 ? "1 step" : `${count} steps`,
208
+ duration: (minutes) => `About ${minutes} min`,
209
+ completedOn: (date) => `Completed on ${date}`,
210
+ completed: "Completed",
211
+ notCompleted: "Not completed",
212
+ markUndone: "Mark as not done",
213
+ start: "Start",
214
+ replay: "Replay"
215
+ };
216
+
188
217
  // src/search/command-palette-labels.ts
189
218
  var DEFAULT_COMMAND_PALETTE_LABELS = {
190
219
  placeholder: "Search\u2026",
@@ -1425,6 +1454,7 @@ var DEFAULT_BILLING_LABELS = {
1425
1454
  processing: "Your payment is being processed. Your plan starts as soon as it\u2019s confirmed; this page updates by itself.",
1426
1455
  choosePlan: "Choose a plan",
1427
1456
  updatePayment: "Update payment method",
1457
+ paymentFailedAskBuyer: (buyer) => buyer ? `The payment failed. ${buyer} can update the payment method.` : "The payment failed. The admin who bought the subscription can update the payment method.",
1428
1458
  checkAgain: "Check again",
1429
1459
  lockReason: "Your plan has ended. Choose a plan to make changes again.",
1430
1460
  limitReached: "Plan limit reached",
@@ -1437,6 +1467,12 @@ var DEFAULT_BILLING_LABELS = {
1437
1467
  manage: "Payment and invoices",
1438
1468
  cancel: "Cancel subscription",
1439
1469
  notAtProvider: "Nothing to manage yet. Payments and invoices appear here once you have a paid plan.",
1470
+ buyerHolds: (buyer) => buyer ? `The payment method and the invoices are with ${buyer}, who bought the subscription.` : "The payment method and the invoices are with the admin who bought the subscription.",
1471
+ cancelConfirmTitle: "Cancel subscription",
1472
+ cancelConfirmBody: (date) => `Your subscription ends on ${date}. Until then everything works as before.`,
1473
+ cancelConfirmAction: "Cancel subscription now",
1474
+ keepSubscription: "Keep subscription",
1475
+ portalOpensNewTab: (provider, app) => `Payment and invoices open at ${provider} in a new tab; ${app ? `${app} stays open here` : "this page stays open"}.`,
1440
1476
  payOpening: "Opening the secure checkout\u2026",
1441
1477
  payNothing: "There\u2019s no payment to make here. To choose a plan, go back to the app.",
1442
1478
  payFailed: "The checkout couldn\u2019t be opened. Please go back and try again in a moment.",
@@ -1448,6 +1484,9 @@ var DEFAULT_BILLING_LABELS = {
1448
1484
  switchCredited: "Credited towards your next charges",
1449
1485
  switchNextCharge: (date) => `Next charge on ${date}`,
1450
1486
  switchConfirm: "Change plan",
1487
+ grantWarningTitle: "Your free access continues",
1488
+ grantWarningBody: "You have free access with no end date. A purchase won\u2019t change your plan while the free access runs: you would pay for a plan that doesn\u2019t apply.",
1489
+ grantWarningAction: "Buy anyway",
1451
1490
  waitingChanges: (count) => count === 1 ? "1 change waiting for a plan" : `${count} changes waiting for a plan`,
1452
1491
  discardWaiting: "Discard waiting changes",
1453
1492
  notConfigured: "Payments aren't set up yet. Please try again later.",
@@ -1525,6 +1564,76 @@ var DEFAULT_ACCOUNT_STATE_LABELS = {
1525
1564
  deletionOn: (date) => `Deletion on ${date}`
1526
1565
  };
1527
1566
 
1567
+ // src/admin/admin-area-labels.ts
1568
+ var DEFAULT_ADMIN_AREA_LABELS = {
1569
+ title: "Administration",
1570
+ waiting: (count) => `${count} waiting`,
1571
+ forbiddenTitle: "Only for administrators",
1572
+ forbiddenBody: (appName) => `This is where administrators run ${appName}. Your account cannot open this page.`,
1573
+ forbiddenHome: "Go to the start page",
1574
+ forbiddenReviewer: "Review translations",
1575
+ sections: {
1576
+ overview: { title: "Overview", help: "What is waiting, at a glance." },
1577
+ users: { title: "Users", help: "Who has an account, and what each may do." },
1578
+ invitations: { title: "Invitations", help: "Invite people by e-mail in their language; resend or revoke what\u2019s still open." },
1579
+ billing: { title: "Billing", help: "The plan, the payment and the invoices." },
1580
+ activity: { title: "Activity", help: "What the admins did, newest first." }
1581
+ },
1582
+ tiles: {
1583
+ feedbackWaiting: "To triage",
1584
+ deletionRequests: "Deletion requests",
1585
+ invitationsPending: "Pending invitations",
1586
+ users: "Users",
1587
+ usersNew: (count) => `${count} new in 7 days`
1588
+ },
1589
+ overviewError: "The overview couldn\u2019t be loaded.",
1590
+ retry: "Try again",
1591
+ tools: "Tools"
1592
+ };
1593
+
1594
+ // src/shell/top-bar-parts-labels.ts
1595
+ var DEFAULT_TOP_BAR_PARTS_LABELS = {
1596
+ tours: {
1597
+ menu: "Guided tours",
1598
+ newDot: "New tours",
1599
+ thisPage: "On this page",
1600
+ newTours: "New tours",
1601
+ allTours: "All tours\u2026",
1602
+ badgeNew: "New",
1603
+ completed: "Completed",
1604
+ badgeUpdated: "Updated",
1605
+ updatedDot: "Updated tours",
1606
+ newAndUpdated: "New and updated"
1607
+ },
1608
+ sync: {
1609
+ blocked: (count) => count === 1 ? "1 change cannot be sent from this device" : `${count} changes cannot be sent from this device`,
1610
+ offline: "Offline \u2014 changes are saved on this device and will sync when you reconnect",
1611
+ refused: "The server refused the last sync",
1612
+ syncing: "Syncing\u2026",
1613
+ pending: (count) => count === 1 ? "1 change waiting to sync" : `${count} changes waiting to sync`,
1614
+ syncedAt: (time) => `Synced at ${time}`,
1615
+ idle: "Up to date",
1616
+ syncHint: "Tap to sync now",
1617
+ offlineHint: "nothing to sync while offline",
1618
+ withHint: (state, hint) => `${state} \u2014 ${hint}`,
1619
+ scoped: (scope, state) => `${scope}: ${state}`,
1620
+ offlineShort: "Offline",
1621
+ syncingShort: "Syncing\u2026",
1622
+ waitingShort: (count) => `${count} waiting`,
1623
+ refusedShort: "Not synced",
1624
+ offlineUnsaved: "Offline \u2014 changes can't be saved until you reconnect",
1625
+ saving: "Saving\u2026"
1626
+ },
1627
+ dev: {
1628
+ roleHeading: "Dev \xB7 role",
1629
+ switchPlan: "Switch plan",
1630
+ plan: (value) => `Plan: ${value}`,
1631
+ planHeading: "Dev \xB7 plan",
1632
+ backTo: (role) => `Back to ${role}`,
1633
+ billingOff: "Billing is off locally: plans change nothing"
1634
+ }
1635
+ };
1636
+
1528
1637
  // src/components/share-card-labels.ts
1529
1638
  var DEFAULT_SHARE_CARD_LABELS = {
1530
1639
  dialogTitle: "Share",
@@ -1892,6 +2001,7 @@ var DEFAULT_UI_KIT_LABELS = {
1892
2001
  file: DEFAULT_FILE_LABELS,
1893
2002
  wizard: DEFAULT_WIZARD_LABELS,
1894
2003
  tour: DEFAULT_TOUR_LABELS,
2004
+ tourCatalogue: DEFAULT_TOUR_CATALOGUE_LABELS,
1895
2005
  commandPalette: DEFAULT_COMMAND_PALETTE_LABELS,
1896
2006
  globalSearch: DEFAULT_GLOBAL_SEARCH_LABELS,
1897
2007
  seriesChart: DEFAULT_SERIES_CHART_LABELS,
@@ -1982,7 +2092,9 @@ var DEFAULT_UI_KIT_LABELS = {
1982
2092
  phoneInput: DEFAULT_PHONE_INPUT_LABELS,
1983
2093
  signChip: DEFAULT_SIGN_CHIP_LABELS,
1984
2094
  columnMapper: DEFAULT_COLUMN_MAPPER_LABELS,
1985
- notifications: DEFAULT_NOTIFICATIONS_LABELS
2095
+ notifications: DEFAULT_NOTIFICATIONS_LABELS,
2096
+ adminArea: DEFAULT_ADMIN_AREA_LABELS,
2097
+ topBarParts: DEFAULT_TOP_BAR_PARTS_LABELS
1986
2098
  };
1987
2099
 
1988
2100
  // src/i18n/locales/en.ts
@@ -2142,6 +2254,35 @@ function uiKitLabelsEn(numberLocale = "en-US") {
2142
2254
  ...d.settings,
2143
2255
  matchCount: (count) => count === 1 ? "1 match" : `${n(count)} matches`
2144
2256
  },
2257
+ // 0.42.0: the admin area's two counts (docs/admin-harmonization.md §3.1).
2258
+ adminArea: {
2259
+ ...d.adminArea,
2260
+ waiting: (count) => `${n(count)} waiting`,
2261
+ tiles: { ...d.adminArea.tiles, usersNew: (count) => `${n(count)} new in 7 days` }
2262
+ },
2263
+ // 0.43.0: the tours page's counts (docs/tours-harmonization.md §3).
2264
+ tourCatalogue: {
2265
+ ...d.tourCatalogue,
2266
+ groupAll: (count) => `All topics (${n(count)})`,
2267
+ groupOption: (group, count) => `${group} (${n(count)})`,
2268
+ stateAll: (count) => `All (${n(count)})`,
2269
+ stateTodo: (count) => `To do (${n(count)})`,
2270
+ stateDone: (count) => `Completed (${n(count)})`,
2271
+ showing: (shown, total) => `Showing ${n(shown)} of ${n(total)} tours`,
2272
+ points: (count) => `+${n(count)} pts`,
2273
+ steps: (count) => count === 1 ? "1 step" : `${n(count)} steps`,
2274
+ duration: (minutes) => `About ${n(minutes)} min`
2275
+ },
2276
+ // 0.42.0: the top bar's three counts (docs/top-bar-harmonization.md §3.1).
2277
+ topBarParts: {
2278
+ ...d.topBarParts,
2279
+ sync: {
2280
+ ...d.topBarParts.sync,
2281
+ blocked: (count) => count === 1 ? "1 change cannot be sent from this device" : `${n(count)} changes cannot be sent from this device`,
2282
+ pending: (count) => count === 1 ? "1 change waiting to sync" : `${n(count)} changes waiting to sync`,
2283
+ waitingShort: (count) => `${n(count)} waiting`
2284
+ }
2285
+ },
2145
2286
  demo: {
2146
2287
  ...d.demo,
2147
2288
  rateLimited: (minutes) => minutes ? `Too many demos from this network. Try again in ${n(minutes)} min.` : "Too many demos from this network. Try again later.",