onedocs 0.1.2 → 0.1.4

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.
Files changed (54) hide show
  1. package/dist/components/cta-section.d.ts +13 -0
  2. package/dist/components/cta-section.d.ts.map +1 -0
  3. package/dist/components/cta-section.js +4 -0
  4. package/dist/components/dark-mode-fix.d.ts +2 -0
  5. package/dist/components/dark-mode-fix.d.ts.map +1 -0
  6. package/dist/components/dark-mode-fix.js +9 -0
  7. package/dist/components/icons.d.ts +4 -0
  8. package/dist/components/icons.d.ts.map +1 -0
  9. package/dist/components/icons.js +4 -0
  10. package/dist/components/index.d.ts +13 -17
  11. package/dist/components/index.d.ts.map +1 -0
  12. package/dist/components/index.js +12 -53
  13. package/dist/components/install-block.d.ts +4 -6
  14. package/dist/components/install-block.d.ts.map +1 -0
  15. package/dist/components/install-block.js +5 -6
  16. package/dist/components/logo.d.ts +9 -0
  17. package/dist/components/logo.d.ts.map +1 -0
  18. package/dist/components/logo.js +4 -0
  19. package/dist/config.d.ts +13 -14
  20. package/dist/config.d.ts.map +1 -0
  21. package/dist/config.js +7 -6
  22. package/dist/index.d.ts +13 -59
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +11 -221
  25. package/dist/layouts/docs-page.d.ts +9 -0
  26. package/dist/layouts/docs-page.d.ts.map +1 -0
  27. package/dist/layouts/docs-page.js +6 -0
  28. package/dist/layouts/docs.d.ts +10 -0
  29. package/dist/layouts/docs.d.ts.map +1 -0
  30. package/dist/layouts/docs.js +6 -0
  31. package/dist/layouts/home.d.ts +14 -0
  32. package/dist/layouts/home.d.ts.map +1 -0
  33. package/dist/layouts/home.js +13 -0
  34. package/dist/layouts/root.d.ts +7 -0
  35. package/dist/layouts/root.d.ts.map +1 -0
  36. package/dist/layouts/root.js +40 -0
  37. package/dist/layouts/shared.d.ts +4 -0
  38. package/dist/layouts/shared.d.ts.map +1 -0
  39. package/dist/layouts/shared.js +29 -0
  40. package/dist/llms/index.d.ts +8 -8
  41. package/dist/llms/index.d.ts.map +1 -0
  42. package/dist/llms/index.js +87 -93
  43. package/dist/seo/index.d.ts +12 -0
  44. package/dist/seo/index.d.ts.map +1 -0
  45. package/dist/seo/index.js +43 -0
  46. package/dist/source/index.d.ts +6 -9
  47. package/dist/source/index.d.ts.map +1 -0
  48. package/dist/source/index.js +8 -8
  49. package/package.json +10 -6
  50. package/dist/chunk-EKYRMBZ6.js +0 -14
  51. package/dist/chunk-I3NBXJTK.js +0 -26
  52. package/dist/chunk-TKN3PLPZ.js +0 -37
  53. package/dist/chunk-WWULBBXM.js +0 -12
  54. package/dist/logo-BKLMVPA6.d.ts +0 -11
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from "react";
2
+ interface CTASectionProps {
3
+ title: string;
4
+ description?: string;
5
+ cta: {
6
+ label: string;
7
+ href: string;
8
+ };
9
+ children?: ReactNode;
10
+ }
11
+ export declare function CTASection({ title, description, cta, children }: CTASectionProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=cta-section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cta-section.d.ts","sourceRoot":"","sources":["../../src/components/cta-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE;QACH,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAsBhF"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function CTASection({ title, description, cta, children }) {
3
+ return (_jsx("section", { children: _jsxs("div", { className: "flex flex-col items-center justify-center text-center py-16 px-6", children: [_jsx("h2", { className: "text-2xl font-semibold text-fd-foreground sm:text-3xl", children: title }), description && (_jsx("p", { className: "mt-2 text-fd-muted-foreground max-w-md", children: description })), _jsx("a", { href: cta.href, className: "mt-6 inline-flex h-10 items-center justify-center rounded-lg bg-fd-primary px-6 text-sm font-medium text-fd-primary-foreground shadow transition-colors hover:bg-fd-primary/90", children: cta.label }), children] }) }));
4
+ }
@@ -0,0 +1,2 @@
1
+ export declare function DarkModeFix(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=dark-mode-fix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dark-mode-fix.d.ts","sourceRoot":"","sources":["../../src/components/dark-mode-fix.tsx"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,4CAW1B"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function DarkModeFix() {
3
+ return (_jsx("style", { dangerouslySetInnerHTML: {
4
+ __html: `.dark *, .dark *::before, .dark *::after { border-color: hsl(0 0% 20%) }
5
+ @media (prefers-color-scheme: dark) {
6
+ html:not(.light) *, html:not(.light) *::before, html:not(.light) *::after { border-color: hsl(0 0% 20%) }
7
+ }`,
8
+ } }));
9
+ }
@@ -0,0 +1,4 @@
1
+ export declare function GitHubIcon({ className }: {
2
+ className?: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/components/icons.tsx"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAY/D"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function GitHubIcon({ className }) {
3
+ return (_jsx("svg", { role: "img", "aria-label": "GitHub", viewBox: "0 0 24 24", fill: "currentColor", className: className ?? "size-5", children: _jsx("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" }) }));
4
+ }
@@ -1,17 +1,13 @@
1
- export { Callout } from 'fumadocs-ui/components/callout';
2
- export { Card, Cards } from 'fumadocs-ui/components/card';
3
- export { Tab, Tabs } from 'fumadocs-ui/components/tabs';
4
- export { Step, Steps } from 'fumadocs-ui/components/steps';
5
- export { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
6
- export { CodeBlock } from 'fumadocs-ui/components/codeblock';
7
- export { ImageZoom } from 'fumadocs-ui/components/image-zoom';
8
- export { TypeTable } from 'fumadocs-ui/components/type-table';
9
- export { File, Files, Folder } from 'fumadocs-ui/components/files';
10
- export { InstallBlock } from './install-block.js';
11
- import * as react_jsx_runtime from 'react/jsx-runtime';
12
- export { L as Logo } from '../logo-BKLMVPA6.js';
13
- import 'react';
14
-
15
- declare function DarkModeFix(): react_jsx_runtime.JSX.Element;
16
-
17
- export { DarkModeFix };
1
+ export { Callout } from "fumadocs-ui/components/callout";
2
+ export { Card, Cards } from "fumadocs-ui/components/card";
3
+ export { Tab, Tabs } from "fumadocs-ui/components/tabs";
4
+ export { Steps, Step } from "fumadocs-ui/components/steps";
5
+ export { Accordion, Accordions } from "fumadocs-ui/components/accordion";
6
+ export { CodeBlock } from "fumadocs-ui/components/codeblock";
7
+ export { ImageZoom } from "fumadocs-ui/components/image-zoom";
8
+ export { TypeTable } from "fumadocs-ui/components/type-table";
9
+ export { File, Folder, Files } from "fumadocs-ui/components/files";
10
+ export { InstallBlock } from "./install-block";
11
+ export { DarkModeFix } from "./dark-mode-fix";
12
+ export { Logo } from "./logo";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,53 +1,12 @@
1
- import {
2
- Logo
3
- } from "../chunk-I3NBXJTK.js";
4
- import {
5
- InstallBlock
6
- } from "../chunk-TKN3PLPZ.js";
7
-
8
- // src/components/index.ts
9
- import { Callout } from "fumadocs-ui/components/callout";
10
- import { Card, Cards } from "fumadocs-ui/components/card";
11
- import { Tab, Tabs } from "fumadocs-ui/components/tabs";
12
- import { Steps, Step } from "fumadocs-ui/components/steps";
13
- import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
14
- import { CodeBlock } from "fumadocs-ui/components/codeblock";
15
- import { ImageZoom } from "fumadocs-ui/components/image-zoom";
16
- import { TypeTable } from "fumadocs-ui/components/type-table";
17
- import { File, Folder, Files } from "fumadocs-ui/components/files";
18
-
19
- // src/components/dark-mode-fix.tsx
20
- import { jsx } from "react/jsx-runtime";
21
- function DarkModeFix() {
22
- return /* @__PURE__ */ jsx(
23
- "style",
24
- {
25
- dangerouslySetInnerHTML: {
26
- __html: `.dark *, .dark *::before, .dark *::after { border-color: hsl(0 0% 20%) }
27
- @media (prefers-color-scheme: dark) {
28
- html:not(.light) *, html:not(.light) *::before, html:not(.light) *::after { border-color: hsl(0 0% 20%) }
29
- }`
30
- }
31
- }
32
- );
33
- }
34
- export {
35
- Accordion,
36
- Accordions,
37
- Callout,
38
- Card,
39
- Cards,
40
- CodeBlock,
41
- DarkModeFix,
42
- File,
43
- Files,
44
- Folder,
45
- ImageZoom,
46
- InstallBlock,
47
- Logo,
48
- Step,
49
- Steps,
50
- Tab,
51
- Tabs,
52
- TypeTable
53
- };
1
+ export { Callout } from "fumadocs-ui/components/callout";
2
+ export { Card, Cards } from "fumadocs-ui/components/card";
3
+ export { Tab, Tabs } from "fumadocs-ui/components/tabs";
4
+ export { Steps, Step } from "fumadocs-ui/components/steps";
5
+ export { Accordion, Accordions } from "fumadocs-ui/components/accordion";
6
+ export { CodeBlock } from "fumadocs-ui/components/codeblock";
7
+ export { ImageZoom } from "fumadocs-ui/components/image-zoom";
8
+ export { TypeTable } from "fumadocs-ui/components/type-table";
9
+ export { File, Folder, Files } from "fumadocs-ui/components/files";
10
+ export { InstallBlock } from "./install-block";
11
+ export { DarkModeFix } from "./dark-mode-fix";
12
+ export { Logo } from "./logo";
@@ -1,12 +1,10 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
-
1
+ import type { ReactNode } from "react";
4
2
  interface InstallBlockProps {
5
3
  title?: string;
6
4
  description?: string;
7
5
  packageName: string;
8
6
  children?: ReactNode;
9
7
  }
10
- declare function InstallBlock({ title, description, packageName, children, }: InstallBlockProps): react_jsx_runtime.JSX.Element;
11
-
12
- export { InstallBlock };
8
+ export declare function InstallBlock({ title, description, packageName, children, }: InstallBlockProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=install-block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-block.d.ts","sourceRoot":"","sources":["../../src/components/install-block.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,WAAW,EACX,QAAQ,GACT,EAAE,iBAAiB,2CAsCnB"}
@@ -1,6 +1,5 @@
1
- import {
2
- InstallBlock
3
- } from "../chunk-TKN3PLPZ.js";
4
- export {
5
- InstallBlock
6
- };
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Tabs, Tab } from "fumadocs-ui/components/tabs";
3
+ export function InstallBlock({ title, description, packageName, children, }) {
4
+ return (_jsxs("div", { children: [title && (_jsx("h1", { className: "mb-4 text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl", children: title })), description && (_jsx("p", { className: "text-fd-muted-foreground mb-6 text-balance", children: description })), _jsxs(Tabs, { groupId: "pm", items: ["npm", "yarn", "pnpm", "bun"], className: "!mb-0", children: [_jsx(Tab, { value: "npm", children: _jsxs("code", { className: "block rounded bg-fd-secondary px-3 py-2 text-sm", children: ["npm i ", packageName] }) }), _jsx(Tab, { value: "yarn", children: _jsxs("code", { className: "block rounded bg-fd-secondary px-3 py-2 text-sm", children: ["yarn add ", packageName] }) }), _jsx(Tab, { value: "pnpm", children: _jsxs("code", { className: "block rounded bg-fd-secondary px-3 py-2 text-sm", children: ["pnpm add ", packageName] }) }), _jsx(Tab, { value: "bun", children: _jsxs("code", { className: "block rounded bg-fd-secondary px-3 py-2 text-sm", children: ["bun add ", packageName] }) })] }), children && (_jsx("div", { className: "mt-6", children: children }))] }));
5
+ }
@@ -0,0 +1,9 @@
1
+ interface LogoProps {
2
+ light: string;
3
+ dark: string;
4
+ alt?: string;
5
+ className?: string;
6
+ }
7
+ export declare function Logo({ light, dark, alt, className }: LogoProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=logo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../src/components/logo.tsx"],"names":[],"mappings":"AAAA,UAAU,SAAS;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAY,EAAE,SAAS,EAAE,EAAE,SAAS,2CAevE"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function Logo({ light, dark, alt = "Logo", className }) {
3
+ return (_jsxs(_Fragment, { children: [_jsx("img", { src: light, alt: alt, className: `dark:hidden ${className ?? ""}` }), _jsx("img", { src: dark, alt: alt, className: `hidden dark:block ${className ?? ""}` })] }));
4
+ }
package/dist/config.d.ts CHANGED
@@ -1,35 +1,35 @@
1
- import { ReactNode } from 'react';
2
-
3
- interface NavLink {
1
+ import type { ReactNode } from "react";
2
+ export interface NavLink {
4
3
  label: string;
5
4
  href: string;
6
5
  }
7
- interface HeroConfig {
8
- title?: string;
9
- description?: string;
6
+ export interface HeroConfig {
7
+ title?: ReactNode;
8
+ description?: ReactNode;
10
9
  cta?: {
11
10
  label: string;
12
11
  href: string;
13
12
  };
13
+ right?: ReactNode;
14
14
  }
15
- interface FeatureConfig {
15
+ export interface FeatureConfig {
16
16
  title: string;
17
17
  description: string;
18
18
  icon?: ReactNode;
19
19
  }
20
- interface HomepageConfig {
20
+ export interface HomepageConfig {
21
21
  hero?: HeroConfig;
22
22
  features?: FeatureConfig[];
23
23
  }
24
- interface ThemeConfig {
24
+ export interface ThemeConfig {
25
25
  primaryColor?: string;
26
26
  darkMode?: boolean;
27
27
  }
28
- interface I18nConfig {
28
+ export interface I18nConfig {
29
29
  defaultLanguage: string;
30
30
  languages: string[];
31
31
  }
32
- interface OnedocsConfig {
32
+ export interface OnedocsConfig {
33
33
  title: string;
34
34
  description?: string;
35
35
  logo?: string | {
@@ -48,6 +48,5 @@ interface OnedocsConfig {
48
48
  theme?: ThemeConfig;
49
49
  i18n?: I18nConfig;
50
50
  }
51
- declare function defineConfig(config: OnedocsConfig): OnedocsConfig;
52
-
53
- export { type FeatureConfig, type HeroConfig, type HomepageConfig, type I18nConfig, type NavLink, type OnedocsConfig, type ThemeConfig, defineConfig };
51
+ export declare function defineConfig(config: OnedocsConfig): OnedocsConfig;
52
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,GAAG,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE;QACJ,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,IAAI,CAAC,EAAE;QACL,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAMjE"}
package/dist/config.js CHANGED
@@ -1,6 +1,7 @@
1
- import {
2
- defineConfig
3
- } from "./chunk-WWULBBXM.js";
4
- export {
5
- defineConfig
6
- };
1
+ export function defineConfig(config) {
2
+ return {
3
+ docs: { dir: "content/docs" },
4
+ theme: { darkMode: true },
5
+ ...config,
6
+ };
7
+ }
package/dist/index.d.ts CHANGED
@@ -1,59 +1,13 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
- import { OnedocsConfig } from './config.js';
4
- export { defineConfig } from './config.js';
5
- import { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
6
- export { createSource } from './source/index.js';
7
- export { InstallBlock } from './components/install-block.js';
8
- export { L as Logo } from './logo-BKLMVPA6.js';
9
- export { DocsBody } from 'fumadocs-ui/page';
10
- export { loader } from 'fumadocs-core/source';
11
-
12
- interface RootLayoutProps {
13
- children: ReactNode;
14
- }
15
- declare function RootLayout({ children }: RootLayoutProps): react_jsx_runtime.JSX.Element;
16
-
17
- interface DocsLayoutProps {
18
- config: OnedocsConfig;
19
- pageTree: any;
20
- children: ReactNode;
21
- }
22
- declare function DocsLayout({ config, pageTree, children }: DocsLayoutProps): react_jsx_runtime.JSX.Element;
23
-
24
- interface DocsPageProps {
25
- toc?: any[];
26
- children: ReactNode;
27
- }
28
- declare function DocsPage({ toc, children }: DocsPageProps): react_jsx_runtime.JSX.Element;
29
-
30
- interface HomeLayoutProps {
31
- config: OnedocsConfig;
32
- children?: React.ReactNode;
33
- }
34
- declare function HomeLayout({ config, children }: HomeLayoutProps): react_jsx_runtime.JSX.Element;
35
- interface HomePageProps {
36
- config: OnedocsConfig;
37
- packageName?: string;
38
- children?: React.ReactNode;
39
- }
40
- declare function HomePage({ config, packageName, children }: HomePageProps): react_jsx_runtime.JSX.Element;
41
-
42
- declare function createBaseOptions(config: OnedocsConfig): BaseLayoutProps;
43
-
44
- declare function GitHubIcon({ className }: {
45
- className?: string;
46
- }): react_jsx_runtime.JSX.Element;
47
-
48
- interface CTASectionProps {
49
- title: string;
50
- description?: string;
51
- cta: {
52
- label: string;
53
- href: string;
54
- };
55
- children?: ReactNode;
56
- }
57
- declare function CTASection({ title, description, cta, children }: CTASectionProps): react_jsx_runtime.JSX.Element;
58
-
59
- export { CTASection, DocsLayout, DocsPage, GitHubIcon, HomeLayout, HomePage, OnedocsConfig, RootLayout, createBaseOptions };
1
+ export { RootLayout } from "./layouts/root";
2
+ export { DocsLayout } from "./layouts/docs";
3
+ export { DocsPage, DocsBody } from "./layouts/docs-page";
4
+ export { HomeLayout, HomePage } from "./layouts/home";
5
+ export { createBaseOptions } from "./layouts/shared";
6
+ export { defineConfig } from "./config";
7
+ export type { OnedocsConfig } from "./config";
8
+ export { createSource, loader } from "./source";
9
+ export { InstallBlock } from "./components/install-block";
10
+ export { Logo } from "./components/logo";
11
+ export { GitHubIcon } from "./components/icons";
12
+ export { CTASection } from "./components/cta-section";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC"}
package/dist/index.js CHANGED
@@ -1,221 +1,11 @@
1
- import {
2
- defineConfig
3
- } from "./chunk-WWULBBXM.js";
4
- import {
5
- Logo
6
- } from "./chunk-I3NBXJTK.js";
7
- import {
8
- InstallBlock
9
- } from "./chunk-TKN3PLPZ.js";
10
- import {
11
- createSource,
12
- loader
13
- } from "./chunk-EKYRMBZ6.js";
14
-
15
- // src/layouts/root.tsx
16
- import { RootProvider } from "fumadocs-ui/provider/tanstack";
17
- import { FrameworkProvider } from "fumadocs-core/framework";
18
- import {
19
- Link,
20
- useParams,
21
- useRouter,
22
- useRouterState
23
- } from "@tanstack/react-router";
24
- import { useMemo, useRef } from "react";
25
- import { jsx } from "react/jsx-runtime";
26
- function RootLayout({ children }) {
27
- return /* @__PURE__ */ jsx(
28
- FrameworkProvider,
29
- {
30
- Link: FrameworkLink,
31
- usePathname,
32
- useRouter: useFrameworkRouter,
33
- useParams: useFrameworkParams,
34
- children: /* @__PURE__ */ jsx(RootProvider, { children })
35
- }
36
- );
37
- }
38
- function FrameworkLink({
39
- href,
40
- prefetch = true,
41
- ...props
42
- }) {
43
- return /* @__PURE__ */ jsx(Link, { to: href ?? "#", preload: prefetch ? "intent" : false, ...props, children: props.children });
44
- }
45
- function usePathname() {
46
- const { isLoading, pathname } = useRouterState({
47
- select: (state) => ({
48
- isLoading: state.isLoading,
49
- pathname: state.location.pathname
50
- })
51
- });
52
- const activePathname = useRef(pathname);
53
- return useMemo(() => {
54
- if (isLoading) return activePathname.current;
55
- activePathname.current = pathname;
56
- return pathname;
57
- }, [isLoading, pathname]);
58
- }
59
- function useFrameworkRouter() {
60
- const router = useRouter();
61
- return useMemo(
62
- () => ({
63
- push(url) {
64
- router.navigate({ href: url });
65
- },
66
- refresh() {
67
- router.invalidate();
68
- }
69
- }),
70
- [router]
71
- );
72
- }
73
- function useFrameworkParams() {
74
- return useParams({ strict: false });
75
- }
76
-
77
- // src/layouts/docs.tsx
78
- import { DocsLayout as FumaDocsLayout } from "fumadocs-ui/layouts/docs";
79
-
80
- // src/components/icons.tsx
81
- import { jsx as jsx2 } from "react/jsx-runtime";
82
- function GitHubIcon({ className }) {
83
- return /* @__PURE__ */ jsx2(
84
- "svg",
85
- {
86
- role: "img",
87
- "aria-label": "GitHub",
88
- viewBox: "0 0 24 24",
89
- fill: "currentColor",
90
- className: className ?? "size-5",
91
- children: /* @__PURE__ */ jsx2("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })
92
- }
93
- );
94
- }
95
-
96
- // src/layouts/shared.tsx
97
- import { jsx as jsx3 } from "react/jsx-runtime";
98
- function createBaseOptions(config) {
99
- const links = (config.nav?.links ?? []).map((link) => ({
100
- type: "main",
101
- text: link.label,
102
- url: link.href
103
- }));
104
- if (config.nav?.github) {
105
- links.push({
106
- type: "icon",
107
- text: "GitHub",
108
- icon: /* @__PURE__ */ jsx3(GitHubIcon, {}),
109
- url: `https://github.com/${config.nav.github}`
110
- });
111
- }
112
- const navTitle = config.logo ? typeof config.logo === "string" ? /* @__PURE__ */ jsx3("img", { src: config.logo, alt: config.title, className: "h-6" }) : /* @__PURE__ */ jsx3(Logo, { light: config.logo.light, dark: config.logo.dark, alt: config.title, className: "h-6" }) : config.title;
113
- return {
114
- nav: {
115
- title: navTitle
116
- },
117
- links
118
- };
119
- }
120
-
121
- // src/layouts/docs.tsx
122
- import { jsx as jsx4 } from "react/jsx-runtime";
123
- function DocsLayout({ config, pageTree, children }) {
124
- return /* @__PURE__ */ jsx4(FumaDocsLayout, { ...createBaseOptions(config), tree: pageTree, children });
125
- }
126
-
127
- // src/layouts/docs-page.tsx
128
- import { DocsPage as FumaDocsPage, DocsBody } from "fumadocs-ui/page";
129
- import { jsx as jsx5 } from "react/jsx-runtime";
130
- function DocsPage({ toc, children }) {
131
- return /* @__PURE__ */ jsx5(FumaDocsPage, { toc, children: /* @__PURE__ */ jsx5(DocsBody, { children }) });
132
- }
133
-
134
- // src/layouts/home.tsx
135
- import { HomeLayout as FumaHomeLayout } from "fumadocs-ui/layouts/home";
136
- import { jsx as jsx6, jsxs } from "react/jsx-runtime";
137
- function HomeLayout({ config, children }) {
138
- return /* @__PURE__ */ jsx6(FumaHomeLayout, { ...createBaseOptions(config), children });
139
- }
140
- function HomePage({ config, packageName, children }) {
141
- const { homepage } = config;
142
- const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
143
- return /* @__PURE__ */ jsx6(HomeLayout, { config, children: /* @__PURE__ */ jsxs("main", { className: "flex-1 flex flex-col min-h-[calc(100vh-var(--fd-nav-height))]", children: [
144
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col relative mx-auto w-full max-w-(--fd-layout-width)", children: [
145
- /* @__PURE__ */ jsx6("div", { className: "absolute inset-0 border-x pointer-events-none" }),
146
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
147
- /* @__PURE__ */ jsx6("section", { id: "hero", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-4", children: [
148
- /* @__PURE__ */ jsxs("div", { className: "lg:col-span-2 p-6 lg:p-12", children: [
149
- /* @__PURE__ */ jsx6("h1", { className: "text-left text-4xl font-semibold leading-tight text-fd-foreground sm:text-5xl md:text-6xl tracking-tight", children: homepage?.hero?.title ?? config.title }),
150
- /* @__PURE__ */ jsx6("p", { className: "text-left max-w-xl leading-normal text-fd-muted-foreground sm:text-lg sm:leading-normal text-balance mt-4", children: homepage?.hero?.description ?? config.description }),
151
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-end gap-4 mt-8 w-full", children: [
152
- packageName && /* @__PURE__ */ jsx6("div", { className: "flex-1", children: /* @__PURE__ */ jsx6(InstallBlock, { packageName }) }),
153
- /* @__PURE__ */ jsx6(
154
- "a",
155
- {
156
- href: homepage?.hero?.cta?.href ?? "/docs",
157
- className: "inline-flex h-10 items-center justify-center rounded-lg bg-fd-primary px-6 text-sm font-medium text-fd-primary-foreground shadow transition-colors hover:bg-fd-primary/90 whitespace-nowrap",
158
- children: homepage?.hero?.cta?.label ?? "Get Started"
159
- }
160
- )
161
- ] })
162
- ] }),
163
- /* @__PURE__ */ jsx6("div", { className: "lg:col-span-2 hidden lg:block" })
164
- ] }) }),
165
- homepage?.features && homepage.features.length > 0 && /* @__PURE__ */ jsx6("section", { id: "features", children: /* @__PURE__ */ jsx6("div", { className: "border-y", children: /* @__PURE__ */ jsx6("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 [&>*]:border-b [&>*:nth-last-child(-n+1)]:border-b-0 sm:[&>*:nth-last-child(-n+2)]:border-b-0 lg:[&>*:nth-last-child(-n+4)]:border-b-0", children: homepage.features.map((feature) => /* @__PURE__ */ jsxs(
166
- "div",
167
- {
168
- className: "flex flex-col gap-y-2 items-start justify-start py-8 px-6 transition-colors hover:bg-fd-secondary/20 sm:border-r sm:[&:nth-child(2n)]:border-r-0 lg:[&:nth-child(2n)]:border-r lg:[&:nth-child(4n)]:border-r-0",
169
- children: [
170
- feature.icon && /* @__PURE__ */ jsx6("div", { className: "bg-fd-primary/10 p-2 rounded-lg mb-2", children: feature.icon }),
171
- /* @__PURE__ */ jsx6("h3", { className: "text-base font-medium text-fd-card-foreground", children: feature.title }),
172
- /* @__PURE__ */ jsx6("p", { className: "text-sm text-fd-muted-foreground", children: feature.description })
173
- ]
174
- },
175
- feature.title
176
- )) }) }) })
177
- ] }),
178
- children && /* @__PURE__ */ jsx6("div", { className: "flex-1 flex items-center justify-center", children })
179
- ] }),
180
- /* @__PURE__ */ jsx6("footer", { className: "relative mx-auto w-full max-w-(--fd-layout-width)", children: /* @__PURE__ */ jsx6("div", { className: "border-x border-t px-6 py-4", children: /* @__PURE__ */ jsxs("p", { className: "text-sm text-fd-muted-foreground", children: [
181
- "\xA9 ",
182
- currentYear,
183
- " ",
184
- config.title
185
- ] }) }) })
186
- ] }) });
187
- }
188
-
189
- // src/components/cta-section.tsx
190
- import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
191
- function CTASection({ title, description, cta, children }) {
192
- return /* @__PURE__ */ jsx7("section", { children: /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center justify-center text-center py-16 px-6", children: [
193
- /* @__PURE__ */ jsx7("h2", { className: "text-2xl font-semibold text-fd-foreground sm:text-3xl", children: title }),
194
- description && /* @__PURE__ */ jsx7("p", { className: "mt-2 text-fd-muted-foreground max-w-md", children: description }),
195
- /* @__PURE__ */ jsx7(
196
- "a",
197
- {
198
- href: cta.href,
199
- className: "mt-6 inline-flex h-10 items-center justify-center rounded-lg bg-fd-primary px-6 text-sm font-medium text-fd-primary-foreground shadow transition-colors hover:bg-fd-primary/90",
200
- children: cta.label
201
- }
202
- ),
203
- children
204
- ] }) });
205
- }
206
- export {
207
- CTASection,
208
- DocsBody,
209
- DocsLayout,
210
- DocsPage,
211
- GitHubIcon,
212
- HomeLayout,
213
- HomePage,
214
- InstallBlock,
215
- Logo,
216
- RootLayout,
217
- createBaseOptions,
218
- createSource,
219
- defineConfig,
220
- loader
221
- };
1
+ export { RootLayout } from "./layouts/root";
2
+ export { DocsLayout } from "./layouts/docs";
3
+ export { DocsPage, DocsBody } from "./layouts/docs-page";
4
+ export { HomeLayout, HomePage } from "./layouts/home";
5
+ export { createBaseOptions } from "./layouts/shared";
6
+ export { defineConfig } from "./config";
7
+ export { createSource, loader } from "./source";
8
+ export { InstallBlock } from "./components/install-block";
9
+ export { Logo } from "./components/logo";
10
+ export { GitHubIcon } from "./components/icons";
11
+ export { CTASection } from "./components/cta-section";
@@ -0,0 +1,9 @@
1
+ import { DocsBody } from "fumadocs-ui/page";
2
+ import type { ReactNode } from "react";
3
+ interface DocsPageProps {
4
+ toc?: any[];
5
+ children: ReactNode;
6
+ }
7
+ export declare function DocsPage({ toc, children }: DocsPageProps): import("react/jsx-runtime").JSX.Element;
8
+ export { DocsBody };
9
+ //# sourceMappingURL=docs-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs-page.d.ts","sourceRoot":"","sources":["../../src/layouts/docs-page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,aAAa;IACrB,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IACZ,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAMxD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DocsPage as FumaDocsPage, DocsBody } from "fumadocs-ui/page";
3
+ export function DocsPage({ toc, children }) {
4
+ return (_jsx(FumaDocsPage, { toc: toc, children: _jsx(DocsBody, { children: children }) }));
5
+ }
6
+ export { DocsBody };
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from "react";
2
+ import type { OnedocsConfig } from "../config";
3
+ interface DocsLayoutProps {
4
+ config: OnedocsConfig;
5
+ pageTree: any;
6
+ children: ReactNode;
7
+ }
8
+ export declare function DocsLayout({ config, pageTree, children }: DocsLayoutProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=docs.d.ts.map