@tonyclaw/agent-inspector 3.0.44 → 3.0.46

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 (347) hide show
  1. package/.output/{nitro.json → backend/nitro.json} +3 -3
  2. package/.output/backend-public/assets/index-D4LX-sw-.js +11 -0
  3. package/.output/cli.js +22707 -17099
  4. package/.output/server/_libs/extend.mjs +4 -8
  5. package/.output/server/_libs/jszip.mjs +9 -35
  6. package/.output/server/_libs/modelcontextprotocol__core.mjs +25 -25
  7. package/.output/server/_libs/modelcontextprotocol__server.mjs +2 -2
  8. package/.output/server/_libs/react-dom.mjs +2 -3
  9. package/.output/server/_libs/react.mjs +1 -27
  10. package/.output/server/_libs/tanstack__react-router.mjs +1 -329
  11. package/.output/server/_libs/tanstack__router-core.mjs +42 -100
  12. package/.output/server/_libs/use-sync-external-store.mjs +1 -64
  13. package/.output/server/_libs/ws.mjs +1 -1
  14. package/.output/server/_libs/zod.mjs +6 -6
  15. package/.output/server/_ssr/index.mjs +5 -4
  16. package/.output/server/_ssr/publicBasePathContext-IH2ilOfu.mjs +176 -0
  17. package/.output/server/_ssr/{router-DWcUFPR3.mjs → router-D18yUq36.mjs} +7877 -5597
  18. package/.output/server/_ssr/start-COQu_AgD.mjs +57 -0
  19. package/.output/server/_tanstack-start-manifest_v-DnbdNeun.mjs +4 -0
  20. package/.output/server/index.mjs +5 -145
  21. package/.output/{public/assets/CompareDrawer-DQHjxFO6.js → ui/assets/CompareDrawer-DAUuIJ6G.js} +1 -1
  22. package/.output/{public/assets/InspectorPet-D1A4505B.js → ui/assets/InspectorPet-BRBVjOWI.js} +1 -1
  23. package/.output/ui/assets/ProxyViewerContainer-D7Sq0ctc.js +59 -0
  24. package/.output/{public/assets/ReplayDialog-C5vmbecv.js → ui/assets/ReplayDialog-nDLsjOhs.js} +1 -1
  25. package/.output/{public/assets/RequestAnatomy-CPGNB8lk.js → ui/assets/RequestAnatomy-zd4BDgL0.js} +1 -1
  26. package/.output/ui/assets/ResponseView-AdIXGcSn.js +2 -0
  27. package/.output/ui/assets/StreamingChunkSequence-CesTz8He.js +1 -0
  28. package/.output/{public/assets/_sessionId-CDhRgzf6.js → ui/assets/_sessionId-BAfzrhSU.js} +1 -1
  29. package/.output/{public/assets/_sessionId-mw3aA8Bp.js → ui/assets/_sessionId-QnBomgPD.js} +1 -1
  30. package/.output/ui/assets/favicon-DYEkHSNl.svg +21 -0
  31. package/.output/{public/assets/index-B2eoeT-Z.js → ui/assets/index-BcsdxBAd.js} +1 -1
  32. package/.output/ui/assets/index-BvXp42al.css +1 -0
  33. package/.output/{public/assets/index-CX7_rf7o.js → ui/assets/index-D0rtCN9V.js} +1 -1
  34. package/.output/ui/assets/index-DHpwr08Z.js +73 -0
  35. package/.output/{public/assets/index-BfRhTvOd.js → ui/assets/index-dNuk2dsU.js} +1 -1
  36. package/.output/ui/assets/json-viewer-BvFHglMb.js +1 -0
  37. package/.output/{public/assets/jszip.min-C9rCFoU3.js → ui/assets/jszip.min-B5Z7gNZB.js} +1 -1
  38. package/.output/ui/index.html +229 -0
  39. package/.output/ui/runtime-config.js +2 -0
  40. package/.output/workers/logFinalizer.worker.js +983 -414
  41. package/.output/workers/sessionWorkerEntry.js +983 -414
  42. package/README.md +363 -35
  43. package/docs/instance-control.openapi.yaml +361 -0
  44. package/package.json +28 -5
  45. package/scripts/generate-theme-scales.mjs +3 -3
  46. package/src/{router.tsx → backend/router.tsx} +3 -15
  47. package/src/backend/routes/$.ts +26 -0
  48. package/src/backend/routes/__root.ts +4 -0
  49. package/src/backend/routes/api/-instances.ts +109 -0
  50. package/src/{routes → backend/routes}/api/alerts.summary.ts +3 -3
  51. package/src/{routes → backend/routes}/api/alerts.ts +4 -4
  52. package/src/{routes → backend/routes}/api/config.paths.ts +1 -1
  53. package/src/{routes → backend/routes}/api/config.ts +11 -2
  54. package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.help.ts +1 -1
  55. package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.install.ts +1 -1
  56. package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.runner-presets.ts +1 -1
  57. package/src/{routes → backend/routes}/api/ecosystem.packages.$packageId.upgrade.ts +1 -1
  58. package/src/{routes → backend/routes}/api/ecosystem.packages.ts +5 -1
  59. package/src/{routes → backend/routes}/api/ecosystem.recipes.$recipeId.run.ts +1 -1
  60. package/src/{routes → backend/routes}/api/ecosystem.tasks.$taskId.ts +1 -1
  61. package/src/{routes → backend/routes}/api/ecosystem.tasks.ts +1 -1
  62. package/src/{routes → backend/routes}/api/groups.$groupId.evidence.ts +2 -2
  63. package/src/{routes → backend/routes}/api/groups.$groupId.sessions.ts +2 -2
  64. package/src/{routes → backend/routes}/api/groups.$groupId.ts +2 -2
  65. package/src/{routes → backend/routes}/api/groups.ts +2 -2
  66. package/src/{routes → backend/routes}/api/health.ts +3 -3
  67. package/src/backend/routes/api/instances.$name.connection.ts +12 -0
  68. package/src/backend/routes/api/instances.$name.restart.ts +23 -0
  69. package/src/backend/routes/api/instances.$name.start.ts +18 -0
  70. package/src/backend/routes/api/instances.$name.stop.ts +23 -0
  71. package/src/backend/routes/api/instances.$name.ts +12 -0
  72. package/src/backend/routes/api/instances.ts +16 -0
  73. package/src/{routes → backend/routes}/api/knowledge.candidates.$candidateId.promote.ts +2 -2
  74. package/src/{routes → backend/routes}/api/knowledge.candidates.$candidateId.ts +2 -2
  75. package/src/{routes → backend/routes}/api/knowledge.candidates.ts +1 -1
  76. package/src/{routes → backend/routes}/api/knowledge.project-context.ts +2 -2
  77. package/src/{routes → backend/routes}/api/knowledge.search.ts +2 -2
  78. package/src/{routes → backend/routes}/api/knowledge.sessions.$sessionId.candidates.ts +3 -3
  79. package/src/{routes → backend/routes}/api/logs.$id.body.ts +6 -6
  80. package/src/{routes → backend/routes}/api/logs.$id.chunks.ts +5 -4
  81. package/src/{routes → backend/routes}/api/logs.$id.replay.ts +12 -11
  82. package/src/{routes → backend/routes}/api/logs.$id.ts +4 -3
  83. package/src/{routes → backend/routes}/api/logs.import.ts +3 -3
  84. package/src/{routes → backend/routes}/api/logs.stream.ts +11 -7
  85. package/src/{routes → backend/routes}/api/logs.ts +17 -9
  86. package/src/{routes → backend/routes}/api/mcp.ts +1 -1
  87. package/src/{routes → backend/routes}/api/models.ts +1 -1
  88. package/src/{routes → backend/routes}/api/pi-agent.ts +2 -2
  89. package/src/{routes → backend/routes}/api/providers.$providerId.model-metadata.ts +5 -5
  90. package/src/{routes → backend/routes}/api/providers.$providerId.test.log.ts +7 -7
  91. package/src/{routes → backend/routes}/api/providers.$providerId.ts +4 -4
  92. package/src/{routes → backend/routes}/api/providers.export.ts +1 -1
  93. package/src/{routes → backend/routes}/api/providers.import.ts +3 -3
  94. package/src/{routes → backend/routes}/api/providers.scan.ts +2 -2
  95. package/src/{routes → backend/routes}/api/providers.ts +9 -4
  96. package/src/{routes → backend/routes}/api/runs.$runId.evidence.ts +2 -2
  97. package/src/{routes → backend/routes}/api/runs.$runId.ts +2 -2
  98. package/src/{routes → backend/routes}/api/runs.ts +4 -4
  99. package/src/backend/routes/api/runtime.ts +46 -0
  100. package/src/{routes → backend/routes}/api/sessions.ts +3 -3
  101. package/src/{routes → backend/routes}/proxy/$.ts +1 -1
  102. package/src/{routes → backend/routes}/readyz.ts +1 -1
  103. package/src/backend/start.ts +10 -0
  104. package/src/cli/alias.ts +431 -0
  105. package/src/cli/doctor.ts +32 -9
  106. package/src/cli/instance.ts +1050 -0
  107. package/src/cli/instanceArgs.ts +285 -0
  108. package/src/cli/instanceControl.ts +181 -0
  109. package/src/cli/instanceModel.ts +267 -0
  110. package/src/cli/instanceRegistry.ts +731 -0
  111. package/src/cli/networkHints.ts +27 -14
  112. package/src/cli/onboard.ts +190 -35
  113. package/src/cli/onboardTarget.ts +228 -0
  114. package/src/cli/templates/codex-skill-onboard.ts +109 -31
  115. package/src/cli/templates/skill-onboard.ts +140 -70
  116. package/src/cli.ts +338 -77
  117. package/src/components/ProxyViewer.tsx +20 -10
  118. package/src/components/ProxyViewerContainer.tsx +12 -11
  119. package/src/components/pi-agent/PiAgentPanel.tsx +2 -2
  120. package/src/components/providers/ProviderCard.tsx +1 -1
  121. package/src/components/providers/ProviderTestResultsView.tsx +1 -1
  122. package/src/components/providers/SettingsDialog.tsx +160 -140
  123. package/src/components/proxy-viewer/ApplicationBar.tsx +2 -1
  124. package/src/components/proxy-viewer/LogEntry.tsx +1 -1
  125. package/src/components/proxy-viewer/log-formats/index.ts +1 -1
  126. package/src/contracts/index.ts +5 -0
  127. package/src/contracts/log.ts +33 -3
  128. package/src/knowledge/types.ts +3 -2
  129. package/src/lib/alertContract.ts +2 -2
  130. package/src/lib/apiClient.ts +30 -7
  131. package/src/lib/apiFormat.ts +29 -0
  132. package/src/lib/basePath.ts +31 -7
  133. package/src/lib/browserRuntimeContract.ts +124 -0
  134. package/src/lib/browserRuntimeResolver.ts +244 -0
  135. package/src/{proxy → lib}/claudeCodeStrip.ts +6 -7
  136. package/src/lib/codingAgentEndpoints.ts +54 -0
  137. package/src/lib/instanceContract.ts +236 -0
  138. package/src/lib/managedInstance.ts +104 -0
  139. package/src/lib/piAgentContract.ts +3 -2
  140. package/src/lib/publicBasePathContext.ts +137 -0
  141. package/src/lib/resourceLimits.ts +2 -0
  142. package/src/lib/runContract.ts +3 -3
  143. package/src/lib/sessionInfoContract.ts +3 -2
  144. package/src/mcp/instanceHandlers.ts +150 -0
  145. package/src/mcp/loopback.ts +16 -5
  146. package/src/mcp/mode.ts +25 -0
  147. package/src/mcp/server.ts +274 -39
  148. package/src/mcp/toolHandlers.ts +2 -2
  149. package/src/proxy/config.ts +25 -30
  150. package/src/proxy/dataDir.ts +43 -7
  151. package/src/proxy/ecosystemTasks.ts +161 -70
  152. package/src/proxy/formats/registry.ts +6 -21
  153. package/src/proxy/handler.ts +129 -29
  154. package/src/proxy/identityProxy.ts +1049 -50
  155. package/src/proxy/jsonlRecovery.ts +554 -0
  156. package/src/proxy/logFinalizer.ts +25 -10
  157. package/src/proxy/logImporter.ts +2 -1
  158. package/src/proxy/logIndex.ts +191 -95
  159. package/src/proxy/logger.ts +77 -14
  160. package/src/proxy/platformCommands.ts +41 -0
  161. package/src/proxy/privateDataPath.ts +310 -88
  162. package/src/proxy/rawStreamCapture.ts +194 -13
  163. package/src/proxy/runtimeAdmission.ts +5 -2
  164. package/src/proxy/runtimeHealth.ts +14 -1
  165. package/src/proxy/runtimeShutdown.ts +84 -2
  166. package/src/proxy/schemas.ts +7 -1
  167. package/src/proxy/sessionArchive.ts +78 -14
  168. package/src/proxy/sessionInfo.ts +5 -4
  169. package/src/proxy/sqliteLogIndex.ts +65 -2
  170. package/src/proxy/store.ts +141 -34
  171. package/src/proxy/uiAssetServer.ts +106 -0
  172. package/src/proxy/upstream.ts +29 -2
  173. package/src/ui/bootstrap.ts +167 -0
  174. package/src/ui/index.html +38 -0
  175. package/src/ui/logsStreamClient.ts +20 -0
  176. package/src/ui/main.tsx +13 -0
  177. package/src/ui/public/runtime-config.js +2 -0
  178. package/src/ui/router.tsx +13 -0
  179. package/src/ui/routes/__root.tsx +69 -0
  180. package/src/{routes → ui/routes}/index.tsx +2 -3
  181. package/src/{routes → ui/routes}/session/$sessionId.tsx +5 -11
  182. package/src/ui/runtimeDiscovery.ts +50 -0
  183. package/styles/globals.css +1 -0
  184. package/.output/public/assets/ProxyViewerContainer-BhpIgfBi.js +0 -126
  185. package/.output/public/assets/ResponseView-DUfrajCm.js +0 -2
  186. package/.output/public/assets/StreamingChunkSequence-nbeCQqOz.js +0 -1
  187. package/.output/public/assets/index-BWjeqxbk.css +0 -1
  188. package/.output/public/assets/index-C6qZwYlR.js +0 -70
  189. package/.output/public/assets/json-viewer-BLmF1sOZ.js +0 -1
  190. package/.output/server/_libs/@radix-ui/react-accessible-icon+[...].mjs +0 -1
  191. package/.output/server/_libs/@radix-ui/react-dismissable-layer+[...].mjs +0 -344
  192. package/.output/server/_libs/@radix-ui/react-navigation-menu+[...].mjs +0 -2
  193. package/.output/server/_libs/@radix-ui/react-one-time-password-field+[...].mjs +0 -2
  194. package/.output/server/_libs/@radix-ui/react-password-toggle-field+[...].mjs +0 -2
  195. package/.output/server/_libs/@radix-ui/react-use-callback-ref+[...].mjs +0 -11
  196. package/.output/server/_libs/@radix-ui/react-use-controllable-state+[...].mjs +0 -69
  197. package/.output/server/_libs/@radix-ui/react-use-effect-event+[...].mjs +0 -1
  198. package/.output/server/_libs/@radix-ui/react-use-is-hydrated+[...].mjs +0 -28
  199. package/.output/server/_libs/@radix-ui/react-use-layout-effect+[...].mjs +0 -6
  200. package/.output/server/_libs/@radix-ui/react-visually-hidden+[...].mjs +0 -34
  201. package/.output/server/_libs/aria-hidden.mjs +0 -122
  202. package/.output/server/_libs/bail.mjs +0 -8
  203. package/.output/server/_libs/character-entities.mjs +0 -2130
  204. package/.output/server/_libs/class-variance-authority.mjs +0 -44
  205. package/.output/server/_libs/clsx.mjs +0 -16
  206. package/.output/server/_libs/comma-separated-tokens.mjs +0 -10
  207. package/.output/server/_libs/decode-named-character-reference+[...].mjs +0 -8
  208. package/.output/server/_libs/dequal.mjs +0 -27
  209. package/.output/server/_libs/detect-node-es.mjs +0 -1
  210. package/.output/server/_libs/devlop.mjs +0 -8
  211. package/.output/server/_libs/diff.mjs +0 -320
  212. package/.output/server/_libs/estree-util-is-identifier-name.mjs +0 -11
  213. package/.output/server/_libs/floating-ui__core.mjs +0 -725
  214. package/.output/server/_libs/floating-ui__dom.mjs +0 -622
  215. package/.output/server/_libs/floating-ui__react-dom.mjs +0 -292
  216. package/.output/server/_libs/floating-ui__utils.mjs +0 -320
  217. package/.output/server/_libs/get-nonce.mjs +0 -9
  218. package/.output/server/_libs/hast-util-to-jsx-runtime.mjs +0 -388
  219. package/.output/server/_libs/hast-util-whitespace.mjs +0 -10
  220. package/.output/server/_libs/html-url-attributes.mjs +0 -26
  221. package/.output/server/_libs/inline-style-parser.mjs +0 -142
  222. package/.output/server/_libs/is-plain-obj.mjs +0 -10
  223. package/.output/server/_libs/lucide-react.mjs +0 -1027
  224. package/.output/server/_libs/mdast-util-from-markdown.mjs +0 -717
  225. package/.output/server/_libs/mdast-util-to-hast.mjs +0 -710
  226. package/.output/server/_libs/mdast-util-to-string.mjs +0 -38
  227. package/.output/server/_libs/micromark-core-commonmark.mjs +0 -2259
  228. package/.output/server/_libs/micromark-factory-destination.mjs +0 -94
  229. package/.output/server/_libs/micromark-factory-label.mjs +0 -63
  230. package/.output/server/_libs/micromark-factory-space.mjs +0 -24
  231. package/.output/server/_libs/micromark-factory-title.mjs +0 -65
  232. package/.output/server/_libs/micromark-factory-whitespace.mjs +0 -22
  233. package/.output/server/_libs/micromark-util-character.mjs +0 -44
  234. package/.output/server/_libs/micromark-util-chunked.mjs +0 -36
  235. package/.output/server/_libs/micromark-util-classify-character+[...].mjs +0 -12
  236. package/.output/server/_libs/micromark-util-combine-extensions+[...].mjs +0 -41
  237. package/.output/server/_libs/micromark-util-decode-numeric-character-reference+[...].mjs +0 -19
  238. package/.output/server/_libs/micromark-util-decode-string.mjs +0 -21
  239. package/.output/server/_libs/micromark-util-encode.mjs +0 -1
  240. package/.output/server/_libs/micromark-util-html-tag-name.mjs +0 -69
  241. package/.output/server/_libs/micromark-util-normalize-identifier+[...].mjs +0 -6
  242. package/.output/server/_libs/micromark-util-resolve-all.mjs +0 -15
  243. package/.output/server/_libs/micromark-util-sanitize-uri.mjs +0 -41
  244. package/.output/server/_libs/micromark-util-subtokenize.mjs +0 -346
  245. package/.output/server/_libs/micromark.mjs +0 -906
  246. package/.output/server/_libs/property-information.mjs +0 -1209
  247. package/.output/server/_libs/radix-ui.mjs +0 -1
  248. package/.output/server/_libs/radix-ui__number.mjs +0 -6
  249. package/.output/server/_libs/radix-ui__primitive.mjs +0 -11
  250. package/.output/server/_libs/radix-ui__react-accordion.mjs +0 -1
  251. package/.output/server/_libs/radix-ui__react-alert-dialog.mjs +0 -1
  252. package/.output/server/_libs/radix-ui__react-arrow.mjs +0 -23
  253. package/.output/server/_libs/radix-ui__react-aspect-ratio.mjs +0 -1
  254. package/.output/server/_libs/radix-ui__react-avatar.mjs +0 -1
  255. package/.output/server/_libs/radix-ui__react-checkbox.mjs +0 -1
  256. package/.output/server/_libs/radix-ui__react-collapsible.mjs +0 -144
  257. package/.output/server/_libs/radix-ui__react-collection.mjs +0 -69
  258. package/.output/server/_libs/radix-ui__react-compose-refs.mjs +0 -38
  259. package/.output/server/_libs/radix-ui__react-context-menu.mjs +0 -1
  260. package/.output/server/_libs/radix-ui__react-context.mjs +0 -64
  261. package/.output/server/_libs/radix-ui__react-dialog.mjs +0 -280
  262. package/.output/server/_libs/radix-ui__react-direction.mjs +0 -9
  263. package/.output/server/_libs/radix-ui__react-dropdown-menu.mjs +0 -1
  264. package/.output/server/_libs/radix-ui__react-focus-guards.mjs +0 -39
  265. package/.output/server/_libs/radix-ui__react-focus-scope.mjs +0 -210
  266. package/.output/server/_libs/radix-ui__react-form.mjs +0 -1
  267. package/.output/server/_libs/radix-ui__react-hover-card.mjs +0 -1
  268. package/.output/server/_libs/radix-ui__react-id.mjs +0 -14
  269. package/.output/server/_libs/radix-ui__react-label.mjs +0 -1
  270. package/.output/server/_libs/radix-ui__react-menu.mjs +0 -1
  271. package/.output/server/_libs/radix-ui__react-menubar.mjs +0 -1
  272. package/.output/server/_libs/radix-ui__react-popover.mjs +0 -1
  273. package/.output/server/_libs/radix-ui__react-popper.mjs +0 -340
  274. package/.output/server/_libs/radix-ui__react-portal.mjs +0 -16
  275. package/.output/server/_libs/radix-ui__react-presence.mjs +0 -173
  276. package/.output/server/_libs/radix-ui__react-primitive.mjs +0 -42
  277. package/.output/server/_libs/radix-ui__react-progress.mjs +0 -1
  278. package/.output/server/_libs/radix-ui__react-radio-group.mjs +0 -1
  279. package/.output/server/_libs/radix-ui__react-roving-focus.mjs +0 -235
  280. package/.output/server/_libs/radix-ui__react-scroll-area.mjs +0 -731
  281. package/.output/server/_libs/radix-ui__react-select.mjs +0 -1207
  282. package/.output/server/_libs/radix-ui__react-separator.mjs +0 -28
  283. package/.output/server/_libs/radix-ui__react-slider.mjs +0 -1
  284. package/.output/server/_libs/radix-ui__react-slot.mjs +0 -132
  285. package/.output/server/_libs/radix-ui__react-switch.mjs +0 -1
  286. package/.output/server/_libs/radix-ui__react-tabs.mjs +0 -194
  287. package/.output/server/_libs/radix-ui__react-toast.mjs +0 -2
  288. package/.output/server/_libs/radix-ui__react-toggle-group.mjs +0 -1
  289. package/.output/server/_libs/radix-ui__react-toggle.mjs +0 -1
  290. package/.output/server/_libs/radix-ui__react-toolbar.mjs +0 -1
  291. package/.output/server/_libs/radix-ui__react-tooltip.mjs +0 -498
  292. package/.output/server/_libs/radix-ui__react-use-previous.mjs +0 -14
  293. package/.output/server/_libs/radix-ui__react-use-size.mjs +0 -39
  294. package/.output/server/_libs/react-markdown.mjs +0 -235
  295. package/.output/server/_libs/react-remove-scroll-bar.mjs +0 -82
  296. package/.output/server/_libs/react-remove-scroll.mjs +0 -328
  297. package/.output/server/_libs/react-style-singleton.mjs +0 -69
  298. package/.output/server/_libs/remark-parse.mjs +0 -19
  299. package/.output/server/_libs/remark-rehype.mjs +0 -21
  300. package/.output/server/_libs/space-separated-tokens.mjs +0 -6
  301. package/.output/server/_libs/style-to-js.mjs +0 -72
  302. package/.output/server/_libs/style-to-object.mjs +0 -38
  303. package/.output/server/_libs/swr.mjs +0 -947
  304. package/.output/server/_libs/tailwind-merge.mjs +0 -3255
  305. package/.output/server/_libs/tanstack__react-virtual.mjs +0 -130
  306. package/.output/server/_libs/tanstack__virtual-core.mjs +0 -1319
  307. package/.output/server/_libs/three.mjs +0 -26016
  308. package/.output/server/_libs/trim-lines.mjs +0 -41
  309. package/.output/server/_libs/trough.mjs +0 -85
  310. package/.output/server/_libs/tslib.mjs +0 -1
  311. package/.output/server/_libs/ungap__structured-clone.mjs +0 -212
  312. package/.output/server/_libs/unified.mjs +0 -661
  313. package/.output/server/_libs/unist-util-is.mjs +0 -100
  314. package/.output/server/_libs/unist-util-position.mjs +0 -27
  315. package/.output/server/_libs/unist-util-stringify-position.mjs +0 -27
  316. package/.output/server/_libs/unist-util-visit-parents.mjs +0 -82
  317. package/.output/server/_libs/unist-util-visit.mjs +0 -24
  318. package/.output/server/_libs/use-callback-ref.mjs +0 -66
  319. package/.output/server/_libs/use-sidecar.mjs +0 -106
  320. package/.output/server/_libs/vfile-message.mjs +0 -138
  321. package/.output/server/_libs/vfile.mjs +0 -467
  322. package/.output/server/_sessionId-E_Dmopc-.mjs +0 -144
  323. package/.output/server/_sessionId-U54BAqdp.mjs +0 -82
  324. package/.output/server/_ssr/CompareDrawer-CksatPed.mjs +0 -1058
  325. package/.output/server/_ssr/InspectorPet-DNc4GQ7z.mjs +0 -936
  326. package/.output/server/_ssr/ProxyViewerContainer-B02Ey0p_.mjs +0 -17607
  327. package/.output/server/_ssr/ReplayDialog-DdMvHJF1.mjs +0 -723
  328. package/.output/server/_ssr/RequestAnatomy--vh2Z8__.mjs +0 -835
  329. package/.output/server/_ssr/ResponseView-Dhxc-cKC.mjs +0 -755
  330. package/.output/server/_ssr/StreamingChunkSequence-BG0EQmaD.mjs +0 -272
  331. package/.output/server/_ssr/index-D0At9nfd.mjs +0 -82
  332. package/.output/server/_ssr/index-lcfulIXa.mjs +0 -133
  333. package/.output/server/_ssr/json-viewer-My1J1_5R.mjs +0 -481
  334. package/.output/server/_ssr/start-HYkvq4Ni.mjs +0 -4
  335. package/.output/server/_tanstack-start-manifest_v-B2chR8ef.mjs +0 -4
  336. package/.output/server/node_modules/tslib/modules/index.js +0 -70
  337. package/.output/server/node_modules/tslib/modules/package.json +0 -3
  338. package/.output/server/node_modules/tslib/package.json +0 -47
  339. package/.output/server/node_modules/tslib/tslib.js +0 -484
  340. package/.output/server/package.json +0 -9
  341. package/src/routes/__root.tsx +0 -170
  342. /package/.output/{public → ui}/assets/agent-inspector-58K1_MsC.ico +0 -0
  343. /package/.output/{public → ui}/assets/alibaba-TTwafVwX.svg +0 -0
  344. /package/.output/{public → ui}/assets/minimax-BPMzvuL-.jpeg +0 -0
  345. /package/.output/{public → ui}/assets/qwen-mMn3f5ul.webp +0 -0
  346. /package/.output/{public → ui}/assets/zhipuai-BPNAnxo-.svg +0 -0
  347. /package/src/{routes → backend/routes}/livez.ts +0 -0
