blume 1.0.3 → 1.0.4

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 (51) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cli/index.js +441 -259
  3. package/dist/cli/index.js.map +12 -11
  4. package/dist/types/core/config-input.d.ts +27 -8
  5. package/dist/types/core/data.d.ts +12 -0
  6. package/dist/types/core/i18n-ui.d.ts +136 -136
  7. package/dist/types/core/schema.d.ts +420 -350
  8. package/dist/types/core/types.d.ts +10 -0
  9. package/dist/types/openapi/references.d.ts +12 -7
  10. package/docs/advanced/api-reference.mdx +11 -3
  11. package/docs/configuration/seo.mdx +20 -1
  12. package/docs/content/components.mdx +1 -2
  13. package/docs/content/navigation.mdx +10 -0
  14. package/docs/content/syntax.mdx +116 -4
  15. package/package.json +1 -1
  16. package/skills/blume-migrate/SKILL.md +170 -0
  17. package/skills/blume-migrate/assets/oxfmt@0.55.0.patch +20 -0
  18. package/skills/blume-migrate/references/docusaurus.md +95 -0
  19. package/skills/blume-migrate/references/fumadocs.md +95 -0
  20. package/skills/blume-migrate/references/mintlify.md +155 -0
  21. package/skills/blume-migrate/references/monorepo.md +224 -0
  22. package/skills/blume-migrate/references/nextra.md +76 -0
  23. package/skills/blume-migrate/references/starlight.md +116 -0
  24. package/skills/blume-migrate/scripts/mintlify-codemod.mjs +466 -0
  25. package/src/astro/component-slots.ts +3 -2
  26. package/src/astro/generate.ts +82 -23
  27. package/src/astro/templates.ts +93 -34
  28. package/src/components/content/Callout.astro +8 -2
  29. package/src/components/content/Prompt.astro +25 -13
  30. package/src/components/layout/Header.astro +4 -8
  31. package/src/components/layout/Logo.astro +13 -1
  32. package/src/components/layout/PageFeedback.astro +1 -1
  33. package/src/components/layout/PageLayout.astro +4 -8
  34. package/src/components/layout/Pagination.astro +6 -6
  35. package/src/components/layout/RootLayout.astro +4 -8
  36. package/src/components/layout/Search.astro +1 -1
  37. package/src/components/layout/nav-utils.ts +9 -7
  38. package/src/core/config-input.ts +29 -8
  39. package/src/core/data.ts +9 -1
  40. package/src/core/navigation.ts +55 -13
  41. package/src/core/schema.ts +17 -1
  42. package/src/core/sources/watch.ts +5 -0
  43. package/src/core/types.ts +10 -0
  44. package/src/markdown/index.ts +2 -0
  45. package/src/markdown/language-icon.ts +2 -1
  46. package/src/markdown/table-wrap.ts +43 -0
  47. package/src/og/card.ts +39 -12
  48. package/src/og/index.ts +1 -1
  49. package/src/og/logo.ts +21 -0
  50. package/src/openapi/references.ts +19 -16
  51. package/src/theme/entry.ts +50 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # blume
2
2
 
