@lets-ship/site 0.0.0-stage → 0.0.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.
Files changed (341) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +59 -2
  3. package/bin/ship-site.js +5 -0
  4. package/dist/badge/badge.d.ts +14 -0
  5. package/dist/badge/badge.d.ts.map +1 -0
  6. package/dist/badge/badge.js +16 -0
  7. package/dist/badge/badge.js.map +1 -0
  8. package/dist/blog/arrow.d.ts +6 -0
  9. package/dist/blog/arrow.d.ts.map +1 -0
  10. package/dist/blog/arrow.js +6 -0
  11. package/dist/blog/arrow.js.map +1 -0
  12. package/dist/blog/article-view.d.ts +20 -0
  13. package/dist/blog/article-view.d.ts.map +1 -0
  14. package/dist/blog/article-view.js +71 -0
  15. package/dist/blog/article-view.js.map +1 -0
  16. package/dist/blog/article.d.ts +72 -0
  17. package/dist/blog/article.d.ts.map +1 -0
  18. package/dist/blog/article.js +90 -0
  19. package/dist/blog/article.js.map +1 -0
  20. package/dist/blog/featured.d.ts +18 -0
  21. package/dist/blog/featured.d.ts.map +1 -0
  22. package/dist/blog/featured.js +19 -0
  23. package/dist/blog/featured.js.map +1 -0
  24. package/dist/blog/frontmatter.d.ts +155 -0
  25. package/dist/blog/frontmatter.d.ts.map +1 -0
  26. package/dist/blog/frontmatter.js +96 -0
  27. package/dist/blog/frontmatter.js.map +1 -0
  28. package/dist/blog/index-view.d.ts +21 -0
  29. package/dist/blog/index-view.d.ts.map +1 -0
  30. package/dist/blog/index-view.js +70 -0
  31. package/dist/blog/index-view.js.map +1 -0
  32. package/dist/blog/inline-markdown.d.ts +15 -0
  33. package/dist/blog/inline-markdown.d.ts.map +1 -0
  34. package/dist/blog/inline-markdown.js +44 -0
  35. package/dist/blog/inline-markdown.js.map +1 -0
  36. package/dist/blog/post-card.d.ts +37 -0
  37. package/dist/blog/post-card.d.ts.map +1 -0
  38. package/dist/blog/post-card.js +68 -0
  39. package/dist/blog/post-card.js.map +1 -0
  40. package/dist/blog/site.d.ts +57 -0
  41. package/dist/blog/site.d.ts.map +1 -0
  42. package/dist/blog/site.js +76 -0
  43. package/dist/blog/site.js.map +1 -0
  44. package/dist/blog/toc.d.ts +29 -0
  45. package/dist/blog/toc.d.ts.map +1 -0
  46. package/dist/blog/toc.js +42 -0
  47. package/dist/blog/toc.js.map +1 -0
  48. package/dist/config/context.d.ts +16 -0
  49. package/dist/config/context.d.ts.map +1 -0
  50. package/dist/config/context.js +11 -0
  51. package/dist/config/context.js.map +1 -0
  52. package/dist/config/identity.d.ts +41 -0
  53. package/dist/config/identity.d.ts.map +1 -0
  54. package/dist/config/identity.js +28 -0
  55. package/dist/config/identity.js.map +1 -0
  56. package/dist/config/json-schema.d.ts +11 -0
  57. package/dist/config/json-schema.d.ts.map +1 -0
  58. package/dist/config/json-schema.js +14 -0
  59. package/dist/config/json-schema.js.map +1 -0
  60. package/dist/config/site-config.d.ts +145 -0
  61. package/dist/config/site-config.d.ts.map +1 -0
  62. package/dist/config/site-config.js +130 -0
  63. package/dist/config/site-config.js.map +1 -0
  64. package/dist/docs/page-view.d.ts +21 -0
  65. package/dist/docs/page-view.d.ts.map +1 -0
  66. package/dist/docs/page-view.js +27 -0
  67. package/dist/docs/page-view.js.map +1 -0
  68. package/dist/feeds/feeds.d.ts +33 -0
  69. package/dist/feeds/feeds.d.ts.map +1 -0
  70. package/dist/feeds/feeds.js +122 -0
  71. package/dist/feeds/feeds.js.map +1 -0
  72. package/dist/format/dates.d.ts +5 -0
  73. package/dist/format/dates.d.ts.map +1 -0
  74. package/dist/format/dates.js +17 -0
  75. package/dist/format/dates.js.map +1 -0
  76. package/dist/format/node-text.d.ts +7 -0
  77. package/dist/format/node-text.d.ts.map +1 -0
  78. package/dist/format/node-text.js +15 -0
  79. package/dist/format/node-text.js.map +1 -0
  80. package/dist/format/toc-depth.d.ts +11 -0
  81. package/dist/format/toc-depth.d.ts.map +1 -0
  82. package/dist/format/toc-depth.js +14 -0
  83. package/dist/format/toc-depth.js.map +1 -0
  84. package/dist/i18n/fumadocs-keys.d.ts +13 -0
  85. package/dist/i18n/fumadocs-keys.d.ts.map +1 -0
  86. package/dist/i18n/fumadocs-keys.js +136 -0
  87. package/dist/i18n/fumadocs-keys.js.map +1 -0
  88. package/dist/i18n/strings.d.ts +19 -0
  89. package/dist/i18n/strings.d.ts.map +1 -0
  90. package/dist/i18n/strings.js +59 -0
  91. package/dist/i18n/strings.js.map +1 -0
  92. package/dist/i18n/tables/de.d.ts +3 -0
  93. package/dist/i18n/tables/de.d.ts.map +1 -0
  94. package/dist/i18n/tables/de.js +82 -0
  95. package/dist/i18n/tables/de.js.map +1 -0
  96. package/dist/i18n/tables/en.d.ts +3 -0
  97. package/dist/i18n/tables/en.d.ts.map +1 -0
  98. package/dist/i18n/tables/en.js +25 -0
  99. package/dist/i18n/tables/en.js.map +1 -0
  100. package/dist/i18n/tables/es.d.ts +3 -0
  101. package/dist/i18n/tables/es.d.ts.map +1 -0
  102. package/dist/i18n/tables/es.js +82 -0
  103. package/dist/i18n/tables/es.js.map +1 -0
  104. package/dist/i18n/tables/fr.d.ts +3 -0
  105. package/dist/i18n/tables/fr.d.ts.map +1 -0
  106. package/dist/i18n/tables/fr.js +82 -0
  107. package/dist/i18n/tables/fr.js.map +1 -0
  108. package/dist/i18n/tables/nl.d.ts +3 -0
  109. package/dist/i18n/tables/nl.d.ts.map +1 -0
  110. package/dist/i18n/tables/nl.js +82 -0
  111. package/dist/i18n/tables/nl.js.map +1 -0
  112. package/dist/i18n/tables/pt.d.ts +3 -0
  113. package/dist/i18n/tables/pt.d.ts.map +1 -0
  114. package/dist/i18n/tables/pt.js +82 -0
  115. package/dist/i18n/tables/pt.js.map +1 -0
  116. package/dist/i18n/tables/tr.d.ts +3 -0
  117. package/dist/i18n/tables/tr.d.ts.map +1 -0
  118. package/dist/i18n/tables/tr.js +82 -0
  119. package/dist/i18n/tables/tr.js.map +1 -0
  120. package/dist/i18n/types.d.ts +39 -0
  121. package/dist/i18n/types.d.ts.map +1 -0
  122. package/dist/i18n/types.js +2 -0
  123. package/dist/i18n/types.js.map +1 -0
  124. package/dist/layout/analytics.d.ts +9 -0
  125. package/dist/layout/analytics.d.ts.map +1 -0
  126. package/dist/layout/analytics.js +18 -0
  127. package/dist/layout/analytics.js.map +1 -0
  128. package/dist/layout/brand-files.d.ts +15 -0
  129. package/dist/layout/brand-files.d.ts.map +1 -0
  130. package/dist/layout/brand-files.js +15 -0
  131. package/dist/layout/brand-files.js.map +1 -0
  132. package/dist/layout/footer.d.ts +10 -0
  133. package/dist/layout/footer.d.ts.map +1 -0
  134. package/dist/layout/footer.js +21 -0
  135. package/dist/layout/footer.js.map +1 -0
  136. package/dist/layout/not-found.d.ts +7 -0
  137. package/dist/layout/not-found.d.ts.map +1 -0
  138. package/dist/layout/not-found.js +8 -0
  139. package/dist/layout/not-found.js.map +1 -0
  140. package/dist/layout/provider.d.ts +17 -0
  141. package/dist/layout/provider.d.ts.map +1 -0
  142. package/dist/layout/provider.js +14 -0
  143. package/dist/layout/provider.js.map +1 -0
  144. package/dist/layout/root.d.ts +17 -0
  145. package/dist/layout/root.d.ts.map +1 -0
  146. package/dist/layout/root.js +47 -0
  147. package/dist/layout/root.js.map +1 -0
  148. package/dist/lint/source.d.ts +19 -0
  149. package/dist/lint/source.d.ts.map +1 -0
  150. package/dist/lint/source.js +43 -0
  151. package/dist/lint/source.js.map +1 -0
  152. package/dist/llms/llms.d.ts +22 -0
  153. package/dist/llms/llms.d.ts.map +1 -0
  154. package/dist/llms/llms.js +24 -0
  155. package/dist/llms/llms.js.map +1 -0
  156. package/dist/markdown/article.d.ts +44 -0
  157. package/dist/markdown/article.d.ts.map +1 -0
  158. package/dist/markdown/article.js +108 -0
  159. package/dist/markdown/article.js.map +1 -0
  160. package/dist/markdown/inline.d.ts +40 -0
  161. package/dist/markdown/inline.d.ts.map +1 -0
  162. package/dist/markdown/inline.js +74 -0
  163. package/dist/markdown/inline.js.map +1 -0
  164. package/dist/markdown/page.d.ts +13 -0
  165. package/dist/markdown/page.d.ts.map +1 -0
  166. package/dist/markdown/page.js +21 -0
  167. package/dist/markdown/page.js.map +1 -0
  168. package/dist/marker.d.ts +37 -0
  169. package/dist/marker.d.ts.map +1 -0
  170. package/dist/marker.js +36 -0
  171. package/dist/marker.js.map +1 -0
  172. package/dist/mdx/allow-list.d.ts +23 -0
  173. package/dist/mdx/allow-list.d.ts.map +1 -0
  174. package/dist/mdx/allow-list.js +79 -0
  175. package/dist/mdx/allow-list.js.map +1 -0
  176. package/dist/mdx/components.d.ts +8 -0
  177. package/dist/mdx/components.d.ts.map +1 -0
  178. package/dist/mdx/components.js +68 -0
  179. package/dist/mdx/components.js.map +1 -0
  180. package/dist/mdx/remark-alerts.d.ts +4 -0
  181. package/dist/mdx/remark-alerts.d.ts.map +1 -0
  182. package/dist/mdx/remark-alerts.js +39 -0
  183. package/dist/mdx/remark-alerts.js.map +1 -0
  184. package/dist/next.d.ts +24 -0
  185. package/dist/next.d.ts.map +1 -0
  186. package/dist/next.js +55 -0
  187. package/dist/next.js.map +1 -0
  188. package/dist/node/bin.d.ts +3 -0
  189. package/dist/node/bin.d.ts.map +1 -0
  190. package/dist/node/bin.js +13 -0
  191. package/dist/node/bin.js.map +1 -0
  192. package/dist/node/brand.d.ts +13 -0
  193. package/dist/node/brand.d.ts.map +1 -0
  194. package/dist/node/brand.js +48 -0
  195. package/dist/node/brand.js.map +1 -0
  196. package/dist/node/build.d.ts +20 -0
  197. package/dist/node/build.d.ts.map +1 -0
  198. package/dist/node/build.js +133 -0
  199. package/dist/node/build.js.map +1 -0
  200. package/dist/node/cli.d.ts +11 -0
  201. package/dist/node/cli.d.ts.map +1 -0
  202. package/dist/node/cli.js +80 -0
  203. package/dist/node/cli.js.map +1 -0
  204. package/dist/node/config-file.d.ts +5 -0
  205. package/dist/node/config-file.d.ts.map +1 -0
  206. package/dist/node/config-file.js +31 -0
  207. package/dist/node/config-file.js.map +1 -0
  208. package/dist/node/content.d.ts +6 -0
  209. package/dist/node/content.d.ts.map +1 -0
  210. package/dist/node/content.js +36 -0
  211. package/dist/node/content.js.map +1 -0
  212. package/dist/node/errors.d.ts +26 -0
  213. package/dist/node/errors.d.ts.map +1 -0
  214. package/dist/node/errors.js +34 -0
  215. package/dist/node/errors.js.map +1 -0
  216. package/dist/node/files.d.ts +12 -0
  217. package/dist/node/files.d.ts.map +1 -0
  218. package/dist/node/files.js +43 -0
  219. package/dist/node/files.js.map +1 -0
  220. package/dist/node/marker.d.ts +24 -0
  221. package/dist/node/marker.d.ts.map +1 -0
  222. package/dist/node/marker.js +22 -0
  223. package/dist/node/marker.js.map +1 -0
  224. package/dist/node/og.d.ts +17 -0
  225. package/dist/node/og.d.ts.map +1 -0
  226. package/dist/node/og.js +43 -0
  227. package/dist/node/og.js.map +1 -0
  228. package/dist/node/project-root.d.ts +12 -0
  229. package/dist/node/project-root.d.ts.map +1 -0
  230. package/dist/node/project-root.js +27 -0
  231. package/dist/node/project-root.js.map +1 -0
  232. package/dist/node/serve.d.ts +32 -0
  233. package/dist/node/serve.d.ts.map +1 -0
  234. package/dist/node/serve.js +133 -0
  235. package/dist/node/serve.js.map +1 -0
  236. package/dist/node/theme.d.ts +15 -0
  237. package/dist/node/theme.d.ts.map +1 -0
  238. package/dist/node/theme.js +46 -0
  239. package/dist/node/theme.js.map +1 -0
  240. package/dist/search/dialog.d.ts +14 -0
  241. package/dist/search/dialog.d.ts.map +1 -0
  242. package/dist/search/dialog.js +17 -0
  243. package/dist/search/dialog.js.map +1 -0
  244. package/dist/search/language.d.ts +8 -0
  245. package/dist/search/language.d.ts.map +1 -0
  246. package/dist/search/language.js +30 -0
  247. package/dist/search/language.js.map +1 -0
  248. package/dist/search/route.d.ts +9 -0
  249. package/dist/search/route.d.ts.map +1 -0
  250. package/dist/search/route.js +11 -0
  251. package/dist/search/route.js.map +1 -0
  252. package/dist/seo/article.d.ts +84 -0
  253. package/dist/seo/article.d.ts.map +1 -0
  254. package/dist/seo/article.js +117 -0
  255. package/dist/seo/article.js.map +1 -0
  256. package/dist/seo/collection.d.ts +19 -0
  257. package/dist/seo/collection.d.ts.map +1 -0
  258. package/dist/seo/collection.js +30 -0
  259. package/dist/seo/collection.js.map +1 -0
  260. package/dist/seo/dataset.d.ts +31 -0
  261. package/dist/seo/dataset.d.ts.map +1 -0
  262. package/dist/seo/dataset.js +33 -0
  263. package/dist/seo/dataset.js.map +1 -0
  264. package/dist/seo/json-ld.d.ts +6 -0
  265. package/dist/seo/json-ld.d.ts.map +1 -0
  266. package/dist/seo/json-ld.js +8 -0
  267. package/dist/seo/json-ld.js.map +1 -0
  268. package/dist/seo/script-json.d.ts +8 -0
  269. package/dist/seo/script-json.d.ts.map +1 -0
  270. package/dist/seo/script-json.js +12 -0
  271. package/dist/seo/script-json.js.map +1 -0
  272. package/dist/seo/title.d.ts +11 -0
  273. package/dist/seo/title.d.ts.map +1 -0
  274. package/dist/seo/title.js +11 -0
  275. package/dist/seo/title.js.map +1 -0
  276. package/dist/seo/x-handle.d.ts +9 -0
  277. package/dist/seo/x-handle.d.ts.map +1 -0
  278. package/dist/seo/x-handle.js +21 -0
  279. package/dist/seo/x-handle.js.map +1 -0
  280. package/dist/site/app.d.ts +56 -0
  281. package/dist/site/app.d.ts.map +1 -0
  282. package/dist/site/app.js +79 -0
  283. package/dist/site/app.js.map +1 -0
  284. package/dist/site/features.d.ts +26 -0
  285. package/dist/site/features.d.ts.map +1 -0
  286. package/dist/site/features.js +46 -0
  287. package/dist/site/features.js.map +1 -0
  288. package/dist/site/metadata.d.ts +6 -0
  289. package/dist/site/metadata.d.ts.map +1 -0
  290. package/dist/site/metadata.js +78 -0
  291. package/dist/site/metadata.js.map +1 -0
  292. package/dist/site/outputs.d.ts +24 -0
  293. package/dist/site/outputs.d.ts.map +1 -0
  294. package/dist/site/outputs.js +113 -0
  295. package/dist/site/outputs.js.map +1 -0
  296. package/dist/site/posts.d.ts +6 -0
  297. package/dist/site/posts.d.ts.map +1 -0
  298. package/dist/site/posts.js +9 -0
  299. package/dist/site/posts.js.map +1 -0
  300. package/dist/site/routes.d.ts +43 -0
  301. package/dist/site/routes.d.ts.map +1 -0
  302. package/dist/site/routes.js +94 -0
  303. package/dist/site/routes.js.map +1 -0
  304. package/dist/site/site-page.d.ts +11 -0
  305. package/dist/site/site-page.d.ts.map +1 -0
  306. package/dist/site/site-page.js +70 -0
  307. package/dist/site/site-page.js.map +1 -0
  308. package/dist/site/sources.d.ts +58 -0
  309. package/dist/site/sources.d.ts.map +1 -0
  310. package/dist/site/sources.js +2 -0
  311. package/dist/site/sources.js.map +1 -0
  312. package/dist/site/url-style.d.ts +21 -0
  313. package/dist/site/url-style.d.ts.map +1 -0
  314. package/dist/site/url-style.js +18 -0
  315. package/dist/site/url-style.js.map +1 -0
  316. package/dist/website/blocks/commerce.d.ts +41 -0
  317. package/dist/website/blocks/commerce.d.ts.map +1 -0
  318. package/dist/website/blocks/commerce.js +26 -0
  319. package/dist/website/blocks/commerce.js.map +1 -0
  320. package/dist/website/blocks/content.d.ts +41 -0
  321. package/dist/website/blocks/content.d.ts.map +1 -0
  322. package/dist/website/blocks/content.js +25 -0
  323. package/dist/website/blocks/content.js.map +1 -0
  324. package/dist/website/blocks/marketing.d.ts +32 -0
  325. package/dist/website/blocks/marketing.d.ts.map +1 -0
  326. package/dist/website/blocks/marketing.js +23 -0
  327. package/dist/website/blocks/marketing.js.map +1 -0
  328. package/dist/website/blocks/parts.d.ts +26 -0
  329. package/dist/website/blocks/parts.d.ts.map +1 -0
  330. package/dist/website/blocks/parts.js +13 -0
  331. package/dist/website/blocks/parts.js.map +1 -0
  332. package/dist/website/page-view.d.ts +12 -0
  333. package/dist/website/page-view.d.ts.map +1 -0
  334. package/dist/website/page-view.js +10 -0
  335. package/dist/website/page-view.js.map +1 -0
  336. package/dist/zod.d.ts +8 -0
  337. package/dist/zod.d.ts.map +1 -0
  338. package/dist/zod.js +8 -0
  339. package/dist/zod.js.map +1 -0
  340. package/package.json +187 -3
  341. package/styles.css +326 -0
