@docx-editor.dev/core 2.4.1 → 2.6.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/THIRD_PARTY_NOTICES.md +39 -1
- package/dist/automation.cjs +1 -1
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +8 -8
- package/dist/binding.d.ts +8 -8
- package/dist/binding.js +1 -1
- package/dist/chunk-4GQXAXTZ.js +5 -0
- package/dist/chunk-DGUHCJPF.cjs +18 -0
- package/dist/chunk-DY3QVCWC.cjs +10 -0
- package/dist/chunk-E7BXJ4BF.js +1 -0
- package/dist/chunk-F7Z6PWAZ.cjs +2 -0
- package/dist/chunk-IJ4V3LGV.cjs +2 -0
- package/dist/chunk-JEMP5YI5.cjs +15 -0
- package/dist/{chunk-YMIMLEX4.cjs → chunk-JZXK4DKV.cjs} +1 -1
- package/dist/chunk-NIGGABAA.js +15 -0
- package/dist/chunk-OPKOTVQQ.js +18 -0
- package/dist/{chunk-GOEBQ26R.js → chunk-PSZH2VXP.js} +1 -1
- package/dist/chunk-R75OLPL6.js +10 -0
- package/dist/chunk-SFMAIFEN.cjs +2 -0
- package/dist/chunk-SKWYEZCO.cjs +5 -0
- package/dist/chunk-SMRD66T5.js +2 -0
- package/dist/chunk-UVIUNAQ6.js +2 -0
- package/dist/chunk-WAVN7MAT.js +2 -0
- package/dist/chunk-WU7PUTVA.js +2 -0
- package/dist/{chunk-OHJQ7GPZ.cjs → chunk-YMYCPY5Y.cjs} +1 -1
- package/dist/contracts/editor.cjs +1 -1
- package/dist/contracts/editor.d.cts +8 -8
- package/dist/contracts/editor.d.ts +8 -8
- package/dist/contracts/editor.js +1 -1
- package/dist/contracts/interaction.d.cts +7 -7
- package/dist/contracts/interaction.d.ts +7 -7
- package/dist/contracts/modules.d.cts +4 -4
- package/dist/contracts/modules.d.ts +4 -4
- package/dist/contracts/types.d.cts +3 -1
- package/dist/contracts/types.d.ts +3 -1
- package/dist/{custom-node-writes-C5YRoPcc.d.cts → custom-node-writes-D9G3GKQ7.d.cts} +18 -3
- package/dist/{custom-node-writes-BkMgMXxs.d.ts → custom-node-writes-tJw8U9MO.d.ts} +18 -3
- package/dist/dist-YFULGVS3.js +2 -0
- package/dist/{editor-DYvC9CZs.d.cts → editor-BZEJL3vv.d.cts} +50 -19
- package/dist/{editor-D1qHfzOt.d.ts → editor-D2zOJztO.d.ts} +50 -19
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +407 -38
- package/dist/editor.d.cts +38 -22
- package/dist/editor.d.ts +38 -22
- package/dist/editor.js +1 -1
- package/dist/harfbuzz.wasm +0 -0
- package/dist/{image-resources-DXvPZvXD.d.cts → image-resources-BaHz4QAd.d.cts} +1 -1
- package/dist/{image-resources-BG9DLyW7.d.ts → image-resources-Cl5_cNi9.d.ts} +1 -1
- package/dist/{index-DpY3WZuP.d.ts → index-D8L8WrNF.d.ts} +178 -23
- package/dist/{index-Bb-QAg_f.d.cts → index-_xF7n_z0.d.cts} +178 -23
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +159 -47
- package/dist/layout.d.ts +159 -47
- package/dist/layout.js +1 -1
- package/dist/node-module-shim-TTKTT66I.js +1 -0
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +20 -6
- package/dist/output.d.ts +20 -6
- package/dist/output.js +1 -1
- package/dist/{review-reads-CxgN62yp.d.cts → review-reads-Dr0CpW6u.d.cts} +25 -1
- package/dist/{review-reads-CQmU9Lcl.d.ts → review-reads-HDvoQXK2.d.ts} +25 -1
- package/dist/{review-support-DgXTIYBW.d.ts → review-support-D4ZBdUXa.d.ts} +46 -2
- package/dist/{review-support-BJ-YjGmD.d.cts → review-support-T-riLz4Y.d.cts} +46 -2
- package/dist/{revision-projection-DHAkcD_L.d.ts → revision-projection-UKqvPa4-.d.ts} +53 -2
- package/dist/{revision-projection-72ZApe-g.d.cts → revision-projection-WzlQGBJx.d.cts} +53 -2
- package/dist/{semantic-cell-selection-DZtyMXkH.d.ts → semantic-cell-selection-B5vfPz4Q.d.ts} +7 -4
- package/dist/{semantic-cell-selection--ezfezTe.d.cts → semantic-cell-selection-BTQFpN0S.d.cts} +7 -4
- package/dist/{semantic-interaction-DrgbgKg6.d.ts → semantic-interaction-CDNEU_Tx.d.cts} +2 -30
- package/dist/{semantic-interaction-2yxdv7q0.d.cts → semantic-interaction-lvpzZRpA.d.ts} +2 -30
- package/dist/{semantic-paint-BedBxkyY.d.ts → semantic-paint-BBPL3u5w.d.ts} +111 -3
- package/dist/{semantic-paint-BYjE0Xbl.d.cts → semantic-paint-IjbL-4CT.d.cts} +111 -3
- package/dist/{semantic-records-CR5hTqMK.d.ts → semantic-records-CdQvpUj1.d.ts} +106 -8
- package/dist/{semantic-records-DSD8WENa.d.cts → semantic-records-DEOs3_tE.d.cts} +106 -8
- package/dist/{shaped-measurer-CBOTJTV_.d.cts → shaped-measurer-C2SJAjV0.d.cts} +1 -1
- package/dist/{shaped-measurer-BL8g4AcW.d.ts → shaped-measurer-l4o5ITJ0.d.ts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +38 -15
- package/dist/store.d.ts +38 -15
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-EZXbR8bW.d.cts → tree-op-types-CUCwPWjT.d.cts} +1 -1
- package/dist/{tree-op-types-8a6xyRCN.d.ts → tree-op-types-D0fTNBVW.d.ts} +1 -1
- package/dist/{tree-session-SucW0znF.d.ts → tree-session-CH1oA75f.d.ts} +64 -42
- package/dist/{tree-session-DrMm8Cj2.d.cts → tree-session-b7bggR-S.d.cts} +64 -42
- package/dist/{tree-store-UYrGKF_Q.d.cts → tree-store-BqgeCa1Q.d.cts} +29 -2
- package/dist/{tree-store-BoM6eXaL.d.ts → tree-store-CIKASRHk.d.ts} +29 -2
- package/licenses/HarfBuzz-COPYING.txt +42 -0
- package/package.json +6 -4
- package/dist/chunk-33F6TRXO.js +0 -2
- package/dist/chunk-4WWEDTTE.js +0 -2
- package/dist/chunk-BS554B6D.cjs +0 -2
- package/dist/chunk-DQ5HGUWG.cjs +0 -12
- package/dist/chunk-EQO762XH.cjs +0 -10
- package/dist/chunk-F6WNPYOM.js +0 -2
- package/dist/chunk-FL4GWK76.js +0 -12
- package/dist/chunk-GWG5IVVX.cjs +0 -5
- package/dist/chunk-IZIL6BAW.cjs +0 -12
- package/dist/chunk-LIJPSHRA.js +0 -5
- package/dist/chunk-MHDO6HLI.cjs +0 -2
- package/dist/chunk-SG7OH2EK.js +0 -12
- package/dist/chunk-TCX3PVWR.js +0 -10
- package/dist/chunk-YTYKNA6X.cjs +0 -2
- package/dist/chunk-ZACHY6OS.js +0 -1
package/dist/layout.d.ts
CHANGED
|
@@ -1,38 +1,25 @@
|
|
|
1
|
-
import { V as VersionedShapingLibrary, T as TextShaper, F as FontByteValidator, a as FixedPointRoundingMode, b as FixedPoint, c as TextDirection, S as ShapedRun } from './shaped-measurer-
|
|
2
|
-
export { C as CacheLookup, d as CacheMiss, e as CacheProvenance, D as DeclaredFontSubstitution, f as FontFingerprintInputs, g as FontRequest, h as FontResolutionError, i as FontResolutionErrorCode, j as FontResourceDefinition, k as FontResourceInstrumentation, l as FontResourceSnapshot, m as FontResourceSnapshotOptions, n as FontSubstitution, o as FontValidationResult, G as GlyphOutline, H as HARD_MAX_AGGREGATE_FONT_BYTES, p as HARD_MAX_FONT_BYTES, q as HARD_MAX_FONT_SOURCES, L as LayoutShapingOptions, N as NormalizationPolicy, O as OperationSnapshot, r as OperationSnapshotField, s as OperationSnapshotGuard, R as ResolvedCache, t as ResolvedFont, u as ResourceDependencyProvenance, v as ShapeInput, w as ShapedCluster, x as ShapedFontSpan, y as ShapedGlyph, z as ShapedMeasurerOptions, A as ShapedRunComparatorInputs, B as ShapedVerticalMetrics, E as ShapingEnvironment, I as ShapingEnvironmentFingerprintInputs, J as ShapingEnvironmentInput, K as boundedStructuralFontValidator, M as captureOperationSnapshot, P as createFontResourceSnapshot, Q as createShapedMeasurer, U as createShapedRun, W as createShapingEnvironment, X as fixedPoint, Y as fontRequestKey, Z as guardOperationSnapshot, _ as sha256FontBytes, $ as shapedRunComparatorInputs, a0 as shapingEnvironmentFingerprint, a1 as shapingEnvironmentFingerprintInputs } from './shaped-measurer-
|
|
3
|
-
import { d as
|
|
4
|
-
export { s as AUTO_PARAGRAPH_SPACING_PT, t as BorderGridGeometry, C as ContentControlBoundaryRecord, u as ContentControlGeometryFragment, v as ContentControlLevel, w as ContentControlLock, x as ContentControlMappedType, y as DEFAULT_PAGE_GEOMETRY, z as DEFAULT_RUN_STYLE, E as DEFAULT_TAB_INTERVAL_PT,
|
|
1
|
+
import { V as VersionedShapingLibrary, T as TextShaper, F as FontByteValidator, a as FixedPointRoundingMode, b as FixedPoint, c as TextDirection, S as ShapedRun } from './shaped-measurer-l4o5ITJ0.js';
|
|
2
|
+
export { C as CacheLookup, d as CacheMiss, e as CacheProvenance, D as DeclaredFontSubstitution, f as FontFingerprintInputs, g as FontRequest, h as FontResolutionError, i as FontResolutionErrorCode, j as FontResourceDefinition, k as FontResourceInstrumentation, l as FontResourceSnapshot, m as FontResourceSnapshotOptions, n as FontSubstitution, o as FontValidationResult, G as GlyphOutline, H as HARD_MAX_AGGREGATE_FONT_BYTES, p as HARD_MAX_FONT_BYTES, q as HARD_MAX_FONT_SOURCES, L as LayoutShapingOptions, N as NormalizationPolicy, O as OperationSnapshot, r as OperationSnapshotField, s as OperationSnapshotGuard, R as ResolvedCache, t as ResolvedFont, u as ResourceDependencyProvenance, v as ShapeInput, w as ShapedCluster, x as ShapedFontSpan, y as ShapedGlyph, z as ShapedMeasurerOptions, A as ShapedRunComparatorInputs, B as ShapedVerticalMetrics, E as ShapingEnvironment, I as ShapingEnvironmentFingerprintInputs, J as ShapingEnvironmentInput, K as boundedStructuralFontValidator, M as captureOperationSnapshot, P as createFontResourceSnapshot, Q as createShapedMeasurer, U as createShapedRun, W as createShapingEnvironment, X as fixedPoint, Y as fontRequestKey, Z as guardOperationSnapshot, _ as sha256FontBytes, $ as shapedRunComparatorInputs, a0 as shapingEnvironmentFingerprint, a1 as shapingEnvironmentFingerprintInputs } from './shaped-measurer-l4o5ITJ0.js';
|
|
3
|
+
import { d as LayoutBox, D as DrawingPoint, e as DrawingInsets, a as StyleSpanRecord, I as InlineDrawingRecord, M as ModelRange, R as ResolvedRunStyle, f as ThemeFonts, g as ParagraphSpacing, h as ParagraphLineSpacing, i as ParagraphBorderEdge, j as ParagraphBorders, k as ResolvedTabStops, l as TableBorderSide, S as SemanticLayout, B as BlockFragmentRecord, m as InlineDrawingLayoutContext, T as TextMeasurer, H as HyperlinkProjector, F as FieldLinkProjector, n as PageRecord, o as ParagraphFragmentRecord, p as StoryPageFieldNeeds, A as AnchoredDrawingRecord, P as PageGeometry, q as CellBorderBox, r as TableBorderBox } from './semantic-records-CdQvpUj1.js';
|
|
4
|
+
export { s as AUTO_PARAGRAPH_SPACING_PT, t as BorderGridGeometry, C as ContentControlBoundaryRecord, u as ContentControlGeometryFragment, v as ContentControlLevel, w as ContentControlLock, x as ContentControlMappedType, y as DEFAULT_PAGE_GEOMETRY, z as DEFAULT_RUN_STYLE, E as DEFAULT_TAB_INTERVAL_PT, G as DEFAULT_TAB_INTERVAL_TWIPS, J as EMPTY_TAB_STOPS, K as FieldAtomMarker, N as HeaderFooterStoryRecord, O as HyperlinkFieldSpec, L as LineRecord, Q as LineSpacingRule, U as ListMarkerRecord, V as MAX_BORDER_SPACE_PT, W as MAX_BORDER_WIDTH_PT, X as MAX_PARAGRAPH_SPACING_PT, Y as MAX_TABLE_BORDER_STROKES, Z as MAX_TAB_POSITION_TWIPS, _ as MAX_TAB_STOPS, $ as PARAGRAPH_BORDER_SIDES, a0 as ParagraphAutoSpacingContext, a1 as ParagraphBorderSide, a2 as ParagraphBorderStrokeRecord, a3 as ParagraphBottomBorderRecord, a4 as ParagraphIndent, a5 as ResolvedCellBorders, a6 as ResolvedTableBorderEdge, a7 as ResolvedTableBorderEdgeSegment, a8 as ResolvedUnderline, a9 as SINGLE_LINE_SPACING, aa as SourceRange, ab as SpanLinkRecord, ac as TAB_LEADER_GLYPH, ad as TabAlignment, ae as TabDestination, af as TabLeader, ag as TabStop, ah as TableBorderSideName, ai as TableBorderStrokeRecord, c as TableCellFragmentRecord, aj as TableFragmentRecord, b as TableRowFragmentRecord, ak as VerticalAlign, al as appliedSpaceBefore, am as applyLineSpacing, an as baselineShiftPtOf, ao as borderExtentPt, ap as borderWeight, aq as bottomBorderExtentPt, ar as cascadedParagraphBorders, as as cascadedTabStops, at as collapsedSpaceBefore, au as contentControlsOfLayout, av as defaultTabIntervalFromSettings, aw as displayText, ax as effectiveContentControlLock, ay as fragmentsOfParagraph, az as lineAtPosition, aA as linesOf, aB as measureDisplayText, aC as nextTabDestination, aD as paragraphBorderExtentPt, aE as paragraphBorderStrokeWidthPt, aF as paragraphBorders, aG as paragraphBordersFingerprint, aH as paragraphBreaksBefore, aI as paragraphContextualSpacing, aJ as paragraphFragmentsOf, aK as paragraphFragmentsOfBlocks, aL as paragraphLineSpacing, aM as paragraphSpacing, aN as paragraphTabStops, aO as readBorderSide, aP as readCellBorders, aQ as readTableBorders, aR as resolveBorderConflict, aS as resolveRunStyle, aT as resolveTableCellBorderGrid, aU as runStylesEqual, aV as tabAdvanceWidth, aW as tabStopsFingerprint, aX as unionLayoutBoxes, aY as withDefaultTabInterval } from './semantic-records-CdQvpUj1.js';
|
|
5
5
|
import { O as OoxmlNode, a as OoxmlElement, e as OoxmlPart } from './ooxml-tree-BU0e3DVi.js';
|
|
6
|
-
import { O as OoxmlProperty, C as ContentControlKind, n as ContentControlLevel, o as ContentControlLock, p as ContentControlDataBinding, I as ImpactClass } from './tree-op-types-
|
|
7
|
-
export {
|
|
6
|
+
import { O as OoxmlProperty, C as ContentControlKind, n as ContentControlLevel, o as ContentControlLock, p as ContentControlDataBinding, I as ImpactClass } from './tree-op-types-D0fTNBVW.js';
|
|
7
|
+
export { m as TableBorderStyle } from './tree-op-types-D0fTNBVW.js';
|
|
8
8
|
import { N as NoteKind, n as noteTypeOf } from './note-nodes-BPSTVDMr.js';
|
|
9
|
-
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties } from './review-reads-
|
|
10
|
-
export { p as paragraphOrderOfPart } from './review-reads-
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties } from './review-reads-HDvoQXK2.js';
|
|
10
|
+
export { p as paragraphOrderOfPart } from './review-reads-HDvoQXK2.js';
|
|
11
|
+
import { D as DocumentProperties, T as TreeModelChange } from './tree-store-CIKASRHk.js';
|
|
12
|
+
import { R as RevisionDisplayMode } from './revision-projection-UKqvPa4-.js';
|
|
13
|
+
export { D as DEFAULT_REVISION_DISPLAY_MODE, a as RevisionAttribution, b as RevisionKind, f as formatRevisionOf, m as markRevisionRemovesMark, p as paragraphMarkFormatRevisionOf, c as paragraphMarkRevisionOf, d as paragraphMarkRevisionsOf, r as revisionsAreDeletion, e as revisionsVisible, s as shownMarkRevision } from './revision-projection-UKqvPa4-.js';
|
|
14
|
+
import { a as SectionColumns } from './semantic-cell-selection-B5vfPz4Q.js';
|
|
15
|
+
export { C as CellSelection, D as DEFAULT_SECTION_PROPERTIES, b as DEFAULT_VERTICAL_WEIGHT, c as DocumentSection, d as DocumentSectionsEnumeration, e as DrawingOverlayFrame, H as HitPoint, f as HitTestOptions, M as MAX_DOCUMENT_SECTIONS, P as PlacedCell, g as SectionBreakType, h as SectionColumnDefinition, i as SectionMargins, j as SectionPageNumbering, S as SectionProperties, k as SemanticHit, l as SemanticHitDrawing, T as TableCellAddress, m as TableCellContext, n as caretBoxOnLine, o as cellSelectionBetween, p as cellSelectionRects, q as cellSelectionText, r as contentControlAtPoint, s as enumerateDocumentSections, t as enumerateDocumentSectionsBounded, u as findDrawingOverlayFrameInLayout, v as geometryOfSection, w as hitTestPage, x as hitTestSheet, y as isFurniturePoint, z as lineEndOffset, A as pageAtY, B as paragraphSectionNode, E as paragraphsInCells, F as parsePageNumbering, G as parseSectionProperties, I as readSectionProperties, J as spanOffsetX, K as spansInCells, L as tableContextAt } from './semantic-cell-selection-B5vfPz4Q.js';
|
|
15
16
|
export { M as MAX_SDT_NESTING, c as collectFlowBlocks, a as contentControlContentChildren, i as isContentControl, b as isContentControlContent } from './content-control-walk-D06GijR0.js';
|
|
16
|
-
export { h as CommentAnchor, i as CommentPosition, C as CommentRecord, j as CommentThreadState, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, k as ReviewParagraphAnchor, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, W as W15_NAMESPACE_URI, l as activeReviewItem, m as
|
|
17
|
-
import {
|
|
18
|
-
export {
|
|
19
|
-
import './image-resources-
|
|
17
|
+
export { h as CommentAnchor, i as CommentPosition, C as CommentRecord, j as CommentThreadState, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, k as ReviewParagraphAnchor, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, W as W15_NAMESPACE_URI, l as activeReviewItem, m as anchorLineY, n as commentBodyText, o as commentInitials, p as firstReviewRange, r as reviewAnchorIndex, q as reviewItemGeometry, s as reviewItemKey, t as reviewItemPositionRank, u as reviewItemRanges, v as reviewItemsAt, w as reviewThreadRootOf } from './review-support-D4ZBdUXa.js';
|
|
18
|
+
import { S as SemanticPosition, b as SelectionRect, a as SemanticSelection } from './semantic-interaction-lvpzZRpA.js';
|
|
19
|
+
export { c as CaretAtOptions, C as CaretGeometry, M as MoveCaretOptions, N as NavigationCommand, d as caretAt, e as caretStops, f as caretStopsForBlocks, g as compositionAnchor, h as contentControlAtSemantic, i as contentControlsInLayout, j as hitTestSemantic, m as moveCaret, p as paragraphTextFromLayout, s as spansInSelection } from './semantic-interaction-lvpzZRpA.js';
|
|
20
|
+
import './image-resources-Cl5_cNi9.js';
|
|
20
21
|
import './ooxml-package-D_CtywTW.js';
|
|
21
22
|
|
|
22
|
-
/**
|
|
23
|
-
* Which allowlisted page fields a header/footer story actually contains.
|
|
24
|
-
*
|
|
25
|
-
* Drives layout reuse: no fields → one baseline; NUMPAGES only → one layout per page count;
|
|
26
|
-
* SECTIONPAGES only → one layout per section page count; PAGE (alone or combined) → per
|
|
27
|
-
* distinct evaluated values with a bounded cache. Counts both complex markers and
|
|
28
|
-
* `w:fldSimple` (including an allowlisted page field nested inside a non-page simple field).
|
|
29
|
-
*/
|
|
30
|
-
interface StoryPageFieldNeeds {
|
|
31
|
-
readonly hasPage: boolean;
|
|
32
|
-
readonly hasNumPages: boolean;
|
|
33
|
-
readonly hasSectionPages: boolean;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
23
|
/**
|
|
37
24
|
* Page-field evaluation context for furniture projection.
|
|
38
25
|
*
|
|
@@ -64,7 +51,13 @@ declare function formatPageNumber(value: number, format: string | undefined): st
|
|
|
64
51
|
* — fail-open with an empty display (model atom preserved).
|
|
65
52
|
*/
|
|
66
53
|
interface NoteMarkContext {
|
|
67
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* scopeId → formatted mark (or null when suppressed).
|
|
56
|
+
*
|
|
57
|
+
* IMMUTABLE once the context is built. `noteMarksCacheToken` memoizes on the context object
|
|
58
|
+
* and that token reaches every paragraph's cache key, so a later `marks.set` would pin the
|
|
59
|
+
* whole document to a token for marks it no longer has.
|
|
60
|
+
*/
|
|
68
61
|
readonly marks: ReadonlyMap<string, string | null>;
|
|
69
62
|
/**
|
|
70
63
|
* When set, every automatic mark measures at least this string's width (eachPage
|
|
@@ -107,16 +100,6 @@ interface ProjectedNoteMark {
|
|
|
107
100
|
/** Resolve display text for a noteReference / noteRef node under a mark context. */
|
|
108
101
|
declare function projectedNoteMarkText(node: OoxmlNode, context: NoteMarkContext | undefined): ProjectedNoteMark | null;
|
|
109
102
|
|
|
110
|
-
/**
|
|
111
|
-
* How layout turns a typed `w:hyperlink` node into the sanitized record spans carry.
|
|
112
|
-
*
|
|
113
|
-
* Injected rather than computed here because resolving `r:id` needs the PACKAGE's
|
|
114
|
-
* relationships and this module only ever sees one part's tree. `null` means the caller
|
|
115
|
-
* declined to project — the runs still measure and paint, they simply carry no link, which is
|
|
116
|
-
* the right degradation: text is never lost for want of a target.
|
|
117
|
-
*/
|
|
118
|
-
type HyperlinkProjector = (link: OoxmlNode) => SpanLinkRecord | null;
|
|
119
|
-
|
|
120
103
|
/** A fingerprint over one paragraph's layout inputs. */
|
|
121
104
|
type ParagraphLayoutKey = string;
|
|
122
105
|
/** Cache counters, for asserting that incremental layout is actually reusing work. */
|
|
@@ -481,6 +464,10 @@ declare function withResolvedListItems<T extends {
|
|
|
481
464
|
* Host oracle for "is this font family really loaded". Supplied, a Symbol/Wingdings
|
|
482
465
|
* bullet keeps the file's own private-use codepoint so the authored typeface draws it;
|
|
483
466
|
* absent, it falls back to the Unicode equivalent rather than a tofu box.
|
|
467
|
+
*
|
|
468
|
+
* The resolve is memoized on this function's IDENTITY: a host whose answers change
|
|
469
|
+
* over time (a font finished loading) must supply a new closure at that point, or the
|
|
470
|
+
* memo will keep serving marker glyphs computed from the old answers.
|
|
484
471
|
*/
|
|
485
472
|
readonly isFontAvailable?: (family: string) => boolean;
|
|
486
473
|
}>(options: T, blocks: readonly OoxmlElement[]): T & {
|
|
@@ -736,6 +723,36 @@ interface CompoundBorderMetrics {
|
|
|
736
723
|
*/
|
|
737
724
|
declare function computeDoubleBorderMetricsPt(widthPt: number): CompoundBorderMetrics;
|
|
738
725
|
|
|
726
|
+
/** Paragraph ids in document order, deduplicated across fragments. */
|
|
727
|
+
declare function documentOrder(layout: SemanticLayout): string[];
|
|
728
|
+
|
|
729
|
+
/** The rectangles covering a selection, one per line it spans. */
|
|
730
|
+
declare function selectionRects(layout: SemanticLayout, selection: SemanticSelection): SelectionRect[];
|
|
731
|
+
/** A model range to highlight, and the key the caller knows it by. */
|
|
732
|
+
interface KeyedRange {
|
|
733
|
+
readonly key: string;
|
|
734
|
+
readonly from: SemanticPosition;
|
|
735
|
+
readonly to: SemanticPosition;
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* Rectangles for MANY ranges in ONE pass over the lines.
|
|
739
|
+
*
|
|
740
|
+
* Not `selectionRects` in a loop. That walks every page, fragment and line per range, and a
|
|
741
|
+
* contract with two hundred comments would re-walk the whole document two hundred times on
|
|
742
|
+
* every layout — the highlight would cost more than the layout it decorates. One pass tests
|
|
743
|
+
* each line against every range instead, which is the same work a single selection does.
|
|
744
|
+
*/
|
|
745
|
+
declare function keyedRangeRects(layout: SemanticLayout, ranges: readonly KeyedRange[],
|
|
746
|
+
/**
|
|
747
|
+
* Pages to measure, or every page when absent.
|
|
748
|
+
*
|
|
749
|
+
* A band that is not on screen is not painted, so measuring it is pure cost — and it is
|
|
750
|
+
* cost paid per keystroke, because an edit republishes the layout. Bounding this to the
|
|
751
|
+
* materialized pages is what keeps typing in a heavily reviewed document as fast as
|
|
752
|
+
* typing in a clean one.
|
|
753
|
+
*/
|
|
754
|
+
pages?: ReadonlySet<number>): Map<string, SelectionRect[]>;
|
|
755
|
+
|
|
739
756
|
/**
|
|
740
757
|
* The next word boundary from `offset`, in `direction`.
|
|
741
758
|
*
|
|
@@ -744,6 +761,21 @@ declare function computeDoubleBorderMetricsPt(widthPt: number): CompoundBorderMe
|
|
|
744
761
|
*/
|
|
745
762
|
declare function wordBoundary(text: string, offset: number, direction: -1 | 1): number;
|
|
746
763
|
|
|
764
|
+
/**
|
|
765
|
+
* Where an INSERT aimed at this position actually lands: past any deletion it sits inside.
|
|
766
|
+
*
|
|
767
|
+
* The caret may rest anywhere in struck text — Word's rule, and the tracked lane's
|
|
768
|
+
* (`tree-op-tracked.ts`): all-markup shows the words, so the reader can put the caret
|
|
769
|
+
* between two of them. What may NOT happen is new content landing inside the `w:del`,
|
|
770
|
+
* where it would serialize as `w:t` under a wrapper that requires `w:delText` and be taken
|
|
771
|
+
* down by an accept of someone else's deletion. A deletion stays contiguous, so the words
|
|
772
|
+
* go after it — the order a replacement reads in.
|
|
773
|
+
*
|
|
774
|
+
* RANGE endpoints are not this function's business: a drag may legitimately cover deleted
|
|
775
|
+
* text, so callers adjust only collapsed insertion points.
|
|
776
|
+
*/
|
|
777
|
+
declare function positionPastDeletion(layout: SemanticLayout, position: SemanticPosition): SemanticPosition;
|
|
778
|
+
|
|
747
779
|
/**
|
|
748
780
|
* The exact HarfBuzz build this engine shapes against.
|
|
749
781
|
*
|
|
@@ -763,7 +795,7 @@ declare function isHarfBuzzInitialized(): boolean;
|
|
|
763
795
|
* count, glyph count and outline size are all attacker-influenced, and an unbounded shape call is
|
|
764
796
|
* a denial-of-service vector rather than a rendering bug.
|
|
765
797
|
*/
|
|
766
|
-
type HarfBuzzShapingErrorCode = 'notInitialized' | 'fontOverLimit' | 'malformedFont' | 'textOverLimit' | 'codepointsOverLimit' | 'glyphOverLimit' | 'outlineOverLimit' | 'shapedRunOverLimit' | 'unsupportedVariationAxes' | 'unsupportedFallback' | 'unsupportedColorFont' | 'unsupportedNormalization' | 'invalidBidiLevel' | 'shapingLibraryMismatch' | 'disposed';
|
|
798
|
+
type HarfBuzzShapingErrorCode = 'notInitialized' | 'wasmUnavailable' | 'unsupportedRuntime' | 'fontOverLimit' | 'malformedFont' | 'textOverLimit' | 'codepointsOverLimit' | 'glyphOverLimit' | 'outlineOverLimit' | 'shapedRunOverLimit' | 'unsupportedVariationAxes' | 'unsupportedFallback' | 'unsupportedColorFont' | 'unsupportedNormalization' | 'invalidBidiLevel' | 'shapingLibraryMismatch' | 'disposed';
|
|
767
799
|
/**
|
|
768
800
|
* A shaping call that was refused, carrying the limit it exceeded where there was one.
|
|
769
801
|
*
|
|
@@ -780,6 +812,7 @@ declare class HarfBuzzShapingError extends Error {
|
|
|
780
812
|
readonly limit?: number;
|
|
781
813
|
readonly actual?: number;
|
|
782
814
|
readonly diagnostic?: string;
|
|
815
|
+
readonly cause?: unknown;
|
|
783
816
|
});
|
|
784
817
|
}
|
|
785
818
|
/**
|
|
@@ -855,6 +888,38 @@ declare const roundFontUnitToFixedPoint: (fontUnits: number, denominator: number
|
|
|
855
888
|
*/
|
|
856
889
|
declare const createHarfBuzzTextShaper: (options?: HarfBuzzTextShaperOptions) => HarfBuzzTextShaper;
|
|
857
890
|
|
|
891
|
+
/**
|
|
892
|
+
* Point the text shaper at an externally hosted copy of `harfbuzz.wasm`.
|
|
893
|
+
*
|
|
894
|
+
* Needed only under bundlers that do not emit `new URL(..., import.meta.url)`
|
|
895
|
+
* assets. esbuild and Bun are the common ones, and so is any build that inlines
|
|
896
|
+
* dynamic imports, such as a library bundle. There, the build succeeds and the
|
|
897
|
+
* shaper fails at runtime with an `EditorFontError` whose code is
|
|
898
|
+
* `wasmUnavailable`; this function is the fix. Webpack, Turbopack and Vite emit
|
|
899
|
+
* the binary on their own, and passing a URL there simply overrides theirs.
|
|
900
|
+
*
|
|
901
|
+
* ```ts
|
|
902
|
+
* import { setHarfBuzzWasmUrl } from '@docx-editor.dev/core/layout';
|
|
903
|
+
* setHarfBuzzWasmUrl('/static/harfbuzz.wasm');
|
|
904
|
+
* ```
|
|
905
|
+
*
|
|
906
|
+
* Pass a URL your application controls. It is fetched and instantiated as
|
|
907
|
+
* WebAssembly, so never derive it from user input, a query parameter, or remote
|
|
908
|
+
* configuration. Serving it cross-origin needs that origin in your `connect-src`
|
|
909
|
+
* CSP directive, and WebAssembly needs `wasm-unsafe-eval` in `script-src` either
|
|
910
|
+
* way.
|
|
911
|
+
*
|
|
912
|
+
* Call it before the first editor is created. The runtime reads the location once
|
|
913
|
+
* and caches the result, so a call afterwards warns and does nothing: fix the
|
|
914
|
+
* call site and reload. The file to serve is exported as
|
|
915
|
+
* `@docx-editor.dev/core/harfbuzz.wasm`, and it must be the copy from the
|
|
916
|
+
* installed package version, because the runtime refuses a version mismatch at
|
|
917
|
+
* load rather than shaping with unverified metrics.
|
|
918
|
+
*
|
|
919
|
+
* @public
|
|
920
|
+
*/
|
|
921
|
+
declare function setHarfBuzzWasmUrl(url: string | URL): void;
|
|
922
|
+
|
|
858
923
|
/**
|
|
859
924
|
* UAX #9 embedding levels, one per UTF-16 code unit, plus the paragraph ranges they were resolved
|
|
860
925
|
* within.
|
|
@@ -1220,6 +1285,15 @@ interface LayoutNoteStoryOptions {
|
|
|
1220
1285
|
readonly cache?: ParagraphLayoutCache<readonly PendingLine[]>;
|
|
1221
1286
|
readonly styleCascade?: StyleCascadeTable;
|
|
1222
1287
|
readonly defaultTabStopPt?: number;
|
|
1288
|
+
/**
|
|
1289
|
+
* Same projector seams the BODY walk uses. Without them a `w:hyperlink` or a HYPERLINK
|
|
1290
|
+
* field inside a note painted as plain text — measured, but carrying no link record for
|
|
1291
|
+
* paint to anchor and navigation to activate.
|
|
1292
|
+
*/
|
|
1293
|
+
readonly projectLink?: HyperlinkProjector;
|
|
1294
|
+
readonly projectFieldLink?: FieldLinkProjector;
|
|
1295
|
+
/** Document properties for a document-property field inside a note story. */
|
|
1296
|
+
readonly documentProperties?: DocumentProperties;
|
|
1223
1297
|
/** Derived display marks for noteRef projection inside the note body. */
|
|
1224
1298
|
readonly noteMarks?: NoteMarkContext;
|
|
1225
1299
|
/**
|
|
@@ -1333,6 +1407,15 @@ interface NotesLayoutInput {
|
|
|
1333
1407
|
readonly cache?: ParagraphLayoutCache<readonly PendingLine[]>;
|
|
1334
1408
|
readonly styleCascade?: StyleCascadeTable;
|
|
1335
1409
|
readonly defaultTabStopPt?: number;
|
|
1410
|
+
/**
|
|
1411
|
+
* Link projector seams, same as the body walk's. Normally injected by `semantic-layout`
|
|
1412
|
+
* from its own options, so a note's `w:hyperlink` / HYPERLINK field carries the same
|
|
1413
|
+
* sanitized record a body one does instead of painting dead text.
|
|
1414
|
+
*/
|
|
1415
|
+
readonly projectLink?: HyperlinkProjector;
|
|
1416
|
+
readonly projectFieldLink?: FieldLinkProjector;
|
|
1417
|
+
/** Document properties for a document-property field inside a note story. */
|
|
1418
|
+
readonly documentProperties?: DocumentProperties;
|
|
1336
1419
|
/**
|
|
1337
1420
|
* Inline drawing support per notes part. Absent means note paragraphs flow without
|
|
1338
1421
|
* drawing records, which is what a headless caller with no image port wants.
|
|
@@ -1469,7 +1552,7 @@ interface HeaderFooterStoryLayout {
|
|
|
1469
1552
|
* on a constant. It sits at the tail because the parameters ahead of it are already
|
|
1470
1553
|
* positional; new callers should keep passing `undefined` for what they do not set.
|
|
1471
1554
|
*/
|
|
1472
|
-
declare function layoutHeaderFooterStory(part: OoxmlPart, contentWidth: number, measurer: TextMeasurer, producer: string, cache?: ParagraphLayoutCache<readonly PendingLine[]>, styleCascade?: StyleCascadeTable, pageContext?: FieldPageContext, maxPageContextEntries?: number, defaultTabStopPt?: number, displayMode?: RevisionDisplayMode, inlineDrawingLayout?: InlineDrawingLayoutContext, drawingTokenForParagraph?: (paragraph: OoxmlNode) => string, drawingLayoutToken?: string, hfPageContext?: HeaderFooterPageContext): HeaderFooterStoryLayout;
|
|
1555
|
+
declare function layoutHeaderFooterStory(part: OoxmlPart, contentWidth: number, measurer: TextMeasurer, producer: string, cache?: ParagraphLayoutCache<readonly PendingLine[]>, styleCascade?: StyleCascadeTable, pageContext?: FieldPageContext, maxPageContextEntries?: number, defaultTabStopPt?: number, displayMode?: RevisionDisplayMode, inlineDrawingLayout?: InlineDrawingLayoutContext, drawingTokenForParagraph?: (paragraph: OoxmlNode) => string, drawingLayoutToken?: string, hfPageContext?: HeaderFooterPageContext, documentProperties?: DocumentProperties): HeaderFooterStoryLayout;
|
|
1473
1556
|
|
|
1474
1557
|
/** The flow state as it stood immediately before one block was placed. */
|
|
1475
1558
|
interface FlowCheckpoint {
|
|
@@ -1479,6 +1562,17 @@ interface FlowCheckpoint {
|
|
|
1479
1562
|
readonly pageFragments: readonly BlockFragmentRecord[];
|
|
1480
1563
|
/** Anchored drawings already collected for the open page. */
|
|
1481
1564
|
readonly pendingAnchoredDrawings: readonly AnchoredDrawingRecord[];
|
|
1565
|
+
/**
|
|
1566
|
+
* Anchored drawings overlap resolution pushed onto the NEXT page, and how many times each
|
|
1567
|
+
* drawing has been pushed.
|
|
1568
|
+
*
|
|
1569
|
+
* Flow state like the rest of this record, and carried for the same reason: a resume that
|
|
1570
|
+
* started with an empty list dropped a drawing that the previous pass had deferred but not
|
|
1571
|
+
* yet placed, and a convergence that did not compare them accepted a flow that still owed
|
|
1572
|
+
* the next page a drawing as equal to one that owed it nothing.
|
|
1573
|
+
*/
|
|
1574
|
+
readonly deferredAnchoredDrawings: readonly AnchoredDrawingRecord[];
|
|
1575
|
+
readonly anchorPageDeferCounts: ReadonlyMap<string, number>;
|
|
1482
1576
|
readonly cursorY: number;
|
|
1483
1577
|
readonly lineCounter: number;
|
|
1484
1578
|
/** Trailing paragraph spacing participating in adjacent-spacing collapse. */
|
|
@@ -1699,6 +1793,19 @@ interface SemanticLayoutOptions {
|
|
|
1699
1793
|
* degradation a headless test or a furniture-only pass gets, and it is the safe one.
|
|
1700
1794
|
*/
|
|
1701
1795
|
readonly projectLink?: HyperlinkProjector;
|
|
1796
|
+
/**
|
|
1797
|
+
* Turns a parsed HYPERLINK field instruction into the SANITIZED record its result carries.
|
|
1798
|
+
*
|
|
1799
|
+
* An option for the same reason as {@link projectLink}: the raw target must cross the
|
|
1800
|
+
* surface's href trust boundary, which layout cannot see. Absent means the field's cached
|
|
1801
|
+
* result still measures, breaks and paints — it simply is not clickable.
|
|
1802
|
+
*/
|
|
1803
|
+
readonly projectFieldLink?: FieldLinkProjector;
|
|
1804
|
+
/**
|
|
1805
|
+
* The document's parsed metadata, for document-property fields (TITLE, AUTHOR, …). Read once
|
|
1806
|
+
* by the surface and shared across body, table, note and header/footer flows.
|
|
1807
|
+
*/
|
|
1808
|
+
readonly documentProperties?: DocumentProperties;
|
|
1702
1809
|
/**
|
|
1703
1810
|
* Footnote/endnote layout input. When present, body layout projects note marks and a
|
|
1704
1811
|
* post-pass attaches note areas (with bounded reflow for pageBottom reservation).
|
|
@@ -1951,6 +2058,9 @@ declare function resolveDefaultSurfaceMeasurer(scale?: number, options?: CanvasM
|
|
|
1951
2058
|
/**
|
|
1952
2059
|
* The story's blocks — paragraphs and tables — in document order, flattening through
|
|
1953
2060
|
* block-level content-control wrappers under the shared nesting budget.
|
|
2061
|
+
*
|
|
2062
|
+
* Repeated calls with the same part and display mode return the SAME array instance,
|
|
2063
|
+
* shared by every caller — treat it as read-only; mutating it corrupts later callers.
|
|
1954
2064
|
*/
|
|
1955
2065
|
declare function storyBlocks(part: OoxmlPart, displayMode?: RevisionDisplayMode): OoxmlElement[];
|
|
1956
2066
|
/**
|
|
@@ -2377,10 +2487,12 @@ declare function readTableStructure(table: OoxmlNode, contentWidthPt: number, de
|
|
|
2377
2487
|
displayMode?: RevisionDisplayMode): SemanticTableStructure | null;
|
|
2378
2488
|
|
|
2379
2489
|
/**
|
|
2380
|
-
* `w:pPr/w:rPr/w:del`
|
|
2490
|
+
* `w:pPr/w:rPr/w:del` or `w:moveFrom` — a tracked revision REMOVES the paragraph mark.
|
|
2381
2491
|
*
|
|
2382
|
-
*
|
|
2383
|
-
*
|
|
2492
|
+
* Both say the break goes away once the decision is taken: a deletion outright, a `moveFrom`
|
|
2493
|
+
* because the paragraph left this place for another. Read from the paragraph-mark run
|
|
2494
|
+
* properties only. A `w:del` anywhere else in the paragraph deletes run content, which is a
|
|
2495
|
+
* different statement entirely.
|
|
2384
2496
|
*/
|
|
2385
2497
|
declare function paragraphMarkDeleted(paragraph: OoxmlNode): boolean;
|
|
2386
2498
|
/**
|
|
@@ -2407,4 +2519,4 @@ declare class TablePaginationError extends Error {
|
|
|
2407
2519
|
constructor(code: TablePaginationErrorCode, message: string);
|
|
2408
2520
|
}
|
|
2409
2521
|
|
|
2410
|
-
export { AUTO_PREFERRED_WIDTH, type AbstractNumDefinition, type BidiEmbeddingLevels, BlockFragmentRecord, CELL_PAD, COMPOUND_BORDER_MIN_GAP_PT, COMPOUND_BORDER_MIN_STROKE_PT, type CanvasMeasurerOptions, type CanvasTextContext, type CanvasTextMetrics, type CascadedParagraphFormatting, CellBorderBox, type CellMarginsPt, type CellVerticalAlign, type CompoundBorderMetrics, type ContentControlFragmentRecord, DEFAULT_CANVAS_FONT_STACK, DEFAULT_CELL_MARGINS, EMPTY_NUMBERING_INDEX, FixedPoint, FixedPointRoundingMode, FontByteValidator, type FontSlot, GRAPHEME_SEGMENTER_LOCALE, type GraphemeBoundary, type GraphemeSegment, type GraphemeWordSegmentRecord, HARFBUZZ_SHAPING_LIBRARY, type HarfBuzzFaceCacheEvent, type HarfBuzzOutlineCacheEvent, type HarfBuzzShapeCacheEvent, HarfBuzzShapingError, type HarfBuzzShapingErrorCode, type HarfBuzzTextShaper, type HarfBuzzTextShaperInstrumentation, type HarfBuzzTextShaperOptions, type HeaderFooterVariantName, type
|
|
2522
|
+
export { AUTO_PREFERRED_WIDTH, type AbstractNumDefinition, type BidiEmbeddingLevels, BlockFragmentRecord, CELL_PAD, COMPOUND_BORDER_MIN_GAP_PT, COMPOUND_BORDER_MIN_STROKE_PT, type CanvasMeasurerOptions, type CanvasTextContext, type CanvasTextMetrics, type CascadedParagraphFormatting, CellBorderBox, type CellMarginsPt, type CellVerticalAlign, type CompoundBorderMetrics, type ContentControlFragmentRecord, DEFAULT_CANVAS_FONT_STACK, DEFAULT_CELL_MARGINS, EMPTY_NUMBERING_INDEX, FieldLinkProjector, FixedPoint, FixedPointRoundingMode, FontByteValidator, type FontSlot, GRAPHEME_SEGMENTER_LOCALE, type GraphemeBoundary, type GraphemeSegment, type GraphemeWordSegmentRecord, HARFBUZZ_SHAPING_LIBRARY, type HarfBuzzFaceCacheEvent, type HarfBuzzOutlineCacheEvent, type HarfBuzzShapeCacheEvent, HarfBuzzShapingError, type HarfBuzzShapingErrorCode, type HarfBuzzTextShaper, type HarfBuzzTextShaperInstrumentation, type HarfBuzzTextShaperOptions, type HeaderFooterVariantName, HyperlinkProjector, type KeyedRange, LayoutBox, type LayoutCacheStats, type LayoutScheduler, type LayoutSchedulerOptions, type LayoutScope, type LayoutSession, type LayoutSessionStats, type LevelOverride, type ListCounterAdvance, type ListCounterState, type ListMarkerAlign, type ListSuffix, MAX_EACH_PAGE_MARK_CANDIDATES, MAX_LVL_OVERRIDES, MAX_LVL_TEXT_LENGTH, MAX_MARKER_TEXT_LENGTH, MAX_NOTES_LAID_OUT, MAX_NOTE_FRAGMENTS, MAX_NOTE_OVERFLOW_PAGES, MAX_NOTE_REFLOW_ATTEMPTS, MAX_NUMBERING_DEFINITIONS, MAX_STYLE_BASED_ON_DEPTH, MAX_STYLE_DEFINITIONS, MAX_TABLE_COLUMNS, MAX_TABLE_NESTING, MAX_TABLE_ROW_FRAGMENTS, MAX_TABLE_ROW_HEIGHT_PT, type MaterializationInput, type NoteDisplayMark, type NoteLayoutFallbackReason, type NoteMarkContext, type NotePaginationFallbackReason, type NoteReferenceSite, type NoteSeparatorLayout, type NoteSeparatorRuleStyle, type NoteStoryDrawings, type NoteStoryLayout, type NotesAttachResult, type NotesLayoutInput, type NumDefinition, type NumberingIndex, type NumberingLevel, type NumberingLevelIndent, type PageFurniture, PageGeometry, PageRecord, type PageRefIndex, ParagraphBorderEdge, ParagraphBorders, ParagraphFragmentRecord, type ParagraphKeyInputs, type ParagraphLayoutCache, type ParagraphLayoutCacheOptions, type ParagraphLayoutInputs, ParagraphLineSpacing, ParagraphSpacing, type PreferredWidth, type PreferredWidthType, type ResolvedListItem, ResolvedRunStyle, type ResolvedSurfaceMeasurer, ResolvedTabStops, RevisionDisplayMode, type ScriptItem, SectionColumns, SelectionRect, SemanticLayout, type SemanticLayoutOptions, SemanticPosition, SemanticSelection, type SemanticTableCell, type SemanticTableRow, type SemanticTableStructure, ShapedRun, type StyleCascadeTable, type StyleDefinition, StyleSpanRecord, type TableAlignment, TableBorderBox, TableBorderSide, type TableCellStyleFormatting, TablePaginationError, type TablePaginationErrorCode, type TableRowHeight, type TableRowHeightRule, TextDirection, TextMeasurer, TextShaper, UnsupportedScriptError, VersionedShapingLibrary, type ViewportWindow, WORD_SEGMENTER_LOCALE, type WordBoundary, type WordBoundaryResolverDeps, type WordSegment, attachNotesToLayout, boundedFallbackWordSegments, buildNumberingIndex, buildPageRefIndex, buildStyleCascadeTable, cascadeParagraphFormatting, cascadeRunProperties, cascadedBottomBorder, clampListValue, computeDoubleBorderMetricsPt, computeFootnoteReserves, contentControlBoundaries, createBoundedFallbackWordBoundary, createDefaultWordBoundary, createFixedMeasurer, createHarfBuzzTextShaper, createIntlWordBoundary, createLayoutScheduler, createLayoutSession, createListCounterState, createParagraphLayoutCache, defaultNoteSeparatorRuleStyle, deriveNoteDisplayMarks, deriveNoteDisplayMarksResolved, documentOrder, effectiveBorderSide, emptyTocPlaceholderParagraphIds, emptyTocSuppressedResultParagraphIds, expandLvlText, filterRefsOnPage, findSeparatorNote, formatDecimal, formatDecimalZero, formatLowerLetter, formatLowerRoman, formatNumFmt, formatPageNumber, formatUpperLetter, formatUpperRoman, fragmentOwnsAtomOffset, graphemeBoundaryEpoch, graphemeCount, graphemeOffsetToUtf16, harfBuzzFontValidator, initializeHarfBuzz, intlGraphemeBoundary, isCanvasMeasurementAvailable, isCumulativeGeometryTrustedFromLineOrigin, isGeometryTrustedCaretOffset, isHarfBuzzInitialized, isIntlSegmenterAvailable, isIntlWordSegmenterAvailable, isMarkerOnlySeparatorNote, isValidStyleId, isWholeGraphemeHorizontalBoundary, itemizeScriptFontSlots, keyedRangeRects, layoutHeaderFooterStory, layoutNoteById, layoutNoteSeparator, layoutNoteStory, layoutSemanticDocument, listMarkerBox, mergeListIndent, normalNotesOf, noteDisplayMarkMap, noteLineIdPrefix, noteMarkKey, noteSeparatorAreaBox, noteStoryBlocks, pagesToMaterialize, paragraphLayoutKey, paragraphMarkDeleted, paragraphShading, paragraphShadingBox, positionPastDeletion, projectedNoteMarkText, provisionalNoteMarks, readNumPr, readTableStructure, resetGraphemeBoundary, resolveDefaultSurfaceMeasurer, resolveDefaultWordBoundary, resolveNumberingLevel, resolveOoxmlShadingFill, resolveParagraphLayoutInputs, resolveStoryListItems, resolveStrictHexFill, revisionRemovesParagraph, roundFontUnitToFixedPoint, segmentGraphemes, segmentWords, selectionRects, semanticHorizontalBoundaries, setGraphemeBoundary, setHarfBuzzWasmUrl, shadingFillFromElement, shapedHorizontalBoundaries, storyBlocks, syntheticSeparatorBox, tableOriginX, tocFieldChromeParagraphIds, tryCreateCanvasMeasurer, utf16OffsetToGrapheme, walkStoryParagraphs, withNumberingStyleLinks, withResolvedListItems, wordBoundary, wordSegmentsToGraphemeRecords };
|
package/dist/layout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{fa as AUTO_PARAGRAPH_SPACING_PT,
|
|
1
|
+
export{fa as AUTO_PARAGRAPH_SPACING_PT,Nb as AUTO_PREFERRED_WIDTH,Pb as CELL_PAD,$ as COMPOUND_BORDER_MIN_GAP_PT,_ as COMPOUND_BORDER_MIN_STROKE_PT,pd as DEFAULT_CANVAS_FONT_STACK,Rb as DEFAULT_CELL_MARGINS,Q as DEFAULT_PAGE_GEOMETRY,cb as DEFAULT_REVISION_DISPLAY_MODE,Ya as DEFAULT_RUN_STYLE,Ic as DEFAULT_SECTION_PROPERTIES,Ca as DEFAULT_TAB_INTERVAL_PT,Ba as DEFAULT_TAB_INTERVAL_TWIPS,kc as DEFAULT_VERTICAL_WEIGHT,Yb as EMPTY_NUMBERING_INDEX,Ea as EMPTY_TAB_STOPS,p as GRAPHEME_SEGMENTER_LOCALE,g as HARFBUZZ_SHAPING_LIBRARY,j as HarfBuzzShapingError,ea as MAX_BORDER_SPACE_PT,da as MAX_BORDER_WIDTH_PT,Hc as MAX_DOCUMENT_SECTIONS,fd as MAX_EACH_PAGE_MARK_CANDIDATES,Vb as MAX_LVL_OVERRIDES,Na as MAX_LVL_TEXT_LENGTH,Ma as MAX_MARKER_TEXT_LENGTH,Tc as MAX_NOTES_LAID_OUT,Uc as MAX_NOTE_FRAGMENTS,ed as MAX_NOTE_OVERFLOW_PAGES,dd as MAX_NOTE_REFLOW_ATTEMPTS,Ub as MAX_NUMBERING_DEFINITIONS,ca as MAX_PARAGRAPH_SPACING_PT,sb as MAX_STYLE_BASED_ON_DEPTH,tb as MAX_STYLE_DEFINITIONS,Fb as MAX_TABLE_BORDER_STROKES,Ob as MAX_TABLE_NESTING,Ac as MAX_TABLE_ROW_FRAGMENTS,Qb as MAX_TABLE_ROW_HEIGHT_PT,Aa as MAX_TAB_POSITION_TWIPS,za as MAX_TAB_STOPS,ha as PARAGRAPH_BORDER_SIDES,P as ResolvedCache,ga as SINGLE_LINE_SPACING,Da as TAB_LEADER_GLYPH,Bc as TablePaginationError,n as UnsupportedScriptError,E as WORD_SEGMENTER_LOCALE,ta as appliedSpaceBefore,ka as applyLineSpacing,kd as attachNotesToLayout,bb as baselineShiftPtOf,Mb as borderExtentPt,Jb as borderWeight,qa as bottomBorderExtentPt,H as boundedFallbackWordSegments,Wb as buildNumberingIndex,hd as buildPageRefIndex,vb as buildStyleCascadeTable,N as captureOperationSnapshot,Ed as caretAt,tc as caretBoxOnLine,Cd as caretStops,Dd as caretStopsForBlocks,wb as cascadeParagraphFormatting,yb as cascadeRunProperties,xb as cascadedBottomBorder,na as cascadedParagraphBorders,Fa as cascadedTabStops,Md as cellSelectionBetween,Pd as cellSelectionRects,Qd as cellSelectionText,Oa as clampListValue,sa as collapsedSpaceBefore,Kd as compositionAnchor,aa as computeDoubleBorderMetricsPt,jd as computeFootnoteReserves,qc as contentControlAtPoint,Gd as contentControlAtSemantic,ud as contentControlBoundaries,Hd as contentControlsInLayout,X as contentControlsOfLayout,I as createBoundedFallbackWordBoundary,J as createDefaultWordBoundary,nd as createFixedMeasurer,m as createHarfBuzzTextShaper,G as createIntlWordBoundary,xd as createLayoutScheduler,md as createLayoutSession,Zb as createListCounterState,ob as createParagraphLayoutCache,vd as createShapedMeasurer,e as createShapedRun,b as createShapingEnvironment,_c as defaultNoteSeparatorRuleStyle,Ia as defaultTabIntervalFromSettings,Qc as deriveNoteDisplayMarks,Rc as deriveNoteDisplayMarksResolved,_a as displayText,fc as documentOrder,Eb as effectiveBorderSide,Z as effectiveContentControlLock,Ec as emptyTocPlaceholderParagraphIds,Fc as emptyTocSuppressedResultParagraphIds,Nc as enumerateDocumentSections,Oc as enumerateDocumentSectionsBounded,Wa as expandLvlText,id as filterRefsOnPage,uc as findDrawingOverlayFrameInLayout,Xc as findSeparatorNote,a as fixedPoint,Pa as formatDecimal,Qa as formatDecimalZero,Ua as formatLowerLetter,Sa as formatLowerRoman,Va as formatNumFmt,Xa as formatPageNumber,jb as formatRevisionOf,Ta as formatUpperLetter,Ra as formatUpperRoman,gd as fragmentOwnsAtomOffset,V as fragmentsOfParagraph,Pc as geometryOfSection,s as graphemeBoundaryEpoch,w as graphemeCount,y as graphemeOffsetToUtf16,O as guardOperationSnapshot,k as harfBuzzFontValidator,nc as hitTestPage,Fd as hitTestSemantic,pc as hitTestSheet,h as initializeHarfBuzz,r as intlGraphemeBoundary,rd as isCanvasMeasurementAvailable,C as isCumulativeGeometryTrustedFromLineOrigin,mc as isFurniturePoint,B as isGeometryTrustedCaretOffset,i as isHarfBuzzInitialized,q as isIntlSegmenterAvailable,F as isIntlWordSegmenterAvailable,$c as isMarkerOnlySeparatorNote,ub as isValidStyleId,A as isWholeGraphemeHorizontalBoundary,o as itemizeScriptFontSlots,zd as keyedRangeRects,Gc as layoutHeaderFooterStory,Zc as layoutNoteById,ad as layoutNoteSeparator,Yc as layoutNoteStory,od as layoutSemanticDocument,W as lineAtPosition,rc as lineEndOffset,T as linesOf,ec as listMarkerBox,hb as markRevisionRemovesMark,$a as measureDisplayText,ac as mergeListIndent,Jd as moveCaret,Ja as nextTabDestination,Wc as normalNotesOf,Sc as noteDisplayMarkMap,Vc as noteLineIdPrefix,lb as noteMarkKey,cd as noteSeparatorAreaBox,Db as noteStoryBlocks,lc as pageAtY,wd as pagesToMaterialize,pa as paragraphBorderExtentPt,oa as paragraphBorderStrokeWidthPt,ma as paragraphBorders,ra as paragraphBordersFingerprint,ba as paragraphBreaksBefore,la as paragraphContextualSpacing,R as paragraphFragmentsOf,S as paragraphFragmentsOfBlocks,nb as paragraphLayoutKey,ja as paragraphLineSpacing,Ab as paragraphMarkDeleted,fb as paragraphMarkFormatRevisionOf,ib as paragraphMarkRevisionOf,eb as paragraphMarkRevisionsOf,Lc as paragraphSectionNode,xa as paragraphShading,ya as paragraphShadingBox,ia as paragraphSpacing,Ga as paragraphTabStops,Id as paragraphTextFromLayout,Nd as paragraphsInCells,Jc as parsePageNumbering,Kc as parseSectionProperties,Ad as positionPastDeletion,mb as projectedNoteMarkText,ld as provisionalNoteMarks,Gb as readBorderSide,Ib as readCellBorders,_b as readNumPr,Mc as readSectionProperties,Hb as readTableBorders,Tb as readTableStructure,v as resetGraphemeBoundary,Kb as resolveBorderConflict,td as resolveDefaultSurfaceMeasurer,K as resolveDefaultWordBoundary,Xb as resolveNumberingLevel,va as resolveOoxmlShadingFill,zb as resolveParagraphLayoutInputs,Za as resolveRunStyle,cc as resolveStoryListItems,ua as resolveStrictHexFill,Lb as resolveTableCellBorderGrid,Bb as revisionRemovesParagraph,kb as revisionsAreDeletion,db as revisionsVisible,l as roundFontUnitToFixedPoint,ab as runStylesEqual,t as segmentGraphemes,L as segmentWords,yd as selectionRects,D as semanticHorizontalBoundaries,u as setGraphemeBoundary,wa as shadingFillFromElement,z as shapedHorizontalBoundaries,f as shapedRunComparatorInputs,d as shapingEnvironmentFingerprint,c as shapingEnvironmentFingerprintInputs,gb as shownMarkRevision,sc as spanOffsetX,Od as spansInCells,Ld as spansInSelection,Cb as storyBlocks,bd as syntheticSeparatorBox,Ka as tabAdvanceWidth,La as tabStopsFingerprint,Rd as tableContextAt,Sb as tableOriginX,Dc as tocFieldChromeParagraphIds,sd as tryCreateCanvasMeasurer,Y as unionLayoutBoxes,x as utf16OffsetToGrapheme,bc as walkStoryParagraphs,Ha as withDefaultTabInterval,$b as withNumberingStyleLinks,dc as withResolvedListItems,Bd as wordBoundary,M as wordSegmentsToGraphemeRecords}from'./chunk-OPKOTVQQ.js';export{a as setHarfBuzzWasmUrl}from'./chunk-WU7PUTVA.js';export{a as W15_NAMESPACE_URI,i as activeReviewItem,k as anchorLineY,c as commentBodyText,d as commentInitials,f as firstReviewRange,l as reviewAnchorIndex,m as reviewItemGeometry,b as reviewItemKey,g as reviewItemPositionRank,e as reviewItemRanges,h as reviewItemsAt,j as reviewThreadRootOf}from'./chunk-UVIUNAQ6.js';import'./chunk-SMRD66T5.js';export{d as FontResolutionError,c as HARD_MAX_AGGREGATE_FONT_BYTES,a as HARD_MAX_FONT_BYTES,b as HARD_MAX_FONT_SOURCES,Kb as MAX_SDT_NESTING,pf as MAX_TABLE_COLUMNS,j as boundedStructuralFontValidator,Pb as collectFlowBlocks,Ob as contentControlContentChildren,k as createFontResourceSnapshot,e as fontRequestKey,Lb as isContentControl,Mb as isContentControlContent,tg as paragraphOrderOfPart,i as sha256FontBytes}from'./chunk-R75OLPL6.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(){let e=globalThis.process;if(typeof e?.getBuiltinModule=="function")return e.getBuiltinModule("module")}function u(e){let i=n();if(!i)throw new Error("createRequire is unavailable: this build reaches Node's `module` through process.getBuiltinModule, which needs Node 20.16+ or 22.3+.");return i.createRequire(e)}export{u as createRequire};
|
package/dist/output.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkF7Z6PWAZ_cjs=require('./chunk-F7Z6PWAZ.cjs');require('./chunk-DGUHCJPF.cjs'),require('./chunk-IJ4V3LGV.cjs'),require('./chunk-SFMAIFEN.cjs'),require('./chunk-DY3QVCWC.cjs');Object.defineProperty(exports,"DEFAULT_FIELD_SHADING",{enumerable:true,get:function(){return chunkF7Z6PWAZ_cjs.h}});Object.defineProperty(exports,"paintSelectionOverlay",{enumerable:true,get:function(){return chunkF7Z6PWAZ_cjs.j}});Object.defineProperty(exports,"paintSemanticLayout",{enumerable:true,get:function(){return chunkF7Z6PWAZ_cjs.i}});
|
package/dist/output.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import './
|
|
4
|
-
import './
|
|
1
|
+
import { R as ReviewAuthorInfo } from './semantic-paint-IjbL-4CT.cjs';
|
|
2
|
+
export { D as DEFAULT_FIELD_SHADING, F as FieldShadingMode, P as PaintOptions, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles, p as paintSemanticLayout } from './semantic-paint-IjbL-4CT.cjs';
|
|
3
|
+
import { S as SemanticLayout } from './semantic-records-DEOs3_tE.cjs';
|
|
4
|
+
import './image-resources-BaHz4QAd.cjs';
|
|
5
|
+
import './tree-op-types-CUCwPWjT.cjs';
|
|
5
6
|
import './ooxml-tree-BU0e3DVi.cjs';
|
|
6
7
|
import './ooxml-package-CR5us6ad.cjs';
|
|
7
|
-
import './revision-projection-
|
|
8
|
+
import './revision-projection-WzlQGBJx.cjs';
|
|
8
9
|
|
|
9
10
|
/** A rectangle in page-content coordinates, on a named page. */
|
|
10
11
|
interface OverlayRect {
|
|
@@ -21,6 +22,19 @@ interface OverlayRect {
|
|
|
21
22
|
* sheets over the pages just to vary a colour.
|
|
22
23
|
*/
|
|
23
24
|
readonly className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* WHOSE band this is, as CSS hooks on the rectangle: `data-review-author`, `data-review-author-slot`, and
|
|
27
|
+
* `--doc-review-author-current` set to the colour that author resolves to.
|
|
28
|
+
*
|
|
29
|
+
* The same three the review card carries, and deliberately so — a host restyling one
|
|
30
|
+
* reviewer writes one selector that reaches both the card and the text it annotates. The
|
|
31
|
+
* band's DEFAULT colour does not change with the author (Word keeps every comment yellow);
|
|
32
|
+
* this only makes the author reachable from CSS.
|
|
33
|
+
*
|
|
34
|
+
* The SAME resolved author `getReviewAuthors` hands back, rather than a shape of this
|
|
35
|
+
* layer's own: one person is one object everywhere the review surface describes them.
|
|
36
|
+
*/
|
|
37
|
+
readonly reviewAuthor?: ReviewAuthorInfo;
|
|
24
38
|
}
|
|
25
39
|
/**
|
|
26
40
|
* How the selection overlay draws its rectangles over the painted pages.
|
|
@@ -58,4 +72,4 @@ interface SelectionOverlayOptions {
|
|
|
58
72
|
*/
|
|
59
73
|
declare function paintSelectionOverlay(layer: HTMLElement, layout: SemanticLayout, rects: readonly OverlayRect[], options: SelectionOverlayOptions): void;
|
|
60
74
|
|
|
61
|
-
export { type OverlayRect, type SelectionOverlayOptions, paintSelectionOverlay };
|
|
75
|
+
export { type OverlayRect, ReviewAuthorInfo, type SelectionOverlayOptions, paintSelectionOverlay };
|
package/dist/output.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import './
|
|
4
|
-
import './
|
|
1
|
+
import { R as ReviewAuthorInfo } from './semantic-paint-BBPL3u5w.js';
|
|
2
|
+
export { D as DEFAULT_FIELD_SHADING, F as FieldShadingMode, P as PaintOptions, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles, p as paintSemanticLayout } from './semantic-paint-BBPL3u5w.js';
|
|
3
|
+
import { S as SemanticLayout } from './semantic-records-CdQvpUj1.js';
|
|
4
|
+
import './image-resources-Cl5_cNi9.js';
|
|
5
|
+
import './tree-op-types-D0fTNBVW.js';
|
|
5
6
|
import './ooxml-tree-BU0e3DVi.js';
|
|
6
7
|
import './ooxml-package-D_CtywTW.js';
|
|
7
|
-
import './revision-projection-
|
|
8
|
+
import './revision-projection-UKqvPa4-.js';
|
|
8
9
|
|
|
9
10
|
/** A rectangle in page-content coordinates, on a named page. */
|
|
10
11
|
interface OverlayRect {
|
|
@@ -21,6 +22,19 @@ interface OverlayRect {
|
|
|
21
22
|
* sheets over the pages just to vary a colour.
|
|
22
23
|
*/
|
|
23
24
|
readonly className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* WHOSE band this is, as CSS hooks on the rectangle: `data-review-author`, `data-review-author-slot`, and
|
|
27
|
+
* `--doc-review-author-current` set to the colour that author resolves to.
|
|
28
|
+
*
|
|
29
|
+
* The same three the review card carries, and deliberately so — a host restyling one
|
|
30
|
+
* reviewer writes one selector that reaches both the card and the text it annotates. The
|
|
31
|
+
* band's DEFAULT colour does not change with the author (Word keeps every comment yellow);
|
|
32
|
+
* this only makes the author reachable from CSS.
|
|
33
|
+
*
|
|
34
|
+
* The SAME resolved author `getReviewAuthors` hands back, rather than a shape of this
|
|
35
|
+
* layer's own: one person is one object everywhere the review surface describes them.
|
|
36
|
+
*/
|
|
37
|
+
readonly reviewAuthor?: ReviewAuthorInfo;
|
|
24
38
|
}
|
|
25
39
|
/**
|
|
26
40
|
* How the selection overlay draws its rectangles over the painted pages.
|
|
@@ -58,4 +72,4 @@ interface SelectionOverlayOptions {
|
|
|
58
72
|
*/
|
|
59
73
|
declare function paintSelectionOverlay(layer: HTMLElement, layout: SemanticLayout, rects: readonly OverlayRect[], options: SelectionOverlayOptions): void;
|
|
60
74
|
|
|
61
|
-
export { type OverlayRect, type SelectionOverlayOptions, paintSelectionOverlay };
|
|
75
|
+
export { type OverlayRect, ReviewAuthorInfo, type SelectionOverlayOptions, paintSelectionOverlay };
|
package/dist/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{h as DEFAULT_FIELD_SHADING,j as paintSelectionOverlay,i as paintSemanticLayout}from'./chunk-WAVN7MAT.js';import'./chunk-OPKOTVQQ.js';import'./chunk-WU7PUTVA.js';import'./chunk-UVIUNAQ6.js';import'./chunk-SMRD66T5.js';import'./chunk-R75OLPL6.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { e as OoxmlPart, O as OoxmlNode, a as OoxmlElement } from './ooxml-tree-BU0e3DVi.cjs';
|
|
2
2
|
import { O as OoxmlPackage } from './ooxml-package-CR5us6ad.cjs';
|
|
3
|
-
import { R as RevisionAddress } from './tree-op-types-
|
|
3
|
+
import { R as RevisionAddress } from './tree-op-types-CUCwPWjT.cjs';
|
|
4
4
|
|
|
5
5
|
/** `w:pos` — where a section's footnotes are laid out. */
|
|
6
6
|
type FootnotePosition = 'pageBottom' | 'beneathText' | 'sectEnd' | 'docEnd';
|
|
@@ -196,12 +196,34 @@ interface ReviewRevisionItem {
|
|
|
196
196
|
/** The words a replacement removes. Empty for every other kind. */
|
|
197
197
|
readonly replacedText: string;
|
|
198
198
|
readonly revisionKind: ReviewRevisionKind;
|
|
199
|
+
/**
|
|
200
|
+
* WHICH decision a `paragraphMark` records, absent for every other kind.
|
|
201
|
+
*
|
|
202
|
+
* `EG_ParaRPrTrackChanges` is `ins? del? moveFrom? moveTo?`, and the four say opposite
|
|
203
|
+
* things about the same break: one proposes it, another proposes taking it away. Collapsing
|
|
204
|
+
* them into the single kind lost that, and a card then described a deleted break as an
|
|
205
|
+
* inserted one — the reverse of what Accept on that card does.
|
|
206
|
+
*/
|
|
207
|
+
readonly markDirection?: 'insert' | 'delete' | 'moveFrom' | 'moveTo';
|
|
199
208
|
readonly author: string;
|
|
200
209
|
readonly date?: string;
|
|
201
210
|
/** Text the revision covers, for the card summary. Empty for changes with no characters. */
|
|
202
211
|
readonly text: string;
|
|
203
212
|
/** Every site this decision touches, in document order. */
|
|
204
213
|
readonly ranges: readonly ReviewRange[];
|
|
214
|
+
/**
|
|
215
|
+
* How deeply this change is NESTED inside other changes, 0 for an unenclosed one.
|
|
216
|
+
*
|
|
217
|
+
* Revisions nest for real, and OOXML has no other way to say what happened: `w:ins` wrapping
|
|
218
|
+
* `w:del` is content one reviewer added and another struck. Both stay pending, because each
|
|
219
|
+
* author has to be answered separately, so both are cards — over one identical range.
|
|
220
|
+
*
|
|
221
|
+
* A range therefore cannot say which change a position is "in", and this is what settles it.
|
|
222
|
+
* Word treats the innermost change as the operative one: the words are struck on the page
|
|
223
|
+
* because of the deletion, and accepting the change under them performs that deletion. So the
|
|
224
|
+
* deepest card wins the caret, and the one enclosing it stays listed and reachable.
|
|
225
|
+
*/
|
|
226
|
+
readonly nesting: number;
|
|
205
227
|
/**
|
|
206
228
|
* How many leading `ranges` are the STRUCK half of a replacement.
|
|
207
229
|
*
|
|
@@ -347,6 +369,8 @@ interface LinkableReviewItem {
|
|
|
347
369
|
readonly parentRevisionId?: string;
|
|
348
370
|
readonly replyIds?: readonly string[];
|
|
349
371
|
readonly orphaned?: boolean;
|
|
372
|
+
/** How deeply a revision is nested; absent on the kinds that cannot nest. */
|
|
373
|
+
readonly nesting?: number;
|
|
350
374
|
}
|
|
351
375
|
/**
|
|
352
376
|
* Attach each comment that answers a tracked change to the change it answers.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { e as OoxmlPart, O as OoxmlNode, a as OoxmlElement } from './ooxml-tree-BU0e3DVi.js';
|
|
2
2
|
import { O as OoxmlPackage } from './ooxml-package-D_CtywTW.js';
|
|
3
|
-
import { R as RevisionAddress } from './tree-op-types-
|
|
3
|
+
import { R as RevisionAddress } from './tree-op-types-D0fTNBVW.js';
|
|
4
4
|
|
|
5
5
|
/** `w:pos` — where a section's footnotes are laid out. */
|
|
6
6
|
type FootnotePosition = 'pageBottom' | 'beneathText' | 'sectEnd' | 'docEnd';
|
|
@@ -196,12 +196,34 @@ interface ReviewRevisionItem {
|
|
|
196
196
|
/** The words a replacement removes. Empty for every other kind. */
|
|
197
197
|
readonly replacedText: string;
|
|
198
198
|
readonly revisionKind: ReviewRevisionKind;
|
|
199
|
+
/**
|
|
200
|
+
* WHICH decision a `paragraphMark` records, absent for every other kind.
|
|
201
|
+
*
|
|
202
|
+
* `EG_ParaRPrTrackChanges` is `ins? del? moveFrom? moveTo?`, and the four say opposite
|
|
203
|
+
* things about the same break: one proposes it, another proposes taking it away. Collapsing
|
|
204
|
+
* them into the single kind lost that, and a card then described a deleted break as an
|
|
205
|
+
* inserted one — the reverse of what Accept on that card does.
|
|
206
|
+
*/
|
|
207
|
+
readonly markDirection?: 'insert' | 'delete' | 'moveFrom' | 'moveTo';
|
|
199
208
|
readonly author: string;
|
|
200
209
|
readonly date?: string;
|
|
201
210
|
/** Text the revision covers, for the card summary. Empty for changes with no characters. */
|
|
202
211
|
readonly text: string;
|
|
203
212
|
/** Every site this decision touches, in document order. */
|
|
204
213
|
readonly ranges: readonly ReviewRange[];
|
|
214
|
+
/**
|
|
215
|
+
* How deeply this change is NESTED inside other changes, 0 for an unenclosed one.
|
|
216
|
+
*
|
|
217
|
+
* Revisions nest for real, and OOXML has no other way to say what happened: `w:ins` wrapping
|
|
218
|
+
* `w:del` is content one reviewer added and another struck. Both stay pending, because each
|
|
219
|
+
* author has to be answered separately, so both are cards — over one identical range.
|
|
220
|
+
*
|
|
221
|
+
* A range therefore cannot say which change a position is "in", and this is what settles it.
|
|
222
|
+
* Word treats the innermost change as the operative one: the words are struck on the page
|
|
223
|
+
* because of the deletion, and accepting the change under them performs that deletion. So the
|
|
224
|
+
* deepest card wins the caret, and the one enclosing it stays listed and reachable.
|
|
225
|
+
*/
|
|
226
|
+
readonly nesting: number;
|
|
205
227
|
/**
|
|
206
228
|
* How many leading `ranges` are the STRUCK half of a replacement.
|
|
207
229
|
*
|
|
@@ -347,6 +369,8 @@ interface LinkableReviewItem {
|
|
|
347
369
|
readonly parentRevisionId?: string;
|
|
348
370
|
readonly replyIds?: readonly string[];
|
|
349
371
|
readonly orphaned?: boolean;
|
|
372
|
+
/** How deeply a revision is nested; absent on the kinds that cannot nest. */
|
|
373
|
+
readonly nesting?: number;
|
|
350
374
|
}
|
|
351
375
|
/**
|
|
352
376
|
* Attach each comment that answers a tracked change to the change it answers.
|