@nexpress/theme-docs 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nexpress
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,25 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ /**
4
+ * Docs theme's public-site error boundary fallback.
5
+ *
6
+ * Same delegation pattern as `./members-error.tsx`: Next requires
7
+ * `(site)/error.tsx` to be a client component, so theme error UI
8
+ * ships as a separate client subpath that the host's error.tsx
9
+ * lazy-imports based on the active theme.
10
+ *
11
+ * Imported as `@nexpress/theme-docs/components/error` by
12
+ * `apps/web/src/app/(site)/error.tsx`'s registry.
13
+ *
14
+ * Tone matches the docs aesthetic — monospace eyebrow ("500 ·
15
+ * docs"), neutral palette, technical voice.
16
+ */
17
+ interface DocsErrorProps {
18
+ error: Error & {
19
+ digest?: string;
20
+ };
21
+ reset: () => void;
22
+ }
23
+ declare function DocsError({ error, reset }: DocsErrorProps): react_jsx_runtime.JSX.Element;
24
+
25
+ export { DocsError as default };
@@ -0,0 +1,115 @@
1
+ "use client";
2
+ "use client";
3
+
4
+ // src/components/error.tsx
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function DocsError({ error, reset }) {
7
+ return /* @__PURE__ */ jsxs(
8
+ "main",
9
+ {
10
+ className: "np-docs np-docs-error",
11
+ style: {
12
+ maxWidth: 560,
13
+ margin: "5rem auto",
14
+ padding: "0 1.5rem"
15
+ },
16
+ children: [
17
+ /* @__PURE__ */ jsx(
18
+ "p",
19
+ {
20
+ style: {
21
+ margin: 0,
22
+ fontSize: "0.75rem",
23
+ textTransform: "uppercase",
24
+ letterSpacing: "0.12em",
25
+ color: "var(--np-color-muted-foreground, #64748b)",
26
+ fontFamily: "var(--np-font-mono, ui-monospace, monospace)"
27
+ },
28
+ children: "500 \xB7 docs"
29
+ }
30
+ ),
31
+ /* @__PURE__ */ jsx(
32
+ "h1",
33
+ {
34
+ style: {
35
+ margin: "0.75rem 0 0",
36
+ fontSize: "1.875rem",
37
+ fontFamily: "var(--np-font-heading)",
38
+ fontWeight: 600,
39
+ lineHeight: 1.2
40
+ },
41
+ children: "The page failed to render."
42
+ }
43
+ ),
44
+ /* @__PURE__ */ jsx(
45
+ "p",
46
+ {
47
+ style: {
48
+ margin: "1.25rem 0 0",
49
+ color: "var(--np-color-muted-foreground, #64748b)",
50
+ fontSize: "0.9375rem",
51
+ lineHeight: 1.6
52
+ },
53
+ children: process.env.NODE_ENV === "production" ? "Refreshing usually clears it. If the problem persists, the page may be temporarily broken \u2014 check back shortly." : error.message
54
+ }
55
+ ),
56
+ /* @__PURE__ */ jsxs(
57
+ "div",
58
+ {
59
+ style: {
60
+ marginTop: "1.75rem",
61
+ display: "flex",
62
+ gap: "0.75rem",
63
+ flexWrap: "wrap"
64
+ },
65
+ children: [
66
+ /* @__PURE__ */ jsx(
67
+ "button",
68
+ {
69
+ type: "button",
70
+ onClick: reset,
71
+ style: {
72
+ padding: "0.5rem 1.25rem",
73
+ fontFamily: "inherit",
74
+ fontSize: "0.875rem",
75
+ fontWeight: 500,
76
+ background: "var(--np-color-primary, #0f172a)",
77
+ color: "var(--np-color-primary-foreground, #fff)",
78
+ border: "none",
79
+ borderRadius: "0.375rem",
80
+ cursor: "pointer"
81
+ },
82
+ children: "Try again"
83
+ }
84
+ ),
85
+ /* @__PURE__ */ jsx(
86
+ "a",
87
+ {
88
+ href: "/",
89
+ style: {
90
+ padding: "0.5rem 1.25rem",
91
+ fontFamily: "inherit",
92
+ fontSize: "0.875rem",
93
+ fontWeight: 500,
94
+ background: "transparent",
95
+ color: "var(--np-color-foreground)",
96
+ border: "1px solid var(--np-color-border, #e2e8f0)",
97
+ borderRadius: "0.375rem",
98
+ textDecoration: "none",
99
+ display: "inline-flex",
100
+ alignItems: "center"
101
+ },
102
+ children: "Back home"
103
+ }
104
+ )
105
+ ]
106
+ }
107
+ )
108
+ ]
109
+ }
110
+ );
111
+ }
112
+ export {
113
+ DocsError as default
114
+ };
115
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/error.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * Docs theme's public-site error boundary fallback.\n *\n * Same delegation pattern as `./members-error.tsx`: Next requires\n * `(site)/error.tsx` to be a client component, so theme error UI\n * ships as a separate client subpath that the host's error.tsx\n * lazy-imports based on the active theme.\n *\n * Imported as `@nexpress/theme-docs/components/error` by\n * `apps/web/src/app/(site)/error.tsx`'s registry.\n *\n * Tone matches the docs aesthetic — monospace eyebrow (\"500 ·\n * docs\"), neutral palette, technical voice.\n */\n\ninterface DocsErrorProps {\n error: Error & { digest?: string };\n reset: () => void;\n}\n\nexport default function DocsError({ error, reset }: DocsErrorProps) {\n // Renders `<main>` because the host's (site)/error.tsx no\n // longer relies on the layout for the `<main>` landmark (v0.2\n // shell-wrap refactor moved that into pages). Theme error\n // subpaths render *in place of* DefaultError, so we mirror\n // its `<main>` — one per page either way.\n return (\n <main\n className=\"np-docs np-docs-error\"\n style={{\n maxWidth: 560,\n margin: \"5rem auto\",\n padding: \"0 1.5rem\",\n }}\n >\n <p\n style={{\n margin: 0,\n fontSize: \"0.75rem\",\n textTransform: \"uppercase\",\n letterSpacing: \"0.12em\",\n color: \"var(--np-color-muted-foreground, #64748b)\",\n fontFamily: \"var(--np-font-mono, ui-monospace, monospace)\",\n }}\n >\n 500 · docs\n </p>\n <h1\n style={{\n margin: \"0.75rem 0 0\",\n fontSize: \"1.875rem\",\n fontFamily: \"var(--np-font-heading)\",\n fontWeight: 600,\n lineHeight: 1.2,\n }}\n >\n The page failed to render.\n </h1>\n <p\n style={{\n margin: \"1.25rem 0 0\",\n color: \"var(--np-color-muted-foreground, #64748b)\",\n fontSize: \"0.9375rem\",\n lineHeight: 1.6,\n }}\n >\n {process.env.NODE_ENV === \"production\"\n ? \"Refreshing usually clears it. If the problem persists, the page may be temporarily broken — check back shortly.\"\n : error.message}\n </p>\n <div\n style={{\n marginTop: \"1.75rem\",\n display: \"flex\",\n gap: \"0.75rem\",\n flexWrap: \"wrap\",\n }}\n >\n <button\n type=\"button\"\n onClick={reset}\n style={{\n padding: \"0.5rem 1.25rem\",\n fontFamily: \"inherit\",\n fontSize: \"0.875rem\",\n fontWeight: 500,\n background: \"var(--np-color-primary, #0f172a)\",\n color: \"var(--np-color-primary-foreground, #fff)\",\n border: \"none\",\n borderRadius: \"0.375rem\",\n cursor: \"pointer\",\n }}\n >\n Try again\n </button>\n <a\n href=\"/\"\n style={{\n padding: \"0.5rem 1.25rem\",\n fontFamily: \"inherit\",\n fontSize: \"0.875rem\",\n fontWeight: 500,\n background: \"transparent\",\n color: \"var(--np-color-foreground)\",\n border: \"1px solid var(--np-color-border, #e2e8f0)\",\n borderRadius: \"0.375rem\",\n textDecoration: \"none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BACV;AAAA,kBACD;AAAA;AAAA,cAED;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,MAAK;AAAA,kBACL,OAAO;AAAA,oBACL,SAAS;AAAA,oBACT,YAAY;AAAA,oBACZ,UAAU;AAAA,oBACV,YAAY;AAAA,oBACZ,YAAY;AAAA,oBACZ,OAAO;AAAA,oBACP,QAAQ;AAAA,oBACR,cAAc;AAAA,oBACd,gBAAgB;AAAA,oBAChB,SAAS;AAAA,oBACT,YAAY;AAAA,kBACd;AAAA,kBACD;AAAA;AAAA,cAED;AAAA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -0,0 +1,27 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ /**
4
+ * Docs theme's member-tree error boundary fallback.
5
+ *
6
+ * Same delegation pattern as magazine's: Next requires
7
+ * `(member)/error.tsx` to be a client component, so theme error
8
+ * UI ships as a separate client subpath that the host's
9
+ * error.tsx lazy-imports based on the active theme. The theme's
10
+ * `impl.members.error` slot stays as a forward-compat type
11
+ * marker; the actual rendering goes through this client entry.
12
+ *
13
+ * Imported as `@nexpress/theme-docs/components/members-error`
14
+ * by `apps/web/src/app/(member)/error.tsx`.
15
+ *
16
+ * Tone matches the docs aesthetic — technical, monospace
17
+ * accent, with "Back to sign in" as the secondary CTA.
18
+ */
19
+ interface DocsMembersErrorProps {
20
+ error: Error & {
21
+ digest?: string;
22
+ };
23
+ reset: () => void;
24
+ }
25
+ declare function DocsMembersError({ error, reset, }: DocsMembersErrorProps): react_jsx_runtime.JSX.Element;
26
+
27
+ export { DocsMembersError as default };
@@ -0,0 +1,118 @@
1
+ "use client";
2
+ "use client";
3
+
4
+ // src/components/members-error.tsx
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function DocsMembersError({
7
+ error,
8
+ reset
9
+ }) {
10
+ return /* @__PURE__ */ jsxs(
11
+ "main",
12
+ {
13
+ className: "np-docs np-docs-members-error",
14
+ style: {
15
+ maxWidth: 520,
16
+ margin: "5rem auto",
17
+ padding: "0 1.5rem"
18
+ },
19
+ children: [
20
+ /* @__PURE__ */ jsx(
21
+ "p",
22
+ {
23
+ style: {
24
+ margin: 0,
25
+ fontSize: "0.75rem",
26
+ textTransform: "uppercase",
27
+ letterSpacing: "0.12em",
28
+ color: "var(--np-color-muted-foreground, #64748b)",
29
+ fontFamily: "var(--np-font-mono, ui-monospace, monospace)"
30
+ },
31
+ children: "500 \xB7 account"
32
+ }
33
+ ),
34
+ /* @__PURE__ */ jsx(
35
+ "h1",
36
+ {
37
+ style: {
38
+ margin: "0.75rem 0 0",
39
+ fontSize: "1.875rem",
40
+ fontFamily: "var(--np-font-heading)",
41
+ fontWeight: 600,
42
+ lineHeight: 1.2
43
+ },
44
+ children: "Something interrupted your session."
45
+ }
46
+ ),
47
+ /* @__PURE__ */ jsx(
48
+ "p",
49
+ {
50
+ style: {
51
+ margin: "1.25rem 0 0",
52
+ color: "var(--np-color-muted-foreground, #64748b)",
53
+ fontSize: "0.9375rem",
54
+ lineHeight: 1.6
55
+ },
56
+ children: process.env.NODE_ENV === "production" ? "A fresh sign-in usually clears this. Try again, or sign back in to start fresh." : error.message
57
+ }
58
+ ),
59
+ /* @__PURE__ */ jsxs(
60
+ "div",
61
+ {
62
+ style: {
63
+ marginTop: "1.75rem",
64
+ display: "flex",
65
+ gap: "0.75rem",
66
+ flexWrap: "wrap"
67
+ },
68
+ children: [
69
+ /* @__PURE__ */ jsx(
70
+ "button",
71
+ {
72
+ type: "button",
73
+ onClick: reset,
74
+ style: {
75
+ padding: "0.5rem 1.25rem",
76
+ fontFamily: "inherit",
77
+ fontSize: "0.875rem",
78
+ fontWeight: 500,
79
+ background: "var(--np-color-primary, #0f172a)",
80
+ color: "var(--np-color-primary-foreground, #fff)",
81
+ border: "none",
82
+ borderRadius: "0.375rem",
83
+ cursor: "pointer"
84
+ },
85
+ children: "Try again"
86
+ }
87
+ ),
88
+ /* @__PURE__ */ jsx(
89
+ "a",
90
+ {
91
+ href: "/members/login",
92
+ style: {
93
+ padding: "0.5rem 1.25rem",
94
+ fontFamily: "inherit",
95
+ fontSize: "0.875rem",
96
+ fontWeight: 500,
97
+ background: "transparent",
98
+ color: "var(--np-color-foreground)",
99
+ border: "1px solid var(--np-color-border, #e2e8f0)",
100
+ borderRadius: "0.375rem",
101
+ textDecoration: "none",
102
+ display: "inline-flex",
103
+ alignItems: "center"
104
+ },
105
+ children: "Back to sign in"
106
+ }
107
+ )
108
+ ]
109
+ }
110
+ )
111
+ ]
112
+ }
113
+ );
114
+ }
115
+ export {
116
+ DocsMembersError as default
117
+ };
118
+ //# sourceMappingURL=members-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/members-error.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * Docs theme's member-tree error boundary fallback.\n *\n * Same delegation pattern as magazine's: Next requires\n * `(member)/error.tsx` to be a client component, so theme error\n * UI ships as a separate client subpath that the host's\n * error.tsx lazy-imports based on the active theme. The theme's\n * `impl.members.error` slot stays as a forward-compat type\n * marker; the actual rendering goes through this client entry.\n *\n * Imported as `@nexpress/theme-docs/components/members-error`\n * by `apps/web/src/app/(member)/error.tsx`.\n *\n * Tone matches the docs aesthetic — technical, monospace\n * accent, with \"Back to sign in\" as the secondary CTA.\n */\n\ninterface DocsMembersErrorProps {\n error: Error & { digest?: string };\n reset: () => void;\n}\n\nexport default function DocsMembersError({\n error,\n reset,\n}: DocsMembersErrorProps) {\n // Renders `<main>` because the host's (member)/error.tsx no\n // longer relies on the layout for the `<main>` landmark (v0.2\n // shell-wrap refactor moved that into pages). Theme\n // members-error subpaths render in place of DefaultMemberError,\n // so we mirror its `<main>` — one per page either way.\n return (\n <main\n className=\"np-docs np-docs-members-error\"\n style={{\n maxWidth: 520,\n margin: \"5rem auto\",\n padding: \"0 1.5rem\",\n }}\n >\n <p\n style={{\n margin: 0,\n fontSize: \"0.75rem\",\n textTransform: \"uppercase\",\n letterSpacing: \"0.12em\",\n color: \"var(--np-color-muted-foreground, #64748b)\",\n fontFamily: \"var(--np-font-mono, ui-monospace, monospace)\",\n }}\n >\n 500 · account\n </p>\n <h1\n style={{\n margin: \"0.75rem 0 0\",\n fontSize: \"1.875rem\",\n fontFamily: \"var(--np-font-heading)\",\n fontWeight: 600,\n lineHeight: 1.2,\n }}\n >\n Something interrupted your session.\n </h1>\n <p\n style={{\n margin: \"1.25rem 0 0\",\n color: \"var(--np-color-muted-foreground, #64748b)\",\n fontSize: \"0.9375rem\",\n lineHeight: 1.6,\n }}\n >\n {process.env.NODE_ENV === \"production\"\n ? \"A fresh sign-in usually clears this. Try again, or sign back in to start fresh.\"\n : error.message}\n </p>\n <div\n style={{\n marginTop: \"1.75rem\",\n display: \"flex\",\n gap: \"0.75rem\",\n flexWrap: \"wrap\",\n }}\n >\n <button\n type=\"button\"\n onClick={reset}\n style={{\n padding: \"0.5rem 1.25rem\",\n fontFamily: \"inherit\",\n fontSize: \"0.875rem\",\n fontWeight: 500,\n background: \"var(--np-color-primary, #0f172a)\",\n color: \"var(--np-color-primary-foreground, #fff)\",\n border: \"none\",\n borderRadius: \"0.375rem\",\n cursor: \"pointer\",\n }}\n >\n Try again\n </button>\n <a\n href=\"/members/login\"\n style={{\n padding: \"0.5rem 1.25rem\",\n fontFamily: \"inherit\",\n fontSize: \"0.875rem\",\n fontWeight: 500,\n background: \"transparent\",\n color: \"var(--np-color-foreground)\",\n border: \"1px solid var(--np-color-border, #e2e8f0)\",\n borderRadius: \"0.375rem\",\n textDecoration: \"none\",\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n Back to sign in\n </a>\n </div>\n </main>\n );\n}\n"],"mappings":";;;;AA0CM,cAmCA,YAnCA;AAlBS,SAAR,iBAAkC;AAAA,EACvC;AAAA,EACA;AACF,GAA0B;AAMxB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO;AAAA,QACL,UAAU;AAAA,QACV,QAAQ;AAAA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ACd,gBAAgB;AAAA,oBAChB,SAAS;AAAA,oBACT,YAAY;AAAA,kBACd;AAAA,kBACD;AAAA;AAAA,cAED;AAAA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -0,0 +1,156 @@
1
+ import * as _nexpress_theme from '@nexpress/theme';
2
+ import { NpRouteRenderProps, NpThemeShellProps, NpTemplateRenderProps } from '@nexpress/theme';
3
+ import * as React from 'react';
4
+ import { ReactNode } from 'react';
5
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
+ import { z } from 'zod';
7
+
8
+ /**
9
+ * Phase F.9-B — docs theme masthead.
10
+ *
11
+ * Brand strap: site title (left), search input (center), nav
12
+ * + version label (right). Reads settings via
13
+ * `resolveDocsSettings()` so the version label and search
14
+ * placeholder match the operator's admin choices.
15
+ *
16
+ * The search input is a plain GET form to `/docs/search` —
17
+ * F.2's theme route handles the query (#609: the universal
18
+ * `/search` is the framework's own page, so the docs theme
19
+ * scopes its search to `/docs/search` to avoid being shadowed
20
+ * by the host's `app/(site)/search/page.tsx`). No client-side
21
+ * JS for the input itself; works without hydration.
22
+ */
23
+ declare function DocsHeader(): Promise<React.ReactElement>;
24
+
25
+ /**
26
+ * Docs theme's member-tree 404.
27
+ *
28
+ * Mirrors `DocsNotFound`'s technical voice but tuned for the
29
+ * member context — CTA points at `/members/login` rather than
30
+ * the docs index, and the copy acknowledges stale auth links
31
+ * (the dominant cause of 404s inside `/members/*`).
32
+ *
33
+ * Server component; rendered by `(member)/not-found.tsx` when
34
+ * the active theme is docs and `impl.members.notFound` is
35
+ * declared.
36
+ *
37
+ * Renders a `<div>`, not `<main>`, because the framework's
38
+ * `<ShellWrap surface="member">` already emits the page's
39
+ * `<main className="np-member-main">` landmark.
40
+ */
41
+ declare function DocsMembersNotFound(): React.ReactElement;
42
+
43
+ /**
44
+ * Docs theme's member-tree shell.
45
+ *
46
+ * Drops the docs sidebar (which is hierarchical-doc navigation —
47
+ * useless on auth forms) and renders a narrow column under the
48
+ * masthead. Reuses `DocsHeader` directly so a masthead bump
49
+ * cascades to member pages — single source of truth for chrome.
50
+ *
51
+ * Skips the public `DocsShell`'s 3-column grid because the
52
+ * `<ShellWrap surface="member">` fallback chain only invokes
53
+ * `impl.members.shell` (this component); the public shell never
54
+ * wraps the member tree.
55
+ */
56
+ declare function DocsMembersShell({ children }: {
57
+ children: ReactNode;
58
+ }): react_jsx_runtime.JSX.Element;
59
+
60
+ /**
61
+ * Phase F.9-B — docs 404.
62
+ *
63
+ * Tighter / less editorial than magazine's; suggests search +
64
+ * homepage as next steps.
65
+ */
66
+ declare function DocsNotFound(): React.ReactElement;
67
+
68
+ /**
69
+ * Phase F.9-B — `/search` route component.
70
+ *
71
+ * Reads `?q=` from searchParams, runs `searchCollections` (the
72
+ * full-text search API), and renders the hits. Empty query →
73
+ * empty results pane with hint copy. Stresses F.2's route
74
+ * dispatch with a non-collection-walk shape (search is
75
+ * cross-collection by design).
76
+ */
77
+ declare function DocsSearch({ searchParams, }: NpRouteRenderProps): Promise<React.ReactElement>;
78
+
79
+ /**
80
+ * Phase F.9-B — docs theme shell.
81
+ *
82
+ * Body grid: header on top, then a 3-column row of sidebar +
83
+ * main + (optional) TOC. The sidebar slot reads the docs
84
+ * collection hierarchy; main is the page render; TOC is left
85
+ * to the page template (it knows which headings the doc has).
86
+ */
87
+ declare function DocsShell({ children }: NpThemeShellProps): React.ReactElement;
88
+
89
+ /**
90
+ * Phase F.9-B — hierarchical sidebar.
91
+ *
92
+ * Walks the `docs` collection (declared as required in the
93
+ * manifest), builds a parent/order tree, renders nested nav.
94
+ * The current doc is highlighted via `data-current="true"`.
95
+ *
96
+ * The function reads `currentSlug` from a query param (when
97
+ * called as a route component) or from doc context. For F.9-B
98
+ * we keep it simple: the slot component fetches the request's
99
+ * URL via `headers()` and matches on `pathname.startsWith`.
100
+ */
101
+ declare function DocsSidebar(): Promise<React.ReactElement>;
102
+
103
+ /**
104
+ * Phase F.9-B — docs theme CSS.
105
+ *
106
+ * Scoped under `.np-docs-*` so theme swaps don't leave
107
+ * residue. Uses `var(--np-color-*)` tokens so admin
108
+ * settings → tokens still apply on top.
109
+ */
110
+ declare const docsCss = "\n.np-docs-shell {\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n background: var(--np-color-background);\n color: var(--np-color-foreground);\n font-family: var(--np-font-body, system-ui, sans-serif);\n}\n\n.np-docs-header {\n position: sticky;\n top: 0;\n z-index: 50;\n background: var(--np-color-background);\n border-bottom: 1px solid var(--np-color-border);\n backdrop-filter: blur(8px);\n}\n\n.np-docs-header-inner {\n max-width: 1200px;\n margin: 0 auto;\n padding: 0.75rem 1.5rem;\n display: grid;\n grid-template-columns: auto 1fr auto;\n gap: 1.5rem;\n align-items: center;\n}\n\n.np-docs-brand {\n display: flex;\n align-items: baseline;\n gap: 0.5rem;\n font-weight: 600;\n text-decoration: none;\n color: var(--np-color-foreground);\n}\n\n.np-docs-brand-version {\n font-size: 0.75rem;\n font-family: ui-monospace, \"SF Mono\", Menlo, monospace;\n color: var(--np-color-muted-foreground);\n background: var(--np-color-muted);\n padding: 0.125rem 0.375rem;\n border-radius: 0.25rem;\n}\n\n.np-docs-search-form {\n flex: 1;\n}\n\n.np-docs-search-input {\n width: 100%;\n padding: 0.4rem 0.75rem;\n border: 1px solid var(--np-color-border);\n border-radius: 0.375rem;\n background: var(--np-color-card);\n color: var(--np-color-foreground);\n font-size: 0.875rem;\n}\n\n.np-docs-search-input:focus {\n outline: 2px solid var(--np-color-primary);\n outline-offset: -2px;\n border-color: transparent;\n}\n\n.np-docs-nav {\n display: flex;\n align-items: center;\n gap: 1rem;\n}\n\n.np-docs-primary-nav {\n display: flex;\n list-style: none;\n margin: 0;\n padding: 0;\n gap: 1rem;\n}\n\n.np-docs-primary-nav a {\n color: var(--np-color-muted-foreground);\n text-decoration: none;\n font-size: 0.875rem;\n}\n\n.np-docs-primary-nav a:hover {\n color: var(--np-color-foreground);\n}\n\n.np-docs-github-link {\n font-size: 0.875rem;\n color: var(--np-color-muted-foreground);\n text-decoration: none;\n}\n\n.np-docs-grid {\n flex: 1;\n display: grid;\n grid-template-columns: 240px minmax(0, 1fr);\n max-width: 1200px;\n margin: 0 auto;\n width: 100%;\n gap: 2.5rem;\n padding: 2rem 1.5rem;\n}\n\n@media (max-width: 768px) {\n .np-docs-grid {\n grid-template-columns: 1fr;\n }\n .np-docs-sidebar {\n display: none;\n }\n}\n\n.np-docs-sidebar {\n position: sticky;\n top: 4rem;\n align-self: start;\n max-height: calc(100vh - 5rem);\n overflow-y: auto;\n}\n\n.np-docs-sidebar h2 {\n font-size: 0.75rem;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: var(--np-color-muted-foreground);\n margin: 0 0 0.75rem;\n}\n\n.np-docs-sidebar ul {\n list-style: none;\n padding: 0;\n margin: 0;\n}\n\n.np-docs-sidebar li {\n margin: 0.125rem 0;\n}\n\n.np-docs-sidebar a {\n display: block;\n padding: 0.25rem 0.5rem;\n border-radius: 0.25rem;\n color: var(--np-color-muted-foreground);\n text-decoration: none;\n font-size: 0.875rem;\n}\n\n.np-docs-sidebar a:hover {\n background: var(--np-color-muted);\n color: var(--np-color-foreground);\n}\n\n.np-docs-sidebar a[data-current=\"true\"] {\n background: color-mix(in oklch, var(--np-color-primary) 12%, transparent);\n color: var(--np-color-primary);\n font-weight: 500;\n}\n\n.np-docs-sidebar ul ul {\n margin-left: 0.75rem;\n border-left: 1px solid var(--np-color-border);\n padding-left: 0.5rem;\n}\n\n.np-docs-page {\n max-width: 720px;\n}\n\n.np-docs-page h1 {\n font-size: 2rem;\n margin: 0 0 0.5rem;\n}\n\n.np-docs-prev-next {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1rem;\n margin-top: 3rem;\n padding-top: 1.5rem;\n border-top: 1px solid var(--np-color-border);\n}\n\n.np-docs-prev-next a {\n display: block;\n padding: 0.75rem 1rem;\n border: 1px solid var(--np-color-border);\n border-radius: 0.5rem;\n color: var(--np-color-foreground);\n text-decoration: none;\n}\n\n.np-docs-prev-next a:hover {\n border-color: var(--np-color-primary);\n}\n\n.np-docs-prev-next-label {\n display: block;\n font-size: 0.75rem;\n color: var(--np-color-muted-foreground);\n margin-bottom: 0.25rem;\n}\n\n/* M.* member surface \u2014 narrow auth-form column under the\n masthead, no sidebar (the docs sidebar is hierarchical\n doc nav, useless on auth forms). */\n.np-docs-members {\n display: flex;\n justify-content: center;\n min-height: 60vh;\n padding: 3rem 1.5rem;\n}\n.np-docs-members-column {\n width: 100%;\n max-width: 440px;\n}\n\n/* Member form token overrides \u2014 docs aesthetic: slightly\n rounded corners, neutral palette, monospace label accent. */\n.np-docs .np-members-form {\n --np-member-form-input-bg: var(--np-color-background);\n --np-member-form-input-border: var(--np-color-border);\n --np-member-form-input-border-focus: var(--np-color-primary);\n --np-member-form-input-radius: 0.375rem;\n --np-member-form-button-radius: 0.375rem;\n}\n.np-docs .np-members-form .np-form-label {\n font-family: var(--np-font-mono, ui-monospace, monospace);\n font-size: 0.8125rem;\n}\n";
111
+
112
+ /**
113
+ * Phase F.9-B — doc page template.
114
+ *
115
+ * Renders the doc's title + body, plus a prev/next bar at the
116
+ * bottom that walks the same parent-ordered hierarchy the
117
+ * sidebar uses. Optional "Edit on GitHub" link is added when
118
+ * the operator set `settings.githubRepo`.
119
+ *
120
+ * Body rendering: this template assumes `doc.body` is a
121
+ * Lexical / blocks payload. For a real F.9-B we'd thread
122
+ * through `renderBlocks(doc.body, { ctx: blockCtx })` for the
123
+ * actual content; the placeholder JSON keeps the contract
124
+ * shape-correct without binding to a specific body shape that
125
+ * may differ across operator setups.
126
+ */
127
+ declare function DocPageTemplate({ doc: rawDoc, }: NpTemplateRenderProps): Promise<React.ReactElement>;
128
+
129
+ /**
130
+ * Phase F.9-B — operator-tunable docs settings.
131
+ *
132
+ * Stresses F.3's settings auto-form on a different axis from
133
+ * magazine: more URL inputs, a select/enum for sidebar
134
+ * orientation, and a documentation-flavored field set.
135
+ */
136
+ declare const docsSettingsSchema: z.ZodObject<{
137
+ version: z.ZodDefault<z.ZodString>;
138
+ githubRepo: z.ZodOptional<z.ZodString>;
139
+ sidebarHeading: z.ZodDefault<z.ZodString>;
140
+ showTableOfContents: z.ZodDefault<z.ZodBoolean>;
141
+ searchPlaceholder: z.ZodDefault<z.ZodString>;
142
+ }, z.core.$strip>;
143
+ type DocsSettings = z.infer<typeof docsSettingsSchema>;
144
+
145
+ /**
146
+ * `@nexpress/theme-docs` — documentation theme for NexPress.
147
+ *
148
+ * Stresses F.2 (search route + sidebar slot consuming
149
+ * hierarchy) and F.3 (settings: version, githubRepo,
150
+ * sidebarHeading, TOC toggle). Different contract axis from
151
+ * F.9-A's magazine — sidebar-driven layout, hierarchical doc
152
+ * collection, prev/next navigation.
153
+ */
154
+ declare const docsTheme: _nexpress_theme.NpTheme;
155
+
156
+ export { DocPageTemplate, DocsHeader, DocsMembersNotFound, DocsMembersShell, DocsNotFound, DocsSearch, type DocsSettings, DocsShell, DocsSidebar, docsCss, docsSettingsSchema, docsTheme };