@docx-editor.dev/core 2.9.1 → 2.9.2
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/automation.cjs +1 -1
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +7 -7
- package/dist/binding.d.ts +7 -7
- package/dist/binding.js +1 -1
- package/dist/chunk-6JWP2H7K.js +2 -0
- package/dist/chunk-6KNLLEUW.cjs +18 -0
- package/dist/chunk-7ADTI533.cjs +10 -0
- package/dist/chunk-7ETDCPF6.cjs +2 -0
- package/dist/chunk-7I3BSGGS.js +1 -0
- package/dist/{chunk-XMHWBL3K.cjs → chunk-7UU5YFCD.cjs} +1 -1
- package/dist/chunk-CKDAK3MV.js +10 -0
- package/dist/chunk-DIMEYVNS.js +2 -0
- package/dist/{chunk-IEXDXWTA.cjs → chunk-H2656QDI.cjs} +1 -1
- package/dist/chunk-KQGENNL5.cjs +15 -0
- package/dist/chunk-LIXPSV4T.js +18 -0
- package/dist/{chunk-DKMKH77K.cjs → chunk-O4UULRAQ.cjs} +5 -5
- package/dist/chunk-SIIFNE6U.js +15 -0
- package/dist/chunk-VXYECPKA.js +5 -0
- package/dist/contracts/editor.d.cts +6 -6
- package/dist/contracts/editor.d.ts +6 -6
- package/dist/contracts/interaction.d.cts +6 -6
- package/dist/contracts/interaction.d.ts +6 -6
- package/dist/contracts/modules.d.cts +3 -3
- package/dist/contracts/modules.d.ts +3 -3
- package/dist/{custom-node-writes-QyVZdTUA.d.ts → custom-node-writes-D6SGwebL.d.ts} +20 -4
- package/dist/{custom-node-writes-7ERv0f_X.d.cts → custom-node-writes-Dy3b20PS.d.cts} +20 -4
- package/dist/{editor-PUlv5Pp7.d.ts → editor-Cvd7Geoc.d.ts} +4 -4
- package/dist/{editor-CojjwMmF.d.cts → editor-cAEf1uXW.d.cts} +4 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +9 -5
- package/dist/editor.d.cts +18 -18
- package/dist/editor.d.ts +18 -18
- package/dist/editor.js +1 -1
- package/dist/{image-resources-eZqD_-vC.d.ts → image-resources-BgA9EQxY.d.ts} +1 -1
- package/dist/{image-resources-DQOiwOuE.d.cts → image-resources-BiA-IXgo.d.cts} +1 -1
- package/dist/{index-oN-v8DQ5.d.ts → index-DRqY5JVF.d.ts} +58 -12
- package/dist/{index-DGPSeLI0.d.cts → index-wb-iOxfh.d.cts} +58 -12
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +334 -306
- package/dist/layout.d.ts +334 -306
- package/dist/layout.js +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +5 -5
- package/dist/output.d.ts +5 -5
- package/dist/output.js +1 -1
- package/dist/{review-items-DpsqTHio.d.cts → review-items-B8tffIXj.d.cts} +1 -1
- package/dist/{review-items-D5SPFtsO.d.ts → review-items-bdGxFWNA.d.ts} +1 -1
- package/dist/{review-reads-CP106AHp.d.cts → review-reads-Bxz03tHG.d.cts} +1 -1
- package/dist/{review-reads-B2Ji3fVU.d.ts → review-reads-CHODU0LI.d.ts} +1 -1
- package/dist/{semantic-cell-selection-DJPjBWzf.d.cts → semantic-cell-selection-BPzx6DdT.d.cts} +2 -2
- package/dist/{semantic-cell-selection-BWhVAk5B.d.ts → semantic-cell-selection-CsHcr-yk.d.ts} +2 -2
- package/dist/{semantic-interaction-BjOcDB06.d.cts → semantic-interaction-BfWDD_0V.d.cts} +1 -1
- package/dist/{semantic-interaction-Cca1-X_a.d.ts → semantic-interaction-D-RZ9Ust.d.ts} +1 -1
- package/dist/{semantic-paint-Ur7pAINj.d.cts → semantic-paint-Bd7EqzXV.d.cts} +2 -2
- package/dist/{semantic-paint-CufpIQFw.d.ts → semantic-paint-WhVtSDJK.d.ts} +2 -2
- package/dist/{semantic-records-Cc1MJrhM.d.ts → semantic-records-DCt-ZwKU.d.ts} +22 -4
- package/dist/{semantic-records-C3Z76KeN.d.cts → semantic-records-DadVT_E1.d.cts} +22 -4
- package/dist/{shaped-measurer-CwlTPDJO.d.ts → shaped-measurer-B9f4A7QA.d.ts} +1 -1
- package/dist/{shaped-measurer-CYSK20E2.d.cts → shaped-measurer-CninrHr_.d.cts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +131 -131
- package/dist/store.d.ts +131 -131
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-XMVsJSpe.d.ts → tree-op-types-CnRb7AYo.d.ts} +22 -1
- package/dist/{tree-op-types-B0-sCtw-.d.cts → tree-op-types-D1vNJ7XC.d.cts} +22 -1
- package/dist/{tree-session-D945D43B.d.cts → tree-session-Df02ajqc.d.cts} +5 -5
- package/dist/{tree-session-DBJgmdmc.d.ts → tree-session-ZuBFOhIh.d.ts} +5 -5
- package/dist/{tree-store-C6vc8E_2.d.cts → tree-store-B_sJBMIS.d.cts} +1 -1
- package/dist/{tree-store-ClA-qng4.d.ts → tree-store-DgETo6Mf.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-5VC5HGJA.js +0 -2
- package/dist/chunk-A2JIBG75.js +0 -1
- package/dist/chunk-FWUI7EXG.cjs +0 -15
- package/dist/chunk-GZWMLQJO.js +0 -18
- package/dist/chunk-IMMAG4QP.cjs +0 -10
- package/dist/chunk-JTSNJQFO.js +0 -15
- package/dist/chunk-KBCC66CI.js +0 -5
- package/dist/chunk-LJ6BY6IU.cjs +0 -18
- package/dist/chunk-QDBAXFIK.js +0 -2
- package/dist/chunk-RD266XSK.cjs +0 -2
- package/dist/chunk-VUJGPCPU.js +0 -10
package/dist/store.d.cts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { e as ResourceLimits } from './image-resources-
|
|
2
|
-
export { C as CreateImageResourceCacheOptions, D as DEFAULT_IMAGE_RESOURCE_LIMITS, f as DEFAULT_LIMITS, H as HARD_CEILINGS, g as IMAGE_RESOURCE_HARD_CEILINGS, b as ImageDecodePort, c as ImageResourceLimits, h as ImageResourceLookup, I as ImageResourceState, M as MAX_SVG_SNIFF_BYTES, P as PreservedImageMime, S as SupportedImageMime, i as ValidatedRasterHeader, j as createImageResourceCache, k as hasBoundedSvgRoot, l as imageResourceLookupFor, m as liveDrawingReferenceCount, r as resolveImageResourceLimits, n as resolveLimits, s as sniffImageMime, o as validateGifHeader, p as validateJpegHeader, q as validatePngHeader, v as validateRasterHeader } from './image-resources-
|
|
1
|
+
import { e as ResourceLimits } from './image-resources-BiA-IXgo.cjs';
|
|
2
|
+
export { C as CreateImageResourceCacheOptions, D as DEFAULT_IMAGE_RESOURCE_LIMITS, f as DEFAULT_LIMITS, H as HARD_CEILINGS, g as IMAGE_RESOURCE_HARD_CEILINGS, b as ImageDecodePort, c as ImageResourceLimits, h as ImageResourceLookup, I as ImageResourceState, M as MAX_SVG_SNIFF_BYTES, P as PreservedImageMime, S as SupportedImageMime, i as ValidatedRasterHeader, j as createImageResourceCache, k as hasBoundedSvgRoot, l as imageResourceLookupFor, m as liveDrawingReferenceCount, r as resolveImageResourceLimits, n as resolveLimits, s as sniffImageMime, o as validateGifHeader, p as validateJpegHeader, q as validatePngHeader, v as validateRasterHeader } from './image-resources-BiA-IXgo.cjs';
|
|
3
3
|
import { O as OoxmlPart, a as OoxmlNode, u as OoxmlInvariantResult, c as OoxmlPackage, R as RelationshipRecord, b as OoxmlElement, v as OoxmlInvariantIssue, w as OoxmlHardBreakNode, d as OoxmlParagraphNode, x as OoxmlFldCharNode, y as OoxmlFldSimpleNode, z as OoxmlInstrTextNode, A as OoxmlAttribute } from './ooxml-package-CdEy9ufK.cjs';
|
|
4
4
|
export { C as ContentTypeError, B as ContentTypeIndex, D as ContentTypeRecords, E as DEFAULT_OOXML_PACKAGE_LIMITS, F as DEFAULT_ZIP_LIMITS, G as DefaultRecord, I as IMAGE_RELATIONSHIP_TYPE, H as ImageRelationshipResolution, J as IndexResult, N as NameRejection, K as NameResult, L as OOXML_NODE_IDENTITY_RULES, M as OoxmlBodyNode, P as OoxmlBookmarkEndNode, Q as OoxmlBookmarkStartNode, S as OoxmlContentControlCalendarNode, T as OoxmlContentControlCheckboxNode, U as OoxmlContentControlCheckedNode, V as OoxmlContentControlCheckedStateNode, W as OoxmlContentControlComboBoxNode, q as OoxmlContentControlContentNode, X as OoxmlContentControlDataBindingNode, Y as OoxmlContentControlDateFormatNode, Z as OoxmlContentControlDateNode, _ as OoxmlContentControlDropDownListNode, s as OoxmlContentControlEndPropertiesNode, $ as OoxmlContentControlLidNode, a0 as OoxmlContentControlListItemNode, p as OoxmlContentControlNode, t as OoxmlContentControlPropertiesNode, a1 as OoxmlContentControlStoreMappedDataAsNode, a2 as OoxmlContentControlTextNode, a3 as OoxmlContentControlUncheckedStateNode, f as OoxmlContinuationSeparatorNode, a4 as OoxmlDocumentNode, g as OoxmlEndnotesNode, a5 as OoxmlExternalTarget, h as OoxmlFootnotesNode, m as OoxmlGenericElementNode, a6 as OoxmlGenericExtensionAttribute, a7 as OoxmlHyperlinkNode, a8 as OoxmlInvariantIssueCode, a9 as OoxmlKnownNodeAttribute, aa as OoxmlNamespaceBinding, l as OoxmlNodeId, ab as OoxmlNodeIdentityRules, e as OoxmlNoteNode, i as OoxmlNoteRefNode, j as OoxmlNoteReferenceNode, n as OoxmlPackageLimits, o as OoxmlPackageRejection, ac as OoxmlPackageResult, ad as OoxmlParagraphPropertiesNode, ae as OoxmlPartMetadata, af as OoxmlReadRejection, ag as OoxmlReadResult, ah as OoxmlRunNode, ai as OoxmlRunPropertiesNode, k as OoxmlSeparatorNode, aj as OoxmlTabNode, ak as OoxmlTextElementNode, al as OoxmlTextNode, am as OoxmlWmlValAttribute, an as OoxmlXmlSpaceAttribute, ao as OverrideRecord, ap as RelationshipError, aq as RelationshipSetResult, ar as ResolveResult, as as ResolvedRelationship, at as TargetMode, au as WML_NAMESPACE_URI, av as XMLNS_NAMESPACE_URI, aw as XML_NAMESPACE_URI, ax as XmlLimits, ay as XmlNode, az as XmlRejection, aA as XmlResult, aB as ZipLimits, aC as ZipReadResult, aD as ZipRejection, aE as asciiFold, aF as buildContentTypeIndex, aG as buildRelationshipSet, aH as childElements, aI as detectDuplicateNames, aJ as extensionKey, aK as findElement, aL as isContentRevisionKind, aM as isRangeMarkerKind, aN as isValidMime, aO as normalizePartName, aP as partNameKey, aQ as readOnOffChild, aR as readOoxmlPackage, aS as readOoxmlPart, aT as readXml, aU as readZip, aV as resolveContentType, aW as resolveImageRelationship, aX as resolveInternalTarget, aY as resolveRelationship, aZ as textContent, a_ as validateExternalTarget, a$ as withPart, b0 as writeOoxmlPackage, b1 as writeZip } from './ooxml-package-CdEy9ufK.cjs';
|
|
5
|
-
export { e as BookmarkAnchor, B as BookmarkIndex, f as CascadeDeletedNoteReferencesOptions, g as CustomNodePayloadRead, h as CustomNodePayloadWrite, b as CustomNodeSweepOutcome, i as CustomNodeSweepResult, j as CustomNodeWriteRejection, C as CustomNodeWriteResult, k as DEFAULT_MAX_EDITABLE_STORY_PARTS, D as DocumentTrackingSettings, l as DrawingPropertyIdResult, E as EmbeddedFont, F as FontStyleKey, H as HeaderFooterLifecycleImpact, m as HeaderFooterLifecycleOp, n as HeaderFooterLifecycleRejection, o as HeaderFooterLifecycleResult, I as InsertCustomNodeWrite, L as ListKind, M as MAX_CUSTOM_NODE_LABEL_LENGTH, p as MAX_CUSTOM_NODE_PAYLOAD_LENGTH, q as MAX_NOTE_REFERENCE_PARTS, r as MAX_NOTE_REFERENCE_SCAN, N as NO_TRACKING_SETTINGS, s as NoteDiagnostic, t as NoteDiagnosticCode, u as NoteLifecycleImpact, v as NoteLifecycleOp, w as NoteLifecycleOptions, x as NoteLifecycleRejection, y as NoteLifecycleResult, z as NoteReferenceHit, G as NoteReferenceScanBudget, P as PackageTransactResult, J as ReadEmbeddedFontsOptions, K as StoryResolveResult, S as StoryScope, a as StoryTargetRejection, T as TreePackageStore, O as TreePackageStoreOptions, Q as allocateDrawingPropertyId, U as applyHeaderFooterLifecycleOp, V as applyNoteLifecycleOp, W as buildBookmarkIndex, X as cascadeDeletedNoteReferences, Y as collectNoteReferences, Z as collectPackageNoteReferences, _ as createNoteReferenceScanBudget, $ as customNodePayloadsByControl, a0 as customNodePayloadsOf, a1 as deobfuscateFont, a2 as diagnoseNoteReferences, a3 as ensureListDefinition, a4 as ensureNumberingLevel, a5 as insertCustomNodeWrite, a6 as isHeaderFooterLifecycleOp, a7 as isNoteLifecycleOp, a8 as normalNoteIds, a9 as notesPartHasId, aa as readEmbeddedFonts, ab as readTrackingSettings, ac as removeCustomNodeWrite, ad as resolveNotesPart, ae as sweepCustomNodePayloads, af as withBinaryPart, ag as withEmbeddedImage, ah as withoutUnreferencedImagePart } from './custom-node-writes-
|
|
5
|
+
export { e as BookmarkAnchor, B as BookmarkIndex, f as CascadeDeletedNoteReferencesOptions, g as CustomNodePayloadRead, h as CustomNodePayloadWrite, b as CustomNodeSweepOutcome, i as CustomNodeSweepResult, j as CustomNodeWriteRejection, C as CustomNodeWriteResult, k as DEFAULT_MAX_EDITABLE_STORY_PARTS, D as DocumentTrackingSettings, l as DrawingPropertyIdResult, E as EmbeddedFont, F as FontStyleKey, H as HeaderFooterLifecycleImpact, m as HeaderFooterLifecycleOp, n as HeaderFooterLifecycleRejection, o as HeaderFooterLifecycleResult, I as InsertCustomNodeWrite, L as ListKind, M as MAX_CUSTOM_NODE_LABEL_LENGTH, p as MAX_CUSTOM_NODE_PAYLOAD_LENGTH, q as MAX_NOTE_REFERENCE_PARTS, r as MAX_NOTE_REFERENCE_SCAN, N as NO_TRACKING_SETTINGS, s as NoteDiagnostic, t as NoteDiagnosticCode, u as NoteLifecycleImpact, v as NoteLifecycleOp, w as NoteLifecycleOptions, x as NoteLifecycleRejection, y as NoteLifecycleResult, z as NoteReferenceHit, G as NoteReferenceScanBudget, P as PackageTransactResult, J as ReadEmbeddedFontsOptions, K as StoryResolveResult, S as StoryScope, a as StoryTargetRejection, T as TreePackageStore, O as TreePackageStoreOptions, Q as allocateDrawingPropertyId, U as applyHeaderFooterLifecycleOp, V as applyNoteLifecycleOp, W as buildBookmarkIndex, X as cascadeDeletedNoteReferences, Y as collectNoteReferences, Z as collectPackageNoteReferences, _ as createNoteReferenceScanBudget, $ as customNodePayloadsByControl, a0 as customNodePayloadsOf, a1 as deobfuscateFont, a2 as diagnoseNoteReferences, a3 as ensureListDefinition, a4 as ensureNumberingLevel, a5 as insertCustomNodeWrite, a6 as isHeaderFooterLifecycleOp, a7 as isNoteLifecycleOp, a8 as normalNoteIds, a9 as notesPartHasId, aa as readEmbeddedFonts, ab as readTrackingSettings, ac as removeCustomNodeWrite, ad as resolveNotesPart, ae as sweepCustomNodePayloads, af as withBinaryPart, ag as withEmbeddedImage, ah as withoutUnreferencedImagePart } from './custom-node-writes-Dy3b20PS.cjs';
|
|
6
6
|
export { D as DEFAULT_OMML_LIMITS, E as EquationExpression, L as LinearMathOmmlResult, a as LinearMathParseResult, b as LinearMathRejection, c as OFFICE_MATH_NAMESPACE_URI, O as OmmlEquationProjection, d as OmmlLimits, e as equationExpressionToLinearMath, l as linearMathToOmml, p as parseLinearMath, f as projectOmmlEquation } from './omml-equation-BD-LsmWE.cjs';
|
|
7
7
|
export { c as HeaderFooterKind, a as HeaderFooterParts, b as HeaderFooterSectionResolution, d as HeaderFooterSlotMeta, H as HeaderFooterVariant, e as collectSectionPropertyNodes, r as resolveHeaderFooterParts, f as resolveHeaderFooterPartsBySection, g as resolveHeaderFooterResolutionBySection } from './hf-references-Dvk6De4Q.cjs';
|
|
8
|
-
export { L as LinkableReviewItem, c as collectFlowBlocks, f as collectReviewItems, a as commentBodyText, b as commentInitials, g as commentItemsOf, h as contentControlContentOf, j as deepParagraphOrderOfPart, i as isContentControl, e as isContentControlContent, l as linkRevisionReplies, p as paragraphOrderOfPart, r as revisionItemsOf, w as walkAllStoryParagraphs, k as walkParagraphInline, m as walkStoryBlocks } from './review-reads-
|
|
9
|
-
import { T as TreeDocOp, a as TreeOpRejection,
|
|
10
|
-
export { A as ACCEPTED_PARAGRAPH_PROPERTIES,
|
|
8
|
+
export { L as LinkableReviewItem, c as collectFlowBlocks, f as collectReviewItems, a as commentBodyText, b as commentInitials, g as commentItemsOf, h as contentControlContentOf, j as deepParagraphOrderOfPart, i as isContentControl, e as isContentControlContent, l as linkRevisionReplies, p as paragraphOrderOfPart, r as revisionItemsOf, w as walkAllStoryParagraphs, k as walkParagraphInline, m as walkStoryBlocks } from './review-reads-Bxz03tHG.cjs';
|
|
9
|
+
import { T as TreeDocOp, a as TreeOpRejection, r as TreeOpResult, O as OoxmlProperty, i as DrawingTreeDocOp, I as ImpactClass, b as ImageWrapTarget } from './tree-op-types-D1vNJ7XC.cjs';
|
|
10
|
+
export { A as ACCEPTED_PARAGRAPH_PROPERTIES, s as ACCEPTED_RUN_PROPERTIES, t as CONTENT_CONTROL_ID_MAX, u as CONTENT_CONTROL_PROPERTY_ORDER, v as ContentControlCheckbox, w as ContentControlCheckboxState, q as ContentControlDataBinding, x as ContentControlDateFormat, y as ContentControlEntry, C as ContentControlKind, o as ContentControlLevel, z as ContentControlListItem, p as ContentControlLock, B as ContentControlProperties, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, H as HYPERLINK_RELATIONSHIP_TYPE, E as HyperlinkKind, F as HyperlinkTarget, k as IMAGE_WRAP_TARGETS, M as MAX_CONTENT_CONTROLS_PER_PART, G as MAX_CONTENT_CONTROL_NESTING, J as OFFICE_RELATIONSHIP_NAMESPACE_URI, K as RelationshipTargetResolver, R as RevisionAddress, S as SourceCrop, L as TABLE_BORDER_STYLES, N as TREE_DOC_OP_KINDS, P as TabStopWrite, n as TableBorderStyle, Q as TreeDocOpKind, U as TreeOpEffect, W as allocateContentControlId, X as contentControlContentChildren, Y as contentControlContentNodeOf, Z as contentControlEndPropertiesNodeOf, _ as contentControlLevelOf, $ as contentControlPropertiesNodeOf, a0 as contentControlPropertiesOf, a1 as contentControlTextOf, a2 as contentControlsIn, a3 as findContentControl, a4 as flattenContentControls, a5 as hyperlinkAnchorOf, a6 as hyperlinkRelationshipIdOf, a7 as hyperlinkTargetOf, a8 as isContentControlContentNode, a9 as isContentControlNode, aa as isContentControlWrapper, ab as isHyperlinkNode, ac as lockForbidsEdit, ad as lockForbidsRemoval, ae as orderedContentControlProperties, af as parseContentControlId, ag as projectDrawing, ah as resolveContentControlLock } from './tree-op-types-D1vNJ7XC.cjs';
|
|
11
11
|
export { A as AtomicNoteSpan, M as MAX_NOTES_PER_PART, a as NOTE_ATOM_CHAR, b as NOTE_CONTINUATION_SEPARATOR_ID, c as NOTE_ID_MAX, d as NOTE_ID_MIN, e as NOTE_SEPARATOR_ID, N as NoteKind, f as NoteType, g as allocateNoteId, h as atomicNoteSpansOf, i as customMarkFollows, j as findNoteById, k as formatNoteScopeId, l as isContinuationSeparatorNode, m as isEndnotesNode, o as isFootnotesNode, p as isNormalNote, q as isNoteAtomNode, r as isNoteNode, s as isNoteRefNode, t as isNoteReferenceNode, u as isSeparatorNode, v as noteAtomText, w as noteIdOf, x as noteKindOf, y as noteRefKindOf, z as noteReferenceKindOf, n as noteTypeOf, B as notesOf, C as parseNoteId, D as parseNoteScopeId } from './note-nodes-DL-Au22P.cjs';
|
|
12
12
|
export { A as AuthoredNoteProperties, D as DEFAULT_ENDNOTE_PROPERTIES, b as DEFAULT_FOOTNOTE_PROPERTIES, E as EndnotePosition, F as FootnotePosition, N as NoteNumRestart, a as ResolvedEndnoteProperties, R as ResolvedFootnoteProperties, c as authoredDocumentEndnoteProperties, d as authoredDocumentFootnoteProperties, e as authoredEndnotePropertiesFromSectPr, f as authoredFootnotePropertiesFromSectPr, i as isLegalEndnotePosition, g as isLegalFootnotePosition, h as isLegalNumRestart, p as parseAuthoredNoteProperties, r as resolveEndnoteProperties, j as resolveFootnoteProperties, s as settingsPartOf } from './note-properties-CQlxjic_.cjs';
|
|
13
|
-
import { T as TreeModelChange, b as TreeDocumentStore } from './tree-store-
|
|
14
|
-
export { D as DocumentProperties, S as SelectionMark, f as TreeDocumentStoreOptions, a as TreeStoryRef, d as TreeTransactOptions, g as TreeTransactResult, c as TreeTransactionContext } from './tree-store-
|
|
15
|
-
export { i as CommentAnchor, j as CommentPosition, C as CommentRecord, h as CommentThreadState, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, W as W15_NAMESPACE_URI, q as commentAnchorsOfStory, s as commentsOfPart, l as firstReviewRange, t as hasAnyComment, r as reviewItemKey, n as reviewItemRanges, u as threadStateOfPart } from './review-items-
|
|
13
|
+
import { T as TreeModelChange, b as TreeDocumentStore } from './tree-store-B_sJBMIS.cjs';
|
|
14
|
+
export { D as DocumentProperties, S as SelectionMark, f as TreeDocumentStoreOptions, a as TreeStoryRef, d as TreeTransactOptions, g as TreeTransactResult, c as TreeTransactionContext } from './tree-store-B_sJBMIS.cjs';
|
|
15
|
+
export { i as CommentAnchor, j as CommentPosition, C as CommentRecord, h as CommentThreadState, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, W as W15_NAMESPACE_URI, q as commentAnchorsOfStory, s as commentsOfPart, l as firstReviewRange, t as hasAnyComment, r as reviewItemKey, n as reviewItemRanges, u as threadStateOfPart } from './review-items-B8tffIXj.cjs';
|
|
16
16
|
import './contracts/types.cjs';
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -1537,6 +1537,128 @@ declare function relationshipTargetIn(pkg: OoxmlPackage, ownerPart: string, rela
|
|
|
1537
1537
|
readonly sinkSafe?: boolean;
|
|
1538
1538
|
} | null;
|
|
1539
1539
|
|
|
1540
|
+
/** One addressable unit of paragraph text: text, tab, hard break, or atomic field. */
|
|
1541
|
+
interface Segment {
|
|
1542
|
+
readonly runId: string;
|
|
1543
|
+
readonly node: OoxmlNode;
|
|
1544
|
+
readonly start: number;
|
|
1545
|
+
readonly end: number;
|
|
1546
|
+
/**
|
|
1547
|
+
* When set, deleting this segment removes every listed node id in one step (atomic
|
|
1548
|
+
* field begin→end or `fldSimple`). Absent for ordinary text/tab/break segments.
|
|
1549
|
+
*/
|
|
1550
|
+
readonly removeNodeIds?: readonly string[];
|
|
1551
|
+
/**
|
|
1552
|
+
* When set, run formatting for this atom targets these runs (field result ownership),
|
|
1553
|
+
* not necessarily `runId`. Absent for ordinary text/tab/break segments.
|
|
1554
|
+
*/
|
|
1555
|
+
readonly formatRunIds?: readonly string[];
|
|
1556
|
+
}
|
|
1557
|
+
/**
|
|
1558
|
+
* Flatten a paragraph into UTF-16 addressable segments, in document order.
|
|
1559
|
+
*
|
|
1560
|
+
* A HYPERLINK's runs are addressed too. `w:hyperlink` is a run container, not a leaf, and
|
|
1561
|
+
* the characters inside a link are ordinary paragraph text: the user selects them, types
|
|
1562
|
+
* over them and deletes them like any other. Skipping the container — which is what
|
|
1563
|
+
* iterating only direct `w:r` children did — left every link's text with no offsets at all,
|
|
1564
|
+
* so `paragraphTextOf` read "Visit or ." for a sentence that says "Visit Example.com or
|
|
1565
|
+
* Anthropic's website." and layout, selection and the ops all agreed on the wrong string.
|
|
1566
|
+
*
|
|
1567
|
+
* Inline CONTENT CONTROLS are the same class of wrapper: their `w:sdtContent` runs join the
|
|
1568
|
+
* paragraph's offset stream with no break opportunity at the boundary. Nesting is bounded
|
|
1569
|
+
* (`MAX_CONTENT_CONTROL_NESTING`); beyond the bound the wrapper is opaque so recursion
|
|
1570
|
+
* cannot exhaust the stack.
|
|
1571
|
+
*
|
|
1572
|
+
* `runId` stays the id of the run the content actually lives in, at whatever depth: the
|
|
1573
|
+
* appliers resolve it with `findNode` and rebuild that run's children, so nesting costs them
|
|
1574
|
+
* nothing.
|
|
1575
|
+
*/
|
|
1576
|
+
declare function segmentsOf(paragraph: OoxmlParagraphNode): Segment[];
|
|
1577
|
+
/** Half-open `[start, end)` of one node in its paragraph's model offset space. */
|
|
1578
|
+
interface OffsetSpan {
|
|
1579
|
+
readonly start: number;
|
|
1580
|
+
readonly end: number;
|
|
1581
|
+
}
|
|
1582
|
+
/**
|
|
1583
|
+
* Every node's place in the paragraph's model offset space, from the SAME walk `segmentsOf`
|
|
1584
|
+
* uses.
|
|
1585
|
+
*
|
|
1586
|
+
* The offset model has exactly one authority, and this is how a caller borrows it. Three
|
|
1587
|
+
* private walkers used to re-derive it — one in the tracked-change writer, one in the comment
|
|
1588
|
+
* anchor reader, one in the review queue — and all three disagreed with `segmentsOf` and with
|
|
1589
|
+
* each other: none gave a note reference or an atomic field its length of one, one counted a
|
|
1590
|
+
* field's instruction text as visible characters, and one never descended into `w:hyperlink`
|
|
1591
|
+
* at all. The consequences were an anchor short by a link's length, two unrelated comments
|
|
1592
|
+
* threaded onto one zero-width offset, and a tracked insert landing a character out in any
|
|
1593
|
+
* paragraph carrying a footnote. Patching each walker only resets the clock on the next drift.
|
|
1594
|
+
*
|
|
1595
|
+
* A node the walk never reaches — content under a `generic` container, or past the nesting cap
|
|
1596
|
+
* — has NO span, and {@link ParagraphOffsetIndex.lengthOf} reports zero for it. That is the
|
|
1597
|
+
* same answer `segmentsOf` gives: it contributes no addressable characters.
|
|
1598
|
+
*/
|
|
1599
|
+
interface ParagraphOffsetIndex {
|
|
1600
|
+
/** The paragraph's own length, identical to {@link paragraphLength}. */
|
|
1601
|
+
readonly length: number;
|
|
1602
|
+
readonly segments: readonly Segment[];
|
|
1603
|
+
/** Where a node sits, or null when the offset walk never reached it. */
|
|
1604
|
+
spanOf(node: OoxmlNode | string): OffsetSpan | null;
|
|
1605
|
+
/** A node's model length: `end - start` of its span, and 0 when it has none. */
|
|
1606
|
+
lengthOf(node: OoxmlNode | string): number;
|
|
1607
|
+
}
|
|
1608
|
+
/**
|
|
1609
|
+
* THE paragraph offset authority: maps a paragraph's UTF-16 offsets to the nodes holding them.
|
|
1610
|
+
*
|
|
1611
|
+
* One authority on purpose. An atomic field spans many nodes but is ONE unit to an offset, and a
|
|
1612
|
+
* second implementation that disagreed would place edits inside content that cannot be split.
|
|
1613
|
+
*/
|
|
1614
|
+
declare function paragraphOffsetIndex(paragraph: OoxmlParagraphNode): ParagraphOffsetIndex;
|
|
1615
|
+
/** One inline content control's identity and the UTF-16 span its content covers. */
|
|
1616
|
+
interface InlineControlSpan {
|
|
1617
|
+
readonly controlId: string;
|
|
1618
|
+
readonly start: number;
|
|
1619
|
+
readonly end: number;
|
|
1620
|
+
}
|
|
1621
|
+
/**
|
|
1622
|
+
* The innermost inline content control whose content ends exactly at `offset` — the caret
|
|
1623
|
+
* at its right outer edge. What Backspace consults to delete the node as ONE unit
|
|
1624
|
+
* (pro-review-and-custom-nodes 4.6): deleting its last character from outside would either
|
|
1625
|
+
* strip one letter from a content-locked label (refused, so the key looks dead) or leave a
|
|
1626
|
+
* half-deleted chip whose tag still claims the full payload.
|
|
1627
|
+
*/
|
|
1628
|
+
declare function inlineControlEndingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1629
|
+
/** The forward-delete mirror: the control whose content STARTS exactly at `offset`. */
|
|
1630
|
+
declare function inlineControlStartingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1631
|
+
|
|
1632
|
+
/** Structural validation, run before any tree work so a rejection changes nothing. */
|
|
1633
|
+
declare function validateTreeOp(part: OoxmlPart, op: TreeDocOp): TreeOpRejection | null;
|
|
1634
|
+
|
|
1635
|
+
interface RevisionSite {
|
|
1636
|
+
readonly node: OoxmlElement;
|
|
1637
|
+
readonly parent: OoxmlElement | null;
|
|
1638
|
+
/** True when this site cannot be resolved and the whole op must refuse. */
|
|
1639
|
+
readonly refused: boolean;
|
|
1640
|
+
/** True for `w:pPr/w:rPr/w:ins|w:del` — the paragraph MARK, not content. */
|
|
1641
|
+
readonly paragraphMark: boolean;
|
|
1642
|
+
/** True for `w:rPrChange` / `w:pPrChange`. */
|
|
1643
|
+
readonly propertyChange: boolean;
|
|
1644
|
+
/**
|
|
1645
|
+
* How many content-revision wrappers ENCLOSE this one, counted within its own paragraph.
|
|
1646
|
+
*
|
|
1647
|
+
* Revisions nest for real: `w:ins` wrapping `w:del` is content one reviewer added and another
|
|
1648
|
+
* struck, and both stay pending because each author has to be answered separately. The two
|
|
1649
|
+
* wrappers then cover exactly the same characters, so a range cannot tell them apart and
|
|
1650
|
+
* "which change is this text under" has only one honest answer — the innermost one, which is
|
|
1651
|
+
* the change that decides what the reader is looking at.
|
|
1652
|
+
*
|
|
1653
|
+
* Relative to the paragraph or table subtree, which is the unit the site walk memoizes. That
|
|
1654
|
+
* is enough and it is what keeps the memo valid: a content revision cannot enclose a
|
|
1655
|
+
* paragraph, and two sites can only cover one position if they are in the same paragraph.
|
|
1656
|
+
*/
|
|
1657
|
+
readonly nesting: number;
|
|
1658
|
+
}
|
|
1659
|
+
/** Every revision-bearing element in the part. */
|
|
1660
|
+
declare function collectRevisionSites(part: OoxmlPart): RevisionSite[];
|
|
1661
|
+
|
|
1540
1662
|
/**
|
|
1541
1663
|
* Which story a comment deletion or resolution may read markers from.
|
|
1542
1664
|
*
|
|
@@ -1851,128 +1973,6 @@ type CustomNodeExportResult = {
|
|
|
1851
1973
|
*/
|
|
1852
1974
|
declare function withExportedCustomNodes(pkg: OoxmlPackage, request: CustomNodeExportRequest): CustomNodeExportResult;
|
|
1853
1975
|
|
|
1854
|
-
/** One addressable unit of paragraph text: text, tab, hard break, or atomic field. */
|
|
1855
|
-
interface Segment {
|
|
1856
|
-
readonly runId: string;
|
|
1857
|
-
readonly node: OoxmlNode;
|
|
1858
|
-
readonly start: number;
|
|
1859
|
-
readonly end: number;
|
|
1860
|
-
/**
|
|
1861
|
-
* When set, deleting this segment removes every listed node id in one step (atomic
|
|
1862
|
-
* field begin→end or `fldSimple`). Absent for ordinary text/tab/break segments.
|
|
1863
|
-
*/
|
|
1864
|
-
readonly removeNodeIds?: readonly string[];
|
|
1865
|
-
/**
|
|
1866
|
-
* When set, run formatting for this atom targets these runs (field result ownership),
|
|
1867
|
-
* not necessarily `runId`. Absent for ordinary text/tab/break segments.
|
|
1868
|
-
*/
|
|
1869
|
-
readonly formatRunIds?: readonly string[];
|
|
1870
|
-
}
|
|
1871
|
-
/**
|
|
1872
|
-
* Flatten a paragraph into UTF-16 addressable segments, in document order.
|
|
1873
|
-
*
|
|
1874
|
-
* A HYPERLINK's runs are addressed too. `w:hyperlink` is a run container, not a leaf, and
|
|
1875
|
-
* the characters inside a link are ordinary paragraph text: the user selects them, types
|
|
1876
|
-
* over them and deletes them like any other. Skipping the container — which is what
|
|
1877
|
-
* iterating only direct `w:r` children did — left every link's text with no offsets at all,
|
|
1878
|
-
* so `paragraphTextOf` read "Visit or ." for a sentence that says "Visit Example.com or
|
|
1879
|
-
* Anthropic's website." and layout, selection and the ops all agreed on the wrong string.
|
|
1880
|
-
*
|
|
1881
|
-
* Inline CONTENT CONTROLS are the same class of wrapper: their `w:sdtContent` runs join the
|
|
1882
|
-
* paragraph's offset stream with no break opportunity at the boundary. Nesting is bounded
|
|
1883
|
-
* (`MAX_CONTENT_CONTROL_NESTING`); beyond the bound the wrapper is opaque so recursion
|
|
1884
|
-
* cannot exhaust the stack.
|
|
1885
|
-
*
|
|
1886
|
-
* `runId` stays the id of the run the content actually lives in, at whatever depth: the
|
|
1887
|
-
* appliers resolve it with `findNode` and rebuild that run's children, so nesting costs them
|
|
1888
|
-
* nothing.
|
|
1889
|
-
*/
|
|
1890
|
-
declare function segmentsOf(paragraph: OoxmlParagraphNode): Segment[];
|
|
1891
|
-
/** Half-open `[start, end)` of one node in its paragraph's model offset space. */
|
|
1892
|
-
interface OffsetSpan {
|
|
1893
|
-
readonly start: number;
|
|
1894
|
-
readonly end: number;
|
|
1895
|
-
}
|
|
1896
|
-
/**
|
|
1897
|
-
* Every node's place in the paragraph's model offset space, from the SAME walk `segmentsOf`
|
|
1898
|
-
* uses.
|
|
1899
|
-
*
|
|
1900
|
-
* The offset model has exactly one authority, and this is how a caller borrows it. Three
|
|
1901
|
-
* private walkers used to re-derive it — one in the tracked-change writer, one in the comment
|
|
1902
|
-
* anchor reader, one in the review queue — and all three disagreed with `segmentsOf` and with
|
|
1903
|
-
* each other: none gave a note reference or an atomic field its length of one, one counted a
|
|
1904
|
-
* field's instruction text as visible characters, and one never descended into `w:hyperlink`
|
|
1905
|
-
* at all. The consequences were an anchor short by a link's length, two unrelated comments
|
|
1906
|
-
* threaded onto one zero-width offset, and a tracked insert landing a character out in any
|
|
1907
|
-
* paragraph carrying a footnote. Patching each walker only resets the clock on the next drift.
|
|
1908
|
-
*
|
|
1909
|
-
* A node the walk never reaches — content under a `generic` container, or past the nesting cap
|
|
1910
|
-
* — has NO span, and {@link ParagraphOffsetIndex.lengthOf} reports zero for it. That is the
|
|
1911
|
-
* same answer `segmentsOf` gives: it contributes no addressable characters.
|
|
1912
|
-
*/
|
|
1913
|
-
interface ParagraphOffsetIndex {
|
|
1914
|
-
/** The paragraph's own length, identical to {@link paragraphLength}. */
|
|
1915
|
-
readonly length: number;
|
|
1916
|
-
readonly segments: readonly Segment[];
|
|
1917
|
-
/** Where a node sits, or null when the offset walk never reached it. */
|
|
1918
|
-
spanOf(node: OoxmlNode | string): OffsetSpan | null;
|
|
1919
|
-
/** A node's model length: `end - start` of its span, and 0 when it has none. */
|
|
1920
|
-
lengthOf(node: OoxmlNode | string): number;
|
|
1921
|
-
}
|
|
1922
|
-
/**
|
|
1923
|
-
* THE paragraph offset authority: maps a paragraph's UTF-16 offsets to the nodes holding them.
|
|
1924
|
-
*
|
|
1925
|
-
* One authority on purpose. An atomic field spans many nodes but is ONE unit to an offset, and a
|
|
1926
|
-
* second implementation that disagreed would place edits inside content that cannot be split.
|
|
1927
|
-
*/
|
|
1928
|
-
declare function paragraphOffsetIndex(paragraph: OoxmlParagraphNode): ParagraphOffsetIndex;
|
|
1929
|
-
/** One inline content control's identity and the UTF-16 span its content covers. */
|
|
1930
|
-
interface InlineControlSpan {
|
|
1931
|
-
readonly controlId: string;
|
|
1932
|
-
readonly start: number;
|
|
1933
|
-
readonly end: number;
|
|
1934
|
-
}
|
|
1935
|
-
/**
|
|
1936
|
-
* The innermost inline content control whose content ends exactly at `offset` — the caret
|
|
1937
|
-
* at its right outer edge. What Backspace consults to delete the node as ONE unit
|
|
1938
|
-
* (pro-review-and-custom-nodes 4.6): deleting its last character from outside would either
|
|
1939
|
-
* strip one letter from a content-locked label (refused, so the key looks dead) or leave a
|
|
1940
|
-
* half-deleted chip whose tag still claims the full payload.
|
|
1941
|
-
*/
|
|
1942
|
-
declare function inlineControlEndingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1943
|
-
/** The forward-delete mirror: the control whose content STARTS exactly at `offset`. */
|
|
1944
|
-
declare function inlineControlStartingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1945
|
-
|
|
1946
|
-
interface RevisionSite {
|
|
1947
|
-
readonly node: OoxmlElement;
|
|
1948
|
-
readonly parent: OoxmlElement | null;
|
|
1949
|
-
/** True when this site cannot be resolved and the whole op must refuse. */
|
|
1950
|
-
readonly refused: boolean;
|
|
1951
|
-
/** True for `w:pPr/w:rPr/w:ins|w:del` — the paragraph MARK, not content. */
|
|
1952
|
-
readonly paragraphMark: boolean;
|
|
1953
|
-
/** True for `w:rPrChange` / `w:pPrChange`. */
|
|
1954
|
-
readonly propertyChange: boolean;
|
|
1955
|
-
/**
|
|
1956
|
-
* How many content-revision wrappers ENCLOSE this one, counted within its own paragraph.
|
|
1957
|
-
*
|
|
1958
|
-
* Revisions nest for real: `w:ins` wrapping `w:del` is content one reviewer added and another
|
|
1959
|
-
* struck, and both stay pending because each author has to be answered separately. The two
|
|
1960
|
-
* wrappers then cover exactly the same characters, so a range cannot tell them apart and
|
|
1961
|
-
* "which change is this text under" has only one honest answer — the innermost one, which is
|
|
1962
|
-
* the change that decides what the reader is looking at.
|
|
1963
|
-
*
|
|
1964
|
-
* Relative to the paragraph or table subtree, which is the unit the site walk memoizes. That
|
|
1965
|
-
* is enough and it is what keeps the memo valid: a content revision cannot enclose a
|
|
1966
|
-
* paragraph, and two sites can only cover one position if they are in the same paragraph.
|
|
1967
|
-
*/
|
|
1968
|
-
readonly nesting: number;
|
|
1969
|
-
}
|
|
1970
|
-
/** Every revision-bearing element in the part. */
|
|
1971
|
-
declare function collectRevisionSites(part: OoxmlPart): RevisionSite[];
|
|
1972
|
-
|
|
1973
|
-
/** Structural validation, run before any tree work so a rejection changes nothing. */
|
|
1974
|
-
declare function validateTreeOp(part: OoxmlPart, op: TreeDocOp): TreeOpRejection | null;
|
|
1975
|
-
|
|
1976
1976
|
/**
|
|
1977
1977
|
* Apply one validated op to a part.
|
|
1978
1978
|
*
|
package/dist/store.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { e as ResourceLimits } from './image-resources-
|
|
2
|
-
export { C as CreateImageResourceCacheOptions, D as DEFAULT_IMAGE_RESOURCE_LIMITS, f as DEFAULT_LIMITS, H as HARD_CEILINGS, g as IMAGE_RESOURCE_HARD_CEILINGS, b as ImageDecodePort, c as ImageResourceLimits, h as ImageResourceLookup, I as ImageResourceState, M as MAX_SVG_SNIFF_BYTES, P as PreservedImageMime, S as SupportedImageMime, i as ValidatedRasterHeader, j as createImageResourceCache, k as hasBoundedSvgRoot, l as imageResourceLookupFor, m as liveDrawingReferenceCount, r as resolveImageResourceLimits, n as resolveLimits, s as sniffImageMime, o as validateGifHeader, p as validateJpegHeader, q as validatePngHeader, v as validateRasterHeader } from './image-resources-
|
|
1
|
+
import { e as ResourceLimits } from './image-resources-BgA9EQxY.js';
|
|
2
|
+
export { C as CreateImageResourceCacheOptions, D as DEFAULT_IMAGE_RESOURCE_LIMITS, f as DEFAULT_LIMITS, H as HARD_CEILINGS, g as IMAGE_RESOURCE_HARD_CEILINGS, b as ImageDecodePort, c as ImageResourceLimits, h as ImageResourceLookup, I as ImageResourceState, M as MAX_SVG_SNIFF_BYTES, P as PreservedImageMime, S as SupportedImageMime, i as ValidatedRasterHeader, j as createImageResourceCache, k as hasBoundedSvgRoot, l as imageResourceLookupFor, m as liveDrawingReferenceCount, r as resolveImageResourceLimits, n as resolveLimits, s as sniffImageMime, o as validateGifHeader, p as validateJpegHeader, q as validatePngHeader, v as validateRasterHeader } from './image-resources-BgA9EQxY.js';
|
|
3
3
|
import { O as OoxmlPart, a as OoxmlNode, u as OoxmlInvariantResult, c as OoxmlPackage, R as RelationshipRecord, b as OoxmlElement, v as OoxmlInvariantIssue, w as OoxmlHardBreakNode, d as OoxmlParagraphNode, x as OoxmlFldCharNode, y as OoxmlFldSimpleNode, z as OoxmlInstrTextNode, A as OoxmlAttribute } from './ooxml-package-CdEy9ufK.js';
|
|
4
4
|
export { C as ContentTypeError, B as ContentTypeIndex, D as ContentTypeRecords, E as DEFAULT_OOXML_PACKAGE_LIMITS, F as DEFAULT_ZIP_LIMITS, G as DefaultRecord, I as IMAGE_RELATIONSHIP_TYPE, H as ImageRelationshipResolution, J as IndexResult, N as NameRejection, K as NameResult, L as OOXML_NODE_IDENTITY_RULES, M as OoxmlBodyNode, P as OoxmlBookmarkEndNode, Q as OoxmlBookmarkStartNode, S as OoxmlContentControlCalendarNode, T as OoxmlContentControlCheckboxNode, U as OoxmlContentControlCheckedNode, V as OoxmlContentControlCheckedStateNode, W as OoxmlContentControlComboBoxNode, q as OoxmlContentControlContentNode, X as OoxmlContentControlDataBindingNode, Y as OoxmlContentControlDateFormatNode, Z as OoxmlContentControlDateNode, _ as OoxmlContentControlDropDownListNode, s as OoxmlContentControlEndPropertiesNode, $ as OoxmlContentControlLidNode, a0 as OoxmlContentControlListItemNode, p as OoxmlContentControlNode, t as OoxmlContentControlPropertiesNode, a1 as OoxmlContentControlStoreMappedDataAsNode, a2 as OoxmlContentControlTextNode, a3 as OoxmlContentControlUncheckedStateNode, f as OoxmlContinuationSeparatorNode, a4 as OoxmlDocumentNode, g as OoxmlEndnotesNode, a5 as OoxmlExternalTarget, h as OoxmlFootnotesNode, m as OoxmlGenericElementNode, a6 as OoxmlGenericExtensionAttribute, a7 as OoxmlHyperlinkNode, a8 as OoxmlInvariantIssueCode, a9 as OoxmlKnownNodeAttribute, aa as OoxmlNamespaceBinding, l as OoxmlNodeId, ab as OoxmlNodeIdentityRules, e as OoxmlNoteNode, i as OoxmlNoteRefNode, j as OoxmlNoteReferenceNode, n as OoxmlPackageLimits, o as OoxmlPackageRejection, ac as OoxmlPackageResult, ad as OoxmlParagraphPropertiesNode, ae as OoxmlPartMetadata, af as OoxmlReadRejection, ag as OoxmlReadResult, ah as OoxmlRunNode, ai as OoxmlRunPropertiesNode, k as OoxmlSeparatorNode, aj as OoxmlTabNode, ak as OoxmlTextElementNode, al as OoxmlTextNode, am as OoxmlWmlValAttribute, an as OoxmlXmlSpaceAttribute, ao as OverrideRecord, ap as RelationshipError, aq as RelationshipSetResult, ar as ResolveResult, as as ResolvedRelationship, at as TargetMode, au as WML_NAMESPACE_URI, av as XMLNS_NAMESPACE_URI, aw as XML_NAMESPACE_URI, ax as XmlLimits, ay as XmlNode, az as XmlRejection, aA as XmlResult, aB as ZipLimits, aC as ZipReadResult, aD as ZipRejection, aE as asciiFold, aF as buildContentTypeIndex, aG as buildRelationshipSet, aH as childElements, aI as detectDuplicateNames, aJ as extensionKey, aK as findElement, aL as isContentRevisionKind, aM as isRangeMarkerKind, aN as isValidMime, aO as normalizePartName, aP as partNameKey, aQ as readOnOffChild, aR as readOoxmlPackage, aS as readOoxmlPart, aT as readXml, aU as readZip, aV as resolveContentType, aW as resolveImageRelationship, aX as resolveInternalTarget, aY as resolveRelationship, aZ as textContent, a_ as validateExternalTarget, a$ as withPart, b0 as writeOoxmlPackage, b1 as writeZip } from './ooxml-package-CdEy9ufK.js';
|
|
5
|
-
export { e as BookmarkAnchor, B as BookmarkIndex, f as CascadeDeletedNoteReferencesOptions, g as CustomNodePayloadRead, h as CustomNodePayloadWrite, b as CustomNodeSweepOutcome, i as CustomNodeSweepResult, j as CustomNodeWriteRejection, C as CustomNodeWriteResult, k as DEFAULT_MAX_EDITABLE_STORY_PARTS, D as DocumentTrackingSettings, l as DrawingPropertyIdResult, E as EmbeddedFont, F as FontStyleKey, H as HeaderFooterLifecycleImpact, m as HeaderFooterLifecycleOp, n as HeaderFooterLifecycleRejection, o as HeaderFooterLifecycleResult, I as InsertCustomNodeWrite, L as ListKind, M as MAX_CUSTOM_NODE_LABEL_LENGTH, p as MAX_CUSTOM_NODE_PAYLOAD_LENGTH, q as MAX_NOTE_REFERENCE_PARTS, r as MAX_NOTE_REFERENCE_SCAN, N as NO_TRACKING_SETTINGS, s as NoteDiagnostic, t as NoteDiagnosticCode, u as NoteLifecycleImpact, v as NoteLifecycleOp, w as NoteLifecycleOptions, x as NoteLifecycleRejection, y as NoteLifecycleResult, z as NoteReferenceHit, G as NoteReferenceScanBudget, P as PackageTransactResult, J as ReadEmbeddedFontsOptions, K as StoryResolveResult, S as StoryScope, a as StoryTargetRejection, T as TreePackageStore, O as TreePackageStoreOptions, Q as allocateDrawingPropertyId, U as applyHeaderFooterLifecycleOp, V as applyNoteLifecycleOp, W as buildBookmarkIndex, X as cascadeDeletedNoteReferences, Y as collectNoteReferences, Z as collectPackageNoteReferences, _ as createNoteReferenceScanBudget, $ as customNodePayloadsByControl, a0 as customNodePayloadsOf, a1 as deobfuscateFont, a2 as diagnoseNoteReferences, a3 as ensureListDefinition, a4 as ensureNumberingLevel, a5 as insertCustomNodeWrite, a6 as isHeaderFooterLifecycleOp, a7 as isNoteLifecycleOp, a8 as normalNoteIds, a9 as notesPartHasId, aa as readEmbeddedFonts, ab as readTrackingSettings, ac as removeCustomNodeWrite, ad as resolveNotesPart, ae as sweepCustomNodePayloads, af as withBinaryPart, ag as withEmbeddedImage, ah as withoutUnreferencedImagePart } from './custom-node-writes-
|
|
5
|
+
export { e as BookmarkAnchor, B as BookmarkIndex, f as CascadeDeletedNoteReferencesOptions, g as CustomNodePayloadRead, h as CustomNodePayloadWrite, b as CustomNodeSweepOutcome, i as CustomNodeSweepResult, j as CustomNodeWriteRejection, C as CustomNodeWriteResult, k as DEFAULT_MAX_EDITABLE_STORY_PARTS, D as DocumentTrackingSettings, l as DrawingPropertyIdResult, E as EmbeddedFont, F as FontStyleKey, H as HeaderFooterLifecycleImpact, m as HeaderFooterLifecycleOp, n as HeaderFooterLifecycleRejection, o as HeaderFooterLifecycleResult, I as InsertCustomNodeWrite, L as ListKind, M as MAX_CUSTOM_NODE_LABEL_LENGTH, p as MAX_CUSTOM_NODE_PAYLOAD_LENGTH, q as MAX_NOTE_REFERENCE_PARTS, r as MAX_NOTE_REFERENCE_SCAN, N as NO_TRACKING_SETTINGS, s as NoteDiagnostic, t as NoteDiagnosticCode, u as NoteLifecycleImpact, v as NoteLifecycleOp, w as NoteLifecycleOptions, x as NoteLifecycleRejection, y as NoteLifecycleResult, z as NoteReferenceHit, G as NoteReferenceScanBudget, P as PackageTransactResult, J as ReadEmbeddedFontsOptions, K as StoryResolveResult, S as StoryScope, a as StoryTargetRejection, T as TreePackageStore, O as TreePackageStoreOptions, Q as allocateDrawingPropertyId, U as applyHeaderFooterLifecycleOp, V as applyNoteLifecycleOp, W as buildBookmarkIndex, X as cascadeDeletedNoteReferences, Y as collectNoteReferences, Z as collectPackageNoteReferences, _ as createNoteReferenceScanBudget, $ as customNodePayloadsByControl, a0 as customNodePayloadsOf, a1 as deobfuscateFont, a2 as diagnoseNoteReferences, a3 as ensureListDefinition, a4 as ensureNumberingLevel, a5 as insertCustomNodeWrite, a6 as isHeaderFooterLifecycleOp, a7 as isNoteLifecycleOp, a8 as normalNoteIds, a9 as notesPartHasId, aa as readEmbeddedFonts, ab as readTrackingSettings, ac as removeCustomNodeWrite, ad as resolveNotesPart, ae as sweepCustomNodePayloads, af as withBinaryPart, ag as withEmbeddedImage, ah as withoutUnreferencedImagePart } from './custom-node-writes-D6SGwebL.js';
|
|
6
6
|
export { D as DEFAULT_OMML_LIMITS, E as EquationExpression, L as LinearMathOmmlResult, a as LinearMathParseResult, b as LinearMathRejection, c as OFFICE_MATH_NAMESPACE_URI, O as OmmlEquationProjection, d as OmmlLimits, e as equationExpressionToLinearMath, l as linearMathToOmml, p as parseLinearMath, f as projectOmmlEquation } from './omml-equation-Dd3mBep-.js';
|
|
7
7
|
export { c as HeaderFooterKind, a as HeaderFooterParts, b as HeaderFooterSectionResolution, d as HeaderFooterSlotMeta, H as HeaderFooterVariant, e as collectSectionPropertyNodes, r as resolveHeaderFooterParts, f as resolveHeaderFooterPartsBySection, g as resolveHeaderFooterResolutionBySection } from './hf-references-z5Y4N1ab.js';
|
|
8
|
-
export { L as LinkableReviewItem, c as collectFlowBlocks, f as collectReviewItems, a as commentBodyText, b as commentInitials, g as commentItemsOf, h as contentControlContentOf, j as deepParagraphOrderOfPart, i as isContentControl, e as isContentControlContent, l as linkRevisionReplies, p as paragraphOrderOfPart, r as revisionItemsOf, w as walkAllStoryParagraphs, k as walkParagraphInline, m as walkStoryBlocks } from './review-reads-
|
|
9
|
-
import { T as TreeDocOp, a as TreeOpRejection,
|
|
10
|
-
export { A as ACCEPTED_PARAGRAPH_PROPERTIES,
|
|
8
|
+
export { L as LinkableReviewItem, c as collectFlowBlocks, f as collectReviewItems, a as commentBodyText, b as commentInitials, g as commentItemsOf, h as contentControlContentOf, j as deepParagraphOrderOfPart, i as isContentControl, e as isContentControlContent, l as linkRevisionReplies, p as paragraphOrderOfPart, r as revisionItemsOf, w as walkAllStoryParagraphs, k as walkParagraphInline, m as walkStoryBlocks } from './review-reads-CHODU0LI.js';
|
|
9
|
+
import { T as TreeDocOp, a as TreeOpRejection, r as TreeOpResult, O as OoxmlProperty, i as DrawingTreeDocOp, I as ImpactClass, b as ImageWrapTarget } from './tree-op-types-CnRb7AYo.js';
|
|
10
|
+
export { A as ACCEPTED_PARAGRAPH_PROPERTIES, s as ACCEPTED_RUN_PROPERTIES, t as CONTENT_CONTROL_ID_MAX, u as CONTENT_CONTROL_PROPERTY_ORDER, v as ContentControlCheckbox, w as ContentControlCheckboxState, q as ContentControlDataBinding, x as ContentControlDateFormat, y as ContentControlEntry, C as ContentControlKind, o as ContentControlLevel, z as ContentControlListItem, p as ContentControlLock, B as ContentControlProperties, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, H as HYPERLINK_RELATIONSHIP_TYPE, E as HyperlinkKind, F as HyperlinkTarget, k as IMAGE_WRAP_TARGETS, M as MAX_CONTENT_CONTROLS_PER_PART, G as MAX_CONTENT_CONTROL_NESTING, J as OFFICE_RELATIONSHIP_NAMESPACE_URI, K as RelationshipTargetResolver, R as RevisionAddress, S as SourceCrop, L as TABLE_BORDER_STYLES, N as TREE_DOC_OP_KINDS, P as TabStopWrite, n as TableBorderStyle, Q as TreeDocOpKind, U as TreeOpEffect, W as allocateContentControlId, X as contentControlContentChildren, Y as contentControlContentNodeOf, Z as contentControlEndPropertiesNodeOf, _ as contentControlLevelOf, $ as contentControlPropertiesNodeOf, a0 as contentControlPropertiesOf, a1 as contentControlTextOf, a2 as contentControlsIn, a3 as findContentControl, a4 as flattenContentControls, a5 as hyperlinkAnchorOf, a6 as hyperlinkRelationshipIdOf, a7 as hyperlinkTargetOf, a8 as isContentControlContentNode, a9 as isContentControlNode, aa as isContentControlWrapper, ab as isHyperlinkNode, ac as lockForbidsEdit, ad as lockForbidsRemoval, ae as orderedContentControlProperties, af as parseContentControlId, ag as projectDrawing, ah as resolveContentControlLock } from './tree-op-types-CnRb7AYo.js';
|
|
11
11
|
export { A as AtomicNoteSpan, M as MAX_NOTES_PER_PART, a as NOTE_ATOM_CHAR, b as NOTE_CONTINUATION_SEPARATOR_ID, c as NOTE_ID_MAX, d as NOTE_ID_MIN, e as NOTE_SEPARATOR_ID, N as NoteKind, f as NoteType, g as allocateNoteId, h as atomicNoteSpansOf, i as customMarkFollows, j as findNoteById, k as formatNoteScopeId, l as isContinuationSeparatorNode, m as isEndnotesNode, o as isFootnotesNode, p as isNormalNote, q as isNoteAtomNode, r as isNoteNode, s as isNoteRefNode, t as isNoteReferenceNode, u as isSeparatorNode, v as noteAtomText, w as noteIdOf, x as noteKindOf, y as noteRefKindOf, z as noteReferenceKindOf, n as noteTypeOf, B as notesOf, C as parseNoteId, D as parseNoteScopeId } from './note-nodes-BNCANoGN.js';
|
|
12
12
|
export { A as AuthoredNoteProperties, D as DEFAULT_ENDNOTE_PROPERTIES, b as DEFAULT_FOOTNOTE_PROPERTIES, E as EndnotePosition, F as FootnotePosition, N as NoteNumRestart, a as ResolvedEndnoteProperties, R as ResolvedFootnoteProperties, c as authoredDocumentEndnoteProperties, d as authoredDocumentFootnoteProperties, e as authoredEndnotePropertiesFromSectPr, f as authoredFootnotePropertiesFromSectPr, i as isLegalEndnotePosition, g as isLegalFootnotePosition, h as isLegalNumRestart, p as parseAuthoredNoteProperties, r as resolveEndnoteProperties, j as resolveFootnoteProperties, s as settingsPartOf } from './note-properties-jvnw_DGG.js';
|
|
13
|
-
import { T as TreeModelChange, b as TreeDocumentStore } from './tree-store-
|
|
14
|
-
export { D as DocumentProperties, S as SelectionMark, f as TreeDocumentStoreOptions, a as TreeStoryRef, d as TreeTransactOptions, g as TreeTransactResult, c as TreeTransactionContext } from './tree-store-
|
|
15
|
-
export { i as CommentAnchor, j as CommentPosition, C as CommentRecord, h as CommentThreadState, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, W as W15_NAMESPACE_URI, q as commentAnchorsOfStory, s as commentsOfPart, l as firstReviewRange, t as hasAnyComment, r as reviewItemKey, n as reviewItemRanges, u as threadStateOfPart } from './review-items-
|
|
13
|
+
import { T as TreeModelChange, b as TreeDocumentStore } from './tree-store-DgETo6Mf.js';
|
|
14
|
+
export { D as DocumentProperties, S as SelectionMark, f as TreeDocumentStoreOptions, a as TreeStoryRef, d as TreeTransactOptions, g as TreeTransactResult, c as TreeTransactionContext } from './tree-store-DgETo6Mf.js';
|
|
15
|
+
export { i as CommentAnchor, j as CommentPosition, C as CommentRecord, h as CommentThreadState, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, W as W15_NAMESPACE_URI, q as commentAnchorsOfStory, s as commentsOfPart, l as firstReviewRange, t as hasAnyComment, r as reviewItemKey, n as reviewItemRanges, u as threadStateOfPart } from './review-items-bdGxFWNA.js';
|
|
16
16
|
import './contracts/types.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -1537,6 +1537,128 @@ declare function relationshipTargetIn(pkg: OoxmlPackage, ownerPart: string, rela
|
|
|
1537
1537
|
readonly sinkSafe?: boolean;
|
|
1538
1538
|
} | null;
|
|
1539
1539
|
|
|
1540
|
+
/** One addressable unit of paragraph text: text, tab, hard break, or atomic field. */
|
|
1541
|
+
interface Segment {
|
|
1542
|
+
readonly runId: string;
|
|
1543
|
+
readonly node: OoxmlNode;
|
|
1544
|
+
readonly start: number;
|
|
1545
|
+
readonly end: number;
|
|
1546
|
+
/**
|
|
1547
|
+
* When set, deleting this segment removes every listed node id in one step (atomic
|
|
1548
|
+
* field begin→end or `fldSimple`). Absent for ordinary text/tab/break segments.
|
|
1549
|
+
*/
|
|
1550
|
+
readonly removeNodeIds?: readonly string[];
|
|
1551
|
+
/**
|
|
1552
|
+
* When set, run formatting for this atom targets these runs (field result ownership),
|
|
1553
|
+
* not necessarily `runId`. Absent for ordinary text/tab/break segments.
|
|
1554
|
+
*/
|
|
1555
|
+
readonly formatRunIds?: readonly string[];
|
|
1556
|
+
}
|
|
1557
|
+
/**
|
|
1558
|
+
* Flatten a paragraph into UTF-16 addressable segments, in document order.
|
|
1559
|
+
*
|
|
1560
|
+
* A HYPERLINK's runs are addressed too. `w:hyperlink` is a run container, not a leaf, and
|
|
1561
|
+
* the characters inside a link are ordinary paragraph text: the user selects them, types
|
|
1562
|
+
* over them and deletes them like any other. Skipping the container — which is what
|
|
1563
|
+
* iterating only direct `w:r` children did — left every link's text with no offsets at all,
|
|
1564
|
+
* so `paragraphTextOf` read "Visit or ." for a sentence that says "Visit Example.com or
|
|
1565
|
+
* Anthropic's website." and layout, selection and the ops all agreed on the wrong string.
|
|
1566
|
+
*
|
|
1567
|
+
* Inline CONTENT CONTROLS are the same class of wrapper: their `w:sdtContent` runs join the
|
|
1568
|
+
* paragraph's offset stream with no break opportunity at the boundary. Nesting is bounded
|
|
1569
|
+
* (`MAX_CONTENT_CONTROL_NESTING`); beyond the bound the wrapper is opaque so recursion
|
|
1570
|
+
* cannot exhaust the stack.
|
|
1571
|
+
*
|
|
1572
|
+
* `runId` stays the id of the run the content actually lives in, at whatever depth: the
|
|
1573
|
+
* appliers resolve it with `findNode` and rebuild that run's children, so nesting costs them
|
|
1574
|
+
* nothing.
|
|
1575
|
+
*/
|
|
1576
|
+
declare function segmentsOf(paragraph: OoxmlParagraphNode): Segment[];
|
|
1577
|
+
/** Half-open `[start, end)` of one node in its paragraph's model offset space. */
|
|
1578
|
+
interface OffsetSpan {
|
|
1579
|
+
readonly start: number;
|
|
1580
|
+
readonly end: number;
|
|
1581
|
+
}
|
|
1582
|
+
/**
|
|
1583
|
+
* Every node's place in the paragraph's model offset space, from the SAME walk `segmentsOf`
|
|
1584
|
+
* uses.
|
|
1585
|
+
*
|
|
1586
|
+
* The offset model has exactly one authority, and this is how a caller borrows it. Three
|
|
1587
|
+
* private walkers used to re-derive it — one in the tracked-change writer, one in the comment
|
|
1588
|
+
* anchor reader, one in the review queue — and all three disagreed with `segmentsOf` and with
|
|
1589
|
+
* each other: none gave a note reference or an atomic field its length of one, one counted a
|
|
1590
|
+
* field's instruction text as visible characters, and one never descended into `w:hyperlink`
|
|
1591
|
+
* at all. The consequences were an anchor short by a link's length, two unrelated comments
|
|
1592
|
+
* threaded onto one zero-width offset, and a tracked insert landing a character out in any
|
|
1593
|
+
* paragraph carrying a footnote. Patching each walker only resets the clock on the next drift.
|
|
1594
|
+
*
|
|
1595
|
+
* A node the walk never reaches — content under a `generic` container, or past the nesting cap
|
|
1596
|
+
* — has NO span, and {@link ParagraphOffsetIndex.lengthOf} reports zero for it. That is the
|
|
1597
|
+
* same answer `segmentsOf` gives: it contributes no addressable characters.
|
|
1598
|
+
*/
|
|
1599
|
+
interface ParagraphOffsetIndex {
|
|
1600
|
+
/** The paragraph's own length, identical to {@link paragraphLength}. */
|
|
1601
|
+
readonly length: number;
|
|
1602
|
+
readonly segments: readonly Segment[];
|
|
1603
|
+
/** Where a node sits, or null when the offset walk never reached it. */
|
|
1604
|
+
spanOf(node: OoxmlNode | string): OffsetSpan | null;
|
|
1605
|
+
/** A node's model length: `end - start` of its span, and 0 when it has none. */
|
|
1606
|
+
lengthOf(node: OoxmlNode | string): number;
|
|
1607
|
+
}
|
|
1608
|
+
/**
|
|
1609
|
+
* THE paragraph offset authority: maps a paragraph's UTF-16 offsets to the nodes holding them.
|
|
1610
|
+
*
|
|
1611
|
+
* One authority on purpose. An atomic field spans many nodes but is ONE unit to an offset, and a
|
|
1612
|
+
* second implementation that disagreed would place edits inside content that cannot be split.
|
|
1613
|
+
*/
|
|
1614
|
+
declare function paragraphOffsetIndex(paragraph: OoxmlParagraphNode): ParagraphOffsetIndex;
|
|
1615
|
+
/** One inline content control's identity and the UTF-16 span its content covers. */
|
|
1616
|
+
interface InlineControlSpan {
|
|
1617
|
+
readonly controlId: string;
|
|
1618
|
+
readonly start: number;
|
|
1619
|
+
readonly end: number;
|
|
1620
|
+
}
|
|
1621
|
+
/**
|
|
1622
|
+
* The innermost inline content control whose content ends exactly at `offset` — the caret
|
|
1623
|
+
* at its right outer edge. What Backspace consults to delete the node as ONE unit
|
|
1624
|
+
* (pro-review-and-custom-nodes 4.6): deleting its last character from outside would either
|
|
1625
|
+
* strip one letter from a content-locked label (refused, so the key looks dead) or leave a
|
|
1626
|
+
* half-deleted chip whose tag still claims the full payload.
|
|
1627
|
+
*/
|
|
1628
|
+
declare function inlineControlEndingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1629
|
+
/** The forward-delete mirror: the control whose content STARTS exactly at `offset`. */
|
|
1630
|
+
declare function inlineControlStartingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1631
|
+
|
|
1632
|
+
/** Structural validation, run before any tree work so a rejection changes nothing. */
|
|
1633
|
+
declare function validateTreeOp(part: OoxmlPart, op: TreeDocOp): TreeOpRejection | null;
|
|
1634
|
+
|
|
1635
|
+
interface RevisionSite {
|
|
1636
|
+
readonly node: OoxmlElement;
|
|
1637
|
+
readonly parent: OoxmlElement | null;
|
|
1638
|
+
/** True when this site cannot be resolved and the whole op must refuse. */
|
|
1639
|
+
readonly refused: boolean;
|
|
1640
|
+
/** True for `w:pPr/w:rPr/w:ins|w:del` — the paragraph MARK, not content. */
|
|
1641
|
+
readonly paragraphMark: boolean;
|
|
1642
|
+
/** True for `w:rPrChange` / `w:pPrChange`. */
|
|
1643
|
+
readonly propertyChange: boolean;
|
|
1644
|
+
/**
|
|
1645
|
+
* How many content-revision wrappers ENCLOSE this one, counted within its own paragraph.
|
|
1646
|
+
*
|
|
1647
|
+
* Revisions nest for real: `w:ins` wrapping `w:del` is content one reviewer added and another
|
|
1648
|
+
* struck, and both stay pending because each author has to be answered separately. The two
|
|
1649
|
+
* wrappers then cover exactly the same characters, so a range cannot tell them apart and
|
|
1650
|
+
* "which change is this text under" has only one honest answer — the innermost one, which is
|
|
1651
|
+
* the change that decides what the reader is looking at.
|
|
1652
|
+
*
|
|
1653
|
+
* Relative to the paragraph or table subtree, which is the unit the site walk memoizes. That
|
|
1654
|
+
* is enough and it is what keeps the memo valid: a content revision cannot enclose a
|
|
1655
|
+
* paragraph, and two sites can only cover one position if they are in the same paragraph.
|
|
1656
|
+
*/
|
|
1657
|
+
readonly nesting: number;
|
|
1658
|
+
}
|
|
1659
|
+
/** Every revision-bearing element in the part. */
|
|
1660
|
+
declare function collectRevisionSites(part: OoxmlPart): RevisionSite[];
|
|
1661
|
+
|
|
1540
1662
|
/**
|
|
1541
1663
|
* Which story a comment deletion or resolution may read markers from.
|
|
1542
1664
|
*
|
|
@@ -1851,128 +1973,6 @@ type CustomNodeExportResult = {
|
|
|
1851
1973
|
*/
|
|
1852
1974
|
declare function withExportedCustomNodes(pkg: OoxmlPackage, request: CustomNodeExportRequest): CustomNodeExportResult;
|
|
1853
1975
|
|
|
1854
|
-
/** One addressable unit of paragraph text: text, tab, hard break, or atomic field. */
|
|
1855
|
-
interface Segment {
|
|
1856
|
-
readonly runId: string;
|
|
1857
|
-
readonly node: OoxmlNode;
|
|
1858
|
-
readonly start: number;
|
|
1859
|
-
readonly end: number;
|
|
1860
|
-
/**
|
|
1861
|
-
* When set, deleting this segment removes every listed node id in one step (atomic
|
|
1862
|
-
* field begin→end or `fldSimple`). Absent for ordinary text/tab/break segments.
|
|
1863
|
-
*/
|
|
1864
|
-
readonly removeNodeIds?: readonly string[];
|
|
1865
|
-
/**
|
|
1866
|
-
* When set, run formatting for this atom targets these runs (field result ownership),
|
|
1867
|
-
* not necessarily `runId`. Absent for ordinary text/tab/break segments.
|
|
1868
|
-
*/
|
|
1869
|
-
readonly formatRunIds?: readonly string[];
|
|
1870
|
-
}
|
|
1871
|
-
/**
|
|
1872
|
-
* Flatten a paragraph into UTF-16 addressable segments, in document order.
|
|
1873
|
-
*
|
|
1874
|
-
* A HYPERLINK's runs are addressed too. `w:hyperlink` is a run container, not a leaf, and
|
|
1875
|
-
* the characters inside a link are ordinary paragraph text: the user selects them, types
|
|
1876
|
-
* over them and deletes them like any other. Skipping the container — which is what
|
|
1877
|
-
* iterating only direct `w:r` children did — left every link's text with no offsets at all,
|
|
1878
|
-
* so `paragraphTextOf` read "Visit or ." for a sentence that says "Visit Example.com or
|
|
1879
|
-
* Anthropic's website." and layout, selection and the ops all agreed on the wrong string.
|
|
1880
|
-
*
|
|
1881
|
-
* Inline CONTENT CONTROLS are the same class of wrapper: their `w:sdtContent` runs join the
|
|
1882
|
-
* paragraph's offset stream with no break opportunity at the boundary. Nesting is bounded
|
|
1883
|
-
* (`MAX_CONTENT_CONTROL_NESTING`); beyond the bound the wrapper is opaque so recursion
|
|
1884
|
-
* cannot exhaust the stack.
|
|
1885
|
-
*
|
|
1886
|
-
* `runId` stays the id of the run the content actually lives in, at whatever depth: the
|
|
1887
|
-
* appliers resolve it with `findNode` and rebuild that run's children, so nesting costs them
|
|
1888
|
-
* nothing.
|
|
1889
|
-
*/
|
|
1890
|
-
declare function segmentsOf(paragraph: OoxmlParagraphNode): Segment[];
|
|
1891
|
-
/** Half-open `[start, end)` of one node in its paragraph's model offset space. */
|
|
1892
|
-
interface OffsetSpan {
|
|
1893
|
-
readonly start: number;
|
|
1894
|
-
readonly end: number;
|
|
1895
|
-
}
|
|
1896
|
-
/**
|
|
1897
|
-
* Every node's place in the paragraph's model offset space, from the SAME walk `segmentsOf`
|
|
1898
|
-
* uses.
|
|
1899
|
-
*
|
|
1900
|
-
* The offset model has exactly one authority, and this is how a caller borrows it. Three
|
|
1901
|
-
* private walkers used to re-derive it — one in the tracked-change writer, one in the comment
|
|
1902
|
-
* anchor reader, one in the review queue — and all three disagreed with `segmentsOf` and with
|
|
1903
|
-
* each other: none gave a note reference or an atomic field its length of one, one counted a
|
|
1904
|
-
* field's instruction text as visible characters, and one never descended into `w:hyperlink`
|
|
1905
|
-
* at all. The consequences were an anchor short by a link's length, two unrelated comments
|
|
1906
|
-
* threaded onto one zero-width offset, and a tracked insert landing a character out in any
|
|
1907
|
-
* paragraph carrying a footnote. Patching each walker only resets the clock on the next drift.
|
|
1908
|
-
*
|
|
1909
|
-
* A node the walk never reaches — content under a `generic` container, or past the nesting cap
|
|
1910
|
-
* — has NO span, and {@link ParagraphOffsetIndex.lengthOf} reports zero for it. That is the
|
|
1911
|
-
* same answer `segmentsOf` gives: it contributes no addressable characters.
|
|
1912
|
-
*/
|
|
1913
|
-
interface ParagraphOffsetIndex {
|
|
1914
|
-
/** The paragraph's own length, identical to {@link paragraphLength}. */
|
|
1915
|
-
readonly length: number;
|
|
1916
|
-
readonly segments: readonly Segment[];
|
|
1917
|
-
/** Where a node sits, or null when the offset walk never reached it. */
|
|
1918
|
-
spanOf(node: OoxmlNode | string): OffsetSpan | null;
|
|
1919
|
-
/** A node's model length: `end - start` of its span, and 0 when it has none. */
|
|
1920
|
-
lengthOf(node: OoxmlNode | string): number;
|
|
1921
|
-
}
|
|
1922
|
-
/**
|
|
1923
|
-
* THE paragraph offset authority: maps a paragraph's UTF-16 offsets to the nodes holding them.
|
|
1924
|
-
*
|
|
1925
|
-
* One authority on purpose. An atomic field spans many nodes but is ONE unit to an offset, and a
|
|
1926
|
-
* second implementation that disagreed would place edits inside content that cannot be split.
|
|
1927
|
-
*/
|
|
1928
|
-
declare function paragraphOffsetIndex(paragraph: OoxmlParagraphNode): ParagraphOffsetIndex;
|
|
1929
|
-
/** One inline content control's identity and the UTF-16 span its content covers. */
|
|
1930
|
-
interface InlineControlSpan {
|
|
1931
|
-
readonly controlId: string;
|
|
1932
|
-
readonly start: number;
|
|
1933
|
-
readonly end: number;
|
|
1934
|
-
}
|
|
1935
|
-
/**
|
|
1936
|
-
* The innermost inline content control whose content ends exactly at `offset` — the caret
|
|
1937
|
-
* at its right outer edge. What Backspace consults to delete the node as ONE unit
|
|
1938
|
-
* (pro-review-and-custom-nodes 4.6): deleting its last character from outside would either
|
|
1939
|
-
* strip one letter from a content-locked label (refused, so the key looks dead) or leave a
|
|
1940
|
-
* half-deleted chip whose tag still claims the full payload.
|
|
1941
|
-
*/
|
|
1942
|
-
declare function inlineControlEndingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1943
|
-
/** The forward-delete mirror: the control whose content STARTS exactly at `offset`. */
|
|
1944
|
-
declare function inlineControlStartingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1945
|
-
|
|
1946
|
-
interface RevisionSite {
|
|
1947
|
-
readonly node: OoxmlElement;
|
|
1948
|
-
readonly parent: OoxmlElement | null;
|
|
1949
|
-
/** True when this site cannot be resolved and the whole op must refuse. */
|
|
1950
|
-
readonly refused: boolean;
|
|
1951
|
-
/** True for `w:pPr/w:rPr/w:ins|w:del` — the paragraph MARK, not content. */
|
|
1952
|
-
readonly paragraphMark: boolean;
|
|
1953
|
-
/** True for `w:rPrChange` / `w:pPrChange`. */
|
|
1954
|
-
readonly propertyChange: boolean;
|
|
1955
|
-
/**
|
|
1956
|
-
* How many content-revision wrappers ENCLOSE this one, counted within its own paragraph.
|
|
1957
|
-
*
|
|
1958
|
-
* Revisions nest for real: `w:ins` wrapping `w:del` is content one reviewer added and another
|
|
1959
|
-
* struck, and both stay pending because each author has to be answered separately. The two
|
|
1960
|
-
* wrappers then cover exactly the same characters, so a range cannot tell them apart and
|
|
1961
|
-
* "which change is this text under" has only one honest answer — the innermost one, which is
|
|
1962
|
-
* the change that decides what the reader is looking at.
|
|
1963
|
-
*
|
|
1964
|
-
* Relative to the paragraph or table subtree, which is the unit the site walk memoizes. That
|
|
1965
|
-
* is enough and it is what keeps the memo valid: a content revision cannot enclose a
|
|
1966
|
-
* paragraph, and two sites can only cover one position if they are in the same paragraph.
|
|
1967
|
-
*/
|
|
1968
|
-
readonly nesting: number;
|
|
1969
|
-
}
|
|
1970
|
-
/** Every revision-bearing element in the part. */
|
|
1971
|
-
declare function collectRevisionSites(part: OoxmlPart): RevisionSite[];
|
|
1972
|
-
|
|
1973
|
-
/** Structural validation, run before any tree work so a rejection changes nothing. */
|
|
1974
|
-
declare function validateTreeOp(part: OoxmlPart, op: TreeDocOp): TreeOpRejection | null;
|
|
1975
|
-
|
|
1976
1976
|
/**
|
|
1977
1977
|
* Apply one validated op to a part.
|
|
1978
1978
|
*
|