@eigenpal/docx-editor-agents 1.0.3 → 1.2.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/LICENSE +13 -16
- package/dist/bridge.d.mts +1 -1
- package/dist/bridge.d.ts +1 -1
- package/dist/bridge.js +1 -1
- package/dist/bridge.mjs +1 -1
- package/dist/{chunk-NGMVN6QV.mjs → chunk-6KT5LOQB.mjs} +1 -1
- package/dist/chunk-B3LQVYMR.js +74 -0
- package/dist/{chunk-DDW6L3LZ.js → chunk-DIXFGAF5.js} +2 -2
- package/dist/chunk-EPRXZTIE.js +1 -0
- package/dist/{chunk-JQBSMHZA.mjs → chunk-HTU7NUTJ.mjs} +1 -1
- package/dist/chunk-L7LXQOTH.mjs +74 -0
- package/dist/chunk-MHUG23P6.js +5 -0
- package/dist/chunk-MK47WH2X.mjs +5 -0
- package/dist/{chunk-SCYZRJWI.js → chunk-NSFRE2VK.js} +1 -1
- package/dist/chunk-XDZHYYU6.mjs +1 -0
- package/dist/executor-SBR6X4JZ.mjs +1 -0
- package/dist/executor-ZTSOZMKE.js +1 -0
- package/dist/headless-6C4JSKYY.mjs +1 -0
- package/dist/headless-VGNLVFAJ.js +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- package/dist/react.mjs +1 -1
- package/dist/{server-CGxgyhy-.d.mts → server-uM9UUIhk.d.mts} +190 -108
- package/dist/{server-CGxgyhy-.d.ts → server-uM9UUIhk.d.ts} +190 -108
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/vue.js +2 -2
- package/dist/vue.mjs +18 -20
- package/package.json +2 -2
- package/dist/chunk-7C5RGTQY.js +0 -71
- package/dist/chunk-MOAJJKKG.js +0 -5
- package/dist/chunk-NISW2GF6.js +0 -1
- package/dist/chunk-OHVUJUDE.mjs +0 -71
- package/dist/chunk-PSSPSJR4.mjs +0 -5
- package/dist/chunk-X4YGLGUM.mjs +0 -1
- package/dist/executor-QBMOTUCJ.js +0 -1
- package/dist/executor-RSQI3VOF.mjs +0 -1
- package/dist/headless-3IX5WQEZ.js +0 -1
- package/dist/headless-V7JUUMG6.mjs +0 -1
|
@@ -901,6 +901,16 @@ interface TableStructuralChangeInfo {
|
|
|
901
901
|
type: 'tableRowInsertion' | 'tableRowDeletion' | 'tableCellInsertion' | 'tableCellDeletion' | 'tableCellMerge';
|
|
902
902
|
/** Tracked change metadata */
|
|
903
903
|
info: TrackedChangeInfo;
|
|
904
|
+
/**
|
|
905
|
+
* `<w:cellMerge w:vMerge="…">` value, only meaningful for `tableCellMerge`.
|
|
906
|
+
* Schema `ST_AnnotationVMerge`: `"rest"` = anchor (start of merged span),
|
|
907
|
+
* `"cont"` = continuation (merged into predecessor). Word's default for a
|
|
908
|
+
* tracked merge is `"cont"` (most edits track "this cell got merged INTO
|
|
909
|
+
* the one above"); we preserve the on-disk value when present.
|
|
910
|
+
*/
|
|
911
|
+
vMerge?: 'rest' | 'cont';
|
|
912
|
+
/** `<w:cellMerge w:vMergeOrig="…">` — the pre-merge vMerge state. */
|
|
913
|
+
vMergeOrig?: 'rest' | 'cont';
|
|
904
914
|
}
|
|
905
915
|
|
|
906
916
|
/**
|
|
@@ -960,111 +970,6 @@ interface Table {
|
|
|
960
970
|
rows: TableRow[];
|
|
961
971
|
}
|
|
962
972
|
|
|
963
|
-
/**
|
|
964
|
-
* Structured Document Tags / content controls (`w:sdt`) — inline and
|
|
965
|
-
* block variants, plus properties (alias, tag, lock, list items,
|
|
966
|
-
* checkbox state) for the supported SDT types.
|
|
967
|
-
*/
|
|
968
|
-
|
|
969
|
-
/**
|
|
970
|
-
* SDT type (content control type)
|
|
971
|
-
*/
|
|
972
|
-
type SdtType = 'richText' | 'plainText' | 'date' | 'dropdown' | 'comboBox' | 'checkbox' | 'picture' | 'buildingBlockGallery' | 'group' | 'unknown';
|
|
973
|
-
/**
|
|
974
|
-
* SDT properties (w:sdtPr)
|
|
975
|
-
*/
|
|
976
|
-
interface SdtProperties {
|
|
977
|
-
/** SDT type */
|
|
978
|
-
sdtType: SdtType;
|
|
979
|
-
/** Alias (friendly name) */
|
|
980
|
-
alias?: string;
|
|
981
|
-
/** Tag (developer identifier) */
|
|
982
|
-
tag?: string;
|
|
983
|
-
/** Lock content editing */
|
|
984
|
-
lock?: 'sdtLocked' | 'contentLocked' | 'sdtContentLocked' | 'unlocked';
|
|
985
|
-
/** Placeholder text */
|
|
986
|
-
placeholder?: string;
|
|
987
|
-
/** Whether showing placeholder */
|
|
988
|
-
showingPlaceholder?: boolean;
|
|
989
|
-
/** Date format for date controls */
|
|
990
|
-
dateFormat?: string;
|
|
991
|
-
/** Dropdown/combobox list items */
|
|
992
|
-
listItems?: {
|
|
993
|
-
displayText: string;
|
|
994
|
-
value: string;
|
|
995
|
-
}[];
|
|
996
|
-
/** Checkbox checked state */
|
|
997
|
-
checked?: boolean;
|
|
998
|
-
}
|
|
999
|
-
/**
|
|
1000
|
-
* Inline SDT (content control within a paragraph)
|
|
1001
|
-
*/
|
|
1002
|
-
interface InlineSdt {
|
|
1003
|
-
type: 'inlineSdt';
|
|
1004
|
-
/** SDT properties */
|
|
1005
|
-
properties: SdtProperties;
|
|
1006
|
-
/**
|
|
1007
|
-
* Inline content held inside the control. OOXML allows runs,
|
|
1008
|
-
* hyperlinks, simple/complex fields, nested SDTs, and math at this
|
|
1009
|
-
* level; the renderer must descend into all of them so docProps-bound
|
|
1010
|
-
* fields and similar template content survive paged rendering.
|
|
1011
|
-
*/
|
|
1012
|
-
content: (Run | Hyperlink | SimpleField | ComplexField | InlineSdt | MathEquation)[];
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* Block-level SDT (content control wrapping paragraphs/tables)
|
|
1016
|
-
*/
|
|
1017
|
-
interface BlockSdt {
|
|
1018
|
-
type: 'blockSdt';
|
|
1019
|
-
/** SDT properties */
|
|
1020
|
-
properties: SdtProperties;
|
|
1021
|
-
/** Block content inside the control */
|
|
1022
|
-
content: (Paragraph | Table)[];
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
/**
|
|
1026
|
-
* Comments (`w:comment` in `comments.xml`) and the inline range markers
|
|
1027
|
-
* (`w:commentRangeStart`/`End`) that anchor them inside paragraphs.
|
|
1028
|
-
*/
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1031
|
-
* A comment from `comments.xml` — the top-level entity for review
|
|
1032
|
-
* comments and replies. `id` matches the inline `CommentRangeStart` /
|
|
1033
|
-
* `CommentRangeEnd` markers that anchor it inside a paragraph; `parentId`
|
|
1034
|
-
* threads replies under their parent; `done` reflects Word's "Resolve"
|
|
1035
|
-
* state (`w15:done`).
|
|
1036
|
-
*/
|
|
1037
|
-
interface Comment {
|
|
1038
|
-
/** Comment ID (matches commentRangeStart/End) */
|
|
1039
|
-
id: number;
|
|
1040
|
-
/** Author name */
|
|
1041
|
-
author: string;
|
|
1042
|
-
/** Author initials */
|
|
1043
|
-
initials?: string;
|
|
1044
|
-
/** Date */
|
|
1045
|
-
date?: string;
|
|
1046
|
-
/** Comment content (paragraphs) */
|
|
1047
|
-
content: Paragraph[];
|
|
1048
|
-
/** Parent comment ID (for replies) */
|
|
1049
|
-
parentId?: number;
|
|
1050
|
-
/** Whether the comment is resolved/done */
|
|
1051
|
-
done?: boolean;
|
|
1052
|
-
}
|
|
1053
|
-
/**
|
|
1054
|
-
* Comment range start marker in paragraph content
|
|
1055
|
-
*/
|
|
1056
|
-
interface CommentRangeStart {
|
|
1057
|
-
type: 'commentRangeStart';
|
|
1058
|
-
id: number;
|
|
1059
|
-
}
|
|
1060
|
-
/**
|
|
1061
|
-
* Comment range end marker in paragraph content
|
|
1062
|
-
*/
|
|
1063
|
-
interface CommentRangeEnd {
|
|
1064
|
-
type: 'commentRangeEnd';
|
|
1065
|
-
id: number;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
973
|
/**
|
|
1069
974
|
* Page furniture — headers (`w:hdr`), footers (`w:ftr`), footnotes
|
|
1070
975
|
* (`w:footnote`), and endnotes (`w:endnote`), plus the section-level
|
|
@@ -1094,7 +999,7 @@ interface HeaderFooter {
|
|
|
1094
999
|
/** Header/footer type */
|
|
1095
1000
|
hdrFtrType: HeaderFooterType;
|
|
1096
1001
|
/** Content (paragraphs, tables, etc.) */
|
|
1097
|
-
content:
|
|
1002
|
+
content: BlockContent[];
|
|
1098
1003
|
}
|
|
1099
1004
|
/**
|
|
1100
1005
|
* Footnote position
|
|
@@ -1142,7 +1047,7 @@ interface Footnote {
|
|
|
1142
1047
|
* widened to match HeaderFooter / TableCell shape so the body pipeline
|
|
1143
1048
|
* (toProseDoc → toFlowBlocks) can render them uniformly.
|
|
1144
1049
|
*/
|
|
1145
|
-
content:
|
|
1050
|
+
content: BlockContent[];
|
|
1146
1051
|
}
|
|
1147
1052
|
/**
|
|
1148
1053
|
* Endnote (w:endnote)
|
|
@@ -1157,7 +1062,50 @@ interface Endnote {
|
|
|
1157
1062
|
* Content. Per ECMA-376 §17.11.4 endnotes can hold the same blocks as
|
|
1158
1063
|
* the body — paragraphs and tables. See note on `Footnote.content`.
|
|
1159
1064
|
*/
|
|
1160
|
-
content:
|
|
1065
|
+
content: BlockContent[];
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Comments (`w:comment` in `comments.xml`) and the inline range markers
|
|
1070
|
+
* (`w:commentRangeStart`/`End`) that anchor them inside paragraphs.
|
|
1071
|
+
*/
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* A comment from `comments.xml` — the top-level entity for review
|
|
1075
|
+
* comments and replies. `id` matches the inline `CommentRangeStart` /
|
|
1076
|
+
* `CommentRangeEnd` markers that anchor it inside a paragraph; `parentId`
|
|
1077
|
+
* threads replies under their parent; `done` reflects Word's "Resolve"
|
|
1078
|
+
* state (`w15:done`).
|
|
1079
|
+
*/
|
|
1080
|
+
interface Comment {
|
|
1081
|
+
/** Comment ID (matches commentRangeStart/End) */
|
|
1082
|
+
id: number;
|
|
1083
|
+
/** Author name */
|
|
1084
|
+
author: string;
|
|
1085
|
+
/** Author initials */
|
|
1086
|
+
initials?: string;
|
|
1087
|
+
/** Date */
|
|
1088
|
+
date?: string;
|
|
1089
|
+
/** Comment content (paragraphs) */
|
|
1090
|
+
content: Paragraph[];
|
|
1091
|
+
/** Parent comment ID (for replies) */
|
|
1092
|
+
parentId?: number;
|
|
1093
|
+
/** Whether the comment is resolved/done */
|
|
1094
|
+
done?: boolean;
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* Comment range start marker in paragraph content
|
|
1098
|
+
*/
|
|
1099
|
+
interface CommentRangeStart {
|
|
1100
|
+
type: 'commentRangeStart';
|
|
1101
|
+
id: number;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Comment range end marker in paragraph content
|
|
1105
|
+
*/
|
|
1106
|
+
interface CommentRangeEnd {
|
|
1107
|
+
type: 'commentRangeEnd';
|
|
1108
|
+
id: number;
|
|
1161
1109
|
}
|
|
1162
1110
|
|
|
1163
1111
|
/**
|
|
@@ -1332,6 +1280,126 @@ interface DocumentBody {
|
|
|
1332
1280
|
comments?: Comment[];
|
|
1333
1281
|
}
|
|
1334
1282
|
|
|
1283
|
+
/**
|
|
1284
|
+
* Structured Document Tags / content controls (`w:sdt`) — inline and
|
|
1285
|
+
* block variants, plus properties (alias, tag, lock, list items,
|
|
1286
|
+
* checkbox state) for the supported SDT types.
|
|
1287
|
+
*/
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* SDT type (content control type).
|
|
1291
|
+
*
|
|
1292
|
+
* Values mirror the `w:sdtPr` type-marker element names from ECMA-376
|
|
1293
|
+
* §17.5.2 (`CT_SdtPr`), with two deliberate exceptions:
|
|
1294
|
+
* - `checkbox` is the `w14:checkbox` (Office 2010) extension, not a base
|
|
1295
|
+
* OOXML type marker.
|
|
1296
|
+
* - `buildingBlockGallery` covers both `w:docPartObj` and `w:docPartList`.
|
|
1297
|
+
*
|
|
1298
|
+
* A `w:sdtPr` with no type marker means `richText` (the spec default). A
|
|
1299
|
+
* type marker the parser does not model maps to `unknown` — it is never
|
|
1300
|
+
* coerced to `richText`, so the projection stays honest. Round-trip
|
|
1301
|
+
* fidelity does not depend on this enum: the raw `w:sdtPr` is replayed
|
|
1302
|
+
* verbatim (see `rawPropertiesXml`).
|
|
1303
|
+
*/
|
|
1304
|
+
type SdtType = 'richText' | 'plainText' | 'date' | 'dropDownList' | 'comboBox' | 'checkbox' | 'picture' | 'buildingBlockGallery' | 'group' | 'equation' | 'citation' | 'bibliography' | 'unknown';
|
|
1305
|
+
/**
|
|
1306
|
+
* XML data binding (`w:dataBinding`) — links a content control to a node in a
|
|
1307
|
+
* Custom XML data store. Modeled read-only; the binding round-trips verbatim
|
|
1308
|
+
* via `rawPropertiesXml` (this projection is for inspection, e.g. "which
|
|
1309
|
+
* controls are bound, and to what XPath"). The editor does not resolve or
|
|
1310
|
+
* sync bound values.
|
|
1311
|
+
*/
|
|
1312
|
+
interface SdtDataBinding {
|
|
1313
|
+
/** XPath into the bound Custom XML part (`w:xpath`). */
|
|
1314
|
+
xpath?: string;
|
|
1315
|
+
/** Target Custom XML store id (`w:storeItemID`). */
|
|
1316
|
+
storeItemID?: string;
|
|
1317
|
+
/** Namespace prefix mappings used by the XPath (`w:prefixMappings`). */
|
|
1318
|
+
prefixMappings?: string;
|
|
1319
|
+
}
|
|
1320
|
+
/**
|
|
1321
|
+
* SDT properties (`w:sdtPr`).
|
|
1322
|
+
*
|
|
1323
|
+
* The modeled fields are a **read-only projection** for downstream tooling
|
|
1324
|
+
* (tag/alias addressing, template extraction). They are NOT the
|
|
1325
|
+
* serialization source: the original `w:sdtPr` is captured verbatim in
|
|
1326
|
+
* `rawPropertiesXml` and replayed on save, which preserves element order
|
|
1327
|
+
* (`CT_SdtPr` is an `xsd:sequence`), avoids double-emission, and keeps
|
|
1328
|
+
* unmodeled features (data binding, `w15:*`, `@lastValue`) lossless.
|
|
1329
|
+
*/
|
|
1330
|
+
interface SdtProperties {
|
|
1331
|
+
/** SDT type (projection; see {@link SdtType}). */
|
|
1332
|
+
sdtType: SdtType;
|
|
1333
|
+
/** Unique numeric id (`w:id`, signed). */
|
|
1334
|
+
id?: number;
|
|
1335
|
+
/** Alias (friendly name, `w:alias`). */
|
|
1336
|
+
alias?: string;
|
|
1337
|
+
/** Tag (developer identifier, `w:tag`). */
|
|
1338
|
+
tag?: string;
|
|
1339
|
+
/** Lock setting (`w:lock`). */
|
|
1340
|
+
lock?: 'sdtLocked' | 'contentLocked' | 'sdtContentLocked' | 'unlocked';
|
|
1341
|
+
/**
|
|
1342
|
+
* Placeholder building-block name (`w:placeholder/w:docPart@w:val`).
|
|
1343
|
+
* This is a reference to a glossary docPart that supplies the placeholder
|
|
1344
|
+
* content — NOT the literal placeholder text.
|
|
1345
|
+
*/
|
|
1346
|
+
placeholder?: string;
|
|
1347
|
+
/** Whether the control is currently showing its placeholder (`w:showingPlcHdr`). */
|
|
1348
|
+
showingPlaceholder?: boolean;
|
|
1349
|
+
/** Date format for date controls (`w:date@w:fullDate`). */
|
|
1350
|
+
dateFormat?: string;
|
|
1351
|
+
/** Dropdown/combobox list items. */
|
|
1352
|
+
listItems?: {
|
|
1353
|
+
displayText: string;
|
|
1354
|
+
value: string;
|
|
1355
|
+
}[];
|
|
1356
|
+
/** Checkbox checked state (`w14:checkbox`). */
|
|
1357
|
+
checked?: boolean;
|
|
1358
|
+
/** XML data binding (`w:dataBinding`), if the control is bound. */
|
|
1359
|
+
dataBinding?: SdtDataBinding;
|
|
1360
|
+
/**
|
|
1361
|
+
* The original `<w:sdtPr>` serialized verbatim as an XML string, captured
|
|
1362
|
+
* at parse time. Replayed unchanged on save so the properties block
|
|
1363
|
+
* round-trips losslessly. Stored as a string (not an `XmlElement`) so the
|
|
1364
|
+
* types layer stays free of the parser/`xml-js` dependency. Absent for
|
|
1365
|
+
* SDTs created programmatically — the serializer then synthesizes a
|
|
1366
|
+
* minimal, sequence-valid `w:sdtPr` from the modeled fields.
|
|
1367
|
+
*/
|
|
1368
|
+
rawPropertiesXml?: string;
|
|
1369
|
+
/** The original `<w:sdtEndPr>` serialized verbatim, if present. */
|
|
1370
|
+
rawEndPropertiesXml?: string;
|
|
1371
|
+
}
|
|
1372
|
+
/**
|
|
1373
|
+
* Inline SDT (content control within a paragraph)
|
|
1374
|
+
*/
|
|
1375
|
+
interface InlineSdt {
|
|
1376
|
+
type: 'inlineSdt';
|
|
1377
|
+
/** SDT properties */
|
|
1378
|
+
properties: SdtProperties;
|
|
1379
|
+
/**
|
|
1380
|
+
* Inline content held inside the control. OOXML allows runs,
|
|
1381
|
+
* hyperlinks, simple/complex fields, nested SDTs, and math at this
|
|
1382
|
+
* level; the renderer must descend into all of them so docProps-bound
|
|
1383
|
+
* fields and similar template content survive paged rendering.
|
|
1384
|
+
*/
|
|
1385
|
+
content: (Run | Hyperlink | SimpleField | ComplexField | InlineSdt | MathEquation)[];
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* Block-level SDT (content control wrapping block content).
|
|
1389
|
+
*
|
|
1390
|
+
* `content` is `BlockContent[]` (not just paragraphs/tables) so a nested
|
|
1391
|
+
* block SDT survives the round trip. `CT_SdtContentBlock` also permits
|
|
1392
|
+
* run-level content (bookmarks, etc.); that is carried through the same
|
|
1393
|
+
* block-content parsing as elsewhere in the document.
|
|
1394
|
+
*/
|
|
1395
|
+
interface BlockSdt {
|
|
1396
|
+
type: 'blockSdt';
|
|
1397
|
+
/** SDT properties */
|
|
1398
|
+
properties: SdtProperties;
|
|
1399
|
+
/** Block content inside the control */
|
|
1400
|
+
content: BlockContent[];
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1335
1403
|
/**
|
|
1336
1404
|
* Paragraph (`w:p`) — the union of inline content that can sit inside a
|
|
1337
1405
|
* paragraph (runs, hyperlinks, bookmarks, fields, SDT, comment ranges,
|
|
@@ -1368,6 +1436,20 @@ interface Paragraph {
|
|
|
1368
1436
|
formatting?: ParagraphFormatting;
|
|
1369
1437
|
/** Paragraph-level tracked property changes (w:pPrChange) */
|
|
1370
1438
|
propertyChanges?: ParagraphPropertyChange[];
|
|
1439
|
+
/**
|
|
1440
|
+
* Paragraph-mark insertion tracking (`<w:pPr><w:rPr><w:ins/>`). Set when
|
|
1441
|
+
* this paragraph's terminating pilcrow was added as a tracked change —
|
|
1442
|
+
* e.g., the user pressed Enter mid-paragraph in suggesting mode. Reject
|
|
1443
|
+
* joins this paragraph with the following one.
|
|
1444
|
+
*/
|
|
1445
|
+
pPrIns?: TrackedChangeInfo;
|
|
1446
|
+
/**
|
|
1447
|
+
* Paragraph-mark deletion tracking (`<w:pPr><w:rPr><w:del/>`). Set when
|
|
1448
|
+
* this paragraph's terminating pilcrow was deleted as a tracked change —
|
|
1449
|
+
* e.g., the user pressed Backspace at the start of the next paragraph in
|
|
1450
|
+
* suggesting mode. Accept joins this paragraph with the following one.
|
|
1451
|
+
*/
|
|
1452
|
+
pPrDel?: TrackedChangeInfo;
|
|
1371
1453
|
/** Paragraph content */
|
|
1372
1454
|
content: ParagraphContent[];
|
|
1373
1455
|
/** Computed list rendering (if this is a list item) */
|
|
@@ -901,6 +901,16 @@ interface TableStructuralChangeInfo {
|
|
|
901
901
|
type: 'tableRowInsertion' | 'tableRowDeletion' | 'tableCellInsertion' | 'tableCellDeletion' | 'tableCellMerge';
|
|
902
902
|
/** Tracked change metadata */
|
|
903
903
|
info: TrackedChangeInfo;
|
|
904
|
+
/**
|
|
905
|
+
* `<w:cellMerge w:vMerge="…">` value, only meaningful for `tableCellMerge`.
|
|
906
|
+
* Schema `ST_AnnotationVMerge`: `"rest"` = anchor (start of merged span),
|
|
907
|
+
* `"cont"` = continuation (merged into predecessor). Word's default for a
|
|
908
|
+
* tracked merge is `"cont"` (most edits track "this cell got merged INTO
|
|
909
|
+
* the one above"); we preserve the on-disk value when present.
|
|
910
|
+
*/
|
|
911
|
+
vMerge?: 'rest' | 'cont';
|
|
912
|
+
/** `<w:cellMerge w:vMergeOrig="…">` — the pre-merge vMerge state. */
|
|
913
|
+
vMergeOrig?: 'rest' | 'cont';
|
|
904
914
|
}
|
|
905
915
|
|
|
906
916
|
/**
|
|
@@ -960,111 +970,6 @@ interface Table {
|
|
|
960
970
|
rows: TableRow[];
|
|
961
971
|
}
|
|
962
972
|
|
|
963
|
-
/**
|
|
964
|
-
* Structured Document Tags / content controls (`w:sdt`) — inline and
|
|
965
|
-
* block variants, plus properties (alias, tag, lock, list items,
|
|
966
|
-
* checkbox state) for the supported SDT types.
|
|
967
|
-
*/
|
|
968
|
-
|
|
969
|
-
/**
|
|
970
|
-
* SDT type (content control type)
|
|
971
|
-
*/
|
|
972
|
-
type SdtType = 'richText' | 'plainText' | 'date' | 'dropdown' | 'comboBox' | 'checkbox' | 'picture' | 'buildingBlockGallery' | 'group' | 'unknown';
|
|
973
|
-
/**
|
|
974
|
-
* SDT properties (w:sdtPr)
|
|
975
|
-
*/
|
|
976
|
-
interface SdtProperties {
|
|
977
|
-
/** SDT type */
|
|
978
|
-
sdtType: SdtType;
|
|
979
|
-
/** Alias (friendly name) */
|
|
980
|
-
alias?: string;
|
|
981
|
-
/** Tag (developer identifier) */
|
|
982
|
-
tag?: string;
|
|
983
|
-
/** Lock content editing */
|
|
984
|
-
lock?: 'sdtLocked' | 'contentLocked' | 'sdtContentLocked' | 'unlocked';
|
|
985
|
-
/** Placeholder text */
|
|
986
|
-
placeholder?: string;
|
|
987
|
-
/** Whether showing placeholder */
|
|
988
|
-
showingPlaceholder?: boolean;
|
|
989
|
-
/** Date format for date controls */
|
|
990
|
-
dateFormat?: string;
|
|
991
|
-
/** Dropdown/combobox list items */
|
|
992
|
-
listItems?: {
|
|
993
|
-
displayText: string;
|
|
994
|
-
value: string;
|
|
995
|
-
}[];
|
|
996
|
-
/** Checkbox checked state */
|
|
997
|
-
checked?: boolean;
|
|
998
|
-
}
|
|
999
|
-
/**
|
|
1000
|
-
* Inline SDT (content control within a paragraph)
|
|
1001
|
-
*/
|
|
1002
|
-
interface InlineSdt {
|
|
1003
|
-
type: 'inlineSdt';
|
|
1004
|
-
/** SDT properties */
|
|
1005
|
-
properties: SdtProperties;
|
|
1006
|
-
/**
|
|
1007
|
-
* Inline content held inside the control. OOXML allows runs,
|
|
1008
|
-
* hyperlinks, simple/complex fields, nested SDTs, and math at this
|
|
1009
|
-
* level; the renderer must descend into all of them so docProps-bound
|
|
1010
|
-
* fields and similar template content survive paged rendering.
|
|
1011
|
-
*/
|
|
1012
|
-
content: (Run | Hyperlink | SimpleField | ComplexField | InlineSdt | MathEquation)[];
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* Block-level SDT (content control wrapping paragraphs/tables)
|
|
1016
|
-
*/
|
|
1017
|
-
interface BlockSdt {
|
|
1018
|
-
type: 'blockSdt';
|
|
1019
|
-
/** SDT properties */
|
|
1020
|
-
properties: SdtProperties;
|
|
1021
|
-
/** Block content inside the control */
|
|
1022
|
-
content: (Paragraph | Table)[];
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
/**
|
|
1026
|
-
* Comments (`w:comment` in `comments.xml`) and the inline range markers
|
|
1027
|
-
* (`w:commentRangeStart`/`End`) that anchor them inside paragraphs.
|
|
1028
|
-
*/
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1031
|
-
* A comment from `comments.xml` — the top-level entity for review
|
|
1032
|
-
* comments and replies. `id` matches the inline `CommentRangeStart` /
|
|
1033
|
-
* `CommentRangeEnd` markers that anchor it inside a paragraph; `parentId`
|
|
1034
|
-
* threads replies under their parent; `done` reflects Word's "Resolve"
|
|
1035
|
-
* state (`w15:done`).
|
|
1036
|
-
*/
|
|
1037
|
-
interface Comment {
|
|
1038
|
-
/** Comment ID (matches commentRangeStart/End) */
|
|
1039
|
-
id: number;
|
|
1040
|
-
/** Author name */
|
|
1041
|
-
author: string;
|
|
1042
|
-
/** Author initials */
|
|
1043
|
-
initials?: string;
|
|
1044
|
-
/** Date */
|
|
1045
|
-
date?: string;
|
|
1046
|
-
/** Comment content (paragraphs) */
|
|
1047
|
-
content: Paragraph[];
|
|
1048
|
-
/** Parent comment ID (for replies) */
|
|
1049
|
-
parentId?: number;
|
|
1050
|
-
/** Whether the comment is resolved/done */
|
|
1051
|
-
done?: boolean;
|
|
1052
|
-
}
|
|
1053
|
-
/**
|
|
1054
|
-
* Comment range start marker in paragraph content
|
|
1055
|
-
*/
|
|
1056
|
-
interface CommentRangeStart {
|
|
1057
|
-
type: 'commentRangeStart';
|
|
1058
|
-
id: number;
|
|
1059
|
-
}
|
|
1060
|
-
/**
|
|
1061
|
-
* Comment range end marker in paragraph content
|
|
1062
|
-
*/
|
|
1063
|
-
interface CommentRangeEnd {
|
|
1064
|
-
type: 'commentRangeEnd';
|
|
1065
|
-
id: number;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
973
|
/**
|
|
1069
974
|
* Page furniture — headers (`w:hdr`), footers (`w:ftr`), footnotes
|
|
1070
975
|
* (`w:footnote`), and endnotes (`w:endnote`), plus the section-level
|
|
@@ -1094,7 +999,7 @@ interface HeaderFooter {
|
|
|
1094
999
|
/** Header/footer type */
|
|
1095
1000
|
hdrFtrType: HeaderFooterType;
|
|
1096
1001
|
/** Content (paragraphs, tables, etc.) */
|
|
1097
|
-
content:
|
|
1002
|
+
content: BlockContent[];
|
|
1098
1003
|
}
|
|
1099
1004
|
/**
|
|
1100
1005
|
* Footnote position
|
|
@@ -1142,7 +1047,7 @@ interface Footnote {
|
|
|
1142
1047
|
* widened to match HeaderFooter / TableCell shape so the body pipeline
|
|
1143
1048
|
* (toProseDoc → toFlowBlocks) can render them uniformly.
|
|
1144
1049
|
*/
|
|
1145
|
-
content:
|
|
1050
|
+
content: BlockContent[];
|
|
1146
1051
|
}
|
|
1147
1052
|
/**
|
|
1148
1053
|
* Endnote (w:endnote)
|
|
@@ -1157,7 +1062,50 @@ interface Endnote {
|
|
|
1157
1062
|
* Content. Per ECMA-376 §17.11.4 endnotes can hold the same blocks as
|
|
1158
1063
|
* the body — paragraphs and tables. See note on `Footnote.content`.
|
|
1159
1064
|
*/
|
|
1160
|
-
content:
|
|
1065
|
+
content: BlockContent[];
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Comments (`w:comment` in `comments.xml`) and the inline range markers
|
|
1070
|
+
* (`w:commentRangeStart`/`End`) that anchor them inside paragraphs.
|
|
1071
|
+
*/
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* A comment from `comments.xml` — the top-level entity for review
|
|
1075
|
+
* comments and replies. `id` matches the inline `CommentRangeStart` /
|
|
1076
|
+
* `CommentRangeEnd` markers that anchor it inside a paragraph; `parentId`
|
|
1077
|
+
* threads replies under their parent; `done` reflects Word's "Resolve"
|
|
1078
|
+
* state (`w15:done`).
|
|
1079
|
+
*/
|
|
1080
|
+
interface Comment {
|
|
1081
|
+
/** Comment ID (matches commentRangeStart/End) */
|
|
1082
|
+
id: number;
|
|
1083
|
+
/** Author name */
|
|
1084
|
+
author: string;
|
|
1085
|
+
/** Author initials */
|
|
1086
|
+
initials?: string;
|
|
1087
|
+
/** Date */
|
|
1088
|
+
date?: string;
|
|
1089
|
+
/** Comment content (paragraphs) */
|
|
1090
|
+
content: Paragraph[];
|
|
1091
|
+
/** Parent comment ID (for replies) */
|
|
1092
|
+
parentId?: number;
|
|
1093
|
+
/** Whether the comment is resolved/done */
|
|
1094
|
+
done?: boolean;
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* Comment range start marker in paragraph content
|
|
1098
|
+
*/
|
|
1099
|
+
interface CommentRangeStart {
|
|
1100
|
+
type: 'commentRangeStart';
|
|
1101
|
+
id: number;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Comment range end marker in paragraph content
|
|
1105
|
+
*/
|
|
1106
|
+
interface CommentRangeEnd {
|
|
1107
|
+
type: 'commentRangeEnd';
|
|
1108
|
+
id: number;
|
|
1161
1109
|
}
|
|
1162
1110
|
|
|
1163
1111
|
/**
|
|
@@ -1332,6 +1280,126 @@ interface DocumentBody {
|
|
|
1332
1280
|
comments?: Comment[];
|
|
1333
1281
|
}
|
|
1334
1282
|
|
|
1283
|
+
/**
|
|
1284
|
+
* Structured Document Tags / content controls (`w:sdt`) — inline and
|
|
1285
|
+
* block variants, plus properties (alias, tag, lock, list items,
|
|
1286
|
+
* checkbox state) for the supported SDT types.
|
|
1287
|
+
*/
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* SDT type (content control type).
|
|
1291
|
+
*
|
|
1292
|
+
* Values mirror the `w:sdtPr` type-marker element names from ECMA-376
|
|
1293
|
+
* §17.5.2 (`CT_SdtPr`), with two deliberate exceptions:
|
|
1294
|
+
* - `checkbox` is the `w14:checkbox` (Office 2010) extension, not a base
|
|
1295
|
+
* OOXML type marker.
|
|
1296
|
+
* - `buildingBlockGallery` covers both `w:docPartObj` and `w:docPartList`.
|
|
1297
|
+
*
|
|
1298
|
+
* A `w:sdtPr` with no type marker means `richText` (the spec default). A
|
|
1299
|
+
* type marker the parser does not model maps to `unknown` — it is never
|
|
1300
|
+
* coerced to `richText`, so the projection stays honest. Round-trip
|
|
1301
|
+
* fidelity does not depend on this enum: the raw `w:sdtPr` is replayed
|
|
1302
|
+
* verbatim (see `rawPropertiesXml`).
|
|
1303
|
+
*/
|
|
1304
|
+
type SdtType = 'richText' | 'plainText' | 'date' | 'dropDownList' | 'comboBox' | 'checkbox' | 'picture' | 'buildingBlockGallery' | 'group' | 'equation' | 'citation' | 'bibliography' | 'unknown';
|
|
1305
|
+
/**
|
|
1306
|
+
* XML data binding (`w:dataBinding`) — links a content control to a node in a
|
|
1307
|
+
* Custom XML data store. Modeled read-only; the binding round-trips verbatim
|
|
1308
|
+
* via `rawPropertiesXml` (this projection is for inspection, e.g. "which
|
|
1309
|
+
* controls are bound, and to what XPath"). The editor does not resolve or
|
|
1310
|
+
* sync bound values.
|
|
1311
|
+
*/
|
|
1312
|
+
interface SdtDataBinding {
|
|
1313
|
+
/** XPath into the bound Custom XML part (`w:xpath`). */
|
|
1314
|
+
xpath?: string;
|
|
1315
|
+
/** Target Custom XML store id (`w:storeItemID`). */
|
|
1316
|
+
storeItemID?: string;
|
|
1317
|
+
/** Namespace prefix mappings used by the XPath (`w:prefixMappings`). */
|
|
1318
|
+
prefixMappings?: string;
|
|
1319
|
+
}
|
|
1320
|
+
/**
|
|
1321
|
+
* SDT properties (`w:sdtPr`).
|
|
1322
|
+
*
|
|
1323
|
+
* The modeled fields are a **read-only projection** for downstream tooling
|
|
1324
|
+
* (tag/alias addressing, template extraction). They are NOT the
|
|
1325
|
+
* serialization source: the original `w:sdtPr` is captured verbatim in
|
|
1326
|
+
* `rawPropertiesXml` and replayed on save, which preserves element order
|
|
1327
|
+
* (`CT_SdtPr` is an `xsd:sequence`), avoids double-emission, and keeps
|
|
1328
|
+
* unmodeled features (data binding, `w15:*`, `@lastValue`) lossless.
|
|
1329
|
+
*/
|
|
1330
|
+
interface SdtProperties {
|
|
1331
|
+
/** SDT type (projection; see {@link SdtType}). */
|
|
1332
|
+
sdtType: SdtType;
|
|
1333
|
+
/** Unique numeric id (`w:id`, signed). */
|
|
1334
|
+
id?: number;
|
|
1335
|
+
/** Alias (friendly name, `w:alias`). */
|
|
1336
|
+
alias?: string;
|
|
1337
|
+
/** Tag (developer identifier, `w:tag`). */
|
|
1338
|
+
tag?: string;
|
|
1339
|
+
/** Lock setting (`w:lock`). */
|
|
1340
|
+
lock?: 'sdtLocked' | 'contentLocked' | 'sdtContentLocked' | 'unlocked';
|
|
1341
|
+
/**
|
|
1342
|
+
* Placeholder building-block name (`w:placeholder/w:docPart@w:val`).
|
|
1343
|
+
* This is a reference to a glossary docPart that supplies the placeholder
|
|
1344
|
+
* content — NOT the literal placeholder text.
|
|
1345
|
+
*/
|
|
1346
|
+
placeholder?: string;
|
|
1347
|
+
/** Whether the control is currently showing its placeholder (`w:showingPlcHdr`). */
|
|
1348
|
+
showingPlaceholder?: boolean;
|
|
1349
|
+
/** Date format for date controls (`w:date@w:fullDate`). */
|
|
1350
|
+
dateFormat?: string;
|
|
1351
|
+
/** Dropdown/combobox list items. */
|
|
1352
|
+
listItems?: {
|
|
1353
|
+
displayText: string;
|
|
1354
|
+
value: string;
|
|
1355
|
+
}[];
|
|
1356
|
+
/** Checkbox checked state (`w14:checkbox`). */
|
|
1357
|
+
checked?: boolean;
|
|
1358
|
+
/** XML data binding (`w:dataBinding`), if the control is bound. */
|
|
1359
|
+
dataBinding?: SdtDataBinding;
|
|
1360
|
+
/**
|
|
1361
|
+
* The original `<w:sdtPr>` serialized verbatim as an XML string, captured
|
|
1362
|
+
* at parse time. Replayed unchanged on save so the properties block
|
|
1363
|
+
* round-trips losslessly. Stored as a string (not an `XmlElement`) so the
|
|
1364
|
+
* types layer stays free of the parser/`xml-js` dependency. Absent for
|
|
1365
|
+
* SDTs created programmatically — the serializer then synthesizes a
|
|
1366
|
+
* minimal, sequence-valid `w:sdtPr` from the modeled fields.
|
|
1367
|
+
*/
|
|
1368
|
+
rawPropertiesXml?: string;
|
|
1369
|
+
/** The original `<w:sdtEndPr>` serialized verbatim, if present. */
|
|
1370
|
+
rawEndPropertiesXml?: string;
|
|
1371
|
+
}
|
|
1372
|
+
/**
|
|
1373
|
+
* Inline SDT (content control within a paragraph)
|
|
1374
|
+
*/
|
|
1375
|
+
interface InlineSdt {
|
|
1376
|
+
type: 'inlineSdt';
|
|
1377
|
+
/** SDT properties */
|
|
1378
|
+
properties: SdtProperties;
|
|
1379
|
+
/**
|
|
1380
|
+
* Inline content held inside the control. OOXML allows runs,
|
|
1381
|
+
* hyperlinks, simple/complex fields, nested SDTs, and math at this
|
|
1382
|
+
* level; the renderer must descend into all of them so docProps-bound
|
|
1383
|
+
* fields and similar template content survive paged rendering.
|
|
1384
|
+
*/
|
|
1385
|
+
content: (Run | Hyperlink | SimpleField | ComplexField | InlineSdt | MathEquation)[];
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* Block-level SDT (content control wrapping block content).
|
|
1389
|
+
*
|
|
1390
|
+
* `content` is `BlockContent[]` (not just paragraphs/tables) so a nested
|
|
1391
|
+
* block SDT survives the round trip. `CT_SdtContentBlock` also permits
|
|
1392
|
+
* run-level content (bookmarks, etc.); that is carried through the same
|
|
1393
|
+
* block-content parsing as elsewhere in the document.
|
|
1394
|
+
*/
|
|
1395
|
+
interface BlockSdt {
|
|
1396
|
+
type: 'blockSdt';
|
|
1397
|
+
/** SDT properties */
|
|
1398
|
+
properties: SdtProperties;
|
|
1399
|
+
/** Block content inside the control */
|
|
1400
|
+
content: BlockContent[];
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1335
1403
|
/**
|
|
1336
1404
|
* Paragraph (`w:p`) — the union of inline content that can sit inside a
|
|
1337
1405
|
* paragraph (runs, hyperlinks, bookmarks, fields, SDT, comment ranges,
|
|
@@ -1368,6 +1436,20 @@ interface Paragraph {
|
|
|
1368
1436
|
formatting?: ParagraphFormatting;
|
|
1369
1437
|
/** Paragraph-level tracked property changes (w:pPrChange) */
|
|
1370
1438
|
propertyChanges?: ParagraphPropertyChange[];
|
|
1439
|
+
/**
|
|
1440
|
+
* Paragraph-mark insertion tracking (`<w:pPr><w:rPr><w:ins/>`). Set when
|
|
1441
|
+
* this paragraph's terminating pilcrow was added as a tracked change —
|
|
1442
|
+
* e.g., the user pressed Enter mid-paragraph in suggesting mode. Reject
|
|
1443
|
+
* joins this paragraph with the following one.
|
|
1444
|
+
*/
|
|
1445
|
+
pPrIns?: TrackedChangeInfo;
|
|
1446
|
+
/**
|
|
1447
|
+
* Paragraph-mark deletion tracking (`<w:pPr><w:rPr><w:del/>`). Set when
|
|
1448
|
+
* this paragraph's terminating pilcrow was deleted as a tracked change —
|
|
1449
|
+
* e.g., the user pressed Backspace at the start of the next paragraph in
|
|
1450
|
+
* suggesting mode. Accept joins this paragraph with the following one.
|
|
1451
|
+
*/
|
|
1452
|
+
pPrDel?: TrackedChangeInfo;
|
|
1371
1453
|
/** Paragraph content */
|
|
1372
1454
|
content: ParagraphContent[];
|
|
1373
1455
|
/** Computed list rendering (if this is a list item) */
|
package/dist/server.d.mts
CHANGED
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
* @packageDocumentation
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
|
-
export { s as AgentContextSnapshot, j as AgentToolDefinition, k as AgentToolResult, D as DocxReviewer, E as EditorBridge, S as SelectionInfo, o as createReviewerBridge, n as docxAgentTools, p as executeToolCall, t as getToolDisplayName, q as getToolSchemas } from './server-
|
|
34
|
+
export { s as AgentContextSnapshot, j as AgentToolDefinition, k as AgentToolResult, D as DocxReviewer, E as EditorBridge, S as SelectionInfo, o as createReviewerBridge, n as docxAgentTools, p as executeToolCall, t as getToolDisplayName, q as getToolSchemas } from './server-uM9UUIhk.mjs';
|