blume 0.8.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CHANGELOG.md +49 -1
  2. package/dist/cli/index.js +373 -28
  3. package/dist/cli/index.js.map +51 -50
  4. package/dist/types/core/config-input.d.ts +11 -0
  5. package/dist/types/core/data.d.ts +5 -0
  6. package/dist/types/core/i18n-ui.d.ts +50 -0
  7. package/dist/types/core/schema.d.ts +77 -1
  8. package/dist/types/seo/x-handle.d.ts +12 -0
  9. package/docs/advanced/api-reference.mdx +1 -1
  10. package/docs/advanced/changelog.mdx +1 -1
  11. package/docs/configuration/export.mdx +1 -1
  12. package/docs/configuration/seo.mdx +33 -3
  13. package/docs/content/components.mdx +1 -1
  14. package/docs/content/syntax.mdx +2 -2
  15. package/docs/index.mdx +1 -1
  16. package/docs/reference/cli.mdx +1 -1
  17. package/docs/reference/frontmatter.mdx +1 -1
  18. package/package.json +9 -1
  19. package/src/ai/mcp/tools.ts +1 -1
  20. package/src/astro/generate.ts +1 -0
  21. package/src/astro/templates.ts +51 -7
  22. package/src/cli/commands/build.ts +25 -8
  23. package/src/cli/internal-error.ts +9 -4
  24. package/src/cli/prepare.ts +3 -2
  25. package/src/components/Icon.astro +2 -1
  26. package/src/components/islands/ask-ai.tsx +30 -5
  27. package/src/components/layout/Breadcrumbs.astro +11 -2
  28. package/src/components/layout/NavTree.astro +2 -2
  29. package/src/components/layout/PageLayout.astro +40 -1
  30. package/src/components/layout/Pagination.astro +10 -4
  31. package/src/components/layout/ReferenceLayout.astro +12 -1
  32. package/src/components/layout/RootLayout.astro +75 -3
  33. package/src/components/layout/Search.astro +23 -5
  34. package/src/core/config-input.ts +11 -0
  35. package/src/core/data.ts +2 -0
  36. package/src/core/frontmatter.ts +7 -0
  37. package/src/core/i18n-ui.ts +9 -0
  38. package/src/core/i18n.ts +16 -8
  39. package/src/core/schema.ts +35 -0
  40. package/src/core/ui-packs/ar.ts +7 -0
  41. package/src/core/ui-packs/bg.ts +7 -0
  42. package/src/core/ui-packs/bn.ts +7 -0
  43. package/src/core/ui-packs/ca.ts +7 -0
  44. package/src/core/ui-packs/cs.ts +7 -0
  45. package/src/core/ui-packs/da.ts +7 -0
  46. package/src/core/ui-packs/de.ts +7 -0
  47. package/src/core/ui-packs/el.ts +7 -0
  48. package/src/core/ui-packs/es.ts +7 -0
  49. package/src/core/ui-packs/fa.ts +7 -0
  50. package/src/core/ui-packs/fi.ts +7 -0
  51. package/src/core/ui-packs/fr.ts +7 -0
  52. package/src/core/ui-packs/he.ts +7 -0
  53. package/src/core/ui-packs/hi.ts +7 -0
  54. package/src/core/ui-packs/hr.ts +7 -0
  55. package/src/core/ui-packs/hu.ts +7 -0
  56. package/src/core/ui-packs/id.ts +7 -0
  57. package/src/core/ui-packs/it.ts +7 -0
  58. package/src/core/ui-packs/ja.ts +7 -0
  59. package/src/core/ui-packs/ko.ts +7 -0
  60. package/src/core/ui-packs/nl.ts +7 -0
  61. package/src/core/ui-packs/no.ts +7 -0
  62. package/src/core/ui-packs/pl.ts +7 -0
  63. package/src/core/ui-packs/pt-br.ts +7 -0
  64. package/src/core/ui-packs/pt.ts +7 -0
  65. package/src/core/ui-packs/ro.ts +7 -0
  66. package/src/core/ui-packs/ru.ts +7 -0
  67. package/src/core/ui-packs/sk.ts +7 -0
  68. package/src/core/ui-packs/sr.ts +7 -0
  69. package/src/core/ui-packs/sv.ts +7 -0
  70. package/src/core/ui-packs/th.ts +7 -0
  71. package/src/core/ui-packs/tr.ts +7 -0
  72. package/src/core/ui-packs/uk.ts +7 -0
  73. package/src/core/ui-packs/vi.ts +7 -0
  74. package/src/core/ui-packs/zh-tw.ts +7 -0
  75. package/src/core/ui-packs/zh.ts +7 -0
  76. package/src/og/card.ts +4 -2
  77. package/src/og/dimensions.ts +12 -0
  78. package/src/openapi/render-mdx.ts +62 -1
  79. package/src/seo/jsonld.ts +7 -1
  80. package/src/seo/x-handle.ts +18 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # blume
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 7372fe8: Blume v1.
8
+
9
+ ### Patch Changes
10
+
11
+ - e922ff5: Stop "Clear conversation" from resurrecting an orphaned answer bubble while a reply is still streaming. Clearing mid-answer emptied the panel, but the in-flight stream kept re-appending its assistant message to the cleared conversation — a growing answer with no question above it. Clearing now aborts the in-flight request and revokes the stream's right to write into the conversation, and asking a new question right after a clear works as before.
12
+ - e922ff5: Match locale folders and dot suffixes case-insensitively, the way BCP 47 codes are defined. A configured `pt-BR` with the conventional lowercase `pt-br/` folder (or an `intro.pt-br.mdx` suffix under the `dot` parser) previously fell through as default-locale content at a literal `/pt-br/…` route — and the unconfigured-locale warning, which already compared case-insensitively, stayed silent about it. Those files now route as the configured locale, with the configured casing in routes and labels.
13
+ - e922ff5: The generated changelog index's heading, page title, and meta description now come from the translatable `changelog.title` and `changelog.description` UI strings (translated in every built-in pack), joining the reveal button the template already localized. Previously the page rendered a hardcoded English "Changelog" heading, an English " changelog" title suffix, and an English description even on non-English default locales.
14
+ - 1e5446f: Lengthen the default changelog description. "Product updates and release notes." is 34 characters — under the 50-character floor search engines want from a meta description, and the generated `/changelog` page uses it for both its meta tag and its on-page subtitle. It now reads "Product updates, new features, and fixes from every release." Sites that set `ui.changelog.description` are unaffected.
15
+ - e922ff5: The syntax docs now label callouts and `package-install` blocks as MDX-only, matching the existing notes on diagrams and math. Previously a reader following the page could write `:::note` or a `package-install` fence in a `.md` file and get literal text or a plain code fence with no hint why.
16
+ - e922ff5: Apply the js-yaml 4-safe YAML engine to `matter.read` as well. The front-matter wrapper previously exposed gray-matter's own `read` helper unwrapped, so reading a file through it would parse with the removed `safeLoad` default and crash with "Function yaml.safeLoad is removed in js-yaml 4" — the exact failure the wrapper exists to prevent for `matter()` and `matter.stringify()`.
17
+ - 68520af: Exclude Vite's pre-bundled dep cache (`node_modules/.vite/`) from @vitejs/plugin-react. Astro's react() replaces the plugin's default `node_modules` exclude, so Babel (carrying the React Compiler) was re-parsing every 500KB+ optimized dep chunk in dev — the source of the "[BABEL] Note: The code generator has deoptimised the styling" messages. Blume's own components stay covered by the compiler.
18
+ - e922ff5: Serve image-path icons from under `deployment.base`. `<Icon>` emitted an image icon's path (`/brand/mark.png`) as-is, so on a site deployed under a base path the request went to the domain root and 404'd while `<Card img>`, the logo, and every other image emitter were correctly rebased. Image icons now get the same `withBase` treatment; external URLs, data URIs, and relative paths are untouched.
19
+ - e922ff5: `@astrojs/vue` and `@astrojs/svelte` are now declared as optional peer dependencies, matching `@astrojs/netlify` and `@astrojs/cloudflare`. Projects using Vue or Svelte islands must install the matching integration themselves, and package managers now surface and satisfy that requirement instead of the build relying on an undeclared package.
20
+ - e922ff5: `blume build --isolated` now reports the build's actual output directory on success. A `server` output build with the Vercel adapter lands its deploy bundle at `.blume-verify/.vercel/output` (it is never surfaced to the project root), but the message previously pointed at `.blume-verify/dist`, which that build never populates.
21
+ - e922ff5: The breadcrumb and pagination `<nav>` landmark labels are now translatable via the new `nav.breadcrumb` and `page.pagination` UI strings, with translations in every built-in language pack. Previously both were hardcoded English ("Breadcrumb", "Pagination") while the sibling chrome landmarks were dictionary-driven, so screen readers announced English landmark names on localized sites.
22
+ - e922ff5: Fix `ai.markdownComponents` crashing config validation in projects that resolve Zod 4. The schema used the single-argument `z.record(...)` form, which Zod 4 rejects at schema-construction time, so any config parse failed before your settings were even read; it now uses the dual-compatible two-argument form.
23
+ - e922ff5: The MCP `get_page` tool's description — shipped user-facing in `tools/list` and the server card — no longer claims to return a page's original Markdown source. The tool serves the agent variant (components downleveled to plain Markdown, `<Visibility>` resolved for agents), and the description now says so.
24
+ - e922ff5: The sidebar's panel-stack back arrow and drill-in chevrons now mirror under RTL locales (`rtl:-scale-x-100`), matching the pagination arrows and the panel slide animation, which already flipped direction. Previously the arrows pointed against the reading direction on RTL sites.
25
+ - d9590fc: Emit a complete Open Graph card in the page head, so crawlers and social validators stop flagging the metadata as incomplete:
26
+
27
+ - `og:url` — the page's canonical URL (rendered only when `deployment.site` is set, or a page overrides `seo.canonical`).
28
+ - `og:type` — `article` on blog posts and changelog entries, `website` everywhere else. Article pages also emit `article:published_time` and `article:modified_time`.
29
+ - `og:site_name` — the site `title`.
30
+ - `og:image:width`, `og:image:height`, `og:image:type`, and `og:image:alt` on Blume's generated OG card, so a crawler can lay it out without fetching the image. An `seo.image` you supply yourself declares none of these, since its dimensions and format are unknown.
31
+
32
+ - 1e5446f: Give every generated OpenAPI page its own meta description. Operation and overview pages set no `description`, so all of them fell back to the site-wide default — a spec with twenty operations shipped twenty pages carrying one identical description, which search engines treat as duplicate content. Each operation page now derives a description from the spec's own prose (its description, or its summary) followed by the endpoint it documents, and the overview page uses the spec description. These land in `seo.description`, so they feed the meta tag without also printing as a visible subtitle above the body prose.
33
+ - 80eb252: Emit X (Twitter) card tags, and add `seo.x` for account attribution:
34
+
35
+ ```ts
36
+ seo: {
37
+ x: { handle: "@acme", creator: "@jane" },
38
+ }
39
+ ```
40
+
41
+ `handle` becomes `twitter:site` and `creator` becomes `twitter:creator` — the one piece of X card metadata with no Open Graph equivalent to fall back to. A page can credit its own author with `seo.x.creator` frontmatter, which is what a guest post wants. The `@` is optional in both places.
42
+
43
+ Every page also now emits `twitter:card`, `twitter:title`, `twitter:description`, and `twitter:image:alt` on the generated card. `twitter:card` previously rendered only when a page had an image; a page without one now gets the compact `summary` card instead of sharing as a bare link.
44
+
45
+ - e922ff5: The Scalar API reference shell now sets `<html lang>` and `dir` from the default locale, mirroring the changelog index's locale wiring, and renders the same localized skip-to-content link as the other layouts. Previously it hardcoded `lang="en"` with no `dir` — so RTL default locales rendered LTR chrome — and offered keyboard users no way to skip past the navbar.
46
+ - e922ff5: The search dialog's section-filter "All" pill is now translatable via the new `search.all` UI string, with translations in every built-in language pack. Previously it rendered hardcoded English inside an otherwise fully localized dialog.
47
+ - e922ff5: ⌘K / Ctrl+K now toggles the search dialog: pressing it while the dialog is open closes it, matching how ⌘I toggles the Ask AI panel. Previously the shortcut unconditionally re-opened, calling `showModal()` on an already-open dialog — a silent no-op on evergreen browsers but an `InvalidStateError` on older engines. The `/` shortcut stays open-only, and `open()` itself now guards against an already-open dialog.
48
+ - e922ff5: Reject a `toc` config whose `minHeadingLevel` exceeds its `maxHeadingLevel`. An inverted range (including an explicit min above the default max of 3) previously validated fine and silently rendered an empty table of contents on every page; it now fails config validation with a clear message.
49
+ - e922ff5: Internal-error stack traces now relativize `.blume/` runtime frames on Windows too. The remap previously matched only POSIX absolute paths, so drive-letter frames like `C:\...\.blume\...` printed the full machine path instead of the project-relative `.blume\...` form tagged `(generated)`.
50
+
3
51
  ## 0.8.0
