@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.
- package/README.md +11 -32
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +11 -10
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +9 -9
- package/dist/binding.js +1 -1
- package/dist/chunk-44LQJIKH.cjs +20 -0
- package/dist/chunk-4EHMMSFR.cjs +1 -0
- package/dist/{chunk-D2V4YBWJ.cjs → chunk-AFG7Q622.cjs} +1 -1
- package/dist/chunk-AJCCS53D.js +1 -0
- package/dist/{chunk-3EZO3O6I.js → chunk-AYMSP25Q.js} +3 -3
- package/dist/{chunk-44SIVFJT.cjs → chunk-B4KZSKF7.cjs} +5 -5
- package/dist/chunk-BDAY2ETZ.js +1 -0
- package/dist/chunk-BNZF6DYC.cjs +18 -0
- package/dist/chunk-BQXF2PFF.js +2 -0
- package/dist/chunk-GIHKVXEO.js +2 -0
- package/dist/chunk-ITNK6C5M.cjs +3 -0
- package/dist/chunk-MP3K4LC5.js +1 -0
- package/dist/chunk-MXOO7KRI.cjs +11 -0
- package/dist/chunk-NG6IQ4SI.js +11 -0
- package/dist/{chunk-2HQXLL5L.cjs → chunk-PYXMAUNR.cjs} +1 -1
- package/dist/chunk-Q2B6HX3R.js +1 -0
- package/dist/chunk-Q5JPPUNR.js +5 -0
- package/dist/chunk-S35UK656.cjs +2 -0
- package/dist/chunk-S6J4O5XP.js +1 -0
- package/dist/{chunk-GSEUM6AI.cjs → chunk-TE43S3LX.cjs} +1 -1
- package/dist/chunk-TKQH7BNE.cjs +1 -0
- package/dist/chunk-UKVVUHZL.cjs +1 -0
- package/dist/chunk-VH2DLEZK.js +20 -0
- package/dist/{chunk-OHVJYJOA.js → chunk-VUNFWXHF.js} +1 -1
- package/dist/{chunk-OA6LFCTG.cjs → chunk-WQFNWLNY.cjs} +3 -3
- package/dist/chunk-WZX4UGRQ.js +3 -0
- package/dist/{chunk-CAIWEQLC.js → chunk-X5QNSISI.js} +1 -1
- package/dist/chunk-XS4FOHH6.js +18 -0
- package/dist/{chunk-PIBYJZIH.cjs → chunk-XZY4Q6PJ.cjs} +1 -1
- package/dist/{chunk-WTILOUPG.cjs → chunk-Z2ETEZRU.cjs} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +13 -4
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +4 -3
- package/dist/contracts/document.d.ts +3 -2
- package/dist/contracts/editor.cjs +1 -1
- package/dist/contracts/editor.d.ts +9 -9
- package/dist/contracts/editor.js +1 -1
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.cjs +1 -1
- package/dist/contracts/modules.d.ts +9 -7
- package/dist/contracts/modules.js +1 -1
- package/dist/contracts/types.d.ts +2 -1
- package/dist/{custom-node-writes-piokwVR5.d.ts → custom-node-writes-05qS32px.d.ts} +2 -2
- package/dist/{document-protection-C6RvCHx-.d.ts → document-protection-Cr59VKLO.d.ts} +1 -1
- package/dist/{editor-BgtcHulQ.d.ts → editor-BsLSz_7y.d.ts} +28 -29
- package/dist/editor-scope-OHPwVQ5l.d.ts +84 -0
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.d.ts +130 -27
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +13 -13
- package/dist/export.js +1 -1
- package/dist/{font-resolver-Bv2Z25-J.d.ts → font-resolver-CzwdBJDE.d.ts} +1 -1
- package/dist/{headless-document-view-DHKMN_3Y.d.ts → headless-document-view-B7nAiR7P.d.ts} +2 -2
- package/dist/{image-resources-C51LuAAu.d.ts → image-resources-C4ilLzog.d.ts} +1 -1
- package/dist/{index-3lr8xXF8.d.ts → index-zkvqBQ9o.d.ts} +117 -26
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-CKBUSaS7.d.ts → layout-shaping-BJKVTI6i.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +41 -18
- package/dist/layout.js +1 -1
- package/dist/{note-properties-CcXUgqr8.d.ts → note-properties-MNztEj5s.d.ts} +1 -1
- package/dist/{omml-equation-C5P6Ym3v.d.ts → omml-equation-CbnW9yXd.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +8 -7
- package/dist/output.js +1 -1
- package/dist/{protocol-CsawNZkt.d.ts → protocol-Co_r0SZQ.d.ts} +2 -2
- package/dist/{review-paragraph-order-BCIqjopY.d.ts → review-paragraph-order-EFaU7TqH.d.ts} +1 -1
- package/dist/{revision-projection-BcRnC4Yj.d.ts → revision-projection-DEIvpxiq.d.ts} +16 -2
- package/dist/{semantic-cell-selection-R9wrenwR.d.ts → semantic-cell-selection-DXmfnDCw.d.ts} +9 -4
- package/dist/{semantic-interaction-B7beVwH7.d.ts → semantic-interaction-BLu3M6Nn.d.ts} +1 -1
- package/dist/{semantic-paint-CLvHwf8y.d.ts → semantic-paint-CPsihA6k.d.ts} +18 -2
- package/dist/{semantic-records-CbXwnS80.d.ts → semantic-records-CqD0b5Ex.d.ts} +146 -6
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +462 -427
- package/dist/store.js +1 -1
- package/dist/{note-lifecycle-D4AOFCAt.d.ts → tree-package-fragment-CwJDixNs.d.ts} +183 -143
- package/dist/{tree-session-contract-DTQxw2zL.d.ts → tree-session-contract-D9RRWE0C.d.ts} +8 -8
- package/dist/{types-barrel-CEOy-Jv0.d.ts → types-barrel-DLB11iSY.d.ts} +1470 -1426
- package/package.json +2 -2
- package/dist/chunk-2H4ABRMB.cjs +0 -20
- package/dist/chunk-6UCDHGXI.js +0 -1
- package/dist/chunk-7VMVDRRU.js +0 -2
- package/dist/chunk-CEXC2VHI.cjs +0 -1
- package/dist/chunk-CF3JR35B.js +0 -11
- package/dist/chunk-D5EHDHYV.js +0 -1
- package/dist/chunk-DGSJZMAE.cjs +0 -11
- package/dist/chunk-EHBPYFRE.js +0 -20
- package/dist/chunk-GOEBQ26R.js +0 -1
- package/dist/chunk-H6WDEAOJ.js +0 -18
- package/dist/chunk-I6LSEDUL.cjs +0 -18
- package/dist/chunk-IW35GWJN.js +0 -1
- package/dist/chunk-JRBGCIR2.js +0 -5
- package/dist/chunk-K5HIOS6J.cjs +0 -3
- package/dist/chunk-KLQXP27K.js +0 -3
- package/dist/chunk-MZFFU66H.cjs +0 -2
- package/dist/chunk-MZPNLIP3.js +0 -2
- package/dist/chunk-OHJQ7GPZ.cjs +0 -1
- package/dist/chunk-P4TGGDK3.js +0 -1
- package/dist/chunk-ZKWRCLT2.cjs +0 -1
- package/dist/editor-scope-DZJT4ukT.d.ts +0 -53
package/dist/store.d.ts
CHANGED
|
@@ -1,16 +1,358 @@
|
|
|
1
|
-
import { e as ResourceLimits } from './image-resources-
|
|
2
|
-
export { C as CreateImageResourceCacheOptions, D as DEFAULT_IMAGE_RESOURCE_LIMITS, f as DEFAULT_LIMITS, H as HARD_CEILINGS, g as IMAGE_RESOURCE_HARD_CEILINGS, b as ImageDecodePort, c as ImageResourceLimits, h as ImageResourceLookup, I as ImageResourceState, M as MAX_SVG_SNIFF_BYTES, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, i as ValidatedRasterHeader, j as createImageResourceCache, k as hasBoundedSvgRoot, l as imageResourceLookupFor, m as liveDrawingReferenceCount, r as resolveImageResourceLimits, n as resolveLimits, s as sniffImageMime, o as validateGifHeader, p as validateJpegHeader, q as validatePngHeader, v as validateRasterHeader } from './image-resources-
|
|
3
|
-
import { O as OoxmlPart, i as OoxmlNode, aM as OoxmlInvariantResult,
|
|
4
|
-
export { aW as ACCEPTED_PARAGRAPH_PROPERTIES, aX as ACCEPTED_RUN_PROPERTIES, aY as CONTENT_CONTROL_ID_MAX, aZ as CONTENT_CONTROL_PROPERTY_ORDER, a_ as CommentAnchor, a$ as CommentPosition, b0 as CommitTextFormFieldOp, b1 as ContentControlCheckbox, b2 as ContentControlCheckboxState, b3 as ContentControlDataBinding, b4 as ContentControlDateFormat, b5 as ContentControlEntry, b6 as ContentControlKind, b7 as ContentControlLevel, b8 as ContentControlListItem, b9 as ContentControlLock, ba as ContentControlProperties, bb as ContentTypeError, bc as ContentTypeIndex, bd as ContentTypeRecords, be as DEFAULT_OOXML_PACKAGE_LIMITS, bf as DEFAULT_ZIP_LIMITS, bg as DefaultRecord, bh as DeleteTextOp, aI as DrawingImageEffects, a8 as DrawingKind, ab as DrawingLocks, aa as DrawingPositionInput, bi as HYPERLINK_RELATIONSHIP_TYPE, bj as HyperlinkKind, bk as HyperlinkTarget, bl as IMAGE_RELATIONSHIP_TYPE, aE as IMAGE_WRAP_TARGETS, bm as ImageRelationshipResolution, bn as IndexResult, bo as
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
export { D as DEFAULT_OMML_LIMITS, E as EquationExpression, L as LinearMathOmmlResult, a as LinearMathParseResult, b as LinearMathRejection, c as OFFICE_MATH_NAMESPACE_URI, O as OmmlEquationProjection, d as OmmlLimits, e as equationExpressionToLinearMath, l as linearMathToOmml, p as parseLinearMath, f as projectOmmlEquation } from './omml-equation-
|
|
8
|
-
import { I as InsertCustomNodeWrite, C as CustomNodeWriteResult } from './custom-node-writes-
|
|
9
|
-
export { b as BookmarkAnchor, B as BookmarkIndex, c as CustomNodePayloadRead, d as CustomNodePayloadWrite, a as CustomNodeSweepOutcome, e as CustomNodeSweepResult, f as CustomNodeWriteRejection, D as DocumentTrackingSettings, E as EmbeddedFont, F as FontStyleKey, L as ListKind, M as MAX_CUSTOM_NODE_LABEL_LENGTH, g as MAX_CUSTOM_NODE_PAYLOAD_LENGTH, N as NO_TRACKING_SETTINGS, R as ReadEmbeddedFontsOptions, h as buildBookmarkIndex, i as customNodePayloadsByControl, j as customNodePayloadsOf, k as deobfuscateFont, l as ensureListDefinition, m as ensureNumberingLevel, n as insertCustomNodeWrite, r as readEmbeddedFonts, o as readTrackingSettings, p as removeCustomNodeWrite, s as sweepCustomNodePayloads } from './custom-node-writes-
|
|
10
|
-
export { c as collectFlowBlocks, a as commentBodyText, b as commentInitials, d as contentControlContentOf, e as deepParagraphOrderOfPart, i as isContentControl, f as isContentControlContent, p as paragraphOrderOfPart, w as walkAllStoryParagraphs, g as walkParagraphInline, h as walkStoryBlocks } from './review-paragraph-order-
|
|
11
|
-
export { D as DocumentProperties, E as EnsuredHyperlinkRelationship, a as HeadlessDocumentRejection, H as HeadlessDocumentView, b as HeadlessThemeFonts, O as OpenHeadlessDocumentResult, c as authorableHyperlinkTarget, e as ensureHyperlinkRelationship, h as headlessViewOfStore, o as openHeadlessDocument, r as relationshipTargetIn } from './headless-document-view-
|
|
12
|
-
export { A as AuthoredNoteProperties, D as DEFAULT_ENDNOTE_PROPERTIES, a as DEFAULT_FOOTNOTE_PROPERTIES, E as EndnotePosition, F as FootnotePosition, N as NoteNumRestart, R as ResolvedEndnoteProperties, b as ResolvedFootnoteProperties, c as authoredDocumentEndnoteProperties, d as authoredDocumentFootnoteProperties, e as authoredEndnotePropertiesFromSectPr, f as authoredFootnotePropertiesFromSectPr, i as isLegalEndnotePosition, g as isLegalFootnotePosition, h as isLegalNumRestart, p as parseAuthoredNoteProperties, r as resolveEndnoteProperties, j as resolveFootnoteProperties, s as settingsPartOf } from './note-properties-
|
|
13
|
-
export { a as DocumentProtectionEdit, D as DocumentProtectionState, N as NO_DOCUMENT_PROTECTION, r as readDocumentProtection } from './document-protection-
|
|
1
|
+
import { e as ResourceLimits } from './image-resources-C4ilLzog.js';
|
|
2
|
+
export { C as CreateImageResourceCacheOptions, D as DEFAULT_IMAGE_RESOURCE_LIMITS, f as DEFAULT_LIMITS, H as HARD_CEILINGS, g as IMAGE_RESOURCE_HARD_CEILINGS, b as ImageDecodePort, c as ImageResourceLimits, h as ImageResourceLookup, I as ImageResourceState, M as MAX_SVG_SNIFF_BYTES, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, i as ValidatedRasterHeader, j as createImageResourceCache, k as hasBoundedSvgRoot, l as imageResourceLookupFor, m as liveDrawingReferenceCount, r as resolveImageResourceLimits, n as resolveLimits, s as sniffImageMime, o as validateGifHeader, p as validateJpegHeader, q as validatePngHeader, v as validateRasterHeader } from './image-resources-C4ilLzog.js';
|
|
3
|
+
import { O as OoxmlPart, i as OoxmlNode, aM as OoxmlInvariantResult, at as OoxmlParagraphNode, aN as OoxmlFldCharNode, aO as OoxmlFldSimpleNode, aP as OoxmlInstrTextNode, aQ as OoxmlInvariantIssue, a1 as OoxmlElement, W as TreeDocOp, a5 as TreeOpRejection, aR as TreeOpResult, j as OoxmlPackage, aS as RelationshipRecord, aT as OoxmlHardBreakNode, aU as OoxmlAttribute, a0 as OoxmlProperty, f as ReviewRange, R as ReviewModelInput, a as ReviewItem, C as CommentRecord, e as ReviewPosition, aV as CommentThreadState, c as ReviewCommentItem, b as ReviewRevisionItem, aB as DrawingTreeDocOp, aC as ImpactClass, a9 as ImageWrapTarget } from './types-barrel-DLB11iSY.js';
|
|
4
|
+
export { aW as ACCEPTED_PARAGRAPH_PROPERTIES, aX as ACCEPTED_RUN_PROPERTIES, aY as CONTENT_CONTROL_ID_MAX, aZ as CONTENT_CONTROL_PROPERTY_ORDER, a_ as CommentAnchor, a$ as CommentPosition, b0 as CommitTextFormFieldOp, b1 as ContentControlCheckbox, b2 as ContentControlCheckboxState, b3 as ContentControlDataBinding, b4 as ContentControlDateFormat, b5 as ContentControlEntry, b6 as ContentControlKind, b7 as ContentControlLevel, b8 as ContentControlListItem, b9 as ContentControlLock, ba as ContentControlProperties, bb as ContentTypeError, bc as ContentTypeIndex, bd as ContentTypeRecords, be as DEFAULT_OOXML_PACKAGE_LIMITS, bf as DEFAULT_ZIP_LIMITS, bg as DefaultRecord, bh as DeleteTextOp, aI as DrawingImageEffects, a8 as DrawingKind, ab as DrawingLocks, aa as DrawingPositionInput, bi as HYPERLINK_RELATIONSHIP_TYPE, bj as HyperlinkKind, bk as HyperlinkTarget, bl as IMAGE_RELATIONSHIP_TYPE, aE as IMAGE_WRAP_TARGETS, bm as ImageRelationshipResolution, bn as IndexResult, bo as InsertBuildingBlockOp, bp as InsertTextOp, bq as LegacyCheckboxFieldRange, br as MAX_CONTENT_CONTROLS_PER_PART, bs as MAX_CONTENT_CONTROL_NESTING, bt as NameRejection, bu as NameResult, bv as OFFICE_RELATIONSHIP_NAMESPACE_URI, bw as OOXML_NODE_IDENTITY_RULES, bx as OoxmlBodyNode, by as OoxmlBookmarkEndNode, bz as OoxmlBookmarkStartNode, bA as OoxmlContentControlCalendarNode, bB as OoxmlContentControlCheckboxNode, bC as OoxmlContentControlCheckedNode, bD as OoxmlContentControlCheckedStateNode, bE as OoxmlContentControlComboBoxNode, a3 as OoxmlContentControlContentNode, bF as OoxmlContentControlDataBindingNode, bG as OoxmlContentControlDateFormatNode, bH as OoxmlContentControlDateNode, bI as OoxmlContentControlDropDownListNode, bJ as OoxmlContentControlEndPropertiesNode, bK as OoxmlContentControlLidNode, bL as OoxmlContentControlListItemNode, a2 as OoxmlContentControlNode, bM as OoxmlContentControlPropertiesNode, bN as OoxmlContentControlStoreMappedDataAsNode, bO as OoxmlContentControlTextNode, bP as OoxmlContentControlUncheckedStateNode, av as OoxmlContinuationSeparatorNode, bQ as OoxmlDocumentNode, aw as OoxmlEndnotesNode, bR as OoxmlExternalTarget, ax as OoxmlFootnotesNode, V as OoxmlGenericElementNode, bS as OoxmlGenericExtensionAttribute, bT as OoxmlHyperlinkNode, bU as OoxmlInvariantIssueCode, bV as OoxmlKnownNodeAttribute, bW as OoxmlNamespaceBinding, U as OoxmlNodeId, bX as OoxmlNodeIdentityRules, au as OoxmlNoteNode, ay as OoxmlNoteRefNode, az as OoxmlNoteReferenceNode, X as OoxmlPackageLimits, Y as OoxmlPackageRejection, bY as OoxmlPackageResult, bZ as OoxmlParagraphPropertiesNode, b_ as OoxmlPartMetadata, b$ as OoxmlReadRejection, c0 as OoxmlReadResult, c1 as OoxmlRunNode, c2 as OoxmlRunPropertiesNode, aA as OoxmlSeparatorNode, c3 as OoxmlTabNode, c4 as OoxmlTextElementNode, c5 as OoxmlTextNode, c6 as OoxmlWmlValAttribute, c7 as OoxmlXmlSpaceAttribute, c8 as OverrideRecord, c9 as RelationshipError, ca as RelationshipSetResult, cb as RelationshipTargetResolver, cc as ResolveResult, cd as ResolvedRelationship, d as ReviewCustomItem, g as ReviewRevisionKind, h as RevisionAddress, Z as RevisionBatchEntry, _ as RevisionBatchResult, $ as RevisionBatchSkipReason, ce as SetLegacyCheckboxOp, cf as SetLegacyDropdownOp, cg as SetTextFormFieldDefaultOp, a7 as SourceCrop, ch as TABLE_BORDER_STYLES, ci as TabStopWrite, aG as TableBorderStyle, cj as TargetMode, ck as TextFormFieldOptions, cl as TextFormFieldRange, cm as TextFormFieldType, cn as TreeDocOpKind, co as TreeOpEffect, cp as W15_NAMESPACE_URI, cq as WML_NAMESPACE_URI, cr as XMLNS_NAMESPACE_URI, cs as XML_NAMESPACE_URI, ct as XmlLimits, cu as XmlNode, cv as XmlRejection, cw as XmlResult, cx as ZipLimits, cy as ZipReadResult, cz as ZipRejection, cA as allocateContentControlId, cB as asciiFold, cC as buildContentTypeIndex, cD as buildRelationshipSet, cE as childElements, cF as commentAnchorsOfStory, cG as commentsOfPart, cH as contentControlContentChildren, cI as contentControlContentNodeOf, cJ as contentControlEndPropertiesNodeOf, cK as contentControlLevelOf, cL as contentControlPropertiesNodeOf, cM as contentControlPropertiesOf, cN as contentControlTextOf, cO as contentControlsIn, cP as detectDuplicateNames, cQ as extensionKey, cR as findContentControl, cS as findElement, cT as firstReviewRange, cU as flattenContentControls, cV as hasAnyComment, cW as hyperlinkAnchorOf, cX as hyperlinkRelationshipIdOf, cY as hyperlinkTargetOf, cZ as isContentControlContentNode, c_ as isContentControlNode, c$ as isContentControlWrapper, d0 as isContentRevisionKind, d1 as isHyperlinkNode, d2 as isRangeMarkerKind, d3 as isValidMime, d4 as legacyCheckboxFieldsOf, d5 as lockForbidsEdit, d6 as lockForbidsRemoval, d7 as normalizePartName, d8 as orderedContentControlProperties, d9 as parseContentControlId, da as partNameKey, db as planRevisionBatch, dc as projectDrawing, dd as readOnOffChild, de as readOoxmlPackage, df as readOoxmlPart, dg as readXml, dh as readZip, di as resolveContentControlLock, dj as resolveContentType, dk as resolveImageRelationship, dl as resolveInternalTarget, dm as resolveRelationship, dn as reviewItemKey, dp as reviewItemRanges, dq as textContent, dr as textFormFieldsOf, ds as threadStateOfPart, dt as validateExternalTarget, du as withPart, dv as writeOoxmlPackage, dw as writeZip } from './types-barrel-DLB11iSY.js';
|
|
5
|
+
import { c as TreeModelChange, f as TreeDocumentStore, T as TreePackageStore, S as StoryScope } from './tree-package-fragment-CwJDixNs.js';
|
|
6
|
+
export { k as AtomicNoteSpan, C as CascadeDeletedNoteReferencesOptions, D as DEFAULT_MAX_EDITABLE_STORY_PARTS, l as DrawingPropertyIdResult, F as FragmentPasteInput, j as FragmentPasteResult, m as HeaderFooterKind, n as HeaderFooterLifecycleImpact, o as HeaderFooterLifecycleOp, p as HeaderFooterLifecycleRejection, q as HeaderFooterLifecycleResult, d as HeaderFooterParts, e as HeaderFooterSectionResolution, s as HeaderFooterSlotMeta, H as HeaderFooterVariant, t as HistoryCaptureKind, b as HistoryGroup, M as MAX_FRAGMENT_DECODED_BYTES, u as MAX_NOTES_PER_PART, v as MAX_NOTE_REFERENCE_PARTS, w as MAX_NOTE_REFERENCE_SCAN, x as NOTE_ATOM_CHAR, y as NOTE_CONTINUATION_SEPARATOR_ID, z as NOTE_ID_MAX, B as NOTE_ID_MIN, E as NOTE_SEPARATOR_ID, G as NoteDiagnostic, J as NoteDiagnosticCode, N as NoteKind, K as NoteLifecycleImpact, L as NoteLifecycleOp, O as NoteLifecycleOptions, P as NoteLifecycleRejection, Q as NoteLifecycleResult, U as NoteReferenceHit, V as NoteReferenceScanBudget, W as NoteType, X as PackageTransactResult, Y as RemotePackageAttribution, g as SelectionMark, Z as StoryResolveResult, a as StoryTargetRejection, _ as TreeDocumentStoreOptions, $ as TreePackageStoreOptions, a0 as TreeStoryRef, h as TreeTransactOptions, a1 as TreeTransactResult, a2 as TreeTransactionContext, a3 as allocateDrawingPropertyId, a4 as allocateNoteId, a5 as applyFragmentPaste, a6 as applyHeaderFooterLifecycleOp, a7 as applyNoteLifecycleOp, a8 as atomicNoteSpansOf, a9 as cascadeDeletedNoteReferences, aa as collectNoteReferences, ab as collectPackageNoteReferences, ac as collectSectionPropertyNodes, ad as createNoteReferenceScanBudget, ae as customMarkFollows, af as diagnoseNoteReferences, ag as findNoteById, ah as formatNoteScopeId, ai as isContinuationSeparatorNode, aj as isEndnotesNode, ak as isFootnotesNode, al as isHeaderFooterLifecycleOp, am as isNormalNote, an as isNoteAtomNode, ao as isNoteLifecycleOp, ap as isNoteNode, aq as isNoteRefNode, ar as isNoteReferenceNode, as as isSeparatorNode, at as normalNoteIds, au as noteAtomText, av as noteIdOf, aw as noteKindOf, ax as noteRefKindOf, ay as noteReferenceKindOf, az as noteTypeOf, aA as notesOf, aB as notesPartHasId, aC as observeHistoryGroup, aD as parseNoteId, aE as parseNoteScopeId, r as reportHistoryGroup, aF as resolveHeaderFooterParts, aG as resolveHeaderFooterPartsBySection, aH as resolveHeaderFooterResolutionBySection, aI as resolveNotesPart, aJ as withBinaryPart, aK as withEmbeddedImage, aL as withoutUnreferencedImagePart } from './tree-package-fragment-CwJDixNs.js';
|
|
7
|
+
export { D as DEFAULT_OMML_LIMITS, E as EquationExpression, L as LinearMathOmmlResult, a as LinearMathParseResult, b as LinearMathRejection, c as OFFICE_MATH_NAMESPACE_URI, O as OmmlEquationProjection, d as OmmlLimits, e as equationExpressionToLinearMath, l as linearMathToOmml, p as parseLinearMath, f as projectOmmlEquation } from './omml-equation-CbnW9yXd.js';
|
|
8
|
+
import { I as InsertCustomNodeWrite, C as CustomNodeWriteResult } from './custom-node-writes-05qS32px.js';
|
|
9
|
+
export { b as BookmarkAnchor, B as BookmarkIndex, c as CustomNodePayloadRead, d as CustomNodePayloadWrite, a as CustomNodeSweepOutcome, e as CustomNodeSweepResult, f as CustomNodeWriteRejection, D as DocumentTrackingSettings, E as EmbeddedFont, F as FontStyleKey, L as ListKind, M as MAX_CUSTOM_NODE_LABEL_LENGTH, g as MAX_CUSTOM_NODE_PAYLOAD_LENGTH, N as NO_TRACKING_SETTINGS, R as ReadEmbeddedFontsOptions, h as buildBookmarkIndex, i as customNodePayloadsByControl, j as customNodePayloadsOf, k as deobfuscateFont, l as ensureListDefinition, m as ensureNumberingLevel, n as insertCustomNodeWrite, r as readEmbeddedFonts, o as readTrackingSettings, p as removeCustomNodeWrite, s as sweepCustomNodePayloads } from './custom-node-writes-05qS32px.js';
|
|
10
|
+
export { c as collectFlowBlocks, a as commentBodyText, b as commentInitials, d as contentControlContentOf, e as deepParagraphOrderOfPart, i as isContentControl, f as isContentControlContent, p as paragraphOrderOfPart, w as walkAllStoryParagraphs, g as walkParagraphInline, h as walkStoryBlocks } from './review-paragraph-order-EFaU7TqH.js';
|
|
11
|
+
export { D as DocumentProperties, E as EnsuredHyperlinkRelationship, a as HeadlessDocumentRejection, H as HeadlessDocumentView, b as HeadlessThemeFonts, O as OpenHeadlessDocumentResult, c as authorableHyperlinkTarget, e as ensureHyperlinkRelationship, h as headlessViewOfStore, o as openHeadlessDocument, r as relationshipTargetIn } from './headless-document-view-B7nAiR7P.js';
|
|
12
|
+
export { A as AuthoredNoteProperties, D as DEFAULT_ENDNOTE_PROPERTIES, a as DEFAULT_FOOTNOTE_PROPERTIES, E as EndnotePosition, F as FootnotePosition, N as NoteNumRestart, R as ResolvedEndnoteProperties, b as ResolvedFootnoteProperties, c as authoredDocumentEndnoteProperties, d as authoredDocumentFootnoteProperties, e as authoredEndnotePropertiesFromSectPr, f as authoredFootnotePropertiesFromSectPr, i as isLegalEndnotePosition, g as isLegalFootnotePosition, h as isLegalNumRestart, p as parseAuthoredNoteProperties, r as resolveEndnoteProperties, j as resolveFootnoteProperties, s as settingsPartOf } from './note-properties-MNztEj5s.js';
|
|
13
|
+
export { a as DocumentProtectionEdit, D as DocumentProtectionState, N as NO_DOCUMENT_PROTECTION, r as readDocumentProtection } from './document-protection-Cr59VKLO.js';
|
|
14
|
+
import './editor-scope-OHPwVQ5l.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Serialize normalized XML from a canonical part using repository-controlled
|
|
18
|
+
* prefixes and validated, escaped names and values. This does not yet replace
|
|
19
|
+
* writeDocx; package integration belongs to the subsequent migration pass.
|
|
20
|
+
*/
|
|
21
|
+
declare function serializeOoxmlPart(part: OoxmlPart): string;
|
|
22
|
+
/** Repository-owned namespace-aware semantic XML oracle. */
|
|
23
|
+
declare function canonicalOoxmlFingerprint(value: OoxmlPart | OoxmlNode): string;
|
|
24
|
+
/**
|
|
25
|
+
* Structural equality of two canonical trees, ignoring node ids.
|
|
26
|
+
*
|
|
27
|
+
* Ids differ between two parses of the same bytes, so comparing them would report every reopen as
|
|
28
|
+
* a change. This compares what the document SAYS.
|
|
29
|
+
*/
|
|
30
|
+
declare function ooxmlTreesEqual(left: OoxmlPart | OoxmlNode, right: OoxmlPart | OoxmlNode): boolean;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Validate a parser-created or copy-modified immutable part before publication.
|
|
34
|
+
* Future tree-edit primitives can retain shared nodes and their IDs, while any
|
|
35
|
+
* replacement chooses explicitly whether to retain or allocate identity.
|
|
36
|
+
*/
|
|
37
|
+
declare function validateOoxmlPart(part: OoxmlPart): OoxmlInvariantResult;
|
|
38
|
+
|
|
39
|
+
/** UTF-16 placeholder for one atomic field unit in `paragraphTextOf` / segments. */
|
|
40
|
+
declare const FIELD_ATOM_CHAR = "\uFFFC";
|
|
41
|
+
/**
|
|
42
|
+
* Which part of a complex field a `w:fldChar` marks.
|
|
43
|
+
*
|
|
44
|
+
* A complex field spans many runs: `begin`, the instruction, `separate`, the cached result, then
|
|
45
|
+
* `end` — which is why a field is one logical unit across several nodes.
|
|
46
|
+
*/
|
|
47
|
+
type FldCharType = 'begin' | 'separate' | 'end';
|
|
48
|
+
/** Read `@w:fldCharType` when present and schema-legal. */
|
|
49
|
+
declare function fldCharType(node: OoxmlNode): FldCharType | null;
|
|
50
|
+
/** Whether a node is a `w:fldChar` field boundary marker. */
|
|
51
|
+
declare function isFldCharNode(node: OoxmlNode): node is OoxmlFldCharNode;
|
|
52
|
+
/**
|
|
53
|
+
* Whether a node is `w:instrText` — a field's instruction.
|
|
54
|
+
*
|
|
55
|
+
* Instructions are never EXECUTED or auto-resolved: `DDE` and `INCLUDE*` render inert.
|
|
56
|
+
*/
|
|
57
|
+
declare function isInstrTextNode(node: OoxmlNode): node is OoxmlInstrTextNode;
|
|
58
|
+
/** Whether a node is `w:fldSimple` — a field whose instruction and result are one element. */
|
|
59
|
+
declare function isFldSimpleNode(node: OoxmlNode): node is OoxmlFldSimpleNode;
|
|
60
|
+
/** Typed or generic `w:fldChar` with the given type. */
|
|
61
|
+
declare function isFldChar(node: OoxmlNode, type: FldCharType): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Typed or generic `w:instrText`, and `w:delInstrText` — the form a tracked deletion gives
|
|
64
|
+
* the instruction (§17.16.13), always generic in the canonical tree.
|
|
65
|
+
*
|
|
66
|
+
* One predicate for both on purpose: everything that consumes instruction text (the offset
|
|
67
|
+
* authority, the layout field machine, span collection) must treat a deleted field's
|
|
68
|
+
* instruction exactly like a live one — ingested per phase, never painted. Excluding the
|
|
69
|
+
* deleted form let its `w:delInstrText` fall through those walks as ordinary run content.
|
|
70
|
+
*/
|
|
71
|
+
declare function isInstrText(node: OoxmlNode): boolean;
|
|
72
|
+
/** Typed or generic `w:fldSimple`. */
|
|
73
|
+
declare function isFldSimple(node: OoxmlNode): boolean;
|
|
74
|
+
/** Concatenated text descendants of `w:instrText` (instruction only — never executed). */
|
|
75
|
+
declare function instrTextValue(node: OoxmlNode): string;
|
|
76
|
+
/** `@w:instr` on `w:fldSimple`, or undefined when absent. */
|
|
77
|
+
declare function fldSimpleInstr(node: OoxmlNode): string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Read an on/off WML attribute (`dirty` / `fldLock`).
|
|
80
|
+
*
|
|
81
|
+
* Returns `undefined` when absent, otherwise the OOXML on/off interpretation
|
|
82
|
+
* (present without val, or val not explicitly off → true).
|
|
83
|
+
*/
|
|
84
|
+
declare function fieldOnOffAttribute(node: OoxmlNode, localName: 'dirty' | 'fldLock'): boolean | undefined;
|
|
85
|
+
/** Model text contributed by one atomic field unit. */
|
|
86
|
+
declare function fieldAtomText(): typeof FIELD_ATOM_CHAR;
|
|
87
|
+
/**
|
|
88
|
+
* True when a node is field chrome that never contributes its own model text outside
|
|
89
|
+
* an atomic span (markers + instruction). Cached result `w:t` is separate.
|
|
90
|
+
*/
|
|
91
|
+
declare function isFieldChrome(node: OoxmlNode): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* True when a `w:fldChar` carries `w:ffData` — a LEGACY FORM FIELD (§17.16.17).
|
|
94
|
+
*
|
|
95
|
+
* FORMTEXT, FORMCHECKBOX and FORMDROPDOWN are what a fillable Word form is made of, and Word
|
|
96
|
+
* shades them on sight so a reader can find the blanks. That is a presentation question,
|
|
97
|
+
* answered by the element's presence alone — this predicate never looks inside.
|
|
98
|
+
*
|
|
99
|
+
* Rendering STATE (a checkbox's checked bit, a dropdown's entries and selection) is different:
|
|
100
|
+
* {@link legacyFormFieldDataOf} reads exactly that, bounded, and nothing else. The contract
|
|
101
|
+
* stands: `w:ffData` macro references (`w:entryMacro` / `w:exitMacro`), `w:name`, help/status
|
|
102
|
+
* text and behavior flags are attacker-supplied script references and are NEVER read, returned
|
|
103
|
+
* or resolved by anything in this module.
|
|
104
|
+
*/
|
|
105
|
+
declare function hasLegacyFormFieldData(node: OoxmlNode): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* One atomic field span inside a paragraph for caret / delete / selection.
|
|
108
|
+
*
|
|
109
|
+
* `removeNodeIds` lists every node that must leave with the unit (begin…end chrome and
|
|
110
|
+
* cached-result content for complex fields; the `fldSimple` element for simple fields).
|
|
111
|
+
*
|
|
112
|
+
* `formatRunIds` lists the runs whose `w:rPr` owns displayed result formatting — result-phase
|
|
113
|
+
* runs with measurable cache text for complex fields, child `w:r`s for `fldSimple`, or the
|
|
114
|
+
* separate/begin run when the result is empty. Delete / caret addressing still uses `runId`
|
|
115
|
+
* (the begin / simple node); formatting must not rewrite chrome-only begin runs when the
|
|
116
|
+
* painted glyphs come from a different result run.
|
|
117
|
+
*/
|
|
118
|
+
interface AtomicFieldSpan {
|
|
119
|
+
readonly kind: 'complex' | 'simple';
|
|
120
|
+
/** Addressable segment node (begin `fldChar` or `fldSimple`). */
|
|
121
|
+
readonly node: OoxmlNode;
|
|
122
|
+
/** Run that owns the begin marker; empty string for paragraph-level `fldSimple`. */
|
|
123
|
+
readonly runId: string;
|
|
124
|
+
readonly removeNodeIds: readonly string[];
|
|
125
|
+
/** Runs that own displayed result formatting (may differ from `runId`). */
|
|
126
|
+
readonly formatRunIds: readonly string[];
|
|
127
|
+
}
|
|
128
|
+
/** Collect only fields whose cached result is one atomic model unit. */
|
|
129
|
+
declare function atomicFieldSpansOf(paragraph: OoxmlParagraphNode, options?: {
|
|
130
|
+
readonly maxNesting?: number;
|
|
131
|
+
readonly maxInstructionChars?: number;
|
|
132
|
+
}): readonly AtomicFieldSpan[];
|
|
133
|
+
/** Whether `fldCharType` is a legal ST_FldCharType value (used by tests / guards). */
|
|
134
|
+
declare function isLegalFldCharType(value: string): boolean;
|
|
135
|
+
|
|
136
|
+
/** One addressable unit of paragraph text: text, tab, hard break, or atomic field. */
|
|
137
|
+
interface Segment {
|
|
138
|
+
readonly runId: string;
|
|
139
|
+
readonly node: OoxmlNode;
|
|
140
|
+
readonly start: number;
|
|
141
|
+
readonly end: number;
|
|
142
|
+
/**
|
|
143
|
+
* When set, deleting this segment removes every listed node id in one step (atomic
|
|
144
|
+
* field begin→end or `fldSimple`). Absent for ordinary text/tab/break segments.
|
|
145
|
+
*/
|
|
146
|
+
readonly removeNodeIds?: readonly string[];
|
|
147
|
+
/**
|
|
148
|
+
* When set, run formatting for this atom targets these runs (field result ownership),
|
|
149
|
+
* not necessarily `runId`. Absent for ordinary text/tab/break segments.
|
|
150
|
+
*/
|
|
151
|
+
readonly formatRunIds?: readonly string[];
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Flatten a paragraph into UTF-16 addressable segments, in document order.
|
|
155
|
+
*
|
|
156
|
+
* A HYPERLINK's runs are addressed too. `w:hyperlink` is a run container, not a leaf, and
|
|
157
|
+
* the characters inside a link are ordinary paragraph text: the user selects them, types
|
|
158
|
+
* over them and deletes them like any other. Skipping the container — which is what
|
|
159
|
+
* iterating only direct `w:r` children did — left every link's text with no offsets at all,
|
|
160
|
+
* so `paragraphTextOf` read "Visit or ." for a sentence that says "Visit Example.com or
|
|
161
|
+
* Anthropic's website." and layout, selection and the ops all agreed on the wrong string.
|
|
162
|
+
*
|
|
163
|
+
* Inline CONTENT CONTROLS are the same class of wrapper: their `w:sdtContent` runs join the
|
|
164
|
+
* paragraph's offset stream with no break opportunity at the boundary. Nesting is bounded
|
|
165
|
+
* (`MAX_INLINE_CONTAINER_DEPTH`); beyond the bound the wrapper is opaque so recursion
|
|
166
|
+
* cannot exhaust the stack.
|
|
167
|
+
*
|
|
168
|
+
* `runId` stays the id of the run the content actually lives in, at whatever depth: the
|
|
169
|
+
* appliers resolve it with `findNode` and rebuild that run's children, so nesting costs them
|
|
170
|
+
* nothing.
|
|
171
|
+
*/
|
|
172
|
+
declare function segmentsOf(paragraph: OoxmlParagraphNode): Segment[];
|
|
173
|
+
/** Half-open `[start, end)` of one node in its paragraph's model offset space. */
|
|
174
|
+
interface OffsetSpan {
|
|
175
|
+
readonly start: number;
|
|
176
|
+
readonly end: number;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Every node's place in the paragraph's model offset space, from the SAME walk `segmentsOf`
|
|
180
|
+
* uses.
|
|
181
|
+
*
|
|
182
|
+
* The offset model has exactly one authority, and this is how a caller borrows it. Three
|
|
183
|
+
* private walkers used to re-derive it — one in the tracked-change writer, one in the comment
|
|
184
|
+
* anchor reader, one in the review queue — and all three disagreed with `segmentsOf` and with
|
|
185
|
+
* each other: none gave a note reference or an atomic field its length of one, one counted a
|
|
186
|
+
* field's instruction text as visible characters, and one never descended into `w:hyperlink`
|
|
187
|
+
* at all. The consequences were an anchor short by a link's length, two unrelated comments
|
|
188
|
+
* threaded onto one zero-width offset, and a tracked insert landing a character out in any
|
|
189
|
+
* paragraph carrying a footnote. Patching each walker only resets the clock on the next drift.
|
|
190
|
+
*
|
|
191
|
+
* A node the walk never reaches — content under a `generic` container, or past the nesting cap
|
|
192
|
+
* — has NO span, and {@link ParagraphOffsetIndex.lengthOf} reports zero for it. That is the
|
|
193
|
+
* same answer `segmentsOf` gives: it contributes no addressable characters.
|
|
194
|
+
*/
|
|
195
|
+
interface ParagraphOffsetIndex {
|
|
196
|
+
/** The paragraph's own length, identical to {@link paragraphLength}. */
|
|
197
|
+
readonly length: number;
|
|
198
|
+
readonly segments: readonly Segment[];
|
|
199
|
+
/** Where a node sits, or null when the offset walk never reached it. */
|
|
200
|
+
spanOf(node: OoxmlNode | string): OffsetSpan | null;
|
|
201
|
+
/** A node's model length: `end - start` of its span, and 0 when it has none. */
|
|
202
|
+
lengthOf(node: OoxmlNode | string): number;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* THE paragraph offset authority: maps a paragraph's UTF-16 offsets to the nodes holding them.
|
|
206
|
+
*
|
|
207
|
+
* One authority on purpose. An atomic field spans many nodes but is ONE unit to an offset, and a
|
|
208
|
+
* second implementation that disagreed would place edits inside content that cannot be split.
|
|
209
|
+
*/
|
|
210
|
+
declare function paragraphOffsetIndex(paragraph: OoxmlParagraphNode): ParagraphOffsetIndex;
|
|
211
|
+
/** One inline content control's identity and the UTF-16 span its content covers. */
|
|
212
|
+
interface InlineControlSpan {
|
|
213
|
+
readonly controlId: string;
|
|
214
|
+
readonly start: number;
|
|
215
|
+
readonly end: number;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* The innermost inline content control whose content ends exactly at `offset` — the caret
|
|
219
|
+
* at its right outer edge. What Backspace consults to delete the node as ONE unit
|
|
220
|
+
* (pro-review-and-custom-nodes 4.6): deleting its last character from outside would either
|
|
221
|
+
* strip one letter from a content-locked label (refused, so the key looks dead) or leave a
|
|
222
|
+
* half-deleted chip whose tag still claims the full payload.
|
|
223
|
+
*/
|
|
224
|
+
declare function inlineControlEndingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
225
|
+
/** The forward-delete mirror: the control whose content STARTS exactly at `offset`. */
|
|
226
|
+
declare function inlineControlStartingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
227
|
+
|
|
228
|
+
/** An edited part, or the invariant violations that rejected the edit. */
|
|
229
|
+
type OoxmlEditResult = {
|
|
230
|
+
readonly ok: true;
|
|
231
|
+
readonly part: OoxmlPart;
|
|
232
|
+
} | {
|
|
233
|
+
readonly ok: false;
|
|
234
|
+
readonly issues: readonly OoxmlInvariantIssue[];
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* How an edit primitive validates its result.
|
|
238
|
+
*
|
|
239
|
+
* By default every primitive runs the full-part invariant validation before handing its
|
|
240
|
+
* result back — the safe reading for an isolated call. A TRANSACTION applying many ops pays
|
|
241
|
+
* that full-tree walk once per primitive, which is what made a hundred-paragraph paste
|
|
242
|
+
* quadratic; it defers instead, and runs the same validation ONCE on the final tree before
|
|
243
|
+
* anything is published. Deferring is only sound for a caller that owns a commit boundary:
|
|
244
|
+
* nothing may escape between the unvalidated intermediate and the validated result.
|
|
245
|
+
*/
|
|
246
|
+
interface EditOptions {
|
|
247
|
+
readonly deferValidation?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* A shared minter for `@w:id` on a NEW revision, for the ops of one transaction.
|
|
250
|
+
*
|
|
251
|
+
* `nextRevisionId` walks the whole part to find the highest id in use, and a formatting
|
|
252
|
+
* write emits one op per run — so a Select All + Bold in suggesting mode paid a
|
|
253
|
+
* document-wide walk thousands of times over. The transaction hands its ops one minter
|
|
254
|
+
* instead, and it is DROPPED the moment an op that can import foreign revision ids runs
|
|
255
|
+
* (a paste carries its own), because a stale minter would hand out an id the document had
|
|
256
|
+
* just started using — and two revisions sharing an address are one card in the pane.
|
|
257
|
+
*
|
|
258
|
+
* Absent means "mint your own": every applier falls back to its own walk, which is what a
|
|
259
|
+
* caller outside a transaction gets.
|
|
260
|
+
*/
|
|
261
|
+
readonly revisionIds?: () => string;
|
|
262
|
+
/**
|
|
263
|
+
* The transaction's revision-id bookkeeping for the tracked TEXT ops, where `revisionIds`
|
|
264
|
+
* above hands the property ops one shared id for their whole group.
|
|
265
|
+
*
|
|
266
|
+
* Absent means "mint your own and remember nothing", which is what a caller outside a
|
|
267
|
+
* transaction gets: every applier falls back to its own walk of the part.
|
|
268
|
+
*/
|
|
269
|
+
readonly trackedRevisionIds?: TransactionRevisionIds;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* What one transaction knows about the revision ids its tracked text ops write.
|
|
273
|
+
*
|
|
274
|
+
* TWO questions, and they are the same bookkeeping. `nextRevisionId` walks the whole part, so
|
|
275
|
+
* a replacement — a `deleteText` and an `insertText` in one transaction — walked it twice, and
|
|
276
|
+
* on a five-hundred-page document that doubled the cost of every one. And an insertion aimed
|
|
277
|
+
* at the front edge of a deletion relocates past it only when that deletion is THIS
|
|
278
|
+
* transaction's own: typing over a selection. Backspace, then a keystroke, is two
|
|
279
|
+
* transactions, and there the typed text belongs in FRONT of the struck character, as Word
|
|
280
|
+
* writes it. Adjacency alone cannot tell the two apart; the ids can.
|
|
281
|
+
*/
|
|
282
|
+
interface TransactionRevisionIds {
|
|
283
|
+
/** A fresh `@w:id`, from this transaction's one walk of the part. */
|
|
284
|
+
mint(): string;
|
|
285
|
+
/**
|
|
286
|
+
* Record a wrapper this transaction wrote, by its FULL `CT_TrackChange` identity — id,
|
|
287
|
+
* author and date, as `revisionKey` spells it. Not by the id alone: that number comes out
|
|
288
|
+
* of the file, nothing makes it unique, and a strike joining `w:id="3"` in one paragraph
|
|
289
|
+
* would otherwise claim an unrelated `w:id="3"` elsewhere as this edit's own.
|
|
290
|
+
*/
|
|
291
|
+
wrote(key: string): void;
|
|
292
|
+
/** Whether this transaction wrote a wrapper with that identity. */
|
|
293
|
+
wroteUnder(key: string): boolean;
|
|
294
|
+
}
|
|
295
|
+
/** Every node id currently present in the part. */
|
|
296
|
+
declare function collectNodeIds(part: OoxmlPart): Set<string>;
|
|
297
|
+
/**
|
|
298
|
+
* Mint ids for nodes an edit introduces.
|
|
299
|
+
*
|
|
300
|
+
* Deterministic and collision-checked against the whole part: a structural-path id from the
|
|
301
|
+
* original parse (`/word/document.xml#0.1.2`) and a minted one (`/word/document.xml#new:3`)
|
|
302
|
+
* can never coincide, and the counter skips anything already taken so repeated edits in one
|
|
303
|
+
* session stay unique.
|
|
304
|
+
*
|
|
305
|
+
* The collision check only sees nodes that are IN the tree. A caller that clones a subtree
|
|
306
|
+
* and attaches it LATER — after other ops have replaced the root and reset the counter —
|
|
307
|
+
* must mint in its own `family`: two `new`-family allocators over different roots can hand
|
|
308
|
+
* out the same id, one to a detached clone and one to the tree, and the clone's insertion
|
|
309
|
+
* then fails the duplicate-id invariant.
|
|
310
|
+
*
|
|
311
|
+
* Checks the part's node index directly rather than copying every id into a fresh set: the
|
|
312
|
+
* copy was O(document) per op, and an allocator is created for every op.
|
|
313
|
+
*/
|
|
314
|
+
declare function createNodeIdAllocator(part: OoxmlPart, family?: 'new' | 'paste'): () => string;
|
|
315
|
+
/** Whether a node id exists in the part. */
|
|
316
|
+
declare function hasNode(part: OoxmlPart, nodeId: string): boolean;
|
|
317
|
+
/** Read a node back out of a part by id. */
|
|
318
|
+
declare function findNode(part: OoxmlPart, nodeId: string): OoxmlNode | null;
|
|
319
|
+
/** The element that holds a node, or null for the root and for unknown ids. */
|
|
320
|
+
declare function parentNodeOf(part: OoxmlPart, nodeId: string): OoxmlElement | null;
|
|
321
|
+
/** Replace one node's children wholesale. */
|
|
322
|
+
declare function replaceChildren(part: OoxmlPart, nodeId: string, children: readonly OoxmlNode[], options?: EditOptions): OoxmlEditResult;
|
|
323
|
+
/** Insert children into a node at `index` (clamped to the child list). */
|
|
324
|
+
declare function insertChildren(part: OoxmlPart, nodeId: string, index: number, children: readonly OoxmlNode[], options?: EditOptions): OoxmlEditResult;
|
|
325
|
+
/** Replace one node with another, keeping its position among its siblings. */
|
|
326
|
+
declare function replaceNode(part: OoxmlPart, nodeId: string, replacement: OoxmlNode, options?: EditOptions): OoxmlEditResult;
|
|
327
|
+
/** Remove a node and its subtree. */
|
|
328
|
+
declare function removeNode(part: OoxmlPart, nodeId: string, options?: EditOptions): OoxmlEditResult;
|
|
329
|
+
/**
|
|
330
|
+
* Apply several primitives as ONE atomic step.
|
|
331
|
+
*
|
|
332
|
+
* Each edit runs against the result of the previous one, and the whole sequence is
|
|
333
|
+
* validated once at the end. If any step fails, the ORIGINAL part is what the caller keeps
|
|
334
|
+
* — there is no partially-edited intermediate to publish. This is the shape a multi-`DocOp`
|
|
335
|
+
* store transaction needs.
|
|
336
|
+
*/
|
|
337
|
+
declare function applyEdits(part: OoxmlPart, edits: readonly ((current: OoxmlPart) => OoxmlEditResult)[], options?: EditOptions): OoxmlEditResult;
|
|
338
|
+
|
|
339
|
+
/** Structural validation, run before any tree work so a rejection changes nothing. */
|
|
340
|
+
declare function validateTreeOp(part: OoxmlPart, op: TreeDocOp): TreeOpRejection | null;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Apply one validated op to a part.
|
|
344
|
+
*
|
|
345
|
+
* Validation runs first and returns before any tree work, so a rejected op is a true no-op:
|
|
346
|
+
* the caller keeps the part it passed in, unchanged and still frozen.
|
|
347
|
+
*
|
|
348
|
+
* `options.deferValidation` passes through to the edit primitives: a transaction applying
|
|
349
|
+
* many ops re-validates the whole part once at its commit boundary rather than after every
|
|
350
|
+
* primitive, which is the difference between a paste that is linear and one that is
|
|
351
|
+
* quadratic in document size.
|
|
352
|
+
*/
|
|
353
|
+
declare function applyTreeOp(part: OoxmlPart, op: TreeDocOp, options?: EditOptions): TreeOpResult;
|
|
354
|
+
/** Paragraph text as the ops address it, for tests and callers computing offsets. */
|
|
355
|
+
declare function paragraphTextOf(part: OoxmlPart, paragraphId: string): string | null;
|
|
14
356
|
|
|
15
357
|
/**
|
|
16
358
|
* Every kind of thing the registry gives a stable identity to.
|
|
@@ -777,29 +1119,6 @@ declare function nullRecord<T = unknown>(): Record<string, T>;
|
|
|
777
1119
|
*/
|
|
778
1120
|
declare function toSafeRecord(value: unknown, path?: string): unknown;
|
|
779
1121
|
|
|
780
|
-
/**
|
|
781
|
-
* Serialize normalized XML from a canonical part using repository-controlled
|
|
782
|
-
* prefixes and validated, escaped names and values. This does not yet replace
|
|
783
|
-
* writeDocx; package integration belongs to the subsequent migration pass.
|
|
784
|
-
*/
|
|
785
|
-
declare function serializeOoxmlPart(part: OoxmlPart): string;
|
|
786
|
-
/** Repository-owned namespace-aware semantic XML oracle. */
|
|
787
|
-
declare function canonicalOoxmlFingerprint(value: OoxmlPart | OoxmlNode): string;
|
|
788
|
-
/**
|
|
789
|
-
* Structural equality of two canonical trees, ignoring node ids.
|
|
790
|
-
*
|
|
791
|
-
* Ids differ between two parses of the same bytes, so comparing them would report every reopen as
|
|
792
|
-
* a change. This compares what the document SAYS.
|
|
793
|
-
*/
|
|
794
|
-
declare function ooxmlTreesEqual(left: OoxmlPart | OoxmlNode, right: OoxmlPart | OoxmlNode): boolean;
|
|
795
|
-
|
|
796
|
-
/**
|
|
797
|
-
* Validate a parser-created or copy-modified immutable part before publication.
|
|
798
|
-
* Future tree-edit primitives can retain shared nodes and their IDs, while any
|
|
799
|
-
* replacement chooses explicitly whether to retain or allocate identity.
|
|
800
|
-
*/
|
|
801
|
-
declare function validateOoxmlPart(part: OoxmlPart): OoxmlInvariantResult;
|
|
802
|
-
|
|
803
1122
|
/** Locate `[Content_Types].xml` bytes regardless of zip key spelling. */
|
|
804
1123
|
declare function contentTypesPartBytes(pkg: OoxmlPackage): {
|
|
805
1124
|
readonly storageKey: string;
|
|
@@ -954,248 +1273,40 @@ declare const INERT_EXECUTABLE_KINDS: readonly ["field-dde", "field-include", "m
|
|
|
954
1273
|
type InertExecutableKind = (typeof INERT_EXECUTABLE_KINDS)[number];
|
|
955
1274
|
/** Whether a content kind is one this engine refuses to execute or auto-resolve. */
|
|
956
1275
|
declare function isInertExecutable(kind: string): boolean;
|
|
957
|
-
/** Whether a field instruction's leading keyword is safe to evaluate. */
|
|
958
|
-
declare function isEvaluableField(instruction: string): boolean;
|
|
959
|
-
/** One item a scrub pass considers: its kind, and where in the package it sits. */
|
|
960
|
-
interface ContentItem {
|
|
961
|
-
readonly id: string;
|
|
962
|
-
readonly kind: string;
|
|
963
|
-
}
|
|
964
|
-
/**
|
|
965
|
-
* What an explicit scrub removed.
|
|
966
|
-
*
|
|
967
|
-
* A scrub DECLARES ITSELF non-lossless: removing executable content changes the file, which is a
|
|
968
|
-
* choice a caller makes deliberately rather than a default the engine applies.
|
|
969
|
-
*/
|
|
970
|
-
interface ScrubResult {
|
|
971
|
-
readonly kept: readonly ContentItem[];
|
|
972
|
-
readonly removed: readonly ContentItem[];
|
|
973
|
-
/** A scrub that removes anything is non-lossless by definition. */
|
|
974
|
-
readonly nonLossless: boolean;
|
|
975
|
-
}
|
|
976
|
-
/** Explicit scrub export: remove inert executable classes, report removals. */
|
|
977
|
-
declare function scrubExport(items: readonly ContentItem[]): ScrubResult;
|
|
978
|
-
|
|
979
|
-
/** An edited part, or the invariant violations that rejected the edit. */
|
|
980
|
-
type OoxmlEditResult = {
|
|
981
|
-
readonly ok: true;
|
|
982
|
-
readonly part: OoxmlPart;
|
|
983
|
-
} | {
|
|
984
|
-
readonly ok: false;
|
|
985
|
-
readonly issues: readonly OoxmlInvariantIssue[];
|
|
986
|
-
};
|
|
987
|
-
/**
|
|
988
|
-
* How an edit primitive validates its result.
|
|
989
|
-
*
|
|
990
|
-
* By default every primitive runs the full-part invariant validation before handing its
|
|
991
|
-
* result back — the safe reading for an isolated call. A TRANSACTION applying many ops pays
|
|
992
|
-
* that full-tree walk once per primitive, which is what made a hundred-paragraph paste
|
|
993
|
-
* quadratic; it defers instead, and runs the same validation ONCE on the final tree before
|
|
994
|
-
* anything is published. Deferring is only sound for a caller that owns a commit boundary:
|
|
995
|
-
* nothing may escape between the unvalidated intermediate and the validated result.
|
|
996
|
-
*/
|
|
997
|
-
interface EditOptions {
|
|
998
|
-
readonly deferValidation?: boolean;
|
|
999
|
-
/**
|
|
1000
|
-
* A shared minter for `@w:id` on a NEW revision, for the ops of one transaction.
|
|
1001
|
-
*
|
|
1002
|
-
* `nextRevisionId` walks the whole part to find the highest id in use, and a formatting
|
|
1003
|
-
* write emits one op per run — so a Select All + Bold in suggesting mode paid a
|
|
1004
|
-
* document-wide walk thousands of times over. The transaction hands its ops one minter
|
|
1005
|
-
* instead, and it is DROPPED the moment an op that can import foreign revision ids runs
|
|
1006
|
-
* (a paste carries its own), because a stale minter would hand out an id the document had
|
|
1007
|
-
* just started using — and two revisions sharing an address are one card in the pane.
|
|
1008
|
-
*
|
|
1009
|
-
* Absent means "mint your own": every applier falls back to its own walk, which is what a
|
|
1010
|
-
* caller outside a transaction gets.
|
|
1011
|
-
*/
|
|
1012
|
-
readonly revisionIds?: () => string;
|
|
1013
|
-
/**
|
|
1014
|
-
* The transaction's revision-id bookkeeping for the tracked TEXT ops, where `revisionIds`
|
|
1015
|
-
* above hands the property ops one shared id for their whole group.
|
|
1016
|
-
*
|
|
1017
|
-
* Absent means "mint your own and remember nothing", which is what a caller outside a
|
|
1018
|
-
* transaction gets: every applier falls back to its own walk of the part.
|
|
1019
|
-
*/
|
|
1020
|
-
readonly trackedRevisionIds?: TransactionRevisionIds;
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
* What one transaction knows about the revision ids its tracked text ops write.
|
|
1024
|
-
*
|
|
1025
|
-
* TWO questions, and they are the same bookkeeping. `nextRevisionId` walks the whole part, so
|
|
1026
|
-
* a replacement — a `deleteText` and an `insertText` in one transaction — walked it twice, and
|
|
1027
|
-
* on a five-hundred-page document that doubled the cost of every one. And an insertion aimed
|
|
1028
|
-
* at the front edge of a deletion relocates past it only when that deletion is THIS
|
|
1029
|
-
* transaction's own: typing over a selection. Backspace, then a keystroke, is two
|
|
1030
|
-
* transactions, and there the typed text belongs in FRONT of the struck character, as Word
|
|
1031
|
-
* writes it. Adjacency alone cannot tell the two apart; the ids can.
|
|
1032
|
-
*/
|
|
1033
|
-
interface TransactionRevisionIds {
|
|
1034
|
-
/** A fresh `@w:id`, from this transaction's one walk of the part. */
|
|
1035
|
-
mint(): string;
|
|
1036
|
-
/**
|
|
1037
|
-
* Record a wrapper this transaction wrote, by its FULL `CT_TrackChange` identity — id,
|
|
1038
|
-
* author and date, as `revisionKey` spells it. Not by the id alone: that number comes out
|
|
1039
|
-
* of the file, nothing makes it unique, and a strike joining `w:id="3"` in one paragraph
|
|
1040
|
-
* would otherwise claim an unrelated `w:id="3"` elsewhere as this edit's own.
|
|
1041
|
-
*/
|
|
1042
|
-
wrote(key: string): void;
|
|
1043
|
-
/** Whether this transaction wrote a wrapper with that identity. */
|
|
1044
|
-
wroteUnder(key: string): boolean;
|
|
1045
|
-
}
|
|
1046
|
-
/** Every node id currently present in the part. */
|
|
1047
|
-
declare function collectNodeIds(part: OoxmlPart): Set<string>;
|
|
1048
|
-
/**
|
|
1049
|
-
* Mint ids for nodes an edit introduces.
|
|
1050
|
-
*
|
|
1051
|
-
* Deterministic and collision-checked against the whole part: a structural-path id from the
|
|
1052
|
-
* original parse (`/word/document.xml#0.1.2`) and a minted one (`/word/document.xml#new:3`)
|
|
1053
|
-
* can never coincide, and the counter skips anything already taken so repeated edits in one
|
|
1054
|
-
* session stay unique.
|
|
1055
|
-
*
|
|
1056
|
-
* The collision check only sees nodes that are IN the tree. A caller that clones a subtree
|
|
1057
|
-
* and attaches it LATER — after other ops have replaced the root and reset the counter —
|
|
1058
|
-
* must mint in its own `family`: two `new`-family allocators over different roots can hand
|
|
1059
|
-
* out the same id, one to a detached clone and one to the tree, and the clone's insertion
|
|
1060
|
-
* then fails the duplicate-id invariant.
|
|
1061
|
-
*
|
|
1062
|
-
* Checks the part's node index directly rather than copying every id into a fresh set: the
|
|
1063
|
-
* copy was O(document) per op, and an allocator is created for every op.
|
|
1064
|
-
*/
|
|
1065
|
-
declare function createNodeIdAllocator(part: OoxmlPart, family?: 'new' | 'paste'): () => string;
|
|
1066
|
-
/** Whether a node id exists in the part. */
|
|
1067
|
-
declare function hasNode(part: OoxmlPart, nodeId: string): boolean;
|
|
1068
|
-
/** Read a node back out of a part by id. */
|
|
1069
|
-
declare function findNode(part: OoxmlPart, nodeId: string): OoxmlNode | null;
|
|
1070
|
-
/** The element that holds a node, or null for the root and for unknown ids. */
|
|
1071
|
-
declare function parentNodeOf(part: OoxmlPart, nodeId: string): OoxmlElement | null;
|
|
1072
|
-
/** Replace one node's children wholesale. */
|
|
1073
|
-
declare function replaceChildren(part: OoxmlPart, nodeId: string, children: readonly OoxmlNode[], options?: EditOptions): OoxmlEditResult;
|
|
1074
|
-
/** Insert children into a node at `index` (clamped to the child list). */
|
|
1075
|
-
declare function insertChildren(part: OoxmlPart, nodeId: string, index: number, children: readonly OoxmlNode[], options?: EditOptions): OoxmlEditResult;
|
|
1076
|
-
/** Replace one node with another, keeping its position among its siblings. */
|
|
1077
|
-
declare function replaceNode(part: OoxmlPart, nodeId: string, replacement: OoxmlNode, options?: EditOptions): OoxmlEditResult;
|
|
1078
|
-
/** Remove a node and its subtree. */
|
|
1079
|
-
declare function removeNode(part: OoxmlPart, nodeId: string, options?: EditOptions): OoxmlEditResult;
|
|
1080
|
-
/**
|
|
1081
|
-
* Apply several primitives as ONE atomic step.
|
|
1082
|
-
*
|
|
1083
|
-
* Each edit runs against the result of the previous one, and the whole sequence is
|
|
1084
|
-
* validated once at the end. If any step fails, the ORIGINAL part is what the caller keeps
|
|
1085
|
-
* — there is no partially-edited intermediate to publish. This is the shape a multi-`DocOp`
|
|
1086
|
-
* store transaction needs.
|
|
1087
|
-
*/
|
|
1088
|
-
declare function applyEdits(part: OoxmlPart, edits: readonly ((current: OoxmlPart) => OoxmlEditResult)[], options?: EditOptions): OoxmlEditResult;
|
|
1089
|
-
|
|
1090
|
-
/** UTF-16 placeholder for a page break in paragraph text projections. */
|
|
1091
|
-
declare const PAGE_BREAK_CHAR = "\f";
|
|
1092
|
-
/** What a `w:br` breaks. `other` covers values this engine does not model, kept losslessly. */
|
|
1093
|
-
type HardBreakKind = 'line' | 'page' | 'column' | 'other';
|
|
1094
|
-
/** Read the semantic break kind from a typed `w:br` node. */
|
|
1095
|
-
declare function hardBreakKind(node: OoxmlHardBreakNode): HardBreakKind;
|
|
1096
|
-
/** Whether a node is a `w:br` with `w:type="page"`. */
|
|
1097
|
-
declare function isPageBreakNode(node: OoxmlNode): node is OoxmlHardBreakNode;
|
|
1098
|
-
/** Text projection for a `w:br` node — one UTF-16 code unit per break. */
|
|
1099
|
-
declare function hardBreakText(node: OoxmlHardBreakNode): string;
|
|
1100
|
-
/** Attributes for a newly authored `w:br`. */
|
|
1101
|
-
declare function hardBreakAttributes(kind: 'line' | 'page'): OoxmlHardBreakNode['attributes'];
|
|
1102
|
-
|
|
1103
|
-
/** UTF-16 placeholder for one atomic field unit in `paragraphTextOf` / segments. */
|
|
1104
|
-
declare const FIELD_ATOM_CHAR = "\uFFFC";
|
|
1105
|
-
/**
|
|
1106
|
-
* Which part of a complex field a `w:fldChar` marks.
|
|
1107
|
-
*
|
|
1108
|
-
* A complex field spans many runs: `begin`, the instruction, `separate`, the cached result, then
|
|
1109
|
-
* `end` — which is why a field is one logical unit across several nodes.
|
|
1110
|
-
*/
|
|
1111
|
-
type FldCharType = 'begin' | 'separate' | 'end';
|
|
1112
|
-
/** Read `@w:fldCharType` when present and schema-legal. */
|
|
1113
|
-
declare function fldCharType(node: OoxmlNode): FldCharType | null;
|
|
1114
|
-
/** Whether a node is a `w:fldChar` field boundary marker. */
|
|
1115
|
-
declare function isFldCharNode(node: OoxmlNode): node is OoxmlFldCharNode;
|
|
1116
|
-
/**
|
|
1117
|
-
* Whether a node is `w:instrText` — a field's instruction.
|
|
1118
|
-
*
|
|
1119
|
-
* Instructions are never EXECUTED or auto-resolved: `DDE` and `INCLUDE*` render inert.
|
|
1120
|
-
*/
|
|
1121
|
-
declare function isInstrTextNode(node: OoxmlNode): node is OoxmlInstrTextNode;
|
|
1122
|
-
/** Whether a node is `w:fldSimple` — a field whose instruction and result are one element. */
|
|
1123
|
-
declare function isFldSimpleNode(node: OoxmlNode): node is OoxmlFldSimpleNode;
|
|
1124
|
-
/** Typed or generic `w:fldChar` with the given type. */
|
|
1125
|
-
declare function isFldChar(node: OoxmlNode, type: FldCharType): boolean;
|
|
1126
|
-
/**
|
|
1127
|
-
* Typed or generic `w:instrText`, and `w:delInstrText` — the form a tracked deletion gives
|
|
1128
|
-
* the instruction (§17.16.13), always generic in the canonical tree.
|
|
1129
|
-
*
|
|
1130
|
-
* One predicate for both on purpose: everything that consumes instruction text (the offset
|
|
1131
|
-
* authority, the layout field machine, span collection) must treat a deleted field's
|
|
1132
|
-
* instruction exactly like a live one — ingested per phase, never painted. Excluding the
|
|
1133
|
-
* deleted form let its `w:delInstrText` fall through those walks as ordinary run content.
|
|
1134
|
-
*/
|
|
1135
|
-
declare function isInstrText(node: OoxmlNode): boolean;
|
|
1136
|
-
/** Typed or generic `w:fldSimple`. */
|
|
1137
|
-
declare function isFldSimple(node: OoxmlNode): boolean;
|
|
1138
|
-
/** Concatenated text descendants of `w:instrText` (instruction only — never executed). */
|
|
1139
|
-
declare function instrTextValue(node: OoxmlNode): string;
|
|
1140
|
-
/** `@w:instr` on `w:fldSimple`, or undefined when absent. */
|
|
1141
|
-
declare function fldSimpleInstr(node: OoxmlNode): string | undefined;
|
|
1142
|
-
/**
|
|
1143
|
-
* Read an on/off WML attribute (`dirty` / `fldLock`).
|
|
1144
|
-
*
|
|
1145
|
-
* Returns `undefined` when absent, otherwise the OOXML on/off interpretation
|
|
1146
|
-
* (present without val, or val not explicitly off → true).
|
|
1147
|
-
*/
|
|
1148
|
-
declare function fieldOnOffAttribute(node: OoxmlNode, localName: 'dirty' | 'fldLock'): boolean | undefined;
|
|
1149
|
-
/** Model text contributed by one atomic field unit. */
|
|
1150
|
-
declare function fieldAtomText(): typeof FIELD_ATOM_CHAR;
|
|
1151
|
-
/**
|
|
1152
|
-
* True when a node is field chrome that never contributes its own model text outside
|
|
1153
|
-
* an atomic span (markers + instruction). Cached result `w:t` is separate.
|
|
1154
|
-
*/
|
|
1155
|
-
declare function isFieldChrome(node: OoxmlNode): boolean;
|
|
1156
|
-
/**
|
|
1157
|
-
* True when a `w:fldChar` carries `w:ffData` — a LEGACY FORM FIELD (§17.16.17).
|
|
1158
|
-
*
|
|
1159
|
-
* FORMTEXT, FORMCHECKBOX and FORMDROPDOWN are what a fillable Word form is made of, and Word
|
|
1160
|
-
* shades them on sight so a reader can find the blanks. That is a presentation question,
|
|
1161
|
-
* answered by the element's presence alone — this predicate never looks inside.
|
|
1162
|
-
*
|
|
1163
|
-
* Rendering STATE (a checkbox's checked bit, a dropdown's entries and selection) is different:
|
|
1164
|
-
* {@link legacyFormFieldDataOf} reads exactly that, bounded, and nothing else. The contract
|
|
1165
|
-
* stands: `w:ffData` macro references (`w:entryMacro` / `w:exitMacro`), `w:name`, help/status
|
|
1166
|
-
* text and behavior flags are attacker-supplied script references and are NEVER read, returned
|
|
1167
|
-
* or resolved by anything in this module.
|
|
1168
|
-
*/
|
|
1169
|
-
declare function hasLegacyFormFieldData(node: OoxmlNode): boolean;
|
|
1276
|
+
/** Whether a field instruction's leading keyword is safe to evaluate. */
|
|
1277
|
+
declare function isEvaluableField(instruction: string): boolean;
|
|
1278
|
+
/** One item a scrub pass considers: its kind, and where in the package it sits. */
|
|
1279
|
+
interface ContentItem {
|
|
1280
|
+
readonly id: string;
|
|
1281
|
+
readonly kind: string;
|
|
1282
|
+
}
|
|
1170
1283
|
/**
|
|
1171
|
-
*
|
|
1172
|
-
*
|
|
1173
|
-
* `removeNodeIds` lists every node that must leave with the unit (begin…end chrome and
|
|
1174
|
-
* cached-result content for complex fields; the `fldSimple` element for simple fields).
|
|
1284
|
+
* What an explicit scrub removed.
|
|
1175
1285
|
*
|
|
1176
|
-
*
|
|
1177
|
-
*
|
|
1178
|
-
* separate/begin run when the result is empty. Delete / caret addressing still uses `runId`
|
|
1179
|
-
* (the begin / simple node); formatting must not rewrite chrome-only begin runs when the
|
|
1180
|
-
* painted glyphs come from a different result run.
|
|
1286
|
+
* A scrub DECLARES ITSELF non-lossless: removing executable content changes the file, which is a
|
|
1287
|
+
* choice a caller makes deliberately rather than a default the engine applies.
|
|
1181
1288
|
*/
|
|
1182
|
-
interface
|
|
1183
|
-
readonly
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
readonly runId: string;
|
|
1188
|
-
readonly removeNodeIds: readonly string[];
|
|
1189
|
-
/** Runs that own displayed result formatting (may differ from `runId`). */
|
|
1190
|
-
readonly formatRunIds: readonly string[];
|
|
1289
|
+
interface ScrubResult {
|
|
1290
|
+
readonly kept: readonly ContentItem[];
|
|
1291
|
+
readonly removed: readonly ContentItem[];
|
|
1292
|
+
/** A scrub that removes anything is non-lossless by definition. */
|
|
1293
|
+
readonly nonLossless: boolean;
|
|
1191
1294
|
}
|
|
1192
|
-
/**
|
|
1193
|
-
declare function
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
/**
|
|
1198
|
-
|
|
1295
|
+
/** Explicit scrub export: remove inert executable classes, report removals. */
|
|
1296
|
+
declare function scrubExport(items: readonly ContentItem[]): ScrubResult;
|
|
1297
|
+
|
|
1298
|
+
/** UTF-16 placeholder for a page break in paragraph text projections. */
|
|
1299
|
+
declare const PAGE_BREAK_CHAR = "\f";
|
|
1300
|
+
/** What a `w:br` breaks. `other` covers values this engine does not model, kept losslessly. */
|
|
1301
|
+
type HardBreakKind = 'line' | 'page' | 'column' | 'other';
|
|
1302
|
+
/** Read the semantic break kind from a typed `w:br` node. */
|
|
1303
|
+
declare function hardBreakKind(node: OoxmlHardBreakNode): HardBreakKind;
|
|
1304
|
+
/** Whether a node is a `w:br` with `w:type="page"`. */
|
|
1305
|
+
declare function isPageBreakNode(node: OoxmlNode): node is OoxmlHardBreakNode;
|
|
1306
|
+
/** Text projection for a `w:br` node — one UTF-16 code unit per break. */
|
|
1307
|
+
declare function hardBreakText(node: OoxmlHardBreakNode): string;
|
|
1308
|
+
/** Attributes for a newly authored `w:br`. */
|
|
1309
|
+
declare function hardBreakAttributes(kind: 'line' | 'page'): OoxmlHardBreakNode['attributes'];
|
|
1199
1310
|
|
|
1200
1311
|
/** Parsed TOC instruction. Unknown switches are ignored for generation but left on the wire. */
|
|
1201
1312
|
interface TocInstruction {
|
|
@@ -1540,162 +1651,33 @@ declare function mintedParagraphIdentityAttributes(prefix: string, value: string
|
|
|
1540
1651
|
*/
|
|
1541
1652
|
declare function normalizeParagraphIdentity(part: OoxmlPart): OoxmlPart;
|
|
1542
1653
|
|
|
1543
|
-
/** One
|
|
1544
|
-
interface
|
|
1545
|
-
|
|
1546
|
-
readonly
|
|
1547
|
-
|
|
1548
|
-
readonly
|
|
1549
|
-
/**
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
readonly removeNodeIds?: readonly string[];
|
|
1554
|
-
/**
|
|
1555
|
-
* When set, run formatting for this atom targets these runs (field result ownership),
|
|
1556
|
-
* not necessarily `runId`. Absent for ordinary text/tab/break segments.
|
|
1557
|
-
*/
|
|
1558
|
-
readonly formatRunIds?: readonly string[];
|
|
1559
|
-
}
|
|
1560
|
-
/**
|
|
1561
|
-
* Flatten a paragraph into UTF-16 addressable segments, in document order.
|
|
1562
|
-
*
|
|
1563
|
-
* A HYPERLINK's runs are addressed too. `w:hyperlink` is a run container, not a leaf, and
|
|
1564
|
-
* the characters inside a link are ordinary paragraph text: the user selects them, types
|
|
1565
|
-
* over them and deletes them like any other. Skipping the container — which is what
|
|
1566
|
-
* iterating only direct `w:r` children did — left every link's text with no offsets at all,
|
|
1567
|
-
* so `paragraphTextOf` read "Visit or ." for a sentence that says "Visit Example.com or
|
|
1568
|
-
* Anthropic's website." and layout, selection and the ops all agreed on the wrong string.
|
|
1569
|
-
*
|
|
1570
|
-
* Inline CONTENT CONTROLS are the same class of wrapper: their `w:sdtContent` runs join the
|
|
1571
|
-
* paragraph's offset stream with no break opportunity at the boundary. Nesting is bounded
|
|
1572
|
-
* (`MAX_INLINE_CONTAINER_DEPTH`); beyond the bound the wrapper is opaque so recursion
|
|
1573
|
-
* cannot exhaust the stack.
|
|
1574
|
-
*
|
|
1575
|
-
* `runId` stays the id of the run the content actually lives in, at whatever depth: the
|
|
1576
|
-
* appliers resolve it with `findNode` and rebuild that run's children, so nesting costs them
|
|
1577
|
-
* nothing.
|
|
1578
|
-
*/
|
|
1579
|
-
declare function segmentsOf(paragraph: OoxmlParagraphNode): Segment[];
|
|
1580
|
-
/** Half-open `[start, end)` of one node in its paragraph's model offset space. */
|
|
1581
|
-
interface OffsetSpan {
|
|
1582
|
-
readonly start: number;
|
|
1583
|
-
readonly end: number;
|
|
1584
|
-
}
|
|
1585
|
-
/**
|
|
1586
|
-
* Every node's place in the paragraph's model offset space, from the SAME walk `segmentsOf`
|
|
1587
|
-
* uses.
|
|
1588
|
-
*
|
|
1589
|
-
* The offset model has exactly one authority, and this is how a caller borrows it. Three
|
|
1590
|
-
* private walkers used to re-derive it — one in the tracked-change writer, one in the comment
|
|
1591
|
-
* anchor reader, one in the review queue — and all three disagreed with `segmentsOf` and with
|
|
1592
|
-
* each other: none gave a note reference or an atomic field its length of one, one counted a
|
|
1593
|
-
* field's instruction text as visible characters, and one never descended into `w:hyperlink`
|
|
1594
|
-
* at all. The consequences were an anchor short by a link's length, two unrelated comments
|
|
1595
|
-
* threaded onto one zero-width offset, and a tracked insert landing a character out in any
|
|
1596
|
-
* paragraph carrying a footnote. Patching each walker only resets the clock on the next drift.
|
|
1597
|
-
*
|
|
1598
|
-
* A node the walk never reaches — content under a `generic` container, or past the nesting cap
|
|
1599
|
-
* — has NO span, and {@link ParagraphOffsetIndex.lengthOf} reports zero for it. That is the
|
|
1600
|
-
* same answer `segmentsOf` gives: it contributes no addressable characters.
|
|
1601
|
-
*/
|
|
1602
|
-
interface ParagraphOffsetIndex {
|
|
1603
|
-
/** The paragraph's own length, identical to {@link paragraphLength}. */
|
|
1604
|
-
readonly length: number;
|
|
1605
|
-
readonly segments: readonly Segment[];
|
|
1606
|
-
/** Where a node sits, or null when the offset walk never reached it. */
|
|
1607
|
-
spanOf(node: OoxmlNode | string): OffsetSpan | null;
|
|
1608
|
-
/** A node's model length: `end - start` of its span, and 0 when it has none. */
|
|
1609
|
-
lengthOf(node: OoxmlNode | string): number;
|
|
1654
|
+
/** One `w:docPart` of the glossary, with the blocks its body holds. */
|
|
1655
|
+
interface BuildingBlock {
|
|
1656
|
+
/** `w:docPartPr/w:name`, the identity a control's placeholder and a pick refer to. */
|
|
1657
|
+
readonly name: string;
|
|
1658
|
+
/** `w:category/w:gallery`, an `ST_DocPartGallery` value such as `docParts`. */
|
|
1659
|
+
readonly gallery: string;
|
|
1660
|
+
/** `w:category/w:name`; `General` when the block declares none. */
|
|
1661
|
+
readonly category: string;
|
|
1662
|
+
/** The `w:docPartBody` children: paragraphs, tables and block controls, in order. */
|
|
1663
|
+
readonly blocks: readonly OoxmlNode[];
|
|
1610
1664
|
}
|
|
1611
|
-
/**
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
* second implementation that disagreed would place edits inside content that cannot be split.
|
|
1616
|
-
*/
|
|
1617
|
-
declare function paragraphOffsetIndex(paragraph: OoxmlParagraphNode): ParagraphOffsetIndex;
|
|
1618
|
-
/** One inline content control's identity and the UTF-16 span its content covers. */
|
|
1619
|
-
interface InlineControlSpan {
|
|
1620
|
-
readonly controlId: string;
|
|
1621
|
-
readonly start: number;
|
|
1622
|
-
readonly end: number;
|
|
1665
|
+
/** The gallery and category a `w:docPartList` control lists. */
|
|
1666
|
+
interface BuildingBlockGalleryFilter {
|
|
1667
|
+
readonly gallery: string;
|
|
1668
|
+
readonly category: string | null;
|
|
1623
1669
|
}
|
|
1670
|
+
/** The glossary part, through the main part's relationship or the conventional name. */
|
|
1671
|
+
declare function glossaryPartOf(pkg: OoxmlPackage): OoxmlPart | null;
|
|
1672
|
+
/** Every named building block of the glossary, in authored order. Empty without a glossary. */
|
|
1673
|
+
declare function buildingBlocksOf(pkg: OoxmlPackage): readonly BuildingBlock[];
|
|
1674
|
+
/** The gallery a `w:docPartList` control lists, or null for any other control. */
|
|
1675
|
+
declare function buildingBlockGalleryOf(control: OoxmlNode): BuildingBlockGalleryFilter | null;
|
|
1624
1676
|
/**
|
|
1625
|
-
* The
|
|
1626
|
-
*
|
|
1627
|
-
* (pro-review-and-custom-nodes 4.6): deleting its last character from outside would either
|
|
1628
|
-
* strip one letter from a content-locked label (refused, so the key looks dead) or leave a
|
|
1629
|
-
* half-deleted chip whose tag still claims the full payload.
|
|
1630
|
-
*/
|
|
1631
|
-
declare function inlineControlEndingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1632
|
-
/** The forward-delete mirror: the control whose content STARTS exactly at `offset`. */
|
|
1633
|
-
declare function inlineControlStartingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1634
|
-
|
|
1635
|
-
/** Structural validation, run before any tree work so a rejection changes nothing. */
|
|
1636
|
-
declare function validateTreeOp(part: OoxmlPart, op: TreeDocOp): TreeOpRejection | null;
|
|
1637
|
-
|
|
1638
|
-
/**
|
|
1639
|
-
* Apply one validated op to a part.
|
|
1640
|
-
*
|
|
1641
|
-
* Validation runs first and returns before any tree work, so a rejected op is a true no-op:
|
|
1642
|
-
* the caller keeps the part it passed in, unchanged and still frozen.
|
|
1643
|
-
*
|
|
1644
|
-
* `options.deferValidation` passes through to the edit primitives: a transaction applying
|
|
1645
|
-
* many ops re-validates the whole part once at its commit boundary rather than after every
|
|
1646
|
-
* primitive, which is the difference between a paste that is linear and one that is
|
|
1647
|
-
* quadratic in document size.
|
|
1648
|
-
*/
|
|
1649
|
-
declare function applyTreeOp(part: OoxmlPart, op: TreeDocOp, options?: EditOptions): TreeOpResult;
|
|
1650
|
-
/** Paragraph text as the ops address it, for tests and callers computing offsets. */
|
|
1651
|
-
declare function paragraphTextOf(part: OoxmlPart, paragraphId: string): string | null;
|
|
1652
|
-
|
|
1653
|
-
/**
|
|
1654
|
-
* Read forms protection from the settings root.
|
|
1655
|
-
*
|
|
1656
|
-
* Delegates to the ONE parse of `w:documentProtection` rather than reading the element again:
|
|
1657
|
-
* a second reading of `@w:enforcement` is how a document ends up protected to the Review menu
|
|
1658
|
-
* and unprotected to the store.
|
|
1659
|
-
*/
|
|
1660
|
-
declare function formsProtectionEnabled(root: OoxmlNode | null | undefined): boolean;
|
|
1661
|
-
/**
|
|
1662
|
-
* Whether the section owning a node still has form protection on.
|
|
1663
|
-
*
|
|
1664
|
-
* `w:formProt` is per-section, so a protected document may carry an unprotected section. The
|
|
1665
|
-
* owning section is the first `w:sectPr` at or after the node in body order, which is how a
|
|
1666
|
-
* section's extent is expressed in the body at all.
|
|
1677
|
+
* The blocks a gallery control offers: same gallery, and the control's category when it names
|
|
1678
|
+
* one. Sorted by category, then name, as Word groups its list.
|
|
1667
1679
|
*/
|
|
1668
|
-
declare function
|
|
1669
|
-
|
|
1670
|
-
interface RevisionSite {
|
|
1671
|
-
readonly node: OoxmlElement;
|
|
1672
|
-
readonly parent: OoxmlElement | null;
|
|
1673
|
-
/** True when this site cannot be resolved and the whole op must refuse. */
|
|
1674
|
-
readonly refused: boolean;
|
|
1675
|
-
/** True for `w:pPr/w:rPr/w:ins|w:del` — the paragraph MARK, not content. */
|
|
1676
|
-
readonly paragraphMark: boolean;
|
|
1677
|
-
/** True for `w:rPrChange` / `w:pPrChange`. */
|
|
1678
|
-
readonly propertyChange: boolean;
|
|
1679
|
-
/**
|
|
1680
|
-
* How many content-revision wrappers ENCLOSE this one, counted within its own paragraph.
|
|
1681
|
-
*
|
|
1682
|
-
* Revisions nest for real: `w:ins` wrapping `w:del` is content one reviewer added and another
|
|
1683
|
-
* struck, and both stay pending because each author has to be answered separately. The two
|
|
1684
|
-
* wrappers then cover exactly the same characters, so a range cannot tell them apart and
|
|
1685
|
-
* "which change is this text under" has only one honest answer — the innermost one, which is
|
|
1686
|
-
* the change that decides what the reader is looking at.
|
|
1687
|
-
*
|
|
1688
|
-
* Relative to the paragraph or table subtree, which is the unit the site walk memoizes. That
|
|
1689
|
-
* is enough and it is what keeps the memo valid: a content revision cannot enclose a
|
|
1690
|
-
* paragraph, and two sites can only cover one position if they are in the same paragraph.
|
|
1691
|
-
*/
|
|
1692
|
-
readonly nesting: number;
|
|
1693
|
-
}
|
|
1694
|
-
/** Every revision-bearing element in the part. */
|
|
1695
|
-
declare function collectRevisionSites(part: OoxmlPart): RevisionSite[];
|
|
1696
|
-
|
|
1697
|
-
/** Every {@link TreeDocOpKind}, for validation and exhaustiveness checks. */
|
|
1698
|
-
declare const TREE_DOC_OP_KINDS: readonly ["replaceStoryBlocks", "insertText", "deleteText", "setParagraphMarkRevision", "proposeParagraphMerge", "insertCommentMarker", "acceptRevision", "rejectRevision", "acceptAllRevisions", "rejectAllRevisions", "insertTab", "insertHardBreak", "insertPageBreak", "insertPageField", "setFieldCode", "setListLevel", "setListNumbering", "setParagraphTabStops", "setParagraphMarkProperties", "splitParagraph", "splitParagraphMany", "joinParagraphs", "setRunProperties", "setParagraphProperties", "setSectionProperties", "setSectionMark", "insertHyperlink", "setHyperlinkTarget", "removeHyperlink", "setMathEquation", "removeMathEquation", "setContentControlValue", "removeContentControl", "insertInlineContentControl", "addRepeatingSectionItem", "removeRepeatingSectionItem", "deleteBlock", "insertTable", "insertTableRow", "deleteTableRow", "insertTableColumn", "deleteTableColumn", "setTableColumnWidths", "setTableRightEdgeWidth", "setTableRowHeight", "setTableProperties", "authorTable", "setTableCellBorders", "setTableCellFill", "setTableCellVerticalAlignment", "createHeaderFooter", "deleteHeaderFooter", "linkToPrevious", "unlinkFromPrevious", "setSectionFurnitureOptions", "setDocumentProtection", "insertNote", "deleteNote", "convertNote", "convertAllNotes", "setNoteProperties", "setContentControlProperties", "insertContentControl", "insertFragment", "insertDrawing", "replaceDrawingResource", "deleteDrawing", "resizeDrawing", "cropDrawing", "positionDrawing", "setDrawingWrap", "setDrawingMetadata", "setDrawingLocks", "transformDrawing", "insertToc", "replaceTocResult", "rewriteTocPageNumbers", "refreshFieldResults", "setTextFormFieldDefault", "commitTextFormField"];
|
|
1680
|
+
declare function buildingBlocksForControl(pkg: OoxmlPackage, control: OoxmlNode): readonly BuildingBlock[];
|
|
1699
1681
|
|
|
1700
1682
|
/**
|
|
1701
1683
|
* Which story a comment deletion or resolution may read markers from.
|
|
@@ -2420,6 +2402,33 @@ declare function formattableRanges(part: OoxmlPart, paragraphId: string, start:
|
|
|
2420
2402
|
*/
|
|
2421
2403
|
declare function runsCovering(part: OoxmlPart, paragraphId: string, start: number, end: number, displayMode?: FormattingDisplayMode, authorFilter?: FormattingRevisionAuthorFilter): readonly OoxmlNode[];
|
|
2422
2404
|
|
|
2405
|
+
interface RevisionSite {
|
|
2406
|
+
readonly node: OoxmlElement;
|
|
2407
|
+
readonly parent: OoxmlElement | null;
|
|
2408
|
+
/** True when this site cannot be resolved and the whole op must refuse. */
|
|
2409
|
+
readonly refused: boolean;
|
|
2410
|
+
/** True for `w:pPr/w:rPr/w:ins|w:del` — the paragraph MARK, not content. */
|
|
2411
|
+
readonly paragraphMark: boolean;
|
|
2412
|
+
/** True for `w:rPrChange` / `w:pPrChange`. */
|
|
2413
|
+
readonly propertyChange: boolean;
|
|
2414
|
+
/**
|
|
2415
|
+
* How many content-revision wrappers ENCLOSE this one, counted within its own paragraph.
|
|
2416
|
+
*
|
|
2417
|
+
* Revisions nest for real: `w:ins` wrapping `w:del` is content one reviewer added and another
|
|
2418
|
+
* struck, and both stay pending because each author has to be answered separately. The two
|
|
2419
|
+
* wrappers then cover exactly the same characters, so a range cannot tell them apart and
|
|
2420
|
+
* "which change is this text under" has only one honest answer — the innermost one, which is
|
|
2421
|
+
* the change that decides what the reader is looking at.
|
|
2422
|
+
*
|
|
2423
|
+
* Relative to the paragraph or table subtree, which is the unit the site walk memoizes. That
|
|
2424
|
+
* is enough and it is what keeps the memo valid: a content revision cannot enclose a
|
|
2425
|
+
* paragraph, and two sites can only cover one position if they are in the same paragraph.
|
|
2426
|
+
*/
|
|
2427
|
+
readonly nesting: number;
|
|
2428
|
+
}
|
|
2429
|
+
/** Every revision-bearing element in the part. */
|
|
2430
|
+
declare function collectRevisionSites(part: OoxmlPart): RevisionSite[];
|
|
2431
|
+
|
|
2423
2432
|
/** The `w:p` a node sits inside, and the model offset it starts at within that paragraph. */
|
|
2424
2433
|
interface SiteLocation {
|
|
2425
2434
|
readonly paragraphId: string;
|
|
@@ -2597,4 +2606,30 @@ declare function wrapTargetToAnchorSpec(target: ImageWrapTarget): {
|
|
|
2597
2606
|
/** Whether an op is one of the drawing ops. Narrows the type. */
|
|
2598
2607
|
declare function isDrawingTreeDocOp(op: TreeDocOp): op is DrawingTreeDocOp;
|
|
2599
2608
|
|
|
2600
|
-
|
|
2609
|
+
/**
|
|
2610
|
+
* Fill every empty prompt-bearing control in `part` with its placeholder and mark it as
|
|
2611
|
+
* showing one. Returns `part` itself when there is nothing to fill.
|
|
2612
|
+
*/
|
|
2613
|
+
declare function materializeGlossaryPlaceholders(pkg: OoxmlPackage, part: OoxmlPart): OoxmlPart;
|
|
2614
|
+
|
|
2615
|
+
/**
|
|
2616
|
+
* Read forms protection from the settings root.
|
|
2617
|
+
*
|
|
2618
|
+
* Delegates to the ONE parse of `w:documentProtection` rather than reading the element again:
|
|
2619
|
+
* a second reading of `@w:enforcement` is how a document ends up protected to the Review menu
|
|
2620
|
+
* and unprotected to the store.
|
|
2621
|
+
*/
|
|
2622
|
+
declare function formsProtectionEnabled(root: OoxmlNode | null | undefined): boolean;
|
|
2623
|
+
/**
|
|
2624
|
+
* Whether the section owning a node still has form protection on.
|
|
2625
|
+
*
|
|
2626
|
+
* `w:formProt` is per-section, so a protected document may carry an unprotected section. The
|
|
2627
|
+
* owning section is the first `w:sectPr` at or after the node in body order, which is how a
|
|
2628
|
+
* section's extent is expressed in the body at all.
|
|
2629
|
+
*/
|
|
2630
|
+
declare function sectionProtectsForms(part: OoxmlPart, nodeId: string): boolean;
|
|
2631
|
+
|
|
2632
|
+
/** Every {@link TreeDocOpKind}, for validation and exhaustiveness checks. */
|
|
2633
|
+
declare const TREE_DOC_OP_KINDS: readonly ["replaceStoryBlocks", "insertText", "deleteText", "setParagraphMarkRevision", "proposeParagraphMerge", "insertCommentMarker", "acceptRevision", "rejectRevision", "acceptAllRevisions", "rejectAllRevisions", "insertTab", "insertHardBreak", "insertPageBreak", "insertPageField", "setFieldCode", "setListLevel", "setListNumbering", "setParagraphTabStops", "setParagraphMarkProperties", "splitParagraph", "splitParagraphMany", "joinParagraphs", "setRunProperties", "setParagraphProperties", "setSectionProperties", "setSectionMark", "insertHyperlink", "setHyperlinkTarget", "removeHyperlink", "setMathEquation", "removeMathEquation", "setContentControlValue", "removeContentControl", "insertInlineContentControl", "addRepeatingSectionItem", "removeRepeatingSectionItem", "deleteBlock", "insertTable", "insertTableRow", "deleteTableRow", "insertTableColumn", "deleteTableColumn", "setTableColumnWidths", "setTableRightEdgeWidth", "setTableRowHeight", "setTableProperties", "authorTable", "setTableCellBorders", "setTableCellFill", "setTableCellVerticalAlignment", "createHeaderFooter", "deleteHeaderFooter", "linkToPrevious", "unlinkFromPrevious", "setSectionFurnitureOptions", "setDocumentProtection", "insertNote", "deleteNote", "convertNote", "convertAllNotes", "setNoteProperties", "setContentControlProperties", "insertContentControl", "insertFragment", "insertDrawing", "replaceDrawingResource", "deleteDrawing", "resizeDrawing", "cropDrawing", "positionDrawing", "setDrawingWrap", "setDrawingMetadata", "setDrawingLocks", "transformDrawing", "insertToc", "replaceTocResult", "rewriteTocPageNumbers", "refreshFieldResults", "setTextFormFieldDefault", "commitTextFormField", "setLegacyCheckbox", "setLegacyDropdown", "insertBuildingBlock"];
|
|
2634
|
+
|
|
2635
|
+
export { ALL_FROZEN_IDS, AUTHORABLE_PARAGRAPH_PROPERTIES, AUTHORABLE_RUN_PROPERTIES, type AddCommentRequest, type AddCommentResult, type AnchorSnapshot, type AtomicFieldSpan, type AuditPort, type AuthorizationPort, BoundedCounter, Budget, BudgetError, type BuildingBlock, type BuildingBlockGalleryFilter, CANONICAL_MUTATION_ORIGINS, COMPARATORS, CUSTOM_NODE_XPATH_PREFIX, CUSTOM_XML_PROPS_REL, CUSTOM_XML_PROPS_TYPE, CUSTOM_XML_REL, CancellationController, CancellationError, type CancellationPhase, type CancellationPort, type CancellationToken, type CapabilityId, type ClockPort, type CommentAnchorRequest, type CommentDeletionOwner, CommentRecord, CommentThreadState, type ComparatorDescriptor, type ComparatorMode, type ComparatorName, type ComparisonResult, type ConformanceFixture, type ContentItem, type Contribution, type CustomNodeBinding, type CustomNodeExportPolicy, type CustomNodeExportRequest, type CustomNodeExportResult, CustomNodeWriteResult, type CustomXmlDataPart, type CustomXmlDataPartResult, type CustomXmlNode, DANGEROUS_KEYS, DATASTORE_NAMESPACE_URI, DEFAULT_FORMATTING_DISPLAY_MODE, DEFAULT_VIEW_SETTINGS, DEPENDENCY_KEY_IDS, DangerousKeyError, type DetectedToc, DeterministicClock, DeterministicMemoryMeter, type DigestDifference, type DocumentViewSettings, DrawingTreeDocOp, type EditOptions, type EncodedEnvelope, type EnforcementPhase, type ExternalResourceConsentPort, FIELD_ATOM_CHAR, type FeatureBundle, type FixtureExpectation, type FixtureOutcome, type FixtureSource, type FixtureStep, type FldCharType, type FontPort, type FormattingDisplayMode, type FormattingRevisionAuthorFilter, type FragmentCoverage, type FragmentExtractRejection, type FragmentExtractResult, type FragmentMergeRejection, type FragmentMergeResult, type HardBreakKind, type HrefProjection, ID_KINDS, INERT_EXECUTABLE_KINDS, type IdKind, type IdentityPort, type ImagePort, ImageWrapTarget, ImpactClass, type InertExecutableKind, type InlineControlSpan, InsertCustomNodeWrite, type Json, LIMIT_KEYS, LIMIT_SPECS, LimitExceededError, type LimitSpec, type LimitUnit, type LinkableReviewItem, MAX_STORY_SDT_NESTING, type ModelChangeSummary, NON_CANONICAL_ORIGINS, ORIGIN_IDS, type OffsetSpan, OoxmlAttribute, type OoxmlEditResult, OoxmlElement, OoxmlFldCharNode, OoxmlFldSimpleNode, OoxmlHardBreakNode, type OoxmlIndexes, OoxmlInstrTextNode, OoxmlInvariantIssue, OoxmlInvariantResult, OoxmlNode, OoxmlPackage, OoxmlParagraphNode, OoxmlPart, OoxmlProperty, type OoxmlStoryKind, type OoxmlStoryRoot, type OperationContext, type OperationInit, PAGE_BREAK_CHAR, type PackageCommentDelete, type PackageInvariantCode, type PackageInvariantIssue, type PackageInvariantResult, type ParagraphDigest, type ParagraphIndexEntry, type ParagraphOffsetIndex, type PersistencePort, type Points, PortRegistry, PortResolutionError, PrefixAllocator, RESULT_IDS, RUNTIME_PORT_IDS, RegistryError, type RegistryErrorCode, RelationshipRecord, type ReplacementPolicy, type ReplayOutcome, type ReplayReport, type ReplayStore, type Reservation, type ResolveOptions, type ResolvedRegistry, type ResourceAccountingPort, ResourceLimits, ReviewCommentItem, ReviewItem, ReviewModelInput, ReviewPosition, ReviewRange, ReviewRevisionItem, type RunPropertyEdit, SEARCH_MATCH_LIMIT, SEARCH_QUERY_MAX, type SchedulingPort, type ScrubResult, type Segment, type SemVer, type SemanticDigest, SequentialIdentity, type SetCommentResolvedResult, type ShapingPort, type StoryDigest, type StoryIndexEntry, StoryScope, type StyleIndexEntry, TOC_LEVEL_INDENT_TWIPS, TOC_MAX_BOOKMARKS_PER_REFRESH, TOC_MAX_ENTRIES, TOC_MAX_FIELD_NESTING, TOC_MAX_INSTRUCTION_CHARS, TOC_MAX_PAGE_PASSES, TREE_DOC_OP_KINDS, TWIPS_PER_POINT, type TextMatchOptions, type TextOccurrence, type TextOccurrences, type TextboxStoryRoot, type TocEntryPlan, type TocInstruction, type TocOutlineHeading, type TransactionRevisionIds, type TransportPort, TreeDocOp, TreeDocumentStore, TreeModelChange, TreeOpRejection, TreeOpResult, TreePackageStore, type Twips, type ValidationResult, addComment, addPackageComment, applyEdits, applyTreeOp, assertLimitInvariants, assertValidId, assertValidQName, atomicFieldSpansOf, authoredProperties, beginOperation, bodyStoryRoot, bookmarkPairNodes, boundCustomXmlNodeIdOf, boundCustomXmlNodeIds, boundCustomXmlNodeIdsInPackage, buildTocContentControl, buildTocEntryParagraph, buildingBlockGalleryOf, buildingBlocksForControl, buildingBlocksOf, canonicalOoxmlFingerprint, canonicalize, cascadeEmptiedComments, collectNodeIds, collectReviewItems, collectRevisionSites, collectStoryParagraphs, commentItemsOf, commentPartNameOf, commentsExtendedPartNameOf, compareArtifacts, compareSemVer, containsCssFetch, contentTypesPartBytes, createNodeIdAllocator, customNodeBinding, customXmlDataParts, customXmlLabelXPath, customXmlNodes, customXmlPrefixMappings, datastoreItemIdFor, deleteCommentThread, deletePackageComments, deriveOoxmlIndexes, detectBodyTocs, diffSemanticDigests, digestPart, directParagraphMarkProperties, directParagraphProperties, drawingOpImpact, endOperation, escapeCssString, escapeXml, extractFragmentPackage, fieldAtomText, fieldOnOffAttribute, findCustomXmlDataPart, findDetectedToc, findNode, findOccurrences, fingerprint, fldCharType, fldSimpleInstr, fnv1a32, foldCase, formatOwnedRunIds, formattableRanges, formsProtectionEnabled, glossaryPartOf, hardBreakAttributes, hardBreakKind, hardBreakText, hasCommentPart, hasLegacyFormFieldData, hasNode, hashAuthored, indexStyles, inlineControlEndingAt, inlineControlStartingAt, insertChildren, insertPackageCustomNode, instrTextValue, isAuthorableRunProperty, isDangerousKey, isDrawingTreeDocOp, isEvaluableField, isFieldChrome, isFldChar, isFldCharNode, isFldSimple, isFldSimpleNode, isInertExecutable, isInstrText, isInstrTextNode, isLegalFldCharType, isPageBreakNode, isSearchableQuery, isStoryPart, isValidId, isValidNCName, isValidParaId, isValidQName, isWholeWord, linkRevisionReplies, locateSites, makeLimitCounter, materializeGlossaryPlaceholders, mergeFragmentIntoPackage, mergedFontProperty, mergedMultiSettingProperty, mergedParagraphMarkProperties, mergedProperties, mintParaId, mintedParagraphIdentityAttributes, nextCommentId, normalizeParagraphIdentity, nullRecord, ooxmlTreesEqual, paraIdOf, paragraphOffsetIndex, paragraphTextOf, parentNodeOf, parseSemVer, parseTocInstruction, planTocEntries, points, pointsToTwips, propertyContainer, readCustomXmlNode, readViewSettings, relationshipsOf, relsPartNameFor, removeNode, removePackageCustomNode, replaceChildren, replaceNode, replayFixture, resolve, resolveContentTypeOf, resolveTocRowHeadings, revisionItemsOf, runAddressRanges, runPropertyEdits, runsCovering, sanitizeHref, satisfies, scrubExport, sectionProtectsForms, segmentsOf, semanticDigest, serializeOoxmlPart, setCommentResolved, setPackageCommentResolved, stableHash, storyParagraphs, storyRootsOf, stylesPartOf, textboxStoriesInPart, toSafeRecord, tocEntryText, tocLeftIndentTwips, twips, twipsToPoints, usedParaIds, validateDrawingOp, validateFixture, validateOoxmlPart, validatePackageInvariants, validateTreeOp, w14RootPrefix, withContentTypeOverride, withCustomXmlDataPart, withCustomXmlNode, withExportedCustomNodes, withNewPart, withRelationship, withoutCustomXmlDataPart, withoutCustomXmlNode, withoutOrphanCustomXmlNodes, wrapTargetToAnchorSpec };
|