@docx-editor.dev/core 2.28.0 → 2.30.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 (109) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.ts +65 -13
  3. package/dist/automation.js +1 -1
  4. package/dist/binding.cjs +1 -1
  5. package/dist/binding.d.ts +54 -38
  6. package/dist/binding.js +1 -1
  7. package/dist/{index-Bsg7oIKP.d.ts → chrome-print-BM3Js-6X.d.ts} +281 -222
  8. package/dist/{chunk-Z6WBFXJU.js → chunk-2PV5L5NJ.js} +3 -3
  9. package/dist/chunk-4HENIAFG.js +1 -0
  10. package/dist/chunk-5OTS2EJ7.js +7 -0
  11. package/dist/chunk-5P4223J4.cjs +27 -0
  12. package/dist/{chunk-O2AL2HSJ.cjs → chunk-5RRAZMBU.cjs} +1 -1
  13. package/dist/chunk-5SPITS5F.js +18 -0
  14. package/dist/{chunk-VDNNLG6X.js → chunk-7ATNKARV.js} +1 -1
  15. package/dist/{chunk-SRPILEWV.cjs → chunk-BGCUTKWE.cjs} +5 -5
  16. package/dist/chunk-EBCXSH2W.js +3 -0
  17. package/dist/{chunk-K5U2PLDP.cjs → chunk-ERECKTIR.cjs} +1 -1
  18. package/dist/{chunk-QMLCVPCD.cjs → chunk-FLBEJC6X.cjs} +1 -1
  19. package/dist/{chunk-6AWEKBLB.cjs → chunk-HYASLE2G.cjs} +1 -1
  20. package/dist/chunk-JC47NRJC.cjs +3 -0
  21. package/dist/{chunk-ZUHOMK52.cjs → chunk-KJRTNY2Q.cjs} +1 -1
  22. package/dist/chunk-NKPUH3QJ.js +1 -0
  23. package/dist/chunk-PF5NJWS3.js +2 -0
  24. package/dist/chunk-PWTRJSES.cjs +18 -0
  25. package/dist/chunk-QFKGI242.cjs +30 -0
  26. package/dist/{chunk-5CSUYANV.js → chunk-RJCQGJR7.js} +1 -1
  27. package/dist/chunk-RPPV4S6T.cjs +4 -0
  28. package/dist/{chunk-TSLBZ26X.js → chunk-T32MGBJS.js} +1 -1
  29. package/dist/chunk-UM26GH5B.js +30 -0
  30. package/dist/chunk-V3N4SOAK.cjs +1 -0
  31. package/dist/chunk-VRCZBFLH.js +27 -0
  32. package/dist/{chunk-2GO5T2JU.cjs → chunk-WF7JZ755.cjs} +1 -1
  33. package/dist/chunk-WK5X2MMA.cjs +7 -0
  34. package/dist/{chunk-E7BQA6UP.js → chunk-WPDD2Y32.js} +1 -1
  35. package/dist/chunk-YBMWBXST.cjs +2 -0
  36. package/dist/{chunk-ETTO6GK3.js → chunk-YZGUBCHP.js} +1 -1
  37. package/dist/chunk-ZOS2PM4A.js +4 -0
  38. package/dist/collaboration/replication.cjs +1 -1
  39. package/dist/collaboration/replication.d.ts +5 -5
  40. package/dist/collaboration/replication.js +1 -1
  41. package/dist/collaboration.d.ts +4 -4
  42. package/dist/contracts/document.d.ts +3 -3
  43. package/dist/contracts/editor.d.ts +9 -10
  44. package/dist/contracts/interaction.d.ts +2 -2
  45. package/dist/contracts/modules.cjs +1 -1
  46. package/dist/contracts/modules.d.ts +33 -9
  47. package/dist/contracts/modules.js +1 -1
  48. package/dist/contracts/types.d.ts +2 -2
  49. package/dist/{custom-node-writes-cvL5rhcD.d.ts → custom-node-writes-0v0Kgw1T.d.ts} +2 -2
  50. package/dist/diagnostic-context-CcAO4q1s.d.ts +30 -0
  51. package/dist/diagnostic-hints-2Bke6H_w.d.ts +120 -0
  52. package/dist/{document-protection-BAGVGqaP.d.ts → document-protection-8eyMWIJ0.d.ts} +2 -2
  53. package/dist/{editor-Ci7IZGmG.d.ts → editor-DaEJd2so.d.ts} +460 -9
  54. package/dist/{editor-scope-OHPwVQ5l.d.ts → editor-scope-7o9xweiJ.d.ts} +1 -1
  55. package/dist/editor.cjs +1 -1
  56. package/dist/editor.d.ts +55 -33
  57. package/dist/editor.js +1 -1
  58. package/dist/export.cjs +2 -2
  59. package/dist/export.d.ts +17 -15
  60. package/dist/export.js +2 -2
  61. package/dist/{font-resolver-BVQB14qT.d.ts → font-resolver-CL9BVKZo.d.ts} +3 -3
  62. package/dist/font-shaping-policy-BvpkrfxM.d.ts +7 -0
  63. package/dist/{headless-document-view-qH331moE.d.ts → headless-document-view-DZQN8Bnx.d.ts} +2 -2
  64. package/dist/{image-resources-BN-hUgCn.d.ts → image-resources-Bipz8toD.d.ts} +2 -2
  65. package/dist/index.cjs +1 -1
  66. package/dist/index.d.ts +67 -21
  67. package/dist/index.js +1 -1
  68. package/dist/{layout-shaping-BEyuiQOk.d.ts → layout-shaping-cEnVrhWg.d.ts} +3 -2
  69. package/dist/layout.cjs +1 -1
  70. package/dist/layout.d.ts +42 -42
  71. package/dist/layout.js +1 -1
  72. package/dist/{note-properties-4Y9o6Gyk.d.ts → note-properties-9FH8zAeG.d.ts} +3 -3
  73. package/dist/{omml-equation-CuzBL5DD.d.ts → omml-equation-DP2WpUbK.d.ts} +13 -1
  74. package/dist/output.cjs +1 -1
  75. package/dist/output.d.ts +8 -9
  76. package/dist/output.js +1 -1
  77. package/dist/{protocol-Bqk4Izjc.d.ts → protocol-CZ1uUlPO.d.ts} +2 -2
  78. package/dist/{review-paragraph-order-DT-n6ouC.d.ts → review-paragraph-order-CqVelc5A.d.ts} +1 -1
  79. package/dist/{semantic-cell-selection-D9D1KSXq.d.ts → semantic-cell-selection-Dr9yxFZt.d.ts} +4 -211
  80. package/dist/{semantic-interaction-CIC-PooQ.d.ts → semantic-interaction-Dc3pf3hr.d.ts} +1 -1
  81. package/dist/{semantic-paint-BME37OMv.d.ts → semantic-paint-Bz3FBAoH.d.ts} +17 -5
  82. package/dist/{semantic-record-queries-CBlZqZNa.d.ts → semantic-record-queries-Bx0pl6kL.d.ts} +1 -1
  83. package/dist/{semantic-records-4B3WwFAi.d.ts → semantic-records-CjcF26ZL.d.ts} +892 -416
  84. package/dist/store.cjs +1 -1
  85. package/dist/store.d.ts +1463 -1574
  86. package/dist/store.js +1 -1
  87. package/dist/{tree-package-fragment-BeeKxDw8.d.ts → tree-package-store-DKhdEVym.d.ts} +238 -84
  88. package/dist/{tree-session-contract-CVbmlMlq.d.ts → tree-session-contract-CwnTEVLF.d.ts} +8 -6
  89. package/dist/{types-barrel-D3xCgQX6.d.ts → types-barrel-CA0xB8kH.d.ts} +548 -527
  90. package/package.json +3 -3
  91. package/dist/chunk-2RC2EPND.js +0 -3
  92. package/dist/chunk-4GBTELJV.cjs +0 -28
  93. package/dist/chunk-4R3TEXMN.js +0 -18
  94. package/dist/chunk-6APGXLBB.cjs +0 -3
  95. package/dist/chunk-6EYYL7FL.js +0 -1
  96. package/dist/chunk-EO4C5QJW.cjs +0 -2
  97. package/dist/chunk-FIJZIQXA.cjs +0 -18
  98. package/dist/chunk-FRXAOVTB.js +0 -28
  99. package/dist/chunk-J6BVWIDB.js +0 -2
  100. package/dist/chunk-JGNVNT2A.cjs +0 -2
  101. package/dist/chunk-KKIJG3C6.js +0 -2
  102. package/dist/chunk-LWDSDCMO.js +0 -27
  103. package/dist/chunk-NBCVVZOM.cjs +0 -1
  104. package/dist/chunk-O5INAWZQ.js +0 -1
  105. package/dist/chunk-RCHS4ZEH.cjs +0 -27
  106. package/dist/chunk-VHAVHCQY.js +0 -7
  107. package/dist/chunk-VX43VBAX.cjs +0 -7
  108. package/dist/review-pane-D9jm8DcY.d.ts +0 -128
  109. package/dist/revision-projection-DZ4kKVev.d.ts +0 -242
