Skip to content

Commit e9f7538

Browse files
committed
i fixed it????
1 parent 1b9d49f commit e9f7538

29 files changed

+100
-60
lines changed

packages/cli/src/templates/ts/tailwind-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const accentColor = config.style.accentColor;
1111

1212
export default {
1313
darkMode: 'class',
14-
content: ['./components/**/*.{js,ts,jsx,tsx,mdx}', './app/**/*.{js,ts,jsx,tsx,mdx}'],
14+
content: ['./doxium/**/*.{js,ts,jsx,tsx,mdx}', './app/**/*.{js,ts,jsx,tsx,mdx}'],
1515
theme: {
1616
extend: {
1717
colors: {

packages/cli/src/templates/tsx/accordion.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { cn } from 'doxium/utils';
66
import { FiChevronDown } from 'icons/fi';
77
import { Children, isValidElement, PropsWithChildren, ReactElement, ReactNode, useState } from 'react';
88

9-
export const Accordion = ({ children }: PropsWithChildren) => {
9+
const Accordion = ({ children }: PropsWithChildren) => {
1010
const groups = Children.toArray(children).reduce<ReactElement[][]>((acc, child) => {
1111
if (isValidElement(child) && (child.props as { variant: string }).variant === 'h3') {
1212
acc.push([child]);
@@ -66,3 +66,5 @@ export const Accordion = ({ children }: PropsWithChildren) => {
6666
</div>
6767
);
6868
};
69+
70+
export default Accordion;

packages/cli/src/templates/tsx/alert.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const getAlertIcon = (type: AlertProps['type']) => {
6666
}
6767
};
6868

69-
export const Alert = ({ type = 'accent', children, link, title }: React.PropsWithChildren<AlertProps>) => {
69+
const Alert = ({ type = 'accent', children, link, title }: React.PropsWithChildren<AlertProps>) => {
7070
return link ? (
7171
<a
7272
className={cn(
@@ -98,3 +98,5 @@ export const Alert = ({ type = 'accent', children, link, title }: React.PropsWit
9898
</span>
9999
);
100100
};
101+
102+
export default Alert;

packages/cli/src/templates/tsx/breadcrumbs.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interface BreadcrumbPath {
2222

2323
const rootBreadcrumb = config.rootBreadcrumb;
2424

25-
export const Breadcrumbs = ({ tree }: { tree: TreeNode[] }) => {
25+
const Breadcrumbs = ({ tree }: { tree: TreeNode[] }) => {
2626
const pathname = usePathname();
2727

2828
const findPathInTree = useCallback(
@@ -46,7 +46,7 @@ export const Breadcrumbs = ({ tree }: { tree: TreeNode[] }) => {
4646
}, [pathname, tree, findPathInTree]);
4747

4848
return (
49-
<Breadcrumb className='not-prose text mt-16 flex w-full md:mb-8 lg:mt-4 lg:mb-2'>
49+
<Breadcrumb className='not-prose text mt-16 flex w-full md:mb-8 lg:mb-2 lg:mt-4'>
5050
<BreadcrumbList>
5151
<BreadcrumbItem>
5252
<BreadcrumbLink asChild>
@@ -69,3 +69,5 @@ export const Breadcrumbs = ({ tree }: { tree: TreeNode[] }) => {
6969
</Breadcrumb>
7070
);
7171
};
72+
73+
export default Breadcrumbs;

packages/cli/src/templates/tsx/cmdk.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface CmdkProps extends DialogProps {
2121
tree: TreeNode[];
2222
}
2323

24-
export const Cmdk = ({ tree, ...props }: CmdkProps) => {
24+
const Cmdk = ({ tree, ...props }: CmdkProps) => {
2525
const [open, setOpen] = useState(false);
2626
const navigator = useRouter();
2727

@@ -62,7 +62,7 @@ export const Cmdk = ({ tree, ...props }: CmdkProps) => {
6262
>
6363
<span className='hidden xl:flex'>Search documentation...</span>
6464
<span className='flex text-xs xl:hidden'>Search</span>
65-
<kbd className='bg-base-200/50 dark:bg-base-700/50 ml-auto flex flex-row items-center -space-x-0.5 rounded-xs px-2 py-0.5 text-[10px] backdrop-blur-xs'>
65+
<kbd className='bg-base-200/50 dark:bg-base-700/50 rounded-xs backdrop-blur-xs ml-auto flex flex-row items-center -space-x-0.5 px-2 py-0.5 text-[10px]'>
6666
⌘ K
6767
</kbd>
6868
</Button>
@@ -116,3 +116,5 @@ export const Cmdk = ({ tree, ...props }: CmdkProps) => {
116116
</>
117117
);
118118
};
119+
120+
export default Cmdk;

packages/cli/src/templates/tsx/code-wrapper-icon.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface WikiCodeWrapperIconProps {
1515
name: string | undefined;
1616
}
1717

18-
export const WikiCodeWrapperIcon = ({ language, name }: WikiCodeWrapperIconProps) => {
18+
const WikiCodeWrapperIcon = ({ language, name }: WikiCodeWrapperIconProps) => {
1919
return (
2020
<>
2121
{getIcon(language).icon}
@@ -54,3 +54,5 @@ const getIcon = (language: string): WikiCodeWrapperIconReturn => {
5454
return { icon: <VscSymbolFile size={16} />, lang: 'File' };
5555
}
5656
};
57+
58+
export default WikiCodeWrapperIcon;

packages/cli/src/templates/tsx/code-wrapper.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
} from '@shikijs/transformers';
1212
import { transformerTwoslash } from '@shikijs/twoslash';
1313
import config from 'config';
14-
import { WikiCodeWrapperIcon } from 'doxium/components/code-wrapper-icon';
15-
import { CopyButton } from 'doxium/components/copy-button';
14+
import WikiCodeWrapperIcon from 'doxium/components/code-wrapper-icon';
15+
import CopyButton from 'doxium/components/copy-button';
1616
import { getHighlighterInstance, isLightColor } from 'doxium/lib';
1717
import { ShikiThemeBackgroundHexDimmed } from 'doxium/types';
1818
import { cn } from 'doxium/utils';
@@ -28,7 +28,7 @@ interface WikiCodeWrapperProps {
2828
name: string | undefined;
2929
}
3030

31-
export const CodeWrapper = async ({
31+
const CodeWrapper = async ({
3232
language = 'txt',
3333
children,
3434
lineNumbers,
@@ -84,3 +84,5 @@ export const CodeWrapper = async ({
8484
</div>
8585
);
8686
};
87+
88+
export default CodeWrapper;

packages/cli/src/templates/tsx/copy-button.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface CopyButtonProps {
1212
text: string;
1313
}
1414

15-
export const CopyButton = ({ text }: CopyButtonProps) => {
15+
const CopyButton = ({ text }: CopyButtonProps) => {
1616
const [clicked, setClicked] = useState(false);
1717

1818
const clickCopy = useCallback(() => {
@@ -25,9 +25,7 @@ export const CopyButton = ({ text }: CopyButtonProps) => {
2525
return useMemo(
2626
() => (
2727
<button
28-
className={cn(
29-
'text-base-800 hover:!text-accent-500 dark:text-base-400 absolute right-[28px] top-2.5 w-fit cursor-pointer transition-all duration-150 group-hover:opacity-100 md:opacity-0',
30-
)}
28+
className='text-base-800 hover:!text-accent-500 dark:text-base-400 absolute right-[28px] top-2.5 w-fit cursor-pointer transition-all duration-150 group-hover:opacity-100 md:opacity-0'
3129
onClick={clickCopy}
3230
>
3331
<FiCheck
@@ -49,3 +47,5 @@ export const CopyButton = ({ text }: CopyButtonProps) => {
4947
[clickCopy, clicked],
5048
);
5149
};
50+
51+
export default CopyButton;

packages/cli/src/templates/tsx/docs-[slug]-layout.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// @ts-nocheck
22

3-
import { Footer } from 'doxium/components/footer';
4-
import { Navbar } from 'doxium/components/navbar';
5-
import { Sidebar } from 'doxium/components/sidebar-filetree';
6-
import { Toaster } from 'doxium/components/toaster';
3+
import Footer from 'doxium/components/footer';
4+
import Navbar from 'doxium/components/navbar';
5+
import Sidebar from 'doxium/components/sidebar-filetree';
6+
import Toaster from 'doxium/components/toaster';
77
import { getDocsTree } from 'doxium/lib';
88

99
const Layout = async ({ children }: { children: React.ReactNode }) => {

packages/cli/src/templates/tsx/docs-[slug]-page.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import { remarkMermaid } from '@theguild/remark-mermaid';
44
import config from 'config';
5-
import { Breadcrumbs } from 'doxium/components/breadcrumbs';
6-
import { mdxComponents } from 'doxium/components/mdx-components';
7-
import { NavButtons } from 'doxium/components/nav-buttons';
8-
import { SecondarySidebar } from 'doxium/components/secondary-sidebar';
5+
import Breadcrumbs from 'doxium/components/breadcrumbs';
6+
import mdxComponents from 'doxium/components/mdx-components';
7+
import NavButtons from 'doxium/components/nav-buttons';
8+
import SecondarySidebar from 'doxium/components/secondary-sidebar';
99
import { getAllMdxSlugs, getDocsTree, getMdxData } from 'doxium/lib';
1010
import { params } from 'doxium/types';
1111
import { cn } from 'doxium/utils';

packages/cli/src/templates/tsx/docs-page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-nocheck
22

3-
import { FiChevronRight } from '@vertisanpro/react-icons/fi';
43
import { Button } from 'doxium/components/button';
4+
import { FiChevronRight } from 'icons/fi';
55
import Link from 'next/link';
66

77
const Home = () => {

packages/cli/src/templates/tsx/edit-button.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const githubRepo = config.socials.githubRepo;
1010
const showEditInGithub = config.misc.showEditInGithub;
1111
const linkUnderline = config.misc.linkUnderline;
1212

13-
export const EditButton = () => {
13+
const EditButton = () => {
1414
const pathnameNext = usePathname();
1515
const pathname = pathnameNext === '/' ? '/index' : pathnameNext;
1616
return (
@@ -30,3 +30,5 @@ export const EditButton = () => {
3030
)
3131
);
3232
};
33+
34+
export default EditButton;

packages/cli/src/templates/tsx/footer.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import config from 'config';
55
const authors = config.authors;
66
const appName = config.misc.appName;
77

8-
export const Footer = () => {
8+
const Footer = () => {
99
return (
1010
<div className='mt-auto flex w-full flex-col border-t border-black/15 px-[10vw] py-6 lg:px-[20vw] dark:border-white/15'>
1111
<div className='text-base-800 dark:text-base-400 flex flex-col justify-between text-xs md:flex-row'>
@@ -32,3 +32,5 @@ export const Footer = () => {
3232
</div>
3333
);
3434
};
35+
36+
export default Footer;

packages/cli/src/templates/tsx/hashtag-button.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface HashtagButtonProps {
1111
variant?: 'h1' | 'h2' | 'h3';
1212
}
1313

14-
export const HashtagButton = ({ id, variant: Var = 'h1', children }: PropsWithChildren<HashtagButtonProps>) => {
14+
const HashtagButton = ({ id, variant: Var = 'h1', children }: PropsWithChildren<HashtagButtonProps>) => {
1515
const clickCopy = useCallback(() => {
1616
if (typeof window !== 'undefined') {
1717
const path = window.location.href.replace(/#.*$/, '') + '#' + id;
@@ -38,3 +38,5 @@ export const HashtagButton = ({ id, variant: Var = 'h1', children }: PropsWithCh
3838
[id, Var, children, clickCopy],
3939
);
4040
};
41+
42+
export default HashtagButton;

packages/cli/src/templates/tsx/mdx-components.tsx

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// @ts-nocheck
22

33
import config from 'config';
4-
import { Accordion } from 'doxium/components/accordion';
5-
import { Alert, AlertProps } from 'doxium/components/alert';
4+
import Accordion from 'doxium/components/accordion';
5+
import Alert, { AlertProps } from 'doxium/components/alert';
66
import { CardGroup, CardGroupProps, CardItem, CardItemProps } from 'doxium/components/card';
7-
import { CodeWrapper } from 'doxium/components/code-wrapper';
7+
import CodeWrapper from 'doxium/components/code-wrapper';
88
import { ColumnGroup, ColumnGroupProps, ColumnItem, ColumnItemProps } from 'doxium/components/column';
99
import { File, Folder } from 'doxium/components/filetree';
10-
import { HashtagButton } from 'doxium/components/hashtag-button';
11-
import { Outline } from 'doxium/components/outline';
12-
import { Tabs } from 'doxium/components/tabs';
13-
import { Timeline } from 'doxium/components/timeline';
14-
import { VideoComponent, VideoProps } from 'doxium/components/video';
10+
import HashtagButton from 'doxium/components/hashtag-button';
11+
import Outline from 'doxium/components/outline';
12+
import Tabs from 'doxium/components/tabs';
13+
import Timeline from 'doxium/components/timeline';
14+
import VideoComponent, { VideoProps } from 'doxium/components/video';
1515
import { cleanHeadingId } from 'doxium/lib';
1616
import { FileProps, FolderProps, preProps, ShikiThemeBackgroundHexDefault, TabsProps } from 'doxium/types';
1717
import { cn } from 'doxium/utils';
@@ -21,7 +21,7 @@ import { BundledTheme } from 'shiki';
2121

2222
const theme = config.style.shikiTheme;
2323

24-
export const mdxComponents = {
24+
const mdxComponents = {
2525
a: ({ children, ...props }: React.AnchorHTMLAttributes<HTMLAnchorElement>) => {
2626
const external = props.href?.toString().startsWith('http');
2727
return external ? (
@@ -194,3 +194,5 @@ export const mdxComponents = {
194194
return <ColumnItem center={center}>{children}</ColumnItem>;
195195
},
196196
};
197+
198+
export default mdxComponents;

packages/cli/src/templates/tsx/nav-buttons.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface DocsNavProps {
1515

1616
const linkUnderline = config.misc.linkUnderline;
1717

18-
export const NavButtons = ({ tree }: DocsNavProps) => {
18+
const NavButtons = ({ tree }: DocsNavProps) => {
1919
const pathnameNext = usePathname();
2020
const pathname = pathnameNext === '/' ? '/index' : pathnameNext;
2121

@@ -77,3 +77,5 @@ export const NavButtons = ({ tree }: DocsNavProps) => {
7777
</div>
7878
);
7979
};
80+
81+
export default NavButtons;

packages/cli/src/templates/tsx/navbar.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use client';
33

44
import config from 'config';
5-
import { Cmdk } from 'doxium/components/cmdk';
5+
import Cmdk from 'doxium/components/cmdk';
66
import { DocLink, FiletreeNavigation } from 'doxium/components/filetree-navigation';
77
import { TreeNode } from 'doxium/types';
88
import { cn } from 'doxium/utils';
@@ -25,7 +25,7 @@ const colorScheme = config.style.colorScheme;
2525
const navbarImage = config.misc.navbarImage;
2626
const linkUnderline = config.misc.linkUnderline;
2727

28-
export const Navbar = ({ tree }: NavbarProps) => {
28+
const Navbar = ({ tree }: NavbarProps) => {
2929
const pathname = usePathname();
3030
const [opened, setOpened] = useState(false);
3131

@@ -188,3 +188,5 @@ export const Navbar = ({ tree }: NavbarProps) => {
188188
</>
189189
);
190190
};
191+
192+
export default Navbar;

packages/cli/src/templates/tsx/no-docs-[[slug]]-page.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import { remarkMermaid } from '@theguild/remark-mermaid';
44
import config from 'config';
5-
import { Breadcrumbs } from 'doxium/components/breadcrumbs';
6-
import { mdxComponents } from 'doxium/components/mdx-components';
7-
import { NavButtons } from 'doxium/components/nav-buttons';
8-
import { SecondarySidebar } from 'doxium/components/secondary-sidebar';
5+
import Breadcrumbs from 'doxium/components/breadcrumbs';
6+
import mdxComponents from 'doxium/components/mdx-components';
7+
import NavButtons from 'doxium/components/nav-buttons';
8+
import SecondarySidebar from 'doxium/components/secondary-sidebar';
99
import { getAllMdxSlugs, getDocsTree, getMdxData } from 'doxium/lib';
1010
import { params } from 'doxium/types';
1111
import { cn } from 'doxium/utils';

packages/cli/src/templates/tsx/no-docs-layout.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// @ts-nocheck
22

33
import config from 'config';
4-
import { Footer } from 'doxium/components/footer';
5-
import { Navbar } from 'doxium/components/navbar';
6-
import { Sidebar } from 'doxium/components/sidebar-filetree';
7-
import { Toaster } from 'doxium/components/toaster';
4+
import Footer from 'doxium/components/footer';
5+
import Navbar from 'doxium/components/navbar';
6+
import Sidebar from 'doxium/components/sidebar-filetree';
7+
import Toaster from 'doxium/components/toaster';
88
import { getDocsTree } from 'doxium/lib';
99
import { cn } from 'doxium/utils';
1010
import { Metadata } from 'next';

packages/cli/src/templates/tsx/not-found.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import config from 'config';
44
import { Button } from 'doxium/components/button';
5-
import { SecondarySidebar } from 'doxium/components/secondary-sidebar';
5+
import SecondarySidebar from 'doxium/components/secondary-sidebar';
66
import { cn } from 'doxium/utils';
77
import Link from 'next/link';
88

packages/cli/src/templates/tsx/outline.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { cn } from 'doxium/utils';
44

5-
export const Outline = ({ children }: { children: React.ReactNode }) => {
5+
const Outline = ({ children }: { children: React.ReactNode }) => {
66
return (
77
<div
88
className={cn(
@@ -13,3 +13,5 @@ export const Outline = ({ children }: { children: React.ReactNode }) => {
1313
</div>
1414
);
1515
};
16+
17+
export default Outline;

packages/cli/src/templates/tsx/scroll-back-button.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { useEffect, useMemo, useState } from 'react';
99
const scrollHeightBreakpoint = config.misc.scollHeightBreakpoint;
1010
const linkUnderline = config.misc.linkUnderline;
1111

12-
export const ScrollBackButton = () => {
12+
const ScrollBackButton = () => {
1313
const [scrollHeight, setScrollHeight] = useState(0);
1414

1515
useEffect(() => {
@@ -36,3 +36,5 @@ export const ScrollBackButton = () => {
3636

3737
return scrollHeight > scrollHeightBreakpoint && backToTopButton;
3838
};
39+
40+
export default ScrollBackButton;

0 commit comments

Comments
 (0)