zudoku 0.62.0 → 0.63.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/cli/cli.d.ts +9 -0
- package/dist/cli/cli.js +4 -10
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/common/version-check.d.ts +2 -0
- package/dist/cli/common/version-check.js +58 -0
- package/dist/cli/common/version-check.js.map +1 -0
- package/dist/config/config.d.ts +3 -0
- package/dist/config/validators/InputNavigationSchema.d.ts +64 -4
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +15 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +29 -9
- package/dist/config/validators/validate.js +22 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +21 -2
- package/dist/lib/assets/language-icons/c.d.ts +3 -0
- package/dist/lib/assets/language-icons/c.js +4 -0
- package/dist/lib/assets/language-icons/c.js.map +1 -0
- package/dist/lib/assets/language-icons/commonlisp.d.ts +3 -0
- package/dist/lib/assets/language-icons/commonlisp.js +4 -0
- package/dist/lib/assets/language-icons/commonlisp.js.map +1 -0
- package/dist/lib/assets/language-icons/cpp.d.ts +3 -0
- package/dist/lib/assets/language-icons/cpp.js +4 -0
- package/dist/lib/assets/language-icons/cpp.js.map +1 -0
- package/dist/lib/assets/language-icons/dart.d.ts +3 -0
- package/dist/lib/assets/language-icons/dart.js +4 -0
- package/dist/lib/assets/language-icons/dart.js.map +1 -0
- package/dist/lib/assets/language-icons/elixir.d.ts +3 -0
- package/dist/lib/assets/language-icons/elixir.js +4 -0
- package/dist/lib/assets/language-icons/elixir.js.map +1 -0
- package/dist/lib/assets/language-icons/ocaml.d.ts +3 -0
- package/dist/lib/assets/language-icons/ocaml.js +4 -0
- package/dist/lib/assets/language-icons/ocaml.js.map +1 -0
- package/dist/lib/assets/language-icons/powershell.d.ts +3 -0
- package/dist/lib/assets/language-icons/powershell.js +4 -0
- package/dist/lib/assets/language-icons/powershell.js.map +1 -0
- package/dist/lib/assets/language-icons/scala.d.ts +3 -0
- package/dist/lib/assets/language-icons/scala.js +4 -0
- package/dist/lib/assets/language-icons/scala.js.map +1 -0
- package/dist/lib/assets/language-icons/zig.d.ts +3 -0
- package/dist/lib/assets/language-icons/zig.js +4 -0
- package/dist/lib/assets/language-icons/zig.js.map +1 -0
- package/dist/lib/authentication/providers/auth0.js +7 -3
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/components/Heading.js +1 -5
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/LanguageIcon.js +45 -0
- package/dist/lib/components/LanguageIcon.js.map +1 -1
- package/dist/lib/components/Main.js +1 -1
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/cache.d.ts +3 -1
- package/dist/lib/components/cache.js +3 -5
- package/dist/lib/components/cache.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +10 -2
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +1 -2
- package/dist/lib/hooks/index.d.ts +1 -1
- package/dist/lib/oas/graphql/index.js +17 -0
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +26 -3
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/assets/ChatGPTLogo.d.ts +2 -0
- package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js +3 -0
- package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js.map +1 -0
- package/dist/lib/plugins/markdown/assets/ClaudeLogo.d.ts +2 -0
- package/dist/lib/plugins/markdown/assets/ClaudeLogo.js +3 -0
- package/dist/lib/plugins/markdown/assets/ClaudeLogo.js.map +1 -0
- package/dist/lib/plugins/markdown/index.d.ts +2 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +7 -2
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js +6 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +2 -1
- package/dist/lib/plugins/openapi/Sidecar.js +6 -9
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +8 -2
- package/dist/lib/plugins/openapi/graphql/graphql.js +8 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/shiki.js +9 -0
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Carousel.js.map +1 -1
- package/dist/lib/ui/Dialog.d.ts +12 -18
- package/dist/lib/ui/Dialog.js +30 -17
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/util/pastellize.js +4 -4
- package/dist/lib/util/pastellize.js.map +1 -1
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/llms.d.ts +12 -0
- package/dist/vite/llms.js +66 -0
- package/dist/vite/llms.js.map +1 -0
- package/dist/vite/plugin-docs.d.ts +9 -0
- package/dist/vite/plugin-docs.js +67 -48
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-markdown-export.d.ts +21 -0
- package/dist/vite/plugin-markdown-export.js +139 -0
- package/dist/vite/plugin-markdown-export.js.map +1 -0
- package/dist/vite/plugin-navigation.js +4 -0
- package/dist/vite/plugin-navigation.js.map +1 -1
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/prerender.js +30 -0
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/lib/{Button-DTDRi4CT.js → Button-DmS4u8Lj.js} +2 -2
- package/lib/{Button-DTDRi4CT.js.map → Button-DmS4u8Lj.js.map} +1 -1
- package/lib/{Card-hTy9PAnh.js → Card-KFniaZn5.js} +2 -2
- package/lib/{Card-hTy9PAnh.js.map → Card-KFniaZn5.js.map} +1 -1
- package/lib/{CategoryHeading-BGCNu3VK.js → CategoryHeading-DhmodDcq.js} +2 -2
- package/lib/{CategoryHeading-BGCNu3VK.js.map → CategoryHeading-DhmodDcq.js.map} +1 -1
- package/lib/CodeBlock-CanTUJLl.js +221 -0
- package/lib/CodeBlock-CanTUJLl.js.map +1 -0
- package/lib/{Command-TEBTONf1.js → Command-CUcrW3qs.js} +3 -3
- package/lib/{Command-TEBTONf1.js.map → Command-CUcrW3qs.js.map} +1 -1
- package/lib/Dialog-BQciPiHN.js +144 -0
- package/lib/Dialog-BQciPiHN.js.map +1 -0
- package/lib/{Drawer-DM9wJUC6.js → Drawer-Ci7XwhqT.js} +2 -2
- package/lib/Drawer-Ci7XwhqT.js.map +1 -0
- package/lib/DropdownMenu-BZ2NKQ3K.js +126 -0
- package/lib/DropdownMenu-BZ2NKQ3K.js.map +1 -0
- package/lib/{ErrorAlert-xpVkFS_n.js → ErrorAlert-VBJ8aHH7.js} +100 -103
- package/lib/ErrorAlert-VBJ8aHH7.js.map +1 -0
- package/lib/MdxPage-DFRNwSsc.js +239 -0
- package/lib/MdxPage-DFRNwSsc.js.map +1 -0
- package/lib/{OAuthErrorPage-DCjFngGS.js → OAuthErrorPage-DJUOdr6Q.js} +7 -7
- package/lib/{OAuthErrorPage-DCjFngGS.js.map → OAuthErrorPage-DJUOdr6Q.js.map} +1 -1
- package/lib/{OasProvider-B6Co-6Vj.js → OasProvider-D2NYAaBN.js} +3 -3
- package/lib/{OasProvider-B6Co-6Vj.js.map → OasProvider-D2NYAaBN.js.map} +1 -1
- package/lib/{OperationList-uu04Ezta.js → OperationList-DmXCI4NU.js} +1328 -1319
- package/lib/OperationList-DmXCI4NU.js.map +1 -0
- package/lib/{Pagination-Cdi_qiXc.js → Pagination-CT4VUR6u.js} +3 -3
- package/lib/{Pagination-Cdi_qiXc.js.map → Pagination-CT4VUR6u.js.map} +1 -1
- package/lib/{RouteGuard-dji1UEYe.js → RouteGuard-Bg0Lu0OU.js} +5 -5
- package/lib/{RouteGuard-dji1UEYe.js.map → RouteGuard-Bg0Lu0OU.js.map} +1 -1
- package/lib/{RouterError-D1I15Qyy.js → RouterError-fm21cqlj.js} +4 -4
- package/lib/{RouterError-D1I15Qyy.js.map → RouterError-fm21cqlj.js.map} +1 -1
- package/lib/{SchemaList-BExl5RED.js → SchemaList-uElsscMN.js} +10 -10
- package/lib/{SchemaList-BExl5RED.js.map → SchemaList-uElsscMN.js.map} +1 -1
- package/lib/{SchemaView-BYH_AirG.js → SchemaView-CNQ3VAbI.js} +5 -5
- package/lib/{SchemaView-BYH_AirG.js.map → SchemaView-CNQ3VAbI.js.map} +1 -1
- package/lib/{Select-CegS9OKH.js → Select-CPoGZU_V.js} +4 -4
- package/lib/{Select-CegS9OKH.js.map → Select-CPoGZU_V.js.map} +1 -1
- package/lib/{SignUp-C-YP_Rxi.js → SignUp-BraHuRN_.js} +9 -9
- package/lib/{SignUp-C-YP_Rxi.js.map → SignUp-BraHuRN_.js.map} +1 -1
- package/lib/{Spinner-Cf6E803I.js → Spinner-CI6bRyZw.js} +2 -2
- package/lib/{Spinner-Cf6E803I.js.map → Spinner-CI6bRyZw.js.map} +1 -1
- package/lib/{SyntaxHighlight-CPF64UHi.js → SyntaxHighlight-B0laqAqK.js} +6 -6
- package/lib/{SyntaxHighlight-CPF64UHi.js.map → SyntaxHighlight-B0laqAqK.js.map} +1 -1
- package/lib/{Toc-Cf5UojVb.js → Toc-KzXCRqrX.js} +3 -3
- package/lib/{Toc-Cf5UojVb.js.map → Toc-KzXCRqrX.js.map} +1 -1
- package/lib/ZudokuContext-BXTZApgy.js +1506 -0
- package/lib/ZudokuContext-BXTZApgy.js.map +1 -0
- package/lib/c-B-NUhs61.js +46 -0
- package/lib/c-B-NUhs61.js.map +1 -0
- package/lib/chunk-PVWAREVJ-BO6B-RAk.js.map +1 -1
- package/lib/{circular-06Yrxzsw.js → circular-BWT7_Ahq.js} +30 -30
- package/lib/{circular-06Yrxzsw.js.map → circular-BWT7_Ahq.js.map} +1 -1
- package/lib/commonlisp-De080z23.js +28 -0
- package/lib/commonlisp-De080z23.js.map +1 -0
- package/lib/cpp-79Paht7T.js +53 -0
- package/lib/cpp-79Paht7T.js.map +1 -0
- package/lib/{createServer-BA0aitmR.js → createServer-zhJZSgor.js} +1120 -1083
- package/lib/createServer-zhJZSgor.js.map +1 -0
- package/lib/{csharp-rrJEDRrV.js → csharp-D8MIL50B.js} +2 -2
- package/lib/{csharp-rrJEDRrV.js.map → csharp-D8MIL50B.js.map} +1 -1
- package/lib/{css-Dpk9bCql.js → css-Bt6hr1td.js} +2 -2
- package/lib/{css-Dpk9bCql.js.map → css-Bt6hr1td.js.map} +1 -1
- package/lib/dart-B0vy1jWB.js +60 -0
- package/lib/dart-B0vy1jWB.js.map +1 -0
- package/lib/elixir-Ds8r0sF8.js +25 -0
- package/lib/elixir-Ds8r0sF8.js.map +1 -0
- package/lib/{errors-ouIp07AW.js → errors-XqO6MsfU.js} +3 -3
- package/lib/{errors-ouIp07AW.js.map → errors-XqO6MsfU.js.map} +1 -1
- package/lib/{go-D8SJIQ0Z.js → go-D2VsmIOS.js} +2 -2
- package/lib/{go-D8SJIQ0Z.js.map → go-D2VsmIOS.js.map} +1 -1
- package/lib/{graphql-aeVKJNa2.js → graphql-BtA6M4m5.js} +2 -2
- package/lib/{graphql-aeVKJNa2.js.map → graphql-BtA6M4m5.js.map} +1 -1
- package/lib/hook-CAebs2rv.js +31 -0
- package/lib/hook-CAebs2rv.js.map +1 -0
- package/lib/{html-D_7om-nA.js → html-MGnI2uzP.js} +2 -2
- package/lib/{html-D_7om-nA.js.map → html-MGnI2uzP.js.map} +1 -1
- package/lib/{index-CVfG8Pb4.js → index-BPSpOxTK.js} +26 -26
- package/lib/index-BPSpOxTK.js.map +1 -0
- package/lib/{index-DhL3LhWV.js → index-C5L4favO.js} +166 -50
- package/lib/index-C5L4favO.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-BRQDtecD.js → index-D8Btv4uT.js} +706 -809
- package/lib/index-D8Btv4uT.js.map +1 -0
- package/lib/index.esm-BYObtETB.js +1294 -0
- package/lib/index.esm-BYObtETB.js.map +1 -0
- package/lib/index.esm-BnYHxCYC.js.map +1 -1
- package/lib/{java-DUh-EL8n.js → java-CVLzHfb1.js} +2 -2
- package/lib/{java-DUh-EL8n.js.map → java-CVLzHfb1.js.map} +1 -1
- package/lib/{javascript-CrY8dcGu.js → javascript-CcmIpL4G.js} +2 -2
- package/lib/{javascript-CrY8dcGu.js.map → javascript-CcmIpL4G.js.map} +1 -1
- package/lib/{json-DLK2_sdf.js → json-4AyP4uiY.js} +2 -2
- package/lib/{json-DLK2_sdf.js.map → json-4AyP4uiY.js.map} +1 -1
- package/lib/{jsx-runtime-DywqP_6a.js → jsx-runtime-BzflLqGi.js} +109 -111
- package/lib/jsx-runtime-BzflLqGi.js.map +1 -0
- package/lib/{kotlin-rJMOGl7D.js → kotlin-v2plddBQ.js} +2 -2
- package/lib/{kotlin-rJMOGl7D.js.map → kotlin-v2plddBQ.js.map} +1 -1
- package/lib/{markdown-BD9bIU5J.js → markdown-DYGWCmGQ.js} +2 -2
- package/lib/{markdown-BD9bIU5J.js.map → markdown-DYGWCmGQ.js.map} +1 -1
- package/lib/{mdx-G25UCvf3.js → mdx-CHwYvXd4.js} +2 -2
- package/lib/{mdx-G25UCvf3.js.map → mdx-CHwYvXd4.js.map} +1 -1
- package/lib/{mutation-De-1gXxl.js → mutation-CdGPxHNX.js} +2 -2
- package/lib/{mutation-De-1gXxl.js.map → mutation-CdGPxHNX.js.map} +1 -1
- package/lib/{objectivec-DDpj0aWX.js → objectivec-HZY8shkd.js} +2 -2
- package/lib/{objectivec-DDpj0aWX.js.map → objectivec-HZY8shkd.js.map} +1 -1
- package/lib/ocaml-DqsdDdwb.js +52 -0
- package/lib/ocaml-DqsdDdwb.js.map +1 -0
- package/lib/{php-BeG18bSy.js → php-rQXzo7K_.js} +2 -2
- package/lib/{php-BeG18bSy.js.map → php-rQXzo7K_.js.map} +1 -1
- package/lib/powershell-CQje9pm1.js +39 -0
- package/lib/powershell-CQje9pm1.js.map +1 -0
- package/lib/{python-BaF2byD-.js → python-QIQAE5Ei.js} +2 -2
- package/lib/{python-BaF2byD-.js.map → python-QIQAE5Ei.js.map} +1 -1
- package/lib/{react-CQvDN20M.js → react-DHpVpxRv.js} +2 -2
- package/lib/{react-CQvDN20M.js.map → react-DHpVpxRv.js.map} +1 -1
- package/lib/{ruby-CmxRVHMR.js → ruby-B2dU8Ny5.js} +2 -2
- package/lib/{ruby-CmxRVHMR.js.map → ruby-B2dU8Ny5.js.map} +1 -1
- package/lib/{rust-IfSC62c5.js → rust-DYnLHAi2.js} +2 -2
- package/lib/{rust-IfSC62c5.js.map → rust-DYnLHAi2.js.map} +1 -1
- package/lib/scala-CeKInBR8.js +25 -0
- package/lib/scala-CeKInBR8.js.map +1 -0
- package/lib/{shell-BFu0M6m4.js → shell-HUv9oVtp.js} +2 -2
- package/lib/{shell-BFu0M6m4.js.map → shell-HUv9oVtp.js.map} +1 -1
- package/lib/{swift-DckbsN4v.js → swift-B4z6ig1Z.js} +2 -2
- package/lib/{swift-DckbsN4v.js.map → swift-B4z6ig1Z.js.map} +1 -1
- package/lib/{toml-BJsCc8TC.js → toml-Co9mpdct.js} +2 -2
- package/lib/{toml-BJsCc8TC.js.map → toml-Co9mpdct.js.map} +1 -1
- package/lib/{typescript-7qOVMjOC.js → typescript-C26xdBDC.js} +2 -2
- package/lib/{typescript-7qOVMjOC.js.map → typescript-C26xdBDC.js.map} +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +3 -3
- package/lib/ui/Alert.js +1 -1
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +1 -1
- package/lib/ui/Callout.js +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/CodeBlock.js +2 -2
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Dialog.js +135 -105
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +1 -1
- 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/ReactComponentDoc.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Secret.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/Stepper.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +4 -4
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/Value.js +1 -1
- package/lib/{useExposedProps-B8NHdNRq.js → useExposedProps-Cd7Yg_uG.js} +3 -3
- package/lib/useExposedProps-Cd7Yg_uG.js.map +1 -0
- package/lib/{xml-DAaTIkBX.js → xml-BQOOC04j.js} +2 -2
- package/lib/{xml-DAaTIkBX.js.map → xml-BQOOC04j.js.map} +1 -1
- package/lib/{yaml-DUi-dbfu.js → yaml-BGsJItKv.js} +2 -2
- package/lib/{yaml-DUi-dbfu.js.map → yaml-BGsJItKv.js.map} +1 -1
- package/lib/zig-CUV2sTct.js +35 -0
- package/lib/zig-CUV2sTct.js.map +1 -0
- package/lib/zudoku.__internal.js +1040 -937
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +22 -21
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +14 -15
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +3 -3
- package/lib/zudoku.auth-openid.js +57 -58
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +2 -2
- package/lib/zudoku.components.js +6 -6
- package/lib/zudoku.hooks.js +6 -6
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +27 -28
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +89 -89
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +4 -4
- package/lib/zudoku.plugin-search-inkeep.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +27 -28
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.router.js +1 -1
- package/lib/zudoku.router.js.map +1 -1
- package/package.json +37 -37
- package/src/lib/assets/language-icons/c.tsx +31 -0
- package/src/lib/assets/language-icons/commonlisp.tsx +22 -0
- package/src/lib/assets/language-icons/cpp.tsx +35 -0
- package/src/lib/assets/language-icons/dart.tsx +39 -0
- package/src/lib/assets/language-icons/elixir.tsx +19 -0
- package/src/lib/assets/language-icons/ocaml.tsx +34 -0
- package/src/lib/assets/language-icons/powershell.tsx +27 -0
- package/src/lib/assets/language-icons/scala.tsx +19 -0
- package/src/lib/assets/language-icons/zig.tsx +32 -0
- package/src/lib/authentication/providers/auth0.tsx +7 -3
- package/src/lib/components/Heading.tsx +2 -6
- package/src/lib/components/LanguageIcon.tsx +45 -0
- package/src/lib/components/Main.tsx +1 -1
- package/src/lib/components/cache.ts +9 -5
- package/src/lib/components/context/ZudokuContext.ts +11 -2
- package/src/lib/oas/graphql/index.ts +19 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +122 -8
- package/src/lib/plugins/markdown/assets/ChatGPTLogo.tsx +11 -0
- package/src/lib/plugins/markdown/assets/ClaudeLogo.tsx +19 -0
- package/src/lib/plugins/markdown/index.tsx +3 -7
- package/src/lib/plugins/openapi/OperationList.tsx +9 -2
- package/src/lib/plugins/openapi/OperationListItem.tsx +10 -5
- package/src/lib/plugins/openapi/Sidecar.tsx +8 -8
- package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +4 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +20 -3
- package/src/lib/plugins/openapi/index.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/shiki.ts +9 -0
- package/src/lib/ui/Carousel.tsx +0 -1
- package/src/lib/ui/Dialog.tsx +112 -106
- package/src/lib/util/pastellize.ts +4 -4
- package/src/shiki/langs/hurl.js +1 -0
- package/src/shiki/langs/kdl.js +1 -0
- package/src/shiki/langs/pkl.js +1 -0
- package/src/shiki/langs/rosmsg.js +1 -0
- package/lib/CodeBlock-i0BM_QFf.js +0 -176
- package/lib/CodeBlock-i0BM_QFf.js.map +0 -1
- package/lib/Dialog-VIMic7xI.js +0 -114
- package/lib/Dialog-VIMic7xI.js.map +0 -1
- package/lib/Drawer-DM9wJUC6.js.map +0 -1
- package/lib/ErrorAlert-xpVkFS_n.js.map +0 -1
- package/lib/MdxPage-Ud1w_GV-.js +0 -111
- package/lib/MdxPage-Ud1w_GV-.js.map +0 -1
- package/lib/OperationList-uu04Ezta.js.map +0 -1
- package/lib/ZudokuContext-BcqSiygJ.js +0 -1294
- package/lib/ZudokuContext-BcqSiygJ.js.map +0 -1
- package/lib/createServer-BA0aitmR.js.map +0 -1
- package/lib/hook-BkLXq8pm.js +0 -243
- package/lib/hook-BkLXq8pm.js.map +0 -1
- package/lib/index-BRQDtecD.js.map +0 -1
- package/lib/index-CVfG8Pb4.js.map +0 -1
- package/lib/index-DhL3LhWV.js.map +0 -1
- package/lib/index.esm-DpgNxKa2.js +0 -1267
- package/lib/index.esm-DpgNxKa2.js.map +0 -1
- package/lib/jsx-runtime-DywqP_6a.js.map +0 -1
- package/lib/useExposedProps-B8NHdNRq.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { CircleSlashIcon as z, CheckIcon as ue, XIcon as he, PencilLineIcon as fe, RefreshCwIcon as pe, TrashIcon as me, KeyRoundIcon as xe } from "lucide-react";
|
|
3
|
-
import { R as ye } from "./RouterError-
|
|
3
|
+
import { R as ye } from "./RouterError-fm21cqlj.js";
|
|
4
4
|
import { i as I } from "./invariant-Bm-FVUQE.js";
|
|
5
5
|
import { O as ge, b as je } from "./chunk-PVWAREVJ-BO6B-RAk.js";
|
|
6
|
-
import {
|
|
7
|
-
import { D as ve, a as Y } from "./ErrorAlert-
|
|
6
|
+
import { u as Ce } from "./hook-CAebs2rv.js";
|
|
7
|
+
import { D as ve, a as Y } from "./ErrorAlert-VBJ8aHH7.js";
|
|
8
8
|
import { Button as w } from "./ui/Button.js";
|
|
9
|
-
import {
|
|
10
|
-
import { u as O, A as M, a as q, b as be, S as ke, c as Ne, d as Ke, e as Ee, f as De, g as Z, h as Ae } from "./Select-
|
|
9
|
+
import { a as se, i as ne, b as we } from "./ZudokuContext-BXTZApgy.js";
|
|
10
|
+
import { u as O, A as M, a as q, b as be, S as ke, c as Ne, d as Ke, e as Ee, f as De, g as Z, h as Ae } from "./Select-CPoGZU_V.js";
|
|
11
11
|
import * as L from "react";
|
|
12
|
-
import Pe, { createContext as Q, useRef as E, useLayoutEffect as Ie, useEffect as
|
|
13
|
-
import { C as qe, a as $e } from "./Card-
|
|
14
|
-
import { e as H, f as D, D as V, g as G, a as J, b as U, c as W, d as
|
|
12
|
+
import Pe, { createContext as Q, useRef as E, useLayoutEffect as Ie, useEffect as ie, useId as _, useContext as B, useInsertionEffect as Re, useMemo as F, useCallback as Se, Children as Te, isValidElement as Oe, useState as K, forwardRef as Me } from "react";
|
|
13
|
+
import { C as qe, a as $e } from "./Card-KFniaZn5.js";
|
|
14
|
+
import { e as H, f as D, D as V, g as G, a as J, b as U, c as W, d as re } from "./Dialog-BQciPiHN.js";
|
|
15
15
|
import { Input as ae } from "./ui/Input.js";
|
|
16
16
|
import { c as A } from "./cn-dYga0KKN.js";
|
|
17
|
-
import { a as ze } from "./index.esm-
|
|
18
|
-
import { B as Fe } from "./Button-
|
|
19
|
-
import { S as Le } from "./Spinner-
|
|
17
|
+
import { a as ze } from "./index.esm-BYObtETB.js";
|
|
18
|
+
import { B as Fe } from "./Button-DmS4u8Lj.js";
|
|
19
|
+
import { S as Le } from "./Spinner-CI6bRyZw.js";
|
|
20
20
|
import { useAuth as Qe } from "./zudoku.hooks.js";
|
|
21
21
|
const _e = () => {
|
|
22
22
|
const t = Ce();
|
|
@@ -30,10 +30,10 @@ const _e = () => {
|
|
|
30
30
|
] }) });
|
|
31
31
|
}, Be = Q({});
|
|
32
32
|
function oe(t) {
|
|
33
|
-
const
|
|
34
|
-
return
|
|
33
|
+
const i = E(null);
|
|
34
|
+
return i.current === null && (i.current = t()), i.current;
|
|
35
35
|
}
|
|
36
|
-
const He = typeof window < "u", Ve = He ? Ie :
|
|
36
|
+
const He = typeof window < "u", Ve = He ? Ie : ie, le = /* @__PURE__ */ Q(null);
|
|
37
37
|
function Ge(t) {
|
|
38
38
|
return typeof t == "object" && t !== null;
|
|
39
39
|
}
|
|
@@ -46,11 +46,11 @@ const Ue = Q({
|
|
|
46
46
|
reducedMotion: "never"
|
|
47
47
|
});
|
|
48
48
|
class We extends L.Component {
|
|
49
|
-
getSnapshotBeforeUpdate(
|
|
49
|
+
getSnapshotBeforeUpdate(i) {
|
|
50
50
|
const s = this.props.childRef.current;
|
|
51
|
-
if (s &&
|
|
52
|
-
const n = s.offsetParent,
|
|
53
|
-
a.height = s.offsetHeight || 0, a.width = s.offsetWidth || 0, a.top = s.offsetTop, a.left = s.offsetLeft, a.right =
|
|
51
|
+
if (s && i.isPresent && !this.props.isPresent) {
|
|
52
|
+
const n = s.offsetParent, r = Je(n) && n.offsetWidth || 0, a = this.props.sizeRef.current;
|
|
53
|
+
a.height = s.offsetHeight || 0, a.width = s.offsetWidth || 0, a.top = s.offsetTop, a.left = s.offsetLeft, a.right = r - a.width - a.left;
|
|
54
54
|
}
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
@@ -63,8 +63,8 @@ class We extends L.Component {
|
|
|
63
63
|
return this.props.children;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
function Xe({ children: t, isPresent:
|
|
67
|
-
const
|
|
66
|
+
function Xe({ children: t, isPresent: i, anchorX: s, root: n }) {
|
|
67
|
+
const r = _(), a = E(null), l = E({
|
|
68
68
|
width: 0,
|
|
69
69
|
height: 0,
|
|
70
70
|
top: 0,
|
|
@@ -73,15 +73,15 @@ function Xe({ children: t, isPresent: r, anchorX: s, root: n }) {
|
|
|
73
73
|
}), { nonce: u } = B(Ue);
|
|
74
74
|
return Re(() => {
|
|
75
75
|
const { width: h, height: d, top: g, left: f, right: m } = l.current;
|
|
76
|
-
if (
|
|
76
|
+
if (i || !a.current || !h || !d)
|
|
77
77
|
return;
|
|
78
78
|
const p = s === "left" ? `left: ${f}` : `right: ${m}`;
|
|
79
|
-
a.current.dataset.motionPopId =
|
|
79
|
+
a.current.dataset.motionPopId = r;
|
|
80
80
|
const x = document.createElement("style");
|
|
81
81
|
u && (x.nonce = u);
|
|
82
82
|
const j = n ?? document.head;
|
|
83
83
|
return j.appendChild(x), x.sheet && x.sheet.insertRule(`
|
|
84
|
-
[data-motion-pop-id="${
|
|
84
|
+
[data-motion-pop-id="${r}"] {
|
|
85
85
|
position: absolute !important;
|
|
86
86
|
width: ${h}px !important;
|
|
87
87
|
height: ${d}px !important;
|
|
@@ -91,15 +91,15 @@ function Xe({ children: t, isPresent: r, anchorX: s, root: n }) {
|
|
|
91
91
|
`), () => {
|
|
92
92
|
j.contains(x) && j.removeChild(x);
|
|
93
93
|
};
|
|
94
|
-
}, [
|
|
94
|
+
}, [i]), e.jsx(We, { isPresent: i, childRef: a, sizeRef: l, children: L.cloneElement(t, { ref: a }) });
|
|
95
95
|
}
|
|
96
|
-
const Ye = ({ children: t, initial:
|
|
96
|
+
const Ye = ({ children: t, initial: i, isPresent: s, onExitComplete: n, custom: r, presenceAffectsLayout: a, mode: l, anchorX: u, root: h }) => {
|
|
97
97
|
const d = oe(Ze), g = _();
|
|
98
98
|
let f = !0, m = F(() => (f = !1, {
|
|
99
99
|
id: g,
|
|
100
|
-
initial:
|
|
100
|
+
initial: i,
|
|
101
101
|
isPresent: s,
|
|
102
|
-
custom:
|
|
102
|
+
custom: r,
|
|
103
103
|
onExitComplete: (p) => {
|
|
104
104
|
d.set(p, !0);
|
|
105
105
|
for (const x of d.values())
|
|
@@ -119,25 +119,25 @@ function Ze() {
|
|
|
119
119
|
return /* @__PURE__ */ new Map();
|
|
120
120
|
}
|
|
121
121
|
function et(t = !0) {
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
122
|
+
const i = B(le);
|
|
123
|
+
if (i === null)
|
|
124
124
|
return [!0, null];
|
|
125
|
-
const { isPresent: s, onExitComplete: n, register:
|
|
126
|
-
|
|
125
|
+
const { isPresent: s, onExitComplete: n, register: r } = i, a = _();
|
|
126
|
+
ie(() => {
|
|
127
127
|
if (t)
|
|
128
|
-
return
|
|
128
|
+
return r(a);
|
|
129
129
|
}, [t]);
|
|
130
130
|
const l = Se(() => t && n && n(a), [a, n, t]);
|
|
131
131
|
return !s && n ? [!1, l] : [!0];
|
|
132
132
|
}
|
|
133
133
|
const R = (t) => t.key || "";
|
|
134
134
|
function ee(t) {
|
|
135
|
-
const
|
|
135
|
+
const i = [];
|
|
136
136
|
return Te.forEach(t, (s) => {
|
|
137
|
-
Oe(s) &&
|
|
138
|
-
}),
|
|
137
|
+
Oe(s) && i.push(s);
|
|
138
|
+
}), i;
|
|
139
139
|
}
|
|
140
|
-
const tt = ({ children: t, custom:
|
|
140
|
+
const tt = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presenceAffectsLayout: r = !0, mode: a = "sync", propagate: l = !1, anchorX: u = "left", root: h }) => {
|
|
141
141
|
const [d, g] = et(l), f = F(() => ee(t), [t]), m = l && !d ? [] : f.map(R), p = E(!0), x = E(f), j = oe(() => /* @__PURE__ */ new Map()), [P, o] = K(f), [c, C] = K(f);
|
|
142
142
|
Ve(() => {
|
|
143
143
|
p.current = !1, x.current = f;
|
|
@@ -168,19 +168,19 @@ const tt = ({ children: t, custom: r, initial: s = !0, onExitComplete: n, presen
|
|
|
168
168
|
de || (X = !1);
|
|
169
169
|
}), X && (k?.(), C(x.current), l && g?.(), n && n());
|
|
170
170
|
};
|
|
171
|
-
return e.jsx(Ye, { isPresent: N, initial: !p.current || s ? void 0 : !1, custom:
|
|
171
|
+
return e.jsx(Ye, { isPresent: N, initial: !p.current || s ? void 0 : !1, custom: i, presenceAffectsLayout: r, mode: a, root: h, onExitComplete: N ? void 0 : $, anchorX: u, children: v }, y);
|
|
172
172
|
}) });
|
|
173
173
|
}, ce = Me(
|
|
174
|
-
({ isPending: t, children:
|
|
174
|
+
({ isPending: t, children: i, className: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
|
|
175
175
|
Fe,
|
|
176
176
|
{
|
|
177
|
-
ref:
|
|
177
|
+
ref: r,
|
|
178
178
|
disabled: t,
|
|
179
179
|
...n,
|
|
180
180
|
className: A("relative", s),
|
|
181
181
|
children: [
|
|
182
182
|
t && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 grid place-items-center", children: /* @__PURE__ */ e.jsx(Le, {}) }),
|
|
183
|
-
/* @__PURE__ */ e.jsx("span", { className: A("block", t && "invisible"), children:
|
|
183
|
+
/* @__PURE__ */ e.jsx("span", { className: A("block", t && "invisible"), children: i })
|
|
184
184
|
]
|
|
185
185
|
}
|
|
186
186
|
)
|
|
@@ -188,9 +188,9 @@ const tt = ({ children: t, custom: r, initial: s = !0, onExitComplete: n, presen
|
|
|
188
188
|
ce.displayName = "ActionButton";
|
|
189
189
|
const st = ({
|
|
190
190
|
service: t,
|
|
191
|
-
onOpenChange:
|
|
191
|
+
onOpenChange: i
|
|
192
192
|
}) => {
|
|
193
|
-
const s = se(), n = ne(),
|
|
193
|
+
const s = se(), n = ne(), r = je(), a = ze({
|
|
194
194
|
defaultValues: {
|
|
195
195
|
expiresOn: "30"
|
|
196
196
|
}
|
|
@@ -209,7 +209,7 @@ const st = ({
|
|
|
209
209
|
});
|
|
210
210
|
},
|
|
211
211
|
onSuccess: async () => {
|
|
212
|
-
await n.invalidateQueries({ queryKey: ["api-keys"] }), await
|
|
212
|
+
await n.invalidateQueries({ queryKey: ["api-keys"] }), await r("/settings/api-keys/");
|
|
213
213
|
}
|
|
214
214
|
});
|
|
215
215
|
return t.createKey ? /* @__PURE__ */ e.jsxs(
|
|
@@ -219,7 +219,7 @@ const st = ({
|
|
|
219
219
|
(h) => u.mutate(
|
|
220
220
|
{ ...h },
|
|
221
221
|
{
|
|
222
|
-
onSuccess: () =>
|
|
222
|
+
onSuccess: () => i(!1)
|
|
223
223
|
}
|
|
224
224
|
)
|
|
225
225
|
),
|
|
@@ -258,28 +258,28 @@ const st = ({
|
|
|
258
258
|
}
|
|
259
259
|
) : null;
|
|
260
260
|
}, nt = (t) => {
|
|
261
|
-
const
|
|
262
|
-
return
|
|
261
|
+
const i = /* @__PURE__ */ new Date();
|
|
262
|
+
return i.setDate(i.getDate() + t), i.toISOString();
|
|
263
263
|
}, te = ({
|
|
264
264
|
service: t,
|
|
265
|
-
isOpen:
|
|
265
|
+
isOpen: i,
|
|
266
266
|
onOpenChange: s,
|
|
267
267
|
trigger: n,
|
|
268
|
-
buttonVariant:
|
|
268
|
+
buttonVariant: r = "outline"
|
|
269
269
|
}) => {
|
|
270
|
-
const a = /* @__PURE__ */ e.jsx(w, { variant:
|
|
271
|
-
return /* @__PURE__ */ e.jsxs(V, { open:
|
|
270
|
+
const a = /* @__PURE__ */ e.jsx(w, { variant: r, children: "Create API Key" });
|
|
271
|
+
return /* @__PURE__ */ e.jsxs(V, { open: i, onOpenChange: s, children: [
|
|
272
272
|
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: n ?? a }),
|
|
273
273
|
/* @__PURE__ */ e.jsxs(J, { children: [
|
|
274
274
|
/* @__PURE__ */ e.jsx(U, { children: /* @__PURE__ */ e.jsx(W, { children: "Create API Key" }) }),
|
|
275
275
|
/* @__PURE__ */ e.jsx(st, { service: t, onOpenChange: s })
|
|
276
276
|
] })
|
|
277
277
|
] });
|
|
278
|
-
},
|
|
279
|
-
const
|
|
278
|
+
}, it = ({ service: t }) => {
|
|
279
|
+
const i = se(), s = ne(), [n, r] = K(
|
|
280
280
|
null
|
|
281
281
|
), [a, l] = K(""), { data: u, isFetching: h } = we({
|
|
282
|
-
queryFn: () => t.getConsumers(
|
|
282
|
+
queryFn: () => t.getConsumers(i),
|
|
283
283
|
queryKey: ["api-keys"],
|
|
284
284
|
retry: !1
|
|
285
285
|
}), [d, g] = K(!1), f = O({
|
|
@@ -289,7 +289,7 @@ const st = ({
|
|
|
289
289
|
}) => {
|
|
290
290
|
if (!t.deleteKey)
|
|
291
291
|
throw new Error("deleteKey not implemented");
|
|
292
|
-
return t.deleteKey(o, c,
|
|
292
|
+
return t.deleteKey(o, c, i);
|
|
293
293
|
},
|
|
294
294
|
onMutate: async ({ consumerId: o, keyId: c }) => {
|
|
295
295
|
await s.cancelQueries({ queryKey: ["api-keys"] });
|
|
@@ -314,7 +314,7 @@ const st = ({
|
|
|
314
314
|
}) => {
|
|
315
315
|
if (!t.updateConsumer)
|
|
316
316
|
throw new Error("updateConsumer not implemented");
|
|
317
|
-
return t.updateConsumer({ id: o, label: c },
|
|
317
|
+
return t.updateConsumer({ id: o, label: c }, i);
|
|
318
318
|
},
|
|
319
319
|
onMutate: async ({ consumerId: o, label: c }) => {
|
|
320
320
|
await s.cancelQueries({ queryKey: ["api-keys"] });
|
|
@@ -334,18 +334,18 @@ const st = ({
|
|
|
334
334
|
mutationFn: (o) => {
|
|
335
335
|
if (!t.rollKey)
|
|
336
336
|
throw new Error("rollKey not implemented");
|
|
337
|
-
return t.rollKey(o,
|
|
337
|
+
return t.rollKey(o, i);
|
|
338
338
|
},
|
|
339
339
|
onSuccess: () => s.invalidateQueries({ queryKey: ["api-keys"] })
|
|
340
340
|
}), x = (o, c) => {
|
|
341
|
-
|
|
341
|
+
r(o), l(c);
|
|
342
342
|
}, j = (o) => {
|
|
343
343
|
a.trim() && m.mutate({
|
|
344
344
|
consumerId: o,
|
|
345
345
|
label: a.trim()
|
|
346
|
-
}),
|
|
346
|
+
}), r(null), l("");
|
|
347
347
|
}, P = () => {
|
|
348
|
-
|
|
348
|
+
r(null), l("");
|
|
349
349
|
};
|
|
350
350
|
return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-md h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
|
|
351
351
|
/* @__PURE__ */ e.jsx(Y.Target, { name: "api-keys-list-page" }),
|
|
@@ -494,7 +494,7 @@ const st = ({
|
|
|
494
494
|
/* @__PURE__ */ e.jsxs(J, { children: [
|
|
495
495
|
/* @__PURE__ */ e.jsxs(U, { children: [
|
|
496
496
|
/* @__PURE__ */ e.jsx(W, { children: "Roll API Key" }),
|
|
497
|
-
/* @__PURE__ */ e.jsx(
|
|
497
|
+
/* @__PURE__ */ e.jsx(re, { children: "Are you sure you want to roll this API key?" })
|
|
498
498
|
] }),
|
|
499
499
|
/* @__PURE__ */ e.jsxs(H, { children: [
|
|
500
500
|
/* @__PURE__ */ e.jsx(D, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", children: "Cancel" }) }),
|
|
@@ -535,15 +535,15 @@ const st = ({
|
|
|
535
535
|
}
|
|
536
536
|
) })
|
|
537
537
|
] });
|
|
538
|
-
},
|
|
539
|
-
const
|
|
540
|
-
return n < 60 ?
|
|
538
|
+
}, rt = (t) => {
|
|
539
|
+
const i = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((i.getTime() - s.getTime()) / 1e3), r = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
|
|
540
|
+
return n < 60 ? r.format(-n, "second") : n < 3600 ? r.format(-Math.floor(n / 60), "minute") : n < 86400 ? r.format(-Math.floor(n / 3600), "hour") : n < 2592e3 ? r.format(-Math.floor(n / 86400), "day") : n < 31536e3 ? r.format(-Math.floor(n / 2592e3), "month") : r.format(-Math.floor(n / 31536e3), "year");
|
|
541
541
|
}, at = ({
|
|
542
542
|
apiKey: t,
|
|
543
|
-
onDeleteKey:
|
|
543
|
+
onDeleteKey: i,
|
|
544
544
|
className: s
|
|
545
545
|
}) => {
|
|
546
|
-
const [n,
|
|
546
|
+
const [n, r] = K(!1), { key: a, createdOn: l, expiresOn: u } = t, h = u && new Date(u) < /* @__PURE__ */ new Date(), d = u ? Math.ceil(
|
|
547
547
|
(new Date(u).getTime() - Date.now()) / (1e3 * 60 * 60 * 24)
|
|
548
548
|
) : 1 / 0, g = d <= 7 && !h;
|
|
549
549
|
return /* @__PURE__ */ e.jsxs("div", { className: A("grid col-span-full grid-cols-subgrid p-6", s), children: [
|
|
@@ -555,13 +555,13 @@ const st = ({
|
|
|
555
555
|
secret: a,
|
|
556
556
|
status: h ? "expired" : g ? "expiring" : "active",
|
|
557
557
|
revealed: n,
|
|
558
|
-
onReveal:
|
|
558
|
+
onReveal: r
|
|
559
559
|
}
|
|
560
560
|
),
|
|
561
561
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
|
|
562
562
|
l && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
563
563
|
"Created ",
|
|
564
|
-
|
|
564
|
+
rt(l),
|
|
565
565
|
"."
|
|
566
566
|
] }),
|
|
567
567
|
" ",
|
|
@@ -579,12 +579,12 @@ const st = ({
|
|
|
579
579
|
] })
|
|
580
580
|
] })
|
|
581
581
|
] }),
|
|
582
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: u &&
|
|
582
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: u && i && /* @__PURE__ */ e.jsxs(V, { children: [
|
|
583
583
|
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(me, { size: 16 }) }) }),
|
|
584
584
|
/* @__PURE__ */ e.jsxs(J, { children: [
|
|
585
585
|
/* @__PURE__ */ e.jsxs(U, { children: [
|
|
586
586
|
/* @__PURE__ */ e.jsx(W, { children: "Delete API Key" }),
|
|
587
|
-
/* @__PURE__ */ e.jsx(
|
|
587
|
+
/* @__PURE__ */ e.jsx(re, { children: "Are you sure you want to delete this API key?" })
|
|
588
588
|
] }),
|
|
589
589
|
/* @__PURE__ */ e.jsxs(H, { children: [
|
|
590
590
|
/* @__PURE__ */ e.jsx(D, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", children: "Cancel" }) }),
|
|
@@ -592,7 +592,7 @@ const st = ({
|
|
|
592
592
|
w,
|
|
593
593
|
{
|
|
594
594
|
onClick: () => {
|
|
595
|
-
|
|
595
|
+
i();
|
|
596
596
|
},
|
|
597
597
|
children: "Delete"
|
|
598
598
|
}
|
|
@@ -608,26 +608,26 @@ const st = ({
|
|
|
608
608
|
return;
|
|
609
609
|
}
|
|
610
610
|
}, T = async (t) => {
|
|
611
|
-
const
|
|
612
|
-
if (!t.ok &&
|
|
611
|
+
const i = t.headers.get("content-type");
|
|
612
|
+
if (!t.ok && i?.includes("application/problem+json")) {
|
|
613
613
|
const s = await ot(t);
|
|
614
614
|
if (s.type && s.title)
|
|
615
615
|
throw new Error(s.detail ?? s.title);
|
|
616
616
|
}
|
|
617
|
-
}, lt = (t,
|
|
618
|
-
deleteKey: async (s, n,
|
|
617
|
+
}, lt = (t, i) => ({
|
|
618
|
+
deleteKey: async (s, n, r) => {
|
|
619
619
|
const a = new Request(
|
|
620
620
|
S + `/${t}/consumers/${s}/keys/${n}`,
|
|
621
621
|
{
|
|
622
622
|
method: "DELETE"
|
|
623
623
|
}
|
|
624
624
|
);
|
|
625
|
-
await
|
|
625
|
+
await r.signRequest(a);
|
|
626
626
|
const l = await fetch(a);
|
|
627
627
|
await T(l), I(l.ok, "Failed to delete API key");
|
|
628
628
|
},
|
|
629
629
|
updateConsumer: async (s, n) => {
|
|
630
|
-
const
|
|
630
|
+
const r = await fetch(
|
|
631
631
|
await n.signRequest(
|
|
632
632
|
new Request(
|
|
633
633
|
S + `/${t}/consumers/${s.id}`,
|
|
@@ -643,10 +643,10 @@ const st = ({
|
|
|
643
643
|
)
|
|
644
644
|
)
|
|
645
645
|
);
|
|
646
|
-
await T(
|
|
646
|
+
await T(r), I(r.ok, "Failed to update API key description");
|
|
647
647
|
},
|
|
648
648
|
rollKey: async (s, n) => {
|
|
649
|
-
const
|
|
649
|
+
const r = await fetch(
|
|
650
650
|
await n.signRequest(
|
|
651
651
|
new Request(
|
|
652
652
|
S + `/${t}/consumers/${s}/roll-key`,
|
|
@@ -660,24 +660,24 @@ const st = ({
|
|
|
660
660
|
)
|
|
661
661
|
)
|
|
662
662
|
);
|
|
663
|
-
await T(
|
|
663
|
+
await T(r), I(r.ok, "Failed to delete API key");
|
|
664
664
|
},
|
|
665
665
|
getConsumers: async (s) => {
|
|
666
666
|
const n = new Request(
|
|
667
667
|
`${S}/${t}/consumers`
|
|
668
668
|
);
|
|
669
669
|
await s.signRequest(n);
|
|
670
|
-
const
|
|
671
|
-
return await T(
|
|
670
|
+
const r = await fetch(n);
|
|
671
|
+
return await T(r), I(r.ok, "Failed to fetch API keys"), (await r.json()).data.map((l) => ({
|
|
672
672
|
id: l.id,
|
|
673
673
|
label: l.label || l.subject || "API Key",
|
|
674
674
|
apiKeys: l.apiKeys.data,
|
|
675
675
|
key: l.apiKeys.data.at(0)
|
|
676
676
|
}));
|
|
677
677
|
},
|
|
678
|
-
...
|
|
678
|
+
...i
|
|
679
679
|
}), Dt = (t) => t, At = (t) => {
|
|
680
|
-
const
|
|
680
|
+
const i = "deploymentName" in t ? lt(t.deploymentName, t) : t;
|
|
681
681
|
return {
|
|
682
682
|
getProfileMenuItems: () => [
|
|
683
683
|
{
|
|
@@ -689,13 +689,13 @@ const st = ({
|
|
|
689
689
|
],
|
|
690
690
|
getIdentities: async (s) => {
|
|
691
691
|
try {
|
|
692
|
-
return (await
|
|
692
|
+
return (await i.getConsumers(s)).map((r) => ({
|
|
693
693
|
authorizeRequest: (a) => (a.headers.set(
|
|
694
694
|
"Authorization",
|
|
695
|
-
`Bearer ${
|
|
695
|
+
`Bearer ${r.apiKeys.at(0)?.key}`
|
|
696
696
|
), a),
|
|
697
|
-
id:
|
|
698
|
-
label:
|
|
697
|
+
id: r.id,
|
|
698
|
+
label: r.label
|
|
699
699
|
}));
|
|
700
700
|
} catch {
|
|
701
701
|
return [];
|
|
@@ -708,7 +708,7 @@ const st = ({
|
|
|
708
708
|
children: [
|
|
709
709
|
{
|
|
710
710
|
path: "/settings/api-keys",
|
|
711
|
-
element: /* @__PURE__ */ e.jsx(
|
|
711
|
+
element: /* @__PURE__ */ e.jsx(it, { service: i })
|
|
712
712
|
}
|
|
713
713
|
]
|
|
714
714
|
}
|