@mcp-use/inspector 20.0.0-beta.4 → 20.0.0-beta.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (580) hide show
  1. package/README.md +31 -78
  2. package/dist/app/inspector.css.gz +0 -0
  3. package/dist/app/inspector.js.gz +0 -0
  4. package/dist/app/providers/anthropic.png +0 -0
  5. package/dist/app/providers/google.png +0 -0
  6. package/dist/app/providers/openai.png +0 -0
  7. package/dist/cli.js +74 -1398
  8. package/dist/client/index.d.ts +1402 -50
  9. package/dist/client/index.js +165 -24019
  10. package/dist/server/index.d.ts +79 -7
  11. package/dist/server/index.js +99 -23
  12. package/package.json +77 -35
  13. package/dist/cdn/AnimatePresence-Dcw-FOy8.js +0 -393
  14. package/dist/cdn/ChatTab-UQAPDRQG.js +0 -6744
  15. package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
  16. package/dist/cdn/ConnectionSettingsForm-DrY1p-NO.js +0 -929
  17. package/dist/cdn/ConnectionSettingsTab-B1cRD7hz.js +0 -150
  18. package/dist/cdn/ElicitationTab-CL1KJ0bz.js +0 -654
  19. package/dist/cdn/FormContext-tmgN_Vdr.js +0 -135
  20. package/dist/cdn/InspectorContext-UjtEbNod.js +0 -123
  21. package/dist/cdn/JSONDisplay-BFxf5oEu.js +0 -324
  22. package/dist/cdn/ListTabHeader-Cv-GmtGF.js +0 -88
  23. package/dist/cdn/ManufactOAuthCallback-B98kSYCj.js +0 -31
  24. package/dist/cdn/MarkdownRenderer-BoDJE8tP.js +0 -3610
  25. package/dist/cdn/NotificationsTab-CeImSrhx.js +0 -290
  26. package/dist/cdn/OAuthCallback-C9AvCkOn.js +0 -58
  27. package/dist/cdn/PromptsTab-CkAWyWVb.js +0 -901
  28. package/dist/cdn/ResourcesTab-BtBKxd4c.js +0 -564
  29. package/dist/cdn/SamplingTab-Czp7Rmhz.js +0 -658
  30. package/dist/cdn/ServerMetadataTab-CvrKX8fz.js +0 -244
  31. package/dist/cdn/StatusIcon-D0-ARyOh.js +0 -66
  32. package/dist/cdn/ToolsTab-Dm4vCB8D.js +0 -2033
  33. package/dist/cdn/ViewPreview-CZvl_7x-.js +0 -238
  34. package/dist/cdn/WidgetDebugContext-D4usL_MA.js +0 -324
  35. package/dist/cdn/WidgetWrapper-DeiogRXV.js +0 -2210
  36. package/dist/cdn/basePath-B8HuhIMu.js +0 -25
  37. package/dist/cdn/bell-CGjAO_0s.js +0 -10
  38. package/dist/cdn/browser-CbQIH4w2.js +0 -42
  39. package/dist/cdn/brush-B_mKhyxG.js +0 -17
  40. package/dist/cdn/card-DgiYnSg-.js +0 -41
  41. package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
  42. package/dist/cdn/checkbox-By0FklhG.js +0 -20
  43. package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
  44. package/dist/cdn/clock-CmUbSx_B.js +0 -12
  45. package/dist/cdn/code-V_0nf5rg.js +0 -10
  46. package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
  47. package/dist/cdn/dialog-BsDpuJd3.js +0 -1028
  48. package/dist/cdn/dist-3QLh0dt8.js +0 -2306
  49. package/dist/cdn/dist-DaMB0Su9.js +0 -616
  50. package/dist/cdn/external-link-CjmfT6rW.js +0 -17
  51. package/dist/cdn/eye-B7H96av8.js +0 -29
  52. package/dist/cdn/folder-open-B3lu2rG_.js +0 -7
  53. package/dist/cdn/hash-BVQnWi7q.js +0 -33
  54. package/dist/cdn/history-Csw4rb44.js +0 -17
  55. package/dist/cdn/index-browser-CIoYSwCt.js +0 -1934
  56. package/dist/cdn/info-CNiOwqkf.js +0 -19
  57. package/dist/cdn/input-C2OBd4PJ.js +0 -12160
  58. package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
  59. package/dist/cdn/inspector.css +0 -2
  60. package/dist/cdn/inspector.js +0 -24523
  61. package/dist/cdn/jsx-runtime-CIxvMpEo.js +0 -180
  62. package/dist/cdn/label-B9Jmm9be.js +0 -60
  63. package/dist/cdn/loader-circle-BLy9A_pp.js +0 -7
  64. package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
  65. package/dist/cdn/maximize-2-CH5Lq90B.js +0 -21
  66. package/dist/cdn/maximize-BALCV_ep.js +0 -21
  67. package/dist/cdn/message-square-BnxdpJxZ.js +0 -7
  68. package/dist/cdn/not-found-DEtSM_Wd.js +0 -34
  69. package/dist/cdn/play-vuZ5PLnI.js +0 -7
  70. package/dist/cdn/providerMeta-BQIfHuNL.js +0 -379
  71. package/dist/cdn/providers/anthropic.png +0 -0
  72. package/dist/cdn/providers/google.png +0 -0
  73. package/dist/cdn/providers/openai.png +0 -0
  74. package/dist/cdn/react-0oJnFpBS.js +0 -5425
  75. package/dist/cdn/react-BIs9pQ3H.js +0 -926
  76. package/dist/cdn/refresh-cw-BXY-Pa0U.js +0 -21
  77. package/dist/cdn/save-Tgil_AJZ.js +0 -34
  78. package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
  79. package/dist/cdn/select-DDdiIPR2.js +0 -2594
  80. package/dist/cdn/servers-Dm72iTpY.js +0 -26
  81. package/dist/cdn/shared-DaILIQPP.js +0 -1700
  82. package/dist/cdn/sheet-Br_l2kry.js +0 -2077
  83. package/dist/cdn/sparkles-BntO2rDR.js +0 -23
  84. package/dist/cdn/spinner-jQtC7EBj.js +0 -15
  85. package/dist/cdn/square-check-big-BvwQ17Bl.js +0 -10
  86. package/dist/cdn/switch-C3IyQuid.js +0 -664
  87. package/dist/cdn/tabs-subtle-CkdI6Mac.js +0 -787
  88. package/dist/cdn/telemetry-BbhH1Z_E.js +0 -240
  89. package/dist/cdn/textarea-DSbwcFVt.js +0 -14
  90. package/dist/cdn/trash-2-RwpJY5SL.js +0 -25
  91. package/dist/cdn/useAriaLabelledBy-DqAdnppm.js +0 -29
  92. package/dist/cdn/useCompositeItem-BRqEzYh-.js +0 -26
  93. package/dist/cdn/useConfig-BNpU7Atw.js +0 -235
  94. package/dist/cdn/useSavedRequests-Ci2I919u.js +0 -51
  95. package/dist/cdn/useViewHostProps-ru80AnlT.js +0 -349
  96. package/dist/cdn/wrench-DzGmCfnb.js +0 -7
  97. package/dist/cdn/x-C3vRQIYu.js +0 -10
  98. package/dist/cdn/zap-Mb-pbw2X.js +0 -10
  99. package/dist/client/auth/manufact-auth.d.ts +0 -32
  100. package/dist/client/auth/manufact-auth.d.ts.map +0 -1
  101. package/dist/client/chat-history/ChatHistoryHeader.d.ts +0 -4
  102. package/dist/client/chat-history/ChatHistoryHeader.d.ts.map +0 -1
  103. package/dist/client/chat-history/ChatHistoryPanel.d.ts +0 -28
  104. package/dist/client/chat-history/ChatHistoryPanel.d.ts.map +0 -1
  105. package/dist/client/chat-history/ChatHistoryRail.d.ts +0 -5
  106. package/dist/client/chat-history/ChatHistoryRail.d.ts.map +0 -1
  107. package/dist/client/chat-history/ChatList.d.ts +0 -18
  108. package/dist/client/chat-history/ChatList.d.ts.map +0 -1
  109. package/dist/client/chat-history/ChatTitleReveal.d.ts +0 -10
  110. package/dist/client/chat-history/ChatTitleReveal.d.ts.map +0 -1
  111. package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts +0 -13
  112. package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts.map +0 -1
  113. package/dist/client/chat-history/chat-title.d.ts +0 -10
  114. package/dist/client/chat-history/chat-title.d.ts.map +0 -1
  115. package/dist/client/chat-history/providers/local-storage.d.ts +0 -21
  116. package/dist/client/chat-history/providers/local-storage.d.ts.map +0 -1
  117. package/dist/client/chat-history/types.d.ts +0 -39
  118. package/dist/client/chat-history/types.d.ts.map +0 -1
  119. package/dist/client/chat-history/useChatHistory.d.ts +0 -20
  120. package/dist/client/chat-history/useChatHistory.d.ts.map +0 -1
  121. package/dist/client/chat-history/useChatTitleGeneration.d.ts +0 -17
  122. package/dist/client/chat-history/useChatTitleGeneration.d.ts.map +0 -1
  123. package/dist/client/components/AddToClientDropdown.d.ts +0 -52
  124. package/dist/client/components/AddToClientDropdown.d.ts.map +0 -1
  125. package/dist/client/components/ChatTab.d.ts +0 -98
  126. package/dist/client/components/ChatTab.d.ts.map +0 -1
  127. package/dist/client/components/IframeConsole.d.ts +0 -7
  128. package/dist/client/components/IframeConsole.d.ts.map +0 -1
  129. package/dist/client/components/MCPAppsDebugControls.d.ts +0 -19
  130. package/dist/client/components/MCPAppsDebugControls.d.ts.map +0 -1
  131. package/dist/client/components/PromptsTab.d.ts +0 -34
  132. package/dist/client/components/PromptsTab.d.ts.map +0 -1
  133. package/dist/client/components/ResourcesTab.d.ts +0 -31
  134. package/dist/client/components/ResourcesTab.d.ts.map +0 -1
  135. package/dist/client/components/ToolsTab.d.ts +0 -39
  136. package/dist/client/components/ToolsTab.d.ts.map +0 -1
  137. package/dist/client/components/chat/AssistantMessage.d.ts +0 -10
  138. package/dist/client/components/chat/AssistantMessage.d.ts.map +0 -1
  139. package/dist/client/components/chat/ChatHeader.d.ts +0 -70
  140. package/dist/client/components/chat/ChatHeader.d.ts.map +0 -1
  141. package/dist/client/components/chat/ChatInput.d.ts +0 -29
  142. package/dist/client/components/chat/ChatInput.d.ts.map +0 -1
  143. package/dist/client/components/chat/ChatInputArea.d.ts +0 -65
  144. package/dist/client/components/chat/ChatInputArea.d.ts.map +0 -1
  145. package/dist/client/components/chat/ChatLandingForm.d.ts +0 -15
  146. package/dist/client/components/chat/ChatLandingForm.d.ts.map +0 -1
  147. package/dist/client/components/chat/ChatManagedNotice.d.ts +0 -10
  148. package/dist/client/components/chat/ChatManagedNotice.d.ts.map +0 -1
  149. package/dist/client/components/chat/ChatScrollToBottomButton.d.ts +0 -7
  150. package/dist/client/components/chat/ChatScrollToBottomButton.d.ts.map +0 -1
  151. package/dist/client/components/chat/ChatScrollTopFade.d.ts +0 -7
  152. package/dist/client/components/chat/ChatScrollTopFade.d.ts.map +0 -1
  153. package/dist/client/components/chat/ChatTraceView.d.ts +0 -7
  154. package/dist/client/components/chat/ChatTraceView.d.ts.map +0 -1
  155. package/dist/client/components/chat/ConfigurationDialog.d.ts +0 -42
  156. package/dist/client/components/chat/ConfigurationDialog.d.ts.map +0 -1
  157. package/dist/client/components/chat/ConfigureEmptyState.d.ts +0 -6
  158. package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +0 -1
  159. package/dist/client/components/chat/CopyButton.d.ts +0 -10
  160. package/dist/client/components/chat/CopyButton.d.ts.map +0 -1
  161. package/dist/client/components/chat/FloatingChatElicitation.d.ts +0 -10
  162. package/dist/client/components/chat/FloatingChatElicitation.d.ts.map +0 -1
  163. package/dist/client/components/chat/McpReconnectBanner.d.ts +0 -10
  164. package/dist/client/components/chat/McpReconnectBanner.d.ts.map +0 -1
  165. package/dist/client/components/chat/MessageList.d.ts +0 -47
  166. package/dist/client/components/chat/MessageList.d.ts.map +0 -1
  167. package/dist/client/components/chat/MessageMetaActions.d.ts +0 -7
  168. package/dist/client/components/chat/MessageMetaActions.d.ts.map +0 -1
  169. package/dist/client/components/chat/PromptResultsList.d.ts +0 -8
  170. package/dist/client/components/chat/PromptResultsList.d.ts.map +0 -1
  171. package/dist/client/components/chat/PromptsDropdown.d.ts +0 -11
  172. package/dist/client/components/chat/PromptsDropdown.d.ts.map +0 -1
  173. package/dist/client/components/chat/StreamingAssistantContent.d.ts +0 -7
  174. package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +0 -1
  175. package/dist/client/components/chat/SystemPromptButton.d.ts +0 -11
  176. package/dist/client/components/chat/SystemPromptButton.d.ts.map +0 -1
  177. package/dist/client/components/chat/ToolCallDisplay.d.ts +0 -10
  178. package/dist/client/components/chat/ToolCallDisplay.d.ts.map +0 -1
  179. package/dist/client/components/chat/ToolResultRenderer.d.ts +0 -15
  180. package/dist/client/components/chat/ToolResultRenderer.d.ts.map +0 -1
  181. package/dist/client/components/chat/ToolSelector.d.ts +0 -13
  182. package/dist/client/components/chat/ToolSelector.d.ts.map +0 -1
  183. package/dist/client/components/chat/UserMessage.d.ts +0 -10
  184. package/dist/client/components/chat/UserMessage.d.ts.map +0 -1
  185. package/dist/client/components/chat/chat-bar-styles.d.ts +0 -6
  186. package/dist/client/components/chat/chat-bar-styles.d.ts.map +0 -1
  187. package/dist/client/components/chat/chatModeStorage.d.ts +0 -11
  188. package/dist/client/components/chat/chatModeStorage.d.ts.map +0 -1
  189. package/dist/client/components/chat/conversion.d.ts +0 -19
  190. package/dist/client/components/chat/conversion.d.ts.map +0 -1
  191. package/dist/client/components/chat/freeTier.d.ts +0 -32
  192. package/dist/client/components/chat/freeTier.d.ts.map +0 -1
  193. package/dist/client/components/chat/managedChatNotice.d.ts +0 -16
  194. package/dist/client/components/chat/managedChatNotice.d.ts.map +0 -1
  195. package/dist/client/components/chat/providerMeta.d.ts +0 -27
  196. package/dist/client/components/chat/providerMeta.d.ts.map +0 -1
  197. package/dist/client/components/chat/system-prompt/local-storage.d.ts +0 -5
  198. package/dist/client/components/chat/system-prompt/local-storage.d.ts.map +0 -1
  199. package/dist/client/components/chat/system-prompt/types.d.ts +0 -8
  200. package/dist/client/components/chat/system-prompt/types.d.ts.map +0 -1
  201. package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts +0 -3
  202. package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts.map +0 -1
  203. package/dist/client/components/chat/system-prompt-default.d.ts +0 -2
  204. package/dist/client/components/chat/system-prompt-default.d.ts.map +0 -1
  205. package/dist/client/components/chat/trace.d.ts +0 -84
  206. package/dist/client/components/chat/trace.d.ts.map +0 -1
  207. package/dist/client/components/chat/types.d.ts +0 -75
  208. package/dist/client/components/chat/types.d.ts.map +0 -1
  209. package/dist/client/components/chat/useChatMessages.d.ts +0 -76
  210. package/dist/client/components/chat/useChatMessages.d.ts.map +0 -1
  211. package/dist/client/components/chat/useChatMessagesClientSide.d.ts +0 -43
  212. package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +0 -1
  213. package/dist/client/components/chat/useChatScrollToBottom.d.ts +0 -14
  214. package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +0 -1
  215. package/dist/client/components/chat/useConfig.d.ts +0 -24
  216. package/dist/client/components/chat/useConfig.d.ts.map +0 -1
  217. package/dist/client/components/chat/useHostedChatMode.d.ts +0 -14
  218. package/dist/client/components/chat/useHostedChatMode.d.ts.map +0 -1
  219. package/dist/client/components/chat/useManagedCloudModel.d.ts +0 -14
  220. package/dist/client/components/chat/useManagedCloudModel.d.ts.map +0 -1
  221. package/dist/client/components/chat/utils.d.ts +0 -11
  222. package/dist/client/components/chat/utils.d.ts.map +0 -1
  223. package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts +0 -12
  224. package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts.map +0 -1
  225. package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts +0 -9
  226. package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts.map +0 -1
  227. package/dist/client/components/elicitation/shared/schemaHelpers.d.ts +0 -8
  228. package/dist/client/components/elicitation/shared/schemaHelpers.d.ts.map +0 -1
  229. package/dist/client/components/prompts/PromptExecutionPanel.d.ts +0 -13
  230. package/dist/client/components/prompts/PromptExecutionPanel.d.ts.map +0 -1
  231. package/dist/client/components/prompts/PromptInputForm.d.ts +0 -9
  232. package/dist/client/components/prompts/PromptInputForm.d.ts.map +0 -1
  233. package/dist/client/components/prompts/PromptMessageCard.d.ts +0 -29
  234. package/dist/client/components/prompts/PromptMessageCard.d.ts.map +0 -1
  235. package/dist/client/components/prompts/PromptResultDisplay.d.ts +0 -34
  236. package/dist/client/components/prompts/PromptResultDisplay.d.ts.map +0 -1
  237. package/dist/client/components/prompts/PromptsList.d.ts +0 -10
  238. package/dist/client/components/prompts/PromptsList.d.ts.map +0 -1
  239. package/dist/client/components/prompts/SavedPromptsList.d.ts +0 -19
  240. package/dist/client/components/prompts/SavedPromptsList.d.ts.map +0 -1
  241. package/dist/client/components/resources/PropsConfigDialog.d.ts +0 -16
  242. package/dist/client/components/resources/PropsConfigDialog.d.ts.map +0 -1
  243. package/dist/client/components/resources/ResourceResultDisplay.d.ts +0 -30
  244. package/dist/client/components/resources/ResourceResultDisplay.d.ts.map +0 -1
  245. package/dist/client/components/resources/ResourcesList.d.ts +0 -10
  246. package/dist/client/components/resources/ResourcesList.d.ts.map +0 -1
  247. package/dist/client/components/shared/CollapsibleJSON.d.ts +0 -6
  248. package/dist/client/components/shared/CollapsibleJSON.d.ts.map +0 -1
  249. package/dist/client/components/shared/InspectorScrollArea.d.ts +0 -9
  250. package/dist/client/components/shared/InspectorScrollArea.d.ts.map +0 -1
  251. package/dist/client/components/shared/JSONDisplay.d.ts +0 -12
  252. package/dist/client/components/shared/JSONDisplay.d.ts.map +0 -1
  253. package/dist/client/components/shared/ListItem.d.ts +0 -24
  254. package/dist/client/components/shared/ListItem.d.ts.map +0 -1
  255. package/dist/client/components/shared/ListTabHeader.d.ts +0 -47
  256. package/dist/client/components/shared/ListTabHeader.d.ts.map +0 -1
  257. package/dist/client/components/shared/MarkdownRenderer.d.ts +0 -15
  258. package/dist/client/components/shared/MarkdownRenderer.d.ts.map +0 -1
  259. package/dist/client/components/shared/SchemaFormField.d.ts +0 -12
  260. package/dist/client/components/shared/SchemaFormField.d.ts.map +0 -1
  261. package/dist/client/components/shared/SearchTabHeader.d.ts +0 -28
  262. package/dist/client/components/shared/SearchTabHeader.d.ts.map +0 -1
  263. package/dist/client/components/shared/StatusIcon.d.ts +0 -12
  264. package/dist/client/components/shared/StatusIcon.d.ts.map +0 -1
  265. package/dist/client/components/shared/index.d.ts +0 -7
  266. package/dist/client/components/shared/index.d.ts.map +0 -1
  267. package/dist/client/components/tools/SaveRequestDialog.d.ts +0 -11
  268. package/dist/client/components/tools/SaveRequestDialog.d.ts.map +0 -1
  269. package/dist/client/components/tools/SavedRequestsList.d.ts +0 -19
  270. package/dist/client/components/tools/SavedRequestsList.d.ts.map +0 -1
  271. package/dist/client/components/tools/ToolExecutionPanel.d.ts +0 -20
  272. package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +0 -1
  273. package/dist/client/components/tools/ToolInputForm.d.ts +0 -14
  274. package/dist/client/components/tools/ToolInputForm.d.ts.map +0 -1
  275. package/dist/client/components/tools/ToolResultDisplay.d.ts +0 -24
  276. package/dist/client/components/tools/ToolResultDisplay.d.ts.map +0 -1
  277. package/dist/client/components/tools/ToolsList.d.ts +0 -10
  278. package/dist/client/components/tools/ToolsList.d.ts.map +0 -1
  279. package/dist/client/components/tools/schema-utils.d.ts +0 -13
  280. package/dist/client/components/tools/schema-utils.d.ts.map +0 -1
  281. package/dist/client/components/tools/useToolExecution.d.ts +0 -26
  282. package/dist/client/components/tools/useToolExecution.d.ts.map +0 -1
  283. package/dist/client/components/tools/useToolsTabNavigation.d.ts +0 -35
  284. package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +0 -1
  285. package/dist/client/components/ui/MeshGradientCanvas.d.ts +0 -13
  286. package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +0 -1
  287. package/dist/client/components/ui/WidgetWrapper.d.ts +0 -12
  288. package/dist/client/components/ui/WidgetWrapper.d.ts.map +0 -1
  289. package/dist/client/components/ui/alert-dialog.d.ts +0 -15
  290. package/dist/client/components/ui/alert-dialog.d.ts.map +0 -1
  291. package/dist/client/components/ui/ask-user-questions.d.ts +0 -80
  292. package/dist/client/components/ui/ask-user-questions.d.ts.map +0 -1
  293. package/dist/client/components/ui/badge.d.ts +0 -34
  294. package/dist/client/components/ui/badge.d.ts.map +0 -1
  295. package/dist/client/components/ui/blur-fade.d.ts +0 -25
  296. package/dist/client/components/ui/blur-fade.d.ts.map +0 -1
  297. package/dist/client/components/ui/button.d.ts +0 -34
  298. package/dist/client/components/ui/button.d.ts.map +0 -1
  299. package/dist/client/components/ui/chat-message.d.ts +0 -23
  300. package/dist/client/components/ui/chat-message.d.ts.map +0 -1
  301. package/dist/client/components/ui/checkbox.d.ts +0 -4
  302. package/dist/client/components/ui/checkbox.d.ts.map +0 -1
  303. package/dist/client/components/ui/client-icons.d.ts +0 -20
  304. package/dist/client/components/ui/client-icons.d.ts.map +0 -1
  305. package/dist/client/components/ui/command.d.ts +0 -17
  306. package/dist/client/components/ui/command.d.ts.map +0 -1
  307. package/dist/client/components/ui/dialog.d.ts +0 -37
  308. package/dist/client/components/ui/dialog.d.ts.map +0 -1
  309. package/dist/client/components/ui/dropdown-menu.d.ts +0 -25
  310. package/dist/client/components/ui/dropdown-menu.d.ts.map +0 -1
  311. package/dist/client/components/ui/dropdown.d.ts +0 -30
  312. package/dist/client/components/ui/dropdown.d.ts.map +0 -1
  313. package/dist/client/components/ui/file-thumbnail.d.ts +0 -9
  314. package/dist/client/components/ui/file-thumbnail.d.ts.map +0 -1
  315. package/dist/client/components/ui/input.d.ts +0 -4
  316. package/dist/client/components/ui/input.d.ts.map +0 -1
  317. package/dist/client/components/ui/kbd.d.ts +0 -3
  318. package/dist/client/components/ui/kbd.d.ts.map +0 -1
  319. package/dist/client/components/ui/label.d.ts +0 -4
  320. package/dist/client/components/ui/label.d.ts.map +0 -1
  321. package/dist/client/components/ui/menu-item.d.ts +0 -52
  322. package/dist/client/components/ui/menu-item.d.ts.map +0 -1
  323. package/dist/client/components/ui/mesh-tab-background.d.ts +0 -12
  324. package/dist/client/components/ui/mesh-tab-background.d.ts.map +0 -1
  325. package/dist/client/components/ui/not-found.d.ts +0 -9
  326. package/dist/client/components/ui/not-found.d.ts.map +0 -1
  327. package/dist/client/components/ui/popover.d.ts +0 -6
  328. package/dist/client/components/ui/popover.d.ts.map +0 -1
  329. package/dist/client/components/ui/resizable.d.ts +0 -10
  330. package/dist/client/components/ui/resizable.d.ts.map +0 -1
  331. package/dist/client/components/ui/scroll-area.d.ts +0 -4
  332. package/dist/client/components/ui/scroll-area.d.ts.map +0 -1
  333. package/dist/client/components/ui/select.d.ts +0 -52
  334. package/dist/client/components/ui/select.d.ts.map +0 -1
  335. package/dist/client/components/ui/sheet.d.ts +0 -14
  336. package/dist/client/components/ui/sheet.d.ts.map +0 -1
  337. package/dist/client/components/ui/skeleton.d.ts +0 -4
  338. package/dist/client/components/ui/skeleton.d.ts.map +0 -1
  339. package/dist/client/components/ui/spinner.d.ts +0 -3
  340. package/dist/client/components/ui/spinner.d.ts.map +0 -1
  341. package/dist/client/components/ui/switch.d.ts +0 -22
  342. package/dist/client/components/ui/switch.d.ts.map +0 -1
  343. package/dist/client/components/ui/table.d.ts +0 -9
  344. package/dist/client/components/ui/table.d.ts.map +0 -1
  345. package/dist/client/components/ui/tabs-subtle.d.ts +0 -25
  346. package/dist/client/components/ui/tabs-subtle.d.ts.map +0 -1
  347. package/dist/client/components/ui/text-shimmer.d.ts +0 -11
  348. package/dist/client/components/ui/text-shimmer.d.ts.map +0 -1
  349. package/dist/client/components/ui/textarea.d.ts +0 -4
  350. package/dist/client/components/ui/textarea.d.ts.map +0 -1
  351. package/dist/client/components/ui/tooltip.d.ts +0 -43
  352. package/dist/client/components/ui/tooltip.d.ts.map +0 -1
  353. package/dist/client/components/ui-playground/shared/SafeAreaInsetsEditor.d.ts +0 -19
  354. package/dist/client/components/ui-playground/shared/SafeAreaInsetsEditor.d.ts.map +0 -1
  355. package/dist/client/console-log-bus.d.ts +0 -24
  356. package/dist/client/console-log-bus.d.ts.map +0 -1
  357. package/dist/client/constants/debug-options.d.ts +0 -16
  358. package/dist/client/constants/debug-options.d.ts.map +0 -1
  359. package/dist/client/context/InspectorContext.d.ts +0 -134
  360. package/dist/client/context/InspectorContext.d.ts.map +0 -1
  361. package/dist/client/context/ThemeContext.d.ts +0 -17
  362. package/dist/client/context/ThemeContext.d.ts.map +0 -1
  363. package/dist/client/context/WidgetDebugContext.d.ts +0 -121
  364. package/dist/client/context/WidgetDebugContext.d.ts.map +0 -1
  365. package/dist/client/hooks/use-merge-split.d.ts +0 -36
  366. package/dist/client/hooks/use-merge-split.d.ts.map +0 -1
  367. package/dist/client/hooks/use-proximity-hover-index.d.ts +0 -27
  368. package/dist/client/hooks/use-proximity-hover-index.d.ts.map +0 -1
  369. package/dist/client/hooks/use-proximity-hover.d.ts +0 -26
  370. package/dist/client/hooks/use-proximity-hover.d.ts.map +0 -1
  371. package/dist/client/hooks/use-touch-primary.d.ts +0 -2
  372. package/dist/client/hooks/use-touch-primary.d.ts.map +0 -1
  373. package/dist/client/hooks/useDeviceViewport.d.ts +0 -18
  374. package/dist/client/hooks/useDeviceViewport.d.ts.map +0 -1
  375. package/dist/client/hooks/useHostedSession.d.ts +0 -9
  376. package/dist/client/hooks/useHostedSession.d.ts.map +0 -1
  377. package/dist/client/hooks/useIframeConsole.d.ts +0 -24
  378. package/dist/client/hooks/useIframeConsole.d.ts.map +0 -1
  379. package/dist/client/hooks/useKeyboardShortcuts.d.ts +0 -28
  380. package/dist/client/hooks/useKeyboardShortcuts.d.ts.map +0 -1
  381. package/dist/client/hooks/useMCPPrompts.d.ts +0 -94
  382. package/dist/client/hooks/useMCPPrompts.d.ts.map +0 -1
  383. package/dist/client/hooks/useMcpAppsHostContext.d.ts +0 -27
  384. package/dist/client/hooks/useMcpAppsHostContext.d.ts.map +0 -1
  385. package/dist/client/hooks/usePropsLLM.d.ts +0 -20
  386. package/dist/client/hooks/usePropsLLM.d.ts.map +0 -1
  387. package/dist/client/hooks/useResourceProps.d.ts +0 -14
  388. package/dist/client/hooks/useResourceProps.d.ts.map +0 -1
  389. package/dist/client/hooks/useSavedRequests.d.ts +0 -6
  390. package/dist/client/hooks/useSavedRequests.d.ts.map +0 -1
  391. package/dist/client/hooks/useViewHostProps.d.ts +0 -19
  392. package/dist/client/hooks/useViewHostProps.d.ts.map +0 -1
  393. package/dist/client/index.d.ts.map +0 -1
  394. package/dist/client/lib/elevated.d.ts +0 -28
  395. package/dist/client/lib/elevated.d.ts.map +0 -1
  396. package/dist/client/lib/font-weight.d.ts +0 -10
  397. package/dist/client/lib/font-weight.d.ts.map +0 -1
  398. package/dist/client/lib/icon-context.d.ts +0 -15
  399. package/dist/client/lib/icon-context.d.ts.map +0 -1
  400. package/dist/client/lib/shape-context.d.ts +0 -21
  401. package/dist/client/lib/shape-context.d.ts.map +0 -1
  402. package/dist/client/lib/springs.d.ts +0 -32
  403. package/dist/client/lib/springs.d.ts.map +0 -1
  404. package/dist/client/lib/surface-classes.d.ts +0 -2
  405. package/dist/client/lib/surface-classes.d.ts.map +0 -1
  406. package/dist/client/lib/surface-context.d.ts +0 -7
  407. package/dist/client/lib/surface-context.d.ts.map +0 -1
  408. package/dist/client/lib/utils.d.ts +0 -3
  409. package/dist/client/lib/utils.d.ts.map +0 -1
  410. package/dist/client/mcp-apps/csp.d.ts +0 -26
  411. package/dist/client/mcp-apps/csp.d.ts.map +0 -1
  412. package/dist/client/mcp-apps/debug/csp-suggestions.d.ts +0 -17
  413. package/dist/client/mcp-apps/debug/csp-suggestions.d.ts.map +0 -1
  414. package/dist/client/mcp-apps/logging-transport.d.ts +0 -13
  415. package/dist/client/mcp-apps/logging-transport.d.ts.map +0 -1
  416. package/dist/client/rpc-traffic-coalesce.d.ts +0 -7
  417. package/dist/client/rpc-traffic-coalesce.d.ts.map +0 -1
  418. package/dist/client/rpc-traffic-store.d.ts +0 -37
  419. package/dist/client/rpc-traffic-store.d.ts.map +0 -1
  420. package/dist/client/telemetry/capture.d.ts +0 -7
  421. package/dist/client/telemetry/capture.d.ts.map +0 -1
  422. package/dist/client/telemetry/events.d.ts +0 -168
  423. package/dist/client/telemetry/events.d.ts.map +0 -1
  424. package/dist/client/telemetry/index.d.ts +0 -5
  425. package/dist/client/telemetry/index.d.ts.map +0 -1
  426. package/dist/client/telemetry/init.d.ts +0 -2
  427. package/dist/client/telemetry/init.d.ts.map +0 -1
  428. package/dist/client/telemetry/utils.d.ts +0 -7
  429. package/dist/client/telemetry/utils.d.ts.map +0 -1
  430. package/dist/client/types/message-content-block.d.ts +0 -19
  431. package/dist/client/types/message-content-block.d.ts.map +0 -1
  432. package/dist/client/types/pending-requests.d.ts +0 -17
  433. package/dist/client/types/pending-requests.d.ts.map +0 -1
  434. package/dist/client/utils/basePath.d.ts +0 -34
  435. package/dist/client/utils/basePath.d.ts.map +0 -1
  436. package/dist/client/utils/browser.d.ts +0 -5
  437. package/dist/client/utils/browser.d.ts.map +0 -1
  438. package/dist/client/utils/format.d.ts +0 -4
  439. package/dist/client/utils/format.d.ts.map +0 -1
  440. package/dist/client/utils/highlightJson.d.ts +0 -11
  441. package/dist/client/utils/highlightJson.d.ts.map +0 -1
  442. package/dist/client/utils/jsonUtils.d.ts +0 -24
  443. package/dist/client/utils/jsonUtils.d.ts.map +0 -1
  444. package/dist/client/utils/mcpClientUtils.d.ts +0 -131
  445. package/dist/client/utils/mcpClientUtils.d.ts.map +0 -1
  446. package/dist/client/utils/servers.d.ts +0 -14
  447. package/dist/client/utils/servers.d.ts.map +0 -1
  448. package/dist/server/asset-urls.d.ts +0 -18
  449. package/dist/server/asset-urls.d.ts.map +0 -1
  450. package/dist/server/asset-urls.js +0 -17
  451. package/dist/server/cdn-shell.d.ts +0 -18
  452. package/dist/server/cdn-shell.d.ts.map +0 -1
  453. package/dist/server/cdn-shell.js +0 -12
  454. package/dist/server/chunk-5L3HMC5B.js +0 -72
  455. package/dist/server/chunk-BEJGHVKM.js +0 -148
  456. package/dist/server/chunk-H6ZCIKBS.js +0 -63
  457. package/dist/server/chunk-IKTZUWSX.js +0 -0
  458. package/dist/server/chunk-J4FNYLBF.js +0 -54
  459. package/dist/server/chunk-K2F2AJOI.js +0 -619
  460. package/dist/server/chunk-KD7K27XK.js +0 -77
  461. package/dist/server/chunk-M5TZA42I.js +0 -54
  462. package/dist/server/chunk-OWR2BIBW.js +0 -40
  463. package/dist/server/chunk-PGN3B3MQ.js +0 -156
  464. package/dist/server/chunk-PKBMQBKP.js +0 -7
  465. package/dist/server/chunk-UJLXHNQP.js +0 -43
  466. package/dist/server/chunk-WFT4JHYI.js +0 -24
  467. package/dist/server/chunk-XCNS5CIW.js +0 -199
  468. package/dist/server/cli.d.ts +0 -3
  469. package/dist/server/cli.d.ts.map +0 -1
  470. package/dist/server/cli.js +0 -141
  471. package/dist/server/create-dev-api-app.d.ts +0 -4
  472. package/dist/server/create-dev-api-app.d.ts.map +0 -1
  473. package/dist/server/create-dev-api-app.js +0 -11
  474. package/dist/server/dev-callback-redirect.d.ts +0 -3
  475. package/dist/server/dev-callback-redirect.d.ts.map +0 -1
  476. package/dist/server/dev-callback-redirect.js +0 -18
  477. package/dist/server/favicon-links.d.ts +0 -12
  478. package/dist/server/favicon-links.d.ts.map +0 -1
  479. package/dist/server/favicon-links.js +0 -11
  480. package/dist/server/favicon-static.d.ts +0 -4
  481. package/dist/server/favicon-static.d.ts.map +0 -1
  482. package/dist/server/favicon-static.js +0 -8
  483. package/dist/server/index.d.ts.map +0 -1
  484. package/dist/server/middleware.d.ts +0 -40
  485. package/dist/server/middleware.d.ts.map +0 -1
  486. package/dist/server/middleware.js +0 -17
  487. package/dist/server/proxy/index.d.ts +0 -3
  488. package/dist/server/proxy/index.d.ts.map +0 -1
  489. package/dist/server/proxy/index.js +0 -12
  490. package/dist/server/proxy/mcp-proxy.d.ts +0 -101
  491. package/dist/server/proxy/mcp-proxy.d.ts.map +0 -1
  492. package/dist/server/proxy/mcp-proxy.js +0 -10
  493. package/dist/server/proxy/oauth-proxy.d.ts +0 -26
  494. package/dist/server/proxy/oauth-proxy.d.ts.map +0 -1
  495. package/dist/server/proxy/oauth-proxy.js +0 -9
  496. package/dist/server/proxy-routes.d.ts +0 -16
  497. package/dist/server/proxy-routes.d.ts.map +0 -1
  498. package/dist/server/proxy-routes.js +0 -10
  499. package/dist/server/rpc-log-bus.d.ts +0 -17
  500. package/dist/server/rpc-log-bus.d.ts.map +0 -1
  501. package/dist/server/rpc-log-bus.js +0 -77
  502. package/dist/server/server.d.ts +0 -15
  503. package/dist/server/server.d.ts.map +0 -1
  504. package/dist/server/server.js +0 -66
  505. package/dist/server/static-assets.d.ts +0 -5
  506. package/dist/server/static-assets.d.ts.map +0 -1
  507. package/dist/server/static-assets.js +0 -9
  508. package/dist/server/utils.d.ts +0 -33
  509. package/dist/server/utils.d.ts.map +0 -1
  510. package/dist/server/utils.js +0 -17
  511. package/dist/server/version.d.ts +0 -7
  512. package/dist/server/version.d.ts.map +0 -1
  513. package/dist/server/version.js +0 -9
  514. package/dist/server/vite-dev-api-plugin.d.ts +0 -4
  515. package/dist/server/vite-dev-api-plugin.d.ts.map +0 -1
  516. package/dist/server/vite-dev-api-plugin.js +0 -30
  517. package/dist/web/apple-touch-icon.png +0 -0
  518. package/dist/web/assets/AnimatePresence-C5p0yiY1.js +0 -9
  519. package/dist/web/assets/ChatTab-B_5S87J1.js +0 -18
  520. package/dist/web/assets/ConnectionSettingsTab-XwjwKfsO.js +0 -1
  521. package/dist/web/assets/ElicitationTab-BD1tfmYR.js +0 -1
  522. package/dist/web/assets/FormContext-DH2caWKO.js +0 -1
  523. package/dist/web/assets/ListTabHeader-R17w_JsB.js +0 -1
  524. package/dist/web/assets/ManufactOAuthCallback-DD3qfIC3.js +0 -1
  525. package/dist/web/assets/MarkdownRenderer-DH-7vpw0.js +0 -47
  526. package/dist/web/assets/NotificationsTab-Cg48O6IH.js +0 -1
  527. package/dist/web/assets/OAuthCallback-4i2i3YpE.js +0 -1
  528. package/dist/web/assets/PromptsTab-pAR6izrQ.js +0 -15
  529. package/dist/web/assets/ResourcesTab-CgvfWrsU.js +0 -2
  530. package/dist/web/assets/SamplingTab-DfIWMQFY.js +0 -1
  531. package/dist/web/assets/ServerMetadataTab-Dsz8Qhyr.js +0 -1
  532. package/dist/web/assets/ToolsTab-ln9w58BW.js +0 -8
  533. package/dist/web/assets/ViewPreview-CQ3G3VP0.js +0 -1
  534. package/dist/web/assets/WidgetWrapper-A-zaxY5s.js +0 -34
  535. package/dist/web/assets/brush--0LobUi4.js +0 -1
  536. package/dist/web/assets/checkbox-DZWS_U_i.js +0 -1
  537. package/dist/web/assets/code-tME-5H6D.js +0 -1
  538. package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
  539. package/dist/web/assets/dist-DxRFPg-B.js +0 -21
  540. package/dist/web/assets/index-CoRK2C3M.js +0 -492
  541. package/dist/web/assets/index-fBX3akc8.css +0 -1
  542. package/dist/web/assets/input-CLYhA7PK.js +0 -1
  543. package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
  544. package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
  545. package/dist/web/assets/label-Cdim77Jw.js +0 -1
  546. package/dist/web/assets/maximize-2-BTT9QQU9.js +0 -1
  547. package/dist/web/assets/maximize-_O55kFcr.js +0 -1
  548. package/dist/web/assets/react-CU_d2d5K.js +0 -1
  549. package/dist/web/assets/refresh-cw-C9wQl8_d.js +0 -1
  550. package/dist/web/assets/save-B-MsgxX9.js +0 -1
  551. package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
  552. package/dist/web/assets/select-CJ57-Bor.js +0 -1
  553. package/dist/web/assets/shared-Dbc2GbRx.js +0 -1
  554. package/dist/web/assets/sparkles-2OAsc1aP.js +0 -1
  555. package/dist/web/assets/tabs-subtle-CxMZqhP6.js +0 -1
  556. package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
  557. package/dist/web/assets/useConfig-Cg-BtSHA.js +0 -1
  558. package/dist/web/assets/useViewHostProps-CMgPpdfy.js +0 -1
  559. package/dist/web/assets/zap-Du2Uc5pa.js +0 -1
  560. package/dist/web/favicon-96x96.png +0 -0
  561. package/dist/web/favicon-black.svg +0 -5
  562. package/dist/web/favicon-white.svg +0 -5
  563. package/dist/web/favicon.ico +0 -0
  564. package/dist/web/favicon.svg +0 -5
  565. package/dist/web/index.html +0 -89
  566. package/dist/web/providers/anthropic.png +0 -0
  567. package/dist/web/providers/google.png +0 -0
  568. package/dist/web/providers/openai.png +0 -0
  569. package/dist/web/site.webmanifest +0 -21
  570. package/dist/web/web-app-manifest-192x192.png +0 -0
  571. package/dist/web/web-app-manifest-512x512.png +0 -0
  572. /package/dist/{cdn → app}/apple-touch-icon.png +0 -0
  573. /package/dist/{cdn → app}/favicon-96x96.png +0 -0
  574. /package/dist/{cdn → app}/favicon-black.svg +0 -0
  575. /package/dist/{cdn → app}/favicon-white.svg +0 -0
  576. /package/dist/{cdn → app}/favicon.ico +0 -0
  577. /package/dist/{cdn → app}/favicon.svg +0 -0
  578. /package/dist/{cdn → app}/site.webmanifest +0 -0
  579. /package/dist/{cdn → app}/web-app-manifest-192x192.png +0 -0
  580. /package/dist/{cdn → app}/web-app-manifest-512x512.png +0 -0
