wordinweb 0.3.3 → 0.3.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/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-BunX2duN.js';
3
+ export { e as bytesToB64, f as deriveEpochKeys, g as docKeyFromFragment, m as mintDocKey, s as sealCheckpoint, h as stretchShareCode } from './index-BunX2duN.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-QU3LB5BC.js";
94
94
  import "./chunk-7D4SUZUM.js";
95
95
 
96
96
  // src/collab.tsx
@@ -950,6 +950,8 @@ interface Paragraph {
950
950
  interface TableCellProps {
951
951
  /** Preferred width px (from tcW when dxa). */
952
952
  width?: number;
953
+ /** Preferred width as a fraction of the table width (from tcW when pct). */
954
+ widthPct?: number;
953
955
  /** The source explicitly declares tcW type="auto" (distinct from no tcW). */
954
956
  widthAuto?: boolean;
955
957
  gridSpan: number;
@@ -4099,6 +4101,16 @@ interface WatermarkSpec {
4099
4101
  opacity?: number;
4100
4102
  }
4101
4103
 
4104
+ /**
4105
+ * Lay out and render a whole .docx into `container` for a headless browser
4106
+ * to print. Resolves once the pages are final: fonts loaded, every image
4107
+ * converted and decoded. Print with the CSS page size to get one PDF page
4108
+ * per document page.
4109
+ */
4110
+ declare function renderForPrint(bytes: Uint8Array, container: HTMLElement): Promise<{
4111
+ pageCount: number;
4112
+ }>;
4113
+
4102
4114
  interface MissingFont {
4103
4115
  /** The face the document asked for (first name in the item's stack). */
4104
4116
  family: string;
@@ -6577,4 +6589,4 @@ declare function useAgentDocumentSession(binding: AgentDocumentViewBinding): Pic
6577
6589
  */
6578
6590
  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
6591
 
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 };
6592
+ 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-BunX2duN.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-QU3LB5BC.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.5",
4
4
  "description": "React component for high-fidelity DOCX viewing and editing",
5
5
  "license": "MIT",
6
6
  "repository": {