@univerjs/sheets-crosshair-highlight 0.24.0 → 0.25.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 (90) hide show
  1. package/lib/cjs/index.js +8 -8
  2. package/lib/cjs/locale/ar-SA.js +6 -0
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/de-DE.js +6 -0
  5. package/lib/cjs/locale/en-US.js +1 -1
  6. package/lib/cjs/locale/es-ES.js +1 -1
  7. package/lib/cjs/locale/fa-IR.js +1 -1
  8. package/lib/cjs/locale/fr-FR.js +1 -1
  9. package/lib/cjs/locale/id-ID.js +6 -0
  10. package/lib/cjs/locale/it-IT.js +6 -0
  11. package/lib/cjs/locale/ja-JP.js +1 -1
  12. package/lib/cjs/locale/ko-KR.js +1 -1
  13. package/lib/cjs/locale/pl-PL.js +6 -0
  14. package/lib/cjs/locale/pt-BR.js +6 -0
  15. package/lib/cjs/locale/ru-RU.js +1 -1
  16. package/lib/cjs/locale/sk-SK.js +1 -1
  17. package/lib/cjs/locale/vi-VN.js +1 -1
  18. package/lib/cjs/locale/zh-CN.js +1 -1
  19. package/lib/cjs/locale/zh-HK.js +6 -0
  20. package/lib/cjs/locale/zh-TW.js +1 -1
  21. package/lib/es/index.js +8 -8
  22. package/lib/es/locale/ar-SA.js +5 -0
  23. package/lib/es/locale/ca-ES.js +1 -1
  24. package/lib/es/locale/de-DE.js +5 -0
  25. package/lib/es/locale/en-US.js +1 -1
  26. package/lib/es/locale/es-ES.js +1 -1
  27. package/lib/es/locale/fa-IR.js +1 -1
  28. package/lib/es/locale/fr-FR.js +1 -1
  29. package/lib/es/locale/id-ID.js +5 -0
  30. package/lib/es/locale/it-IT.js +5 -0
  31. package/lib/es/locale/ja-JP.js +1 -1
  32. package/lib/es/locale/ko-KR.js +1 -1
  33. package/lib/es/locale/pl-PL.js +5 -0
  34. package/lib/es/locale/pt-BR.js +5 -0
  35. package/lib/es/locale/ru-RU.js +1 -1
  36. package/lib/es/locale/sk-SK.js +1 -1
  37. package/lib/es/locale/vi-VN.js +1 -1
  38. package/lib/es/locale/zh-CN.js +1 -1
  39. package/lib/es/locale/zh-HK.js +5 -0
  40. package/lib/es/locale/zh-TW.js +1 -1
  41. package/lib/index.js +8 -8
  42. package/lib/locale/ar-SA.js +5 -0
  43. package/lib/locale/ca-ES.js +1 -1
  44. package/lib/locale/de-DE.js +5 -0
  45. package/lib/locale/en-US.js +1 -1
  46. package/lib/locale/es-ES.js +1 -1
  47. package/lib/locale/fa-IR.js +1 -1
  48. package/lib/locale/fr-FR.js +1 -1
  49. package/lib/locale/id-ID.js +5 -0
  50. package/lib/locale/it-IT.js +5 -0
  51. package/lib/locale/ja-JP.js +1 -1
  52. package/lib/locale/ko-KR.js +1 -1
  53. package/lib/locale/pl-PL.js +5 -0
  54. package/lib/locale/pt-BR.js +5 -0
  55. package/lib/locale/ru-RU.js +1 -1
  56. package/lib/locale/sk-SK.js +1 -1
  57. package/lib/locale/vi-VN.js +1 -1
  58. package/lib/locale/zh-CN.js +1 -1
  59. package/lib/locale/zh-HK.js +5 -0
  60. package/lib/locale/zh-TW.js +1 -1
  61. package/lib/types/locale/ar-SA.d.ts +18 -0
  62. package/lib/types/locale/de-DE.d.ts +18 -0
  63. package/lib/types/locale/en-US.d.ts +1 -1
  64. package/lib/types/locale/id-ID.d.ts +18 -0
  65. package/lib/types/locale/it-IT.d.ts +18 -0
  66. package/lib/types/locale/pl-PL.d.ts +18 -0
  67. package/lib/types/locale/pt-BR.d.ts +18 -0
  68. package/lib/types/locale/zh-HK.d.ts +18 -0
  69. package/lib/umd/facade.js +1 -1
  70. package/lib/umd/index.js +1 -1
  71. package/lib/umd/locale/ar-SA.js +1 -0
  72. package/lib/umd/locale/ca-ES.js +1 -1
  73. package/lib/umd/locale/de-DE.js +1 -0
  74. package/lib/umd/locale/en-US.js +1 -1
  75. package/lib/umd/locale/es-ES.js +1 -1
  76. package/lib/umd/locale/fa-IR.js +1 -1
  77. package/lib/umd/locale/fr-FR.js +1 -1
  78. package/lib/umd/locale/id-ID.js +1 -0
  79. package/lib/umd/locale/it-IT.js +1 -0
  80. package/lib/umd/locale/ja-JP.js +1 -1
  81. package/lib/umd/locale/ko-KR.js +1 -1
  82. package/lib/umd/locale/pl-PL.js +1 -0
  83. package/lib/umd/locale/pt-BR.js +1 -0
  84. package/lib/umd/locale/ru-RU.js +1 -1
  85. package/lib/umd/locale/sk-SK.js +1 -1
  86. package/lib/umd/locale/vi-VN.js +1 -1
  87. package/lib/umd/locale/zh-CN.js +1 -1
  88. package/lib/umd/locale/zh-HK.js +1 -0
  89. package/lib/umd/locale/zh-TW.js +1 -1
  90. package/package.json +10 -10
package/lib/cjs/index.js CHANGED
@@ -10,7 +10,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
10
10
  let _univerjs_sheets = require("@univerjs/sheets");
11
11
  let _univerjs_sheets_ui = require("@univerjs/sheets-ui");
12
12
 
