@stll/docx-core 0.1.1 → 0.3.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.
@@ -93,6 +93,11 @@ type TextFormatting = {
93
93
  hAnsiTheme?: string;
94
94
  eastAsiaTheme?: string;
95
95
  csTheme?: string;
96
+ }; /** Run language metadata (`w:lang`) used by spelling and line breaking. */
97
+ language?: {
98
+ val?: string;
99
+ eastAsia?: string;
100
+ bidi?: string;
96
101
  }; /** Character spacing in twips (w:spacing) */
97
102
  spacing?: number; /** Raised/lowered text position in half-points (w:position) */
98
103
  position?: number; /** Horizontal text scale percentage (w:w) */
@@ -141,7 +146,9 @@ type SpacingExplicit = {
141
146
  };
142
147
  type ParagraphFormatting = {
143
148
  /** Paragraph alignment (w:jc) */alignment?: ParagraphAlignment; /** Text direction (w:bidi) */
144
- bidi?: boolean; /** Spacing before in twips (w:spacing/@w:before) */
149
+ bidi?: boolean; /** Apply East Asian first/last-character line-breaking rules (w:kinsoku). */
150
+ kinsoku?: boolean; /** Allow punctuation to hang beyond the text margin (w:overflowPunct). */
151
+ overflowPunctuation?: boolean; /** Spacing before in twips (w:spacing/@w:before) */
145
152
  spaceBefore?: number; /** Spacing after in twips (w:spacing/@w:after) */
146
153
  spaceAfter?: number; /** Line spacing value (w:spacing/@w:line) */
147
154
  lineSpacing?: number; /** Line spacing rule (w:spacing/@w:lineRule) */
@@ -188,8 +195,12 @@ type ParagraphFormatting = {
188
195
  outlineLevel?: number; /** Paragraph style ID (w:pStyle) */
189
196
  styleId?: string; /** Text frame properties (w:framePr) */
190
197
  frame?: {
198
+ dropCap?: "none" | "drop" | "margin";
199
+ lines?: number;
191
200
  width?: number;
192
201
  height?: number;
202
+ hSpace?: number;
203
+ vSpace?: number;
193
204
  hAnchor?: "text" | "margin" | "page";
194
205
  vAnchor?: "text" | "margin" | "page";
195
206
  x?: number;
@@ -229,6 +240,14 @@ type TableBorders = {
229
240
  insideH?: BorderSpec;
230
241
  insideV?: BorderSpec;
231
242
  };
243
+ /**
244
+ * Table cell borders, including w:tl2br (top-left to bottom-right) and
245
+ * w:tr2bl (top-right to bottom-left).
246
+ */
247
+ type TableCellBorders = TableBorders & {
248
+ topLeftToBottomRight?: BorderSpec;
249
+ topRightToBottomLeft?: BorderSpec;
250
+ };
232
251
  /**
233
252
  * Cell margins
234
253
  */
@@ -286,7 +305,11 @@ type TableFormatting = {
286
305
  * Table row formatting properties (w:trPr)
287
306
  */
288
307
  type TableRowFormatting = {
289
- /** Row height */height?: TableMeasurement; /** Height rule */
308
+ /** Number of table grid columns omitted before the first cell */gridBefore?: number; /** Preferred width of the omitted leading grid columns */
309
+ widthBefore?: TableMeasurement; /** Number of table grid columns omitted after the last cell */
310
+ gridAfter?: number; /** Preferred width of the omitted trailing grid columns */
311
+ widthAfter?: TableMeasurement; /** Row height */
312
+ height?: TableMeasurement; /** Height rule */
290
313
  heightRule?: "auto" | "atLeast" | "exact"; /** Header row (repeats on each page) */
291
314
  header?: boolean; /** Allow row to break across pages */
292
315
  cantSplit?: boolean; /** Row justification */
@@ -316,7 +339,7 @@ type ConditionalFormatStyle = {
316
339
  */
317
340
  type TableCellFormatting = {
318
341
  /** Cell width */width?: TableMeasurement; /** Cell borders */
319
- borders?: TableBorders; /** Cell margins (override table default) */
342
+ borders?: TableCellBorders; /** Cell margins (override table default) */
320
343
  margins?: CellMargins; /** Cell shading/background */
321
344
  shading?: ShadingProperties; /** Vertical alignment */
322
345
  verticalAlign?: "top" | "center" | "bottom"; /** Text direction */
@@ -393,7 +416,9 @@ type ListRendering = {
393
416
  numFmt?: NumberFormat; /** Whether the list marker is hidden (w:vanish on level rPr) */
394
417
  markerHidden?: boolean; /** Marker font family from numbering level rPr (ascii name) */
395
418
  markerFontFamily?: string; /** Marker font size from numbering level rPr, in points */
396
- markerFontSize?: number;
419
+ markerFontSize?: number; /** Marker bold state from numbering level rPr */
420
+ markerBold?: boolean; /** Horizontal alignment of the marker around the paragraph's list anchor. */
421
+ markerAlignment?: "left" | "center" | "right";
397
422
  /**
398
423
  * `w:caps` on the numbering level rPr — the marker text renders in upper
399
424
  * case (e.g. "SCHEDULE 1" instead of "Schedule 1"). Apply at substitution
@@ -795,7 +820,8 @@ type TextBox = {
795
820
  wrap?: ImageWrap; /** Fill */
796
821
  fill?: ShapeFill; /** Outline */
797
822
  outline?: ShapeOutline; /** Text content */
798
- content: Paragraph[]; /** Internal margins */
823
+ content: Paragraph[]; /** Text fitting behavior */
824
+ autoFit?: ShapeTextBody["autoFit"]; /** Internal margins */
799
825
  margins?: {
800
826
  top?: number;
801
827
  bottom?: number;
@@ -1090,14 +1116,14 @@ type SdtProperties = {
1090
1116
  * Inline SDT (content control within a paragraph).
1091
1117
  *
1092
1118
  * OOXML allows runs, hyperlinks, simple/complex fields, nested SDTs,
1093
- * and math at this level. All of them must survive parse → edit → save
1094
- * so docProps-bound fields and similar template content do not lose
1095
- * their wrapper on round-trip.
1119
+ * tracked insertions/deletions, and math at this level. All of them must survive
1120
+ * parse → edit → save so docProps-bound fields and reviewed template
1121
+ * content do not lose their wrapper on round-trip.
1096
1122
  */
1097
1123
  type InlineSdt = {
1098
1124
  type: "inlineSdt"; /** SDT properties */
1099
1125
  properties: SdtProperties; /** Inline content held inside the control */
1100
- content: (Run | Hyperlink | SimpleField | ComplexField | InlineSdt | MathEquation)[];
1126
+ content: (Run | Hyperlink | SimpleField | ComplexField | InlineSdt | Insertion | Deletion | MathEquation)[];
1101
1127
  };
1102
1128
  /**
1103
1129
  * Block-level SDT (content control wrapping paragraphs/tables).
@@ -1615,13 +1641,36 @@ type DocumentSettings = {
1615
1641
  themeFontLang?: {
1616
1642
  eastAsia?: string;
1617
1643
  bidi?: string;
1618
- };
1619
- };
1620
- /**
1621
- * Complete DOCX package structure
1622
- */
1644
+ }; /** Automatically hyphenate eligible paragraphs (`w:autoHyphenation`). */
1645
+ autoHyphenation?: boolean; /** Keep all-capital words unhyphenated (`w:doNotHyphenateCaps`). */
1646
+ doNotHyphenateCaps?: boolean; /** Maximum consecutive automatically hyphenated lines; zero means unlimited. */
1647
+ consecutiveHyphenLimit?: number; /** Legacy hyphenation zone (`w:hyphenationZone`) in twips; retained for compatibility tooling. */
1648
+ hyphenationZoneTwips?: number; /** Word/OOXML document-wide line-breaking overrides. */
1649
+ lineBreakRules?: {
1650
+ noLineBreaksBefore?: {
1651
+ language?: string;
1652
+ characters: string;
1653
+ };
1654
+ noLineBreaksAfter?: {
1655
+ language?: string;
1656
+ characters: string;
1657
+ };
1658
+ useLegacyEthiopicAmharicRules?: boolean;
1659
+ }; /** Move a break-only paragraph mark onto the page after its hard page break. */
1660
+ splitPageBreakAndParagraphMark?: boolean;
1661
+ };
1662
+ /** DOCX package conformance classes. */
1663
+ declare const DOCX_CONFORMANCE_CLASSES: Readonly<{
1664
+ readonly STRICT: "strict";
1665
+ readonly TRANSITIONAL: "transitional";
1666
+ readonly UNKNOWN: "unknown";
1667
+ }>;
1668
+ /** Conformance class detected from a DOCX package. */
1669
+ type DocxConformanceClass = (typeof DOCX_CONFORMANCE_CLASSES)[keyof typeof DOCX_CONFORMANCE_CLASSES];
1670
+ /** Complete DOCX package structure. */
1623
1671
  type DocxPackage = {
1624
- /** Document body */document: DocumentBody; /** Document-wide settings (`word/settings.xml`). */
1672
+ /** Conformance class detected from the main document namespace. */conformanceClass?: DocxConformanceClass; /** Document body */
1673
+ document: DocumentBody; /** Document-wide settings (`word/settings.xml`). */
1625
1674
  settings?: DocumentSettings; /** Style definitions */
1626
1675
  styles?: StyleDefinitions; /** Theme */
1627
1676
  theme?: Theme; /** Numbering definitions */
@@ -1656,4 +1705,4 @@ type Document = {
1656
1705
  warnings?: string[];
1657
1706
  };
1658
1707
  //#endregion
1659
- export { InlineSdt as $, AbstractNumbering as $t, DocumentBody as A, ShadingProperties as An, ShapeContent as At, FootnotePosition as B, TableCell as Bt, Column as C, TableWidthType as Cn, SdtProperties as Ct, CommentReference as D, BorderSpec as Dn, SectionPropertyChange as Dt, CommentRangeStart as E, UnderlineStyle as En, SectionProperties as Et, Field as F, SimpleField as Ft, Hyperlink as G, TableStructuralChangeInfo as Gt, HeaderFooter as H, TablePropertyChange as Ht, FieldCharContent as I, SoftHyphenContent as It, ImagePadding as J, TextWatermark as Jt, Image as K, TextBox as Kt, FieldType as L, SymbolContent as Lt, Endnote as M, ShapeOutline as Mt, EndnotePosition as N, ShapeTextBody as Nt, ComplexField as O, ColorValue as On, SectionStart as Ot, EndnoteProperties as P, ShapeType as Pt, ImageWrap as Q, Watermark as Qt, FooterReference as R, TabContent as Rt, BreakContent as S, TableRowFormatting as Sn, RunPropertyChange as St, CommentRangeEnd as T, TextFormatting as Tn, Section as Tt, HeaderFooterType as U, TableRow as Ut, FootnoteProperties as V, TableCellPropertyChange as Vt, HeaderReference as W, TableRowPropertyChange as Wt, ImageSize as X, TrackedRunChange as Xt, ImagePosition as Y, TrackedChangeInfo as Yt, ImageTransform as Z, VerticalAlign as Zt, ThemeFontScheme as _, TableBorders as _n, ParagraphPropertyChange as _t, FontInfo as a, NumberingInstance as an, MoveFromRangeEnd as at, BookmarkEnd as b, TableLook as bn, Run as bt, Relationship as c, EmphasisMark as cn, MoveToRangeEnd as ct, Style as d, ParagraphAlignment as dn, NoteNumberRestart as dt, LevelSuffix as en, Insertion as et, StyleDefinitions as f, ParagraphFormatting as fn, NoteReferenceContent as ft, ThemeFont as g, TabStopAlignment as gn, ParagraphMarkChange as gt, ThemeColorScheme as h, TabStop as hn, ParagraphContent as ht, DocDefaults as i, NumberingDefinitions as in, MoveFrom as it, DrawingContent as j, ThemeColorSlot as jn, ShapeFill as jt, Deletion as k, KnownBorderStyle as kn, Shape as kt, RelationshipMap as l, FloatingTableProperties as ln, MoveToRangeStart as lt, Theme as m, TabLeader as mn, Paragraph as mt, DocumentSettings as n, ListRendering as nn, LineNumberRestart as nt, FontTable as o, CellMargins as on, MoveFromRangeStart as ot, StyleType as p, SpacingExplicit as pn, PageOrientation as pt, ImageCrop as q, TextContent as qt, DocxPackage as r, NumberFormat as rn, MathEquation as rt, MediaFile as s, ConditionalFormatStyle as sn, MoveTo as st, Document as t, ListLevel as tn, InstrTextContent as tt, RelationshipType as u, LineSpacingRule as un, NoBreakHyphenContent as ut, BlockContent as v, TableCellFormatting as vn, PictureWatermark as vt, Comment as w, TextEffect as wn, SdtType as wt, BookmarkStart as x, TableMeasurement as xn, RunContent as xt, BlockSdt as y, TableFormatting as yn, PropertyChangeInfo as yt, Footnote as z, Table as zt };
1708
+ export { ImageTransform as $, VerticalAlign as $t, ComplexField as A, BorderSpec as An, SectionStart as At, FooterReference as B, TabContent as Bt, BookmarkStart as C, TableLook as Cn, RunContent as Ct, CommentRangeEnd as D, TextEffect as Dn, Section as Dt, Comment as E, TableWidthType as En, SdtType as Et, EndnotePosition as F, ShapeTextBody as Ft, HeaderFooterType as G, TableRow as Gt, FootnotePosition as H, TableCell as Ht, EndnoteProperties as I, ShapeType as It, Image as J, TextBox as Jt, HeaderReference as K, TableRowPropertyChange as Kt, Field as L, SimpleField as Lt, DocumentBody as M, KnownBorderStyle as Mn, ShapeContent as Mt, DrawingContent as N, ShadingProperties as Nn, ShapeFill as Nt, CommentRangeStart as O, TextFormatting as On, SectionProperties as Ot, Endnote as P, ThemeColorSlot as Pn, ShapeOutline as Pt, ImageSize as Q, TrackedRunChange as Qt, FieldCharContent as R, SoftHyphenContent as Rt, BookmarkEnd as S, TableFormatting as Sn, Run as St, Column as T, TableRowFormatting as Tn, SdtProperties as Tt, FootnoteProperties as U, TableCellPropertyChange as Ut, Footnote as V, Table as Vt, HeaderFooter as W, TablePropertyChange as Wt, ImagePadding as X, TextWatermark as Xt, ImageCrop as Y, TextContent as Yt, ImagePosition as Z, TrackedChangeInfo as Zt, ThemeColorScheme as _, TabStop as _n, ParagraphContent as _t, DocxPackage as a, NumberFormat as an, MathEquation as at, BlockContent as b, TableCellBorders as bn, PictureWatermark as bt, FontTable as c, CellMargins as cn, MoveFromRangeStart as ct, RelationshipMap as d, FloatingTableProperties as dn, MoveToRangeStart as dt, Watermark as en, ImageWrap as et, RelationshipType as f, LineSpacingRule as fn, NoBreakHyphenContent as ft, Theme as g, TabLeader as gn, Paragraph as gt, StyleType as h, SpacingExplicit as hn, PageOrientation as ht, DocxConformanceClass as i, ListRendering as in, LineNumberRestart as it, Deletion as j, ColorValue as jn, Shape as jt, CommentReference as k, UnderlineStyle as kn, SectionPropertyChange as kt, MediaFile as l, ConditionalFormatStyle as ln, MoveTo as lt, StyleDefinitions as m, ParagraphFormatting as mn, NoteReferenceContent as mt, Document as n, LevelSuffix as nn, Insertion as nt, DocDefaults as o, NumberingDefinitions as on, MoveFrom as ot, Style as p, ParagraphAlignment as pn, NoteNumberRestart as pt, Hyperlink as q, TableStructuralChangeInfo as qt, DocumentSettings as r, ListLevel as rn, InstrTextContent as rt, FontInfo as s, NumberingInstance as sn, MoveFromRangeEnd as st, DOCX_CONFORMANCE_CLASSES as t, AbstractNumbering as tn, InlineSdt as tt, Relationship as u, EmphasisMark as un, MoveToRangeEnd as ut, ThemeFont as v, TabStopAlignment as vn, ParagraphMarkChange as vt, BreakContent as w, TableMeasurement as wn, RunPropertyChange as wt, BlockSdt as x, TableCellFormatting as xn, PropertyChangeInfo as xt, ThemeFontScheme as y, TableBorders as yn, ParagraphPropertyChange as yt, FieldType as z, SymbolContent as zt };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as DocumentBody, Bt as TableCell, Et as SectionProperties, S as BreakContent, Ut as TableRow, bt as Run, d as Style, ht as ParagraphContent, mt as Paragraph, qt as TextContent, r as DocxPackage, t as Document, v as BlockContent, xt as RunContent, zt as Table } from "./document-IR6XvC0O.js";
1
+ import { Ct as RunContent, Gt as TableRow, Ht as TableCell, M as DocumentBody, Ot as SectionProperties, St as Run, Vt as Table, Yt as TextContent, _t as ParagraphContent, a as DocxPackage, b as BlockContent, gt as Paragraph, i as DocxConformanceClass, n as Document, p as Style, t as DOCX_CONFORMANCE_CLASSES, w as BreakContent } from "./document-Qbe-wA-j.js";
2
2
 
3
3
  //#region src/legal-source/types.d.ts
4
4
  type LegalDocumentKind = "agreement" | "letter" | "memo" | "checklist" | "pleading" | "other";
@@ -140,4 +140,4 @@ declare const validateDocxPackage: (buffer: ArrayBuffer | Uint8Array) => Promise
140
140
  declare const validateDocumentModel: (document: Document) => ValidateDocumentModelResult;
141
141
  declare const assertValidDocumentModel: (document: Document) => void;
142
142
  //#endregion
143
- export { type Autofix, type BlockContent, type BreakContent, type CompiledLegalDocument, type Document, type DocumentBody, type DocxPackage, type LegalDraft, type LegalDraftBlock, type LegalDraftDiagnostic, type LegalSourceCompileOptions, type LegalSourceCompileResult, type LegalSourceDocxCompileResult, type LegalSourceParseResult, type Paragraph, type ParagraphContent, type Run, type RunContent, type SectionProperties, type Style, type Table, type TableCell, type TableRow, type TextContent, type ValidateDocumentModelIssue, type ValidateDocumentModelResult, type ValidateDocxPackageResult, assertValidDocumentModel, compileLegalSourceToDocument, compileLegalSourceToDocx, parseLegalSource, serializeDocumentToDocx, validateDocumentModel, validateDocxPackage, validateLegalDraft };
143
+ export { type Autofix, type BlockContent, type BreakContent, type CompiledLegalDocument, DOCX_CONFORMANCE_CLASSES, type Document, type DocumentBody, type DocxConformanceClass, type DocxPackage, type LegalDraft, type LegalDraftBlock, type LegalDraftDiagnostic, type LegalSourceCompileOptions, type LegalSourceCompileResult, type LegalSourceDocxCompileResult, type LegalSourceParseResult, type Paragraph, type ParagraphContent, type Run, type RunContent, type SectionProperties, type Style, type Table, type TableCell, type TableRow, type TextContent, type ValidateDocumentModelIssue, type ValidateDocumentModelResult, type ValidateDocxPackageResult, assertValidDocumentModel, compileLegalSourceToDocument, compileLegalSourceToDocx, parseLegalSource, serializeDocumentToDocx, validateDocumentModel, validateDocxPackage, validateLegalDraft };
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { DOCX_CONFORMANCE_CLASSES } from "./model/document.js";
1
2
  import JSZip from "jszip";
2
3
  import { panic } from "better-result";
3
4
  //#region src/serialize/xml.ts
@@ -1935,4 +1936,4 @@ const compileLegalSourceToDocx = async (source, options = {}) => {
1935
1936
  };
1936
1937
  };
1937
1938
  //#endregion
1938
- export { assertValidDocumentModel, compileLegalSourceToDocument, compileLegalSourceToDocx, parseLegalSource, serializeDocumentToDocx, validateDocumentModel, validateDocxPackage, validateLegalDraft };
1939
+ export { DOCX_CONFORMANCE_CLASSES, assertValidDocumentModel, compileLegalSourceToDocument, compileLegalSourceToDocx, parseLegalSource, serializeDocumentToDocx, validateDocumentModel, validateDocxPackage, validateLegalDraft };
@@ -1,2 +1,2 @@
1
- import { $ as InlineSdt, $t as AbstractNumbering, A as DocumentBody, An as ShadingProperties, At as ShapeContent, B as FootnotePosition, Bt as TableCell, C as Column, Cn as TableWidthType, Ct as SdtProperties, D as CommentReference, Dn as BorderSpec, Dt as SectionPropertyChange, E as CommentRangeStart, En as UnderlineStyle, Et as SectionProperties, F as Field, Ft as SimpleField, G as Hyperlink, Gt as TableStructuralChangeInfo, H as HeaderFooter, Ht as TablePropertyChange, I as FieldCharContent, It as SoftHyphenContent, J as ImagePadding, Jt as TextWatermark, K as Image, Kt as TextBox, L as FieldType, Lt as SymbolContent, M as Endnote, Mt as ShapeOutline, N as EndnotePosition, Nt as ShapeTextBody, O as ComplexField, On as ColorValue, Ot as SectionStart, P as EndnoteProperties, Pt as ShapeType, Q as ImageWrap, Qt as Watermark, R as FooterReference, Rt as TabContent, S as BreakContent, Sn as TableRowFormatting, St as RunPropertyChange, T as CommentRangeEnd, Tn as TextFormatting, Tt as Section, U as HeaderFooterType, Ut as TableRow, V as FootnoteProperties, Vt as TableCellPropertyChange, W as HeaderReference, Wt as TableRowPropertyChange, X as ImageSize, Xt as TrackedRunChange, Y as ImagePosition, Yt as TrackedChangeInfo, Z as ImageTransform, Zt as VerticalAlign, _ as ThemeFontScheme, _n as TableBorders, _t as ParagraphPropertyChange, a as FontInfo, an as NumberingInstance, at as MoveFromRangeEnd, b as BookmarkEnd, bn as TableLook, bt as Run, c as Relationship, cn as EmphasisMark, ct as MoveToRangeEnd, d as Style, dn as ParagraphAlignment, dt as NoteNumberRestart, en as LevelSuffix, et as Insertion, f as StyleDefinitions, fn as ParagraphFormatting, ft as NoteReferenceContent, g as ThemeFont, gn as TabStopAlignment, gt as ParagraphMarkChange, h as ThemeColorScheme, hn as TabStop, ht as ParagraphContent, i as DocDefaults, in as NumberingDefinitions, it as MoveFrom, j as DrawingContent, jn as ThemeColorSlot, jt as ShapeFill, k as Deletion, kn as KnownBorderStyle, kt as Shape, l as RelationshipMap, ln as FloatingTableProperties, lt as MoveToRangeStart, m as Theme, mn as TabLeader, mt as Paragraph, n as DocumentSettings, nn as ListRendering, nt as LineNumberRestart, o as FontTable, on as CellMargins, ot as MoveFromRangeStart, p as StyleType, pn as SpacingExplicit, pt as PageOrientation, q as ImageCrop, qt as TextContent, r as DocxPackage, rn as NumberFormat, rt as MathEquation, s as MediaFile, sn as ConditionalFormatStyle, st as MoveTo, t as Document, tn as ListLevel, tt as InstrTextContent, u as RelationshipType, un as LineSpacingRule, ut as NoBreakHyphenContent, v as BlockContent, vn as TableCellFormatting, vt as PictureWatermark, w as Comment, wn as TextEffect, wt as SdtType, x as BookmarkStart, xn as TableMeasurement, xt as RunContent, y as BlockSdt, yn as TableFormatting, yt as PropertyChangeInfo, z as Footnote, zt as Table } from "../document-IR6XvC0O.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, type Deletion, type DocDefaults, Document, type DocumentBody, DocumentSettings, DocxPackage, type DrawingContent, 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 ListRendering, 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, type PageOrientation, type Paragraph, type ParagraphAlignment, type ParagraphContent, type ParagraphFormatting, type ParagraphMarkChange, type ParagraphPropertyChange, type PictureWatermark, 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 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 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 UnderlineStyle, type VerticalAlign, type Watermark };
1
+ import { $ as ImageTransform, $t as VerticalAlign, A as ComplexField, An as BorderSpec, At as SectionStart, B as FooterReference, Bt as TabContent, C as BookmarkStart, Cn as TableLook, Ct as RunContent, D as CommentRangeEnd, Dn as TextEffect, Dt as Section, E as Comment, En as TableWidthType, Et as SdtType, F as EndnotePosition, Ft as ShapeTextBody, G as HeaderFooterType, Gt as TableRow, H as FootnotePosition, Ht as TableCell, I as EndnoteProperties, It as ShapeType, J as Image, Jt as TextBox, K as HeaderReference, Kt as TableRowPropertyChange, L as Field, Lt as SimpleField, M as DocumentBody, Mn as KnownBorderStyle, Mt as ShapeContent, N as DrawingContent, Nn as ShadingProperties, Nt as ShapeFill, O as CommentRangeStart, On as TextFormatting, Ot as SectionProperties, P as Endnote, Pn as ThemeColorSlot, Pt as ShapeOutline, Q as ImageSize, Qt as TrackedRunChange, R as FieldCharContent, Rt as SoftHyphenContent, S as BookmarkEnd, Sn as TableFormatting, St as Run, T as Column, Tn as TableRowFormatting, Tt as SdtProperties, U as FootnoteProperties, Ut as TableCellPropertyChange, V as Footnote, Vt as Table, W as HeaderFooter, Wt as TablePropertyChange, X as ImagePadding, Xt as TextWatermark, Y as ImageCrop, Yt as TextContent, Z as ImagePosition, Zt as TrackedChangeInfo, _ as ThemeColorScheme, _n as TabStop, _t as ParagraphContent, a as DocxPackage, an as NumberFormat, at as MathEquation, b as BlockContent, bn as TableCellBorders, bt as PictureWatermark, c as FontTable, cn as CellMargins, ct as MoveFromRangeStart, d as RelationshipMap, dn as FloatingTableProperties, dt as MoveToRangeStart, en as Watermark, et as ImageWrap, f as RelationshipType, fn as LineSpacingRule, ft as NoBreakHyphenContent, g as Theme, gn as TabLeader, gt as Paragraph, h as StyleType, hn as SpacingExplicit, ht as PageOrientation, i as DocxConformanceClass, in as ListRendering, it as LineNumberRestart, j as Deletion, jn as ColorValue, jt as Shape, k as CommentReference, kn as UnderlineStyle, kt as SectionPropertyChange, l as MediaFile, ln as ConditionalFormatStyle, lt as MoveTo, m as StyleDefinitions, mn as ParagraphFormatting, mt as NoteReferenceContent, n as Document, nn as LevelSuffix, nt as Insertion, o as DocDefaults, on as NumberingDefinitions, ot as MoveFrom, p as Style, pn as ParagraphAlignment, pt as NoteNumberRestart, q as Hyperlink, qt as TableStructuralChangeInfo, r as DocumentSettings, rn as ListLevel, rt as InstrTextContent, s as FontInfo, sn as NumberingInstance, st as MoveFromRangeEnd, t as DOCX_CONFORMANCE_CLASSES, tn as AbstractNumbering, tt as InlineSdt, u as Relationship, un as EmphasisMark, ut as MoveToRangeEnd, v as ThemeFont, vn as TabStopAlignment, vt as ParagraphMarkChange, w as BreakContent, wn as TableMeasurement, wt as RunPropertyChange, x as BlockSdt, xn as TableCellFormatting, xt as PropertyChangeInfo, y as ThemeFontScheme, yn as TableBorders, yt as ParagraphPropertyChange, z as FieldType, zt as SymbolContent } from "../document-Qbe-wA-j.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, type Deletion, type DocDefaults, Document, type DocumentBody, DocumentSettings, DocxConformanceClass, DocxPackage, type DrawingContent, 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 ListRendering, 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, type PageOrientation, type Paragraph, type ParagraphAlignment, type ParagraphContent, type ParagraphFormatting, type ParagraphMarkChange, type ParagraphPropertyChange, type PictureWatermark, 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 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 UnderlineStyle, type VerticalAlign, type Watermark };
@@ -0,0 +1,9 @@
1
+ //#region src/model/document.ts
2
+ /** DOCX package conformance classes. */
3
+ const DOCX_CONFORMANCE_CLASSES = Object.freeze({
4
+ STRICT: "strict",
5
+ TRANSITIONAL: "transitional",
6
+ UNKNOWN: "unknown"
7
+ });
8
+ //#endregion
9
+ export { DOCX_CONFORMANCE_CLASSES };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/docx-core",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "Typed OOXML/DOCX document model with parsing, validation, and serialization, plus a legal-source compiler that produces DOCX packages.",
5
5
  "keywords": [
6
6
  "document-model",