@univerjs/thread-comment-ui 1.3.0 → 1.4.0

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 (63) hide show
  1. package/lib/cjs/index.js +45 -69
  2. package/lib/cjs/locale/ar-SA.js +1 -2
  3. package/lib/cjs/locale/ca-ES.js +1 -2
  4. package/lib/cjs/locale/de-DE.js +1 -2
  5. package/lib/cjs/locale/en-US.js +1 -2
  6. package/lib/cjs/locale/es-ES.js +1 -2
  7. package/lib/cjs/locale/fa-IR.js +1 -2
  8. package/lib/cjs/locale/fr-FR.js +1 -2
  9. package/lib/cjs/locale/id-ID.js +1 -2
  10. package/lib/cjs/locale/it-IT.js +1 -2
  11. package/lib/cjs/locale/ja-JP.js +1 -2
  12. package/lib/cjs/locale/ko-KR.js +1 -2
  13. package/lib/cjs/locale/pl-PL.js +1 -2
  14. package/lib/cjs/locale/pt-BR.js +1 -2
  15. package/lib/cjs/locale/ru-RU.js +1 -2
  16. package/lib/cjs/locale/sk-SK.js +1 -2
  17. package/lib/cjs/locale/vi-VN.js +1 -2
  18. package/lib/cjs/locale/zh-CN.js +1 -2
  19. package/lib/cjs/locale/zh-HK.js +1 -2
  20. package/lib/cjs/locale/zh-TW.js +1 -2
  21. package/lib/es/index.js +45 -69
  22. package/lib/es/locale/ar-SA.js +1 -2
  23. package/lib/es/locale/ca-ES.js +1 -2
  24. package/lib/es/locale/de-DE.js +1 -2
  25. package/lib/es/locale/en-US.js +1 -2
  26. package/lib/es/locale/es-ES.js +1 -2
  27. package/lib/es/locale/fa-IR.js +1 -2
  28. package/lib/es/locale/fr-FR.js +1 -2
  29. package/lib/es/locale/id-ID.js +1 -2
  30. package/lib/es/locale/it-IT.js +1 -2
  31. package/lib/es/locale/ja-JP.js +1 -2
  32. package/lib/es/locale/ko-KR.js +1 -2
  33. package/lib/es/locale/pl-PL.js +1 -2
  34. package/lib/es/locale/pt-BR.js +1 -2
  35. package/lib/es/locale/ru-RU.js +1 -2
  36. package/lib/es/locale/sk-SK.js +1 -2
  37. package/lib/es/locale/vi-VN.js +1 -2
  38. package/lib/es/locale/zh-CN.js +1 -2
  39. package/lib/es/locale/zh-HK.js +1 -2
  40. package/lib/es/locale/zh-TW.js +1 -2
  41. package/lib/index.css +14 -2
  42. package/lib/index.js +45 -69
  43. package/lib/locale/ar-SA.js +1 -2
  44. package/lib/locale/ca-ES.js +1 -2
  45. package/lib/locale/de-DE.js +1 -2
  46. package/lib/locale/en-US.js +1 -2
  47. package/lib/locale/es-ES.js +1 -2
  48. package/lib/locale/fa-IR.js +1 -2
  49. package/lib/locale/fr-FR.js +1 -2
  50. package/lib/locale/id-ID.js +1 -2
  51. package/lib/locale/it-IT.js +1 -2
  52. package/lib/locale/ja-JP.js +1 -2
  53. package/lib/locale/ko-KR.js +1 -2
  54. package/lib/locale/pl-PL.js +1 -2
  55. package/lib/locale/pt-BR.js +1 -2
  56. package/lib/locale/ru-RU.js +1 -2
  57. package/lib/locale/sk-SK.js +1 -2
  58. package/lib/locale/vi-VN.js +1 -2
  59. package/lib/locale/zh-CN.js +1 -2
  60. package/lib/locale/zh-HK.js +1 -2
  61. package/lib/locale/zh-TW.js +1 -2
  62. package/lib/umd/index.js +4 -4
  63. package/package.json +14 -14
