@entropicwarrior/sdoc 0.1.7 → 0.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/sdoc.js +7 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@entropicwarrior/sdoc",
3
3
  "displayName": "SDOC",
4
4
  "description": "A plain-text documentation format with explicit brace scoping — deterministic parsing, AI-agent efficiency, and 10-50x token savings vs Markdown.",
5
- "version": "0.1.7",
5
+ "version": "0.1.8",
6
6
  "publisher": "entropicwarrior",
7
7
  "license": "MIT",
8
8
  "repository": {
package/src/sdoc.js CHANGED
@@ -1876,7 +1876,13 @@ const DEFAULT_STYLE = `
1876
1876
  padding-left: 1.2rem;
1877
1877
  }
1878
1878
 
1879
+ `;
1880
+
1881
+ const PRINT_STYLE = `
1879
1882
  @media print {
1883
+ html {
1884
+ font-size: 80%;
1885
+ }
1880
1886
  body {
1881
1887
  height: auto;
1882
1888
  overflow: visible;
@@ -1942,7 +1948,7 @@ function renderHtmlDocumentFromParsed(parsed, title, options = {}) {
1942
1948
  const footerContent = [footerHtml, companyHtml].filter(Boolean).join("\n");
1943
1949
 
1944
1950
  const cssBase = options.cssOverride ?? DEFAULT_STYLE;
1945
- const cssAppend = options.cssAppend ? `\n${options.cssAppend}` : "";
1951
+ const cssAppend = options.cssAppend ? `\n${options.cssAppend}\n${PRINT_STYLE}` : `\n${PRINT_STYLE}`;
1946
1952
  const scriptTag = options.script ? `\n<script>${options.script}</script>` : "";
1947
1953
  const mermaidScript = hasMermaidBlocks(parsed.nodes)
1948
1954
  ? `\n<script src="${MERMAID_CDN}"></script>\n<script>mermaid.initialize({startOnLoad:true,theme:"neutral",themeCSS:".node rect, .node polygon, .node circle { rx: 4; ry: 4; }"});</script>`