wordinweb 0.3.3 → 0.3.4

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/collab.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { X as XmlElement, D as DocxDocument, C as ClientMessage, S as ServerMessage, P as PresencePosition, R as RosterEntry, a as ParticipantProfile, I as Intent, b as IdSidecar, L as LineageHead, T as ToolbarFeature, c as ToolbarMode, d as DocxViewApi, M as MissingFont, W as WriteStatus, U as UndoOutcome } from './index-BvwqvUF5.js';
3
- export { e as bytesToB64, f as deriveEpochKeys, g as docKeyFromFragment, m as mintDocKey, s as sealCheckpoint, h as stretchShareCode } from './index-BvwqvUF5.js';
2
+ import { X as XmlElement, D as DocxDocument, C as ClientMessage, S as ServerMessage, P as PresencePosition, R as RosterEntry, a as ParticipantProfile, I as Intent, b as IdSidecar, L as LineageHead, T as ToolbarFeature, c as ToolbarMode, d as DocxViewApi, M as MissingFont, W as WriteStatus, U as UndoOutcome } from './index-DudQb7f0.js';
3
+ export { e as bytesToB64, f as deriveEpochKeys, g as docKeyFromFragment, m as mintDocKey, s as sealCheckpoint, h as stretchShareCode } from './index-DudQb7f0.js';
4
4
 
5
5
  /**
6
6
  * How much of the document an applied intent disturbed — the input to
package/dist/collab.js CHANGED
@@ -90,7 +90,7 @@ import {
90
90
  suggestMeta,
91
91
  validatePastedOoxml,
92
92
  validateRegisteredOperation
93
- } from "./chunk-5SLXOYCF.js";
93
+ } from "./chunk-PZIJZDQ7.js";
94
94
  import "./chunk-7D4SUZUM.js";
95
95
 
96
96
  // src/collab.tsx
@@ -2011,7 +2011,7 @@ declare class DocxDocument {
2011
2011
  * the skeleton can say "fetching" versus "nobody online has this yet".
2012
2012
  * Written by the media transfer layer, read by the renderer; never part of
2013
2013
  * the document's identity and never serialized. */
2014
- readonly mediaTransferState: Map<string, "unavailable" | "fetching" | "waiting">;
2014
+ readonly mediaTransferState: Map<string, "waiting" | "fetching" | "unavailable">;
2015
2015
  /** Per-part media metadata that PERSISTS after install (doc 16 §5.3):
2016
2016
  * holder duty needs the sha (and E2EE iv/epoch) of READY parts to answer
2017
2017
  * re-supply requests; pendingMedia above only tracks not-yet-arrived. */
@@ -4099,6 +4099,16 @@ interface WatermarkSpec {
4099
4099
  opacity?: number;
4100
4100
  }
4101
4101
 
