@brandon_m_behring/book-scaffold-astro 4.26.3 → 4.27.1

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 (49) hide show
  1. package/AGENTS.md +6 -0
  2. package/CLAUDE.md +35 -10
  3. package/LATEX_TO_MDX_MAPPING.md +1 -1
  4. package/LICENSE +27 -0
  5. package/LICENSE-CONTENT +19 -0
  6. package/README.md +33 -0
  7. package/components/AssessmentTest.astro +2 -1
  8. package/components/ChapterNav.astro +2 -2
  9. package/components/Cite.astro +2 -1
  10. package/components/NavContent.astro +2 -2
  11. package/components/PartReview.astro +2 -1
  12. package/components/Rationale.astro +3 -2
  13. package/components/Sidebar.astro +2 -1
  14. package/components/Term.astro +2 -1
  15. package/components/TipsCard.astro +2 -1
  16. package/components/VersionSelector.tsx +39 -36
  17. package/components/WeekRef.astro +2 -1
  18. package/components/XRef.astro +2 -1
  19. package/dist/components/VersionSelector.d.ts +16 -2
  20. package/dist/components/VersionSelector.mjs +18 -17
  21. package/dist/index.d.ts +24 -6
  22. package/dist/index.mjs +105 -5
  23. package/dist/schemas.d.ts +1 -1
  24. package/dist/schemas.mjs +8 -1
  25. package/dist/{types-CWXP1S4b.d.ts → types-CZrkqzpC.d.ts} +58 -26
  26. package/layouts/Base.astro +30 -19
  27. package/package.json +7 -4
  28. package/pages/answers.astro +2 -1
  29. package/pages/chapters.astro +2 -1
  30. package/pages/exercises.astro +2 -1
  31. package/pages/index.astro +4 -3
  32. package/pages/search.astro +2 -1
  33. package/pages/tips.astro +2 -1
  34. package/recipes/01-add-math.md +40 -28
  35. package/recipes/04-component-library.md +14 -4
  36. package/recipes/05-deploy-cloudflare.md +44 -0
  37. package/recipes/06-mobile-first-layout.md +25 -2
  38. package/recipes/09-validation.md +18 -9
  39. package/recipes/15-defining-styles.md +5 -2
  40. package/recipes/19-prevalidate-hook.md +29 -83
  41. package/scripts/build-bib.mjs +7 -3
  42. package/scripts/build-labels.mjs +33 -16
  43. package/scripts/read-env.mjs +25 -0
  44. package/scripts/resolve-book-config.mjs +96 -0
  45. package/scripts/validate.mjs +125 -84
  46. package/src/lib/define-style.ts +15 -6
  47. package/src/lib/nav-href.ts +24 -2
  48. package/styles/layout.css +14 -8
  49. package/styles/tokens.css +8 -10
package/styles/tokens.css CHANGED
@@ -85,19 +85,17 @@
85
85
  * Three-tier responsive measure tuned via Playwright comparison at
86
86
  * 375 / 1280 / 1440 / 1920px viewports (post_transformers commit d9d085b).
87
87
  *
88
- * The classic 65ch Tufte measure feels narrow on wide desktops (≥1440px)
89
- * where ~38% of the viewport sits as empty margin. The tiered approach
90
- * keeps 65ch where it's typographically right (laptop) and expands to
91
- * 80ch / 90ch on wider monitors without crossing the 90ch upper limit
92
- * of comfortable line length.
88
+ * The tiered measures leave room for the book-aware left sidebar and the
89
+ * Tufte right gutter at every desktop width. v4.26.0 tightened the older
90
+ * 65/80/90ch values after the responsive audit found horizontal overflow.
93
91
  *
94
92
  * Tier values + utilization (verified):
95
- * default (≤1440px): 65ch + 28ch → 70% at 1280px
96
- * 1440px tier: 80ch + 24ch → 69% (with sidebar: 89%)
97
- * 1920px tier: 90ch + 26ch → 57% (with sidebar: 72%)
93
+ * default: 60ch + 20ch
94
+ * 1440px tier: 66ch + 20ch
95
+ * 1920px tier: 78ch + 24ch
98
96
  *
99
- * Sidenote column shrinks slightly at wider tiers (24ch / 26ch) to give
100
- * main column more room while staying readable for short notes.
97
+ * These values keep `main + gutter layout-main` after subtracting the
98
+ * sidebar, while preserving readable line length and short-note width.
101
99
  *
102
100
  * Mobile (<48rem) handled separately in layout.css — sidenotes reflow
103
101
  * inline; the tokens here don't apply below 48rem.