@byline/host-tanstack-start 2.6.1 → 2.7.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.
@@ -10,18 +10,22 @@ import type { LocaleDefinition } from '@byline/i18n';
10
10
  * Build a `LocaleDefinition[]` for the language switcher. Per-code
11
11
  * resolution order:
12
12
  *
13
- * 1. An entry from the host's `i18n.interface.localeDefinitions`
14
- * (matched by code). Wins outright — this is the path that lets a
15
- * host author write `Français` instead of the lowercase
16
- * `français` that CLDR's `Intl.DisplayNames` returns for romance
17
- * languages.
13
+ * 1. An entry from the host's configured `localeDefinitions`
14
+ * `i18n.interface.localeDefinitions` for the admin switcher, or
15
+ * `i18n.content.localeDefinitions` when a host frontend resolves
16
+ * content-locale labels (matched by code). Wins outright — this is
17
+ * the path that lets a host author write `Français` instead of the
18
+ * lowercase `français` that CLDR's `Intl.DisplayNames` returns for
19
+ * romance languages.
18
20
  * 2. `Intl.DisplayNames(code).of(code)` — produces a display name in
19
21
  * each locale's own language using CLDR's data.
20
22
  * 3. The raw code, as a last-resort fallback for exotic tags or
21
23
  * runtimes that lack `Intl.DisplayNames`.
22
24
  *
23
- * Used by both the admin layout (post-auth) and the sign-in page
24
- * (pre-auth) anywhere `<LanguageMenu>` mounts.
25
+ * Dimension-agnostic: pass whichever `(codes, localeDefinitions)` pair
26
+ * you need. Used by the admin layout (post-auth) and the sign-in page
27
+ * (pre-auth) for the interface switcher — anywhere `<LanguageMenu>`
28
+ * mounts — and reusable by host frontends for the content dimension.
25
29
  */
26
30
  export declare function buildLocaleDefinitions(codes: readonly string[], configured: ReadonlyArray<{
27
31
  code: string;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "type": "module",
5
5
  "license": "MPL-2.0",
6
- "version": "2.6.1",
6
+ "version": "2.7.0",
7
7
  "engines": {
8
8
  "node": ">=20.9.0"
9
9
  },
@@ -115,13 +115,13 @@
115
115
  "react-swipeable": "^7.0.2",
116
116
  "uuid": "^14.0.0",
117
117
  "zod": "^4.4.3",
118
- "@byline/admin": "2.6.1",
119
- "@byline/ai": "2.6.1",
120
- "@byline/auth": "2.6.1",
121
- "@byline/client": "2.6.1",
122
- "@byline/i18n": "2.6.1",
123
- "@byline/core": "2.6.1",
124
- "@byline/ui": "2.6.1"
118
+ "@byline/ai": "2.7.0",
119
+ "@byline/core": "2.7.0",
120
+ "@byline/i18n": "2.7.0",
121
+ "@byline/client": "2.7.0",
122
+ "@byline/admin": "2.7.0",
123
+ "@byline/auth": "2.7.0",
124
+ "@byline/ui": "2.7.0"
125
125
  },
126
126
  "peerDependencies": {
127
127
  "@tanstack/react-router": "^1.167.0",
@@ -12,18 +12,22 @@ import type { LocaleDefinition } from '@byline/i18n'
12
12
  * Build a `LocaleDefinition[]` for the language switcher. Per-code
13
13
  * resolution order:
14
14
  *
15
- * 1. An entry from the host's `i18n.interface.localeDefinitions`
16
- * (matched by code). Wins outright — this is the path that lets a
17
- * host author write `Français` instead of the lowercase
18
- * `français` that CLDR's `Intl.DisplayNames` returns for romance
19
- * languages.
15
+ * 1. An entry from the host's configured `localeDefinitions`
16
+ * `i18n.interface.localeDefinitions` for the admin switcher, or
17
+ * `i18n.content.localeDefinitions` when a host frontend resolves
18
+ * content-locale labels (matched by code). Wins outright — this is
19
+ * the path that lets a host author write `Français` instead of the
20
+ * lowercase `français` that CLDR's `Intl.DisplayNames` returns for
21
+ * romance languages.
20
22
  * 2. `Intl.DisplayNames(code).of(code)` — produces a display name in
21
23
  * each locale's own language using CLDR's data.
22
24
  * 3. The raw code, as a last-resort fallback for exotic tags or
23
25
  * runtimes that lack `Intl.DisplayNames`.
24
26
  *
25
- * Used by both the admin layout (post-auth) and the sign-in page
26
- * (pre-auth) anywhere `<LanguageMenu>` mounts.
27
+ * Dimension-agnostic: pass whichever `(codes, localeDefinitions)` pair
28
+ * you need. Used by the admin layout (post-auth) and the sign-in page
29
+ * (pre-auth) for the interface switcher — anywhere `<LanguageMenu>`
30
+ * mounts — and reusable by host frontends for the content dimension.
27
31
  */
28
32
  export function buildLocaleDefinitions(
29
33
  codes: readonly string[],