@burdenoff/fe-libs 2026.527.5 → 2026.527.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.
@@ -0,0 +1,57 @@
1
+ import { cn as e } from "../../shared-utils.js";
2
+ import { useState as t } from "react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region src/shared/components/UpgradeInlineBanner.tsx
5
+ function i(e) {
6
+ return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
7
+ }
8
+ function a({ title: a, message: o, resource: s = "resource", current: c, limit: l, bytes: u = !1, upgradeHref: d = "/billing/plans", dismissible: f = !1, dismissKey: p, severity: m, className: h, renderCta: g, onDismiss: _, translations: v }) {
9
+ let y = v ?? {}, [b, x] = t(p && typeof window < "u" ? window.localStorage.getItem(`upgradeBanner:${p}`) === "1" : !1);
10
+ if (b) return null;
11
+ let S = typeof c == "number" && typeof l == "number" && l > 0 ? Math.min(Math.max(c / l * 100, 0), 100) : null, C = m ?? (S != null && S >= 100 ? "critical" : S != null && S >= 80 ? "warning" : "info"), w = C === "critical" ? "bg-status-error-bg-subtle border-status-error-border text-status-error-text" : C === "warning" ? "bg-status-warning-bg-subtle border-status-warning-border text-status-warning-text" : "bg-status-info-bg-subtle border-status-info-border text-status-info-text", T = typeof c == "number" && typeof l == "number" ? u ? y.usageBytes?.(i(c), i(l)) ?? `${i(c)} of ${i(l)} used` : y.usageCount?.(c.toLocaleString(), l.toLocaleString()) ?? `${c.toLocaleString()} of ${l.toLocaleString()} used` : null, E = () => {
12
+ p && typeof window < "u" && window.localStorage.setItem(`upgradeBanner:${p}`, "1"), x(!0), _?.();
13
+ }, D = `${s[0]?.toUpperCase()}${s.slice(1)} limit reached`, O = `Approaching ${s} limit`, k = a ?? (C === "critical" ? y.reachedTemplate?.(s) ?? D : y.approachingTemplate?.(s) ?? O);
14
+ return /* @__PURE__ */ r("div", {
15
+ role: "status",
16
+ className: e("flex flex-wrap items-center gap-3 border rounded-md px-3 py-2 text-sm", w, h),
17
+ children: [/* @__PURE__ */ r("div", {
18
+ className: "flex-1 min-w-0",
19
+ children: [
20
+ /* @__PURE__ */ n("div", {
21
+ className: "font-medium",
22
+ children: k
23
+ }),
24
+ o && /* @__PURE__ */ n("div", {
25
+ className: "text-xs opacity-90 mt-0.5",
26
+ children: o
27
+ }),
28
+ T && /* @__PURE__ */ n("div", {
29
+ className: "text-xs opacity-80 mt-0.5",
30
+ children: T
31
+ }),
32
+ S != null && /* @__PURE__ */ n("div", {
33
+ className: "mt-1.5 h-1.5 w-full bg-bg-sunken rounded-full overflow-hidden",
34
+ children: /* @__PURE__ */ n("div", {
35
+ className: e("h-full rounded-full transition-all duration-500", C === "critical" ? "bg-status-error-bg" : C === "warning" ? "bg-status-warning-bg" : "bg-action-primary-bg"),
36
+ style: { width: `${S}%` }
37
+ })
38
+ })
39
+ ]
40
+ }), /* @__PURE__ */ r("div", {
41
+ className: "flex items-center gap-2 shrink-0",
42
+ children: [g ? g({ href: d }) : /* @__PURE__ */ n("a", {
43
+ href: d,
44
+ className: "px-2.5 py-1 text-xs font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover",
45
+ children: y.upgrade ?? "Upgrade"
46
+ }), f && /* @__PURE__ */ n("button", {
47
+ type: "button",
48
+ "aria-label": y.dismissAriaLabel ?? "Dismiss",
49
+ onClick: E,
50
+ className: "px-1 text-text-secondary hover:text-text-primary",
51
+ children: "×"
52
+ })]
53
+ })]
54
+ });
55
+ }
56
+ //#endregion
57
+ export { a as UpgradeInlineBanner };
@@ -0,0 +1,92 @@
1
+ import { resolveUpgradeUsage as e } from "../utils/quotaErrors.js";
2
+ import { cn as t } from "../../shared-utils.js";
3
+ import { useCallback as n, useEffect as r, useState as i } from "react";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ //#region src/shared/components/UpgradePromptModal.tsx
6
+ var s = "burdenoff:upgrade-prompt";
7
+ function c(e) {
8
+ typeof window > "u" || window.dispatchEvent(new CustomEvent(s, { detail: e }));
9
+ }
10
+ function l(e) {
11
+ return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
12
+ }
13
+ function u({ upgradePath: c = "/billing/plans", renderCta: u, translations: d, className: f }) {
14
+ let p = d ?? {}, [m, h] = i(null);
15
+ r(() => {
16
+ let e = (e) => {
17
+ let t = e.detail;
18
+ t?.extensions && h(t);
19
+ };
20
+ return window.addEventListener(s, e), () => window.removeEventListener(s, e);
21
+ }, []);
22
+ let g = n(() => h(null), []);
23
+ if (r(() => {
24
+ if (!m) return;
25
+ let e = (e) => {
26
+ e.key === "Escape" && g();
27
+ };
28
+ return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
29
+ }, [m, g]), !m) return null;
30
+ let _ = m.extensions, { current: v, limit: y, unit: b } = e(_), x = _.resource ?? _.quotaName ?? _.field ?? "resource", S = _.planName ?? "current", C = `${x[0]?.toUpperCase()}${x.slice(1)} limit reached`, w = _.code === "STORAGE_QUOTA_EXCEEDED" ? p.storageTitle ?? "Storage limit reached" : _.code === "RESOURCE_CAP_EXCEEDED" ? p.resourceTitleTemplate?.(x) ?? C : p.defaultTitle ?? "Plan limit reached", T = v != null && y != null ? b === "bytes" ? p.usageBytes?.(l(v), l(y)) ?? `${l(v)} of ${l(y)} used` : p.usageCount?.(v.toLocaleString(), y.toLocaleString()) ?? `${v.toLocaleString()} of ${y.toLocaleString()} used` : null, E = m.description ?? p.descriptionTemplate?.(S, x) ?? `You're on the ${S} plan and have hit your ${x} limit. Upgrade to keep going.`, D = () => {
31
+ g(), !u && typeof window < "u" && (window.location.href = c);
32
+ };
33
+ return /* @__PURE__ */ a("div", {
34
+ className: t("fixed inset-0 z-[1000] flex items-center justify-center bg-bg-overlay/60 backdrop-blur-sm", f),
35
+ role: "dialog",
36
+ "aria-modal": "true",
37
+ "aria-labelledby": "upgrade-prompt-title",
38
+ onClick: g,
39
+ children: /* @__PURE__ */ a("div", {
40
+ className: "mx-4 w-full max-w-md rounded-lg bg-bg-surface text-text-primary shadow-elevation-3 border border-border-default",
41
+ onClick: (e) => e.stopPropagation(),
42
+ children: /* @__PURE__ */ o("div", {
43
+ className: "p-6 space-y-4",
44
+ children: [
45
+ /* @__PURE__ */ o("div", {
46
+ className: "flex items-start justify-between gap-4",
47
+ children: [/* @__PURE__ */ a("h2", {
48
+ id: "upgrade-prompt-title",
49
+ className: "text-lg font-semibold",
50
+ children: m.title ?? w
51
+ }), /* @__PURE__ */ a("button", {
52
+ type: "button",
53
+ "aria-label": p.closeAriaLabel ?? "Close",
54
+ onClick: g,
55
+ className: "text-text-secondary hover:text-text-primary",
56
+ children: "×"
57
+ })]
58
+ }),
59
+ /* @__PURE__ */ a("p", {
60
+ className: "text-sm text-text-secondary",
61
+ children: E
62
+ }),
63
+ T && /* @__PURE__ */ a("p", {
64
+ className: "text-xs text-status-warning-text font-medium",
65
+ children: T
66
+ }),
67
+ /* @__PURE__ */ o("div", {
68
+ className: "flex items-center justify-end gap-2 pt-2",
69
+ children: [/* @__PURE__ */ a("button", {
70
+ type: "button",
71
+ onClick: g,
72
+ className: "px-3 py-2 text-sm rounded-md border border-border-default bg-bg-surface text-text-primary hover:bg-bg-sunken",
73
+ children: p.notNow ?? "Not now"
74
+ }), u ? u({
75
+ href: c,
76
+ onClick: D
77
+ }) : /* @__PURE__ */ a("a", {
78
+ href: c,
79
+ onClick: (e) => {
80
+ e.preventDefault(), D();
81
+ },
82
+ className: "px-3 py-2 text-sm rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover",
83
+ children: p.upgrade ?? "Upgrade plan"
84
+ })]
85
+ })
86
+ ]
87
+ })
88
+ })
89
+ });
90
+ }
91
+ //#endregion
92
+ export { s as UPGRADE_PROMPT_EVENT, u as UpgradePromptModal, c as dispatchUpgradePrompt };
@@ -6,53 +6,53 @@ import { SSELink as a } from "./links/sse-link.js";
6
6
  import { onError as o } from "@apollo/client/link/error";
