@protobase/ui 0.63.4 → 0.64.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 (300) hide show
  1. package/dist/account/change-email-dialog.js +1 -1
  2. package/dist/account/devices-section.js +12 -6
  3. package/dist/account/messages.js +2 -333
  4. package/dist/account/passkeys-section.js +3 -3
  5. package/dist/account/password-change-dialog.js +3 -3
  6. package/dist/account/sign-in-policy-form.js +6 -3
  7. package/dist/account/sign-in-providers-section.js +1 -1
  8. package/dist/account/staff-sign-in-log.js +5 -5
  9. package/dist/action-card/messages.js +2 -5
  10. package/dist/activity-chart/activity-chart.js +5 -7
  11. package/dist/activity-chart/activity-tooltip.js +1 -1
  12. package/dist/activity-chart/messages.js +2 -11
  13. package/dist/app/app.js +2 -3
  14. package/dist/app/batch-failure.js +5 -1
  15. package/dist/app/change-confirm/messages.js +2 -13
  16. package/dist/app/change-confirm/use-change-confirm.js +15 -18
  17. package/dist/app/charts/chart-groups.js +3 -1
  18. package/dist/app/charts/chart-view.js +1 -1
  19. package/dist/app/charts/group-bars.js +1 -1
  20. package/dist/app/charts/messages.js +2 -23
  21. package/dist/app/charts/period-chart.js +1 -1
  22. package/dist/app/comments/comment-composer.js +1 -1
  23. package/dist/app/comments/comments-section.js +2 -2
  24. package/dist/app/comments/messages.js +2 -19
  25. package/dist/app/confirm-sign-in-messages.js +2 -19
  26. package/dist/app/confirm-sign-in.js +1 -1
  27. package/dist/app/create/create-page.js +3 -3
  28. package/dist/app/create/create-record-form.js +3 -3
  29. package/dist/app/create/create-route.js +1 -1
  30. package/dist/app/create/messages.js +2 -29
  31. package/dist/app/custom-section.js +2 -3
  32. package/dist/app/delete/blocked-delete.js +5 -2
  33. package/dist/app/delete/dialogs.js +21 -8
  34. package/dist/app/delete/messages.js +2 -63
  35. package/dist/app/delete/use-delete-flow.js +6 -5
  36. package/dist/app/displays/board-column.js +2 -2
  37. package/dist/app/displays/board-columns.js +1 -1
  38. package/dist/app/displays/board-display.js +21 -9
  39. package/dist/app/displays/calendar-display.js +16 -7
  40. package/dist/app/displays/cards-display.js +2 -2
  41. package/dist/app/displays/custom-display.js +1 -2
  42. package/dist/app/displays/list-cards.js +2 -2
  43. package/dist/app/displays/map-display.js +19 -6
  44. package/dist/app/displays/messages.js +2 -147
  45. package/dist/app/displays/period-controls.js +2 -2
  46. package/dist/app/displays/timeline-display.js +16 -7
  47. package/dist/app/displays/timeline-range.js +1 -1
  48. package/dist/app/displays/use-board-move.js +4 -4
  49. package/dist/app/displays/use-calendar-move.js +2 -2
  50. package/dist/app/document-title.js +1 -1
  51. package/dist/app/embedded-list/cut-off-note.js +7 -1
  52. package/dist/app/embedded-list/embedded-list.js +1 -1
  53. package/dist/app/embedded-list/embedded-row-targets.js +3 -3
  54. package/dist/app/embedded-list/messages.js +2 -21
  55. package/dist/app/export/builder-port.js +1 -1
  56. package/dist/app/export/export-dialog.js +14 -8
  57. package/dist/app/export/messages.js +2 -75
  58. package/dist/app/export/use-export-flow.js +9 -3
  59. package/dist/app/field-editor.js +3 -3
  60. package/dist/app/field-errors.js +18 -7
  61. package/dist/app/field-messages.js +2 -45
  62. package/dist/app/field-types/members/messages.js +2 -15
  63. package/dist/app/field-types/messages.js +2 -5
  64. package/dist/app/field-types/widget-part.js +1 -1
  65. package/dist/app/file-field.js +3 -3
  66. package/dist/app/gallery/gallery-section.js +6 -3
  67. package/dist/app/gallery/messages.js +2 -27
  68. package/dist/app/gallery/photo-details.js +3 -3
  69. package/dist/app/hand-order/hand-sorted-list.js +2 -3
  70. package/dist/app/hand-order/messages.js +2 -29
  71. package/dist/app/hand-order/use-hand-order.js +2 -2
  72. package/dist/app/history/describe-change.js +1 -1
  73. package/dist/app/history/history-section.js +1 -1
  74. package/dist/app/history/messages.js +2 -29
  75. package/dist/app/import/convert.js +19 -10
  76. package/dist/app/import/import-check-step.js +5 -5
  77. package/dist/app/import/import-dialog.js +5 -2
  78. package/dist/app/import/import-file-step.js +1 -1
  79. package/dist/app/import/import-mapping-step.js +3 -3
  80. package/dist/app/import/messages.js +2 -197
  81. package/dist/app/import/prepare-rows.js +11 -4
  82. package/dist/app/import/sheet-cell.js +1 -1
  83. package/dist/app/import/xlsx-reader.js +2 -2
  84. package/dist/app/import/zip-reader.js +4 -1
  85. package/dist/app/incoming-card.js +1 -1
  86. package/dist/app/list-actions/use-list-actions.js +4 -1
  87. package/dist/app/list-edit/messages.js +2 -11
  88. package/dist/app/list-edit/use-list-edits.js +1 -1
  89. package/dist/app/list-empty-state.js +7 -4
  90. package/dist/app/list-group-chart.js +1 -1
  91. package/dist/app/list-messages.js +2 -53
  92. package/dist/app/list-page.js +9 -9
  93. package/dist/app/live-update/messages.js +2 -11
  94. package/dist/app/map/messages.js +2 -11
  95. package/dist/app/messages.js +2 -139
  96. package/dist/app/meta-gate-messages.js +2 -13
  97. package/dist/app/nav-from-meta.js +2 -2
  98. package/dist/app/new-version/messages.js +2 -21
  99. package/dist/app/new-version/new-version-banner.js +1 -2
  100. package/dist/app/new-version/new-version-toast.js +1 -1
  101. package/dist/app/pages/action-inputs/action-inputs-dialog.js +1 -1
  102. package/dist/app/pages/action-inputs/input-answers.js +1 -1
  103. package/dist/app/pages/blocks/field.js +1 -1
  104. package/dist/app/pages/blocks/modal-form.js +3 -3
  105. package/dist/app/pages/blocks/settings.js +3 -3
  106. package/dist/app/pages/blocks/tabs.js +1 -1
  107. package/dist/app/pages/composed-page.js +1 -2
  108. package/dist/app/pages/custom-boundary.js +1 -2
  109. package/dist/app/pages/messages.js +2 -79
  110. package/dist/app/pages/record-actions.js +1 -1
  111. package/dist/app/pages/render-node.js +2 -3
  112. package/dist/app/pages/use-run-action.js +15 -7
  113. package/dist/app/picker/picker-combobox.js +1 -1
  114. package/dist/app/rank-after/dependency-rule.js +8 -2
  115. package/dist/app/rank-after/messages.js +2 -5
  116. package/dist/app/rank-after/ranked-place.js +7 -1
  117. package/dist/app/record-chart/messages.js +2 -25
  118. package/dist/app/record-chart/record-chart-section.js +2 -2
  119. package/dist/app/record-lines-cell.js +4 -1
  120. package/dist/app/record-lines.js +5 -5
  121. package/dist/app/record-messages.js +2 -83
  122. package/dist/app/record-page.js +8 -8
  123. package/dist/app/record-row/messages.js +2 -23
  124. package/dist/app/record-row/record-row-body.js +2 -2
  125. package/dist/app/record-row/record-row.js +3 -3
  126. package/dist/app/record-row/saved-record-row.js +3 -3
  127. package/dist/app/related-cards/messages.js +2 -15
  128. package/dist/app/related-cards/related-card.js +1 -1
  129. package/dist/app/related-cards/related-cards.js +1 -1
  130. package/dist/app/related-dots/dots-summary.js +1 -1
  131. package/dist/app/related-dots/messages.js +2 -5
  132. package/dist/app/related-dots/related-dots.js +2 -3
  133. package/dist/app/related-section.js +1 -1
  134. package/dist/app/relation-picker.js +1 -1
  135. package/dist/app/runtime/messages.js +2 -55
  136. package/dist/app/runtime/runtime-status.js +12 -3
  137. package/dist/app/saved/messages.js +2 -19
  138. package/dist/app/saved/saved-list.js +3 -3
  139. package/dist/app/search/messages.js +2 -19
  140. package/dist/app/search/navigation-hits.js +1 -1
  141. package/dist/app/search/search-model.js +9 -3
  142. package/dist/app/searches/messages.js +2 -93
  143. package/dist/app/searches/save-search-button.js +3 -3
  144. package/dist/app/searches/saved-search-rows.js +3 -3
  145. package/dist/app/searches/saved-search-section.js +4 -4
  146. package/dist/app/searches/saved-searches.js +14 -12
  147. package/dist/app/searches/search-controls.js +2 -2
  148. package/dist/app/searches/search-diff.js +8 -2
  149. package/dist/app/searches/update-search-dialog.js +10 -4
  150. package/dist/app/searches/use-save-search.js +2 -2
  151. package/dist/app/searches/use-search-row.js +2 -2
  152. package/dist/app/sensitive-field.js +3 -3
  153. package/dist/app/source-notice.js +3 -3
  154. package/dist/app/staff-banner.js +12 -8
  155. package/dist/app/use-live-save.js +2 -2
  156. package/dist/app/value-badge.js +3 -4
  157. package/dist/app-shell/global-search.js +2 -2
  158. package/dist/app-shell/messages.js +2 -63
  159. package/dist/app-shell/profile-menu.js +2 -2
  160. package/dist/app-shell/sidebar-group.js +2 -2
  161. package/dist/app-shell/sidebar.js +1 -2
  162. package/dist/app-shell/top-bar.js +1 -1
  163. package/dist/assistant-dock/messages.js +2 -23
  164. package/dist/auth/auth-gate.js +1 -1
  165. package/dist/auth/auth-messages.js +9 -88
  166. package/dist/auth/email-code-form.js +2 -3
  167. package/dist/auth/forgot-password-form.js +3 -4
  168. package/dist/auth/messages.js +2 -203
  169. package/dist/auth/provider-sign-in-page.js +3 -3
  170. package/dist/auth/resend-code-button.js +1 -1
  171. package/dist/auth/reset-password-form.js +1 -1
  172. package/dist/auth/reset-password-page.js +1 -1
  173. package/dist/auth/sign-in-form.js +3 -3
  174. package/dist/auth/sign-up-code-form.js +2 -3
  175. package/dist/auth/sign-up-details-form.js +3 -4
  176. package/dist/auth/staff-sign-in-form.js +3 -3
  177. package/dist/calls/call-guests-panel.js +2 -2
  178. package/dist/calls/call-lobby-notice.js +1 -1
  179. package/dist/calls/call-mark.js +1 -1
  180. package/dist/calls/call-people.js +1 -1
  181. package/dist/calls/call-rings.js +1 -1
  182. package/dist/calls/call-tile.js +2 -2
  183. package/dist/calls/messages.js +2 -139
  184. package/dist/carousel/carousel-controls.js +4 -1
  185. package/dist/carousel/messages.js +2 -13
  186. package/dist/chat/chat-message.js +1 -1
  187. package/dist/chat/messages.js +2 -19
  188. package/dist/compact-table/compact-table.js +1 -1
  189. package/dist/compact-table/messages.js +2 -15
  190. package/dist/data-grid/cell-text.js +8 -7
  191. package/dist/data-grid/cells.js +9 -6
  192. package/dist/data-grid/grid-footer.js +1 -1
  193. package/dist/data-grid/grid-row.js +2 -2
  194. package/dist/data-grid/header-menu.js +1 -1
  195. package/dist/data-grid/messages.js +2 -49
  196. package/dist/data-grid/resize-handle.js +1 -1
  197. package/dist/data-grid/row-reorder.js +20 -5
  198. package/dist/filter-panel/active-filter-chips.js +1 -1
  199. package/dist/filter-panel/date-presets.js +2 -2
  200. package/dist/filter-panel/facet-combobox.js +1 -1
  201. package/dist/filter-panel/facet-group.js +1 -1
  202. package/dist/filter-panel/messages.js +2 -49
  203. package/dist/filter-panel/range-filter.js +1 -1
  204. package/dist/format/date.js +4 -4
  205. package/dist/format/messages.js +2 -21
  206. package/dist/format/money.js +1 -1
  207. package/dist/format/number.js +5 -2
  208. package/dist/forms/messages.js +2 -21
  209. package/dist/forms/public-form-page.js +1 -1
  210. package/dist/index.js +3 -3
  211. package/dist/inline-child-table/inline-child-table.js +19 -4
  212. package/dist/inline-child-table/line-row.js +2 -2
  213. package/dist/inline-child-table/messages.js +2 -51
  214. package/dist/invitations/link-notice.js +2 -3
  215. package/dist/invitations/messages.js +2 -21
  216. package/dist/invitations/pending-invitation-row.js +1 -1
  217. package/dist/lists/messages.js +2 -5
  218. package/dist/live/columns-from-model.js +14 -31
  219. package/dist/live/display-value.js +1 -1
  220. package/dist/live/messages.js +2 -15
  221. package/dist/live/value-color.js +13 -3
  222. package/dist/live/view-fields.js +4 -2
  223. package/dist/locale/en.js +1399 -0
  224. package/dist/locale/messages.js +38 -7
  225. package/dist/locale/nl.js +1399 -0
  226. package/dist/markdown/messages.js +2 -13
  227. package/dist/mentions/messages.js +2 -13
  228. package/dist/notifications/bell/messages.js +2 -35
  229. package/dist/notifications/bell/notification-item.js +1 -1
  230. package/dist/notifications/bell/unread-label.js +1 -1
  231. package/dist/organizations/invitation-page.js +32 -14
  232. package/dist/organizations/invitations-page.js +1 -1
  233. package/dist/organizations/members-page.js +2 -2
  234. package/dist/organizations/messages.js +2 -187
  235. package/dist/organizations/organization-page.js +4 -4
  236. package/dist/organizations/organizations-page.js +1 -1
  237. package/dist/package.js +1 -1
  238. package/dist/plugins/load-plugin.js +2 -2
  239. package/dist/plugins/messages.js +2 -33
  240. package/dist/plugins/plugin-notice.js +7 -5
  241. package/dist/primitives/badge.d.ts +2 -1
  242. package/dist/primitives/dialog.d.ts +7 -2
  243. package/dist/primitives/dialog.js +9 -4
  244. package/dist/primitives/messages.js +2 -13
  245. package/dist/primitives/token.js +1 -1
  246. package/dist/record-view/field.js +3 -3
  247. package/dist/record-view/messages.js +2 -37
  248. package/dist/record-view/record-header.js +4 -4
  249. package/dist/roles/messages.js +2 -11
  250. package/dist/shell/assets/app-CN_7en9q.js +8 -0
  251. package/dist/shell/assets/{calls-BIXaKTs0.js → calls-D5RK7EJu.js} +2 -2
  252. package/dist/shell/assets/export-worker-ClXdfeuq.js +15 -0
  253. package/dist/shell/assets/{index-BshKxX1Z.js → index-DMaCBpbN.js} +2 -2
  254. package/dist/shell/assets/index-Or2wt-ck.css +2 -0
  255. package/dist/shell/assets/{maplibre-CjNYwEqW.js → maplibre-CRmpQfDl.js} +3 -3
  256. package/dist/shell/assets/parse-worker-DxsmAjef.js +18 -0
  257. package/dist/shell/assets/preload-helper-BgLOXTzV.js +2 -0
  258. package/dist/shell/assets/{record-map-DjqQGqZ2.js → record-map-DsP4sXes.js} +2 -2
  259. package/dist/shell/assets/{records-map-D1SJKyvj.js → records-map-WFMHgKdf.js} +2 -2
  260. package/dist/shell/assets/shared-protobase-ui-CP2mMFbh.js +2 -0
  261. package/dist/shell/assets/vendor-Kvdo8Jrw.js +73 -0
  262. package/dist/shell/index.html +6 -6
  263. package/dist/shell/protobase.shell.json +2 -2
  264. package/dist/shell/protobase.sw.js +2 -2
  265. package/dist/shell-source-maps/assets/app-CN_7en9q.js.map +1 -0
  266. package/dist/shell-source-maps/assets/{calls-BIXaKTs0.js.map → calls-D5RK7EJu.js.map} +1 -1
  267. package/dist/shell-source-maps/assets/export-worker-ClXdfeuq.js.map +1 -0
  268. package/dist/shell-source-maps/assets/{index-BshKxX1Z.js.map → index-DMaCBpbN.js.map} +1 -1
  269. package/dist/shell-source-maps/assets/{maplibre-CjNYwEqW.js.map → maplibre-CRmpQfDl.js.map} +1 -1
  270. package/dist/shell-source-maps/assets/parse-worker-DxsmAjef.js.map +1 -0
  271. package/dist/shell-source-maps/assets/preload-helper-BgLOXTzV.js.map +1 -0
  272. package/dist/shell-source-maps/assets/{record-map-DjqQGqZ2.js.map → record-map-DsP4sXes.js.map} +1 -1
  273. package/dist/shell-source-maps/assets/{records-map-D1SJKyvj.js.map → records-map-WFMHgKdf.js.map} +1 -1
  274. package/dist/shell-source-maps/assets/shared-protobase-ui-CP2mMFbh.js.map +1 -0
  275. package/dist/shell-source-maps/assets/vendor-Kvdo8Jrw.js.map +1 -0
  276. package/dist/side-panel/messages.js +2 -5
  277. package/dist/status/messages.js +2 -59
  278. package/dist/status/status-dialog.js +1 -1
  279. package/dist/toasts/messages.js +2 -5
  280. package/dist/users/create-user-form.js +1 -1
  281. package/dist/users/messages.js +2 -49
  282. package/package.json +5 -4
  283. package/dist/app-shell/nav.js +0 -85
  284. package/dist/locale/slotted.js +0 -14
  285. package/dist/mocks/activity.js +0 -24
  286. package/dist/mocks/rng.js +0 -20
  287. package/dist/mocks/users.js +0 -63
  288. package/dist/shell/assets/app-CBYlZ19-.js +0 -9
  289. package/dist/shell/assets/export-worker-3e4Zsv0a.js +0 -3
  290. package/dist/shell/assets/index-BvT0X9o1.css +0 -2
  291. package/dist/shell/assets/parse-worker-UhbwEjS0.js +0 -6
  292. package/dist/shell/assets/preload-helper-SYSsmQ2O.js +0 -2
  293. package/dist/shell/assets/shared-protobase-ui-DibYt-TM.js +0 -2
  294. package/dist/shell/assets/vendor-xNCj9Gc_.js +0 -63
  295. package/dist/shell-source-maps/assets/app-CBYlZ19-.js.map +0 -1
  296. package/dist/shell-source-maps/assets/export-worker-3e4Zsv0a.js.map +0 -1
  297. package/dist/shell-source-maps/assets/parse-worker-UhbwEjS0.js.map +0 -1
  298. package/dist/shell-source-maps/assets/preload-helper-SYSsmQ2O.js.map +0 -1
  299. package/dist/shell-source-maps/assets/shared-protobase-ui-DibYt-TM.js.map +0 -1
  300. package/dist/shell-source-maps/assets/vendor-xNCj9Gc_.js.map +0 -1
