onedocs 0.1.4 → 0.1.5

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/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,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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AAC;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;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,2CAgGxE"}
@@ -1,4 +1,4 @@
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";
@@ -7,7 +7,8 @@ export function HomeLayout({ config, children }) {
7
7
  }
8
8
  export function HomePage({ config, packageName, children }) {
9
9
  const { homepage } = config;
10
+ const heroLeft = homepage?.hero?.left;
10
11
  const heroRight = homepage?.hero?.right;
11
12
  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] }) }) })] }) }));
13
+ 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-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] }) }) })] }) }));
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onedocs",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
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",