package/dist/store.js CHANGED
@@ -1 +1 @@
1
- export{j as Budget,i as BudgetError,A as COMPARATORS,l as CancellationController,k as CancellationError,S as DEFAULT_MAX_EDITABLE_STORY_PARTS,o as DeterministicClock,v as DeterministicMemoryMeter,a as ID_KINDS,t as LIMIT_KEYS,s as LIMIT_SPECS,ga as MAX_CUSTOM_NODE_LABEL_LENGTH,fa as MAX_CUSTOM_NODE_PAYLOAD_LENGTH,P as MAX_FRAGMENT_DECODED_BYTES,n as PortRegistry,m as PortResolutionError,g as RegistryError,pa as SEARCH_MATCH_LIMIT,oa as SEARCH_QUERY_MAX,p as SequentialIdentity,R as TreeDocumentStore,T as TreePackageStore,Z as addComment,ca as addPackageComment,Q as applyFragmentPaste,w as assertLimitInvariants,c as assertValidId,q as beginOperation,x as canonicalize,aa as commentPartNameOf,ba as commentsExtendedPartNameOf,B as compareArtifacts,e as compareSemVer,ka as customNodePayloadsByControl,la as customNodePayloadsOf,ea as deletePackageComments,r as endOperation,N as extractFragmentPackage,ta as findOccurrences,C as fingerprint,qa as foldCase,$ as hasCommentPart,F as hashAuthored,Ca as headlessViewOfStore,ha as insertCustomNodeWrite,ma as insertPackageCustomNode,sa as isSearchableQuery,b as isValidId,ra as isWholeWord,u as makeLimitCounter,ua as materializeGlossaryPlaceholders,O as mergeFragmentIntoPackage,Y as nextCommentId,Ba as openHeadlessDocument,d as parseSemVer,va as planRevisionBatch,ia as removeCustomNodeWrite,na as removePackageCustomNode,E as replayFixture,h as resolve,f as satisfies,_ as setCommentResolved,da as setPackageCommentResolved,y as stableHash,ja as sweepCustomNodePayloads,D as validateFixture}from'./chunk-J6BVWIDB.js';export{xh as ACCEPTED_PARAGRAPH_PROPERTIES,wh as ACCEPTED_RUN_PROPERTIES,m as ALL_FROZEN_IDS,yh as AUTHORABLE_PARAGRAPH_PROPERTIES,zh as AUTHORABLE_RUN_PROPERTIES,u as BoundedCounter,h as CANONICAL_MUTATION_ORIGINS,Pb as CONTENT_CONTROL_ID_MAX,fc as CONTENT_CONTROL_PROPERTY_ORDER,Ei as CUSTOM_NODE_XPATH_PREFIX,oi as CUSTOM_XML_PROPS_REL,pi as CUSTOM_XML_PROPS_TYPE,ni as CUSTOM_XML_REL,L as DANGEROUS_KEYS,qi as DATASTORE_NAMESPACE_URI,Pg as DEFAULT_ENDNOTE_PROPERTIES,Og as DEFAULT_FOOTNOTE_PROPERTIES,th as DEFAULT_FORMATTING_DISPLAY_MODE,r as DEFAULT_IMAGE_RESOURCE_LIMITS,o as DEFAULT_LIMITS,Se as DEFAULT_OMML_LIMITS,Be as DEFAULT_OOXML_PACKAGE_LIMITS,ii as DEFAULT_VIEW_SETTINGS,Qd as DEFAULT_ZIP_LIMITS,l as DEPENDENCY_KEY_IDS,M as DangerousKeyError,nf as FIELD_ATOM_CHAR,n as HARD_CEILINGS,xd as HYPERLINK_RELATIONSHIP_TYPE,H as IMAGE_RELATIONSHIP_TYPE,q as IMAGE_RESOURCE_HARD_CEILINGS,Ed as IMAGE_WRAP_TARGETS,X as INERT_EXECUTABLE_KINDS,t as LimitExceededError,Ob as MAX_CONTENT_CONTROLS_PER_PART,Nb as MAX_CONTENT_CONTROL_NESTING,Hc as MAX_NOTES_PER_PART,ah as MAX_NOTE_REFERENCE_PARTS,$g as MAX_NOTE_REFERENCE_SCAN,Mc as MAX_STORY_SDT_NESTING,be as MAX_SVG_SNIFF_BYTES,i as NON_CANONICAL_ORIGINS,ic as NOTE_ATOM_CHAR,mc as NOTE_CONTINUATION_SEPARATOR_ID,kc as NOTE_ID_MAX,jc as NOTE_ID_MIN,lc as NOTE_SEPARATOR_ID,Kg as NO_DOCUMENT_PROTECTION,gi as NO_TRACKING_SETTINGS,Re as OFFICE_MATH_NAMESPACE_URI,wd as OFFICE_RELATIONSHIP_NAMESPACE_URI,Ha as OOXML_NODE_IDENTITY_RULES,g as ORIGIN_IDS,mb as PAGE_BREAK_CHAR,ha as PrefixAllocator,j as RESULT_IDS,k as RUNTIME_PORT_IDS,Ck as TABLE_BORDER_STYLES,pg as TOC_LEVEL_INDENT_TWIPS,Mf as TOC_MAX_BOOKMARKS_PER_REFRESH,Lf as TOC_MAX_ENTRIES,Nf as TOC_MAX_FIELD_NESTING,Kf as TOC_MAX_INSTRUCTION_CHARS,Of as TOC_MAX_PAGE_PASSES,vh as TREE_DOC_OP_KINDS,id as TWIPS_PER_POINT,Yh as W15_NAMESPACE_URI,la as WML_NAMESPACE_URI,na as XMLNS_NAMESPACE_URI,ma as XML_NAMESPACE_URI,hc as allocateContentControlId,pe as allocateDrawingPropertyId,Ic as allocateNoteId,$a as applyEdits,Ng as applyHeaderFooterLifecycleOp,Uh as applyNoteLifecycleOp,el as applyTreeOp,y as asciiFold,ga as assertValidQName,If as atomicFieldSpansOf,Gc as atomicNoteSpansOf,Gg as authorableHyperlinkTarget,Vg as authoredDocumentEndnoteProperties,Ug as authoredDocumentFootnoteProperties,Sg as authoredEndnotePropertiesFromSectPr,Rg as authoredFootnotePropertiesFromSectPr,Ch as authoredProperties,Qc as bodyStoryRoot,vg as bookmarkPairNodes,Ii as boundCustomXmlNodeIdOf,Gi as boundCustomXmlNodeIds,Hi as boundCustomXmlNodeIdsInPackage,og as buildBookmarkIndex,F as buildContentTypeIndex,I as buildRelationshipSet,sg as buildTocContentControl,rg as buildTocEntryParagraph,Eg as buildingBlockGalleryOf,Fg as buildingBlocksForControl,Dg as buildingBlocksOf,Ca as canonicalOoxmlFingerprint,Vh as cascadeDeletedNoteReferences,fi as cascadeEmptiedComments,ca as childElements,Yc as collectFlowBlocks,Qa as collectNodeIds,dh as collectNoteReferences,fh as collectPackageNoteReferences,gk as collectReviewItems,Zj as collectRevisionSites,cf as collectSectionPropertyNodes,Sc as collectStoryParagraphs,Zh as commentAnchorsOfStory,Lj as commentBodyText,Nj as commentInitials,fk as commentItemsOf,$h as commentsOfPart,W as containsCssFetch,Tb as contentControlContentChildren,Xb as contentControlContentNodeOf,Wc as contentControlContentOf,Wb as contentControlEndPropertiesNodeOf,_b as contentControlLevelOf,Vb as contentControlPropertiesNodeOf,Zb as contentControlPropertiesOf,bc as contentControlTextOf,$b as contentControlsIn,Ge as contentTypesPartBytes,me as createImageResourceCache,Ra as createNodeIdAllocator,bh as createNoteReferenceScanBudget,Dc as customMarkFollows,Fi as customNodeBinding,ti as customXmlDataParts,Ci as customXmlLabelXPath,xi as customXmlNodes,Di as customXmlPrefixMappings,ri as datastoreItemIdFor,lj as deepParagraphOrderOfPart,ci as deleteCommentThread,hf as deobfuscateFont,cd as deriveOoxmlIndexes,Rf as detectBodyTocs,A as detectDuplicateNames,gh as diagnoseNoteReferences,zg as diffSemanticDigests,xg as digestPart,Eh as directParagraphMarkProperties,Dh as directParagraphProperties,$e as displayMathAlignment,Qk as drawingOpImpact,Hg as ensureHyperlinkRelationship,Ag as ensureListDefinition,Bg as ensureNumberingLevel,Ve as equationExpressionToLinearMath,Ze as equationsOfAtom,V as escapeCssString,R as escapeXml,E as extensionKey,zf as fieldAtomText,yf as fieldOnOffAttribute,ac as findContentControl,ui as findCustomXmlDataPart,Sf as findDetectedToc,ba as findElement,Ta as findNode,Lc as findNoteById,zj as firstReviewRange,Ub as flattenContentControls,of as fldCharType,xf as fldSimpleInstr,xb as fnv1a32,oc as formatNoteScopeId,Ih as formatOwnedRunIds,Rh as formattableRanges,pj as formsProtectionEnabled,Cg as glossaryPartOf,qb as hardBreakAttributes,nb as hardBreakKind,pb as hardBreakText,bi as hasAnyComment,ce as hasBoundedSvgRoot,Bf as hasLegacyFormFieldData,Sa as hasNode,zd as hyperlinkAnchorOf,Ad as hyperlinkRelationshipIdOf,Bd as hyperlinkTargetOf,ke as imageResourceLookupFor,ad as indexStyles,mg as inlineControlEndingAt,ng as inlineControlStartingAt,Ya as insertChildren,wf as instrTextValue,Ah as isAuthorableRunProperty,Uc as isContentControl,Vc as isContentControlContent,Rb as isContentControlContentNode,Qb as isContentControlNode,Sb as isContentControlWrapper,va as isContentRevisionKind,wc as isContinuationSeparatorNode,N as isDangerousKey,Vk as isDrawingTreeDocOp,rc as isEndnotesNode,Z as isEvaluableField,Af as isFieldChrome,sf as isFldChar,pf as isFldCharNode,vf as isFldSimple,rf as isFldSimpleNode,qc as isFootnotesNode,Mg as isHeaderFooterLifecycleOp,yd as isHyperlinkNode,Y as isInertExecutable,tf as isInstrText,qf as isInstrTextNode,Yg as isLegalEndnotePosition,Jf as isLegalFldCharType,Zg as isLegalFootnotePosition,_g as isLegalNumRestart,Ac as isNormalNote,Fc as isNoteAtomNode,Th as isNoteLifecycleOp,sc as isNoteNode,uc as isNoteRefNode,tc as isNoteReferenceNode,Xe as isOmmlDisplay,Ye as isOmmlEquationAtom,ob as isPageBreakNode,za as isRangeMarkerKind,vc as isSeparatorNode,Pc as isStoryPart,D as isValidMime,ea as isValidNCName,vb as isValidParaId,fa as isValidQName,jj as legacyCheckboxFieldsOf,We as linearMathToOmml,ik as linkRevisionReplies,je as liveDrawingReferenceCount,ck as locateSites,dc as lockForbidsEdit,ec as lockForbidsRemoval,Gh as mergedFontProperty,Jh as mergedMultiSettingProperty,Kh as mergedParagraphMarkProperties,Fh as mergedProperties,yb as mintParaId,Cb as mintedParagraphIdentityAttributes,ih as normalNoteIds,Eb as normalizeParagraphIdentity,w as normalizePartName,Ec as noteAtomText,yc as noteIdOf,xc as noteKindOf,Cc as noteRefKindOf,Bc as noteReferenceKindOf,zc as noteTypeOf,Jc as notesOf,hh as notesPartHasId,O as nullRecord,gl as observeHistoryGroup,Da as ooxmlTreesEqual,gc as orderedContentControlProperties,wb as paraIdOf,jg as paragraphOffsetIndex,kj as paragraphOrderOfPart,Vi as paragraphTextOf,Ua as parentNodeOf,Qg as parseAuthoredNoteProperties,Yb as parseContentControlId,Ue as parseLinearMath,nc as parseNoteId,pc as parseNoteScopeId,Pf as parseTocInstruction,z as partNameKey,kk as planRevisionAuthorChange,ug as planTocEntries,kd as points,md as pointsToTwips,Nd as projectDrawing,af as projectOmmlAtom,_e as projectOmmlDisplay,Te as projectOmmlEquation,Bh as propertyContainer,yi as readCustomXmlNode,Lg as readDocumentProtection,if as readEmbeddedFonts,Aa as readOnOffChild,Ce as readOoxmlPackage,Ia as readOoxmlPart,hi as readTrackingSettings,nd as readTwipsMeasure,ji as readViewSettings,aa as readXml,Rd as readZip,Ig as relationshipTargetIn,He as relationshipsOf,Je as relsPartNameFor,_a as removeNode,Xa as replaceChildren,Za as replaceNode,hl as reportHistoryGroup,cc as resolveContentControlLock,G as resolveContentType,Ie as resolveContentTypeOf,Xg as resolveEndnoteProperties,Wg as resolveFootnoteProperties,gf as resolveHeaderFooterParts,ff as resolveHeaderFooterPartsBySection,ef as resolveHeaderFooterResolutionBySection,K as resolveImageRelationship,s as resolveImageResourceLimits,B as resolveInternalTarget,p as resolveLimits,ch as resolveNotesPart,J as resolveRelationship,wg as resolveTocRowHeadings,xj as reviewItemKey,yj as reviewItemRanges,ek as revisionItemsOf,Hh as runAddressRanges,Ph as runPropertyEdits,Sh as runsCovering,Q as sanitizeHref,_ as scrubExport,qj as sectionProtectsForms,hg as segmentsOf,yg as semanticDigest,Ba as serializeOoxmlPart,Tg as settingsPartOf,de as sniffImageMime,Rc as storyParagraphs,Oc as storyRootsOf,bd as stylesPartOf,da as textContent,hj as textFormFieldsOf,mi as textboxStoriesInPart,ai as threadStateOfPart,P as toSafeRecord,tg as tocEntryText,qg as tocLeftIndentTwips,jd as twips,ld as twipsToPoints,zb as usedParaIds,Rk as validateDrawingOp,C as validateExternalTarget,fe as validateGifHeader,ge as validateJpegHeader,Fa as validateOoxmlPart,Qe as validatePackageInvariants,ee as validatePngHeader,ie as validateRasterHeader,Wk as validateTreeOp,Ab as w14RootPrefix,_c as walkAllStoryParagraphs,$c as walkParagraphInline,Zc as walkStoryBlocks,se as withBinaryPart,Ke as withContentTypeOverride,vi as withCustomXmlDataPart,zi as withCustomXmlNode,te as withEmbeddedImage,Ji as withExportedCustomNodes,Pe as withNewPart,Fe as withPart,Oe as withRelationship,wi as withoutCustomXmlDataPart,Ai as withoutCustomXmlNode,Bi as withoutOrphanCustomXmlNodes,ye as withoutUnreferencedImagePart,Uk as wrapTargetToAnchorSpec,Ee as writeOoxmlPackage,Sd as writeZip}from'./chunk-4R3TEXMN.js';
1
+ export{j as Budget,i as BudgetError,A as COMPARATORS,l as CancellationController,k as CancellationError,S as DEFAULT_MAX_EDITABLE_STORY_PARTS,o as DeterministicClock,v as DeterministicMemoryMeter,a as ID_KINDS,t as LIMIT_KEYS,s as LIMIT_SPECS,ga as MAX_CUSTOM_NODE_LABEL_LENGTH,fa as MAX_CUSTOM_NODE_PAYLOAD_LENGTH,P as MAX_FRAGMENT_DECODED_BYTES,n as PortRegistry,m as PortResolutionError,g as RegistryError,pa as SEARCH_MATCH_LIMIT,oa as SEARCH_QUERY_MAX,p as SequentialIdentity,R as TreeDocumentStore,T as TreePackageStore,Z as addComment,ca as addPackageComment,Q as applyFragmentPaste,w as assertLimitInvariants,c as assertValidId,q as beginOperation,x as canonicalize,aa as commentPartNameOf,ba as commentsExtendedPartNameOf,B as compareArtifacts,e as compareSemVer,ka as customNodePayloadsByControl,la as customNodePayloadsOf,ea as deletePackageComments,r as endOperation,N as extractFragmentPackage,ta as findOccurrences,C as fingerprint,qa as foldCase,$ as hasCommentPart,F as hashAuthored,Da as headlessViewOfStore,ha as insertCustomNodeWrite,ma as insertPackageCustomNode,sa as isSearchableQuery,b as isValidId,ra as isWholeWord,u as makeLimitCounter,ua as materializeGlossaryPlaceholders,O as mergeFragmentIntoPackage,Y as nextCommentId,Ca as openHeadlessDocument,d as parseSemVer,va as planRevisionBatch,ia as removeCustomNodeWrite,na as removePackageCustomNode,E as replayFixture,h as resolve,f as satisfies,_ as setCommentResolved,da as setPackageCommentResolved,y as stableHash,ja as sweepCustomNodePayloads,D as validateFixture}from'./chunk-PF5NJWS3.js';export{xh as ACCEPTED_PARAGRAPH_PROPERTIES,wh as ACCEPTED_RUN_PROPERTIES,m as ALL_FROZEN_IDS,yh as AUTHORABLE_PARAGRAPH_PROPERTIES,zh as AUTHORABLE_RUN_PROPERTIES,u as BoundedCounter,h as CANONICAL_MUTATION_ORIGINS,Pb as CONTENT_CONTROL_ID_MAX,fc as CONTENT_CONTROL_PROPERTY_ORDER,Ei as CUSTOM_NODE_XPATH_PREFIX,oi as CUSTOM_XML_PROPS_REL,pi as CUSTOM_XML_PROPS_TYPE,ni as CUSTOM_XML_REL,L as DANGEROUS_KEYS,qi as DATASTORE_NAMESPACE_URI,Pg as DEFAULT_ENDNOTE_PROPERTIES,Og as DEFAULT_FOOTNOTE_PROPERTIES,th as DEFAULT_FORMATTING_DISPLAY_MODE,r as DEFAULT_IMAGE_RESOURCE_LIMITS,o as DEFAULT_LIMITS,Se as DEFAULT_OMML_LIMITS,Be as DEFAULT_OOXML_PACKAGE_LIMITS,ii as DEFAULT_VIEW_SETTINGS,Qd as DEFAULT_ZIP_LIMITS,l as DEPENDENCY_KEY_IDS,M as DangerousKeyError,nf as FIELD_ATOM_CHAR,n as HARD_CEILINGS,xd as HYPERLINK_RELATIONSHIP_TYPE,H as IMAGE_RELATIONSHIP_TYPE,q as IMAGE_RESOURCE_HARD_CEILINGS,Ed as IMAGE_WRAP_TARGETS,X as INERT_EXECUTABLE_KINDS,t as LimitExceededError,Ob as MAX_CONTENT_CONTROLS_PER_PART,Nb as MAX_CONTENT_CONTROL_NESTING,Hc as MAX_NOTES_PER_PART,ah as MAX_NOTE_REFERENCE_PARTS,$g as MAX_NOTE_REFERENCE_SCAN,Mc as MAX_STORY_SDT_NESTING,be as MAX_SVG_SNIFF_BYTES,i as NON_CANONICAL_ORIGINS,ic as NOTE_ATOM_CHAR,mc as NOTE_CONTINUATION_SEPARATOR_ID,kc as NOTE_ID_MAX,jc as NOTE_ID_MIN,lc as NOTE_SEPARATOR_ID,Kg as NO_DOCUMENT_PROTECTION,gi as NO_TRACKING_SETTINGS,Re as OFFICE_MATH_NAMESPACE_URI,wd as OFFICE_RELATIONSHIP_NAMESPACE_URI,Ha as OOXML_NODE_IDENTITY_RULES,g as ORIGIN_IDS,mb as PAGE_BREAK_CHAR,ha as PrefixAllocator,j as RESULT_IDS,k as RUNTIME_PORT_IDS,Ek as TABLE_BORDER_STYLES,pg as TOC_LEVEL_INDENT_TWIPS,Mf as TOC_MAX_BOOKMARKS_PER_REFRESH,Lf as TOC_MAX_ENTRIES,Nf as TOC_MAX_FIELD_NESTING,Kf as TOC_MAX_INSTRUCTION_CHARS,Of as TOC_MAX_PAGE_PASSES,vh as TREE_DOC_OP_KINDS,id as TWIPS_PER_POINT,Yh as W15_NAMESPACE_URI,la as WML_NAMESPACE_URI,na as XMLNS_NAMESPACE_URI,ma as XML_NAMESPACE_URI,hc as allocateContentControlId,pe as allocateDrawingPropertyId,Ic as allocateNoteId,$a as applyEdits,Ng as applyHeaderFooterLifecycleOp,Uh as applyNoteLifecycleOp,gl as applyTreeOp,y as asciiFold,ga as assertValidQName,If as atomicFieldSpansOf,Gc as atomicNoteSpansOf,Gg as authorableHyperlinkTarget,Vg as authoredDocumentEndnoteProperties,Ug as authoredDocumentFootnoteProperties,Sg as authoredEndnotePropertiesFromSectPr,Rg as authoredFootnotePropertiesFromSectPr,Ch as authoredProperties,Qc as bodyStoryRoot,vg as bookmarkPairNodes,Ii as boundCustomXmlNodeIdOf,Gi as boundCustomXmlNodeIds,Hi as boundCustomXmlNodeIdsInPackage,og as buildBookmarkIndex,F as buildContentTypeIndex,I as buildRelationshipSet,sg as buildTocContentControl,rg as buildTocEntryParagraph,Eg as buildingBlockGalleryOf,Fg as buildingBlocksForControl,Dg as buildingBlocksOf,Ca as canonicalOoxmlFingerprint,Vh as cascadeDeletedNoteReferences,fi as cascadeEmptiedComments,ca as childElements,Yc as collectFlowBlocks,Qa as collectNodeIds,dh as collectNoteReferences,fh as collectPackageNoteReferences,ik as collectReviewItems,$j as collectRevisionSites,cf as collectSectionPropertyNodes,Sc as collectStoryParagraphs,Zh as commentAnchorsOfStory,Nj as commentBodyText,Pj as commentInitials,hk as commentItemsOf,$h as commentsOfPart,W as containsCssFetch,Tb as contentControlContentChildren,Xb as contentControlContentNodeOf,Wc as contentControlContentOf,Wb as contentControlEndPropertiesNodeOf,_b as contentControlLevelOf,Vb as contentControlPropertiesNodeOf,Zb as contentControlPropertiesOf,bc as contentControlTextOf,$b as contentControlsIn,Ge as contentTypesPartBytes,me as createImageResourceCache,Ra as createNodeIdAllocator,bh as createNoteReferenceScanBudget,Dc as customMarkFollows,Fi as customNodeBinding,ti as customXmlDataParts,Ci as customXmlLabelXPath,xi as customXmlNodes,Di as customXmlPrefixMappings,ri as datastoreItemIdFor,mj as deepParagraphOrderOfPart,ci as deleteCommentThread,hf as deobfuscateFont,cd as deriveOoxmlIndexes,Rf as detectBodyTocs,A as detectDuplicateNames,gh as diagnoseNoteReferences,zg as diffSemanticDigests,xg as digestPart,Eh as directParagraphMarkProperties,Dh as directParagraphProperties,$e as displayMathAlignment,Sk as drawingOpImpact,Hg as ensureHyperlinkRelationship,Ag as ensureListDefinition,Bg as ensureNumberingLevel,Ve as equationExpressionToLinearMath,Ze as equationsOfAtom,V as escapeCssString,R as escapeXml,E as extensionKey,zf as fieldAtomText,yf as fieldOnOffAttribute,ac as findContentControl,ui as findCustomXmlDataPart,Sf as findDetectedToc,ba as findElement,Ta as findNode,Lc as findNoteById,Aj as firstReviewRange,Ub as flattenContentControls,of as fldCharType,xf as fldSimpleInstr,xb as fnv1a32,oc as formatNoteScopeId,Ih as formatOwnedRunIds,Rh as formattableRanges,qj as formsProtectionEnabled,Cg as glossaryPartOf,qb as hardBreakAttributes,nb as hardBreakKind,pb as hardBreakText,bi as hasAnyComment,ce as hasBoundedSvgRoot,Bf as hasLegacyFormFieldData,Sa as hasNode,zd as hyperlinkAnchorOf,Ad as hyperlinkRelationshipIdOf,Bd as hyperlinkTargetOf,ke as imageResourceLookupFor,ad as indexStyles,mg as inlineControlEndingAt,ng as inlineControlStartingAt,Ya as insertChildren,wf as instrTextValue,Ah as isAuthorableRunProperty,Uc as isContentControl,Vc as isContentControlContent,Rb as isContentControlContentNode,Qb as isContentControlNode,Sb as isContentControlWrapper,va as isContentRevisionKind,wc as isContinuationSeparatorNode,N as isDangerousKey,Xk as isDrawingTreeDocOp,rc as isEndnotesNode,Z as isEvaluableField,Af as isFieldChrome,sf as isFldChar,pf as isFldCharNode,vf as isFldSimple,rf as isFldSimpleNode,qc as isFootnotesNode,Mg as isHeaderFooterLifecycleOp,yd as isHyperlinkNode,Y as isInertExecutable,tf as isInstrText,qf as isInstrTextNode,Yg as isLegalEndnotePosition,Jf as isLegalFldCharType,Zg as isLegalFootnotePosition,_g as isLegalNumRestart,Ac as isNormalNote,Fc as isNoteAtomNode,Th as isNoteLifecycleOp,sc as isNoteNode,uc as isNoteRefNode,tc as isNoteReferenceNode,Xe as isOmmlDisplay,Ye as isOmmlEquationAtom,ob as isPageBreakNode,za as isRangeMarkerKind,vc as isSeparatorNode,Pc as isStoryPart,D as isValidMime,ea as isValidNCName,vb as isValidParaId,fa as isValidQName,jj as legacyCheckboxFieldsOf,We as linearMathToOmml,kk as linkRevisionReplies,je as liveDrawingReferenceCount,ek as locateSites,dc as lockForbidsEdit,ec as lockForbidsRemoval,Gh as mergedFontProperty,Jh as mergedMultiSettingProperty,Kh as mergedParagraphMarkProperties,Fh as mergedProperties,yb as mintParaId,Cb as mintedParagraphIdentityAttributes,ih as normalNoteIds,Eb as normalizeParagraphIdentity,w as normalizePartName,Ec as noteAtomText,yc as noteIdOf,xc as noteKindOf,Cc as noteRefKindOf,Bc as noteReferenceKindOf,zc as noteTypeOf,Jc as notesOf,hh as notesPartHasId,O as nullRecord,il as observeHistoryGroup,Da as ooxmlTreesEqual,gc as orderedContentControlProperties,wb as paraIdOf,jg as paragraphOffsetIndex,lj as paragraphOrderOfPart,Vi as paragraphTextOf,Ua as parentNodeOf,Qg as parseAuthoredNoteProperties,Yb as parseContentControlId,Ue as parseLinearMath,nc as parseNoteId,pc as parseNoteScopeId,Pf as parseTocInstruction,z as partNameKey,mk as planRevisionAuthorChange,ug as planTocEntries,kd as points,md as pointsToTwips,Nd as projectDrawing,af as projectOmmlAtom,_e as projectOmmlDisplay,Te as projectOmmlEquation,Bh as propertyContainer,yi as readCustomXmlNode,Lg as readDocumentProtection,if as readEmbeddedFonts,Aa as readOnOffChild,Ce as readOoxmlPackage,Ia as readOoxmlPart,hi as readTrackingSettings,nd as readTwipsMeasure,ji as readViewSettings,aa as readXml,Rd as readZip,Ig as relationshipTargetIn,He as relationshipsOf,Je as relsPartNameFor,_a as removeNode,Xa as replaceChildren,Za as replaceNode,jl as reportHistoryGroup,cc as resolveContentControlLock,G as resolveContentType,Ie as resolveContentTypeOf,Xg as resolveEndnoteProperties,Wg as resolveFootnoteProperties,gf as resolveHeaderFooterParts,ff as resolveHeaderFooterPartsBySection,ef as resolveHeaderFooterResolutionBySection,K as resolveImageRelationship,s as resolveImageResourceLimits,B as resolveInternalTarget,p as resolveLimits,ch as resolveNotesPart,J as resolveRelationship,wg as resolveTocRowHeadings,yj as reviewItemKey,zj as reviewItemRanges,gk as revisionItemsOf,Hh as runAddressRanges,Ph as runPropertyEdits,Sh as runsCovering,Q as sanitizeHref,_ as scrubExport,rj as sectionProtectsForms,hg as segmentsOf,yg as semanticDigest,Ba as serializeOoxmlPart,Tg as settingsPartOf,de as sniffImageMime,Rc as storyParagraphs,Oc as storyRootsOf,bd as stylesPartOf,da as textContent,hj as textFormFieldsOf,mi as textboxStoriesInPart,ai as threadStateOfPart,P as toSafeRecord,tg as tocEntryText,qg as tocLeftIndentTwips,jd as twips,ld as twipsToPoints,zb as usedParaIds,Tk as validateDrawingOp,C as validateExternalTarget,fe as validateGifHeader,ge as validateJpegHeader,Fa as validateOoxmlPart,Qe as validatePackageInvariants,ee as validatePngHeader,ie as validateRasterHeader,Yk as validateTreeOp,Ab as w14RootPrefix,_c as walkAllStoryParagraphs,$c as walkParagraphInline,Zc as walkStoryBlocks,se as withBinaryPart,Ke as withContentTypeOverride,vi as withCustomXmlDataPart,zi as withCustomXmlNode,te as withEmbeddedImage,Ji as withExportedCustomNodes,Pe as withNewPart,Fe as withPart,Oe as withRelationship,wi as withoutCustomXmlDataPart,Ai as withoutCustomXmlNode,Bi as withoutOrphanCustomXmlNodes,ye as withoutUnreferencedImagePart,Wk as wrapTargetToAnchorSpec,Ee as writeOoxmlPackage,Sd as writeZip}from'./chunk-5SPITS5F.js';
@@ -1,5 +1,5 @@
1
- import { S as SupportedImageMime, a as ImageDecodePort } from './image-resources-BN-hUgCn.js';
2
- import { Q as OoxmlPackage, O as OoxmlPart, N as OoxmlNode, Z as OoxmlElement, ab as OoxmlParagraphNode, ac as OoxmlNoteNode, ad as OoxmlContinuationSeparatorNode, ae as OoxmlEndnotesNode, af as OoxmlFootnotesNode, ag as OoxmlNoteRefNode, ah as OoxmlNoteReferenceNode, ai as OoxmlSeparatorNode, aa as RevisionAttributionInput, aj as DrawingTreeDocOp, ak as ImpactClass, W as TreeDocOp, a8 as TreeOpRejection } from './types-barrel-D3xCgQX6.js';
1
+ import { S as SupportedImageMime, c as ImageDecodePort } from './image-resources-Bipz8toD.js';
2
+ import { O as OoxmlPart, ay as OoxmlInvariantIssue, N as OoxmlNode, ah as OoxmlElement, Q as OoxmlPackage, ax as RevisionAttributionInput, az as DrawingTreeDocOp, aA as OoxmlParagraphNode, aB as OoxmlNoteNode, aC as OoxmlContinuationSeparatorNode, aD as OoxmlEndnotesNode, aE as OoxmlFootnotesNode, aF as OoxmlNoteRefNode, aG as OoxmlNoteReferenceNode, aH as OoxmlSeparatorNode, aI as ImpactClass, ag as TreeDocOp, av as TreeOpRejection } from './types-barrel-CA0xB8kH.js';
3
3
 
