@brandon_m_behring/book-scaffold-astro 3.0.0-alpha.7 → 3.0.0-alpha.8

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/index.mjs CHANGED
@@ -173,6 +173,9 @@ function bookScaffoldIntegration(opts) {
173
173
  for (const sheet of styles) {
174
174
  injectScript("page-ssr", `import '${PACKAGE_NAME}/styles/${sheet}';`);
175
175
  }
176
+ if (profile === "academic") {
177
+ injectScript("page-ssr", "import 'katex/dist/katex.min.css';");
178
+ }
176
179
  const routes = profile === "tools" ? [...DEFAULT_ROUTES_ALL, ...DEFAULT_ROUTES_TOOLS] : [...DEFAULT_ROUTES_ALL];
177
180
  for (const route of routes) {
178
181
  injectRoute({
@@ -31,12 +31,9 @@
31
31
  */
32
32
  import '@fontsource-variable/roboto';
33
33
  import '@fontsource-variable/source-code-pro';
34
- // KaTeX stylesheet is always loaded (~60 KB) so that academic-profile
35
- // books render math without additional setup. Minimal/tools profiles
36
- // receive the CSS but have no math elements to style harmless.
37
- // rehype-katex (the JS pipeline) is profile-gated in astro.config.mjs;
38
- // only the academic profile produces katex-classed DOM nodes at build.
39
- import 'katex/dist/katex.min.css';
34
+ // KaTeX CSS is injected by bookScaffoldIntegration for academic profile
35
+ // only (since v3.0 alpha.8) tools/minimal profiles don't install katex
36
+ // as a peer dep, so the import would fail at the consumer's build.
40
37
  import '../styles/tokens.css';
41
38
  import '../styles/typography.css';
42
39
  import '../styles/layout.css';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@brandon_m_behring/book-scaffold-astro",
3
3
  "description": "Astro 6 + MDX toolkit for long-form technical books. Profile-aware (academic / tools / minimal); ships Tufte typography, KaTeX, BibTeX citations, Pagefind, Cloudflare Workers deploy. See PACKAGE_DESIGN.md for the API contract.",
4
- "version": "3.0.0-alpha.7",
4
+ "version": "3.0.0-alpha.8",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Brandon Behring",