@univerjs/sheets-crosshair-highlight 0.21.1 → 0.22.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.
package/README.md CHANGED
@@ -1,29 +1,42 @@
1
1
  # @univerjs/sheets-crosshair-highlight
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@univerjs/sheets-crosshair-highlight?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-crosshair-highlight)
4
+ [![license](https://img.shields.io/npm/l/@univerjs/sheets-crosshair-highlight?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-crosshair-highlight)
5
+ [![downloads](https://img.shields.io/npm/dm/@univerjs/sheets-crosshair-highlight?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-crosshair-highlight)
6
+
7
+ `@univerjs/sheets-crosshair-highlight` adds crosshair highlighting for the active row and column in Univer Sheets.
8
+
3
9
  ## Package Overview
4
10
 
5
- | Package Name | UMD Namespace | Version | License | Downloads | Contains CSS | Contains i18n locales |
6
- | --- | --- | --- | --- | --- | :---: | :---: |
7
- | `@univerjs/sheets-crosshair-highlight` | `UniverSheetsCrosshairHighlight` | [![][npm-version-shield]][npm-version-link] | ![][npm-license-shield] | ![][npm-downloads-shield] | ⭕️ | ⭕️ |
11
+ | Package | UMD global | CSS | Locales | Facade entry |
12
+ | --- | --- | :---: | :---: | :---: |
13
+ | `@univerjs/sheets-crosshair-highlight` | `UniverSheetsCrosshairHighlight` | Yes | Yes | Yes |
8
14
 
9
- ## Introduction
15
+ ## Installation
16
+
17
+ ```sh
18
+ pnpm add @univerjs/sheets-crosshair-highlight
19
+ # or
20
+ npm install @univerjs/sheets-crosshair-highlight
21
+ ```
10
22
 
11
- This plugin adds a crosshair highlight to the Univer Sheet.
23
+ Keep all `@univerjs/*` packages on the same version.
12
24
 
13
25
  ## Usage
14
26
 
15
- ### Installation
27
+ ```ts
28
+ import '@univerjs/sheets-crosshair-highlight/lib/index.css';
29
+ import EnUS from '@univerjs/sheets-crosshair-highlight/locale/en-US';
30
+ import { UniverSheetsCrosshairHighlightPlugin } from '@univerjs/sheets-crosshair-highlight';
16
31
 
17
- ```shell
18
- # Using npm
19
- npm i @univerjs/sheets-crosshair-highlight
32
+ univer.registerPlugin(UniverSheetsCrosshairHighlightPlugin);
20
33
 
21
- # Using pnpm
22
- pnpm add @univerjs/sheets-crosshair-highlight
34
+ // Merge EnUS into your Univer locale map when this package contributes UI text.
23
35
  ```
24
36
 
25
- <!-- Links -->
26
- [npm-version-shield]: https://img.shields.io/npm/v/@univerjs/sheets-crosshair-highlight?style=flat-square
27
- [npm-version-link]: https://npmjs.com/package/@univerjs/sheets-crosshair-highlight
28
- [npm-license-shield]: https://img.shields.io/npm/l/@univerjs/sheets-crosshair-highlight?style=flat-square
29
- [npm-downloads-shield]: https://img.shields.io/npm/dm/@univerjs/sheets-crosshair-highlight?style=flat-square
37
+ ## Resources
38
+
39
+ - [Documentation](https://docs.univer.ai)
40
+ - [NPM package](https://npmjs.com/package/@univerjs/sheets-crosshair-highlight)
41
+ - [GitHub repository](https://github.com/dream-num/univer)
42
+
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.124.0/helpers/typeof.js
13
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/toPrimitive.js
24
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/toPropertyKey.js
37
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/defineProperty.js
44
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.21.1";
175
+ var version = "0.22.0";
176
176
 
177
177
  //#endregion
178
178
  //#region src/config/config.ts
@@ -244,7 +244,7 @@ function CrosshairOverlay(props) {
244
244
  }
245
245
 
246
246
  //#endregion
247
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorateParam.js
247
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/decorate.js
255
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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);
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.124.0/helpers/typeof.js
12
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/toPrimitive.js
23
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/toPropertyKey.js
36
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/defineProperty.js
43
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.21.1";
174
+ var version = "0.22.0";
175
175
 
176
176
  //#endregion
177
177
  //#region src/config/config.ts
@@ -243,7 +243,7 @@ function CrosshairOverlay(props) {
243
243
  }
244
244
 
245
245
  //#endregion
246
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorateParam.js
246
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/decorate.js
254
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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);
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.124.0/helpers/typeof.js
12
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/toPrimitive.js
23
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/toPropertyKey.js
36
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/defineProperty.js
43
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.21.1";
174
+ var version = "0.22.0";
175
175
 
176
176
  //#endregion
177
177
  //#region src/config/config.ts
@@ -243,7 +243,7 @@ function CrosshairOverlay(props) {
243
243
  }
244
244
 
245
245
  //#endregion
246
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorateParam.js
246
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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.124.0/helpers/decorate.js
254
+ //#region \0@oxc-project+runtime@0.129.0/helpers/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);
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.21.1`;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.22.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}})});
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@univerjs/sheets-crosshair-highlight",
3
- "version": "0.21.1",
3
+ "version": "0.22.0",
4
4
  "private": false,
5
- "description": "",
6
- "author": "DreamNum <developer@univer.ai>",
5
+ "description": "Crosshair highlight plugin for Univer Sheets.",
6
+ "author": "DreamNum Co., Ltd. <developer@univer.ai>",
7
7
  "license": "Apache-2.0",
8
8
  "funding": {
9
9
  "type": "opencollective",
@@ -17,7 +17,13 @@
17
17
  "bugs": {
18
18
  "url": "https://github.com/dream-num/univer/issues"
19
19
  },
20
- "keywords": [],
20
+ "keywords": [
21
+ "univer",
22
+ "sheets",
23
+ "crosshair",
24
+ "highlight",
25
+ "plugin"
26
+ ],
21
27
  "exports": {
22
28
  ".": {
23
29
  "import": "./lib/es/index.js",
@@ -63,21 +69,21 @@
63
69
  },
64
70
  "dependencies": {
65
71
  "@univerjs/icons": "^1.1.1",
66
- "@univerjs/core": "0.21.1",
67
- "@univerjs/design": "0.21.1",
68
- "@univerjs/engine-render": "0.21.1",
69
- "@univerjs/sheets": "0.21.1",
70
- "@univerjs/sheets-ui": "0.21.1",
71
- "@univerjs/ui": "0.21.1"
72
+ "@univerjs/core": "0.22.0",
73
+ "@univerjs/design": "0.22.0",
74
+ "@univerjs/engine-render": "0.22.0",
75
+ "@univerjs/sheets-ui": "0.22.0",
76
+ "@univerjs/ui": "0.22.0",
77
+ "@univerjs/sheets": "0.22.0"
72
78
  },
73
79
  "devDependencies": {
74
- "postcss": "^8.5.10",
80
+ "postcss": "^8.5.14",
75
81
  "react": "18.3.1",
76
82
  "rxjs": "^7.8.2",
77
83
  "tailwindcss": "3.4.18",
78
- "typescript": "^6.0.2",
79
- "vitest": "^4.1.4",
80
- "@univerjs-infra/shared": "0.21.1"
84
+ "typescript": "^6.0.3",
85
+ "vitest": "^4.1.5",
86
+ "@univerjs-infra/shared": "0.22.0"
81
87
  },
82
88
  "scripts": {
83
89
  "test": "vitest run",