4
4
  /**
5
5
  * How saved field results are addressed.
@@ -12,6 +12,142 @@ import { Q as OoxmlPackage, O as OoxmlPart, N as OoxmlNode, Z as OoxmlElement, a
12
12
  */
13
13
  type FieldResultsMode = 'atomic' | 'editable';
14
14
 
15
+ /** An edited part, or the invariant violations that rejected the edit. */
16
+ type OoxmlEditResult = {
17
+ readonly ok: true;
18
+ readonly part: OoxmlPart;
19
+ } | {
20
+ readonly ok: false;
21
+ readonly issues: readonly OoxmlInvariantIssue[];
22
+ };
23
+ /**
24
+ * An opt-in relaxation of `ST_Lock` for hosts that protect WHAT a control says, not how it looks.
25
+ *
26
+ * ECMA-376 `contentLocked` forbids editing the control's contents and Word reads formatting as
27
+ * part of that, which is the default here. A host that puts protected text in a control (a
28
+ * template placeholder the user must not retype) but lets authors style it sets
29
+ * `allowFormattingInLockedContent`: a run-property write (bold, colour, font, size, highlight …),
30
+ * on runs or on a paragraph mark, then passes the CONTENT half of the lock. The exception never
31
+ * admits a property that hides text (`w:vanish`, `w:specVanish`, `w:webHidden`), which the
32
+ * run-property vocabulary refuses today anyway. Text edits, deletion of the content, paragraph properties,
33
+ * removal of a `sdtLocked` wrapper and `w:dataBinding` refusals are unchanged.
34
+ *
35
+ * @public
36
+ */
37
+ interface ContentLockPolicy {
38
+ /** Let run formatting pass a content lock; text and removal stay refused. Default `false`. */
39
+ readonly allowFormattingInLockedContent?: boolean;
40
+ }
41
+ /**
42
+ * How an edit primitive validates its result.
43
+ *
44
+ * By default every primitive runs the full-part invariant validation before handing its
45
+ * result back — the safe reading for an isolated call. A TRANSACTION applying many ops pays
46
+ * that full-tree walk once per primitive, which is what made a hundred-paragraph paste
47
+ * quadratic; it defers instead, and runs the same validation ONCE on the final tree before
48
+ * anything is published. Deferring is only sound for a caller that owns a commit boundary:
49
+ * nothing may escape between the unvalidated intermediate and the validated result.
50
+ */
51
+ interface EditOptions {
52
+ readonly deferValidation?: boolean;
53
+ /**
54
+ * How a content control's `w:lock` is read for ops that only restyle text. Absent means
55
+ * the default: `contentLocked` / `sdtContentLocked` refuse every write, formatting included.
56
+ */
57
+ readonly contentLockPolicy?: ContentLockPolicy;
58
+ /**
59
+ * A shared minter for `@w:id` on a NEW revision, for the ops of one transaction.
60
+ *
61
+ * `nextRevisionId` walks the whole part to find the highest id in use, and a formatting
62
+ * write emits one op per run — so a Select All + Bold in suggesting mode paid a
63
+ * document-wide walk thousands of times over. The transaction hands its ops one minter
64
+ * instead, and it is DROPPED the moment an op that can import foreign revision ids runs
65
+ * (a paste carries its own), because a stale minter would hand out an id the document had
66
+ * just started using — and two revisions sharing an address are one card in the pane.
67
+ *
68
+ * Absent means "mint your own": every applier falls back to its own walk, which is what a
69
+ * caller outside a transaction gets.
70
+ */
71
+ readonly revisionIds?: () => string;
72
+ /**
73
+ * The transaction's revision-id bookkeeping for the tracked TEXT ops, where `revisionIds`
74
+ * above hands the property ops one shared id for their whole group.
75
+ *
76
+ * Absent means "mint your own and remember nothing", which is what a caller outside a
77
+ * transaction gets: every applier falls back to its own walk of the part.
78
+ */
79
+ readonly trackedRevisionIds?: TransactionRevisionIds;
80
+ /**
81
+ * How the op addresses saved field results (`field-result-mode.ts`). Absent keeps the mode
82
+ * of the enclosing store call, which is `atomic` outside any editable transaction.
83
+ */
84
+ readonly fieldResults?: FieldResultsMode;
85
+ }
86
+ /**
87
+ * What one transaction knows about the revision ids its tracked text ops write.
88
+ *
89
+ * TWO questions, and they are the same bookkeeping. `nextRevisionId` walks the whole part, so
90
+ * a replacement — a `deleteText` and an `insertText` in one transaction — walked it twice, and
91
+ * on a five-hundred-page document that doubled the cost of every one. And an insertion aimed
92
+ * at the front edge of a deletion relocates past it only when that deletion is THIS
93
+ * transaction's own: typing over a selection. Backspace, then a keystroke, is two
94
+ * transactions, and there the typed text belongs in FRONT of the struck character, as Word
95
+ * writes it. Adjacency alone cannot tell the two apart; the ids can.
96
+ */
97
+ interface TransactionRevisionIds {
98
+ /** A fresh `@w:id`, from this transaction's one walk of the part. */
99
+ mint(): string;
100
+ /**
101
+ * Record a wrapper this transaction wrote, by its FULL `CT_TrackChange` identity — id,
102
+ * author and date, as `revisionKey` spells it. Not by the id alone: that number comes out
103
+ * of the file, nothing makes it unique, and a strike joining `w:id="3"` in one paragraph
104
+ * would otherwise claim an unrelated `w:id="3"` elsewhere as this edit's own.
105
+ */
106
+ wrote(key: string): void;
107
+ /** Whether this transaction wrote a wrapper with that identity. */
108
+ wroteUnder(key: string): boolean;
109
+ }
110
+ /** Every node id currently present in the part. */
111
+ declare function collectNodeIds(part: OoxmlPart): Set<string>;
112
+ /**
113
+ * Mint ids for nodes an edit introduces.
114
+ *
115
+ * Deterministic and collision-checked against the whole part: a structural-path id from the
116
+ * original parse (`/word/document.xml#0.1.2`) and a minted one (`/word/document.xml#new:3`)
117
+ * can never coincide, and the counter skips anything already taken so repeated edits in one
118
+ * session stay unique.
119
+ *
120
+ * Allocators share reservations across edited roots and restored roots. Preview edits,
121
+ * detached nodes, and undo branches must not reuse an identity that collaboration retains.
122
+ *
123
+ * Checks the part's node index directly rather than copying every id into a fresh set: the
124
+ * copy was O(document) per op, and an allocator is created for every op.
125
+ */
126
+ declare function createNodeIdAllocator(part: OoxmlPart, family?: 'new' | 'paste'): () => string;
127
+ /** Whether a node id exists in the part. */
128
+ declare function hasNode(part: OoxmlPart, nodeId: string): boolean;
129
+ /** Read a node back out of a part by id. */
130
+ declare function findNode(part: OoxmlPart, nodeId: string): OoxmlNode | null;
131
+ /** The element that holds a node, or null for the root and for unknown ids. */
132
+ declare function parentNodeOf(part: OoxmlPart, nodeId: string): OoxmlElement | null;
133
+ /** Replace one node's children wholesale. */
134
+ declare function replaceChildren(part: OoxmlPart, nodeId: string, children: readonly OoxmlNode[], options?: EditOptions): OoxmlEditResult;
135
+ /** Insert children into a node at `index` (clamped to the child list). */
136
+ declare function insertChildren(part: OoxmlPart, nodeId: string, index: number, children: readonly OoxmlNode[], options?: EditOptions): OoxmlEditResult;
137
+ /** Replace one node with another, keeping its position among its siblings. */
138
+ declare function replaceNode(part: OoxmlPart, nodeId: string, replacement: OoxmlNode, options?: EditOptions): OoxmlEditResult;
139
+ /** Remove a node and its subtree. */
140
+ declare function removeNode(part: OoxmlPart, nodeId: string, options?: EditOptions): OoxmlEditResult;
141
+ /**
142
+ * Apply several primitives as ONE atomic step.
143
+ *
144
+ * Each edit runs against the result of the previous one, and the whole sequence is
145
+ * validated once at the end. If any step fails, the ORIGINAL part is what the caller keeps
146
+ * — there is no partially-edited intermediate to publish. This is the shape a multi-`DocOp`
147
+ * store transaction needs.
148
+ */
149
+ declare function applyEdits(part: OoxmlPart, edits: readonly ((current: OoxmlPart) => OoxmlEditResult)[], options?: EditOptions): OoxmlEditResult;
150
+
15
151
  /** A freshly allocated drawing property id, or the reason one could not be minted. */
