zudoku 0.64.0 → 0.64.2
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/config.d.ts +15 -46
- package/dist/config/validators/InputNavigationSchema.d.ts +53 -53
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +105 -1
- package/dist/config/validators/validate.js +30 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +16 -0
- package/dist/lib/auth/issuer.js +3 -0
- package/dist/lib/auth/issuer.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -1
- package/dist/lib/authentication/providers/firebase.d.ts +4 -0
- package/dist/lib/authentication/providers/firebase.js +215 -0
- package/dist/lib/authentication/providers/firebase.js.map +1 -0
- package/dist/lib/authentication/providers/supabase.js +1 -6
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +24 -0
- package/dist/lib/authentication/ui/ZudokuAuthUi.js +124 -0
- package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Apple.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Apple.js +4 -0
- package/dist/lib/authentication/ui/icons/Apple.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Facebook.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Facebook.js +4 -0
- package/dist/lib/authentication/ui/icons/Facebook.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Github.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Github.js +4 -0
- package/dist/lib/authentication/ui/icons/Github.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Google.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Google.js +4 -0
- package/dist/lib/authentication/ui/icons/Google.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Microsoft.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Microsoft.js +4 -0
- package/dist/lib/authentication/ui/icons/Microsoft.js.map +1 -0
- package/dist/lib/authentication/ui/icons/X.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/X.js +4 -0
- package/dist/lib/authentication/ui/icons/X.js.map +1 -0
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/core/RouteGuard.js +6 -6
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/oas/parser/index.js +7 -3
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +4 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +1 -0
- package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.d.ts +5 -0
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +10 -0
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.js +4 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +9 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +2 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +3 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +14 -2
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +2 -1
- package/dist/lib/plugins/openapi/Sidecar.js +33 -30
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -2
- package/dist/lib/plugins/openapi/SidecarExamples.js +15 -33
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.d.ts +4 -0
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.js +5 -0
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.js.map +1 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js +1 -1
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +2 -2
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +1 -2
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +0 -4
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/union-helpers.js +0 -1
- package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +9 -11
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +0 -1
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +3 -3
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +0 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Separator.d.ts +4 -0
- package/dist/lib/ui/Separator.js +8 -0
- package/dist/lib/ui/Separator.js.map +1 -0
- package/dist/lib/ui/Tooltip.d.ts +7 -7
- package/dist/lib/ui/Tooltip.js +16 -10
- package/dist/lib/ui/Tooltip.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +5 -2
- package/dist/lib/util/createVariantComponent.js +5 -2
- package/dist/lib/util/createVariantComponent.js.map +1 -1
- package/dist/lib/util/flattenAllOf.d.ts +4 -0
- package/dist/lib/util/flattenAllOf.js +65 -0
- package/dist/lib/util/flattenAllOf.js.map +1 -0
- package/dist/lib/util/flattenAllOf.test.d.ts +1 -0
- package/dist/lib/util/flattenAllOf.test.js +532 -0
- package/dist/lib/util/flattenAllOf.test.js.map +1 -0
- package/dist/vite/api/SchemaManager.js +6 -18
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/plugin-theme.js +10 -1
- package/dist/vite/plugin-theme.js.map +1 -1
- package/lib/{ErrorAlert-DE3Sf66a.js → ErrorAlert--3alJ_-b.js} +1340 -1311
- package/lib/{ErrorAlert-DE3Sf66a.js.map → ErrorAlert--3alJ_-b.js.map} +1 -1
- package/lib/{MdxPage-DZfeC0QY.js → MdxPage-Bpa9tL63.js} +5 -5
- package/lib/{MdxPage-DZfeC0QY.js.map → MdxPage-Bpa9tL63.js.map} +1 -1
- package/lib/{OAuthErrorPage-BycMozgn.js → OAuthErrorPage-B79J86Fo.js} +4 -4
- package/lib/{OAuthErrorPage-BycMozgn.js.map → OAuthErrorPage-B79J86Fo.js.map} +1 -1
- package/lib/{OasProvider-Bf5zBDBY.js → OasProvider-jr0oDSFy.js} +2 -2
- package/lib/{OasProvider-Bf5zBDBY.js.map → OasProvider-jr0oDSFy.js.map} +1 -1
- package/lib/OperationList-DLEAg4qw.js +5465 -0
- package/lib/OperationList-DLEAg4qw.js.map +1 -0
- package/lib/{Pagination-CJszmeSA.js → Pagination-H2HW9-Er.js} +2 -2
- package/lib/{Pagination-CJszmeSA.js.map → Pagination-H2HW9-Er.js.map} +1 -1
- package/lib/RouteGuard-CjzxosTf.js +77 -0
- package/lib/RouteGuard-CjzxosTf.js.map +1 -0
- package/lib/{RouterError-VDLnrFqF.js → RouterError-DZS2d6Sc.js} +2 -2
- package/lib/{RouterError-VDLnrFqF.js.map → RouterError-DZS2d6Sc.js.map} +1 -1
- package/lib/{SchemaList-xZSf3IMh.js → SchemaList-CSDSazqV.js} +6 -6
- package/lib/{SchemaList-xZSf3IMh.js.map → SchemaList-CSDSazqV.js.map} +1 -1
- package/lib/SchemaView-DJiBd0_5.js +397 -0
- package/lib/SchemaView-DJiBd0_5.js.map +1 -0
- package/lib/{SignUp-6SGx9Yyq.js → SignUp-Fycafbyg.js} +2 -2
- package/lib/{SignUp-6SGx9Yyq.js.map → SignUp-Fycafbyg.js.map} +1 -1
- package/lib/{SyntaxHighlight-zvlnSnHB.js → SyntaxHighlight-C19vH0V_.js} +525 -509
- package/lib/SyntaxHighlight-C19vH0V_.js.map +1 -0
- package/lib/{Toc-Da9yp7lo.js → Toc-ChkOg2UU.js} +2 -2
- package/lib/{Toc-Da9yp7lo.js.map → Toc-ChkOg2UU.js.map} +1 -1
- package/lib/{circular-DvuimBGQ.js → circular-DGfd8SGc.js} +2 -2
- package/lib/{circular-DvuimBGQ.js.map → circular-DGfd8SGc.js.map} +1 -1
- package/lib/{createServer-D9UvCoDf.js → createServer-DGD8hEzT.js} +4662 -4238
- package/lib/createServer-DGD8hEzT.js.map +1 -0
- package/lib/{errors-CuGgh3hf.js → errors-BTpjwHS6.js} +2 -2
- package/lib/{errors-CuGgh3hf.js.map → errors-BTpjwHS6.js.map} +1 -1
- package/lib/{index-rYHsvtTo.js → index-Bvas0H4x.js} +2 -2
- package/lib/{index-rYHsvtTo.js.map → index-Bvas0H4x.js.map} +1 -1
- package/lib/{index-Cr9_YzOZ.js → index-DP1xZgfJ.js} +9 -9
- package/lib/index-DP1xZgfJ.js.map +1 -0
- package/lib/{index-B1rmok4X.js → index-FNRZUtwo.js} +2 -2
- package/lib/{index-B1rmok4X.js.map → index-FNRZUtwo.js.map} +1 -1
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +9 -9
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Separator.js +27 -0
- package/lib/ui/Separator.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +1 -1
- package/lib/ui/Tooltip.js +55 -28
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/zudoku.__internal.js +4 -4
- package/lib/zudoku.auth-azureb2c.js +3 -3
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.auth-supabase.js +30 -33
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +2 -2
- package/lib/zudoku.plugin-api-catalog.js +3 -3
- package/lib/zudoku.plugin-api-keys.js +3 -3
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +1 -1
- package/package.json +16 -11
- package/src/app/main.css +1 -1
- package/src/lib/auth/issuer.ts +3 -0
- package/src/lib/authentication/authentication.ts +1 -1
- package/src/lib/authentication/providers/firebase.tsx +284 -0
- package/src/lib/authentication/providers/supabase.tsx +2 -7
- package/src/lib/authentication/ui/ZudokuAuthUi.tsx +335 -0
- package/src/lib/authentication/ui/icons/Apple.tsx +10 -0
- package/src/lib/authentication/ui/icons/Facebook.tsx +15 -0
- package/src/lib/authentication/ui/icons/Github.tsx +16 -0
- package/src/lib/authentication/ui/icons/Google.tsx +16 -0
- package/src/lib/authentication/ui/icons/Microsoft.tsx +12 -0
- package/src/lib/authentication/ui/icons/X.tsx +10 -0
- package/src/lib/core/RouteGuard.tsx +8 -8
- package/src/lib/oas/parser/index.ts +8 -3
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +11 -7
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -3
- package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +52 -0
- package/src/lib/plugins/openapi/OperationList.tsx +5 -0
- package/src/lib/plugins/openapi/OperationListItem.tsx +3 -0
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +20 -2
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +26 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +84 -63
- package/src/lib/plugins/openapi/SidecarExamples.tsx +38 -48
- package/src/lib/plugins/openapi/components/NonHighlightedCode.tsx +22 -0
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +1 -4
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +0 -5
- package/src/lib/plugins/openapi/schema/union-helpers.ts +0 -1
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +11 -11
- package/src/lib/ui/CodeBlock.tsx +0 -1
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -2
- package/src/lib/ui/Separator.tsx +25 -0
- package/src/lib/ui/Tooltip.tsx +54 -32
- package/src/lib/util/createVariantComponent.tsx +31 -5
- package/src/lib/util/flattenAllOf.test.ts +637 -0
- package/src/lib/util/flattenAllOf.ts +101 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.d.ts +0 -5
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js +0 -7
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.d.ts +0 -4
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js +0 -10
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.d.ts +0 -5
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js +0 -16
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js.map +0 -1
- package/lib/OperationList-Cmiw1xm2.js +0 -5446
- package/lib/OperationList-Cmiw1xm2.js.map +0 -1
- package/lib/RouteGuard-DhU3LRr1.js +0 -81
- package/lib/RouteGuard-DhU3LRr1.js.map +0 -1
- package/lib/SchemaView-tHXTm5oM.js +0 -458
- package/lib/SchemaView-tHXTm5oM.js.map +0 -1
- package/lib/SyntaxHighlight-zvlnSnHB.js.map +0 -1
- package/lib/createServer-D9UvCoDf.js.map +0 -1
- package/lib/index-Cr9_YzOZ.js.map +0 -1
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.tsx +0 -36
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.tsx +0 -25
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx +0 -42
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createComparator,
|
|
3
|
+
createMerger,
|
|
4
|
+
createShallowAllOfMerge,
|
|
5
|
+
} from "@x0k/json-schema-merge";
|
|
6
|
+
import {
|
|
7
|
+
createDeduplicator,
|
|
8
|
+
createIntersector,
|
|
9
|
+
} from "@x0k/json-schema-merge/lib/array";
|
|
10
|
+
import type { JSONSchema7Definition } from "json-schema";
|
|
11
|
+
import type { Processor } from "../../config/validators/BuildSchema.js";
|
|
12
|
+
import type { OpenAPIDocument } from "../oas/parser/index.js";
|
|
13
|
+
import { type RecordAny, traverse } from "./traverse.js";
|
|
14
|
+
|
|
15
|
+
export const flattenAllOfProcessor: Processor = async ({
|
|
16
|
+
schema,
|
|
17
|
+
file,
|
|
18
|
+
dereference,
|
|
19
|
+
}) => {
|
|
20
|
+
try {
|
|
21
|
+
const dereferenced = await dereference(schema);
|
|
22
|
+
|
|
23
|
+
const flattened = traverse(dereferenced, (spec) => {
|
|
24
|
+
if (!spec || typeof spec !== "object" || Array.isArray(spec)) {
|
|
25
|
+
return spec;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const isSchemaObject =
|
|
29
|
+
"type" in spec ||
|
|
30
|
+
"properties" in spec ||
|
|
31
|
+
"allOf" in spec ||
|
|
32
|
+
"anyOf" in spec ||
|
|
33
|
+
"oneOf" in spec;
|
|
34
|
+
|
|
35
|
+
return isSchemaObject ? (flattenAllOf(spec) as RecordAny) : spec;
|
|
36
|
+
}) as OpenAPIDocument;
|
|
37
|
+
|
|
38
|
+
return flattened;
|
|
39
|
+
} catch (error) {
|
|
40
|
+
// biome-ignore lint/suspicious/noConsole: Logging allowed here
|
|
41
|
+
console.warn(
|
|
42
|
+
`Failed to flatten \`allOf\` in ${file}: ${error instanceof Error ? error.message : error}`,
|
|
43
|
+
);
|
|
44
|
+
return schema;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const { compareSchemaDefinitions, compareSchemaValues } = createComparator();
|
|
49
|
+
const { mergeArrayOfSchemaDefinitions } = createMerger({
|
|
50
|
+
intersectJson: createIntersector(compareSchemaValues),
|
|
51
|
+
deduplicateJsonSchemaDef: createDeduplicator(compareSchemaDefinitions),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const shallowAllOfMerge = createShallowAllOfMerge(
|
|
55
|
+
mergeArrayOfSchemaDefinitions,
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
// Recursively flattens all `allOf` keywords in a JSON Schema object.
|
|
59
|
+
export const flattenAllOf = (
|
|
60
|
+
schema: JSONSchema7Definition,
|
|
61
|
+
): JSONSchema7Definition => {
|
|
62
|
+
const merged = shallowAllOfMerge(schema);
|
|
63
|
+
|
|
64
|
+
if (merged == null || typeof merged !== "object") {
|
|
65
|
+
return merged;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const { properties, items, additionalProperties } = merged;
|
|
69
|
+
|
|
70
|
+
if (properties != null && typeof properties === "object") {
|
|
71
|
+
for (const [name, sub] of Object.entries(properties)) {
|
|
72
|
+
if (sub && typeof sub === "object") {
|
|
73
|
+
properties[name] = flattenAllOf(sub);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (items != null && typeof items === "object") {
|
|
79
|
+
if (Array.isArray(items)) {
|
|
80
|
+
merged.items = items.map((it: JSONSchema7Definition) =>
|
|
81
|
+
it && typeof it === "object" ? flattenAllOf(it) : it,
|
|
82
|
+
);
|
|
83
|
+
} else {
|
|
84
|
+
merged.items = flattenAllOf(items);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (additionalProperties && typeof additionalProperties === "object") {
|
|
89
|
+
merged.additionalProperties = flattenAllOf(additionalProperties);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
for (const key of ["anyOf", "oneOf"] as const) {
|
|
93
|
+
const arr = merged[key];
|
|
94
|
+
if (!Array.isArray(arr)) continue;
|
|
95
|
+
merged[key] = arr.map((v) =>
|
|
96
|
+
typeof v === "object" && v != null ? flattenAllOf(v) : v,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return merged;
|
|
101
|
+
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronDownIcon, CircleFadingPlusIcon } from "lucide-react";
|
|
3
|
-
import { cn } from "../../../../util/cn.js";
|
|
4
|
-
export const AllOfGroupConnector = ({ isOpen, className, schemeName, }) => {
|
|
5
|
-
return (_jsx("div", { className: cn("text-green-500 dark:text-green-300/60", "relative text-sm flex py-2", "before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']", className), children: _jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [_jsx(CircleFadingPlusIcon, { size: 16, className: "fill-card" }), _jsx("div", { className: cn("translate-y-px mx-px opacity-0 group-hover:opacity-100 transition", !isOpen && "-rotate-90"), children: _jsx(ChevronDownIcon, { size: 16 }) }), _jsx("span", { className: "text-sm text-foreground", children: schemeName })] }) }));
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=AllOfGroupConnector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AllOfGroupConnector.js","sourceRoot":"","sources":["../../../../../../src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAE5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,MAAM,EACN,SAAS,EACT,UAAU,GAKX,EAAE,EAAE;IACH,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CACX,uCAAuC,EACvC,4BAA4B,EAC5B,8HAA8H,EAC9H,SAAS,CACV,YAED,eAAK,SAAS,EAAC,4CAA4C,aACzD,KAAC,oBAAoB,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,WAAW,GAAG,EACxD,cACE,SAAS,EAAE,EAAE,CACX,mEAAmE,EACnE,CAAC,MAAM,IAAI,YAAY,CACxB,YAED,KAAC,eAAe,IAAC,IAAI,EAAE,EAAE,GAAI,GACzB,EACN,eAAM,SAAS,EAAC,yBAAyB,YAAE,UAAU,GAAQ,IACzD,GACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { SchemaView } from "../SchemaView.js";
|
|
5
|
-
import { AllOfGroupConnector } from "./AllOfGroupConnector.js";
|
|
6
|
-
export const AllOfGroupItem = (props) => {
|
|
7
|
-
const [isOpen, setIsOpen] = useState(true);
|
|
8
|
-
return (_jsxs(Collapsible.Root, { open: isOpen, onOpenChange: () => setIsOpen((prev) => !prev), className: "group", children: [_jsx(Collapsible.Trigger, { children: _jsx(AllOfGroupConnector, { isOpen: isOpen, schemeName: props.schema.title }) }), !isOpen && _jsx("div", { className: "wavy-line bg-border translate-y-1" }), _jsx(Collapsible.Content, { children: _jsx(SchemaView, { schema: props.schema }) })] }));
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=AllOfGroupItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AllOfGroupItem.js","sourceRoot":"","sources":["../../../../../../src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA+B,EAAE,EAAE;IAChE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3C,OAAO,CACL,MAAC,WAAW,CAAC,IAAI,IACf,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAC9C,SAAS,EAAC,OAAO,aAEjB,KAAC,WAAW,CAAC,OAAO,cAClB,KAAC,mBAAmB,IAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,GAAI,GACnD,EACrB,CAAC,MAAM,IAAI,cAAK,SAAS,EAAC,mCAAmC,GAAG,EACjE,KAAC,WAAW,CAAC,OAAO,cAClB,KAAC,UAAU,IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAI,GAChB,IACL,CACpB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
3
|
-
import { SquareMinusIcon, SquarePlusIcon } from "lucide-react";
|
|
4
|
-
import { useCallback, useState } from "react";
|
|
5
|
-
import { Card } from "../../../../ui/Card.js";
|
|
6
|
-
import { AllOfGroupItem } from "./AllOfGroupItem.js";
|
|
7
|
-
export const AllOfGroupView = ({ schema, cardHeader, }) => {
|
|
8
|
-
const [isOpen, setIsOpen] = useState(true);
|
|
9
|
-
const toggleOpen = useCallback(() => setIsOpen((prev) => !prev), []);
|
|
10
|
-
if (!schema.allOf)
|
|
11
|
-
return null;
|
|
12
|
-
return (_jsx(Collapsible.Root, { open: isOpen, onOpenChange: toggleOpen, asChild: true, children: _jsxs(Card, { className: "overflow-hidden", children: [cardHeader, _jsxs(Collapsible.Trigger, { className: "flex gap-2 items-center py-2 px-6 w-full text-sm text-muted-foreground -translate-x-1.5", children: [isOpen ? (_jsx(SquareMinusIcon, { size: 14 })) : (_jsx(SquarePlusIcon, { size: 14 })), _jsx("span", { children: "All of" })] }), _jsx(Collapsible.Content, { className: "pb-4 px-6", children: schema.allOf.map((subSchema, index) => (
|
|
13
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: Index needed for key
|
|
14
|
-
_jsx(AllOfGroupItem, { schema: subSchema }, index))) })] }) }));
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=AllOfGroupView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AllOfGroupView.js","sourceRoot":"","sources":["../../../../../../src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,MAAM,EACN,UAAU,GAIX,EAAE,EAAE;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAErE,IAAI,CAAC,MAAM,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAE/B,OAAO,CACL,KAAC,WAAW,CAAC,IAAI,IAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,kBAC/D,MAAC,IAAI,IAAC,SAAS,EAAC,iBAAiB,aAC9B,UAAU,EACX,MAAC,WAAW,CAAC,OAAO,IAAC,SAAS,EAAC,yFAAyF,aACrH,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,eAAe,IAAC,IAAI,EAAE,EAAE,GAAI,CAC9B,CAAC,CAAC,CAAC,CACF,KAAC,cAAc,IAAC,IAAI,EAAE,EAAE,GAAI,CAC7B,EACD,oCAAmB,IACC,EAEtB,KAAC,WAAW,CAAC,OAAO,IAAC,SAAS,EAAC,WAAW,YACvC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC;oBACtC,qEAAqE;oBACrE,KAAC,cAAc,IAAa,MAAM,EAAE,SAAS,IAAxB,KAAK,CAAuB,CAClD,CAAC,GACkB,IACjB,GACU,CACpB,CAAC;AACJ,CAAC,CAAC"}
|