@beyondwork/docx-react-component 1.0.28 → 1.0.30

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.
Files changed (92) hide show
  1. package/package.json +26 -37
  2. package/src/api/public-types.ts +531 -0
  3. package/src/api/session-state.ts +2 -0
  4. package/src/core/commands/index.ts +201 -79
  5. package/src/core/commands/table-structure-commands.ts +138 -5
  6. package/src/core/state/text-transaction.ts +370 -3
  7. package/src/index.ts +41 -0
  8. package/src/io/docx-session.ts +318 -25
  9. package/src/io/export/serialize-footnotes.ts +41 -46
  10. package/src/io/export/serialize-headers-footers.ts +36 -40
  11. package/src/io/export/serialize-main-document.ts +55 -89
  12. package/src/io/export/serialize-numbering.ts +104 -4
  13. package/src/io/export/serialize-runtime-revisions.ts +196 -2
  14. package/src/io/export/split-story-blocks-for-runtime-revisions.ts +252 -0
  15. package/src/io/export/table-properties-xml.ts +318 -0
  16. package/src/io/normalize/normalize-text.ts +34 -3
  17. package/src/io/ooxml/parse-comments.ts +6 -0
  18. package/src/io/ooxml/parse-footnotes.ts +69 -13
  19. package/src/io/ooxml/parse-headers-footers.ts +54 -11
  20. package/src/io/ooxml/parse-main-document.ts +112 -42
  21. package/src/io/ooxml/parse-numbering.ts +341 -26
  22. package/src/io/ooxml/parse-revisions.ts +118 -4
  23. package/src/io/ooxml/parse-styles.ts +176 -0
  24. package/src/io/ooxml/parse-tables.ts +34 -25
  25. package/src/io/ooxml/revision-boundaries.ts +127 -3
  26. package/src/io/ooxml/workflow-payload.ts +544 -0
  27. package/src/model/canonical-document.ts +91 -1
  28. package/src/model/snapshot.ts +112 -1
  29. package/src/preservation/store.ts +73 -3
  30. package/src/review/store/comment-store.ts +19 -1
  31. package/src/review/store/revision-actions.ts +29 -0
  32. package/src/review/store/revision-store.ts +12 -1
  33. package/src/review/store/revision-types.ts +11 -0
  34. package/src/runtime/context-analytics.ts +824 -0
  35. package/src/runtime/document-locations.ts +521 -0
  36. package/src/runtime/document-navigation.ts +14 -1
  37. package/src/runtime/document-outline.ts +440 -0
  38. package/src/runtime/document-runtime.ts +941 -45
  39. package/src/runtime/event-refresh-hints.ts +137 -0
  40. package/src/runtime/numbering-prefix.ts +67 -39
  41. package/src/runtime/page-layout-estimation.ts +100 -7
  42. package/src/runtime/resolved-numbering-geometry.ts +293 -0
  43. package/src/runtime/session-capabilities.ts +2 -2
  44. package/src/runtime/suggestions-snapshot.ts +137 -0
  45. package/src/runtime/surface-projection.ts +223 -27
  46. package/src/runtime/table-style-resolver.ts +409 -0
  47. package/src/runtime/view-state.ts +17 -1
  48. package/src/runtime/workflow-markup.ts +54 -14
  49. package/src/ui/WordReviewEditor.tsx +1269 -87
  50. package/src/ui/editor-command-bag.ts +7 -0
  51. package/src/ui/editor-runtime-boundary.ts +111 -10
  52. package/src/ui/editor-shell-view.tsx +17 -15
  53. package/src/ui/editor-surface-controller.tsx +5 -0
  54. package/src/ui/headless/selection-tool-context.ts +19 -0
  55. package/src/ui/headless/selection-tool-resolver.ts +752 -0
  56. package/src/ui/headless/selection-tool-types.ts +129 -0
  57. package/src/ui/headless/selection-toolbar-model.ts +10 -33
  58. package/src/ui/runtime-shortcut-dispatch.ts +365 -0
  59. package/src/ui-tailwind/chrome/chrome-preset-model.ts +107 -0
  60. package/src/ui-tailwind/chrome/chrome-preset-toolbar.tsx +15 -0
  61. package/src/ui-tailwind/chrome/review-queue-bar.tsx +97 -0
  62. package/src/ui-tailwind/chrome/tw-context-analytics-summary.tsx +122 -0
  63. package/src/ui-tailwind/chrome/tw-image-context-toolbar.tsx +1 -9
  64. package/src/ui-tailwind/chrome/tw-object-context-toolbar.tsx +1 -5
  65. package/src/ui-tailwind/chrome/tw-page-ruler.tsx +8 -29
  66. package/src/ui-tailwind/chrome/tw-selection-tool-blocked.tsx +23 -0
  67. package/src/ui-tailwind/chrome/tw-selection-tool-comment.tsx +35 -0
  68. package/src/ui-tailwind/chrome/tw-selection-tool-formatting.tsx +37 -0
  69. package/src/ui-tailwind/chrome/tw-selection-tool-host.tsx +298 -0
  70. package/src/ui-tailwind/chrome/tw-selection-tool-structure.tsx +116 -0
  71. package/src/ui-tailwind/chrome/tw-selection-tool-suggestion.tsx +29 -0
  72. package/src/ui-tailwind/chrome/tw-selection-tool-workflow.tsx +27 -0
  73. package/src/ui-tailwind/chrome/tw-selection-toolbar.tsx +3 -3
  74. package/src/ui-tailwind/chrome/tw-suggestion-card.tsx +3 -3
  75. package/src/ui-tailwind/chrome/tw-table-context-toolbar.tsx +86 -14
  76. package/src/ui-tailwind/editor-surface/pm-command-bridge.ts +57 -52
  77. package/src/ui-tailwind/editor-surface/pm-decorations.ts +36 -52
  78. package/src/ui-tailwind/editor-surface/pm-schema.ts +56 -5
  79. package/src/ui-tailwind/editor-surface/pm-state-from-snapshot.ts +87 -24
  80. package/src/ui-tailwind/editor-surface/surface-build-keys.ts +4 -0
  81. package/src/ui-tailwind/editor-surface/tw-prosemirror-surface.tsx +135 -32
  82. package/src/ui-tailwind/editor-surface/tw-table-node-view.tsx +74 -7
  83. package/src/ui-tailwind/review/tw-comment-sidebar.tsx +17 -17
  84. package/src/ui-tailwind/review/tw-review-rail.tsx +19 -17
  85. package/src/ui-tailwind/review/tw-revision-sidebar.tsx +10 -10
  86. package/src/ui-tailwind/status/tw-status-bar.tsx +10 -6
  87. package/src/ui-tailwind/theme/editor-theme.css +58 -40
  88. package/src/ui-tailwind/toolbar/tw-toolbar-icon-button.tsx +4 -4
  89. package/src/ui-tailwind/toolbar/tw-toolbar.tsx +250 -181
  90. package/src/ui-tailwind/tw-review-workspace.tsx +323 -280
  91. package/src/validation/compatibility-engine.ts +246 -2
  92. package/src/validation/docx-comment-proof.ts +24 -11
