@vezham/start 26.0.0-alpha.5 → 26.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/lib/layouts/app/index.d.ts +15 -0
- package/dist/lib/layouts/app/index.d.ts.map +1 -0
- package/dist/lib/layouts/app/index.js +44 -0
- package/dist/lib/layouts/docs/components.d.ts +4 -0
- package/dist/lib/layouts/docs/components.d.ts.map +1 -0
- package/dist/lib/layouts/docs/components.js +29 -0
- package/dist/lib/layouts/docs/index.d.ts +3 -0
- package/dist/lib/layouts/docs/index.d.ts.map +1 -0
- package/dist/lib/layouts/docs/index.js +2 -0
- package/dist/lib/layouts/docs/layout-components.d.ts +9 -0
- package/dist/lib/layouts/docs/layout-components.d.ts.map +1 -0
- package/dist/lib/layouts/docs/layout-components.js +81 -0
- package/dist/lib/layouts/docs/layouts.d.ts +6 -0
- package/dist/lib/layouts/docs/layouts.d.ts.map +1 -0
- package/dist/lib/layouts/docs/layouts.js +11 -0
- package/dist/lib/layouts/docs/page-actions.d.ts +4 -0
- package/dist/lib/layouts/docs/page-actions.d.ts.map +1 -0
- package/dist/lib/layouts/docs/page-actions.js +154 -0
- package/dist/lib/layouts/docs/page-actions.variants.d.ts +44 -0
- package/dist/lib/layouts/docs/page-actions.variants.d.ts.map +1 -0
- package/dist/lib/layouts/docs/page-actions.variants.js +17 -0
- package/dist/lib/layouts/docs/page-content.d.ts +11 -0
- package/dist/lib/layouts/docs/page-content.d.ts.map +1 -0
- package/dist/lib/layouts/docs/page-content.js +13 -0
- package/dist/lib/layouts/docs/pages.d.ts +57 -0
- package/dist/lib/layouts/docs/pages.d.ts.map +1 -0
- package/dist/lib/layouts/docs/pages.js +36 -0
- package/dist/lib/layouts/docs/types.d.ts +21 -0
- package/dist/lib/layouts/docs/types.d.ts.map +1 -0
- package/dist/lib/mdx/index.d.ts +26 -0
- package/dist/lib/mdx/index.d.ts.map +1 -0
- package/dist/lib/mdx/index.js +10 -0
- package/dist/lib/pages/docs/openapi/index.d.ts +2 -0
- package/dist/lib/pages/docs/openapi/index.d.ts.map +1 -0
- package/dist/lib/pages/docs/openapi/index.js +5 -0
- package/dist/lib/pages/docs/route/index.d.ts +35 -0
- package/dist/lib/pages/docs/route/index.d.ts.map +1 -0
- package/dist/lib/pages/docs/route/index.js +59 -0
- package/dist/lib/provider/next/config.d.ts +3 -0
- package/dist/lib/provider/next/config.d.ts.map +1 -0
- package/dist/lib/provider/next/config.js +6 -0
- package/dist/lib/provider/next/index.d.ts +3 -0
- package/dist/lib/provider/next/index.d.ts.map +1 -0
- package/dist/lib/provider/next/index.js +3 -0
- package/dist/lib/provider/next/provider.d.ts +3 -0
- package/dist/lib/provider/next/provider.d.ts.map +1 -0
- package/dist/lib/provider/next/provider.js +24 -0
- package/dist/lib/provider/next/root-document.d.ts +3 -0
- package/dist/lib/provider/next/root-document.d.ts.map +1 -0
- package/dist/lib/provider/next/root-document.js +27 -0
- package/dist/lib/provider/shared/config.d.ts +4 -0
- package/dist/lib/provider/shared/config.d.ts.map +1 -0
- package/dist/lib/provider/shared/config.js +10 -0
- package/dist/lib/provider/shared/devtools.d.ts +10 -0
- package/dist/lib/provider/shared/devtools.d.ts.map +1 -0
- package/dist/lib/provider/shared/devtools.js +24 -0
- package/dist/lib/provider/shared/provider.d.ts +13 -0
- package/dist/lib/provider/shared/provider.d.ts.map +1 -0
- package/dist/lib/provider/shared/provider.js +40 -0
- package/dist/lib/provider/shared/types.d.ts +32 -0
- package/dist/lib/provider/shared/types.d.ts.map +1 -0
- package/dist/lib/provider/shared/types.js +4 -0
- package/dist/lib/provider/tanstack/config.d.ts +4 -0
- package/dist/lib/provider/tanstack/config.d.ts.map +1 -0
- package/dist/lib/provider/tanstack/config.js +11 -0
- package/dist/lib/provider/tanstack/index.d.ts +4 -0
- package/dist/lib/provider/tanstack/index.d.ts.map +1 -0
- package/dist/lib/provider/tanstack/index.js +4 -0
- package/dist/lib/provider/tanstack/provider.d.ts +3 -0
- package/dist/lib/provider/tanstack/provider.d.ts.map +1 -0
- package/dist/lib/provider/tanstack/provider.js +22 -0
- package/dist/lib/provider/tanstack/root-document.d.ts +8 -0
- package/dist/lib/provider/tanstack/root-document.d.ts.map +1 -0
- package/dist/lib/provider/tanstack/root-document.js +28 -0
- package/dist/lib/provider/tanstack-docs/config.d.ts +14 -0
- package/dist/lib/provider/tanstack-docs/config.d.ts.map +1 -0
- package/dist/lib/provider/tanstack-docs/config.js +39 -0
- package/dist/lib/provider/tanstack-docs/i18n.d.ts +4 -0
- package/dist/lib/provider/tanstack-docs/i18n.d.ts.map +1 -0
- package/dist/lib/provider/tanstack-docs/i18n.js +30 -0
- package/dist/lib/provider/tanstack-docs/index.d.ts +5 -0
- package/dist/lib/provider/tanstack-docs/index.d.ts.map +1 -0
- package/dist/lib/provider/tanstack-docs/index.js +5 -0
- package/dist/lib/provider/tanstack-docs/routes.d.ts +13 -0
- package/dist/lib/provider/tanstack-docs/routes.d.ts.map +1 -0
- package/dist/lib/provider/tanstack-docs/routes.js +23 -0
- package/dist/lib/provider/tanstack-docs/search.d.ts +4 -0
- package/dist/lib/provider/tanstack-docs/search.d.ts.map +1 -0
- package/dist/lib/provider/tanstack-docs/search.js +24 -0
- package/dist/lib/provider/vite/config.d.ts +3 -0
- package/dist/lib/provider/vite/config.d.ts.map +1 -0
- package/dist/lib/provider/vite/config.js +29 -0
- package/dist/lib/provider/vite/index.d.ts +4 -0
- package/dist/lib/provider/vite/index.d.ts.map +1 -0
- package/dist/lib/provider/vite/index.js +4 -0
- package/dist/lib/provider/vite/provider.d.ts +3 -0
- package/dist/lib/provider/vite/provider.d.ts.map +1 -0
- package/dist/lib/provider/vite/provider.js +13 -0
- package/dist/lib/router/tanstack/index.d.ts +3 -0
- package/dist/lib/router/tanstack/index.d.ts.map +1 -0
- package/dist/lib/router/tanstack/index.js +3 -0
- package/dist/lib/router/tanstack/root.d.ts +3 -0
- package/dist/lib/router/tanstack/root.d.ts.map +1 -0
- package/dist/lib/router/tanstack/root.js +22 -0
- package/dist/lib/router/tanstack/router.d.ts +3 -0
- package/dist/lib/router/tanstack/router.d.ts.map +1 -0
- package/dist/lib/router/tanstack/router.js +22 -0
- package/dist/lib/runtime/docs/head.d.ts +46 -0
- package/dist/lib/runtime/docs/head.d.ts.map +1 -0
- package/dist/lib/runtime/docs/head.js +80 -0
- package/dist/lib/runtime/docs/i18n.d.ts +33 -0
- package/dist/lib/runtime/docs/i18n.d.ts.map +1 -0
- package/dist/lib/runtime/docs/i18n.js +41 -0
- package/dist/lib/runtime/docs/icons.d.ts +26 -0
- package/dist/lib/runtime/docs/icons.d.ts.map +1 -0
- package/dist/lib/runtime/docs/icons.js +103 -0
- package/dist/lib/runtime/docs/index.d.ts +9 -0
- package/dist/lib/runtime/docs/index.d.ts.map +1 -0
- package/dist/lib/runtime/docs/index.js +9 -0
- package/dist/lib/runtime/docs/openapi.d.ts +41 -0
- package/dist/lib/runtime/docs/openapi.d.ts.map +1 -0
- package/dist/lib/runtime/docs/openapi.js +40 -0
- package/dist/lib/runtime/docs/pages.d.ts +98 -0
- package/dist/lib/runtime/docs/pages.d.ts.map +1 -0
- package/dist/lib/runtime/docs/pages.js +89 -0
- package/dist/lib/runtime/docs/routes.d.ts +17 -0
- package/dist/lib/runtime/docs/routes.d.ts.map +1 -0
- package/dist/lib/runtime/docs/routes.js +45 -0
- package/dist/lib/runtime/docs/runtime.d.ts +185 -0
- package/dist/lib/runtime/docs/runtime.d.ts.map +1 -0
- package/dist/lib/runtime/docs/runtime.js +55 -0
- package/dist/lib/runtime/docs/static.d.ts +16 -0
- package/dist/lib/runtime/docs/static.d.ts.map +1 -0
- package/dist/lib/runtime/docs/static.js +20 -0
- package/dist/lib/story/index.d.ts +2 -0
- package/dist/lib/story/index.d.ts.map +1 -0
- package/dist/lib/story/index.js +5 -0
- package/dist/styles/docs/index.css +2 -0
- package/package.json +78 -2
package/README.md
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export type AppShellProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
contentClassName?: string;
|
|
5
|
+
footer?: ReactNode;
|
|
6
|
+
footerClassName?: string;
|
|
7
|
+
header?: ReactNode;
|
|
8
|
+
headerClassName?: string;
|
|
9
|
+
mainClassName?: string;
|
|
10
|
+
sidebar?: ReactNode;
|
|
11
|
+
sidebarClassName?: string;
|
|
12
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
13
|
+
export declare const AppShell: ({ children, className, contentClassName, footer, footerClassName, header, headerClassName, mainClassName, sidebar, sidebarClassName, ...props }: AppShellProps) => import("react").JSX.Element;
|
|
14
|
+
export declare const AppLayout: ({ children, className, contentClassName, footer, footerClassName, header, headerClassName, mainClassName, sidebar, sidebarClassName, ...props }: AppShellProps) => import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/app/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMhE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAA;AAErD,eAAO,MAAM,QAAQ,GAAI,iJAYtB,aAAa,gCAiDf,CAAA;AAED,eAAO,MAAM,SAAS,oJAnDnB,aAAa,gCAmDiB,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
//#region src/lib/layouts/app/index.tsx
|
|
3
|
+
var cx = (...classNames) => {
|
|
4
|
+
return classNames.filter(Boolean).join(" ");
|
|
5
|
+
};
|
|
6
|
+
var AppShell = ({ children, className, contentClassName, footer, footerClassName, header, headerClassName, mainClassName, sidebar, sidebarClassName, ...props }) => {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", {
|
|
8
|
+
"data-slot": "app-shell",
|
|
9
|
+
className: cx("bg-background text-foreground min-h-svh", className),
|
|
10
|
+
...props,
|
|
11
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
"data-slot": "app-shell-frame",
|
|
13
|
+
className: "flex min-h-svh",
|
|
14
|
+
children: [sidebar ? /* @__PURE__ */ jsx("aside", {
|
|
15
|
+
"data-slot": "app-sidebar",
|
|
16
|
+
className: cx("bg-background hidden w-64 shrink-0 border-r md:block", sidebarClassName),
|
|
17
|
+
children: sidebar
|
|
18
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
"data-slot": "app-main",
|
|
20
|
+
className: cx("flex min-w-0 flex-1 flex-col", mainClassName),
|
|
21
|
+
children: [
|
|
22
|
+
header ? /* @__PURE__ */ jsx("header", {
|
|
23
|
+
"data-slot": "app-header",
|
|
24
|
+
className: cx("bg-background shrink-0 border-b", headerClassName),
|
|
25
|
+
children: header
|
|
26
|
+
}) : null,
|
|
27
|
+
/* @__PURE__ */ jsx("main", {
|
|
28
|
+
"data-slot": "app-content",
|
|
29
|
+
className: cx("min-w-0 flex-1", contentClassName),
|
|
30
|
+
children
|
|
31
|
+
}),
|
|
32
|
+
footer ? /* @__PURE__ */ jsx("footer", {
|
|
33
|
+
"data-slot": "app-footer",
|
|
34
|
+
className: cx("bg-background shrink-0 border-t", footerClassName),
|
|
35
|
+
children: footer
|
|
36
|
+
}) : null
|
|
37
|
+
]
|
|
38
|
+
})]
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
var AppLayout = AppShell;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { AppLayout, AppShell };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DocsLayoutProps, DocsPageProps } from './types';
|
|
2
|
+
export declare const DocsLayout: ({ shell, ...props }: DocsLayoutProps) => import("react").JSX.Element;
|
|
3
|
+
export declare const DocsPage: ({ full, shell, toc, ...props }: DocsPageProps) => import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/components.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7D,eAAO,MAAM,UAAU,GAAI,qBAA8B,eAAe,gCAGvE,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,gCAKtB,aAAa,gCA2Bf,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { layouts } from "./layouts.js";
|
|
2
|
+
import { DocsPageContent } from "./page-content.js";
|
|
3
|
+
import { getPageComponents } from "./pages.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/layouts/docs/components.tsx
|
|
6
|
+
var DocsLayout = ({ shell = "docs", ...props }) => {
|
|
7
|
+
const Layout = layouts[shell];
|
|
8
|
+
return /* @__PURE__ */ jsx(Layout, { ...props });
|
|
9
|
+
};
|
|
10
|
+
var DocsPage = ({ full, shell = "docs", toc, ...props }) => {
|
|
11
|
+
const { Page, Body, Description, Title } = getPageComponents(shell);
|
|
12
|
+
const content = full ? /* @__PURE__ */ jsx(Body, { children: props.children }) : /* @__PURE__ */ jsx(DocsPageContent, {
|
|
13
|
+
...props,
|
|
14
|
+
Body,
|
|
15
|
+
Description,
|
|
16
|
+
Title
|
|
17
|
+
});
|
|
18
|
+
if (shell === "home") return /* @__PURE__ */ jsx("article", {
|
|
19
|
+
className: `mx-auto flex w-full min-w-0 flex-col gap-4 px-6 py-10 ${full ? "max-w-7xl" : "max-w-4xl"}`,
|
|
20
|
+
children: content
|
|
21
|
+
});
|
|
22
|
+
return /* @__PURE__ */ jsx(Page, {
|
|
23
|
+
full,
|
|
24
|
+
toc,
|
|
25
|
+
children: content
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { DocsLayout, DocsPage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,IAAI,eAAe,EAC7B,QAAQ,EACR,QAAQ,IAAI,aAAa,EAC1B,MAAM,cAAc,CAAA;AACrB,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DocsLayoutProps } from './types';
|
|
2
|
+
type Props = Omit<DocsLayoutProps, 'shell'>;
|
|
3
|
+
export declare const HomeDocsLayout: (props: Props) => import("react").JSX.Element;
|
|
4
|
+
export declare const GlassDocsLayout: (props: Props) => import("react").JSX.Element;
|
|
5
|
+
export declare const FluxDocsLayout: (props: Props) => import("react").JSX.Element;
|
|
6
|
+
export declare const NotebookDocsLayout: (props: Props) => import("react").JSX.Element;
|
|
7
|
+
export declare const StandardDocsLayout: (props: Props) => import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=layout-components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-components.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/layout-components.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,KAAK,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAA;AAuB3C,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,gCAG1C,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,KAAK,gCAO3C,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,gCAU1C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,gCAc9C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,gCAuB9C,CAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { DocsLayout } from "@vezham/docs-react/layouts/docs";
|
|
4
|
+
import { DocsLayout as DocsLayout$1 } from "@vezham/docs-react/layouts/flux";
|
|
5
|
+
import { GlassLayout } from "@vezham/docs-react/layouts/glass";
|
|
6
|
+
import { HomeLayout } from "@vezham/docs-react/layouts/home";
|
|
7
|
+
import { DocsLayout as DocsLayout$2 } from "@vezham/docs-react/layouts/notebook";
|
|
8
|
+
//#region src/lib/layouts/docs/layout-components.tsx
|
|
9
|
+
var getLayoutInputs = (props) => {
|
|
10
|
+
const { tree, nav, links, githubUrl, i18n, themeSwitch, searchToggle, tabMode, ...layoutProps } = props;
|
|
11
|
+
return {
|
|
12
|
+
children: props.children,
|
|
13
|
+
tree,
|
|
14
|
+
base: {
|
|
15
|
+
nav,
|
|
16
|
+
links,
|
|
17
|
+
githubUrl,
|
|
18
|
+
i18n,
|
|
19
|
+
themeSwitch,
|
|
20
|
+
searchToggle
|
|
21
|
+
},
|
|
22
|
+
layoutProps,
|
|
23
|
+
tabMode
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
var HomeDocsLayout = (props) => {
|
|
27
|
+
const { base, children } = getLayoutInputs(props);
|
|
28
|
+
return /* @__PURE__ */ jsx(HomeLayout, {
|
|
29
|
+
...base,
|
|
30
|
+
children
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
var GlassDocsLayout = (props) => {
|
|
34
|
+
const { base, children, tree } = getLayoutInputs(props);
|
|
35
|
+
return /* @__PURE__ */ jsx(GlassLayout, {
|
|
36
|
+
...base,
|
|
37
|
+
tree,
|
|
38
|
+
tabs: { transform: (option) => option },
|
|
39
|
+
children
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
var FluxDocsLayout = (props) => {
|
|
43
|
+
const { base, children, tree } = getLayoutInputs(props);
|
|
44
|
+
return /* @__PURE__ */ jsx(DocsLayout$1, {
|
|
45
|
+
...base,
|
|
46
|
+
tree,
|
|
47
|
+
containerProps: { className: "[&>[data-layout-main]]:w-full" },
|
|
48
|
+
children
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
var NotebookDocsLayout = (props) => {
|
|
52
|
+
const { base, children, layoutProps, tabMode, tree } = getLayoutInputs(props);
|
|
53
|
+
const notebookTabMode = tabMode === "top" ? "navbar" : tabMode === "auto" ? "sidebar" : tabMode;
|
|
54
|
+
return /* @__PURE__ */ jsx(DocsLayout$2, {
|
|
55
|
+
...base,
|
|
56
|
+
...layoutProps,
|
|
57
|
+
tree,
|
|
58
|
+
tabMode: notebookTabMode,
|
|
59
|
+
children
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
var StandardDocsLayout = (props) => {
|
|
63
|
+
const { base, children, layoutProps, tabMode, tree } = getLayoutInputs(props);
|
|
64
|
+
const { sidebar, ...docsLayoutProps } = layoutProps;
|
|
65
|
+
const { banner, footer, ...sidebarProps } = sidebar ?? {};
|
|
66
|
+
const docsTabMode = tabMode === "navbar" ? "top" : tabMode === "sidebar" ? "auto" : tabMode;
|
|
67
|
+
return /* @__PURE__ */ jsx(DocsLayout, {
|
|
68
|
+
...base,
|
|
69
|
+
...docsLayoutProps,
|
|
70
|
+
sidebar: sidebar && {
|
|
71
|
+
...sidebarProps,
|
|
72
|
+
banner: typeof banner === "function" ? createElement(banner) : banner,
|
|
73
|
+
footer: typeof footer === "function" ? createElement(footer) : footer
|
|
74
|
+
},
|
|
75
|
+
tree,
|
|
76
|
+
tabMode: docsTabMode,
|
|
77
|
+
children
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
//#endregion
|
|
81
|
+
export { FluxDocsLayout, GlassDocsLayout, HomeDocsLayout, NotebookDocsLayout, StandardDocsLayout };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DocsLayoutProps, DocsShell } from './types';
|
|
3
|
+
type Props = Omit<DocsLayoutProps, 'shell'>;
|
|
4
|
+
export declare const layouts: Record<DocsShell, (props: Props) => ReactNode>;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=layouts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layouts.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/layouts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAStC,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEzD,KAAK,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAA;AAE3C,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAMlE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FluxDocsLayout, GlassDocsLayout, HomeDocsLayout, NotebookDocsLayout, StandardDocsLayout } from "./layout-components.js";
|
|
2
|
+
//#region src/lib/layouts/docs/layouts.ts
|
|
3
|
+
var layouts = {
|
|
4
|
+
docs: StandardDocsLayout,
|
|
5
|
+
flux: FluxDocsLayout,
|
|
6
|
+
glass: GlassDocsLayout,
|
|
7
|
+
home: HomeDocsLayout,
|
|
8
|
+
notebook: NotebookDocsLayout
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { layouts };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-actions.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/page-actions.tsx"],"names":[],"mappings":"AAyEA,eAAO,MAAM,WAAW,GAAI,iBAAiB;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,gCAgHnE,CAAA"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { pageActionsVariants } from "./page-actions.variants.js";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Button, ButtonGroup, Dropdown } from "@vezham/react-v3";
|
|
5
|
+
import { writeClipboardText } from "@vezham/docs-react/utils/clipboard";
|
|
6
|
+
import { AltArrowDown, ChatRound, ClipboardCheck, CodeFile, Copy, Cursor, FileText, SquareArrowUp } from "@vezham/icons-react";
|
|
7
|
+
//#region src/lib/layouts/docs/page-actions.tsx
|
|
8
|
+
var styles = pageActionsVariants();
|
|
9
|
+
var getPageActions = (markdownUrl) => {
|
|
10
|
+
const prompt = `Read ${typeof window === "undefined" ? markdownUrl : new URL(markdownUrl, window.location.origin).href}, I want to ask questions about this page.`;
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
id: "markdown",
|
|
14
|
+
title: "View as Markdown",
|
|
15
|
+
description: "View page as Markdown format",
|
|
16
|
+
href: markdownUrl,
|
|
17
|
+
icon: FileText
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "cursor",
|
|
21
|
+
title: "Add to Cursor",
|
|
22
|
+
description: "Install MCP Server on Cursor",
|
|
23
|
+
href: "cursor://anysphere.cursor-deeplink/mcp/install?name=vezham-react&config=eyJjb21tYW5kIjoibnB4IC15IEBoZXJvdWkvcmVhY3QtbWNwQGxhdGVzdCJ9",
|
|
24
|
+
icon: Cursor
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "vscode",
|
|
28
|
+
title: "Add to VS Code",
|
|
29
|
+
description: "Install MCP Server on VS Code",
|
|
30
|
+
href: "vscode:mcp/install?%7B%22name%22%3A%22vezham-react%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40vezham%2Freact-mcp%40latest%22%5D%7D",
|
|
31
|
+
icon: CodeFile
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "chatgpt",
|
|
35
|
+
title: "Open in ChatGPT",
|
|
36
|
+
description: "Ask questions about this page",
|
|
37
|
+
href: `https://chatgpt.com/?${new URLSearchParams({
|
|
38
|
+
hints: "search",
|
|
39
|
+
q: prompt
|
|
40
|
+
})}`,
|
|
41
|
+
icon: ChatRound
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "claude",
|
|
45
|
+
title: "Open in Claude",
|
|
46
|
+
description: "Ask questions about this page",
|
|
47
|
+
href: `https://claude.ai/new?${new URLSearchParams({ q: prompt })}`,
|
|
48
|
+
icon: ChatRound
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
};
|
|
52
|
+
var PageActions = ({ markdownUrl }) => {
|
|
53
|
+
const [copiedAction, setCopiedAction] = useState();
|
|
54
|
+
const [isLoading, setLoading] = useState();
|
|
55
|
+
const [isOpen, setOpen] = useState(false);
|
|
56
|
+
const [error, setError] = useState();
|
|
57
|
+
const copiedTimer = useRef(void 0);
|
|
58
|
+
useEffect(() => () => clearTimeout(copiedTimer.current), []);
|
|
59
|
+
const actions = getPageActions(markdownUrl);
|
|
60
|
+
const copy = async (action) => {
|
|
61
|
+
setLoading(action);
|
|
62
|
+
setError(void 0);
|
|
63
|
+
try {
|
|
64
|
+
let text;
|
|
65
|
+
if (action === "markdown") {
|
|
66
|
+
const response = await fetch(markdownUrl);
|
|
67
|
+
if (!response.ok) throw new Error("Unable to load Markdown");
|
|
68
|
+
text = await response.text();
|
|
69
|
+
} else text = `Use this documentation page as context when helping me: ${new URL(markdownUrl, window.location.origin).href}`;
|
|
70
|
+
await writeClipboardText(text);
|
|
71
|
+
clearTimeout(copiedTimer.current);
|
|
72
|
+
setCopiedAction(action);
|
|
73
|
+
copiedTimer.current = setTimeout(() => setCopiedAction(void 0), 2e3);
|
|
74
|
+
} catch {
|
|
75
|
+
setError("Unable to copy. Please try again.");
|
|
76
|
+
} finally {
|
|
77
|
+
setLoading(void 0);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
81
|
+
className: styles.root(),
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
84
|
+
isDisabled: Boolean(isLoading),
|
|
85
|
+
size: "md",
|
|
86
|
+
variant: "tertiary",
|
|
87
|
+
onPress: () => copy("prompt"),
|
|
88
|
+
children: [copiedAction === "prompt" ? /* @__PURE__ */ jsx(ClipboardCheck, { size: 16 }) : /* @__PURE__ */ jsx(ChatRound, { size: 16 }), copiedAction === "prompt" ? "Copied" : "Copy Prompt"]
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsxs(ButtonGroup, {
|
|
91
|
+
size: "md",
|
|
92
|
+
variant: "tertiary",
|
|
93
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
94
|
+
isDisabled: Boolean(isLoading),
|
|
95
|
+
onPress: () => copy("markdown"),
|
|
96
|
+
children: [copiedAction === "markdown" ? /* @__PURE__ */ jsx(ClipboardCheck, { size: 16 }) : /* @__PURE__ */ jsx(Copy, { size: 16 }), copiedAction === "markdown" ? "Copied" : "Copy Markdown"]
|
|
97
|
+
}), /* @__PURE__ */ jsxs(Dropdown, {
|
|
98
|
+
isOpen,
|
|
99
|
+
onOpenChange: setOpen,
|
|
100
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
101
|
+
"aria-label": "More page actions",
|
|
102
|
+
isIconOnly: true,
|
|
103
|
+
size: "md",
|
|
104
|
+
variant: "tertiary",
|
|
105
|
+
children: [/* @__PURE__ */ jsx(ButtonGroup.Separator, {}), /* @__PURE__ */ jsx(AltArrowDown, {
|
|
106
|
+
size: 14,
|
|
107
|
+
className: styles.chevron({ open: isOpen })
|
|
108
|
+
})]
|
|
109
|
+
}), /* @__PURE__ */ jsx(Dropdown.Popover, {
|
|
110
|
+
placement: "bottom end",
|
|
111
|
+
children: /* @__PURE__ */ jsx(Dropdown.Menu, {
|
|
112
|
+
"aria-label": "Page actions",
|
|
113
|
+
children: actions.map((action) => {
|
|
114
|
+
const Icon = action.icon;
|
|
115
|
+
const isAI = action.id === "chatgpt" || action.id === "claude";
|
|
116
|
+
return /* @__PURE__ */ jsxs(Dropdown.Item, {
|
|
117
|
+
href: action.href,
|
|
118
|
+
id: action.id,
|
|
119
|
+
rel: "noreferrer noopener",
|
|
120
|
+
target: "_blank",
|
|
121
|
+
textValue: action.title,
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
124
|
+
size: 16,
|
|
125
|
+
className: styles.icon()
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ jsxs("span", {
|
|
128
|
+
className: styles.itemContent(),
|
|
129
|
+
children: [/* @__PURE__ */ jsx("span", { children: action.title }), /* @__PURE__ */ jsx("span", {
|
|
130
|
+
className: styles.description(),
|
|
131
|
+
children: action.description
|
|
132
|
+
})]
|
|
133
|
+
}),
|
|
134
|
+
isAI && /* @__PURE__ */ jsx(SquareArrowUp, {
|
|
135
|
+
size: 14,
|
|
136
|
+
className: styles.externalIcon()
|
|
137
|
+
})
|
|
138
|
+
]
|
|
139
|
+
}, action.id);
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
})]
|
|
143
|
+
})]
|
|
144
|
+
}),
|
|
145
|
+
error && /* @__PURE__ */ jsx("p", {
|
|
146
|
+
role: "alert",
|
|
147
|
+
className: styles.error(),
|
|
148
|
+
children: error
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
//#endregion
|
|
154
|
+
export { PageActions };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const pageActionsVariants: import('tailwind-variants').TVReturnType<{
|
|
2
|
+
open: {
|
|
3
|
+
true: {
|
|
4
|
+
chevron: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
}, {
|
|
8
|
+
root: string;
|
|
9
|
+
chevron: string;
|
|
10
|
+
icon: string;
|
|
11
|
+
itemContent: string;
|
|
12
|
+
description: string;
|
|
13
|
+
externalIcon: string;
|
|
14
|
+
error: string;
|
|
15
|
+
}, undefined, {
|
|
16
|
+
open: {
|
|
17
|
+
true: {
|
|
18
|
+
chevron: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}, {
|
|
22
|
+
root: string;
|
|
23
|
+
chevron: string;
|
|
24
|
+
icon: string;
|
|
25
|
+
itemContent: string;
|
|
26
|
+
description: string;
|
|
27
|
+
externalIcon: string;
|
|
28
|
+
error: string;
|
|
29
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
30
|
+
open: {
|
|
31
|
+
true: {
|
|
32
|
+
chevron: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
root: string;
|
|
37
|
+
chevron: string;
|
|
38
|
+
icon: string;
|
|
39
|
+
itemContent: string;
|
|
40
|
+
description: string;
|
|
41
|
+
externalIcon: string;
|
|
42
|
+
error: string;
|
|
43
|
+
}>>;
|
|
44
|
+
//# sourceMappingURL=page-actions.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-actions.variants.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/page-actions.variants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAY9B,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { tv } from "@vezham/react-v3";
|
|
2
|
+
//#region src/lib/layouts/docs/page-actions.variants.ts
|
|
3
|
+
var pageActionsVariants = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "flex flex-wrap items-center justify-end gap-2",
|
|
6
|
+
chevron: "text-muted transition-transform",
|
|
7
|
+
icon: "mt-0.5 shrink-0",
|
|
8
|
+
itemContent: "flex min-w-0 flex-1 flex-col",
|
|
9
|
+
description: "text-muted text-xs",
|
|
10
|
+
externalIcon: "text-muted",
|
|
11
|
+
error: "text-danger w-full text-sm"
|
|
12
|
+
},
|
|
13
|
+
variants: { open: { true: { chevron: "rotate-180" } } },
|
|
14
|
+
defaultVariants: { open: false }
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { pageActionsVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PageComponents } from './pages';
|
|
3
|
+
type Props = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
markdownUrl?: string;
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
} & Pick<PageComponents, 'Body' | 'Description' | 'Title'>;
|
|
9
|
+
export declare const DocsPageContent: ({ children, description, markdownUrl, title, Body, Description, Title }: Props) => import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=page-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-content.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/page-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAA;IACnB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa,GAAG,OAAO,CAAC,CAAA;AAE1D,eAAO,MAAM,eAAe,GAAI,yEAQ7B,KAAK,gCAWP,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PageActions } from "./page-actions.js";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/lib/layouts/docs/page-content.tsx
|
|
4
|
+
var DocsPageContent = ({ children, description, markdownUrl, title, Body, Description, Title }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5
|
+
title || markdownUrl ? /* @__PURE__ */ jsxs("div", {
|
|
6
|
+
className: "flex flex-col items-start gap-3 lg:flex-row lg:justify-between lg:gap-4",
|
|
7
|
+
children: [title ? /* @__PURE__ */ jsx(Title, { children: title }) : /* @__PURE__ */ jsx("span", {}), markdownUrl ? /* @__PURE__ */ jsx(PageActions, { markdownUrl }) : null]
|
|
8
|
+
}) : null,
|
|
9
|
+
description ? /* @__PURE__ */ jsx(Description, { children: description }) : null,
|
|
10
|
+
/* @__PURE__ */ jsx(Body, { children })
|
|
11
|
+
] });
|
|
12
|
+
//#endregion
|
|
13
|
+
export { DocsPageContent };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { DocsBody, DocsDescription, DocsPage as DocsPagePrimitive, DocsTitle } from '@vezham/docs-react/layouts/docs/page';
|
|
3
|
+
import { DocsBody as NotebookDocsBody, DocsDescription as NotebookDocsDescription, DocsPage as NotebookDocsPage, DocsTitle as NotebookDocsTitle } from '@vezham/docs-react/layouts/notebook/page';
|
|
4
|
+
import { DocsShell } from './types';
|
|
5
|
+
import * as FluxPage from '@vezham/docs-react/layouts/flux/page';
|
|
6
|
+
import * as GlassPage from '@vezham/docs-react/layouts/glass/page';
|
|
7
|
+
export type DocsPageToc = ComponentProps<typeof DocsPagePrimitive>['toc'];
|
|
8
|
+
declare const pages: {
|
|
9
|
+
docs: {
|
|
10
|
+
Page: typeof DocsPagePrimitive;
|
|
11
|
+
Body: typeof DocsBody;
|
|
12
|
+
Description: typeof DocsDescription;
|
|
13
|
+
Title: typeof DocsTitle;
|
|
14
|
+
};
|
|
15
|
+
notebook: {
|
|
16
|
+
Page: typeof NotebookDocsPage;
|
|
17
|
+
Body: typeof NotebookDocsBody;
|
|
18
|
+
Description: typeof NotebookDocsDescription;
|
|
19
|
+
Title: typeof NotebookDocsTitle;
|
|
20
|
+
};
|
|
21
|
+
flux: {
|
|
22
|
+
Page: typeof FluxPage.DocsPage;
|
|
23
|
+
Body: typeof FluxPage.DocsBody;
|
|
24
|
+
Description: typeof FluxPage.DocsDescription;
|
|
25
|
+
Title: typeof FluxPage.DocsTitle;
|
|
26
|
+
};
|
|
27
|
+
glass: {
|
|
28
|
+
Page: typeof GlassPage.DocsPage;
|
|
29
|
+
Body: typeof GlassPage.DocsBody;
|
|
30
|
+
Description: typeof GlassPage.DocsDescription;
|
|
31
|
+
Title: typeof GlassPage.DocsTitle;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type PageComponents = (typeof pages)[keyof typeof pages];
|
|
35
|
+
export declare const getPageComponents: (shell: DocsShell) => {
|
|
36
|
+
Page: typeof DocsPagePrimitive;
|
|
37
|
+
Body: typeof DocsBody;
|
|
38
|
+
Description: typeof DocsDescription;
|
|
39
|
+
Title: typeof DocsTitle;
|
|
40
|
+
} | {
|
|
41
|
+
Page: typeof NotebookDocsPage;
|
|
42
|
+
Body: typeof NotebookDocsBody;
|
|
43
|
+
Description: typeof NotebookDocsDescription;
|
|
44
|
+
Title: typeof NotebookDocsTitle;
|
|
45
|
+
} | {
|
|
46
|
+
Page: typeof FluxPage.DocsPage;
|
|
47
|
+
Body: typeof FluxPage.DocsBody;
|
|
48
|
+
Description: typeof FluxPage.DocsDescription;
|
|
49
|
+
Title: typeof FluxPage.DocsTitle;
|
|
50
|
+
} | {
|
|
51
|
+
Page: typeof GlassPage.DocsPage;
|
|
52
|
+
Body: typeof GlassPage.DocsBody;
|
|
53
|
+
Description: typeof GlassPage.DocsDescription;
|
|
54
|
+
Title: typeof GlassPage.DocsTitle;
|
|
55
|
+
};
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=pages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/pages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EACL,QAAQ,EACR,eAAe,EACf,QAAQ,IAAI,iBAAiB,EAC7B,SAAS,EACV,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAA;AAClE,OAAO,EACL,QAAQ,IAAI,gBAAgB,EAC5B,eAAe,IAAI,uBAAuB,EAC1C,QAAQ,IAAI,gBAAgB,EAC5B,SAAS,IAAI,iBAAiB,EAC/B,MAAM,0CAA0C,CAAA;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,iBAAiB,CAAC,CAAC,KAAK,CAAC,CAAA;AAEzE,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;CAyBV,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,OAAO,KAAK,CAAC,CAAA;AAE/D,eAAO,MAAM,iBAAiB,GAAI,OAAO,SAAS;;;;;;;;;;;;;;;;;;;;CAEjD,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from "@vezham/docs-react/layouts/docs/page";
|
|
2
|
+
import * as FluxPage from "@vezham/docs-react/layouts/flux/page";
|
|
3
|
+
import * as GlassPage from "@vezham/docs-react/layouts/glass/page";
|
|
4
|
+
import { DocsBody as DocsBody$1, DocsDescription as DocsDescription$1, DocsPage as DocsPage$1, DocsTitle as DocsTitle$1 } from "@vezham/docs-react/layouts/notebook/page";
|
|
5
|
+
//#region src/lib/layouts/docs/pages.ts
|
|
6
|
+
var pages = {
|
|
7
|
+
docs: {
|
|
8
|
+
Page: DocsPage,
|
|
9
|
+
Body: DocsBody,
|
|
10
|
+
Description: DocsDescription,
|
|
11
|
+
Title: DocsTitle
|
|
12
|
+
},
|
|
13
|
+
notebook: {
|
|
14
|
+
Page: DocsPage$1,
|
|
15
|
+
Body: DocsBody$1,
|
|
16
|
+
Description: DocsDescription$1,
|
|
17
|
+
Title: DocsTitle$1
|
|
18
|
+
},
|
|
19
|
+
flux: {
|
|
20
|
+
Page: FluxPage.DocsPage,
|
|
21
|
+
Body: FluxPage.DocsBody,
|
|
22
|
+
Description: FluxPage.DocsDescription,
|
|
23
|
+
Title: FluxPage.DocsTitle
|
|
24
|
+
},
|
|
25
|
+
glass: {
|
|
26
|
+
Page: GlassPage.DocsPage,
|
|
27
|
+
Body: GlassPage.DocsBody,
|
|
28
|
+
Description: GlassPage.DocsDescription,
|
|
29
|
+
Title: GlassPage.DocsTitle
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var getPageComponents = (shell) => {
|
|
33
|
+
return pages[shell === "home" ? "docs" : shell];
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { getPageComponents };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { DocsLayout as DocsLayoutPrimitive } from '@vezham/docs-react/layouts/docs';
|
|
3
|
+
import { DocsLayout as NotebookLayoutPrimitive } from '@vezham/docs-react/layouts/notebook';
|
|
4
|
+
import { DocsPageToc } from './pages';
|
|
5
|
+
export type DocsShell = 'docs' | 'flux' | 'glass' | 'home' | 'notebook';
|
|
6
|
+
export type DocsLayoutProps = {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
shell?: DocsShell;
|
|
9
|
+
} & Omit<ComponentProps<typeof DocsLayoutPrimitive>, 'children' | 'sidebar' | 'tabs' | 'tabMode'> & Omit<ComponentProps<typeof NotebookLayoutPrimitive>, 'children' | 'tabs' | 'tabMode'> & Pick<ComponentProps<typeof NotebookLayoutPrimitive>, 'tabs'> & {
|
|
10
|
+
tabMode?: ComponentProps<typeof DocsLayoutPrimitive>['tabMode'] | ComponentProps<typeof NotebookLayoutPrimitive>['tabMode'];
|
|
11
|
+
};
|
|
12
|
+
export type DocsPageProps = {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
full?: boolean;
|
|
16
|
+
markdownUrl?: string;
|
|
17
|
+
shell?: DocsShell;
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
toc: DocsPageToc;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/docs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACnF,OAAO,EAAE,UAAU,IAAI,uBAAuB,EAAE,MAAM,qCAAqC,CAAA;AAE3F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAA;AAEvE,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,GAAG,IAAI,CACN,cAAc,CAAC,OAAO,mBAAmB,CAAC,EAC1C,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAC5C,GACC,IAAI,CACF,cAAc,CAAC,OAAO,uBAAuB,CAAC,EAC9C,UAAU,GAAG,MAAM,GAAG,SAAS,CAChC,GACD,IAAI,CAAC,cAAc,CAAC,OAAO,uBAAuB,CAAC,EAAE,MAAM,CAAC,GAAG;IAC7D,OAAO,CAAC,EACJ,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAC,SAAS,CAAC,GACrD,cAAc,CAAC,OAAO,uBAAuB,CAAC,CAAC,SAAS,CAAC,CAAA;CAC9D,CAAA;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,GAAG,EAAE,WAAW,CAAA;CACjB,CAAA"}
|