@docx-editor.dev/core 2.20.0 → 2.21.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.
Files changed (112) hide show
  1. package/README.md +11 -32
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.ts +11 -10
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.ts +9 -9
  7. package/dist/binding.js +1 -1
  8. package/dist/chunk-44LQJIKH.cjs +20 -0
  9. package/dist/chunk-4EHMMSFR.cjs +1 -0
  10. package/dist/{chunk-D2V4YBWJ.cjs → chunk-AFG7Q622.cjs} +1 -1
  11. package/dist/chunk-AJCCS53D.js +1 -0
  12. package/dist/{chunk-3EZO3O6I.js → chunk-AYMSP25Q.js} +3 -3
  13. package/dist/{chunk-44SIVFJT.cjs → chunk-B4KZSKF7.cjs} +5 -5
  14. package/dist/chunk-BDAY2ETZ.js +1 -0
  15. package/dist/chunk-BNZF6DYC.cjs +18 -0
  16. package/dist/chunk-BQXF2PFF.js +2 -0
  17. package/dist/chunk-GIHKVXEO.js +2 -0
  18. package/dist/chunk-ITNK6C5M.cjs +3 -0
  19. package/dist/chunk-MP3K4LC5.js +1 -0
  20. package/dist/chunk-MXOO7KRI.cjs +11 -0
  21. package/dist/chunk-NG6IQ4SI.js +11 -0
  22. package/dist/{chunk-2HQXLL5L.cjs → chunk-PYXMAUNR.cjs} +1 -1
  23. package/dist/chunk-Q2B6HX3R.js +1 -0
  24. package/dist/chunk-Q5JPPUNR.js +5 -0
  25. package/dist/chunk-S35UK656.cjs +2 -0
  26. package/dist/chunk-S6J4O5XP.js +1 -0
  27. package/dist/{chunk-GSEUM6AI.cjs → chunk-TE43S3LX.cjs} +1 -1
  28. package/dist/chunk-TKQH7BNE.cjs +1 -0
  29. package/dist/chunk-UKVVUHZL.cjs +1 -0
  30. package/dist/chunk-VH2DLEZK.js +20 -0
  31. package/dist/{chunk-OHVJYJOA.js → chunk-VUNFWXHF.js} +1 -1
  32. package/dist/{chunk-OA6LFCTG.cjs → chunk-WQFNWLNY.cjs} +3 -3
  33. package/dist/chunk-WZX4UGRQ.js +3 -0
  34. package/dist/{chunk-CAIWEQLC.js → chunk-X5QNSISI.js} +1 -1
  35. package/dist/chunk-XS4FOHH6.js +18 -0
  36. package/dist/{chunk-PIBYJZIH.cjs → chunk-XZY4Q6PJ.cjs} +1 -1
  37. package/dist/{chunk-WTILOUPG.cjs → chunk-Z2ETEZRU.cjs} +1 -1
  38. package/dist/collaboration/replication.cjs +1 -1
  39. package/dist/collaboration/replication.d.ts +13 -4
  40. package/dist/collaboration/replication.js +1 -1
  41. package/dist/collaboration.d.ts +4 -3
  42. package/dist/contracts/document.d.ts +3 -2
  43. package/dist/contracts/editor.cjs +1 -1
  44. package/dist/contracts/editor.d.ts +9 -9
  45. package/dist/contracts/editor.js +1 -1
  46. package/dist/contracts/interaction.d.ts +2 -2
  47. package/dist/contracts/modules.cjs +1 -1
  48. package/dist/contracts/modules.d.ts +9 -7
  49. package/dist/contracts/modules.js +1 -1
  50. package/dist/contracts/types.d.ts +2 -1
  51. package/dist/{custom-node-writes-piokwVR5.d.ts → custom-node-writes-05qS32px.d.ts} +2 -2
  52. package/dist/{document-protection-C6RvCHx-.d.ts → document-protection-Cr59VKLO.d.ts} +1 -1
  53. package/dist/{editor-BgtcHulQ.d.ts → editor-BsLSz_7y.d.ts} +28 -29
  54. package/dist/editor-scope-OHPwVQ5l.d.ts +84 -0
  55. package/dist/editor.cjs +1 -1
  56. package/dist/editor.css +1 -1
  57. package/dist/editor.d.ts +130 -27
  58. package/dist/editor.js +1 -1
  59. package/dist/export.cjs +2 -2
  60. package/dist/export.d.ts +13 -13
  61. package/dist/export.js +1 -1
  62. package/dist/{font-resolver-Bv2Z25-J.d.ts → font-resolver-CzwdBJDE.d.ts} +1 -1
  63. package/dist/{headless-document-view-DHKMN_3Y.d.ts → headless-document-view-B7nAiR7P.d.ts} +2 -2
  64. package/dist/{image-resources-C51LuAAu.d.ts → image-resources-C4ilLzog.d.ts} +1 -1
  65. package/dist/{index-3lr8xXF8.d.ts → index-zkvqBQ9o.d.ts} +117 -26
  66. package/dist/index.cjs +1 -1
  67. package/dist/index.d.ts +18 -18
  68. package/dist/index.js +1 -1
  69. package/dist/{layout-shaping-CKBUSaS7.d.ts → layout-shaping-BJKVTI6i.d.ts} +1 -1
  70. package/dist/layout.cjs +1 -1
  71. package/dist/layout.d.ts +41 -18
  72. package/dist/layout.js +1 -1
  73. package/dist/{note-properties-CcXUgqr8.d.ts → note-properties-MNztEj5s.d.ts} +1 -1
  74. package/dist/{omml-equation-C5P6Ym3v.d.ts → omml-equation-CbnW9yXd.d.ts} +1 -1
  75. package/dist/output.cjs +1 -1
  76. package/dist/output.d.ts +8 -7
  77. package/dist/output.js +1 -1
  78. package/dist/{protocol-CsawNZkt.d.ts → protocol-Co_r0SZQ.d.ts} +2 -2
  79. package/dist/{review-paragraph-order-BCIqjopY.d.ts → review-paragraph-order-EFaU7TqH.d.ts} +1 -1
  80. package/dist/{revision-projection-BcRnC4Yj.d.ts → revision-projection-DEIvpxiq.d.ts} +16 -2
  81. package/dist/{semantic-cell-selection-R9wrenwR.d.ts → semantic-cell-selection-DXmfnDCw.d.ts} +9 -4
  82. package/dist/{semantic-interaction-B7beVwH7.d.ts → semantic-interaction-BLu3M6Nn.d.ts} +1 -1
  83. package/dist/{semantic-paint-CLvHwf8y.d.ts → semantic-paint-CPsihA6k.d.ts} +18 -2
  84. package/dist/{semantic-records-CbXwnS80.d.ts → semantic-records-CqD0b5Ex.d.ts} +146 -6
  85. package/dist/store.cjs +1 -1
  86. package/dist/store.d.ts +462 -427
  87. package/dist/store.js +1 -1
  88. package/dist/{note-lifecycle-D4AOFCAt.d.ts → tree-package-fragment-CwJDixNs.d.ts} +183 -143
  89. package/dist/{tree-session-contract-DTQxw2zL.d.ts → tree-session-contract-D9RRWE0C.d.ts} +8 -8
  90. package/dist/{types-barrel-CEOy-Jv0.d.ts → types-barrel-DLB11iSY.d.ts} +1470 -1426
  91. package/package.json +2 -2
  92. package/dist/chunk-2H4ABRMB.cjs +0 -20
  93. package/dist/chunk-6UCDHGXI.js +0 -1
  94. package/dist/chunk-7VMVDRRU.js +0 -2
  95. package/dist/chunk-CEXC2VHI.cjs +0 -1
  96. package/dist/chunk-CF3JR35B.js +0 -11
  97. package/dist/chunk-D5EHDHYV.js +0 -1
  98. package/dist/chunk-DGSJZMAE.cjs +0 -11
  99. package/dist/chunk-EHBPYFRE.js +0 -20
  100. package/dist/chunk-GOEBQ26R.js +0 -1
  101. package/dist/chunk-H6WDEAOJ.js +0 -18
  102. package/dist/chunk-I6LSEDUL.cjs +0 -18
  103. package/dist/chunk-IW35GWJN.js +0 -1
  104. package/dist/chunk-JRBGCIR2.js +0 -5
  105. package/dist/chunk-K5HIOS6J.cjs +0 -3
  106. package/dist/chunk-KLQXP27K.js +0 -3
  107. package/dist/chunk-MZFFU66H.cjs +0 -2
  108. package/dist/chunk-MZPNLIP3.js +0 -2
  109. package/dist/chunk-OHJQ7GPZ.cjs +0 -1
  110. package/dist/chunk-P4TGGDK3.js +0 -1
  111. package/dist/chunk-ZKWRCLT2.cjs +0 -1
  112. package/dist/editor-scope-DZJT4ukT.d.ts +0 -53