package/lib/es/index.js CHANGED
@@ -9,7 +9,7 @@ import { DeleteIcon, IncreaseIcon, MoreHorizontalIcon, MoreLeftIcon, ReplyToComm
9
9
  import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
 
12
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
12
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
13
13
  function _typeof(o) {
14
14
  "@babel/helpers - typeof";
15
15
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -19,8 +19,7 @@ function _typeof(o) {
19
19
  }, _typeof(o);
20
20
  }
21
21
 
22
- //#endregion
23
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
22
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
24
23
  function toPrimitive(t, r) {
25
24
  if ("object" != _typeof(t) || !t) return t;
26
25
  var e = t[Symbol.toPrimitive];
@@ -32,15 +31,13 @@ function toPrimitive(t, r) {
32
31
  return ("string" === r ? String : Number)(t);
33
32
  }
34
33
 
35
- //#endregion
36
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
34
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
37
35
  function toPropertyKey(t) {
38
36
  var i = toPrimitive(t, "string");
39
37
  return "symbol" == _typeof(i) ? i : i + "";
40
38
  }
41
39
 
42
- //#endregion
43
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
40
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
44
41
  function _defineProperty(e, r, t) {
45
42
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
46
43
  value: t,
@@ -50,16 +47,14 @@ function _defineProperty(e, r, t) {
50
47
  }) : e[r] = t, e;
51
48
  }
52
49
 
53
- //#endregion
54
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
50
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/decorateParam.js
55
51
  function __decorateParam(paramIndex, decorator) {
56
52
  return function(target, key) {
57
53
  decorator(target, key, paramIndex);
58
54
  };
59
55
  }
60
56
 
61
- //#endregion
62
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
57
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/decorate.js
63
58
  function __decorate(decorators, target, key, desc) {
64
59
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
65
60
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -67,8 +62,7 @@ function __decorate(decorators, target, key, desc) {
67
62
  return c > 3 && r && Object.defineProperty(target, key, r), r;
68
63
  }
69
64
 
70
- //#endregion
71
- //#region src/services/thread-comment-panel.service.ts
65
+ // src/services/thread-comment-panel.service.ts
72
66
  let ThreadCommentPanelService = class ThreadCommentPanelService extends Disposable {
73
67
  constructor(_sidebarService) {
74
68
  super();
@@ -119,8 +113,7 @@ let ThreadCommentPanelService = class ThreadCommentPanelService extends Disposab
119
113
  };
120
114
  ThreadCommentPanelService = __decorate([__decorateParam(0, Inject(ISidebarService))], ThreadCommentPanelService);
121
115
 
122
- //#endregion
123
- //#region src/commands/operations/comment.operations.ts
116
+ // src/commands/operations/comment.operations.ts
124
117
  const SetActiveCommentOperation = {
125
118
  id: "thread-comment-ui.operation.set-active-comment",
126
119
  type: CommandType.OPERATION,
@@ -130,19 +123,16 @@ const SetActiveCommentOperation = {
130
123
  }
131
124
  };
132
125
 
133
- //#endregion
134
- //#region package.json
126
+ // package.json
135
127
  var name = "@univerjs/thread-comment-ui";
136
- var version = "1.3.0";
128
+ var version = "1.4.0";
137
129
 
138
- //#endregion
139
- //#region src/config/config.ts
130
+ // src/config/config.ts
140
131
  const THREAD_COMMENT_UI_PLUGIN_CONFIG_KEY = "thread-comment-ui.config";
141
132
  const configSymbol = Symbol(THREAD_COMMENT_UI_PLUGIN_CONFIG_KEY);
142
133
  const defaultPluginConfig = {};
143
134
 
144
- //#endregion
145
- //#region src/services/thread-comment-draft.service.ts
135
+ // src/services/thread-comment-draft.service.ts
146
136
  let ThreadCommentDraftService = class ThreadCommentDraftService extends Disposable {
147
137
  constructor(instanceService, _userManagerService) {
148
138
  super();
@@ -207,8 +197,7 @@ let ThreadCommentDraftService = class ThreadCommentDraftService extends Disposab
207
197
  };
208
198
  ThreadCommentDraftService = __decorate([__decorateParam(0, IUniverInstanceService), __decorateParam(1, Inject(UserManagerService))], ThreadCommentDraftService);
209
199
 
210
- //#endregion
211
- //#region src/types/const.ts
200
+ // src/types/const.ts
212
201
  /**
213
202
  * Copyright 2023-present DreamNum Co., Ltd.
214
203
  *
@@ -226,8 +215,7 @@ ThreadCommentDraftService = __decorate([__decorateParam(0, IUniverInstanceServic
226
215
  */
227
216
  const PLUGIN_NAME = "UNIVER_THREAD_COMMENT_UI_PLUGIN";
228
217
 
229
- //#endregion
230
- //#region src/mobile-plugin.ts
218
+ // src/mobile-plugin.ts
231
219
  let UniverThreadCommentMobileUIPlugin = class UniverThreadCommentMobileUIPlugin extends Plugin {
232
220
  constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
233
221
  super();
@@ -258,8 +246,7 @@ UniverThreadCommentMobileUIPlugin = __decorate([
258
246
  __decorateParam(3, IConfigService)
259
247
  ], UniverThreadCommentMobileUIPlugin);
260
248
 
261
- //#endregion
262
- //#region src/plugin.ts
249
+ // src/plugin.ts
263
250
  let UniverThreadCommentUIPlugin = class UniverThreadCommentUIPlugin extends Plugin {
264
251
  constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
265
252
  super();
@@ -292,8 +279,7 @@ UniverThreadCommentUIPlugin = __decorate([
292
279
  __decorateParam(3, IConfigService)
293
280
  ], UniverThreadCommentUIPlugin);
294
281
 
295
- //#endregion
296
- //#region src/render-objects/thread-comment-canvas-overlay.ts
282
+ // src/render-objects/thread-comment-canvas-overlay.ts
297
283
  const MARKER_SIZE = 24;
298
284
  const MARKER_IDLE_OPACITY = .58;
299
285
  const MARKER_PREVIEW_OPACITY = .42;
@@ -452,8 +438,7 @@ var ThreadCommentCanvasOverlay = class extends BaseObject {
452
438
  }
453
439
  };
454
440
 
455
- //#endregion
456
- //#region src/views/thread-comment-panel/util.ts
441
+ // src/views/thread-comment-panel/util.ts
457
442
  function isSameThreadCommentTarget(active, comment) {
458
443
  return (active === null || active === void 0 ? void 0 : active.unitId) === comment.unitId && active.subUnitId === comment.subUnitId && active.commentId === comment.id;
459
444
  }
@@ -475,8 +460,7 @@ function getThreadCommentPanelItemKey(comment, index, section) {
475
460
  ].join("-");
476
461
  }
477
462
 
478
- //#endregion
479
- //#region src/views/thread-comment-editor/util.ts
463
+ // src/views/thread-comment-editor/util.ts
480
464
  const transformDocument2TextNodesInParagraph = (doc) => {
481
465
  const { dataStream, customRanges } = doc;
482
466
  const end = dataStream.endsWith("\r\n") ? dataStream.length - 2 : dataStream.length;
@@ -576,15 +560,13 @@ function focusThreadCommentEditor(editorService, editorId, editor) {
576
560
  editor === null || editor === void 0 || editor.focus();
577
561
  }
578
562
 
579
- //#endregion
580
- //#region src/views/thread-comment-tree/util.ts
563
+ // src/views/thread-comment-tree/util.ts
581
564
  function getThreadCommentEditorId(params) {
582
565
  const { location, unitId, subUnitId, commentId, fallbackId } = params;
583
566
  return `${DOCS_COMMENT_EDITOR_UNIT_ID_KEY}_${location}_${unitId}_${subUnitId}_${commentId || fallbackId}`;
584
567
  }
585
568
 
586
- //#endregion
587
- //#region src/views/ThreadCommentEditor.tsx
569
+ // src/views/ThreadCommentEditor.tsx
588
570
  function getSnapshot(body) {
589
571
  return {
590
572
  id: "d",
@@ -751,27 +733,13 @@ const ThreadCommentEditor = forwardRef((props, ref) => {
751
733
  });
752
734
  });
753
735
 
754
- //#endregion
755
- //#region src/views/ThreadCommentTree.tsx
736
+ // src/views/ThreadCommentTree.tsx
756
737
  let ThreadCommentTreeLocation = /* @__PURE__ */ function(ThreadCommentTreeLocation) {
757
738
  ThreadCommentTreeLocation["CELL"] = "CELL";
758
739
  ThreadCommentTreeLocation["PANEL"] = "PANEL";
759
740
  return ThreadCommentTreeLocation;
760
741
  }({});
761
742
  const MOCK_ID = "__mock__";
762
- function formatCommentDateTime(value, region) {
763
- const date = dateKit(value);
764
- const regionTag = LOCALE_META[region].tag;
765
- return date.formatIntl(regionTag, {
766
- year: "numeric",
767
- month: "numeric",
768
- day: "numeric",
769
- hour: "2-digit",
770
- minute: "2-digit",
771
- hour12: false,
772
- numberingSystem: "latn"
773
- });
774
- }
775
743
  const ThreadCommentItem = (props) => {
776
744
  const { item, unitId, subUnitId, editing, onEditingChange, onReply, resolved, isRoot, onClose, onDeleteComment, onAfterDeleteComment, type, threadCommentEditorId, DropdownComponent, EditorComponent } = props;
777
745
  const commandService = useDependency(ICommandService);
@@ -788,6 +756,19 @@ const ThreadCommentItem = (props) => {
788
756
  const avatarFallback = uiConfig === null || uiConfig === void 0 ? void 0 : uiConfig.avatarFallback;
789
757
  const currentRegion = useObservable(regionService.currentRegion$, regionService.getCurrentRegion());
790
758
  const direction = useObservable(localeService.direction$, localeService.getDirection());
759
+ function formatCommentDateTime(value, region) {
760
+ const date = dateKit(value);
761
+ const regionTag = LOCALE_META[region].tag;
762
+ return date.formatIntl(regionTag, {
763
+ year: "numeric",
764
+ month: "numeric",
765
+ day: "numeric",
766
+ hour: "2-digit",
767
+ minute: "2-digit",
768
+ hour12: false,
769
+ numberingSystem: "latn"
770
+ });
771
+ }
791
772
  const dateText = isMock ? null : formatCommentDateTime(item.dT, currentRegion);
792
773
  const handleDeleteItem = async () => {
793
774
  if ((onDeleteComment === null || onDeleteComment === void 0 ? void 0 : onDeleteComment(item)) === false) return;
@@ -821,7 +802,7 @@ const ThreadCommentItem = (props) => {
821
802
  }), /* @__PURE__ */ jsxs("div", { children: [isMock || resolved ? null : showReply && user ? /* @__PURE__ */ jsx("button", {
822
803
  type: "button",
823
804
  "aria-label": localeService.t("thread-comment-ui.editor.reply"),
824
- className: "univer-ml-1 univer-inline-flex univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-sm univer-border-0 univer-bg-transparent univer-p-0 univer-text-base hover:univer-bg-gray-50 rtl:univer-ml-0 rtl:univer-mr-1 dark:hover:!univer-bg-gray-800",
805
+ className: "univer-ml-1 univer-inline-flex univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-sm univer-border-0 univer-bg-transparent univer-p-0 univer-text-base univer-text-inherit hover:univer-bg-gray-50 rtl:univer-ml-0 rtl:univer-mr-1 dark:hover:!univer-bg-gray-800",
825
806
  onClick: () => onReply(user),
826
807
  children: /* @__PURE__ */ jsx(ReplyToCommentIcon, {})
827
808
  }) : null, isCommentBySelf && !isMock && !resolved ? /* @__PURE__ */ jsx(DropdownComponent, {
@@ -829,15 +810,15 @@ const ThreadCommentItem = (props) => {
829
810
  dir: direction,
830
811
  className: "univer-rounded-lg",
831
812
  children: /* @__PURE__ */ jsxs("ul", {
832
- className: "univer-m-0 univer-box-border univer-grid univer-list-none univer-p-1.5 univer-text-sm rtl:univer-text-right [&_button]:univer-block [&_button]:univer-w-full [&_button]:univer-cursor-pointer [&_button]:univer-rounded [&_button]:univer-border-0 [&_button]:univer-bg-transparent [&_button]:univer-px-2 [&_button]:univer-py-1.5 [&_button]:univer-text-left [&_button]:univer-transition-colors rtl:[&_button]:univer-text-right",
813
+ className: "univer-m-0 univer-box-border univer-grid univer-list-none univer-p-1.5 univer-text-sm rtl:univer-text-right [&_button]:univer-block [&_button]:univer-w-full [&_button]:univer-cursor-pointer [&_button]:univer-rounded [&_button]:univer-border-0 [&_button]:univer-bg-transparent [&_button]:univer-px-2 [&_button]:univer-py-1.5 [&_button]:univer-text-left [&_button]:univer-text-inherit [&_button]:univer-transition-colors rtl:[&_button]:univer-text-right",
833
814
  children: [/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
834
815
  type: "button",
835
- className: "hover:univer-bg-gray-200 dark:hover:!univer-bg-gray-800",
816
+ className: "hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-600",
836
817
  onClick: () => onEditingChange === null || onEditingChange === void 0 ? void 0 : onEditingChange(true),
837
818
  children: localeService.t("thread-comment-ui.item.edit")
838
819
  }) }), /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
839
820
  type: "button",
840
- className: "hover:univer-bg-gray-200 dark:hover:!univer-bg-gray-800",
821
+ className: "hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-600",
841
822
  onClick: handleDeleteItem,
842
823
  children: localeService.t("thread-comment-ui.item.delete")
843
824
  }) })]
@@ -846,7 +827,7 @@ const ThreadCommentItem = (props) => {
846
827
  children: /* @__PURE__ */ jsx("button", {
847
828
  type: "button",
848
829
  "aria-label": localeService.t("thread-comment-ui.item.more"),
849
- className: "univer-ml-1 univer-inline-flex univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-sm univer-border-0 univer-bg-transparent univer-p-0 univer-text-base hover:univer-bg-gray-50 rtl:univer-ml-0 rtl:univer-mr-1 dark:hover:!univer-bg-gray-800",
830
+ className: "univer-ml-1 univer-inline-flex univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-sm univer-border-0 univer-bg-transparent univer-p-0 univer-text-base univer-text-inherit hover:univer-bg-gray-50 rtl:univer-ml-0 rtl:univer-mr-1 dark:hover:!univer-bg-gray-800",
850
831
  children: /* @__PURE__ */ jsx(MoreHorizontalIcon, {})
851
832
  })
852
833
  }) : null] })]
@@ -1042,7 +1023,7 @@ const ThreadCommentTree = (props) => {
1042
1023
  children: /* @__PURE__ */ jsx("button", {
1043
1024
  type: "button",
1044
1025
  "aria-label": resolveLabel,
1045
- className: clsx("univer-ml-1 univer-inline-flex univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-[3px] univer-border-0 univer-bg-transparent univer-p-0 univer-text-base hover:univer-bg-gray-50 rtl:univer-ml-0 rtl:univer-mr-1 dark:hover:!univer-bg-gray-800", { "univer-text-green-500": resolved }),
1026
+ className: clsx("univer-ml-1 univer-inline-flex univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-[3px] univer-border-0 univer-bg-transparent univer-p-0 univer-text-base univer-text-inherit hover:univer-bg-gray-50 rtl:univer-ml-0 rtl:univer-mr-1 dark:hover:!univer-bg-gray-800", { "univer-text-green-500": resolved }),
1046
1027
  onClick: handleResolve,
1047
1028
  children: resolved ? /* @__PURE__ */ jsx(SuccessIcon, {}) : /* @__PURE__ */ jsx(SuccessOutlineIcon, {})
1048
1029
  })
@@ -1051,7 +1032,7 @@ const ThreadCommentTree = (props) => {
1051
1032
  children: /* @__PURE__ */ jsx("button", {
1052
1033
  type: "button",
1053
1034
  "aria-label": deleteLabel,
1054
- className: "univer-ml-1 univer-inline-flex univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-[3px] univer-border-0 univer-bg-transparent univer-p-0 univer-text-base hover:univer-bg-gray-50 rtl:univer-ml-0 rtl:univer-mr-1 dark:hover:!univer-bg-gray-800",
1035
+ className: "univer-ml-1 univer-inline-flex univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-[3px] univer-border-0 univer-bg-transparent univer-p-0 univer-text-base univer-text-inherit hover:univer-bg-gray-50 rtl:univer-ml-0 rtl:univer-mr-1 dark:hover:!univer-bg-gray-800",
1055
1036
  onClick: handleDeleteRoot,
1056
1037
  children: /* @__PURE__ */ jsx(DeleteIcon, {})
1057
1038
  })
@@ -1138,16 +1119,14 @@ const ThreadCommentTree = (props) => {
1138
1119
  });
1139
1120
  };
1140
1121
 
1141
- //#endregion
1142
- //#region src/views/mobile/MobileThreadCommentEditor.tsx
1122
+ // src/views/mobile/MobileThreadCommentEditor.tsx
1143
1123
  const MobileThreadCommentEditor = forwardRef((props, ref) => /* @__PURE__ */ jsx(ThreadCommentEditor, {
1144
1124
  ...props,
1145
1125
  ref,
1146
1126
  ActionRowComponent: MobileActionRowGroup
1147
1127
  }));
1148
1128
 
1149
- //#endregion
1150
- //#region src/views/mobile/MobileThreadCommentTree.tsx
1129
+ // src/views/mobile/MobileThreadCommentTree.tsx
1151
1130
  function MobileThreadCommentTree(props) {
1152
1131
  return /* @__PURE__ */ jsx(ThreadCommentTree, {
1153
1132
  ...props,
@@ -1156,8 +1135,7 @@ function MobileThreadCommentTree(props) {
1156
1135
  });
1157
1136
  }
1158
1137
 
1159
- //#endregion
1160
- //#region src/views/mobile/MobileThreadCommentPanel.tsx
1138
+ // src/views/mobile/MobileThreadCommentPanel.tsx
1161
1139
  function MobileCommentFilter({ value, options = [], onChange }) {
1162
1140
  return /* @__PURE__ */ jsx("div", {
1163
1141
  className: "univer-flex univer-gap-1 univer-overflow-x-auto univer-rounded-xl univer-bg-gray-100 univer-p-1 dark:!univer-bg-gray-800",
@@ -1426,8 +1404,7 @@ function MobileThreadCommentPanel(props) {
1426
1404
  });
1427
1405
  }
1428
1406
 
1429
- //#endregion
1430
- //#region src/views/ThreadCommentPanel.tsx
1407
+ // src/views/ThreadCommentPanel.tsx
1431
1408
  const ThreadCommentPanel = (props) => {
1432
1409
  const { unitId, subUnitId$, type, onAdd, getSubUnitName, onResolve, sortComments, onItemLeave, onItemEnter, disableAdd, tempComment, onAddComment, onDeleteComment, onAfterDeleteComment, showComments, formatRef, onTempCommentClose, autoFocusActiveComment = false } = props;
1433
1410
  const [unit, setUnit] = useState("all");
@@ -1645,5 +1622,4 @@ const ThreadCommentPanel = (props) => {
1645
1622
  });
1646
1623
  };
1647
1624
 
1648
- //#endregion
1649
1625
  export { MobileThreadCommentPanel, MobileThreadCommentTree, SetActiveCommentOperation, ThreadCommentCanvasOverlay, ThreadCommentDraftService, ThreadCommentPanel, ThreadCommentPanelService, ThreadCommentTree, ThreadCommentTreeLocation, UniverThreadCommentMobileUIPlugin, UniverThreadCommentUIPlugin };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ar-SA.ts
1
+ // src/locale/ar-SA.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "رجوع" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ca-ES.ts
1
+ // src/locale/ca-ES.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Enrere" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/de-DE.ts
1
+ // src/locale/de-DE.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Zurück" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/en-US.ts
1
+ // src/locale/en-US.ts
2
2
  /**
3
3
  * Copyright 2023-present DreamNum Co., Ltd.
4
4
  *
@@ -50,5 +50,4 @@ const locale = { "thread-comment-ui": {
50
50
  }
51
51
  } };
52
52
 
53
- //#endregion
54
53
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/es-ES.ts
1
+ // src/locale/es-ES.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Atrás" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/fa-IR.ts
1
+ // src/locale/fa-IR.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "بازگشت" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/fr-FR.ts
1
+ // src/locale/fr-FR.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Retour" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/id-ID.ts
1
+ // src/locale/id-ID.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Kembali" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/it-IT.ts
1
+ // src/locale/it-IT.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Indietro" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ja-JP.ts
1
+ // src/locale/ja-JP.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "戻る" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ko-KR.ts
1
+ // src/locale/ko-KR.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "뒤로" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/pl-PL.ts
1
+ // src/locale/pl-PL.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Wstecz" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/pt-BR.ts
1
+ // src/locale/pt-BR.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Voltar" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ru-RU.ts
1
+ // src/locale/ru-RU.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Назад" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/sk-SK.ts
1
+ // src/locale/sk-SK.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Späť" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/vi-VN.ts
1
+ // src/locale/vi-VN.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "Quay lại" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-CN.ts
1
+ // src/locale/zh-CN.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "返回" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-HK.ts
1
+ // src/locale/zh-HK.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "返回" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-TW.ts
1
+ // src/locale/zh-TW.ts
2
2
  const locale = { "thread-comment-ui": {
3
3
  mobile: { back: "返回" },
4
4
  panel: {
@@ -35,5 +35,4 @@ const locale = { "thread-comment-ui": {
35
35
  }
36
36
  } };
37
37
 
38
- //#endregion
39
38
  export { locale as default };
package/lib/index.css CHANGED
@@ -399,6 +399,10 @@
399
399
  color: var(--univer-green-500);
400
400
  }
401
401
 
402
+ .univer-text-inherit {
403
+ color: inherit;
404
+ }
405
+
402
406
  .univer-text-primary-600 {
403
407
  color: var(--univer-primary-600);
404
408
  }
@@ -422,8 +426,8 @@
422
426
  }
423
427
 
424
428
  @media (hover: hover) and (pointer: fine) {
425
- .hover\:univer-bg-gray-200:hover {
426
- background-color: var(--univer-gray-200);
429
+ .hover\:univer-bg-gray-100:hover {
430
+ background-color: var(--univer-gray-100);
427
431
  }
428
432
 
429
433
  .hover\:univer-bg-gray-50:hover {
@@ -511,6 +515,10 @@
511
515
  }
512
516
 
513
517
  @media (hover: hover) and (pointer: fine) {
518
+ .dark\:hover\:\!univer-bg-gray-600:hover:where(.univer-dark, .univer-dark *) {
519
+ background-color: var(--univer-gray-600) !important;
520
+ }
521
+
514
522
  .dark\:hover\:\!univer-bg-gray-800:hover:where(.univer-dark, .univer-dark *) {
515
523
  background-color: var(--univer-gray-800) !important;
516
524
  }
@@ -558,6 +566,10 @@
558
566
  text-align: left;
559
567
  }
560
568
 
569
+ .\[\&_button\]\:univer-text-inherit button {
570
+ color: inherit;
571
+ }
572
+
561
573
  .\[\&_button\]\:univer-transition-colors button {
562
574
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
563
575
  transition-duration: .15s;