zudoku 0.33.2-local.4 → 0.34.0
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/README.md +121 -0
- package/dist/config/validators/common.d.ts +346 -346
- package/dist/config/validators/validate.d.ts +165 -165
- package/dist/lib/components/AnchorLink.d.ts +2 -2
- package/dist/lib/components/AnchorLink.js +4 -4
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +6 -5
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +4 -0
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- 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 +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +5 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +9 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +75 -24
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +19 -13
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -8
- package/dist/lib/ui/Checkbox.js +1 -13
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +6 -6
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +2 -1
- package/dist/lib/ui/SyntaxHighlight.js +19 -15
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +1 -1
- package/dist/lib/util/MdxComponents.js +2 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/lib/{AuthenticationPlugin-BCYuduZ9.js → AuthenticationPlugin-4ip08maU.js} +3 -3
- package/lib/{AuthenticationPlugin-BCYuduZ9.js.map → AuthenticationPlugin-4ip08maU.js.map} +1 -1
- package/lib/Callout-B_sEhkYd.js +211 -0
- package/lib/Callout-B_sEhkYd.js.map +1 -0
- package/lib/{Dialog-mi6BrnrM.js → Dialog-sbgekbjb.js} +48 -33
- package/lib/{Dialog-mi6BrnrM.js.map → Dialog-sbgekbjb.js.map} +1 -1
- package/lib/{Markdown-DofXBcqg.js → Markdown-DZXjQjpH.js} +4099 -3848
- package/lib/Markdown-DZXjQjpH.js.map +1 -0
- package/lib/{MdxPage-KJcNWIgt.js → MdxPage-52vRwa_7.js} +13 -13
- package/lib/{MdxPage-KJcNWIgt.js.map → MdxPage-52vRwa_7.js.map} +1 -1
- package/lib/{OasProvider-HcqBeC4H.js → OasProvider-CR2nG1Eg.js} +4 -4
- package/lib/{OasProvider-HcqBeC4H.js.map → OasProvider-CR2nG1Eg.js.map} +1 -1
- package/lib/{OperationList-C3wnbFxp.js → OperationList-DndcCJUG.js} +1097 -1052
- package/lib/{OperationList-C3wnbFxp.js.map → OperationList-DndcCJUG.js.map} +1 -1
- package/lib/{Select-Co6MuS4j.js → Select-FAYHOYTy.js} +35 -35
- package/lib/{Select-Co6MuS4j.js.map → Select-FAYHOYTy.js.map} +1 -1
- package/lib/{SlotletProvider-CYFNHuok.js → SlotletProvider-TydSHROc.js} +4 -4
- package/lib/{SlotletProvider-CYFNHuok.js.map → SlotletProvider-TydSHROc.js.map} +1 -1
- package/lib/{chunk-IR6S3I6Y-CRDBmIgK.js → chunk-HA7DTUK3-ZGg2W6yV.js} +276 -276
- package/lib/chunk-HA7DTUK3-ZGg2W6yV.js.map +1 -0
- package/lib/{hook-LTe5qHSc.js → hook-CfCFKZ-2.js} +10 -7
- package/lib/{hook-LTe5qHSc.js.map → hook-CfCFKZ-2.js.map} +1 -1
- package/lib/index-DK7IuUyR.js +2201 -0
- package/lib/index-DK7IuUyR.js.map +1 -0
- package/lib/index.esm-CltAN0Tf.js +711 -0
- package/lib/index.esm-CltAN0Tf.js.map +1 -0
- package/lib/objectEntries-BS7aAgOm.js +12 -0
- package/lib/objectEntries-BS7aAgOm.js.map +1 -0
- package/lib/ui/Checkbox.js +15 -25
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +483 -502
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useExposedProps-D76yras4.js → useExposedProps-BslIn-FE.js} +2 -2
- package/lib/{useExposedProps-D76yras4.js.map → useExposedProps-BslIn-FE.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.components.js +1390 -32
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +5 -5
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +84 -154
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/package.json +3 -3
- package/src/lib/components/AnchorLink.tsx +7 -7
- package/src/lib/components/navigation/SidebarItem.tsx +8 -23
- package/src/lib/core/ZudokuContext.ts +4 -0
- package/src/lib/plugins/openapi/OperationList.tsx +73 -33
- package/src/lib/plugins/openapi/OperationListItem.tsx +105 -92
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
- package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +164 -133
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +24 -4
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +66 -45
- package/src/lib/ui/Checkbox.tsx +8 -24
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +94 -96
- package/src/lib/util/MdxComponents.tsx +2 -2
- package/lib/Command-CrTA1FX0.js +0 -140
- package/lib/Command-CrTA1FX0.js.map +0 -1
- package/lib/Markdown-DofXBcqg.js.map +0 -1
- package/lib/chunk-IR6S3I6Y-CRDBmIgK.js.map +0 -1
- package/lib/index-CtkRMvMw.js +0 -2052
- package/lib/index-CtkRMvMw.js.map +0 -1
- package/lib/index-vn5bsvmU.js +0 -1399
- package/lib/index-vn5bsvmU.js.map +0 -1
- package/lib/useScrollToAnchor-DKyrbZoy.js +0 -977
- package/lib/useScrollToAnchor-DKyrbZoy.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { UseMutationResult } from "@tanstack/react-query";
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
2
|
import { Spinner } from "../../../../components/Spinner.js";
|
|
3
|
+
import { Button } from "../../../../ui/Button.js";
|
|
3
4
|
import { Callout } from "../../../../ui/Callout.js";
|
|
4
5
|
import {
|
|
5
6
|
Card,
|
|
@@ -14,20 +15,24 @@ import {
|
|
|
14
15
|
TabsTrigger,
|
|
15
16
|
} from "../../../../ui/Tabs.js";
|
|
16
17
|
import { cn } from "../../../../util/cn.js";
|
|
17
|
-
import { PlaygroundResult } from "../Playground.js";
|
|
18
|
+
import { type PlaygroundResult } from "../Playground.js";
|
|
18
19
|
import { RequestTab } from "./RequestTab.js";
|
|
19
20
|
import { ResponseTab } from "./ResponseTab.js";
|
|
20
21
|
|
|
21
22
|
export const ResultPanel = ({
|
|
22
23
|
queryMutation,
|
|
23
24
|
showPathParamsWarning,
|
|
25
|
+
showLongRunningWarning,
|
|
26
|
+
onCancel,
|
|
24
27
|
}: {
|
|
25
|
-
queryMutation: UseMutationResult<PlaygroundResult, Error, any
|
|
28
|
+
queryMutation: UseMutationResult<PlaygroundResult, Error, any>;
|
|
26
29
|
showPathParamsWarning: boolean;
|
|
30
|
+
showLongRunningWarning?: boolean;
|
|
31
|
+
onCancel?: () => void;
|
|
27
32
|
}) => {
|
|
28
33
|
const status = ((queryMutation.data?.status ?? 0) / 100).toFixed(0);
|
|
29
34
|
return (
|
|
30
|
-
<div className="min-w-0 p-
|
|
35
|
+
<div className="min-w-0 p-4 bg-muted/50">
|
|
31
36
|
{queryMutation.error ? (
|
|
32
37
|
<div className="flex flex-col gap-2">
|
|
33
38
|
{showPathParamsWarning && (
|
|
@@ -49,49 +54,65 @@ export const ResultPanel = ({
|
|
|
49
54
|
</Card>
|
|
50
55
|
</div>
|
|
51
56
|
) : queryMutation.data ? (
|
|
52
|
-
<
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
</Tabs>
|
|
85
|
-
</div>
|
|
57
|
+
<Tabs defaultValue="response">
|
|
58
|
+
<TabsList>
|
|
59
|
+
<TabsTrigger value="request">Request</TabsTrigger>
|
|
60
|
+
<TabsTrigger value="response">
|
|
61
|
+
Response
|
|
62
|
+
<span
|
|
63
|
+
className={cn(
|
|
64
|
+
"text-xs font-mono ml-1",
|
|
65
|
+
status === "2" && "text-green-500",
|
|
66
|
+
status === "3" && "text-blue-500",
|
|
67
|
+
status === "4" && "text-yellow-500",
|
|
68
|
+
status === "5" && "text-red-500",
|
|
69
|
+
)}
|
|
70
|
+
>
|
|
71
|
+
({queryMutation.data.status})
|
|
72
|
+
</span>
|
|
73
|
+
</TabsTrigger>
|
|
74
|
+
</TabsList>
|
|
75
|
+
<TabsContent value="request">
|
|
76
|
+
<RequestTab {...queryMutation.data.request} />
|
|
77
|
+
</TabsContent>
|
|
78
|
+
<TabsContent value="response">
|
|
79
|
+
<ResponseTab
|
|
80
|
+
status={queryMutation.data.status}
|
|
81
|
+
time={queryMutation.data.time}
|
|
82
|
+
size={queryMutation.data.size}
|
|
83
|
+
headers={queryMutation.data.headers}
|
|
84
|
+
body={queryMutation.data.body}
|
|
85
|
+
url={queryMutation.data.request.url}
|
|
86
|
+
/>
|
|
87
|
+
</TabsContent>
|
|
88
|
+
</Tabs>
|
|
86
89
|
) : (
|
|
87
90
|
<div className="grid place-items-center h-full">
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
<Spinner />
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
{queryMutation.isPending ? (
|
|
92
|
+
<div className="flex flex-col gap-2 items-center mt-20">
|
|
93
|
+
<Spinner size={20} />
|
|
94
|
+
<div
|
|
95
|
+
className={cn(
|
|
96
|
+
"opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
|
|
97
|
+
showLongRunningWarning && "opacity-100 pointer-events-auto",
|
|
98
|
+
)}
|
|
99
|
+
>
|
|
100
|
+
Looks like the request is taking longer than expected.
|
|
101
|
+
<Button
|
|
102
|
+
onClick={onCancel}
|
|
103
|
+
size="sm"
|
|
104
|
+
className="w-fit"
|
|
105
|
+
variant="outline"
|
|
106
|
+
>
|
|
107
|
+
Cancel
|
|
108
|
+
</Button>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
) : (
|
|
112
|
+
<span className="text-[16px] font-semibold text-muted-foreground">
|
|
113
|
+
Send a request first to see the response here
|
|
114
|
+
</span>
|
|
115
|
+
)}
|
|
95
116
|
</div>
|
|
96
117
|
)}
|
|
97
118
|
</div>
|
package/src/lib/ui/Checkbox.tsx
CHANGED
|
@@ -1,36 +1,20 @@
|
|
|
1
1
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
2
|
import { Check } from "lucide-react";
|
|
4
3
|
import * as React from "react";
|
|
5
4
|
|
|
6
5
|
import { cn } from "../util/cn.js";
|
|
7
6
|
|
|
8
|
-
const checkboxVariants = cva(
|
|
9
|
-
"peer h-4 w-4 shrink-0 rounded-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default: "border border-primary data-[state=checked]:bg-primary",
|
|
14
|
-
outline: "border border-input data-[state=checked]:bg-accent",
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
variant: "default",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
interface CheckboxProps
|
|
24
|
-
extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,
|
|
25
|
-
VariantProps<typeof checkboxVariants> {}
|
|
26
|
-
|
|
27
7
|
const Checkbox = React.forwardRef<
|
|
28
8
|
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
29
|
-
|
|
30
|
-
>(({ className,
|
|
9
|
+
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
10
|
+
>(({ className, ...props }, ref) => (
|
|
31
11
|
<CheckboxPrimitive.Root
|
|
32
12
|
ref={ref}
|
|
33
|
-
className={cn(
|
|
13
|
+
className={cn(
|
|
14
|
+
"peer h-4 w-4 shrink-0 rounded-[min(6px,var(--radius)-4px)] ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
|
|
15
|
+
"border border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary",
|
|
16
|
+
className,
|
|
17
|
+
)}
|
|
34
18
|
{...props}
|
|
35
19
|
>
|
|
36
20
|
<CheckboxPrimitive.Indicator
|
|
@@ -42,4 +26,4 @@ const Checkbox = React.forwardRef<
|
|
|
42
26
|
));
|
|
43
27
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
44
28
|
|
|
45
|
-
export { Checkbox
|
|
29
|
+
export { Checkbox };
|
package/src/lib/ui/Select.tsx
CHANGED
|
@@ -115,7 +115,7 @@ const SelectItem = React.forwardRef<
|
|
|
115
115
|
<SelectPrimitive.Item
|
|
116
116
|
ref={ref}
|
|
117
117
|
className={cn(
|
|
118
|
-
"relative flex w-full cursor-default select-none items-center
|
|
118
|
+
"relative flex w-full cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
119
119
|
className,
|
|
120
120
|
)}
|
|
121
121
|
{...props}
|
|
@@ -30,7 +30,7 @@ void import("prismjs/components/prism-javascript.min.js");
|
|
|
30
30
|
void import("prismjs/components/prism-typescript.min.js");
|
|
31
31
|
|
|
32
32
|
import { useTheme } from "next-themes";
|
|
33
|
-
import { useState } from "react";
|
|
33
|
+
import { memo, useState } from "react";
|
|
34
34
|
import { ClientOnly } from "../components/ClientOnly.js";
|
|
35
35
|
import { cn } from "../util/cn.js";
|
|
36
36
|
|
|
@@ -45,18 +45,20 @@ export type SyntaxHighlightProps = {
|
|
|
45
45
|
code?: string;
|
|
46
46
|
showCopy?: "hover" | "always" | "never";
|
|
47
47
|
showCopyText?: boolean;
|
|
48
|
+
disabled?: boolean;
|
|
48
49
|
} & Omit<HighlightProps, "children" | "language">;
|
|
49
50
|
|
|
50
51
|
const remapLang = {
|
|
51
52
|
mdx: "md",
|
|
52
53
|
} as Record<string, string>;
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
const SyntaxHighlightInner = ({
|
|
55
56
|
language = "plain",
|
|
56
57
|
showCopy = "hover",
|
|
57
58
|
showCopyText,
|
|
58
59
|
title,
|
|
59
60
|
children,
|
|
61
|
+
disabled,
|
|
60
62
|
...props
|
|
61
63
|
}: SyntaxHighlightProps) => {
|
|
62
64
|
const { resolvedTheme } = useTheme();
|
|
@@ -75,34 +77,84 @@ export const SyntaxHighlight = ({
|
|
|
75
77
|
const themeColorClasses =
|
|
76
78
|
"bg-[#f6f8fa] text-[#393a34] dark:bg-[#1e1e1e] dark:text-[#9cdcfe]";
|
|
77
79
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
const Wrapper = ({
|
|
81
|
+
children,
|
|
82
|
+
className,
|
|
83
|
+
style,
|
|
84
|
+
}: {
|
|
85
|
+
children: React.ReactNode;
|
|
86
|
+
className?: string;
|
|
87
|
+
style?: React.CSSProperties;
|
|
88
|
+
}) => (
|
|
89
|
+
<div className="relative group">
|
|
90
|
+
{title && (
|
|
91
|
+
<div className="text-xs text-muted-foreground absolute top-2 font-mono border-b w-full pb-2 px-4 ">
|
|
92
|
+
{title}
|
|
93
|
+
</div>
|
|
94
|
+
)}
|
|
95
|
+
<pre
|
|
96
|
+
className={cn(
|
|
97
|
+
"relative scrollbar overflow-x-auto",
|
|
98
|
+
props.className,
|
|
99
|
+
props.noBackground ? "!bg-transparent" : themeColorClasses,
|
|
100
|
+
props.wrapLines && "whitespace-pre-wrap break-words",
|
|
101
|
+
title && "pt-10",
|
|
102
|
+
className,
|
|
103
|
+
)}
|
|
104
|
+
style={style}
|
|
105
|
+
>
|
|
106
|
+
{children}
|
|
107
|
+
</pre>
|
|
108
|
+
{props.showLanguageIndicator && (
|
|
109
|
+
<span className="absolute top-1.5 right-3 text-[11px] font-mono text-muted-foreground transition group-hover:opacity-0">
|
|
110
|
+
{language}
|
|
111
|
+
</span>
|
|
112
|
+
)}
|
|
113
|
+
{showCopy !== "never" && (
|
|
114
|
+
<button
|
|
115
|
+
type="button"
|
|
116
|
+
aria-label="Copy code"
|
|
117
|
+
title="Copy code"
|
|
118
|
+
className={cn(
|
|
119
|
+
"absolute top-2 right-2 p-2 hover:outline hover:outline-border/75 dark:hover:outline-border rounded-md text-sm text-muted-foreground transition",
|
|
120
|
+
showCopy === "hover"
|
|
121
|
+
? "opacity-0 group-hover:opacity-100 group-hover:bg-zinc-100 group-hover:dark:bg-zinc-700"
|
|
122
|
+
: "bg-zinc-100 dark:bg-zinc-700",
|
|
123
|
+
showCopyText && "flex gap-2 items-center font-medium",
|
|
86
124
|
)}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
125
|
+
disabled={isCopied}
|
|
126
|
+
onClick={() => {
|
|
127
|
+
setIsCopied(true);
|
|
128
|
+
void navigator.clipboard.writeText(code);
|
|
129
|
+
setTimeout(() => setIsCopied(false), 2000);
|
|
130
|
+
}}
|
|
131
|
+
>
|
|
132
|
+
{isCopied ? (
|
|
133
|
+
<CheckIcon
|
|
134
|
+
className="text-emerald-600"
|
|
135
|
+
size={16}
|
|
136
|
+
strokeWidth={2.5}
|
|
137
|
+
absoluteStrokeWidth
|
|
138
|
+
/>
|
|
139
|
+
) : (
|
|
140
|
+
<CopyIcon size={16} />
|
|
102
141
|
)}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
142
|
+
{showCopyText && "Copy"}
|
|
143
|
+
</button>
|
|
144
|
+
)}
|
|
145
|
+
</div>
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
if (disabled) {
|
|
149
|
+
return (
|
|
150
|
+
<ClientOnly fallback={<Wrapper>{code}</Wrapper>}>
|
|
151
|
+
<Wrapper>{code}</Wrapper>
|
|
152
|
+
</ClientOnly>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<ClientOnly fallback={<Wrapper>{code}</Wrapper>}>
|
|
106
158
|
<Highlight
|
|
107
159
|
theme={highlightTheme}
|
|
108
160
|
language={remapLang[language] ?? language}
|
|
@@ -110,77 +162,23 @@ export const SyntaxHighlight = ({
|
|
|
110
162
|
code={code}
|
|
111
163
|
>
|
|
112
164
|
{({ className, style, tokens, getLineProps, getTokenProps }) => (
|
|
113
|
-
<
|
|
114
|
-
{
|
|
115
|
-
|
|
116
|
-
|
|
165
|
+
<Wrapper className={className} style={style}>
|
|
166
|
+
{tokens.map((line, i) => (
|
|
167
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
168
|
+
<div key={i} {...getLineProps({ line })}>
|
|
169
|
+
{line.map((token, key) => (
|
|
170
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
171
|
+
<span key={key} {...getTokenProps({ token })} />
|
|
172
|
+
))}
|
|
117
173
|
</div>
|
|
118
|
-
)}
|
|
119
|
-
|
|
120
|
-
className={cn(
|
|
121
|
-
"relative scrollbar overflow-x-auto",
|
|
122
|
-
className,
|
|
123
|
-
props.className,
|
|
124
|
-
props.noBackground && "!bg-transparent",
|
|
125
|
-
props.wrapLines && "whitespace-pre-wrap break-words",
|
|
126
|
-
title && "pt-10",
|
|
127
|
-
)}
|
|
128
|
-
style={style}
|
|
129
|
-
>
|
|
130
|
-
{tokens.map((line, i) => (
|
|
131
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
132
|
-
<div key={i} {...getLineProps({ line })}>
|
|
133
|
-
{line.map((token, key) => (
|
|
134
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
135
|
-
<span key={key} {...getTokenProps({ token })} />
|
|
136
|
-
))}
|
|
137
|
-
</div>
|
|
138
|
-
))}
|
|
139
|
-
</pre>
|
|
140
|
-
{props.showLanguageIndicator && (
|
|
141
|
-
<span className="absolute top-1.5 right-3 text-[11px] font-mono text-muted-foreground transition group-hover:opacity-0">
|
|
142
|
-
{language}
|
|
143
|
-
</span>
|
|
144
|
-
)}
|
|
145
|
-
{showCopy !== "never" && (
|
|
146
|
-
<button
|
|
147
|
-
type="button"
|
|
148
|
-
aria-label="Copy code"
|
|
149
|
-
title="Copy code"
|
|
150
|
-
className={cn(
|
|
151
|
-
"absolute top-2 right-2 p-2 hover:outline hover:outline-border/75 dark:hover:outline-border rounded-md text-sm text-muted-foreground transition",
|
|
152
|
-
showCopy === "hover"
|
|
153
|
-
? "opacity-0 group-hover:opacity-100 group-hover:bg-zinc-100 group-hover:dark:bg-zinc-700"
|
|
154
|
-
: "bg-zinc-100 dark:bg-zinc-700",
|
|
155
|
-
showCopyText && "flex gap-2 items-center font-medium",
|
|
156
|
-
)}
|
|
157
|
-
disabled={isCopied}
|
|
158
|
-
onClick={() => {
|
|
159
|
-
setIsCopied(true);
|
|
160
|
-
void navigator.clipboard.writeText(
|
|
161
|
-
tokens
|
|
162
|
-
.map((l) => l.map(({ content }) => content).join(""))
|
|
163
|
-
.join("\n"),
|
|
164
|
-
);
|
|
165
|
-
setTimeout(() => setIsCopied(false), 2000);
|
|
166
|
-
}}
|
|
167
|
-
>
|
|
168
|
-
{isCopied ? (
|
|
169
|
-
<CheckIcon
|
|
170
|
-
className="text-emerald-600"
|
|
171
|
-
size={16}
|
|
172
|
-
strokeWidth={2.5}
|
|
173
|
-
absoluteStrokeWidth
|
|
174
|
-
/>
|
|
175
|
-
) : (
|
|
176
|
-
<CopyIcon size={16} />
|
|
177
|
-
)}
|
|
178
|
-
{showCopyText && "Copy"}
|
|
179
|
-
</button>
|
|
180
|
-
)}
|
|
181
|
-
</div>
|
|
174
|
+
))}
|
|
175
|
+
</Wrapper>
|
|
182
176
|
)}
|
|
183
177
|
</Highlight>
|
|
184
178
|
</ClientOnly>
|
|
185
179
|
);
|
|
186
180
|
};
|
|
181
|
+
|
|
182
|
+
export const SyntaxHighlight = memo(SyntaxHighlightInner);
|
|
183
|
+
|
|
184
|
+
SyntaxHighlight.displayName = "SyntaxHighlight";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type MDXComponents } from "mdx/types.js";
|
|
2
|
-
import {
|
|
2
|
+
import { AnchorLink } from "../components/AnchorLink.js";
|
|
3
3
|
import { Heading } from "../components/Heading.js";
|
|
4
4
|
import { InlineCode } from "../components/InlineCode.js";
|
|
5
5
|
import { Callout } from "../ui/Callout.js";
|
|
@@ -47,7 +47,7 @@ export const MdxComponents = {
|
|
|
47
47
|
),
|
|
48
48
|
a: ({ href, node, ...props }) =>
|
|
49
49
|
href && !href.startsWith("http") ? (
|
|
50
|
-
<
|
|
50
|
+
<AnchorLink to={href} relative="path" {...props} />
|
|
51
51
|
) : (
|
|
52
52
|
<a href={href} target="_blank" {...props} rel="noreferrer" />
|
|
53
53
|
),
|
package/lib/Command-CrTA1FX0.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { j as d } from "./jsx-runtime-CYK1ROHF.js";
|
|
2
|
-
import { V as r } from "./index-gQD2h1wX.js";
|
|
3
|
-
import { Search as p } from "lucide-react";
|
|
4
|
-
import * as t from "react";
|
|
5
|
-
import { D as n, a as l } from "./Dialog-mi6BrnrM.js";
|
|
6
|
-
import { c as o } from "./cn-qaFjX9_3.js";
|
|
7
|
-
const m = t.forwardRef(({ className: s, ...e }, a) => /* @__PURE__ */ d.jsx(
|
|
8
|
-
r,
|
|
9
|
-
{
|
|
10
|
-
ref: a,
|
|
11
|
-
className: o(
|
|
12
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
13
|
-
s
|
|
14
|
-
),
|
|
15
|
-
...e
|
|
16
|
-
}
|
|
17
|
-
));
|
|
18
|
-
m.displayName = r.displayName;
|
|
19
|
-
const k = ({
|
|
20
|
-
children: s,
|
|
21
|
-
command: e,
|
|
22
|
-
content: a,
|
|
23
|
-
...i
|
|
24
|
-
}) => /* @__PURE__ */ d.jsx(n, { ...i, children: /* @__PURE__ */ d.jsx(
|
|
25
|
-
l,
|
|
26
|
-
{
|
|
27
|
-
...a,
|
|
28
|
-
className: o(
|
|
29
|
-
"overflow-hidden p-0 shadow-lg top-[15vh] translate-y-[0%]",
|
|
30
|
-
a == null ? void 0 : a.className
|
|
31
|
-
),
|
|
32
|
-
"aria-describedby": void 0,
|
|
33
|
-
children: /* @__PURE__ */ d.jsx(
|
|
34
|
-
m,
|
|
35
|
-
{
|
|
36
|
-
...e,
|
|
37
|
-
className: o(
|
|
38
|
-
"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
|
|
39
|
-
e == null ? void 0 : e.className
|
|
40
|
-
),
|
|
41
|
-
children: s
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
) }), c = t.forwardRef(({ className: s, ...e }, a) => (
|
|
46
|
-
// eslint-disable-next-line react/no-unknown-property
|
|
47
|
-
/* @__PURE__ */ d.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
48
|
-
/* @__PURE__ */ d.jsx(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
49
|
-
/* @__PURE__ */ d.jsx(
|
|
50
|
-
r.Input,
|
|
51
|
-
{
|
|
52
|
-
ref: a,
|
|
53
|
-
className: o(
|
|
54
|
-
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
55
|
-
s
|
|
56
|
-
),
|
|
57
|
-
...e
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
] })
|
|
61
|
-
));
|
|
62
|
-
c.displayName = r.Input.displayName;
|
|
63
|
-
const u = t.forwardRef(({ className: s, ...e }, a) => (
|
|
64
|
-
// eslint-disable-next-line react/no-unknown-property
|
|
65
|
-
/* @__PURE__ */ d.jsx("div", { className: "flex items-center", "cmdk-input-wrapper": "", children: /* @__PURE__ */ d.jsx(
|
|
66
|
-
r.Input,
|
|
67
|
-
{
|
|
68
|
-
ref: a,
|
|
69
|
-
className: o(
|
|
70
|
-
"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 disabled:cursor-not-allowed disabled:opacity-50",
|
|
71
|
-
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
72
|
-
s
|
|
73
|
-
),
|
|
74
|
-
...e
|
|
75
|
-
}
|
|
76
|
-
) })
|
|
77
|
-
));
|
|
78
|
-
u.displayName = r.Input.displayName;
|
|
79
|
-
const f = t.forwardRef(({ className: s, ...e }, a) => /* @__PURE__ */ d.jsx(
|
|
80
|
-
r.List,
|
|
81
|
-
{
|
|
82
|
-
ref: a,
|
|
83
|
-
className: o("max-h-[300px] overflow-y-auto overflow-x-hidden", s),
|
|
84
|
-
...e
|
|
85
|
-
}
|
|
86
|
-
));
|
|
87
|
-
f.displayName = r.List.displayName;
|
|
88
|
-
const x = t.forwardRef((s, e) => /* @__PURE__ */ d.jsx(
|
|
89
|
-
r.Empty,
|
|
90
|
-
{
|
|
91
|
-
ref: e,
|
|
92
|
-
className: "py-6 text-center text-sm",
|
|
93
|
-
...s
|
|
94
|
-
}
|
|
95
|
-
));
|
|
96
|
-
x.displayName = r.Empty.displayName;
|
|
97
|
-
const g = t.forwardRef(({ className: s, ...e }, a) => /* @__PURE__ */ d.jsx(
|
|
98
|
-
r.Group,
|
|
99
|
-
{
|
|
100
|
-
ref: a,
|
|
101
|
-
className: o(
|
|
102
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
103
|
-
s
|
|
104
|
-
),
|
|
105
|
-
...e
|
|
106
|
-
}
|
|
107
|
-
));
|
|
108
|
-
g.displayName = r.Group.displayName;
|
|
109
|
-
const h = t.forwardRef(({ className: s, ...e }, a) => /* @__PURE__ */ d.jsx(
|
|
110
|
-
r.Separator,
|
|
111
|
-
{
|
|
112
|
-
ref: a,
|
|
113
|
-
className: o("-mx-1 h-px bg-border", s),
|
|
114
|
-
...e
|
|
115
|
-
}
|
|
116
|
-
));
|
|
117
|
-
h.displayName = r.Separator.displayName;
|
|
118
|
-
const y = t.forwardRef(({ className: s, ...e }, a) => /* @__PURE__ */ d.jsx(
|
|
119
|
-
r.Item,
|
|
120
|
-
{
|
|
121
|
-
ref: a,
|
|
122
|
-
className: o(
|
|
123
|
-
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
124
|
-
s
|
|
125
|
-
),
|
|
126
|
-
...e
|
|
127
|
-
}
|
|
128
|
-
));
|
|
129
|
-
y.displayName = r.Item.displayName;
|
|
130
|
-
export {
|
|
131
|
-
f as C,
|
|
132
|
-
g as a,
|
|
133
|
-
y as b,
|
|
134
|
-
k as c,
|
|
135
|
-
c as d,
|
|
136
|
-
x as e,
|
|
137
|
-
m as f,
|
|
138
|
-
u as g
|
|
139
|
-
};
|
|
140
|
-
//# sourceMappingURL=Command-CrTA1FX0.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Command-CrTA1FX0.js","sources":["../src/lib/ui/Command.tsx"],"sourcesContent":["import { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\nimport * as React from \"react\";\nimport { ComponentPropsWithoutRef } from \"react\";\nimport { Dialog, DialogContent } from \"zudoku/ui/Dialog.js\";\nimport { cn } from \"../util/cn.js\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({\n children,\n command,\n content,\n ...props\n}: DialogProps & {\n command?: ComponentPropsWithoutRef<typeof CommandPrimitive>;\n content?: ComponentPropsWithoutRef<typeof DialogContent>;\n}) => {\n return (\n <Dialog {...props}>\n <DialogContent\n {...content}\n className={cn(\n \"overflow-hidden p-0 shadow-lg top-[15vh] translate-y-[0%]\",\n content?.className,\n )}\n aria-describedby={undefined}\n >\n <Command\n {...command}\n className={cn(\n \"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\",\n command?.className,\n )}\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandInlineInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center\" cmdk-input-wrapper=\"\">\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"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 disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInlineInput.displayName = CommandPrimitive.Input.displayName;\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className,\n )}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInlineInput,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n"],"names":["Command","React","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","command","content","Dialog","DialogContent","CommandInput","jsxs","Search","CommandInlineInput","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem"],"mappings":";;;;;;AAQM,MAAAA,IAAUC,EAAM,WAGpB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAQ,cAAcM,EAAiB;AAEvC,MAAME,IAAgB,CAAC;AAAA,EACrB,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGR;AACL,MAKIE,gBAAAA,EAAA,IAACO,GAAQ,EAAA,GAAGT,GACV,UAAAE,gBAAAA,EAAA;AAAA,EAACQ;AAAA,EAAA;AAAA,IACE,GAAGF;AAAA,IACJ,WAAWJ;AAAA,MACT;AAAA,MACAI,KAAA,gBAAAA,EAAS;AAAA,IACX;AAAA,IACA,oBAAkB;AAAA,IAElB,UAAAN,gBAAAA,EAAA;AAAA,MAACL;AAAA,MAAA;AAAA,QACE,GAAGU;AAAA,QACJ,WAAWH;AAAA,UACT;AAAA,UACAG,KAAA,gBAAAA,EAAS;AAAA,QACX;AAAA,QAEC,UAAAD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AAAA,GAEJ,GAIEK,IAAeb,EAAM,WAGzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC;AAAA;AAAA,EAEzBW,gBAAAA,EAAA,KAAA,OAAA,EAAI,WAAU,mCAAkC,sBAAmB,IAClE,UAAA;AAAA,IAACV,gBAAAA,EAAAA,IAAAW,GAAA,EAAO,WAAU,mCAAmC,CAAA;AAAA,IACrDX,gBAAAA,EAAA;AAAA,MAACC,EAAiB;AAAA,MAAjB;AAAA,QACC,KAAAF;AAAA,QACA,WAAWG;AAAA,UACT;AAAA,UACAL;AAAA,QACF;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,EACF,CAAA;AAAA,CACD;AAEDW,EAAa,cAAcR,EAAiB,MAAM;AAE5C,MAAAW,IAAqBhB,EAAM,WAG/B,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC;AAAA;AAAA,EAEzBC,gBAAAA,EAAA,IAAA,OAAA,EAAI,WAAU,qBAAoB,sBAAmB,IACpD,UAAAA,gBAAAA,EAAA;AAAA,IAACC,EAAiB;AAAA,IAAjB;AAAA,MACC,KAAAF;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACA;AAAA,QACAL;AAAA,MACF;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EAAA,EAER,CAAA;AAAA,CACD;AAEDc,EAAmB,cAAcX,EAAiB,MAAM;AAClD,MAAAY,IAAcjB,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG,EAAG,mDAAmDL,CAAS;AAAA,IACzE,GAAGC;AAAA,EAAA;AACN,CACD;AAEDe,EAAY,cAAcZ,EAAiB,KAAK;AAEhD,MAAMa,IAAelB,EAAM,WAGzB,CAACE,GAAOC,MACRC,gBAAAA,EAAA;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAF;AAAA,IACA,WAAU;AAAA,IACT,GAAGD;AAAA,EAAA;AACN,CACD;AAEDgB,EAAa,cAAcb,EAAiB,MAAM;AAE5C,MAAAc,IAAenB,EAAM,WAGzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AAEDiB,EAAa,cAAcd,EAAiB,MAAM;AAElD,MAAMe,IAAmBpB,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG,EAAG,wBAAwBL,CAAS;AAAA,IAC9C,GAAGC;AAAA,EAAA;AACN,CACD;AACDkB,EAAiB,cAAcf,EAAiB,UAAU;AAEpD,MAAAgB,IAAcrB,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AAEDmB,EAAY,cAAchB,EAAiB,KAAK;"}
|