@stll/docx-core 0.10.0 → 0.12.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.
Binary file
@@ -1,7 +1,7 @@
1
1
  //#region src/generated/docx_kernel.d.ts
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
- type DocxProjectionFormattingSpan = readonly [startUtf16: number, endUtf16: number, style: "bold" | "highlight"];
4
+ type DocxProjectionFormattingSpan = readonly [startUtf16: number, endUtf16: number, style: "bold" | "highlight" | "superscript"];
5
5
  type DocxProjectionStructure = readonly [] | readonly [type: "table", tableId: string, row: number, column: number];
6
6
  type DocxProjectionParagraph = readonly [ordinal: number, text: string, packageParagraphId: string | null, formatting: readonly DocxProjectionFormattingSpan[], structure: DocxProjectionStructure, styleId: string | null];
7
7
  type DocxProjectionFactSet<T> = readonly [status: "known", items: readonly T[]] | readonly [status: "unknown", reason: DocxProjectionUnknownReason];
@@ -18,20 +18,21 @@ type DocxProjectionRevisionStatus = readonly [status: "complete"] | readonly [st
18
18
  type DocxProjectionWire = readonly [schemaVersion: 3, paragraphs: readonly DocxProjectionParagraph[], structuralFacts: DocxProjectionStructuralFacts, revisionStatus: DocxProjectionRevisionStatus];
19
19
  type DocxReviewUnknownReason = "invalid-document" | "invalid-comments" | "invalid-comments-extended" | "resource-limit" | "unsupported-location";
20
20
  type DocxReviewFactSet<T> = readonly [status: "known", items: readonly T[]] | readonly [status: "unknown", reason: DocxReviewUnknownReason];
21
- type DocxReviewDetail<T> = readonly [status: "known", value: T] | readonly [status: "unknown", reason: DocxReviewUnknownReason];
22
- type DocxReviewPoint = readonly [paragraphOrdinal: number, utf8: number, utf16: number];
23
- type DocxReviewSpan = readonly [start: DocxReviewPoint, end: DocxReviewPoint];
24
- /** Compact versioned boundary tuple. Field order is stable within schema version 1. */
25
- type DocxRevisionContent = readonly [span: DocxReviewSpan, text: string, contentKind: "text" | "formatting-only"];
26
- type DocxCommentContent = readonly [anchor: DocxReviewSpan, commentText: string, referencedText: string];
27
- /** Attributed revision wire tuple; positions are named and versioned by its container. */
28
- type DocxAttributedRevision = readonly [type: "insertion" | "deletion" | "moveFrom" | "moveTo" | "cellIns" | "cellDel" | "cellMerge" | "pPrChange" | "rPrChange" | "sectPrChange" | "tblPrChange" | "trPrChange" | "tcPrChange" | "tblGridChange" | "customXmlDelRangeStart" | "customXmlDelRangeEnd" | "customXmlInsRangeStart" | "customXmlInsRangeEnd" | "customXmlMoveFromRangeStart" | "customXmlMoveFromRangeEnd" | "customXmlMoveToRangeStart" | "customXmlMoveToRangeEnd", author: string, date: string | null, revisionId: string | null, content: DocxReviewDetail<DocxRevisionContent>];
29
- /** Attributed comment wire tuple; positions are named and versioned by its container. */
30
- type DocxAttributedComment = readonly [commentId: string, author: string, initials: string | null, date: string | null, parentCommentId: string | null, threadState: "open" | "resolved", content: DocxReviewDetail<DocxCommentContent>];
21
+ type DocxRevisionKind = "insertion" | "deletion" | "moveFrom" | "moveTo" | "cellIns" | "cellDel" | "cellMerge" | "pPrChange" | "rPrChange" | "sectPrChange" | "tblPrChange" | "trPrChange" | "tcPrChange" | "tblGridChange" | "customXmlDelRangeStart" | "customXmlDelRangeEnd" | "customXmlInsRangeStart" | "customXmlInsRangeEnd" | "customXmlMoveFromRangeStart" | "customXmlMoveFromRangeEnd" | "customXmlMoveToRangeStart" | "customXmlMoveToRangeEnd";
22
+ /**
23
+ * Attributed revision wire tuple. Known content is flattened into the item so
24
+ * one review fact creates one JavaScript array at the WASM boundary.
25
+ */
26
+ type DocxAttributedRevision = readonly [type: DocxRevisionKind, author: string, date: string | null, revisionId: string | null, contentStatus: "known", startParagraphOrdinal: number, startUtf8: number, startUtf16: number, endParagraphOrdinal: number, endUtf8: number, endUtf16: number, text: string, contentKind: "text" | "formatting-only"] | readonly [type: DocxRevisionKind, author: string, date: string | null, revisionId: string | null, contentStatus: "unknown", reason: DocxReviewUnknownReason];
27
+ /**
28
+ * Attributed comment wire tuple. Known content is flattened into the item so
29
+ * one review fact creates one JavaScript array at the WASM boundary.
30
+ */
31
+ type DocxAttributedComment = readonly [commentId: string, author: string, initials: string | null, date: string | null, parentCommentId: string | null, threadState: "open" | "resolved", contentStatus: "known", startParagraphOrdinal: number, startUtf8: number, startUtf16: number, endParagraphOrdinal: number, endUtf8: number, endUtf16: number, commentText: string, referencedText: string] | readonly [commentId: string, author: string, initials: string | null, date: string | null, parentCommentId: string | null, threadState: "open" | "resolved", contentStatus: "unknown", reason: DocxReviewUnknownReason];
31
32
  /** Review-fact wire schema. A new tuple layout requires a schema-version bump. */
32
- type DocxReviewFactsWire = readonly [schemaVersion: 1, revisions: DocxReviewFactSet<DocxAttributedRevision>, comments: DocxReviewFactSet<DocxAttributedComment>];
33
+ type DocxReviewFactsWire = readonly [schemaVersion: 2, revisions: DocxReviewFactSet<DocxAttributedRevision>, comments: DocxReviewFactSet<DocxAttributedComment>];
33
34
  /** Fused package wire schema. A new tuple layout requires a schema-version bump. */
34
- type DocxPackageProjectionWire = readonly [schemaVersion: 1, document: DocxProjectionWire, reviewFacts: DocxReviewFactsWire];
35
+ type DocxPackageProjectionWire = readonly [schemaVersion: 2, document: DocxProjectionWire, reviewFacts: DocxReviewFactsWire];
35
36
  //#endregion
36
37
  //#region src/projection.d.ts
37
38
  declare const DocxProjectionInitializationError_base: import("better-result").TaggedErrorClass<"DocxProjectionInitializationError", {
@@ -67,4 +68,4 @@ declare const projectCompressedDocx: (bytes: Uint8Array) => Promise<DocxProjecti
67
68
  */
68
69
  declare const projectCompressedDocxWithReviewFacts: (bytes: Uint8Array, { textMaterialization }?: ProjectCompressedDocxWithReviewFactsOptions) => Promise<DocxPackageProjectionWire>;
69
70
  //#endregion
70
- export { type DocxAttributedComment, type DocxAttributedRevision, type DocxCommentContent, type DocxPackageProjectionWire, type DocxProjectionBookmarkFact, DocxProjectionError, type DocxProjectionFactSet, type DocxProjectionFormattingSpan, type DocxProjectionIndentationFact, DocxProjectionInitializationError, type DocxProjectionNumberingFact, type DocxProjectionOutlineLevelFact, type DocxProjectionParagraph, type DocxProjectionReferenceFact, type DocxProjectionRevisionStatus, type DocxProjectionRevisionUnsupportedReason, type DocxProjectionStructuralFacts, type DocxProjectionStructuralSpan, type DocxProjectionStructure, type DocxProjectionUnknownReason, DocxProjectionWasmSource, type DocxProjectionWire, type DocxReviewDetail, type DocxReviewFactSet, type DocxReviewFactsWire, type DocxReviewPoint, type DocxReviewSpan, type DocxReviewUnknownReason, type DocxRevisionContent, InitializeDocxProjectionOptions, ProjectCompressedDocxWithReviewFactsOptions, initializeDocxProjection, projectCompressedDocx, projectCompressedDocxWithReviewFacts };
71
+ export { type DocxAttributedComment, type DocxAttributedRevision, type DocxPackageProjectionWire, type DocxProjectionBookmarkFact, DocxProjectionError, type DocxProjectionFactSet, type DocxProjectionFormattingSpan, type DocxProjectionIndentationFact, DocxProjectionInitializationError, type DocxProjectionNumberingFact, type DocxProjectionOutlineLevelFact, type DocxProjectionParagraph, type DocxProjectionReferenceFact, type DocxProjectionRevisionStatus, type DocxProjectionRevisionUnsupportedReason, type DocxProjectionStructuralFacts, type DocxProjectionStructuralSpan, type DocxProjectionStructure, type DocxProjectionUnknownReason, DocxProjectionWasmSource, type DocxProjectionWire, type DocxReviewFactSet, type DocxReviewFactsWire, type DocxReviewUnknownReason, type DocxRevisionKind, InitializeDocxProjectionOptions, ProjectCompressedDocxWithReviewFactsOptions, initializeDocxProjection, projectCompressedDocx, projectCompressedDocxWithReviewFacts };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/docx-core",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Typed OOXML/DOCX model, validation, serialization, legal-source compilation, and browser-native package projection.",
5
5
  "keywords": [
6
6
  "document-model",