@dogsbay/format-astro 0.2.0-beta.162 → 0.2.0-beta.164

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.
package/dist/serialize.js CHANGED
@@ -671,7 +671,9 @@ function headingToAstro(node, ctx) {
671
671
  ctx.lastHeading = level;
672
672
  // `id` takes precedence over `slug` (slug is auto-generated, id is explicit user override)
673
673
  const id = node.props?.id ?? node.props?.slug ?? "";
674
- const anchor = id
674
+ // No on an h1, as render-html: the page's title linking to the top of the page adds nothing
675
+ // (dogsbay-ssg's comparison, 2026-11-04: 380 Calico pages, 276 VitePress pages differed by it)
676
+ const anchor = id && level > 1
675
677
  ? `<a href="#${escapeAttr(id)}" class="ml-2 text-muted-foreground opacity-0 group-hover:opacity-100 no-underline" aria-hidden="true" tabindex="-1" data-pagefind-ignore>&para;</a>`
676
678
  : "";
677
679
  const idAttr = id ? ` id="${escapeAttr(id)}"` : "";
@@ -1711,8 +1713,11 @@ function cardIconHtml(icon, title, ctx) {
1711
1713
  * filled `default` style; `Button.astro` has no `primary`, so it rendered
1712
1714
  * with no fill at all.
1713
1715
  */
1716
+ /** Button.astro's variants: one it does not know got no colour classes at all. */
1717
+ const BUTTON_VARIANTS = new Set(["default", "destructive", "outline", "secondary", "ghost", "link"]);
1714
1718
  function buttonVariant(variant) {
1715
- return !variant || variant === "primary" ? "default" : variant;
1719
+ // An unknown one (Starlight's `minimal`) is the default button, as render-html draws it (2026-11-04)
1720
+ return variant && BUTTON_VARIANTS.has(variant) ? variant : "default";
1716
1721
  }
1717
1722
  function linkButtonToAstro(node, ctx) {
1718
1723
  ctx.imports.add("link-button");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogsbay/format-astro",
3
- "version": "0.2.0-beta.162",
3
+ "version": "0.2.0-beta.164",
4
4
  "description": "Astro format plugin for Dogsbay — export TreeNode[] to Astro component markup",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,13 +32,13 @@
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
34
  "markdown-it": "^14.3.0",
35
- "@dogsbay/format-dogsbay-md": "0.2.0-beta.162",
36
- "@dogsbay/render-html": "0.2.0-beta.162",
37
- "@dogsbay/icons": "0.2.0-beta.162",
38
- "@dogsbay/serialize-core": "0.2.0-beta.162",
39
- "@dogsbay/site-files": "0.2.0-beta.162",
40
- "@dogsbay/types": "0.2.0-beta.162",
41
- "@dogsbay/ui": "0.2.0-beta.162"
35
+ "@dogsbay/format-dogsbay-md": "0.2.0-beta.164",
36
+ "@dogsbay/render-html": "0.2.0-beta.164",
37
+ "@dogsbay/icons": "0.2.0-beta.164",
38
+ "@dogsbay/site-files": "0.2.0-beta.164",
39
+ "@dogsbay/serialize-core": "0.2.0-beta.164",
40
+ "@dogsbay/types": "0.2.0-beta.164",
41
+ "@dogsbay/ui": "0.2.0-beta.164"
42
42
  },
43
43
  "repository": {
44
44
  "type": "git",