@setsquare/ui 0.5.0 → 0.6.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 (154) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +37 -2
  3. package/dist/index.d.ts +10 -7
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +1 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/lib/english.d.ts +11 -0
  8. package/dist/lib/english.d.ts.map +1 -0
  9. package/dist/lib/english.js +65 -0
  10. package/dist/lib/english.js.map +1 -0
  11. package/dist/lib/labels.d.ts +38 -8
  12. package/dist/lib/labels.d.ts.map +1 -1
  13. package/dist/lib/labels.js +97 -9
  14. package/dist/lib/labels.js.map +1 -1
  15. package/dist/lib/locale.d.ts +105 -0
  16. package/dist/lib/locale.d.ts.map +1 -0
  17. package/dist/lib/locale.js +42 -0
  18. package/dist/lib/locale.js.map +1 -0
  19. package/dist/shell/dashboard-shell.d.ts +4 -1
  20. package/dist/shell/dashboard-shell.d.ts.map +1 -1
  21. package/dist/shell/dashboard-shell.js +3 -2
  22. package/dist/shell/dashboard-shell.js.map +1 -1
  23. package/dist/shell/landmarks.d.ts +33 -0
  24. package/dist/shell/landmarks.d.ts.map +1 -0
  25. package/dist/shell/landmarks.js +20 -0
  26. package/dist/shell/landmarks.js.map +1 -0
  27. package/dist/shell/right-panel.d.ts +7 -2
  28. package/dist/shell/right-panel.d.ts.map +1 -1
  29. package/dist/shell/right-panel.js +13 -7
  30. package/dist/shell/right-panel.js.map +1 -1
  31. package/dist/shell/sidebar.d.ts +10 -2
  32. package/dist/shell/sidebar.d.ts.map +1 -1
  33. package/dist/shell/sidebar.js +31 -14
  34. package/dist/shell/sidebar.js.map +1 -1
  35. package/dist/shell/site-menu.d.ts +11 -3
  36. package/dist/shell/site-menu.d.ts.map +1 -1
  37. package/dist/shell/site-menu.js +7 -1
  38. package/dist/shell/site-menu.js.map +1 -1
  39. package/dist/shell/site-nav.d.ts +4 -1
  40. package/dist/shell/site-nav.d.ts.map +1 -1
  41. package/dist/shell/site-nav.js +3 -3
  42. package/dist/shell/site-nav.js.map +1 -1
  43. package/dist/shell/site-shell.d.ts +4 -2
  44. package/dist/shell/site-shell.d.ts.map +1 -1
  45. package/dist/shell/site-shell.js +3 -2
  46. package/dist/shell/site-shell.js.map +1 -1
  47. package/dist/ui/alert.d.ts +2 -0
  48. package/dist/ui/alert.d.ts.map +1 -1
  49. package/dist/ui/alert.js +11 -9
  50. package/dist/ui/alert.js.map +1 -1
  51. package/dist/ui/breadcrumbs.d.ts +9 -1
  52. package/dist/ui/breadcrumbs.d.ts.map +1 -1
  53. package/dist/ui/breadcrumbs.js +5 -2
  54. package/dist/ui/breadcrumbs.js.map +1 -1
  55. package/dist/ui/calendar.d.ts +1 -0
  56. package/dist/ui/calendar.d.ts.map +1 -1
  57. package/dist/ui/calendar.js +7 -1
  58. package/dist/ui/calendar.js.map +1 -1
  59. package/dist/ui/checkbox.d.ts.map +1 -1
  60. package/dist/ui/checkbox.js +7 -7
  61. package/dist/ui/checkbox.js.map +1 -1
  62. package/dist/ui/code-block-parts.d.ts +30 -0
  63. package/dist/ui/code-block-parts.d.ts.map +1 -0
  64. package/dist/ui/code-block-parts.js +27 -0
  65. package/dist/ui/code-block-parts.js.map +1 -0
  66. package/dist/ui/code-block.d.ts +4 -10
  67. package/dist/ui/code-block.d.ts.map +1 -1
  68. package/dist/ui/code-block.js +4 -9
  69. package/dist/ui/code-block.js.map +1 -1
  70. package/dist/ui/combo-box.d.ts +7 -1
  71. package/dist/ui/combo-box.d.ts.map +1 -1
  72. package/dist/ui/combo-box.js +9 -2
  73. package/dist/ui/combo-box.js.map +1 -1
  74. package/dist/ui/copy-button.d.ts +7 -1
  75. package/dist/ui/copy-button.d.ts.map +1 -1
  76. package/dist/ui/copy-button.js +11 -10
  77. package/dist/ui/copy-button.js.map +1 -1
  78. package/dist/ui/date-field.d.ts +1 -0
  79. package/dist/ui/date-field.d.ts.map +1 -1
  80. package/dist/ui/date-field.js +20 -16
  81. package/dist/ui/date-field.js.map +1 -1
  82. package/dist/ui/dialog.d.ts +6 -1
  83. package/dist/ui/dialog.d.ts.map +1 -1
  84. package/dist/ui/dialog.js +11 -8
  85. package/dist/ui/dialog.js.map +1 -1
  86. package/dist/ui/error-state.d.ts +17 -2
  87. package/dist/ui/error-state.d.ts.map +1 -1
  88. package/dist/ui/error-state.js +32 -34
  89. package/dist/ui/error-state.js.map +1 -1
  90. package/dist/ui/feature-card.d.ts +18 -3
  91. package/dist/ui/feature-card.d.ts.map +1 -1
  92. package/dist/ui/feature-card.js +18 -3
  93. package/dist/ui/feature-card.js.map +1 -1
  94. package/dist/ui/field.d.ts +28 -9
  95. package/dist/ui/field.d.ts.map +1 -1
  96. package/dist/ui/field.js +22 -10
  97. package/dist/ui/field.js.map +1 -1
  98. package/dist/ui/file-upload.d.ts +23 -5
  99. package/dist/ui/file-upload.d.ts.map +1 -1
  100. package/dist/ui/file-upload.js +54 -36
  101. package/dist/ui/file-upload.js.map +1 -1
  102. package/dist/ui/form.d.ts +11 -1
  103. package/dist/ui/form.d.ts.map +1 -1
  104. package/dist/ui/form.js +7 -4
  105. package/dist/ui/form.js.map +1 -1
  106. package/dist/ui/number-field.d.ts.map +1 -1
  107. package/dist/ui/number-field.js +5 -3
  108. package/dist/ui/number-field.js.map +1 -1
  109. package/dist/ui/pagination.d.ts +11 -3
  110. package/dist/ui/pagination.d.ts.map +1 -1
  111. package/dist/ui/pagination.js +30 -23
  112. package/dist/ui/pagination.js.map +1 -1
  113. package/dist/ui/radio-group.d.ts.map +1 -1
  114. package/dist/ui/radio-group.js +4 -4
  115. package/dist/ui/radio-group.js.map +1 -1
  116. package/dist/ui/search.d.ts +3 -0
  117. package/dist/ui/search.d.ts.map +1 -1
  118. package/dist/ui/search.js +11 -10
  119. package/dist/ui/search.js.map +1 -1
  120. package/dist/ui/select.d.ts +7 -1
  121. package/dist/ui/select.d.ts.map +1 -1
  122. package/dist/ui/select.js +7 -3
  123. package/dist/ui/select.js.map +1 -1
  124. package/dist/ui/selection-bar.d.ts +17 -4
  125. package/dist/ui/selection-bar.d.ts.map +1 -1
  126. package/dist/ui/selection-bar.js +15 -11
  127. package/dist/ui/selection-bar.js.map +1 -1
  128. package/dist/ui/sheet.d.ts +1 -0
  129. package/dist/ui/sheet.d.ts.map +1 -1
  130. package/dist/ui/sheet.js +4 -1
  131. package/dist/ui/sheet.js.map +1 -1
  132. package/dist/ui/slider.d.ts +9 -2
  133. package/dist/ui/slider.d.ts.map +1 -1
  134. package/dist/ui/slider.js +13 -5
  135. package/dist/ui/slider.js.map +1 -1
  136. package/dist/ui/tabs.d.ts +1 -0
  137. package/dist/ui/tabs.d.ts.map +1 -1
  138. package/dist/ui/tabs.js +13 -12
  139. package/dist/ui/tabs.js.map +1 -1
  140. package/dist/ui/text-field.d.ts.map +1 -1
  141. package/dist/ui/text-field.js +7 -3
  142. package/dist/ui/text-field.js.map +1 -1
  143. package/dist/ui/theme-switcher.d.ts +1 -0
  144. package/dist/ui/theme-switcher.d.ts.map +1 -1
  145. package/dist/ui/theme-switcher.js +7 -7
  146. package/dist/ui/theme-switcher.js.map +1 -1
  147. package/dist/ui/toast.d.ts +1 -0
  148. package/dist/ui/toast.d.ts.map +1 -1
  149. package/dist/ui/toast.js +4 -1
  150. package/dist/ui/toast.js.map +1 -1
  151. package/dist/ui/tree.d.ts.map +1 -1
  152. package/dist/ui/tree.js +5 -5
  153. package/dist/ui/tree.js.map +1 -1
  154. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,63 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0 — 2026-10-13
