@burdenoff/fe-libs 2026.1007.4 → 2026.1007.5

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 (83) hide show
  1. package/dist/chrome/AutoBreadcrumbs.d.ts.map +1 -1
  2. package/dist/chrome/AutoBreadcrumbs.js +65 -76
  3. package/dist/chrome/Breadcrumb.d.ts.map +1 -1
  4. package/dist/chrome/Breadcrumbs.d.ts.map +1 -1
  5. package/dist/chrome/Breadcrumbs.js +47 -46
  6. package/dist/chrome/ContextSwitcher.js +86 -86
  7. package/dist/chrome/HeaderBar.d.ts.map +1 -1
  8. package/dist/chrome/HeaderBar.js +111 -107
  9. package/dist/chrome/HeaderThemeSwitcher.d.ts.map +1 -1
  10. package/dist/chrome/HeaderThemeSwitcher.js +46 -45
  11. package/dist/chrome/LanguageSwitcher.js +4 -4
  12. package/dist/chrome/MobileTabBar.js +4 -4
  13. package/dist/chrome/PageHeader.d.ts.map +1 -1
  14. package/dist/chrome/PageHeader.js +32 -30
  15. package/dist/chrome/PersonaSurfaceControls.js +8 -8
  16. package/dist/chrome/ProductSideNav.js +6 -6
  17. package/dist/chrome/ProfileSwitcher.d.ts.map +1 -1
  18. package/dist/chrome/ProfileSwitcher.js +89 -88
  19. package/dist/chrome/SideNavigation.js +4 -4
  20. package/dist/chrome/Tabs.d.ts.map +1 -1
  21. package/dist/chrome/Tabs.js +30 -29
  22. package/dist/chrome/breadcrumbLabel.d.ts +10 -0
  23. package/dist/chrome/breadcrumbLabel.d.ts.map +1 -0
  24. package/dist/chrome/breadcrumbLabel.js +31 -0
  25. package/dist/chrome/contextSwitcher/TriggerButton.d.ts.map +1 -1
  26. package/dist/chrome/contextSwitcher/TriggerButton.js +40 -36
  27. package/dist/chrome/notificationCenter/BellButton.d.ts.map +1 -1
  28. package/dist/chrome/notificationCenter/BellButton.js +29 -25
  29. package/dist/chrome/shellLabelManifest.d.ts +27 -0
  30. package/dist/chrome/shellLabelManifest.d.ts.map +1 -0
  31. package/dist/chrome/sideNavigation/SidebarHeader.d.ts.map +1 -1
  32. package/dist/chrome/sideNavigation/SidebarHeader.js +23 -22
  33. package/dist/shared/assistant/appControls/languageReply.d.ts +6 -1
  34. package/dist/shared/assistant/appControls/languageReply.d.ts.map +1 -1
  35. package/dist/shared/assistant/i18nManifest.d.ts +17 -5
  36. package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
  37. package/dist/shared/assistant/i18nManifest.js +27 -22
  38. package/dist/shared/assistant/index.d.ts +1 -0
  39. package/dist/shared/assistant/index.d.ts.map +1 -1
  40. package/dist/shared/assistant/productCopy.d.ts +78 -0
  41. package/dist/shared/assistant/productCopy.d.ts.map +1 -0
  42. package/dist/shared/assistant/productCopy.js +45 -0
  43. package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
  44. package/dist/shared/assistant/ui/AssistantChatArea.js +2 -2
  45. package/dist/shared/assistant/ui/AssistantEmptyState.d.ts.map +1 -1
  46. package/dist/shared/assistant/ui/AssistantEmptyState.js +30 -22
  47. package/dist/shared/assistant/ui/AssistantHeader.d.ts.map +1 -1
  48. package/dist/shared/assistant/ui/AssistantHeader.js +46 -45
  49. package/dist/shared/components/ContextConversationWidget.js +1 -1
  50. package/dist/shared/events/sinks/RybbitSink.d.ts.map +1 -1
  51. package/dist/shared/events/sinks/RybbitSink.js +66 -69
  52. package/dist/shared/providers/AppShellProvider.d.ts +17 -0
  53. package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
  54. package/dist/shared/providers/AppShellProvider.js +188 -180
  55. package/dist/shared/providers/shell/I18nProvider.d.ts +92 -4
  56. package/dist/shared/providers/shell/I18nProvider.d.ts.map +1 -1
  57. package/dist/shared/providers/shell/I18nProvider.js +187 -79
  58. package/dist/shared/providers/shell/ProfileI18nBridge.d.ts +18 -2
  59. package/dist/shared/providers/shell/ProfileI18nBridge.d.ts.map +1 -1
  60. package/dist/shared/providers/shell/ProfileI18nBridge.js +55 -41
  61. package/dist/shared/providers/shell/directionMode.d.ts +25 -0
  62. package/dist/shared/providers/shell/directionMode.d.ts.map +1 -0
  63. package/dist/shared/providers/shell/directionMode.js +34 -0
  64. package/dist/shared/providers/shell/index.d.ts +4 -2
  65. package/dist/shared/providers/shell/index.d.ts.map +1 -1
  66. package/dist/shared/providers/shell/translationLayers.d.ts +30 -0
  67. package/dist/shared/providers/shell/translationLayers.d.ts.map +1 -0
  68. package/dist/shared/providers/shell/translationLayers.js +35 -0
  69. package/dist/shared/providers/shell/translationStore.d.ts +55 -0
  70. package/dist/shared/providers/shell/translationStore.d.ts.map +1 -0
  71. package/dist/shared/providers/shell/translationStore.js +100 -0
  72. package/dist/shared/providers/shell/useShellLabel.d.ts +13 -1
  73. package/dist/shared/providers/shell/useShellLabel.d.ts.map +1 -1
  74. package/dist/shared/providers/shell/useShellLabel.js +10 -9
  75. package/dist/shared-assistant.js +163 -162
  76. package/dist/shared-providers-shell.js +20 -19
  77. package/dist/ui/boff-ui2.d.ts.map +1 -1
  78. package/dist/ui/cta-overflow-menu.d.ts.map +1 -1
  79. package/dist/ui/cta-overflow-menu.js +20 -18
  80. package/dist/ui/guidance.d.ts +1 -1
  81. package/dist/ui/guidance.d.ts.map +1 -1
  82. package/dist/ui/guidance.js +53 -52
  83. package/package.json +3 -2