13
- //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
13
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
14
14
  function _typeof(o) {
15
15
  "@babel/helpers - typeof";
16
16
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -21,7 +21,7 @@ function _typeof(o) {
21
21
  }
22
22
 
23
23
  //#endregion
24
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
24
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
25
25
  function toPrimitive(t, r) {
26
26
  if ("object" != _typeof(t) || !t) return t;
27
27
  var e = t[Symbol.toPrimitive];
@@ -34,14 +34,14 @@ function toPrimitive(t, r) {
34
34
  }
35
35
 
36
36
  //#endregion
37
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
37
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
38
38
  function toPropertyKey(t) {
39
39
  var i = toPrimitive(t, "string");
40
40
  return "symbol" == _typeof(i) ? i : i + "";
41
41
  }
42
42
 
43
43
  //#endregion
44
- //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
44
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
45
45
  function _defineProperty(e, r, t) {
46
46
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
47
47
  value: t,
@@ -172,7 +172,7 @@ const DisableCrosshairHighlightOperation = {
172
172
  //#endregion
173
173
  //#region package.json
174
174
  var name = "@univerjs/sheets-crosshair-highlight";
175
- var version = "0.24.0";
175
+ var version = "0.25.0";
176
176
 
177
177
  //#endregion
178
178
  //#region src/config/config.ts
@@ -187,7 +187,7 @@ function CrosshairHighlightMenuItemFactory(accessor) {
187
187
  const crosshairHighlightService = accessor.get(SheetsCrosshairHighlightService);
188
188
  return {
189
189
  id: ToggleCrosshairHighlightOperation.id,
190
- tooltip: "crosshair.button.tooltip",
190
+ tooltip: "sheets-crosshair-highlight.button.tooltip",
191
191
  type: _univerjs_ui.MenuItemType.BUTTON_SELECTOR,
192
192
  icon: "CrossHighlightingIcon",
193
193
  selections: [{ label: {
@@ -244,7 +244,7 @@ function CrosshairOverlay(props) {
244
244
  }
245
245
 
246
246
  //#endregion
247
- //#region \0@oxc-project+runtime@0.129.0/helpers/decorateParam.js
247
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorateParam.js
248
248
  function __decorateParam(paramIndex, decorator) {
249
249
  return function(target, key) {
250
250
  decorator(target, key, paramIndex);
@@ -252,7 +252,7 @@ function __decorateParam(paramIndex, decorator) {
252
252
  }
253
253
 
254
254
  //#endregion
255
- //#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
255
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
256
256
  function __decorate(decorators, target, key, desc) {
257
257
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
258
258
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -0,0 +1,6 @@
1
+
2
+ //#region src/locale/ar-SA.ts
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "تسليط الضوء على التقاطع" } } };
4
+
5
+ //#endregion
6
+ module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/ca-ES.ts
3
- const locale = { crosshair: { button: { tooltip: "Ressaltat de creu" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Ressaltat de creu" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
@@ -0,0 +1,6 @@
1
+
2
+ //#region src/locale/de-DE.ts
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Fadenkreuz-Hervorhebung" } } };
4
+
5
+ //#endregion
6
+ module.exports = locale;
@@ -15,7 +15,7 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- const locale = { crosshair: { button: { tooltip: "Crosshair Highlight" } } };
18
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Crosshair Highlight" } } };
19
19
 
20
20
  //#endregion
21
21
  module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/es-ES.ts
3
- const locale = { crosshair: { button: { tooltip: "Resaltado de cruz" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Resaltado de cruz" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/fa-IR.ts
3
- const locale = { crosshair: { button: { tooltip: "برجسته کردن خط نشانه" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "برجسته کردن خط نشانه" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/fr-FR.ts
3
- const locale = { crosshair: { button: { tooltip: "Surlignage du réticule" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Surlignage du réticule" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
@@ -0,0 +1,6 @@
1
+
2
+ //#region src/locale/id-ID.ts
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Sorot Penyilang" } } };
4
+
5
+ //#endregion
6
+ module.exports = locale;
@@ -0,0 +1,6 @@
1
+
2
+ //#region src/locale/it-IT.ts
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Evidenziazione mirino" } } };
4
+
5
+ //#endregion
6
+ module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/ja-JP.ts
3
- const locale = { crosshair: { button: { tooltip: "십자선 강조" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "십자선 강조" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/ko-KR.ts
3
- const locale = { crosshair: { button: { tooltip: "십자선 강조" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "십자선 강조" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
@@ -0,0 +1,6 @@
1
+
2
+ //#region src/locale/pl-PL.ts
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Podświetlenie krzyżowe" } } };
4
+
5
+ //#endregion
6
+ module.exports = locale;
@@ -0,0 +1,6 @@
1
+
2
+ //#region src/locale/pt-BR.ts
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Destaque de Mira Cruzada" } } };
4
+
5
+ //#endregion
6
+ module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/ru-RU.ts
3
- const locale = { crosshair: { button: { tooltip: "Перекрестный выделение" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Перекрестный выделение" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/sk-SK.ts
3
- const locale = { crosshair: { button: { tooltip: "Zvýraznenie krížika" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Zvýraznenie krížika" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/vi-VN.ts
3
- const locale = { crosshair: { button: { tooltip: "Đánh dấu chéo" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Đánh dấu chéo" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/zh-CN.ts
3
- const locale = { crosshair: { button: { tooltip: "十字高亮" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "十字高亮" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
@@ -0,0 +1,6 @@
1
+
2
+ //#region src/locale/zh-HK.ts
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "十字高亮" } } };
4
+
5
+ //#endregion
6
+ module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/zh-TW.ts
3
- const locale = { crosshair: { button: { tooltip: "十字高亮" } } };
3
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "十字高亮" } } };
4
4
 
5
5
  //#endregion
6
6
  module.exports = locale;
package/lib/es/index.js CHANGED
@@ -9,7 +9,7 @@ import { jsx } from "react/jsx-runtime";
9
9
  import { IRefSelectionsService, REF_SELECTIONS_ENABLED, SheetsSelectionsService } from "@univerjs/sheets";
10
10
  import { SheetSkeletonManagerService, getCoordByCell } from "@univerjs/sheets-ui";
11
11
 
12
- //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
12
+ //#region \0@oxc-project+runtime@0.133.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) {
@@ -20,7 +20,7 @@ function _typeof(o) {
20
20
  }
21
21
 
22
22
  //#endregion
23
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
23
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
24
24
  function toPrimitive(t, r) {
25
25
  if ("object" != _typeof(t) || !t) return t;
26
26
  var e = t[Symbol.toPrimitive];
@@ -33,14 +33,14 @@ function toPrimitive(t, r) {
33
33
  }
34
34
 
35
35
  //#endregion
36
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
36
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
37
37
  function toPropertyKey(t) {
38
38
  var i = toPrimitive(t, "string");
39
39
  return "symbol" == _typeof(i) ? i : i + "";
40
40
  }
41
41
 
42
42
  //#endregion
43
- //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
43
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
44
44
  function _defineProperty(e, r, t) {
45
45
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
46
46
  value: t,
@@ -171,7 +171,7 @@ const DisableCrosshairHighlightOperation = {
171
171
  //#endregion
172
172
  //#region package.json
173
173
  var name = "@univerjs/sheets-crosshair-highlight";
174
- var version = "0.24.0";
174
+ var version = "0.25.0";
175
175
 
176
176
  //#endregion
177
177
  //#region src/config/config.ts
@@ -186,7 +186,7 @@ function CrosshairHighlightMenuItemFactory(accessor) {
186
186
  const crosshairHighlightService = accessor.get(SheetsCrosshairHighlightService);
187
187
  return {
188
188
  id: ToggleCrosshairHighlightOperation.id,
189
- tooltip: "crosshair.button.tooltip",
189
+ tooltip: "sheets-crosshair-highlight.button.tooltip",
190
190
  type: MenuItemType.BUTTON_SELECTOR,
191
191
  icon: "CrossHighlightingIcon",
192
192
  selections: [{ label: {
@@ -243,7 +243,7 @@ function CrosshairOverlay(props) {
243
243
  }
244
244
 
245
245
  //#endregion
246
- //#region \0@oxc-project+runtime@0.129.0/helpers/decorateParam.js
246
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorateParam.js
247
247
  function __decorateParam(paramIndex, decorator) {
248
248
  return function(target, key) {
249
249
  decorator(target, key, paramIndex);
@@ -251,7 +251,7 @@ function __decorateParam(paramIndex, decorator) {
251
251
  }
252
252
 
253
253
  //#endregion
254
- //#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
254
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
255
255
  function __decorate(decorators, target, key, desc) {
256
256
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
257
257
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -0,0 +1,5 @@
1
+ //#region src/locale/ar-SA.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "تسليط الضوء على التقاطع" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/ca-ES.ts
2
- const locale = { crosshair: { button: { tooltip: "Ressaltat de creu" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Ressaltat de creu" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/de-DE.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Fadenkreuz-Hervorhebung" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- const locale = { crosshair: { button: { tooltip: "Crosshair Highlight" } } };
17
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Crosshair Highlight" } } };
18
18
 
19
19
  //#endregion
20
20
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/es-ES.ts
2
- const locale = { crosshair: { button: { tooltip: "Resaltado de cruz" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Resaltado de cruz" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/fa-IR.ts
2
- const locale = { crosshair: { button: { tooltip: "برجسته کردن خط نشانه" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "برجسته کردن خط نشانه" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/fr-FR.ts
2
- const locale = { crosshair: { button: { tooltip: "Surlignage du réticule" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Surlignage du réticule" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/id-ID.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Sorot Penyilang" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/it-IT.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Evidenziazione mirino" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/ja-JP.ts
2
- const locale = { crosshair: { button: { tooltip: "십자선 강조" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "십자선 강조" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/ko-KR.ts
2
- const locale = { crosshair: { button: { tooltip: "십자선 강조" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "십자선 강조" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/pl-PL.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Podświetlenie krzyżowe" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/pt-BR.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Destaque de Mira Cruzada" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/ru-RU.ts
2
- const locale = { crosshair: { button: { tooltip: "Перекрестный выделение" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Перекрестный выделение" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/sk-SK.ts
2
- const locale = { crosshair: { button: { tooltip: "Zvýraznenie krížika" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Zvýraznenie krížika" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/vi-VN.ts
2
- const locale = { crosshair: { button: { tooltip: "Đánh dấu chéo" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Đánh dấu chéo" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/zh-CN.ts
2
- const locale = { crosshair: { button: { tooltip: "十字高亮" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "十字高亮" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/zh-HK.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "十字高亮" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/zh-TW.ts
2
- const locale = { crosshair: { button: { tooltip: "十字高亮" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "十字高亮" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
package/lib/index.js CHANGED
@@ -9,7 +9,7 @@ import { jsx } from "react/jsx-runtime";
9
9
  import { IRefSelectionsService, REF_SELECTIONS_ENABLED, SheetsSelectionsService } from "@univerjs/sheets";
10
10
  import { SheetSkeletonManagerService, getCoordByCell } from "@univerjs/sheets-ui";
11
11
 
12
- //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
12
+ //#region \0@oxc-project+runtime@0.133.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) {
@@ -20,7 +20,7 @@ function _typeof(o) {
20
20
  }
21
21
 
22
22
  //#endregion
23
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
23
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
24
24
  function toPrimitive(t, r) {
25
25
  if ("object" != _typeof(t) || !t) return t;
26
26
  var e = t[Symbol.toPrimitive];
@@ -33,14 +33,14 @@ function toPrimitive(t, r) {
33
33
  }
34
34
 
35
35
  //#endregion
36
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
36
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
37
37
  function toPropertyKey(t) {
38
38
  var i = toPrimitive(t, "string");
39
39
  return "symbol" == _typeof(i) ? i : i + "";
40
40
  }
41
41
 
42
42
  //#endregion
43
- //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
43
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
44
44
  function _defineProperty(e, r, t) {
45
45
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
46
46
  value: t,
@@ -171,7 +171,7 @@ const DisableCrosshairHighlightOperation = {
171
171
  //#endregion
172
172
  //#region package.json
173
173
  var name = "@univerjs/sheets-crosshair-highlight";
174
- var version = "0.24.0";
174
+ var version = "0.25.0";
175
175
 
176
176
  //#endregion
177
177
  //#region src/config/config.ts
@@ -186,7 +186,7 @@ function CrosshairHighlightMenuItemFactory(accessor) {
186
186
  const crosshairHighlightService = accessor.get(SheetsCrosshairHighlightService);
187
187
  return {
188
188
  id: ToggleCrosshairHighlightOperation.id,
189
- tooltip: "crosshair.button.tooltip",
189
+ tooltip: "sheets-crosshair-highlight.button.tooltip",
190
190
  type: MenuItemType.BUTTON_SELECTOR,
191
191
  icon: "CrossHighlightingIcon",
192
192
  selections: [{ label: {
@@ -243,7 +243,7 @@ function CrosshairOverlay(props) {
243
243
  }
244
244
 
245
245
  //#endregion
246
- //#region \0@oxc-project+runtime@0.129.0/helpers/decorateParam.js
246
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorateParam.js
247
247
  function __decorateParam(paramIndex, decorator) {
248
248
  return function(target, key) {
249
249
  decorator(target, key, paramIndex);
@@ -251,7 +251,7 @@ function __decorateParam(paramIndex, decorator) {
251
251
  }
252
252
 
253
253
  //#endregion
254
- //#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
254
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
255
255
  function __decorate(decorators, target, key, desc) {
256
256
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
257
257
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -0,0 +1,5 @@
1
+ //#region src/locale/ar-SA.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "تسليط الضوء على التقاطع" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/ca-ES.ts
2
- const locale = { crosshair: { button: { tooltip: "Ressaltat de creu" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Ressaltat de creu" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/de-DE.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Fadenkreuz-Hervorhebung" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- const locale = { crosshair: { button: { tooltip: "Crosshair Highlight" } } };
17
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Crosshair Highlight" } } };
18
18
 
19
19
  //#endregion
20
20
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/es-ES.ts
2
- const locale = { crosshair: { button: { tooltip: "Resaltado de cruz" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Resaltado de cruz" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/fa-IR.ts
2
- const locale = { crosshair: { button: { tooltip: "برجسته کردن خط نشانه" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "برجسته کردن خط نشانه" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/fr-FR.ts
2
- const locale = { crosshair: { button: { tooltip: "Surlignage du réticule" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Surlignage du réticule" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/id-ID.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Sorot Penyilang" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/it-IT.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Evidenziazione mirino" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/ja-JP.ts
2
- const locale = { crosshair: { button: { tooltip: "십자선 강조" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "십자선 강조" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/ko-KR.ts
2
- const locale = { crosshair: { button: { tooltip: "십자선 강조" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "십자선 강조" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/pl-PL.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Podświetlenie krzyżowe" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/pt-BR.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Destaque de Mira Cruzada" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/ru-RU.ts
2
- const locale = { crosshair: { button: { tooltip: "Перекрестный выделение" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Перекрестный выделение" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/sk-SK.ts
2
- const locale = { crosshair: { button: { tooltip: "Zvýraznenie krížika" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Zvýraznenie krížika" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/vi-VN.ts
2
- const locale = { crosshair: { button: { tooltip: "Đánh dấu chéo" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "Đánh dấu chéo" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/zh-CN.ts
2
- const locale = { crosshair: { button: { tooltip: "十字高亮" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "十字高亮" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -0,0 +1,5 @@
1
+ //#region src/locale/zh-HK.ts
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "十字高亮" } } };
3
+
4
+ //#endregion
5
+ export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/zh-TW.ts
2
- const locale = { crosshair: { button: { tooltip: "十字高亮" } } };
2
+ const locale = { "sheets-crosshair-highlight": { button: { tooltip: "十字高亮" } } };
3
3
 
4
4
  //#endregion
5
5
  export { locale as default };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  declare const locale: {
17
- crosshair: {
17
+ 'sheets-crosshair-highlight': {
18
18
  button: {
19
19
  tooltip: string;
20
20
  };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(require(`@univerjs/core`),require(`@univerjs/core/facade`),require(`@univerjs/sheets-crosshair-highlight`)):typeof define==`function`&&define.amd?define([`@univerjs/core`,`@univerjs/core/facade`,`@univerjs/sheets-crosshair-highlight`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverCore,e.UniverCoreFacade,e.UniverSheetsCrosshairHighlight))})(this,function(e,t,n){var r=class extends t.FUniver{_initialize(t){let r=t.get(e.ICommandService);this.disposeWithMe(this.registerEventHandler(this.Event.CrosshairHighlightEnabledChanged,()=>r.onCommandExecuted(e=>{if(e.id===n.EnableCrosshairHighlightOperation.id||e.id===n.DisableCrosshairHighlightOperation.id||e.id===n.ToggleCrosshairHighlightOperation.id){let e=this.getActiveSheet();if(!e)return;let t={enabled:this.getCrosshairHighlightEnabled(),...e};this.fireEvent(this.Event.CrosshairHighlightEnabledChanged,t)}}))),this.disposeWithMe(this.registerEventHandler(this.Event.CrosshairHighlightColorChanged,()=>r.onCommandExecuted(e=>{if(e.id===n.SetCrosshairHighlightColorOperation.id){let e=this.getActiveSheet();if(!e)return;let t={color:this.getCrosshairHighlightColor(),...e};this.fireEvent(this.Event.CrosshairHighlightColorChanged,t)}})))}setCrosshairHighlightEnabled(e){return e?this._commandService.syncExecuteCommand(n.EnableCrosshairHighlightOperation.id):this._commandService.syncExecuteCommand(n.DisableCrosshairHighlightOperation.id),this}setCrosshairHighlightColor(e){return this._commandService.syncExecuteCommand(n.SetCrosshairHighlightColorOperation.id,{value:e}),this}getCrosshairHighlightEnabled(){return this._injector.get(n.SheetsCrosshairHighlightService).enabled}getCrosshairHighlightColor(){return this._injector.get(n.SheetsCrosshairHighlightService).color}get CROSSHAIR_HIGHLIGHT_COLORS(){return n.CROSSHAIR_HIGHLIGHT_COLORS}};t.FUniver.extend(r);var i=class extends t.FEventName{get CrosshairHighlightEnabledChanged(){return`CrosshairHighlightEnabledChanged`}get CrosshairHighlightColorChanged(){return`CrosshairHighlightColorChanged`}};t.FEventName.extend(i)});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(require("@univerjs/core"),require("@univerjs/core/facade"),require("@univerjs/sheets-crosshair-highlight")):typeof define==`function`&&define.amd?define([`@univerjs/core`,`@univerjs/core/facade`,`@univerjs/sheets-crosshair-highlight`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverCore,e.UniverCoreFacade,e.UniverSheetsCrosshairHighlight))})(this,function(e,t,n){var r=class extends t.FUniver{_initialize(t){let r=t.get(e.ICommandService);this.disposeWithMe(this.registerEventHandler(this.Event.CrosshairHighlightEnabledChanged,()=>r.onCommandExecuted(e=>{if(e.id===n.EnableCrosshairHighlightOperation.id||e.id===n.DisableCrosshairHighlightOperation.id||e.id===n.ToggleCrosshairHighlightOperation.id){let e=this.getActiveSheet();if(!e)return;let t={enabled:this.getCrosshairHighlightEnabled(),...e};this.fireEvent(this.Event.CrosshairHighlightEnabledChanged,t)}}))),this.disposeWithMe(this.registerEventHandler(this.Event.CrosshairHighlightColorChanged,()=>r.onCommandExecuted(e=>{if(e.id===n.SetCrosshairHighlightColorOperation.id){let e=this.getActiveSheet();if(!e)return;let t={color:this.getCrosshairHighlightColor(),...e};this.fireEvent(this.Event.CrosshairHighlightColorChanged,t)}})))}setCrosshairHighlightEnabled(e){return e?this._commandService.syncExecuteCommand(n.EnableCrosshairHighlightOperation.id):this._commandService.syncExecuteCommand(n.DisableCrosshairHighlightOperation.id),this}setCrosshairHighlightColor(e){return this._commandService.syncExecuteCommand(n.SetCrosshairHighlightColorOperation.id,{value:e}),this}getCrosshairHighlightEnabled(){return this._injector.get(n.SheetsCrosshairHighlightService).enabled}getCrosshairHighlightColor(){return this._injector.get(n.SheetsCrosshairHighlightService).color}get CROSSHAIR_HIGHLIGHT_COLORS(){return n.CROSSHAIR_HIGHLIGHT_COLORS}};t.FUniver.extend(r);var i=class extends t.FEventName{get CrosshairHighlightEnabledChanged(){return`CrosshairHighlightEnabledChanged`}get CrosshairHighlightColorChanged(){return`CrosshairHighlightColorChanged`}};t.FEventName.extend(i)});
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@univerjs/core`),require(`rxjs`),require(`@univerjs/engine-render`),require(`react`),require(`@univerjs/ui`),require(`@univerjs/design`),require(`react/jsx-runtime`),require(`@univerjs/sheets`),require(`@univerjs/sheets-ui`)):typeof define==`function`&&define.amd?define([`exports`,`@univerjs/core`,`rxjs`,`@univerjs/engine-render`,`react`,`@univerjs/ui`,`@univerjs/design`,`react/jsx-runtime`,`@univerjs/sheets`,`@univerjs/sheets-ui`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverSheetsCrosshairHighlight={},e.UniverCore,e.rxjs,e.UniverEngineRender,e.React,e.UniverUi,e.UniverDesign,e.React,e.UniverSheets,e.UniverSheetsUi))})(this,function(e,t,n,r,i,a,o,s,c,l){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function u(e){"@babel/helpers - typeof";return u=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},u(e)}function d(e,t){if(u(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(u(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function f(e){var t=d(e,`string`);return u(t)==`symbol`?t:t+``}function p(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let m=[`rgba(158, 109, 227, 0.3)`,`rgba(254, 75, 75, 0.3)`,`rgba(255, 140, 81, 0.3)`,`rgba(164, 220, 22, 0.3)`,`rgba(45, 174, 255, 0.3)`,`rgba(58, 96, 247, 0.3)`,`rgba(242, 72, 166, 0.3)`,`rgba(153, 153, 153, 0.3)`,`rgba(158, 109, 227, 0.15)`,`rgba(254, 75, 75, 0.15)`,`rgba(255, 140, 81, 0.15)`,`rgba(164, 220, 22, 0.15)`,`rgba(45, 174, 255, 0.15)`,`rgba(58, 96, 247, 0.15)`,`rgba(242, 72, 166, 0.15)`,`rgba(153, 153, 153, 0.15)`];var h=class extends t.Disposable{constructor(...e){super(...e),p(this,`_enabled$`,new n.BehaviorSubject(!1)),p(this,`enabled$`,this._enabled$.asObservable()),p(this,`_color$`,new n.BehaviorSubject(m[0])),p(this,`color$`,this._color$.asObservable())}get enabled(){return this._enabled$.getValue()}get color(){return this._color$.getValue()}dispose(){this._enabled$.complete()}setEnabled(e){this._enabled$.next(e)}setColor(e){this._color$.next(e)}};let g={id:`sheet.operation.toggle-crosshair-highlight`,type:t.CommandType.OPERATION,handler(e){let t=e.get(h),n=t.enabled;return t.setEnabled(!n),!0}},_={id:`sheet.operation.set-crosshair-highlight-color`,type:t.CommandType.OPERATION,handler(e,{value:t}){let n=e.get(h);return n.enabled||n.setEnabled(!0),n.setColor(t),!0}},v={id:`sheet.operation.enable-crosshair-highlight`,type:t.CommandType.OPERATION,handler(e){let t=e.get(h);return t.enabled?!1:(t.setEnabled(!0),!0)}},y={id:`sheet.operation.disable-crosshair-highlight`,type:t.CommandType.OPERATION,handler(e){let t=e.get(h);return t.enabled?(t.setEnabled(!1),!0):!1}};var b=`@univerjs/sheets-crosshair-highlight`,x=`0.24.0`;let S=`sheets-crosshair-highlight.config`;Symbol(S);let C={};function w({ref:e,...t}){let{icon:n,id:r,className:a,extend:o,...s}=t,c=`univerjs-icon univerjs-icon-${r} ${a||``}`.trim(),l=(0,i.useRef)(`_${O()}`);return T(n,`${r}`,{defIds:n.defIds,idSuffix:l.current},{ref:e,className:c,...s},o)}function T(e,t,n,r,a){return(0,i.createElement)(e.tag,{key:t,...E(e,n,a),...r},(D(e,n).children||[]).map((r,i)=>T(r,`${t}-${e.tag}-${i}`,n,void 0,a)))}function E(e,t,n){let r={...e.attrs};n!=null&&n.colorChannel1&&r.fill===`colorChannel1`&&(r.fill=n.colorChannel1),e.tag===`mask`&&r.id&&(r.id+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{e===`mask`&&typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))});let{defIds:i}=t;return!i||i.length===0?r:(e.tag===`use`&&r[`xlink:href`]&&(r[`xlink:href`]+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))}),r)}function D(e,t){var n;let{defIds:r}=t;return!r||r.length===0?e:e.tag===`defs`&&(n=e.children)!=null&&n.length?{...e,children:e.children.map(e=>typeof e.attrs.id==`string`&&r&&r.includes(e.attrs.id)?{...e,attrs:{...e.attrs,id:e.attrs.id+t.idSuffix}}:e)}:e}function O(){return Math.random().toString(36).substring(2,8)}w.displayName=`UniverIcon`;let k={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M3.6498 1.05005C2.21386 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V3.65005C14.9498 2.21411 13.7857 1.05005 12.3498 1.05005H3.6498ZM5.4002 2.25005H3.6498C2.87661 2.25005 2.2498 2.87685 2.2498 3.65005V5.40002H5.4002V2.25005ZM2.2498 10.6V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H5.4002V10.6H2.2498ZM6.60019 13.75H9.4002V9.40002H13.7498V6.60002H9.4002V2.25005H6.60019V6.60002H2.25029V9.40002H6.60019V13.75ZM10.6002 2.25005V5.40002H13.7498V3.65005C13.7498 2.87685 13.123 2.25005 12.3498 2.25005H10.6002ZM13.7498 10.6H10.6002V13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.6Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},A=(0,i.forwardRef)(function(e,t){return(0,i.createElement)(w,Object.assign({},e,{id:`cross-highlighting-icon`,ref:t,icon:k}))});A.displayName=`CrossHighlightingIcon`;let j=`CROSSHAIR_HIGHLIGHT_OVERLAY_COMPONENT`;function M(e){let n=e.get(h);return{id:g.id,tooltip:`crosshair.button.tooltip`,type:a.MenuItemType.BUTTON_SELECTOR,icon:`CrossHighlightingIcon`,selections:[{label:{name:j,hoverable:!1,selectable:!1}}],selectionsCommandId:_.id,activated$:n.enabled$,hidden$:(0,a.getMenuHiddenObservable)(e,t.UniverInstanceType.UNIVER_SHEET)}}let N={[a.ContextMenuPosition.FOOTER_MENU]:{[a.ContextMenuGroup.OTHERS]:{[g.id]:{order:0,menuItemFactory:M}}}};function P(e){let{onChange:t}=e,n=(0,a.useObservable)((0,a.useDependency)(h).color$),r=(0,i.useCallback)(e=>{t==null||t(e)},[t]);return(0,s.jsx)(`div`,{className:`univer-grid univer-grid-cols-8 univer-gap-x-2 univer-gap-y-3`,children:m.map(e=>(0,s.jsx)(`div`,{className:(0,o.clsx)(`hover:univer-ring-primary-600/40 univer-box-border univer-size-5 univer-cursor-pointer univer-rounded univer-ring-offset-1 univer-transition-shadow hover:univer-ring-[1.5px]`,o.borderClassName,{"univer-ring-[1.5px] univer-ring-primary-600 hover:univer-ring-primary-600":e===n}),style:{backgroundColor:e},onClick:()=>r(e)},e))})}function F(e,t){return function(n,r){t(n,r,e)}}function I(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let L=class extends t.Disposable{constructor(e,t,n){super(),this._componentMgr=e,this._menuManagerService=t,this._cmdSrv=n,this._initCommands(),this._initMenus(),this._initComponents()}_initCommands(){[g,_,v,y].forEach(e=>this._cmdSrv.registerCommand(e))}_initMenus(){this._menuManagerService.mergeMenu(N)}_initComponents(){this._componentMgr.register(j,P),this._componentMgr.register(`CrossHighlightingIcon`,A)}};L=I([F(0,(0,t.Inject)(a.ComponentManager)),F(1,a.IMenuManagerService),F(2,t.ICommandService)],L);var R=class{constructor(){p(this,`_selectedRanges`,[]),p(this,`_ranges`,[])}addRange(e){if(e.rangeType===t.RANGE_TYPE.COLUMN||e.rangeType===t.RANGE_TYPE.ROW||e.rangeType===t.RANGE_TYPE.ALL)return;let n=this._getIntersects(e),r=this._getSplitRanges(e,n);r.length>0&&this._ranges.push(...r)}setSelectedRanges(e){this._selectedRanges=e}_getSplitRanges(e,n){let r=[e];for(let e of n.concat(this._selectedRanges)){let n=[];for(let i of r){let r=t.Rectangle.subtract(i,e);r&&r.length>0&&n.push(...r)}r=n}return r.filter(e=>e.startRow<=e.endRow&&e.startColumn<=e.endColumn)}_getIntersects(e){let n=[];for(let r of this._ranges){let i=t.Rectangle.getIntersects(r,e);i&&n.push(i)}return n}getRanges(){return this._ranges}reset(){this._ranges=[],this._selectedRanges=[]}},z=class extends r.Shape{constructor(e,t){super(e,t),p(this,`_color`,void 0),t&&this.setShapeProps(t)}setShapeProps(e){e.color!==void 0&&(this._color=e.color),this.transformByState({width:e.width,height:e.height})}_draw(e){var t,n;let i=`rgba(${this._color.r}, ${this._color.g}, ${this._color.b}, ${(t=(n=this._color)==null?void 0:n.a)==null?.5:t})`;r.Rect.drawWith(e,{width:this.width,height:this.height,fill:i,stroke:void 0,strokeWidth:0,evented:!1})}};let B=class extends t.Disposable{constructor(e,t,n,r,i,a){super(),this._context=e,this._sheetSkeletonManagerService=t,this._sheetsSelectionsService=n,this._sheetsCrosshairHighlightService=r,this._contextService=i,this._refSelectionsService=a,p(this,`_shapes`,[]),p(this,`_rangeCollection`,new R),p(this,`_color`,`rgba(255,0,0,0.5)`),this._initRenderListener()}_transformSelection(e,t){if(!e)return;let n=t.getRowCount(),r=t.getColumnCount(),i=[];for(let t of e){let{startRow:e,endRow:a,startColumn:o,endColumn:s}=t.range;a-e+1===n||s-o+1===r||i.push(t.range)}this._rangeCollection.setSelectedRanges(i);for(let e of i)this.addSelection(e,t)}_initRenderListener(){let e=this._context.unit;this.disposeWithMe((0,n.combineLatest)([this._contextService.subscribeContextValue$(c.REF_SELECTIONS_ENABLED).pipe((0,n.startWith)(!1)),this._sheetSkeletonManagerService.currentSkeleton$,this._sheetsCrosshairHighlightService.enabled$,this._sheetsCrosshairHighlightService.color$.pipe((0,n.tap)(e=>this._color=e)),(0,n.merge)(this._sheetsSelectionsService.selectionMoveStart$,this._sheetsSelectionsService.selectionMoving$,this._sheetsSelectionsService.selectionMoveEnd$,this._sheetsSelectionsService.selectionSet$,e.activeSheet$.pipe((0,n.map)(()=>this._sheetsSelectionsService.getCurrentSelections()))),(0,n.merge)(this._refSelectionsService.selectionMoveStart$,this._refSelectionsService.selectionMoving$,this._refSelectionsService.selectionMoveEnd$,this._sheetsSelectionsService.selectionSet$,e.activeSheet$.pipe((0,n.map)(()=>this._refSelectionsService.getCurrentSelections())))]).subscribe(([t,n,r,i,a,o])=>{if(this._clear(),!r)return;let s=t?o:a;this._rangeCollection.reset(),this._transformSelection(s,e.getActiveSheet()),this.render(this._rangeCollection.getRanges())}))}addSelection(e,n){if(e.rangeType===t.RANGE_TYPE.COLUMN||e.rangeType===t.RANGE_TYPE.ROW||e.rangeType===t.RANGE_TYPE.ALL)return;let r=n.getRowCount(),i=n.getColumnCount(),{startRow:a,endRow:o,startColumn:s,endColumn:c}=e,l={startRow:a,endRow:o,startColumn:0,endColumn:s-1},u={startRow:a,endRow:o,startColumn:c+1,endColumn:i},d={startRow:0,endRow:a-1,startColumn:s,endColumn:c},f={startRow:o+1,endRow:r,startColumn:s,endColumn:c};for(let e of[l,u,d,f])e.startRow<=e.endRow&&e.startColumn<=e.endColumn&&this._rangeCollection.addRange(e)}_clear(){this._shapes.forEach(e=>{e.dispose()}),this._shapes=[]}_addShapes(e,n,r,i){let{startRow:a,endRow:o,startColumn:s,endColumn:c}=e,u=(0,l.getCoordByCell)(a,s,r,i),d=(0,l.getCoordByCell)(o,c,r,i),{startX:f,startY:p}=u,{endX:m,endY:h}=d,g=m-f,_=h-p,v={left:f,top:p,color:new t.ColorKit(this._color).toRgb(),width:g,height:_,zIndex:1,evented:!1},y=new z(`crosshair-${n}`,v);this._shapes.push(y),r.addObject(y)}render(e){let t=this._sheetSkeletonManagerService.getCurrentSkeleton();if(!t)return;let{scene:n}=this._context;this._clear();for(let r=0;r<e.length;r++){let i=e[r];this._addShapes(i,r,n,t)}n.makeDirty(!0)}async dispose(){super.dispose()}};B=I([F(1,(0,t.Inject)(l.SheetSkeletonManagerService)),F(2,(0,t.Inject)(c.SheetsSelectionsService)),F(3,(0,t.Inject)(h)),F(4,(0,t.Inject)(t.IContextService)),F(5,c.IRefSelectionsService)],B);let V=class extends t.Plugin{constructor(e=C,n,r,i){super(),this._config=e,this._injector=n,this._renderManagerService=r,this._configService=i;let{...a}=(0,t.merge)({},C,this._config);this._configService.setConfig(S,a)}onStarting(){[[h],[L]].forEach(e=>this._injector.add(e))}onReady(){[[B]].forEach(e=>this._injector.add(e)),this._injector.get(L),this._renderManagerService.registerRenderModule(t.UniverInstanceType.UNIVER_SHEET,[B])}};p(V,`pluginName`,`SHEET_CROSSHAIR_HIGHLIGHT_PLUGIN`),p(V,`packageName`,b),p(V,`version`,x),p(V,`type`,t.UniverInstanceType.UNIVER_SHEET),V=I([F(1,(0,t.Inject)(t.Injector)),F(2,r.IRenderManagerService),F(3,t.IConfigService)],V),e.CROSSHAIR_HIGHLIGHT_COLORS=m,e.DisableCrosshairHighlightOperation=y,e.EnableCrosshairHighlightOperation=v,e.SetCrosshairHighlightColorOperation=_,e.SheetsCrosshairHighlightService=h,e.ToggleCrosshairHighlightOperation=g,Object.defineProperty(e,`UniverSheetsCrosshairHighlightPlugin`,{enumerable:!0,get:function(){return V}})});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@univerjs/core"),require("rxjs"),require("@univerjs/engine-render"),require("react"),require("@univerjs/ui"),require("@univerjs/design"),require("react/jsx-runtime"),require("@univerjs/sheets"),require("@univerjs/sheets-ui")):typeof define==`function`&&define.amd?define([`exports`,`@univerjs/core`,`rxjs`,`@univerjs/engine-render`,`react`,`@univerjs/ui`,`@univerjs/design`,`react/jsx-runtime`,`@univerjs/sheets`,`@univerjs/sheets-ui`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverSheetsCrosshairHighlight={},e.UniverCore,e.rxjs,e.UniverEngineRender,e.React,e.UniverUi,e.UniverDesign,e.React,e.UniverSheets,e.UniverSheetsUi))})(this,function(e,t,n,r,i,a,o,s,c,l){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function u(e){"@babel/helpers - typeof";return u=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},u(e)}function d(e,t){if(u(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(u(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function f(e){var t=d(e,`string`);return u(t)==`symbol`?t:t+``}function p(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let m=[`rgba(158, 109, 227, 0.3)`,`rgba(254, 75, 75, 0.3)`,`rgba(255, 140, 81, 0.3)`,`rgba(164, 220, 22, 0.3)`,`rgba(45, 174, 255, 0.3)`,`rgba(58, 96, 247, 0.3)`,`rgba(242, 72, 166, 0.3)`,`rgba(153, 153, 153, 0.3)`,`rgba(158, 109, 227, 0.15)`,`rgba(254, 75, 75, 0.15)`,`rgba(255, 140, 81, 0.15)`,`rgba(164, 220, 22, 0.15)`,`rgba(45, 174, 255, 0.15)`,`rgba(58, 96, 247, 0.15)`,`rgba(242, 72, 166, 0.15)`,`rgba(153, 153, 153, 0.15)`];var h=class extends t.Disposable{constructor(...e){super(...e),p(this,`_enabled$`,new n.BehaviorSubject(!1)),p(this,`enabled$`,this._enabled$.asObservable()),p(this,`_color$`,new n.BehaviorSubject(m[0])),p(this,`color$`,this._color$.asObservable())}get enabled(){return this._enabled$.getValue()}get color(){return this._color$.getValue()}dispose(){this._enabled$.complete()}setEnabled(e){this._enabled$.next(e)}setColor(e){this._color$.next(e)}};let g={id:`sheet.operation.toggle-crosshair-highlight`,type:t.CommandType.OPERATION,handler(e){let t=e.get(h),n=t.enabled;return t.setEnabled(!n),!0}},_={id:`sheet.operation.set-crosshair-highlight-color`,type:t.CommandType.OPERATION,handler(e,{value:t}){let n=e.get(h);return n.enabled||n.setEnabled(!0),n.setColor(t),!0}},v={id:`sheet.operation.enable-crosshair-highlight`,type:t.CommandType.OPERATION,handler(e){let t=e.get(h);return t.enabled?!1:(t.setEnabled(!0),!0)}},y={id:`sheet.operation.disable-crosshair-highlight`,type:t.CommandType.OPERATION,handler(e){let t=e.get(h);return t.enabled?(t.setEnabled(!1),!0):!1}};var b=`@univerjs/sheets-crosshair-highlight`,x=`0.25.0`;let S={};function C({ref:e,...t}){let{icon:n,id:r,className:a,extend:o,...s}=t,c=`univerjs-icon univerjs-icon-${r} ${a||``}`.trim(),l=(0,i.useRef)(`_${D()}`);return w(n,`${r}`,{defIds:n.defIds,idSuffix:l.current},{ref:e,className:c,...s},o)}function w(e,t,n,r,a){return(0,i.createElement)(e.tag,{key:t,...T(e,n,a),...r},(E(e,n).children||[]).map((r,i)=>w(r,`${t}-${e.tag}-${i}`,n,void 0,a)))}function T(e,t,n){let r={...e.attrs};n!=null&&n.colorChannel1&&r.fill===`colorChannel1`&&(r.fill=n.colorChannel1),e.tag===`mask`&&r.id&&(r.id+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{e===`mask`&&typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))});let{defIds:i}=t;return!i||i.length===0?r:(e.tag===`use`&&r[`xlink:href`]&&(r[`xlink:href`]+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))}),r)}function E(e,t){var n;let{defIds:r}=t;return!r||r.length===0?e:e.tag===`defs`&&(n=e.children)!=null&&n.length?{...e,children:e.children.map(e=>typeof e.attrs.id==`string`&&r&&r.includes(e.attrs.id)?{...e,attrs:{...e.attrs,id:e.attrs.id+t.idSuffix}}:e)}:e}function D(){return Math.random().toString(36).substring(2,8)}C.displayName=`UniverIcon`;let O={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M3.6498 1.05005C2.21386 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V3.65005C14.9498 2.21411 13.7857 1.05005 12.3498 1.05005H3.6498ZM5.4002 2.25005H3.6498C2.87661 2.25005 2.2498 2.87685 2.2498 3.65005V5.40002H5.4002V2.25005ZM2.2498 10.6V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H5.4002V10.6H2.2498ZM6.60019 13.75H9.4002V9.40002H13.7498V6.60002H9.4002V2.25005H6.60019V6.60002H2.25029V9.40002H6.60019V13.75ZM10.6002 2.25005V5.40002H13.7498V3.65005C13.7498 2.87685 13.123 2.25005 12.3498 2.25005H10.6002ZM13.7498 10.6H10.6002V13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.6Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},k=(0,i.forwardRef)(function(e,t){return(0,i.createElement)(C,Object.assign({},e,{id:`cross-highlighting-icon`,ref:t,icon:O}))});k.displayName=`CrossHighlightingIcon`;let A=`CROSSHAIR_HIGHLIGHT_OVERLAY_COMPONENT`;function j(e){let n=e.get(h);return{id:g.id,tooltip:`sheets-crosshair-highlight.button.tooltip`,type:a.MenuItemType.BUTTON_SELECTOR,icon:`CrossHighlightingIcon`,selections:[{label:{name:A,hoverable:!1,selectable:!1}}],selectionsCommandId:_.id,activated$:n.enabled$,hidden$:(0,a.getMenuHiddenObservable)(e,t.UniverInstanceType.UNIVER_SHEET)}}let M={[a.ContextMenuPosition.FOOTER_MENU]:{[a.ContextMenuGroup.OTHERS]:{[g.id]:{order:0,menuItemFactory:j}}}};function N(e){let{onChange:t}=e,n=(0,a.useObservable)((0,a.useDependency)(h).color$),r=(0,i.useCallback)(e=>{t==null||t(e)},[t]);return(0,s.jsx)(`div`,{className:`univer-grid univer-grid-cols-8 univer-gap-x-2 univer-gap-y-3`,children:m.map(e=>(0,s.jsx)(`div`,{className:(0,o.clsx)(`hover:univer-ring-primary-600/40 univer-box-border univer-size-5 univer-cursor-pointer univer-rounded univer-ring-offset-1 univer-transition-shadow hover:univer-ring-[1.5px]`,o.borderClassName,{"univer-ring-[1.5px] univer-ring-primary-600 hover:univer-ring-primary-600":e===n}),style:{backgroundColor:e},onClick:()=>r(e)},e))})}function P(e,t){return function(n,r){t(n,r,e)}}function F(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let I=class extends t.Disposable{constructor(e,t,n){super(),this._componentMgr=e,this._menuManagerService=t,this._cmdSrv=n,this._initCommands(),this._initMenus(),this._initComponents()}_initCommands(){[g,_,v,y].forEach(e=>this._cmdSrv.registerCommand(e))}_initMenus(){this._menuManagerService.mergeMenu(M)}_initComponents(){this._componentMgr.register(A,N),this._componentMgr.register(`CrossHighlightingIcon`,k)}};I=F([P(0,(0,t.Inject)(a.ComponentManager)),P(1,a.IMenuManagerService),P(2,t.ICommandService)],I);var L=class{constructor(){p(this,`_selectedRanges`,[]),p(this,`_ranges`,[])}addRange(e){if(e.rangeType===t.RANGE_TYPE.COLUMN||e.rangeType===t.RANGE_TYPE.ROW||e.rangeType===t.RANGE_TYPE.ALL)return;let n=this._getIntersects(e),r=this._getSplitRanges(e,n);r.length>0&&this._ranges.push(...r)}setSelectedRanges(e){this._selectedRanges=e}_getSplitRanges(e,n){let r=[e];for(let e of n.concat(this._selectedRanges)){let n=[];for(let i of r){let r=t.Rectangle.subtract(i,e);r&&r.length>0&&n.push(...r)}r=n}return r.filter(e=>e.startRow<=e.endRow&&e.startColumn<=e.endColumn)}_getIntersects(e){let n=[];for(let r of this._ranges){let i=t.Rectangle.getIntersects(r,e);i&&n.push(i)}return n}getRanges(){return this._ranges}reset(){this._ranges=[],this._selectedRanges=[]}},R=class extends r.Shape{constructor(e,t){super(e,t),p(this,`_color`,void 0),t&&this.setShapeProps(t)}setShapeProps(e){e.color!==void 0&&(this._color=e.color),this.transformByState({width:e.width,height:e.height})}_draw(e){var t,n;let i=`rgba(${this._color.r}, ${this._color.g}, ${this._color.b}, ${(t=(n=this._color)==null?void 0:n.a)==null?.5:t})`;r.Rect.drawWith(e,{width:this.width,height:this.height,fill:i,stroke:void 0,strokeWidth:0,evented:!1})}};let z=class extends t.Disposable{constructor(e,t,n,r,i,a){super(),this._context=e,this._sheetSkeletonManagerService=t,this._sheetsSelectionsService=n,this._sheetsCrosshairHighlightService=r,this._contextService=i,this._refSelectionsService=a,p(this,`_shapes`,[]),p(this,`_rangeCollection`,new L),p(this,`_color`,`rgba(255,0,0,0.5)`),this._initRenderListener()}_transformSelection(e,t){if(!e)return;let n=t.getRowCount(),r=t.getColumnCount(),i=[];for(let t of e){let{startRow:e,endRow:a,startColumn:o,endColumn:s}=t.range;a-e+1===n||s-o+1===r||i.push(t.range)}this._rangeCollection.setSelectedRanges(i);for(let e of i)this.addSelection(e,t)}_initRenderListener(){let e=this._context.unit;this.disposeWithMe((0,n.combineLatest)([this._contextService.subscribeContextValue$(c.REF_SELECTIONS_ENABLED).pipe((0,n.startWith)(!1)),this._sheetSkeletonManagerService.currentSkeleton$,this._sheetsCrosshairHighlightService.enabled$,this._sheetsCrosshairHighlightService.color$.pipe((0,n.tap)(e=>this._color=e)),(0,n.merge)(this._sheetsSelectionsService.selectionMoveStart$,this._sheetsSelectionsService.selectionMoving$,this._sheetsSelectionsService.selectionMoveEnd$,this._sheetsSelectionsService.selectionSet$,e.activeSheet$.pipe((0,n.map)(()=>this._sheetsSelectionsService.getCurrentSelections()))),(0,n.merge)(this._refSelectionsService.selectionMoveStart$,this._refSelectionsService.selectionMoving$,this._refSelectionsService.selectionMoveEnd$,this._sheetsSelectionsService.selectionSet$,e.activeSheet$.pipe((0,n.map)(()=>this._refSelectionsService.getCurrentSelections())))]).subscribe(([t,n,r,i,a,o])=>{if(this._clear(),!r)return;let s=t?o:a;this._rangeCollection.reset(),this._transformSelection(s,e.getActiveSheet()),this.render(this._rangeCollection.getRanges())}))}addSelection(e,n){if(e.rangeType===t.RANGE_TYPE.COLUMN||e.rangeType===t.RANGE_TYPE.ROW||e.rangeType===t.RANGE_TYPE.ALL)return;let r=n.getRowCount(),i=n.getColumnCount(),{startRow:a,endRow:o,startColumn:s,endColumn:c}=e,l={startRow:a,endRow:o,startColumn:0,endColumn:s-1},u={startRow:a,endRow:o,startColumn:c+1,endColumn:i},d={startRow:0,endRow:a-1,startColumn:s,endColumn:c},f={startRow:o+1,endRow:r,startColumn:s,endColumn:c};for(let e of[l,u,d,f])e.startRow<=e.endRow&&e.startColumn<=e.endColumn&&this._rangeCollection.addRange(e)}_clear(){this._shapes.forEach(e=>{e.dispose()}),this._shapes=[]}_addShapes(e,n,r,i){let{startRow:a,endRow:o,startColumn:s,endColumn:c}=e,u=(0,l.getCoordByCell)(a,s,r,i),d=(0,l.getCoordByCell)(o,c,r,i),{startX:f,startY:p}=u,{endX:m,endY:h}=d,g=m-f,_=h-p,v={left:f,top:p,color:new t.ColorKit(this._color).toRgb(),width:g,height:_,zIndex:1,evented:!1},y=new R(`crosshair-${n}`,v);this._shapes.push(y),r.addObject(y)}render(e){let t=this._sheetSkeletonManagerService.getCurrentSkeleton();if(!t)return;let{scene:n}=this._context;this._clear();for(let r=0;r<e.length;r++){let i=e[r];this._addShapes(i,r,n,t)}n.makeDirty(!0)}async dispose(){super.dispose()}};z=F([P(1,(0,t.Inject)(l.SheetSkeletonManagerService)),P(2,(0,t.Inject)(c.SheetsSelectionsService)),P(3,(0,t.Inject)(h)),P(4,(0,t.Inject)(t.IContextService)),P(5,c.IRefSelectionsService)],z);let B=class extends t.Plugin{constructor(e=S,n,r,i){super(),this._config=e,this._injector=n,this._renderManagerService=r,this._configService=i;let{...a}=(0,t.merge)({},S,this._config);this._configService.setConfig(`sheets-crosshair-highlight.config`,a)}onStarting(){[[h],[I]].forEach(e=>this._injector.add(e))}onReady(){[[z]].forEach(e=>this._injector.add(e)),this._injector.get(I),this._renderManagerService.registerRenderModule(t.UniverInstanceType.UNIVER_SHEET,[z])}};p(B,`pluginName`,`SHEET_CROSSHAIR_HIGHLIGHT_PLUGIN`),p(B,`packageName`,b),p(B,`version`,x),p(B,`type`,t.UniverInstanceType.UNIVER_SHEET),B=F([P(1,(0,t.Inject)(t.Injector)),P(2,r.IRenderManagerService),P(3,t.IConfigService)],B),e.CROSSHAIR_HIGHLIGHT_COLORS=m,e.DisableCrosshairHighlightOperation=y,e.EnableCrosshairHighlightOperation=v,e.SetCrosshairHighlightColorOperation=_,e.SheetsCrosshairHighlightService=h,e.ToggleCrosshairHighlightOperation=g,Object.defineProperty(e,"UniverSheetsCrosshairHighlightPlugin",{enumerable:!0,get:function(){return B}})});
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightArSA=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`تسليط الضوء على التقاطع`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightCaES=t())})(this,function(){return{crosshair:{button:{tooltip:`Ressaltat de creu`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightCaES=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Ressaltat de creu`}}}});
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightDeDE=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Fadenkreuz-Hervorhebung`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightEnUS=t())})(this,function(){return{crosshair:{button:{tooltip:`Crosshair Highlight`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightEnUS=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Crosshair Highlight`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightEsES=t())})(this,function(){return{crosshair:{button:{tooltip:`Resaltado de cruz`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightEsES=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Resaltado de cruz`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightFaIR=t())})(this,function(){return{crosshair:{button:{tooltip:`برجسته کردن خط نشانه`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightFaIR=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`برجسته کردن خط نشانه`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightFrFR=t())})(this,function(){return{crosshair:{button:{tooltip:`Surlignage du réticule`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightFrFR=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Surlignage du réticule`}}}});
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightIdID=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Sorot Penyilang`}}}});
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightItIT=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Evidenziazione mirino`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightJaJP=t())})(this,function(){return{crosshair:{button:{tooltip:`십자선 강조`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightJaJP=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`십자선 강조`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightKoKR=t())})(this,function(){return{crosshair:{button:{tooltip:`십자선 강조`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightKoKR=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`십자선 강조`}}}});
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightPlPL=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Podświetlenie krzyżowe`}}}});
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightPtBR=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Destaque de Mira Cruzada`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightRuRU=t())})(this,function(){return{crosshair:{button:{tooltip:`Перекрестный выделение`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightRuRU=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Перекрестный выделение`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightSkSK=t())})(this,function(){return{crosshair:{button:{tooltip:`Zvýraznenie krížika`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightSkSK=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Zvýraznenie krížika`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightViVN=t())})(this,function(){return{crosshair:{button:{tooltip:`Đánh dấu chéo`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightViVN=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`Đánh dấu chéo`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightZhCN=t())})(this,function(){return{crosshair:{button:{tooltip:`十字高亮`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightZhCN=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`十字高亮`}}}});
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightZhHK=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`十字高亮`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightZhTW=t())})(this,function(){return{crosshair:{button:{tooltip:`十字高亮`}}}});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverSheetsCrosshairHighlightZhTW=t())})(this,function(){return{"sheets-crosshair-highlight":{button:{tooltip:`十字高亮`}}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/sheets-crosshair-highlight",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "private": false,
5
5
  "description": "Crosshair highlight plugin for Univer Sheets.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -69,21 +69,21 @@
69
69
  },
70
70
  "dependencies": {
71
71
  "@univerjs/icons": "1.4.0",
72
- "@univerjs/core": "0.24.0",
73
- "@univerjs/design": "0.24.0",
74
- "@univerjs/engine-render": "0.24.0",
75
- "@univerjs/ui": "0.24.0",
76
- "@univerjs/sheets-ui": "0.24.0",
77
- "@univerjs/sheets": "0.24.0"
72
+ "@univerjs/design": "0.25.0",
73
+ "@univerjs/engine-render": "0.25.0",
74
+ "@univerjs/sheets": "0.25.0",
75
+ "@univerjs/core": "0.25.0",
76
+ "@univerjs/sheets-ui": "0.25.0",
77
+ "@univerjs/ui": "0.25.0"
78
78
  },
79
79
  "devDependencies": {
80
- "postcss": "^8.5.14",
80
+ "postcss": "^8.5.15",
81
81
  "react": "18.3.1",
82
82
  "rxjs": "^7.8.2",
83
83
  "tailwindcss": "3.4.18",
84
84
  "typescript": "^6.0.3",
85
- "vitest": "^4.1.5",
86
- "@univerjs-infra/shared": "0.24.0"
85
+ "vitest": "^4.1.7",
86
+ "@univerjs-infra/shared": "0.25.0"
87
87
  },
88
88
  "scripts": {
89
89
  "test": "vitest run",