16
152
  type DrawingPropertyIdResult = {
17
153
  readonly ok: true;
@@ -74,6 +210,52 @@ interface ExternalImageFetchPort {
74
210
  }>>;
75
211
  }
76
212
 
213
+ interface InsertImageInput {
214
+ readonly paragraphId: string;
215
+ readonly offset: number;
216
+ readonly bytes: Uint8Array;
217
+ readonly mime: SupportedImageMime;
218
+ readonly widthPoints: number;
219
+ readonly heightPoints: number;
220
+ readonly decodePort: ImageDecodePort;
221
+ readonly expectedPackageRevision: number;
222
+ readonly commitGuard?: () => boolean;
223
+ readonly title?: string;
224
+ readonly description?: string;
225
+ readonly hyperlink?: string;
226
+ /** Present in suggesting mode: the inserted drawing's run goes into a `w:ins`. */
227
+ readonly revision?: RevisionAttributionInput;
228
+ /**
229
+ * Collaboration actor for the ids this insert mints — `wp:docPr/@id`, the image
230
+ * relationship, and a hyperlink relationship when one is asked for.
231
+ *
232
+ * EXPLICIT, and not the ambient `runWithTransactionActor` binding, because this entry is
233
+ * async: the mint runs after `await validateEmbeddedImageForCommit` and the ambient actor
234
+ * is synchronous-only. A wrap around the call would compile, read as correct, and be gone
235
+ * by the time the id is taken. Omitted (solo) keeps Word's dense `highest + 1` sequence.
236
+ */
237
+ readonly actorId?: string;
238
+ }
239
+ interface ReplaceImageOptions {
240
+ readonly expectedPackageRevision: number;
241
+ readonly commitGuard?: () => boolean;
242
+ /** Collaboration actor for the replacement's minted ids. See {@link InsertImageInput.actorId}. */
243
+ readonly actorId?: string;
244
+ }
245
+ type ImageIntentResult = (Extract<PackageTransactResult, {
246
+ ok: true;
247
+ }> & {
248
+ readonly drawingNodeId?: string;
249
+ readonly mediaPartName?: string;
250
+ }) | Extract<PackageTransactResult, {
251
+ ok: false;
252
+ }>;
253
+ interface ApplyImagePropertiesInput {
254
+ readonly drawingNodeId: string;
255
+ readonly ops: readonly DrawingTreeDocOp[];
256
+ readonly hyperlink: string | null;
257
+ }
258
+
77
259
  /** `w:headerReference w:type` vocabulary (ECMA-376 §17.10.5): default, first page, even pages. */
