onedocs 0.1.4 → 0.1.7

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.
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from "react";
2
+ interface ButtonProps {
3
+ href: string;
4
+ children: ReactNode;
5
+ className?: string;
6
+ }
7
+ export declare function Button({ href, children, className }: ButtonProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAc,EAAE,EAAE,WAAW,2CASrE"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function Button({ href, children, className = "" }) {
3
+ return (_jsx("a", { href: href, className: `inline-flex items-center justify-center rounded-full bg-fd-primary px-4 py-2 text-sm font-medium text-fd-primary-foreground transition-colors hover:bg-fd-primary/90 whitespace-nowrap ${className}`, children: children }));
4
+ }
@@ -1 +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"}
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;AAGvC,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,2CAmBhF"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button } from "./button";
2
3
  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
+ 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(Button, { href: cta.href, className: "mt-6", children: cta.label }), children] }) }));
4
5
  }
@@ -8,6 +8,7 @@ export { ImageZoom } from "fumadocs-ui/components/image-zoom";
8
8
  export { TypeTable } from "fumadocs-ui/components/type-table";
9
9
  export { File, Folder, Files } from "fumadocs-ui/components/files";
10
10
  export { InstallBlock } from "./install-block";
11
+ export { Button } from "./button";
11
12
  export { DarkModeFix } from "./dark-mode-fix";
12
13
  export { Logo } from "./logo";
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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
+ {"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,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
@@ -8,5 +8,6 @@ export { ImageZoom } from "fumadocs-ui/components/image-zoom";
8
8
  export { TypeTable } from "fumadocs-ui/components/type-table";
9
9
  export { File, Folder, Files } from "fumadocs-ui/components/files";
10
10
  export { InstallBlock } from "./install-block";
11
+ export { Button } from "./button";
11
12
  export { DarkModeFix } from "./dark-mode-fix";
12
13
  export { Logo } from "./logo";
@@ -1 +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
+ {"version":3,"file":"install-block.d.ts","sourceRoot":"","sources":["../../src/components/install-block.tsx"],"names":[],"mappings":"AAEA,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,2CA8BnB"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Tabs, Tab } from "fumadocs-ui/components/tabs";
3
+ import { DynamicCodeBlock } from "fumadocs-ui/components/dynamic-codeblock";
3
4
  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
+ 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", className: "!py-0 !px-4", children: _jsx(DynamicCodeBlock, { lang: "bash", code: `npm i ${packageName}`, codeblock: { className: "!my-0" } }) }), _jsx(Tab, { value: "yarn", className: "!py-0 !px-4", children: _jsx(DynamicCodeBlock, { lang: "bash", code: `yarn add ${packageName}`, codeblock: { className: "!my-0" } }) }), _jsx(Tab, { value: "pnpm", className: "!py-0 !px-4", children: _jsx(DynamicCodeBlock, { lang: "bash", code: `pnpm add ${packageName}`, codeblock: { className: "!my-0" } }) }), _jsx(Tab, { value: "bun", className: "!py-0 !px-4", children: _jsx(DynamicCodeBlock, { lang: "bash", code: `bun add ${packageName}`, codeblock: { className: "!my-0" } }) })] }), children && (_jsx("div", { className: "mt-6", children: children }))] }));
5
6
  }
package/dist/config.d.ts CHANGED
@@ -10,6 +10,7 @@ export interface HeroConfig {
10
10
  label: string;
11
11
  href: string;
12
12
  };
13
+ left?: ReactNode;
13
14
  right?: ReactNode;
14
15
  }
