zudoku 0.44.0 → 0.45.0
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/app/entry.client.js +34 -21
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/main.js +7 -0
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/common.d.ts +420 -288
- package/dist/config/validators/common.js +10 -0
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +161 -108
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Markdown.d.ts +3 -1
- package/dist/lib/components/Markdown.js +8 -14
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/context/ZudokuContext.js +2 -3
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +2 -1
- package/dist/lib/core/ZudokuContext.d.ts +8 -0
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/oas/graphql/circular.js +23 -18
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +3 -0
- package/dist/lib/oas/parser/index.js +6 -1
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.js +3 -1
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +33 -3
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +2 -2
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -3
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +2 -2
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +4 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +11 -12
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +5 -1
- package/dist/lib/plugins/openapi/schema/utils.js +9 -5
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +4 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/shiki.d.ts +35 -0
- package/dist/lib/shiki.js +103 -0
- package/dist/lib/shiki.js.map +1 -0
- package/dist/lib/ui/Callout.js +1 -1
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +16 -0
- package/dist/lib/ui/CodeBlock.js +18 -0
- package/dist/lib/ui/CodeBlock.js.map +1 -0
- package/dist/lib/ui/SyntaxHighlight.d.ts +10 -15
- package/dist/lib/ui/SyntaxHighlight.js +12 -60
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +9 -3
- package/dist/lib/util/MdxComponents.js +9 -10
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +2 -0
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/config.js +34 -0
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-mdx.js +4 -11
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-shiki-register.d.ts +3 -0
- package/dist/vite/plugin-shiki-register.js +38 -0
- package/dist/vite/plugin-shiki-register.js.map +1 -0
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/AuthenticationPlugin-UNaAuxNo.js +90 -0
- package/lib/{AuthenticationPlugin-BlJsiGuX.js.map → AuthenticationPlugin-UNaAuxNo.js.map} +1 -1
- package/lib/{Button-BBNrKpQd.js → Button-Bdk_Ij3U.js} +3 -3
- package/lib/{Button-BBNrKpQd.js.map → Button-Bdk_Ij3U.js.map} +1 -1
- package/lib/{Callout-D3Ja4OPX.js → Callout-XadUe37J.js} +12 -12
- package/lib/{Callout-D3Ja4OPX.js.map → Callout-XadUe37J.js.map} +1 -1
- package/lib/{Card-BtheiD7j.js → Card-BlCYNw5W.js} +2 -2
- package/lib/{Card-BtheiD7j.js.map → Card-BlCYNw5W.js.map} +1 -1
- package/lib/{CategoryHeading-D06WK_Wo.js → CategoryHeading-DZi-Szor.js} +2 -2
- package/lib/{CategoryHeading-D06WK_Wo.js.map → CategoryHeading-DZi-Szor.js.map} +1 -1
- package/lib/{Dialog-ByYz4ABw.js → Dialog-CNf2oWXG.js} +2 -2
- package/lib/{Dialog-ByYz4ABw.js.map → Dialog-CNf2oWXG.js.map} +1 -1
- package/lib/{Drawer-CEwbkLDb.js → Drawer-BPBxzel2.js} +25 -25
- package/lib/{Drawer-CEwbkLDb.js.map → Drawer-BPBxzel2.js.map} +1 -1
- package/lib/Markdown-D96AphCL.js +7691 -0
- package/lib/Markdown-D96AphCL.js.map +1 -0
- package/lib/MdxPage-Sjv6y3cA.js +84 -0
- package/lib/{MdxPage-DlJaCSPf.js.map → MdxPage-Sjv6y3cA.js.map} +1 -1
- package/lib/{OasProvider-DHPC9PnR.js → OasProvider-CzRXrs_-.js} +4 -4
- package/lib/{OasProvider-DHPC9PnR.js.map → OasProvider-CzRXrs_-.js.map} +1 -1
- package/lib/{OperationList-C6Ky0zQa.js → OperationList-DefCF3ZI.js} +1737 -1757
- package/lib/{OperationList-C6Ky0zQa.js.map → OperationList-DefCF3ZI.js.map} +1 -1
- package/lib/{Pagination-C5Fi7z_v.js → Pagination-B89j9KJS.js} +4 -4
- package/lib/{Pagination-C5Fi7z_v.js.map → Pagination-B89j9KJS.js.map} +1 -1
- package/lib/RouteGuard-lkdEJoDV.js +732 -0
- package/lib/{RouteGuard-D2gX29iI.js.map → RouteGuard-lkdEJoDV.js.map} +1 -1
- package/lib/{SchemaList-Cu7rWQ_k.js → SchemaList-zHQ2Ekyw.js} +40 -41
- package/lib/{SchemaList-Cu7rWQ_k.js.map → SchemaList-zHQ2Ekyw.js.map} +1 -1
- package/lib/{SchemaView-Ci_CnNlv.js → SchemaView-CqF4oMU-.js} +120 -115
- package/lib/SchemaView-CqF4oMU-.js.map +1 -0
- package/lib/Select-HTio1oSE.js +211 -0
- package/lib/{Select-CYaEBIYK.js.map → Select-HTio1oSE.js.map} +1 -1
- package/lib/SlotletProvider-CTgIBRWg.js +257 -0
- package/lib/SlotletProvider-CTgIBRWg.js.map +1 -0
- package/lib/SyntaxHighlight-UxOF1xNb.js +9107 -0
- package/lib/SyntaxHighlight-UxOF1xNb.js.map +1 -0
- package/lib/{Toc-BnN4zBb3.js → Toc-Ax54Pw8S.js} +3 -3
- package/lib/{Toc-BnN4zBb3.js.map → Toc-Ax54Pw8S.js.map} +1 -1
- package/lib/{chunk-BAXFHI7N-BLTsN6tl.js → chunk-BAXFHI7N-C9WnHsLV.js} +510 -517
- package/lib/{chunk-BAXFHI7N-BLTsN6tl.js.map → chunk-BAXFHI7N-C9WnHsLV.js.map} +1 -1
- package/lib/{circular-P9P1oxbQ.js → circular-B_TODp4H.js} +1636 -1633
- package/lib/{circular-P9P1oxbQ.js.map → circular-B_TODp4H.js.map} +1 -1
- package/lib/{cn-qaFjX9_3.js → cn-CwJPJKOE.js} +28 -29
- package/lib/{cn-qaFjX9_3.js.map → cn-CwJPJKOE.js.map} +1 -1
- package/lib/{createServer-Iclzdx0h.js → createServer-CXd8q7nF.js} +3980 -3832
- package/lib/createServer-CXd8q7nF.js.map +1 -0
- package/lib/hook-BwOB_iZo.js +1442 -0
- package/lib/hook-BwOB_iZo.js.map +1 -0
- package/lib/{index-DwT-v3zK.js → index--oeBayMa.js} +2 -2
- package/lib/{index-DwT-v3zK.js.map → index--oeBayMa.js.map} +1 -1
- package/lib/{index-C56xKbMM.js → index-BY8J3gEh.js} +903 -953
- package/lib/index-BY8J3gEh.js.map +1 -0
- package/lib/{index-LNp6rxyU.js → index-BvvmIczU.js} +2 -2
- package/lib/{index-LNp6rxyU.js.map → index-BvvmIczU.js.map} +1 -1
- package/lib/index-CT2PstvH.js +4982 -0
- package/lib/{index-CzUOM_vE.js.map → index-CT2PstvH.js.map} +1 -1
- package/lib/{index-CuBIgTKC.js → index-CrcNWbel.js} +9 -9
- package/lib/{index-CuBIgTKC.js.map → index-CrcNWbel.js.map} +1 -1
- package/lib/{index-CPNSgwSb.js → index-Z13x6tPX.js} +5 -5
- package/lib/{index-CPNSgwSb.js.map → index-Z13x6tPX.js.map} +1 -1
- package/lib/{index-DcHeSvkE.js → index-zddirpDj.js} +581 -609
- package/lib/{index-DcHeSvkE.js.map → index-zddirpDj.js.map} +1 -1
- package/lib/invariant-DAFpPywt.js +48 -0
- package/lib/{invariant-Caa8-XvF.js.map → invariant-DAFpPywt.js.map} +1 -1
- package/lib/mutation-CL2MCRQL.js +196 -0
- package/lib/{mutation-Bq5bn7Hf.js.map → mutation-CL2MCRQL.js.map} +1 -1
- package/lib/processors/removeParameters.js +27 -28
- package/lib/processors/removeParameters.js.map +1 -1
- package/lib/processors/removePaths.js +17 -17
- package/lib/processors/removePaths.js.map +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +2 -2
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +2 -2
- package/lib/ui/Callout.js +7 -7
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +175 -175
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/CodeBlock.js +83 -0
- package/lib/ui/CodeBlock.js.map +1 -0
- package/lib/ui/Command.js +58 -58
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +1 -1
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +5 -6
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/util.js +1 -1
- package/lib/{useExposedProps-DmTJxEXG.js → useExposedProps-DG8J6ewJ.js} +2 -2
- package/lib/{useExposedProps-DmTJxEXG.js.map → useExposedProps-DG8J6ewJ.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +28 -31
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +64 -70
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +373 -382
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +7 -7
- package/lib/zudoku.hooks.js +2 -2
- package/lib/zudoku.plugin-api-catalog.js +45 -45
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +6 -6
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +25 -28
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +26 -27
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +107 -110
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/package.json +39 -28
- package/src/app/entry.client.tsx +40 -25
- package/src/app/main.css +54 -3
- package/src/app/main.tsx +8 -0
- package/src/lib/components/Header.tsx +1 -1
- package/src/lib/components/Markdown.tsx +29 -24
- package/src/lib/components/context/ZudokuContext.ts +2 -3
- package/src/lib/core/ZudokuContext.ts +5 -0
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/oas/graphql/circular.ts +27 -19
- package/src/lib/oas/parser/index.ts +6 -1
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -2
- package/src/lib/plugins/openapi/ParamInfos.tsx +3 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +36 -3
- package/src/lib/plugins/openapi/SidecarExamples.tsx +2 -2
- package/src/lib/plugins/openapi/playground/Headers.tsx +2 -2
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +22 -35
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +2 -2
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +5 -2
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +23 -17
- package/src/lib/plugins/openapi/schema/utils.ts +18 -6
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +6 -1
- package/src/lib/shiki.ts +133 -0
- package/src/lib/ui/Callout.tsx +1 -1
- package/src/lib/ui/CodeBlock.tsx +102 -0
- package/src/lib/ui/SyntaxHighlight.tsx +23 -182
- package/src/lib/util/MdxComponents.tsx +27 -14
- package/src/shiki/langs/abap.js +1 -0
- package/src/shiki/langs/actionscript-3.js +1 -0
- package/src/shiki/langs/ada.js +1 -0
- package/src/shiki/langs/angular-expression.js +1 -0
- package/src/shiki/langs/angular-html.js +1 -0
- package/src/shiki/langs/angular-inline-style.js +1 -0
- package/src/shiki/langs/angular-inline-template.js +1 -0
- package/src/shiki/langs/angular-let-declaration.js +1 -0
- package/src/shiki/langs/angular-template-blocks.js +1 -0
- package/src/shiki/langs/angular-template.js +1 -0
- package/src/shiki/langs/angular-ts.js +1 -0
- package/src/shiki/langs/apache.js +1 -0
- package/src/shiki/langs/apex.js +1 -0
- package/src/shiki/langs/apl.js +1 -0
- package/src/shiki/langs/applescript.js +1 -0
- package/src/shiki/langs/ara.js +1 -0
- package/src/shiki/langs/asciidoc.js +1 -0
- package/src/shiki/langs/asm.js +1 -0
- package/src/shiki/langs/astro.js +1 -0
- package/src/shiki/langs/awk.js +1 -0
- package/src/shiki/langs/ballerina.js +1 -0
- package/src/shiki/langs/bat.js +1 -0
- package/src/shiki/langs/beancount.js +1 -0
- package/src/shiki/langs/berry.js +1 -0
- package/src/shiki/langs/bibtex.js +1 -0
- package/src/shiki/langs/bicep.js +1 -0
- package/src/shiki/langs/blade.js +1 -0
- package/src/shiki/langs/bsl.js +1 -0
- package/src/shiki/langs/c.js +1 -0
- package/src/shiki/langs/cadence.js +1 -0
- package/src/shiki/langs/cairo.js +1 -0
- package/src/shiki/langs/clarity.js +1 -0
- package/src/shiki/langs/clojure.js +1 -0
- package/src/shiki/langs/cmake.js +1 -0
- package/src/shiki/langs/cobol.js +1 -0
- package/src/shiki/langs/codeowners.js +1 -0
- package/src/shiki/langs/codeql.js +1 -0
- package/src/shiki/langs/coffee.js +1 -0
- package/src/shiki/langs/common-lisp.js +1 -0
- package/src/shiki/langs/coq.js +1 -0
- package/src/shiki/langs/cpp-macro.js +1 -0
- package/src/shiki/langs/cpp.js +1 -0
- package/src/shiki/langs/crystal.js +1 -0
- package/src/shiki/langs/csharp.js +1 -0
- package/src/shiki/langs/css.js +1 -0
- package/src/shiki/langs/csv.js +1 -0
- package/src/shiki/langs/cue.js +1 -0
- package/src/shiki/langs/cypher.js +1 -0
- package/src/shiki/langs/d.js +1 -0
- package/src/shiki/langs/dart.js +1 -0
- package/src/shiki/langs/dax.js +1 -0
- package/src/shiki/langs/desktop.js +1 -0
- package/src/shiki/langs/diff.js +1 -0
- package/src/shiki/langs/docker.js +1 -0
- package/src/shiki/langs/dotenv.js +1 -0
- package/src/shiki/langs/dream-maker.js +1 -0
- package/src/shiki/langs/edge.js +1 -0
- package/src/shiki/langs/elixir.js +1 -0
- package/src/shiki/langs/elm.js +1 -0
- package/src/shiki/langs/emacs-lisp.js +1 -0
- package/src/shiki/langs/erb.js +1 -0
- package/src/shiki/langs/erlang.js +1 -0
- package/src/shiki/langs/es-tag-css.js +1 -0
- package/src/shiki/langs/es-tag-glsl.js +1 -0
- package/src/shiki/langs/es-tag-html.js +1 -0
- package/src/shiki/langs/es-tag-sql.js +1 -0
- package/src/shiki/langs/es-tag-xml.js +1 -0
- package/src/shiki/langs/fennel.js +1 -0
- package/src/shiki/langs/fish.js +1 -0
- package/src/shiki/langs/fluent.js +1 -0
- package/src/shiki/langs/fortran-fixed-form.js +1 -0
- package/src/shiki/langs/fortran-free-form.js +1 -0
- package/src/shiki/langs/fsharp.js +1 -0
- package/src/shiki/langs/gdresource.js +1 -0
- package/src/shiki/langs/gdscript.js +1 -0
- package/src/shiki/langs/gdshader.js +1 -0
- package/src/shiki/langs/genie.js +1 -0
- package/src/shiki/langs/gherkin.js +1 -0
- package/src/shiki/langs/git-commit.js +1 -0
- package/src/shiki/langs/git-rebase.js +1 -0
- package/src/shiki/langs/gleam.js +1 -0
- package/src/shiki/langs/glimmer-js.js +1 -0
- package/src/shiki/langs/glimmer-ts.js +1 -0
- package/src/shiki/langs/glsl.js +1 -0
- package/src/shiki/langs/gnuplot.js +1 -0
- package/src/shiki/langs/go.js +1 -0
- package/src/shiki/langs/graphql.js +1 -0
- package/src/shiki/langs/groovy.js +1 -0
- package/src/shiki/langs/hack.js +1 -0
- package/src/shiki/langs/haml.js +1 -0
- package/src/shiki/langs/handlebars.js +1 -0
- package/src/shiki/langs/haskell.js +1 -0
- package/src/shiki/langs/haxe.js +1 -0
- package/src/shiki/langs/hcl.js +1 -0
- package/src/shiki/langs/hjson.js +1 -0
- package/src/shiki/langs/hlsl.js +1 -0
- package/src/shiki/langs/html-derivative.js +1 -0
- package/src/shiki/langs/html.js +1 -0
- package/src/shiki/langs/http.js +1 -0
- package/src/shiki/langs/hxml.js +1 -0
- package/src/shiki/langs/hy.js +1 -0
- package/src/shiki/langs/imba.js +1 -0
- package/src/shiki/langs/ini.js +1 -0
- package/src/shiki/langs/java.js +1 -0
- package/src/shiki/langs/javascript.js +1 -0
- package/src/shiki/langs/jinja-html.js +1 -0
- package/src/shiki/langs/jinja.js +1 -0
- package/src/shiki/langs/jison.js +1 -0
- package/src/shiki/langs/json.js +1 -0
- package/src/shiki/langs/json5.js +1 -0
- package/src/shiki/langs/jsonc.js +1 -0
- package/src/shiki/langs/jsonl.js +1 -0
- package/src/shiki/langs/jsonnet.js +1 -0
- package/src/shiki/langs/jssm.js +1 -0
- package/src/shiki/langs/jsx.js +1 -0
- package/src/shiki/langs/julia.js +1 -0
- package/src/shiki/langs/kotlin.js +1 -0
- package/src/shiki/langs/kusto.js +1 -0
- package/src/shiki/langs/latex.js +1 -0
- package/src/shiki/langs/lean.js +1 -0
- package/src/shiki/langs/less.js +1 -0
- package/src/shiki/langs/liquid.js +1 -0
- package/src/shiki/langs/llvm.js +1 -0
- package/src/shiki/langs/log.js +1 -0
- package/src/shiki/langs/logo.js +1 -0
- package/src/shiki/langs/lua.js +1 -0
- package/src/shiki/langs/luau.js +1 -0
- package/src/shiki/langs/make.js +1 -0
- package/src/shiki/langs/markdown-vue.js +1 -0
- package/src/shiki/langs/markdown.js +1 -0
- package/src/shiki/langs/marko.js +1 -0
- package/src/shiki/langs/matlab.js +1 -0
- package/src/shiki/langs/mdc.js +1 -0
- package/src/shiki/langs/mdx.js +1 -0
- package/src/shiki/langs/mermaid.js +1 -0
- package/src/shiki/langs/mipsasm.js +1 -0
- package/src/shiki/langs/mojo.js +1 -0
- package/src/shiki/langs/move.js +1 -0
- package/src/shiki/langs/narrat.js +1 -0
- package/src/shiki/langs/nextflow.js +1 -0
- package/src/shiki/langs/nginx.js +1 -0
- package/src/shiki/langs/nim.js +1 -0
- package/src/shiki/langs/nix.js +1 -0
- package/src/shiki/langs/nushell.js +1 -0
- package/src/shiki/langs/objective-c.js +1 -0
- package/src/shiki/langs/objective-cpp.js +1 -0
- package/src/shiki/langs/ocaml.js +1 -0
- package/src/shiki/langs/pascal.js +1 -0
- package/src/shiki/langs/perl.js +1 -0
- package/src/shiki/langs/php.js +1 -0
- package/src/shiki/langs/plsql.js +1 -0
- package/src/shiki/langs/po.js +1 -0
- package/src/shiki/langs/polar.js +1 -0
- package/src/shiki/langs/postcss.js +1 -0
- package/src/shiki/langs/powerquery.js +1 -0
- package/src/shiki/langs/powershell.js +1 -0
- package/src/shiki/langs/prisma.js +1 -0
- package/src/shiki/langs/prolog.js +1 -0
- package/src/shiki/langs/proto.js +1 -0
- package/src/shiki/langs/pug.js +1 -0
- package/src/shiki/langs/puppet.js +1 -0
- package/src/shiki/langs/purescript.js +1 -0
- package/src/shiki/langs/python.js +1 -0
- package/src/shiki/langs/qml.js +1 -0
- package/src/shiki/langs/qmldir.js +1 -0
- package/src/shiki/langs/qss.js +1 -0
- package/src/shiki/langs/r.js +1 -0
- package/src/shiki/langs/racket.js +1 -0
- package/src/shiki/langs/raku.js +1 -0
- package/src/shiki/langs/razor.js +1 -0
- package/src/shiki/langs/reg.js +1 -0
- package/src/shiki/langs/regexp.js +1 -0
- package/src/shiki/langs/rel.js +1 -0
- package/src/shiki/langs/riscv.js +1 -0
- package/src/shiki/langs/rst.js +1 -0
- package/src/shiki/langs/ruby.js +1 -0
- package/src/shiki/langs/rust.js +1 -0
- package/src/shiki/langs/sas.js +1 -0
- package/src/shiki/langs/sass.js +1 -0
- package/src/shiki/langs/scala.js +1 -0
- package/src/shiki/langs/scheme.js +1 -0
- package/src/shiki/langs/scss.js +1 -0
- package/src/shiki/langs/sdbl.js +1 -0
- package/src/shiki/langs/shaderlab.js +1 -0
- package/src/shiki/langs/shellscript.js +1 -0
- package/src/shiki/langs/shellsession.js +1 -0
- package/src/shiki/langs/smalltalk.js +1 -0
- package/src/shiki/langs/solidity.js +1 -0
- package/src/shiki/langs/soy.js +1 -0
- package/src/shiki/langs/sparql.js +1 -0
- package/src/shiki/langs/splunk.js +1 -0
- package/src/shiki/langs/sql.js +1 -0
- package/src/shiki/langs/ssh-config.js +1 -0
- package/src/shiki/langs/stata.js +1 -0
- package/src/shiki/langs/stylus.js +1 -0
- package/src/shiki/langs/svelte.js +1 -0
- package/src/shiki/langs/swift.js +1 -0
- package/src/shiki/langs/system-verilog.js +1 -0
- package/src/shiki/langs/systemd.js +1 -0
- package/src/shiki/langs/talonscript.js +1 -0
- package/src/shiki/langs/tasl.js +1 -0
- package/src/shiki/langs/tcl.js +1 -0
- package/src/shiki/langs/templ.js +1 -0
- package/src/shiki/langs/terraform.js +1 -0
- package/src/shiki/langs/tex.js +1 -0
- package/src/shiki/langs/toml.js +1 -0
- package/src/shiki/langs/ts-tags.js +1 -0
- package/src/shiki/langs/tsv.js +1 -0
- package/src/shiki/langs/tsx.js +1 -0
- package/src/shiki/langs/turtle.js +1 -0
- package/src/shiki/langs/twig.js +1 -0
- package/src/shiki/langs/typescript.js +1 -0
- package/src/shiki/langs/typespec.js +1 -0
- package/src/shiki/langs/typst.js +1 -0
- package/src/shiki/langs/v.js +1 -0
- package/src/shiki/langs/vala.js +1 -0
- package/src/shiki/langs/vb.js +1 -0
- package/src/shiki/langs/verilog.js +1 -0
- package/src/shiki/langs/vhdl.js +1 -0
- package/src/shiki/langs/viml.js +1 -0
- package/src/shiki/langs/vue-directives.js +1 -0
- package/src/shiki/langs/vue-html.js +1 -0
- package/src/shiki/langs/vue-interpolations.js +1 -0
- package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
- package/src/shiki/langs/vue.js +1 -0
- package/src/shiki/langs/vyper.js +1 -0
- package/src/shiki/langs/wasm.js +1 -0
- package/src/shiki/langs/wenyan.js +1 -0
- package/src/shiki/langs/wgsl.js +1 -0
- package/src/shiki/langs/wikitext.js +1 -0
- package/src/shiki/langs/wit.js +1 -0
- package/src/shiki/langs/wolfram.js +1 -0
- package/src/shiki/langs/xml.js +1 -0
- package/src/shiki/langs/xsl.js +1 -0
- package/src/shiki/langs/yaml.js +1 -0
- package/src/shiki/langs/zenscript.js +1 -0
- package/src/shiki/langs/zig.js +1 -0
- package/src/shiki/themes/andromeeda.js +1 -0
- package/src/shiki/themes/aurora-x.js +1 -0
- package/src/shiki/themes/ayu-dark.js +1 -0
- package/src/shiki/themes/catppuccin-frappe.js +1 -0
- package/src/shiki/themes/catppuccin-latte.js +1 -0
- package/src/shiki/themes/catppuccin-macchiato.js +1 -0
- package/src/shiki/themes/catppuccin-mocha.js +1 -0
- package/src/shiki/themes/dark-plus.js +1 -0
- package/src/shiki/themes/dracula-soft.js +1 -0
- package/src/shiki/themes/dracula.js +1 -0
- package/src/shiki/themes/everforest-dark.js +1 -0
- package/src/shiki/themes/everforest-light.js +1 -0
- package/src/shiki/themes/github-dark-default.js +1 -0
- package/src/shiki/themes/github-dark-dimmed.js +1 -0
- package/src/shiki/themes/github-dark-high-contrast.js +1 -0
- package/src/shiki/themes/github-dark.js +1 -0
- package/src/shiki/themes/github-light-default.js +1 -0
- package/src/shiki/themes/github-light-high-contrast.js +1 -0
- package/src/shiki/themes/github-light.js +1 -0
- package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
- package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
- package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
- package/src/shiki/themes/gruvbox-light-hard.js +1 -0
- package/src/shiki/themes/gruvbox-light-medium.js +1 -0
- package/src/shiki/themes/gruvbox-light-soft.js +1 -0
- package/src/shiki/themes/houston.js +1 -0
- package/src/shiki/themes/kanagawa-dragon.js +1 -0
- package/src/shiki/themes/kanagawa-lotus.js +1 -0
- package/src/shiki/themes/kanagawa-wave.js +1 -0
- package/src/shiki/themes/laserwave.js +1 -0
- package/src/shiki/themes/light-plus.js +1 -0
- package/src/shiki/themes/material-theme-darker.js +1 -0
- package/src/shiki/themes/material-theme-lighter.js +1 -0
- package/src/shiki/themes/material-theme-ocean.js +1 -0
- package/src/shiki/themes/material-theme-palenight.js +1 -0
- package/src/shiki/themes/material-theme.js +1 -0
- package/src/shiki/themes/min-dark.js +1 -0
- package/src/shiki/themes/min-light.js +1 -0
- package/src/shiki/themes/monokai.js +1 -0
- package/src/shiki/themes/night-owl.js +1 -0
- package/src/shiki/themes/nord.js +1 -0
- package/src/shiki/themes/one-dark-pro.js +1 -0
- package/src/shiki/themes/one-light.js +1 -0
- package/src/shiki/themes/plastic.js +1 -0
- package/src/shiki/themes/poimandres.js +1 -0
- package/src/shiki/themes/red.js +1 -0
- package/src/shiki/themes/rose-pine-dawn.js +1 -0
- package/src/shiki/themes/rose-pine-moon.js +1 -0
- package/src/shiki/themes/rose-pine.js +1 -0
- package/src/shiki/themes/slack-dark.js +1 -0
- package/src/shiki/themes/slack-ochin.js +1 -0
- package/src/shiki/themes/snazzy-light.js +1 -0
- package/src/shiki/themes/solarized-dark.js +1 -0
- package/src/shiki/themes/solarized-light.js +1 -0
- package/src/shiki/themes/synthwave-84.js +1 -0
- package/src/shiki/themes/tokyo-night.js +1 -0
- package/src/shiki/themes/vesper.js +1 -0
- package/src/shiki/themes/vitesse-black.js +1 -0
- package/src/shiki/themes/vitesse-dark.js +1 -0
- package/src/shiki/themes/vitesse-light.js +1 -0
- package/lib/AuthenticationPlugin-BlJsiGuX.js +0 -99
- package/lib/Markdown-DvdVn1O7.js +0 -17128
- package/lib/Markdown-DvdVn1O7.js.map +0 -1
- package/lib/MdxPage-DlJaCSPf.js +0 -85
- package/lib/RouteGuard-D2gX29iI.js +0 -744
- package/lib/SchemaView-Ci_CnNlv.js.map +0 -1
- package/lib/Select-CYaEBIYK.js +0 -223
- package/lib/SlotletProvider-wWbHYqWf.js +0 -340
- package/lib/SlotletProvider-wWbHYqWf.js.map +0 -1
- package/lib/SyntaxHighlight-o7q0acut.js +0 -2890
- package/lib/SyntaxHighlight-o7q0acut.js.map +0 -1
- package/lib/_commonjsHelpers-B4e78b8K.js +0 -29
- package/lib/_commonjsHelpers-B4e78b8K.js.map +0 -1
- package/lib/createServer-Iclzdx0h.js.map +0 -1
- package/lib/hook-8GM2HXNM.js +0 -1478
- package/lib/hook-8GM2HXNM.js.map +0 -1
- package/lib/index-C56xKbMM.js.map +0 -1
- package/lib/index-CzUOM_vE.js +0 -5039
- package/lib/invariant-Caa8-XvF.js +0 -26
- package/lib/mutation-Bq5bn7Hf.js +0 -211
- package/lib/prism-bash.min-HHIMdNJ_.js +0 -7
- package/lib/prism-bash.min-HHIMdNJ_.js.map +0 -1
- package/lib/prism-csharp.min-C43x1RY2.js +0 -63
- package/lib/prism-csharp.min-C43x1RY2.js.map +0 -1
- package/lib/prism-java.min-CQzr40NQ.js +0 -35
- package/lib/prism-java.min-CQzr40NQ.js.map +0 -1
- package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
- package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
- package/lib/prism-json.min-B1GJqK1k.js +0 -2
- package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
- package/lib/prism-jsstacktrace.min-BfobCF2F.js +0 -2
- package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +0 -1
- package/lib/prism-markdown.min-C0Qn0m-5.js +0 -61
- package/lib/prism-markdown.min-C0Qn0m-5.js.map +0 -1
- package/lib/prism-markup-BNGj0Tvm.js +0 -174
- package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
- package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
- package/lib/prism-ruby.min-L9OdQ6tU.js +0 -38
- package/lib/prism-ruby.min-L9OdQ6tU.js.map +0 -1
- package/lib/prism-typescript.min-qTySPvCh.js +0 -34
- package/lib/prism-typescript.min-qTySPvCh.js.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var i = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function f(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
function a(e) {
|
|
6
|
+
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
7
|
+
var t = e.default;
|
|
8
|
+
if (typeof t == "function") {
|
|
9
|
+
var r = function o() {
|
|
10
|
+
return this instanceof o ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
r.prototype = t.prototype;
|
|
13
|
+
} else r = {};
|
|
14
|
+
return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
|
|
15
|
+
var n = Object.getOwnPropertyDescriptor(e, o);
|
|
16
|
+
Object.defineProperty(r, o, n.get ? n : {
|
|
17
|
+
enumerable: !0,
|
|
18
|
+
get: function() {
|
|
19
|
+
return e[o];
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}), r;
|
|
23
|
+
}
|
|
24
|
+
function l(e, t) {
|
|
25
|
+
if (e)
|
|
26
|
+
return;
|
|
27
|
+
const r = typeof t == "function" ? t() : t;
|
|
28
|
+
throw new u(r ?? "Invariant failed");
|
|
29
|
+
}
|
|
30
|
+
class u extends Error {
|
|
31
|
+
developerHint;
|
|
32
|
+
title;
|
|
33
|
+
constructor(t, {
|
|
34
|
+
developerHint: r,
|
|
35
|
+
title: o,
|
|
36
|
+
cause: n
|
|
37
|
+
} = {}) {
|
|
38
|
+
super(t, { cause: n }), this.name = "ZudokuError", this.title = o, this.developerHint = r;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
u as Z,
|
|
43
|
+
a,
|
|
44
|
+
i as c,
|
|
45
|
+
f as g,
|
|
46
|
+
l as i
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=invariant-DAFpPywt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invariant-
|
|
1
|
+
{"version":3,"file":"invariant-DAFpPywt.js","sources":["../src/lib/util/invariant.ts"],"sourcesContent":["export default function invariant(\n condition: any,\n // Not providing an inline default argument for message as the result is smaller\n /**\n * Can provide a string, or a function that returns a string for cases where\n * the message takes a fair amount of effort to compute\n */\n message?: string | (() => string),\n): asserts condition {\n if (condition) {\n return;\n }\n // Condition not passed\n\n const provided: string | undefined =\n typeof message === \"function\" ? message() : message;\n\n throw new ZudokuError(provided ?? \"Invariant failed\");\n}\n\nexport class ZudokuError extends Error {\n public developerHint: string | undefined;\n public title: string | undefined;\n\n constructor(\n message: string,\n {\n developerHint,\n title,\n cause,\n }: { developerHint?: string; title?: string; cause?: Error } = {},\n ) {\n super(message, { cause });\n this.name = \"ZudokuError\";\n this.title = title;\n this.developerHint = developerHint;\n }\n}\n"],"names":["invariant","condition","message","provided","ZudokuError","developerHint","title","cause"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAwB,SAAAA,EACtBC,GAMAC,GACmB;AACnB,MAAID;AACF;AAIF,QAAME,IACJ,OAAOD,KAAY,aAAaA,EAAY,IAAAA;AAExC,QAAA,IAAIE,EAAYD,KAAY,kBAAkB;AACtD;AAEO,MAAMC,UAAoB,MAAM;AAAA,EAC9B;AAAA,EACA;AAAA,EAEP,YACEF,GACA;AAAA,IACE,eAAAG;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,EACF,IAA+D,IAC/D;AACM,UAAAL,GAAS,EAAE,OAAAK,GAAO,GACxB,KAAK,OAAO,eACZ,KAAK,QAAQD,GACb,KAAK,gBAAgBD;AAAA,EAAA;AAEzB;"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { R as a, c as r, n as u } from "./hook-BwOB_iZo.js";
|
|
2
|
+
var d = class extends a {
|
|
3
|
+
#e;
|
|
4
|
+
#t;
|
|
5
|
+
#i;
|
|
6
|
+
constructor(t) {
|
|
7
|
+
super(), this.mutationId = t.mutationId, this.#t = t.mutationCache, this.#e = [], this.state = t.state || h(), this.setOptions(t.options), this.scheduleGc();
|
|
8
|
+
}
|
|
9
|
+
setOptions(t) {
|
|
10
|
+
this.options = t, this.updateGcTime(this.options.gcTime);
|
|
11
|
+
}
|
|
12
|
+
get meta() {
|
|
13
|
+
return this.options.meta;
|
|
14
|
+
}
|
|
15
|
+
addObserver(t) {
|
|
16
|
+
this.#e.includes(t) || (this.#e.push(t), this.clearGcTimeout(), this.#t.notify({
|
|
17
|
+
type: "observerAdded",
|
|
18
|
+
mutation: this,
|
|
19
|
+
observer: t
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
removeObserver(t) {
|
|
23
|
+
this.#e = this.#e.filter((i) => i !== t), this.scheduleGc(), this.#t.notify({
|
|
24
|
+
type: "observerRemoved",
|
|
25
|
+
mutation: this,
|
|
26
|
+
observer: t
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
optionalRemove() {
|
|
30
|
+
this.#e.length || (this.state.status === "pending" ? this.scheduleGc() : this.#t.remove(this));
|
|
31
|
+
}
|
|
32
|
+
continue() {
|
|
33
|
+
return this.#i?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
|
34
|
+
this.execute(this.state.variables);
|
|
35
|
+
}
|
|
36
|
+
async execute(t) {
|
|
37
|
+
const i = () => {
|
|
38
|
+
this.#s({ type: "continue" });
|
|
39
|
+
};
|
|
40
|
+
this.#i = r({
|
|
41
|
+
fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
|
|
42
|
+
onFail: (e, n) => {
|
|
43
|
+
this.#s({ type: "failed", failureCount: e, error: n });
|
|
44
|
+
},
|
|
45
|
+
onPause: () => {
|
|
46
|
+
this.#s({ type: "pause" });
|
|
47
|
+
},
|
|
48
|
+
onContinue: i,
|
|
49
|
+
retry: this.options.retry ?? 0,
|
|
50
|
+
retryDelay: this.options.retryDelay,
|
|
51
|
+
networkMode: this.options.networkMode,
|
|
52
|
+
canRun: () => this.#t.canRun(this)
|
|
53
|
+
});
|
|
54
|
+
const s = this.state.status === "pending", o = !this.#i.canStart();
|
|
55
|
+
try {
|
|
56
|
+
if (s)
|
|
57
|
+
i();
|
|
58
|
+
else {
|
|
59
|
+
this.#s({ type: "pending", variables: t, isPaused: o }), await this.#t.config.onMutate?.(
|
|
60
|
+
t,
|
|
61
|
+
this
|
|
62
|
+
);
|
|
63
|
+
const n = await this.options.onMutate?.(t);
|
|
64
|
+
n !== this.state.context && this.#s({
|
|
65
|
+
type: "pending",
|
|
66
|
+
context: n,
|
|
67
|
+
variables: t,
|
|
68
|
+
isPaused: o
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const e = await this.#i.start();
|
|
72
|
+
return await this.#t.config.onSuccess?.(
|
|
73
|
+
e,
|
|
74
|
+
t,
|
|
75
|
+
this.state.context,
|
|
76
|
+
this
|
|
77
|
+
), await this.options.onSuccess?.(e, t, this.state.context), await this.#t.config.onSettled?.(
|
|
78
|
+
e,
|
|
79
|
+
null,
|
|
80
|
+
this.state.variables,
|
|
81
|
+
this.state.context,
|
|
82
|
+
this
|
|
83
|
+
), await this.options.onSettled?.(e, null, t, this.state.context), this.#s({ type: "success", data: e }), e;
|
|
84
|
+
} catch (e) {
|
|
85
|
+
try {
|
|
86
|
+
throw await this.#t.config.onError?.(
|
|
87
|
+
e,
|
|
88
|
+
t,
|
|
89
|
+
this.state.context,
|
|
90
|
+
this
|
|
91
|
+
), await this.options.onError?.(
|
|
92
|
+
e,
|
|
93
|
+
t,
|
|
94
|
+
this.state.context
|
|
95
|
+
), await this.#t.config.onSettled?.(
|
|
96
|
+
void 0,
|
|
97
|
+
e,
|
|
98
|
+
this.state.variables,
|
|
99
|
+
this.state.context,
|
|
100
|
+
this
|
|
101
|
+
), await this.options.onSettled?.(
|
|
102
|
+
void 0,
|
|
103
|
+
e,
|
|
104
|
+
t,
|
|
105
|
+
this.state.context
|
|
106
|
+
), e;
|
|
107
|
+
} finally {
|
|
108
|
+
this.#s({ type: "error", error: e });
|
|
109
|
+
}
|
|
110
|
+
} finally {
|
|
111
|
+
this.#t.runNext(this);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
#s(t) {
|
|
115
|
+
const i = (s) => {
|
|
116
|
+
switch (t.type) {
|
|
117
|
+
case "failed":
|
|
118
|
+
return {
|
|
119
|
+
...s,
|
|
120
|
+
failureCount: t.failureCount,
|
|
121
|
+
failureReason: t.error
|
|
122
|
+
};
|
|
123
|
+
case "pause":
|
|
124
|
+
return {
|
|
125
|
+
...s,
|
|
126
|
+
isPaused: !0
|
|
127
|
+
};
|
|
128
|
+
case "continue":
|
|
129
|
+
return {
|
|
130
|
+
...s,
|
|
131
|
+
isPaused: !1
|
|
132
|
+
};
|
|
133
|
+
case "pending":
|
|
134
|
+
return {
|
|
135
|
+
...s,
|
|
136
|
+
context: t.context,
|
|
137
|
+
data: void 0,
|
|
138
|
+
failureCount: 0,
|
|
139
|
+
failureReason: null,
|
|
140
|
+
error: null,
|
|
141
|
+
isPaused: t.isPaused,
|
|
142
|
+
status: "pending",
|
|
143
|
+
variables: t.variables,
|
|
144
|
+
submittedAt: Date.now()
|
|
145
|
+
};
|
|
146
|
+
case "success":
|
|
147
|
+
return {
|
|
148
|
+
...s,
|
|
149
|
+
data: t.data,
|
|
150
|
+
failureCount: 0,
|
|
151
|
+
failureReason: null,
|
|
152
|
+
error: null,
|
|
153
|
+
status: "success",
|
|
154
|
+
isPaused: !1
|
|
155
|
+
};
|
|
156
|
+
case "error":
|
|
157
|
+
return {
|
|
158
|
+
...s,
|
|
159
|
+
data: void 0,
|
|
160
|
+
error: t.error,
|
|
161
|
+
failureCount: s.failureCount + 1,
|
|
162
|
+
failureReason: t.error,
|
|
163
|
+
isPaused: !1,
|
|
164
|
+
status: "error"
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
this.state = i(this.state), u.batch(() => {
|
|
169
|
+
this.#e.forEach((s) => {
|
|
170
|
+
s.onMutationUpdate(t);
|
|
171
|
+
}), this.#t.notify({
|
|
172
|
+
mutation: this,
|
|
173
|
+
type: "updated",
|
|
174
|
+
action: t
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
function h() {
|
|
180
|
+
return {
|
|
181
|
+
context: void 0,
|
|
182
|
+
data: void 0,
|
|
183
|
+
error: null,
|
|
184
|
+
failureCount: 0,
|
|
185
|
+
failureReason: null,
|
|
186
|
+
isPaused: !1,
|
|
187
|
+
status: "idle",
|
|
188
|
+
variables: void 0,
|
|
189
|
+
submittedAt: 0
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
export {
|
|
193
|
+
d as M,
|
|
194
|
+
h as g
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=mutation-CL2MCRQL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-Bq5bn7Hf.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.74.3/node_modules/@tanstack/query-core/build/modern/mutation.js"],"sourcesContent":["// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { createRetryer } from \"./retryer.js\";\nvar Mutation = class extends Removable {\n #observers;\n #mutationCache;\n #retryer;\n constructor(config) {\n super();\n this.mutationId = config.mutationId;\n this.#mutationCache = config.mutationCache;\n this.#observers = [];\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n setOptions(options) {\n this.options = options;\n this.updateGcTime(this.options.gcTime);\n }\n get meta() {\n return this.options.meta;\n }\n addObserver(observer) {\n if (!this.#observers.includes(observer)) {\n this.#observers.push(observer);\n this.clearGcTimeout();\n this.#mutationCache.notify({\n type: \"observerAdded\",\n mutation: this,\n observer\n });\n }\n }\n removeObserver(observer) {\n this.#observers = this.#observers.filter((x) => x !== observer);\n this.scheduleGc();\n this.#mutationCache.notify({\n type: \"observerRemoved\",\n mutation: this,\n observer\n });\n }\n optionalRemove() {\n if (!this.#observers.length) {\n if (this.state.status === \"pending\") {\n this.scheduleGc();\n } else {\n this.#mutationCache.remove(this);\n }\n }\n }\n continue() {\n return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n this.execute(this.state.variables);\n }\n async execute(variables) {\n const onContinue = () => {\n this.#dispatch({ type: \"continue\" });\n };\n this.#retryer = createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject(new Error(\"No mutationFn found\"));\n }\n return this.options.mutationFn(variables);\n },\n onFail: (failureCount, error) => {\n this.#dispatch({ type: \"failed\", failureCount, error });\n },\n onPause: () => {\n this.#dispatch({ type: \"pause\" });\n },\n onContinue,\n retry: this.options.retry ?? 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode,\n canRun: () => this.#mutationCache.canRun(this)\n });\n const restored = this.state.status === \"pending\";\n const isPaused = !this.#retryer.canStart();\n try {\n if (restored) {\n onContinue();\n } else {\n this.#dispatch({ type: \"pending\", variables, isPaused });\n await this.#mutationCache.config.onMutate?.(\n variables,\n this\n );\n const context = await this.options.onMutate?.(variables);\n if (context !== this.state.context) {\n this.#dispatch({\n type: \"pending\",\n context,\n variables,\n isPaused\n });\n }\n }\n const data = await this.#retryer.start();\n await this.#mutationCache.config.onSuccess?.(\n data,\n variables,\n this.state.context,\n this\n );\n await this.options.onSuccess?.(data, variables, this.state.context);\n await this.#mutationCache.config.onSettled?.(\n data,\n null,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(data, null, variables, this.state.context);\n this.#dispatch({ type: \"success\", data });\n return data;\n } catch (error) {\n try {\n await this.#mutationCache.config.onError?.(\n error,\n variables,\n this.state.context,\n this\n );\n await this.options.onError?.(\n error,\n variables,\n this.state.context\n );\n await this.#mutationCache.config.onSettled?.(\n void 0,\n error,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(\n void 0,\n error,\n variables,\n this.state.context\n );\n throw error;\n } finally {\n this.#dispatch({ type: \"error\", error });\n }\n } finally {\n this.#mutationCache.runNext(this);\n }\n }\n #dispatch(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n isPaused: true\n };\n case \"continue\":\n return {\n ...state,\n isPaused: false\n };\n case \"pending\":\n return {\n ...state,\n context: action.context,\n data: void 0,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: action.isPaused,\n status: \"pending\",\n variables: action.variables,\n submittedAt: Date.now()\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: \"success\",\n isPaused: false\n };\n case \"error\":\n return {\n ...state,\n data: void 0,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: \"error\"\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.#observers.forEach((observer) => {\n observer.onMutationUpdate(action);\n });\n this.#mutationCache.notify({\n mutation: this,\n type: \"updated\",\n action\n });\n });\n }\n};\nfunction getDefaultState() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nexport {\n Mutation,\n getDefaultState\n};\n//# sourceMappingURL=mutation.js.map"],"names":["Mutation","_a","Removable","config","__privateAdd","_Mutation_instances","_observers","_mutationCache","_retryer","__privateSet","getDefaultState","options","observer","__privateGet","x","variables","onContinue","__privateMethod","dispatch_fn","createRetryer","failureCount","error","restored","isPaused","_b","context","_d","_c","data","_f","_e","_h","_g","_j","_i","_l","_k","_n","_m","_p","_o","_r","_q","_t","_s","action","reducer","state","notifyManager"],"mappings":";;;;;;sBAIIA,KAAWC,IAAA,cAAcC,EAAU;AAAA,EAIrC,YAAYC,GAAQ;AAClB,UAAO;AALI,IAAAC,EAAA,MAAAC;AACb,IAAAD,EAAA,MAAAE;AACA,IAAAF,EAAA,MAAAG;AACA,IAAAH,EAAA,MAAAI;AAGE,SAAK,aAAaL,EAAO,YACzBM,EAAA,MAAKF,GAAiBJ,EAAO,gBAC7BM,EAAA,MAAKH,GAAa,CAAE,IACpB,KAAK,QAAQH,EAAO,SAASO,EAAiB,GAC9C,KAAK,WAAWP,EAAO,OAAO,GAC9B,KAAK,WAAY;AAAA,EACrB;AAAA,EACE,WAAWQ,GAAS;AAClB,SAAK,UAAUA,GACf,KAAK,aAAa,KAAK,QAAQ,MAAM;AAAA,EACzC;AAAA,EACE,IAAI,OAAO;AACT,WAAO,KAAK,QAAQ;AAAA,EACxB;AAAA,EACE,YAAYC,GAAU;AACpB,IAAKC,EAAA,MAAKP,GAAW,SAASM,CAAQ,MACpCC,EAAA,MAAKP,GAAW,KAAKM,CAAQ,GAC7B,KAAK,eAAgB,GACrBC,EAAA,MAAKN,GAAe,OAAO;AAAA,MACzB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,UAAAK;AAAA,IACR,CAAO;AAAA,EAEP;AAAA,EACE,eAAeA,GAAU;AACvB,IAAAH,EAAA,MAAKH,GAAaO,EAAA,MAAKP,GAAW,OAAO,CAACQ,MAA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GA;AAAA,UACH,SAASF,EAAO;AAAA,UAChB,MAAM;AAAA,UACN,cAAc;AAAA,UACd,eAAe;AAAA,UACf,OAAO;AAAA,UACP,UAAUA,EAAO;AAAA,UACjB,QAAQ;AAAA,UACR,WAAWA,EAAO;AAAA,UAClB,aAAa,KAAK,IAAG;AAAA,QACtB;AAAA,MACH,KAAK;AACH,eAAO;AAAA,UACL,GAAGE;AAAA,UACH,MAAMF,EAAO;AAAA,UACb,cAAc;AAAA,UACd,eAAe;AAAA,UACf,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,UAAU;AAAA,QACX;AAAA,MACH,KAAK;AACH,eAAO;AAAA,UACL,GAAGE;AAAA,UACH,MAAM;AAAA,UACN,OAAOF,EAAO;AAAA,UACd,cAAcE,EAAM,eAAe;AAAA,UACnC,eAAeF,EAAO;AAAA,UACtB,UAAU;AAAA,UACV,QAAQ;AAAA,QACT;AAAA,IACX;AAAA,EACK;AACD,OAAK,QAAQC,EAAQ,KAAK,KAAK,GAC/BE,EAAc,MAAM,MAAM;AACxB,IAAAnC,EAAA,MAAKP,GAAW,QAAQ,CAACM,MAAa;AACpC,MAAAA,EAAS,iBAAiBiC,CAAM;AAAA,IACxC,CAAO,GACDhC,EAAA,MAAKN,GAAe,OAAO;AAAA,MACzB,UAAU;AAAA,MACV,MAAM;AAAA,MACN,QAAAsC;AAAA,IACR,CAAO;AAAA,EACP,CAAK;AACL,GAtNe5C;AAwNf,SAASS,IAAkB;AACzB,SAAO;AAAA,IACL,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,IACP,cAAc;AAAA,IACd,eAAe;AAAA,IACf,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,EACd;AACH;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"mutation-CL2MCRQL.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.74.3/node_modules/@tanstack/query-core/build/modern/mutation.js"],"sourcesContent":["// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { createRetryer } from \"./retryer.js\";\nvar Mutation = class extends Removable {\n #observers;\n #mutationCache;\n #retryer;\n constructor(config) {\n super();\n this.mutationId = config.mutationId;\n this.#mutationCache = config.mutationCache;\n this.#observers = [];\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n setOptions(options) {\n this.options = options;\n this.updateGcTime(this.options.gcTime);\n }\n get meta() {\n return this.options.meta;\n }\n addObserver(observer) {\n if (!this.#observers.includes(observer)) {\n this.#observers.push(observer);\n this.clearGcTimeout();\n this.#mutationCache.notify({\n type: \"observerAdded\",\n mutation: this,\n observer\n });\n }\n }\n removeObserver(observer) {\n this.#observers = this.#observers.filter((x) => x !== observer);\n this.scheduleGc();\n this.#mutationCache.notify({\n type: \"observerRemoved\",\n mutation: this,\n observer\n });\n }\n optionalRemove() {\n if (!this.#observers.length) {\n if (this.state.status === \"pending\") {\n this.scheduleGc();\n } else {\n this.#mutationCache.remove(this);\n }\n }\n }\n continue() {\n return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n this.execute(this.state.variables);\n }\n async execute(variables) {\n const onContinue = () => {\n this.#dispatch({ type: \"continue\" });\n };\n this.#retryer = createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject(new Error(\"No mutationFn found\"));\n }\n return this.options.mutationFn(variables);\n },\n onFail: (failureCount, error) => {\n this.#dispatch({ type: \"failed\", failureCount, error });\n },\n onPause: () => {\n this.#dispatch({ type: \"pause\" });\n },\n onContinue,\n retry: this.options.retry ?? 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode,\n canRun: () => this.#mutationCache.canRun(this)\n });\n const restored = this.state.status === \"pending\";\n const isPaused = !this.#retryer.canStart();\n try {\n if (restored) {\n onContinue();\n } else {\n this.#dispatch({ type: \"pending\", variables, isPaused });\n await this.#mutationCache.config.onMutate?.(\n variables,\n this\n );\n const context = await this.options.onMutate?.(variables);\n if (context !== this.state.context) {\n this.#dispatch({\n type: \"pending\",\n context,\n variables,\n isPaused\n });\n }\n }\n const data = await this.#retryer.start();\n await this.#mutationCache.config.onSuccess?.(\n data,\n variables,\n this.state.context,\n this\n );\n await this.options.onSuccess?.(data, variables, this.state.context);\n await this.#mutationCache.config.onSettled?.(\n data,\n null,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(data, null, variables, this.state.context);\n this.#dispatch({ type: \"success\", data });\n return data;\n } catch (error) {\n try {\n await this.#mutationCache.config.onError?.(\n error,\n variables,\n this.state.context,\n this\n );\n await this.options.onError?.(\n error,\n variables,\n this.state.context\n );\n await this.#mutationCache.config.onSettled?.(\n void 0,\n error,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(\n void 0,\n error,\n variables,\n this.state.context\n );\n throw error;\n } finally {\n this.#dispatch({ type: \"error\", error });\n }\n } finally {\n this.#mutationCache.runNext(this);\n }\n }\n #dispatch(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n isPaused: true\n };\n case \"continue\":\n return {\n ...state,\n isPaused: false\n };\n case \"pending\":\n return {\n ...state,\n context: action.context,\n data: void 0,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: action.isPaused,\n status: \"pending\",\n variables: action.variables,\n submittedAt: Date.now()\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: \"success\",\n isPaused: false\n };\n case \"error\":\n return {\n ...state,\n data: void 0,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: \"error\"\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.#observers.forEach((observer) => {\n observer.onMutationUpdate(action);\n });\n this.#mutationCache.notify({\n mutation: this,\n type: \"updated\",\n action\n });\n });\n }\n};\nfunction getDefaultState() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nexport {\n Mutation,\n getDefaultState\n};\n//# sourceMappingURL=mutation.js.map"],"names":["Mutation","Removable","#observers","#mutationCache","#retryer","config","getDefaultState","options","observer","x","variables","onContinue","#dispatch","createRetryer","failureCount","error","restored","isPaused","context","data","action","reducer","state","notifyManager"],"mappings":";AAIG,IAACA,IAAW,cAAcC,EAAU;AAAA,EACrCC;AAAA,EACAC;AAAA,EACAC;AAAA,EACA,YAAYC,GAAQ;AAClB,UAAO,GACP,KAAK,aAAaA,EAAO,YACzB,KAAKF,KAAiBE,EAAO,eAC7B,KAAKH,KAAa,CAAE,GACpB,KAAK,QAAQG,EAAO,SAASC,EAAiB,GAC9C,KAAK,WAAWD,EAAO,OAAO,GAC9B,KAAK,WAAY;AAAA,EACrB;AAAA,EACE,WAAWE,GAAS;AAClB,SAAK,UAAUA,GACf,KAAK,aAAa,KAAK,QAAQ,MAAM;AAAA,EACzC;AAAA,EACE,IAAI,OAAO;AACT,WAAO,KAAK,QAAQ;AAAA,EACxB;AAAA,EACE,YAAYC,GAAU;AACpB,IAAK,KAAKN,GAAW,SAASM,CAAQ,MACpC,KAAKN,GAAW,KAAKM,CAAQ,GAC7B,KAAK,eAAgB,GACrB,KAAKL,GAAe,OAAO;AAAA,MACzB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,UAAAK;AAAA,IACR,CAAO;AAAA,EAEP;AAAA,EACE,eAAeA,GAAU;AACvB,SAAKN,KAAa,KAAKA,GAAW,OAAO,CAACO,MAAMA,MAAMD,CAAQ,GAC9D,KAAK,WAAY,GACjB,KAAKL,GAAe,OAAO;AAAA,MACzB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,UAAAK;AAAA,IACN,CAAK;AAAA,EACL;AAAA,EACE,iBAAiB;AACf,IA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AA,IACN,OAAO;AAAA,IACP,cAAc;AAAA,IACd,eAAe;AAAA,IACf,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,EACd;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,48 +1,47 @@
|
|
|
1
|
-
import { traverse as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
...r,
|
|
1
|
+
import { traverse as l } from "./traverse.js";
|
|
2
|
+
const d = ({ names: m, in: f, shouldRemove: p } = {}) => ({ schema: c }) => l(c, (e) => {
|
|
3
|
+
const u = (n) => n.filter((r) => !(m?.includes(r.name) || f?.includes(r.in) || p?.({ parameter: r })));
|
|
4
|
+
if (e.components?.parameters && (e = {
|
|
5
|
+
...e,
|
|
7
6
|
components: {
|
|
8
|
-
...
|
|
7
|
+
...e.components,
|
|
9
8
|
parameters: Object.fromEntries(
|
|
10
|
-
Object.entries(
|
|
11
|
-
([
|
|
12
|
-
const t =
|
|
13
|
-
return t.$ref ? !0 : !
|
|
9
|
+
Object.entries(e.components.parameters).filter(
|
|
10
|
+
([n, r]) => {
|
|
11
|
+
const t = r;
|
|
12
|
+
return t.$ref ? !0 : !m?.includes(t.name) && !f?.includes(t.in) && !p?.({ parameter: t });
|
|
14
13
|
}
|
|
15
14
|
)
|
|
16
15
|
)
|
|
17
16
|
}
|
|
18
|
-
}),
|
|
19
|
-
const
|
|
20
|
-
for (const [
|
|
17
|
+
}), e.paths) {
|
|
18
|
+
const n = {};
|
|
19
|
+
for (const [r, t] of Object.entries(e.paths)) {
|
|
21
20
|
if (typeof t != "object" || t === null) {
|
|
22
|
-
|
|
21
|
+
n[r] = t;
|
|
23
22
|
continue;
|
|
24
23
|
}
|
|
25
24
|
let a = { ...t };
|
|
26
|
-
"parameters" in a && Array.isArray(a.parameters) && (a.parameters =
|
|
25
|
+
"parameters" in a && Array.isArray(a.parameters) && (a.parameters = u(
|
|
27
26
|
a.parameters
|
|
28
27
|
));
|
|
29
|
-
for (const
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
28
|
+
for (const s of Object.keys(a)) {
|
|
29
|
+
const o = a;
|
|
30
|
+
if (s === "parameters" || typeof o[s] != "object")
|
|
32
31
|
continue;
|
|
33
|
-
const
|
|
34
|
-
Array.isArray(
|
|
35
|
-
...
|
|
36
|
-
parameters:
|
|
37
|
-
}, a =
|
|
32
|
+
const i = o[s];
|
|
33
|
+
Array.isArray(i.parameters) && (o[s] = {
|
|
34
|
+
...i,
|
|
35
|
+
parameters: u(i.parameters)
|
|
36
|
+
}, a = o);
|
|
38
37
|
}
|
|
39
|
-
|
|
38
|
+
n[r] = a;
|
|
40
39
|
}
|
|
41
|
-
|
|
40
|
+
e = { ...e, paths: n };
|
|
42
41
|
}
|
|
43
|
-
return
|
|
42
|
+
return e;
|
|
44
43
|
});
|
|
45
44
|
export {
|
|
46
|
-
|
|
45
|
+
d as removeParameters
|
|
47
46
|
};
|
|
48
47
|
//# sourceMappingURL=removeParameters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeParameters.js","sources":["../../src/lib/plugins/openapi/processors/removeParameters.ts"],"sourcesContent":["import type { ProcessorArg } from \"../../../../config/validators/BuildSchema.js\";\nimport type { OpenAPIDocument } from \"../../../oas/parser/index.js\";\nimport { type RecordAny, traverse } from \"./traverse.js\";\n\ninterface RemoveParametersOptions {\n // Names of parameters to remove\n names?: string[];\n // Specific locations to remove parameters from ('query', 'header', 'path', 'cookie')\n in?: string[];\n // Custom filter function\n shouldRemove?: ({ parameter }: { parameter: RecordAny }) => boolean;\n}\n\nexport const removeParameters =\n ({ names, in: locations, shouldRemove }: RemoveParametersOptions = {}) =>\n ({ schema }: ProcessorArg) =>\n traverse(schema, (spec) => {\n // Helper function to filter parameters\n const filterParameters = (parameters: RecordAny[]) =>\n parameters.filter((p) => {\n if (names?.includes(p.name)) return false;\n if (locations?.includes(p.in)) return false;\n if (shouldRemove?.({ parameter: p })) return false;\n return true;\n });\n\n // Handle components.parameters\n if (spec.components?.parameters) {\n spec = {\n ...spec,\n components: {\n ...spec.components,\n parameters: Object.fromEntries(\n Object.entries(spec.components.parameters).filter(\n ([_, param]) => {\n const p = param as RecordAny;\n if (p.$ref) return true; // Skip references\n return (\n !names?.includes(p.name) &&\n !locations?.includes(p.in) &&\n !shouldRemove?.({ parameter: p })\n );\n },\n ),\n ),\n },\n };\n }\n\n // Handle paths\n if (spec.paths) {\n const updatedPaths: RecordAny = {};\n\n for (const [path, pathItem] of Object.entries(spec.paths)) {\n if (typeof pathItem !== \"object\" || pathItem === null) {\n updatedPaths[path] = pathItem;\n continue;\n }\n\n let updatedPathItem = { ...pathItem };\n\n // Handle path-level parameters\n if (\n \"parameters\" in updatedPathItem &&\n Array.isArray(updatedPathItem.parameters)\n ) {\n updatedPathItem.parameters = filterParameters(\n updatedPathItem.parameters,\n );\n }\n\n // Handle operation-level parameters\n for (const method of Object.keys(updatedPathItem)) {\n const pathItemWithMethods = updatedPathItem as Record<\n string,\n RecordAny\n >;\n\n if (\n method === \"parameters\" ||\n typeof pathItemWithMethods[method] !== \"object\"\n ) {\n continue;\n }\n\n const operation = pathItemWithMethods[method];\n if (Array.isArray(operation.parameters)) {\n pathItemWithMethods[method] = {\n ...operation,\n parameters: filterParameters(operation.parameters),\n };\n updatedPathItem = pathItemWithMethods;\n }\n }\n\n updatedPaths[path] = updatedPathItem;\n }\n\n spec = { ...spec, paths: updatedPaths };\n }\n\n return spec;\n }) as OpenAPIDocument;\n"],"names":["removeParameters","names","locations","shouldRemove","schema","traverse","spec","filterParameters","parameters","p","
|
|
1
|
+
{"version":3,"file":"removeParameters.js","sources":["../../src/lib/plugins/openapi/processors/removeParameters.ts"],"sourcesContent":["import type { ProcessorArg } from \"../../../../config/validators/BuildSchema.js\";\nimport type { OpenAPIDocument } from \"../../../oas/parser/index.js\";\nimport { type RecordAny, traverse } from \"./traverse.js\";\n\ninterface RemoveParametersOptions {\n // Names of parameters to remove\n names?: string[];\n // Specific locations to remove parameters from ('query', 'header', 'path', 'cookie')\n in?: string[];\n // Custom filter function\n shouldRemove?: ({ parameter }: { parameter: RecordAny }) => boolean;\n}\n\nexport const removeParameters =\n ({ names, in: locations, shouldRemove }: RemoveParametersOptions = {}) =>\n ({ schema }: ProcessorArg) =>\n traverse(schema, (spec) => {\n // Helper function to filter parameters\n const filterParameters = (parameters: RecordAny[]) =>\n parameters.filter((p) => {\n if (names?.includes(p.name)) return false;\n if (locations?.includes(p.in)) return false;\n if (shouldRemove?.({ parameter: p })) return false;\n return true;\n });\n\n // Handle components.parameters\n if (spec.components?.parameters) {\n spec = {\n ...spec,\n components: {\n ...spec.components,\n parameters: Object.fromEntries(\n Object.entries(spec.components.parameters).filter(\n ([_, param]) => {\n const p = param as RecordAny;\n if (p.$ref) return true; // Skip references\n return (\n !names?.includes(p.name) &&\n !locations?.includes(p.in) &&\n !shouldRemove?.({ parameter: p })\n );\n },\n ),\n ),\n },\n };\n }\n\n // Handle paths\n if (spec.paths) {\n const updatedPaths: RecordAny = {};\n\n for (const [path, pathItem] of Object.entries(spec.paths)) {\n if (typeof pathItem !== \"object\" || pathItem === null) {\n updatedPaths[path] = pathItem;\n continue;\n }\n\n let updatedPathItem = { ...pathItem };\n\n // Handle path-level parameters\n if (\n \"parameters\" in updatedPathItem &&\n Array.isArray(updatedPathItem.parameters)\n ) {\n updatedPathItem.parameters = filterParameters(\n updatedPathItem.parameters,\n );\n }\n\n // Handle operation-level parameters\n for (const method of Object.keys(updatedPathItem)) {\n const pathItemWithMethods = updatedPathItem as Record<\n string,\n RecordAny\n >;\n\n if (\n method === \"parameters\" ||\n typeof pathItemWithMethods[method] !== \"object\"\n ) {\n continue;\n }\n\n const operation = pathItemWithMethods[method];\n if (Array.isArray(operation.parameters)) {\n pathItemWithMethods[method] = {\n ...operation,\n parameters: filterParameters(operation.parameters),\n };\n updatedPathItem = pathItemWithMethods;\n }\n }\n\n updatedPaths[path] = updatedPathItem;\n }\n\n spec = { ...spec, paths: updatedPaths };\n }\n\n return spec;\n }) as OpenAPIDocument;\n"],"names":["removeParameters","names","locations","shouldRemove","schema","traverse","spec","filterParameters","parameters","p","_","param","updatedPaths","path","pathItem","updatedPathItem","method","pathItemWithMethods","operation"],"mappings":";AAaO,MAAMA,IACX,CAAC,EAAE,OAAAC,GAAO,IAAIC,GAAW,cAAAC,EAAa,IAA6B,OACnE,CAAC,EAAE,QAAAC,QACDC,EAASD,GAAQ,CAACE,MAAS;AAEzB,QAAMC,IAAmB,CAACC,MACxBA,EAAW,OAAO,CAACC,MACb,EAAAR,GAAO,SAASQ,EAAE,IAAI,KACtBP,GAAW,SAASO,EAAE,EAAE,KACxBN,IAAe,EAAE,WAAWM,EAAG,CAAA,EAEpC;AA0BH,MAvBIH,EAAK,YAAY,eACZA,IAAA;AAAA,IACL,GAAGA;AAAA,IACH,YAAY;AAAA,MACV,GAAGA,EAAK;AAAA,MACR,YAAY,OAAO;AAAA,QACjB,OAAO,QAAQA,EAAK,WAAW,UAAU,EAAE;AAAA,UACzC,CAAC,CAACI,GAAGC,CAAK,MAAM;AACd,kBAAMF,IAAIE;AACN,mBAAAF,EAAE,OAAa,KAEjB,CAACR,GAAO,SAASQ,EAAE,IAAI,KACvB,CAACP,GAAW,SAASO,EAAE,EAAE,KACzB,CAACN,IAAe,EAAE,WAAWM,GAAG;AAAA,UAAA;AAAA,QAEpC;AAAA,MACF;AAAA,IACF;AAAA,EAEJ,IAIEH,EAAK,OAAO;AACd,UAAMM,IAA0B,CAAC;AAEtB,eAAA,CAACC,GAAMC,CAAQ,KAAK,OAAO,QAAQR,EAAK,KAAK,GAAG;AACzD,UAAI,OAAOQ,KAAa,YAAYA,MAAa,MAAM;AACrD,QAAAF,EAAaC,CAAI,IAAIC;AACrB;AAAA,MAAA;AAGE,UAAAC,IAAkB,EAAE,GAAGD,EAAS;AAGpC,MACE,gBAAgBC,KAChB,MAAM,QAAQA,EAAgB,UAAU,MAExCA,EAAgB,aAAaR;AAAA,QAC3BQ,EAAgB;AAAA,MAClB;AAIF,iBAAWC,KAAU,OAAO,KAAKD,CAAe,GAAG;AACjD,cAAME,IAAsBF;AAK5B,YACEC,MAAW,gBACX,OAAOC,EAAoBD,CAAM,KAAM;AAEvC;AAGI,cAAAE,IAAYD,EAAoBD,CAAM;AAC5C,QAAI,MAAM,QAAQE,EAAU,UAAU,MACpCD,EAAoBD,CAAM,IAAI;AAAA,UAC5B,GAAGE;AAAA,UACH,YAAYX,EAAiBW,EAAU,UAAU;AAAA,QACnD,GACkBH,IAAAE;AAAA,MACpB;AAGF,MAAAL,EAAaC,CAAI,IAAIE;AAAA,IAAA;AAGvB,IAAAT,IAAO,EAAE,GAAGA,GAAM,OAAOM,EAAa;AAAA,EAAA;AAGjC,SAAAN;AACT,CAAC;"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { traverse as
|
|
2
|
-
const
|
|
3
|
-
if (!
|
|
4
|
-
const
|
|
5
|
-
for (const [t,
|
|
6
|
-
const
|
|
7
|
-
if (
|
|
8
|
-
if (typeof
|
|
1
|
+
import { traverse as d } from "./traverse.js";
|
|
2
|
+
const b = ({ paths: o = {}, shouldRemove: s }) => ({ schema: a }) => d(a, (e) => {
|
|
3
|
+
if (!e.paths) return e;
|
|
4
|
+
const n = {};
|
|
5
|
+
for (const [t, r] of Object.entries(e.paths)) {
|
|
6
|
+
const f = e.paths[t];
|
|
7
|
+
if (o[t] !== !0 && !s?.({ path: t, method: !0, operation: f }))
|
|
8
|
+
if (typeof r == "object" && r !== null) {
|
|
9
9
|
const c = Object.fromEntries(
|
|
10
|
-
Object.entries(
|
|
11
|
-
const
|
|
10
|
+
Object.entries(r).filter(([i]) => {
|
|
11
|
+
const u = e.paths[t][i], h = Array.isArray(o[t]) && o[t].includes(i), p = s?.({
|
|
12
12
|
path: t,
|
|
13
|
-
method:
|
|
14
|
-
operation:
|
|
13
|
+
method: i,
|
|
14
|
+
operation: u
|
|
15
15
|
});
|
|
16
|
-
return !
|
|
16
|
+
return !h && !p;
|
|
17
17
|
})
|
|
18
18
|
);
|
|
19
|
-
|
|
19
|
+
n[t] = c;
|
|
20
20
|
} else
|
|
21
|
-
|
|
21
|
+
n[t] = r;
|
|
22
22
|
}
|
|
23
|
-
return { ...
|
|
23
|
+
return { ...e, paths: n };
|
|
24
24
|
});
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
b as removePaths
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=removePaths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removePaths.js","sources":["../../src/lib/plugins/openapi/processors/removePaths.ts"],"sourcesContent":["import type { ProcessorArg } from \"../../../../config/validators/BuildSchema.js\";\nimport type { OpenAPIDocument } from \"../../../oas/parser/index.js\";\nimport { type RecordAny, traverse } from \"./traverse.js\";\n\ninterface RemovePathsOptions {\n // Path definitions, e.g., { '/path': true, '/path-2': ['get'] }\n paths?: Record<string, true | string[]>;\n shouldRemove?: (options: {\n path: string;\n method: true | string;\n operation: RecordAny;\n }) => boolean;\n}\n\nexport const removePaths =\n ({ paths = {}, shouldRemove }: RemovePathsOptions) =>\n ({ schema }: ProcessorArg) =>\n traverse(schema, (spec) => {\n if (!spec.paths) return spec;\n\n const updatedPaths: RecordAny = {};\n\n for (const [path, methods] of Object.entries(spec.paths)) {\n const operations = spec.paths[path];\n\n // If the path is explicitly marked for removal in `paths`\n if (paths[path] === true) continue;\n\n // If the path should be removed via `shouldRemove`\n if (shouldRemove?.({ path, method: true, operation: operations }))\n continue;\n\n if (typeof methods === \"object\" && methods !== null) {\n const filteredPath = Object.fromEntries(\n Object.entries(methods).filter(([method]) => {\n const operations = spec.paths[path][method];\n const isMethodToRemove =\n Array.isArray(paths[path]) && paths[path].includes(method);\n\n const isMethodFiltered = shouldRemove?.({\n path,\n method,\n operation: operations,\n });\n\n return !isMethodToRemove && !isMethodFiltered;\n }),\n );\n\n updatedPaths[path] = filteredPath;\n } else {\n updatedPaths[path] = methods;\n }\n }\n\n return { ...spec, paths: updatedPaths };\n }) as OpenAPIDocument;\n"],"names":["removePaths","paths","shouldRemove","schema","traverse","spec","updatedPaths","path","methods","operations","filteredPath","method","isMethodToRemove","isMethodFiltered"],"mappings":";AAcO,MAAMA,IACX,CAAC,EAAE,OAAAC,IAAQ,CAAA,GAAI,cAAAC,EACf,MAAA,CAAC,EAAE,QAAAC,QACDC,EAASD,GAAQ,CAACE,MAAS;AACrB,MAAA,CAACA,EAAK,MAAc,QAAAA;AAExB,QAAMC,IAA0B,CAAC;AAEtB,aAAA,CAACC,GAAMC,CAAO,KAAK,OAAO,QAAQH,EAAK,KAAK,GAAG;AAClD,UAAAI,IAAaJ,EAAK,MAAME,CAAI;AAG9B,QAAAN,EAAMM,CAAI,MAAM,MAGhB,
|
|
1
|
+
{"version":3,"file":"removePaths.js","sources":["../../src/lib/plugins/openapi/processors/removePaths.ts"],"sourcesContent":["import type { ProcessorArg } from \"../../../../config/validators/BuildSchema.js\";\nimport type { OpenAPIDocument } from \"../../../oas/parser/index.js\";\nimport { type RecordAny, traverse } from \"./traverse.js\";\n\ninterface RemovePathsOptions {\n // Path definitions, e.g., { '/path': true, '/path-2': ['get'] }\n paths?: Record<string, true | string[]>;\n shouldRemove?: (options: {\n path: string;\n method: true | string;\n operation: RecordAny;\n }) => boolean;\n}\n\nexport const removePaths =\n ({ paths = {}, shouldRemove }: RemovePathsOptions) =>\n ({ schema }: ProcessorArg) =>\n traverse(schema, (spec) => {\n if (!spec.paths) return spec;\n\n const updatedPaths: RecordAny = {};\n\n for (const [path, methods] of Object.entries(spec.paths)) {\n const operations = spec.paths[path];\n\n // If the path is explicitly marked for removal in `paths`\n if (paths[path] === true) continue;\n\n // If the path should be removed via `shouldRemove`\n if (shouldRemove?.({ path, method: true, operation: operations }))\n continue;\n\n if (typeof methods === \"object\" && methods !== null) {\n const filteredPath = Object.fromEntries(\n Object.entries(methods).filter(([method]) => {\n const operations = spec.paths[path][method];\n const isMethodToRemove =\n Array.isArray(paths[path]) && paths[path].includes(method);\n\n const isMethodFiltered = shouldRemove?.({\n path,\n method,\n operation: operations,\n });\n\n return !isMethodToRemove && !isMethodFiltered;\n }),\n );\n\n updatedPaths[path] = filteredPath;\n } else {\n updatedPaths[path] = methods;\n }\n }\n\n return { ...spec, paths: updatedPaths };\n }) as OpenAPIDocument;\n"],"names":["removePaths","paths","shouldRemove","schema","traverse","spec","updatedPaths","path","methods","operations","filteredPath","method","isMethodToRemove","isMethodFiltered"],"mappings":";AAcO,MAAMA,IACX,CAAC,EAAE,OAAAC,IAAQ,CAAA,GAAI,cAAAC,EACf,MAAA,CAAC,EAAE,QAAAC,QACDC,EAASD,GAAQ,CAACE,MAAS;AACrB,MAAA,CAACA,EAAK,MAAc,QAAAA;AAExB,QAAMC,IAA0B,CAAC;AAEtB,aAAA,CAACC,GAAMC,CAAO,KAAK,OAAO,QAAQH,EAAK,KAAK,GAAG;AAClD,UAAAI,IAAaJ,EAAK,MAAME,CAAI;AAG9B,QAAAN,EAAMM,CAAI,MAAM,MAGhB,CAAAL,IAAe,EAAE,MAAAK,GAAM,QAAQ,IAAM,WAAWE,GAAY;AAGhE,UAAI,OAAOD,KAAY,YAAYA,MAAY,MAAM;AACnD,cAAME,IAAe,OAAO;AAAA,UAC1B,OAAO,QAAQF,CAAO,EAAE,OAAO,CAAC,CAACG,CAAM,MAAM;AAC3C,kBAAMF,IAAaJ,EAAK,MAAME,CAAI,EAAEI,CAAM,GACpCC,IACJ,MAAM,QAAQX,EAAMM,CAAI,CAAC,KAAKN,EAAMM,CAAI,EAAE,SAASI,CAAM,GAErDE,IAAmBX,IAAe;AAAA,cACtC,MAAAK;AAAA,cACA,QAAAI;AAAA,cACA,WAAWF;AAAAA,YAAA,CACZ;AAEM,mBAAA,CAACG,KAAoB,CAACC;AAAA,UAC9B,CAAA;AAAA,QACH;AAEA,QAAAP,EAAaC,CAAI,IAAIG;AAAA,MAAA;AAErB,QAAAJ,EAAaC,CAAI,IAAIC;AAAA,EACvB;AAGF,SAAO,EAAE,GAAGH,GAAM,OAAOC,EAAa;AACxC,CAAC;"}
|
package/lib/ui/Accordion.js
CHANGED
|
@@ -2,7 +2,7 @@ import { j as o } from "../jsx-runtime-C5mzlN2N.js";
|
|
|
2
2
|
import * as e from "@radix-ui/react-accordion";
|
|
3
3
|
import { ChevronDown as c } from "lucide-react";
|
|
4
4
|
import * as n from "react";
|
|
5
|
-
import { c as i } from "../cn-
|
|
5
|
+
import { c as i } from "../cn-CwJPJKOE.js";
|
|
6
6
|
const N = e.Root, m = n.forwardRef(({ className: a, ...t }, r) => /* @__PURE__ */ o.jsx(
|
|
7
7
|
e.Item,
|
|
8
8
|
{
|
package/lib/ui/ActionButton.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as t } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { forwardRef as m } from "react";
|
|
3
|
-
import { B as c } from "../Button-
|
|
3
|
+
import { B as c } from "../Button-Bdk_Ij3U.js";
|
|
4
4
|
import { S as n } from "../Spinner-mNLZ6awP.js";
|
|
5
|
-
import { c as s } from "../cn-
|
|
5
|
+
import { c as s } from "../cn-CwJPJKOE.js";
|
|
6
6
|
const l = m(
|
|
7
7
|
({ isPending: r, children: o, className: e, ...i }, a) => /* @__PURE__ */ t.jsxs(
|
|
8
8
|
c,
|
package/lib/ui/Alert.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as a } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { c as l } from "../index-
|
|
2
|
+
import { c as l } from "../index-Z13x6tPX.js";
|
|
3
3
|
import * as s from "react";
|
|
4
|
-
import { c as i } from "../cn-
|
|
4
|
+
import { c as i } from "../cn-CwJPJKOE.js";
|
|
5
5
|
const d = l(
|
|
6
6
|
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
7
7
|
{
|
package/lib/ui/AlertDialog.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as s } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import * as e from "@radix-ui/react-alert-dialog";
|
|
3
3
|
import * as i from "react";
|
|
4
|
-
import { c as l } from "../cn-
|
|
4
|
+
import { c as l } from "../cn-CwJPJKOE.js";
|
|
5
5
|
import { buttonVariants as r } from "./Button.js";
|
|
6
6
|
const D = e.Root, j = e.Trigger, n = e.Portal, d = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ s.jsx(
|
|
7
7
|
e.Overlay,
|
package/lib/ui/Badge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { c as n } from "../index-
|
|
3
|
-
import { c as a } from "../cn-
|
|
2
|
+
import { c as n } from "../index-Z13x6tPX.js";
|
|
3
|
+
import { c as a } from "../cn-CwJPJKOE.js";
|
|
4
4
|
const s = n(
|
|
5
5
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
6
6
|
{
|
package/lib/ui/Breadcrumb.js
CHANGED
|
@@ -2,7 +2,7 @@ import { j as a } from "../jsx-runtime-C5mzlN2N.js";
|
|
|
2
2
|
import { Slot as n } from "@radix-ui/react-slot";
|
|
3
3
|
import { MoreHorizontal as c, ChevronRight as d } from "lucide-react";
|
|
4
4
|
import * as o from "react";
|
|
5
|
-
import { c as t } from "../cn-
|
|
5
|
+
import { c as t } from "../cn-CwJPJKOE.js";
|
|
6
6
|
const l = o.forwardRef(({ ...r }, e) => /* @__PURE__ */ a.jsx("nav", { ref: e, "aria-label": "breadcrumb", ...r }));
|
|
7
7
|
l.displayName = "Breadcrumb";
|
|
8
8
|
const p = o.forwardRef(({ className: r, ...e }, s) => /* @__PURE__ */ a.jsx(
|
package/lib/ui/Button.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as d } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { Slot as i } from "@radix-ui/react-slot";
|
|
3
|
-
import { c as u } from "../index-
|
|
3
|
+
import { c as u } from "../index-Z13x6tPX.js";
|
|
4
4
|
import * as c from "react";
|
|
5
|
-
import { c as m } from "../cn-
|
|
5
|
+
import { c as m } from "../cn-CwJPJKOE.js";
|
|
6
6
|
const f = u(
|
|
7
7
|
"not-prose inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
8
8
|
{
|
package/lib/ui/Callout.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { ShieldAlertIcon as k, AlertTriangleIcon as u, InfoIcon as l, LightbulbIcon as m } from "lucide-react";
|
|
3
|
-
import { c as t } from "../cn-
|
|
3
|
+
import { c as t } from "../cn-CwJPJKOE.js";
|
|
4
4
|
const y = {
|
|
5
5
|
note: {
|
|
6
6
|
border: "border-gray-300 dark:border-zinc-800",
|
|
@@ -42,14 +42,14 @@ const y = {
|
|
|
42
42
|
textColor: "text-rose-700 dark:text-rose-100",
|
|
43
43
|
Icon: k
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, w = ({
|
|
46
46
|
type: d,
|
|
47
47
|
children: a,
|
|
48
48
|
title: e,
|
|
49
49
|
className: n,
|
|
50
50
|
icon: r = !0
|
|
51
51
|
}) => {
|
|
52
|
-
const { border: b, bg: s, iconColor: x, titleColor: i, textColor:
|
|
52
|
+
const { border: b, bg: s, iconColor: x, titleColor: i, textColor: c, Icon: g } = y[d];
|
|
53
53
|
return /* @__PURE__ */ o.jsxs(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
@@ -58,7 +58,7 @@ const y = {
|
|
|
58
58
|
r && "grid grid-cols-[min-content_1fr] items-baseline grid-rows-[fit-content_1fr] gap-x-4 gap-y-2",
|
|
59
59
|
!r && e && "flex flex-col gap-2",
|
|
60
60
|
"[&_a]:underline [&_a]:decoration-current [&_a]:decoration-from-font [&_a]:underline-offset-4 hover:[&_a]:decoration-1",
|
|
61
|
-
"[&
|
|
61
|
+
"[&_.code-block-wrapper]:border",
|
|
62
62
|
"[&_ul]:list-disc [&_ol]:list-decimal [&_ul]:ps-4 [&_ul>li]:ps-1 [&_ul>li]:my-1",
|
|
63
63
|
r && e && "items-center",
|
|
64
64
|
b,
|
|
@@ -67,7 +67,7 @@ const y = {
|
|
|
67
67
|
),
|
|
68
68
|
children: [
|
|
69
69
|
r && /* @__PURE__ */ o.jsx(
|
|
70
|
-
|
|
70
|
+
g,
|
|
71
71
|
{
|
|
72
72
|
className: t(e ? "align-middle" : "translate-y-1", x),
|
|
73
73
|
size: 20,
|
|
@@ -81,7 +81,7 @@ const y = {
|
|
|
81
81
|
className: t(
|
|
82
82
|
r && "col-start-2",
|
|
83
83
|
!e && r && "row-start-1",
|
|
84
|
-
|
|
84
|
+
c
|
|
85
85
|
),
|
|
86
86
|
children: a
|
|
87
87
|
}
|
|
@@ -91,6 +91,6 @@ const y = {
|
|
|
91
91
|
);
|
|
92
92
|
};
|
|
93
93
|
export {
|
|
94
|
-
|
|
94
|
+
w as Callout
|
|
95
95
|
};
|
|
96
96
|
//# sourceMappingURL=Callout.js.map
|