package/dist/store.js CHANGED
@@ -1 +1 @@
1
- export{ma as AUTHORABLE_PARAGRAPH_PROPERTIES,na as AUTHORABLE_RUN_PROPERTIES,m as Budget,l as BudgetError,C as COMPARATORS,o as CancellationController,n as CancellationError,ja as DEFAULT_FORMATTING_DISPLAY_MODE,N as DEFAULT_MAX_EDITABLE_STORY_PARTS,r as DeterministicClock,y as DeterministicMemoryMeter,d as ID_KINDS,w as LIMIT_KEYS,v as LIMIT_SPECS,ba as MAX_CUSTOM_NODE_LABEL_LENGTH,aa as MAX_CUSTOM_NODE_PAYLOAD_LENGTH,K as MAX_FRAGMENT_DECODED_BYTES,q as PortRegistry,p as PortResolutionError,j as RegistryError,Ua as SEARCH_MATCH_LIMIT,Ta as SEARCH_QUERY_MAX,s as SequentialIdentity,M as TreeDocumentStore,O as TreePackageStore,U as addComment,Z as addPackageComment,L as applyFragmentPaste,z as assertLimitInvariants,f as assertValidId,qa as authoredProperties,t as beginOperation,A as canonicalize,Qa as collectReviewItems,Ca as commentBodyText,Da as commentInitials,Pa as commentItemsOf,X as commentPartNameOf,Y as commentsExtendedPartNameOf,D as compareArtifacts,h as compareSemVer,fa as customNodePayloadsByControl,ga as customNodePayloadsOf,$ as deletePackageComments,sa as directParagraphMarkProperties,ra as directParagraphProperties,u as endOperation,I as extractFragmentPackage,Ya as findOccurrences,E as fingerprint,Ha as firstReviewRange,Va as foldCase,wa as formatOwnedRunIds,Aa as formattableRanges,W as hasCommentPart,H as hashAuthored,$a as headlessViewOfStore,ca as insertCustomNodeWrite,ha as insertPackageCustomNode,oa as isAuthorableRunProperty,Xa as isSearchableQuery,e as isValidId,Wa as isWholeWord,Sa as linkRevisionReplies,Ma as locateSites,x as makeLimitCounter,J as mergeFragmentIntoPackage,ua as mergedFontProperty,xa as mergedMultiSettingProperty,ya as mergedParagraphMarkProperties,ta as mergedProperties,T as nextCommentId,_a as openHeadlessDocument,g as parseSemVer,Za as planRevisionBatch,pa as propertyContainer,da as removeCustomNodeWrite,ia as removePackageCustomNode,G as replayFixture,k as resolve,Fa as reviewItemKey,Ga as reviewItemRanges,Oa as revisionItemsOf,va as runAddressRanges,za as runPropertyEdits,Ba as runsCovering,i as satisfies,V as setCommentResolved,_ as setPackageCommentResolved,B as stableHash,ea as sweepCustomNodePayloads,F as validateFixture}from'./chunk-KLQXP27K.js';export{dg as ACCEPTED_PARAGRAPH_PROPERTIES,cg as ACCEPTED_RUN_PROPERTIES,h as ALL_FROZEN_IDS,p as BoundedCounter,c as CANONICAL_MUTATION_ORIGINS,yc as CONTENT_CONTROL_ID_MAX,Qc as CONTENT_CONTROL_PROPERTY_ORDER,Wg as CUSTOM_NODE_XPATH_PREFIX,Gg as CUSTOM_XML_PROPS_REL,Hg as CUSTOM_XML_PROPS_TYPE,Fg as CUSTOM_XML_REL,G as DANGEROUS_KEYS,Ig as DATASTORE_NAMESPACE_URI,Af as DEFAULT_ENDNOTE_PROPERTIES,zf as DEFAULT_FOOTNOTE_PROPERTIES,m as DEFAULT_IMAGE_RESOURCE_LIMITS,j as DEFAULT_LIMITS,rc as DEFAULT_OMML_LIMITS,cc as DEFAULT_OOXML_PACKAGE_LIMITS,Ag as DEFAULT_VIEW_SETTINGS,Pa as DEFAULT_ZIP_LIMITS,g as DEPENDENCY_KEY_IDS,H as DangerousKeyError,Yd as FIELD_ATOM_CHAR,i as HARD_CEILINGS,Xa as HYPERLINK_RELATIONSHIP_TYPE,C as IMAGE_RELATIONSHIP_TYPE,l as IMAGE_RESOURCE_HARD_CEILINGS,cb as IMAGE_WRAP_TARGETS,S as INERT_EXECUTABLE_KINDS,o as LimitExceededError,xc as MAX_CONTENT_CONTROLS_PER_PART,wc as MAX_CONTENT_CONTROL_NESTING,qd as MAX_NOTES_PER_PART,Nf as MAX_NOTE_REFERENCE_PARTS,Mf as MAX_NOTE_REFERENCE_SCAN,vd as MAX_STORY_SDT_NESTING,rb as MAX_SVG_SNIFF_BYTES,d as NON_CANONICAL_ORIGINS,Tc as NOTE_ATOM_CHAR,Xc as NOTE_CONTINUATION_SEPARATOR_ID,Vc as NOTE_ID_MAX,Uc as NOTE_ID_MIN,Wc as NOTE_SEPARATOR_ID,vf as NO_DOCUMENT_PROTECTION,yg as NO_TRACKING_SETTINGS,qc as OFFICE_MATH_NAMESPACE_URI,Wa as OFFICE_RELATIONSHIP_NAMESPACE_URI,wa as OOXML_NODE_IDENTITY_RULES,b as ORIGIN_IDS,Td as PAGE_BREAK_CHAR,ca as PrefixAllocator,e as RESULT_IDS,f as RUNTIME_PORT_IDS,Uh as TABLE_BORDER_STYLES,bf as TOC_LEVEL_INDENT_TWIPS,ve as TOC_MAX_BOOKMARKS_PER_REFRESH,ue as TOC_MAX_ENTRIES,we as TOC_MAX_FIELD_NESTING,te as TOC_MAX_INSTRUCTION_CHARS,xe as TOC_MAX_PAGE_PASSES,bg as TREE_DOC_OP_KINDS,Ye as TWIPS_PER_POINT,og as W15_NAMESPACE_URI,da as WML_NAMESPACE_URI,fa as XMLNS_NAMESPACE_URI,ea as XML_NAMESPACE_URI,Sc as allocateContentControlId,Sb as allocateDrawingPropertyId,rd as allocateNoteId,Na as applyEdits,yf as applyHeaderFooterLifecycleOp,fg as applyNoteLifecycleOp,ji as applyTreeOp,t as asciiFold,ba as assertValidQName,re as atomicFieldSpansOf,pd as atomicNoteSpansOf,rf as authorableHyperlinkTarget,Gf as authoredDocumentEndnoteProperties,Ff as authoredDocumentFootnoteProperties,Df as authoredEndnotePropertiesFromSectPr,Cf as authoredFootnotePropertiesFromSectPr,zd as bodyStoryRoot,hf as bookmarkPairNodes,_g as boundCustomXmlNodeIdOf,Yg as boundCustomXmlNodeIds,Zg as boundCustomXmlNodeIdsInPackage,Xe as buildBookmarkIndex,A as buildContentTypeIndex,D as buildRelationshipSet,ef as buildTocContentControl,df as buildTocEntryParagraph,ra as canonicalOoxmlFingerprint,gg as cascadeDeletedNoteReferences,xg as cascadeEmptiedComments,Z as childElements,Hd as collectFlowBlocks,Da as collectNodeIds,Qf as collectNoteReferences,Sf as collectPackageNoteReferences,vh as collectRevisionSites,Md as collectSectionPropertyNodes,Bd as collectStoryParagraphs,pg as commentAnchorsOfStory,rg as commentsOfPart,R as containsCssFetch,Cc as contentControlContentChildren,Gc as contentControlContentNodeOf,Fd as contentControlContentOf,Fc as contentControlEndPropertiesNodeOf,Jc as contentControlLevelOf,Ec as contentControlPropertiesNodeOf,Ic as contentControlPropertiesOf,Mc as contentControlTextOf,Kc as contentControlsIn,gc as contentTypesPartBytes,Cb as createImageResourceCache,Ea as createNodeIdAllocator,Of as createNoteReferenceScanBudget,md as customMarkFollows,Xg as customNodeBinding,Lg as customXmlDataParts,Ug as customXmlLabelXPath,Pg as customXmlNodes,Vg as customXmlPrefixMappings,Jg as datastoreItemIdFor,Ih as deepParagraphOrderOfPart,ug as deleteCommentThread,Rd as deobfuscateFont,lf as deriveOoxmlIndexes,Ae as detectBodyTocs,v as detectDuplicateNames,Tf as diagnoseNoteReferences,of as diffSemanticDigests,mf as digestPart,$h as drawingOpImpact,sf as ensureHyperlinkRelationship,pf as ensureListDefinition,qf as ensureNumberingLevel,uc as equationExpressionToLinearMath,Q as escapeCssString,M as escapeXml,z as extensionKey,ie as fieldAtomText,he as fieldOnOffAttribute,Lc as findContentControl,Mg as findCustomXmlDataPart,Be as findDetectedToc,Y as findElement,Ga as findNode,ud as findNoteById,Dc as flattenContentControls,Zd as fldCharType,ge as fldSimpleInstr,Fb as fnv1a32,Zc as formatNoteScopeId,Mh as formsProtectionEnabled,Xd as hardBreakAttributes,Ud as hardBreakKind,Wd as hardBreakText,tg as hasAnyComment,sb as hasBoundedSvgRoot,ke as hasLegacyFormFieldData,Fa as hasNode,Za as hyperlinkAnchorOf,_a as hyperlinkRelationshipIdOf,$a as hyperlinkTargetOf,Ab as imageResourceLookupFor,jf as indexStyles,Ve as inlineControlEndingAt,We as inlineControlStartingAt,Ka as insertChildren,fe as instrTextValue,Dd as isContentControl,Ed as isContentControlContent,Ac as isContentControlContentNode,zc as isContentControlNode,Bc as isContentControlWrapper,ka as isContentRevisionKind,fd as isContinuationSeparatorNode,I as isDangerousKey,ei as isDrawingTreeDocOp,ad as isEndnotesNode,U as isEvaluableField,je as isFieldChrome,be as isFldChar,_d as isFldCharNode,ee as isFldSimple,ae as isFldSimpleNode,$c as isFootnotesNode,xf as isHeaderFooterLifecycleOp,Ya as isHyperlinkNode,T as isInertExecutable,ce as isInstrText,$d as isInstrTextNode,Jf as isLegalEndnotePosition,se as isLegalFldCharType,Kf as isLegalFootnotePosition,Lf as isLegalNumRestart,jd as isNormalNote,od as isNoteAtomNode,eg as isNoteLifecycleOp,bd as isNoteNode,dd as isNoteRefNode,cd as isNoteReferenceNode,Vd as isPageBreakNode,oa as isRangeMarkerKind,ed as isSeparatorNode,yd as isStoryPart,y as isValidMime,$ as isValidNCName,Db as isValidParaId,aa as isValidQName,vc as linearMathToOmml,zb as liveDrawingReferenceCount,Oc as lockForbidsEdit,Pc as lockForbidsRemoval,Gb as mintParaId,Jb as mintedParagraphIdentityAttributes,Vf as normalNoteIds,Kb as normalizeParagraphIdentity,r as normalizePartName,nd as noteAtomText,hd as noteIdOf,gd as noteKindOf,ld as noteRefKindOf,kd as noteReferenceKindOf,id as noteTypeOf,sd as notesOf,Uf as notesPartHasId,J as nullRecord,sa as ooxmlTreesEqual,Rc as orderedContentControlProperties,Eb as paraIdOf,Re as paragraphOffsetIndex,Hh as paragraphOrderOfPart,ki as paragraphTextOf,Ha as parentNodeOf,Bf as parseAuthoredNoteProperties,Hc as parseContentControlId,tc as parseLinearMath,Yc as parseNoteId,_c as parseNoteScopeId,ye as parseTocInstruction,u as partNameKey,gf as planTocEntries,_e as points,af as pointsToTwips,lb as projectDrawing,sc as projectOmmlEquation,Qg as readCustomXmlNode,wf as readDocumentProtection,Sd as readEmbeddedFonts,pa as readOnOffChild,dc as readOoxmlPackage,xa as readOoxmlPart,zg as readTrackingSettings,Bg as readViewSettings,X as readXml,Qa as readZip,tf as relationshipTargetIn,hc as relationshipsOf,jc as relsPartNameFor,Ma as removeNode,Ja as replaceChildren,La as replaceNode,Nc as resolveContentControlLock,B as resolveContentType,ic as resolveContentTypeOf,If as resolveEndnoteProperties,Hf as resolveFootnoteProperties,Qd as resolveHeaderFooterParts,Pd as resolveHeaderFooterPartsBySection,Od as resolveHeaderFooterResolutionBySection,F as resolveImageRelationship,n as resolveImageResourceLimits,w as resolveInternalTarget,k as resolveLimits,Pf as resolveNotesPart,E as resolveRelationship,if as resolveTocRowHeadings,L as sanitizeHref,V as scrubExport,Nh as sectionProtectsForms,Pe as segmentsOf,nf as semanticDigest,qa as serializeOoxmlPart,Ef as settingsPartOf,tb as sniffImageMime,Ad as storyParagraphs,xd as storyRootsOf,kf as stylesPartOf,_ as textContent,gh as textFormFieldsOf,Eg as textboxStoriesInPart,sg as threadStateOfPart,K as toSafeRecord,ff as tocEntryText,cf as tocLeftIndentTwips,Ze as twips,$e as twipsToPoints,Hb as usedParaIds,ai as validateDrawingOp,x as validateExternalTarget,vb as validateGifHeader,wb as validateJpegHeader,ua as validateOoxmlPart,pc as validatePackageInvariants,ub as validatePngHeader,yb as validateRasterHeader,qi as validateTreeOp,Ib as w14RootPrefix,Jd as walkAllStoryParagraphs,Kd as walkParagraphInline,Id as walkStoryBlocks,Vb as withBinaryPart,kc as withContentTypeOverride,Ng as withCustomXmlDataPart,Rg as withCustomXmlNode,Wb as withEmbeddedImage,$g as withExportedCustomNodes,oc as withNewPart,fc as withPart,nc as withRelationship,Og as withoutCustomXmlDataPart,Sg as withoutCustomXmlNode,Tg as withoutOrphanCustomXmlNodes,$b as withoutUnreferencedImagePart,di as wrapTargetToAnchorSpec,ec as writeOoxmlPackage,Ra as writeZip}from'./chunk-CF3JR35B.js';
1
+ export{ma as AUTHORABLE_PARAGRAPH_PROPERTIES,na as AUTHORABLE_RUN_PROPERTIES,m as Budget,l as BudgetError,C as COMPARATORS,o as CancellationController,n as CancellationError,ja as DEFAULT_FORMATTING_DISPLAY_MODE,N as DEFAULT_MAX_EDITABLE_STORY_PARTS,r as DeterministicClock,y as DeterministicMemoryMeter,d as ID_KINDS,w as LIMIT_KEYS,v as LIMIT_SPECS,ba as MAX_CUSTOM_NODE_LABEL_LENGTH,aa as MAX_CUSTOM_NODE_PAYLOAD_LENGTH,K as MAX_FRAGMENT_DECODED_BYTES,q as PortRegistry,p as PortResolutionError,j as RegistryError,Ua as SEARCH_MATCH_LIMIT,Ta as SEARCH_QUERY_MAX,s as SequentialIdentity,M as TreeDocumentStore,O as TreePackageStore,U as addComment,Z as addPackageComment,L as applyFragmentPaste,z as assertLimitInvariants,f as assertValidId,qa as authoredProperties,t as beginOperation,A as canonicalize,Qa as collectReviewItems,Ca as commentBodyText,Da as commentInitials,Pa as commentItemsOf,X as commentPartNameOf,Y as commentsExtendedPartNameOf,D as compareArtifacts,h as compareSemVer,fa as customNodePayloadsByControl,ga as customNodePayloadsOf,$ as deletePackageComments,sa as directParagraphMarkProperties,ra as directParagraphProperties,u as endOperation,I as extractFragmentPackage,Ya as findOccurrences,E as fingerprint,Ha as firstReviewRange,Va as foldCase,wa as formatOwnedRunIds,Aa as formattableRanges,W as hasCommentPart,H as hashAuthored,ab as headlessViewOfStore,ca as insertCustomNodeWrite,ha as insertPackageCustomNode,oa as isAuthorableRunProperty,Xa as isSearchableQuery,e as isValidId,Wa as isWholeWord,Sa as linkRevisionReplies,Ma as locateSites,x as makeLimitCounter,Za as materializeGlossaryPlaceholders,J as mergeFragmentIntoPackage,ua as mergedFontProperty,xa as mergedMultiSettingProperty,ya as mergedParagraphMarkProperties,ta as mergedProperties,T as nextCommentId,$a as openHeadlessDocument,g as parseSemVer,_a as planRevisionBatch,pa as propertyContainer,da as removeCustomNodeWrite,ia as removePackageCustomNode,G as replayFixture,k as resolve,Fa as reviewItemKey,Ga as reviewItemRanges,Oa as revisionItemsOf,va as runAddressRanges,za as runPropertyEdits,Ba as runsCovering,i as satisfies,V as setCommentResolved,_ as setPackageCommentResolved,B as stableHash,ea as sweepCustomNodePayloads,F as validateFixture}from'./chunk-WZX4UGRQ.js';export{lg as ACCEPTED_PARAGRAPH_PROPERTIES,kg as ACCEPTED_RUN_PROPERTIES,h as ALL_FROZEN_IDS,p as BoundedCounter,c as CANONICAL_MUTATION_ORIGINS,zc as CONTENT_CONTROL_ID_MAX,Rc as CONTENT_CONTROL_PROPERTY_ORDER,ch as CUSTOM_NODE_XPATH_PREFIX,Og as CUSTOM_XML_PROPS_REL,Pg as CUSTOM_XML_PROPS_TYPE,Ng as CUSTOM_XML_REL,G as DANGEROUS_KEYS,Qg as DATASTORE_NAMESPACE_URI,Hf as DEFAULT_ENDNOTE_PROPERTIES,Gf as DEFAULT_FOOTNOTE_PROPERTIES,m as DEFAULT_IMAGE_RESOURCE_LIMITS,j as DEFAULT_LIMITS,sc as DEFAULT_OMML_LIMITS,dc as DEFAULT_OOXML_PACKAGE_LIMITS,Ig as DEFAULT_VIEW_SETTINGS,Pa as DEFAULT_ZIP_LIMITS,g as DEPENDENCY_KEY_IDS,H as DangerousKeyError,Zd as FIELD_ATOM_CHAR,i as HARD_CEILINGS,Ya as HYPERLINK_RELATIONSHIP_TYPE,C as IMAGE_RELATIONSHIP_TYPE,l as IMAGE_RESOURCE_HARD_CEILINGS,db as IMAGE_WRAP_TARGETS,S as INERT_EXECUTABLE_KINDS,o as LimitExceededError,yc as MAX_CONTENT_CONTROLS_PER_PART,xc as MAX_CONTENT_CONTROL_NESTING,rd as MAX_NOTES_PER_PART,Uf as MAX_NOTE_REFERENCE_PARTS,Tf as MAX_NOTE_REFERENCE_SCAN,wd as MAX_STORY_SDT_NESTING,sb as MAX_SVG_SNIFF_BYTES,d as NON_CANONICAL_ORIGINS,Uc as NOTE_ATOM_CHAR,Yc as NOTE_CONTINUATION_SEPARATOR_ID,Wc as NOTE_ID_MAX,Vc as NOTE_ID_MIN,Xc as NOTE_SEPARATOR_ID,Cf as NO_DOCUMENT_PROTECTION,Gg as NO_TRACKING_SETTINGS,rc as OFFICE_MATH_NAMESPACE_URI,Xa as OFFICE_RELATIONSHIP_NAMESPACE_URI,wa as OOXML_NODE_IDENTITY_RULES,b as ORIGIN_IDS,Ud as PAGE_BREAK_CHAR,ca as PrefixAllocator,e as RESULT_IDS,f as RUNTIME_PORT_IDS,ji as TABLE_BORDER_STYLES,ef as TOC_LEVEL_INDENT_TWIPS,we as TOC_MAX_BOOKMARKS_PER_REFRESH,ve as TOC_MAX_ENTRIES,xe as TOC_MAX_FIELD_NESTING,ue as TOC_MAX_INSTRUCTION_CHARS,ye as TOC_MAX_PAGE_PASSES,jg as TREE_DOC_OP_KINDS,$e as TWIPS_PER_POINT,wg as W15_NAMESPACE_URI,da as WML_NAMESPACE_URI,fa as XMLNS_NAMESPACE_URI,ea as XML_NAMESPACE_URI,Tc as allocateContentControlId,Tb as allocateDrawingPropertyId,sd as allocateNoteId,Oa as applyEdits,Ff as applyHeaderFooterLifecycleOp,ng as applyNoteLifecycleOp,Ci as applyTreeOp,t as asciiFold,ba as assertValidQName,se as atomicFieldSpansOf,qd as atomicNoteSpansOf,yf as authorableHyperlinkTarget,Nf as authoredDocumentEndnoteProperties,Mf as authoredDocumentFootnoteProperties,Kf as authoredEndnotePropertiesFromSectPr,Jf as authoredFootnotePropertiesFromSectPr,Ad as bodyStoryRoot,kf as bookmarkPairNodes,gh as boundCustomXmlNodeIdOf,eh as boundCustomXmlNodeIds,fh as boundCustomXmlNodeIdsInPackage,_e as buildBookmarkIndex,A as buildContentTypeIndex,D as buildRelationshipSet,hf as buildTocContentControl,gf as buildTocEntryParagraph,wf as buildingBlockGalleryOf,xf as buildingBlocksForControl,vf as buildingBlocksOf,ra as canonicalOoxmlFingerprint,og as cascadeDeletedNoteReferences,Fg as cascadeEmptiedComments,Z as childElements,Id as collectFlowBlocks,Ea as collectNodeIds,Xf as collectNoteReferences,Zf as collectPackageNoteReferences,Ih as collectRevisionSites,Nd as collectSectionPropertyNodes,Cd as collectStoryParagraphs,xg as commentAnchorsOfStory,zg as commentsOfPart,R as containsCssFetch,Dc as contentControlContentChildren,Hc as contentControlContentNodeOf,Gd as contentControlContentOf,Gc as contentControlEndPropertiesNodeOf,Kc as contentControlLevelOf,Fc as contentControlPropertiesNodeOf,Jc as contentControlPropertiesOf,Nc as contentControlTextOf,Lc as contentControlsIn,hc as contentTypesPartBytes,Db as createImageResourceCache,Fa as createNodeIdAllocator,Vf as createNoteReferenceScanBudget,nd as customMarkFollows,dh as customNodeBinding,Tg as customXmlDataParts,ah as customXmlLabelXPath,Xg as customXmlNodes,bh as customXmlPrefixMappings,Rg as datastoreItemIdFor,Vh as deepParagraphOrderOfPart,Cg as deleteCommentThread,Sd as deobfuscateFont,of as deriveOoxmlIndexes,Be as detectBodyTocs,v as detectDuplicateNames,_f as diagnoseNoteReferences,rf as diffSemanticDigests,pf as digestPart,qi as drawingOpImpact,zf as ensureHyperlinkRelationship,sf as ensureListDefinition,tf as ensureNumberingLevel,vc as equationExpressionToLinearMath,Q as escapeCssString,M as escapeXml,z as extensionKey,je as fieldAtomText,ie as fieldOnOffAttribute,Mc as findContentControl,Ug as findCustomXmlDataPart,Ce as findDetectedToc,Y as findElement,Ha as findNode,vd as findNoteById,Ec as flattenContentControls,_d as fldCharType,he as fldSimpleInstr,Gb as fnv1a32,_c as formatNoteScopeId,Zh as formsProtectionEnabled,uf as glossaryPartOf,Yd as hardBreakAttributes,Vd as hardBreakKind,Xd as hardBreakText,Bg as hasAnyComment,tb as hasBoundedSvgRoot,le as hasLegacyFormFieldData,Ga as hasNode,_a as hyperlinkAnchorOf,$a as hyperlinkRelationshipIdOf,ab as hyperlinkTargetOf,Bb as imageResourceLookupFor,mf as indexStyles,Ye as inlineControlEndingAt,Ze as inlineControlStartingAt,La as insertChildren,ge as instrTextValue,Ed as isContentControl,Fd as isContentControlContent,Bc as isContentControlContentNode,Ac as isContentControlNode,Cc as isContentControlWrapper,ka as isContentRevisionKind,gd as isContinuationSeparatorNode,I as isDangerousKey,vi as isDrawingTreeDocOp,bd as isEndnotesNode,U as isEvaluableField,ke as isFieldChrome,ce as isFldChar,$d as isFldCharNode,fe as isFldSimple,be as isFldSimpleNode,ad as isFootnotesNode,Ef as isHeaderFooterLifecycleOp,Za as isHyperlinkNode,T as isInertExecutable,de as isInstrText,ae as isInstrTextNode,Qf as isLegalEndnotePosition,te as isLegalFldCharType,Rf as isLegalFootnotePosition,Sf as isLegalNumRestart,kd as isNormalNote,pd as isNoteAtomNode,mg as isNoteLifecycleOp,cd as isNoteNode,ed as isNoteRefNode,dd as isNoteReferenceNode,Wd as isPageBreakNode,oa as isRangeMarkerKind,fd as isSeparatorNode,zd as isStoryPart,y as isValidMime,$ as isValidNCName,Eb as isValidParaId,aa as isValidQName,rh as legacyCheckboxFieldsOf,wc as linearMathToOmml,Ab as liveDrawingReferenceCount,Pc as lockForbidsEdit,Qc as lockForbidsRemoval,Hb as mintParaId,Kb as mintedParagraphIdentityAttributes,ag as normalNoteIds,Lb as normalizeParagraphIdentity,r as normalizePartName,od as noteAtomText,id as noteIdOf,hd as noteKindOf,md as noteRefKindOf,ld as noteReferenceKindOf,jd as noteTypeOf,td as notesOf,$f as notesPartHasId,J as nullRecord,Li as observeHistoryGroup,sa as ooxmlTreesEqual,Sc as orderedContentControlProperties,Fb as paraIdOf,Ue as paragraphOffsetIndex,Uh as paragraphOrderOfPart,Di as paragraphTextOf,Ia as parentNodeOf,If as parseAuthoredNoteProperties,Ic as parseContentControlId,uc as parseLinearMath,Zc as parseNoteId,$c as parseNoteScopeId,ze as parseTocInstruction,u as partNameKey,jf as planTocEntries,bf as points,df as pointsToTwips,mb as projectDrawing,tc as projectOmmlEquation,Yg as readCustomXmlNode,Df as readDocumentProtection,Td as readEmbeddedFonts,pa as readOnOffChild,ec as readOoxmlPackage,xa as readOoxmlPart,Hg as readTrackingSettings,Jg as readViewSettings,X as readXml,Qa as readZip,Af as relationshipTargetIn,ic as relationshipsOf,kc as relsPartNameFor,Na as removeNode,Ka as replaceChildren,Ma as replaceNode,Mi as reportHistoryGroup,Oc as resolveContentControlLock,B as resolveContentType,jc as resolveContentTypeOf,Pf as resolveEndnoteProperties,Of as resolveFootnoteProperties,Rd as resolveHeaderFooterParts,Qd as resolveHeaderFooterPartsBySection,Pd as resolveHeaderFooterResolutionBySection,F as resolveImageRelationship,n as resolveImageResourceLimits,w as resolveInternalTarget,k as resolveLimits,Wf as resolveNotesPart,E as resolveRelationship,lf as resolveTocRowHeadings,L as sanitizeHref,V as scrubExport,_h as sectionProtectsForms,Se as segmentsOf,qf as semanticDigest,qa as serializeOoxmlPart,Lf as settingsPartOf,ub as sniffImageMime,Bd as storyParagraphs,yd as storyRootsOf,nf as stylesPartOf,_ as textContent,ph as textFormFieldsOf,Mg as textboxStoriesInPart,Ag as threadStateOfPart,K as toSafeRecord,if as tocEntryText,ff as tocLeftIndentTwips,af as twips,cf as twipsToPoints,Ib as usedParaIds,ri as validateDrawingOp,x as validateExternalTarget,wb as validateGifHeader,xb as validateJpegHeader,ua as validateOoxmlPart,qc as validatePackageInvariants,vb as validatePngHeader,zb as validateRasterHeader,Ji as validateTreeOp,Jb as w14RootPrefix,Kd as walkAllStoryParagraphs,Ld as walkParagraphInline,Jd as walkStoryBlocks,Wb as withBinaryPart,lc as withContentTypeOverride,Vg as withCustomXmlDataPart,Zg as withCustomXmlNode,Xb as withEmbeddedImage,hh as withExportedCustomNodes,pc as withNewPart,gc as withPart,oc as withRelationship,Wg as withoutCustomXmlDataPart,_g as withoutCustomXmlNode,$g as withoutOrphanCustomXmlNodes,ac as withoutUnreferencedImagePart,ui as wrapTargetToAnchorSpec,fc as writeOoxmlPackage,Ra as writeZip}from'./chunk-NG6IQ4SI.js';
@@ -1,5 +1,5 @@
1
- import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-C51LuAAu.js';
2
- import { j as OoxmlPackage, O as OoxmlPart, i as OoxmlNode, a1 as OoxmlElement, at as OoxmlParagraphNode, au as OoxmlNoteNode, av as OoxmlContinuationSeparatorNode, aw as OoxmlEndnotesNode, ax as OoxmlFootnotesNode, ay as OoxmlNoteRefNode, az as OoxmlNoteReferenceNode, aA as OoxmlSeparatorNode, as as RevisionAttributionInput, aB as DrawingTreeDocOp, aC as ImpactClass, W as TreeDocOp, a5 as TreeOpRejection } from './types-barrel-CEOy-Jv0.js';
1
+ import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-C4ilLzog.js';
2
+ import { j as OoxmlPackage, O as OoxmlPart, i as OoxmlNode, a1 as OoxmlElement, at as OoxmlParagraphNode, au as OoxmlNoteNode, av as OoxmlContinuationSeparatorNode, aw as OoxmlEndnotesNode, ax as OoxmlFootnotesNode, ay as OoxmlNoteRefNode, az as OoxmlNoteReferenceNode, aA as OoxmlSeparatorNode, as as RevisionAttributionInput, aB as DrawingTreeDocOp, aC as ImpactClass, W as TreeDocOp, a5 as TreeOpRejection } from './types-barrel-DLB11iSY.js';
3
3
 
