@pretextbook/pretext-html 0.5.0 → 0.6.0

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/README.md CHANGED
@@ -84,6 +84,12 @@ const { html } = await renderHtml({
84
84
  ~100ms–1s per render depending on document size).
85
85
  - `theme: "dark" | "light" | "system"` makes the preview follow the embedding
86
86
  app's light/dark theme (see [Theme control](#theme-control)).
87
+ - Born-hidden knowls — solutions, hints, answers, and any block the publication
88
+ file elects to hide — are rendered **expanded**, because these pages are
89
+ previews: an author editing a solution would otherwise watch it collapse on
90
+ every re-render. Other `<details>` (footnotes, image descriptions) are left
91
+ alone. Pass `openKnowls: false` (`--no-open-knowls` on the CLI) for the
92
+ collapsed reading experience of a real `pretext build`.
87
93
 
88
94
  ### API (browser)
89
95
 
@@ -210,6 +210,20 @@
210
210
 
211
211
  </xsl:template>
212
212
 
213
+ <!-- Show the print-preview button on printouts, but inert: the page it would -->
214
+ <!-- reload with "?printpreview=<id>" does not exist for an in-memory render, -->
215
+ <!-- and a host that resolves that query against its own URL sends the reader -->
216
+ <!-- somewhere unrelated. See PRINTOUT_LINK_OVERRIDE in refresh-xsl.mjs. -->
217
+ <xsl:template match="*" mode="standalone-printout-links">
218
+ <div class="print-links">
219
+ <a class="print-link" style="opacity:0.45;cursor:default" aria-disabled="true" title="Print preview is not available in the live preview">
220
+ <xsl:call-template name="insert-symbol">
221
+ <xsl:with-param name="name" select="'print'"/>
222
+ </xsl:call-template>
223
+ </a>
224
+ </div>
225
+ </xsl:template>
226
+
213
227
  <!-- Stub out the remaining file writers (every other template reachable -->
214
228
  <!-- from pretext-html.xsl that contains exsl:document). Under portable- -->
215
229
  <!-- html several of these are already suppressed; the stubs cover the -->