@@ -1,238 +0,0 @@
1
- import { s as e, t } from "./react-BIs9pQ3H.js";
2
- import { t as n } from "./jsx-runtime-CIxvMpEo.js";
3
- import { d as r, r as i } from "./react-0oJnFpBS.js";
4
- import { t as a } from "./basePath-B8HuhIMu.js";
5
- import { c as o, s } from "./chunk-QUQL4437-XnDcYQEx.js";
6
- import { t as c } from "./useViewHostProps-ru80AnlT.js";
7
- //#region src/client/components/ViewPreview.tsx
8
- var l = /* @__PURE__ */ e(t(), 1), u = n(), d = "preview-default";
9
- function f(e) {
10
- if (!e) return {};
11
- try {
12
- let t = atob(e), n = JSON.parse(t);
13
- if (n && typeof n == "object") return n;
14
- } catch {}
15
- return {};
16
- }
17
- function p(e, t) {
18
- let n = `ui://widget/${t}`, r = e.find((e) => e.uri.startsWith(`${n}.`) && e.uri.endsWith(".html"));
19
- return r ? r.uri : e.find((e) => e.name === t)?.uri;
20
- }
21
- function m() {
22
- let e = globalThis.__mcpUsePreviewBundle;
23
- if (!e || typeof e != "object") return;
24
- let t = e;
25
- if (typeof t.resourceUri == "string") return t;
26
- }
27
- function h() {
28
- (0, l.useEffect)(() => {
29
- let e = document.documentElement, t = document.body, n = e.style.margin, r = t.style.margin, i = t.style.overflow;
30
- return e.style.margin = "0", t.style.margin = "0", t.style.overflow = "hidden", () => {
31
- e.style.margin = n, t.style.margin = r, t.style.overflow = i;
32
- };
33
- }, []);
34
- }
35
- function g(e, t) {
36
- (0, l.useEffect)(() => {
37
- let n = () => {
38
- document.body.dataset.viewError = "runtime_error";
39
- };
40
- return e && !t && (document.body.dataset.viewError = "invalid_payload"), window.addEventListener("error", n), window.addEventListener("unhandledrejection", n), () => {
41
- window.removeEventListener("error", n), window.removeEventListener("unhandledrejection", n), delete document.body.dataset.viewError;
42
- };
43
- }, [e, t]);
44
- }
45
- function _(e) {
46
- (0, l.useEffect)(() => {
47
- if (!e) return;
48
- let t = !1;
49
- return (async () => {
50
- try {
51
- await document.fonts.ready;
52
- } catch {}
53
- t || (await new Promise((e) => requestAnimationFrame(() => e(void 0))), await new Promise((e) => requestAnimationFrame(() => e(void 0))), !t && document.body.setAttribute("data-view-ready", "true"));
54
- })(), () => {
55
- t = !0, document.body.removeAttribute("data-view-ready");
56
- };
57
- }, [e]);
58
- }
59
- function v(e, t) {
60
- (0, l.useEffect)(() => {
61
- if (!e) return;
62
- let n = !1, r, i, a = (e) => {
63
- n || (e && (document.body.dataset.viewX = String(Math.round(e.left)), document.body.dataset.viewY = String(Math.round(e.top)), document.body.dataset.viewWidth = String(Math.round(e.width)), document.body.dataset.viewHeight = String(Math.round(e.height))), document.body.setAttribute("data-view-ready", "true"));
64
- };
65
- return (async () => {
66
- try {
67
- await document.fonts.ready;
68
- } catch {}
69
- if (n || (await new Promise((e) => requestAnimationFrame(() => e(void 0))), await new Promise((e) => requestAnimationFrame(() => e(void 0))), n)) return;
70
- let e = t.current?.querySelector("iframe");
71
- if (!e) {
72
- a(null);
73
- return;
74
- }
75
- let o = () => {
76
- r && clearTimeout(r), r = setTimeout(() => {
77
- n || (i?.disconnect(), a(e.getBoundingClientRect()));
78
- }, 250);
79
- };
80
- i = new ResizeObserver(o), i.observe(e), o();
81
- })(), () => {
82
- n = !0, r && clearTimeout(r), i?.disconnect(), document.body.removeAttribute("data-view-ready"), delete document.body.dataset.viewX, delete document.body.dataset.viewY, delete document.body.dataset.viewWidth, delete document.body.dataset.viewHeight;
83
- };
84
- }, [e, t]);
85
- }
86
- function y({ view: e, bundle: t, widthOverride: n }) {
87
- let [r, a] = (0, l.useState)(!1), o = (0, l.useRef)(null);
88
- h(), v(r, o);
89
- let s = (0, l.useMemo)(() => async (e) => {
90
- if (e === t.resourceUri) return t.resourceContents;
91
- throw Error(`Resource ${e} not in screenshot bundle`);
92
- }, [t]);
93
- return /* @__PURE__ */ (0, u.jsx)("div", {
94
- ref: o,
95
- style: {
96
- width: "100vw",
97
- height: "100vh"
98
- },
99
- children: /* @__PURE__ */ (0, u.jsx)(i, {
100
- viewId: (0, l.useMemo)(() => `preview-bundle-${e}-${Date.now().toString(36)}`, [e]),
101
- toolName: e,
102
- toolInput: t.toolInput,
103
- toolOutput: t.toolOutput,
104
- displayMode: "inline",
105
- inlineMaxWidth: n,
106
- chromeless: !0,
107
- onReady: () => a(!0),
108
- source: {
109
- kind: "live",
110
- connection: {
111
- callTool: async () => {
112
- throw Error("Preview bundle mode has no server connection");
113
- },
114
- readResource: s
115
- },
116
- resourceUri: t.resourceUri
117
- },
118
- cspMode: "permissive",
119
- hostInfo: {
120
- name: "mcp-use-inspector",
121
- version: "11.0.0"
122
- },
123
- mockOpenAiFileApis: !0
124
- })
125
- });
126
- }
127
- function b({ view: e }) {
128
- let [t] = o(), n = (0, l.useMemo)(() => f(t.get("props")), [t]), s = (0, l.useMemo)(() => t.get("server") || `${window.location.origin}${a() || "/"}`, [t]), m = (0, l.useMemo)(() => {
129
- let e = t.get("headers");
130
- if (e) try {
131
- let t = JSON.parse(atob(e));
132
- if (t && typeof t == "object") return t;
133
- } catch {}
134
- }, [t]), { servers: g, addServer: v, storageLoaded: y } = r(), b = g.find((e) => e.id === d);
135
- (0, l.useEffect)(() => {
136
- y && v(d, {
137
- url: s,
138
- displayName: "Preview",
139
- protocolNegotiation: "auto",
140
- ...m ? { headers: m } : {}
141
- });
142
- }, [
143
- y,
144
- s,
145
- m,
146
- v
147
- ]);
148
- let x = b?.state === "ready", S = b?.state === "failed", C = (0, l.useMemo)(() => {
149
- if (x) return p(b.resources, e);
150
- }, [
151
- x,
152
- b?.resources,
153
- e
154
- ]), w = (0, l.useMemo)(() => `preview-${e}-${Date.now().toString(36)}`, [e]), T = (0, l.useMemo)(() => async (e) => {
155
- if (!b?.readResource) throw Error("Server not ready");
156
- return b.readResource(e);
157
- }, [b]), [E, D] = (0, l.useState)(!1);
158
- _(E), h();
159
- let O = c({
160
- serverId: d,
161
- viewId: w,
162
- resourceUri: C ?? "",
163
- toolName: e,
164
- toolInput: n.toolInput,
165
- toolOutput: n.toolOutput,
166
- readResource: T,
167
- displayMode: "fullscreen",
168
- chromeless: !0,
169
- onReady: () => D(!0)
170
- });
171
- return S ? /* @__PURE__ */ (0, u.jsxs)("div", {
172
- style: {
173
- padding: 16,
174
- fontFamily: "monospace",
175
- color: "#b00"
176
- },
177
- children: [
178
- "Failed to connect to MCP server at ",
179
- s,
180
- "."
181
- ]
182
- }) : !x || !C ? x && !C ? /* @__PURE__ */ (0, u.jsxs)("div", {
183
- style: {
184
- padding: 16,
185
- fontFamily: "monospace",
186
- color: "#b00"
187
- },
188
- children: [
189
- "View \"",
190
- e,
191
- "\" not found on ",
192
- s,
193
- "."
194
- ]
195
- }) : /* @__PURE__ */ (0, u.jsx)("div", {
196
- style: {
197
- width: "100vw",
198
- height: "100vh",
199
- display: "flex",
200
- alignItems: "center",
201
- justifyContent: "center",
202
- fontFamily: "monospace",
203
- color: "var(--muted-foreground, #888)"
204
- },
205
- children: "Loading…"
206
- }) : /* @__PURE__ */ (0, u.jsx)("div", {
207
- style: {
208
- width: "100vw",
209
- height: "100vh"
210
- },
211
- children: O && C ? /* @__PURE__ */ (0, u.jsx)(i, {
212
- viewId: w,
213
- toolName: e,
214
- toolInput: n.toolInput,
215
- toolOutput: n.toolOutput,
216
- displayMode: "fullscreen",
217
- chromeless: !0,
218
- ...O
219
- }) : null
220
- });
221
- }
222
- function x() {
223
- let e = s(), [t] = o(), n = e.view ?? "", r = (0, l.useMemo)(() => m(), []), i = t.get("protocol") === "1";
224
- g(i, r !== void 0);
225
- let a = (0, l.useMemo)(() => {
226
- let e = t.get("width");
227
- if (!e) return;
228
- let n = parseInt(e, 10);
229
- return Number.isFinite(n) && n > 0 ? n : void 0;
230
- }, [t]);
231
- return r ? /* @__PURE__ */ (0, u.jsx)(y, {
232
- view: n,
233
- bundle: r,
234
- widthOverride: a
235
- }) : i ? null : /* @__PURE__ */ (0, u.jsx)(b, { view: n });
236
- }
237
- //#endregion
238
- export { x as ViewPreview };
@@ -1,324 +0,0 @@
1
- import { s as e, t } from "./react-BIs9pQ3H.js";
2
- import { t as n } from "./jsx-runtime-CIxvMpEo.js";
3
- //#region src/client/context/ThemeContext.tsx
4
- var r = /* @__PURE__ */ e(t(), 1), i = n(), a = (0, r.createContext)(void 0);
5
- function o() {
6
- let e = (0, r.use)(a);
7
- if (e === void 0) throw Error("useTheme must be used within a ThemeProvider");
8
- return e;
9
- }
10
- function s({ children: e, defaultTheme: t = "system", storageKey: n = "theme", forcedTheme: o }) {
11
- let [s, c] = (0, r.useState)(o || t), [l, u] = (0, r.useState)(!1), d = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", f = s === "system" ? d() : s, p = (e) => {
12
- let t = document.documentElement, r = e === "system" ? d() : e;
13
- t.classList.remove("light", "dark"), t.classList.add(r), o || localStorage.setItem(n, e);
14
- };
15
- return (0, r.useEffect)(() => {
16
- u(!0);
17
- let e = localStorage.getItem(n), r = o || e || t;
18
- c(r), p(r);
19
- }, [
20
- t,
21
- n,
22
- o
23
- ]), (0, r.useEffect)(() => {
24
- if (s !== "system") return;
25
- let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => {
26
- p("system");
27
- };
28
- return e.addEventListener("change", t), () => e.removeEventListener("change", t);
29
- }, [s]), (0, r.useEffect)(() => {
30
- l && p(s);
31
- }, [s, l]), /* @__PURE__ */ (0, i.jsx)(a, {
32
- value: {
33
- theme: s,
34
- setTheme: (e) => {
35
- if (o) {
36
- console.warn("[ThemeProvider] Theme is forced via URL parameter, ignoring setTheme call");
37
- return;
38
- }
39
- c(e);
40
- },
41
- resolvedTheme: f
42
- },
43
- children: e
44
- });
45
- }
46
- //#endregion
47
- //#region src/client/rpc-traffic-coalesce.ts
48
- var c = 300, l = /(?:^|\/)notifications\//;
49
- function u(e) {
50
- let t = e;
51
- return typeof t?.method == "string" ? t.method : null;
52
- }
53
- function d(e) {
54
- let t = e.message;
55
- if (t?.id !== void 0 && t.id !== null || t?.result !== void 0 || t?.error !== void 0) return null;
56
- let n = u(e.message);
57
- return !n || !l.test(n) ? null : [
58
- e.source,
59
- e.serverId,
60
- e.widgetId ?? "",
61
- e.direction,
62
- n
63
- ].join("|");
64
- }
65
- function f(e, t, n = Date.now()) {
66
- let r = d(e), i = d(t);
67
- if (!r || r !== i) return !1;
68
- let a = Date.parse(e.timestamp);
69
- return Number.isNaN(a) ? !1 : n - a <= c;
70
- }
71
- function p(e, t) {
72
- return {
73
- ...e,
74
- timestamp: t.timestamp,
75
- message: t.message,
76
- repeatCount: (e.repeatCount ?? 1) + 1
77
- };
78
- }
79
- var m = new class {
80
- maxEntries;
81
- entries = [];
82
- listeners = /* @__PURE__ */ new Set();
83
- nextId = 0;
84
- emitFrame = null;
85
- constructor(e = 1e3) {
86
- this.maxEntries = e;
87
- }
88
- publish(e) {
89
- let t = this.entries[this.entries.length - 1];
90
- if (t && f(t, e, Date.parse(e.timestamp))) {
91
- this.entries[this.entries.length - 1] = p(t, e), this.scheduleEmit();
92
- return;
93
- }
94
- this.entries.push({
95
- ...e,
96
- id: `rpc-${++this.nextId}`
97
- }), this.entries.length > this.maxEntries && this.entries.splice(0, this.entries.length - this.maxEntries), this.scheduleEmit();
98
- }
99
- getSnapshot = () => this.entries;
100
- subscribe = (e) => (this.listeners.add(e), () => this.listeners.delete(e));
101
- clear(e = {}) {
102
- let t = new Set(e.serverIds ?? []), n = new Set(e.sources ?? []);
103
- t.size === 0 && n.size === 0 ? this.entries = [] : this.entries = this.entries.filter((e) => !((t.size === 0 || t.has(e.serverId)) && (n.size === 0 || n.has(e.source)))), this.scheduleEmit();
104
- }
105
- peekCoalesceKey(e) {
106
- return d(e);
107
- }
108
- scheduleEmit() {
109
- if (this.emitFrame === null) {
110
- if (typeof requestAnimationFrame > "u") {
111
- this.emit();
112
- return;
113
- }
114
- this.emitFrame = requestAnimationFrame(() => {
115
- this.emitFrame = null, this.emit();
116
- });
117
- }
118
- }
119
- emit() {
120
- this.listeners.forEach((e) => e());
121
- }
122
- }(), h = (0, r.createContext)(void 0), g = {
123
- deviceType: "desktop",
124
- customViewport: {
125
- width: 768,
126
- height: 1024
127
- },
128
- cspMode: "permissive",
129
- displayModeOverride: null,
130
- capabilities: {
131
- hover: !0,
132
- touch: !1
133
- },
134
- safeAreaInsets: {
135
- top: 0,
136
- right: 0,
137
- bottom: 0,
138
- left: 0
139
- },
140
- locale: "en-US",
141
- timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC"
142
- };
143
- function _({ children: e }) {
144
- let [t, n] = (0, r.useState)({
145
- activeWidgetId: null,
146
- widgets: /* @__PURE__ */ new Map(),
147
- playground: g
148
- }), a = (0, r.useCallback)((e) => {
149
- n((t) => ({
150
- ...t,
151
- activeWidgetId: e
152
- }));
153
- }, []), o = (0, r.useCallback)((e, t) => {
154
- n((n) => {
155
- if (n.widgets.has(e)) return n;
156
- let r = new Map(n.widgets);
157
- return r.set(e, {
158
- ...t,
159
- cspViolations: []
160
- }), {
161
- ...n,
162
- widgets: r
163
- };
164
- });
165
- }, []), s = (0, r.useCallback)((e) => {
166
- n((t) => {
167
- let n = new Map(t.widgets);
168
- return n.delete(e), {
169
- ...t,
170
- widgets: n,
171
- activeWidgetId: t.activeWidgetId === e ? null : t.activeWidgetId
172
- };
173
- });
174
- }, []), c = (0, r.useRef)(t);
175
- c.current = t;
176
- let l = (0, r.useCallback)((e) => c.current.widgets.get(e), []), u = (0, r.useCallback)((e, t) => {
177
- n((n) => {
178
- let r = n.widgets.get(e);
179
- if (!r) return n;
180
- let i = { cspViolations: [...r.cspViolations, t] };
181
- t.originalPolicy && r.effectivePolicy === void 0 && (i.effectivePolicy = t.originalPolicy);
182
- let a = new Map(n.widgets);
183
- return a.set(e, {
184
- ...r,
185
- ...i
186
- }), {
187
- ...n,
188
- widgets: a
189
- };
190
- });
191
- }, []), d = (0, r.useCallback)((e) => {
192
- n((t) => {
193
- let n = t.widgets.get(e);
194
- if (!n) return t;
195
- let r = new Map(t.widgets);
196
- return r.set(e, {
197
- ...n,
198
- cspViolations: []
199
- }), {
200
- ...t,
201
- widgets: r
202
- };
203
- });
204
- }, []), f = (0, r.useCallback)((e, t) => {
205
- n((n) => {
206
- let r = n.widgets.get(e);
207
- if (!r) return n;
208
- let i = new Map(n.widgets);
209
- return i.set(e, {
210
- ...r,
211
- modelContext: t
212
- }), {
213
- ...n,
214
- widgets: i
215
- };
216
- });
217
- }, []), p = (0, r.useCallback)((e, t) => {
218
- n((n) => {
219
- let r = n.widgets.get(e);
220
- if (!r) return n;
221
- let i = new Map(n.widgets);
222
- return i.set(e, {
223
- ...r,
224
- widgetState: t
225
- }), {
226
- ...n,
227
- widgets: i
228
- };
229
- });
230
- }, []), m = (0, r.useCallback)((e, t, r) => {
231
- n((n) => {
232
- let i = n.widgets.get(e);
233
- if (!i) return n;
234
- let a = new Map(n.widgets);
235
- return a.set(e, {
236
- ...i,
237
- declaredCsp: t,
238
- ...r !== void 0 && { effectivePolicy: r }
239
- }), {
240
- ...n,
241
- widgets: a
242
- };
243
- });
244
- }, []), _ = (0, r.useCallback)((e) => {
245
- n((t) => ({
246
- ...t,
247
- playground: {
248
- ...t.playground,
249
- ...e
250
- }
251
- }));
252
- }, []), v = (0, r.useCallback)(() => {
253
- n((e) => ({
254
- ...e,
255
- widgets: /* @__PURE__ */ new Map(),
256
- activeWidgetId: null
257
- }));
258
- }, []), y = (0, r.useCallback)(() => {
259
- let e = /* @__PURE__ */ new Map();
260
- for (let [n, r] of t.widgets) r.modelContext && e.set(n, r.modelContext);
261
- return e;
262
- }, [t.widgets]);
263
- return /* @__PURE__ */ (0, i.jsx)(h, {
264
- value: (0, r.useMemo)(() => ({
265
- ...t,
266
- setActiveWidget: a,
267
- addWidget: o,
268
- removeWidget: s,
269
- getWidget: l,
270
- addCspViolation: u,
271
- clearCspViolations: d,
272
- setWidgetModelContext: f,
273
- setWidgetState: p,
274
- setWidgetDeclaredCsp: m,
275
- updatePlaygroundSettings: _,
276
- clearAllWidgets: v,
277
- getAllModelContexts: y
278
- }), [
279
- t,
280
- a,
281
- o,
282
- s,
283
- l,
284
- u,
285
- d,
286
- f,
287
- p,
288
- m,
289
- _,
290
- v,
291
- y
292
- ]),
293
- children: e
294
- });
295
- }
296
- function v() {
297
- let e = (0, r.use)(h);
298
- if (!e) throw Error("useWidgetDebug must be used within WidgetDebugProvider");
299
- return e;
300
- }
301
- var y = {
302
- mobile: {
303
- width: 390,
304
- height: 844,
305
- name: "iPhone 14"
306
- },
307
- tablet: {
308
- width: 820,
309
- height: 1180,
310
- name: "iPad Air"
311
- },
312
- desktop: {
313
- width: 1440,
314
- height: 900,
315
- name: "Desktop"
316
- },
317
- custom: {
318
- width: 768,
319
- height: 1024,
320
- name: "Custom"
321
- }
322
- };
323
- //#endregion
324
- export { u as a, m as i, _ as n, s as o, v as r, o as s, y as t };