@@ -1,66 +1,5 @@
1
- import { defineMessages } from "../locale/messages.js";
1
+ import { messages } from "../locale/messages.js";
2
2
  //#region src/app-shell/messages.ts
3
- const text = defineMessages({
4
- en: {
5
- navigation: "Navigation",
6
- resources: "Resources",
7
- breadcrumb: "Breadcrumb",
8
- tabs: "Tabs",
9
- more: "More",
10
- openNavigation: "Open navigation",
11
- backTo: (label) => `Back to ${label}`,
12
- search: "Search",
13
- closeSearch: "Close search",
14
- clearSearch: "Clear search",
15
- globalSearch: "Global search",
16
- searchResults: "Search results",
17
- searching: "Searching",
18
- noMatches: (query) => `No matches for “${query}”`,
19
- profileMenu: "Profile menu",
20
- organizations: "Organizations",
21
- roles: "Roles",
22
- signIn: "Sign in",
23
- signOut: "Sign out",
24
- theme: "Theme",
25
- light: "Light",
26
- dark: "Dark",
27
- system: "System",
28
- recent: (plural) => `Recent ${plural}`,
29
- loading: "Loading...",
30
- couldNotLoad: "Could not load",
31
- viewAll: "View all",
32
- couldNotSearch: (label) => `Could not search ${label.toLowerCase()}`
33
- },
34
- nl: {
35
- navigation: "Navigatie",
36
- resources: "Onderdelen",
37
- breadcrumb: "Kruimelpad",
38
- tabs: "Tabbladen",
39
- more: "Meer",
40
- openNavigation: "Navigatie openen",
41
- backTo: (label) => `Terug naar ${label}`,
42
- search: "Zoeken",
43
- closeSearch: "Zoeken sluiten",
44
- clearSearch: "Zoekopdracht wissen",
45
- globalSearch: "Overal zoeken",
46
- searchResults: "Zoekresultaten",
47
- searching: "Zoeken",
48
- noMatches: (query) => `Niets gevonden voor “${query}”`,
49
- profileMenu: "Profielmenu",
50
- organizations: "Organisaties",
51
- roles: "Rollen",
52
- signIn: "Inloggen",
53
- signOut: "Uitloggen",
54
- theme: "Thema",
55
- light: "Licht",
56
- dark: "Donker",
57
- system: "Systeem",
58
- recent: (plural) => `Recente ${plural}`,
59
- loading: "Laden...",
60
- couldNotLoad: "Kon niet laden",
61
- viewAll: "Alles bekijken",
62
- couldNotSearch: (label) => `Kon niet zoeken in ${label.toLowerCase()}`
63
- }
64
- });
3
+ const text = messages("app-shell");
65
4
  //#endregion
