@silurus/ooxml 0.74.3 → 0.74.5

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
@@ -204,6 +204,12 @@ width to the container width and re-fits on resize; a `0`-width container defers
204
204
  layout until it has width. Call `destroy()` to tear down (a self-loaded engine is
205
205
  destroyed with it; an injected one is not — see below).
206
206
 
207
+ Pass `refitOnResize: false` when the viewport must not determine the document's
208
+ physical display size. An explicit pre-load `setScale(1)` then keeps the same
209
+ authored font size at roughly the same on-screen size for portrait pages,
210
+ landscape pages, and slides; users can still zoom or call `fitWidth()` /
211
+ `fitPage()` explicitly.
212
+
207
213
  **Desk appearance.** The viewer paints each page/slide on its own white canvas
208
214
  with a soft drop shadow, over a transparent "desk". Style the desk and the sheet
209
215
  gaps without any wrapper CSS:
@@ -227,11 +233,14 @@ CSS preview and settles into a crisp re-render when it pauses. Bounds are the
227
233
  absolute scale factors `zoomMin` / `zoomMax` (default `0.1` / `4`), and
228
234
  `setScale(scale)` sets it programmatically. Pass `enableZoom: false` to disable.
229
235
 
230
- **Text selection** (main mode only). Pass `enableTextSelection: true` to overlay
231
- a transparent, selectable text layer per page/slide for native copy. In
232
- `mode: 'worker'` the overlay stays empty (the per-run geometry cannot cross the
233
- worker boundary) and the viewer logs one warning — use the default `mode: 'main'`
234
- for selectable text.
236
+ **Text selection and find.** Pass `enableTextSelection: true` to overlay a
237
+ transparent, selectable text layer per page/slide for native copy. It works in
238
+ both `mode: 'main'` and `mode: 'worker'`; worker rendering returns the retained
239
+ text-run geometry beside each bitmap. `findText()`, `findNext()`, `findPrev()`,
240
+ and `clearFind()` search the complete document, including virtualized pages or
241
+ slides outside the mounted window. Set `findHighlightColors: { match, active }`
242
+ on any viewer to override the two overlay backgrounds with CSS colors; use an
243
+ alpha color when the canvas text should remain visible through the highlight.
235
244
 
236
245
  **Hyperlinks.** For DOCX/PPTX the link hit regions live on the text-selection
237
246
  overlay, so hyperlink interaction requires `enableTextSelection: true`; when that
@@ -266,6 +275,11 @@ doc.destroy(); // release it yourself when every pane is gone
266
275
  `PptxScrollViewer` takes the same shape with `{ presentation: pres }`
267
276
  (`await PptxPresentation.load(...)`).
268
277
 
278
+ For presentations, `enableMediaPlayback: true` makes embedded audio and video
279
+ interactive inside the real viewport plus `mediaOverscan` slides. Other mounted
280
+ slides remain static and selectable, avoiding offscreen media blobs and
281
+ animation loops.
282
+
269
283
  Both viewers also expose `relayout()` (force a re-fit when the container resizes
270
284
  in a way a `ResizeObserver` cannot see — e.g. a late web-font load),
271
285
  `onVisiblePageChange` / `onVisibleSlideChange` (fires when the top-most visible