4
4
  /** A freshly allocated drawing property id, or the reason one could not be minted. */
5
5
  type DrawingPropertyIdResult = {
@@ -402,6 +402,119 @@ declare function notesPartHasId(part: OoxmlPart, noteId: number): boolean;
402
402
  /** List normal (body) note ids in document order, bounded. */
403
403
  declare function normalNoteIds(part: OoxmlPart): readonly number[];
404
404
 
405
+ /** How far a note lifecycle op reaches — which parts a caller must expect to have changed. */
406
+ type NoteLifecycleImpact = 'flow-structural' | 'global';
407
+ /**
408
+ * A note lifecycle mutation: insert, delete, convert, or set properties.
409
+ *
410
+ * Package-level rather than story-level, because every one of these touches the main document,
411
+ * the notes part, the document relationships AND `[Content_Types].xml` together.
412
+ */
413
+ type NoteLifecycleOp = {
414
+ readonly op: 'insertNote';
415
+ readonly noteKind: NoteKind;
416
+ readonly paragraphId: string;
417
+ readonly offset: number;
418
+ /**
419
+ * Write the citing reference as a TRACKED insertion: the reference run goes inside a
420
+ * `w:ins` carrying this attribution. The note body stays plain — rejecting the
421
+ * reference removes it, and the orphaned body is swept by the same cascade an
422
+ * untracked reference deletion triggers.
423
+ */
424
+ readonly revision?: RevisionAttributionInput;
425
+ } | {
426
+ readonly op: 'deleteNote';
427
+ readonly noteKind: NoteKind;
428
+ readonly noteId: number;
429
+ } | {
430
+ readonly op: 'convertNote';
431
+ readonly fromKind: NoteKind;
432
+ readonly noteId: number;
433
+ } | {
434
+ /**
435
+ * Convert every normal note of `fromKind` in document order. One atomic package
436
+ * transaction / undo unit with the same validation as repeated `convertNote`.
437
+ */
438
+ readonly op: 'convertAllNotes';
439
+ readonly fromKind: NoteKind;
440
+ } | {
441
+ readonly op: 'setNoteProperties';
442
+ readonly scope: 'document' | 'section';
443
+ readonly sectionIndex?: number;
444
+ readonly footnote?: {
445
+ readonly numFmt?: string;
446
+ readonly numRestart?: string;
447
+ readonly position?: string;
448
+ readonly numStart?: number;
449
+ };
450
+ readonly endnote?: {
451
+ readonly numFmt?: string;
452
+ readonly numRestart?: string;
453
+ readonly position?: string;
454
+ readonly numStart?: number;
455
+ };
456
+ };
457
+ /** Why a note lifecycle op was refused. */
458
+ type NoteLifecycleRejection = 'invalidArgs' | 'invalid-property-value' | 'tree-invariant';
459
+ /**
460
+ * A new package, or a typed rejection.
461
+ *
462
+ * Application is PURE and all-or-nothing: there are no partial writes, so a refused op leaves the
463
+ * caller's package untouched rather than half-migrated across four parts.
464
+ */
465
+ type NoteLifecycleResult = {
466
+ readonly ok: true;
467
+ readonly package: OoxmlPackage;
468
+ readonly impact: NoteLifecycleImpact;
469
+ readonly noteId?: number;
470
+ readonly noteKind?: NoteKind;
471
+ readonly createdPartName?: string;
472
+ } | {
473
+ readonly ok: false;
474
+ readonly reason: NoteLifecycleRejection;
475
+ readonly detail?: string;
476
+ };
477
+ /** Whether an op is a note lifecycle op rather than a story-level one. */
478
+ declare function isNoteLifecycleOp(op: {
479
+ readonly op: string;
480
+ }): op is NoteLifecycleOp;
481
+ /** Attribution and limits applied to one note lifecycle op. */
482
+ interface NoteLifecycleOptions {
483
+ /**
484
+ * Shared part + visited-node budget for reference scans. When omitted a fresh default
485
+ * budget is used. Truncation rejects the op with the original package unchanged.
486
+ */
487
+ readonly scanBudget?: NoteReferenceScanBudget;
488
+ }
489
+ /**
490
+ * Apply one note lifecycle op atomically. Rejected ops leave the input package untouched.
491
+ */
492
+ declare function applyNoteLifecycleOp(pkg: OoxmlPackage, op: NoteLifecycleOp, options?: NoteLifecycleOptions): NoteLifecycleResult;
493
+ /**
494
+ * How deleting text cascades into the notes it referenced.
495
+ *
496
+ * A note's body and the citation reaching it are one thing to a reader, so removing the reference
497
+ * must remove the body too or the notes part keeps an entry nothing points at.
498
+ */
499
+ interface CascadeDeletedNoteReferencesOptions {
500
+ /**
501
+ * Independent full budgets per snapshot. When omitted each snapshot gets its own
502
+ * default budget — never share one counter across before/after walks.
503
+ */
504
+ readonly beforeBudget?: NoteReferenceScanBudget;
505
+ readonly afterBudget?: NoteReferenceScanBudget;
506
+ }
507
+ /**
508
+ * Remove note bodies for references that disappeared between two package snapshots.
509
+ * Used when `deleteText` or `deleteBlock` removes a `noteReference` atom so body+ref stay
510
+ * one undo unit.
511
+ *
512
+ * Each snapshot gets an independent full visited/part budget. If either scan truncates
513
+ * the cascade fails closed so a hostile package cannot skip body deletion silently —
514
+ * without accidentally halving capacity by charging both walks to one counter.
515
+ */
516
+ declare function cascadeDeletedNoteReferences(before: OoxmlPackage, after: OoxmlPackage, options?: CascadeDeletedNoteReferencesOptions): OoxmlPackage | null;
517
+
405
518
  interface InsertImageInput {
406
519
  readonly paragraphId: string;
407
520
  readonly offset: number;
@@ -448,6 +561,25 @@ interface ApplyImagePropertiesInput {
448
561
  readonly hyperlink: string | null;
449
562
  }
450
563
 
564
+ /**
565
+ * The identity of one continuous user gesture, for history grouping.
566
+ *
567
+ * A live color picker, a font-size stepper or a spacing slider applies every intermediate
568
+ * value so the document updates under the pointer, and each of those writes is a
569
+ * transaction in its own right — it must render, and a collaborator must receive it. What
570
+ * they are NOT is separate undo steps. The caller mints one token when the gesture starts
571
+ * (`Symbol('color-drag')`) and passes it with every write until the gesture ends.
572
+ *
573
+ * A symbol rather than a string, so two unrelated callers cannot collide by naming their
574
+ * gesture the same way, and so a token cannot outlive its gesture by accident through
575
+ * serialization.
576
+ */
577
+ type HistoryGroup = symbol;
578
+ type HistoryCaptureKind = 'started' | 'extended' | 'split';
579
+ type HistoryCaptureReason = 'package-unit' | 'composition';
580
+ declare function observeHistoryGroup<T>(group: HistoryGroup, report: (kind: HistoryCaptureKind, reason?: HistoryCaptureReason) => void, run: () => T): T;
581
+ declare function reportHistoryGroup(group: HistoryGroup | undefined, kind: HistoryCaptureKind, reason?: HistoryCaptureReason): void;
582
+
451
583
  /** A selection the caller wants restored when an entry is undone or redone. */
452
584
  /** A selection captured with a transaction, so undo restores where the caret was. */
453
585
  interface SelectionMark {
@@ -581,6 +713,12 @@ interface TransactOptions {
581
713
  readonly minimumImpact?: ImpactClass;
582
714
  /** Story identity stamped onto the published ModelChange (package-aware targeting). */
583
715
  readonly story?: TreeStoryRef;
716
+ /**
717
+ * The gesture this transaction belongs to: consecutive transactions carrying the SAME
718
+ * token extend one history entry (package from before the first, selection after the
719
+ * latest). Another token, none, undo or redo closes the group. See {@link HistoryGroup}.
720
+ */
721
+ readonly historyGroup?: HistoryGroup;
584
722
  }
585
723
  interface HistoryEntry {
586
724
  /**
@@ -595,6 +733,12 @@ interface HistoryEntry {
595
733
  readonly revision: number;
596
734
  readonly selectionBefore: SelectionMark | null;
597
735
  readonly selectionAfter: SelectionMark | null;
736
+ /**
737
+ * The gesture this entry is still collecting, while it is the newest entry and nothing
738
+ * has closed it. Only ever set on the top of the undo stack: {@link closeHistoryGroup}
739
+ * strips it, and undo and redo never copy it onto the entries they push.
740
+ */
741
+ readonly group?: HistoryGroup;
598
742
  }
599
743
  /** How a store is constructed: its limits, its history depth, and its identity source. */
600
744
  interface TreeDocumentStoreOptions {
@@ -734,6 +878,13 @@ declare class TreeDocumentStore {
734
878
  * in place. An IME cancel is not an undo request; the caller decides what to revert.
735
879
  */
736
880
  cancelComposition(): void;
881
+ /**
882
+ * Close the open history group, if any: the next transaction records its own entry.
883
+ * The store does this itself for another token, none, undo and redo; the package
884
+ * coordinator does it for history moving ABOVE the store (a package unit, another
885
+ * story's pointer), which the store cannot see.
886
+ */
887
+ closeHistoryGroup(): void;
737
888
  undo(): TreeModelChange | null;
738
889
  redo(): TreeModelChange | null;
739
890
  /** The selection to restore for the entry `undo()` would reverse next. */
@@ -744,40 +895,6 @@ declare class TreeDocumentStore {
744
895
  private publish;
745
896
  }
746
897
 
747
- /** Decoded fragment payloads above this cap are refused before any package work. */
748
- declare const MAX_FRAGMENT_DECODED_BYTES: number;
749
- interface FragmentPasteInput {
750
- readonly paragraphId: string;
751
- readonly offset: number;
752
- /** The fragment package zip (from the clipboard codec or the HTML projection). */
753
- readonly fragmentBytes: Uint8Array;
754
- readonly lastMarkCovered: boolean;
755
- /** Ops that clear the current selection first (the surface's deleteSelectionPlan). */
756
- readonly priorOps?: readonly TreeDocOp[];
757
- /**
758
- * Collaboration actor for the ids this paste mints.
759
- *
760
- * A paste freshens three package-wide namespaces — bookmark `@w:id`, revision `@w:id` and
761
- * `wp:docPr/@id` — and the merge reads the actor off the open transaction. Without one, two
762
- * replicas pasting the same fragment from one snapshot mint the same numbers, and only the
763
- * merged document shows it. Omitted (solo) keeps Word's dense sequences.
764
- */
765
- readonly actorId?: string;
766
- }
767
- type FragmentPasteResult = (Extract<PackageTransactResult, {
768
- ok: true;
769
- }> & {
770
- readonly blockCount: number;
771
- }) | Extract<PackageTransactResult, {
772
- ok: false;
773
- }>;
774
- /**
775
- * Read the fragment through the bounded file-open trust boundary, merge its resources,
776
- * and land its blocks — all inside one transaction. Any refusal leaves the document
777
- * exactly as it was; the caller (the paste router) degrades to the next flavour.
778
- */
779
- declare function applyFragmentPaste(store: TreePackageStore, scope: StoryScope, input: FragmentPasteInput): FragmentPasteResult;
780
-
781
898
  /** Attribution stamped on one remote canonical publication. */
782
899
  interface RemotePackageAttribution {
783
900
  readonly origin: string;
@@ -961,7 +1078,9 @@ declare class TreePackageStore {
961
1078
  * Promote a story transaction that wrote package bytes to one package undo pointer.
962
1079
  * Used by image intents and note-reference cascade.
963
1080
  */
964
- promoteStoryTransactionToPackageUnit(beforePackage: OoxmlPackage, store: TreeDocumentStore, checkpoint: TreeDocumentCheckpoint, beforeDepth: number): TreeModelChange;
1081
+ promoteStoryTransactionToPackageUnit(beforePackage: OoxmlPackage, store: TreeDocumentStore, checkpoint: TreeDocumentCheckpoint,
1082
+ /** Unused: the restore is unconditional now. Kept so the public signature stands. */
1083
+ _beforeDepth?: number): TreeModelChange;
965
1084
  /**
966
1085
  * Publish a story transaction the coordinator did not run.
967
1086
  *
@@ -1019,117 +1138,38 @@ declare class TreePackageStore {
1019
1138
  private publishSynthetic;
1020
1139
  }
1021
1140
 
1022
- /** How far a note lifecycle op reaches — which parts a caller must expect to have changed. */
1023
- type NoteLifecycleImpact = 'flow-structural' | 'global';
1024
- /**
1025
- * A note lifecycle mutation: insert, delete, convert, or set properties.
1026
- *
1027
- * Package-level rather than story-level, because every one of these touches the main document,
1028
- * the notes part, the document relationships AND `[Content_Types].xml` together.
1029
- */
1030
- type NoteLifecycleOp = {
1031
- readonly op: 'insertNote';
1032
- readonly noteKind: NoteKind;
1141
+ /** Decoded fragment payloads above this cap are refused before any package work. */
1142
+ declare const MAX_FRAGMENT_DECODED_BYTES: number;
1143
+ interface FragmentPasteInput {
1033
1144
  readonly paragraphId: string;
1034
1145
  readonly offset: number;
1146
+ /** The fragment package zip (from the clipboard codec or the HTML projection). */
1147
+ readonly fragmentBytes: Uint8Array;
1148
+ readonly lastMarkCovered: boolean;
1149
+ /** Ops that clear the current selection first (the surface's deleteSelectionPlan). */
1150
+ readonly priorOps?: readonly TreeDocOp[];
1035
1151
  /**
1036
- * Write the citing reference as a TRACKED insertion: the reference run goes inside a
1037
- * `w:ins` carrying this attribution. The note body stays plain — rejecting the
1038
- * reference removes it, and the orphaned body is swept by the same cascade an
1039
- * untracked reference deletion triggers.
1040
- */
1041
- readonly revision?: RevisionAttributionInput;
1042
- } | {
1043
- readonly op: 'deleteNote';
1044
- readonly noteKind: NoteKind;
1045
- readonly noteId: number;
1046
- } | {
1047
- readonly op: 'convertNote';
1048
- readonly fromKind: NoteKind;
1049
- readonly noteId: number;
1050
- } | {
1051
- /**
1052
- * Convert every normal note of `fromKind` in document order. One atomic package
1053
- * transaction / undo unit with the same validation as repeated `convertNote`.
1054
- */
1055
- readonly op: 'convertAllNotes';
1056
- readonly fromKind: NoteKind;
1057
- } | {
1058
- readonly op: 'setNoteProperties';
1059
- readonly scope: 'document' | 'section';
1060
- readonly sectionIndex?: number;
1061
- readonly footnote?: {
1062
- readonly numFmt?: string;
1063
- readonly numRestart?: string;
1064
- readonly position?: string;
1065
- readonly numStart?: number;
1066
- };
1067
- readonly endnote?: {
1068
- readonly numFmt?: string;
1069
- readonly numRestart?: string;
1070
- readonly position?: string;
1071
- readonly numStart?: number;
1072
- };
1073
- };
1074
- /** Why a note lifecycle op was refused. */
1075
- type NoteLifecycleRejection = 'invalidArgs' | 'invalid-property-value' | 'tree-invariant';
1076
- /**
1077
- * A new package, or a typed rejection.
1078
- *
1079
- * Application is PURE and all-or-nothing: there are no partial writes, so a refused op leaves the
1080
- * caller's package untouched rather than half-migrated across four parts.
1081
- */
1082
- type NoteLifecycleResult = {
1083
- readonly ok: true;
1084
- readonly package: OoxmlPackage;
1085
- readonly impact: NoteLifecycleImpact;
1086
- readonly noteId?: number;
1087
- readonly noteKind?: NoteKind;
1088
- readonly createdPartName?: string;
1089
- } | {
1090
- readonly ok: false;
1091
- readonly reason: NoteLifecycleRejection;
1092
- readonly detail?: string;
1093
- };
1094
- /** Whether an op is a note lifecycle op rather than a story-level one. */
1095
- declare function isNoteLifecycleOp(op: {
1096
- readonly op: string;
1097
- }): op is NoteLifecycleOp;
1098
- /** Attribution and limits applied to one note lifecycle op. */
1099
- interface NoteLifecycleOptions {
1100
- /**
1101
- * Shared part + visited-node budget for reference scans. When omitted a fresh default
1102
- * budget is used. Truncation rejects the op with the original package unchanged.
1103
- */
1104
- readonly scanBudget?: NoteReferenceScanBudget;
1105
- }
1106
- /**
1107
- * Apply one note lifecycle op atomically. Rejected ops leave the input package untouched.
1108
- */
1109
- declare function applyNoteLifecycleOp(pkg: OoxmlPackage, op: NoteLifecycleOp, options?: NoteLifecycleOptions): NoteLifecycleResult;
1110
- /**
1111
- * How deleting text cascades into the notes it referenced.
1112
- *
1113
- * A note's body and the citation reaching it are one thing to a reader, so removing the reference
1114
- * must remove the body too or the notes part keeps an entry nothing points at.
1115
- */
1116
- interface CascadeDeletedNoteReferencesOptions {
1117
- /**
1118
- * Independent full budgets per snapshot. When omitted each snapshot gets its own
1119
- * default budget — never share one counter across before/after walks.
1152
+ * Collaboration actor for the ids this paste mints.
1153
+ *
1154
+ * A paste freshens three package-wide namespaces — bookmark `@w:id`, revision `@w:id` and
1155
+ * `wp:docPr/@id` — and the merge reads the actor off the open transaction. Without one, two
1156
+ * replicas pasting the same fragment from one snapshot mint the same numbers, and only the
1157
+ * merged document shows it. Omitted (solo) keeps Word's dense sequences.
1120
1158
  */
1121
- readonly beforeBudget?: NoteReferenceScanBudget;
1122
- readonly afterBudget?: NoteReferenceScanBudget;
1159
+ readonly actorId?: string;
1123
1160
  }
1161
+ type FragmentPasteResult = (Extract<PackageTransactResult, {
1162
+ ok: true;
1163
+ }> & {
1164
+ readonly blockCount: number;
1165
+ }) | Extract<PackageTransactResult, {
1166
+ ok: false;
1167
+ }>;
1124
1168
  /**
1125
- * Remove note bodies for references that disappeared between two package snapshots.
1126
- * Used when `deleteText` or `deleteBlock` removes a `noteReference` atom so body+ref stay
1127
- * one undo unit.
1128
- *
1129
- * Each snapshot gets an independent full visited/part budget. If either scan truncates
1130
- * the cascade fails closed so a hostile package cannot skip body deletion silently —
1131
- * without accidentally halving capacity by charging both walks to one counter.
1169
+ * Read the fragment through the bounded file-open trust boundary, merge its resources,
1170
+ * and land its blocks — all inside one transaction. Any refusal leaves the document
1171
+ * exactly as it was; the caller (the paste router) degrades to the next flavour.
1132
1172
  */
1133
- declare function cascadeDeletedNoteReferences(before: OoxmlPackage, after: OoxmlPackage, options?: CascadeDeletedNoteReferencesOptions): OoxmlPackage | null;
1173
+ declare function applyFragmentPaste(store: TreePackageStore, scope: StoryScope, input: FragmentPasteInput): FragmentPasteResult;
1134
1174
 
1135
- export { type TransactionContext as $, type ApplyImagePropertiesInput as A, type NoteDiagnosticCode as B, type CascadeDeletedNoteReferencesOptions as C, DEFAULT_MAX_EDITABLE_STORY_PARTS as D, type NoteLifecycleImpact as E, type FragmentPasteInput as F, type NoteLifecycleOp as G, type HeaderFooterVariant as H, type InsertImageInput as I, type NoteLifecycleOptions as J, type NoteLifecycleRejection as K, type NoteLifecycleResult as L, MAX_FRAGMENT_DECODED_BYTES as M, type NoteKind as N, type NoteReferenceHit as O, type NoteReferenceScanBudget as P, type NoteType as Q, type ReplaceImageOptions as R, type StoryScope as S, TreePackageStore as T, type PackageTransactResult as U, type RemotePackageAttribution as V, type StoryResolveResult as W, type TreeDocumentStoreOptions as X, type TreePackageStoreOptions as Y, type TreeStoryRef as Z, type TransactResult as _, type StoryTargetRejection as a, allocateDrawingPropertyId as a0, allocateNoteId as a1, applyFragmentPaste as a2, applyHeaderFooterLifecycleOp as a3, applyNoteLifecycleOp as a4, atomicNoteSpansOf as a5, cascadeDeletedNoteReferences as a6, collectNoteReferences as a7, collectPackageNoteReferences as a8, collectSectionPropertyNodes as a9, parseNoteScopeId as aA, resolveHeaderFooterParts as aB, resolveHeaderFooterPartsBySection as aC, resolveHeaderFooterResolutionBySection as aD, resolveNotesPart as aE, withBinaryPart as aF, withEmbeddedImage as aG, withoutUnreferencedImagePart as aH, createNoteReferenceScanBudget as aa, customMarkFollows as ab, diagnoseNoteReferences as ac, findNoteById as ad, formatNoteScopeId as ae, isContinuationSeparatorNode as af, isEndnotesNode as ag, isFootnotesNode as ah, isHeaderFooterLifecycleOp as ai, isNormalNote as aj, isNoteAtomNode as ak, isNoteLifecycleOp as al, isNoteNode as am, isNoteRefNode as an, isNoteReferenceNode as ao, isSeparatorNode as ap, normalNoteIds as aq, noteAtomText as ar, noteIdOf as as, noteKindOf as at, noteRefKindOf as au, noteReferenceKindOf as av, noteTypeOf as aw, notesOf as ax, notesPartHasId as ay, parseNoteId as az, type TreeModelChange as b, type HeaderFooterParts as c, type HeaderFooterSectionResolution as d, TreeDocumentStore as e, type SelectionMark as f, type TransactOptions as g, type ImageIntentResult as h, type FragmentPasteResult as i, type AtomicNoteSpan as j, type DrawingPropertyIdResult as k, type HeaderFooterKind as l, type HeaderFooterLifecycleImpact as m, type HeaderFooterLifecycleOp as n, type HeaderFooterLifecycleRejection as o, type HeaderFooterLifecycleResult as p, type HeaderFooterSlotMeta as q, MAX_NOTES_PER_PART as r, MAX_NOTE_REFERENCE_PARTS as s, MAX_NOTE_REFERENCE_SCAN as t, NOTE_ATOM_CHAR as u, NOTE_CONTINUATION_SEPARATOR_ID as v, NOTE_ID_MAX as w, NOTE_ID_MIN as x, NOTE_SEPARATOR_ID as y, type NoteDiagnostic as z };
1175
+ export { type TreePackageStoreOptions as $, type ApplyImagePropertiesInput as A, NOTE_ID_MIN as B, type CascadeDeletedNoteReferencesOptions as C, DEFAULT_MAX_EDITABLE_STORY_PARTS as D, NOTE_SEPARATOR_ID as E, type FragmentPasteInput as F, type NoteDiagnostic as G, type HeaderFooterVariant as H, type InsertImageInput as I, type NoteDiagnosticCode as J, type NoteLifecycleImpact as K, type NoteLifecycleOp as L, MAX_FRAGMENT_DECODED_BYTES as M, type NoteKind as N, type NoteLifecycleOptions as O, type NoteLifecycleRejection as P, type NoteLifecycleResult as Q, type ReplaceImageOptions as R, type StoryScope as S, TreePackageStore as T, type NoteReferenceHit as U, type NoteReferenceScanBudget as V, type NoteType as W, type PackageTransactResult as X, type RemotePackageAttribution as Y, type StoryResolveResult as Z, type TreeDocumentStoreOptions as _, type StoryTargetRejection as a, type TreeStoryRef as a0, type TransactResult as a1, type TransactionContext as a2, allocateDrawingPropertyId as a3, allocateNoteId as a4, applyFragmentPaste as a5, applyHeaderFooterLifecycleOp as a6, applyNoteLifecycleOp as a7, atomicNoteSpansOf as a8, cascadeDeletedNoteReferences as a9, notesOf as aA, notesPartHasId as aB, observeHistoryGroup as aC, parseNoteId as aD, parseNoteScopeId as aE, resolveHeaderFooterParts as aF, resolveHeaderFooterPartsBySection as aG, resolveHeaderFooterResolutionBySection as aH, resolveNotesPart as aI, withBinaryPart as aJ, withEmbeddedImage as aK, withoutUnreferencedImagePart as aL, collectNoteReferences as aa, collectPackageNoteReferences as ab, collectSectionPropertyNodes as ac, createNoteReferenceScanBudget as ad, customMarkFollows as ae, diagnoseNoteReferences as af, findNoteById as ag, formatNoteScopeId as ah, isContinuationSeparatorNode as ai, isEndnotesNode as aj, isFootnotesNode as ak, isHeaderFooterLifecycleOp as al, isNormalNote as am, isNoteAtomNode as an, isNoteLifecycleOp as ao, isNoteNode as ap, isNoteRefNode as aq, isNoteReferenceNode as ar, isSeparatorNode as as, normalNoteIds as at, noteAtomText as au, noteIdOf as av, noteKindOf as aw, noteRefKindOf as ax, noteReferenceKindOf as ay, noteTypeOf as az, type HistoryGroup as b, type TreeModelChange as c, type HeaderFooterParts as d, type HeaderFooterSectionResolution as e, TreeDocumentStore as f, type SelectionMark as g, type TransactOptions as h, type ImageIntentResult as i, type FragmentPasteResult as j, type AtomicNoteSpan as k, type DrawingPropertyIdResult as l, type HeaderFooterKind as m, type HeaderFooterLifecycleImpact as n, type HeaderFooterLifecycleOp as o, type HeaderFooterLifecycleRejection as p, type HeaderFooterLifecycleResult as q, reportHistoryGroup as r, type HeaderFooterSlotMeta as s, type HistoryCaptureKind as t, MAX_NOTES_PER_PART as u, MAX_NOTE_REFERENCE_PARTS as v, MAX_NOTE_REFERENCE_SCAN as w, NOTE_ATOM_CHAR as x, NOTE_CONTINUATION_SEPARATOR_ID as y, NOTE_ID_MAX as z };
@@ -1,11 +1,11 @@
1
- import { S as StoryScope, f as SelectionMark, g as TransactOptions, a as StoryTargetRejection, b as TreeModelChange, c as HeaderFooterParts, d as HeaderFooterSectionResolution, I as InsertImageInput, h as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, i as FragmentPasteResult } from './note-lifecycle-D4AOFCAt.js';
2
- import { W as TreeDocOp, O as OoxmlPart, i as OoxmlNode, j as OoxmlPackage, a1 as OoxmlElement, a as ReviewItem, as as RevisionAttributionInput } from './types-barrel-CEOy-Jv0.js';
3
- import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-C51LuAAu.js';
4
- import { D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, a as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind } from './custom-node-writes-piokwVR5.js';
5
- import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-DHKMN_3Y.js';
1
+ import { S as StoryScope, g as SelectionMark, h as TransactOptions, a as StoryTargetRejection, c as TreeModelChange, d as HeaderFooterParts, e as HeaderFooterSectionResolution, I as InsertImageInput, i as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, j as FragmentPasteResult } from './tree-package-fragment-CwJDixNs.js';
2
+ import { W as TreeDocOp, O as OoxmlPart, i as OoxmlNode, j as OoxmlPackage, a1 as OoxmlElement, a as ReviewItem, as as RevisionAttributionInput } from './types-barrel-DLB11iSY.js';
3
+ import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-C4ilLzog.js';
4
+ import { D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, a as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind } from './custom-node-writes-05qS32px.js';
5
+ import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-B7nAiR7P.js';
6
6
  import { Node } from 'prosemirror-model';
7
7
  import { CollaborationDocumentPort } from './collaboration/replication.js';
8
- import { V as ViewScope } from './editor-scope-DZJT4ukT.js';
8
+ import { V as ViewScope } from './editor-scope-OHPwVQ5l.js';
9
9
 
10
10
  /**
11
11
  * Why an edited projection could not be mapped back into tree ops.
@@ -254,8 +254,8 @@ interface TreeApplyResult {
254
254
  /** Present when the edit was refused, so a host can report WHY rather than a silent no-op. */
255
255
  readonly reason?: TreeBindingRejection | StoryTargetRejection | string;
256
256
  }
257
- /** Optional collaboration attribution for a direct tree-op transaction. */
258
- type TreeApplyOptions = Pick<TransactOptions, 'origin' | 'actorId' | 'operationId' | 'recordsHistory'> & {
257
+ /** Optional collaboration attribution and history grouping for a direct tree-op transaction. */
258
+ type TreeApplyOptions = Pick<TransactOptions, 'origin' | 'actorId' | 'operationId' | 'recordsHistory' | 'historyGroup'> & {
259
259
  /** Package resources committed in the same transaction as the tree operations. */
260
260
  readonly packageEdits?: readonly ((pkg: OoxmlPackage) => OoxmlPackage)[];
261
261
  };