@nexpress/theme-docs 0.3.6 → 0.3.8

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/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  // src/index.ts
2
- import {
3
- defineTheme
4
- } from "@nexpress/theme";
2
+ import { defineTheme } from "@nexpress/theme";
5
3
 
6
4
  // src/copy-button-bridge.ts
7
5
  import { CopyButton } from "./components/copy-button.js";
@@ -411,7 +409,7 @@ async function DocsHeader() {
411
409
  return /* @__PURE__ */ jsx2("header", { className: "np-docs-header", children: /* @__PURE__ */ jsxs2("div", { className: "np-docs-header-inner", children: [
412
410
  /* @__PURE__ */ jsxs2("a", { href: "/", className: "np-docs-brand", children: [
413
411
  /* @__PURE__ */ jsx2("span", { className: "np-docs-brand-mark", "aria-hidden": "true" }),
414
- /* @__PURE__ */ jsx2("span", { className: "np-docs-brand-name", children: siteName }),
412
+ /* @__PURE__ */ jsx2("span", { children: siteName }),
415
413
  /* @__PURE__ */ jsx2("span", { className: "np-docs-brand-version", children: settings.version })
416
414
  ] }),
417
415
  /* @__PURE__ */ jsxs2(
@@ -454,33 +452,7 @@ async function DocsHeader() {
454
452
  }
455
453
  ),
456
454
  /* @__PURE__ */ jsx2(SearchKeyboardShortcut, { targetId: "np-docs-search-input" }),
457
- /* @__PURE__ */ jsxs2("nav", { className: "np-docs-nav", "aria-label": "Primary", children: [
458
- /* @__PURE__ */ jsx2(NavMenu, { location: "header", className: "np-docs-primary-nav" }),
459
- settings.githubRepo ? /* @__PURE__ */ jsxs2(
460
- "a",
461
- {
462
- href: settings.githubRepo,
463
- className: "np-docs-github",
464
- target: "_blank",
465
- rel: "noreferrer",
466
- "aria-label": "GitHub repository",
467
- children: [
468
- /* @__PURE__ */ jsx2(
469
- "svg",
470
- {
471
- width: "14",
472
- height: "14",
473
- viewBox: "0 0 24 24",
474
- fill: "currentColor",
475
- "aria-hidden": "true",
476
- children: /* @__PURE__ */ jsx2("path", { d: "M12 .5a12 12 0 0 0-3.8 23.39c.6.11.82-.26.82-.58v-2c-3.34.73-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.1-.75.08-.74.08-.74 1.21.09 1.85 1.24 1.85 1.24 1.07 1.84 2.81 1.31 3.5 1 .11-.78.42-1.31.76-1.61-2.66-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.12-.3-.54-1.52.12-3.17 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.66 1.65.25 2.87.12 3.17.77.84 1.24 1.91 1.24 3.22 0 4.61-2.81 5.62-5.49 5.92.43.37.81 1.1.81 2.22v3.29c0 .32.22.7.83.58A12 12 0 0 0 12 .5Z" })
477
- }
478
- ),
479
- "GitHub"
480
- ]
481
- }
482
- ) : null
483
- ] })
455
+ /* @__PURE__ */ jsx2("nav", { className: "np-docs-nav", "aria-label": "Primary", children: /* @__PURE__ */ jsx2(NavMenu, { location: "header", className: "np-docs-primary-nav" }) })
484
456
  ] }) });
485
457
  }
486
458
 
