@burdenoff/fe-libs 2026.1019.3 → 2026.1021.2
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.
- package/dist/shared/components/LandingOrDashboardRedirect.d.ts +45 -0
- package/dist/shared/components/LandingOrDashboardRedirect.js +63 -0
- package/dist/shared/components/SSORedirectGuard.d.ts +25 -5
- package/dist/shared/components/SSORedirectGuard.js +52 -36
- package/dist/shared/components/index.d.ts +3 -1
- package/dist/shared/utils/gatewayFetchRewrite.js +20 -19
- package/dist/shared/utils/index.d.ts +2 -0
- package/dist/shared/utils/redirectAllowlist.d.ts +60 -0
- package/dist/shared/utils/redirectAllowlist.js +47 -0
- package/dist/shared-components.js +22 -21
- package/dist/shared-native.js +14 -14
- package/dist/shared-utils.js +12 -11
- package/dist/shared.js +108 -106
- package/dist/utils/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** What the `/` route renders. */
|
|
3
|
+
export type LandingGateDecision = 'loading' | 'home' | 'native-welcome' | 'landing';
|
|
4
|
+
export interface LandingGateInput {
|
|
5
|
+
/** The auth provider is still settling (bridge handshake, hydration). */
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
/** A usable session exists (in-memory or persisted for the active profile). */
|
|
8
|
+
hasSession: boolean;
|
|
9
|
+
/** The shell runs as an installed app (see `shouldShowNativeWelcome`). */
|
|
10
|
+
isInstalledApp: boolean;
|
|
11
|
+
/** Whether the shell supplied a native welcome page. */
|
|
12
|
+
hasNativeWelcome: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Pure decision for the `/` route. There is intentionally no "sso" outcome:
|
|
16
|
+
* the landing gate never relays an anonymous visitor to the auth bridge.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveLandingGate(input: LandingGateInput): LandingGateDecision;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the active profile has an unexpired access token persisted in
|
|
21
|
+
* storage — the profile token slot first, then microfe-auth's per-profile
|
|
22
|
+
* persisted store. Covers the window right after sign-in, before the
|
|
23
|
+
* AuthProvider has picked the new tokens up. Never throws.
|
|
24
|
+
*/
|
|
25
|
+
export declare function hasStoredValidSession(now?: number): boolean;
|
|
26
|
+
export interface LandingGateViewProps {
|
|
27
|
+
decision: LandingGateDecision;
|
|
28
|
+
/** Product home for signed-in visitors, e.g. `/dashboard` or `/vibecontrols`. */
|
|
29
|
+
homePath: string;
|
|
30
|
+
/** Public marketing landing for anonymous browser visitors. */
|
|
31
|
+
landing: ReactNode;
|
|
32
|
+
/** Installed-app welcome; when omitted installed apps get `landing`. */
|
|
33
|
+
nativeWelcome?: ReactNode;
|
|
34
|
+
/** Rendered while auth settles. Defaults to the branded splash. */
|
|
35
|
+
loadingFallback?: ReactNode;
|
|
36
|
+
/** Suspense message while a lazy landing / welcome page loads. */
|
|
37
|
+
loadingMessage?: string;
|
|
38
|
+
}
|
|
39
|
+
/** Renders a `LandingGateDecision`. Exported for shells and tests. */
|
|
40
|
+
export declare function LandingGateView({ decision, homePath, landing, nativeWelcome, loadingFallback, loadingMessage, }: LandingGateViewProps): import('react/jsx-runtime').JSX.Element;
|
|
41
|
+
export type LandingOrDashboardRedirectProps = Omit<LandingGateViewProps, 'decision'>;
|
|
42
|
+
/**
|
|
43
|
+
* The `/` route element. Must render inside `AuthProvider` and a router.
|
|
44
|
+
*/
|
|
45
|
+
export declare function LandingOrDashboardRedirect(props: LandingOrDashboardRedirectProps): import('react/jsx-runtime').JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { getProfileTokens as e, resolveActiveProfileId as t } from "../providers/shell/ProfileStorageManager.js";
|
|
2
|
+
import { BrandedSplash as n } from "../../ui/branded-splash.js";
|
|
3
|
+
import { getJwtExpiry as r } from "../providers/shell/authProvider/jwt.js";
|
|
4
|
+
import { useAuth as i } from "../providers/shell/AuthProvider.js";
|
|
5
|
+
import { MicrofrontendErrorBoundary as a } from "./MicrofrontendErrorBoundary.js";
|
|
6
|
+
import { shouldShowNativeWelcome as o } from "../native/entry.js";
|
|
7
|
+
import { Fragment as s, jsx as c } from "react/jsx-runtime";
|
|
8
|
+
import { Navigate as l } from "react-router";
|
|
9
|
+
//#region src/shared/components/LandingOrDashboardRedirect.tsx
|
|
10
|
+
function u(e) {
|
|
11
|
+
return e.isLoading ? "loading" : e.hasSession ? "home" : e.isInstalledApp && e.hasNativeWelcome ? "native-welcome" : "landing";
|
|
12
|
+
}
|
|
13
|
+
function d(e, t) {
|
|
14
|
+
if (!e) return !1;
|
|
15
|
+
let n = r(e);
|
|
16
|
+
return n !== null && n > t;
|
|
17
|
+
}
|
|
18
|
+
function f(e) {
|
|
19
|
+
let t = localStorage.getItem(e ? `bf-p-${e}-auth-storage` : "auth-storage");
|
|
20
|
+
if (!t) return null;
|
|
21
|
+
let n = JSON.parse(t)?.state?.accessToken;
|
|
22
|
+
return typeof n == "string" && n ? n : null;
|
|
23
|
+
}
|
|
24
|
+
function p(n = Date.now()) {
|
|
25
|
+
if (typeof window > "u") return !1;
|
|
26
|
+
try {
|
|
27
|
+
let r = t();
|
|
28
|
+
return d(r ? e(r)?.accessToken : null, n) ? !0 : d(f(r), n);
|
|
29
|
+
} catch {
|
|
30
|
+
return !1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function m({ decision: e, homePath: t, landing: r, nativeWelcome: i, loadingFallback: o, loadingMessage: u }) {
|
|
34
|
+
switch (e) {
|
|
35
|
+
case "loading": return /* @__PURE__ */ c(s, { children: o ?? /* @__PURE__ */ c(n, {}) });
|
|
36
|
+
case "home": return /* @__PURE__ */ c(l, {
|
|
37
|
+
to: t,
|
|
38
|
+
replace: !0
|
|
39
|
+
});
|
|
40
|
+
case "native-welcome": return /* @__PURE__ */ c(a, {
|
|
41
|
+
loadingMessage: u,
|
|
42
|
+
children: i
|
|
43
|
+
});
|
|
44
|
+
case "landing": return /* @__PURE__ */ c(a, {
|
|
45
|
+
loadingMessage: u,
|
|
46
|
+
children: r
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function h(e) {
|
|
51
|
+
let t = i();
|
|
52
|
+
return /* @__PURE__ */ c(m, {
|
|
53
|
+
decision: u({
|
|
54
|
+
isLoading: t.isLoading,
|
|
55
|
+
hasSession: !t.isLoading && (!!t.tokens?.accessToken || p()),
|
|
56
|
+
isInstalledApp: o(),
|
|
57
|
+
hasNativeWelcome: e.nativeWelcome !== void 0
|
|
58
|
+
}),
|
|
59
|
+
...e
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { m as LandingGateView, h as LandingOrDashboardRedirect, p as hasStoredValidSession, u as resolveLandingGate };
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
* SSORedirectGuard — Checks for SSO cookie and redirects to login origin
|
|
3
3
|
* for token relay if the current origin doesn't have local tokens.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* SSO discovery belongs ONLY where a session is genuinely required: a
|
|
6
|
+
* ProtectedRoute guard, and explicit "Sign in" CTAs. Never call it from the
|
|
7
|
+
* public landing gate (`/`): bouncing an anonymous visitor into the relay means
|
|
8
|
+
* nobody ever sees the landing page, and when no central session exists the
|
|
9
|
+
* bridge sends them back to `/?sso_failed=1` (BOFF-6457 / 6482 / 6494). Use
|
|
10
|
+
* `LandingOrDashboardRedirect` from this package for the `/` route instead.
|
|
7
11
|
*
|
|
8
12
|
* Works in all environments (local dev, alpha, production):
|
|
9
13
|
* - Local dev: cookie on .local.burdenoff.com shared domain
|
|
@@ -19,8 +23,13 @@ export declare function markSSORedirectAttempt(relayOrigin: string, returnTo: st
|
|
|
19
23
|
* Check if an SSO redirect should be initiated.
|
|
20
24
|
* Returns the redirect URL if SSO should happen, null otherwise.
|
|
21
25
|
*
|
|
22
|
-
* Call this from ProtectedRoute or
|
|
23
|
-
*
|
|
26
|
+
* Call this from ProtectedRoute (before falling back to the login page) or
|
|
27
|
+
* from an explicit sign-in CTA — never from the public landing gate. Prefer
|
|
28
|
+
* `redirectToSSO()`, which also performs the allowlisted navigation.
|
|
29
|
+
*
|
|
30
|
+
* The returned URL always passes `isAllowedRedirectUrl`; a relay target that
|
|
31
|
+
* would not (a misconfigured bridge, say) yields `null` and leaves no relay
|
|
32
|
+
* attempt marker behind.
|
|
24
33
|
*
|
|
25
34
|
* Cross-eTLD+1 product shells always start at the central bridge
|
|
26
35
|
* (alphaapp/app.burdenoff.com): product cookies are first-party only and must
|
|
@@ -31,6 +40,17 @@ export declare function markSSORedirectAttempt(relayOrigin: string, returnTo: st
|
|
|
31
40
|
* `isAutoSSOSuppressed` keeps the user on the login screen.
|
|
32
41
|
*/
|
|
33
42
|
export declare function getSSORedirectUrl(returnPath?: string): string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Start SSO discovery: resolve the relay URL with `getSSORedirectUrl()` and
|
|
45
|
+
* navigate to it through the cross-origin allowlist.
|
|
46
|
+
*
|
|
47
|
+
* Returns `true` when the navigation was started (render
|
|
48
|
+
* `<SSORedirectSpinner />` meanwhile) and `false` when there is nothing to
|
|
49
|
+
* relay to, so the caller can fall back to the in-app login route.
|
|
50
|
+
*
|
|
51
|
+
* For ProtectedRoute and sign-in CTAs only — never the public landing gate.
|
|
52
|
+
*/
|
|
53
|
+
export declare function redirectToSSO(returnPath?: string): boolean;
|
|
34
54
|
/**
|
|
35
55
|
* Check if Single Logout (SLO) has occurred on another shell.
|
|
36
56
|
*
|
|
@@ -59,6 +79,6 @@ export declare function checkRemoteSLO(gatewayUrl: string, accessToken: string):
|
|
|
59
79
|
export declare function clearLocalAuthState(): void;
|
|
60
80
|
/**
|
|
61
81
|
* React component that renders a spinner while redirecting.
|
|
62
|
-
* Use this as the return value when
|
|
82
|
+
* Use this as the return value when `redirectToSSO()` returns true.
|
|
63
83
|
*/
|
|
64
84
|
export declare function SSORedirectSpinner(): import('react/jsx-runtime').JSX.Element;
|
|
@@ -3,14 +3,15 @@ import { clearActiveContextStorage as t } from "../providers/shell/ActiveContext
|
|
|
3
3
|
import { clearShellSsoCookies as n, isLocalDevSsoHost as r, isSharedSsoCookieDomain as i, isTrustedSsoOrigin as a, readShellSsoCookie as o } from "../utils/authCookie.js";
|
|
4
4
|
import { isRealNativeOrDesktopShell as s } from "../native/platform.js";
|
|
5
5
|
import { BrandedSplash as c } from "../../ui/branded-splash.js";
|
|
6
|
-
import {
|
|
6
|
+
import { isAllowedRedirectUrl as l, replaceLocationWithAllowlist as u } from "../utils/redirectAllowlist.js";
|
|
7
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
7
8
|
//#region src/shared/components/SSORedirectGuard.tsx
|
|
8
|
-
var
|
|
9
|
+
var f = "bf-sso-relay-attempt", p = 120 * 1e3, m = [
|
|
9
10
|
"sso_failed",
|
|
10
11
|
"sso-failed",
|
|
11
12
|
"sso-attempted"
|
|
12
13
|
];
|
|
13
|
-
function
|
|
14
|
+
function h(e) {
|
|
14
15
|
if (typeof window > "u") return null;
|
|
15
16
|
try {
|
|
16
17
|
let t = `${window.location.pathname}${window.location.search}${window.location.hash}`, n = new URL(e ?? t, window.location.origin);
|
|
@@ -19,70 +20,74 @@ function p(e) {
|
|
|
19
20
|
return null;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function g(e) {
|
|
23
24
|
return e === "/auth" || e.startsWith("/auth/");
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
26
|
+
function _(e) {
|
|
27
|
+
return m.some((t) => e.searchParams.has(t));
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
-
if (
|
|
30
|
-
if (
|
|
29
|
+
function v(e) {
|
|
30
|
+
if (_(e)) return n(), !0;
|
|
31
|
+
if (g(e.pathname)) return !0;
|
|
31
32
|
let t = e.searchParams.get("reason");
|
|
32
33
|
return t === "session-expired" || t === "logout";
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function y() {
|
|
35
36
|
try {
|
|
36
|
-
sessionStorage.removeItem(
|
|
37
|
+
sessionStorage.removeItem(f);
|
|
37
38
|
} catch {}
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function b() {
|
|
40
41
|
if (typeof window > "u") return null;
|
|
41
42
|
try {
|
|
42
|
-
let e = sessionStorage.getItem(
|
|
43
|
+
let e = sessionStorage.getItem(f);
|
|
43
44
|
if (!e) return null;
|
|
44
45
|
let t = JSON.parse(e);
|
|
45
|
-
return typeof t.relayOrigin != "string" || typeof t.returnTo != "string" || typeof t.startedAt != "number" || Date.now() - t.startedAt >
|
|
46
|
+
return typeof t.relayOrigin != "string" || typeof t.returnTo != "string" || typeof t.startedAt != "number" || Date.now() - t.startedAt > p ? (y(), null) : {
|
|
46
47
|
relayOrigin: t.relayOrigin,
|
|
47
48
|
returnTo: t.returnTo,
|
|
48
49
|
startedAt: t.startedAt
|
|
49
50
|
};
|
|
50
51
|
} catch {
|
|
51
|
-
return
|
|
52
|
+
return y(), null;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
+
function x(e) {
|
|
55
56
|
try {
|
|
56
57
|
return new URL(e).origin;
|
|
57
58
|
} catch {
|
|
58
59
|
return null;
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
let t =
|
|
63
|
-
return !t ||
|
|
62
|
+
function S(e) {
|
|
63
|
+
let t = h(e);
|
|
64
|
+
return !t || v(t);
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
let n =
|
|
66
|
+
function C(e, t) {
|
|
67
|
+
let n = x(e), r = h(t), i = b();
|
|
67
68
|
return !!(n && r && i?.returnTo === r.href);
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function w(e, t) {
|
|
70
71
|
if (typeof window > "u") return;
|
|
71
|
-
let n =
|
|
72
|
+
let n = x(e), r = h(t);
|
|
72
73
|
if (!(!n || !r)) try {
|
|
73
74
|
let e = {
|
|
74
75
|
relayOrigin: n,
|
|
75
76
|
returnTo: r.href,
|
|
76
77
|
startedAt: Date.now()
|
|
77
78
|
};
|
|
78
|
-
sessionStorage.setItem(
|
|
79
|
+
sessionStorage.setItem(f, JSON.stringify(e));
|
|
79
80
|
} catch {}
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
+
function T(e, t) {
|
|
83
|
+
let n = `${e}/auth/sso-relay?returnTo=${encodeURIComponent(t.href)}`;
|
|
84
|
+
return l(n) ? n : null;
|
|
85
|
+
}
|
|
86
|
+
function E(t) {
|
|
82
87
|
if (s()) return null;
|
|
83
88
|
try {
|
|
84
|
-
let n =
|
|
85
|
-
if (!n ||
|
|
89
|
+
let n = h(t);
|
|
90
|
+
if (!n || v(n) || r()) return null;
|
|
86
91
|
let i = window.location.origin, s = null;
|
|
87
92
|
try {
|
|
88
93
|
s = new URL(e().url).origin;
|
|
@@ -90,23 +95,34 @@ function C(t) {
|
|
|
90
95
|
let c = o();
|
|
91
96
|
if (s === i && c?.origin && a(c.origin)) {
|
|
92
97
|
let e = new URL(c.origin).origin;
|
|
93
|
-
if (e && e !== i
|
|
98
|
+
if (e && e !== i) {
|
|
99
|
+
let t = T(e, n);
|
|
100
|
+
if (t && !C(e, n.href)) return w(e, n.href), t;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (s && s !== i) {
|
|
104
|
+
let e = T(s, n);
|
|
105
|
+
if (e && !C(s, n.href)) return w(s, n.href), e;
|
|
94
106
|
}
|
|
95
|
-
return
|
|
107
|
+
return null;
|
|
96
108
|
} catch {
|
|
97
109
|
return null;
|
|
98
110
|
}
|
|
99
111
|
}
|
|
100
|
-
function
|
|
112
|
+
function D(e) {
|
|
113
|
+
let t = E(e);
|
|
114
|
+
return t ? u(t) : !1;
|
|
115
|
+
}
|
|
116
|
+
function O() {
|
|
101
117
|
try {
|
|
102
118
|
if (o()) return !1;
|
|
103
119
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
104
|
-
return !e || !localStorage.getItem(`bf-p-${e}-tokens`) || !i() ? !1 : (
|
|
120
|
+
return !e || !localStorage.getItem(`bf-p-${e}-tokens`) || !i() ? !1 : (A(), !0);
|
|
105
121
|
} catch {
|
|
106
122
|
return !1;
|
|
107
123
|
}
|
|
108
124
|
}
|
|
109
|
-
async function
|
|
125
|
+
async function k(e, t) {
|
|
110
126
|
try {
|
|
111
127
|
let n = await fetch(e, {
|
|
112
128
|
method: "POST",
|
|
@@ -123,7 +139,7 @@ async function T(e, t) {
|
|
|
123
139
|
return !1;
|
|
124
140
|
}
|
|
125
141
|
}
|
|
126
|
-
function
|
|
142
|
+
function A() {
|
|
127
143
|
try {
|
|
128
144
|
let e = localStorage.getItem("bf-profiles");
|
|
129
145
|
if (e) {
|
|
@@ -134,8 +150,8 @@ function E() {
|
|
|
134
150
|
localStorage.removeItem("bf-profiles"), localStorage.removeItem("auth-storage"), sessionStorage.removeItem("bf-active-profile"), t(), n(), window.dispatchEvent(new Event("bf-auth-state-cleared")), window.dispatchEvent(new Event("bf-profile-storage-change"));
|
|
135
151
|
} catch {}
|
|
136
152
|
}
|
|
137
|
-
function
|
|
138
|
-
return /* @__PURE__ */
|
|
153
|
+
function j() {
|
|
154
|
+
return /* @__PURE__ */ d(c, { label: "Signing you in…" });
|
|
139
155
|
}
|
|
140
156
|
//#endregion
|
|
141
|
-
export {
|
|
157
|
+
export { j as SSORedirectSpinner, k as checkRemoteSLO, O as checkSLO, A as clearLocalAuthState, y as clearSSORelayAttempt, E as getSSORedirectUrl, C as hasRecentSSORedirectAttempt, w as markSSORedirectAttempt, D as redirectToSSO, S as shouldSkipSSORedirect };
|
|
@@ -25,7 +25,9 @@ export { UpgradePromptModal, dispatchUpgradePrompt, UPGRADE_PROMPT_EVENT, } from
|
|
|
25
25
|
export type { UpgradePromptModalProps, UpgradePromptDetail } from './UpgradePromptModal';
|
|
26
26
|
export { UpgradeInlineBanner } from './UpgradeInlineBanner';
|
|
27
27
|
export type { UpgradeInlineBannerProps } from './UpgradeInlineBanner';
|
|
28
|
-
export { getSSORedirectUrl, SSORedirectSpinner, checkSLO, checkRemoteSLO, clearLocalAuthState, } from './SSORedirectGuard';
|
|
28
|
+
export { getSSORedirectUrl, redirectToSSO, SSORedirectSpinner, checkSLO, checkRemoteSLO, clearLocalAuthState, } from './SSORedirectGuard';
|
|
29
|
+
export { LandingOrDashboardRedirect, LandingGateView, resolveLandingGate, hasStoredValidSession, } from './LandingOrDashboardRedirect';
|
|
30
|
+
export type { LandingOrDashboardRedirectProps, LandingGateViewProps, LandingGateDecision, LandingGateInput, } from './LandingOrDashboardRedirect';
|
|
29
31
|
export { AssistantWidget, ASSISTANT_WIDGET_TOGGLE_EVENT } from './assistantWidget/AssistantWidget';
|
|
30
32
|
export type { AssistantWidgetProps, AssistantModeOption } from './assistantWidget/AssistantWidget';
|
|
31
33
|
export { useVoiceInput } from './assistantWidget/useVoiceInput';
|
|
@@ -210,38 +210,39 @@ function W(e, t) {
|
|
|
210
210
|
let i = P(e), a = globalThis.fetch.bind(globalThis), o = window.location.origin, s = new Set([o, "https://gw-global.local.burdenoff.com"]), c = new Set([o, "https://gw-wspace.local.burdenoff.com"]), u = (e) => /(?:^|\/)global\/graphql$/.test(e) ? "/global/graphql" : /(?:^|\/)workspaces\/graphql$/.test(e) ? "/workspaces/graphql" : "", d = (e) => {
|
|
211
211
|
let t = new URL(e, window.location.origin), i = u(t.pathname);
|
|
212
212
|
return i === "/global/graphql" && s.has(t.origin) ? `${n}${i}${t.search}${t.hash}` : i === "/workspaces/graphql" && c.has(t.origin) ? `${r}${i}${t.search}${t.hash}` : e;
|
|
213
|
-
}, f = async (e) => {
|
|
214
|
-
let
|
|
215
|
-
if (i &&
|
|
216
|
-
if (!(e.method.toUpperCase() === "POST" && t)
|
|
217
|
-
let
|
|
218
|
-
if (!
|
|
219
|
-
let
|
|
220
|
-
if (V() &&
|
|
221
|
-
let e = b(), t =
|
|
222
|
-
if (t.every((e) => e && e.expiresAt > n)) return B(t.map((e) => e.value),
|
|
213
|
+
}, f = async (e, t = !1) => {
|
|
214
|
+
let n = /(?:^|\/)graphql$/.test(new URL(e.url).pathname);
|
|
215
|
+
if (i && n) return new Promise(() => void 0);
|
|
216
|
+
if (!(e.method.toUpperCase() === "POST" && n) || t || e.keepalive) return a(e);
|
|
217
|
+
let r = await e.clone().text(), o = H(e.clone()), s = z(r);
|
|
218
|
+
if (!s?.length) return a(e);
|
|
219
|
+
let c = r.trimStart().startsWith("["), u = s.map((e) => R(o, e));
|
|
220
|
+
if (V() && u.every(Boolean)) {
|
|
221
|
+
let e = b(), t = u.map((t) => e.get(t)), n = Date.now();
|
|
222
|
+
if (t.every((e) => e && e.expiresAt > n)) return B(t.map((e) => e.value), c);
|
|
223
223
|
}
|
|
224
|
-
let
|
|
225
|
-
if (!
|
|
224
|
+
let d = await a(e);
|
|
225
|
+
if (!d.ok || !u.some(Boolean) || !V()) return d;
|
|
226
226
|
try {
|
|
227
|
-
let e = await
|
|
227
|
+
let e = await d.clone().json(), t = Array.isArray(e) ? e : [e], n = b();
|
|
228
228
|
t.forEach((e, t) => {
|
|
229
|
-
let r =
|
|
229
|
+
let r = u[t];
|
|
230
230
|
r && (e && typeof e == "object" && "errors" in e && Array.isArray(e.errors) || n.set(r, {
|
|
231
231
|
value: e,
|
|
232
232
|
expiresAt: Date.now() + l
|
|
233
233
|
}));
|
|
234
234
|
});
|
|
235
235
|
} catch {}
|
|
236
|
-
return
|
|
236
|
+
return d;
|
|
237
237
|
}, p = a, m = ((e, t) => {
|
|
238
238
|
if (e == null) return a(e, t);
|
|
239
|
+
let n = t?.keepalive === !0;
|
|
239
240
|
if (e instanceof Request) {
|
|
240
|
-
let
|
|
241
|
-
return f(t ? new Request(
|
|
241
|
+
let r = d(e.url), i = new Request(r, e);
|
|
242
|
+
return f(t ? new Request(i, t) : i, n);
|
|
242
243
|
}
|
|
243
|
-
let
|
|
244
|
-
return f(new Request(d(
|
|
244
|
+
let r = typeof e == "string" ? e : e.toString();
|
|
245
|
+
return f(new Request(d(r), t), n);
|
|
245
246
|
});
|
|
246
247
|
p.preconnect && (m.preconnect = p.preconnect), globalThis.fetch = m;
|
|
247
248
|
}
|
|
@@ -22,6 +22,8 @@ export { initializeLogger, setUserContext, clearUserContext, } from './loggerIni
|
|
|
22
22
|
export type { InitLoggerOptions } from './loggerInit';
|
|
23
23
|
export { setSSoCookie, getSSoCookie, clearSSoCookie, setShellSsoCookies, readShellSsoCookie, clearShellSsoCookies, isSharedSsoCookieDomain, isTrustedSsoOrigin, } from './authCookie';
|
|
24
24
|
export type { ShellSsoCookieData } from './authCookie';
|
|
25
|
+
export { isAllowedRedirectUrl, replaceLocationWithAllowlist, assignLocationWithAllowlist, openUrlInNewTabWithAllowlist, } from './redirectAllowlist';
|
|
26
|
+
export type { RedirectAllowlistOptions } from './redirectAllowlist';
|
|
25
27
|
export { SSO_DEPOSITED_PARAM, beginSsoNavigation, isSsoNavigationPending, clearSsoNavigation, readSsoDepositState, markSsoDepositPending, markSsoDepositDone, clearSsoDepositState, shouldAttemptSsoDeposit, mintSsoSessionTokens, buildSsoDepositUrl, consumeSsoDepositMarker, } from './ssoDeposit';
|
|
26
28
|
export type { MintedSsoTokens, MintSsoSessionResult, SsoDepositPayload, SsoDepositState, } from './ssoDeposit';
|
|
27
29
|
export { createProfileScopedStorage, getProfileScopedKey, } from './profileScopedStorage';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hostname allowlist for full-page navigations that may leave the current
|
|
3
|
+
* origin: the cross-eTLD+1 SSO relay, product-switcher hops between product
|
|
4
|
+
* shells, and similar first-party links.
|
|
5
|
+
*
|
|
6
|
+
* `isSafeRedirectTarget` / `redirectToSafeLocation` in `../graphql/security`
|
|
7
|
+
* are deliberately same-origin only, so they cannot carry a visitor to the
|
|
8
|
+
* central auth bridge (app.burdenoff.com) from a product shell. This module is
|
|
9
|
+
* the cross-origin counterpart: a target is allowed when it stays on the
|
|
10
|
+
* current hostname, or when its hostname is (a subdomain of) one of the
|
|
11
|
+
* Burdenoff product domains in `ALL_PRODUCT_DOMAINS` — the same single list
|
|
12
|
+
* that already drives the bridge host resolution and `isTrustedSsoOrigin`, so
|
|
13
|
+
* a new product never needs another hardcoded copy here.
|
|
14
|
+
*
|
|
15
|
+
* Ported from fluidgrids-app `src/utils/security.ts` (`isAllowedRedirectUrl`
|
|
16
|
+
* and friends), which shipped this check first.
|
|
17
|
+
*
|
|
18
|
+
* @module @burdenoff/fe-libs/shared/utils/redirectAllowlist
|
|
19
|
+
*/
|
|
20
|
+
export interface RedirectAllowlistOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Origin the target is resolved against and compared with. Defaults to
|
|
23
|
+
* `window.location.origin`.
|
|
24
|
+
*/
|
|
25
|
+
baseOrigin?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Additional host suffixes to trust on top of the Burdenoff product
|
|
28
|
+
* domains (for example a shell's `VITE_ALLOWED_REDIRECT_HOSTS`, split on
|
|
29
|
+
* commas). Each entry matches the host itself and any subdomain of it.
|
|
30
|
+
*/
|
|
31
|
+
extraHostSuffixes?: readonly string[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Whether `target` may be navigated to from `baseOrigin`.
|
|
35
|
+
*
|
|
36
|
+
* Allowed:
|
|
37
|
+
* - relative paths and absolute URLs on the current hostname;
|
|
38
|
+
* - `https:` URLs whose hostname is a Burdenoff product domain or one of its
|
|
39
|
+
* subdomains (`app.`, `alphaapp.`, `www.`, `docs.` …), or an
|
|
40
|
+
* `extraHostSuffixes` entry;
|
|
41
|
+
* - local development hosts (`localhost`, `127.0.0.1` …, over `http:` or
|
|
42
|
+
* `https:`) only when the current origin is itself local development.
|
|
43
|
+
*
|
|
44
|
+
* Everything else — other schemes (`javascript:`, `data:` …), unparsable
|
|
45
|
+
* input, protocol-relative or absolute URLs to any other host — is refused.
|
|
46
|
+
*/
|
|
47
|
+
export declare function isAllowedRedirectUrl(target: string, options?: RedirectAllowlistOptions): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* `window.location.replace(target)` when the target passes the allowlist.
|
|
50
|
+
* Returns whether the navigation was started, so callers can fall back
|
|
51
|
+
* (e.g. to the in-app login route) when it was refused.
|
|
52
|
+
*/
|
|
53
|
+
export declare function replaceLocationWithAllowlist(target: string, options?: RedirectAllowlistOptions): boolean;
|
|
54
|
+
/** `window.location.assign(target)` when the target passes the allowlist. */
|
|
55
|
+
export declare function assignLocationWithAllowlist(target: string, options?: RedirectAllowlistOptions): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Open the target in a new tab (`noopener,noreferrer`) when it passes the
|
|
58
|
+
* allowlist.
|
|
59
|
+
*/
|
|
60
|
+
export declare function openUrlInNewTabWithAllowlist(target: string, options?: RedirectAllowlistOptions): boolean;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ALL_PRODUCT_DOMAINS as e } from "../config/gatewayUrls.js";
|
|
2
|
+
//#region src/shared/utils/redirectAllowlist.ts
|
|
3
|
+
var t = new Set([
|
|
4
|
+
"localhost",
|
|
5
|
+
"127.0.0.1",
|
|
6
|
+
"::1",
|
|
7
|
+
"[::1]",
|
|
8
|
+
"host.docker.internal"
|
|
9
|
+
]);
|
|
10
|
+
function n(e) {
|
|
11
|
+
return e.trim().toLowerCase();
|
|
12
|
+
}
|
|
13
|
+
function r(e, t) {
|
|
14
|
+
let r = n(t);
|
|
15
|
+
return r ? e === r || e.endsWith(`.${r}`) : !1;
|
|
16
|
+
}
|
|
17
|
+
function i(e) {
|
|
18
|
+
return t.has(e) || r(e, "local.burdenoff.com");
|
|
19
|
+
}
|
|
20
|
+
function a(e) {
|
|
21
|
+
return e || (typeof window > "u" ? null : window.location.origin);
|
|
22
|
+
}
|
|
23
|
+
function o(o, s = {}) {
|
|
24
|
+
if (!o.trim()) return !1;
|
|
25
|
+
let c = a(s.baseOrigin);
|
|
26
|
+
if (!c) return !1;
|
|
27
|
+
let l, u;
|
|
28
|
+
try {
|
|
29
|
+
u = new URL(c), l = new URL(o, c);
|
|
30
|
+
} catch {
|
|
31
|
+
return !1;
|
|
32
|
+
}
|
|
33
|
+
if (l.protocol !== "https:" && l.protocol !== "http:") return !1;
|
|
34
|
+
let d = n(l.hostname), f = n(u.hostname);
|
|
35
|
+
return d === f ? !0 : t.has(d) ? i(f) : l.protocol === "http:" ? !1 : [...e, ...s.extraHostSuffixes ?? []].some((e) => r(d, e));
|
|
36
|
+
}
|
|
37
|
+
function s(e, t) {
|
|
38
|
+
return typeof window > "u" || !o(e, t) ? !1 : (window.location.replace(e), !0);
|
|
39
|
+
}
|
|
40
|
+
function c(e, t) {
|
|
41
|
+
return typeof window > "u" || !o(e, t) ? !1 : (window.location.assign(e), !0);
|
|
42
|
+
}
|
|
43
|
+
function l(e, t) {
|
|
44
|
+
return typeof window > "u" || !o(e, t) ? !1 : (window.open(e, "_blank", "noopener,noreferrer"), !0);
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { c as assignLocationWithAllowlist, o as isAllowedRedirectUrl, l as openUrlInNewTabWithAllowlist, s as replaceLocationWithAllowlist };
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { SSORedirectSpinner as e, checkRemoteSLO as t, checkSLO as n, clearLocalAuthState as r, getSSORedirectUrl as i } from "./shared/components/SSORedirectGuard.js";
|
|
2
|
-
import { ErrorBoundary as
|
|
3
|
-
import { RequireAuth as
|
|
4
|
-
import { PermissionButton as
|
|
5
|
-
import { AccessDenied as
|
|
6
|
-
import { ErrorFallback as
|
|
7
|
-
import { LoadingFallback as
|
|
8
|
-
import { MicrofrontendErrorBoundary as
|
|
9
|
-
import { ConditionalShell as
|
|
10
|
-
import { PWAInstallBanner as
|
|
11
|
-
import { ErrorBoundary as
|
|
12
|
-
import { ContextConversationWidget as
|
|
13
|
-
import { KeyboardHelpDialogWrapper as
|
|
14
|
-
import { QuotaMeter as
|
|
15
|
-
import { UPGRADE_PROMPT_EVENT as
|
|
16
|
-
import { UpgradeInlineBanner as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
1
|
+
import { SSORedirectSpinner as e, checkRemoteSLO as t, checkSLO as n, clearLocalAuthState as r, getSSORedirectUrl as i, redirectToSSO as a } from "./shared/components/SSORedirectGuard.js";
|
|
2
|
+
import { ErrorBoundary as o } from "./shared/components/ErrorBoundary.js";
|
|
3
|
+
import { RequireAuth as s, RequireGuest as c } from "./shared/components/RequireAuth.js";
|
|
4
|
+
import { PermissionButton as l, PermissionGate as u, PermissionLink as d } from "./shared/components/PermissionGate.js";
|
|
5
|
+
import { AccessDenied as f, PermissionDenied as p } from "./shared/components/AccessDenied.js";
|
|
6
|
+
import { ErrorFallback as m } from "./shared/components/ErrorFallback.js";
|
|
7
|
+
import { LoadingFallback as h, PageLoadingFallback as g, SectionLoadingFallback as _ } from "./shared/components/LoadingFallback.js";
|
|
8
|
+
import { MicrofrontendErrorBoundary as v } from "./shared/components/MicrofrontendErrorBoundary.js";
|
|
9
|
+
import { ConditionalShell as y } from "./shared/components/ConditionalShell.js";
|
|
10
|
+
import { PWAInstallBanner as b } from "./shared/components/PWAInstallBanner.js";
|
|
11
|
+
import { ErrorBoundary as x } from "./shared/components/AppErrorBoundary.js";
|
|
12
|
+
import { ContextConversationWidget as S } from "./shared/components/ContextConversationWidget.js";
|
|
13
|
+
import { KeyboardHelpDialogWrapper as C } from "./shared/components/KeyboardHelpDialogWrapper.js";
|
|
14
|
+
import { QuotaMeter as w } from "./shared/components/QuotaMeter.js";
|
|
15
|
+
import { UPGRADE_PROMPT_EVENT as T, UpgradePromptModal as E, dispatchUpgradePrompt as D } from "./shared/components/UpgradePromptModal.js";
|
|
16
|
+
import { UpgradeInlineBanner as O } from "./shared/components/UpgradeInlineBanner.js";
|
|
17
|
+
import { LandingGateView as k, LandingOrDashboardRedirect as A, hasStoredValidSession as j, resolveLandingGate as M } from "./shared/components/LandingOrDashboardRedirect.js";
|
|
18
|
+
import { useVoiceInput as N } from "./shared/components/assistantWidget/useVoiceInput.js";
|
|
19
|
+
import { ASSISTANT_WIDGET_TOGGLE_EVENT as P, AssistantWidget as F } from "./shared/components/assistantWidget/AssistantWidget.js";
|
|
20
|
+
import { Markdown as I } from "./shared/components/Markdown.js";
|
|
21
|
+
import { DesktopUpdateToast as L } from "./shared/components/DesktopUpdateToast.js";
|
|
22
|
+
export { P as ASSISTANT_WIDGET_TOGGLE_EVENT, f as AccessDenied, x as AppErrorBoundary, F as AssistantWidget, y as ConditionalShell, S as ContextConversationWidget, L as DesktopUpdateToast, o as ErrorBoundary, m as ErrorFallback, C as KeyboardHelpDialogWrapper, k as LandingGateView, A as LandingOrDashboardRedirect, h as LoadingFallback, I as Markdown, v as MicrofrontendErrorBoundary, b as PWAInstallBanner, g as PageLoadingFallback, l as PermissionButton, p as PermissionDenied, u as PermissionGate, d as PermissionLink, w as QuotaMeter, s as RequireAuth, c as RequireGuest, e as SSORedirectSpinner, _ as SectionLoadingFallback, T as UPGRADE_PROMPT_EVENT, O as UpgradeInlineBanner, E as UpgradePromptModal, t as checkRemoteSLO, n as checkSLO, r as clearLocalAuthState, D as dispatchUpgradePrompt, i as getSSORedirectUrl, j as hasStoredValidSession, a as redirectToSSO, M as resolveLandingGate, N as useVoiceInput };
|
package/dist/shared-native.js
CHANGED
|
@@ -6,19 +6,19 @@ import { nativeActionSheet as R, nativeConfirm as z, nativeCopyText as B, native
|
|
|
6
6
|
import { SafeAreaView as q } from "./shared/native/SafeAreaView.js";
|
|
7
7
|
import { readInitialNetworkStatus as J, reduceNetworkStatus as Y, useNetworkStatus as X } from "./shared/native/hooks/useNetworkStatus.js";
|
|
8
8
|
import { PULL_TO_REFRESH_THRESHOLD as Z, computePullOffset as Q, computePullProgress as $, usePullToRefresh as ee } from "./shared/native/hooks/usePullToRefresh.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
9
|
+
import { getNativeEntryRoutes as te, shouldShowNativeWelcome as ne } from "./shared/native/entry.js";
|
|
10
|
+
import { useNativePlatform as re } from "./shared/native/hooks/useNativePlatform.js";
|
|
11
|
+
import { useSafeArea as ie } from "./shared/native/hooks/useSafeArea.js";
|
|
12
|
+
import { useNativeKeyboard as ae } from "./shared/native/hooks/useNativeKeyboard.js";
|
|
13
|
+
import { useAppState as oe } from "./shared/native/hooks/useAppState.js";
|
|
14
|
+
import { useDeviceInfo as se } from "./shared/native/hooks/useDeviceInfo.js";
|
|
15
|
+
import { useHaptics as ce } from "./shared/native/hooks/useHaptics.js";
|
|
16
|
+
import { useStatusBar as le } from "./shared/native/hooks/useStatusBar.js";
|
|
17
|
+
import { resolveActionSheetOutcome as ue, useActionSheet as de } from "./shared/native/hooks/useActionSheet.js";
|
|
18
|
+
import { useDesktop as fe } from "./shared/native/hooks/useDesktop.js";
|
|
19
|
+
import { useDesktopUpdateState as pe } from "./shared/native/hooks/useDesktopUpdateState.js";
|
|
20
|
+
import { useDesktopWindowState as me } from "./shared/native/hooks/useDesktopWindowState.js";
|
|
20
21
|
import "./shared/native/hooks/index.js";
|
|
21
|
-
import { acknowledgeNativePurchase as
|
|
22
|
-
import { getNativeEntryRoutes as be, shouldShowNativeWelcome as xe } from "./shared/native/entry.js";
|
|
22
|
+
import { acknowledgeNativePurchase as he, getNativeProducts as ge, getNativePurchases as _e, installNativeIAP as ve, isNativeIAPAvailable as ye, purchaseNativeProduct as be, restoreNativePurchases as xe } from "./shared/native/purchases.js";
|
|
23
23
|
import { getPushOptInController as Se, recordPushPermissionPromptDismissed as Ce, registerPushOptInController as we, shouldPromptForPushPermission as Te } from "./shared/native/push-optin.js";
|
|
24
|
-
export { n as DESKTOP_UPDATE_UNSUPPORTED, r as DESKTOP_WINDOW_STATE_DEFAULT, Z as PULL_TO_REFRESH_THRESHOLD, q as SafeAreaView,
|
|
24
|
+
export { n as DESKTOP_UPDATE_UNSUPPORTED, r as DESKTOP_WINDOW_STATE_DEFAULT, Z as PULL_TO_REFRESH_THRESHOLD, q as SafeAreaView, he as acknowledgeNativePurchase, i as bootDesktopShell, Q as computePullOffset, $ as computePullProgress, a as desktopCheckForUpdates, o as desktopDeepLinkToPath, s as desktopInstallUpdate, c as desktopNotify, l as desktopOpenExternal, u as desktopSetBadgeCount, d as desktopSetLocale, f as desktopSetTheme, p as desktopSetTrayQuickActions, e as getCapacitorPlatform, m as getDesktopAuthBridgeConfig, h as getDesktopBridge, g as getDesktopGatewayBases, _ as getDesktopGatewayUrls, v as getDesktopRuntimeConfig, y as getDesktopUpdateState, b as getDesktopWindowState, x as getLegacyDesktopRuntime, O as getNativeBridge, te as getNativeEntryRoutes, ge as getNativeProducts, _e as getNativePurchases, k as getPlatform, Se as getPushOptInController, S as installDesktopDeepLinkHandler, C as installDesktopNavigateHandler, ve as installNativeIAP, A as isAndroid, t as isCapacitorNative, w as isDesktop, j as isElectron, M as isIOS, N as isInstalledApp, P as isNative, ye as isNativeIAPAvailable, F as isStandalonePWA, I as isWeb, L as isWebBrowser, R as nativeActionSheet, z as nativeConfirm, B as nativeCopyText, V as nativeImpact, H as nativeNotify, U as nativeOpenUrl, W as nativeSelection, G as nativeShare, K as nativeToast, T as onDesktopUpdateState, E as onDesktopWindowState, be as purchaseNativeProduct, J as readInitialNetworkStatus, Ce as recordPushPermissionPromptDismissed, Y as reduceNetworkStatus, D as registerDesktopNavigator, we as registerPushOptInController, ue as resolveActionSheetOutcome, xe as restoreNativePurchases, Te as shouldPromptForPushPermission, ne as shouldShowNativeWelcome, de as useActionSheet, oe as useAppState, fe as useDesktop, pe as useDesktopUpdateState, me as useDesktopWindowState, se as useDeviceInfo, ce as useHaptics, ae as useNativeKeyboard, re as useNativePlatform, X as useNetworkStatus, ee as usePullToRefresh, ie as useSafeArea, le as useStatusBar };
|
package/dist/shared-utils.js
CHANGED
|
@@ -6,17 +6,18 @@ import { installGatewayFetchRewrite as P, resolveGatewayBases as F, suppressCons
|
|
|
6
6
|
import { BACKEND_ERROR_EVENT as L, CONNECTION_STATUS_EVENT as R, dispatchBackendErrorEvent as z, extractBackendError as B, isAbortError as V, isBackendErrorDisplay as H, isTransportError as U, markConnectionHealthy as W, shouldToastBackendError as G } from "./shared/utils/backendErrors.js";
|
|
7
7
|
import { attemptTokenRefresh as K, clearAuthSessionStorage as q, hasAuthGraphQLErrors as J, isAuthGraphQLError as Y, isAuthNetworkError as X, redirectToLogin as Z } from "./shared/utils/authErrorHandling.js";
|
|
8
8
|
import { clearSSoCookie as Q, clearShellSsoCookies as $, getSSoCookie as ee, isSharedSsoCookieDomain as te, isTrustedSsoOrigin as ne, readShellSsoCookie as re, setSSoCookie as ie, setShellSsoCookies as ae } from "./shared/utils/authCookie.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
9
|
+
import { assignLocationWithAllowlist as oe, isAllowedRedirectUrl as se, openUrlInNewTabWithAllowlist as ce, replaceLocationWithAllowlist as le } from "./shared/utils/redirectAllowlist.js";
|
|
10
|
+
import { SSO_DEPOSITED_PARAM as ue, beginSsoNavigation as de, buildSsoDepositUrl as fe, clearSsoDepositState as pe, clearSsoNavigation as me, consumeSsoDepositMarker as he, isSsoNavigationPending as ge, markSsoDepositDone as _e, markSsoDepositPending as ve, mintSsoSessionTokens as ye, readSsoDepositState as be, shouldAttemptSsoDeposit as xe } from "./shared/utils/ssoDeposit.js";
|
|
11
|
+
import { AppInitializer as Se, useRegistryHelpers as Ce, useShellNavigate as we } from "./shared/utils/appHelpers.js";
|
|
12
|
+
import { clearUserContext as Te, initializeLogger as Ee, setUserContext as De } from "./shared/utils/loggerInit.js";
|
|
13
|
+
import { createProfileScopedStorage as Oe, getProfileScopedKey as ke } from "./shared/utils/profileScopedStorage.js";
|
|
14
|
+
import { QUOTA_EXHAUSTED_CODE as Ae, RESOURCE_CAP_EXCEEDED_CODE as je, STORAGE_QUOTA_EXCEEDED_CODE as Me, UPGRADE_ERROR_CODES as Ne, buildQuotaExhaustedMessage as Pe, extractQuotaExhaustedExtensions as Fe, extractUpgradeErrorExtensions as Ie, isQuotaExhaustedError as Le, isUpgradeError as Re } from "./shared/utils/quotaErrors.js";
|
|
15
|
+
import { INLINE_ENCODE as ze, downscaleImage as Be, selectInlineBase64 as Ve } from "./shared/utils/imageDownscale.js";
|
|
16
|
+
import { clsx as He } from "clsx";
|
|
17
|
+
import { twMerge as Ue } from "tailwind-merge";
|
|
17
18
|
//#region src/shared/utils/index.ts
|
|
18
|
-
function
|
|
19
|
-
return
|
|
19
|
+
function We(...e) {
|
|
20
|
+
return Ue(He(e));
|
|
20
21
|
}
|
|
21
22
|
//#endregion
|
|
22
|
-
export {
|
|
23
|
+
export { Se as AppInitializer, L as BACKEND_ERROR_EVENT, R as CONNECTION_STATUS_EVENT, ze as INLINE_ENCODE, Ae as QUOTA_EXHAUSTED_CODE, je as RESOURCE_CAP_EXCEEDED_CODE, ue as SSO_DEPOSITED_PARAM, Me as STORAGE_QUOTA_EXCEEDED_CODE, Ne as UPGRADE_ERROR_CODES, t as alertTokens, oe as assignLocationWithAllowlist, K as attemptTokenRefresh, de as beginSsoNavigation, Pe as buildQuotaExhaustedMessage, fe as buildSsoDepositUrl, f as capitalizeFirst, p as capitalizeWords, n as categoryTokens, q as clearAuthSessionStorage, Q as clearSSoCookie, $ as clearShellSsoCookies, pe as clearSsoDepositState, me as clearSsoNavigation, Te as clearUserContext, We as cn, he as consumeSsoDepositMarker, e as createApolloClient, Oe as createProfileScopedStorage, z as dispatchBackendErrorEvent, Be as downscaleImage, B as extractBackendError, Fe as extractQuotaExhaustedExtensions, Ie as extractUpgradeErrorExtensions, m as formatBytes, h as formatCompactNumber, g as formatCurrency, _ as formatCurrencyCompact, v as formatDate, y as formatDateTime, b as formatDuration, x as formatList, S as formatNumber, C as formatOrdinal, w as formatPercentage, T as formatRelativeTime, E as formatTime, r as getAlertTokens, i as getCategoryTokens, ke as getProfileScopedKey, a as getProgressTokens, ee as getSSoCookie, o as getStatusBadgeTokens, s as getStatusTokens, c as getTrendTokens, J as hasAuthGraphQLErrors, Ee as initializeLogger, P as installGatewayFetchRewrite, V as isAbortError, se as isAllowedRedirectUrl, Y as isAuthGraphQLError, X as isAuthNetworkError, H as isBackendErrorDisplay, M as isChunkLoadError, Le as isQuotaExhaustedError, te as isSharedSsoCookieDomain, ge as isSsoNavigationPending, U as isTransportError, ne as isTrustedSsoOrigin, Re as isUpgradeError, N as lazyWithRetry, W as markConnectionHealthy, _e as markSsoDepositDone, ve as markSsoDepositPending, ye as mintSsoSessionTokens, ce as openUrlInNewTabWithAllowlist, D as pluralize, l as progressTokens, re as readShellSsoCookie, be as readSsoDepositState, Z as redirectToLogin, le as replaceLocationWithAllowlist, F as resolveGatewayBases, Ve as selectInlineBase64, ie as setSSoCookie, ae as setShellSsoCookies, De as setUserContext, xe as shouldAttemptSsoDeposit, G as shouldToastBackendError, O as slugify, u as statusTokens, I as suppressConsole, k as toCamelCase, A as toPascalCase, d as trendTokens, j as truncateText, Ce as useRegistryHelpers, we as useShellNavigate };
|
package/dist/shared.js
CHANGED
|
@@ -27,116 +27,118 @@ import { attemptTokenRefresh as Ot, clearAuthSessionStorage as kt, hasAuthGraphQ
|
|
|
27
27
|
import { clearSSoCookie as Pt, clearShellSsoCookies as Ft, getSSoCookie as It, isSharedSsoCookieDomain as Lt, isTrustedSsoOrigin as Rt, readShellSsoCookie as zt, setSSoCookie as Bt, setShellSsoCookies as Vt } from "./shared/utils/authCookie.js";
|
|
28
28
|
import { getNativeBridge as Ht } from "./shared/native/bridge.js";
|
|
29
29
|
import { getPlatform as Ut, isAndroid as Wt, isElectron as Gt, isIOS as Kt, isInstalledApp as qt, isNative as Jt, isStandalonePWA as Yt, isWeb as Xt, isWebBrowser as Zt } from "./shared/native/platform.js";
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
30
|
+
import { assignLocationWithAllowlist as Qt, isAllowedRedirectUrl as $t, openUrlInNewTabWithAllowlist as en, replaceLocationWithAllowlist as tn } from "./shared/utils/redirectAllowlist.js";
|
|
31
|
+
import { SSORedirectSpinner as nn, checkRemoteSLO as rn, checkSLO as an, clearLocalAuthState as on, getSSORedirectUrl as sn, redirectToSSO as cn } from "./shared/components/SSORedirectGuard.js";
|
|
32
|
+
import { SSO_DEPOSITED_PARAM as ln, beginSsoNavigation as un, buildSsoDepositUrl as dn, clearSsoDepositState as fn, clearSsoNavigation as pn, consumeSsoDepositMarker as mn, isSsoNavigationPending as hn, markSsoDepositDone as gn, markSsoDepositPending as _n, mintSsoSessionTokens as vn, readSsoDepositState as yn, shouldAttemptSsoDeposit as bn } from "./shared/utils/ssoDeposit.js";
|
|
33
|
+
import { AppInitializer as xn, useRegistryHelpers as Sn, useShellNavigate as Cn } from "./shared/utils/appHelpers.js";
|
|
34
|
+
import { LogLevel as wn } from "./shared/logger/types.js";
|
|
35
|
+
import { Logger as Tn } from "./shared/logger/Logger.js";
|
|
36
|
+
import { LogManager as En, logManager as Dn } from "./shared/logger/LogManager.js";
|
|
37
|
+
import { ConsoleTransport as On } from "./shared/logger/ConsoleTransport.js";
|
|
38
|
+
import { clearUserContext as kn, initializeLogger as An, setUserContext as jn } from "./shared/utils/loggerInit.js";
|
|
39
|
+
import { createProfileScopedStorage as Mn, getProfileScopedKey as Nn } from "./shared/utils/profileScopedStorage.js";
|
|
40
|
+
import { QUOTA_EXHAUSTED_CODE as Pn, RESOURCE_CAP_EXCEEDED_CODE as Fn, STORAGE_QUOTA_EXCEEDED_CODE as In, UPGRADE_ERROR_CODES as Ln, buildQuotaExhaustedMessage as Rn, extractQuotaExhaustedExtensions as zn, extractUpgradeErrorExtensions as Bn, isQuotaExhaustedError as Vn, isUpgradeError as Hn } from "./shared/utils/quotaErrors.js";
|
|
41
|
+
import { INLINE_ENCODE as Un, downscaleImage as Wn, selectInlineBase64 as Gn } from "./shared/utils/imageDownscale.js";
|
|
42
|
+
import { cn as Kn } from "./shared-utils.js";
|
|
43
|
+
import { nativeActionSheet as qn, nativeConfirm as Jn, nativeCopyText as Yn, nativeImpact as Xn, nativeNotify as Zn, nativeOpenUrl as Qn, nativeSelection as $n, nativeShare as er, nativeToast as tr } from "./shared/native/consumers.js";
|
|
44
|
+
import { SafeAreaView as nr } from "./shared/native/SafeAreaView.js";
|
|
45
|
+
import { readInitialNetworkStatus as rr, reduceNetworkStatus as ir, useNetworkStatus as ar } from "./shared/native/hooks/useNetworkStatus.js";
|
|
46
|
+
import { PULL_TO_REFRESH_THRESHOLD as or, computePullOffset as sr, computePullProgress as cr, usePullToRefresh as lr } from "./shared/native/hooks/usePullToRefresh.js";
|
|
47
|
+
import { useReturnFocus as ur } from "./shared/hooks/useReturnFocus.js";
|
|
48
|
+
import { ActorIdentity as dr } from "./shared/actors/ActorIdentity.js";
|
|
49
|
+
import { buildActorFallback as fr, useActorProfiles as pr } from "./shared/actors/useActorProfiles.js";
|
|
50
|
+
import { ErrorBoundary as mr } from "./shared/components/ErrorBoundary.js";
|
|
51
|
+
import { RequireAuth as hr, RequireGuest as gr } from "./shared/components/RequireAuth.js";
|
|
52
|
+
import { PermissionButton as _r, PermissionGate as vr, PermissionLink as yr } from "./shared/components/PermissionGate.js";
|
|
53
|
+
import { AccessDenied as br, PermissionDenied as xr } from "./shared/components/AccessDenied.js";
|
|
54
|
+
import { ErrorFallback as Sr } from "./shared/components/ErrorFallback.js";
|
|
55
|
+
import { LoadingFallback as Cr, PageLoadingFallback as wr, SectionLoadingFallback as Tr } from "./shared/components/LoadingFallback.js";
|
|
56
|
+
import { MicrofrontendErrorBoundary as Er } from "./shared/components/MicrofrontendErrorBoundary.js";
|
|
57
|
+
import { ConditionalShell as Dr } from "./shared/components/ConditionalShell.js";
|
|
58
|
+
import { usePWA as Or } from "./shared/hooks/usePWA.js";
|
|
59
|
+
import { PWAInstallBanner as kr } from "./shared/components/PWAInstallBanner.js";
|
|
60
|
+
import { ErrorBoundary as Ar } from "./shared/components/AppErrorBoundary.js";
|
|
61
|
+
import { FeatureFlagProvider as jr, useFeatureFlags as Mr } from "./shared/feature-flags/FeatureFlagProvider.js";
|
|
62
|
+
import { useFeatureFlag as Nr, useFeatureFlagDetails as Pr, useFeatureFlagValue as Fr } from "./shared/feature-flags/useFeatureFlag.js";
|
|
63
|
+
import { FeatureGate as Ir } from "./shared/feature-flags/FeatureGate.js";
|
|
63
64
|
import "./shared-feature-flags.js";
|
|
64
|
-
import { ContextConversationWidget as
|
|
65
|
-
import { detectPlatform as
|
|
66
|
-
import { KeyboardHelpDialogWrapper as
|
|
67
|
-
import { QuotaMeter as
|
|
68
|
-
import { UPGRADE_PROMPT_EVENT as
|
|
69
|
-
import { UpgradeInlineBanner as
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
65
|
+
import { ContextConversationWidget as Lr } from "./shared/components/ContextConversationWidget.js";
|
|
66
|
+
import { detectPlatform as Rr, formatKeyCombo as zr, getDisplayKeysForPlatform as Br, getShortcutLabel as Vr, isMac as Hr, isMobileDevice as Ur, isTabletDevice as Wr, matchesKeyCombo as Gr, normalizeKey as Kr, normalizePlatformCombo as qr, parseKeyCombo as Jr, shouldEnableKeyboardShortcuts as Yr, shouldIgnoreShortcut as Xr } from "./shared/keyboard/utils.js";
|
|
67
|
+
import { KeyboardHelpDialogWrapper as Zr } from "./shared/components/KeyboardHelpDialogWrapper.js";
|
|
68
|
+
import { QuotaMeter as Qr } from "./shared/components/QuotaMeter.js";
|
|
69
|
+
import { UPGRADE_PROMPT_EVENT as $r, UpgradePromptModal as ei, dispatchUpgradePrompt as ti } from "./shared/components/UpgradePromptModal.js";
|
|
70
|
+
import { UpgradeInlineBanner as ni } from "./shared/components/UpgradeInlineBanner.js";
|
|
71
|
+
import { getNativeEntryRoutes as ri, shouldShowNativeWelcome as ii } from "./shared/native/entry.js";
|
|
72
|
+
import { LandingGateView as ai, LandingOrDashboardRedirect as oi, hasStoredValidSession as si, resolveLandingGate as ci } from "./shared/components/LandingOrDashboardRedirect.js";
|
|
73
|
+
import { useVoiceInput as li } from "./shared/components/assistantWidget/useVoiceInput.js";
|
|
74
|
+
import { ASSISTANT_WIDGET_TOGGLE_EVENT as ui, AssistantWidget as di } from "./shared/components/assistantWidget/AssistantWidget.js";
|
|
75
|
+
import { Markdown as fi } from "./shared/components/Markdown.js";
|
|
76
|
+
import { useNativePlatform as pi } from "./shared/native/hooks/useNativePlatform.js";
|
|
77
|
+
import { useSafeArea as mi } from "./shared/native/hooks/useSafeArea.js";
|
|
78
|
+
import { useNativeKeyboard as hi } from "./shared/native/hooks/useNativeKeyboard.js";
|
|
79
|
+
import { useAppState as gi } from "./shared/native/hooks/useAppState.js";
|
|
80
|
+
import { useDeviceInfo as _i } from "./shared/native/hooks/useDeviceInfo.js";
|
|
81
|
+
import { useHaptics as vi } from "./shared/native/hooks/useHaptics.js";
|
|
82
|
+
import { useStatusBar as yi } from "./shared/native/hooks/useStatusBar.js";
|
|
83
|
+
import { resolveActionSheetOutcome as bi, useActionSheet as xi } from "./shared/native/hooks/useActionSheet.js";
|
|
84
|
+
import { useDesktop as Si } from "./shared/native/hooks/useDesktop.js";
|
|
85
|
+
import { useDesktopUpdateState as Ci } from "./shared/native/hooks/useDesktopUpdateState.js";
|
|
86
|
+
import { useDesktopWindowState as wi } from "./shared/native/hooks/useDesktopWindowState.js";
|
|
87
|
+
import { DesktopUpdateToast as Ti } from "./shared/components/DesktopUpdateToast.js";
|
|
85
88
|
import "./shared-components.js";
|
|
86
|
-
import { DevtoolsSink as
|
|
87
|
-
import { BroadcastChannelSink as
|
|
88
|
-
import { BackendAuditSink as
|
|
89
|
-
import { AnalyticsConsentBanner as
|
|
90
|
-
import { OtelBrowserSink as
|
|
91
|
-
import { EventBusProvider as
|
|
92
|
-
import { useDebounce as
|
|
93
|
-
import { useThrottle as
|
|
94
|
-
import { BREAKPOINTS as
|
|
95
|
-
import { useOnClickOutside as
|
|
96
|
-
import { useKeyPress as
|
|
97
|
-
import { useExclusiveMenu as
|
|
98
|
-
import { useLocalStorage as
|
|
99
|
-
import { useSessionStorage as
|
|
100
|
-
import { usePrevious as
|
|
101
|
-
import { useConditionalToggle as
|
|
102
|
-
import { usePagination as
|
|
103
|
-
import { useAsync as
|
|
104
|
-
import { MODIFIER_KEYS as
|
|
105
|
-
import { useKeyboardShortcuts as
|
|
106
|
-
import { useHotkeys as
|
|
107
|
-
import { useShortcutHelp as
|
|
108
|
-
import { GLOBAL_SHORTCUT_CATEGORIES as
|
|
109
|
-
import { useLogger as
|
|
110
|
-
import { useHasAnimated as
|
|
111
|
-
import { useReferralAttribution as
|
|
112
|
-
import { useRecordProductVisit as
|
|
113
|
-
import { PUSH_DEVICE_ID_STORAGE_KEY as
|
|
114
|
-
import { usePushDeviceRegistration as
|
|
115
|
-
import { QUOTA_EXHAUSTED_EVENT as
|
|
116
|
-
import { PLAN_USAGE_SNAPSHOT_EVENT as
|
|
117
|
-
import { appendContextToPath as
|
|
118
|
-
import { UNSAVED_CHANGE_LABEL_MAX as
|
|
119
|
-
import { MicrofrontendContext as
|
|
120
|
-
import { withTourProgressStatus as
|
|
121
|
-
import { detectDeviceType as
|
|
122
|
-
import { useTourPlayer as
|
|
123
|
-
import { TourSpotlight as
|
|
124
|
-
import { TourTooltip as
|
|
125
|
-
import { TourPlayerProvider as
|
|
126
|
-
import { TourPlayer as
|
|
127
|
-
import { getTourContextRank as
|
|
128
|
-
import { ToursProvider as
|
|
129
|
-
import { TourInitializer as
|
|
130
|
-
import { AppShellProvider as
|
|
131
|
-
import { MicrofrontendProvider as
|
|
132
|
-
import { TourTrigger as
|
|
89
|
+
import { DevtoolsSink as Ei } from "./shared/events/sinks/DevtoolsSink.js";
|
|
90
|
+
import { BroadcastChannelSink as Di } from "./shared/events/sinks/BroadcastChannelSink.js";
|
|
91
|
+
import { BackendAuditSink as Oi } from "./shared/events/sinks/BackendAuditSink.js";
|
|
92
|
+
import { AnalyticsConsentBanner as ki, RybbitSink as Ai, readAnalyticsConsent as ji, readAnalyticsConsentChoice as Mi, setAnalyticsConsent as Ni } from "./shared/events/sinks/RybbitSink.js";
|
|
93
|
+
import { OtelBrowserSink as Pi } from "./shared/events/sinks/OtelBrowserSink.js";
|
|
94
|
+
import { EventBusProvider as Fi, createEventBus as Ii, useEvent as Li, useEventBus as Ri, useEventEmitter as zi } from "./shared-events.js";
|
|
95
|
+
import { useDebounce as Bi } from "./shared/hooks/useDebounce.js";
|
|
96
|
+
import { useThrottle as Vi } from "./shared/hooks/useThrottle.js";
|
|
97
|
+
import { BREAKPOINTS as Hi, useBreakpoint as Ui, useMobileBreakpoint as Wi } from "./shared/hooks/useBreakpoint.js";
|
|
98
|
+
import { useOnClickOutside as Gi, useOnClickOutsideWithRef as Ki } from "./shared/hooks/useOnClickOutside.js";
|
|
99
|
+
import { useKeyPress as qi, useKeyboardShortcut as Ji } from "./shared/hooks/useKeyPress.js";
|
|
100
|
+
import { useExclusiveMenu as Yi } from "./shared/hooks/useExclusiveMenu.js";
|
|
101
|
+
import { useLocalStorage as Xi } from "./shared/hooks/useLocalStorage.js";
|
|
102
|
+
import { useSessionStorage as Zi } from "./shared/hooks/useSessionStorage.js";
|
|
103
|
+
import { usePrevious as Qi, usePreviousDistinct as $i, usePreviousHistory as ea } from "./shared/hooks/usePrevious.js";
|
|
104
|
+
import { useConditionalToggle as ta, useToggle as na, useToggleObject as ra } from "./shared/hooks/useToggle.js";
|
|
105
|
+
import { usePagination as ia } from "./shared/hooks/usePagination.js";
|
|
106
|
+
import { useAsync as aa, useAsyncImmediate as oa } from "./shared/hooks/useAsync.js";
|
|
107
|
+
import { MODIFIER_KEYS as sa, PLATFORM_TYPES as ca } from "./shared/keyboard/types.js";
|
|
108
|
+
import { useKeyboardShortcuts as la } from "./shared/keyboard/useKeyboardShortcuts.js";
|
|
109
|
+
import { useHotkeys as ua } from "./shared/keyboard/useHotkeys.js";
|
|
110
|
+
import { useShortcutHelp as da } from "./shared/keyboard/useShortcutHelp.js";
|
|
111
|
+
import { GLOBAL_SHORTCUT_CATEGORIES as fa, createGlobalShortcuts as pa, getGlobalShortcutsByCategory as ma, mergeShortcuts as ha } from "./shared/keyboard/globalShortcuts.js";
|
|
112
|
+
import { useLogger as ga } from "./shared/logger/useLogger.js";
|
|
113
|
+
import { useHasAnimated as _a } from "./shared/hooks/useHasAnimated.js";
|
|
114
|
+
import { useReferralAttribution as va } from "./shared/hooks/useReferralAttribution.js";
|
|
115
|
+
import { useRecordProductVisit as ya } from "./shared/hooks/useRecordProductVisit.js";
|
|
116
|
+
import { PUSH_DEVICE_ID_STORAGE_KEY as ba, getOrCreatePushDeviceId as xa, registerPushDevice as Sa, unregisterPushDevice as Ca } from "./shared/native/push-registration.js";
|
|
117
|
+
import { usePushDeviceRegistration as wa } from "./shared/hooks/usePushDeviceRegistration.js";
|
|
118
|
+
import { QUOTA_EXHAUSTED_EVENT as Ta, dispatchQuotaExhausted as Ea, useQuotaErrorToast as Da } from "./shared/hooks/useQuotaErrorToast.js";
|
|
119
|
+
import { PLAN_USAGE_SNAPSHOT_EVENT as Oa, publishPlanUsageSnapshot as ka, useUpgradePrompt as Aa } from "./shared/hooks/useUpgradePrompt.js";
|
|
120
|
+
import { appendContextToPath as ja, useCurrentContextSearchParams as Ma } from "./shared/hooks/useCurrentContextSearchParams.js";
|
|
121
|
+
import { UNSAVED_CHANGE_LABEL_MAX as Na, listUnsavedChanges as Pa, registerUnsavedChange as Fa, unsavedChangesBlocking as Ia, useUnsavedChanges as La } from "./shared/navigation/unsavedChanges.js";
|
|
122
|
+
import { MicrofrontendContext as Ra, useMicrofrontendContext as za } from "./shared-hooks.js";
|
|
123
|
+
import { withTourProgressStatus as Ba } from "./shared/tours/progress.js";
|
|
124
|
+
import { detectDeviceType as Va, getResponsiveSelector as Ha } from "./shared/tours/types.js";
|
|
125
|
+
import { useTourPlayer as Ua } from "./shared/tours/useTourPlayer.js";
|
|
126
|
+
import { TourSpotlight as Wa } from "./shared/tours/TourSpotlight.js";
|
|
127
|
+
import { TourTooltip as Ga } from "./shared/tours/TourTooltip.js";
|
|
128
|
+
import { TourPlayerProvider as Ka, useIsTourPlaying as qa, useStartTour as Ja, useStopTour as Ya, useTourPlayerContext as Xa } from "./shared/tours/TourPlayerProvider.js";
|
|
129
|
+
import { TourPlayer as Za, TourTriggerButton as Qa, usePlayTour as $a } from "./shared/tours/TourPlayer.js";
|
|
130
|
+
import { getTourContextRank as eo, getTourRouteCatalog as to, getTourRouteModules as no, getTourRoutePages as ro, isTourVisibleForContext as io, normalizeTourPath as ao, registerTourRouteCatalog as oo, resolveTourTargetPath as so } from "./shared/tours/routeCatalog.js";
|
|
131
|
+
import { ToursProvider as co, useAutoStartTour as lo, useSafeToursContext as uo, useTours as fo, useToursContext as po } from "./shared/tours/ToursContext.js";
|
|
132
|
+
import { TourInitializer as mo } from "./shared/tours/TourInitializer.js";
|
|
133
|
+
import { AppShellProvider as ho, resolveAppShellObservabilityConfig as go } from "./shared/providers/AppShellProvider.js";
|
|
134
|
+
import { MicrofrontendProvider as _o } from "./shared-providers.js";
|
|
135
|
+
import { TourTrigger as vo } from "./shared/tours/TourTrigger.js";
|
|
133
136
|
import "./shared-tours.js";
|
|
134
|
-
import { acknowledgeNativePurchase as
|
|
135
|
-
import {
|
|
136
|
-
import { getPushOptInController as _o, recordPushPermissionPromptDismissed as vo, registerPushOptInController as yo, shouldPromptForPushPermission as bo } from "./shared/native/push-optin.js";
|
|
137
|
+
import { acknowledgeNativePurchase as yo, getNativeProducts as bo, getNativePurchases as xo, installNativeIAP as So, isNativeIAPAvailable as Co, purchaseNativeProduct as wo, restoreNativePurchases as To } from "./shared/native/purchases.js";
|
|
138
|
+
import { getPushOptInController as Eo, recordPushPermissionPromptDismissed as Do, registerPushOptInController as Oo, shouldPromptForPushPermission as ko } from "./shared/native/push-optin.js";
|
|
137
139
|
import "./shared-native.js";
|
|
138
140
|
import "./shared/actors/index.js";
|
|
139
141
|
//#region src/shared/index.ts
|
|
140
|
-
var
|
|
142
|
+
var Ao = "1.0.0";
|
|
141
143
|
//#endregion
|
|
142
|
-
export { $r as ASSISTANT_WIDGET_TOGGLE_EVENT, hr as AccessDenied, or as ActorIdentity, vi as AnalyticsConsentBanner, yt as ApolloClient, bt as ApolloProvider, Tr as AppErrorBoundary, gn as AppInitializer, ro as AppShellProvider, ei as AssistantWidget, Ve as BACKEND_ERROR_EVENT, Se as BOTMANOR_PRODUCT_SLUG, ji as BREAKPOINTS, _i as BackendAuditSink, gi as BroadcastChannelSink, Oe as COMMON_SHELL_LESS_ROUTES, He as CONNECTION_STATUS_EVENT, Sr as ConditionalShell, Cn as ConsoleTransport, Mr as ContextConversationWidget, Pe as DEFAULT_PAGE_SIZE, ke as DEFAULT_SHELL_CONFIG, R as DESKTOP_UPDATE_UNSUPPORTED, z as DESKTOP_WINDOW_STATE_DEFAULT, mi as DesktopUpdateToast, hi as DevtoolsSink, lr as ErrorBoundary, _r as ErrorFallback, wi as EventBusProvider, xo as FE_SHARED_VERSION, Er as FeatureFlagProvider, jr as FeatureGate, Fe as GATEWAYS, ta as GLOBAL_SHORTCUT_CATEGORIES, dt as GatewayProvider, Rn as INLINE_ENCODE, xt as InMemoryCache, Kr as KeyboardHelpDialogWrapper, vr as LoadingFallback, yn as LogLevel, xn as LogManager, bn as Logger, Xi as MODIFIER_KEYS, ti as Markdown, Da as MicrofrontendContext, xr as MicrofrontendErrorBoundary, ao as MicrofrontendProvider, Ci as OtelBrowserSink, _a as PLAN_USAGE_SNAPSHOT_EVENT, Zi as PLATFORM_TYPES, Ce as PRODUCTS, ge as PRODUCT_SLUG_EMIT, _e as PRODUCT_SLUG_RENAMES, we as PRODUCT_URLS, tr as PULL_TO_REFRESH_THRESHOLD, la as PUSH_DEVICE_ID_STORAGE_KEY, wr as PWAInstallBanner, yr as PageLoadingFallback, fr as PermissionButton, gr as PermissionDenied, pr as PermissionGate, mr as PermissionLink, kn as QUOTA_EXHAUSTED_CODE, ma as QUOTA_EXHAUSTED_EVENT, qr as QuotaMeter, An as RESOURCE_CAP_EXCEEDED_CODE, ur as RequireAuth, dr as RequireGuest, yi as RybbitSink, at as SSELink, Qt as SSORedirectSpinner, rn as SSO_DEPOSITED_PARAM, jn as STORAGE_QUOTA_EXCEEDED_CODE, Zn as SafeAreaView, br as SectionLoadingFallback, no as TourInitializer, Ba as TourPlayer, Fa as TourPlayerProvider, Na as TourSpotlight, Pa as TourTooltip, oo as TourTrigger, Va as TourTriggerButton, Za as ToursProvider, Sa as UNSAVED_CHANGE_LABEL_MAX, Mn as UPGRADE_ERROR_CODES, Jr as UPGRADE_PROMPT_EVENT, Zr as UpgradeInlineBanner, Yr as UpgradePromptModal, _t as WsLink, so as acknowledgeNativePurchase, r as alertTokens, ba as appendContextToPath, Ot as attemptTokenRefresh, an as beginSsoNavigation, B as bootDesktopShell, sr as buildActorFallback, Nn as buildQuotaExhaustedMessage, on as buildSsoDepositUrl, m as capitalizeFirst, h as capitalizeWords, i as categoryTokens, $t as checkRemoteSLO, en as checkSLO, kt as clearAuthSessionStorage, Xe as clearGraphqlFetchResponseCache, tn as clearLocalAuthState, Pt as clearSSoCookie, Ft as clearShellSsoCookies, sn as clearSsoDepositState, cn as clearSsoNavigation, wn as clearUserContext, Vn as cn, nr as computePullOffset, rr as computePullProgress, ln as consumeSsoDepositMarker, n as createApolloClient, Ti as createEventBus, na as createGlobalShortcuts, ot as createGraphQLClient, Dn as createProfileScopedStorage, V as desktopCheckForUpdates, H as desktopDeepLinkToPath, U as desktopInstallUpdate, W as desktopNotify, G as desktopOpenExternal, K as desktopSetBadgeCount, q as desktopSetLocale, J as desktopSetTheme, Y as desktopSetTrayQuickActions, Aa as detectDeviceType, Nr as detectPlatform, Ue as dispatchBackendErrorEvent, ha as dispatchQuotaExhausted, Xr as dispatchUpgradePrompt, zn as downscaleImage, ve as emitProductSlug, We as extractBackendError, Pn as extractQuotaExhaustedExtensions, Fn as extractUpgradeErrorExtensions, Te as findProductConfig, g as formatBytes, _ as formatCompactNumber, v as formatCurrency, y as formatCurrencyCompact, b as formatDate, x as formatDateTime, S as formatDuration, Pr as formatKeyCombo, C as formatList, w as formatNumber, T as formatOrdinal, E as formatPercentage, D as formatRelativeTime, O as formatTime, a as getAlertTokens, I as getCapacitorPlatform, o as getCategoryTokens, X as getDesktopAuthBridgeConfig, Z as getDesktopBridge, Q as getDesktopGatewayBases, $ as getDesktopGatewayUrls, ee as getDesktopRuntimeConfig, te as getDesktopUpdateState, ne as getDesktopWindowState, Fr as getDisplayKeysForPlatform, Ie as getGatewayConfig, Le as getGatewayUrl, st as getGlobalClient, ra as getGlobalShortcutsByCategory, Re as getGraphQLEndpoint, re as getLegacyDesktopRuntime, Ht as getNativeBridge, ho as getNativeEntryRoutes, co as getNativeProducts, lo as getNativePurchases, ua as getOrCreatePushDeviceId, Ut as getPlatform, Ee as getProductUrl, De as getProductsWithUrls, On as getProfileScopedKey, s as getProgressTokens, _o as getPushOptInController, ja as getResponsiveSelector, nn as getSSORedirectUrl, It as getSSoCookie, Ae as getShellConfig, Ir as getShortcutLabel, c as getStatusBadgeTokens, l as getStatusTokens, Ze as getStoredAuthToken, Qe as getStoredLocale, $e as getStoredOrganizationId, et as getStoredProjectId, tt as getStoredWorkspaceId, nt as getStoredWorkspaceToken, Ua as getTourContextRank, Wa as getTourRouteCatalog, Ga as getTourRouteModules, Ka as getTourRoutePages, u as getTrendTokens, ct as getWorkspaceClient, ze as getWorkspaceTokenPayload, St as gql, rt as graphqlFetch, At as hasAuthGraphQLErrors, lt as initializeAppClients, Tn as initializeLogger, ie as installDesktopDeepLinkHandler, ae as installDesktopNavigateHandler, de as installGatewayFetchRewrite, uo as installNativeIAP, Ge as isAbortError, Wt as isAndroid, jt as isAuthGraphQLError, Mt as isAuthNetworkError, Ke as isBackendErrorDisplay, L as isCapacitorNative, P as isChunkLoadError, oe as isDesktop, Gt as isElectron, Kt as isIOS, qt as isInstalledApp, Lr as isMac, Rr as isMobileDevice, Jt as isNative, fo as isNativeIAPAvailable, In as isQuotaExhaustedError, ye as isSameProductSlug, Lt as isSharedSsoCookieDomain, je as isShellLessRoute, un as isSsoNavigationPending, Yt as isStandalonePWA, zr as isTabletDevice, qa as isTourVisibleForContext, qe as isTransportError, Rt as isTrustedSsoOrigin, Ln as isUpgradeError, Xt as isWeb, Zt as isWebBrowser, Be as isWorkspaceTokenValidForContext, F as lazyWithRetry, be as legacyProductSlug, Ca as listUnsavedChanges, Sn as logManager, Je as markConnectionHealthy, dn as markSsoDepositDone, fn as markSsoDepositPending, Br as matchesKeyCombo, ia as mergeShortcuts, pn as mintSsoSessionTokens, Hn as nativeActionSheet, Un as nativeConfirm, Wn as nativeCopyText, Gn as nativeImpact, Kn as nativeNotify, qn as nativeOpenUrl, Jn as nativeSelection, Yn as nativeShare, Xn as nativeToast, Vr as normalizeKey, Hr as normalizePlatformCombo, xe as normalizeProductSlug, Ja as normalizeTourPath, se as onDesktopUpdateState, ce as onDesktopWindowState, Ur as parseKeyCombo, k as pluralize, vt as prepareWorkspaceRequest, d as progressTokens, va as publishPlanUsageSnapshot, po as purchaseNativeProduct, bi as readAnalyticsConsent, xi as readAnalyticsConsentChoice, Qn as readInitialNetworkStatus, zt as readShellSsoCookie, mn as readSsoDepositState, vo as recordPushPermissionPromptDismissed, Nt as redirectToLogin, $n as reduceNetworkStatus, le as registerDesktopNavigator, da as registerPushDevice, yo as registerPushOptInController, Ya as registerTourRouteCatalog, wa as registerUnsavedChange, ut as resetAppClients, li as resolveActionSheetOutcome, io as resolveAppShellObservabilityConfig, me as resolveAuthBridgeConfig, fe as resolveGatewayBases, it as resolveGatewayUrl, ue as resolveGatewayUrls, he as resolveShellAuthBridgeConfig, Xa as resolveTourTargetPath, mo as restoreNativePurchases, Bn as selectInlineBase64, Si as setAnalyticsConsent, Bt as setSSoCookie, Vt as setShellSsoCookies, En as setUserContext, hn as shouldAttemptSsoDeposit, Wr as shouldEnableKeyboardShortcuts, Gr as shouldIgnoreShortcut, bo as shouldPromptForPushPermission, Me as shouldShowBreadcrumb, go as shouldShowNativeWelcome, Ne as shouldShowSidebar, Ye as shouldToastBackendError, A as slugify, f as statusTokens, pe as suppressConsole, j as toCamelCase, M as toPascalCase, p as trendTokens, N as truncateText, fa as unregisterPushDevice, Ta as unsavedChangesBlocking, ui as useActionSheet, cr as useActorProfiles, Ct as useApolloClient, ai as useAppState, Ji as useAsync, Yi as useAsyncImmediate, Qa as useAutoStartTour, Mi as useBreakpoint, Wi as useConditionalToggle, e as useCopyToClipboard, xa as useCurrentContextSearchParams, ki as useDebounce, di as useDesktop, fi as useDesktopUpdateState, pi as useDesktopWindowState, oi as useDeviceInfo, Ei as useEvent, Di as useEventBus, Oi as useEventEmitter, Ri as useExclusiveMenu, Or as useFeatureFlag, kr as useFeatureFlagDetails, Ar as useFeatureFlagValue, Dr as useFeatureFlags, ft as useGateway, pt as useGatewayClient, si as useHaptics, oa as useHasAnimated, gt as useHasAuthToken, $i as useHotkeys, Ia as useIsTourPlaying, Ii as useKeyPress, Li as useKeyboardShortcut, Qi as useKeyboardShortcuts, wt as useLazyQuery, zi as useLocalStorage, aa as useLogger, t as useMediaQuery, Oa as useMicrofrontendContext, Ni as useMobileBreakpoint, Tt as useMutation, ii as useNativeKeyboard, ni as useNativePlatform, er as useNetworkStatus, Pi as useOnClickOutside, Fi as useOnClickOutsideWithRef, Cr as usePWA, qi as usePagination, Ha as usePlayTour, Vi as usePrevious, Hi as usePreviousDistinct, Ui as usePreviousHistory, ir as usePullToRefresh, pa as usePushDeviceRegistration, Et as useQuery, ga as useQuotaErrorToast, ca as useRecordProductVisit, sa as useReferralAttribution, _n as useRegistryHelpers, ar as useReturnFocus, ri as useSafeArea, mt as useSafeGateway, ht as useSafeGatewayClient, $a as useSafeToursContext, Bi as useSessionStorage, vn as useShellNavigate, ea as useShortcutHelp, La as useStartTour, ci as useStatusBar, Ra as useStopTour, Dt as useSubscription, Ai as useThrottle, Gi as useToggle, Ki as useToggleObject, Ma as useTourPlayer, za as useTourPlayerContext, eo as useTours, to as useToursContext, Ea as useUnsavedChanges, ya as useUpgradePrompt, Qr as useVoiceInput, ka as withTourProgressStatus };
|
|
144
|
+
export { ui as ASSISTANT_WIDGET_TOGGLE_EVENT, br as AccessDenied, dr as ActorIdentity, ki as AnalyticsConsentBanner, yt as ApolloClient, bt as ApolloProvider, Ar as AppErrorBoundary, xn as AppInitializer, ho as AppShellProvider, di as AssistantWidget, Ve as BACKEND_ERROR_EVENT, Se as BOTMANOR_PRODUCT_SLUG, Hi as BREAKPOINTS, Oi as BackendAuditSink, Di as BroadcastChannelSink, Oe as COMMON_SHELL_LESS_ROUTES, He as CONNECTION_STATUS_EVENT, Dr as ConditionalShell, On as ConsoleTransport, Lr as ContextConversationWidget, Pe as DEFAULT_PAGE_SIZE, ke as DEFAULT_SHELL_CONFIG, R as DESKTOP_UPDATE_UNSUPPORTED, z as DESKTOP_WINDOW_STATE_DEFAULT, Ti as DesktopUpdateToast, Ei as DevtoolsSink, mr as ErrorBoundary, Sr as ErrorFallback, Fi as EventBusProvider, Ao as FE_SHARED_VERSION, jr as FeatureFlagProvider, Ir as FeatureGate, Fe as GATEWAYS, fa as GLOBAL_SHORTCUT_CATEGORIES, dt as GatewayProvider, Un as INLINE_ENCODE, xt as InMemoryCache, Zr as KeyboardHelpDialogWrapper, ai as LandingGateView, oi as LandingOrDashboardRedirect, Cr as LoadingFallback, wn as LogLevel, En as LogManager, Tn as Logger, sa as MODIFIER_KEYS, fi as Markdown, Ra as MicrofrontendContext, Er as MicrofrontendErrorBoundary, _o as MicrofrontendProvider, Pi as OtelBrowserSink, Oa as PLAN_USAGE_SNAPSHOT_EVENT, ca as PLATFORM_TYPES, Ce as PRODUCTS, ge as PRODUCT_SLUG_EMIT, _e as PRODUCT_SLUG_RENAMES, we as PRODUCT_URLS, or as PULL_TO_REFRESH_THRESHOLD, ba as PUSH_DEVICE_ID_STORAGE_KEY, kr as PWAInstallBanner, wr as PageLoadingFallback, _r as PermissionButton, xr as PermissionDenied, vr as PermissionGate, yr as PermissionLink, Pn as QUOTA_EXHAUSTED_CODE, Ta as QUOTA_EXHAUSTED_EVENT, Qr as QuotaMeter, Fn as RESOURCE_CAP_EXCEEDED_CODE, hr as RequireAuth, gr as RequireGuest, Ai as RybbitSink, at as SSELink, nn as SSORedirectSpinner, ln as SSO_DEPOSITED_PARAM, In as STORAGE_QUOTA_EXCEEDED_CODE, nr as SafeAreaView, Tr as SectionLoadingFallback, mo as TourInitializer, Za as TourPlayer, Ka as TourPlayerProvider, Wa as TourSpotlight, Ga as TourTooltip, vo as TourTrigger, Qa as TourTriggerButton, co as ToursProvider, Na as UNSAVED_CHANGE_LABEL_MAX, Ln as UPGRADE_ERROR_CODES, $r as UPGRADE_PROMPT_EVENT, ni as UpgradeInlineBanner, ei as UpgradePromptModal, _t as WsLink, yo as acknowledgeNativePurchase, r as alertTokens, ja as appendContextToPath, Qt as assignLocationWithAllowlist, Ot as attemptTokenRefresh, un as beginSsoNavigation, B as bootDesktopShell, fr as buildActorFallback, Rn as buildQuotaExhaustedMessage, dn as buildSsoDepositUrl, m as capitalizeFirst, h as capitalizeWords, i as categoryTokens, rn as checkRemoteSLO, an as checkSLO, kt as clearAuthSessionStorage, Xe as clearGraphqlFetchResponseCache, on as clearLocalAuthState, Pt as clearSSoCookie, Ft as clearShellSsoCookies, fn as clearSsoDepositState, pn as clearSsoNavigation, kn as clearUserContext, Kn as cn, sr as computePullOffset, cr as computePullProgress, mn as consumeSsoDepositMarker, n as createApolloClient, Ii as createEventBus, pa as createGlobalShortcuts, ot as createGraphQLClient, Mn as createProfileScopedStorage, V as desktopCheckForUpdates, H as desktopDeepLinkToPath, U as desktopInstallUpdate, W as desktopNotify, G as desktopOpenExternal, K as desktopSetBadgeCount, q as desktopSetLocale, J as desktopSetTheme, Y as desktopSetTrayQuickActions, Va as detectDeviceType, Rr as detectPlatform, Ue as dispatchBackendErrorEvent, Ea as dispatchQuotaExhausted, ti as dispatchUpgradePrompt, Wn as downscaleImage, ve as emitProductSlug, We as extractBackendError, zn as extractQuotaExhaustedExtensions, Bn as extractUpgradeErrorExtensions, Te as findProductConfig, g as formatBytes, _ as formatCompactNumber, v as formatCurrency, y as formatCurrencyCompact, b as formatDate, x as formatDateTime, S as formatDuration, zr as formatKeyCombo, C as formatList, w as formatNumber, T as formatOrdinal, E as formatPercentage, D as formatRelativeTime, O as formatTime, a as getAlertTokens, I as getCapacitorPlatform, o as getCategoryTokens, X as getDesktopAuthBridgeConfig, Z as getDesktopBridge, Q as getDesktopGatewayBases, $ as getDesktopGatewayUrls, ee as getDesktopRuntimeConfig, te as getDesktopUpdateState, ne as getDesktopWindowState, Br as getDisplayKeysForPlatform, Ie as getGatewayConfig, Le as getGatewayUrl, st as getGlobalClient, ma as getGlobalShortcutsByCategory, Re as getGraphQLEndpoint, re as getLegacyDesktopRuntime, Ht as getNativeBridge, ri as getNativeEntryRoutes, bo as getNativeProducts, xo as getNativePurchases, xa as getOrCreatePushDeviceId, Ut as getPlatform, Ee as getProductUrl, De as getProductsWithUrls, Nn as getProfileScopedKey, s as getProgressTokens, Eo as getPushOptInController, Ha as getResponsiveSelector, sn as getSSORedirectUrl, It as getSSoCookie, Ae as getShellConfig, Vr as getShortcutLabel, c as getStatusBadgeTokens, l as getStatusTokens, Ze as getStoredAuthToken, Qe as getStoredLocale, $e as getStoredOrganizationId, et as getStoredProjectId, tt as getStoredWorkspaceId, nt as getStoredWorkspaceToken, eo as getTourContextRank, to as getTourRouteCatalog, no as getTourRouteModules, ro as getTourRoutePages, u as getTrendTokens, ct as getWorkspaceClient, ze as getWorkspaceTokenPayload, St as gql, rt as graphqlFetch, At as hasAuthGraphQLErrors, si as hasStoredValidSession, lt as initializeAppClients, An as initializeLogger, ie as installDesktopDeepLinkHandler, ae as installDesktopNavigateHandler, de as installGatewayFetchRewrite, So as installNativeIAP, Ge as isAbortError, $t as isAllowedRedirectUrl, Wt as isAndroid, jt as isAuthGraphQLError, Mt as isAuthNetworkError, Ke as isBackendErrorDisplay, L as isCapacitorNative, P as isChunkLoadError, oe as isDesktop, Gt as isElectron, Kt as isIOS, qt as isInstalledApp, Hr as isMac, Ur as isMobileDevice, Jt as isNative, Co as isNativeIAPAvailable, Vn as isQuotaExhaustedError, ye as isSameProductSlug, Lt as isSharedSsoCookieDomain, je as isShellLessRoute, hn as isSsoNavigationPending, Yt as isStandalonePWA, Wr as isTabletDevice, io as isTourVisibleForContext, qe as isTransportError, Rt as isTrustedSsoOrigin, Hn as isUpgradeError, Xt as isWeb, Zt as isWebBrowser, Be as isWorkspaceTokenValidForContext, F as lazyWithRetry, be as legacyProductSlug, Pa as listUnsavedChanges, Dn as logManager, Je as markConnectionHealthy, gn as markSsoDepositDone, _n as markSsoDepositPending, Gr as matchesKeyCombo, ha as mergeShortcuts, vn as mintSsoSessionTokens, qn as nativeActionSheet, Jn as nativeConfirm, Yn as nativeCopyText, Xn as nativeImpact, Zn as nativeNotify, Qn as nativeOpenUrl, $n as nativeSelection, er as nativeShare, tr as nativeToast, Kr as normalizeKey, qr as normalizePlatformCombo, xe as normalizeProductSlug, ao as normalizeTourPath, se as onDesktopUpdateState, ce as onDesktopWindowState, en as openUrlInNewTabWithAllowlist, Jr as parseKeyCombo, k as pluralize, vt as prepareWorkspaceRequest, d as progressTokens, ka as publishPlanUsageSnapshot, wo as purchaseNativeProduct, ji as readAnalyticsConsent, Mi as readAnalyticsConsentChoice, rr as readInitialNetworkStatus, zt as readShellSsoCookie, yn as readSsoDepositState, Do as recordPushPermissionPromptDismissed, Nt as redirectToLogin, cn as redirectToSSO, ir as reduceNetworkStatus, le as registerDesktopNavigator, Sa as registerPushDevice, Oo as registerPushOptInController, oo as registerTourRouteCatalog, Fa as registerUnsavedChange, tn as replaceLocationWithAllowlist, ut as resetAppClients, bi as resolveActionSheetOutcome, go as resolveAppShellObservabilityConfig, me as resolveAuthBridgeConfig, fe as resolveGatewayBases, it as resolveGatewayUrl, ue as resolveGatewayUrls, ci as resolveLandingGate, he as resolveShellAuthBridgeConfig, so as resolveTourTargetPath, To as restoreNativePurchases, Gn as selectInlineBase64, Ni as setAnalyticsConsent, Bt as setSSoCookie, Vt as setShellSsoCookies, jn as setUserContext, bn as shouldAttemptSsoDeposit, Yr as shouldEnableKeyboardShortcuts, Xr as shouldIgnoreShortcut, ko as shouldPromptForPushPermission, Me as shouldShowBreadcrumb, ii as shouldShowNativeWelcome, Ne as shouldShowSidebar, Ye as shouldToastBackendError, A as slugify, f as statusTokens, pe as suppressConsole, j as toCamelCase, M as toPascalCase, p as trendTokens, N as truncateText, Ca as unregisterPushDevice, Ia as unsavedChangesBlocking, xi as useActionSheet, pr as useActorProfiles, Ct as useApolloClient, gi as useAppState, aa as useAsync, oa as useAsyncImmediate, lo as useAutoStartTour, Ui as useBreakpoint, ta as useConditionalToggle, e as useCopyToClipboard, Ma as useCurrentContextSearchParams, Bi as useDebounce, Si as useDesktop, Ci as useDesktopUpdateState, wi as useDesktopWindowState, _i as useDeviceInfo, Li as useEvent, Ri as useEventBus, zi as useEventEmitter, Yi as useExclusiveMenu, Nr as useFeatureFlag, Pr as useFeatureFlagDetails, Fr as useFeatureFlagValue, Mr as useFeatureFlags, ft as useGateway, pt as useGatewayClient, vi as useHaptics, _a as useHasAnimated, gt as useHasAuthToken, ua as useHotkeys, qa as useIsTourPlaying, qi as useKeyPress, Ji as useKeyboardShortcut, la as useKeyboardShortcuts, wt as useLazyQuery, Xi as useLocalStorage, ga as useLogger, t as useMediaQuery, za as useMicrofrontendContext, Wi as useMobileBreakpoint, Tt as useMutation, hi as useNativeKeyboard, pi as useNativePlatform, ar as useNetworkStatus, Gi as useOnClickOutside, Ki as useOnClickOutsideWithRef, Or as usePWA, ia as usePagination, $a as usePlayTour, Qi as usePrevious, $i as usePreviousDistinct, ea as usePreviousHistory, lr as usePullToRefresh, wa as usePushDeviceRegistration, Et as useQuery, Da as useQuotaErrorToast, ya as useRecordProductVisit, va as useReferralAttribution, Sn as useRegistryHelpers, ur as useReturnFocus, mi as useSafeArea, mt as useSafeGateway, ht as useSafeGatewayClient, uo as useSafeToursContext, Zi as useSessionStorage, Cn as useShellNavigate, da as useShortcutHelp, Ja as useStartTour, yi as useStatusBar, Ya as useStopTour, Dt as useSubscription, Vi as useThrottle, na as useToggle, ra as useToggleObject, Ua as useTourPlayer, Xa as useTourPlayerContext, fo as useTours, po as useToursContext, La as useUnsavedChanges, Aa as useUpgradePrompt, li as useVoiceInput, Ba as withTourProgressStatus };
|
package/dist/utils/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import "../shared/utils/gatewayFetchRewrite.js";
|
|
|
6
6
|
import "../shared/utils/backendErrors.js";
|
|
7
7
|
import "../shared/utils/authErrorHandling.js";
|
|
8
8
|
import "../shared/utils/authCookie.js";
|
|
9
|
+
import "../shared/utils/redirectAllowlist.js";
|
|
9
10
|
import "../shared/utils/ssoDeposit.js";
|
|
10
11
|
import "../shared/utils/appHelpers.js";
|
|
11
12
|
import "../shared/utils/loggerInit.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/fe-libs",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1021.2",
|
|
4
4
|
"description": "Burdenoff frontend primitives and domain libraries",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
"test:package-livekit-optional": "node scripts/validate-livekit-optional.mjs",
|
|
312
312
|
"verify:package": "node scripts/verify-package-contents.mjs",
|
|
313
313
|
"test:handsfree-browser": "node scripts/handsfree-browser-run.mjs",
|
|
314
|
-
"test": "bun test scripts/graphql-schema-drift/__tests__ scripts/a11y-audit/__tests__ src/credentials src/connections src/storage src/shared/assistant src/shared/components src/shared/graphql/links/sse-link.test.ts src/shared/graphql/fetch.test.ts src/shared/graphql/prepareWorkspaceRequest.test.ts src/shared/graphql/client.test.ts src/shared/utils/apollo.test.ts src/shared/graphql/tourWorkspaceAuth.test.ts src/shared/config/gatewayUrls.test.ts src/shared/config/authBridgeUrls.test.ts src/shared/config/shellRoutes.test.ts src/shared/config/gatewayFallback.test.ts scripts/__tests__ src/shared/config/products.test.ts src/shared/config/productSlug.test.ts src/shared/hooks/shell/useProducts.test.ts src/shared/providers/shell/brandAttribute.test.ts src/chrome/ProductSwitcher.test.ts src/shared/utils/gatewayFetchRewrite.test.ts src/shared/utils/authCookie.test.ts src/shared/providers/shell/ProfileStorageManager.test.ts src/shared/providers/AppShellProvider.test.ts src/shared/providers/shell/interpolate.test.ts src/shared/providers/shell/resolveTranslation.test.ts src/shared/providers/shell/I18nProvider.render.test.tsx src/shared/providers/shell/I18nProvider.client.test.tsx src/shared/providers/shell/translationStore.test.ts src/shared/providers/shell/translationLayers.test.ts src/shared/providers/shell/directionMode.test.ts src/shared/providers/shell/authProvider/ssoRelay.test.ts src/shared/providers/shell/authProvider/useAuthActions.signOut.test.tsx src/shared/providers/shell/personaSurfaceRemote.test.ts src/shared/providers/shell/workspaceSwitch.client.test.tsx src/shared/events/sinks/RybbitSink.test.ts src/shell-native src/shared/native src/shared/navigation src/shared/tours src/chrome/__tests__ src/ui/__tests__",
|
|
314
|
+
"test": "bun test scripts/graphql-schema-drift/__tests__ scripts/a11y-audit/__tests__ src/credentials src/connections src/storage src/shared/assistant src/shared/components src/shared/graphql/links/sse-link.test.ts src/shared/graphql/fetch.test.ts src/shared/graphql/prepareWorkspaceRequest.test.ts src/shared/graphql/client.test.ts src/shared/utils/apollo.test.ts src/shared/graphql/tourWorkspaceAuth.test.ts src/shared/config/gatewayUrls.test.ts src/shared/config/authBridgeUrls.test.ts src/shared/config/shellRoutes.test.ts src/shared/config/gatewayFallback.test.ts scripts/__tests__ src/shared/config/products.test.ts src/shared/config/productSlug.test.ts src/shared/hooks/shell/useProducts.test.ts src/shared/providers/shell/brandAttribute.test.ts src/chrome/ProductSwitcher.test.ts src/shared/utils/gatewayFetchRewrite.test.ts src/shared/utils/authCookie.test.ts src/shared/utils/redirectAllowlist.test.ts src/shared/providers/shell/ProfileStorageManager.test.ts src/shared/providers/AppShellProvider.test.ts src/shared/providers/shell/interpolate.test.ts src/shared/providers/shell/resolveTranslation.test.ts src/shared/providers/shell/I18nProvider.render.test.tsx src/shared/providers/shell/I18nProvider.client.test.tsx src/shared/providers/shell/translationStore.test.ts src/shared/providers/shell/translationLayers.test.ts src/shared/providers/shell/directionMode.test.ts src/shared/providers/shell/authProvider/ssoRelay.test.ts src/shared/providers/shell/authProvider/useAuthActions.signOut.test.tsx src/shared/providers/shell/personaSurfaceRemote.test.ts src/shared/providers/shell/workspaceSwitch.client.test.tsx src/shared/events/sinks/RybbitSink.test.ts src/shell-native src/shared/native src/shared/navigation src/shared/tours src/chrome/__tests__ src/ui/__tests__",
|
|
315
315
|
"sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run lint:sanity && bun run format && bun run type:check && bun run test && bun run build && bun run verify:package'",
|
|
316
316
|
"switch:status": "bun scripts/deps-mode.ts status",
|
|
317
317
|
"switch:remote": "bun scripts/deps-mode.ts remote",
|