@loopstack/loopstack-studio 0.21.0 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (649) hide show
  1. package/dist/components/LoadingCentered.js +2 -2
  2. package/dist/components/ai-elements/code-block.js +96 -0
  3. package/dist/components/ai-elements/message.js +87 -0
  4. package/dist/components/ai-elements/prompt-input.js +321 -0
  5. package/dist/components/ai-elements/reasoning.js +124 -0
  6. package/dist/components/ai-elements/shimmer.js +37 -0
  7. package/dist/components/ai-elements/sources.js +65 -0
  8. package/dist/components/ai-elements/tool.js +158 -0
  9. package/dist/components/content/ErrorAlert.js +17 -0
  10. package/dist/components/data-table/DataTable.js +99 -96
  11. package/dist/components/dynamic-form/CodeContent.js +2 -2
  12. package/dist/components/dynamic-form/FormElement.js +3 -3
  13. package/dist/components/dynamic-form/FormElementHeader.js +2 -2
  14. package/dist/components/dynamic-form/ObjectController.js +2 -2
  15. package/dist/components/layout/MainLayout.js +0 -1
  16. package/dist/components/lists/ListView.js +62 -59
  17. package/dist/components/loopstack-elements/link.js +115 -0
  18. package/dist/components/ui/button-group.js +13 -0
  19. package/dist/components/ui/command.js +7 -0
  20. package/dist/components/ui/context-menu.js +63 -0
  21. package/dist/components/ui/hover-card.js +6 -0
  22. package/dist/components/ui/input-group.js +85 -0
  23. package/dist/components/ui/table.js +2 -2
  24. package/dist/components/ui/tabs.js +54 -0
  25. package/dist/components/ui-widgets/UiActions.js +24 -0
  26. package/dist/components/ui-widgets/UiWidget.js +43 -0
  27. package/dist/components/ui-widgets/widgets/AiPromptInput.js +43 -0
  28. package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +23 -0
  29. package/dist/components/ui-widgets/widgets/SubmitButton.js +23 -0
  30. package/dist/features/code-explorer/CodeExplorer.js +69 -0
  31. package/dist/features/code-explorer/components/CodeExplorerTree.js +43 -0
  32. package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +82 -0
  33. package/dist/features/code-explorer/components/FileContentViewer.js +237 -0
  34. package/dist/features/code-explorer/components/FileTabsBar.js +191 -0
  35. package/dist/features/code-explorer/providers/CodeExplorerProvider.js +165 -0
  36. package/dist/features/code-explorer/utils/fileIcons.js +42 -0
  37. package/dist/features/dashboard/Dashboard.js +125 -0
  38. package/dist/features/dashboard/RunItem.js +76 -0
  39. package/dist/features/dashboard/RunList.js +32 -0
  40. package/dist/features/debug/components/ConfigFlowViewer.js +79 -0
  41. package/dist/features/debug/components/PipelineDebugHeader.js +48 -0
  42. package/dist/features/debug/components/PipelineDebugLegend.js +68 -0
  43. package/dist/features/debug/components/PipelineFlowViewer.js +109 -0
  44. package/dist/features/debug/components/pipeline-flow/StateNode.js +111 -0
  45. package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +41 -0
  46. package/dist/features/debug/components/pipeline-flow/WorkflowTransitionEdge.js +97 -0
  47. package/dist/features/debug/lib/edge-paths.js +47 -0
  48. package/dist/features/debug/lib/flow-utils.js +247 -0
  49. package/dist/features/health/LocalHealthCheck.js +1 -1
  50. package/dist/features/oauth/OAuthCallbackPage.js +2 -0
  51. package/dist/features/oauth/OAuthPromptRenderer.js +223 -0
  52. package/dist/features/oauth/index.js +3 -0
  53. package/dist/features/oauth/useOAuthPopup.js +83 -0
  54. package/dist/features/workbench/NavigationItems.js +52 -0
  55. package/dist/features/workbench/Workbench.js +101 -0
  56. package/dist/features/workbench/WorkbenchNavigation.js +38 -0
  57. package/dist/features/workbench/WorkflowItem.js +67 -0
  58. package/dist/features/workbench/WorkflowList.js +110 -0
  59. package/dist/features/workbench/components/DocumentItem.js +27 -0
  60. package/dist/features/workbench/components/DocumentList.js +40 -0
  61. package/dist/features/workbench/components/DocumentMetadataPills.js +63 -0
  62. package/dist/features/workbench/components/DocumentRenderer.js +54 -0
  63. package/dist/features/workbench/components/NavigationItem.js +68 -0
  64. package/dist/features/workbench/components/PipelineHistoryList.js +56 -0
  65. package/dist/features/workbench/components/WorkbenchSettingsModal.js +89 -0
  66. package/dist/features/workbench/components/WorkbenchSidebar.js +109 -0
  67. package/dist/features/workbench/components/WorkflowForms.js +22 -0
  68. package/dist/features/workbench/components/WorkflowHistoryItem.js +144 -0
  69. package/dist/features/workbench/components/buttons/WorkflowButtons.js +85 -0
  70. package/dist/features/workbench/components/document-details/DocumentDetails.js +425 -0
  71. package/dist/features/workbench/components/document-details/PromptDetails.js +146 -0
  72. package/dist/features/workbench/components/document-renderer/AiMessage.js +56 -0
  73. package/dist/features/workbench/components/document-renderer/AiMessageContent.js +174 -0
  74. package/dist/features/workbench/components/document-renderer/DocumentDebugRenderer.js +30 -0
  75. package/dist/features/workbench/components/document-renderer/DocumentFormRenderer.js +79 -0
  76. package/dist/features/workbench/components/document-renderer/DocumentMessageRenderer.js +10 -0
  77. package/dist/features/workbench/components/document-renderer/ErrorMessageRenderer.js +13 -0
  78. package/dist/features/workbench/components/document-renderer/LinkMessageRenderer.js +17 -0
  79. package/dist/features/workbench/components/document-renderer/MarkdownMessageRenderer.js +10 -0
  80. package/dist/features/workbench/components/document-renderer/PlainMessageRenderer.js +9 -0
  81. package/dist/features/workbench/hooks/useAutoScrollBottom.js +29 -0
  82. package/dist/features/workbench/hooks/useIntersectionObserver.js +44 -0
  83. package/dist/features/workbench/hooks/useScrollToListItem.js +23 -0
  84. package/dist/features/workbench/providers/ScrollProvider.js +22 -0
  85. package/dist/features/workbench/providers/WorkbenchContextProvider.js +3 -0
  86. package/dist/features/workspaces/Workspaces.js +156 -89
  87. package/dist/features/workspaces/components/CreateWorkspace.js +101 -78
  88. package/dist/features/workspaces/components/ExecutionTimeline.js +1 -1
  89. package/dist/hooks/index.js +1 -0
  90. package/dist/hooks/useDashboard.js +23 -0
  91. package/dist/hooks/useDocuments.js +45 -0
  92. package/dist/hooks/useFiles.js +63 -0
  93. package/dist/hooks/useNamespaceTree.js +27 -0
  94. package/dist/hooks/useNamespaces.js +34 -0
  95. package/dist/hooks/usePipelines.js +83 -6
  96. package/dist/hooks/useWorkflows.js +122 -0
  97. package/dist/hooks/useWorkspaces.js +49 -29
  98. package/dist/index.d.ts +75 -9
  99. package/dist/index.js +9 -1
  100. package/dist/lib/requireParam.js +6 -0
  101. package/dist/loopstack-studio.css +1 -1
  102. package/dist/node_modules/@ai-sdk/provider/dist/index.js +65 -0
  103. package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +1008 -0
  104. package/dist/node_modules/@dagrejs/dagre/dist/dagre.esm.js +1968 -0
  105. package/dist/node_modules/@shikijs/core/dist/index.js +1420 -0
  106. package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +236 -0
  107. package/dist/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.js +2 -0
  108. package/dist/node_modules/@shikijs/langs/dist/abap.js +2 -0
  109. package/dist/node_modules/@shikijs/langs/dist/actionscript-3.js +2 -0
  110. package/dist/node_modules/@shikijs/langs/dist/ada.js +2 -0
  111. package/dist/node_modules/@shikijs/langs/dist/angular-expression.js +2 -0
  112. package/dist/node_modules/@shikijs/langs/dist/angular-html.js +14 -0
  113. package/dist/node_modules/@shikijs/langs/dist/angular-inline-style.js +3 -0
  114. package/dist/node_modules/@shikijs/langs/dist/angular-inline-template.js +8 -0
  115. package/dist/node_modules/@shikijs/langs/dist/angular-let-declaration.js +3 -0
  116. package/dist/node_modules/@shikijs/langs/dist/angular-template-blocks.js +8 -0
  117. package/dist/node_modules/@shikijs/langs/dist/angular-template.js +3 -0
  118. package/dist/node_modules/@shikijs/langs/dist/angular-ts.js +16 -0
  119. package/dist/node_modules/@shikijs/langs/dist/apache.js +2 -0
  120. package/dist/node_modules/@shikijs/langs/dist/apex.js +2 -0
  121. package/dist/node_modules/@shikijs/langs/dist/apl.js +14 -0
  122. package/dist/node_modules/@shikijs/langs/dist/applescript.js +2 -0
  123. package/dist/node_modules/@shikijs/langs/dist/ara.js +2 -0
  124. package/dist/node_modules/@shikijs/langs/dist/asciidoc.js +2 -0
  125. package/dist/node_modules/@shikijs/langs/dist/asm.js +2 -0
  126. package/dist/node_modules/@shikijs/langs/dist/astro.js +16 -0
  127. package/dist/node_modules/@shikijs/langs/dist/awk.js +2 -0
  128. package/dist/node_modules/@shikijs/langs/dist/ballerina.js +2 -0
  129. package/dist/node_modules/@shikijs/langs/dist/bat.js +2 -0
  130. package/dist/node_modules/@shikijs/langs/dist/beancount.js +2 -0
  131. package/dist/node_modules/@shikijs/langs/dist/berry.js +2 -0
  132. package/dist/node_modules/@shikijs/langs/dist/bibtex.js +2 -0
  133. package/dist/node_modules/@shikijs/langs/dist/bicep.js +2 -0
  134. package/dist/node_modules/@shikijs/langs/dist/bird2.js +2 -0
  135. package/dist/node_modules/@shikijs/langs/dist/blade.js +18 -0
  136. package/dist/node_modules/@shikijs/langs/dist/bsl.js +3 -0
  137. package/dist/node_modules/@shikijs/langs/dist/c.js +2 -0
  138. package/dist/node_modules/@shikijs/langs/dist/c3.js +2 -0
  139. package/dist/node_modules/@shikijs/langs/dist/cadence.js +2 -0
  140. package/dist/node_modules/@shikijs/langs/dist/cairo.js +3 -0
  141. package/dist/node_modules/@shikijs/langs/dist/clarity.js +2 -0
  142. package/dist/node_modules/@shikijs/langs/dist/clojure.js +2 -0
  143. package/dist/node_modules/@shikijs/langs/dist/cmake.js +2 -0
  144. package/dist/node_modules/@shikijs/langs/dist/cobol.js +8 -0
  145. package/dist/node_modules/@shikijs/langs/dist/codeowners.js +2 -0
  146. package/dist/node_modules/@shikijs/langs/dist/codeql.js +2 -0
  147. package/dist/node_modules/@shikijs/langs/dist/coffee.js +3 -0
  148. package/dist/node_modules/@shikijs/langs/dist/common-lisp.js +2 -0
  149. package/dist/node_modules/@shikijs/langs/dist/coq.js +2 -0
  150. package/dist/node_modules/@shikijs/langs/dist/cpp-macro.js +10 -0
  151. package/dist/node_modules/@shikijs/langs/dist/cpp.js +12 -0
  152. package/dist/node_modules/@shikijs/langs/dist/crystal.js +16 -0
  153. package/dist/node_modules/@shikijs/langs/dist/csharp.js +2 -0
  154. package/dist/node_modules/@shikijs/langs/dist/css.js +2 -0
  155. package/dist/node_modules/@shikijs/langs/dist/csv.js +2 -0
  156. package/dist/node_modules/@shikijs/langs/dist/cue.js +2 -0
  157. package/dist/node_modules/@shikijs/langs/dist/cypher.js +2 -0
  158. package/dist/node_modules/@shikijs/langs/dist/d.js +2 -0
  159. package/dist/node_modules/@shikijs/langs/dist/dart.js +2 -0
  160. package/dist/node_modules/@shikijs/langs/dist/dax.js +2 -0
  161. package/dist/node_modules/@shikijs/langs/dist/desktop.js +2 -0
  162. package/dist/node_modules/@shikijs/langs/dist/diff.js +2 -0
  163. package/dist/node_modules/@shikijs/langs/dist/docker.js +2 -0
  164. package/dist/node_modules/@shikijs/langs/dist/dotenv.js +2 -0
  165. package/dist/node_modules/@shikijs/langs/dist/dream-maker.js +2 -0
  166. package/dist/node_modules/@shikijs/langs/dist/edge.js +10 -0
  167. package/dist/node_modules/@shikijs/langs/dist/elixir.js +3 -0
  168. package/dist/node_modules/@shikijs/langs/dist/elm.js +3 -0
  169. package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +2 -0
  170. package/dist/node_modules/@shikijs/langs/dist/erb.js +8 -0
  171. package/dist/node_modules/@shikijs/langs/dist/erlang.js +3 -0
  172. package/dist/node_modules/@shikijs/langs/dist/es-tag-css.js +10 -0
  173. package/dist/node_modules/@shikijs/langs/dist/es-tag-glsl.js +10 -0
  174. package/dist/node_modules/@shikijs/langs/dist/es-tag-html.js +10 -0
  175. package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +8 -0
  176. package/dist/node_modules/@shikijs/langs/dist/es-tag-xml.js +3 -0
  177. package/dist/node_modules/@shikijs/langs/dist/fennel.js +2 -0
  178. package/dist/node_modules/@shikijs/langs/dist/fish.js +2 -0
  179. package/dist/node_modules/@shikijs/langs/dist/fluent.js +2 -0
  180. package/dist/node_modules/@shikijs/langs/dist/fortran-fixed-form.js +3 -0
  181. package/dist/node_modules/@shikijs/langs/dist/fortran-free-form.js +2 -0
  182. package/dist/node_modules/@shikijs/langs/dist/fsharp.js +3 -0
  183. package/dist/node_modules/@shikijs/langs/dist/gdresource.js +8 -0
  184. package/dist/node_modules/@shikijs/langs/dist/gdscript.js +2 -0
  185. package/dist/node_modules/@shikijs/langs/dist/gdshader.js +2 -0
  186. package/dist/node_modules/@shikijs/langs/dist/genie.js +2 -0
  187. package/dist/node_modules/@shikijs/langs/dist/gherkin.js +2 -0
  188. package/dist/node_modules/@shikijs/langs/dist/git-commit.js +3 -0
  189. package/dist/node_modules/@shikijs/langs/dist/git-rebase.js +3 -0
  190. package/dist/node_modules/@shikijs/langs/dist/gleam.js +2 -0
  191. package/dist/node_modules/@shikijs/langs/dist/glimmer-js.js +12 -0
  192. package/dist/node_modules/@shikijs/langs/dist/glimmer-ts.js +12 -0
  193. package/dist/node_modules/@shikijs/langs/dist/glsl.js +3 -0
  194. package/dist/node_modules/@shikijs/langs/dist/gn.js +2 -0
  195. package/dist/node_modules/@shikijs/langs/dist/gnuplot.js +2 -0
  196. package/dist/node_modules/@shikijs/langs/dist/go.js +2 -0
  197. package/dist/node_modules/@shikijs/langs/dist/graphql.js +12 -0
  198. package/dist/node_modules/@shikijs/langs/dist/groovy.js +2 -0
  199. package/dist/node_modules/@shikijs/langs/dist/hack.js +8 -0
  200. package/dist/node_modules/@shikijs/langs/dist/haml.js +8 -0
  201. package/dist/node_modules/@shikijs/langs/dist/handlebars.js +12 -0
  202. package/dist/node_modules/@shikijs/langs/dist/haskell.js +2 -0
  203. package/dist/node_modules/@shikijs/langs/dist/haxe.js +2 -0
  204. package/dist/node_modules/@shikijs/langs/dist/hcl.js +2 -0
  205. package/dist/node_modules/@shikijs/langs/dist/hjson.js +2 -0
  206. package/dist/node_modules/@shikijs/langs/dist/hlsl.js +2 -0
  207. package/dist/node_modules/@shikijs/langs/dist/html-derivative.js +3 -0
  208. package/dist/node_modules/@shikijs/langs/dist/html.js +8 -0
  209. package/dist/node_modules/@shikijs/langs/dist/http.js +12 -0
  210. package/dist/node_modules/@shikijs/langs/dist/hurl.js +10 -0
  211. package/dist/node_modules/@shikijs/langs/dist/hxml.js +3 -0
  212. package/dist/node_modules/@shikijs/langs/dist/hy.js +2 -0
  213. package/dist/node_modules/@shikijs/langs/dist/imba.js +2 -0
  214. package/dist/node_modules/@shikijs/langs/dist/ini.js +2 -0
  215. package/dist/node_modules/@shikijs/langs/dist/java.js +2 -0
  216. package/dist/node_modules/@shikijs/langs/dist/javascript.js +2 -0
  217. package/dist/node_modules/@shikijs/langs/dist/jinja-html.js +3 -0
  218. package/dist/node_modules/@shikijs/langs/dist/jinja.js +3 -0
  219. package/dist/node_modules/@shikijs/langs/dist/jison.js +3 -0
  220. package/dist/node_modules/@shikijs/langs/dist/json.js +2 -0
  221. package/dist/node_modules/@shikijs/langs/dist/json5.js +2 -0
  222. package/dist/node_modules/@shikijs/langs/dist/jsonc.js +2 -0
  223. package/dist/node_modules/@shikijs/langs/dist/jsonl.js +2 -0
  224. package/dist/node_modules/@shikijs/langs/dist/jsonnet.js +2 -0
  225. package/dist/node_modules/@shikijs/langs/dist/jssm.js +2 -0
  226. package/dist/node_modules/@shikijs/langs/dist/jsx.js +2 -0
  227. package/dist/node_modules/@shikijs/langs/dist/julia.js +14 -0
  228. package/dist/node_modules/@shikijs/langs/dist/just.js +16 -0
  229. package/dist/node_modules/@shikijs/langs/dist/kdl.js +2 -0
  230. package/dist/node_modules/@shikijs/langs/dist/kotlin.js +2 -0
  231. package/dist/node_modules/@shikijs/langs/dist/kusto.js +2 -0
  232. package/dist/node_modules/@shikijs/langs/dist/latex.js +3 -0
  233. package/dist/node_modules/@shikijs/langs/dist/lean.js +2 -0
  234. package/dist/node_modules/@shikijs/langs/dist/less.js +2 -0
  235. package/dist/node_modules/@shikijs/langs/dist/liquid.js +12 -0
  236. package/dist/node_modules/@shikijs/langs/dist/llvm.js +2 -0
  237. package/dist/node_modules/@shikijs/langs/dist/log.js +2 -0
  238. package/dist/node_modules/@shikijs/langs/dist/logo.js +2 -0
  239. package/dist/node_modules/@shikijs/langs/dist/lua.js +3 -0
  240. package/dist/node_modules/@shikijs/langs/dist/luau.js +2 -0
  241. package/dist/node_modules/@shikijs/langs/dist/make.js +2 -0
  242. package/dist/node_modules/@shikijs/langs/dist/markdown-nix.js +2 -0
  243. package/dist/node_modules/@shikijs/langs/dist/markdown-vue.js +2 -0
  244. package/dist/node_modules/@shikijs/langs/dist/markdown.js +2 -0
  245. package/dist/node_modules/@shikijs/langs/dist/marko.js +12 -0
  246. package/dist/node_modules/@shikijs/langs/dist/matlab.js +2 -0
  247. package/dist/node_modules/@shikijs/langs/dist/mdc.js +10 -0
  248. package/dist/node_modules/@shikijs/langs/dist/mdx.js +2 -0
  249. package/dist/node_modules/@shikijs/langs/dist/mermaid.js +2 -0
  250. package/dist/node_modules/@shikijs/langs/dist/mipsasm.js +2 -0
  251. package/dist/node_modules/@shikijs/langs/dist/mojo.js +2 -0
  252. package/dist/node_modules/@shikijs/langs/dist/moonbit.js +2 -0
  253. package/dist/node_modules/@shikijs/langs/dist/move.js +2 -0
  254. package/dist/node_modules/@shikijs/langs/dist/narrat.js +2 -0
  255. package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +2 -0
  256. package/dist/node_modules/@shikijs/langs/dist/nextflow.js +3 -0
  257. package/dist/node_modules/@shikijs/langs/dist/nginx.js +3 -0
  258. package/dist/node_modules/@shikijs/langs/dist/nim.js +18 -0
  259. package/dist/node_modules/@shikijs/langs/dist/nix.js +3 -0
  260. package/dist/node_modules/@shikijs/langs/dist/nushell.js +2 -0
  261. package/dist/node_modules/@shikijs/langs/dist/objective-c.js +2 -0
  262. package/dist/node_modules/@shikijs/langs/dist/objective-cpp.js +2 -0
  263. package/dist/node_modules/@shikijs/langs/dist/ocaml.js +2 -0
  264. package/dist/node_modules/@shikijs/langs/dist/odin.js +2 -0
  265. package/dist/node_modules/@shikijs/langs/dist/openscad.js +2 -0
  266. package/dist/node_modules/@shikijs/langs/dist/pascal.js +2 -0
  267. package/dist/node_modules/@shikijs/langs/dist/perl.js +14 -0
  268. package/dist/node_modules/@shikijs/langs/dist/php.js +16 -0
  269. package/dist/node_modules/@shikijs/langs/dist/pkl.js +2 -0
  270. package/dist/node_modules/@shikijs/langs/dist/plsql.js +2 -0
  271. package/dist/node_modules/@shikijs/langs/dist/po.js +2 -0
  272. package/dist/node_modules/@shikijs/langs/dist/polar.js +2 -0
  273. package/dist/node_modules/@shikijs/langs/dist/postcss.js +2 -0
  274. package/dist/node_modules/@shikijs/langs/dist/powerquery.js +2 -0
  275. package/dist/node_modules/@shikijs/langs/dist/powershell.js +2 -0
  276. package/dist/node_modules/@shikijs/langs/dist/prisma.js +2 -0
  277. package/dist/node_modules/@shikijs/langs/dist/prolog.js +2 -0
  278. package/dist/node_modules/@shikijs/langs/dist/proto.js +2 -0
  279. package/dist/node_modules/@shikijs/langs/dist/pug.js +10 -0
  280. package/dist/node_modules/@shikijs/langs/dist/puppet.js +2 -0
  281. package/dist/node_modules/@shikijs/langs/dist/purescript.js +2 -0
  282. package/dist/node_modules/@shikijs/langs/dist/python.js +2 -0
  283. package/dist/node_modules/@shikijs/langs/dist/qml.js +3 -0
  284. package/dist/node_modules/@shikijs/langs/dist/qmldir.js +2 -0
  285. package/dist/node_modules/@shikijs/langs/dist/qss.js +2 -0
  286. package/dist/node_modules/@shikijs/langs/dist/r.js +2 -0
  287. package/dist/node_modules/@shikijs/langs/dist/racket.js +2 -0
  288. package/dist/node_modules/@shikijs/langs/dist/raku.js +2 -0
  289. package/dist/node_modules/@shikijs/langs/dist/razor.js +8 -0
  290. package/dist/node_modules/@shikijs/langs/dist/reg.js +2 -0
  291. package/dist/node_modules/@shikijs/langs/dist/regexp.js +2 -0
  292. package/dist/node_modules/@shikijs/langs/dist/rel.js +2 -0
  293. package/dist/node_modules/@shikijs/langs/dist/riscv.js +2 -0
  294. package/dist/node_modules/@shikijs/langs/dist/ron.js +2 -0
  295. package/dist/node_modules/@shikijs/langs/dist/rosmsg.js +2 -0
  296. package/dist/node_modules/@shikijs/langs/dist/rst.js +20 -0
  297. package/dist/node_modules/@shikijs/langs/dist/ruby.js +28 -0
  298. package/dist/node_modules/@shikijs/langs/dist/rust.js +2 -0
  299. package/dist/node_modules/@shikijs/langs/dist/sas.js +3 -0
  300. package/dist/node_modules/@shikijs/langs/dist/sass.js +2 -0
  301. package/dist/node_modules/@shikijs/langs/dist/scala.js +2 -0
  302. package/dist/node_modules/@shikijs/langs/dist/scheme.js +2 -0
  303. package/dist/node_modules/@shikijs/langs/dist/scss.js +3 -0
  304. package/dist/node_modules/@shikijs/langs/dist/sdbl.js +2 -0
  305. package/dist/node_modules/@shikijs/langs/dist/shaderlab.js +3 -0
  306. package/dist/node_modules/@shikijs/langs/dist/shellscript.js +2 -0
  307. package/dist/node_modules/@shikijs/langs/dist/shellsession.js +3 -0
  308. package/dist/node_modules/@shikijs/langs/dist/smalltalk.js +2 -0
  309. package/dist/node_modules/@shikijs/langs/dist/solidity.js +2 -0
  310. package/dist/node_modules/@shikijs/langs/dist/soy.js +3 -0
  311. package/dist/node_modules/@shikijs/langs/dist/sparql.js +3 -0
  312. package/dist/node_modules/@shikijs/langs/dist/splunk.js +2 -0
  313. package/dist/node_modules/@shikijs/langs/dist/sql.js +2 -0
  314. package/dist/node_modules/@shikijs/langs/dist/ssh-config.js +2 -0
  315. package/dist/node_modules/@shikijs/langs/dist/stata.js +3 -0
  316. package/dist/node_modules/@shikijs/langs/dist/stylus.js +2 -0
  317. package/dist/node_modules/@shikijs/langs/dist/surrealql.js +3 -0
  318. package/dist/node_modules/@shikijs/langs/dist/svelte.js +12 -0
  319. package/dist/node_modules/@shikijs/langs/dist/swift.js +2 -0
  320. package/dist/node_modules/@shikijs/langs/dist/system-verilog.js +2 -0
  321. package/dist/node_modules/@shikijs/langs/dist/systemd.js +2 -0
  322. package/dist/node_modules/@shikijs/langs/dist/talonscript.js +2 -0
  323. package/dist/node_modules/@shikijs/langs/dist/tasl.js +2 -0
  324. package/dist/node_modules/@shikijs/langs/dist/tcl.js +2 -0
  325. package/dist/node_modules/@shikijs/langs/dist/templ.js +10 -0
  326. package/dist/node_modules/@shikijs/langs/dist/terraform.js +2 -0
  327. package/dist/node_modules/@shikijs/langs/dist/tex.js +3 -0
  328. package/dist/node_modules/@shikijs/langs/dist/toml.js +2 -0
  329. package/dist/node_modules/@shikijs/langs/dist/ts-tags.js +16 -0
  330. package/dist/node_modules/@shikijs/langs/dist/tsv.js +2 -0
  331. package/dist/node_modules/@shikijs/langs/dist/tsx.js +2 -0
  332. package/dist/node_modules/@shikijs/langs/dist/turtle.js +2 -0
  333. package/dist/node_modules/@shikijs/langs/dist/twig.js +16 -0
  334. package/dist/node_modules/@shikijs/langs/dist/typescript.js +2 -0
  335. package/dist/node_modules/@shikijs/langs/dist/typespec.js +2 -0
  336. package/dist/node_modules/@shikijs/langs/dist/typst.js +2 -0
  337. package/dist/node_modules/@shikijs/langs/dist/v.js +2 -0
  338. package/dist/node_modules/@shikijs/langs/dist/vala.js +2 -0
  339. package/dist/node_modules/@shikijs/langs/dist/vb.js +2 -0
  340. package/dist/node_modules/@shikijs/langs/dist/verilog.js +2 -0
  341. package/dist/node_modules/@shikijs/langs/dist/vhdl.js +2 -0
  342. package/dist/node_modules/@shikijs/langs/dist/viml.js +2 -0
  343. package/dist/node_modules/@shikijs/langs/dist/vue-directives.js +2 -0
  344. package/dist/node_modules/@shikijs/langs/dist/vue-html.js +3 -0
  345. package/dist/node_modules/@shikijs/langs/dist/vue-interpolations.js +2 -0
  346. package/dist/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.js +3 -0
  347. package/dist/node_modules/@shikijs/langs/dist/vue-vine.js +16 -0
  348. package/dist/node_modules/@shikijs/langs/dist/vue.js +24 -0
  349. package/dist/node_modules/@shikijs/langs/dist/vyper.js +2 -0
  350. package/dist/node_modules/@shikijs/langs/dist/wasm.js +2 -0
  351. package/dist/node_modules/@shikijs/langs/dist/wenyan.js +2 -0
  352. package/dist/node_modules/@shikijs/langs/dist/wgsl.js +2 -0
  353. package/dist/node_modules/@shikijs/langs/dist/wikitext.js +2 -0
  354. package/dist/node_modules/@shikijs/langs/dist/wit.js +2 -0
  355. package/dist/node_modules/@shikijs/langs/dist/wolfram.js +2 -0
  356. package/dist/node_modules/@shikijs/langs/dist/xml.js +3 -0
  357. package/dist/node_modules/@shikijs/langs/dist/xsl.js +3 -0
  358. package/dist/node_modules/@shikijs/langs/dist/yaml.js +2 -0
  359. package/dist/node_modules/@shikijs/langs/dist/zenscript.js +2 -0
  360. package/dist/node_modules/@shikijs/langs/dist/zig.js +2 -0
  361. package/dist/node_modules/@shikijs/themes/dist/andromeeda.js +2 -0
  362. package/dist/node_modules/@shikijs/themes/dist/aurora-x.js +2 -0
  363. package/dist/node_modules/@shikijs/themes/dist/ayu-dark.js +2 -0
  364. package/dist/node_modules/@shikijs/themes/dist/ayu-light.js +2 -0
  365. package/dist/node_modules/@shikijs/themes/dist/ayu-mirage.js +2 -0
  366. package/dist/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +2 -0
  367. package/dist/node_modules/@shikijs/themes/dist/catppuccin-latte.js +2 -0
  368. package/dist/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +2 -0
  369. package/dist/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +2 -0
  370. package/dist/node_modules/@shikijs/themes/dist/dark-plus.js +2 -0
  371. package/dist/node_modules/@shikijs/themes/dist/dracula-soft.js +2 -0
  372. package/dist/node_modules/@shikijs/themes/dist/dracula.js +2 -0
  373. package/dist/node_modules/@shikijs/themes/dist/everforest-dark.js +2 -0
  374. package/dist/node_modules/@shikijs/themes/dist/everforest-light.js +2 -0
  375. package/dist/node_modules/@shikijs/themes/dist/github-dark-default.js +2 -0
  376. package/dist/node_modules/@shikijs/themes/dist/github-dark-dimmed.js +2 -0
  377. package/dist/node_modules/@shikijs/themes/dist/github-dark-high-contrast.js +2 -0
  378. package/dist/node_modules/@shikijs/themes/dist/github-dark.js +2 -0
  379. package/dist/node_modules/@shikijs/themes/dist/github-light-default.js +2 -0
  380. package/dist/node_modules/@shikijs/themes/dist/github-light-high-contrast.js +2 -0
  381. package/dist/node_modules/@shikijs/themes/dist/github-light.js +2 -0
  382. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +2 -0
  383. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +2 -0
  384. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +2 -0
  385. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +2 -0
  386. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +2 -0
  387. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +2 -0
  388. package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +2 -0
  389. package/dist/node_modules/@shikijs/themes/dist/horizon.js +2 -0
  390. package/dist/node_modules/@shikijs/themes/dist/houston.js +2 -0
  391. package/dist/node_modules/@shikijs/themes/dist/kanagawa-dragon.js +2 -0
  392. package/dist/node_modules/@shikijs/themes/dist/kanagawa-lotus.js +2 -0
  393. package/dist/node_modules/@shikijs/themes/dist/kanagawa-wave.js +2 -0
  394. package/dist/node_modules/@shikijs/themes/dist/laserwave.js +2 -0
  395. package/dist/node_modules/@shikijs/themes/dist/light-plus.js +2 -0
  396. package/dist/node_modules/@shikijs/themes/dist/material-theme-darker.js +2 -0
  397. package/dist/node_modules/@shikijs/themes/dist/material-theme-lighter.js +2 -0
  398. package/dist/node_modules/@shikijs/themes/dist/material-theme-ocean.js +2 -0
  399. package/dist/node_modules/@shikijs/themes/dist/material-theme-palenight.js +2 -0
  400. package/dist/node_modules/@shikijs/themes/dist/material-theme.js +2 -0
  401. package/dist/node_modules/@shikijs/themes/dist/min-dark.js +2 -0
  402. package/dist/node_modules/@shikijs/themes/dist/min-light.js +2 -0
  403. package/dist/node_modules/@shikijs/themes/dist/monokai.js +2 -0
  404. package/dist/node_modules/@shikijs/themes/dist/night-owl-light.js +2 -0
  405. package/dist/node_modules/@shikijs/themes/dist/night-owl.js +2 -0
  406. package/dist/node_modules/@shikijs/themes/dist/nord.js +2 -0
  407. package/dist/node_modules/@shikijs/themes/dist/one-dark-pro.js +2 -0
  408. package/dist/node_modules/@shikijs/themes/dist/one-light.js +2 -0
  409. package/dist/node_modules/@shikijs/themes/dist/plastic.js +2 -0
  410. package/dist/node_modules/@shikijs/themes/dist/poimandres.js +2 -0
  411. package/dist/node_modules/@shikijs/themes/dist/red.js +2 -0
  412. package/dist/node_modules/@shikijs/themes/dist/rose-pine-dawn.js +2 -0
  413. package/dist/node_modules/@shikijs/themes/dist/rose-pine-moon.js +2 -0
  414. package/dist/node_modules/@shikijs/themes/dist/rose-pine.js +2 -0
  415. package/dist/node_modules/@shikijs/themes/dist/slack-dark.js +2 -0
  416. package/dist/node_modules/@shikijs/themes/dist/slack-ochin.js +2 -0
  417. package/dist/node_modules/@shikijs/themes/dist/snazzy-light.js +2 -0
  418. package/dist/node_modules/@shikijs/themes/dist/solarized-dark.js +2 -0
  419. package/dist/node_modules/@shikijs/themes/dist/solarized-light.js +2 -0
  420. package/dist/node_modules/@shikijs/themes/dist/synthwave-84.js +2 -0
  421. package/dist/node_modules/@shikijs/themes/dist/tokyo-night.js +2 -0
  422. package/dist/node_modules/@shikijs/themes/dist/vesper.js +2 -0
  423. package/dist/node_modules/@shikijs/themes/dist/vitesse-black.js +2 -0
  424. package/dist/node_modules/@shikijs/themes/dist/vitesse-dark.js +2 -0
  425. package/dist/node_modules/@shikijs/themes/dist/vitesse-light.js +2 -0
  426. package/dist/node_modules/@shikijs/types/dist/index.js +6 -0
  427. package/dist/node_modules/@shikijs/vscode-textmate/dist/index.js +1580 -0
  428. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +51 -0
  429. package/dist/node_modules/@ungap/structured-clone/esm/index.js +4 -0
  430. package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +91 -0
  431. package/dist/node_modules/@ungap/structured-clone/esm/types.js +2 -0
  432. package/dist/node_modules/@xyflow/react/dist/esm/index.js +3280 -0
  433. package/dist/node_modules/@xyflow/system/dist/esm/index.js +1839 -0
  434. package/dist/node_modules/ai/dist/index.js +1083 -0
  435. package/dist/node_modules/bail/index.js +4 -0
  436. package/dist/node_modules/character-entities-html4/index.js +255 -0
  437. package/dist/node_modules/character-entities-legacy/index.js +2 -0
  438. package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +6 -1
  439. package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +4 -10
  440. package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +56 -65
  441. package/dist/node_modules/classcat/index.js +8 -0
  442. package/dist/node_modules/comma-separated-tokens/index.js +5 -1
  443. package/dist/node_modules/d3/src/index.js +5 -0
  444. package/dist/node_modules/d3-drag/src/constant.js +2 -0
  445. package/dist/node_modules/d3-drag/src/drag.js +112 -0
  446. package/dist/node_modules/d3-drag/src/event.js +60 -0
  447. package/dist/node_modules/d3-drag/src/nodrag.js +13 -0
  448. package/dist/node_modules/d3-drag/src/noevent.js +11 -0
  449. package/dist/node_modules/d3-interpolate/src/zoom.js +39 -0
  450. package/dist/node_modules/d3-selection/src/pointer.js +16 -0
  451. package/dist/node_modules/d3-selection/src/sourceEvent.js +6 -0
  452. package/dist/node_modules/d3-zoom/src/constant.js +2 -0
  453. package/dist/node_modules/d3-zoom/src/event.js +26 -0
  454. package/dist/node_modules/d3-zoom/src/index.js +1 -1
  455. package/dist/node_modules/d3-zoom/src/noevent.js +7 -0
  456. package/dist/node_modules/d3-zoom/src/zoom.js +214 -1
  457. package/dist/node_modules/decode-named-character-reference/index.dom.js +8 -0
  458. package/dist/node_modules/entities/dist/esm/decode-codepoint.js +35 -0
  459. package/dist/node_modules/entities/dist/esm/decode.js +129 -0
  460. package/dist/node_modules/entities/dist/esm/generated/decode-data-html.js +2 -0
  461. package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +5 -0
  462. package/dist/node_modules/extend/index.js +37 -0
  463. package/dist/node_modules/hast-util-from-parse5/lib/index.js +121 -0
  464. package/dist/node_modules/hast-util-raw/lib/index.js +204 -0
  465. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.js +34 -0
  466. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.js +5 -0
  467. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.js +150 -0
  468. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.js +267 -0
  469. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.js +9 -0
  470. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.js +65 -0
  471. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/index.js +8 -0
  472. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.js +69 -0
  473. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.js +1936 -0
  474. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.js +239 -0
  475. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.js +22 -0
  476. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.js +1451 -0
  477. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.js +75 -0
  478. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.js +155 -0
  479. package/dist/node_modules/hast-util-sanitize/lib/index.js +159 -0
  480. package/dist/node_modules/hast-util-sanitize/lib/schema.js +73 -0
  481. package/dist/node_modules/hast-util-to-html/lib/handle/comment.js +9 -0
  482. package/dist/node_modules/hast-util-to-html/lib/handle/doctype.js +4 -0
  483. package/dist/node_modules/hast-util-to-html/lib/handle/element.js +47 -0
  484. package/dist/node_modules/hast-util-to-html/lib/handle/index.js +27 -0
  485. package/dist/node_modules/hast-util-to-html/lib/handle/raw.js +5 -0
  486. package/dist/node_modules/hast-util-to-html/lib/handle/root.js +4 -0
  487. package/dist/node_modules/hast-util-to-html/lib/handle/text.js +6 -0
  488. package/dist/node_modules/hast-util-to-html/lib/index.js +46 -0
  489. package/dist/node_modules/hast-util-to-html/lib/omission/closing.js +84 -0
  490. package/dist/node_modules/hast-util-to-html/lib/omission/omission.js +8 -0
  491. package/dist/node_modules/hast-util-to-html/lib/omission/opening.js +37 -0
  492. package/dist/node_modules/hast-util-to-html/lib/omission/util/siblings.js +12 -0
  493. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +251 -0
  494. package/dist/node_modules/hast-util-to-parse5/lib/index.js +113 -0
  495. package/dist/node_modules/hast-util-whitespace/lib/index.js +8 -0
  496. package/dist/node_modules/html-url-attributes/lib/index.js +34 -0
  497. package/dist/node_modules/html-void-elements/index.js +23 -0
  498. package/dist/node_modules/inline-style-parser/cjs/index.js +88 -0
  499. package/dist/node_modules/mdast-util-from-markdown/lib/index.js +555 -0
  500. package/dist/node_modules/mdast-util-to-hast/lib/footer.js +101 -0
  501. package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +10 -0
  502. package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +13 -0
  503. package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +20 -0
  504. package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +10 -0
  505. package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +10 -0
  506. package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +28 -0
  507. package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +10 -0
  508. package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +10 -0
  509. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +19 -0
  510. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +13 -0
  511. package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +54 -0
  512. package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +15 -0
  513. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +16 -0
  514. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +13 -0
  515. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +57 -0
  516. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +18 -0
  517. package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +10 -0
  518. package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +8 -0
  519. package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +10 -0
  520. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +10 -0
  521. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +22 -0
  522. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +33 -0
  523. package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +9 -0
  524. package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +10 -0
  525. package/dist/node_modules/mdast-util-to-hast/lib/index.js +17 -0
  526. package/dist/node_modules/mdast-util-to-hast/lib/revert.js +18 -0
  527. package/dist/node_modules/mdast-util-to-hast/lib/state.js +106 -0
  528. package/dist/node_modules/micromark/lib/constructs.js +79 -0
  529. package/dist/node_modules/micromark/lib/create-tokenizer.js +175 -0
  530. package/dist/node_modules/micromark/lib/initialize/content.js +32 -0
  531. package/dist/node_modules/micromark/lib/initialize/document.js +101 -0
  532. package/dist/node_modules/micromark/lib/initialize/flow.js +23 -0
  533. package/dist/node_modules/micromark/lib/initialize/text.js +84 -0
  534. package/dist/node_modules/micromark/lib/parse.js +27 -0
  535. package/dist/node_modules/micromark/lib/postprocess.js +6 -0
  536. package/dist/node_modules/micromark/lib/preprocess.js +30 -0
  537. package/dist/node_modules/micromark-core-commonmark/lib/attention.js +112 -0
  538. package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +41 -0
  539. package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +36 -0
  540. package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +15 -0
  541. package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +27 -0
  542. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +88 -0
  543. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +42 -0
  544. package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +41 -0
  545. package/dist/node_modules/micromark-core-commonmark/lib/content.js +46 -0
  546. package/dist/node_modules/micromark-core-commonmark/lib/definition.js +59 -0
  547. package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +15 -0
  548. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +65 -0
  549. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +140 -0
  550. package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +98 -0
  551. package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +157 -0
  552. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +21 -0
  553. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +18 -0
  554. package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +12 -0
  555. package/dist/node_modules/micromark-core-commonmark/lib/list.js +77 -0
  556. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +57 -0
  557. package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +23 -0
  558. package/dist/node_modules/micromark-factory-destination/index.js +24 -0
  559. package/dist/node_modules/micromark-factory-label/index.js +18 -0
  560. package/dist/node_modules/micromark-factory-title/index.js +22 -0
  561. package/dist/node_modules/micromark-factory-whitespace/index.js +10 -0
  562. package/dist/node_modules/micromark-util-character/index.js +6 -5
  563. package/dist/node_modules/micromark-util-chunked/index.js +4 -1
  564. package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +5 -0
  565. package/dist/node_modules/micromark-util-decode-string/index.js +15 -0
  566. package/dist/node_modules/micromark-util-html-tag-name/index.js +7 -0
  567. package/dist/node_modules/micromark-util-sanitize-uri/index.js +16 -0
  568. package/dist/node_modules/micromark-util-subtokenize/index.js +33 -0
  569. package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +55 -0
  570. package/dist/node_modules/motion/dist/es/react.js +3 -0
  571. package/dist/node_modules/nanoid/index.browser.js +7 -0
  572. package/dist/node_modules/nanoid/url-alphabet/index.js +2 -0
  573. package/dist/node_modules/property-information/index.js +1 -0
  574. package/dist/node_modules/property-information/lib/hast-to-react.js +20 -0
  575. package/dist/node_modules/rehype-harden/dist/index.js +168 -0
  576. package/dist/node_modules/rehype-raw/lib/index.js +10 -0
  577. package/dist/node_modules/rehype-sanitize/lib/index.js +7 -0
  578. package/dist/node_modules/remark-parse/lib/index.js +14 -0
  579. package/dist/node_modules/remark-rehype/lib/index.js +16 -0
  580. package/dist/node_modules/remend/dist/index.js +459 -0
  581. package/dist/node_modules/shiki/dist/bundle-full.js +11 -0
  582. package/dist/node_modules/shiki/dist/langs.js +1278 -0
  583. package/dist/node_modules/shiki/dist/themes.js +393 -0
  584. package/dist/node_modules/shiki/dist/wasm.js +2 -0
  585. package/dist/node_modules/space-separated-tokens/index.js +4 -1
  586. package/dist/node_modules/streamdown/dist/chunk-RLXIAIE6.js +2189 -0
  587. package/dist/node_modules/streamdown/dist/highlighted-body-B3W2YXNL.js +33 -0
  588. package/dist/node_modules/streamdown/dist/index.js +2 -0
  589. package/dist/node_modules/streamdown/dist/mermaid-3ZIDBTTL.js +3 -0
  590. package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +1421 -0
  591. package/dist/node_modules/stringify-entities/lib/constant/dangerous.js +11 -0
  592. package/dist/node_modules/stringify-entities/lib/core.js +21 -0
  593. package/dist/node_modules/stringify-entities/lib/index.js +6 -0
  594. package/dist/node_modules/stringify-entities/lib/util/format-smart.js +12 -0
  595. package/dist/node_modules/stringify-entities/lib/util/to-decimal.js +6 -0
  596. package/dist/node_modules/stringify-entities/lib/util/to-hexadecimal.js +6 -0
  597. package/dist/node_modules/stringify-entities/lib/util/to-named.js +15 -0
  598. package/dist/node_modules/style-to-js/cjs/index.js +17 -0
  599. package/dist/node_modules/style-to-js/cjs/utilities.js +16 -0
  600. package/dist/node_modules/style-to-object/cjs/index.js +21 -0
  601. package/dist/node_modules/trim-lines/index.js +19 -0
  602. package/dist/node_modules/trough/lib/index.js +48 -0
  603. package/dist/node_modules/unified/lib/callable-instance.js +7 -0
  604. package/dist/node_modules/unified/lib/index.js +160 -0
  605. package/dist/node_modules/unified/node_modules/is-plain-obj/index.js +6 -0
  606. package/dist/node_modules/unist-util-position/lib/index.js +20 -0
  607. package/dist/node_modules/unist-util-stringify-position/lib/index.js +13 -0
  608. package/dist/node_modules/vfile/lib/index.js +87 -0
  609. package/dist/node_modules/vfile/lib/minpath.browser.js +97 -0
  610. package/dist/node_modules/vfile/lib/minproc.browser.js +5 -0
  611. package/dist/node_modules/vfile/lib/minurl.browser.js +29 -0
  612. package/dist/node_modules/vfile/lib/minurl.shared.js +4 -0
  613. package/dist/node_modules/vfile-location/lib/index.js +41 -0
  614. package/dist/node_modules/vfile-message/lib/index.js +22 -0
  615. package/dist/node_modules/zod/v3/ZodError.js +79 -0
  616. package/dist/node_modules/zod/v3/errors.js +6 -0
  617. package/dist/node_modules/zod/v3/helpers/errorUtil.js +5 -0
  618. package/dist/node_modules/zod/v3/helpers/parseUtil.js +90 -0
  619. package/dist/node_modules/zod/v3/helpers/util.js +72 -0
  620. package/dist/node_modules/zod/v3/locales/en.js +58 -0
  621. package/dist/node_modules/zod/v3/types.js +2425 -0
  622. package/dist/node_modules/zod/v4/classic/errors.js +21 -0
  623. package/dist/node_modules/zod/v4/classic/iso.js +29 -0
  624. package/dist/node_modules/zod/v4/classic/parse.js +4 -0
  625. package/dist/node_modules/zod/v4/classic/schemas.js +392 -0
  626. package/dist/node_modules/zod/v4/core/api.js +532 -0
  627. package/dist/node_modules/zod/v4/core/checks.js +283 -0
  628. package/dist/node_modules/zod/v4/core/core.js +44 -0
  629. package/dist/node_modules/zod/v4/core/doc.js +21 -0
  630. package/dist/node_modules/zod/v4/core/errors.js +40 -0
  631. package/dist/node_modules/zod/v4/core/json-schema-processors.js +305 -0
  632. package/dist/node_modules/zod/v4/core/parse.js +66 -0
  633. package/dist/node_modules/zod/v4/core/regexes.js +28 -0
  634. package/dist/node_modules/zod/v4/core/registries.js +38 -0
  635. package/dist/node_modules/zod/v4/core/schemas.js +863 -0
  636. package/dist/node_modules/zod/v4/core/to-json-schema.js +220 -0
  637. package/dist/node_modules/zod/v4/core/util.js +267 -0
  638. package/dist/node_modules/zod/v4/core/versions.js +6 -0
  639. package/dist/node_modules/zwitch/index.js +14 -0
  640. package/dist/pages/DashboardPage.js +58 -0
  641. package/dist/pages/DebugWorkflowDetailsPage.js +121 -0
  642. package/dist/pages/DebugWorkflowsPage.js +130 -0
  643. package/dist/pages/EmbedWorkbenchPage.js +73 -0
  644. package/dist/pages/PipelineDebugPage.js +114 -0
  645. package/dist/pages/WorkbenchPage.js +67 -0
  646. package/dist/pages/WorkspacePage.js +1 -1
  647. package/dist/providers/ComponentOverridesProvider.js +12 -0
  648. package/dist/routing/LocalRouter.js +3 -0
  649. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  import { cn } from "../lib/utils.js";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import React from "react";
