@docx-editor.dev/core 2.14.1 → 2.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +6 -5
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +16 -10
- package/dist/binding.js +1 -1
- package/dist/chunk-24APKZAN.cjs +11 -0
- package/dist/chunk-2YH4MSHX.cjs +2 -0
- package/dist/chunk-5Y7AADI6.js +1 -0
- package/dist/chunk-AREFLNUP.js +11 -0
- package/dist/chunk-AS7YZNQE.cjs +2 -0
- package/dist/chunk-AVGCKH6A.cjs +20 -0
- package/dist/chunk-CDYVDQRI.cjs +5 -0
- package/dist/chunk-FGBADUSK.cjs +1 -0
- package/dist/chunk-HOEWFH5U.cjs +1 -0
- package/dist/chunk-KFELX7CN.js +2 -0
- package/dist/{chunk-OKEDGR65.js → chunk-KXPVOPR5.js} +1 -1
- package/dist/chunk-LGFKIF4M.cjs +1 -0
- package/dist/chunk-M52QXFKI.js +1 -0
- package/dist/chunk-MNUKSXRO.js +1 -0
- package/dist/chunk-PBOIGBDO.js +2 -0
- package/dist/chunk-PMHGONET.cjs +1 -0
- package/dist/chunk-PXKZUTHX.cjs +2 -0
- package/dist/chunk-Q4AB7E4O.cjs +1 -0
- package/dist/chunk-QJYH6AYD.js +1 -0
- package/dist/chunk-QRC37MWG.cjs +20 -0
- package/dist/chunk-RJSB6RJ7.js +20 -0
- package/dist/chunk-SB54HLFJ.js +20 -0
- package/dist/chunk-VP7SDFCM.js +1 -0
- package/dist/chunk-XCESLTJL.js +2 -0
- package/dist/{chunk-KIAP7PFQ.cjs → chunk-YL4Q5LZP.cjs} +1 -1
- package/dist/chunk-Z4527AXR.js +5 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +4 -3
- package/dist/contracts/editor.d.ts +7 -7
- package/dist/contracts/interaction.d.ts +7 -7
- package/dist/contracts/modules.d.ts +8 -7
- package/dist/{custom-node-writes-DntmaAVW.d.ts → custom-node-writes-C9ArIlJh.d.ts} +2 -2
- package/dist/{editor-a6VvsfYU.d.ts → editor-sRxrFJd8.d.ts} +29 -21
- package/dist/editor.cjs +1 -1
- package/dist/editor.d.ts +27 -58
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -0
- package/dist/export.d.ts +337 -0
- package/dist/export.js +2 -0
- package/dist/font-resolver-BYEHQGTw.d.ts +251 -0
- package/dist/headless-document-view-DELC4E5v.d.ts +134 -0
- package/dist/hf-references-DTrHkktY.d.ts +70 -0
- package/dist/{index-C5ZnSRkF.d.ts → index-C3Gvq4jN.d.ts} +55 -246
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -16
- package/dist/index.js +1 -1
- package/dist/{shaped-measurer-CFPnXFs9.d.cts → layout-shaping-DoGR5cf8.d.ts} +86 -12
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +1106 -729
- package/dist/layout.js +1 -1
- package/dist/{note-properties-CDFiNXcD.d.ts → note-properties-DSe8igrz.d.ts} +2 -2
- package/dist/{omml-equation-BY49UOIF.d.ts → omml-equation-BpRmfDAf.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +6 -6
- package/dist/output.js +1 -1
- package/dist/{protocol-gOY5GA8K.d.cts → protocol-DZzKxH5r.d.ts} +18 -12
- package/dist/{review-items-CCS1h93f.d.ts → review-items-DYRx187i.d.ts} +2 -2
- package/dist/{review-reads-BjZYeMd4.d.ts → review-reads-LbGUdNzn.d.ts} +22 -25
- package/dist/{revision-projection-BeXVrSSV.d.ts → revision-projection-DHRJH48u.d.ts} +1 -1
- package/dist/{semantic-cell-selection-BK91NCCG.d.ts → semantic-cell-selection-BXVWCBYm.d.ts} +4 -4
- package/dist/{semantic-interaction-BmQ7h2cq.d.ts → semantic-interaction-DZsDmPg5.d.ts} +1 -1
- package/dist/{semantic-paint-WJD2KeG1.d.ts → semantic-paint-f7SqN4oW.d.ts} +2 -2
- package/dist/{semantic-records-BpozY7-j.d.cts → semantic-records-EIdwId-a.d.ts} +301 -205
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +15 -65
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-D6HzlPR4.d.ts → tree-op-types-egdarvH_.d.ts} +7 -3
- package/dist/{tree-package-fragment-CWFjgH6a.d.ts → tree-package-fragment-DjkH4ESI.d.ts} +4 -70
- package/dist/{tree-session-contract-B2HfGt79.d.ts → tree-session-contract-CGOOgPjW.d.ts} +29 -23
- package/dist/{tree-store-APgWx6qn.d.ts → tree-store-DKJB0IcA.d.ts} +2 -2
- package/package.json +7 -2
- package/dist/automation.d.cts +0 -82
- package/dist/binding.d.cts +0 -153
- package/dist/chunk-2PIHW2QM.cjs +0 -1
- package/dist/chunk-2QTY5S6T.js +0 -1
- package/dist/chunk-4Z5MODAE.cjs +0 -2
- package/dist/chunk-5TKAPFZT.cjs +0 -2
- package/dist/chunk-DRQHIQ4R.cjs +0 -1
- package/dist/chunk-F2K6SDHA.cjs +0 -20
- package/dist/chunk-FBA57EUJ.js +0 -2
- package/dist/chunk-KTAQ7BRQ.js +0 -20
- package/dist/chunk-LBAHXZCU.cjs +0 -5
- package/dist/chunk-MCDUQYWP.js +0 -5
- package/dist/chunk-MQP26KCF.js +0 -1
- package/dist/chunk-NDJGSR6M.cjs +0 -19
- package/dist/chunk-NJNFJPGB.cjs +0 -11
- package/dist/chunk-O5M4CR4P.cjs +0 -2
- package/dist/chunk-UKUOZXUD.js +0 -19
- package/dist/chunk-VQ4R5LTU.js +0 -2
- package/dist/chunk-ZBEJHJN2.js +0 -11
- package/dist/chunk-ZVTW7RGD.js +0 -2
- package/dist/collaboration/replication.d.cts +0 -216
- package/dist/collaboration.d.cts +0 -176
- package/dist/contracts/document.d.cts +0 -273
- package/dist/contracts/editor.d.cts +0 -10
- package/dist/contracts/interaction.d.cts +0 -10
- package/dist/contracts/modules.d.cts +0 -130
- package/dist/contracts/types.d.cts +0 -562
- package/dist/custom-node-writes-C46r3_5O.d.cts +0 -310
- package/dist/document-properties-D6Ahr8D6.d.cts +0 -28
- package/dist/document-properties-D6Ahr8D6.d.ts +0 -28
- package/dist/editor-AJ06hyyg.d.cts +0 -1994
- package/dist/editor.d.cts +0 -393
- package/dist/failure-BnGjoXf0.d.cts +0 -64
- package/dist/index-Cbw4lkOt.d.cts +0 -3391
- package/dist/index.d.cts +0 -23
- package/dist/layout.d.cts +0 -2486
- package/dist/note-properties-Y6qYh2Hv.d.cts +0 -67
- package/dist/omml-equation-DB8d-jCq.d.cts +0 -84
- package/dist/output.d.cts +0 -74
- package/dist/protocol-BsmQgblT.d.ts +0 -1358
- package/dist/review-items-CaAkgi5s.d.cts +0 -360
- package/dist/review-reads-DEsV0OOW.d.cts +0 -163
- package/dist/revision-projection-DXbrfNGD.d.cts +0 -156
- package/dist/semantic-cell-selection-BMhku3B1.d.cts +0 -451
- package/dist/semantic-interaction-DUAnxbgf.d.cts +0 -160
- package/dist/semantic-paint-DufNL1Zr.d.cts +0 -247
- package/dist/semantic-records-92UnKeU_.d.ts +0 -2821
- package/dist/shaped-measurer-BWbindlI.d.ts +0 -168
- package/dist/store.d.cts +0 -2500
- package/dist/tree-op-types-BUulYD5y.d.cts +0 -3099
- package/dist/tree-package-fragment-Dhyw7oPm.d.cts +0 -732
- package/dist/tree-session-contract-BY9xd7s_.d.cts +0 -613
- package/dist/tree-store-DEEQ9wz_.d.cts +0 -416
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { O as OmmlEquationProjection } from './omml-equation-
|
|
1
|
+
import { b as RevisionAttribution, R as RevisionDisplayMode } from './revision-projection-DHRJH48u.js';
|
|
2
|
+
import { a as OoxmlNode, q as OoxmlProperty, c as OoxmlElement, U as TableBorderStyle, O as OoxmlPart, x as ImageResourceState, W as DrawingAccessibility, S as SourceCrop, X as DrawingTransform, Y as VectorShapeProjection, z as DrawingHorizontalReferenceFrame, A as DrawingVerticalReferenceFrame, u as ImageWrapTarget, Z as DrawingProjection, _ as OoxmlDrawingNode } from './tree-op-types-egdarvH_.js';
|
|
3
|
+
import { O as OmmlEquationProjection } from './omml-equation-BpRmfDAf.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Whether a paragraph must start a new page (`w:pageBreakBefore`).
|
|
@@ -1169,38 +1169,26 @@ interface DrawingGeometry {
|
|
|
1169
1169
|
/** Horizontal alignment of a paragraph (`w:jc`, ECMA-376 §17.3.1.13). */
|
|
1170
1170
|
type Alignment = 'left' | 'center' | 'right' | 'both';
|
|
1171
1171
|
|
|
1172
|
-
/** Soft ceiling on `basedOn` chain length — enough for real templates, refuses hostile graphs. */
|
|
1173
|
-
declare const MAX_STYLE_BASED_ON_DEPTH = 32;
|
|
1174
|
-
/** Soft ceiling on style definitions read from one styles part. */
|
|
1175
|
-
declare const MAX_STYLE_DEFINITIONS = 4096;
|
|
1176
|
-
/** One `w:style` as the cascade reads it: its properties, and the style it is based on. */
|
|
1177
1172
|
interface StyleDefinition {
|
|
1178
1173
|
readonly styleId: string;
|
|
1179
1174
|
readonly type: string;
|
|
1180
1175
|
readonly basedOn: string | null;
|
|
1181
|
-
/**
|
|
1182
|
-
* `w:next` — the style Word gives the paragraph that FOLLOWS one in this style.
|
|
1183
|
-
*
|
|
1184
|
-
* Nothing in layout reads it: it is a rule about authoring, not about painting. It is
|
|
1185
|
-
* read here because this is the one place `styles.xml` is parsed, and a second reader
|
|
1186
|
-
* would be a second answer to what a style id means.
|
|
1187
|
-
*/
|
|
1176
|
+
/** `w:next` — the authoring style for a following paragraph. */
|
|
1188
1177
|
readonly next: string | null;
|
|
1178
|
+
readonly outlineLevel: number | null;
|
|
1189
1179
|
readonly paragraphProperties: readonly OoxmlProperty[];
|
|
1190
1180
|
readonly runProperties: readonly OoxmlProperty[];
|
|
1191
|
-
/** The style's `w:pPr` node, when present — needed for nested `w:pBdr`. */
|
|
1192
1181
|
readonly paragraphPropertiesNode: OoxmlElement | undefined;
|
|
1193
|
-
/** The style's `w:tblPr`, for a `w:type="table"` style. */
|
|
1194
1182
|
readonly tablePropertiesNode: OoxmlElement | undefined;
|
|
1195
|
-
|
|
1196
|
-
* `w:tblStylePr` conditional formats by `w:type` (`firstRow`, `band1Horz`, …).
|
|
1197
|
-
*
|
|
1198
|
-
* Word puts a table's real appearance here: `Table Grid` carries its grid in the style's
|
|
1199
|
-
* `w:tblBorders`, and the banded/header looks live in these. A document states only
|
|
1200
|
-
* `<w:tblStyle w:val="TableGrid"/>`.
|
|
1201
|
-
*/
|
|
1183
|
+
readonly tableRowPropertiesNode: OoxmlElement | undefined;
|
|
1202
1184
|
readonly conditionalTableFormats: ReadonlyMap<string, OoxmlElement>;
|
|
1203
1185
|
}
|
|
1186
|
+
declare function isValidStyleId(raw: string | undefined): raw is string;
|
|
1187
|
+
|
|
1188
|
+
/** Soft ceiling on `basedOn` chain length — enough for real templates, refuses hostile graphs. */
|
|
1189
|
+
declare const MAX_STYLE_BASED_ON_DEPTH = 32;
|
|
1190
|
+
/** Soft ceiling on style definitions read from one styles part. */
|
|
1191
|
+
declare const MAX_STYLE_DEFINITIONS = 4096;
|
|
1204
1192
|
/**
|
|
1205
1193
|
* The whole styles part, indexed and ready to resolve against.
|
|
1206
1194
|
*
|
|
@@ -1274,8 +1262,6 @@ interface CascadedParagraphFormatting {
|
|
|
1274
1262
|
*/
|
|
1275
1263
|
readonly styleId: string | null;
|
|
1276
1264
|
}
|
|
1277
|
-
/** Accepted style ids only — over-long, control-bearing, or dangerous keys are dropped. */
|
|
1278
|
-
declare function isValidStyleId(raw: string | undefined): raw is string;
|
|
1279
1265
|
/**
|
|
1280
1266
|
* What a table style contributes to the paragraphs of ONE cell: the style's whole-table
|
|
1281
1267
|
* `w:pPr`/`w:rPr` followed by every `w:tblStylePr` the cell is under (17.7.6.6), weakest
|
|
@@ -1351,6 +1337,8 @@ interface ParagraphLayoutInputs {
|
|
|
1351
1337
|
readonly contextualSpacing: boolean;
|
|
1352
1338
|
/** Resolved paragraph style id, for the `w:contextualSpacing` neighbour comparison. */
|
|
1353
1339
|
readonly styleId: string | null;
|
|
1340
|
+
/** Resolved outline level, with 9/invalid values treated as body text. */
|
|
1341
|
+
readonly outlineLevel: number | null;
|
|
1354
1342
|
readonly bottomBorder: ParagraphBorderEdge | undefined;
|
|
1355
1343
|
/**
|
|
1356
1344
|
* Every `CT_PBdr` edge after cascade, not just the bottom one.
|
|
@@ -1394,6 +1382,184 @@ interface ParagraphLayoutInputs {
|
|
|
1394
1382
|
*/
|
|
1395
1383
|
declare function resolveParagraphLayoutInputs(paragraph: OoxmlElement, contentWidth: number, styleCascade: StyleCascadeTable | undefined, listItem?: ResolvedListItem, tableCellStyle?: TableCellStyleFormatting, inTableCell?: boolean): ParagraphLayoutInputs;
|
|
1396
1384
|
|
|
1385
|
+
/** Test-only mutable counters; omitted by production call sites. Not package-public. */
|
|
1386
|
+
interface TableBorderGridResolveWork {
|
|
1387
|
+
/** Sparse intervals emitted (not dense column slots). */
|
|
1388
|
+
ownershipSlotsWritten: number;
|
|
1389
|
+
columnLookups: number;
|
|
1390
|
+
}
|
|
1391
|
+
/** Shared remaining interval budget for nested table finalization in one layout. */
|
|
1392
|
+
interface TableBorderOwnershipBudget {
|
|
1393
|
+
intervalsRemaining: number;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
/** Which physical edge of a box a border sits on. */
|
|
1397
|
+
type TableBorderSideName = 'top' | 'right' | 'bottom' | 'left';
|
|
1398
|
+
/**
|
|
1399
|
+
* One border edge in one of three states.
|
|
1400
|
+
*
|
|
1401
|
+
* `omitted` and `none` are NOT the same: an omitted edge inherits from the table style or the
|
|
1402
|
+
* neighbouring cell, while an explicit `none` wins the conflict and draws nothing. Collapsing
|
|
1403
|
+
* them would let a style's border reappear where the author removed it.
|
|
1404
|
+
*/
|
|
1405
|
+
type TableBorderSide = {
|
|
1406
|
+
readonly state: 'omitted';
|
|
1407
|
+
} | {
|
|
1408
|
+
readonly state: 'none';
|
|
1409
|
+
} | {
|
|
1410
|
+
readonly state: 'edge';
|
|
1411
|
+
readonly style: TableBorderStyle;
|
|
1412
|
+
/** Validated RRGGBB, or null for auto/missing (paint defaults to black). */
|
|
1413
|
+
readonly color: string | null;
|
|
1414
|
+
/** Thickness in points (`w:sz` is eighths of a point). */
|
|
1415
|
+
readonly widthPt: number;
|
|
1416
|
+
};
|
|
1417
|
+
/** A table's six authored border edges: four outer, plus the two interior intervals. */
|
|
1418
|
+
interface TableBorderBox {
|
|
1419
|
+
readonly top: TableBorderSide;
|
|
1420
|
+
readonly left: TableBorderSide;
|
|
1421
|
+
readonly bottom: TableBorderSide;
|
|
1422
|
+
readonly right: TableBorderSide;
|
|
1423
|
+
readonly insideH: TableBorderSide;
|
|
1424
|
+
readonly insideV: TableBorderSide;
|
|
1425
|
+
}
|
|
1426
|
+
/** The four resolved edges of one cell, after conflict resolution against its neighbours. */
|
|
1427
|
+
interface CellBorderBox {
|
|
1428
|
+
readonly top: TableBorderSide;
|
|
1429
|
+
readonly left: TableBorderSide;
|
|
1430
|
+
readonly bottom: TableBorderSide;
|
|
1431
|
+
readonly right: TableBorderSide;
|
|
1432
|
+
}
|
|
1433
|
+
/** Final edge winner; absent means the side/interval is not drawn. */
|
|
1434
|
+
interface ResolvedTableBorderEdge {
|
|
1435
|
+
readonly style: TableBorderStyle;
|
|
1436
|
+
readonly color: string | null;
|
|
1437
|
+
readonly widthPt: number;
|
|
1438
|
+
}
|
|
1439
|
+
/**
|
|
1440
|
+
* Conflict winner over one grid interval of a cell side.
|
|
1441
|
+
*
|
|
1442
|
+
* `gridStart`/`gridEnd` are absolute grid column indices for horizontal sides and absolute
|
|
1443
|
+
* row indices for vertical sides (half-open). `startPt`/`endPt` are cell-local along-axis
|
|
1444
|
+
* positions in layout points.
|
|
1445
|
+
*/
|
|
1446
|
+
interface ResolvedTableBorderEdgeSegment {
|
|
1447
|
+
readonly side: TableBorderSideName;
|
|
1448
|
+
readonly gridStart: number;
|
|
1449
|
+
readonly gridEnd: number;
|
|
1450
|
+
readonly startPt: number;
|
|
1451
|
+
readonly endPt: number;
|
|
1452
|
+
readonly edge: ResolvedTableBorderEdge;
|
|
1453
|
+
}
|
|
1454
|
+
/**
|
|
1455
|
+
* One published stroke rectangle in cell-local layout points.
|
|
1456
|
+
*
|
|
1457
|
+
* Paint multiplies x/y/width/height by scale and draws — no metrics, gaps, or corner math.
|
|
1458
|
+
*/
|
|
1459
|
+
interface TableBorderStrokeRecord {
|
|
1460
|
+
readonly side: TableBorderSideName;
|
|
1461
|
+
readonly role: 'outer' | 'inner' | 'middle' | 'edge';
|
|
1462
|
+
readonly color: string | null;
|
|
1463
|
+
/** CSS keyword for this stroke (compound strokes are always solid). */
|
|
1464
|
+
readonly cssStyle: 'solid' | 'dashed' | 'dotted';
|
|
1465
|
+
readonly x: number;
|
|
1466
|
+
readonly y: number;
|
|
1467
|
+
readonly width: number;
|
|
1468
|
+
readonly height: number;
|
|
1469
|
+
}
|
|
1470
|
+
/**
|
|
1471
|
+
* Layout-owned cell borders after conflict resolution and compound expansion.
|
|
1472
|
+
*
|
|
1473
|
+
* Convenience `top`/`left`/`bottom`/`right` are set when that side has a single uniform
|
|
1474
|
+
* full-span winner (existing consumers / CSS simple edges). Multi-interval winners live
|
|
1475
|
+
* only on `edgeSegments`. Compound geometry is always on `strokes`.
|
|
1476
|
+
*/
|
|
1477
|
+
interface ResolvedCellBorders {
|
|
1478
|
+
readonly top?: ResolvedTableBorderEdge;
|
|
1479
|
+
readonly left?: ResolvedTableBorderEdge;
|
|
1480
|
+
readonly bottom?: ResolvedTableBorderEdge;
|
|
1481
|
+
readonly right?: ResolvedTableBorderEdge;
|
|
1482
|
+
readonly edgeSegments?: readonly ResolvedTableBorderEdgeSegment[];
|
|
1483
|
+
readonly strokes?: readonly TableBorderStrokeRecord[];
|
|
1484
|
+
}
|
|
1485
|
+
/** Soft cap on published stroke rectangles per cell (security / pathological spans). */
|
|
1486
|
+
declare const MAX_TABLE_BORDER_STROKES = 256;
|
|
1487
|
+
/** Read one OOXML border child into the three-state model. */
|
|
1488
|
+
declare function readBorderSide(node: OoxmlElement | undefined): TableBorderSide;
|
|
1489
|
+
/**
|
|
1490
|
+
* Read a table's `w:tblBorders`, dropping or clamping hostile values.
|
|
1491
|
+
*
|
|
1492
|
+
* Widths and colours come from a file: an out-of-range `w:sz` becomes a layout dimension, so it is
|
|
1493
|
+
* bounded here rather than downstream.
|
|
1494
|
+
*/
|
|
1495
|
+
declare function readTableBorders(tblPr: OoxmlElement | undefined): TableBorderBox;
|
|
1496
|
+
/** Read one cell's `w:tcBorders`, under the same bounds {@link readTableBorders} applies. */
|
|
1497
|
+
declare function readCellBorders(tcPr: OoxmlElement | undefined): CellBorderBox;
|
|
1498
|
+
/**
|
|
1499
|
+
* Conflict weight: the authored width in eighths of a point, and nothing else.
|
|
1500
|
+
*
|
|
1501
|
+
* Word-matching, not conformance — §17.4.39 (`w:tblBorders`) and §17.4.66 (`w:tcBorders`)
|
|
1502
|
+
* describe the elements and specify no conflict algorithm. Word picks the heavier RULE, so
|
|
1503
|
+
* a 6pt dashed rule beats a hairline single. Folding the style rank into the weight (an
|
|
1504
|
+
* `sz × border-number` product) made a 0.5pt double outrank a 1pt single and made every
|
|
1505
|
+
* dashed or dotted rule weigh 1 regardless of `w:sz`, which erased its width entirely.
|
|
1506
|
+
*/
|
|
1507
|
+
declare function borderWeight(side: TableBorderSide): number;
|
|
1508
|
+
/**
|
|
1509
|
+
* Pick the winner between two candidates on a shared grid line (zero cell spacing).
|
|
1510
|
+
*
|
|
1511
|
+
* `none` loses to any edge; two `none`/omitted yield omitted (no paint). Width decides;
|
|
1512
|
+
* equal widths rank by style, then prefer the darker color, then `preferFirst`
|
|
1513
|
+
* (reading-order / first candidate).
|
|
1514
|
+
*/
|
|
1515
|
+
declare function resolveBorderConflict(first: TableBorderSide, second: TableBorderSide, preferFirst?: boolean): TableBorderSide;
|
|
1516
|
+
interface BorderGridCell {
|
|
1517
|
+
readonly gridColumn: number;
|
|
1518
|
+
readonly gridSpan: number;
|
|
1519
|
+
readonly vMergeContinue: boolean;
|
|
1520
|
+
readonly borders: CellBorderBox;
|
|
1521
|
+
/** Set on restart cells that visually span into later rows. */
|
|
1522
|
+
readonly mergeRowSpan?: number;
|
|
1523
|
+
}
|
|
1524
|
+
/**
|
|
1525
|
+
* The absolute grid a table's borders are drawn on: column widths, and per-row tops and heights.
|
|
1526
|
+
*
|
|
1527
|
+
* Shared by every edge so adjacent cells resolve to the SAME line, rather than each computing its
|
|
1528
|
+
* own and leaving a hairline gap between them.
|
|
1529
|
+
*/
|
|
1530
|
+
interface BorderGridGeometry {
|
|
1531
|
+
/** Absolute column widths for the whole table (points). */
|
|
1532
|
+
readonly columnWidthsPt: readonly number[];
|
|
1533
|
+
/**
|
|
1534
|
+
* Per laid-out row: absolute top and height in the same coordinate space as cell boxes
|
|
1535
|
+
* (only relative differences matter for vertical edge segmentation).
|
|
1536
|
+
*/
|
|
1537
|
+
readonly rowBands: readonly {
|
|
1538
|
+
readonly y: number;
|
|
1539
|
+
readonly height: number;
|
|
1540
|
+
}[];
|
|
1541
|
+
/** Per laid-out cell: width/height after vMerge expansion (cell-local stroke space). */
|
|
1542
|
+
readonly cellBoxes: readonly (readonly {
|
|
1543
|
+
readonly width: number;
|
|
1544
|
+
readonly height: number;
|
|
1545
|
+
}[])[];
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* Resolve borders for every cell in a laid-out table fragment.
|
|
1549
|
+
*
|
|
1550
|
+
* Shared vertical edges: conflict(left.right, right.left) → assigned to the left cell,
|
|
1551
|
+
* segmented per row when a vMerge restart faces differing neighbors.
|
|
1552
|
+
* Shared horizontal edges: conflict(above.bottom, below.top) → assigned to the above cell,
|
|
1553
|
+
* segmented per grid column when a gridSpan cell faces differing below neighbors; vMerge
|
|
1554
|
+
* interior seams are suppressed per interval.
|
|
1555
|
+
*
|
|
1556
|
+
* When `geometry` is provided, compound edges expand into explicit stroke records with
|
|
1557
|
+
* corner-adjusted endpoints in cell-local points.
|
|
1558
|
+
*/
|
|
1559
|
+
declare function resolveTableCellBorderGrid(rows: readonly (readonly BorderGridCell[])[], table: TableBorderBox, columnCount: number, geometry?: BorderGridGeometry, work?: TableBorderGridResolveWork, ownershipBudget?: TableBorderOwnershipBudget): ResolvedCellBorders[][];
|
|
1560
|
+
/** Width contribution of a resolved edge for content inset / row sizing. */
|
|
1561
|
+
declare function borderExtentPt(edge: ResolvedTableBorderEdge | TableBorderSide | undefined): number;
|
|
1562
|
+
|
|
1397
1563
|
/**
|
|
1398
1564
|
* A paragraph's list membership fully resolved: definition, level, marker text and geometry.
|
|
1399
1565
|
*
|
|
@@ -1407,6 +1573,8 @@ interface ResolvedListItem {
|
|
|
1407
1573
|
/** `w:numFmt` of the resolved level — `bullet` or a numbering format. */
|
|
1408
1574
|
readonly numFmt: string;
|
|
1409
1575
|
readonly markerText: string;
|
|
1576
|
+
/** Counter value at this item's own level; absent for bullets. */
|
|
1577
|
+
readonly ordinal?: number;
|
|
1410
1578
|
readonly markerAlign: ListMarkerAlign;
|
|
1411
1579
|
readonly suffix: ListSuffix;
|
|
1412
1580
|
/** Effective indent after merging level + paragraph indents, in points. */
|
|
@@ -1797,184 +1965,6 @@ type HyperlinkProjector = (link: OoxmlNode) => SpanLinkRecord | null;
|
|
|
1797
1965
|
*/
|
|
1798
1966
|
type FieldLinkProjector = (spec: HyperlinkFieldSpec) => SpanLinkRecord | null;
|
|
1799
1967
|
|
|
1800
|
-
/** Test-only mutable counters; omitted by production call sites. Not package-public. */
|
|
1801
|
-
interface TableBorderGridResolveWork {
|
|
1802
|
-
/** Sparse intervals emitted (not dense column slots). */
|
|
1803
|
-
ownershipSlotsWritten: number;
|
|
1804
|
-
columnLookups: number;
|
|
1805
|
-
}
|
|
1806
|
-
/** Shared remaining interval budget for nested table finalization in one layout. */
|
|
1807
|
-
interface TableBorderOwnershipBudget {
|
|
1808
|
-
intervalsRemaining: number;
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
|
-
/** Which physical edge of a box a border sits on. */
|
|
1812
|
-
type TableBorderSideName = 'top' | 'right' | 'bottom' | 'left';
|
|
1813
|
-
/**
|
|
1814
|
-
* One border edge in one of three states.
|
|
1815
|
-
*
|
|
1816
|
-
* `omitted` and `none` are NOT the same: an omitted edge inherits from the table style or the
|
|
1817
|
-
* neighbouring cell, while an explicit `none` wins the conflict and draws nothing. Collapsing
|
|
1818
|
-
* them would let a style's border reappear where the author removed it.
|
|
1819
|
-
*/
|
|
1820
|
-
type TableBorderSide = {
|
|
1821
|
-
readonly state: 'omitted';
|
|
1822
|
-
} | {
|
|
1823
|
-
readonly state: 'none';
|
|
1824
|
-
} | {
|
|
1825
|
-
readonly state: 'edge';
|
|
1826
|
-
readonly style: TableBorderStyle;
|
|
1827
|
-
/** Validated RRGGBB, or null for auto/missing (paint defaults to black). */
|
|
1828
|
-
readonly color: string | null;
|
|
1829
|
-
/** Thickness in points (`w:sz` is eighths of a point). */
|
|
1830
|
-
readonly widthPt: number;
|
|
1831
|
-
};
|
|
1832
|
-
/** A table's six authored border edges: four outer, plus the two interior intervals. */
|
|
1833
|
-
interface TableBorderBox {
|
|
1834
|
-
readonly top: TableBorderSide;
|
|
1835
|
-
readonly left: TableBorderSide;
|
|
1836
|
-
readonly bottom: TableBorderSide;
|
|
1837
|
-
readonly right: TableBorderSide;
|
|
1838
|
-
readonly insideH: TableBorderSide;
|
|
1839
|
-
readonly insideV: TableBorderSide;
|
|
1840
|
-
}
|
|
1841
|
-
/** The four resolved edges of one cell, after conflict resolution against its neighbours. */
|
|
1842
|
-
interface CellBorderBox {
|
|
1843
|
-
readonly top: TableBorderSide;
|
|
1844
|
-
readonly left: TableBorderSide;
|
|
1845
|
-
readonly bottom: TableBorderSide;
|
|
1846
|
-
readonly right: TableBorderSide;
|
|
1847
|
-
}
|
|
1848
|
-
/** Final edge winner; absent means the side/interval is not drawn. */
|
|
1849
|
-
interface ResolvedTableBorderEdge {
|
|
1850
|
-
readonly style: TableBorderStyle;
|
|
1851
|
-
readonly color: string | null;
|
|
1852
|
-
readonly widthPt: number;
|
|
1853
|
-
}
|
|
1854
|
-
/**
|
|
1855
|
-
* Conflict winner over one grid interval of a cell side.
|
|
1856
|
-
*
|
|
1857
|
-
* `gridStart`/`gridEnd` are absolute grid column indices for horizontal sides and absolute
|
|
1858
|
-
* row indices for vertical sides (half-open). `startPt`/`endPt` are cell-local along-axis
|
|
1859
|
-
* positions in layout points.
|
|
1860
|
-
*/
|
|
1861
|
-
interface ResolvedTableBorderEdgeSegment {
|
|
1862
|
-
readonly side: TableBorderSideName;
|
|
1863
|
-
readonly gridStart: number;
|
|
1864
|
-
readonly gridEnd: number;
|
|
1865
|
-
readonly startPt: number;
|
|
1866
|
-
readonly endPt: number;
|
|
1867
|
-
readonly edge: ResolvedTableBorderEdge;
|
|
1868
|
-
}
|
|
1869
|
-
/**
|
|
1870
|
-
* One published stroke rectangle in cell-local layout points.
|
|
1871
|
-
*
|
|
1872
|
-
* Paint multiplies x/y/width/height by scale and draws — no metrics, gaps, or corner math.
|
|
1873
|
-
*/
|
|
1874
|
-
interface TableBorderStrokeRecord {
|
|
1875
|
-
readonly side: TableBorderSideName;
|
|
1876
|
-
readonly role: 'outer' | 'inner' | 'middle' | 'edge';
|
|
1877
|
-
readonly color: string | null;
|
|
1878
|
-
/** CSS keyword for this stroke (compound strokes are always solid). */
|
|
1879
|
-
readonly cssStyle: 'solid' | 'dashed' | 'dotted';
|
|
1880
|
-
readonly x: number;
|
|
1881
|
-
readonly y: number;
|
|
1882
|
-
readonly width: number;
|
|
1883
|
-
readonly height: number;
|
|
1884
|
-
}
|
|
1885
|
-
/**
|
|
1886
|
-
* Layout-owned cell borders after conflict resolution and compound expansion.
|
|
1887
|
-
*
|
|
1888
|
-
* Convenience `top`/`left`/`bottom`/`right` are set when that side has a single uniform
|
|
1889
|
-
* full-span winner (existing consumers / CSS simple edges). Multi-interval winners live
|
|
1890
|
-
* only on `edgeSegments`. Compound geometry is always on `strokes`.
|
|
1891
|
-
*/
|
|
1892
|
-
interface ResolvedCellBorders {
|
|
1893
|
-
readonly top?: ResolvedTableBorderEdge;
|
|
1894
|
-
readonly left?: ResolvedTableBorderEdge;
|
|
1895
|
-
readonly bottom?: ResolvedTableBorderEdge;
|
|
1896
|
-
readonly right?: ResolvedTableBorderEdge;
|
|
1897
|
-
readonly edgeSegments?: readonly ResolvedTableBorderEdgeSegment[];
|
|
1898
|
-
readonly strokes?: readonly TableBorderStrokeRecord[];
|
|
1899
|
-
}
|
|
1900
|
-
/** Soft cap on published stroke rectangles per cell (security / pathological spans). */
|
|
1901
|
-
declare const MAX_TABLE_BORDER_STROKES = 256;
|
|
1902
|
-
/** Read one OOXML border child into the three-state model. */
|
|
1903
|
-
declare function readBorderSide(node: OoxmlElement | undefined): TableBorderSide;
|
|
1904
|
-
/**
|
|
1905
|
-
* Read a table's `w:tblBorders`, dropping or clamping hostile values.
|
|
1906
|
-
*
|
|
1907
|
-
* Widths and colours come from a file: an out-of-range `w:sz` becomes a layout dimension, so it is
|
|
1908
|
-
* bounded here rather than downstream.
|
|
1909
|
-
*/
|
|
1910
|
-
declare function readTableBorders(tblPr: OoxmlElement | undefined): TableBorderBox;
|
|
1911
|
-
/** Read one cell's `w:tcBorders`, under the same bounds {@link readTableBorders} applies. */
|
|
1912
|
-
declare function readCellBorders(tcPr: OoxmlElement | undefined): CellBorderBox;
|
|
1913
|
-
/**
|
|
1914
|
-
* Conflict weight: the authored width in eighths of a point, and nothing else.
|
|
1915
|
-
*
|
|
1916
|
-
* Word-matching, not conformance — §17.4.39 (`w:tblBorders`) and §17.4.66 (`w:tcBorders`)
|
|
1917
|
-
* describe the elements and specify no conflict algorithm. Word picks the heavier RULE, so
|
|
1918
|
-
* a 6pt dashed rule beats a hairline single. Folding the style rank into the weight (an
|
|
1919
|
-
* `sz × border-number` product) made a 0.5pt double outrank a 1pt single and made every
|
|
1920
|
-
* dashed or dotted rule weigh 1 regardless of `w:sz`, which erased its width entirely.
|
|
1921
|
-
*/
|
|
1922
|
-
declare function borderWeight(side: TableBorderSide): number;
|
|
1923
|
-
/**
|
|
1924
|
-
* Pick the winner between two candidates on a shared grid line (zero cell spacing).
|
|
1925
|
-
*
|
|
1926
|
-
* `none` loses to any edge; two `none`/omitted yield omitted (no paint). Width decides;
|
|
1927
|
-
* equal widths rank by style, then prefer the darker color, then `preferFirst`
|
|
1928
|
-
* (reading-order / first candidate).
|
|
1929
|
-
*/
|
|
1930
|
-
declare function resolveBorderConflict(first: TableBorderSide, second: TableBorderSide, preferFirst?: boolean): TableBorderSide;
|
|
1931
|
-
interface BorderGridCell {
|
|
1932
|
-
readonly gridColumn: number;
|
|
1933
|
-
readonly gridSpan: number;
|
|
1934
|
-
readonly vMergeContinue: boolean;
|
|
1935
|
-
readonly borders: CellBorderBox;
|
|
1936
|
-
/** Set on restart cells that visually span into later rows. */
|
|
1937
|
-
readonly mergeRowSpan?: number;
|
|
1938
|
-
}
|
|
1939
|
-
/**
|
|
1940
|
-
* The absolute grid a table's borders are drawn on: column widths, and per-row tops and heights.
|
|
1941
|
-
*
|
|
1942
|
-
* Shared by every edge so adjacent cells resolve to the SAME line, rather than each computing its
|
|
1943
|
-
* own and leaving a hairline gap between them.
|
|
1944
|
-
*/
|
|
1945
|
-
interface BorderGridGeometry {
|
|
1946
|
-
/** Absolute column widths for the whole table (points). */
|
|
1947
|
-
readonly columnWidthsPt: readonly number[];
|
|
1948
|
-
/**
|
|
1949
|
-
* Per laid-out row: absolute top and height in the same coordinate space as cell boxes
|
|
1950
|
-
* (only relative differences matter for vertical edge segmentation).
|
|
1951
|
-
*/
|
|
1952
|
-
readonly rowBands: readonly {
|
|
1953
|
-
readonly y: number;
|
|
1954
|
-
readonly height: number;
|
|
1955
|
-
}[];
|
|
1956
|
-
/** Per laid-out cell: width/height after vMerge expansion (cell-local stroke space). */
|
|
1957
|
-
readonly cellBoxes: readonly (readonly {
|
|
1958
|
-
readonly width: number;
|
|
1959
|
-
readonly height: number;
|
|
1960
|
-
}[])[];
|
|
1961
|
-
}
|
|
1962
|
-
/**
|
|
1963
|
-
* Resolve borders for every cell in a laid-out table fragment.
|
|
1964
|
-
*
|
|
1965
|
-
* Shared vertical edges: conflict(left.right, right.left) → assigned to the left cell,
|
|
1966
|
-
* segmented per row when a vMerge restart faces differing neighbors.
|
|
1967
|
-
* Shared horizontal edges: conflict(above.bottom, below.top) → assigned to the above cell,
|
|
1968
|
-
* segmented per grid column when a gridSpan cell faces differing below neighbors; vMerge
|
|
1969
|
-
* interior seams are suppressed per interval.
|
|
1970
|
-
*
|
|
1971
|
-
* When `geometry` is provided, compound edges expand into explicit stroke records with
|
|
1972
|
-
* corner-adjusted endpoints in cell-local points.
|
|
1973
|
-
*/
|
|
1974
|
-
declare function resolveTableCellBorderGrid(rows: readonly (readonly BorderGridCell[])[], table: TableBorderBox, columnCount: number, geometry?: BorderGridGeometry, work?: TableBorderGridResolveWork, ownershipBudget?: TableBorderOwnershipBudget): ResolvedCellBorders[][];
|
|
1975
|
-
/** Width contribution of a resolved edge for content inset / row sizing. */
|
|
1976
|
-
declare function borderExtentPt(edge: ResolvedTableBorderEdge | TableBorderSide | undefined): number;
|
|
1977
|
-
|
|
1978
1968
|
interface EquationGeometryBase {
|
|
1979
1969
|
readonly box: LayoutBox;
|
|
1980
1970
|
/** Baseline measured from this node's top edge. */
|
|
@@ -2026,6 +2016,91 @@ interface EquationSpanRecord {
|
|
|
2026
2016
|
/** Compose one bounded OMML projection into paint-ready point geometry. */
|
|
2027
2017
|
declare function layoutEquation(projection: OmmlEquationProjection, measurer: TextMeasurer, style: ResolvedRunStyle): EquationSpanRecord;
|
|
2028
2018
|
|
|
2019
|
+
/** Published root story containing an artifact occurrence. @public */
|
|
2020
|
+
type SemanticArtifactRootStoryKind = 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'note-separator';
|
|
2021
|
+
/** Exact story in which a review artifact's source anchor was laid out. @public */
|
|
2022
|
+
type SemanticArtifactStoryKind = SemanticArtifactRootStoryKind | 'textbox';
|
|
2023
|
+
/** One model position retained as exporter provenance. @public */
|
|
2024
|
+
interface SemanticReviewArtifactPosition {
|
|
2025
|
+
readonly paragraphId: string;
|
|
2026
|
+
readonly offset: number;
|
|
2027
|
+
}
|
|
2028
|
+
/**
|
|
2029
|
+
* Package-relative snapshot provenance, not durable public identity.
|
|
2030
|
+
*
|
|
2031
|
+
* Engine-produced occurrences keep `start.paragraphId === end.paragraphId`. Cross-paragraph
|
|
2032
|
+
* source ranges are sliced into per-paragraph occurrences before geometry attaches.
|
|
2033
|
+
* @public
|
|
2034
|
+
*/
|
|
2035
|
+
interface SemanticReviewArtifactSource {
|
|
2036
|
+
readonly partName: string;
|
|
2037
|
+
readonly start: SemanticReviewArtifactPosition;
|
|
2038
|
+
readonly end: SemanticReviewArtifactPosition;
|
|
2039
|
+
}
|
|
2040
|
+
/**
|
|
2041
|
+
* Laid-out bounds for one review occurrence.
|
|
2042
|
+
*
|
|
2043
|
+
* `pageContent` uses the same space as line boxes. `pageStack` uses stacked page coordinates.
|
|
2044
|
+
* A point occurrence publishes `width: 0`.
|
|
2045
|
+
* @public
|
|
2046
|
+
*/
|
|
2047
|
+
interface SemanticReviewArtifactOccurrenceGeometry {
|
|
2048
|
+
readonly pageContent: readonly LayoutBox[];
|
|
2049
|
+
readonly pageStack: readonly LayoutBox[];
|
|
2050
|
+
}
|
|
2051
|
+
/** One physical occurrence of a comment or tracked-change source range. @public */
|
|
2052
|
+
interface SemanticReviewArtifactOccurrence {
|
|
2053
|
+
readonly pageIndex: number;
|
|
2054
|
+
readonly physicalPageNumber: number;
|
|
2055
|
+
readonly story: SemanticArtifactStoryKind;
|
|
2056
|
+
readonly rootStory: SemanticArtifactRootStoryKind;
|
|
2057
|
+
/** Root-to-leaf drawing ids for a textbox occurrence; empty outside textboxes. */
|
|
2058
|
+
readonly textboxPath: readonly string[];
|
|
2059
|
+
readonly noteScopeId: string | null;
|
|
2060
|
+
readonly noteAreaKind: 'footnotes' | 'endnotes' | null;
|
|
2061
|
+
/** Replacement-half meaning for tracked-change occurrences; absent for comments. */
|
|
2062
|
+
readonly revisionRole?: 'replaced' | 'replacement' | 'neutral';
|
|
2063
|
+
readonly source: SemanticReviewArtifactSource;
|
|
2064
|
+
/** Laid-out bounds when this occurrence can be measured; omitted otherwise. */
|
|
2065
|
+
readonly geometry?: SemanticReviewArtifactOccurrenceGeometry;
|
|
2066
|
+
}
|
|
2067
|
+
/** Normalized change; ids are opaque and stable only within the source snapshot. @public */
|
|
2068
|
+
interface SemanticTrackedChangeArtifactRecord {
|
|
2069
|
+
readonly kind: 'tracked-change';
|
|
2070
|
+
readonly id: string;
|
|
2071
|
+
readonly change: 'insert' | 'delete' | 'replace' | 'moveFrom' | 'moveTo' | 'format' | 'paragraphMark' | 'structural';
|
|
2072
|
+
readonly markDirection?: 'insert' | 'delete' | 'moveFrom' | 'moveTo';
|
|
2073
|
+
readonly author: string;
|
|
2074
|
+
readonly date?: string;
|
|
2075
|
+
readonly text: string;
|
|
2076
|
+
readonly replacedText: string;
|
|
2077
|
+
/** Nested tracked-change depth, where the innermost decision is operative. */
|
|
2078
|
+
readonly nesting: number;
|
|
2079
|
+
/** Number of leading source ranges belonging to struck text in a replacement. */
|
|
2080
|
+
readonly replacedRangeCount?: number;
|
|
2081
|
+
readonly readOnly: boolean;
|
|
2082
|
+
readonly pairedWith?: string;
|
|
2083
|
+
readonly replyIds: readonly string[];
|
|
2084
|
+
readonly occurrences: readonly SemanticReviewArtifactOccurrence[];
|
|
2085
|
+
}
|
|
2086
|
+
/** Normalized comment; all relation ids share the opaque snapshot-local id space. @public */
|
|
2087
|
+
interface SemanticCommentArtifactRecord {
|
|
2088
|
+
readonly kind: 'comment';
|
|
2089
|
+
readonly id: string;
|
|
2090
|
+
readonly author: string;
|
|
2091
|
+
readonly initials: string;
|
|
2092
|
+
readonly date?: string;
|
|
2093
|
+
readonly text: string;
|
|
2094
|
+
readonly resolved: boolean;
|
|
2095
|
+
readonly parentId?: string;
|
|
2096
|
+
readonly parentRevisionId?: string;
|
|
2097
|
+
readonly replyIds: readonly string[];
|
|
2098
|
+
readonly orphaned: boolean;
|
|
2099
|
+
readonly occurrences: readonly SemanticReviewArtifactOccurrence[];
|
|
2100
|
+
}
|
|
2101
|
+
/** Exporter-neutral review artifact normalized by core. @public */
|
|
2102
|
+
type SemanticReviewArtifactRecord = SemanticTrackedChangeArtifactRecord | SemanticCommentArtifactRecord;
|
|
2103
|
+
|
|
2029
2104
|
/** A half-open UTF-16 range inside one paragraph, addressed by its canonical node id. */
|
|
2030
2105
|
interface SourceRange {
|
|
2031
2106
|
readonly paragraphId: string;
|
|
@@ -2113,6 +2188,8 @@ interface StyleSpanRecord {
|
|
|
2113
2188
|
*/
|
|
2114
2189
|
readonly fontSlot?: FontSlot;
|
|
2115
2190
|
readonly box: LayoutBox;
|
|
2191
|
+
/** Authored trailing spaces that layout may clip at the line's right edge. */
|
|
2192
|
+
readonly lineEndWhitespace?: true;
|
|
2116
2193
|
/**
|
|
2117
2194
|
* Cumulative advances from {@link box}.x to each UTF-16 caret boundary in {@link text}.
|
|
2118
2195
|
*
|
|
@@ -2309,6 +2386,12 @@ interface ParagraphFragmentRecord {
|
|
|
2309
2386
|
readonly fragmentIndex: number;
|
|
2310
2387
|
readonly range: SourceRange;
|
|
2311
2388
|
readonly props: readonly OoxmlProperty[];
|
|
2389
|
+
/** Resolved paragraph style after the style/default cascade, or null when none applies. */
|
|
2390
|
+
readonly styleId: string | null;
|
|
2391
|
+
/** Resolved Word outline level (0 = Heading 1), or null for body text. */
|
|
2392
|
+
readonly outlineLevel: number | null;
|
|
2393
|
+
/** Resolved `w:jc` alignment used by layout. */
|
|
2394
|
+
readonly alignment: 'left' | 'center' | 'right' | 'both';
|
|
2312
2395
|
/**
|
|
2313
2396
|
* Before/after spacing applied to THIS fragment, in points.
|
|
2314
2397
|
*
|
|
@@ -2448,6 +2531,8 @@ interface ListMarkerRecord {
|
|
|
2448
2531
|
readonly numId: string;
|
|
2449
2532
|
/** `w:numFmt` of the resolved level — `bullet` or a numbering format. */
|
|
2450
2533
|
readonly numFmt: string;
|
|
2534
|
+
/** Resolved counter at this marker's own level; absent for bullets. */
|
|
2535
|
+
readonly ordinal?: number;
|
|
2451
2536
|
}
|
|
2452
2537
|
/**
|
|
2453
2538
|
* The part of one table that sits on one page.
|
|
@@ -2493,6 +2578,8 @@ interface TableRowFragmentRecord {
|
|
|
2493
2578
|
readonly revisionDate?: string;
|
|
2494
2579
|
/** Authored row ordinal within the table; repeats share the original row's index. */
|
|
2495
2580
|
readonly rowIndex: number;
|
|
2581
|
+
/** True when the authored row resolves `w:tblHeader`, including its first occurrence. */
|
|
2582
|
+
readonly isHeaderRow: boolean;
|
|
2496
2583
|
/**
|
|
2497
2584
|
* True for a `w:tblHeader` row RE-EMITTED at the top of a continuation page. Painted,
|
|
2498
2585
|
* but excluded from interaction walks so each caret stop exists exactly once.
|
|
@@ -2533,6 +2620,8 @@ interface TableCellFragmentRecord {
|
|
|
2533
2620
|
readonly rowSpan?: number;
|
|
2534
2621
|
/** Validated 6-hex cell shading fill, absent for none/auto. */
|
|
2535
2622
|
readonly shading?: string;
|
|
2623
|
+
/** Bottom-to-top cell content uses a rotated local inline axis. */
|
|
2624
|
+
readonly textDirection?: 'btLr';
|
|
2536
2625
|
/**
|
|
2537
2626
|
* Layout-owned resolved borders after collapsed conflict resolution.
|
|
2538
2627
|
*
|
|
@@ -2769,7 +2858,14 @@ interface PageRecord {
|
|
|
2769
2858
|
interface SemanticLayout {
|
|
2770
2859
|
/** The store revision these records were laid out from. */
|
|
2771
2860
|
readonly revision: number;
|
|
2861
|
+
/** Revision projection already applied to every published record. */
|
|
2862
|
+
readonly displayMode?: RevisionDisplayMode;
|
|
2772
2863
|
readonly pages: readonly PageRecord[];
|
|
2864
|
+
/**
|
|
2865
|
+
* Normalized comments and tracked changes from the same package revision as these pages.
|
|
2866
|
+
* Exporters consume this plain-data stream instead of re-reading OOXML or review state.
|
|
2867
|
+
*/
|
|
2868
|
+
readonly reviewArtifacts?: readonly SemanticReviewArtifactRecord[];
|
|
2773
2869
|
/**
|
|
2774
2870
|
* Every content-control boundary in document order, including multi-page fragment lists.
|
|
2775
2871
|
*
|
|
@@ -2818,4 +2914,4 @@ interface TextMeasurer {
|
|
|
2818
2914
|
};
|
|
2819
2915
|
}
|
|
2820
2916
|
|
|
2821
|
-
export { type
|
|
2917
|
+
export { type AnchoredDrawingLayoutFallback as $, type AnchoredDrawingRecord as A, type BlockFragmentRecord as B, type ContentControlBoundaryRecord as C, type DrawingPoint as D, type FixedPoint as E, type FontResourceSnapshot as F, type SourceRange as G, type HeaderFooterStoryRecord as H, type InlineDrawingRecord as I, type HyperlinkProjector as J, type InlineDrawingLayoutContext as K, type LineRecord as L, type ModelRange as M, type NormalizationPolicy as N, type FieldLinkProjector as O, type PageGeometry as P, type StoryPageFieldNeeds as Q, type ResolvedRunStyle as R, type SemanticLayout as S, type TextMeasurer as T, type RefFieldContext as U, type VersionedShapingLibrary as V, type HyperlinkFieldSpec as W, type SpanLinkRecord as X, type ResolvedListItem as Y, AUTO_PARAGRAPH_SPACING_PT as Z, type AbstractNumDefinition as _, type StyleSpanRecord as a, type ParagraphLayoutInputs as a$, type BidiEmbeddingLevels as a0, type BorderGridGeometry as a1, type CascadedParagraphFormatting as a2, type ContentControlGeometryFragment as a3, type ContentControlLevel as a4, type ContentControlMappedType as a5, DEFAULT_PAGE_GEOMETRY as a6, DEFAULT_RUN_STYLE as a7, DEFAULT_TAB_INTERVAL_PT as a8, DEFAULT_TAB_INTERVAL_TWIPS as a9, type LevelOverride as aA, type LineSpacingRule as aB, type ListMarkerAlign as aC, type ListMarkerRecord as aD, type ListSuffix as aE, MAX_BORDER_SPACE_PT as aF, MAX_BORDER_WIDTH_PT as aG, MAX_LVL_OVERRIDES as aH, MAX_NUMBERING_DEFINITIONS as aI, MAX_PARAGRAPH_SPACING_PT as aJ, MAX_STYLE_BASED_ON_DEPTH as aK, MAX_STYLE_DEFINITIONS as aL, MAX_TABLE_BORDER_STROKES as aM, MAX_TAB_POSITION_TWIPS as aN, MAX_TAB_STOPS as aO, type NumDefinition as aP, type NumberingLevelIndent as aQ, PARAGRAPH_BORDER_SIDES as aR, type PageRefCalibrationCell as aS, type PageRefFieldProjection as aT, type ParagraphAutoSpacingContext as aU, type ParagraphBorderEdge as aV, type ParagraphBorderSide as aW, type ParagraphBorderStrokeRecord as aX, type ParagraphBorders as aY, type ParagraphBottomBorderRecord as aZ, type ParagraphIndent as a_, type DeclaredFontSubstitution as aa, type DrawingClipFallback as ab, type DrawingGeometry as ac, EMPTY_NUMBERING_INDEX as ad, EMPTY_TAB_STOPS as ae, type EquationFractionGeometry as af, type EquationGeometry as ag, type EquationNaryGeometry as ah, type EquationRadicalGeometry as ai, type EquationRowGeometry as aj, type EquationScriptGeometry as ak, type EquationSpanRecord as al, type EquationTextGeometry as am, type FieldAtomMarker as an, type FontFingerprintInputs as ao, FontResolutionError as ap, type FontResolutionErrorCode as aq, type FontResourceDefinition as ar, type FontResourceInstrumentation as as, type FontResourceSnapshotOptions as at, type FontSlot as au, type FontValidationResult as av, type GlyphOutline as aw, HARD_MAX_AGGREGATE_FONT_BYTES as ax, HARD_MAX_FONT_BYTES as ay, HARD_MAX_FONT_SOURCES as az, type TableRowFragmentRecord as b, isValidStyleId as b$, type ParagraphLineSpacing as b0, type ParagraphSpacing as b1, type RefFieldSpec as b2, type RefNoteParts as b3, type ResolvedCellBorders as b4, type ResolvedTabStops as b5, type ResolvedTableBorderEdge as b6, type ResolvedTableBorderEdgeSegment as b7, type ResolvedUnderline as b8, SINGLE_LINE_SPACING as b9, type TextDirection as bA, type TextboxStoryFallbackReason as bB, type TextboxStoryLayout as bC, UnsupportedScriptError as bD, type VerticalAlign as bE, appliedSpaceBefore as bF, applyLineSpacing as bG, baselineShiftPtOf as bH, borderExtentPt as bI, borderWeight as bJ, bottomBorderExtentPt as bK, boundedStructuralFontValidator as bL, buildNumberingIndex as bM, buildStyleCascadeTable as bN, cascadeParagraphFormatting as bO, cascadeRunProperties as bP, cascadedBottomBorder as bQ, cascadedParagraphBorders as bR, cascadedTabStops as bS, collapsedSpaceBefore as bT, createFontResourceSnapshot as bU, createShapedRun as bV, createShapingEnvironment as bW, defaultTabIntervalFromSettings as bX, displayText as bY, fixedPoint as bZ, fontRequestKey as b_, type ScriptItem as ba, type SemanticArtifactRootStoryKind as bb, type SemanticArtifactStoryKind as bc, type SemanticCommentArtifactRecord as bd, type SemanticReviewArtifactOccurrence as be, type SemanticReviewArtifactOccurrenceGeometry as bf, type SemanticReviewArtifactPosition as bg, type SemanticReviewArtifactSource as bh, type SemanticTrackedChangeArtifactRecord as bi, type ShapeInput as bj, type ShapedCluster as bk, type ShapedFontSpan as bl, type ShapedGlyph as bm, type ShapedRunComparatorInputs as bn, type ShapedVerticalMetrics as bo, type ShapingEnvironment as bp, type ShapingEnvironmentFingerprintInputs as bq, type StyleDefinition as br, TAB_LEADER_GLYPH as bs, type TabAlignment as bt, type TabDestination as bu, type TabLeader as bv, type TabStop as bw, type TableBorderSideName as bx, type TableBorderStrokeRecord as by, type TableFragmentRecord as bz, type TableCellFragmentRecord as c, itemizeScriptFontSlots as c0, layoutEquation as c1, listMarkerBox as c2, measureDisplayText as c3, mergeListIndent as c4, nextTabDestination as c5, paragraphBorderExtentPt as c6, paragraphBorderStrokeWidthPt as c7, paragraphBorders as c8, paragraphBordersFingerprint as c9, withNumberingStyleLinks as cA, withResolvedListItems as cB, paragraphBreaksBefore as ca, paragraphContextualSpacing as cb, paragraphLineSpacing as cc, paragraphSpacing as cd, paragraphTabStops as ce, parseRefInstruction as cf, readBorderSide as cg, readCellBorders as ch, readNumPr as ci, readTableBorders as cj, resolveBorderConflict as ck, resolveNumberingLevel as cl, resolveParagraphLayoutInputs as cm, resolveRunStyle as cn, resolveStoryListItems as co, resolveStoryRefFields as cp, resolveTableCellBorderGrid as cq, runStylesEqual as cr, shapedRunComparatorInputs as cs, shapingEnvironmentFingerprint as ct, shapingEnvironmentFingerprintInputs as cu, styleForFontSlot as cv, tabAdvanceWidth as cw, tabStopsFingerprint as cx, walkStoryParagraphs as cy, withDefaultTabInterval as cz, type ShapingEnvironmentInput as d, type TextShaper as e, type ResolvedFont as f, type FixedPointRoundingMode as g, type FontRequest as h, type SemanticReviewArtifactRecord as i, type FontSubstitution as j, type ShapedRun as k, type NumberingLevel as l, type NumberingIndex as m, type LayoutBox as n, type DrawingInsets as o, type TableBorderSide as p, type CellBorderBox as q, type TableCellStyleFormatting as r, type TableBorderBox as s, type StyleCascadeTable as t, type PageRecord as u, type ParagraphFragmentRecord as v, type NoteAreaRecord as w, type NoteStoryRecord as x, type ContentControlLock as y, type FontByteValidator as z };
|