@burdenoff/fe-libs 2026.731.4 → 2026.801.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.
- package/dist/chrome/AutoBreadcrumbs.js +1 -1
- package/dist/chrome/DynamicFooter.js +1 -1
- package/dist/chrome/Footer.d.ts +1 -1
- package/dist/chrome/PageHeader.js +1 -1
- package/dist/chrome/PluginRoutes.js +1 -1
- package/dist/chrome/ProductSideNav.js +1 -1
- package/dist/shared/components/ConditionalShell.js +1 -1
- package/dist/shared/components/ContextConversationWidget.js +1 -1
- package/dist/shared/components/MicrofrontendErrorBoundary.js +1 -1
- package/dist/shared/components/RequireAuth.d.ts +2 -2
- package/dist/shared/components/assistantWidget/AssistantWidget.d.ts.map +1 -1
- package/dist/shared/components/assistantWidget/AssistantWidget.js +343 -308
- package/dist/shared/hooks/shell/useEffectiveContext.js +1 -1
- package/dist/shared/hooks/useReferralAttribution.js +1 -1
- package/dist/shared/pages/LegalPage.js +1 -1
- package/dist/shared/pages/SearchPage.js +1 -1
- package/dist/shared/providers/AppShellProvider.js +1 -1
- package/dist/shared/providers/shell/PageConversationContextProvider.d.ts +1 -1
- package/dist/shared/providers/shell/PageConversationContextProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/PageConversationContextProvider.js +1 -1
- package/dist/shared/tours/TourTrigger.js +1 -1
- package/dist/shared/tours/ToursContext.js +1 -1
- package/dist/shared/utils/appHelpers.js +1 -1
- package/package.json +3 -2
- package/src/vite/mfe.config.ts +2 -2
- package/src/vite/shell.config.ts +3 -3
- package/src/vite/types.ts +1 -1
|
@@ -3,7 +3,7 @@ import { useSafeShellUi as t } from "../shared/providers/shell/ShellUiProvider.j
|
|
|
3
3
|
import { useEffect as n, useMemo as r, useState as i } from "react";
|
|
4
4
|
import { ChevronRight as a, Home as o, PanelTopClose as s, PanelTopOpen as c } from "lucide-react";
|
|
5
5
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
-
import { useLocation as d, useNavigate as f } from "react-router
|
|
6
|
+
import { useLocation as d, useNavigate as f } from "react-router";
|
|
7
7
|
//#region src/chrome/AutoBreadcrumbs.tsx
|
|
8
8
|
var p = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, m = /* @__PURE__ */ new Map();
|
|
9
9
|
function h(e, t) {
|
|
@@ -7,7 +7,7 @@ import { useEffect as o, useMemo as s, useState as c } from "react";
|
|
|
7
7
|
import { Github as l, Globe as u, Linkedin as d, MessageCircle as f, Twitter as p, Youtube as m } from "lucide-react";
|
|
8
8
|
import { jsx as h } from "react/jsx-runtime";
|
|
9
9
|
import { gql as g } from "@apollo/client/core";
|
|
10
|
-
import { Link as _ } from "react-router
|
|
10
|
+
import { Link as _ } from "react-router";
|
|
11
11
|
//#region src/chrome/DynamicFooter.tsx
|
|
12
12
|
var v = g`
|
|
13
13
|
query GetFooterContentPages($filter: ContentPageFilterInput, $limit: Int) {
|
package/dist/chrome/Footer.d.ts
CHANGED
|
@@ -120,7 +120,7 @@ export declare const DEFAULT_SOCIAL_LINKS: SocialLink[];
|
|
|
120
120
|
*
|
|
121
121
|
* @example Custom columns and router integration
|
|
122
122
|
* ```tsx
|
|
123
|
-
* import { Link } from 'react-router
|
|
123
|
+
* import { Link } from 'react-router';
|
|
124
124
|
*
|
|
125
125
|
* <Footer
|
|
126
126
|
* columns={myColumns}
|
|
@@ -2,7 +2,7 @@ import { cn as e } from "../lib/utils.js";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { ChevronRightIcon as t } from "lucide-react";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
-
import { Link as i } from "react-router
|
|
5
|
+
import { Link as i } from "react-router";
|
|
6
6
|
//#region src/chrome/PageHeader.tsx
|
|
7
7
|
function a({ title: a, description: o, actions: s, breadcrumb: c, icon: l, toolbar: u, className: d }) {
|
|
8
8
|
return /* @__PURE__ */ r("header", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRouteRegistryStore as e } from "../shared/plugins/registries/useRouteRegistry.js";
|
|
2
2
|
import { Suspense as t, useMemo as n } from "react";
|
|
3
3
|
import { Fragment as r, jsx as i } from "react/jsx-runtime";
|
|
4
|
-
import { matchPath as a, useLocation as o } from "react-router
|
|
4
|
+
import { matchPath as a, useLocation as o } from "react-router";
|
|
5
5
|
//#region src/chrome/PluginRoutes.tsx
|
|
6
6
|
var s = ({ fallback: s = null, notFound: c = null }) => {
|
|
7
7
|
let l = o(), u = e((e) => e.items), d = n(() => u.filter((e) => e.visible !== !1).sort((e, t) => t.path.length - e.path.length), [u]), f = n(() => d.find((e) => !!a({
|
|
@@ -9,7 +9,7 @@ import { NavCustomizeDialog as l } from "./NavCustomizeDialog.js";
|
|
|
9
9
|
import { PersonaSimulationPill as u, PersonaSurfaceControls as d } from "./PersonaSurfaceControls.js";
|
|
10
10
|
import { useMemo as f } from "react";
|
|
11
11
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
12
|
-
import { useLocation as g, useNavigate as _ } from "react-router
|
|
12
|
+
import { useLocation as g, useNavigate as _ } from "react-router";
|
|
13
13
|
//#region src/chrome/ProductSideNav.tsx
|
|
14
14
|
function v({ logo: v, appName: y, groupOrder: b, groupLabels: x, mobileActions: S, customHeader: C, homeAriaLabel: w = "Go to dashboard", collapseLabel: T = "Collapse" }) {
|
|
15
15
|
let E = _(), D = g(), { sidebarCollapsed: O, toggleSidebar: k } = r(), A = o(), j = e((e) => e.items), M = n(), N = i(), P = N?.simulation ?? null, F = M?.hasPermission, I = !!M && !M.isLoading && !M.error, L = f(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isShellLessRoute as e } from "../config/shellRoutes.js";
|
|
2
2
|
import { Suspense as t } from "react";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
import { useLocation as i } from "react-router
|
|
4
|
+
import { useLocation as i } from "react-router";
|
|
5
5
|
//#region src/shared/components/ConditionalShell.tsx
|
|
6
6
|
function a({ children: a, routes: o, ShellComponent: s, shellExtras: c, shellFallback: l }) {
|
|
7
7
|
return e(i().pathname, o) ? /* @__PURE__ */ n("div", {
|
|
@@ -23,7 +23,7 @@ import { WidgetHeader as me } from "./contextConversationWidget/WidgetHeader.js"
|
|
|
23
23
|
import { useEffect as u, useMemo as d, useRef as he, useState as f } from "react";
|
|
24
24
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
25
25
|
import { useQuery as h } from "@apollo/client/react";
|
|
26
|
-
import { useNavigate as ge } from "react-router
|
|
26
|
+
import { useNavigate as ge } from "react-router";
|
|
27
27
|
//#region src/shared/components/ContextConversationWidget.tsx
|
|
28
28
|
function g({ className: g, widgetKey: _ }) {
|
|
29
29
|
let { t: v } = te(), { workspaceId: y } = n(), b = t(), x = ne(), S = e("workspace"), C = ge(), [w, T] = f(null), [E, D] = f(null), [O, k] = f(""), [A, _e] = f(() => typeof window < "u" ? window.innerWidth < 768 : !1), [j, M] = f(null), [N, P] = f(null), [F, I] = f(""), [L, R] = f(null), [z, B] = f([]), V = he(null), H = d(() => (e, t) => {
|
|
@@ -3,7 +3,7 @@ import { m as t } from "../../node_modules/react-error-boundary/dist/react-error
|
|
|
3
3
|
import { PageLoadingFallback as n } from "./LoadingFallback.js";
|
|
4
4
|
import { Suspense as r } from "react";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
-
import { useLocation as a } from "react-router
|
|
6
|
+
import { useLocation as a } from "react-router";
|
|
7
7
|
//#region src/shared/components/MicrofrontendErrorBoundary.tsx
|
|
8
8
|
function o({ children: o, fallback: s, loadingMessage: c = "Loading..." }) {
|
|
9
9
|
return /* @__PURE__ */ i(t, {
|
|
@@ -30,9 +30,9 @@ export interface RequireAuthProps {
|
|
|
30
30
|
* - Customizable redirect
|
|
31
31
|
* - Flexible fallback components
|
|
32
32
|
*
|
|
33
|
-
* @example Basic usage (with Navigate from react-router
|
|
33
|
+
* @example Basic usage (with Navigate from react-router)
|
|
34
34
|
* ```tsx
|
|
35
|
-
* import { Navigate } from 'react-router
|
|
35
|
+
* import { Navigate } from 'react-router';
|
|
36
36
|
*
|
|
37
37
|
* <RequireAuth redirect={(path) => <Navigate to={path} replace />}>
|
|
38
38
|
* <ProtectedPage />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantWidget.d.ts","sourceRoot":"","sources":["../../../../src/shared/components/assistantWidget/AssistantWidget.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAqBf,OAAO,KAAK,EAGV,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC9B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AA0D1E,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"AssistantWidget.d.ts","sourceRoot":"","sources":["../../../../src/shared/components/assistantWidget/AssistantWidget.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAqBf,OAAO,KAAK,EAGV,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC9B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AA0D1E,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAs6BpD,CAAC"}
|
|
@@ -68,16 +68,16 @@ var ye = ({ transport: p, modes: m, defaultModeId: ye, title: g = "AI Assistant"
|
|
|
68
68
|
i(() => {
|
|
69
69
|
w || console.error("[AssistantWidget] No transport available — supply `transport`, or a non-empty `modes` where each entry has a transport.");
|
|
70
70
|
}, [w]);
|
|
71
|
-
let [T, E] = s(() => ge()), [D, O] = s([]), [k, A] = s(""), [j, M] = s([]), [N, P] = s(!1), [Ne, F] = s(!1), [I, L] = s([]), [R, z] = s(!1), [Pe, Fe] = s(!1), [Ie, Le] = s(() => me()), [Re, B] = s([]), [V, ze] = s(null), H =
|
|
71
|
+
let [T, E] = s(() => ge()), [D, O] = s([]), [k, A] = s(""), [j, M] = s([]), [N, P] = s(!1), [Ne, F] = s(!1), [I, L] = s([]), [R, z] = s(!1), [Pe, Fe] = s(!1), [Ie, Le] = s(() => me()), [Re, B] = s([]), [V, ze] = s(null), [Be, H] = s(!1), U = o(null), W = o(null), G = o(null), K = o(!1), Ve = o(null), q = Se === "sidebar", He = Ce && !!C?.newSession, Ue = r(() => {
|
|
72
72
|
Le((e) => {
|
|
73
73
|
let t = !e;
|
|
74
74
|
return he(t), t;
|
|
75
75
|
});
|
|
76
|
-
}, []),
|
|
76
|
+
}, []), J = t(xe), We = r(() => {
|
|
77
77
|
h(!0), E(!0), C.prewarm?.("full");
|
|
78
|
-
}, [C]), J = r(() => {
|
|
79
|
-
h(!1), E(!1), C.suspend?.();
|
|
80
78
|
}, [C]), Y = r(() => {
|
|
79
|
+
h(!1), E(!1), C.suspend?.();
|
|
80
|
+
}, [C]), X = r(() => {
|
|
81
81
|
E((e) => {
|
|
82
82
|
let t = !e;
|
|
83
83
|
return h(t), t ? C.prewarm?.("full") : C.suspend?.(), t;
|
|
@@ -86,38 +86,38 @@ var ye = ({ transport: p, modes: m, defaultModeId: ye, title: g = "AI Assistant"
|
|
|
86
86
|
i(() => {
|
|
87
87
|
let e = (e) => {
|
|
88
88
|
let t = e.detail;
|
|
89
|
-
t?.open === !0 ?
|
|
89
|
+
t?.open === !0 ? We() : t?.open === !1 ? Y() : X();
|
|
90
90
|
};
|
|
91
91
|
return window.addEventListener(f, e), () => window.removeEventListener(f, e);
|
|
92
92
|
}, [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
We,
|
|
94
|
+
Y,
|
|
95
|
+
X
|
|
96
96
|
]), i(() => {
|
|
97
|
-
|
|
98
|
-
}, [
|
|
99
|
-
let
|
|
97
|
+
J.isListening && J.transcript && A(J.transcript);
|
|
98
|
+
}, [J.transcript, J.isListening]);
|
|
99
|
+
let Z = r(async () => {
|
|
100
100
|
if (C.listArtifacts) try {
|
|
101
101
|
B(await C.listArtifacts());
|
|
102
102
|
} catch {
|
|
103
103
|
B([]);
|
|
104
104
|
}
|
|
105
|
-
}, [C]),
|
|
105
|
+
}, [C]), Ge = o(x);
|
|
106
106
|
i(() => {
|
|
107
|
-
|
|
107
|
+
Ge.current !== x && (Ge.current = x, G.current?.abort(), G.current = null, P(!1), O([]), A(""), L([]), z(!1), F(!1), B([]), K.current = !1);
|
|
108
108
|
}, [x]), i(() => {
|
|
109
|
-
if (!T ||
|
|
109
|
+
if (!T || K.current) return;
|
|
110
110
|
let e = C.loadHistory;
|
|
111
111
|
if (!e) {
|
|
112
|
-
|
|
112
|
+
K.current = !0;
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
K.current = !0;
|
|
116
116
|
let t = !1;
|
|
117
117
|
return F(!0), (async () => {
|
|
118
118
|
try {
|
|
119
119
|
let n = await e();
|
|
120
|
-
!t && n.length > 0 && (O((e) => e.length === 0 ? n : e),
|
|
120
|
+
!t && n.length > 0 && (O((e) => e.length === 0 ? n : e), Z());
|
|
121
121
|
} catch {} finally {
|
|
122
122
|
t || F(!1);
|
|
123
123
|
}
|
|
@@ -127,16 +127,16 @@ var ye = ({ transport: p, modes: m, defaultModeId: ye, title: g = "AI Assistant"
|
|
|
127
127
|
}, [
|
|
128
128
|
T,
|
|
129
129
|
C,
|
|
130
|
-
|
|
130
|
+
Z
|
|
131
131
|
]), i(() => {
|
|
132
|
-
T &&
|
|
132
|
+
T && W.current && (W.current.scrollTop = W.current.scrollHeight);
|
|
133
133
|
}, [D, T]);
|
|
134
|
-
let
|
|
134
|
+
let Q = r((e, t) => {
|
|
135
135
|
O((n) => n.map((n) => n.id === e ? {
|
|
136
136
|
...n,
|
|
137
137
|
...t
|
|
138
138
|
} : n));
|
|
139
|
-
}, []),
|
|
139
|
+
}, []), $ = r(async () => {
|
|
140
140
|
if (C.listSessions) {
|
|
141
141
|
Fe(!0);
|
|
142
142
|
try {
|
|
@@ -147,7 +147,7 @@ var ye = ({ transport: p, modes: m, defaultModeId: ye, title: g = "AI Assistant"
|
|
|
147
147
|
Fe(!1);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
}, [C]),
|
|
150
|
+
}, [C]), Ke = r(async (e) => {
|
|
151
151
|
if (!(!C.downloadArtifact || V)) {
|
|
152
152
|
ze(e.path);
|
|
153
153
|
try {
|
|
@@ -156,28 +156,28 @@ var ye = ({ transport: p, modes: m, defaultModeId: ye, title: g = "AI Assistant"
|
|
|
156
156
|
ze(null);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
}, [C, V]),
|
|
159
|
+
}, [C, V]), qe = r(async () => {
|
|
160
160
|
!C.newSession || N || (O([]), A(""), z(!1), B([]), await C.newSession());
|
|
161
|
-
}, [C, N]),
|
|
161
|
+
}, [C, N]), Je = r(async (e, t) => {
|
|
162
162
|
if (!(!C.deleteSession || N)) {
|
|
163
163
|
L((t) => t.filter((t) => t.id !== e)), t && (O([]), A(""));
|
|
164
164
|
try {
|
|
165
165
|
await C.deleteSession(e);
|
|
166
166
|
} finally {
|
|
167
|
-
|
|
167
|
+
$();
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}, [
|
|
171
171
|
C,
|
|
172
172
|
N,
|
|
173
|
-
|
|
174
|
-
]),
|
|
175
|
-
z((e) => (e ||
|
|
176
|
-
}, [
|
|
173
|
+
$
|
|
174
|
+
]), Ye = r(() => {
|
|
175
|
+
z((e) => (e || $(), !e));
|
|
176
|
+
}, [$]), Xe = r(async (e) => {
|
|
177
177
|
if (!(!C.selectSession || N)) {
|
|
178
178
|
F(!0);
|
|
179
179
|
try {
|
|
180
|
-
O(await C.selectSession(e)), z(!1),
|
|
180
|
+
O(await C.selectSession(e)), z(!1), $(), Z();
|
|
181
181
|
} catch {} finally {
|
|
182
182
|
F(!1);
|
|
183
183
|
}
|
|
@@ -185,12 +185,12 @@ var ye = ({ transport: p, modes: m, defaultModeId: ye, title: g = "AI Assistant"
|
|
|
185
185
|
}, [
|
|
186
186
|
C,
|
|
187
187
|
N,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
]),
|
|
188
|
+
$,
|
|
189
|
+
Z
|
|
190
|
+
]), Ze = r(async () => {
|
|
191
191
|
let e = k.trim(), t = j;
|
|
192
192
|
if (!e && t.length === 0 || N) return;
|
|
193
|
-
|
|
193
|
+
J.isListening && J.stop(), J.reset(), A(""), M([]), U.current && (U.current.style.height = "auto");
|
|
194
194
|
let n = t.length > 0 ? `📎 ${t.map((e) => e.name).join(", ")}` : "", r = {
|
|
195
195
|
id: _e(),
|
|
196
196
|
role: "user",
|
|
@@ -207,47 +207,47 @@ var ye = ({ transport: p, modes: m, defaultModeId: ye, title: g = "AI Assistant"
|
|
|
207
207
|
}
|
|
208
208
|
]), P(!0);
|
|
209
209
|
let a = new AbortController();
|
|
210
|
-
|
|
210
|
+
G.current = a;
|
|
211
211
|
try {
|
|
212
212
|
let { text: n } = await C.sendPrompt({
|
|
213
213
|
prompt: e,
|
|
214
214
|
attachments: t.length > 0 ? t : void 0,
|
|
215
215
|
signal: a.signal,
|
|
216
|
-
onProgress: (e) =>
|
|
216
|
+
onProgress: (e) => Q(i, { content: e })
|
|
217
217
|
});
|
|
218
|
-
|
|
218
|
+
Q(i, {
|
|
219
219
|
content: n,
|
|
220
220
|
pending: !1
|
|
221
|
-
}),
|
|
221
|
+
}), Z();
|
|
222
222
|
} catch (e) {
|
|
223
|
-
|
|
223
|
+
Q(i, {
|
|
224
224
|
content: `Sorry, I couldn't complete that: ${e instanceof Error ? e.message : "Something went wrong. Please try again."}`,
|
|
225
225
|
pending: !1,
|
|
226
226
|
error: !0
|
|
227
227
|
});
|
|
228
228
|
} finally {
|
|
229
|
-
P(!1),
|
|
229
|
+
P(!1), G.current = null, R && $();
|
|
230
230
|
}
|
|
231
231
|
}, [
|
|
232
232
|
k,
|
|
233
233
|
j,
|
|
234
234
|
N,
|
|
235
|
-
|
|
235
|
+
Q,
|
|
236
236
|
C,
|
|
237
|
-
|
|
237
|
+
J,
|
|
238
238
|
R,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
]),
|
|
242
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
243
|
-
}, [
|
|
244
|
-
let e =
|
|
239
|
+
$,
|
|
240
|
+
Z
|
|
241
|
+
]), Qe = r((e) => {
|
|
242
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Ze());
|
|
243
|
+
}, [Ze]), $e = r(() => {
|
|
244
|
+
let e = U.current;
|
|
245
245
|
e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 120)}px`);
|
|
246
|
-
}, []),
|
|
247
|
-
|
|
248
|
-
}, [
|
|
246
|
+
}, []), et = r(() => {
|
|
247
|
+
J.isListening ? J.stop() : J.start();
|
|
248
|
+
}, [J]), tt = a(() => /* @__PURE__ */ u("button", {
|
|
249
249
|
type: "button",
|
|
250
|
-
onClick:
|
|
250
|
+
onClick: X,
|
|
251
251
|
onMouseEnter: () => !T && C.prewarm?.("probe"),
|
|
252
252
|
onFocus: () => !T && C.prewarm?.("probe"),
|
|
253
253
|
"aria-label": T ? "Close AI assistant" : "Open AI assistant",
|
|
@@ -257,276 +257,311 @@ var ye = ({ transport: p, modes: m, defaultModeId: ye, title: g = "AI Assistant"
|
|
|
257
257
|
children: u(T ? l : de, { className: "size-6" })
|
|
258
258
|
}), [
|
|
259
259
|
T,
|
|
260
|
-
|
|
260
|
+
X,
|
|
261
261
|
be,
|
|
262
262
|
C
|
|
263
263
|
]);
|
|
264
|
-
return w ? /* @__PURE__ */ d(pe, { children: [
|
|
265
|
-
|
|
266
|
-
"
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
"
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
"aria-label": "Hide chats",
|
|
282
|
-
"aria-expanded": !0,
|
|
283
|
-
title: "Hide chats",
|
|
284
|
-
"data-testid": "assistant-rail-toggle",
|
|
285
|
-
className: "mb-1 flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-text-secondary transition-colors hover:bg-bg-surface hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
|
|
286
|
-
children: [/* @__PURE__ */ u(oe, { className: "size-4 shrink-0" }), "Hide chats"]
|
|
287
|
-
}),
|
|
288
|
-
/* @__PURE__ */ d("button", {
|
|
289
|
-
type: "button",
|
|
290
|
-
onClick: () => void Ke(),
|
|
291
|
-
disabled: N,
|
|
292
|
-
"data-testid": "assistant-new-chat",
|
|
293
|
-
className: "flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-text-primary transition-colors hover:bg-bg-surface disabled:opacity-50 cursor-pointer",
|
|
294
|
-
children: [/* @__PURE__ */ u(le, { className: "size-4 shrink-0" }), "New chat"]
|
|
295
|
-
}),
|
|
296
|
-
/* @__PURE__ */ d("button", {
|
|
297
|
-
type: "button",
|
|
298
|
-
onClick: Je,
|
|
299
|
-
"aria-expanded": R,
|
|
300
|
-
"data-testid": "assistant-history-toggle",
|
|
301
|
-
className: "flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-text-primary transition-colors hover:bg-bg-surface cursor-pointer",
|
|
302
|
-
children: [/* @__PURE__ */ u(ne, { className: "size-4 shrink-0" }), "History"]
|
|
303
|
-
}),
|
|
304
|
-
R ? /* @__PURE__ */ u("div", {
|
|
305
|
-
"data-testid": "assistant-history-list",
|
|
306
|
-
className: "mt-1 flex-1 space-y-0.5 overflow-y-auto border-t border-border-subtle pt-2",
|
|
307
|
-
children: Pe && I.length === 0 ? /* @__PURE__ */ d("p", {
|
|
308
|
-
className: "flex items-center gap-1.5 px-2 py-1 text-[11px] text-text-muted",
|
|
309
|
-
children: [/* @__PURE__ */ u(c, { className: "size-3 animate-spin" }), "Loading…"]
|
|
310
|
-
}) : I.length === 0 ? /* @__PURE__ */ u("p", {
|
|
311
|
-
className: "px-2 py-1 text-[11px] leading-relaxed text-text-muted",
|
|
312
|
-
children: "No past chats yet."
|
|
313
|
-
}) : I.map((t) => /* @__PURE__ */ d("div", {
|
|
314
|
-
"data-testid": "assistant-history-row",
|
|
315
|
-
className: e("group flex items-center gap-1 rounded pr-1 transition-colors", t.active ? "bg-bg-surface" : "hover:bg-bg-surface"),
|
|
316
|
-
children: [/* @__PURE__ */ u("button", {
|
|
317
|
-
type: "button",
|
|
318
|
-
onClick: () => void Ye(t.id),
|
|
319
|
-
title: t.title,
|
|
320
|
-
"data-testid": "assistant-history-item",
|
|
321
|
-
className: e("min-w-0 flex-1 truncate rounded px-2 py-1.5 text-left text-[11px] leading-relaxed cursor-pointer", t.active ? "font-medium text-text-primary" : "text-text-secondary group-hover:text-text-primary"),
|
|
322
|
-
children: t.title
|
|
323
|
-
}), C.deleteSession ? /* @__PURE__ */ u("button", {
|
|
324
|
-
type: "button",
|
|
325
|
-
onClick: () => void qe(t.id, !!t.active),
|
|
326
|
-
disabled: N,
|
|
327
|
-
"aria-label": `Delete chat: ${t.title}`,
|
|
328
|
-
title: "Delete this chat",
|
|
329
|
-
"data-testid": "assistant-delete-chat",
|
|
330
|
-
className: "inline-flex size-6 shrink-0 items-center justify-center rounded text-text-muted opacity-0 transition-opacity hover:text-status-error-bg focus-visible:opacity-100 group-hover:opacity-100 disabled:opacity-30 cursor-pointer",
|
|
331
|
-
children: /* @__PURE__ */ u(fe, { className: "size-3.5" })
|
|
332
|
-
}) : null]
|
|
333
|
-
}, t.id))
|
|
334
|
-
}) : null
|
|
335
|
-
]
|
|
336
|
-
}) : null, /* @__PURE__ */ d("div", {
|
|
337
|
-
className: "flex min-h-0 min-w-0 flex-1 flex-col",
|
|
338
|
-
children: [
|
|
339
|
-
/* @__PURE__ */ d("div", {
|
|
340
|
-
className: "flex shrink-0 items-center justify-between gap-2 border-b border-border-subtle bg-bg-surface px-4 py-3",
|
|
341
|
-
children: [/* @__PURE__ */ d("div", {
|
|
342
|
-
className: "flex min-w-0 items-center gap-2",
|
|
343
|
-
children: [K && Ve && !Ie ? /* @__PURE__ */ d("button", {
|
|
344
|
-
type: "button",
|
|
345
|
-
onClick: He,
|
|
346
|
-
"aria-label": "Show chats",
|
|
347
|
-
"aria-expanded": !1,
|
|
348
|
-
title: "Show chats",
|
|
349
|
-
"data-testid": "assistant-rail-toggle",
|
|
350
|
-
className: "inline-flex shrink-0 items-center gap-1.5 rounded-md border border-border-subtle px-2 py-1.5 text-xs font-medium text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
|
|
351
|
-
children: [/* @__PURE__ */ u(se, { className: "size-4" }), "Chats"]
|
|
352
|
-
}) : /* @__PURE__ */ u("span", {
|
|
353
|
-
className: "inline-flex size-7 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10 text-action-primary-bg",
|
|
354
|
-
children: /* @__PURE__ */ u(de, { className: "size-4" })
|
|
355
|
-
}), /* @__PURE__ */ u("h2", {
|
|
356
|
-
className: "truncate text-sm font-semibold text-text-primary",
|
|
357
|
-
children: Ae
|
|
358
|
-
})]
|
|
359
|
-
}), /* @__PURE__ */ u("button", {
|
|
264
|
+
return w ? /* @__PURE__ */ d(pe, { children: [
|
|
265
|
+
tt,
|
|
266
|
+
T ? /* @__PURE__ */ d("div", {
|
|
267
|
+
role: "dialog",
|
|
268
|
+
"aria-label": Ae,
|
|
269
|
+
"data-testid": "assistant-widget-window",
|
|
270
|
+
"data-layout": Se,
|
|
271
|
+
style: q ? {
|
|
272
|
+
top: Te,
|
|
273
|
+
height: `calc(100vh - ${String(Te)}px)`
|
|
274
|
+
} : void 0,
|
|
275
|
+
className: e("fixed z-[100] flex overflow-hidden border-border-default bg-bg-surface shadow-2xl", q ? "bottom-0 right-0 w-full border-l sm:w-[480px] lg:w-[560px] animate-in slide-in-from-right duration-200" : "flex-col rounded-xl border bottom-24 right-6 h-[560px] max-h-[calc(100vh-7rem)] w-[calc(100vw-3rem)] sm:w-[400px] animate-in slide-in-from-bottom-2 fade-in duration-200"),
|
|
276
|
+
children: [q && He && Ie ? /* @__PURE__ */ d("aside", {
|
|
277
|
+
"data-testid": "assistant-session-panel",
|
|
278
|
+
className: "flex w-[168px] shrink-0 flex-col gap-1 border-r border-border-subtle bg-bg-sunken p-2",
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ d("button", {
|
|
360
281
|
type: "button",
|
|
361
|
-
onClick:
|
|
362
|
-
"aria-label": "
|
|
363
|
-
"
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
282
|
+
onClick: Ue,
|
|
283
|
+
"aria-label": "Hide chats",
|
|
284
|
+
"aria-expanded": !0,
|
|
285
|
+
title: "Hide chats",
|
|
286
|
+
"data-testid": "assistant-rail-toggle",
|
|
287
|
+
className: "mb-1 flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-text-secondary transition-colors hover:bg-bg-surface hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
|
|
288
|
+
children: [/* @__PURE__ */ u(oe, { className: "size-4 shrink-0" }), "Hide chats"]
|
|
289
|
+
}),
|
|
290
|
+
/* @__PURE__ */ d("button", {
|
|
291
|
+
type: "button",
|
|
292
|
+
onClick: () => void qe(),
|
|
293
|
+
disabled: N,
|
|
294
|
+
"data-testid": "assistant-new-chat",
|
|
295
|
+
className: "flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-text-primary transition-colors hover:bg-bg-surface disabled:opacity-50 cursor-pointer",
|
|
296
|
+
children: [/* @__PURE__ */ u(le, { className: "size-4 shrink-0" }), "New chat"]
|
|
297
|
+
}),
|
|
298
|
+
/* @__PURE__ */ d("button", {
|
|
299
|
+
type: "button",
|
|
300
|
+
onClick: Ye,
|
|
301
|
+
"aria-expanded": R,
|
|
302
|
+
"data-testid": "assistant-history-toggle",
|
|
303
|
+
className: "flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-text-primary transition-colors hover:bg-bg-surface cursor-pointer",
|
|
304
|
+
children: [/* @__PURE__ */ u(ne, { className: "size-4 shrink-0" }), "History"]
|
|
305
|
+
}),
|
|
306
|
+
R ? /* @__PURE__ */ u("div", {
|
|
307
|
+
"data-testid": "assistant-history-list",
|
|
308
|
+
className: "mt-1 flex-1 space-y-0.5 overflow-y-auto border-t border-border-subtle pt-2",
|
|
309
|
+
children: Pe && I.length === 0 ? /* @__PURE__ */ d("p", {
|
|
310
|
+
className: "flex items-center gap-1.5 px-2 py-1 text-[11px] text-text-muted",
|
|
311
|
+
children: [/* @__PURE__ */ u(c, { className: "size-3 animate-spin" }), "Loading…"]
|
|
312
|
+
}) : I.length === 0 ? /* @__PURE__ */ u("p", {
|
|
313
|
+
className: "px-2 py-1 text-[11px] leading-relaxed text-text-muted",
|
|
314
|
+
children: "No past chats yet."
|
|
315
|
+
}) : I.map((t) => /* @__PURE__ */ d("div", {
|
|
316
|
+
"data-testid": "assistant-history-row",
|
|
317
|
+
className: e("group flex items-center gap-1 rounded pr-1 transition-colors", t.active ? "bg-bg-surface" : "hover:bg-bg-surface"),
|
|
318
|
+
children: [/* @__PURE__ */ u("button", {
|
|
319
|
+
type: "button",
|
|
320
|
+
onClick: () => void Xe(t.id),
|
|
321
|
+
title: t.title,
|
|
322
|
+
"data-testid": "assistant-history-item",
|
|
323
|
+
className: e("min-w-0 flex-1 truncate rounded px-2 py-1.5 text-left text-[11px] leading-relaxed cursor-pointer", t.active ? "font-medium text-text-primary" : "text-text-secondary group-hover:text-text-primary"),
|
|
324
|
+
children: t.title
|
|
325
|
+
}), C.deleteSession ? /* @__PURE__ */ u("button", {
|
|
326
|
+
type: "button",
|
|
327
|
+
onClick: () => void Je(t.id, !!t.active),
|
|
328
|
+
disabled: N,
|
|
329
|
+
"aria-label": `Delete chat: ${t.title}`,
|
|
330
|
+
title: "Delete this chat",
|
|
331
|
+
"data-testid": "assistant-delete-chat",
|
|
332
|
+
className: "inline-flex size-6 shrink-0 items-center justify-center rounded text-text-muted opacity-0 transition-opacity hover:text-status-error-bg focus-visible:opacity-100 group-hover:opacity-100 disabled:opacity-30 cursor-pointer",
|
|
333
|
+
children: /* @__PURE__ */ u(fe, { className: "size-3.5" })
|
|
334
|
+
}) : null]
|
|
335
|
+
}, t.id))
|
|
336
|
+
}) : null
|
|
337
|
+
]
|
|
338
|
+
}) : null, /* @__PURE__ */ d("div", {
|
|
339
|
+
className: "flex min-h-0 min-w-0 flex-1 flex-col",
|
|
340
|
+
children: [
|
|
341
|
+
/* @__PURE__ */ d("div", {
|
|
342
|
+
className: "flex shrink-0 items-center justify-between gap-2 border-b border-border-subtle bg-bg-surface px-4 py-3",
|
|
343
|
+
children: [/* @__PURE__ */ d("div", {
|
|
344
|
+
className: "flex min-w-0 items-center gap-2",
|
|
345
|
+
children: [q && He && !Ie ? /* @__PURE__ */ d("button", {
|
|
346
|
+
type: "button",
|
|
347
|
+
onClick: Ue,
|
|
348
|
+
"aria-label": "Show chats",
|
|
349
|
+
"aria-expanded": !1,
|
|
350
|
+
title: "Show chats",
|
|
351
|
+
"data-testid": "assistant-rail-toggle",
|
|
352
|
+
className: "inline-flex shrink-0 items-center gap-1.5 rounded-md border border-border-subtle px-2 py-1.5 text-xs font-medium text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
|
|
353
|
+
children: [/* @__PURE__ */ u(se, { className: "size-4" }), "Chats"]
|
|
354
|
+
}) : /* @__PURE__ */ u("span", {
|
|
355
|
+
className: "inline-flex size-7 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10 text-action-primary-bg",
|
|
356
|
+
children: /* @__PURE__ */ u(de, { className: "size-4" })
|
|
357
|
+
}), /* @__PURE__ */ u("h2", {
|
|
358
|
+
className: "truncate text-sm font-semibold text-text-primary",
|
|
359
|
+
children: Ae
|
|
360
|
+
})]
|
|
361
|
+
}), /* @__PURE__ */ u("button", {
|
|
376
362
|
type: "button",
|
|
377
|
-
|
|
378
|
-
"aria-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
title: N ? "Finish the current turn before switching" : t.label,
|
|
383
|
-
"data-testid": `assistant-mode-${t.id}`,
|
|
384
|
-
className: e("rounded-md px-2.5 py-1 text-xs font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", n ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
|
|
385
|
-
children: t.label
|
|
386
|
-
}, t.id);
|
|
387
|
-
})
|
|
388
|
-
}) : null,
|
|
389
|
-
/* @__PURE__ */ u("div", {
|
|
390
|
-
ref: U,
|
|
391
|
-
className: "min-h-0 flex-1 space-y-3 overflow-y-auto px-4 py-4",
|
|
392
|
-
"data-testid": "assistant-widget-messages",
|
|
393
|
-
children: D.length === 0 && Ne ? /* @__PURE__ */ d("div", {
|
|
394
|
-
"data-testid": "assistant-widget-restoring",
|
|
395
|
-
className: "flex h-full flex-col items-center justify-center gap-3 text-center",
|
|
396
|
-
children: [/* @__PURE__ */ u(c, { className: "size-5 animate-spin text-text-secondary" }), /* @__PURE__ */ u("p", {
|
|
397
|
-
className: "text-xs leading-relaxed text-text-secondary",
|
|
398
|
-
children: "Restoring your conversation…"
|
|
399
|
-
})]
|
|
400
|
-
}) : D.length === 0 ? /* @__PURE__ */ d("div", {
|
|
401
|
-
className: "flex h-full flex-col items-center justify-center gap-3 text-center",
|
|
402
|
-
children: [/* @__PURE__ */ u("span", {
|
|
403
|
-
className: "inline-flex size-12 items-center justify-center rounded-full bg-bg-sunken text-action-primary-bg",
|
|
404
|
-
children: /* @__PURE__ */ u(ie, { className: "size-6" })
|
|
405
|
-
}), /* @__PURE__ */ u("p", {
|
|
406
|
-
className: "max-w-[16rem] text-xs leading-relaxed text-text-secondary",
|
|
407
|
-
children: je
|
|
363
|
+
onClick: Y,
|
|
364
|
+
"aria-label": "Close AI assistant",
|
|
365
|
+
"data-testid": "assistant-widget-close",
|
|
366
|
+
className: "inline-flex size-8 shrink-0 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
|
|
367
|
+
children: /* @__PURE__ */ u(l, { className: "size-4" })
|
|
408
368
|
})]
|
|
409
|
-
})
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
369
|
+
}),
|
|
370
|
+
b.length > 1 ? /* @__PURE__ */ u("div", {
|
|
371
|
+
role: "tablist",
|
|
372
|
+
"aria-label": "Assistant mode",
|
|
373
|
+
"data-testid": "assistant-mode-switcher",
|
|
374
|
+
className: "flex shrink-0 items-center gap-1 border-b border-border-subtle bg-bg-surface px-3 py-2",
|
|
375
|
+
children: b.map((t) => {
|
|
376
|
+
let n = t.id === x;
|
|
377
|
+
return /* @__PURE__ */ u("button", {
|
|
378
|
+
type: "button",
|
|
379
|
+
role: "tab",
|
|
380
|
+
"aria-selected": n,
|
|
381
|
+
tabIndex: n ? 0 : -1,
|
|
382
|
+
onClick: () => ke(t.id),
|
|
383
|
+
disabled: N,
|
|
384
|
+
title: N ? "Finish the current turn before switching" : t.label,
|
|
385
|
+
"data-testid": `assistant-mode-${t.id}`,
|
|
386
|
+
className: e("rounded-md px-2.5 py-1 text-xs font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", n ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
|
|
387
|
+
children: t.label
|
|
388
|
+
}, t.id);
|
|
422
389
|
})
|
|
423
|
-
},
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
title: `Download ${e.name}${e.size ? ` (${ve(e.size)})` : ""}`,
|
|
435
|
-
"data-testid": "assistant-widget-artifact",
|
|
436
|
-
className: "inline-flex max-w-full items-center gap-1.5 rounded-md border border-border-default bg-bg-surface px-2 py-1 text-[11px] font-medium text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:opacity-50 cursor-pointer",
|
|
437
|
-
children: [t ? /* @__PURE__ */ u(c, { className: "size-3.5 shrink-0 animate-spin" }) : e.type === "directory" ? /* @__PURE__ */ u(te, { className: "size-3.5 shrink-0 text-action-primary-bg" }) : /* @__PURE__ */ u(ee, { className: "size-3.5 shrink-0 text-action-primary-bg" }), /* @__PURE__ */ u("span", {
|
|
438
|
-
className: "truncate",
|
|
439
|
-
children: e.name
|
|
390
|
+
}) : null,
|
|
391
|
+
/* @__PURE__ */ u("div", {
|
|
392
|
+
ref: W,
|
|
393
|
+
className: "min-h-0 flex-1 space-y-3 overflow-y-auto px-4 py-4",
|
|
394
|
+
"data-testid": "assistant-widget-messages",
|
|
395
|
+
children: D.length === 0 && Ne ? /* @__PURE__ */ d("div", {
|
|
396
|
+
"data-testid": "assistant-widget-restoring",
|
|
397
|
+
className: "flex h-full flex-col items-center justify-center gap-3 text-center",
|
|
398
|
+
children: [/* @__PURE__ */ u(c, { className: "size-5 animate-spin text-text-secondary" }), /* @__PURE__ */ u("p", {
|
|
399
|
+
className: "text-xs leading-relaxed text-text-secondary",
|
|
400
|
+
children: "Restoring your conversation…"
|
|
440
401
|
})]
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
402
|
+
}) : D.length === 0 ? /* @__PURE__ */ d("div", {
|
|
403
|
+
className: "flex h-full flex-col items-center justify-center gap-3 text-center",
|
|
404
|
+
children: [/* @__PURE__ */ u("span", {
|
|
405
|
+
className: "inline-flex size-12 items-center justify-center rounded-full bg-bg-sunken text-action-primary-bg",
|
|
406
|
+
children: /* @__PURE__ */ u(ie, { className: "size-6" })
|
|
407
|
+
}), /* @__PURE__ */ u("p", {
|
|
408
|
+
className: "max-w-[16rem] text-xs leading-relaxed text-text-secondary",
|
|
409
|
+
children: je
|
|
410
|
+
})]
|
|
411
|
+
}) : D.map((t) => /* @__PURE__ */ u("div", {
|
|
412
|
+
className: e("flex", t.role === "user" ? "justify-end" : "justify-start"),
|
|
413
|
+
children: /* @__PURE__ */ d("div", {
|
|
414
|
+
"data-testid": `assistant-widget-message-${t.role}`,
|
|
415
|
+
className: e("whitespace-pre-wrap break-words rounded-lg px-3 py-2 text-xs leading-relaxed", q ? "max-w-[92%]" : "max-w-[85%]", t.role === "user" ? "bg-action-primary-bg text-action-primary-text" : t.error ? "bg-status-error-bg/10 text-status-error-bg" : "bg-bg-sunken text-text-primary"),
|
|
416
|
+
children: [t.content ? /* @__PURE__ */ u(n, {
|
|
417
|
+
content: t.content,
|
|
418
|
+
onNavigate: we
|
|
419
|
+
}) : null, t.pending ? /* @__PURE__ */ d("span", {
|
|
420
|
+
"data-testid": "assistant-widget-working",
|
|
421
|
+
className: e("inline-flex items-center gap-1 text-text-secondary", t.content ? "mt-1" : ""),
|
|
422
|
+
children: [/* @__PURE__ */ u(c, { className: "size-3 animate-spin" }), t.content ? null : /* @__PURE__ */ u("span", { children: "Working on it…" })]
|
|
423
|
+
}) : null]
|
|
424
|
+
})
|
|
425
|
+
}, t.id))
|
|
426
|
+
}),
|
|
427
|
+
C.downloadArtifact && Re.length > 0 ? /* @__PURE__ */ u("div", {
|
|
428
|
+
"data-testid": "assistant-widget-artifacts",
|
|
429
|
+
className: "flex shrink-0 flex-wrap gap-1.5 border-t border-border-subtle bg-bg-sunken px-3 py-2",
|
|
430
|
+
children: Re.map((e) => {
|
|
431
|
+
let t = V === e.path;
|
|
432
|
+
return /* @__PURE__ */ d("button", {
|
|
433
|
+
type: "button",
|
|
434
|
+
onClick: () => void Ke(e),
|
|
435
|
+
disabled: !!V,
|
|
436
|
+
title: `Download ${e.name}${e.size ? ` (${ve(e.size)})` : ""}`,
|
|
437
|
+
"data-testid": "assistant-widget-artifact",
|
|
438
|
+
className: "inline-flex max-w-full items-center gap-1.5 rounded-md border border-border-default bg-bg-surface px-2 py-1 text-[11px] font-medium text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:opacity-50 cursor-pointer",
|
|
439
|
+
children: [t ? /* @__PURE__ */ u(c, { className: "size-3.5 shrink-0 animate-spin" }) : e.type === "directory" ? /* @__PURE__ */ u(te, { className: "size-3.5 shrink-0 text-action-primary-bg" }) : /* @__PURE__ */ u(ee, { className: "size-3.5 shrink-0 text-action-primary-bg" }), /* @__PURE__ */ u("span", {
|
|
440
|
+
className: "truncate",
|
|
441
|
+
children: e.name
|
|
442
|
+
})]
|
|
443
|
+
}, e.path);
|
|
444
|
+
})
|
|
445
|
+
}) : null,
|
|
446
|
+
y && j.length > 0 ? /* @__PURE__ */ u("div", {
|
|
447
|
+
className: "flex flex-wrap gap-1.5 border-t border-border-default bg-bg-surface px-3 pt-2",
|
|
448
|
+
children: j.map((e, t) => /* @__PURE__ */ d("span", {
|
|
449
|
+
"data-testid": "assistant-widget-attachment",
|
|
450
|
+
className: "flex items-center gap-1 rounded-md bg-bg-sunken px-2 py-1 text-[11px] text-text-secondary",
|
|
451
|
+
children: [
|
|
452
|
+
/* @__PURE__ */ u(ce, { className: "size-3" }),
|
|
453
|
+
/* @__PURE__ */ u("span", {
|
|
454
|
+
className: "max-w-[140px] truncate",
|
|
455
|
+
children: e.name
|
|
456
|
+
}),
|
|
457
|
+
/* @__PURE__ */ u("button", {
|
|
458
|
+
type: "button",
|
|
459
|
+
onClick: () => M((e) => e.filter((e, n) => n !== t)),
|
|
460
|
+
"aria-label": `Remove ${e.name}`,
|
|
461
|
+
className: "text-text-muted hover:text-text-primary cursor-pointer",
|
|
462
|
+
children: /* @__PURE__ */ u(l, { className: "size-3" })
|
|
463
|
+
})
|
|
464
|
+
]
|
|
465
|
+
}, `${e.name}-${t}`))
|
|
466
|
+
}) : null,
|
|
467
|
+
/* @__PURE__ */ d("div", {
|
|
468
|
+
className: e("flex shrink-0 items-end gap-2 bg-bg-surface px-3 py-2.5", y && j.length > 0 ? "" : "border-t border-border-default"),
|
|
449
469
|
children: [
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
470
|
+
y ? /* @__PURE__ */ d(pe, { children: [/* @__PURE__ */ u("input", {
|
|
471
|
+
ref: Ve,
|
|
472
|
+
type: "file",
|
|
473
|
+
accept: Ee,
|
|
474
|
+
multiple: !0,
|
|
475
|
+
className: "hidden",
|
|
476
|
+
onChange: (e) => {
|
|
477
|
+
let t = Array.from(e.target.files ?? []);
|
|
478
|
+
t.length > 0 && M((e) => [...e, ...t]), e.target.value = "";
|
|
479
|
+
}
|
|
480
|
+
}), /* @__PURE__ */ u("button", {
|
|
481
|
+
type: "button",
|
|
482
|
+
onClick: () => Ve.current?.click(),
|
|
483
|
+
"aria-label": "Attach a data file",
|
|
484
|
+
"data-testid": "assistant-widget-upload",
|
|
485
|
+
className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary transition-colors hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
|
|
486
|
+
children: /* @__PURE__ */ u(ce, { className: "size-4" })
|
|
487
|
+
})] }) : null,
|
|
488
|
+
De ? /* @__PURE__ */ u("button", {
|
|
489
|
+
type: "button",
|
|
490
|
+
onClick: () => H(!0),
|
|
491
|
+
"aria-label": "Connect a data source",
|
|
492
|
+
title: "Connect a source (REST API / connection)",
|
|
493
|
+
"data-testid": "assistant-widget-connect-source",
|
|
494
|
+
className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary transition-colors hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
|
|
495
|
+
children: /* @__PURE__ */ u(re, { className: "size-4" })
|
|
496
|
+
}) : null,
|
|
497
|
+
J.isSupported ? /* @__PURE__ */ u("button", {
|
|
498
|
+
type: "button",
|
|
499
|
+
onClick: et,
|
|
500
|
+
"aria-label": J.isListening ? "Stop voice input" : "Start voice input",
|
|
501
|
+
"aria-pressed": J.isListening,
|
|
502
|
+
"data-testid": "assistant-widget-mic",
|
|
503
|
+
className: e("flex size-9 shrink-0 items-center justify-center rounded-lg transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer", J.isListening ? "animate-pulse bg-status-error-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
|
|
504
|
+
children: /* @__PURE__ */ u(ae, { className: "size-4" })
|
|
505
|
+
}) : null,
|
|
506
|
+
/* @__PURE__ */ u("textarea", {
|
|
507
|
+
ref: U,
|
|
508
|
+
value: k,
|
|
509
|
+
onChange: (e) => A(e.target.value),
|
|
510
|
+
onKeyDown: Qe,
|
|
511
|
+
onInput: $e,
|
|
512
|
+
rows: 1,
|
|
513
|
+
placeholder: Me,
|
|
514
|
+
"aria-label": "Message the assistant",
|
|
515
|
+
"data-testid": "assistant-widget-input",
|
|
516
|
+
className: "flex-1 resize-none rounded-lg border border-border-default bg-bg-sunken px-3 py-2 text-xs leading-relaxed text-text-primary placeholder:text-text-muted focus:border-action-primary-bg focus:outline-none"
|
|
454
517
|
}),
|
|
455
518
|
/* @__PURE__ */ u("button", {
|
|
456
519
|
type: "button",
|
|
457
|
-
onClick: () =>
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
520
|
+
onClick: () => void Ze(),
|
|
521
|
+
disabled: N || k.trim().length === 0 && j.length === 0,
|
|
522
|
+
"aria-label": "Send message",
|
|
523
|
+
"data-testid": "assistant-widget-send",
|
|
524
|
+
className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg text-action-primary-text transition-colors hover:bg-action-primary-bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:opacity-50 cursor-pointer",
|
|
525
|
+
children: N ? /* @__PURE__ */ u(c, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(ue, { className: "size-4" })
|
|
461
526
|
})
|
|
462
527
|
]
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
"data-testid": "assistant-widget-mic",
|
|
501
|
-
className: e("flex size-9 shrink-0 items-center justify-center rounded-lg transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer", q.isListening ? "animate-pulse bg-status-error-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
|
|
502
|
-
children: /* @__PURE__ */ u(ae, { className: "size-4" })
|
|
503
|
-
}) : null,
|
|
504
|
-
/* @__PURE__ */ u("textarea", {
|
|
505
|
-
ref: H,
|
|
506
|
-
value: k,
|
|
507
|
-
onChange: (e) => A(e.target.value),
|
|
508
|
-
onKeyDown: Xe,
|
|
509
|
-
onInput: Ze,
|
|
510
|
-
rows: 1,
|
|
511
|
-
placeholder: Me,
|
|
512
|
-
"aria-label": "Message the assistant",
|
|
513
|
-
"data-testid": "assistant-widget-input",
|
|
514
|
-
className: "flex-1 resize-none rounded-lg border border-border-default bg-bg-sunken px-3 py-2 text-xs leading-relaxed text-text-primary placeholder:text-text-muted focus:border-action-primary-bg focus:outline-none"
|
|
515
|
-
}),
|
|
516
|
-
/* @__PURE__ */ u("button", {
|
|
517
|
-
type: "button",
|
|
518
|
-
onClick: () => void $(),
|
|
519
|
-
disabled: N || k.trim().length === 0 && j.length === 0,
|
|
520
|
-
"aria-label": "Send message",
|
|
521
|
-
"data-testid": "assistant-widget-send",
|
|
522
|
-
className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg text-action-primary-text transition-colors hover:bg-action-primary-bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:opacity-50 cursor-pointer",
|
|
523
|
-
children: N ? /* @__PURE__ */ u(c, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(ue, { className: "size-4" })
|
|
524
|
-
})
|
|
525
|
-
]
|
|
526
|
-
})
|
|
527
|
-
]
|
|
528
|
-
})]
|
|
529
|
-
}) : null] }) : null;
|
|
528
|
+
})
|
|
529
|
+
]
|
|
530
|
+
})]
|
|
531
|
+
}) : null,
|
|
532
|
+
Be ? /* @__PURE__ */ u("div", {
|
|
533
|
+
role: "dialog",
|
|
534
|
+
"aria-modal": "true",
|
|
535
|
+
"aria-label": "Connect a source",
|
|
536
|
+
"data-testid": "assistant-connect-source-modal",
|
|
537
|
+
className: "fixed inset-0 z-[110] flex items-center justify-center bg-black/50 p-4 animate-in fade-in duration-150",
|
|
538
|
+
onClick: () => H(!1),
|
|
539
|
+
children: /* @__PURE__ */ d("div", {
|
|
540
|
+
className: "flex h-[80vh] max-h-[720px] w-full max-w-4xl flex-col overflow-hidden rounded-xl border border-border-default bg-bg-surface shadow-2xl animate-in zoom-in-95 duration-150",
|
|
541
|
+
onClick: (e) => e.stopPropagation(),
|
|
542
|
+
children: [/* @__PURE__ */ d("div", {
|
|
543
|
+
className: "flex shrink-0 items-center justify-between border-b border-border-subtle px-4 py-3",
|
|
544
|
+
children: [/* @__PURE__ */ d("div", {
|
|
545
|
+
className: "flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
546
|
+
children: [/* @__PURE__ */ u(re, { className: "size-4 shrink-0" }), "Connect a source"]
|
|
547
|
+
}), /* @__PURE__ */ u("button", {
|
|
548
|
+
type: "button",
|
|
549
|
+
onClick: () => H(!1),
|
|
550
|
+
"aria-label": "Close",
|
|
551
|
+
title: "Close",
|
|
552
|
+
"data-testid": "assistant-connect-source-close",
|
|
553
|
+
className: "flex size-8 items-center justify-center rounded-lg text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
|
|
554
|
+
children: /* @__PURE__ */ u(l, { className: "size-4" })
|
|
555
|
+
})]
|
|
556
|
+
}), /* @__PURE__ */ u("iframe", {
|
|
557
|
+
src: Oe,
|
|
558
|
+
title: "Connected Systems",
|
|
559
|
+
"data-testid": "assistant-connect-source-frame",
|
|
560
|
+
className: "min-h-0 w-full flex-1 border-0 bg-bg-surface"
|
|
561
|
+
})]
|
|
562
|
+
})
|
|
563
|
+
}) : null
|
|
564
|
+
] }) : null;
|
|
530
565
|
};
|
|
531
566
|
//#endregion
|
|
532
567
|
export { f as ASSISTANT_WIDGET_TOGGLE_EVENT, ye as AssistantWidget };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ACTIVE_CONTEXT_URL_PARAMS as e } from "../../providers/shell/ActiveContextStorage.js";
|
|
2
2
|
import { useActiveContext as t } from "../../providers/shell/ActiveContextProvider.js";
|
|
3
|
-
import { useParams as n, useSearchParams as r } from "react-router
|
|
3
|
+
import { useParams as n, useSearchParams as r } from "react-router";
|
|
4
4
|
//#region src/shared/hooks/shell/useEffectiveContext.ts
|
|
5
5
|
var i = e;
|
|
6
6
|
function a(e, t, n) {
|
|
@@ -3,7 +3,7 @@ import { useAppShell as t } from "../providers/shell/AppShellContext.js";
|
|
|
3
3
|
import { useAuth as n } from "../providers/shell/AuthProvider.js";
|
|
4
4
|
import { useActiveContext as r } from "../providers/shell/ActiveContextProvider.js";
|
|
5
5
|
import { useEffect as i, useMemo as a, useRef as o } from "react";
|
|
6
|
-
import { useLocation as s } from "react-router
|
|
6
|
+
import { useLocation as s } from "react-router";
|
|
7
7
|
//#region src/shared/hooks/useReferralAttribution.ts
|
|
8
8
|
var c = "boff-referral-attribution", l = [
|
|
9
9
|
"ref",
|
|
@@ -5,7 +5,7 @@ import { useEffect as n, useState as r } from "react";
|
|
|
5
5
|
import { ArrowLeft as i, Clock as a, FileText as o, Shield as s } from "lucide-react";
|
|
6
6
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
7
|
import { gql as u } from "@apollo/client";
|
|
8
|
-
import { Link as d, useParams as f } from "react-router
|
|
8
|
+
import { Link as d, useParams as f } from "react-router";
|
|
9
9
|
//#region src/shared/pages/LegalPage.tsx
|
|
10
10
|
var p = u`
|
|
11
11
|
query GetResolvedContentPage($slug: String!, $productId: String!) {
|
|
@@ -13,7 +13,7 @@ import { SearchPagination as le } from "./searchPage/SearchPagination.js";
|
|
|
13
13
|
import { useCallback as ue, useEffect as de, useMemo as c, useState as l } from "react";
|
|
14
14
|
import { FileText as fe } from "lucide-react";
|
|
15
15
|
import { jsx as u, jsxs as pe } from "react/jsx-runtime";
|
|
16
|
-
import { useSearchParams as me } from "react-router
|
|
16
|
+
import { useSearchParams as me } from "react-router";
|
|
17
17
|
//#region src/shared/pages/SearchPage.tsx
|
|
18
18
|
function d({ entityTypeOptions: d = a, entityTypeIcons: he = i, productOptions: ge = ee, defaultProductSources: _e = [], placeholder: ve = "Search for documents, tags, projects, tasks...", subtitle: ye = "Search across all entities in your workspace", supplementalSearch: f } = {}) {
|
|
19
19
|
let be = t(), [p, xe] = me(), { workspaceId: Se } = e(), { searchFull: Ce, isSearching: we } = n(), Te = p.get("q") || "", Ee = p.get("mode") || "FULLTEXT", De = p.get("sortBy") || "SCORE_DESC", Oe = s(p.get("types") || ""), ke = s(p.get("excludeTypes") || ""), Ae = s(p.get("products") || ""), je = p.get("createdBy") || "", Me = p.get("updatedBy") || "", Ne = p.get("projectId") || "", Pe = p.get("from") || "", Fe = p.get("to") || "", Ie = p.get("updatedFrom") || "", Le = p.get("updatedTo") || "", Re = s(p.get("excludeIds") || ""), m = ne(p.get("tagFilter"), {}), ze = te(ne(p.get("metadataConditions"), [])), Be = parseInt(p.get("page") || "1", 10), [h, Ve] = l(Te), [g, He] = l(Ee), [_, Ue] = l(De), [v, We] = l(Oe), [y, Ge] = l(ke), [b, Ke] = l(Ae.length > 0 ? Ae : _e), [x, qe] = l(je), [S, Je] = l(Me), [C, Ye] = l(Ne), [w, Xe] = l(Pe), [T, E] = l(Fe), [D, O] = l(Ie), [k, Ze] = l(Le), [A, j] = l(Re.join(", ")), [M, N] = l((m.tagIds ?? []).join(", ")), [P, F] = l((m.tagKeys ?? []).join(", ")), [I, L] = l((m.hierarchyPaths ?? []).join(", ")), [R, z] = l((m.vocabularyKeys ?? []).join(", ")), [B, V] = l(m.matchAll ?? !1), [H, U] = l(m.includeDescendants ?? !0), [W, G] = l(m.depth === void 0 ? "" : String(m.depth)), [K, q] = l(ze), [J, Y] = l(Be), [Qe, $e] = l([]), [et, tt] = l(0), [nt, rt] = l(!1), [it, at] = l(0), [ot, st] = l(), [ct, X] = l(null), [lt, ut] = l(!1), [dt, ft] = l(Te), pt = ue((e) => {
|
|
@@ -34,7 +34,7 @@ import { ToursProvider as F, useToursContext as I } from "../tours/ToursContext.
|
|
|
34
34
|
import { TourInitializer as L } from "../tours/TourInitializer.js";
|
|
35
35
|
import { Suspense as R, useCallback as z, useEffect as B, useMemo as V, useRef as H } from "react";
|
|
36
36
|
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
37
|
-
import { BrowserRouter as le, useLocation as K } from "react-router
|
|
37
|
+
import { BrowserRouter as le, useLocation as K } from "react-router";
|
|
38
38
|
import { Toaster as q, toast as J } from "sonner";
|
|
39
39
|
import { MutationCache as ue, QueryCache as de, QueryClient as fe, QueryClientProvider as pe } from "@tanstack/react-query";
|
|
40
40
|
//#region src/shared/providers/AppShellProvider.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageConversationContextProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/PageConversationContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PageConversationContextProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/PageConversationContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,oCAAoC;IACnD,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,CACf,QAAQ,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,KACrC,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;CAC1D;AAqBD,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,EACR,OAAO,EACP,cAAc,GACf,EAAE,oCAAoC,2CAgEtC;AAED,wBAAgB,0BAA0B,IAAI,uBAAuB,CAQpE;AAED,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI,GAAG,SAAS,GACzD,IAAI,CAcN"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext as e, use as t, useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { useLocation as s } from "react-router
|
|
3
|
+
import { useLocation as s } from "react-router";
|
|
4
4
|
//#region src/shared/providers/shell/PageConversationContextProvider.tsx
|
|
5
5
|
var c = e(null);
|
|
6
6
|
function l(e) {
|
|
@@ -8,7 +8,7 @@ import { MobileTourSheet as l } from "./tourTrigger/MobileTourSheet.js";
|
|
|
8
8
|
import { DesktopTourDropdown as u } from "./tourTrigger/DesktopTourDropdown.js";
|
|
9
9
|
import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
10
10
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
|
-
import { useInRouterContext as v, useLocation as y, useNavigate as b } from "react-router
|
|
11
|
+
import { useInRouterContext as v, useLocation as y, useNavigate as b } from "react-router";
|
|
12
12
|
//#region src/shared/tours/TourTrigger.tsx
|
|
13
13
|
var x = 5e3, S = 100, C = 150;
|
|
14
14
|
function w(e, t) {
|
|
@@ -14,7 +14,7 @@ import { useIdleReady as ee } from "./toursContext/useIdleReady.js";
|
|
|
14
14
|
import { useTourMutations as te } from "./toursContext/useTourMutations.js";
|
|
15
15
|
import { createContext as f, use as p, useCallback as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
16
16
|
import { jsx as ne } from "react/jsx-runtime";
|
|
17
|
-
import { useLocation as y } from "react-router
|
|
17
|
+
import { useLocation as y } from "react-router";
|
|
18
18
|
//#region src/shared/tours/ToursContext.tsx
|
|
19
19
|
var b = f(null);
|
|
20
20
|
function x({ children: f, defaultPageId: p = "home", getPageIdFromPath: x, disabled: S = !1 }) {
|
|
@@ -4,7 +4,7 @@ import { useNavRegistryStore as n } from "../hooks/shell/useNavRegistry.js";
|
|
|
4
4
|
import { useFooterRegistryStore as r } from "../hooks/shell/useFooterRegistry.js";
|
|
5
5
|
import { useCallback as i, useEffect as a, useTransition as o } from "react";
|
|
6
6
|
import { Fragment as s, jsx as c } from "react/jsx-runtime";
|
|
7
|
-
import { useNavigate as l } from "react-router
|
|
7
|
+
import { useNavigate as l } from "react-router";
|
|
8
8
|
//#region src/shared/utils/appHelpers.tsx
|
|
9
9
|
function u({ user: n, authToken: r, workspaceId: i, tenantId: o, projectId: l, children: u }) {
|
|
10
10
|
let { login: d, isAuthenticated: f } = e(), { setWorkspace: p, setTenant: m, setProject: h } = t();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/fe-libs",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.801.1",
|
|
4
4
|
"description": "Burdenoff frontend primitives and domain libraries",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -340,6 +340,7 @@
|
|
|
340
340
|
"lefthook": "^2.1.1",
|
|
341
341
|
"postcss": "8.5.12",
|
|
342
342
|
"prettier": "^3.4.2",
|
|
343
|
+
"react-router": "^8.3.0",
|
|
343
344
|
"tailwindcss": "^4.0.0",
|
|
344
345
|
"tw-animate-css": "^1.4.0",
|
|
345
346
|
"typescript": "^5.9.0",
|
|
@@ -356,7 +357,7 @@
|
|
|
356
357
|
"graphql": "^16.12.0",
|
|
357
358
|
"react": "^19.0.0",
|
|
358
359
|
"react-dom": "^19.0.0",
|
|
359
|
-
"react-router
|
|
360
|
+
"react-router": "^8.3.0",
|
|
360
361
|
"zustand": "^5.0.5",
|
|
361
362
|
"framer-motion": "^12.0.0"
|
|
362
363
|
},
|
package/src/vite/mfe.config.ts
CHANGED
|
@@ -139,7 +139,7 @@ export function createMicrofrontendConfig(
|
|
|
139
139
|
...additionalAliases,
|
|
140
140
|
},
|
|
141
141
|
// Ensure consistent dependency resolution
|
|
142
|
-
dedupe: ['react', 'react-dom', 'react-router
|
|
142
|
+
dedupe: ['react', 'react-dom', 'react-router', '@apollo/client', 'graphql', 'zustand'],
|
|
143
143
|
},
|
|
144
144
|
|
|
145
145
|
// Vite 8 uses Oxc for transforms instead of esbuild
|
|
@@ -154,7 +154,7 @@ export function createMicrofrontendConfig(
|
|
|
154
154
|
include: [
|
|
155
155
|
'react',
|
|
156
156
|
'react-dom',
|
|
157
|
-
'react-router
|
|
157
|
+
'react-router',
|
|
158
158
|
'@apollo/client',
|
|
159
159
|
'graphql',
|
|
160
160
|
'lucide-react',
|
package/src/vite/shell.config.ts
CHANGED
|
@@ -91,7 +91,7 @@ export function createAppShellConfig(config: AppShellConfig, configPath: string)
|
|
|
91
91
|
|
|
92
92
|
// Default manual chunks for optimal caching
|
|
93
93
|
const defaultManualChunks: Record<string, string[]> = {
|
|
94
|
-
'vendor-react': ['react', 'react-dom', 'react-router
|
|
94
|
+
'vendor-react': ['react', 'react-dom', 'react-router'],
|
|
95
95
|
'vendor-apollo': ['@apollo/client', 'graphql'],
|
|
96
96
|
'vendor-ui': ['lucide-react', 'zustand'],
|
|
97
97
|
...manualChunks,
|
|
@@ -172,7 +172,7 @@ export function createAppShellConfig(config: AppShellConfig, configPath: string)
|
|
|
172
172
|
dedupe: [
|
|
173
173
|
'react',
|
|
174
174
|
'react-dom',
|
|
175
|
-
'react-router
|
|
175
|
+
'react-router',
|
|
176
176
|
'@apollo/client',
|
|
177
177
|
'graphql',
|
|
178
178
|
'zustand',
|
|
@@ -199,7 +199,7 @@ export function createAppShellConfig(config: AppShellConfig, configPath: string)
|
|
|
199
199
|
'react-dom/client',
|
|
200
200
|
'react/jsx-runtime',
|
|
201
201
|
'react/jsx-dev-runtime',
|
|
202
|
-
'react-router
|
|
202
|
+
'react-router',
|
|
203
203
|
'react-error-boundary',
|
|
204
204
|
'@apollo/client',
|
|
205
205
|
'@apollo/client/react',
|