78
260
  type HeaderFooterVariant = 'default' | 'first' | 'even';
79
261
  /** Header vs footer region kind for chrome and lifecycle ops. */
@@ -526,52 +708,6 @@ interface CascadeDeletedNoteReferencesOptions {
526
708
  */
527
709
  declare function cascadeDeletedNoteReferences(before: OoxmlPackage, after: OoxmlPackage, options?: CascadeDeletedNoteReferencesOptions): OoxmlPackage | null;
528
710
 
529
- interface InsertImageInput {
530
- readonly paragraphId: string;
531
- readonly offset: number;
532
- readonly bytes: Uint8Array;
533
- readonly mime: SupportedImageMime;
534
- readonly widthPoints: number;
535
- readonly heightPoints: number;
536
- readonly decodePort: ImageDecodePort;
537
- readonly expectedPackageRevision: number;
538
- readonly commitGuard?: () => boolean;
539
- readonly title?: string;
540
- readonly description?: string;
541
- readonly hyperlink?: string;
542
- /** Present in suggesting mode: the inserted drawing's run goes into a `w:ins`. */
543
- readonly revision?: RevisionAttributionInput;
544
- /**
545
- * Collaboration actor for the ids this insert mints — `wp:docPr/@id`, the image
546
- * relationship, and a hyperlink relationship when one is asked for.
547
- *
548
- * EXPLICIT, and not the ambient `runWithTransactionActor` binding, because this entry is
549
- * async: the mint runs after `await validateEmbeddedImageForCommit` and the ambient actor
550
- * is synchronous-only. A wrap around the call would compile, read as correct, and be gone
551
- * by the time the id is taken. Omitted (solo) keeps Word's dense `highest + 1` sequence.
552
- */
553
- readonly actorId?: string;
554
- }
555
- interface ReplaceImageOptions {
556
- readonly expectedPackageRevision: number;
557
- readonly commitGuard?: () => boolean;
558
- /** Collaboration actor for the replacement's minted ids. See {@link InsertImageInput.actorId}. */
559
- readonly actorId?: string;
560
- }
561
- type ImageIntentResult = (Extract<PackageTransactResult, {
562
- ok: true;
563
- }> & {
564
- readonly drawingNodeId?: string;
565
- readonly mediaPartName?: string;
566
- }) | Extract<PackageTransactResult, {
567
- ok: false;
568
- }>;
569
- interface ApplyImagePropertiesInput {
570
- readonly drawingNodeId: string;
571
- readonly ops: readonly DrawingTreeDocOp[];
572
- readonly hyperlink: string | null;
573
- }
574
-
575
711
  /**
576
712
  * The identity of one continuous user gesture, for history grouping.
577
713
  *
@@ -646,6 +782,11 @@ interface TreeDocumentStoreOptions {
646
782
  * document can gain or lose protection while its stories stay open.
647
783
  */
648
784
  readonly settingsPart?: () => OoxmlPart | null | undefined;
785
+ /**
786
+ * Opt-in relaxation of `w:lock` for run-property writes. See {@link ContentLockPolicy};
787
+ * absent, `contentLocked` and `sdtContentLocked` refuse formatting like any other write.
788
+ */
789
+ readonly contentLockPolicy?: ContentLockPolicy;
649
790
  }