@@ -14,6 +14,22 @@ import type {
14
14
  } from "../../model/canonical-document.ts";
15
15
  import { resolveHighlightColor } from "./highlight-colors.ts";
16
16
  import { classifyFieldInstruction } from "./parse-fields.ts";
17
+ import {
18
+ readCellBorders,
19
+ readCellShading,
20
+ readCellVerticalAlign,
21
+ readCellWidth,
22
+ readGridColumns as readSharedGridColumns,
23
+ readRowHeight,
24
+ readRowHeightRule,
25
+ readRowIsHeader,
26
+ readTableAlignment,
27
+ readTableBorders,
28
+ readTableCellMargins,
29
+ readTableLook,
30
+ readTableStyleId,
31
+ readTableWidth,
32
+ } from "./parse-tables.ts";
17
33
  import { parseShapeXml, parseVmlXml } from "./parse-shapes.ts";
18
34
 
19
35
  // ---- Public types ----
@@ -906,6 +922,11 @@ function parseSimpleTableElement(tblElement: XmlElementNode): TableNode {
906
922
  const rows: TableRowNode[] = [];
907
923
  let propertiesXml: string | undefined;
908
924
  let styleId: string | undefined;
925
+ let width: TableNode["width"];
926
+ let alignment: TableNode["alignment"];
927
+ let borders: TableNode["borders"];
928
+ let cellMargins: TableNode["cellMargins"];
929
+ let tblLook: TableNode["tblLook"];
909
930
 
910
931
  for (const child of tblElement.children) {
911
932
  if (child.type !== "element") continue;
@@ -913,8 +934,12 @@ function parseSimpleTableElement(tblElement: XmlElementNode): TableNode {
913
934
 
914
935
  if (name === "tblPr") {
915
936
  propertiesXml = serializeElementToXml(child);
916
- const pStyle = findChildElementOptional(child, "tblStyle");
917
- styleId = pStyle?.attributes["w:val"] ?? pStyle?.attributes.val;
937
+ styleId = readTableStyleId(child);
938
+ width = readTableWidth(child);
939
+ alignment = readTableAlignment(child);
940
+ borders = readTableBorders(child);
941
+ cellMargins = readTableCellMargins(child);
942
+ tblLook = readTableLook(child);
918
943
  } else if (name === "tblGrid") {
919
944
  gridColumns = readGridColumns(child);
920
945
  } else if (name === "tr") {
@@ -928,24 +953,24 @@ function parseSimpleTableElement(tblElement: XmlElementNode): TableNode {
928
953
  ...(propertiesXml ? { propertiesXml } : {}),
929
954
  gridColumns,
930
955
  rows,
956
+ ...(width ? { width } : {}),
957
+ ...(alignment ? { alignment } : {}),
958
+ ...(borders ? { borders } : {}),
959
+ ...(cellMargins ? { cellMargins } : {}),
960
+ ...(tblLook ? { tblLook } : {}),
931
961
  };
932
962
  }
933
963
 
934
964
  function readGridColumns(tblGrid: XmlElementNode): number[] {
935
- const columns: number[] = [];
936
- for (const child of tblGrid.children) {
937
- if (child.type !== "element") continue;
938
- if (localName(child.name) === "gridCol") {
939
- const w = child.attributes["w:w"] ?? child.attributes.w ?? "0";
940
- columns.push(Number.parseInt(w, 10) || 0);
941
- }
942
- }
943
- return columns;
965
+ return readSharedGridColumns(tblGrid);
944
966
  }
945
967
 
946
968
  function parseSimpleTableRow(trElement: XmlElementNode): TableRowNode {
947
969
  const cells: TableCellNode[] = [];
948
970
  let propertiesXml: string | undefined;
971
+ let height: TableRowNode["height"];
972
+ let heightRule: TableRowNode["heightRule"];
973
+ let isHeader: TableRowNode["isHeader"];
949
974
 
950
975
  for (const child of trElement.children) {
951
976
  if (child.type !== "element") continue;
@@ -953,6 +978,9 @@ function parseSimpleTableRow(trElement: XmlElementNode): TableRowNode {
953
978
 
954
979
  if (name === "trPr") {
955
980
  propertiesXml = serializeElementToXml(child);
981
+ height = readRowHeight(child);
982
+ heightRule = readRowHeightRule(child);
983
+ isHeader = readRowIsHeader(child);
956
984
  } else if (name === "tc") {
957
985
  cells.push(parseSimpleTableCell(child));
958
986
  }
@@ -961,6 +989,9 @@ function parseSimpleTableRow(trElement: XmlElementNode): TableRowNode {
961
989
  return {
962
990
  type: "table_row",
963
991
  ...(propertiesXml ? { propertiesXml } : {}),
992
+ ...(height !== undefined ? { height } : {}),
993
+ ...(heightRule ? { heightRule } : {}),
994
+ ...(isHeader !== undefined ? { isHeader } : {}),
964
995
  cells,
965
996
  };
966
997
  }
@@ -970,6 +1001,10 @@ function parseSimpleTableCell(tcElement: XmlElementNode): TableCellNode {
970
1001
  let propertiesXml: string | undefined;
971
1002
  let gridSpan: number | undefined;
972
1003
  let verticalMerge: "restart" | "continue" | undefined;
1004
+ let width: TableCellNode["width"];
1005
+ let borders: TableCellNode["borders"];
1006
+ let shading: TableCellNode["shading"];
1007
+ let verticalAlign: TableCellNode["verticalAlign"];
973
1008
 
974
1009
  for (const child of tcElement.children) {
975
1010
  if (child.type !== "element") continue;
@@ -986,6 +1021,10 @@ function parseSimpleTableCell(tcElement: XmlElementNode): TableCellNode {
986
1021
  const vmVal = vmEl.attributes["w:val"] ?? vmEl.attributes.val ?? "continue";
987
1022
  verticalMerge = vmVal === "restart" ? "restart" : "continue";
988
1023
  }
1024
+ width = readCellWidth(child);
1025
+ borders = readCellBorders(child);
1026
+ shading = readCellShading(child);
1027
+ verticalAlign = readCellVerticalAlign(child);
989
1028
  } else if (name === "p") {
990
1029
  children.push(parseParagraphElement(child));
991
1030
  }
@@ -996,6 +1035,10 @@ function parseSimpleTableCell(tcElement: XmlElementNode): TableCellNode {
996
1035
  ...(propertiesXml ? { propertiesXml } : {}),
997
1036
  ...(gridSpan ? { gridSpan } : {}),
998
1037
  ...(verticalMerge ? { verticalMerge } : {}),
1038
+ ...(width ? { width } : {}),
1039
+ ...(borders ? { borders } : {}),
1040
+ ...(shading ? { shading } : {}),
1041
+ ...(verticalAlign ? { verticalAlign } : {}),
999
1042
  children: children.length > 0 ? children : [{ type: "paragraph", children: [] }],
1000
1043
  };
1001
1044
  }
@@ -1,11 +1,15 @@
1
1
  import type {
2
2
  BorderSpec,
3
+ CellShading,
3
4
  TextMark,
4
5
  ParagraphBorders,
5
6
  ParagraphShading,
6
7
  ParagraphSpacing,
7
8
  ParagraphIndentation,
8
9
  TabStop,
10
+ TableBorders,
11
+ TableCellBorders,
12
+ TableCellMargins,
9
13
  TableLook,
10
14
  TableWidth,
11
15
  SectionProperties,
@@ -29,6 +33,22 @@ import { parseComplexContentXml } from "./parse-complex-content.ts";
29
33
  import { parseShapeXml, parseVmlXml } from "./parse-shapes.ts";
30
34
  import { classifyFieldInstruction } from "./parse-fields.ts";
31
35
  import { resolveHighlightColor } from "./highlight-colors.ts";
36
+ import {
37
+ readCellBorders as readSharedCellBorders,
38
+ readCellShading as readSharedCellShading,
39
+ readCellVerticalAlign as readSharedCellVerticalAlign,
40
+ readCellWidth as readSharedCellWidth,
41
+ readGridColumns as readSharedGridColumns,
42
+ readRowHeight as readSharedRowHeight,
43
+ readRowHeightRule as readSharedRowHeightRule,
44
+ readRowIsHeader as readSharedRowIsHeader,
45
+ readTableAlignment as readSharedTableAlignment,
46
+ readTableBorders as readSharedTableBorders,
47
+ readTableCellMargins as readSharedTableCellMargins,
48
+ readTableLook as readSharedTableLook,
49
+ readTableStyleId as readSharedTableStyleId,
50
+ readTableWidth as readSharedTableWidth,
51
+ } from "./parse-tables.ts";
32
52
 
33
53
  export interface ParsedMainDocument {
34
54
  blocks: ParsedBlockNode[];
@@ -303,6 +323,10 @@ export interface ParsedTableBlockNode {
303
323
  propertiesXml?: string;
304
324
  gridColumns: number[];
305
325
  rows: ParsedTableRowNode[];
326
+ width?: TableWidth;
327
+ alignment?: "left" | "center" | "right";
328
+ borders?: TableBorders;
329
+ cellMargins?: TableCellMargins;
306
330
  rawXml: string;
307
331
  }
308
332
 
@@ -314,6 +338,9 @@ export interface ParsedTableRowNode {
314
338
  widthBefore?: TableWidth;
315
339
  gridAfter?: number;
316
340
  widthAfter?: TableWidth;
341
+ height?: number;
342
+ heightRule?: "auto" | "atLeast" | "exact";
343
+ isHeader?: boolean;
317
344
  rawXml: string;
318
345
  }
319
346
 
@@ -323,6 +350,10 @@ export interface ParsedTableCellNode {
323
350
  gridSpan?: number;
324
351
  verticalMerge?: "restart" | "continue";
325
352
  children: ParsedBlockNode[];
353
+ width?: TableWidth;
354
+ borders?: TableCellBorders;
355
+ shading?: CellShading;
356
+ verticalAlign?: "top" | "center" | "bottom";
326
357
  rawXml: string;
327
358
  }
328
359
 
@@ -805,6 +836,10 @@ function parseTableElement(
805
836
  let tblLook: TableLook | undefined;
806
837
  let propertiesXml: string | undefined;
807
838
  let gridColumns: number[] = [];
839
+ let width: TableWidth | undefined;
840
+ let alignment: ParsedTableBlockNode["alignment"];
841
+ let borders: TableBorders | undefined;
842
+ let cellMargins: TableCellMargins | undefined;
808
843
  const rows: ParsedTableRowNode[] = [];
809
844
 
810
845
  for (const child of node.children) {
@@ -815,6 +850,10 @@ function parseTableElement(
815
850
  propertiesXml = sourceXml.slice(child.start, child.end);
816
851
  styleId = readTableStyleId(child);
817
852
  tblLook = readTableLook(child);
853
+ width = readTableWidth(child);
854
+ alignment = readTableAlignment(child);
855
+ borders = readTableBorders(child);
856
+ cellMargins = readTableCellMargins(child);
818
857
  break;
819
858
  }
820
859
  case "tblGrid": {
@@ -835,6 +874,10 @@ function parseTableElement(
835
874
  ...(propertiesXml ? { propertiesXml } : {}),
836
875
  gridColumns,
837
876
  rows,
877
+ ...(width ? { width } : {}),
878
+ ...(alignment ? { alignment } : {}),
879
+ ...(borders ? { borders } : {}),
880
+ ...(cellMargins ? { cellMargins } : {}),
838
881
  rawXml: sourceXml.slice(node.start, node.end),
839
882
  };
840
883
  }
@@ -852,6 +895,9 @@ function parseTableRowElement(
852
895
  let widthBefore: TableWidth | undefined;
853
896
  let gridAfter: number | undefined;
854
897
  let widthAfter: TableWidth | undefined;
898
+ let height: number | undefined;
899
+ let heightRule: ParsedTableRowNode["heightRule"];
900
+ let isHeader: boolean | undefined;
855
901
  const cells: ParsedTableCellNode[] = [];
856
902
 
857
903
  for (const child of node.children) {
@@ -864,6 +910,9 @@ function parseTableRowElement(
864
910
  widthBefore = readTableRowWidth(child, "wBefore");
865
911
  gridAfter = readTableRowGridPosition(child, "gridAfter");
866
912
  widthAfter = readTableRowWidth(child, "wAfter");
913
+ height = readRowHeight(child);
914
+ heightRule = readRowHeightRule(child);
915
+ isHeader = readRowIsHeader(child);
867
916
  break;
868
917
  case "tc":
869
918
  cells.push(parseTableCellElement(child, sourceXml, relationshipMap, relationships, mediaParts, sourcePartPath));
@@ -878,6 +927,9 @@ function parseTableRowElement(
878
927
  ...(widthBefore ? { widthBefore } : {}),
879
928
  ...(gridAfter !== undefined ? { gridAfter } : {}),
880
929
  ...(widthAfter ? { widthAfter } : {}),
930
+ ...(height !== undefined ? { height } : {}),
931
+ ...(heightRule ? { heightRule } : {}),
932
+ ...(isHeader !== undefined ? { isHeader } : {}),
881
933
  cells,
882
934
  rawXml: sourceXml.slice(node.start, node.end),
883
935
  };
@@ -894,6 +946,10 @@ function parseTableCellElement(
894
946
  let propertiesXml: string | undefined;
895
947
  let gridSpan: number | undefined;
896
948
  let verticalMerge: "restart" | "continue" | undefined;
949
+ let width: TableWidth | undefined;
950
+ let borders: TableCellBorders | undefined;
951
+ let shading: CellShading | undefined;
952
+ let verticalAlign: ParsedTableCellNode["verticalAlign"];
897
953
  const children: ParsedBlockNode[] = [];
898
954
 
899
955
  for (const child of node.children) {
@@ -904,6 +960,10 @@ function parseTableCellElement(
904
960
  propertiesXml = sourceXml.slice(child.start, child.end);
905
961
  gridSpan = readCellGridSpan(child);
906
962
  verticalMerge = readCellVerticalMerge(child);
963
+ width = readCellWidth(child);
964
+ borders = readCellBorders(child);
965
+ shading = readCellShading(child);
966
+ verticalAlign = readCellVerticalAlign(child);
907
967
  break;
908
968
  }
909
969
  default: {
@@ -920,6 +980,10 @@ function parseTableCellElement(
920
980
  ...(gridSpan ? { gridSpan } : {}),
921
981
  ...(verticalMerge ? { verticalMerge } : {}),
922
982
  children,
983
+ ...(width ? { width } : {}),
984
+ ...(borders ? { borders } : {}),
985
+ ...(shading ? { shading } : {}),
986
+ ...(verticalAlign ? { verticalAlign } : {}),
923
987
  rawXml: sourceXml.slice(node.start, node.end),
924
988
  };
925
989
  }
@@ -1138,53 +1202,59 @@ function findFirstDescendant(node: XmlElementNode, local: string): XmlElementNod
1138
1202
  }
1139
1203
 
1140
1204
  function readTableStyleId(node: XmlElementNode): string | undefined {
1141
- for (const child of node.children) {
1142
- if (child.type !== "element" || localName(child.name) !== "tblStyle") continue;
1143
- const styleId = child.attributes["w:val"] ?? child.attributes.val;
1144
- if (styleId) return styleId;
1145
- }
1146
- return undefined;
1205
+ return readSharedTableStyleId(node);
1147
1206
  }
1148
1207
 
1149
1208
  function readTableLook(node: XmlElementNode): TableLook | undefined {
1150
- const tblLookNode = node.children.find(
1151
- (child): child is XmlElementNode => child.type === "element" && localName(child.name) === "tblLook",
1152
- );
1153
- if (!tblLookNode) {
1154
- return undefined;
1155
- }
1209
+ return readSharedTableLook(node);
1210
+ }
1156
1211
 
1157
- const tableLook: TableLook = {};
1158
- const val = tblLookNode.attributes["w:val"] ?? tblLookNode.attributes.val;
1159
- if (val) {
1160
- tableLook.val = val;
1161
- }
1162
- for (const [attribute, key] of [
1163
- ["w:firstRow", "firstRow"],
1164
- ["w:lastRow", "lastRow"],
1165
- ["w:firstColumn", "firstColumn"],
1166
- ["w:lastColumn", "lastColumn"],
1167
- ["w:noHBand", "noHBand"],
1168
- ["w:noVBand", "noVBand"],
1169
- ] as const) {
1170
- const fallback = attribute.replace("w:", "");
1171
- const raw = tblLookNode.attributes[attribute] ?? tblLookNode.attributes[fallback];
1172
- if (raw !== undefined) {
1173
- tableLook[key] = raw !== "0" && raw !== "false" && raw !== "off";
1174
- }
1175
- }
1212
+ function readTableGridColumns(node: XmlElementNode): number[] {
1213
+ return readSharedGridColumns(node);
1214
+ }
1176
1215
 
1177
- return Object.keys(tableLook).length > 0 ? tableLook : undefined;
1216
+ function readTableWidth(node: XmlElementNode): TableWidth | undefined {
1217
+ return readSharedTableWidth(node);
1178
1218
  }
1179
1219
 
1180
- function readTableGridColumns(node: XmlElementNode): number[] {
1181
- return node.children
1182
- .filter((child): child is XmlElementNode => child.type === "element" && localName(child.name) === "gridCol")
1183
- .map((child) => {
1184
- const raw = child.attributes["w:w"] ?? child.attributes.w ?? "0";
1185
- const value = Number.parseInt(raw, 10);
1186
- return Number.isFinite(value) && value > 0 ? value : 0;
1187
- });
1220
+ function readTableAlignment(node: XmlElementNode): ParsedTableBlockNode["alignment"] {
1221
+ return readSharedTableAlignment(node);
1222
+ }
1223
+
1224
+ function readTableBorders(node: XmlElementNode): TableBorders | undefined {
1225
+ return readSharedTableBorders(node);
1226
+ }
1227
+
1228
+ function readTableCellMargins(node: XmlElementNode): TableCellMargins | undefined {
1229
+ return readSharedTableCellMargins(node);
1230
+ }
1231
+
1232
+ function readRowHeight(node: XmlElementNode): number | undefined {
1233
+ return readSharedRowHeight(node);
1234
+ }
1235
+
1236
+ function readRowHeightRule(node: XmlElementNode): ParsedTableRowNode["heightRule"] {
1237
+ return readSharedRowHeightRule(node);
1238
+ }
1239
+
1240
+ function readRowIsHeader(node: XmlElementNode): boolean | undefined {
1241
+ return readSharedRowIsHeader(node);
1242
+ }
1243
+
1244
+ function readCellWidth(node: XmlElementNode): TableWidth | undefined {
1245
+ return readSharedCellWidth(node);
1246
+ }
1247
+
1248
+ function readCellBorders(node: XmlElementNode): TableCellBorders | undefined {
1249
+ return readSharedCellBorders(node);
1250
+ }
1251
+
1252
+ function readCellShading(node: XmlElementNode): CellShading | undefined {
1253
+ return readSharedCellShading(node);
1254
+ }
1255
+
1256
+ function readCellVerticalAlign(node: XmlElementNode): ParsedTableCellNode["verticalAlign"] {
1257
+ return readSharedCellVerticalAlign(node);
1188
1258
  }
1189
1259
 
1190
1260
  /**
@@ -1827,7 +1897,7 @@ function parseRevisionContainer(
1827
1897
  relationshipMap: Map<string, OpcRelationship>,
1828
1898
  ): ParsedInlineNode[] {
1829
1899
  const result: ParsedInlineNode[] = [];
1830
- const allowsDeletedText = localName(node.name) === "del";
1900
+ const allowsDeletedText = false;
1831
1901
 
1832
1902
  for (const child of node.children) {
1833
1903
  if (child.type !== "element") {
@@ -2006,7 +2076,7 @@ function parseRunContentOnly(
2006
2076
  case "delText":
2007
2077
  case "delInstrText":
2008
2078
  if (!options.allowDeletedText) {
2009
- return { nodes: [], supported: false };
2079
+ break;
2010
2080
  }
2011
2081
  nodes.push({
2012
2082
  type: "text",