4
- import { Fragment, jsx } from "react/jsx-runtime";
4
+ import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
5
5
  import { Loader2 } from "lucide-react";
6
6
  var LoadingCentered_default = (i) => {
7
7
  let o = c(16), s, l, u, d, f;
@@ -23,6 +23,6 @@ var LoadingCentered_default = (i) => {
23
23
  }), o[10] = l, o[11] = r, o[12] = i, o[13] = a) : a = o[13], a;
24
24
  }
25
25
  let g;
26
- return o[14] === h ? g = o[15] : (g = /* @__PURE__ */ jsx(Fragment, { children: h }), o[14] = h, o[15] = g), g;
26
+ return o[14] === h ? g = o[15] : (g = /* @__PURE__ */ jsx(Fragment$1, { children: h }), o[14] = h, o[15] = g), g;
27
27
  };
28
28
  export { LoadingCentered_default as default };
@@ -0,0 +1,96 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import "../ui/button.js";
4
+ import { codeToHtml } from "../../node_modules/shiki/dist/bundle-full.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { createContext, useContext, useEffect, useRef, useState } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { CheckIcon, CopyIcon } from "lucide-react";
9
+ var CodeBlockContext = createContext({ code: "" }), lineNumberTransformer = {
10
+ name: "line-numbers",
11
+ line(n, l) {
12
+ n.children.unshift({
13
+ type: "element",
14
+ tagName: "span",
15
+ properties: { className: [
16
+ "inline-block",
17
+ "min-w-10",
18
+ "mr-4",
19
+ "text-right",
20
+ "select-none",
21
+ "text-muted-foreground"
22
+ ] },
23
+ children: [{
24
+ type: "text",
25
+ value: String(l)
26
+ }]
27
+ });
28
+ }
29
+ };
30
+ async function highlightCode(n, u, d = !1) {
31
+ let f = d ? [lineNumberTransformer] : [];
32
+ return await Promise.all([codeToHtml(n, {
33
+ lang: u,
34
+ theme: "one-light",
35
+ transformers: f
36
+ }), codeToHtml(n, {
37
+ lang: u,
38
+ theme: "one-dark-pro",
39
+ transformers: f
40
+ })]);
41
+ }
42
+ const CodeBlock = (l) => {
43
+ let d = c(33), f, p, m, h, g, _;
44
+ d[0] === l ? (f = d[1], p = d[2], m = d[3], h = d[4], g = d[5], _ = d[6]) : ({code: m, language: h, showLineNumbers: _, className: p, children: f, ...g} = l, d[0] = l, d[1] = f, d[2] = p, d[3] = m, d[4] = h, d[5] = g, d[6] = _);
45
+ let v = _ === void 0 ? !1 : _, [y, b] = useState(""), [x, S] = useState(""), C = useRef(!1), w, T;
46
+ d[7] !== m || d[8] !== h || d[9] !== v ? (w = () => (highlightCode(m, h, v).then((n) => {
47
+ let [l, u] = n;
48
+ C.current ||= (b(l), S(u), !0);
49
+ }), () => {
50
+ C.current = !1;
51
+ }), T = [
52
+ m,
53
+ h,
54
+ v
55
+ ], d[7] = m, d[8] = h, d[9] = v, d[10] = w, d[11] = T) : (w = d[10], T = d[11]), useEffect(w, T);
56
+ let E;
57
+ d[12] === m ? E = d[13] : (E = { code: m }, d[12] = m, d[13] = E);
58
+ let D;
59
+ d[14] === p ? D = d[15] : (D = cn("group bg-background text-foreground relative w-full overflow-hidden rounded-md border", p), d[14] = p, d[15] = D);
60
+ let O;
61
+ d[16] === y ? O = d[17] : (O = /* @__PURE__ */ jsx("div", {
62
+ className: "[&>pre]:bg-background! [&>pre]:text-foreground! overflow-hidden dark:hidden [&_code]:font-mono [&_code]:text-sm [&>pre]:m-0 [&>pre]:p-4 [&>pre]:text-sm",
63
+ dangerouslySetInnerHTML: { __html: y }
64
+ }), d[16] = y, d[17] = O);
65
+ let k;
66
+ d[18] === x ? k = d[19] : (k = /* @__PURE__ */ jsx("div", {
67
+ className: "[&>pre]:bg-background! [&>pre]:text-foreground! hidden overflow-hidden dark:block [&_code]:font-mono [&_code]:text-sm [&>pre]:m-0 [&>pre]:p-4 [&>pre]:text-sm",
68
+ dangerouslySetInnerHTML: { __html: x }
69
+ }), d[18] = x, d[19] = k);
70
+ let A;
71
+ d[20] === f ? A = d[21] : (A = f && /* @__PURE__ */ jsx("div", {
72
+ className: "absolute top-2 right-2 flex items-center gap-2",
73
+ children: f
74
+ }), d[20] = f, d[21] = A);
75
+ let j;
76
+ d[22] !== O || d[23] !== k || d[24] !== A ? (j = /* @__PURE__ */ jsxs("div", {
77
+ className: "relative",
78
+ children: [
79
+ O,
80
+ k,
81
+ A
82
+ ]
83
+ }), d[22] = O, d[23] = k, d[24] = A, d[25] = j) : j = d[25];
84
+ let M;
85
+ d[26] !== g || d[27] !== D || d[28] !== j ? (M = /* @__PURE__ */ jsx("div", {
86
+ className: D,
87
+ ...g,
88
+ children: j
89
+ }), d[26] = g, d[27] = D, d[28] = j, d[29] = M) : M = d[29];
90
+ let N;
91
+ return d[30] !== M || d[31] !== E ? (N = /* @__PURE__ */ jsx(CodeBlockContext.Provider, {
92
+ value: E,
93
+ children: M
94
+ }), d[30] = M, d[31] = E, d[32] = N) : N = d[32], N;
95
+ };
96
+ export { CodeBlock };
@@ -0,0 +1,87 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { Button } from "../ui/button.js";
4
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../ui/tooltip.js";
5
+ import { _r } from "../../node_modules/streamdown/dist/chunk-RLXIAIE6.js";
6
+ import "../../node_modules/streamdown/dist/index.js";
7
+ import "../ui/button-group.js";
8
+ import { c } from "react/compiler-runtime";
9
+ import { createContext, memo, useContext, useEffect, useState } from "react";
10
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
+ import { ChevronRightIcon, XIcon } from "lucide-react";
12
+ const Message = (i) => {
13
+ let a = c(10), o, s, l;
14
+ a[0] === i ? (o = a[1], s = a[2], l = a[3]) : ({className: o, from: s, ...l} = i, a[0] = i, a[1] = o, a[2] = s, a[3] = l);
15
+ let u = s === "user" ? "is-user ml-auto max-w-[80%] justify-end" : "is-assistant", f;
16
+ a[4] !== o || a[5] !== u ? (f = cn("group relative flex w-full flex-col gap-2 rounded-lg transition-colors", u, o), a[4] = o, a[5] = u, a[6] = f) : f = a[6];
17
+ let p;
18
+ return a[7] !== l || a[8] !== f ? (p = /* @__PURE__ */ jsx("div", {
19
+ className: f,
20
+ ...l
21
+ }), a[7] = l, a[8] = f, a[9] = p) : p = a[9], p;
22
+ }, MessageContent = (i) => {
23
+ let a = c(10), o, s, l;
24
+ a[0] === i ? (o = a[1], s = a[2], l = a[3]) : ({children: o, className: s, ...l} = i, a[0] = i, a[1] = o, a[2] = s, a[3] = l);
25
+ let u;
26
+ a[4] === s ? u = a[5] : (u = cn("is-user:dark flex w-fit flex-col gap-2 overflow-hidden", "group-[.is-user]:bg-secondary group-[.is-user]:text-foreground group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:px-4 group-[.is-user]:py-3", "group-[.is-assistant]:text-foreground", s), a[4] = s, a[5] = u);
27
+ let f;
28
+ return a[6] !== o || a[7] !== l || a[8] !== u ? (f = /* @__PURE__ */ jsx("div", {
29
+ className: u,
30
+ ...l,
31
+ children: o
32
+ }), a[6] = o, a[7] = l, a[8] = u, a[9] = f) : f = a[9], f;
33
+ }, MessageActions = (i) => {
34
+ let a = c(10), o, s, l;
35
+ a[0] === i ? (o = a[1], s = a[2], l = a[3]) : ({className: s, children: o, ...l} = i, a[0] = i, a[1] = o, a[2] = s, a[3] = l);
36
+ let u;
37
+ a[4] === s ? u = a[5] : (u = cn("absolute top-0 right-0 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100", s), a[4] = s, a[5] = u);
38
+ let f;
39
+ return a[6] !== o || a[7] !== l || a[8] !== u ? (f = /* @__PURE__ */ jsx("div", {
40
+ className: u,
41
+ ...l,
42
+ children: o
43
+ }), a[6] = o, a[7] = l, a[8] = u, a[9] = f) : f = a[9], f;
44
+ }, MessageAction = (e) => {
45
+ let u = c(22), f, p, m, h, g, _;
46
+ u[0] === e ? (f = u[1], p = u[2], m = u[3], h = u[4], g = u[5], _ = u[6]) : ({tooltip: _, children: f, label: p, variant: h, size: g, ...m} = e, u[0] = e, u[1] = f, u[2] = p, u[3] = m, u[4] = h, u[5] = g, u[6] = _);
47
+ let v = h === void 0 ? "ghost" : h, y = g === void 0 ? "icon-sm" : g, b = p || _, x;
48
+ u[7] === b ? x = u[8] : (x = /* @__PURE__ */ jsx("span", {
49
+ className: "sr-only",
50
+ children: b
51
+ }), u[7] = b, u[8] = x);
52
+ let S;
53
+ u[9] !== f || u[10] !== m || u[11] !== y || u[12] !== x || u[13] !== v ? (S = /* @__PURE__ */ jsxs(Button, {
54
+ size: y,
55
+ type: "button",
56
+ variant: v,
57
+ ...m,
58
+ children: [f, x]
59
+ }), u[9] = f, u[10] = m, u[11] = y, u[12] = x, u[13] = v, u[14] = S) : S = u[14];
60
+ let C = S;
61
+ if (_) {
62
+ let e;
63
+ u[15] === C ? e = u[16] : (e = /* @__PURE__ */ jsx(TooltipTrigger, {
64
+ asChild: !0,
65
+ children: C
66
+ }), u[15] = C, u[16] = e);
67
+ let i;
68
+ u[17] === _ ? i = u[18] : (i = /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: _ }) }), u[17] = _, u[18] = i);
69
+ let d;
70
+ return u[19] !== e || u[20] !== i ? (d = /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [e, i] }) }), u[19] = e, u[20] = i, u[21] = d) : d = u[21], d;
71
+ }
72
+ return C;
73
+ };
74
+ createContext(null);
75
+ const MessageResponse = memo((i) => {
76
+ let a = c(8), o, s;
77
+ a[0] === i ? (o = a[1], s = a[2]) : ({className: o, ...s} = i, a[0] = i, a[1] = o, a[2] = s);
78
+ let l;
79
+ a[3] === o ? l = a[4] : (l = cn("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", o), a[3] = o, a[4] = l);
80
+ let f;
81
+ return a[5] !== s || a[6] !== l ? (f = /* @__PURE__ */ jsx(_r, {
82
+ className: l,
83
+ ...s
84
+ }), a[5] = s, a[6] = l, a[7] = f) : f = a[7], f;
85
+ }, (e, i) => e.children === i.children);
86
+ MessageResponse.displayName = "MessageResponse";
87
+ export { Message, MessageAction, MessageActions, MessageContent, MessageResponse };
@@ -0,0 +1,321 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import "../ui/button.js";
4
+ import "../ui/dropdown-menu.js";
5
+ import "../ui/select.js";
6
+ import { nanoid } from "../../node_modules/nanoid/index.browser.js";
7
+ import "../ui/command.js";
8
+ import "../ui/hover-card.js";
9
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupTextarea } from "../ui/input-group.js";
10
+ import { c } from "react/compiler-runtime";
11
+ import { Fragment, createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
12
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
+ import { CornerDownLeftIcon, Loader2Icon, SquareIcon, XIcon } from "lucide-react";
14
+ var PromptInputController = createContext(null), ProviderAttachmentsContext = createContext(null), useOptionalPromptInputController = () => useContext(PromptInputController), useOptionalProviderAttachments = () => useContext(ProviderAttachmentsContext), LocalAttachmentsContext = createContext(null);
15
+ const usePromptInputAttachments = () => {
16
+ let e = useOptionalProviderAttachments(), t = useContext(LocalAttachmentsContext), n = e ?? t;
17
+ if (!n) throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");
18
+ return n;
19
+ }, PromptInput = (r) => {
20
+ let i = c(94), a, o, s, l, u, f, _, v, y, b, x;
21
+ i[0] === r ? (a = i[1], o = i[2], s = i[3], l = i[4], u = i[5], f = i[6], _ = i[7], v = i[8], y = i[9], b = i[10], x = i[11]) : ({className: s, accept: a, multiple: _, globalDrop: l, syncHiddenInput: x, maxFiles: f, maxFileSize: u, onError: v, onSubmit: y, children: o, ...b} = r, i[0] = r, i[1] = a, i[2] = o, i[3] = s, i[4] = l, i[5] = u, i[6] = f, i[7] = _, i[8] = v, i[9] = y, i[10] = b, i[11] = x);
22
+ let S = useOptionalPromptInputController(), C = !!S, T = useRef(null), le = useRef(null), ue = useRef(null), de, fe;
23
+ i[12] === Symbol.for("react.memo_cache_sentinel") ? (de = () => {
24
+ let e = le.current?.closest("form");
25
+ e instanceof HTMLFormElement && (ue.current = e);
26
+ }, fe = [], i[12] = de, i[13] = fe) : (de = i[12], fe = i[13]), useEffect(de, fe);
27
+ let pe;
28
+ i[14] === Symbol.for("react.memo_cache_sentinel") ? (pe = [], i[14] = pe) : pe = i[14];
29
+ let [me, he] = useState(pe), E = C ? S.attachments.files : me, D;
30
+ i[15] === Symbol.for("react.memo_cache_sentinel") ? (D = () => {
31
+ T.current?.click();
32
+ }, i[15] = D) : D = i[15];
33
+ let ge = D, O;
34
+ i[16] === a ? O = i[17] : (O = (e) => !a || a.trim() === "" ? !0 : a.includes("image/*") ? e.type.startsWith("image/") : !0, i[16] = a, i[17] = O);
35
+ let _e = O, k;
36
+ i[18] !== _e || i[19] !== u || i[20] !== f || i[21] !== v ? (k = (e) => {
37
+ let n = Array.from(e), r = n.filter((e) => _e(e));
38
+ if (n.length && r.length === 0) {
39
+ v?.({
40
+ code: "accept",
41
+ message: "No files match the accepted types."
42
+ });
43
+ return;
44
+ }
45
+ let i = r.filter((e) => u ? e.size <= u : !0);
46
+ if (r.length > 0 && i.length === 0) {
47
+ v?.({
48
+ code: "max_file_size",
49
+ message: "All files exceed the maximum size."
50
+ });
51
+ return;
52
+ }
53
+ he((e) => {
54
+ let n = typeof f == "number" ? Math.max(0, f - e.length) : void 0, r = typeof n == "number" ? i.slice(0, n) : i;
55
+ typeof n == "number" && i.length > n && v?.({
56
+ code: "max_files",
57
+ message: "Too many files. Some were not added."
58
+ });
59
+ let a = [];
60
+ for (let e of r) a.push({
61
+ id: nanoid(),
62
+ type: "file",
63
+ url: URL.createObjectURL(e),
64
+ mediaType: e.type,
65
+ filename: e.name
66
+ });
67
+ return e.concat(a);
68
+ });
69
+ }, i[18] = _e, i[19] = u, i[20] = f, i[21] = v, i[22] = k) : k = i[22];
70
+ let ve = k, A;
71
+ i[23] !== ve || i[24] !== S || i[25] !== C ? (A = C ? (e) => S.attachments.add(e) : ve, i[23] = ve, i[24] = S, i[25] = C, i[26] = A) : A = i[26];
72
+ let j = A, M;
73
+ i[27] !== S || i[28] !== C ? (M = C ? (e) => S.attachments.remove(e) : (e) => he((t) => {
74
+ let n = t.find((t) => t.id === e);
75
+ return n?.url && URL.revokeObjectURL(n.url), t.filter((t) => t.id !== e);
76
+ }), i[27] = S, i[28] = C, i[29] = M) : M = i[29];
77
+ let ye = M, N;
78
+ i[30] !== S || i[31] !== C ? (N = C ? () => S.attachments.clear() : () => he(_temp4), i[30] = S, i[31] = C, i[32] = N) : N = i[32];
79
+ let P = N, F;
80
+ i[33] !== S || i[34] !== C ? (F = C ? () => S.attachments.openFileDialog() : ge, i[33] = S, i[34] = C, i[35] = F) : F = i[35];
81
+ let be = F, I, L;
82
+ i[36] !== S || i[37] !== C ? (I = () => {
83
+ C && S.__registerFileInput(T, () => T.current?.click());
84
+ }, L = [C, S], i[36] = S, i[37] = C, i[38] = I, i[39] = L) : (I = i[38], L = i[39]), useEffect(I, L);
85
+ let R;
86
+ i[40] !== E.length || i[41] !== x ? (R = () => {
87
+ x && T.current && E.length === 0 && (T.current.value = "");
88
+ }, i[40] = E.length, i[41] = x, i[42] = R) : R = i[42];
89
+ let z;
90
+ i[43] !== E || i[44] !== x ? (z = [E, x], i[43] = E, i[44] = x, i[45] = z) : z = i[45], useEffect(R, z);
91
+ let B, V;
92
+ i[46] === j ? (B = i[47], V = i[48]) : (B = () => {
93
+ let e = ue.current;
94
+ if (!e) return;
95
+ let t = _temp5, n = (e) => {
96
+ e.dataTransfer?.types?.includes("Files") && e.preventDefault(), e.dataTransfer?.files && e.dataTransfer.files.length > 0 && j(e.dataTransfer.files);
97
+ };
98
+ return e.addEventListener("dragover", t), e.addEventListener("drop", n), () => {
99
+ e.removeEventListener("dragover", t), e.removeEventListener("drop", n);
100
+ };
101
+ }, V = [j], i[46] = j, i[47] = B, i[48] = V), useEffect(B, V);
102
+ let H, U;
103
+ i[49] !== j || i[50] !== l ? (H = () => {
104
+ if (!l) return;
105
+ let e = _temp6, t = (e) => {
106
+ e.dataTransfer?.types?.includes("Files") && e.preventDefault(), e.dataTransfer?.files && e.dataTransfer.files.length > 0 && j(e.dataTransfer.files);
107
+ };
108
+ return document.addEventListener("dragover", e), document.addEventListener("drop", t), () => {
109
+ document.removeEventListener("dragover", e), document.removeEventListener("drop", t);
110
+ };
111
+ }, U = [j, l], i[49] = j, i[50] = l, i[51] = H, i[52] = U) : (H = i[51], U = i[52]), useEffect(H, U);
112
+ let W, G;
113
+ i[53] !== E || i[54] !== C ? (W = () => () => {
114
+ if (!C) for (let e of E) e.url && URL.revokeObjectURL(e.url);
115
+ }, G = [C, E], i[53] = E, i[54] = C, i[55] = W, i[56] = G) : (W = i[55], G = i[56]), useEffect(W, G);
116
+ let K;
117
+ i[57] === j ? K = i[58] : (K = (e) => {
118
+ e.currentTarget.files && j(e.currentTarget.files);
119
+ }, i[57] = j, i[58] = K);
120
+ let xe = K, Se = _temp7, q;
121
+ i[59] === E ? q = i[60] : (q = E.map(_temp8), i[59] = E, i[60] = q);
122
+ let Ce;
123
+ i[61] !== j || i[62] !== P || i[63] !== be || i[64] !== ye || i[65] !== q ? (Ce = {
124
+ files: q,
125
+ add: j,
126
+ remove: ye,
127
+ clear: P,
128
+ openFileDialog: be,
129
+ fileInputRef: T
130
+ }, i[61] = j, i[62] = P, i[63] = be, i[64] = ye, i[65] = q, i[66] = Ce) : Ce = i[66];
131
+ let we = Ce, Te;
132
+ i[67] !== P || i[68] !== S || i[69] !== E || i[70] !== y || i[71] !== C ? (Te = (e) => {
133
+ e.preventDefault();
134
+ let t = e.currentTarget, n = C ? S.textInput.value : (() => new FormData(t).get("message") || "")();
135
+ C || t.reset(), Promise.all(E.map(async (e) => {
136
+ let { id: t, ...n } = e;
137
+ return n.url && n.url.startsWith("blob:") ? {
138
+ ...n,
139
+ url: await Se(n.url)
140
+ } : n;
141
+ })).then((t) => {
142
+ try {
143
+ let r = y({
144
+ text: n,
145
+ files: t
146
+ }, e);
147
+ r instanceof Promise ? r.then(() => {
148
+ P(), C && S.textInput.clear();
149
+ }).catch(_temp9) : (P(), C && S.textInput.clear());
150
+ } catch {}
151
+ });
152
+ }, i[67] = P, i[68] = S, i[69] = E, i[70] = y, i[71] = C, i[72] = Te) : Te = i[72];
153
+ let Ee = Te, J;
154
+ i[73] === Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ jsx("span", {
155
+ "aria-hidden": "true",
156
+ className: "hidden",
157
+ ref: le
158
+ }), i[73] = J) : J = i[73];
159
+ let Y;
160
+ i[74] !== a || i[75] !== xe || i[76] !== _ ? (Y = /* @__PURE__ */ jsx("input", {
161
+ accept: a,
162
+ "aria-label": "Upload files",
163
+ className: "hidden",
164
+ multiple: _,
165
+ onChange: xe,
166
+ ref: T,
167
+ title: "Upload files",
168
+ type: "file"
169
+ }), i[74] = a, i[75] = xe, i[76] = _, i[77] = Y) : Y = i[77];
170
+ let X;
171
+ i[78] === s ? X = i[79] : (X = cn("w-full", s), i[78] = s, i[79] = X);
172
+ let Z;
173
+ i[80] === o ? Z = i[81] : (Z = /* @__PURE__ */ jsx(InputGroup, {
174
+ className: "overflow-hidden",
175
+ children: o
176
+ }), i[80] = o, i[81] = Z);
177
+ let Q;
178
+ i[82] !== Ee || i[83] !== b || i[84] !== X || i[85] !== Z ? (Q = /* @__PURE__ */ jsx("form", {
179
+ className: X,
180
+ onSubmit: Ee,
181
+ ...b,
182
+ children: Z
183
+ }), i[82] = Ee, i[83] = b, i[84] = X, i[85] = Z, i[86] = Q) : Q = i[86];
184
+ let De;
185
+ i[87] !== Y || i[88] !== Q ? (De = /* @__PURE__ */ jsxs(Fragment$1, { children: [
186
+ J,
187
+ Y,
188
+ Q
189
+ ] }), i[87] = Y, i[88] = Q, i[89] = De) : De = i[89];
190
+ let Oe = De, $;
191
+ return i[90] !== we || i[91] !== Oe || i[92] !== C ? ($ = C ? Oe : /* @__PURE__ */ jsx(LocalAttachmentsContext.Provider, {
192
+ value: we,
193
+ children: Oe
194
+ }), i[90] = we, i[91] = Oe, i[92] = C, i[93] = $) : $ = i[93], $;
195
+ }, PromptInputBody = (t) => {
196
+ let n = c(8), r, i;
197
+ n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
198
+ let a;
199
+ n[3] === r ? a = n[4] : (a = cn("contents", r), n[3] = r, n[4] = a);
200
+ let o;
201
+ return n[5] !== i || n[6] !== a ? (o = /* @__PURE__ */ jsx("div", {
202
+ className: a,
203
+ ...i
204
+ }), n[5] = i, n[6] = a, n[7] = o) : o = n[7], o;
205
+ }, PromptInputTextarea = (t) => {
206
+ let n = c(24), r, i, o, s;
207
+ n[0] === t ? (r = n[1], i = n[2], o = n[3], s = n[4]) : ({onChange: i, className: r, placeholder: s, ...o} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = o, n[4] = s);
208
+ let l = s === void 0 ? "What would you like to know?" : s, u = useOptionalPromptInputController(), d = usePromptInputAttachments(), [f, p] = useState(!1), h;
209
+ n[5] !== d || n[6] !== f ? (h = (e) => {
210
+ if (e.key === "Enter") {
211
+ if (f || e.nativeEvent.isComposing || e.shiftKey) return;
212
+ e.preventDefault();
213
+ let t = e.currentTarget.form;
214
+ if (t?.querySelector("button[type=\"submit\"]")?.disabled) return;
215
+ t?.requestSubmit();
216
+ }
217
+ if (e.key === "Backspace" && e.currentTarget.value === "" && d.files.length > 0) {
218
+ e.preventDefault();
219
+ let t = d.files.at(-1);
220
+ t && d.remove(t.id);
221
+ }
222
+ }, n[5] = d, n[6] = f, n[7] = h) : h = n[7];
223
+ let g = h, _;
224
+ n[8] === d ? _ = n[9] : (_ = (e) => {
225
+ let t = e.clipboardData?.items;
226
+ if (!t) return;
227
+ let n = [];
228
+ for (let e of t) if (e.kind === "file") {
229
+ let t = e.getAsFile();
230
+ t && n.push(t);
231
+ }
232
+ n.length > 0 && (e.preventDefault(), d.add(n));
233
+ }, n[8] = d, n[9] = _);
234
+ let v = _, y;
235
+ n[10] !== u || n[11] !== i ? (y = u ? {
236
+ value: u.textInput.value,
237
+ onChange: (e) => {
238
+ u.textInput.setInput(e.currentTarget.value), i?.(e);
239
+ }
240
+ } : { onChange: i }, n[10] = u, n[11] = i, n[12] = y) : y = n[12];
241
+ let b = y, x;
242
+ n[13] === r ? x = n[14] : (x = cn("field-sizing-content max-h-48 min-h-16 text-base md:text-base", r), n[13] = r, n[14] = x);
243
+ let S, C;
244
+ n[15] === Symbol.for("react.memo_cache_sentinel") ? (S = () => p(!1), C = () => p(!0), n[15] = S, n[16] = C) : (S = n[15], C = n[16]);
245
+ let w;
246
+ return n[17] !== b || n[18] !== g || n[19] !== v || n[20] !== l || n[21] !== o || n[22] !== x ? (w = /* @__PURE__ */ jsx(InputGroupTextarea, {
247
+ className: x,
248
+ name: "message",
249
+ onCompositionEnd: S,
250
+ onCompositionStart: C,
251
+ onKeyDown: g,
252
+ onPaste: v,
253
+ placeholder: l,
254
+ ...o,
255
+ ...b
256
+ }), n[17] = b, n[18] = g, n[19] = v, n[20] = l, n[21] = o, n[22] = x, n[23] = w) : w = n[23], w;
257
+ }, PromptInputFooter = (t) => {
258
+ let n = c(8), i, a;
259
+ n[0] === t ? (i = n[1], a = n[2]) : ({className: i, ...a} = t, n[0] = t, n[1] = i, n[2] = a);
260
+ let o;
261
+ n[3] === i ? o = n[4] : (o = cn("justify-between gap-1", i), n[3] = i, n[4] = o);
262
+ let s;
263
+ return n[5] !== a || n[6] !== o ? (s = /* @__PURE__ */ jsx(InputGroupAddon, {
264
+ align: "block-end",
265
+ className: o,
266
+ ...a
267
+ }), n[5] = a, n[6] = o, n[7] = s) : s = n[7], s;
268
+ }, PromptInputSubmit = (t) => {
269
+ let n = c(19), r, a, o, s, l, u;
270
+ n[0] === t ? (r = n[1], a = n[2], o = n[3], s = n[4], l = n[5], u = n[6]) : ({className: a, variant: l, size: u, status: s, children: r, ...o} = t, n[0] = t, n[1] = r, n[2] = a, n[3] = o, n[4] = s, n[5] = l, n[6] = u);
271
+ let d = l === void 0 ? "default" : l, f = u === void 0 ? "icon-sm" : u, p;
272
+ n[7] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ jsx(CornerDownLeftIcon, { className: "size-4" }), n[7] = p) : p = n[7];
273
+ let m = p;
274
+ if (s === "submitted") {
275
+ let e;
276
+ n[8] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(Loader2Icon, { className: "size-4 animate-spin" }), n[8] = e) : e = n[8], m = e;
277
+ } else if (s === "streaming") {
278
+ let e;
279
+ n[9] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(SquareIcon, { className: "size-4" }), n[9] = e) : e = n[9], m = e;
280
+ } else if (s === "error") {
281
+ let e;
282
+ n[10] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(XIcon, { className: "size-4" }), n[10] = e) : e = n[10], m = e;
283
+ }
284
+ let h;
285
+ n[11] === a ? h = n[12] : (h = cn(a), n[11] = a, n[12] = h);
286
+ let g = r ?? m, x;
287
+ return n[13] !== o || n[14] !== f || n[15] !== h || n[16] !== g || n[17] !== d ? (x = /* @__PURE__ */ jsx(InputGroupButton, {
288
+ "aria-label": "Submit",
289
+ className: h,
290
+ size: f,
291
+ type: "submit",
292
+ variant: d,
293
+ ...o,
294
+ children: g
295
+ }), n[13] = o, n[14] = f, n[15] = h, n[16] = g, n[17] = d, n[18] = x) : x = n[18], x;
296
+ };
297
+ function _temp4(e) {
298
+ for (let t of e) t.url && URL.revokeObjectURL(t.url);
299
+ return [];
300
+ }
301
+ function _temp5(e) {
302
+ e.dataTransfer?.types?.includes("Files") && e.preventDefault();
303
+ }
304
+ function _temp6(e) {
305
+ e.dataTransfer?.types?.includes("Files") && e.preventDefault();
306
+ }
307
+ async function _temp7(e) {
308
+ let t = await (await fetch(e)).blob();
309
+ return new Promise((e, n) => {
310
+ let r = new FileReader();
311
+ r.onloadend = () => e(r.result), r.onerror = n, r.readAsDataURL(t);
312
+ });
313
+ }
314
+ function _temp8(e) {
315
+ return {
316
+ ...e,
317
+ id: e.id
318
+ };
319
+ }
320
+ function _temp9() {}
321
+ export { PromptInput, PromptInputBody, PromptInputFooter, PromptInputSubmit, PromptInputTextarea };
@@ -0,0 +1,124 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../ui/collapsible.js";
4
+ import { _r } from "../../node_modules/streamdown/dist/chunk-RLXIAIE6.js";
5
+ import "../../node_modules/streamdown/dist/index.js";
6
+ import { Shimmer } from "./shimmer.js";
7
+ import { c } from "react/compiler-runtime";
8
+ import { createContext, memo, useContext, useEffect, useState } from "react";
9
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
+ import { BrainIcon, ChevronDownIcon } from "lucide-react";
11
+ import { useControllableState } from "@radix-ui/react-use-controllable-state";
12
+ var ReasoningContext = createContext(null), useReasoning = () => {
13
+ let t = useContext(ReasoningContext);
14
+ if (!t) throw Error("Reasoning components must be used within Reasoning");
15
+ return t;
16
+ }, AUTO_CLOSE_DELAY = 1e3, MS_IN_S = 1e3;
17
+ const Reasoning = memo((o) => {
18
+ let s = c(45), l, u, d, f, p, g, _, v;
19
+ s[0] === o ? (l = s[1], u = s[2], d = s[3], f = s[4], p = s[5], g = s[6], _ = s[7], v = s[8]) : ({className: u, isStreaming: _, open: p, defaultOpen: v, onOpenChange: f, duration: d, children: l, ...g} = o, s[0] = o, s[1] = l, s[2] = u, s[3] = d, s[4] = f, s[5] = p, s[6] = g, s[7] = _, s[8] = v);
20
+ let y = _ === void 0 ? !1 : _, S = v === void 0 ? !0 : v, C;
21
+ s[9] !== S || s[10] !== f || s[11] !== p ? (C = {
22
+ prop: p,
23
+ defaultProp: S,
24
+ onChange: f
25
+ }, s[9] = S, s[10] = f, s[11] = p, s[12] = C) : C = s[12];
26
+ let [w, T] = useControllableState(C), E;
27
+ s[13] === d ? E = s[14] : (E = {
28
+ prop: d,
29
+ defaultProp: void 0
30
+ }, s[13] = d, s[14] = E);
31
+ let [D, O] = useControllableState(E), [k, A] = useState(!1), [j, M] = useState(null), N, P;
32
+ s[15] !== y || s[16] !== O || s[17] !== j ? (N = () => {
33
+ y ? j === null && M(Date.now()) : j !== null && (O(Math.ceil((Date.now() - j) / MS_IN_S)), M(null));
34
+ }, P = [
35
+ y,
36
+ j,
37
+ O
38
+ ], s[15] = y, s[16] = O, s[17] = j, s[18] = N, s[19] = P) : (N = s[18], P = s[19]), useEffect(N, P);
39
+ let F, I;
40
+ s[20] !== S || s[21] !== k || s[22] !== w || s[23] !== y || s[24] !== T ? (F = () => {
41
+ if (S && !y && w && !k) {
42
+ let t = setTimeout(() => {
43
+ T(!1), A(!0);
44
+ }, AUTO_CLOSE_DELAY);
45
+ return () => clearTimeout(t);
46
+ }
47
+ }, I = [
48
+ y,
49
+ w,
50
+ S,
51
+ T,
52
+ k
53
+ ], s[20] = S, s[21] = k, s[22] = w, s[23] = y, s[24] = T, s[25] = F, s[26] = I) : (F = s[25], I = s[26]), useEffect(F, I);
54
+ let L;
55
+ s[27] === T ? L = s[28] : (L = (t) => {
56
+ T(t);
57
+ }, s[27] = T, s[28] = L);
58
+ let R = L, z;
59
+ s[29] !== D || s[30] !== w || s[31] !== y || s[32] !== T ? (z = {
60
+ isStreaming: y,
61
+ isOpen: w,
62
+ setIsOpen: T,
63
+ duration: D
64
+ }, s[29] = D, s[30] = w, s[31] = y, s[32] = T, s[33] = z) : z = s[33];
65
+ let B;
66
+ s[34] === u ? B = s[35] : (B = cn("not-prose mb-4", u), s[34] = u, s[35] = B);
67
+ let V;
68
+ s[36] !== l || s[37] !== R || s[38] !== w || s[39] !== g || s[40] !== B ? (V = /* @__PURE__ */ jsx(Collapsible, {
69
+ className: B,
70
+ onOpenChange: R,
71
+ open: w,
72
+ ...g,
73
+ children: l
74
+ }), s[36] = l, s[37] = R, s[38] = w, s[39] = g, s[40] = B, s[41] = V) : V = s[41];
75
+ let H;
76
+ return s[42] !== z || s[43] !== V ? (H = /* @__PURE__ */ jsx(ReasoningContext.Provider, {
77
+ value: z,
78
+ children: V
79
+ }), s[42] = z, s[43] = V, s[44] = H) : H = s[44], H;
80
+ });
81
+ var getThinkingMessage = (t, a) => t || a === 0 ? /* @__PURE__ */ jsx(Shimmer, {
82
+ duration: 1,
83
+ children: "Thinking..."
84
+ }) : a === void 0 ? /* @__PURE__ */ jsx("p", { children: "Thought for a few seconds" }) : /* @__PURE__ */ jsxs("p", { children: [
85
+ "Thought for ",
86
+ a,
87
+ " seconds"
88
+ ] });
89
+ const ReasoningTrigger = memo((a) => {
90
+ let o = c(15), l, u, d;
91
+ o[0] === a ? (l = o[1], u = o[2], d = o[3]) : ({className: u, children: l, ...d} = a, o[0] = a, o[1] = l, o[2] = u, o[3] = d);
92
+ let { isStreaming: f, isOpen: p, duration: m } = useReasoning(), h;
93
+ o[4] === u ? h = o[5] : (h = cn("text-muted-foreground hover:text-foreground flex w-full items-center gap-2 text-sm transition-colors", u), o[4] = u, o[5] = h);
94
+ let b;
95
+ o[6] !== l || o[7] !== m || o[8] !== p || o[9] !== f ? (b = l ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
96
+ /* @__PURE__ */ jsx(BrainIcon, { className: "size-4" }),
97
+ getThinkingMessage(f, m),
98
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4 transition-transform", p ? "rotate-180" : "rotate-0") })
99
+ ] }), o[6] = l, o[7] = m, o[8] = p, o[9] = f, o[10] = b) : b = o[10];
100
+ let x;
101
+ return o[11] !== d || o[12] !== h || o[13] !== b ? (x = /* @__PURE__ */ jsx(CollapsibleTrigger, {
102
+ className: h,
103
+ ...d,
104
+ children: b
105
+ }), o[11] = d, o[12] = h, o[13] = b, o[14] = x) : x = o[14], x;
106
+ }), ReasoningContent = memo((a) => {
107
+ let s = c(13), u, d, f;
108
+ s[0] === a ? (u = s[1], d = s[2], f = s[3]) : ({className: d, children: u, ...f} = a, s[0] = a, s[1] = u, s[2] = d, s[3] = f);
109
+ let p;
110
+ s[4] === d ? p = s[5] : (p = cn("mt-4 text-sm", "data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground data-[state=closed]:animate-out data-[state=open]:animate-in outline-none", d), s[4] = d, s[5] = p);
111
+ let m;
112
+ s[6] !== u || s[7] !== f ? (m = /* @__PURE__ */ jsx(_r, {
113
+ ...f,
114
+ children: u
115
+ }), s[6] = u, s[7] = f, s[8] = m) : m = s[8];
116
+ let h;
117
+ return s[9] !== f || s[10] !== p || s[11] !== m ? (h = /* @__PURE__ */ jsx(CollapsibleContent, {
118
+ className: p,
119
+ ...f,
120
+ children: m
121
+ }), s[9] = f, s[10] = p, s[11] = m, s[12] = h) : h = s[12], h;
122
+ });
123
+ Reasoning.displayName = "Reasoning", ReasoningTrigger.displayName = "ReasoningTrigger", ReasoningContent.displayName = "ReasoningContent";
124
+ export { Reasoning, ReasoningContent, ReasoningTrigger };