@@ -0,0 +1,25 @@
1
+ import { DirectionMode } from './I18nProvider';
2
+ export declare const DIRECTION_PREVIEW_SESSION_KEY = "bf-dir-preview";
3
+ export declare const DIRECTION_PREVIEW_LOCAL_KEY = "bf-rtl-preview";
4
+ export interface DirectionStorage {
5
+ getItem(key: string): string | null;
6
+ setItem(key: string, value: string): void;
7
+ removeItem(key: string): void;
8
+ }
9
+ export interface ResolveDirectionModeInput {
10
+ /** The product flag. Default false. */
11
+ enabled?: boolean;
12
+ /** Whether the QA preview is honoured. Default true. */
13
+ allowPreview?: boolean;
14
+ /** `window.location.search`, or '' when unavailable. */
15
+ search: string;
16
+ session: DirectionStorage | null;
17
+ local: DirectionStorage | null;
18
+ }
19
+ export declare function resolveDirectionMode(input: ResolveDirectionModeInput): DirectionMode;
20
+ /** `resolveDirectionMode` against the real browser globals. */
21
+ export declare function resolveBrowserDirectionMode(options: {
22
+ enabled?: boolean;
23
+ allowPreview?: boolean;
24
+ }): DirectionMode;
25
+ //# sourceMappingURL=directionMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directionMode.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/directionMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,eAAO,MAAM,6BAA6B,mBAAmB,CAAC;AAC9D,eAAO,MAAM,2BAA2B,mBAAmB,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,yBAAyB;IACxC,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wDAAwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAChC;AAaD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,aAAa,CAyBpF;AAED,+DAA+D;AAC/D,wBAAgB,2BAA2B,CAAC,OAAO,EAAE;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,aAAa,CAQhB"}
@@ -0,0 +1,34 @@
1
+ //#region src/shared/providers/shell/directionMode.ts
2
+ var e = "bf-dir-preview", t = (e) => e === "rtl" ? "rtl" : e === "locale" ? "locale" : null;
3
+ function n(e, t) {
4
+ try {
5
+ return e();
6
+ } catch {
7
+ return t;
8
+ }
9
+ }
10
+ function r(r) {
11
+ let i = r.enabled ? "locale" : "off";
12
+ if (r.allowPreview === !1) return i;
13
+ let a = n(() => new URLSearchParams(r.search).get("dir"), null);
14
+ if (a !== null) {
15
+ let i = t(a);
16
+ if (n(() => {
17
+ i ? r.session?.setItem(e, i) : r.session?.removeItem(e);
18
+ }, void 0), i) return i;
19
+ } else {
20
+ let i = t(n(() => r.session?.getItem(e), null));
21
+ if (i) return i;
22
+ }
23
+ return t(n(() => r.local?.getItem("bf-rtl-preview"), null)) ?? i;
24
+ }
25
+ function i(e) {
26
+ return typeof window > "u" ? e.enabled ? "locale" : "off" : r({
27
+ ...e,
28
+ search: n(() => window.location.search, ""),
29
+ session: n(() => window.sessionStorage, null),
30
+ local: n(() => window.localStorage, null)
31
+ });
32
+ }
33
+ //#endregion
34
+ export { i as resolveBrowserDirectionMode };
@@ -1,7 +1,9 @@
1
1
  export { ThemeProvider, useTheme } from './ThemeProvider';
