blodemd 0.1.0 → 0.2.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 (289) hide show
  1. package/dist/cli.mjs +50 -174
  2. package/dist/cli.mjs.map +1 -1
  3. package/package.json +3 -36
  4. package/dev-server/app/[[...slug]]/page.tsx +0 -140
  5. package/dev-server/app/blodemd-dev/invalidate/route.ts +0 -12
  6. package/dev-server/app/blodemd-dev/static/[...path]/route.ts +0 -32
  7. package/dev-server/app/blodemd-dev/version/route.ts +0 -14
  8. package/dev-server/app/blodemd-internal/proxy/route.ts +0 -86
  9. package/dev-server/app/error.tsx +0 -24
  10. package/dev-server/app/favicon.ico +0 -0
  11. package/dev-server/app/globals.css +0 -4
  12. package/dev-server/app/layout.tsx +0 -38
  13. package/dev-server/app/not-found.tsx +0 -18
  14. package/dev-server/app/search/route.ts +0 -17
  15. package/dev-server/components/dev-reload-script.tsx +0 -86
  16. package/dev-server/components/providers.tsx +0 -15
  17. package/dev-server/lib/dev-state.ts +0 -8
  18. package/dev-server/lib/local-content-source.ts +0 -103
  19. package/dev-server/lib/local-runtime.tsx +0 -555
  20. package/dev-server/next-env.d.ts +0 -5
  21. package/dev-server/next.config.js +0 -54
  22. package/dev-server/package.json +0 -61
  23. package/dev-server/postcss.config.mjs +0 -7
  24. package/dev-server/public/glide-variable.woff2 +0 -0
  25. package/dev-server/tsconfig.json +0 -50
  26. package/docs/app/globals.css +0 -471
  27. package/docs/components/animate-ui/primitives/buttons/button.tsx +0 -14
  28. package/docs/components/api/api-playground.tsx +0 -467
  29. package/docs/components/api/api-reference.tsx +0 -157
  30. package/docs/components/content/collection-index.tsx +0 -114
  31. package/docs/components/docs/contextual-menu.tsx +0 -495
  32. package/docs/components/docs/copy-page-menu.tsx +0 -364
  33. package/docs/components/docs/doc-header.tsx +0 -223
  34. package/docs/components/docs/doc-shell.tsx +0 -355
  35. package/docs/components/docs/doc-sidebar.tsx +0 -256
  36. package/docs/components/docs/doc-toc.tsx +0 -46
  37. package/docs/components/docs/mobile-nav.tsx +0 -195
  38. package/docs/components/docs/sidebar-active-highlight.tsx +0 -34
  39. package/docs/components/docs/sidebar-scroll-area.tsx +0 -63
  40. package/docs/components/git/repo-picker.tsx +0 -529
  41. package/docs/components/icons/doc-icon.tsx +0 -96
  42. package/docs/components/mdx/accordion.tsx +0 -83
  43. package/docs/components/mdx/agent-instructions.tsx +0 -17
  44. package/docs/components/mdx/badge.tsx +0 -79
  45. package/docs/components/mdx/callout.tsx +0 -88
  46. package/docs/components/mdx/card.tsx +0 -110
  47. package/docs/components/mdx/code-block.tsx +0 -80
  48. package/docs/components/mdx/code-group.tsx +0 -203
  49. package/docs/components/mdx/color.tsx +0 -87
  50. package/docs/components/mdx/columns.tsx +0 -25
  51. package/docs/components/mdx/expandable.tsx +0 -45
  52. package/docs/components/mdx/field-layout.tsx +0 -77
  53. package/docs/components/mdx/frame.tsx +0 -23
  54. package/docs/components/mdx/get-text-content.ts +0 -18
  55. package/docs/components/mdx/icon.tsx +0 -12
  56. package/docs/components/mdx/iframe.tsx +0 -62
  57. package/docs/components/mdx/index.tsx +0 -121
  58. package/docs/components/mdx/installer.tsx +0 -20
  59. package/docs/components/mdx/panel.tsx +0 -11
  60. package/docs/components/mdx/param-field.tsx +0 -56
  61. package/docs/components/mdx/preview.tsx +0 -36
  62. package/docs/components/mdx/prompt.tsx +0 -63
  63. package/docs/components/mdx/request-example.tsx +0 -27
  64. package/docs/components/mdx/response-field.tsx +0 -42
  65. package/docs/components/mdx/steps.tsx +0 -92
  66. package/docs/components/mdx/tabs.tsx +0 -193
  67. package/docs/components/mdx/tile.tsx +0 -43
  68. package/docs/components/mdx/tooltip.tsx +0 -71
  69. package/docs/components/mdx/tree.tsx +0 -120
  70. package/docs/components/mdx/type-table.tsx +0 -71
  71. package/docs/components/mdx/update.tsx +0 -44
  72. package/docs/components/mdx/video.tsx +0 -45
  73. package/docs/components/mdx/view.tsx +0 -66
  74. package/docs/components/posthog-provider.tsx +0 -42
  75. package/docs/components/providers.tsx +0 -15
  76. package/docs/components/tenant-analytics.tsx +0 -49
  77. package/docs/components/third-parties.tsx +0 -32
  78. package/docs/components/ui/badge.tsx +0 -61
  79. package/docs/components/ui/breadcrumb.tsx +0 -112
  80. package/docs/components/ui/button-group.tsx +0 -83
  81. package/docs/components/ui/button.tsx +0 -65
  82. package/docs/components/ui/card.tsx +0 -92
  83. package/docs/components/ui/command.tsx +0 -167
  84. package/docs/components/ui/copy-button.tsx +0 -129
  85. package/docs/components/ui/dialog.tsx +0 -146
  86. package/docs/components/ui/field.tsx +0 -237
  87. package/docs/components/ui/input.tsx +0 -23
  88. package/docs/components/ui/kbd.tsx +0 -98
  89. package/docs/components/ui/label.tsx +0 -22
  90. package/docs/components/ui/morph-icon.tsx +0 -79
  91. package/docs/components/ui/popover.tsx +0 -267
  92. package/docs/components/ui/search-dialog.tsx +0 -431
  93. package/docs/components/ui/search.tsx +0 -101
  94. package/docs/components/ui/separator.tsx +0 -26
  95. package/docs/components/ui/sheet.tsx +0 -133
  96. package/docs/components/ui/sidebar.tsx +0 -758
  97. package/docs/components/ui/skeleton.tsx +0 -11
  98. package/docs/components/ui/switch.tsx +0 -32
  99. package/docs/components/ui/tabs.tsx +0 -138
  100. package/docs/components/ui/theme-toggle.tsx +0 -62
  101. package/docs/components/ui/tooltip.tsx +0 -53
  102. package/docs/components/web-mcp.tsx +0 -115
  103. package/docs/lib/agent-skills.ts +0 -48
  104. package/docs/lib/api-client.ts +0 -72
  105. package/docs/lib/config.ts +0 -6
  106. package/docs/lib/content-root.ts +0 -33
  107. package/docs/lib/content-source.ts +0 -70
  108. package/docs/lib/contextual-options.ts +0 -222
  109. package/docs/lib/dashboard-session.ts +0 -167
  110. package/docs/lib/db.ts +0 -13
  111. package/docs/lib/docs-collection.ts +0 -7
  112. package/docs/lib/docs-runtime.tsx +0 -745
  113. package/docs/lib/edge-config.ts +0 -95
  114. package/docs/lib/env.ts +0 -23
  115. package/docs/lib/etag.ts +0 -22
  116. package/docs/lib/github-install.ts +0 -33
  117. package/docs/lib/llms-full.ts +0 -82
  118. package/docs/lib/marketing-markdown.ts +0 -79
  119. package/docs/lib/marketing-site.ts +0 -31
  120. package/docs/lib/mdx.ts +0 -98
  121. package/docs/lib/navigation.ts +0 -288
  122. package/docs/lib/openapi-proxy.ts +0 -88
  123. package/docs/lib/openapi.ts +0 -158
  124. package/docs/lib/platform-config.ts +0 -6
  125. package/docs/lib/project-authz.ts +0 -46
  126. package/docs/lib/routes.ts +0 -103
  127. package/docs/lib/server-cache.ts +0 -83
  128. package/docs/lib/shiki.ts +0 -44
  129. package/docs/lib/supabase.ts +0 -37
  130. package/docs/lib/tenancy.ts +0 -364
  131. package/docs/lib/tenant-headers.ts +0 -43
  132. package/docs/lib/tenant-static.ts +0 -705
  133. package/docs/lib/tenant-utility-context.ts +0 -62
  134. package/docs/lib/tenants.ts +0 -72
  135. package/docs/lib/theme.ts +0 -29
  136. package/docs/lib/time-ago.ts +0 -24
  137. package/docs/lib/toc.ts +0 -2
  138. package/docs/lib/use-mobile.ts +0 -19
  139. package/docs/lib/use-tab-observer.ts +0 -71
  140. package/docs/lib/utils.ts +0 -5
  141. package/packages/@repo/common/dist/index.d.ts +0 -16
  142. package/packages/@repo/common/dist/index.d.ts.map +0 -1
  143. package/packages/@repo/common/dist/index.js +0 -84
  144. package/packages/@repo/common/package.json +0 -34
  145. package/packages/@repo/common/src/index.ts +0 -101
  146. package/packages/@repo/contracts/dist/analytics.d.ts +0 -21
  147. package/packages/@repo/contracts/dist/analytics.d.ts.map +0 -1
  148. package/packages/@repo/contracts/dist/analytics.js +0 -18
  149. package/packages/@repo/contracts/dist/api-key.d.ts +0 -27
  150. package/packages/@repo/contracts/dist/api-key.d.ts.map +0 -1
  151. package/packages/@repo/contracts/dist/api-key.js +0 -20
  152. package/packages/@repo/contracts/dist/dates.d.ts +0 -4
  153. package/packages/@repo/contracts/dist/dates.d.ts.map +0 -1
  154. package/packages/@repo/contracts/dist/dates.js +0 -2
  155. package/packages/@repo/contracts/dist/deployment.d.ts +0 -71
  156. package/packages/@repo/contracts/dist/deployment.d.ts.map +0 -1
  157. package/packages/@repo/contracts/dist/deployment.js +0 -46
  158. package/packages/@repo/contracts/dist/domain.d.ts +0 -94
  159. package/packages/@repo/contracts/dist/domain.d.ts.map +0 -1
  160. package/packages/@repo/contracts/dist/domain.js +0 -36
  161. package/packages/@repo/contracts/dist/git.d.ts +0 -28
  162. package/packages/@repo/contracts/dist/git.d.ts.map +0 -1
  163. package/packages/@repo/contracts/dist/git.js +0 -24
  164. package/packages/@repo/contracts/dist/ids.d.ts +0 -14
  165. package/packages/@repo/contracts/dist/ids.d.ts.map +0 -1
  166. package/packages/@repo/contracts/dist/ids.js +0 -11
  167. package/packages/@repo/contracts/dist/index.d.ts +0 -12
  168. package/packages/@repo/contracts/dist/index.d.ts.map +0 -1
  169. package/packages/@repo/contracts/dist/index.js +0 -13
  170. package/packages/@repo/contracts/dist/pagination.d.ts +0 -23
  171. package/packages/@repo/contracts/dist/pagination.d.ts.map +0 -1
  172. package/packages/@repo/contracts/dist/pagination.js +0 -15
  173. package/packages/@repo/contracts/dist/project.d.ts +0 -42
  174. package/packages/@repo/contracts/dist/project.d.ts.map +0 -1
  175. package/packages/@repo/contracts/dist/project.js +0 -25
  176. package/packages/@repo/contracts/dist/tenant.d.ts +0 -147
  177. package/packages/@repo/contracts/dist/tenant.d.ts.map +0 -1
  178. package/packages/@repo/contracts/dist/tenant.js +0 -58
  179. package/packages/@repo/contracts/dist/user.d.ts +0 -9
  180. package/packages/@repo/contracts/dist/user.d.ts.map +0 -1
  181. package/packages/@repo/contracts/dist/user.js +0 -9
  182. package/packages/@repo/contracts/package.json +0 -37
  183. package/packages/@repo/contracts/src/analytics.ts +0 -33
  184. package/packages/@repo/contracts/src/api-key.ts +0 -27
  185. package/packages/@repo/contracts/src/dates.ts +0 -4
  186. package/packages/@repo/contracts/src/deployment.ts +0 -73
  187. package/packages/@repo/contracts/src/domain.ts +0 -51
  188. package/packages/@repo/contracts/src/git.ts +0 -31
  189. package/packages/@repo/contracts/src/ids.ts +0 -23
  190. package/packages/@repo/contracts/src/index.ts +0 -13
  191. package/packages/@repo/contracts/src/pagination.ts +0 -21
  192. package/packages/@repo/contracts/src/project.ts +0 -32
  193. package/packages/@repo/contracts/src/tenant.ts +0 -94
  194. package/packages/@repo/contracts/src/user.ts +0 -12
  195. package/packages/@repo/models/dist/docs-config.d.ts +0 -961
  196. package/packages/@repo/models/dist/docs-config.d.ts.map +0 -1
  197. package/packages/@repo/models/dist/docs-config.js +0 -531
  198. package/packages/@repo/models/dist/index.d.ts +0 -3
  199. package/packages/@repo/models/dist/index.d.ts.map +0 -1
  200. package/packages/@repo/models/dist/index.js +0 -3
  201. package/packages/@repo/models/dist/tenant.d.ts +0 -37
  202. package/packages/@repo/models/dist/tenant.d.ts.map +0 -1
  203. package/packages/@repo/models/dist/tenant.js +0 -1
  204. package/packages/@repo/models/package.json +0 -37
  205. package/packages/@repo/models/src/docs-config.ts +0 -629
  206. package/packages/@repo/models/src/index.ts +0 -3
  207. package/packages/@repo/models/src/tenant.ts +0 -44
  208. package/packages/@repo/prebuild/dist/index.d.ts +0 -2
  209. package/packages/@repo/prebuild/dist/index.d.ts.map +0 -1
  210. package/packages/@repo/prebuild/dist/index.js +0 -2
  211. package/packages/@repo/prebuild/dist/openapi.d.ts +0 -43
  212. package/packages/@repo/prebuild/dist/openapi.d.ts.map +0 -1
  213. package/packages/@repo/prebuild/dist/openapi.js +0 -86
  214. package/packages/@repo/prebuild/package.json +0 -39
  215. package/packages/@repo/prebuild/src/index.ts +0 -2
  216. package/packages/@repo/prebuild/src/openapi.ts +0 -154
  217. package/packages/@repo/previewing/dist/blob-source.d.ts +0 -16
  218. package/packages/@repo/previewing/dist/blob-source.d.ts.map +0 -1
  219. package/packages/@repo/previewing/dist/blob-source.js +0 -128
  220. package/packages/@repo/previewing/dist/config-loader.d.ts +0 -134
  221. package/packages/@repo/previewing/dist/config-loader.d.ts.map +0 -1
  222. package/packages/@repo/previewing/dist/config-loader.js +0 -231
  223. package/packages/@repo/previewing/dist/constants.d.ts +0 -15
  224. package/packages/@repo/previewing/dist/constants.d.ts.map +0 -1
  225. package/packages/@repo/previewing/dist/constants.js +0 -14
  226. package/packages/@repo/previewing/dist/content-index.d.ts +0 -7
  227. package/packages/@repo/previewing/dist/content-index.d.ts.map +0 -1
  228. package/packages/@repo/previewing/dist/content-index.js +0 -291
  229. package/packages/@repo/previewing/dist/content-source.d.ts +0 -12
  230. package/packages/@repo/previewing/dist/content-source.d.ts.map +0 -1
  231. package/packages/@repo/previewing/dist/content-source.js +0 -1
  232. package/packages/@repo/previewing/dist/fs-source.d.ts +0 -11
  233. package/packages/@repo/previewing/dist/fs-source.d.ts.map +0 -1
  234. package/packages/@repo/previewing/dist/fs-source.js +0 -71
  235. package/packages/@repo/previewing/dist/index.d.ts +0 -16
  236. package/packages/@repo/previewing/dist/index.d.ts.map +0 -1
  237. package/packages/@repo/previewing/dist/index.js +0 -13
  238. package/packages/@repo/previewing/dist/markdown/agent-markdown.d.ts +0 -3
  239. package/packages/@repo/previewing/dist/markdown/agent-markdown.d.ts.map +0 -1
  240. package/packages/@repo/previewing/dist/markdown/agent-markdown.js +0 -176
  241. package/packages/@repo/previewing/dist/markdown/format.d.ts +0 -8
  242. package/packages/@repo/previewing/dist/markdown/format.d.ts.map +0 -1
  243. package/packages/@repo/previewing/dist/markdown/format.js +0 -43
  244. package/packages/@repo/previewing/dist/markdown/links.d.ts +0 -3
  245. package/packages/@repo/previewing/dist/markdown/links.d.ts.map +0 -1
  246. package/packages/@repo/previewing/dist/markdown/links.js +0 -31
  247. package/packages/@repo/previewing/dist/openapi-pages.d.ts +0 -7
  248. package/packages/@repo/previewing/dist/openapi-pages.d.ts.map +0 -1
  249. package/packages/@repo/previewing/dist/openapi-pages.js +0 -200
  250. package/packages/@repo/previewing/dist/search-index.d.ts +0 -4
  251. package/packages/@repo/previewing/dist/search-index.d.ts.map +0 -1
  252. package/packages/@repo/previewing/dist/search-index.js +0 -23
  253. package/packages/@repo/previewing/dist/serialization.d.ts +0 -13
  254. package/packages/@repo/previewing/dist/serialization.d.ts.map +0 -1
  255. package/packages/@repo/previewing/dist/serialization.js +0 -108
  256. package/packages/@repo/previewing/dist/toc-index.d.ts +0 -5
  257. package/packages/@repo/previewing/dist/toc-index.d.ts.map +0 -1
  258. package/packages/@repo/previewing/dist/toc-index.js +0 -53
  259. package/packages/@repo/previewing/dist/types.d.ts +0 -92
  260. package/packages/@repo/previewing/dist/types.d.ts.map +0 -1
  261. package/packages/@repo/previewing/dist/types.js +0 -1
  262. package/packages/@repo/previewing/dist/utility-index.d.ts +0 -7
  263. package/packages/@repo/previewing/dist/utility-index.d.ts.map +0 -1
  264. package/packages/@repo/previewing/dist/utility-index.js +0 -201
  265. package/packages/@repo/previewing/package.json +0 -41
  266. package/packages/@repo/previewing/src/blob-source.ts +0 -185
  267. package/packages/@repo/previewing/src/config-loader.ts +0 -316
  268. package/packages/@repo/previewing/src/constants.ts +0 -16
  269. package/packages/@repo/previewing/src/content-index.ts +0 -384
  270. package/packages/@repo/previewing/src/content-source.ts +0 -12
  271. package/packages/@repo/previewing/src/fs-source.ts +0 -103
  272. package/packages/@repo/previewing/src/index.ts +0 -71
  273. package/packages/@repo/previewing/src/markdown/agent-markdown.ts +0 -254
  274. package/packages/@repo/previewing/src/markdown/format.ts +0 -63
  275. package/packages/@repo/previewing/src/markdown/links.ts +0 -46
  276. package/packages/@repo/previewing/src/openapi-pages.ts +0 -319
  277. package/packages/@repo/previewing/src/search-index.ts +0 -38
  278. package/packages/@repo/previewing/src/serialization.ts +0 -191
  279. package/packages/@repo/previewing/src/toc-index.ts +0 -72
  280. package/packages/@repo/previewing/src/types.ts +0 -105
  281. package/packages/@repo/previewing/src/utility-index.ts +0 -304
  282. package/packages/@repo/validation/dist/index.d.ts +0 -12
  283. package/packages/@repo/validation/dist/index.d.ts.map +0 -1
  284. package/packages/@repo/validation/dist/index.js +0 -30
  285. package/packages/@repo/validation/package.json +0 -38
  286. package/packages/@repo/validation/src/blodemd-docs-schema.json +0 -3575
  287. package/packages/@repo/validation/src/index.ts +0 -59
  288. package/scripts/prepare-package.mjs +0 -53
  289. package/scripts/repo-packages.mjs +0 -8