3
+ ## 1.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - cf8fa22: Fix the spacing inside directive callouts (`:::note`, `:::success`, …). The global prose paragraph rule leaks a 1rem margin onto the callout's paragraphs even though the callout is `not-prose`, and with a title the body paragraph isn't the first child — so that margin stacked under the title's own gap and left a too-large space between the title and the body. The Callout now overrides that margin locally for a uniform, compact gap between the title, paragraphs, and lists. Callouts without a title and normal prose spacing are unchanged.
8
+ - bb5944d: Gate the language icon on `data-language` so it no longer overlaps the first code line on header-less standalone `<CodeBlock>`s. The icon transformer runs whenever icons are on, but a standalone block without a `title` never gets `data-language` (the header bar that reserves the icon's space), so the absolutely-positioned icon sat on top of the first line. Fenced code and titled blocks are unaffected.
9
+ - d59be0a: API references (OpenAPI, AsyncAPI) no longer add a header tab automatically. Point a `navigation.tabs` entry at the reference route to surface it — this also lets you control the tab label and scopes the operations sidebar for the native renderer.
10
+ - f02b94e: Introduce the `blume-migrate` agent skill. It teaches an AI agent to migrate an existing docs site — Mintlify, Docusaurus, Fumadocs, Nextra, Starlight, or any docs framework — into an idiomatic Blume project: translating the source config to `blume.config.ts`, restructuring content into filesystem-derived navigation (with `redirects` for every moved route), rewriting callouts to `:::` directives, converting icons to Lucide, inlining snippets, and pointing generated API references at `openapi.sources` instead of porting endpoint stubs. Ships with per-framework mapping references, a deterministic Mintlify codemod for the icon/frontmatter pass, and monorepo/Vercel integration recipes. The skill is bundled in the package under `skills/`.
11
+ - a421a1e: Make the generated runtime type-check cleanly under `blume check --strict --isolated` (and any project whose `tsconfig` includes the generated files). Previously a valid site could fail with dozens of errors in the generated `.blume-verify` files:
12
+
13
+ - The raw-Markdown, RSS, and OG endpoints imported `data.json` directly, so TypeScript widened the JSON (navigation `kind` to `string`, empty arrays to `never[]`, theme mode to `string`) and rejected it against Blume's own types. They now import the typed `blume:data` virtual module.
14
+ - Endpoint handlers (`GET`, `getStaticPaths` callbacks) and the changelog/content-page helper functions had implicit-`any` parameters; they now carry explicit types.
15
+ - The OG endpoint's PNG `Buffer` is wrapped in a `Uint8Array` so it satisfies the `Response` body type, and the empty component-overrides module and the `blume:examples`/`blume:examples-theme` virtual modules now declare types.
16
+
17
+ Also stops `blume check --isolated` from reloading a running `blume dev` server: `.blume-verify` is now in Blume's ignored-directory set, so generating the isolated runtime no longer trips the content watcher.
18
+
19
+ - 6a97cb2: Reserve space for local per-mode SVG logos before they load.
20
+ - 5793ccf: Render Mermaid diagrams in `blume dev`. Mermaid statically imports dayjs as CommonJS (`dayjs/dayjs.min.js`), and in dev Vite served that dependency un-pre-bundled, so it exposed no `default` export and mermaid threw `does not provide an export named 'default'` — leaving diagrams blank (the production build already handled the interop). Mermaid now goes through Vite's dependency optimizer, which bundles dayjs with correct CommonJS interop. Because Blume's `import("mermaid")` lives inside `node_modules/blume` — a path Vite's optimizer scan doesn't crawl in a standalone install — the diagram library was never discovered on its own, so it's included explicitly via the nested `blume > mermaid` form (mermaid isn't a direct dependency of the generated project).
21
+ - 5c0b0f0: Add custom logo and palette settings for generated Open Graph cards.
22
+ - 1bdc849: Truncate long page titles in the previous/next pagination links so they no longer overflow their pill container, and allow inline code inside table cells to wrap instead of forcing the whole table to overflow horizontally.
23
+ - f2ffcb5: Prerender Cloudflare adapter builds in Node so build-time `node:` imports resolve. Astro 6 changed the `@astrojs/cloudflare` default prerender runtime from Node to workerd, which broke Blume prerender on Cloudflare (`No such module "node:path"` and `node:fs` usage in Blume's build-time content tooling). The generated `astro.config.mjs` now passes `prerenderEnvironment: "node"` to the Cloudflare adapter. On-demand pages still run in workerd at request time.
24
+ - d11a90c: Stop the `Prompt` component's copy button from shifting the layout. On copy, the button's label swapped "Copy prompt" → "Copied", and because the button was sized to its text, it shrank — giving the description beside it more room and reflowing it (a two-line description would collapse to one line, then jump back). Both labels now share a single grid cell, so the button is always sized to the wider "Copy prompt" and never resizes when the state changes.
25
+ - fcdc3b3: Match native browser controls, including scrollbars, to the active color theme.
26
+ - 3795fbb: Keep root navigation tabs active on descendant routes unless a more specific tab matches.
27
+ - e5aa042: Use the `rounded-blume` radius token instead of a hardcoded `rounded-full` on the `PageFeedback` and `Pagination` buttons so they respect the configured `theme.radius`.
28
+ - 32e29f0: Keep the text caret inside the search input on mobile. The search dialog was vertically centered, so when the on-screen keyboard opened and the viewport shrank, the dialog re-centered and the input moved up while the native caret stayed put — stranding the cursor below the input, over the results. The dialog is now top-anchored on small screens (like DocSearch/cmdk) so the input sits above where the keyboard appears and doesn't move, and its height is capped to the dynamic viewport so it fits above the keyboard. Desktop keeps its centered layout.
29
+ - 7806565: Resolve a section tab's link to its first page when the section has no index page, so the tab no longer 404s. A tab's `path` still scopes its sidebar section and matches the active tab, but the clickable target now falls back to the first page in the section (sidebar order) when nothing lives at the path itself — e.g. `/examples` with only `/examples/hello-world` links to that page instead of a missing `/examples`.
30
+ - fe21c54: Wrap markdown tables in a horizontal-scroll container so wide tables no longer overflow the prose column. The wrapper is framed with a rounded border and cell padding, and header labels stay on one line, so a clipped wide table reads as scrollable rather than cut off.
31
+
3
32
  ## 1.0.3
4
33
 
5
34
  ### Patch Changes