@mcp-use/inspector 20.0.0-beta.14 → 20.0.0-beta.15
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/cdn/inspector.js +76858 -9272
- package/dist/cli.js +1 -1
- package/dist/server/cdn-shell.js +2 -2
- package/dist/server/{chunk-3XD7J5NX.js → chunk-WNQGHIZ3.js} +1 -1
- package/dist/server/{chunk-DLHO3Q42.js → chunk-XKCUJ6ZJ.js} +1 -1
- package/dist/server/{chunk-N3VXWLT6.js → chunk-ZPGABKXL.js} +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/middleware.js +3 -3
- package/dist/server/version.js +1 -1
- package/dist/web/assets/index-Bqfsh_Rp.js +643 -0
- package/dist/web/index.html +2 -10
- package/package.json +1 -1
- package/dist/cdn/AnimatePresence-D1bZ5_-l.js +0 -394
- package/dist/cdn/ChatTab-D_2TXR3X.js +0 -6811
- package/dist/cdn/CheckboxIndicator-BjF73mGX.js +0 -252
- package/dist/cdn/ConnectionSettingsForm-BqH0PcZF.js +0 -929
- package/dist/cdn/ConnectionSettingsTab-Duhb1uQP.js +0 -151
- package/dist/cdn/ElicitationTab-PEmEDvC5.js +0 -655
- package/dist/cdn/FormContext-NtUiZclE.js +0 -135
- package/dist/cdn/InspectorContext-BBKCdfmK.js +0 -123
- package/dist/cdn/JSONDisplay-BJqMz7Ny.js +0 -324
- package/dist/cdn/ListTabHeader-DzmTtN1e.js +0 -89
- package/dist/cdn/MCPAppsDebugControls-w5NRWhlZ.js +0 -2174
- package/dist/cdn/ManufactOAuthCallback-ChbbjFIT.js +0 -31
- package/dist/cdn/MarkdownRenderer-BIsUE0bf.js +0 -3610
- package/dist/cdn/McpAppsViewPanel-B3_76u7O.js +0 -56
- package/dist/cdn/NotificationsTab-B7uebqMV.js +0 -290
- package/dist/cdn/OAuthCallback-CtLoXa3h.js +0 -58
- package/dist/cdn/PromptsTab-DpE0XLzk.js +0 -902
- package/dist/cdn/ResourcesTab-DQS24z5p.js +0 -566
- package/dist/cdn/SamplingTab-ZDeu0CjJ.js +0 -659
- package/dist/cdn/ServerMetadataTab-BM3VhSLf.js +0 -244
- package/dist/cdn/StatusIcon-Q3n3YRtE.js +0 -65
- package/dist/cdn/ToolsTab-LtviZSWA.js +0 -2045
- package/dist/cdn/ViewPreview-BwC_tbF_.js +0 -238
- package/dist/cdn/WidgetDebugContext-B6yoOVVV.js +0 -314
- package/dist/cdn/WidgetWrapper-BlbQAh_X.js +0 -12
- package/dist/cdn/basePath-B8HuhIMu.js +0 -25
- package/dist/cdn/bell-GrTZcnD2.js +0 -10
- package/dist/cdn/browser-DG2Z8392.js +0 -42
- package/dist/cdn/brush-CelVvMGp.js +0 -17
- package/dist/cdn/button-CB4uOoUV.js +0 -2509
- package/dist/cdn/card-BA-DQk-G.js +0 -41
- package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
- package/dist/cdn/checkbox-kwVa4gRX.js +0 -20
- package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
- package/dist/cdn/clock-YMF8Gtw5.js +0 -12
- package/dist/cdn/code-C8sN2OGR.js +0 -10
- package/dist/cdn/createLucideIcon-BONxC1L5.js +0 -213
- package/dist/cdn/dialog-CJGnC5Ag.js +0 -1028
- package/dist/cdn/dist-CHKts0NS.js +0 -2307
- package/dist/cdn/dist-CTJnCYmk.js +0 -616
- package/dist/cdn/external-link-Bo4lQxr1.js +0 -17
- package/dist/cdn/eye-pSGG7nvf.js +0 -29
- package/dist/cdn/folder-open-aM8CPtBO.js +0 -7
- package/dist/cdn/hash-DDs2vE1k.js +0 -33
- package/dist/cdn/history-BfUFpL1d.js +0 -17
- package/dist/cdn/index-browser-DO-sd0TA.js +0 -1853
- package/dist/cdn/info-BMkB68mB.js +0 -19
- package/dist/cdn/input-BCpgLXU1.js +0 -9654
- package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
- package/dist/cdn/label-A0UGV8FE.js +0 -60
- package/dist/cdn/loader-circle-BKRHJEB7.js +0 -7
- package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
- package/dist/cdn/maximize-2-DdrB_spi.js +0 -21
- package/dist/cdn/maximize-hSOCz133.js +0 -21
- package/dist/cdn/message-square-D3tKB3uJ.js +0 -7
- package/dist/cdn/not-found-BajFyZpp.js +0 -32
- package/dist/cdn/play-B1leulYf.js +0 -7
- package/dist/cdn/providerMeta-CjGU4rID.js +0 -436
- package/dist/cdn/react-BDA-xrgK.js +0 -5421
- package/dist/cdn/react-BIs9pQ3H.js +0 -926
- package/dist/cdn/refresh-cw-CyvXrS91.js +0 -21
- package/dist/cdn/save-CmdEPUAm.js +0 -34
- package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
- package/dist/cdn/select-CCFHjOGk.js +0 -2595
- package/dist/cdn/servers-Dd0Vcp81.js +0 -30
- package/dist/cdn/shared-CJVHJhag.js +0 -1700
- package/dist/cdn/sheet-oyq1mIyg.js +0 -2078
- package/dist/cdn/sparkles-CxeZpVtX.js +0 -23
- package/dist/cdn/spinner-Be1GlSGX.js +0 -15
- package/dist/cdn/square-check-big-C_4wbfwF.js +0 -10
- package/dist/cdn/switch-DHXEA_N5.js +0 -665
- package/dist/cdn/tabs-subtle-Dubd6Kj8.js +0 -788
- package/dist/cdn/telemetry-e4uEESP7.js +0 -208
- package/dist/cdn/textarea-CwmI8_uI.js +0 -14
- package/dist/cdn/trash-2-BhumJAFE.js +0 -25
- package/dist/cdn/useAriaLabelledBy-Cra6w3YY.js +0 -30
- package/dist/cdn/useCompositeItem-Dhnm-7el.js +0 -26
- package/dist/cdn/useConfig-Dw_6Ztzr.js +0 -235
- package/dist/cdn/useSavedRequests-mSIsDd4c.js +0 -51
- package/dist/cdn/useViewHostProps-BPApUBaM.js +0 -364
- package/dist/cdn/wrench-DvK20LUT.js +0 -7
- package/dist/cdn/x-EilKPiCX.js +0 -10
- package/dist/cdn/zap-0Wr9QO7N.js +0 -10
- package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +0 -9
- package/dist/web/assets/ChatTab-BhoU_ges.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-vJcr7uI3.js +0 -1
- package/dist/web/assets/ElicitationTab-4my-wtXf.js +0 -1
- package/dist/web/assets/FormContext-sV-yByKz.js +0 -1
- package/dist/web/assets/ListTabHeader-CrGae306.js +0 -1
- package/dist/web/assets/MCPAppsDebugControls-Cd4s9mr1.js +0 -34
- package/dist/web/assets/ManufactOAuthCallback-CCRWJhuT.js +0 -1
- package/dist/web/assets/MarkdownRenderer-BUDZYHqm.js +0 -47
- package/dist/web/assets/McpAppsViewPanel-Cil7Fdy4.js +0 -1
- package/dist/web/assets/NotificationsTab-Bl3O5PRb.js +0 -1
- package/dist/web/assets/OAuthCallback-CceVgo-9.js +0 -1
- package/dist/web/assets/PromptsTab-8lSxb8x-.js +0 -15
- package/dist/web/assets/ResourcesTab-DtGfgsPv.js +0 -2
- package/dist/web/assets/SamplingTab-XC-DTfOo.js +0 -1
- package/dist/web/assets/ServerMetadataTab-C5d_dI3_.js +0 -1
- package/dist/web/assets/ToolsTab-DuHPXItY.js +0 -8
- package/dist/web/assets/ViewPreview-DXswO9q8.js +0 -1
- package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +0 -1
- package/dist/web/assets/brush-DX0UZ_pI.js +0 -1
- package/dist/web/assets/button-C8Xa2k4x.js +0 -1
- package/dist/web/assets/checkbox-DAfdiGl1.js +0 -1
- package/dist/web/assets/code-B14rVdNt.js +0 -1
- package/dist/web/assets/createLucideIcon-BEHeJH0M.js +0 -1
- package/dist/web/assets/dist-C2Y1wkk6.js +0 -21
- package/dist/web/assets/index-tu5-QdSJ.js +0 -499
- package/dist/web/assets/input-C0OQCUZy.js +0 -1
- package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
- package/dist/web/assets/label-CI7JWQOo.js +0 -1
- package/dist/web/assets/maximize-2-Br1WQzT2.js +0 -1
- package/dist/web/assets/maximize-CJNgRe6S.js +0 -1
- package/dist/web/assets/react-CU_d2d5K.js +0 -1
- package/dist/web/assets/refresh-cw-B5iaAZKn.js +0 -1
- package/dist/web/assets/save-TM6fvNrt.js +0 -1
- package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
- package/dist/web/assets/select-D6jzbLJn.js +0 -1
- package/dist/web/assets/shared-c1Yr-wvV.js +0 -1
- package/dist/web/assets/sparkles-BGYTDThM.js +0 -1
- package/dist/web/assets/tabs-subtle-CHvFXVIA.js +0 -1
- package/dist/web/assets/textarea-CRTXuRmE.js +0 -1
- package/dist/web/assets/useConfig-9UVqLmR_.js +0 -1
- package/dist/web/assets/useViewHostProps-BBoPQYEl.js +0 -1
- package/dist/web/assets/zap-BDWHCVHU.js +0 -1
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./createLucideIcon-BONxC1L5.js";
|
|
2
|
-
import { U as t } from "./button-CB4uOoUV.js";
|
|
3
|
-
import { r as n } from "./react-BDA-xrgK.js";
|
|
4
|
-
import { t as r } from "./spinner-Be1GlSGX.js";
|
|
5
|
-
import { t as i } from "./useViewHostProps-BPApUBaM.js";
|
|
6
|
-
import { t as a } from "./WidgetWrapper-BlbQAh_X.js";
|
|
7
|
-
//#region src/client/components/mcp-apps/McpAppsViewPanel.tsx
|
|
8
|
-
var o = e();
|
|
9
|
-
function s({ serverId: e, viewId: s, toolName: c, resourceUri: l, toolInput: u, toolOutput: d, toolMetadata: f, readResource: p, customProps: m, displayMode: h, onDisplayModeChange: g, onSendFollowUp: _, onWidgetHeightChange: v, partialToolInput: y, cancelled: b, noWrapper: x = !1, className: S }) {
|
|
10
|
-
let C = i({
|
|
11
|
-
serverId: e,
|
|
12
|
-
viewId: s,
|
|
13
|
-
resourceUri: l,
|
|
14
|
-
toolName: c,
|
|
15
|
-
toolInput: u,
|
|
16
|
-
toolOutput: d,
|
|
17
|
-
toolMetadata: f,
|
|
18
|
-
readResource: p,
|
|
19
|
-
displayMode: h,
|
|
20
|
-
onDisplayModeChange: g
|
|
21
|
-
});
|
|
22
|
-
if (!C) {
|
|
23
|
-
let e = /* @__PURE__ */ (0, o.jsx)(r, { className: "size-5" });
|
|
24
|
-
return x ? /* @__PURE__ */ (0, o.jsx)("div", {
|
|
25
|
-
className: "flex h-full w-full min-h-0 flex-1 items-center justify-center",
|
|
26
|
-
children: e
|
|
27
|
-
}) : /* @__PURE__ */ (0, o.jsx)(a, {
|
|
28
|
-
className: "w-full h-full min-h-[240px]",
|
|
29
|
-
children: e
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
let w = t(h === "inline" ? "w-full h-full flex items-center justify-center relative p-4 min-h-0" : "w-full h-full relative p-4", S), T = m ? JSON.stringify(m) : "no-custom-props", E = /* @__PURE__ */ (0, o.jsx)(n, {
|
|
33
|
-
viewId: s,
|
|
34
|
-
toolName: c,
|
|
35
|
-
toolInput: u,
|
|
36
|
-
toolOutput: d,
|
|
37
|
-
customProps: m,
|
|
38
|
-
partialToolInput: y,
|
|
39
|
-
cancelled: b,
|
|
40
|
-
className: w,
|
|
41
|
-
onMessage: (e) => {
|
|
42
|
-
e.length > 0 && _ && _(e);
|
|
43
|
-
},
|
|
44
|
-
onInlineHeightChange: h === "inline" ? v : void 0,
|
|
45
|
-
...C
|
|
46
|
-
}, T);
|
|
47
|
-
return x ? /* @__PURE__ */ (0, o.jsx)("div", {
|
|
48
|
-
className: "flex h-full w-full min-h-0 flex-1 flex-col",
|
|
49
|
-
children: E
|
|
50
|
-
}) : /* @__PURE__ */ (0, o.jsx)(a, {
|
|
51
|
-
className: "w-full h-full min-h-[240px]",
|
|
52
|
-
children: E
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
|
-
export { s as t };
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { n } from "./createLucideIcon-BONxC1L5.js";
|
|
3
|
-
import { t as r } from "./button-CB4uOoUV.js";
|
|
4
|
-
import { t as i } from "./bell-GrTZcnD2.js";
|
|
5
|
-
import { t as a } from "./brush-CelVvMGp.js";
|
|
6
|
-
import { a as o, i as s, r as c, t as l } from "./browser-DG2Z8392.js";
|
|
7
|
-
import { t as u } from "./clock-YMF8Gtw5.js";
|
|
8
|
-
import { t as d } from "./code-C8sN2OGR.js";
|
|
9
|
-
import { a as f, t as p } from "./JSONDisplay-BJqMz7Ny.js";
|
|
10
|
-
import { a as m, i as h, n as g, o as _, r as v, t as y } from "./shared-CJVHJhag.js";
|
|
11
|
-
import { t as b } from "./maximize-hSOCz133.js";
|
|
12
|
-
import { t as x } from "./trash-2-BhumJAFE.js";
|
|
13
|
-
import { t as S } from "./x-EilKPiCX.js";
|
|
14
|
-
import { t as C } from "./not-found-BajFyZpp.js";
|
|
15
|
-
//#region src/client/components/notifications/NotificationsList.tsx
|
|
16
|
-
var w = /* @__PURE__ */ e(t(), 1), T = n();
|
|
17
|
-
function E({ notifications: e, selectedNotification: t, onNotificationSelect: n, focusedIndex: r, formatRelativeTime: i }) {
|
|
18
|
-
return e.length === 0 ? /* @__PURE__ */ (0, T.jsx)("div", {
|
|
19
|
-
className: "flex flex-1 flex-col items-center justify-center p-4 text-center",
|
|
20
|
-
children: /* @__PURE__ */ (0, T.jsx)(C, {
|
|
21
|
-
vertical: !0,
|
|
22
|
-
noBorder: !0,
|
|
23
|
-
message: "No notifications yet"
|
|
24
|
-
})
|
|
25
|
-
}) : /* @__PURE__ */ (0, T.jsx)("div", { children: e.map((e, a) => /* @__PURE__ */ (0, T.jsx)(v, {
|
|
26
|
-
id: `notification-${e.id}`,
|
|
27
|
-
isSelected: t?.id === e.id,
|
|
28
|
-
isFocused: r === a,
|
|
29
|
-
title: /* @__PURE__ */ (0, T.jsxs)("span", {
|
|
30
|
-
className: "flex items-center gap-3",
|
|
31
|
-
children: [e.method, !e.read && /* @__PURE__ */ (0, T.jsx)("span", { className: "size-1.5 block rounded-full bg-orange-500" })]
|
|
32
|
-
}),
|
|
33
|
-
description: (() => {
|
|
34
|
-
let t = i(e.timestamp), n = e.params && Object.keys(e.params).length > 0 ? Object.keys(e.params).length : 0;
|
|
35
|
-
return t + (n > 0 ? ` | ${n} param${n > 1 ? "s" : ""}` : "");
|
|
36
|
-
})(),
|
|
37
|
-
onClick: () => n(e)
|
|
38
|
-
}, e.id)) });
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/client/components/notifications/NotificationResultDisplay.tsx
|
|
42
|
-
function D({ notification: e, previewMode: t, onTogglePreview: n, onCopy: c, onDownload: l, onFullscreen: m, isCopied: h = !1, onClose: g }) {
|
|
43
|
-
return e ? /* @__PURE__ */ (0, T.jsxs)("div", {
|
|
44
|
-
className: "flex flex-col h-full",
|
|
45
|
-
children: [/* @__PURE__ */ (0, T.jsxs)("div", {
|
|
46
|
-
className: "flex-shrink-0 px-4 py-3 border-b border-gray-200 dark:border-zinc-700 flex items-center justify-between",
|
|
47
|
-
children: [/* @__PURE__ */ (0, T.jsxs)("div", {
|
|
48
|
-
className: "flex items-center gap-2",
|
|
49
|
-
children: [/* @__PURE__ */ (0, T.jsxs)("div", {
|
|
50
|
-
className: "flex items-center gap-1",
|
|
51
|
-
children: [/* @__PURE__ */ (0, T.jsx)(u, { className: "h-3 w-3 text-gray-400" }), /* @__PURE__ */ (0, T.jsx)("span", {
|
|
52
|
-
className: "text-xs text-gray-500 dark:text-gray-400",
|
|
53
|
-
children: new Date(e.timestamp).toLocaleTimeString()
|
|
54
|
-
})]
|
|
55
|
-
}), /* @__PURE__ */ (0, T.jsx)("span", {
|
|
56
|
-
className: "text-xs text-gray-500 dark:text-gray-400",
|
|
57
|
-
children: e.formatRelativeTime(e.timestamp)
|
|
58
|
-
})]
|
|
59
|
-
}), /* @__PURE__ */ (0, T.jsxs)("div", {
|
|
60
|
-
className: "flex items-center gap-1",
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ (0, T.jsxs)(r, {
|
|
63
|
-
variant: "ghost",
|
|
64
|
-
size: "sm",
|
|
65
|
-
onClick: n,
|
|
66
|
-
className: t ? "" : "text-purple-600 dark:text-purple-400",
|
|
67
|
-
children: [t ? /* @__PURE__ */ (0, T.jsx)(d, { className: "h-4 w-4 mr-1" }) : /* @__PURE__ */ (0, T.jsx)(a, { className: "h-4 w-4 mr-1" }), t ? "JSON" : "Formatted"]
|
|
68
|
-
}),
|
|
69
|
-
/* @__PURE__ */ (0, T.jsx)(r, {
|
|
70
|
-
variant: "ghost",
|
|
71
|
-
size: "sm",
|
|
72
|
-
onClick: c,
|
|
73
|
-
children: h ? /* @__PURE__ */ (0, T.jsx)(o, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, T.jsx)(s, { className: "h-4 w-4" })
|
|
74
|
-
}),
|
|
75
|
-
/* @__PURE__ */ (0, T.jsx)(r, {
|
|
76
|
-
variant: "ghost",
|
|
77
|
-
size: "sm",
|
|
78
|
-
onClick: l,
|
|
79
|
-
children: /* @__PURE__ */ (0, T.jsx)(f, { className: "h-4 w-4" })
|
|
80
|
-
}),
|
|
81
|
-
/* @__PURE__ */ (0, T.jsx)(r, {
|
|
82
|
-
variant: "ghost",
|
|
83
|
-
size: "sm",
|
|
84
|
-
onClick: m,
|
|
85
|
-
children: /* @__PURE__ */ (0, T.jsx)(b, { className: "h-4 w-4" })
|
|
86
|
-
}),
|
|
87
|
-
g && /* @__PURE__ */ (0, T.jsx)(r, {
|
|
88
|
-
variant: "ghost",
|
|
89
|
-
size: "sm",
|
|
90
|
-
onClick: g,
|
|
91
|
-
children: /* @__PURE__ */ (0, T.jsx)(S, { className: "h-4 w-4" })
|
|
92
|
-
})
|
|
93
|
-
]
|
|
94
|
-
})]
|
|
95
|
-
}), /* @__PURE__ */ (0, T.jsx)("div", {
|
|
96
|
-
className: "flex-1 overflow-y-auto",
|
|
97
|
-
children: /* @__PURE__ */ (0, T.jsx)("div", {
|
|
98
|
-
className: "px-4 pt-4",
|
|
99
|
-
children: /* @__PURE__ */ (0, T.jsx)(p, {
|
|
100
|
-
data: {
|
|
101
|
-
method: e.method,
|
|
102
|
-
timestamp: e.timestamp,
|
|
103
|
-
read: e.read,
|
|
104
|
-
params: e.params
|
|
105
|
-
},
|
|
106
|
-
filename: `notification-${e.method.replace(/[^a-zA-Z0-9]/g, "-")}-${Date.now()}.json`
|
|
107
|
-
})
|
|
108
|
-
})
|
|
109
|
-
})]
|
|
110
|
-
}) : /* @__PURE__ */ (0, T.jsxs)("div", {
|
|
111
|
-
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
112
|
-
children: [/* @__PURE__ */ (0, T.jsx)(i, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }), /* @__PURE__ */ (0, T.jsx)("p", {
|
|
113
|
-
className: "text-gray-500 dark:text-gray-400",
|
|
114
|
-
children: "Select a notification to view details"
|
|
115
|
-
})]
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
//#endregion
|
|
119
|
-
//#region src/client/components/NotificationsTab.tsx
|
|
120
|
-
function O({ notifications: e, unreadCount: t, markNotificationRead: n, markAllNotificationsRead: r, clearNotifications: a, serverId: o, isConnected: s }) {
|
|
121
|
-
let [u, d] = (0, w.useState)(null), [f, p] = (0, w.useState)(""), [v, b] = (0, w.useState)(-1), [S, C] = (0, w.useState)(!0), [O, k] = (0, w.useState)(!1), [A, j] = (0, w.useState)(!0), [M, N] = (0, w.useState)(!1), P = (0, w.useRef)(null), F = (0, w.useRef)(null), I = (0, w.useRef)(null), L = (0, w.useRef)(!1);
|
|
122
|
-
(0, w.useEffect)(() => {
|
|
123
|
-
S && e.length > 0 && P.current && !L.current && (P.current.scrollTop = 0);
|
|
124
|
-
}, [e.length, S]), (0, w.useEffect)(() => {
|
|
125
|
-
let e = P.current;
|
|
126
|
-
if (!e) return;
|
|
127
|
-
let t = () => {
|
|
128
|
-
e.scrollTop > 0 && (L.current = !0, C(!1));
|
|
129
|
-
};
|
|
130
|
-
return e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
|
|
131
|
-
}, []), (0, w.useEffect)(() => {
|
|
132
|
-
e.length === 0 && (L.current = !1, C(!0));
|
|
133
|
-
}, [e.length]), (0, w.useEffect)(() => {
|
|
134
|
-
u && !u.read && n(u.id);
|
|
135
|
-
}, [u, n]), (0, w.useEffect)(() => {
|
|
136
|
-
O && I.current && I.current.focus();
|
|
137
|
-
}, [O]);
|
|
138
|
-
let R = (0, w.useCallback)(() => {
|
|
139
|
-
f.trim() || k(!1);
|
|
140
|
-
}, [f]), z = (0, w.useMemo)(() => {
|
|
141
|
-
if (!f.trim()) return e;
|
|
142
|
-
let t = f.toLowerCase();
|
|
143
|
-
return e.filter((e) => e.method.toLowerCase().includes(t) || JSON.stringify(e.params || {}).toLowerCase().includes(t));
|
|
144
|
-
}, [e, f]);
|
|
145
|
-
(0, w.useEffect)(() => {
|
|
146
|
-
b(-1);
|
|
147
|
-
}, [f]), (0, w.useEffect)(() => {
|
|
148
|
-
let e = (e) => {
|
|
149
|
-
let t = e.target;
|
|
150
|
-
if (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.contentEditable === "true" || e.metaKey || e.ctrlKey || e.altKey) return;
|
|
151
|
-
let n = z;
|
|
152
|
-
if (e.key === "ArrowDown") e.preventDefault(), b((e) => {
|
|
153
|
-
let t = e + 1;
|
|
154
|
-
return t >= n.length ? 0 : t;
|
|
155
|
-
});
|
|
156
|
-
else if (e.key === "ArrowUp") e.preventDefault(), b((e) => {
|
|
157
|
-
let t = e - 1;
|
|
158
|
-
return t < 0 ? n.length - 1 : t;
|
|
159
|
-
});
|
|
160
|
-
else if (e.key === "Enter" && v >= 0) {
|
|
161
|
-
e.preventDefault();
|
|
162
|
-
let t = z[v];
|
|
163
|
-
t && B(t);
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
167
|
-
}, [v, z]), (0, w.useEffect)(() => {
|
|
168
|
-
if (v >= 0) {
|
|
169
|
-
let e = `notification-${z[v]?.id}`, t = document.getElementById(e);
|
|
170
|
-
t && t.scrollIntoView({
|
|
171
|
-
behavior: "smooth",
|
|
172
|
-
block: "nearest"
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
}, [v, z]);
|
|
176
|
-
let B = (0, w.useCallback)((e) => {
|
|
177
|
-
d(e);
|
|
178
|
-
}, []), V = (0, w.useCallback)(() => {
|
|
179
|
-
window.confirm("Are you sure you want to clear all notifications? This cannot be undone.") && (a(), d(null));
|
|
180
|
-
}, [a]), H = (0, w.useCallback)(async () => {
|
|
181
|
-
if (u) try {
|
|
182
|
-
await l(JSON.stringify({
|
|
183
|
-
method: u.method,
|
|
184
|
-
timestamp: u.timestamp,
|
|
185
|
-
read: u.read,
|
|
186
|
-
params: u.params
|
|
187
|
-
}, null, 2)), N(!0), setTimeout(() => N(!1), 2e3);
|
|
188
|
-
} catch (e) {
|
|
189
|
-
console.error("[NotificationsTab] Failed to copy notification:", e);
|
|
190
|
-
}
|
|
191
|
-
}, [u]), U = (0, w.useCallback)(() => {
|
|
192
|
-
if (u) try {
|
|
193
|
-
let e = new globalThis.Blob([JSON.stringify({
|
|
194
|
-
method: u.method,
|
|
195
|
-
timestamp: u.timestamp,
|
|
196
|
-
read: u.read,
|
|
197
|
-
params: u.params
|
|
198
|
-
}, null, 2)], { type: "application/json" }), t = URL.createObjectURL(e), n = document.createElement("a");
|
|
199
|
-
n.href = t, n.download = `notification-${Date.now()}.json`, document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(t);
|
|
200
|
-
} catch (e) {
|
|
201
|
-
console.error("[NotificationsTab] Failed to download notification:", e);
|
|
202
|
-
}
|
|
203
|
-
}, [u]), W = (0, w.useCallback)(async () => {
|
|
204
|
-
if (F.current) try {
|
|
205
|
-
document.fullscreenElement ? await document.exitFullscreen() : await F.current.requestFullscreen();
|
|
206
|
-
} catch (e) {
|
|
207
|
-
console.error("[NotificationsTab] Failed to toggle fullscreen:", e);
|
|
208
|
-
}
|
|
209
|
-
}, []), G = u ? {
|
|
210
|
-
method: u.method,
|
|
211
|
-
params: u.params,
|
|
212
|
-
timestamp: u.timestamp,
|
|
213
|
-
read: u.read,
|
|
214
|
-
formatRelativeTime: c
|
|
215
|
-
} : null;
|
|
216
|
-
return s ? /* @__PURE__ */ (0, T.jsxs)(_, {
|
|
217
|
-
orientation: "horizontal",
|
|
218
|
-
className: "h-full",
|
|
219
|
-
children: [
|
|
220
|
-
/* @__PURE__ */ (0, T.jsx)(m, {
|
|
221
|
-
defaultSize: 40,
|
|
222
|
-
minSize: 30,
|
|
223
|
-
children: /* @__PURE__ */ (0, T.jsx)(_, {
|
|
224
|
-
orientation: "vertical",
|
|
225
|
-
className: "h-full border-r dark:border-zinc-700",
|
|
226
|
-
children: /* @__PURE__ */ (0, T.jsx)(m, {
|
|
227
|
-
defaultSize: 75,
|
|
228
|
-
minSize: 30,
|
|
229
|
-
className: "h-full overflow-hidden",
|
|
230
|
-
children: /* @__PURE__ */ (0, T.jsx)(g, {
|
|
231
|
-
scrollRef: P,
|
|
232
|
-
children: (t) => /* @__PURE__ */ (0, T.jsxs)(T.Fragment, { children: [/* @__PURE__ */ (0, T.jsx)(y, {
|
|
233
|
-
isScrolled: t,
|
|
234
|
-
title: "Notifications",
|
|
235
|
-
icon: i,
|
|
236
|
-
count: z.length,
|
|
237
|
-
isSearchExpanded: O,
|
|
238
|
-
searchQuery: f,
|
|
239
|
-
searchPlaceholder: "Search notifications...",
|
|
240
|
-
onSearchExpand: () => k(!0),
|
|
241
|
-
onSearchChange: p,
|
|
242
|
-
onSearchBlur: R,
|
|
243
|
-
bulkAction: {
|
|
244
|
-
icon: x,
|
|
245
|
-
label: "Clear all",
|
|
246
|
-
onClick: V,
|
|
247
|
-
disabled: e.length === 0
|
|
248
|
-
},
|
|
249
|
-
searchInputRef: I
|
|
250
|
-
}), /* @__PURE__ */ (0, T.jsx)(E, {
|
|
251
|
-
notifications: z,
|
|
252
|
-
selectedNotification: u,
|
|
253
|
-
onNotificationSelect: B,
|
|
254
|
-
focusedIndex: v,
|
|
255
|
-
formatRelativeTime: c
|
|
256
|
-
})] })
|
|
257
|
-
})
|
|
258
|
-
})
|
|
259
|
-
})
|
|
260
|
-
}),
|
|
261
|
-
/* @__PURE__ */ (0, T.jsx)(h, {}),
|
|
262
|
-
/* @__PURE__ */ (0, T.jsx)(m, {
|
|
263
|
-
defaultSize: 60,
|
|
264
|
-
minSize: 40,
|
|
265
|
-
children: /* @__PURE__ */ (0, T.jsx)("div", {
|
|
266
|
-
ref: F,
|
|
267
|
-
className: "h-full bg-white dark:bg-zinc-900",
|
|
268
|
-
children: /* @__PURE__ */ (0, T.jsx)(D, {
|
|
269
|
-
notification: G,
|
|
270
|
-
previewMode: A,
|
|
271
|
-
onTogglePreview: () => j(!A),
|
|
272
|
-
onCopy: H,
|
|
273
|
-
onDownload: U,
|
|
274
|
-
onFullscreen: W,
|
|
275
|
-
onClose: () => d(null),
|
|
276
|
-
isCopied: M
|
|
277
|
-
})
|
|
278
|
-
})
|
|
279
|
-
})
|
|
280
|
-
]
|
|
281
|
-
}) : /* @__PURE__ */ (0, T.jsxs)("div", {
|
|
282
|
-
className: "flex flex-col items-center justify-center h-full p-4 text-center",
|
|
283
|
-
children: [/* @__PURE__ */ (0, T.jsx)(i, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }), /* @__PURE__ */ (0, T.jsx)("p", {
|
|
284
|
-
className: "text-gray-500 dark:text-gray-400",
|
|
285
|
-
children: "Not connected to server"
|
|
286
|
-
})]
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
//#endregion
|
|
290
|
-
export { O as NotificationsTab };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { n } from "./createLucideIcon-BONxC1L5.js";
|
|
3
|
-
import { t as r } from "./loader-circle-BKRHJEB7.js";
|
|
4
|
-
import { l as i } from "./react-BDA-xrgK.js";
|
|
5
|
-
//#region src/client/components/OAuthCallback.tsx
|
|
6
|
-
var a = /* @__PURE__ */ e(t(), 1), o = n();
|
|
7
|
-
function s() {
|
|
8
|
-
let [e, t] = (0, a.useState)("processing"), [n, s] = (0, a.useState)("");
|
|
9
|
-
return (0, a.useEffect)(() => {
|
|
10
|
-
console.log("[OAuthCallback] Component mounted, handling authorization..."), console.log("[OAuthCallback] Current URL:", window.location.href), i().then(() => {
|
|
11
|
-
console.log("[OAuthCallback] Authorization successful"), t("success");
|
|
12
|
-
}).catch((e) => {
|
|
13
|
-
console.error("[OAuthCallback] Authorization failed:", e), t("error"), s(e instanceof Error ? e.message : String(e));
|
|
14
|
-
});
|
|
15
|
-
}, []), e === "processing" ? /* @__PURE__ */ (0, o.jsx)("div", {
|
|
16
|
-
className: "h-screen w-full flex items-center justify-center bg-white dark:bg-zinc-900",
|
|
17
|
-
children: /* @__PURE__ */ (0, o.jsxs)("div", {
|
|
18
|
-
className: "flex flex-col items-center gap-4",
|
|
19
|
-
children: [/* @__PURE__ */ (0, o.jsx)(r, { className: "h-8 w-8 animate-spin text-zinc-600 dark:text-zinc-400" }), /* @__PURE__ */ (0, o.jsx)("p", {
|
|
20
|
-
className: "text-sm text-zinc-600 dark:text-zinc-400",
|
|
21
|
-
children: "Completing authentication..."
|
|
22
|
-
})]
|
|
23
|
-
})
|
|
24
|
-
}) : e === "error" ? /* @__PURE__ */ (0, o.jsx)("div", {
|
|
25
|
-
className: "h-screen w-full flex items-center justify-center bg-white dark:bg-zinc-900",
|
|
26
|
-
children: /* @__PURE__ */ (0, o.jsxs)("div", {
|
|
27
|
-
className: "max-w-md p-6",
|
|
28
|
-
children: [
|
|
29
|
-
/* @__PURE__ */ (0, o.jsx)("h1", {
|
|
30
|
-
className: "text-xl font-semibold text-red-600 dark:text-red-400 mb-2",
|
|
31
|
-
children: "Authentication Error"
|
|
32
|
-
}),
|
|
33
|
-
/* @__PURE__ */ (0, o.jsx)("p", {
|
|
34
|
-
className: "text-sm text-zinc-600 dark:text-zinc-400 mb-4",
|
|
35
|
-
children: n
|
|
36
|
-
}),
|
|
37
|
-
/* @__PURE__ */ (0, o.jsx)("p", {
|
|
38
|
-
className: "text-xs text-zinc-500 dark:text-zinc-500",
|
|
39
|
-
children: "You can close this window and try again."
|
|
40
|
-
})
|
|
41
|
-
]
|
|
42
|
-
})
|
|
43
|
-
}) : /* @__PURE__ */ (0, o.jsx)("div", {
|
|
44
|
-
className: "h-screen w-full flex items-center justify-center bg-white dark:bg-zinc-900",
|
|
45
|
-
children: /* @__PURE__ */ (0, o.jsxs)("div", {
|
|
46
|
-
className: "max-w-md p-6",
|
|
47
|
-
children: [/* @__PURE__ */ (0, o.jsx)("h1", {
|
|
48
|
-
className: "text-xl font-semibold text-green-600 dark:text-green-400 mb-2",
|
|
49
|
-
children: "Authentication Successful!"
|
|
50
|
-
}), /* @__PURE__ */ (0, o.jsx)("p", {
|
|
51
|
-
className: "text-sm text-zinc-600 dark:text-zinc-400",
|
|
52
|
-
children: "Redirecting you back..."
|
|
53
|
-
})]
|
|
54
|
-
})
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
58
|
-
export { s as OAuthCallback };
|