@stll/docx-core 0.31.0 → 0.33.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-3WKQA1r3.js → document-CQ0oovh0.js} +12 -1
- package/dist/{document-w6pPLpob.d.ts → document-YlRuGzLX.d.ts} +16 -5
- package/dist/docx_kernel_bg.wasm +0 -0
- package/dist/{xmlEscape-T-2DeGlS.js → href-2XSCK-T8.js} +49 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +49 -61
- package/dist/model/document.d.ts +2 -2
- package/dist/model/document.js +2 -2
- package/dist/ops/documentOps.d.ts +333 -92
- package/dist/ops/documentOps.js +2896 -527
- package/dist/projection.d.ts +2 -2
- package/dist/zip/writeZipPart.d.ts +12 -0
- package/dist/zip/writeZipPart.js +12 -0
- package/package.json +5 -1
|
@@ -1225,5 +1225,16 @@ const DOCX_CONFORMANCE_CLASSES = Object.freeze({
|
|
|
1225
1225
|
TRANSITIONAL: "transitional",
|
|
1226
1226
|
UNKNOWN: "unknown"
|
|
1227
1227
|
});
|
|
1228
|
+
/** Standard package relationships owned by semantic comment operations. */
|
|
1229
|
+
const COMMENT_PART_RELATIONSHIPS = {
|
|
1230
|
+
comments: {
|
|
1231
|
+
type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",
|
|
1232
|
+
target: "comments.xml"
|
|
1233
|
+
},
|
|
1234
|
+
commentsExtended: {
|
|
1235
|
+
type: "http://schemas.microsoft.com/office/2011/relationships/commentsExtended",
|
|
1236
|
+
target: "commentsExtended.xml"
|
|
1237
|
+
}
|
|
1238
|
+
};
|
|
1228
1239
|
//#endregion
|
|
1229
|
-
export {
|
|
1240
|
+
export { mergeParagraphNumbering as $, TEXT_DIRECTIONS as A, themeColorToken as B, isBorderStyle as C, PARAGRAPH_ALIGNMENTS as D, NUMBER_FORMATS as E, isSchemeColorValue as F, headingLevelOf as G, mintRelationshipId as H, isThemeColor as I, outlineLevelStatedValue as J, headingOutlineLevel as K, knownThemeColor as L, TEXT_DIRECTION_FLOW_BY_TOKEN as M, SCHEME_COLOR_VALUE_BY_THEME_COLOR as N, TABLE_ALIGNMENTS as O, THEME_COLOR_BY_SCHEME_COLOR_VALUE as P, isNumberingReference as Q, readThemeColor as R, isBorderNone as S, BORDER_STYLES as T, relationshipIdOf as U, THEME_COLORS as V, BODY_TEXT_OUTLINE_LEVEL as W, NO_NUMBERING_NUM_ID as X, isNumberingLevel as Y, NO_PARAGRAPH_NUMBERING as Z, presetLineDashToken as _, DRAWING_RAW_XML_MODES as a, resolveParagraphNumbering as at, borderStyleToken as b, PARAGRAPH_MARK_CHANGE_KINDS as c, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as ct, isNoteReferenceId as d, paragraphNumberingFromSlots as et, isOoxmlSymbolCharacter as f, presetLineDashFrom as g, isPresetLineDashVal as h, BIDI_CONTROLS as i, paragraphNumberingSlots as it, TEXT_DIRECTION_FLOWS as j, TAB_STOP_ALIGNMENTS as k, PROPERTY_REVISION_KINDS as l, PARSE_WARNING_CODES as lt, COUNTER_FORMATS as m, DEFAULT_TAB_STOP_TWIPS as n, paragraphNumberingReference as nt, INSERTION_SEAM_POLICIES as o, sameEffectiveParagraphNumbering as ot, normalizeRevisionId as p, outlineLevelFromStatedValue as q, DOCX_CONFORMANCE_CLASSES as r, paragraphNumberingReferenceId as rt, MAX_REVISION_ID as s, sameStatedParagraphNumbering as st, COMMENT_PART_RELATIONSHIPS as t, paragraphNumberingLevel as tt, REVIEW_CARRIERS as u, PRESET_LINE_DASH_VALS as v, statesNoBorder as w, isBorderNil as x, borderStyleFrom as y, themeColorSlot as z };
|
|
@@ -1820,7 +1820,7 @@ type SimpleField = {
|
|
|
1820
1820
|
* `EG_PContent` admits can sit here, `w:bdo` / `w:dir` / `w:smartTag` /
|
|
1821
1821
|
* `w:customXml` among them.
|
|
1822
1822
|
*/
|
|
1823
|
-
content: (Run | Hyperlink | InlineWrapper | PreservedInline)[];
|
|
1823
|
+
content: (Run | Hyperlink | InlineWrapper | PreservedInline | TrackedRunChange)[];
|
|
1824
1824
|
/** `@w:fldLock`: absent states nothing, `false` is an explicit unlock. */
|
|
1825
1825
|
fldLock?: boolean;
|
|
1826
1826
|
/** `@w:dirty`: absent states nothing, `false` explicitly forbids a recompute. */
|
|
@@ -4232,7 +4232,7 @@ type DocxPackage = {
|
|
|
4232
4232
|
/** Document-wide settings (`word/settings.xml`). */
|
|
4233
4233
|
settings?: DocumentSettings;
|
|
4234
4234
|
/** Style definitions */
|
|
4235
|
-
styles?: StyleDefinitions;
|
|
4235
|
+
styles?: StyleDefinitions | undefined;
|
|
4236
4236
|
/** Theme */
|
|
4237
4237
|
theme?: Theme;
|
|
4238
4238
|
/** Numbering definitions */
|
|
@@ -4248,9 +4248,9 @@ type DocxPackage = {
|
|
|
4248
4248
|
/** Footers by relationship ID */
|
|
4249
4249
|
footers?: Map<string, HeaderFooter>;
|
|
4250
4250
|
/** Document relationships */
|
|
4251
|
-
relationships?: RelationshipMap;
|
|
4251
|
+
relationships?: RelationshipMap | undefined;
|
|
4252
4252
|
/** Media files */
|
|
4253
|
-
media?: Map<string, MediaFile
|
|
4253
|
+
media?: Map<string, MediaFile> | undefined;
|
|
4254
4254
|
/** Document properties */
|
|
4255
4255
|
properties?: {
|
|
4256
4256
|
title?: string;
|
|
@@ -4281,5 +4281,16 @@ type Document = {
|
|
|
4281
4281
|
/** The same warnings as data: a stable code, a location, and the value. */
|
|
4282
4282
|
parseWarnings?: ParseWarning[];
|
|
4283
4283
|
};
|
|
4284
|
+
/** Standard package relationships owned by semantic comment operations. */
|
|
4285
|
+
declare const COMMENT_PART_RELATIONSHIPS: {
|
|
4286
|
+
readonly comments: {
|
|
4287
|
+
readonly type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
|
4288
|
+
readonly target: "comments.xml";
|
|
4289
|
+
};
|
|
4290
|
+
readonly commentsExtended: {
|
|
4291
|
+
readonly type: "http://schemas.microsoft.com/office/2011/relationships/commentsExtended";
|
|
4292
|
+
readonly target: "commentsExtended.xml";
|
|
4293
|
+
};
|
|
4294
|
+
};
|
|
4284
4295
|
//#endregion
|
|
4285
|
-
export {
|
|
4296
|
+
export { DrawingContent as $, borderStyleFrom as $i, TrackedRunContent as $n, NO_PARAGRAPH_NUMBERING as $r, ParagraphContent as $t, ParseWarningLocation as A, TabStopAlignment as Ai, ShapeTextBody as An, CellMargins as Ar, InlineWrapper as At, Column as B, UnrecognisedThemeColor as Bi, TableContentCarrier as Bn, TableCellBorders as Br, MoveFromRangeStart as Bt, ThemeColorScheme as C, PARAGRAPH_ALIGNMENTS as Ci, SectionStart as Cn, LevelOverride as Cr, ImagePadding as Ct, PARSE_WARNING_CODES as D, TEXT_DIRECTIONS as Di, ShapeFill as Dn, ListRendering as Dr, ImageWrap as Dt, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as E, TAB_STOP_ALIGNMENTS as Ei, ShapeContent as En, ListMarkerFormatting as Er, ImageTransform as Et, BlockSdt as F, ColorValue as Fi, TabContent as Fn, ParagraphFormatting as Fr, MarkupRangeMarker as Ft, ComplexField as G, themeColorSlot as Gi, TableRow as Gn, TableMeasurement as Gr, NonVisualDrawingNames as Gt, CommentRangeEnd as H, isThemeColor as Hi, TablePreservedMarkup as Hn, TableFormatting as Hr, MoveToRangeEnd as Ht, BookmarkEnd as I, ShadingProperties as Ii, Table as In, SpacingExplicit as Ir, MathEquation as It, DisplacedByCustomXml as J, SchemeColorValue as Ji, TextBox as Jn, TableWidthType as Jr, NoteReferenceContent as Jt, DRAWING_RAW_XML_MODES as K, themeColorToken as Ki, TableRowPropertyChange as Kn, TablePropertyExceptionFormatting as Kr, NoteMarkerContent as Kt, BookmarkRangeMarker as L, SCHEME_COLOR_VALUE_BY_THEME_COLOR as Li, TableCell as Ln, TabLeader as Lr, MoveBookmarkMarker as Lt, BidiControl as M, TextDirection as Mi, SimpleField as Mn, EmphasisMark as Mr, InstrTextContent as Mt, BlockContent as N, TextDirectionFlow as Ni, SoftHyphenContent as Nn, FloatingTableProperties as Nr, LineNumberRestart as Nt, ParseWarning as O, TEXT_DIRECTION_FLOWS as Oi, ShapeGeometryAdjustment as On, NumberingDefinitions as Or, ImageWrapPolygon as Ot, BlockCustomXml as P, BorderSpec as Pi, SymbolContent as Pn, LineSpacingRule as Pr, MAX_REVISION_ID as Pt, DrawingAnchor as Q, UnrecognisedBorderStyle as Qi, TrackedRunChange as Qn, NO_NUMBERING_NUM_ID as Qr, Paragraph as Qt, BookmarkStart as R, THEME_COLOR_BY_SCHEME_COLOR_VALUE as Ri, TableCellBlock as Rn, TabStop as Rr, MoveFrom as Rt, Theme as S, NumberFormat as Si, SectionPropertyChange as Sn, LevelLegacy as Sr, ImageFrameLocks as St, ThemeFontScheme as T, TABLE_ALIGNMENTS as Ti, ShapeAlternateContent as Tn, ListLevel as Tr, ImageSize as Tt, CommentRangeStart as U, knownThemeColor as Ui, TablePropertyChange as Un, TableGridChange as Ur, MoveToRangeStart as Ut, Comment as V, isSchemeColorValue as Vi, TableCustomXmlWrapper as Vn, TableCellFormatting as Vr, MoveTo as Vt, CommentReference as W, readThemeColor as Wi, TablePropertyExceptionChange as Wn, TableLook as Wr, NoBreakHyphenContent as Wt, DocumentBackgroundDrawing as X, ThemeColor as Xi, TextWatermark as Xn, TextFormatting as Xr, PROPERTY_REVISION_KINDS as Xt, DocumentBackground as Y, THEME_COLORS as Yi, TextContent as Yn, TextEffect as Yr, PARAGRAPH_MARK_CHANGE_KINDS as Yt, DocumentBody as Z, BorderStyleValue as Zi, TrackedChangeInfo as Zn, UnderlineStyle as Zr, PageOrientation as Zt, RelationshipMap as _, headingLevelOf as _i, SdtEndProperties as _n, PreviewDescriptor as _r, Hyperlink as _t, DocumentSettings as a, BORDER_STYLES as aa, mergeParagraphNumbering as ai, PositionedBookmarkMarker as an, isOoxmlSymbolCharacter as ar, EndnoteProperties as at, StyleDefinitions as b, outlineLevelStatedValue as bi, Section as bn, COUNTER_FORMATS as br, ImageCrop as bt, isNumberingLevel as c, paragraphNumberingReference as ci, PreservedXmlContent as cn, UnrecognisedPresetLineDash as cr, FieldType as ct, EmbeddedFontRef as d, resolveParagraphNumbering as di, PropertyRevisionKind as dn, presetLineDashToken as dr, Footnote as dt, borderStyleToken as ea, ParagraphNumberingOverride as ei, ParagraphMarkChange as en, VerticalAlign as er, DrawingGroupChild as et, FontCharset as f, sameEffectiveParagraphNumbering as fi, REVIEW_CARRIERS as fn, PRESET_LINE_DASH_VALS as fr, FootnotePosition as ft, Relationship as g, OutlineLevel as gi, RunPropertyChange as gn, relationshipIdOf as gr, HeaderReference as gt, MediaFile as h, HeadingOutlineLevel as hi, RunContent as hn, mintRelationshipId as hr, HeaderFooterType as ht, Document as i, statesNoBorder as ia, isNumberingReference as ii, PositionalTab as in, WrapPolygonPoint as ir, EndnotePosition as it, BIDI_CONTROLS as j, TableAlignment as ji, ShapeType as jn, ConditionalFormatStyle as jr, Insertion as jt, ParseWarningCode as k, TEXT_DIRECTION_FLOW_BY_TOKEN as ki, ShapeOutline as kn, NumberingInstance as kr, InlineSdt as kt, ExhaustiveFields as l, paragraphNumberingReferenceId as li, PropertyChange as ln, isPresetLineDashVal as lr, FoldedListNumber as lt, FontTable as m, BODY_TEXT_OUTLINE_LEVEL as mi, Run as mn, RelationshipId as mr, HeaderFooter as mt, DEFAULT_TAB_STOP_TWIPS as n, isBorderNone as na, ParagraphNumberingSlots as ni, ParagraphPropertyChange as nn, WrapDistanceSlots as nr, EffectExtentSlots as nt, DocxConformanceClass as o, BorderStyle as oa, paragraphNumberingFromSlots as oi, PreservedBlock as on, normalizeRevisionId as or, Field as ot, FontInfo as p, sameStatedParagraphNumbering as pi, ReviewCarrier as pn, PresetLineDashVal as pr, FootnoteProperties as pt, Deletion as q, SchemeColorSlot as qi, TableStructuralChangeInfo as qn, TableRowFormatting as qr, NoteNumberRestart as qt, DOCX_CONFORMANCE_CLASSES as r, isBorderStyle as ra, ResolvedParagraphNumbering as ri, PictureWatermark as rn, WrapDistances as rr, Endnote as rt, DocxPackage as s, paragraphNumberingLevel as si, PreservedInline as sn, PresetLineDashValue as sr, FieldCharContent as st, COMMENT_PART_RELATIONSHIPS as t, isBorderNil as ta, ParagraphNumberingReference as ti, ParagraphMarkChangeKind as tn, Watermark as tr, DrawingRawXmlMode as tt, DocDefaults as u, paragraphNumberingSlots as ui, PropertyChangeInfo as un, presetLineDashFrom as ur, FooterReference as ut, RelationshipType as v, headingOutlineLevel as vi, SdtProperties as vn, PreviewShape as vr, INSERTION_SEAM_POLICIES as vt, ThemeFont as w, ParagraphAlignment as wi, Shape as wn, LevelSuffix as wr, ImagePosition as wt, StyleType as x, NUMBER_FORMATS as xi, SectionProperties as xn, CounterFormat as xr, ImageDocPrLink as xt, Style as y, outlineLevelFromStatedValue as yi, SdtType as yn, AbstractNumbering as yr, Image as yt, BreakContent as z, ThemeColorValue as zi, TableCellPropertyChange as zn, TableBorders as zr, MoveFromRangeEnd as zt };
|
package/dist/docx_kernel_bg.wasm
CHANGED
|
Binary file
|
|
@@ -89,4 +89,52 @@ const hasIllegalXmlCharacters = (value) => ILLEGAL_XML_CHARACTER_PROBE.test(valu
|
|
|
89
89
|
*/
|
|
90
90
|
const sanitizeXmlCharacters = (value) => hasIllegalXmlCharacters(value) ? value.replace(LONE_SURROGATE_PATTERN, REPLACEMENT_CHARACTER).replace(ILLEGAL_XML_CHARACTER_PATTERN, "") : value;
|
|
91
91
|
//#endregion
|
|
92
|
-
|
|
92
|
+
//#region src/markdown/href.ts
|
|
93
|
+
const ALLOWED_URL_PROTOCOLS = /* @__PURE__ */ new Set([
|
|
94
|
+
"http:",
|
|
95
|
+
"https:",
|
|
96
|
+
"mailto:",
|
|
97
|
+
"tel:"
|
|
98
|
+
]);
|
|
99
|
+
/**
|
|
100
|
+
* Keep only http(s), mailto, and tel URLs, normalised through the URL parser.
|
|
101
|
+
* Anything else (javascript:, data:, relative paths, malformed input) drops to
|
|
102
|
+
* `undefined` so a markdown link degrades to its text instead of carrying an
|
|
103
|
+
* executable target into the document.
|
|
104
|
+
*/
|
|
105
|
+
const sanitizeExternalUrl = (rawUrl) => {
|
|
106
|
+
if (!rawUrl) return;
|
|
107
|
+
const trimmed = rawUrl.trim();
|
|
108
|
+
if (!trimmed) return;
|
|
109
|
+
const parsed = parseUrl(trimmed);
|
|
110
|
+
if (!parsed || !ALLOWED_URL_PROTOCOLS.has(parsed.protocol)) return;
|
|
111
|
+
if ((parsed.protocol === "mailto:" || parsed.protocol === "tel:") && parsed.pathname.trim() === "") return;
|
|
112
|
+
return parsed.href;
|
|
113
|
+
};
|
|
114
|
+
const parseUrl = (value) => {
|
|
115
|
+
try {
|
|
116
|
+
return new URL(value);
|
|
117
|
+
} catch {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const hasUnsafeAnchorCharacter = (anchor) => {
|
|
122
|
+
for (const char of anchor) {
|
|
123
|
+
const codePoint = char.codePointAt(0) ?? 0;
|
|
124
|
+
if (codePoint <= 32 || codePoint === 127 || char.trim() === "") return true;
|
|
125
|
+
}
|
|
126
|
+
return false;
|
|
127
|
+
};
|
|
128
|
+
/** A `#anchor` stays a document-internal target; anything else must pass {@link sanitizeExternalUrl}. */
|
|
129
|
+
const sanitizeMarkdownHref = (rawHref) => {
|
|
130
|
+
const trimmed = rawHref.trim();
|
|
131
|
+
if (!trimmed) return;
|
|
132
|
+
if (trimmed.startsWith("#")) {
|
|
133
|
+
const anchor = trimmed.slice(1);
|
|
134
|
+
if (!anchor || hasUnsafeAnchorCharacter(anchor)) return;
|
|
135
|
+
return `#${anchor}`;
|
|
136
|
+
}
|
|
137
|
+
return sanitizeExternalUrl(trimmed);
|
|
138
|
+
};
|
|
139
|
+
//#endregion
|
|
140
|
+
export { hasIllegalXmlCharacters as a, escapeXmlText as i, sanitizeMarkdownHref as n, sanitizeXmlCharacters as o, escapeXmlAttribute as r, sanitizeExternalUrl as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as ParagraphContent, Gn as TableRow, In as Table, Ln as TableCell, N as BlockContent, Or as NumberingDefinitions, Qt as Paragraph, X as DocumentBackgroundDrawing, Y as DocumentBackground, Yn as TextContent, Z as DocumentBody, hn as RunContent, i as Document, in as PositionalTab, mn as Run, o as DocxConformanceClass, r as DOCX_CONFORMANCE_CLASSES, s as DocxPackage, xn as SectionProperties, y as Style, z as BreakContent } from "./document-YlRuGzLX.js";
|
|
2
2
|
import JSZip from "jszip";
|
|
3
3
|
import { Buffer } from "node:buffer";
|
|
4
4
|
//#region src/legal-source/types.d.ts
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as headingOutlineLevel, b as borderStyleToken, d as isNoteReferenceId, f as isOoxmlSymbolCharacter, it as paragraphNumberingSlots, nt as paragraphNumberingReference, r as DOCX_CONFORMANCE_CLASSES, rt as paragraphNumberingReferenceId, s as MAX_REVISION_ID, tt as paragraphNumberingLevel, w as statesNoBorder } from "./document-CQ0oovh0.js";
|
|
2
|
+
import { writeZipPart } from "./zip/writeZipPart.js";
|
|
2
3
|
import { i as serializeSequenceChildren } from "./sequenceChildren-B8ODeI3J.js";
|
|
3
|
-
import { i as
|
|
4
|
+
import { a as hasIllegalXmlCharacters, i as escapeXmlText, n as sanitizeMarkdownHref, o as sanitizeXmlCharacters, r as escapeXmlAttribute, t as sanitizeExternalUrl } from "./href-2XSCK-T8.js";
|
|
4
5
|
import { Result, TaggedError, panic } from "better-result";
|
|
5
6
|
import JSZip from "jszip";
|
|
6
7
|
import { XMLParser, XMLValidator } from "fast-xml-parser";
|
|
@@ -362,16 +363,51 @@ const APP_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><P
|
|
|
362
363
|
const serializeDocumentToDocx = async (document, options = {}) => {
|
|
363
364
|
const zip = new JSZip();
|
|
364
365
|
const hasNumbering = hasNumberingDefinitions(document.package.numbering);
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
366
|
+
writeZipPart({
|
|
367
|
+
zip,
|
|
368
|
+
path: "[Content_Types].xml",
|
|
369
|
+
data: contentTypesXml(hasNumbering)
|
|
370
|
+
});
|
|
371
|
+
writeZipPart({
|
|
372
|
+
zip,
|
|
373
|
+
path: "_rels/.rels",
|
|
374
|
+
data: ROOT_RELS_XML
|
|
375
|
+
});
|
|
376
|
+
writeZipPart({
|
|
377
|
+
zip,
|
|
378
|
+
path: "docProps/app.xml",
|
|
379
|
+
data: APP_XML
|
|
380
|
+
});
|
|
381
|
+
writeZipPart({
|
|
382
|
+
zip,
|
|
383
|
+
path: "docProps/core.xml",
|
|
384
|
+
data: serializeCoreProperties(document)
|
|
385
|
+
});
|
|
386
|
+
writeZipPart({
|
|
387
|
+
zip,
|
|
388
|
+
path: "word/document.xml",
|
|
389
|
+
data: serializeDocumentXml(document)
|
|
390
|
+
});
|
|
391
|
+
writeZipPart({
|
|
392
|
+
zip,
|
|
393
|
+
path: "word/styles.xml",
|
|
394
|
+
data: serializeStyles(document.package.styles)
|
|
395
|
+
});
|
|
396
|
+
if (hasNumbering) writeZipPart({
|
|
397
|
+
zip,
|
|
398
|
+
path: "word/numbering.xml",
|
|
399
|
+
data: serializeNumbering(document.package.numbering)
|
|
400
|
+
});
|
|
401
|
+
writeZipPart({
|
|
402
|
+
zip,
|
|
403
|
+
path: `word/${DEFAULT_FOOTER_PART_NAME}`,
|
|
404
|
+
data: buildFooterXml(options.language)
|
|
405
|
+
});
|
|
406
|
+
writeZipPart({
|
|
407
|
+
zip,
|
|
408
|
+
path: "word/_rels/document.xml.rels",
|
|
409
|
+
data: documentRelsXml(hasNumbering)
|
|
410
|
+
});
|
|
375
411
|
for (const [path, file] of Object.entries(zip.files)) {
|
|
376
412
|
if (file.dir || !path.endsWith(".xml")) continue;
|
|
377
413
|
assertValidOoxmlNumericIds(await file.async("text"), path);
|
|
@@ -1453,7 +1489,7 @@ const validateFieldChild = (child, path, ctx) => {
|
|
|
1453
1489
|
return;
|
|
1454
1490
|
}
|
|
1455
1491
|
if (child.type === "preservedInline") return;
|
|
1456
|
-
if (child.type
|
|
1492
|
+
if (child.type !== "hyperlink") {
|
|
1457
1493
|
validateParagraphContent(child, path, ctx);
|
|
1458
1494
|
return;
|
|
1459
1495
|
}
|
|
@@ -1646,54 +1682,6 @@ const validateCounterPairs = (starts, ends, { label, startName, endName, ctx, se
|
|
|
1646
1682
|
}
|
|
1647
1683
|
};
|
|
1648
1684
|
//#endregion
|
|
1649
|
-
//#region src/markdown/href.ts
|
|
1650
|
-
const ALLOWED_URL_PROTOCOLS = /* @__PURE__ */ new Set([
|
|
1651
|
-
"http:",
|
|
1652
|
-
"https:",
|
|
1653
|
-
"mailto:",
|
|
1654
|
-
"tel:"
|
|
1655
|
-
]);
|
|
1656
|
-
/**
|
|
1657
|
-
* Keep only http(s), mailto, and tel URLs, normalised through the URL parser.
|
|
1658
|
-
* Anything else (javascript:, data:, relative paths, malformed input) drops to
|
|
1659
|
-
* `undefined` so a markdown link degrades to its text instead of carrying an
|
|
1660
|
-
* executable target into the document.
|
|
1661
|
-
*/
|
|
1662
|
-
const sanitizeExternalUrl = (rawUrl) => {
|
|
1663
|
-
if (!rawUrl) return;
|
|
1664
|
-
const trimmed = rawUrl.trim();
|
|
1665
|
-
if (!trimmed) return;
|
|
1666
|
-
const parsed = parseUrl(trimmed);
|
|
1667
|
-
if (!parsed || !ALLOWED_URL_PROTOCOLS.has(parsed.protocol)) return;
|
|
1668
|
-
if ((parsed.protocol === "mailto:" || parsed.protocol === "tel:") && parsed.pathname.trim() === "") return;
|
|
1669
|
-
return parsed.href;
|
|
1670
|
-
};
|
|
1671
|
-
const parseUrl = (value) => {
|
|
1672
|
-
try {
|
|
1673
|
-
return new URL(value);
|
|
1674
|
-
} catch {
|
|
1675
|
-
return null;
|
|
1676
|
-
}
|
|
1677
|
-
};
|
|
1678
|
-
const hasUnsafeAnchorCharacter = (anchor) => {
|
|
1679
|
-
for (const char of anchor) {
|
|
1680
|
-
const codePoint = char.codePointAt(0) ?? 0;
|
|
1681
|
-
if (codePoint <= 32 || codePoint === 127 || char.trim() === "") return true;
|
|
1682
|
-
}
|
|
1683
|
-
return false;
|
|
1684
|
-
};
|
|
1685
|
-
/** A `#anchor` stays a document-internal target; anything else must pass {@link sanitizeExternalUrl}. */
|
|
1686
|
-
const sanitizeMarkdownHref = (rawHref) => {
|
|
1687
|
-
const trimmed = rawHref.trim();
|
|
1688
|
-
if (!trimmed) return;
|
|
1689
|
-
if (trimmed.startsWith("#")) {
|
|
1690
|
-
const anchor = trimmed.slice(1);
|
|
1691
|
-
if (!anchor || hasUnsafeAnchorCharacter(anchor)) return;
|
|
1692
|
-
return `#${anchor}`;
|
|
1693
|
-
}
|
|
1694
|
-
return sanitizeExternalUrl(trimmed);
|
|
1695
|
-
};
|
|
1696
|
-
//#endregion
|
|
1697
1685
|
//#region src/markdown/lexer.ts
|
|
1698
1686
|
/**
|
|
1699
1687
|
* One `marked` configuration for every markdown surface in docx-core. Plain
|
package/dist/model/document.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as DrawingContent, $i as borderStyleFrom, $n as TrackedRunContent, $r as NO_PARAGRAPH_NUMBERING, $t as ParagraphContent, A as ParseWarningLocation, Ai as TabStopAlignment, An as ShapeTextBody, Ar as CellMargins, At as InlineWrapper, B as Column, Bi as UnrecognisedThemeColor, Bn as TableContentCarrier, Br as TableCellBorders, Bt as MoveFromRangeStart, C as ThemeColorScheme, Ci as PARAGRAPH_ALIGNMENTS, Cn as SectionStart, Cr as LevelOverride, Ct as ImagePadding, D as PARSE_WARNING_CODES, Di as TEXT_DIRECTIONS, Dn as ShapeFill, Dr as ListRendering, Dt as ImageWrap, E as MAX_RETAINED_PARSE_WARNINGS_PER_CODE, Ei as TAB_STOP_ALIGNMENTS, En as ShapeContent, Er as ListMarkerFormatting, Et as ImageTransform, F as BlockSdt, Fi as ColorValue, Fn as TabContent, Fr as ParagraphFormatting, Ft as MarkupRangeMarker, G as ComplexField, Gi as themeColorSlot, Gn as TableRow, Gr as TableMeasurement, Gt as NonVisualDrawingNames, H as CommentRangeEnd, Hi as isThemeColor, Hn as TablePreservedMarkup, Hr as TableFormatting, Ht as MoveToRangeEnd, I as BookmarkEnd, Ii as ShadingProperties, In as Table, Ir as SpacingExplicit, It as MathEquation, J as DisplacedByCustomXml, Ji as SchemeColorValue, Jn as TextBox, Jr as TableWidthType, Jt as NoteReferenceContent, K as DRAWING_RAW_XML_MODES, Ki as themeColorToken, Kn as TableRowPropertyChange, Kr as TablePropertyExceptionFormatting, Kt as NoteMarkerContent, L as BookmarkRangeMarker, Li as SCHEME_COLOR_VALUE_BY_THEME_COLOR, Ln as TableCell, Lr as TabLeader, Lt as MoveBookmarkMarker, M as BidiControl, Mi as TextDirection, Mn as SimpleField, Mr as EmphasisMark, Mt as InstrTextContent, N as BlockContent, Ni as TextDirectionFlow, Nn as SoftHyphenContent, Nr as FloatingTableProperties, Nt as LineNumberRestart, O as ParseWarning, Oi as TEXT_DIRECTION_FLOWS, On as ShapeGeometryAdjustment, Or as NumberingDefinitions, Ot as ImageWrapPolygon, P as BlockCustomXml, Pi as BorderSpec, Pn as SymbolContent, Pr as LineSpacingRule, Pt as MAX_REVISION_ID, Q as DrawingAnchor, Qi as UnrecognisedBorderStyle, Qn as TrackedRunChange, Qr as NO_NUMBERING_NUM_ID, Qt as Paragraph, R as BookmarkStart, Ri as THEME_COLOR_BY_SCHEME_COLOR_VALUE, Rn as TableCellBlock, Rr as TabStop, Rt as MoveFrom, S as Theme, Si as NumberFormat, Sn as SectionPropertyChange, Sr as LevelLegacy, St as ImageFrameLocks, T as ThemeFontScheme, Ti as TABLE_ALIGNMENTS, Tn as ShapeAlternateContent, Tr as ListLevel, Tt as ImageSize, U as CommentRangeStart, Ui as knownThemeColor, Un as TablePropertyChange, Ur as TableGridChange, Ut as MoveToRangeStart, V as Comment, Vi as isSchemeColorValue, Vn as TableCustomXmlWrapper, Vr as TableCellFormatting, Vt as MoveTo, W as CommentReference, Wi as readThemeColor, Wn as TablePropertyExceptionChange, Wr as TableLook, Wt as NoBreakHyphenContent, X as DocumentBackgroundDrawing, Xi as ThemeColor, Xn as TextWatermark, Xr as TextFormatting, Xt as PROPERTY_REVISION_KINDS, Y as DocumentBackground, Yi as THEME_COLORS, Yn as TextContent, Yr as TextEffect, Yt as PARAGRAPH_MARK_CHANGE_KINDS, Z as DocumentBody, Zi as BorderStyleValue, Zn as TrackedChangeInfo, Zr as UnderlineStyle, Zt as PageOrientation, _ as RelationshipMap, _i as headingLevelOf, _n as SdtEndProperties, _r as PreviewDescriptor, _t as Hyperlink, a as DocumentSettings, aa as BORDER_STYLES, ai as mergeParagraphNumbering, an as PositionedBookmarkMarker, ar as isOoxmlSymbolCharacter, at as EndnoteProperties, b as StyleDefinitions, bi as outlineLevelStatedValue, bn as Section, br as COUNTER_FORMATS, bt as ImageCrop, c as isNumberingLevel, ci as paragraphNumberingReference, cn as PreservedXmlContent, cr as UnrecognisedPresetLineDash, ct as FieldType, d as EmbeddedFontRef, di as resolveParagraphNumbering, dn as PropertyRevisionKind, dr as presetLineDashToken, dt as Footnote, ea as borderStyleToken, ei as ParagraphNumberingOverride, en as ParagraphMarkChange, er as VerticalAlign, et as DrawingGroupChild, f as FontCharset, fi as sameEffectiveParagraphNumbering, fn as REVIEW_CARRIERS, fr as PRESET_LINE_DASH_VALS, ft as FootnotePosition, g as Relationship, gi as OutlineLevel, gn as RunPropertyChange, gr as relationshipIdOf, gt as HeaderReference, h as MediaFile, hi as HeadingOutlineLevel, hn as RunContent, hr as mintRelationshipId, ht as HeaderFooterType, i as Document, ia as statesNoBorder, ii as isNumberingReference, in as PositionalTab, ir as WrapPolygonPoint, it as EndnotePosition, j as BIDI_CONTROLS, ji as TableAlignment, jn as ShapeType, jr as ConditionalFormatStyle, jt as Insertion, k as ParseWarningCode, ki as TEXT_DIRECTION_FLOW_BY_TOKEN, kn as ShapeOutline, kr as NumberingInstance, kt as InlineSdt, l as ExhaustiveFields, li as paragraphNumberingReferenceId, ln as PropertyChange, lr as isPresetLineDashVal, lt as FoldedListNumber, m as FontTable, mi as BODY_TEXT_OUTLINE_LEVEL, mn as Run, mr as RelationshipId, mt as HeaderFooter, n as DEFAULT_TAB_STOP_TWIPS, na as isBorderNone, ni as ParagraphNumberingSlots, nn as ParagraphPropertyChange, nr as WrapDistanceSlots, nt as EffectExtentSlots, o as DocxConformanceClass, oa as BorderStyle, oi as paragraphNumberingFromSlots, on as PreservedBlock, or as normalizeRevisionId, ot as Field, p as FontInfo, pi as sameStatedParagraphNumbering, pn as ReviewCarrier, pr as PresetLineDashVal, pt as FootnoteProperties, q as Deletion, qi as SchemeColorSlot, qn as TableStructuralChangeInfo, qr as TableRowFormatting, qt as NoteNumberRestart, r as DOCX_CONFORMANCE_CLASSES, ra as isBorderStyle, ri as ResolvedParagraphNumbering, rn as PictureWatermark, rr as WrapDistances, rt as Endnote, s as DocxPackage, si as paragraphNumberingLevel, sn as PreservedInline, sr as PresetLineDashValue, st as FieldCharContent, t as COMMENT_PART_RELATIONSHIPS, ta as isBorderNil, ti as ParagraphNumberingReference, tn as ParagraphMarkChangeKind, tr as Watermark, tt as DrawingRawXmlMode, u as DocDefaults, ui as paragraphNumberingSlots, un as PropertyChangeInfo, ur as presetLineDashFrom, ut as FooterReference, v as RelationshipType, vi as headingOutlineLevel, vn as SdtProperties, vr as PreviewShape, w as ThemeFont, wi as ParagraphAlignment, wn as Shape, wr as LevelSuffix, wt as ImagePosition, x as StyleType, xi as NUMBER_FORMATS, xn as SectionProperties, xr as CounterFormat, xt as ImageDocPrLink, y as Style, yi as outlineLevelFromStatedValue, yn as SdtType, yr as AbstractNumbering, yt as Image, z as BreakContent, zi as ThemeColorValue, zn as TableCellPropertyChange, zr as TableBorders, zt as MoveFromRangeEnd } from "../document-YlRuGzLX.js";
|
|
2
2
|
import { n as PreservedChild, r as PreservedMarkup, t as PreservedAttribute } from "../preservedMarkup-G8XjWhs2.js";
|
|
3
|
-
export { type AbstractNumbering, BIDI_CONTROLS, BODY_TEXT_OUTLINE_LEVEL, BORDER_STYLES, type BidiControl, type BlockContent, type BlockCustomXml, type BlockSdt, type BookmarkEnd, type BookmarkRangeMarker, type BookmarkStart, type BorderSpec, type BorderStyle, type BorderStyleValue, type BreakContent, COUNTER_FORMATS, type CellMargins, type ColorValue, type Column, type Comment, type CommentRangeEnd, type CommentRangeStart, type CommentReference, type ComplexField, type ConditionalFormatStyle, type CounterFormat, DEFAULT_TAB_STOP_TWIPS, DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, type Deletion, type DisplacedByCustomXml, type DocDefaults, Document, type DocumentBackground, type DocumentBackgroundDrawing, type DocumentBody, DocumentSettings, DocxConformanceClass, DocxPackage, type DrawingAnchor, type DrawingContent, type DrawingGroupChild, type DrawingRawXmlMode, type EffectExtentSlots, type EmbeddedFontRef, type EmphasisMark, type Endnote, type EndnotePosition, type EndnoteProperties, type ExhaustiveFields, type Field, type FieldCharContent, type FieldType, type FloatingTableProperties, type FoldedListNumber, type FontCharset, type FontInfo, type FontTable, type FooterReference, type Footnote, type FootnotePosition, type FootnoteProperties, type HeaderFooter, type HeaderFooterType, type HeaderReference, type HeadingOutlineLevel, type Hyperlink, type Image, type ImageCrop, type ImageDocPrLink, type ImageFrameLocks, type ImagePadding, type ImagePosition, type ImageSize, type ImageTransform, type ImageWrap, type ImageWrapPolygon, type InlineSdt, type InlineWrapper, type Insertion, type InstrTextContent, type LevelLegacy, type LevelOverride, type LevelSuffix, type LineNumberRestart, type LineSpacingRule, type ListLevel, type ListMarkerFormatting, type ListRendering, MAX_RETAINED_PARSE_WARNINGS_PER_CODE, MAX_REVISION_ID, type MarkupRangeMarker, type MathEquation, type MediaFile, type MoveBookmarkMarker, type MoveFrom, type MoveFromRangeEnd, type MoveFromRangeStart, type MoveTo, type MoveToRangeEnd, type MoveToRangeStart, NO_NUMBERING_NUM_ID, NO_PARAGRAPH_NUMBERING, NUMBER_FORMATS, type NoBreakHyphenContent, type NonVisualDrawingNames, type NoteMarkerContent, type NoteNumberRestart, type NoteReferenceContent, type NumberFormat, type NumberingDefinitions, type NumberingInstance, type OutlineLevel, PARAGRAPH_ALIGNMENTS, PARAGRAPH_MARK_CHANGE_KINDS, PARSE_WARNING_CODES, PRESET_LINE_DASH_VALS, PROPERTY_REVISION_KINDS, type PageOrientation, type Paragraph, type ParagraphAlignment, type ParagraphContent, type ParagraphFormatting, type ParagraphMarkChange, type ParagraphMarkChangeKind, type ParagraphNumberingOverride, type ParagraphNumberingReference, type ParagraphNumberingSlots, type ParagraphPropertyChange, type ParseWarning, type ParseWarningCode, type ParseWarningLocation, type PictureWatermark, type PositionalTab, type PositionedBookmarkMarker, type PreservedAttribute, type PreservedBlock, type PreservedChild, type PreservedInline, type PreservedMarkup, type PreservedXmlContent, type PresetLineDashVal, type PresetLineDashValue, type PreviewDescriptor, type PreviewShape, type PropertyChange, type PropertyChangeInfo, type PropertyRevisionKind, REVIEW_CARRIERS, type Relationship, type RelationshipId, type RelationshipMap, type RelationshipType, type ResolvedParagraphNumbering, type ReviewCarrier, type Run, type RunContent, type RunPropertyChange, SCHEME_COLOR_VALUE_BY_THEME_COLOR, type SchemeColorSlot, type SchemeColorValue, type SdtEndProperties, type SdtProperties, type SdtType, type Section, type SectionProperties, type SectionPropertyChange, type SectionStart, type ShadingProperties, type Shape, type ShapeAlternateContent, 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, TABLE_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TEXT_DIRECTIONS, TEXT_DIRECTION_FLOWS, TEXT_DIRECTION_FLOW_BY_TOKEN, THEME_COLORS, THEME_COLOR_BY_SCHEME_COLOR_VALUE, type TabContent, type TabLeader, type TabStop, type TabStopAlignment, type Table, type TableAlignment, type TableBorders, type TableCell, type TableCellBlock, type TableCellBorders, type TableCellFormatting, type TableCellPropertyChange, type TableContentCarrier, type TableCustomXmlWrapper, type TableFormatting, type TableGridChange, type TableLook, type TableMeasurement, type TablePreservedMarkup, type TablePropertyChange, type TablePropertyExceptionChange, type TablePropertyExceptionFormatting, type TableRow, type TableRowFormatting, type TableRowPropertyChange, type TableStructuralChangeInfo, type TableWidthType, type TextBox, type TextContent, type TextDirection, type TextDirectionFlow, type TextEffect, type TextFormatting, type TextWatermark, type Theme, type ThemeColor, type ThemeColorScheme, type ThemeColorValue, type ThemeFont, type ThemeFontScheme, type TrackedChangeInfo, type TrackedRunChange, type TrackedRunContent, type UnderlineStyle, type UnrecognisedBorderStyle, type UnrecognisedPresetLineDash, type UnrecognisedThemeColor, type VerticalAlign, type Watermark, type WrapDistanceSlots, type WrapDistances, type WrapPolygonPoint, borderStyleFrom, borderStyleToken, headingLevelOf, headingOutlineLevel, isBorderNil, isBorderNone, isBorderStyle, isNumberingLevel, isNumberingReference, isOoxmlSymbolCharacter, isPresetLineDashVal, isSchemeColorValue, isThemeColor, knownThemeColor, mergeParagraphNumbering, mintRelationshipId, normalizeRevisionId, outlineLevelFromStatedValue, outlineLevelStatedValue, paragraphNumberingFromSlots, paragraphNumberingLevel, paragraphNumberingReference, paragraphNumberingReferenceId, paragraphNumberingSlots, presetLineDashFrom, presetLineDashToken, readThemeColor, relationshipIdOf, resolveParagraphNumbering, sameEffectiveParagraphNumbering, sameStatedParagraphNumbering, statesNoBorder, themeColorSlot, themeColorToken };
|
|
3
|
+
export { type AbstractNumbering, BIDI_CONTROLS, BODY_TEXT_OUTLINE_LEVEL, BORDER_STYLES, type BidiControl, type BlockContent, type BlockCustomXml, type BlockSdt, type BookmarkEnd, type BookmarkRangeMarker, type BookmarkStart, type BorderSpec, type BorderStyle, type BorderStyleValue, type BreakContent, COMMENT_PART_RELATIONSHIPS, COUNTER_FORMATS, type CellMargins, type ColorValue, type Column, type Comment, type CommentRangeEnd, type CommentRangeStart, type CommentReference, type ComplexField, type ConditionalFormatStyle, type CounterFormat, DEFAULT_TAB_STOP_TWIPS, DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, type Deletion, type DisplacedByCustomXml, type DocDefaults, Document, type DocumentBackground, type DocumentBackgroundDrawing, type DocumentBody, DocumentSettings, DocxConformanceClass, DocxPackage, type DrawingAnchor, type DrawingContent, type DrawingGroupChild, type DrawingRawXmlMode, type EffectExtentSlots, type EmbeddedFontRef, type EmphasisMark, type Endnote, type EndnotePosition, type EndnoteProperties, type ExhaustiveFields, type Field, type FieldCharContent, type FieldType, type FloatingTableProperties, type FoldedListNumber, type FontCharset, type FontInfo, type FontTable, type FooterReference, type Footnote, type FootnotePosition, type FootnoteProperties, type HeaderFooter, type HeaderFooterType, type HeaderReference, type HeadingOutlineLevel, type Hyperlink, type Image, type ImageCrop, type ImageDocPrLink, type ImageFrameLocks, type ImagePadding, type ImagePosition, type ImageSize, type ImageTransform, type ImageWrap, type ImageWrapPolygon, type InlineSdt, type InlineWrapper, type Insertion, type InstrTextContent, type LevelLegacy, type LevelOverride, type LevelSuffix, type LineNumberRestart, type LineSpacingRule, type ListLevel, type ListMarkerFormatting, type ListRendering, MAX_RETAINED_PARSE_WARNINGS_PER_CODE, MAX_REVISION_ID, type MarkupRangeMarker, type MathEquation, type MediaFile, type MoveBookmarkMarker, type MoveFrom, type MoveFromRangeEnd, type MoveFromRangeStart, type MoveTo, type MoveToRangeEnd, type MoveToRangeStart, NO_NUMBERING_NUM_ID, NO_PARAGRAPH_NUMBERING, NUMBER_FORMATS, type NoBreakHyphenContent, type NonVisualDrawingNames, type NoteMarkerContent, type NoteNumberRestart, type NoteReferenceContent, type NumberFormat, type NumberingDefinitions, type NumberingInstance, type OutlineLevel, PARAGRAPH_ALIGNMENTS, PARAGRAPH_MARK_CHANGE_KINDS, PARSE_WARNING_CODES, PRESET_LINE_DASH_VALS, PROPERTY_REVISION_KINDS, type PageOrientation, type Paragraph, type ParagraphAlignment, type ParagraphContent, type ParagraphFormatting, type ParagraphMarkChange, type ParagraphMarkChangeKind, type ParagraphNumberingOverride, type ParagraphNumberingReference, type ParagraphNumberingSlots, type ParagraphPropertyChange, type ParseWarning, type ParseWarningCode, type ParseWarningLocation, type PictureWatermark, type PositionalTab, type PositionedBookmarkMarker, type PreservedAttribute, type PreservedBlock, type PreservedChild, type PreservedInline, type PreservedMarkup, type PreservedXmlContent, type PresetLineDashVal, type PresetLineDashValue, type PreviewDescriptor, type PreviewShape, type PropertyChange, type PropertyChangeInfo, type PropertyRevisionKind, REVIEW_CARRIERS, type Relationship, type RelationshipId, type RelationshipMap, type RelationshipType, type ResolvedParagraphNumbering, type ReviewCarrier, type Run, type RunContent, type RunPropertyChange, SCHEME_COLOR_VALUE_BY_THEME_COLOR, type SchemeColorSlot, type SchemeColorValue, type SdtEndProperties, type SdtProperties, type SdtType, type Section, type SectionProperties, type SectionPropertyChange, type SectionStart, type ShadingProperties, type Shape, type ShapeAlternateContent, 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, TABLE_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TEXT_DIRECTIONS, TEXT_DIRECTION_FLOWS, TEXT_DIRECTION_FLOW_BY_TOKEN, THEME_COLORS, THEME_COLOR_BY_SCHEME_COLOR_VALUE, type TabContent, type TabLeader, type TabStop, type TabStopAlignment, type Table, type TableAlignment, type TableBorders, type TableCell, type TableCellBlock, type TableCellBorders, type TableCellFormatting, type TableCellPropertyChange, type TableContentCarrier, type TableCustomXmlWrapper, type TableFormatting, type TableGridChange, type TableLook, type TableMeasurement, type TablePreservedMarkup, type TablePropertyChange, type TablePropertyExceptionChange, type TablePropertyExceptionFormatting, type TableRow, type TableRowFormatting, type TableRowPropertyChange, type TableStructuralChangeInfo, type TableWidthType, type TextBox, type TextContent, type TextDirection, type TextDirectionFlow, type TextEffect, type TextFormatting, type TextWatermark, type Theme, type ThemeColor, type ThemeColorScheme, type ThemeColorValue, type ThemeFont, type ThemeFontScheme, type TrackedChangeInfo, type TrackedRunChange, type TrackedRunContent, type UnderlineStyle, type UnrecognisedBorderStyle, type UnrecognisedPresetLineDash, type UnrecognisedThemeColor, type VerticalAlign, type Watermark, type WrapDistanceSlots, type WrapDistances, type WrapPolygonPoint, borderStyleFrom, borderStyleToken, headingLevelOf, headingOutlineLevel, isBorderNil, isBorderNone, isBorderStyle, isNumberingLevel, isNumberingReference, isOoxmlSymbolCharacter, isPresetLineDashVal, isSchemeColorValue, isThemeColor, knownThemeColor, mergeParagraphNumbering, mintRelationshipId, normalizeRevisionId, outlineLevelFromStatedValue, outlineLevelStatedValue, paragraphNumberingFromSlots, paragraphNumberingLevel, paragraphNumberingReference, paragraphNumberingReferenceId, paragraphNumberingSlots, presetLineDashFrom, presetLineDashToken, readThemeColor, relationshipIdOf, resolveParagraphNumbering, sameEffectiveParagraphNumbering, sameStatedParagraphNumbering, statesNoBorder, themeColorSlot, themeColorToken };
|
package/dist/model/document.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { BIDI_CONTROLS, BODY_TEXT_OUTLINE_LEVEL, BORDER_STYLES, COUNTER_FORMATS, DEFAULT_TAB_STOP_TWIPS, DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, MAX_RETAINED_PARSE_WARNINGS_PER_CODE, MAX_REVISION_ID, NO_NUMBERING_NUM_ID, NO_PARAGRAPH_NUMBERING, NUMBER_FORMATS, PARAGRAPH_ALIGNMENTS, PARAGRAPH_MARK_CHANGE_KINDS, PARSE_WARNING_CODES, PRESET_LINE_DASH_VALS, PROPERTY_REVISION_KINDS, REVIEW_CARRIERS, SCHEME_COLOR_VALUE_BY_THEME_COLOR, TABLE_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TEXT_DIRECTIONS, TEXT_DIRECTION_FLOWS, TEXT_DIRECTION_FLOW_BY_TOKEN, THEME_COLORS, THEME_COLOR_BY_SCHEME_COLOR_VALUE, borderStyleFrom, borderStyleToken, headingLevelOf, headingOutlineLevel, isBorderNil, isBorderNone, isBorderStyle, isNumberingLevel, isNumberingReference, isOoxmlSymbolCharacter, isPresetLineDashVal, isSchemeColorValue, isThemeColor, knownThemeColor, mergeParagraphNumbering, mintRelationshipId, normalizeRevisionId, outlineLevelFromStatedValue, outlineLevelStatedValue, paragraphNumberingFromSlots, paragraphNumberingLevel, paragraphNumberingReference, paragraphNumberingReferenceId, paragraphNumberingSlots, presetLineDashFrom, presetLineDashToken, readThemeColor, relationshipIdOf, resolveParagraphNumbering, sameEffectiveParagraphNumbering, sameStatedParagraphNumbering, statesNoBorder, themeColorSlot, themeColorToken };
|
|
1
|
+
import { $ as mergeParagraphNumbering, A as TEXT_DIRECTIONS, B as themeColorToken, C as isBorderStyle, D as PARAGRAPH_ALIGNMENTS, E as NUMBER_FORMATS, F as isSchemeColorValue, G as headingLevelOf, H as mintRelationshipId, I as isThemeColor, J as outlineLevelStatedValue, K as headingOutlineLevel, L as knownThemeColor, M as TEXT_DIRECTION_FLOW_BY_TOKEN, N as SCHEME_COLOR_VALUE_BY_THEME_COLOR, O as TABLE_ALIGNMENTS, P as THEME_COLOR_BY_SCHEME_COLOR_VALUE, Q as isNumberingReference, R as readThemeColor, S as isBorderNone, T as BORDER_STYLES, U as relationshipIdOf, V as THEME_COLORS, W as BODY_TEXT_OUTLINE_LEVEL, X as NO_NUMBERING_NUM_ID, Y as isNumberingLevel, Z as NO_PARAGRAPH_NUMBERING, _ as presetLineDashToken, a as DRAWING_RAW_XML_MODES, at as resolveParagraphNumbering, b as borderStyleToken, c as PARAGRAPH_MARK_CHANGE_KINDS, ct as MAX_RETAINED_PARSE_WARNINGS_PER_CODE, et as paragraphNumberingFromSlots, f as isOoxmlSymbolCharacter, g as presetLineDashFrom, h as isPresetLineDashVal, i as BIDI_CONTROLS, it as paragraphNumberingSlots, j as TEXT_DIRECTION_FLOWS, k as TAB_STOP_ALIGNMENTS, l as PROPERTY_REVISION_KINDS, lt as PARSE_WARNING_CODES, m as COUNTER_FORMATS, n as DEFAULT_TAB_STOP_TWIPS, nt as paragraphNumberingReference, ot as sameEffectiveParagraphNumbering, p as normalizeRevisionId, q as outlineLevelFromStatedValue, r as DOCX_CONFORMANCE_CLASSES, rt as paragraphNumberingReferenceId, s as MAX_REVISION_ID, st as sameStatedParagraphNumbering, t as COMMENT_PART_RELATIONSHIPS, tt as paragraphNumberingLevel, u as REVIEW_CARRIERS, v as PRESET_LINE_DASH_VALS, w as statesNoBorder, x as isBorderNil, y as borderStyleFrom, z as themeColorSlot } from "../document-CQ0oovh0.js";
|
|
2
|
+
export { BIDI_CONTROLS, BODY_TEXT_OUTLINE_LEVEL, BORDER_STYLES, COMMENT_PART_RELATIONSHIPS, COUNTER_FORMATS, DEFAULT_TAB_STOP_TWIPS, DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, MAX_RETAINED_PARSE_WARNINGS_PER_CODE, MAX_REVISION_ID, NO_NUMBERING_NUM_ID, NO_PARAGRAPH_NUMBERING, NUMBER_FORMATS, PARAGRAPH_ALIGNMENTS, PARAGRAPH_MARK_CHANGE_KINDS, PARSE_WARNING_CODES, PRESET_LINE_DASH_VALS, PROPERTY_REVISION_KINDS, REVIEW_CARRIERS, SCHEME_COLOR_VALUE_BY_THEME_COLOR, TABLE_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TEXT_DIRECTIONS, TEXT_DIRECTION_FLOWS, TEXT_DIRECTION_FLOW_BY_TOKEN, THEME_COLORS, THEME_COLOR_BY_SCHEME_COLOR_VALUE, borderStyleFrom, borderStyleToken, headingLevelOf, headingOutlineLevel, isBorderNil, isBorderNone, isBorderStyle, isNumberingLevel, isNumberingReference, isOoxmlSymbolCharacter, isPresetLineDashVal, isSchemeColorValue, isThemeColor, knownThemeColor, mergeParagraphNumbering, mintRelationshipId, normalizeRevisionId, outlineLevelFromStatedValue, outlineLevelStatedValue, paragraphNumberingFromSlots, paragraphNumberingLevel, paragraphNumberingReference, paragraphNumberingReferenceId, paragraphNumberingSlots, presetLineDashFrom, presetLineDashToken, readThemeColor, relationshipIdOf, resolveParagraphNumbering, sameEffectiveParagraphNumbering, sameStatedParagraphNumbering, statesNoBorder, themeColorSlot, themeColorToken };
|