@@ -0,0 +1,76 @@
1
+ import { titleTemplate } from "../config/identity.js";
2
+ import { stringsFor } from "../i18n/strings.js";
3
+ import { xHandleFromLink } from "../seo/x-handle.js";
4
+ import { urlPaths } from "../site/url-style.js";
5
+ /** A post byline with no matching author in the site config. */
6
+ export class BlogAuthorError extends Error {
7
+ constructor(name) {
8
+ super(`blog: no author entry for "${name}". Add them to sections.blog.authors in the site config.`);
9
+ this.name = "BlogAuthorError";
10
+ }
11
+ }
12
+ /** A post whose category slug is not in the site config. */
13
+ export class BlogCategoryError extends Error {
14
+ constructor(slug) {
15
+ super(`blog: no category "${slug}". Add it to sections.blog.categories in the site config, or fix the post.`);
16
+ this.name = "BlogCategoryError";
17
+ }
18
+ }
19
+ /** The category a post names, which must exist; a post with no category has none. */
20
+ export function postCategory(site, slug) {
21
+ if (slug === undefined)
22
+ return undefined;
23
+ const category = site.category(slug);
24
+ if (!category)
25
+ throw new BlogCategoryError(slug);
26
+ return category;
27
+ }
28
+ /** A blog view asked for on a site whose config turns the blog off. */
29
+ export class BlogSectionError extends Error {
30
+ constructor() {
31
+ super("blog: the site config turns the blog section off (sections.blog is false)");
32
+ this.name = "BlogSectionError";
33
+ }
34
+ }
35
+ const trimSlash = (path) => path.replace(/\/$/, "");
36
+ export function blogSite(config, identity, style) {
37
+ const blog = config.sections.blog;
38
+ if (!blog)
39
+ throw new BlogSectionError();
40
+ const base = trimSlash(blog.path);
41
+ const { page, markdownPath } = urlPaths(style);
42
+ const categoryPath = (slug) => page(`${base}/category/${slug}`);
43
+ const categories = blog.categories.map((c) => ({ slug: c.slug, name: c.name, path: categoryPath(c.slug) }));
44
+ const author = (name) => {
45
+ const match = blog.authors.find((a) => a.name === name);
46
+ if (!match)
47
+ throw new BlogAuthorError(name);
48
+ return match;
49
+ };
50
+ const xLink = identity.links.x;
51
+ return {
52
+ page,
53
+ markdownPath,
54
+ origin: config.origin,
55
+ publisher: identity.name,
56
+ description: identity.description,
57
+ locale: identity.locale,
58
+ // The x link is optional: a brand without one has no twitter:site.
59
+ ...(xLink === undefined ? {} : { xSite: xHandleFromLink(xLink) }),
60
+ strings: stringsFor(identity.locale),
61
+ titleSeparator: config.titleSeparator,
62
+ titleTemplate: titleTemplate(identity, config.titleSeparator),
63
+ blogPath: page(base || "/"),
64
+ indexLayout: blog.layout,
65
+ categories,
66
+ postPath: (slug) => page(`${base}/${slug}`),
67
+ categoryPath,
68
+ category: (slug) => {
69
+ const match = categories.find((c) => c.slug === slug);
70
+ return match ? { name: match.name, path: match.path } : undefined;
71
+ },
72
+ authorPath: (name) => page(author(name).path),
73
+ authorX: (name) => author(name).x,
74
+ };
75
+ }
76
+ //# sourceMappingURL=site.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"site.js","sourceRoot":"","sources":["../../src/blog/site.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAoB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAiB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAoC/D,gEAAgE;AAChE,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACzC,YAAY,IAAY;QACvB,KAAK,CAAC,8BAA8B,IAAI,0DAA0D,CAAC,CAAC;QACpG,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAC/B,CAAC;CACD;AAED,4DAA4D;AAC5D,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC3C,YAAY,IAAY;QACvB,KAAK,CAAC,sBAAsB,IAAI,4EAA4E,CAAC,CAAC;QAC9G,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IACjC,CAAC;CACD;AAED,qFAAqF;AACrF,MAAM,UAAU,YAAY,CAAC,IAAc,EAAE,IAAwB;IACpE,IAAI,IAAI,KAAK,SAAS;QAAE,OAA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AAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QACnE,CAAC;QACD,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;QAC7C,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;KACjC,CAAC;AACH,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { TOCItemType } from "fumadocs-core/toc";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ export declare function BlogTOCProvider({ toc, children, }: {
4
+ readonly toc: TOCItemType[];
5
+ readonly children: ReactNode;
6
+ }): ReactElement;
7
+ /**
8
+ * The narrow-screen table of contents. The sticky rail below shows from lg up, so without this a
9
+ * long post has no contents on a phone. Collapsed by default so it costs no reading space, and
10
+ * hidden once the rail takes over. The label matches the rail's, so the same post never gives
11
+ * the same thing two names.
12
+ */
13
+ export declare function BlogTOCInline({ toc, label, }: {
14
+ readonly toc: TOCItemType[];
15
+ readonly label: string;
16
+ }): ReactElement | null;
17
+ /**
18
+ * The sticky rail. Its offset clears the site header, whose height the layout publishes as
19
+ * --site-header-height. The 2rem in `top` matches the wrapper's pt-8, so the rail does not
20
+ * move when sticky engages. paddingBottom gives the active indicator of the last item room
21
+ * without raising a scrollbar, and maxHeight grows by more than the padding because box-sizing
22
+ * is border-box. Hidden with max-lg:!hidden, because the docs stylesheet loads later and
23
+ * redeclares .hidden at equal specificity.
24
+ */
25
+ export declare function BlogTOC({ toc, label }: {
26
+ readonly toc: TOCItemType[];
27
+ readonly label: string;
28
+ }): ReactElement | null;
29
+ //# sourceMappingURL=toc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toc.d.ts","sourceRoot":"","sources":["../../src/blog/toc.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,wBAAgB,eAAe,CAAC,EAC/B,GAAG,EACH,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,GAAG,EAAE,WAAW,EAAE,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC7B,GAAG,YAAY,CAEf;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC7B,GAAG,EACH,KAAK,GACL,EAAE;IACF,QAAQ,CAAC,GAAG,EAAE,WAAW,EAAE,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB,GAAG,YAAY,GAAG,IAAI,CAOtB;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,WAAW,EAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,GAAG,IAAI,CAqBpH"}
@@ -0,0 +1,42 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { InlineTOC } from "fumadocs-ui/components/inline-toc";
4
+ import { TOCProvider, useTOCItems } from "fumadocs-ui/components/toc";
5
+ import { TOCItem, TOCItems } from "fumadocs-ui/components/toc/clerk";
6
+ export function BlogTOCProvider({ toc, children, }) {
7
+ return _jsx(TOCProvider, { toc: toc, children: children });
8
+ }
9
+ /**
10
+ * The narrow-screen table of contents. The sticky rail below shows from lg up, so without this a
11
+ * long post has no contents on a phone. Collapsed by default so it costs no reading space, and
12
+ * hidden once the rail takes over. The label matches the rail's, so the same post never gives
13
+ * the same thing two names.
14
+ */
15
+ export function BlogTOCInline({ toc, label, }) {
16
+ if (toc.length === 0)
17
+ return null;
18
+ return (_jsx(InlineTOC, { items: toc, className: "mb-10 lg:!hidden", children: label }));
19
+ }
20
+ /**
21
+ * The sticky rail. Its offset clears the site header, whose height the layout publishes as
22
+ * --site-header-height. The 2rem in `top` matches the wrapper's pt-8, so the rail does not
23
+ * move when sticky engages. paddingBottom gives the active indicator of the last item room
24
+ * without raising a scrollbar, and maxHeight grows by more than the padding because box-sizing
25
+ * is border-box. Hidden with max-lg:!hidden, because the docs stylesheet loads later and
26
+ * redeclares .hidden at equal specificity.
27
+ */
28
+ export function BlogTOC({ toc, label }) {
29
+ if (toc.length === 0)
30
+ return null;
31
+ return (_jsxs("aside", { className: "w-56 shrink-0 self-start max-lg:!hidden lg:block lg:sticky", style: {
32
+ top: "calc(var(--site-header-height) + 2rem)",
33
+ maxHeight: "calc(100vh - var(--site-header-height) - 3rem)",
34
+ paddingBottom: "0.5rem",
35
+ overflowY: "auto",
36
+ }, children: [_jsx("p", { className: "mb-3 text-xs font-medium uppercase tracking-[0.7px]", style: { color: "var(--site-fg-muted)", fontFamily: "var(--font-mono)" }, children: label }), _jsx(TOCItemsList, {})] }));
37
+ }
38
+ function TOCItemsList() {
39
+ const items = useTOCItems();
40
+ return (_jsx(TOCItems, { children: items.map((item) => (_jsx(TOCItem, { item: item }, item.url))) }));
41
+ }
42
+ //# sourceMappingURL=toc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toc.js","sourceRoot":"","sources":["../../src/blog/toc.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGrE,MAAM,UAAU,eAAe,CAAC,EAC/B,GAAG,EACH,QAAQ,GAIR;IACA,OAAO,KAAC,WAAW,IAAC,GAAG,EAAE,GAAG,YAAG,QAAQ,GAAe,CAAC;AACxD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,EAC7B,GAAG,EACH,KAAK,GAIL;IACA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,OAAO,CACN,KAAC,SAAS,IAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAC,kBAAkB,YACjD,KAAK,GACK,CACZ,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CAAC,EAAE,GAAG,EAAE,KAAK,EAA2D;IAC9F,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,OAAO,CACN,iBACC,SAAS,EAAC,4DAA4D,EACtE,KAAK,EAAE;YACN,GAAG,EAAE,wCAAwC;YAC7C,SAAS,EAAE,gDAAgD;YAC3D,aAAa,EAAE,QAAQ;YACvB,SAAS,EAAE,MAAM;SACjB,aAED,YACC,SAAS,EAAC,qDAAqD,EAC/D,KAAK,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,kBAAkB,EAAE,YAEvE,KAAK,GACH,EACJ,KAAC,YAAY,KAAG,IACT,CACR,CAAC;AACH,CAAC;AAED,SAAS,YAAY;IACpB,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,OAAO,CACN,KAAC,QAAQ,cACP,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACpB,KAAC,OAAO,IAAgB,IAAI,EAAE,IAAI,IAApB,IAAI,CAAC,GAAG,CAAgB,CACtC,CAAC,GACQ,CACX,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type LanguageTable } from "../i18n/strings.js";
2
+ import type { SiteIdentity } from "./identity.js";
3
+ import type { SiteConfig } from "./site-config.js";
4
+ /**
5
+ * What the layout needs about a site, resolved once: its config, its identity and the language
6
+ * table of its locale. A missing table fails here, at the start of the build, not on a page.
7
+ */
8
+ export type SiteContext = {
9
+ readonly config: SiteConfig;
10
+ readonly identity: SiteIdentity;
11
+ readonly language: LanguageTable;
12
+ /** The document title template, for example "%s | Acme". */
13
+ readonly titleTemplate: string;
14
+ };
15
+ export declare function siteContext(config: SiteConfig, identity: SiteIdentity): SiteContext;
16
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/config/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAY,MAAM,oBAAoB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,4DAA4D;IAC5D,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,GAAG,WAAW,CAOnF"}
@@ -0,0 +1,11 @@
1
+ import { tableFor } from "../i18n/strings.js";
2
+ import { titleTemplate } from "./identity.js";
3
+ export function siteContext(config, identity) {
4
+ return {
5
+ config,
6
+ identity,
7
+ language: tableFor(identity.locale),
8
+ titleTemplate: titleTemplate(identity, config.titleSeparator),
9
+ };
10
+ }
11
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/config/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAe9C,MAAM,UAAU,WAAW,CAAC,MAAkB,EAAE,QAAsB;IACrE,OAAO;QACN,MAAM;QACN,QAAQ;QACR,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;QACnC,aAAa,EAAE,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,cAAc,CAAC;KAC7D,CAAC;AACH,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The site identity: the facts about the brand that a page prints (D26). A template builds it
3
+ * from the brand DNA with identityFromDna, so the DNA stays the one source. letsship.ai passes
4
+ * its own until it moves to SHIP's DNA (D20).
5
+ */
6
+ export type SiteIdentity = {
7
+ readonly name: string;
8
+ /** One line that describes the site: the DNA's short boilerplate. */
9
+ readonly description: string;
10
+ /** BCP-47, for example en or en-GB: the DNA's first locale. */
11
+ readonly locale: string;
12
+ /** The brand's own links (website, x, linkedin, …), from the DNA. */
13
+ readonly links: Readonly<Record<string, string>>;
14
+ /** Whether the brand has dark colours. A brand without them renders light, with no theme switch. */
15
+ readonly darkMode: boolean;
16
+ };
17
+ /** The parts of a brand DNA that the identity reads. Structural, so the engine needs no DNA import. */
18
+ export type DnaIdentitySource = {
19
+ readonly brand: {
20
+ readonly name: string;
21
+ readonly locales: readonly string[];
22
+ readonly links: Readonly<Record<string, string>>;
23
+ };
24
+ readonly messaging: {
25
+ readonly boilerplate: {
26
+ readonly short: string;
27
+ };
28
+ };
29
+ /** The colour token groups; `role-dark` is there only when the brand has dark colours. */
30
+ readonly tokens: {
31
+ readonly color: Readonly<Record<string, unknown>>;
32
+ };
33
+ };
34
+ /** A DNA that lacks a fact the identity needs. */
35
+ export declare class SiteIdentityError extends Error {
36
+ constructor(field: string);
37
+ }
38
+ export declare function identityFromDna(dna: DnaIdentitySource): SiteIdentity;
39
+ /** The site name as a document title suffix, for example "Post title ~ Acme". */
40
+ export declare function titleTemplate(identity: SiteIdentity, separator: string): string;
41
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/config/identity.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAC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a fact the identity needs. */
2
+ export class SiteIdentityError extends Error {
3
+ constructor(field) {
4
+ super(`site identity: the brand DNA has no ${field}`);
5
+ this.name = "SiteIdentityError";
6
+ }
7
+ }
8
+ const hasKeys = (value) => typeof value === "object" && value !== null && Object.keys(value).length > 0;
9
+ export function identityFromDna(dna) {
10
+ const locale = dna.brand.locales[0];
11
+ if (!locale)
12
+ throw new SiteIdentityError("brand.locales[0]");
13
+ if (!dna.messaging.boilerplate.short.trim())
14
+ throw new SiteIdentityError("messaging.boilerplate.short");
15
+ return {
16
+ name: dna.brand.name,
17
+ description: dna.messaging.boilerplate.short,
18
+ locale,
19
+ links: dna.brand.links,
20
+ // brand-dna's hasDarkMode, the rule by which the compiler writes the theme's .dark block.
21
+ darkMode: hasKeys(dna.tokens.color["role-dark"]),
22
+ };
23
+ }
24
+ /** The site name as a document title suffix, for example "Post title ~ Acme". */
25
+ export function titleTemplate(identity, separator) {
26
+ return `%s ${separator} ${identity.name}`;
27
+ }
28
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/config/identity.ts"],"names":[],"mappings":"AA6BA,kDAAkD;AAClD,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC3C,YAAY,KAAa;QACxB,KAAK,CAAC,uCAAuC,KAAK,EAAE,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IACjC,CAAC;CACD;AAED,MAAM,OAAO,GAAG,CAAC,KAAc,EAAW,EAAE,CAC3C,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAE9E,MAAM,UAAU,eAAe,CAAC,GAAsB;IACrD,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACpC,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAC7D,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,MAAM,IAAI,iBAAiB,CAAC,6BAA6B,CAAC,CAAC;IACxG,OAAO;QACN,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI;QACpB,WAAW,EAAE,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK;QAC5C,MAAM;QACN,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK;QACtB,0FAA0F;QAC1F,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;KAChD,CAAC;AACH,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,aAAa,CAAC,QAAsB,EAAE,SAAiB;IACtE,OAAO,MAAM,SAAS,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The JSON Schema of `site.config.ts`, generated from the schema `ship-site` checks the config
3
+ * with, so an editor and the build can never disagree on a key. Rules that span keys (two
4
+ * sections at one path, llms.txt without Markdown copies) are code, not schema: the build still
5
+ * names those. The publisher passes the URL it serves the document at and the document's title.
6
+ */
7
+ export declare function siteConfigJsonSchema(meta: {
8
+ readonly id: string;
9
+ readonly title: string;
10
+ }): Record<string, unknown>;
11
+ //# sourceMappingURL=json-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../src/config/json-schema.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAInH"}
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ import { SiteConfigSchema } from "./site-config.js";
3
+ /**
4
+ * The JSON Schema of `site.config.ts`, generated from the schema `ship-site` checks the config
5
+ * with, so an editor and the build can never disagree on a key. Rules that span keys (two
6
+ * sections at one path, llms.txt without Markdown copies) are code, not schema: the build still
7
+ * names those. The publisher passes the URL it serves the document at and the document's title.
8
+ */
9
+ export function siteConfigJsonSchema(meta) {
10
+ // "input": the config as an author writes it, before any transform.
11
+ const schema = z.toJSONSchema(SiteConfigSchema, { io: "input", unrepresentable: "any" });
12
+ return { $id: meta.id, title: meta.title, ...schema };
13
+ }
14
+ //# sourceMappingURL=json-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.js","sourceRoot":"","sources":["../../src/config/json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAqD;IACzF,oEAAoE;IACpE,MAAM,MAAM,GAAG,CAAC,CAAC,YAAY,CAAC,gBAAgB,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC;IACzF,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,MAAM,EAAE,CAAC;AACvD,CAAC"}
@@ -0,0 +1,145 @@
1
+ /**
2
+ * The site config (SHIP Sites D26, D37): the structure of a site. Every key is required and the
3
+ * schema has no defaults, so a config states each choice and nothing changes behind the user's
4
+ * back. Facts about the brand (name, description, colours, fonts) are not here: they come from
5
+ * the brand DNA, through the site identity. The schema is strict, so a config that tries to set
6
+ * one of them fails with the key named.
7
+ */
8
+ import { z } from "zod";
9
+ export declare const BlogCategory: z.ZodObject<{
10
+ slug: z.ZodString;
11
+ name: z.ZodString;
12
+ title: z.ZodString;
13
+ description: z.ZodString;
14
+ }, z.core.$strict>;
15
+ export declare const Author: z.ZodObject<{
16
+ name: z.ZodString;
17
+ path: z.ZodString;
18
+ bio: z.ZodString;
19
+ x: z.ZodNullable<z.ZodString>;
20
+ }, z.core.$strict>;
21
+ export declare const WebsiteSection: z.ZodObject<{
22
+ path: z.ZodString;
23
+ content: z.ZodString;
24
+ }, z.core.$strict>;
25
+ export declare const BlogSection: z.ZodObject<{
26
+ path: z.ZodString;
27
+ content: z.ZodString;
28
+ categories: z.ZodArray<z.ZodObject<{
29
+ slug: z.ZodString;
30
+ name: z.ZodString;
31
+ title: z.ZodString;
32
+ description: z.ZodString;
33
+ }, z.core.$strict>>;
34
+ authors: z.ZodArray<z.ZodObject<{
35
+ name: z.ZodString;
36
+ path: z.ZodString;
37
+ bio: z.ZodString;
38
+ x: z.ZodNullable<z.ZodString>;
39
+ }, z.core.$strict>>;
40
+ feeds: z.ZodBoolean;
41
+ layout: z.ZodEnum<{
42
+ list: "list";
43
+ grid: "grid";
44
+ magazine: "magazine";
45
+ }>;
46
+ }, z.core.$strict>;
47
+ export declare const DocsSection: z.ZodObject<{
48
+ path: z.ZodString;
49
+ content: z.ZodString;
50
+ editUrl: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>;
51
+ tabs: z.ZodArray<z.ZodObject<{
52
+ label: z.ZodString;
53
+ path: z.ZodString;
54
+ }, z.core.$strict>>;
55
+ }, z.core.$strict>;
56
+ export declare const SiteConfigSchema: z.ZodObject<{
57
+ origin: z.ZodString;
58
+ titleSeparator: z.ZodString;
59
+ sections: z.ZodObject<{
60
+ website: z.ZodUnion<readonly [z.ZodObject<{
61
+ path: z.ZodString;
62
+ content: z.ZodString;
63
+ }, z.core.$strict>, z.ZodLiteral<false>]>;
64
+ blog: z.ZodUnion<readonly [z.ZodObject<{
65
+ path: z.ZodString;
66
+ content: z.ZodString;
67
+ categories: z.ZodArray<z.ZodObject<{
68
+ slug: z.ZodString;
69
+ name: z.ZodString;
70
+ title: z.ZodString;
71
+ description: z.ZodString;
72
+ }, z.core.$strict>>;
73
+ authors: z.ZodArray<z.ZodObject<{
74
+ name: z.ZodString;
75
+ path: z.ZodString;
76
+ bio: z.ZodString;
77
+ x: z.ZodNullable<z.ZodString>;
78
+ }, z.core.$strict>>;
79
+ feeds: z.ZodBoolean;
80
+ layout: z.ZodEnum<{
81
+ list: "list";
82
+ grid: "grid";
83
+ magazine: "magazine";
84
+ }>;
85
+ }, z.core.$strict>, z.ZodLiteral<false>]>;
86
+ docs: z.ZodUnion<readonly [z.ZodObject<{
87
+ path: z.ZodString;
88
+ content: z.ZodString;
89
+ editUrl: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>;
90
+ tabs: z.ZodArray<z.ZodObject<{
91
+ label: z.ZodString;
92
+ path: z.ZodString;
93
+ }, z.core.$strict>>;
94
+ }, z.core.$strict>, z.ZodLiteral<false>]>;
95
+ }, z.core.$strict>;
96
+ nav: z.ZodArray<z.ZodObject<{
97
+ label: z.ZodString;
98
+ href: z.ZodString;
99
+ }, z.core.$strict>>;
100
+ mdxComponents: z.ZodArray<z.ZodString>;
101
+ footer: z.ZodObject<{
102
+ columns: z.ZodArray<z.ZodObject<{
103
+ title: z.ZodString;
104
+ links: z.ZodArray<z.ZodObject<{
105
+ label: z.ZodString;
106
+ href: z.ZodString;
107
+ }, z.core.$strict>>;
108
+ }, z.core.$strict>>;
109
+ social: z.ZodEnum<{
110
+ none: "none";
111
+ "brand-links": "brand-links";
112
+ }>;
113
+ badge: z.ZodBoolean;
114
+ }, z.core.$strict>;
115
+ features: z.ZodObject<{
116
+ search: z.ZodBoolean;
117
+ markdownCopies: z.ZodBoolean;
118
+ llms: z.ZodBoolean;
119
+ }, z.core.$strict>;
120
+ integrations: z.ZodObject<{
121
+ analytics: z.ZodDiscriminatedUnion<[z.ZodObject<{
122
+ provider: z.ZodLiteral<"none">;
123
+ }, z.core.$strict>, z.ZodObject<{
124
+ provider: z.ZodLiteral<"plausible">;
125
+ key: z.ZodString;
126
+ }, z.core.$strict>, z.ZodObject<{
127
+ provider: z.ZodLiteral<"umami">;
128
+ key: z.ZodString;
129
+ }, z.core.$strict>, z.ZodObject<{
130
+ provider: z.ZodLiteral<"fathom">;
131
+ key: z.ZodString;
132
+ }, z.core.$strict>], "provider">;
133
+ }, z.core.$strict>;
134
+ }, z.core.$strict>;
135
+ export type SiteConfig = z.infer<typeof SiteConfigSchema>;
136
+ export type SectionKind = "website" | "blog" | "docs";
137
+ /** A site config that does not parse. The message names each key and what is wrong with it. */
138
+ export declare class SiteConfigError extends Error {
139
+ constructor(issues: readonly z.ZodIssue[]);
140
+ }
141
+ /** Parses a site config, or throws SiteConfigError naming every problem. */
142
+ export declare function defineSiteConfig(input: unknown): SiteConfig;
143
+ /** The section mounted at a path, or undefined. */
144
+ export declare function sectionAt(site: SiteConfig, path: string): SectionKind | undefined;
145
+ //# sourceMappingURL=site-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"site-config.d.ts","sourceRoot":"","sources":["../../src/config/site-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,YAAY;;;;;kBAEf,CAAC;AAEX,eAAO,MAAM,MAAM;;;;;kBAQT,CAAC;AAEX,eAAO,MAAM,cAAc;;;kBAAgE,CAAC;AAE5F,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;kBAUd,CAAC;AAEX,eAAO,MAAM,WAAW;;;;;;;;kBAQd,CAAC;AAYX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkD1B,CAAC;AAEJ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD,+FAA+F;AAC/F,qBAAa,eAAgB,SAAQ,KAAK;gBAC7B,MAAM,EAAE,SAAS,CAAC,CAAC,QAAQ,EAAE;CAIzC;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAI3D;AAED,mDAAmD;AACnD,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAMjF"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * The site config (SHIP Sites D26, D37): the structure of a site. Every key is required and the
3
+ * schema has no defaults, so a config states each choice and nothing changes behind the user's
4
+ * back. Facts about the brand (name, description, colours, fonts) are not here: they come from
5
+ * the brand DNA, through the site identity. The schema is strict, so a config that tries to set
6
+ * one of them fails with the key named.
7
+ */
8
+ import { z } from "zod";
9
+ import { X_HANDLE_PATTERN } from "../seo/x-handle.js";
10
+ const Slug = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "slug must be a lowercase URL segment");
11
+ // Segments joined by single slashes, with an optional trailing one. No nested optional slash: that
12
+ // form backtracks exponentially on a long path with one bad character.
13
+ const Path = z
14
+ .string()
15
+ .regex(/^\/(?:[a-z0-9-]+(?:\/[a-z0-9-]+)*\/?)?$/, "path must start with / and hold lowercase segments");
16
+ const Href = z.string().min(1);
17
+ const Origin = z
18
+ .string()
19
+ .regex(/^https:\/\/[a-z0-9.-]+(?::\d+)?$/, "origin must be a lowercase https origin with no path or trailing slash");
20
+ export const BlogCategory = z
21
+ .object({ slug: Slug, name: z.string().min(1), title: z.string().min(1), description: z.string().min(1) })
22
+ .strict();
23
+ export const Author = z
24
+ .object({
25
+ name: z.string().min(1),
26
+ path: Path,
27
+ bio: z.string(),
28
+ /** The author's X handle for `twitter:creator`, for example "@name", or null for none. */
29
+ x: z.string().regex(X_HANDLE_PATTERN, 'x must be an X handle like "@name"').nullable(),
30
+ })
31
+ .strict();
32
+ export const WebsiteSection = z.object({ path: Path, content: z.string().min(1) }).strict();
33
+ export const BlogSection = z
34
+ .object({
35
+ path: Path,
36
+ content: z.string().min(1),
37
+ categories: z.array(BlogCategory).min(1),
38
+ authors: z.array(Author).min(1),
39
+ feeds: z.boolean(),
40
+ /** How the index shows posts: a plain list, a grid of cards, or a magazine with featured posts first. */
41
+ layout: z.enum(["list", "grid", "magazine"]),
42
+ })
43
+ .strict();
44
+ export const DocsSection = z
45
+ .object({
46
+ path: Path,
47
+ content: z.string().min(1),
48
+ /** The repo URL that "Edit on GitHub" links into, or false for no link. */
49
+ editUrl: z.union([z.string().url(), z.literal(false)]),
50
+ tabs: z.array(z.object({ label: z.string().min(1), path: Path }).strict()),
51
+ })
52
+ .strict();
53
+ const keyed = (provider) => z.object({ provider: z.literal(provider), key: z.string().min(1) }).strict();
54
+ const Analytics = z.discriminatedUnion("provider", [
55
+ z.object({ provider: z.literal("none") }).strict(),
56
+ keyed("plausible"),
57
+ keyed("umami"),
58
+ keyed("fathom"),
59
+ ]);
60
+ export const SiteConfigSchema = z
61
+ .object({
62
+ origin: Origin,
63
+ /** The mark between a page title and the site name in a document title, for example "~" or "|". */
64
+ titleSeparator: z.string().min(1).max(3),
65
+ sections: z
66
+ .object({
67
+ website: z.union([WebsiteSection, z.literal(false)]),
68
+ blog: z.union([BlogSection, z.literal(false)]),
69
+ docs: z.union([DocsSection, z.literal(false)]),
70
+ })
71
+ .strict(),
72
+ nav: z.array(z.object({ label: z.string().min(1), href: Href }).strict()),
73
+ /** The site's own MDX components, by name, on top of the engine's allow-list (D31). */
74
+ mdxComponents: z.array(z.string().regex(/^[A-Z][A-Za-z0-9]*$/, "a component name starts with a capital letter")),
75
+ footer: z
76
+ .object({
77
+ columns: z.array(z
78
+ .object({ title: z.string().min(1), links: z.array(z.object({ label: z.string(), href: Href }).strict()) })
79
+ .strict()),
80
+ social: z.enum(["brand-links", "none"]),
81
+ badge: z.boolean(),
82
+ })
83
+ .strict(),
84
+ features: z.object({ search: z.boolean(), markdownCopies: z.boolean(), llms: z.boolean() }).strict(),
85
+ integrations: z.object({ analytics: Analytics }).strict(),
86
+ })
87
+ .strict()
88
+ .superRefine((site, ctx) => {
89
+ const on = Object.entries(site.sections).filter(([, section]) => section !== false);
90
+ if (on.length === 0)
91
+ ctx.addIssue({ code: "custom", path: ["sections"], message: "turn on at least one section" });
92
+ if (site.features.llms && !site.features.markdownCopies)
93
+ ctx.addIssue({
94
+ code: "custom",
95
+ path: ["features", "llms"],
96
+ message: "llms.txt links each page's Markdown copy, so it needs markdownCopies: true",
97
+ });
98
+ for (const [kind, section] of on) {
99
+ const twin = on.find(([other, s]) => other !== kind && s.path === section.path);
100
+ if (twin && kind < twin[0])
101
+ ctx.addIssue({
102
+ code: "custom",
103
+ path: ["sections", kind, "path"],
104
+ message: `${kind} and ${twin[0]} are both at ${section.path}`,
105
+ });
106
+ }
107
+ });
108
+ /** A site config that does not parse. The message names each key and what is wrong with it. */
109
+ export class SiteConfigError extends Error {
110
+ constructor(issues) {
111
+ super(`site config: ${issues.map((issue) => `${issue.path.join(".") || "(root)"}: ${issue.message}`).join("; ")}`);
112
+ this.name = "SiteConfigError";
113
+ }
114
+ }
115
+ /** Parses a site config, or throws SiteConfigError naming every problem. */
116
+ export function defineSiteConfig(input) {
117
+ const parsed = SiteConfigSchema.safeParse(input);
118
+ if (!parsed.success)
119
+ throw new SiteConfigError(parsed.error.issues);
120
+ return parsed.data;
121
+ }
122
+ /** The section mounted at a path, or undefined. */
123
+ export function sectionAt(site, path) {
124
+ const kinds = Object.keys(site.sections);
125
+ return kinds.find((kind) => {
126
+ const section = site.sections[kind];
127
+ return section !== false && section.path === path;
128
+ });
129
+ }
130
+ //# sourceMappingURL=site-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"site-config.js","sourceRoot":"","sources":["../../src/config/site-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OA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AAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnH,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAC/B,CAAC;CACD;AAED,4EAA4E;AAC5E,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC9C,MAAM,MAAM,GAAG,gBAAgB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACjD,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,MAAM,IAAI,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpE,OAAO,MAAM,CAAC,IAAI,CAAC;AACpB,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,SAAS,CAAC,IAAgB,EAAE,IAAY;IACvD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAkB,CAAC;IAC1D,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1B,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpC,OAAO,OAAO,KAAK,KAAK,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC;IACnD,CAAC,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { MDXComponents } from "mdx/types";
2
+ import type { ReactElement } from "react";
3
+ import type { SiteContext } from "../config/context.js";
4
+ import type { DocsEntry } from "../site/sources.js";
5
+ /**
6
+ * Where "Edit on GitHub" points for a page: the config's repo URL, then the docs content folder,
7
+ * then the page's file. None when the config sets `editUrl: false`.
8
+ */
9
+ export declare function editLink(context: SiteContext, entry: DocsEntry): string | undefined;
10
+ /**
11
+ * A docs page: its title and summary, the body, the contents on the side, the previous and next
12
+ * pages from the sidebar tree, and the edit link. `after` takes what follows the page, such as the
13
+ * site footer.
14
+ */
15
+ export declare function DocsPageView({ context, entry, components, after, }: {
16
+ readonly context: SiteContext;
17
+ readonly entry: DocsEntry;
18
+ readonly components: MDXComponents;
19
+ readonly after?: ReactElement;
20
+ }): ReactElement;
21
+ //# sourceMappingURL=page-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-view.d.ts","sourceRoot":"","sources":["../../src/docs/page-view.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAKnF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC5B,OAAO,EACP,KAAK,EACL,UAAU,EACV,KAAK,GACL,EAAE;IACF,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;CAC9B,GAAG,YAAY,CAiBf"}