@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.
- package/dist/components/LoadingCentered.js +2 -2
- 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/DataTable.js +99 -96
- 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/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/ui/button-group.js +13 -0
- package/dist/components/ui/command.js +7 -0
- package/dist/components/ui/context-menu.js +63 -0
- package/dist/components/ui/hover-card.js +6 -0
- package/dist/components/ui/input-group.js +85 -0
- package/dist/components/ui/table.js +2 -2
- 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 +1 -1
- 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 +156 -89
- package/dist/features/workspaces/components/CreateWorkspace.js +101 -78
- package/dist/features/workspaces/components/ExecutionTimeline.js +1 -1
- package/dist/hooks/index.js +1 -0
- 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 +75 -9
- package/dist/index.js +9 -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/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/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 +3 -3
|
@@ -0,0 +1,1008 @@
|
|
|
1
|
+
import { AISDKError, InvalidArgumentError, JSONParseError, TypeValidationError } from "../../provider/dist/index.js";
|
|
2
|
+
import { toJSONSchema } from "../../../zod/v4/core/json-schema-processors.js";
|
|
3
|
+
import { safeParseAsync } from "../../../zod/v4/classic/parse.js";
|
|
4
|
+
import { ZodFirstPartyTypeKind } from "../../../zod/v3/types.js";
|
|
5
|
+
var { btoa, atob } = globalThis, name = "AI_DownloadError", marker = `vercel.ai.error.${name}`, symbol = Symbol.for(marker), _a, _b, DownloadError = class extends (_b = AISDKError, _a = symbol, _b) {
|
|
6
|
+
constructor({ url: g, statusCode: G, statusText: K, cause: q, message: J = q == null ? `Failed to download ${g}: ${G} ${K}` : `Failed to download ${g}: ${q}` }) {
|
|
7
|
+
super({
|
|
8
|
+
name,
|
|
9
|
+
message: J,
|
|
10
|
+
cause: q
|
|
11
|
+
}), this[_a] = !0, this.url = g, this.statusCode = G, this.statusText = K;
|
|
12
|
+
}
|
|
13
|
+
static isInstance(G) {
|
|
14
|
+
return AISDKError.hasMarker(G, marker);
|
|
15
|
+
}
|
|
16
|
+
}, DEFAULT_MAX_DOWNLOAD_SIZE = 2 * 1024 * 1024 * 1024;
|
|
17
|
+
async function readResponseWithSizeLimit({ response: g, url: G, maxBytes: K = DEFAULT_MAX_DOWNLOAD_SIZE }) {
|
|
18
|
+
let q = g.headers.get("content-length");
|
|
19
|
+
if (q != null) {
|
|
20
|
+
let g = parseInt(q, 10);
|
|
21
|
+
if (!isNaN(g) && g > K) throw new DownloadError({
|
|
22
|
+
url: G,
|
|
23
|
+
message: `Download of ${G} exceeded maximum size of ${K} bytes (Content-Length: ${g}).`
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
let J = g.body;
|
|
27
|
+
if (J == null) return new Uint8Array();
|
|
28
|
+
let Y = J.getReader(), X = [], Z = 0;
|
|
29
|
+
try {
|
|
30
|
+
for (;;) {
|
|
31
|
+
let { done: g, value: q } = await Y.read();
|
|
32
|
+
if (g) break;
|
|
33
|
+
if (Z += q.length, Z > K) throw new DownloadError({
|
|
34
|
+
url: G,
|
|
35
|
+
message: `Download of ${G} exceeded maximum size of ${K} bytes.`
|
|
36
|
+
});
|
|
37
|
+
X.push(q);
|
|
38
|
+
}
|
|
39
|
+
} finally {
|
|
40
|
+
try {
|
|
41
|
+
await Y.cancel();
|
|
42
|
+
} finally {
|
|
43
|
+
Y.releaseLock();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
let Q = new Uint8Array(Z), $ = 0;
|
|
47
|
+
for (let g of X) Q.set(g, $), $ += g.length;
|
|
48
|
+
return Q;
|
|
49
|
+
}
|
|
50
|
+
var createIdGenerator = ({ prefix: g, size: K = 16, alphabet: q = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", separator: J = "-" } = {}) => {
|
|
51
|
+
let Y = () => {
|
|
52
|
+
let g = q.length, G = Array(K);
|
|
53
|
+
for (let J = 0; J < K; J++) G[J] = q[Math.random() * g | 0];
|
|
54
|
+
return G.join("");
|
|
55
|
+
};
|
|
56
|
+
if (g == null) return Y;
|
|
57
|
+
if (q.includes(J)) throw new InvalidArgumentError({
|
|
58
|
+
argument: "separator",
|
|
59
|
+
message: `The separator "${J}" must not be part of the alphabet "${q}".`
|
|
60
|
+
});
|
|
61
|
+
return () => `${g}${J}${Y()}`;
|
|
62
|
+
};
|
|
63
|
+
createIdGenerator();
|
|
64
|
+
function getRuntimeEnvironmentUserAgent(g = globalThis) {
|
|
65
|
+
return g.window ? "runtime/browser" : g.navigator?.userAgent ? `runtime/${g.navigator.userAgent.toLowerCase()}` : g.process?.versions?.node ? `runtime/node.js/${g.process.version.substring(0)}` : g.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
|
|
66
|
+
}
|
|
67
|
+
function normalizeHeaders(g) {
|
|
68
|
+
if (g == null) return {};
|
|
69
|
+
let G = {};
|
|
70
|
+
if (g instanceof Headers) g.forEach((g, K) => {
|
|
71
|
+
G[K.toLowerCase()] = g;
|
|
72
|
+
});
|
|
73
|
+
else {
|
|
74
|
+
Array.isArray(g) || (g = Object.entries(g));
|
|
75
|
+
for (let [K, q] of g) q != null && (G[K.toLowerCase()] = q);
|
|
76
|
+
}
|
|
77
|
+
return G;
|
|
78
|
+
}
|
|
79
|
+
function withUserAgentSuffix(g, ...G) {
|
|
80
|
+
let K = new Headers(normalizeHeaders(g)), q = K.get("user-agent") || "";
|
|
81
|
+
return K.set("user-agent", [q, ...G].filter(Boolean).join(" ")), Object.fromEntries(K.entries());
|
|
82
|
+
}
|
|
83
|
+
var suspectProtoRx = /"__proto__"\s*:/, suspectConstructorRx = /"constructor"\s*:/;
|
|
84
|
+
function _parse(g) {
|
|
85
|
+
let G = JSON.parse(g);
|
|
86
|
+
return typeof G != "object" || !G || suspectProtoRx.test(g) === !1 && suspectConstructorRx.test(g) === !1 ? G : filter(G);
|
|
87
|
+
}
|
|
88
|
+
function filter(g) {
|
|
89
|
+
let G = [g];
|
|
90
|
+
for (; G.length;) {
|
|
91
|
+
let g = G;
|
|
92
|
+
G = [];
|
|
93
|
+
for (let K of g) {
|
|
94
|
+
if (Object.prototype.hasOwnProperty.call(K, "__proto__") || Object.prototype.hasOwnProperty.call(K, "constructor") && Object.prototype.hasOwnProperty.call(K.constructor, "prototype")) throw SyntaxError("Object contains forbidden prototype property");
|
|
95
|
+
for (let g in K) {
|
|
96
|
+
let q = K[g];
|
|
97
|
+
q && typeof q == "object" && G.push(q);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return g;
|
|
102
|
+
}
|
|
103
|
+
function secureJsonParse(g) {
|
|
104
|
+
let { stackTraceLimit: G } = Error;
|
|
105
|
+
try {
|
|
106
|
+
Error.stackTraceLimit = 0;
|
|
107
|
+
} catch {
|
|
108
|
+
return _parse(g);
|
|
109
|
+
}
|
|
110
|
+
try {
|
|
111
|
+
return _parse(g);
|
|
112
|
+
} finally {
|
|
113
|
+
Error.stackTraceLimit = G;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function addAdditionalPropertiesToJsonSchema(g) {
|
|
117
|
+
if (g.type === "object" || Array.isArray(g.type) && g.type.includes("object")) {
|
|
118
|
+
g.additionalProperties = !1;
|
|
119
|
+
let { properties: G } = g;
|
|
120
|
+
if (G != null) for (let g of Object.keys(G)) G[g] = visit(G[g]);
|
|
121
|
+
}
|
|
122
|
+
g.items != null && (g.items = Array.isArray(g.items) ? g.items.map(visit) : visit(g.items)), g.anyOf != null && (g.anyOf = g.anyOf.map(visit)), g.allOf != null && (g.allOf = g.allOf.map(visit)), g.oneOf != null && (g.oneOf = g.oneOf.map(visit));
|
|
123
|
+
let { definitions: G } = g;
|
|
124
|
+
if (G != null) for (let g of Object.keys(G)) G[g] = visit(G[g]);
|
|
125
|
+
return g;
|
|
126
|
+
}
|
|
127
|
+
function visit(g) {
|
|
128
|
+
return typeof g == "boolean" ? g : addAdditionalPropertiesToJsonSchema(g);
|
|
129
|
+
}
|
|
130
|
+
var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use"), defaultOptions = {
|
|
131
|
+
name: void 0,
|
|
132
|
+
$refStrategy: "root",
|
|
133
|
+
basePath: ["#"],
|
|
134
|
+
effectStrategy: "input",
|
|
135
|
+
pipeStrategy: "all",
|
|
136
|
+
dateStrategy: "format:date-time",
|
|
137
|
+
mapStrategy: "entries",
|
|
138
|
+
removeAdditionalStrategy: "passthrough",
|
|
139
|
+
allowedAdditionalProperties: !0,
|
|
140
|
+
rejectedAdditionalProperties: !1,
|
|
141
|
+
definitionPath: "definitions",
|
|
142
|
+
strictUnions: !1,
|
|
143
|
+
definitions: {},
|
|
144
|
+
errorMessages: !1,
|
|
145
|
+
patternStrategy: "escape",
|
|
146
|
+
applyRegexFlags: !1,
|
|
147
|
+
emailStrategy: "format:email",
|
|
148
|
+
base64Strategy: "contentEncoding:base64",
|
|
149
|
+
nameStrategy: "ref"
|
|
150
|
+
}, getDefaultOptions = (g) => typeof g == "string" ? {
|
|
151
|
+
...defaultOptions,
|
|
152
|
+
name: g
|
|
153
|
+
} : {
|
|
154
|
+
...defaultOptions,
|
|
155
|
+
...g
|
|
156
|
+
};
|
|
157
|
+
function parseAnyDef() {
|
|
158
|
+
return {};
|
|
159
|
+
}
|
|
160
|
+
function parseArrayDef(g, G) {
|
|
161
|
+
let K = { type: "array" };
|
|
162
|
+
return g.type?._def && g.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny && (K.items = parseDef(g.type._def, {
|
|
163
|
+
...G,
|
|
164
|
+
currentPath: [...G.currentPath, "items"]
|
|
165
|
+
})), g.minLength && (K.minItems = g.minLength.value), g.maxLength && (K.maxItems = g.maxLength.value), g.exactLength && (K.minItems = g.exactLength.value, K.maxItems = g.exactLength.value), K;
|
|
166
|
+
}
|
|
167
|
+
function parseBigintDef(g) {
|
|
168
|
+
let G = {
|
|
169
|
+
type: "integer",
|
|
170
|
+
format: "int64"
|
|
171
|
+
};
|
|
172
|
+
if (!g.checks) return G;
|
|
173
|
+
for (let K of g.checks) switch (K.kind) {
|
|
174
|
+
case "min":
|
|
175
|
+
K.inclusive ? G.minimum = K.value : G.exclusiveMinimum = K.value;
|
|
176
|
+
break;
|
|
177
|
+
case "max":
|
|
178
|
+
K.inclusive ? G.maximum = K.value : G.exclusiveMaximum = K.value;
|
|
179
|
+
break;
|
|
180
|
+
case "multipleOf":
|
|
181
|
+
G.multipleOf = K.value;
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
return G;
|
|
185
|
+
}
|
|
186
|
+
function parseBooleanDef() {
|
|
187
|
+
return { type: "boolean" };
|
|
188
|
+
}
|
|
189
|
+
function parseBrandedDef(g, G) {
|
|
190
|
+
return parseDef(g.type._def, G);
|
|
191
|
+
}
|
|
192
|
+
var parseCatchDef = (g, G) => parseDef(g.innerType._def, G);
|
|
193
|
+
function parseDateDef(g, G, K) {
|
|
194
|
+
let q = K ?? G.dateStrategy;
|
|
195
|
+
if (Array.isArray(q)) return { anyOf: q.map((K, q) => parseDateDef(g, G, K)) };
|
|
196
|
+
switch (q) {
|
|
197
|
+
case "string":
|
|
198
|
+
case "format:date-time": return {
|
|
199
|
+
type: "string",
|
|
200
|
+
format: "date-time"
|
|
201
|
+
};
|
|
202
|
+
case "format:date": return {
|
|
203
|
+
type: "string",
|
|
204
|
+
format: "date"
|
|
205
|
+
};
|
|
206
|
+
case "integer": return integerDateParser(g);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
var integerDateParser = (g) => {
|
|
210
|
+
let G = {
|
|
211
|
+
type: "integer",
|
|
212
|
+
format: "unix-time"
|
|
213
|
+
};
|
|
214
|
+
for (let K of g.checks) switch (K.kind) {
|
|
215
|
+
case "min":
|
|
216
|
+
G.minimum = K.value;
|
|
217
|
+
break;
|
|
218
|
+
case "max":
|
|
219
|
+
G.maximum = K.value;
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
return G;
|
|
223
|
+
};
|
|
224
|
+
function parseDefaultDef(g, G) {
|
|
225
|
+
return {
|
|
226
|
+
...parseDef(g.innerType._def, G),
|
|
227
|
+
default: g.defaultValue()
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function parseEffectsDef(g, G) {
|
|
231
|
+
return G.effectStrategy === "input" ? parseDef(g.schema._def, G) : parseAnyDef();
|
|
232
|
+
}
|
|
233
|
+
function parseEnumDef(g) {
|
|
234
|
+
return {
|
|
235
|
+
type: "string",
|
|
236
|
+
enum: Array.from(g.values)
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
var isJsonSchema7AllOfType = (g) => "type" in g && g.type === "string" ? !1 : "allOf" in g;
|
|
240
|
+
function parseIntersectionDef(g, G) {
|
|
241
|
+
let K = [parseDef(g.left._def, {
|
|
242
|
+
...G,
|
|
243
|
+
currentPath: [
|
|
244
|
+
...G.currentPath,
|
|
245
|
+
"allOf",
|
|
246
|
+
"0"
|
|
247
|
+
]
|
|
248
|
+
}), parseDef(g.right._def, {
|
|
249
|
+
...G,
|
|
250
|
+
currentPath: [
|
|
251
|
+
...G.currentPath,
|
|
252
|
+
"allOf",
|
|
253
|
+
"1"
|
|
254
|
+
]
|
|
255
|
+
})].filter((g) => !!g), q = [];
|
|
256
|
+
return K.forEach((g) => {
|
|
257
|
+
if (isJsonSchema7AllOfType(g)) q.push(...g.allOf);
|
|
258
|
+
else {
|
|
259
|
+
let G = g;
|
|
260
|
+
if ("additionalProperties" in g && g.additionalProperties === !1) {
|
|
261
|
+
let { additionalProperties: K, ...q } = g;
|
|
262
|
+
G = q;
|
|
263
|
+
}
|
|
264
|
+
q.push(G);
|
|
265
|
+
}
|
|
266
|
+
}), q.length ? { allOf: q } : void 0;
|
|
267
|
+
}
|
|
268
|
+
function parseLiteralDef(g) {
|
|
269
|
+
let G = typeof g.value;
|
|
270
|
+
return G !== "bigint" && G !== "number" && G !== "boolean" && G !== "string" ? { type: Array.isArray(g.value) ? "array" : "object" } : {
|
|
271
|
+
type: G === "bigint" ? "integer" : G,
|
|
272
|
+
const: g.value
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
var emojiRegex = void 0, zodPatterns = {
|
|
276
|
+
cuid: /^[cC][^\s-]{8,}$/,
|
|
277
|
+
cuid2: /^[0-9a-z]+$/,
|
|
278
|
+
ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
|
|
279
|
+
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
|
|
280
|
+
emoji: () => (emojiRegex === void 0 && (emojiRegex = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), emojiRegex),
|
|
281
|
+
uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
|
|
282
|
+
ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
|
|
283
|
+
ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
|
|
284
|
+
ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
|
|
285
|
+
ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
|
|
286
|
+
base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
|
|
287
|
+
base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
288
|
+
nanoid: /^[a-zA-Z0-9_-]{21}$/,
|
|
289
|
+
jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
|
|
290
|
+
};
|
|
291
|
+
function parseStringDef(g, G) {
|
|
292
|
+
let K = { type: "string" };
|
|
293
|
+
if (g.checks) for (let q of g.checks) switch (q.kind) {
|
|
294
|
+
case "min":
|
|
295
|
+
K.minLength = typeof K.minLength == "number" ? Math.max(K.minLength, q.value) : q.value;
|
|
296
|
+
break;
|
|
297
|
+
case "max":
|
|
298
|
+
K.maxLength = typeof K.maxLength == "number" ? Math.min(K.maxLength, q.value) : q.value;
|
|
299
|
+
break;
|
|
300
|
+
case "email":
|
|
301
|
+
switch (G.emailStrategy) {
|
|
302
|
+
case "format:email":
|
|
303
|
+
addFormat(K, "email", q.message, G);
|
|
304
|
+
break;
|
|
305
|
+
case "format:idn-email":
|
|
306
|
+
addFormat(K, "idn-email", q.message, G);
|
|
307
|
+
break;
|
|
308
|
+
case "pattern:zod":
|
|
309
|
+
addPattern(K, zodPatterns.email, q.message, G);
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
break;
|
|
313
|
+
case "url":
|
|
314
|
+
addFormat(K, "uri", q.message, G);
|
|
315
|
+
break;
|
|
316
|
+
case "uuid":
|
|
317
|
+
addFormat(K, "uuid", q.message, G);
|
|
318
|
+
break;
|
|
319
|
+
case "regex":
|
|
320
|
+
addPattern(K, q.regex, q.message, G);
|
|
321
|
+
break;
|
|
322
|
+
case "cuid":
|
|
323
|
+
addPattern(K, zodPatterns.cuid, q.message, G);
|
|
324
|
+
break;
|
|
325
|
+
case "cuid2":
|
|
326
|
+
addPattern(K, zodPatterns.cuid2, q.message, G);
|
|
327
|
+
break;
|
|
328
|
+
case "startsWith":
|
|
329
|
+
addPattern(K, RegExp(`^${escapeLiteralCheckValue(q.value, G)}`), q.message, G);
|
|
330
|
+
break;
|
|
331
|
+
case "endsWith":
|
|
332
|
+
addPattern(K, RegExp(`${escapeLiteralCheckValue(q.value, G)}$`), q.message, G);
|
|
333
|
+
break;
|
|
334
|
+
case "datetime":
|
|
335
|
+
addFormat(K, "date-time", q.message, G);
|
|
336
|
+
break;
|
|
337
|
+
case "date":
|
|
338
|
+
addFormat(K, "date", q.message, G);
|
|
339
|
+
break;
|
|
340
|
+
case "time":
|
|
341
|
+
addFormat(K, "time", q.message, G);
|
|
342
|
+
break;
|
|
343
|
+
case "duration":
|
|
344
|
+
addFormat(K, "duration", q.message, G);
|
|
345
|
+
break;
|
|
346
|
+
case "length":
|
|
347
|
+
K.minLength = typeof K.minLength == "number" ? Math.max(K.minLength, q.value) : q.value, K.maxLength = typeof K.maxLength == "number" ? Math.min(K.maxLength, q.value) : q.value;
|
|
348
|
+
break;
|
|
349
|
+
case "includes":
|
|
350
|
+
addPattern(K, RegExp(escapeLiteralCheckValue(q.value, G)), q.message, G);
|
|
351
|
+
break;
|
|
352
|
+
case "ip":
|
|
353
|
+
q.version !== "v6" && addFormat(K, "ipv4", q.message, G), q.version !== "v4" && addFormat(K, "ipv6", q.message, G);
|
|
354
|
+
break;
|
|
355
|
+
case "base64url":
|
|
356
|
+
addPattern(K, zodPatterns.base64url, q.message, G);
|
|
357
|
+
break;
|
|
358
|
+
case "jwt":
|
|
359
|
+
addPattern(K, zodPatterns.jwt, q.message, G);
|
|
360
|
+
break;
|
|
361
|
+
case "cidr":
|
|
362
|
+
q.version !== "v6" && addPattern(K, zodPatterns.ipv4Cidr, q.message, G), q.version !== "v4" && addPattern(K, zodPatterns.ipv6Cidr, q.message, G);
|
|
363
|
+
break;
|
|
364
|
+
case "emoji":
|
|
365
|
+
addPattern(K, zodPatterns.emoji(), q.message, G);
|
|
366
|
+
break;
|
|
367
|
+
case "ulid":
|
|
368
|
+
addPattern(K, zodPatterns.ulid, q.message, G);
|
|
369
|
+
break;
|
|
370
|
+
case "base64":
|
|
371
|
+
switch (G.base64Strategy) {
|
|
372
|
+
case "format:binary":
|
|
373
|
+
addFormat(K, "binary", q.message, G);
|
|
374
|
+
break;
|
|
375
|
+
case "contentEncoding:base64":
|
|
376
|
+
K.contentEncoding = "base64";
|
|
377
|
+
break;
|
|
378
|
+
case "pattern:zod":
|
|
379
|
+
addPattern(K, zodPatterns.base64, q.message, G);
|
|
380
|
+
break;
|
|
381
|
+
}
|
|
382
|
+
break;
|
|
383
|
+
case "nanoid": addPattern(K, zodPatterns.nanoid, q.message, G);
|
|
384
|
+
case "toLowerCase":
|
|
385
|
+
case "toUpperCase":
|
|
386
|
+
case "trim": break;
|
|
387
|
+
default:
|
|
388
|
+
}
|
|
389
|
+
return K;
|
|
390
|
+
}
|
|
391
|
+
function escapeLiteralCheckValue(g, G) {
|
|
392
|
+
return G.patternStrategy === "escape" ? escapeNonAlphaNumeric(g) : g;
|
|
393
|
+
}
|
|
394
|
+
var ALPHA_NUMERIC = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
395
|
+
function escapeNonAlphaNumeric(g) {
|
|
396
|
+
let G = "";
|
|
397
|
+
for (let K = 0; K < g.length; K++) ALPHA_NUMERIC.has(g[K]) || (G += "\\"), G += g[K];
|
|
398
|
+
return G;
|
|
399
|
+
}
|
|
400
|
+
function addFormat(g, G, K, q) {
|
|
401
|
+
g.format || g.anyOf?.some((g) => g.format) ? (g.anyOf ||= [], g.format && (g.anyOf.push({ format: g.format }), delete g.format), g.anyOf.push({
|
|
402
|
+
format: G,
|
|
403
|
+
...K && q.errorMessages && { errorMessage: { format: K } }
|
|
404
|
+
})) : g.format = G;
|
|
405
|
+
}
|
|
406
|
+
function addPattern(g, G, K, q) {
|
|
407
|
+
g.pattern || g.allOf?.some((g) => g.pattern) ? (g.allOf ||= [], g.pattern && (g.allOf.push({ pattern: g.pattern }), delete g.pattern), g.allOf.push({
|
|
408
|
+
pattern: stringifyRegExpWithFlags(G, q),
|
|
409
|
+
...K && q.errorMessages && { errorMessage: { pattern: K } }
|
|
410
|
+
})) : g.pattern = stringifyRegExpWithFlags(G, q);
|
|
411
|
+
}
|
|
412
|
+
function stringifyRegExpWithFlags(g, G) {
|
|
413
|
+
if (!G.applyRegexFlags || !g.flags) return g.source;
|
|
414
|
+
let K = {
|
|
415
|
+
i: g.flags.includes("i"),
|
|
416
|
+
m: g.flags.includes("m"),
|
|
417
|
+
s: g.flags.includes("s")
|
|
418
|
+
}, q = K.i ? g.source.toLowerCase() : g.source, J = "", Y = !1, X = !1, Z = !1;
|
|
419
|
+
for (let g = 0; g < q.length; g++) {
|
|
420
|
+
if (Y) {
|
|
421
|
+
J += q[g], Y = !1;
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
if (K.i) {
|
|
425
|
+
if (X) {
|
|
426
|
+
if (q[g].match(/[a-z]/)) {
|
|
427
|
+
Z ? (J += q[g], J += `${q[g - 2]}-${q[g]}`.toUpperCase(), Z = !1) : q[g + 1] === "-" && q[g + 2]?.match(/[a-z]/) ? (J += q[g], Z = !0) : J += `${q[g]}${q[g].toUpperCase()}`;
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
} else if (q[g].match(/[a-z]/)) {
|
|
431
|
+
J += `[${q[g]}${q[g].toUpperCase()}]`;
|
|
432
|
+
continue;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
if (K.m) {
|
|
436
|
+
if (q[g] === "^") {
|
|
437
|
+
J += "(^|(?<=[\r\n]))";
|
|
438
|
+
continue;
|
|
439
|
+
} else if (q[g] === "$") {
|
|
440
|
+
J += "($|(?=[\r\n]))";
|
|
441
|
+
continue;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
if (K.s && q[g] === ".") {
|
|
445
|
+
J += X ? `${q[g]}\r
|
|
446
|
+
` : `[${q[g]}\r
|
|
447
|
+
]`;
|
|
448
|
+
continue;
|
|
449
|
+
}
|
|
450
|
+
J += q[g], q[g] === "\\" ? Y = !0 : X && q[g] === "]" ? X = !1 : !X && q[g] === "[" && (X = !0);
|
|
451
|
+
}
|
|
452
|
+
try {
|
|
453
|
+
new RegExp(J);
|
|
454
|
+
} catch {
|
|
455
|
+
return console.warn(`Could not convert regex pattern at ${G.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`), g.source;
|
|
456
|
+
}
|
|
457
|
+
return J;
|
|
458
|
+
}
|
|
459
|
+
function parseRecordDef(g, G) {
|
|
460
|
+
let K = {
|
|
461
|
+
type: "object",
|
|
462
|
+
additionalProperties: parseDef(g.valueType._def, {
|
|
463
|
+
...G,
|
|
464
|
+
currentPath: [...G.currentPath, "additionalProperties"]
|
|
465
|
+
}) ?? G.allowedAdditionalProperties
|
|
466
|
+
};
|
|
467
|
+
if (g.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && g.keyType._def.checks?.length) {
|
|
468
|
+
let { type: q, ...J } = parseStringDef(g.keyType._def, G);
|
|
469
|
+
return {
|
|
470
|
+
...K,
|
|
471
|
+
propertyNames: J
|
|
472
|
+
};
|
|
473
|
+
} else if (g.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {
|
|
474
|
+
...K,
|
|
475
|
+
propertyNames: { enum: g.keyType._def.values }
|
|
476
|
+
};
|
|
477
|
+
else if (g.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && g.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && g.keyType._def.type._def.checks?.length) {
|
|
478
|
+
let { type: q, ...J } = parseBrandedDef(g.keyType._def, G);
|
|
479
|
+
return {
|
|
480
|
+
...K,
|
|
481
|
+
propertyNames: J
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
return K;
|
|
485
|
+
}
|
|
486
|
+
function parseMapDef(g, G) {
|
|
487
|
+
return G.mapStrategy === "record" ? parseRecordDef(g, G) : {
|
|
488
|
+
type: "array",
|
|
489
|
+
maxItems: 125,
|
|
490
|
+
items: {
|
|
491
|
+
type: "array",
|
|
492
|
+
items: [parseDef(g.keyType._def, {
|
|
493
|
+
...G,
|
|
494
|
+
currentPath: [
|
|
495
|
+
...G.currentPath,
|
|
496
|
+
"items",
|
|
497
|
+
"items",
|
|
498
|
+
"0"
|
|
499
|
+
]
|
|
500
|
+
}) || parseAnyDef(), parseDef(g.valueType._def, {
|
|
501
|
+
...G,
|
|
502
|
+
currentPath: [
|
|
503
|
+
...G.currentPath,
|
|
504
|
+
"items",
|
|
505
|
+
"items",
|
|
506
|
+
"1"
|
|
507
|
+
]
|
|
508
|
+
}) || parseAnyDef()],
|
|
509
|
+
minItems: 2,
|
|
510
|
+
maxItems: 2
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
function parseNativeEnumDef(g) {
|
|
515
|
+
let G = g.values, K = Object.keys(g.values).filter((g) => typeof G[G[g]] != "number").map((g) => G[g]), q = Array.from(new Set(K.map((g) => typeof g)));
|
|
516
|
+
return {
|
|
517
|
+
type: q.length === 1 ? q[0] === "string" ? "string" : "number" : ["string", "number"],
|
|
518
|
+
enum: K
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
function parseNeverDef() {
|
|
522
|
+
return { not: parseAnyDef() };
|
|
523
|
+
}
|
|
524
|
+
function parseNullDef() {
|
|
525
|
+
return { type: "null" };
|
|
526
|
+
}
|
|
527
|
+
var primitiveMappings = {
|
|
528
|
+
ZodString: "string",
|
|
529
|
+
ZodNumber: "number",
|
|
530
|
+
ZodBigInt: "integer",
|
|
531
|
+
ZodBoolean: "boolean",
|
|
532
|
+
ZodNull: "null"
|
|
533
|
+
};
|
|
534
|
+
function parseUnionDef(g, G) {
|
|
535
|
+
let K = g.options instanceof Map ? Array.from(g.options.values()) : g.options;
|
|
536
|
+
if (K.every((g) => g._def.typeName in primitiveMappings && (!g._def.checks || !g._def.checks.length))) {
|
|
537
|
+
let g = K.reduce((g, G) => {
|
|
538
|
+
let K = primitiveMappings[G._def.typeName];
|
|
539
|
+
return K && !g.includes(K) ? [...g, K] : g;
|
|
540
|
+
}, []);
|
|
541
|
+
return { type: g.length > 1 ? g : g[0] };
|
|
542
|
+
} else if (K.every((g) => g._def.typeName === "ZodLiteral" && !g.description)) {
|
|
543
|
+
let g = K.reduce((g, G) => {
|
|
544
|
+
let K = typeof G._def.value;
|
|
545
|
+
switch (K) {
|
|
546
|
+
case "string":
|
|
547
|
+
case "number":
|
|
548
|
+
case "boolean": return [...g, K];
|
|
549
|
+
case "bigint": return [...g, "integer"];
|
|
550
|
+
case "object": if (G._def.value === null) return [...g, "null"];
|
|
551
|
+
case "symbol":
|
|
552
|
+
case "undefined":
|
|
553
|
+
case "function":
|
|
554
|
+
default: return g;
|
|
555
|
+
}
|
|
556
|
+
}, []);
|
|
557
|
+
if (g.length === K.length) {
|
|
558
|
+
let G = g.filter((g, G, K) => K.indexOf(g) === G);
|
|
559
|
+
return {
|
|
560
|
+
type: G.length > 1 ? G : G[0],
|
|
561
|
+
enum: K.reduce((g, G) => g.includes(G._def.value) ? g : [...g, G._def.value], [])
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
} else if (K.every((g) => g._def.typeName === "ZodEnum")) return {
|
|
565
|
+
type: "string",
|
|
566
|
+
enum: K.reduce((g, G) => [...g, ...G._def.values.filter((G) => !g.includes(G))], [])
|
|
567
|
+
};
|
|
568
|
+
return asAnyOf(g, G);
|
|
569
|
+
}
|
|
570
|
+
var asAnyOf = (g, G) => {
|
|
571
|
+
let K = (g.options instanceof Map ? Array.from(g.options.values()) : g.options).map((g, K) => parseDef(g._def, {
|
|
572
|
+
...G,
|
|
573
|
+
currentPath: [
|
|
574
|
+
...G.currentPath,
|
|
575
|
+
"anyOf",
|
|
576
|
+
`${K}`
|
|
577
|
+
]
|
|
578
|
+
})).filter((g) => !!g && (!G.strictUnions || typeof g == "object" && Object.keys(g).length > 0));
|
|
579
|
+
return K.length ? { anyOf: K } : void 0;
|
|
580
|
+
};
|
|
581
|
+
function parseNullableDef(g, G) {
|
|
582
|
+
if ([
|
|
583
|
+
"ZodString",
|
|
584
|
+
"ZodNumber",
|
|
585
|
+
"ZodBigInt",
|
|
586
|
+
"ZodBoolean",
|
|
587
|
+
"ZodNull"
|
|
588
|
+
].includes(g.innerType._def.typeName) && (!g.innerType._def.checks || !g.innerType._def.checks.length)) return { type: [primitiveMappings[g.innerType._def.typeName], "null"] };
|
|
589
|
+
let K = parseDef(g.innerType._def, {
|
|
590
|
+
...G,
|
|
591
|
+
currentPath: [
|
|
592
|
+
...G.currentPath,
|
|
593
|
+
"anyOf",
|
|
594
|
+
"0"
|
|
595
|
+
]
|
|
596
|
+
});
|
|
597
|
+
return K && { anyOf: [K, { type: "null" }] };
|
|
598
|
+
}
|
|
599
|
+
function parseNumberDef(g) {
|
|
600
|
+
let G = { type: "number" };
|
|
601
|
+
if (!g.checks) return G;
|
|
602
|
+
for (let K of g.checks) switch (K.kind) {
|
|
603
|
+
case "int":
|
|
604
|
+
G.type = "integer";
|
|
605
|
+
break;
|
|
606
|
+
case "min":
|
|
607
|
+
K.inclusive ? G.minimum = K.value : G.exclusiveMinimum = K.value;
|
|
608
|
+
break;
|
|
609
|
+
case "max":
|
|
610
|
+
K.inclusive ? G.maximum = K.value : G.exclusiveMaximum = K.value;
|
|
611
|
+
break;
|
|
612
|
+
case "multipleOf":
|
|
613
|
+
G.multipleOf = K.value;
|
|
614
|
+
break;
|
|
615
|
+
}
|
|
616
|
+
return G;
|
|
617
|
+
}
|
|
618
|
+
function parseObjectDef(g, G) {
|
|
619
|
+
let K = {
|
|
620
|
+
type: "object",
|
|
621
|
+
properties: {}
|
|
622
|
+
}, q = [], J = g.shape();
|
|
623
|
+
for (let g in J) {
|
|
624
|
+
let Y = J[g];
|
|
625
|
+
if (Y === void 0 || Y._def === void 0) continue;
|
|
626
|
+
let X = safeIsOptional(Y), Z = parseDef(Y._def, {
|
|
627
|
+
...G,
|
|
628
|
+
currentPath: [
|
|
629
|
+
...G.currentPath,
|
|
630
|
+
"properties",
|
|
631
|
+
g
|
|
632
|
+
],
|
|
633
|
+
propertyPath: [
|
|
634
|
+
...G.currentPath,
|
|
635
|
+
"properties",
|
|
636
|
+
g
|
|
637
|
+
]
|
|
638
|
+
});
|
|
639
|
+
Z !== void 0 && (K.properties[g] = Z, X || q.push(g));
|
|
640
|
+
}
|
|
641
|
+
q.length && (K.required = q);
|
|
642
|
+
let Y = decideAdditionalProperties(g, G);
|
|
643
|
+
return Y !== void 0 && (K.additionalProperties = Y), K;
|
|
644
|
+
}
|
|
645
|
+
function decideAdditionalProperties(g, G) {
|
|
646
|
+
if (g.catchall._def.typeName !== "ZodNever") return parseDef(g.catchall._def, {
|
|
647
|
+
...G,
|
|
648
|
+
currentPath: [...G.currentPath, "additionalProperties"]
|
|
649
|
+
});
|
|
650
|
+
switch (g.unknownKeys) {
|
|
651
|
+
case "passthrough": return G.allowedAdditionalProperties;
|
|
652
|
+
case "strict": return G.rejectedAdditionalProperties;
|
|
653
|
+
case "strip": return G.removeAdditionalStrategy === "strict" ? G.allowedAdditionalProperties : G.rejectedAdditionalProperties;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
function safeIsOptional(g) {
|
|
657
|
+
try {
|
|
658
|
+
return g.isOptional();
|
|
659
|
+
} catch {
|
|
660
|
+
return !0;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
var parseOptionalDef = (g, G) => {
|
|
664
|
+
if (G.currentPath.toString() === G.propertyPath?.toString()) return parseDef(g.innerType._def, G);
|
|
665
|
+
let K = parseDef(g.innerType._def, {
|
|
666
|
+
...G,
|
|
667
|
+
currentPath: [
|
|
668
|
+
...G.currentPath,
|
|
669
|
+
"anyOf",
|
|
670
|
+
"1"
|
|
671
|
+
]
|
|
672
|
+
});
|
|
673
|
+
return K ? { anyOf: [{ not: parseAnyDef() }, K] } : parseAnyDef();
|
|
674
|
+
}, parsePipelineDef = (g, G) => {
|
|
675
|
+
if (G.pipeStrategy === "input") return parseDef(g.in._def, G);
|
|
676
|
+
if (G.pipeStrategy === "output") return parseDef(g.out._def, G);
|
|
677
|
+
let K = parseDef(g.in._def, {
|
|
678
|
+
...G,
|
|
679
|
+
currentPath: [
|
|
680
|
+
...G.currentPath,
|
|
681
|
+
"allOf",
|
|
682
|
+
"0"
|
|
683
|
+
]
|
|
684
|
+
});
|
|
685
|
+
return { allOf: [K, parseDef(g.out._def, {
|
|
686
|
+
...G,
|
|
687
|
+
currentPath: [
|
|
688
|
+
...G.currentPath,
|
|
689
|
+
"allOf",
|
|
690
|
+
K ? "1" : "0"
|
|
691
|
+
]
|
|
692
|
+
})].filter((g) => g !== void 0) };
|
|
693
|
+
};
|
|
694
|
+
function parsePromiseDef(g, G) {
|
|
695
|
+
return parseDef(g.type._def, G);
|
|
696
|
+
}
|
|
697
|
+
function parseSetDef(g, G) {
|
|
698
|
+
let K = {
|
|
699
|
+
type: "array",
|
|
700
|
+
uniqueItems: !0,
|
|
701
|
+
items: parseDef(g.valueType._def, {
|
|
702
|
+
...G,
|
|
703
|
+
currentPath: [...G.currentPath, "items"]
|
|
704
|
+
})
|
|
705
|
+
};
|
|
706
|
+
return g.minSize && (K.minItems = g.minSize.value), g.maxSize && (K.maxItems = g.maxSize.value), K;
|
|
707
|
+
}
|
|
708
|
+
function parseTupleDef(g, G) {
|
|
709
|
+
return g.rest ? {
|
|
710
|
+
type: "array",
|
|
711
|
+
minItems: g.items.length,
|
|
712
|
+
items: g.items.map((g, K) => parseDef(g._def, {
|
|
713
|
+
...G,
|
|
714
|
+
currentPath: [
|
|
715
|
+
...G.currentPath,
|
|
716
|
+
"items",
|
|
717
|
+
`${K}`
|
|
718
|
+
]
|
|
719
|
+
})).reduce((g, G) => G === void 0 ? g : [...g, G], []),
|
|
720
|
+
additionalItems: parseDef(g.rest._def, {
|
|
721
|
+
...G,
|
|
722
|
+
currentPath: [...G.currentPath, "additionalItems"]
|
|
723
|
+
})
|
|
724
|
+
} : {
|
|
725
|
+
type: "array",
|
|
726
|
+
minItems: g.items.length,
|
|
727
|
+
maxItems: g.items.length,
|
|
728
|
+
items: g.items.map((g, K) => parseDef(g._def, {
|
|
729
|
+
...G,
|
|
730
|
+
currentPath: [
|
|
731
|
+
...G.currentPath,
|
|
732
|
+
"items",
|
|
733
|
+
`${K}`
|
|
734
|
+
]
|
|
735
|
+
})).reduce((g, G) => G === void 0 ? g : [...g, G], [])
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
function parseUndefinedDef() {
|
|
739
|
+
return { not: parseAnyDef() };
|
|
740
|
+
}
|
|
741
|
+
function parseUnknownDef() {
|
|
742
|
+
return parseAnyDef();
|
|
743
|
+
}
|
|
744
|
+
var parseReadonlyDef = (g, G) => parseDef(g.innerType._def, G), selectParser = (g, G, K) => {
|
|
745
|
+
switch (G) {
|
|
746
|
+
case ZodFirstPartyTypeKind.ZodString: return parseStringDef(g, K);
|
|
747
|
+
case ZodFirstPartyTypeKind.ZodNumber: return parseNumberDef(g);
|
|
748
|
+
case ZodFirstPartyTypeKind.ZodObject: return parseObjectDef(g, K);
|
|
749
|
+
case ZodFirstPartyTypeKind.ZodBigInt: return parseBigintDef(g);
|
|
750
|
+
case ZodFirstPartyTypeKind.ZodBoolean: return parseBooleanDef();
|
|
751
|
+
case ZodFirstPartyTypeKind.ZodDate: return parseDateDef(g, K);
|
|
752
|
+
case ZodFirstPartyTypeKind.ZodUndefined: return parseUndefinedDef();
|
|
753
|
+
case ZodFirstPartyTypeKind.ZodNull: return parseNullDef();
|
|
754
|
+
case ZodFirstPartyTypeKind.ZodArray: return parseArrayDef(g, K);
|
|
755
|
+
case ZodFirstPartyTypeKind.ZodUnion:
|
|
756
|
+
case ZodFirstPartyTypeKind.ZodDiscriminatedUnion: return parseUnionDef(g, K);
|
|
757
|
+
case ZodFirstPartyTypeKind.ZodIntersection: return parseIntersectionDef(g, K);
|
|
758
|
+
case ZodFirstPartyTypeKind.ZodTuple: return parseTupleDef(g, K);
|
|
759
|
+
case ZodFirstPartyTypeKind.ZodRecord: return parseRecordDef(g, K);
|
|
760
|
+
case ZodFirstPartyTypeKind.ZodLiteral: return parseLiteralDef(g);
|
|
761
|
+
case ZodFirstPartyTypeKind.ZodEnum: return parseEnumDef(g);
|
|
762
|
+
case ZodFirstPartyTypeKind.ZodNativeEnum: return parseNativeEnumDef(g);
|
|
763
|
+
case ZodFirstPartyTypeKind.ZodNullable: return parseNullableDef(g, K);
|
|
764
|
+
case ZodFirstPartyTypeKind.ZodOptional: return parseOptionalDef(g, K);
|
|
765
|
+
case ZodFirstPartyTypeKind.ZodMap: return parseMapDef(g, K);
|
|
766
|
+
case ZodFirstPartyTypeKind.ZodSet: return parseSetDef(g, K);
|
|
767
|
+
case ZodFirstPartyTypeKind.ZodLazy: return () => g.getter()._def;
|
|
768
|
+
case ZodFirstPartyTypeKind.ZodPromise: return parsePromiseDef(g, K);
|
|
769
|
+
case ZodFirstPartyTypeKind.ZodNaN:
|
|
770
|
+
case ZodFirstPartyTypeKind.ZodNever: return parseNeverDef();
|
|
771
|
+
case ZodFirstPartyTypeKind.ZodEffects: return parseEffectsDef(g, K);
|
|
772
|
+
case ZodFirstPartyTypeKind.ZodAny: return parseAnyDef();
|
|
773
|
+
case ZodFirstPartyTypeKind.ZodUnknown: return parseUnknownDef();
|
|
774
|
+
case ZodFirstPartyTypeKind.ZodDefault: return parseDefaultDef(g, K);
|
|
775
|
+
case ZodFirstPartyTypeKind.ZodBranded: return parseBrandedDef(g, K);
|
|
776
|
+
case ZodFirstPartyTypeKind.ZodReadonly: return parseReadonlyDef(g, K);
|
|
777
|
+
case ZodFirstPartyTypeKind.ZodCatch: return parseCatchDef(g, K);
|
|
778
|
+
case ZodFirstPartyTypeKind.ZodPipeline: return parsePipelineDef(g, K);
|
|
779
|
+
case ZodFirstPartyTypeKind.ZodFunction:
|
|
780
|
+
case ZodFirstPartyTypeKind.ZodVoid:
|
|
781
|
+
case ZodFirstPartyTypeKind.ZodSymbol: return;
|
|
782
|
+
default: return /* @__PURE__ */ ((g) => void 0)(G);
|
|
783
|
+
}
|
|
784
|
+
}, getRelativePath = (g, G) => {
|
|
785
|
+
let K = 0;
|
|
786
|
+
for (; K < g.length && K < G.length && g[K] === G[K]; K++);
|
|
787
|
+
return [(g.length - K).toString(), ...G.slice(K)].join("/");
|
|
788
|
+
};
|
|
789
|
+
function parseDef(g, G, K = !1) {
|
|
790
|
+
let q = G.seen.get(g);
|
|
791
|
+
if (G.override) {
|
|
792
|
+
let J = G.override?.call(G, g, G, q, K);
|
|
793
|
+
if (J !== ignoreOverride) return J;
|
|
794
|
+
}
|
|
795
|
+
if (q && !K) {
|
|
796
|
+
let g = get$ref(q, G);
|
|
797
|
+
if (g !== void 0) return g;
|
|
798
|
+
}
|
|
799
|
+
let J = {
|
|
800
|
+
def: g,
|
|
801
|
+
path: G.currentPath,
|
|
802
|
+
jsonSchema: void 0
|
|
803
|
+
};
|
|
804
|
+
G.seen.set(g, J);
|
|
805
|
+
let Y = selectParser(g, g.typeName, G), X = typeof Y == "function" ? parseDef(Y(), G) : Y;
|
|
806
|
+
if (X && addMeta(g, G, X), G.postProcess) {
|
|
807
|
+
let K = G.postProcess(X, g, G);
|
|
808
|
+
return J.jsonSchema = X, K;
|
|
809
|
+
}
|
|
810
|
+
return J.jsonSchema = X, X;
|
|
811
|
+
}
|
|
812
|
+
var get$ref = (g, G) => {
|
|
813
|
+
switch (G.$refStrategy) {
|
|
814
|
+
case "root": return { $ref: g.path.join("/") };
|
|
815
|
+
case "relative": return { $ref: getRelativePath(G.currentPath, g.path) };
|
|
816
|
+
case "none":
|
|
817
|
+
case "seen": return g.path.length < G.currentPath.length && g.path.every((g, K) => G.currentPath[K] === g) ? (console.warn(`Recursive reference detected at ${G.currentPath.join("/")}! Defaulting to any`), parseAnyDef()) : G.$refStrategy === "seen" ? parseAnyDef() : void 0;
|
|
818
|
+
}
|
|
819
|
+
}, addMeta = (g, G, K) => (g.description && (K.description = g.description), K), getRefs = (g) => {
|
|
820
|
+
let G = getDefaultOptions(g), K = G.name === void 0 ? G.basePath : [
|
|
821
|
+
...G.basePath,
|
|
822
|
+
G.definitionPath,
|
|
823
|
+
G.name
|
|
824
|
+
];
|
|
825
|
+
return {
|
|
826
|
+
...G,
|
|
827
|
+
currentPath: K,
|
|
828
|
+
propertyPath: void 0,
|
|
829
|
+
seen: new Map(Object.entries(G.definitions).map(([g, K]) => [K._def, {
|
|
830
|
+
def: K._def,
|
|
831
|
+
path: [
|
|
832
|
+
...G.basePath,
|
|
833
|
+
G.definitionPath,
|
|
834
|
+
g
|
|
835
|
+
],
|
|
836
|
+
jsonSchema: void 0
|
|
837
|
+
}]))
|
|
838
|
+
};
|
|
839
|
+
}, zod3ToJsonSchema = (g, G) => {
|
|
840
|
+
let K = getRefs(G), q = typeof G == "object" && G.definitions ? Object.entries(G.definitions).reduce((g, [G, q]) => ({
|
|
841
|
+
...g,
|
|
842
|
+
[G]: parseDef(q._def, {
|
|
843
|
+
...K,
|
|
844
|
+
currentPath: [
|
|
845
|
+
...K.basePath,
|
|
846
|
+
K.definitionPath,
|
|
847
|
+
G
|
|
848
|
+
]
|
|
849
|
+
}, !0) ?? parseAnyDef()
|
|
850
|
+
}), {}) : void 0, J = typeof G == "string" ? G : G?.nameStrategy === "title" ? void 0 : G?.name, Y = parseDef(g._def, J === void 0 ? K : {
|
|
851
|
+
...K,
|
|
852
|
+
currentPath: [
|
|
853
|
+
...K.basePath,
|
|
854
|
+
K.definitionPath,
|
|
855
|
+
J
|
|
856
|
+
]
|
|
857
|
+
}, !1) ?? parseAnyDef(), X = typeof G == "object" && G.name !== void 0 && G.nameStrategy === "title" ? G.name : void 0;
|
|
858
|
+
X !== void 0 && (Y.title = X);
|
|
859
|
+
let Z = J === void 0 ? q ? {
|
|
860
|
+
...Y,
|
|
861
|
+
[K.definitionPath]: q
|
|
862
|
+
} : Y : {
|
|
863
|
+
$ref: [
|
|
864
|
+
...K.$refStrategy === "relative" ? [] : K.basePath,
|
|
865
|
+
K.definitionPath,
|
|
866
|
+
J
|
|
867
|
+
].join("/"),
|
|
868
|
+
[K.definitionPath]: {
|
|
869
|
+
...q,
|
|
870
|
+
[J]: Y
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
return Z.$schema = "http://json-schema.org/draft-07/schema#", Z;
|
|
874
|
+
}, schemaSymbol = Symbol.for("vercel.ai.schema");
|
|
875
|
+
function lazySchema(g) {
|
|
876
|
+
let G;
|
|
877
|
+
return () => (G ??= g(), G);
|
|
878
|
+
}
|
|
879
|
+
function jsonSchema(g, { validate: G } = {}) {
|
|
880
|
+
return {
|
|
881
|
+
[schemaSymbol]: !0,
|
|
882
|
+
_type: void 0,
|
|
883
|
+
get jsonSchema() {
|
|
884
|
+
return typeof g == "function" && (g = g()), g;
|
|
885
|
+
},
|
|
886
|
+
validate: G
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
function isSchema(g) {
|
|
890
|
+
return typeof g == "object" && !!g && schemaSymbol in g && g[schemaSymbol] === !0 && "jsonSchema" in g && "validate" in g;
|
|
891
|
+
}
|
|
892
|
+
function asSchema(g) {
|
|
893
|
+
return g == null ? jsonSchema({
|
|
894
|
+
properties: {},
|
|
895
|
+
additionalProperties: !1
|
|
896
|
+
}) : isSchema(g) ? g : "~standard" in g ? g["~standard"].vendor === "zod" ? zodSchema(g) : standardSchema(g) : g();
|
|
897
|
+
}
|
|
898
|
+
function standardSchema(g) {
|
|
899
|
+
return jsonSchema(() => addAdditionalPropertiesToJsonSchema(g["~standard"].jsonSchema.input({ target: "draft-07" })), { validate: async (G) => {
|
|
900
|
+
let K = await g["~standard"].validate(G);
|
|
901
|
+
return "value" in K ? {
|
|
902
|
+
success: !0,
|
|
903
|
+
value: K.value
|
|
904
|
+
} : {
|
|
905
|
+
success: !1,
|
|
906
|
+
error: new TypeValidationError({
|
|
907
|
+
value: G,
|
|
908
|
+
cause: K.issues
|
|
909
|
+
})
|
|
910
|
+
};
|
|
911
|
+
} });
|
|
912
|
+
}
|
|
913
|
+
function zod3Schema(g, G) {
|
|
914
|
+
let K = G?.useReferences ?? !1;
|
|
915
|
+
return jsonSchema(() => zod3ToJsonSchema(g, { $refStrategy: K ? "root" : "none" }), { validate: async (G) => {
|
|
916
|
+
let K = await g.safeParseAsync(G);
|
|
917
|
+
return K.success ? {
|
|
918
|
+
success: !0,
|
|
919
|
+
value: K.data
|
|
920
|
+
} : {
|
|
921
|
+
success: !1,
|
|
922
|
+
error: K.error
|
|
923
|
+
};
|
|
924
|
+
} });
|
|
925
|
+
}
|
|
926
|
+
function zod4Schema(g, G) {
|
|
927
|
+
let K = G?.useReferences ?? !1;
|
|
928
|
+
return jsonSchema(() => addAdditionalPropertiesToJsonSchema(toJSONSchema(g, {
|
|
929
|
+
target: "draft-7",
|
|
930
|
+
io: "input",
|
|
931
|
+
reused: K ? "ref" : "inline"
|
|
932
|
+
})), { validate: async (G) => {
|
|
933
|
+
let K = await safeParseAsync(g, G);
|
|
934
|
+
return K.success ? {
|
|
935
|
+
success: !0,
|
|
936
|
+
value: K.data
|
|
937
|
+
} : {
|
|
938
|
+
success: !1,
|
|
939
|
+
error: K.error
|
|
940
|
+
};
|
|
941
|
+
} });
|
|
942
|
+
}
|
|
943
|
+
function isZod4Schema(g) {
|
|
944
|
+
return "_zod" in g;
|
|
945
|
+
}
|
|
946
|
+
function zodSchema(g, G) {
|
|
947
|
+
return isZod4Schema(g) ? zod4Schema(g, G) : zod3Schema(g, G);
|
|
948
|
+
}
|
|
949
|
+
async function safeValidateTypes({ value: g, schema: G, context: K }) {
|
|
950
|
+
let J = asSchema(G);
|
|
951
|
+
try {
|
|
952
|
+
if (J.validate == null) return {
|
|
953
|
+
success: !0,
|
|
954
|
+
value: g,
|
|
955
|
+
rawValue: g
|
|
956
|
+
};
|
|
957
|
+
let G = await J.validate(g);
|
|
958
|
+
return G.success ? {
|
|
959
|
+
success: !0,
|
|
960
|
+
value: G.value,
|
|
961
|
+
rawValue: g
|
|
962
|
+
} : {
|
|
963
|
+
success: !1,
|
|
964
|
+
error: TypeValidationError.wrap({
|
|
965
|
+
value: g,
|
|
966
|
+
cause: G.error,
|
|
967
|
+
context: K
|
|
968
|
+
}),
|
|
969
|
+
rawValue: g
|
|
970
|
+
};
|
|
971
|
+
} catch (G) {
|
|
972
|
+
return {
|
|
973
|
+
success: !1,
|
|
974
|
+
error: TypeValidationError.wrap({
|
|
975
|
+
value: g,
|
|
976
|
+
cause: G,
|
|
977
|
+
context: K
|
|
978
|
+
}),
|
|
979
|
+
rawValue: g
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
async function safeParseJSON({ text: g, schema: G }) {
|
|
984
|
+
try {
|
|
985
|
+
let K = secureJsonParse(g);
|
|
986
|
+
return G == null ? {
|
|
987
|
+
success: !0,
|
|
988
|
+
value: K,
|
|
989
|
+
rawValue: K
|
|
990
|
+
} : await safeValidateTypes({
|
|
991
|
+
value: K,
|
|
992
|
+
schema: G
|
|
993
|
+
});
|
|
994
|
+
} catch (G) {
|
|
995
|
+
return {
|
|
996
|
+
success: !1,
|
|
997
|
+
error: JSONParseError.isInstance(G) ? G : new JSONParseError({
|
|
998
|
+
text: g,
|
|
999
|
+
cause: G
|
|
1000
|
+
}),
|
|
1001
|
+
rawValue: void 0
|
|
1002
|
+
};
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
async function resolve(g) {
|
|
1006
|
+
return typeof g == "function" && (g = g()), Promise.resolve(g);
|
|
1007
|
+
}
|
|
1008
|
+
export { DEFAULT_MAX_DOWNLOAD_SIZE, DownloadError, asSchema, createIdGenerator, getRuntimeEnvironmentUserAgent, jsonSchema, lazySchema, readResponseWithSizeLimit, resolve, safeParseJSON, safeValidateTypes, withUserAgentSuffix, zodSchema };
|