zudoku 0.66.2 → 0.66.3
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/config/validators/validate.d.ts +32 -3
- package/dist/config/validators/validate.js +1 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +1 -1
- package/dist/lib/auth/issuer.js +1 -1
- package/dist/lib/auth/issuer.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +3 -2
- package/dist/lib/authentication/hook.d.ts +2 -0
- package/dist/lib/authentication/hook.js +10 -0
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/firebase.js +67 -9
- package/dist/lib/authentication/providers/firebase.js.map +1 -1
- package/dist/lib/authentication/ui/EmailVerificationUi.d.ts +4 -0
- package/dist/lib/authentication/ui/EmailVerificationUi.js +34 -0
- package/dist/lib/authentication/ui/EmailVerificationUi.js.map +1 -0
- package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +7 -2
- package/dist/lib/authentication/ui/ZudokuAuthUi.js +43 -11
- package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -1
- package/dist/lib/authentication/utils/relativeRedirectUrl.d.ts +1 -0
- package/dist/lib/authentication/utils/relativeRedirectUrl.js +8 -0
- package/dist/lib/authentication/utils/relativeRedirectUrl.js.map +1 -0
- package/dist/lib/components/index.d.ts +2 -0
- package/dist/lib/errors/ErrorMessage.d.ts +3 -0
- package/dist/lib/errors/ErrorMessage.js +16 -0
- package/dist/lib/errors/ErrorMessage.js.map +1 -0
- package/dist/lib/hooks/index.d.ts +2 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +9 -172
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +4 -1
- package/dist/lib/plugins/api-keys/index.js +19 -14
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/settings/ApiKeyItem.d.ts +12 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js +133 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js.map +1 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyList.d.ts +4 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyList.js +30 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyList.js.map +1 -0
- package/dist/lib/plugins/api-keys/settings/RevealApiKey.d.ts +6 -0
- package/dist/lib/plugins/api-keys/settings/RevealApiKey.js +39 -0
- package/dist/lib/plugins/api-keys/settings/RevealApiKey.js.map +1 -0
- package/dist/vite/config.js +7 -0
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-api-keys.js +4 -1
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/zuplo.d.ts +13 -0
- package/dist/vite/zuplo.js +15 -0
- package/dist/vite/zuplo.js.map +1 -0
- package/lib/{ClaudeLogo-CGRfGTk2.js → ClaudeLogo-BZslN9XF.js} +3 -3
- package/lib/{ClaudeLogo-CGRfGTk2.js.map → ClaudeLogo-BZslN9XF.js.map} +1 -1
- package/lib/{Drawer-Ci7XwhqT.js → Drawer-BRMcpfuF.js} +6 -6
- package/lib/{Drawer-Ci7XwhqT.js.map → Drawer-BRMcpfuF.js.map} +1 -1
- package/lib/Frame-DxlznfVd.js +205 -0
- package/lib/Frame-DxlznfVd.js.map +1 -0
- package/lib/{useMutation-C6RqWmTS.js → Input-D-kqEQ5M.js} +41 -23
- package/lib/Input-D-kqEQ5M.js.map +1 -0
- package/lib/{MdxPage-Bjf72BP3.js → MdxPage-B4zZq5aR.js} +8 -8
- package/lib/{MdxPage-Bjf72BP3.js.map → MdxPage-B4zZq5aR.js.map} +1 -1
- package/lib/{Mermaid-D_VSX7_Q.js → Mermaid-BjSczjLW.js} +3 -3
- package/lib/{Mermaid-D_VSX7_Q.js.map → Mermaid-BjSczjLW.js.map} +1 -1
- package/lib/{OAuthErrorPage-1Ekji0PK.js → OAuthErrorPage-DRY2hlga.js} +20 -21
- package/lib/{OAuthErrorPage-1Ekji0PK.js.map → OAuthErrorPage-DRY2hlga.js.map} +1 -1
- package/lib/{OasProvider-BZxmTyMM.js → OasProvider-lMwTD76Y.js} +4 -4
- package/lib/{OasProvider-BZxmTyMM.js.map → OasProvider-lMwTD76Y.js.map} +1 -1
- package/lib/{OperationList-B7nPIFB8.js → OperationList-Bm76b4vl.js} +23 -24
- package/lib/{OperationList-B7nPIFB8.js.map → OperationList-Bm76b4vl.js.map} +1 -1
- package/lib/{RouteGuard-9wjejsKm.js → RouteGuard-DGc32XJV.js} +4 -4
- package/lib/{RouteGuard-9wjejsKm.js.map → RouteGuard-DGc32XJV.js.map} +1 -1
- package/lib/{SchemaList-16_obkku.js → SchemaList-DX4FPogg.js} +7 -7
- package/lib/{SchemaList-16_obkku.js.map → SchemaList-DX4FPogg.js.map} +1 -1
- package/lib/SchemaView-CjXvSRxy.js +434 -0
- package/lib/SchemaView-CjXvSRxy.js.map +1 -0
- package/lib/{Select-CkxXP5I7.js → Secret-BxGpIhDP.js} +121 -121
- package/lib/Secret-BxGpIhDP.js.map +1 -0
- package/lib/{SignUp-D54_QWFy.js → SignUp-CntxjFGS.js} +4 -4
- package/lib/{SignUp-D54_QWFy.js.map → SignUp-CntxjFGS.js.map} +1 -1
- package/lib/{SyntaxHighlight-j_HRSPCU.js → SyntaxHighlight-Dgd0AaaX.js} +2 -2
- package/lib/{SyntaxHighlight-j_HRSPCU.js.map → SyntaxHighlight-Dgd0AaaX.js.map} +1 -1
- package/lib/{Toc-z05x698-.js → Toc-L1vGGHA1.js} +2 -2
- package/lib/{Toc-z05x698-.js.map → Toc-L1vGGHA1.js.map} +1 -1
- package/lib/{ZudokuContext-BXldanA8.js → ZudokuContext-DNHMZfcP.js} +33 -33
- package/lib/{ZudokuContext-BXldanA8.js.map → ZudokuContext-DNHMZfcP.js.map} +1 -1
- package/lib/{chunk-PVWAREVJ-dLIqswPy.js → chunk-PVWAREVJ-ClM0m2aJ.js} +19 -19
- package/lib/{chunk-PVWAREVJ-dLIqswPy.js.map → chunk-PVWAREVJ-ClM0m2aJ.js.map} +1 -1
- package/lib/{circular-D5sYCIWL.js → circular-BIN_WQ0c.js} +2 -2
- package/lib/{circular-D5sYCIWL.js.map → circular-BIN_WQ0c.js.map} +1 -1
- package/lib/{createServer-BlwU7lIr.js → createServer-BEl12QFw.js} +4 -4
- package/lib/{createServer-BlwU7lIr.js.map → createServer-BEl12QFw.js.map} +1 -1
- package/lib/createVariantComponent-CQVt-H3r.js +18 -0
- package/lib/createVariantComponent-CQVt-H3r.js.map +1 -0
- package/lib/{errors-BtC4Kn2j.js → errors-CtBbD47A.js} +2 -2
- package/lib/{errors-BtC4Kn2j.js.map → errors-CtBbD47A.js.map} +1 -1
- package/lib/{firebase-Ibm_tv3G.js → firebase-CT38ugg4.js} +1588 -1342
- package/lib/firebase-CT38ugg4.js.map +1 -0
- package/lib/hook-CHw_R_xu.js +52 -0
- package/lib/hook-CHw_R_xu.js.map +1 -0
- package/lib/{ErrorAlert-BUlG32M9.js → index-CG2v-T7-.js} +5373 -4335
- package/lib/index-CG2v-T7-.js.map +1 -0
- package/lib/{index-eKVhlB94.js → index-CISwSpdT.js} +2 -2
- package/lib/{index-eKVhlB94.js.map → index-CISwSpdT.js.map} +1 -1
- package/lib/{index-Css56y3F.js → index-DXXZDuSJ.js} +4 -4
- package/lib/{index-Css56y3F.js.map → index-DXXZDuSJ.js.map} +1 -1
- package/lib/{index-CeVTNcfF.js → index-jI2Fjpy-.js} +98 -99
- package/lib/{index-CeVTNcfF.js.map → index-jI2Fjpy-.js.map} +1 -1
- package/lib/{index.esm-BoKBnRoT.js → index.esm-Bu35TNgg.js} +16 -14
- package/lib/index.esm-Bu35TNgg.js.map +1 -0
- package/lib/{mutation-BoVlx8yA.js → mutation-DMHWqmFp.js} +2 -2
- package/lib/{mutation-BoVlx8yA.js.map → mutation-DMHWqmFp.js.map} +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/zudoku.__internal.js +507 -479
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +4 -4
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-firebase.js +6 -5
- package/lib/zudoku.auth-firebase.js.map +1 -1
- package/lib/zudoku.auth-openid.js +4 -4
- package/lib/zudoku.auth-supabase.js +5 -5
- package/lib/zudoku.components.js +20 -21
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +3 -3
- package/lib/zudoku.mermaid.js +3 -3
- package/lib/zudoku.plugin-api-catalog.js +8 -9
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +580 -543
- 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 +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +3 -3
- package/lib/zudoku.router.js +2 -2
- package/package.json +4 -2
- package/src/lib/auth/issuer.ts +1 -1
- package/src/lib/authentication/authentication.ts +8 -2
- package/src/lib/authentication/hook.ts +16 -0
- package/src/lib/authentication/providers/firebase.tsx +98 -6
- package/src/lib/authentication/ui/EmailVerificationUi.tsx +129 -0
- package/src/lib/authentication/ui/ZudokuAuthUi.tsx +170 -38
- package/src/lib/authentication/utils/relativeRedirectUrl.ts +12 -0
- package/src/lib/errors/ErrorMessage.tsx +38 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +36 -476
- package/src/lib/plugins/api-keys/index.tsx +33 -18
- package/src/lib/plugins/api-keys/settings/ApiKeyItem.tsx +342 -0
- package/src/lib/plugins/api-keys/settings/ApiKeyList.tsx +64 -0
- package/src/lib/plugins/api-keys/settings/RevealApiKey.tsx +124 -0
- package/lib/ErrorAlert-BUlG32M9.js.map +0 -1
- package/lib/RouterError-DfTZblpv.js +0 -42
- package/lib/RouterError-DfTZblpv.js.map +0 -1
- package/lib/SchemaView-eyvR4bRt.js +0 -597
- package/lib/SchemaView-eyvR4bRt.js.map +0 -1
- package/lib/Select-CkxXP5I7.js.map +0 -1
- package/lib/createVariantComponent-B9_dVBvu.js +0 -35
- package/lib/createVariantComponent-B9_dVBvu.js.map +0 -1
- package/lib/firebase-Ibm_tv3G.js.map +0 -1
- package/lib/hook-BNxidGQq.js +0 -40
- package/lib/hook-BNxidGQq.js.map +0 -1
- package/lib/index-DSOi7zVM.js +0 -1059
- package/lib/index-DSOi7zVM.js.map +0 -1
- package/lib/index.esm-BoKBnRoT.js.map +0 -1
- package/lib/useMutation-C6RqWmTS.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthErrorPage-1Ekji0PK.js","sources":["../src/lib/util/url.ts","../src/lib/authentication/components/CallbackHandler.tsx","../src/lib/authentication/components/OAuthErrorPage.tsx"],"sourcesContent":["/**\n * Normalizes a redirect URL by removing the origin and optionally the root path\n */\nexport function normalizeRedirectUrl(\n redirectTo: string,\n origin: string,\n basePath: string = \"/\",\n): string {\n if (!redirectTo.startsWith(origin)) {\n return redirectTo;\n }\n\n if (basePath !== \"/\" && redirectTo.startsWith(origin + basePath)) {\n return redirectTo.slice(origin.length + basePath.length);\n }\n\n return redirectTo.slice(origin.length);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Navigate } from \"react-router\";\nimport { useZudoku } from \"zudoku/components\";\nimport { joinUrl } from \"../../util/joinUrl.js\";\nimport { normalizeRedirectUrl } from \"../../util/url.js\";\nimport { OAuthAuthorizationError, type OAuthErrorType } from \"../errors.js\";\n\nexport function CallbackHandler({\n handleCallback,\n}: {\n handleCallback: () => Promise<string>;\n}) {\n const { options } = useZudoku();\n const executeCallback = useSuspenseQuery({\n retry: false,\n queryKey: [\"oauth-callback\"],\n queryFn: async () => {\n const url = new URL(window.location.href);\n\n const errorParam = url.searchParams.get(\"error\");\n const errorDescription =\n url.searchParams.get(\"error_description\") ?? undefined;\n const errorUri = url.searchParams.get(\"error_uri\") ?? undefined;\n if (errorParam) {\n throw new OAuthAuthorizationError(\n `OAuth error '${errorParam}': ${errorDescription}`,\n {\n error: errorParam as OAuthErrorType,\n error_description: errorDescription,\n error_uri: errorUri,\n },\n );\n }\n return joinUrl(\n normalizeRedirectUrl(\n await handleCallback(),\n window.location.origin,\n options.basePath,\n ),\n );\n },\n });\n\n return <Navigate to={executeCallback.data} replace />;\n}\n","import { HomeIcon } from \"lucide-react\";\nimport { Link } from \"react-router\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { Typography } from \"../../components/Typography.js\";\nimport { Button } from \"../../ui/Button.js\";\nimport { OAuthAuthorizationError } from \"../errors.js\";\nimport { useAuth } from \"../hook.js\";\n\nconst errorDetailsMap: Record<string, { message: string }> = {\n invalid_request: {\n message:\n \"The authentication request was invalid. Please try signing in again.\",\n },\n unauthorized_client: {\n message:\n \"This application is not authorized to access your account. Please contact support.\",\n },\n access_denied: {\n message:\n \"You denied access to this application. To continue, please sign in and grant access.\",\n },\n unsupported_response_type: {\n message:\n \"The authentication method is not supported. Please contact support.\",\n },\n invalid_scope: {\n message: \"The requested permissions are invalid. Please contact support.\",\n },\n server_error: {\n message:\n \"The authentication server encountered an error. Please try again in a few moments.\",\n },\n temporarily_unavailable: {\n message:\n \"The authentication service is temporarily unavailable. Please try again in a few moments.\",\n },\n // Token errors\n invalid_client: {\n message: \"Invalid application credentials. Please contact support.\",\n },\n invalid_grant: {\n message:\n \"The authentication code has expired or is invalid. Please sign in again.\",\n },\n unsupported_grant_type: {\n message:\n \"The authentication method is not supported. Please contact support.\",\n },\n // Custom errors\n invalid_state: {\n message:\n \"Security validation failed. This may be due to a potential security attack. Please try signing in again.\",\n },\n missing_code_verifier: {\n message:\n \"Authentication security information is missing. Please clear your browser cache and try again.\",\n },\n network_error: {\n message:\n \"A network error occurred during authentication. Please check your connection and try again.\",\n },\n token_expired: {\n message: \"Your authentication session has expired. Please sign in again.\",\n },\n configuration_error: {\n message:\n \"There is an issue with the authentication configuration. Please contact support.\",\n },\n unknown_error: {\n message:\n \"An unexpected error occurred during authentication. Please try again or contact support.\",\n },\n};\n\nexport function OAuthErrorPage({ error }: { error: unknown }) {\n const { login } = useAuth();\n\n if (!(error instanceof OAuthAuthorizationError)) {\n throw error;\n }\n\n const oauthError = error.error;\n const type = oauthError.error;\n\n const details = errorDetailsMap[type] ?? errorDetailsMap.unknown_error;\n\n return (\n <div className=\"min-h-[400px] flex items-center justify-center p-4\">\n <div className=\"max-w-md w-full text-center space-y-6\">\n <div className=\"space-y-4 items-center\">\n <Heading level={2} className=\"text-2xl inline-block font-bold\">\n {titles[type] || \"Authentication Error\"}\n </Heading>\n\n <Typography className=\"text-gray-600 dark:text-gray-300 leading-relaxed\">\n {details?.message}\n </Typography>\n\n {/* Technical details for developers (only in development) */}\n </div>\n\n {/* Action Buttons */}\n <div className=\"space-y-3 pt-4\">\n <div className=\"space-y-2\">\n {(type === \"access_denied\" ||\n type === \"invalid_grant\" ||\n type === \"token_expired\") && (\n <Button\n onClick={() => login()}\n className=\"w-full capitalize\"\n variant={\"default\"}\n >\n Sign in again\n </Button>\n )}\n </div>\n\n <div className=\"flex gap-2\">\n <Button asChild className=\"flex-1\" variant=\"outline\">\n <Link to=\"/\">\n <HomeIcon className=\"w-4 h-4 mr-2\" />\n Go Home\n </Link>\n </Button>\n </div>\n </div>\n\n {/* Additional Help */}\n {helpMessages[type] && (\n <Typography className=\"text-sm text-gray-500 dark:text-gray-400\">\n {helpMessages[type]}\n </Typography>\n )}\n </div>\n </div>\n );\n}\n\nconst titles: Record<string, string> = {\n access_denied: \"Access Denied\",\n invalid_request: \"Invalid Request\",\n unauthorized_client: \"Unauthorized Application\",\n unsupported_response_type: \"Unsupported Method\",\n invalid_scope: \"Invalid Permissions\",\n server_error: \"Server Error\",\n temporarily_unavailable: \"Service Unavailable\",\n invalid_client: \"Invalid Credentials\",\n invalid_grant: \"Authentication Expired\",\n unsupported_grant_type: \"Unsupported Authentication\",\n invalid_state: \"Security Check Failed\",\n missing_code_verifier: \"Security Information Missing\",\n network_error: \"Network Error\",\n token_expired: \"Session Expired\",\n configuration_error: \"Configuration Error\",\n unknown_error: \"Authentication Failed\",\n};\n\nconst helpMessages: Record<string, string> = {\n access_denied:\n \"If you changed your mind, you can try signing in again to grant access.\",\n invalid_state:\n \"This error can occur if you have multiple tabs open or if your session was compromised.\",\n missing_code_verifier:\n \"Try clearing your browser's cache and cookies for this site.\",\n network_error:\n \"Check your internet connection and ensure you can access other websites.\",\n server_error:\n \"The issue is on our end. Our team has been notified and is working to fix it.\",\n temporarily_unavailable:\n \"This is usually temporary. Try again in a few minutes.\",\n};\n"],"names":["normalizeRedirectUrl","redirectTo","origin","basePath","CallbackHandler","handleCallback","options","useZudoku","executeCallback","useSuspenseQuery","url","errorParam","errorDescription","errorUri","OAuthAuthorizationError","joinUrl","Navigate","errorDetailsMap","OAuthErrorPage","error","login","useAuth","type","details","jsxs","jsx","Heading","titles","Typography","Button","Link","HomeIcon","helpMessages"],"mappings":";;;;;;;;;AAGO,SAASA,EACdC,GACAC,GACAC,IAAmB,KACX;AACR,SAAKF,EAAW,WAAWC,CAAM,IAI7BC,MAAa,OAAOF,EAAW,WAAWC,IAASC,CAAQ,IACtDF,EAAW,MAAMC,EAAO,SAASC,EAAS,MAAM,IAGlDF,EAAW,MAAMC,EAAO,MAAM,IAP5BD;AAQX;ACVO,SAASG,EAAgB;AAAA,EAC9B,gBAAAC;AACF,GAEG;AACD,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAkBC,EAAiB;AAAA,IACvC,OAAO;AAAA,IACP,UAAU,CAAC,gBAAgB;AAAA,IAC3B,SAAS,YAAY;AACnB,YAAMC,IAAM,IAAI,IAAI,OAAO,SAAS,IAAI,GAElCC,IAA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CAEvC,GACF,EAAA,CACF;AAAA,IAAA,GACF;AAAA,IAGCC,EAAaV,CAAI,KAChBG,gBAAAA,EAAAA,IAACG,KAAW,WAAU,4CACnB,UAAAI,EAAaV,CAAI,EAAA,CACpB;AAAA,EAAA,EAAA,CAEJ,EAAA,CACF;AAEJ;AAEA,MAAMK,IAAiC;AAAA,EACrC,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,2BAA2B;AAAA,EAC3B,eAAe;AAAA,EACf,cAAc;AAAA,EACd,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB;AAAA,EACxB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,eAAe;AACjB,GAEMK,IAAuC;AAAA,EAC3C,eACE;AAAA,EACF,eACE;AAAA,EACF,uBACE;AAAA,EACF,eACE;AAAA,EACF,cACE;AAAA,EACF,yBACE;AACJ;"}
|
|
1
|
+
{"version":3,"file":"OAuthErrorPage-DRY2hlga.js","sources":["../src/lib/util/url.ts","../src/lib/authentication/components/CallbackHandler.tsx","../src/lib/authentication/components/OAuthErrorPage.tsx"],"sourcesContent":["/**\n * Normalizes a redirect URL by removing the origin and optionally the root path\n */\nexport function normalizeRedirectUrl(\n redirectTo: string,\n origin: string,\n basePath: string = \"/\",\n): string {\n if (!redirectTo.startsWith(origin)) {\n return redirectTo;\n }\n\n if (basePath !== \"/\" && redirectTo.startsWith(origin + basePath)) {\n return redirectTo.slice(origin.length + basePath.length);\n }\n\n return redirectTo.slice(origin.length);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Navigate } from \"react-router\";\nimport { useZudoku } from \"zudoku/components\";\nimport { joinUrl } from \"../../util/joinUrl.js\";\nimport { normalizeRedirectUrl } from \"../../util/url.js\";\nimport { OAuthAuthorizationError, type OAuthErrorType } from \"../errors.js\";\n\nexport function CallbackHandler({\n handleCallback,\n}: {\n handleCallback: () => Promise<string>;\n}) {\n const { options } = useZudoku();\n const executeCallback = useSuspenseQuery({\n retry: false,\n queryKey: [\"oauth-callback\"],\n queryFn: async () => {\n const url = new URL(window.location.href);\n\n const errorParam = url.searchParams.get(\"error\");\n const errorDescription =\n url.searchParams.get(\"error_description\") ?? undefined;\n const errorUri = url.searchParams.get(\"error_uri\") ?? undefined;\n if (errorParam) {\n throw new OAuthAuthorizationError(\n `OAuth error '${errorParam}': ${errorDescription}`,\n {\n error: errorParam as OAuthErrorType,\n error_description: errorDescription,\n error_uri: errorUri,\n },\n );\n }\n return joinUrl(\n normalizeRedirectUrl(\n await handleCallback(),\n window.location.origin,\n options.basePath,\n ),\n );\n },\n });\n\n return <Navigate to={executeCallback.data} replace />;\n}\n","import { HomeIcon } from \"lucide-react\";\nimport { Link } from \"react-router\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { Typography } from \"../../components/Typography.js\";\nimport { Button } from \"../../ui/Button.js\";\nimport { OAuthAuthorizationError } from \"../errors.js\";\nimport { useAuth } from \"../hook.js\";\n\nconst errorDetailsMap: Record<string, { message: string }> = {\n invalid_request: {\n message:\n \"The authentication request was invalid. Please try signing in again.\",\n },\n unauthorized_client: {\n message:\n \"This application is not authorized to access your account. Please contact support.\",\n },\n access_denied: {\n message:\n \"You denied access to this application. To continue, please sign in and grant access.\",\n },\n unsupported_response_type: {\n message:\n \"The authentication method is not supported. Please contact support.\",\n },\n invalid_scope: {\n message: \"The requested permissions are invalid. Please contact support.\",\n },\n server_error: {\n message:\n \"The authentication server encountered an error. Please try again in a few moments.\",\n },\n temporarily_unavailable: {\n message:\n \"The authentication service is temporarily unavailable. Please try again in a few moments.\",\n },\n // Token errors\n invalid_client: {\n message: \"Invalid application credentials. Please contact support.\",\n },\n invalid_grant: {\n message:\n \"The authentication code has expired or is invalid. Please sign in again.\",\n },\n unsupported_grant_type: {\n message:\n \"The authentication method is not supported. Please contact support.\",\n },\n // Custom errors\n invalid_state: {\n message:\n \"Security validation failed. This may be due to a potential security attack. Please try signing in again.\",\n },\n missing_code_verifier: {\n message:\n \"Authentication security information is missing. Please clear your browser cache and try again.\",\n },\n network_error: {\n message:\n \"A network error occurred during authentication. Please check your connection and try again.\",\n },\n token_expired: {\n message: \"Your authentication session has expired. Please sign in again.\",\n },\n configuration_error: {\n message:\n \"There is an issue with the authentication configuration. Please contact support.\",\n },\n unknown_error: {\n message:\n \"An unexpected error occurred during authentication. Please try again or contact support.\",\n },\n};\n\nexport function OAuthErrorPage({ error }: { error: unknown }) {\n const { login } = useAuth();\n\n if (!(error instanceof OAuthAuthorizationError)) {\n throw error;\n }\n\n const oauthError = error.error;\n const type = oauthError.error;\n\n const details = errorDetailsMap[type] ?? errorDetailsMap.unknown_error;\n\n return (\n <div className=\"min-h-[400px] flex items-center justify-center p-4\">\n <div className=\"max-w-md w-full text-center space-y-6\">\n <div className=\"space-y-4 items-center\">\n <Heading level={2} className=\"text-2xl inline-block font-bold\">\n {titles[type] || \"Authentication Error\"}\n </Heading>\n\n <Typography className=\"text-gray-600 dark:text-gray-300 leading-relaxed\">\n {details?.message}\n </Typography>\n\n {/* Technical details for developers (only in development) */}\n </div>\n\n {/* Action Buttons */}\n <div className=\"space-y-3 pt-4\">\n <div className=\"space-y-2\">\n {(type === \"access_denied\" ||\n type === \"invalid_grant\" ||\n type === \"token_expired\") && (\n <Button\n onClick={() => login()}\n className=\"w-full capitalize\"\n variant={\"default\"}\n >\n Sign in again\n </Button>\n )}\n </div>\n\n <div className=\"flex gap-2\">\n <Button asChild className=\"flex-1\" variant=\"outline\">\n <Link to=\"/\">\n <HomeIcon className=\"w-4 h-4 mr-2\" />\n Go Home\n </Link>\n </Button>\n </div>\n </div>\n\n {/* Additional Help */}\n {helpMessages[type] && (\n <Typography className=\"text-sm text-gray-500 dark:text-gray-400\">\n {helpMessages[type]}\n </Typography>\n )}\n </div>\n </div>\n );\n}\n\nconst titles: Record<string, string> = {\n access_denied: \"Access Denied\",\n invalid_request: \"Invalid Request\",\n unauthorized_client: \"Unauthorized Application\",\n unsupported_response_type: \"Unsupported Method\",\n invalid_scope: \"Invalid Permissions\",\n server_error: \"Server Error\",\n temporarily_unavailable: \"Service Unavailable\",\n invalid_client: \"Invalid Credentials\",\n invalid_grant: \"Authentication Expired\",\n unsupported_grant_type: \"Unsupported Authentication\",\n invalid_state: \"Security Check Failed\",\n missing_code_verifier: \"Security Information Missing\",\n network_error: \"Network Error\",\n token_expired: \"Session Expired\",\n configuration_error: \"Configuration Error\",\n unknown_error: \"Authentication Failed\",\n};\n\nconst helpMessages: Record<string, string> = {\n access_denied:\n \"If you changed your mind, you can try signing in again to grant access.\",\n invalid_state:\n \"This error can occur if you have multiple tabs open or if your session was compromised.\",\n missing_code_verifier:\n \"Try clearing your browser's cache and cookies for this site.\",\n network_error:\n \"Check your internet connection and ensure you can access other websites.\",\n server_error:\n \"The issue is on our end. Our team has been notified and is working to fix it.\",\n temporarily_unavailable:\n \"This is usually temporary. Try again in a few minutes.\",\n};\n"],"names":["normalizeRedirectUrl","redirectTo","origin","basePath","CallbackHandler","handleCallback","options","useZudoku","executeCallback","useSuspenseQuery","url","errorParam","errorDescription","errorUri","OAuthAuthorizationError","joinUrl","Navigate","errorDetailsMap","OAuthErrorPage","error","login","useAuth","type","details","jsxs","jsx","Heading","titles","Typography","Button","Link","HomeIcon","helpMessages"],"mappings":";;;;;;;;AAGO,SAASA,EACdC,GACAC,GACAC,IAAmB,KACX;AACR,SAAKF,EAAW,WAAWC,CAAM,IAI7BC,MAAa,OAAOF,EAAW,WAAWC,IAASC,CAAQ,IACtDF,EAAW,MAAMC,EAAO,SAASC,EAAS,MAAM,IAGlDF,EAAW,MAAMC,EAAO,MAAM,IAP5BD;AAQX;ACVO,SAASG,EAAgB;AAAA,EAC9B,gBAAAC;AACF,GAEG;AACD,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACdC,IAAkBC,EAAiB;AAAA,IACvC,OAAO;AAAA,IAC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G,KACP,UAAA;AAAA,QAAAL,gBAAAA,EAAAA,IAACM,GAAA,EAAS,WAAU,eAAA,CAAe;AAAA,QAAE;AAAA,MAAA,EAAA,CAEvC,GACF,EAAA,CACF;AAAA,IAAA,GACF;AAAA,IAGCC,EAAaV,CAAI,KAChBG,gBAAAA,EAAAA,IAACG,KAAW,WAAU,4CACnB,UAAAI,EAAaV,CAAI,EAAA,CACpB;AAAA,EAAA,EAAA,CAEJ,EAAA,CACF;AAEJ;AAEA,MAAMK,IAAiC;AAAA,EACrC,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,2BAA2B;AAAA,EAC3B,eAAe;AAAA,EACf,cAAc;AAAA,EACd,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB;AAAA,EACxB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,eAAe;AACjB,GAEMK,IAAuC;AAAA,EAC3C,eACE;AAAA,EACF,eACE;AAAA,EACF,uBACE;AAAA,EACF,eACE;AAAA,EACF,cACE;AAAA,EACF,yBACE;AACJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as s } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { useMemo as v } from "react";
|
|
3
|
-
import { O as f } from "./chunk-PVWAREVJ-
|
|
4
|
-
import { j } from "./ZudokuContext-
|
|
5
|
-
import { g as c, O as x, G as O } from "./index-
|
|
3
|
+
import { O as f } from "./chunk-PVWAREVJ-ClM0m2aJ.js";
|
|
4
|
+
import { j } from "./ZudokuContext-DNHMZfcP.js";
|
|
5
|
+
import { g as c, O as x, G as O } from "./index-jI2Fjpy-.js";
|
|
6
6
|
const y = ({
|
|
7
7
|
basePath: e,
|
|
8
8
|
version: n,
|
|
@@ -37,4 +37,4 @@ const y = ({
|
|
|
37
37
|
export {
|
|
38
38
|
y as OasProvider
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=OasProvider-
|
|
40
|
+
//# sourceMappingURL=OasProvider-lMwTD76Y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OasProvider-
|
|
1
|
+
{"version":3,"file":"OasProvider-lMwTD76Y.js","sources":["../src/lib/plugins/openapi/OasProvider.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { Outlet } from \"react-router\";\nimport { joinUrl } from \"../../util/joinUrl.js\";\nimport type { GraphQLClient } from \"./client/GraphQLClient.js\";\nimport { GraphQLProvider } from \"./client/GraphQLContext.js\";\nimport { OasConfigProvider } from \"./context.js\";\nimport type { OasPluginConfig } from \"./interfaces.js\";\nimport { getVersionMetadata } from \"./util/getRoutes.js\";\n\nexport const OasProvider = ({\n basePath,\n version,\n config,\n client,\n}: {\n basePath: string;\n version?: string;\n config: OasPluginConfig;\n client: GraphQLClient;\n}) => {\n const value = useMemo(() => {\n const { versions: availableVersions, labels } = getVersionMetadata(config);\n const currentVersion = version ?? availableVersions.at(0);\n\n const versionLinks = Object.fromEntries(\n availableVersions.map((id) => [\n id,\n { path: joinUrl(basePath, id), label: labels[id] ?? id },\n ]),\n );\n\n const resolveInput = (): string | (() => Promise<unknown>) => {\n if (!Array.isArray(config.input)) {\n return config.input;\n }\n\n const versionConfig = currentVersion\n ? config.input.find((v) => v.path === currentVersion)\n : config.input[0];\n\n if (!versionConfig) {\n throw new Error(`No input found for version: ${currentVersion}`);\n }\n\n return versionConfig.input;\n };\n\n return {\n config: {\n ...config,\n version: currentVersion,\n versions: versionLinks,\n input: resolveInput(),\n },\n };\n }, [config, basePath, version]);\n\n return (\n <OasConfigProvider value={value}>\n <GraphQLProvider client={client}>\n <Outlet />\n </GraphQLProvider>\n </OasConfigProvider>\n );\n};\n"],"names":["OasProvider","basePath","version","config","client","value","useMemo","availableVersions","labels","getVersionMetadata","currentVersion","versionLinks","id","joinUrl","versionConfig","v","jsx","OasConfigProvider","Gra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
import { e as ga, u as Ja, f as Da, L as Qa, j as Ka } from "./ZudokuContext-DNHMZfcP.js";
|
|
3
3
|
import { H as Ya } from "./index.esm-DtzT_KoE.js";
|
|
4
4
|
import { DownloadIcon as Xa, ChevronDownIcon as va, ExternalLinkIcon as Ae, CopyIcon as Nr, ChevronsUpDownIcon as lt, CheckIcon as xa, MinusIcon as Za, PlusIcon as eo, InfoIcon as ba, ChevronsDownUpIcon as qr } from "lucide-react";
|
|
5
|
-
import { b as to,
|
|
6
|
-
import { u as ct, a as Sr, d as Ve, e as ja, f as Or, P as ao, C as Rr, b as Er, c as Ar, h as oo, U as io } from "./index-
|
|
7
|
-
import { S as so, a as lo, b as co, c as uo, e as po } from "./
|
|
5
|
+
import { b as to, d as ro, u as no } from "./chunk-PVWAREVJ-ClM0m2aJ.js";
|
|
6
|
+
import { u as ct, a as Sr, d as Ve, e as ja, f as Or, P as ao, C as Rr, b as Er, c as Ar, h as oo, U as io } from "./index-jI2Fjpy-.js";
|
|
7
|
+
import { S as so, a as lo, b as co, c as uo, e as po } from "./Secret-BxGpIhDP.js";
|
|
8
8
|
import { C as fo } from "./CategoryHeading-DhmodDcq.js";
|
|
9
|
-
import { I as Ce,
|
|
10
|
-
import { S as Ir, i as
|
|
11
|
-
import { C as
|
|
12
|
-
import { B as ot, M as So } from "./index-DSOi7zVM.js";
|
|
9
|
+
import { B as ot, I as Ce, o as ho, T as mo, M as Be, H as Fe, h as $a, k as wa, l as Sa, m as Oa, c as Ta, b as yo } from "./index-CG2v-T7-.js";
|
|
10
|
+
import { S as Ir, i as go, a as vo, E as Xr, b as xo, c as bo, g as jo, P as Tr } from "./SchemaView-CjXvSRxy.js";
|
|
11
|
+
import { C as $o, a as wo, P as So } from "./ClaudeLogo-BZslN9XF.js";
|
|
13
12
|
import { Slot as Oo } from "@radix-ui/react-slot";
|
|
14
13
|
import { c as Ca } from "./index-DI5SPFK9.js";
|
|
15
14
|
import { c as fe } from "./cn-dYga0KKN.js";
|
|
@@ -22,13 +21,13 @@ import { S as Zr } from "./Separator-CTPSeW1S.js";
|
|
|
22
21
|
import * as Ze from "@radix-ui/react-tabs";
|
|
23
22
|
import { Callout as en } from "./ui/Callout.js";
|
|
24
23
|
import { Card as Eo } from "./ui/Card.js";
|
|
25
|
-
import { S as nt } from "./SyntaxHighlight-
|
|
24
|
+
import { S as nt } from "./SyntaxHighlight-Dgd0AaaX.js";
|
|
26
25
|
import { Tabs as Ao, TabsList as Io, TabsTrigger as et, TabsContent as tt } from "./ui/Tabs.js";
|
|
27
26
|
import { VisuallyHidden as Uo } from "@radix-ui/react-visually-hidden";
|
|
28
27
|
import { Frame as Lo, FramePanel as _o } from "./ui/Frame.js";
|
|
29
28
|
import { Item as Fo, ItemContent as tn, ItemTitle as Bo, ItemActions as Ho, ItemGroup as Mo, ItemSeparator as zo } from "./ui/Item.js";
|
|
30
29
|
import * as rn from "@radix-ui/react-collapsible";
|
|
31
|
-
import { c as Go } from "./index-
|
|
30
|
+
import { c as Go } from "./index-DXXZDuSJ.js";
|
|
32
31
|
import "./Button-CynVW1JV.js";
|
|
33
32
|
import { a as Wo, c as it } from "./invariant-CGOLuIIz.js";
|
|
34
33
|
import { r as Vo } from "./___vite-browser-external_commonjs-proxy-Cga3HsWk.js";
|
|
@@ -126,7 +125,7 @@ const Ko = ({
|
|
|
126
125
|
window.open(`https://claude.ai/new?q=${a}`, "_blank");
|
|
127
126
|
},
|
|
128
127
|
children: [
|
|
129
|
-
/* @__PURE__ */ s.jsx(
|
|
128
|
+
/* @__PURE__ */ s.jsx($o, { className: "size-4" }),
|
|
130
129
|
"Use in Claude"
|
|
131
130
|
]
|
|
132
131
|
}
|
|
@@ -141,7 +140,7 @@ const Ko = ({
|
|
|
141
140
|
window.open(`https://chatgpt.com/?q=${a}`, "_blank");
|
|
142
141
|
},
|
|
143
142
|
children: [
|
|
144
|
-
/* @__PURE__ */ s.jsx(
|
|
143
|
+
/* @__PURE__ */ s.jsx(wo, { className: "size-4" }),
|
|
145
144
|
"Use in ChatGPT"
|
|
146
145
|
]
|
|
147
146
|
}
|
|
@@ -340,7 +339,7 @@ const nn = fe, ri = ({
|
|
|
340
339
|
/* @__PURE__ */ s.jsxs("div", { className: "p-2 clear-both", children: [
|
|
341
340
|
t && /* @__PURE__ */ s.jsx(He, { variant: "outline", className: "float-start me-2", children: l?.statusCode }),
|
|
342
341
|
l?.description && /* @__PURE__ */ s.jsx(
|
|
343
|
-
|
|
342
|
+
ho,
|
|
344
343
|
{
|
|
345
344
|
className: "text-sm text-muted-foreground max-w-none",
|
|
346
345
|
content: l.description
|
|
@@ -455,7 +454,7 @@ const nn = fe, ri = ({
|
|
|
455
454
|
/* @__PURE__ */ s.jsx(et, { value: "cursor", children: "Cursor" }),
|
|
456
455
|
/* @__PURE__ */ s.jsx(et, { value: "vscode", children: "VS Code" })
|
|
457
456
|
] }),
|
|
458
|
-
/* @__PURE__ */ s.jsxs(
|
|
457
|
+
/* @__PURE__ */ s.jsxs(mo, { className: "text-sm max-w-full", children: [
|
|
459
458
|
/* @__PURE__ */ s.jsxs(tt, { value: "claude", className: "space-y-3", children: [
|
|
460
459
|
/* @__PURE__ */ s.jsxs("ol", { children: [
|
|
461
460
|
/* @__PURE__ */ s.jsxs("li", { children: [
|
|
@@ -623,7 +622,7 @@ const nn = fe, ri = ({
|
|
|
623
622
|
group: n,
|
|
624
623
|
id: r
|
|
625
624
|
}) => {
|
|
626
|
-
const a = ai(e), [c, l] = ge(!1), t = a.type === "object" ||
|
|
625
|
+
const a = ai(e), [c, l] = ge(!1), t = a.type === "object" || go(a) && "items" in a && a.items?.type === "object", o = !!(e.description || a.description || a.type === "array" && a.items?.enum || a.enum || a.example !== void 0 || a.default !== void 0);
|
|
627
626
|
return /* @__PURE__ */ s.jsxs(Fo, { children: [
|
|
628
627
|
/* @__PURE__ */ s.jsxs(tn, { className: "gap-y-2", children: [
|
|
629
628
|
/* @__PURE__ */ s.jsxs("div", { children: [
|
|
@@ -653,7 +652,7 @@ const nn = fe, ri = ({
|
|
|
653
652
|
}
|
|
654
653
|
) : e.name }) }),
|
|
655
654
|
/* @__PURE__ */ s.jsx(
|
|
656
|
-
|
|
655
|
+
vo,
|
|
657
656
|
{
|
|
658
657
|
className: "inline",
|
|
659
658
|
schema: a,
|
|
@@ -675,7 +674,7 @@ const nn = fe, ri = ({
|
|
|
675
674
|
}
|
|
676
675
|
),
|
|
677
676
|
a.type === "array" && a.items?.enum ? /* @__PURE__ */ s.jsx(Xr, { values: a.items.enum }) : a.enum && /* @__PURE__ */ s.jsx(Xr, { values: a.enum }),
|
|
678
|
-
/* @__PURE__ */ s.jsx(
|
|
677
|
+
/* @__PURE__ */ s.jsx(xo, { schema: a })
|
|
679
678
|
] })
|
|
680
679
|
] }),
|
|
681
680
|
t && /* @__PURE__ */ s.jsx(Ho, { className: "self-start", children: /* @__PURE__ */ s.jsx(
|
|
@@ -5104,7 +5103,7 @@ const fl = ({
|
|
|
5104
5103
|
}
|
|
5105
5104
|
return r ? r[0] : "";
|
|
5106
5105
|
}, Pe = (e, n) => {
|
|
5107
|
-
if (!e ||
|
|
5106
|
+
if (!e || bo(e))
|
|
5108
5107
|
return null;
|
|
5109
5108
|
if (e.example !== void 0)
|
|
5110
5109
|
return e.example;
|
|
@@ -5397,7 +5396,7 @@ const ml = [
|
|
|
5397
5396
|
globalSelectedServer: n,
|
|
5398
5397
|
shouldLazyHighlight: r
|
|
5399
5398
|
}) => {
|
|
5400
|
-
const a = Jo(xl, e), c =
|
|
5399
|
+
const a = Jo(xl, e), c = jo(
|
|
5401
5400
|
a.parameters ?? [],
|
|
5402
5401
|
(p) => p.in
|
|
5403
5402
|
), { options: l } = ct(), t = n || a.servers.at(0)?.url, o = a.responses.at(0), [i, u] = ge(o?.statusCode), h = a.extensions?.["x-mcp-server"] !== void 0;
|
|
@@ -5423,7 +5422,7 @@ const ml = [
|
|
|
5423
5422
|
),
|
|
5424
5423
|
!h && /* @__PURE__ */ s.jsxs("div", { className: "text-sm flex gap-2 font-mono col-span-full", children: [
|
|
5425
5424
|
/* @__PURE__ */ s.jsx("span", { className: Ha(a.method), children: a.method.toUpperCase() }),
|
|
5426
|
-
/* @__PURE__ */ s.jsxs(
|
|
5425
|
+
/* @__PURE__ */ s.jsxs(yo, { className: "max-w-full truncate flex cursor-pointer", children: [
|
|
5427
5426
|
t && /* @__PURE__ */ s.jsx("div", { className: "text-neutral-400 dark:text-neutral-500 truncate", children: t.replace(/\/$/, "") }),
|
|
5428
5427
|
/* @__PURE__ */ s.jsx("div", { className: "text-neutral-900 dark:text-neutral-200", children: a.path })
|
|
5429
5428
|
] })
|
|
@@ -5648,7 +5647,7 @@ const xl = Ve(
|
|
|
5648
5647
|
}
|
|
5649
5648
|
}
|
|
5650
5649
|
`
|
|
5651
|
-
), $l = 30,
|
|
5650
|
+
), $l = 30, ec = ({
|
|
5652
5651
|
tag: e,
|
|
5653
5652
|
untagged: n
|
|
5654
5653
|
}) => {
|
|
@@ -5792,14 +5791,14 @@ const xl = Ve(
|
|
|
5792
5791
|
),
|
|
5793
5792
|
/* @__PURE__ */ s.jsx("hr", { className: "my-10" })
|
|
5794
5793
|
] }, _.slug)),
|
|
5795
|
-
/* @__PURE__ */ s.jsx(
|
|
5794
|
+
/* @__PURE__ */ s.jsx(So, { className: "mb-4", ...R })
|
|
5796
5795
|
] })
|
|
5797
5796
|
]
|
|
5798
5797
|
}
|
|
5799
5798
|
);
|
|
5800
5799
|
};
|
|
5801
5800
|
export {
|
|
5802
|
-
|
|
5801
|
+
ec as OperationList,
|
|
5803
5802
|
xl as OperationsFragment
|
|
5804
5803
|
};
|
|
5805
|
-
//# sourceMappingURL=OperationList-
|
|
5804
|
+
//# sourceMappingURL=OperationList-Bm76b4vl.js.map
|