@burdenoff/fe-libs 2026.1005.3 → 2026.1006.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.
Files changed (34) hide show
  1. package/dist/shared/assistant/index.d.ts +3 -0
  2. package/dist/shared/assistant/index.d.ts.map +1 -1
  3. package/dist/shared/assistant/speech/createSpeechEngine.d.ts.map +1 -1
  4. package/dist/shared/assistant/speech/createSpeechEngine.js +38 -37
  5. package/dist/shared/assistant/speech/notifyCancellationSpeechEngine.d.ts +4 -0
  6. package/dist/shared/assistant/speech/notifyCancellationSpeechEngine.d.ts.map +1 -0
  7. package/dist/shared/assistant/speech/notifyCancellationSpeechEngine.js +38 -0
  8. package/dist/shared/assistant/ui/WorkflowAssistantPanel.d.ts +14 -0
  9. package/dist/shared/assistant/ui/WorkflowAssistantPanel.d.ts.map +1 -0
  10. package/dist/shared/assistant/ui/WorkflowAssistantPanel.js +425 -0
  11. package/dist/shared/assistant/workflowApi.d.ts +100 -0
  12. package/dist/shared/assistant/workflowApi.d.ts.map +1 -0
  13. package/dist/shared/assistant/workflowApi.js +206 -0
  14. package/dist/shared/components/SSORedirectGuard.d.ts +15 -0
  15. package/dist/shared/components/SSORedirectGuard.d.ts.map +1 -1
  16. package/dist/shared/components/SSORedirectGuard.js +39 -42
  17. package/dist/shared/native/platform.d.ts +6 -0
  18. package/dist/shared/native/platform.d.ts.map +1 -1
  19. package/dist/shared/native/platform.js +22 -15
  20. package/dist/shared/providers/shell/authProvider/ssoRelay.d.ts +3 -3
  21. package/dist/shared/providers/shell/authProvider/ssoRelay.d.ts.map +1 -1
  22. package/dist/shared/providers/shell/authProvider/ssoRelay.js +14 -13
  23. package/dist/shared/providers/shell/authProvider/useBridgeInitialization.d.ts.map +1 -1
  24. package/dist/shared/providers/shell/authProvider/useBridgeInitialization.js +38 -37
  25. package/dist/shared/providers/shell/authProvider/useSsoDepositBootGuard.d.ts.map +1 -1
  26. package/dist/shared/providers/shell/authProvider/useSsoDepositBootGuard.js +23 -26
  27. package/dist/shared-assistant.js +202 -199
  28. package/dist/shell-native/capacitor-config.d.ts +2 -0
  29. package/dist/shell-native/capacitor-config.d.ts.map +1 -1
  30. package/dist/shell-native/capacitor-config.js +38 -32
  31. package/dist/shell-native/index.d.ts +1 -1
  32. package/dist/shell-native/index.d.ts.map +1 -1
  33. package/dist/shell-native.js +4 -4
  34. package/package.json +2 -2
@@ -1,9 +1,10 @@
1
1
  import { resolveAuthBridgeConfig as e } from "../../../config/authBridgeUrls.js";
2
2
  import { isLocalDevSsoHost as t, isTrustedSsoOrigin as n, readShellSsoCookie as r } from "../../../utils/authCookie.js";
3
- import { hasRecentSSORedirectAttempt as i, markSSORedirectAttempt as a, shouldSkipSSORedirect as o } from "../../../components/SSORedirectGuard.js";
3
+ import { isRealNativeOrDesktopShell as i } from "../../../native/platform.js";
4
+ import { hasRecentSSORedirectAttempt as a, markSSORedirectAttempt as o, shouldSkipSSORedirect as s } from "../../../components/SSORedirectGuard.js";
4
5
  //#region src/shared/providers/shell/authProvider/ssoRelay.ts
