@f-office/core 0.2.1 → 0.2.3

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/browser.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { WasmInitSource } from "./types.js";
2
- export { createBlobSource, createMemorySource, createOpfsSource, Document, loadFontsFor, PageImage, Renderer, wasmMemoryBytes, type ByteSource, type FontFetcher, type FontNeed, type LimitProfile, type OpenOptions, type OpfsSyncAccessHandle, type OutlineEntry, type PageRect, type PageSizePoints, type PdfChunkCallback, type PixelRegion, type RenderedPageData, type SearchMatch, type SearchOptions, type SearchRange, type TargetId, type TextRun, type WasmInitSource, } from "./core.js";
2
+ export { createBlobSource, createMemorySource, createOpfsSource, Document, Drawing, loadFontsFor, PageImage, Renderer, Session, wasmMemoryBytes, type ByteSource, type FontFetcher, type FontNeed, type LimitProfile, type OpenOptions, type OpfsSyncAccessHandle, type OutlineEntry, type PageRect, type PageSizePoints, type PdfChunkCallback, type PixelRegion, type RenderedPageData, type SearchMatch, type SearchOptions, type SearchRange, type TargetId, type TextRun, type WasmInitSource, } from "./core.js";
3
3
  /**
4
4
  * Initializes the F-Office WebAssembly module in browsers and Web Workers. Safe to call multiple
5
5
  * times; subsequent calls resolve immediately once initialized.
package/dist/browser.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import wasmInit from "./wasm/f_office_wasm.js";
2
2
  import { initWithDefaultLoader } from "./core.js";
3
- export { createBlobSource, createMemorySource, createOpfsSource, Document, loadFontsFor, PageImage, Renderer, wasmMemoryBytes, } from "./core.js";
3
+ export { createBlobSource, createMemorySource, createOpfsSource, Document, Drawing, loadFontsFor, PageImage, Renderer, Session, wasmMemoryBytes, } from "./core.js";
4
4
  /**
5
5
  * Initializes the F-Office WebAssembly module in browsers and Web Workers. Safe to call multiple
6
6
  * times; subsequent calls resolve immediately once initialized.
package/dist/core.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { Document as RawDocument, PageImage as RawPageImage } from "./wasm/f_office_wasm.js";
1
+ import { Document as RawDocument, Drawing, PageImage as RawPageImage, Session } from "./wasm/f_office_wasm.js";
2
+ export { Drawing, Session };
2
3
  import type { ByteSource, FontFetcher, FontNeed, OpenOptions, OutlineEntry, PageSizePoints, PdfChunkCallback, PixelRegion, SearchMatch, SearchOptions, TargetId, TextRun, WasmInitSource } from "./types.js";
3
4
  export type { ByteSource, FontFetcher, FontNeed, LimitProfile, OpenOptions, OutlineEntry, PageRect, PageSizePoints, PdfChunkCallback, PixelRegion, RenderedPageData, SearchMatch, SearchOptions, SearchRange, TargetId, TextRun, WasmInitSource, } from "./types.js";
4
5
  export { createBlobSource, createMemorySource, createOpfsSource, type OpfsSyncAccessHandle, } from "./source.js";
package/dist/core.js CHANGED
@@ -1,4 +1,5 @@
1
- import wasmInit, { Renderer as RawRenderer, } from "./wasm/f_office_wasm.js";
1
+ import wasmInit, { Drawing, Renderer as RawRenderer, Session, } from "./wasm/f_office_wasm.js";
2
+ export { Drawing, Session };
2
3
  export { createBlobSource, createMemorySource, createOpfsSource, } from "./source.js";
3
4
  const DEFAULT_TARGET = "word-win";
4
5
  let initPromise = null;
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { createBlobSource, createMemorySource, createOpfsSource, Document, init, loadFontsFor, PageImage, Renderer, wasmMemoryBytes, type ByteSource, type FontFetcher, type FontNeed, type LimitProfile, type OpenOptions, type OpfsSyncAccessHandle, type OutlineEntry, type PageRect, type PageSizePoints, type PdfChunkCallback, type PixelRegion, type RenderedPageData, type SearchMatch, type SearchOptions, type SearchRange, type TargetId, type TextRun, type WasmInitSource, } from "./browser.js";
1
+ export { createBlobSource, createMemorySource, createOpfsSource, Document, Drawing, init, loadFontsFor, PageImage, Renderer, Session, wasmMemoryBytes, type ByteSource, type FontFetcher, type FontNeed, type LimitProfile, type OpenOptions, type OpfsSyncAccessHandle, type OutlineEntry, type PageRect, type PageSizePoints, type PdfChunkCallback, type PixelRegion, type RenderedPageData, type SearchMatch, type SearchOptions, type SearchRange, type TargetId, type TextRun, type WasmInitSource, } from "./browser.js";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { createBlobSource, createMemorySource, createOpfsSource, Document, init, loadFontsFor, PageImage, Renderer, wasmMemoryBytes, } from "./browser.js";
1
+ export { createBlobSource, createMemorySource, createOpfsSource, Document, Drawing, init, loadFontsFor, PageImage, Renderer, Session, wasmMemoryBytes, } from "./browser.js";
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { WasmInitSource } from "./types.js";
2
- export { createBlobSource, createMemorySource, createOpfsSource, Document, loadFontsFor, PageImage, Renderer, wasmMemoryBytes, type ByteSource, type FontFetcher, type FontNeed, type LimitProfile, type OpenOptions, type OpfsSyncAccessHandle, type OutlineEntry, type PageRect, type PageSizePoints, type PdfChunkCallback, type PixelRegion, type RenderedPageData, type SearchMatch, type SearchOptions, type SearchRange, type TargetId, type TextRun, type WasmInitSource, } from "./core.js";
2
+ export { createBlobSource, createMemorySource, createOpfsSource, Document, Drawing, loadFontsFor, PageImage, Renderer, Session, wasmMemoryBytes, type ByteSource, type FontFetcher, type FontNeed, type LimitProfile, type OpenOptions, type OpfsSyncAccessHandle, type OutlineEntry, type PageRect, type PageSizePoints, type PdfChunkCallback, type PixelRegion, type RenderedPageData, type SearchMatch, type SearchOptions, type SearchRange, type TargetId, type TextRun, type WasmInitSource, } from "./core.js";
3
3
  /**
4
4
  * Initializes the F-Office WebAssembly module in Node.js by reading the bundled `.wasm` binary
5
5
  * directly from disk when `source` is omitted.
package/dist/node.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import { initSync } from "./wasm/f_office_wasm.js";
3
3
  import { initWithDefaultLoader } from "./core.js";
4
- export { createBlobSource, createMemorySource, createOpfsSource, Document, loadFontsFor, PageImage, Renderer, wasmMemoryBytes, } from "./core.js";
4
+ export { createBlobSource, createMemorySource, createOpfsSource, Document, Drawing, loadFontsFor, PageImage, Renderer, Session, wasmMemoryBytes, } from "./core.js";
5
5
  /**
6
6
  * Initializes the F-Office WebAssembly module in Node.js by reading the bundled `.wasm` binary
7
7
  * directly from disk when `source` is omitted.
@@ -98,6 +98,31 @@ export class Document {
98
98
  writePdf(): Uint8Array;
99
99
  }
100
100
 
101
+ /**
102
+ * A drawn page for JavaScript: its width, height and RGBA pixels.
103
+ */
104
+ export class Drawing {
105
+ private constructor();
106
+ free(): void;
107
+ [Symbol.dispose](): void;
108
+ /**
109
+ * Consumes and returns the RGBA pixels without cloning inside WebAssembly.
110
+ */
111
+ takePixels(): Uint8Array;
112
+ /**
113
+ * The height in pixels.
114
+ */
115
+ readonly height: number;
116
+ /**
117
+ * The pixels, four bytes each, row by row from the top, as a new array.
118
+ */
119
+ readonly pixels: Uint8Array;
120
+ /**
121
+ * The width in pixels.
122
+ */
123
+ readonly width: number;
124
+ }
125
+
101
126
  /**
102
127
  * A font that a document's text asks for and the families that the target tries for it.
103
128
  */
