@stll/docx-core 0.19.3 → 0.20.0
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/{document-Cj4uqQEw.js → document-pvrjtG29.js} +2 -1
- package/dist/{document-CXHNa5xD.d.ts → document-yy5uSMjr.d.ts} +21 -3
- package/dist/docx_kernel_bg.wasm +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/model/document.d.ts +2 -2
- package/dist/model/document.js +2 -2
- package/package.json +1 -1
|
@@ -49,6 +49,7 @@ const PARAGRAPH_MARK_CHANGE_KINDS = Object.freeze([
|
|
|
49
49
|
"ins",
|
|
50
50
|
"del"
|
|
51
51
|
]);
|
|
52
|
+
const REVIEW_CARRIERS = { TERMINAL_TABLE: "terminal-table" };
|
|
52
53
|
//#endregion
|
|
53
54
|
//#region src/model/document.ts
|
|
54
55
|
/** DOCX package conformance classes. */
|
|
@@ -58,4 +59,4 @@ const DOCX_CONFORMANCE_CLASSES = Object.freeze({
|
|
|
58
59
|
UNKNOWN: "unknown"
|
|
59
60
|
});
|
|
60
61
|
//#endregion
|
|
61
|
-
export {
|
|
62
|
+
export { REVIEW_CARRIERS as a, PARAGRAPH_MARK_CHANGE_KINDS as i, DRAWING_RAW_XML_MODES as n, isOoxmlSymbolCharacter as o, MAX_REVISION_ID as r, normalizeRevisionId as s, DOCX_CONFORMANCE_CLASSES as t };
|
|
@@ -108,6 +108,8 @@ type TextFormatting = {
|
|
|
108
108
|
allCaps?: boolean;
|
|
109
109
|
/** Hidden text (w:vanish) */
|
|
110
110
|
hidden?: boolean;
|
|
111
|
+
/** Exclude this run from spellchecking (w:noProof). */
|
|
112
|
+
noProof?: boolean;
|
|
111
113
|
/** Text color (w:color) */
|
|
112
114
|
color?: ColorValue;
|
|
113
115
|
/** Highlight/background color (w:highlight) */
|
|
@@ -802,8 +804,10 @@ type DrawingContent = {
|
|
|
802
804
|
type: "drawing";
|
|
803
805
|
/** Image data */
|
|
804
806
|
image: Image;
|
|
805
|
-
/** Original OOXML for package-preserving round-trips
|
|
807
|
+
/** Original OOXML for package-preserving round-trips while the editable image is unchanged. */
|
|
806
808
|
rawXml?: string;
|
|
809
|
+
/** Editable image projection fingerprint when `rawXml` was captured, used to invalidate replay after model edits. */
|
|
810
|
+
rawImageFingerprint?: string;
|
|
807
811
|
rawXmlMode?: never;
|
|
808
812
|
} | {
|
|
809
813
|
type: "drawing";
|
|
@@ -1204,6 +1208,8 @@ type TextBox = {
|
|
|
1204
1208
|
fill?: ShapeFill;
|
|
1205
1209
|
/** Outline */
|
|
1206
1210
|
outline?: ShapeOutline;
|
|
1211
|
+
/** DrawingML transform applied to the text-box frame and content. */
|
|
1212
|
+
transform?: ImageTransform;
|
|
1207
1213
|
/** Text and table content */
|
|
1208
1214
|
content: (Paragraph | Table)[];
|
|
1209
1215
|
/** Text fitting behavior */
|
|
@@ -1371,7 +1377,7 @@ type PropertyChangeInfo = {
|
|
|
1371
1377
|
rsid?: string;
|
|
1372
1378
|
} & TrackedChangeInfo;
|
|
1373
1379
|
/** Inline content that may sit inside a run-level tracked-change wrapper. */
|
|
1374
|
-
type TrackedRunContent = Run | Hyperlink | BookmarkStart | BookmarkEnd | SimpleField | ComplexField | TrackedRunChange;
|
|
1380
|
+
type TrackedRunContent = Run | Hyperlink | BookmarkStart | BookmarkEnd | SimpleField | ComplexField | MathEquation | TrackedRunChange;
|
|
1375
1381
|
/**
|
|
1376
1382
|
* Insertion wrapper (w:ins) — runs inserted by tracked changes
|
|
1377
1383
|
*/
|
|
@@ -1517,6 +1523,11 @@ type SectionPropertyChange = {
|
|
|
1517
1523
|
info: PropertyChangeInfo;
|
|
1518
1524
|
/** Section properties before the tracked change */
|
|
1519
1525
|
previousProperties?: SectionProperties;
|
|
1526
|
+
/** Complete prior header/footer selection, stored in Folio's ignorable MCE extension. */
|
|
1527
|
+
previousReferences?: {
|
|
1528
|
+
headerReferences?: HeaderReference[];
|
|
1529
|
+
footerReferences?: FooterReference[];
|
|
1530
|
+
};
|
|
1520
1531
|
/** Section properties after the tracked change (editor model convenience) */
|
|
1521
1532
|
currentProperties?: SectionProperties;
|
|
1522
1533
|
};
|
|
@@ -1670,6 +1681,11 @@ type ParagraphMarkChange = {
|
|
|
1670
1681
|
kind: ParagraphMarkChangeKind;
|
|
1671
1682
|
info: TrackedChangeInfo;
|
|
1672
1683
|
};
|
|
1684
|
+
declare const REVIEW_CARRIERS: {
|
|
1685
|
+
readonly TERMINAL_TABLE: "terminal-table";
|
|
1686
|
+
};
|
|
1687
|
+
/** A Folio-private untracked paragraph used to resolve a terminal table deletion. */
|
|
1688
|
+
type ReviewCarrier = (typeof REVIEW_CARRIERS)[keyof typeof REVIEW_CARRIERS];
|
|
1673
1689
|
/** Paragraph (w:p) */
|
|
1674
1690
|
type Paragraph = {
|
|
1675
1691
|
type: "paragraph";
|
|
@@ -1683,6 +1699,8 @@ type Paragraph = {
|
|
|
1683
1699
|
propertyChanges?: ParagraphPropertyChange[];
|
|
1684
1700
|
/** Paragraph-mark insertion / deletion (w:pPr / w:rPr / w:ins | w:del) */
|
|
1685
1701
|
pPrMark?: ParagraphMarkChange;
|
|
1702
|
+
/** Folio-private review-resolution carrier; ignored by standard OOXML consumers. */
|
|
1703
|
+
reviewCarrier?: ReviewCarrier;
|
|
1686
1704
|
/** Paragraph content */
|
|
1687
1705
|
content: ParagraphContent[];
|
|
1688
1706
|
/** Computed list rendering (if this is a list item) */
|
|
@@ -2390,4 +2408,4 @@ type Document = {
|
|
|
2390
2408
|
warnings?: string[];
|
|
2391
2409
|
};
|
|
2392
2410
|
//#endregion
|
|
2393
|
-
export { ImagePosition as $,
|
|
2411
|
+
export { ImagePosition as $, TablePropertyChange as $t, ComplexField as A, TabStop as An, Run as At, FieldCharContent as B, TextEffect as Bn, ShapeContent as Bt, BookmarkStart as C, EmphasisMark as Cn, ParagraphMarkChangeKind as Ct, CommentRangeEnd as D, ParagraphFormatting as Dn, PropertyChangeInfo as Dt, Comment as E, ParagraphAlignment as En, PositionalTab as Et, DrawingRawXmlMode as F, TableFormatting as Fn, Section as Ft, FootnoteProperties as G, KnownBorderStyle as Gn, ShapeType as Gt, FooterReference as H, UnderlineStyle as Hn, ShapeGeometryAdjustment as Ht, Endnote as I, TableLook as In, SectionProperties as It, HeaderReference as J, SymbolContent as Jt, HeaderFooter as K, ShadingProperties as Kn, SimpleField as Kt, EndnotePosition as L, TableMeasurement as Ln, SectionPropertyChange as Lt, Deletion as M, TableBorders as Mn, RunPropertyChange as Mt, DocumentBody as N, TableCellBorders as Nn, SdtProperties as Nt, CommentRangeStart as O, SpacingExplicit as On, REVIEW_CARRIERS as Ot, DrawingContent as P, TableCellFormatting as Pn, SdtType as Pt, ImagePadding as Q, TableCellPropertyChange as Qt, EndnoteProperties as R, TableRowFormatting as Rn, SectionStart as Rt, BookmarkEnd as S, ConditionalFormatStyle as Sn, ParagraphMarkChange as St, Column as T, LineSpacingRule as Tn, PictureWatermark as Tt, Footnote as U, BorderSpec as Un, ShapeOutline as Ut, FieldType as V, TextFormatting as Vn, ShapeFill as Vt, FootnotePosition as W, ColorValue as Wn, ShapeTextBody as Wt, Image as X, Table as Xt, Hyperlink as Y, TabContent as Yt, ImageCrop as Z, TableCell as Zt, ThemeColorScheme as _, ListRendering as _n, NoteReferenceContent as _t, DocxPackage as a, TextWatermark as an, InstrTextContent as at, BlockContent as b, NumberingInstance as bn, Paragraph as bt, FontTable as c, TrackedRunContent as cn, MathEquation as ct, RelationshipMap as d, isOoxmlSymbolCharacter as dn, MoveFromRangeStart as dt, TableRow as en, ImageSize as et, RelationshipType as f, normalizeRevisionId as fn, MoveTo as ft, Theme as g, ListMarkerFormatting as gn, NoteNumberRestart as gt, StyleType as h, ListLevel as hn, NoBreakHyphenContent as ht, DocxConformanceClass as i, TextContent as in, Insertion as it, DRAWING_RAW_XML_MODES as j, TabStopAlignment as jn, RunContent as jt, CommentReference as k, TabLeader as kn, ReviewCarrier as kt, MediaFile as l, VerticalAlign as ln, MoveFrom as lt, StyleDefinitions as m, LevelSuffix as mn, MoveToRangeStart as mt, Document as n, TableStructuralChangeInfo as nn, ImageWrap as nt, DocDefaults as o, TrackedChangeInfo as on, LineNumberRestart as ot, Style as p, AbstractNumbering as pn, MoveToRangeEnd as pt, HeaderFooterType as q, ThemeColorSlot as qn, SoftHyphenContent as qt, DocumentSettings as r, TextBox as rn, InlineSdt as rt, FontInfo as s, TrackedRunChange as sn, MAX_REVISION_ID as st, DOCX_CONFORMANCE_CLASSES as t, TableRowPropertyChange as tn, ImageTransform as tt, Relationship as u, Watermark as un, MoveFromRangeEnd as ut, ThemeFont as v, NumberFormat as vn, PARAGRAPH_MARK_CHANGE_KINDS as vt, BreakContent as w, FloatingTableProperties as wn, ParagraphPropertyChange as wt, BlockSdt as x, CellMargins as xn, ParagraphContent as xt, ThemeFontScheme as y, NumberingDefinitions as yn, PageOrientation as yt, Field as z, TableWidthType as zn, Shape as zt };
|
package/dist/docx_kernel_bg.wasm
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as Run, Et as PositionalTab, It as SectionProperties, N as DocumentBody, Xt as Table, Zt as TableCell, a as DocxPackage, b as BlockContent, bt as Paragraph, en as TableRow, i as DocxConformanceClass, in as TextContent, jt as RunContent, n as Document, p as Style, t as DOCX_CONFORMANCE_CLASSES, w as BreakContent, xt as ParagraphContent, yn as NumberingDefinitions } from "./document-yy5uSMjr.js";
|
|
2
2
|
import { Buffer } from "node:buffer";
|
|
3
3
|
//#region src/legal-source/types.d.ts
|
|
4
4
|
type LegalDocumentKind = "agreement" | "letter" | "memo" | "checklist" | "pleading" | "other";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as isOoxmlSymbolCharacter, t as DOCX_CONFORMANCE_CLASSES } from "./document-pvrjtG29.js";
|
|
2
2
|
import JSZip from "jszip";
|
|
3
3
|
import { panic } from "better-result";
|
|
4
4
|
import { XMLParser, XMLValidator } from "fast-xml-parser";
|
package/dist/model/document.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ImagePosition, $t as
|
|
2
|
-
export { type AbstractNumbering, type BlockContent, type BlockSdt, type BookmarkEnd, type BookmarkStart, type BorderSpec, type BreakContent, type CellMargins, type ColorValue, type Column, type Comment, type CommentRangeEnd, type CommentRangeStart, type CommentReference, type ComplexField, type ConditionalFormatStyle, DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, type Deletion, type DocDefaults, Document, type DocumentBody, DocumentSettings, DocxConformanceClass, DocxPackage, type DrawingContent, type DrawingRawXmlMode, type EmphasisMark, type Endnote, type EndnotePosition, type EndnoteProperties, type Field, type FieldCharContent, type FieldType, type FloatingTableProperties, type FontInfo, type FontTable, type FooterReference, type Footnote, type FootnotePosition, type FootnoteProperties, type HeaderFooter, type HeaderFooterType, type HeaderReference, type Hyperlink, type Image, type ImageCrop, type ImagePadding, type ImagePosition, type ImageSize, type ImageTransform, type ImageWrap, type InlineSdt, type Insertion, type InstrTextContent, type KnownBorderStyle, type LevelSuffix, type LineNumberRestart, type LineSpacingRule, type ListLevel, type ListMarkerFormatting, type ListRendering, MAX_REVISION_ID, type MathEquation, type MediaFile, type MoveFrom, type MoveFromRangeEnd, type MoveFromRangeStart, type MoveTo, type MoveToRangeEnd, type MoveToRangeStart, type NoBreakHyphenContent, type NoteNumberRestart, type NoteReferenceContent, type NumberFormat, type NumberingDefinitions, type NumberingInstance, PARAGRAPH_MARK_CHANGE_KINDS, type PageOrientation, type Paragraph, type ParagraphAlignment, type ParagraphContent, type ParagraphFormatting, type ParagraphMarkChange, type ParagraphMarkChangeKind, type ParagraphPropertyChange, type PictureWatermark, type PositionalTab, type PropertyChangeInfo, type Relationship, type RelationshipMap, type RelationshipType, type Run, type RunContent, type RunPropertyChange, type SdtProperties, type SdtType, type Section, type SectionProperties, type SectionPropertyChange, type SectionStart, type ShadingProperties, type Shape, type ShapeContent, type ShapeFill, type ShapeGeometryAdjustment, type ShapeOutline, type ShapeTextBody, type ShapeType, type SimpleField, type SoftHyphenContent, type SpacingExplicit, type Style, type StyleDefinitions, type StyleType, type SymbolContent, type TabContent, type TabLeader, type TabStop, type TabStopAlignment, type Table, type TableBorders, type TableCell, type TableCellBorders, type TableCellFormatting, type TableCellPropertyChange, type TableFormatting, type TableLook, type TableMeasurement, type TablePropertyChange, type TableRow, type TableRowFormatting, type TableRowPropertyChange, type TableStructuralChangeInfo, type TableWidthType, type TextBox, type TextContent, type TextEffect, type TextFormatting, type TextWatermark, type Theme, type ThemeColorScheme, type ThemeColorSlot, type ThemeFont, type ThemeFontScheme, type TrackedChangeInfo, type TrackedRunChange, type TrackedRunContent, type UnderlineStyle, type VerticalAlign, type Watermark, isOoxmlSymbolCharacter, normalizeRevisionId };
|
|
1
|
+
import { $ as ImagePosition, $t as TablePropertyChange, A as ComplexField, An as TabStop, At as Run, B as FieldCharContent, Bn as TextEffect, Bt as ShapeContent, C as BookmarkStart, Cn as EmphasisMark, Ct as ParagraphMarkChangeKind, D as CommentRangeEnd, Dn as ParagraphFormatting, Dt as PropertyChangeInfo, E as Comment, En as ParagraphAlignment, Et as PositionalTab, F as DrawingRawXmlMode, Fn as TableFormatting, Ft as Section, G as FootnoteProperties, Gn as KnownBorderStyle, Gt as ShapeType, H as FooterReference, Hn as UnderlineStyle, Ht as ShapeGeometryAdjustment, I as Endnote, In as TableLook, It as SectionProperties, J as HeaderReference, Jt as SymbolContent, K as HeaderFooter, Kn as ShadingProperties, Kt as SimpleField, L as EndnotePosition, Ln as TableMeasurement, Lt as SectionPropertyChange, M as Deletion, Mn as TableBorders, Mt as RunPropertyChange, N as DocumentBody, Nn as TableCellBorders, Nt as SdtProperties, O as CommentRangeStart, On as SpacingExplicit, Ot as REVIEW_CARRIERS, P as DrawingContent, Pn as TableCellFormatting, Pt as SdtType, Q as ImagePadding, Qt as TableCellPropertyChange, R as EndnoteProperties, Rn as TableRowFormatting, Rt as SectionStart, S as BookmarkEnd, Sn as ConditionalFormatStyle, St as ParagraphMarkChange, T as Column, Tn as LineSpacingRule, Tt as PictureWatermark, U as Footnote, Un as BorderSpec, Ut as ShapeOutline, V as FieldType, Vn as TextFormatting, Vt as ShapeFill, W as FootnotePosition, Wn as ColorValue, Wt as ShapeTextBody, X as Image, Xt as Table, Y as Hyperlink, Yt as TabContent, Z as ImageCrop, Zt as TableCell, _ as ThemeColorScheme, _n as ListRendering, _t as NoteReferenceContent, a as DocxPackage, an as TextWatermark, at as InstrTextContent, b as BlockContent, bn as NumberingInstance, bt as Paragraph, c as FontTable, cn as TrackedRunContent, ct as MathEquation, d as RelationshipMap, dn as isOoxmlSymbolCharacter, dt as MoveFromRangeStart, en as TableRow, et as ImageSize, f as RelationshipType, fn as normalizeRevisionId, ft as MoveTo, g as Theme, gn as ListMarkerFormatting, gt as NoteNumberRestart, h as StyleType, hn as ListLevel, ht as NoBreakHyphenContent, i as DocxConformanceClass, in as TextContent, it as Insertion, j as DRAWING_RAW_XML_MODES, jn as TabStopAlignment, jt as RunContent, k as CommentReference, kn as TabLeader, kt as ReviewCarrier, l as MediaFile, ln as VerticalAlign, lt as MoveFrom, m as StyleDefinitions, mn as LevelSuffix, mt as MoveToRangeStart, n as Document, nn as TableStructuralChangeInfo, nt as ImageWrap, o as DocDefaults, on as TrackedChangeInfo, ot as LineNumberRestart, p as Style, pn as AbstractNumbering, pt as MoveToRangeEnd, q as HeaderFooterType, qn as ThemeColorSlot, qt as SoftHyphenContent, r as DocumentSettings, rn as TextBox, rt as InlineSdt, s as FontInfo, sn as TrackedRunChange, st as MAX_REVISION_ID, t as DOCX_CONFORMANCE_CLASSES, tn as TableRowPropertyChange, tt as ImageTransform, u as Relationship, un as Watermark, ut as MoveFromRangeEnd, v as ThemeFont, vn as NumberFormat, vt as PARAGRAPH_MARK_CHANGE_KINDS, w as BreakContent, wn as FloatingTableProperties, wt as ParagraphPropertyChange, x as BlockSdt, xn as CellMargins, xt as ParagraphContent, y as ThemeFontScheme, yn as NumberingDefinitions, yt as PageOrientation, z as Field, zn as TableWidthType, zt as Shape } from "../document-yy5uSMjr.js";
|
|
2
|
+
export { type AbstractNumbering, type BlockContent, type BlockSdt, type BookmarkEnd, type BookmarkStart, type BorderSpec, type BreakContent, type CellMargins, type ColorValue, type Column, type Comment, type CommentRangeEnd, type CommentRangeStart, type CommentReference, type ComplexField, type ConditionalFormatStyle, DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, type Deletion, type DocDefaults, Document, type DocumentBody, DocumentSettings, DocxConformanceClass, DocxPackage, type DrawingContent, type DrawingRawXmlMode, type EmphasisMark, type Endnote, type EndnotePosition, type EndnoteProperties, type Field, type FieldCharContent, type FieldType, type FloatingTableProperties, type FontInfo, type FontTable, type FooterReference, type Footnote, type FootnotePosition, type FootnoteProperties, type HeaderFooter, type HeaderFooterType, type HeaderReference, type Hyperlink, type Image, type ImageCrop, type ImagePadding, type ImagePosition, type ImageSize, type ImageTransform, type ImageWrap, type InlineSdt, type Insertion, type InstrTextContent, type KnownBorderStyle, type LevelSuffix, type LineNumberRestart, type LineSpacingRule, type ListLevel, type ListMarkerFormatting, type ListRendering, MAX_REVISION_ID, type MathEquation, type MediaFile, type MoveFrom, type MoveFromRangeEnd, type MoveFromRangeStart, type MoveTo, type MoveToRangeEnd, type MoveToRangeStart, type NoBreakHyphenContent, type NoteNumberRestart, type NoteReferenceContent, type NumberFormat, type NumberingDefinitions, type NumberingInstance, PARAGRAPH_MARK_CHANGE_KINDS, type PageOrientation, type Paragraph, type ParagraphAlignment, type ParagraphContent, type ParagraphFormatting, type ParagraphMarkChange, type ParagraphMarkChangeKind, type ParagraphPropertyChange, type PictureWatermark, type PositionalTab, type PropertyChangeInfo, REVIEW_CARRIERS, type Relationship, type RelationshipMap, type RelationshipType, type ReviewCarrier, type Run, type RunContent, type RunPropertyChange, type SdtProperties, type SdtType, type Section, type SectionProperties, type SectionPropertyChange, type SectionStart, type ShadingProperties, type Shape, type ShapeContent, type ShapeFill, type ShapeGeometryAdjustment, type ShapeOutline, type ShapeTextBody, type ShapeType, type SimpleField, type SoftHyphenContent, type SpacingExplicit, type Style, type StyleDefinitions, type StyleType, type SymbolContent, type TabContent, type TabLeader, type TabStop, type TabStopAlignment, type Table, type TableBorders, type TableCell, type TableCellBorders, type TableCellFormatting, type TableCellPropertyChange, type TableFormatting, type TableLook, type TableMeasurement, type TablePropertyChange, type TableRow, type TableRowFormatting, type TableRowPropertyChange, type TableStructuralChangeInfo, type TableWidthType, type TextBox, type TextContent, type TextEffect, type TextFormatting, type TextWatermark, type Theme, type ThemeColorScheme, type ThemeColorSlot, type ThemeFont, type ThemeFontScheme, type TrackedChangeInfo, type TrackedRunChange, type TrackedRunContent, type UnderlineStyle, type VerticalAlign, type Watermark, isOoxmlSymbolCharacter, normalizeRevisionId };
|
package/dist/model/document.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, MAX_REVISION_ID, PARAGRAPH_MARK_CHANGE_KINDS, isOoxmlSymbolCharacter, normalizeRevisionId };
|
|
1
|
+
import { a as REVIEW_CARRIERS, i as PARAGRAPH_MARK_CHANGE_KINDS, n as DRAWING_RAW_XML_MODES, o as isOoxmlSymbolCharacter, r as MAX_REVISION_ID, s as normalizeRevisionId, t as DOCX_CONFORMANCE_CLASSES } from "../document-pvrjtG29.js";
|
|
2
|
+
export { DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, MAX_REVISION_ID, PARAGRAPH_MARK_CHANGE_KINDS, REVIEW_CARRIERS, isOoxmlSymbolCharacter, normalizeRevisionId };
|
package/package.json
CHANGED