@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
@@ -12,18 +12,27 @@ const runningText = (status, now) => {
12
12
  const label = text(status.updateStage);
13
13
  if (!status.updateStartedAt) return label;
14
14
  const seconds = Math.max(0, Math.floor((now - Date.parse(status.updateStartedAt)) / 1e3));
15
- return text("started", label, formatAgo(seconds));
15
+ return text("started", {
16
+ stage: label,
17
+ ago: formatAgo(seconds)
18
+ });
16
19
  };
17
20
  /** How far the running update is, or when the latest version will be applied on its own, in words; `now` in ms. */
18
21
  const nextUpdateText = (status, now = Date.now(), zone = viewerZone()) => {
19
22
  if (status.updating) return runningText(status, now);
20
- if (status.nextUpdateAt) return text("nextOn", text(status.policy), formatDateTime(Date.parse(status.nextUpdateAt), zone));
23
+ if (status.nextUpdateAt) return text("nextOn", {
24
+ policy: text(status.policy),
25
+ when: formatDateTime(Date.parse(status.nextUpdateAt), zone)
26
+ });
21
27
  return text(status.policy);
22
28
  };
23
29
  /** How the last update ended, in words, with the endpoint's message for the owner when it has one. */
24
30
  const lastUpdateText = (last, zone = viewerZone()) => {
25
31
  const when = formatDateTime(Date.parse(last.finishedAt), zone);
26
- const headline = text(last.outcome, last.toVersion, when);
32
+ const headline = text(last.outcome, {
33
+ version: last.toVersion,
34
+ when
35
+ });
27
36
  return last.message ? `${headline}: ${last.message}` : `${headline}.`;
28
37
  };
29
38
  /** Why "Update now" failed, in words: the endpoint's own message for a refusal, when it sends one. */
@@ -1,22 +1,5 @@
1
- import { defineMessages } from "../../locale/messages.js";
1
+ import { messages } from "../../locale/messages.js";
2
2
  //#region src/app/saved/messages.ts
3
- const text = defineMessages({
4
- en: {
5
- favorite: "Favorite",
6
- couldNotLoadYour: (plural) => `Could not load your ${plural}`,
7
- noneYet: (plural) => `No ${plural} yet.`,
8
- somethingWrong: "Something went wrong",
9
- couldNotTakeOff: "Could not take it off",
10
- couldNotSave: "Could not save it"
11
- },
12
- nl: {
13
- favorite: "Favoriet",
14
- couldNotLoadYour: (plural) => `Kon je ${plural} niet laden`,
15
- noneYet: (plural) => `Nog geen ${plural}.`,
16
- somethingWrong: "Er ging iets mis",
17
- couldNotTakeOff: "Kon het niet weghalen",
18
- couldNotSave: "Kon het niet bewaren"
19
- }
20
- });
3
+ const text = messages("app/saved");
21
4
  //#endregion
22
5
  export { text };
@@ -1,5 +1,5 @@
1
- import { Skeleton } from "../../primitives/skeleton.js";
2
1
  import { humanize } from "../../live/naming.js";
2
+ import { Skeleton } from "../../primitives/skeleton.js";
3
3
  import { ErrorBanner } from "../error-banner.js";
4
4
  import { PageHeader } from "../../app-shell/page-header.js";
5
5
  import { savedScope } from "./saved-records.js";
@@ -22,7 +22,7 @@ const SavedList = ({ model, view, target, children }) => {
22
22
  }), body]
23
23
  });
24
24
  if (saved.error) return frame(/* @__PURE__ */ jsx(ErrorBanner, {
25
- title: text("couldNotLoadYour", plural.toLowerCase()),
25
+ title: text("couldNotLoadYour", { plural: plural.toLowerCase() }),
26
26
  error: saved.error
27
27
  }));
