@burdenoff/fe-libs 2026.723.4 → 2026.725.1

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.
@@ -28,6 +28,8 @@ export declare const GATEWAYS: {
28
28
  readonly defaultBaseUrl: "https://gw-global.local.burdenoff.com";
29
29
  /** GraphQL endpoint path */
30
30
  readonly graphql: "/global/graphql";
31
+ /** SSE endpoint path for subscriptions (same endpoint, gateway detects via Accept header) */
32
+ readonly sse: "/global/graphql";
31
33
  /** WebSocket endpoint for subscriptions (if needed) */
32
34
  readonly ws: "/global/graphql/ws";
33
35
  };
@@ -53,6 +55,8 @@ export declare function getGatewayConfig(gateway: Gateway): {
53
55
  readonly defaultBaseUrl: "https://gw-global.local.burdenoff.com";
54
56
  /** GraphQL endpoint path */
55
57
  readonly graphql: "/global/graphql";
58
+ /** SSE endpoint path for subscriptions (same endpoint, gateway detects via Accept header) */
59
+ readonly sse: "/global/graphql";
56
60
  /** WebSocket endpoint for subscriptions (if needed) */
57
61
  readonly ws: "/global/graphql/ws";
58
62
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;;QAEjB,uCAAuC;;QAEvC,4BAA4B;;QAE5B,6FAA6F;;;;QAI7F,uCAAuC;;QAEvC,4BAA4B;;QAE5B,uDAAuD;;;CAGjD,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC;AACjD,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE5C;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,MAAM,CAMlF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,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C;IACvB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AA8FD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,gBAwsB/D;AASD,MAAM,WAAW,eAAe;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC;IAC3C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CA0BlE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,CAKjD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAK9C;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAStC"}
@@ -7,7 +7,7 @@ import { SSELink as l } from "./links/sse-link.js";
7
7
  import { onError as u } from "@apollo/client/link/error";
8
8
  import { RetryLink as d } from "@apollo/client/link/retry";
9
9
  import { setContext as f } from "@apollo/client/link/context";
10
- import { ApolloClient as ee, ApolloLink as p, InMemoryCache as te, Observable as m, from as h, split as ne } from "@apollo/client/core";
10
+ import { ApolloClient as ee, ApolloLink as p, InMemoryCache as te, Observable as m, from as ne, split as h } from "@apollo/client/core";
11
11
  import { getMainDefinition as g } from "@apollo/client/utilities";
12
12
  import { print as _ } from "graphql";
13
13
  //#region src/shared/graphql/client.ts
@@ -104,33 +104,33 @@ function le({ uri: e, batchMax: t, batchInterval: n }) {
104
104
  }));
105
105
  }