@@ -1096,6 +1068,140 @@ var docsCss = `
1096
1068
  font-family: var(--np-font-mono, "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace);
1097
1069
  }
1098
1070
 
1071
+ .np-docs-api,
1072
+ .np-docs-changelog-page {
1073
+ max-width: 980px;
1074
+ margin: 0 auto;
1075
+ padding: 3rem 1rem 5rem;
1076
+ }
1077
+ .np-docs-api-hero,
1078
+ .np-docs-changelog-hero {
1079
+ padding: 3rem 0 2rem;
1080
+ }
1081
+ .np-docs-api-eyebrow,
1082
+ .np-docs-changelog-hero p {
1083
+ margin: 0 0 0.8rem;
1084
+ font-family: var(--np-font-mono);
1085
+ color: var(--np-color-primary);
1086
+ font-size: 0.78rem;
1087
+ letter-spacing: 0.08em;
1088
+ text-transform: uppercase;
1089
+ }
1090
+ .np-docs-api-hero h1,
1091
+ .np-docs-changelog-hero h1 {
1092
+ margin: 0;
1093
+ font-size: clamp(2.4rem, 5vw, 4.4rem);
1094
+ line-height: 1;
1095
+ letter-spacing: -0.04em;
1096
+ }
1097
+ .np-docs-api-hero p,
1098
+ .np-docs-changelog-hero span {
1099
+ display: block;
1100
+ max-width: 44rem;
1101
+ margin-top: 1rem;
1102
+ color: var(--np-color-muted-foreground);
1103
+ font-size: 1.05rem;
1104
+ }
1105
+ .np-docs-api-signature {
1106
+ overflow: hidden;
1107
+ border: 1px solid var(--np-color-border);
1108
+ border-radius: 14px;
1109
+ background: #0b1220;
1110
+ color: #e6edf6;
1111
+ }
1112
+ .np-docs-api-signature-head {
1113
+ display: flex;
1114
+ justify-content: space-between;
1115
+ gap: 1rem;
1116
+ padding: 0.8rem 1rem;
1117
+ color: #93c5fd;
1118
+ border-bottom: 1px solid rgba(255,255,255,0.12);
1119
+ font-family: var(--np-font-mono);
1120
+ font-size: 0.78rem;
1121
+ }
1122
+ .np-docs-api-signature pre {
1123
+ margin: 0;
1124
+ padding: 1.2rem;
1125
+ overflow-x: auto;
1126
+ font-size: 0.85rem;
1127
+ line-height: 1.65;
1128
+ }
1129
+ .np-docs-api-section { padding-top: 2.5rem; }
1130
+ .np-docs-api-section h2 {
1131
+ margin: 0 0 1rem;
1132
+ font-size: 1.35rem;
1133
+ }
1134
+ .np-docs-api-table {
1135
+ border: 1px solid var(--np-color-border);
1136
+ border-radius: 14px;
1137
+ overflow: hidden;
1138
+ background: var(--np-color-card);
1139
+ }
1140
+ .np-docs-api-row {
1141
+ display: grid;
1142
+ grid-template-columns: 10rem 7rem minmax(0, 1fr);
1143
+ gap: 1rem;
1144
+ padding: 1rem;
1145
+ border-bottom: 1px solid var(--np-color-border);
1146
+ }
1147
+ .np-docs-api-row:last-child { border-bottom: 0; }
1148
+ .np-docs-api-row span {
1149
+ color: var(--np-color-primary);
1150
+ font-family: var(--np-font-mono);
1151
+ font-size: 0.76rem;
1152
+ }
1153
+ .np-docs-api-row p { margin: 0; color: var(--np-color-muted-foreground); }
1154
+ .np-docs-changelog-timeline {
1155
+ list-style: none;
1156
+ margin: 2rem 0 0;
1157
+ padding: 0;
1158
+ border-top: 1px solid var(--np-color-border);
1159
+ }
1160
+ .np-docs-changelog-release {
1161
+ display: grid;
1162
+ grid-template-columns: 13rem minmax(0, 1fr);
1163
+ gap: 2rem;
1164
+ padding: 1.6rem 0;
1165
+ border-bottom: 1px solid var(--np-color-border);
1166
+ }
1167
+ .np-docs-changelog-release aside {
1168
+ display: grid;
1169
+ gap: 0.3rem;
1170
+ align-content: start;
1171
+ }
1172
+ .np-docs-changelog-release aside strong {
1173
+ font-size: 1.25rem;
1174
+ letter-spacing: -0.02em;
1175
+ }
1176
+ .np-docs-changelog-release aside span,
1177
+ .np-docs-changelog-release aside i {
1178
+ color: var(--np-color-muted-foreground);
1179
+ font-style: normal;
1180
+ font-size: 0.82rem;
1181
+ }
1182
+ .np-docs-changelog-release p {
1183
+ display: grid;
1184
+ grid-template-columns: 6.5rem minmax(0, 1fr);
1185
+ gap: 1rem;
1186
+ margin: 0 0 0.85rem;
1187
+ }
1188
+ .np-docs-changelog-release p span {
1189
+ justify-self: start;
1190
+ padding: 0.12rem 0.45rem;
1191
+ border-radius: 999px;
1192
+ border: 1px solid var(--np-color-border);
1193
+ font-family: var(--np-font-mono);
1194
+ font-size: 0.7rem;
1195
+ color: var(--np-color-primary);
1196
+ }
1197
+ @media (max-width: 760px) {
1198
+ .np-docs-api-row,
1199
+ .np-docs-changelog-release,
1200
+ .np-docs-changelog-release p {
1201
+ grid-template-columns: 1fr;
1202
+ }
1203
+ }
1204
+
1099
1205
  /* ============================================================
1100
1206
  * Header \u2014 sticky bar with brand + version pill, \u2318K search in
1101
1207
  * the center, primary nav + GitHub link on the right. Grid
@@ -1115,7 +1221,7 @@ var docsCss = `
1115
1221
  margin: 0 auto;
