@burdenoff/fe-libs 2026.1113.4 → 2026.1113.6

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.
@@ -4,10 +4,10 @@ import { Markdown as t } from "../components/Markdown.js";
4
4
  import { useEffect as n, useState as r } from "react";
5
5
  import { ArrowLeft as i, Clock as a, FileText as o, Shield as s } from "lucide-react";
6
6
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
- import { gql as u } from "@apollo/client";
8
- import { Link as d, useParams as f } from "react-router";
7
+ import { Link as u, useParams as d } from "react-router";
8
+ import { gql as f } from "@apollo/client";
9
9
  // src/shared/pages/LegalPage.tsx
10
- var p = u`
10
+ var p = f`
11
11
  query GetPublicContentPage($slug: String!, $productId: String!) {
12
12
  publicResolvedContentPage(slug: $slug, productId: $productId) {
13
13
  id
@@ -28,8 +28,8 @@ var p = u`
28
28
  security: "security",
29
29
  compliance: "compliance"
30
30
  };
31
- function h({ productId: u, slugMap: h = m, homeRoute: g = "/", homeLabel: _ = "Back to Dashboard" }) {
32
- let { slug: v } = f(), y = e("global"), [b, x] = r(null), [S, C] = r(!0), [w, T] = r(null), E = v ? h[v] || v : "";
31
+ function h({ productId: f, slugMap: h = m, homeRoute: g = "/", homeLabel: _ = "Back to Dashboard" }) {
32
+ let { slug: v } = d(), y = e("global"), [b, x] = r(null), [S, C] = r(!0), [w, T] = r(null), E = v ? h[v] || v : "";
33
33
  return n(() => {
34
34
  if (!E || !y) return;
35
35
  let e = !1;
@@ -39,7 +39,7 @@ function h({ productId: u, slugMap: h = m, homeRoute: g = "/", homeLabel: _ = "B
39
39
  query: p,
40
40
  variables: {
41
41
  slug: E,
42
- productId: u
42
+ productId: f
43
43
  },
44
44
  fetchPolicy: "network-only"
45
45
  });
@@ -60,7 +60,7 @@ function h({ productId: u, slugMap: h = m, homeRoute: g = "/", homeLabel: _ = "B
60
60
  };
61
61
  }, [
62
62
  E,
63
- u,
63
+ f,
64
64
  y
65
65
  ]), S ? /* @__PURE__ */ c("div", {
66
66
  className: "min-h-screen bg-[var(--color-bg-canvas)] flex items-center justify-center",
@@ -91,7 +91,7 @@ function h({ productId: u, slugMap: h = m, homeRoute: g = "/", homeLabel: _ = "B
91
91
  className: "text-text-secondary text-sm",
92
92
  children: "The requested legal page could not be found. It may not exist yet or there was an error loading it."
93
93
  }),
94
- /* @__PURE__ */ c(d, {
94
+ /* @__PURE__ */ c(u, {
95
95
  to: g,
96
96
  className: "\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n ",
97
97
  children: _
@@ -103,7 +103,7 @@ function h({ productId: u, slugMap: h = m, homeRoute: g = "/", homeLabel: _ = "B
103
103
  children: /* @__PURE__ */ l("div", {
104
104
  className: "max-w-4xl mx-auto px-6 py-8",
105
105
  children: [
106
- /* @__PURE__ */ l(d, {
106
+ /* @__PURE__ */ l(u, {
107
107
  to: g,
108
108
  className: "\n inline-flex items-center gap-2 mb-6\n text-text-secondary\n hover:text-text-primary\n transition-all duration-200\n ",
109
109
  children: [/* @__PURE__ */ c(i, { size: 18 }), /* @__PURE__ */ c("span", {
@@ -141,22 +141,22 @@ function h({ productId: u, slugMap: h = m, homeRoute: g = "/", homeLabel: _ = "B
141
141
  children: /* @__PURE__ */ l("div", {
142
142
  className: "flex flex-wrap gap-4 text-sm text-text-tertiary",
143
143
  children: [
144
- /* @__PURE__ */ c(d, {
144
+ /* @__PURE__ */ c(u, {
145
145
  to: "/legal/privacy",
146
146
  className: "hover:text-text-primary transition-colors",
147
147
  children: "Privacy Policy"
148
148
  }),
149
- /* @__PURE__ */ c(d, {
149
+ /* @__PURE__ */ c(u, {
150
150
  to: "/legal/terms",
151
151
  className: "hover:text-text-primary transition-colors",
152
152
  children: "Terms of Service"
153
153
  }),
154
- /* @__PURE__ */ c(d, {
154
+ /* @__PURE__ */ c(u, {
155
155
  to: "/legal/security",
156
156
  className: "hover:text-text-primary transition-colors",
157
157
  children: "Security"
158
158
  }),
159
- /* @__PURE__ */ c(d, {
159
+ /* @__PURE__ */ c(u, {
160
160
  to: "/legal/compliance",
161
161
  className: "hover:text-text-primary transition-colors",
162
162
  children: "Compliance"
@@ -1,6 +1,6 @@
1
- import { graphqlFetch as e } from "../../graphql/fetch.js";
2
- import { useAuth as t } from "./AuthProvider.js";
3
- import { I18nProvider as n, useI18n as r } from "./I18nProvider.js";
1
+ import { useAuth as e } from "./AuthProvider.js";
2
+ import { I18nProvider as t, useI18n as n } from "./I18nProvider.js";
3
+ import { graphqlFetch as r } from "../../graphql/fetch.js";
4
4
  import { DEFAULT_PLATFORM_I18N_PRODUCT_ID as i, createLayeredTranslationLoader as a, effectivePlatformId as o, translationCacheScope as s } from "./translationLayers.js";
5
5
  import { getDefaultTranslationPersistence as c } from "./translationStore.js";
6
6
  import "../../../shared-graphql.js";
@@ -9,14 +9,14 @@ import { jsx as d } from "react/jsx-runtime";
9
9
  import { DirectionProvider as f } from "@radix-ui/react-direction";
10
10
  // src/shared/providers/shell/ProfileI18nBridge.tsx
11
11
  var p = "\n query ExportTranslations($productId: String!, $languageCode: String!, $format: ImportJobFormat!) {\n exportTranslations(productId: $productId, languageCode: $languageCode, format: $format) {\n format\n url\n }\n }\n";
12
- async function m(t, n) {
13
- let r = await e({
12
+ async function m(e, t) {
13
+ let n = await r({
14
14
  gateway: "global",
15
15
  query: p,
16
16
  operationName: "ExportTranslations",
17
17
  variables: {
18
- productId: t,
19
- languageCode: n,
18
+ productId: e,
19
+ languageCode: t,
20
20
  format: "JSON"
21
21
  },
22
22
  extraHeaders: {
@@ -24,19 +24,19 @@ async function m(t, n) {
24
24
  "x-actor-type": "service"
25
25
  }
26
26
  });
27
- if (r.errors?.length || !r.data?.exportTranslations?.url) return null;
28
- let i = r.data.exportTranslations.url, a = decodeURIComponent(i.replace("data:application/json;charset=utf-8,", ""));
27
+ if (n.errors?.length || !n.data?.exportTranslations?.url) return null;
28
+ let i = n.data.exportTranslations.url, a = decodeURIComponent(i.replace("data:application/json;charset=utf-8,", ""));
29
29
  return JSON.parse(a);
30
30
  }
31
31
  function h({ children: e }) {
32
- let { dir: t } = r();
32
+ let { dir: t } = n();
33
33
  return /* @__PURE__ */ d(f, {
34
34
  dir: t,
35
35
  children: e
36
36
  });
37
37
  }
38
- function g({ children: e, i18nProductId: r, platformI18nProductId: f = i, defaultLocale: p = "en", fallbackTranslations: g, disableDynamicFetch: _ = !1, persistTranslations: v = !0, directionMode: y = "off" }) {
39
- let { user: b } = t(), x = b?.id ?? null, S = !_, C = o(r, f), w = l((e) => g?.[e] ?? {}, [g]), T = u(() => a({
38
+ function g({ children: n, i18nProductId: r, platformI18nProductId: f = i, defaultLocale: p = "en", fallbackTranslations: g, disableDynamicFetch: _ = !1, persistTranslations: v = !0, directionMode: y = "off" }) {
39
+ let { user: b } = e(), x = b?.id ?? null, S = !_, C = o(r, f), w = l((e) => g?.[e] ?? {}, [g]), T = u(() => a({
40
40
  productId: r,
41
41
  platformId: C,
42
42
  fallback: w,
@@ -56,7 +56,7 @@ function g({ children: e, i18nProductId: r, platformI18nProductId: f = i, defaul
56
56
  hi: {},
57
57
  ar: {}
58
58
  }, [g]);
59
- return /* @__PURE__ */ d(n, {
59
+ return /* @__PURE__ */ d(t, {
60
60
  defaultLocale: p,
61
61
  translations: D,
62
62
  loadTranslations: S ? T : void 0,
@@ -66,7 +66,7 @@ function g({ children: e, i18nProductId: r, platformI18nProductId: f = i, defaul
66
66
  directionMode: y,
67
67
  profileId: x,
68
68
  showChildrenWhileLoading: !0,
69
- children: /* @__PURE__ */ d(h, { children: e })
69
+ children: /* @__PURE__ */ d(h, { children: n })
70
70
  });
71
71
  }
72
72
  export { g as ProfileI18nBridge };
@@ -19,6 +19,7 @@
19
19
  * "bf-p-{profileId}-theme-density" → string
20
20
  * "bf-p-{profileId}-theme-typography" → string
21
21
  * "bf-p-{profileId}-sidebar-collapsed" → "true"|"false"
22
+ * "bf-p-{profileId}-open-{sectionKey}" → "true"|"false" (remembered open sections, BOFF-11841)
22
23
  * sessionStorage:
23
24
  * "bf-active-profile" → string (profileId for this tab)
24
25
  */
@@ -81,6 +82,14 @@ export declare function getSwitchableProfiles(activeProfileId: string | null): P
81
82
  export declare function setProfiles(profiles: ProfileMeta[]): void;
82
83
  export declare function addProfile(meta: ProfileMeta): void;
83
84
  export declare function removeProfile(profileId: string): void;
85
+ /**
86
+ * Whether this profile left a section open. `null` means the profile never
87
+ * toggled it (or storage holds something else), so the caller's default applies.
88
+ * Throws when storage is unavailable; callers keep their own fallback.
89
+ */
90
+ export declare function getProfileOpenSection(profileId: string, sectionKey: string): boolean | null;
91
+ /** Remember whether this profile left a section open. Throws when storage is unavailable. */
92
+ export declare function setProfileOpenSection(profileId: string, sectionKey: string, open: boolean): void;
84
93
  export declare function removeAllProfiles(): void;
85
94
  export declare function getActiveProfileId(): string | null;
86
95
  export declare function setActiveProfileId(profileId: string): void;
@@ -3,36 +3,38 @@ import { __exportAll as e } from "../../../_virtual/_rolldown/runtime.js";
3
3
  var t = /* @__PURE__ */ e({
4
4
  PROFILE_STORAGE_CHANGE_EVENT: () => s,
5
5
  addProfile: () => y,
6
- clearActiveProfileId: () => w,
7
- getActiveContext: () => z,
8
- getActiveProfileId: () => S,
9
- getActiveTokens: () => L,
10
- getActiveUser: () => I,
11
- getActiveWorkspaceToken: () => R,
12
- getProfileContext: () => M,
13
- getProfileLocale: () => P,
14
- getProfileTokens: () => O,
15
- getProfileUser: () => E,
16
- getProfileWorkspaceToken: () => A,
6
+ clearActiveProfileId: () => O,
7
+ getActiveContext: () => U,
8
+ getActiveProfileId: () => E,
9
+ getActiveTokens: () => V,
10
+ getActiveUser: () => B,
11
+ getActiveWorkspaceToken: () => H,
12
+ getProfileContext: () => I,
13
+ getProfileLocale: () => R,
14
+ getProfileOpenSection: () => S,
15
+ getProfileTokens: () => M,
16
+ getProfileUser: () => A,
17
+ getProfileWorkspaceToken: () => P,
17
18
  getProfiles: () => p,
18
19
  getSelectableProfiles: () => g,
19
20
  getSwitchableProfiles: () => _,
20
21
  hasProfileCredentials: () => h,
21
22
  isPendingVerificationProfile: () => m,
22
- loginProfile: () => B,
23
- logoutActiveProfile: () => V,
24
- logoutAllProfiles: () => H,
25
- removeAllProfiles: () => x,
23
+ loginProfile: () => W,
24
+ logoutActiveProfile: () => G,
25
+ logoutAllProfiles: () => K,
26
+ removeAllProfiles: () => T,
26
27
  removeProfile: () => b,
27
- resolveActiveProfileId: () => T,
28
- setActiveProfileId: () => C,
29
- setProfileContext: () => N,
30
- setProfileLocale: () => F,
31
- setProfileTokens: () => k,
32
- setProfileUser: () => D,
33
- setProfileWorkspaceToken: () => j,
28
+ resolveActiveProfileId: () => k,
29
+ setActiveProfileId: () => D,
30
+ setProfileContext: () => L,
31
+ setProfileLocale: () => z,
32
+ setProfileOpenSection: () => C,
33
+ setProfileTokens: () => N,
34
+ setProfileUser: () => j,
35
+ setProfileWorkspaceToken: () => F,
34
36
  setProfiles: () => v,
35
- switchProfile: () => U
37
+ switchProfile: () => q
36
38
  }), n = "bf-profiles", r = "bf-active-profile", i = "bf-last-active-profile", a = "bf-p", o = "session", s = "bf-profile-storage-change";
37
39
  function c() {
38
40
  typeof window < "u" && window.dispatchEvent(new Event(s));
@@ -58,10 +60,10 @@ function p() {
58
60
  return d(n) ?? [];
59
61
  }
60
62
  function m(e) {
61
- return E(e)?.emailVerified === !1;
63
+ return A(e)?.emailVerified === !1;
62
64
  }
63
65
  function h(e) {
64
- let t = O(e);
66
+ let t = M(e);
65
67
  return !!(t?.accessToken || t?.refreshToken);
66
68
  }
67
69
  function g() {
@@ -92,26 +94,43 @@ function b(e) {
92
94
  "theme-typography",
93
95
  "sidebar-collapsed"
94
96
  ]) localStorage.removeItem(l(e, t)), sessionStorage.removeItem(u(e, t));
97
+ w(e);
95
98
  }
96
- function x() {
99
+ var x = "open-";
100
+ function S(e, t) {
101
+ let n = localStorage.getItem(l(e, x + t));
102
+ return n === "true" || n !== "false" && null;
103
+ }
104
+ function C(e, t, n) {
105
+ localStorage.setItem(l(e, x + t), n ? "true" : "false");
106
+ }
107
+ function w(e) {
108
+ let t = l(e, x), n = [];
109
+ for (let e = 0; e < localStorage.length; e += 1) {
110
+ let r = localStorage.key(e);
111
+ r?.startsWith(t) && n.push(r);
112
+ }
113
+ for (let e of n) localStorage.removeItem(e);
114
+ }
115
+ function T() {
97
116
  let e = p();
98
117
  for (let t of e) b(t.id);
99
118
  localStorage.removeItem(n), sessionStorage.removeItem(r);
100
119
  }
101
- function S() {
120
+ function E() {
102
121
  return sessionStorage.getItem(r);
103
122
  }
104
- function C(e) {
123
+ function D(e) {
105
124
  sessionStorage.setItem(r, e);
106
125
  try {
107
126
  localStorage.setItem(i, e);
108
127
  } catch {}
109
128
  }
110
- function w() {
129
+ function O() {
111
130
  sessionStorage.removeItem(r);
112
131
  }
113
- function T() {
114
- let e = g(), t = S();
132
+ function k() {
133
+ let e = g(), t = E();
115
134
  if (t && e.some((e) => e.id === t)) return t;
116
135
  let n = null;
117
136
  try {
@@ -119,30 +138,30 @@ function T() {
119
138
  } catch {
120
139
  n = null;
121
140
  }
122
- return n && e.some((e) => e.id === n) ? (C(n), n) : e.length > 0 ? (C(e[0].id), e[0].id) : null;
141
+ return n && e.some((e) => e.id === n) ? (D(n), n) : e.length > 0 ? (D(e[0].id), e[0].id) : null;
123
142
  }
124
- function E(e) {
143
+ function A(e) {
125
144
  return d(l(e, "user"));
126
145
  }
127
- function D(e, t) {
146
+ function j(e, t) {
128
147
  let n = l(e, "user");
129
148
  t ? f(n, t) : localStorage.removeItem(n);
130
149
  }
131
- function O(e) {
150
+ function M(e) {
132
151
  return d(l(e, "tokens"));
133
152
  }
134
- function k(e, t) {
153
+ function N(e, t) {
135
154
  let n = l(e, "tokens");
136
155
  t ? f(n, t) : localStorage.removeItem(n);
137
156
  }
138
- function A(e) {
157
+ function P(e) {
139
158
  try {
140
159
  let t = sessionStorage.getItem(u(e, "workspace-token"));
141
160
  if (t) return t;
142
161
  } catch {}
143
162
  return localStorage.getItem(l(e, "workspace-token"));
144
163
  }
145
- function j(e, t) {
164
+ function F(e, t) {
146
165
  let n = l(e, "workspace-token"), r = u(e, "workspace-token");
147
166
  if (t) {
148
167
  try {
@@ -157,35 +176,35 @@ function j(e, t) {
157
176
  }
158
177
  c();
159
178
  }
160
- function M(e) {
179
+ function I(e) {
161
180
  return d(l(e, "context"));
162
181
  }
163
- function N(e, t) {
182
+ function L(e, t) {
164
183
  f(l(e, "context"), t);
165
184
  }
166
- function P(e) {
185
+ function R(e) {
167
186
  return localStorage.getItem(l(e, "locale"));
168
187
  }
169
- function F(e, t) {
188
+ function z(e, t) {
170
189
  localStorage.setItem(l(e, "locale"), t);
171
190
  }
172
- function I() {
173
- let e = T();
174
- return e ? E(e) : null;
175
- }
176
- function L() {
177
- let e = T();
178
- return e ? O(e) : null;
179
- }
180
- function R() {
181
- let e = T();
191
+ function B() {
192
+ let e = k();
182
193
  return e ? A(e) : null;
183
194
  }
184
- function z() {
185
- let e = T();
195
+ function V() {
196
+ let e = k();
186
197
  return e ? M(e) : null;
187
198
  }
188
- function B(e, t) {
199
+ function H() {
200
+ let e = k();
201
+ return e ? P(e) : null;
202
+ }
203
+ function U() {
204
+ let e = k();
205
+ return e ? I(e) : null;
206
+ }
207
+ function W(e, t) {
189
208
  let n = e.id;
190
209
  return y({
191
210
  id: n,
@@ -193,16 +212,16 @@ function B(e, t) {
193
212
  name: e.name ?? `${e.firstName ?? ""} ${e.lastName ?? ""}`.trim(),
194
213
  avatar: e.avatar,
195
214
  lastLogin: (/* @__PURE__ */ new Date()).toISOString()
196
- }), D(n, e), k(n, t), C(n), c(), n;
215
+ }), j(n, e), N(n, t), D(n), c(), n;
197
216
  }
198
- function V() {
199
- let e = S();
200
- e && (b(e), w(), T(), c());
217
+ function G() {
218
+ let e = E();
219
+ e && (b(e), O(), k(), c());
201
220
  }
202
- function H() {
203
- x(), c();
221
+ function K() {
222
+ T(), c();
204
223
  }
205
- function U(e) {
206
- return g().some((t) => t.id === e) ? (C(e), !0) : !1;
224
+ function q(e) {
225
+ return g().some((t) => t.id === e) ? (D(e), !0) : !1;
207
226
  }
208
- export { s as PROFILE_STORAGE_CHANGE_EVENT, t as ProfileStorageManager_exports, y as addProfile, w as clearActiveProfileId, z as getActiveContext, S as getActiveProfileId, L as getActiveTokens, I as getActiveUser, R as getActiveWorkspaceToken, M as getProfileContext, P as getProfileLocale, O as getProfileTokens, E as getProfileUser, A as getProfileWorkspaceToken, p as getProfiles, g as getSelectableProfiles, _ as getSwitchableProfiles, h as hasProfileCredentials, m as isPendingVerificationProfile, B as loginProfile, V as logoutActiveProfile, H as logoutAllProfiles, x as removeAllProfiles, b as removeProfile, T as resolveActiveProfileId, C as setActiveProfileId, N as setProfileContext, F as setProfileLocale, k as setProfileTokens, D as setProfileUser, j as setProfileWorkspaceToken, v as setProfiles, U as switchProfile };
227
+ export { s as PROFILE_STORAGE_CHANGE_EVENT, t as ProfileStorageManager_exports, y as addProfile, O as clearActiveProfileId, U as getActiveContext, E as getActiveProfileId, V as getActiveTokens, B as getActiveUser, H as getActiveWorkspaceToken, I as getProfileContext, R as getProfileLocale, S as getProfileOpenSection, M as getProfileTokens, A as getProfileUser, P as getProfileWorkspaceToken, p as getProfiles, g as getSelectableProfiles, _ as getSwitchableProfiles, h as hasProfileCredentials, m as isPendingVerificationProfile, W as loginProfile, G as logoutActiveProfile, K as logoutAllProfiles, T as removeAllProfiles, b as removeProfile, k as resolveActiveProfileId, D as setActiveProfileId, L as setProfileContext, z as setProfileLocale, C as setProfileOpenSection, N as setProfileTokens, j as setProfileUser, F as setProfileWorkspaceToken, v as setProfiles, q as switchProfile };