@ones-editor/editor 2.8.24 → 2.8.25-beta.10

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 (42) hide show
  1. package/@ones-editor/comments/src/comments/comments.d.ts +4 -0
  2. package/@ones-editor/comments/src/comments-helper/active-comment.d.ts +3 -1
  3. package/@ones-editor/comments/src/comments-helper/get-comment-from-selection.d.ts +3 -0
  4. package/@ones-editor/comments/src/comments-helper/get-comments-from-doc.d.ts +5 -1
  5. package/@ones-editor/comments/src/comments-helper/old-version-comment.d.ts +2 -1
  6. package/@ones-editor/comments/src/comments-list/comments-list.d.ts +11 -1
  7. package/@ones-editor/comments/src/comments-list/group-item.d.ts +2 -0
  8. package/@ones-editor/comments/src/comments-list/group-list.d.ts +6 -2
  9. package/@ones-editor/comments/src/comments-list/handler.d.ts +2 -1
  10. package/@ones-editor/comments/src/comments-list/mini-comment/group-list.d.ts +1 -1
  11. package/@ones-editor/comments/src/comments-list/mini-comment/mini-comments-list.d.ts +1 -0
  12. package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts +1 -0
  13. package/@ones-editor/comments/src/comments-render/get-block-comments.d.ts +5 -0
  14. package/@ones-editor/comments/src/comments-render/index.d.ts +10 -1
  15. package/@ones-editor/comments/src/constant/index.d.ts +2 -1
  16. package/@ones-editor/comments/src/index.d.ts +1 -0
  17. package/@ones-editor/comments/src/locale/en-us.d.ts +6 -0
  18. package/@ones-editor/comments/src/locale/ja-jp.d.ts +6 -0
  19. package/@ones-editor/comments/src/locale/zh-cn.d.ts +6 -0
  20. package/@ones-editor/comments/src/resolved-comments/index.d.ts +4 -0
  21. package/@ones-editor/comments/src/resolved-comments/resolved-comment-editor.d.ts +14 -0
  22. package/@ones-editor/comments/src/resolved-comments/resolved-comment-list.d.ts +4 -0
  23. package/@ones-editor/comments/src/types.d.ts +6 -1
  24. package/@ones-editor/core/src/core/block-renderers/block-renderers.d.ts +1 -0
  25. package/@ones-editor/core/src/core/doc/doc.d.ts +9 -0
  26. package/@ones-editor/core/src/core/types.d.ts +1 -0
  27. package/@ones-editor/core/src/local-doc/index.d.ts +1 -0
  28. package/@ones-editor/drawio-embed/src/config/drawio.d.ts +1 -1
  29. package/@ones-editor/drawio-embed/types/index.d.ts +1 -2
  30. package/@ones-editor/sharedb-doc/src/doc/comments.d.ts +2 -1
  31. package/@ones-editor/sharedb-doc/src/doc/op-parser/parse-handler.d.ts +2 -1
  32. package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +3 -1
  33. package/@ones-editor/sharedb-doc/src/types.d.ts +1 -0
  34. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  35. package/@ones-editor/ui/src/readonly-toolbar/add-comment-to-old-doc.d.ts +1 -0
  36. package/@ones-editor/ui-base/src/icons/index.d.ts +2 -1
  37. package/@ones-editor/versions/src/version-dialog/history-handler.d.ts +1 -0
  38. package/dist/comments/local-doc-comments-provider.d.ts +2 -1
  39. package/dist/comments/sharedb-doc-comments-provider.d.ts +3 -1
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.js +848 -150
  42. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4319,6 +4319,30 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] div[
4319
4319
  will-change: width;
4320
4320
  font-family: var(--editor-font-family);
4321
4321
  }
4322
+ .editor-web-comment-root[list-type=resolved] .comment-groups-container {
4323
+ display: flex;
4324
+ flex-direction: column;
4325
+ gap: 20px;
4326
+ padding-left: 8px;
4327
+ padding-top: 60px;
4328
+ }
4329
+ .editor-web-comment-root[list-type=resolved] .comment-groups-container .comment-no-resolved-tip {
4330
+ font-size: 12px;
4331
+ width: 100%;
4332
+ color: #BEBFC2;
4333
+ display: flex;
4334
+ justify-content: center;
4335
+ align-items: center;
4336
+ margin-top: 100px;
4337
+ }
4338
+ .editor-web-comment-root[list-type=resolved] .comment-groups-container .comment-group-item-root {
4339
+ position: inherit;
4340
+ transform: none;
4341
+ }
4342
+ .editor-web-comment-root[list-type=resolved] .comment-groups-container .comment-group-item-root::before {
4343
+ left: 8px;
4344
+ right: 8px;
4345
+ }
4322
4346
  .editor-web-comment-root .comment-groups-container .comment-group-item-root {
4323
4347
  position: absolute;
4324
4348
  left: 50%;
@@ -4332,8 +4356,17 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] div[
4332
4356
  box-shadow: var(--editor-box-shadow);
4333
4357
  padding-bottom: 10px;
4334
4358
  }
4359
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root.resolved .comment-item-head .item-head-switch {
4360
+ display: none;
4361
+ }
4362
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root.resolved .item-head-tools {
4363
+ display: none;
4364
+ }
4365
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root.resolved .comment-quick-reply {
4366
+ display: none;
4367
+ }
4335
4368
  .editor-web-comment-root .comment-groups-container .comment-group-item-root:not(.no-animation) {
4336
- transition: top 0.2s ease-in, opacity 0.35s ease-in;
4369
+ transition: top 0.2s ease-in, opacity 0.2s ease-in;
4337
4370
  }
4338
4371
  .editor-web-comment-root .comment-groups-container .comment-group-item-root::before {
4339
4372
  content: "";
@@ -4380,16 +4413,23 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] div[
4380
4413
  display: flex;
4381
4414
  align-items: center;
4382
4415
  height: 22px;
4383
- visibility: hidden;
4384
4416
  }
4385
4417
  .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button {
4386
4418
  padding: 0;
4387
4419
  width: var(--editor-comment-switch-button-width);
4388
- margin: 3px 0;
4420
+ margin-right: 5px;
4389
4421
  color: #606060;
4422
+ width: 16px;
4423
+ height: 16px;
4390
4424
  }
4391
4425
  .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button[data-button-id=switch-up] {
4392
- margin-right: 16px;
4426
+ visibility: hidden;
4427
+ }
4428
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button[data-button-id=switch-down] {
4429
+ visibility: hidden;
4430
+ }
4431
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button[data-button-id=resolve] {
4432
+ margin-right: 0;
4393
4433
  }
4394
4434
  .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button:not(.disabled):hover {
4395
4435
  color: var(--text-button-color-hover);
@@ -4398,15 +4438,57 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] div[
4398
4438
  color: rgba(96, 96, 96, 0.5019607843);
4399
4439
  cursor: not-allowed;
4400
4440
  }
4441
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-footer {
4442
+ font-size: 12px;
4443
+ line-height: 20px;
4444
+ color: #87888A;
4445
+ margin-top: 10px;
4446
+ }
4447
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-footer .comment-actions {
4448
+ display: flex;
4449
+ align-items: center;
4450
+ }
4451
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-footer .comment-actions .comment-date {
4452
+ flex: 1;
4453
+ white-space: nowrap;
4454
+ }
4455
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-footer .comment-actions .removed-tips {
4456
+ color: #87888A;
4457
+ white-space: nowrap;
4458
+ text-overflow: ellipsis;
4459
+ overflow: hidden;
4460
+ margin-left: 10px;
4461
+ }
4462
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-footer .comment-actions .comment-reopen {
4463
+ background: none;
4464
+ border: none;
4465
+ cursor: pointer;
4466
+ color: #575859;
4467
+ font-size: 12px;
4468
+ }
4469
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-footer .comment-actions .comment-reopen:hover {
4470
+ color: #0064FF;
4471
+ }
4401
4472
  .editor-web-comment-root .comment-groups-container .comment-group-item-root.active::before {
4402
4473
  background-color: #f59300;
4403
4474
  }
