zudoku 0.25.3 → 0.26.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.
- package/dist/cli/dev/handler.js +2 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/config/loader.js +1 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/common.d.ts +39 -28
- package/dist/config/validators/common.js +1 -0
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +17 -12
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +1 -1
- package/dist/lib/authentication/providers/openid.js +10 -6
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +12 -0
- package/dist/lib/components/Autocomplete.js +47 -0
- package/dist/lib/components/Autocomplete.js.map +1 -0
- package/dist/lib/components/Header.js +3 -3
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/index.js +2 -2
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +8 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +3 -0
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +2 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +2 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +9 -6
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +2 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +7 -4
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.js +66 -4
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +5 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +36 -11
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +20 -30
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Badge.js +1 -0
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +9 -1
- package/dist/lib/ui/Command.js +5 -1
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/util/joinUrl.d.ts +1 -0
- package/dist/lib/util/joinUrl.js +40 -0
- package/dist/lib/util/joinUrl.js.map +1 -0
- package/dist/vite/build.js +10 -10
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +4 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +5 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.js +4 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +1 -1
- package/dist/vite/plugin-api.js +23 -5
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +4 -1
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-mdx.js +9 -4
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/prerender.d.ts +2 -2
- package/dist/vite/prerender.js +4 -4
- package/dist/vite/prerender.js.map +1 -1
- package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
- package/dist/zuplo/enrich-with-zuplo.js +184 -0
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
- package/dist/zuplo/env.d.ts +1 -0
- package/dist/zuplo/env.js +3 -0
- package/dist/zuplo/env.js.map +1 -1
- package/dist/zuplo/policy-types.d.ts +33 -0
- package/dist/zuplo/policy-types.js +8 -0
- package/dist/zuplo/policy-types.js.map +1 -0
- package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
- package/dist/zuplo/with-zuplo-processors.js +26 -0
- package/dist/zuplo/with-zuplo-processors.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +1 -2
- package/dist/zuplo/with-zuplo.js +6 -27
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/{AnchorLink-DFZZbmvr.js → AnchorLink-bObQitZv.js} +3 -3
- package/lib/{AnchorLink-DFZZbmvr.js.map → AnchorLink-bObQitZv.js.map} +1 -1
- package/lib/{AuthenticationPlugin-D7G3me8L.js → AuthenticationPlugin-C9SwOxkc.js} +4 -4
- package/lib/{AuthenticationPlugin-D7G3me8L.js.map → AuthenticationPlugin-C9SwOxkc.js.map} +1 -1
- package/lib/{CategoryHeading-CBconmtI.js → CategoryHeading-MYL1u_6K.js} +3 -3
- package/lib/{CategoryHeading-CBconmtI.js.map → CategoryHeading-MYL1u_6K.js.map} +1 -1
- package/lib/{Markdown-CZDLNOFc.js → Markdown-DFN6p0J-.js} +1041 -1041
- package/lib/{Markdown-CZDLNOFc.js.map → Markdown-DFN6p0J-.js.map} +1 -1
- package/lib/{MdxPage-DKMbBROv.js → MdxPage-D9c4z09Q.js} +61 -56
- package/lib/MdxPage-D9c4z09Q.js.map +1 -0
- package/lib/{OperationList-B8bHMKme.js → OperationList-DGJWDx1G.js} +1264 -1244
- package/lib/OperationList-DGJWDx1G.js.map +1 -0
- package/lib/{Route-DYwKZ_c_.js → Route-VdmEyOD0.js} +5 -5
- package/lib/{Route-DYwKZ_c_.js.map → Route-VdmEyOD0.js.map} +1 -1
- package/lib/{Select-B_IxRUUC.js → Select-D3O7wISy.js} +36 -36
- package/lib/{Select-B_IxRUUC.js.map → Select-D3O7wISy.js.map} +1 -1
- package/lib/{SlotletProvider-pfc9oejW.js → SlotletProvider-_3zzX_g_.js} +53 -53
- package/lib/{SlotletProvider-pfc9oejW.js.map → SlotletProvider-_3zzX_g_.js.map} +1 -1
- package/lib/{Button-DeAoTouo.js → Spinner-BlzrEEk1.js} +16 -13
- package/lib/Spinner-BlzrEEk1.js.map +1 -0
- package/lib/{SyntaxHighlight-Bz-lOJtH.js → SyntaxHighlight-CJCSPG1F.js} +297 -301
- package/lib/{SyntaxHighlight-Bz-lOJtH.js.map → SyntaxHighlight-CJCSPG1F.js.map} +1 -1
- package/lib/{ZudokuContext-hmLMUdf2.js → ZudokuContext-DeQZEp-x.js} +357 -356
- package/lib/ZudokuContext-DeQZEp-x.js.map +1 -0
- package/lib/{chunk-D52XG6IA-Dl7HLe6j.js → chunk-SYFQ2XB5-BF5IDYrB.js} +410 -412
- package/lib/chunk-SYFQ2XB5-BF5IDYrB.js.map +1 -0
- package/lib/context-rwLGh-6_.js +22 -0
- package/lib/{context-h_UkBLvr.js.map → context-rwLGh-6_.js.map} +1 -1
- package/lib/{createServer-BznDkeSA.js → createServer-BcaswoFO.js} +1274 -1286
- package/lib/createServer-BcaswoFO.js.map +1 -0
- package/lib/{hook-CHq7pFyz.js → hook-BRQEDRbn.js} +17 -17
- package/lib/{hook-CHq7pFyz.js.map → hook-BRQEDRbn.js.map} +1 -1
- package/lib/index-B7mqiOei.js +509 -0
- package/lib/index-B7mqiOei.js.map +1 -0
- package/lib/index-CXRrqOIl.js +1750 -0
- package/lib/index-CXRrqOIl.js.map +1 -0
- package/lib/index-Djenk2Hj.js +36 -0
- package/lib/{index-CPNSgwSb.js.map → index-Djenk2Hj.js.map} +1 -1
- package/lib/{index-CBXSgjaE.js → index-Dl3Yl0yb.js} +65 -69
- package/lib/index-Dl3Yl0yb.js.map +1 -0
- package/lib/{index.esm-BSV1C092.js → index.esm-9-TF9KQB.js} +52 -52
- package/lib/{index.esm-BSV1C092.js.map → index.esm-9-TF9KQB.js.map} +1 -1
- package/lib/index.esm-CrSoEshU.js +1207 -0
- package/lib/index.esm-CrSoEshU.js.map +1 -0
- package/lib/joinUrl-BTy9bvoK.js +20 -0
- package/lib/joinUrl-BTy9bvoK.js.map +1 -0
- package/lib/{jsx-runtime-Dx-03ztt.js → jsx-runtime-Bdg6XQ1m.js} +135 -135
- package/lib/{jsx-runtime-Dx-03ztt.js.map → jsx-runtime-Bdg6XQ1m.js.map} +1 -1
- package/lib/post-processors/removeExtensions.js +7 -7
- package/lib/post-processors/removeExtensions.js.map +1 -1
- package/lib/post-processors/removeParameters.js +48 -0
- package/lib/post-processors/removeParameters.js.map +1 -0
- package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
- package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
- package/lib/{prism-csharp.min-DUwvItt4.js → prism-csharp.min-bQAo2pmx.js} +33 -33
- package/lib/{prism-csharp.min-DUwvItt4.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
- package/lib/{prism-java.min-BtgBR4yd.js → prism-java.min-BpvsOuIa.js} +12 -12
- package/lib/{prism-java.min-BtgBR4yd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
- package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
- package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
- package/lib/{prism-ruby.min-DeDXCp1r.js → prism-ruby.min-Dx9KO9ds.js} +16 -16
- package/lib/{prism-ruby.min-DeDXCp1r.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
- package/lib/state-mM7uaXTW.js +202 -0
- package/lib/state-mM7uaXTW.js.map +1 -0
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +10 -11
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +3 -2
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +2 -2
- package/lib/ui/Callout.js +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +3 -3
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +2 -2
- package/lib/ui/Command.js +125 -13
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +520 -519
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +7 -7
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/{useExposedProps-DE9lR6MF.js → useExposedProps-CetwhZpP.js} +2 -2
- package/lib/{useExposedProps-DE9lR6MF.js.map → useExposedProps-CetwhZpP.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +8 -10
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +18 -18
- package/lib/zudoku.auth-openid.js +225 -221
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +476 -461
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +5 -5
- package/lib/zudoku.plugin-api-keys.js +7 -7
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-openapi.js +5 -5
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -9
- package/package.json +48 -48
- package/src/app/main.css +50 -50
- package/src/lib/authentication/providers/auth0.tsx +1 -4
- package/src/lib/authentication/providers/openid.tsx +12 -5
- package/src/lib/components/Autocomplete.tsx +111 -0
- package/src/lib/components/Header.tsx +3 -3
- package/src/lib/components/index.ts +2 -2
- package/src/lib/components/navigation/SidebarCategory.tsx +2 -2
- package/src/lib/plugins/markdown/MdxPage.tsx +9 -1
- package/src/lib/plugins/openapi/OperationList.tsx +4 -0
- package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -5
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +5 -0
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +8 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +15 -7
- package/src/lib/plugins/openapi/SidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +14 -6
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +51 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +138 -41
- package/src/lib/plugins/openapi/playground/Playground.tsx +156 -62
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +89 -122
- package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
- package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
- package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
- package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +1 -1
- package/src/lib/ui/Badge.tsx +1 -0
- package/src/lib/ui/Command.tsx +20 -0
- package/src/lib/util/joinUrl.ts +57 -0
- package/dist/lib/plugins/openapi/playground/EnumSelector.d.ts +0 -8
- package/dist/lib/plugins/openapi/playground/EnumSelector.js +0 -21
- package/dist/lib/plugins/openapi/playground/EnumSelector.js.map +0 -1
- package/lib/Button-DeAoTouo.js.map +0 -1
- package/lib/Command-9x_kZHr4.js +0 -611
- package/lib/Command-9x_kZHr4.js.map +0 -1
- package/lib/MdxPage-DKMbBROv.js.map +0 -1
- package/lib/OperationList-B8bHMKme.js.map +0 -1
- package/lib/Spinner-DuxJLLNE.js +0 -7
- package/lib/Spinner-DuxJLLNE.js.map +0 -1
- package/lib/ZudokuContext-hmLMUdf2.js.map +0 -1
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +0 -1
- package/lib/context-h_UkBLvr.js +0 -22
- package/lib/createServer-BznDkeSA.js.map +0 -1
- package/lib/index-CBXSgjaE.js.map +0 -1
- package/lib/index-CPNSgwSb.js +0 -36
- package/lib/index-sD8L1_Dl.js +0 -1292
- package/lib/index-sD8L1_Dl.js.map +0 -1
- package/lib/index.esm-BnnBRKJX.js +0 -1214
- package/lib/index.esm-BnnBRKJX.js.map +0 -1
- package/lib/state-CFQsUZUP.js +0 -202
- package/lib/state-CFQsUZUP.js.map +0 -1
- package/src/lib/plugins/openapi/playground/EnumSelector.tsx +0 -86
|
@@ -2,21 +2,24 @@ import { type RecordAny, traverse } from "./traverse.js";
|
|
|
2
2
|
|
|
3
3
|
interface RemoveExtensionsOptions {
|
|
4
4
|
keys?: string[];
|
|
5
|
+
shouldRemove?: (key: string) => boolean;
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
// Remove all `x-` prefixed key/value pairs, or filter by names if provided
|
|
8
9
|
export const removeExtensions =
|
|
9
|
-
({ keys }: RemoveExtensionsOptions = {}) =>
|
|
10
|
+
({ keys, shouldRemove }: RemoveExtensionsOptions = {}) =>
|
|
10
11
|
(doc: RecordAny): RecordAny =>
|
|
11
12
|
traverse(doc, (spec) => {
|
|
12
13
|
const result: RecordAny = {};
|
|
13
14
|
|
|
14
15
|
for (const [key, value] of Object.entries(spec)) {
|
|
15
16
|
const isExtension = key.startsWith("x-");
|
|
16
|
-
const
|
|
17
|
-
isExtension &&
|
|
17
|
+
const shouldBeRemoved =
|
|
18
|
+
isExtension &&
|
|
19
|
+
(keys === undefined || keys.includes(key)) &&
|
|
20
|
+
(!shouldRemove || shouldRemove(key));
|
|
18
21
|
|
|
19
|
-
if (
|
|
22
|
+
if (shouldBeRemoved) continue;
|
|
20
23
|
|
|
21
24
|
result[key] = value;
|
|
22
25
|
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { type OpenAPIV3_1 } from "openapi-types";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { removeParameters } from "./removeParameters.js";
|
|
4
|
+
|
|
5
|
+
const baseDoc: OpenAPIV3_1.Document = {
|
|
6
|
+
openapi: "3.1.0",
|
|
7
|
+
info: {
|
|
8
|
+
title: "Test API",
|
|
9
|
+
version: "1.0.0",
|
|
10
|
+
},
|
|
11
|
+
components: {
|
|
12
|
+
parameters: {
|
|
13
|
+
commonParam: {
|
|
14
|
+
name: "commonParam",
|
|
15
|
+
in: "query",
|
|
16
|
+
schema: { type: "string" },
|
|
17
|
+
},
|
|
18
|
+
headerParam: {
|
|
19
|
+
name: "headerParam",
|
|
20
|
+
in: "header",
|
|
21
|
+
schema: { type: "string" },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
paths: {
|
|
26
|
+
"/test": {
|
|
27
|
+
parameters: [
|
|
28
|
+
{
|
|
29
|
+
name: "pathParam",
|
|
30
|
+
in: "path",
|
|
31
|
+
schema: { type: "string" },
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "pathHeader",
|
|
36
|
+
in: "header",
|
|
37
|
+
schema: { type: "string" },
|
|
38
|
+
required: true,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
get: {
|
|
42
|
+
parameters: [
|
|
43
|
+
{
|
|
44
|
+
name: "opParam",
|
|
45
|
+
in: "query",
|
|
46
|
+
schema: { type: "string" },
|
|
47
|
+
required: true,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "opHeader",
|
|
51
|
+
in: "header",
|
|
52
|
+
schema: { type: "string" },
|
|
53
|
+
required: true,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
responses: {
|
|
57
|
+
"200": {
|
|
58
|
+
description: "OK",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
describe("removeParameters", () => {
|
|
67
|
+
it("removes parameters by name", () => {
|
|
68
|
+
const processed = removeParameters({
|
|
69
|
+
names: ["pathParam", "opParam"],
|
|
70
|
+
})(baseDoc);
|
|
71
|
+
|
|
72
|
+
expect(processed.paths["/test"].parameters).toHaveLength(1);
|
|
73
|
+
expect(processed.paths["/test"].parameters[0].name).toBe("pathHeader");
|
|
74
|
+
expect(processed.paths["/test"].get.parameters).toHaveLength(1);
|
|
75
|
+
expect(processed.paths["/test"].get.parameters[0].name).toBe("opHeader");
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("removes parameters by location", () => {
|
|
79
|
+
const processed = removeParameters({
|
|
80
|
+
in: ["header"],
|
|
81
|
+
})(baseDoc);
|
|
82
|
+
|
|
83
|
+
expect(processed.paths["/test"].parameters).toHaveLength(1);
|
|
84
|
+
expect(processed.paths["/test"].parameters[0].in).toBe("path");
|
|
85
|
+
expect(processed.paths["/test"].get.parameters).toHaveLength(1);
|
|
86
|
+
expect(processed.paths["/test"].get.parameters[0].in).toBe("query");
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("removes parameters using shouldRemove callback", () => {
|
|
90
|
+
const processed = removeParameters({
|
|
91
|
+
shouldRemove: ({ parameter }) =>
|
|
92
|
+
parameter.in === "header" && parameter.name.includes("op"),
|
|
93
|
+
})(baseDoc);
|
|
94
|
+
|
|
95
|
+
expect(processed.paths["/test"].parameters).toHaveLength(2);
|
|
96
|
+
expect(processed.paths["/test"].get.parameters).toHaveLength(1);
|
|
97
|
+
expect(processed.paths["/test"].get.parameters[0].name).toBe("opParam");
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it("combines multiple removal criteria", () => {
|
|
101
|
+
const processed = removeParameters({
|
|
102
|
+
in: ["query", "header"],
|
|
103
|
+
shouldRemove: ({ parameter }) => parameter.name === "pathHeader",
|
|
104
|
+
})(baseDoc);
|
|
105
|
+
|
|
106
|
+
expect(processed.paths["/test"].parameters).toHaveLength(1);
|
|
107
|
+
expect(processed.paths["/test"].parameters[0].name).toBe("pathParam");
|
|
108
|
+
expect(processed.paths["/test"].get.parameters).toHaveLength(0);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it("handles missing parameters arrays", () => {
|
|
112
|
+
const docWithoutParams = {
|
|
113
|
+
openapi: "3.1.0",
|
|
114
|
+
paths: {
|
|
115
|
+
"/test": {
|
|
116
|
+
get: {
|
|
117
|
+
summary: "Test endpoint",
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const processed = removeParameters({
|
|
124
|
+
names: ["someParam"],
|
|
125
|
+
})(docWithoutParams);
|
|
126
|
+
|
|
127
|
+
expect(processed).toEqual(docWithoutParams);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it("preserves non-parameter properties", () => {
|
|
131
|
+
const processed = removeParameters({
|
|
132
|
+
names: ["globalParam"],
|
|
133
|
+
})(baseDoc);
|
|
134
|
+
|
|
135
|
+
expect(processed.openapi).toBe("3.1.0");
|
|
136
|
+
expect(processed.paths["/test"].get).toBeDefined();
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it("removes parameters from components", () => {
|
|
140
|
+
const processed = removeParameters({
|
|
141
|
+
in: ["header"],
|
|
142
|
+
})(baseDoc);
|
|
143
|
+
|
|
144
|
+
expect(Object.keys(processed.components.parameters)).toHaveLength(1);
|
|
145
|
+
expect(processed.components.parameters.commonParam).toBeDefined();
|
|
146
|
+
expect(processed.components.parameters.headerParam).toBeUndefined();
|
|
147
|
+
});
|
|
148
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { type RecordAny, traverse } from "./traverse.js";
|
|
2
|
+
|
|
3
|
+
interface RemoveParametersOptions {
|
|
4
|
+
// Names of parameters to remove
|
|
5
|
+
names?: string[];
|
|
6
|
+
// Specific locations to remove parameters from ('query', 'header', 'path', 'cookie')
|
|
7
|
+
in?: string[];
|
|
8
|
+
// Custom filter function
|
|
9
|
+
shouldRemove?: ({ parameter }: { parameter: RecordAny }) => boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const removeParameters =
|
|
13
|
+
({ names, in: locations, shouldRemove }: RemoveParametersOptions = {}) =>
|
|
14
|
+
(doc: RecordAny): RecordAny =>
|
|
15
|
+
traverse(doc, (spec) => {
|
|
16
|
+
// Helper function to filter parameters
|
|
17
|
+
const filterParameters = (parameters: RecordAny[]) =>
|
|
18
|
+
parameters.filter((p) => {
|
|
19
|
+
if (names?.includes(p.name)) return false;
|
|
20
|
+
if (locations?.includes(p.in)) return false;
|
|
21
|
+
if (shouldRemove?.({ parameter: p })) return false;
|
|
22
|
+
return true;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Handle components.parameters
|
|
26
|
+
if (spec.components?.parameters) {
|
|
27
|
+
spec = {
|
|
28
|
+
...spec,
|
|
29
|
+
components: {
|
|
30
|
+
...spec.components,
|
|
31
|
+
parameters: Object.fromEntries(
|
|
32
|
+
Object.entries(spec.components.parameters).filter(
|
|
33
|
+
([_, param]) => {
|
|
34
|
+
const p = param as RecordAny;
|
|
35
|
+
if (p.$ref) return true; // Skip references
|
|
36
|
+
return (
|
|
37
|
+
!names?.includes(p.name) &&
|
|
38
|
+
!locations?.includes(p.in) &&
|
|
39
|
+
!shouldRemove?.({ parameter: p })
|
|
40
|
+
);
|
|
41
|
+
},
|
|
42
|
+
),
|
|
43
|
+
),
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Handle paths
|
|
49
|
+
if (spec.paths) {
|
|
50
|
+
const updatedPaths: RecordAny = {};
|
|
51
|
+
|
|
52
|
+
for (const [path, pathItem] of Object.entries(spec.paths)) {
|
|
53
|
+
if (typeof pathItem !== "object" || pathItem === null) {
|
|
54
|
+
updatedPaths[path] = pathItem;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
let updatedPathItem = { ...pathItem };
|
|
59
|
+
|
|
60
|
+
// Handle path-level parameters
|
|
61
|
+
if (
|
|
62
|
+
"parameters" in updatedPathItem &&
|
|
63
|
+
Array.isArray(updatedPathItem.parameters)
|
|
64
|
+
) {
|
|
65
|
+
updatedPathItem.parameters = filterParameters(
|
|
66
|
+
updatedPathItem.parameters,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Handle operation-level parameters
|
|
71
|
+
for (const method of Object.keys(updatedPathItem)) {
|
|
72
|
+
const pathItemWithMethods = updatedPathItem as Record<
|
|
73
|
+
string,
|
|
74
|
+
RecordAny
|
|
75
|
+
>;
|
|
76
|
+
|
|
77
|
+
if (
|
|
78
|
+
method === "parameters" ||
|
|
79
|
+
typeof pathItemWithMethods[method] !== "object"
|
|
80
|
+
) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const operation = pathItemWithMethods[method];
|
|
85
|
+
if (Array.isArray(operation.parameters)) {
|
|
86
|
+
pathItemWithMethods[method] = {
|
|
87
|
+
...operation,
|
|
88
|
+
parameters: filterParameters(operation.parameters),
|
|
89
|
+
};
|
|
90
|
+
updatedPathItem = pathItemWithMethods;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
updatedPaths[path] = updatedPathItem;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
spec = { ...spec, paths: updatedPaths };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return spec;
|
|
101
|
+
});
|
|
@@ -86,7 +86,7 @@ export const SchemaPropertyItem = ({
|
|
|
86
86
|
<div className="flex flex-col gap-1 justify-between text-sm">
|
|
87
87
|
<div className="flex gap-2 items-center">
|
|
88
88
|
<code>{name}</code>
|
|
89
|
-
<Badge variant="
|
|
89
|
+
<Badge variant="muted">
|
|
90
90
|
{schema.type === "array" && schema.items.type ? (
|
|
91
91
|
<span>{schema.items.type}[]</span>
|
|
92
92
|
) : Array.isArray(schema.type) ? (
|
package/src/lib/ui/Badge.tsx
CHANGED
|
@@ -12,6 +12,7 @@ const badgeVariants = cva(
|
|
|
12
12
|
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
13
13
|
secondary:
|
|
14
14
|
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
|
+
muted: "bg-muted text-muted-foreground ",
|
|
15
16
|
destructive:
|
|
16
17
|
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
17
18
|
outline: "text-foreground",
|
package/src/lib/ui/Command.tsx
CHANGED
|
@@ -52,6 +52,25 @@ const CommandInput = React.forwardRef<
|
|
|
52
52
|
|
|
53
53
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
54
54
|
|
|
55
|
+
const CommandInlineInput = React.forwardRef<
|
|
56
|
+
React.ElementRef<typeof CommandPrimitive.Input>,
|
|
57
|
+
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
|
|
58
|
+
>(({ className, ...props }, ref) => (
|
|
59
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
60
|
+
<div className="flex items-center" cmdk-input-wrapper="">
|
|
61
|
+
<CommandPrimitive.Input
|
|
62
|
+
ref={ref}
|
|
63
|
+
className={cn(
|
|
64
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
65
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
66
|
+
className,
|
|
67
|
+
)}
|
|
68
|
+
{...props}
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
));
|
|
72
|
+
|
|
73
|
+
CommandInlineInput.displayName = CommandPrimitive.Input.displayName;
|
|
55
74
|
const CommandList = React.forwardRef<
|
|
56
75
|
React.ElementRef<typeof CommandPrimitive.List>,
|
|
57
76
|
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
|
|
@@ -143,6 +162,7 @@ export {
|
|
|
143
162
|
CommandDialog,
|
|
144
163
|
CommandEmpty,
|
|
145
164
|
CommandGroup,
|
|
165
|
+
CommandInlineInput,
|
|
146
166
|
CommandInput,
|
|
147
167
|
CommandItem,
|
|
148
168
|
CommandList,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Mostly adapted from https://github.com/moxystudio/js-proper-url-join
|
|
2
|
+
const defaultUrlRegExp = /^(\w+:\/\/[^/?]+)?(.*?)(\?.+)?$/;
|
|
3
|
+
|
|
4
|
+
const normalizeParts = (
|
|
5
|
+
parts: (string | number | null | undefined | false)[],
|
|
6
|
+
): string[] =>
|
|
7
|
+
parts
|
|
8
|
+
.filter(
|
|
9
|
+
(part): part is string | number =>
|
|
10
|
+
part !== null &&
|
|
11
|
+
part !== undefined &&
|
|
12
|
+
part !== false &&
|
|
13
|
+
(typeof part === "string" || typeof part === "number"),
|
|
14
|
+
)
|
|
15
|
+
.map((part) => `${part}`)
|
|
16
|
+
.filter((part) => part);
|
|
17
|
+
|
|
18
|
+
interface ParsedParts {
|
|
19
|
+
prefix: string;
|
|
20
|
+
pathname: string[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const parseParts = (parts: string[]): ParsedParts => {
|
|
24
|
+
const partsStr = parts.join("/");
|
|
25
|
+
const [, prefix = "", pathname = ""] = partsStr.match(defaultUrlRegExp) ?? [];
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
prefix,
|
|
29
|
+
pathname: pathname.split("/").filter((part) => part !== ""),
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const buildUrl = (parsedParts: ParsedParts): string => {
|
|
34
|
+
const { prefix, pathname } = parsedParts;
|
|
35
|
+
let url = prefix;
|
|
36
|
+
|
|
37
|
+
if (pathname.length > 0) {
|
|
38
|
+
if (url) {
|
|
39
|
+
url += "/";
|
|
40
|
+
} else {
|
|
41
|
+
url = "/";
|
|
42
|
+
}
|
|
43
|
+
url += pathname.join("/");
|
|
44
|
+
} else if (!url) {
|
|
45
|
+
url = "/";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return url;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const joinUrl = (
|
|
52
|
+
...parts: Array<string | number | null | undefined | false>
|
|
53
|
+
): string => {
|
|
54
|
+
const normalizedParts = normalizeParts(parts);
|
|
55
|
+
const parsedParts = parseParts(normalizedParts);
|
|
56
|
+
return buildUrl(parsedParts);
|
|
57
|
+
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
interface EnumSelectorProps {
|
|
2
|
-
value: string;
|
|
3
|
-
enumValues: string[];
|
|
4
|
-
onChange: (value: string) => void;
|
|
5
|
-
onValueSelected: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const EnumSelector: ({ value, enumValues, onChange, onValueSelected, }: EnumSelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Command, CommandEmpty, CommandInput, CommandItem, CommandList, } from "../../../ui/Command.js";
|
|
4
|
-
import { Popover, PopoverContent, PopoverTrigger, } from "../../../ui/Popover.js";
|
|
5
|
-
import { cn } from "../../../util/cn.js";
|
|
6
|
-
export const EnumSelector = ({ value, enumValues, onChange, onValueSelected, }) => {
|
|
7
|
-
const [searchValue, setSearchValue] = useState("");
|
|
8
|
-
const [open, setOpen] = useState(false);
|
|
9
|
-
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { type: "button", role: "combobox", className: cn("px-3 py-2 w-full border-0 shadow-none text-xs font-mono text-start hover:bg-accent/40 rounded border-transparent hover:bg-accent", !value && "text-muted-foreground"), children: value || "Select value" }) }), _jsx(PopoverContent, { className: "p-0 w-[--radix-popover-trigger-width] ", align: "start", sideOffset: 3, alignOffset: -3, side: "bottom", children: _jsxs(Command, { className: "max-h-[180px]", children: [_jsx(CommandInput, { placeholder: "Enter value", className: "h-9 bg-transparent ", onValueChange: setSearchValue, onKeyDown: (e) => {
|
|
10
|
-
if (e.key === "Enter") {
|
|
11
|
-
onChange(searchValue);
|
|
12
|
-
onValueSelected();
|
|
13
|
-
setOpen(false);
|
|
14
|
-
}
|
|
15
|
-
} }), _jsxs(CommandList, { children: [_jsxs(CommandEmpty, { children: ["Use \"", searchValue, "\""] }), enumValues.map((enumValue) => (_jsx(CommandItem, { value: enumValue, onSelect: (selected) => {
|
|
16
|
-
onChange(selected);
|
|
17
|
-
onValueSelected();
|
|
18
|
-
setOpen(false);
|
|
19
|
-
}, children: enumValue }, enumValue)))] })] }) })] }));
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=EnumSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnumSelector.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/playground/EnumSelector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AASzC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,UAAU,EACV,QAAQ,EACR,eAAe,GACG,EAAE,EAAE;IACtB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExC,OAAO,CACL,MAAC,OAAO,IAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,aACxC,KAAC,cAAc,IAAC,OAAO,kBACrB,iBACE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,UAAU,EACf,SAAS,EAAE,EAAE,CACX,kIAAkI,EAClI,CAAC,KAAK,IAAI,uBAAuB,CAClC,YAEA,KAAK,IAAI,cAAc,GACjB,GACM,EACjB,KAAC,cAAc,IACb,SAAS,EAAC,wCAAwC,EAClD,KAAK,EAAC,OAAO,EACb,UAAU,EAAE,CAAC,EACb,WAAW,EAAE,CAAC,CAAC,EACf,IAAI,EAAC,QAAQ,YAEb,MAAC,OAAO,IAAC,SAAS,EAAC,eAAe,aAChC,KAAC,YAAY,IACX,WAAW,EAAC,aAAa,EACzB,SAAS,EAAC,qBAAqB,EAC/B,aAAa,EAAE,cAAc,EAC7B,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;gCACf,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;oCACtB,QAAQ,CAAC,WAAW,CAAC,CAAC;oCACtB,eAAe,EAAE,CAAC;oCAClB,OAAO,CAAC,KAAK,CAAC,CAAC;gCACjB,CAAC;4BACH,CAAC,GACD,EACF,MAAC,WAAW,eACV,MAAC,YAAY,yBAAO,WAAW,UAAiB,EAC/C,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAC7B,KAAC,WAAW,IAEV,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;wCACrB,QAAQ,CAAC,QAAQ,CAAC,CAAC;wCACnB,eAAe,EAAE,CAAC;wCAClB,OAAO,CAAC,KAAK,CAAC,CAAC;oCACjB,CAAC,YAEA,SAAS,IARL,SAAS,CASF,CACf,CAAC,IACU,IACN,GACK,IACT,CACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button-DeAoTouo.js","sources":["../src/lib/ui/Button.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nexport const buttonVariants = cva(\n \"not-prose inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n xl: \"h-14 rounded-lg px-10 text-lg\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","asChild","props","ref","Comp","Slot","jsx","cn"],"mappings":";;;;;AAKO,MAAMA,IAAiBC;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IAEV;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAQaC,IAASC,EAAM;AAAA,EAC1B,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,SAAAC,IAAU,IAAO,GAAGC,EAAM,GAAGC,MAAQ;AAC1D,UAAAC,IAAOH,IAAUI,IAAO;AAE5B,WAAAC,gBAAAA,EAAA;AAAA,MAACF;AAAA,MAAA;AAAA,QACC,WAAWG,EAAGb,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QAC1D,KAAAK;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAGN;AACAN,EAAO,cAAc;"}
|