@@ -1,11 +0,0 @@
1
- import { cn } from "@/lib/utils";
2
-
3
- const Skeleton = ({ className, ...props }: React.ComponentProps<"div">) => (
4
- <div
5
- data-slot="skeleton"
6
- className={cn("animate-pulse rounded-md bg-accent", className)}
7
- {...props}
8
- />
9
- );
10
-
11
- export { Skeleton };
@@ -1,32 +0,0 @@
1
- "use client";
2
-
3
- import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
4
- import * as React from "react";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- const Switch = React.forwardRef<
9
- React.ElementRef<typeof SwitchPrimitive.Root>,
10
- React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>
11
- >(({ className, ...props }, ref) => (
12
- <SwitchPrimitive.Root
13
- className={cn(
14
- "peer inline-flex h-[24px] w-[42px] shrink-0 cursor-pointer items-center rounded-full transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-disabled:cursor-not-allowed data-checked:bg-primary data-unchecked:bg-input data-disabled:opacity-50 data-unchecked:hover:bg-input-hover",
15
- className
16
- )}
17
- data-slot="switch"
18
- ref={ref}
19
- {...props}
20
- >
21
- <SwitchPrimitive.Thumb
22
- className={cn(
23
- "pointer-events-none block size-[18px] rounded-full bg-card shadow-lg ring-0 transition-transform data-checked:translate-x-[21px] data-unchecked:translate-x-[3px] dark:bg-card-foreground"
24
- )}
25
- data-slot="switch-thumb"
26
- />
27
- </SwitchPrimitive.Root>
28
- ));
29
-
30
- Switch.displayName = SwitchPrimitive.Root.displayName;
31
-
32
- export { Switch };
@@ -1,138 +0,0 @@
1
- "use client";
2
-
3
- import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
4
- import { cva } from "class-variance-authority";
5
- import type { VariantProps } from "class-variance-authority";
6
- import mergeRefs from "merge-refs";
7
- import * as React from "react";
8
-
9
- import { useTabObserver } from "@/hooks/use-tab-observer";
10
- import { cn } from "@/lib/utils";
11
-
12
- const Tabs = ({
13
- className,
14
- orientation = "horizontal",
15
- ...props
16
- }: React.ComponentProps<typeof TabsPrimitive.Root>) => (
17
- <TabsPrimitive.Root
18
- className={cn("group/tabs flex gap-2 data-horizontal:flex-col", className)}
19
- data-orientation={orientation}
20
- data-slot="tabs"
21
- orientation={orientation}
22
- {...props}
23
- />
24
- );
25
-
26
- const tabsListVariants = cva(
27
- "group/tabs-list relative isolate inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground data-[variant=line]:rounded-none group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col",
28
- {
29
- defaultVariants: {
30
- variant: "default",
31
- },
32
- variants: {
33
- variant: {
34
- default: "bg-muted",
35
- line: "gap-1 bg-transparent",
36
- },
37
- },
38
- }
39
- );
40
-
41
- const TabsList = ({
42
- className,
43
- variant = "default",
44
- ref,
45
- ...props
46
- }: React.ComponentProps<typeof TabsPrimitive.List> &
47
- VariantProps<typeof tabsListVariants>) => {
48
- const [indicatorStyle, setIndicatorStyle] = React.useState({
49
- height: 0,
50
- left: 0,
51
- top: 0,
52
- width: 0,
53
- });
54
- const [hasIndicatorPosition, setHasIndicatorPosition] = React.useState(false);
55
- const [canAnimateIndicator, setCanAnimateIndicator] = React.useState(false);
56
- const hasInitializedIndicator = React.useRef(false);
57
- const { listRef } = useTabObserver({
58
- onActiveTabChange: (_, activeTab) => {
59
- setIndicatorStyle({
60
- height: activeTab.offsetHeight,
61
- left: activeTab.offsetLeft,
62
- top: activeTab.offsetTop,
63
- width: activeTab.offsetWidth,
64
- });
65
-
66
- if (!hasInitializedIndicator.current) {
67
- hasInitializedIndicator.current = true;
68
- setHasIndicatorPosition(true);
69
- requestAnimationFrame(() => {
70
- setCanAnimateIndicator(true);
71
- });
72
- return;
73
- }
74
-
75
- setHasIndicatorPosition(true);
76
- },
77
- });
78
-
79
- return (
80
- <TabsPrimitive.List
81
- className={cn(tabsListVariants({ variant }), className)}
82
- data-slot="tabs-list"
83
- data-variant={variant}
84
- ref={mergeRefs(ref, listRef)}
85
- {...props}
86
- >
87
- {variant === "default" ? (
88
- <span
89
- aria-hidden="true"
90
- className={cn(
91
- "pointer-events-none absolute top-0 left-0 z-0 rounded-md bg-background shadow-sm",
92
- canAnimateIndicator
93
- ? "transition-[width,height,transform,opacity] duration-300"
94
- : "transition-none",
95
- hasIndicatorPosition ? "opacity-100" : "opacity-0"
96
- )}
97
- style={{
98
- height: `${indicatorStyle.height}px`,
99
- transform: `translate(${indicatorStyle.left}px, ${indicatorStyle.top}px)`,
100
- transitionTimingFunction: "cubic-bezier(0.65, 0, 0.35, 1)",
101
- width: `${indicatorStyle.width}px`,
102
- }}
103
- />
104
- ) : null}
105
- {props.children}
106
- </TabsPrimitive.List>
107
- );
108
- };
109
-
110
- const TabsTrigger = ({
111
- className,
112
- ...props
113
- }: React.ComponentProps<typeof TabsPrimitive.Tab>) => (
114
- <TabsPrimitive.Tab
115
- className={cn(
116
- "relative z-10 inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-1.5 py-0.5 font-medium text-foreground/60 text-sm transition-all hover:text-foreground focus-visible:border-ring focus-visible:outline-1 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-[variant=line]/tabs-list:data-active:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
117
- "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
118
- "data-active:text-foreground group-data-[variant=default]/tabs-list:data-active:bg-transparent dark:data-active:text-foreground group-data-[variant=default]/tabs-list:dark:data-active:border-transparent group-data-[variant=default]/tabs-list:dark:data-active:bg-transparent",
119
- "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
120
- className
121
- )}
122
- data-slot="tabs-trigger"
123
- {...props}
124
- />
125
- );
126
-
127
- const TabsContent = ({
128
- className,
129
- ...props
130
- }: React.ComponentProps<typeof TabsPrimitive.Panel>) => (
131
- <TabsPrimitive.Panel
132
- className={cn("flex-1 text-sm outline-none", className)}
133
- data-slot="tabs-content"
134
- {...props}
135
- />
136
- );
137
-
138
- export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -1,62 +0,0 @@
1
- "use client";
2
-
3
- import { useTheme } from "next-themes";
4
- import { useCallback, useEffect } from "react";
5
-
6
- export const ThemeToggle = () => {
7
- const { resolvedTheme, setTheme } = useTheme();
8
-
9
- const toggle = useCallback(() => {
10
- setTheme(resolvedTheme === "dark" ? "light" : "dark");
11
- }, [resolvedTheme, setTheme]);
12
-
13
- useEffect(() => {
14
- const down = (e: KeyboardEvent) => {
15
- if ((e.key === "d" || e.key === "D") && !e.metaKey && !e.ctrlKey) {
16
- if (
17
- (e.target instanceof HTMLElement && e.target.isContentEditable) ||
18
- e.target instanceof HTMLInputElement ||
19
- e.target instanceof HTMLTextAreaElement ||
20
- e.target instanceof HTMLSelectElement
21
- ) {
22
- return;
23
- }
24
- e.preventDefault();
25
- toggle();
26
- }
27
- };
28
- document.addEventListener("keydown", down);
29
- return () => document.removeEventListener("keydown", down);
30
- }, [toggle]);
31
-
32
- return (
33
- <button
34
- aria-label="Toggle theme"
35
- className="inline-flex size-8 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground"
36
- onClick={toggle}
37
- type="button"
38
- >
39
- <svg
40
- aria-hidden="true"
41
- className="size-4.5"
42
- fill="none"
43
- height="24"
44
- stroke="currentColor"
45
- strokeLinecap="round"
46
- strokeLinejoin="round"
47
- strokeWidth="2"
48
- viewBox="0 0 24 24"
49
- width="24"
50
- xmlns="http://www.w3.org/2000/svg"
51
- >
52
- <path d="M0 0h24v24H0z" fill="none" stroke="none" />
53
- <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" />
54
- <path d="M12 3l0 18" />
55
- <path d="M12 9l4.65 -4.65" />
56
- <path d="M12 14.3l7.37 -7.37" />
57
- <path d="M12 19.6l8.85 -8.85" />
58
- </svg>
59
- <span className="sr-only">Toggle theme</span>
60
- </button>
61
- );
62
- };
@@ -1,53 +0,0 @@
1
- "use client";
2
-
3
- import { Tooltip as TooltipPrimitive } from "radix-ui";
4
- import * as React from "react";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- const TooltipProvider = ({
9
- delayDuration = 0,
10
- ...props
11
- }: React.ComponentProps<typeof TooltipPrimitive.Provider>) => (
12
- <TooltipPrimitive.Provider
13
- data-slot="tooltip-provider"
14
- delayDuration={delayDuration}
15
- {...props}
16
- />
17
- );
18
-
19
- const Tooltip = ({
20
- ...props
21
- }: React.ComponentProps<typeof TooltipPrimitive.Root>) => (
22
- <TooltipPrimitive.Root data-slot="tooltip" {...props} />
23
- );
24
-
25
- const TooltipTrigger = ({
26
- ...props
27
- }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) => (
28
- <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
29
- );
30
-
31
- const TooltipContent = ({
32
- className,
33
- sideOffset = 0,
34
- children,
35
- ...props
36
- }: React.ComponentProps<typeof TooltipPrimitive.Content>) => (
37
- <TooltipPrimitive.Portal>
38
- <TooltipPrimitive.Content
39
- data-slot="tooltip-content"
40
- sideOffset={sideOffset}
41
- className={cn(
42
- "z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
43
- className
44
- )}
45
- {...props}
46
- >
47
- {children}
48
- <TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />
49
- </TooltipPrimitive.Content>
50
- </TooltipPrimitive.Portal>
51
- );
52
-
53
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -1,115 +0,0 @@
1
- "use client";
2
-
3
- // oxlint-disable require-await -- execute signatures must return Promise for WebMCP
4
- // oxlint-disable func-style -- exported component uses function-declaration style
5
- // oxlint-disable no-void -- provideContext returns a promise we intentionally discard
6
-
7
- import { useEffect } from "react";
8
-
9
- interface JSONSchemaObject {
10
- type: string;
11
- properties?: Record<string, unknown>;
12
- required?: string[];
13
- description?: string;
14
- additionalProperties?: boolean;
15
- }
16
-
17
- interface WebMCPTool {
18
- name: string;
19
- description: string;
20
- inputSchema: JSONSchemaObject;
21
- execute: (args: Record<string, unknown>) => Promise<unknown>;
22
- }
23
-
24
- interface NavigatorModelContext {
25
- provideContext?: (context: { tools: WebMCPTool[] }) => void | Promise<void>;
26
- }
27
-
28
- const buildTools = (): WebMCPTool[] => [
29
- {
30
- description:
31
- "Return the shell command that scaffolds a new Blode.md docs site with the given project slug.",
32
- execute: async ({ slug, template }) => {
33
- const projectSlug = typeof slug === "string" && slug ? slug : "my-docs";
34
- const variant =
35
- template === "starter" || template === "minimal" ? template : "minimal";
36
- return {
37
- command: `npx blodemd new docs --slug ${projectSlug} --template ${variant} -y`,
38
- };
39
- },
40
- inputSchema: {
41
- additionalProperties: false,
42
- properties: {
43
- slug: {
44
- description: "Project slug (lowercase, hyphen-separated).",
45
- type: "string",
46
- },
47
- template: {
48
- description: "Template to use: 'minimal' or 'starter'.",
49
- type: "string",
50
- },
51
- },
52
- required: ["slug"],
53
- type: "object",
54
- },
55
- name: "blodemd_scaffold_command",
56
- },
57
- {
58
- description:
59
- "Return the shell command that deploys a local Blode.md docs directory to the given project.",
60
- execute: async ({ directory, project }) => {
61
- const dir =
62
- typeof directory === "string" && directory ? directory : "docs";
63
- const projectSlug =
64
- typeof project === "string" && project ? project : "my-docs";
65
- return {
66
- command: `npx blodemd push ${dir} --project ${projectSlug}`,
67
- };
68
- },
69
- inputSchema: {
70
- additionalProperties: false,
71
- properties: {
72
- directory: {
73
- description: "Local directory containing the docs.",
74
- type: "string",
75
- },
76
- project: {
77
- description: "Target Blode.md project slug.",
78
- type: "string",
79
- },
80
- },
81
- required: ["project"],
82
- type: "object",
83
- },
84
- name: "blodemd_deploy_command",
85
- },
86
- {
87
- description: "Open the Blode.md dashboard in the current tab.",
88
- execute: async () => {
89
- if (typeof window !== "undefined") {
90
- window.location.assign("/app");
91
- }
92
- return { ok: true };
93
- },
94
- inputSchema: {
95
- additionalProperties: false,
96
- properties: {},
97
- type: "object",
98
- },
99
- name: "blodemd_open_dashboard",
100
- },
101
- ];
102
-
103
- export function WebMcpTools() {
104
- useEffect(() => {
105
- const nav = navigator as Navigator & {
106
- modelContext?: NavigatorModelContext;
107
- };
108
- if (!nav.modelContext?.provideContext) {
109
- return;
110
- }
111
- void nav.modelContext.provideContext({ tools: buildTools() });
112
- }, []);
113
-
114
- return null;
115
- }
@@ -1,48 +0,0 @@
1
- import { createHash } from "node:crypto";
2
-
3
- export const BLODEMD_SKILL_CONTENT = `---
4
- name: blodemd
5
- description: Scaffold, preview, and deploy beautiful MDX documentation sites with Blode.md. Use when the user wants to create a new docs site, validate their docs config, preview locally, or deploy to Blode.md. Triggers include "create docs", "deploy docs", "push docs", "preview docs", "scaffold a docs site", "set up documentation", "validate docs.json", or any task involving MDX documentation deployment.
6
- user-invocable: true
7
- argument-hint: <command> [options]
8
- allowed-tools: Bash(npx blodemd *), Bash(blodemd *)
9
- ---
10
-
11
- # Blode.md
12
-
13
- Scaffold, preview, and deploy MDX documentation sites from the terminal. Write locally, ship with one command. Sign in once with GitHub in your browser, no API keys ever.
14
-
15
- ## Commands
16
-
17
- - \`npx blodemd login\` - Browser sign-in with GitHub
18
- - \`npx blodemd whoami\` - Show current authentication status
19
- - \`npx blodemd new [directory] --slug <project-slug> --template <minimal|starter> -y\` - Scaffold a new docs site
20
- - \`npx blodemd validate [dir]\` - Validate docs.json against the schema
21
- - \`npx blodemd dev --dir <dir> --port 3030\` - Preview locally with hot reload
22
- - \`npx blodemd push [dir] --project <slug>\` - Deploy a docs site
23
-
24
- ## Workflow
25
-
26
- 1. Verify auth with \`npx blodemd whoami\`
27
- 2. Scaffold or locate the docs directory
28
- 3. Validate the configuration
29
- 4. Preview locally
30
- 5. Deploy to Blode.md
31
-
32
- ## docs.json
33
-
34
- The \`docs.json\` file is the config for a Blode.md site. It must include a \`slug\` field:
35
-
36
- \`\`\`json
37
- {
38
- "slug": "my-project",
39
- "name": "My Project"
40
- }
41
- \`\`\`
42
- `;
43
-
44
- export const BLODEMD_SKILL_DESCRIPTION =
45
- "Scaffold, preview, and deploy beautiful MDX documentation sites with Blode.md from the CLI.";
46
-
47
- export const sha256Hex = (input: string) =>
48
- createHash("sha256").update(input, "utf8").digest("hex");
@@ -1,72 +0,0 @@
1
- import { docsApiBase } from "./env";
2
-
3
- interface ApiRequestOptions extends Omit<RequestInit, "body" | "headers"> {
4
- accessToken?: string | null;
5
- body?: unknown;
6
- headers?: Record<string, string>;
7
- }
8
-
9
- export class ApiError extends Error {
10
- status: number;
11
- details?: unknown;
12
-
13
- constructor(message: string, status: number, details?: unknown) {
14
- super(message);
15
- this.name = "ApiError";
16
- this.status = status;
17
- this.details = details;
18
- }
19
- }
20
-
21
- const buildUrl = (path: string): string => {
22
- if (path.startsWith("http://") || path.startsWith("https://")) {
23
- return path;
24
- }
25
- const url = new URL(path.startsWith("/") ? path : `/${path}`, docsApiBase);
26
- return url.toString();
27
- };
28
-
29
- export const apiFetch = async <T = unknown>(
30
- path: string,
31
- options: ApiRequestOptions = {}
32
- ): Promise<T> => {
33
- const { accessToken, body, headers, ...rest } = options;
34
- const finalHeaders: Record<string, string> = {
35
- Accept: "application/json",
36
- ...headers,
37
- };
38
- if (accessToken) {
39
- finalHeaders.Authorization = `Bearer ${accessToken}`;
40
- }
41
- let serializedBody: string | undefined;
42
- if (body !== undefined) {
43
- finalHeaders["Content-Type"] ??= "application/json";
44
- serializedBody = JSON.stringify(body);
45
- }
46
-
47
- const response = await fetch(buildUrl(path), {
48
- ...rest,
49
- body: serializedBody,
50
- headers: finalHeaders,
51
- });
52
-
53
- const text = await response.text();
54
- let json: unknown;
55
- if (text) {
56
- try {
57
- json = JSON.parse(text);
58
- } catch {
59
- json = text;
60
- }
61
- }
62
-
63
- if (!response.ok) {
64
- const message =
65
- typeof json === "object" && json && "error" in json
66
- ? String((json as { error: unknown }).error)
67
- : `Request failed: ${response.status}`;
68
- throw new ApiError(message, response.status, json);
69
- }
70
-
71
- return json as T;
72
- };
@@ -1,6 +0,0 @@
1
- // Kept for server-side consumers in apps/docs that need platform-wide metadata
2
- // (e.g. MCP server card). The richer marketing config lives in apps/web.
3
-
4
- export const siteConfig = {
5
- version: "0.0.9",
6
- } as const;
@@ -1,33 +0,0 @@
1
- import fs from "node:fs";
2
- import os from "node:os";
3
- import path from "node:path";
4
-
5
- const DOCS_CONFIG_FILE = "docs.json";
6
-
7
- const EXTERNAL_DOCS_ROOTS: Record<string, string> = {
8
- allmd: path.join(os.homedir(), "Code/mblode/allmd/apps/docs"),
9
- "dnd-grid": path.join(os.homedir(), "Code/mblode/dnd-grid/apps/docs"),
10
- donebear: path.join(os.homedir(), "Code/donebear/donebear/apps/docs"),
11
- shareful: path.join(os.homedir(), "Code/shareful-ai/shareful-ai/apps/docs"),
12
- stratasync: path.join(os.homedir(), "Code/donebear/stratasync/apps/docs"),
13
- };
14
-
15
- const getTenantDocsPathCandidates = (slug: string): string[] =>
16
- [
17
- EXTERNAL_DOCS_ROOTS[slug],
18
- path.join(process.cwd(), "content", slug),
19
- path.join(process.cwd(), "apps/docs/content", slug),
20
- ].filter(Boolean) as string[];
21
-
22
- export const getTenantDocsPath = (slug: string): string => {
23
- const candidates = getTenantDocsPathCandidates(slug);
24
- const defaultLocalPath = path.join(process.cwd(), "apps/docs/content", slug);
25
-
26
- for (const candidate of candidates) {
27
- if (fs.existsSync(path.join(candidate, DOCS_CONFIG_FILE))) {
28
- return candidate;
29
- }
30
- }
31
-
32
- return defaultLocalPath;
33
- };
@@ -1,70 +0,0 @@
1
- import type { SiteConfig, Tenant } from "@repo/models";
2
- import type { ContentSource } from "@repo/previewing";
3
- import { createBlobSource, createFsSource } from "@repo/previewing";
4
-
5
- import { getTenantDocsPath } from "./content-root";
6
- import { getProjectTag } from "./tenants";
7
-
8
- const ABSOLUTE_URL_REGEX = /^https?:\/\//i;
9
-
10
- const resolveAssetUrl = async (
11
- source: ContentSource,
12
- value?: string
13
- ): Promise<string | undefined> => {
14
- if (!value || value.startsWith("/") || ABSOLUTE_URL_REGEX.test(value)) {
15
- return value;
16
- }
17
-
18
- const resolved = await source.resolveUrl?.(value);
19
- return resolved ?? value;
20
- };
21
-
22
- export const getTenantContentSource = (tenant: Tenant): ContentSource => {
23
- if (tenant.activeDeploymentManifestUrl) {
24
- return createBlobSource(
25
- tenant.activeDeploymentManifestUrl,
26
- getProjectTag(tenant.slug)
27
- );
28
- }
29
-
30
- return createFsSource(tenant.docsPath ?? getTenantDocsPath(tenant.slug));
31
- };
32
-
33
- export const resolveSiteConfigAssets = async (
34
- config: SiteConfig,
35
- source: ContentSource
36
- ): Promise<SiteConfig> => {
37
- const [favicon, fontCssUrl, darkLogo, lightLogo, ogImage] = await Promise.all(
38
- [
39
- resolveAssetUrl(source, config.favicon),
40
- resolveAssetUrl(source, config.fonts?.cssUrl),
41
- resolveAssetUrl(source, config.logo?.dark),
42
- resolveAssetUrl(source, config.logo?.light),
43
- resolveAssetUrl(source, config.metadata?.ogImage),
44
- ]
45
- );
46
-
47
- return {
48
- ...config,
49
- favicon,
50
- fonts: config.fonts
51
- ? {
52
- ...config.fonts,
53
- cssUrl: fontCssUrl,
54
- }
55
- : config.fonts,
56
- logo: config.logo
57
- ? {
58
- ...config.logo,
59
- dark: darkLogo,
60
- light: lightLogo,
61
- }
62
- : config.logo,
63
- metadata: config.metadata
64
- ? {
65
- ...config.metadata,
66
- ogImage,
67
- }
68
- : config.metadata,
69
- };
70
- };