@univerjs/sheets-thread-comment 0.6.5 → 0.6.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.
@@ -42,13 +42,18 @@ export interface IFRangeCommentMixin {
42
42
  * @returns Whether the comment is added successfully.
43
43
  * @example
44
44
  * ```ts
45
- * const range = univerAPI.getActiveWorkbook()
46
- * .getActiveSheet()
47
- * .getActiveRange();
45
+ * // Create a new comment
46
+ * const richText = univerAPI.newRichText().insertText('hello univer');
47
+ * const commentBuilder = univerAPI.newTheadComment()
48
+ * .setContent(richText);
49
+ * console.log(commentBuilder.content.toPlainText());
48
50
  *
49
- * const comment = univerAPI.newTheadComment()
50
- * .setContent(univerAPI.newRichText().insertText('hello zhangsan'));
51
- * const success = await range.addCommentAsync(comment);
51
+ * // Add the comment to the cell A1
52
+ * const fWorkbook = univerAPI.getActiveWorkbook();
53
+ * const fWorksheet = fWorkbook.getActiveSheet();
54
+ * const cell = fWorksheet.getRange('A1');
55
+ * const result = await cell.addCommentAsync(commentBuilder);
56
+ * console.log(result);
52
57
  * ```
53
58
  */
54
59
  addCommentAsync(content: IDocumentBody | FTheadCommentBuilder): Promise<boolean>;
@@ -62,7 +67,7 @@ export interface IFRangeCommentMixin {
62
67
  */
63
68
  clearCommentAsync(): Promise<boolean>;
64
69
  /**
65
- * @deprecated use `clearComments` as instead.
70
+ * @deprecated use `clearCommentsAsync` as instead.
66
71
  */
67
72
  clearComments(): Promise<boolean>;
68
73
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/sheets-thread-comment",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "private": false,
5
5
  "description": "Univer sheets thread comment base plugin",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -51,17 +51,17 @@
51
51
  "rxjs": ">=7.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "@univerjs/core": "0.6.5",
55
- "@univerjs/thread-comment": "0.6.5",
56
- "@univerjs/sheets": "0.6.5",
57
- "@univerjs/engine-formula": "0.6.5"
54
+ "@univerjs/core": "0.6.6",
55
+ "@univerjs/engine-formula": "0.6.6",
56
+ "@univerjs/sheets": "0.6.6",
57
+ "@univerjs/thread-comment": "0.6.6"
58
58
  },
59
59
  "devDependencies": {
60
60
  "rxjs": "^7.8.1",
61
61
  "typescript": "^5.8.2",
62
62
  "vite": "^6.2.1",
63
63
  "vitest": "^3.0.8",
64
- "@univerjs-infra/shared": "0.6.5"
64
+ "@univerjs-infra/shared": "0.6.6"
65
65
  },
66
66
  "scripts": {
67
67
  "test": "vitest run",