@mcp-use/inspector 20.0.0-beta.6 → 20.0.0-beta.7
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/{AnimatePresence-Dcw-FOy8.js → AnimatePresence-D1bZ5_-l.js} +79 -78
- package/dist/cdn/{ChatTab-D6J3Gyp7.js → ChatTab-DtUGK07C.js} +1951 -1932
- package/dist/cdn/CheckboxIndicator-BjF73mGX.js +252 -0
- package/dist/cdn/{ConnectionSettingsForm-CWQueI8J.js → ConnectionSettingsForm-CNuMa6jp.js} +202 -202
- package/dist/cdn/{ConnectionSettingsTab-FGyt3QaI.js → ConnectionSettingsTab-qSVQ1aIF.js} +36 -35
- package/dist/cdn/{ElicitationTab-CL1KJ0bz.js → ElicitationTab-PEmEDvC5.js} +47 -46
- package/dist/cdn/{FormContext-tmgN_Vdr.js → FormContext-NtUiZclE.js} +26 -26
- package/dist/cdn/{InspectorContext-UjtEbNod.js → InspectorContext-BBKCdfmK.js} +1 -1
- package/dist/cdn/{JSONDisplay-BFxf5oEu.js → JSONDisplay-BJqMz7Ny.js} +22 -22
- package/dist/cdn/{ListTabHeader-Cv-GmtGF.js → ListTabHeader-DzmTtN1e.js} +20 -19
- package/dist/cdn/{WidgetWrapper-CruwjBOd.js → MCPAppsDebugControls-BpP-Ifap.js} +514 -550
- package/dist/cdn/{ManufactOAuthCallback-B98kSYCj.js → ManufactOAuthCallback-ChbbjFIT.js} +2 -2
- package/dist/cdn/{MarkdownRenderer-gLqUICEd.js → MarkdownRenderer-bX1BrKgI.js} +23 -23
- package/dist/cdn/McpAppsViewPanel-jlsYQ7uS.js +56 -0
- package/dist/cdn/{NotificationsTab-CeImSrhx.js → NotificationsTab-B7uebqMV.js} +21 -21
- package/dist/cdn/{OAuthCallback-Bg2bP-o9.js → OAuthCallback--NZdLoWx.js} +3 -3
- package/dist/cdn/PromptsTab-BlXDcau3.js +902 -0
- package/dist/cdn/{ResourcesTab-CQkKni-P.js → ResourcesTab-D45_JojP.js} +116 -114
- package/dist/cdn/{SamplingTab-D8q-iCMc.js → SamplingTab-r7tImM6L.js} +34 -33
- package/dist/cdn/{ServerMetadataTab-CvrKX8fz.js → ServerMetadataTab-BM3VhSLf.js} +9 -9
- package/dist/cdn/{StatusIcon-D0-ARyOh.js → StatusIcon-Q3n3YRtE.js} +10 -11
- package/dist/cdn/{ToolsTab-6xaVH43x.js → ToolsTab-DOAO8HnS.js} +664 -652
- package/dist/cdn/{ViewPreview-Ohh6JwOn.js → ViewPreview-CBhrVdwx.js} +3 -3
- package/dist/cdn/{WidgetDebugContext-D4usL_MA.js → WidgetDebugContext-B6yoOVVV.js} +1 -11
- package/dist/cdn/WidgetWrapper-BlbQAh_X.js +12 -0
- package/dist/cdn/{bell-CGjAO_0s.js → bell-GrTZcnD2.js} +1 -1
- package/dist/cdn/{browser-CbQIH4w2.js → browser-DG2Z8392.js} +1 -1
- package/dist/cdn/{brush-B_mKhyxG.js → brush-CelVvMGp.js} +1 -1
- package/dist/cdn/button-CB4uOoUV.js +2509 -0
- package/dist/cdn/card-BA-DQk-G.js +41 -0
- package/dist/cdn/{checkbox-By0FklhG.js → checkbox-kwVa4gRX.js} +7 -7
- package/dist/cdn/{clock-CmUbSx_B.js → clock-YMF8Gtw5.js} +1 -1
- package/dist/cdn/{code-V_0nf5rg.js → code-C8sN2OGR.js} +1 -1
- package/dist/cdn/{jsx-runtime-CIxvMpEo.js → createLucideIcon-BONxC1L5.js} +57 -24
- package/dist/cdn/{dialog-BsDpuJd3.js → dialog-CJGnC5Ag.js} +171 -171
- package/dist/cdn/{dist-DaMB0Su9.js → dist-CTJnCYmk.js} +1 -1
- package/dist/cdn/{dist-CXHFvGre.js → dist-SxRsB1iS.js} +3 -3
- package/dist/cdn/{external-link-CjmfT6rW.js → external-link-Bo4lQxr1.js} +1 -1
- package/dist/cdn/{eye-B7H96av8.js → eye-pSGG7nvf.js} +1 -1
- package/dist/cdn/{folder-open-B3lu2rG_.js → folder-open-aM8CPtBO.js} +1 -1
- package/dist/cdn/{hash-BVQnWi7q.js → hash-DDs2vE1k.js} +1 -1
- package/dist/cdn/{history-Csw4rb44.js → history-BfUFpL1d.js} +1 -1
- package/dist/cdn/{index-browser-DkQOzkvX.js → index-browser-Dm3R1Mfe.js} +1 -1
- package/dist/cdn/{info-CNiOwqkf.js → info-BMkB68mB.js} +1 -1
- package/dist/cdn/{input-C2OBd4PJ.js → input-BCpgLXU1.js} +2993 -5499
- package/dist/cdn/inspector.css +1 -1
- package/dist/cdn/inspector.js +7106 -7140
- package/dist/cdn/{label-B9Jmm9be.js → label-A0UGV8FE.js} +9 -9
- package/dist/cdn/{loader-circle-BLy9A_pp.js → loader-circle-BKRHJEB7.js} +1 -1
- package/dist/cdn/{maximize-2-CH5Lq90B.js → maximize-2-DdrB_spi.js} +1 -1
- package/dist/cdn/{maximize-BALCV_ep.js → maximize-hSOCz133.js} +1 -1
- package/dist/cdn/{message-square-BnxdpJxZ.js → message-square-D3tKB3uJ.js} +1 -1
- package/dist/cdn/{not-found-DEtSM_Wd.js → not-found-BajFyZpp.js} +9 -11
- package/dist/cdn/{play-vuZ5PLnI.js → play-B1leulYf.js} +1 -1
- package/dist/cdn/providerMeta-CjGU4rID.js +436 -0
- package/dist/cdn/{react-BLtCruam.js → react-Bl-hSkvn.js} +562 -512
- package/dist/cdn/{refresh-cw-BXY-Pa0U.js → refresh-cw-CyvXrS91.js} +1 -1
- package/dist/cdn/{save-Tgil_AJZ.js → save-CmdEPUAm.js} +1 -1
- package/dist/cdn/{select-DDdiIPR2.js → select-CCFHjOGk.js} +808 -807
- package/dist/cdn/{servers-Dm72iTpY.js → servers-Dd0Vcp81.js} +5 -1
- package/dist/cdn/{shared-DaILIQPP.js → shared-CJVHJhag.js} +36 -36
- package/dist/cdn/{sheet-Br_l2kry.js → sheet-oyq1mIyg.js} +620 -619
- package/dist/cdn/{sparkles-BntO2rDR.js → sparkles-CxeZpVtX.js} +1 -1
- package/dist/cdn/spinner-Be1GlSGX.js +15 -0
- package/dist/cdn/{square-check-big-BvwQ17Bl.js → square-check-big-C_4wbfwF.js} +1 -1
- package/dist/cdn/{switch-C3IyQuid.js → switch-DHXEA_N5.js} +190 -189
- package/dist/cdn/{tabs-subtle-CkdI6Mac.js → tabs-subtle-Dubd6Kj8.js} +269 -268
- package/dist/cdn/{telemetry-C7Ytz2BG.js → telemetry-TwPKZlFf.js} +2 -2
- package/dist/cdn/{textarea-DSbwcFVt.js → textarea-CwmI8_uI.js} +6 -6
- package/dist/cdn/{trash-2-RwpJY5SL.js → trash-2-BhumJAFE.js} +1 -1
- package/dist/cdn/{useAriaLabelledBy-DqAdnppm.js → useAriaLabelledBy-Cra6w3YY.js} +2 -1
- package/dist/cdn/{useCompositeItem-BRqEzYh-.js → useCompositeItem-Dhnm-7el.js} +3 -3
- package/dist/cdn/{useConfig-BW6uQf2m.js → useConfig-leHVjdjl.js} +2 -2
- package/dist/cdn/{useSavedRequests-Ci2I919u.js → useSavedRequests-mSIsDd4c.js} +1 -1
- package/dist/cdn/{useViewHostProps-CINeSkth.js → useViewHostProps-CDOm2w6u.js} +124 -109
- package/dist/cdn/{wrench-DzGmCfnb.js → wrench-DvK20LUT.js} +1 -1
- package/dist/cdn/{x-C3vRQIYu.js → x-EilKPiCX.js} +1 -1
- package/dist/cdn/{zap-Mb-pbw2X.js → zap-0Wr9QO7N.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/components/ChatTab.d.ts.map +1 -1
- package/dist/client/components/MCPAppsDebugControls.d.ts.map +1 -1
- package/dist/client/components/ToolsTab.d.ts.map +1 -1
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
- package/dist/client/components/chat/ToolResultRenderer.d.ts.map +1 -1
- package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts +29 -0
- package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts.map +1 -0
- package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +1 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts +2 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts.map +1 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +1 -1
- package/dist/client/components/ui/mesh-animation-pause.d.ts +14 -0
- package/dist/client/components/ui/mesh-animation-pause.d.ts.map +1 -0
- package/dist/client/components/ui/mesh-gradient-colors.d.ts +6 -0
- package/dist/client/components/ui/mesh-gradient-colors.d.ts.map +1 -0
- package/dist/client/components/ui/mesh-tab-background.d.ts +1 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -1
- package/dist/client/components/ui/not-found.d.ts.map +1 -1
- package/dist/client/context/WidgetDebugContext.d.ts +1 -11
- package/dist/client/context/WidgetDebugContext.d.ts.map +1 -1
- package/dist/client/hooks/useDeviceViewport.d.ts +1 -5
- package/dist/client/hooks/useDeviceViewport.d.ts.map +1 -1
- package/dist/client/hooks/useViewHostProps.d.ts +1 -1
- package/dist/client/hooks/useViewHostProps.d.ts.map +1 -1
- package/dist/client/index.js +2086 -1860
- package/dist/client/utils/servers.d.ts +5 -0
- package/dist/client/utils/servers.d.ts.map +1 -1
- package/dist/server/cdn-shell.js +2 -2
- package/dist/server/{chunk-GBY4WAVP.js → chunk-5GVQGIAX.js} +1 -1
- package/dist/server/{chunk-IFF5T5J4.js → chunk-UZZDBVKF.js} +1 -1
- package/dist/server/{chunk-NUHI6MJ6.js → chunk-VFVFLXKP.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/AnimatePresence-FfDQQNFJ.js +9 -0
- package/dist/web/assets/ChatTab-B6ubLbeA.js +18 -0
- package/dist/web/assets/ConnectionSettingsTab-Cb2eDgEu.js +1 -0
- package/dist/web/assets/ElicitationTab-CbnCrmu9.js +1 -0
- package/dist/web/assets/FormContext-sV-yByKz.js +1 -0
- package/dist/web/assets/ListTabHeader-CrGae306.js +1 -0
- package/dist/web/assets/MCPAppsDebugControls-sRglMhat.js +34 -0
- package/dist/web/assets/{ManufactOAuthCallback-BRO6TPkZ.js → ManufactOAuthCallback-D4uYGigW.js} +1 -1
- package/dist/web/assets/{MarkdownRenderer-gaJFjbtr.js → MarkdownRenderer-Cwxp9fLj.js} +2 -2
- package/dist/web/assets/McpAppsViewPanel-jQYFoZNX.js +1 -0
- package/dist/web/assets/{NotificationsTab-LYcfRjyd.js → NotificationsTab-DuSm762_.js} +1 -1
- package/dist/web/assets/{OAuthCallback-D8UItgTB.js → OAuthCallback-VLHlUe2c.js} +1 -1
- package/dist/web/assets/PromptsTab-DK6XZxR8.js +15 -0
- package/dist/web/assets/ResourcesTab-CUE4MAtJ.js +2 -0
- package/dist/web/assets/SamplingTab-BYNkVCTu.js +1 -0
- package/dist/web/assets/ServerMetadataTab-DWjNFMbq.js +1 -0
- package/dist/web/assets/ToolsTab-BisWWY2p.js +8 -0
- package/dist/web/assets/{ViewPreview--z6jL0Zg.js → ViewPreview-COrmPpRr.js} +1 -1
- package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +1 -0
- package/dist/web/assets/{brush--0LobUi4.js → brush-DX0UZ_pI.js} +1 -1
- package/dist/web/assets/button-C8Xa2k4x.js +1 -0
- package/dist/web/assets/checkbox-B6dtF73d.js +1 -0
- package/dist/web/assets/code-B14rVdNt.js +1 -0
- package/dist/web/assets/createLucideIcon-BEHeJH0M.js +1 -0
- package/dist/web/assets/{dist-B8sA8Zml.js → dist-9Oy7e0v8.js} +4 -4
- package/dist/web/assets/index-BMaSsizY.js +499 -0
- package/dist/web/assets/index-D7TVTIt9.css +1 -0
- package/dist/web/assets/input-C0OQCUZy.js +1 -0
- package/dist/web/assets/{label-Cdim77Jw.js → label-CI7JWQOo.js} +1 -1
- package/dist/web/assets/{maximize-2-BTT9QQU9.js → maximize-2-Br1WQzT2.js} +1 -1
- package/dist/web/assets/{maximize-_O55kFcr.js → maximize-CJNgRe6S.js} +1 -1
- package/dist/web/assets/{refresh-cw-C9wQl8_d.js → refresh-cw-B5iaAZKn.js} +1 -1
- package/dist/web/assets/{save-B-MsgxX9.js → save-TM6fvNrt.js} +1 -1
- package/dist/web/assets/select-D6jzbLJn.js +1 -0
- package/dist/web/assets/shared-CFs9CZfB.js +1 -0
- package/dist/web/assets/{sparkles-2OAsc1aP.js → sparkles-BGYTDThM.js} +1 -1
- package/dist/web/assets/tabs-subtle-D2XkWhLL.js +1 -0
- package/dist/web/assets/textarea-CRTXuRmE.js +1 -0
- package/dist/web/assets/{useConfig-BAsKhUxf.js → useConfig-B6tXvJOb.js} +1 -1
- package/dist/web/assets/useViewHostProps-DZqOwiAm.js +1 -0
- package/dist/web/assets/{zap-Du2Uc5pa.js → zap-BDWHCVHU.js} +1 -1
- package/dist/web/index.html +10 -10
- package/package.json +4 -4
- package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
- package/dist/cdn/PromptsTab-C4LuwyWN.js +0 -901
- package/dist/cdn/card-DgiYnSg-.js +0 -41
- package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
- package/dist/cdn/providerMeta-BQIfHuNL.js +0 -379
- package/dist/cdn/spinner-jQtC7EBj.js +0 -15
- package/dist/web/assets/AnimatePresence-C5p0yiY1.js +0 -9
- package/dist/web/assets/ChatTab-CsBPVCSc.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-DQTXfnl1.js +0 -1
- package/dist/web/assets/ElicitationTab-_FKB7nNG.js +0 -1
- package/dist/web/assets/FormContext-DH2caWKO.js +0 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +0 -1
- package/dist/web/assets/PromptsTab-B2uVMRR2.js +0 -15
- package/dist/web/assets/ResourcesTab-DhOZYPjE.js +0 -2
- package/dist/web/assets/SamplingTab-C-oY2hoi.js +0 -1
- package/dist/web/assets/ServerMetadataTab-BkTxO5KS.js +0 -1
- package/dist/web/assets/ToolsTab-DupHgo7A.js +0 -8
- package/dist/web/assets/WidgetWrapper-CZaEVEw4.js +0 -34
- package/dist/web/assets/checkbox-BQ9mI_6k.js +0 -1
- package/dist/web/assets/code-tME-5H6D.js +0 -1
- package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
- package/dist/web/assets/index-C_fCIJ4C.js +0 -492
- package/dist/web/assets/index-fBX3akc8.css +0 -1
- package/dist/web/assets/input-CLYhA7PK.js +0 -1
- package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
- package/dist/web/assets/select-CJ57-Bor.js +0 -1
- package/dist/web/assets/shared-CCC9rTz4.js +0 -1
- package/dist/web/assets/tabs-subtle-246ABJqx.js +0 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
- package/dist/web/assets/useViewHostProps-CV5zBxUb.js +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { d as n, l as r,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { d as n, l as r, u as i } from "./input-BCpgLXU1.js";
|
|
3
|
+
import { n as a } from "./createLucideIcon-BONxC1L5.js";
|
|
4
|
+
import { t as o } from "./button-CB4uOoUV.js";
|
|
5
|
+
import { S as s } from "./dialog-CJGnC5Ag.js";
|
|
6
|
+
import { f as c, i as l, l as u, o as d, r as f, t as p, u as m } from "./ConnectionSettingsForm-CNuMa6jp.js";
|
|
7
|
+
import { n as h } from "./dist-CTJnCYmk.js";
|
|
7
8
|
import { t as g } from "./inspector-settings-layout-0VDsjeqb.js";
|
|
8
|
-
import { n as _ } from "./ListTabHeader-
|
|
9
|
+
import { n as _ } from "./ListTabHeader-DzmTtN1e.js";
|
|
9
10
|
//#region src/client/hooks/useConnectionFormState.ts
|
|
10
11
|
var v = /* @__PURE__ */ e(t(), 1);
|
|
11
12
|
function y(e, t) {
|
|
@@ -88,25 +89,25 @@ function y(e, t) {
|
|
|
88
89
|
}
|
|
89
90
|
//#endregion
|
|
90
91
|
//#region src/client/components/ConnectionSettingsTab.tsx
|
|
91
|
-
var b =
|
|
92
|
+
var b = a();
|
|
92
93
|
function x({ connection: e, onSave: t }) {
|
|
93
|
-
let
|
|
94
|
+
let a = y(e, !0), [c, l] = (0, v.useState)(!1);
|
|
94
95
|
return /* @__PURE__ */ (0, b.jsxs)("div", {
|
|
95
96
|
className: "h-full overflow-y-auto overscroll-none",
|
|
96
97
|
onScroll: (e) => l(e.currentTarget.scrollTop > 0),
|
|
97
98
|
children: [/* @__PURE__ */ (0, b.jsxs)("div", {
|
|
98
|
-
className: `${r(c)} flex flex-row items-center justify-between gap-2 ${
|
|
99
|
+
className: `${r(c)} flex flex-row items-center justify-between gap-2 ${i}`,
|
|
99
100
|
children: [/* @__PURE__ */ (0, b.jsxs)("h2", {
|
|
100
101
|
className: `${n} flex items-center gap-1.5`,
|
|
101
102
|
children: [/* @__PURE__ */ (0, b.jsx)(s, {
|
|
102
103
|
className: _,
|
|
103
104
|
"aria-hidden": !0
|
|
104
105
|
}), "Connection Settings"]
|
|
105
|
-
}), /* @__PURE__ */ (0, b.jsx)(
|
|
106
|
+
}), /* @__PURE__ */ (0, b.jsx)(o, {
|
|
106
107
|
"data-testid": "connection-form-save-button",
|
|
107
108
|
size: "sm",
|
|
108
109
|
onClick: () => {
|
|
109
|
-
let e =
|
|
110
|
+
let e = a.buildConfig();
|
|
110
111
|
e && t(e);
|
|
111
112
|
},
|
|
112
113
|
children: "Save"
|
|
@@ -114,30 +115,30 @@ function x({ connection: e, onSave: t }) {
|
|
|
114
115
|
}), /* @__PURE__ */ (0, b.jsx)("div", {
|
|
115
116
|
className: g,
|
|
116
117
|
children: /* @__PURE__ */ (0, b.jsx)(p, {
|
|
117
|
-
alias:
|
|
118
|
-
setAlias:
|
|
119
|
-
url:
|
|
120
|
-
setUrl:
|
|
121
|
-
connectionMode:
|
|
122
|
-
setConnectionMode:
|
|
123
|
-
protocolMode:
|
|
124
|
-
setProtocolMode:
|
|
125
|
-
customHeaders:
|
|
126
|
-
setCustomHeaders:
|
|
127
|
-
requestTimeout:
|
|
128
|
-
setRequestTimeout:
|
|
129
|
-
resetTimeoutOnProgress:
|
|
130
|
-
setResetTimeoutOnProgress:
|
|
131
|
-
maxTotalTimeout:
|
|
132
|
-
setMaxTotalTimeout:
|
|
133
|
-
proxyAddress:
|
|
134
|
-
setProxyAddress:
|
|
135
|
-
clientId:
|
|
136
|
-
setClientId:
|
|
137
|
-
clientSecret:
|
|
138
|
-
setClientSecret:
|
|
139
|
-
scope:
|
|
140
|
-
setScope:
|
|
118
|
+
alias: a.alias,
|
|
119
|
+
setAlias: a.setAlias,
|
|
120
|
+
url: a.url,
|
|
121
|
+
setUrl: a.setUrl,
|
|
122
|
+
connectionMode: a.connectionMode,
|
|
123
|
+
setConnectionMode: a.setConnectionMode,
|
|
124
|
+
protocolMode: a.protocolMode,
|
|
125
|
+
setProtocolMode: a.setProtocolMode,
|
|
126
|
+
customHeaders: a.customHeaders,
|
|
127
|
+
setCustomHeaders: a.setCustomHeaders,
|
|
128
|
+
requestTimeout: a.requestTimeout,
|
|
129
|
+
setRequestTimeout: a.setRequestTimeout,
|
|
130
|
+
resetTimeoutOnProgress: a.resetTimeoutOnProgress,
|
|
131
|
+
setResetTimeoutOnProgress: a.setResetTimeoutOnProgress,
|
|
132
|
+
maxTotalTimeout: a.maxTotalTimeout,
|
|
133
|
+
setMaxTotalTimeout: a.setMaxTotalTimeout,
|
|
134
|
+
proxyAddress: a.proxyAddress,
|
|
135
|
+
setProxyAddress: a.setProxyAddress,
|
|
136
|
+
clientId: a.clientId,
|
|
137
|
+
setClientId: a.setClientId,
|
|
138
|
+
clientSecret: a.clientSecret,
|
|
139
|
+
setClientSecret: a.setClientSecret,
|
|
140
|
+
scope: a.scope,
|
|
141
|
+
setScope: a.setScope,
|
|
141
142
|
showConnectButton: !1,
|
|
142
143
|
showExportButton: !1,
|
|
143
144
|
inlineSections: !0,
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
14
|
-
import { n as
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
2
|
+
import { a as n, n as r, r as i, sr as a, t as o } from "./input-BCpgLXU1.js";
|
|
3
|
+
import { n as s } from "./createLucideIcon-BONxC1L5.js";
|
|
4
|
+
import { t as c } from "./button-CB4uOoUV.js";
|
|
5
|
+
import { t as l } from "./label-A0UGV8FE.js";
|
|
6
|
+
import { a as u, i as d, r as f, t as p } from "./browser-DG2Z8392.js";
|
|
7
|
+
import { a as m, t as h } from "./JSONDisplay-BJqMz7Ny.js";
|
|
8
|
+
import { t as g } from "./external-link-Bo4lQxr1.js";
|
|
9
|
+
import { a as _, i as v, n as y, o as b, r as x, t as S } from "./shared-CJVHJhag.js";
|
|
10
|
+
import { t as C } from "./maximize-2-DdrB_spi.js";
|
|
11
|
+
import { t as w } from "./square-check-big-C_4wbfwF.js";
|
|
12
|
+
import { t as T } from "./x-EilKPiCX.js";
|
|
13
|
+
import { t as E } from "./not-found-BajFyZpp.js";
|
|
14
|
+
import { n as D } from "./dist-CTJnCYmk.js";
|
|
15
|
+
import { n as O } from "./InspectorContext-BBKCdfmK.js";
|
|
16
|
+
import { t as k } from "./textarea-CwmI8_uI.js";
|
|
17
|
+
import { t as A } from "./checkbox-kwVa4gRX.js";
|
|
17
18
|
import { n as j, t as M } from "./schemaHelpers-DTV38jGq.js";
|
|
18
19
|
//#region src/client/components/elicitation/ElicitationRequestsList.tsx
|
|
19
|
-
var N = /* @__PURE__ */ e(t(), 1), P =
|
|
20
|
-
function F({ requests: e, selectedRequest: t, onRequestSelect:
|
|
20
|
+
var N = /* @__PURE__ */ e(t(), 1), P = s();
|
|
21
|
+
function F({ requests: e, selectedRequest: t, onRequestSelect: n, focusedIndex: r, formatRelativeTime: i }) {
|
|
21
22
|
return e.length === 0 ? /* @__PURE__ */ (0, P.jsx)("div", {
|
|
22
23
|
className: "flex flex-1 flex-col items-center justify-center p-4 text-center",
|
|
23
24
|
children: /* @__PURE__ */ (0, P.jsx)(E, {
|
|
@@ -31,26 +32,26 @@ function F({ requests: e, selectedRequest: t, onRequestSelect: r, focusedIndex:
|
|
|
31
32
|
id: `elicitation-request-${e.id}`,
|
|
32
33
|
"data-testid": `elicitation-request-item-${o}`,
|
|
33
34
|
isSelected: t?.id === e.id,
|
|
34
|
-
isFocused:
|
|
35
|
+
isFocused: r === o,
|
|
35
36
|
title: /* @__PURE__ */ (0, P.jsxs)("span", {
|
|
36
37
|
className: "flex items-center gap-3",
|
|
37
|
-
children: [e.serverName, /* @__PURE__ */ (0, P.jsx)(
|
|
38
|
+
children: [e.serverName, /* @__PURE__ */ (0, P.jsx)(a, {
|
|
38
39
|
variant: "outline",
|
|
39
40
|
className: s === "url" ? "bg-blue-500/20 text-blue-600 dark:text-blue-400 border-blue-500/50" : "bg-green-500/20 text-green-600 dark:text-green-400 border-green-500/50",
|
|
40
41
|
children: s
|
|
41
42
|
})]
|
|
42
43
|
}),
|
|
43
44
|
description: (() => {
|
|
44
|
-
let t =
|
|
45
|
+
let t = i(e.timestamp), n = [];
|
|
45
46
|
return c && n.push("with schema"), s === "url" && n.push("external action"), t + (n.length > 0 ? ` | ${n.join(", ")}` : "");
|
|
46
47
|
})(),
|
|
47
|
-
onClick: () =>
|
|
48
|
+
onClick: () => n(e)
|
|
48
49
|
}, e.id);
|
|
49
50
|
}) });
|
|
50
51
|
}
|
|
51
52
|
//#endregion
|
|
52
53
|
//#region src/client/components/elicitation/shared/ElicitationFormFields.tsx
|
|
53
|
-
function I({ request: e, formData: t, onFieldChange: n, idPrefix: r, testIdPrefix: i, fieldContainerClassName: a = "space-y-2", textareaRows:
|
|
54
|
+
function I({ request: e, formData: t, onFieldChange: n, idPrefix: r, testIdPrefix: i, fieldContainerClassName: a = "space-y-2", textareaRows: s = 4, showOuterLabelForBoolean: c = !0, emptyFallback: u }) {
|
|
54
55
|
return /* @__PURE__ */ (0, P.jsx)(P.Fragment, { children: (0, N.useMemo)(() => {
|
|
55
56
|
if (!("requestedSchema" in e.request)) return null;
|
|
56
57
|
let d = e.request.requestedSchema;
|
|
@@ -92,7 +93,7 @@ function I({ request: e, formData: t, onFieldChange: n, idPrefix: r, testIdPrefi
|
|
|
92
93
|
children: "*"
|
|
93
94
|
})]
|
|
94
95
|
})]
|
|
95
|
-
}) : m === "number" || m === "integer" ? /* @__PURE__ */ (0, P.jsx)(
|
|
96
|
+
}) : m === "number" || m === "integer" ? /* @__PURE__ */ (0, P.jsx)(o, {
|
|
96
97
|
id: w,
|
|
97
98
|
"data-testid": T,
|
|
98
99
|
type: "number",
|
|
@@ -174,8 +175,8 @@ function I({ request: e, formData: t, onFieldChange: n, idPrefix: r, testIdPrefi
|
|
|
174
175
|
value: t[e] || "",
|
|
175
176
|
onChange: (t) => n(e, t.target.value),
|
|
176
177
|
placeholder: d.default || "",
|
|
177
|
-
rows:
|
|
178
|
-
}) : /* @__PURE__ */ (0, P.jsx)(
|
|
178
|
+
rows: s
|
|
179
|
+
}) : /* @__PURE__ */ (0, P.jsx)(o, {
|
|
179
180
|
id: w,
|
|
180
181
|
"data-testid": T,
|
|
181
182
|
type: "text",
|
|
@@ -194,7 +195,7 @@ function I({ request: e, formData: t, onFieldChange: n, idPrefix: r, testIdPrefi
|
|
|
194
195
|
r,
|
|
195
196
|
i,
|
|
196
197
|
a,
|
|
197
|
-
|
|
198
|
+
s,
|
|
198
199
|
c,
|
|
199
200
|
u
|
|
200
201
|
]) });
|
|
@@ -235,7 +236,7 @@ function L(e) {
|
|
|
235
236
|
}
|
|
236
237
|
//#endregion
|
|
237
238
|
//#region src/client/components/elicitation/ElicitationRequestDisplay.tsx
|
|
238
|
-
function R({ request: t, onApprove:
|
|
239
|
+
function R({ request: t, onApprove: o, onReject: s, onClose: f, previewMode: p, onTogglePreview: _, isCopied: v, onCopy: y, onDownload: b, onFullscreen: x }) {
|
|
239
240
|
let { formData: S, setFieldValue: w, getMissingRequiredFields: E, urlCompleted: O, setUrlCompleted: k, mode: j, isFormMode: M, isUrlMode: N } = L(t);
|
|
240
241
|
return t ? /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
241
242
|
className: "flex flex-col h-full",
|
|
@@ -249,7 +250,7 @@ function R({ request: t, onApprove: s, onReject: c, onClose: f, previewMode: p,
|
|
|
249
250
|
className: "font-medium text-gray-900 dark:text-gray-100",
|
|
250
251
|
children: t.serverName
|
|
251
252
|
}),
|
|
252
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
253
|
+
/* @__PURE__ */ (0, P.jsx)(a, {
|
|
253
254
|
variant: "outline",
|
|
254
255
|
className: N ? "bg-blue-500/20 text-blue-600 dark:text-blue-400 border-blue-500/50" : "bg-green-500/20 text-green-600 dark:text-green-400 border-green-500/50",
|
|
255
256
|
children: j
|
|
@@ -262,8 +263,8 @@ function R({ request: t, onApprove: s, onReject: c, onClose: f, previewMode: p,
|
|
|
262
263
|
}), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
263
264
|
className: "flex items-center gap-2",
|
|
264
265
|
children: [
|
|
265
|
-
/* @__PURE__ */ (0, P.jsxs)(
|
|
266
|
-
render: /* @__PURE__ */ (0, P.jsx)(
|
|
266
|
+
/* @__PURE__ */ (0, P.jsxs)(r, { children: [/* @__PURE__ */ (0, P.jsx)(n, {
|
|
267
|
+
render: /* @__PURE__ */ (0, P.jsx)(c, {
|
|
267
268
|
variant: "ghost",
|
|
268
269
|
size: "sm",
|
|
269
270
|
onClick: y,
|
|
@@ -271,9 +272,9 @@ function R({ request: t, onApprove: s, onReject: c, onClose: f, previewMode: p,
|
|
|
271
272
|
children: v ? /* @__PURE__ */ (0, P.jsx)(u, { className: "h-4 w-4 text-green-600" }) : /* @__PURE__ */ (0, P.jsx)(d, { className: "h-4 w-4" })
|
|
272
273
|
}),
|
|
273
274
|
nativeButton: !0
|
|
274
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
275
|
-
/* @__PURE__ */ (0, P.jsxs)(
|
|
276
|
-
render: /* @__PURE__ */ (0, P.jsx)(
|
|
275
|
+
}), /* @__PURE__ */ (0, P.jsx)(i, { children: "Copy request" })] }),
|
|
276
|
+
/* @__PURE__ */ (0, P.jsxs)(r, { children: [/* @__PURE__ */ (0, P.jsx)(n, {
|
|
277
|
+
render: /* @__PURE__ */ (0, P.jsx)(c, {
|
|
277
278
|
variant: "ghost",
|
|
278
279
|
size: "sm",
|
|
279
280
|
onClick: b,
|
|
@@ -281,9 +282,9 @@ function R({ request: t, onApprove: s, onReject: c, onClose: f, previewMode: p,
|
|
|
281
282
|
children: /* @__PURE__ */ (0, P.jsx)(m, { className: "h-4 w-4" })
|
|
282
283
|
}),
|
|
283
284
|
nativeButton: !0
|
|
284
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
285
|
-
/* @__PURE__ */ (0, P.jsxs)(
|
|
286
|
-
render: /* @__PURE__ */ (0, P.jsx)(
|
|
285
|
+
}), /* @__PURE__ */ (0, P.jsx)(i, { children: "Download request" })] }),
|
|
286
|
+
/* @__PURE__ */ (0, P.jsxs)(r, { children: [/* @__PURE__ */ (0, P.jsx)(n, {
|
|
287
|
+
render: /* @__PURE__ */ (0, P.jsx)(c, {
|
|
287
288
|
variant: "ghost",
|
|
288
289
|
size: "sm",
|
|
289
290
|
onClick: x,
|
|
@@ -291,8 +292,8 @@ function R({ request: t, onApprove: s, onReject: c, onClose: f, previewMode: p,
|
|
|
291
292
|
children: /* @__PURE__ */ (0, P.jsx)(C, { className: "h-4 w-4" })
|
|
292
293
|
}),
|
|
293
294
|
nativeButton: !0
|
|
294
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
295
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
295
|
+
}), /* @__PURE__ */ (0, P.jsx)(i, { children: "Fullscreen" })] }),
|
|
296
|
+
/* @__PURE__ */ (0, P.jsx)(c, {
|
|
296
297
|
variant: "ghost",
|
|
297
298
|
size: "sm",
|
|
298
299
|
onClick: f,
|
|
@@ -332,7 +333,7 @@ function R({ request: t, onApprove: s, onReject: c, onClose: f, previewMode: p,
|
|
|
332
333
|
children: [/* @__PURE__ */ (0, P.jsx)("code", {
|
|
333
334
|
className: "flex-1 text-xs font-mono break-all",
|
|
334
335
|
children: t.request.url
|
|
335
|
-
}), /* @__PURE__ */ (0, P.jsxs)(
|
|
336
|
+
}), /* @__PURE__ */ (0, P.jsxs)(c, {
|
|
336
337
|
size: "sm",
|
|
337
338
|
variant: "outline",
|
|
338
339
|
onClick: () => {
|
|
@@ -389,7 +390,7 @@ function R({ request: t, onApprove: s, onReject: c, onClose: f, previewMode: p,
|
|
|
389
390
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
390
391
|
className: "flex gap-2 p-4 border-t dark:border-zinc-700",
|
|
391
392
|
children: [
|
|
392
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
393
|
+
/* @__PURE__ */ (0, P.jsx)(c, {
|
|
393
394
|
onClick: () => {
|
|
394
395
|
if (t) {
|
|
395
396
|
if (M) {
|
|
@@ -398,11 +399,11 @@ function R({ request: t, onApprove: s, onReject: c, onClose: f, previewMode: p,
|
|
|
398
399
|
D.error("Missing required fields", { description: `Please fill in: ${e.join(", ")}` });
|
|
399
400
|
return;
|
|
400
401
|
}
|
|
401
|
-
|
|
402
|
+
o(t.id, {
|
|
402
403
|
action: "accept",
|
|
403
404
|
content: S
|
|
404
405
|
});
|
|
405
|
-
} else N &&
|
|
406
|
+
} else N && o(t.id, { action: "accept" });
|
|
406
407
|
f(), import("./react-BIs9pQ3H.js").then((t) => /* @__PURE__ */ e(t.t(), 1)).then((e) => {
|
|
407
408
|
let t = D(e.createElement("div", { className: "space-y-3" }, e.createElement("div", null, e.createElement("strong", null, "Elicitation Response Sent"), e.createElement("p", { className: "text-sm text-muted-foreground mt-1" }, "The tool will continue executing.")), e.createElement("div", { className: "flex gap-2" }, e.createElement("button", {
|
|
408
409
|
"data-testid": "elicitation-view-tool-result",
|
|
@@ -420,18 +421,18 @@ function R({ request: t, onApprove: s, onReject: c, onClose: f, previewMode: p,
|
|
|
420
421
|
"data-testid": "elicitation-accept-button",
|
|
421
422
|
children: "Accept"
|
|
422
423
|
}),
|
|
423
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
424
|
+
/* @__PURE__ */ (0, P.jsx)(c, {
|
|
424
425
|
onClick: () => {
|
|
425
|
-
t && (
|
|
426
|
+
t && (o(t.id, { action: "decline" }), f());
|
|
426
427
|
},
|
|
427
428
|
variant: "outline",
|
|
428
429
|
className: "flex-1",
|
|
429
430
|
"data-testid": "elicitation-decline-button",
|
|
430
431
|
children: "Decline"
|
|
431
432
|
}),
|
|
432
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
433
|
+
/* @__PURE__ */ (0, P.jsx)(c, {
|
|
433
434
|
onClick: () => {
|
|
434
|
-
t && (
|
|
435
|
+
t && (s(t.id, "User cancelled elicitation request"), f());
|
|
435
436
|
},
|
|
436
437
|
variant: "outline",
|
|
437
438
|
className: "flex-1",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import {
|
|
2
|
+
import { c as n, g as r, m as i, s as a, v as o } from "./button-CB4uOoUV.js";
|
|
3
3
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/useValueChanged.mjs
|
|
4
4
|
var s = /* @__PURE__ */ e(t(), 1);
|
|
5
5
|
function c(e, t) {
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, [e, i]),
|
|
10
|
-
|
|
6
|
+
let n = s.useRef(e), i = o(t);
|
|
7
|
+
r(() => {
|
|
8
|
+
n.current !== e && i(n.current);
|
|
9
|
+
}, [e, i]), r(() => {
|
|
10
|
+
n.current = e;
|
|
11
11
|
}, [e]);
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
@@ -47,51 +47,51 @@ var l = /*#__PURE__*/ function(e) {
|
|
|
47
47
|
value: "",
|
|
48
48
|
initialValue: null
|
|
49
49
|
},
|
|
50
|
-
setValidityData:
|
|
50
|
+
setValidityData: n,
|
|
51
51
|
disabled: void 0,
|
|
52
52
|
touched: d.touched,
|
|
53
|
-
setTouched:
|
|
53
|
+
setTouched: n,
|
|
54
54
|
dirty: d.dirty,
|
|
55
|
-
setDirty:
|
|
55
|
+
setDirty: n,
|
|
56
56
|
filled: d.filled,
|
|
57
|
-
setFilled:
|
|
57
|
+
setFilled: n,
|
|
58
58
|
focused: d.focused,
|
|
59
|
-
setFocused:
|
|
59
|
+
setFocused: n,
|
|
60
60
|
validate: () => null,
|
|
61
61
|
validationMode: "onSubmit",
|
|
62
62
|
validationDebounceTime: 0,
|
|
63
63
|
shouldValidateOnChange: () => !1,
|
|
64
64
|
state: f,
|
|
65
65
|
markedDirtyRef: { current: !1 },
|
|
66
|
-
registerFieldControl:
|
|
66
|
+
registerFieldControl: n,
|
|
67
67
|
validation: {
|
|
68
68
|
getValidationProps: (e, t = a) => t,
|
|
69
69
|
inputRef: { current: null },
|
|
70
|
-
registerInput:
|
|
70
|
+
registerInput: n,
|
|
71
71
|
commit: async () => {},
|
|
72
|
-
change:
|
|
72
|
+
change: n
|
|
73
73
|
}
|
|
74
74
|
}, h = /*#__PURE__*/ s.createContext(m);
|
|
75
75
|
process.env.NODE_ENV !== "production" && (h.displayName = "FieldRootContext");
|
|
76
76
|
function g(e = !0) {
|
|
77
77
|
let t = s.useContext(h);
|
|
78
|
-
if (t.setValidityData ===
|
|
78
|
+
if (t.setValidityData === n && !e) throw Error(process.env.NODE_ENV === "production" ? i(28) : "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
|
|
79
79
|
return t;
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
82
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
|
|
83
|
-
function _(e, t,
|
|
83
|
+
function _(e, t, n, i, a = !0, o) {
|
|
84
84
|
let { registerFieldControl: c } = g(), l = s.useRef(null);
|
|
85
|
-
l.current ||= Symbol(),
|
|
86
|
-
let
|
|
87
|
-
if (!(!
|
|
85
|
+
l.current ||= Symbol(), r(() => {
|
|
86
|
+
let r = l.current;
|
|
87
|
+
if (!(!r || !a)) return c(r, {
|
|
88
88
|
controlRef: e,
|
|
89
89
|
getValue: i,
|
|
90
90
|
id: t,
|
|
91
91
|
name: o,
|
|
92
|
-
value:
|
|
92
|
+
value: n
|
|
93
93
|
}), () => {
|
|
94
|
-
c(
|
|
94
|
+
c(r, void 0);
|
|
95
95
|
};
|
|
96
96
|
}, [
|
|
97
97
|
e,
|
|
@@ -100,18 +100,18 @@ function _(e, t, r, i, a = !0, o) {
|
|
|
100
100
|
t,
|
|
101
101
|
o,
|
|
102
102
|
c,
|
|
103
|
-
|
|
103
|
+
n
|
|
104
104
|
]);
|
|
105
105
|
}
|
|
106
106
|
//#endregion
|
|
107
107
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
|
|
108
108
|
var v = /*#__PURE__*/ s.createContext({
|
|
109
109
|
controlId: void 0,
|
|
110
|
-
registerControlId:
|
|
110
|
+
registerControlId: n,
|
|
111
111
|
labelId: void 0,
|
|
112
|
-
setLabelId:
|
|
112
|
+
setLabelId: n,
|
|
113
113
|
messageIds: [],
|
|
114
|
-
setMessageIds:
|
|
114
|
+
setMessageIds: n,
|
|
115
115
|
getDescriptionProps: (e) => e
|
|
116
116
|
});
|
|
117
117
|
process.env.NODE_ENV !== "production" && (v.displayName = "LabelableContext");
|
|
@@ -123,7 +123,7 @@ function y() {
|
|
|
123
123
|
var b = /*#__PURE__*/ s.createContext({
|
|
124
124
|
formRef: { current: { fields: /* @__PURE__ */ new Map() } },
|
|
125
125
|
errors: {},
|
|
126
|
-
clearErrors:
|
|
126
|
+
clearErrors: n,
|
|
127
127
|
validationMode: "onSubmit",
|
|
128
128
|
submitAttemptedRef: { current: !1 }
|
|
129
129
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n } from "./createLucideIcon-BONxC1L5.js";
|
|
3
3
|
//#region src/client/context/InspectorContext.tsx
|
|
4
4
|
var r = /* @__PURE__ */ e(t(), 1), i = n(), a = (0, r.createContext)(void 0);
|
|
5
5
|
function o({ children: e }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { K as n
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as o } from "./
|
|
5
|
-
var s =
|
|
2
|
+
import { K as n } from "./input-BCpgLXU1.js";
|
|
3
|
+
import { n as r, t as i } from "./createLucideIcon-BONxC1L5.js";
|
|
4
|
+
import { U as a, t as o } from "./button-CB4uOoUV.js";
|
|
5
|
+
var s = i("download", [
|
|
6
6
|
["path", {
|
|
7
7
|
d: "M12 15V3",
|
|
8
8
|
key: "m9g1x1"
|
|
@@ -79,7 +79,7 @@ function h(e, t) {
|
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/client/utils/highlightJson.tsx
|
|
82
|
-
var g =
|
|
82
|
+
var g = r(), _ = {
|
|
83
83
|
key: "text-sky-600 dark:text-sky-400",
|
|
84
84
|
string: "text-emerald-600 dark:text-emerald-400",
|
|
85
85
|
number: "text-amber-600 dark:text-amber-400",
|
|
@@ -174,13 +174,13 @@ function S(e) {
|
|
|
174
174
|
function C(e) {
|
|
175
175
|
return Array.isArray(e) ? `[${e.length}]` : `{${Object.keys(e).length}}`;
|
|
176
176
|
}
|
|
177
|
-
function w({ label: e, value: t, depth:
|
|
178
|
-
let o = typeof t == "object" && t && !Array.isArray(t) ? Object.keys(t).length > 0 : Array.isArray(t) ? t.length > 0 : !1, [s, c] = (0, b.useState)(o && (
|
|
177
|
+
function w({ label: e, value: t, depth: r, defaultExpanded: i }) {
|
|
178
|
+
let o = typeof t == "object" && t && !Array.isArray(t) ? Object.keys(t).length > 0 : Array.isArray(t) ? t.length > 0 : !1, [s, c] = (0, b.useState)(o && (i || r === 0));
|
|
179
179
|
if (!o) {
|
|
180
180
|
let n = Array.isArray(t) ? "[]" : "{}";
|
|
181
181
|
return typeof t == "object" && t ? /* @__PURE__ */ (0, g.jsxs)("div", {
|
|
182
182
|
className: "font-mono text-[0.8rem] leading-relaxed",
|
|
183
|
-
style: { paddingLeft:
|
|
183
|
+
style: { paddingLeft: r * 12 },
|
|
184
184
|
children: [e != null && /* @__PURE__ */ (0, g.jsxs)(g.Fragment, { children: [/* @__PURE__ */ (0, g.jsx)("span", {
|
|
185
185
|
className: x.key,
|
|
186
186
|
children: JSON.stringify(e)
|
|
@@ -193,7 +193,7 @@ function w({ label: e, value: t, depth: i, defaultExpanded: a }) {
|
|
|
193
193
|
})]
|
|
194
194
|
}) : /* @__PURE__ */ (0, g.jsxs)("div", {
|
|
195
195
|
className: "font-mono text-[0.8rem] leading-relaxed",
|
|
196
|
-
style: { paddingLeft:
|
|
196
|
+
style: { paddingLeft: r * 12 },
|
|
197
197
|
children: [e != null && /* @__PURE__ */ (0, g.jsxs)(g.Fragment, { children: [/* @__PURE__ */ (0, g.jsx)("span", {
|
|
198
198
|
className: x.key,
|
|
199
199
|
children: JSON.stringify(e)
|
|
@@ -208,13 +208,13 @@ function w({ label: e, value: t, depth: i, defaultExpanded: a }) {
|
|
|
208
208
|
className: "font-mono text-[0.8rem] leading-relaxed",
|
|
209
209
|
children: [/* @__PURE__ */ (0, g.jsxs)("div", {
|
|
210
210
|
className: "flex items-start gap-0.5",
|
|
211
|
-
style: { paddingLeft:
|
|
211
|
+
style: { paddingLeft: r * 12 },
|
|
212
212
|
children: [/* @__PURE__ */ (0, g.jsx)("button", {
|
|
213
213
|
type: "button",
|
|
214
214
|
"aria-expanded": s,
|
|
215
215
|
onClick: () => c((e) => !e),
|
|
216
216
|
className: "mt-0.5 inline-flex shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground",
|
|
217
|
-
children: /* @__PURE__ */ (0, g.jsx)(n, { className:
|
|
217
|
+
children: /* @__PURE__ */ (0, g.jsx)(n, { className: a("h-3.5 w-3.5 transition-transform", s && "rotate-90") })
|
|
218
218
|
}), /* @__PURE__ */ (0, g.jsxs)("div", {
|
|
219
219
|
className: "min-w-0 flex-1",
|
|
220
220
|
children: [
|
|
@@ -243,10 +243,10 @@ function w({ label: e, value: t, depth: i, defaultExpanded: a }) {
|
|
|
243
243
|
}), s && /* @__PURE__ */ (0, g.jsxs)("div", { children: [l.map(([e, t]) => /* @__PURE__ */ (0, g.jsx)(w, {
|
|
244
244
|
label: e,
|
|
245
245
|
value: t,
|
|
246
|
-
depth:
|
|
247
|
-
defaultExpanded:
|
|
248
|
-
}, `${
|
|
249
|
-
style: { paddingLeft:
|
|
246
|
+
depth: r + 1,
|
|
247
|
+
defaultExpanded: i
|
|
248
|
+
}, `${r}-${e}`)), /* @__PURE__ */ (0, g.jsx)("div", {
|
|
249
|
+
style: { paddingLeft: r * 12 },
|
|
250
250
|
children: /* @__PURE__ */ (0, g.jsx)("span", {
|
|
251
251
|
className: x.punctuation,
|
|
252
252
|
children: f
|
|
@@ -256,7 +256,7 @@ function w({ label: e, value: t, depth: i, defaultExpanded: a }) {
|
|
|
256
256
|
}
|
|
257
257
|
function T({ data: e, defaultExpanded: t = !0, className: n }) {
|
|
258
258
|
return /* @__PURE__ */ (0, g.jsx)("div", {
|
|
259
|
-
className:
|
|
259
|
+
className: a("text-gray-900 dark:text-gray-100 [overflow-wrap:anywhere]", n),
|
|
260
260
|
"data-testid": "collapsible-json",
|
|
261
261
|
children: /* @__PURE__ */ (0, g.jsx)(w, {
|
|
262
262
|
value: e,
|
|
@@ -268,7 +268,7 @@ function T({ data: e, defaultExpanded: t = !0, className: n }) {
|
|
|
268
268
|
//#endregion
|
|
269
269
|
//#region src/client/components/shared/JSONDisplay.tsx
|
|
270
270
|
var E = "font-mono text-[0.8rem] text-gray-900 dark:text-gray-100 whitespace-pre-wrap break-words [overflow-wrap:anywhere]";
|
|
271
|
-
function D({ data: e, filename: t, className: n, collapsible: r = !1, defaultExpanded:
|
|
271
|
+
function D({ data: e, filename: t, className: n, collapsible: r = !1, defaultExpanded: i = !0, ...a }) {
|
|
272
272
|
let c = m(e), l = p(e), u = c.isLarge ? /* @__PURE__ */ (0, g.jsx)("div", {
|
|
273
273
|
className: "mb-3 p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg",
|
|
274
274
|
children: /* @__PURE__ */ (0, g.jsxs)("div", {
|
|
@@ -286,7 +286,7 @@ function D({ data: e, filename: t, className: n, collapsible: r = !1, defaultExp
|
|
|
286
286
|
className: "text-xs text-yellow-700 dark:text-yellow-400",
|
|
287
287
|
children: "Showing full structure with truncated values. Download the full JSON file to see complete values."
|
|
288
288
|
})]
|
|
289
|
-
}), /* @__PURE__ */ (0, g.jsxs)(
|
|
289
|
+
}), /* @__PURE__ */ (0, g.jsxs)(o, {
|
|
290
290
|
variant: "outline",
|
|
291
291
|
size: "sm",
|
|
292
292
|
onClick: () => {
|
|
@@ -299,21 +299,21 @@ function D({ data: e, filename: t, className: n, collapsible: r = !1, defaultExp
|
|
|
299
299
|
}) : null;
|
|
300
300
|
return r ? /* @__PURE__ */ (0, g.jsxs)("div", {
|
|
301
301
|
className: n,
|
|
302
|
-
...
|
|
302
|
+
...a,
|
|
303
303
|
children: [u, /* @__PURE__ */ (0, g.jsx)(T, {
|
|
304
304
|
data: l,
|
|
305
|
-
defaultExpanded:
|
|
305
|
+
defaultExpanded: i
|
|
306
306
|
})]
|
|
307
307
|
}) : c.isLarge ? /* @__PURE__ */ (0, g.jsxs)("div", {
|
|
308
308
|
className: n,
|
|
309
|
-
...
|
|
309
|
+
...a,
|
|
310
310
|
children: [u, /* @__PURE__ */ (0, g.jsx)("pre", {
|
|
311
311
|
className: E,
|
|
312
312
|
children: /* @__PURE__ */ (0, g.jsx)("code", { children: y(c.preview) })
|
|
313
313
|
})]
|
|
314
314
|
}) : /* @__PURE__ */ (0, g.jsx)("div", {
|
|
315
315
|
className: n,
|
|
316
|
-
...
|
|
316
|
+
...a,
|
|
317
317
|
children: /* @__PURE__ */ (0, g.jsx)("pre", {
|
|
318
318
|
className: E,
|
|
319
319
|
children: /* @__PURE__ */ (0, g.jsx)("code", { children: y(c.preview) })
|