@@ -1 +0,0 @@
1
- import{r as i,j as e,k as m,s as R}from"./index-C6qZwYlR.js";import{s as D,a9 as G,f as V,h as z,Q,e as U,t as W,v as q,w as H,aa as X}from"./ProxyViewerContainer-BhpIgfBi.js";function M(s){if(s===null)return"null";if(Array.isArray(s))return"array";switch(typeof s){case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"object":return"object";case"bigint":case"symbol":case"undefined":case"function":return"object"}}function g(s){return s!==null&&(Array.isArray(s)||typeof s=="object")}function $(s){return Array.isArray(s)?s.map((t,n)=>[String(n),t]):typeof s=="object"&&s!==null?Object.entries(s):[]}const J=120;function O({text:s}){return e.jsx("span",{className:"whitespace-pre-wrap break-words",children:s})}function Z({text:s}){const[t,n]=i.useState(!1);return s.length>J?e.jsxs("span",{className:"text-emerald-400 break-all",children:['"',t?e.jsx("span",{className:"cursor-pointer",onClick:r=>{r.stopPropagation(),n(!1)},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.stopPropagation(),n(!1))},role:"button",tabIndex:0,children:e.jsx(O,{text:s})}):e.jsxs(W,{delayDuration:300,children:[e.jsxs(q,{onClick:r=>{r.stopPropagation(),n(!0)},className:"text-left cursor-pointer",children:[e.jsx("span",{children:s.slice(0,J)}),e.jsx("span",{className:"text-emerald-400/50",children:"..."})]}),e.jsxs(H,{side:"bottom",className:"max-w-md text-xs p-2 break-words whitespace-pre-wrap",children:[s.slice(0,500),s.length>500?"...":""]})]}),'"']}):e.jsxs("span",{className:"text-emerald-400 break-all",children:['"',e.jsx(O,{text:s}),'"']})}function B({value:s}){if(s===null)return e.jsx("span",{className:"text-rose-400 italic",children:"null"});switch(typeof s){case"string":return e.jsx(Z,{text:s});case"number":return e.jsx("span",{className:"text-amber-400",children:s});case"boolean":return e.jsx("span",{className:"text-blue-400",children:s?"true":"false"});case"object":case"bigint":case"symbol":case"undefined":case"function":return e.jsx("span",{className:"text-muted-foreground",children:JSON.stringify(s)})}}function A({value:s}){const[t,n]=i.useState(!1);function a(r){r.stopPropagation(),R(JSON.stringify(s,null,2)).then(d=>{d&&(n(!0),setTimeout(()=>{n(!1)},2e3))})}return e.jsx("button",{type:"button",onClick:a,className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground transition-colors","aria-label":t?"Copied JSON":"Copy JSON",title:"Copy JSON",children:t?e.jsx(V,{className:"size-3 text-green-500"}):e.jsx(z,{className:"size-3"})})}function ee({value:s}){const[t,n]=i.useState(!1);function a(r){r.stopPropagation(),R(JSON.stringify(s,null,2)).then(d=>{d&&(n(!0),setTimeout(()=>{n(!1)},2e3))})}return e.jsx("button",{type:"button",onClick:a,className:"opacity-0 group-hover/row:opacity-100 hover:bg-muted p-0.5 rounded transition-opacity shrink-0","aria-label":t?"Copied JSON value":"Copy JSON value",title:"Copy to clipboard",children:t?e.jsx(V,{className:"size-3 text-green-500"}):e.jsx(z,{className:"size-3 text-muted-foreground"})})}function se({onClick:s}){return e.jsx("button",{type:"button",onClick:s,className:"opacity-0 group-hover/row:opacity-100 hover:bg-muted p-0.5 rounded transition-opacity shrink-0",title:"Expand all descendants",children:e.jsx(X,{className:"size-3.5 text-muted-foreground"})})}const ne=i.memo(function s({name:t,value:n,level:a,defaultExpandDepth:r,isArrayItem:d,path:l,expandTargetPath:u,anatomyPaths:f}){const h=i.useMemo(()=>u===null?!1:l===""?u.length>0:u===l||u.startsWith(`${l}/`),[u,l]),C=a<r||h&&g(n),[p,j]=i.useState(C);i.useEffect(()=>{h&&g(n)&&!p&&j(!0)},[u]);const[y,x]=i.useState(0),[N,w]=i.useState(null),c=g(n),v=N===Number.POSITIVE_INFINITY,b=i.useMemo(()=>$(n),[n]),S=i.useMemo(()=>b.some(([,o])=>g(o)),[b]),k=M(n),F=k==="array"?"[":"{",T=k==="array"?"]":"}",K=f!==null&&f.has(l);function E(){j(!0),w(Number.POSITIVE_INFINITY),x(o=>o+1)}function P(){j(!1),w(0),x(o=>o+1)}function I(){v?P():j(!p)}function _(o){o.stopPropagation(),E()}const L=N??r;return e.jsxs("div",{className:m(a>0&&"border-l border-border/50 ml-2"),children:[e.jsxs("div",{className:m("flex items-start gap-1 py-0.5 px-1 -ml-1 rounded-sm group/row",c&&"cursor-pointer hover:bg-muted/50"),"data-anatomy-path":K?l:void 0,onClick:c?I:void 0,onKeyDown:c?o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),I())}:void 0,onDoubleClick:c&&S?()=>E():void 0,role:c?"button":void 0,tabIndex:c?0:void 0,children:[c?e.jsx("span",{className:"w-4 h-5 flex items-center justify-center shrink-0",children:p?e.jsx(Q,{className:"size-3 text-muted-foreground"}):e.jsx(U,{className:"size-3 text-muted-foreground"})}):e.jsx("span",{className:"w-4 shrink-0"}),e.jsx("span",{className:m("shrink-0",d?"text-muted-foreground":"text-cyan-400"),children:d?t:`"${t}"`}),e.jsx("span",{className:"text-muted-foreground shrink-0",children:c?"":":"}),c?e.jsxs("span",{className:"text-muted-foreground",children:[F,e.jsxs("span",{className:"text-muted-foreground/60 text-xs",children:[" ",b.length," ",b.length===1?"item":"items"," ",T]})]}):e.jsx("span",{className:"min-w-0",children:e.jsx(B,{value:n})}),c&&S&&!v&&e.jsx(se,{onClick:_}),e.jsx(ee,{value:n})]}),c&&p&&e.jsxs("div",{className:"pl-4",children:[b.map(([o,Y])=>e.jsx(s,{name:o,value:Y,level:a+1,defaultExpandDepth:L,isArrayItem:k==="array",path:l===""?`/${o}`:`${l}/${o}`,expandTargetPath:u,anatomyPaths:f},o)),e.jsx("div",{className:"text-muted-foreground py-0.5 px-1",children:T})]},y)]})});function te({data:s,defaultExpandDepth:t=0,className:n,showCopy:a=!1,bulkDepth:r,bulkRevision:d,anatomyPaths:l=null,expandToPath:u=null}){const f=g(s),h=i.useMemo(()=>$(s),[s]),C=r??t,p=d??0;if(!f)return e.jsx(D,{children:e.jsx("div",{className:m("font-mono text-xs leading-relaxed",n),children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(B,{value:s}),a&&e.jsx(A,{value:s})]})})});const y=M(s)==="array";return e.jsx(D,{children:e.jsxs("div",{className:m("font-mono text-xs leading-relaxed",n),children:[a&&e.jsx("div",{className:"mb-2 flex items-center justify-end gap-2",children:e.jsx(A,{value:s})}),h.length===0&&e.jsxs("div",{className:"rounded-md border border-white/10 bg-black/20 px-3 py-2 text-muted-foreground",children:[e.jsx("span",{className:"text-cyan-300",children:y?"[]":"{}"}),e.jsx("span",{className:"ml-2 text-[10px] uppercase",children:"0 items"})]}),e.jsx("div",{children:h.map(([x,N])=>e.jsx(ne,{name:x,value:N,level:0,defaultExpandDepth:C,isArrayItem:y,path:`/${x}`,expandTargetPath:u,anatomyPaths:l},x))},p)]})})}const ae=i.memo(function({text:t,defaultExpandDepth:n=0,className:a,bulkDepth:r,bulkRevision:d}){const l=i.useMemo(()=>G(t),[t]);return l.kind==="json"?e.jsx(te,{data:l.data,defaultExpandDepth:n,className:a,bulkDepth:r,bulkRevision:d}):e.jsx("pre",{className:m("font-mono text-xs whitespace-pre-wrap break-words",a),children:t})});export{te as JsonViewer,ae as JsonViewerFromString};
@@ -1 +0,0 @@
1
- import "../react.mjs";
@@ -1,344 +0,0 @@
1
- import { r as reactExports, j as jsxRuntimeExports } from "../react.mjs";
2
- import { c as composeEventHandlers } from "../radix-ui__primitive.mjs";
3
- import { P as Primitive, d as dispatchDiscreteCustomEvent } from "../radix-ui__react-primitive.mjs";
4
- import { u as useComposedRefs } from "../radix-ui__react-compose-refs.mjs";
5
- import { u as useCallbackRef } from "./react-use-callback-ref+[...].mjs";
6
- var DISMISSABLE_LAYER_NAME = "DismissableLayer";
7
- var CONTEXT_UPDATE = "dismissableLayer.update";
8
- var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
9
- var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
10
- var originalBodyPointerEvents;
11
- var DismissableLayerContext = reactExports.createContext({
12
- layers: /* @__PURE__ */ new Set(),
13
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
14
- branches: /* @__PURE__ */ new Set(),
15
- // Outside elements that belong to a layer's own dismiss affordance (eg, a
16
- // dialog overlay). Pressing them should dismiss the layer regardless of
17
- // whether or not they stop propagation.
18
- //
19
- // See https://github.com/radix-ui/primitives/issues/3346
20
- dismissableSurfaces: /* @__PURE__ */ new Set()
21
- });
22
- var DismissableLayer = reactExports.forwardRef(
23
- (props, forwardedRef) => {
24
- const {
25
- disableOutsidePointerEvents = false,
26
- deferPointerDownOutside = false,
27
- onEscapeKeyDown,
28
- onPointerDownOutside,
29
- onFocusOutside,
30
- onInteractOutside,
31
- onDismiss,
32
- ...layerProps
33
- } = props;
34
- const context = reactExports.useContext(DismissableLayerContext);
35
- const [node, setNode] = reactExports.useState(null);
36
- const ownerDocument = node?.ownerDocument ?? globalThis?.document;
37
- const [, force] = reactExports.useState({});
38
- const composedRefs = useComposedRefs(forwardedRef, setNode);
39
- const layers = Array.from(context.layers);
40
- const [highestLayerWithOutsidePointerEventsDisabled] = [
41
- ...context.layersWithOutsidePointerEventsDisabled
42
- ].slice(-1);
43
- const highestLayerWithOutsidePointerEventsDisabledIndex = highestLayerWithOutsidePointerEventsDisabled ? layers.indexOf(highestLayerWithOutsidePointerEventsDisabled) : -1;
44
- const index = node ? layers.indexOf(node) : -1;
45
- const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
46
- const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
47
- const isDeferredPointerDownOutsideRef = reactExports.useRef(false);
48
- const pointerDownOutside = usePointerDownOutside(
49
- (event) => {
50
- onPointerDownOutside?.(event);
51
- onInteractOutside?.(event);
52
- if (!event.defaultPrevented) onDismiss?.();
53
- },
54
- {
55
- ownerDocument,
56
- deferPointerDownOutside,
57
- isDeferredPointerDownOutsideRef,
58
- dismissableSurfaces: context.dismissableSurfaces,
59
- shouldHandlePointerDownOutside: reactExports.useCallback(
60
- (target) => {
61
- if (!(target instanceof Node)) {
62
- return false;
63
- }
64
- const isPointerDownOnBranch = [...context.branches].some(
65
- (branch) => branch.contains(target)
66
- );
67
- return isPointerEventsEnabled && !isPointerDownOnBranch;
68
- },
69
- [context.branches, isPointerEventsEnabled]
70
- )
71
- }
72
- );
73
- const focusOutside = useFocusOutside((event) => {
74
- if (deferPointerDownOutside && isDeferredPointerDownOutsideRef.current) {
75
- return;
76
- }
77
- const target = event.target;
78
- const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
79
- if (isFocusInBranch) return;
80
- onFocusOutside?.(event);
81
- onInteractOutside?.(event);
82
- if (!event.defaultPrevented) onDismiss?.();
83
- }, ownerDocument);
84
- const isHighestLayer = node ? index === layers.length - 1 : false;
85
- const handleKeyDown = useCallbackRef((event) => {
86
- if (event.key !== "Escape") {
87
- return;
88
- }
89
- onEscapeKeyDown?.(event);
90
- if (!event.defaultPrevented && onDismiss) {
91
- event.preventDefault();
92
- onDismiss();
93
- }
94
- });
95
- reactExports.useEffect(() => {
96
- if (!isHighestLayer) {
97
- return;
98
- }
99
- ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
100
- return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
101
- }, [ownerDocument, isHighestLayer, handleKeyDown]);
102
- reactExports.useEffect(() => {
103
- if (!node) return;
104
- if (disableOutsidePointerEvents) {
105
- if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
106
- originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
107
- ownerDocument.body.style.pointerEvents = "none";
108
- }
109
- context.layersWithOutsidePointerEventsDisabled.add(node);
110
- }
111
- context.layers.add(node);
112
- dispatchUpdate();
113
- return () => {
114
- if (disableOutsidePointerEvents) {
115
- context.layersWithOutsidePointerEventsDisabled.delete(node);
116
- if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
117
- ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
118
- }
119
- }
120
- };
121
- }, [node, ownerDocument, disableOutsidePointerEvents, context]);
122
- reactExports.useEffect(() => {
123
- return () => {
124
- if (!node) return;
125
- context.layers.delete(node);
126
- context.layersWithOutsidePointerEventsDisabled.delete(node);
127
- dispatchUpdate();
128
- };
129
- }, [node, context]);
130
- reactExports.useEffect(() => {
131
- const handleUpdate = () => force({});
132
- document.addEventListener(CONTEXT_UPDATE, handleUpdate);
133
- return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
134
- }, []);
135
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
136
- Primitive.div,
137
- {
138
- ...layerProps,
139
- ref: composedRefs,
140
- style: {
141
- pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
142
- ...props.style
143
- },
144
- onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
145
- onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
146
- onPointerDownCapture: composeEventHandlers(
147
- props.onPointerDownCapture,
148
- pointerDownOutside.onPointerDownCapture
149
- )
150
- }
151
- );
152
- }
153
- );
154
- DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
155
- var BRANCH_NAME = "DismissableLayerBranch";
156
- var DismissableLayerBranch = reactExports.forwardRef((props, forwardedRef) => {
157
- const context = reactExports.useContext(DismissableLayerContext);
158
- const ref = reactExports.useRef(null);
159
- const composedRefs = useComposedRefs(forwardedRef, ref);
160
- reactExports.useEffect(() => {
161
- const node = ref.current;
162
- if (node) {
163
- context.branches.add(node);
164
- return () => {
165
- context.branches.delete(node);
166
- };
167
- }
168
- }, [context.branches]);
169
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { ...props, ref: composedRefs });
170
- });
171
- DismissableLayerBranch.displayName = BRANCH_NAME;
172
- function useDismissableLayerSurface() {
173
- const context = reactExports.useContext(DismissableLayerContext);
174
- const [node, setNode] = reactExports.useState(null);
175
- reactExports.useEffect(() => {
176
- if (!node) {
177
- return;
178
- }
179
- context.dismissableSurfaces.add(node);
180
- return () => {
181
- context.dismissableSurfaces.delete(node);
182
- };
183
- }, [node, context.dismissableSurfaces]);
184
- return setNode;
185
- }
186
- var IS_TRUE = () => true;
187
- function usePointerDownOutside(onPointerDownOutside, args) {
188
- const {
189
- ownerDocument = globalThis?.document,
190
- deferPointerDownOutside = false,
191
- isDeferredPointerDownOutsideRef,
192
- dismissableSurfaces,
193
- shouldHandlePointerDownOutside = IS_TRUE
194
- } = args;
195
- const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
196
- const isPointerInsideReactTreeRef = reactExports.useRef(false);
197
- const isPointerDownOutsideRef = reactExports.useRef(false);
198
- const interceptedOutsideInteractionEventsRef = reactExports.useRef(/* @__PURE__ */ new Map());
199
- const handleClickRef = reactExports.useRef(() => {
200
- });
201
- reactExports.useEffect(() => {
202
- function resetOutsideInteraction() {
203
- isPointerDownOutsideRef.current = false;
204
- isDeferredPointerDownOutsideRef.current = false;
205
- interceptedOutsideInteractionEventsRef.current.clear();
206
- }
207
- function isOutsideInteractionIntercepted() {
208
- return Array.from(interceptedOutsideInteractionEventsRef.current.values()).some(Boolean);
209
- }
210
- function handleInteractionCapture(event) {
211
- if (!isPointerDownOutsideRef.current) {
212
- return;
213
- }
214
- const target = event.target;
215
- const isDismissableSurface = target instanceof Node && [...dismissableSurfaces].some((surface) => surface.contains(target));
216
- if (!isDismissableSurface) {
217
- interceptedOutsideInteractionEventsRef.current.set(event.type, true);
218
- }
219
- if (event.type === "click") {
220
- window.setTimeout(() => {
221
- if (isPointerDownOutsideRef.current) {
222
- handleClickRef.current();
223
- }
224
- }, 0);
225
- }
226
- }
227
- function handleInteractionBubble(event) {
228
- if (isPointerDownOutsideRef.current) {
229
- interceptedOutsideInteractionEventsRef.current.set(event.type, false);
230
- }
231
- }
232
- const handlePointerDown = (event) => {
233
- if (event.target && !isPointerInsideReactTreeRef.current) {
234
- let handleAndDispatchPointerDownOutsideEvent2 = function() {
235
- ownerDocument.removeEventListener("click", handleClickRef.current);
236
- const wasOutsideInteractionIntercepted = isOutsideInteractionIntercepted();
237
- resetOutsideInteraction();
238
- if (!wasOutsideInteractionIntercepted) {
239
- handleAndDispatchCustomEvent(
240
- POINTER_DOWN_OUTSIDE,
241
- handlePointerDownOutside,
242
- eventDetail,
243
- { discrete: true }
244
- );
245
- }
246
- };
247
- if (!shouldHandlePointerDownOutside(event.target)) {
248
- ownerDocument.removeEventListener("click", handleClickRef.current);
249
- resetOutsideInteraction();
250
- isPointerInsideReactTreeRef.current = false;
251
- return;
252
- }
253
- const eventDetail = { originalEvent: event };
254
- isPointerDownOutsideRef.current = true;
255
- isDeferredPointerDownOutsideRef.current = deferPointerDownOutside && event.button === 0;
256
- interceptedOutsideInteractionEventsRef.current.clear();
257
- if (!deferPointerDownOutside || event.button !== 0) {
258
- handleAndDispatchPointerDownOutsideEvent2();
259
- } else {
260
- ownerDocument.removeEventListener("click", handleClickRef.current);
261
- handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
262
- ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
263
- }
264
- } else {
265
- ownerDocument.removeEventListener("click", handleClickRef.current);
266
- resetOutsideInteraction();
267
- }
268
- isPointerInsideReactTreeRef.current = false;
269
- };
270
- const outsideInteractionEvents = [
271
- "pointerup",
272
- "mousedown",
273
- "mouseup",
274
- "touchstart",
275
- "touchend",
276
- "click"
277
- ];
278
- for (const eventName of outsideInteractionEvents) {
279
- ownerDocument.addEventListener(eventName, handleInteractionCapture, true);
280
- ownerDocument.addEventListener(eventName, handleInteractionBubble);
281
- }
282
- const timerId = window.setTimeout(() => {
283
- ownerDocument.addEventListener("pointerdown", handlePointerDown);
284
- }, 0);
285
- return () => {
286
- window.clearTimeout(timerId);
287
- ownerDocument.removeEventListener("pointerdown", handlePointerDown);
288
- ownerDocument.removeEventListener("click", handleClickRef.current);
289
- for (const eventName of outsideInteractionEvents) {
290
- ownerDocument.removeEventListener(eventName, handleInteractionCapture, true);
291
- ownerDocument.removeEventListener(eventName, handleInteractionBubble);
292
- }
293
- };
294
- }, [
295
- ownerDocument,
296
- handlePointerDownOutside,
297
- deferPointerDownOutside,
298
- isDeferredPointerDownOutsideRef,
299
- dismissableSurfaces,
300
- shouldHandlePointerDownOutside
301
- ]);
302
- return {
303
- // ensures we check React component tree (not just DOM tree)
304
- onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
305
- };
306
- }
307
- function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
308
- const handleFocusOutside = useCallbackRef(onFocusOutside);
309
- const isFocusInsideReactTreeRef = reactExports.useRef(false);
310
- reactExports.useEffect(() => {
311
- const handleFocus = (event) => {
312
- if (event.target && !isFocusInsideReactTreeRef.current) {
313
- const eventDetail = { originalEvent: event };
314
- handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
315
- discrete: false
316
- });
317
- }
318
- };
319
- ownerDocument.addEventListener("focusin", handleFocus);
320
- return () => ownerDocument.removeEventListener("focusin", handleFocus);
321
- }, [ownerDocument, handleFocusOutside]);
322
- return {
323
- onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
324
- onBlurCapture: () => isFocusInsideReactTreeRef.current = false
325
- };
326
- }
327
- function dispatchUpdate() {
328
- const event = new CustomEvent(CONTEXT_UPDATE);
329
- document.dispatchEvent(event);
330
- }
331
- function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
332
- const target = detail.originalEvent.target;
333
- const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
334
- if (handler) target.addEventListener(name, handler, { once: true });
335
- if (discrete) {
336
- dispatchDiscreteCustomEvent(target, event);
337
- } else {
338
- target.dispatchEvent(event);
339
- }
340
- }
341
- export {
342
- DismissableLayer as D,
343
- useDismissableLayerSurface as u
344
- };
@@ -1,2 +0,0 @@
1
- import "../react.mjs";
2
- import "../react-dom.mjs";
@@ -1,2 +0,0 @@
1
- import "../react.mjs";
2
- import "../react-dom.mjs";
@@ -1,2 +0,0 @@
1
- import "../react.mjs";
2
- import "../react-dom.mjs";
@@ -1,11 +0,0 @@
1
- import { r as reactExports } from "../react.mjs";
2
- function useCallbackRef(callback) {
3
- const callbackRef = reactExports.useRef(callback);
4
- reactExports.useEffect(() => {
5
- callbackRef.current = callback;
6
- });
7
- return reactExports.useMemo(() => ((...args) => callbackRef.current?.(...args)), []);
8
- }
9
- export {
10
- useCallbackRef as u
11
- };
@@ -1,69 +0,0 @@
1
- import { r as reactExports, b as React2 } from "../react.mjs";
2
- import { u as useLayoutEffect2 } from "./react-use-layout-effect+[...].mjs";
3
- var useInsertionEffect = React2[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
4
- function useControllableState({
5
- prop,
6
- defaultProp,
7
- onChange = () => {
8
- },
9
- caller
10
- }) {
11
- const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
12
- defaultProp,
13
- onChange
14
- });
15
- const isControlled = prop !== void 0;
16
- const value = isControlled ? prop : uncontrolledProp;
17
- {
18
- const isControlledRef = reactExports.useRef(prop !== void 0);
19
- reactExports.useEffect(() => {
20
- const wasControlled = isControlledRef.current;
21
- if (wasControlled !== isControlled) {
22
- const from = wasControlled ? "controlled" : "uncontrolled";
23
- const to = isControlled ? "controlled" : "uncontrolled";
24
- console.warn(
25
- `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
26
- );
27
- }
28
- isControlledRef.current = isControlled;
29
- }, [isControlled, caller]);
30
- }
31
- const setValue = reactExports.useCallback(
32
- (nextValue) => {
33
- if (isControlled) {
34
- const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
35
- if (value2 !== prop) {
36
- onChangeRef.current?.(value2);
37
- }
38
- } else {
39
- setUncontrolledProp(nextValue);
40
- }
41
- },
42
- [isControlled, prop, setUncontrolledProp, onChangeRef]
43
- );
44
- return [value, setValue];
45
- }
46
- function useUncontrolledState({
47
- defaultProp,
48
- onChange
49
- }) {
50
- const [value, setValue] = reactExports.useState(defaultProp);
51
- const prevValueRef = reactExports.useRef(value);
52
- const onChangeRef = reactExports.useRef(onChange);
53
- useInsertionEffect(() => {
54
- onChangeRef.current = onChange;
55
- }, [onChange]);
56
- reactExports.useEffect(() => {
57
- if (prevValueRef.current !== value) {
58
- onChangeRef.current?.(value);
59
- prevValueRef.current = value;
60
- }
61
- }, [value, prevValueRef]);
62
- return [value, setValue, onChangeRef];
63
- }
64
- function isFunction(value) {
65
- return typeof value === "function";
66
- }
67
- export {
68
- useControllableState as u
69
- };
@@ -1 +0,0 @@
1
- import "../react.mjs";
@@ -1,28 +0,0 @@
1
- import { b as React2, r as reactExports } from "../react.mjs";
2
- var _isHydrated = false;
3
- function useIsHydrated() {
4
- const [isHydrated, setIsHydrated] = reactExports.useState(_isHydrated);
5
- reactExports.useEffect(() => {
6
- if (!_isHydrated) {
7
- _isHydrated = true;
8
- setIsHydrated(true);
9
- }
10
- }, []);
11
- return isHydrated;
12
- }
13
- var useReactSyncExternalStore = React2[" useSyncExternalStore ".trim().toString()];
14
- function subscribe() {
15
- return () => {
16
- };
17
- }
18
- function useIsHydratedModern() {
19
- return useReactSyncExternalStore(
20
- subscribe,
21
- () => true,
22
- () => false
23
- );
24
- }
25
- var useIsHydrated2 = typeof useReactSyncExternalStore === "function" ? useIsHydratedModern : useIsHydrated;
26
- export {
27
- useIsHydrated2 as u
28
- };
@@ -1,6 +0,0 @@
1
- import { r as reactExports } from "../react.mjs";
2
- var useLayoutEffect2 = globalThis?.document ? reactExports.useLayoutEffect : () => {
3
- };
4
- export {
5
- useLayoutEffect2 as u
6
- };
@@ -1,34 +0,0 @@
1
- import { r as reactExports, j as jsxRuntimeExports } from "../react.mjs";
2
- import { P as Primitive } from "../radix-ui__react-primitive.mjs";
3
- var VISUALLY_HIDDEN_STYLES = Object.freeze({
4
- // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
5
- position: "absolute",
6
- border: 0,
7
- width: 1,
8
- height: 1,
9
- padding: 0,
10
- margin: -1,
11
- overflow: "hidden",
12
- clip: "rect(0, 0, 0, 0)",
13
- whiteSpace: "nowrap",
14
- wordWrap: "normal"
15
- });
16
- var NAME = "VisuallyHidden";
17
- var VisuallyHidden = reactExports.forwardRef(
18
- (props, forwardedRef) => {
19
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
20
- Primitive.span,
21
- {
22
- ...props,
23
- ref: forwardedRef,
24
- style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }
25
- }
26
- );
27
- }
28
- );
29
- VisuallyHidden.displayName = NAME;
30
- var Root = VisuallyHidden;
31
- export {
32
- Root as R,
33
- VISUALLY_HIDDEN_STYLES as V
34
- };
@@ -1,122 +0,0 @@
1
- var getDefaultParent = function(originalTarget) {
2
- if (typeof document === "undefined") {
3
- return null;
4
- }
5
- var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
6
- return sampleTarget.ownerDocument.body;
7
- };
8
- var counterMap = /* @__PURE__ */ new WeakMap();
9
- var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
10
- var markerMap = {};
11
- var lockCount = 0;
12
- var unwrapHost = function(node) {
13
- return node && (node.host || unwrapHost(node.parentNode));
14
- };
15
- var correctTargets = function(parent, targets) {
16
- return targets.map(function(target) {
17
- if (parent.contains(target)) {
18
- return target;
19
- }
20
- var correctedTarget = unwrapHost(target);
21
- if (correctedTarget && parent.contains(correctedTarget)) {
22
- return correctedTarget;
23
- }
24
- console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
25
- return null;
26
- }).filter(function(x) {
27
- return Boolean(x);
28
- });
29
- };
30
- var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
31
- var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
32
- if (!markerMap[markerName]) {
33
- markerMap[markerName] = /* @__PURE__ */ new WeakMap();
34
- }
35
- var markerCounter = markerMap[markerName];
36
- var hiddenNodes = [];
37
- var elementsToKeep = /* @__PURE__ */ new Set();
38
- var elementsToStop = new Set(targets);
39
- var keep = function(el) {
40
- if (!el || elementsToKeep.has(el)) {
41
- return;
42
- }
43
- elementsToKeep.add(el);
44
- keep(el.parentNode);
45
- };
46
- targets.forEach(keep);
47
- var deep = function(parent) {
48
- if (!parent || elementsToStop.has(parent)) {
49
- return;
50
- }
51
- Array.prototype.forEach.call(parent.children, function(node) {
52
- if (elementsToKeep.has(node)) {
53
- deep(node);
54
- } else {
55
- try {
56
- var attr = node.getAttribute(controlAttribute);
57
- var alreadyHidden = attr !== null && attr !== "false";
58
- var counterValue = (counterMap.get(node) || 0) + 1;
59
- var markerValue = (markerCounter.get(node) || 0) + 1;
60
- counterMap.set(node, counterValue);
61
- markerCounter.set(node, markerValue);
62
- hiddenNodes.push(node);
63
- if (counterValue === 1 && alreadyHidden) {
64
- uncontrolledNodes.set(node, true);
65
- }
66
- if (markerValue === 1) {
67
- node.setAttribute(markerName, "true");
68
- }
69
- if (!alreadyHidden) {
70
- node.setAttribute(controlAttribute, "true");
71
- }
72
- } catch (e) {
73
- console.error("aria-hidden: cannot operate on ", node, e);
74
- }
75
- }
76
- });
77
- };
78
- deep(parentNode);
79
- elementsToKeep.clear();
80
- lockCount++;
81
- return function() {
82
- hiddenNodes.forEach(function(node) {
83
- var counterValue = counterMap.get(node) - 1;
84
- var markerValue = markerCounter.get(node) - 1;
85
- counterMap.set(node, counterValue);
86
- markerCounter.set(node, markerValue);
87
- if (!counterValue) {
88
- if (!uncontrolledNodes.has(node)) {
89
- node.removeAttribute(controlAttribute);
90
- }
91
- uncontrolledNodes.delete(node);
92
- }
93
- if (!markerValue) {
94
- node.removeAttribute(markerName);
95
- }
96
- });
97
- lockCount--;
98
- if (!lockCount) {
99
- counterMap = /* @__PURE__ */ new WeakMap();
100
- counterMap = /* @__PURE__ */ new WeakMap();
101
- uncontrolledNodes = /* @__PURE__ */ new WeakMap();
102
- markerMap = {};
103
- }
104
- };
105
- };
106
- var hideOthers = function(originalTarget, parentNode, markerName) {
107
- if (markerName === void 0) {
108
- markerName = "data-aria-hidden";
109
- }
110
- var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
111
- var activeParentNode = getDefaultParent(originalTarget);
112
- if (!activeParentNode) {
113
- return function() {
114
- return null;
115
- };
116
- }
117
- targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
118
- return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
119
- };
120
- export {
121
- hideOthers as h
122
- };
@@ -1,8 +0,0 @@
1
- function bail(error) {
2
- if (error) {
3
- throw error;
4
- }
5
- }
6
- export {
7
- bail as b
8
- };