zudoku 0.4.5 → 0.4.6-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,6 @@ export const Header = memo(function HeaderInner() {
29
29
  .flatMap((p) => p.getProfileMenuItems(context))
30
30
  .map((i) => _jsx(RecursiveMenu, { item: i }, i.label));
31
31
  const ThemeIcon = isDark ? MoonStarIcon : SunIcon;
32
- return (_jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [_jsx(_Fragment, { children: page?.banner ? (_jsx("div", { className: "h-[--banner-height] bg-primary/90 text-primary-foreground text-center text-sm font-medium py-2 flex items-center justify-center", children: _jsx("div", { children: page.banner.message }) })) : (_jsx("style", { children: `:root{--banner-height: 0}` })) }), _jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [_jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [_jsx("div", { className: "flex", children: _jsx(Link, { to: "/", children: _jsxs("div", { className: "flex items-center gap-3.5", children: [page?.logo && (_jsxs(_Fragment, { children: [_jsx("img", { src: page.logo.src.light, alt: page.logo.alt ?? page.pageTitle, style: { width: page.logo.width }, className: cn("h-10", isDark && "hidden"), loading: "lazy" }), _jsx("img", { src: page.logo.src.dark, alt: page.logo.alt ?? page.pageTitle, style: { width: page.logo.width }, className: cn("h-10", !isDark && "hidden"), loading: "lazy" })] })), _jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: page?.pageTitle })] }) }) }), _jsxs("div", { className: "grid grid-cols-2 md:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [_jsx("div", { className: "w-full justify-center flex", children: _jsx(Search, {}) }), _jsx(MobileTopNavigation, {}), _jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [_jsx(Slotlet, { name: "head-navigation-start" }), isAuthEnabled && !isAuthenticated ? (_jsx(Button, { variant: "ghost", onClick: () => auth.login(), children: "Login" })) : (accountItems.length > 0 && (_jsxs(DropdownMenu, { modal: false, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", children: profile?.email ? `${profile.email}` : "My Account" }) }), _jsxs(DropdownMenuContent, { className: "w-56", children: [_jsx(DropdownMenuLabel, { children: "My Account" }), _jsx(DropdownMenuSeparator, {}), accountItems] })] }))), _jsx("button", { type: "button", "aria-label": isDark ? "Switch to light mode" : "Switch to dark mode", className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full", onClick: toggleTheme, children: _jsx(ThemeIcon, { size: 18 }) }), _jsx(Slotlet, { name: "head-navigation-end" })] })] })] }), _jsx(TopNavigation, {})] })] }));
32
+ return (_jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [_jsx(_Fragment, { children: page?.banner ? (_jsx("div", { className: "h-[--banner-height] bg-primary/90 text-primary-foreground text-center text-sm font-medium py-2 flex items-center justify-center", children: _jsx("div", { children: page.banner.message }) })) : (_jsx("style", { children: `:root{ --banner-height: 0px }` })) }), _jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [_jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [_jsx("div", { className: "flex", children: _jsx(Link, { to: "/", children: _jsxs("div", { className: "flex items-center gap-3.5", children: [page?.logo && (_jsxs(_Fragment, { children: [_jsx("img", { src: page.logo.src.light, alt: page.logo.alt ?? page.pageTitle, style: { width: page.logo.width }, className: cn("h-10", isDark && "hidden"), loading: "lazy" }), _jsx("img", { src: page.logo.src.dark, alt: page.logo.alt ?? page.pageTitle, style: { width: page.logo.width }, className: cn("h-10", !isDark && "hidden"), loading: "lazy" })] })), _jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: page?.pageTitle })] }) }) }), _jsxs("div", { className: "grid grid-cols-2 md:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [_jsx("div", { className: "w-full justify-center flex", children: _jsx(Search, {}) }), _jsx(MobileTopNavigation, {}), _jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [_jsx(Slotlet, { name: "head-navigation-start" }), isAuthEnabled && !isAuthenticated ? (_jsx(Button, { variant: "ghost", onClick: () => auth.login(), children: "Login" })) : (accountItems.length > 0 && (_jsxs(DropdownMenu, { modal: false, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", children: profile?.email ? `${profile.email}` : "My Account" }) }), _jsxs(DropdownMenuContent, { className: "w-56", children: [_jsx(DropdownMenuLabel, { children: "My Account" }), _jsx(DropdownMenuSeparator, {}), accountItems] })] }))), _jsx("button", { type: "button", "aria-label": isDark ? "Switch to light mode" : "Switch to dark mode", className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full", onClick: toggleTheme, children: _jsx(ThemeIcon, { size: 18 }) }), _jsx(Slotlet, { name: "head-navigation-end" })] })] })] }), _jsx(TopNavigation, {})] })] }));
33
33
  });