1116
1222
  padding: 0.7rem 1.5rem;
1117
1223
  display: grid;
1118
- grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) auto;
1224
+ grid-template-columns: auto 1fr auto;
1119
1225
  gap: 1.5rem;
1120
1226
  align-items: center;
1121
1227
  }
@@ -1145,7 +1251,6 @@ var docsCss = `
1145
1251
  opacity: 0.95;
1146
1252
  clip-path: polygon(0 0, 100% 0, 100% 100%, 60% 100%, 0 35%);
1147
1253
  }
1148
- .np-docs-brand-name { font-weight: 700; }
1149
1254
  .np-docs-brand-version {
1150
1255
  font-family: var(--np-font-mono);
1151
1256
  font-size: 0.72rem;
@@ -1221,24 +1326,6 @@ var docsCss = `
1221
1326
  .np-docs-primary-nav a[aria-current="page"] {
1222
1327
  color: var(--np-color-foreground);
1223
1328
  }
1224
- .np-docs-github,
1225
- .np-docs-github-link {
1226
- display: inline-flex;
1227
- align-items: center;
1228
- gap: 0.45rem;
1229
- padding: 0.4rem 0.7rem;
1230
- font-size: 0.8125rem;
1231
- color: var(--np-color-muted-foreground);
1232
- background: var(--np-color-muted);
1233
- border: 1px solid var(--np-color-border);
1234
- border-radius: 7px;
1235
- text-decoration: none;
1236
- }
1237
- .np-docs-github:hover,
1238
- .np-docs-github-link:hover {
1239
- color: var(--np-color-foreground);
1240
- }
1241
-
1242
1329
  @media (max-width: 800px) {
1243
1330
  .np-docs-header-inner {
1244
1331
  grid-template-columns: auto 1fr auto;
@@ -2222,9 +2309,121 @@ var docsCss = `
2222
2309
  }
2223
2310
  `;
2224
2311
 
2312
+ // src/templates/page-api-reference.tsx
2313
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
2314
+ function PageApiReferenceTemplate(_props) {
2315
+ const params = [
2316
+ ["manifest", "required", "Plugin metadata: id, name, version, and supported NexPress range."],
2317
+ ["hooks", "optional", "Lifecycle hooks such as content:beforeSave and content:afterSave."],
2318
+ ["actions", "optional", "Custom action handlers mounted under the plugin action endpoint."],
2319
+ ["routes", "optional", "API-style route handlers registered by the plugin host."],
2320
+ ["pageRoutes", "optional", "Public-site React routes rendered through the site shell."],
2321
+ ["scheduled", "optional", "pg-boss scheduled tasks reconciled at boot."],
2322
+ ["blocks", "optional", "Page-builder block definitions registered into the shared registry."]
2323
+ ];
2324
+ return /* @__PURE__ */ jsxs10("article", { className: "np-docs-api", children: [
2325
+ /* @__PURE__ */ jsxs10("header", { className: "np-docs-api-hero", children: [
2326
+ /* @__PURE__ */ jsx11("p", { className: "np-docs-api-eyebrow", children: "API reference" }),
2327
+ /* @__PURE__ */ jsx11("h1", { children: /* @__PURE__ */ jsx11("code", { children: "definePlugin" }) }),
2328
+ /* @__PURE__ */ jsx11("p", { children: "Declares a NexPress plugin. v1 plugins are npm package + rebuild: they run in-process, can register hooks, actions, API routes, public page routes, scheduled tasks, and page-builder blocks." })
2329
+ ] }),
2330
+ /* @__PURE__ */ jsxs10("section", { className: "np-docs-api-signature", "aria-label": "Signature", children: [
2331
+ /* @__PURE__ */ jsxs10("div", { className: "np-docs-api-signature-head", children: [
2332
+ /* @__PURE__ */ jsx11("span", { children: "Signature" }),
2333
+ /* @__PURE__ */ jsx11("code", { children: "@nexpress/plugin-sdk" })
2334
+ ] }),
2335
+ /* @__PURE__ */ jsx11("pre", { children: `import { definePlugin } from "@nexpress/plugin-sdk";
2336
+
2337
+ export default definePlugin({
2338
+ manifest: {
2339
+ id: "reading-time",
2340
+ name: "Reading time",
2341
+ version: "0.1.0",
2342
+ nexpress: { minVersion: "0.1.0" },
2343
+ },
2344
+ hooks: {
2345
+ "content:beforeSave": async (ctx) => ctx.data,
2346
+ },
2347
+ pageRoutes: [],
2348
+ blocks: [],
2349
+ });` })
2350
+ ] }),
2351
+ /* @__PURE__ */ jsxs10("section", { className: "np-docs-api-section", children: [
2352
+ /* @__PURE__ */ jsx11("h2", { children: "Parameters" }),
2353
+ /* @__PURE__ */ jsx11("div", { className: "np-docs-api-table", children: params.map(([name, state, desc]) => /* @__PURE__ */ jsxs10("div", { className: "np-docs-api-row", children: [
2354
+ /* @__PURE__ */ jsx11("code", { children: name }),
2355
+ /* @__PURE__ */ jsx11("span", { children: state }),
2356
+ /* @__PURE__ */ jsx11("p", { children: desc })
2357
+ ] }, name)) })
2358
+ ] }),
2359
+ /* @__PURE__ */ jsxs10("section", { className: "np-docs-api-section", children: [
2360
+ /* @__PURE__ */ jsx11("h2", { children: "Returns" }),
2361
+ /* @__PURE__ */ jsx11("p", { children: "A plugin definition object consumed by the NexPress bootstrap. The host validates the manifest and registers every declared surface in a predictable order. Capability and route checks happen at the framework boundary." })
2362
+ ] })
2363
+ ] });
2364
+ }
2365
+
2366
+ // src/templates/page-changelog.tsx
2367
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
2368
+ var RELEASES = [
2369
+ {
2370
+ version: "0.3.6",
2371
+ date: "May 2026",
2372
+ tag: "latest",
2373
+ changes: [
2374
+ ["Improved", "Theme seed content now owns first-boot pages and posts per active theme."],
2375
+ ["Added", "Built-in theme docs, magazine, and portfolio front-page render coverage."],
2376
+ ["Fixed", "Theme-contributed fields are gated by active theme in the admin editor."]
2377
+ ]
2378
+ },
2379
+ {
2380
+ version: "0.3.0",
2381
+ date: "May 2026",
2382
+ tag: "theme v0.2",
2383
+ changes: [
2384
+ ["Added", "Theme routes, archives, nav locations, settings schema, and patterns."],
2385
+ ["Added", "Docs and portfolio kinds on the universal posts collection."],
2386
+ ["Breaking", "Legacy nx prefix moved to np across framework-owned identifiers."]
2387
+ ]
2388
+ },
2389
+ {
2390
+ version: "0.2.0",
2391
+ date: "April 2026",
2392
+ tag: "pre-1.0",
2393
+ changes: [
2394
+ ["Added", "Plugin page routes and page-builder block contributions."],
2395
+ ["Improved", "pg-boss worker lifecycle and admin jobs surface."],
2396
+ ["Fixed", "CSRF and rate limiting now live in the app proxy boundary."]
2397
+ ]
2398
+ }
2399
+ ];
2400
+ function PageChangelogTemplate(_props) {
2401
+ return /* @__PURE__ */ jsxs11("article", { className: "np-docs-changelog-page", children: [
2402
+ /* @__PURE__ */ jsxs11("header", { className: "np-docs-changelog-hero", children: [
2403
+ /* @__PURE__ */ jsx12("p", { children: "Changelog" }),
2404
+ /* @__PURE__ */ jsx12("h1", { children: "Every shipped change, in reverse." }),
2405
+ /* @__PURE__ */ jsx12("span", { children: "Pre-1.0 packages use minor releases for breaking changes." })
2406
+ ] }),
2407
+ /* @__PURE__ */ jsx12("ol", { className: "np-docs-changelog-timeline", children: RELEASES.map((release) => /* @__PURE__ */ jsxs11("li", { className: "np-docs-changelog-release", children: [
2408
+ /* @__PURE__ */ jsxs11("aside", { children: [
2409
+ /* @__PURE__ */ jsxs11("strong", { children: [
2410
+ "v",
2411
+ release.version
2412
+ ] }),
2413
+ /* @__PURE__ */ jsx12("span", { children: release.date }),
2414
+ /* @__PURE__ */ jsx12("i", { children: release.tag })
2415
+ ] }),
2416
+ /* @__PURE__ */ jsx12("div", { children: release.changes.map(([kind, text]) => /* @__PURE__ */ jsxs11("p", { children: [
2417
+ /* @__PURE__ */ jsx12("span", { "data-kind": kind.toLowerCase(), children: kind }),
2418
+ text
2419
+ ] }, `${release.version}-${text}`)) })
2420
+ ] }, release.version)) })
2421
+ ] });
2422
+ }
2423
+
2225
2424
  // src/templates/page-front.tsx
2226
2425
  import { findDocuments as findDocuments4 } from "@nexpress/core";
2227
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
2426
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
2228
2427
  async function PageFrontTemplate(_props) {
2229
2428
  const settings = await resolveDocsSettings();
2230
2429
  const result = await findDocuments4("posts", {
@@ -2239,22 +2438,22 @@ async function PageFrontTemplate(_props) {
2239
2438
  (c) => c.slug === "author-quickstart"
2240
2439
  );
2241
2440
  const quickstartTarget = quickstartChild ?? tree[0]?.children[0] ?? tree[0] ?? null;
2242
- return /* @__PURE__ */ jsxs10("article", { className: "np-docs-front", children: [
2243
- /* @__PURE__ */ jsxs10("header", { className: "np-docs-front-hero", children: [
2244
- /* @__PURE__ */ jsxs10("span", { className: "np-docs-front-eyebrow", children: [
2245
- /* @__PURE__ */ jsx11("span", { className: "np-docs-front-eyebrow-dot", "aria-hidden": "true" }),
2441
+ return /* @__PURE__ */ jsxs12("article", { className: "np-docs-front", children: [
2442
+ /* @__PURE__ */ jsxs12("header", { className: "np-docs-front-hero", children: [
2443
+ /* @__PURE__ */ jsxs12("span", { className: "np-docs-front-eyebrow", children: [
2444
+ /* @__PURE__ */ jsx13("span", { className: "np-docs-front-eyebrow-dot", "aria-hidden": "true" }),
2246
2445
  settings.version,
2247
- /* @__PURE__ */ jsx11("span", { "aria-hidden": "true", children: " \xB7 Stable" })
2446
+ /* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: " \xB7 Stable" })
2248
2447
  ] }),
2249
- /* @__PURE__ */ jsx11("h1", { children: "Documentation" }),
2250
- /* @__PURE__ */ jsx11("p", { className: "np-docs-front-lede", children: "Everything you need to install, configure, extend, and ship a NexPress site \u2014 from a first install to the API reference. Browse by section, or jump straight into the plugin author quickstart." }),
2251
- quickstartTarget ? /* @__PURE__ */ jsxs10("div", { className: "np-docs-front-cta", children: [
2252
- /* @__PURE__ */ jsxs10("a", { className: "np-docs-front-cta-primary", href: `/docs/${quickstartTarget.slug}`, children: [
2448
+ /* @__PURE__ */ jsx13("h1", { children: "Documentation" }),
2449
+ /* @__PURE__ */ jsx13("p", { className: "np-docs-front-lede", children: "Everything you need to install, configure, extend, and ship a NexPress site \u2014 from a first install to the API reference. Browse by section, or jump straight into the plugin author quickstart." }),
2450
+ quickstartTarget ? /* @__PURE__ */ jsxs12("div", { className: "np-docs-front-cta", children: [
2451
+ /* @__PURE__ */ jsxs12("a", { className: "np-docs-front-cta-primary", href: `/docs/${quickstartTarget.slug}`, children: [
2253
2452
  "Open ",
2254
2453
  quickstartTarget.title,
2255
2454
  " \u2192"
2256
2455
  ] }),
2257
- settings.githubRepo ? /* @__PURE__ */ jsx11(
2456
+ settings.githubRepo ? /* @__PURE__ */ jsx13(
2258
2457
  "a",
2259
2458
  {
2260
2459
  className: "np-docs-front-cta-secondary",
@@ -2266,24 +2465,24 @@ async function PageFrontTemplate(_props) {
2266
2465
  ) : null
2267
2466
  ] }) : null
2268
2467
  ] }),
2269
- tree.length > 0 ? /* @__PURE__ */ jsx11("section", { className: "np-docs-front-groups", "aria-label": "Documentation sections", children: tree.map((group) => /* @__PURE__ */ jsxs10(
2468
+ tree.length > 0 ? /* @__PURE__ */ jsx13("section", { className: "np-docs-front-groups", "aria-label": "Documentation sections", children: tree.map((group) => /* @__PURE__ */ jsxs12(
2270
2469
  "a",
2271
2470
  {
2272
2471
  className: "np-docs-front-group",
2273
2472
  href: `/docs/${group.slug}`,
2274
2473
  children: [
2275
- /* @__PURE__ */ jsxs10("h2", { className: "np-docs-front-group-title", children: [
2474
+ /* @__PURE__ */ jsxs12("h2", { className: "np-docs-front-group-title", children: [
2276
2475
  group.title,
2277
- /* @__PURE__ */ jsxs10("span", { className: "np-docs-front-group-count", children: [
2476
+ /* @__PURE__ */ jsxs12("span", { className: "np-docs-front-group-count", children: [
2278
2477
  group.children.length.toString(),
2279
2478
  " page",
2280
2479
  group.children.length === 1 ? "" : "s"
2281
2480
  ] })
2282
2481
  ] }),
2283
- group.lede ? /* @__PURE__ */ jsx11("p", { className: "np-docs-front-group-lede", children: group.lede }) : null,
2284
- group.children.length > 0 ? /* @__PURE__ */ jsx11("ul", { className: "np-docs-front-group-children", children: group.children.slice(0, 4).map((child) => /* @__PURE__ */ jsxs10("li", { children: [
2482
+ group.lede ? /* @__PURE__ */ jsx13("p", { className: "np-docs-front-group-lede", children: group.lede }) : null,
2483
+ group.children.length > 0 ? /* @__PURE__ */ jsx13("ul", { className: "np-docs-front-group-children", children: group.children.slice(0, 4).map((child) => /* @__PURE__ */ jsxs12("li", { children: [
2285
2484
  child.title,
2286
- child.badge ? /* @__PURE__ */ jsx11(
2485
+ child.badge ? /* @__PURE__ */ jsx13(
2287
2486
  "span",
2288
2487
  {
2289
2488
  className: `np-docs-sidebar-badge ${child.badge.toLowerCase()}`,
@@ -2295,16 +2494,16 @@ async function PageFrontTemplate(_props) {
2295
2494
  },
2296
2495
  group.id
2297
2496
  )) }) : null,
2298
- recent.length > 0 ? /* @__PURE__ */ jsxs10(
2497
+ recent.length > 0 ? /* @__PURE__ */ jsxs12(
2299
2498
  "section",
2300
2499
  {
2301
2500
  className: "np-docs-front-recent",
2302
2501
  "aria-label": "Recently updated docs",
2303
2502
  children: [
2304
- /* @__PURE__ */ jsx11("h2", { className: "np-docs-front-recent-eyebrow", children: "Recently updated" }),
2305
- /* @__PURE__ */ jsx11("ul", { className: "np-docs-front-recent-list", children: recent.map((node) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsxs10("a", { href: `/docs/${node.slug}`, children: [
2306
- /* @__PURE__ */ jsx11("span", { className: "np-docs-front-recent-title", children: node.title }),
2307
- node.updatedAt ? /* @__PURE__ */ jsx11(
2503
+ /* @__PURE__ */ jsx13("h2", { className: "np-docs-front-recent-eyebrow", children: "Recently updated" }),
2504
+ /* @__PURE__ */ jsx13("ul", { className: "np-docs-front-recent-list", children: recent.map((node) => /* @__PURE__ */ jsx13("li", { children: /* @__PURE__ */ jsxs12("a", { href: `/docs/${node.slug}`, children: [
2505
+ /* @__PURE__ */ jsx13("span", { className: "np-docs-front-recent-title", children: node.title }),
2506
+ node.updatedAt ? /* @__PURE__ */ jsx13(
2308
2507
  "time",
2309
2508
  {
2310
2509
  className: "np-docs-front-recent-time",
@@ -2384,15 +2583,30 @@ function formatRelative(iso) {
2384
2583
  // src/index.ts
2385
2584
  var SEED_NAV = {
2386
2585
  header: [
2387
- { id: "nav-docs-docs", label: "Docs", type: "link", url: "/docs" },
2586
+ { id: "nav-docs-docs", label: "Docs", type: "link", url: "/" },
2388
2587
  { id: "nav-docs-reference", label: "Reference", type: "link", url: "/docs/reference" },
2389
2588
  { id: "nav-docs-blog", label: "Blog", type: "link", url: "/blog" }
2390
2589
  ],
2391
2590
  footer: [
2392
- { id: "nav-docs-footer-docs", label: "Documentation", type: "link", url: "/docs" },
2393
- { id: "nav-docs-footer-reference", label: "Reference", type: "link", url: "/docs/reference" },
2394
- { id: "nav-docs-footer-changelog", label: "Changelog", type: "link", url: "/changelog" },
2395
- { id: "nav-docs-footer-github", label: "GitHub", type: "link", url: "https://github.com" }
2591
+ { id: "nav-docs-footer-docs", label: "Documentation", type: "link", url: "/" },
2592
+ {
2593
+ id: "nav-docs-footer-reference",
2594
+ label: "Reference",
2595
+ type: "link",
2596
+ url: "/docs/reference"
2597
+ },
2598
+ {
2599
+ id: "nav-docs-footer-changelog",
2600
+ label: "Changelog",
2601
+ type: "link",
2602
+ url: "/changelog"
2603
+ },
2604
+ {
2605
+ id: "nav-docs-footer-github",
2606
+ label: "GitHub",
2607
+ type: "link",
2608
+ url: "https://github.com"
2609
+ }
2396
2610
  ]
2397
2611
  };
2398
2612
  function paragraph(text) {
@@ -2402,15 +2616,17 @@ function paragraph(text) {
2402
2616
  direction: null,
2403
2617
  format: "",
2404
2618
  indent: 0,
2405
- children: [{
2406
- type: "text",
2407
- version: 1,
2408
- detail: 0,
2409
- format: 0,
2410
- mode: "normal",
2411
- style: "",
2412
- text
2413
- }]
2619
+ children: [
2620
+ {
2621
+ type: "text",
2622
+ version: 1,
2623
+ detail: 0,
2624
+ format: 0,
2625
+ mode: "normal",
2626
+ style: "",
2627
+ text
2628
+ }
2629
+ ]
2414
2630
  };
2415
2631
  }
2416
2632
  function heading(tag, text) {
@@ -2421,15 +2637,17 @@ function heading(tag, text) {
2421
2637
  direction: null,
2422
2638
  format: "",
2423
2639
  indent: 0,
2424
- children: [{
2425
- type: "text",
2426
- version: 1,
2427
- detail: 0,
2428
- format: 0,
2429
- mode: "normal",
2430
- style: "",
2431
- text
2432
- }]
2640
+ children: [
2641
+ {
2642
+ type: "text",
2643
+ version: 1,
2644
+ detail: 0,
2645
+ format: 0,
2646
+ mode: "normal",
2647
+ style: "",
2648
+ text
2649
+ }
2650
+ ]
2433
2651
  };
2434
2652
  }
2435
2653
  function codeBlock(text, language) {
@@ -2440,15 +2658,17 @@ function codeBlock(text, language) {
2440
2658
  direction: null,
2441
2659
  format: "",
2442
2660
  indent: 0,
2443
- children: [{
2444
- type: "text",
2445
- version: 1,
2446
- detail: 0,
2447
- format: 0,
2448
- mode: "normal",
2449
- style: "",
2450
- text
2451
- }]
2661
+ children: [
2662
+ {
2663
+ type: "text",
2664
+ version: 1,
2665
+ detail: 0,
2666
+ format: 0,
2667
+ mode: "normal",
2668
+ style: "",
2669
+ text
2670
+ }
2671
+ ]
2452
2672
  };
2453
2673
  }
2454
2674
  function listItem(text) {
@@ -2459,15 +2679,17 @@ function listItem(text) {
2459
2679
  direction: null,
2460
2680
  format: "",
2461
2681
  indent: 0,
2462
- children: [{
2463
- type: "text",
2464
- version: 1,
2465
- detail: 0,
2466
- format: 0,
2467
- mode: "normal",
2468
- style: "",
2469
- text
2470
- }]
2682
+ children: [
2683
+ {
2684
+ type: "text",
2685
+ version: 1,
2686
+ detail: 0,
2687
+ format: 0,
2688
+ mode: "normal",
2689
+ style: "",
2690
+ text
2691
+ }
2692
+ ]
2471
2693
  };
2472
2694
  }
2473
2695
  function bulletList(items) {
@@ -2501,7 +2723,9 @@ function stubDoc(opts) {
2501
2723
  title: opts.title,
2502
2724
  excerpt: opts.lede ?? `${opts.title} reference page.`,
2503
2725
  content: lexicalDoc([
2504
- paragraph(`Placeholder body for ${opts.title}. Operators replace this once they're set up \u2014 every doc-kind post renders through the three-column docs template.`)
2726
+ paragraph(
2727
+ `Placeholder body for ${opts.title}. Operators replace this once they're set up \u2014 every doc-kind post renders through the three-column docs template.`
2728
+ )
2505
2729
  ]),
2506
2730
  publishedAt: DOCS_NOW,
2507
2731
  kind: "doc",
@@ -2592,9 +2816,7 @@ var QUICKSTART_BODY = lexicalDoc([
2592
2816
  "Hooks block the response: onDocumentPublished runs inside the publish request. Long-running work \u2014 sending emails, regenerating sitemaps \u2014 belongs in onSchedule or a queued job. Otherwise the editor will wait on it."
2593
2817
  ),
2594
2818
  heading("h2", "Next steps"),
2595
- paragraph(
2596
- "You have a plugin that runs. Two natural directions from here:"
2597
- ),
2819
+ paragraph("You have a plugin that runs. Two natural directions from here:"),
2598
2820
  bulletList([
2599
2821
  "Add a route. Declare a routes entry in the manifest to expose a public URL \u2014 for webhooks, OAuth callbacks, or a custom admin screen.",
2600
2822
  "Add collections. Plugins can declare their own collections, which the admin surfaces alongside the operator's. See the Plugin manifest reference."
@@ -2607,6 +2829,20 @@ var SEED_PAGES = [
2607
2829
  seoDescription: "Install NexPress, learn the core concepts, write plugins, and look up the API.",
2608
2830
  blocks: [],
2609
2831
  template: "front"
2832
+ },
2833
+ {
2834
+ title: "definePlugin",
2835
+ slug: "docs/reference/define-plugin",
2836
+ seoDescription: "API reference for definePlugin from @nexpress/plugin-sdk.",
2837
+ blocks: [],
2838
+ template: "apiReference"
2839
+ },
2840
+ {
2841
+ title: "Changelog",
2842
+ slug: "changelog",
2843
+ seoDescription: "Reverse-chronological changelog for NexPress pre-1.0 releases.",
2844
+ blocks: [],
2845
+ template: "changelog"
2610
2846
  }
2611
2847
  ];
2612
2848
  var SEED_DOCS = [
@@ -2622,7 +2858,12 @@ var SEED_DOCS = [
2622
2858
  lede: "What NexPress is, what it isn't, and who it's for.",
2623
2859
  stableSince: "Stable since 0.1"
2624
2860
  }),
2625
- stubDoc({ title: "Install & bootstrap", parentSlug: "get-started", order: 1, stableSince: "Stable since 0.1" }),
2861
+ stubDoc({
2862
+ title: "Install & bootstrap",
2863
+ parentSlug: "get-started",
2864
+ order: 1,
2865
+ stableSince: "Stable since 0.1"
2866
+ }),
2626
2867
  stubDoc({ title: "Project structure", parentSlug: "get-started", order: 2 }),
2627
2868
  stubDoc({ title: "Configuration", parentSlug: "get-started", order: 3 }),
2628
2869
  stubDoc({ title: "Deployment", parentSlug: "get-started", order: 4 }),
@@ -2631,7 +2872,12 @@ var SEED_DOCS = [
2631
2872
  order: 1,
2632
2873
  lede: "The model behind collections, themes, plugins, and blocks."
2633
2874
  }),
2634
- stubDoc({ title: "Collections", parentSlug: "core-concepts", order: 0, stableSince: "Stable since 0.1" }),
2875
+ stubDoc({
2876
+ title: "Collections",
2877
+ parentSlug: "core-concepts",
2878
+ order: 0,
2879
+ stableSince: "Stable since 0.1"
2880
+ }),
2635
2881
  stubDoc({ title: "Pages & routing", parentSlug: "core-concepts", order: 1 }),
2636
2882
  stubDoc({ title: "Themes", parentSlug: "core-concepts", order: 2 }),
2637
2883
  stubDoc({ title: "Blocks", parentSlug: "core-concepts", order: 3 }),
@@ -2793,6 +3039,16 @@ var docsTheme = defineTheme({
2793
3039
  label: "Front page",
2794
3040
  description: 'Docs landing \u2014 hero + 2x2 group cards walking the kind="doc" tree + recently-updated row. The seeded home page (slug "/") ships with this template.',
2795
3041
  component: PageFrontTemplate
3042
+ },
3043
+ apiReference: {
3044
+ label: "API reference",
3045
+ description: "Docs reference page with signature, parameter table, and return contract.",
3046
+ component: PageApiReferenceTemplate
3047
+ },
3048
+ changelog: {
3049
+ label: "Changelog",
3050
+ description: "Reverse-chronological release timeline with typed change labels.",
3051
+ component: PageChangelogTemplate
2796
3052
  }
2797
3053
  },
2798
3054
  // Universal-content-model #748 — docs are posts with
@@ -2874,6 +3130,8 @@ export {
2874
3130
  DocsSearch,
2875
3131
  DocsShell,
2876
3132
  DocsSidebar,
3133
+ PageApiReferenceTemplate,
3134
+ PageChangelogTemplate,
2877
3135
  docsBlocks,
2878
3136
  docsCss,
2879
3137
  docsSettingsSchema,