7
7
  import { RetryLink as s } from "@apollo/client/link/retry";
8
8
  import { setContext as c } from "@apollo/client/link/context";
9
- import { ApolloClient as l, ApolloLink as u, InMemoryCache as ee, Observable as d, from as f, split as p } from "@apollo/client/core";
10
- import { getMainDefinition as m } from "@apollo/client/utilities";
11
- import { print as h } from "graphql";
9
+ import { ApolloClient as l, ApolloLink as u, InMemoryCache as d, Observable as f, from as p, split as ee } from "@apollo/client/core";
10
+ import { getMainDefinition as te } from "@apollo/client/utilities";
11
+ import { print as m } from "graphql";
12
12
  //#region src/shared/graphql/client.ts
13
- var g = {
13
+ var h = {
14
14
  consecutiveFailures: 0,
15
15
  lastFailureTime: 0,
16
16
  isOpen: !1
17
- }, _ = 5, v = 3e4;
18
- function te() {
19
- return g.consecutiveFailures++, g.lastFailureTime = Date.now(), g.consecutiveFailures >= _ && (g.isOpen = !0), g.isOpen;
17
+ }, g = 5, _ = 3e4;
18
+ function ne() {
19
+ return h.consecutiveFailures++, h.lastFailureTime = Date.now(), h.consecutiveFailures >= g && (h.isOpen = !0), h.isOpen;
20
20
  }
21
- function y() {
22
- g.consecutiveFailures = 0, g.isOpen = !1;
21
+ function v() {
22
+ h.consecutiveFailures = 0, h.isOpen = !1;
23
23
  }
24
- function b() {
25
- return g.isOpen ? Date.now() - g.lastFailureTime > v ? (g.isOpen = !1, g.consecutiveFailures = 0, !1) : !0 : !1;
24
+ function y() {
25
+ return h.isOpen ? Date.now() - h.lastFailureTime > _ ? (h.isOpen = !1, h.consecutiveFailures = 0, !1) : !0 : !1;
26
26
  }
27
- function x(e) {
27
+ function b(e) {
28
28
  if (!e || typeof e != "object") return null;
29
29
  let t = e.workspaceId;
30
30
  return typeof t == "string" && t.trim() ? t : null;
31
31
  }
32
- function S(e) {
32
+ function x(e) {
33
33
  let t = e.headers;
34
34
  if (!t || typeof t != "object" || Array.isArray(t)) return {};
35
35
  let n = {};
36
36
  for (let [e, r] of Object.entries(t)) typeof r == "string" && (n[e] = r);
37
37
  return n;
38
38
  }
39
- function C(e) {
39
+ function S(e) {
40
40
  let t = e.fetchOptions;
41
41
  if (!t || typeof t != "object" || !("signal" in t)) return;
42
42
  let n = t.signal;
43
43
  return n instanceof AbortSignal ? n : void 0;
44
44
  }
45
- function ne({ uri: e, batchMax: t, batchInterval: n }) {
46
- return new u((r) => new d((a) => {
47
- let o = r.getContext(), s = { query: h(r.query) };
45
+ function re({ uri: e, batchMax: t, batchInterval: n }) {
46
+ return new u((r) => new f((a) => {
47
+ let o = r.getContext(), s = { query: m(r.query) };
48
48
  r.operationName && (s.operationName = r.operationName);
49
49
  let c = r.variables ?? {}, l = r.extensions ?? {};
50
50
  Object.keys(c).length > 0 && (s.variables = c), Object.keys(l).length > 0 && (s.extensions = l);
51
51
  let u = !1;
52
52
  return i(e, {
53
53
  "content-type": "application/json",
54
- ...S(o)
55
- }, s, C(o), {
54
+ ...x(o)
55
+ }, s, S(o), {
56
56
  batchMax: t,
57
57
  batchInterval: n
58
58
  }).then((e) => {
@@ -64,25 +64,25 @@ function ne({ uri: e, batchMax: t, batchInterval: n }) {
64
64
  };
65
65
  }));
66
66
  }
67
- function w(i) {
68
- let { gateway: h, baseUrl: _, authToken: v, workspaceToken: S, locale: C, geography: w, organizationId: T, productId: E, workspaceId: D, tenantId: O, cache: k, enableSubscriptions: A = !1, sseUrl: j, onAuthError: M, onRefreshToken: N, onNetworkError: P, onNetworkStatusChange: F, maxRetryAttempts: re = 3, batchMax: ie = 10, batchInterval: ae, debug: I = !1 } = i, L = e[h], R = ne({
69
- uri: n(t(_, h)),
67
+ function C(i) {
68
+ let { gateway: m, baseUrl: g, authToken: _, workspaceToken: x, locale: S, geography: C, organizationId: w, productId: T, workspaceId: E, tenantId: D, cache: O, enableSubscriptions: k = !1, sseUrl: A, onAuthError: j, onRefreshToken: M, onNetworkError: N, onNetworkStatusChange: P, maxRetryAttempts: F = 3, batchMax: ie = 10, batchInterval: ae, debug: I = !1 } = i, L = e[m], R = re({
69
+ uri: n(t(g, m)),
70
70
  batchMax: ie,
71
71
  batchInterval: ae
72
72
  }), z = c((e, t) => {
73
- let n = t.headers ?? {}, r = typeof v == "function" ? v() : v;
73
+ let n = t.headers ?? {}, r = typeof _ == "function" ? _() : _;
74
74
  return { headers: {
75
75
  ...n,
76
76
  ...r ? { authorization: `Bearer ${r}` } : {}
77
77
  } };
78
78
  }), B = c((e, t) => {
79
- let n = t.headers ?? {}, r = typeof C == "function" ? C() : C;
79
+ let n = t.headers ?? {}, r = typeof S == "function" ? S() : S;
80
80
  return { headers: {
81
81
  ...n,
82
82
  ...r ? { "accept-language": r } : {}
83
83
  } };
84
84
  }), V = c((e, t) => {
85
- let n = t.headers ?? {}, r = typeof w == "function" ? w() : null;
85
+ let n = t.headers ?? {}, r = typeof C == "function" ? C() : null;
86
86
  return { headers: {
87
87
  ...n,
88
88
  ...r?.country ? { "x-geo-country": r.country } : {},
@@ -90,31 +90,31 @@ function w(i) {
90
90
  ...r?.timezone ? { "x-geo-timezone": r.timezone } : {}
91
91
  } };
92
92
  }), H = c((e, t) => {
93
- let n = t.headers ?? {}, r = typeof T == "function" ? T() : T;
93
+ let n = t.headers ?? {}, r = typeof w == "function" ? w() : w;
94
94
  return { headers: {
95
95
  ...n,
96
96
  ...r ? { "x-org-id": r } : {}
97
97
  } };
98
98
  }), U = c((e, t) => {
99
- let n = t.headers ?? {}, r = typeof E == "function" ? E() : E;
99
+ let n = t.headers ?? {}, r = typeof T == "function" ? T() : T;
100
100
  return { headers: {
101
101
  ...n,
102
102
  ...r ? { "x-product-id": r } : {}
103
103
  } };
104
104
  }), W = c((e, t) => {
105
- let n = t.headers ?? {}, r = (typeof D == "function" ? D() : D) || x(e.variables);
105
+ let n = t.headers ?? {}, r = (typeof E == "function" ? E() : E) || b(e.variables);
106
106
  return { headers: {
107
107
  ...n,
108
108
  ...r ? { "x-workspace-id": r } : {}
109
109
  } };
110
110
  }), G = c((e, t) => {
111
- let n = t.headers ?? {}, r = typeof O == "function" ? O() : O;
111
+ let n = t.headers ?? {}, r = typeof D == "function" ? D() : D;
112
112
  return { headers: {
113
113
  ...n,
114
114
  ...r ? { "x-tenant-id": r } : {}
115
115
  } };
116
116
  }), K = c((e, t) => {
117
- let n = t.headers ?? {}, i = typeof S == "function" ? S() : S, a = r(i, { workspaceId: typeof D == "function" ? D() : D }) ? i : null;
117
+ let n = t.headers ?? {}, i = typeof x == "function" ? x() : x, a = r(i, { workspaceId: typeof E == "function" ? E() : E }) ? i : null;
118
118
  return { headers: {
119
119
  ...n,
120
120
  ...a ? { "x-workspace-authorization": `Bearer ${a}` } : {}
@@ -126,25 +126,25 @@ function w(i) {
126
126
  jitter: !0
127
127
  },
128
128
  attempts: {
129
- max: re,
129
+ max: F,
130
130
  retryIf: (e) => {
131
- if (b() || !e) return !1;
131
+ if (y() || !e) return !1;
132
132
  let t = e.message?.toLowerCase?.() ?? "";
133
133
  return !(t.includes("401") || t.includes("403") || t.includes("unauthorized") || t.includes("forbidden") || t.includes("unauthenticated"));
134
134
  }
135
135
  }
136
136
  }), J = new u((e, t) => {
137
- if (b()) {
137
+ if (y()) {
138
138
  I && console.warn("[CircuitBreaker] Circuit is open, blocking request:", e.operationName);
139
139
  let t = /* @__PURE__ */ Error("Network circuit breaker is open — backend appears unreachable. Retrying in 30 seconds.");
140
- return P?.(t), new d((e) => {
140
+ return N?.(t), new f((e) => {
141
141
  e.error(t);
142
142
  });
143
143
  }
144
- return new d((n) => {
144
+ return new f((n) => {
145
145
  let r = t(e).subscribe({
146
146
  next: (e) => {
147
- y(), g.consecutiveFailures === 0 && F?.(!1), n.next(e);
147
+ v(), h.consecutiveFailures === 0 && P?.(!1), n.next(e);
148
148
  },
149
149
  error: (e) => {
150
150
  n.error(e);
@@ -166,30 +166,38 @@ function w(i) {
166
166
  if (r) {
167
167
  let i = r.some((e) => e.extensions?.code === "UNAUTHENTICATED" || e.message.includes("Unauthorized") || e.message.includes("Unauthenticated"));
168
168
  for (let e of r) I && console.error("[GraphQL Error]:", e.message);
169
- if (i && N) return new d((r) => {
169
+ let a = new Set(["STORAGE_QUOTA_EXCEEDED", "RESOURCE_CAP_EXCEEDED"]);
170
+ for (let e of r) {
171
+ let t = e.extensions?.code;
172
+ if (t && a.has(t) && typeof window < "u") {
173
+ window.dispatchEvent(new CustomEvent("burdenoff:upgrade-prompt", { detail: { extensions: e.extensions } }));
174
+ break;
175
+ }
176
+ }
177
+ if (i && M) return new f((r) => {
170
178
  (async () => {
171
179
  if (Y) if (await new Promise((e) => {
172
180
  X.push({ resolve: e });
173
181
  })) {
174
182
  let e = n(t).subscribe(r);
175
183
  return () => e.unsubscribe();
176
- } else return M?.(), r.error(e), () => {};
184
+ } else return j?.(), r.error(e), () => {};
177
185
  Y = !0;
178
186
  try {
179
- let i = await N();
187
+ let i = await M();
180
188
  if (Y = !1, i) {
181
189
  Z(!0);
182
190
  let e = n(t).subscribe(r);
183
191
  return () => e.unsubscribe();
184
- } else return Z(!1), M?.(), r.error(e), () => {};
192
+ } else return Z(!1), j?.(), r.error(e), () => {};
185
193
  } catch {
186
- return Y = !1, Z(!1), M?.(), r.error(e), () => {};
194
+ return Y = !1, Z(!1), j?.(), r.error(e), () => {};
187
195
  }
188
196
  })();
189
197
  });
190
- i && M?.(), y();
191
- } else I && console.error("[Network Error]:", e), te() && F?.(!0), e instanceof Error ? P?.(e) : P?.(Error(String(e)));
192
- }), $ = f([
198
+ i && j?.(), v();
199
+ } else I && console.error("[Network Error]:", e), ne() && P?.(!0), e instanceof Error ? N?.(e) : N?.(Error(String(e)));
200
+ }), $ = p([
193
201
  q,
194
202
  J,
195
203
  Q,
@@ -203,9 +211,9 @@ function w(i) {
203
211
  V,
204
212
  R
205
213
  ]);
206
- if (A) {
207
- let e = j || n(_ || L.defaultBaseUrl) + L.sse;
208
- e && ($ = f([
214
+ if (k) {
215
+ let e = A || n(g || L.defaultBaseUrl) + L.sse;
216
+ e && ($ = p([
209
217
  q,
210
218
  J,
211
219
  Q,
@@ -217,8 +225,8 @@ function w(i) {
217
225
  G,
218
226
  B,
219
227
  V,
220
- p(({ query: e }) => {
221
- let t = m(e);
228
+ ee(({ query: e }) => {
229
+ let t = te(e);
222
230
  return t.kind === "OperationDefinition" && t.operation === "subscription";
223
231
  }, new a({
224
232
  url: e,
@@ -227,7 +235,7 @@ function w(i) {
227
235
  }), R)
228
236
  ]));
229
237
  }
230
- let oe = new ee({ typePolicies: {
238
+ let oe = new d({ typePolicies: {
231
239
  File: { keyFields: ["id"] },
232
240
  Folder: { keyFields: ["id"] },
233
241
  Tag: { keyFields: ["id"] },
@@ -261,7 +269,7 @@ function w(i) {
261
269
  } });
262
270
  return new l({
263
271
  link: $,
264
- cache: k ?? oe,
272
+ cache: O ?? oe,
265
273
  defaultOptions: {
266
274
  watchQuery: {
267
275
  fetchPolicy: "cache-and-network",
@@ -275,17 +283,17 @@ function w(i) {
275
283
  }
276
284
  });
277
285
  }
278
- var T = null, E = null;
279
- function D(e) {
286
+ var w = null, T = null;
287
+ function E(e) {
280
288
  let { workspaceBaseUrl: t, globalBaseUrl: n, authToken: r, enableSubscriptions: i = !1, onAuthError: a, debug: o = !1 } = e;
281
- T = w({
289
+ w = C({
282
290
  gateway: "workspace",
283
291
  baseUrl: t,
284
292
  authToken: r,
285
293
  enableSubscriptions: i,
286
294
  onAuthError: a,
287
295
  debug: o
288
- }), E = w({
296
+ }), T = C({
289
297
  gateway: "global",
290
298
  baseUrl: n,
291
299
  authToken: r,
@@ -293,16 +301,16 @@ function D(e) {
293
301
  debug: o
294
302
  });
295
303
  }
304
+ function D() {
305
+ if (!w) throw Error("Workspace client not initialized. Call initializeAppClients first.");
306
+ return w;
307
+ }
296
308
  function O() {
297
- if (!T) throw Error("Workspace client not initialized. Call initializeAppClients first.");
309
+ if (!T) throw Error("Global client not initialized. Call initializeAppClients first.");
298
310
  return T;
299
311
  }
300
312
  function k() {
301
- if (!E) throw Error("Global client not initialized. Call initializeAppClients first.");
302
- return E;
303
- }
304
- function A() {
305
- T &&= (T.clearStore(), null), E &&= (E.clearStore(), null);
313
+ w &&= (w.clearStore(), null), T &&= (T.clearStore(), null);
306
314
  }
307
315
  //#endregion
308
- export { w as createGraphQLClient, k as getGlobalClient, O as getWorkspaceClient, D as initializeAppClients, A as resetAppClients };
316
+ export { C as createGraphQLClient, O as getGlobalClient, D as getWorkspaceClient, E as initializeAppClients, k as resetAppClients };
@@ -0,0 +1,63 @@
1
+ import { RESOURCE_CAP_EXCEEDED_CODE as e, extractUpgradeErrorExtensions as t } from "../utils/quotaErrors.js";
2
+ import { dispatchUpgradePrompt as n } from "../components/UpgradePromptModal.js";
3
+ import { useCallback as r, useEffect as i, useState as a } from "react";
4
+ //#region src/shared/hooks/useUpgradePrompt.ts
5
+ var o = "burdenoff:plan-usage-snapshot";
6
+ function s(e) {
7
+ if (!(typeof window > "u")) {
8
+ window.dispatchEvent(new CustomEvent(o, { detail: e }));
9
+ try {
10
+ window.sessionStorage.setItem("burdenoff:planUsage", JSON.stringify(e));
11
+ } catch {}
12
+ }
13
+ }
14
+ function c() {
15
+ if (typeof window > "u") return null;
16
+ try {
17
+ let e = window.sessionStorage.getItem("burdenoff:planUsage");
18
+ return e ? JSON.parse(e) : null;
19
+ } catch {
20
+ return null;
21
+ }
22
+ }
23
+ function l(s = {}) {
24
+ let { warnAtPercent: l = .8, resource: u } = s, [d, f] = a(c);
25
+ i(() => {
26
+ let e = (e) => {
27
+ let t = e.detail;
28
+ t && f(t);
29
+ };
30
+ return window.addEventListener(o, e), () => window.removeEventListener(o, e);
31
+ }, []);
32
+ let p = (d?.usage ?? []).filter((e) => u ? e.resource === u : !0).filter((e) => typeof e.limit == "number" && e.limit > 0 && e.current / e.limit >= l), m = r((t) => {
33
+ let r = p[0], i = {
34
+ code: e,
35
+ resource: r?.resource ?? u ?? "plan",
36
+ planName: d?.planName,
37
+ currentCount: r?.current,
38
+ limit: r?.limit ?? void 0
39
+ };
40
+ n({
41
+ extensions: t?.extensions ?? i,
42
+ title: t?.title,
43
+ description: t?.description
44
+ });
45
+ }, [
46
+ p,
47
+ d?.planName,
48
+ u
49
+ ]), h = r((e) => {
50
+ let r = t(e);
51
+ return r ? (n({ extensions: r }), !0) : !1;
52
+ }, []);
53
+ return {
54
+ plan: d,
55
+ isFree: !!d?.isFree,
56
+ isApproachingAnyLimit: p.length > 0,
57
+ approachingLimits: p,
58
+ promptUpgrade: m,
59
+ reportError: h
60
+ };
61
+ }
62
+ //#endregion
63
+ export { o as PLAN_USAGE_SNAPSHOT_EVENT, s as publishPlanUsageSnapshot, l as useUpgradePrompt };
@@ -1,21 +1,59 @@
1
1
  //#region src/shared/utils/quotaErrors.ts
2
- var e = "QUOTA_EXHAUSTED";
3
- function t(e) {
2
+ var e = "QUOTA_EXHAUSTED", t = "STORAGE_QUOTA_EXCEEDED", n = "RESOURCE_CAP_EXCEEDED", r = [
3
+ e,
4
+ t,
5
+ n
6
+ ];
7
+ function i(e) {
8
+ if (!e) return null;
9
+ for (let t of e) {
10
+ let e = t?.extensions?.code;
11
+ if (e && r.includes(e)) return t.extensions;
12
+ }
13
+ return null;
14
+ }
15
+ function a(e) {
16
+ if (typeof e != "object" || !e) return null;
17
+ let t = e, n = i(t.graphQLErrors);
18
+ if (n) return n;
19
+ let a = i(t.networkError?.result?.errors);
20
+ if (a) return a;
21
+ if (e instanceof Error && typeof e.message == "string") {
22
+ for (let t of r) if (e.message.includes(t)) return { code: t };
23
+ }
24
+ return null;
25
+ }
26
+ function o(e) {
27
+ return e ? e.code === "STORAGE_QUOTA_EXCEEDED" || typeof e.limitBytes == "number" ? {
28
+ current: e.currentBytes ?? null,
29
+ limit: e.limitBytes ?? null,
30
+ unit: "bytes"
31
+ } : {
32
+ current: e.currentCount ?? e.used ?? null,
33
+ limit: e.limit ?? null,
34
+ unit: "count"
35
+ } : {
36
+ current: null,
37
+ limit: null,
38
+ unit: "count"
39
+ };
40
+ }
41
+ function s(e) {
4
42
  if (!e) return null;
5
43
  for (let t of e) if (t?.extensions?.code === "QUOTA_EXHAUSTED") return t.extensions;
6
44
  return null;
7
45
  }
8
- function n(e) {
9
- return r(e) !== null;
46
+ function c(e) {
47
+ return l(e) !== null;
10
48
  }
11
- function r(n) {
12
- if (typeof n != "object" || !n) return null;
13
- let r = n;
14
- return t(r.graphQLErrors) || t(r.networkError?.result?.errors) || (n instanceof Error && typeof n.message == "string" && n.message.includes("QUOTA_EXHAUSTED") ? { code: e } : null);
49
+ function l(t) {
50
+ if (typeof t != "object" || !t) return null;
51
+ let n = t;
52
+ return s(n.graphQLErrors) || s(n.networkError?.result?.errors) || (t instanceof Error && typeof t.message == "string" && t.message.includes("QUOTA_EXHAUSTED") ? { code: e } : null);
15
53
  }
16
- function i(e) {
54
+ function u(e) {
17
55
  let t = e?.quotaName ?? e?.field;
18
56
  return t ? `You've reached your ${t} limit. Upgrade your plan.` : "You've reached your usage limit. Upgrade your plan.";
19
57
  }
20
58
  //#endregion
21
- export { e as QUOTA_EXHAUSTED_CODE, i as buildQuotaExhaustedMessage, r as extractQuotaExhaustedExtensions, n as isQuotaExhaustedError };
59
+ export { e as QUOTA_EXHAUSTED_CODE, n as RESOURCE_CAP_EXCEEDED_CODE, t as STORAGE_QUOTA_EXCEEDED_CODE, u as buildQuotaExhaustedMessage, l as extractQuotaExhaustedExtensions, a as extractUpgradeErrorExtensions, c as isQuotaExhaustedError, o as resolveUpgradeUsage };
@@ -12,4 +12,6 @@ import { ErrorBoundary as b } from "./shared/components/AppErrorBoundary.js";
12
12
  import { ContextConversationWidget as x } from "./shared/components/ContextConversationWidget.js";
13
13
  import { KeyboardHelpDialogWrapper as S } from "./shared/components/KeyboardHelpDialogWrapper.js";
14
14
  import { QuotaMeter as C } from "./shared/components/QuotaMeter.js";
15
- export { d as AccessDenied, b as AppErrorBoundary, v as ConditionalShell, x as ContextConversationWidget, a as ErrorBoundary, p as ErrorFallback, S as KeyboardHelpDialogWrapper, m as LoadingFallback, _ as MicrofrontendErrorBoundary, y as PWAInstallBanner, h as PageLoadingFallback, c as PermissionButton, f as PermissionDenied, l as PermissionGate, u as PermissionLink, C as QuotaMeter, o as RequireAuth, s as RequireGuest, e as SSORedirectSpinner, g as SectionLoadingFallback, t as checkRemoteSLO, n as checkSLO, r as clearLocalAuthState, i as getSSORedirectUrl };
15
+ import { UPGRADE_PROMPT_EVENT as w, UpgradePromptModal as T, dispatchUpgradePrompt as E } from "./shared/components/UpgradePromptModal.js";
16
+ import { UpgradeInlineBanner as D } from "./shared/components/UpgradeInlineBanner.js";
17
+ export { d as AccessDenied, b as AppErrorBoundary, v as ConditionalShell, x as ContextConversationWidget, a as ErrorBoundary, p as ErrorFallback, S as KeyboardHelpDialogWrapper, m as LoadingFallback, _ as MicrofrontendErrorBoundary, y as PWAInstallBanner, h as PageLoadingFallback, c as PermissionButton, f as PermissionDenied, l as PermissionGate, u as PermissionLink, C as QuotaMeter, o as RequireAuth, s as RequireGuest, e as SSORedirectSpinner, g as SectionLoadingFallback, w as UPGRADE_PROMPT_EVENT, D as UpgradeInlineBanner, T as UpgradePromptModal, t as checkRemoteSLO, n as checkSLO, r as clearLocalAuthState, E as dispatchUpgradePrompt, i as getSSORedirectUrl };
@@ -28,13 +28,14 @@ import { useHasAnimated as J } from "./shared/hooks/useHasAnimated.js";
28
28
  import { useReferralAttribution as Y } from "./shared/hooks/useReferralAttribution.js";
29
29
  import { useRecordProductVisit as X } from "./shared/hooks/useRecordProductVisit.js";
30
30
  import { QUOTA_EXHAUSTED_EVENT as Z, dispatchQuotaExhausted as Q, useQuotaErrorToast as ne } from "./shared/hooks/useQuotaErrorToast.js";
31
- import re, { use as ie } from "react";
31
+ import { PLAN_USAGE_SNAPSHOT_EVENT as re, publishPlanUsageSnapshot as ie, useUpgradePrompt as ae } from "./shared/hooks/useUpgradePrompt.js";
32
+ import oe, { use as se } from "react";
32
33
  //#region src/shared/hooks/index.ts
33
- var $ = re.createContext(null);
34
- function ae() {
35
- let e = ie($);
34
+ var $ = oe.createContext(null);
35
+ function ce() {
36
+ let e = se($);
36
37
  if (!e) throw Error("useMicrofrontendContext must be used within a MicrofrontendProvider");
37
38
  return e;
38
39
  }
39
40
  //#endregion
40
- export { x as BREAKPOINTS, r as ConsoleTransport, U as GLOBAL_SHORTCUT_CATEGORIES, e as LogLevel, n as LogManager, t as Logger, R as MODIFIER_KEYS, $ as MicrofrontendContext, z as PLATFORM_TYPES, Z as QUOTA_EXHAUSTED_EVENT, W as createGlobalShortcuts, a as detectPlatform, Q as dispatchQuotaExhausted, o as formatKeyCombo, s as getDisplayKeysForPlatform, G as getGlobalShortcutsByCategory, c as getShortcutLabel, l as isMac, u as isMobileDevice, d as isTabletDevice, ee as logManager, f as matchesKeyCombo, K as mergeShortcuts, p as normalizeKey, m as normalizePlatformCombo, h as parseKeyCombo, g as shouldEnableKeyboardShortcuts, _ as shouldIgnoreShortcut, I as useAsync, L as useAsyncImmediate, S as useBreakpoint, N as useConditionalToggle, O as useCopyToClipboard, v as useDebounce, J as useHasAnimated, V as useHotkeys, E as useKeyPress, D as useKeyboardShortcut, B as useKeyboardShortcuts, k as useLocalStorage, q as useLogger, b as useMediaQuery, ae as useMicrofrontendContext, C as useMobileBreakpoint, w as useOnClickOutside, T as useOnClickOutsideWithRef, i as usePWA, A as usePrevious, j as usePreviousDistinct, M as usePreviousHistory, ne as useQuotaErrorToast, X as useRecordProductVisit, Y as useReferralAttribution, te as useSessionStorage, H as useShortcutHelp, y as useThrottle, P as useToggle, F as useToggleObject };
41
+ export { x as BREAKPOINTS, r as ConsoleTransport, U as GLOBAL_SHORTCUT_CATEGORIES, e as LogLevel, n as LogManager, t as Logger, R as MODIFIER_KEYS, $ as MicrofrontendContext, re as PLAN_USAGE_SNAPSHOT_EVENT, z as PLATFORM_TYPES, Z as QUOTA_EXHAUSTED_EVENT, W as createGlobalShortcuts, a as detectPlatform, Q as dispatchQuotaExhausted, o as formatKeyCombo, s as getDisplayKeysForPlatform, G as getGlobalShortcutsByCategory, c as getShortcutLabel, l as isMac, u as isMobileDevice, d as isTabletDevice, ee as logManager, f as matchesKeyCombo, K as mergeShortcuts, p as normalizeKey, m as normalizePlatformCombo, h as parseKeyCombo, ie as publishPlanUsageSnapshot, g as shouldEnableKeyboardShortcuts, _ as shouldIgnoreShortcut, I as useAsync, L as useAsyncImmediate, S as useBreakpoint, N as useConditionalToggle, O as useCopyToClipboard, v as useDebounce, J as useHasAnimated, V as useHotkeys, E as useKeyPress, D as useKeyboardShortcut, B as useKeyboardShortcuts, k as useLocalStorage, q as useLogger, b as useMediaQuery, ce as useMicrofrontendContext, C as useMobileBreakpoint, w as useOnClickOutside, T as useOnClickOutsideWithRef, i as usePWA, A as usePrevious, j as usePreviousDistinct, M as usePreviousHistory, ne as useQuotaErrorToast, X as useRecordProductVisit, Y as useReferralAttribution, te as useSessionStorage, H as useShortcutHelp, y as useThrottle, P as useToggle, F as useToggleObject, ae as useUpgradePrompt };
package/dist/shared.js CHANGED
@@ -45,62 +45,65 @@ import { ContextConversationWidget as Ft } from "./shared/components/ContextConv
45
45
  import { detectPlatform as It, formatKeyCombo as Lt, getDisplayKeysForPlatform as Rt, getShortcutLabel as zt, isMac as Bt, isMobileDevice as Vt, isTabletDevice as Ht, matchesKeyCombo as Ut, normalizeKey as Wt, normalizePlatformCombo as Gt, parseKeyCombo as Kt, shouldEnableKeyboardShortcuts as qt, shouldIgnoreShortcut as Jt } from "./shared/keyboard/utils.js";
46
46
  import { KeyboardHelpDialogWrapper as Yt } from "./shared/components/KeyboardHelpDialogWrapper.js";
47
47
  import { QuotaMeter as Xt } from "./shared/components/QuotaMeter.js";
48
+ import { UPGRADE_PROMPT_EVENT as Zt, UpgradePromptModal as Qt, dispatchUpgradePrompt as $t } from "./shared/components/UpgradePromptModal.js";
49
+ import { UpgradeInlineBanner as en } from "./shared/components/UpgradeInlineBanner.js";
48
50
  import "./shared-components.js";
49
- import { DevtoolsSink as Zt } from "./shared/events/sinks/DevtoolsSink.js";
50
- import { BroadcastChannelSink as Qt } from "./shared/events/sinks/BroadcastChannelSink.js";
51
- import { BackendAuditSink as $t } from "./shared/events/sinks/BackendAuditSink.js";
52
- import { RybbitSink as en } from "./shared/events/sinks/RybbitSink.js";
53
- import { OtelBrowserSink as tn } from "./shared/events/sinks/OtelBrowserSink.js";
54
- import { EventBusProvider as nn, createEventBus as rn, useEvent as an, useEventBus as on, useEventEmitter as sn } from "./shared-events.js";
55
- import { useDebounce as cn } from "./shared/hooks/useDebounce.js";
56
- import { useThrottle as ln } from "./shared/hooks/useThrottle.js";
57
- import { useMediaQuery as un } from "./shared/hooks/useMediaQuery.js";
58
- import { BREAKPOINTS as dn, useBreakpoint as fn, useMobileBreakpoint as pn } from "./shared/hooks/useBreakpoint.js";
59
- import { useOnClickOutside as mn, useOnClickOutsideWithRef as hn } from "./shared/hooks/useOnClickOutside.js";
60
- import { useKeyPress as gn, useKeyboardShortcut as _n } from "./shared/hooks/useKeyPress.js";
61
- import { useCopyToClipboard as vn } from "./shared/hooks/useCopyToClipboard.js";
62
- import { useLocalStorage as yn } from "./shared/hooks/useLocalStorage.js";
63
- import { useSessionStorage as bn } from "./shared/hooks/useSessionStorage.js";
64
- import { usePrevious as xn, usePreviousDistinct as Sn, usePreviousHistory as Cn } from "./shared/hooks/usePrevious.js";
65
- import { useConditionalToggle as wn, useToggle as Tn, useToggleObject as En } from "./shared/hooks/useToggle.js";
66
- import { useAsync as Dn, useAsyncImmediate as On } from "./shared/hooks/useAsync.js";
67
- import { MODIFIER_KEYS as kn, PLATFORM_TYPES as An } from "./shared/keyboard/types.js";
68
- import { useKeyboardShortcuts as jn } from "./shared/keyboard/useKeyboardShortcuts.js";
69
- import { useHotkeys as Mn } from "./shared/keyboard/useHotkeys.js";
70
- import { useShortcutHelp as Nn } from "./shared/keyboard/useShortcutHelp.js";
71
- import { GLOBAL_SHORTCUT_CATEGORIES as Pn, createGlobalShortcuts as Fn, getGlobalShortcutsByCategory as In, mergeShortcuts as Ln } from "./shared/keyboard/globalShortcuts.js";
72
- import { useLogger as Rn } from "./shared/logger/useLogger.js";
73
- import { useHasAnimated as zn } from "./shared/hooks/useHasAnimated.js";
74
- import { useReferralAttribution as Bn } from "./shared/hooks/useReferralAttribution.js";
75
- import { useRecordProductVisit as Vn } from "./shared/hooks/useRecordProductVisit.js";
76
- import { QUOTA_EXHAUSTED_EVENT as Hn, dispatchQuotaExhausted as Un, useQuotaErrorToast as Wn } from "./shared/hooks/useQuotaErrorToast.js";
77
- import { MicrofrontendContext as Gn, useMicrofrontendContext as Kn } from "./shared-hooks.js";
78
- import { detectDeviceType as qn, getResponsiveSelector as Jn } from "./shared/tours/types.js";
79
- import { useTourPlayer as Yn } from "./shared/tours/useTourPlayer.js";
80
- import { TourSpotlight as Xn } from "./shared/tours/TourSpotlight.js";
81
- import { TourTooltip as Zn } from "./shared/tours/TourTooltip.js";
82
- import { TourPlayerProvider as Qn, useIsTourPlaying as $n, useStartTour as er, useStopTour as tr, useTourPlayerContext as nr } from "./shared/tours/TourPlayerProvider.js";
83
- import { TourPlayer as rr, TourTriggerButton as ir, usePlayTour as ar } from "./shared/tours/TourPlayer.js";
84
- import { getTourContextRank as or, getTourRouteCatalog as sr, getTourRouteModules as cr, getTourRoutePages as lr, isTourVisibleForContext as ur, normalizeTourPath as dr, registerTourRouteCatalog as fr, resolveTourTargetPath as pr } from "./shared/tours/routeCatalog.js";
85
- import { withTourProgressStatus as mr } from "./shared/tours/progress.js";
86
- import { ToursProvider as hr, useAutoStartTour as gr, useSafeToursContext as _r, useTours as vr, useToursContext as yr } from "./shared/tours/ToursContext.js";
87
- import { TourTrigger as br } from "./shared/tours/TourTrigger.js";
88
- import { TourInitializer as xr } from "./shared/tours/TourInitializer.js";
51
+ import { DevtoolsSink as tn } from "./shared/events/sinks/DevtoolsSink.js";
52
+ import { BroadcastChannelSink as nn } from "./shared/events/sinks/BroadcastChannelSink.js";
53
+ import { BackendAuditSink as rn } from "./shared/events/sinks/BackendAuditSink.js";
54
+ import { RybbitSink as an } from "./shared/events/sinks/RybbitSink.js";
55
+ import { OtelBrowserSink as on } from "./shared/events/sinks/OtelBrowserSink.js";
56
+ import { EventBusProvider as sn, createEventBus as cn, useEvent as ln, useEventBus as un, useEventEmitter as dn } from "./shared-events.js";
57
+ import { useDebounce as fn } from "./shared/hooks/useDebounce.js";
58
+ import { useThrottle as pn } from "./shared/hooks/useThrottle.js";
59
+ import { useMediaQuery as mn } from "./shared/hooks/useMediaQuery.js";
60
+ import { BREAKPOINTS as hn, useBreakpoint as gn, useMobileBreakpoint as _n } from "./shared/hooks/useBreakpoint.js";
61
+ import { useOnClickOutside as vn, useOnClickOutsideWithRef as yn } from "./shared/hooks/useOnClickOutside.js";
62
+ import { useKeyPress as bn, useKeyboardShortcut as xn } from "./shared/hooks/useKeyPress.js";
63
+ import { useCopyToClipboard as Sn } from "./shared/hooks/useCopyToClipboard.js";
64
+ import { useLocalStorage as Cn } from "./shared/hooks/useLocalStorage.js";
65
+ import { useSessionStorage as wn } from "./shared/hooks/useSessionStorage.js";
66
+ import { usePrevious as Tn, usePreviousDistinct as En, usePreviousHistory as Dn } from "./shared/hooks/usePrevious.js";
67
+ import { useConditionalToggle as On, useToggle as kn, useToggleObject as An } from "./shared/hooks/useToggle.js";
68
+ import { useAsync as jn, useAsyncImmediate as Mn } from "./shared/hooks/useAsync.js";
69
+ import { MODIFIER_KEYS as Nn, PLATFORM_TYPES as Pn } from "./shared/keyboard/types.js";
70
+ import { useKeyboardShortcuts as Fn } from "./shared/keyboard/useKeyboardShortcuts.js";
71
+ import { useHotkeys as In } from "./shared/keyboard/useHotkeys.js";
72
+ import { useShortcutHelp as Ln } from "./shared/keyboard/useShortcutHelp.js";
73
+ import { GLOBAL_SHORTCUT_CATEGORIES as Rn, createGlobalShortcuts as zn, getGlobalShortcutsByCategory as Bn, mergeShortcuts as Vn } from "./shared/keyboard/globalShortcuts.js";
74
+ import { useLogger as Hn } from "./shared/logger/useLogger.js";
75
+ import { useHasAnimated as Un } from "./shared/hooks/useHasAnimated.js";
76
+ import { useReferralAttribution as Wn } from "./shared/hooks/useReferralAttribution.js";
77
+ import { useRecordProductVisit as Gn } from "./shared/hooks/useRecordProductVisit.js";
78
+ import { QUOTA_EXHAUSTED_EVENT as Kn, dispatchQuotaExhausted as qn, useQuotaErrorToast as Jn } from "./shared/hooks/useQuotaErrorToast.js";
79
+ import { PLAN_USAGE_SNAPSHOT_EVENT as Yn, publishPlanUsageSnapshot as Xn, useUpgradePrompt as Zn } from "./shared/hooks/useUpgradePrompt.js";
80
+ import { MicrofrontendContext as Qn, useMicrofrontendContext as $n } from "./shared-hooks.js";
81
+ import { detectDeviceType as er, getResponsiveSelector as tr } from "./shared/tours/types.js";
82
+ import { useTourPlayer as nr } from "./shared/tours/useTourPlayer.js";
83
+ import { TourSpotlight as rr } from "./shared/tours/TourSpotlight.js";
84
+ import { TourTooltip as ir } from "./shared/tours/TourTooltip.js";
85
+ import { TourPlayerProvider as ar, useIsTourPlaying as or, useStartTour as sr, useStopTour as cr, useTourPlayerContext as lr } from "./shared/tours/TourPlayerProvider.js";
86
+ import { TourPlayer as ur, TourTriggerButton as dr, usePlayTour as fr } from "./shared/tours/TourPlayer.js";
87
+ import { getTourContextRank as pr, getTourRouteCatalog as mr, getTourRouteModules as hr, getTourRoutePages as gr, isTourVisibleForContext as _r, normalizeTourPath as vr, registerTourRouteCatalog as yr, resolveTourTargetPath as br } from "./shared/tours/routeCatalog.js";
88
+ import { withTourProgressStatus as xr } from "./shared/tours/progress.js";
89
+ import { ToursProvider as Sr, useAutoStartTour as Cr, useSafeToursContext as wr, useTours as Tr, useToursContext as Er } from "./shared/tours/ToursContext.js";
90
+ import { TourTrigger as Dr } from "./shared/tours/TourTrigger.js";
91
+ import { TourInitializer as Or } from "./shared/tours/TourInitializer.js";
89
92
  import "./shared-tours.js";
90
- import { AppShellProvider as Sr, resolveAppShellObservabilityConfig as Cr } from "./shared/providers/AppShellProvider.js";
91
- import { MicrofrontendProvider as wr } from "./shared-providers.js";
92
- import { getNativeBridge as Tr } from "./shared/native/bridge.js";
93
- import { getPlatform as Er, isAndroid as Dr, isIOS as Or, isNative as kr, isWeb as Ar } from "./shared/native/platform.js";
94
- import { nativeConfirm as jr, nativeCopyText as Mr, nativeImpact as Nr, nativeNotify as Pr, nativeOpenUrl as Fr, nativeShare as Ir, nativeToast as Lr } from "./shared/native/consumers.js";
95
- import { useNativePlatform as Rr } from "./shared/native/hooks/useNativePlatform.js";
96
- import { useSafeArea as zr } from "./shared/native/hooks/useSafeArea.js";
97
- import { useNativeKeyboard as Br } from "./shared/native/hooks/useNativeKeyboard.js";
98
- import { useAppState as Vr } from "./shared/native/hooks/useAppState.js";
99
- import { useDeviceInfo as Hr } from "./shared/native/hooks/useDeviceInfo.js";
100
- import { useHaptics as Ur } from "./shared/native/hooks/useHaptics.js";
101
- import { useStatusBar as Wr } from "./shared/native/hooks/useStatusBar.js";
93
+ import { AppShellProvider as kr, resolveAppShellObservabilityConfig as Ar } from "./shared/providers/AppShellProvider.js";
94
+ import { MicrofrontendProvider as jr } from "./shared-providers.js";
95
+ import { getNativeBridge as Mr } from "./shared/native/bridge.js";
96
+ import { getPlatform as Nr, isAndroid as Pr, isIOS as Fr, isNative as Ir, isWeb as Lr } from "./shared/native/platform.js";
97
+ import { nativeConfirm as Rr, nativeCopyText as zr, nativeImpact as Br, nativeNotify as Vr, nativeOpenUrl as Hr, nativeShare as Ur, nativeToast as Wr } from "./shared/native/consumers.js";
98
+ import { useNativePlatform as Gr } from "./shared/native/hooks/useNativePlatform.js";
99
+ import { useSafeArea as Kr } from "./shared/native/hooks/useSafeArea.js";
100
+ import { useNativeKeyboard as qr } from "./shared/native/hooks/useNativeKeyboard.js";
101
+ import { useAppState as Jr } from "./shared/native/hooks/useAppState.js";
102
+ import { useDeviceInfo as Yr } from "./shared/native/hooks/useDeviceInfo.js";
103
+ import { useHaptics as Xr } from "./shared/native/hooks/useHaptics.js";
104
+ import { useStatusBar as Zr } from "./shared/native/hooks/useStatusBar.js";
102
105
  import "./shared-native.js";
103
106
  //#region src/shared/index.ts
104
- var Gr = "1.0.0";
107
+ var Qr = "1.0.0";
105
108
  //#endregion
106
- export { vt as AccessDenied, be as ApolloClient, xe as ApolloProvider, Ot as AppErrorBoundary, Je as AppInitializer, Sr as AppShellProvider, dn as BREAKPOINTS, $t as BackendAuditSink, Qt as BroadcastChannelSink, U as COMMON_SHELL_LESS_ROUTES, Tt as ConditionalShell, tt as ConsoleTransport, Ft as ContextConversationWidget, Y as DEFAULT_PAGE_SIZE, W as DEFAULT_SHELL_CONFIG, Zt as DevtoolsSink, ft as ErrorBoundary, bt as ErrorFallback, nn as EventBusProvider, Gr as FE_SHARED_VERSION, kt as FeatureFlagProvider, Pt as FeatureGate, X as GATEWAYS, Pn as GLOBAL_SHORTCUT_CATEGORIES, he as GatewayProvider, Se as InMemoryCache, Yt as KeyboardHelpDialogWrapper, xt as LoadingFallback, Ze as LogLevel, $e as LogManager, Qe as Logger, kn as MODIFIER_KEYS, Gn as MicrofrontendContext, wt as MicrofrontendErrorBoundary, wr as MicrofrontendProvider, tn as OtelBrowserSink, An as PLATFORM_TYPES, z as PRODUCTS, B as PRODUCT_URLS, Dt as PWAInstallBanner, St as PageLoadingFallback, ht as PermissionButton, yt as PermissionDenied, gt as PermissionGate, _t as PermissionLink, st as QUOTA_EXHAUSTED_CODE, Hn as QUOTA_EXHAUSTED_EVENT, Xt as QuotaMeter, pt as RequireAuth, mt as RequireGuest, en as RybbitSink, le as SSELink, Ue as SSORedirectSpinner, Ct as SectionLoadingFallback, xr as TourInitializer, rr as TourPlayer, Qn as TourPlayerProvider, Xn as TourSpotlight, Zn as TourTooltip, br as TourTrigger, ir as TourTriggerButton, hr as ToursProvider, t as alertTokens, ke as attemptTokenRefresh, ct as buildQuotaExhaustedMessage, f as capitalizeFirst, p as capitalizeWords, n as categoryTokens, We as checkRemoteSLO, Ge as checkSLO, Ae as clearAuthSessionStorage, Ke as clearLocalAuthState, Fe as clearSSoCookie, Ie as clearShellSsoCookies, nt as clearUserContext, dt as cn, e as createApolloClient, rn as createEventBus, Fn as createGlobalShortcuts, ue as createGraphQLClient, at as createProfileScopedStorage, qn as detectDeviceType, It as detectPlatform, Un as dispatchQuotaExhausted, lt as extractQuotaExhaustedExtensions, m as formatBytes, h as formatCompactNumber, g as formatCurrency, _ as formatCurrencyCompact, v as formatDate, y as formatDateTime, b as formatDuration, Lt as formatKeyCombo, x as formatList, S as formatNumber, C as formatOrdinal, w as formatPercentage, T as formatRelativeTime, E as formatTime, r as getAlertTokens, i as getCategoryTokens, Rt as getDisplayKeysForPlatform, Z as getGatewayConfig, Q as getGatewayUrl, de as getGlobalClient, In as getGlobalShortcutsByCategory, $ as getGraphQLEndpoint, Tr as getNativeBridge, Er as getPlatform, V as getProductUrl, H as getProductsWithUrls, ot as getProfileScopedKey, a as getProgressTokens, Jn as getResponsiveSelector, qe as getSSORedirectUrl, Le as getSSoCookie, G as getShellConfig, zt as getShortcutLabel, o as getStatusBadgeTokens, s as getStatusTokens, ne as getStoredAuthToken, re as getStoredLocale, ie as getStoredOrganizationId, ae as getStoredWorkspaceId, oe as getStoredWorkspaceToken, or as getTourContextRank, sr as getTourRouteCatalog, cr as getTourRouteModules, lr as getTourRoutePages, c as getTrendTokens, fe as getWorkspaceClient, ee as getWorkspaceTokenPayload, Ce as gql, se as graphqlFetch, je as hasAuthGraphQLErrors, pe as initializeAppClients, rt as initializeLogger, F as installGatewayFetchRewrite, Dr as isAndroid, Me as isAuthGraphQLError, Ne as isAuthNetworkError, M as isChunkLoadError, Or as isIOS, Bt as isMac, Vt as isMobileDevice, kr as isNative, ut as isQuotaExhaustedError, Re as isSharedSsoCookieDomain, K as isShellLessRoute, Ht as isTabletDevice, ur as isTourVisibleForContext, ze as isTrustedSsoOrigin, Ar as isWeb, te as isWorkspaceTokenValidForContext, N as lazyWithRetry, et as logManager, Ut as matchesKeyCombo, Ln as mergeShortcuts, jr as nativeConfirm, Mr as nativeCopyText, Nr as nativeImpact, Pr as nativeNotify, Fr as nativeOpenUrl, Ir as nativeShare, Lr as nativeToast, Wt as normalizeKey, Gt as normalizePlatformCombo, dr as normalizeTourPath, Kt as parseKeyCombo, D as pluralize, l as progressTokens, Be as readShellSsoCookie, Pe as redirectToLogin, fr as registerTourRouteCatalog, me as resetAppClients, Cr as resolveAppShellObservabilityConfig, R as resolveAuthBridgeConfig, I as resolveGatewayBases, ce as resolveGatewayUrl, P as resolveGatewayUrls, pr as resolveTourTargetPath, Ve as setSSoCookie, He as setShellSsoCookies, it as setUserContext, qt as shouldEnableKeyboardShortcuts, Jt as shouldIgnoreShortcut, q as shouldShowBreadcrumb, J as shouldShowSidebar, O as slugify, u as statusTokens, L as suppressConsole, k as toCamelCase, A as toPascalCase, d as trendTokens, j as truncateText, we as useApolloClient, Vr as useAppState, Dn as useAsync, On as useAsyncImmediate, gr as useAutoStartTour, fn as useBreakpoint, wn as useConditionalToggle, vn as useCopyToClipboard, cn as useDebounce, Hr as useDeviceInfo, an as useEvent, on as useEventBus, sn as useEventEmitter, jt as useFeatureFlag, Mt as useFeatureFlagDetails, Nt as useFeatureFlagValue, At as useFeatureFlags, ge as useGateway, _e as useGatewayClient, Ur as useHaptics, zn as useHasAnimated, Mn as useHotkeys, $n as useIsTourPlaying, gn as useKeyPress, _n as useKeyboardShortcut, jn as useKeyboardShortcuts, Te as useLazyQuery, yn as useLocalStorage, Rn as useLogger, un as useMediaQuery, Kn as useMicrofrontendContext, pn as useMobileBreakpoint, Ee as useMutation, Br as useNativeKeyboard, Rr as useNativePlatform, mn as useOnClickOutside, hn as useOnClickOutsideWithRef, Et as usePWA, ar as usePlayTour, xn as usePrevious, Sn as usePreviousDistinct, Cn as usePreviousHistory, De as useQuery, Wn as useQuotaErrorToast, Vn as useRecordProductVisit, Bn as useReferralAttribution, Ye as useRegistryHelpers, zr as useSafeArea, ve as useSafeGateway, ye as useSafeGatewayClient, _r as useSafeToursContext, bn as useSessionStorage, Xe as useShellNavigate, Nn as useShortcutHelp, er as useStartTour, Wr as useStatusBar, tr as useStopTour, Oe as useSubscription, ln as useThrottle, Tn as useToggle, En as useToggleObject, Yn as useTourPlayer, nr as useTourPlayerContext, vr as useTours, yr as useToursContext, mr as withTourProgressStatus };
109
+ export { vt as AccessDenied, be as ApolloClient, xe as ApolloProvider, Ot as AppErrorBoundary, Je as AppInitializer, kr as AppShellProvider, hn as BREAKPOINTS, rn as BackendAuditSink, nn as BroadcastChannelSink, U as COMMON_SHELL_LESS_ROUTES, Tt as ConditionalShell, tt as ConsoleTransport, Ft as ContextConversationWidget, Y as DEFAULT_PAGE_SIZE, W as DEFAULT_SHELL_CONFIG, tn as DevtoolsSink, ft as ErrorBoundary, bt as ErrorFallback, sn as EventBusProvider, Qr as FE_SHARED_VERSION, kt as FeatureFlagProvider, Pt as FeatureGate, X as GATEWAYS, Rn as GLOBAL_SHORTCUT_CATEGORIES, he as GatewayProvider, Se as InMemoryCache, Yt as KeyboardHelpDialogWrapper, xt as LoadingFallback, Ze as LogLevel, $e as LogManager, Qe as Logger, Nn as MODIFIER_KEYS, Qn as MicrofrontendContext, wt as MicrofrontendErrorBoundary, jr as MicrofrontendProvider, on as OtelBrowserSink, Yn as PLAN_USAGE_SNAPSHOT_EVENT, Pn as PLATFORM_TYPES, z as PRODUCTS, B as PRODUCT_URLS, Dt as PWAInstallBanner, St as PageLoadingFallback, ht as PermissionButton, yt as PermissionDenied, gt as PermissionGate, _t as PermissionLink, st as QUOTA_EXHAUSTED_CODE, Kn as QUOTA_EXHAUSTED_EVENT, Xt as QuotaMeter, pt as RequireAuth, mt as RequireGuest, an as RybbitSink, le as SSELink, Ue as SSORedirectSpinner, Ct as SectionLoadingFallback, Or as TourInitializer, ur as TourPlayer, ar as TourPlayerProvider, rr as TourSpotlight, ir as TourTooltip, Dr as TourTrigger, dr as TourTriggerButton, Sr as ToursProvider, Zt as UPGRADE_PROMPT_EVENT, en as UpgradeInlineBanner, Qt as UpgradePromptModal, t as alertTokens, ke as attemptTokenRefresh, ct as buildQuotaExhaustedMessage, f as capitalizeFirst, p as capitalizeWords, n as categoryTokens, We as checkRemoteSLO, Ge as checkSLO, Ae as clearAuthSessionStorage, Ke as clearLocalAuthState, Fe as clearSSoCookie, Ie as clearShellSsoCookies, nt as clearUserContext, dt as cn, e as createApolloClient, cn as createEventBus, zn as createGlobalShortcuts, ue as createGraphQLClient, at as createProfileScopedStorage, er as detectDeviceType, It as detectPlatform, qn as dispatchQuotaExhausted, $t as dispatchUpgradePrompt, lt as extractQuotaExhaustedExtensions, m as formatBytes, h as formatCompactNumber, g as formatCurrency, _ as formatCurrencyCompact, v as formatDate, y as formatDateTime, b as formatDuration, Lt as formatKeyCombo, x as formatList, S as formatNumber, C as formatOrdinal, w as formatPercentage, T as formatRelativeTime, E as formatTime, r as getAlertTokens, i as getCategoryTokens, Rt as getDisplayKeysForPlatform, Z as getGatewayConfig, Q as getGatewayUrl, de as getGlobalClient, Bn as getGlobalShortcutsByCategory, $ as getGraphQLEndpoint, Mr as getNativeBridge, Nr as getPlatform, V as getProductUrl, H as getProductsWithUrls, ot as getProfileScopedKey, a as getProgressTokens, tr as getResponsiveSelector, qe as getSSORedirectUrl, Le as getSSoCookie, G as getShellConfig, zt as getShortcutLabel, o as getStatusBadgeTokens, s as getStatusTokens, ne as getStoredAuthToken, re as getStoredLocale, ie as getStoredOrganizationId, ae as getStoredWorkspaceId, oe as getStoredWorkspaceToken, pr as getTourContextRank, mr as getTourRouteCatalog, hr as getTourRouteModules, gr as getTourRoutePages, c as getTrendTokens, fe as getWorkspaceClient, ee as getWorkspaceTokenPayload, Ce as gql, se as graphqlFetch, je as hasAuthGraphQLErrors, pe as initializeAppClients, rt as initializeLogger, F as installGatewayFetchRewrite, Pr as isAndroid, Me as isAuthGraphQLError, Ne as isAuthNetworkError, M as isChunkLoadError, Fr as isIOS, Bt as isMac, Vt as isMobileDevice, Ir as isNative, ut as isQuotaExhaustedError, Re as isSharedSsoCookieDomain, K as isShellLessRoute, Ht as isTabletDevice, _r as isTourVisibleForContext, ze as isTrustedSsoOrigin, Lr as isWeb, te as isWorkspaceTokenValidForContext, N as lazyWithRetry, et as logManager, Ut as matchesKeyCombo, Vn as mergeShortcuts, Rr as nativeConfirm, zr as nativeCopyText, Br as nativeImpact, Vr as nativeNotify, Hr as nativeOpenUrl, Ur as nativeShare, Wr as nativeToast, Wt as normalizeKey, Gt as normalizePlatformCombo, vr as normalizeTourPath, Kt as parseKeyCombo, D as pluralize, l as progressTokens, Xn as publishPlanUsageSnapshot, Be as readShellSsoCookie, Pe as redirectToLogin, yr as registerTourRouteCatalog, me as resetAppClients, Ar as resolveAppShellObservabilityConfig, R as resolveAuthBridgeConfig, I as resolveGatewayBases, ce as resolveGatewayUrl, P as resolveGatewayUrls, br as resolveTourTargetPath, Ve as setSSoCookie, He as setShellSsoCookies, it as setUserContext, qt as shouldEnableKeyboardShortcuts, Jt as shouldIgnoreShortcut, q as shouldShowBreadcrumb, J as shouldShowSidebar, O as slugify, u as statusTokens, L as suppressConsole, k as toCamelCase, A as toPascalCase, d as trendTokens, j as truncateText, we as useApolloClient, Jr as useAppState, jn as useAsync, Mn as useAsyncImmediate, Cr as useAutoStartTour, gn as useBreakpoint, On as useConditionalToggle, Sn as useCopyToClipboard, fn as useDebounce, Yr as useDeviceInfo, ln as useEvent, un as useEventBus, dn as useEventEmitter, jt as useFeatureFlag, Mt as useFeatureFlagDetails, Nt as useFeatureFlagValue, At as useFeatureFlags, ge as useGateway, _e as useGatewayClient, Xr as useHaptics, Un as useHasAnimated, In as useHotkeys, or as useIsTourPlaying, bn as useKeyPress, xn as useKeyboardShortcut, Fn as useKeyboardShortcuts, Te as useLazyQuery, Cn as useLocalStorage, Hn as useLogger, mn as useMediaQuery, $n as useMicrofrontendContext, _n as useMobileBreakpoint, Ee as useMutation, qr as useNativeKeyboard, Gr as useNativePlatform, vn as useOnClickOutside, yn as useOnClickOutsideWithRef, Et as usePWA, fr as usePlayTour, Tn as usePrevious, En as usePreviousDistinct, Dn as usePreviousHistory, De as useQuery, Jn as useQuotaErrorToast, Gn as useRecordProductVisit, Wn as useReferralAttribution, Ye as useRegistryHelpers, Kr as useSafeArea, ve as useSafeGateway, ye as useSafeGatewayClient, wr as useSafeToursContext, wn as useSessionStorage, Xe as useShellNavigate, Ln as useShortcutHelp, sr as useStartTour, Zr as useStatusBar, cr as useStopTour, Oe as useSubscription, pn as useThrottle, kn as useToggle, An as useToggleObject, nr as useTourPlayer, lr as useTourPlayerContext, Tr as useTours, Er as useToursContext, Zn as useUpgradePrompt, xr as withTourProgressStatus };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.527.5",
3
+ "version": "2026.527.6",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "imports": {