@@ -305,6 +330,399 @@ export class SearchMatch {
305
330
  readonly start: number;
306
331
  }
307
332
 
333
+ /**
334
+ * The viewer's session for JavaScript, as [`Session`] says.
335
+ */
336
+ export class Session {
337
+ free(): void;
338
+ [Symbol.dispose](): void;
339
+ /**
340
+ * Takes the ICU4X word dictionaries from an external postcard data blob, for the open
341
+ * document and the ones that it opens later.
342
+ *
343
+ * # Errors
344
+ *
345
+ * Throws when the data holds no word dictionaries.
346
+ */
347
+ addDictionaries(blob: Uint8Array | number[]): void;
348
+ /**
349
+ * Adds the faces of a font file and returns how many it holds.
350
+ *
351
+ * # Errors
352
+ *
353
+ * Throws when the data is no font.
354
+ */
355
+ addFont(data: Uint8Array | number[]): number;
356
+ /**
357
+ * Begins opening the previously staged document incrementally, laying out Page 1 first.
358
+ *
359
+ * # Errors
360
+ *
361
+ * Throws when no document is staged or opening fails.
362
+ */
363
+ beginOpenStaged(): string;
364
+ /**
365
+ * Ends a press because the window lost the focus, and returns what it did, as JSON
366
+ * ([`handled_json`]).
367
+ *
368
+ * # Errors
369
+ *
370
+ * Throws when no document is open.
371
+ */
372
+ blur(): string;
373
+ /**
374
+ * Clears all caller-supplied highlights, or only those matching `kind`.
375
+ *
376
+ * # Errors
377
+ *
378
+ * Throws when no document is open.
379
+ */
380
+ clearHighlights(kind?: string | null): void;
381
+ /**
382
+ * Clears the selection.
383
+ *
384
+ * # Errors
385
+ *
386
+ * Throws when no document is open.
387
+ */
388
+ clearSelection(): void;
389
+ /**
390
+ * Draws a page at a resolution, and counts the drawing as the shell's.
391
+ *
392
+ * # Errors
393
+ *
394
+ * Throws when no document is open, or the page does not exist or cannot be drawn.
395
+ */
396
+ draw(page: number, dpi: number): Drawing;
397
+ /**
398
+ * Ends a zoom gesture, so that the next frame asks for the drawings at its zoom.
399
+ *
400
+ * # Errors
401
+ *
402
+ * Throws when no document is open.
403
+ */
404
+ endGesture(): void;
405
+ /**
406
+ * Makes the next match current when `forward` is set, and the match before it when not.
407
+ *
408
+ * # Errors
409
+ *
410
+ * Throws when no document is open.
411
+ */
412
+ findStep(forward: boolean): void;
413
+ /**
414
+ * Searches the document for `query`, and returns the number of matches.
415
+ *
416
+ * # Errors
417
+ *
418
+ * Throws when no document is open.
419
+ */
420
+ find(query: string): number;
421
+ /**
422
+ * Fast-forwards any remaining incremental layout slices to completion.
423
+ *
424
+ * # Errors
425
+ *
426
+ * Throws when no document is open or layout fails.
427
+ */
428
+ finishLayout(): string;
429
+ /**
430
+ * The fonts that a random-access DOCX source asks for on `target`, as JSON, without copying
431
+ * the whole archive into WASM linear memory ([`Session::fonts_needed_source`]).
432
+ *
433
+ * # Errors
434
+ *
435
+ * Throws when `byteLength` is invalid, no target has the ID, or the source cannot be opened.
436
+ */
437
+ static fontsNeededSource(byte_length: number, read_at: Function, target?: string | null): string;
438
+ /**
439
+ * The fonts that `docx` asks for on `target`, as JSON ([`Session::fonts_needed`]).
440
+ *
441
+ * # Errors
442
+ *
443
+ * Throws when no target has the ID or the file cannot be opened.
444
+ */
445
+ static fontsNeeded(docx: Uint8Array | number[], target?: string | null): string;
446
+ /**
447
+ * Forgets the drawings that the worker was asked for and has not drawn.
448
+ *
449
+ * # Errors
450
+ *
451
+ * Throws when no document is open.
452
+ */
453
+ forgetRequests(): void;
454
+ /**
455
+ * What the shell shows now, as JSON ([`frame_json`]).
456
+ *
457
+ * # Errors
458
+ *
459
+ * Throws when no document is open.
460
+ */
461
+ frame(): string;
462
+ /**
463
+ * Zooms to `factor` during a zoom gesture, around the viewport's point at `anchor_x` and
464
+ * `anchor_y`: the frames ask for no drawing until [`Session::end_gesture`].
465
+ *
466
+ * # Errors
467
+ *
468
+ * Throws when no document is open.
469
+ */
470
+ gestureZoom(factor: number, anchor_x?: number | null, anchor_y?: number | null): void;
471
+ /**
472
+ * Scrolls to the line where the bookmark `name` starts, and returns whether it went.
473
+ *
474
+ * # Errors
475
+ *
476
+ * Throws when no document is open.
477
+ */
478
+ goToBookmark(name: string): boolean;
479
+ /**
480
+ * Scrolls to the first line of a heading of the outline, by its index in the outline, and
481
+ * makes it the frame's `currentHeading` until the next scroll.
482
+ *
483
+ * # Errors
484
+ *
485
+ * Throws when no document is open.
486
+ */
487
+ goToHeading(index: number): void;
488
+ /**
489
+ * Scrolls the top of a page, counted from 0, to the top of the viewport.
490
+ *
491
+ * # Errors
492
+ *
493
+ * Throws when no document is open.
494
+ */
495
+ goToPage(page: number): void;
496
+ /**
497
+ * The innermost hyperlink under the viewport's point `x`, `y`, as JSON: its `target`, an
498
+ * `external` `address` or a `bookmark` `name`, and its `tooltip`; null away from a link.
499
+ *
500
+ * # Errors
501
+ *
502
+ * Throws when no document is open.
503
+ */
504
+ linkAt(x: number, y: number): string;
505
+ /**
506
+ * A session with no fonts and no document.
507
+ */
508
+ constructor();
509
+ /**
510
+ * Opens a random-access DOCX source for `target` without copying the full archive into WASM
511
+ * linear memory ([`Session::open_source`]).
512
+ *
513
+ * # Errors
514
+ *
515
+ * Throws when `byteLength` is invalid, no target has the ID, or the source cannot be opened.
516
+ */
517
+ openSource(byte_length: number, read_at: Function, target?: string | null): string;
518
+ /**
519
+ * Opens `docx` for `target`, and returns its page count and outline as JSON
520
+ * ([`Session::open`]).
521
+ *
522
+ * # Errors
523
+ *
524
+ * Throws when no target has the ID or the file cannot be opened.
525
+ */
526
+ open(docx: Uint8Array | number[], target?: string | null): string;
527
+ /**
528
+ * Whether the viewport's point `x`, `y` lies on a line of text.
529
+ *
530
+ * # Errors
531
+ *
532
+ * Throws when no document is open.
533
+ */
534
+ overText(x: number, y: number): boolean;
535
+ /**
536
+ * The hyperlinks of a page, counted from 0, as JSON: in reading order, each with its
537
+ * `target`, `tooltip`, `text` and `boxes`, the boxes as shares of the page's width and
538
+ * height.
539
+ *
540
+ * # Errors
541
+ *
542
+ * Throws when no document is open.
543
+ */
544
+ pageLinks(page: number): string;
545
+ /**
546
+ * Writes the open document's pages as a PDF file, for printing.
547
+ *
548
+ * # Errors
549
+ *
550
+ * Throws when no document is open, or the pages cannot be written as PDF.
551
+ */
552
+ pdf(): Uint8Array;
553
+ /**
554
+ * Ends a press that the platform cancelled or whose capture it lost, and returns what it
555
+ * did, as JSON ([`handled_json`]).
556
+ *
557
+ * # Errors
558
+ *
559
+ * Throws when no document is open.
560
+ */
561
+ pointerCancel(): string;
562
+ /**
563
+ * Takes a press at the viewport's point `x`, `y` at `time` milliseconds: whether of the
564
+ * `primary` button, by a `pointer` of kind `mouse`, `pen` or `touch`, with `shift`, on a
565
+ * `hit` of kind `page`, `gap`, `scroll-bar`, `start-handle` or `end-handle`. Returns what it did, as JSON
566
+ * ([`handled_json`]).
567
+ *
568
+ * # Errors
569
+ *
570
+ * Throws when no document is open or a kind has another name.
571
+ */
572
+ pointerDown(x: number, y: number, primary: boolean, pointer: string, shift: boolean, time: number, hit: string): string;
573
+ /**
574
+ * Moves a press's pointer to the viewport's point `x`, `y` at `time` milliseconds, and
575
+ * returns what it did, as JSON ([`handled_json`]).
576
+ *
577
+ * # Errors
578
+ *
579
+ * Throws when no document is open.
580
+ */
581
+ pointerMove(x: number, y: number, time: number): string;
582
+ /**
583
+ * Ends a press at the viewport's point `x`, `y` at `time` milliseconds, and returns what
584
+ * it did, as JSON ([`handled_json`]).
585
+ *
586
+ * # Errors
587
+ *
588
+ * Throws when no document is open.
589
+ */
590
+ pointerUp(x: number, y: number, time: number): string;
591
+ /**
592
+ * Draws a page at a resolution for the browser's own Print, without counting the
593
+ * drawing as the shell's.
594
+ *
595
+ * # Errors
596
+ *
597
+ * Throws when no document is open, or the page does not exist or cannot be drawn.
598
+ */
599
+ printPage(page: number, dpi: number): Drawing;
600
+ /**
601
+ * The reading text of a page, counted from 0, as JSON: its paragraphs in reading order,
602
+ * each with its `text` and its outline `level` or null.
603
+ *
604
+ * # Errors
605
+ *
606
+ * Throws when no document is open.
607
+ */
608
+ readingText(page: number): string;
609
+ /**
610
+ * Gives the viewer the viewport's size in CSS pixels and the device pixel ratio.
611
+ *
612
+ * # Errors
613
+ *
614
+ * Throws when no document is open.
615
+ */
616
+ resize(width: number, height: number, ratio: number): void;
617
+ /**
618
+ * Scrolls to `page`, optionally focusing a point-space rectangle with `block` placement.
619
+ *
620
+ * # Errors
621
+ *
622
+ * Throws when no document is open.
623
+ */
624
+ scrollToRect(page: number, left?: number | null, top?: number | null, width?: number | null, height?: number | null, block?: string | null): void;
625
+ /**
626
+ * Scrolls the viewport's top left corner to `(left, top)`.
627
+ *
628
+ * # Errors
629
+ *
630
+ * Throws when no document is open.
631
+ */
632
+ scrollTo(left: number, top: number): void;
633
+ /**
634
+ * Selects the whole story of the last press.
635
+ *
636
+ * # Errors
637
+ *
638
+ * Throws when no document is open.
639
+ */
640
+ selectAll(): void;
641
+ /**
642
+ * The selected text, as a copy gives it.
643
+ *
644
+ * # Errors
645
+ *
646
+ * Throws when no document is open.
647
+ */
648
+ selectedText(): string;
649
+ /**
650
+ * Replaces caller-supplied highlights from a JSON array string.
651
+ *
652
+ * # Errors
653
+ *
654
+ * Throws when no document is open or JSON is malformed.
655
+ */
656
+ setHighlights(items_json: string): void;
657
+ /**
658
+ * Enables or disables two-pass progressive drawing (fast 96 DPI draft before `HiDPI`).
659
+ */
660
+ setProgressiveDraft(enabled: boolean): void;
661
+ /**
662
+ * Sets the zoom, `fixed` at `factor`, `fit-width` or `fit-page`, around the anchor or the
663
+ * viewport's middle ([`Session::set_zoom`]).
664
+ *
665
+ * # Errors
666
+ *
667
+ * Throws when no document is open or the kind is no zoom.
668
+ */
669
+ setZoom(kind: string, factor: number, anchor_x?: number | null, anchor_y?: number | null): void;
670
+ /**
671
+ * Scrolls a point in points of a page, counted from 0, to the viewport's top left corner,
672
+ * as the frame's `place` gave it.
673
+ *
674
+ * # Errors
675
+ *
676
+ * Throws when no document is open.
677
+ */
678
+ showPlace(page: number, x: number, y: number): void;
679
+ /**
680
+ * Opens and parses `docx` once, stages it on the session for [`JsSession::begin_open_staged`],
681
+ * and returns its font needs as JSON without running a dummy layout pass.
682
+ *
683
+ * # Errors
684
+ *
685
+ * Throws when no target has the ID or the file cannot be opened.
686
+ */
687
+ stageDocx(docx: Uint8Array | number[], target?: string | null): string;
688
+ /**
689
+ * Opens and parses a random-access DOCX source once, stages it on the session for
690
+ * [`JsSession::begin_open_staged`], and returns its font needs as JSON without running a
691
+ * dummy layout pass.
692
+ *
693
+ * # Errors
694
+ *
695
+ * Throws when `byteLength` is invalid, no target has the ID, or the source cannot be opened.
696
+ */
697
+ stageSource(byte_length: number, read_at: Function, target?: string | null): string;
698
+ /**
699
+ * Advances incremental layout by up to `maxBlocks` body blocks and returns updated page
700
+ * count, outline, invalidated pages, and completion progress as JSON.
701
+ *
702
+ * # Errors
703
+ *
704
+ * Throws when no document is open or layout fails.
705
+ */
706
+ stepLayout(max_blocks: number): string;
707
+ /**
708
+ * Streams the open document's pages as a PDF to `onChunk(chunk: Uint8Array)` in bounded
709
+ * 64 KiB chunks without allocating the full PDF in WASM linear memory.
710
+ *
711
+ * # Errors
712
+ *
713
+ * Throws when no document is open, or the pages cannot be written as PDF.
714
+ */
715
+ writePdfTo(on_chunk: Function): void;
716
+ /**
717
+ * Zooms one step in or out around the anchor or the viewport's middle.
718
+ *
719
+ * # Errors
720
+ *
721
+ * Throws when no document is open.
722
+ */
723
+ zoomStep(inward: boolean, anchor_x?: number | null, anchor_y?: number | null): void;
724
+ }
725
+
308
726
  /**
309
727
  * A run of upright text on a page, in points from the page's top left corner: the box of its
310
728
  * glyphs from its font's ascender to its descender, and its glyphs.
@@ -361,11 +779,13 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
361
779
  export interface InitOutput {
362
780
  readonly memory: WebAssembly.Memory;
363
781
  readonly __wbg_document_free: (a: number, b: number) => void;
782
+ readonly __wbg_drawing_free: (a: number, b: number) => void;
364
783
  readonly __wbg_fontneed_free: (a: number, b: number) => void;
365
784
  readonly __wbg_outlineentry_free: (a: number, b: number) => void;
366
785
  readonly __wbg_pageimage_free: (a: number, b: number) => void;
367
786
  readonly __wbg_renderer_free: (a: number, b: number) => void;
368
787
  readonly __wbg_searchmatch_free: (a: number, b: number) => void;
788
+ readonly __wbg_session_free: (a: number, b: number) => void;
369
789
  readonly __wbg_textrun_free: (a: number, b: number) => void;
370
790
  readonly document_fontNeeds: (a: number) => [number, number];
371
791
  readonly document_outline: (a: number) => [number, number];
@@ -380,6 +800,10 @@ export interface InitOutput {
380
800
  readonly document_warnings: (a: number) => [number, number];
381
801
  readonly document_writePdf: (a: number) => [number, number, number, number];
382
802
  readonly document_writePdfTo: (a: number, b: any) => [number, number, number, number];
803
+ readonly drawing_height: (a: number) => number;
804
+ readonly drawing_pixels: (a: number) => [number, number];
805
+ readonly drawing_takePixels: (a: number) => [number, number];
806
+ readonly drawing_width: (a: number) => number;
383
807
  readonly fontneed_family: (a: number) => [number, number];
384
808
  readonly fontneed_tried: (a: number) => [number, number];
385
809
  readonly outlineentry_address: (a: number) => [number, number];
@@ -407,6 +831,52 @@ export interface InitOutput {
407
831
  readonly searchmatch_rects: (a: number) => [number, number];
408
832
  readonly searchmatch_snippet: (a: number) => [number, number];
409
833
  readonly searchmatch_start: (a: number) => number;
834
+ readonly session_addDictionaries: (a: number, b: number, c: number) => [number, number];
835
+ readonly session_addFont: (a: number, b: number, c: number) => [number, number, number];
836
+ readonly session_beginOpenStaged: (a: number) => [number, number, number, number];
837
+ readonly session_blur: (a: number) => [number, number, number, number];
838
+ readonly session_clearHighlights: (a: number, b: number, c: number) => [number, number];
839
+ readonly session_clearSelection: (a: number) => [number, number];
840
+ readonly session_draw: (a: number, b: number, c: number) => [number, number, number];
841
+ readonly session_endGesture: (a: number) => [number, number];
842
+ readonly session_find: (a: number, b: number, c: number) => [number, number, number];
843
+ readonly session_findStep: (a: number, b: number) => [number, number];
844
+ readonly session_finishLayout: (a: number) => [number, number, number, number];
845
+ readonly session_fontsNeeded: (a: number, b: number, c: number, d: number) => [number, number, number, number];
846
+ readonly session_fontsNeededSource: (a: number, b: any, c: number, d: number) => [number, number, number, number];
847
+ readonly session_forgetRequests: (a: number) => [number, number];
848
+ readonly session_frame: (a: number) => [number, number, number, number];
849
+ readonly session_gestureZoom: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
850
+ readonly session_goToBookmark: (a: number, b: number, c: number) => [number, number, number];
851
+ readonly session_goToHeading: (a: number, b: number) => [number, number];
852
+ readonly session_goToPage: (a: number, b: number) => [number, number];
853
+ readonly session_linkAt: (a: number, b: number, c: number) => [number, number, number, number];
854
+ readonly session_new: () => number;
855
+ readonly session_open: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
856
+ readonly session_openSource: (a: number, b: number, c: any, d: number, e: number) => [number, number, number, number];
857
+ readonly session_overText: (a: number, b: number, c: number) => [number, number, number];
858
+ readonly session_pageLinks: (a: number, b: number) => [number, number, number, number];
859
+ readonly session_pdf: (a: number) => [number, number, number, number];
860
+ readonly session_pointerCancel: (a: number) => [number, number, number, number];
861
+ readonly session_pointerDown: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number, number];
862
+ readonly session_pointerMove: (a: number, b: number, c: number, d: number) => [number, number, number, number];
863
+ readonly session_pointerUp: (a: number, b: number, c: number, d: number) => [number, number, number, number];
864
+ readonly session_printPage: (a: number, b: number, c: number) => [number, number, number];
865
+ readonly session_readingText: (a: number, b: number) => [number, number, number, number];
866
+ readonly session_resize: (a: number, b: number, c: number, d: number) => [number, number];
867
+ readonly session_scrollTo: (a: number, b: number, c: number) => [number, number];
868
+ readonly session_scrollToRect: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => [number, number];
869
+ readonly session_selectAll: (a: number) => [number, number];
870
+ readonly session_selectedText: (a: number) => [number, number, number, number];
871
+ readonly session_setHighlights: (a: number, b: number, c: number) => [number, number];
872
+ readonly session_setProgressiveDraft: (a: number, b: number) => void;
873
+ readonly session_setZoom: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
874
+ readonly session_showPlace: (a: number, b: number, c: number, d: number) => [number, number];
875
+ readonly session_stageDocx: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
876
+ readonly session_stageSource: (a: number, b: number, c: any, d: number, e: number) => [number, number, number, number];
877
+ readonly session_stepLayout: (a: number, b: number) => [number, number, number, number];
878
+ readonly session_writePdfTo: (a: number, b: any) => [number, number];
879
+ readonly session_zoomStep: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
410
880
  readonly textrun_baseline: (a: number) => number;
411
881
  readonly textrun_glyphEnds: (a: number) => [number, number];
412
882
  readonly textrun_glyphLefts: (a: number) => [number, number];