wordinweb 0.3.4 → 0.3.6
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/{chunk-PZIJZDQ7.js → chunk-WPQ6GPG4.js} +971 -187
- package/dist/chunk-WPQ6GPG4.js.map +1 -0
- package/dist/collab.d.ts +2 -2
- package/dist/collab.js +1 -1
- package/dist/{index-DudQb7f0.d.ts → index-BWmOQ4GG.d.ts} +40 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-PZIJZDQ7.js.map +0 -1
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-
|
|
3
|
-
export { e as bytesToB64, f as deriveEpochKeys, g as docKeyFromFragment, m as mintDocKey, s as sealCheckpoint, h as stretchShareCode } from './index-
|
|
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-BWmOQ4GG.js';
|
|
3
|
+
export { e as bytesToB64, f as deriveEpochKeys, g as docKeyFromFragment, m as mintDocKey, s as sealCheckpoint, h as stretchShareCode } from './index-BWmOQ4GG.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* How much of the document an applied intent disturbed — the input to
|
package/dist/collab.js
CHANGED
|
@@ -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;
|
|
@@ -1265,6 +1267,8 @@ declare class Package {
|
|
|
1265
1267
|
private files;
|
|
1266
1268
|
constructor(data: Uint8Array);
|
|
1267
1269
|
static from(data: ArrayBuffer | Uint8Array): Package;
|
|
1270
|
+
/** A package over an already-unzipped entry map (DocxDocument.clone). */
|
|
1271
|
+
static fromFiles(files: Record<string, Uint8Array>): Package;
|
|
1268
1272
|
has(name: string): boolean;
|
|
1269
1273
|
binary(name: string): Uint8Array | undefined;
|
|
1270
1274
|
text(name: string): string | undefined;
|
|
@@ -1850,6 +1854,8 @@ declare class DocxDocument {
|
|
|
1850
1854
|
/** The header part roots, in package order. A watermark is authored into
|
|
1851
1855
|
* every one of them: Word paints it on every page, and a document with a
|
|
1852
1856
|
* first-page or even-page header has more than one header part. */
|
|
1857
|
+
/** The root of the header or footer part at `target`, if this document has one. */
|
|
1858
|
+
headerFooterRoot(target: string): XmlElement | undefined;
|
|
1853
1859
|
headerRoots(): XmlElement[];
|
|
1854
1860
|
/** The footer part roots, in package order — headerRoots' counterpart, for
|
|
1855
1861
|
* operations that walk both bands (the page-number gallery's removal
|
|
@@ -1902,6 +1908,13 @@ declare class DocxDocument {
|
|
|
1902
1908
|
private journalSetAttr;
|
|
1903
1909
|
private normalizePercentageTableGrids;
|
|
1904
1910
|
save(): Uint8Array;
|
|
1911
|
+
/**
|
|
1912
|
+
* An independent copy: what `DocxDocument.load(doc.save())` gives, without
|
|
1913
|
+
* zipping the package and unzipping it again. compareDocuments starts from a
|
|
1914
|
+
* copy of the revised document, and the round trip through the zip was a
|
|
1915
|
+
* third of its time on a document that had not changed at all.
|
|
1916
|
+
*/
|
|
1917
|
+
clone(): DocxDocument;
|
|
1905
1918
|
saveAsync(): Promise<Uint8Array>;
|
|
1906
1919
|
private buildPackage;
|
|
1907
1920
|
private buildPackageFiles;
|
|
@@ -1942,9 +1955,31 @@ declare class DocxDocument {
|
|
|
1942
1955
|
*/
|
|
1943
1956
|
private ensureRelsRoot;
|
|
1944
1957
|
/** Register an external hyperlink relationship and return its rId. */
|
|
1945
|
-
|
|
1958
|
+
/**
|
|
1959
|
+
* Copy the part that `source`'s main-document relationship `relId` points
|
|
1960
|
+
* at into this package, with every part it references in turn (a chart's
|
|
1961
|
+
* embedded workbook, SmartArt's layout, style and colour parts) and their
|
|
1962
|
+
* content types, and add a relationship to it. Returns the new
|
|
1963
|
+
* relationship id, or null when the source has no such internal part.
|
|
1964
|
+
*
|
|
1965
|
+
* compareDocuments needs this for struck content: a removed picture keeps
|
|
1966
|
+
* its w:drawing, and without its image part the result's reject-all
|
|
1967
|
+
* brought the picture back as an empty frame.
|
|
1968
|
+
*/
|
|
1969
|
+
adoptRelFrom(source: DocxDocument, relId: string, scope?: {
|
|
1970
|
+
from?: string | null;
|
|
1971
|
+
into?: string | null;
|
|
1972
|
+
}): string | null;
|
|
1973
|
+
/** Give a part copied from `source` the content type it had there. */
|
|
1974
|
+
private adoptContentType;
|
|
1975
|
+
addHyperlinkRel(url: string, ownerPart?: string | null): string;
|
|
1946
1976
|
/** Retarget an existing external relationship (hyperlink href edit). */
|
|
1947
1977
|
setRelTarget(relId: string, url: string): boolean;
|
|
1978
|
+
/** The relationships owned by `part` (a header or footer part), or by the
|
|
1979
|
+
* document part when null; a header or footer gets a rels root on demand. */
|
|
1980
|
+
private relsOwnerOf;
|
|
1981
|
+
/** The relationships of `part` (a header or footer), or of the document part. */
|
|
1982
|
+
relationshipsOf(part?: string | null): Relationships;
|
|
1948
1983
|
/** The relationships of the part that holds `source`: a header or footer
|
|
1949
1984
|
* part when the element is inside one, else the document part. */
|
|
1950
1985
|
private imageRelsOwner;
|
|
@@ -2011,7 +2046,7 @@ declare class DocxDocument {
|
|
|
2011
2046
|
* the skeleton can say "fetching" versus "nobody online has this yet".
|
|
2012
2047
|
* Written by the media transfer layer, read by the renderer; never part of
|
|
2013
2048
|
* the document's identity and never serialized. */
|
|
2014
|
-
readonly mediaTransferState: Map<string, "
|
|
2049
|
+
readonly mediaTransferState: Map<string, "unavailable" | "fetching" | "waiting">;
|
|
2015
2050
|
/** Per-part media metadata that PERSISTS after install (doc 16 §5.3):
|
|
2016
2051
|
* holder duty needs the sha (and E2EE iv/epoch) of READY parts to answer
|
|
2017
2052
|
* re-supply requests; pendingMedia above only tracks not-yet-arrived. */
|
|
@@ -4011,7 +4046,9 @@ interface CompareNote {
|
|
|
4011
4046
|
/** The documents share no paragraph at all; one paragraph mark goes untracked. */
|
|
4012
4047
|
| "no-common-paragraph"
|
|
4013
4048
|
/** Original-only content referencing a relationship the result does not have. */
|
|
4014
|
-
| "unresolved-relationship"
|
|
4049
|
+
| "unresolved-relationship"
|
|
4050
|
+
/** An input held tracked changes; it was compared as if they were accepted. */
|
|
4051
|
+
| "existing-revisions-accepted";
|
|
4015
4052
|
detail: string;
|
|
4016
4053
|
}
|
|
4017
4054
|
|
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 renderForPrint, a6 as renderToDom, a7 as useAgentDocumentSession } from './index-
|
|
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-BWmOQ4GG.js';
|
package/dist/index.js
CHANGED