@docmentis/udoc-viewer 0.8.11 → 0.8.13

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/API-COMPARISON.md CHANGED
@@ -77,7 +77,7 @@ status takes more than a few words, a note under the table says the rest.
77
77
 
78
78
  | Legacy | New | Status |
79
79
  | ---------------------------------- | ---------------------------------- | -------------------------------------------------- |
80
- | `container` | `create`'s `container` | different shape: an element, no selector |
80
+ | `container` | `create`'s `container` | different shape: an element or `null`, no selector |
81
81
  | `scrollMode` | `scrollMode` | same |
82
82
  | `layoutMode` | `layoutMode` | different shape: camelCase; PDF and Word only |
83
83
  | `zoomMode` | `fit` | different shape: a `Fit` (see `ZoomMode`) |
package/dist/index.d.ts CHANGED
@@ -16,8 +16,13 @@ export declare class UDocViewer extends UDocBase {
16
16
  * loads the WASM (async), then mounts the UI. Rejects with an
17
17
  * `unsupported` `UDocError` on runtimes without OffscreenCanvas-in-worker
18
18
  * support.
19
+ *
20
+ * With `null` for `container` the viewer is headless: it puts nothing on
21
+ * the page, and you drive it by its calls alone, to render, export, search
22
+ * and save documents in the browser. Nothing it does waits on a person:
23
+ * `open` and `print` say what they do in place of asking.
19
24
  */
20
- static create(container: HTMLElement, options?: UDocViewerOptions): Promise<UDocViewer>;
25
+ static create(container: HTMLElement | null, options?: UDocViewerOptions): Promise<UDocViewer>;
21
26
  /**
22
27
  * Start a local collaboration service on the document in `bytes`, and
23
28
  * resolve with its id — the page's own udoc server for one document, for
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,gCAAgC,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMxF,cAAc,oBAAoB,CAAC;AAKnC,6FAA6F;AAC7F,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAE5C;;;GAGG;AACH,qBAAa,UAAW,SAAQ,QAAQ;IACpC,uDAAuD;IACvD,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAmB;IAElD,OAAO;IAIP;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC;IAI3F;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,8BAA8B,CACjC,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,gCAAqC,GAC/C,OAAO,CAAC,MAAM,CAAC;CAGrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,gCAAgC,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMxF,cAAc,oBAAoB,CAAC;AAKnC,6FAA6F;AAC7F,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAE5C;;;GAGG;AACH,qBAAa,UAAW,SAAQ,QAAQ;IACpC,uDAAuD;IACvD,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAmB;IAElD,OAAO;IAIP;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC;IAWlG;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,8BAA8B,CACjC,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,gCAAqC,GAC/C,OAAO,CAAC,MAAM,CAAC;CAGrB"}
package/dist/index.js CHANGED
@@ -24,9 +24,14 @@ export class UDocViewer extends UDocBase {
24
24
  * loads the WASM (async), then mounts the UI. Rejects with an
25
25
  * `unsupported` `UDocError` on runtimes without OffscreenCanvas-in-worker
26
26
  * support.
27
+ *
28
+ * With `null` for `container` the viewer is headless: it puts nothing on
29
+ * the page, and you drive it by its calls alone, to render, export, search
30
+ * and save documents in the browser. Nothing it does waits on a person:
31
+ * `open` and `print` say what they do in place of asking.
27
32
  */
28
33
  static create(container, options = {}) {
29
- return createAs(container, options, VIEWER_WRAPPER, startRenderWorker, null, (shell) => new UDocViewer(shell));
34
+ return createAs(container, options, VIEWER_WRAPPER, startRenderWorker, () => null, (shell) => new UDocViewer(shell));
30
35
  }
31
36
  /**
32
37
  * Start a local collaboration service on the document in `bytes`, and
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4EAA4E;AAC5E,2EAA2E;AAC3E,kDAAkD;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAEvF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,cAAc,oBAAoB,CAAC;AAEnC,6DAA6D;AAC7D,MAAM,cAAc,GAAY,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AAKlF;;;GAGG;AACH,MAAM,OAAO,UAAW,SAAQ,QAAQ;IACpC,uDAAuD;IACvD,MAAM,CAAU,OAAO,GAAW,eAAe,CAAC;IAElD,YAAoB,KAAc;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,SAAsB,EAAE,UAA6B,EAAE;QACjE,OAAO,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,U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,8BAA8B,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;IAC1E,CAAC"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const WRAPPER_VERSION = "0.8.11";
1
+ export declare const WRAPPER_VERSION = "0.8.13";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -3,5 +3,5 @@
3
3
  // This package's version, reported to the engine as the wrapper version so a
4
4
  // permit request and a usage event can name what produced them. Generated from
5
5
  // package.json, which is the one place a release bumps.
6
- export const WRAPPER_VERSION = "0.8.11";
6
+ export const WRAPPER_VERSION = "0.8.13";
7
7
  //# sourceMappingURL=version.js.map