blume 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/bin/blume.mjs +18 -0
  2. package/dist/cli/index.js +11989 -0
  3. package/dist/cli/index.js.map +141 -0
  4. package/docs/01-quickstart.mdx +99 -0
  5. package/docs/02-deployment.mdx +129 -0
  6. package/docs/advanced/api-reference.mdx +114 -0
  7. package/docs/advanced/blog.mdx +121 -0
  8. package/docs/advanced/changelog.mdx +113 -0
  9. package/docs/advanced/custom-pages.mdx +187 -0
  10. package/docs/advanced/meta.ts +7 -0
  11. package/docs/changelog/v0-1-0.mdx +12 -0
  12. package/docs/changelog/v0-2-0.mdx +16 -0
  13. package/docs/configuration/ai.mdx +228 -0
  14. package/docs/configuration/analytics.mdx +98 -0
  15. package/docs/configuration/customization.mdx +91 -0
  16. package/docs/configuration/export.mdx +70 -0
  17. package/docs/configuration/index.mdx +271 -0
  18. package/docs/configuration/meta.ts +15 -0
  19. package/docs/configuration/search.mdx +172 -0
  20. package/docs/configuration/seo.mdx +196 -0
  21. package/docs/configuration/theming.mdx +178 -0
  22. package/docs/content/components.mdx +565 -0
  23. package/docs/content/i18n.mdx +205 -0
  24. package/docs/content/index.mdx +161 -0
  25. package/docs/content/islands.mdx +94 -0
  26. package/docs/content/meta.mdx +119 -0
  27. package/docs/content/meta.ts +15 -0
  28. package/docs/content/navigation.mdx +168 -0
  29. package/docs/content/sources.mdx +216 -0
  30. package/docs/content/syntax.mdx +445 -0
  31. package/docs/index.mdx +112 -0
  32. package/docs/reference/cli.mdx +43 -0
  33. package/docs/reference/frontmatter.mdx +74 -0
  34. package/docs/reference/meta.ts +7 -0
  35. package/package.json +140 -6
  36. package/src/ai/ask.ts +93 -0
  37. package/src/ai/llms.ts +65 -0
  38. package/src/ai/markdown.ts +31 -0
  39. package/src/ai/mcp/data.ts +74 -0
  40. package/src/ai/mcp/discovery.ts +49 -0
  41. package/src/ai/mcp/server.ts +225 -0
  42. package/src/ai/mcp/tools.ts +47 -0
  43. package/src/assets/icon.png +0 -0
  44. package/src/astro/generate.ts +878 -0
  45. package/src/astro/index.ts +4 -0
  46. package/src/astro/integration.ts +74 -0
  47. package/src/astro/islands.ts +131 -0
  48. package/src/astro/markdown-negotiation.ts +68 -0
  49. package/src/astro/pages.ts +28 -0
  50. package/src/astro/templates.ts +1199 -0
  51. package/src/cli/commands/add.ts +81 -0
  52. package/src/cli/commands/build.ts +103 -0
  53. package/src/cli/commands/dev.ts +108 -0
  54. package/src/cli/commands/doctor.ts +74 -0
  55. package/src/cli/commands/eject.ts +57 -0
  56. package/src/cli/commands/init.ts +98 -0
  57. package/src/cli/commands/migrate.ts +39 -0
  58. package/src/cli/commands/preview.ts +39 -0
  59. package/src/cli/commands/sync.ts +52 -0
  60. package/src/cli/commands/validate.ts +60 -0
  61. package/src/cli/index.ts +35 -0
  62. package/src/cli/log.ts +37 -0
  63. package/src/cli/prepare.ts +80 -0
  64. package/src/components/Icon.astro +99 -0
  65. package/src/components/content/Accordion.astro +8 -0
  66. package/src/components/content/AccordionItem.astro +121 -0
  67. package/src/components/content/AutoTypeTable.astro +51 -0
  68. package/src/components/content/Badge.astro +124 -0
  69. package/src/components/content/Callout.astro +73 -0
  70. package/src/components/content/Card.astro +104 -0
  71. package/src/components/content/CardGroup.astro +14 -0
  72. package/src/components/content/CodeGroup.astro +13 -0
  73. package/src/components/content/Color.astro +15 -0
  74. package/src/components/content/ColorItem.astro +87 -0
  75. package/src/components/content/ColorRow.astro +10 -0
  76. package/src/components/content/Column.astro +6 -0
  77. package/src/components/content/Columns.astro +9 -0
  78. package/src/components/content/Expandable.astro +11 -0
  79. package/src/components/content/FileTree.astro +8 -0
  80. package/src/components/content/Frame.astro +70 -0
  81. package/src/components/content/GithubInfo.astro +110 -0
  82. package/src/components/content/Math.astro +24 -0
  83. package/src/components/content/Panel.astro +20 -0
  84. package/src/components/content/Prompt.astro +129 -0
  85. package/src/components/content/Step.astro +34 -0
  86. package/src/components/content/Steps.astro +20 -0
  87. package/src/components/content/Tab.astro +40 -0
  88. package/src/components/content/Tabs.astro +273 -0
  89. package/src/components/content/Tile.astro +42 -0
  90. package/src/components/content/Tooltip.astro +68 -0
  91. package/src/components/content/Tree.astro +300 -0
  92. package/src/components/content/TreeFile.astro +15 -0
  93. package/src/components/content/TreeFolder.astro +62 -0
  94. package/src/components/content/TypeTable.astro +106 -0
  95. package/src/components/content/Update.astro +66 -0
  96. package/src/components/content/Visibility.astro +12 -0
  97. package/src/components/content/Warning.astro +9 -0
  98. package/src/components/content/auto-type-table.ts +141 -0
  99. package/src/components/content/github-info.ts +79 -0
  100. package/src/components/content/mermaid-element.ts +68 -0
  101. package/src/components/github-mark.ts +9 -0
  102. package/src/components/index.ts +14 -0
  103. package/src/components/islands/AskAI.astro +12 -0
  104. package/src/components/islands/ask-ai.tsx +156 -0
  105. package/src/components/layout/Analytics.astro +63 -0
  106. package/src/components/layout/Banner.astro +50 -0
  107. package/src/components/layout/Breadcrumbs.astro +31 -0
  108. package/src/components/layout/Favicon.astro +15 -0
  109. package/src/components/layout/Fonts.astro +14 -0
  110. package/src/components/layout/Header.astro +188 -0
  111. package/src/components/layout/LanguageSwitcher.astro +56 -0
  112. package/src/components/layout/NavTree.astro +462 -0
  113. package/src/components/layout/PageActions.astro +438 -0
  114. package/src/components/layout/PageFeedback.astro +58 -0
  115. package/src/components/layout/Pagination.astro +56 -0
  116. package/src/components/layout/ReferenceLayout.astro +102 -0
  117. package/src/components/layout/RootLayout.astro +533 -0
  118. package/src/components/layout/Search.astro +608 -0
  119. package/src/components/layout/TableOfContents.astro +68 -0
  120. package/src/components/layout/analytics-client.ts +38 -0
  121. package/src/components/layout/nav-utils.ts +87 -0
  122. package/src/components/layout/overrides.ts +32 -0
  123. package/src/components/layout/search/algolia.ts +43 -0
  124. package/src/components/layout/search/endpoint.ts +22 -0
  125. package/src/components/layout/search/flexsearch.ts +52 -0
  126. package/src/components/layout/search/orama-cloud.ts +41 -0
  127. package/src/components/layout/search/orama.ts +26 -0
  128. package/src/components/layout/search/pagefind.ts +43 -0
  129. package/src/components/layout/search/types.ts +163 -0
  130. package/src/components/layout/search/typesense.ts +60 -0
  131. package/src/components/layout/toc-element.ts +108 -0
  132. package/src/core/bridge.ts +92 -0
  133. package/src/core/config.ts +112 -0
  134. package/src/core/content.ts +50 -0
  135. package/src/core/define-components.ts +34 -0
  136. package/src/core/define-meta.ts +20 -0
  137. package/src/core/deployment-env.ts +73 -0
  138. package/src/core/diagnostics.ts +104 -0
  139. package/src/core/graph.ts +128 -0
  140. package/src/core/i18n-ui.ts +171 -0
  141. package/src/core/i18n.ts +169 -0
  142. package/src/core/last-modified.ts +88 -0
  143. package/src/core/links.ts +336 -0
  144. package/src/core/load-module.ts +15 -0
  145. package/src/core/manifest.ts +126 -0
  146. package/src/core/meta.ts +97 -0
  147. package/src/core/navigation.ts +392 -0
  148. package/src/core/package-root.ts +37 -0
  149. package/src/core/project-graph.ts +153 -0
  150. package/src/core/project.ts +56 -0
  151. package/src/core/schema.ts +1057 -0
  152. package/src/core/server-features.ts +23 -0
  153. package/src/core/sources/assets.ts +77 -0
  154. package/src/core/sources/cache.ts +122 -0
  155. package/src/core/sources/filesystem.ts +99 -0
  156. package/src/core/sources/mdx-remote.ts +216 -0
  157. package/src/core/sources/mintlify.ts +161 -0
  158. package/src/core/sources/normalize.ts +227 -0
  159. package/src/core/sources/notion.ts +440 -0
  160. package/src/core/sources/portable-text.ts +143 -0
  161. package/src/core/sources/read.ts +36 -0
  162. package/src/core/sources/resolve.ts +158 -0
  163. package/src/core/sources/sanity.ts +218 -0
  164. package/src/core/sources/types.ts +105 -0
  165. package/src/core/types.ts +261 -0
  166. package/src/core/ui-packs/ar.ts +47 -0
  167. package/src/core/ui-packs/bg.ts +47 -0
  168. package/src/core/ui-packs/bn.ts +47 -0
  169. package/src/core/ui-packs/ca.ts +47 -0
  170. package/src/core/ui-packs/cs.ts +47 -0
  171. package/src/core/ui-packs/da.ts +47 -0
  172. package/src/core/ui-packs/de.ts +47 -0
  173. package/src/core/ui-packs/el.ts +47 -0
  174. package/src/core/ui-packs/es.ts +47 -0
  175. package/src/core/ui-packs/fa.ts +47 -0
  176. package/src/core/ui-packs/fi.ts +47 -0
  177. package/src/core/ui-packs/fr.ts +47 -0
  178. package/src/core/ui-packs/he.ts +47 -0
  179. package/src/core/ui-packs/hi.ts +47 -0
  180. package/src/core/ui-packs/hr.ts +47 -0
  181. package/src/core/ui-packs/hu.ts +47 -0
  182. package/src/core/ui-packs/id.ts +47 -0
  183. package/src/core/ui-packs/index.ts +87 -0
  184. package/src/core/ui-packs/it.ts +47 -0
  185. package/src/core/ui-packs/ja.ts +47 -0
  186. package/src/core/ui-packs/ko.ts +47 -0
  187. package/src/core/ui-packs/nl.ts +47 -0
  188. package/src/core/ui-packs/no.ts +47 -0
  189. package/src/core/ui-packs/pl.ts +47 -0
  190. package/src/core/ui-packs/pt-br.ts +47 -0
  191. package/src/core/ui-packs/pt.ts +47 -0
  192. package/src/core/ui-packs/ro.ts +47 -0
  193. package/src/core/ui-packs/ru.ts +47 -0
  194. package/src/core/ui-packs/sk.ts +47 -0
  195. package/src/core/ui-packs/sr.ts +47 -0
  196. package/src/core/ui-packs/sv.ts +47 -0
  197. package/src/core/ui-packs/th.ts +47 -0
  198. package/src/core/ui-packs/tr.ts +47 -0
  199. package/src/core/ui-packs/uk.ts +47 -0
  200. package/src/core/ui-packs/vi.ts +47 -0
  201. package/src/core/ui-packs/zh-tw.ts +47 -0
  202. package/src/core/ui-packs/zh.ts +47 -0
  203. package/src/core/version.ts +23 -0
  204. package/src/deploy/robots.ts +20 -0
  205. package/src/deploy/rss.ts +128 -0
  206. package/src/deploy/sitemap.ts +28 -0
  207. package/src/index.ts +27 -0
  208. package/src/markdown/code-title.ts +71 -0
  209. package/src/markdown/directives.ts +83 -0
  210. package/src/markdown/heading-anchors.ts +137 -0
  211. package/src/markdown/index.ts +159 -0
  212. package/src/markdown/inline-code.ts +108 -0
  213. package/src/markdown/language-icon.ts +172 -0
  214. package/src/markdown/math.ts +32 -0
  215. package/src/markdown/mdast.ts +48 -0
  216. package/src/markdown/mermaid.ts +37 -0
  217. package/src/markdown/package-commands.ts +159 -0
  218. package/src/markdown/package-install.ts +40 -0
  219. package/src/migrate/fumadocs/config.ts +106 -0
  220. package/src/migrate/fumadocs/content.ts +365 -0
  221. package/src/migrate/fumadocs/frontmatter.ts +18 -0
  222. package/src/migrate/fumadocs/index.ts +252 -0
  223. package/src/migrate/fumadocs/meta.ts +114 -0
  224. package/src/migrate/migrate.ts +53 -0
  225. package/src/migrate/mintlify/config.ts +1040 -0
  226. package/src/migrate/mintlify/content.ts +98 -0
  227. package/src/migrate/mintlify/frontmatter.ts +126 -0
  228. package/src/migrate/mintlify/i18n.ts +51 -0
  229. package/src/migrate/mintlify/icons.ts +128 -0
  230. package/src/migrate/mintlify/index.ts +266 -0
  231. package/src/migrate/mintlify/snippets.ts +305 -0
  232. package/src/migrate/mintlify/transform.ts +81 -0
  233. package/src/migrate/nextra/content.ts +46 -0
  234. package/src/migrate/nextra/frontmatter.ts +40 -0
  235. package/src/migrate/nextra/index.ts +374 -0
  236. package/src/migrate/nextra/meta.ts +266 -0
  237. package/src/migrate/shared.ts +623 -0
  238. package/src/migrate/starlight/config.ts +459 -0
  239. package/src/migrate/starlight/content.ts +78 -0
  240. package/src/migrate/starlight/frontmatter.ts +111 -0
  241. package/src/migrate/starlight/i18n.ts +54 -0
  242. package/src/migrate/starlight/index.ts +131 -0
  243. package/src/og/card.ts +92 -0
  244. package/src/og/index.ts +2 -0
  245. package/src/openapi/scalar.ts +246 -0
  246. package/src/registry/eject.ts +263 -0
  247. package/src/registry/registry.ts +100 -0
  248. package/src/registry/rewrite-imports.ts +39 -0
  249. package/src/runtime/index.ts +14 -0
  250. package/src/search/build.ts +23 -0
  251. package/src/search/documents.ts +165 -0
  252. package/src/search/orama-index.ts +66 -0
  253. package/src/search/providers.ts +91 -0
  254. package/src/search/sync/algolia.ts +30 -0
  255. package/src/search/sync/index.ts +50 -0
  256. package/src/search/sync/orama-cloud.ts +40 -0
  257. package/src/search/sync/typesense.ts +65 -0
  258. package/src/seo/jsonld.ts +113 -0
  259. package/src/theme/entry.ts +608 -0
  260. package/src/theme/fonts.ts +198 -0
  261. package/src/theme/icons.ts +184 -0
  262. package/src/theme/palette.ts +143 -0
  263. package/src/theme/twoslash.ts +81 -0