66
5
  export { text };
@@ -1,7 +1,7 @@
1
1
  import { cn } from "../lib/cn.js";
2
- import { text } from "./messages.js";
3
- import { Avatar } from "../primitives/avatar.js";
4
2
  import { Badge } from "../primitives/badge.js";
3
+ import { Avatar } from "../primitives/avatar.js";
4
+ import { text } from "./messages.js";
5
5
  import { SwitchGroup } from "./switch-group.js";
6
6
  import { ThemeSwitch } from "./theme-switch.js";
7
7
  import { useEffect, useRef, useState } from "react";
@@ -43,14 +43,14 @@ const SidebarGroup = ({ item, recent, mode, active, onNavigate }) => {
43
43
  type: "button",
44
44
  "aria-expanded": open,
45
45
  "aria-controls": listId,
46
- "aria-label": text("recent", item.label.toLowerCase()),
46
+ "aria-label": text("recent", { plural: item.label.toLowerCase() }),
47
47
  onClick: toggle,
48
48
  className: "absolute right-1 top-1/2 inline-flex size-6 -translate-y-1/2 items-center justify-center rounded text-faint-foreground hover:bg-muted hover:text-foreground",
49
49
  children: /* @__PURE__ */ jsx(ChevronRight, { className: cn("size-3.5 transition-transform", open && "rotate-90") })
50
50
  })]
