zudoku 0.0.0-z6bcd96da → 0.0.0-z6e949a6d
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/loader.js +3 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +170 -120
- package/dist/config/validators/InputNavigationSchema.js +17 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/NavigationSchema.d.ts +10 -2
- package/dist/config/validators/NavigationSchema.js +6 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +7 -7
- package/dist/flat-config.d.ts +35 -24
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/MobileTopNavigation.js +2 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +7 -1
- package/dist/lib/components/TopNavigation.js +7 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +8 -1
- package/dist/lib/components/context/ZudokuContext.js +2 -0
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +18 -74
- package/dist/lib/components/index.js +19 -36
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Navigation.js +4 -3
- package/dist/lib/components/navigation/Navigation.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +8 -0
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationFilterContext.d.ts +8 -0
- package/dist/lib/components/navigation/NavigationFilterContext.js +12 -0
- package/dist/lib/components/navigation/NavigationFilterContext.js.map +1 -0
- package/dist/lib/components/navigation/NavigationFilterInput.d.ts +3 -0
- package/dist/lib/components/navigation/NavigationFilterInput.js +9 -0
- package/dist/lib/components/navigation/NavigationFilterInput.js.map +1 -0
- package/dist/lib/components/navigation/NavigationItem.js +11 -1
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +2 -1
- package/dist/lib/components/navigation/utils.js +22 -1
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +11 -1
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/core/transform-config.d.ts +2 -0
- package/dist/lib/core/transform-config.js +22 -0
- package/dist/lib/core/transform-config.js.map +1 -0
- package/dist/lib/hooks/index.d.ts +7 -30
- package/dist/lib/hooks/index.js +7 -15
- package/dist/lib/hooks/index.js.map +1 -1
- package/dist/lib/oas/graphql/circular.d.ts +1 -1
- package/dist/lib/oas/graphql/circular.js +18 -35
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/circular.test.js +33 -2
- package/dist/lib/oas/graphql/circular.test.js.map +1 -1
- package/dist/lib/oas/parser/index.js +14 -5
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js +3 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js +20 -0
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +7 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +3 -3
- package/dist/lib/ui/InputGroup.d.ts +16 -0
- package/dist/lib/ui/InputGroup.js +65 -0
- package/dist/lib/ui/InputGroup.js.map +1 -0
- package/dist/lib/util/flattenAllOf.d.ts +0 -2
- package/dist/lib/util/flattenAllOf.js +0 -46
- package/dist/lib/util/flattenAllOf.js.map +1 -1
- package/dist/lib/util/flattenAllOf.test.js +2 -1
- package/dist/lib/util/flattenAllOf.test.js.map +1 -1
- package/dist/lib/util/flattenAllOfProcessor.d.ts +2 -0
- package/dist/lib/util/flattenAllOfProcessor.js +48 -0
- package/dist/lib/util/flattenAllOfProcessor.js.map +1 -0
- package/dist/lib/util/readFrontmatter.js +2 -1
- package/dist/lib/util/readFrontmatter.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +1 -1
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +1 -1
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/build.js +91 -73
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/mdx/remark-inject-filepath.js +5 -1
- package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
- package/dist/vite/mdx/remark-link-rewrite.js +3 -2
- package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
- package/dist/vite/plugin-docs.js +9 -7
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +4 -2
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/lib/{ClaudeLogo-DJ9bU-sO.js → ClaudeLogo-OpUSMQJe.js} +26 -22
- package/lib/{ClaudeLogo-DJ9bU-sO.js.map → ClaudeLogo-OpUSMQJe.js.map} +1 -1
- package/lib/{MdxPage-stpAoBtx.js → MdxPage-dzCPGdvD.js} +8 -8
- package/lib/{MdxPage-stpAoBtx.js.map → MdxPage-dzCPGdvD.js.map} +1 -1
- package/lib/{Mermaid-Koc3z8mU.js → Mermaid-JEnWyK0s.js} +3 -2
- package/lib/{Mermaid-Koc3z8mU.js.map → Mermaid-JEnWyK0s.js.map} +1 -1
- package/lib/{OAuthErrorPage-DJ811Bn_.js → OAuthErrorPage-D7n-_cqN.js} +20 -18
- package/lib/{OAuthErrorPage-DJ811Bn_.js.map → OAuthErrorPage-D7n-_cqN.js.map} +1 -1
- package/lib/{OasProvider-CS_ASmBB.js → OasProvider-DPPdikt_.js} +3 -3
- package/lib/{OasProvider-CS_ASmBB.js.map → OasProvider-DPPdikt_.js.map} +1 -1
- package/lib/{OperationList-Dq_AB4W9.js → OperationList-cEveQ_l5.js} +948 -946
- package/lib/OperationList-cEveQ_l5.js.map +1 -0
- package/lib/{RouteGuard--A04ESy8.js → RouteGuard-BMbu_Yb7.js} +5 -5
- package/lib/{RouteGuard--A04ESy8.js.map → RouteGuard-BMbu_Yb7.js.map} +1 -1
- package/lib/{SchemaList-BJZJv1gD.js → SchemaList-CRC8n5co.js} +7 -7
- package/lib/{SchemaList-BJZJv1gD.js.map → SchemaList-CRC8n5co.js.map} +1 -1
- package/lib/{SchemaView-U4JMYB3N.js → SchemaView-BR6dtnPg.js} +3 -3
- package/lib/{SchemaView-U4JMYB3N.js.map → SchemaView-BR6dtnPg.js.map} +1 -1
- package/lib/{SignUp-DCBViNUi.js → SignUp-ChqXj9vd.js} +31 -26
- package/lib/{SignUp-DCBViNUi.js.map → SignUp-ChqXj9vd.js.map} +1 -1
- package/lib/{SyntaxHighlight-Dshjn3Zf.js → SyntaxHighlight-O-IZOPLg.js} +3 -3
- package/lib/{SyntaxHighlight-Dshjn3Zf.js.map → SyntaxHighlight-O-IZOPLg.js.map} +1 -1
- package/lib/{Toc-Cgz6CPiE.js → Toc-DQF7trHT.js} +2 -2
- package/lib/{Toc-Cgz6CPiE.js.map → Toc-DQF7trHT.js.map} +1 -1
- package/lib/{index-CL8eDnQW.js → Zudoku-DA1yA-te.js} +2609 -2452
- package/lib/Zudoku-DA1yA-te.js.map +1 -0
- package/lib/{ZudokuContext-BZB1TWdT.js → ZudokuContext-C6wlLMUH.js} +137 -135
- package/lib/{ZudokuContext-BZB1TWdT.js.map → ZudokuContext-C6wlLMUH.js.map} +1 -1
- package/lib/{circular-BmMJjG1v.js → circular-C4l1Kj1N.js} +1327 -1346
- package/lib/{circular-BmMJjG1v.js.map → circular-C4l1Kj1N.js.map} +1 -1
- package/lib/createServer-DoRZ6tMa.js +13036 -0
- package/lib/createServer-DoRZ6tMa.js.map +1 -0
- package/lib/{errors-b9I-fAOY.js → errors-CYLN8SNc.js} +3 -3
- package/lib/{errors-b9I-fAOY.js.map → errors-CYLN8SNc.js.map} +1 -1
- package/lib/{firebase-BCXX7Qv5.js → firebase-DF-VVKB7.js} +14 -14
- package/lib/firebase-DF-VVKB7.js.map +1 -0
- package/lib/{hook-BGlHBdET.js → hook-C35h0YhF.js} +2 -2
- package/lib/{hook-BGlHBdET.js.map → hook-C35h0YhF.js.map} +1 -1
- package/lib/{index-O9RHI87z.js → index-Ck4TmzTO.js} +574 -538
- package/lib/index-Ck4TmzTO.js.map +1 -0
- package/lib/index-DAWHN3cH.js +86 -0
- package/lib/index-DAWHN3cH.js.map +1 -0
- package/lib/{index-UOLtazB8.js → index-DrAVvbXa.js} +2 -2
- package/lib/{index-UOLtazB8.js.map → index-DrAVvbXa.js.map} +1 -1
- package/lib/{index.esm-C5CBsVzN.js → index.esm-B2cLXwjS.js} +2 -2
- package/lib/index.esm-B2cLXwjS.js.map +1 -0
- package/lib/{index.esm-B_0dvNjB.js → index.esm-Ca5zvoff.js} +20 -20
- package/lib/{index.esm-B_0dvNjB.js.map → index.esm-Ca5zvoff.js.map} +1 -1
- package/lib/{invariant-BJAl77rw.js → invariant-B_t_F2s_.js} +3 -3
- package/lib/{invariant-BJAl77rw.js.map → invariant-B_t_F2s_.js.map} +1 -1
- package/lib/ui/InputGroup.js +155 -0
- package/lib/ui/InputGroup.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/useExposedProps-CzTDfXfq.js +30 -0
- package/lib/useExposedProps-CzTDfXfq.js.map +1 -0
- package/lib/zudoku.__internal.js +1493 -1031
- 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 +5 -5
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.auth-supabase.js +4 -4
- package/lib/zudoku.components.js +31 -29
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +24 -11
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.mermaid.js +4 -3
- package/lib/zudoku.mermaid.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +36 -32
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +131 -130
- 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 +2 -2
- package/lib/zudoku.plugin-search-pagefind.js +2 -2
- package/lib/zudoku.plugins.js +9 -8
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +6 -4
- package/src/lib/components/MobileTopNavigation.tsx +13 -8
- package/src/lib/components/TopNavigation.tsx +25 -7
- package/src/lib/components/context/ZudokuContext.ts +1 -0
- package/src/lib/components/index.ts +19 -39
- package/src/lib/components/navigation/Navigation.tsx +4 -3
- package/src/lib/components/navigation/NavigationCategory.tsx +9 -0
- package/src/lib/components/navigation/NavigationFilterContext.tsx +28 -0
- package/src/lib/components/navigation/NavigationFilterInput.tsx +35 -0
- package/src/lib/components/navigation/NavigationItem.tsx +17 -1
- package/src/lib/components/navigation/utils.ts +32 -1
- package/src/lib/core/plugins.ts +21 -1
- package/src/lib/core/transform-config.ts +29 -0
- package/src/lib/hooks/index.ts +7 -16
- package/src/lib/oas/graphql/circular.test.ts +37 -2
- package/src/lib/oas/graphql/circular.ts +25 -51
- package/src/lib/oas/parser/index.ts +17 -6
- package/src/lib/plugins/openapi/playground/fileUtils.ts +4 -0
- package/src/lib/plugins/openapi/playground/result-panel/AudioPlayer.tsx +50 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +33 -17
- package/src/lib/ui/InputGroup.tsx +168 -0
- package/src/lib/util/flattenAllOf.test.ts +2 -1
- package/src/lib/util/flattenAllOf.ts +0 -57
- package/src/lib/util/flattenAllOfProcessor.ts +58 -0
- package/src/lib/util/readFrontmatter.ts +2 -1
- package/src/zuplo/enrich-with-zuplo-mcp.ts +168 -0
- package/src/zuplo/enrich-with-zuplo.ts +254 -0
- package/src/zuplo/policy-types.ts +46 -0
- package/src/zuplo/with-zuplo-processors.ts +35 -0
- package/src/zuplo/with-zuplo.ts +14 -0
- package/lib/OperationList-Dq_AB4W9.js.map +0 -1
- package/lib/Separator-BXt1LYnm.js +0 -27
- package/lib/Separator-BXt1LYnm.js.map +0 -1
- package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js +0 -9
- package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js.map +0 -1
- package/lib/createServer-CLSZ7hWJ.js +0 -16693
- package/lib/createServer-CLSZ7hWJ.js.map +0 -1
- package/lib/firebase-BCXX7Qv5.js.map +0 -1
- package/lib/index-CL8eDnQW.js.map +0 -1
- package/lib/index-DBjOT2H1.js +0 -133
- package/lib/index-DBjOT2H1.js.map +0 -1
- package/lib/index-O9RHI87z.js.map +0 -1
- package/lib/index.esm-C5CBsVzN.js.map +0 -1
package/lib/zudoku.auth-auth0.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as n } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { PublicClientApplication as A, EventType as f } from "@azure/msal-browser";
|
|
3
|
-
import { E as I } from "./
|
|
3
|
+
import { E as I } from "./Zudoku-DA1yA-te.js";
|
|
4
4
|
import { C as T } from "./ClientOnly-E7hGysn1.js";
|
|
5
|
-
import { j as S,
|
|
6
|
-
import { C, A as c } from "./errors-
|
|
7
|
-
import { C as k, O as w } from "./OAuthErrorPage-
|
|
5
|
+
import { j as S, b as h } from "./ZudokuContext-C6wlLMUH.js";
|
|
6
|
+
import { C, A as c } from "./errors-CYLN8SNc.js";
|
|
7
|
+
import { C as k, O as w } from "./OAuthErrorPage-D7n-_cqN.js";
|
|
8
8
|
const u = "/oauth/callback";
|
|
9
9
|
class y extends C {
|
|
10
10
|
msalInstance;
|
package/lib/zudoku.auth-clerk.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { LogOutIcon as m } from "lucide-react";
|
|
3
|
-
import { S as p, a as f, b as h } from "./SignUp-
|
|
4
|
-
import {
|
|
3
|
+
import { S as p, a as f, b as h } from "./SignUp-ChqXj9vd.js";
|
|
4
|
+
import { b as r } from "./ZudokuContext-C6wlLMUH.js";
|
|
5
5
|
const R = ({
|
|
6
6
|
clerkPubKey: u,
|
|
7
7
|
jwtTemplateName: c,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { y as e } from "./firebase-
|
|
3
|
-
import "./invariant-
|
|
4
|
-
import "./errors-
|
|
5
|
-
import "./SignUp-
|
|
6
|
-
import "./ZudokuContext-
|
|
2
|
+
import { y as e } from "./firebase-DF-VVKB7.js";
|
|
3
|
+
import "./invariant-B_t_F2s_.js";
|
|
4
|
+
import "./errors-CYLN8SNc.js";
|
|
5
|
+
import "./SignUp-ChqXj9vd.js";
|
|
6
|
+
import "./ZudokuContext-C6wlLMUH.js";
|
|
7
7
|
export {
|
|
8
8
|
e as default
|
|
9
9
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as D } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import {
|
|
3
|
-
import { E as Ue } from "./
|
|
2
|
+
import { g as Le } from "./invariant-B_t_F2s_.js";
|
|
3
|
+
import { E as Ue } from "./Zudoku-DA1yA-te.js";
|
|
4
4
|
import { C as xe } from "./ClientOnly-E7hGysn1.js";
|
|
5
|
-
import { j as Ce,
|
|
6
|
-
import { C as Ie, O as re, A as R } from "./errors-
|
|
7
|
-
import { C as je, O as Oe } from "./OAuthErrorPage-
|
|
5
|
+
import { j as Ce, b as S } from "./ZudokuContext-C6wlLMUH.js";
|
|
6
|
+
import { C as Ie, O as re, A as R } from "./errors-CYLN8SNc.js";
|
|
7
|
+
import { C as je, O as Oe } from "./OAuthErrorPage-D7n-_cqN.js";
|
|
8
8
|
var J = { exports: {} }, De = J.exports, oe;
|
|
9
9
|
function Je() {
|
|
10
10
|
return oe || (oe = 1, (function(t) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { createClient as g } from "@supabase/supabase-js";
|
|
3
|
-
import { C as m, A as h } from "./errors-
|
|
4
|
-
import { S as f } from "./SignUp-
|
|
5
|
-
import { u } from "./ZudokuContext-
|
|
3
|
+
import { C as m, A as h } from "./errors-CYLN8SNc.js";
|
|
4
|
+
import { S as f } from "./SignUp-ChqXj9vd.js";
|
|
5
|
+
import { b as u } from "./ZudokuContext-C6wlLMUH.js";
|
|
6
6
|
import { Auth as v } from "@supabase/auth-ui-react";
|
|
7
7
|
import { ThemeSupa as S } from "@supabase/auth-ui-shared";
|
|
8
8
|
import { b as T } from "./chunk-EPOLDU6W-C6C8jAwd.js";
|
|
9
|
-
import { H as A } from "./
|
|
9
|
+
import { H as A } from "./Zudoku-DA1yA-te.js";
|
|
10
10
|
const c = ({
|
|
11
11
|
client: i,
|
|
12
12
|
config: e,
|
package/lib/zudoku.components.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import "./index.esm-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import {
|
|
11
|
-
import "./
|
|
1
|
+
import { H as a } from "./index.esm-Ca5zvoff.js";
|
|
2
|
+
import { Button as s } from "./ui/Button.js";
|
|
3
|
+
import { Callout as u } from "./ui/Callout.js";
|
|
4
|
+
import { Z as m } from "./invariant-B_t_F2s_.js";
|
|
5
|
+
import { C as x } from "./ClientOnly-E7hGysn1.js";
|
|
6
|
+
import { H as C, M as d, S, a as h, T as k, Z as l } from "./Zudoku-DA1yA-te.js";
|
|
7
|
+
import { S as Z } from "./Spinner-CI6bRyZw.js";
|
|
8
|
+
import { z as y } from "./index-DAWHN3cH.js";
|
|
9
|
+
import { u as M } from "./hook-C35h0YhF.js";
|
|
10
|
+
import { C as c, u as g, a as A } from "./ZudokuContext-C6wlLMUH.js";
|
|
11
|
+
import { L as w } from "./chunk-EPOLDU6W-C6C8jAwd.js";
|
|
12
|
+
import { u as B } from "./useExposedProps-CzTDfXfq.js";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
s as Button,
|
|
15
|
+
c as CACHE_KEYS,
|
|
16
|
+
u as Callout,
|
|
17
|
+
x as ClientOnly,
|
|
18
|
+
a as Head,
|
|
19
|
+
C as Heading,
|
|
20
|
+
w as Link,
|
|
21
|
+
d as Markdown,
|
|
22
|
+
S as Search,
|
|
23
|
+
h as Slot,
|
|
24
|
+
Z as Spinner,
|
|
25
|
+
k as Typography,
|
|
26
|
+
l as Zudoku,
|
|
27
|
+
m as ZudokuError,
|
|
28
|
+
M as useAuth,
|
|
29
|
+
g as useCache,
|
|
30
|
+
B as useMDXComponents,
|
|
31
|
+
y as useTheme,
|
|
32
|
+
A as useZudoku
|
|
31
33
|
};
|
|
32
34
|
//# sourceMappingURL=zudoku.components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.components.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zudoku.components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
package/lib/zudoku.hooks.js
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./hook-
|
|
3
|
-
import {
|
|
1
|
+
import { z as C } from "./index-DAWHN3cH.js";
|
|
2
|
+
import { u as D } from "./hook-C35h0YhF.js";
|
|
3
|
+
import { a as n } from "./ZudokuContext-C6wlLMUH.js";
|
|
4
|
+
import { C as z, u as A } from "./ZudokuContext-C6wlLMUH.js";
|
|
5
|
+
import { a as S, u as v } from "./useExposedProps-CzTDfXfq.js";
|
|
6
|
+
import { useState as f, useEffect as m } from "react";
|
|
7
|
+
function E(t, e) {
|
|
8
|
+
const s = n(), [r, o] = f();
|
|
9
|
+
return m(() => s.addEventListener(t, ((...u) => {
|
|
10
|
+
if (e) {
|
|
11
|
+
const a = e(...u);
|
|
12
|
+
o(a);
|
|
13
|
+
} else
|
|
14
|
+
o(u);
|
|
15
|
+
})), [s, t, e]), r;
|
|
16
|
+
}
|
|
4
17
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
z as CACHE_KEYS,
|
|
19
|
+
D as useAuth,
|
|
20
|
+
A as useCache,
|
|
21
|
+
E as useEvent,
|
|
22
|
+
S as useExposedProps,
|
|
23
|
+
v as useMDXComponents,
|
|
24
|
+
C as useTheme,
|
|
25
|
+
n as useZudoku
|
|
13
26
|
};
|
|
14
27
|
//# sourceMappingURL=zudoku.hooks.js.map
|
package/lib/zudoku.hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zudoku.hooks.js","sources":["../src/lib/hooks/useEvent.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { useZudoku } from \"../components/context/ZudokuContext.js\";\nimport type { ZudokuEvents } from \"../core/ZudokuContext.js\";\n\ntype EventParameters<Event extends keyof ZudokuEvents> = Parameters<\n ZudokuEvents[Event]\n>;\n\n/**\n * Hook to subscribe to Zudoku events with automatic cleanup\n * @param event The event to subscribe to\n * @param callback Optional callback to be called when the event is emitted\n * @returns The latest event data if no callback is provided, or the callback's return value if it returns something\n */\nexport function useEvent<E extends keyof ZudokuEvents>(\n event: E,\n): EventParameters<E>;\nexport function useEvent<E extends keyof ZudokuEvents, R>(\n event: E,\n callback: (...args: EventParameters<E>) => R,\n): R;\nexport function useEvent<E extends keyof ZudokuEvents, R>(\n event: E,\n callback?: (...args: EventParameters<E>) => R,\n) {\n const zudoku = useZudoku();\n const [latestData, setLatestData] = useState<R | EventParameters<E>>();\n\n useEffect(() => {\n return zudoku.addEventListener(event, ((...args: EventParameters<E>) => {\n if (callback) {\n const result = callback(...args);\n setLatestData(result);\n } else {\n setLatestData(args);\n }\n }) as ZudokuEvents[E]);\n }, [zudoku, event, callback]);\n\n return latestData;\n}\n"],"names":["useEvent","event","callback","zudoku","useZudoku","latestData","setLatestData","useState","useEffect","args","result"],"mappings":";;;;;;AAqBO,SAASA,EACdC,GACAC,GACA;AACA,QAAMC,IAASC,EAAA,GACT,CAACC,GAAYC,CAAa,IAAIC,EAAA;AAEpC,SAAAC,EAAU,MACDL,EAAO,iBAAiBF,IAAQ,IAAIQ,MAA6B;AACtE,QAAIP,GAAU;AACZ,YAAMQ,IAASR,EAAS,GAAGO,CAAI;AAC/B,MAAAH,EAAcI,CAAM;AAAA,IACtB;AACE,MAAAJ,EAAcG,CAAI;AAAA,EAEtB,EAAA,GACC,CAACN,GAAQF,GAAOC,CAAQ,CAAC,GAErBG;AACT;"}
|
package/lib/zudoku.mermaid.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import "./useSuspenseQuery-CSB_rVek.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { M
|
|
5
|
-
import "./index-
|
|
4
|
+
import { M } from "./Mermaid-JEnWyK0s.js";
|
|
5
|
+
import "./index-DAWHN3cH.js";
|
|
6
|
+
import "./ZudokuContext-C6wlLMUH.js";
|
|
6
7
|
import "./Spinner-CI6bRyZw.js";
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
+
M as Mermaid
|
|
9
10
|
};
|
|
10
11
|
//# sourceMappingURL=zudoku.mermaid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.mermaid.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zudoku.mermaid.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { s as f } from "./index-
|
|
3
|
-
import { c as b,
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import { H as
|
|
7
|
-
import
|
|
2
|
+
import { s as f } from "./index-DrAVvbXa.js";
|
|
3
|
+
import { c as b, L as j, m as x } from "./chunk-EPOLDU6W-C6C8jAwd.js";
|
|
4
|
+
import { b as v, j as p } from "./ZudokuContext-C6wlLMUH.js";
|
|
5
|
+
import { u as y } from "./useSuspenseQuery-CSB_rVek.js";
|
|
6
|
+
import { H as N } from "./index.esm-Ca5zvoff.js";
|
|
7
|
+
import "./ui/Button.js";
|
|
8
|
+
import "lucide-react";
|
|
9
|
+
import "react";
|
|
10
|
+
import { H as k, M as S } from "./Zudoku-DA1yA-te.js";
|
|
11
|
+
import "./index-DAWHN3cH.js";
|
|
8
12
|
const w = ({
|
|
9
|
-
items:
|
|
13
|
+
items: n,
|
|
10
14
|
filterCatalogItems: r = (i) => i,
|
|
11
15
|
label: c = "API Library",
|
|
12
16
|
categoryLabel: s
|
|
13
17
|
}) => {
|
|
14
|
-
const i =
|
|
15
|
-
queryFn: () => r(
|
|
18
|
+
const i = v(), a = b({ path: "/catalog/:category" })?.params.category, o = y({
|
|
19
|
+
queryFn: () => r(n, { auth: i }),
|
|
16
20
|
queryKey: ["catalogItems", i]
|
|
17
21
|
}), m = a ? { "data-pagefind-ignore": "all" } : {};
|
|
18
22
|
return /* @__PURE__ */ t.jsxs("section", { className: "pt-(--padding-content-top)", ...m, children: [
|
|
19
|
-
/* @__PURE__ */ t.jsx(
|
|
23
|
+
/* @__PURE__ */ t.jsx(N, { children: /* @__PURE__ */ t.jsxs("title", { children: [
|
|
20
24
|
s ? `${s} - ` : "",
|
|
21
25
|
c
|
|
22
26
|
] }) }),
|
|
23
27
|
/* @__PURE__ */ t.jsxs("div", { className: "grid gap-4", children: [
|
|
24
|
-
/* @__PURE__ */ t.jsxs(
|
|
28
|
+
/* @__PURE__ */ t.jsxs(k, { level: 2, children: [
|
|
25
29
|
c,
|
|
26
30
|
s && ` - ${s}`
|
|
27
31
|
] }),
|
|
28
|
-
/* @__PURE__ */ t.jsx("div", { className: "grid grid-cols-2 gap-4", children:
|
|
32
|
+
/* @__PURE__ */ t.jsx("div", { className: "grid grid-cols-2 gap-4", children: o.data.filter(
|
|
29
33
|
(e) => !a || e.categories.find(
|
|
30
|
-
(
|
|
34
|
+
(l) => l.tags.find((g) => h(l.label, g) === a)
|
|
31
35
|
)
|
|
32
36
|
).map((e) => /* @__PURE__ */ t.jsx(
|
|
33
|
-
|
|
37
|
+
j,
|
|
34
38
|
{
|
|
35
|
-
to:
|
|
39
|
+
to: p(e.path),
|
|
36
40
|
className: "no-underline hover:!text-foreground",
|
|
37
41
|
children: /* @__PURE__ */ t.jsxs("div", { className: "border h-full rounded-lg p-4 flex flex-col gap-2 cursor-pointer hover:bg-border/20 font-normal", children: [
|
|
38
42
|
/* @__PURE__ */ t.jsx("span", { className: "font-semibold", children: e.label }),
|
|
@@ -46,7 +50,7 @@ const w = ({
|
|
|
46
50
|
// we need to strip out other links to not get a hydration error, like:
|
|
47
51
|
// > In HTML, <a> cannot be a descendant of <a>.
|
|
48
52
|
// > This will cause a hydration error.
|
|
49
|
-
a: (
|
|
53
|
+
a: (l) => /* @__PURE__ */ t.jsx("span", { ...l })
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
56
|
)
|
|
@@ -56,39 +60,39 @@ const w = ({
|
|
|
56
60
|
)) })
|
|
57
61
|
] })
|
|
58
62
|
] });
|
|
59
|
-
}, h = (
|
|
60
|
-
path:
|
|
63
|
+
}, h = (n, r) => f(`${n}-${r}`), R = ({
|
|
64
|
+
path: n,
|
|
61
65
|
items: r,
|
|
62
66
|
label: c,
|
|
63
67
|
categories: s = [],
|
|
64
68
|
filterCatalogItems: i
|
|
65
69
|
}) => {
|
|
66
|
-
const
|
|
70
|
+
const d = Object.fromEntries(
|
|
67
71
|
s.flatMap(
|
|
68
|
-
(a) => [void 0, ...a.tags].map((
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
(a) => [void 0, ...a.tags].map((o) => [
|
|
73
|
+
p(n, o ? h(a.label, o) : void 0),
|
|
74
|
+
o
|
|
71
75
|
])
|
|
72
76
|
)
|
|
73
77
|
);
|
|
74
78
|
return {
|
|
75
79
|
getNavigation: async (a) => {
|
|
76
|
-
if (!Object.keys(
|
|
77
|
-
(e) =>
|
|
80
|
+
if (!Object.keys(d).some(
|
|
81
|
+
(e) => x(e, a)
|
|
78
82
|
))
|
|
79
83
|
return [];
|
|
80
84
|
const m = s.map((e) => ({
|
|
81
85
|
type: "category",
|
|
82
86
|
label: e.label,
|
|
83
87
|
collapsible: !1,
|
|
84
|
-
items: e.tags.map((
|
|
88
|
+
items: e.tags.map((l) => ({
|
|
85
89
|
type: "link",
|
|
86
|
-
to:
|
|
87
|
-
label:
|
|
90
|
+
to: p(n, h(e.label, l)),
|
|
91
|
+
label: l,
|
|
88
92
|
badge: {
|
|
89
93
|
label: String(
|
|
90
94
|
r.filter(
|
|
91
|
-
(g) => g.categories.find((u) => u.tags.includes(
|
|
95
|
+
(g) => g.categories.find((u) => u.tags.includes(l))
|
|
92
96
|
).length
|
|
93
97
|
),
|
|
94
98
|
color: "outline"
|
|
@@ -97,18 +101,18 @@ const w = ({
|
|
|
97
101
|
}));
|
|
98
102
|
return m.unshift({
|
|
99
103
|
type: "link",
|
|
100
|
-
to:
|
|
104
|
+
to: p(n),
|
|
101
105
|
label: "Overview",
|
|
102
106
|
badge: { label: String(r.length), color: "outline" }
|
|
103
107
|
}), m;
|
|
104
108
|
},
|
|
105
|
-
getRoutes: () => Object.entries(
|
|
109
|
+
getRoutes: () => Object.entries(d).map(([a, o]) => ({
|
|
106
110
|
path: a,
|
|
107
111
|
element: /* @__PURE__ */ t.jsx(
|
|
108
112
|
w,
|
|
109
113
|
{
|
|
110
114
|
label: c,
|
|
111
|
-
categoryLabel:
|
|
115
|
+
categoryLabel: o,
|
|
112
116
|
items: r,
|
|
113
117
|
filterCatalogItems: i,
|
|
114
118
|
categories: s
|
|
@@ -118,7 +122,7 @@ const w = ({
|
|
|
118
122
|
};
|
|
119
123
|
};
|
|
120
124
|
export {
|
|
121
|
-
|
|
125
|
+
R as apiCatalogPlugin,
|
|
122
126
|
h as getKey
|
|
123
127
|
};
|
|
124
128
|
//# sourceMappingURL=zudoku.plugin-api-catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.plugin-api-catalog.js","sources":["../src/lib/plugins/api-catalog/Catalog.tsx","../src/lib/plugins/api-catalog/index.tsx"],"sourcesContent":["import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport { useMatch } from \"react-router\";\nimport { Link } from \"zudoku/components\";\nimport { useAuthState } from \"../../authentication/state.js\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { Markdown } from \"../../components/Markdown.js\";\nimport { joinUrl } from \"../../util/joinUrl.js\";\nimport { type ApiCatalogPluginOptions, getKey } from \"./index.js\";\n\nexport const Catalog = ({\n items,\n filterCatalogItems = (items) => items,\n label = \"API Library\",\n categoryLabel,\n}: Omit<ApiCatalogPluginOptions, \"path\"> & {\n categoryLabel?: string;\n}) => {\n const auth = useAuthState();\n const match = useMatch({ path: \"/catalog/:category\" });\n const activeCategory = match?.params.category;\n\n const catalogItems = useSuspenseQuery({\n queryFn: () => filterCatalogItems(items, { auth }),\n queryKey: [\"catalogItems\", auth],\n });\n\n // Only index the overview page, ignore the rest\n const dataSet = activeCategory ? { \"data-pagefind-ignore\": \"all\" } : {};\n\n return (\n <section className=\"pt-(--padding-content-top)\" {...dataSet}>\n <Helmet>\n <title>\n {categoryLabel ? `${categoryLabel} - ` : \"\"}\n {label}\n </title>\n </Helmet>\n <div className=\"grid gap-4\">\n <Heading level={2}>\n {label}\n {categoryLabel && ` - ${categoryLabel}`}\n </Heading>\n\n <div className=\"grid grid-cols-2 gap-4\">\n {catalogItems.data\n .filter(\n (api) =>\n !activeCategory ||\n api.categories.find((c) =>\n c.tags.find((t) => getKey(c.label, t) === activeCategory),\n ),\n )\n .map((api) => (\n <Link\n to={joinUrl(api.path)}\n className=\"no-underline hover:!text-foreground\"\n key={api.path}\n >\n <div className=\"border h-full rounded-lg p-4 flex flex-col gap-2 cursor-pointer hover:bg-border/20 font-normal\">\n <span className=\"font-semibold\">{api.label}</span>\n <Markdown\n className=\"text-sm whitespace-pre-wrap mb-6 line-clamp-2\"\n content={api.description}\n components={{\n // Because we're wrapping the description in a Link already,\n // we need to strip out other links to not get a hydration error, like:\n // > In HTML, <a> cannot be a descendant of <a>.\n // > This will cause a hydration error.\n a: (props) => <span {...props} />,\n }}\n />\n </div>\n </Link>\n ))}\n </div>\n </div>\n </section>\n );\n};\n","import slugify from \"@sindresorhus/slugify\";\nimport { matchPath } from \"react-router\";\nimport type { NavigationItem } from \"../../../config/validators/NavigationSchema.js\";\nimport type { AuthState } from \"../../authentication/state.js\";\nimport type { ZudokuPlugin } from \"../../core/plugins.js\";\nimport { joinUrl } from \"../../util/joinUrl.js\";\nimport { Catalog } from \"./Catalog.js\";\n\nexport const getKey = (category: string, tag: string) =>\n slugify(`${category}-${tag}`);\n\nexport type ApiCatalogItem = {\n path: string;\n label: string;\n description: string;\n categories: CatalogCategory[];\n};\n\nexport type CatalogCategory = {\n label: string;\n tags: string[];\n};\n\nexport type ApiCatalogPluginOptions = {\n path: string;\n label: string;\n categories?: CatalogCategory[];\n items: ApiCatalogItem[];\n filterCatalogItems?: FilterCatalogItemsFn;\n};\n\nexport type CatalogContext<ProviderData = unknown> = {\n auth: AuthState<ProviderData>;\n};\n\nexport type FilterCatalogItemsFn<ProviderData = unknown> = (\n items: ApiCatalogItem[],\n { auth }: CatalogContext<ProviderData>,\n) => ApiCatalogItem[];\n\nexport const apiCatalogPlugin = ({\n path,\n items,\n label,\n categories = [],\n filterCatalogItems,\n}: {\n path: string;\n label: string;\n categories?: CatalogCategory[];\n items: ApiCatalogItem[];\n filterCatalogItems?: FilterCatalogItemsFn;\n}): ZudokuPlugin => {\n const paths = Object.fromEntries(\n categories.flatMap((category) =>\n [undefined, ...category.tags].map((tag) => [\n joinUrl(path, tag ? getKey(category.label, tag) : undefined),\n tag,\n ]),\n ),\n );\n\n return {\n getNavigation: async (currentPath) => {\n const matches = Object.keys(paths).some((path) =>\n matchPath(path, currentPath),\n );\n\n if (!matches) {\n return [];\n }\n\n const navigation: NavigationItem[] = categories.map((category) => ({\n type: \"category\",\n label: category.label,\n collapsible: false,\n items: category.tags.map((tag) => ({\n type: \"link\",\n to: joinUrl(path, getKey(category.label, tag)),\n label: tag,\n badge: {\n label: String(\n items.filter((api) =>\n api.categories.find((c) => c.tags.includes(tag)),\n ).length,\n ),\n color: \"outline\",\n },\n })),\n }));\n\n navigation.unshift({\n type: \"link\",\n to: joinUrl(path),\n label: \"Overview\",\n badge: { label: String(items.length), color: \"outline\" },\n });\n\n return navigation;\n },\n getRoutes: () =>\n Object.entries(paths).map(([path, tag]) => ({\n path,\n element: (\n <Catalog\n label={label}\n categoryLabel={tag}\n items={items}\n filterCatalogItems={filterCatalogItems}\n categories={categories}\n />\n ),\n })),\n };\n};\n"],"names":["Catalog","items","filterCatalogItems","label","categoryLabel","auth","useAuthState","activeCategory","useMatch","catalogItems","useSuspenseQuery","dataSet","jsxs","jsx","Helmet","Heading","api","c","t","getKey","Link","joinUrl","Markdown","props","category","tag","slugify","apiCatalogPlugin","path","categories","paths","currentPath","matchPath","navigation"],"mappings":"
|
|
1
|
+
{"version":3,"file":"zudoku.plugin-api-catalog.js","sources":["../src/lib/plugins/api-catalog/Catalog.tsx","../src/lib/plugins/api-catalog/index.tsx"],"sourcesContent":["import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport { useMatch } from \"react-router\";\nimport { Link } from \"zudoku/components\";\nimport { useAuthState } from \"../../authentication/state.js\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { Markdown } from \"../../components/Markdown.js\";\nimport { joinUrl } from \"../../util/joinUrl.js\";\nimport { type ApiCatalogPluginOptions, getKey } from \"./index.js\";\n\nexport const Catalog = ({\n items,\n filterCatalogItems = (items) => items,\n label = \"API Library\",\n categoryLabel,\n}: Omit<ApiCatalogPluginOptions, \"path\"> & {\n categoryLabel?: string;\n}) => {\n const auth = useAuthState();\n const match = useMatch({ path: \"/catalog/:category\" });\n const activeCategory = match?.params.category;\n\n const catalogItems = useSuspenseQuery({\n queryFn: () => filterCatalogItems(items, { auth }),\n queryKey: [\"catalogItems\", auth],\n });\n\n // Only index the overview page, ignore the rest\n const dataSet = activeCategory ? { \"data-pagefind-ignore\": \"all\" } : {};\n\n return (\n <section className=\"pt-(--padding-content-top)\" {...dataSet}>\n <Helmet>\n <title>\n {categoryLabel ? `${categoryLabel} - ` : \"\"}\n {label}\n </title>\n </Helmet>\n <div className=\"grid gap-4\">\n <Heading level={2}>\n {label}\n {categoryLabel && ` - ${categoryLabel}`}\n </Heading>\n\n <div className=\"grid grid-cols-2 gap-4\">\n {catalogItems.data\n .filter(\n (api) =>\n !activeCategory ||\n api.categories.find((c) =>\n c.tags.find((t) => getKey(c.label, t) === activeCategory),\n ),\n )\n .map((api) => (\n <Link\n to={joinUrl(api.path)}\n className=\"no-underline hover:!text-foreground\"\n key={api.path}\n >\n <div className=\"border h-full rounded-lg p-4 flex flex-col gap-2 cursor-pointer hover:bg-border/20 font-normal\">\n <span className=\"font-semibold\">{api.label}</span>\n <Markdown\n className=\"text-sm whitespace-pre-wrap mb-6 line-clamp-2\"\n content={api.description}\n components={{\n // Because we're wrapping the description in a Link already,\n // we need to strip out other links to not get a hydration error, like:\n // > In HTML, <a> cannot be a descendant of <a>.\n // > This will cause a hydration error.\n a: (props) => <span {...props} />,\n }}\n />\n </div>\n </Link>\n ))}\n </div>\n </div>\n </section>\n );\n};\n","import slugify from \"@sindresorhus/slugify\";\nimport { matchPath } from \"react-router\";\nimport type { NavigationItem } from \"../../../config/validators/NavigationSchema.js\";\nimport type { AuthState } from \"../../authentication/state.js\";\nimport type { ZudokuPlugin } from \"../../core/plugins.js\";\nimport { joinUrl } from \"../../util/joinUrl.js\";\nimport { Catalog } from \"./Catalog.js\";\n\nexport const getKey = (category: string, tag: string) =>\n slugify(`${category}-${tag}`);\n\nexport type ApiCatalogItem = {\n path: string;\n label: string;\n description: string;\n categories: CatalogCategory[];\n};\n\nexport type CatalogCategory = {\n label: string;\n tags: string[];\n};\n\nexport type ApiCatalogPluginOptions = {\n path: string;\n label: string;\n categories?: CatalogCategory[];\n items: ApiCatalogItem[];\n filterCatalogItems?: FilterCatalogItemsFn;\n};\n\nexport type CatalogContext<ProviderData = unknown> = {\n auth: AuthState<ProviderData>;\n};\n\nexport type FilterCatalogItemsFn<ProviderData = unknown> = (\n items: ApiCatalogItem[],\n { auth }: CatalogContext<ProviderData>,\n) => ApiCatalogItem[];\n\nexport const apiCatalogPlugin = ({\n path,\n items,\n label,\n categories = [],\n filterCatalogItems,\n}: {\n path: string;\n label: string;\n categories?: CatalogCategory[];\n items: ApiCatalogItem[];\n filterCatalogItems?: FilterCatalogItemsFn;\n}): ZudokuPlugin => {\n const paths = Object.fromEntries(\n categories.flatMap((category) =>\n [undefined, ...category.tags].map((tag) => [\n joinUrl(path, tag ? getKey(category.label, tag) : undefined),\n tag,\n ]),\n ),\n );\n\n return {\n getNavigation: async (currentPath) => {\n const matches = Object.keys(paths).some((path) =>\n matchPath(path, currentPath),\n );\n\n if (!matches) {\n return [];\n }\n\n const navigation: NavigationItem[] = categories.map((category) => ({\n type: \"category\",\n label: category.label,\n collapsible: false,\n items: category.tags.map((tag) => ({\n type: \"link\",\n to: joinUrl(path, getKey(category.label, tag)),\n label: tag,\n badge: {\n label: String(\n items.filter((api) =>\n api.categories.find((c) => c.tags.includes(tag)),\n ).length,\n ),\n color: \"outline\",\n },\n })),\n }));\n\n navigation.unshift({\n type: \"link\",\n to: joinUrl(path),\n label: \"Overview\",\n badge: { label: String(items.length), color: \"outline\" },\n });\n\n return navigation;\n },\n getRoutes: () =>\n Object.entries(paths).map(([path, tag]) => ({\n path,\n element: (\n <Catalog\n label={label}\n categoryLabel={tag}\n items={items}\n filterCatalogItems={filterCatalogItems}\n categories={categories}\n />\n ),\n })),\n };\n};\n"],"names":["Catalog","items","filterCatalogItems","label","categoryLabel","auth","useAuthState","activeCategory","useMatch","catalogItems","useSuspenseQuery","dataSet","jsxs","jsx","Helmet","Heading","api","c","t","getKey","Link","joinUrl","Markdown","props","category","tag","slugify","apiCatalogPlugin","path","categories","paths","currentPath","matchPath","navigation"],"mappings":";;;;;;;;;;;AAUO,MAAMA,IAAU,CAAC;AAAA,EACtB,OAAAC;AAAA,EACA,oBAAAC,IAAqB,CAACD,MAAUA;AAAAA,EAChC,OAAAE,IAAQ;AAAA,EACR,eAAAC;AACF,MAEM;AACJ,QAAMC,IAAOC,EAAA,GAEPC,IADQC,EAAS,EAAE,MAAM,sBAAsB,GACvB,OAAO,UAE/BC,IAAeC,EAAiB;AAAA,IACpC,SAAS,MAAMR,EA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