@docx-editor.dev/core 2.33.0 → 2.34.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.d.ts +11 -11
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +13 -13
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-CrPI9ZQc.d.ts → chrome-print-DY0xsXm_.d.ts} +163 -112
- package/dist/{chunk-X34QRAUU.cjs → chunk-37IYWENL.cjs} +1 -1
- package/dist/chunk-37RNWL45.js +4 -0
- package/dist/chunk-5HUVQXET.cjs +4 -0
- package/dist/chunk-5JP3QQF7.js +7 -0
- package/dist/chunk-5KOLFKOB.cjs +5 -0
- package/dist/chunk-6MF5PN2E.js +236 -0
- package/dist/chunk-77JT2AU7.js +2 -0
- package/dist/{chunk-2F2UEAE2.js → chunk-7FUORGCW.js} +1 -1
- package/dist/chunk-A5BTVPET.cjs +236 -0
- package/dist/chunk-AFXFH2T2.js +3 -0
- package/dist/chunk-AVCYP7OY.js +5 -0
- package/dist/chunk-BL2E4QRA.js +1 -0
- package/dist/chunk-DB7X4Y6O.js +4 -0
- package/dist/chunk-DR6W23TB.cjs +2 -0
- package/dist/{chunk-2DR4TH6B.js → chunk-DYLB5U42.js} +1 -1
- package/dist/chunk-E5BKDHIP.cjs +1 -0
- package/dist/chunk-IWXBRUPG.cjs +4 -0
- package/dist/{chunk-L3YXJDPX.js → chunk-KCUXXO3Q.js} +1 -1
- package/dist/chunk-KYA4Y2YB.js +1 -0
- package/dist/{chunk-PXMTQ73F.cjs → chunk-L74TCGVH.cjs} +1 -1
- package/dist/chunk-NBSSQSKY.js +30 -0
- package/dist/{chunk-RFUNFTGV.cjs → chunk-NEM774E3.cjs} +1 -1
- package/dist/chunk-NKZVMMHU.cjs +1 -0
- package/dist/chunk-TXIO5WYQ.cjs +32 -0
- package/dist/chunk-UKG2TXWH.cjs +7 -0
- package/dist/chunk-V7CO55DO.cjs +3 -0
- package/dist/chunk-VLQDQNSS.js +1 -0
- package/dist/chunk-VQOAC3VI.cjs +30 -0
- package/dist/chunk-YWJSQA2O.js +32 -0
- package/dist/chunk-ZJ74LCFI.cjs +1 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +3 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +2 -2
- package/dist/contracts/document.d.ts +2 -2
- package/dist/contracts/editor.d.ts +9 -9
- package/dist/contracts/modules.d.ts +11 -11
- package/dist/contracts/types.d.ts +3 -3
- package/dist/{custom-node-writes-AqY5KpVx.d.ts → custom-node-writes-DparEcZK.d.ts} +45 -7
- package/dist/{diagnostic-context-CuzhOX0g.d.ts → diagnostic-context-CkZKkKvB.d.ts} +1 -1
- package/dist/{diagnostic-hints-BtCaCqQC.d.ts → diagnostic-hints-BTyb8yzX.d.ts} +1 -1
- package/dist/{document-protection-BvbpSXbQ.d.ts → document-protection-DdWxihIN.d.ts} +1 -1
- package/dist/{drawing-graphic-kind-CXYGYbB3.d.ts → drawing-graphic-kind-CK0cMc7H.d.ts} +91 -18
- package/dist/{drawing-preview-package-B9lSLRg4.d.ts → drawing-preview-package-fFjXpOMS.d.ts} +1 -1
- package/dist/{editor-B7OOAAie.d.ts → editor-DDCkWqfD.d.ts} +47 -15
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +2 -2
- package/dist/editor.d.ts +200 -75
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +8 -8
- package/dist/export.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +20 -20
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-Ci_BTnSU.d.ts → layout-shaping-Byj-TwsI.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +289 -129
- package/dist/layout.js +1 -1
- package/dist/{metafile-drawing-DtMFyMKq.d.ts → metafile-drawing-Ce6TuWLm.d.ts} +9 -1
- package/dist/{note-properties-DCIJUKIy.d.ts → note-properties-BiunaIQa.d.ts} +31 -7
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +76 -12
- package/dist/output.js +1 -1
- package/dist/{protocol-Cp_QzVxS.d.ts → protocol-Dn44dL4M.d.ts} +184 -120
- package/dist/{review-paragraph-order-BJQ43_r0.d.ts → review-paragraph-order-BWMXAKuA.d.ts} +1 -1
- package/dist/{revision-projection-OVusTS77.d.ts → revision-projection-DwFhgIR0.d.ts} +1 -1
- package/dist/{semantic-cell-selection-CoI5hHBm.d.ts → semantic-cell-selection-DhalxEBH.d.ts} +2 -2
- package/dist/{semantic-interaction-BbA4dgEo.d.ts → semantic-interaction-QeuzEtAk.d.ts} +2 -4
- package/dist/{semantic-paint-B5JcIv9c.d.ts → semantic-paint-BYDZbTiY.d.ts} +4 -4
- package/dist/{semantic-record-queries-DnO8J5_j.d.ts → semantic-record-queries-Bf5bgQL3.d.ts} +1 -1
- package/dist/{semantic-records-DoK0lNjS.d.ts → semantic-records-CzZiWMY8.d.ts} +99 -94
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +31 -16
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-Df4oY2u4.d.ts → tree-op-types-DKvJSH8T.d.ts} +204 -147
- package/dist/{tree-package-store-DXhX1PE-.d.ts → tree-package-store-Cl3BkWXF.d.ts} +1 -1
- package/dist/{tree-session-contract-CF2625mv.d.ts → tree-session-contract-BL50pqs8.d.ts} +14 -7
- package/dist/{unsupported-elements-CUojsaCr.d.ts → unsupported-elements-Bra4QTOM.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-23MKR33J.js +0 -4
- package/dist/chunk-2DEY5NUC.cjs +0 -32
- package/dist/chunk-2GPGAFOJ.cjs +0 -5
- package/dist/chunk-ALD626VU.cjs +0 -2
- package/dist/chunk-AU33YWEJ.js +0 -236
- package/dist/chunk-AXU63LYW.cjs +0 -1
- package/dist/chunk-CM5VZRBV.js +0 -32
- package/dist/chunk-D7FAFFTN.js +0 -1
- package/dist/chunk-DYUVJNDD.cjs +0 -1
- package/dist/chunk-ESYUKD5D.js +0 -2
- package/dist/chunk-F7TGQMVR.js +0 -5
- package/dist/chunk-FLW7KIQX.js +0 -30
- package/dist/chunk-JG4A6W6I.js +0 -7
- package/dist/chunk-JNGLSBPH.js +0 -2
- package/dist/chunk-KE6ZWRIY.cjs +0 -236
- package/dist/chunk-LI42N7OW.cjs +0 -4
- package/dist/chunk-PLKDS4JT.js +0 -1
- package/dist/chunk-R4R3AAE4.js +0 -1
- package/dist/chunk-SVM6PGMS.js +0 -3
- package/dist/chunk-SZURLHR3.cjs +0 -3
- package/dist/chunk-UYCGCVZ2.cjs +0 -1
- package/dist/chunk-XNBYG4XJ.cjs +0 -30
- package/dist/chunk-ZDFJW5XS.cjs +0 -2
- package/dist/chunk-ZWO4JHNN.cjs +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as ResolvedRevisionMarkup } from './revision-projection-
|
|
2
|
-
import { ap as ValidatedImageBytesHandle, al as RenderableImageMime, av as OoxmlElement } from './tree-op-types-
|
|
3
|
-
import { a as PageRecord, C as ContentControlBoundaryRecord, S as SemanticLayout } from './semantic-records-
|
|
4
|
-
import { S as SemanticRootStoryKind } from './semantic-record-queries-
|
|
1
|
+
import { d as ResolvedRevisionMarkup } from './revision-projection-DwFhgIR0.js';
|
|
2
|
+
import { ap as ValidatedImageBytesHandle, al as RenderableImageMime, av as OoxmlElement } from './tree-op-types-DKvJSH8T.js';
|
|
3
|
+
import { a as PageRecord, C as ContentControlBoundaryRecord, S as SemanticLayout } from './semantic-records-CzZiWMY8.js';
|
|
4
|
+
import { S as SemanticRootStoryKind } from './semantic-record-queries-Bf5bgQL3.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Everything a host can say about ONE author's presentation. Every field is optional and
|
package/dist/{semantic-record-queries-DnO8J5_j.d.ts → semantic-record-queries-Bf5bgQL3.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InlineDrawingRecord, A as AnchoredDrawingRecord, P as ParagraphFragmentRecord, L as LineRecord, a as PageRecord, N as NoteAreaRecord, b as LayoutBox, H as HeaderFooterStoryRecord, c as NoteStoryRecord, B as BlockFragmentRecord, S as SemanticLayout, C as ContentControlBoundaryRecord, d as ContentControlLock } from './semantic-records-
|
|
1
|
+
import { I as InlineDrawingRecord, A as AnchoredDrawingRecord, P as ParagraphFragmentRecord, L as LineRecord, a as PageRecord, N as NoteAreaRecord, b as LayoutBox, H as HeaderFooterStoryRecord, c as NoteStoryRecord, B as BlockFragmentRecord, S as SemanticLayout, C as ContentControlBoundaryRecord, d as ContentControlLock } from './semantic-records-CzZiWMY8.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Depth-first paragraph fragments of one page, in reading order.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a4 as OoxmlNode, aC as OoxmlProperty, O as OoxmlPart, av as OoxmlElement,
|
|
2
|
-
import { b as RevisionDisplayMode, p as RevisionAuthorFilter, q as RevisionAttribution } from './revision-projection-
|
|
3
|
-
import { O as OmmlEquationProjection, a as DrawingSupport, b as DrawingSupportIssue, D as DrawingGraphicKind, H as HeadlessDocumentView } from './drawing-graphic-kind-
|
|
1
|
+
import { a4 as OoxmlNode, aC as OoxmlProperty, O as OoxmlPart, av as OoxmlElement, aU as TableBorderStyle, aV as TextboxOutlineProjection, af as ImageResourceState, aT as SourceCrop, aW as VectorShapeComponent, aX as DrawingAccessibility, aY as DrawingImageEffects, aZ as DrawingTransform, a_ as DrawingChartSummary, a$ as VectorShapeProjection, b0 as PictureFrameEffects, a7 as DrawingHorizontalReferenceFrame, ab as DrawingVerticalReferenceFrame, ag as ImageWrapTarget, b1 as DrawingProjection, b2 as OoxmlDrawingNode } from './tree-op-types-DKvJSH8T.js';
|
|
2
|
+
import { b as RevisionDisplayMode, p as RevisionAuthorFilter, q as RevisionAttribution } from './revision-projection-DwFhgIR0.js';
|
|
3
|
+
import { O as OmmlEquationProjection, a as DrawingSupport, b as DrawingSupportIssue, D as DrawingGraphicKind, H as HeadlessDocumentView } from './drawing-graphic-kind-CK0cMc7H.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Whether a paragraph must start a new page (`w:pageBreakBefore`).
|
|
@@ -73,8 +73,10 @@ interface ParagraphAutoSpacingContext {
|
|
|
73
73
|
/** Section grid pitch in points; no grid uses Word's fixed 12pt line unit. */
|
|
74
74
|
readonly lineUnitPt?: number;
|
|
75
75
|
/**
|
|
76
|
-
* `w:doNotUseHTMLParagraphAutoSpacing` is on
|
|
77
|
-
*
|
|
76
|
+
* `w:doNotUseHTMLParagraphAutoSpacing` is on (§17.15.3, "Use Fixed Paragraph Spacing for
|
|
77
|
+
* HTML Auto Setting"): `w:beforeAutospacing` / `w:afterAutospacing` have no effect, and each
|
|
78
|
+
* side keeps its authored measurement, in a list, a table cell or at a story edge alike.
|
|
79
|
+
* Captured references put 5pt on each side for `w:before="100"` and 15pt for `"300"`.
|
|
78
80
|
*/
|
|
79
81
|
readonly fixedAutoSpacing?: boolean;
|
|
80
82
|
}
|
|
@@ -174,7 +176,8 @@ interface ParagraphBorders {
|
|
|
174
176
|
* height, not the gap between paragraphs — and is not resolved here.
|
|
175
177
|
*
|
|
176
178
|
* `w:beforeAutospacing` / `w:afterAutospacing` REPLACE the authored measurement on their own
|
|
177
|
-
* side rather than adding to it; see {@link AUTO_PARAGRAPH_SPACING_PT}.
|
|
179
|
+
* side rather than adding to it; see {@link AUTO_PARAGRAPH_SPACING_PT}. With
|
|
180
|
+
* {@link ParagraphAutoSpacingContext.fixedAutoSpacing} they are ignored instead.
|
|
178
181
|
*/
|
|
179
182
|
declare function paragraphSpacing(props: readonly OoxmlProperty[], context?: ParagraphAutoSpacingContext): ParagraphSpacing;
|
|
180
183
|
/**
|
|
@@ -319,7 +322,7 @@ interface SectionPageBorders {
|
|
|
319
322
|
readonly right?: ParagraphBorderEdge;
|
|
320
323
|
}
|
|
321
324
|
/**
|
|
322
|
-
* Parse `w:pgBorders` off one `w:sectPr
|
|
325
|
+
* Parse `w:pgBorders` off one `w:sectPr`, or off its `w:sectPrChange` when it has none.
|
|
323
326
|
*
|
|
324
327
|
* Undefined when the element is absent AND when it paints nothing — every edge off, or every
|
|
325
328
|
* edge an art border. Unlike `w:pgNumType`, an empty-but-present element is not distinguished:
|
|
@@ -1262,6 +1265,12 @@ interface ResolvedRunStyle {
|
|
|
1262
1265
|
* slot-homogeneous pieces happens downstream (`piecesOfParagraph`).
|
|
1263
1266
|
*/
|
|
1264
1267
|
readonly fontFamilyEastAsia: string | null;
|
|
1268
|
+
/**
|
|
1269
|
+
* True when a `w:rFonts` in the cascade (run, style, or authored `w:rPrDefault`) names the
|
|
1270
|
+
* East Asian face, not only a format, application, or theme default.
|
|
1271
|
+
* @internal
|
|
1272
|
+
*/
|
|
1273
|
+
readonly eastAsianFontAuthored?: true;
|
|
1265
1274
|
/**
|
|
1266
1275
|
* Present only on a `w:rtl` or `w:cs` run: the LATIN lane that the complex-script values
|
|
1267
1276
|
* replaced in `fontFamily`, `fontSizePt`, `bold` and `italic`. Nothing draws with it; it
|
|
@@ -1293,7 +1302,11 @@ interface ResolvedRunStyle {
|
|
|
1293
1302
|
readonly baseLevel: number;
|
|
1294
1303
|
/** Resolved w:rtl context; absent when authored Unicode controls govern the paragraph. */
|
|
1295
1304
|
readonly runDirection?: 'ltr' | 'rtl';
|
|
1305
|
+
/** A `w:bdo` override: every character reads in this direction, whatever its class. */
|
|
1306
|
+
readonly override?: 'ltr' | 'rtl';
|
|
1296
1307
|
readonly wordSpacingPt?: number;
|
|
1308
|
+
/** The run-direction group comes from a `w:dir` or `w:bdo` wrapper, not the run. */
|
|
1309
|
+
readonly wrapperGroup?: true;
|
|
1297
1310
|
/** Neighbouring text a joining script reads across a formatting-run boundary. */
|
|
1298
1311
|
readonly context?: ShapingContext;
|
|
1299
1312
|
};
|
|
@@ -1420,9 +1433,6 @@ declare function baselineShiftPtOf(style: ResolvedRunStyle): number;
|
|
|
1420
1433
|
*/
|
|
1421
1434
|
declare function glyphSizeFactorOf(style: ResolvedRunStyle): number;
|
|
1422
1435
|
|
|
1423
|
-
/** Horizontal alignment of a paragraph (`w:jc`, ECMA-376 §17.3.1.13). */
|
|
1424
|
-
type Alignment = 'left' | 'center' | 'right' | 'both';
|
|
1425
|
-
|
|
1426
1436
|
/** The number formats a page field's `\*` switch can select (ST_NumberFormat names). */
|
|
1427
1437
|
type PageFieldNumberFormat = 'decimal' | 'lowerRoman' | 'upperRoman' | 'lowerLetter' | 'upperLetter' | 'numberInDash';
|
|
1428
1438
|
|
|
@@ -1590,6 +1600,22 @@ interface EquationBarGeometry extends EquationGeometryBase {
|
|
|
1590
1600
|
readonly body: EquationGeometry;
|
|
1591
1601
|
readonly bar: LayoutBox;
|
|
1592
1602
|
}
|
|
1603
|
+
/** A straight stroke between two points, relative to its node's box. */
|
|
1604
|
+
interface EquationDiagonal {
|
|
1605
|
+
readonly x1: number;
|
|
1606
|
+
readonly y1: number;
|
|
1607
|
+
readonly x2: number;
|
|
1608
|
+
readonly y2: number;
|
|
1609
|
+
}
|
|
1610
|
+
interface EquationBorderBoxGeometry extends EquationGeometryBase {
|
|
1611
|
+
readonly kind: 'borderBox';
|
|
1612
|
+
readonly body: EquationGeometry;
|
|
1613
|
+
/** Edges and horizontal or vertical strikes, as filled rectangles. */
|
|
1614
|
+
readonly rules: readonly LayoutBox[];
|
|
1615
|
+
/** Diagonal strikes, stroked at {@link thickness}. */
|
|
1616
|
+
readonly diagonals: readonly EquationDiagonal[];
|
|
1617
|
+
readonly thickness: number;
|
|
1618
|
+
}
|
|
1593
1619
|
interface EquationScriptGeometry extends EquationGeometryBase {
|
|
1594
1620
|
readonly kind: 'script';
|
|
1595
1621
|
readonly base: EquationGeometry;
|
|
@@ -1603,7 +1629,7 @@ interface EquationNaryGeometry extends EquationGeometryBase {
|
|
|
1603
1629
|
readonly lowerLimit?: EquationGeometry;
|
|
1604
1630
|
readonly upperLimit?: EquationGeometry;
|
|
1605
1631
|
}
|
|
1606
|
-
type EquationGeometry = EquationTextGeometry | EquationRowGeometry | EquationFractionGeometry | EquationRadicalGeometry | EquationBarGeometry | EquationScriptGeometry | EquationNaryGeometry;
|
|
1632
|
+
type EquationGeometry = EquationTextGeometry | EquationRowGeometry | EquationFractionGeometry | EquationRadicalGeometry | EquationBarGeometry | EquationBorderBoxGeometry | EquationScriptGeometry | EquationNaryGeometry;
|
|
1607
1633
|
/** Equation metadata carried by one atomic semantic span. */
|
|
1608
1634
|
interface EquationSpanRecord {
|
|
1609
1635
|
readonly sourceNodeId: string;
|
|
@@ -1729,22 +1755,6 @@ declare function createUnsupportedContentProjector(resolve: UnsupportedContentRe
|
|
|
1729
1755
|
view(view: HeadlessDocumentView): HeadlessDocumentView;
|
|
1730
1756
|
};
|
|
1731
1757
|
|
|
1732
|
-
/**
|
|
1733
|
-
* UAX #9 embedding levels, one per UTF-16 code unit, plus the paragraph ranges they were resolved
|
|
1734
|
-
* within.
|
|
1735
|
-
*
|
|
1736
|
-
* The level is EXACT, not a direction: its parity gives direction, but the numeric value is what
|
|
1737
|
-
* reordering needs, and collapsing it early loses nested isolates.
|
|
1738
|
-
*/
|
|
1739
|
-
interface BidiEmbeddingLevels {
|
|
1740
|
-
readonly levels: Uint8Array;
|
|
1741
|
-
readonly paragraphs: readonly {
|
|
1742
|
-
readonly start: number;
|
|
1743
|
-
readonly end: number;
|
|
1744
|
-
readonly level: number;
|
|
1745
|
-
}[];
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
1758
|
/**
|
|
1749
1759
|
* Which `w:rFonts` slot a character resolves its face through.
|
|
1750
1760
|
*
|
|
@@ -1752,50 +1762,6 @@ interface BidiEmbeddingLevels {
|
|
|
1752
1762
|
* and CJK text uses two different fonts without saying so anywhere in its properties.
|
|
1753
1763
|
*/
|
|
1754
1764
|
type FontSlot = 'ascii' | 'hAnsi' | 'eastAsia' | 'cs';
|
|
1755
|
-
/**
|
|
1756
|
-
* A run of text sharing one script, direction and font slot — the unit handed to the shaper.
|
|
1757
|
-
*
|
|
1758
|
-
* Shaping cannot span a script change: Arabic and Latin in one call would produce wrong joining
|
|
1759
|
-
* behaviour, so a run is itemized into these first.
|
|
1760
|
-
*/
|
|
1761
|
-
interface ScriptItem {
|
|
1762
|
-
readonly from: number;
|
|
1763
|
-
readonly to: number;
|
|
1764
|
-
readonly direction: TextDirection;
|
|
1765
|
-
readonly bidiLevel: number;
|
|
1766
|
-
readonly script: 'Zyyy' | 'Latn' | 'Grek' | 'Cyrl' | 'Hani' | 'Hebr' | 'Arab' | 'Deva' | 'Beng' | 'Thai' | 'Khmr';
|
|
1767
|
-
readonly slot: FontSlot;
|
|
1768
|
-
}
|
|
1769
|
-
/**
|
|
1770
|
-
* A code point whose script this engine does not itemize.
|
|
1771
|
-
*
|
|
1772
|
-
* Carries the offending `codePoint` so the caller can report which character stopped it, rather
|
|
1773
|
-
* than failing anonymously somewhere in the middle of a paragraph.
|
|
1774
|
-
*/
|
|
1775
|
-
declare class UnsupportedScriptError extends Error {
|
|
1776
|
-
readonly name = "UnsupportedScriptError";
|
|
1777
|
-
readonly code = "unsupportedScript";
|
|
1778
|
-
readonly codePoint: number;
|
|
1779
|
-
constructor(codePoint: number);
|
|
1780
|
-
}
|
|
1781
|
-
/**
|
|
1782
|
-
* Split text into shapeable runs by script, bidi level and font slot.
|
|
1783
|
-
*
|
|
1784
|
-
* Consumes the bidi levels rather than re-deriving direction, so itemization and reordering agree
|
|
1785
|
-
* by construction instead of by two implementations happening to match.
|
|
1786
|
-
*/
|
|
1787
|
-
declare function itemizeScriptFontSlots(text: string, paragraphOffset: number, embedding: BidiEmbeddingLevels): readonly ScriptItem[];
|
|
1788
|
-
/**
|
|
1789
|
-
* The style a piece's text is MEASURED AND PAINTED in, given the font slot it carries.
|
|
1790
|
-
*
|
|
1791
|
-
* This is the measurer-boundary resolution: pieces and spans keep the run's real resolved
|
|
1792
|
-
* style — with `fontFamily` and `fontFamilyEastAsia` both intact, so formatting readback
|
|
1793
|
-
* and the format painter see the run as authored — and every consumer that turns text into
|
|
1794
|
-
* geometry or ink resolves the face through here. The derived object is memoized per
|
|
1795
|
-
* (style, family) by {@link withFontFamily}, so measurers amortizing over style identity
|
|
1796
|
-
* keep their caches.
|
|
1797
|
-
*/
|
|
1798
|
-
declare function styleForFontSlot(style: ResolvedRunStyle, slot: FontSlot | undefined): ResolvedRunStyle;
|
|
1799
1765
|
|
|
1800
1766
|
/**
|
|
1801
1767
|
* One parsed `HYPERLINK` instruction: the raw, unsanitized pieces.
|
|
@@ -1917,6 +1883,31 @@ interface CjkTypographySettings {
|
|
|
1917
1883
|
readonly punctuationKerning?: boolean;
|
|
1918
1884
|
/** The document defaults explicitly select an East Asian face as the East Asian font. */
|
|
1919
1885
|
readonly sourceEastAsianFont?: boolean;
|
|
1886
|
+
/**
|
|
1887
|
+
* False when the document defaults turn off inter-character East Asian justification on
|
|
1888
|
+
* justified lines and automatic spacing between East Asian and other text
|
|
1889
|
+
* ({@link defaultsTypography}). Absent means both apply.
|
|
1890
|
+
* @internal
|
|
1891
|
+
*/
|
|
1892
|
+
readonly eastAsianSpacing?: false;
|
|
1893
|
+
/**
|
|
1894
|
+
* A legacy compatibility mode (`lineEndPunctuationAtEveryAlignment`): line-end punctuation
|
|
1895
|
+
* hangs at every paragraph alignment, and the paragraph kinsoku switch does not stop it.
|
|
1896
|
+
* @internal
|
|
1897
|
+
*/
|
|
1898
|
+
readonly legacyLineEndPunctuation?: true;
|
|
1899
|
+
/**
|
|
1900
|
+
* The compatibility setting `w:balanceSingleByteDoubleByteWidth`: lines in a legacy mode keep
|
|
1901
|
+
* their natural inter-word spaces, also with punctuation compression.
|
|
1902
|
+
* @internal
|
|
1903
|
+
*/
|
|
1904
|
+
readonly balancedWidths?: true;
|
|
1905
|
+
/**
|
|
1906
|
+
* The compatibility setting `w:useWord97LineBreakRules`. With `balancedWidths`, lines in a
|
|
1907
|
+
* legacy mode keep natural inter-word spaces in proportional faces.
|
|
1908
|
+
* @internal
|
|
1909
|
+
*/
|
|
1910
|
+
readonly word97LineBreaks?: true;
|
|
1920
1911
|
/** Whitespace compression selected by `w:characterSpacingControl`. */
|
|
1921
1912
|
readonly compression: 'doNotCompress' | 'compressPunctuation' | 'compressPunctuationAndJapaneseKana';
|
|
1922
1913
|
/** Custom no-line-start characters, keyed by normalized language tag. */
|
|
@@ -1925,6 +1916,9 @@ interface CjkTypographySettings {
|
|
|
1925
1916
|
readonly after: Readonly<Record<string, string>>;
|
|
1926
1917
|
}
|
|
1927
1918
|
|
|
1919
|
+
/** Horizontal alignment of a paragraph (`w:jc`, ECMA-376 §17.3.1.13). */
|
|
1920
|
+
type Alignment = 'left' | 'center' | 'right' | 'both';
|
|
1921
|
+
|
|
1928
1922
|
/** Soft ceiling matching Word's practical custom-tab UI limit. */
|
|
1929
1923
|
declare const MAX_TAB_STOPS = 64;
|
|
1930
1924
|
/**
|
|
@@ -2547,6 +2541,8 @@ interface InlineDrawingRecord {
|
|
|
2547
2541
|
* paragraph needed no bidi resolution.
|
|
2548
2542
|
*/
|
|
2549
2543
|
readonly bidiLevel?: number;
|
|
2544
|
+
/** The run-direction group of a picture in a `w:bdo` override or a wrapper's group; else its level's. */
|
|
2545
|
+
readonly bidiRunDirection?: 'ltr' | 'rtl';
|
|
2550
2546
|
/**
|
|
2551
2547
|
* Laid-out textbox story for a `wps:txbx` drawing; paint renders it clipped inside the
|
|
2552
2548
|
* extent instead of a placeholder. Absent when the drawing carries no story or the host
|
|
@@ -2637,25 +2633,6 @@ interface ResolvedListItem {
|
|
|
2637
2633
|
/** Fingerprint for layout cache keys (indent, marker text, marker face). */
|
|
2638
2634
|
readonly cacheToken: string;
|
|
2639
2635
|
}
|
|
2640
|
-
/**
|
|
2641
|
-
* Read `w:numPr` from cascaded paragraph-property nodes (lowest precedence first).
|
|
2642
|
-
*
|
|
2643
|
-
* Flat `OoxmlProperty[]` bags drop nested `ilvl`/`numId`, so this walks the tree nodes
|
|
2644
|
-
* the same way borders and tabs do.
|
|
2645
|
-
*
|
|
2646
|
-
* `w:ilvl` and `w:numId` inherit INDEPENDENTLY through the style chain and the direct
|
|
2647
|
-
* `w:pPr` (§17.3.1.19): a tier stating only the level keeps the id it inherits — Word's
|
|
2648
|
-
* standard Heading2–Heading9 shape, where only Heading1 names the `w:num` — and a tier
|
|
2649
|
-
* stating only the id keeps the inherited level. Treating each `w:numPr` node as a full
|
|
2650
|
-
* replacement dropped the id at every level-only tier and unnumbered the paragraph. A
|
|
2651
|
-
* stated `w:numId w:val="0"` (or an invalid value) still switches numbering off at that
|
|
2652
|
-
* tier even when a lower tier set one; a higher tier stating a valid id re-enables. A
|
|
2653
|
-
* level-only tier with no id inherited from below resolves to no numbering.
|
|
2654
|
-
*/
|
|
2655
|
-
declare function readNumPr(paragraphPropertyNodes: readonly OoxmlNode[]): {
|
|
2656
|
-
numId: string;
|
|
2657
|
-
ilvl: number;
|
|
2658
|
-
} | null;
|
|
2659
2636
|
/**
|
|
2660
2637
|
* Resolve `w:numStyleLink` delegation using the document's styles (§17.9.21).
|
|
2661
2638
|
*
|
|
@@ -2721,6 +2698,12 @@ interface StyleCascadeTable {
|
|
|
2721
2698
|
readonly doNotBreakWrappedTables?: true;
|
|
2722
2699
|
/** Legacy or explicitly disabled optional OpenType substitutions. */
|
|
2723
2700
|
readonly disableOptionalLigatures?: true;
|
|
2701
|
+
/**
|
|
2702
|
+
* How distributed paragraphs spread their lines when the document selects character
|
|
2703
|
+
* distribution (`DistributedSpacing` in `distributed-spacing.ts`); absent for `'spaces'`.
|
|
2704
|
+
* @internal
|
|
2705
|
+
*/
|
|
2706
|
+
readonly distributedSpacing?: 'characters' | 'legacyCharacters';
|
|
2724
2707
|
/** Legacy noExtraLineSpacing behavior, included in the producer fingerprint. */
|
|
2725
2708
|
readonly preserveExactLineBaseline?: true;
|
|
2726
2709
|
/** `w:adjustLineHeightInTable`: cell paragraphs snap to the section line grid too. */
|
|
@@ -2728,8 +2711,8 @@ interface StyleCascadeTable {
|
|
|
2728
2711
|
/** `w:doNotUseIndentAsNumberingTabStop`, carried onto each paragraph's tab stops. */
|
|
2729
2712
|
readonly ignoreIndentAsNumberingTabStop?: true;
|
|
2730
2713
|
/**
|
|
2731
|
-
* `w:doNotUseHTMLParagraphAutoSpacing`: adjacent paragraph spacing adds up, and automatic
|
|
2732
|
-
* spacing
|
|
2714
|
+
* `w:doNotUseHTMLParagraphAutoSpacing`: adjacent paragraph spacing adds up, and the automatic
|
|
2715
|
+
* spacing flags are ignored, so the authored measurement stays.
|
|
2733
2716
|
*/
|
|
2734
2717
|
readonly fixedParagraphSpacing?: true;
|
|
2735
2718
|
/** `w:doNotExpandShiftReturn`: a justified line before a manual break keeps natural spacing. */
|
|
@@ -3004,7 +2987,16 @@ interface SemanticCommentArtifactRecord {
|
|
|
3004
2987
|
readonly kind: 'comment';
|
|
3005
2988
|
readonly id: string;
|
|
3006
2989
|
readonly author: string;
|
|
2990
|
+
/** Initials to show for the author: the document's, or ones made from the author name. */
|
|
3007
2991
|
readonly initials: string;
|
|
2992
|
+
/** The initials the document itself declares, trimmed; absent when it declares none. */
|
|
2993
|
+
readonly declaredInitials?: string;
|
|
2994
|
+
/**
|
|
2995
|
+
* The place of the comment's reference mark among the reference marks in the main document
|
|
2996
|
+
* body, counting from 0; absent when the body holds no reference mark for it. Comments are
|
|
2997
|
+
* numbered in this order.
|
|
2998
|
+
*/
|
|
2999
|
+
readonly referenceOrder?: number;
|
|
3008
3000
|
readonly date?: string;
|
|
3009
3001
|
readonly text: string;
|
|
3010
3002
|
readonly resolved: boolean;
|
|
@@ -3158,6 +3150,12 @@ interface TextMeasurer {
|
|
|
3158
3150
|
textOutline?(text: string, style: ResolvedRunStyle): TextOutline | undefined;
|
|
3159
3151
|
/** Whether line metrics use an admitted face instead of approximate fallback metrics. */
|
|
3160
3152
|
hasResolvedFont?(style: ResolvedRunStyle): boolean;
|
|
3153
|
+
/**
|
|
3154
|
+
* Optional: whether the resolved face itself has a glyph for every character of `text`, with
|
|
3155
|
+
* no glyph fallback. Undefined when no face resolves or the measurer cannot tell.
|
|
3156
|
+
* @internal
|
|
3157
|
+
*/
|
|
3158
|
+
faceCovers?(text: string, style: ResolvedRunStyle): boolean | undefined;
|
|
3161
3159
|
/**
|
|
3162
3160
|
* Optional `OS/2` strikeout stroke for the resolved face, at the drawn size. Word paints
|
|
3163
3161
|
* `w:separator` as a strikeout, so the note rule reads its thickness and offset here rather
|
|
@@ -3333,6 +3331,13 @@ interface StyleSpanRecord {
|
|
|
3333
3331
|
* typed there would be — which is what Word draws.
|
|
3334
3332
|
*/
|
|
3335
3333
|
readonly tabLeaderAdvancePt?: number;
|
|
3334
|
+
/**
|
|
3335
|
+
* Alignment of the stop a `\t` span advanced to, when it is not `left`. A distributed
|
|
3336
|
+
* line stretches the text after its last tab only when that tab reached a left stop.
|
|
3337
|
+
*
|
|
3338
|
+
* @internal
|
|
3339
|
+
*/
|
|
3340
|
+
readonly tabAlignment?: Exclude<TabAlignment, 'left'>;
|
|
3336
3341
|
/**
|
|
3337
3342
|
* The hyperlink this span belongs to, or absent for ordinary text.
|
|
3338
3343
|
*
|
|
@@ -4068,5 +4073,5 @@ interface SectionBreakMarkRecord {
|
|
|
4068
4073
|
readonly kind: SectionBreakType;
|
|
4069
4074
|
}
|
|
4070
4075
|
|
|
4071
|
-
export {
|
|
4072
|
-
export type {
|
|
4076
|
+
export { HARD_MAX_FONT_BYTES as a$, EMPTY_NUMBERING_INDEX as aD, EMPTY_TAB_STOPS as aE, FontResolutionError as aS, HARD_MAX_AGGREGATE_FONT_BYTES as a_, AUTO_PARAGRAPH_SPACING_PT as af, DEFAULT_PAGE_GEOMETRY as ap, DEFAULT_RUN_STYLE as aq, DEFAULT_SECTION_PROPERTIES as ar, DEFAULT_TAB_INTERVAL_PT as as, DEFAULT_TAB_INTERVAL_TWIPS as at, HARD_MAX_FONT_SOURCES as b0, MAX_BORDER_SPACE_PT as b6, MAX_BORDER_WIDTH_PT as b7, MAX_DOCUMENT_SECTIONS as b8, MAX_LVL_OVERRIDES as b9, SINGLE_LINE_SPACING as bJ, MAX_NUMBERING_DEFINITIONS as ba, MAX_PARAGRAPH_SPACING_PT as bb, MAX_SHAPING_CONTEXT as bc, MAX_STYLE_DEFINITIONS as bd, MAX_TABLE_BORDER_STROKES as be, MAX_TAB_POSITION_TWIPS as bf, MAX_TAB_STOPS as bg, PAGE_BORDER_SIDES as bj, PARAGRAPH_BORDER_SIDES as bk, parseRefInstruction as c$, TAB_LEADER_GLYPH as c5, createUnsupportedContentProjector as cA, defaultTabIntervalFromSettings as cB, displayText as cC, enumerateDocumentSections as cD, enumerateDocumentSectionsBounded as cE, fixedPoint as cF, fontRequestKey as cG, geometryOfSection as cH, glyphSizeFactorOf as cI, groupPictureLayerDrawing as cJ, isValidStyleId as cK, layoutEquation as cL, measureDisplayText as cM, nextTabDestination as cN, pageBordersFingerprint as cO, paragraphBorderExtentPt as cP, paragraphBorderStrokeWidthPt as cQ, paragraphBorders as cR, paragraphBordersFingerprint as cS, paragraphBreaksBefore as cT, paragraphContextualSpacing as cU, paragraphLineSpacing as cV, paragraphSectionNode as cW, paragraphSpacing as cX, paragraphTabStops as cY, parsePageBorders as cZ, parsePageNumbering as c_, appliedSpaceBefore as ci, applyLineSpacing as cj, baselineShiftPtOf as ck, borderExtentPt as cl, borderWeight as cm, bottomBorderExtentPt as cn, boundedStructuralFontValidator as co, buildNumberingIndex as cp, buildStyleCascadeTable as cq, cascadeParagraphFormatting as cr, cascadeRunProperties as cs, cascadedBottomBorder as ct, cascadedParagraphBorders as cu, cascadedTabStops as cv, collapsedSpaceBefore as cw, createFontResourceSnapshot as cx, createShapedRun as cy, createShapingEnvironment as cz, parseSectionProperties as d0, projectedSectionSourceIndexes as d1, readBorderSide as d2, readCellBorders as d3, readSectionProperties as d4, readTableBorders as d5, resolveBorderConflict as d6, resolveNumberingLevel as d7, resolveParagraphLayoutInputs as d8, resolveRunStyle as d9, resolveStoryListItems as da, resolveStoryRefFields as db, resolveTableCellBorderGrid as dc, runStylesEqual as dd, shapedRunComparatorInputs as de, shapingEnvironmentFingerprint as df, shapingEnvironmentFingerprintInputs as dg, tabAdvanceWidth as dh, tabStopsFingerprint as di, withDefaultTabInterval as dj, withNumberingStyleLinks as dk, withResolvedListItems as dl, unsupportedElementRuleMatches as u };
|
|
4077
|
+
export type { StyleCascadeTable as $, AnchoredDrawingRecord as A, BlockFragmentRecord as B, ContentControlBoundaryRecord as C, DrawingPoint as D, DrawingInsets as E, FontResourceSnapshot as F, TableFloatXSpec as G, HeaderFooterStoryRecord as H, InlineDrawingRecord as I, TableFloatYSpec as J, NumberingLevelIndent as K, LineRecord as L, ModelRange as M, NoteAreaRecord as N, ResolvedListItem as O, ParagraphFragmentRecord as P, RefFieldContext as Q, ResolvedRunStyle as R, SemanticLayout as S, TextMeasurer as T, UnsupportedElement as U, VersionedShapingLibrary as V, InlineDrawingLayoutContext as W, CellBorderBox as X, TableBorderBox as Y, TableCellStyleFormatting as Z, TableFloatPosition as _, PageRecord as a, FixedPoint as a0, FontByteValidator as a1, SourceRange as a2, HyperlinkProjector as a3, FieldLinkProjector as a4, StoryPageFieldNeeds as a5, HyperlinkFieldSpec as a6, SpanLinkRecord as a7, PageGeometry as a8, SectionColumns as a9, DrawingGroupPictureRecord as aA, DrawingPlaceholderKind as aB, DrawingTextArtRecord as aC, EquationBarGeometry as aF, EquationBorderBoxGeometry as aG, EquationDiagonal as aH, EquationFractionGeometry as aI, EquationGeometry as aJ, EquationNaryGeometry as aK, EquationRadicalGeometry as aL, EquationRowGeometry as aM, EquationScriptGeometry as aN, EquationSpanRecord as aO, EquationTextGeometry as aP, FieldAtomMarker as aQ, FontFingerprintInputs as aR, FontResolutionErrorCode as aT, FontResourceDefinition as aU, FontResourceInstrumentation as aV, FontResourceSnapshotOptions as aW, FontValidationResult as aX, GlyphOutline as aY, GroupTextboxStoryRecord as aZ, SectionPageBorders as aa, PageBorderFrameRecord as ab, ParagraphBorderStrokeRecord as ac, StrikeoutStrokePt as ad, TextOutline as ae, AbstractNumDefinition as ag, AnchoredDrawingLayoutFallback as ah, BorderGridGeometry as ai, CascadedParagraphFormatting as aj, CjkTypographySettings as ak, ContentControlGeometryFragment as al, ContentControlLevel as am, ContentControlMappedType as an, ContentControlModelRange as ao, DeclaredFontSubstitution as au, DocumentSection as av, DocumentSectionsEnumeration as aw, DrawingClipFallback as ax, DrawingGeometry as ay, DrawingGroupPictureLayerRecord as az, LayoutBox as b, ShapedRunComparatorInputs as b$, LevelOverride as b1, LineSpacingRule as b2, ListMarkerAlign as b3, ListMarkerRecord as b4, ListSuffix as b5, ParagraphSpacing as bA, RefFieldSpec as bB, RefNoteParts as bC, ResolvedCellBorders as bD, ResolvedPictureBullet as bE, ResolvedTabStops as bF, ResolvedTableBorderEdge as bG, ResolvedTableBorderEdgeSegment as bH, ResolvedUnderline as bI, SectionBreakMarkRecord as bK, SectionBreakType as bL, SectionColumnDefinition as bM, SectionMargins as bN, SectionPageNumbering as bO, SemanticArtifactRootStoryKind as bP, SemanticArtifactStoryKind as bQ, SemanticCommentArtifactRecord as bR, SemanticReviewArtifactOccurrence as bS, SemanticReviewArtifactOccurrenceGeometry as bT, SemanticReviewArtifactPosition as bU, SemanticReviewArtifactSource as bV, SemanticTrackedChangeArtifactRecord as bW, ShapeInput as bX, ShapedCluster as bY, ShapedFontSpan as bZ, ShapedGlyph as b_, NumDefinition as bh, NumberingPictureBullet as bi, PageBorderDisplay as bl, PageBorderOffsetFrom as bm, PageBorderSide as bn, PageBorderStrokeRecord as bo, PageBorderZOrder as bp, PageRefCalibrationCell as bq, PageRefFieldProjection as br, ParagraphAutoSpacingContext as bs, ParagraphBorderEdge as bt, ParagraphBorderSide as bu, ParagraphBorders as bv, ParagraphBottomBorderRecord as bw, ParagraphIndent as bx, ParagraphLayoutInputs as by, ParagraphLineSpacing as bz, NoteStoryRecord as c, ShapedVerticalMetrics as c0, ShapingContext as c1, ShapingEnvironment as c2, ShapingEnvironmentFingerprintInputs as c3, StyleDefinition as c4, TabAlignment as c6, TabDestination as c7, TabLeader as c8, TabStop as c9, TableBorderSideName as ca, TableBorderStrokeRecord as cb, TableCellDiagonalRecord as cc, TableFragmentRecord as cd, TextArtFit as ce, TextboxStoryFallbackReason as cf, TextboxStoryLayout as cg, VerticalAlign as ch, ContentControlLock as d, StyleSpanRecord as e, TableRowFragmentRecord as f, TableCellFragmentRecord as g, UnsupportedElementLayout as h, UnsupportedElementRule as i, ShapingEnvironmentInput as j, TextShaper as k, ResolvedFont as l, NormalizationPolicy as m, FixedPointRoundingMode as n, FontRequest as o, SemanticReviewArtifactRecord as p, ListMarkerPictureRecord as q, FontSubstitution as r, ShapedRun as s, SectionProperties as t, NumberingLevel as v, NumberingIndex as w, TextDirection as x, FontSlot as y, TableBorderSide as z };
|