2
2
  export type { ThemeMode, Brand, Density, Typography, ThemeContextValue, ThemeProviderProps, } from './ThemeProvider';
3
- export { I18nProvider, useI18n, clearTranslationCache, isTranslationAttempted, } from './I18nProvider';
4
- export type { Locale, TranslationDictionary, I18nContextValue, I18nProviderProps, FetchTranslationsFn, } from './I18nProvider';
3
+ export { I18nProvider, useI18n, useOptionalI18n, clearTranslationCache, isTranslationAttempted, LOCALE_DIRECTION, localeDirection, } from './I18nProvider';
4
+ export type { Locale, TranslationDictionary, I18nContextValue, I18nProviderProps, FetchTranslationsFn, LoadTranslationsFn, TranslationLoadResult, LocaleLoadStatus, DirectionMode, TextDirection, } from './I18nProvider';
5
+ export { useShellLabel } from './useShellLabel';
6
+ export type { ShellLabel } from './useShellLabel';
5
7
  export { AuthProvider, useAuth } from './AuthProvider';
6
8
  export type { User, AuthTokens, Account, AuthContextValue, AuthProviderProps, } from './AuthProvider';
7
9
  export { AuthBridgeClient, initAuthBridge, getAuthBridge, destroyAuthBridge, isAuthBridgeInitialized, } from './AuthBridgeClient';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EACV,SAAS,EACT,KAAK,EACL,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,YAAY,EACZ,OAAO,EACP,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,MAAM,EACN,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EACV,IAAI,EACJ,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAM1D,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE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Y,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EACV,uBAAuB,EACvB,oCAAoC,GACrC,MAAM,mCAAmC,CAAC;AAG3C,YAAY,EAAE,sBAAsB,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE9F,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EACV,SAAS,EACT,KAAK,EACL,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,YAAY,EACZ,OAAO,EACP,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,MAAM,EACN,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EACV,IAAI,EACJ,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,gBAAgB,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BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAG1E,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACrF,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAG5E,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACzE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EACV,uBAAuB,EACvB,oCAAoC,GACrC,MAAM,mCAAmC,CAAC;AAG3C,YAAY,EAAE,sBAAsB,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE9F,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { Locale, TranslationDictionary, TranslationLoadResult } from './I18nProvider';
