zudoku 0.3.0-dev.129 → 0.3.0-dev.130
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/lib/components/navigation/SidebarWrapper.js +2 -3
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -4
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +17 -3
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/lib/OperationList-Cxiw2Z-v.js +457 -0
- package/lib/OperationList-Cxiw2Z-v.js.map +1 -0
- package/lib/{Route-DnFLPnPw.js → Route-DfAFiR7v.js} +2 -2
- package/lib/{Route-DnFLPnPw.js.map → Route-DfAFiR7v.js.map} +1 -1
- package/lib/{index-Bx0AgZT5.js → index-D-9zqIOh.js} +7 -7
- package/lib/{index-Bx0AgZT5.js.map → index-D-9zqIOh.js.map} +1 -1
- package/lib/zudoku.components.js +244 -242
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/app/main.css +22 -0
- package/src/lib/components/navigation/SidebarWrapper.tsx +20 -18
- package/src/lib/plugins/openapi/OperationListItem.tsx +6 -11
- package/src/lib/plugins/openapi/index.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +67 -7
- package/lib/OperationList-BoB5bkdm.js +0 -414
- package/lib/OperationList-BoB5bkdm.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { cn } from "../../util/cn.js";
|
|
4
|
-
export const SidebarWrapper = forwardRef(
|
|
5
|
-
|
|
6
|
-
});
|
|
4
|
+
export const SidebarWrapper = forwardRef(({ children, className, pushMainContent }, ref) => (_jsx("nav", { "data-navigation": String(pushMainContent), className: cn("scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0", "px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]", "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2", className), ref: ref, children: children })));
|
|
5
|
+
SidebarWrapper.displayName = "SidebarWrapper";
|
|
7
6
|
//# sourceMappingURL=SidebarWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarWrapper.js","sourceRoot":"","sources":["../../../../src/lib/components/navigation/SidebarWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAGtC,
|
|
1
|
+
{"version":3,"file":"SidebarWrapper.js","sourceRoot":"","sources":["../../../../src/lib/components/navigation/SidebarWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAGtC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnD,iCAKmB,MAAM,CAAC,eAAe,CAAC,EACxC,SAAS,EAAE,EAAE,CACX,+EAA+E,EAC/E,mFAAmF,EACnF,4EAA4E,EAC5E,SAAS,CACV,EACD,GAAG,EAAE,GAAG,YAEP,QAAQ,GACL,CACP,CAAC,CAAC;AAEH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { Heading } from "../../components/Heading.js";
|
|
4
4
|
import { Markdown } from "../../components/Markdown.js";
|
|
5
|
-
import { Card } from "../../ui/Card.js";
|
|
6
5
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../ui/Tabs.js";
|
|
7
6
|
import { groupBy } from "../../util/groupBy.js";
|
|
8
7
|
import { renderIf } from "../../util/renderIf.js";
|
|
@@ -18,8 +17,7 @@ export const OperationListItem = ({ operationFragment, }) => {
|
|
|
18
17
|
const groupedParameters = groupBy(operation.parameters ?? [], (param) => param.in);
|
|
19
18
|
const first = operation.responses.at(0);
|
|
20
19
|
const [selectedResponse, setSelectedResponse] = useState(first?.statusCode);
|
|
21
|
-
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: SchemaProseClasses, 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 overflow-hidden", children: operation.responses.map((response) => (_jsx(TabsContent, { value: response.statusCode, children:
|
|
22
|
-
|
|
23
|
-
}) ?? (_jsx(Card, { className: "font-mono text-sm p-4 italic bg-border/20", children: "No response body" })) }, response.statusCode))) })] })] }))] }), _jsx(Sidecar, { selectedResponse: selectedResponse, onSelectResponse: setSelectedResponse, operation: operation })] }, operation.operationId));
|
|
20
|
+
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: SchemaProseClasses, 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 overflow-hidden", children: operation.responses.map((response) => (_jsx(TabsContent, { value: response.statusCode, children: _jsx(SchemaView, { schema: response.content?.find((content) => content.schema)
|
|
21
|
+
?.schema }) }, response.statusCode))) })] })] }))] }), _jsx(Sidecar, { selectedResponse: selectedResponse, onSelectResponse: setSelectedResponse, operation: operation })] }, operation.operationId));
|
|
24
22
|
};
|
|
25
23
|
//# 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,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,
|
|
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,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAgB,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ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yBACF;qBACF;iBACF;aACF;SACsB;KAC5B,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SchemaObject } from "../../../oas/parser/index.js";
|
|
2
2
|
export declare const SchemaView: ({ schema, level, defaultOpen, }: {
|
|
3
|
-
schema
|
|
3
|
+
schema?: SchemaObject | null;
|
|
4
4
|
level?: number;
|
|
5
5
|
defaultOpen?: boolean;
|
|
6
6
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,27 +1,37 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Markdown, ProseClasses } from "../../../components/Markdown.js";
|
|
2
3
|
import { Card, CardContent, CardHeader, CardTitle } from "../../../ui/Card.js";
|
|
4
|
+
import { cn } from "../../../util/cn.js";
|
|
3
5
|
import { groupBy } from "../../../util/groupBy.js";
|
|
4
6
|
import { SchemaLogicalGroup, SchemaPropertyItem } from "./SchemaComponents.js";
|
|
5
7
|
import { hasLogicalGroupings } from "./utils.js";
|
|
6
8
|
export const SchemaView = ({ schema, level = 0, defaultOpen = false, }) => {
|
|
9
|
+
if (!schema || Object.keys(schema).length === 0) {
|
|
10
|
+
return (_jsx(Card, { className: "p-4", children: _jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) }));
|
|
11
|
+
}
|
|
7
12
|
const renderSchema = (schema, level) => {
|
|
8
13
|
if (schema.oneOf || schema.allOf || schema.anyOf) {
|
|
9
14
|
return _jsx(SchemaLogicalGroup, { schema: schema, level: level });
|
|
10
15
|
}
|
|
16
|
+
// Sometimes items is not defined
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
11
18
|
if (schema.type === "array" && schema.items) {
|
|
12
19
|
const itemsSchema = schema.items;
|
|
13
20
|
if (typeof itemsSchema.type === "string" &&
|
|
14
21
|
["string", "number", "boolean", "integer"].includes(itemsSchema.type)) {
|
|
15
|
-
return (
|
|
22
|
+
return (_jsxs(Card, { className: "p-4", children: [_jsxs("span", { className: "text-sm text-muted-foreground", children: [itemsSchema.type, "[]"] }), schema.description && (_jsx(Markdown, { className: cn(ProseClasses, "text-sm leading-normal line-clamp-4"), content: schema.description }))] }));
|
|
16
23
|
}
|
|
17
24
|
else if (itemsSchema.type === "object" ||
|
|
18
25
|
hasLogicalGroupings(itemsSchema)) {
|
|
19
|
-
return (_jsxs(Card, { className: "flex flex-col gap-2 bg-border/30 p-4
|
|
26
|
+
return (_jsxs(Card, { className: "flex flex-col gap-2 bg-border/30 p-4", children: [_jsx("span", { className: "text-sm text-muted-foreground", children: "object[]" }), renderSchema(itemsSchema, level + 1)] }));
|
|
20
27
|
}
|
|
21
28
|
else {
|
|
22
29
|
return renderSchema(itemsSchema, level + 1);
|
|
23
30
|
}
|
|
24
31
|
}
|
|
32
|
+
if (schema.type === "object" && !schema.properties) {
|
|
33
|
+
return (_jsxs(Card, { className: "p-4 flex gap-2 items-center", children: ["name" in schema && _jsx(_Fragment, { children: schema.name }), _jsx("span", { className: "text-sm text-muted-foreground", children: "object" }), schema.description && (_jsx(Markdown, { className: cn(ProseClasses, "text-sm leading-normal line-clamp-4"), content: schema.description }))] }));
|
|
34
|
+
}
|
|
25
35
|
if (schema.properties) {
|
|
26
36
|
const groupedProperties = groupBy(Object.entries(schema.properties), ([propertyName, property]) => {
|
|
27
37
|
return property.deprecated
|
|
@@ -34,6 +44,10 @@ export const SchemaView = ({ schema, level = 0, defaultOpen = false, }) => {
|
|
|
34
44
|
const groupNames = ["required", "optional", "deprecated"];
|
|
35
45
|
return (_jsx(Card, { className: "divide-y overflow-hidden", children: groupNames.map((group) => groupedProperties[group] && (_jsx("ul", { className: "divide-y", children: groupedProperties[group].map(([key, value]) => (_jsx(SchemaPropertyItem, { name: key, value: value, group: group, level: level, defaultOpen: isTopLevelSingleItem || defaultOpen, showCollapseButton: !isTopLevelSingleItem }, key))) }, group))) }));
|
|
36
46
|
}
|
|
47
|
+
if (typeof schema.type === "string" &&
|
|
48
|
+
["string", "number", "boolean", "integer", "null"].includes(schema.type)) {
|
|
49
|
+
return (_jsxs(Card, { className: "p-4", children: [_jsx("span", { className: "text-sm text-muted-foreground", children: schema.type }), schema.description && (_jsx(Markdown, { className: cn(ProseClasses, "text-sm leading-normal line-clamp-4"), content: schema.description }))] }));
|
|
50
|
+
}
|
|
37
51
|
if (schema.additionalProperties) {
|
|
38
52
|
return (_jsxs(Card, { className: "my-2", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: "Additional Properties:" }) }), _jsx(CardContent, { children: renderSchema(schema.additionalProperties, level + 1) })] }));
|
|
39
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaView.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/schema/SchemaView.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SchemaView.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/schema/SchemaView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,MAAM,EACN,KAAK,GAAG,CAAC,EACT,WAAW,GAAG,KAAK,GAKpB,EAAE,EAAE;IACH,IAAI,CAAC,MAAM,IAAI,MAAM,CA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GACW,IACT,CACR,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC"}
|
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
+
import { C as b } from "./CategoryHeading-z15xh7Jb.js";
|
|
3
|
+
import { D as T } from "./DeveloperHint-BQSFXH01.js";
|
|
4
|
+
import { C as v, a as p, b as A, c as I, d as R, T as k, e as H, f as F, g as $, S as B, h as S, u as M, E as z } from "./index-D-9zqIOh.js";
|
|
5
|
+
import { c as E, h as m, H as h, a as u, P as g, I as O, S as G } from "./Markdown-CEccPMI_.js";
|
|
6
|
+
import { useState as P } from "react";
|
|
7
|
+
import { R as D, T as Q, C as V, a as _ } from "./index-Dz4LyXZI.js";
|
|
8
|
+
import { u as J } from "./urql-DrBfkb92.js";
|
|
9
|
+
import { B as K } from "./Combination-DTfV-c98.js";
|
|
10
|
+
/**
|
|
11
|
+
* @license lucide-react v0.378.0 - ISC
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the ISC license.
|
|
14
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
const U = E("ListPlus", [
|
|
17
|
+
["path", { d: "M11 12H3", key: "51ecnj" }],
|
|
18
|
+
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
19
|
+
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
20
|
+
["path", { d: "M18 9v6", key: "1twb98" }],
|
|
21
|
+
["path", { d: "M21 12h-6", key: "bt1uis" }]
|
|
22
|
+
]);
|
|
23
|
+
function Z(s, t) {
|
|
24
|
+
return t;
|
|
25
|
+
}
|
|
26
|
+
const q = (s, t) => s.reduce(
|
|
27
|
+
(i, r) => {
|
|
28
|
+
const n = t(r);
|
|
29
|
+
return i[n] || (i[n] = []), i[n].push(r), i;
|
|
30
|
+
},
|
|
31
|
+
{}
|
|
32
|
+
), W = (s, t) => s ? t(s) : void 0, C = (s) => s.schema != null && typeof s.schema == "object" ? s.schema : {
|
|
33
|
+
type: "string"
|
|
34
|
+
}, X = ({
|
|
35
|
+
parameter: s,
|
|
36
|
+
group: t,
|
|
37
|
+
id: i
|
|
38
|
+
}) => /* @__PURE__ */ e.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
|
|
39
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40
|
+
/* @__PURE__ */ e.jsx("code", { children: t === "path" ? /* @__PURE__ */ e.jsx(
|
|
41
|
+
v,
|
|
42
|
+
{
|
|
43
|
+
name: s.name,
|
|
44
|
+
backgroundOpacity: "15%",
|
|
45
|
+
slug: i + "-" + s.name.toLocaleLowerCase()
|
|
46
|
+
}
|
|
47
|
+
) : s.name }),
|
|
48
|
+
s.required && /* @__PURE__ */ e.jsx("span", { className: "py-px px-1.5 font-medium bg-primary/75 text-muted rounded-lg", children: "required" }),
|
|
49
|
+
C(s).type && /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: C(s).type })
|
|
50
|
+
] }),
|
|
51
|
+
s.description && /* @__PURE__ */ e.jsx(
|
|
52
|
+
m,
|
|
53
|
+
{
|
|
54
|
+
content: s.description,
|
|
55
|
+
className: "text-sm prose-p:my-1"
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] }), Y = ({
|
|
59
|
+
group: s,
|
|
60
|
+
parameters: t,
|
|
61
|
+
id: i
|
|
62
|
+
}) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
63
|
+
/* @__PURE__ */ e.jsx(h, { level: 3, id: `${i}/${s}-parameters`, className: "capitalize", children: s === "header" ? "Headers" : `${s} Parameters` }),
|
|
64
|
+
/* @__PURE__ */ e.jsx(p, { children: /* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: t.sort((r, n) => r.required === n.required ? 0 : r.required ? -1 : 1).map((r) => /* @__PURE__ */ e.jsx(
|
|
65
|
+
X,
|
|
66
|
+
{
|
|
67
|
+
parameter: r,
|
|
68
|
+
id: i,
|
|
69
|
+
group: s
|
|
70
|
+
},
|
|
71
|
+
`${r.name}-${r.in}`
|
|
72
|
+
)) }) })
|
|
73
|
+
] }), ee = (s) => s.type === "object" || s.type === "array" && typeof s.items == "object" && (!s.items.type || s.items.type === "object"), y = (s) => !!(s.oneOf ?? s.allOf ?? s.anyOf), w = ({
|
|
74
|
+
schema: s,
|
|
75
|
+
level: t
|
|
76
|
+
}) => {
|
|
77
|
+
const i = (r, n, l) => r.map((o, c) => /* @__PURE__ */ e.jsxs("div", { className: "my-2", children: [
|
|
78
|
+
/* @__PURE__ */ e.jsx("strong", { children: n }),
|
|
79
|
+
/* @__PURE__ */ e.jsxs("div", { className: "mt-2", children: [
|
|
80
|
+
/* @__PURE__ */ e.jsx(f, { schema: o, level: t + 1 }),
|
|
81
|
+
c < r.length - 1 && /* @__PURE__ */ e.jsx("div", { className: "text-center my-2", children: l })
|
|
82
|
+
] })
|
|
83
|
+
] }, c));
|
|
84
|
+
return s.oneOf ? i(s.oneOf, "One of", "OR") : s.allOf ? i(s.allOf, "All of", "AND") : s.anyOf ? i(s.anyOf, "Any of", "OR") : null;
|
|
85
|
+
}, se = ({
|
|
86
|
+
name: s,
|
|
87
|
+
value: t,
|
|
88
|
+
group: i,
|
|
89
|
+
level: r,
|
|
90
|
+
defaultOpen: n = !1,
|
|
91
|
+
showCollapseButton: l = !0
|
|
92
|
+
}) => {
|
|
93
|
+
var x;
|
|
94
|
+
const [o, c] = P(n);
|
|
95
|
+
return /* @__PURE__ */ e.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 justify-between text-sm", children: [
|
|
96
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
97
|
+
/* @__PURE__ */ e.jsx("code", { children: s }),
|
|
98
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: t.type === "array" && ((x = t.items) != null && x.type) ? /* @__PURE__ */ e.jsxs("span", { children: [
|
|
99
|
+
t.items.type,
|
|
100
|
+
"[]"
|
|
101
|
+
] }) : Array.isArray(t.type) ? /* @__PURE__ */ e.jsx("span", { children: t.type.join(" | ") }) : /* @__PURE__ */ e.jsx("span", { children: t.type }) }),
|
|
102
|
+
i === "optional" && /* @__PURE__ */ e.jsx("span", { className: "py-px px-1.5 font-medium border rounded-lg", children: "optional" })
|
|
103
|
+
] }),
|
|
104
|
+
t.description && /* @__PURE__ */ e.jsx(
|
|
105
|
+
m,
|
|
106
|
+
{
|
|
107
|
+
className: u(g, "text-sm leading-normal line-clamp-4"),
|
|
108
|
+
content: t.description
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
(y(t) || ee(t)) && /* @__PURE__ */ e.jsxs(
|
|
112
|
+
D,
|
|
113
|
+
{
|
|
114
|
+
defaultOpen: n,
|
|
115
|
+
open: o,
|
|
116
|
+
onOpenChange: () => c(!o),
|
|
117
|
+
children: [
|
|
118
|
+
l && /* @__PURE__ */ e.jsx(Q, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
119
|
+
K,
|
|
120
|
+
{
|
|
121
|
+
variant: "outline",
|
|
122
|
+
size: "sm",
|
|
123
|
+
className: "mt-2 flex gap-1.5",
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ e.jsx(U, { size: 18 }),
|
|
126
|
+
o ? "Hide nested properties" : "Show nested properties"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
) }),
|
|
130
|
+
/* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsxs("div", { className: "mt-2", children: [
|
|
131
|
+
y(t) && /* @__PURE__ */ e.jsx(w, { schema: t, level: r + 1 }),
|
|
132
|
+
t.type === "object" && /* @__PURE__ */ e.jsx(f, { schema: t, level: r + 1 }),
|
|
133
|
+
t.type === "array" && typeof t.items == "object" && /* @__PURE__ */ e.jsx(f, { schema: t.items, level: r + 1 })
|
|
134
|
+
] }) })
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
] }) });
|
|
139
|
+
}, f = ({
|
|
140
|
+
schema: s,
|
|
141
|
+
level: t = 0,
|
|
142
|
+
defaultOpen: i = !1
|
|
143
|
+
}) => {
|
|
144
|
+
if (!s || Object.keys(s).length === 0)
|
|
145
|
+
return /* @__PURE__ */ e.jsx(p, { className: "p-4", children: /* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
|
|
146
|
+
const r = (n, l) => {
|
|
147
|
+
if (n.oneOf || n.allOf || n.anyOf)
|
|
148
|
+
return /* @__PURE__ */ e.jsx(w, { schema: n, level: l });
|
|
149
|
+
if (n.type === "array" && n.items) {
|
|
150
|
+
const o = n.items;
|
|
151
|
+
return typeof o.type == "string" && ["string", "number", "boolean", "integer"].includes(o.type) ? /* @__PURE__ */ e.jsxs(p, { className: "p-4", children: [
|
|
152
|
+
/* @__PURE__ */ e.jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
153
|
+
o.type,
|
|
154
|
+
"[]"
|
|
155
|
+
] }),
|
|
156
|
+
n.description && /* @__PURE__ */ e.jsx(
|
|
157
|
+
m,
|
|
158
|
+
{
|
|
159
|
+
className: u(
|
|
160
|
+
g,
|
|
161
|
+
"text-sm leading-normal line-clamp-4"
|
|
162
|
+
),
|
|
163
|
+
content: n.description
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
] }) : o.type === "object" || y(o) ? /* @__PURE__ */ e.jsxs(p, { className: "flex flex-col gap-2 bg-border/30 p-4", children: [
|
|
167
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground", children: "object[]" }),
|
|
168
|
+
r(o, l + 1)
|
|
169
|
+
] }) : r(o, l + 1);
|
|
170
|
+
}
|
|
171
|
+
if (n.type === "object" && !n.properties)
|
|
172
|
+
return /* @__PURE__ */ e.jsxs(p, { className: "p-4 flex gap-2 items-center", children: [
|
|
173
|
+
"name" in n && /* @__PURE__ */ e.jsx(e.Fragment, { children: n.name }),
|
|
174
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground", children: "object" }),
|
|
175
|
+
n.description && /* @__PURE__ */ e.jsx(
|
|
176
|
+
m,
|
|
177
|
+
{
|
|
178
|
+
className: u(
|
|
179
|
+
g,
|
|
180
|
+
"text-sm leading-normal line-clamp-4"
|
|
181
|
+
),
|
|
182
|
+
content: n.description
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
] });
|
|
186
|
+
if (n.properties) {
|
|
187
|
+
const o = q(
|
|
188
|
+
Object.entries(n.properties),
|
|
189
|
+
([a, d]) => {
|
|
190
|
+
var j;
|
|
191
|
+
return d.deprecated ? "deprecated" : (j = n.required) != null && j.includes(a) ? "required" : "optional";
|
|
192
|
+
}
|
|
193
|
+
), c = l === 0 && Object.keys(o).length === 1, x = ["required", "optional", "deprecated"];
|
|
194
|
+
return /* @__PURE__ */ e.jsx(p, { className: "divide-y overflow-hidden", children: x.map(
|
|
195
|
+
(a) => o[a] && /* @__PURE__ */ e.jsx("ul", { className: "divide-y", children: o[a].map(([d, j]) => /* @__PURE__ */ e.jsx(
|
|
196
|
+
se,
|
|
197
|
+
{
|
|
198
|
+
name: d,
|
|
199
|
+
value: j,
|
|
200
|
+
group: a,
|
|
201
|
+
level: l,
|
|
202
|
+
defaultOpen: c || i,
|
|
203
|
+
showCollapseButton: !c
|
|
204
|
+
},
|
|
205
|
+
d
|
|
206
|
+
)) }, a)
|
|
207
|
+
) });
|
|
208
|
+
}
|
|
209
|
+
return typeof n.type == "string" && ["string", "number", "boolean", "integer", "null"].includes(n.type) ? /* @__PURE__ */ e.jsxs(p, { className: "p-4", children: [
|
|
210
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground", children: n.type }),
|
|
211
|
+
n.description && /* @__PURE__ */ e.jsx(
|
|
212
|
+
m,
|
|
213
|
+
{
|
|
214
|
+
className: u(
|
|
215
|
+
g,
|
|
216
|
+
"text-sm leading-normal line-clamp-4"
|
|
217
|
+
),
|
|
218
|
+
content: n.description
|
|
219
|
+
}
|
|
220
|
+
)
|
|
221
|
+
] }) : n.additionalProperties ? /* @__PURE__ */ e.jsxs(p, { className: "my-2", children: [
|
|
222
|
+
/* @__PURE__ */ e.jsx(A, { children: /* @__PURE__ */ e.jsx(I, { children: "Additional Properties:" }) }),
|
|
223
|
+
/* @__PURE__ */ e.jsx(R, { children: r(
|
|
224
|
+
n.additionalProperties,
|
|
225
|
+
l + 1
|
|
226
|
+
) })
|
|
227
|
+
] }) : null;
|
|
228
|
+
};
|
|
229
|
+
return r(s, t);
|
|
230
|
+
}, N = u(
|
|
231
|
+
g,
|
|
232
|
+
"max-w-full prose-img:max-w-prose"
|
|
233
|
+
), te = ["path", "query", "header", "cookie"], ne = ({
|
|
234
|
+
operationFragment: s
|
|
235
|
+
}) => {
|
|
236
|
+
var o, c, x;
|
|
237
|
+
const t = Z(re, s), i = q(
|
|
238
|
+
t.parameters ?? [],
|
|
239
|
+
(a) => a.in
|
|
240
|
+
), r = t.responses.at(0), [n, l] = P(r == null ? void 0 : r.statusCode);
|
|
241
|
+
return /* @__PURE__ */ e.jsxs(
|
|
242
|
+
"div",
|
|
243
|
+
{
|
|
244
|
+
className: "grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16",
|
|
245
|
+
children: [
|
|
246
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
247
|
+
/* @__PURE__ */ e.jsx(h, { level: 2, id: t.slug, registerSidebarAnchor: !0, children: t.summary }),
|
|
248
|
+
t.description && /* @__PURE__ */ e.jsx(
|
|
249
|
+
m,
|
|
250
|
+
{
|
|
251
|
+
className: N,
|
|
252
|
+
content: t.description
|
|
253
|
+
}
|
|
254
|
+
),
|
|
255
|
+
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ e.jsx(e.Fragment, { children: te.flatMap(
|
|
256
|
+
(a) => {
|
|
257
|
+
var d;
|
|
258
|
+
return (d = i[a]) != null && d.length ? /* @__PURE__ */ e.jsx(
|
|
259
|
+
Y,
|
|
260
|
+
{
|
|
261
|
+
id: t.slug,
|
|
262
|
+
parameters: i[a],
|
|
263
|
+
group: a
|
|
264
|
+
},
|
|
265
|
+
a
|
|
266
|
+
) : [];
|
|
267
|
+
}
|
|
268
|
+
) }),
|
|
269
|
+
W((x = (c = (o = t.requestBody) == null ? void 0 : o.content) == null ? void 0 : c.at(0)) == null ? void 0 : x.schema, (a) => /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
270
|
+
/* @__PURE__ */ e.jsx(h, { level: 3, className: "capitalize", children: "Request Body" }),
|
|
271
|
+
/* @__PURE__ */ e.jsx(f, { schema: a })
|
|
272
|
+
] })),
|
|
273
|
+
t.responses.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
274
|
+
/* @__PURE__ */ e.jsx(h, { level: 3, className: "capitalize mt-8 pt-8 border-t", children: "Responses" }),
|
|
275
|
+
/* @__PURE__ */ e.jsxs(
|
|
276
|
+
k,
|
|
277
|
+
{
|
|
278
|
+
onValueChange: (a) => l(a),
|
|
279
|
+
value: n,
|
|
280
|
+
children: [
|
|
281
|
+
t.responses.length > 1 && /* @__PURE__ */ e.jsx(H, { children: t.responses.map((a) => /* @__PURE__ */ e.jsx(
|
|
282
|
+
F,
|
|
283
|
+
{
|
|
284
|
+
value: a.statusCode,
|
|
285
|
+
title: a.description,
|
|
286
|
+
children: a.statusCode
|
|
287
|
+
},
|
|
288
|
+
a.statusCode
|
|
289
|
+
)) }),
|
|
290
|
+
/* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0 overflow-hidden", children: t.responses.map((a) => {
|
|
291
|
+
var d, j;
|
|
292
|
+
return /* @__PURE__ */ e.jsx(
|
|
293
|
+
$,
|
|
294
|
+
{
|
|
295
|
+
value: a.statusCode,
|
|
296
|
+
children: /* @__PURE__ */ e.jsx(
|
|
297
|
+
f,
|
|
298
|
+
{
|
|
299
|
+
schema: (j = (d = a.content) == null ? void 0 : d.find((L) => L.schema)) == null ? void 0 : j.schema
|
|
300
|
+
}
|
|
301
|
+
)
|
|
302
|
+
},
|
|
303
|
+
a.statusCode
|
|
304
|
+
);
|
|
305
|
+
}) })
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
] })
|
|
310
|
+
] }),
|
|
311
|
+
/* @__PURE__ */ e.jsx(
|
|
312
|
+
B,
|
|
313
|
+
{
|
|
314
|
+
selectedResponse: n,
|
|
315
|
+
onSelectResponse: l,
|
|
316
|
+
operation: t
|
|
317
|
+
}
|
|
318
|
+
)
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
t.operationId
|
|
322
|
+
);
|
|
323
|
+
}, re = S(
|
|
324
|
+
/* GraphQL */
|
|
325
|
+
`
|
|
326
|
+
fragment OperationsFragment on OperationItem {
|
|
327
|
+
slug
|
|
328
|
+
summary
|
|
329
|
+
method
|
|
330
|
+
description
|
|
331
|
+
operationId
|
|
332
|
+
contentTypes
|
|
333
|
+
path
|
|
334
|
+
parameters {
|
|
335
|
+
name
|
|
336
|
+
in
|
|
337
|
+
description
|
|
338
|
+
required
|
|
339
|
+
schema
|
|
340
|
+
style
|
|
341
|
+
examples {
|
|
342
|
+
name
|
|
343
|
+
description
|
|
344
|
+
externalValue
|
|
345
|
+
value
|
|
346
|
+
summary
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
requestBody {
|
|
350
|
+
content {
|
|
351
|
+
mediaType
|
|
352
|
+
encoding {
|
|
353
|
+
name
|
|
354
|
+
}
|
|
355
|
+
schema
|
|
356
|
+
}
|
|
357
|
+
description
|
|
358
|
+
required
|
|
359
|
+
}
|
|
360
|
+
responses {
|
|
361
|
+
statusCode
|
|
362
|
+
links
|
|
363
|
+
description
|
|
364
|
+
content {
|
|
365
|
+
mediaType
|
|
366
|
+
encoding {
|
|
367
|
+
name
|
|
368
|
+
}
|
|
369
|
+
schema
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
`
|
|
374
|
+
), ie = S(
|
|
375
|
+
/* GraphQL */
|
|
376
|
+
`
|
|
377
|
+
query AllOperations($input: JSON!, $type: SchemaType!) {
|
|
378
|
+
schema(input: $input, type: $type) {
|
|
379
|
+
description
|
|
380
|
+
title
|
|
381
|
+
url
|
|
382
|
+
version
|
|
383
|
+
tags {
|
|
384
|
+
name
|
|
385
|
+
description
|
|
386
|
+
operations {
|
|
387
|
+
slug
|
|
388
|
+
...OperationsFragment
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
`
|
|
394
|
+
), ae = { suspense: !0 }, he = () => {
|
|
395
|
+
var n;
|
|
396
|
+
const { type: s, input: t } = M(), [i] = J({
|
|
397
|
+
query: ie,
|
|
398
|
+
variables: { type: s, input: t },
|
|
399
|
+
context: ae
|
|
400
|
+
}), r = (n = i.error) == null ? void 0 : n.graphQLErrors.at(0);
|
|
401
|
+
return r ? /* @__PURE__ */ e.jsx(
|
|
402
|
+
z,
|
|
403
|
+
{
|
|
404
|
+
category: "Error",
|
|
405
|
+
title: "Schema cannot be displayed",
|
|
406
|
+
message: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
407
|
+
/* @__PURE__ */ e.jsxs(T, { className: "mb-4", children: [
|
|
408
|
+
"Check your configuration value ",
|
|
409
|
+
/* @__PURE__ */ e.jsx(O, { children: "apis.type" }),
|
|
410
|
+
" ",
|
|
411
|
+
"and ",
|
|
412
|
+
/* @__PURE__ */ e.jsx(O, { children: "apis.input" }),
|
|
413
|
+
" in the Zudoku config."
|
|
414
|
+
] }),
|
|
415
|
+
"An error occurred while trying to fetch the API reference:",
|
|
416
|
+
/* @__PURE__ */ e.jsx(G, { code: r.toString(), language: "plain" })
|
|
417
|
+
] })
|
|
418
|
+
}
|
|
419
|
+
) : i.data ? /* @__PURE__ */ e.jsxs("div", { className: "pt-[--padding-content-top]", children: [
|
|
420
|
+
/* @__PURE__ */ e.jsxs(
|
|
421
|
+
"div",
|
|
422
|
+
{
|
|
423
|
+
className: u(
|
|
424
|
+
N,
|
|
425
|
+
"mb-16 max-w-full prose-img:max-w-prose"
|
|
426
|
+
),
|
|
427
|
+
children: [
|
|
428
|
+
/* @__PURE__ */ e.jsx(b, { children: "Overview" }),
|
|
429
|
+
/* @__PURE__ */ e.jsx(h, { level: 1, id: "description", registerSidebarAnchor: !0, children: i.data.schema.title }),
|
|
430
|
+
/* @__PURE__ */ e.jsx(m, { content: i.data.schema.description ?? "" })
|
|
431
|
+
]
|
|
432
|
+
}
|
|
433
|
+
),
|
|
434
|
+
i.data.schema.tags.filter((l) => l.operations.length > 0).map((l) => /* @__PURE__ */ e.jsxs("div", { children: [
|
|
435
|
+
l.name && /* @__PURE__ */ e.jsx(b, { children: l.name }),
|
|
436
|
+
l.description && /* @__PURE__ */ e.jsx(
|
|
437
|
+
m,
|
|
438
|
+
{
|
|
439
|
+
className: `${N} mt-2 mb-12`,
|
|
440
|
+
content: l.description
|
|
441
|
+
}
|
|
442
|
+
),
|
|
443
|
+
/* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(_, { children: l.operations.map((o) => /* @__PURE__ */ e.jsx(
|
|
444
|
+
ne,
|
|
445
|
+
{
|
|
446
|
+
operationFragment: o
|
|
447
|
+
},
|
|
448
|
+
o.slug
|
|
449
|
+
)) }) })
|
|
450
|
+
] }, l.name))
|
|
451
|
+
] }) : null;
|
|
452
|
+
};
|
|
453
|
+
export {
|
|
454
|
+
he as OperationList,
|
|
455
|
+
re as OperationsFragment
|
|
456
|
+
};
|
|
457
|
+
//# sourceMappingURL=OperationList-Cxiw2Z-v.js.map
|