blume 1.6.0 → 1.6.2

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 (97) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cli/index.js +1318 -270
  3. package/dist/cli/index.js.map +68 -61
  4. package/dist/types/core/config-input.d.ts +9 -0
  5. package/dist/types/core/data.d.ts +12 -1
  6. package/dist/types/core/i18n-ui.d.ts +4 -0
  7. package/dist/types/core/schema.d.ts +7 -0
  8. package/dist/types/core/types.d.ts +6 -0
  9. package/dist/types/openapi/references.d.ts +5 -0
  10. package/docs/07-faq.mdx +9 -9
  11. package/docs/advanced/api-reference.mdx +10 -1
  12. package/docs/advanced/custom-pages.mdx +3 -1
  13. package/docs/advanced/graphql.mdx +1 -1
  14. package/docs/configuration/ai.mdx +76 -7
  15. package/docs/configuration/seo.mdx +3 -3
  16. package/docs/configuration/theming.mdx +6 -0
  17. package/docs/content/components.mdx +8 -1
  18. package/docs/index.mdx +2 -2
  19. package/package.json +53 -53
  20. package/skills/blume/SKILL.md +2 -2
  21. package/src/ai/agent-readability.ts +60 -17
  22. package/src/ai/api/handlers.ts +273 -0
  23. package/src/ai/api/paths.ts +14 -0
  24. package/src/ai/api/problem.ts +63 -0
  25. package/src/ai/api/spec.ts +681 -0
  26. package/src/ai/api-catalog.ts +11 -1
  27. package/src/ai/link-headers.ts +12 -3
  28. package/src/ai/llms.ts +9 -2
  29. package/src/ai/mcp/query.ts +390 -0
  30. package/src/ai/mcp/server.ts +32 -352
  31. package/src/astro/examples.ts +29 -2
  32. package/src/astro/generate.ts +256 -64
  33. package/src/astro/index.ts +7 -0
  34. package/src/astro/markdown-negotiation.ts +1 -1
  35. package/src/astro/runtime-modules.ts +196 -0
  36. package/src/astro/templates.ts +398 -38
  37. package/src/cli/commands/build.ts +9 -1
  38. package/src/cli/commands/dev.ts +6 -3
  39. package/src/cli/host-args.ts +18 -0
  40. package/src/cli/index.ts +2 -1
  41. package/src/components/copy-feedback.ts +93 -9
  42. package/src/components/islands/ask-ai.tsx +4 -1
  43. package/src/components/islands/hooks.ts +3 -1
  44. package/src/components/layout/PageActions.astro +25 -14
  45. package/src/core/config-input.ts +9 -0
  46. package/src/core/data.ts +17 -2
  47. package/src/core/define-components.ts +2 -0
  48. package/src/core/i18n-ui.ts +3 -0
  49. package/src/core/includes.ts +2 -1
  50. package/src/core/manifest.ts +10 -0
  51. package/src/core/schema.ts +20 -5
  52. package/src/core/types.ts +6 -0
  53. package/src/core/ui-packs/ar.ts +1 -0
  54. package/src/core/ui-packs/bg.ts +1 -0
  55. package/src/core/ui-packs/bn.ts +1 -0
  56. package/src/core/ui-packs/ca.ts +1 -0
  57. package/src/core/ui-packs/cs.ts +1 -0
  58. package/src/core/ui-packs/da.ts +1 -0
  59. package/src/core/ui-packs/de.ts +1 -0
  60. package/src/core/ui-packs/el.ts +1 -0
  61. package/src/core/ui-packs/es.ts +1 -0
  62. package/src/core/ui-packs/fa.ts +1 -0
  63. package/src/core/ui-packs/fi.ts +1 -0
  64. package/src/core/ui-packs/fr.ts +1 -0
  65. package/src/core/ui-packs/he.ts +1 -0
  66. package/src/core/ui-packs/hi.ts +1 -0
  67. package/src/core/ui-packs/hr.ts +1 -0
  68. package/src/core/ui-packs/hu.ts +1 -0
  69. package/src/core/ui-packs/id.ts +1 -0
  70. package/src/core/ui-packs/it.ts +1 -0
  71. package/src/core/ui-packs/ja.ts +1 -0
  72. package/src/core/ui-packs/ko.ts +1 -0
  73. package/src/core/ui-packs/nl.ts +1 -0
  74. package/src/core/ui-packs/no.ts +1 -0
  75. package/src/core/ui-packs/pl.ts +1 -0
  76. package/src/core/ui-packs/pt-br.ts +1 -0
  77. package/src/core/ui-packs/pt.ts +1 -0
  78. package/src/core/ui-packs/ro.ts +1 -0
  79. package/src/core/ui-packs/ru.ts +1 -0
  80. package/src/core/ui-packs/sk.ts +1 -0
  81. package/src/core/ui-packs/sr.ts +1 -0
  82. package/src/core/ui-packs/sv.ts +1 -0
  83. package/src/core/ui-packs/th.ts +1 -0
  84. package/src/core/ui-packs/tr.ts +1 -0
  85. package/src/core/ui-packs/uk.ts +1 -0
  86. package/src/core/ui-packs/vi.ts +1 -0
  87. package/src/core/ui-packs/zh-tw.ts +1 -0
  88. package/src/core/ui-packs/zh.ts +1 -0
  89. package/src/core/version-cut.ts +5 -3
  90. package/src/deploy/vercel-negotiation.ts +97 -6
  91. package/src/og/card.ts +1 -1
  92. package/src/openapi/references.ts +8 -0
  93. package/src/openapi/render-mdx.ts +18 -4
  94. package/src/openapi/scalar.ts +0 -4
  95. package/src/registry/eject.ts +36 -17
  96. package/src/theme/entry.ts +2 -2
  97. package/src/theme/sources.ts +49 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # blume