@@ -0,0 +1,565 @@
1
+ ---
2
+ title: Components
3
+ description: The built-in JSX components — cards, columns, steps, tabs, accordions, badges, code groups, frames, trees, tooltips, type tables, and a GitHub card — usable in any MDX page.
4
+ ---
5
+
6
+ Blume ships an accessible, themeable component set available in any `.mdx` page
7
+ with **no imports**. Each one is shown below with a live preview and its source.
8
+ Components are vanilla and React-free; React only switches on if you add your own
9
+ island.
10
+
11
+ ## Card and CardGroup
12
+
13
+ Cards link to a destination with an icon, title, and short blurb. Group them with
14
+ `CardGroup` for a responsive grid. Reach for them on landing pages, section
15
+ indexes, and “next steps” — anywhere you’re guiding the reader onward.
16
+
17
+ <CardGroup cols={2}>
18
+ <Card title="Quickstart" href="/docs/quickstart" icon="rocket">
19
+ Install Blume and ship your first page.
20
+ </Card>
21
+ <Card title="Components" href="/docs/content/components" icon="folder">
22
+ Browse the component library.
23
+ </Card>
24
+ </CardGroup>
25
+
26
+ ```astro lineNumbers
27
+ <CardGroup cols={2}>
28
+ <Card title="Quickstart" href="/docs/quickstart" icon="rocket">
29
+ Install Blume and ship your first page.
30
+ </Card>
31
+ <Card title="Components" href="/docs/content/components" icon="folder">
32
+ Browse the component library.
33
+ </Card>
34
+ </CardGroup>
35
+ ```
36
+
37
+ `Card` takes `title`, an optional `href` (omit it for a non-clickable card), and
38
+ an `icon` from Blume's built-in icon set. `CardGroup` takes `cols` (default `2`).
39
+
40
+ ## Steps
41
+
42
+ A numbered vertical sequence for ordered instructions — installs, setup flows,
43
+ and tutorials where the order matters. Each `Step` takes a `title`.
44
+
45
+ <Steps>
46
+ <Step title="Install Blume">Add the package to your project.</Step>
47
+ <Step title="Write a page">
48
+ Drop an `.mdx` file into your content folder.
49
+ </Step>
50
+ <Step title="Ship it">Run `blume build` and deploy `dist/`.</Step>
51
+ </Steps>
52
+
53
+ ```astro lineNumbers
54
+ <Steps>
55
+ <Step title="Install Blume">Add the package to your project.</Step>
56
+ <Step title="Write a page">
57
+ Drop an `.mdx` file into your content folder.
58
+ </Step>
59
+ <Step title="Ship it">Run `blume build` and deploy `dist/`.</Step>
60
+ </Steps>
61
+ ```
62
+
63
+ ## Tabs
64
+
65
+ Switch between equivalent content in place — language variants, OS-specific
66
+ commands, or alternative approaches — without stacking everything on the page.
67
+ Each `Tab` takes a `title`.
68
+
69
+ <Tabs>
70
+ <Tab title="macOS">Use Homebrew to install the toolchain.</Tab>
71
+ <Tab title="Windows">Use winget to install the toolchain.</Tab>
72
+ </Tabs>
73
+
74
+ ```astro lineNumbers
75
+ <Tabs>
76
+ <Tab title="macOS">Use Homebrew to install the toolchain.</Tab>
77
+ <Tab title="Windows">Use winget to install the toolchain.</Tab>
78
+ </Tabs>
79
+ ```
80
+
81
+ ## Badge
82
+
83
+ A small inline label for status or metadata — version tags, “new” or “beta”
84
+ markers, stability levels. The `variant` tunes the color to the meaning.
85
+
86
+ ### Default
87
+
88
+ Neutral metadata with no particular emphasis.
89
+
90
+ <Badge>Stable</Badge>
91
+
92
+ ```astro
93
+ <Badge>Stable</Badge>
94
+ ```
95
+
96
+ ### Accent
97
+
98
+ Draws the eye using your theme accent — good for “new” or featured markers.
99
+
100
+ <Badge variant="accent">New</Badge>
101
+
102
+ ```astro
103
+ <Badge variant="accent">New</Badge>
104
+ ```
105
+
106
+ ### Success
107
+
108
+ A positive or passing state.
109
+
110
+ <Badge variant="success">Passing</Badge>
111
+
112
+ ```astro
113
+ <Badge variant="success">Passing</Badge>
114
+ ```
115
+
116
+ ### Warning
117
+
118
+ Something to use with caution, such as an experimental feature.
119
+
120
+ <Badge variant="warning">Beta</Badge>
121
+
122
+ ```astro
123
+ <Badge variant="warning">Beta</Badge>
124
+ ```
125
+
126
+ ### Danger
127
+
128
+ A negative or breaking state, such as a deprecation.
129
+
130
+ <Badge variant="danger">Deprecated</Badge>
131
+
132
+ ```astro
133
+ <Badge variant="danger">Deprecated</Badge>
134
+ ```
135
+
136
+ ## File tree
137
+
138
+ Illustrate a project or folder layout. Wrap a normal Markdown list and Blume
139
+ styles it as a tree — handy for explaining structure in setup and config guides.
140
+
141
+ <FileTree>
142
+
143
+ - docs/
144
+ - index.mdx
145
+ - guides/
146
+ - configuration.mdx
147
+ - blume.config.ts
148
+
149
+ </FileTree>
150
+
151
+ ```astro lineNumbers
152
+ <FileTree>
153
+
154
+ - docs/
155
+ - index.mdx
156
+ - guides/
157
+ - configuration.mdx
158
+ - blume.config.ts
159
+
160
+ </FileTree>
161
+ ```
162
+
163
+ ## Accordion
164
+
165
+ Stack related collapsibles in a single bordered container with dividers between
166
+ them — FAQs, optional steps, or long examples. Each child is an `AccordionItem`
167
+ (`title`, optional `icon`, `description`, `defaultOpen`). For a single standalone
168
+ disclosure, use [Expandable](#expandable).
169
+
170
+ <Accordion>
171
+ <AccordionItem title="Does it support MDX?">
172
+ Yes — every page can be `.md` or `.mdx`.
173
+ </AccordionItem>
174
+ <AccordionItem title="Is the theme customizable?">
175
+ Yes, via Tailwind v4 tokens and your own `theme.css`.
176
+ </AccordionItem>
177
+ </Accordion>
178
+
179
+ ```astro lineNumbers
180
+ <Accordion>
181
+ <AccordionItem title="Does it support MDX?">
182
+ Yes — every page can be `.md` or `.mdx`.
183
+ </AccordionItem>
184
+ <AccordionItem title="Is the theme customizable?">
185
+ Yes, via Tailwind v4 tokens and your own `theme.css`.
186
+ </AccordionItem>
187
+ </Accordion>
188
+ ```
189
+
190
+ ## Expandable
191
+
192
+ A lightweight inline disclosure for nested detail — expanding a field's
193
+ sub-properties or an optional aside. `title` labels the toggle (defaults to
194
+ “Show more”); set `defaultOpen` to start expanded.
195
+
196
+ <Expandable title="Show advanced options">
197
+ These settings are optional and rarely need changing.
198
+ </Expandable>
199
+
200
+ ```astro
201
+ <Expandable title="Show advanced options">
202
+ These settings are optional and rarely need changing.
203
+ </Expandable>
204
+ ```
205
+
206
+ ## Columns
207
+
208
+ Lay cards or blocks out in a responsive grid of equal columns that reflows on
209
+ mobile. `Columns` takes `cols`; wrap each cell in a `Column`.
210
+
211
+ <Columns cols={2}>
212
+ <Column>
213
+ <Card title="Fast" icon="rocket">
214
+ Built on Astro and Vite.
215
+ </Card>
216
+ </Column>
217
+ <Column>
218
+ <Card title="Themeable" icon="sun">
219
+ Tailwind v4 design tokens.
220
+ </Card>
221
+ </Column>
222
+ </Columns>
223
+
224
+ ```astro lineNumbers
225
+ <Columns cols={2}>
226
+ <Column>
227
+ <Card title="Fast" icon="rocket">
228
+ Built on Astro and Vite.
229
+ </Card>
230
+ </Column>
231
+ <Column>
232
+ <Card title="Themeable" icon="sun">
233
+ Tailwind v4 design tokens.
234
+ </Card>
235
+ </Column>
236
+ </Columns>
237
+ ```
238
+
239
+ ## CodeGroup
240
+
241
+ Group several code blocks into one tabbed switcher — a tab per language or file.
242
+ The tab label is each block's title (the text after the language). Add `dropdown`
243
+ to switch with a menu instead of a tab bar.
244
+
245
+ <CodeGroup>
246
+
247
+ ```ts TypeScript
248
+ export const greet = (name: string) => `Hello, ${name}`;
249
+ ```
250
+
251
+ ```python Python
252
+ def greet(name: str) -> str:
253
+ return f"Hello, {name}"
254
+ ```
255
+
256
+ ```rust Rust
257
+ fn greet(name: &str) -> String {
258
+ format!("Hello, {name}")
259
+ }
260
+ ```
261
+
262
+ </CodeGroup>
263
+
264
+ ````astro
265
+ <CodeGroup>
266
+
267
+ ```ts TypeScript
268
+ export const greet = (name: string) => `Hello, ${name}`;
269
+ ```
270
+
271
+ ```python Python
272
+ def greet(name: str) -> str:
273
+ return f"Hello, {name}"
274
+ ```
275
+
276
+ ```rust Rust
277
+ fn greet(name: &str) -> String {
278
+ format!("Hello, {name}")
279
+ }
280
+ ```
281
+
282
+ </CodeGroup>
283
+ ````
284
+
285
+ ## Frame
286
+
287
+ Wrap an image or any visual in a centered, bordered frame with an optional
288
+ `caption` (rendered as Markdown) and `hint`.
289
+
290
+ <Frame
291
+ caption="A **framed** illustration."
292
+ hint="Frames center and caption visuals."
293
+ >
294
+ <svg
295
+ width="160"
296
+ height="72"
297
+ viewBox="0 0 160 72"
298
+ role="img"
299
+ aria-label="Sample frame"
300
+ >
301
+ <rect width="160" height="72" rx="8" fill="#3b82f6" />
302
+ </svg>
303
+ </Frame>
304
+
305
+ ```astro lineNumbers
306
+ <Frame
307
+ caption="A **framed** illustration."
308
+ hint="Frames center and caption visuals."
309
+ >
310
+ <img src="/screenshot.png" alt="Product screenshot" />
311
+ </Frame>
312
+ ```
313
+
314
+ ## Color
315
+
316
+ Show color swatches with copyable hex values — useful for documenting a palette
317
+ or brand colors. Use `variant="compact"` for a swatch list, or `variant="table"`
318
+ with `Color.Row` to group them. Each `Color.Item` takes a `name` and a `value`
319
+ (a hex string, or `{ light, dark }` for theme-aware colors).
320
+
321
+ <Color variant="compact">
322
+ <Color.Item name="blue-500" value="#3B82F6" />
323
+ <Color.Item name="green-500" value="#16A34A" />
324
+ <Color.Item name="background" value={{ light: "#FFFFFF", dark: "#0A0A0A" }} />
325
+ </Color>
326
+
327
+ ```astro lineNumbers
328
+ <Color variant="compact">
329
+ <Color.Item name="blue-500" value="#3B82F6" />
330
+ <Color.Item name="green-500" value="#16A34A" />
331
+ <Color.Item name="background" value={{ light: "#FFFFFF", dark: "#0A0A0A" }} />
332
+ </Color>
333
+ ```
334
+
335
+ ## Tree
336
+
337
+ Render a hierarchical file/folder structure with expandable folders. (For a
338
+ quick, list-driven version see [File tree](#file-tree); `Tree` gives per-folder
339
+ control.) Use `Tree.Folder` (`name`, optional `defaultOpen`, `openable`) and
340
+ `Tree.File` (`name`).
341
+
342
+ <Tree>
343
+ <Tree.Folder name="src" defaultOpen>
344
+ <Tree.File name="index.ts" />
345
+ <Tree.Folder name="components">
346
+ <Tree.File name="Button.tsx" />
347
+ </Tree.Folder>
348
+ </Tree.Folder>
349
+ <Tree.File name="blume.config.ts" />
350
+ </Tree>
351
+
352
+ ```astro lineNumbers
353
+ <Tree>
354
+ <Tree.Folder name="src" defaultOpen>
355
+ <Tree.File name="index.ts" />
356
+ <Tree.Folder name="components">
357
+ <Tree.File name="Button.tsx" />
358
+ </Tree.Folder>
359
+ </Tree.Folder>
360
+ <Tree.File name="blume.config.ts" />
361
+ </Tree>
362
+ ```
363
+
364
+ ## Panel
365
+
366
+ A titled container for supplementary, set-aside content. `title` is optional.
367
+
368
+ <Panel title="Good to know">
369
+ Panels hold supporting detail without interrupting the main flow.
370
+ </Panel>
371
+
372
+ ```astro
373
+ <Panel title="Good to know">
374
+ Panels hold supporting detail without interrupting the main flow.
375
+ </Panel>
376
+ ```
377
+
378
+ ## Tooltip
379
+
380
+ Reveal a definition or hint on hover for an inline term. `tip` is the hover text;
381
+ add an optional `headline` and a `cta` + `href` for a follow-up link.
382
+
383
+ Hover the <Tooltip tip="A set of protocols software uses to communicate." headline="API" cta="Read the guide" href="/docs/quickstart">API</Tooltip> term to learn more.
384
+
385
+ ```astro
386
+ Hover the <Tooltip tip="A set of protocols software uses to communicate." headline="API" cta="Read the guide" href="/docs/quickstart">API</Tooltip> term.
387
+ ```
388
+
389
+ ## Tile
390
+
391
+ A clickable preview that leads with a visual — an icon or image — above a title
392
+ and description. Good for galleries and showcases. Takes `title`, `description`,
393
+ and `href`; the child is the visual.
394
+
395
+ <Tile
396
+ title="Quickstart"
397
+ description="Ship your first page in minutes."
398
+ href="/docs/quickstart"
399
+ >
400
+ <Icon icon="rocket" size={28} />
401
+ </Tile>
402
+
403
+ ```astro
404
+ <Tile
405
+ title="Quickstart"
406
+ description="Ship your first page in minutes."
407
+ href="/docs/quickstart"
408
+ >
409
+ <Icon icon="rocket" size={28} />
410
+ </Tile>
411
+ ```
412
+
413
+ ## Prompt
414
+
415
+ A single row with a label and a copy button. The `description` (Markdown) is the
416
+ visible label; the body is the prompt itself — hidden, and copied to the
417
+ clipboard when the **Copy prompt** button is pressed. `actions` controls the
418
+ buttons (e.g. `["copy", "cursor"]`).
419
+
420
+ <Prompt
421
+ description="Ask the model to **document** an endpoint."
422
+ actions={["copy"]}
423
+ >
424
+ Write reference docs for the POST /v1/pets endpoint.
425
+ </Prompt>
426
+
427
+ ```astro
428
+ <Prompt
429
+ description="Ask the model to **document** an endpoint."
430
+ actions={["copy"]}
431
+ >
432
+ Write reference docs for the POST /v1/pets endpoint.
433
+ </Prompt>
434
+ ```
435
+
436
+ ## Visibility
437
+
438
+ Show or hide content by audience. `for="web"` renders only on the site;
439
+ `for="agents"` targets the generated Markdown (`llms.txt`) that AI agents read.
440
+
441
+ <Visibility for="web">
442
+ This note appears on the website but is omitted from the agent-facing
443
+ Markdown.
444
+ </Visibility>
445
+
446
+ ```astro
447
+ <Visibility for="web">Shown on the site only.</Visibility>
448
+ <Visibility for="agents">Shown only in the generated Markdown.</Visibility>
449
+ ```
450
+
451
+ ## Type tables
452
+
453
+ Tables for documenting an object's properties — its props, types, and defaults.
454
+ Write the rows by hand with `TypeTable`, or generate them straight from a
455
+ TypeScript interface or type alias with `AutoTypeTable`.
456
+
457
+ ### Type table
458
+
459
+ A **Prop / Type** grid where each row expands to reveal its description and
460
+ details. Pass a `type` map keyed by property name; each entry takes a `type`,
461
+ plus an optional `description`, `default`, `required` flag, `typeDescription`,
462
+ and `typeDescriptionLink`. Optional props (`required` unset) show a `?` after the
463
+ name.
464
+
465
+ <TypeTable
466
+ type={{
467
+ label: {
468
+ type: "string",
469
+ required: true,
470
+ description: "The button's visible label.",
471
+ },
472
+ variant: {
473
+ type: '"primary" | "ghost"',
474
+ default: '"primary"',
475
+ description: "Visual style.",
476
+ },
477
+ disabled: { type: "boolean" },
478
+ }}
479
+ />
480
+
481
+ ```astro lineNumbers
482
+ <TypeTable
483
+ type={{
484
+ label: {
485
+ type: "string",
486
+ required: true,
487
+ description: "The button's visible label.",
488
+ },
489
+ variant: {
490
+ type: '"primary" | "ghost"',
491
+ default: '"primary"',
492
+ description: "Visual style.",
493
+ },
494
+ disabled: { type: "boolean" },
495
+ }}
496
+ />
497
+ ```
498
+
499
+ ### Auto type table
500
+
501
+ Generate a type table from a TypeScript type so the docs stay in sync with the
502
+ source. Point `AutoTypeTable` at a file with `path` (resolved from your project
503
+ root) and a type `name`. Descriptions come from JSDoc comments, defaults from
504
+ `@default` tags, and optional properties (`?`) are marked accordingly.
505
+
506
+ ```astro
507
+ <AutoTypeTable path="./src/button.ts" name="ButtonProps" />
508
+ ```
509
+
510
+ You can also pass the type inline with `type` instead of a `path` — handy for
511
+ small examples:
512
+
513
+ <AutoTypeTable
514
+ name="ButtonProps"
515
+ type={`
516
+ export interface ButtonProps {
517
+ /** The button's visible label. */
518
+ label: string;
519
+ /**
520
+ * Visual style.
521
+ * @default "primary"
522
+ */
523
+ variant?: "primary" | "ghost";
524
+ /** Disable interaction. */
525
+ disabled?: boolean;
526
+ }
527
+ `}
528
+ />
529
+
530
+ ```astro lineNumbers
531
+ <AutoTypeTable
532
+ name="ButtonProps"
533
+ type={`
534
+ export interface ButtonProps {
535
+ /** The button's visible label. */
536
+ label: string;
537
+ /**
538
+ * Visual style.
539
+ * @default "primary"
540
+ */
541
+ variant?: "primary" | "ghost";
542
+ /** Disable interaction. */
543
+ disabled?: boolean;
544
+ }
545
+ `}
546
+ />
547
+ ```
548
+
549
+ ## GitHub info
550
+
551
+ A card linking to a GitHub repository with its live star and fork counts.
552
+ Counts are fetched at build time — no client JavaScript — and the card still
553
+ renders if the API is unreachable. Pass `owner` and `repo`, or omit them to use
554
+ the repository from your `blume.config`. Set a `GITHUB_TOKEN` environment
555
+ variable to lift the API rate limit.
556
+
557
+ <GithubInfo owner="withastro" repo="astro" />
558
+
559
+ ```astro lineNumbers
560
+ <!-- Uses the repo from blume.config -->
561
+ <GithubInfo />
562
+
563
+ <!-- Or point it at any repository -->
564
+ <GithubInfo owner="withastro" repo="astro" />
565
+ ```