@ai-matrx/print 0.12.10 → 0.12.12
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/CHANGELOG.md +12 -0
- package/dist/markdown.cjs +28 -0
- package/dist/markdown.cjs.map +1 -1
- package/dist/markdown.d.cts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.js +28 -0
- package/dist/markdown.js.map +1 -1
- package/package.json +2 -2
package/dist/markdown.d.cts
CHANGED
|
@@ -47,7 +47,7 @@ declare const MARKDOWN_ARTICLE_CSS = "*,*::before,*::after{box-sizing:border-box
|
|
|
47
47
|
* padding — the same idea the chat preview draws; on paper a zero-height
|
|
48
48
|
* element that forces the next content onto a new page.
|
|
49
49
|
*/
|
|
50
|
-
declare const MARKDOWN_SHARED_CSS = "\n.matrx-page-break {\n position: relative;\n clear: both;\n height: 0;\n margin: 2.75rem 0;\n border: 0;\n border-top: 2px dashed var(--matrx-print-border-muted, #d1d5db);\n}\n.matrx-page-break::after {\n content: attr(data-label);\n position: absolute;\n left: 50%;\n top: 0;\n transform: translate(-50%, -50%);\n padding: 0 0.75rem;\n background: var(--matrx-print-bg, #ffffff);\n color: var(--matrx-print-fg-subtle, #6b7280);\n font: 600 10px/1.6 -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n white-space: nowrap;\n}\n/* GFM footnotes: numbered superscript references, notes gathered at the end. */\n.print-footnote-ref {\n font-size: 0.75em;\n line-height: 0;\n vertical-align: super;\n}\n.print-footnote-ref a {\n text-decoration: none;\n}\n.print-footnotes {\n margin-top: 2em;\n font-size: 0.9em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n page-break-inside: avoid;\n}\n.print-footnotes hr {\n width: 33%;\n margin: 0 0 0.75em;\n border: 0;\n border-top: 1px solid var(--matrx-print-border-muted, #d1d5db);\n}\n.print-footnotes ol {\n margin: 0;\n padding-left: 1.6em;\n}\n.print-footnotes li p {\n margin: 0 0 0.35em;\n}\n\n.matrx-artifact {\n margin: 1.25em 0;\n border: 1px solid var(--matrx-print-border, #e5e7eb);\n border-radius: 8px;\n overflow: hidden;\n}\n.matrx-artifact-header {\n display: flex;\n align-items: baseline;\n gap: 0.6em;\n padding: 0.45em 0.9em;\n background: var(--matrx-print-surface, #f8fafc);\n border-bottom: 1px solid var(--matrx-print-border, #e5e7eb);\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n}\n.matrx-artifact-kind {\n font-size: 0.72em;\n font-weight: 700;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--matrx-print-accent, #2563eb);\n}\n.matrx-artifact-title {\n font-weight: 600;\n color: var(--matrx-print-fg, #1a1a1a);\n}\n.matrx-artifact-body {\n padding: 0.8em 0.9em;\n}\n.matrx-artifact-body > :first-child {\n margin-top: 0;\n}\n.matrx-artifact-body > :last-child {\n margin-bottom: 0;\n}\n/* The panel's kind chip already names these languages. */\n.matrx-artifact:is([data-artifact-type=\"html\"], [data-artifact-type=\"react\"], [data-artifact-type=\"svg\"], [data-artifact-type=\"mermaid\"], [data-artifact-type=\"diff\"], [data-artifact-type=\"iframe\"]) .code-lang {\n display: none;\n}\n.matrx-artifact-empty {\n margin: 0;\n font-style: italic;\n color: var(--matrx-print-fg-subtle, #6b7280);\n}\n\nli.matrx-task-item {\n list-style: none;\n}\n/* The box IS the marker \u2014 the document skin's custom bullet must not sit on it. */\n:is(.matrx-content-container, .content) li.matrx-task-item::before {\n content: none;\n}\n.matrx-task-box {\n position: relative;\n display: inline-block;\n width: 0.9em;\n height: 0.9em;\n margin: 0 0.5em 0 -1.35em;\n border: 1.5px solid var(--matrx-print-fg-muted, #4a4a4a);\n border-radius: 3px;\n vertical-align: -0.1em;\n}\n.matrx-task-box.is-checked::after {\n content: \"\\2713\";\n position: absolute;\n inset: 0;\n font-size: 0.8em;\n font-weight: 700;\n line-height: 1.1em;\n text-align: center;\n color: var(--matrx-print-fg, #1a1a1a);\n}\n\n:is(.matrx-content-container, .content) del {\n color: var(--matrx-print-fg-muted, #4a4a4a);\n text-decoration: line-through;\n}\n:is(.matrx-content-container, .content) hr.matrx-hr-accent {\n height: 2px;\n margin: 1.75em 0;\n border: 0;\n border-radius: 2px;\n background: var(--matrx-print-accent, #2563eb);\n opacity: 0.6;\n}\n:is(.matrx-content-container, .content) hr.matrx-hr-heavy {\n height: 4px;\n margin: 2.25em 0;\n border: 0;\n border-radius: 4px;\n background: var(--matrx-print-accent, #2563eb);\n}\n\n.matrx-flashcards-print {\n margin: 1em 0 1.2em;\n}\n.matrx-fc {\n display: grid;\n grid-template-columns: 1fr 1fr;\n margin-bottom: 0.5em;\n border: 1px solid var(--matrx-print-border, #e5e7eb);\n border-radius: 6px;\n}\n.matrx-fc-front,\n.matrx-fc-back {\n padding: 0.6em 0.8em;\n}\n.matrx-fc-front {\n font-weight: 600;\n border-right: 1px dashed var(--matrx-print-border-muted, #d1d5db);\n}\n.matrx-fc-num {\n display: inline-block;\n min-width: 1.6em;\n font-size: 0.85em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n}\n\n@media print {\n .matrx-page-break {\n margin: 0;\n border: 0;\n break-after: page;\n page-break-after: always;\n }\n .matrx-page-break::after {\n content: none;\n }\n .matrx-page-break + * {\n margin-top: 0;\n }\n\n /* Scoped to the rendered markdown (.matrx-content-container = document\n skin, .content = print window) so a host page that carries this sheet\n \u2014 a WordPress theme \u2014 keeps its own print rules everywhere else. */\n\n /* Long tables flow across pages: the header row repeats, rows never split. */\n :is(.matrx-content-container, .content) thead {\n display: table-header-group;\n }\n :is(.matrx-content-container, .content) :is(tr, img, figure),\n .matrx-fc,\n .matrx-task-item {\n break-inside: avoid;\n page-break-inside: avoid;\n }\n :is(.matrx-content-container, .content) :is(h1, h2, h3, h4, h5, h6),\n .matrx-artifact-header {\n break-after: avoid;\n page-break-after: avoid;\n break-inside: avoid;\n }\n\n /* Paper cannot scroll: long code lines wrap instead of being cut off. */\n :is(.matrx-content-container, .content) :is(pre, pre code) {\n white-space: pre-wrap !important;\n overflow-wrap: anywhere;\n overflow: visible !important;\n }\n .code-block-wrapper,\n .matrx-artifact {\n overflow: visible;\n }\n :is(.matrx-content-container, .content) img {\n max-width: 100% !important;\n }\n\n .matrx-artifact-header,\n .matrx-task-box {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n\n a.matrx-link[href^=\"http\"]::after {\n content: \" (\" attr(href) \")\";\n font-size: 0.85em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n overflow-wrap: anywhere;\n }\n}\n";
|
|
50
|
+
declare const MARKDOWN_SHARED_CSS = "\n.matrx-page-break {\n position: relative;\n clear: both;\n height: 0;\n margin: 2.75rem 0;\n border: 0;\n border-top: 2px dashed var(--matrx-print-border-muted, #d1d5db);\n}\n.matrx-page-break::after {\n content: attr(data-label);\n position: absolute;\n left: 50%;\n top: 0;\n transform: translate(-50%, -50%);\n padding: 0 0.75rem;\n background: var(--matrx-print-bg, #ffffff);\n color: var(--matrx-print-fg-subtle, #6b7280);\n font: 600 10px/1.6 -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n white-space: nowrap;\n}\n/* GFM footnotes: numbered superscript references, notes gathered at the end. */\n.print-footnote-ref {\n font-size: 0.75em;\n line-height: 0;\n vertical-align: super;\n}\n.print-footnote-ref a {\n text-decoration: none;\n}\n.print-footnotes {\n margin-top: 2em;\n font-size: 0.9em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n page-break-inside: avoid;\n}\n.print-footnotes hr {\n width: 33%;\n margin: 0 0 0.75em;\n border: 0;\n border-top: 1px solid var(--matrx-print-border-muted, #d1d5db);\n}\n.print-footnotes ol {\n margin: 0;\n padding-left: 1.6em;\n}\n.print-footnotes li p {\n margin: 0 0 0.35em;\n}\n\n.matrx-artifact {\n margin: 1.25em 0;\n border: 1px solid var(--matrx-print-border, #e5e7eb);\n border-radius: 8px;\n overflow: hidden;\n}\n.matrx-artifact-header {\n display: flex;\n align-items: baseline;\n gap: 0.6em;\n padding: 0.45em 0.9em;\n background: var(--matrx-print-surface, #f8fafc);\n border-bottom: 1px solid var(--matrx-print-border, #e5e7eb);\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n}\n.matrx-artifact-kind {\n font-size: 0.72em;\n font-weight: 700;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--matrx-print-accent, #2563eb);\n}\n.matrx-artifact-title {\n font-weight: 600;\n color: var(--matrx-print-fg, #1a1a1a);\n}\n.matrx-artifact-body {\n padding: 0.8em 0.9em;\n}\n.matrx-artifact-body > :first-child {\n margin-top: 0;\n}\n.matrx-artifact-body > :last-child {\n margin-bottom: 0;\n}\n/* The panel's kind chip already names these languages. */\n.matrx-artifact:is([data-artifact-type=\"html\"], [data-artifact-type=\"react\"], [data-artifact-type=\"svg\"], [data-artifact-type=\"mermaid\"], [data-artifact-type=\"diff\"], [data-artifact-type=\"iframe\"]) .code-lang {\n display: none;\n}\n.matrx-artifact-empty {\n margin: 0;\n font-style: italic;\n color: var(--matrx-print-fg-subtle, #6b7280);\n}\n\nli.matrx-task-item {\n list-style: none;\n}\n/* The box IS the marker \u2014 the document skin's custom bullet must not sit on it. */\n:is(.matrx-content-container, .content) li.matrx-task-item::before {\n content: none;\n}\n.matrx-task-box {\n position: relative;\n display: inline-block;\n width: 0.9em;\n height: 0.9em;\n margin: 0 0.5em 0 -1.35em;\n border: 1.5px solid var(--matrx-print-fg-muted, #4a4a4a);\n border-radius: 3px;\n vertical-align: -0.1em;\n}\n.matrx-task-box.is-checked::after {\n content: \"\\2713\";\n position: absolute;\n inset: 0;\n font-size: 0.8em;\n font-weight: 700;\n line-height: 1.1em;\n text-align: center;\n color: var(--matrx-print-fg, #1a1a1a);\n}\n\n:is(.matrx-content-container, .content) del {\n color: var(--matrx-print-fg-muted, #4a4a4a);\n text-decoration: line-through;\n}\n:is(.matrx-content-container, .content) hr.matrx-hr-accent {\n height: 2px;\n margin: 1.75em 0;\n border: 0;\n border-radius: 2px;\n background: var(--matrx-print-accent, #2563eb);\n opacity: 0.6;\n}\n:is(.matrx-content-container, .content) hr.matrx-hr-heavy {\n height: 4px;\n margin: 2.25em 0;\n border: 0;\n border-radius: 4px;\n background: var(--matrx-print-accent, #2563eb);\n}\n\n.matrx-flashcards-print {\n margin: 1em 0 1.2em;\n}\n.matrx-fc {\n display: grid;\n grid-template-columns: 1fr 1fr;\n margin-bottom: 0.5em;\n border: 1px solid var(--matrx-print-border, #e5e7eb);\n border-radius: 6px;\n}\n.matrx-fc-front,\n.matrx-fc-back {\n padding: 0.6em 0.8em;\n}\n.matrx-fc-front {\n font-weight: 600;\n border-right: 1px dashed var(--matrx-print-border-muted, #d1d5db);\n}\n.matrx-fc-num {\n display: inline-block;\n min-width: 1.6em;\n font-size: 0.85em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n}\n\n@media print {\n .matrx-page-break {\n margin: 0;\n border: 0;\n break-after: page;\n page-break-after: always;\n }\n .matrx-page-break::after {\n content: none;\n }\n .matrx-page-break + * {\n margin-top: 0;\n }\n\n /* Scoped to the rendered markdown (.matrx-content-container = document\n skin, .content = print window) so a host page that carries this sheet\n \u2014 a WordPress theme \u2014 keeps its own print rules everywhere else. */\n\n /* Long tables flow across pages: the header row repeats, rows never split. */\n :is(.matrx-content-container, .content) thead {\n display: table-header-group;\n }\n :is(.matrx-content-container, .content) :is(tr, img, figure),\n .matrx-fc,\n .matrx-task-item {\n break-inside: avoid;\n page-break-inside: avoid;\n }\n :is(.matrx-content-container, .content) :is(h1, h2, h3, h4, h5, h6),\n .matrx-artifact-header {\n break-after: avoid;\n page-break-after: avoid;\n break-inside: avoid;\n }\n\n /* Paper cannot scroll: long code lines wrap instead of being cut off. */\n :is(.matrx-content-container, .content) :is(pre, pre code) {\n white-space: pre-wrap !important;\n overflow-wrap: anywhere;\n overflow: visible !important;\n }\n .code-block-wrapper,\n .matrx-artifact {\n overflow: visible;\n }\n :is(.matrx-content-container, .content) img {\n max-width: 100% !important;\n }\n\n /* A PICTURE (a drawn diagram, a captured page) never outgrows one printed\n page: taller than the page, it was pushed whole to the next page and\n left its panel header alone at the foot of the last one, then printed a\n page with nothing but the page number (2026-10-08). Capped to fit beside\n its header on a portrait page, scaled, never cropped; a panel that holds\n a picture moves as one, header with it. */\n :is(.matrx-fence-picture, .matrx-print-image) img {\n display: block;\n width: auto !important;\n max-width: 100% !important;\n height: auto !important;\n max-height: 8.25in;\n object-fit: contain;\n margin: 0 auto;\n }\n :is(.matrx-fence-picture, .matrx-print-image),\n .matrx-artifact:has(.matrx-fence-picture, .matrx-print-image) {\n break-inside: avoid;\n page-break-inside: avoid;\n }\n /* A forced break with nothing after it (or right after another) would\n print an empty page. */\n .matrx-page-break:last-child,\n .matrx-page-break:has(+ .matrx-page-break) {\n break-after: auto;\n page-break-after: auto;\n }\n\n .matrx-artifact-header,\n .matrx-task-box {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n\n a.matrx-link[href^=\"http\"]::after {\n content: \" (\" attr(href) \")\";\n font-size: 0.85em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n overflow-wrap: anywhere;\n }\n}\n";
|
|
51
51
|
/**
|
|
52
52
|
* Page geometry + page numbers ("3 / 12", bottom centre). Part of the default
|
|
53
53
|
* sheet; `getMarkdownStylesheet({ pageNumbers: false })` leaves it out.
|
package/dist/markdown.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ declare const MARKDOWN_ARTICLE_CSS = "*,*::before,*::after{box-sizing:border-box
|
|
|
47
47
|
* padding — the same idea the chat preview draws; on paper a zero-height
|
|
48
48
|
* element that forces the next content onto a new page.
|
|
49
49
|
*/
|
|
50
|
-
declare const MARKDOWN_SHARED_CSS = "\n.matrx-page-break {\n position: relative;\n clear: both;\n height: 0;\n margin: 2.75rem 0;\n border: 0;\n border-top: 2px dashed var(--matrx-print-border-muted, #d1d5db);\n}\n.matrx-page-break::after {\n content: attr(data-label);\n position: absolute;\n left: 50%;\n top: 0;\n transform: translate(-50%, -50%);\n padding: 0 0.75rem;\n background: var(--matrx-print-bg, #ffffff);\n color: var(--matrx-print-fg-subtle, #6b7280);\n font: 600 10px/1.6 -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n white-space: nowrap;\n}\n/* GFM footnotes: numbered superscript references, notes gathered at the end. */\n.print-footnote-ref {\n font-size: 0.75em;\n line-height: 0;\n vertical-align: super;\n}\n.print-footnote-ref a {\n text-decoration: none;\n}\n.print-footnotes {\n margin-top: 2em;\n font-size: 0.9em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n page-break-inside: avoid;\n}\n.print-footnotes hr {\n width: 33%;\n margin: 0 0 0.75em;\n border: 0;\n border-top: 1px solid var(--matrx-print-border-muted, #d1d5db);\n}\n.print-footnotes ol {\n margin: 0;\n padding-left: 1.6em;\n}\n.print-footnotes li p {\n margin: 0 0 0.35em;\n}\n\n.matrx-artifact {\n margin: 1.25em 0;\n border: 1px solid var(--matrx-print-border, #e5e7eb);\n border-radius: 8px;\n overflow: hidden;\n}\n.matrx-artifact-header {\n display: flex;\n align-items: baseline;\n gap: 0.6em;\n padding: 0.45em 0.9em;\n background: var(--matrx-print-surface, #f8fafc);\n border-bottom: 1px solid var(--matrx-print-border, #e5e7eb);\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n}\n.matrx-artifact-kind {\n font-size: 0.72em;\n font-weight: 700;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--matrx-print-accent, #2563eb);\n}\n.matrx-artifact-title {\n font-weight: 600;\n color: var(--matrx-print-fg, #1a1a1a);\n}\n.matrx-artifact-body {\n padding: 0.8em 0.9em;\n}\n.matrx-artifact-body > :first-child {\n margin-top: 0;\n}\n.matrx-artifact-body > :last-child {\n margin-bottom: 0;\n}\n/* The panel's kind chip already names these languages. */\n.matrx-artifact:is([data-artifact-type=\"html\"], [data-artifact-type=\"react\"], [data-artifact-type=\"svg\"], [data-artifact-type=\"mermaid\"], [data-artifact-type=\"diff\"], [data-artifact-type=\"iframe\"]) .code-lang {\n display: none;\n}\n.matrx-artifact-empty {\n margin: 0;\n font-style: italic;\n color: var(--matrx-print-fg-subtle, #6b7280);\n}\n\nli.matrx-task-item {\n list-style: none;\n}\n/* The box IS the marker \u2014 the document skin's custom bullet must not sit on it. */\n:is(.matrx-content-container, .content) li.matrx-task-item::before {\n content: none;\n}\n.matrx-task-box {\n position: relative;\n display: inline-block;\n width: 0.9em;\n height: 0.9em;\n margin: 0 0.5em 0 -1.35em;\n border: 1.5px solid var(--matrx-print-fg-muted, #4a4a4a);\n border-radius: 3px;\n vertical-align: -0.1em;\n}\n.matrx-task-box.is-checked::after {\n content: \"\\2713\";\n position: absolute;\n inset: 0;\n font-size: 0.8em;\n font-weight: 700;\n line-height: 1.1em;\n text-align: center;\n color: var(--matrx-print-fg, #1a1a1a);\n}\n\n:is(.matrx-content-container, .content) del {\n color: var(--matrx-print-fg-muted, #4a4a4a);\n text-decoration: line-through;\n}\n:is(.matrx-content-container, .content) hr.matrx-hr-accent {\n height: 2px;\n margin: 1.75em 0;\n border: 0;\n border-radius: 2px;\n background: var(--matrx-print-accent, #2563eb);\n opacity: 0.6;\n}\n:is(.matrx-content-container, .content) hr.matrx-hr-heavy {\n height: 4px;\n margin: 2.25em 0;\n border: 0;\n border-radius: 4px;\n background: var(--matrx-print-accent, #2563eb);\n}\n\n.matrx-flashcards-print {\n margin: 1em 0 1.2em;\n}\n.matrx-fc {\n display: grid;\n grid-template-columns: 1fr 1fr;\n margin-bottom: 0.5em;\n border: 1px solid var(--matrx-print-border, #e5e7eb);\n border-radius: 6px;\n}\n.matrx-fc-front,\n.matrx-fc-back {\n padding: 0.6em 0.8em;\n}\n.matrx-fc-front {\n font-weight: 600;\n border-right: 1px dashed var(--matrx-print-border-muted, #d1d5db);\n}\n.matrx-fc-num {\n display: inline-block;\n min-width: 1.6em;\n font-size: 0.85em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n}\n\n@media print {\n .matrx-page-break {\n margin: 0;\n border: 0;\n break-after: page;\n page-break-after: always;\n }\n .matrx-page-break::after {\n content: none;\n }\n .matrx-page-break + * {\n margin-top: 0;\n }\n\n /* Scoped to the rendered markdown (.matrx-content-container = document\n skin, .content = print window) so a host page that carries this sheet\n \u2014 a WordPress theme \u2014 keeps its own print rules everywhere else. */\n\n /* Long tables flow across pages: the header row repeats, rows never split. */\n :is(.matrx-content-container, .content) thead {\n display: table-header-group;\n }\n :is(.matrx-content-container, .content) :is(tr, img, figure),\n .matrx-fc,\n .matrx-task-item {\n break-inside: avoid;\n page-break-inside: avoid;\n }\n :is(.matrx-content-container, .content) :is(h1, h2, h3, h4, h5, h6),\n .matrx-artifact-header {\n break-after: avoid;\n page-break-after: avoid;\n break-inside: avoid;\n }\n\n /* Paper cannot scroll: long code lines wrap instead of being cut off. */\n :is(.matrx-content-container, .content) :is(pre, pre code) {\n white-space: pre-wrap !important;\n overflow-wrap: anywhere;\n overflow: visible !important;\n }\n .code-block-wrapper,\n .matrx-artifact {\n overflow: visible;\n }\n :is(.matrx-content-container, .content) img {\n max-width: 100% !important;\n }\n\n .matrx-artifact-header,\n .matrx-task-box {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n\n a.matrx-link[href^=\"http\"]::after {\n content: \" (\" attr(href) \")\";\n font-size: 0.85em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n overflow-wrap: anywhere;\n }\n}\n";
|
|
50
|
+
declare const MARKDOWN_SHARED_CSS = "\n.matrx-page-break {\n position: relative;\n clear: both;\n height: 0;\n margin: 2.75rem 0;\n border: 0;\n border-top: 2px dashed var(--matrx-print-border-muted, #d1d5db);\n}\n.matrx-page-break::after {\n content: attr(data-label);\n position: absolute;\n left: 50%;\n top: 0;\n transform: translate(-50%, -50%);\n padding: 0 0.75rem;\n background: var(--matrx-print-bg, #ffffff);\n color: var(--matrx-print-fg-subtle, #6b7280);\n font: 600 10px/1.6 -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n white-space: nowrap;\n}\n/* GFM footnotes: numbered superscript references, notes gathered at the end. */\n.print-footnote-ref {\n font-size: 0.75em;\n line-height: 0;\n vertical-align: super;\n}\n.print-footnote-ref a {\n text-decoration: none;\n}\n.print-footnotes {\n margin-top: 2em;\n font-size: 0.9em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n page-break-inside: avoid;\n}\n.print-footnotes hr {\n width: 33%;\n margin: 0 0 0.75em;\n border: 0;\n border-top: 1px solid var(--matrx-print-border-muted, #d1d5db);\n}\n.print-footnotes ol {\n margin: 0;\n padding-left: 1.6em;\n}\n.print-footnotes li p {\n margin: 0 0 0.35em;\n}\n\n.matrx-artifact {\n margin: 1.25em 0;\n border: 1px solid var(--matrx-print-border, #e5e7eb);\n border-radius: 8px;\n overflow: hidden;\n}\n.matrx-artifact-header {\n display: flex;\n align-items: baseline;\n gap: 0.6em;\n padding: 0.45em 0.9em;\n background: var(--matrx-print-surface, #f8fafc);\n border-bottom: 1px solid var(--matrx-print-border, #e5e7eb);\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n}\n.matrx-artifact-kind {\n font-size: 0.72em;\n font-weight: 700;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--matrx-print-accent, #2563eb);\n}\n.matrx-artifact-title {\n font-weight: 600;\n color: var(--matrx-print-fg, #1a1a1a);\n}\n.matrx-artifact-body {\n padding: 0.8em 0.9em;\n}\n.matrx-artifact-body > :first-child {\n margin-top: 0;\n}\n.matrx-artifact-body > :last-child {\n margin-bottom: 0;\n}\n/* The panel's kind chip already names these languages. */\n.matrx-artifact:is([data-artifact-type=\"html\"], [data-artifact-type=\"react\"], [data-artifact-type=\"svg\"], [data-artifact-type=\"mermaid\"], [data-artifact-type=\"diff\"], [data-artifact-type=\"iframe\"]) .code-lang {\n display: none;\n}\n.matrx-artifact-empty {\n margin: 0;\n font-style: italic;\n color: var(--matrx-print-fg-subtle, #6b7280);\n}\n\nli.matrx-task-item {\n list-style: none;\n}\n/* The box IS the marker \u2014 the document skin's custom bullet must not sit on it. */\n:is(.matrx-content-container, .content) li.matrx-task-item::before {\n content: none;\n}\n.matrx-task-box {\n position: relative;\n display: inline-block;\n width: 0.9em;\n height: 0.9em;\n margin: 0 0.5em 0 -1.35em;\n border: 1.5px solid var(--matrx-print-fg-muted, #4a4a4a);\n border-radius: 3px;\n vertical-align: -0.1em;\n}\n.matrx-task-box.is-checked::after {\n content: \"\\2713\";\n position: absolute;\n inset: 0;\n font-size: 0.8em;\n font-weight: 700;\n line-height: 1.1em;\n text-align: center;\n color: var(--matrx-print-fg, #1a1a1a);\n}\n\n:is(.matrx-content-container, .content) del {\n color: var(--matrx-print-fg-muted, #4a4a4a);\n text-decoration: line-through;\n}\n:is(.matrx-content-container, .content) hr.matrx-hr-accent {\n height: 2px;\n margin: 1.75em 0;\n border: 0;\n border-radius: 2px;\n background: var(--matrx-print-accent, #2563eb);\n opacity: 0.6;\n}\n:is(.matrx-content-container, .content) hr.matrx-hr-heavy {\n height: 4px;\n margin: 2.25em 0;\n border: 0;\n border-radius: 4px;\n background: var(--matrx-print-accent, #2563eb);\n}\n\n.matrx-flashcards-print {\n margin: 1em 0 1.2em;\n}\n.matrx-fc {\n display: grid;\n grid-template-columns: 1fr 1fr;\n margin-bottom: 0.5em;\n border: 1px solid var(--matrx-print-border, #e5e7eb);\n border-radius: 6px;\n}\n.matrx-fc-front,\n.matrx-fc-back {\n padding: 0.6em 0.8em;\n}\n.matrx-fc-front {\n font-weight: 600;\n border-right: 1px dashed var(--matrx-print-border-muted, #d1d5db);\n}\n.matrx-fc-num {\n display: inline-block;\n min-width: 1.6em;\n font-size: 0.85em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n}\n\n@media print {\n .matrx-page-break {\n margin: 0;\n border: 0;\n break-after: page;\n page-break-after: always;\n }\n .matrx-page-break::after {\n content: none;\n }\n .matrx-page-break + * {\n margin-top: 0;\n }\n\n /* Scoped to the rendered markdown (.matrx-content-container = document\n skin, .content = print window) so a host page that carries this sheet\n \u2014 a WordPress theme \u2014 keeps its own print rules everywhere else. */\n\n /* Long tables flow across pages: the header row repeats, rows never split. */\n :is(.matrx-content-container, .content) thead {\n display: table-header-group;\n }\n :is(.matrx-content-container, .content) :is(tr, img, figure),\n .matrx-fc,\n .matrx-task-item {\n break-inside: avoid;\n page-break-inside: avoid;\n }\n :is(.matrx-content-container, .content) :is(h1, h2, h3, h4, h5, h6),\n .matrx-artifact-header {\n break-after: avoid;\n page-break-after: avoid;\n break-inside: avoid;\n }\n\n /* Paper cannot scroll: long code lines wrap instead of being cut off. */\n :is(.matrx-content-container, .content) :is(pre, pre code) {\n white-space: pre-wrap !important;\n overflow-wrap: anywhere;\n overflow: visible !important;\n }\n .code-block-wrapper,\n .matrx-artifact {\n overflow: visible;\n }\n :is(.matrx-content-container, .content) img {\n max-width: 100% !important;\n }\n\n /* A PICTURE (a drawn diagram, a captured page) never outgrows one printed\n page: taller than the page, it was pushed whole to the next page and\n left its panel header alone at the foot of the last one, then printed a\n page with nothing but the page number (2026-10-08). Capped to fit beside\n its header on a portrait page, scaled, never cropped; a panel that holds\n a picture moves as one, header with it. */\n :is(.matrx-fence-picture, .matrx-print-image) img {\n display: block;\n width: auto !important;\n max-width: 100% !important;\n height: auto !important;\n max-height: 8.25in;\n object-fit: contain;\n margin: 0 auto;\n }\n :is(.matrx-fence-picture, .matrx-print-image),\n .matrx-artifact:has(.matrx-fence-picture, .matrx-print-image) {\n break-inside: avoid;\n page-break-inside: avoid;\n }\n /* A forced break with nothing after it (or right after another) would\n print an empty page. */\n .matrx-page-break:last-child,\n .matrx-page-break:has(+ .matrx-page-break) {\n break-after: auto;\n page-break-after: auto;\n }\n\n .matrx-artifact-header,\n .matrx-task-box {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n\n a.matrx-link[href^=\"http\"]::after {\n content: \" (\" attr(href) \")\";\n font-size: 0.85em;\n color: var(--matrx-print-fg-subtle, #6b7280);\n overflow-wrap: anywhere;\n }\n}\n";
|
|
51
51
|
/**
|
|
52
52
|
* Page geometry + page numbers ("3 / 12", bottom centre). Part of the default
|
|
53
53
|
* sheet; `getMarkdownStylesheet({ pageNumbers: false })` leaves it out.
|
package/dist/markdown.js
CHANGED
|
@@ -1293,6 +1293,34 @@ li.matrx-task-item {
|
|
|
1293
1293
|
max-width: 100% !important;
|
|
1294
1294
|
}
|
|
1295
1295
|
|
|
1296
|
+
/* A PICTURE (a drawn diagram, a captured page) never outgrows one printed
|
|
1297
|
+
page: taller than the page, it was pushed whole to the next page and
|
|
1298
|
+
left its panel header alone at the foot of the last one, then printed a
|
|
1299
|
+
page with nothing but the page number (2026-10-08). Capped to fit beside
|
|
1300
|
+
its header on a portrait page, scaled, never cropped; a panel that holds
|
|
1301
|
+
a picture moves as one, header with it. */
|
|
1302
|
+
:is(.matrx-fence-picture, .matrx-print-image) img {
|
|
1303
|
+
display: block;
|
|
1304
|
+
width: auto !important;
|
|
1305
|
+
max-width: 100% !important;
|
|
1306
|
+
height: auto !important;
|
|
1307
|
+
max-height: 8.25in;
|
|
1308
|
+
object-fit: contain;
|
|
1309
|
+
margin: 0 auto;
|
|
1310
|
+
}
|
|
1311
|
+
:is(.matrx-fence-picture, .matrx-print-image),
|
|
1312
|
+
.matrx-artifact:has(.matrx-fence-picture, .matrx-print-image) {
|
|
1313
|
+
break-inside: avoid;
|
|
1314
|
+
page-break-inside: avoid;
|
|
1315
|
+
}
|
|
1316
|
+
/* A forced break with nothing after it (or right after another) would
|
|
1317
|
+
print an empty page. */
|
|
1318
|
+
.matrx-page-break:last-child,
|
|
1319
|
+
.matrx-page-break:has(+ .matrx-page-break) {
|
|
1320
|
+
break-after: auto;
|
|
1321
|
+
page-break-after: auto;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1296
1324
|
.matrx-artifact-header,
|
|
1297
1325
|
.matrx-task-box {
|
|
1298
1326
|
-webkit-print-color-adjust: exact;
|