2
2
 
3
+ ## 1.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - abd8daf: Every site now serves a read-only **JSON docs API** — the REST twin of the MCP tools, over the same page snapshot — described by an OpenAPI 3.1 document at `/openapi.json`. `/api/docs/pages.json` lists every page with its route, title, description, content type, locale, facets, and the URLs of its rendered, Markdown, and JSON forms; `/api/docs/pages/{route}.json` returns one page as JSON with its agent Markdown; `/api/docs/navigation.json` returns the navigation tree. All three are prerendered, so static sites serve them as files. Under server output, `/api/docs/search?q=` runs the same full-text search as the MCP `search_docs` tool, with the same `limit`, `contentTypes`, `locale`, `version`, and `filters[key]` scoping, and any `/api/…` URL no endpoint answers gets a 404 problem document instead of the HTML page. Errors everywhere are RFC 9457 problem details (`application/problem+json`) with a stable `code`, a `detail`, and a `resolution` hint. The OpenAPI document is generated per build from config — one `operationId`, typed parameters, and response schemas per operation — and also documents the `.md` mirrors, `llms.txt`, `llms-full.txt`, `agent-readability.json`, and the MCP endpoint, so function-calling frameworks that ingest OpenAPI get the same reach an MCP client has. It's linked from the RFC 9727 API catalog, `agent-readability.json`, `llms.txt`, and the homepage `Link` header as `rel="service-desc"`. The default 404 page gains a JSON twin at `/404.json` alongside its Markdown one, wired into Vercel server builds for requests that send `Accept: application/json` or ask for a `.json` URL no file backs. Set `ai.api: false` to publish none of it; a `public/openapi.json` you ship yourself takes over that route.
8
+
9
+ ## 1.6.1
10
+
11
+ ### Patch Changes
12
+
13
+ - e6fc45f: Every copy affordance (Copy as Markdown, code blocks, MCP commands, prompts, color swatches, API panels) now falls back to the legacy `copy` command when the Clipboard API is unavailable or denied — in-app browsers, WebViews, insecure origins, and after a denied permission prompt — instead of doing nothing. When nothing lands on the clipboard even then, the Copy as Markdown and MCP actions flash a localized **Copy failed** label (new `actions.copyFailed` UI string, translated in every shipped pack) rather than showing no feedback at all; the other copy buttons still show no confirmation.
14
+ - 743b36b: Copy as Markdown now works in Safari and Firefox. The action fetches the page's Markdown on click, and the clipboard write used to be issued only after that fetch resolved — outside the click's user activation, which those browsers require for a clipboard write — so it failed on every click. The write is now issued inside the click with the Markdown still loading (a promised `ClipboardItem`), and browsers without that API keep the previous fetch-then-write path.
15
+ - 316df45: The default 404 page now has a Markdown twin at `/404.md` — the not-found message plus the same recovery links as the HTML page (every top-level section, the sitemap, and `llms.txt`), absolute once `deployment.site` is set. On a Vercel server build, a request for a missing page that sends `Accept: text/markdown`, or asks for a `.md`/`.mdx` URL no page backs, gets that Markdown body with the `404` status instead of the HTML shell, so agents recover from a stale URL without parsing page chrome. Both variants are skipped together when a project owns `/404` with its own `pages/404.astro` or a `404.md` content page.
16
+ - ccc3ac1: Scan an `examples.source` directory that lives outside the project root for Tailwind utilities in `<Component />` preview frames, and resolve relative `@source` paths in `theme.css` and `examples.css` from the file that declares them. A monorepo can now point Blume at sibling workspace packages without knowing the generated runtime's directory layout.
17
+ - 1df9208: Generated OG cards now show the page's own description as the subtitle (its `seo.description`, else `description`), matching the page's `og:description`, and fall back to the site-wide `seo.og.description` only for pages without one. `seo.og.description: false` still hides the subtitle on every card.
18
+ - db10b26: Keep Astro's and Vite's caches inside the hidden `.blume` runtime instead of under its `node_modules`, which is a junction into Blume's package directory. Two projects that resolve the same Blume install (a monorepo building docs and a sandbox in parallel) previously shared one content data store, so pages of whichever build lost the race rendered as 404s.
19
+ - 872caf4: Add a per-source `seoDescriptionSuffix` option to the `openapi`, `asyncapi`, and `graphql` reference blocks. Generated operation pages derive their meta description from the operation's own prose followed by a generated English sentence ("Reference for the `GET /pets` endpoint in the Petstore API."), which kept every page distinct but left non-English sites with half-translated metadata that no amount of authored prose could fix. Set `seoDescriptionSuffix: false` on a source to describe its pages with the spec's `description` (or `summary`) alone; an operation with neither falls back to its language-neutral title (`GET /pets`, the channel and action, or the GraphQL field or type name), so no page ships an empty description. The default is unchanged.
20
+ - 7869217: Serve the runtime's data snapshots from memory instead of `.blume/src/generated/*.json`. The page data behind `blume:data`, the parsed API specs, the static search index, the raw-Markdown and content-asset maps, the MCP and Ask corpora, and the rendered RSS feeds are now published into an in-process registry by the generator and served to Vite as virtual modules, so a content edit in `blume dev` invalidates exactly the modules whose data changed and reloads the browser — no JSON write, no file-watcher round trip, and nothing half-written for the dev server to observe. `blume eject` is unchanged: the ejected project keeps the JSON files and aliases each module to them.
21
+ - ac4e501: Update dependencies: Astro 7.3, `@astrojs/mdx` 8 with `@astrojs/markdown-satteri` 0.4 (MDX now compiles through the Sätteri processor Blume already configures), takumi 2.13, citty 0.2, zod 4.5, and the latest patch releases of the remaining runtime dependencies. A bare `--host` before another flag (`blume dev --host --open`) still binds all interfaces under citty's new argument parser.
22
+ - 743b36b: `blume version <id>` now preserves the line endings of a CRLF `blume.config.ts` when it inserts the new entry into `versions.archived`, instead of introducing a lone LF ahead of the entry.
23
+
3
24
  ## 1.6.0
4
25
 
5
26
  ### Minor Changes