15
16
  export interface FeatureConfig {
@@ -1 +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,WA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wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAMjE"}
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { defineConfig } from "./config";
7
7
  export type { OnedocsConfig } from "./config";
8
8
  export { createSource, loader } from "./source";
9
9
  export { InstallBlock } from "./components/install-block";
10
+ export { Button } from "./components/button";
10
11
  export { Logo } from "./components/logo";
11
12
  export { GitHubIcon } from "./components/icons";
12
13
  export { CTASection } from "./components/cta-section";
@@ -1 +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"}
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,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,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
@@ -6,6 +6,7 @@ export { createBaseOptions } from "./layouts/shared";
6
6
  export { defineConfig } from "./config";
7
7
  export { createSource, loader } from "./source";
8
8
  export { InstallBlock } from "./components/install-block";
9
+ export { Button } from "./components/button";
9
10
  export { Logo } from "./components/logo";
10
11
  export { GitHubIcon } from "./components/icons";
11
12
  export { CTASection } from "./components/cta-section";
@@ -1 +1 @@
1
- {"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../../src/layouts/home.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAI/C,UAAU,eAAe;IACvB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAI/D;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAyFxE"}
1
+ {"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../../src/layouts/home.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAK/C,UAAU,eAAe;IACvB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAI/D;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,aAAa,2CA6FxE"}
@@ -1,13 +1,15 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { HomeLayout as FumaHomeLayout } from "fumadocs-ui/layouts/home";
3
3
  import { createBaseOptions } from "./shared";
4
4
  import { InstallBlock } from "../components/install-block";
5
+ import { Button } from "../components/button";
5
6
  export function HomeLayout({ config, children }) {
6
7
  return (_jsx(FumaHomeLayout, { ...createBaseOptions(config), children: children }));
7
8
  }
8
9
  export function HomePage({ config, packageName, children }) {
9
10
  const { homepage } = config;
11
+ const heroLeft = homepage?.hero?.left;
10
12
  const heroRight = homepage?.hero?.right;
11
13
  const currentYear = new Date().getFullYear();
12
- return (_jsx(HomeLayout, { config: config, children: _jsxs("main", { className: "flex-1 flex flex-col min-h-[calc(100vh-var(--fd-nav-height))]", children: [_jsxs("div", { className: "flex-1 flex flex-col relative mx-auto w-full max-w-(--fd-layout-width)", children: [_jsx("div", { className: "absolute inset-0 border-x pointer-events-none" }), _jsxs("div", { className: "relative", children: [_jsx("section", { id: "hero", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-4", children: [_jsxs("div", { className: "lg:col-span-2 p-6 lg:p-12", children: [_jsx("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 }), _jsx("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 }), _jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-end gap-4 mt-8 w-full", children: [packageName && (_jsx("div", { className: "flex-1", children: _jsx(InstallBlock, { packageName: packageName }) })), _jsx("a", { href: homepage?.hero?.cta?.href ?? "/docs", 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", children: homepage?.hero?.cta?.label ?? "Get Started" })] })] }), _jsx("div", { className: "lg:col-span-2 hidden lg:block", children: heroRight ? (_jsx("div", { className: "flex h-full items-start p-6 lg:p-12", children: heroRight })) : null })] }) }), homepage?.features && homepage.features.length > 0 && (_jsx("section", { id: "features", children: _jsx("div", { className: "border-y", children: _jsx("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) => (_jsxs("div", { 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", children: [feature.icon && (_jsx("div", { className: "bg-fd-primary/10 p-2 rounded-lg mb-2", children: feature.icon })), _jsx("h3", { className: "text-base font-medium text-fd-card-foreground", children: feature.title }), _jsx("p", { className: "text-sm text-fd-muted-foreground", children: feature.description })] }, feature.title))) }) }) }))] }), children && (_jsx("div", { className: "flex-1 flex items-center justify-center", children: children }))] }), _jsx("footer", { className: "relative mx-auto w-full max-w-(--fd-layout-width)", children: _jsx("div", { className: "border-x border-t px-6 py-4", children: _jsxs("p", { className: "text-sm text-fd-muted-foreground", children: ["\u00A9 ", currentYear, " ", config.title] }) }) })] }) }));
14
+ return (_jsx(HomeLayout, { config: config, children: _jsxs("main", { className: "flex-1 flex flex-col min-h-[calc(100vh-var(--fd-nav-height))]", children: [_jsxs("div", { className: "flex-1 flex flex-col relative mx-auto w-full max-w-(--fd-layout-width)", children: [_jsx("div", { className: "absolute inset-0 border-x pointer-events-none" }), _jsxs("div", { className: "relative", children: [_jsx("section", { id: "hero", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-4", children: [_jsx("div", { className: "lg:col-span-2 p-6 lg:p-12", children: heroLeft ? (heroLeft) : (_jsxs(_Fragment, { children: [_jsx("h1", { className: "text-left text-4xl font-medium leading-tight text-fd-foreground sm:text-5xl", children: homepage?.hero?.title ?? config.title }), _jsx("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 }), _jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-end gap-4 mt-8 w-full", children: [packageName && (_jsx("div", { className: "flex-1", children: _jsx(InstallBlock, { packageName: packageName }) })), _jsx(Button, { href: homepage?.hero?.cta?.href ?? "/docs", children: homepage?.hero?.cta?.label ?? "Get Started" })] })] })) }), _jsx("div", { className: "lg:col-span-2 hidden lg:block", children: heroRight ? (_jsx("div", { className: "flex h-full items-center p-6 lg:p-12", children: heroRight })) : null })] }) }), homepage?.features && homepage.features.length > 0 && (_jsx("section", { id: "features", children: _jsx("div", { className: "border-y", children: _jsx("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) => (_jsxs("div", { 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", children: [feature.icon && (_jsx("div", { className: "bg-fd-primary/10 p-2 rounded-lg mb-2", children: feature.icon })), _jsx("h3", { className: "text-base font-medium text-fd-card-foreground", children: feature.title }), _jsx("p", { className: "text-sm text-fd-muted-foreground", children: feature.description })] }, feature.title))) }) }) }))] }), children && (_jsx("div", { className: "flex-1 flex items-center justify-center", children: children }))] }), _jsx("footer", { className: "relative mx-auto w-full max-w-(--fd-layout-width)", children: _jsx("div", { className: "border-x border-t px-6 py-4", children: _jsxs("p", { className: "text-sm text-fd-muted-foreground", children: ["\u00A9 ", currentYear, " ", config.title] }) }) })] }) }));
13
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onedocs",
3
- "version": "0.1.4",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "description": "Zero-config documentation for TanStack Start + Fumadocs. Install one dependency, write markdown, ship docs.",
6
6
  "license": "MIT",