git0 0.3.17 → 0.3.19
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/docs/README.md +20 -0
- package/docs/app/(home)/docs-home.css +235 -0
- package/docs/app/(home)/layout.tsx +12 -0
- package/docs/app/(home)/page.tsx +27 -0
- package/docs/app/docs/[[...slug]]/page.tsx +84 -0
- package/docs/app/docs/api/docs-search/route.ts +11 -0
- package/docs/app/docs/layout.tsx +16 -0
- package/docs/app/docs/llms-full.txt/route.ts +15 -0
- package/docs/app/docs/llms.mdx/docs/[[...slug]]/route.ts +24 -0
- package/docs/app/globals.css +814 -0
- package/docs/app/layout.config.tsx +32 -0
- package/docs/app/layout.tsx +22 -0
- package/docs/app/provider.tsx +20 -0
- package/docs/cli.json +11 -0
- package/docs/components/DocsHomepage/code-example.tsx +123 -0
- package/docs/components/DocsHomepage/features-grid.tsx +92 -0
- package/docs/components/DocsHomepage/footer.tsx +58 -0
- package/docs/components/DocsHomepage/hero-section.tsx +114 -0
- package/docs/components/DocsHomepage/project-types.tsx +114 -0
- package/docs/components/fumadocs/ai/ask-ai-dropdown.tsx +299 -0
- package/docs/components/fumadocs/ai/llm-copy-button.tsx +61 -0
- package/docs/components/fumadocs/api/api-page.client.tsx +7 -0
- package/docs/components/fumadocs/api/api-page.tsx +7 -0
- package/docs/components/fumadocs/layout/breadcrumb.tsx +36 -0
- package/docs/components/fumadocs/layout/search.tsx +55 -0
- package/docs/components/fumadocs/layout/theme-dropdown.tsx +3 -0
- package/docs/components/fumadocs/layout/theme-provider.tsx +15 -0
- package/docs/components/fumadocs/layout/theme-toggle.tsx +40 -0
- package/docs/components/ui/badge.tsx +50 -0
- package/docs/components/ui/button.tsx +66 -0
- package/docs/components/ui/collapsible.tsx +44 -0
- package/docs/components/ui/slider.tsx +36 -0
- package/docs/components/ui/tooltip.tsx +63 -0
- package/docs/components/ui/video-modal.tsx +238 -0
- package/docs/content/docs/fm.mdx +11 -0
- package/{docs-config/src/functions/git0.md → docs/content/docs/git0.mdx} +4 -1
- package/{docs-config/src/functions/github-api.md → docs/content/docs/github-api.mdx} +4 -1
- package/{docs-config/src/functions/index.md → docs/content/docs/index.mdx} +9 -14
- package/docs/content/docs/meta.json +15 -0
- package/docs/content/docs/modules.mdx +10 -0
- package/docs/lib/fumadocs/customize-docs.ts +47 -0
- package/docs/lib/fumadocs/generate-api-docs.ts +73 -0
- package/docs/lib/fumadocs/source.tsx +50 -0
- package/docs/lib/utils.ts +10 -0
- package/docs/mdx-components.tsx +21 -0
- package/docs/next-env.d.ts +7 -0
- package/docs/next.config.ts +35 -0
- package/docs/package.json +61 -0
- package/docs/postcss.config.mjs +5 -0
- package/docs/public/apple-touch-icon.png +0 -0
- package/docs/public/favicon-192.png +0 -0
- package/docs/public/favicon-512.png +0 -0
- package/docs/public/favicon.ico +0 -0
- package/docs/public/manifest.webmanifest +14 -0
- package/docs/source.config.ts +29 -0
- package/docs/tsconfig.json +50 -0
- package/docs/vite.config.ts +2 -0
- package/docs/wrangler.jsonc +13 -0
- package/package.json +3 -2
- package/docs/404.html +0 -26
- package/docs/CNAME +0 -1
- package/docs/Footer/index.html +0 -26
- package/docs/assets/css/styles.3dd00f8d.css +0 -1
- package/docs/assets/js/17896441.79ceefeb.js +0 -1
- package/docs/assets/js/1df93b7f.1385eba0.js +0 -2
- package/docs/assets/js/1df93b7f.1385eba0.js.LICENSE.txt +0 -6
- package/docs/assets/js/22dd74f7.e13ac7a4.js +0 -1
- package/docs/assets/js/237.daf7efdf.js +0 -1
- package/docs/assets/js/278.1628756c.js +0 -1
- package/docs/assets/js/28ab763d.192aa3bb.js +0 -1
- package/docs/assets/js/299d276b.c9496717.js +0 -1
- package/docs/assets/js/577.78325c02.js +0 -1
- package/docs/assets/js/591.2156b33d.js +0 -2
- package/docs/assets/js/591.2156b33d.js.LICENSE.txt +0 -61
- package/docs/assets/js/5e95c892.bd6c1093.js +0 -1
- package/docs/assets/js/68cef36b.e5b1975b.js +0 -1
- package/docs/assets/js/a7456010.3054873b.js +0 -1
- package/docs/assets/js/a7bd4aaa.87229397.js +0 -1
- package/docs/assets/js/a94703ab.6d39a596.js +0 -1
- package/docs/assets/js/a9cef9d5.a7253e41.js +0 -1
- package/docs/assets/js/aba21aa0.dfebd789.js +0 -1
- package/docs/assets/js/ac46717f.32345167.js +0 -2
- package/docs/assets/js/ac46717f.32345167.js.LICENSE.txt +0 -6
- package/docs/assets/js/c3a618e1.1c56fb03.js +0 -590
- package/docs/assets/js/main.1f646b09.js +0 -2
- package/docs/assets/js/main.1f646b09.js.LICENSE.txt +0 -68
- package/docs/assets/js/runtime~main.f69f8f44.js +0 -1
- package/docs/functions/fm/index.html +0 -26
- package/docs/functions/git0/index.html +0 -48
- package/docs/functions/github-api/index.html +0 -149
- package/docs/functions/index.html +0 -891
- package/docs/functions/modules/index.html +0 -31
- package/docs/index.html +0 -26
- package/docs/lunr-index-1749760982052.json +0 -1
- package/docs/lunr-index.json +0 -1
- package/docs/search-doc-1749760982052.json +0 -1
- package/docs/search-doc.json +0 -1
- package/docs/sitemap.xml +0 -1
- package/docs-config/.docusaurus/DONT-EDIT-THIS-FOLDER +0 -5
- package/docs-config/.docusaurus/client-manifest.json +0 -271
- package/docs-config/.docusaurus/client-modules.js +0 -8
- package/docs-config/.docusaurus/codeTranslations.json +0 -1
- package/docs-config/.docusaurus/docusaurus-lunr-search/default/__plugin.json +0 -4
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/__mdx-loader-dependency.json +0 -1
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/__plugin.json +0 -4
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/p/docs-175.json +0 -1
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/p/index-466.json +0 -1
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-fm-md-a9c.json +0 -19
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-git-0-1-md-d3e.json +0 -19
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-git-0-md-299.json +0 -23
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-github-api-md-28a.json +0 -23
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-globals-md-4a8.json +0 -19
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-index-md-c3a.json +0 -23
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-modules-md-68c.json +0 -19
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-index-md-d14.json +0 -21
- package/docs-config/.docusaurus/docusaurus-plugin-content-pages/default/__plugin.json +0 -4
- package/docs-config/.docusaurus/docusaurus-plugin-google-gtag/default/__plugin.json +0 -4
- package/docs-config/.docusaurus/docusaurus.config.mjs +0 -378
- package/docs-config/.docusaurus/globalData.json +0 -70
- package/docs-config/.docusaurus/i18n.json +0 -17
- package/docs-config/.docusaurus/lunr.client.js +0 -5
- package/docs-config/.docusaurus/registry.js +0 -16
- package/docs-config/.docusaurus/routes.js +0 -67
- package/docs-config/.docusaurus/routesChunkNames.json +0 -49
- package/docs-config/.docusaurus/site-metadata.json +0 -51
- package/docs-config/.docusaurus/site-storage.json +0 -4
- package/docs-config/config/customize-docs.js +0 -31
- package/docs-config/config/docs-theme.css +0 -358
- package/docs-config/config/openapi.mustache +0 -39
- package/docs-config/config/sidebars.ts +0 -21
- package/docs-config/config/typedoc.json +0 -40
- package/docs-config/docusaurus.config.ts +0 -341
- package/docs-config/package.json +0 -40
- package/docs-config/src/functions/fm.md +0 -1
- package/docs-config/src/functions/modules.md +0 -5
- package/docs-config/src/functions/typedoc-sidebar.cjs +0 -22
- package/docs-config/src/pages/Footer.tsx +0 -67
- package/docs-config/src/pages/index.tsx +0 -433
- package/docs-config/static/CNAME +0 -1
- package/docs-config/tsconfig.json +0 -27
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file collapsible.tsx
|
|
3
|
+
* @description Collapsible component for hiding/showing content, built with Radix UI.
|
|
4
|
+
*/
|
|
5
|
+
// @ts-nocheck - Radix UI types incompatible with React 19 children prop
|
|
6
|
+
'use client';
|
|
7
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
8
|
+
import React, { forwardRef, useEffect, useState } from 'react';
|
|
9
|
+
import { cn } from '@/lib/utils';
|
|
10
|
+
|
|
11
|
+
const Collapsible = CollapsiblePrimitive.Root as any;
|
|
12
|
+
|
|
13
|
+
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger as any;
|
|
14
|
+
|
|
15
|
+
const CollapsibleContent = forwardRef<
|
|
16
|
+
HTMLDivElement,
|
|
17
|
+
React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleContent>
|
|
18
|
+
>(({ children, ...props }, ref) => {
|
|
19
|
+
const [mounted, setMounted] = useState(false);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
setMounted(true);
|
|
23
|
+
}, []);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<CollapsiblePrimitive.CollapsibleContent
|
|
27
|
+
ref={ref}
|
|
28
|
+
{...props}
|
|
29
|
+
className={cn(
|
|
30
|
+
'overflow-hidden',
|
|
31
|
+
mounted &&
|
|
32
|
+
'data-[state=closed]:animate-fd-collapsible-up data-[state=open]:animate-fd-collapsible-down',
|
|
33
|
+
props.className,
|
|
34
|
+
)}
|
|
35
|
+
>
|
|
36
|
+
{children}
|
|
37
|
+
</CollapsiblePrimitive.CollapsibleContent>
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
CollapsibleContent.displayName =
|
|
42
|
+
CollapsiblePrimitive.CollapsibleContent.displayName;
|
|
43
|
+
|
|
44
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
type SliderProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange" | "value"> & {
|
|
8
|
+
value?: number[]
|
|
9
|
+
onValueChange?: (value: number[]) => void
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const Slider = React.forwardRef<HTMLInputElement, SliderProps>(
|
|
13
|
+
({ className, value = [0], onValueChange, min = 0, max = 100, step = 1, ...props }, ref) => {
|
|
14
|
+
return (
|
|
15
|
+
<input
|
|
16
|
+
ref={ref}
|
|
17
|
+
type="range"
|
|
18
|
+
min={min}
|
|
19
|
+
max={max}
|
|
20
|
+
step={step}
|
|
21
|
+
value={value[0] ?? 0}
|
|
22
|
+
onChange={(event) => onValueChange?.([Number(event.target.value)])}
|
|
23
|
+
className={cn(
|
|
24
|
+
"h-2 w-full cursor-pointer appearance-none rounded-full bg-slate-800 accent-sky-400",
|
|
25
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950",
|
|
26
|
+
className,
|
|
27
|
+
)}
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
)
|
|
31
|
+
},
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
Slider.displayName = "Slider"
|
|
35
|
+
|
|
36
|
+
export { Slider }
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// @ts-nocheck - Radix UI types incompatible with React 19 children prop
|
|
2
|
+
"use client"
|
|
3
|
+
|
|
4
|
+
import * as React from "react"
|
|
5
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
6
|
+
|
|
7
|
+
import { cn } from "@/lib/utils"
|
|
8
|
+
|
|
9
|
+
function TooltipProvider({
|
|
10
|
+
delayDuration = 0,
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
13
|
+
return (
|
|
14
|
+
<TooltipPrimitive.Provider
|
|
15
|
+
data-slot="tooltip-provider"
|
|
16
|
+
delayDuration={delayDuration}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function Tooltip({
|
|
23
|
+
...props
|
|
24
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
25
|
+
return (
|
|
26
|
+
<TooltipProvider>
|
|
27
|
+
<TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
28
|
+
</TooltipProvider>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function TooltipTrigger({
|
|
33
|
+
children,
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger> & { children?: React.ReactNode }) {
|
|
36
|
+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props}>{children}</TooltipPrimitive.Trigger>
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function TooltipContent({
|
|
40
|
+
className,
|
|
41
|
+
sideOffset = 4,
|
|
42
|
+
children,
|
|
43
|
+
...props
|
|
44
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
45
|
+
return (
|
|
46
|
+
<TooltipPrimitive.Portal>
|
|
47
|
+
<TooltipPrimitive.Content
|
|
48
|
+
data-slot="tooltip-content"
|
|
49
|
+
sideOffset={sideOffset}
|
|
50
|
+
className={cn(
|
|
51
|
+
"bg-slate-950 border-slate-800 text-slate-100 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-xs shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
|
|
52
|
+
className
|
|
53
|
+
)}
|
|
54
|
+
{...props}
|
|
55
|
+
>
|
|
56
|
+
{children}
|
|
57
|
+
<TooltipPrimitive.Arrow className="fill-slate-950" />
|
|
58
|
+
</TooltipPrimitive.Content>
|
|
59
|
+
</TooltipPrimitive.Portal>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file video-modal.tsx
|
|
3
|
+
* @description Modal component specifically designed for playing video content.
|
|
4
|
+
*/
|
|
5
|
+
// @ts-nocheck - Radix UI types incompatible with React 19 children prop
|
|
6
|
+
'use client'
|
|
7
|
+
|
|
8
|
+
import * as React from 'react'
|
|
9
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog'
|
|
10
|
+
import { cn } from "@/lib/utils"
|
|
11
|
+
|
|
12
|
+
function VideoModal({
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
|
|
15
|
+
return <DialogPrimitive.Root data-slot="video-modal" {...props} />
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function VideoModalTrigger({
|
|
19
|
+
children,
|
|
20
|
+
...props
|
|
21
|
+
}: React.ComponentProps<typeof DialogPrimitive.Trigger> & { children?: React.ReactNode }) {
|
|
22
|
+
return <DialogPrimitive.Trigger data-slot="video-modal-trigger" {...props}>{children}</DialogPrimitive.Trigger>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function VideoModalPortal({
|
|
26
|
+
...props
|
|
27
|
+
}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
|
|
28
|
+
return <DialogPrimitive.Portal data-slot="video-modal-portal" {...props} />
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function VideoModalClose({
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<typeof DialogPrimitive.Close>) {
|
|
34
|
+
return <DialogPrimitive.Close data-slot="video-modal-close" {...props} />
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const VideoModalOverlay = React.forwardRef<
|
|
38
|
+
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
39
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
40
|
+
>(({ className, ...props }, ref) => (
|
|
41
|
+
<DialogPrimitive.Overlay
|
|
42
|
+
ref={ref}
|
|
43
|
+
className={cn(
|
|
44
|
+
'data-[state=closed]:animate-modal-fade-out data-[state=open]:animate-modal-fade-in fixed inset-0 z-50 backdrop-blur-xl',
|
|
45
|
+
className,
|
|
46
|
+
)}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
))
|
|
50
|
+
VideoModalOverlay.displayName = DialogPrimitive.Overlay.displayName
|
|
51
|
+
|
|
52
|
+
const VideoModalContent = React.forwardRef<
|
|
53
|
+
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
54
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
|
|
55
|
+
>(({ className, children, ...props }, ref) => (
|
|
56
|
+
<VideoModalPortal>
|
|
57
|
+
<VideoModalOverlay />
|
|
58
|
+
<DialogPrimitive.Content
|
|
59
|
+
ref={ref}
|
|
60
|
+
className={cn(
|
|
61
|
+
'fixed left-1/2 top-1/2 z-50 flex h-screen w-screen -translate-x-1/2 -translate-y-1/2 items-center justify-center p-3',
|
|
62
|
+
'data-[state=closed]:animate-modal-fade-out data-[state=open]:animate-modal-fade-in data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[50%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[50%] transition-all',
|
|
63
|
+
className,
|
|
64
|
+
)}
|
|
65
|
+
{...props}
|
|
66
|
+
>
|
|
67
|
+
<div className="relative mx-auto flex size-full items-center justify-center rounded-2xl border border-gray-950/[.1] bg-gray-50/[.2] dark:border-gray-50/[.1] dark:bg-gray-950/[.5]">
|
|
68
|
+
{/* Mobile close button */}
|
|
69
|
+
<CloseIcon isMobile />
|
|
70
|
+
|
|
71
|
+
<div className="flex h-4/5 w-full max-w-5xl gap-6">
|
|
72
|
+
{/* Desktop close button */}
|
|
73
|
+
<CloseIcon />
|
|
74
|
+
<div className="flex w-full flex-col max-lg:p-4 max-lg:text-center">
|
|
75
|
+
{children}
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</DialogPrimitive.Content>
|
|
80
|
+
</VideoModalPortal>
|
|
81
|
+
))
|
|
82
|
+
|
|
83
|
+
VideoModalContent.displayName = DialogPrimitive.Content.displayName
|
|
84
|
+
|
|
85
|
+
const VideoModalTitle = React.forwardRef<
|
|
86
|
+
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
87
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
88
|
+
>(({ className, ...props }, ref) => (
|
|
89
|
+
<DialogPrimitive.Title
|
|
90
|
+
ref={ref}
|
|
91
|
+
className={cn(
|
|
92
|
+
'mb-4 text-4xl font-bold text-gray-950 dark:text-gray-50',
|
|
93
|
+
className,
|
|
94
|
+
)}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
))
|
|
98
|
+
VideoModalTitle.displayName = DialogPrimitive.Title.displayName
|
|
99
|
+
|
|
100
|
+
const VideoModalDescription = React.forwardRef<
|
|
101
|
+
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
102
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
103
|
+
>(({ className, ...props }, ref) => (
|
|
104
|
+
<DialogPrimitive.Description
|
|
105
|
+
ref={ref}
|
|
106
|
+
className={cn(
|
|
107
|
+
'mb-6 text-xl text-gray-950/80 dark:text-gray-50/70',
|
|
108
|
+
className,
|
|
109
|
+
)}
|
|
110
|
+
{...props}
|
|
111
|
+
/>
|
|
112
|
+
))
|
|
113
|
+
VideoModalDescription.displayName = DialogPrimitive.Description.displayName
|
|
114
|
+
|
|
115
|
+
const VideoPreview = React.forwardRef<
|
|
116
|
+
HTMLDivElement,
|
|
117
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
118
|
+
>(({ className, children, ...props }, ref) => (
|
|
119
|
+
<div
|
|
120
|
+
ref={ref}
|
|
121
|
+
className={cn(
|
|
122
|
+
'absolute inset-0 z-10 transition-opacity duration-500 group-[.playing]:pointer-events-none group-[.playing]:opacity-0',
|
|
123
|
+
className,
|
|
124
|
+
)}
|
|
125
|
+
{...props}
|
|
126
|
+
>
|
|
127
|
+
{children}
|
|
128
|
+
</div>
|
|
129
|
+
))
|
|
130
|
+
VideoPreview.displayName = 'VideoPreview'
|
|
131
|
+
|
|
132
|
+
const VideoPlayButton = React.forwardRef<
|
|
133
|
+
HTMLDivElement,
|
|
134
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
135
|
+
>(({ className, children, ...props }, ref) => (
|
|
136
|
+
<div
|
|
137
|
+
ref={ref}
|
|
138
|
+
className={cn(
|
|
139
|
+
'absolute inset-0 z-20 flex items-center justify-center transition-opacity duration-300 group-[.playing]:pointer-events-none group-[.playing]:opacity-0',
|
|
140
|
+
className,
|
|
141
|
+
)}
|
|
142
|
+
{...props}
|
|
143
|
+
>
|
|
144
|
+
{children}
|
|
145
|
+
</div>
|
|
146
|
+
))
|
|
147
|
+
VideoPlayButton.displayName = 'VideoPlayButton'
|
|
148
|
+
|
|
149
|
+
const VideoPlayer = React.forwardRef<
|
|
150
|
+
HTMLDivElement,
|
|
151
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
152
|
+
>(({ className, children, ...props }, ref) => {
|
|
153
|
+
const [isPlaying, setIsPlaying] = React.useState(false)
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<div
|
|
157
|
+
ref={ref}
|
|
158
|
+
className={cn(
|
|
159
|
+
'group relative aspect-video max-w-4xl overflow-hidden rounded-xl border border-gray-950/[.1] object-cover dark:border-gray-50/[.1]',
|
|
160
|
+
isPlaying && 'playing',
|
|
161
|
+
className,
|
|
162
|
+
)}
|
|
163
|
+
onClick={() => setIsPlaying(true)}
|
|
164
|
+
{...props}
|
|
165
|
+
>
|
|
166
|
+
{children}
|
|
167
|
+
</div>
|
|
168
|
+
)
|
|
169
|
+
})
|
|
170
|
+
VideoPlayer.displayName = 'VideoPlayer'
|
|
171
|
+
|
|
172
|
+
const VideoModalVideo = React.forwardRef<
|
|
173
|
+
HTMLDivElement,
|
|
174
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
175
|
+
>(({ className, children, ...props }, ref) => (
|
|
176
|
+
<div
|
|
177
|
+
ref={ref}
|
|
178
|
+
className={cn(
|
|
179
|
+
'aspect-video max-w-4xl overflow-hidden rounded-xl border border-gray-950/[.1] object-cover shadow-xl dark:border-gray-50/[.1]',
|
|
180
|
+
className,
|
|
181
|
+
)}
|
|
182
|
+
{...props}
|
|
183
|
+
>
|
|
184
|
+
{children}
|
|
185
|
+
</div>
|
|
186
|
+
))
|
|
187
|
+
VideoModalVideo.displayName = 'VideoModalVideo'
|
|
188
|
+
|
|
189
|
+
const CloseIcon = React.forwardRef<
|
|
190
|
+
React.ElementRef<typeof VideoModalClose>,
|
|
191
|
+
React.ComponentPropsWithoutRef<typeof VideoModalClose> & {
|
|
192
|
+
isMobile?: boolean
|
|
193
|
+
}
|
|
194
|
+
>(({ className, isMobile = false, ...props }, ref) => (
|
|
195
|
+
<VideoModalClose
|
|
196
|
+
ref={ref}
|
|
197
|
+
className={cn(
|
|
198
|
+
'rounded-full border border-gray-950/[.1] bg-gray-950/[.01] p-2 transition duration-300 hover:bg-gray-950/[.05] dark:border-gray-50/[.1] dark:bg-gray-50/[.10] dark:hover:bg-gray-50/[.15]',
|
|
199
|
+
isMobile
|
|
200
|
+
? 'absolute right-4 top-4 lg:hidden'
|
|
201
|
+
: 'hidden self-start lg:block',
|
|
202
|
+
className,
|
|
203
|
+
)}
|
|
204
|
+
{...props}
|
|
205
|
+
>
|
|
206
|
+
<svg
|
|
207
|
+
fill="none"
|
|
208
|
+
height="12"
|
|
209
|
+
viewBox="0 0 12 12"
|
|
210
|
+
width="12"
|
|
211
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
212
|
+
>
|
|
213
|
+
<path
|
|
214
|
+
d="M1 1L11 11M11 1L1 11"
|
|
215
|
+
className="stroke-current"
|
|
216
|
+
strokeLinecap="round"
|
|
217
|
+
strokeLinejoin="round"
|
|
218
|
+
strokeWidth="1.5"
|
|
219
|
+
>
|
|
220
|
+
</path>
|
|
221
|
+
</svg>
|
|
222
|
+
<span className="sr-only">Close</span>
|
|
223
|
+
</VideoModalClose>
|
|
224
|
+
))
|
|
225
|
+
|
|
226
|
+
CloseIcon.displayName = 'CloseIcon'
|
|
227
|
+
|
|
228
|
+
export {
|
|
229
|
+
VideoModal,
|
|
230
|
+
VideoModalTrigger,
|
|
231
|
+
VideoModalContent,
|
|
232
|
+
VideoModalTitle,
|
|
233
|
+
VideoModalDescription,
|
|
234
|
+
VideoModalVideo,
|
|
235
|
+
VideoPreview,
|
|
236
|
+
VideoPlayButton,
|
|
237
|
+
VideoPlayer,
|
|
238
|
+
}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" />
|
|
11
|
-
<a href="https://codespaces.new/vtempest/git0"><img src="https://github.com/codespaces/badge.svg" width="150" height="20" /></a>
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
# Git0: Download Git Repo on Step Zero
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
description: Download Git Repo on Step Zero — search GitHub, download source & releases, install dependencies and open your editor.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/git0) [](https://discord.gg/SJdBqBz3tV) [](https://github.com/OpenSourceAGI/dev-tools-starter-agent) [](https://github.com/OpenSourceAGI/dev-tools-starter-agent/discussions) 
|
|
9
|
+
|
|
15
10
|
CLI tool to search GitHub repositories, download source & releases for your system, and instantly set up, then install dependencies and open code editor.
|
|
16
11
|
|
|
17
12
|
## 🚀 Installation
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file customize-docs.ts
|
|
3
|
+
* @description Documentation configuration object and types.
|
|
4
|
+
*/
|
|
5
|
+
export const docsConfig: DocsConfig = {
|
|
6
|
+
title: "git0",
|
|
7
|
+
description: "Download Git Repo on Step Zero — search GitHub, download source & releases, install and open in your editor.",
|
|
8
|
+
github: "https://github.com/OpenSourceAGI/dev-tools-starter-agent/tree/master/packages/git0-repo-downloader",
|
|
9
|
+
githubPackages: "https://github.com/OpenSourceAGI/dev-tools-starter-agent/tree/master/packages",
|
|
10
|
+
githubDocs:
|
|
11
|
+
"https://github.com/OpenSourceAGI/dev-tools-starter-agent/tree/master/packages/git0-repo-downloader/docs/content/docs",
|
|
12
|
+
favicon: "/favicon.ico",
|
|
13
|
+
topLinks: [
|
|
14
|
+
{
|
|
15
|
+
text: "Docs",
|
|
16
|
+
url: "/docs",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
text: "GitHub",
|
|
20
|
+
url: "https://github.com/OpenSourceAGI/dev-tools-starter-agent/tree/master/packages/git0-repo-downloader",
|
|
21
|
+
external: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export interface DocsConfig {
|
|
27
|
+
/** The title of the documentation site */
|
|
28
|
+
title?: string;
|
|
29
|
+
/** A short description of the project */
|
|
30
|
+
description?: string;
|
|
31
|
+
/** URL to the GitHub repository */
|
|
32
|
+
github?: string;
|
|
33
|
+
/** Base URL for editing the docs pages on GitHub */
|
|
34
|
+
githubDocs?: string;
|
|
35
|
+
/** Base URL for the packages directory on GitHub */
|
|
36
|
+
githubPackages?: string;
|
|
37
|
+
/** Path to the favicon */
|
|
38
|
+
favicon?: string;
|
|
39
|
+
/** Path to the OpenAPI specification file */
|
|
40
|
+
apiDocsPath?: string;
|
|
41
|
+
/** Links to be displayed in the navigation bar */
|
|
42
|
+
topLinks?: {
|
|
43
|
+
text: string;
|
|
44
|
+
url: string;
|
|
45
|
+
external?: boolean;
|
|
46
|
+
}[];
|
|
47
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file generate-api-docs.ts
|
|
3
|
+
* @description Script to generate API documentation files from an OpenAPI specification.
|
|
4
|
+
*/
|
|
5
|
+
import { generateFiles } from 'fumadocs-openapi';
|
|
6
|
+
import { createOpenAPI } from 'fumadocs-openapi/server';
|
|
7
|
+
import { rimraf } from 'rimraf';
|
|
8
|
+
import { existsSync } from 'fs';
|
|
9
|
+
import { docsConfig } from './customize-docs'
|
|
10
|
+
|
|
11
|
+
const out = 'content/docs/(api)';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
async function generate(openapiPath: string | undefined) {
|
|
15
|
+
// Validate file exists
|
|
16
|
+
if (!openapiPath || !existsSync(openapiPath)) {
|
|
17
|
+
console.error(`Error: OpenAPI file not found${openapiPath ? ` at "${openapiPath}"` : ''}`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Use relative path for glob resolution
|
|
22
|
+
console.log(`Generating API docs from: ${openapiPath}`);
|
|
23
|
+
|
|
24
|
+
// clean generated files
|
|
25
|
+
await rimraf(out, {
|
|
26
|
+
filter(v) {
|
|
27
|
+
return !v.endsWith('index.mdx') && !v.endsWith('meta.json');
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// Create OpenAPI instance (required for fumadocs-openapi v10+)
|
|
32
|
+
const openapi = createOpenAPI({
|
|
33
|
+
input: [openapiPath],
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
await generateFiles({
|
|
37
|
+
input: openapi,
|
|
38
|
+
output: out,
|
|
39
|
+
includeDescription: true,
|
|
40
|
+
|
|
41
|
+
// Or disable comments
|
|
42
|
+
addGeneratedComment: false,
|
|
43
|
+
frontmatter: (title, description) => ({
|
|
44
|
+
description: ''
|
|
45
|
+
}),
|
|
46
|
+
// index: {
|
|
47
|
+
// // for generating `href`
|
|
48
|
+
// url: {
|
|
49
|
+
// baseUrl: '/docs/api',
|
|
50
|
+
// contentDir: './content/docs/api',
|
|
51
|
+
// },
|
|
52
|
+
// items: [
|
|
53
|
+
// {
|
|
54
|
+
// path: 'api.mdx',
|
|
55
|
+
// description: 'All available pages',
|
|
56
|
+
// },
|
|
57
|
+
// ],
|
|
58
|
+
// },
|
|
59
|
+
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
console.log(`API documentation generated successfully in: ${out}`);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Parse command line arguments
|
|
66
|
+
const args = process.argv.slice(2);
|
|
67
|
+
|
|
68
|
+
const openapiPath = args[0] || docsConfig.apiDocsPath;
|
|
69
|
+
if (!openapiPath) {
|
|
70
|
+
console.error('Error: OpenAPI file path not provided');
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
void generate(openapiPath);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file source.tsx
|
|
3
|
+
* @description Fumadocs source loader configuration and page structure.
|
|
4
|
+
*/
|
|
5
|
+
import { docs } from 'fumadocs-mdx:collections/server'
|
|
6
|
+
import {
|
|
7
|
+
type InferMetaType,
|
|
8
|
+
type InferPageType,
|
|
9
|
+
type LoaderPlugin,
|
|
10
|
+
loader,
|
|
11
|
+
} from 'fumadocs-core/source'
|
|
12
|
+
import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons'
|
|
13
|
+
import { openapiPlugin } from 'fumadocs-openapi/server'
|
|
14
|
+
|
|
15
|
+
export const source = loader({
|
|
16
|
+
baseUrl: '/docs',
|
|
17
|
+
plugins: [pageTreeCodeTitles(), lucideIconsPlugin(), openapiPlugin()],
|
|
18
|
+
source: docs.toFumadocsSource(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
function pageTreeCodeTitles(): LoaderPlugin {
|
|
22
|
+
return {
|
|
23
|
+
transformPageTree: {
|
|
24
|
+
file(node) {
|
|
25
|
+
if (
|
|
26
|
+
typeof node.name === 'string' &&
|
|
27
|
+
(node.name.endsWith('()') || node.name.match(/^<\w+ \/>$/))
|
|
28
|
+
) {
|
|
29
|
+
return {
|
|
30
|
+
...node,
|
|
31
|
+
name: <code className='text-[0.8125rem]'>{node.name}</code>,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return node
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
export async function getLLMText(page: InferPageType<typeof source>) {
|
|
42
|
+
const processed = await page.data.getText('processed');
|
|
43
|
+
|
|
44
|
+
return `# ${page.data.title} (${page.url})
|
|
45
|
+
|
|
46
|
+
${processed}`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type Page = InferPageType<typeof source>
|
|
50
|
+
export type Meta = InferMetaType<typeof source>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file utils.ts
|
|
3
|
+
* @description General utility functions for the documentation site.
|
|
4
|
+
*/
|
|
5
|
+
import { clsx, type ClassValue } from 'clsx'
|
|
6
|
+
import { twMerge } from 'tailwind-merge'
|
|
7
|
+
|
|
8
|
+
export function cn(...inputs: ClassValue[]) {
|
|
9
|
+
return twMerge(clsx(inputs))
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
import * as TabsComponents from 'fumadocs-ui/components/tabs';
|
|
3
|
+
import { File, Folder, Files } from 'fumadocs-ui/components/files';
|
|
4
|
+
import defaultComponents from 'fumadocs-ui/mdx';
|
|
5
|
+
import { APIPage } from '@/components/fumadocs/api/api-page';
|
|
6
|
+
import type { MDXComponents } from 'mdx/types';
|
|
7
|
+
// make sure you can use it in MDX files
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export function getMDXComponents(components?: MDXComponents): MDXComponents {
|
|
11
|
+
return {
|
|
12
|
+
...TabsComponents,
|
|
13
|
+
...defaultComponents,
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
APIPage,
|
|
16
|
+
File,
|
|
17
|
+
Folder,
|
|
18
|
+
Files,
|
|
19
|
+
...components,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="next" />
|
|
2
|
+
/// <reference types="next/image-types/global" />
|
|
3
|
+
import "./.next/types/routes.d.ts";
|
|
4
|
+
import "./.next/types/root-params.d.ts";
|
|
5
|
+
|
|
6
|
+
// NOTE: This file should not be edited
|
|
7
|
+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|