@beyondwork/docx-react-component 1.0.120 → 1.0.122

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 (116) hide show
  1. package/README.md +1 -0
  2. package/dist/api/public-types.cjs +1713 -55
  3. package/dist/api/public-types.d.cts +2 -2
  4. package/dist/api/public-types.d.ts +2 -2
  5. package/dist/api/public-types.js +6 -6
  6. package/dist/api/v3.cjs +4958 -406
  7. package/dist/api/v3.d.cts +3 -3
  8. package/dist/api/v3.d.ts +3 -3
  9. package/dist/api/v3.js +14 -14
  10. package/dist/{canonical-document-fNawStsc.d.cts → canonical-document-ByIqTd4s.d.cts} +9 -1
  11. package/dist/{canonical-document-fNawStsc.d.ts → canonical-document-ByIqTd4s.d.ts} +9 -1
  12. package/dist/{chunk-5RNMPLXU.js → chunk-37SEJQ3G.js} +4 -4
  13. package/dist/{chunk-FXGQM2JB.js → chunk-3OFSP2IX.js} +11 -5
  14. package/dist/{chunk-U5BSQXF4.js → chunk-3OHVK2D6.js} +70 -12
  15. package/dist/{chunk-AUQDC5BD.js → chunk-3TUQCHYT.js} +101 -2
  16. package/dist/{chunk-SJSMYEMU.js → chunk-B4YHWFE3.js} +3 -3
  17. package/dist/{chunk-XC56YLIS.js → chunk-C2LWJ4CZ.js} +4 -0
  18. package/dist/{chunk-VDIUVT46.js → chunk-CX42VC67.js} +1 -1
  19. package/dist/{chunk-KCHEAX4Z.js → chunk-EMDH4IQN.js} +148 -70
  20. package/dist/{chunk-TMQGWF7R.js → chunk-G3B2OBCZ.js} +352 -17
  21. package/dist/{chunk-VCL5MJMZ.js → chunk-GON2DNTE.js} +149 -28
  22. package/dist/{chunk-WVZX4NYG.js → chunk-GZW2ERUO.js} +601 -47
  23. package/dist/{chunk-WDNEPRFW.js → chunk-ICX54W4U.js} +1 -1
  24. package/dist/{chunk-FIGWJ43K.js → chunk-IT2DK3A7.js} +1883 -90
  25. package/dist/{chunk-2ZWFQ74R.js → chunk-OBCP6VTG.js} +1 -1
  26. package/dist/{chunk-FLNQY74K.js → chunk-OYGMRRR7.js} +1 -1
  27. package/dist/{chunk-MPYYBRVN.js → chunk-PCXTMEGY.js} +782 -124
  28. package/dist/{chunk-4JNUMMM7.js → chunk-PGGPPZ65.js} +17 -2
  29. package/dist/{chunk-KHZNNBTN.js → chunk-QFU7ZOAD.js} +43 -39
  30. package/dist/{chunk-4ZNQFWFM.js → chunk-QIO6V46H.js} +84 -4
  31. package/dist/{chunk-IQ2VJEF6.js → chunk-QNGJRZ2D.js} +1 -1
  32. package/dist/{chunk-BM5NSDII.js → chunk-S4ANOS2M.js} +2 -2
  33. package/dist/{chunk-AQA7OZ2R.js → chunk-TFSXOIAI.js} +959 -43
  34. package/dist/{chunk-NQZUGMLW.js → chunk-TMU7JMXX.js} +184 -32
  35. package/dist/{chunk-KD5K5XIA.js → chunk-UHQOUTAX.js} +568 -88
  36. package/dist/{chunk-327AIUXL.js → chunk-UWDWGQH5.js} +11 -4
  37. package/dist/{chunk-BBB4GSDB.js → chunk-XVFENXLK.js} +2 -2
  38. package/dist/{chunk-MUEN2WOG.js → chunk-ZKSDVHGH.js} +6 -3
  39. package/dist/compare.cjs +17 -2
  40. package/dist/compare.d.cts +1 -1
  41. package/dist/compare.d.ts +1 -1
  42. package/dist/compare.js +3 -3
  43. package/dist/core/commands/formatting-commands.d.cts +2 -2
  44. package/dist/core/commands/formatting-commands.d.ts +2 -2
  45. package/dist/core/commands/image-commands.cjs +814 -45
  46. package/dist/core/commands/image-commands.d.cts +2 -2
  47. package/dist/core/commands/image-commands.d.ts +2 -2
  48. package/dist/core/commands/image-commands.js +8 -8
  49. package/dist/core/commands/section-layout-commands.d.cts +2 -2
  50. package/dist/core/commands/section-layout-commands.d.ts +2 -2
  51. package/dist/core/commands/style-commands.d.cts +2 -2
  52. package/dist/core/commands/style-commands.d.ts +2 -2
  53. package/dist/core/commands/table-structure-commands.cjs +750 -42
  54. package/dist/core/commands/table-structure-commands.d.cts +2 -2
  55. package/dist/core/commands/table-structure-commands.d.ts +2 -2
  56. package/dist/core/commands/table-structure-commands.js +6 -6
  57. package/dist/core/commands/text-commands.cjs +910 -57
  58. package/dist/core/commands/text-commands.d.cts +2 -2
  59. package/dist/core/commands/text-commands.d.ts +2 -2
  60. package/dist/core/commands/text-commands.js +8 -8
  61. package/dist/core/selection/mapping.d.cts +2 -2
  62. package/dist/core/selection/mapping.d.ts +2 -2
  63. package/dist/core/state/editor-state.cjs +17 -2
  64. package/dist/core/state/editor-state.d.cts +2 -2
  65. package/dist/core/state/editor-state.d.ts +2 -2
  66. package/dist/core/state/editor-state.js +2 -2
  67. package/dist/index.cjs +6203 -625
  68. package/dist/index.d.cts +5 -5
  69. package/dist/index.d.ts +5 -5
  70. package/dist/index.js +299 -67
  71. package/dist/io/docx-session.cjs +354 -102
  72. package/dist/io/docx-session.d.cts +4 -4
  73. package/dist/io/docx-session.d.ts +4 -4
  74. package/dist/io/docx-session.js +5 -5
  75. package/dist/legal.cjs +183 -31
  76. package/dist/legal.d.cts +1 -1
  77. package/dist/legal.d.ts +1 -1
  78. package/dist/legal.js +3 -3
  79. package/dist/{loader-CaohrhNl.d.ts → loader-BF8ju_LK.d.ts} +22 -4
  80. package/dist/{loader-BpCyGnZl.d.cts → loader-g54WRvj1.d.cts} +22 -4
  81. package/dist/{public-types-Dpch9JG0.d.cts → public-types-D_y4Ptcj.d.cts} +747 -21
  82. package/dist/{public-types-C948HNVF.d.ts → public-types-Dl1jiWjk.d.ts} +747 -21
  83. package/dist/public-types.cjs +1713 -55
  84. package/dist/public-types.d.cts +2 -2
  85. package/dist/public-types.d.ts +2 -2
  86. package/dist/public-types.js +6 -6
  87. package/dist/runtime/collab.cjs +4 -0
  88. package/dist/runtime/collab.d.cts +3 -3
  89. package/dist/runtime/collab.d.ts +3 -3
  90. package/dist/runtime/collab.js +2 -2
  91. package/dist/runtime/document-runtime.cjs +3699 -507
  92. package/dist/runtime/document-runtime.d.cts +2 -2
  93. package/dist/runtime/document-runtime.d.ts +2 -2
  94. package/dist/runtime/document-runtime.js +18 -18
  95. package/dist/{session-Dqg17V3s.d.ts → session-C1EPAkcI.d.ts} +3 -3
  96. package/dist/{session-BlXE5zxz.d.cts → session-D15QOO0Q.d.cts} +3 -3
  97. package/dist/session.cjs +951 -104
  98. package/dist/session.d.cts +5 -5
  99. package/dist/session.d.ts +5 -5
  100. package/dist/session.js +10 -8
  101. package/dist/tailwind.cjs +1752 -91
  102. package/dist/tailwind.d.cts +2 -2
  103. package/dist/tailwind.d.ts +2 -2
  104. package/dist/tailwind.js +10 -10
  105. package/dist/{types-C9vZVpKy.d.cts → types-BoSRp2Vg.d.cts} +2 -2
  106. package/dist/{types-B1tlF1bq.d.ts → types-DEvRwq9C.d.ts} +2 -2
  107. package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +3 -3
  108. package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +3 -3
  109. package/dist/ui-tailwind/editor-surface/search-plugin.js +7 -7
  110. package/dist/ui-tailwind/theme/editor-theme.css +5 -5
  111. package/dist/ui-tailwind.cjs +1752 -91
  112. package/dist/ui-tailwind.d.cts +8 -8
  113. package/dist/ui-tailwind.d.ts +8 -8
  114. package/dist/ui-tailwind.js +10 -10
  115. package/package.json +17 -5
  116. package/dist/ui-tailwind/theme/tokens.css +0 -382
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  classifyFieldInstruction
3
- } from "./chunk-NQZUGMLW.js";
3
+ } from "./chunk-TMU7JMXX.js";
4
4
  import {
5
5
  describeOpaqueFragment,
6
6
  describeStructuredWrapperBlock,
@@ -11,7 +11,7 @@ import {
11
11
  assertPersistedEditorSnapshot,
12
12
  createPublicRangeAnchor,
13
13
  validatePersistedEditorSnapshot
14
- } from "./chunk-4JNUMMM7.js";
14
+ } from "./chunk-PGGPPZ65.js";
15
15
  import {
16
16
  createRangeAnchor,
17
17
  mapAnchor,
@@ -1295,6 +1295,7 @@ function normalizeTable(table, state, packagePartName) {
1295
1295
  state.cursor += 1;
1296
1296
  return {
1297
1297
  type: "table",
1298
+ ...table.sourceRef ? { sourceRef: table.sourceRef } : {},
1298
1299
  ...table.styleId ? { styleId: table.styleId } : {},
1299
1300
  ...table.propertiesXml ? { propertiesXml: table.propertiesXml } : {},
1300
1301
  ...table.unknownPropertyChildren ? { unknownPropertyChildren: table.unknownPropertyChildren } : {},
@@ -1318,6 +1319,7 @@ function normalizeTableRow(row, state, packagePartName) {
1318
1319
  const cells = row.cells.map((cell) => normalizeTableCell(cell, state, packagePartName));
1319
1320
  return {
1320
1321
  type: "table_row",
1322
+ ...row.sourceRef ? { sourceRef: row.sourceRef } : {},
1321
1323
  ...row.propertiesXml ? { propertiesXml: row.propertiesXml } : {},
1322
1324
  ...row.unknownPropertyChildren ? { unknownPropertyChildren: row.unknownPropertyChildren } : {},
1323
1325
  ...row.gridBefore !== void 0 ? { gridBefore: row.gridBefore } : {},
@@ -1343,6 +1345,7 @@ function normalizeTableCell(cell, state, packagePartName) {
1343
1345
  }
1344
1346
  return {
1345
1347
  type: "table_cell",
1348
+ ...cell.sourceRef ? { sourceRef: cell.sourceRef } : {},
1346
1349
  ...cell.propertiesXml ? { propertiesXml: cell.propertiesXml } : {},
1347
1350
  ...cell.unknownPropertyChildren ? { unknownPropertyChildren: cell.unknownPropertyChildren } : {},
1348
1351
  ...cell.gridSpan ? { gridSpan: cell.gridSpan } : {},
@@ -1511,6 +1514,7 @@ function normalizeInlineChildren(nodes, state, packagePartName) {
1511
1514
  case "ole_embed":
1512
1515
  normalized.push({
1513
1516
  type: "ole_embed",
1517
+ ...node.sourceRef ? { sourceRef: node.sourceRef } : {},
1514
1518
  id: node.id,
1515
1519
  ...node.progId ? { progId: node.progId } : {},
1516
1520
  embedType: node.embedType,
@@ -1524,13 +1528,15 @@ function normalizeInlineChildren(nodes, state, packagePartName) {
1524
1528
  normalized.push({
1525
1529
  type: "bookmark_start",
1526
1530
  bookmarkId: node.bookmarkId,
1527
- name: node.name
1531
+ name: node.name,
1532
+ ...node.sourceRef ? { sourceRef: node.sourceRef } : {}
1528
1533
  });
1529
1534
  break;
1530
1535
  case "bookmark_end":
1531
1536
  normalized.push({
1532
1537
  type: "bookmark_end",
1533
- bookmarkId: node.bookmarkId
1538
+ bookmarkId: node.bookmarkId,
1539
+ ...node.sourceRef ? { sourceRef: node.sourceRef } : {}
1534
1540
  });
1535
1541
  break;
1536
1542
  case "scope_marker_start":
@@ -1603,6 +1609,7 @@ function normalizeImageNode(node, state) {
1603
1609
  return {
1604
1610
  type: "image",
1605
1611
  mediaId: node.mediaId,
1612
+ ...node.sourceRef ? { sourceRef: node.sourceRef } : {},
1606
1613
  ...node.altText ? { altText: node.altText } : {},
1607
1614
  ...node.placementXml ? { placementXml: node.placementXml } : {},
1608
1615
  ...node.display ? { display: node.display } : {},
@@ -3,12 +3,12 @@ import {
3
3
  createNoopStructuralMutation,
4
4
  findTableCellParagraphSelection,
5
5
  findTopLevelParagraphSelectionNearBlock
6
- } from "./chunk-MUEN2WOG.js";
6
+ } from "./chunk-ZKSDVHGH.js";
7
7
  import {
8
8
  collectEditableTargetRefs,
9
9
  collectStoryBlockContexts,
10
10
  createHeaderFooterStoryKey
11
- } from "./chunk-AQA7OZ2R.js";
11
+ } from "./chunk-TFSXOIAI.js";
12
12
  import {
13
13
  createDetachedAnchor,
14
14
  createNodeAnchor,
@@ -1,9 +1,10 @@
1
1
  import {
2
+ NO_EDITABLE_TARGETS_INDEX,
2
3
  createEditorSurfaceSnapshot
3
- } from "./chunk-AUQDC5BD.js";
4
+ } from "./chunk-3TUQCHYT.js";
4
5
  import {
5
6
  createSelectionSnapshot
6
- } from "./chunk-FLNQY74K.js";
7
+ } from "./chunk-OYGMRRR7.js";
7
8
 
8
9
  // src/core/commands/structural-helpers.ts
9
10
  var DEFAULT_TABLE_COLUMN_WIDTH = 2400;
@@ -19,7 +20,9 @@ function resolveParagraphScope(document, selection) {
19
20
  if (!root) {
20
21
  return null;
21
22
  }
22
- const surface = createEditorSurfaceSnapshot(document, selection);
23
+ const surface = createEditorSurfaceSnapshot(document, selection, void 0, {
24
+ editableTargetsByBlockPath: NO_EDITABLE_TARGETS_INDEX
25
+ });
23
26
  const selectionFrom = Math.min(selection.anchor, selection.head);
24
27
  const selectionTo = Math.max(selection.anchor, selection.head);
25
28
  for (let blockIndex = 0; blockIndex < root.children.length; blockIndex += 1) {
package/dist/compare.cjs CHANGED
@@ -575,6 +575,9 @@ function validateDocumentNode(value, path, issues, context = "root") {
575
575
  }
576
576
  return;
577
577
  case "table_row":
578
+ if (record.sourceRef !== void 0) {
579
+ validateCanonicalSourceRef(record.sourceRef, `${path}.sourceRef`, issues);
580
+ }
578
581
  if (!Array.isArray(record.cells)) {
579
582
  issues.push({ path: `${path}.cells`, message: "cells must be an array." });
580
583
  } else {
@@ -584,6 +587,9 @@ function validateDocumentNode(value, path, issues, context = "root") {
584
587
  }
585
588
  return;
586
589
  case "table_cell":
590
+ if (record.sourceRef !== void 0) {
591
+ validateCanonicalSourceRef(record.sourceRef, `${path}.sourceRef`, issues);
592
+ }
587
593
  if (!Array.isArray(record.children)) {
588
594
  issues.push({ path: `${path}.children`, message: "children must be an array." });
589
595
  } else {
@@ -614,9 +620,15 @@ function validateDocumentNode(value, path, issues, context = "root") {
614
620
  case "bookmark_start":
615
621
  expectString(record.bookmarkId, `${path}.bookmarkId`, issues);
616
622
  expectString(record.name, `${path}.name`, issues);
623
+ if (record.sourceRef !== void 0) {
624
+ validateCanonicalSourceRef(record.sourceRef, `${path}.sourceRef`, issues);
625
+ }
617
626
  return;
618
627
  case "bookmark_end":
619
628
  expectString(record.bookmarkId, `${path}.bookmarkId`, issues);
629
+ if (record.sourceRef !== void 0) {
630
+ validateCanonicalSourceRef(record.sourceRef, `${path}.sourceRef`, issues);
631
+ }
620
632
  return;
621
633
  case "scope_marker_start":
622
634
  case "scope_marker_end":
@@ -717,6 +729,9 @@ function validateDocumentNode(value, path, issues, context = "root") {
717
729
  return;
718
730
  }
719
731
  case "ole_embed":
732
+ if (record.sourceRef !== void 0) {
733
+ validateCanonicalSourceRef(record.sourceRef, `${path}.sourceRef`, issues);
734
+ }
720
735
  expectString(record.id, `${path}.id`, issues);
721
736
  expectString(record.relationshipId, `${path}.relationshipId`, issues);
722
737
  expectString(record.rawXml, `${path}.rawXml`, issues);
@@ -845,12 +860,12 @@ function validateCanonicalSourceRef(value, path, issues) {
845
860
  return;
846
861
  }
847
862
  expectString(record.sourceId, `${path}.sourceId`, issues);
848
- for (const key of ["partPath", "storyKind", "element"]) {
863
+ for (const key of ["partPath", "storyKind", "element", "xmlPath", "tableCellPath"]) {
849
864
  if (record[key] !== void 0) {
850
865
  expectString(record[key], `${path}.${key}`, issues);
851
866
  }
852
867
  }
853
- for (const key of ["ordinal", "startOffset", "endOffset"]) {
868
+ for (const key of ["ordinal", "startOffset", "endOffset", "tableDepth"]) {
854
869
  if (record[key] !== void 0 && (!Number.isInteger(record[key]) || record[key] < 0)) {
855
870
  issues.push({
856
871
  path: `${path}.${key}`,
@@ -1,4 +1,4 @@
1
- import { C as CanonicalDocument, B as BlockNode } from './canonical-document-fNawStsc.cjs';
1
+ import { C as CanonicalDocument, B as BlockNode } from './canonical-document-ByIqTd4s.cjs';
2
2
 
3
3
  type OpcCompressionMethod = "store" | "deflate";
4
4
  type OpcSurfaceKind = "content" | "relationships" | "content-types";
package/dist/compare.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as CanonicalDocument, B as BlockNode } from './canonical-document-fNawStsc.js';
1
+ import { C as CanonicalDocument, B as BlockNode } from './canonical-document-ByIqTd4s.js';
2
2
 
3
3
  type OpcCompressionMethod = "store" | "deflate";
4
4
  type OpcSurfaceKind = "content" | "relationships" | "content-types";
package/dist/compare.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCommentStoreFromRuntimeComments
3
- } from "./chunk-VDIUVT46.js";
4
- import "./chunk-FLNQY74K.js";
3
+ } from "./chunk-CX42VC67.js";
4
+ import "./chunk-OYGMRRR7.js";
5
5
  import {
6
6
  createCommentExportIdMap,
7
7
  createExportSession,
@@ -27,7 +27,7 @@ import "./chunk-UFVDIR2C.js";
27
27
  import {
28
28
  createCanonicalDocumentSignature,
29
29
  projectCanonicalDocument
30
- } from "./chunk-4JNUMMM7.js";
30
+ } from "./chunk-PGGPPZ65.js";
31
31
  import "./chunk-DNXYUIIS.js";
32
32
  import "./chunk-M2HUK3KF.js";
33
33
 
@@ -1,7 +1,7 @@
1
1
  import 'prosemirror-state';
2
2
  import 'prosemirror-model';
3
- export { g3 as Alignment, g4 as FormattingMutationResult, g5 as FormattingOperation, g6 as TextMarkClearTarget, g7 as TextMarkRangeOperation, g8 as applyFormattingOperationToDocument, g9 as applyIndentation, ga as applyTextMarkOperationToDocumentRange, gb as getFormattingStateFromRenderSnapshot, gc as isMarkActive, gd as makeSetAlignment, ge as makeSetFontFamily, gf as makeSetFontSize, gg as makeSetHighlight, gh as makeSetTextColor, gi as makeToggleAllCaps, gj as makeToggleBold, gk as makeToggleItalic, gl as makeToggleSmallCaps, gm as makeToggleStrikethrough, gn as makeToggleSubscript, go as makeToggleSuperscript, gp as makeToggleUnderline } from '../../public-types-Dpch9JG0.cjs';
4
- import '../../canonical-document-fNawStsc.cjs';
3
+ export { g4 as Alignment, g5 as FormattingMutationResult, g6 as FormattingOperation, g7 as TextMarkClearTarget, g8 as TextMarkRangeOperation, g9 as applyFormattingOperationToDocument, ga as applyIndentation, gb as applyTextMarkOperationToDocumentRange, gc as getFormattingStateFromRenderSnapshot, gd as isMarkActive, ge as makeSetAlignment, gf as makeSetFontFamily, gg as makeSetFontSize, gh as makeSetHighlight, gi as makeSetTextColor, gj as makeToggleAllCaps, gk as makeToggleBold, gl as makeToggleItalic, gm as makeToggleSmallCaps, gn as makeToggleStrikethrough, go as makeToggleSubscript, gp as makeToggleSuperscript, gq as makeToggleUnderline } from '../../public-types-D_y4Ptcj.cjs';
4
+ import '../../canonical-document-ByIqTd4s.cjs';
5
5
  import 'react';
6
6
  import 'yjs';
7
7
  import 'y-protocols/awareness';
@@ -1,7 +1,7 @@
1
1
  import 'prosemirror-state';
2
2
  import 'prosemirror-model';
3
- export { g3 as Alignment, g4 as FormattingMutationResult, g5 as FormattingOperation, g6 as TextMarkClearTarget, g7 as TextMarkRangeOperation, g8 as applyFormattingOperationToDocument, g9 as applyIndentation, ga as applyTextMarkOperationToDocumentRange, gb as getFormattingStateFromRenderSnapshot, gc as isMarkActive, gd as makeSetAlignment, ge as makeSetFontFamily, gf as makeSetFontSize, gg as makeSetHighlight, gh as makeSetTextColor, gi as makeToggleAllCaps, gj as makeToggleBold, gk as makeToggleItalic, gl as makeToggleSmallCaps, gm as makeToggleStrikethrough, gn as makeToggleSubscript, go as makeToggleSuperscript, gp as makeToggleUnderline } from '../../public-types-C948HNVF.js';
4
- import '../../canonical-document-fNawStsc.js';
3
+ export { g4 as Alignment, g5 as FormattingMutationResult, g6 as FormattingOperation, g7 as TextMarkClearTarget, g8 as TextMarkRangeOperation, g9 as applyFormattingOperationToDocument, ga as applyIndentation, gb as applyTextMarkOperationToDocumentRange, gc as getFormattingStateFromRenderSnapshot, gd as isMarkActive, ge as makeSetAlignment, gf as makeSetFontFamily, gg as makeSetFontSize, gh as makeSetHighlight, gi as makeSetTextColor, gj as makeToggleAllCaps, gk as makeToggleBold, gl as makeToggleItalic, gm as makeToggleSmallCaps, gn as makeToggleStrikethrough, go as makeToggleSubscript, gp as makeToggleSuperscript, gq as makeToggleUnderline } from '../../public-types-Dl1jiWjk.js';
4
+ import '../../canonical-document-ByIqTd4s.js';
5
5
  import 'react';
6
6
  import 'yjs';
7
7
  import 'y-protocols/awareness';