5
- function s() {
6
- if (typeof window > "u") return null;
6
+ function c() {
7
+ if (typeof window > "u" || i()) return null;
7
8
  try {
8
9
  let t = e(), n = new URL(t.url).origin;
9
10
  if (n === window.location.origin) return null;
@@ -13,7 +14,7 @@ function s() {
13
14
  return null;
14
15
  }
15
16
  }
16
- function c(e) {
17
+ function l(e) {
17
18
  if (!e) return !1;
18
19
  try {
19
20
  return !!(localStorage.getItem(`bf-p-${e}-tokens`) && localStorage.getItem(`bf-p-${e}-user`));
@@ -21,18 +22,18 @@ function c(e) {
21
22
  return !1;
22
23
  }
23
24
  }
24
- function l(e) {
25
+ function u(e) {
25
26
  try {
26
- if (o() || t()) return null;
27
- let s = r();
28
- if (!s?.origin || !n(s.origin)) return null;
29
- let l = new URL(s.origin).origin, u = new URL(e).origin;
30
- if (l === window.location.origin || l === u || c(s.id)) return null;
31
- let d = window.location.href;
32
- return i(l, d) ? null : (a(l, d), `${l}/auth/sso-relay?returnTo=${encodeURIComponent(d)}`);
27
+ if (i() || s() || t()) return null;
28
+ let c = r();
29
+ if (!c?.origin || !n(c.origin)) return null;
30
+ let u = new URL(c.origin).origin, d = new URL(e).origin;
31
+ if (u === window.location.origin || u === d || l(c.id)) return null;
32
+ let f = window.location.href;
33
+ return a(u, f) ? null : (o(u, f), `${u}/auth/sso-relay?returnTo=${encodeURIComponent(f)}`);
33
34
  } catch {
34
35
  return null;
35
36
  }
36
37
  }
37
38
  //#endregion
38
- export { l as getCookieSsoRelayUrl, s as getCrossOriginLogoutUrl };
39
+ export { u as getCookieSsoRelayUrl, c as getCrossOriginLogoutUrl };
@@ -1 +1 @@
1
- {"version":3,"file":"useBridgeInitialization.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/useBridgeInitialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,UAAU,EAKhB,MAAM,0BAA0B,CAAC;AAUlC,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACxC,oBAAoB,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChD,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,OAAO,EACP,SAAS,EACT,sBAAsB,EACtB,aAAa,EACb,eAAe,GAChB,EAAE,wBAAwB,GAAG,IAAI,CAsHjC"}
1
+ {"version":3,"file":"useBridgeInitialization.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/useBridgeInitialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,UAAU,EAKhB,MAAM,0BAA0B,CAAC;AAWlC,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACxC,oBAAoB,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChD,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,OAAO,EACP,SAAS,EACT,sBAAsB,EACtB,aAAa,EACb,eAAe,GAChB,EAAE,wBAAwB,GAAG,IAAI,CA0HjC"}
@@ -1,86 +1,87 @@
1
1
  import { getProfileTokens as e, getProfileUser as t, getProfileWorkspaceToken as n, resolveActiveProfileId as r } from "../ProfileStorageManager.js";
2
2
  import { initAuthBridge as i, isAuthBridgeInitialized as a } from "../AuthBridgeClient.js";
3
- import { hasRecentSSORedirectAttempt as o, markSSORedirectAttempt as s, shouldSkipSSORedirect as c } from "../../../components/SSORedirectGuard.js";
4
- import { getCookieSsoRelayUrl as l } from "./ssoRelay.js";
5
- import { syncBridgeStateToProfileStorage as u } from "./bridgeStateSync.js";
6
- import { useEffect as d } from "react";
3
+ import { isRealNativeOrDesktopShell as o } from "../../../native/platform.js";
4
+ import { hasRecentSSORedirectAttempt as s, markSSORedirectAttempt as c, shouldSkipSSORedirect as l } from "../../../components/SSORedirectGuard.js";
5
+ import { getCookieSsoRelayUrl as u } from "./ssoRelay.js";
6
+ import { syncBridgeStateToProfileStorage as d } from "./bridgeStateSync.js";
7
+ import { useEffect as f } from "react";
7
8
  //#region src/shared/providers/shell/authProvider/useBridgeInitialization.ts
8
- function f({ bridgeUrl: f, bridgeAllowedOrigins: p, bridgeDebug: m, onBridgeReady: h, bridgeSyncInProgress: g, setIsLoading: _, setActiveId: v, setUser: y, setTokens: b, setWorkspaceTokenLocal: x, clearAccounts: S, refreshAccounts: C }) {
9
- d(() => {
10
- if (!f) return;
9
+ function p({ bridgeUrl: p, bridgeAllowedOrigins: m, bridgeDebug: h, onBridgeReady: g, bridgeSyncInProgress: _, setIsLoading: v, setActiveId: y, setUser: b, setTokens: x, setWorkspaceTokenLocal: S, clearAccounts: C, refreshAccounts: w }) {
10
+ f(() => {
11
+ if (!p) return;
11
12
  try {
12
- let e = new URL(f).pathname;
13
+ let e = new URL(p).pathname;
13
14
  if (window.location.pathname === e) {
14
- _(!1), h?.();
15
+ v(!1), g?.();
15
16
  return;
16
17
  }
17
18
  } catch {
18
- _(!1), h?.();
19
+ v(!1), g?.();
19
20
  return;
20
21
  }
21
22
  if (a()) {
22
- _(!1), h?.();
23
+ v(!1), g?.();
23
24
  return;
24
25
  }
25
- let d = () => {
26
- _(!1), h?.();
27
- }, w = (i) => {
28
- g.current = !0;
26
+ let f = () => {
27
+ v(!1), g?.();
28
+ }, T = (i) => {
29
+ _.current = !0;
29
30
  try {
30
- if (f) {
31
- let e = l(f);
31
+ if (p) {
32
+ let e = u(p);
32
33
  if (e) {
33
34
  window.location.replace(e);
34
35
  return;
35
36
  }
36
37
  }
37
- u(i);
38
+ d(i);
38
39
  let a = r();
39
- if (a) v(a), y(t(a)), b(e(a)), x(n(a)), C();
40
+ if (a) y(a), b(t(a)), x(e(a)), S(n(a)), w();
40
41
  else {
41
- if (f && !i.user && !i.tokens) try {
42
- let e = new URL(f).origin, t = window.location.origin, n = l(f);
42
+ if (p && !i.user && !i.tokens) try {
43
+ let e = new URL(p).origin, t = window.location.origin, n = u(p);
43
44
  if (n) {
44
45
  window.location.replace(n);
45
46
  return;
46
47
  }
47
- if (e !== t && !c()) {
48
+ if (e !== t && !l() && !o()) {
48
49
  let t = window.location.href;
49
- if (o(e, t)) return;
50
- s(e, t), window.location.replace(`${e}/auth/sso-relay?returnTo=${encodeURIComponent(t)}`);
50
+ if (s(e, t)) return;
51
+ c(e, t), window.location.replace(`${e}/auth/sso-relay?returnTo=${encodeURIComponent(t)}`);
51
52
  return;
52
53
  }
53
54
  } catch {}
54
- v(null), y(null), b(null), x(null), S();
55
+ y(null), b(null), x(null), S(null), C();
55
56
  }
56
57
  } finally {
57
- g.current = !1, d();
58
+ _.current = !1, f();
58
59
  }
59
- }, T = setTimeout(() => {
60
- d();
60
+ }, E = setTimeout(() => {
61
+ f();
61
62
  }, 5e3);
62
63
  return i({
63
- bridgeUrl: f,
64
- allowedOrigins: p,
65
- onStateChanged: w,
66
- debug: m ?? !1
64
+ bridgeUrl: p,
65
+ allowedOrigins: m,
66
+ onStateChanged: T,
67
+ debug: h ?? !1
67
68
  }), () => {
68
- clearTimeout(T);
69
+ clearTimeout(E);
69
70
  };
70
71
  }, [
71
- f,
72
72
  p,
73
73
  m,
74
74
  h,
75
- C,
76
75
  g,
76
+ w,
77
77
  _,
78
78
  v,
79
79
  y,
80
80
  b,
81
81
  x,
82
- S
82
+ S,
83
+ C
83
84
  ]);
84
85
  }
85
86
  //#endregion
86
- export { f as useBridgeInitialization };
87
+ export { p as useBridgeInitialization };
@@ -1 +1 @@
1
- {"version":3,"file":"useSsoDepositBootGuard.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/useSsoDepositBootGuard.ts"],"names":[],"mappings":"AA8BA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CA4E7C"}
1
+ {"version":3,"file":"useSsoDepositBootGuard.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/useSsoDepositBootGuard.ts"],"names":[],"mappings":"AAoBA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CA4E7C"}
@@ -2,47 +2,44 @@ import { resolveGatewayUrls as e } from "../../../config/gatewayUrls.js";
2
2
  import { resolveAuthBridgeConfig as t } from "../../../config/authBridgeUrls.js";
3
3
  import { resolveActiveProfileId as n } from "../ProfileStorageManager.js";
4
4
  import { isLocalDevSsoHost as r, isSharedSsoCookieDomain as i } from "../../../utils/authCookie.js";
5
- import { isElectron as a, isNative as o } from "../../../native/platform.js";
6
- import { beginSsoNavigation as s, buildSsoDepositUrl as c, consumeSsoDepositMarker as l, markSsoDepositPending as u, mintSsoSessionTokens as d, shouldAttemptSsoDeposit as f } from "../../../utils/ssoDeposit.js";
7
- import { useEffect as p } from "react";
5
+ import { isRealNativeOrDesktopShell as a } from "../../../native/platform.js";
6
+ import { beginSsoNavigation as o, buildSsoDepositUrl as s, consumeSsoDepositMarker as c, markSsoDepositPending as l, mintSsoSessionTokens as u, shouldAttemptSsoDeposit as d } from "../../../utils/ssoDeposit.js";
7
+ import { useEffect as f } from "react";
8
8
  //#region src/shared/providers/shell/authProvider/useSsoDepositBootGuard.ts
9
- var m = 2500;
10
- function h() {
11
- return o() || a();
12
- }
13
- function g() {
14
- p(() => {
9
+ var p = 2500;
10
+ function m() {
11
+ f(() => {
15
12
  if (typeof window > "u") return;
16
- let a = n();
17
- if (l(a) || !a || h() || r() || i() || window.location.pathname.startsWith("/auth/")) return;
18
- let o;
13
+ let f = n();
14
+ if (c(f) || !f || a() || r() || i() || window.location.pathname.startsWith("/auth/")) return;
15
+ let m;
19
16
  try {
20
17
  let e = t();
21
- o = new URL(e.url).origin;
18
+ m = new URL(e.url).origin;
22
19
  } catch {
23
20
  return;
24
21
  }
25
- if (o === window.location.origin || !f(a)) return;
26
- let p = setTimeout(async () => {
22
+ if (m === window.location.origin || !d(f)) return;
23
+ let h = setTimeout(async () => {
27
24
  try {
28
- if (n() !== a || window.location.pathname.startsWith("/auth/")) return;
29
- let t = localStorage.getItem(`bf-p-${a}-tokens`), r = localStorage.getItem(`bf-p-${a}-user`);
25
+ if (n() !== f || window.location.pathname.startsWith("/auth/")) return;
26
+ let t = localStorage.getItem(`bf-p-${f}-tokens`), r = localStorage.getItem(`bf-p-${f}-user`);
30
27
  if (!t || !r) return;
31
28
  let i = JSON.parse(t);
32
29
  if (!(i.accessToken && typeof i.expiresAt == "number" && i.expiresAt - Date.now() > 6e4) || !i.refreshToken) return;
33
- u(a);
34
- let { globalBaseUrl: l } = e(), { tokens: f } = await d(`${l}/global/graphql`, i.refreshToken);
35
- if (!f) return;
36
- s(), window.location.replace(c(o, window.location.href, {
37
- profileId: a,
38
- tokens: JSON.stringify(f),
30
+ l(f);
31
+ let { globalBaseUrl: a } = e(), { tokens: c } = await u(`${a}/global/graphql`, i.refreshToken);
32
+ if (!c) return;
33
+ o(), window.location.replace(s(m, window.location.href, {
34
+ profileId: f,
35
+ tokens: JSON.stringify(c),
39
36
  user: r,
40
37
  profiles: localStorage.getItem("bf-profiles")
41
38
  }));
42
39
  } catch {}
43
- }, m);
44
- return () => clearTimeout(p);
40
+ }, p);
41
+ return () => clearTimeout(h);
45
42
  }, []);
46
43
  }
47
44
  //#endregion
48
- export { g as useSsoDepositBootGuard };
45
+ export { m as useSsoDepositBootGuard };