34
34
  //# sourceMappingURL=Header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/lib/components/Header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAyB,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB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AM,aACnC,KAAC,iBAAiB,6BAA+B,EACjD,KAAC,qBAAqB,KAAG,EACxB,YAAY,IACO,IACT,CAChB,CACF,EACD,iBACE,IAAI,EAAC,QAAQ,gBAEX,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,qBAAqB,EAEzD,SAAS,EAAC,6DAA6D,EACvE,OAAO,EAAE,WAAW,YAEpB,KAAC,SAAS,IAAC,IAAI,EAAE,EAAE,GAAI,GAChB,EACT,KAAC,OAAO,IAAC,IAAI,EAAC,qBAAqB,GAAG,IAClC,IACF,IACF,EACN,KAAC,aAAa,KAAG,IACb,IACC,CACV,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/lib/components/Header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAyB,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MA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I,EAAC,qBAAqB,GAAG,IAClC,IACF,IACF,EACN,KAAC,aAAa,KAAG,IACb,IACC,CACV,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -16,7 +16,7 @@ export const OperationListItem = ({ operationFragment, }) => {
16
16
  const groupedParameters = groupBy(operation.parameters ?? [], (param) => param.in);
17
17
  const first = operation.responses.at(0);
18
18
  const [selectedResponse, setSelectedResponse] = useState(first?.statusCode);
19
- return (_jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16", children: [_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx(Heading, { level: 2, id: operation.slug, registerSidebarAnchor: true, children: operation.summary }), operation.description && (_jsx(Markdown, { className: `${ProseClasses} max-w-full prose-img:max-w-prose`, content: operation.description })), operation.parameters && operation.parameters.length > 0 && (_jsx(_Fragment, { children: PARAM_GROUPS.flatMap((group) => groupedParameters[group]?.length ? (_jsx(ParameterList, { id: operation.slug, parameters: groupedParameters[group], group: group }, group)) : ([])) })), renderIf(operation.requestBody?.content?.at(0)?.schema, (schema) => (_jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [_jsx(Heading, { level: 3, className: "capitalize", children: "Request Body" }), _jsx(SchemaView, { schema: schema })] }))), operation.responses.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Heading, { level: 3, className: "capitalize mt-8 pt-8 border-t", children: "Responses" }), _jsxs(Tabs, { onValueChange: (value) => setSelectedResponse(value), value: selectedResponse, children: [operation.responses.length > 1 && (_jsx(TabsList, { children: operation.responses.map((response) => (_jsx(TabsTrigger, { value: response.statusCode, title: response.description, children: response.statusCode }, response.statusCode))) })), _jsx("ul", { className: "list-none m-0 px-0", children: operation.responses.map((response) => (_jsx(TabsContent, { value: response.statusCode, children: _jsx(SchemaView, { schema: response.content?.find((content) => content.schema)
19
+ return (_jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16", children: [_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx(Heading, { level: 2, id: operation.slug, registerSidebarAnchor: true, children: operation.summary }), operation.description && (_jsx(Markdown, { className: `${ProseClasses} max-w-full prose-img:max-w-prose`, content: operation.description })), operation.parameters && operation.parameters.length > 0 && (_jsx(_Fragment, { children: PARAM_GROUPS.flatMap((group) => groupedParameters[group]?.length ? (_jsx(ParameterList, { id: operation.slug, parameters: groupedParameters[group], group: group }, group)) : ([])) })), renderIf(operation.requestBody?.content?.at(0)?.schema, (schema) => (_jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [_jsx(Heading, { level: 3, className: "capitalize", id: `${operation.slug}/request-body`, registerSidebarAnchor: true, children: "Request Body" }), _jsx(SchemaView, { schema: schema })] }))), operation.responses.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Heading, { level: 3, className: "capitalize mt-8 pt-8 border-t", id: `${operation.slug}/responses`, registerSidebarAnchor: true, children: "Responses" }), _jsxs(Tabs, { onValueChange: (value) => setSelectedResponse(value), value: selectedResponse, children: [operation.responses.length > 1 && (_jsx(TabsList, { children: operation.responses.map((response) => (_jsx(TabsTrigger, { value: response.statusCode, title: response.description, children: response.statusCode }, response.statusCode))) })), _jsx("ul", { className: "list-none m-0 px-0", children: operation.responses.map((response) => (_jsx(TabsContent, { value: response.statusCode, children: _jsx(SchemaView, { schema: response.content?.find((content) => content.schema)
20
20
  ?.schema }) }, response.statusCode))) })] })] }))] }), _jsx(Sidecar, { selectedResponse: selectedResponse, onSelectResponse: setSelectedResponse, operation: operation })] }, operation.operationId));
