@docx-editor.dev/core 2.9.1 → 2.10.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/dist/automation.cjs +1 -1
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +74 -10
- package/dist/binding.d.ts +74 -10
- package/dist/binding.js +1 -1
- package/dist/chunk-27APDXY2.js +2 -0
- package/dist/chunk-35MI6K7M.cjs +10 -0
- package/dist/chunk-4XL7SOWQ.cjs +2 -0
- package/dist/chunk-6K6QQVAZ.cjs +18 -0
- package/dist/chunk-7ZJL5AEY.cjs +1 -0
- package/dist/chunk-C6LK2BYA.cjs +2 -0
- package/dist/chunk-HBEBUCRM.cjs +5 -0
- package/dist/chunk-LG5K46OM.js +2 -0
- package/dist/chunk-LWADHMVV.js +5 -0
- package/dist/chunk-N725IUO7.js +18 -0
- package/dist/chunk-N7DBENH4.js +10 -0
- package/dist/chunk-NVGFWMCO.js +1 -0
- package/dist/chunk-SYTWKJPJ.cjs +18 -0
- package/dist/chunk-YI6JXF7U.js +18 -0
- package/dist/contracts/document.d.cts +6 -1
- package/dist/contracts/document.d.ts +6 -1
- package/dist/contracts/editor.d.cts +6 -6
- package/dist/contracts/editor.d.ts +6 -6
- package/dist/contracts/interaction.d.cts +6 -6
- package/dist/contracts/interaction.d.ts +6 -6
- package/dist/contracts/modules.d.cts +3 -4
- package/dist/contracts/modules.d.ts +3 -4
- package/dist/{custom-node-writes-QyVZdTUA.d.ts → custom-node-writes-BvpWCnW8.d.ts} +52 -5
- package/dist/{custom-node-writes-7ERv0f_X.d.cts → custom-node-writes-Db8H6Z3n.d.cts} +52 -5
- package/dist/{editor-PUlv5Pp7.d.ts → editor-C0my6Uta.d.ts} +35 -14
- package/dist/{editor-CojjwMmF.d.cts → editor-CwzY2Hcg.d.cts} +35 -14
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +66 -461
- package/dist/editor.d.cts +20 -20
- package/dist/editor.d.ts +20 -20
- package/dist/editor.js +1 -1
- package/dist/{index-oN-v8DQ5.d.ts → index-kID8Ymkp.d.ts} +126 -20
- package/dist/{index-DGPSeLI0.d.cts → index-nLFwo_17.d.cts} +126 -20
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +357 -310
- package/dist/layout.d.ts +357 -310
- package/dist/layout.js +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +6 -6
- package/dist/output.d.ts +6 -6
- package/dist/output.js +1 -1
- package/dist/{review-items-DpsqTHio.d.cts → review-items-CwixiHNe.d.cts} +1 -1
- package/dist/{review-items-D5SPFtsO.d.ts → review-items-Dw-8a6Ie.d.ts} +1 -1
- package/dist/{review-reads-CP106AHp.d.cts → review-reads-BqkiJTeR.d.cts} +1 -1
- package/dist/{review-reads-B2Ji3fVU.d.ts → review-reads-C0u-IKEA.d.ts} +1 -1
- package/dist/{semantic-cell-selection-DJPjBWzf.d.cts → semantic-cell-selection-DT9x9WLf.d.cts} +2 -2
- package/dist/{semantic-cell-selection-BWhVAk5B.d.ts → semantic-cell-selection-Utrf0lz7.d.ts} +2 -2
- package/dist/{semantic-interaction-BjOcDB06.d.cts → semantic-interaction-B6hFRQLy.d.ts} +21 -2
- package/dist/{semantic-interaction-Cca1-X_a.d.ts → semantic-interaction-Z0xKQcB4.d.cts} +21 -2
- package/dist/{semantic-paint-CufpIQFw.d.ts → semantic-paint-CQEOC0Od.d.cts} +2 -2
- package/dist/{semantic-paint-Ur7pAINj.d.cts → semantic-paint-quke354p.d.ts} +2 -2
- package/dist/{semantic-records-C3Z76KeN.d.cts → semantic-records-CMakzQ1X.d.cts} +36 -4
- package/dist/{semantic-records-Cc1MJrhM.d.ts → semantic-records-Do3-i5oB.d.ts} +36 -4
- package/dist/{shaped-measurer-CwlTPDJO.d.ts → shaped-measurer-BxwTUluj.d.ts} +1 -1
- package/dist/{shaped-measurer-CYSK20E2.d.cts → shaped-measurer-DzRwWrL5.d.cts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +250 -134
- package/dist/store.d.ts +250 -134
- package/dist/store.js +1 -1
- package/dist/tree-op-revision-attribution-CN06Xshv.d.cts +24 -0
- package/dist/tree-op-revision-attribution-CN06Xshv.d.ts +24 -0
- package/dist/{tree-op-types-XMVsJSpe.d.ts → tree-op-types-BuOfCrkp.d.ts} +280 -32
- package/dist/{tree-op-types-B0-sCtw-.d.cts → tree-op-types-DSJYmf5b.d.cts} +280 -32
- package/dist/{tree-session-D945D43B.d.cts → tree-session-contract-ByWx8eew.d.cts} +44 -104
- package/dist/{tree-session-DBJgmdmc.d.ts → tree-session-contract-C1dfE9hy.d.ts} +44 -104
- package/dist/{tree-store-ClA-qng4.d.ts → tree-store-ASBtz7UB.d.ts} +1 -1
- package/dist/{tree-store-C6vc8E_2.d.cts → tree-store-CWOUMGN8.d.cts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-5VC5HGJA.js +0 -2
- package/dist/chunk-A2JIBG75.js +0 -1
- package/dist/chunk-DKMKH77K.cjs +0 -5
- package/dist/chunk-FWUI7EXG.cjs +0 -15
- package/dist/chunk-GZWMLQJO.js +0 -18
- package/dist/chunk-IEXDXWTA.cjs +0 -1
- package/dist/chunk-IMMAG4QP.cjs +0 -10
- package/dist/chunk-JTSNJQFO.js +0 -15
- package/dist/chunk-KBCC66CI.js +0 -5
- package/dist/chunk-LJ6BY6IU.cjs +0 -18
- package/dist/chunk-QDBAXFIK.js +0 -2
- package/dist/chunk-RD266XSK.cjs +0 -2
- package/dist/chunk-VUJGPCPU.js +0 -10
- package/dist/chunk-XMHWBL3K.cjs +0 -2
- package/dist/image-resources-DQOiwOuE.d.cts +0 -203
- package/dist/image-resources-eZqD_-vC.d.ts +0 -203
package/dist/store.d.cts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { C as CreateImageResourceCacheOptions,
|
|
1
|
+
import { B as ResourceLimits, T as TreeDocOp, a as TreeOpRejection, E as TreeOpResult, O as OoxmlProperty, k as DrawingTreeDocOp, I as ImpactClass, b as ImageWrapTarget } from './tree-op-types-DSJYmf5b.cjs';
|
|
2
|
+
export { F as ACCEPTED_PARAGRAPH_PROPERTIES, G as ACCEPTED_RUN_PROPERTIES, H as CONTENT_CONTROL_ID_MAX, J as CONTENT_CONTROL_PROPERTY_ORDER, K as ContentControlCheckbox, L as ContentControlCheckboxState, A as ContentControlDataBinding, M as ContentControlDateFormat, N as ContentControlEntry, C as ContentControlKind, y as ContentControlLevel, Q as ContentControlListItem, z as ContentControlLock, U as ContentControlProperties, W as CreateImageResourceCacheOptions, m as DEFAULT_IMAGE_RESOURCE_LIMITS, X as DEFAULT_LIMITS, D as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, Y as HARD_CEILINGS, Z as HYPERLINK_RELATIONSHIP_TYPE, _ as HyperlinkKind, $ as HyperlinkTarget, a0 as IMAGE_RESOURCE_HARD_CEILINGS, n as IMAGE_WRAP_TARGETS, j as ImageDecodePort, o as ImageResourceLimits, a1 as ImageResourceLookup, f as ImageResourceState, a2 as MAX_CONTENT_CONTROLS_PER_PART, a3 as MAX_CONTENT_CONTROL_NESTING, a4 as MAX_SVG_SNIFF_BYTES, a5 as OFFICE_RELATIONSHIP_NAMESPACE_URI, P as PreservedImageMime, a6 as RelationshipTargetResolver, S as SourceCrop, c as SupportedImageMime, a7 as TABLE_BORDER_STYLES, a8 as TREE_DOC_OP_KINDS, a9 as TabStopWrite, x as TableBorderStyle, aa as TreeDocOpKind, ab as TreeOpEffect, ac as ValidatedRasterHeader, ad as allocateContentControlId, ae as contentControlContentChildren, af as contentControlContentNodeOf, ag as contentControlEndPropertiesNodeOf, ah as contentControlLevelOf, ai as contentControlPropertiesNodeOf, aj as contentControlPropertiesOf, ak as contentControlTextOf, al as contentControlsIn, am as createImageResourceCache, an as findContentControl, ao as flattenContentControls, ap as hasBoundedSvgRoot, aq as hyperlinkAnchorOf, ar as hyperlinkRelationshipIdOf, as as hyperlinkTargetOf, at as imageResourceLookupFor, au as isContentControlContentNode, av as isContentControlNode, aw as isContentControlWrapper, ax as isHyperlinkNode, ay as liveDrawingReferenceCount, az as lockForbidsEdit, aA as lockForbidsRemoval, aB as orderedContentControlProperties, aC as parseContentControlId, aD as projectDrawing, aE as resolveContentControlLock, r as resolveImageResourceLimits, aF as resolveLimits, s as sniffImageMime, aG as validateGifHeader, aH as validateJpegHeader, aI as validatePngHeader, v as validateRasterHeader } from './tree-op-types-DSJYmf5b.cjs';
|
|
3
3
|
import { O as OoxmlPart, a as OoxmlNode, u as OoxmlInvariantResult, c as OoxmlPackage, R as RelationshipRecord, b as OoxmlElement, v as OoxmlInvariantIssue, w as OoxmlHardBreakNode, d as OoxmlParagraphNode, x as OoxmlFldCharNode, y as OoxmlFldSimpleNode, z as OoxmlInstrTextNode, A as OoxmlAttribute } from './ooxml-package-CdEy9ufK.cjs';
|
|
4
4
|
export { C as ContentTypeError, B as ContentTypeIndex, D as ContentTypeRecords, E as DEFAULT_OOXML_PACKAGE_LIMITS, F as DEFAULT_ZIP_LIMITS, G as DefaultRecord, I as IMAGE_RELATIONSHIP_TYPE, H as ImageRelationshipResolution, J as IndexResult, N as NameRejection, K as NameResult, L as OOXML_NODE_IDENTITY_RULES, M as OoxmlBodyNode, P as OoxmlBookmarkEndNode, Q as OoxmlBookmarkStartNode, S as OoxmlContentControlCalendarNode, T as OoxmlContentControlCheckboxNode, U as OoxmlContentControlCheckedNode, V as OoxmlContentControlCheckedStateNode, W as OoxmlContentControlComboBoxNode, q as OoxmlContentControlContentNode, X as OoxmlContentControlDataBindingNode, Y as OoxmlContentControlDateFormatNode, Z as OoxmlContentControlDateNode, _ as OoxmlContentControlDropDownListNode, s as OoxmlContentControlEndPropertiesNode, $ as OoxmlContentControlLidNode, a0 as OoxmlContentControlListItemNode, p as OoxmlContentControlNode, t as OoxmlContentControlPropertiesNode, a1 as OoxmlContentControlStoreMappedDataAsNode, a2 as OoxmlContentControlTextNode, a3 as OoxmlContentControlUncheckedStateNode, f as OoxmlContinuationSeparatorNode, a4 as OoxmlDocumentNode, g as OoxmlEndnotesNode, a5 as OoxmlExternalTarget, h as OoxmlFootnotesNode, m as OoxmlGenericElementNode, a6 as OoxmlGenericExtensionAttribute, a7 as OoxmlHyperlinkNode, a8 as OoxmlInvariantIssueCode, a9 as OoxmlKnownNodeAttribute, aa as OoxmlNamespaceBinding, l as OoxmlNodeId, ab as OoxmlNodeIdentityRules, e as OoxmlNoteNode, i as OoxmlNoteRefNode, j as OoxmlNoteReferenceNode, n as OoxmlPackageLimits, o as OoxmlPackageRejection, ac as OoxmlPackageResult, ad as OoxmlParagraphPropertiesNode, ae as OoxmlPartMetadata, af as OoxmlReadRejection, ag as OoxmlReadResult, ah as OoxmlRunNode, ai as OoxmlRunPropertiesNode, k as OoxmlSeparatorNode, aj as OoxmlTabNode, ak as OoxmlTextElementNode, al as OoxmlTextNode, am as OoxmlWmlValAttribute, an as OoxmlXmlSpaceAttribute, ao as OverrideRecord, ap as RelationshipError, aq as RelationshipSetResult, ar as ResolveResult, as as ResolvedRelationship, at as TargetMode, au as WML_NAMESPACE_URI, av as XMLNS_NAMESPACE_URI, aw as XML_NAMESPACE_URI, ax as XmlLimits, ay as XmlNode, az as XmlRejection, aA as XmlResult, aB as ZipLimits, aC as ZipReadResult, aD as ZipRejection, aE as asciiFold, aF as buildContentTypeIndex, aG as buildRelationshipSet, aH as childElements, aI as detectDuplicateNames, aJ as extensionKey, aK as findElement, aL as isContentRevisionKind, aM as isRangeMarkerKind, aN as isValidMime, aO as normalizePartName, aP as partNameKey, aQ as readOnOffChild, aR as readOoxmlPackage, aS as readOoxmlPart, aT as readXml, aU as readZip, aV as resolveContentType, aW as resolveImageRelationship, aX as resolveInternalTarget, aY as resolveRelationship, aZ as textContent, a_ as validateExternalTarget, a$ as withPart, b0 as writeOoxmlPackage, b1 as writeZip } from './ooxml-package-CdEy9ufK.cjs';
|
|
5
|
-
export {
|
|
5
|
+
export { f as BookmarkAnchor, B as BookmarkIndex, g as CascadeDeletedNoteReferencesOptions, h as CustomNodePayloadRead, i as CustomNodePayloadWrite, b as CustomNodeSweepOutcome, j as CustomNodeSweepResult, k as CustomNodeWriteRejection, C as CustomNodeWriteResult, l as DEFAULT_MAX_EDITABLE_STORY_PARTS, D as DocumentTrackingSettings, m as DrawingPropertyIdResult, E as EmbeddedFont, n as FontStyleKey, F as FragmentPasteInput, e as FragmentPasteResult, H as HeaderFooterLifecycleImpact, o as HeaderFooterLifecycleOp, p as HeaderFooterLifecycleRejection, q as HeaderFooterLifecycleResult, I as InsertCustomNodeWrite, L as ListKind, M as MAX_CUSTOM_NODE_LABEL_LENGTH, r as MAX_CUSTOM_NODE_PAYLOAD_LENGTH, s as MAX_FRAGMENT_DECODED_BYTES, t as MAX_NOTE_REFERENCE_PARTS, u as MAX_NOTE_REFERENCE_SCAN, N as NO_TRACKING_SETTINGS, v as NoteDiagnostic, w as NoteDiagnosticCode, x as NoteLifecycleImpact, y as NoteLifecycleOp, z as NoteLifecycleOptions, G as NoteLifecycleRejection, J as NoteLifecycleResult, K as NoteReferenceHit, O as NoteReferenceScanBudget, P as PackageTransactResult, Q as ReadEmbeddedFontsOptions, T as StoryResolveResult, S as StoryScope, a as StoryTargetRejection, U as TreePackageStore, V as TreePackageStoreOptions, W as allocateDrawingPropertyId, X as applyFragmentPaste, Y as applyHeaderFooterLifecycleOp, Z as applyNoteLifecycleOp, _ as buildBookmarkIndex, $ as cascadeDeletedNoteReferences, a0 as collectNoteReferences, a1 as collectPackageNoteReferences, a2 as createNoteReferenceScanBudget, a3 as customNodePayloadsByControl, a4 as customNodePayloadsOf, a5 as deobfuscateFont, a6 as diagnoseNoteReferences, a7 as ensureListDefinition, a8 as ensureNumberingLevel, a9 as insertCustomNodeWrite, aa as isHeaderFooterLifecycleOp, ab as isNoteLifecycleOp, ac as normalNoteIds, ad as notesPartHasId, ae as readEmbeddedFonts, af as readTrackingSettings, ag as removeCustomNodeWrite, ah as resolveNotesPart, ai as sweepCustomNodePayloads, aj as withBinaryPart, ak as withEmbeddedImage, al as withoutUnreferencedImagePart } from './custom-node-writes-Db8H6Z3n.cjs';
|
|
6
6
|
export { D as DEFAULT_OMML_LIMITS, E as EquationExpression, L as LinearMathOmmlResult, a as LinearMathParseResult, b as LinearMathRejection, c as OFFICE_MATH_NAMESPACE_URI, O as OmmlEquationProjection, d as OmmlLimits, e as equationExpressionToLinearMath, l as linearMathToOmml, p as parseLinearMath, f as projectOmmlEquation } from './omml-equation-BD-LsmWE.cjs';
|
|
7
7
|
export { c as HeaderFooterKind, a as HeaderFooterParts, b as HeaderFooterSectionResolution, d as HeaderFooterSlotMeta, H as HeaderFooterVariant, e as collectSectionPropertyNodes, r as resolveHeaderFooterParts, f as resolveHeaderFooterPartsBySection, g as resolveHeaderFooterResolutionBySection } from './hf-references-Dvk6De4Q.cjs';
|
|
8
|
-
export { L as LinkableReviewItem, c as collectFlowBlocks, f as collectReviewItems, a as commentBodyText, b as commentInitials, g as commentItemsOf, h as contentControlContentOf, j as deepParagraphOrderOfPart, i as isContentControl, e as isContentControlContent, l as linkRevisionReplies, p as paragraphOrderOfPart, r as revisionItemsOf, w as walkAllStoryParagraphs, k as walkParagraphInline, m as walkStoryBlocks } from './review-reads-
|
|
9
|
-
import { T as TreeDocOp, a as TreeOpRejection, q as TreeOpResult, O as OoxmlProperty, h as DrawingTreeDocOp, I as ImpactClass, b as ImageWrapTarget } from './tree-op-types-B0-sCtw-.cjs';
|
|
10
|
-
export { A as ACCEPTED_PARAGRAPH_PROPERTIES, r as ACCEPTED_RUN_PROPERTIES, s as CONTENT_CONTROL_ID_MAX, t as CONTENT_CONTROL_PROPERTY_ORDER, u as ContentControlCheckbox, v as ContentControlCheckboxState, p as ContentControlDataBinding, w as ContentControlDateFormat, x as ContentControlEntry, C as ContentControlKind, n as ContentControlLevel, y as ContentControlListItem, o as ContentControlLock, z as ContentControlProperties, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, H as HYPERLINK_RELATIONSHIP_TYPE, B as HyperlinkKind, E as HyperlinkTarget, j as IMAGE_WRAP_TARGETS, M as MAX_CONTENT_CONTROLS_PER_PART, F as MAX_CONTENT_CONTROL_NESTING, G as OFFICE_RELATIONSHIP_NAMESPACE_URI, J as RelationshipTargetResolver, R as RevisionAddress, S as SourceCrop, K as TABLE_BORDER_STYLES, L as TREE_DOC_OP_KINDS, N as TabStopWrite, m as TableBorderStyle, P as TreeDocOpKind, Q as TreeOpEffect, U as allocateContentControlId, W as contentControlContentChildren, X as contentControlContentNodeOf, Y as contentControlEndPropertiesNodeOf, Z as contentControlLevelOf, _ as contentControlPropertiesNodeOf, $ as contentControlPropertiesOf, a0 as contentControlTextOf, a1 as contentControlsIn, a2 as findContentControl, a3 as flattenContentControls, a4 as hyperlinkAnchorOf, a5 as hyperlinkRelationshipIdOf, a6 as hyperlinkTargetOf, a7 as isContentControlContentNode, a8 as isContentControlNode, a9 as isContentControlWrapper, aa as isHyperlinkNode, ab as lockForbidsEdit, ac as lockForbidsRemoval, ad as orderedContentControlProperties, ae as parseContentControlId, af as projectDrawing, ag as resolveContentControlLock } from './tree-op-types-B0-sCtw-.cjs';
|
|
8
|
+
export { L as LinkableReviewItem, c as collectFlowBlocks, f as collectReviewItems, a as commentBodyText, b as commentInitials, g as commentItemsOf, h as contentControlContentOf, j as deepParagraphOrderOfPart, i as isContentControl, e as isContentControlContent, l as linkRevisionReplies, p as paragraphOrderOfPart, r as revisionItemsOf, w as walkAllStoryParagraphs, k as walkParagraphInline, m as walkStoryBlocks } from './review-reads-BqkiJTeR.cjs';
|
|
11
9
|
export { A as AtomicNoteSpan, M as MAX_NOTES_PER_PART, a as NOTE_ATOM_CHAR, b as NOTE_CONTINUATION_SEPARATOR_ID, c as NOTE_ID_MAX, d as NOTE_ID_MIN, e as NOTE_SEPARATOR_ID, N as NoteKind, f as NoteType, g as allocateNoteId, h as atomicNoteSpansOf, i as customMarkFollows, j as findNoteById, k as formatNoteScopeId, l as isContinuationSeparatorNode, m as isEndnotesNode, o as isFootnotesNode, p as isNormalNote, q as isNoteAtomNode, r as isNoteNode, s as isNoteRefNode, t as isNoteReferenceNode, u as isSeparatorNode, v as noteAtomText, w as noteIdOf, x as noteKindOf, y as noteRefKindOf, z as noteReferenceKindOf, n as noteTypeOf, B as notesOf, C as parseNoteId, D as parseNoteScopeId } from './note-nodes-DL-Au22P.cjs';
|
|
12
10
|
export { A as AuthoredNoteProperties, D as DEFAULT_ENDNOTE_PROPERTIES, b as DEFAULT_FOOTNOTE_PROPERTIES, E as EndnotePosition, F as FootnotePosition, N as NoteNumRestart, a as ResolvedEndnoteProperties, R as ResolvedFootnoteProperties, c as authoredDocumentEndnoteProperties, d as authoredDocumentFootnoteProperties, e as authoredEndnotePropertiesFromSectPr, f as authoredFootnotePropertiesFromSectPr, i as isLegalEndnotePosition, g as isLegalFootnotePosition, h as isLegalNumRestart, p as parseAuthoredNoteProperties, r as resolveEndnoteProperties, j as resolveFootnoteProperties, s as settingsPartOf } from './note-properties-CQlxjic_.cjs';
|
|
13
|
-
import { T as TreeModelChange, b as TreeDocumentStore } from './tree-store-
|
|
14
|
-
export { D as DocumentProperties, S as SelectionMark, f as TreeDocumentStoreOptions, a as TreeStoryRef, d as TreeTransactOptions, g as TreeTransactResult, c as TreeTransactionContext } from './tree-store-
|
|
15
|
-
export { i as CommentAnchor, j as CommentPosition, C as CommentRecord, h as CommentThreadState, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, W as W15_NAMESPACE_URI, q as commentAnchorsOfStory, s as commentsOfPart, l as firstReviewRange, t as hasAnyComment, r as reviewItemKey, n as reviewItemRanges, u as threadStateOfPart } from './review-items-
|
|
11
|
+
import { T as TreeModelChange, b as TreeDocumentStore } from './tree-store-CWOUMGN8.cjs';
|
|
12
|
+
export { D as DocumentProperties, S as SelectionMark, f as TreeDocumentStoreOptions, a as TreeStoryRef, d as TreeTransactOptions, g as TreeTransactResult, c as TreeTransactionContext } from './tree-store-CWOUMGN8.cjs';
|
|
13
|
+
export { i as CommentAnchor, j as CommentPosition, C as CommentRecord, h as CommentThreadState, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, W as W15_NAMESPACE_URI, q as commentAnchorsOfStory, s as commentsOfPart, l as firstReviewRange, t as hasAnyComment, r as reviewItemKey, n as reviewItemRanges, u as threadStateOfPart } from './review-items-CwixiHNe.cjs';
|
|
14
|
+
export { R as RevisionAddress } from './tree-op-revision-attribution-CN06Xshv.cjs';
|
|
16
15
|
import './contracts/types.cjs';
|
|
17
16
|
|
|
18
17
|
/**
|
|
@@ -999,6 +998,20 @@ type OoxmlEditResult = {
|
|
|
999
998
|
*/
|
|
1000
999
|
interface EditOptions {
|
|
1001
1000
|
readonly deferValidation?: boolean;
|
|
1001
|
+
/**
|
|
1002
|
+
* A shared minter for `@w:id` on a NEW revision, for the ops of one transaction.
|
|
1003
|
+
*
|
|
1004
|
+
* `nextRevisionId` walks the whole part to find the highest id in use, and a formatting
|
|
1005
|
+
* write emits one op per run — so a Select All + Bold in suggesting mode paid a
|
|
1006
|
+
* document-wide walk thousands of times over. The transaction hands its ops one minter
|
|
1007
|
+
* instead, and it is DROPPED the moment an op that can import foreign revision ids runs
|
|
1008
|
+
* (a paste carries its own), because a stale minter would hand out an id the document had
|
|
1009
|
+
* just started using — and two revisions sharing an address are one card in the pane.
|
|
1010
|
+
*
|
|
1011
|
+
* Absent means "mint your own": every applier falls back to its own walk, which is what a
|
|
1012
|
+
* caller outside a transaction gets.
|
|
1013
|
+
*/
|
|
1014
|
+
readonly revisionIds?: () => string;
|
|
1002
1015
|
}
|
|
1003
1016
|
/** Every node id currently present in the part. */
|
|
1004
1017
|
declare function collectNodeIds(part: OoxmlPart): Set<string>;
|
|
@@ -1537,6 +1550,128 @@ declare function relationshipTargetIn(pkg: OoxmlPackage, ownerPart: string, rela
|
|
|
1537
1550
|
readonly sinkSafe?: boolean;
|
|
1538
1551
|
} | null;
|
|
1539
1552
|
|
|
1553
|
+
/** One addressable unit of paragraph text: text, tab, hard break, or atomic field. */
|
|
1554
|
+
interface Segment {
|
|
1555
|
+
readonly runId: string;
|
|
1556
|
+
readonly node: OoxmlNode;
|
|
1557
|
+
readonly start: number;
|
|
1558
|
+
readonly end: number;
|
|
1559
|
+
/**
|
|
1560
|
+
* When set, deleting this segment removes every listed node id in one step (atomic
|
|
1561
|
+
* field begin→end or `fldSimple`). Absent for ordinary text/tab/break segments.
|
|
1562
|
+
*/
|
|
1563
|
+
readonly removeNodeIds?: readonly string[];
|
|
1564
|
+
/**
|
|
1565
|
+
* When set, run formatting for this atom targets these runs (field result ownership),
|
|
1566
|
+
* not necessarily `runId`. Absent for ordinary text/tab/break segments.
|
|
1567
|
+
*/
|
|
1568
|
+
readonly formatRunIds?: readonly string[];
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* Flatten a paragraph into UTF-16 addressable segments, in document order.
|
|
1572
|
+
*
|
|
1573
|
+
* A HYPERLINK's runs are addressed too. `w:hyperlink` is a run container, not a leaf, and
|
|
1574
|
+
* the characters inside a link are ordinary paragraph text: the user selects them, types
|
|
1575
|
+
* over them and deletes them like any other. Skipping the container — which is what
|
|
1576
|
+
* iterating only direct `w:r` children did — left every link's text with no offsets at all,
|
|
1577
|
+
* so `paragraphTextOf` read "Visit or ." for a sentence that says "Visit Example.com or
|
|
1578
|
+
* Anthropic's website." and layout, selection and the ops all agreed on the wrong string.
|
|
1579
|
+
*
|
|
1580
|
+
* Inline CONTENT CONTROLS are the same class of wrapper: their `w:sdtContent` runs join the
|
|
1581
|
+
* paragraph's offset stream with no break opportunity at the boundary. Nesting is bounded
|
|
1582
|
+
* (`MAX_CONTENT_CONTROL_NESTING`); beyond the bound the wrapper is opaque so recursion
|
|
1583
|
+
* cannot exhaust the stack.
|
|
1584
|
+
*
|
|
1585
|
+
* `runId` stays the id of the run the content actually lives in, at whatever depth: the
|
|
1586
|
+
* appliers resolve it with `findNode` and rebuild that run's children, so nesting costs them
|
|
1587
|
+
* nothing.
|
|
1588
|
+
*/
|
|
1589
|
+
declare function segmentsOf(paragraph: OoxmlParagraphNode): Segment[];
|
|
1590
|
+
/** Half-open `[start, end)` of one node in its paragraph's model offset space. */
|
|
1591
|
+
interface OffsetSpan {
|
|
1592
|
+
readonly start: number;
|
|
1593
|
+
readonly end: number;
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* Every node's place in the paragraph's model offset space, from the SAME walk `segmentsOf`
|
|
1597
|
+
* uses.
|
|
1598
|
+
*
|
|
1599
|
+
* The offset model has exactly one authority, and this is how a caller borrows it. Three
|
|
1600
|
+
* private walkers used to re-derive it — one in the tracked-change writer, one in the comment
|
|
1601
|
+
* anchor reader, one in the review queue — and all three disagreed with `segmentsOf` and with
|
|
1602
|
+
* each other: none gave a note reference or an atomic field its length of one, one counted a
|
|
1603
|
+
* field's instruction text as visible characters, and one never descended into `w:hyperlink`
|
|
1604
|
+
* at all. The consequences were an anchor short by a link's length, two unrelated comments
|
|
1605
|
+
* threaded onto one zero-width offset, and a tracked insert landing a character out in any
|
|
1606
|
+
* paragraph carrying a footnote. Patching each walker only resets the clock on the next drift.
|
|
1607
|
+
*
|
|
1608
|
+
* A node the walk never reaches — content under a `generic` container, or past the nesting cap
|
|
1609
|
+
* — has NO span, and {@link ParagraphOffsetIndex.lengthOf} reports zero for it. That is the
|
|
1610
|
+
* same answer `segmentsOf` gives: it contributes no addressable characters.
|
|
1611
|
+
*/
|
|
1612
|
+
interface ParagraphOffsetIndex {
|
|
1613
|
+
/** The paragraph's own length, identical to {@link paragraphLength}. */
|
|
1614
|
+
readonly length: number;
|
|
1615
|
+
readonly segments: readonly Segment[];
|
|
1616
|
+
/** Where a node sits, or null when the offset walk never reached it. */
|
|
1617
|
+
spanOf(node: OoxmlNode | string): OffsetSpan | null;
|
|
1618
|
+
/** A node's model length: `end - start` of its span, and 0 when it has none. */
|
|
1619
|
+
lengthOf(node: OoxmlNode | string): number;
|
|
1620
|
+
}
|
|
1621
|
+
/**
|
|
1622
|
+
* THE paragraph offset authority: maps a paragraph's UTF-16 offsets to the nodes holding them.
|
|
1623
|
+
*
|
|
1624
|
+
* One authority on purpose. An atomic field spans many nodes but is ONE unit to an offset, and a
|
|
1625
|
+
* second implementation that disagreed would place edits inside content that cannot be split.
|
|
1626
|
+
*/
|
|
1627
|
+
declare function paragraphOffsetIndex(paragraph: OoxmlParagraphNode): ParagraphOffsetIndex;
|
|
1628
|
+
/** One inline content control's identity and the UTF-16 span its content covers. */
|
|
1629
|
+
interface InlineControlSpan {
|
|
1630
|
+
readonly controlId: string;
|
|
1631
|
+
readonly start: number;
|
|
1632
|
+
readonly end: number;
|
|
1633
|
+
}
|
|
1634
|
+
/**
|
|
1635
|
+
* The innermost inline content control whose content ends exactly at `offset` — the caret
|
|
1636
|
+
* at its right outer edge. What Backspace consults to delete the node as ONE unit
|
|
1637
|
+
* (pro-review-and-custom-nodes 4.6): deleting its last character from outside would either
|
|
1638
|
+
* strip one letter from a content-locked label (refused, so the key looks dead) or leave a
|
|
1639
|
+
* half-deleted chip whose tag still claims the full payload.
|
|
1640
|
+
*/
|
|
1641
|
+
declare function inlineControlEndingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1642
|
+
/** The forward-delete mirror: the control whose content STARTS exactly at `offset`. */
|
|
1643
|
+
declare function inlineControlStartingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1644
|
+
|
|
1645
|
+
/** Structural validation, run before any tree work so a rejection changes nothing. */
|
|
1646
|
+
declare function validateTreeOp(part: OoxmlPart, op: TreeDocOp): TreeOpRejection | null;
|
|
1647
|
+
|
|
1648
|
+
interface RevisionSite {
|
|
1649
|
+
readonly node: OoxmlElement;
|
|
1650
|
+
readonly parent: OoxmlElement | null;
|
|
1651
|
+
/** True when this site cannot be resolved and the whole op must refuse. */
|
|
1652
|
+
readonly refused: boolean;
|
|
1653
|
+
/** True for `w:pPr/w:rPr/w:ins|w:del` — the paragraph MARK, not content. */
|
|
1654
|
+
readonly paragraphMark: boolean;
|
|
1655
|
+
/** True for `w:rPrChange` / `w:pPrChange`. */
|
|
1656
|
+
readonly propertyChange: boolean;
|
|
1657
|
+
/**
|
|
1658
|
+
* How many content-revision wrappers ENCLOSE this one, counted within its own paragraph.
|
|
1659
|
+
*
|
|
1660
|
+
* Revisions nest for real: `w:ins` wrapping `w:del` is content one reviewer added and another
|
|
1661
|
+
* struck, and both stay pending because each author has to be answered separately. The two
|
|
1662
|
+
* wrappers then cover exactly the same characters, so a range cannot tell them apart and
|
|
1663
|
+
* "which change is this text under" has only one honest answer — the innermost one, which is
|
|
1664
|
+
* the change that decides what the reader is looking at.
|
|
1665
|
+
*
|
|
1666
|
+
* Relative to the paragraph or table subtree, which is the unit the site walk memoizes. That
|
|
1667
|
+
* is enough and it is what keeps the memo valid: a content revision cannot enclose a
|
|
1668
|
+
* paragraph, and two sites can only cover one position if they are in the same paragraph.
|
|
1669
|
+
*/
|
|
1670
|
+
readonly nesting: number;
|
|
1671
|
+
}
|
|
1672
|
+
/** Every revision-bearing element in the part. */
|
|
1673
|
+
declare function collectRevisionSites(part: OoxmlPart): RevisionSite[];
|
|
1674
|
+
|
|
1540
1675
|
/**
|
|
1541
1676
|
* Which story a comment deletion or resolution may read markers from.
|
|
1542
1677
|
*
|
|
@@ -1851,128 +1986,6 @@ type CustomNodeExportResult = {
|
|
|
1851
1986
|
*/
|
|
1852
1987
|
declare function withExportedCustomNodes(pkg: OoxmlPackage, request: CustomNodeExportRequest): CustomNodeExportResult;
|
|
1853
1988
|
|
|
1854
|
-
/** One addressable unit of paragraph text: text, tab, hard break, or atomic field. */
|
|
1855
|
-
interface Segment {
|
|
1856
|
-
readonly runId: string;
|
|
1857
|
-
readonly node: OoxmlNode;
|
|
1858
|
-
readonly start: number;
|
|
1859
|
-
readonly end: number;
|
|
1860
|
-
/**
|
|
1861
|
-
* When set, deleting this segment removes every listed node id in one step (atomic
|
|
1862
|
-
* field begin→end or `fldSimple`). Absent for ordinary text/tab/break segments.
|
|
1863
|
-
*/
|
|
1864
|
-
readonly removeNodeIds?: readonly string[];
|
|
1865
|
-
/**
|
|
1866
|
-
* When set, run formatting for this atom targets these runs (field result ownership),
|
|
1867
|
-
* not necessarily `runId`. Absent for ordinary text/tab/break segments.
|
|
1868
|
-
*/
|
|
1869
|
-
readonly formatRunIds?: readonly string[];
|
|
1870
|
-
}
|
|
1871
|
-
/**
|
|
1872
|
-
* Flatten a paragraph into UTF-16 addressable segments, in document order.
|
|
1873
|
-
*
|
|
1874
|
-
* A HYPERLINK's runs are addressed too. `w:hyperlink` is a run container, not a leaf, and
|
|
1875
|
-
* the characters inside a link are ordinary paragraph text: the user selects them, types
|
|
1876
|
-
* over them and deletes them like any other. Skipping the container — which is what
|
|
1877
|
-
* iterating only direct `w:r` children did — left every link's text with no offsets at all,
|
|
1878
|
-
* so `paragraphTextOf` read "Visit or ." for a sentence that says "Visit Example.com or
|
|
1879
|
-
* Anthropic's website." and layout, selection and the ops all agreed on the wrong string.
|
|
1880
|
-
*
|
|
1881
|
-
* Inline CONTENT CONTROLS are the same class of wrapper: their `w:sdtContent` runs join the
|
|
1882
|
-
* paragraph's offset stream with no break opportunity at the boundary. Nesting is bounded
|
|
1883
|
-
* (`MAX_CONTENT_CONTROL_NESTING`); beyond the bound the wrapper is opaque so recursion
|
|
1884
|
-
* cannot exhaust the stack.
|
|
1885
|
-
*
|
|
1886
|
-
* `runId` stays the id of the run the content actually lives in, at whatever depth: the
|
|
1887
|
-
* appliers resolve it with `findNode` and rebuild that run's children, so nesting costs them
|
|
1888
|
-
* nothing.
|
|
1889
|
-
*/
|
|
1890
|
-
declare function segmentsOf(paragraph: OoxmlParagraphNode): Segment[];
|
|
1891
|
-
/** Half-open `[start, end)` of one node in its paragraph's model offset space. */
|
|
1892
|
-
interface OffsetSpan {
|
|
1893
|
-
readonly start: number;
|
|
1894
|
-
readonly end: number;
|
|
1895
|
-
}
|
|
1896
|
-
/**
|
|
1897
|
-
* Every node's place in the paragraph's model offset space, from the SAME walk `segmentsOf`
|
|
1898
|
-
* uses.
|
|
1899
|
-
*
|
|
1900
|
-
* The offset model has exactly one authority, and this is how a caller borrows it. Three
|
|
1901
|
-
* private walkers used to re-derive it — one in the tracked-change writer, one in the comment
|
|
1902
|
-
* anchor reader, one in the review queue — and all three disagreed with `segmentsOf` and with
|
|
1903
|
-
* each other: none gave a note reference or an atomic field its length of one, one counted a
|
|
1904
|
-
* field's instruction text as visible characters, and one never descended into `w:hyperlink`
|
|
1905
|
-
* at all. The consequences were an anchor short by a link's length, two unrelated comments
|
|
1906
|
-
* threaded onto one zero-width offset, and a tracked insert landing a character out in any
|
|
1907
|
-
* paragraph carrying a footnote. Patching each walker only resets the clock on the next drift.
|
|
1908
|
-
*
|
|
1909
|
-
* A node the walk never reaches — content under a `generic` container, or past the nesting cap
|
|
1910
|
-
* — has NO span, and {@link ParagraphOffsetIndex.lengthOf} reports zero for it. That is the
|
|
1911
|
-
* same answer `segmentsOf` gives: it contributes no addressable characters.
|
|
1912
|
-
*/
|
|
1913
|
-
interface ParagraphOffsetIndex {
|
|
1914
|
-
/** The paragraph's own length, identical to {@link paragraphLength}. */
|
|
1915
|
-
readonly length: number;
|
|
1916
|
-
readonly segments: readonly Segment[];
|
|
1917
|
-
/** Where a node sits, or null when the offset walk never reached it. */
|
|
1918
|
-
spanOf(node: OoxmlNode | string): OffsetSpan | null;
|
|
1919
|
-
/** A node's model length: `end - start` of its span, and 0 when it has none. */
|
|
1920
|
-
lengthOf(node: OoxmlNode | string): number;
|
|
1921
|
-
}
|
|
1922
|
-
/**
|
|
1923
|
-
* THE paragraph offset authority: maps a paragraph's UTF-16 offsets to the nodes holding them.
|
|
1924
|
-
*
|
|
1925
|
-
* One authority on purpose. An atomic field spans many nodes but is ONE unit to an offset, and a
|
|
1926
|
-
* second implementation that disagreed would place edits inside content that cannot be split.
|
|
1927
|
-
*/
|
|
1928
|
-
declare function paragraphOffsetIndex(paragraph: OoxmlParagraphNode): ParagraphOffsetIndex;
|
|
1929
|
-
/** One inline content control's identity and the UTF-16 span its content covers. */
|
|
1930
|
-
interface InlineControlSpan {
|
|
1931
|
-
readonly controlId: string;
|
|
1932
|
-
readonly start: number;
|
|
1933
|
-
readonly end: number;
|
|
1934
|
-
}
|
|
1935
|
-
/**
|
|
1936
|
-
* The innermost inline content control whose content ends exactly at `offset` — the caret
|
|
1937
|
-
* at its right outer edge. What Backspace consults to delete the node as ONE unit
|
|
1938
|
-
* (pro-review-and-custom-nodes 4.6): deleting its last character from outside would either
|
|
1939
|
-
* strip one letter from a content-locked label (refused, so the key looks dead) or leave a
|
|
1940
|
-
* half-deleted chip whose tag still claims the full payload.
|
|
1941
|
-
*/
|
|
1942
|
-
declare function inlineControlEndingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1943
|
-
/** The forward-delete mirror: the control whose content STARTS exactly at `offset`. */
|
|
1944
|
-
declare function inlineControlStartingAt(paragraph: OoxmlParagraphNode, offset: number): InlineControlSpan | null;
|
|
1945
|
-
|
|
1946
|
-
interface RevisionSite {
|
|
1947
|
-
readonly node: OoxmlElement;
|
|
1948
|
-
readonly parent: OoxmlElement | null;
|
|
1949
|
-
/** True when this site cannot be resolved and the whole op must refuse. */
|
|
1950
|
-
readonly refused: boolean;
|
|
1951
|
-
/** True for `w:pPr/w:rPr/w:ins|w:del` — the paragraph MARK, not content. */
|
|
1952
|
-
readonly paragraphMark: boolean;
|
|
1953
|
-
/** True for `w:rPrChange` / `w:pPrChange`. */
|
|
1954
|
-
readonly propertyChange: boolean;
|
|
1955
|
-
/**
|
|
1956
|
-
* How many content-revision wrappers ENCLOSE this one, counted within its own paragraph.
|
|
1957
|
-
*
|
|
1958
|
-
* Revisions nest for real: `w:ins` wrapping `w:del` is content one reviewer added and another
|
|
1959
|
-
* struck, and both stay pending because each author has to be answered separately. The two
|
|
1960
|
-
* wrappers then cover exactly the same characters, so a range cannot tell them apart and
|
|
1961
|
-
* "which change is this text under" has only one honest answer — the innermost one, which is
|
|
1962
|
-
* the change that decides what the reader is looking at.
|
|
1963
|
-
*
|
|
1964
|
-
* Relative to the paragraph or table subtree, which is the unit the site walk memoizes. That
|
|
1965
|
-
* is enough and it is what keeps the memo valid: a content revision cannot enclose a
|
|
1966
|
-
* paragraph, and two sites can only cover one position if they are in the same paragraph.
|
|
1967
|
-
*/
|
|
1968
|
-
readonly nesting: number;
|
|
1969
|
-
}
|
|
1970
|
-
/** Every revision-bearing element in the part. */
|
|
1971
|
-
declare function collectRevisionSites(part: OoxmlPart): RevisionSite[];
|
|
1972
|
-
|
|
1973
|
-
/** Structural validation, run before any tree work so a rejection changes nothing. */
|
|
1974
|
-
declare function validateTreeOp(part: OoxmlPart, op: TreeDocOp): TreeOpRejection | null;
|
|
1975
|
-
|
|
1976
1989
|
/**
|
|
1977
1990
|
* Apply one validated op to a part.
|
|
1978
1991
|
*
|
|
@@ -1988,6 +2001,71 @@ declare function applyTreeOp(part: OoxmlPart, op: TreeDocOp, options?: EditOptio
|
|
|
1988
2001
|
/** Paragraph text as the ops address it, for tests and callers computing offsets. */
|
|
1989
2002
|
declare function paragraphTextOf(part: OoxmlPart, paragraphId: string): string | null;
|
|
1990
2003
|
|
|
2004
|
+
/**
|
|
2005
|
+
* WHERE a copy reaches, computed by the editing surface against the published layout with
|
|
2006
|
+
* the same full-coverage predicate `planRangeDeletion` uses. Pure data: paragraph ids in
|
|
2007
|
+
* document order, edge offsets in the store's segment offset space, and the coverage sets.
|
|
2008
|
+
*/
|
|
2009
|
+
interface FragmentCoverage {
|
|
2010
|
+
/** Story part the range lives in (`/word/document.xml` for the body). */
|
|
2011
|
+
readonly partName: string;
|
|
2012
|
+
/** Every paragraph the range touches, in document order, edges included. */
|
|
2013
|
+
readonly paragraphIds: readonly string[];
|
|
2014
|
+
/** Offset into the first paragraph where the range starts. */
|
|
2015
|
+
readonly startOffset: number;
|
|
2016
|
+
/** Offset into the last paragraph where the range ends. */
|
|
2017
|
+
readonly endOffset: number;
|
|
2018
|
+
/** Paragraphs the range covers mark-to-mark (the deletion planner's `covered`). */
|
|
2019
|
+
readonly coveredParagraphIds: readonly string[];
|
|
2020
|
+
/** Outermost tables and block SDTs whose every paragraph is covered. */
|
|
2021
|
+
readonly fullyCoveredBlockIds: readonly string[];
|
|
2022
|
+
/** True when the range reaches the last paragraph's far edge (its mark travels). */
|
|
2023
|
+
readonly lastMarkCovered: boolean;
|
|
2024
|
+
}
|
|
2025
|
+
type FragmentExtractRejection = 'unknown-part' | 'empty-range' | 'trim-refused' | 'resource-limit';
|
|
2026
|
+
type FragmentExtractResult = {
|
|
2027
|
+
readonly ok: true;
|
|
2028
|
+
/** The fragment package zip, readable by `readOoxmlPackage`. */
|
|
2029
|
+
readonly bytes: Uint8Array;
|
|
2030
|
+
/** Travels beside the zip (HTML attribute): whether the last paragraph mark is covered. */
|
|
2031
|
+
readonly lastMarkCovered: boolean;
|
|
2032
|
+
readonly blockCount: number;
|
|
2033
|
+
/** Total bytes of media carried, for the copy-side degrade tiers. */
|
|
2034
|
+
readonly mediaBytes: number;
|
|
2035
|
+
} | {
|
|
2036
|
+
readonly ok: false;
|
|
2037
|
+
readonly reason: FragmentExtractRejection;
|
|
2038
|
+
};
|
|
2039
|
+
/**
|
|
2040
|
+
* Extract the covered range into a fragment package zip.
|
|
2041
|
+
*
|
|
2042
|
+
* Pure over its inputs: the package and the coverage description. The blocks travel with
|
|
2043
|
+
* their dependency closure (styles, numbering, media, hyperlink rels, referenced note
|
|
2044
|
+
* bodies) and without headers/footers, `w:sectPr`, comments, settings, docDefaults (beyond
|
|
2045
|
+
* the materialized copy in the fragment styles part), or theme.
|
|
2046
|
+
*/
|
|
2047
|
+
declare function extractFragmentPackage(pkg: OoxmlPackage, coverage: FragmentCoverage, options?: {
|
|
2048
|
+
/** Copy-side degrade tier 1: leave media behind; their drawings degrade away. */
|
|
2049
|
+
readonly omitMedia?: boolean;
|
|
2050
|
+
}): FragmentExtractResult;
|
|
2051
|
+
|
|
2052
|
+
type FragmentMergeRejection = 'no-fragment-document' | 'no-target-part' | 'merge-refused';
|
|
2053
|
+
type FragmentMergeResult = {
|
|
2054
|
+
readonly ok: true;
|
|
2055
|
+
readonly pkg: OoxmlPackage;
|
|
2056
|
+
/** The fragment blocks, rewritten to target identifiers, ready for `insertFragment`. */
|
|
2057
|
+
readonly blocks: readonly OoxmlNode[];
|
|
2058
|
+
} | {
|
|
2059
|
+
readonly ok: false;
|
|
2060
|
+
readonly reason: FragmentMergeRejection;
|
|
2061
|
+
};
|
|
2062
|
+
/**
|
|
2063
|
+
* Merge a fragment package's resources into `target` and rewrite the fragment blocks to
|
|
2064
|
+
* the target's identifiers. Pure: returns a new package; the caller commits it through
|
|
2065
|
+
* `ctx.applyPackage` beside the `insertFragment` op.
|
|
2066
|
+
*/
|
|
2067
|
+
declare function mergeFragmentIntoPackage(target: OoxmlPackage, fragment: OoxmlPackage, ownerPartName: string): FragmentMergeResult;
|
|
2068
|
+
|
|
1991
2069
|
/** Where a comment is anchored, in the model offset space of one story. */
|
|
1992
2070
|
interface CommentAnchorRequest {
|
|
1993
2071
|
readonly paragraphId: string;
|
|
@@ -2087,6 +2165,26 @@ declare function commentPartNameOf(pkg: OoxmlPackage, storyPartName: string): st
|
|
|
2087
2165
|
*/
|
|
2088
2166
|
declare function commentsExtendedPartNameOf(pkg: OoxmlPackage, storyPartName: string): string;
|
|
2089
2167
|
|
|
2168
|
+
/**
|
|
2169
|
+
* Which revision halves the reader is looking at.
|
|
2170
|
+
*
|
|
2171
|
+
* Structurally identical to layout's `RevisionDisplayMode`, and pinned equal to it by
|
|
2172
|
+
* `packages/core/src/layout/__tests__/revision-display-mode-parity.test.ts`. Redeclared
|
|
2173
|
+
* rather than imported because the `store` lane may import no other lane (see
|
|
2174
|
+
* `packages/core/src/__tests__/core-lane-graph.ts`), and the formatting walks live here so
|
|
2175
|
+
* that the automation lane — which has no layout at all — reaches them.
|
|
2176
|
+
*/
|
|
2177
|
+
type FormattingDisplayMode = 'all-markup' | 'proposed' | 'original';
|
|
2178
|
+
/**
|
|
2179
|
+
* What the formatting lanes assume when nobody names a view.
|
|
2180
|
+
*
|
|
2181
|
+
* The RESOLVED result — Word's "No Markup" — because a caller with no view is a caller with
|
|
2182
|
+
* no reader: a headless automation host answers for the text that survives. It is not what a
|
|
2183
|
+
* mounted surface uses; that one names its own mode, and with the review module registered
|
|
2184
|
+
* the layout default is `all-markup`.
|
|
2185
|
+
*/
|
|
2186
|
+
declare const DEFAULT_FORMATTING_DISPLAY_MODE: FormattingDisplayMode;
|
|
2187
|
+
|
|
2090
2188
|
/** The D8 paragraph op vocabulary. */
|
|
2091
2189
|
declare const AUTHORABLE_PARAGRAPH_PROPERTIES: ReadonlySet<string>;
|
|
2092
2190
|
/** The D8 run op vocabulary, for `w:rPr` on a run and on the paragraph mark alike. */
|
|
@@ -2204,14 +2302,32 @@ declare function mergedParagraphMarkProperties(part: OoxmlPart, paragraphId: str
|
|
|
2204
2302
|
* offset rather than by id because these edits apply in sequence and the applier splits runs at
|
|
2205
2303
|
* the range edges; offsets are unmoved by a property write, ids are not.
|
|
2206
2304
|
*/
|
|
2207
|
-
declare function runPropertyEdits(part: OoxmlPart, paragraphId: string, start: number, end: number, incoming: OoxmlProperty | readonly OoxmlProperty[]): readonly RunPropertyEdit[];
|
|
2305
|
+
declare function runPropertyEdits(part: OoxmlPart, paragraphId: string, start: number, end: number, incoming: OoxmlProperty | readonly OoxmlProperty[], displayMode?: FormattingDisplayMode): readonly RunPropertyEdit[];
|
|
2306
|
+
/**
|
|
2307
|
+
* The slices of `[start, end)` a formatting write may reach, coalesced, in document order.
|
|
2308
|
+
*
|
|
2309
|
+
* For the one write that does NOT split per run: the eraser states `properties: []` over a
|
|
2310
|
+
* whole range, and a single op there is right — clearing is the one change that legitimately
|
|
2311
|
+
* homogenises what it covers, since there is no bag to carry forward. But the applier derives
|
|
2312
|
+
* its run set from `segmentsOf`, which knows nothing about display modes, so one op over the
|
|
2313
|
+
* whole range reached hidden revision halves at the same offsets: erasing a visible selection
|
|
2314
|
+
* cleared a tracked deletion's `w:rPr` and — in suggesting mode — raised a review card for a
|
|
2315
|
+
* change nobody could see made.
|
|
2316
|
+
*
|
|
2317
|
+
* Slicing solves it without a per-run op: a hidden half is a GAP in the offset space between
|
|
2318
|
+
* two visible runs, so the ranges either side of it never coalesce across it.
|
|
2319
|
+
*/
|
|
2320
|
+
declare function formattableRanges(part: OoxmlPart, paragraphId: string, start: number, end: number, displayMode?: FormattingDisplayMode): readonly {
|
|
2321
|
+
readonly start: number;
|
|
2322
|
+
readonly end: number;
|
|
2323
|
+
}[];
|
|
2208
2324
|
/**
|
|
2209
2325
|
* Every run that contributes at least one character of `[start, end)`, in document order.
|
|
2210
2326
|
*
|
|
2211
2327
|
* A COLLAPSED range answers the run it sits inside, which is what a caret reads. Callers that
|
|
2212
2328
|
* want the empty answer for a collapsed range check the offsets themselves.
|
|
2213
2329
|
*/
|
|
2214
|
-
declare function runsCovering(part: OoxmlPart, paragraphId: string, start: number, end: number): readonly OoxmlNode[];
|
|
2330
|
+
declare function runsCovering(part: OoxmlPart, paragraphId: string, start: number, end: number, displayMode?: FormattingDisplayMode): readonly OoxmlNode[];
|
|
2215
2331
|
|
|
2216
2332
|
/** The `w:p` a node sits inside, and the model offset it starts at within that paragraph. */
|
|
2217
2333
|
interface SiteLocation {
|
|
@@ -2307,4 +2423,4 @@ declare function wrapTargetToAnchorSpec(target: ImageWrapTarget): {
|
|
|
2307
2423
|
/** Whether an op is one of the drawing ops. Narrows the type. */
|
|
2308
2424
|
declare function isDrawingTreeDocOp(op: TreeDocOp): op is DrawingTreeDocOp;
|
|
2309
2425
|
|
|
2310
|
-
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, 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, type ComparatorDescriptor, type ComparatorMode, type ComparatorName, type ComparisonResult, type ConformanceFixture, type ContentItem, type Contribution, type CustomNodeBinding, type CustomNodeExportPolicy, type CustomNodeExportRequest, type CustomNodeExportResult, type CustomXmlDataPart, type CustomXmlDataPartResult, type CustomXmlNode, DANGEROUS_KEYS, DATASTORE_NAMESPACE_URI, DEFAULT_VIEW_SETTINGS, DEPENDENCY_KEY_IDS, DangerousKeyError, type DetectedToc, DeterministicClock, DeterministicMemoryMeter, type DigestDifference, type DocumentViewSettings, DrawingTreeDocOp, type EditOptions, type EncodedEnvelope, type EnforcementPhase, type EnsuredHyperlinkRelationship, type ExternalResourceConsentPort, FIELD_ATOM_CHAR, type FeatureBundle, type FixtureExpectation, type FixtureOutcome, type FixtureSource, type FixtureStep, type FldCharType, type FontPort, type HardBreakKind, type HrefProjection, ID_KINDS, INERT_EXECUTABLE_KINDS, type IdKind, type IdentityPort, type ImagePort, ImageWrapTarget, ImpactClass, type InertExecutableKind, type InlineControlSpan, type Json, LIMIT_KEYS, LIMIT_SPECS, LimitExceededError, type LimitSpec, type LimitUnit, 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 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, 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, 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, TWIPS_PER_POINT, type TextMatchOptions, type TextOccurrence, type TextOccurrences, type TocEntryPlan, type TocInstruction, type TocOutlineHeading, type TransportPort, TreeDocOp, TreeDocumentStore, TreeModelChange, TreeOpRejection, TreeOpResult, type Twips, type ValidationResult, addComment, applyEdits, applyTreeOp, assertLimitInvariants, assertValidId, assertValidQName, atomicFieldSpansOf, authorableHyperlinkTarget, authoredProperties, beginOperation, bodyStoryRoot, bookmarkPairNodes, boundCustomXmlNodeIdOf, boundCustomXmlNodeIds, boundCustomXmlNodeIdsInPackage, buildTocContentControl, buildTocEntryParagraph, canonicalOoxmlFingerprint, canonicalize, cascadeEmptiedComments, collectNodeIds, collectRevisionSites, collectStoryParagraphs, commentPartNameOf, commentsExtendedPartNameOf, compareArtifacts, compareSemVer, containsCssFetch, contentTypesPartBytes, createNodeIdAllocator, customNodeBinding, customXmlDataParts, customXmlLabelXPath, customXmlNodes, customXmlPrefixMappings, datastoreItemIdFor, deleteCommentThread, deriveOoxmlIndexes, detectBodyTocs, diffSemanticDigests, digestPart, directParagraphMarkProperties, directParagraphProperties, drawingOpImpact, endOperation, ensureHyperlinkRelationship, escapeCssString, escapeXml, fieldAtomText, fieldOnOffAttribute, findCustomXmlDataPart, findDetectedToc, findNode, findOccurrences, fingerprint, fldCharType, fldSimpleInstr, fnv1a32, foldCase, formatOwnedRunIds, hardBreakAttributes, hardBreakKind, hardBreakText, hasCommentPart, hasLegacyFormFieldData, hasNode, hashAuthored, indexStyles, inlineControlEndingAt, inlineControlStartingAt, insertChildren, instrTextValue, isAuthorableRunProperty, isDangerousKey, isDrawingTreeDocOp, isEvaluableField, isFieldChrome, isFldChar, isFldCharNode, isFldSimple, isFldSimpleNode, isInertExecutable, isInstrText, isInstrTextNode, isLegalFldCharType, isPageBreakNode, isSearchableQuery, isStoryPart, isValidId, isValidNCName, isValidParaId, isValidQName, isWholeWord, locateSites, makeLimitCounter, mergedFontProperty, mergedMultiSettingProperty, mergedParagraphMarkProperties, mergedProperties, mintParaId, mintedParagraphIdentityAttributes, normalizeParagraphIdentity, nullRecord, ooxmlTreesEqual, paraIdOf, paragraphOffsetIndex, paragraphTextOf, parentNodeOf, parseSemVer, parseTocInstruction, planTocEntries, points, pointsToTwips, propertyContainer, readCustomXmlNode, readViewSettings, relationshipTargetIn, relationshipsOf, relsPartNameFor, removeNode, replaceChildren, replaceNode, replayFixture, resolve, resolveContentTypeOf, resolveTocRowHeadings, runAddressRanges, runPropertyEdits, runsCovering, sanitizeHref, satisfies, scrubExport, segmentsOf, semanticDigest, serializeOoxmlPart, setCommentResolved, stableHash, storyParagraphs, storyRootsOf, stylesPartOf, toSafeRecord, tocEntryText, tocLeftIndentTwips, twips, twipsToPoints, usedParaIds, validateDrawingOp, validateFixture, validateOoxmlPart, validatePackageInvariants, validateTreeOp, w14RootPrefix, withContentTypeOverride, withCustomXmlDataPart, withCustomXmlNode, withExportedCustomNodes, withNewPart, withRelationship, withoutCustomXmlDataPart, withoutCustomXmlNode, withoutOrphanCustomXmlNodes, wrapTargetToAnchorSpec };
|
|
2426
|
+
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, 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, type ComparatorDescriptor, type ComparatorMode, type ComparatorName, type ComparisonResult, type ConformanceFixture, type ContentItem, type Contribution, type CustomNodeBinding, type CustomNodeExportPolicy, type CustomNodeExportRequest, type CustomNodeExportResult, 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 EnsuredHyperlinkRelationship, type ExternalResourceConsentPort, FIELD_ATOM_CHAR, type FeatureBundle, type FixtureExpectation, type FixtureOutcome, type FixtureSource, type FixtureStep, type FldCharType, type FontPort, type FormattingDisplayMode, 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, type Json, LIMIT_KEYS, LIMIT_SPECS, LimitExceededError, type LimitSpec, type LimitUnit, 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 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, 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, 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, TWIPS_PER_POINT, type TextMatchOptions, type TextOccurrence, type TextOccurrences, type TocEntryPlan, type TocInstruction, type TocOutlineHeading, type TransportPort, TreeDocOp, TreeDocumentStore, TreeModelChange, TreeOpRejection, TreeOpResult, type Twips, type ValidationResult, addComment, applyEdits, applyTreeOp, assertLimitInvariants, assertValidId, assertValidQName, atomicFieldSpansOf, authorableHyperlinkTarget, authoredProperties, beginOperation, bodyStoryRoot, bookmarkPairNodes, boundCustomXmlNodeIdOf, boundCustomXmlNodeIds, boundCustomXmlNodeIdsInPackage, buildTocContentControl, buildTocEntryParagraph, canonicalOoxmlFingerprint, canonicalize, cascadeEmptiedComments, collectNodeIds, collectRevisionSites, collectStoryParagraphs, commentPartNameOf, commentsExtendedPartNameOf, compareArtifacts, compareSemVer, containsCssFetch, contentTypesPartBytes, createNodeIdAllocator, customNodeBinding, customXmlDataParts, customXmlLabelXPath, customXmlNodes, customXmlPrefixMappings, datastoreItemIdFor, deleteCommentThread, deriveOoxmlIndexes, detectBodyTocs, diffSemanticDigests, digestPart, directParagraphMarkProperties, directParagraphProperties, drawingOpImpact, endOperation, ensureHyperlinkRelationship, escapeCssString, escapeXml, extractFragmentPackage, fieldAtomText, fieldOnOffAttribute, findCustomXmlDataPart, findDetectedToc, findNode, findOccurrences, fingerprint, fldCharType, fldSimpleInstr, fnv1a32, foldCase, formatOwnedRunIds, formattableRanges, hardBreakAttributes, hardBreakKind, hardBreakText, hasCommentPart, hasLegacyFormFieldData, hasNode, hashAuthored, indexStyles, inlineControlEndingAt, inlineControlStartingAt, insertChildren, instrTextValue, isAuthorableRunProperty, isDangerousKey, isDrawingTreeDocOp, isEvaluableField, isFieldChrome, isFldChar, isFldCharNode, isFldSimple, isFldSimpleNode, isInertExecutable, isInstrText, isInstrTextNode, isLegalFldCharType, isPageBreakNode, isSearchableQuery, isStoryPart, isValidId, isValidNCName, isValidParaId, isValidQName, isWholeWord, locateSites, makeLimitCounter, mergeFragmentIntoPackage, mergedFontProperty, mergedMultiSettingProperty, mergedParagraphMarkProperties, mergedProperties, mintParaId, mintedParagraphIdentityAttributes, normalizeParagraphIdentity, nullRecord, ooxmlTreesEqual, paraIdOf, paragraphOffsetIndex, paragraphTextOf, parentNodeOf, parseSemVer, parseTocInstruction, planTocEntries, points, pointsToTwips, propertyContainer, readCustomXmlNode, readViewSettings, relationshipTargetIn, relationshipsOf, relsPartNameFor, removeNode, replaceChildren, replaceNode, replayFixture, resolve, resolveContentTypeOf, resolveTocRowHeadings, runAddressRanges, runPropertyEdits, runsCovering, sanitizeHref, satisfies, scrubExport, segmentsOf, semanticDigest, serializeOoxmlPart, setCommentResolved, stableHash, storyParagraphs, storyRootsOf, stylesPartOf, toSafeRecord, tocEntryText, tocLeftIndentTwips, twips, twipsToPoints, usedParaIds, validateDrawingOp, validateFixture, validateOoxmlPart, validatePackageInvariants, validateTreeOp, w14RootPrefix, withContentTypeOverride, withCustomXmlDataPart, withCustomXmlNode, withExportedCustomNodes, withNewPart, withRelationship, withoutCustomXmlDataPart, withoutCustomXmlNode, withoutOrphanCustomXmlNodes, wrapTargetToAnchorSpec };
|