4102
+ /**
4103
+ * Lay out and render a whole .docx into `container` for a headless browser
4104
+ * to print. Resolves once the pages are final: fonts loaded, every image
4105
+ * converted and decoded. Print with the CSS page size to get one PDF page
4106
+ * per document page.
4107
+ */
4108
+ declare function renderForPrint(bytes: Uint8Array, container: HTMLElement): Promise<{
4109
+ pageCount: number;
4110
+ }>;
4111
+
4102
4112
  interface MissingFont {
4103
4113
  /** The face the document asked for (first name in the item's stack). */
4104
4114
  family: string;
@@ -6577,4 +6587,4 @@ declare function useAgentDocumentSession(binding: AgentDocumentViewBinding): Pic
6577
6587
  */
6578
6588
  declare function DocxView({ source, zoom, fitWidth, narrowWidth, editable, className, style, onLoad, onPageCountChange, onReady, onError, commentAuthor, commentMentions, showComments, revisions, onMissingFonts, mergeRecord, collab, }: DocxViewProps): react.JSX.Element;
6579
6589
 
6580
- export { comparedName as $, type AgentDocumentViewBinding as A, type ParagraphAlignment as B, type ClientMessage as C, DocxDocument as D, type EncodedCaret as E, RASTER_IMAGE_ACCEPT as F, type RunFormatPatch as G, type HostShortcutSection as H, type Intent as I, type ScreenshotInsertResult as J, type SelectionFormat as K, type LineageHead as L, type MissingFont as M, NUMBERING_PRESETS as N, type ShapePreset as O, type PresencePosition as P, ToolbarMenuSelect as Q, type RosterEntry as R, type ServerMessage as S, type ToolbarFeature as T, type UndoOutcome as U, type ToolbarMenuSelectOption as V, type WriteStatus as W, type XmlElement as X, type ToolbarMenuSelectProps as Y, type WireRange as Z, compareWithFile as _, type ParticipantProfile as a, downloadDocx as a0, layoutDocument as a1, pickAndCompare as a2, pickDocx as a3, printPages as a4, renderToDom as a5, useAgentDocumentSession as a6, type IdSidecar as b, type ToolbarMode as c, type DocxViewApi as d, bytesToB64 as e, deriveEpochKeys as f, docKeyFromFragment as g, stretchShareCode as h, COLLAB_IMAGE_EXTS as i, type CompareResult as j, type CompareWithFileOptions as k, type CoverPageContent as l, mintDocKey as m, DocxToolbar as n, type DocxToolbarProps as o, DocxView as p, type DocxViewProps as q, type DrawingTool as r, sealCheckpoint as s, INSERT_COMMANDS as t, type ImageInsertResult as u, type InsertCommandSpec as v, type LineNumberingPatch as w, type MergeRecord as x, type NumberingPresetId as y, type PageLayoutPatch as z };
6590
+ export { comparedName as $, type AgentDocumentViewBinding as A, type ParagraphAlignment as B, type ClientMessage as C, DocxDocument as D, type EncodedCaret as E, RASTER_IMAGE_ACCEPT as F, type RunFormatPatch as G, type HostShortcutSection as H, type Intent as I, type ScreenshotInsertResult as J, type SelectionFormat as K, type LineageHead as L, type MissingFont as M, NUMBERING_PRESETS as N, type ShapePreset as O, type PresencePosition as P, ToolbarMenuSelect as Q, type RosterEntry as R, type ServerMessage as S, type ToolbarFeature as T, type UndoOutcome as U, type ToolbarMenuSelectOption as V, type WriteStatus as W, type XmlElement as X, type ToolbarMenuSelectProps as Y, type WireRange as Z, compareWithFile as _, type ParticipantProfile as a, downloadDocx as a0, layoutDocument as a1, pickAndCompare as a2, pickDocx as a3, printPages as a4, renderForPrint as a5, renderToDom as a6, useAgentDocumentSession as a7, type IdSidecar as b, type ToolbarMode as c, type DocxViewApi as d, bytesToB64 as e, deriveEpochKeys as f, docKeyFromFragment as g, stretchShareCode as h, COLLAB_IMAGE_EXTS as i, type CompareResult as j, type CompareWithFileOptions as k, type CoverPageContent as l, mintDocKey as m, DocxToolbar as n, type DocxToolbarProps as o, DocxView as p, type DocxViewProps as q, type DrawingTool as r, sealCheckpoint as s, INSERT_COMMANDS as t, type ImageInsertResult as u, type InsertCommandSpec as v, type LineNumberingPatch as w, type MergeRecord as x, type NumberingPresetId as y, type PageLayoutPatch as z };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import 'react';
2
- export { A as AgentDocumentViewBinding, i as COLLAB_IMAGE_EXTS, j as CompareResult, k as CompareWithFileOptions, l as CoverPageContent, D as DocxDocument, n as DocxToolbar, o as DocxToolbarProps, p as DocxView, d as DocxViewApi, q as DocxViewProps, r as DrawingTool, E as EncodedCaret, H as HostShortcutSection, t as INSERT_COMMANDS, u as ImageInsertResult, v as InsertCommandSpec, w as LineNumberingPatch, x as MergeRecord, N as NUMBERING_PRESETS, y as NumberingPresetId, z as PageLayoutPatch, B as ParagraphAlignment, F as RASTER_IMAGE_ACCEPT, G as RunFormatPatch, J as ScreenshotInsertResult, K as SelectionFormat, O as ShapePreset, T as ToolbarFeature, Q as ToolbarMenuSelect, V as ToolbarMenuSelectOption, Y as ToolbarMenuSelectProps, c as ToolbarMode, Z as WireRange, _ as compareWithFile, $ as comparedName, a0 as downloadDocx, a1 as layoutDocument, a2 as pickAndCompare, a3 as pickDocx, a4 as printPages, a5 as renderToDom, a6 as useAgentDocumentSession } from './index-BvwqvUF5.js';
2
+ export { A as AgentDocumentViewBinding, i as COLLAB_IMAGE_EXTS, j as CompareResult, k as CompareWithFileOptions, l as CoverPageContent, D as DocxDocument, n as DocxToolbar, o as DocxToolbarProps, p as DocxView, d as DocxViewApi, q as DocxViewProps, r as DrawingTool, E as EncodedCaret, H as HostShortcutSection, t as INSERT_COMMANDS, u as ImageInsertResult, v as InsertCommandSpec, w as LineNumberingPatch, x as MergeRecord, N as NUMBERING_PRESETS, y as NumberingPresetId, z as PageLayoutPatch, B as ParagraphAlignment, F as RASTER_IMAGE_ACCEPT, G as RunFormatPatch, J as ScreenshotInsertResult, K as SelectionFormat, O as ShapePreset, T as ToolbarFeature, Q as ToolbarMenuSelect, V as ToolbarMenuSelectOption, Y as ToolbarMenuSelectProps, c as ToolbarMode, Z as WireRange, _ as compareWithFile, $ as comparedName, a0 as downloadDocx, a1 as layoutDocument, a2 as pickAndCompare, a3 as pickDocx, a4 as printPages, a5 as renderForPrint, a6 as renderToDom, a7 as useAgentDocumentSession } from './index-DudQb7f0.js';
package/dist/index.js CHANGED
@@ -14,9 +14,10 @@ import {
14
14
  pickAndCompare,
15
15
  pickDocx,
16
16
  printPages,
17
+ renderForPrint,
17
18
  renderToDom,
18
19
  useAgentDocumentSession
19
- } from "./chunk-5SLXOYCF.js";
20
+ } from "./chunk-PZIJZDQ7.js";
20
21
  import "./chunk-7D4SUZUM.js";
21
22
  export {
22
23
  COLLAB_IMAGE_EXTS,
@@ -34,6 +35,7 @@ export {
34
35
  pickAndCompare,
35
36
  pickDocx,
36
37
  printPages,
38
+ renderForPrint,
37
39
  renderToDom,
38
40
  useAgentDocumentSession
39
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wordinweb",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "React component for high-fidelity DOCX viewing and editing",
5
5
  "license": "MIT",
6
6
  "repository": {