@a3s-lab/office 0.39.0 → 0.41.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.
@@ -1,7 +1,7 @@
1
1
  import jszip from "jszip";
2
2
  import { documentRunBorderDomAttributes, contentTypeForPart, bytesToDataUrl, OoxmlPackage, normalizeDocumentIndexesHtml, firstDescendant, normalizeDocumentParagraphId, applyDocumentParagraphIdentityToElement, descendants, documentHighlightDomAttributes, attribute as work_ooxml_package_attribute, documentHighlightFromDocxValue, serializeDocxThemeReference, normalizeDocumentTableOfContentsHtml, directChildren, documentParagraphShadingDomAttributes, documentProofingDomAttributes, documentParagraphBordersDomAttributes, directChild, documentScriptFontSegments, normalizeDocumentParagraphIdentity, documentRunShadingDomAttributes } from "./4121.js";
3
3
  import { normalizeDocumentBookmarkName, renderDocumentTableCellMarginOverrides, applyDocumentImageIdentityToElement, documentCharacterPositionDomAttributes, createDocumentImageIdentityRegistry, normalizeDocumentColumns, documentStrikeDomAttributes, normalizeDocumentImageWrapContour, DOCUMENT_TABLE_ROW_ID_ATTRIBUTE, normalizeDocumentBookmarksHtml, applyDocumentTableRowIdentityToElement, normalizeDocumentCaptionsHtml, documentCharacterSpacingDomAttributes, normalizeDocumentImageAlignment, applyDocumentImageLayerToElement, normalizeDocumentNotesHtml, normalizeDocumentBookmarkReferencesHtml, documentCitationTagsFromInstruction, applyDocumentImageWrapContourToElement, documentUnderlineDomAttributes, documentHiddenTextDomAttributes, normalizeDocumentPageChrome, normalizeDocumentImageLayoutOptions, applyDocumentImageCropToElement, documentPageMarginsForLayout, applyDocumentPageGeometry, createDocumentNoteElement, normalizeDocumentImageLayer, DOCUMENT_TABLE_ROW_TEXT_ID_ATTRIBUTE, documentBookmarkReferenceInstruction, documentInitialSectionLayout, normalizeDocumentFieldsHtml, documentCaptionLabel, documentTableBordersFromElement, isContourImageLayout, normalizeDocumentCitationsHtml, normalizeDocumentImageIdentity, normalizeDocumentImageWrapSide, documentKerningDomAttributes, docxDocumentFieldKind, renderDocumentTableBorders, docxBookmarkReferenceTarget, normalizeDocumentImagePosition, wrapsBesideImage, documentPageChromeLegacyFields, documentCharacterScaleDomAttributes, DEFAULT_DOCUMENT_TABLE_GEOMETRY, documentSectionDomAttributes, DEFAULT_DOCUMENT_TABLE_CELL_MARGINS, documentPageMarginBody, documentLegacyTextEffectsDomAttributes, normalizeDocumentTableRowIdentity, normalizeDocumentBookmarkNativeId, documentOpenTypeDomAttributes, uniqueDocumentImageIdentity, applyDocumentTableGeometryToElement, normalizeDocumentImageCrop, documentContentLayoutProperties, documentEmphasisMarkDomAttributes } from "./4174.js";
4
- import { hasImportedDocxIndexMarkers, markDocxRunFormattingIntoState, applyImportedDocxParagraphSpacingMarkers, hasImportedDocxParagraphDirectionMarkers, hasImportedDocxParagraphIndentMarkers, resolveDocxParagraphBordersForParagraph, applyImportedDocxParagraphShadingMarkers, markDocxParagraphSpacing, docxCaptionBookmark, docxFieldResultText, createDocxParagraphStyleResolver, docxTableCellStyleLayers, createImportedDocxRunFormattingMarkerState, parseDocxPaperSource, resolveDocxLegacyTextEffects, markDocxTablesOfContents, hasImportedDocxParagraphSpacingMarkers, applyImportedDocxIndexMarkers, applyImportedDocxTableOfContentsMarkers, markDocxIndexes, parseDocxPageMargins, docxTablePropertySources, parseDirectDocxParagraphShading, markDocxParagraphIndents, markDocxPackageEquations, resolveDocxRunBorder, parseDocxPageGeometry, docxCaptionReferenceTarget, applyImportedDocxEquationMarkers, hasImportedDocxParagraphPaginationMarkers, createDocxTableStyleResolver, hasImportedDocxParagraphShadingMarkers, isDocxEquationLikeRoot, importedDocxStrike, docxTableRunPropertySources, inspectDocxPageMarginSettings, hasImportedDocxRunFormattingMarkers, applyImportedDocxParagraphFormattingChangeMarkers, hasImportedDocxTableOfContentsMarkers, hasImportedDocxParagraphTabStopMarkers, resolveDocxRunShading, docxCaptionSequenceKind, applyImportedDocxRunFormattingMarkers, markDocxParagraphAlignments, markDocxParagraphDirections, hasImportedDocxParagraphBorderMarkers, hasImportedDocxParagraphFormattingChangeMarkers, resolveDocxHiddenText, docxEquationHtml, docxFieldOccurrences, hasImportedDocxParagraphAlignmentMarkers, markDocxParagraphTabStops, applyImportedDocxParagraphIndentMarkers, resolveDocxTableStyleResolver, applyImportedDocxParagraphDirectionMarkers, applyImportedDocxParagraphAlignmentMarkers, markDocxParagraphPagination, importedDocxUnderline, markDocxParagraphBorders, applyImportedDocxParagraphTabStopMarkers, applyImportedDocxParagraphPaginationMarkers, docxFieldOccurrenceIsInlineEditable, applyImportedDocxParagraphBorderMarkers, docxRunPropertySources, markDocxParagraphFormattingChanges, markDocxParagraphShading, parseDocxPageBorders } from "./0~7240.js";
4
+ import { hasImportedDocxIndexMarkers, markDocxRunFormattingIntoState, applyImportedDocxParagraphSpacingMarkers, hasImportedDocxParagraphDirectionMarkers, hasImportedDocxParagraphIndentMarkers, resolveDocxParagraphBordersForParagraph, applyImportedDocxNumberingChangeMarkers, applyImportedDocxParagraphShadingMarkers, markDocxParagraphSpacing, docxCaptionBookmark, docxFieldResultText, createDocxParagraphStyleResolver, docxTableCellStyleLayers, createImportedDocxRunFormattingMarkerState, parseDocxPaperSource, resolveDocxLegacyTextEffects, markDocxTablesOfContents, hasImportedDocxParagraphSpacingMarkers, applyImportedDocxIndexMarkers, applyImportedDocxTableOfContentsMarkers, markDocxIndexes, parseDocxPageMargins, docxTablePropertySources, parseDirectDocxParagraphShading, markDocxParagraphIndents, markDocxPackageEquations, resolveDocxRunBorder, parseDocxPageGeometry, docxCaptionReferenceTarget, applyImportedDocxEquationMarkers, hasImportedDocxParagraphPaginationMarkers, createDocxTableStyleResolver, hasImportedDocxParagraphShadingMarkers, isDocxEquationLikeRoot, importedDocxStrike, docxTableRunPropertySources, hasImportedDocxNumberingChangeMarkers, inspectDocxPageMarginSettings, hasImportedDocxRunFormattingMarkers, hasImportedDocxTableOfContentsMarkers, applyImportedDocxParagraphFormattingChangeMarkers, hasImportedDocxParagraphTabStopMarkers, resolveDocxRunShading, docxCaptionSequenceKind, applyImportedDocxRunFormattingMarkers, markDocxParagraphAlignments, markDocxParagraphDirections, hasImportedDocxParagraphBorderMarkers, hasImportedDocxParagraphFormattingChangeMarkers, resolveDocxHiddenText, docxEquationHtml, docxFieldOccurrences, hasImportedDocxParagraphAlignmentMarkers, markDocxParagraphTabStops, applyImportedDocxParagraphIndentMarkers, resolveDocxTableStyleResolver, applyImportedDocxParagraphDirectionMarkers, markDocxNumberingChanges, applyImportedDocxParagraphAlignmentMarkers, importedDocxUnderline, markDocxParagraphBorders, markDocxParagraphPagination, applyImportedDocxParagraphTabStopMarkers, applyImportedDocxParagraphPaginationMarkers, docxFieldOccurrenceIsInlineEditable, applyImportedDocxParagraphBorderMarkers, docxRunPropertySources, markDocxParagraphFormattingChanges, markDocxParagraphShading, parseDocxPageBorders } from "./0~2330.js";
5
5
  import { readDocxBibliography, resolveDocxProofing, XMLNS_NAMESPACE, docxCharacterScalePercentFromProperties, docxCharacterSpacingTwipsFromProperties, parseBoundedDocxInteger, resolveDocxOpenTypeFeatures, xmlAttributeLocalName, resolveDocxEmphasisMark, createDocxThemeResolver, docxCharacterPositionHalfPointsFromProperties, docxThemeColor, parseDocxParagraphDefaultCollapsed, resolveDocxKerningThresholdHalfPoints, resolveDocxThemeResolver, DOCX_WORDPROCESSING_NAMESPACES, xmlAttributeNamespace } from "./0~5024.js";
