Skip to content

Commit

Permalink
feat(updates): ✨ update nextra & nextra docs
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Jan 18, 2022
1 parent 7562154 commit c9e6693
Show file tree
Hide file tree
Showing 53 changed files with 2,107 additions and 1,916 deletions.
1,692 changes: 781 additions & 911 deletions .yalc/nextra-renderlesskit-theme-docs/dist/index.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .yalc/nextra-renderlesskit-theme-docs/dist/types/config.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import React from "react";
import { DocsThemeConfig } from "./types";
export declare const ThemeConfigContext: React.Context<DocsThemeConfig>;
export declare const useConfig: () => DocsThemeConfig;
12 changes: 12 additions & 0 deletions .yalc/nextra-renderlesskit-theme-docs/dist/types/footer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";
import { Item } from "./utils/normalize-pages";
interface NavLinkProps {
isRTL?: boolean | null;
currentIndex: number;
flatDirectories: Item[];
}
export declare const NavLinks: ({ flatDirectories, currentIndex, isRTL, }: NavLinkProps) => JSX.Element;
declare const Footer: React.FC<{
menu?: boolean;
}>;
export default Footer;
8 changes: 8 additions & 0 deletions .yalc/nextra-renderlesskit-theme-docs/dist/types/head.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// <reference types="react" />
interface HeadProps {
title: string;
locale?: string;
meta: Record<string, any>;
}
export default function Head({ title, locale, meta }: HeadProps): JSX.Element;
export {};
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference types="react" />
declare const ArrowRight: (props: any) => JSX.Element;
export default ArrowRight;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="react" />
export default function Check(): JSX.Element;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="react" />
declare const DiscordIcon: ({ height }: {
height?: number | undefined;
}) => JSX.Element;
export default DiscordIcon;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="react" />
declare const Github: ({ height }: {
height?: number | undefined;
}) => JSX.Element;
export default Github;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="react" />
export default function Globe(): JSX.Element;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="react" />
export default function Sun(): JSX.Element;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="react" />
export default function Moon(): JSX.Element;
7 changes: 7 additions & 0 deletions .yalc/nextra-renderlesskit-theme-docs/dist/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/// <reference types="react" />
import { PageOpt } from "nextra";
import { DocsThemeConfig } from "./types";
import "focus-visible";
import "./polyfill";
declare const _default: (opts: PageOpt, config: DocsThemeConfig) => (props: any) => JSX.Element;
export default _default;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/// <reference types="react" />
import { DocsThemeConfig } from "./types";
interface LocaleSwitchProps {
options: NonNullable<DocsThemeConfig["i18n"]>;
}
export default function LocaleSwitch({ options }: LocaleSwitchProps): JSX.Element;
export {};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";
export declare type ActiveAnchor = Record<string, {
isActive?: boolean;
aboveHalfViewport: boolean;
index: number;
insideHalfViewport: boolean;
}>;
export declare const useActiveAnchor: () => ActiveAnchor;
export declare const useActiveAnchorSet: () => (value: ActiveAnchor | ((prevState: ActiveAnchor) => ActiveAnchor)) => void;
export declare const ActiveAnchor: React.FC;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/// <reference types="react" />
declare const defaultTheme: {
projectLink: string;
docsRepositoryBase: string;
titleSuffix: string;
nextLinks: boolean;
prevLinks: boolean;
search: boolean;
darkMode: boolean;
defaultMenuCollapsed: boolean;
font: boolean;
footer: boolean;
footerText: string;
footerEditLink: string;
logo: JSX.Element;
head: JSX.Element;
};
export default defaultTheme;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";
import "intersection-observer";
export declare const MDXTheme: ({ MDXContent, }: {
MDXContent: React.FC<{
components?: any;
}>;
}) => JSX.Element;
9 changes: 9 additions & 0 deletions .yalc/nextra-renderlesskit-theme-docs/dist/types/navbar.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference types="react" />
import { Item, PageItem } from "./utils/normalize-pages";
interface NavBarProps {
isRTL?: boolean | null;
flatDirectories: Item[];
flatPageDirectories: PageItem[];
}
export default function Navbar({ flatDirectories, flatPageDirectories, }: NavBarProps): JSX.Element;
export {};
Empty file.
7 changes: 7 additions & 0 deletions .yalc/nextra-renderlesskit-theme-docs/dist/types/search.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/// <reference types="react" />
import type { Item as NormalItem } from "./utils/normalize-pages";
interface SearchProps {
directories: NormalItem[];
}
declare const Search: ({ directories }: SearchProps) => JSX.Element;
export default Search;
12 changes: 12 additions & 0 deletions .yalc/nextra-renderlesskit-theme-docs/dist/types/select.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";
interface MenuOption {
key: string;
name: React.ReactElement | string;
}
interface MenuProps {
selected: MenuOption;
onChange: (option: MenuOption) => void;
options: MenuOption[];
}
export default function Menu({ options, selected, onChange }: MenuProps): JSX.Element;
export {};
13 changes: 13 additions & 0 deletions .yalc/nextra-renderlesskit-theme-docs/dist/types/sidebar.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/// <reference types="react" />
import { Heading } from "nextra";
import { Item, PageItem } from "./utils/normalize-pages";
interface SideBarProps {
directories: PageItem[];
flatDirectories: Item[];
fullDirectories: Item[];
asPopover?: boolean;
headings?: Heading[];
isRTL?: boolean;
}
export default function Sidebar({ directories, flatDirectories, fullDirectories, asPopover, headings, }: SideBarProps): JSX.Element;
export {};
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/// <reference types="react" />
export default function ThemeSwitch({ lite }: {
lite?: boolean | undefined;
}): JSX.Element;
6 changes: 6 additions & 0 deletions .yalc/nextra-renderlesskit-theme-docs/dist/types/toc.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="react" />
import { Heading } from "nextra";
export default function ToC({ headings, filepathWithName, }: {
headings: Heading[] | null;
filepathWithName: string;
}): JSX.Element;
47 changes: 47 additions & 0 deletions .yalc/nextra-renderlesskit-theme-docs/dist/types/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/// <reference types="react" />
export interface DocsThemeConfig {
docsRepositoryBase?: string;
titleSuffix?: string | React.FC<{
locale: string;
config: DocsThemeConfig;
title: string;
meta: Record<string, any>;
}>;
nextLinks?: boolean;
prevLinks?: boolean;
search?: boolean;
darkMode?: boolean;
defaultMenuCollapsed?: boolean;
font?: boolean;
footer?: boolean;
footerText?: string;
footerEditLink?: string;
feedbackLink?: string;
feedbackLabels?: string;
head?: React.ReactNode | React.FC<{
locale: string;
config: DocsThemeConfig;
title: string;
meta: Record<string, any>;
}>;
logo?: React.ReactNode;
direction?: string;
i18n?: {
locale: string;
text: string;
direction: string;
}[];
unstable_faviconGlyph?: string;
customSearch?: boolean;
unstable_flexsearch?: boolean;
projectLink?: string;
github?: string;
projectLinkIcon?: React.FC<{
locale: string;
}>;
projectChatLink?: string;
projectChatLinkIcon?: React.FC<{
locale: string;
}>;
floatTOC?: boolean;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function flatten<T extends any[]>(list: T): T;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare const getFSRoute: (asPath: string, locale?: string | undefined) => string;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { Heading } from "nextra";
export default function getHeadingText(heading: Heading): string;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference types="react" />
interface MenuContextValue {
menu: boolean;
setMenu: (data: boolean) => any;
defaultMenuCollapsed: boolean;
}
export declare const MenuContext: import("react").Context<MenuContextValue>;
export default function useMenuContext(): MenuContextValue;
export {};
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { PageMapItem } from "nextra";
export interface Item extends Omit<PageMapItem, "children"> {
title: string;
type: string;
children?: Item[];
}
export interface PageItem extends Omit<PageMapItem, "children"> {
title: string;
type: string;
children?: PageItem[];
firstChildRoute?: string;
hidden?: boolean;
}
export interface DocsItem extends Omit<PageMapItem, "children"> {
title: string;
type: string;
children?: DocsItem[];
firstChildRoute?: string;
}
export default function normalizePages({ list, locale, defaultLocale, route, docsRoot, }: {
list: PageMapItem[];
locale?: string;
defaultLocale?: string;
route: string;
docsRoot?: string;
}): {
activeType: undefined;
activeIndex: number;
directories: Item[];
flatDirectories: Item[];
docsDirectories: DocsItem[];
flatDocsDirectories: DocsItem[];
pageDirectories: PageItem[];
flatPageDirectories: PageItem[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import React from "react";
declare const renderComponent: <T>(ComponentOrNode: React.ReactNode | React.FC<T>, props: T) => {} | null;
export default renderComponent;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const useMounted: () => boolean;
export default useMounted;
8 changes: 5 additions & 3 deletions .yalc/nextra-renderlesskit-theme-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,21 @@
},
"dependencies": {
"@chakra-ui/hooks": "^1.7.2",
"@headlessui/react": "^1.4.3",
"@mdx-js/react": "2.0.0-rc.2",
"@reach/skip-nav": "0.16.0",
"@renderlesskit/react-tailwind": "^0.0.1-alpha.37",
"classnames": "2.3.1",
"flexsearch": "^0.7.21",
"focus-visible": "5.2.0",
"github-slugger": "1.4.0",
"grapheme-splitter": "1.0.4",
"intersection-observer": "0.12.0",
"match-sorter": "6.3.1",
"next-themes": "0.0.15",
"parse-git-url": "1.0.1",
"prism-react-renderer": "1.2.1",
"react-live": "^2.3.0",
"react-innertext": "^1.1.5",
"react-live": "^2.4.0",
"title": "3.4.3",
"twind": "^0.16.16"
},
Expand All @@ -93,5 +95,5 @@
"emoji": "emoji",
"editor": false
},
"yalcSig": "c3783295e317c37bfdce305433552e0b"
"yalcSig": "5c59a22afbd167bc63e999604e286788"
}
Loading

1 comment on commit c9e6693

@vercel
Copy link

@vercel vercel bot commented on c9e6693 Jan 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.