@stll/docx-core 0.43.0 → 0.44.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-CEMwM5On.js → document-BuoCvTcR.js} +44 -50
- package/dist/{document-Ca6wPoTu.d.ts → document-f4_h6JMT.d.ts} +382 -244
- package/dist/docx_kernel_bg.wasm +0 -0
- package/dist/index.d.ts +15 -2
- package/dist/index.js +202 -53
- package/dist/listItems-bPpOKnLB.js +116 -0
- package/dist/model/document.d.ts +16 -3
- package/dist/model/document.js +1 -1
- package/dist/ops/documentOps.d.ts +1291 -173
- package/dist/ops/documentOps.js +32293 -15720
- package/dist/preservedMarkup-BWpGhchw.d.ts +79 -0
- package/dist/projection.js +77 -78
- package/dist/schema/sequenceChildren.d.ts +1 -1
- package/dist/schema/sequenceChildren.js +1 -1
- package/dist/{sequenceChildren-CSn0-1ov.js → sequenceChildren-ESF-Ei5K.js} +2 -2
- package/dist/{streamingXmlParser-GnKxUuw_.js → streamingXmlParser-BqnCIEZd.js} +288 -156
- package/dist/xml/streamingXmlParser.d.ts +74 -12
- package/dist/xml/streamingXmlParser.js +1 -1
- package/dist/xml/xmlNamespaceContext.d.ts +33 -0
- package/dist/xml/xmlNamespaceContext.js +27 -1
- package/dist/zip/archive.d.ts +1 -1
- package/package.json +3 -4
- package/dist/href-ogmJmncc.js +0 -138
- package/dist/preservedMarkup-9L4lbGnE.d.ts +0 -66
package/dist/docx_kernel_bg.wasm
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as finalizeParagraphFormatting, Ct as DocumentBody, Dn as ParagraphContent, E as Style, En as Paragraph, Nn as PositionalTab, St as DocumentBackgroundDrawing, U as setDocumentBodyComments, Un as Run, V as isCanonicallyEmptyParagraphFormatting, Wn as RunContent, Xn as SectionProperties, at as BlockContent, br as TableRow, dr as Table, dt as BreakContent, fr as TableCell, i as Document, o as DocxConformanceClass, r as DOCX_CONFORMANCE_CLASSES, ri as NumberingDefinitions, s as DocxPackage, wr as TextContent, xt as DocumentBackground } from "./document-f4_h6JMT.js";
|
|
2
2
|
import { TaggedErrorClass } from "better-result";
|
|
3
3
|
import { Buffer } from "node:buffer";
|
|
4
4
|
type LegalDocumentKind = "agreement" | "letter" | "memo" | "checklist" | "pleading" | "other";
|
|
@@ -128,7 +128,9 @@ type MarkdownContent = {
|
|
|
128
128
|
* Synchronous. The caller places the blocks into a `Document` of its own
|
|
129
129
|
* (page geometry, styles, and presets are the host's decision).
|
|
130
130
|
*/
|
|
131
|
-
export declare const compileMarkdownToContent: (markdown: string
|
|
131
|
+
export declare const compileMarkdownToContent: (markdown: string, options?: {
|
|
132
|
+
editProfile?: "paragraphs" | "table";
|
|
133
|
+
}) => MarkdownContent;
|
|
132
134
|
/**
|
|
133
135
|
* Keep only http(s), mailto, and tel URLs, normalised through the URL parser.
|
|
134
136
|
* Anything else (javascript:, data:, relative paths, malformed input) drops to
|
|
@@ -298,6 +300,17 @@ type ValidateDocumentModelResult = {
|
|
|
298
300
|
issues: ValidateDocumentModelIssue[];
|
|
299
301
|
};
|
|
300
302
|
export declare const validateDocxPackage: (buffer: ArrayBuffer | Uint8Array) => Promise<ValidateDocxPackageResult>;
|
|
303
|
+
/**
|
|
304
|
+
* Every issue {@link validateDocxPackage} would report, not only the first:
|
|
305
|
+
* each part's attribute issues and every package-graph issue. A package the
|
|
306
|
+
* archive, size or root checks reject gives that one issue. Empty when the
|
|
307
|
+
* package is valid.
|
|
308
|
+
*/
|
|
309
|
+
export declare const listDocxPackageIssues: (buffer: ArrayBuffer | Uint8Array) => Promise<string[]>;
|
|
301
310
|
export declare const validateDocumentModel: (document: Document) => ValidateDocumentModelResult;
|
|
302
311
|
export declare const assertValidDocumentModel: (document: Document) => void;
|
|
312
|
+
/** Why a save refuses `author` on a tracked change, if it does. */
|
|
313
|
+
export declare const trackedChangeAuthorIssue: (author: string) => string | undefined;
|
|
314
|
+
/** Why a save refuses `author` on a comment, if it does: an empty one is allowed. */
|
|
315
|
+
export declare const commentAuthorIssue: (author: string) => string | undefined;
|
|
303
316
|
export { type Autofix, type BlockContent, type BreakContent, type CompiledLegalDocument, DOCX_CONFORMANCE_CLASSES, type Document, type DocumentBackground, type DocumentBackgroundDrawing, type DocumentBody, type DocxConformanceClass, type DocxPackage, type DocxPackageIssueCode, type LegalDraft, type LegalDraftBlock, type LegalDraftDiagnostic, type LegalSourceCompileOptions, type LegalSourceCompileResult, type LegalSourceDocxCompileResult, type LegalSourceParseResult, type MarkdownContent, type Paragraph, type ParagraphContent, type PositionalTab, type Run, type RunContent, type SectionProperties, type Style, type Table, type TableCell, type TableRow, type TextContent, type ValidateDocumentModelIssue, type ValidateDocumentModelResult, type ValidateDocxPackageResult, finalizeParagraphFormatting, isCanonicallyEmptyParagraphFormatting, setDocumentBodyComments };
|