@office-open/docx 0.10.5 → 0.10.6
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/{context-CI0zR7rE.mjs → context-BHlB9aBx.mjs} +2 -2
- package/dist/{context-CI0zR7rE.mjs.map → context-BHlB9aBx.mjs.map} +1 -1
- package/dist/{core-properties-BuepeejJ.d.mts → core-properties-DqLT7Rkp.d.mts} +3 -2
- package/dist/core-properties-DqLT7Rkp.d.mts.map +1 -0
- package/dist/{generate-B-n09INq.mjs → generate-Cldf1pVt.mjs} +3 -3
- package/dist/{generate-B-n09INq.mjs.map → generate-Cldf1pVt.mjs.map} +1 -1
- package/dist/generate.d.mts +1 -1
- package/dist/generate.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{parse-D6c9kHXh.mjs → parse-CWktzzk2.mjs} +38 -9
- package/dist/parse-CWktzzk2.mjs.map +1 -0
- package/dist/parse.d.mts +1 -1
- package/dist/parse.mjs +1 -1
- package/dist/{parts-DgrmHznM.mjs → parts-Dmk8Xw0k.mjs} +6 -14
- package/dist/parts-Dmk8Xw0k.mjs.map +1 -0
- package/dist/patch/index.d.mts +1 -1
- package/dist/patch/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/core-properties-BuepeejJ.d.mts.map +0 -1
- package/dist/parse-D6c9kHXh.mjs.map +0 -1
- package/dist/parts-DgrmHznM.mjs.map +0 -1
|
@@ -4109,9 +4109,11 @@ function tocInstructionStr(opts) {
|
|
|
4109
4109
|
if (opts.hideTabAndPageNumbersInWebView) instr += " \\z";
|
|
4110
4110
|
return instr;
|
|
4111
4111
|
}
|
|
4112
|
-
function stringifyTableOfContents(alias = "Table of Contents", options = {}) {
|
|
4112
|
+
function stringifyTableOfContents(alias = "Table of Contents", options = {}, entriesXml = "") {
|
|
4113
4113
|
const instr = tocInstructionStr(options);
|
|
4114
|
-
|
|
4114
|
+
const aliasAttr = alias ? ` w:val="${escapeXml(alias)}"` : "";
|
|
4115
|
+
const dirtyAttr = entriesXml.length > 0 ? "" : " w:dirty=\"1\"";
|
|
4116
|
+
return `<w:sdt>${`<w:sdtPr><w:alias${aliasAttr}/><w:docPartObj><w:docPartGallery w:val="Table of Contents"/></w:docPartObj></w:sdtPr>`}${`<w:sdtContent><w:p><w:r><w:rPr><w:rFonts w:asciiTheme="majorHAnsi" w:cstheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cs="Times New Roman"/></w:rPr><w:fldChar w:fldCharType="begin"${dirtyAttr}/></w:r><w:r><w:instrText xml:space="preserve"> ${instr} </w:instrText></w:r><w:r><w:fldChar w:fldCharType="separate"/></w:r></w:p>` + entriesXml + "<w:p><w:r><w:fldChar w:fldCharType=\"end\"/></w:r></w:p></w:sdtContent>"}</w:sdt>`;
|
|
4115
4117
|
}
|
|
4116
4118
|
//#endregion
|
|
4117
4119
|
//#region src/parts/textbox/shape/shape.ts
|
|
@@ -4767,7 +4769,7 @@ function stringifyBodyChild(child, ctx) {
|
|
|
4767
4769
|
if ("table" in child) return tableDesc.stringify(child.table, ctx) ?? "";
|
|
4768
4770
|
if ("toc" in child) {
|
|
4769
4771
|
const { alias, ...options } = child.toc;
|
|
4770
|
-
return stringifyTableOfContents(alias, options);
|
|
4772
|
+
return stringifyTableOfContents(alias, options, (options.entries ?? []).map((entry) => stringifyBodyChild(entry, ctx)).join(""));
|
|
4771
4773
|
}
|
|
4772
4774
|
if ("textbox" in child) return stringifyTextbox(child.textbox, ctx);
|
|
4773
4775
|
if ("sdt" in child) return sdtBlockDesc.stringify(child.sdt, ctx) ?? "";
|
|
@@ -12159,16 +12161,6 @@ const settingsDesc = {
|
|
|
12159
12161
|
//#endregion
|
|
12160
12162
|
//#region src/parts/table-of-contents/table-of-contents-properties.ts
|
|
12161
12163
|
/**
|
|
12162
|
-
* Table of Contents Properties module.
|
|
12163
|
-
*
|
|
12164
|
-
* This module defines configuration options for table of contents generation,
|
|
12165
|
-
* including field switches and style mappings.
|
|
12166
|
-
*
|
|
12167
|
-
* Reference: http://officeopenxml.com/WPtableOfContents.php
|
|
12168
|
-
*
|
|
12169
|
-
* @module
|
|
12170
|
-
*/
|
|
12171
|
-
/**
|
|
12172
12164
|
* Represents a style-to-level mapping for table of contents entries.
|
|
12173
12165
|
*
|
|
12174
12166
|
* StyleLevel associates a paragraph style name with a TOC level, allowing
|
|
@@ -13564,4 +13556,4 @@ const webSettingsDesc = {
|
|
|
13564
13556
|
//#endregion
|
|
13565
13557
|
export { DocumentGridType as $, stringifySdtPr as $t, settingsDesc as A, parseBodyProperties as An, PageTextDirectionType as At, stringifyParagraphStyle as B, HeadingLevel as Bn, SpaceType as Bt, footnotesDesc as C, UnderlineType as Cn, parseSdtProperties as Ct, SdtDateMappingType as D, TextVerticalType as Dn, stringifySectionPropertiesXml as Dt, parseTocFieldInstruction as E, TextVertOverflowType as En, sectionPropertiesDesc as Et, parseStyleDefinitions as F, TextEffect as Fn, createHorizontalPosition as Ft, SectionType as G, TextWrappingType as Gt, HeaderFooterReferenceType as H, AlignmentType as Hn, createWrapThrough as Ht, DefaultStylesFactory as I, PageNumber as In, HorizontalPositionRelativeFrom as It, createLineNumberType as J, customXmlBlockDesc as Jt, createSectionType as K, altChunkDesc as Kt, stringifyCharacterStyle as L, breakXml as Ln, VerticalPositionRelativeFrom as Lt, buildNumberingCache as M, Media as Mn, PageNumberSeparator as Mt, buildStyleCache as N, createTransformation as Nn, createPageNumberType as Nt, SdtLock as O, VerticalAnchor as On, sectionMarginDefaults as Ot, extractStyleId as P, HighlightColor as Pn, createVerticalPosition as Pt, PageBorderZOrder as Q, stringifyCustomXmlShell as Qt, stringifyConditionalTableStyle as R, TextAlignmentType as Rn, HorizontalPositionAlign as Rt, endnotesDesc as S, EmphasisMarkType as Sn, parseSdtBlock as St, parseTocFieldFromElements as T, TextHorzOverflowType as Tn, parseSectionPropertiesEl as Tt, HeaderFooterType as U, createWrapTight as Ut, stringifyTableStyle as V, LineRuleType as Vn, VerticalPositionAlign as Vt, createHeaderFooterReference as W, TextWrappingSide as Wt, PageBorderDisplay as X, sdtBlockDesc as Xt, createPageMargin as Y, parseCustomXmlProperties as Yt, PageBorderOffsetFrom as Z, setBodyParseChild as Zt, glossaryDesc as _, parseFormFieldData as _n, parseParagraphProperties as _t, appPropertiesDesc as a, TABLE_BORDERS_NONE as an, LevelSuffix as at, CharacterSet as b, PositionalTabLeader as bn, replaceRelsWithPlaceholders as bt, relationshipsDesc as c, OverlapType as cn, parseTableRowPropertiesEl as ct, withAltChunkOverrides as d, TableAnchorType as dn, stringifyChildDispatch as dt, stringifySdtShell as en, createDocumentGrid as et, withMediaDefaults as f, TextDirection as fn, stringifyParagraphInline as ft, DocPartType as g, createFormFieldData as gn, parseParagraph as gt, DocPartGallery as h, FormFieldTextType as hn, resetDrawingIdGen as ht, webSettingsDesc as i, WidthType as in, LevelFormat as it, Styles as j, createImageData$1 as jn, PageOrientation as jt, StyleLevel as k, createBodyProperties as kn, sectionPageSizeDefaults as kt, buildContentTypesFromRegistry as l, RelativeHorizontalPosition as ln, setTableParseChild as lt, DocPartBehavior as m, ProofErrorType as mn, drawingDesc as mt, frameXml as n, stringifyElement as nn, Numbering as nt, customPropertiesDesc as o, BorderStyle as on, parseTableCellPropertiesEl as ot, commentsDesc as p, VerticalMergeType as pn, stringifyRunInline as pt, LineNumberRestartFormat as q, checkboxSymbolRunInner as qt, framesetXml as r, objectDesc as rn, parseNumberingDefinitions as rt, corePropertiesDesc as s, TableLayoutType as sn, parseTablePropertiesEl as st, TargetScreenSize as t, subDocDesc as tn, DocumentAttributeNamespaces as tt, contentTypesDesc as u, RelativeVerticalPosition as un, tableDesc as ut, bibliographyDesc as v, RubyAlign as vn, stringifyBodyChild as vt, parseToc as w, TextBodyWrappingType as wn, FontWrapper as wt, EditGroupType as x, PositionalTabRelativeTo as xn, stringifyTableOfContents as xt, fontTableDesc as y, PositionalTabAlignment as yn, stringifyDocumentXml as yt, stringifyNumberingStyle as z, TextboxTightWrapType as zn, NumberFormat as zt };
|
|
13566
13558
|
|
|
13567
|
-
//# sourceMappingURL=parts-
|
|
13559
|
+
//# sourceMappingURL=parts-Dmk8Xw0k.mjs.map
|