4
+
5
+ Breaking: every word is an ICU MessageFormat template, and the package writes no sentence in code. None of 0.5's
6
+ defaults needed ICU quoting, but a product's template with an apostrophe before `{`, `}`, `#` or another
7
+ apostrophe now does, and some English defaults read differently (below).
8
+
9
+ - **`SetsquareLocale`**, new: sets the locale once for the whole product, and holds app-wide labels keyed by
10
+ component (`SetsquareLabels`). It wraps React Aria's `I18nProvider`, so React Aria's own words, numbers, dates
11
+ and lists follow the product's locale; without it they followed the server's default before hydration and the
12
+ browser's after. A component's own `labels` win over the app-wide ones; a nested provider lays its words over
13
+ the outer one's.
14
+ - **ICU MessageFormat.** Labels are formatted with `intl-messageformat` 12.1.3 (a new dependency, pinned; no
15
+ `eval` or `new Function`, so it runs under a CSP without `'unsafe-eval'`), constructed with `ignoreTag`, so `<b>`
16
+ is text. Plurals and `select` work in every language. A template with no holes formats to itself. A word that
17
+ can't be formatted throws in development; in production it shows the English default with the same values.
18
+ - **No sentence built in code:**
19
+ - Fields: the required message is `labels.enterValue` (`'Enter {label}'`) or `chooseValue` (`'Choose {label}'`),
20
+ with the label as written. In English it now reads "Enter Project name", not "Enter project name": give the
21
+ field `requiredMessage`, or the app a template of its own, where that reads badly.
22
+ - `SelectionBar`: the counts are ICU plurals. `noun` is optional (default `labels.item` and `labels.items`) and
23
+ fills `{singular}` and `{plural}`; `{noun}`, the plural, keeps 0.5 templates working for one release.
24
+ "All 1 project selected" is "1 project selected".
25
+ - `Pagination`: the noun is inside `range` (`'{from}–{to} of {total} {noun}'`), and counts reach ICU as numbers.
26
+ - `RightPanel`: the close button's `{title}` is the title as written, so "Close Details", not "Close details".
27
+ - `TreeItem`'s name, `SidebarSwitcher`'s name and `FileUpload`'s accepted types are lists through
28
+ `Intl.ListFormat` in the locale: "a PDF, PNG, or JPG file" in English.
29
+ - `Slider`'s range is `Intl.NumberFormat.formatRange`: "20–80", not "20 – 80".
30
+ - `FileUpload`'s announcements are labels, with plurals, each a sentence of its own in the live region.
31
+ - `CopyButton` is named by one template, `labels.name` (`'{word} {label}'`).
32
+ - **Words that had no way in** now come through `labels`: `FeatureCard`'s Show and Hide, its default label and the
33
+ toggle's names (`FeatureCardLabels`); `ErrorState`'s title and body for each kind; `FieldLabel`'s "(required)"
34
+ and "(optional)"; the checkbox messages; `Select`'s placeholder (`SelectLabels`); `ComboBox`'s empty list
35
+ (`ComboBoxLabels`); `CommandSearch`'s placeholder; `FileUpload`'s "or", its list's name, "Not added", "Not
36
+ uploaded" and the size and status line; `CodeBlock`'s scrolling name; `Sidebar` items' counts and tooltips.
37
+ `Alert`, `Calendar`, `Dialog`, `Sheet` and `Toaster` had their English as fallbacks in the JSX; it's in labels
38
+ defaults now, so the provider reaches it.
39
+ - **Loose props fold into `labels`**, and keep working for one release, winning over `labels`: `Breadcrumbs`'
40
+ `label` (`BreadcrumbsLabels.breadcrumbs`), `Sidebar`'s `label` (`primary`), `SiteNav`'s `label` and
41
+ `SiteMenu`'s `label` and `navLabel` (`SiteNavLabels`, `SiteMenuLabels`), both shells' `skipLinkLabel`
42
+ (`ShellLabels.skipLink`), `RangeSlider`'s `thumbLabels` (`RangeSliderLabels`), `PanelToggle`'s `label`
43
+ (`RightPanelLabels.toggle`) and `ConfirmDialog`'s `cancelLabel` (`cancel`). `Form` takes `labels` for its
44
+ `ErrorSummary` (`ErrorSummaryLabels`).
45
+ - **Numbers in the product's locale.** `Slider` and `formatBytes` formatted with `Intl.NumberFormat(undefined)`;
46
+ they use React Aria's locale. `formatBytes` takes the locale as an optional second argument. Sidebar counts are
47
+ formatted too.
48
+ - **Server-safe still.** `SiteShell`, `SiteNav` and `CodeBlock` keep no `'use client'`: their words are in small
49
+ client components (the skip link, SiteNav's landmark, CodeBlock's caption and scroller), so the provider reaches
50
+ them.
51
+ - **Tests.** `test/browser/labels.mjs` renders every design-system card inside `SetsquareLocale` at `locale="ar"`
52
+ with every word pseudo-translated, and fails on any of the package's English left in text, hidden text or names;
53
+ a control run with the English left in has to find it. A lint rule of this repository's
54
+ (`scripts/lint/words.mjs`, not shipped) fails English written into the components' JSX, a sentence built in a
55
+ template, a list joined in code and `Intl` in the runtime's locale; its tests fail each way 0.5.0 did it. Unit
56
+ tests cover the formatter and its fallbacks, the provider, and every count label in Polish.
57
+ - **Docs.** A Languages page on ui.setsquare.dev and a Languages section in the README. The Labels card sets its
58
+ French through `SetsquareLocale`, with an ICU plural.
59
+ - Developer-facing text stays English. Right-to-left layout is still to do.
60
+
3
61
  ## 0.5.0 — 2026-10-11