21
21
  };
22
22
  //# sourceMappingURL=OperationListItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OperationListItem.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/OperationListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,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AAU,CAIZ,CACf,CAAC,GACO,CACZ,EACD,aAAI,SAAS,EAAC,oBAAoB,YAC/B,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CACrC,KAAC,WAAW,IACV,KAAK,EAAE,QAAQ,CAAC,UAAU,YAG1B,KAAC,UAAU,IACT,MAAM,EACJ,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;oDACjD,EAAE,MAAM,GAEZ,IAPG,QAAQ,CAAC,UAAU,CAQZ,CACf,CAAC,GACC,IACA,IACN,CACJ,IACG,EAEN,KAAC,OAAO,IACN,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,mBAAmB,EACrC,SAAS,EAAE,SAAS,GACpB,KA7FG,SAAS,CAAC,WAAW,CA8FtB,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { j as e } from "./jsx-runtime-B6kdoens.js";
2
2
  import { C as k } from "./CategoryHeading-BG0OI3O5.js";
3
- import { D as A } from "./DeveloperHint-Dim4dKeY.js";
3
+ import { D as L } from "./DeveloperHint-Dim4dKeY.js";
4
4
  import { E as I } from "./ErrorPage-XOZWbKDe.js";
5
- import { c as j, h as m, H as y, a as x, P as u, I as w, S as R } from "./Markdown-Bg4SS0au.js";
5
+ import { c as j, h as m, H as y, a as x, P as u, I as S, S as R } from "./Markdown-Bg4SS0au.js";
6
6
  import { useState as f, useCallback as T } from "react";
7
- import { C as z, a as p, b as F, c as H, d as $, T as E, e as D, f as B, g as G, S as Q, h as P, u as V } from "./index-BfLQd6h_.js";
7
+ import { C as z, a as p, b as $, c as F, d as H, T as E, e as D, f as B, g as G, S as Q, h as P, u as V } from "./index-Bx9hQF5t.js";
8
8
  import { R as N, T as v, C, a as _ } from "./index-CvPXovcL.js";
9
9
  import { u as J } from "./urql-YhcsXYy8.js";
10
10
  import { B as K } from "./index-KUt-5Yzq.js";
@@ -80,13 +80,13 @@ const se = j("SquarePlus", [
80
80
  function te(t, s) {
81
81
  return s;
82
82
  }
83
- const M = (t, s) => t.reduce(
84
- (n, a) => {
85
- const r = s(a);
86
- return n[r] || (n[r] = []), n[r].push(a), n;
83
+ const q = (t, s) => t.reduce(
84
+ (n, i) => {
85
+ const r = s(i);
86
+ return n[r] || (n[r] = []), n[r].push(i), n;
87
87
  },
88
88
  {}
89
- ), re = (t, s) => t ? s(t) : void 0, S = (t) => t.schema != null && typeof t.schema == "object" ? t.schema : {
89
+ ), re = (t, s) => t ? s(t) : void 0, w = (t) => t.schema != null && typeof t.schema == "object" ? t.schema : {
90
90
  type: "string"
91
91
  }, ne = ({
92
92
  parameter: t,
@@ -103,7 +103,7 @@ const M = (t, s) => t.reduce(
103
103
  }
104
104
  ) : t.name }),
105
105
  t.required && /* @__PURE__ */ e.jsx("span", { className: "py-px px-1.5 font-medium bg-primary/75 text-muted rounded-lg", children: "required" }),
106
- S(t).type && /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: S(t).type })
106
+ w(t).type && /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: w(t).type })
107
107
  ] }),