51
51
  }), open && /* @__PURE__ */ jsxs("ul", {
52
52
  id: listId,
53
- "aria-label": text("recent", item.label.toLowerCase()),
53
+ "aria-label": text("recent", { plural: item.label.toLowerCase() }),
54
54
  className: cn("flex flex-col gap-0.5 border-l pl-1.5", subRowIndent[mode]),
55
55
  children: [
56
56
  recent.state === "loading" && /* @__PURE__ */ jsx("li", {
@@ -2,7 +2,6 @@ import { cn } from "../lib/cn.js";
2
2
  import { text } from "./messages.js";
3
3
  import { RouteLink } from "../primitives/route-link.js";
4
4
  import { Logo } from "./logo.js";
5
- import { navGroups } from "./nav.js";
6
5
  import { ThemeSwitch } from "./theme-switch.js";
7
6
  import { ProfileMenu } from "./profile-menu.js";
8
7
  import { SidebarCreateLink } from "./sidebar-create-link.js";
@@ -13,7 +12,7 @@ import { Fragment } from "react";
13
12
  import { LogIn } from "lucide-react";
14
13
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
15
14
  //#region src/app-shell/sidebar.tsx
16
- const Sidebar = ({ mode, activeItem, user, workspace, appName, appIcon, forceExpanded, profileMenuOpen, groups = navGroups, userMenu, account, onNavigate, onSignOut, signIn, organizations, roles, theme, status, sticky, logo: SidebarLogo = Logo, notice }) => {
15
+ const Sidebar = ({ mode, activeItem, user, workspace, appName, appIcon, forceExpanded, profileMenuOpen, groups = [], userMenu, account, onNavigate, onSignOut, signIn, organizations, roles, theme, status, sticky, logo: SidebarLogo = Logo, notice }) => {
17
16
  const expanding = mode === "icon-expand";
18
17
  const expanded = expanding && forceExpanded;
19
18
  const inline = isTextMode(mode) || expanding;
@@ -40,7 +40,7 @@ const TopBar = ({ breadcrumb, onNavigate, onBack, actions, onMenu, menuOpen, men
40
40
  }),
41
41
  back && /* @__PURE__ */ jsx("a", {
42
42
  href: back.href,
43
- "aria-label": text("backTo", back.label),
43
+ "aria-label": text("backTo", { label: back.label }),
44
44
  onClick: (event) => {
45
45
  const follow = onBack ?? onNavigate;
46
46
  if (!follow || !inApp(event)) return;
@@ -1,26 +1,5 @@
1
- import { defineMessages } from "../locale/messages.js";
1
+ import { messages } from "../locale/messages.js";
2
2
  //#region src/assistant-dock/messages.ts
3
- const text = defineMessages({
4
- en: {
5
- askQuestion: "Ask a question...",
6
- assistant: "Assistant",
7
- reconnecting: "Reconnecting...",
8
- empty: "Ask a question about this app or its data.",
9
- noAnswer: "The assistant did not answer",
10
- backendNoAnswer: "The assistant backend did not answer",
11
- couldNotDraw: "It could not be drawn.",
12
- cannotShowLive: "This version of the app cannot show it live."
13
- },
14
- nl: {
15
- askQuestion: "Stel een vraag...",
16
- assistant: "Assistent",
17
- reconnecting: "Opnieuw verbinden...",
18
- empty: "Stel een vraag over deze app of de gegevens ervan.",
19
- noAnswer: "De assistent antwoordde niet",
20
- backendNoAnswer: "De backend van de assistent antwoordde niet",
21
- couldNotDraw: "Dit kon niet worden getekend.",
22
- cannotShowLive: "Deze versie van de app kan dit niet live tonen."
23
- }
24
- });
3
+ const text = messages("assistant-dock");
25
4
  //#endregion
26
5
  export { text };
@@ -142,7 +142,7 @@ const useAuthPage = (workspace, children) => {
142
142
  className: "flex h-full min-h-48 flex-col items-center justify-center gap-3 p-8 text-center",
143
143
  children: [/* @__PURE__ */ jsx("p", {
144
144
  className: "text-muted-foreground",
145
- children: text("cannotReach", state.message)
145
+ children: text("cannotReach", { message: state.message })
146
146
  }), /* @__PURE__ */ jsx(Button, {
147
147
  onClick: recheck,
148
148
  children: text("tryAgain")
@@ -1,85 +1,6 @@
1
- import { defineMessages } from "../locale/messages.js";
1
+ import { messages as messages$1 } from "../locale/messages.js";
2
2
  //#region src/auth/auth-messages.ts
3
- const text = defineMessages({
4
- en: {
5
- tooManyRequests: "Too many attempts. Wait a minute and try again.",
6
- passkeyClosed: "The passkey prompt closed before it finished. Try again.",
7
- wrongEmailOrPassword: "The email or password is not right.",
8
- wrongPassword: "The password is not right.",
9
- wrongCode: "The code is not right.",
10
- wrongOrExpiredCode: "The code is not right, or has expired. Ask for a new one.",
11
- codeExpired: "The code has expired. Ask for a new one.",
12
- tooManyCodes: "Too many wrong codes. Ask for a new one.",
13
- wrongBackupCode: "The backup code is not right, or was used before.",
14
- tooManyCodesSignIn: "Too many wrong codes. Sign in again.",
15
- locked: "Too many wrong codes. Wait 15 minutes and try again.",
16
- tooSlow: "This sign-in took too long. Sign in again.",
17
- passkeyNotFound: "This passkey is not registered for an account here.",
18
- passkeyFailed: "The passkey could not be checked. Try again.",
19
- passkeyAdded: "This passkey is added already.",
20
- notFresh: "For this change, sign out and sign in again first.",
21
- staffPermissionMissing: "Your staff account has no permission to sign in as people here.",
22
- staffNotStrong: "Sign in to your staff account with a passkey or a second step, then try again.",
23
- staffStale: "Your staff sign-in is too old. Sign in to your staff account again.",
24
- staffExpired: "This staff sign-in took too long or was used already. Start again.",
25
- staffProviderFailed: "The staff sign-in did not go through at the provider. Try again.",
26
- staffUserUnavailable: "There is no account with this address, or it is disabled.",
27
- staffReasonRequired: "Say why you sign in as this person, in at least 10 characters.",
28
- staffForbidden: "Staff sign-in is turned off for this app.",
29
- untrustedCallback: "This page is not on an address the server trusts.",
30
- staffFailed: "The staff sign-in did not go through. Try again.",
31
- passwordLeaked: "This password appears in a known data breach. Choose a different one."
32
- },
33
- nl: {
34
- tooManyRequests: "Te veel pogingen. Wacht een minuut en probeer het opnieuw.",
35
- passkeyClosed: "De passkey-vraag sloot voordat die klaar was. Probeer het opnieuw.",
36
- wrongEmailOrPassword: "Het e-mailadres of wachtwoord klopt niet.",
37
- wrongPassword: "Het wachtwoord klopt niet.",
38
- wrongCode: "De code klopt niet.",
39
- wrongOrExpiredCode: "De code klopt niet, of is verlopen. Vraag een nieuwe aan.",
40
- codeExpired: "De code is verlopen. Vraag een nieuwe aan.",
41
- tooManyCodes: "Te veel verkeerde codes. Vraag een nieuwe aan.",
42
- wrongBackupCode: "De back-upcode klopt niet, of is al eerder gebruikt.",
43
- tooManyCodesSignIn: "Te veel verkeerde codes. Log opnieuw in.",
44
- locked: "Te veel verkeerde codes. Wacht 15 minuten en probeer het opnieuw.",
45
- tooSlow: "Deze inlogpoging duurde te lang. Log opnieuw in.",
46
- passkeyNotFound: "Deze passkey hoort hier bij geen enkel account.",
47
- passkeyFailed: "De passkey kon niet worden gecontroleerd. Probeer het opnieuw.",
48
- passkeyAdded: "Deze passkey is al toegevoegd.",
49
- notFresh: "Log voor deze wijziging eerst uit en opnieuw in.",
50
- staffPermissionMissing: "Je medewerkersaccount mag hier niet als iemand anders inloggen.",
51
- staffNotStrong: "Log in op je medewerkersaccount met een passkey of een tweede stap, en probeer het dan opnieuw.",
52
- staffStale: "Je inlog als medewerker is te oud. Log opnieuw in op je medewerkersaccount.",
53
- staffExpired: "Deze inlog als medewerker duurde te lang of is al gebruikt. Begin opnieuw.",
54
- staffProviderFailed: "De inlog als medewerker lukte niet bij de provider. Probeer het opnieuw.",
55
- staffUserUnavailable: "Er is geen account met dit adres, of het is uitgeschakeld.",
56
- staffReasonRequired: "Zeg in minstens 10 tekens waarom je als deze persoon inlogt.",
57
- staffForbidden: "Inloggen als medewerker staat uit voor deze app.",
58
- untrustedCallback: "Deze pagina staat niet op een adres dat de server vertrouwt.",
59
- staffFailed: "De inlog als medewerker lukte niet. Probeer het opnieuw.",
60
- passwordLeaked: "Dit wachtwoord komt voor in een bekend datalek. Kies een ander wachtwoord."
61
- }
62
- });
63
- const providerText = defineMessages({
64
- en: {
65
- signupDisabled: (name) => `No account here belongs to this ${name} account. Ask an admin to add you, or sign in another way.`,
66
- notLinked: (name) => `Your ${name} account is not linked to your account here. Sign in another way, then connect ${name} on your account page.`,
67
- linkedToOther: (name) => `This ${name} account is linked to someone else here already.`,
68
- couldNotLink: (name) => `Your ${name} account could not be linked. Try again.`,
69
- accessDenied: (name) => `${name} did not let you in, or you cancelled.`,
70
- domainNotAllowed: (name) => `${name} signed you in with an address this app does not accept from it. Sign in another way.`,
71
- providerFailed: (name) => `Signing in with ${name} did not go through. Try again.`
72
- },
73
- nl: {
74
- signupDisabled: (name) => `Geen account hier hoort bij dit ${name}-account. Vraag een beheerder om je toe te voegen, of log op een andere manier in.`,
75
- notLinked: (name) => `Je ${name}-account is niet gekoppeld aan je account hier. Log op een andere manier in en koppel ${name} dan op je accountpagina.`,
76
- linkedToOther: (name) => `Dit ${name}-account is hier al aan iemand anders gekoppeld.`,
77
- couldNotLink: (name) => `Je ${name}-account kon niet worden gekoppeld. Probeer het opnieuw.`,
78
- accessDenied: (name) => `${name} liet je niet binnen, of je hebt geannuleerd.`,
79
- domainNotAllowed: (name) => `${name} logde je in met een adres dat deze app daarvan niet accepteert. Log op een andere manier in.`,
80
- providerFailed: (name) => `Inloggen met ${name} lukte niet. Probeer het opnieuw.`
81
- }
82
- });
3
+ const text = messages$1("auth/errors");
83
4
  const messages = {
84
5
  INVALID_EMAIL_OR_PASSWORD: "wrongEmailOrPassword",
85
6
  INVALID_PASSWORD: "wrongPassword",
@@ -131,14 +52,14 @@ const staffSignInMessage = (failure) => {
131
52
  return failure.status === 429 ? text("tooManyRequests") : failure.message;
132
53
  };
133
54
  const providerMessages = {
134
- signup_disabled: (name) => providerText("signupDisabled", name),
135
- account_not_linked: (name) => providerText("notLinked", name),
136
- account_already_linked_to_different_user: (name) => providerText("linkedToOther", name),
137
- unable_to_link_account: (name) => providerText("couldNotLink", name),
138
- access_denied: (name) => providerText("accessDenied", name),
139
- EMAIL_DOMAIN_NOT_ALLOWED: (name) => providerText("domainNotAllowed", name)
55
+ signup_disabled: (name) => text("signupDisabled", { name }),
56
+ account_not_linked: (name) => text("notLinked", { name }),
57
+ account_already_linked_to_different_user: (name) => text("linkedToOther", { name }),
58
+ unable_to_link_account: (name) => text("couldNotLink", { name }),
59
+ access_denied: (name) => text("accessDenied", { name }),
60
+ EMAIL_DOMAIN_NOT_ALLOWED: (name) => text("domainNotAllowed", { name })
140
61
  };
141
62
  /** Why signing in or linking with the provider `name` did not go through, from the code it came back with. */
142
- const providerMessage = (code, name) => providerMessages[code]?.(name) ?? providerText("providerFailed", name);
63
+ const providerMessage = (code, name) => providerMessages[code]?.(name) ?? text("providerFailed", { name });
143
64
  //#endregion
144
65
  export { authMessage, providerMessage, signInMessage, staffSignInMessage };
@@ -1,5 +1,4 @@
1
1
  import { text } from "./messages.js";
2
- import { slotted } from "../locale/slotted.js";
3
2
  import { CodeForm } from "./code-form.js";
4
3
  import { Fragment, jsx } from "react/jsx-runtime";
5
4
  //#region src/auth/email-code-form.tsx
@@ -7,10 +6,10 @@ import { Fragment, jsx } from "react/jsx-runtime";
7
6
  const EmailCodeForm = ({ email, onBack, ...rest }) => /* @__PURE__ */ jsx(CodeForm, {
8
7
  title: text("checkEmail"),
9
8
  description: text("signInCodeDescription"),
10
- explanation: /* @__PURE__ */ jsx(Fragment, { children: slotted(text("signInCodeSent"), /* @__PURE__ */ jsx("span", {
9
+ explanation: /* @__PURE__ */ jsx(Fragment, { children: text.rich("signInCodeSent", { email: /* @__PURE__ */ jsx("span", {
11
10
  className: "font-medium text-foreground",
12
11
  children: email
13
- })) }),
12
+ }) }) }),
14
13
  submitLabel: text("signIn"),
15
14
  onChangeAddress: onBack,
16
15
  changeAddressLabel: text("backToSignIn"),
@@ -1,9 +1,8 @@
1
1
  import { text } from "./messages.js";
2
2
  import { cn } from "../lib/cn.js";
3
3
  import { Button, buttonClass } from "../primitives/button.js";
4
- import { Input } from "../primitives/input.js";
5
4
  import { RouteLink } from "../primitives/route-link.js";
6
- import { slotted } from "../locale/slotted.js";
5
+ import { Input } from "../primitives/input.js";
7
6
  import { AuthLayout } from "./auth-layout.js";
8
7
  import { useState } from "react";
9
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -14,10 +13,10 @@ const ForgotPasswordForm = ({ onSubmit, back, busy, error, sentTo }) => {
14
13
  title: text("checkEmail"),
15
14
  children: [/* @__PURE__ */ jsx("p", {
16
15
  className: "text-muted-foreground",
17
- children: slotted(text("resetSent"), /* @__PURE__ */ jsx("span", {
16
+ children: text.rich("resetSent", { email: /* @__PURE__ */ jsx("span", {
18
17
  className: "font-medium text-foreground",
19
18
  children: sentTo
20
- }))
19
+ }) })
21
20
  }), /* @__PURE__ */ jsx(RouteLink, {
22
21
  to: back,
23
22
  className: cn(buttonClass({ variant: "primary" }), "mt-4 min-h-10 w-full"),
@@ -1,206 +1,5 @@
1
- import { defineMessages } from "../locale/messages.js";
1
+ import { messages } from "../locale/messages.js";
2
2
  //#region src/auth/messages.ts
3
- const text = defineMessages({
4
- en: {
5
- loading: "Loading",
6
- cannotReach: (message) => `Cannot reach the server: ${message}`,
7
- tryAgain: "Try again",
8
- passwordChanged: "Your password is changed. Sign in with the new one.",
9
- noAnswer: "The server did not answer",
10
- code: "Code",
11
- backupCode: "Backup code",
12
- email: "Email",
13
- password: "Password",
14
- passwordOptional: "Password (optional)",
15
- signIn: "Sign in",
16
- signOut: "Sign out",
17
- continue: "Continue",
18
- backToSignIn: "Back to sign in",
19
- useAnotherAddress: "Use another address",
20
- checkEmail: "Check your email",
21
- newCodeSent: "A new code is on its way. Only the newest one works.",
22
- sendNewCode: "Send a new code",
23
- sendNewCodeIn: (seconds) => `Send a new code in ${seconds}s`,
24
- signInCodeDescription: "Enter the code we sent to sign in.",
25
- signInCodeSent: "If {} has an account, a 6-digit code is on its way. It works for 5 minutes, once.",
26
- signUpCodeDescription: "Enter the code we sent to create your account.",
27
- signUpCodeSent: "A 6-digit code is on its way to {}. It works for 5 minutes, once. If the address has an account already, the email says so instead.",
28
- noAdminTitle: "No admin yet",
29
- noAdminDescription: "This Protobase has no users to sign in with.",
30
- noAdminExplanation: "Run this in the terminal where Protobase runs, then reload. The first admin is created on the server, not in the browser, so nobody else can claim a fresh URL.",
31
- copyCommand: "Copy command",
32
- firstAdminExplanation: "The first user is added in the Protobase Cloud console, not in the browser, so nobody else can claim a fresh URL. Add yourself there, then reload.",
33
- firstAdminLink: "Add your first user in the Protobase Cloud console",
34
- reload: "Reload",
35
- tooManyRequests: "Too many requests. Wait a minute and try again.",
36
- tooManyAttempts: "Too many attempts. Wait a minute and try again.",
37
- resetTitle: "Reset your password",
38
- resetDescription: "We email you a link to choose a new one.",
39
- sendResetLink: "Send reset link",
40
- resetSent: "If {} has an account, an email with a link to choose a new password is on its way. The link works once, for a limited time.",
41
- linkExpiredTitle: "This link no longer works",
42
- linkExpiredExplanation: "A reset link works once, for a limited time. Ask for a new one to choose your password.",
43
- sendNewLink: "Send a new link",
44
- passwordsDiffer: "The passwords are not the same.",
45
- choosePassword: "Choose a new password",
46
- atLeast: (length) => `At least ${length} characters.`,
47
- useAtLeast: (length) => `Use at least ${length} characters.`,
48
- passwordTooLong: "That password is too long.",
49
- newPassword: "New password",
50
- repeatPassword: "Repeat new password",
51
- setPassword: "Set new password",
52
- signingInWith: (name) => `Signing in with ${name}`,
53
- takingYouTo: (name) => `Taking you to ${name}…`,
54
- providerNotOffered: (name) => `Signing in with ${name} is not offered here. Sign in another way.`,
55
- turnOnTwoFactor: "Turn on two-factor authentication",
56
- addPasskey: "Add a passkey",
57
- requiredForEveryAccount: "This app requires it for every account.",
58
- passkeyExplanation: "A passkey signs you in with Face ID, Touch ID, Windows Hello, your phone or a security key. Your browser asks which one to use.",
59
- couldNotReadAccount: "Could not read your account",
60
- signInTitle: "Sign in to Protobase",
61
- continueWith: (name) => `Continue with ${name}`,
62
- signInWithPasskey: "Sign in with a passkey",
63
- passkeyFor: (domain) => `Use a passkey made for ${domain}`,
64
- or: "or",
65
- emailSignInCode: "Email me a sign-in code",
66
- usePassword: "Use a password",
67
- forgotPassword: "Forgot password?",
68
- newHere: "New here?",
69
- haveAccount: "Have an account?",
70
- createAnAccount: "Create an account",
71
- browse: "Continue without signing in",
72
- notNow: "Not now",
73
- detailsTitle: "Your details",
74
- detailsDescription: "One last step to create your account.",
75
- yourName: "Your name",
76
- codeWasRight: "The code was right: the account is for {}.",
77
- withoutPassword: " Without one, you sign in with a code we email you.",
78
- createAccount: "Create account",
79
- codeToConfirm: "We email you a code to make sure the address is yours.",
80
- emailCode: "Email me a code",
81
- browseWithoutAccount: "Continue without an account",
82
- staffTitle: "Staff sign-in",
83
- staffUnavailable: "Staff of the team that runs this app cannot sign in as people here.",
84
- signInAsPerson: "Sign in as a person",
85
- forStaffOf: (operator) => `For staff of ${operator}, to help someone with this app.`,
86
- theirEmail: "Their email",
87
- reason: "Reason",
88
- reasonExample: "Ticket 4211: the invoice totals look wrong",
89
- staffExplanation: (operator) => `You sign in at ${operator} with a passkey or a second step. The session is short, shows a banner, and cannot change their sign-in. The app's admins see who signed in as whom, and why.`,
90
- totpInstruction: "Enter the 6-digit code from your authenticator app.",
91
- otpInstruction: "Enter the 6-digit code we emailed you. It works for 5 minutes.",
92
- backupInstruction: "Enter one of the backup codes you saved when you set up the authenticator app. Each works once.",
93
- twoFactorTitle: "Two-factor authentication",
94
- twoFactorDescription: "One more step to sign in.",
95
- codeToFinish: "We email you a code to finish signing in.",
96
- trustBrowser: "Trust this browser",
97
- trustBrowserFor: "Don't ask again in this browser for 30 days",
98
- verify: "Verify",
99
- useAuthenticator: "Use the authenticator app",
100
- emailCodeInstead: "Email me a code instead",
101
- useBackupCode: "Use a backup code",
102
- admin: "Admin"
103
- },
104
- nl: {
105
- loading: "Laden",
106
- cannotReach: (message) => `Kan de server niet bereiken: ${message}`,
107
- tryAgain: "Opnieuw proberen",
108
- passwordChanged: "Je wachtwoord is gewijzigd. Log in met het nieuwe.",
109
- noAnswer: "De server antwoordde niet",
110
- code: "Code",
111
- backupCode: "Back-upcode",
112
- email: "E-mailadres",
113
- password: "Wachtwoord",
114
- passwordOptional: "Wachtwoord (optioneel)",
115
- signIn: "Inloggen",
116
- signOut: "Uitloggen",
117
- continue: "Doorgaan",
118
- backToSignIn: "Terug naar inloggen",
119
- useAnotherAddress: "Een ander adres gebruiken",
120
- checkEmail: "Kijk in je e-mail",
121
- newCodeSent: "Er is een nieuwe code onderweg. Alleen de nieuwste werkt.",
122
- sendNewCode: "Nieuwe code sturen",
123
- sendNewCodeIn: (seconds) => `Nieuwe code sturen over ${seconds}s`,
124
- signInCodeDescription: "Vul de code in die we stuurden om in te loggen.",
125
- signInCodeSent: "Als {} een account heeft, is er een code van 6 cijfers onderweg. Die werkt 5 minuten, één keer.",
126
- signUpCodeDescription: "Vul de code in die we stuurden om je account te maken.",
127
- signUpCodeSent: "Er is een code van 6 cijfers onderweg naar {}. Die werkt 5 minuten, één keer. Heeft het adres al een account, dan staat dat in de e-mail.",
128
- noAdminTitle: "Nog geen beheerder",
129
- noAdminDescription: "Deze Protobase heeft geen gebruikers om mee in te loggen.",
130
- noAdminExplanation: "Voer dit uit in de terminal waar Protobase draait en laad de pagina daarna opnieuw. De eerste beheerder wordt op de server gemaakt, niet in de browser, zodat niemand anders een nieuwe URL kan opeisen.",
131
- copyCommand: "Opdracht kopiëren",
132
- firstAdminExplanation: "De eerste gebruiker wordt in de Protobase Cloud-console toegevoegd, niet in de browser, zodat niemand anders een nieuwe URL kan opeisen. Voeg jezelf daar toe en laad de pagina daarna opnieuw.",
133
- firstAdminLink: "Voeg je eerste gebruiker toe in de Protobase Cloud-console",
134
- reload: "Opnieuw laden",
135
- tooManyRequests: "Te veel verzoeken. Wacht een minuut en probeer het opnieuw.",
136
- tooManyAttempts: "Te veel pogingen. Wacht een minuut en probeer het opnieuw.",
137
- resetTitle: "Je wachtwoord herstellen",
138
- resetDescription: "We mailen je een link om een nieuw te kiezen.",
139
- sendResetLink: "Herstellink sturen",
140
- resetSent: "Als {} een account heeft, is er een e-mail onderweg met een link om een nieuw wachtwoord te kiezen. De link werkt één keer, een beperkte tijd.",
141
- linkExpiredTitle: "Deze link werkt niet meer",
142
- linkExpiredExplanation: "Een herstellink werkt één keer, een beperkte tijd. Vraag een nieuwe aan om je wachtwoord te kiezen.",
143
- sendNewLink: "Nieuwe link sturen",
144
- passwordsDiffer: "De wachtwoorden zijn niet hetzelfde.",
145
- choosePassword: "Kies een nieuw wachtwoord",
146
- atLeast: (length) => `Minstens ${length} tekens.`,
147
- useAtLeast: (length) => `Gebruik minstens ${length} tekens.`,
148
- passwordTooLong: "Dat wachtwoord is te lang.",
149
- newPassword: "Nieuw wachtwoord",
150
- repeatPassword: "Nieuw wachtwoord herhalen",
151
- setPassword: "Nieuw wachtwoord instellen",
152
- signingInWith: (name) => `Inloggen met ${name}`,
153
- takingYouTo: (name) => `Je gaat naar ${name}…`,
154
- providerNotOffered: (name) => `Inloggen met ${name} kan hier niet. Log op een andere manier in.`,
155
- turnOnTwoFactor: "Tweestapsverificatie aanzetten",
156
- addPasskey: "Passkey toevoegen",
157
- requiredForEveryAccount: "Deze app vraagt het voor elk account.",
158
- passkeyExplanation: "Met een passkey log je in met Face ID, Touch ID, Windows Hello, je telefoon of een beveiligingssleutel. Je browser vraagt welke je gebruikt.",
159
- couldNotReadAccount: "Kon je account niet lezen",
160
- signInTitle: "Inloggen bij Protobase",
161
- continueWith: (name) => `Doorgaan met ${name}`,
162
- signInWithPasskey: "Inloggen met een passkey",
163
- passkeyFor: (domain) => `Een passkey voor ${domain} gebruiken`,
164
- or: "of",
165
- emailSignInCode: "Mail me een inlogcode",
166
- usePassword: "Een wachtwoord gebruiken",
167
- forgotPassword: "Wachtwoord vergeten?",
168
- newHere: "Nieuw hier?",
169
- haveAccount: "Heb je een account?",
170
- createAnAccount: "Account maken",
171
- browse: "Doorgaan zonder in te loggen",
172
- notNow: "Niet nu",
173
- detailsTitle: "Je gegevens",
174
- detailsDescription: "Nog één stap om je account te maken.",
175
- yourName: "Je naam",
176
- codeWasRight: "De code klopte: het account is voor {}.",
177
- withoutPassword: " Zonder wachtwoord log je in met een code die we je mailen.",
178
- createAccount: "Account maken",
179
- codeToConfirm: "We mailen je een code om te controleren dat het adres van jou is.",
180
- emailCode: "Mail me een code",
181
- browseWithoutAccount: "Doorgaan zonder account",
182
- staffTitle: "Inloggen als medewerker",
183
- staffUnavailable: "Medewerkers van het team dat deze app beheert, kunnen hier niet als iemand anders inloggen.",
184
- signInAsPerson: "Inloggen als iemand anders",
185
- forStaffOf: (operator) => `Voor medewerkers van ${operator}, om iemand met deze app te helpen.`,
186
- theirEmail: "Hun e-mailadres",
187
- reason: "Reden",
188
- reasonExample: "Ticket 4211: de factuurtotalen kloppen niet",
189
- staffExplanation: (operator) => `Je logt in bij ${operator} met een passkey of een tweede stap. De sessie is kort, toont een balk en kan hun inlog niet wijzigen. De beheerders van de app zien wie als wie inlogde, en waarom.`,
190
- totpInstruction: "Vul de code van 6 cijfers uit je authenticator-app in.",
191
- otpInstruction: "Vul de code van 6 cijfers in die we je mailden. Die werkt 5 minuten.",
192
- backupInstruction: "Vul een van de back-upcodes in die je bewaarde toen je de authenticator-app instelde. Elke code werkt één keer.",
193
- twoFactorTitle: "Tweestapsverificatie",
194
- twoFactorDescription: "Nog één stap om in te loggen.",
195
- codeToFinish: "We mailen je een code om het inloggen af te ronden.",
196
- trustBrowser: "Deze browser vertrouwen",
197
- trustBrowserFor: "Niet meer vragen in deze browser, 30 dagen lang",
198
- verify: "Controleren",
199
- useAuthenticator: "De authenticator-app gebruiken",
200
- emailCodeInstead: "Mail me liever een code",
201
- useBackupCode: "Een back-upcode gebruiken",
202
- admin: "Beheerder"
203
- }
204
- });
3
+ const text = messages("auth");
205
4
  //#endregion
206
5
  export { text };
@@ -10,7 +10,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
10
10
  //#region src/auth/provider-sign-in-page.tsx
11
11
  /** What the page shows while the browser leaves for the provider `name`. */
12
12
  const ProviderRedirect = ({ name, workspace }) => /* @__PURE__ */ jsx(AuthLayout, {
13
- title: text("signingInWith", name),
13
+ title: text("signingInWith", { name }),
14
14
  description: workspace,
15
15
  children: /* @__PURE__ */ jsxs("p", {
16
16
  role: "status",
@@ -18,7 +18,7 @@ const ProviderRedirect = ({ name, workspace }) => /* @__PURE__ */ jsx(AuthLayout
18
18
  children: [
19
19
  /* @__PURE__ */ jsx(Spinner, {}),
20
20
  " ",
21
- text("takingYouTo", name)
21
+ text("takingYouTo", { name })
22
22
  ]
23
23
  })
24
24
  });
@@ -34,7 +34,7 @@ const ProviderSignInPage = ({ provider, workspace, onFailed }) => {
34
34
  useEffect(() => {
35
35
  if (started.current) return;
36
36
  started.current = true;
37
- if (!offered) return onFailed(text("providerNotOffered", name));
37
+ if (!offered) return onFailed(text("providerNotOffered", { name }));
38
38
  signInSocial(provider).catch((failure) => {
39
39
  if (!(failure instanceof AuthError)) throw failure;
40
40
  onFailed(signInMessage(failure));
@@ -23,7 +23,7 @@ const ResendCodeButton = ({ onResend, cooldown = 30, disabled }) => {
23
23
  onResend();
24
24
  },
25
25
  className: "min-h-10",
26
- children: left > 0 ? text("sendNewCodeIn", left) : text("sendNewCode")
26
+ children: left > 0 ? text("sendNewCodeIn", { seconds: left }) : text("sendNewCode")
27
27
  });
28
28
  };
29
29
  //#endregion
@@ -31,7 +31,7 @@ const ResetPasswordForm = ({ onSubmit, invalidLink, onRequestNewLink, onBack, bu
31
31
  const shown = mismatch ? text("passwordsDiffer") : error;
32
32
  return /* @__PURE__ */ jsx(AuthLayout, {
33
33
  title: text("choosePassword"),
34
- description: text("atLeast", 12),
34
+ description: text("atLeast", { length: 12 }),
35
35
  children: /* @__PURE__ */ jsxs("form", {
36
36
  className: "flex flex-col gap-4",
37
37
  onSubmit: (event) => {
@@ -9,7 +9,7 @@ import { jsx } from "react/jsx-runtime";
9
9
  /** Better Auth's answers to a new password, in words for the person at the keyboard. */
10
10
  const resetPasswordMessage = (error) => {
11
11
  if (error.status === 429) return text("tooManyAttempts");
12
- if (error.code === "PASSWORD_TOO_SHORT") return text("useAtLeast", 12);
12
+ if (error.code === "PASSWORD_TOO_SHORT") return text("useAtLeast", { length: 12 });
13
13
  if (error.code === "PASSWORD_TOO_LONG") return text("passwordTooLong");
14
14
  return authMessage(error);
15
15
  };
@@ -1,7 +1,7 @@
1
1
  import { text } from "./messages.js";
2
2
  import { Button } from "../primitives/button.js";
3
- import { Input } from "../primitives/input.js";
4
3
  import { RouteLink } from "../primitives/route-link.js";
4
+ import { Input } from "../primitives/input.js";
5
5
  import { AuthLayout } from "./auth-layout.js";
6
6
  import { ProviderIcon } from "./provider-icon.js";
7
7
  import { useRef, useState } from "react";
@@ -47,7 +47,7 @@ const SignInForm = ({ onSubmit, busy, error, workspace, notice, methods = ["pass
47
47
  onClick: () => onContinueWith?.(provider.id),
48
48
  disabled: busy,
49
49
  className: "min-h-10 w-full",
50
- children: [/* @__PURE__ */ jsx(ProviderIcon, { id: provider.id }), text("continueWith", provider.name)]
50
+ children: [/* @__PURE__ */ jsx(ProviderIcon, { id: provider.id }), text("continueWith", { name: provider.name })]
51
51
  }, provider.id)),
52
52
  withPasskey && /* @__PURE__ */ jsxs(Button, {
53
53
  onClick: () => onPasskey?.(),
@@ -61,7 +61,7 @@ const SignInForm = ({ onSubmit, busy, error, workspace, notice, methods = ["pass
61
61
  onClick: () => onPasskey?.(domain),
62
62
  disabled: busy,
63
63
  className: "w-full",
64
- children: text("passkeyFor", domain)
64
+ children: text("passkeyFor", { domain })
65
65
  }, domain))
66
66
  ]
67
67
  }), withPassword || withCode ? /* @__PURE__ */ jsx(Divider, {}) : error && /* @__PURE__ */ jsx("p", {
@@ -1,5 +1,4 @@
1
1
  import { text } from "./messages.js";
2
- import { slotted } from "../locale/slotted.js";
3
2
  import { CodeForm } from "./code-form.js";
4
3
  import { Fragment, jsx } from "react/jsx-runtime";
5
4
  //#region src/auth/sign-up-code-form.tsx
@@ -7,10 +6,10 @@ import { Fragment, jsx } from "react/jsx-runtime";
7
6
  const SignUpCodeForm = ({ email, onBack, ...rest }) => /* @__PURE__ */ jsx(CodeForm, {
8
7
  title: text("checkEmail"),
9
8
  description: text("signUpCodeDescription"),
10
- explanation: /* @__PURE__ */ jsx(Fragment, { children: slotted(text("signUpCodeSent"), /* @__PURE__ */ jsx("span", {
9
+ explanation: /* @__PURE__ */ jsx(Fragment, { children: text.rich("signUpCodeSent", { email: /* @__PURE__ */ jsx("span", {
11
10
  className: "font-medium text-foreground",
12
11
  children: email
13
- })) }),
12
+ }) }) }),
14
13
  submitLabel: text("continue"),
15
14
  onChangeAddress: onBack,
16
15
  changeAddressLabel: text("useAnotherAddress"),