@beyondwork/docx-react-component 1.0.5 → 1.0.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@beyondwork/docx-react-component",
3
3
  "publisher": "beyondwork",
4
- "version": "1.0.5",
4
+ "version": "1.0.6",
5
5
  "description": "Embeddable React Word (docx) editor with review, comments, tracked changes, and round-trip OOXML fidelity.",
6
6
  "type": "module",
7
7
  "files": [
@@ -384,6 +384,7 @@ export type WordReviewEditorEvent =
384
384
  source: "docx" | "snapshot" | "datastore" | "canonical";
385
385
  stats: DocumentStats;
386
386
  compatibility: CompatibilityReport;
387
+ comments: CommentSidebarSnapshot;
387
388
  }
388
389
  | {
389
390
  type: "dirty_changed";
@@ -504,6 +505,7 @@ export interface WordReviewEditorRef {
504
505
  getSnapshot(): PersistedEditorSnapshot;
505
506
  getCompatibilityReport(): CompatibilityReport;
506
507
  getWarnings(): EditorWarning[];
508
+ getComments(): CommentSidebarSnapshot;
507
509
  }
508
510
 
509
511
  export interface WordReviewEditorProps {
@@ -133,6 +133,7 @@ export function createDocumentRuntime(
133
133
  source: options.sourceKind ?? (options.initialSnapshot ? "snapshot" : "canonical"),
134
134
  stats: toPublicDocumentStats(state),
135
135
  compatibility: toPublicCompatibilityReport(createDerivedCompatibility(state)),
136
+ comments: cachedRenderSnapshot.comments,
136
137
  });
137
138
  if (options.fatalError) {
138
139
  emit({
@@ -112,6 +112,7 @@ export function __createWordReviewEditorRefBridge(
112
112
  getSnapshot: () => runtime.getPersistedSnapshot(),
113
113
  getCompatibilityReport: () => runtime.getCompatibilityReport(),
114
114
  getWarnings: () => runtime.getWarnings(),
115
+ getComments: () => runtime.getRenderSnapshot().comments,
115
116
  };
116
117
  }
117
118
 
@@ -496,6 +497,7 @@ export const WordReviewEditor = forwardRef<WordReviewEditorRef, WordReviewEditor
496
497
  getSnapshot: () => activeRuntime.getPersistedSnapshot(),
497
498
  getCompatibilityReport: () => activeRuntime.getCompatibilityReport(),
498
499
  getWarnings: () => activeRuntime.getWarnings(),
500
+ getComments: () => activeRuntime.getRenderSnapshot().comments,
499
501
  }),
500
502
  [activeRuntime, currentUser.userId, documentId, runtime],
501
503
  );
@@ -1289,6 +1291,7 @@ function createReadyEvent(
1289
1291
  source,
1290
1292
  stats: snapshot.documentStats,
1291
1293
  compatibility: runtime.getCompatibilityReport(),
1294
+ comments: snapshot.comments,
1292
1295
  };
1293
1296
  }
1294
1297