650
791
 
651
792
  /** A selection the caller wants restored when an entry is undone or redone. */
@@ -813,6 +954,8 @@ declare class TreeDocumentStore {
813
954
  private readonly historyLimit;
814
955
  /** See {@link TreeDocumentStoreOptions.settingsPart}. */
815
956
  private readonly settingsPartOverride;
957
+ /** See {@link TreeDocumentStoreOptions.contentLockPolicy}. */
958
+ private readonly contentLockPolicy;
816
959
  /** Package-aware story tag applied to publishes (including undo/redo). */
817
960
  private storyRef;
818
961
  /** Open composition, if any. While set, transactions extend one entry (task 5.5). */
@@ -913,6 +1056,40 @@ declare class TreeDocumentStore {
913
1056
  private publish;
914
1057
  }
915
1058
 
1059
+ /** Decoded fragment payloads above this cap are refused before any package work. */
1060
+ declare const MAX_FRAGMENT_DECODED_BYTES: number;
1061
+ interface FragmentPasteInput {
1062
+ readonly paragraphId: string;
1063
+ readonly offset: number;
1064
+ /** The fragment package zip (from the clipboard codec or the HTML projection). */
1065
+ readonly fragmentBytes: Uint8Array;
1066
+ readonly lastMarkCovered: boolean;
1067
+ /** Ops that clear the current selection first (the surface's deleteSelectionPlan). */
1068
+ readonly priorOps?: readonly TreeDocOp[];
1069
+ /**
1070
+ * Collaboration actor for the ids this paste mints.
1071
+ *
1072
+ * A paste freshens three package-wide namespaces — bookmark `@w:id`, revision `@w:id` and
1073
+ * `wp:docPr/@id` — and the merge reads the actor off the open transaction. Without one, two
1074
+ * replicas pasting the same fragment from one snapshot mint the same numbers, and only the
1075
+ * merged document shows it. Omitted (solo) keeps Word's dense sequences.
1076
+ */
1077
+ readonly actorId?: string;
1078
+ }
1079
+ type FragmentPasteResult = (Extract<PackageTransactResult, {
1080
+ ok: true;
1081
+ }> & {
1082
+ readonly blockCount: number;
1083
+ }) | Extract<PackageTransactResult, {
1084
+ ok: false;
1085
+ }>;
1086
+ /**
1087
+ * Read the fragment through the bounded file-open trust boundary, merge its resources,
1088
+ * and land its blocks — all inside one transaction. Any refusal leaves the document
1089
+ * exactly as it was; the caller (the paste router) degrades to the next flavour.
1090
+ */
1091
+ declare function applyFragmentPaste(store: TreePackageStore, scope: StoryScope, input: FragmentPasteInput): FragmentPasteResult;
1092
+
916
1093
  /** Attribution stamped on one remote canonical publication. */
917
1094
  interface RemotePackageAttribution {
918
1095
  readonly origin: string;
@@ -968,6 +1145,8 @@ declare const DEFAULT_MAX_EDITABLE_STORY_PARTS = 64;
968
1145
  /** How a package store is constructed: limits, history depth, and review contributions. */
969
1146
  interface TreePackageStoreOptions {
970
1147
  readonly historyLimit?: number;
1148
+ /** Opt-in relaxation of `w:lock` for run-property writes, for the body and every story store. */
1149
+ readonly contentLockPolicy?: ContentLockPolicy;
971
1150
  /** Bound on opened story stores; defaults to {@link DEFAULT_MAX_EDITABLE_STORY_PARTS}. */
972
1151
  readonly maxEditableStoryParts?: number;
973
1152
  /**
@@ -993,6 +1172,7 @@ declare class TreePackageStore {
993
1172
  private readonly redoOrder;
994
1173
  private readonly subscribers;
995
1174
  private readonly historyLimit;
1175
+ private readonly contentLockPolicy;
996
1176
  private readonly maxEditableStoryParts;
997
1177
  private readonly cascadeNoteReferences;
998
1178
  private lastChange;
@@ -1017,6 +1197,14 @@ declare class TreePackageStore {
1017
1197
  * a matching tuple proves the snapshot cannot differ; nothing invalidates explicitly.
1018
1198
  */
1019
1199
  private currentPackageMemo;
1200
+ /**
1201
+ * What the body and every story store open with. `settingsPart` is the SAME live getter for
1202
+ * all of them: a story store is built from a PART, whose synthetic package holds no
1203
+ * `settings.xml`, and a store keeps its own working copy, so a replaced `settings.xml` left one
1204
+ * story reading stale protection. Protection that holds in a header but not the body is worse
1205
+ * than none: it looks enforced. The lock policy reaches every story for the same reason.
1206
+ */
1207
+ private storyStoreOptions;
1020
1208
  constructor(pkg: OoxmlPackage, main: OoxmlPart, options?: TreePackageStoreOptions);
1021
1209
  get packageRevision(): number;
1022
1210
  get canUndo(): boolean;
@@ -1163,39 +1351,5 @@ declare class TreePackageStore {
1163
1351
  private publishSynthetic;
1164
1352
  }
1165
1353
 
1166
- /** Decoded fragment payloads above this cap are refused before any package work. */
1167
- declare const MAX_FRAGMENT_DECODED_BYTES: number;
1168
- interface FragmentPasteInput {
1169
- readonly paragraphId: string;
1170
- readonly offset: number;
1171
- /** The fragment package zip (from the clipboard codec or the HTML projection). */
1172
- readonly fragmentBytes: Uint8Array;
1173
- readonly lastMarkCovered: boolean;
1174
- /** Ops that clear the current selection first (the surface's deleteSelectionPlan). */
1175
- readonly priorOps?: readonly TreeDocOp[];
1176
- /**
1177
- * Collaboration actor for the ids this paste mints.
1178
- *
1179
- * A paste freshens three package-wide namespaces — bookmark `@w:id`, revision `@w:id` and
1180
- * `wp:docPr/@id` — and the merge reads the actor off the open transaction. Without one, two
1181
- * replicas pasting the same fragment from one snapshot mint the same numbers, and only the
1182
- * merged document shows it. Omitted (solo) keeps Word's dense sequences.
1183
- */
1184
- readonly actorId?: string;
1185
- }
1186
- type FragmentPasteResult = (Extract<PackageTransactResult, {
1187
- ok: true;
1188
- }> & {
1189
- readonly blockCount: number;
1190
- }) | Extract<PackageTransactResult, {
1191
- ok: false;
1192
- }>;
1193
- /**
1194
- * Read the fragment through the bounded file-open trust boundary, merge its resources,
1195
- * and land its blocks — all inside one transaction. Any refusal leaves the document
1196
- * exactly as it was; the caller (the paste router) degrades to the next flavour.
1197
- */
1198
- declare function applyFragmentPaste(store: TreePackageStore, scope: StoryScope, input: FragmentPasteInput): FragmentPasteResult;
1199
-
1200
- export { NOTE_ID_MAX as B, DEFAULT_MAX_EDITABLE_STORY_PARTS as D, NOTE_ID_MIN as E, NOTE_SEPARATOR_ID as G, MAX_FRAGMENT_DECODED_BYTES as M, TreePackageStore as T, allocateDrawingPropertyId as a4, allocateNoteId as a5, applyFragmentPaste as a6, applyHeaderFooterLifecycleOp as a7, applyNoteLifecycleOp as a8, atomicNoteSpansOf as a9, noteTypeOf as aA, notesOf as aB, notesPartHasId as aC, observeHistoryGroup as aD, parseNoteId as aE, parseNoteScopeId as aF, resolveHeaderFooterParts as aG, resolveHeaderFooterPartsBySection as aH, resolveHeaderFooterResolutionBySection as aI, resolveNotesPart as aJ, withBinaryPart as aK, withEmbeddedImage as aL, withoutUnreferencedImagePart as aM, cascadeDeletedNoteReferences as aa, collectNoteReferences as ab, collectPackageNoteReferences as ac, collectSectionPropertyNodes as ad, createNoteReferenceScanBudget as ae, customMarkFollows as af, diagnoseNoteReferences as ag, findNoteById as ah, formatNoteScopeId as ai, isContinuationSeparatorNode as aj, isEndnotesNode as ak, isFootnotesNode as al, isHeaderFooterLifecycleOp as am, isNormalNote as an, isNoteAtomNode as ao, isNoteLifecycleOp as ap, isNoteNode as aq, isNoteRefNode as ar, isNoteReferenceNode as as, isSeparatorNode as at, normalNoteIds as au, noteAtomText as av, noteIdOf as aw, noteKindOf as ax, noteRefKindOf as ay, noteReferenceKindOf as az, TreeDocumentStore as f, reportHistoryGroup as r, MAX_NOTES_PER_PART as v, MAX_NOTE_REFERENCE_PARTS as w, MAX_NOTE_REFERENCE_SCAN as x, NOTE_ATOM_CHAR as y, NOTE_CONTINUATION_SEPARATOR_ID as z };
1201
- export type { TreeDocumentStoreOptions as $, ApplyImagePropertiesInput as A, CascadeDeletedNoteReferencesOptions as C, FragmentPasteInput as F, HeaderFooterParts as H, InsertImageInput as I, NoteDiagnostic as J, NoteDiagnosticCode as K, NoteLifecycleImpact as L, NoteKind as N, NoteLifecycleOp as O, NoteLifecycleOptions as P, NoteLifecycleRejection as Q, ReplaceImageOptions as R, StoryScope as S, NoteLifecycleResult as U, NoteReferenceHit as V, NoteReferenceScanBudget as W, NoteType as X, PackageTransactResult as Y, RemotePackageAttribution as Z, StoryResolveResult as _, StoryTargetRejection as a, TreePackageStoreOptions as a0, TreeStoryRef as a1, TransactResult as a2, TransactionContext as a3, HeaderFooterSectionResolution as b, HeaderFooterVariant as c, HistoryGroup as d, TreeModelChange as e, SelectionMark as g, TransactOptions as h, ImageIntentResult as i, FragmentPasteResult as j, FieldResultsMode as k, AtomicNoteSpan as l, DrawingPropertyIdResult as m, HeaderFooterKind as n, HeaderFooterLifecycleImpact as o, HeaderFooterLifecycleOp as p, HeaderFooterLifecycleRejection as q, HeaderFooterLifecycleResult as s, HeaderFooterSlotMeta as t, HistoryCaptureKind as u };
1354
+ export { NOTE_CONTINUATION_SEPARATOR_ID as B, DEFAULT_MAX_EDITABLE_STORY_PARTS as D, NOTE_ID_MAX as G, NOTE_ID_MIN as J, NOTE_SEPARATOR_ID as K, MAX_FRAGMENT_DECODED_BYTES as M, TreePackageStore as T, allocateDrawingPropertyId as a8, allocateNoteId as a9, isNoteNode as aA, isNoteRefNode as aB, isNoteReferenceNode as aC, isSeparatorNode as aD, normalNoteIds as aE, noteAtomText as aF, noteIdOf as aG, noteKindOf as aH, noteRefKindOf as aI, noteReferenceKindOf as aJ, noteTypeOf as aK, notesOf as aL, notesPartHasId as aM, observeHistoryGroup as aN, parentNodeOf as aO, parseNoteId as aP, parseNoteScopeId as aQ, removeNode as aR, replaceChildren as aS, replaceNode as aT, resolveHeaderFooterParts as aU, resolveHeaderFooterPartsBySection as aV, resolveHeaderFooterResolutionBySection as aW, resolveNotesPart as aX, withBinaryPart as aY, withEmbeddedImage as aZ, withoutUnreferencedImagePart as a_, applyEdits as aa, applyFragmentPaste as ab, applyHeaderFooterLifecycleOp as ac, applyNoteLifecycleOp as ad, atomicNoteSpansOf as ae, cascadeDeletedNoteReferences as af, collectNodeIds as ag, collectNoteReferences as ah, collectPackageNoteReferences as ai, collectSectionPropertyNodes as aj, createNodeIdAllocator as ak, createNoteReferenceScanBudget as al, customMarkFollows as am, diagnoseNoteReferences as an, findNode as ao, findNoteById as ap, formatNoteScopeId as aq, hasNode as ar, insertChildren as as, isContinuationSeparatorNode as at, isEndnotesNode as au, isFootnotesNode as av, isHeaderFooterLifecycleOp as aw, isNormalNote as ax, isNoteAtomNode as ay, isNoteLifecycleOp as az, TreeDocumentStore as f, reportHistoryGroup as r, MAX_NOTES_PER_PART as w, MAX_NOTE_REFERENCE_PARTS as x, MAX_NOTE_REFERENCE_SCAN as y, NOTE_ATOM_CHAR as z };
1355
+ export type { PackageTransactResult as $, ApplyImagePropertiesInput as A, ContentLockPolicy as C, EditOptions as E, FieldResultsMode as F, HeaderFooterParts as H, InsertImageInput as I, NoteDiagnostic as L, NoteKind as N, NoteDiagnosticCode as O, NoteLifecycleImpact as P, NoteLifecycleOp as Q, ReplaceImageOptions as R, StoryScope as S, NoteLifecycleOptions as U, NoteLifecycleRejection as V, NoteLifecycleResult as W, NoteReferenceHit as X, NoteReferenceScanBudget as Y, NoteType as Z, OoxmlEditResult as _, HeaderFooterSectionResolution as a, RemotePackageAttribution as a0, StoryResolveResult as a1, TransactionRevisionIds as a2, TreeDocumentStoreOptions as a3, TreePackageStoreOptions as a4, TreeStoryRef as a5, TransactResult as a6, TransactionContext as a7, StoryTargetRejection as b, HeaderFooterVariant as c, HistoryGroup as d, TreeModelChange as e, SelectionMark as g, TransactOptions as h, ImageIntentResult as i, FragmentPasteInput as j, FragmentPasteResult as k, AtomicNoteSpan as l, CascadeDeletedNoteReferencesOptions as m, DrawingPropertyIdResult as n, HeaderFooterKind as o, HeaderFooterLifecycleImpact as p, HeaderFooterLifecycleOp as q, HeaderFooterLifecycleRejection as s, HeaderFooterLifecycleResult as t, HeaderFooterSlotMeta as u, HistoryCaptureKind as v };
@@ -1,11 +1,11 @@
1
- import { S as StoryScope, g as SelectionMark, h as TransactOptions, a as StoryTargetRejection, e as TreeModelChange, H as HeaderFooterParts, b as HeaderFooterSectionResolution, I as InsertImageInput, i as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, j as FragmentPasteResult } from './tree-package-fragment-BeeKxDw8.js';
2
- import { W as TreeDocOp, O as OoxmlPart, N as OoxmlNode, Q as OoxmlPackage, Z as OoxmlElement, a as ReviewItem, aa as RevisionAttributionInput } from './types-barrel-D3xCgQX6.js';
3
- import { S as SupportedImageMime, a as ImageDecodePort } from './image-resources-BN-hUgCn.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-cvL5rhcD.js';
5
- import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-qH331moE.js';
1
+ import { S as StoryScope, g as SelectionMark, h as TransactOptions, b as StoryTargetRejection, e as TreeModelChange, H as HeaderFooterParts, a as HeaderFooterSectionResolution, I as InsertImageInput, i as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, j as FragmentPasteInput, k as FragmentPasteResult } from './tree-package-store-DKhdEVym.js';
2
+ import { ag as TreeDocOp, O as OoxmlPart, N as OoxmlNode, Q as OoxmlPackage, ah as OoxmlElement, a as ReviewItem, ax as RevisionAttributionInput } from './types-barrel-CA0xB8kH.js';
3
+ import { S as SupportedImageMime, c as ImageDecodePort } from './image-resources-Bipz8toD.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-0v0Kgw1T.js';
5
+ import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-DZQN8Bnx.js';
6
6
  import { Node } from 'prosemirror-model';
7
7
  import { CollaborationDocumentPort } from './collaboration/replication.js';
8
- import { V as ViewScope } from './editor-scope-OHPwVQ5l.js';
8
+ import { V as ViewScope } from './editor-scope-7o9xweiJ.js';
9
9
 
10
10
  /**
11
11
  * Why an edited projection could not be mapped back into tree ops.
@@ -90,6 +90,8 @@ interface ThemeSchemeFaces {
90
90
  readonly minorSupplemental?: Readonly<Record<string, string>>;
91
91
  /** Lower-cased font table names that declare a Chinese character set. */
92
92
  readonly chineseFontTableFaces?: readonly string[];
93
+ /** Lower-cased font table names that declare an East Asian character set. */
94
+ readonly eastAsianFontTableFaces?: readonly string[];
93
95
  }
94
96
  /** The theme's font slots, fully resolved, for resolving `w:rFonts` theme attributes. */
95
97
  interface DocumentThemeFonts extends ThemeSchemeFaces {