@loopstack/loopstack-studio 0.21.0-rc.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.
- package/dist/components/LoadingCentered.js +28 -0
- package/dist/components/ai-elements/code-block.js +96 -0
- package/dist/components/ai-elements/message.js +87 -0
- package/dist/components/ai-elements/prompt-input.js +321 -0
- package/dist/components/ai-elements/reasoning.js +124 -0
- package/dist/components/ai-elements/shimmer.js +37 -0
- package/dist/components/ai-elements/sources.js +65 -0
- package/dist/components/ai-elements/tool.js +158 -0
- package/dist/components/content/ErrorAlert.js +17 -0
- package/dist/components/data-table/DataList.js +102 -102
- package/dist/components/data-table/DataTable.js +102 -99
- package/dist/components/dynamic-form/CodeContent.js +2 -2
- package/dist/components/dynamic-form/FormElement.js +3 -3
- package/dist/components/dynamic-form/FormElementHeader.js +2 -2
- package/dist/components/dynamic-form/ObjectController.js +2 -2
- package/dist/components/dynamic-form/fields/RadioField.js +3 -3
- package/dist/components/dynamic-form/fields/SliderField.js +13 -13
- package/dist/components/dynamic-form/fields/SwitchField.js +1 -1
- package/dist/components/dynamic-form/fields/TextareaField.js +4 -4
- package/dist/components/index.js +45 -0
- package/dist/components/layout/MainLayout.js +0 -1
- package/dist/components/lists/ListView.js +62 -59
- package/dist/components/loopstack-elements/link.js +115 -0
- package/dist/components/messages/CompletionMessagePaper.js +110 -0
- package/dist/components/snackbars/ErrorSnackbar.js +1 -1
- package/dist/components/ui/DiscordLogo.js +31 -0
- package/dist/components/ui/GoogleLogo.js +44 -0
- package/dist/components/ui/accordion.js +64 -0
- package/dist/components/ui/alert-dialog.js +91 -82
- package/dist/components/ui/alert.js +50 -0
- package/dist/components/ui/avatar.js +42 -0
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/breadcrumb.js +76 -56
- package/dist/components/ui/button-group.js +13 -0
- package/dist/components/ui/card.js +79 -19
- package/dist/components/ui/command.js +7 -0
- package/dist/components/ui/context-menu.js +63 -0
- package/dist/components/ui/dialog.js +89 -47
- package/dist/components/ui/drawer.js +122 -0
- package/dist/components/ui/dropdown-menu.js +190 -0
- package/dist/components/ui/hover-card.js +6 -0
- package/dist/components/ui/input-group.js +85 -0
- package/dist/components/ui/popover.js +47 -0
- package/dist/components/ui/scroll-area.js +50 -0
- package/dist/components/ui/select.js +115 -82
- package/dist/components/ui/separator.js +20 -0
- package/dist/components/ui/sheet.js +87 -57
- package/dist/components/ui/sidebar.js +557 -0
- package/dist/components/ui/skeleton.js +16 -0
- package/dist/components/ui/table.js +85 -61
- package/dist/components/ui/tabs.js +54 -0
- package/dist/components/ui-widgets/UiActions.js +24 -0
- package/dist/components/ui-widgets/UiWidget.js +43 -0
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +43 -0
- package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +23 -0
- package/dist/components/ui-widgets/widgets/SubmitButton.js +23 -0
- package/dist/features/code-explorer/CodeExplorer.js +69 -0
- package/dist/features/code-explorer/components/CodeExplorerTree.js +43 -0
- package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +82 -0
- package/dist/features/code-explorer/components/FileContentViewer.js +237 -0
- package/dist/features/code-explorer/components/FileTabsBar.js +191 -0
- package/dist/features/code-explorer/providers/CodeExplorerProvider.js +165 -0
- package/dist/features/code-explorer/utils/fileIcons.js +42 -0
- package/dist/features/dashboard/Dashboard.js +125 -0
- package/dist/features/dashboard/RunItem.js +76 -0
- package/dist/features/dashboard/RunList.js +32 -0
- package/dist/features/debug/components/ConfigFlowViewer.js +79 -0
- package/dist/features/debug/components/PipelineDebugHeader.js +48 -0
- package/dist/features/debug/components/PipelineDebugLegend.js +68 -0
- package/dist/features/debug/components/PipelineFlowViewer.js +109 -0
- package/dist/features/debug/components/pipeline-flow/StateNode.js +111 -0
- package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +41 -0
- package/dist/features/debug/components/pipeline-flow/WorkflowTransitionEdge.js +97 -0
- package/dist/features/debug/lib/edge-paths.js +47 -0
- package/dist/features/debug/lib/flow-utils.js +247 -0
- package/dist/features/health/LocalHealthCheck.js +2 -2
- package/dist/features/oauth/OAuthCallbackPage.js +2 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +223 -0
- package/dist/features/oauth/index.js +3 -0
- package/dist/features/oauth/useOAuthPopup.js +83 -0
- package/dist/features/workbench/NavigationItems.js +52 -0
- package/dist/features/workbench/Workbench.js +101 -0
- package/dist/features/workbench/WorkbenchNavigation.js +38 -0
- package/dist/features/workbench/WorkflowItem.js +67 -0
- package/dist/features/workbench/WorkflowList.js +110 -0
- package/dist/features/workbench/components/DocumentItem.js +27 -0
- package/dist/features/workbench/components/DocumentList.js +40 -0
- package/dist/features/workbench/components/DocumentMetadataPills.js +63 -0
- package/dist/features/workbench/components/DocumentRenderer.js +54 -0
- package/dist/features/workbench/components/NavigationItem.js +68 -0
- package/dist/features/workbench/components/PipelineHistoryList.js +56 -0
- package/dist/features/workbench/components/WorkbenchSettingsModal.js +89 -0
- package/dist/features/workbench/components/WorkbenchSidebar.js +109 -0
- package/dist/features/workbench/components/WorkflowForms.js +22 -0
- package/dist/features/workbench/components/WorkflowHistoryItem.js +144 -0
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +85 -0
- package/dist/features/workbench/components/document-details/DocumentDetails.js +425 -0
- package/dist/features/workbench/components/document-details/PromptDetails.js +146 -0
- package/dist/features/workbench/components/document-renderer/AiMessage.js +56 -0
- package/dist/features/workbench/components/document-renderer/AiMessageContent.js +174 -0
- package/dist/features/workbench/components/document-renderer/DocumentDebugRenderer.js +30 -0
- package/dist/features/workbench/components/document-renderer/DocumentFormRenderer.js +79 -0
- package/dist/features/workbench/components/document-renderer/DocumentMessageRenderer.js +10 -0
- package/dist/features/workbench/components/document-renderer/ErrorMessageRenderer.js +13 -0
- package/dist/features/workbench/components/document-renderer/LinkMessageRenderer.js +17 -0
- package/dist/features/workbench/components/document-renderer/MarkdownMessageRenderer.js +10 -0
- package/dist/features/workbench/components/document-renderer/PlainMessageRenderer.js +9 -0
- package/dist/features/workbench/hooks/useAutoScrollBottom.js +29 -0
- package/dist/features/workbench/hooks/useIntersectionObserver.js +44 -0
- package/dist/features/workbench/hooks/useScrollToListItem.js +23 -0
- package/dist/features/workbench/providers/ScrollProvider.js +22 -0
- package/dist/features/workbench/providers/WorkbenchContextProvider.js +3 -0
- package/dist/features/workspaces/Workspaces.js +157 -90
- package/dist/features/workspaces/components/CreateWorkspace.js +104 -81
- package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
- package/dist/features/workspaces/components/PipelineForm.js +2 -2
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useApi.js +1 -1
- package/dist/hooks/useDashboard.js +23 -0
- package/dist/hooks/useDocuments.js +45 -0
- package/dist/hooks/useFiles.js +63 -0
- package/dist/hooks/useNamespaceTree.js +27 -0
- package/dist/hooks/useNamespaces.js +34 -0
- package/dist/hooks/usePipelines.js +83 -6
- package/dist/hooks/useWorkflows.js +122 -0
- package/dist/hooks/useWorkspaces.js +49 -29
- package/dist/index.d.ts +817 -9
- package/dist/index.js +55 -1
- package/dist/lib/requireParam.js +6 -0
- package/dist/loopstack-studio.css +1 -1
- package/dist/node_modules/@ai-sdk/provider/dist/index.js +65 -0
- package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +1008 -0
- package/dist/node_modules/@dagrejs/dagre/dist/dagre.esm.js +1968 -0
- package/dist/node_modules/@shikijs/core/dist/index.js +1420 -0
- package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +236 -0
- package/dist/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/abap.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/actionscript-3.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ada.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-expression.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-html.js +14 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-inline-style.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-inline-template.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-let-declaration.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-template-blocks.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-template.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/angular-ts.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/apache.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/apex.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/apl.js +14 -0
- package/dist/node_modules/@shikijs/langs/dist/applescript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ara.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/asciidoc.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/asm.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/astro.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/awk.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ballerina.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/bat.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/beancount.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/berry.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/bibtex.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/bicep.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/bird2.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/blade.js +18 -0
- package/dist/node_modules/@shikijs/langs/dist/bsl.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/c.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/c3.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cadence.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cairo.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/clarity.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/clojure.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cmake.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cobol.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/codeowners.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/codeql.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/coffee.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/common-lisp.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/coq.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cpp-macro.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/cpp.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/crystal.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/csharp.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/css.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/csv.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cue.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/cypher.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/d.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/dart.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/dax.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/desktop.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/diff.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/docker.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/dotenv.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/dream-maker.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/edge.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/elixir.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/elm.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/erb.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/erlang.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/es-tag-css.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/es-tag-glsl.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/es-tag-html.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/es-tag-xml.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/fennel.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/fish.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/fluent.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/fortran-fixed-form.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/fortran-free-form.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/fsharp.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/gdresource.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/gdscript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/gdshader.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/genie.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/gherkin.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/git-commit.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/git-rebase.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/gleam.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/glimmer-js.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/glimmer-ts.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/glsl.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/gn.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/gnuplot.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/go.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/graphql.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/groovy.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/hack.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/haml.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/handlebars.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/haskell.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/haxe.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/hcl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/hjson.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/hlsl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/html-derivative.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/html.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/http.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/hurl.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/hxml.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/hy.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/imba.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ini.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/java.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/javascript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jinja-html.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/jinja.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/jison.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/json.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/json5.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jsonc.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jsonl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jsonnet.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jssm.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/jsx.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/julia.js +14 -0
- package/dist/node_modules/@shikijs/langs/dist/just.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/kdl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/kotlin.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/kusto.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/latex.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/lean.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/less.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/liquid.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/llvm.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/log.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/logo.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/lua.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/luau.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/make.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/markdown-nix.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/markdown-vue.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/markdown.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/marko.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/matlab.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/mdc.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/mdx.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/mermaid.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/mipsasm.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/mojo.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/moonbit.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/move.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/narrat.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/nextflow.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/nginx.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/nim.js +18 -0
- package/dist/node_modules/@shikijs/langs/dist/nix.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/nushell.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/objective-c.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/objective-cpp.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ocaml.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/odin.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/openscad.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/pascal.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/perl.js +14 -0
- package/dist/node_modules/@shikijs/langs/dist/php.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/pkl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/plsql.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/po.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/polar.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/postcss.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/powerquery.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/powershell.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/prisma.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/prolog.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/proto.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/pug.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/puppet.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/purescript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/python.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/qml.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/qmldir.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/qss.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/r.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/racket.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/raku.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/razor.js +8 -0
- package/dist/node_modules/@shikijs/langs/dist/reg.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/regexp.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/rel.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/riscv.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ron.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/rosmsg.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/rst.js +20 -0
- package/dist/node_modules/@shikijs/langs/dist/ruby.js +28 -0
- package/dist/node_modules/@shikijs/langs/dist/rust.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/sas.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/sass.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/scala.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/scheme.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/scss.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/sdbl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/shaderlab.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/shellscript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/shellsession.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/smalltalk.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/solidity.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/soy.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/sparql.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/splunk.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/sql.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ssh-config.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/stata.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/stylus.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/surrealql.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/svelte.js +12 -0
- package/dist/node_modules/@shikijs/langs/dist/swift.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/system-verilog.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/systemd.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/talonscript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/tasl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/tcl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/templ.js +10 -0
- package/dist/node_modules/@shikijs/langs/dist/terraform.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/tex.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/toml.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/ts-tags.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/tsv.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/tsx.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/turtle.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/twig.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/typescript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/typespec.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/typst.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/v.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vala.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vb.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/verilog.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vhdl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/viml.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vue-directives.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vue-html.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/vue-interpolations.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/vue-vine.js +16 -0
- package/dist/node_modules/@shikijs/langs/dist/vue.js +24 -0
- package/dist/node_modules/@shikijs/langs/dist/vyper.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wasm.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wenyan.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wgsl.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wikitext.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wit.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/wolfram.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/xml.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/xsl.js +3 -0
- package/dist/node_modules/@shikijs/langs/dist/yaml.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/zenscript.js +2 -0
- package/dist/node_modules/@shikijs/langs/dist/zig.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/andromeeda.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/aurora-x.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/ayu-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/ayu-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/ayu-mirage.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-latte.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/dark-plus.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/dracula-soft.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/dracula.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/everforest-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/everforest-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-dark-default.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-dark-dimmed.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-dark-high-contrast.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-light-default.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-light-high-contrast.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/github-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/horizon.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/houston.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/kanagawa-dragon.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/kanagawa-lotus.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/kanagawa-wave.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/laserwave.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/light-plus.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/material-theme-darker.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/material-theme-lighter.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/material-theme-ocean.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/material-theme-palenight.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/material-theme.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/min-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/min-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/monokai.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/night-owl-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/night-owl.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/nord.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/one-dark-pro.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/one-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/plastic.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/poimandres.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/red.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/rose-pine-dawn.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/rose-pine-moon.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/rose-pine.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/slack-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/slack-ochin.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/snazzy-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/solarized-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/solarized-light.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/synthwave-84.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/tokyo-night.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/vesper.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/vitesse-black.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/vitesse-dark.js +2 -0
- package/dist/node_modules/@shikijs/themes/dist/vitesse-light.js +2 -0
- package/dist/node_modules/@shikijs/types/dist/index.js +6 -0
- package/dist/node_modules/@shikijs/vscode-textmate/dist/index.js +1580 -0
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +51 -0
- package/dist/node_modules/@ungap/structured-clone/esm/index.js +4 -0
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +91 -0
- package/dist/node_modules/@ungap/structured-clone/esm/types.js +2 -0
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +3280 -0
- package/dist/node_modules/@xyflow/system/dist/esm/index.js +1839 -0
- package/dist/node_modules/ai/dist/index.js +1083 -0
- package/dist/node_modules/bail/index.js +4 -0
- package/dist/node_modules/character-entities-html4/index.js +255 -0
- package/dist/node_modules/character-entities-legacy/index.js +2 -0
- package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +6 -1
- package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +4 -10
- package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +56 -65
- package/dist/node_modules/classcat/index.js +8 -0
- package/dist/node_modules/comma-separated-tokens/index.js +5 -1
- package/dist/node_modules/d3/src/index.js +5 -0
- package/dist/node_modules/d3-drag/src/constant.js +2 -0
- package/dist/node_modules/d3-drag/src/drag.js +112 -0
- package/dist/node_modules/d3-drag/src/event.js +60 -0
- package/dist/node_modules/d3-drag/src/nodrag.js +13 -0
- package/dist/node_modules/d3-drag/src/noevent.js +11 -0
- package/dist/node_modules/d3-interpolate/src/zoom.js +39 -0
- package/dist/node_modules/d3-selection/src/pointer.js +16 -0
- package/dist/node_modules/d3-selection/src/sourceEvent.js +6 -0
- package/dist/node_modules/d3-zoom/src/constant.js +2 -0
- package/dist/node_modules/d3-zoom/src/event.js +26 -0
- package/dist/node_modules/d3-zoom/src/index.js +1 -1
- package/dist/node_modules/d3-zoom/src/noevent.js +7 -0
- package/dist/node_modules/d3-zoom/src/zoom.js +214 -1
- package/dist/node_modules/decode-named-character-reference/index.dom.js +8 -0
- package/dist/node_modules/entities/dist/esm/decode-codepoint.js +35 -0
- package/dist/node_modules/entities/dist/esm/decode.js +129 -0
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.js +2 -0
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +5 -0
- package/dist/node_modules/extend/index.js +37 -0
- package/dist/node_modules/hast-util-from-parse5/lib/index.js +121 -0
- package/dist/node_modules/hast-util-raw/lib/index.js +204 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.js +34 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.js +5 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.js +150 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.js +267 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.js +9 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.js +65 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/index.js +8 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.js +69 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.js +1936 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.js +239 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.js +22 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.js +1451 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.js +75 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.js +155 -0
- package/dist/node_modules/hast-util-sanitize/lib/index.js +159 -0
- package/dist/node_modules/hast-util-sanitize/lib/schema.js +73 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/comment.js +9 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/doctype.js +4 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/element.js +47 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/index.js +27 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/raw.js +5 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/root.js +4 -0
- package/dist/node_modules/hast-util-to-html/lib/handle/text.js +6 -0
- package/dist/node_modules/hast-util-to-html/lib/index.js +46 -0
- package/dist/node_modules/hast-util-to-html/lib/omission/closing.js +84 -0
- package/dist/node_modules/hast-util-to-html/lib/omission/omission.js +8 -0
- package/dist/node_modules/hast-util-to-html/lib/omission/opening.js +37 -0
- package/dist/node_modules/hast-util-to-html/lib/omission/util/siblings.js +12 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +251 -0
- package/dist/node_modules/hast-util-to-parse5/lib/index.js +113 -0
- package/dist/node_modules/hast-util-whitespace/lib/index.js +8 -0
- package/dist/node_modules/html-url-attributes/lib/index.js +34 -0
- package/dist/node_modules/html-void-elements/index.js +23 -0
- package/dist/node_modules/inline-style-parser/cjs/index.js +88 -0
- package/dist/node_modules/katex/dist/katex.js +717 -861
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +555 -0
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js +101 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +20 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +28 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +19 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +54 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +15 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +16 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +57 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +18 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +8 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +22 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +33 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +9 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/index.js +17 -0
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js +18 -0
- package/dist/node_modules/mdast-util-to-hast/lib/state.js +106 -0
- package/dist/node_modules/micromark/lib/constructs.js +79 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js +175 -0
- package/dist/node_modules/micromark/lib/initialize/content.js +32 -0
- package/dist/node_modules/micromark/lib/initialize/document.js +101 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js +23 -0
- package/dist/node_modules/micromark/lib/initialize/text.js +84 -0
- package/dist/node_modules/micromark/lib/parse.js +27 -0
- package/dist/node_modules/micromark/lib/postprocess.js +6 -0
- package/dist/node_modules/micromark/lib/preprocess.js +30 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +112 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +41 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +36 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +15 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +27 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +88 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +42 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +41 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +46 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +59 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +15 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +65 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +140 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +98 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +157 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +21 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +18 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +12 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +77 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +57 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +23 -0
- package/dist/node_modules/micromark-factory-destination/index.js +24 -0
- package/dist/node_modules/micromark-factory-label/index.js +18 -0
- package/dist/node_modules/micromark-factory-title/index.js +22 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js +10 -0
- package/dist/node_modules/micromark-util-character/index.js +6 -5
- package/dist/node_modules/micromark-util-chunked/index.js +4 -1
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +5 -0
- package/dist/node_modules/micromark-util-decode-string/index.js +15 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js +7 -0
- package/dist/node_modules/micromark-util-sanitize-uri/index.js +16 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js +33 -0
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +55 -0
- package/dist/node_modules/motion/dist/es/react.js +3 -0
- package/dist/node_modules/nanoid/index.browser.js +7 -0
- package/dist/node_modules/nanoid/url-alphabet/index.js +2 -0
- package/dist/node_modules/property-information/index.js +1 -0
- package/dist/node_modules/property-information/lib/hast-to-react.js +20 -0
- package/dist/node_modules/rehype-harden/dist/index.js +168 -0
- package/dist/node_modules/rehype-raw/lib/index.js +10 -0
- package/dist/node_modules/rehype-sanitize/lib/index.js +7 -0
- package/dist/node_modules/remark-parse/lib/index.js +14 -0
- package/dist/node_modules/remark-rehype/lib/index.js +16 -0
- package/dist/node_modules/remend/dist/index.js +459 -0
- package/dist/node_modules/shiki/dist/bundle-full.js +11 -0
- package/dist/node_modules/shiki/dist/langs.js +1278 -0
- package/dist/node_modules/shiki/dist/themes.js +393 -0
- package/dist/node_modules/shiki/dist/wasm.js +2 -0
- package/dist/node_modules/space-separated-tokens/index.js +4 -1
- package/dist/node_modules/streamdown/dist/chunk-RLXIAIE6.js +2189 -0
- package/dist/node_modules/streamdown/dist/highlighted-body-B3W2YXNL.js +33 -0
- package/dist/node_modules/streamdown/dist/index.js +2 -0
- package/dist/node_modules/streamdown/dist/mermaid-3ZIDBTTL.js +3 -0
- package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +1421 -0
- package/dist/node_modules/stringify-entities/lib/constant/dangerous.js +11 -0
- package/dist/node_modules/stringify-entities/lib/core.js +21 -0
- package/dist/node_modules/stringify-entities/lib/index.js +6 -0
- package/dist/node_modules/stringify-entities/lib/util/format-smart.js +12 -0
- package/dist/node_modules/stringify-entities/lib/util/to-decimal.js +6 -0
- package/dist/node_modules/stringify-entities/lib/util/to-hexadecimal.js +6 -0
- package/dist/node_modules/stringify-entities/lib/util/to-named.js +15 -0
- package/dist/node_modules/style-to-js/cjs/index.js +17 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js +16 -0
- package/dist/node_modules/style-to-object/cjs/index.js +21 -0
- package/dist/node_modules/trim-lines/index.js +19 -0
- package/dist/node_modules/trough/lib/index.js +48 -0
- package/dist/node_modules/unified/lib/callable-instance.js +7 -0
- package/dist/node_modules/unified/lib/index.js +160 -0
- package/dist/node_modules/unified/node_modules/is-plain-obj/index.js +6 -0
- package/dist/node_modules/unist-util-position/lib/index.js +20 -0
- package/dist/node_modules/unist-util-stringify-position/lib/index.js +13 -0
- package/dist/node_modules/vaul/dist/index.js +912 -0
- package/dist/node_modules/vfile/lib/index.js +87 -0
- package/dist/node_modules/vfile/lib/minpath.browser.js +97 -0
- package/dist/node_modules/vfile/lib/minproc.browser.js +5 -0
- package/dist/node_modules/vfile/lib/minurl.browser.js +29 -0
- package/dist/node_modules/vfile/lib/minurl.shared.js +4 -0
- package/dist/node_modules/vfile-location/lib/index.js +41 -0
- package/dist/node_modules/vfile-message/lib/index.js +22 -0
- package/dist/node_modules/zod/v3/ZodError.js +79 -0
- package/dist/node_modules/zod/v3/errors.js +6 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +5 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +90 -0
- package/dist/node_modules/zod/v3/helpers/util.js +72 -0
- package/dist/node_modules/zod/v3/locales/en.js +58 -0
- package/dist/node_modules/zod/v3/types.js +2425 -0
- package/dist/node_modules/zod/v4/classic/errors.js +21 -0
- package/dist/node_modules/zod/v4/classic/iso.js +29 -0
- package/dist/node_modules/zod/v4/classic/parse.js +4 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +392 -0
- package/dist/node_modules/zod/v4/core/api.js +532 -0
- package/dist/node_modules/zod/v4/core/checks.js +283 -0
- package/dist/node_modules/zod/v4/core/core.js +44 -0
- package/dist/node_modules/zod/v4/core/doc.js +21 -0
- package/dist/node_modules/zod/v4/core/errors.js +40 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +305 -0
- package/dist/node_modules/zod/v4/core/parse.js +66 -0
- package/dist/node_modules/zod/v4/core/regexes.js +28 -0
- package/dist/node_modules/zod/v4/core/registries.js +38 -0
- package/dist/node_modules/zod/v4/core/schemas.js +863 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +220 -0
- package/dist/node_modules/zod/v4/core/util.js +267 -0
- package/dist/node_modules/zod/v4/core/versions.js +6 -0
- package/dist/node_modules/zwitch/index.js +14 -0
- package/dist/pages/DashboardPage.js +58 -0
- package/dist/pages/DebugWorkflowDetailsPage.js +121 -0
- package/dist/pages/DebugWorkflowsPage.js +130 -0
- package/dist/pages/EmbedWorkbenchPage.js +73 -0
- package/dist/pages/PipelineDebugPage.js +114 -0
- package/dist/pages/WorkbenchPage.js +67 -0
- package/dist/pages/WorkspacePage.js +1 -1
- package/dist/providers/ComponentOverridesProvider.js +12 -0
- package/dist/routing/LocalRouter.js +3 -0
- package/package.json +16 -16
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Loader2 } from "lucide-react";
|
|
6
|
+
var LoadingCentered_default = (i) => {
|
|
7
|
+
let o = c(16), s, l, u, d, f;
|
|
8
|
+
o[0] === i ? (s = o[1], l = o[2], u = o[3], d = o[4], f = o[5]) : ({loading: u, size: d, children: f, className: s, ...l} = i, o[0] = i, o[1] = s, o[2] = l, o[3] = u, o[4] = d, o[5] = f);
|
|
9
|
+
let p = u === void 0 ? !1 : u, m = d === void 0 ? 24 : d, h = f === void 0 ? null : f;
|
|
10
|
+
if (p) {
|
|
11
|
+
let r;
|
|
12
|
+
o[6] === s ? r = o[7] : (r = cn("flex items-center justify-center", s), o[6] = s, o[7] = r);
|
|
13
|
+
let i;
|
|
14
|
+
o[8] === m ? i = o[9] : (i = /* @__PURE__ */ jsx(Loader2, {
|
|
15
|
+
className: "animate-spin",
|
|
16
|
+
size: m
|
|
17
|
+
}), o[8] = m, o[9] = i);
|
|
18
|
+
let a;
|
|
19
|
+
return o[10] !== l || o[11] !== r || o[12] !== i ? (a = /* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: r,
|
|
21
|
+
...l,
|
|
22
|
+
children: i
|
|
23
|
+
}), o[10] = l, o[11] = r, o[12] = i, o[13] = a) : a = o[13], a;
|
|
24
|
+
}
|
|
25
|
+
let g;
|
|
26
|
+
return o[14] === h ? g = o[15] : (g = /* @__PURE__ */ jsx(Fragment$1, { children: h }), o[14] = h, o[15] = g), g;
|
|
27
|
+
};
|
|
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 };
|