4
52
 
5
53
  ### Minor Changes
@@ -84,7 +132,7 @@
84
132
  - 21aa451: `blume init --eject` now rewrites the scaffolded package.json scripts to run Astro directly after a successful eject (matching `blume eject`), and its next-steps output includes the `cd <dir>` hint and package-manager-appropriate commands. When eject can't run yet because dependencies aren't installed, the fallback explains that and points at `npx blume eject --yes` (or the pnpm/yarn/bun equivalent) instead of a bare `blume eject` that isn't on PATH.
85
133
  - 559024b: Inline code with an unknown highlight language (for example a typo'd `` `foo(){:typescrpt}` ``) now strips the `{:lang}` marker and renders as plain inline code instead of shipping the literal marker in the page.
86
134
  - 639c802: The Search input and Ask AI textarea now render at 16px on touch devices (`pointer-coarse:text-base`), so iOS Safari no longer auto-zooms the page when they receive focus; fine-pointer devices keep the 14px size.
87
- - 7cda9bf: `blume build --isolated` now honours `--analyze`, `--budget-js`, and `--budget-css`, measuring the isolated build's own output. Previously the isolated path skipped the bundle report and budget gate entirely, so a CI run like `blume build --isolated --budget-js 100` exited 0 without measuring anything — a silent false pass.
135
+ - 7cda9bf: `blume build --isolated` now honors `--analyze`, `--budget-js`, and `--budget-css`, measuring the isolated build's own output. Previously the isolated path skipped the bundle report and budget gate entirely, so a CI run like `blume build --isolated --budget-js 100` exited 0 without measuring anything — a silent false pass.
88
136
  - 21aa451: Broken-link and broken-anchor diagnostics now point at the correct line of the source file. Line numbers were counted on the frontmatter-stripped body, so a link below a frontmatter block was reported several lines above where it actually sits (e.g. line 2 instead of line 6 after a 4-line block).
89
137
  - 559024b: llms.txt, llms-full.txt, and agent-readability.json now layer `deployment.base` onto their root-relative URLs when no `site` is configured, so advertised links like `/llms.txt` and page routes resolve under a subpath deployment instead of 404ing.
90
138
  - 759b148: Exclude hidden and `noindex` pages from `llms.txt`/`llms-full.txt` (matching the sitemap) and percent-encode the emitted page URLs.