6
6
  import { importDocxPageColor, importedDocumentNoteId } from "./0~4980.js";
7
7
  const WORD_NAMESPACE = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main';
@@ -2898,6 +2898,9 @@ async function prepareDocxImport(buffer, sourcePackage) {
2898
2898
  listMarkers: {
2899
2899
  lists: []
2900
2900
  },
2901
+ numberingChangeMarkers: {
2902
+ groups: []
2903
+ },
2901
2904
  imageLayoutMarkers: {
2902
2905
  images: []
2903
2906
  },
@@ -2964,6 +2967,7 @@ async function prepareDocxImport(buffer, sourcePackage) {
2964
2967
  const citationMarkers = markDocxCitationFields(document);
2965
2968
  const fieldMarkers = markDocxBodyFields(document);
2966
2969
  const listMarkers = markDocxLists(document, numbering);
2970
+ const numberingChangeMarkers = markDocxNumberingChanges(document);
2967
2971
  const imageLayoutMarkerState = createImportedDocxImageLayoutMarkerState();
2968
2972
  const imageLayoutMarkers = markDocxImageLayouts(document, imageLayoutMarkerState);
2969
2973
  const noteImageMarkers = await markDocxNoteImageLayouts(archive, imageLayoutMarkerState);
@@ -2996,10 +3000,10 @@ async function prepareDocxImport(buffer, sourcePackage) {
2996
3000
  const tableCellMarkers = markDocxTableCells(document, theme, tableStyles);
2997
3001
  const tableRowMarkers = markDocxTableRows(document);
2998
3002
  const tableSizingMarkers = markDocxTableSizing(document, tableStyles);
2999
- const trackChanges = Boolean(settings && firstDescendant(settings, 'trackRevisions')) || changeMarkers.changes.length > 0 || paragraphFormattingChangeMarkers.paragraphs.length > 0 || runFormattingMarkers.runs.some((run)=>Boolean(run.change));
3003
+ const trackChanges = Boolean(settings && firstDescendant(settings, 'trackRevisions')) || changeMarkers.changes.length > 0 || numberingChangeMarkers.groups.length > 0 || paragraphFormattingChangeMarkers.paragraphs.length > 0 || runFormattingMarkers.runs.some((run)=>Boolean(run.change));
3000
3004
  const sectionElements = effectiveSectionProperties(document);
3001
3005
  if (!sectionElements.length) return {
3002
- conversionBuffer: hasImportedDocxCaptionMarkers(captionMarkers) || hasImportedDocxBookmarkMarkers(bookmarkMarkers) || hasImportedDocxChangeMarkers(changeMarkers) || hasImportedDocxCommentMarkers(commentMarkers) || hasImportedDocxCitationMarkers(citationMarkers) || hasImportedDocxFieldMarkers(fieldMarkers) || hasImportedDocxTableOfContentsMarkers(tableOfContentsMarkers) || hasImportedDocxIndexMarkers(indexMarkers) || equationMarkers.changed || hasImportedDocxListMarkers(listMarkers) || hasImportedDocxImageLayoutMarkers(imageLayoutMarkers) || hasImportedDocxParagraphIdentityMarkers(paragraphIdentityMarkers) || hasImportedDocxParagraphFormattingChangeMarkers(paragraphFormattingChangeMarkers) || hasImportedDocxParagraphAlignmentMarkers(paragraphAlignmentMarkers) || hasImportedDocxParagraphDirectionMarkers(paragraphDirectionMarkers) || hasImportedDocxParagraphIndentMarkers(paragraphIndentMarkers) || hasImportedDocxParagraphSpacingMarkers(paragraphSpacingMarkers) || hasImportedDocxParagraphBorderMarkers(paragraphBorderMarkers) || hasImportedDocxParagraphShadingMarkers(paragraphShadingMarkers) || hasImportedDocxParagraphPaginationMarkers(paragraphPaginationMarkers) || hasImportedDocxRunFormattingMarkers(runFormattingMarkers) || hasImportedDocxParagraphTabStopMarkers(tabStopMarkers) || hasImportedDocxTableCellMarkers(tableCellMarkers) || hasImportedDocxTableRowMarkers(tableRowMarkers) || hasImportedDocxTableSizingMarkers(tableSizingMarkers) ? await writeDocumentXml(buffer, document, equationMarkers.parts) : buffer,
3006
+ conversionBuffer: hasImportedDocxCaptionMarkers(captionMarkers) || hasImportedDocxBookmarkMarkers(bookmarkMarkers) || hasImportedDocxChangeMarkers(changeMarkers) || hasImportedDocxCommentMarkers(commentMarkers) || hasImportedDocxCitationMarkers(citationMarkers) || hasImportedDocxFieldMarkers(fieldMarkers) || hasImportedDocxTableOfContentsMarkers(tableOfContentsMarkers) || hasImportedDocxIndexMarkers(indexMarkers) || equationMarkers.changed || hasImportedDocxListMarkers(listMarkers) || hasImportedDocxNumberingChangeMarkers(numberingChangeMarkers) || hasImportedDocxImageLayoutMarkers(imageLayoutMarkers) || hasImportedDocxParagraphIdentityMarkers(paragraphIdentityMarkers) || hasImportedDocxParagraphFormattingChangeMarkers(paragraphFormattingChangeMarkers) || hasImportedDocxParagraphAlignmentMarkers(paragraphAlignmentMarkers) || hasImportedDocxParagraphDirectionMarkers(paragraphDirectionMarkers) || hasImportedDocxParagraphIndentMarkers(paragraphIndentMarkers) || hasImportedDocxParagraphSpacingMarkers(paragraphSpacingMarkers) || hasImportedDocxParagraphBorderMarkers(paragraphBorderMarkers) || hasImportedDocxParagraphShadingMarkers(paragraphShadingMarkers) || hasImportedDocxParagraphPaginationMarkers(paragraphPaginationMarkers) || hasImportedDocxRunFormattingMarkers(runFormattingMarkers) || hasImportedDocxParagraphTabStopMarkers(tabStopMarkers) || hasImportedDocxTableCellMarkers(tableCellMarkers) || hasImportedDocxTableRowMarkers(tableRowMarkers) || hasImportedDocxTableSizingMarkers(tableSizingMarkers) ? await writeDocumentXml(buffer, document, equationMarkers.parts) : buffer,
3003
3007
  sections: [
3004
3008
  {
3005
3009
  id: 'document-section-1',
@@ -3017,6 +3021,7 @@ async function prepareDocxImport(buffer, sourcePackage) {
3017
3021
  equationMarkers: equationMarkers.markers,
3018
3022
  citationMarkers,
3019
3023
  listMarkers,
3024
+ numberingChangeMarkers,
3020
3025
  imageLayoutMarkers,
3021
3026
  paragraphIdentityMarkers,
3022
3027
  paragraphFormattingChangeMarkers,
@@ -3049,7 +3054,7 @@ async function prepareDocxImport(buffer, sourcePackage) {
3049
3054
  }
3050
3055
  if (sections.length > 1) addSectionMarkers(document, sectionElements);
3051
3056
  return {
3052
- conversionBuffer: sections.length > 1 || hasImportedDocxCaptionMarkers(captionMarkers) || hasImportedDocxBookmarkMarkers(bookmarkMarkers) || hasImportedDocxChangeMarkers(changeMarkers) || hasImportedDocxCommentMarkers(commentMarkers) || hasImportedDocxCitationMarkers(citationMarkers) || hasImportedDocxFieldMarkers(fieldMarkers) || hasImportedDocxTableOfContentsMarkers(tableOfContentsMarkers) || hasImportedDocxIndexMarkers(indexMarkers) || equationMarkers.changed || hasImportedDocxListMarkers(listMarkers) || hasImportedDocxImageLayoutMarkers(imageLayoutMarkers) || hasImportedDocxParagraphIdentityMarkers(paragraphIdentityMarkers) || hasImportedDocxParagraphFormattingChangeMarkers(paragraphFormattingChangeMarkers) || hasImportedDocxParagraphAlignmentMarkers(paragraphAlignmentMarkers) || hasImportedDocxParagraphDirectionMarkers(paragraphDirectionMarkers) || hasImportedDocxParagraphIndentMarkers(paragraphIndentMarkers) || hasImportedDocxParagraphSpacingMarkers(paragraphSpacingMarkers) || hasImportedDocxParagraphBorderMarkers(paragraphBorderMarkers) || hasImportedDocxParagraphShadingMarkers(paragraphShadingMarkers) || hasImportedDocxParagraphPaginationMarkers(paragraphPaginationMarkers) || hasImportedDocxRunFormattingMarkers(runFormattingMarkers) || hasImportedDocxParagraphTabStopMarkers(tabStopMarkers) || hasImportedDocxTableCellMarkers(tableCellMarkers) || hasImportedDocxTableRowMarkers(tableRowMarkers) || hasImportedDocxTableSizingMarkers(tableSizingMarkers) ? await writeDocumentXml(buffer, document, equationMarkers.parts) : buffer,
3057
+ conversionBuffer: sections.length > 1 || hasImportedDocxCaptionMarkers(captionMarkers) || hasImportedDocxBookmarkMarkers(bookmarkMarkers) || hasImportedDocxChangeMarkers(changeMarkers) || hasImportedDocxCommentMarkers(commentMarkers) || hasImportedDocxCitationMarkers(citationMarkers) || hasImportedDocxFieldMarkers(fieldMarkers) || hasImportedDocxTableOfContentsMarkers(tableOfContentsMarkers) || hasImportedDocxIndexMarkers(indexMarkers) || equationMarkers.changed || hasImportedDocxListMarkers(listMarkers) || hasImportedDocxNumberingChangeMarkers(numberingChangeMarkers) || hasImportedDocxImageLayoutMarkers(imageLayoutMarkers) || hasImportedDocxParagraphIdentityMarkers(paragraphIdentityMarkers) || hasImportedDocxParagraphFormattingChangeMarkers(paragraphFormattingChangeMarkers) || hasImportedDocxParagraphAlignmentMarkers(paragraphAlignmentMarkers) || hasImportedDocxParagraphDirectionMarkers(paragraphDirectionMarkers) || hasImportedDocxParagraphIndentMarkers(paragraphIndentMarkers) || hasImportedDocxParagraphSpacingMarkers(paragraphSpacingMarkers) || hasImportedDocxParagraphBorderMarkers(paragraphBorderMarkers) || hasImportedDocxParagraphShadingMarkers(paragraphShadingMarkers) || hasImportedDocxParagraphPaginationMarkers(paragraphPaginationMarkers) || hasImportedDocxRunFormattingMarkers(runFormattingMarkers) || hasImportedDocxParagraphTabStopMarkers(tabStopMarkers) || hasImportedDocxTableCellMarkers(tableCellMarkers) || hasImportedDocxTableRowMarkers(tableRowMarkers) || hasImportedDocxTableSizingMarkers(tableSizingMarkers) ? await writeDocumentXml(buffer, document, equationMarkers.parts) : buffer,
3053
3058
  sections,
3054
3059
  pageColor,
3055
3060
  captionMarkers,
@@ -3062,6 +3067,7 @@ async function prepareDocxImport(buffer, sourcePackage) {
3062
3067
  equationMarkers: equationMarkers.markers,
3063
3068
  citationMarkers,
3064
3069
  listMarkers,
3070
+ numberingChangeMarkers,
3065
3071
  imageLayoutMarkers,
3066
3072
  paragraphIdentityMarkers,
3067
3073
  paragraphFormattingChangeMarkers,
@@ -3106,6 +3112,8 @@ function applyDocxSectionsToHtml(html, sections, captionMarkers = {
3106
3112
  bibliographies: []
3107
3113
  }, listMarkers = {
3108
3114
  lists: []
3115
+ }, numberingChangeMarkers = {
3116
+ groups: []
3109
3117
  }, imageLayoutMarkers = {
3110
3118
  images: []
3111
3119
  }, paragraphIdentityMarkers = {
@@ -3150,6 +3158,7 @@ function applyDocxSectionsToHtml(html, sections, captionMarkers = {
3150
3158
  applyImportedDocxFieldMarkers(document, fieldMarkers);
3151
3159
  applyImportedDocxEquationMarkers(document, equationMarkers);
3152
3160
  applyImportedDocxListMarkers(document, listMarkers);
3161
+ applyImportedDocxNumberingChangeMarkers(document, numberingChangeMarkers);
3153
3162
  applyImportedDocxImageLayoutMarkers(document, imageLayoutMarkers);
3154
3163
  applyImportedDocxParagraphDirectionMarkers(document, paragraphDirectionMarkers);
3155
3164
  applyImportedDocxParagraphIndentMarkers(document, paragraphIndentMarkers);
@@ -1,7 +1,7 @@
1
1
  import { __webpack_require__ } from "./0~rslib-runtime.js";
2
2
  import { contentTypeForPart, directChildren, OoxmlPackage, parseXml, firstDescendant, isDocumentParagraphArtBorderStyle, descendants, directChild, xmlContainsAnyElement, attribute, documentRunBorderIsVisible } from "./4121.js";
3
3
  import { normalizeDocumentBookmarkName, docxBookmarkReferenceTarget, normalizeDocumentBookmarkNativeId, DOCUMENT_LEGACY_TEXT_EFFECT_NAMES, supportedDocxBookmarkReferenceInstruction, documentCitationTagsFromInstruction, docxDocumentFieldKind } from "./4174.js";
4
- import { markDocxParagraphShading, inspectDocxPageSize, docxCaptionBookmark, hasInvalidDocxFieldStructure, inspectDocxLegacyTextEffects, inspectDocxPageMargins, inspectDocxPaperSource, createDocxParagraphStyleResolver, supportedDocxTableOfContentsField, docxFieldOccurrences, supportedDocxIndexEntryField, createDocxTableStyleResolver, inspectDocxEquation, inspectDocxPageMarginSettings, inspectDocxRunFonts, inspectDocxRunBorder, inspectDocxRunShading, markDocxParagraphBorders, isSupportedDocxParagraphFormattingChange, docxFieldOccurrenceIsInlineEditable, supportedDocxIndexField, docxCaptionSequenceKind, inspectDocxHiddenText, inspectDocxPageBorders, isSupportedDocxRunFormattingChange, docxFieldInstructions, isSupportedDocxEquationPlacement } from "./0~7240.js";
4
+ import { markDocxParagraphShading, inspectDocxPageSize, isSupportedDocxNumberingChange, docxCaptionBookmark, hasInvalidDocxFieldStructure, inspectDocxLegacyTextEffects, inspectDocxPageMargins, inspectDocxPaperSource, createDocxParagraphStyleResolver, supportedDocxTableOfContentsField, docxFieldOccurrences, supportedDocxIndexEntryField, createDocxTableStyleResolver, inspectDocxEquation, inspectDocxPageMarginSettings, inspectDocxRunBorder, inspectDocxRunFonts, inspectDocxRunShading, markDocxParagraphBorders, isSupportedDocxParagraphFormattingChange, docxFieldOccurrenceIsInlineEditable, supportedDocxIndexField, docxCaptionSequenceKind, inspectDocxHiddenText, inspectDocxPageBorders, isSupportedDocxRunFormattingChange, docxFieldInstructions, isSupportedDocxEquationPlacement } from "./0~2330.js";
5
5
  import { normalizeDocumentHref } from "./0~work-document-links.js";
6
6
  import { xmlAttributeLocalName, resolveDocxOpenTypeFeatures, inspectDocxProofingLanguages, readDocxBibliography, inspectDocxEmphasisMark, createDocxThemeResolver, DOCX_WORD_2010_NAMESPACE, inspectDocxNoProof, parseDocxParagraphDefaultCollapsed, DOCX_WORDPROCESSING_NAMESPACES, xmlAttributeNamespace, inspectDocxKerningThresholdHalfPoints } from "./0~5024.js";
7
7
  import { updateSpreadsheetWorksheetCompatibilitySummary, inspectXlsxPivotTables, isSupportedXlsxChartLegend, isSupportedXlsxChartPlotLayout, xlsxChartNodeUsesStackedGrouping, isSupportedXlsxChartSeriesFormatting, readXlsxFormulaFeaturesFromPackage, inspectXlsxHeaderFooterText, emptySpreadsheetWorksheetCompatibilitySummary, isSupportedXlsxWorksheetImageContentType, MAX_XLSX_WORKSHEET_IMAGE_BYTES, xlsxChartSeriesFormattingShapeProperties, diagnoseXlsxProtection, isEditableXlsxPaperSizeCode, isSupportedXlsxCombinationChartNodes } from "./4166.js";
@@ -262,53 +262,6 @@ async function diagnoseDocxCitations(archive, document) {
262
262
  });
263
263
  return issues;
264
264
  }
265
- const EQUATION_PART_PATTERN = /^word\/(?:header\d*|footer\d*|footnotes|endnotes)\.xml$/i;
266
- const MAX_EDITABLE_EQUATIONS = 4096;
267
- async function diagnoseDocxEquations(archive, document) {
268
- const parts = document ? [
269
- {
270
- path: 'word/document.xml',
271
- document
272
- }
273
- ] : [];
274
- for (const path of archive.paths('word/').filter((candidate)=>EQUATION_PART_PATTERN.test(candidate)))parts.push({
275
- path,
276
- document: await archive.xml(path)
277
- });
278
- let supported = 0;
279
- let unsupported = 0;
280
- let spoofed = 0;
281
- for (const part of parts)for (const element of Array.from(part.document.querySelectorAll('*')).filter((candidate)=>'oMath' === candidate.localName || 'oMathPara' === candidate.localName)){
282
- if (closestEquationRoot(element.parentElement)) continue;
283
- const inspection = inspectDocxEquation(element);
284
- if ('supported' === inspection.status && isSupportedDocxEquationPlacement(element)) supported += 1;
285
- else if ('spoofed' === inspection.status) spoofed += 1;
286
- else unsupported += 1;
287
- }
288
- const total = supported + unsupported + spoofed;
289
- if (!total) return [];
290
- const issues = [];
291
- if (supported) issues.push(equationIssue('docx.equations', `${supported} native OMML equation(s) use the editable structured subset. Inline equations and display equations with left, right, center, or center-group paragraph justification, Unicode math runs with literal/normal-text semantics, six math scripts, four styles, manual breaks, alignment points, ordered core Word run formatting for fonts/theme references, emphasis, casing, strike, relief effects, legacy text animations, bounded line borders, proofing/grid flags, visibility, colors, bounded character spacing, horizontal scaling, kerning thresholds, signed baseline positions, half-point sizes, named highlights, patterned shading, bounded manual run widths with optional grouping IDs, explicit baseline/superscript/subscript run alignment, all five Word emphasis-mark values, underlines, script direction, languages, native-only East Asian typography with signed run IDs, two-lines-in-one brackets, rotation, and compression, inert paragraph-mark visibility resets, and Office 2010 text glow, shadow, reflection, text-outline, text-fill, 3D-scene, and 3D-property effects with bounded radii, offsets, outline widths, extrusion heights, and contour widths, exact direction and reflection opacity/position/fade geometry, signed scale and skew, rectangle and pen alignment, glow/shadow/outline/fill/extrusion/contour RGB or theme colors and ordered transform chains, none/solid/gradient outline and text fills with bounded stops and linear/path shading, preset dashes, round/bevel/miter joins, all camera, light-rig, bevel, and material presets, all light directions, exact optional rotation angles, ordered top/bottom bevel plus extrusion/contour color branches, all 16 ligature combinations, three numeral forms, three numeral-spacing modes, bounded Office 2010 stylistic-set lists, and explicit contextual-alternate controls with exact combined CSS OpenType projection and distinct clig/calt behavior, with exact direct RGB and default-black text fills projected to MathML while complex effects remain native metadata, and the same bounded Word formatting in ordered object-level control properties and native-only argument-slot control properties, bounded insertion, deletion, move-source, and move-destination provenance around those math controls, ordered fractions with four native types and a bar default, ordered right-side scripts with aligned sub/superscripts, left-side pre-sub/superscripts with empty script slots, radicals with optional degrees and canonical square-root slots, functions with required, optionally empty name/argument slots, canonical empty arguments across every supported construct, ordered argument/control properties, bounded relative argument sizes with Word-effective MathML script-level projection and native-only preservation elsewhere, and strictly aligned matrix-cell, equation-array-row, and delimiter-argument metadata, ordered n-ary operators with default integrals, canonical empty limit slots, and optional operand growth, combining accents, overbars and underbars, group characters with explicit character position and baseline justification, phantoms with visible or hidden bases, zeroed width/ascent/descent, and transparent spacing, border boxes with independently visible edges and four strike directions, semantic boxes with operator-emulation, no-break, differential-spacing, manual-break, and alignment properties, bounded rectangular matrices with ordered row-spacing, column-gap, and minimum-width controls, equation arrays with bounded rows, vertical base alignment, distribution, row-spacing, and alignment/spacer markers, lower and upper limit objects, ordered delimiters with distinct omitted/empty characters, bounded empty argument slots, growing or fixed sizing, and centered or content-matched shape, and their accessible MathML previews round-trip through body text, headers, footers, footnotes, and endnotes.`, 'info'));
292
- if (unsupported || spoofed) issues.push(equationIssue('docx.equations.unsupported', `${unsupported + spoofed} equation-like object(s) use unsupported, malformed, misplaced, namespace-spoofed, relationship-bound, or ambiguous markup. They are flattened to bounded text instead of being treated as trusted structured OMML. Invalid or non-combining accent characters, malformed math-run, script, function, argument-property, or math-paragraph structures, unknown, duplicated, reordered, spoofed, out-of-range, or contradictory Word math-run casing, strike, relief, animation, line-border, visibility, geometry, manual-width, vertical-alignment, emphasis-mark, East Asian typography, paragraph-mark visibility, Office 2010 glow/shadow/outline/text-fill color transforms, glow/shadow/reflection geometry, outline fill/gradient/dash/join structure, text-fill wrapper/fill/gradient structure, 3D-scene camera/light structure, or 3D-property extrusion/contour/bevel/color structure, missing, malformed, or non-leaf Office 2010 ligature, numeral-form, or numeral-spacing values, malformed or over-limit stylistic-set containers, entries, IDs, or on/off values, malformed contextual-alternate leaves or on/off values, coordinate values, preset values, directions, or rotation angles, highlight, shading, object-control, or argument-control formatting, malformed control-revision identities, dates, children, or nesting, out-of-range or malformed argument sizes, invalid or contradictory fraction, radical, n-ary, delimiter, bar, group-character, phantom, border-box, box, or equation-array properties, malformed pre-script or lower/upper limit structures, malformed, duplicated, reordered, or out-of-range matrix spacing/gap properties, ragged or over-limit matrices, over-limit equation arrays, and nested Office Math remain outside the structured subset.`));
293
- if (total > MAX_EDITABLE_EQUATIONS) issues.push(equationIssue('docx.equations.limit', `Only the first ${MAX_EDITABLE_EQUATIONS} valid equations enter the editable structured model; later equations are flattened to bounded text.`));
294
- return issues;
295
- }
296
- function closestEquationRoot(element) {
297
- let current = element;
298
- while(current){
299
- if ('oMath' === current.localName || 'oMathPara' === current.localName) return current;
300
- current = current.parentElement;
301
- }
302
- return null;
303
- }
304
- function equationIssue(code, message, severity = 'warning') {
305
- return {
306
- code,
307
- feature: 'Equations',
308
- message,
309
- severity
310
- };
311
- }
312
265
  const EMPHASIS_DIAGNOSTIC_PART_PATTERN = /^word\/(?:document|styles|header\d*|footer\d*|footnotes|endnotes)\.xml$/i;
313
266
  async function diagnoseDocxEmphasisMarks(archive, document) {
314
267
  const parts = [
@@ -356,6 +309,53 @@ async function diagnoseDocxEmphasisMarks(archive, document) {
356
309
  });
357
310
  return issues;
358
311
  }
312
+ const EQUATION_PART_PATTERN = /^word\/(?:header\d*|footer\d*|footnotes|endnotes)\.xml$/i;
313
+ const MAX_EDITABLE_EQUATIONS = 4096;
314
+ async function diagnoseDocxEquations(archive, document) {
315
+ const parts = document ? [
316
+ {
317
+ path: 'word/document.xml',
318
+ document
319
+ }
320
+ ] : [];
321
+ for (const path of archive.paths('word/').filter((candidate)=>EQUATION_PART_PATTERN.test(candidate)))parts.push({
322
+ path,
323
+ document: await archive.xml(path)
324
+ });
325
+ let supported = 0;
326
+ let unsupported = 0;
327
+ let spoofed = 0;
328
+ for (const part of parts)for (const element of Array.from(part.document.querySelectorAll('*')).filter((candidate)=>'oMath' === candidate.localName || 'oMathPara' === candidate.localName)){
329
+ if (closestEquationRoot(element.parentElement)) continue;
330
+ const inspection = inspectDocxEquation(element);
331
+ if ('supported' === inspection.status && isSupportedDocxEquationPlacement(element)) supported += 1;
332
+ else if ('spoofed' === inspection.status) spoofed += 1;
333
+ else unsupported += 1;
334
+ }
335
+ const total = supported + unsupported + spoofed;
336
+ if (!total) return [];
337
+ const issues = [];
338
+ if (supported) issues.push(equationIssue('docx.equations', `${supported} native OMML equation(s) use the editable structured subset. Inline equations and display equations with left, right, center, or center-group paragraph justification, Unicode math runs with literal/normal-text semantics, six math scripts, four styles, manual breaks, alignment points, ordered core Word run formatting for fonts/theme references, emphasis, casing, strike, relief effects, legacy text animations, bounded line borders, proofing/grid flags, visibility, colors, bounded character spacing, horizontal scaling, kerning thresholds, signed baseline positions, half-point sizes, named highlights, patterned shading, bounded manual run widths with optional grouping IDs, explicit baseline/superscript/subscript run alignment, all five Word emphasis-mark values, underlines, script direction, languages, native-only East Asian typography with signed run IDs, two-lines-in-one brackets, rotation, and compression, inert paragraph-mark visibility resets, and Office 2010 text glow, shadow, reflection, text-outline, text-fill, 3D-scene, and 3D-property effects with bounded radii, offsets, outline widths, extrusion heights, and contour widths, exact direction and reflection opacity/position/fade geometry, signed scale and skew, rectangle and pen alignment, glow/shadow/outline/fill/extrusion/contour RGB or theme colors and ordered transform chains, none/solid/gradient outline and text fills with bounded stops and linear/path shading, preset dashes, round/bevel/miter joins, all camera, light-rig, bevel, and material presets, all light directions, exact optional rotation angles, ordered top/bottom bevel plus extrusion/contour color branches, all 16 ligature combinations, three numeral forms, three numeral-spacing modes, bounded Office 2010 stylistic-set lists, and explicit contextual-alternate controls with exact combined CSS OpenType projection and distinct clig/calt behavior, with exact direct RGB and default-black text fills projected to MathML while complex effects remain native metadata, and the same bounded Word formatting in ordered object-level control properties and native-only argument-slot control properties, bounded insertion, deletion, move-source, and move-destination provenance around those math controls, ordered fractions with four native types and a bar default, ordered right-side scripts with aligned sub/superscripts, left-side pre-sub/superscripts with empty script slots, radicals with optional degrees and canonical square-root slots, functions with required, optionally empty name/argument slots, canonical empty arguments across every supported construct, ordered argument/control properties, bounded relative argument sizes with Word-effective MathML script-level projection and native-only preservation elsewhere, and strictly aligned matrix-cell, equation-array-row, and delimiter-argument metadata, ordered n-ary operators with default integrals, canonical empty limit slots, and optional operand growth, combining accents, overbars and underbars, group characters with explicit character position and baseline justification, phantoms with visible or hidden bases, zeroed width/ascent/descent, and transparent spacing, border boxes with independently visible edges and four strike directions, semantic boxes with operator-emulation, no-break, differential-spacing, manual-break, and alignment properties, bounded rectangular matrices with ordered row-spacing, column-gap, and minimum-width controls, equation arrays with bounded rows, vertical base alignment, distribution, row-spacing, and alignment/spacer markers, lower and upper limit objects, ordered delimiters with distinct omitted/empty characters, bounded empty argument slots, growing or fixed sizing, and centered or content-matched shape, and their accessible MathML previews round-trip through body text, headers, footers, footnotes, and endnotes.`, 'info'));
339
+ if (unsupported || spoofed) issues.push(equationIssue('docx.equations.unsupported', `${unsupported + spoofed} equation-like object(s) use unsupported, malformed, misplaced, namespace-spoofed, relationship-bound, or ambiguous markup. They are flattened to bounded text instead of being treated as trusted structured OMML. Invalid or non-combining accent characters, malformed math-run, script, function, argument-property, or math-paragraph structures, unknown, duplicated, reordered, spoofed, out-of-range, or contradictory Word math-run casing, strike, relief, animation, line-border, visibility, geometry, manual-width, vertical-alignment, emphasis-mark, East Asian typography, paragraph-mark visibility, Office 2010 glow/shadow/outline/text-fill color transforms, glow/shadow/reflection geometry, outline fill/gradient/dash/join structure, text-fill wrapper/fill/gradient structure, 3D-scene camera/light structure, or 3D-property extrusion/contour/bevel/color structure, missing, malformed, or non-leaf Office 2010 ligature, numeral-form, or numeral-spacing values, malformed or over-limit stylistic-set containers, entries, IDs, or on/off values, malformed contextual-alternate leaves or on/off values, coordinate values, preset values, directions, or rotation angles, highlight, shading, object-control, or argument-control formatting, malformed control-revision identities, dates, children, or nesting, out-of-range or malformed argument sizes, invalid or contradictory fraction, radical, n-ary, delimiter, bar, group-character, phantom, border-box, box, or equation-array properties, malformed pre-script or lower/upper limit structures, malformed, duplicated, reordered, or out-of-range matrix spacing/gap properties, ragged or over-limit matrices, over-limit equation arrays, and nested Office Math remain outside the structured subset.`));
340
+ if (total > MAX_EDITABLE_EQUATIONS) issues.push(equationIssue('docx.equations.limit', `Only the first ${MAX_EDITABLE_EQUATIONS} valid equations enter the editable structured model; later equations are flattened to bounded text.`));
341
+ return issues;
342
+ }
343
+ function closestEquationRoot(element) {
344
+ let current = element;
345
+ while(current){
346
+ if ('oMath' === current.localName || 'oMathPara' === current.localName) return current;
347
+ current = current.parentElement;
348
+ }
349
+ return null;
350
+ }
351
+ function equationIssue(code, message, severity = 'warning') {
352
+ return {
353
+ code,
354
+ feature: 'Equations',
355
+ message,
356
+ severity
357
+ };
358
+ }
359
359
  const HIDDEN_TEXT_DIAGNOSTIC_PART_PATTERN = /^word\/(?:document|styles|header\d*|footer\d*|footnotes|endnotes|comments)\.xml$/i;
360
360
  async function diagnoseDocxHiddenText(archive, document) {
361
361
  const parts = [
@@ -992,6 +992,48 @@ async function diagnoseDocxProofing(archive, document) {
992
992
  });
993
993
  return issues;
994
994
  }
995
+ const RUN_BORDER_PART_PATTERN = /^word\/(?:document|styles|header\d*|footer\d*|footnotes|endnotes|comments)\.xml$/i;
996
+ async function diagnoseDocxRunBorders(archive, document) {
997
+ const themePath = archive.paths('word/theme/').find((path)=>/\/theme\d*\.xml$/i.test(path));
998
+ const themeDocument = themePath ? await archive.xml(themePath) : null;
999
+ const settingsDocument = archive.has('word/settings.xml') ? await archive.xml('word/settings.xml') : null;
1000
+ const theme = createDocxThemeResolver(themeDocument, settingsDocument);
1001
+ const parts = [
1002
+ document
1003
+ ];
1004
+ for (const path of archive.paths('word/'))if ('word/document.xml' !== path.toLowerCase() && RUN_BORDER_PART_PATTERN.test(path)) parts.push(await archive.xml(path));
1005
+ let validCount = 0;
1006
+ let resetCount = 0;
1007
+ let invalidCount = 0;
1008
+ for (const part of parts){
1009
+ for (const properties of descendants(part, 'rPr').filter((element)=>DOCX_WORDPROCESSING_NAMESPACES.has(element.namespaceURI ?? ''))){
1010
+ if (!directChildren(properties, 'bdr').length) continue;
1011
+ const inspection = inspectDocxRunBorder(properties, theme);
1012
+ if ('valid' === inspection.status) {
1013
+ validCount += 1;
1014
+ if (!documentRunBorderIsVisible(inspection.value)) resetCount += 1;
1015
+ } else invalidCount += 1 + inspection.spoofedCount;
1016
+ }
1017
+ invalidCount += descendants(part, 'bdr').filter((element)=>{
1018
+ const parent = element.parentElement;
1019
+ return !parent || 'rPr' !== parent.localName || !DOCX_WORDPROCESSING_NAMESPACES.has(parent.namespaceURI ?? '');
1020
+ }).length;
1021
+ }
1022
+ const issues = [];
1023
+ if (validCount) issues.push({
1024
+ code: 'docx.run-borders',
1025
+ severity: 'info',
1026
+ feature: 'Character borders',
1027
+ message: `${validCount} native character border(s), including ${resetCount} explicit reset(s), were detected across document defaults, styles, body, page chrome, notes, comments, and formatting revisions. Writer preserves all 25 visible Word line styles plus nil and none, direct and theme colors, eighth-point widths, spacing, shadow, and frame semantics through editing, Format Painter, one-step Undo, and exact DOCX export. The browser and PDF paint is a bounded CSS approximation, and no non-standard shortcut is invented.`
1028
+ });
1029
+ if (invalidCount) issues.push({
1030
+ code: 'docx.run-borders.invalid',
1031
+ severity: 'warning',
1032
+ feature: 'Character borders',
1033
+ message: `${invalidCount} malformed, duplicated, misplaced, namespace-spoofed, text-bearing, child-bearing, extra-attribute, art-style, out-of-range, or unresolved-theme character border value(s) are normalized to explicit nil resets instead of enabling untrusted paint or inheriting stale formatting.`
1034
+ });
1035
+ return issues;
1036
+ }
995
1037
  const RUN_FONT_DIAGNOSTIC_PART_PATTERN = /^word\/(?:document|styles|header\d*|footer\d*|footnotes|endnotes|comments)\.xml$/i;
996
1038
  async function diagnoseDocxRunFonts(archive, document) {
997
1039
  const parts = [
@@ -1049,48 +1091,6 @@ async function diagnoseDocxRunFonts(archive, document) {
1049
1091
  });
1050
1092
  return issues;
1051
1093
  }
1052
- const RUN_BORDER_PART_PATTERN = /^word\/(?:document|styles|header\d*|footer\d*|footnotes|endnotes|comments)\.xml$/i;
1053
- async function diagnoseDocxRunBorders(archive, document) {
1054
- const themePath = archive.paths('word/theme/').find((path)=>/\/theme\d*\.xml$/i.test(path));
1055
- const themeDocument = themePath ? await archive.xml(themePath) : null;
1056
- const settingsDocument = archive.has('word/settings.xml') ? await archive.xml('word/settings.xml') : null;
1057
- const theme = createDocxThemeResolver(themeDocument, settingsDocument);
1058
- const parts = [
1059
- document
1060
- ];
1061
- for (const path of archive.paths('word/'))if ('word/document.xml' !== path.toLowerCase() && RUN_BORDER_PART_PATTERN.test(path)) parts.push(await archive.xml(path));
1062
- let validCount = 0;
1063
- let resetCount = 0;
1064
- let invalidCount = 0;
1065
- for (const part of parts){
1066
- for (const properties of descendants(part, 'rPr').filter((element)=>DOCX_WORDPROCESSING_NAMESPACES.has(element.namespaceURI ?? ''))){
1067
- if (!directChildren(properties, 'bdr').length) continue;
1068
- const inspection = inspectDocxRunBorder(properties, theme);
1069
- if ('valid' === inspection.status) {
1070
- validCount += 1;
1071
- if (!documentRunBorderIsVisible(inspection.value)) resetCount += 1;
1072
- } else invalidCount += 1 + inspection.spoofedCount;
1073
- }
1074
- invalidCount += descendants(part, 'bdr').filter((element)=>{
1075
- const parent = element.parentElement;
1076
- return !parent || 'rPr' !== parent.localName || !DOCX_WORDPROCESSING_NAMESPACES.has(parent.namespaceURI ?? '');
1077
- }).length;
1078
- }
1079
- const issues = [];
1080
- if (validCount) issues.push({
1081
- code: 'docx.run-borders',
1082
- severity: 'info',
1083
- feature: 'Character borders',
1084
- message: `${validCount} native character border(s), including ${resetCount} explicit reset(s), were detected across document defaults, styles, body, page chrome, notes, comments, and formatting revisions. Writer preserves all 25 visible Word line styles plus nil and none, direct and theme colors, eighth-point widths, spacing, shadow, and frame semantics through editing, Format Painter, one-step Undo, and exact DOCX export. The browser and PDF paint is a bounded CSS approximation, and no non-standard shortcut is invented.`
1085
- });
1086
- if (invalidCount) issues.push({
1087
- code: 'docx.run-borders.invalid',
1088
- severity: 'warning',
1089
- feature: 'Character borders',
1090
- message: `${invalidCount} malformed, duplicated, misplaced, namespace-spoofed, text-bearing, child-bearing, extra-attribute, art-style, out-of-range, or unresolved-theme character border value(s) are normalized to explicit nil resets instead of enabling untrusted paint or inheriting stale formatting.`
1091
- });
1092
- return issues;
1093
- }
1094
1094
  const RUN_SHADING_PART_PATTERN = /^word\/(?:document|styles|header\d*|footer\d*|footnotes|endnotes|comments)\.xml$/i;
1095
1095
  const VALID_SHADING_PARENTS = new Set([
1096
1096
  'rPr',
@@ -2198,20 +2198,22 @@ async function analyzeDocxCompatibility(file, messages, sourcePackage) {
2198
2198
  ];
2199
2199
  const runFormattingRevisions = descendants(document, 'rPrChange');
2200
2200
  const paragraphFormattingRevisions = descendants(document, 'pPrChange');
2201
+ const numberingRevisions = descendants(document, 'numberingChange');
2201
2202
  const supportedRunFormattingRevisionCount = runFormattingRevisions.filter(isSupportedDocxRunFormattingChange).length;
2202
2203
  const supportedParagraphFormattingRevisionCount = paragraphFormattingRevisions.filter(isSupportedDocxParagraphFormattingChange).length;
2204
+ const supportedNumberingRevisionCount = numberingRevisions.filter(isSupportedDocxNumberingChange).length;
2203
2205
  if (textRevisions.some((revision)=>descendants(revision, 't').length || descendants(revision, 'delText').length)) issues.push(work_office_diagnostics_issue('docx.revisions', 'Tracked changes', 'Body-text insertions and deletions preserve their author and date, remain reviewable in Work, and round-trip as native DOCX revisions.', 'info'));
2204
2206
  if (supportedRunFormattingRevisionCount) issues.push(work_office_diagnostics_issue('docx.revisions.formatting', 'Character-formatting revisions', `${supportedRunFormattingRevisionCount} bounded character-formatting revision(s) preserve author, date, current formatting, and prior bold, italic, underline, strike, text case, hidden text, outline, shadow, emboss, imprint, subscript, superscript, font, size, color, highlight, character borders, character shading, character scale, spacing, kerning threshold, emphasis mark, baseline position, grid state, proofing languages, and explicit proofing state. They remain reviewable in Work and round-trip as native w:rPrChange records.`, 'info'));
2205
2207
  if (supportedParagraphFormattingRevisionCount) issues.push(work_office_diagnostics_issue('docx.revisions.paragraph-formatting', 'Paragraph-formatting revisions', `${supportedParagraphFormattingRevisionCount} bounded paragraph-formatting revision(s) preserve author, date, current formatting, and prior alignment, direction, indentation, spacing, pagination, outline, tab-stop, border, shading, and collapsed state. They remain reviewable in Work and round-trip as native w:pPrChange records.`, 'info'));
2206
- if (textRevisions.some((revision)=>!descendants(revision, 't').length && !descendants(revision, 'delText').length) || supportedRunFormattingRevisionCount !== runFormattingRevisions.length || supportedParagraphFormattingRevisionCount !== paragraphFormattingRevisions.length || [
2208
+ if (supportedNumberingRevisionCount) issues.push(work_office_diagnostics_issue('docx.revisions.numbering', 'Numbering revisions', `${supportedNumberingRevisionCount} bounded ordered-list numbering revision(s) preserve author, date, prior start, and common decimal, letter, or Roman formats. Contiguous list-item records remain reviewable as one Work change and round-trip as native w:numberingChange records.`, 'info'));
2209
+ if (textRevisions.some((revision)=>!descendants(revision, 't').length && !descendants(revision, 'delText').length) || supportedRunFormattingRevisionCount !== runFormattingRevisions.length || supportedParagraphFormattingRevisionCount !== paragraphFormattingRevisions.length || supportedNumberingRevisionCount !== numberingRevisions.length || [
2207
2210
  'moveFrom',
2208
2211
  'moveTo',
2209
2212
  'tblPrChange',
2210
2213
  'trPrChange',
2211
2214
  'tcPrChange',
2212
- 'sectPrChange',
2213
- 'numberingChange'
2214
- ].some((name)=>descendants(document, name).length)) issues.push(work_office_diagnostics_issue('docx.revisions.structural', 'Structural revisions', 'Moved content plus unsupported character formatting, paragraph formatting, numbering, section, row, cell, and table-property revisions may be normalized; Work currently reviews body-text insertions/deletions and bounded character- and paragraph-formatting subsets.'));
2215
+ 'sectPrChange'
2216
+ ].some((name)=>descendants(document, name).length)) issues.push(work_office_diagnostics_issue('docx.revisions.structural', 'Structural revisions', 'Moved content plus unsupported character formatting, paragraph formatting, numbering, section, row, cell, and table-property revisions may be normalized; Work currently reviews body-text insertions/deletions and bounded character-, paragraph-, and ordered-list-numbering subsets.'));
2215
2217
  if (captionDiagnostics.hasUnsupportedFields) issues.push(work_office_diagnostics_issue('docx.fields', 'Fields', 'Fields beyond supported body fields, citations, bibliographies, caption SEQ fields, and bookmark or caption REF fields are converted to their current displayed value.'));
2216
2218
  const sectionProperties = descendants(document, 'sectPr');
2217
2219
  const columnProperties = descendants(document, 'cols');