28
28
  if (!saved.data) return frame(/* @__PURE__ */ jsx("div", {
@@ -32,7 +32,7 @@ const SavedList = ({ model, view, target, children }) => {
32
32
  const scope = savedScope(target, saved.data);
33
33
  if (!scope) return frame(/* @__PURE__ */ jsx("p", {
34
34
  className: "py-8 text-center text-muted-foreground",
35
- children: text("noneYet", plural.toLowerCase())
35
+ children: text("noneYet", { plural: plural.toLowerCase() })
36
36
  }));
37
37
  return children(scope);
38
38
  };
@@ -1,22 +1,5 @@
1
- import { defineMessages } from "../../locale/messages.js";
1
+ import { messages } from "../../locale/messages.js";
2
2
  //#region src/app/search/messages.ts
3
- const text = defineMessages({
4
- en: {
5
- search: "Search",
6
- searchOne: (name) => `Search ${name}`,
7
- searchTwo: (first, second) => `Search ${first} and ${second}`,
8
- searchMore: (first, second) => `Search ${first}, ${second} and more`,
9
- goTo: "Go to",
10
- create: "Create"
11
- },
12
- nl: {
13
- search: "Zoeken",
14
- searchOne: (name) => `Zoek in ${name}`,
15
- searchTwo: (first, second) => `Zoek in ${first} en ${second}`,
16
- searchMore: (first, second) => `Zoek in ${first}, ${second} en meer`,
17
- goTo: "Ga naar",
18
- create: "Maken"
19
- }
20
- });
3
+ const text = messages("app/search");
21
4
  //#endregion
22
5
  export { text };
@@ -18,7 +18,7 @@ const navigationHits = (meta, text$2, basePath = "") => {
18
18
  const view = meta.views[model.name];
19
19
  if (!view || view.nav?.hidden || !createOffered(view, meta.pages, meta.permissions[model.name] ?? allowEverything)) return [];
20
20
  const singular = view.names?.singular ?? humanize(model.name);
21
- const label = text("title", singular);
21
+ const label = text("title", { noun: singular });
22
22
  if (!matches(label, text$2) && !matches(singular, asked) && !matches(view.names?.plural ?? humanize(model.name), asked)) return [];
23
23
  return [{
24
24
  id: `new:${model.name}`,
@@ -19,9 +19,15 @@ const searchTargets = (meta) => Object.values(meta.resources).flatMap((model) =>
19
19
  const searchPlaceholder = (targets) => {
20
20
  const names = targets.map((target) => target.label.toLowerCase());
21
21
  if (names.length === 0) return text("search");
22
- if (names.length === 1) return text("searchOne", names[0]);
23
- if (names.length === 2) return text("searchTwo", names[0], names[1]);
24
- return text("searchMore", names[0], names[1]);
22
+ if (names.length === 1) return text("searchOne", { name: names[0] });
23
+ if (names.length === 2) return text("searchTwo", {
24
+ first: names[0],
25
+ second: names[1]
26
+ });
27
+ return text("searchMore", {
28
+ first: names[0],
29
+ second: names[1]
30
+ });
25
31
  };
26
32
  /** The list filter for the text: the server's partial-word `search(...)` over the resource's search fields. */
27
33
  const searchFilter = (text) => printFilter(where$1.search(text.trim()));
@@ -1,96 +1,5 @@
1
- import { defineMessages } from "../../locale/messages.js";
1
+ import { messages } from "../../locale/messages.js";
2
2
  //#region src/app/searches/messages.ts
3
- const text = defineMessages({
4
- en: {
5
- saveSearch: "Save search",
6
- saveAsNew: (noun) => `Save as new ${noun}`,
7
- updateName: (name) => `Update ${name}`,
8
- updateNameQuestion: (name) => `Update ${name}?`,
9
- updateNounQuestion: (noun) => `Update this ${noun}?`,
10
- couldNotLoadYour: (plural) => `Could not load your ${plural}`,
11
- noneYet: (plural) => `No ${plural} yet.`,
12
- somethingWrong: "Something went wrong",
13
- couldNotRename: "Could not rename the search",
14
- renameTitle: (title) => `Rename ${title}`,
15
- deleteTitle: (title) => `Delete ${title}`,
16
- unreadableFilter: "A filter that cannot be read",
17
- notFound: "Not found",
18
- noResource: "There is no resource called {}.",
19
- noSavedYet: (plural) => `No ${plural} yet. Filter the {} and save the search.`,
20
- on: "On",
21
- off: "Off",
22
- saved: (title) => `${title} saved`,
23
- couldNotChange: "Could not change the search",
24
- asMany: (plural) => `As many ${plural}`,
25
- more: (count, noun) => `${count} more ${noun}`,
26
- fewer: (count, noun) => `${count} fewer ${noun}`,
27
- cancel: "Cancel",
28
- save: "Save",
29
- optional: "Optional",
30
- added: "Added",
31
- removed: "Removed",
32
- changed: "Changed",
33
- filterChanges: "Filter changes",
34
- firstOf: (limit, total) => `The first ${limit} of ${total}.`,
35
- noPlural: (plural) => `No ${plural}.`,
36
- update: "Update",
37
- addedRemoved: (added, removed) => `${added} added, ${removed} removed`,
38
- searchSaved: "Search saved",
39
- openPlural: (plural) => `Open ${plural.toLowerCase()}`,
40
- couldNotSave: "Could not save the search",
41
- couldNotTakeOff: "Could not take the search off",
42
- searchUpdated: "Search updated",
43
- couldNotUpdate: "Could not update the search",
44
- noneMatch: (plural) => `No ${plural} match.`,
45
- noNew: (plural) => `No new ${plural} since you last looked.`,
46
- viewAll: "View all results",
47
- filters: "Filters"
48
- },
49
- nl: {
50
- saveSearch: "Zoekopdracht bewaren",
51
- saveAsNew: (noun) => `Als extra ${noun} bewaren`,
52
- updateName: (name) => `${name} bijwerken`,
53
- updateNameQuestion: (name) => `${name} bijwerken?`,
54
- updateNounQuestion: (noun) => `${noun} bijwerken?`,
55
- couldNotLoadYour: (plural) => `Kon je ${plural} niet laden`,
56
- noneYet: (plural) => `Nog geen ${plural}.`,
57
- somethingWrong: "Er ging iets mis",
58
- couldNotRename: "Kon de zoekopdracht niet hernoemen",
59
- renameTitle: (title) => `${title} hernoemen`,
60
- deleteTitle: (title) => `${title} verwijderen`,
61
- unreadableFilter: "Een filter dat niet kan worden gelezen",
62
- notFound: "Niet gevonden",
63
- noResource: "Er is geen onderdeel met de naam {}.",
64
- noSavedYet: (plural) => `Nog geen ${plural}. Filter de {} en bewaar de zoekopdracht.`,
65
- on: "Aan",
66
- off: "Uit",
67
- saved: (title) => `${title} bewaard`,
68
- couldNotChange: "Kon de zoekopdracht niet wijzigen",
69
- asMany: (plural) => `Evenveel ${plural}`,
70
- more: (count, noun) => `${count} ${noun} meer`,
71
- fewer: (count, noun) => `${count} ${noun} minder`,
72
- cancel: "Annuleren",
73
- save: "Bewaren",
74
- optional: "Optioneel",
75
- added: "Erbij",
76
- removed: "Eraf",
77
- changed: "Gewijzigd",
78
- filterChanges: "Wijzigingen in het filter",
79
- firstOf: (limit, total) => `De eerste ${limit} van ${total}.`,
80
- noPlural: (plural) => `Geen ${plural}.`,
81
- update: "Bijwerken",
82
- addedRemoved: (added, removed) => `${added} erbij, ${removed} eraf`,
83
- searchSaved: "Zoekopdracht bewaard",
84
- openPlural: (plural) => `${plural} openen`,
85
- couldNotSave: "Kon de zoekopdracht niet bewaren",
86
- couldNotTakeOff: "Kon de zoekopdracht niet weghalen",
87
- searchUpdated: "Zoekopdracht bijgewerkt",
88
- couldNotUpdate: "Kon de zoekopdracht niet bijwerken",
89
- noneMatch: (plural) => `Geen ${plural} gevonden.`,
90
- noNew: (plural) => `Geen nieuwe ${plural} sinds je laatst keek.`,
91
- viewAll: "Alle resultaten bekijken",
92
- filters: "Filters"
93
- }
94
- });
3
+ const text = messages("app/searches");
95
4
  //#endregion
96
5
  export { text };
@@ -51,7 +51,7 @@ const SaveSearchButton = ({ model, view, search, filter, chips, className }) =>
51
51
  });
52
52
  const opened = state.opened;
53
53
  if (opened) {
54
- const saveNewLabel = text("saveAsNew", state.noun);
54
+ const saveNewLabel = text("saveAsNew", { noun: state.noun });
55
55
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
56
56
  /* @__PURE__ */ jsxs(Button, {
57
57
  className,
@@ -63,7 +63,7 @@ const SaveSearchButton = ({ model, view, search, filter, chips, className }) =>
63
63
  "aria-hidden": true
64
64
  }), /* @__PURE__ */ jsx("span", {
65
65
  className: "max-w-60 truncate",
66
- children: text("updateName", opened.name ?? state.noun)
66
+ children: text("updateName", { name: opened.name ?? state.noun })
67
67
  })]
68
68
  }),
69
69
  /* @__PURE__ */ jsxs(Button, {
@@ -79,7 +79,7 @@ const SaveSearchButton = ({ model, view, search, filter, chips, className }) =>
79
79
  confirming && /* @__PURE__ */ jsx(UpdateSearchDialog, {
80
80
  model,
81
81
  view,
82
- title: opened.name ? text("updateNameQuestion", opened.name) : text("updateNounQuestion", state.noun),
82
+ title: opened.name ? text("updateNameQuestion", { name: opened.name }) : text("updateNounQuestion", { noun: state.noun }),
83
83
  before: opened.filter,
84
84
  after: filter,
85
85
  saveNewLabel,
@@ -1,7 +1,7 @@
1
1
  import { useAdminMeta } from "../meta-gate.js";
2
- import { Skeleton } from "../../primitives/skeleton.js";
3
2
  import { humanize } from "../../live/naming.js";
4
3
  import { recordKey } from "../../live/model-helpers.js";
4
+ import { Skeleton } from "../../primitives/skeleton.js";
5
5
  import { AppLink } from "../use-app-address.js";
6
6
  import { ErrorBanner } from "../error-banner.js";
7
7
  import { text } from "./messages.js";
@@ -51,13 +51,13 @@ const SavedSearchRows = ({ model, view, empty }) => {
51
51
  const plural = (view.names?.plural ?? humanize(model.name)).toLowerCase();
52
52
  if (!target) return null;
53
53
  if (saved.error) return /* @__PURE__ */ jsx(ErrorBanner, {
54
- title: text("couldNotLoadYour", plural),
54
+ title: text("couldNotLoadYour", { plural }),
55
55
  error: saved.error
56
56
  });
57
57
  if (!saved.data) return /* @__PURE__ */ jsx(Skeleton, { className: "h-40" });
58
58
  if (saved.data.length === 0) return /* @__PURE__ */ jsx("p", {
59
59
  className: "text-muted-foreground",
60
- children: empty ?? text("noneYet", plural)
60
+ children: empty ?? text("noneYet", { plural })
61
61
  });
62
62
  return /* @__PURE__ */ jsx("div", {
63
63
  className: "flex flex-col divide-y",
@@ -1,8 +1,8 @@
1
1
  import { useClient } from "../../data/api-provider.js";
2
2
  import { Button } from "../../primitives/button.js";
3
- import { useToast } from "../../toasts/toast-provider.js";
4
3
  import { humanize } from "../../live/naming.js";
5
4
  import { AppLink } from "../use-app-address.js";
5
+ import { useToast } from "../../toasts/toast-provider.js";
6
6
  import { useRefreshResource } from "../pages/use-layout-data.js";
7
7
  import { text } from "./messages.js";
8
8
  import { InlineFilterChips } from "./filter-chip-list.js";
@@ -78,7 +78,7 @@ const SavedSearchSection = ({ model, view, of, target, targetView, row, recordKe
78
78
  }),
79
79
  canRename && nameField && /* @__PURE__ */ jsx(Button, {
80
80
  variant: "ghost",
81
- "aria-label": text("renameTitle", title),
81
+ "aria-label": text("renameTitle", { title }),
82
82
  "aria-haspopup": "dialog",
83
83
  onClick: () => setRenaming(true),
84
84
  children: /* @__PURE__ */ jsx(Pencil, {
@@ -88,7 +88,7 @@ const SavedSearchSection = ({ model, view, of, target, targetView, row, recordKe
88
88
  }),
89
89
  onDelete && /* @__PURE__ */ jsx(Button, {
90
90
  variant: "ghost",
91
- "aria-label": text("deleteTitle", title),
91
+ "aria-label": text("deleteTitle", { title }),
92
92
  onClick: () => onDelete(title),
93
93
  children: /* @__PURE__ */ jsx(Trash2, {
94
94
  className: "size-3.5",
@@ -99,7 +99,7 @@ const SavedSearchSection = ({ model, view, of, target, targetView, row, recordKe
99
99
  })]
100
100
  }),
101
101
  renaming && nameField && /* @__PURE__ */ jsx(SearchNameDialog, {
102
- title: text("renameTitle", title),
102
+ title: text("renameTitle", { title }),
103
103
  chips,
104
104
  label: view.fields[nameField.name]?.label ?? humanize(nameField.name),
105
105
  required: !nameField.nullable,
@@ -1,10 +1,9 @@
1
1
  import { Notice, useAdminMeta, usePermissions } from "../meta-gate.js";
2
- import { Skeleton } from "../../primitives/skeleton.js";
3
2
  import { humanize } from "../../live/naming.js";
4
3
  import { recordKey } from "../../live/model-helpers.js";
4
+ import { Skeleton } from "../../primitives/skeleton.js";
5
5
  import { AppLink } from "../use-app-address.js";
6
6
  import { ErrorBanner } from "../error-banner.js";
7
- import { slotted } from "../../locale/slotted.js";
8
7
  import { can } from "../permissions.js";
9
8
  import { PageHeader } from "../../app-shell/page-header.js";
10
9
  import { text } from "./messages.js";
@@ -43,10 +42,10 @@ const SavedSearches = ({ model, view }) => {
43
42
  });
44
43
  if (!target) return frame(/* @__PURE__ */ jsx(Notice, {
45
44
  title: text("notFound"),
46
- children: slotted(text("noResource"), of.resource)
45
+ children: text.rich("noResource", { resource: of.resource })
47
46
  }));
48
47
  if (saved.error) return frame(/* @__PURE__ */ jsx(ErrorBanner, {
49
- title: text("couldNotLoadYour", plural.toLowerCase()),
48
+ title: text("couldNotLoadYour", { plural: plural.toLowerCase() }),
50
49
  error: saved.error
51
50
  }));
52
51
  if (!saved.data) return frame(/* @__PURE__ */ jsx("div", {
@@ -57,14 +56,17 @@ const SavedSearches = ({ model, view }) => {
57
56
  const searched = (targetView?.names?.plural ?? humanize(target.name)).toLowerCase();
58
57
  return frame(/* @__PURE__ */ jsx("p", {
59
58
  className: "py-8 text-center text-muted-foreground",
60
- children: slotted(text("noSavedYet", plural.toLowerCase()), /* @__PURE__ */ jsx(AppLink, {
61
- to: {
62
- kind: "list",
63
- resource: target.name
64
- },
65
- className: "font-medium text-primary-text hover:underline",
66
- children: searched
67
- }))
59
+ children: text.rich("noSavedYet", {
60
+ plural: plural.toLowerCase(),
61
+ list: /* @__PURE__ */ jsx(AppLink, {
62
+ to: {
63
+ kind: "list",
64
+ resource: target.name
65
+ },
66
+ className: "font-medium text-primary-text hover:underline",
67
+ children: searched
68
+ })
69
+ })
68
70
  }));
69
71
  }
70
72
  return frame(/* @__PURE__ */ jsx("div", {
@@ -1,7 +1,7 @@
1
1
  import { useClient } from "../../data/api-provider.js";
2
- import { useToast } from "../../toasts/toast-provider.js";
3
2
  import { humanize } from "../../live/naming.js";
4
3
  import { Switch } from "../../primitives/switch.js";
4
+ import { useToast } from "../../toasts/toast-provider.js";
5
5
  import { useRefreshResource } from "../pages/use-layout-data.js";
6
6
  import { text } from "./messages.js";
7
7
  import { useId } from "react";
@@ -51,7 +51,7 @@ const SearchControls = ({ model, view, recordKey, title, row, fields }) => {
51
51
  mutationFn: (patch) => client.update(model.name, recordKey, patch, row.etag ?? "*"),
52
52
  onSuccess: (_, patch) => toast.show({
53
53
  state: "success",
54
- title: text("saved", title),
54
+ title: text("saved", { title }),
55
55
  description: changed(model, view, patch)
56
56
  }),
57
57
  onError: (error) => toast.show({
@@ -91,9 +91,15 @@ const filterChanges = (before, after) => {
91
91
  /** The net change in the records a search finds: "5 more homes", "1 fewer home" or "As many homes". */
92
92
  const netChange = (added, removed, singular, plural) => {
93
93
  const net = added - removed;
94
- if (net === 0) return text("asMany", plural);
94
+ if (net === 0) return text("asMany", { plural });
95
95
  const noun = Math.abs(net) === 1 ? singular : plural;
96
- return net > 0 ? text("more", net, noun) : text("fewer", -net, noun);
96
+ return net > 0 ? text("more", {
97
+ count: net,
98
+ noun
99
+ }) : text("fewer", {
100
+ count: -net,
101
+ noun
102
+ });
97
103
  };
98
104
  //#endregion
99
105
  export { addedFilter, filterChanges, netChange, removedFilter };
@@ -1,9 +1,9 @@
1
1
  import { useClient } from "../../data/api-provider.js";
2
2
  import { Button } from "../../primitives/button.js";
3
3
  import { ResponsiveDialog } from "../../primitives/responsive-dialog.js";
4
- import { Skeleton } from "../../primitives/skeleton.js";
5
4
  import { humanize } from "../../live/naming.js";
6
5
  import { defaultOrderBy } from "../list-order.js";
6
+ import { Skeleton } from "../../primitives/skeleton.js";
7
7
  import { countQuery } from "../pages/use-layout-data.js";
8
8
  import { text } from "./messages.js";
9
9
  import { useFilterChips } from "./use-filter-chips.js";
@@ -87,11 +87,14 @@ const RecordsSide = ({ model, view, title, filter, total, plural }) => {
87
87
  }),
88
88
  total !== void 0 && total > shownLimit && /* @__PURE__ */ jsx("p", {
89
89
  className: "text-xs text-muted-foreground",
90
- children: text("firstOf", shownLimit, total)
90
+ children: text("firstOf", {
91
+ limit: shownLimit,
92
+ total
93
+ })
91
94
  }),
92
95
  filter === null || total === 0 ? /* @__PURE__ */ jsx("p", {
93
96
  className: "text-muted-foreground",
94
- children: text("noPlural", plural)
97
+ children: text("noPlural", { plural })
95
98
  }) : /* @__PURE__ */ jsx(EmbeddedList, {
96
99
  model,
97
100
  view,
@@ -152,7 +155,10 @@ const UpdateSearchDialog = ({ model, view, title, before, after, saveNewLabel, u
152
155
  children: netChange(addedCount, removedCount, singular, plural)
153
156
  }), /* @__PURE__ */ jsxs("span", {
154
157
  className: "text-muted-foreground",
155
- children: [": ", text("addedRemoved", count(addedCount, singular, plural), removedCount)]
158
+ children: [": ", text("addedRemoved", {
159
+ added: count(addedCount, singular, plural),
160
+ removed: removedCount
161
+ })]
156
162
  })] }) : /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-48" }),
157
163
  /* @__PURE__ */ jsx(RecordsSide, {
158
164
  model,
@@ -1,9 +1,9 @@
1
1
  import { useClient } from "../../data/api-provider.js";
2
2
  import { useAdminMeta } from "../meta-gate.js";
3
- import { useToast } from "../../toasts/toast-provider.js";
4
3
  import { humanize } from "../../live/naming.js";
5
4
  import { recordKey } from "../../live/model-helpers.js";
6
5
  import { useAppAddress } from "../use-app-address.js";
6
+ import { useToast } from "../../toasts/toast-provider.js";
7
7
  import { can } from "../permissions.js";
8
8
  import { useRefreshResource } from "../pages/use-layout-data.js";
9
9
  import { text } from "./messages.js";
@@ -51,7 +51,7 @@ const useSaveSearch = (search, filter) => {
51
51
  state: "success",
52
52
  title: text("searchSaved"),
53
53
  action: {
54
- label: text("openPlural", plural),
54
+ label: text("openPlural", { plural }),
55
55
  href: href({
56
56
  kind: "list",
57
57
  resource
@@ -37,8 +37,8 @@ const useSearchRow = ({ model, of, target, targetView, row, recordKey }) => {
37
37
  sort: unseen ? `${unseen.field} desc` : void 0,
38
38
  limit: of.limit,
39
39
  chips: name !== void 0,
40
- empty: text("noneMatch", plural),
41
- note: unseen && newCount.data === 0 && text("noNew", plural),
40
+ empty: text("noneMatch", { plural }),
41
+ note: unseen && newCount.data === 0 && text("noNew", { plural }),
42
42
  isNew: unseen && ((record) => isUnseen(record.record[unseen.field], row[unseen.seenAt])),
43
43
  viewAll: {
44
44
  label: text("viewAll"),
@@ -1,11 +1,11 @@
1
1
  import { cn } from "../lib/cn.js";
2
2
  import { Button } from "../primitives/button.js";
3
- import { Input } from "../primitives/input.js";
4
3
  import { humanize } from "../live/naming.js";
5
4
  import { displayValue } from "../live/display-value.js";
6
5
  import { text } from "./messages.js";
7
6
  import { toDraft } from "../live/field-values.js";
8
7
  import { ErrorBanner } from "./error-banner.js";
8
+ import { Input } from "../primitives/input.js";
9
9
  import { ConfirmSignIn } from "./confirm-sign-in.js";
10
10
  import { useState } from "react";
11
11
  import { Eye, EyeOff } from "lucide-react";
@@ -36,7 +36,7 @@ const SensitiveField = ({ field, hints, value, reveal, locked, invalid, placehol
36
36
  variant: "ghost",
37
37
  size: "sm",
38
38
  className: "-mr-1.5 px-1.5",
39
- "aria-label": shown ? text("hide", label) : text("show", label),
39
+ "aria-label": shown ? text("hide", { label }) : text("show", { label }),
40
40
  "aria-pressed": shown,
41
41
  loading: stored.isPending,
42
42
  onClick: toggle,
@@ -49,7 +49,7 @@ const SensitiveField = ({ field, hints, value, reveal, locked, invalid, placehol
49
49
  }) : stored.error && /* @__PURE__ */ jsx("div", {
50
50
  className: "mt-2",
51
51
  children: /* @__PURE__ */ jsx(ErrorBanner, {
52
- title: text("couldNotShow", label),
52
+ title: text("couldNotShow", { label }),
53
53
  error: stored.error
54
54
  })
55
55
  });
@@ -8,7 +8,7 @@ import { useQueryClient } from "@tanstack/react-query";
8
8
  //#region src/app/source-notice.tsx
9
9
  const reason = (error) => {
10
10
  if (!isApiError(error)) return text("noAnswer");
11
- if (error.status === 401 || error.status === 403) return text("signInRefused", error.message);
11
+ if (error.status === 401 || error.status === 403) return text("signInRefused", { message: error.message });
12
12
  return error.message;
13
13
  };
14
14
  /** Where a resource drawn from another API would be while that API's `/meta` loads, or when it cannot be read. */
@@ -19,7 +19,7 @@ const SourceNotice = ({ status }) => {
19
19
  children: [
20
20
  /* @__PURE__ */ jsx(Spinner, {}),
21
21
  " ",
22
- text("loadingFrom", status.source.label)
22
+ text("loadingFrom", { label: status.source.label })
23
23
  ]
24
24
  });
25
25
  return /* @__PURE__ */ jsx("div", {
@@ -29,7 +29,7 @@ const SourceNotice = ({ status }) => {
29
29
  children: [
30
30
  /* @__PURE__ */ jsx("h1", {
31
31
  className: "text-[16px] font-semibold",
32
- children: text("cannotReach", status.source.label)
32
+ children: text("cannotReach", { label: status.source.label })
33
33
  }),
34
34
  /* @__PURE__ */ jsxs("p", {
35
35
  className: "mt-1 text-muted-foreground",
@@ -1,7 +1,6 @@
1
1
  import { Button } from "../primitives/button.js";
2
2
  import { formatDateTime } from "../format/date.js";
3
3
  import { text } from "./messages.js";
4
- import { slotted } from "../locale/slotted.js";
5
4
  import { authMessage } from "../auth/auth-messages.js";
6
5
  import { useState } from "react";
7
6
  import { UserRoundCog } from "lucide-react";
@@ -34,13 +33,18 @@ const StaffBanner = ({ signIn, onStop }) => {
34
33
  }),
35
34
  /* @__PURE__ */ jsx("p", {
36
35
  className: "min-w-64 flex-1 break-words",
37
- children: slotted(text("staffSignedIn"), /* @__PURE__ */ jsx("span", {
38
- className: "font-semibold",
39
- children: signIn.staffName ?? signIn.staff
40
- }), /* @__PURE__ */ jsx("span", {
41
- className: "font-semibold",
42
- children: signIn.user
43
- }), formatDateTime(Date.parse(signIn.expiresAt)), signIn.reason)
36
+ children: text.rich("staffSignedIn", {
37
+ staff: /* @__PURE__ */ jsx("span", {
38
+ className: "font-semibold",
39
+ children: signIn.staffName ?? signIn.staff
40
+ }),
41
+ user: /* @__PURE__ */ jsx("span", {
42
+ className: "font-semibold",
43
+ children: signIn.user
44
+ }),
45
+ until: formatDateTime(Date.parse(signIn.expiresAt)),
46
+ reason: signIn.reason
47
+ })
44
48
  }),
45
49
  error && /* @__PURE__ */ jsx("p", {
46
50
  role: "alert",
@@ -22,7 +22,7 @@ const useLiveSave = (mode, subject) => {
22
22
  const run = async (action) => {
23
23
  const id = mode === "toast" ? toast.show({
24
24
  state: "loading",
25
- title: text("savingSubject", subject)
25
+ title: text("savingSubject", { subject })
26
26
  }) : void 0;
27
27
  setMessage(void 0);
28
28
  if (mode === "button") setPhase("saving");
@@ -34,7 +34,7 @@ const useLiveSave = (mode, subject) => {
34
34
  }
35
35
  if (id !== void 0) toast.update(id, {
36
36
  state: "success",
37
- title: text("subjectSaved", subject)
37
+ title: text("subjectSaved", { subject })
38
38
  });
39
39
  if (mode === "button") {
40
40
  setPhase("saved");
@@ -1,11 +1,10 @@
1
1
  import { Badge } from "../primitives/badge.js";
2
- import { toneFor } from "../live/columns-from-model.js";
3
- import { valueColor } from "../live/value-color.js";
2
+ import { valueColor, valueTone } from "../live/value-color.js";
4
3
  import { jsx } from "react/jsx-runtime";
5
4
  //#region src/app/value-badge.tsx
6
- /** A stored value as a badge: filled with the colour the view gives it and in its badge shape, else in its tone. */
5
+ /** A stored value as a badge: in its badge shape, filled with the colour the view gives it or in the tone it gives it. */
7
6
  const ValueBadge = ({ value, hints, children }) => /* @__PURE__ */ jsx(Badge, {
8
- tone: toneFor(String(value)),
7
+ tone: valueTone(hints?.valueColors, value),
9
8
  color: valueColor(hints?.valueColors, value),
10
9
  shape: hints?.badgeShape,
11
10
  children
@@ -98,7 +98,7 @@ const GlobalSearch = ({ search, className = "w-96", autoFocus, showShortcut = tr
98
98
  className: "absolute right-0 top-full z-40 mt-1 max-h-96 w-full min-w-72 overflow-y-auto rounded-lg border bg-background py-1 shadow-pop",
99
99
  children: [search.groups.length === 0 && /* @__PURE__ */ jsx("p", {
100
100
  className: "px-3 py-2 text-muted-foreground",
101
- children: search.loading ? text("searching") : text("noMatches", search.query)
101
+ children: search.loading ? text("searching") : text("noMatches", { query: search.query })
102
102
  }), search.groups.map((group) => /* @__PURE__ */ jsxs("div", {
103
103
  role: "group",
104
104
  "aria-label": group.label,
@@ -109,7 +109,7 @@ const GlobalSearch = ({ search, className = "w-96", autoFocus, showShortcut = tr
109
109
  }),
110
110
  group.failed && /* @__PURE__ */ jsx("p", {
111
111
  className: "px-3 py-1.5 text-danger-text",
112
- children: text("couldNotSearch", group.label)
112
+ children: text("couldNotSearch", { label: group.label })
113
113
  }),
114
114
  group.hits.map((hit) => {
115
115
  position += 1;