4
62
 
5
63
  Breaking: the `Tree` draws no box of its own. A tree that should stay framed goes in a `Card`.
package/README.md CHANGED
@@ -134,6 +134,39 @@ Every control that can paint smaller than its target — buttons, links, icon bu
134
134
  <p>Invite people by email, or share the <TextLink href="/settings/invite">workspace link</TextLink>.</p>
135
135
  ```
136
136
 
137
+ ## Languages
138
+
139
+ Every word a component shows or says comes in English, and a product replaces any of them with its own, in any language. Set the locale and the app-wide words once, high in the root layout:
140
+
141
+ ```tsx
142
+ import { SetsquareLocale } from '@setsquare/ui';
143
+
144
+ <html lang="de">
145
+ <body>
146
+ <SetsquareLocale
147
+ locale="de"
148
+ labels={{
149
+ alert: { dismiss: 'Schließen' },
150
+ selectionBar: {
151
+ selected: '{count, plural, one {# Projekt ausgewählt} other {# Projekte ausgewählt}}',
152
+ },
153
+ }}
154
+ >
155
+ {children}
156
+ </SetsquareLocale>
157
+ </body>
158
+ </html>
159
+ ```
160
+
161
+ - `locale` is a BCP 47 tag. React Aria's own words (a calendar's buttons, "Clear search", a table's "Select all"), numbers, dates and lists follow it; without it they follow the server's default while rendering there and the browser's after hydration. It wraps React Aria's `I18nProvider`, so a product doesn't import React Aria to set it.
162
+ - `labels` is keyed by component (`SetsquareLabels`): `pagination`, `fileUpload`, `field` for every field, and so on. A component's own `labels` prop wins, for one instance. Any word left out stays English. A nested `SetsquareLocale` lays its words over the outer one's.
163
+ - Every word is an ICU MessageFormat template, formatted by the package with `intl-messageformat` (no `eval`, so it runs under a CSP without `'unsafe-eval'`): `'Remove {name}'`, `'{count, plural, one {# file} few {# pliki} …}'`, `select`. A product passes its catalogue's lines through unformatted. `<b>` is text, as PHP's ICU reads it.
164
+ - No sentence is put together in code: no lowercasing, joining or plural logic. A field's required message is `'Enter {label}'` with the label as written; give a field `requiredMessage` where its own sentence reads better.
165
+ - A word that can't be formatted (malformed, or a value missing) throws in development. In production it shows the English default with the same values.
166
+ - Developer-facing text stays English: thrown errors, lint messages and the page checks' reports. Right-to-left layout isn't done yet: React Aria reads the direction from the locale, but the components' own classes are physical (`left-`, `ml-`).
167
+
168
+ The design system's README and the **Labels** card list every word and placeholder.
169
+
137
170
  ## Site layer
138
171
 
139
172
  For a public page — a marketing site, a privacy notice — the stylesheet also brings Tailwind 4 utilities built from the tokens. They work in any Tailwind 4 app, with or without React:
@@ -312,6 +345,7 @@ The positioning, target, link, reflow, text-spacing and motion scans run in the
312
345
  - **Types:** `tsc` on React 19.
313
346
  - **Lint rules:** ESLint's `RuleTester`, and oxlint loading the built plugin through `jsPlugins`.
314
347
  - **Unit:** the pagination window: seven slots on every page of an 8-, 20- and 239-page list, and a gap only where two or more pages are left out.
348
+ - **Words:** a lint rule of this repository's (`scripts/lint/words.mjs`) fails English written into the components' JSX, a template that builds a sentence, a list joined in code, and `Intl` formatting in the runtime's locale; its tests fail each way 0.5.0 did it. Unit tests cover the ICU formatter, its development and production fallbacks, `SetsquareLocale`'s layering, and every count label in Polish (one, few, many).
315
349
  - **Contrast:** `scripts/check-contrast.mjs` computes every token pair the usage notes promise, in all four themes. It doesn't check colours a product adds.
316
350
  - **Browser (Chromium only):** the design-system previews on React 19, loaded as the design-system artifact loads them:
317
351
  - axe-core on every preview in all four themes;
@@ -329,9 +363,10 @@ The positioning, target, link, reflow, text-spacing and motion scans run in the
329
363
  - tabs: the arrow keys in a row and a rail, Home and End, names with counts and badges, tooltips on hover (after 500ms, hoverable, closed by Escape and by a press) and on keyboard focus, the rail becoming a row below 480px, the three `hiddenPanels` modes (a draft surviving, a hidden panel's effects stopping, a Suspense read loading while pre-rendered), an important badge's pulse ending inside five seconds and replaying when its count rises, clear-on-open calling `onBadgeClear`, only opacity and colour changing at AAA, nothing animating under reduced motion, and no badge, ring or halo over any text in all three displays at full width and 360px;
330
364
  - pagination: the tiers at 1, 4, 7, 8, 20, 21 and 239 pages, a row that never changes length, the names of page links and arrows, hrefs that keep the query and never use `meta.links`, rows per page keeping the first row in view, focus after paging, the page field's validation and alert, the pending mark and its message after 400ms (and the mark stopping inside five seconds), and motion at AA, AAA and under reduced motion;
331
365
  - nothing on any preview running off its width, no text cut off or spilling with WCAG 1.4.12's spacing applied, and nothing but a loading indicator moving past five seconds, at AA and AAA;
366
+ - every preview inside `SetsquareLocale` at `locale="ar"` with every word pseudo-translated, failing on any of the package's English left in text, hidden text or names, with a control run that leaves the words in English and has to find them. It reads what a card shows as it loads, not what it shows after it's used;
332
367
  - the page checks above, each also run on a page built to fail.
333
- - **Packaging:** `pnpm package:verify` packs the tarball and installs it into a new Next.js app. It builds the app, loads it in both levels, and runs the page checks and the lint plugin from the installed package. It also follows a sidebar link on the freshly started app, to check the templates' page transition runs with its `nav-forward` type. The root layout's `ThemeScript` is checked to put a stored dark theme on `<html>` before any of the page's own JavaScript runs, and the footer's `ThemeSwitcher` to change it for the next page load. A route on the site templates is checked too: the current page, reflow at 320px, the Menu as a link to the footer's navigation with JavaScript off, and the swap to the Menu button when the page hydrates, in the same place and keeping focus.
334
- - **The docs site** (`apps/docs`): `pnpm test:site` loads every page of its production build in all four themes at 1280px, and at AA and AAA at 390px (and each component the Playground shows). Each run has axe, positioning, targets, underlined links, sideways overflow and console errors. Visible focus runs in three of them (light, dark AAA and 390px AAA: both themes, both levels, both layouts) and cursors in three (light, light AAA and 390px AAA), and both check the sidebar and header, which are the same on every page, on the home page only; a check fails if that selector ever leaves out a control in a page's content. It also fails on console errors, sideways overflow, and any internal link to a page it doesn't check, and it follows a sidebar link, in Chromium and in WebKit, to check that the navigation stays client-side, runs the page transition, and covers the old page while it leaves. It also tries a shadcn/ui theme from the Playground: that it reaches every page, lasts through a reload without a flash, resets, and that a paste can set nothing but valid token values. The findings it accepts are listed in `test/site/pages.mjs`, each with its reason. The site brings its own palette, so its build runs the contrast audit against those colours.
368
+ - **Packaging:** `pnpm package:verify` packs the tarball and installs it into a new Next.js app. It builds the app, loads it in both levels, and runs the page checks and the lint plugin from the installed package. It also follows a sidebar link on the freshly started app, to check the templates' page transition runs with its `nav-forward` type. The root layout's `ThemeScript` is checked to put a stored dark theme on `<html>` before any of the page's own JavaScript runs, and the footer's `ThemeSwitcher` to change it for the next page load. A route on the site templates is checked too: the current page, reflow at 320px, the Menu as a link to the footer's navigation with JavaScript off, and the swap to the Menu button when the page hydrates, in the same place and keeping focus. `@setsquare/ui-blocks`' `ContentBuilder` is rendered from a Next.js page and checked to hydrate with no console errors, with the browser on a different platform from the server's.
369
+ - **The docs site** (`apps/docs`): `pnpm test:site` loads every page of its production build in all four themes at 1280px, and at AA and AAA at 390px (and each component the Playground shows). Each run has axe, positioning, targets, underlined links, sideways overflow and console errors. The dark run puts the browser on a different platform from the server's (Windows beside a Mac server, a Mac beside any other), so anything rendered differently on the two shows up as a hydration error. Visible focus runs in three of them (light, dark AAA and 390px AAA: both themes, both levels, both layouts) and cursors in three (light, light AAA and 390px AAA), and both check the sidebar and header, which are the same on every page, on the home page only; a check fails if that selector ever leaves out a control in a page's content. It also fails on console errors, sideways overflow, and any internal link to a page it doesn't check, and it follows a sidebar link, in Chromium and in WebKit, to check that the navigation stays client-side, runs the page transition, and covers the old page while it leaves. It also tries a shadcn/ui theme from the Playground: that it reaches every page, lasts through a reload without a flash, resets, and that a paste can set nothing but valid token values. The findings it accepts are listed in `test/site/pages.mjs`, each with its reason. The site brings its own palette, so its build runs the contrast audit against those colours.
335
370
  - **Not tested:** other browsers; real screen readers (VoiceOver, NVDA and JAWS haven't been run on these components); Windows High Contrast; pasting files into the drop zone; everything that depends on a product's content.
336
371
 
337
372
  ## Developing
package/dist/index.d.ts CHANGED
@@ -6,6 +6,8 @@
6
6
  * to the browser. Import from here, and the styles from "@setsquare/ui/styles.css".
7
7
  */
8
8
  export { cn } from './lib/cn.js';
9
+ export { SetsquareLocale } from './lib/locale.js';
10
+ export type { SetsquareLocaleProps, SetsquareLabels } from './lib/locale.js';
9
11
  export { useElementWidth } from './lib/use-element-width.js';
10
12
  export { Button, LinkButton } from './ui/button.js';
11
13
  export type { ButtonProps, LinkButtonProps } from './ui/button.js';
@@ -23,7 +25,7 @@ export { StatusBadge } from './ui/badge.js';
23
25
  export type { StatusTone, StatusBadgeProps } from './ui/badge.js';
24
26
  export { Avatar, ProductMark } from './ui/avatar.js';
25
27
  export { Breadcrumbs } from './ui/breadcrumbs.js';
26
- export type { BreadcrumbItem, BreadcrumbsProps } from './ui/breadcrumbs.js';
28
+ export type { BreadcrumbItem, BreadcrumbsProps, BreadcrumbsLabels } from './ui/breadcrumbs.js';
27
29
  export { Pagination } from './ui/pagination.js';
28
30
  export type { PaginationProps, PaginationLabels, PaginationMeta } from './ui/pagination.js';
29
31
  export { Tabs, TabList, Tab, TabPanel } from './ui/tabs.js';
@@ -39,6 +41,7 @@ export { AppSearch, CommandSearch, SearchTrigger } from './ui/search.js';
39
41
  export type { SearchItem, SearchSection, SearchLabels } from './ui/search.js';
40
42
  export { DashboardShell, ShellInset, ShellBody, ShellMain, useShell, useOptionalShell, } from './shell/dashboard-shell.js';
41
43
  export type { ShellSize, PanelMode, DashboardShellProps } from './shell/dashboard-shell.js';
44
+ export type { ShellLabels, SiteNavLabels } from './shell/landmarks.js';
42
45
  export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarList, SidebarItem, SidebarDisclosure, SidebarSwitcher, SidebarTrigger, useSidebarCollapsed, } from './shell/sidebar.js';
43
46
  export type { SidebarLabels, SidebarTriggerLabels, SidebarDisclosureProps, SidebarSubItem, } from './shell/sidebar.js';
44
47
  export { AppHeader } from './shell/app-header.js';
@@ -51,7 +54,7 @@ export type { SiteNavProps } from './shell/site-nav.js';
51
54
  export { SiteNavLink, SitePathProvider } from './shell/site-nav-link.js';
52
55
  export type { SiteNavLinkProps, SiteNavLinkVariant } from './shell/site-nav-link.js';
53
56
  export { SiteMenu } from './shell/site-menu.js';
54
- export type { SiteMenuProps } from './shell/site-menu.js';
57
+ export type { SiteMenuProps, SiteMenuLabels } from './shell/site-menu.js';
55
58
  export { SiteFooter, SiteFooterGroup } from './shell/site-footer.js';
56
59
  export type { SiteFooterProps, SiteFooterGroupProps } from './shell/site-footer.js';
57
60
  export { samePath } from './shell/site-path.js';
@@ -66,7 +69,7 @@ export { LinkCard } from './ui/link-card.js';
66
69
  export { SettingsCard } from './ui/settings-card.js';
67
70
  export type { SettingsCardProps } from './ui/settings-card.js';
68
71
  export { FeatureCard, FeatureCardItem } from './ui/feature-card.js';
69
- export type { FeatureCardProps, FeatureCardItemProps } from './ui/feature-card.js';
72
+ export type { FeatureCardProps, FeatureCardItemProps, FeatureCardLabels, } from './ui/feature-card.js';
70
73
  export { TimeOfDayIcon, timeOfDay } from './ui/time-of-day-icon.js';
71
74
  export type { TimeOfDay, TimeOfDayIconProps } from './ui/time-of-day-icon.js';
72
75
  export type { LinkCardProps } from './ui/link-card.js';
@@ -103,9 +106,9 @@ export { SearchField } from './ui/search-field.js';
103
106
  export type { SearchFieldProps } from './ui/search-field.js';
104
107
  export { ListBox, Option, OptionSection } from './ui/list-box.js';
105
108
  export { Select } from './ui/select.js';
106
- export type { SelectProps } from './ui/select.js';
109
+ export type { SelectProps, SelectLabels } from './ui/select.js';
107
110
  export { ComboBox } from './ui/combo-box.js';
108
- export type { ComboBoxProps } from './ui/combo-box.js';
111
+ export type { ComboBoxProps, ComboBoxLabels } from './ui/combo-box.js';
109
112
  export { Checkbox, CheckboxGroup, SelectionCheckbox } from './ui/checkbox.js';
110
113
  export type { CheckboxProps, CheckboxGroupProps, SelectionCheckboxProps } from './ui/checkbox.js';
111
114
  export { RadioGroup, Radio } from './ui/radio-group.js';
@@ -113,7 +116,7 @@ export type { RadioGroupProps, RadioProps } from './ui/radio-group.js';
113
116
  export { Switch } from './ui/switch.js';
114
117
  export type { SwitchProps } from './ui/switch.js';
115
118
  export { Form, FormSection, FormActions, ErrorSummary, StatusMessage } from './ui/form.js';
116
- export type { FormProps, FormSectionProps, ErrorItem, ErrorSummaryProps } from './ui/form.js';
119
+ export type { FormProps, FormSectionProps, ErrorItem, ErrorSummaryProps, ErrorSummaryLabels, } from './ui/form.js';
117
120
  export { SpinnerIcon, Spinner, ProgressBar } from './ui/spinner.js';
118
121
  export type { SpinnerProps, ProgressBarProps } from './ui/spinner.js';
119
122
  export { Skeleton, SkeletonText, TableSkeleton, LoadingState } from './ui/skeleton.js';
@@ -129,7 +132,7 @@ export type { ToastContent, ToastTone, ToasterLabels } from './ui/toast.js';
129
132
  export { ErrorState, ErrorBoundary } from './ui/error-state.js';
130
133
  export type { ErrorStateProps, ErrorKind, ErrorBoundaryProps, ErrorStateLabels, } from './ui/error-state.js';
131
134
  export { Slider, RangeSlider } from './ui/slider.js';
132
- export type { SliderProps, RangeSliderProps } from './ui/slider.js';
135
+ export type { SliderProps, RangeSliderProps, RangeSliderLabels } from './ui/slider.js';
133
136
  export { Calendar, RangeCalendar } from './ui/calendar.js';
134
137
  export type { CalendarProps, RangeCalendarProps, CalendarLabels } from './ui/calendar.js';
135
138
  export { DateField, TimeField, DatePicker, DateRangePicker } from './ui/date-field.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE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B,CAAC"}
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@
6
6
  * to the browser. Import from here, and the styles from "@setsquare/ui/styles.css".
7
7
  */
8
8
  export { cn } from './lib/cn.js';
9
+ export { SetsquareLocale } from './lib/locale.js';
9
10
  export { useElementWidth } from './lib/use-element-width.js';
10
11
  export { Button, LinkButton } from './ui/button.js';
11
12
  // From their own module, which has no 'use client', so a server component can call them.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEpD,yFAAyF;AACzF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAW5D,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,a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,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAOvD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOhE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASvF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAQ9D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Every component's English words, keyed as `SetsquareLabels` is: the defaults a product's labels replace. Not
3
+ * exported from the package. The pseudo-locale sweep (test/browser/labels.mjs) reads it from the build, to
4
+ * replace every word with a marked pseudo-translation and find any English left.
5
+ */
6
+ import type { SetsquareLabels } from './locale.js';
7
+ /** Every key of `SetsquareLabels`, with every word: adding a component's labels to one and not here fails tsc. */
8
+ export declare const englishLabels: {
9
+ [K in keyof SetsquareLabels]-?: Required<NonNullable<SetsquareLabels[K]>>;
10
+ };
11
+ //# sourceMappingURL=english.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"english.d.ts","sourceRoot":"","sources":["../../src/lib/english.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA4BnD,kHAAkH;AAClH,eAAO,MAAM,aAAa,EAAE;KACzB,CAAC,IAAI,MAAM,eAAe,CAAC,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;CAqC1E,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { shellLabels, siteNavLabels } from '../shell/landmarks.js';
2
+ import { rightPanelLabels } from '../shell/right-panel.js';
3
+ import { sidebarLabels, sidebarTriggerLabels } from '../shell/sidebar.js';
4
+ import { siteMenuLabels } from '../shell/site-menu.js';
5
+ import { alertLabels, offlineAlertLabels } from '../ui/alert.js';
6
+ import { breadcrumbsLabels } from '../ui/breadcrumbs.js';
7
+ import { calendarLabels } from '../ui/calendar.js';
8
+ import { codeBlockLabels } from '../ui/code-block-parts.js';
9
+ import { comboBoxLabels } from '../ui/combo-box.js';
10
+ import { copyButtonLabels } from '../ui/copy-button.js';
11
+ import { dateFieldLabels } from '../ui/date-field.js';
12
+ import { confirmDialogLabels, dialogLabels } from '../ui/dialog.js';
13
+ import { errorStateLabels } from '../ui/error-state.js';
14
+ import { featureCardLabels } from '../ui/feature-card.js';
15
+ import { fieldLabels } from '../ui/field.js';
16
+ import { fileUploadLabels } from '../ui/file-upload.js';
17
+ import { errorSummaryLabels } from '../ui/form.js';
18
+ import { paginationLabels } from '../ui/pagination.js';
19
+ import { searchLabels } from '../ui/search.js';
20
+ import { selectLabels } from '../ui/select.js';
21
+ import { selectionBarLabels } from '../ui/selection-bar.js';
22
+ import { sheetLabels } from '../ui/sheet.js';
23
+ import { rangeSliderLabels } from '../ui/slider.js';
24
+ import { tabsLabels } from '../ui/tabs.js';
25
+ import { themeSwitcherLabels } from '../ui/theme-switcher.js';
26
+ import { toasterLabels } from '../ui/toast.js';
27
+ /** Every key of `SetsquareLabels`, with every word: adding a component's labels to one and not here fails tsc. */
28
+ export const englishLabels = {
29
+ alert: alertLabels,
30
+ breadcrumbs: breadcrumbsLabels,
31
+ calendar: calendarLabels,
32
+ codeBlock: codeBlockLabels,
33
+ comboBox: { noMatches: comboBoxLabels.noMatches },
34
+ confirmDialog: confirmDialogLabels,
35
+ copyButton: copyButtonLabels,
36
+ dashboardShell: shellLabels,
37
+ dateField: {
38
+ tooEarly: dateFieldLabels.tooEarly,
39
+ tooLate: dateFieldLabels.tooLate,
40
+ unavailable: dateFieldLabels.unavailable,
41
+ },
42
+ dialog: dialogLabels,
43
+ errorState: errorStateLabels,
44
+ errorSummary: errorSummaryLabels,
45
+ featureCard: featureCardLabels,
46
+ field: fieldLabels,
47
+ fileUpload: fileUploadLabels,
48
+ offlineAlert: offlineAlertLabels,
49
+ pagination: paginationLabels,
50
+ rangeSlider: rangeSliderLabels,
51
+ rightPanel: rightPanelLabels,
52
+ search: searchLabels,
53
+ select: { placeholder: selectLabels.placeholder },
54
+ selectionBar: selectionBarLabels,
55
+ sheet: sheetLabels,
56
+ sidebar: sidebarLabels,
57
+ sidebarTrigger: sidebarTriggerLabels,
58
+ siteMenu: { menu: siteMenuLabels.menu },
59
+ siteNav: siteNavLabels,
60
+ siteShell: shellLabels,
61
+ tabs: tabsLabels,
62
+ themeSwitcher: themeSwitcherLabels,
63
+ toaster: toasterLabels,
64
+ };
65
+ //# sourceMappingURL=english.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"english.js","sourceRoot":"","sources":["../../src/lib/english.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CA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KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,iBAAiB;IAC9B,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE,EAAE,SAAS,EAAE,cAAc,CAAC,SAAS,EAAE;IACjD,aAAa,EAAE,mBAAmB;IAClC,UAAU,EAAE,gBAAgB;IAC5B,cAAc,EAAE,WAAW;IAC3B,SAAS,EAAE;QACT,QAAQ,EAAE,eAAe,CAAC,QAAQ;QAClC,OAAO,EAAE,eAAe,CAAC,OAAO;QAChC,WAAW,EAAE,eAAe,CAAC,WAAW;KACzC;IACD,MAAM,EAAE,YAAY;IACpB,UAAU,EAAE,gBAAgB;IAC5B,YAAY,EAAE,kBAAkB;IAChC,WAAW,EAAE,iBAAiB;IAC9B,KAAK,EAAE,WAAW;IAClB,UAAU,EAAE,gBAAgB;IAC5B,YAAY,EAAE,kBAAkB;IAChC,UAAU,EAAE,gBAAgB;IAC5B,WAAW,EAAE,iBAAiB;IAC9B,UAAU,EAAE,gBAAgB;IAC5B,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,EAAE,WAAW,EAAE,YAAY,CAAC,WAAW,EAAE;IACjD,YAAY,EAAE,kBAAkB;IAChC,KAAK,EAAE,WAAW;IAClB,OAAO,EAAE,aAAa;IACtB,cAAc,EAAE,oBAAoB;IACpC,QAAQ,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE;IACvC,OAAO,EAAE,aAAa;IACtB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,UAAU;IAChB,aAAa,EAAE,mBAAmB;IAClC,OAAO,EAAE,aAAa;CACvB,CAAC"}
@@ -1,11 +1,41 @@
1
1
  /**
2
2
  * The words a component shows or says, which a product can replace one component at a time through its `labels`
3
- * prop: an object of strings, any of which can be left out to keep the English default. A word that carries a
4
- * value has a `{name}` placeholder in its string ("Remove {name}") rather than being a function, so `labels`
5
- * stays plain data that a server component can pass to a client one.
6
- */
7
- /** The English defaults with any of the product's words laid over them. */
8
- export declare function withLabels<T extends object>(defaults: T, labels: Partial<T> | undefined): T;
9
- /** Fills `{name}` placeholders: `fill('Remove {name}', { name: 'plan.pdf' })` is "Remove plan.pdf". */
10
- export declare function fill(template: string, values: Record<string, string | number>): string;
3
+ * prop, or for the whole app through `SetsquareLocale`: an object of strings, any of which can be left out to
4
+ * keep the English default. Each word is an ICU MessageFormat template, so a value goes in a placeholder
5
+ * ("Remove {name}") and a count chooses the words it needs ("{count, plural, one {# file} other {# files}}"),
6
+ * in any language. Templates stay strings rather than functions, so `labels` is plain data that a server
7
+ * component can pass to a client one.
8
+ */
9
+ /** The values a word's placeholders are filled with. */
10
+ export type LabelValues = Record<string, string | number>;
11
+ /** The English defaults with any of the product's words laid over them, later layers winning. */
12
+ export declare function withLabels<T extends object>(defaults: T, ...layers: (Partial<T> | undefined)[]): T;
13
+ /** Formats an ICU template in `locale`. Throws if it is malformed or a value it names is missing. */
14
+ export declare function formatLabel(template: string, values: LabelValues, locale: string): string;
15
+ /**
16
+ * Finished text as a template that formats to itself, for handing a word one component has formatted to another
17
+ * that formats its labels: an apostrophe is doubled and each brace quoted.
18
+ */
19
+ export declare function literal(text: string): string;
20
+ /** Replaces `{name}` with its value and nothing else. For a path (`/projects?page={page}`), not for words. */
21
+ export declare function substitute(template: string, values: LabelValues): string;
22
+ /**
23
+ * Formats a word: `fill('Remove {name}', { name: 'plan.pdf' }, 'en')` is "Remove plan.pdf". A word that can't
24
+ * be formatted throws in development. In production it shows `fallback` (the package's English default for the
25
+ * word) formatted with the same values, and if that fails too, `fallback` with its plain `{name}` placeholders
26
+ * replaced, so a page never breaks over a word.
27
+ */
28
+ export declare function fill(template: string, values?: LabelValues, locale?: string, fallback?: string): string;
29
+ /**
30
+ * Stands in for a value that a component draws itself (a bold figure, a page number), so a template can be
31
+ * formatted whole and then split around it with `splitMarkers`. Only for a plain `{name}` placeholder: a marked
32
+ * value isn't a number, so it can't choose a plural.
33
+ */
34
+ export declare function marker(name: string): string;
35
+ /** A formatted word in pieces: its text, and `{ marker }` where each `marker(name)` was. */
36
+ export declare function splitMarkers(text: string): (string | {
37
+ marker: string;
38
+ })[];
39
+ /** A list in `locale`'s words and punctuation, through `Intl.ListFormat`: "A, B, C"; "PDF, PNG or JPEG". */
40
+ export declare function formatList(items: string[], locale: string, options?: Intl.ListFormatOptions): string;
11
41
  //# sourceMappingURL=labels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/lib/labels.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC,CAE3F;AAED,uGAAuG;AACvG,wBAAgB,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAItF"}
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/lib/labels.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,wDAAwD;AACxD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAE1D,iGAAiG;AACjG,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EACzC,QAAQ,EAAE,CAAC,EACX,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,GACpC,CAAC,CAOH;AAiBD,qGAAqG;AACrG,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEzF;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,8GAA8G;AAC9G,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAIxE;AAcD;;;;;GAKG;AACH,wBAAgB,IAAI,CAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,WAAgB,EACxB,MAAM,SAAO,EACb,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAYR;AAKD;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED,4FAA4F;AAC5F,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,CAW1E;AAED,4GAA4G;AAC5G,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,IAAI,CAAC,iBAAoD,GACjE,MAAM,CAER"}
@@ -1,15 +1,103 @@
1
+ import { IntlMessageFormat } from 'intl-messageformat';
2
+ /** The English defaults with any of the product's words laid over them, later layers winning. */
3
+ export function withLabels(defaults, ...layers) {
4
+ const words = { ...defaults };
5
+ for (const layer of layers) {
6
+ if (!layer)
7
+ continue;
8
+ for (const [key, word] of Object.entries(layer))
9
+ if (word !== undefined)
10
+ words[key] = word;
11
+ }
12
+ return words;
13
+ }
14
+ // Compiled templates, by locale and template. Labels are a fixed set, so this stays small; the cap is a guard.
15
+ const compiled = new Map();
16
+ function compile(template, locale) {
17
+ const key = `${locale}\u0000${template}`;
18
+ let message = compiled.get(key);
19
+ if (!message) {
20
+ if (compiled.size >= 1000)
21
+ compiled.clear();
22
+ // ignoreTag: `<b>` is text, as PHP's ICU and a product's translators read it, not rich-text markup.
23
+ message = new IntlMessageFormat(template, locale, undefined, { ignoreTag: true });
24
+ compiled.set(key, message);
25
+ }
26
+ return message;
27
+ }
28
+ /** Formats an ICU template in `locale`. Throws if it is malformed or a value it names is missing. */
29
+ export function formatLabel(template, values, locale) {
30
+ return String(compile(template, locale).format(values));
31
+ }
1
32
  /**
2
- * The words a component shows or says, which a product can replace one component at a time through its `labels`
3
- * prop: an object of strings, any of which can be left out to keep the English default. A word that carries a
4
- * value has a `{name}` placeholder in its string ("Remove {name}") rather than being a function, so `labels`
5
- * stays plain data that a server component can pass to a client one.
33
+ * Finished text as a template that formats to itself, for handing a word one component has formatted to another
34
+ * that formats its labels: an apostrophe is doubled and each brace quoted.
6
35
  */
7
- /** The English defaults with any of the product's words laid over them. */
8
- export function withLabels(defaults, labels) {
9
- return labels ? { ...defaults, ...labels } : defaults;
36
+ export function literal(text) {
37
+ return text.replace(/'/g, "''").replace(/[{}]/g, (brace) => `'${brace}'`);
10
38
  }
11
- /** Fills `{name}` placeholders: `fill('Remove {name}', { name: 'plan.pdf' })` is "Remove plan.pdf". */
12
- export function fill(template, values) {
39
+ /** Replaces `{name}` with its value and nothing else. For a path (`/projects?page={page}`), not for words. */
40
+ export function substitute(template, values) {
13
41
  return template.replace(/\{(\w+)\}/g, (match, key) => key in values ? String(values[key]) : match);
14
42
  }
43
+ function development() {
44
+ try {
45
+ return process.env.NODE_ENV !== 'production';
46
+ }
47
+ catch {
48
+ // No `process` at all: a page with no build step, which is nobody's development server.
49
+ return false;
50
+ }
51
+ }
52
+ /**
53
+ * Formats a word: `fill('Remove {name}', { name: 'plan.pdf' }, 'en')` is "Remove plan.pdf". A word that can't
54
+ * be formatted throws in development. In production it shows `fallback` (the package's English default for the
55
+ * word) formatted with the same values, and if that fails too, `fallback` with its plain `{name}` placeholders
56
+ * replaced, so a page never breaks over a word.
57
+ */
58
+ export function fill(template, values = {}, locale = 'en', fallback) {
59
+ try {
60
+ return formatLabel(template, values, locale);
61
+ }
62
+ catch (error) {
63
+ if (development())
64
+ throw error;
65
+ const english = fallback ?? template;
66
+ try {
67
+ return formatLabel(english, values, 'en');
68
+ }
69
+ catch {
70
+ return substitute(english, values);
71
+ }
72
+ }
73
+ }
74
+ const OPEN = '';
75
+ const CLOSE = '';
76
+ /**
77
+ * Stands in for a value that a component draws itself (a bold figure, a page number), so a template can be
78
+ * formatted whole and then split around it with `splitMarkers`. Only for a plain `{name}` placeholder: a marked
79
+ * value isn't a number, so it can't choose a plural.
80
+ */
81
+ export function marker(name) {
82
+ return `${OPEN}${name}${CLOSE}`;
83
+ }
84
+ /** A formatted word in pieces: its text, and `{ marker }` where each `marker(name)` was. */
85
+ export function splitMarkers(text) {
86
+ const pieces = [];
87
+ const pattern = new RegExp(`${OPEN}([^${CLOSE}]*)${CLOSE}`, 'g');
88
+ let at = 0;
89
+ for (const match of text.matchAll(pattern)) {
90
+ if (match.index > at)
91
+ pieces.push(text.slice(at, match.index));
92
+ pieces.push({ marker: match[1] });
93
+ at = match.index + match[0].length;
94
+ }
95
+ if (at < text.length)
96
+ pieces.push(text.slice(at));
97
+ return pieces;
98
+ }
99
+ /** A list in `locale`'s words and punctuation, through `Intl.ListFormat`: "A, B, C"; "PDF, PNG or JPEG". */
100
+ export function formatList(items, locale, options = { type: 'unit', style: 'short' }) {
101
+ return new Intl.ListFormat(locale, options).format(items);
102
+ }
15
103
  //# sourceMappingURL=labels.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"labels.js","sourceRoot":"","sources":["../../src/lib/labels.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,2EAA2E;AAC3E,MAAM,UAAU,UAAU,CAAmB,QAAW,EAAE,MAA8B;IACtF,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;AACxD,CAAC;AAED,uGAAuG;AACvG,MAAM,UAAU,IAAI,CAAC,QAAgB,EAAE,MAAuC;IAC5E,OAAO,QAAQ,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,GAAW,EAAE,EAAE,CAC3D,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,MA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