@stll/docx-core 0.19.0 → 0.19.2
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.
|
@@ -409,6 +409,31 @@ type TableFormatting = {
|
|
|
409
409
|
floating?: FloatingTableProperties;
|
|
410
410
|
/** Right to left table */
|
|
411
411
|
bidi?: boolean;
|
|
412
|
+
/**
|
|
413
|
+
* The table's `w:tblGrid`, verbatim.
|
|
414
|
+
*
|
|
415
|
+
* The grid is a sibling of `w:tblPr` rather than a child of it, but it is
|
|
416
|
+
* the table's own property set that travels through the editable model, so
|
|
417
|
+
* it rides along here. Rebuilding the grid from the column widths alone
|
|
418
|
+
* drops `w:tblGridChange` — the tracked record of a grid a reviewer resized
|
|
419
|
+
* — which nothing else in the model carries.
|
|
420
|
+
*/
|
|
421
|
+
gridSourceXml?: string;
|
|
422
|
+
/**
|
|
423
|
+
* The element this formatting was parsed from, verbatim.
|
|
424
|
+
*
|
|
425
|
+
* A typed model covers what the editor understands, and a document carries
|
|
426
|
+
* more than that: conditional-format flags, properties a later revision of
|
|
427
|
+
* the format added, properties a producer wrote that nothing here reads.
|
|
428
|
+
* Rebuilding the element from the model alone drops every one of them, so a
|
|
429
|
+
* save that rewrites an untouched table would change it.
|
|
430
|
+
*
|
|
431
|
+
* The source therefore travels with the parse, and the serializer writes it
|
|
432
|
+
* back unchanged while nothing in the model has moved. It is dropped the
|
|
433
|
+
* moment an edit changes a modelled value, because the two would then
|
|
434
|
+
* disagree and the source is the stale one.
|
|
435
|
+
*/
|
|
436
|
+
sourceXml?: string;
|
|
412
437
|
};
|
|
413
438
|
/**
|
|
414
439
|
* Table row formatting properties (w:trPr)
|
|
@@ -436,6 +461,21 @@ type TableRowFormatting = {
|
|
|
436
461
|
hidden?: boolean;
|
|
437
462
|
/** Conditional format style */
|
|
438
463
|
conditionalFormat?: ConditionalFormatStyle;
|
|
464
|
+
/**
|
|
465
|
+
* The element this formatting was parsed from, verbatim.
|
|
466
|
+
*
|
|
467
|
+
* A typed model covers what the editor understands, and a document carries
|
|
468
|
+
* more than that: conditional-format flags, properties a later revision of
|
|
469
|
+
* the format added, properties a producer wrote that nothing here reads.
|
|
470
|
+
* Rebuilding the element from the model alone drops every one of them, so a
|
|
471
|
+
* save that rewrites an untouched table would change it.
|
|
472
|
+
*
|
|
473
|
+
* The source therefore travels with the parse, and the serializer writes it
|
|
474
|
+
* back unchanged while nothing in the model has moved. It is dropped the
|
|
475
|
+
* moment an edit changes a modelled value, because the two would then
|
|
476
|
+
* disagree and the source is the stale one.
|
|
477
|
+
*/
|
|
478
|
+
sourceXml?: string;
|
|
439
479
|
};
|
|
440
480
|
/**
|
|
441
481
|
* Conditional format style
|
|
@@ -494,6 +534,21 @@ type TableCellFormatting = {
|
|
|
494
534
|
hideMark?: boolean;
|
|
495
535
|
/** Conditional format style */
|
|
496
536
|
conditionalFormat?: ConditionalFormatStyle;
|
|
537
|
+
/**
|
|
538
|
+
* The element this formatting was parsed from, verbatim.
|
|
539
|
+
*
|
|
540
|
+
* A typed model covers what the editor understands, and a document carries
|
|
541
|
+
* more than that: conditional-format flags, properties a later revision of
|
|
542
|
+
* the format added, properties a producer wrote that nothing here reads.
|
|
543
|
+
* Rebuilding the element from the model alone drops every one of them, so a
|
|
544
|
+
* save that rewrites an untouched table would change it.
|
|
545
|
+
*
|
|
546
|
+
* The source therefore travels with the parse, and the serializer writes it
|
|
547
|
+
* back unchanged while nothing in the model has moved. It is dropped the
|
|
548
|
+
* moment an edit changes a modelled value, because the two would then
|
|
549
|
+
* disagree and the source is the stale one.
|
|
550
|
+
*/
|
|
551
|
+
sourceXml?: string;
|
|
497
552
|
};
|
|
498
553
|
//#endregion
|
|
499
554
|
//#region src/model/lists.d.ts
|
|
@@ -1295,6 +1350,16 @@ type TrackedChangeInfo = {
|
|
|
1295
1350
|
* and carried through the round-trip when present on the source document.
|
|
1296
1351
|
*/
|
|
1297
1352
|
initials?: string;
|
|
1353
|
+
/**
|
|
1354
|
+
* The UTC companion to `w:date` a recent producer writes alongside it, kept
|
|
1355
|
+
* with the prefix the document bound it under: the attribute names a
|
|
1356
|
+
* namespace the part declares on its root, and re-emitting it under a
|
|
1357
|
+
* prefix of our choosing would name one that is not there.
|
|
1358
|
+
*/
|
|
1359
|
+
utcDate?: {
|
|
1360
|
+
attribute: string;
|
|
1361
|
+
value: string;
|
|
1362
|
+
};
|
|
1298
1363
|
};
|
|
1299
1364
|
/**
|
|
1300
1365
|
* Generic tracked property-change wrapper metadata (w:*PrChange)
|
|
@@ -2215,6 +2280,11 @@ type DocumentSettings = {
|
|
|
2215
2280
|
* it is a document-wide flag; absent means odd/even share one header.
|
|
2216
2281
|
*/
|
|
2217
2282
|
evenAndOddHeaders?: boolean;
|
|
2283
|
+
/**
|
|
2284
|
+
* `w:adjustLineHeightInTable` (§17.15.3.1): apply the section line-grid
|
|
2285
|
+
* pitch to paragraphs inside table cells.
|
|
2286
|
+
*/
|
|
2287
|
+
adjustLineHeightInTable?: true;
|
|
2218
2288
|
/**
|
|
2219
2289
|
* `w:updateFields` (§17.15.1.93) — ask the consuming application to
|
|
2220
2290
|
* recompute every field when the document opens. Set by generators that
|
package/dist/docx_kernel_bg.wasm
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as PositionalTab, Jt as Table, N as DocumentBody, Ot as Run, Pt as SectionProperties, Qt as TableRow, Yt as TableCell, _n as NumberingDefinitions, a as DocxPackage, b as BlockContent, bt as Paragraph, i as DocxConformanceClass, kt as RunContent, n as Document, nn as TextContent, p as Style, t as DOCX_CONFORMANCE_CLASSES, w as BreakContent, xt as ParagraphContent } from "./document-
|
|
1
|
+
import { Et as PositionalTab, Jt as Table, N as DocumentBody, Ot as Run, Pt as SectionProperties, Qt as TableRow, Yt as TableCell, _n as NumberingDefinitions, a as DocxPackage, b as BlockContent, bt as Paragraph, i as DocxConformanceClass, kt as RunContent, n as Document, nn as TextContent, p as Style, t as DOCX_CONFORMANCE_CLASSES, w as BreakContent, xt as ParagraphContent } from "./document-BPmz_Q5c.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/model/document.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ImagePosition, $t as TableRowPropertyChange, A as ComplexField, An as TableBorders, At as RunPropertyChange, B as FieldCharContent, Bn as UnderlineStyle, Bt as ShapeGeometryAdjustment, C as BookmarkStart, Cn as LineSpacingRule, Ct as ParagraphMarkChangeKind, D as CommentRangeEnd, Dn as TabLeader, Dt as PropertyChangeInfo, E as Comment, En as SpacingExplicit, Et as PositionalTab, F as DrawingRawXmlMode, Fn as TableMeasurement, Ft as SectionPropertyChange, G as FootnoteProperties, Gn as ThemeColorSlot, Gt as SoftHyphenContent, H as FooterReference, Hn as ColorValue, Ht as ShapeTextBody, I as Endnote, In as TableRowFormatting, It as SectionStart, J as HeaderReference, Jt as Table, K as HeaderFooter, Kt as SymbolContent, L as EndnotePosition, Ln as TableWidthType, Lt as Shape, M as Deletion, Mn as TableCellFormatting, Mt as SdtType, N as DocumentBody, Nn as TableFormatting, Nt as Section, O as CommentRangeStart, On as TabStop, Ot as Run, P as DrawingContent, Pn as TableLook, Pt as SectionProperties, Q as ImagePadding, Qt as TableRow, R as EndnoteProperties, Rn as TextEffect, Rt as ShapeContent, S as BookmarkEnd, Sn as FloatingTableProperties, St as ParagraphMarkChange, T as Column, Tn as ParagraphFormatting, Tt as PictureWatermark, U as Footnote, Un as KnownBorderStyle, Ut as ShapeType, V as FieldType, Vn as BorderSpec, Vt as ShapeOutline, W as FootnotePosition, Wn as ShadingProperties, Wt as SimpleField, X as Image, Xt as TableCellPropertyChange, Y as Hyperlink, Yt as TableCell, Z as ImageCrop, Zt as TablePropertyChange, _ as ThemeColorScheme, _n as NumberingDefinitions, _t as NoteReferenceContent, a as DocxPackage, an as TrackedRunChange, at as InstrTextContent, b as BlockContent, bn as ConditionalFormatStyle, bt as Paragraph, c as FontTable, cn as Watermark, ct as MathEquation, d as RelationshipMap, dn as AbstractNumbering, dt as MoveFromRangeStart, en as TableStructuralChangeInfo, et as ImageSize, f as RelationshipType, fn as LevelSuffix, ft as MoveTo, g as Theme, gn as NumberFormat, gt as NoteNumberRestart, h as StyleType, hn as ListRendering, ht as NoBreakHyphenContent, i as DocxConformanceClass, in as TrackedChangeInfo, it as Insertion, j as DRAWING_RAW_XML_MODES, jn as TableCellBorders, jt as SdtProperties, k as CommentReference, kn as TabStopAlignment, kt as RunContent, l as MediaFile, ln as isOoxmlSymbolCharacter, lt as MoveFrom, m as StyleDefinitions, mn as ListMarkerFormatting, mt as MoveToRangeStart, n as Document, nn as TextContent, nt as ImageWrap, o as DocDefaults, on as TrackedRunContent, ot as LineNumberRestart, p as Style, pn as ListLevel, pt as MoveToRangeEnd, q as HeaderFooterType, qt as TabContent, r as DocumentSettings, rn as TextWatermark, rt as InlineSdt, s as FontInfo, sn as VerticalAlign, st as MAX_REVISION_ID, t as DOCX_CONFORMANCE_CLASSES, tn as TextBox, tt as ImageTransform, u as Relationship, un as normalizeRevisionId, ut as MoveFromRangeEnd, v as ThemeFont, vn as NumberingInstance, vt as PARAGRAPH_MARK_CHANGE_KINDS, w as BreakContent, wn as ParagraphAlignment, wt as ParagraphPropertyChange, x as BlockSdt, xn as EmphasisMark, xt as ParagraphContent, y as ThemeFontScheme, yn as CellMargins, yt as PageOrientation, z as Field, zn as TextFormatting, zt as ShapeFill } from "../document-
|
|
1
|
+
import { $ as ImagePosition, $t as TableRowPropertyChange, A as ComplexField, An as TableBorders, At as RunPropertyChange, B as FieldCharContent, Bn as UnderlineStyle, Bt as ShapeGeometryAdjustment, C as BookmarkStart, Cn as LineSpacingRule, Ct as ParagraphMarkChangeKind, D as CommentRangeEnd, Dn as TabLeader, Dt as PropertyChangeInfo, E as Comment, En as SpacingExplicit, Et as PositionalTab, F as DrawingRawXmlMode, Fn as TableMeasurement, Ft as SectionPropertyChange, G as FootnoteProperties, Gn as ThemeColorSlot, Gt as SoftHyphenContent, H as FooterReference, Hn as ColorValue, Ht as ShapeTextBody, I as Endnote, In as TableRowFormatting, It as SectionStart, J as HeaderReference, Jt as Table, K as HeaderFooter, Kt as SymbolContent, L as EndnotePosition, Ln as TableWidthType, Lt as Shape, M as Deletion, Mn as TableCellFormatting, Mt as SdtType, N as DocumentBody, Nn as TableFormatting, Nt as Section, O as CommentRangeStart, On as TabStop, Ot as Run, P as DrawingContent, Pn as TableLook, Pt as SectionProperties, Q as ImagePadding, Qt as TableRow, R as EndnoteProperties, Rn as TextEffect, Rt as ShapeContent, S as BookmarkEnd, Sn as FloatingTableProperties, St as ParagraphMarkChange, T as Column, Tn as ParagraphFormatting, Tt as PictureWatermark, U as Footnote, Un as KnownBorderStyle, Ut as ShapeType, V as FieldType, Vn as BorderSpec, Vt as ShapeOutline, W as FootnotePosition, Wn as ShadingProperties, Wt as SimpleField, X as Image, Xt as TableCellPropertyChange, Y as Hyperlink, Yt as TableCell, Z as ImageCrop, Zt as TablePropertyChange, _ as ThemeColorScheme, _n as NumberingDefinitions, _t as NoteReferenceContent, a as DocxPackage, an as TrackedRunChange, at as InstrTextContent, b as BlockContent, bn as ConditionalFormatStyle, bt as Paragraph, c as FontTable, cn as Watermark, ct as MathEquation, d as RelationshipMap, dn as AbstractNumbering, dt as MoveFromRangeStart, en as TableStructuralChangeInfo, et as ImageSize, f as RelationshipType, fn as LevelSuffix, ft as MoveTo, g as Theme, gn as NumberFormat, gt as NoteNumberRestart, h as StyleType, hn as ListRendering, ht as NoBreakHyphenContent, i as DocxConformanceClass, in as TrackedChangeInfo, it as Insertion, j as DRAWING_RAW_XML_MODES, jn as TableCellBorders, jt as SdtProperties, k as CommentReference, kn as TabStopAlignment, kt as RunContent, l as MediaFile, ln as isOoxmlSymbolCharacter, lt as MoveFrom, m as StyleDefinitions, mn as ListMarkerFormatting, mt as MoveToRangeStart, n as Document, nn as TextContent, nt as ImageWrap, o as DocDefaults, on as TrackedRunContent, ot as LineNumberRestart, p as Style, pn as ListLevel, pt as MoveToRangeEnd, q as HeaderFooterType, qt as TabContent, r as DocumentSettings, rn as TextWatermark, rt as InlineSdt, s as FontInfo, sn as VerticalAlign, st as MAX_REVISION_ID, t as DOCX_CONFORMANCE_CLASSES, tn as TextBox, tt as ImageTransform, u as Relationship, un as normalizeRevisionId, ut as MoveFromRangeEnd, v as ThemeFont, vn as NumberingInstance, vt as PARAGRAPH_MARK_CHANGE_KINDS, w as BreakContent, wn as ParagraphAlignment, wt as ParagraphPropertyChange, x as BlockSdt, xn as EmphasisMark, xt as ParagraphContent, y as ThemeFontScheme, yn as CellMargins, yt as PageOrientation, z as Field, zn as TextFormatting, zt as ShapeFill } from "../document-BPmz_Q5c.js";
|
|
2
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 };
|
package/package.json
CHANGED