106
106
  function O(a) {
107
- let { gateway: s, baseUrl: _, authToken: y, workspaceToken: b, locale: x, geography: w, organizationId: T, productId: E, productSlug: D, workspaceId: O, projectId: k, tenantId: A, cache: ue, enableSubscriptions: de = !1, sseUrl: fe, onAuthError: j, onRefreshToken: M, onNetworkError: N, onNetworkStatusChange: P, onMutationSuccess: F, maxRetryAttempts: pe = 3, batchMax: me = 10, batchInterval: he, debug: I = !1 } = a, L = null, R = null, ge = (e) => {
108
- R ||= setTimeout(() => {
109
- R = null, L && L.refetchQueries({ include: "active" }).catch((t) => {
110
- I && console.warn("[GraphQL] Active query refresh failed after mutation:", {
107
+ let { gateway: s, baseUrl: _, authToken: y, workspaceToken: b, locale: x, geography: w, organizationId: T, productId: E, productSlug: D, workspaceId: O, projectId: k, tenantId: A, cache: j, enableSubscriptions: M = !1, sseUrl: ue, onAuthError: N, onRefreshToken: P, onNetworkError: F, onNetworkStatusChange: I, onMutationSuccess: L, maxRetryAttempts: de = 3, batchMax: fe = 10, batchInterval: pe, debug: R = !1 } = a, z = null, B = null, me = (e) => {
108
+ B ||= setTimeout(() => {
109
+ B = null, z && z.refetchQueries({ include: "active" }).catch((t) => {
110
+ R && console.warn("[GraphQL] Active query refresh failed after mutation:", {
111
111
  gateway: s,
112
112
  operationName: e,
113
113
  error: t
114
114
  });
115
115
  });
116
116
  }, 0);
117
- }, z = e[s], B = n(t(_, s)), V = le({
118
- uri: B,
119
- batchMax: me,
120
- batchInterval: he
121
- }), H = f((e, t) => {
117
+ }, V = e[s], H = n(t(_, s)), U = le({
118
+ uri: H,
119
+ batchMax: fe,
120
+ batchInterval: pe
121
+ }), W = f((e, t) => {
122
122
  let n = t.headers ?? {}, r = typeof y == "function" ? y() : y;
123
123
  return { headers: {
124
124
  ...n,
125
125
  ...r ? { authorization: `Bearer ${r}` } : {}
126
126
  } };
127
- }), U = f((e, t) => {
127
+ }), G = f((e, t) => {
128
128
  let n = t.headers ?? {}, r = typeof x == "function" ? x() : x;
129
129
  return { headers: {
130
130
  ...n,
131
131
  ...r ? { "accept-language": r } : {}
132
132
  } };
133
- }), W = f((e, t) => {
133
+ }), K = f((e, t) => {
134
134
  let n = t.headers ?? {}, r = typeof w == "function" ? w() : null;
135
135
  return { headers: {
136
136
  ...n,
@@ -138,32 +138,32 @@ function O(a) {
138
138
  ...r?.currency ? { "x-geo-currency": r.currency } : {},
139
139
  ...r?.timezone ? { "x-geo-timezone": r.timezone } : {}
140
140
  } };
141
- }), G = f((e, t) => {
141
+ }), q = f((e, t) => {
142
142
  let n = t.headers ?? {}, r = typeof T == "function" ? T() : T;
143
143
  return { headers: {
144
144
  ...n,
145
145
  ...r ? { "x-org-id": r } : {}
146
146
  } };
147
- }), K = f((e, t) => {
147
+ }), J = f((e, t) => {
148
148
  let n = t.headers ?? {}, r = typeof E == "function" ? E() : E, i = typeof D == "function" ? D() : D;
149
149
  return { headers: {
150
150
  ...n,
151
151
  ...r ? { "x-product-id": r } : {},
152
152
  ...i ? { "x-product-slug": i } : {}
153
153
  } };
154
- }), q = f((e, t) => {
154
+ }), Y = f((e, t) => {
155
155
  let n = t.headers ?? {}, r = (typeof O == "function" ? O() : O) || ae(e.variables);
156
156
  return { headers: {
157
157
  ...n,
158
158
  ...r ? { "x-workspace-id": r } : {}
159
159
  } };
160
- }), J = f((e, t) => {
160
+ }), he = f((e, t) => {
161
161
  let n = t.headers ?? {}, r = (typeof k == "function" ? k() : k) || oe(e.variables);
162
162
  return { headers: {
163
163
  ...n,
164
164
  ...r ? { "x-project-id": r } : {}
165
165
  } };
166
- }), Y = f((e, t) => {
166
+ }), ge = f((e, t) => {
167
167
  let n = t.headers ?? {}, r = typeof A == "function" ? A() : A;
168
168
  return { headers: {
169
169
  ...n,
@@ -180,7 +180,7 @@ function O(a) {
180
180
  let t = typeof y == "function" ? y() : y;
181
181
  if (t) {
182
182
  let n = await Promise.race([c({
183
- url: B,
183
+ url: H,
184
184
  authToken: t,
185
185
  workspaceId: a ?? void 0,
186
186
  organizationId: o ?? void 0,
@@ -201,7 +201,7 @@ function O(a) {
201
201
  jitter: !0
202
202
  },
203
203
  attempts: {
204
- max: pe,
204
+ max: de,
205
205
  retryIf: (e) => {
206
206
  if (C() || !e) return !1;
207
207
  let t = e.message?.toLowerCase?.() ?? "";
@@ -210,16 +210,16 @@ function O(a) {
210
210
  }
211
211
  }), ye = new p((e, t) => {
212
212
  if (C()) {
213
- I && console.warn("[CircuitBreaker] Circuit is open, blocking request:", e.operationName);
213
+ R && console.warn("[CircuitBreaker] Circuit is open, blocking request:", e.operationName);
214
214
  let t = Math.max(0, Math.ceil((v.nextRetryTime - Date.now()) / 1e3)), n = /* @__PURE__ */ Error(`Network circuit breaker is open — backend appears unreachable. Retrying in ${t} seconds.`);
215
- return N?.(n), new m((e) => {
215
+ return F?.(n), new m((e) => {
216
216
  e.error(n);
217
217
  });
218
218
  }
219
219
  return new m((n) => {
220
220
  let r = t(e).subscribe({
221
221
  next: (e) => {
222
- S(), v.consecutiveFailures === 0 && P?.(!1), n.next(e);
222
+ S(), v.consecutiveFailures === 0 && I?.(!1), n.next(e);
223
223
  },
224
224
  error: (e) => {
225
225
  n.error(e);
@@ -240,7 +240,7 @@ function O(a) {
240
240
  let r = e.errors;
241
241
  if (r) {
242
242
  let a = r.some((e) => e.extensions?.code === "UNAUTHENTICATED" || e.message.includes("Unauthorized") || e.message.includes("Unauthenticated"));
243
- for (let e of r) I && console.error("[GraphQL Error]:", e.message);
243
+ for (let e of r) R && console.error("[GraphQL Error]:", e.message);
244
244
  i({ errors: r }, { operationName: t.operationName });
245
245
  let o = new Set(["STORAGE_QUOTA_EXCEEDED", "RESOURCE_CAP_EXCEEDED"]);
246
246
  for (let e of r) {
@@ -250,43 +250,43 @@ function O(a) {
250
250
  break;
251
251
  }
252
252
  }
253
- if (a && M) return new m((r) => {
253
+ if (a && P) return new m((r) => {
254
254
  (async () => {
255
255
  if (X) if (await new Promise((e) => {
256
256
  Z.push({ resolve: e });
257
257
  })) {
258
258
  let e = n(t).subscribe(r);
259
259
  return () => e.unsubscribe();
260
- } else return j?.(), r.error(e), () => {};
260
+ } else return N?.(), r.error(e), () => {};
261
261
  X = !0;
262
262
  try {
263
- let i = await M();
263
+ let i = await P();
264
264
  if (X = !1, i) {
265
265
  Q(!0);
266
266
  let e = n(t).subscribe(r);
267
267
  return () => e.unsubscribe();
268
- } else return Q(!1), j?.(), r.error(e), () => {};
268
+ } else return Q(!1), N?.(), r.error(e), () => {};
269
269
  } catch {
270
- return X = !1, Q(!1), j?.(), r.error(e), () => {};
270
+ return X = !1, Q(!1), N?.(), r.error(e), () => {};
271
271
  }
272
272
  })();
273
273
  });
274
- a && j?.(), S();
274
+ a && N?.(), S();
275
275
  } else {
276
- if (I && console.error("[Network Error]:", e), ie(e)) {
276
+ if (R && console.error("[Network Error]:", e), ie(e)) {
277
277
  S(), e instanceof Error && i(e, {
278
278
  operationName: t.operationName,
279
279
  fallbackMessage: "Your session is no longer valid. Please sign in again."
280
280
  });
281
281
  return;
282
282
  }
283
- if (re() && P?.(!0), e instanceof Error) N?.(e), i(e, {
283
+ if (re() && I?.(!0), e instanceof Error) F?.(e), i(e, {
284
284
  operationName: t.operationName,
285
285
  fallbackMessage: "We could not reach the server. Please check your connection and try again."
286
286
  });
287
287
  else {
288
288
  let n = Error(String(e));
289
- N?.(n), i(n, {
289
+ F?.(n), i(n, {
290
290
  operationName: t.operationName,
291
291
  fallbackMessage: "We could not reach the server. Please check your connection and try again."
292
292
  });
@@ -299,16 +299,16 @@ function O(a) {
299
299
  next: (t) => {
300
300
  if (i.next(t), ce(t) || (n && o(), !r)) return;
301
301
  let a = e.operationName || "anonymous mutation";
302
- F ? Promise.resolve(F({
302
+ L ? Promise.resolve(L({
303
303
  gateway: s,
304
304
  operationName: a
305
305
  })).catch((e) => {
306
- I && console.warn("[GraphQL] Mutation refresh callback failed:", {
306
+ R && console.warn("[GraphQL] Mutation refresh callback failed:", {
307
307
  gateway: s,
308
308
  operationName: a,
309
309
  error: e
310
310
  });
311
- }) : ge(a);
311
+ }) : me(a);
312
312
  },
313
313
  error: (e) => {
314
314
  i.error(e);
@@ -321,46 +321,51 @@ function O(a) {
321
321
  a.unsubscribe();
322
322
  };
323
323
  });
324
- }), $ = h([
324
+ }), $ = ne([
325
325
  ve,
326
326
  ye,
327
327
  be,
328
328
  xe,
329
- H,
329
+ W,
330
330
  _e,
331
- G,
332
- K,
333
331
  q,
334
332
  J,
335
333
  Y,
336
- U,
337
- W,
338
- V
334
+ he,
335
+ ge,
336
+ G,
337
+ K,
338
+ h(({ query: e }) => {
339
+ let t = g(e);
340
+ return t.kind === "OperationDefinition" && t.operation === "subscription";
341
+ }, new p((e) => new m((t) => {
342
+ t.error(/* @__PURE__ */ Error(`[graphql] Refusing to send subscription "${e.operationName ?? "anonymous"}" over the batched HTTP transport — this gateway client was created without enableSubscriptions/SSE. Enable subscriptions on this client so it routes over SSE.`));
343
+ })), U)
339
344
  ]);
340
- if (de) {
341
- let e = fe || n(_ || z.defaultBaseUrl) + z.sse;
342
- e && ($ = h([
345
+ if (M) {
346
+ let e = V.sse, t = ue || (e ? n(_ || V.defaultBaseUrl) + e : void 0);
347
+ t && ($ = ne([
343
348
  ve,
344
349
  ye,
345
350
  be,
346
351
  xe,
347
- H,
352
+ W,
348
353
  _e,
349
- G,
350
- K,
351
354
  q,
352
355
  J,
353
356
  Y,
354
- U,
355
- W,
356
- ne(({ query: e }) => {
357
+ he,
358
+ ge,
359
+ G,
360
+ K,
361
+ h(({ query: e }) => {
357
362
  let t = g(e);
358
363
  return t.kind === "OperationDefinition" && t.operation === "subscription";
359
364
  }, new l({
360
- url: e,
365
+ url: t,
361
366
  headers: {},
362
- debug: I
363
- }), V)
367
+ debug: R
368
+ }), U)
364
369
  ]));
365
370
  }
366
371
  let Se = new te({ typePolicies: {
@@ -398,9 +403,9 @@ function O(a) {
398
403
  VibecontrolsAgent: { keyFields: ["id"] },
399
404
  Query: { fields: { vibes: { keyArgs: ["filter"] } } }
400
405
  } });
401
- return L = new ee({
406
+ return z = new ee({
402
407
  link: $,
403
- cache: ue ?? Se,
408
+ cache: j ?? Se,
404
409
  defaultOptions: {
405
410
  watchQuery: {
406
411
  fetchPolicy: "cache-and-network",
@@ -412,10 +417,10 @@ function O(a) {
412
417
  },
413
418
  mutate: { errorPolicy: "all" }
414
419
  }
415
- }), L;
420
+ }), z;
416
421
  }
417
422
  var k = null, A = null;
418
- function ue(e) {
423
+ function j(e) {
419
424
  let { workspaceBaseUrl: t, globalBaseUrl: n, authToken: r, enableSubscriptions: i = !1, onAuthError: a, debug: o = !1 } = e;
420
425
  k = O({
421
426
  gateway: "workspace",
@@ -432,16 +437,16 @@ function ue(e) {
432
437
  debug: o
433
438
  });
434
439
  }
435
- function de() {
440
+ function M() {
436
441
  if (!k) throw Error("Workspace client not initialized. Call initializeAppClients first.");
437
442
  return k;
438
443
  }
439
- function fe() {
444
+ function ue() {
440
445
  if (!A) throw Error("Global client not initialized. Call initializeAppClients first.");
441
446
  return A;
442
447
  }
443
- function j() {
448
+ function N() {
444
449
  k &&= (k.clearStore(), null), A &&= (A.clearStore(), null);
445
450
  }
446
451
  //#endregion
447
- export { O as createGraphQLClient, fe as getGlobalClient, de as getWorkspaceClient, ue as initializeAppClients, j as resetAppClients };
452
+ export { O as createGraphQLClient, ue as getGlobalClient, M as getWorkspaceClient, j as initializeAppClients, N as resetAppClients };
@@ -53,6 +53,24 @@ export interface ActiveContextProviderProps {
53
53
  tenant?: string;
54
54
  };
55
55
  }
56
+ export declare const CONTEXT_THRASH_WINDOW_MS = 500;
57
+ export declare const CONTEXT_THRASH_MAX_FLIPS = 3;
58
+ export interface ContextFieldThrashState {
59
+ current: string | null;
60
+ previous: string | null;
61
+ flips: number;
62
+ windowStart: number;
63
+ suppressUntil: number;
64
+ }
65
+ export declare function createContextFieldThrashState(initial: string | null): ContextFieldThrashState;
66
+ /**
67
+ * Decides whether `nextValue` should be applied to a context field, mutating
68
+ * `state` to reflect the decision. Returns `false` for a true no-op (value
69
+ * unchanged), while an active suppression window is in effect, or when this
70
+ * write is detected as the Nth rapid alternation back to the field's prior
71
+ * value — the ping-pong signature described above.
72
+ */
73
+ export declare function shouldApplyContextFieldWrite(fieldName: string, state: ContextFieldThrashState, nextValue: string | null, now: number): boolean;
56
74
  /**
57
75
  * ActiveContextProvider
58
76
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ActiveContextProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ActiveContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAiBf;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,yCAAyC;IACzC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,sCAAsC;IACtC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,oCAAoC;IACpC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,kCAAkC;IAClC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,+BAA+B;IAC/B,YAAY,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,6BAA6B;IAC7B,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,4BAA4B;IAC5B,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAE7C,qCAAqC;IACrC,UAAU,EAAE,CACV,OAAO,EAAE,OAAO,CAAC;QACf,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC,KACC,IAAI,CAAC;IAEV,+BAA+B;IAC/B,YAAY,EAAE,MAAM,IAAI,CAAC;IAEzB,kCAAkC;IAClC,cAAc,EAAE,OAAO,CAAC;CACzB;AAID,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,SAAS,CAAC;IACpB,8BAA8B;IAC9B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,wBAAwB;IACxB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB;IACtB,SAAS,CAAC,EAAE;QACV,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAiCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,qBAA4B,EAC5B,kBAAyB,EACzB,gBAAuB,EACvB,eAAsB,EACtB,UAAuC,EACvC,SAAiB,EACjB,SAA6C,GAC9C,EAAE,0BAA0B,2CAkS5B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,uBAM/B"}
1
+ {"version":3,"file":"ActiveContextProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ActiveContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAiBf;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,yCAAyC;IACzC,cAAc,EAAE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;IAChC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB;IACtB,SAAS,CAAC,EAAE;QACV,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAgCD,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,uBAAuB,CAE7F;AAgBD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,uBAAuB,EAC9B,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,GAAG,EAAE,MAAM,GACV,OAAO,CAsCT;AAiCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,qBAA4B,EAC5B,kBAAyB,EACzB,gBAAuB,EACvB,eAAsB,EACtB,UAAuC,EACvC,SAAiB,EACjB,SAA6C,GAC9C,EAAE,0BAA0B,2CA0X5B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,uBAM/B"}
@@ -1,32 +1,60 @@
1
1
  import { getProfileContext as e, resolveActiveProfileId as t, setProfileContext as n } from "./ProfileStorageManager.js";
2
2
  import { ACTIVE_CONTEXT_STORAGE_KEY as r, DEFAULT_ACTIVE_CONTEXT_URL_PARAMS as i, clearActiveContextStorage as a, getUrlParam as o, readActiveContextStorageValue as s, writeActiveContextFallback as c, writeActiveContextStorageValue as l } from "./ActiveContextStorage.js";
3
3
  import { isSsoNavigationPending as u } from "../../utils/ssoDeposit.js";
4
- import { createContext as d, use as f, useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
5
- import { jsx as _ } from "react/jsx-runtime";
4
+ import { createContext as d, use as f, useCallback as p, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
5
+ import { jsx as v } from "react/jsx-runtime";
6
6
  //#region src/shared/providers/shell/ActiveContextProvider.tsx
7
- var v = d(null);
8
- function y(e) {
7
+ var y = d(null);
8
+ function b(e) {
9
+ return {
10
+ current: e,
11
+ previous: null,
12
+ flips: 0,
13
+ windowStart: 0,
14
+ suppressUntil: 0
15
+ };
16
+ }
17
+ function x() {
18
+ try {
19
+ return !!{
20
+ BASE_URL: "/",
21
+ DEV: !1,
22
+ MODE: "production",
23
+ PROD: !0,
24
+ SSR: !1
25
+ }?.DEV;
26
+ } catch {
27
+ return !1;
28
+ }
29
+ }
30
+ function S(e, t, n, r) {
31
+ if (t.current === n) return !1;
32
+ if (r < t.suppressUntil) return x() && console.warn(`[ActiveContext] Suppressing rapid ${e} change to avoid a render loop (BOFF-5395): holding at ${JSON.stringify(t.current)}, refused ${JSON.stringify(n)}.`), !1;
33
+ let i = n === t.previous, a = r - t.windowStart < 500;
34
+ return i && a ? t.flips += 1 : (t.flips = 1, t.windowStart = r), t.flips >= 3 ? (t.suppressUntil = r + 500, t.flips = 0, x() && console.warn(`[ActiveContext] Detected ${e} ping-pong between ${JSON.stringify(t.current)} and ${JSON.stringify(n)} (BOFF-5395) — holding at the current value instead of looping.`), !1) : (t.previous = t.current, t.current = n, !0);
35
+ }
36
+ function C(e) {
9
37
  if (typeof window > "u" || u() || window.location.pathname.startsWith("/auth/")) return;
10
38
  let t = new URL(window.location.href);
11
39
  Object.entries(e).forEach(([e, n]) => {
12
40
  n ? t.searchParams.set(e, n) : t.searchParams.delete(e);
13
41
  }), window.history.replaceState({}, "", t.toString());
14
42
  }
15
- function b({ children: u, defaultOrganizationId: d = null, defaultWorkspaceId: f = null, defaultProjectId: b = null, defaultTenantId: x = null, storageKey: S = r, syncToUrl: C = !1, urlParams: w = i }) {
16
- let [T, E] = g(() => {
43
+ function w({ children: u, defaultOrganizationId: d = null, defaultWorkspaceId: f = null, defaultProjectId: x = null, defaultTenantId: w = null, storageKey: T = r, syncToUrl: E = !1, urlParams: D = i }) {
44
+ let [O, k] = _(() => {
17
45
  if (typeof window > "u") return d;
18
- if (C) {
19
- let e = o(w.organization);
46
+ if (E) {
47
+ let e = o(D.organization);
20
48
  if (e) return e;
21
49
  }
22
- return s("organization", S) || d;
23
- }), [D, O] = g(() => {
50
+ return s("organization", T) || d;
51
+ }), [A, j] = _(() => {
24
52
  if (typeof window > "u") return f;
25
- if (C) {
26
- let e = o(w.workspace);
53
+ if (E) {
54
+ let e = o(D.workspace);
27
55
  if (e) return e;
28
56
  }
29
- let r = s("workspace", S) || f;
57
+ let r = s("workspace", T) || f;
30
58
  if (r) {
31
59
  let i = t();
32
60
  if (i) {
@@ -38,145 +66,152 @@ function b({ children: u, defaultOrganizationId: d = null, defaultWorkspaceId: f
38
66
  }
39
67
  }
40
68
  return r;
41
- }), [k, A] = g(() => {
42
- if (typeof window > "u") return b;
43
- if (C) {
44
- let e = o(w.project);
69
+ }), [M, N] = _(() => {
70
+ if (typeof window > "u") return x;
71
+ if (E) {
72
+ let e = o(D.project);
45
73
  if (e) return e;
46
74
  }
47
- return s("project", S) || b;
48
- }), [j, M] = g(() => {
49
- if (typeof window > "u") return x;
50
- if (C) {
51
- let e = o(w.tenant);
75
+ return s("project", T) || x;
76
+ }), [P, F] = _(() => {
77
+ if (typeof window > "u") return w;
78
+ if (E) {
79
+ let e = o(D.tenant);
52
80
  if (e) return e;
53
81
  }
54
- return s("tenant", S) || x;
55
- });
56
- m(() => {
57
- l("organization", T, S), l("workspace", D, S), l("project", k, S), l("tenant", j, S);
82
+ return s("tenant", T) || w;
83
+ }), I = g(null);
84
+ I.current === null && (I.current = b(O));
85
+ let L = g(null);
86
+ L.current === null && (L.current = b(A));
87
+ let R = g(null);
88
+ R.current === null && (R.current = b(M));
89
+ let z = g(null);
90
+ z.current === null && (z.current = b(P)), m(() => {
91
+ l("organization", O, T), l("workspace", A, T), l("project", M, T), l("tenant", P, T);
58
92
  }, [
59
- T,
60
- D,
61
- k,
62
- j,
63
- S
93
+ O,
94
+ A,
95
+ M,
96
+ P,
97
+ T
64
98
  ]), m(() => {
65
99
  let r = t();
66
100
  if (!r) return;
67
101
  let i = e(r), a = {
68
102
  ...i,
69
- organizationId: T,
70
- workspaceId: D,
71
- projectId: k,
72
- tenantId: j
103
+ organizationId: O,
104
+ workspaceId: A,
105
+ projectId: M,
106
+ tenantId: P
73
107
  };
74
108
  i?.organizationId === a.organizationId && i?.workspaceId === a.workspaceId && i?.projectId === a.projectId && i?.tenantId === a.tenantId || n(r, a);
75
109
  }, [
76
- T,
77
- D,
78
- k,
79
- j
110
+ O,
111
+ A,
112
+ M,
113
+ P
80
114
  ]), m(() => {
81
- C && y({
82
- [w.organization]: T,
83
- [w.workspace]: D,
84
- [w.project]: k,
85
- [w.tenant]: j
115
+ E && C({
116
+ [D.organization]: O,
117
+ [D.workspace]: A,
118
+ [D.project]: M,
119
+ [D.tenant]: P
86
120
  });
87
121
  }, [
88
- T,
89
- D,
90
- k,
91
- j,
92
- C,
93
- w
122
+ O,
123
+ A,
124
+ M,
125
+ P,
126
+ E,
127
+ D
94
128
  ]), m(() => {
95
- if (!C) return;
129
+ if (!E) return;
96
130
  let e = () => {
97
- let e = o(w.organization), t = o(w.workspace), n = o(w.project), r = o(w.tenant);
98
- e !== T && E(e), t !== D && O(t), n !== k && A(n), r !== j && M(r);
131
+ let e = o(D.organization), t = o(D.workspace), n = o(D.project), r = o(D.tenant);
132
+ e !== O && (k(e), I.current.previous = I.current.current, I.current.current = e), t !== A && (j(t), L.current.previous = L.current.current, L.current.current = t), n !== M && (N(n), R.current.previous = R.current.current, R.current.current = n), r !== P && (F(r), z.current.previous = z.current.current, z.current.current = r);
99
133
  };
100
134
  return window.addEventListener("popstate", e), () => window.removeEventListener("popstate", e);
101
135
  }, [
102
- C,
103
- w,
104
- T,
136
+ E,
105
137
  D,
106
- k,
107
- j
138
+ O,
139
+ A,
140
+ M,
141
+ P
108
142
  ]);
109
- let N = p((r) => {
110
- E(r);
143
+ let B = p((r) => {
144
+ if (!S("organizationId", I.current, r, Date.now())) return;
145
+ k(r);
111
146
  let i = t();
112
147
  i && n(i, {
113
148
  ...e(i),
114
149
  organizationId: r
115
150
  }), typeof window < "u" && window.dispatchEvent(new CustomEvent("burdenoff:organization-changed", { detail: { organizationId: r } }));
116
- }, []), P = p((r, i) => {
151
+ }, []), V = p((r, i) => {
117
152
  let a = {
118
153
  organization: "organizationId",
119
154
  workspace: "workspaceId",
120
155
  project: "projectId",
121
156
  tenant: "tenantId"
122
157
  };
123
- l(r, i, S);
158
+ l(r, i, T);
124
159
  let o = t();
125
160
  o ? n(o, {
126
161
  ...e(o),
127
162
  [a[r]]: i
128
- }) : typeof window < "u" && c(r, i, S);
129
- }, [S]), F = p((e) => {
130
- O(e), P("workspace", e), typeof window < "u" && window.dispatchEvent(new CustomEvent("burdenoff:workspace-changed", { detail: { workspaceId: e } }));
131
- }, [P]), I = p((e) => {
132
- A(e), P("project", e), typeof window < "u" && window.dispatchEvent(new CustomEvent("burdenoff:project-changed", { detail: { projectId: e } }));
133
- }, [P]), L = p((e) => {
134
- M(e), P("tenant", e);
135
- }, [P]), R = p((e) => {
136
- e.organizationId !== void 0 && N(e.organizationId), e.workspaceId !== void 0 && F(e.workspaceId), e.projectId !== void 0 && I(e.projectId), e.tenantId !== void 0 && L(e.tenantId);
163
+ }) : typeof window < "u" && c(r, i, T);
164
+ }, [T]), H = p((e) => {
165
+ S("workspaceId", L.current, e, Date.now()) && (j(e), V("workspace", e), typeof window < "u" && window.dispatchEvent(new CustomEvent("burdenoff:workspace-changed", { detail: { workspaceId: e } })));
166
+ }, [V]), U = p((e) => {
167
+ S("projectId", R.current, e, Date.now()) && (N(e), V("project", e), typeof window < "u" && window.dispatchEvent(new CustomEvent("burdenoff:project-changed", { detail: { projectId: e } })));
168
+ }, [V]), W = p((e) => {
169
+ S("tenantId", z.current, e, Date.now()) && (F(e), V("tenant", e));
170
+ }, [V]), G = p((e) => {
171
+ e.organizationId !== void 0 && B(e.organizationId), e.workspaceId !== void 0 && H(e.workspaceId), e.projectId !== void 0 && U(e.projectId), e.tenantId !== void 0 && W(e.tenantId);
137
172
  }, [
138
- N,
139
- F,
140
- I,
141
- L
142
- ]), z = p(() => {
143
- E(null), O(null), A(null), M(null), a(S);
173
+ B,
174
+ H,
175
+ U,
176
+ W
177
+ ]), K = p(() => {
178
+ k(null), j(null), N(null), F(null), I.current = b(null), L.current = b(null), R.current = b(null), z.current = b(null), a(T);
144
179
  let e = t();
145
180
  e && n(e, {});
146
- }, [S]), B = h(() => ({
147
- organizationId: T,
148
- workspaceId: D,
149
- projectId: k,
150
- tenantId: j,
151
- setOrganization: N,
152
- setWorkspace: F,
153
- setProject: I,
154
- setTenant: L,
155
- setContext: R,
156
- clearContext: z,
157
- urlSyncEnabled: C
181
+ }, [T]), q = h(() => ({
182
+ organizationId: O,
183
+ workspaceId: A,
184
+ projectId: M,
185
+ tenantId: P,
186
+ setOrganization: B,
187
+ setWorkspace: H,
188
+ setProject: U,
189
+ setTenant: W,
190
+ setContext: G,
191
+ clearContext: K,
192
+ urlSyncEnabled: E
158
193
  }), [
159
- T,
160
- D,
161
- k,
162
- j,
163
- N,
164
- F,
165
- I,
166
- L,
167
- R,
168
- z,
169
- C
194
+ O,
195
+ A,
196
+ M,
197
+ P,
198
+ B,
199
+ H,
200
+ U,
201
+ W,
202
+ G,
203
+ K,
204
+ E
170
205
  ]);
171
- return /* @__PURE__ */ _(v.Provider, {
172
- value: B,
206
+ return /* @__PURE__ */ v(y.Provider, {
207
+ value: q,
173
208
  children: u
174
209
  });
175
210
  }
176
- function x() {
177
- let e = f(v);
211
+ function T() {
212
+ let e = f(y);
178
213
  if (!e) throw Error("useActiveContext must be used within an ActiveContextProvider");
179
214
  return e;
180
215
  }
181
216
  //#endregion
182
- export { b as ActiveContextProvider, x as useActiveContext };
217
+ export { w as ActiveContextProvider, T as useActiveContext };
@@ -1 +1 @@
1
- {"version":3,"file":"MultiGatewayProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/MultiGatewayProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA2C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAuB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAKzE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACrC,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,yCAAyC;IACzC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,WAAW,EACX,cAA4B,EAC5B,KAAa,EACb,mBAA2B,EAC3B,WAAW,EACX,cAAc,EACd,cAAc,GACf,EAAE,yBAAyB,2CAwR3B"}
1
+ {"version":3,"file":"MultiGatewayProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/MultiGatewayProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA2C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAuB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAKzE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACrC,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,yCAAyC;IACzC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,WAAW,EACX,cAA4B,EAC5B,KAAa,EACb,mBAA2B,EAC3B,WAAW,EACX,cAAc,EACd,cAAc,GACf,EAAE,yBAAyB,2CA+R3B"}
@@ -81,6 +81,7 @@ function u({ children: u, workspaceBaseUrl: d, globalBaseUrl: f, organizationId:
81
81
  productSlug: m,
82
82
  locale: O,
83
83
  geography: k,
84
+ enableSubscriptions: _,
84
85
  debug: g,
85
86
  onAuthError: v,
86
87
  onRefreshToken: b,
@@ -93,6 +94,7 @@ function u({ children: u, workspaceBaseUrl: d, globalBaseUrl: f, organizationId:
93
94
  m,
94
95
  O,
95
96
  k,
97
+ _,
96
98
  g,
97
99
  v,
98
100
  b,
@@ -12,6 +12,7 @@ var f = 20, p = {
12
12
  global: {
13
13
  defaultBaseUrl: "https://gw-global.local.burdenoff.com",
14
14
  graphql: "/global/graphql",
15
+ sse: "/global/graphql",
15
16
  ws: "/global/graphql/ws"
16
17
  }
17
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.723.4",
3
+ "version": "2026.725.1",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "imports": {