livemark 0.10.5 → 0.11.1

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 (448) hide show
  1. package/build/actions/changelog/build.d.ts +22 -0
  2. package/build/actions/changelog/build.js +198 -0
  3. package/build/actions/config/load.d.ts +12 -0
  4. package/build/actions/config/load.js +41 -0
  5. package/build/actions/config/load.unit.js +39 -0
  6. package/build/actions/target/build.d.ts +29 -0
  7. package/build/actions/target/build.js +87 -0
  8. package/build/commands/build.js +15 -0
  9. package/{target → build}/commands/escape.d.ts +1 -1
  10. package/build/commands/escape.js +62 -0
  11. package/build/commands/preview.js +19 -0
  12. package/build/commands/start.js +20 -0
  13. package/build/components/Breadcrumbs.js +14 -0
  14. package/build/components/Layout.js +66 -0
  15. package/build/components/SidebarArticles.js +46 -0
  16. package/build/components/SidebarLinks.js +27 -0
  17. package/build/components/SidebarSections.js +37 -0
  18. package/build/components/SiteTitle.js +13 -0
  19. package/build/content/article.js +55 -0
  20. package/build/content/tag.js +31 -0
  21. package/build/content-collections.js +218 -0
  22. package/{target → build}/models/config.d.ts +17 -1
  23. package/build/models/config.js +38 -0
  24. package/build/plugins/vite-livemark.d.ts +12 -0
  25. package/build/plugins/vite-livemark.js +165 -0
  26. package/build/routes/__root.js +68 -0
  27. package/build/settings.d.ts +9 -0
  28. package/build/settings.js +25 -0
  29. package/build/vite.config.js +30 -0
  30. package/package.json +9 -7
  31. package/source/actions/changelog/build.ts +26 -9
  32. package/source/actions/config/load.ts +21 -6
  33. package/source/actions/config/load.unit.ts +19 -2
  34. package/source/actions/target/build.ts +89 -0
  35. package/source/commands/build.ts +1 -0
  36. package/source/commands/escape.ts +18 -11
  37. package/source/commands/preview.ts +1 -0
  38. package/source/commands/start.ts +1 -0
  39. package/source/components/Breadcrumbs.tsx +2 -1
  40. package/source/components/Layout.tsx +3 -2
  41. package/source/components/SidebarArticles.tsx +2 -1
  42. package/source/components/SidebarLinks.tsx +2 -1
  43. package/source/components/SidebarSections.tsx +2 -1
  44. package/source/components/SiteTitle.tsx +5 -10
  45. package/source/content/article.ts +2 -1
  46. package/source/content/tag.ts +2 -1
  47. package/source/content-collections.ts +1 -1
  48. package/source/env.d.ts +2 -2
  49. package/source/models/config.ts +22 -1
  50. package/source/plugins/vite-livemark.ts +168 -94
  51. package/source/routeTree.gen.ts +86 -0
  52. package/source/routes/__root.tsx +7 -9
  53. package/source/settings.ts +13 -2
  54. package/source/vite.config.ts +4 -78
  55. package/target/actions/changelog/build.d.ts +0 -15
  56. package/target/actions/changelog/build.js +0 -187
  57. package/target/actions/config/load.d.ts +0 -5
  58. package/target/actions/config/load.js +0 -25
  59. package/target/actions/config/load.unit.js +0 -25
  60. package/target/commands/build.js +0 -14
  61. package/target/commands/escape.js +0 -56
  62. package/target/commands/preview.js +0 -18
  63. package/target/commands/start.js +0 -19
  64. package/target/components/Breadcrumbs.js +0 -13
  65. package/target/components/Layout.js +0 -65
  66. package/target/components/SidebarArticles.js +0 -45
  67. package/target/components/SidebarLinks.js +0 -26
  68. package/target/components/SidebarSections.js +0 -36
  69. package/target/components/SiteTitle.js +0 -12
  70. package/target/content/article.js +0 -54
  71. package/target/content/tag.js +0 -30
  72. package/target/content-collections.js +0 -218
  73. package/target/models/config.js +0 -34
  74. package/target/plugins/vite-livemark.d.ts +0 -18
  75. package/target/plugins/vite-livemark.js +0 -111
  76. package/target/routes/__root.js +0 -69
  77. package/target/settings.d.ts +0 -5
  78. package/target/settings.js +0 -15
  79. package/target/vite.config.js +0 -89
  80. package/{target → build}/actions/changelog/build.unit.d.ts +0 -0
  81. package/{target → build}/actions/changelog/build.unit.js +0 -0
  82. package/{target → build}/actions/config/define.d.ts +0 -0
  83. package/{target → build}/actions/config/define.js +0 -0
  84. package/{target → build}/actions/config/define.unit.d.ts +0 -0
  85. package/{target → build}/actions/config/define.unit.js +0 -0
  86. package/{target → build}/actions/config/load.unit.d.ts +0 -0
  87. package/{target → build}/client.d.ts +0 -0
  88. package/{target → build}/client.js +0 -0
  89. package/{target → build}/commands/build.d.ts +0 -0
  90. package/{target → build}/commands/preview.d.ts +0 -0
  91. package/{target → build}/commands/start.d.ts +0 -0
  92. package/{target → build}/components/Abbr.d.ts +0 -0
  93. package/{target → build}/components/Abbr.js +0 -0
  94. package/{target → build}/components/AnsiCode.d.ts +0 -0
  95. package/{target → build}/components/AnsiCode.js +0 -0
  96. package/{target → build}/components/Article.d.ts +0 -0
  97. package/{target → build}/components/Article.js +0 -0
  98. package/{target → build}/components/BackToTop.d.ts +0 -0
  99. package/{target → build}/components/BackToTop.js +0 -0
  100. package/{target → build}/components/Banner.d.ts +0 -0
  101. package/{target → build}/components/Banner.js +0 -0
  102. package/{target → build}/components/BlogIndex.d.ts +0 -0
  103. package/{target → build}/components/BlogIndex.js +0 -0
  104. package/{target → build}/components/Breadcrumbs.d.ts +0 -0
  105. package/{target → build}/components/Callout.d.ts +0 -0
  106. package/{target → build}/components/Callout.js +0 -0
  107. package/{target → build}/components/Card.d.ts +0 -0
  108. package/{target → build}/components/Card.js +0 -0
  109. package/{target → build}/components/Cards.d.ts +0 -0
  110. package/{target → build}/components/Cards.js +0 -0
  111. package/{target → build}/components/ChangelogIndex.d.ts +0 -0
  112. package/{target → build}/components/ChangelogIndex.js +0 -0
  113. package/{target → build}/components/CodeBlock.d.ts +0 -0
  114. package/{target → build}/components/CodeBlock.js +0 -0
  115. package/{target → build}/components/CodeTabs.d.ts +0 -0
  116. package/{target → build}/components/CodeTabs.js +0 -0
  117. package/{target → build}/components/Column.d.ts +0 -0
  118. package/{target → build}/components/Column.js +0 -0
  119. package/{target → build}/components/Columns.d.ts +0 -0
  120. package/{target → build}/components/Columns.js +0 -0
  121. package/{target → build}/components/Content.d.ts +0 -0
  122. package/{target → build}/components/Content.js +0 -0
  123. package/{target → build}/components/ContentTab.d.ts +0 -0
  124. package/{target → build}/components/ContentTab.js +0 -0
  125. package/{target → build}/components/ContentTabs.d.ts +0 -0
  126. package/{target → build}/components/ContentTabs.js +0 -0
  127. package/{target → build}/components/DefaultCatchBoundary.d.ts +0 -0
  128. package/{target → build}/components/DefaultCatchBoundary.js +0 -0
  129. package/{target → build}/components/DefinitionList.d.ts +0 -0
  130. package/{target → build}/components/DefinitionList.js +0 -0
  131. package/{target → build}/components/Details.d.ts +0 -0
  132. package/{target → build}/components/Details.js +0 -0
  133. package/{target → build}/components/FileTree.d.ts +0 -0
  134. package/{target → build}/components/FileTree.js +0 -0
  135. package/{target → build}/components/Footer.d.ts +0 -0
  136. package/{target → build}/components/Footer.js +0 -0
  137. package/{target → build}/components/FootnoteRef.d.ts +0 -0
  138. package/{target → build}/components/FootnoteRef.js +0 -0
  139. package/{target → build}/components/Heading.d.ts +0 -0
  140. package/{target → build}/components/Heading.js +0 -0
  141. package/{target → build}/components/InlineBadge.d.ts +0 -0
  142. package/{target → build}/components/InlineBadge.js +0 -0
  143. package/{target → build}/components/InlineIcon.d.ts +0 -0
  144. package/{target → build}/components/InlineIcon.js +0 -0
  145. package/{target → build}/components/InlineToc.d.ts +0 -0
  146. package/{target → build}/components/InlineToc.js +0 -0
  147. package/{target → build}/components/Layout.d.ts +0 -0
  148. package/{target → build}/components/LinkButton.d.ts +0 -0
  149. package/{target → build}/components/LinkButton.js +0 -0
  150. package/{target → build}/components/Mermaid.d.ts +0 -0
  151. package/{target → build}/components/Mermaid.js +0 -0
  152. package/{target → build}/components/MermaidRenderer.d.ts +0 -0
  153. package/{target → build}/components/MermaidRenderer.js +0 -0
  154. package/{target → build}/components/NotFound.d.ts +0 -0
  155. package/{target → build}/components/NotFound.js +0 -0
  156. package/{target → build}/components/PackageTabs.d.ts +0 -0
  157. package/{target → build}/components/PackageTabs.js +0 -0
  158. package/{target → build}/components/PageToolbar.d.ts +0 -0
  159. package/{target → build}/components/PageToolbar.js +0 -0
  160. package/{target → build}/components/PrevNext.d.ts +0 -0
  161. package/{target → build}/components/PrevNext.js +0 -0
  162. package/{target → build}/components/Search.d.ts +0 -0
  163. package/{target → build}/components/Search.js +0 -0
  164. package/{target → build}/components/SearchDialog.d.ts +0 -0
  165. package/{target → build}/components/SearchDialog.js +0 -0
  166. package/{target → build}/components/Section.d.ts +0 -0
  167. package/{target → build}/components/Section.js +0 -0
  168. package/{target → build}/components/SectionHeader.d.ts +0 -0
  169. package/{target → build}/components/SectionHeader.js +0 -0
  170. package/{target → build}/components/Sidebar.d.ts +0 -0
  171. package/{target → build}/components/Sidebar.js +0 -0
  172. package/{target → build}/components/SidebarArticles.d.ts +0 -0
  173. package/{target → build}/components/SidebarLinks.d.ts +0 -0
  174. package/{target → build}/components/SidebarPosts.d.ts +0 -0
  175. package/{target → build}/components/SidebarPosts.js +0 -0
  176. package/{target → build}/components/SidebarReleases.d.ts +0 -0
  177. package/{target → build}/components/SidebarReleases.js +0 -0
  178. package/{target → build}/components/SidebarSections.d.ts +0 -0
  179. package/{target → build}/components/SiteTitle.d.ts +0 -0
  180. package/{target → build}/components/SortableTable.d.ts +0 -0
  181. package/{target → build}/components/SortableTable.js +0 -0
  182. package/{target → build}/components/SoundCloud.d.ts +0 -0
  183. package/{target → build}/components/SoundCloud.js +0 -0
  184. package/{target → build}/components/TagIndex.d.ts +0 -0
  185. package/{target → build}/components/TagIndex.js +0 -0
  186. package/{target → build}/components/Theme.d.ts +0 -0
  187. package/{target → build}/components/Theme.js +0 -0
  188. package/{target → build}/components/Toc.d.ts +0 -0
  189. package/{target → build}/components/Toc.js +0 -0
  190. package/{target → build}/components/YouTube.d.ts +0 -0
  191. package/{target → build}/components/YouTube.js +0 -0
  192. package/{target → build}/components/ZoomImage.d.ts +0 -0
  193. package/{target → build}/components/ZoomImage.js +0 -0
  194. package/{target → build}/content/article.d.ts +5 -5
  195. /package/{target → build}/content/tag.d.ts +0 -0
  196. /package/{target → build}/content-collections.d.ts +0 -0
  197. /package/{target → build}/elements/accordion.d.ts +0 -0
  198. /package/{target → build}/elements/accordion.js +0 -0
  199. /package/{target → build}/elements/alert-dialog.d.ts +0 -0
  200. /package/{target → build}/elements/alert-dialog.js +0 -0
  201. /package/{target → build}/elements/alert.d.ts +0 -0
  202. /package/{target → build}/elements/alert.js +0 -0
  203. /package/{target → build}/elements/aspect-ratio.d.ts +0 -0
  204. /package/{target → build}/elements/aspect-ratio.js +0 -0
  205. /package/{target → build}/elements/avatar.d.ts +0 -0
  206. /package/{target → build}/elements/avatar.js +0 -0
  207. /package/{target → build}/elements/badge.d.ts +0 -0
  208. /package/{target → build}/elements/badge.js +0 -0
  209. /package/{target → build}/elements/breadcrumb.d.ts +0 -0
  210. /package/{target → build}/elements/breadcrumb.js +0 -0
  211. /package/{target → build}/elements/button-group.d.ts +0 -0
  212. /package/{target → build}/elements/button-group.js +0 -0
  213. /package/{target → build}/elements/button.d.ts +0 -0
  214. /package/{target → build}/elements/button.js +0 -0
  215. /package/{target → build}/elements/calendar.d.ts +0 -0
  216. /package/{target → build}/elements/calendar.js +0 -0
  217. /package/{target → build}/elements/card.d.ts +0 -0
  218. /package/{target → build}/elements/card.js +0 -0
  219. /package/{target → build}/elements/carousel.d.ts +0 -0
  220. /package/{target → build}/elements/carousel.js +0 -0
  221. /package/{target → build}/elements/chart.d.ts +0 -0
  222. /package/{target → build}/elements/chart.js +0 -0
  223. /package/{target → build}/elements/checkbox.d.ts +0 -0
  224. /package/{target → build}/elements/checkbox.js +0 -0
  225. /package/{target → build}/elements/collapsible.d.ts +0 -0
  226. /package/{target → build}/elements/collapsible.js +0 -0
  227. /package/{target → build}/elements/command.d.ts +0 -0
  228. /package/{target → build}/elements/command.js +0 -0
  229. /package/{target → build}/elements/context-menu.d.ts +0 -0
  230. /package/{target → build}/elements/context-menu.js +0 -0
  231. /package/{target → build}/elements/dialog.d.ts +0 -0
  232. /package/{target → build}/elements/dialog.js +0 -0
  233. /package/{target → build}/elements/direction.d.ts +0 -0
  234. /package/{target → build}/elements/direction.js +0 -0
  235. /package/{target → build}/elements/drawer.d.ts +0 -0
  236. /package/{target → build}/elements/drawer.js +0 -0
  237. /package/{target → build}/elements/dropdown-menu.d.ts +0 -0
  238. /package/{target → build}/elements/dropdown-menu.js +0 -0
  239. /package/{target → build}/elements/empty.d.ts +0 -0
  240. /package/{target → build}/elements/empty.js +0 -0
  241. /package/{target → build}/elements/field.d.ts +0 -0
  242. /package/{target → build}/elements/field.js +0 -0
  243. /package/{target → build}/elements/hover-card.d.ts +0 -0
  244. /package/{target → build}/elements/hover-card.js +0 -0
  245. /package/{target → build}/elements/input-group.d.ts +0 -0
  246. /package/{target → build}/elements/input-group.js +0 -0
  247. /package/{target → build}/elements/input-otp.d.ts +0 -0
  248. /package/{target → build}/elements/input-otp.js +0 -0
  249. /package/{target → build}/elements/input.d.ts +0 -0
  250. /package/{target → build}/elements/input.js +0 -0
  251. /package/{target → build}/elements/item.d.ts +0 -0
  252. /package/{target → build}/elements/item.js +0 -0
  253. /package/{target → build}/elements/kbd.d.ts +0 -0
  254. /package/{target → build}/elements/kbd.js +0 -0
  255. /package/{target → build}/elements/label.d.ts +0 -0
  256. /package/{target → build}/elements/label.js +0 -0
  257. /package/{target → build}/elements/menubar.d.ts +0 -0
  258. /package/{target → build}/elements/menubar.js +0 -0
  259. /package/{target → build}/elements/native-select.d.ts +0 -0
  260. /package/{target → build}/elements/native-select.js +0 -0
  261. /package/{target → build}/elements/navigation-menu.d.ts +0 -0
  262. /package/{target → build}/elements/navigation-menu.js +0 -0
  263. /package/{target → build}/elements/pagination.d.ts +0 -0
  264. /package/{target → build}/elements/pagination.js +0 -0
  265. /package/{target → build}/elements/popover.d.ts +0 -0
  266. /package/{target → build}/elements/popover.js +0 -0
  267. /package/{target → build}/elements/progress.d.ts +0 -0
  268. /package/{target → build}/elements/progress.js +0 -0
  269. /package/{target → build}/elements/radio-group.d.ts +0 -0
  270. /package/{target → build}/elements/radio-group.js +0 -0
  271. /package/{target → build}/elements/resizable.d.ts +0 -0
  272. /package/{target → build}/elements/resizable.js +0 -0
  273. /package/{target → build}/elements/scroll-area.d.ts +0 -0
  274. /package/{target → build}/elements/scroll-area.js +0 -0
  275. /package/{target → build}/elements/select.d.ts +0 -0
  276. /package/{target → build}/elements/select.js +0 -0
  277. /package/{target → build}/elements/separator.d.ts +0 -0
  278. /package/{target → build}/elements/separator.js +0 -0
  279. /package/{target → build}/elements/sheet.d.ts +0 -0
  280. /package/{target → build}/elements/sheet.js +0 -0
  281. /package/{target → build}/elements/sidebar.d.ts +0 -0
  282. /package/{target → build}/elements/sidebar.js +0 -0
  283. /package/{target → build}/elements/skeleton.d.ts +0 -0
  284. /package/{target → build}/elements/skeleton.js +0 -0
  285. /package/{target → build}/elements/slider.d.ts +0 -0
  286. /package/{target → build}/elements/slider.js +0 -0
  287. /package/{target → build}/elements/sonner.d.ts +0 -0
  288. /package/{target → build}/elements/sonner.js +0 -0
  289. /package/{target → build}/elements/spinner.d.ts +0 -0
  290. /package/{target → build}/elements/spinner.js +0 -0
  291. /package/{target → build}/elements/switch.d.ts +0 -0
  292. /package/{target → build}/elements/switch.js +0 -0
  293. /package/{target → build}/elements/table.d.ts +0 -0
  294. /package/{target → build}/elements/table.js +0 -0
  295. /package/{target → build}/elements/tabs.d.ts +0 -0
  296. /package/{target → build}/elements/tabs.js +0 -0
  297. /package/{target → build}/elements/textarea.d.ts +0 -0
  298. /package/{target → build}/elements/textarea.js +0 -0
  299. /package/{target → build}/elements/toggle-group.d.ts +0 -0
  300. /package/{target → build}/elements/toggle-group.js +0 -0
  301. /package/{target → build}/elements/toggle.d.ts +0 -0
  302. /package/{target → build}/elements/toggle.js +0 -0
  303. /package/{target → build}/elements/tooltip.d.ts +0 -0
  304. /package/{target → build}/elements/tooltip.js +0 -0
  305. /package/{target → build}/entrypoints/main.d.ts +0 -0
  306. /package/{target → build}/entrypoints/main.js +0 -0
  307. /package/{target → build}/helpers/article-icon.d.ts +0 -0
  308. /package/{target → build}/helpers/article-icon.js +0 -0
  309. /package/{target → build}/helpers/article.d.ts +0 -0
  310. /package/{target → build}/helpers/article.js +0 -0
  311. /package/{target → build}/helpers/changelog-source.d.ts +0 -0
  312. /package/{target → build}/helpers/changelog-source.js +0 -0
  313. /package/{target → build}/helpers/changelog-source.unit.d.ts +0 -0
  314. /package/{target → build}/helpers/changelog-source.unit.js +0 -0
  315. /package/{target → build}/helpers/dynamic-icon-resolver.d.ts +0 -0
  316. /package/{target → build}/helpers/dynamic-icon-resolver.js +0 -0
  317. /package/{target → build}/helpers/dynamic-icon.d.ts +0 -0
  318. /package/{target → build}/helpers/dynamic-icon.js +0 -0
  319. /package/{target → build}/helpers/favicon.d.ts +0 -0
  320. /package/{target → build}/helpers/favicon.js +0 -0
  321. /package/{target → build}/helpers/model.d.ts +0 -0
  322. /package/{target → build}/helpers/model.js +0 -0
  323. /package/{target → build}/helpers/program.d.ts +0 -0
  324. /package/{target → build}/helpers/program.js +0 -0
  325. /package/{target → build}/helpers/resolve-asset-path.d.ts +0 -0
  326. /package/{target → build}/helpers/resolve-asset-path.js +0 -0
  327. /package/{target → build}/helpers/resolve-includes.d.ts +0 -0
  328. /package/{target → build}/helpers/resolve-includes.js +0 -0
  329. /package/{target → build}/helpers/resolve-includes.unit.d.ts +0 -0
  330. /package/{target → build}/helpers/resolve-includes.unit.js +0 -0
  331. /package/{target → build}/helpers/search-text.d.ts +0 -0
  332. /package/{target → build}/helpers/search-text.js +0 -0
  333. /package/{target → build}/helpers/section.d.ts +0 -0
  334. /package/{target → build}/helpers/section.js +0 -0
  335. /package/{target → build}/helpers/section.unit.d.ts +0 -0
  336. /package/{target → build}/helpers/section.unit.js +0 -0
  337. /package/{target → build}/helpers/theme.d.ts +0 -0
  338. /package/{target → build}/helpers/theme.js +0 -0
  339. /package/{target → build}/helpers/toc-context.d.ts +0 -0
  340. /package/{target → build}/helpers/toc-context.js +0 -0
  341. /package/{target → build}/helpers/toc.d.ts +0 -0
  342. /package/{target → build}/helpers/toc.js +0 -0
  343. /package/{target → build}/helpers/toc.unit.d.ts +0 -0
  344. /package/{target → build}/helpers/toc.unit.js +0 -0
  345. /package/{target → build}/hooks/in-view.d.ts +0 -0
  346. /package/{target → build}/hooks/in-view.js +0 -0
  347. /package/{target → build}/hooks/media.d.ts +0 -0
  348. /package/{target → build}/hooks/media.js +0 -0
  349. /package/{target → build}/index.d.ts +0 -0
  350. /package/{target → build}/index.js +0 -0
  351. /package/{target → build}/models/article.d.ts +0 -0
  352. /package/{target → build}/models/article.js +0 -0
  353. /package/{target → build}/models/link.d.ts +0 -0
  354. /package/{target → build}/models/link.js +0 -0
  355. /package/{target → build}/models/patch.d.ts +0 -0
  356. /package/{target → build}/models/patch.js +0 -0
  357. /package/{target → build}/models/section.d.ts +0 -0
  358. /package/{target → build}/models/section.js +0 -0
  359. /package/{target → build}/models/theme.d.ts +0 -0
  360. /package/{target → build}/models/theme.js +0 -0
  361. /package/{target → build}/models/toc.d.ts +0 -0
  362. /package/{target → build}/models/toc.js +0 -0
  363. /package/{target → build}/plugins/rehype-inline-code.d.ts +0 -0
  364. /package/{target → build}/plugins/rehype-inline-code.js +0 -0
  365. /package/{target → build}/plugins/rehype-task-list-a11y.d.ts +0 -0
  366. /package/{target → build}/plugins/rehype-task-list-a11y.js +0 -0
  367. /package/{target → build}/plugins/remark-abbr.d.ts +0 -0
  368. /package/{target → build}/plugins/remark-abbr.js +0 -0
  369. /package/{target → build}/plugins/remark-abbr.unit.d.ts +0 -0
  370. /package/{target → build}/plugins/remark-abbr.unit.js +0 -0
  371. /package/{target → build}/plugins/remark-ansi.d.ts +0 -0
  372. /package/{target → build}/plugins/remark-ansi.js +0 -0
  373. /package/{target → build}/plugins/remark-ansi.unit.d.ts +0 -0
  374. /package/{target → build}/plugins/remark-ansi.unit.js +0 -0
  375. /package/{target → build}/plugins/remark-badge.d.ts +0 -0
  376. /package/{target → build}/plugins/remark-badge.js +0 -0
  377. /package/{target → build}/plugins/remark-badge.unit.d.ts +0 -0
  378. /package/{target → build}/plugins/remark-badge.unit.js +0 -0
  379. /package/{target → build}/plugins/remark-button.d.ts +0 -0
  380. /package/{target → build}/plugins/remark-button.js +0 -0
  381. /package/{target → build}/plugins/remark-button.unit.d.ts +0 -0
  382. /package/{target → build}/plugins/remark-button.unit.js +0 -0
  383. /package/{target → build}/plugins/remark-callout.d.ts +0 -0
  384. /package/{target → build}/plugins/remark-callout.js +0 -0
  385. /package/{target → build}/plugins/remark-card.d.ts +0 -0
  386. /package/{target → build}/plugins/remark-card.js +0 -0
  387. /package/{target → build}/plugins/remark-code-tabs.d.ts +0 -0
  388. /package/{target → build}/plugins/remark-code-tabs.js +0 -0
  389. /package/{target → build}/plugins/remark-columns.d.ts +0 -0
  390. /package/{target → build}/plugins/remark-columns.js +0 -0
  391. /package/{target → build}/plugins/remark-custom-heading-id.d.ts +0 -0
  392. /package/{target → build}/plugins/remark-custom-heading-id.js +0 -0
  393. /package/{target → build}/plugins/remark-custom-heading-id.unit.d.ts +0 -0
  394. /package/{target → build}/plugins/remark-custom-heading-id.unit.js +0 -0
  395. /package/{target → build}/plugins/remark-deflist.d.ts +0 -0
  396. /package/{target → build}/plugins/remark-deflist.js +0 -0
  397. /package/{target → build}/plugins/remark-details.d.ts +0 -0
  398. /package/{target → build}/plugins/remark-details.js +0 -0
  399. /package/{target → build}/plugins/remark-filetree.d.ts +0 -0
  400. /package/{target → build}/plugins/remark-filetree.js +0 -0
  401. /package/{target → build}/plugins/remark-filetree.unit.d.ts +0 -0
  402. /package/{target → build}/plugins/remark-filetree.unit.js +0 -0
  403. /package/{target → build}/plugins/remark-github-callout.d.ts +0 -0
  404. /package/{target → build}/plugins/remark-github-callout.js +0 -0
  405. /package/{target → build}/plugins/remark-icon.d.ts +0 -0
  406. /package/{target → build}/plugins/remark-icon.js +0 -0
  407. /package/{target → build}/plugins/remark-image.d.ts +0 -0
  408. /package/{target → build}/plugins/remark-image.js +0 -0
  409. /package/{target → build}/plugins/remark-media.d.ts +0 -0
  410. /package/{target → build}/plugins/remark-media.js +0 -0
  411. /package/{target → build}/plugins/remark-media.unit.d.ts +0 -0
  412. /package/{target → build}/plugins/remark-media.unit.js +0 -0
  413. /package/{target → build}/plugins/remark-mermaid.d.ts +0 -0
  414. /package/{target → build}/plugins/remark-mermaid.js +0 -0
  415. /package/{target → build}/plugins/remark-npm.d.ts +0 -0
  416. /package/{target → build}/plugins/remark-npm.js +0 -0
  417. /package/{target → build}/plugins/remark-passthrough-directive.d.ts +0 -0
  418. /package/{target → build}/plugins/remark-passthrough-directive.js +0 -0
  419. /package/{target → build}/plugins/remark-steps.d.ts +0 -0
  420. /package/{target → build}/plugins/remark-steps.js +0 -0
  421. /package/{target → build}/plugins/remark-steps.unit.d.ts +0 -0
  422. /package/{target → build}/plugins/remark-steps.unit.js +0 -0
  423. /package/{target → build}/plugins/remark-tab.d.ts +0 -0
  424. /package/{target → build}/plugins/remark-tab.js +0 -0
  425. /package/{target → build}/plugins/remark-tab.unit.d.ts +0 -0
  426. /package/{target → build}/plugins/remark-tab.unit.js +0 -0
  427. /package/{target → build}/plugins/remark-toc.d.ts +0 -0
  428. /package/{target → build}/plugins/remark-toc.js +0 -0
  429. /package/{target → build}/plugins/remark-toc.unit.d.ts +0 -0
  430. /package/{target → build}/plugins/remark-toc.unit.js +0 -0
  431. /package/{target → build}/plugins/shiki-icon.d.ts +0 -0
  432. /package/{target → build}/plugins/shiki-icon.js +0 -0
  433. /package/{target → build}/plugins/shiki-line-highlight.d.ts +0 -0
  434. /package/{target → build}/plugins/shiki-line-highlight.js +0 -0
  435. /package/{target → build}/program.d.ts +0 -0
  436. /package/{target → build}/program.js +0 -0
  437. /package/{target → build}/routeTree.gen.d.ts +0 -0
  438. /package/{target → build}/routeTree.gen.js +0 -0
  439. /package/{target → build}/router.d.ts +0 -0
  440. /package/{target → build}/router.js +0 -0
  441. /package/{target → build}/routes/$.d.ts +0 -0
  442. /package/{target → build}/routes/$.js +0 -0
  443. /package/{target → build}/routes/__root.d.ts +0 -0
  444. /package/{target → build}/server.d.ts +0 -0
  445. /package/{target → build}/server.js +0 -0
  446. /package/{target → build}/utils/style.d.ts +0 -0
  447. /package/{target → build}/utils/style.js +0 -0
  448. /package/{target → build}/vite.config.d.ts +0 -0
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { config } from "livemark:virtual";
3
+ import { TanStackDevtools } from "@tanstack/react-devtools";
4
+ import { ReactQueryDevtoolsPanel } from "@tanstack/react-query-devtools";
5
+ import { createRootRoute, HeadContent, Outlet, Scripts, useMatch, } from "@tanstack/react-router";
6
+ import { TanStackRouterDevtoolsPanel } from "@tanstack/react-router-devtools";
7
+ import { Layout } from "../components/Layout.js";
8
+ import { DefaultCatchBoundary } from "../components/DefaultCatchBoundary.js";
9
+ import { NotFound } from "../components/NotFound.js";
10
+ import { Toaster } from "../elements/sonner.js";
11
+ import { faviconType } from "../helpers/favicon.js";
12
+ import defaultFavicon from "../assets/logo.svg";
13
+ import generalCss from "../styles/general.css?url";
14
+ export const Route = createRootRoute({
15
+ head: () => {
16
+ const favicon = config.favicon ?? config.logo ?? defaultFavicon;
17
+ return {
18
+ meta: [
19
+ { charSet: "utf-8" },
20
+ { title: config.title },
21
+ { name: "description", content: config.description },
22
+ { property: "og:title", content: config.title },
23
+ {
24
+ property: "og:description",
25
+ content: config.description,
26
+ },
27
+ { property: "og:site_name", content: config.title },
28
+ { property: "og:type", content: "website" },
29
+ {
30
+ name: "viewport",
31
+ content: "width=device-width, initial-scale=1",
32
+ },
33
+ ],
34
+ links: [
35
+ { rel: "icon", href: favicon, type: faviconType(favicon) },
36
+ { rel: "stylesheet", href: generalCss },
37
+ ],
38
+ };
39
+ },
40
+ notFoundComponent: () => _jsx(NotFound, {}),
41
+ errorComponent: props => {
42
+ return (_jsx(Document, { children: _jsx(DefaultCatchBoundary, { ...props }) }));
43
+ },
44
+ component: () => {
45
+ return (_jsx(Document, { children: _jsx(Outlet, {}) }));
46
+ },
47
+ });
48
+ function Document(props) {
49
+ const articleRoute = useMatch({ from: "/$", shouldThrow: false });
50
+ const withSidebar = articleRoute?.loaderData?.sidebar;
51
+ return (_jsxs("html", { lang: "en", children: [
52
+ _jsx("head", { children: _jsx(HeadContent, {}) }), _jsxs("body", { children: [
53
+ _jsx(Layout, { withSidebar: withSidebar, children: props.children }), _jsx(Toaster, { position: "top-center" }), _jsx(TanStackDevtools, { config: { hideUntilHover: true, position: "bottom-left" }, plugins: [
54
+ {
55
+ name: "TanStack Query",
56
+ render: _jsx(ReactQueryDevtoolsPanel, {}),
57
+ defaultOpen: true,
58
+ },
59
+ {
60
+ name: "TanStack Router",
61
+ render: _jsx(TanStackRouterDevtoolsPanel, {}),
62
+ defaultOpen: false,
63
+ },
64
+ ] }), _jsx(Scripts, {})
65
+ ] })
66
+ ] }));
67
+ }
68
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiX19yb290LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc291cmNlL3JvdXRlcy9fX3Jvb3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDekMsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sMEJBQTBCLENBQUE7QUFDM0QsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sZ0NBQWdDLENBQUE7QUFDeEUsT0FBTyxFQUNMLGVBQWUsRUFDZixXQUFXLEVBQ1gsTUFBTSxFQUNOLE9BQU8sRUFDUCxRQUFRLEdBQ1QsTUFBTSx3QkFBd0IsQ0FBQTtBQUMvQixPQUFPLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQTtBQUU3RSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0seUJBQTBCLENBQUE7QUFDakQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sdUNBQXdDLENBQUE7QUFDN0UsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLD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NlTWF0Y2goeyBmcm9tOiBcIi8kXCIsIHNob3VsZFRocm93OiBmYWxzZSB9KVxuICBjb25zdCB3aXRoU2lkZWJhciA9IGFydGljbGVSb3V0ZT8ubG9hZGVyRGF0YT8uc2lkZWJhclxuXG4gIHJldHVybiAoXG4gICAgPGh0bWwgbGFuZz1cImVuXCI+XG4gICAgICA8aGVhZD5cbiAgICAgICAgPEhlYWRDb250ZW50IC8+XG4gICAgICA8L2hlYWQ+XG4gICAgICA8Ym9keT5cbiAgICAgICAgPExheW91dCB3aXRoU2lkZWJhcj17d2l0aFNpZGViYXJ9Pntwcm9wcy5jaGlsZHJlbn08L0xheW91dD5cbiAgICAgICAgPFRvYXN0ZXIgcG9zaXRpb249XCJ0b3AtY2VudGVyXCIgLz5cbiAgICAgICAgPFRhblN0YWNrRGV2dG9vbHNcbiAgICAgICAgICBjb25maWc9e3sgaGlkZVVudGlsSG92ZXI6IHRydWUsIHBvc2l0aW9uOiBcImJvdHRvbS1sZWZ0XCIgfX1cbiAgICAgICAgICBwbHVnaW5zPXtbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIG5hbWU6IFwiVGFuU3RhY2sgUXVlcnlcIixcbiAgICAgICAgICAgICAgcmVuZGVyOiA8UmVhY3RRdWVyeURldnRvb2xzUGFuZWwgLz4sXG4gICAgICAgICAgICAgIGRlZmF1bHRPcGVuOiB0cnVlLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgbmFtZTogXCJUYW5TdGFjayBSb3V0ZXJcIixcbiAgICAgICAgICAgICAgcmVuZGVyOiA8VGFuU3RhY2tSb3V0ZXJEZXZ0b29sc1BhbmVsIC8+LFxuICAgICAgICAgICAgICBkZWZhdWx0T3BlbjogZmFsc2UsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF19XG4gICAgICAgIC8+XG4gICAgICAgIDxTY3JpcHRzIC8+XG4gICAgICA8L2JvZHk+XG4gICAgPC9odG1sPlxuICApXG59XG4iXX0=
@@ -0,0 +1,9 @@
1
+ /** Subdirs of source/ where consumer files in `.livemark/<folder>/` are
2
+ * merged per-file into the runtime mount, with `.livemark` winning on
3
+ * conflict. */
4
+ export declare const ESCAPABLE_FOLDERS: readonly string[];
5
+ /** Top-level source files that `.livemark/<file>` can replace atomically. */
6
+ export declare const ESCAPABLE_FILES: readonly string[];
7
+ /** Glob patterns auto-excluded from content scanning when the consumer's
8
+ * project doesn't ship a `.gitignore` to declare its own exclusions. */
9
+ export declare const DEFAULT_EXCLUDES: readonly string[];
@@ -0,0 +1,25 @@
1
+ /** Subdirs of source/ where consumer files in `.livemark/<folder>/` are
2
+ * merged per-file into the runtime mount, with `.livemark` winning on
3
+ * conflict. */
4
+ export const ESCAPABLE_FOLDERS = [
5
+ "components",
6
+ "elements",
7
+ "styles",
8
+ "routes",
9
+ "public",
10
+ ];
11
+ /** Top-level source files that `.livemark/<file>` can replace atomically. */
12
+ export const ESCAPABLE_FILES = [
13
+ "client.tsx",
14
+ "server.ts",
15
+ "router.tsx",
16
+ ];
17
+ /** Glob patterns auto-excluded from content scanning when the consumer's
18
+ * project doesn't ship a `.gitignore` to declare its own exclusions. */
19
+ export const DEFAULT_EXCLUDES = [
20
+ "**/node_modules/**",
21
+ "**/.git/**",
22
+ "**/build/**",
23
+ "**/dist/**",
24
+ ];
25
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dGluZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zb3VyY2Uvc2V0dGluZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O2dCQUVnQjtBQUNoQixNQUFNLENBQUMsTUFBTSxpQkFBaUIsR0FBc0I7SUFDbEQsWUFBWTtJQUNaLFVBQVU7SUFDVixRQUFRO0lBQ1IsUUFBUTtJQUNSLFFBQVE7Q0FDVCxDQUFBO0FBRUQsNkVBQTZFO0FBQzdFLE1BQU0sQ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aXRzIG93biBleGNsdXNpb25zLiAqL1xuZXhwb3J0IGNvbnN0IERFRkFVTFRfRVhDTFVERVM6IHJlYWRvbmx5IHN0cmluZ1tdID0gW1xuICBcIioqL25vZGVfbW9kdWxlcy8qKlwiLFxuICBcIioqLy5naXQvKipcIixcbiAgXCIqKi9idWlsZC8qKlwiLFxuICBcIioqL2Rpc3QvKipcIixcbl1cbiJdfQ==
@@ -0,0 +1,30 @@
1
+ import contentCollections from "@content-collections/vite";
2
+ import tailwind from "@tailwindcss/vite";
3
+ import { devtools } from "@tanstack/devtools-vite";
4
+ import { tanstackStart } from "@tanstack/react-start/plugin/vite";
5
+ import react from "@vitejs/plugin-react";
6
+ import { defineConfig } from "vite";
7
+ import svgr from "vite-plugin-svgr";
8
+ import { loadConfig } from "./actions/config/load.js";
9
+ import { livemark } from "./plugins/vite-livemark.js";
10
+ const config = await loadConfig();
11
+ export default defineConfig({
12
+ plugins: [
13
+ livemark({ config }),
14
+ devtools(),
15
+ tailwind(),
16
+ contentCollections({ configPath: "content-collections.ts" }),
17
+ tanstackStart({
18
+ srcDirectory: ".",
19
+ pages: [{ path: "/" }],
20
+ prerender: { enabled: true, crawlLinks: true },
21
+ sitemap: config.site
22
+ ? { enabled: true, host: config.site }
23
+ : { enabled: false },
24
+ router: { generatedRouteTree: "routeTree.gen.ts" },
25
+ }),
26
+ react(),
27
+ svgr(),
28
+ ],
29
+ });
30
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidml0ZS5jb25maWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zb3VyY2Uvdml0ZS5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxrQkFBa0IsTUFBTSwyQkFBMkIsQ0FBQTtBQUMxRCxPQUFPLFFBQVEsTUFBTSxtQkFBbUIsQ0FBQTtBQUN4QyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0se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BcIi5cIixcbiAgICAgIHBhZ2VzOiBbeyBwYXRoOiBcIi9cIiB9XSxcbiAgICAgIHByZXJlbmRlcjogeyBlbmFibGVkOiB0cnVlLCBjcmF3bExpbmtzOiB0cnVlIH0sXG4gICAgICBzaXRlbWFwOiBjb25maWcuc2l0ZVxuICAgICAgICA/IHsgZW5hYmxlZDogdHJ1ZSwgaG9zdDogY29uZmlnLnNpdGUgfVxuICAgICAgICA6IHsgZW5hYmxlZDogZmFsc2UgfSxcbiAgICAgIHJvdXRlcjogeyBnZW5lcmF0ZWRSb3V0ZVRyZWU6IFwicm91dGVUcmVlLmdlbi50c1wiIH0sXG4gICAgfSksXG4gICAgcmVhY3QoKSxcbiAgICBzdmdyKCksXG4gIF0sXG59KVxuIl19
package/package.json CHANGED
@@ -1,23 +1,22 @@
1
1
  {
2
2
  "name": "livemark",
3
- "version": "0.10.5",
3
+ "version": "0.11.1",
4
4
  "description": "Livemark description",
5
5
  "license": "MIT",
6
6
  "author": "Evgeny Karev",
7
7
  "repository": "https://github.com/datisthq/livemark",
8
8
  "bin": {
9
- "livemark": "./target/entrypoints/main.js"
9
+ "livemark": "./build/entrypoints/main.js"
10
10
  },
11
11
  "files": [
12
- "target",
12
+ "build",
13
13
  "source",
14
- "!source/routeTree.gen.ts",
15
14
  "skills"
16
15
  ],
17
16
  "type": "module",
18
17
  "sideEffects": false,
19
18
  "exports": {
20
- ".": "./target/index.js",
19
+ ".": "./build/index.js",
21
20
  "./components/*": "./source/components/*.tsx",
22
21
  "./elements/*": "./source/elements/*.tsx",
23
22
  "./hooks/*": "./source/hooks/*.ts",
@@ -92,6 +91,7 @@
92
91
  "zod": "4.3.6"
93
92
  },
94
93
  "devDependencies": {
94
+ "@plausible-analytics/tracker": "^0.4.4",
95
95
  "@semantic-release/exec": "7.1.0",
96
96
  "@types/node": "24.2.0",
97
97
  "@typescript/native-preview": "7.0.0-dev.20260316.1",
@@ -100,6 +100,7 @@
100
100
  "husky": "9.1.7",
101
101
  "is-ci": "4.1.0",
102
102
  "lefthook": "2.1.1",
103
+ "livemark": "link:.",
103
104
  "npm-check-updates": "18.0.1",
104
105
  "react": "19.2.4",
105
106
  "react-dom": "19.2.4",
@@ -118,15 +119,16 @@
118
119
  "pnpm": "^10.0.0"
119
120
  },
120
121
  "scripts": {
121
- "build": "tsgo",
122
+ "build": "tsgo --project tsconfig.build.json",
122
123
  "bump": "ncu -u",
123
- "clean": "rm -rf pnpm-lock.yaml node_modules target",
124
+ "clean": "rm -rf pnpm-lock.yaml node_modules build",
124
125
  "docs:build": "node source/entrypoints/main.ts build",
125
126
  "docs:start": "node source/entrypoints/main.ts start",
126
127
  "format": "vp fmt",
127
128
  "lint": "vp fmt --check && vp lint",
128
129
  "release": "pnpm publish --access public --ignore-scripts --no-git-checks",
129
130
  "setversion": "pnpm version --no-git-tag-version",
131
+ "start": "pnpm build && livemark start",
130
132
  "unit": "vp test",
131
133
  "test": "pnpm lint && pnpm type && pnpm unit",
132
134
  "type": "tsgo --noEmit"
@@ -1,4 +1,11 @@
1
- import { access, mkdir, readFile, rm, writeFile } from "node:fs/promises"
1
+ import {
2
+ access,
3
+ mkdir,
4
+ readFile,
5
+ readdir,
6
+ rm,
7
+ writeFile,
8
+ } from "node:fs/promises"
2
9
  import { dirname, join, resolve } from "node:path"
3
10
  import slugify from "@sindresorhus/slugify"
4
11
  import type { Root, RootContent } from "mdast"
@@ -10,6 +17,7 @@ import { visit } from "unist-util-visit"
10
17
  import type { Config } from "../../models/config.ts"
11
18
  import type { ChangelogSection } from "../../models/section.ts"
12
19
  import { isGitHubUrl, parseGitHubRepo } from "../../helpers/changelog-source.ts"
20
+ import { targetDirFor } from "../target/build.ts"
13
21
 
14
22
  interface Release {
15
23
  tag_name: string
@@ -32,8 +40,7 @@ interface ChangelogEntry {
32
40
  sourceUrl?: string
33
41
  }
34
42
 
35
- const CACHE_DIR = ".livemark/cache/changelog"
36
- const META_FILE = ".livemark/cache/changelog.meta.json"
43
+ const CACHE_SUBDIR = "cache/changelog"
37
44
 
38
45
  const parser = unified().use(remarkParse)
39
46
  const stringifier = unified().use(remarkStringify, {
@@ -42,17 +49,25 @@ const stringifier = unified().use(remarkStringify, {
42
49
  emphasis: "_",
43
50
  })
44
51
 
45
- export function cacheIncludeGlob() {
46
- return `${CACHE_DIR}/**/*.md`
52
+ /** Glob (absolute path) covering all cached changelog markdown files for
53
+ * a given consumer. Used by content-collections to include them in the
54
+ * article scan. */
55
+ export function cacheIncludeGlob(config: Config) {
56
+ return join(targetDirFor(config.configPath), CACHE_SUBDIR, "**", "*.md")
47
57
  }
48
58
 
49
- /** Build the per-version changelog cache files for a changelog section */
59
+ /** Build the per-version changelog cache files. Livemark allows one
60
+ * changelog per project, so all cache state lives in a single
61
+ * `cache/changelog/`: the rendered `.md` entries plus a `meta.json`
62
+ * holding the etag for conditional GETs. On refresh we wipe only the
63
+ * `.md` files, leaving meta intact. */
50
64
  export async function buildChangelog(
51
65
  section: ChangelogSection,
52
66
  config: Config,
53
67
  ) {
54
- const cacheDir = join(config.root, CACHE_DIR)
55
- const metaPath = join(config.root, META_FILE)
68
+ const targetDir = targetDirFor(config.configPath)
69
+ const cacheDir = join(targetDir, CACHE_SUBDIR)
70
+ const metaPath = join(cacheDir, "meta.json")
56
71
 
57
72
  const entries = isGitHubUrl(section.source)
58
73
  ? await buildFromGitHub(section.source, metaPath, cacheDir)
@@ -60,8 +75,10 @@ export async function buildChangelog(
60
75
 
61
76
  if (entries === undefined) return
62
77
 
63
- await rm(cacheDir, { recursive: true, force: true })
64
78
  await mkdir(cacheDir, { recursive: true })
79
+ for (const f of await readdir(cacheDir).catch(() => [])) {
80
+ if (f.endsWith(".md")) await rm(join(cacheDir, f), { force: true })
81
+ }
65
82
 
66
83
  for (const entry of entries) {
67
84
  const markdown = wrapFrontmatter(entry, section)
@@ -1,3 +1,4 @@
1
+ import { existsSync } from "node:fs"
1
2
  import { dirname, resolve } from "node:path"
2
3
  import { pathToFileURL } from "node:url"
3
4
  import type { z } from "zod"
@@ -7,16 +8,30 @@ import { defineConfig } from "./define.ts"
7
8
 
8
9
  /**
9
10
  * Load and validate a config file, checking --config/-c CLI arg, then cwd.
11
+ *
12
+ * If a path is provided explicitly (arg or `--config`/`-c`) and the
13
+ * file is missing, throws — the user asked for a specific config and
14
+ * it isn't there. If no path is provided and no `livemark.config.ts`
15
+ * exists in cwd, falls back to the default config with a synthesized
16
+ * `configPath = <cwd>/livemark.config.ts` so downstream code (target
17
+ * hash, watcher) still has a stable per-project key.
10
18
  */
11
19
  export async function loadConfig(path?: string): Promise<Config> {
12
20
  const configIndex = process.argv.findIndex(
13
21
  a => a === "-c" || a === "--config",
14
22
  )
15
23
  const cliPath = configIndex !== -1 ? process.argv[configIndex + 1] : undefined
16
- const resolved = resolve(path ?? cliPath ?? "livemark.config.ts")
17
- // Cache-bust the ESM import so dev-server restart reloads edits on disk.
18
- const url = `${pathToFileURL(resolved).href}?t=${Date.now()}`
19
- const module: Record<string, unknown> = await import(url)
20
- const input = defineConfig(module.default as z.input<typeof UserConfig>)
21
- return { ...input, root: dirname(resolved), configPath: resolved }
24
+ const explicit = path ?? cliPath
25
+ const resolved = resolve(explicit ?? "livemark.config.ts")
26
+ let input: z.input<typeof UserConfig> = {}
27
+ if (existsSync(resolved)) {
28
+ // Cache-bust the ESM import so dev-server restart reloads edits on disk.
29
+ const url = `${pathToFileURL(resolved).href}?t=${Date.now()}`
30
+ const module: Record<string, unknown> = await import(url)
31
+ input = (module.default as z.input<typeof UserConfig>) ?? {}
32
+ } else if (explicit) {
33
+ throw new Error(`Config file not found: ${resolved}`)
34
+ }
35
+ const validated = defineConfig(input)
36
+ return { ...validated, root: dirname(resolved), configPath: resolved }
22
37
  }
@@ -5,10 +5,27 @@ import { describe, expect, it } from "vite-plus/test"
5
5
  import { loadConfig } from "./load.ts"
6
6
 
7
7
  describe("loadConfig", () => {
8
- it("should throw when no config file exists", async () => {
9
- await expect(loadConfig("/nonexistent/config.ts")).rejects.toThrow()
8
+ it("should throw when an explicit path points at a missing file", async () => {
9
+ await expect(loadConfig("/nonexistent/config.ts")).rejects.toThrow(
10
+ /not found/,
11
+ )
10
12
  })
11
13
 
14
+ it("should return defaults when no path is given and cwd has no config", () =>
15
+ temporaryDirectoryTask(async tmpDir => {
16
+ const cwd = process.cwd()
17
+ try {
18
+ process.chdir(tmpDir)
19
+ const config = await loadConfig()
20
+ expect(config.title).toBe("Livemark")
21
+ expect(config.include).toBe("**/*.md")
22
+ expect(config.root).toBe(tmpDir)
23
+ expect(config.configPath).toBe(join(tmpDir, "livemark.config.ts"))
24
+ } finally {
25
+ process.chdir(cwd)
26
+ }
27
+ }))
28
+
12
29
  it("should load config from explicit path", () =>
13
30
  temporaryDirectoryTask(async tmpDir => {
14
31
  const configPath = join(tmpDir, "livemark.config.ts")
@@ -0,0 +1,89 @@
1
+ import { createHash } from "node:crypto"
2
+ import { cpSync, existsSync, mkdirSync, readdirSync, rmSync } from "node:fs"
3
+ import { dirname, join } from "node:path"
4
+ import { ESCAPABLE_FILES, ESCAPABLE_FOLDERS } from "../../settings.ts"
5
+
6
+ // This file ships at <livemark-pkg>/source/actions/target/build.ts AND
7
+ // gets copied into <livemark-pkg>/targets/<hash>/actions/target/build.ts
8
+ // as part of every per-consumer mount. content-collections loads the
9
+ // COPIED version, so `import.meta.dirname` can land inside `targets/`.
10
+ // Walk up to the first directory holding livemark's `package.json` so
11
+ // SOURCE_DIR / TARGETS_ROOT always anchor at the package, never at a
12
+ // per-consumer dir.
13
+ const LIVEMARK_PKG = findLivemarkPkg(import.meta.dirname)
14
+ const SOURCE_DIR = join(LIVEMARK_PKG, "source")
15
+ const TARGETS_ROOT = join(LIVEMARK_PKG, "targets")
16
+
17
+ function findLivemarkPkg(start: string) {
18
+ let cur = start
19
+ while (cur !== dirname(cur)) {
20
+ if (existsSync(join(cur, "package.json"))) return cur
21
+ cur = dirname(cur)
22
+ }
23
+ throw new Error(`Could not locate livemark package root from ${start}`)
24
+ }
25
+
26
+ /**
27
+ * Synthesize a fully self-contained per-consumer Vite mount at
28
+ * `<livemark-pkg>/targets/<hash>/`.
29
+ *
30
+ * The mount is built by copying livemark's `source/` wholesale, then
31
+ * overlaying any matching files from the consumer's `.livemark/`. Every
32
+ * file lives at its target path as a real file — no symlinks — so
33
+ * Vite's relative-import and bare-specifier resolution all anchor
34
+ * inside the target dir, where node_modules walks reach livemark's pnpm
35
+ * subtree natively.
36
+ *
37
+ * Behavior:
38
+ * - First run (target dir missing): full source copy + overlay.
39
+ * - Subsequent runs: skip the source copy. Source is immutable in
40
+ * installed mode; in livemark's own dev the watcher keeps the target
41
+ * in sync. Only the `.livemark/` overlay is re-applied each time —
42
+ * cheap, and may have changed between runs.
43
+ * - With `--clear` in argv: wipe the entire target dir (including
44
+ * downstream caches like `.vite/`, `.content-collections/`,
45
+ * `cache/`, `routeTree.gen.ts`) and rebuild from scratch. Use this
46
+ * to recover from a stale or corrupted cache.
47
+ *
48
+ * Returns the absolute path to the target dir.
49
+ */
50
+ export function buildTarget(configPath: string) {
51
+ const targetDir = targetDirFor(configPath)
52
+ const overridesRoot = join(dirname(configPath), ".livemark")
53
+ const clear = process.argv.includes("--clear")
54
+
55
+ if (clear) rmSync(targetDir, { recursive: true, force: true })
56
+
57
+ if (!existsSync(targetDir)) {
58
+ mkdirSync(targetDir, { recursive: true })
59
+ cpSync(SOURCE_DIR, targetDir, { recursive: true })
60
+ }
61
+
62
+ for (const folder of ESCAPABLE_FOLDERS) {
63
+ const overlay = join(overridesRoot, folder)
64
+ if (!existsSync(overlay)) continue
65
+ const dest = join(targetDir, folder)
66
+ if (!existsSync(dest)) mkdirSync(dest, { recursive: true })
67
+ for (const f of readdirSync(overlay)) {
68
+ cpSync(join(overlay, f), join(dest, f), { recursive: true, force: true })
69
+ }
70
+ }
71
+ for (const file of ESCAPABLE_FILES) {
72
+ const overlay = join(overridesRoot, file)
73
+ if (!existsSync(overlay)) continue
74
+ cpSync(overlay, join(targetDir, file), { force: true })
75
+ }
76
+
77
+ return targetDir
78
+ }
79
+
80
+ /** Compute the target dir for a given consumer config path without
81
+ * rebuilding it. Used by code that needs to write into the target
82
+ * (e.g. cache writers) outside of `buildTarget`'s setup phase. */
83
+ export function targetDirFor(configPath: string) {
84
+ const hash = createHash("sha256")
85
+ .update(configPath)
86
+ .digest("hex")
87
+ .slice(0, 16)
88
+ return join(TARGETS_ROOT, hash)
89
+ }
@@ -15,6 +15,7 @@ const configFile = join(
15
15
  */
16
16
  export const build = new Command("build")
17
17
  .description("Build the site for production")
18
+ .option("--clear", "Wipe and fully rebuild the runtime target dir")
18
19
  .action(async () => {
19
20
  const builder = await createBuilder({ configFile })
20
21
  await builder.buildApp()
@@ -9,37 +9,41 @@ import {
9
9
  import { dirname, join } from "node:path"
10
10
  import { Command } from "commander"
11
11
  import pc from "picocolors"
12
- import { OVERRIDE_SUBDIRS } from "../settings.ts"
12
+ import { ESCAPABLE_FILES, ESCAPABLE_FOLDERS } from "../settings.ts"
13
13
 
14
14
  const defaultsRoot = join(import.meta.dirname, "..", "..", "source")
15
15
 
16
16
  /**
17
- * List or copy overridable livemark files into `.livemark/`.
17
+ * List or copy escapable livemark files into `.livemark/`.
18
18
  *
19
19
  * Without an argument, prints every file you can shadow. With a path, copies
20
20
  * the default from the livemark package into `.livemark/<path>`; fails if the
21
21
  * destination already exists.
22
22
  */
23
23
  export const escape = new Command("escape")
24
- .description("List or copy overridable livemark files into .livemark/")
24
+ .description("List or copy escapable livemark files into .livemark/")
25
25
  .argument(
26
26
  "[path]",
27
- "path relative to .livemark/ (e.g. components/Footer.tsx)",
27
+ "path relative to .livemark/ (e.g. components/Footer.tsx, client.tsx)",
28
28
  )
29
29
  .action((relPath?: string) => {
30
30
  if (!relPath) {
31
- for (const file of listOverridable()) console.log(file)
31
+ for (const file of listEscapable()) console.log(file)
32
32
  console.log(
33
33
  pc.dim("\nRun 'livemark escape <path>' to copy a file into .livemark/"),
34
34
  )
35
35
  return
36
36
  }
37
37
 
38
+ const isTopLevelFile =
39
+ !relPath.includes("/") && ESCAPABLE_FILES.includes(relPath)
38
40
  const [first] = relPath.split("/")
39
- if (!first || !OVERRIDE_SUBDIRS.includes(first) || relPath.includes("..")) {
41
+ const isFolderPath =
42
+ !!first && ESCAPABLE_FOLDERS.includes(first) && !relPath.includes("..")
43
+ if (!isTopLevelFile && !isFolderPath) {
40
44
  console.error(
41
45
  pc.red(
42
- `Error: '${relPath}' is not under an overridable subdir (${OVERRIDE_SUBDIRS.join(", ")})`,
46
+ `Error: '${relPath}' is not escapable (folders: ${ESCAPABLE_FOLDERS.join(", ")}; files: ${ESCAPABLE_FILES.join(", ")})`,
43
47
  ),
44
48
  )
45
49
  process.exit(1)
@@ -64,14 +68,17 @@ export const escape = new Command("escape")
64
68
  )
65
69
  })
66
70
 
67
- function listOverridable() {
71
+ function listEscapable() {
68
72
  const files: string[] = []
69
- for (const subdir of OVERRIDE_SUBDIRS) {
70
- const dir = join(defaultsRoot, subdir)
73
+ for (const folder of ESCAPABLE_FOLDERS) {
74
+ const dir = join(defaultsRoot, folder)
71
75
  if (!existsSync(dir)) continue
72
76
  for (const entry of readdirSync(dir)) {
73
- if (statSync(join(dir, entry)).isFile()) files.push(`${subdir}/${entry}`)
77
+ if (statSync(join(dir, entry)).isFile()) files.push(`${folder}/${entry}`)
74
78
  }
75
79
  }
80
+ for (const file of ESCAPABLE_FILES) {
81
+ if (existsSync(join(defaultsRoot, file))) files.push(file)
82
+ }
76
83
  return files.sort()
77
84
  }
@@ -15,6 +15,7 @@ const configFile = join(
15
15
  */
16
16
  export const preview = new Command("preview")
17
17
  .description("Preview the production build locally")
18
+ .option("--clear", "Wipe and fully rebuild the runtime target dir")
18
19
  .action(async () => {
19
20
  const server = await vitePreview({
20
21
  configFile,
@@ -15,6 +15,7 @@ const configFile = join(
15
15
  */
16
16
  export const start = new Command("start")
17
17
  .description("Start a live server")
18
+ .option("--clear", "Wipe and fully rebuild the runtime target dir")
18
19
  .action(async () => {
19
20
  const server = await createServer({
20
21
  configFile,
@@ -1,3 +1,4 @@
1
+ import { config } from "livemark:virtual"
1
2
  import { Link, useLocation, useMatches } from "@tanstack/react-router"
2
3
  import { currentSection } from "../content/article.ts"
3
4
 
@@ -11,7 +12,7 @@ export function Breadcrumbs() {
11
12
  return (
12
13
  <nav className="flex items-center gap-1.5 text-sm text-muted-foreground">
13
14
  <Link to="/" className="hover:text-foreground transition-colors">
14
- {section?.title ?? import.meta.env.CONFIG.title}
15
+ {section?.title ?? config.title}
15
16
  </Link>
16
17
  <span>/</span>
17
18
  {loaderData?.title && (
@@ -1,3 +1,4 @@
1
+ import { config } from "livemark:virtual"
1
2
  import { Link, useLocation, useMatch } from "@tanstack/react-router"
2
3
  import { useHotkey } from "@tanstack/react-hotkeys"
3
4
  import { ExternalLink } from "lucide-react"
@@ -41,7 +42,7 @@ export function Layout(props: {
41
42
  window.scrollBy({ top: -window.innerHeight * 0.8, behavior: "smooth" }),
42
43
  )
43
44
 
44
- const sections = import.meta.env.CONFIG.sections
45
+ const sections = config.sections
45
46
 
46
47
  const header = (
47
48
  <header className="sticky top-0 z-20 flex h-16 shrink-0 items-center border-b bg-background">
@@ -112,7 +113,7 @@ export function Layout(props: {
112
113
  Docs
113
114
  </Link>
114
115
  )}
115
- {import.meta.env.CONFIG.links
116
+ {config.links
116
117
  ?.filter(
117
118
  link =>
118
119
  link.position === "header" &&
@@ -1,3 +1,4 @@
1
+ import { config } from "livemark:virtual"
1
2
  import { Link, useLocation } from "@tanstack/react-router"
2
3
  import { ChevronRight } from "lucide-react"
3
4
  import {
@@ -28,7 +29,7 @@ import type { ArticleNode } from "../models/article.ts"
28
29
  export function SidebarArticles() {
29
30
  const pathname = useLocation({ select: l => l.pathname })
30
31
 
31
- const configSections = import.meta.env.CONFIG.sections
32
+ const configSections = config.sections
32
33
  const section = currentSection(`/${pathname.replace(/^\/|\/$/g, "")}/`)
33
34
  const groups = configSections?.length
34
35
  ? (sectionArticleGroups.get(section?.prefix ?? "__default__") ??
@@ -1,3 +1,4 @@
1
+ import { config } from "livemark:virtual"
1
2
  import { useLocation } from "@tanstack/react-router"
2
3
  import { ExternalLink } from "lucide-react"
3
4
  import { currentSection } from "../content/article.ts"
@@ -18,7 +19,7 @@ export function SidebarLinks() {
18
19
  const pathname = useLocation({ select: l => l.pathname })
19
20
  const section = currentSection(`/${pathname.replace(/^\/|\/$/g, "")}/`)
20
21
  const links =
21
- import.meta.env.CONFIG.links?.filter(
22
+ config.links?.filter(
22
23
  link => !link.prefix || link.prefix === section?.prefix,
23
24
  ) ?? []
24
25
 
@@ -1,3 +1,4 @@
1
+ import { config } from "livemark:virtual"
1
2
  import { Link, useLocation, useMatch } from "@tanstack/react-router"
2
3
  import { currentSection, sectionFirstArticle } from "../content/article.ts"
3
4
  import { DynamicIcon } from "../helpers/dynamic-icon.tsx"
@@ -24,7 +25,7 @@ export function SidebarSections() {
24
25
  const section = articleRoute
25
26
  ? currentSection(`/${pathname.replace(/^\/|\/$/g, "")}/`)
26
27
  : undefined
27
- const sections = import.meta.env.CONFIG.sections ?? []
28
+ const sections = config.sections ?? []
28
29
 
29
30
  if (!sections.length) return null
30
31
  const hasDesktopItems = sections.some(s => s.position === "sidebar")