zudoku 0.64.2 → 0.65.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/app/main.d.ts +91 -1
- package/dist/app/main.js +5 -1
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +16 -16
- package/dist/config/validators/NavigationSchema.js +2 -4
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +53 -1
- package/dist/config/validators/validate.js +7 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +43 -0
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +6 -0
- package/dist/lib/authentication/providers/auth0.js +6 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +3 -1
- package/dist/lib/components/Autocomplete.js +6 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Layout.js +3 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +2 -2
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/RouterError.d.ts +3 -1
- package/dist/lib/errors/RouterError.js +3 -2
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +7 -4
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +17 -6
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +4 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +1 -2
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +15 -6
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -2
- package/dist/lib/plugins/openapi/Sidecar.js +39 -15
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +15 -16
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +13 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +56 -28
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -2
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +17 -7
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +20 -9
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/UnionView.js +2 -5
- package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +3 -3
- package/dist/lib/ui/Badge.js +9 -7
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Button.js +1 -0
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -2
- package/dist/lib/ui/Checkbox.js +4 -4
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/CodeBlock.js +1 -1
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Collapsible.d.ts +4 -4
- package/dist/lib/ui/Collapsible.js +11 -4
- package/dist/lib/ui/Collapsible.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +3 -2
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Frame.d.ts +8 -0
- package/dist/lib/ui/Frame.js +22 -0
- package/dist/lib/ui/Frame.js.map +1 -0
- package/dist/lib/ui/Item.d.ts +23 -0
- package/dist/lib/ui/Item.js +67 -0
- package/dist/lib/ui/Item.js.map +1 -0
- package/dist/lib/ui/NativeSelect.d.ts +5 -0
- package/dist/lib/ui/NativeSelect.js +14 -0
- package/dist/lib/ui/NativeSelect.js.map +1 -0
- package/dist/lib/ui/Select.d.ts +13 -11
- package/dist/lib/ui/Select.js +34 -23
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/util/readFrontmatter.d.ts +6 -0
- package/dist/lib/util/readFrontmatter.js +12 -0
- package/dist/lib/util/readFrontmatter.js.map +1 -0
- package/dist/vite/mdx/remark-last-modified.js +57 -3
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/plugin-api.js +2 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +3 -5
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +3 -4
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/lib/{Button-DmS4u8Lj.js → Button-B3ucvvQw.js} +7 -6
- package/lib/Button-B3ucvvQw.js.map +1 -0
- package/lib/{ErrorAlert--3alJ_-b.js → ErrorAlert-D5LKLFOd.js} +1100 -1112
- package/lib/ErrorAlert-D5LKLFOd.js.map +1 -0
- package/lib/{MdxPage-Bpa9tL63.js → MdxPage-hOCN-u-L.js} +6 -6
- package/lib/{MdxPage-Bpa9tL63.js.map → MdxPage-hOCN-u-L.js.map} +1 -1
- package/lib/{OAuthErrorPage-B79J86Fo.js → OAuthErrorPage-oXnxcJg4.js} +4 -4
- package/lib/{OAuthErrorPage-B79J86Fo.js.map → OAuthErrorPage-oXnxcJg4.js.map} +1 -1
- package/lib/{OasProvider-jr0oDSFy.js → OasProvider-BuBeRIHB.js} +2 -2
- package/lib/{OasProvider-jr0oDSFy.js.map → OasProvider-BuBeRIHB.js.map} +1 -1
- package/lib/{OperationList-DLEAg4qw.js → OperationList-Cx8TGKhB.js} +2053 -1830
- package/lib/OperationList-Cx8TGKhB.js.map +1 -0
- package/lib/{Pagination-H2HW9-Er.js → Pagination-lLSoHnxa.js} +2 -2
- package/lib/{Pagination-H2HW9-Er.js.map → Pagination-lLSoHnxa.js.map} +1 -1
- package/lib/{RouteGuard-CjzxosTf.js → RouteGuard-Brz95MSt.js} +2 -2
- package/lib/{RouteGuard-CjzxosTf.js.map → RouteGuard-Brz95MSt.js.map} +1 -1
- package/lib/RouterError-VGZB_wg4.js +42 -0
- package/lib/RouterError-VGZB_wg4.js.map +1 -0
- package/lib/{SchemaList-CSDSazqV.js → SchemaList-rBWXYJEb.js} +7 -7
- package/lib/{SchemaList-CSDSazqV.js.map → SchemaList-rBWXYJEb.js.map} +1 -1
- package/lib/SchemaView-jouS_xvc.js +586 -0
- package/lib/SchemaView-jouS_xvc.js.map +1 -0
- package/lib/Select-DFRCS31-.js +399 -0
- package/lib/Select-DFRCS31-.js.map +1 -0
- package/lib/{SignUp-Fycafbyg.js → SignUp-D2mmQOkg.js} +2 -2
- package/lib/{SignUp-Fycafbyg.js.map → SignUp-D2mmQOkg.js.map} +1 -1
- package/lib/{Toc-ChkOg2UU.js → Toc-CBWfFCVf.js} +2 -2
- package/lib/{Toc-ChkOg2UU.js.map → Toc-CBWfFCVf.js.map} +1 -1
- package/lib/{circular-DGfd8SGc.js → circular-CGkbVs2O.js} +6360 -5953
- package/lib/circular-CGkbVs2O.js.map +1 -0
- package/lib/{createServer-DGD8hEzT.js → createServer-CcV_75PW.js} +770 -735
- package/lib/createServer-CcV_75PW.js.map +1 -0
- package/lib/{errors-BTpjwHS6.js → errors-D7xzOd8X.js} +2 -2
- package/lib/{errors-BTpjwHS6.js.map → errors-D7xzOd8X.js.map} +1 -1
- package/lib/{index-Bvas0H4x.js → index-CF7_erXq.js} +2 -2
- package/lib/{index-Bvas0H4x.js.map → index-CF7_erXq.js.map} +1 -1
- package/lib/{index-FNRZUtwo.js → index-CPws05Tb.js} +3 -3
- package/lib/{index-FNRZUtwo.js.map → index-CPws05Tb.js.map} +1 -1
- package/lib/index-I4zC7Yht.js +3680 -0
- package/lib/index-I4zC7Yht.js.map +1 -0
- package/lib/ui/ActionButton.js +1 -1
- package/lib/ui/Badge.js +27 -13
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Button.js +6 -5
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Checkbox.js +29 -26
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +7 -7
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Collapsible.js +32 -5
- package/lib/ui/Collapsible.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +19 -18
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Frame.js +81 -0
- package/lib/ui/Frame.js.map +1 -0
- package/lib/ui/Item.js +188 -0
- package/lib/ui/Item.js.map +1 -0
- package/lib/ui/NativeSelect.js +57 -0
- package/lib/ui/NativeSelect.js.map +1 -0
- package/lib/ui/Select.js +166 -116
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Tabs.js +10 -10
- package/lib/zudoku.__internal.js +345 -345
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +7 -7
- package/lib/zudoku.auth-auth0.js.map +1 -1
- 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 +3 -3
- package/lib/zudoku.components.js +2 -2
- package/lib/zudoku.plugin-api-catalog.js +3 -3
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +2 -2
- package/package.json +4 -4
- package/src/app/main.tsx +5 -1
- package/src/lib/authentication/providers/auth0.tsx +6 -1
- package/src/lib/components/Autocomplete.tsx +11 -2
- package/src/lib/components/Layout.tsx +3 -2
- package/src/lib/components/navigation/NavigationItem.tsx +7 -20
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/errors/RouterError.tsx +7 -2
- package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +3 -1
- package/src/lib/plugins/openapi/OperationListItem.tsx +7 -7
- package/src/lib/plugins/openapi/ParameterList.tsx +37 -23
- package/src/lib/plugins/openapi/ParameterListItem.tsx +105 -54
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +36 -13
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +67 -44
- package/src/lib/plugins/openapi/Sidecar.tsx +84 -41
- package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
- package/src/lib/plugins/openapi/SidecarExamples.tsx +59 -37
- package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
- package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
- package/src/lib/plugins/openapi/interfaces.ts +12 -0
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +246 -30
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -2
- package/src/lib/plugins/openapi/playground/Headers.tsx +103 -219
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
- package/src/lib/plugins/openapi/playground/Playground.tsx +73 -35
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +9 -30
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +82 -136
- package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
- package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +2 -6
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +89 -52
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +82 -48
- package/src/lib/plugins/openapi/schema/UnionView.tsx +6 -17
- package/src/lib/ui/Badge.tsx +21 -12
- package/src/lib/ui/Button.tsx +1 -0
- package/src/lib/ui/Checkbox.tsx +23 -24
- package/src/lib/ui/CodeBlock.tsx +3 -3
- package/src/lib/ui/Collapsible.tsx +26 -4
- package/src/lib/ui/EmbeddedCodeBlock.tsx +21 -18
- package/src/lib/ui/Frame.tsx +81 -0
- package/src/lib/ui/Item.tsx +192 -0
- package/src/lib/ui/NativeSelect.tsx +47 -0
- package/src/lib/ui/Select.tsx +153 -126
- package/src/lib/util/readFrontmatter.ts +13 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
- package/lib/Button-DmS4u8Lj.js.map +0 -1
- package/lib/ErrorAlert--3alJ_-b.js.map +0 -1
- package/lib/OperationList-DLEAg4qw.js.map +0 -1
- package/lib/RouterError-DZS2d6Sc.js +0 -41
- package/lib/RouterError-DZS2d6Sc.js.map +0 -1
- package/lib/SchemaView-DJiBd0_5.js +0 -397
- package/lib/SchemaView-DJiBd0_5.js.map +0 -1
- package/lib/Select-C1DeCqKv.js +0 -372
- package/lib/Select-C1DeCqKv.js.map +0 -1
- package/lib/circular-DGfd8SGc.js.map +0 -1
- package/lib/createServer-DGD8hEzT.js.map +0 -1
- package/lib/index-DP1xZgfJ.js +0 -3364
- package/lib/index-DP1xZgfJ.js.map +0 -1
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
import { cn } from "../util/cn.js";
|
|
5
|
+
import { Separator } from "./Separator.js";
|
|
6
|
+
|
|
7
|
+
function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
role="list"
|
|
11
|
+
data-slot="item-group"
|
|
12
|
+
className={cn("group/item-group flex flex-col", className)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function ItemSeparator({
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<typeof Separator>) {
|
|
22
|
+
return (
|
|
23
|
+
<Separator
|
|
24
|
+
data-slot="item-separator"
|
|
25
|
+
orientation="horizontal"
|
|
26
|
+
className={cn("my-0", className)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const itemVariants = cva(
|
|
33
|
+
"group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
34
|
+
{
|
|
35
|
+
variants: {
|
|
36
|
+
variant: {
|
|
37
|
+
default: "bg-transparent",
|
|
38
|
+
outline: "border-border",
|
|
39
|
+
muted: "bg-muted/50",
|
|
40
|
+
},
|
|
41
|
+
size: {
|
|
42
|
+
default: "p-4 gap-4 ",
|
|
43
|
+
sm: "py-3 px-4 gap-2.5",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
variant: "default",
|
|
48
|
+
size: "default",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
function Item({
|
|
54
|
+
className,
|
|
55
|
+
variant = "default",
|
|
56
|
+
size = "default",
|
|
57
|
+
asChild = false,
|
|
58
|
+
...props
|
|
59
|
+
}: React.ComponentProps<"div"> &
|
|
60
|
+
VariantProps<typeof itemVariants> & { asChild?: boolean }) {
|
|
61
|
+
const Comp = asChild ? Slot : "div";
|
|
62
|
+
return (
|
|
63
|
+
<Comp
|
|
64
|
+
data-slot="item"
|
|
65
|
+
data-variant={variant}
|
|
66
|
+
data-size={size}
|
|
67
|
+
className={cn(itemVariants({ variant, size, className }))}
|
|
68
|
+
{...props}
|
|
69
|
+
/>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const itemMediaVariants = cva(
|
|
74
|
+
"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5",
|
|
75
|
+
{
|
|
76
|
+
variants: {
|
|
77
|
+
variant: {
|
|
78
|
+
default: "bg-transparent",
|
|
79
|
+
icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
80
|
+
image:
|
|
81
|
+
"size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
defaultVariants: {
|
|
85
|
+
variant: "default",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
function ItemMedia({
|
|
91
|
+
className,
|
|
92
|
+
variant = "default",
|
|
93
|
+
...props
|
|
94
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>) {
|
|
95
|
+
return (
|
|
96
|
+
<div
|
|
97
|
+
data-slot="item-media"
|
|
98
|
+
data-variant={variant}
|
|
99
|
+
className={cn(itemMediaVariants({ variant, className }))}
|
|
100
|
+
{...props}
|
|
101
|
+
/>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function ItemContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
106
|
+
return (
|
|
107
|
+
<div
|
|
108
|
+
data-slot="item-content"
|
|
109
|
+
className={cn(
|
|
110
|
+
"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
|
|
111
|
+
className,
|
|
112
|
+
)}
|
|
113
|
+
{...props}
|
|
114
|
+
/>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function ItemTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
119
|
+
return (
|
|
120
|
+
<div
|
|
121
|
+
data-slot="item-title"
|
|
122
|
+
className={cn(
|
|
123
|
+
"flex w-fit items-center gap-2 text-sm leading-snug font-medium",
|
|
124
|
+
className,
|
|
125
|
+
)}
|
|
126
|
+
{...props}
|
|
127
|
+
/>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
132
|
+
return (
|
|
133
|
+
<p
|
|
134
|
+
data-slot="item-description"
|
|
135
|
+
className={cn(
|
|
136
|
+
"text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
|
|
137
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
138
|
+
className,
|
|
139
|
+
)}
|
|
140
|
+
{...props}
|
|
141
|
+
/>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function ItemActions({ className, ...props }: React.ComponentProps<"div">) {
|
|
146
|
+
return (
|
|
147
|
+
<div
|
|
148
|
+
data-slot="item-actions"
|
|
149
|
+
className={cn("flex items-center gap-2", className)}
|
|
150
|
+
{...props}
|
|
151
|
+
/>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function ItemHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
156
|
+
return (
|
|
157
|
+
<div
|
|
158
|
+
data-slot="item-header"
|
|
159
|
+
className={cn(
|
|
160
|
+
"flex basis-full items-center justify-between gap-2",
|
|
161
|
+
className,
|
|
162
|
+
)}
|
|
163
|
+
{...props}
|
|
164
|
+
/>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
169
|
+
return (
|
|
170
|
+
<div
|
|
171
|
+
data-slot="item-footer"
|
|
172
|
+
className={cn(
|
|
173
|
+
"flex basis-full items-center justify-between gap-2",
|
|
174
|
+
className,
|
|
175
|
+
)}
|
|
176
|
+
{...props}
|
|
177
|
+
/>
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export {
|
|
182
|
+
Item,
|
|
183
|
+
ItemMedia,
|
|
184
|
+
ItemContent,
|
|
185
|
+
ItemActions,
|
|
186
|
+
ItemGroup,
|
|
187
|
+
ItemSeparator,
|
|
188
|
+
ItemTitle,
|
|
189
|
+
ItemDescription,
|
|
190
|
+
ItemHeader,
|
|
191
|
+
ItemFooter,
|
|
192
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
import { cn } from "../util/cn.js";
|
|
4
|
+
|
|
5
|
+
function NativeSelect({ className, ...props }: React.ComponentProps<"select">) {
|
|
6
|
+
return (
|
|
7
|
+
<div
|
|
8
|
+
className="group/native-select relative w-fit has-[select:disabled]:opacity-50"
|
|
9
|
+
data-slot="native-select-wrapper"
|
|
10
|
+
>
|
|
11
|
+
<select
|
|
12
|
+
data-slot="native-select"
|
|
13
|
+
className={cn(
|
|
14
|
+
"border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 appearance-none rounded-md border bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed",
|
|
15
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
16
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
<ChevronDownIcon
|
|
22
|
+
className="text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50 select-none"
|
|
23
|
+
aria-hidden="true"
|
|
24
|
+
data-slot="native-select-icon"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function NativeSelectOption({ ...props }: React.ComponentProps<"option">) {
|
|
31
|
+
return <option data-slot="native-select-option" {...props} />;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function NativeSelectOptGroup({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: React.ComponentProps<"optgroup">) {
|
|
38
|
+
return (
|
|
39
|
+
<optgroup
|
|
40
|
+
data-slot="native-select-optgroup"
|
|
41
|
+
className={cn(className)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
package/src/lib/ui/Select.tsx
CHANGED
|
@@ -1,147 +1,174 @@
|
|
|
1
1
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2
|
-
import {
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { cn } from "
|
|
2
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
import { cn } from "./util.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function Select({
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
9
|
+
return <SelectPrimitive.Root data-slot="select" {...props} />;
|
|
10
|
+
}
|
|
7
11
|
|
|
8
|
-
|
|
12
|
+
function SelectGroup({
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
15
|
+
return <SelectPrimitive.Group data-slot="select-group" {...props} />;
|
|
16
|
+
}
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
function SelectValue({
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
21
|
+
return <SelectPrimitive.Value data-slot="select-value" {...props} />;
|
|
22
|
+
}
|
|
11
23
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<span className="truncate">{children}</span>
|
|
25
|
-
<SelectPrimitive.Icon asChild>
|
|
26
|
-
<ChevronDown className="shrink-0 h-4 w-4 opacity-50" />
|
|
27
|
-
</SelectPrimitive.Icon>
|
|
28
|
-
</SelectPrimitive.Trigger>
|
|
29
|
-
));
|
|
30
|
-
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
31
|
-
|
|
32
|
-
const SelectScrollUpButton = React.forwardRef<
|
|
33
|
-
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
|
34
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
|
|
35
|
-
>(({ className, ...props }, ref) => (
|
|
36
|
-
<SelectPrimitive.ScrollUpButton
|
|
37
|
-
ref={ref}
|
|
38
|
-
className={cn(
|
|
39
|
-
"flex cursor-default items-center justify-center py-1",
|
|
40
|
-
className,
|
|
41
|
-
)}
|
|
42
|
-
{...props}
|
|
43
|
-
>
|
|
44
|
-
<ChevronUp className="h-4 w-4" />
|
|
45
|
-
</SelectPrimitive.ScrollUpButton>
|
|
46
|
-
));
|
|
47
|
-
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
48
|
-
|
|
49
|
-
const SelectScrollDownButton = React.forwardRef<
|
|
50
|
-
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
|
51
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
|
|
52
|
-
>(({ className, ...props }, ref) => (
|
|
53
|
-
<SelectPrimitive.ScrollDownButton
|
|
54
|
-
ref={ref}
|
|
55
|
-
className={cn(
|
|
56
|
-
"flex cursor-default items-center justify-center py-1",
|
|
57
|
-
className,
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
>
|
|
61
|
-
<ChevronDown className="h-4 w-4" />
|
|
62
|
-
</SelectPrimitive.ScrollDownButton>
|
|
63
|
-
));
|
|
64
|
-
SelectScrollDownButton.displayName =
|
|
65
|
-
SelectPrimitive.ScrollDownButton.displayName;
|
|
66
|
-
|
|
67
|
-
const SelectContent = React.forwardRef<
|
|
68
|
-
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
69
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
|
|
70
|
-
>(({ className, children, position = "popper", ...props }, ref) => (
|
|
71
|
-
<SelectPrimitive.Portal>
|
|
72
|
-
<SelectPrimitive.Content
|
|
73
|
-
ref={ref}
|
|
24
|
+
function SelectTrigger({
|
|
25
|
+
className,
|
|
26
|
+
size = "default",
|
|
27
|
+
children,
|
|
28
|
+
...props
|
|
29
|
+
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
30
|
+
size?: "sm" | "default";
|
|
31
|
+
}) {
|
|
32
|
+
return (
|
|
33
|
+
<SelectPrimitive.Trigger
|
|
34
|
+
data-slot="select-trigger"
|
|
35
|
+
data-size={size}
|
|
74
36
|
className={cn(
|
|
75
|
-
"
|
|
76
|
-
position === "popper" &&
|
|
77
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
37
|
+
"border-input data-placeholder:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
78
38
|
className,
|
|
79
39
|
)}
|
|
80
|
-
position={position}
|
|
81
40
|
{...props}
|
|
82
41
|
>
|
|
83
|
-
|
|
84
|
-
<SelectPrimitive.
|
|
42
|
+
{children}
|
|
43
|
+
<SelectPrimitive.Icon asChild>
|
|
44
|
+
<ChevronDownIcon className="size-4 opacity-50" />
|
|
45
|
+
</SelectPrimitive.Icon>
|
|
46
|
+
</SelectPrimitive.Trigger>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function SelectContent({
|
|
51
|
+
className,
|
|
52
|
+
children,
|
|
53
|
+
position = "popper",
|
|
54
|
+
align = "center",
|
|
55
|
+
...props
|
|
56
|
+
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
57
|
+
return (
|
|
58
|
+
<SelectPrimitive.Portal>
|
|
59
|
+
<SelectPrimitive.Content
|
|
60
|
+
data-slot="select-content"
|
|
85
61
|
className={cn(
|
|
62
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
86
63
|
position === "popper" &&
|
|
87
|
-
"
|
|
88
|
-
|
|
64
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
65
|
+
className,
|
|
89
66
|
)}
|
|
67
|
+
position={position}
|
|
68
|
+
align={align}
|
|
69
|
+
{...props}
|
|
90
70
|
>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
))
|
|
97
|
-
|
|
71
|
+
<SelectScrollUpButton />
|
|
72
|
+
<SelectPrimitive.Viewport
|
|
73
|
+
className={cn(
|
|
74
|
+
"p-1",
|
|
75
|
+
position === "popper" &&
|
|
76
|
+
"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1",
|
|
77
|
+
)}
|
|
78
|
+
>
|
|
79
|
+
{children}
|
|
80
|
+
</SelectPrimitive.Viewport>
|
|
81
|
+
<SelectScrollDownButton />
|
|
82
|
+
</SelectPrimitive.Content>
|
|
83
|
+
</SelectPrimitive.Portal>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function SelectLabel({
|
|
88
|
+
className,
|
|
89
|
+
...props
|
|
90
|
+
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
91
|
+
return (
|
|
92
|
+
<SelectPrimitive.Label
|
|
93
|
+
data-slot="select-label"
|
|
94
|
+
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
))
|
|
109
|
-
|
|
100
|
+
function SelectItem({
|
|
101
|
+
className,
|
|
102
|
+
children,
|
|
103
|
+
...props
|
|
104
|
+
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
105
|
+
return (
|
|
106
|
+
<SelectPrimitive.Item
|
|
107
|
+
data-slot="select-item"
|
|
108
|
+
className={cn(
|
|
109
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
110
|
+
className,
|
|
111
|
+
)}
|
|
112
|
+
{...props}
|
|
113
|
+
>
|
|
114
|
+
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
115
|
+
<SelectPrimitive.ItemIndicator>
|
|
116
|
+
<CheckIcon className="size-4" />
|
|
117
|
+
</SelectPrimitive.ItemIndicator>
|
|
118
|
+
</span>
|
|
119
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
120
|
+
</SelectPrimitive.Item>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
110
123
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
124
|
-
<SelectPrimitive.ItemIndicator>
|
|
125
|
-
<Check className="h-4 w-4" />
|
|
126
|
-
</SelectPrimitive.ItemIndicator>
|
|
127
|
-
</span>
|
|
124
|
+
function SelectSeparator({
|
|
125
|
+
className,
|
|
126
|
+
...props
|
|
127
|
+
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
128
|
+
return (
|
|
129
|
+
<SelectPrimitive.Separator
|
|
130
|
+
data-slot="select-separator"
|
|
131
|
+
className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
|
|
132
|
+
{...props}
|
|
133
|
+
/>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
128
136
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
137
|
+
function SelectScrollUpButton({
|
|
138
|
+
className,
|
|
139
|
+
...props
|
|
140
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
141
|
+
return (
|
|
142
|
+
<SelectPrimitive.ScrollUpButton
|
|
143
|
+
data-slot="select-scroll-up-button"
|
|
144
|
+
className={cn(
|
|
145
|
+
"flex cursor-default items-center justify-center py-1",
|
|
146
|
+
className,
|
|
147
|
+
)}
|
|
148
|
+
{...props}
|
|
149
|
+
>
|
|
150
|
+
<ChevronUpIcon className="size-4" />
|
|
151
|
+
</SelectPrimitive.ScrollUpButton>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
133
154
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
155
|
+
function SelectScrollDownButton({
|
|
156
|
+
className,
|
|
157
|
+
...props
|
|
158
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
159
|
+
return (
|
|
160
|
+
<SelectPrimitive.ScrollDownButton
|
|
161
|
+
data-slot="select-scroll-down-button"
|
|
162
|
+
className={cn(
|
|
163
|
+
"flex cursor-default items-center justify-center py-1",
|
|
164
|
+
className,
|
|
165
|
+
)}
|
|
166
|
+
{...props}
|
|
167
|
+
>
|
|
168
|
+
<ChevronDownIcon className="size-4" />
|
|
169
|
+
</SelectPrimitive.ScrollDownButton>
|
|
170
|
+
);
|
|
171
|
+
}
|
|
145
172
|
|
|
146
173
|
export {
|
|
147
174
|
Select,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import matter from "gray-matter";
|
|
3
|
+
import { parse, stringify } from "yaml";
|
|
4
|
+
|
|
5
|
+
export const yaml = {
|
|
6
|
+
parse: (input: string) => parse(input) ?? {},
|
|
7
|
+
stringify: (obj: object) => stringify(obj),
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const readFrontmatter = async (filePath: string) => {
|
|
11
|
+
const content = await readFile(filePath, "utf-8");
|
|
12
|
+
return matter(content, { engines: { yaml } });
|
|
13
|
+
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const InlineInput: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
2
|
-
className?: import("clsx").ClassValue;
|
|
3
|
-
asChild?: boolean;
|
|
4
|
-
}, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InlineInput.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/playground/InlineInput.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,WAAW,GAAG,sBAAsB,CAC/C,OAAO,EACP,sCAAsC,CACvC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button-DmS4u8Lj.js","sources":["../src/lib/ui/Button.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type 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 shrink-0 items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden 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-sm hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n \"ghost-destructive\":\n \"text-destructive hover:bg-destructive hover:text-destructive-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n expand:\n \"flex gap-1.5 border bg-transparent rounded-xl text-muted-foreground hover:text-foreground\",\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: \"size-9\",\n \"icon-xs\": \"size-7\",\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,qBACE;AAAA,QACF,MAAM;AAAA,QACN,QACE;AAAA,MAAA;AAAA,MAEJ,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,MAAA;AAAA,IACb;AAAA,IAEF,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,EAAA,GAASC,MAAQ;AAChE,UAAMC,IAAOH,IAAUI,IAAO;AAC9B,WACEC,gBAAAA,EAAAA;AAAAA,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,IAAA;AAAA,EAGV;AACF;AACAN,EAAO,cAAc;"}
|