2
+ /** The platform dictionary every app layers under its own. */
3
+ export declare const DEFAULT_PLATFORM_I18N_PRODUCT_ID = "workspaces";
4
+ /** Fetch one product's dictionary for a locale; `null` when it could not be had. */
5
+ export type FetchDictionaryFn = (productId: string, locale: Locale) => Promise<TranslationDictionary | null>;
6
+ export interface LayeredTranslationLoaderOptions {
7
+ /** The app's own i18n product id. */
8
+ productId: string;
9
+ /**
10
+ * The platform dictionary to layer underneath. `null` opts out; the same id
11
+ * as `productId` means "this app is the platform" and is fetched once.
12
+ */
13
+ platformId: string | null;
14
+ /** The bundled fallback for a locale (usually English only). */
15
+ fallback: (locale: Locale) => TranslationDictionary;
16
+ fetchDictionary: FetchDictionaryFn;
17
+ }
18
+ /** The platform id actually layered, or null when there is nothing to layer. */
19
+ export declare function effectivePlatformId(productId: string, platformId: string | null): string | null;
20
+ /**
21
+ * The cache scope for a product+platform pair. Two apps on one origin (the
22
+ * Workspaces SPA in the auth bridge iframe, a product app) must never read each
23
+ * other's merged dictionary, and a dictionary merged WITH the platform must not
24
+ * be reused by a build that merges WITHOUT it.
25
+ */
26
+ export declare function translationCacheScope(productId: string, platformId: string | null): string;
27
+ /** fallback < platform < product. */
28
+ export declare function layerTranslations(fallback: TranslationDictionary, platform: TranslationDictionary | null, product: TranslationDictionary | null): TranslationDictionary;
29
+ export declare function createLayeredTranslationLoader(options: LayeredTranslationLoaderOptions): (locale: Locale) => Promise<TranslationLoadResult>;
30
+ //# sourceMappingURL=translationLayers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translationLayers.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/translationLayers.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE3F,8DAA8D;AAC9D,eAAO,MAAM,gCAAgC,eAAe,CAAC;AAE7D,oFAAoF;AACpF,MAAM,MAAM,iBAAiB,GAAG,CAC9B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,KACX,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;AAE3C,MAAM,WAAW,+BAA+B;IAC9C,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gEAAgE;IAChE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,qBAAqB,CAAC;IACpD,eAAe,EAAE,iBAAiB,CAAC;CACpC;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAG/F;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAG1F;AAED,qCAAqC;AACrC,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,qBAAqB,EAC/B,QAAQ,EAAE,qBAAqB,GAAG,IAAI,EACtC,OAAO,EAAE,qBAAqB,GAAG,IAAI,GACpC,qBAAqB,CAGvB;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,+BAA+B,GACvC,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAyBpD"}
@@ -0,0 +1,35 @@
1
+ import { mergeTranslationDictionaries as e } from "./I18nProvider.js";
2
+ //#region src/shared/providers/shell/translationLayers.ts
3
+ var t = "workspaces";
4
+ function n(e, t) {
5
+ return !t || t === e ? null : t;
6
+ }
7
+ function r(e, t) {
8
+ let r = n(e, t);
9
+ return r ? `${e}+${r}` : e;
10
+ }
11
+ function i(t, n, r) {
12
+ let i = n ? e(t, n) : t;
13
+ return r ? e(i, r) : i;
14
+ }
15
+ function a(e) {
16
+ let t = n(e.productId, e.platformId), r = async (t, n) => {
17
+ try {
18
+ return await e.fetchDictionary(t, n);
19
+ } catch {
20
+ return null;
21
+ }
22
+ };
23
+ return async (n) => {
24
+ let [a, o] = await Promise.all([r(e.productId, n), t ? r(t, n) : Promise.resolve(null)]);
25
+ return a === null && o === null ? {
26
+ translations: {},
27
+ complete: !1
28
+ } : {
29
+ translations: i(e.fallback(n), o, a),
30
+ complete: a !== null
31
+ };
32
+ };
33
+ }
34
+ //#endregion
35
+ export { t as DEFAULT_PLATFORM_I18N_PRODUCT_ID, a as createLayeredTranslationLoader, n as effectivePlatformId, r as translationCacheScope };
@@ -0,0 +1,55 @@
1
+ import { TranslationDictionary } from './I18nProvider';
2
+ /** A dictionary as stored, with the content hash that decides replacement. */
3
+ export interface PersistedTranslations {
4
+ translations: TranslationDictionary;
5
+ hash: string;
6
+ }
7
+ /** What `I18nProvider` needs from a persistent cache. */
8
+ export interface TranslationPersistence {
9
+ read(scope: string, locale: string): Promise<PersistedTranslations | null>;
10
+ write(scope: string, locale: string, entry: PersistedTranslations): Promise<void>;
11
+ }
12
+ /** One stored row. `id` is `scope|locale`. */
13
+ export interface TranslationRecord extends PersistedTranslations {
14
+ id: string;
15
+ scope: string;
16
+ locale: string;
17
+ savedAt: number;
18
+ }
19
+ /** The storage primitives the persistence logic is written against. */
20
+ export interface TranslationBackend {
21
+ get(id: string): Promise<TranslationRecord | null>;
22
+ put(record: TranslationRecord): Promise<void>;
23
+ list(): Promise<readonly TranslationRecord[]>;
24
+ delete(id: string): Promise<void>;
25
+ }
26
+ export interface TranslationPersistenceOptions {
27
+ /** Locales kept per scope, newest first. Default 2. */
28
+ maxEntriesPerScope?: number;
29
+ /** A read slower than this counts as a miss. Default 1500 ms. */
30
+ readTimeoutMs?: number;
31
+ /** Clock, injectable for tests. */
32
+ now?: () => number;
33
+ }
34
+ export declare const DEFAULT_MAX_ENTRIES_PER_SCOPE = 2;
35
+ export declare const DEFAULT_READ_TIMEOUT_MS = 1500;
36
+ export declare function translationRecordId(scope: string, locale: string): string;
37
+ /**
38
+ * FNV-1a (32-bit) over the canonical JSON of a dictionary, as 8 hex digits.
39
+ *
40
+ * Only used to decide "did the published dictionary change?", so a fast
41
+ * non-cryptographic hash is enough; the JSON is produced by the same code path
42
+ * on every load, so key order is stable for identical content.
43
+ */
44
+ export declare function hashTranslations(translations: TranslationDictionary): string;
45
+ /** Persistence over any backend; never rejects. */
46
+ export declare function createTranslationPersistence(backend: TranslationBackend, options?: TranslationPersistenceOptions): TranslationPersistence;
47
+ /** The IndexedDB adapter. The database is opened lazily, once. */
48
+ export declare function indexedDbTranslationBackend(factory: IDBFactory): TranslationBackend;
49
+ /**
50
+ * The app-wide persistent cache, or null where IndexedDB is unavailable (SSR,
51
+ * test runners, some privacy modes). Reading the `indexedDB` global can itself
52
+ * throw in a sandboxed frame, hence the try.
53
+ */
54
+ export declare function getDefaultTranslationPersistence(): TranslationPersistence | null;
55
+ //# sourceMappingURL=translationStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translationStore.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/translationStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE5D,8EAA8E;AAC9E,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,qBAAqB,CAAC;IACpC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yDAAyD;AACzD,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;IAC3E,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnF;AAED,8CAA8C;AAC9C,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,uEAAuE;AACvE,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACnD,GAAG,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,IAAI,IAAI,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,6BAA6B;IAC5C,uDAAuD;IACvD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,eAAO,MAAM,uBAAuB,OAAQ,CAAC;AAE7C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,qBAAqB,GAAG,MAAM,CAQ5E;AAsBD,mDAAmD;AACnD,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,kBAAkB,EAC3B,OAAO,GAAE,6BAAkC,GAC1C,sBAAsB,CAyCxB;AAuBD,kEAAkE;AAClE,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,UAAU,GAAG,kBAAkB,CAmDnF;AAID;;;;GAIG;AACH,wBAAgB,gCAAgC,IAAI,sBAAsB,GAAG,IAAI,CAYhF"}
@@ -0,0 +1,100 @@
1
+ function e(e, t) {
2
+ return `${e}|${t}`;
3
+ }
4
+ function t(e) {
5
+ let t = JSON.stringify(e), n = 2166136261;
6
+ for (let e = 0; e < t.length; e += 1) n ^= t.charCodeAt(e), n = Math.imul(n, 16777619);
7
+ return (n >>> 0).toString(16).padStart(8, "0");
8
+ }
9
+ function n(e) {
10
+ return typeof e == "object" && !!e && !Array.isArray(e);
11
+ }
12
+ function r(e, t, n) {
13
+ return new Promise((r) => {
14
+ let i = setTimeout(() => r(n), t);
15
+ e.then((e) => {
16
+ clearTimeout(i), r(e);
17
+ }, () => {
18
+ clearTimeout(i), r(n);
19
+ });
20
+ });
21
+ }
22
+ function i(t, i = {}) {
23
+ let a = Math.max(1, i.maxEntriesPerScope ?? 2), o = i.readTimeoutMs ?? 1500, s = i.now ?? (() => Date.now()), c = async (e, n) => {
24
+ let r = [...(await t.list()).filter((t) => t.scope === e)].sort((e, t) => t.savedAt - e.savedAt).filter((e, t) => e.id !== n && t >= a);
25
+ await Promise.all(r.map((e) => t.delete(e.id)));
26
+ };
27
+ return {
28
+ async read(i, a) {
29
+ let s = await r(t.get(e(i, a)), o, null);
30
+ return !s || typeof s.hash != "string" || !n(s.translations) ? null : {
31
+ translations: s.translations,
32
+ hash: s.hash
33
+ };
34
+ },
35
+ async write(n, r, i) {
36
+ try {
37
+ let a = e(n, r);
38
+ await t.put({
39
+ id: a,
40
+ scope: n,
41
+ locale: r,
42
+ translations: i.translations,
43
+ hash: i.hash,
44
+ savedAt: s()
45
+ }), await c(n, a);
46
+ } catch {}
47
+ }
48
+ };
49
+ }
50
+ var a = "boff-i18n", o = 1, s = "dictionaries";
51
+ function c(e) {
52
+ return new Promise((t, n) => {
53
+ e.onsuccess = () => t(e.result), e.onerror = () => n(e.error ?? /* @__PURE__ */ Error("IndexedDB request failed"));
54
+ });
55
+ }
56
+ function l(e) {
57
+ return new Promise((t, n) => {
58
+ e.oncomplete = () => t(), e.onerror = () => n(e.error ?? /* @__PURE__ */ Error("IndexedDB transaction failed")), e.onabort = () => n(e.error ?? /* @__PURE__ */ Error("IndexedDB transaction aborted"));
59
+ });
60
+ }
61
+ function u(e) {
62
+ let t = null, n = () => (t || (t = new Promise((t, n) => {
63
+ let r = e.open(a, o);
64
+ r.onupgradeneeded = () => {
65
+ let e = r.result;
66
+ e.objectStoreNames.contains(s) || e.createObjectStore(s, { keyPath: "id" });
67
+ }, r.onsuccess = () => t(r.result), r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("IndexedDB open failed")), r.onblocked = () => n(/* @__PURE__ */ Error("IndexedDB open blocked"));
68
+ }), t.catch(() => {
69
+ t = null;
70
+ })), t);
71
+ return {
72
+ async get(e) {
73
+ return await c((await n()).transaction(s, "readonly").objectStore(s).get(e)) ?? null;
74
+ },
75
+ async put(e) {
76
+ let t = (await n()).transaction(s, "readwrite");
77
+ t.objectStore(s).put(e), await l(t);
78
+ },
79
+ async list() {
80
+ return await c((await n()).transaction(s, "readonly").objectStore(s).getAll());
81
+ },
82
+ async delete(e) {
83
+ let t = (await n()).transaction(s, "readwrite");
84
+ t.objectStore(s).delete(e), await l(t);
85
+ }
86
+ };
87
+ }
88
+ var d;
89
+ function f() {
90
+ if (d !== void 0) return d;
91
+ let e;
92
+ try {
93
+ e = typeof indexedDB > "u" ? void 0 : indexedDB;
94
+ } catch {
95
+ e = void 0;
96
+ }
97
+ return d = e ? i(u(e)) : null, d;
98
+ }
99
+ //#endregion
100
+ export { f as getDefaultTranslationPersistence, t as hashTranslations };
@@ -1,3 +1,5 @@
1
+ /** Resolve one shell label: `(key, englishFallback, params?) => text`. */
2
+ export type ShellLabel = (key: string, fallback: string, params?: Record<string, string | number>) => string;
1
3
  /**
2
4
  * Resolve a shell chrome label through the i18n service, with an English
3
5
  * fallback.
@@ -8,6 +10,7 @@
8
10
  *
9
11
  * const label = useShellLabel();
10
12
  * label('nav.collapse', 'Collapse');
13
+ * label('notifications.bellLabelUnread', 'Notifications ({{count}} unread)', { count });
11
14
  *
12
15
  * Used by the shell's own chrome (side nav, footer, breadcrumbs) so those
13
16
  * strings follow the active locale instead of being permanently English.
@@ -15,6 +18,15 @@
15
18
  * back to this, so a host can still override:
16
19
  *
17
20
  * const text = collapseLabel ?? label('nav.collapse', 'Collapse');
21
+ *
22
+ * `{{name}}` / `{name}` placeholders are filled from `params` whichever text
23
+ * wins — the translation or the English.
24
+ *
25
+ * ★ Outside an `I18nProvider` this returns the English instead of throwing.
26
+ * The chrome and the `ui/` primitives (Tabs, NextSteps, the overflow menu, the
27
+ * consent banner) are public components that hosts, microfrontend tests and
28
+ * stories render standalone; a translated label must never make them crash
29
+ * where an English one did not.
18
30
  */