108
108
  t.description && /* @__PURE__ */ e.jsx(
109
109
  m,
@@ -112,22 +112,22 @@ const M = (t, s) => t.reduce(
112
112
  className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
113
113
  }
114
114
  )
115
- ] }), ae = ({
115
+ ] }), ie = ({
116
116
  group: t,
117
117
  parameters: s,
118
118
  id: n
119
119
  }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
120
120
  /* @__PURE__ */ e.jsx(y, { level: 3, id: `${n}/${t}-parameters`, className: "capitalize", children: t === "header" ? "Headers" : `${t} Parameters` }),
121
- /* @__PURE__ */ e.jsx(p, { children: /* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: s.sort((a, r) => a.required === r.required ? 0 : a.required ? -1 : 1).map((a) => /* @__PURE__ */ e.jsx(
121
+ /* @__PURE__ */ e.jsx(p, { children: /* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: s.sort((i, r) => i.required === r.required ? 0 : i.required ? -1 : 1).map((i) => /* @__PURE__ */ e.jsx(
122
122
  ne,
123
123
  {
124
- parameter: a,
124
+ parameter: i,
125
125
  id: n,
126
126
  group: t
127
127
  },
128
- `${a.name}-${a.in}`
128
+ `${i.name}-${i.in}`
129
129
  )) }) })
130
- ] }), ie = (t) => Object.entries(t), oe = {
130
+ ] }), ae = (t) => Object.entries(t), oe = {
131
131
  AND: /* @__PURE__ */ e.jsx(W, { size: 16, className: "fill-card" }),
132
132
  OR: /* @__PURE__ */ e.jsx(Z, { size: 16, className: "fill-card" }),
133
133
  ONE: /* @__PURE__ */ e.jsx(X, { size: 14, className: "fill-card" })
@@ -168,7 +168,7 @@ const M = (t, s) => t.reduce(
168
168
  N,
169
169
  {
170
170
  open: s,
171
- onOpenChange: () => n((a) => !a),
171
+ onOpenChange: () => n((i) => !i),
172
172
  className: "group",
173
173
  children: [
174
174
  /* @__PURE__ */ e.jsx(v, { children: /* @__PURE__ */ e.jsx(ce, { type: t.type, isOpen: s }) }),
@@ -185,21 +185,21 @@ const M = (t, s) => t.reduce(
185
185
  schemas: t,
186
186
  type: s,
187
187
  isOpen: n,
188
- level: a,
188
+ level: i,
189
189
  toggleOpen: r
190
190
  }) => /* @__PURE__ */ e.jsx(N, { open: n, onOpenChange: r, asChild: !0, children: /* @__PURE__ */ e.jsxs(p, { className: "px-6", children: [
191
191
  /* @__PURE__ */ e.jsxs(v, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
192
192
  n ? /* @__PURE__ */ e.jsx(ee, { size: 14 }) : /* @__PURE__ */ e.jsx(se, { size: 14 }),
193
193
  /* @__PURE__ */ e.jsx("span", { children: pe[s] })
194
194
  ] }),
195
- /* @__PURE__ */ e.jsx(C, { className: "pb-4", children: t.map((i, l) => (
195
+ /* @__PURE__ */ e.jsx(C, { className: "pb-4", children: t.map((a, l) => (
196
196
  // eslint-disable-next-line react/no-array-index-key
197
197
  /* @__PURE__ */ e.jsx(
198
198
  de,
199
199
  {
200
200
  type: s,
201
- schema: i,
202
- level: a
201
+ schema: a,
202
+ level: i
203
203
  },
204
204
  l
205
205
  )
@@ -208,17 +208,17 @@ const M = (t, s) => t.reduce(
208
208
  allOf: "AND",
209
209
  anyOf: "OR",
210
210
  oneOf: "ONE"
211
- }, q = ({
211
+ }, M = ({
212
212
  schema: t,
213
213
  level: s
214
214
  }) => {
215
- const [n, a] = f(!0), r = T(() => a((i) => !i), []);
216
- for (const [i, l] of ie(ue))
217
- if (t[i])
215
+ const [n, i] = f(!0), r = T(() => i((a) => !a), []);
216
+ for (const [a, l] of ae(ue))
217
+ if (t[a])
218
218
  return /* @__PURE__ */ e.jsx(
219
219
  me,
220
220
  {
221
- schemas: t[i],
221
+ schemas: t[a],
222
222
  type: l,
223
223
  isOpen: n,
224
224
  toggleOpen: r,
@@ -229,9 +229,9 @@ const M = (t, s) => t.reduce(
229
229
  name: t,
230
230
  schema: s,
231
231
  group: n,
232
- level: a,
232
+ level: i,
233
233
  defaultOpen: r = !1,
234
- showCollapseButton: i = !0
234
+ showCollapseButton: a = !0
235
235
  }) => {
236
236
  var c;
237
237
  const [l, h] = f(r);
@@ -258,7 +258,7 @@ const M = (t, s) => t.reduce(
258
258
  open: l,
259
259
  onOpenChange: () => h(!l),
260
260
  children: [
261
- i && /* @__PURE__ */ e.jsx(v, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
261
+ a && /* @__PURE__ */ e.jsx(v, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
262
262
  K,
263
263
  {
264
264
  variant: "outline",
@@ -270,7 +270,7 @@ const M = (t, s) => t.reduce(
270
270
  ]
271
271
  }
272
272
  ) }),
273
- /* @__PURE__ */ e.jsx(C, { children: /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: b(s) ? /* @__PURE__ */ e.jsx(q, { schema: s, level: a + 1 }) : s.type === "object" ? /* @__PURE__ */ e.jsx(g, { schema: s, level: a + 1 }) : s.type === "array" && typeof s.items == "object" && /* @__PURE__ */ e.jsx(g, { schema: s.items, level: a + 1 }) }) })
273
+ /* @__PURE__ */ e.jsx(C, { children: /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: b(s) ? /* @__PURE__ */ e.jsx(M, { schema: s, level: i + 1 }) : s.type === "object" ? /* @__PURE__ */ e.jsx(g, { schema: s, level: i + 1 }) : s.type === "array" && typeof s.items == "object" && /* @__PURE__ */ e.jsx(g, { schema: s.items, level: i + 1 }) }) })
274
274
  ]
275
275
  }
276
276
  )
@@ -282,9 +282,9 @@ const M = (t, s) => t.reduce(
282
282
  }) => {
283
283
  if (!t || Object.keys(t).length === 0)
284
284
  return /* @__PURE__ */ e.jsx(p, { className: "p-4", children: /* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
285
- const a = (r, i) => {
285
+ const i = (r, a) => {
286
286
  if (b(r))
287
- return /* @__PURE__ */ e.jsx(q, { schema: r, level: i });
287
+ return /* @__PURE__ */ e.jsx(M, { schema: r, level: a });
288
288
  if (r.type === "array" && r.items) {
289
289
  const l = r.items;
290
290
  return typeof l.type == "string" && ["string", "number", "boolean", "integer"].includes(l.type) ? /* @__PURE__ */ e.jsxs(p, { className: "p-4", children: [
@@ -304,8 +304,8 @@ const M = (t, s) => t.reduce(
304
304
  )
305
305
  ] }) : l.type === "object" ? /* @__PURE__ */ e.jsxs(p, { className: "flex flex-col gap-2 bg-border/30 p-4", children: [
306
306
  /* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground", children: "object[]" }),
307
- a(l, i + 1)
308
- ] }) : a(l, i + 1);
307
+ i(l, a + 1)
308
+ ] }) : i(l, a + 1);
309
309
  }
310
310
  if (r.type === "object" && !r.properties)
311
311
  return /* @__PURE__ */ e.jsxs(p, { className: "p-4 flex gap-2 items-center", children: [
@@ -323,7 +323,7 @@ const M = (t, s) => t.reduce(
323
323
  )
324
324
  ] });
325
325
  if (r.properties) {
326
- const l = M(
326
+ const l = q(
327
327
  Object.entries(r.properties),
328
328
  ([c, o]) => {
329
329
  var d;
@@ -337,7 +337,7 @@ const M = (t, s) => t.reduce(
337
337
  name: o,
338
338
  schema: d,
339
339
  group: c,
340
- level: i,
340
+ level: a,
341
341
  defaultOpen: n
342
342
  },
343
343
  o
@@ -357,22 +357,22 @@ const M = (t, s) => t.reduce(
357
357
  }
358
358
  )
359
359
  ] }) : r.additionalProperties ? /* @__PURE__ */ e.jsxs(p, { className: "my-2", children: [
360
- /* @__PURE__ */ e.jsx(F, { children: /* @__PURE__ */ e.jsx(H, { children: "Additional Properties:" }) }),
361
- /* @__PURE__ */ e.jsx($, { children: a(
360
+ /* @__PURE__ */ e.jsx($, { children: /* @__PURE__ */ e.jsx(F, { children: "Additional Properties:" }) }),
361
+ /* @__PURE__ */ e.jsx(H, { children: i(
362
362
  r.additionalProperties,
363
- i + 1
363
+ a + 1
364
364
  ) })
365
365
  ] }) : null;
366
366
  };
367
- return a(t, s);
367
+ return i(t, s);
368
368
  }, je = ["path", "query", "header", "cookie"], ye = ({
369
369
  operationFragment: t
370
370
  }) => {
371
371
  var l, h, c;
372
- const s = te(ge, t), n = M(
372
+ const s = te(ge, t), n = q(
373
373
  s.parameters ?? [],
374
374
  (o) => o.in
375
- ), a = s.responses.at(0), [r, i] = f(a == null ? void 0 : a.statusCode);
375
+ ), i = s.responses.at(0), [r, a] = f(i == null ? void 0 : i.statusCode);
376
376
  return /* @__PURE__ */ e.jsxs(
377
377
  "div",
378
378
  {
@@ -391,7 +391,7 @@ const M = (t, s) => t.reduce(
391
391
  (o) => {
392
392
  var d;
393
393
  return (d = n[o]) != null && d.length ? /* @__PURE__ */ e.jsx(
394
- ae,
394
+ ie,
395
395
  {
396
396
  id: s.slug,
397
397
  parameters: n[o],
@@ -402,15 +402,33 @@ const M = (t, s) => t.reduce(
402
402
  }
403
403
  ) }),
404
404
  re((c = (h = (l = s.requestBody) == null ? void 0 : l.content) == null ? void 0 : h.at(0)) == null ? void 0 : c.schema, (o) => /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
405
- /* @__PURE__ */ e.jsx(y, { level: 3, className: "capitalize", children: "Request Body" }),
405
+ /* @__PURE__ */ e.jsx(
406
+ y,
407
+ {
408
+ level: 3,
409
+ className: "capitalize",
410
+ id: `${s.slug}/request-body`,
411
+ registerSidebarAnchor: !0,
412
+ children: "Request Body"
413
+ }
414
+ ),
406
415
  /* @__PURE__ */ e.jsx(g, { schema: o })
407
416
  ] })),
408
417
  s.responses.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
409
- /* @__PURE__ */ e.jsx(y, { level: 3, className: "capitalize mt-8 pt-8 border-t", children: "Responses" }),
418
+ /* @__PURE__ */ e.jsx(
419
+ y,
420
+ {
421
+ level: 3,
422
+ className: "capitalize mt-8 pt-8 border-t",
423
+ id: `${s.slug}/responses`,
424
+ registerSidebarAnchor: !0,
425
+ children: "Responses"
426
+ }
427
+ ),
410
428
  /* @__PURE__ */ e.jsxs(
411
429
  E,
412
430
  {
413
- onValueChange: (o) => i(o),
431
+ onValueChange: (o) => a(o),
414
432
  value: r,
415
433
  children: [
416
434
  s.responses.length > 1 && /* @__PURE__ */ e.jsx(D, { children: s.responses.map((o) => /* @__PURE__ */ e.jsx(
@@ -431,7 +449,7 @@ const M = (t, s) => t.reduce(
431
449
  children: /* @__PURE__ */ e.jsx(
432
450
  g,
433
451
  {
434
- schema: (O = (d = o.content) == null ? void 0 : d.find((L) => L.schema)) == null ? void 0 : O.schema
452
+ schema: (O = (d = o.content) == null ? void 0 : d.find((A) => A.schema)) == null ? void 0 : O.schema
435
453
  }
436
454
  )
437
455
  },
@@ -447,7 +465,7 @@ const M = (t, s) => t.reduce(
447
465
  Q,
448
466
  {
449
467
  selectedResponse: r,
450
- onSelectResponse: i,
468
+ onSelectResponse: a,
451
469
  operation: s
452
470
  }
453
471
  )
@@ -526,29 +544,29 @@ const M = (t, s) => t.reduce(
526
544
  }
527
545
  }
528
546
  `
529
- ), be = { suspense: !0 }, Ae = () => {
547
+ ), be = { suspense: !0 }, Le = () => {
530
548
  var r;
531
549
  const { type: t, input: s } = V(), [n] = J({
532
550
  query: fe,
533
551
  variables: { type: t, input: s },
534
552
  context: be
535
- }), a = (r = n.error) == null ? void 0 : r.graphQLErrors.at(0);
536
- return a ? /* @__PURE__ */ e.jsx(
553
+ }), i = (r = n.error) == null ? void 0 : r.graphQLErrors.at(0);
554
+ return i ? /* @__PURE__ */ e.jsx(
537
555
  I,
538
556
  {
539
557
  category: "Error",
540
558
  title: "Schema cannot be displayed",
541
559
  message: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
542
- /* @__PURE__ */ e.jsxs(A, { className: "mb-4", children: [
560
+ /* @__PURE__ */ e.jsxs(L, { className: "mb-4", children: [
543
561
  "Check your configuration value ",
544
- /* @__PURE__ */ e.jsx(w, { children: "apis.type" }),
562
+ /* @__PURE__ */ e.jsx(S, { children: "apis.type" }),
545
563
  " ",
546
564
  "and ",
547
- /* @__PURE__ */ e.jsx(w, { children: "apis.input" }),
565
+ /* @__PURE__ */ e.jsx(S, { children: "apis.input" }),
548
566
  " in the Zudoku config."
549
567
  ] }),
550
568
  "An error occurred while trying to fetch the API reference:",
551
- /* @__PURE__ */ e.jsx(R, { code: a.toString(), language: "plain" })
569
+ /* @__PURE__ */ e.jsx(R, { code: i.toString(), language: "plain" })
552
570
  ] })
553
571
  }
554
572
  ) : n.data ? /* @__PURE__ */ e.jsxs("div", { className: "pt-[--padding-content-top]", children: [
@@ -563,27 +581,27 @@ const M = (t, s) => t.reduce(
563
581
  ]
564
582
  }
565
583
  ),
566
- n.data.schema.tags.filter((i) => i.operations.length > 0).map((i) => /* @__PURE__ */ e.jsxs("div", { children: [
567
- i.name && /* @__PURE__ */ e.jsx(k, { children: i.name }),
568
- i.description && /* @__PURE__ */ e.jsx(
584
+ n.data.schema.tags.filter((a) => a.operations.length > 0).map((a) => /* @__PURE__ */ e.jsxs("div", { children: [
585
+ a.name && /* @__PURE__ */ e.jsx(k, { children: a.name }),
586
+ a.description && /* @__PURE__ */ e.jsx(
569
587
  m,
570
588
  {
571
589
  className: `${u} max-w-full prose-img:max-w-prose w-full mt-2 mb-12`,
572
- content: i.description
590
+ content: a.description
573
591
  }
574
592
  ),
575
- /* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(_, { children: i.operations.map((l) => /* @__PURE__ */ e.jsx(
593
+ /* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(_, { children: a.operations.map((l) => /* @__PURE__ */ e.jsx(
576
594
  ye,
577
595
  {
578
596
  operationFragment: l
579
597
  },
580
598
  l.slug
581
599
  )) }) })
582
- ] }, i.name))
600
+ ] }, a.name))
583
601
  ] }) : null;
584
602
  };
585
603
  export {
586
- Ae as OperationList,
604
+ Le as OperationList,
587
605
  ge as OperationsFragment
588
606
  };
589
- //# sourceMappingURL=OperationList-CLtN0fiZ.js.map
607
+ //# sourceMappingURL=OperationList-SaIDVrdZ.js.map