4404
- .editor-web-comment-root .comment-groups-container .comment-group-item-root.active .item-head-switch {
4475
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root.active .item-head-switch .editor-text-button[data-button-id=switch-up] {
4476
+ visibility: visible;
4477
+ }
4478
+ .editor-web-comment-root .comment-groups-container .comment-group-item-root.active .item-head-switch .editor-text-button[data-button-id=switch-down] {
4405
4479
  visibility: visible;
4406
4480
  }
4407
4481
  .editor-web-comment-root .comment-groups-container .comment-group-item-root.readonly .comment-quick-reply .quick-reply-button.invisible {
4408
4482
  display: none;
4409
4483
  }
4484
+ .editor-web-comment-root .comment-switcher-container {
4485
+ position: absolute;
4486
+ z-index: 1;
4487
+ top: 0;
4488
+ left: 0;
4489
+ right: 0;
4490
+ font-size: 14px;
4491
+ }
4410
4492
  .editor-mobile-comments-root {
4411
4493
  position: fixed;
4412
4494
  left: 0;
@@ -4508,6 +4590,82 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] div[
4508
4590
  }
4509
4591
  :is(.editor-web-comment-root, .editor-mobile-comments-root, .editor-mini-comment-root).hidden {
4510
4592
  display: none;
4593
+ }.resolved-comment-list .resolved-comment-group-item-root {
4594
+ padding: 10px 20px;
4595
+ border-bottom: 1px solid #f0f0f0;
4596
+ margin-right: 10px;
4597
+ }
4598
+ .resolved-comment-list .resolved-comment-group-item-root .comment-group-head {
4599
+ margin-bottom: 5px;
4600
+ }
4601
+ .resolved-comment-list .resolved-comment-group-item-root .comment-group-head span {
4602
+ padding: 0 5px;
4603
+ display: inline-block;
4604
+ line-height: 2;
4605
+ background-color: #FFF0D9;
4606
+ }
4607
+ .resolved-comment-list .resolved-comment-group-item-root .comment-children-container,
4608
+ .resolved-comment-list .resolved-comment-group-item-root .comment-container {
4609
+ padding-left: 10px;
4610
+ }
4611
+ .resolved-comment-list .resolved-comment-group-item-root .comment-children-container .resolved-comment-item-root,
4612
+ .resolved-comment-list .resolved-comment-group-item-root .comment-container .resolved-comment-item-root {
4613
+ position: relative;
4614
+ }
4615
+ .resolved-comment-list .resolved-comment-group-item-root .comment-children-container .resolved-comment-item-root:not(.no-children)::before,
4616
+ .resolved-comment-list .resolved-comment-group-item-root .comment-container .resolved-comment-item-root:not(.no-children)::before {
4617
+ content: " ";
4618
+ display: block;
4619
+ position: absolute;
4620
+ left: 10px;
4621
+ width: 1px;
4622
+ background-color: #DFE1E5;
4623
+ overflow: hidden;
4624
+ opacity: 0.8;
4625
+ top: 21px;
4626
+ bottom: -12px;
4627
+ transform: scaleX(0.5);
4628
+ }
4629
+ .resolved-comment-list .resolved-comment-group-item-root .comment-children-container .resolved-comment-item-root .comment-head,
4630
+ .resolved-comment-list .resolved-comment-group-item-root .comment-container .resolved-comment-item-root .comment-head {
4631
+ padding: 0;
4632
+ position: relative;
4633
+ display: flex;
4634
+ align-items: center;
4635
+ }
4636
+ .resolved-comment-list .resolved-comment-group-item-root .comment-children-container .resolved-comment-item-root .comment-head .comment-avatar,
4637
+ .resolved-comment-list .resolved-comment-group-item-root .comment-container .resolved-comment-item-root .comment-head .comment-avatar {
4638
+ margin-right: 5px;
4639
+ width: var(--editor-comment-avatar-width, 22px);
4640
+ height: var(--editor-comment-avatar-width, 22px);
4641
+ border-radius: 100%;
4642
+ }
4643
+ .resolved-comment-list .resolved-comment-group-item-root .comment-children-container .resolved-comment-item-root .comment-head .comment-username,
4644
+ .resolved-comment-list .resolved-comment-group-item-root .comment-container .resolved-comment-item-root .comment-head .comment-username {
4645
+ font-size: var(--editor-comment-username-font-size, 12px);
4646
+ color: #2d2d2e;
4647
+ overflow: hidden;
4648
+ text-overflow: ellipsis;
4649
+ white-space: nowrap;
4650
+ }
4651
+ .resolved-comment-list .resolved-comment-group-item-root .comment-children-container .resolved-comment-item-root .comment-head .comment-modified,
4652
+ .resolved-comment-list .resolved-comment-group-item-root .comment-container .resolved-comment-item-root .comment-head .comment-modified {
4653
+ margin-left: 10px;
4654
+ font-size: 12px;
4655
+ color: #87888a;
4656
+ flex-grow: 1;
4657
+ white-space: nowrap;
4658
+ }
4659
+ .resolved-comment-list .resolved-comment-group-item-root .comment-children-container .resolved-comment-item-root .comment-editor,
4660
+ .resolved-comment-list .resolved-comment-group-item-root .comment-container .resolved-comment-item-root .comment-editor {
4661
+ border: none;
4662
+ padding-top: 0;
4663
+ margin-top: 0;
4664
+ padding-left: 10px;
4665
+ margin-left: 0;
4666
+ }
4667
+ .resolved-comment-list .resolved-comment-group-item-root .comment-children-container .resolved-comment-item-root:last-child::before {
4668
+ display: none;
4511
4669
  }div[data-type=editor-block].table-block {
4512
4670
  --table-bar-width: 6px;
4513
4671
  --table-bar-left: -6px;
@@ -4842,17 +5000,17 @@ div[data-type=editor-block].table-block.child-focused div[data-type=table-conten
4842
5000
  border-color: #b9bfc8;
4843
5001
  }
4844
5002
  div[data-type=editor-block].table-block.full-selected > div[data-type=block-content] > .scroll-container-root > .scroll-container > .scroll-area > div[data-type=table-content] > table {
4845
- background-color: var(--background-selection);
5003
+ background-color: var(--background-selection) !important;
4846
5004
  }
4847
5005
  div[data-type=editor-block].table-block.full-selected > div[data-type=block-content] > .scroll-container-root > .scroll-container > .scroll-area > div[data-type=table-content] > table td,
4848
5006
  div[data-type=editor-block].table-block.full-selected > div[data-type=block-content] > .scroll-container-root > .scroll-container > .scroll-area > div[data-type=table-content] > table th,
4849
5007
  div[data-type=editor-block].table-block.full-selected > div[data-type=block-content] > .scroll-container-root > .scroll-container > .scroll-area > div[data-type=table-content] > table tr {
4850
- background-color: transparent;
5008
+ background-color: transparent !important;
4851
5009
  }
4852
5010
  div[data-type=editor-block].table-block div[data-type=table-content] > table tbody tr td.selected,
4853
5011
  div[data-type=editor-block].table-block div[data-type=table-content] > table.row-title tbody tr td.selected,
4854
5012
  div[data-type=editor-block].table-block div[data-type=table-content] > table.col-title tbody tr td.selected {
4855
- background-color: var(--background-selection);
5013
+ background-color: var(--background-selection) !important;
4856
5014
  }
4857
5015
  div[data-type=editor-block].table-block div[data-type=table-content] > table td div[data-type=editor-block].table-block div[data-type=table-content] > table {
4858
5016
  max-width: 100%;
@@ -9207,22 +9365,22 @@ var __publicField = (obj, key, value) => {
9207
9365
  function toFloat(value) {
9208
9366
  return parseFloat(value) || 0;
9209
9367
  }
9210
- function getBordersSize(styles) {
9368
+ function getBordersSize(styles2) {
9211
9369
  var positions = [];
9212
9370
  for (var _i = 1; _i < arguments.length; _i++) {
9213
9371
  positions[_i - 1] = arguments[_i];
9214
9372
  }
9215
9373
  return positions.reduce(function(size, position) {
9216
- var value = styles["border-" + position + "-width"];
9374
+ var value = styles2["border-" + position + "-width"];
9217
9375
  return size + toFloat(value);
9218
9376
  }, 0);
9219
9377
  }
9220
- function getPaddings(styles) {
9378
+ function getPaddings(styles2) {
9221
9379
  var positions = ["top", "right", "bottom", "left"];
9222
9380
  var paddings = {};
9223
9381
  for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
9224
9382
  var position = positions_1[_i];
9225
- var value = styles["padding-" + position];
9383
+ var value = styles2["padding-" + position];
9226
9384
  paddings[position] = toFloat(value);
9227
9385
  }
9228
9386
  return paddings;
@@ -9236,17 +9394,17 @@ var __publicField = (obj, key, value) => {
9236
9394
  if (!clientWidth && !clientHeight) {
9237
9395
  return emptyRect;
9238
9396
  }
9239
- var styles = getWindowOf(target).getComputedStyle(target);
9240
- var paddings = getPaddings(styles);
9397
+ var styles2 = getWindowOf(target).getComputedStyle(target);
9398
+ var paddings = getPaddings(styles2);
9241
9399
  var horizPad = paddings.left + paddings.right;
9242
9400
  var vertPad = paddings.top + paddings.bottom;
9243
- var width = toFloat(styles.width), height = toFloat(styles.height);
9244
- if (styles.boxSizing === "border-box") {
9401
+ var width = toFloat(styles2.width), height = toFloat(styles2.height);
9402
+ if (styles2.boxSizing === "border-box") {
9245
9403
  if (Math.round(width + horizPad) !== clientWidth) {
9246
- width -= getBordersSize(styles, "left", "right") + horizPad;
9404
+ width -= getBordersSize(styles2, "left", "right") + horizPad;
9247
9405
  }
9248
9406
  if (Math.round(height + vertPad) !== clientHeight) {
9249
- height -= getBordersSize(styles, "top", "bottom") + vertPad;
9407
+ height -= getBordersSize(styles2, "top", "bottom") + vertPad;
9250
9408
  }
9251
9409
  }
9252
9410
  if (!isDocumentElement(target)) {
@@ -9901,8 +10059,8 @@ var __publicField = (obj, key, value) => {
9901
10059
  el.setAttribute(key, value);
9902
10060
  });
9903
10061
  }
9904
- function setStyles(el, styles) {
9905
- Object.entries(styles).forEach(([key, value]) => {
10062
+ function setStyles(el, styles2) {
10063
+ Object.entries(styles2).forEach(([key, value]) => {
9906
10064
  el.style.setProperty(key, value);
9907
10065
  });
9908
10066
  }
@@ -12322,12 +12480,12 @@ var __publicField = (obj, key, value) => {
12322
12480
  return blockClass.getBlockStyles(editor, block);
12323
12481
  }
12324
12482
  const data2 = editor.getBlockData(block);
12325
- const styles = Object.fromEntries(Object.entries(data2).filter(([key]) => key.startsWith("style-")));
12326
- Object.entries(styles).forEach(([, value]) => {
12483
+ const styles2 = Object.fromEntries(Object.entries(data2).filter(([key]) => key.startsWith("style-")));
12484
+ Object.entries(styles2).forEach(([, value]) => {
12327
12485
  const type = typeof value;
12328
12486
  assert(logger$4B, type === "string" || type === "number" || type === "boolean", "invalid style value");
12329
12487
  });
12330
- return styles;
12488
+ return styles2;
12331
12489
  }
12332
12490
  function getContainerWidth(container, options) {
12333
12491
  const ret = container.getBoundingClientRect().width;
@@ -24916,7 +25074,7 @@ var __publicField = (obj, key, value) => {
24916
25074
  if (attributes) {
24917
25075
  let string = op.insert;
24918
25076
  const tags = [];
24919
- let styles = "";
25077
+ let styles2 = "";
24920
25078
  if (attributes["style-bold"]) {
24921
25079
  tags.push("strong");
24922
25080
  }
@@ -24934,25 +25092,25 @@ var __publicField = (obj, key, value) => {
24934
25092
  }
24935
25093
  const fontBgColor = Object.keys(attributes).find((k) => k.startsWith("style-bg-color-"));
24936
25094
  if (fontBgColor) {
24937
- styles += `background-color: ${styleBackgroundColorToHighlight$1(fontBgColor)};`;
25095
+ styles2 += `background-color: ${styleBackgroundColorToHighlight$1(fontBgColor)};`;
24938
25096
  }
24939
25097
  const fontColor = Object.keys(attributes).find((k) => k.startsWith("style-color-"));
24940
25098
  if (fontColor) {
24941
- styles += `color: ${styleColorToColor$1(fontColor)};`;
25099
+ styles2 += `color: ${styleColorToColor$1(fontColor)};`;
24942
25100
  }
24943
25101
  if (attributes.link) {
24944
25102
  string = `<a href="${attributes.link}">${string}</a>`;
24945
25103
  }
24946
25104
  let prefix = tags.map((s) => `<${s}>`).join("");
24947
25105
  let suffix = tags.reverse().map((s) => `</${s}>`).join("");
24948
- if (styles) {
25106
+ if (styles2) {
24949
25107
  if (attributes.link) {
24950
- string = `<a href="${attributes.link}" style="${styles}">${op.insert}</a>`;
25108
+ string = `<a href="${attributes.link}" style="${styles2}">${op.insert}</a>`;
24951
25109
  } else {
24952
25110
  if (prefix) {
24953
- prefix = prefix.replace(">", ` style="${styles}">`);
25111
+ prefix = prefix.replace(">", ` style="${styles2}">`);
24954
25112
  } else {
24955
- prefix = `<span style="${styles}">`;
25113
+ prefix = `<span style="${styles2}">`;
24956
25114
  suffix = "</span>";
24957
25115
  }
24958
25116
  }
@@ -25395,6 +25553,9 @@ var __publicField = (obj, key, value) => {
25395
25553
  __publicField(this, "renders", []);
25396
25554
  this.editor = editor;
25397
25555
  }
25556
+ getRenderers() {
25557
+ return this.renders;
25558
+ }
25398
25559
  registerRender(render) {
25399
25560
  this.renders.push(render);
25400
25561
  }
@@ -25632,8 +25793,8 @@ var __publicField = (obj, key, value) => {
25632
25793
  renderBlock(editor, path, blockData) {
25633
25794
  var _a, _b;
25634
25795
  const attributes = {};
25635
- const styles = Object.entries(blockData).filter((k) => k[0].startsWith("style-"));
25636
- styles.forEach(([key, value]) => {
25796
+ const styles2 = Object.entries(blockData).filter((k) => k[0].startsWith("style-"));
25797
+ styles2.forEach(([key, value]) => {
25637
25798
  attributes[`data-${key}`] = `${value}`;
25638
25799
  });
25639
25800
  const classes = [];
@@ -32141,6 +32302,9 @@ ${codeText}
32141
32302
  toJSON() {
32142
32303
  return cloneDeep__default.default(this.doc);
32143
32304
  }
32305
+ rawData() {
32306
+ return this.doc;
32307
+ }
32144
32308
  getContainerBlocks(containerId) {
32145
32309
  const blocks = this.doc.blocks[containerId];
32146
32310
  return blocks;
@@ -38661,6 +38825,12 @@ ${codeText}
38661
38825
  commentId
38662
38826
  });
38663
38827
  }
38828
+ onUpdateCommentResolver(commentId) {
38829
+ this.pushActions({
38830
+ type: "updateCommentResolved",
38831
+ commentId
38832
+ });
38833
+ }
38664
38834
  end() {
38665
38835
  const actions2 = this.actions;
38666
38836
  const deletedBlocks = /* @__PURE__ */ new Set();
@@ -38735,6 +38905,9 @@ ${codeText}
38735
38905
  } else if (action.type === "updateComment") {
38736
38906
  const a = action;
38737
38907
  this.outerHandler.onUpdateComment(a.commentId, this.local);
38908
+ } else if (action.type === "updateCommentResolved") {
38909
+ const a = action;
38910
+ this.outerHandler.onUpdateCommentResolver(a.commentId, this.local);
38738
38911
  }
38739
38912
  });
38740
38913
  Array.from(updatingBlockDataDeltaMap.entries()).forEach(([blockId, objectData]) => {
@@ -38912,7 +39085,14 @@ ${codeText}
38912
39085
  assert(logger$2V, commentId, `invalid comment op, no commentId: ${JSON.stringify(ops)}`);
38913
39086
  assert(logger$2V, actions2, `invalid comment op, no actions: ${JSON.stringify(ops)}`);
38914
39087
  if (typeof actions2 === "string") {
38915
- logger$2V.error(`unknown comment op, ${JSON.stringify(ops)}`);
39088
+ const data2 = ops[3];
39089
+ if (actions2 === "resolver" && typeof data2 === "object") {
39090
+ if (parseType === "upsert") {
39091
+ handler.onUpdateCommentResolver(commentId);
39092
+ }
39093
+ } else {
39094
+ logger$2V.error(`unknown comment op, ${JSON.stringify(ops)}`);
39095
+ }
38916
39096
  } else {
38917
39097
  if (actions2.i && actions2.r) {
38918
39098
  if (parseType === "upsert") {
@@ -39022,7 +39202,8 @@ ${codeText}
39022
39202
  avatarUrl,
39023
39203
  abstract,
39024
39204
  created,
39025
- modified
39205
+ modified,
39206
+ resolver: resolved
39026
39207
  } = shareDBComment;
39027
39208
  return {
39028
39209
  id,
@@ -39032,7 +39213,8 @@ ${codeText}
39032
39213
  avatarUrl,
39033
39214
  abstract,
39034
39215
  created,
39035
- modified
39216
+ modified,
39217
+ resolver: resolved
39036
39218
  };
39037
39219
  }
39038
39220
  function commentToShareDbComment(comment, doc2) {
@@ -39504,6 +39686,21 @@ ${codeText}
39504
39686
  const op = ["comments", comment.id, { r: true, i: shareDBComment }];
39505
39687
  return this.submitOp(op);
39506
39688
  }
39689
+ localUpdateCommentResolver(commentId, resolver) {
39690
+ const oldComment = this.getComment(commentId);
39691
+ const oldResolved = oldComment.resolver;
39692
+ const op = ["comments", commentId, "resolver", {}];
39693
+ if (!oldResolved && !resolver) {
39694
+ return Promise.resolve(true);
39695
+ }
39696
+ if (oldResolved !== void 0) {
39697
+ op[3] = { r: true };
39698
+ }
39699
+ if (resolver) {
39700
+ op[3].i = resolver;
39701
+ }
39702
+ return this.submitOp(op);
39703
+ }
39507
39704
  destroy() {
39508
39705
  var _a;
39509
39706
  this.destroyed = true;
@@ -39580,6 +39777,13 @@ ${codeText}
39580
39777
  return (_a = cb.onUpdateComment) == null ? void 0 : _a.call(cb, commentId, local);
39581
39778
  });
39582
39779
  }
39780
+ onUpdateCommentResolver(commentId, local) {
39781
+ assert(logger$2S, this.callbacks.length > 0, "no callbacks");
39782
+ this.callbacks.forEach((cb) => {
39783
+ var _a;
39784
+ return (_a = cb.onUpdateCommentResolver) == null ? void 0 : _a.call(cb, commentId, local);
39785
+ });
39786
+ }
39583
39787
  onCustomMessage(msg) {
39584
39788
  const message = msg;
39585
39789
  if ((message == null ? void 0 : message.type) === "custom" && (message == null ? void 0 : message.clientId) !== this.client.clientId) {
@@ -40572,6 +40776,7 @@ ${codeText}
40572
40776
  const RefreshIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M15.3498 7.51663L12.9692 9.49971L10.5902 7.51663" stroke="currentColor"/>\n<path d="M12.811 9.5C12.9344 9.02057 13 8.51795 13 8C13 4.68629 10.3137 2 7 2C3.68629 2 1 4.68629 1 8C1 11.3137 3.68629 14 7 14C8.39546 14 9.67966 13.5236 10.6988 12.7246" stroke="currentColor"/>\n</svg>';
40573
40777
  const HelpIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M15 8C15 11.8659 11.8659 15 8 15C4.13408 15 1 11.8659 1 8C1 4.13408 4.13408 1 8 1C11.8659 1 15 4.13408 15 8Z" stroke="currentColor"/>\n<path d="M6 6.41815C6 5.81984 6.55057 4.52136 7.98652 4.52136C9.24198 4.52136 10 5.42027 10 6.41815C10 7.24315 9.34611 7.76435 8.89738 8.21308C7.99992 9.11055 7.99992 10.0001 7.99992 10.0001" stroke="currentColor"/>\n<path d="M8 11V13" stroke="currentColor"/>\n</svg>\n';
40574
40778
  const CheckMarkIcon = '<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" stroke-width="2">\n <path d="m1 7.4 1.497-1.498 3.861 3.86L12.85 2.45l1.498 1.497-6.491 7.312.005.007-.096.095-1.318 1.486L1 7.399Z" fill="currentColor" fill-rule="nonzero"></path>\n</svg>';
40779
+ const CircleCheckMarkIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M10.9825 5.99158L7.19788 10.0128L5.30554 8.12045" stroke="currentColor" stroke-linejoin="round"/>\n<circle cx="8.03119" cy="7.99481" r="4.98883" stroke="currentColor"/>\n</svg>\n';
40575
40780
  const TextIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.5 4L2.5 1.5L13.5 1.5V4" stroke="currentColor" stroke-linejoin="round"/>\n<path d="M8 14.5V2" stroke="currentColor"/>\n<path d="M5 14.5H11" stroke="currentColor" stroke-linejoin="round"/>\n</svg>\n';
40576
40781
  const rightArrow = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5.76573 4.17763L9.58809 7.99999L5.76573 11.8209" stroke="currentColor" stroke-width="2"/>\n</svg>\n';
40577
40782
  const BilibiliIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.3909 3.71427H11.8891C12.7699 3.74577 13.5043 4.05144 14.09 4.63244C14.6757 5.21285 14.979 5.94435 15 6.82577V11.1191C14.979 11.9999 14.6757 12.7344 14.09 13.32C13.5043 13.9057 12.7705 14.209 11.8891 14.23H4.11092C3.23008 14.209 2.49567 13.9057 1.91 13.32C1.32433 12.7344 1.021 12.0005 1 11.1191V6.82577C1.021 5.94435 1.32433 5.21285 1.91 4.63244C2.49567 4.05144 3.2295 3.74577 4.11092 3.71427H4.56242L3.87758 3.06094C3.80715 2.99237 3.75151 2.9101 3.71409 2.81921C3.67667 2.72831 3.65826 2.63072 3.66 2.53244C3.66 2.32477 3.73233 2.1486 3.87758 2.00335L3.89333 1.9876C4.04908 1.84235 4.22758 1.77002 4.43 1.77002C4.63242 1.77002 4.81092 1.84235 4.96667 1.9876L6.63092 3.59002C6.67233 3.63144 6.70908 3.67285 6.74 3.71427H9.22908C9.25335 3.66813 9.28486 3.62618 9.32242 3.59002L10.9867 1.9876C11.1424 1.84235 11.3209 1.77002 11.5233 1.77002C11.7258 1.77002 11.9095 1.8581 12.0652 2.00335C12.221 2.1486 12.2933 2.32477 12.2933 2.53244C12.2933 2.73952 12.221 2.91569 12.0757 3.06094L11.3909 3.71427ZM4.11092 5.22335C3.67575 5.23385 3.31 5.38435 3.01425 5.67427C2.71908 5.96477 2.56567 6.33344 2.55575 6.7791V11.1658C2.56567 11.6114 2.71908 11.9795 3.01425 12.27C3.31 12.5605 3.67575 12.711 4.11092 12.7209H11.8891C12.3242 12.711 12.69 12.5605 12.9858 12.27C13.2809 11.9795 13.4343 11.6114 13.4442 11.1658V6.7791C13.4343 6.33285 13.2809 5.96477 12.9858 5.67427C12.69 5.38435 12.3242 5.23385 11.8891 5.22335H4.11092ZM5.66667 7.4791C5.88425 7.4791 6.06567 7.55144 6.21092 7.69669C6.35675 7.84194 6.43433 8.0286 6.44425 8.25669V8.94094C6.43433 9.16902 6.35675 9.35569 6.21092 9.50094C6.06567 9.64677 5.88425 9.7191 5.66667 9.7191C5.44908 9.7191 5.26767 9.64619 5.12242 9.50094C4.97658 9.35569 4.899 9.16902 4.88908 8.94094V8.25669C4.88908 8.0391 4.96433 7.85477 5.11425 7.70427C5.26475 7.55435 5.44908 7.4791 5.66667 7.4791ZM10.3333 7.4791C10.5509 7.4791 10.7323 7.55144 10.8776 7.69669C11.0234 7.84194 11.101 8.0286 11.1109 8.25669V8.94094C11.101 9.16902 11.0234 9.35569 10.8776 9.50094C10.7323 9.64677 10.5509 9.7191 10.3333 9.7191C10.1157 9.7191 9.93433 9.64619 9.78908 9.50094C9.64325 9.35569 9.56567 9.16902 9.55575 8.94094V8.25669C9.56567 8.0286 9.64325 7.84194 9.78908 7.69669C9.93433 7.55144 10.1157 7.4791 10.3333 7.4791Z" fill="#07A3D7"/>\n</svg>\n';
@@ -40727,6 +40932,7 @@ ${codeText}
40727
40932
  RefreshIcon,
40728
40933
  HelpIcon,
40729
40934
  CheckMarkIcon,
40935
+ CircleCheckMarkIcon,
40730
40936
  TextIcon,
40731
40937
  RightArrowIcon: rightArrow,
40732
40938
  TencentVideoIcon,
@@ -50514,7 +50720,7 @@ ${codeText}
50514
50720
  });
50515
50721
  return !!ret;
50516
50722
  }
50517
- function addBlockClasses(from, to, styles) {
50723
+ function addBlockClasses(from, to, styles2) {
50518
50724
  const container = getParentContainer(from);
50519
50725
  if (to) {
50520
50726
  const container2 = getParentContainer(to);
@@ -50525,18 +50731,18 @@ ${codeText}
50525
50731
  const toIndex = getBlockIndex(to);
50526
50732
  assert(logger$24, fromIndex <= toIndex, "invalid block index");
50527
50733
  }
50528
- addClass(from, ...styles);
50734
+ addClass(from, ...styles2);
50529
50735
  if (!to || to === from) {
50530
50736
  return;
50531
50737
  }
50532
50738
  let next2 = getNextBlock(from);
50533
50739
  while (next2 !== to) {
50534
50740
  assert(logger$24, next2, "no next button");
50535
- addClass(next2, ...styles);
50741
+ addClass(next2, ...styles2);
50536
50742
  next2 = getNextBlock(next2);
50537
50743
  }
50538
50744
  if (next2) {
50539
- addClass(next2, ...styles);
50745
+ addClass(next2, ...styles2);
50540
50746
  }
50541
50747
  }
50542
50748
  async function requestMindmapFullscreen(editor, block, mindmapTools) {
@@ -51524,7 +51730,7 @@ ${codeText}
51524
51730
  html = `<input type="checkbox" disabled="disabled" /> ${html}`;
51525
51731
  }
51526
51732
  let listTag = "ul";
51527
- let styles = "";
51733
+ let styles2 = "";
51528
51734
  if (list2.ordered) {
51529
51735
  html = `<li value="${list2.start}">${html}</li>`;
51530
51736
  listTag = "ol";
@@ -51532,18 +51738,18 @@ ${codeText}
51532
51738
  case 2:
51533
51739
  case 5:
51534
51740
  case 8:
51535
- styles = "list-style-type: lower-alpha;";
51741
+ styles2 = "list-style-type: lower-alpha;";
51536
51742
  break;
51537
51743
  case 3:
51538
51744
  case 6:
51539
- styles = "list-style-type: lower-roman;";
51745
+ styles2 = "list-style-type: lower-roman;";
51540
51746
  break;
51541
51747
  }
51542
51748
  } else {
51543
51749
  html = `<li>${html}</li>`;
51544
51750
  }
51545
51751
  if (isFirstListItem(editor, blockData, doc2, path)) {
51546
- html = `<${listTag}${styles ? ` style="${styles}"` : ""}>${html}`;
51752
+ html = `<${listTag}${styles2 ? ` style="${styles2}"` : ""}>${html}`;
51547
51753
  }
51548
51754
  if (isLastListItem(editor, blockData, doc2, path)) {
51549
51755
  html = `${html}</${listTag}>`;
@@ -62359,13 +62565,13 @@ $$${mathData.mathjaxText}$$
62359
62565
  if (!op.attributes) {
62360
62566
  return /* @__PURE__ */ new Map();
62361
62567
  }
62362
- const styles = Object.entries(op.attributes).filter(([key]) => {
62568
+ const styles2 = Object.entries(op.attributes).filter(([key]) => {
62363
62569
  if (key.startsWith("style-")) {
62364
62570
  return true;
62365
62571
  }
62366
62572
  return false;
62367
62573
  });
62368
- return new Map(styles);
62574
+ return new Map(styles2);
62369
62575
  };
62370
62576
  if (text2.length === 0) {
62371
62577
  return /* @__PURE__ */ new Map();
@@ -62409,11 +62615,11 @@ $$${mathData.mathjaxText}$$
62409
62615
  if (getTextLength(text2) === 0) {
62410
62616
  return textStyles;
62411
62617
  }
62412
- let styles = getIntersectionStyles(text2);
62413
- styles = mergeActiveStyle(editor, styles);
62618
+ let styles2 = getIntersectionStyles(text2);
62619
+ styles2 = mergeActiveStyle(editor, styles2);
62414
62620
  function getTextStyle(item) {
62415
62621
  const { id, icon, desc, name } = item;
62416
- const value = styles.get(id);
62622
+ const value = styles2.get(id);
62417
62623
  if (value !== void 0) {
62418
62624
  return {
62419
62625
  id,
@@ -63009,6 +63215,7 @@ $$${mathData.mathjaxText}$$
63009
63215
  GroupItemActions2["QuickReply"] = "quick-reply";
63010
63216
  GroupItemActions2["QuickReplyOk"] = "quick-reply-ok";
63011
63217
  GroupItemActions2["QuickReplyCancel"] = "quick-reply-cancel";
63218
+ GroupItemActions2["Resolve"] = "resolve";
63012
63219
  return GroupItemActions2;
63013
63220
  })(GroupItemActions || {});
63014
63221
  const GROUP_ITEM_ACTION_MARK = "group-item-action";
@@ -63056,7 +63263,7 @@ $$${mathData.mathjaxText}$$
63056
63263
  return attributes.filter((attribute) => attribute.startsWith("comment-")).map((attribute) => attribute.replace("comment-", ""));
63057
63264
  }
63058
63265
  const logger$1G = getLogger("doc-comments");
63059
- function addBlockComments(doc2, block, result, resultSet) {
63266
+ function addBlockComments$1(doc2, block, result, resultSet) {
63060
63267
  if (block.comments) {
63061
63268
  const blockComments = block.comments;
63062
63269
  if (Array.isArray(blockComments)) {
@@ -63092,7 +63299,7 @@ $$${mathData.mathjaxText}$$
63092
63299
  children.forEach((childContainerId) => {
63093
63300
  const childBlocks = doc2.blocks[childContainerId];
63094
63301
  childBlocks.forEach((subBlock) => {
63095
- addBlockComments(doc2, subBlock, result, resultSet);
63302
+ addBlockComments$1(doc2, subBlock, result, resultSet);
63096
63303
  });
63097
63304
  });
63098
63305
  }
@@ -63100,7 +63307,7 @@ $$${mathData.mathjaxText}$$
63100
63307
  const result = [];
63101
63308
  const resultSet = /* @__PURE__ */ new Set();
63102
63309
  doc2.blocks.root.forEach((block) => {
63103
- addBlockComments(doc2, block, result, resultSet);
63310
+ addBlockComments$1(doc2, block, result, resultSet);
63104
63311
  });
63105
63312
  const resultMap = /* @__PURE__ */ new Map();
63106
63313
  result.forEach((commentId, index2) => resultMap.set(commentId, index2));
@@ -63156,6 +63363,26 @@ $$${mathData.mathjaxText}$$
63156
63363
  });
63157
63364
  return result;
63158
63365
  }
63366
+ function getUnresolvedCommentsGroupFromDoc(editor, commentsProvider) {
63367
+ return getCommentsGroupFromDoc(editor, commentsProvider).filter((group) => !group.resolver);
63368
+ }
63369
+ function getResolvedCommentsGroupFromDoc(editor, commentsProvider) {
63370
+ const doc2 = editor.doc.toJSON();
63371
+ const commentsMap = getCommentsFromDoc(doc2);
63372
+ const commentGroup = getCommentsGroup(commentsProvider.getComments());
63373
+ const result = commentGroup.filter((group) => group.resolver).sort((group1, group2) => {
63374
+ var _a, _b, _c, _d;
63375
+ const date1 = (_b = (_a = group1.resolver) == null ? void 0 : _a.date) != null ? _b : 0;
63376
+ const date2 = (_d = (_c = group2.resolver) == null ? void 0 : _c.date) != null ? _d : 0;
63377
+ return date2 - date1;
63378
+ });
63379
+ result.forEach((group) => {
63380
+ if (!commentsMap.has(group.id)) {
63381
+ group.removedFromDoc = true;
63382
+ }
63383
+ });
63384
+ return result;
63385
+ }
63159
63386
  function flattenCommentGroup(comment) {
63160
63387
  const { children, ...raw } = comment;
63161
63388
  const comments = [raw];
@@ -63212,6 +63439,18 @@ $$${mathData.mathjaxText}$$
63212
63439
  const commentIds = intersection__default.default(comments1, comments2);
63213
63440
  return commentIds;
63214
63441
  }
63442
+ function removeUnresolvedComments(commentProvider, commentIds) {
63443
+ return commentIds.filter((commentId) => {
63444
+ const comment = commentProvider.getComment(commentId);
63445
+ return !!comment.resolver;
63446
+ });
63447
+ }
63448
+ function removeResolvedComments(commentProvider, commentIds) {
63449
+ return commentIds.filter((commentId) => {
63450
+ const comment = commentProvider.getComment(commentId);
63451
+ return !(comment == null ? void 0 : comment.resolver);
63452
+ });
63453
+ }
63215
63454
  const logger$1F = getLogger("active-comments");
63216
63455
  function inactiveComment(editor, commentId) {
63217
63456
  const activeCommentElements = editor.rootContainer.querySelectorAll(`span.comment[comment-${commentId}],[data-type=editor-block].comment[comment-${commentId}]`);
@@ -63267,6 +63506,11 @@ $$${mathData.mathjaxText}$$
63267
63506
  }
63268
63507
  }
63269
63508
  }
63509
+ function getElementsByCommentId(editor, commentId) {
63510
+ const lowerCommentId = commentId.toLocaleLowerCase();
63511
+ const elements = editor.rootContainer.querySelectorAll(`span.comment[comment-${lowerCommentId}],[data-type=editor-block].comment[comment-${lowerCommentId}]`);
63512
+ return Array.from(elements);
63513
+ }
63270
63514
  function isImageBlock(block) {
63271
63515
  return getBlockType(block) === "embed" && getEmbedType(block) === "image";
63272
63516
  }
@@ -68986,8 +69230,9 @@ ${codeText}
68986
69230
  return items;
68987
69231
  }
68988
69232
  reloadList(data2) {
69233
+ this._items.forEach((item) => item.destroy());
68989
69234
  this.container.innerHTML = "";
68990
- this.createList(data2);
69235
+ this._items = this.createList(data2);
68991
69236
  }
68992
69237
  insertItem(data2) {
68993
69238
  const index2 = this.findInsertPos(data2);
@@ -69060,8 +69305,8 @@ ${codeText}
69060
69305
  });
69061
69306
  }
69062
69307
  }
69063
- const switchUpIcon = '<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.00218 11.0005L8.00341 4.99923L14.0046 11.0005" stroke="currentColor" fill="transparent" stroke-width="1.5" stroke-linejoin="bevel"/>\n</svg>';
69064
- const switchDownIcon = '<svg width="17" height="16" viewBox="0 0 17 16" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.0029 4.99933L8.00172 11.0006L2.00049 4.99933" stroke="currentColor" fill="transparent" stroke-width="1.5" stroke-linejoin="bevel"/>\n</svg>';
69308
+ const switchUpIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M4.17757 10.2343L7.99993 6.41191L11.8208 10.2343" stroke="currentColor"/>\n</svg>\n';
69309
+ const switchDownIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M4.17757 5.76573L7.99993 9.58809L11.8208 5.76573" stroke="currentColor"/>\n</svg>\n';
69065
69310
  const index$8 = "";
69066
69311
  const REPLY_EDITOR_EDITING_CLS = "reply-editor-editing";
69067
69312
  const { t: t$3 } = i18n$1;
@@ -69184,6 +69429,9 @@ ${codeText}
69184
69429
  __publicField(this, "quickReply");
69185
69430
  __publicField(this, "createRoot", () => {
69186
69431
  const root2 = createElement("div", ["comment-group-item-root"], null);
69432
+ if (this.comment.resolver) {
69433
+ addClass(root2, "resolved");
69434
+ }
69187
69435
  return root2;
69188
69436
  });
69189
69437
  __publicField(this, "createChildrenList", () => {
@@ -69240,6 +69488,7 @@ ${codeText}
69240
69488
  this.mainItem = this.createItem();
69241
69489
  this.childrenList = this.createChildrenList();
69242
69490
  this.quickReply = this.createQuickReply();
69491
+ this.createFooter();
69243
69492
  this.editor.on("readonlyChanged", this.handleReadonlyChanged);
69244
69493
  this.resizeObserver = new index$g(this.handleResize);
69245
69494
  this.resizeObserver.observe(this.root);
@@ -69249,6 +69498,29 @@ ${codeText}
69249
69498
  const count = getCommentItemCountInGroupItem(this.root);
69250
69499
  return count;
69251
69500
  }
69501
+ createFooter() {
69502
+ if (!this.comment.resolver) {
69503
+ return null;
69504
+ }
69505
+ const footer = createElement("div", ["comment-item-footer"], this.root);
69506
+ const modified = createElement("span", ["comment-modified"], footer);
69507
+ const date = new Date(this.comment.modified);
69508
+ const resolver = this.comment.resolver;
69509
+ assert(logger$1h, resolver, "resolver should not be null");
69510
+ const text2 = i18n$1.t("comment.resolvedBy", { name: resolver.displayName, date: fromNowString(date) });
69511
+ modified.innerText = text2;
69512
+ const actions2 = createElement("div", ["comment-actions"], footer);
69513
+ createElement("span", ["comment-date"], actions2, fromNowString(new Date(resolver.date)));
69514
+ if (this.comment.removedFromDoc) {
69515
+ createElement("span", ["removed-tips"], actions2, i18n$1.t("comment.removedFromDoc"));
69516
+ } else {
69517
+ const reopen = createElement("button", ["comment-reopen"], actions2, i18n$1.t("comment.reopen"));
69518
+ reopen.onclick = () => {
69519
+ this.commentsProvider.localUpdateCommentResolver(this.comment.id, void 0);
69520
+ };
69521
+ }
69522
+ return footer;
69523
+ }
69252
69524
  createQuickReply() {
69253
69525
  const { editor, commentsProvider, comment } = this;
69254
69526
  const commentQuickReply = new CommentQuickReply(editor, commentsProvider, comment, this);
@@ -69263,8 +69535,14 @@ ${codeText}
69263
69535
  const switchContainer = createElement("span", ["item-head-switch"], head);
69264
69536
  const switchUp = createTextButton(switchContainer, GroupItemActions.SwitchUp, "up", switchUpIcon);
69265
69537
  const switchDown = createTextButton(switchContainer, GroupItemActions.SwitchDown, "down", switchDownIcon);
69538
+ const resolve = createTextButton(switchContainer, GroupItemActions.Resolve, "resolve", CircleCheckMarkIcon);
69266
69539
  addGroupActionToElement(switchUp, GroupItemActions.SwitchUp);
69267
69540
  addGroupActionToElement(switchDown, GroupItemActions.SwitchDown);
69541
+ addGroupActionToElement(resolve, GroupItemActions.Resolve);
69542
+ addClass(resolve, "disable-active");
69543
+ if (comment.resolver) {
69544
+ addClass(resolve, "resolved");
69545
+ }
69268
69546
  return head;
69269
69547
  }
69270
69548
  createItem() {
@@ -69304,6 +69582,7 @@ ${codeText}
69304
69582
  handleUpdateMainComment(comment) {
69305
69583
  assert(logger$1h, comment.id === this.mainItem.comment.id, "invalid comment");
69306
69584
  this.mainItem.reloadDoc();
69585
+ this.setCreatingComment(false);
69307
69586
  }
69308
69587
  deleteMainComment(commentId) {
69309
69588
  assert(logger$1h, commentId === this.mainItem.comment.id, "invalid comment");
@@ -69312,6 +69591,18 @@ ${codeText}
69312
69591
  edit() {
69313
69592
  this.mainItem.edit();
69314
69593
  }
69594
+ setCreatingComment(creating) {
69595
+ const resolveButton = this.header.querySelector('.editor-text-button[group-item-action="resolve"]');
69596
+ if (!resolveButton) {
69597
+ return;
69598
+ }
69599
+ resolveButton.disabled = creating;
69600
+ if (creating) {
69601
+ resolveButton.classList.add("disabled");
69602
+ } else {
69603
+ resolveButton.classList.remove("disabled");
69604
+ }
69605
+ }
69315
69606
  destroy() {
69316
69607
  this.quickReply.destroy();
69317
69608
  this.mainItem.destroy();
@@ -69497,7 +69788,17 @@ ${codeText}
69497
69788
  this.commentsProvider.localDeleteComment(comment.id);
69498
69789
  quickReply.show();
69499
69790
  });
69500
- __publicField(this, "execute", (element, groupItem, commentId, itemIndex) => {
69791
+ __publicField(this, "handleResolve", (groupItem) => {
69792
+ const { commentsProvider } = this;
69793
+ const comment = commentsProvider.getComment(groupItem.comment.id);
69794
+ const user = this.groupList.editor.doc.getUser();
69795
+ commentsProvider.localUpdateCommentResolver(comment.id, {
69796
+ userId: user.userId,
69797
+ displayName: user.displayName,
69798
+ date: Date.now()
69799
+ });
69800
+ });
69801
+ __publicField(this, "execute", (element, groupItem, commentId, itemIndex, event) => {
69501
69802
  const actionElement = getClosestGroupItemActionElement(element);
69502
69803
  if (!actionElement)
69503
69804
  return;
@@ -69536,6 +69837,11 @@ ${codeText}
69536
69837
  case GroupItemActions.QuickReplyCancel:
69537
69838
  this.handleQuickReplyCancel(groupItem);
69538
69839
  break;
69840
+ case GroupItemActions.Resolve:
69841
+ event.preventDefault();
69842
+ event.stopPropagation();
69843
+ this.handleResolve(groupItem);
69844
+ break;
69539
69845
  default:
69540
69846
  const exhaustiveCheck = actionId;
69541
69847
  logger$1f.debug(`not implement handler for ${exhaustiveCheck}`);
@@ -69549,8 +69855,8 @@ ${codeText}
69549
69855
  }
69550
69856
  const logger$1e = getLogger("comment-group-list");
69551
69857
  class CommentGroupList extends ListBase {
69552
- constructor(editor, commentsProvider, parent) {
69553
- super(editor, commentsProvider, parent, getCommentsGroupFromDoc(editor, commentsProvider), {});
69858
+ constructor(editor, commentsProvider, parent, type) {
69859
+ super(editor, commentsProvider, parent, getUnresolvedCommentsGroupFromDoc(editor, commentsProvider), {});
69554
69860
  __publicField(this, "groupItemHandlers");
69555
69861
  __publicField(this, "dispatchScroll", debounce__default.default(() => {
69556
69862
  this.editor.scrollContainer.dispatchEvent(new Event("scroll"));
@@ -69588,7 +69894,9 @@ ${codeText}
69588
69894
  const commentId = getClosestCommentItemId(event.target);
69589
69895
  const index2 = this.items.findIndex((item) => item.root === itemRoot);
69590
69896
  if (index2 !== -1) {
69591
- if (this.activeIndex !== index2) {
69897
+ const disableActive = !!event.target.closest(".disable-active");
69898
+ const enableActive = !disableActive;
69899
+ if (this.activeIndex !== index2 && enableActive) {
69592
69900
  this.setActiveItem(index2);
69593
69901
  }
69594
69902
  const { groupItemHandlers } = this;
@@ -69596,7 +69904,8 @@ ${codeText}
69596
69904
  event.target,
69597
69905
  this.items[index2],
69598
69906
  commentId,
69599
- index2
69907
+ index2,
69908
+ event
69600
69909
  );
69601
69910
  }
69602
69911
  });
@@ -69637,7 +69946,7 @@ ${codeText}
69637
69946
  __publicField(this, "handleSelectionChanged", () => {
69638
69947
  setTimeout(() => {
69639
69948
  var _a;
69640
- const commentIds = getCommentsFromSelection(this.editor);
69949
+ const commentIds = this.type === "current" ? removeResolvedComments(this.commentsProvider, getCommentsFromSelection(this.editor)) : removeUnresolvedComments(this.commentsProvider, getCommentsFromSelection(this.editor));
69641
69950
  if (commentIds.length > 0) {
69642
69951
  if (((_a = this.activeItem) == null ? void 0 : _a.comment.id) && commentIds.includes(this.activeItem.comment.id)) {
69643
69952
  return;
@@ -69678,7 +69987,9 @@ ${codeText}
69678
69987
  const top = Number.parseFloat(firstItem.style.top);
69679
69988
  const targetTop = Number.parseFloat(firstItem.getAttribute("data-target-top") || "0");
69680
69989
  if (!Number.isNaN(top) && !Number.isNaN(targetTop) && top < targetTop) {
69681
- arrangeItems(this.editor, this.items, null, Math.min(top + (0 - event.deltaY) * 3, targetTop));
69990
+ if (this.type === "current") {
69991
+ arrangeItems(this.editor, this.items, null, Math.min(top + (0 - event.deltaY) * 3, targetTop));
69992
+ }
69682
69993
  }
69683
69994
  });
69684
69995
  __publicField(this, "updateGroupItemSwitch", () => {
@@ -69687,7 +69998,7 @@ ${codeText}
69687
69998
  activeItem.updateSwitchButton();
69688
69999
  });
69689
70000
  __publicField(this, "updateComments", debounce__default.default(() => {
69690
- const commentsGroup = getCommentsGroupFromDoc(this.editor, this.commentsProvider);
70001
+ const commentsGroup = this.type === "current" ? getUnresolvedCommentsGroupFromDoc(this.editor, this.commentsProvider) : getResolvedCommentsGroupFromDoc(this.editor, this.commentsProvider);
69691
70002
  let hasBeenChanged = false;
69692
70003
  for (let i = 0; i < commentsGroup.length; i++) {
69693
70004
  const comment = commentsGroup[i];
@@ -69710,6 +70021,8 @@ ${codeText}
69710
70021
  this.emit("commentCountChanged");
69711
70022
  }
69712
70023
  }, 100));
70024
+ this.editor = editor;
70025
+ this.type = type;
69713
70026
  this.updateItemsLayout();
69714
70027
  this.bindEvents();
69715
70028
  this.editor.addListener("selectionChanged", this.handleSelectionChanged);
@@ -69730,7 +70043,9 @@ ${codeText}
69730
70043
  document.removeEventListener("click", this.handleDocumentClick);
69731
70044
  }
69732
70045
  updateItemsLayout(dispatchScroll = true) {
69733
- arrangeItems(this.editor, this.items, this.activeItem);
70046
+ if (this.type === "current") {
70047
+ arrangeItems(this.editor, this.items, this.activeItem);
70048
+ }
69734
70049
  if (dispatchScroll) {
69735
70050
  this.dispatchScroll();
69736
70051
  }
@@ -69754,7 +70069,7 @@ ${codeText}
69754
70069
  return item;
69755
70070
  }
69756
70071
  findInsertPos(data2) {
69757
- const commentsMap = getCommentsGroupFromDoc(this.editor, this.commentsProvider);
70072
+ const commentsMap = getUnresolvedCommentsGroupFromDoc(this.editor, this.commentsProvider);
69758
70073
  const index2 = commentsMap.findIndex((group) => group.id === data2.id);
69759
70074
  if (index2 === -1) {
69760
70075
  return -1;
@@ -69854,6 +70169,7 @@ ${codeText}
69854
70169
  newItem.quickReply.hide();
69855
70170
  setTimeout(() => {
69856
70171
  newItem.edit();
70172
+ newItem.setCreatingComment(true);
69857
70173
  }, 300);
69858
70174
  }
69859
70175
  }
@@ -69878,6 +70194,12 @@ ${codeText}
69878
70194
  }
69879
70195
  }
69880
70196
  }
70197
+ handleResolveComment(commentId) {
70198
+ const item = this.findItem(commentId);
70199
+ if (item) {
70200
+ this.deleteItem(item.comment.id);
70201
+ }
70202
+ }
69881
70203
  handleUpdateComment(comment) {
69882
70204
  const group = this.findItemAsGroupId(comment.groupId);
69883
70205
  if (group && group.comment.id !== comment.id) {
@@ -69889,6 +70211,235 @@ ${codeText}
69889
70211
  item.handleUpdateMainComment(comment);
69890
70212
  }
69891
70213
  }
70214
+ changeType(type) {
70215
+ this.type = type;
70216
+ const comments = this.type === "current" ? getUnresolvedCommentsGroupFromDoc(this.editor, this.commentsProvider) : getResolvedCommentsGroupFromDoc(this.editor, this.commentsProvider);
70217
+ this.reloadList(comments);
70218
+ if (this.type === "current") {
70219
+ setTimeout(() => {
70220
+ arrangeItems(this.editor, this.items, null);
70221
+ });
70222
+ }
70223
+ }
70224
+ }
70225
+ function addBlockComments(doc2, block, resultMap) {
70226
+ if (block.comments) {
70227
+ const blockComments = block.comments;
70228
+ if (Array.isArray(blockComments)) {
70229
+ blockComments.forEach((commentId) => {
70230
+ const commentIds = resultMap.get(block.id);
70231
+ if (commentIds) {
70232
+ commentIds.add(commentId);
70233
+ } else {
70234
+ resultMap.set(block.id, /* @__PURE__ */ new Set([commentId]));
70235
+ }
70236
+ });
70237
+ }
70238
+ }
70239
+ if (block.text) {
70240
+ const text2 = block.text;
70241
+ text2.forEach((op) => {
70242
+ if (op.attributes) {
70243
+ const prefix = "comment-";
70244
+ Object.entries(op.attributes).forEach(([key, value]) => {
70245
+ if (key.startsWith(prefix)) {
70246
+ const commentId = value;
70247
+ const commentIds = resultMap.get(block.id);
70248
+ if (commentIds) {
70249
+ commentIds.add(commentId);
70250
+ } else {
70251
+ resultMap.set(block.id, /* @__PURE__ */ new Set([commentId]));
70252
+ }
70253
+ }
70254
+ });
70255
+ }
70256
+ });
70257
+ }
70258
+ const children = block.children;
70259
+ if (!children) {
70260
+ return;
70261
+ }
70262
+ children.forEach((childContainerId) => {
70263
+ const childBlocks = doc2.blocks[childContainerId];
70264
+ childBlocks.forEach((subBlock) => {
70265
+ addBlockComments(doc2, subBlock, resultMap);
70266
+ });
70267
+ });
70268
+ }
70269
+ function getBlockCommentsFromDoc(doc2) {
70270
+ const resultMap = /* @__PURE__ */ new Map();
70271
+ doc2.blocks.root.forEach((block) => {
70272
+ addBlockComments(doc2, block, resultMap);
70273
+ });
70274
+ return resultMap;
70275
+ }
70276
+ function getBlocksByCommentId(doc2, commentId) {
70277
+ const result = [];
70278
+ const resultMap = getBlockCommentsFromDoc(doc2);
70279
+ resultMap.forEach((commentIds, blockId) => {
70280
+ if (commentIds.has(commentId)) {
70281
+ result.push(blockId);
70282
+ }
70283
+ });
70284
+ return result;
70285
+ }
70286
+ class OnesEditorCommentsRender {
70287
+ constructor(type = "current") {
70288
+ __publicField(this, "updateUnknownCommentsDelayed", debounce__default.default((editor) => {
70289
+ const comments = this.getComments(editor);
70290
+ const invisibleComments = Object.values(comments).filter((comment) => {
70291
+ if (comment.id !== comment.groupId) {
70292
+ return false;
70293
+ }
70294
+ const ret = this.type === "current" ? !!comment.resolver : !comment.resolver;
70295
+ return ret;
70296
+ });
70297
+ const root2 = editor.rootContainer;
70298
+ const effectedElements = /* @__PURE__ */ new Set();
70299
+ invisibleComments.forEach((comment) => {
70300
+ const key = `comment-${comment.id.toLocaleLowerCase()}`;
70301
+ const elements = root2.querySelectorAll(`[${key}]`);
70302
+ elements.forEach((elem) => {
70303
+ elem.removeAttribute(key);
70304
+ effectedElements.add(elem);
70305
+ });
70306
+ });
70307
+ effectedElements.forEach((elem) => {
70308
+ const commentAttributes = Array.from(elem.attributes).filter((a) => a.name.startsWith("comment-"));
70309
+ if (commentAttributes.length === 0) {
70310
+ elem.classList.remove("comment");
70311
+ }
70312
+ });
70313
+ }));
70314
+ this.type = type;
70315
+ }
70316
+ renderText(editor, path, attributes) {
70317
+ const classes = [];
70318
+ const textAttributes = {};
70319
+ Object.entries(attributes).forEach(([key, value]) => {
70320
+ if (key.startsWith("comment-")) {
70321
+ this.renderCommentElement(editor, key, value, classes, textAttributes);
70322
+ }
70323
+ });
70324
+ return { classes, attributes: textAttributes };
70325
+ }
70326
+ renderBox(editor, path, attributes) {
70327
+ const classes = [];
70328
+ const textAttributes = {};
70329
+ Object.entries(attributes).forEach(([key, value]) => {
70330
+ if (key.startsWith("comment-")) {
70331
+ this.renderCommentElement(editor, key, value, classes, textAttributes);
70332
+ }
70333
+ });
70334
+ return { classes, attributes: textAttributes };
70335
+ }
70336
+ renderBlock(editor, path, blockData) {
70337
+ const comments = blockData.comments;
70338
+ if (!comments || comments.length === 0) {
70339
+ return {};
70340
+ }
70341
+ const classes = [];
70342
+ const attributes = {};
70343
+ comments.forEach((commentId) => {
70344
+ const key = `comment-${commentId.toLocaleLowerCase()}`;
70345
+ this.renderCommentElement(editor, key, commentId, classes, attributes);
70346
+ });
70347
+ return {
70348
+ classes,
70349
+ attributes
70350
+ };
70351
+ }
70352
+ updateBlock(editor, path, blockElement, blockData) {
70353
+ const comments = blockData.comments;
70354
+ removeClass(blockElement, "comment");
70355
+ Array.from(blockElement.attributes).forEach((a) => {
70356
+ if (a.name.startsWith("comment-")) {
70357
+ blockElement.removeAttribute(a.name);
70358
+ }
70359
+ });
70360
+ if (!comments || comments.length === 0) {
70361
+ return;
70362
+ }
70363
+ addClass(blockElement, "comment");
70364
+ const classList = [];
70365
+ comments.forEach((commentId) => {
70366
+ const key = `comment-${commentId.toLocaleLowerCase()}`;
70367
+ this.renderCommentElement(editor, key, commentId, classList, {});
70368
+ });
70369
+ if (classList.length > 0) {
70370
+ addClass(blockElement, ...classList);
70371
+ }
70372
+ }
70373
+ getCommentStatus(editor, commentId) {
70374
+ const comments = editor.findCustom("editor-comments");
70375
+ if (!comments) {
70376
+ return "unknown";
70377
+ }
70378
+ const commentsProvider = comments.commentProvider;
70379
+ const comment = commentsProvider.getComment(commentId);
70380
+ if (!comment) {
70381
+ return "unknown";
70382
+ }
70383
+ if (comment.resolver) {
70384
+ return "resolved";
70385
+ }
70386
+ return "unresolved";
70387
+ }
70388
+ renderCommentElement(editor, key, commentId, classes, textAttributes) {
70389
+ const status = this.getCommentStatus(editor, commentId);
70390
+ if (this.type === "current") {
70391
+ if (status === "resolved") {
70392
+ return;
70393
+ }
70394
+ } else {
70395
+ if (status === "unresolved") {
70396
+ return;
70397
+ }
70398
+ }
70399
+ classes.push("comment");
70400
+ textAttributes[key] = commentId;
70401
+ if (status === "unknown") {
70402
+ this.updateUnknownCommentsDelayed(editor);
70403
+ }
70404
+ }
70405
+ getComments(editor) {
70406
+ const editorComments = editor.findCustom("editor-comments");
70407
+ if (!editorComments) {
70408
+ return [];
70409
+ }
70410
+ const commentProvider = editorComments.commentProvider;
70411
+ return commentProvider.getComments();
70412
+ }
70413
+ changeType(editor, type) {
70414
+ this.type = type;
70415
+ const elements = editor.rootContainer.querySelectorAll(".comment");
70416
+ elements.forEach((elem) => {
70417
+ elem.classList.remove("comment");
70418
+ Array.from(elem.attributes).forEach((a) => {
70419
+ if (a.name.startsWith("comment-")) {
70420
+ elem.removeAttribute(a.name);
70421
+ }
70422
+ });
70423
+ });
70424
+ const comments = this.getComments(editor);
70425
+ const visibleComments = Object.values(comments).filter((comment) => {
70426
+ if (comment.id !== comment.groupId) {
70427
+ return false;
70428
+ }
70429
+ const ret = this.type === "current" ? !comment.resolver : !!comment.resolver;
70430
+ return ret;
70431
+ });
70432
+ const visibleCommentsId = new Set(visibleComments.map((c) => c.id));
70433
+ const commentsFromDoc = getBlockCommentsFromDoc(editor.doc.toJSON());
70434
+ commentsFromDoc.forEach((commentIds, blockId) => {
70435
+ if (Array.from(commentIds).some((c) => visibleCommentsId.has(c))) {
70436
+ const block = editor.findBlockById(blockId);
70437
+ if (block) {
70438
+ editor.reloadBlock(block);
70439
+ }
70440
+ }
70441
+ });
70442
+ }
69892
70443
  }
69893
70444
  const COMMENT_MINI_CLS = "comment-mini";
69894
70445
  getLogger("comment-list");
@@ -69898,6 +70449,43 @@ ${codeText}
69898
70449
  __publicField(this, "root");
69899
70450
  __publicField(this, "groupsContainer");
69900
70451
  __publicField(this, "list");
70452
+ __publicField(this, "listType", "current");
70453
+ __publicField(this, "switcherItem", {
70454
+ id: "switch-comment",
70455
+ name: i18n$1.t("comment.currentComment"),
70456
+ dropdown: true,
70457
+ manualShowChildren: true,
70458
+ childrenPlacement: "bottom-start",
70459
+ children: [{
70460
+ id: "current-comment",
70461
+ name: i18n$1.t("comment.currentComment"),
70462
+ states: ["checked"]
70463
+ }, {
70464
+ id: "resolved-comment",
70465
+ name: i18n$1.t("comment.resolvedComment")
70466
+ }]
70467
+ });
70468
+ __publicField(this, "switcherBar");
70469
+ __publicField(this, "noResolvedCommentTip", null);
70470
+ __publicField(this, "handleSwitchType", (bar2, item) => {
70471
+ if (item.id === "current-comment") {
70472
+ this.listType = "current";
70473
+ } else {
70474
+ this.listType = "resolved";
70475
+ }
70476
+ this.root.setAttribute("list-type", this.listType);
70477
+ this.switcherItem.name = this.listType === "current" ? i18n$1.t("comment.currentComment") : i18n$1.t("comment.resolvedComment");
70478
+ const children = this.switcherItem.children;
70479
+ children[0].states = this.listType === "current" ? ["checked"] : [];
70480
+ children[1].states = this.listType === "resolved" ? ["checked"] : [];
70481
+ this.switcherBar.updateItems([this.switcherItem]);
70482
+ this.list.changeType(this.listType);
70483
+ const renderer = this.editor.editorBlockRenders.getRenderers().find((r) => r instanceof OnesEditorCommentsRender);
70484
+ if (renderer) {
70485
+ renderer.changeType(this.editor, this.listType);
70486
+ }
70487
+ this.updateNoResolvedCommentTip();
70488
+ });
69901
70489
  __publicField(this, "handleSelectionOnComment", () => {
69902
70490
  this.emit("onSelectComment");
69903
70491
  });
@@ -69905,8 +70493,12 @@ ${codeText}
69905
70493
  var _a, _b;
69906
70494
  const count = getCommentsCountInDoc(this.editor, this.commentsProvider);
69907
70495
  (_b = (_a = this.commentOptions) == null ? void 0 : _a.onCommentCountChange) == null ? void 0 : _b.call(_a, count);
70496
+ this.updateNoResolvedCommentTip();
69908
70497
  });
69909
70498
  __publicField(this, "handleActiveItemChanged", (index2, direction) => {
70499
+ if (this.listType === "resolved") {
70500
+ return;
70501
+ }
69910
70502
  setTimeout(() => {
69911
70503
  var _a, _b;
69912
70504
  const item = this.list.activeItem;
@@ -69923,8 +70515,10 @@ ${codeText}
69923
70515
  this.editor = editor;
69924
70516
  this.commentsProvider = commentsProvider;
69925
70517
  this.root = createElement("div", ["editor-web-comment-root"], null);
70518
+ this.root.setAttribute("list-type", this.listType);
69926
70519
  this.groupsContainer = createElement("div", ["comment-groups-container"], this.root);
69927
70520
  this.list = this.createList();
70521
+ this.switcherBar = this.createSwitcher();
69928
70522
  this.commentsProvider.addListener(this);
69929
70523
  this.list.addListener("activeItemChanged", this.handleActiveItemChanged);
69930
70524
  this.list.addListener("itemLayoutUpdated", this.handleItemLayoutUpdated);
@@ -69937,10 +70531,13 @@ ${codeText}
69937
70531
  return commentOptions;
69938
70532
  }
69939
70533
  destroy() {
70534
+ var _a;
69940
70535
  this.list.removeAllListeners();
69941
70536
  this.commentsProvider.removeListener(this);
69942
70537
  this.list.destroy();
69943
70538
  this.root.remove();
70539
+ this.switcherBar.destroy();
70540
+ (_a = this.noResolvedCommentTip) == null ? void 0 : _a.remove();
69944
70541
  }
69945
70542
  onCreateComment(commentId, local) {
69946
70543
  const comment = this.commentsProvider.getComment(commentId);
@@ -69955,8 +70552,68 @@ ${codeText}
69955
70552
  const comment = this.commentsProvider.getComment(commentId);
69956
70553
  this.list.handleUpdateComment(comment);
69957
70554
  }
70555
+ onUpdateCommentResolver(commentId, local) {
70556
+ const comment = this.commentsProvider.getComment(commentId);
70557
+ if (!comment) {
70558
+ return;
70559
+ }
70560
+ let type = "add";
70561
+ if (this.listType === "current") {
70562
+ if (comment.resolver) {
70563
+ type = "remove";
70564
+ }
70565
+ } else {
70566
+ if (!comment.resolver) {
70567
+ type = "remove";
70568
+ }
70569
+ }
70570
+ const blocks = /* @__PURE__ */ new Set();
70571
+ if (type === "remove") {
70572
+ getElementsByCommentId(this.editor, commentId).forEach((element) => {
70573
+ if (isBlock$1(element)) {
70574
+ blocks.add(element);
70575
+ } else {
70576
+ const block = getParentBlock(element);
70577
+ if (block) {
70578
+ blocks.add(block);
70579
+ }
70580
+ }
70581
+ });
70582
+ } else {
70583
+ const blockIds = getBlocksByCommentId(this.editor.doc.toJSON(), commentId);
70584
+ blockIds.forEach((blockId) => {
70585
+ const block = this.editor.findBlockById(blockId);
70586
+ if (block) {
70587
+ blocks.add(block);
70588
+ }
70589
+ });
70590
+ }
70591
+ blocks.forEach((block) => {
70592
+ this.editor.reloadBlock(block);
70593
+ });
70594
+ setTimeout(() => {
70595
+ if (type === "add") {
70596
+ this.list.handleCreateComment(comment, local);
70597
+ } else {
70598
+ this.list.handleResolveComment(commentId);
70599
+ }
70600
+ this.updateCommentCount();
70601
+ }, 300);
70602
+ }
69958
70603
  createList() {
69959
- return new CommentGroupList(this.editor, this.commentsProvider, this.groupsContainer);
70604
+ return new CommentGroupList(this.editor, this.commentsProvider, this.groupsContainer, this.listType);
70605
+ }
70606
+ createSwitcher() {
70607
+ const container = createElement("div", ["comment-switcher-container"], this.root);
70608
+ const commandBar2 = new FixedToolbar(container, [this.switcherItem], {
70609
+ id: "comment-switcher"
70610
+ });
70611
+ commandBar2.addListener("click", this.handleSwitchType);
70612
+ return commandBar2;
70613
+ }
70614
+ setSwitcherParent(parent) {
70615
+ this.switcherBar.content.remove();
70616
+ parent.append(this.switcherBar.content);
69960
70617
  }
69961
70618
  isEditing(includeEmpty) {
69962
70619
  return this.list.isEditing(includeEmpty);
@@ -69964,6 +70621,18 @@ ${codeText}
69964
70621
  setFirstEditingCommentActive() {
69965
70622
  this.list.setFirstEditingCommentActive();
69966
70623
  }
70624
+ updateNoResolvedCommentTip() {
70625
+ var _a;
70626
+ if (this.listType === "resolved" && this.list.items.length === 0) {
70627
+ if (!this.noResolvedCommentTip) {
70628
+ this.noResolvedCommentTip = createElement("div", ["comment-no-resolved-tip"], this.groupsContainer);
70629
+ this.noResolvedCommentTip.innerText = i18n$1.t("comment.noResolvedComment");
70630
+ }
70631
+ return;
70632
+ }
70633
+ (_a = this.noResolvedCommentTip) == null ? void 0 : _a.remove();
70634
+ this.noResolvedCommentTip = null;
70635
+ }
69967
70636
  show(groupId) {
69968
70637
  var _a;
69969
70638
  removeClass(this.root, "hidden");
@@ -70099,7 +70768,7 @@ ${codeText}
70099
70768
  const logger$1c = getLogger("mobile-group-list");
70100
70769
  class MobileGroupList extends ListBase {
70101
70770
  constructor(editor, commentsProvider, parent, scrollElement) {
70102
- super(editor, commentsProvider, parent, getCommentsGroupFromDoc(editor, commentsProvider), {});
70771
+ super(editor, commentsProvider, parent, getUnresolvedCommentsGroupFromDoc(editor, commentsProvider), {});
70103
70772
  __publicField(this, "scroller");
70104
70773
  __publicField(this, "refreshScroller", () => {
70105
70774
  this.scroller.refresh();
@@ -70147,7 +70816,7 @@ ${codeText}
70147
70816
  this.updateComments();
70148
70817
  });
70149
70818
  __publicField(this, "updateComments", debounce__default.default(() => {
70150
- const commentsGroup = getCommentsGroupFromDoc(this.editor, this.commentsProvider);
70819
+ const commentsGroup = getUnresolvedCommentsGroupFromDoc(this.editor, this.commentsProvider);
70151
70820
  for (let i = 0; i < commentsGroup.length; i++) {
70152
70821
  const comment = commentsGroup[i];
70153
70822
  const groupItem = this.findGroupItem(comment.groupId);
@@ -70181,7 +70850,7 @@ ${codeText}
70181
70850
  return item;
70182
70851
  }
70183
70852
  findInsertPos(data2) {
70184
- const commentsMap = getCommentsGroupFromDoc(this.editor, this.commentsProvider);
70853
+ const commentsMap = getUnresolvedCommentsGroupFromDoc(this.editor, this.commentsProvider);
70185
70854
  const index2 = commentsMap.findIndex((group) => group.id === data2.id);
70186
70855
  if (index2 === -1) {
70187
70856
  return -1;
@@ -70317,6 +70986,8 @@ ${codeText}
70317
70986
  const comment = this.commentsProvider.getComment(commentId);
70318
70987
  this.list.handleUpdateComment(comment);
70319
70988
  }
70989
+ onUpdateCommentResolver(commentId, local) {
70990
+ }
70320
70991
  get commentOptions() {
70321
70992
  const commentOptions = this.editor.getComponentOptions("comment");
70322
70993
  return commentOptions;
@@ -70342,7 +71013,7 @@ ${codeText}
70342
71013
  }
70343
71014
  }
70344
71015
  function getMiniCommentsGroupFromDoc(editor, commentsProvider) {
70345
- const commentsGroupFromDoc = getCommentsGroupFromDoc(editor, commentsProvider);
71016
+ const commentsGroupFromDoc = getUnresolvedCommentsGroupFromDoc(editor, commentsProvider);
70346
71017
  const miniCommentGroups = /* @__PURE__ */ new Map();
70347
71018
  for (const commentGroup of commentsGroupFromDoc) {
70348
71019
  const blockId = getBlockIdByGroupId(editor, commentGroup.groupId);
@@ -70489,6 +71160,9 @@ ${codeText}
70489
71160
  }
70490
71161
  onUpdateComment(commentId, local) {
70491
71162
  }
71163
+ onUpdateCommentResolver(commentId, local) {
71164
+ this.list.updateMiniCommentsGroup();
71165
+ }
70492
71166
  show() {
70493
71167
  removeClass(this.root, "hidden");
70494
71168
  }
@@ -70757,6 +71431,15 @@ ${codeText}
70757
71431
  get isMobile() {
70758
71432
  return clientType.isMobile;
70759
71433
  }
71434
+ getCommentList() {
71435
+ return this.commentList;
71436
+ }
71437
+ getMobileCommentList() {
71438
+ return this.mobileCommentList;
71439
+ }
71440
+ getMiniCommentList() {
71441
+ return this.miniCommentList;
71442
+ }
70760
71443
  destroy() {
70761
71444
  var _a, _b;
70762
71445
  (_a = this.commentList) == null ? void 0 : _a.destroy();
@@ -70782,6 +71465,9 @@ ${codeText}
70782
71465
  if (containers.mobileContainer && this.mobileCommentList) {
70783
71466
  containers.mobileContainer.append(this.mobileCommentList.root);
70784
71467
  }
71468
+ if (containers.switchBarContainer && this.commentList) {
71469
+ this.commentList.setSwitcherParent(containers.switchBarContainer);
71470
+ }
70785
71471
  }
70786
71472
  }
70787
71473
  const style$7 = "";
@@ -70805,7 +71491,13 @@ ${codeText}
70805
71491
  more: "\u66F4\u591A",
70806
71492
  comment: "\u6DFB\u52A0\u6279\u6CE8",
70807
71493
  command: "\u6DFB\u52A0\u6279\u6CE8",
70808
- quickMenuCommand: "\u6DFB\u52A0\u6279\u6CE8"
71494
+ quickMenuCommand: "\u6DFB\u52A0\u6279\u6CE8",
71495
+ resolvedBy: "\u5DF2\u7531 {name} \u6210\u5458\u89E3\u51B3",
71496
+ reopen: "\u91CD\u65B0\u6253\u5F00",
71497
+ currentComment: "\u5F53\u524D\u6279\u6CE8",
71498
+ resolvedComment: "\u5DF2\u89E3\u51B3\u6279\u6CE8",
71499
+ removedFromDoc: "\u5F15\u7528\u5185\u5BB9\u5DF2\u5220\u9664",
71500
+ noResolvedComment: "\u65E0\u5DF2\u89E3\u51B3\u6279\u6CE8"
70809
71501
  }
70810
71502
  };
70811
71503
  const enUS$k = {
@@ -70828,7 +71520,13 @@ ${codeText}
70828
71520
  more: "More",
70829
71521
  comment: "Add annotation",
70830
71522
  command: "Add annotation",
70831
- quickMenuCommand: "Add annotation"
71523
+ quickMenuCommand: "Add annotation",
71524
+ resolvedBy: "Resolved by {name}",
71525
+ reopen: "Reopen",
71526
+ currentComment: "Current Annotations",
71527
+ resolvedComment: "Resolved Annotations",
71528
+ removedFromDoc: "This annotation has been removed from the document",
71529
+ noResolvedComment: "No resolved annotations"
70832
71530
  }
70833
71531
  };
70834
71532
  const jaJP$k = {
@@ -70851,7 +71549,13 @@ ${codeText}
70851
71549
  more: "\u305D\u306E\u4ED6",
70852
71550
  comment: "\u6CE8\u91C8\u3092\u8FFD\u52A0",
70853
71551
  command: "\u6CE8\u91C8\u3092\u8FFD\u52A0",
70854
- quickMenuCommand: "\u6CE8\u91C8\u3092\u8FFD\u52A0"
71552
+ quickMenuCommand: "\u6CE8\u91C8\u3092\u8FFD\u52A0",
71553
+ resolvedBy: "{name} \u306B\u3088\u3063\u3066\u89E3\u6C7A\u6E08\u307F",
71554
+ reopen: "\u518D\u958B",
71555
+ currentComment: "\u73FE\u5728\u306E\u6CE8\u91C8",
71556
+ resolvedComment: "\u89E3\u6C7A\u6E08\u307F\u306E\u6CE8\u91C8",
71557
+ removedFromDoc: "\u3053\u306E\u6CE8\u91C8\u306F\u6587\u66F8\u304B\u3089\u524A\u9664\u3055\u308C\u307E\u3057\u305F",
71558
+ noResolvedComment: "\u89E3\u6C7A\u6E08\u307F\u306E\u6CE8\u91C8\u306F\u3042\u308A\u307E\u305B\u3093"
70855
71559
  }
70856
71560
  };
70857
71561
  i18n$1.mergeLang({
@@ -70859,61 +71563,6 @@ ${codeText}
70859
71563
  "en-US": enUS$k,
70860
71564
  "ja-JP": jaJP$k
70861
71565
  });
70862
- class OnesEditorCommentsRender {
70863
- renderText(editor, path, attributes) {
70864
- const classes = [];
70865
- const textAttributes = {};
70866
- Object.entries(attributes).forEach(([key, value]) => {
70867
- if (key.startsWith("comment-")) {
70868
- classes.push("comment");
70869
- textAttributes[key] = value;
70870
- }
70871
- });
70872
- return { classes, attributes: textAttributes };
70873
- }
70874
- renderBox(editor, path, attributes) {
70875
- const classes = [];
70876
- const textAttributes = {};
70877
- Object.entries(attributes).forEach(([key, value]) => {
70878
- if (key.startsWith("comment-")) {
70879
- classes.push("comment");
70880
- textAttributes[key] = value;
70881
- }
70882
- });
70883
- return { classes, attributes: textAttributes };
70884
- }
70885
- renderBlock(editor, path, blockData) {
70886
- const comments = blockData.comments;
70887
- if (!comments || comments.length === 0) {
70888
- return {};
70889
- }
70890
- const classes = ["comment"];
70891
- const attributes = {};
70892
- comments.forEach((commentId) => {
70893
- attributes[`comment-${commentId.toLocaleLowerCase()}`] = commentId;
70894
- });
70895
- return {
70896
- classes,
70897
- attributes
70898
- };
70899
- }
70900
- updateBlock(editor, path, blockElement, blockData) {
70901
- const comments = blockData.comments;
70902
- removeClass(blockElement, "comment");
70903
- Array.from(blockElement.attributes).forEach((a) => {
70904
- if (a.name.startsWith("comment-")) {
70905
- blockElement.removeAttribute(a.name);
70906
- }
70907
- });
70908
- if (!comments || comments.length === 0) {
70909
- return;
70910
- }
70911
- addClass(blockElement, "comment");
70912
- comments.forEach((commentId) => {
70913
- blockElement.setAttribute(`comment-${commentId.toLocaleLowerCase()}`, commentId);
70914
- });
70915
- }
70916
- }
70917
71566
  class OnesEditorCommentPlaceholderHandler {
70918
71567
  constructor(editor) {
70919
71568
  __publicField(this, "handleUpdateCompositionText", (editor, containerId, blockIndex, offset, end) => {
@@ -71065,6 +71714,21 @@ ${codeText}
71065
71714
  method: "delete"
71066
71715
  });
71067
71716
  }
71717
+ function updateCommentResolverToOldDoc(editor, version, commentId, resolver) {
71718
+ var _a, _b;
71719
+ const doc2 = editor.doc;
71720
+ const server = (_b = (_a = doc2.getServerMeta) == null ? void 0 : _a.call(doc2)) == null ? void 0 : _b.apiServer;
71721
+ assert(logger$16, server, "apiServer is not set");
71722
+ const api = `${server}/${version}/comments/${commentId}/resolver`;
71723
+ return doc2.request(api, {
71724
+ method: "put",
71725
+ data: {
71726
+ resolver
71727
+ }
71728
+ });
71729
+ }
71730
+ getLogger("resolved-comment-item");
71731
+ const styles = "";
71068
71732
  const isAllContainersSelected = (editor) => {
71069
71733
  var _a;
71070
71734
  const range = editor.selection.range;
@@ -71139,6 +71803,16 @@ ${codeText}
71139
71803
  await updateCommentToOldDoc(this.editor, this.version, commentId, comments.commentProvider.getCommentDoc(commentId));
71140
71804
  }
71141
71805
  }
71806
+ onUpdateCommentResolver(commentId, local) {
71807
+ const comments = this.editor.getCustom("editor-comments");
71808
+ const provider = comments.commentProvider;
71809
+ const comment = provider.getComment(commentId);
71810
+ if (!comment) {
71811
+ return;
71812
+ }
71813
+ const resolver = comment.resolver;
71814
+ updateCommentResolverToOldDoc(this.editor, this.version, commentId, resolver);
71815
+ }
71142
71816
  hideToolbar(editor) {
71143
71817
  const toolbar2 = editor.findCustom("toolbar-handler");
71144
71818
  toolbar2 == null ? void 0 : toolbar2.disableTextToolbar();
@@ -72017,8 +72691,8 @@ ${codeText}
72017
72691
  const blockData = this.editor.getBlockData(this.activeTableBlock);
72018
72692
  const containerId = focus.childContainerId;
72019
72693
  const bkg = blockData[`${containerId}_background`];
72020
- if (bkg) {
72021
- return Number.parseInt((_a = bkg.substring(BACKGROUND_COLOR_PREFIX.length)) != null ? _a : "0", 10);
72694
+ if (bkg && bkg.startsWith(BACKGROUND_COLOR_PREFIX)) {
72695
+ return Number.parseInt((_a = bkg.substring(BACKGROUND_COLOR_PREFIX.length)) != null ? _a : "0", 10) || -1;
72022
72696
  }
72023
72697
  return -1;
72024
72698
  }
@@ -72481,8 +73155,12 @@ ${codeText}
72481
73155
  cellElem.rowSpan = cell.rowSpan;
72482
73156
  }
72483
73157
  const backgroundClass = tableData[getCellBkgColorKey(subContainerId)];
72484
- if (backgroundClass) {
72485
- addClass(cellElem, backgroundClass);
73158
+ if (backgroundClass && typeof backgroundClass === "string") {
73159
+ if (backgroundClass.startsWith("style-bg-")) {
73160
+ addClass(cellElem, backgroundClass);
73161
+ } else {
73162
+ cellElem.style.backgroundColor = backgroundClass;
73163
+ }
72486
73164
  }
72487
73165
  if (col === 0 && tableData.hasColTitle) {
72488
73166
  addClass(cellElem, TABLE_CLASS.COL_TITLE_ITEM);
@@ -76447,14 +77125,14 @@ ${docStr}
76447
77125
  }
76448
77126
  function isList(elem) {
76449
77127
  var _a;
76450
- const styles = Array.from(((_a = elem.getAttribute("style")) != null ? _a : "").split(" "));
76451
- return styles.findIndex((style2) => style2.startsWith("level")) !== -1;
77128
+ const styles2 = Array.from(((_a = elem.getAttribute("style")) != null ? _a : "").split(" "));
77129
+ return styles2.findIndex((style2) => style2.startsWith("level")) !== -1;
76452
77130
  }
76453
77131
  function getOfficeListGroupId(elem) {
76454
77132
  var _a;
76455
- const styles = Array.from(((_a = elem.getAttribute("style")) != null ? _a : "").split(" "));
76456
- for (let i = 0; i < styles.length; i++) {
76457
- const name = styles[i];
77133
+ const styles2 = Array.from(((_a = elem.getAttribute("style")) != null ? _a : "").split(" "));
77134
+ for (let i = 0; i < styles2.length; i++) {
77135
+ const name = styles2[i];
76458
77136
  if (name.startsWith("mso-list:")) {
76459
77137
  return name;
76460
77138
  }
@@ -76463,9 +77141,9 @@ ${docStr}
76463
77141
  }
76464
77142
  function getLevel(elem) {
76465
77143
  var _a, _b;
76466
- const styles = Array.from(((_a = elem.getAttribute("style")) != null ? _a : "").split(" "));
76467
- for (let i = 0; i < styles.length; i++) {
76468
- const name = styles[i];
77144
+ const styles2 = Array.from(((_a = elem.getAttribute("style")) != null ? _a : "").split(" "));
77145
+ for (let i = 0; i < styles2.length; i++) {
77146
+ const name = styles2[i];
76469
77147
  if (name.startsWith("level")) {
76470
77148
  const level = (_b = Number.parseInt(name.substring(5), 10)) != null ? _b : void 0;
76471
77149
  if (level) {
@@ -80069,6 +80747,8 @@ ${docStr}
80069
80747
  }
80070
80748
  onUpdateComment() {
80071
80749
  }
80750
+ onUpdateCommentResolver(commentId, local) {
80751
+ }
80072
80752
  }
80073
80753
  async function playHistoryData(doc2, versionHelper, historyData) {
80074
80754
  for (const data2 of historyData) {
@@ -85011,7 +85691,7 @@ ${data2.flowchartText}
85011
85691
  };
85012
85692
  const drawioIframeUrl = "https://embed.diagrams.net/?embed=1";
85013
85693
  const DrawioJsUrl = "https://www.draw.io/embed.js";
85014
- const PakoJsUrl = "https://cdn.jsdelivr.net/npm/pako@2.0.3/dist/pako.es5.min.js";
85694
+ const PakoJsUrl = "https://cdn.jsdelivr.net/npm/pako@2.0.3/dist/pako.es5.js";
85015
85695
  const EmptyIcon = '<svg width="48" height="49" viewBox="0 0 48 49" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect x="27" y="18.5" width="18" height="9" stroke="#C7C7C7" stroke-width="3"/>\n<rect x="12" y="18.5" width="9" height="9" transform="rotate(45 12 18.5)" stroke="#C7C7C7" stroke-width="3"/>\n<rect x="27" y="36.5" width="18" height="9" stroke="#C7C7C7" stroke-width="3"/>\n<path d="M27 24.5L18 24.5" stroke="#C7C7C7" stroke-width="3"/>\n<path d="M28.5 41H18" stroke="#C7C7C7" stroke-width="3"/>\n<path d="M18 41H12L12 30.5" stroke="#C7C7C7" stroke-width="3"/>\n<path d="M12 21.5L12 12.5" stroke="#C7C7C7" stroke-width="3"/>\n<rect x="7.5" y="3.5" width="9" height="9" rx="4.5" stroke="#C7C7C7" stroke-width="3"/>\n</svg>\n';
85016
85696
  const DEFAULT_STYLES = `
85017
85697
  <mxStylesheet>
@@ -85431,13 +86111,10 @@ ${data2.flowchartText}
85431
86111
  drawioIframe.setAttribute("src", iframeUrl);
85432
86112
  }
85433
86113
  async function initDrawIo(editor) {
85434
- var _a, _b, _c, _d, _e;
86114
+ var _a, _b;
85435
86115
  const option = getDrawioOptions(editor);
85436
- const drawIoUrl = ((_a = option.cdn) == null ? void 0 : _a.drawioJs) || DrawioJsUrl;
86116
+ const drawIoUrl = ((_a = option.cdn) == null ? void 0 : _a.drawio) || DrawioJsUrl;
85437
86117
  const pakoUrl = ((_b = option.cdn) == null ? void 0 : _b.pako) || PakoJsUrl;
85438
- window.DRAWIO_BASE_URL = ((_c = option.cdn) == null ? void 0 : _c.drawioBaseUrl) || void 0;
85439
- window.DRAWIO_LIGHTBOX_URL = ((_d = option.cdn) == null ? void 0 : _d.drawioBaseUrl) || void 0;
85440
- window.STENCIL_PATH = ((_e = option.cdn) == null ? void 0 : _e.drawioBaseUrl) ? `${option.cdn.drawioBaseUrl}/stencils` : void 0;
85441
86118
  await loadJsPromise(pakoUrl, "editor-pako");
85442
86119
  await loadJsPromise(drawIoUrl, "editor-drawio");
85443
86120
  }
@@ -90234,6 +90911,9 @@ ${data2.plantumlText}
90234
90911
  localUpdateComment(comment, doc2) {
90235
90912
  this.doc.localUpdateComment(comment, doc2);
90236
90913
  }
90914
+ localUpdateCommentResolver(commentId, resolver) {
90915
+ this.doc.localUpdateCommentResolver(commentId, resolver);
90916
+ }
90237
90917
  onCreateComment(commentId, local) {
90238
90918
  Array.from(this.listeners.values()).forEach((listener) => listener.onCreateComment(commentId, local));
90239
90919
  }
@@ -90243,6 +90923,9 @@ ${data2.plantumlText}
90243
90923
  onUpdateComment(commentId, local) {
90244
90924
  Array.from(this.listeners.values()).forEach((listener) => listener.onUpdateComment(commentId, local));
90245
90925
  }
90926
+ onUpdateCommentResolver(commentId, local) {
90927
+ Array.from(this.listeners.values()).forEach((listener) => listener.onUpdateCommentResolver(commentId, local));
90928
+ }
90246
90929
  addListener(callback) {
90247
90930
  this.listeners.add(callback);
90248
90931
  }
@@ -90268,9 +90951,10 @@ ${data2.plantumlText}
90268
90951
  constructor(editor, localDoc) {
90269
90952
  __publicField(this, "_listeners", /* @__PURE__ */ new Set());
90270
90953
  __publicField(this, "_doc");
90954
+ var _a, _b;
90271
90955
  this.editor = editor;
90272
90956
  this.localDoc = localDoc;
90273
- this._doc = this.localDoc.toJSON();
90957
+ this._doc = ((_b = (_a = this.localDoc).rawData) == null ? void 0 : _b.call(_a)) || this.localDoc.toJSON();
90274
90958
  }
90275
90959
  get doc() {
90276
90960
  return this._doc;
@@ -90325,6 +91009,17 @@ ${data2.plantumlText}
90325
91009
  this._doc.comments[id] = shareDBComment;
90326
91010
  Array.from(this._listeners.values()).forEach((listener) => listener.onUpdateComment(id, true));
90327
91011
  }
91012
+ localUpdateCommentResolver(commentId, resolver) {
91013
+ const comment = this.getComment(commentId);
91014
+ if (comment) {
91015
+ if (resolver) {
91016
+ comment.resolver = resolver;
91017
+ } else {
91018
+ delete comment.resolver;
91019
+ }
91020
+ Array.from(this._listeners.values()).forEach((listener) => listener.onUpdateCommentResolver(commentId, true));
91021
+ }
91022
+ }
90328
91023
  createCommentEditor(parent, childDoc) {
90329
91024
  const commentEditor = createCommentEditor(this.editor, {
90330
91025
  root: parent,
@@ -91062,8 +91757,8 @@ ${data2.plantumlText}
91062
91757
  const inlineStyles = attributesOfText(text2, "inlineStyle");
91063
91758
  if (inlineStyles == null)
91064
91759
  return;
91065
- const styles = inlineStyles.split(";");
91066
- for (const style2 of styles) {
91760
+ const styles2 = inlineStyles.split(";");
91761
+ for (const style2 of styles2) {
91067
91762
  const pair = style2.split(":");
91068
91763
  if (pair.length !== 2)
91069
91764
  continue;
@@ -93116,7 +93811,7 @@ ${data2.plantumlText}
93116
93811
  }
93117
93812
  }
93118
93813
  });
93119
- editor.version = "2.8.24";
93814
+ editor.version = "2.8.25-beta.10";
93120
93815
  return editor;
93121
93816
  }
93122
93817
  function isDoc(doc2) {
@@ -93229,7 +93924,7 @@ ${data2.plantumlText}
93229
93924
  }
93230
93925
  });
93231
93926
  OnesEditorToolbar.register(editor);
93232
- editor.version = "2.8.24";
93927
+ editor.version = "2.8.25-beta.10";
93233
93928
  return editor;
93234
93929
  }
93235
93930
  async function showDocVersions(editor, options, serverUrl) {
@@ -139049,6 +139744,7 @@ ${data2.plantumlText}
139049
139744
  exports2.CheckMarkIcon = CheckMarkIcon;
139050
139745
  exports2.CheckboxIcon = CheckboxIcon;
139051
139746
  exports2.CircleAddIcon = CircleAddIcon;
139747
+ exports2.CircleCheckMarkIcon = CircleCheckMarkIcon;
139052
139748
  exports2.ClearIcon = ClearIcon;
139053
139749
  exports2.ClipboardProvider = ClipboardProvider;
139054
139750
  exports2.CloseIcon = CloseIcon;
@@ -139199,6 +139895,8 @@ ${data2.plantumlText}
139199
139895
  exports2.MoreItem = MoreItem;
139200
139896
  exports2.NextIcon = NextIcon;
139201
139897
  exports2.OnesEditorAutoSuggest = OnesEditorAutoSuggest;
139898
+ exports2.OnesEditorComments = OnesEditorComments;
139899
+ exports2.OnesEditorCommentsRender = OnesEditorCommentsRender;
139202
139900
  exports2.OnesEditorCustomDataWrapper = OnesEditorCustomDataWrapper;
139203
139901
  exports2.OnesEditorExclusiveBlock = OnesEditorExclusiveBlock;
139204
139902
  exports2.OnesEditorHoveringBlock = OnesEditorHoveringBlock;