19
- export declare function useShellLabel(): (key: string, fallback: string) => string;
31
+ export declare function useShellLabel(): ShellLabel;
20
32
  //# sourceMappingURL=useShellLabel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useShellLabel.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/useShellLabel.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CASzE"}
1
+ {"version":3,"file":"useShellLabel.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/useShellLabel.ts"],"names":[],"mappings":"AAIA,0EAA0E;AAC1E,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAAM,CAAC;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAW1C"}
@@ -1,12 +1,13 @@
1
- import { useI18n as e } from "./I18nProvider.js";
2
- import { useCallback as t } from "react";
1
+ import { interpolate as e } from "./interpolate.js";
2
+ import { useOptionalI18n as t } from "./I18nProvider.js";
3
+ import { useCallback as n } from "react";
3
4
  //#region src/shared/providers/shell/useShellLabel.ts
4
- function n() {
5
- let { t: n } = e();
6
- return t((e, t) => {
7
- let r = n(e);
8
- return r === e ? t : r;
9
- }, [n]);
5
+ function r() {
6
+ let r = t()?.t;
7
+ return n((t, n, i) => {
8
+ let a = r ? r(t) : t, o = a === t ? n : a;
9
+ return i ? e(o, i) : o;
10
+ }, [r]);
10
11
  }
11
12
  //#endregion
12
- export { n as useShellLabel };
13
+ export { r as useShellLabel };