@univerjs/sheets-zen-editor 0.1.0-beta.5 → 0.1.2
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 +6 -2
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +27 -27
- package/lib/types/locale/en-US.d.ts +3 -9
- package/lib/types/locale/zh-CN.d.ts +2 -2
- package/lib/umd/index.js +2 -2
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -5,12 +5,16 @@
|
|
|
5
5
|
|
|
6
6
|
## Introduction
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
`@univerjs/sheets-zen-mode-editor` enhances the immersive editing experience for cells in sheets.
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
12
|
### Installation
|
|
13
13
|
|
|
14
14
|
```shell
|
|
15
|
-
|
|
15
|
+
# Using npm
|
|
16
|
+
npm install @univerjs/sheets-zen-editor
|
|
17
|
+
|
|
18
|
+
# Using pnpm
|
|
19
|
+
pnpm add @univerjs/sheets-zen-editor
|
|
16
20
|
```
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Q=Object.defineProperty;var ee=(e,t,i)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var O=(e,t,i)=>(ee(e,typeof t!="symbol"?t+"":t,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@univerjs/core"),g=require("@wendellhu/redi"),E=require("@univerjs/docs"),M=require("@univerjs/engine-render"),N=require("@univerjs/sheets-ui"),u=require("@univerjs/ui"),k=require("rxjs"),S=require("react"),j=require("@wendellhu/redi/react-bindings"),$=require("clsx"),Z={id:"zen-editor.operation.open-zen-editor",type:c.CommandType.OPERATION,handler:e=>!0};class te{constructor(){O(this,"_position",null);O(this,"_position$",new k.BehaviorSubject(null));O(this,"position$",this._position$.asObservable())}dispose(){this._position$.complete(),this._position=null}setPosition(t){this._position=t,this._refresh(t)}getPosition(){return this._position}_refresh(t){this._position$.next(t)}}const L=g.createIdentifier("univer.sheet-zen-editor-manager.service");var ne=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,re=(e,t,i,n)=>{for(var r=n>1?void 0:n?ie(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(n?o(t,i,r):o(r))||r);return n&&r&&ne(t,i,r),r},f=(e,t)=>(i,n)=>t(i,n,e);const v="__defaultDocumentZenEditorSpecialUnitId_20231218__";let b=class extends c.RxDisposable{constructor(e,t,i,n,r,s,o,a,d,l){super(),this._currentUniverService=e,this._zenEditorManagerService=t,this._renderManagerService=i,this._commandService=n,this._zenZoneService=r,this._editorBridgeService=s,this._undoRedoService=o,this._textSelectionManagerService=a,this._docSkeletonManagerService=d,this._docViewModelManagerService=l,this._initialize()}_initialize(){this._syncZenEditorSize(),this._commandExecutedListener(),this._createZenEditorInstance()}_createZenEditorInstance(){const e={id:v,body:{dataStream:`${c.DEFAULT_EMPTY_DOCUMENT_VALUE}`,textRuns:[],paragraphs:[{startIndex:0}]},documentStyle:{pageSize:{width:595,height:842},marginTop:50,marginBottom:50,marginRight:40,marginLeft:40,renderConfig:{vertexAngle:0,centerAngle:0}}};this._currentUniverService.createDoc(e)}_syncZenEditorSize(){this._zenEditorManagerService.position$.pipe(k.takeUntil(this.dispose$)).subscribe(e=>{var a;if(e==null)return;const t=N.getEditorObject(v,this._renderManagerService),i=this._currentUniverService.getUniverDocInstance(v);if(t==null||i==null)return;const{width:n,height:r}=e,{engine:s}=t,o=(a=this._docSkeletonManagerService.getSkeletonByUnitId(v))==null?void 0:a.skeleton;requestIdleCallback(()=>{s.resizeBySize(n,r),this._calculatePagePosition(t),o&&this._textSelectionManagerService.refreshSelection()})})}_handleOpenZenEditor(){this._zenZoneService.open(),this._undoRedoService.clearUndoRedo(v),this._currentUniverService.focusUniverInstance(v),this._currentUniverService.setCurrentUniverDocInstance(v),this._editorBridgeService.isVisible().visible===!1&&this._editorBridgeService.changeVisible({visible:!0,eventType:M.DeviceInputEventType.PointerDown});const t=this._editorBridgeService.getLatestEditCellState();if(t==null)return;this._editorSyncHandler(t);const i=[{startOffset:0,endOffset:0}];this._textSelectionManagerService.replaceTextRanges(i)}_editorSyncHandler(e){var s,o;const t=(s=e.documentLayoutObject.documentModel)==null?void 0:s.getBody(),i=t==null?void 0:t.dataStream,n=t==null?void 0:t.paragraphs;let r=[];i==null||n==null||((o=t==null?void 0:t.textRuns)!=null&&o.length&&(r=t==null?void 0:t.textRuns),this._syncContentAndRender(v,i,n,r))}_syncContentAndRender(e,t,i,n=[]){const r=[v,c.DOCS_NORMAL_EDITOR_UNIT_ID_KEY,c.DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY],s=this._docSkeletonManagerService.getSkeletonByUnitId(e),o=this._currentUniverService.getUniverDocInstance(e),a=this._docViewModelManagerService.getViewModel(e);if(o==null||a==null||s==null)return;const d=o.getBody();d.dataStream=t,d.paragraphs=i,e===c.DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY&&(d.textRuns=[]),n.length>0&&(d.textRuns=n),a.reset(o);const{skeleton:l}=s,_=this._getDocObject();_!=null&&(l.calculate(),r.includes(e)&&_.document.makeDirty())}_calculatePagePosition(e){const{document:t,scene:i}=e,n=i==null?void 0:i.getParent(),{width:r,height:s,pageMarginLeft:o,pageMarginTop:a}=t;if(n==null||r===Number.POSITIVE_INFINITY||s===Number.POSITIVE_INFINITY)return;const{width:d,height:l}=n;let _=0,m=0,z=0,D=0,R=Number.POSITIVE_INFINITY;const{scaleX:C,scaleY:G}=i.getAncestorScale();d>(r+o*2)*C?(_=d/2-r*C/2,_/=C,z=(d-o*2)/C,R=0):(_=o,z=r+o*2,R=(z-d/C)/2),l>s?(m=l/2-s/2,D=(l-a*2)/G):(m=a,D=s+a*2),i.resize(z,D+200),t.translate(_,m);const U=i.getViewport(E.VIEWPORT_KEY.VIEW_MAIN);if(R!==Number.POSITIVE_INFINITY&&U!=null){const J=U.getBarScroll(R,0).x;U.scrollTo({x:J})}return this}_commandExecutedListener(){const e=[Z.id];this.disposeWithMe(this._commandService.onCommandExecuted(i=>{e.includes(i.id)&&this._handleOpenZenEditor()}));const t=[E.RichTextEditingMutation.id];this.disposeWithMe(this._commandService.onCommandExecuted(i=>{if(t.includes(i.id)){const n=i.params,{unitId:r}=n;if(r===v){const s=this._currentUniverService.getUniverDocInstance(r),o=s==null?void 0:s.getBody(),a=o==null?void 0:o.dataStream,d=o==null?void 0:o.paragraphs,l=o==null?void 0:o.textRuns;if(a==null||d==null)return;this._syncContentAndRender(c.DOCS_NORMAL_EDITOR_UNIT_ID_KEY,a,d,l)}}}))}_getDocObject(){return E.getDocObject(this._currentUniverService,this._renderManagerService)}};b=re([c.OnLifecycle(c.LifecycleStages.Steady,b),f(0,c.IUniverInstanceService),f(1,L),f(2,M.IRenderManagerService),f(3,c.ICommandService),f(4,u.IZenZoneService),f(5,N.IEditorBridgeService),f(6,c.IUndoRedoService),f(7,g.Inject(E.TextSelectionManagerService)),f(8,g.Inject(E.DocSkeletonManagerService)),f(9,g.Inject(E.DocViewModelManagerService))],b);const w={id:"zen-editor.command.cancel-zen-edit",type:c.CommandType.COMMAND,handler:async e=>{const t=e.get(u.IZenZoneService),i=e.get(N.IEditorBridgeService),n=e.get(c.IUniverInstanceService);i.isVisible().visible&&i.changeVisible({visible:!1,eventType:M.DeviceInputEventType.Keyboard,keycode:u.KeyCode.ESC}),t.close();const s=n.getCurrentUniverSheetInstance();return n.focusUniverInstance(s.getUnitId()),i.refreshEditCellState(),!0}},A={id:"zen-editor.command.confirm-zen-edit",type:c.CommandType.COMMAND,handler:async e=>{const t=e.get(u.IZenZoneService),i=e.get(N.IEditorBridgeService),n=e.get(c.IUniverInstanceService);i.isVisible().visible&&i.changeVisible({visible:!1,eventType:M.DeviceInputEventType.PointerDown}),t.close();const s=n.getCurrentUniverSheetInstance();return n.focusUniverInstance(s.getUnitId()),i.refreshEditCellState(),!0}};function oe(){return{id:Z.id,group:u.MenuGroup.CONTEXT_MENU_OTHERS,type:u.MenuItemType.BUTTON,title:"rightClick.zenEditor",icon:"AmplifySingle",positions:[u.MenuPosition.CONTEXT_MENU]}}var W={exports:{}},x={};/**
|
|
1
|
+
"use strict";var Q=Object.defineProperty;var ee=(e,t,i)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var O=(e,t,i)=>(ee(e,typeof t!="symbol"?t+"":t,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@univerjs/core"),g=require("@wendellhu/redi"),E=require("@univerjs/docs"),M=require("@univerjs/engine-render"),N=require("@univerjs/sheets-ui"),u=require("@univerjs/ui"),k=require("rxjs"),S=require("react"),j=require("@wendellhu/redi/react-bindings"),$=require("clsx"),Z={id:"zen-editor.operation.open-zen-editor",type:c.CommandType.OPERATION,handler:e=>!0};class te{constructor(){O(this,"_position",null);O(this,"_position$",new k.BehaviorSubject(null));O(this,"position$",this._position$.asObservable())}dispose(){this._position$.complete(),this._position=null}setPosition(t){this._position=t,this._refresh(t)}getPosition(){return this._position}_refresh(t){this._position$.next(t)}}const L=g.createIdentifier("univer.sheet-zen-editor-manager.service");var ne=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,re=(e,t,i,n)=>{for(var r=n>1?void 0:n?ie(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(n?o(t,i,r):o(r))||r);return n&&r&&ne(t,i,r),r},f=(e,t)=>(i,n)=>t(i,n,e);const v="__defaultDocumentZenEditorSpecialUnitId_20231218__";let b=class extends c.RxDisposable{constructor(e,t,i,n,r,s,o,a,d,l){super(),this._currentUniverService=e,this._zenEditorManagerService=t,this._renderManagerService=i,this._commandService=n,this._zenZoneService=r,this._editorBridgeService=s,this._undoRedoService=o,this._textSelectionManagerService=a,this._docSkeletonManagerService=d,this._docViewModelManagerService=l,this._initialize()}_initialize(){this._syncZenEditorSize(),this._commandExecutedListener(),this._createZenEditorInstance()}_createZenEditorInstance(){const e={id:v,body:{dataStream:`${c.DEFAULT_EMPTY_DOCUMENT_VALUE}`,textRuns:[],paragraphs:[{startIndex:0}]},documentStyle:{pageSize:{width:595,height:842},marginTop:50,marginBottom:50,marginRight:40,marginLeft:40,renderConfig:{vertexAngle:0,centerAngle:0}}};this._currentUniverService.createDoc(e)}_syncZenEditorSize(){this._zenEditorManagerService.position$.pipe(k.takeUntil(this.dispose$)).subscribe(e=>{var a;if(e==null)return;const t=N.getEditorObject(v,this._renderManagerService),i=this._currentUniverService.getUniverDocInstance(v);if(t==null||i==null)return;const{width:n,height:r}=e,{engine:s}=t,o=(a=this._docSkeletonManagerService.getSkeletonByUnitId(v))==null?void 0:a.skeleton;requestIdleCallback(()=>{s.resizeBySize(n,r),this._calculatePagePosition(t),o&&this._textSelectionManagerService.refreshSelection()})})}_handleOpenZenEditor(){this._zenZoneService.open(),this._undoRedoService.clearUndoRedo(v),this._currentUniverService.focusUniverInstance(v),this._currentUniverService.setCurrentUniverDocInstance(v),this._editorBridgeService.isVisible().visible===!1&&this._editorBridgeService.changeVisible({visible:!0,eventType:M.DeviceInputEventType.PointerDown});const t=this._editorBridgeService.getLatestEditCellState();if(t==null)return;this._editorSyncHandler(t);const i=[{startOffset:0,endOffset:0}];this._textSelectionManagerService.replaceTextRanges(i)}_editorSyncHandler(e){var s,o;const t=(s=e.documentLayoutObject.documentModel)==null?void 0:s.getBody(),i=t==null?void 0:t.dataStream,n=t==null?void 0:t.paragraphs;let r=[];i==null||n==null||((o=t==null?void 0:t.textRuns)!=null&&o.length&&(r=t==null?void 0:t.textRuns),this._syncContentAndRender(v,i,n,r))}_syncContentAndRender(e,t,i,n=[]){const r=[v,c.DOCS_NORMAL_EDITOR_UNIT_ID_KEY,c.DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY],s=this._docSkeletonManagerService.getSkeletonByUnitId(e),o=this._currentUniverService.getUniverDocInstance(e),a=this._docViewModelManagerService.getViewModel(e);if(o==null||a==null||s==null)return;const d=o.getBody();d.dataStream=t,d.paragraphs=i,e===c.DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY&&(d.textRuns=[]),n.length>0&&(d.textRuns=n),a.reset(o);const{skeleton:l}=s,_=this._getDocObject();_!=null&&(l.calculate(),r.includes(e)&&_.document.makeDirty())}_calculatePagePosition(e){const{document:t,scene:i}=e,n=i==null?void 0:i.getParent(),{width:r,height:s,pageMarginLeft:o,pageMarginTop:a}=t;if(n==null||r===Number.POSITIVE_INFINITY||s===Number.POSITIVE_INFINITY)return;const{width:d,height:l}=n;let _=0,m=0,z=0,D=0,R=Number.POSITIVE_INFINITY;const{scaleX:C,scaleY:G}=i.getAncestorScale();d>(r+o*2)*C?(_=d/2-r*C/2,_/=C,z=(d-o*2)/C,R=0):(_=o,z=r+o*2,R=(z-d/C)/2),l>s?(m=l/2-s/2,D=(l-a*2)/G):(m=a,D=s+a*2),i.resize(z,D+200),t.translate(_,m);const U=i.getViewport(E.VIEWPORT_KEY.VIEW_MAIN);if(R!==Number.POSITIVE_INFINITY&&U!=null){const J=U.getBarScroll(R,0).x;U.scrollTo({x:J})}return this}_commandExecutedListener(){const e=[Z.id];this.disposeWithMe(this._commandService.onCommandExecuted(i=>{e.includes(i.id)&&this._handleOpenZenEditor()}));const t=[E.RichTextEditingMutation.id];this.disposeWithMe(this._commandService.onCommandExecuted(i=>{if(t.includes(i.id)){const n=i.params,{unitId:r}=n;if(r===v){const s=this._currentUniverService.getUniverDocInstance(r),o=s==null?void 0:s.getBody(),a=o==null?void 0:o.dataStream,d=o==null?void 0:o.paragraphs,l=o==null?void 0:o.textRuns;if(this._editorBridgeService.changeEditorDirty(!0),a==null||d==null)return;this._syncContentAndRender(c.DOCS_NORMAL_EDITOR_UNIT_ID_KEY,a,d,l)}}}))}_getDocObject(){return E.getDocObject(this._currentUniverService,this._renderManagerService)}};b=re([c.OnLifecycle(c.LifecycleStages.Steady,b),f(0,c.IUniverInstanceService),f(1,L),f(2,M.IRenderManagerService),f(3,c.ICommandService),f(4,u.IZenZoneService),f(5,N.IEditorBridgeService),f(6,c.IUndoRedoService),f(7,g.Inject(E.TextSelectionManagerService)),f(8,g.Inject(E.DocSkeletonManagerService)),f(9,g.Inject(E.DocViewModelManagerService))],b);const w={id:"zen-editor.command.cancel-zen-edit",type:c.CommandType.COMMAND,handler:async e=>{const t=e.get(u.IZenZoneService),i=e.get(N.IEditorBridgeService),n=e.get(c.IUniverInstanceService);i.isVisible().visible&&i.changeVisible({visible:!1,eventType:M.DeviceInputEventType.Keyboard,keycode:u.KeyCode.ESC}),t.close();const s=n.getCurrentUniverSheetInstance();return n.focusUniverInstance(s.getUnitId()),i.refreshEditCellState(),!0}},A={id:"zen-editor.command.confirm-zen-edit",type:c.CommandType.COMMAND,handler:async e=>{const t=e.get(u.IZenZoneService),i=e.get(N.IEditorBridgeService),n=e.get(c.IUniverInstanceService);i.isVisible().visible&&i.changeVisible({visible:!1,eventType:M.DeviceInputEventType.PointerDown}),t.close();const s=n.getCurrentUniverSheetInstance();return n.focusUniverInstance(s.getUnitId()),i.refreshEditCellState(),!0}};function oe(){return{id:Z.id,group:u.MenuGroup.CONTEXT_MENU_OTHERS,type:u.MenuItemType.BUTTON,title:"rightClick.zenEditor",icon:"AmplifySingle",positions:[u.MenuPosition.CONTEXT_MENU]}}var W={exports:{}},x={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var se=S,ce=Symbol.for("react.element"),ae=Symbol.for("react.fragment"),de=Object.prototype.hasOwnProperty,le=se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ue={key:!0,ref:!0,__self:!0,__source:!0};function q(e,t,i){var n,r={},s=null,o=null;i!==void 0&&(s=""+i),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)de.call(t,n)&&!ue.hasOwnProperty(n)&&(r[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)r[n]===void 0&&(r[n]=t[n]);return{$$typeof:ce,type:e,key:s,ref:o,props:r,_owner:le.current}}x.Fragment=ae;x.jsx=q;x.jsxs=q;W.exports=x;var p=W.exports,h=function(){return h=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},h.apply(this,arguments)},ve=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i},B=S.forwardRef(function(e,t){var i=e.icon,n=e.id,r=e.className,s=e.extend,o=ve(e,["icon","id","className","extend"]),a="univerjs-icon univerjs-icon-".concat(n," ").concat(r||"").trim(),d=S.useRef("_".concat(fe()));return F(i,"".concat(n),{defIds:i.defIds,idSuffix:d.current},h({ref:t,className:a},o),s)});function F(e,t,i,n,r){return S.createElement(e.tag,h(h({key:t},he(e,i,r)),n),(_e(e,i).children||[]).map(function(s,o){return F(s,"".concat(t,"-").concat(e.tag,"-").concat(o),i,void 0,r)}))}function he(e,t,i){var n=h({},e.attrs);i!=null&&i.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=i.colorChannel1);var r=t.defIds;return!r||r.length===0||(e.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+t.idSuffix),Object.entries(n).forEach(function(s){var o=s[0],a=s[1];typeof a=="string"&&(n[o]=a.replace(/url\(#(.*)\)/,"url(#$1".concat(t.idSuffix,")")))})),n}function _e(e,t){var i,n=t.defIds;return!n||n.length===0?e:e.tag==="defs"&&(!((i=e.children)===null||i===void 0)&&i.length)?h(h({},e),{children:e.children.map(function(r){return typeof r.attrs.id=="string"&&n&&n.indexOf(r.attrs.id)>-1?h(h({},r),{attrs:h(h({},r.attrs),{id:r.attrs.id+t.idSuffix})}):r})}):e}function fe(){return Math.random().toString(36).substring(2,8)}B.displayName="UniverIcon";var Se={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14.44 3.57291C14.698 3.83093 14.698 4.24927 14.44 4.50729L6.44342 12.5037C6.28721 12.6599 6.03395 12.6599 5.87774 12.5037L1.55992 8.18578C1.3019 7.92776 1.3019 7.50942 1.55993 7.2514C1.81795 6.99338 2.23629 6.99338 2.49431 7.25141L6.01916 10.7763C6.09727 10.8544 6.2239 10.8544 6.30201 10.7763L13.5056 3.57291C13.7636 3.31489 14.1819 3.31489 14.44 3.57291Z",fillRule:"evenodd",clipRule:"evenodd"}}]},Y=S.forwardRef(function(e,t){return S.createElement(B,Object.assign({},e,{id:"check-mark-single",ref:t,icon:Se}))});Y.displayName="CheckMarkSingle";const ge=Y;var pe={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4.57061 3.65132C4.31677 3.39748 3.90521 3.39748 3.65137 3.65132C3.39753 3.90516 3.39753 4.31672 3.65137 4.57056L7.08079 7.99998L3.65123 11.4295C3.39739 11.6834 3.39739 12.0949 3.65123 12.3488C3.90507 12.6026 4.31662 12.6026 4.57047 12.3488L8.00003 8.91921L11.4295 12.3487C11.6834 12.6026 12.0949 12.6026 12.3488 12.3487C12.6026 12.0949 12.6026 11.6833 12.3488 11.4295L8.91927 7.99998L12.3486 4.57061C12.6025 4.31677 12.6025 3.90521 12.3486 3.65137C12.0948 3.39753 11.6832 3.39753 11.4294 3.65137L8.00003 7.08074L4.57061 3.65132Z"}}]},K=S.forwardRef(function(e,t){return S.createElement(B,Object.assign({},e,{id:"close-single",ref:t,icon:pe}))});K.displayName="CloseSingle";const Ie=K,me="univer-zen-editor",Ee="univer-zen-editor-icon-wrapper",Ce="univer-zen-editor-icon-container",Oe="univer-zen-editor-icon-success",ye="univer-zen-editor-icon-error",Me="univer-zen-editor-canvas-container",I={zenEditor:me,zenEditorIconWrapper:Ee,zenEditorIconContainer:Ce,zenEditorIconSuccess:Oe,zenEditorIconError:ye,zenEditorCanvasContainer:Me},ze="ZEN_EDITOR_PLUGIN_",Re=`${ze}ZEN_EDITOR_COMPONENT`;function be(){const e=S.useRef(null),t=j.useDependency(M.IRenderManagerService),i=j.useDependency(L),n=j.useDependency(c.ICommandService);S.useEffect(()=>{const o=e.current;if(!o)return;const a=t.currentRender$.subscribe(l=>{var m;if(l!==v)return;const _=(m=t.getRenderById(v))==null?void 0:m.engine;_==null||_.setContainer(o)}),d=new ResizeObserver(()=>{const l=o.getBoundingClientRect();i.setPosition(l)});return d.observe(o),()=>{d.unobserve(o),a.unsubscribe()}},[]);function r(){n.executeCommand(w.id)}function s(){n.executeCommand(A.id)}return p.jsxs("div",{className:I.zenEditor,children:[p.jsxs("div",{className:I.zenEditorIconWrapper,children:[p.jsx("span",{className:$(I.zenEditorIconContainer,I.zenEditorIconError),onClick:r,children:p.jsx(Ie,{style:{fontSize:"22px"}})}),p.jsx("span",{className:$(I.zenEditorIconContainer,I.zenEditorIconSuccess),onClick:s,children:p.jsx(ge,{style:{fontSize:"22px"}})})]}),p.jsx("div",{className:I.zenEditorCanvasContainer,ref:e})]})}const Te={id:A.id,description:"shortcut.sheet.zen-edit-confirm",group:"4_sheet-edit",preconditions:e=>H(e),binding:u.KeyCode.ENTER|u.MetaKeys.ALT},Ne={id:w.id,description:"shortcut.sheet.zen-edit-cancel",group:"4_sheet-edit",preconditions:e=>H(e),binding:u.KeyCode.ESC};function H(e){return e.getContextValue(c.FOCUSING_DOC)&&e.getContextValue(c.FOCUSING_UNIVER_EDITOR)&&e.getContextValue(c.EDITOR_ACTIVATED)}var xe=Object.defineProperty,De=Object.getOwnPropertyDescriptor,Ue=(e,t,i,n)=>{for(var r=n>1?void 0:n?De(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(n?o(t,i,r):o(r))||r);return n&&r&&xe(t,i,r),r},y=(e,t)=>(i,n)=>t(i,n,e);let T=class extends c.Disposable{constructor(e,t,i,n,r){super(),this._injector=e,this._zenZoneService=t,this._commandService=i,this._menuService=n,this._shortcutService=r,this._initialize()}_initialize(){this._initCustomComponents(),this._initCommands(),this._initMenus(),this._initShortcuts()}_initCustomComponents(){this.disposeWithMe(this._zenZoneService.set(Re,be))}_initCommands(){[Z,w,A].forEach(e=>{this.disposeWithMe(this._commandService.registerCommand(e))})}_initMenus(){[oe].forEach(e=>{this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(e)))})}_initShortcuts(){[Te,Ne].forEach(e=>{this.disposeWithMe(this._shortcutService.registerShortcut(e))})}};T=Ue([c.OnLifecycle(c.LifecycleStages.
|
|
9
|
+
*/var se=S,ce=Symbol.for("react.element"),ae=Symbol.for("react.fragment"),de=Object.prototype.hasOwnProperty,le=se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ue={key:!0,ref:!0,__self:!0,__source:!0};function q(e,t,i){var n,r={},s=null,o=null;i!==void 0&&(s=""+i),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)de.call(t,n)&&!ue.hasOwnProperty(n)&&(r[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)r[n]===void 0&&(r[n]=t[n]);return{$$typeof:ce,type:e,key:s,ref:o,props:r,_owner:le.current}}x.Fragment=ae;x.jsx=q;x.jsxs=q;W.exports=x;var p=W.exports,h=function(){return h=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},h.apply(this,arguments)},ve=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i},B=S.forwardRef(function(e,t){var i=e.icon,n=e.id,r=e.className,s=e.extend,o=ve(e,["icon","id","className","extend"]),a="univerjs-icon univerjs-icon-".concat(n," ").concat(r||"").trim(),d=S.useRef("_".concat(fe()));return F(i,"".concat(n),{defIds:i.defIds,idSuffix:d.current},h({ref:t,className:a},o),s)});function F(e,t,i,n,r){return S.createElement(e.tag,h(h({key:t},he(e,i,r)),n),(_e(e,i).children||[]).map(function(s,o){return F(s,"".concat(t,"-").concat(e.tag,"-").concat(o),i,void 0,r)}))}function he(e,t,i){var n=h({},e.attrs);i!=null&&i.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=i.colorChannel1);var r=t.defIds;return!r||r.length===0||(e.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+t.idSuffix),Object.entries(n).forEach(function(s){var o=s[0],a=s[1];typeof a=="string"&&(n[o]=a.replace(/url\(#(.*)\)/,"url(#$1".concat(t.idSuffix,")")))})),n}function _e(e,t){var i,n=t.defIds;return!n||n.length===0?e:e.tag==="defs"&&(!((i=e.children)===null||i===void 0)&&i.length)?h(h({},e),{children:e.children.map(function(r){return typeof r.attrs.id=="string"&&n&&n.indexOf(r.attrs.id)>-1?h(h({},r),{attrs:h(h({},r.attrs),{id:r.attrs.id+t.idSuffix})}):r})}):e}function fe(){return Math.random().toString(36).substring(2,8)}B.displayName="UniverIcon";var Se={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14.44 3.57291C14.698 3.83093 14.698 4.24927 14.44 4.50729L6.44342 12.5037C6.28721 12.6599 6.03395 12.6599 5.87774 12.5037L1.55992 8.18578C1.3019 7.92776 1.3019 7.50942 1.55993 7.2514C1.81795 6.99338 2.23629 6.99338 2.49431 7.25141L6.01916 10.7763C6.09727 10.8544 6.2239 10.8544 6.30201 10.7763L13.5056 3.57291C13.7636 3.31489 14.1819 3.31489 14.44 3.57291Z",fillRule:"evenodd",clipRule:"evenodd"}}]},Y=S.forwardRef(function(e,t){return S.createElement(B,Object.assign({},e,{id:"check-mark-single",ref:t,icon:Se}))});Y.displayName="CheckMarkSingle";const ge=Y;var pe={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4.57061 3.65132C4.31677 3.39748 3.90521 3.39748 3.65137 3.65132C3.39753 3.90516 3.39753 4.31672 3.65137 4.57056L7.08079 7.99998L3.65123 11.4295C3.39739 11.6834 3.39739 12.0949 3.65123 12.3488C3.90507 12.6026 4.31662 12.6026 4.57047 12.3488L8.00003 8.91921L11.4295 12.3487C11.6834 12.6026 12.0949 12.6026 12.3488 12.3487C12.6026 12.0949 12.6026 11.6833 12.3488 11.4295L8.91927 7.99998L12.3486 4.57061C12.6025 4.31677 12.6025 3.90521 12.3486 3.65137C12.0948 3.39753 11.6832 3.39753 11.4294 3.65137L8.00003 7.08074L4.57061 3.65132Z"}}]},K=S.forwardRef(function(e,t){return S.createElement(B,Object.assign({},e,{id:"close-single",ref:t,icon:pe}))});K.displayName="CloseSingle";const Ie=K,me="univer-zen-editor",Ee="univer-zen-editor-icon-wrapper",Ce="univer-zen-editor-icon-container",Oe="univer-zen-editor-icon-success",ye="univer-zen-editor-icon-error",Me="univer-zen-editor-canvas-container",I={zenEditor:me,zenEditorIconWrapper:Ee,zenEditorIconContainer:Ce,zenEditorIconSuccess:Oe,zenEditorIconError:ye,zenEditorCanvasContainer:Me},ze="ZEN_EDITOR_PLUGIN_",Re=`${ze}ZEN_EDITOR_COMPONENT`;function be(){const e=S.useRef(null),t=j.useDependency(M.IRenderManagerService),i=j.useDependency(L),n=j.useDependency(c.ICommandService);S.useEffect(()=>{const o=e.current;if(!o)return;const a=t.currentRender$.subscribe(l=>{var m;if(l!==v)return;const _=(m=t.getRenderById(v))==null?void 0:m.engine;_==null||_.setContainer(o)}),d=new ResizeObserver(()=>{const l=o.getBoundingClientRect();i.setPosition(l)});return d.observe(o),()=>{d.unobserve(o),a.unsubscribe()}},[]);function r(){n.executeCommand(w.id)}function s(){n.executeCommand(A.id)}return p.jsxs("div",{className:I.zenEditor,children:[p.jsxs("div",{className:I.zenEditorIconWrapper,children:[p.jsx("span",{className:$(I.zenEditorIconContainer,I.zenEditorIconError),onClick:r,children:p.jsx(Ie,{style:{fontSize:"22px"}})}),p.jsx("span",{className:$(I.zenEditorIconContainer,I.zenEditorIconSuccess),onClick:s,children:p.jsx(ge,{style:{fontSize:"22px"}})})]}),p.jsx("div",{className:I.zenEditorCanvasContainer,ref:e})]})}const Te={id:A.id,description:"shortcut.sheet.zen-edit-confirm",group:"4_sheet-edit",preconditions:e=>H(e),binding:u.KeyCode.ENTER|u.MetaKeys.ALT},Ne={id:w.id,description:"shortcut.sheet.zen-edit-cancel",group:"4_sheet-edit",preconditions:e=>H(e),binding:u.KeyCode.ESC};function H(e){return e.getContextValue(c.FOCUSING_DOC)&&e.getContextValue(c.FOCUSING_UNIVER_EDITOR)&&e.getContextValue(c.EDITOR_ACTIVATED)}var xe=Object.defineProperty,De=Object.getOwnPropertyDescriptor,Ue=(e,t,i,n)=>{for(var r=n>1?void 0:n?De(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(n?o(t,i,r):o(r))||r);return n&&r&&xe(t,i,r),r},y=(e,t)=>(i,n)=>t(i,n,e);let T=class extends c.Disposable{constructor(e,t,i,n,r){super(),this._injector=e,this._zenZoneService=t,this._commandService=i,this._menuService=n,this._shortcutService=r,this._initialize()}_initialize(){this._initCustomComponents(),this._initCommands(),this._initMenus(),this._initShortcuts()}_initCustomComponents(){this.disposeWithMe(this._zenZoneService.set(Re,be))}_initCommands(){[Z,w,A].forEach(e=>{this.disposeWithMe(this._commandService.registerCommand(e))})}_initMenus(){[oe].forEach(e=>{this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(e)))})}_initShortcuts(){[Te,Ne].forEach(e=>{this.disposeWithMe(this._shortcutService.registerShortcut(e))})}};T=Ue([c.OnLifecycle(c.LifecycleStages.Rendered,T),y(0,g.Inject(g.Injector)),y(1,u.IZenZoneService),y(2,c.ICommandService),y(3,u.IMenuService),y(4,u.IShortcutService)],T);const je={shortcut:{sheet:{"zen-edit-cancel":"Cancel Zen Edit","zen-edit-confirm":"Confirm Zen Edit"}}},X={shortcut:{sheet:{"zen-edit-cancel":"取消编辑(禅模式状态)","zen-edit-confirm":"放弃编辑(禅模式状态)"}}};var Pe=Object.defineProperty,Ze=Object.getOwnPropertyDescriptor,Le=(e,t,i,n)=>{for(var r=n>1?void 0:n?Ze(t,i):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(n?o(t,i,r):o(r))||r);return n&&r&&Pe(t,i,r),r},V=(e,t)=>(i,n)=>t(i,n,e),P;exports.UniverSheetsZenEditorPlugin=(P=class extends c.Plugin{constructor(t,i,n){super("zen-editor"),this._injector=i,this._localeService=n,this._initialize(),this._initializeDependencies(this._injector)}_initialize(){this._localeService.load({zhCN:X})}_initializeDependencies(t){[[T],[b],[L,{useClass:te}]].forEach(n=>t.add(n))}onRendered(){}onDestroy(){}},O(P,"type",c.PluginType.Doc),P);exports.UniverSheetsZenEditorPlugin=Le([V(1,g.Inject(g.Injector)),V(2,g.Inject(c.LocaleService))],exports.UniverSheetsZenEditorPlugin);exports.enUS=je;exports.zhCN=X;
|
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ae = Object.defineProperty;
|
|
2
2
|
var de = (e, t, n) => t in e ? ae(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var m = (e, t, n) => (de(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
-
import { CommandType as T, OnLifecycle as X, LifecycleStages as G, RxDisposable as le, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as W, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as F, IUniverInstanceService as D, ICommandService as U, IUndoRedoService as ue, DEFAULT_EMPTY_DOCUMENT_VALUE as he, FOCUSING_DOC as
|
|
4
|
+
import { CommandType as T, OnLifecycle as X, LifecycleStages as G, RxDisposable as le, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as W, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as F, IUniverInstanceService as D, ICommandService as U, IUndoRedoService as ue, DEFAULT_EMPTY_DOCUMENT_VALUE as he, FOCUSING_DOC as _e, FOCUSING_UNIVER_EDITOR as fe, EDITOR_ACTIVATED as ve, Disposable as ge, Plugin as Se, PluginType as pe, LocaleService as me } from "@univerjs/core";
|
|
5
5
|
import { createIdentifier as Ee, Inject as S, Injector as q } from "@wendellhu/redi";
|
|
6
6
|
import { TextSelectionManagerService as Ie, DocSkeletonManagerService as Ce, DocViewModelManagerService as Oe, VIEWPORT_KEY as ze, RichTextEditingMutation as Me, getDocObject as be } from "@univerjs/docs";
|
|
7
7
|
import { DeviceInputEventType as P, IRenderManagerService as J } from "@univerjs/engine-render";
|
|
@@ -42,7 +42,7 @@ var $e = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, Ve = (e, t
|
|
|
42
42
|
for (var r = i > 1 ? void 0 : i ? Ae(t, n) : t, s = e.length - 1, o; s >= 0; s--)
|
|
43
43
|
(o = e[s]) && (r = (i ? o(t, n, r) : o(r)) || r);
|
|
44
44
|
return i && r && $e(t, n, r), r;
|
|
45
|
-
},
|
|
45
|
+
}, _ = (e, t) => (n, i) => t(n, i, e);
|
|
46
46
|
const l = "__defaultDocumentZenEditorSpecialUnitId_20231218__";
|
|
47
47
|
let O = class extends le {
|
|
48
48
|
constructor(e, t, n, i, r, s, o, c, a, d) {
|
|
@@ -162,7 +162,7 @@ let O = class extends le {
|
|
|
162
162
|
const i = n.params, { unitId: r } = i;
|
|
163
163
|
if (r === l) {
|
|
164
164
|
const s = this._currentUniverService.getUniverDocInstance(r), o = s == null ? void 0 : s.getBody(), c = o == null ? void 0 : o.dataStream, a = o == null ? void 0 : o.paragraphs, d = o == null ? void 0 : o.textRuns;
|
|
165
|
-
if (c == null || a == null)
|
|
165
|
+
if (this._editorBridgeService.changeEditorDirty(!0), c == null || a == null)
|
|
166
166
|
return;
|
|
167
167
|
this._syncContentAndRender(F, c, a, d);
|
|
168
168
|
}
|
|
@@ -176,16 +176,16 @@ let O = class extends le {
|
|
|
176
176
|
};
|
|
177
177
|
O = Ve([
|
|
178
178
|
X(G.Steady, O),
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
179
|
+
_(0, D),
|
|
180
|
+
_(1, A),
|
|
181
|
+
_(2, J),
|
|
182
|
+
_(3, U),
|
|
183
|
+
_(4, M),
|
|
184
|
+
_(5, j),
|
|
185
|
+
_(6, ue),
|
|
186
|
+
_(7, S(Ie)),
|
|
187
|
+
_(8, S(Ce)),
|
|
188
|
+
_(9, S(Oe))
|
|
189
189
|
], O);
|
|
190
190
|
const V = {
|
|
191
191
|
id: "zen-editor.command.cancel-zen-edit",
|
|
@@ -248,7 +248,7 @@ b.Fragment = Fe;
|
|
|
248
248
|
b.jsx = te;
|
|
249
249
|
b.jsxs = te;
|
|
250
250
|
ee.exports = b;
|
|
251
|
-
var
|
|
251
|
+
var f = ee.exports, u = function() {
|
|
252
252
|
return u = Object.assign || function(e) {
|
|
253
253
|
for (var t, n = 1, i = arguments.length; n < i; n++) {
|
|
254
254
|
t = arguments[n];
|
|
@@ -370,26 +370,26 @@ function ut() {
|
|
|
370
370
|
function s() {
|
|
371
371
|
i.executeCommand(k.id);
|
|
372
372
|
}
|
|
373
|
-
return /* @__PURE__ */
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */
|
|
373
|
+
return /* @__PURE__ */ f.jsxs("div", { className: v.zenEditor, children: [
|
|
374
|
+
/* @__PURE__ */ f.jsxs("div", { className: v.zenEditorIconWrapper, children: [
|
|
375
|
+
/* @__PURE__ */ f.jsx(
|
|
376
376
|
"span",
|
|
377
377
|
{
|
|
378
378
|
className: Y(v.zenEditorIconContainer, v.zenEditorIconError),
|
|
379
379
|
onClick: r,
|
|
380
|
-
children: /* @__PURE__ */
|
|
380
|
+
children: /* @__PURE__ */ f.jsx(nt, { style: { fontSize: "22px" } })
|
|
381
381
|
}
|
|
382
382
|
),
|
|
383
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ f.jsx(
|
|
384
384
|
"span",
|
|
385
385
|
{
|
|
386
386
|
className: Y(v.zenEditorIconContainer, v.zenEditorIconSuccess),
|
|
387
387
|
onClick: s,
|
|
388
|
-
children: /* @__PURE__ */
|
|
388
|
+
children: /* @__PURE__ */ f.jsx(et, { style: { fontSize: "22px" } })
|
|
389
389
|
}
|
|
390
390
|
)
|
|
391
391
|
] }),
|
|
392
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ f.jsx("div", { className: v.zenEditorCanvasContainer, ref: e })
|
|
393
393
|
] });
|
|
394
394
|
}
|
|
395
395
|
const ht = {
|
|
@@ -398,7 +398,7 @@ const ht = {
|
|
|
398
398
|
group: "4_sheet-edit",
|
|
399
399
|
preconditions: (e) => oe(e),
|
|
400
400
|
binding: w.ENTER | Te.ALT
|
|
401
|
-
},
|
|
401
|
+
}, _t = {
|
|
402
402
|
id: V.id,
|
|
403
403
|
description: "shortcut.sheet.zen-edit-cancel",
|
|
404
404
|
group: "4_sheet-edit",
|
|
@@ -406,12 +406,12 @@ const ht = {
|
|
|
406
406
|
binding: w.ESC
|
|
407
407
|
};
|
|
408
408
|
function oe(e) {
|
|
409
|
-
return e.getContextValue(
|
|
409
|
+
return e.getContextValue(_e) && e.getContextValue(fe) && e.getContextValue(ve);
|
|
410
410
|
}
|
|
411
|
-
var
|
|
411
|
+
var ft = Object.defineProperty, vt = Object.getOwnPropertyDescriptor, gt = (e, t, n, i) => {
|
|
412
412
|
for (var r = i > 1 ? void 0 : i ? vt(t, n) : t, s = e.length - 1, o; s >= 0; s--)
|
|
413
413
|
(o = e[s]) && (r = (i ? o(t, n, r) : o(r)) || r);
|
|
414
|
-
return i && r &&
|
|
414
|
+
return i && r && ft(t, n, r), r;
|
|
415
415
|
}, E = (e, t) => (n, i) => t(n, i, e);
|
|
416
416
|
let z = class extends ge {
|
|
417
417
|
constructor(e, t, n, i, r) {
|
|
@@ -437,13 +437,13 @@ let z = class extends ge {
|
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
439
|
_initShortcuts() {
|
|
440
|
-
[ht,
|
|
440
|
+
[ht, _t].forEach((e) => {
|
|
441
441
|
this.disposeWithMe(this._shortcutService.registerShortcut(e));
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
444
|
};
|
|
445
445
|
z = gt([
|
|
446
|
-
X(G.
|
|
446
|
+
X(G.Rendered, z),
|
|
447
447
|
E(0, S(q)),
|
|
448
448
|
E(1, M),
|
|
449
449
|
E(2, U),
|
|
@@ -13,12 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
'zen-edit-cancel': string;
|
|
20
|
-
'zen-edit-confirm': string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export default _default;
|
|
16
|
+
import type zhCN from './zh-CN';
|
|
17
|
+
declare const locale: typeof zhCN;
|
|
18
|
+
export default locale;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
declare const
|
|
16
|
+
declare const locale: {
|
|
17
17
|
shortcut: {
|
|
18
18
|
sheet: {
|
|
19
19
|
'zen-edit-cancel': string;
|
|
@@ -21,4 +21,4 @@ declare const _default: {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
export default
|
|
24
|
+
export default locale;
|
package/lib/umd/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(a,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("@univerjs/core"),require("@wendellhu/redi"),require("@univerjs/docs"),require("@univerjs/engine-render"),require("@univerjs/sheets-ui"),require("@univerjs/ui"),require("rxjs"),require("react"),require("@wendellhu/redi/react-bindings"),require("clsx")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@wendellhu/redi","@univerjs/docs","@univerjs/engine-render","@univerjs/sheets-ui","@univerjs/ui","rxjs","react","@wendellhu/redi/react-bindings","clsx"],c):(a=typeof globalThis<"u"?globalThis:a||self,c(a.UniverSheetsZenEditor={},a.UniverCore,a["@wendellhu/redi"],a.UniverDocs,a.UniverEngineRender,a.UniverSheetsUi,a.UniverUi,a.rxjs,a.React,a["@wendellhu/redi/react-bindings"],a.clsx))})(this,function(a,c,u,m,O,T,v,
|
|
1
|
+
(function(a,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("@univerjs/core"),require("@wendellhu/redi"),require("@univerjs/docs"),require("@univerjs/engine-render"),require("@univerjs/sheets-ui"),require("@univerjs/ui"),require("rxjs"),require("react"),require("@wendellhu/redi/react-bindings"),require("clsx")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@wendellhu/redi","@univerjs/docs","@univerjs/engine-render","@univerjs/sheets-ui","@univerjs/ui","rxjs","react","@wendellhu/redi/react-bindings","clsx"],c):(a=typeof globalThis<"u"?globalThis:a||self,c(a.UniverSheetsZenEditor={},a.UniverCore,a["@wendellhu/redi"],a.UniverDocs,a.UniverEngineRender,a.UniverSheetsUi,a.UniverUi,a.rxjs,a.React,a["@wendellhu/redi/react-bindings"],a.clsx))})(this,function(a,c,u,m,O,T,v,k,g,b,W){"use strict";var De=Object.defineProperty;var je=(a,c,u)=>c in a?De(a,c,{enumerable:!0,configurable:!0,writable:!0,value:u}):a[c]=u;var M=(a,c,u)=>(je(a,typeof c!="symbol"?c+"":c,u),u);var A;const U={id:"zen-editor.operation.open-zen-editor",type:c.CommandType.OPERATION,handler:e=>!0};class J{constructor(){M(this,"_position",null);M(this,"_position$",new k.BehaviorSubject(null));M(this,"position$",this._position$.asObservable())}dispose(){this._position$.complete(),this._position=null}setPosition(t){this._position=t,this._refresh(t)}getPosition(){return this._position}_refresh(t){this._position$.next(t)}}const P=u.createIdentifier("univer.sheet-zen-editor-manager.service");var Q=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=(e,t,i,n)=>{for(var r=n>1?void 0:n?ee(t,i):t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Q(t,i,r),r},p=(e,t)=>(i,n)=>t(i,n,e);const _="__defaultDocumentZenEditorSpecialUnitId_20231218__";let R=class extends c.RxDisposable{constructor(e,t,i,n,r,o,s,d,l,h){super(),this._currentUniverService=e,this._zenEditorManagerService=t,this._renderManagerService=i,this._commandService=n,this._zenZoneService=r,this._editorBridgeService=o,this._undoRedoService=s,this._textSelectionManagerService=d,this._docSkeletonManagerService=l,this._docViewModelManagerService=h,this._initialize()}_initialize(){this._syncZenEditorSize(),this._commandExecutedListener(),this._createZenEditorInstance()}_createZenEditorInstance(){const e={id:_,body:{dataStream:`${c.DEFAULT_EMPTY_DOCUMENT_VALUE}`,textRuns:[],paragraphs:[{startIndex:0}]},documentStyle:{pageSize:{width:595,height:842},marginTop:50,marginBottom:50,marginRight:40,marginLeft:40,renderConfig:{vertexAngle:0,centerAngle:0}}};this._currentUniverService.createDoc(e)}_syncZenEditorSize(){this._zenEditorManagerService.position$.pipe(k.takeUntil(this.dispose$)).subscribe(e=>{var d;if(e==null)return;const t=T.getEditorObject(_,this._renderManagerService),i=this._currentUniverService.getUniverDocInstance(_);if(t==null||i==null)return;const{width:n,height:r}=e,{engine:o}=t,s=(d=this._docSkeletonManagerService.getSkeletonByUnitId(_))==null?void 0:d.skeleton;requestIdleCallback(()=>{o.resizeBySize(n,r),this._calculatePagePosition(t),s&&this._textSelectionManagerService.refreshSelection()})})}_handleOpenZenEditor(){this._zenZoneService.open(),this._undoRedoService.clearUndoRedo(_),this._currentUniverService.focusUniverInstance(_),this._currentUniverService.setCurrentUniverDocInstance(_),this._editorBridgeService.isVisible().visible===!1&&this._editorBridgeService.changeVisible({visible:!0,eventType:O.DeviceInputEventType.PointerDown});const t=this._editorBridgeService.getLatestEditCellState();if(t==null)return;this._editorSyncHandler(t);const i=[{startOffset:0,endOffset:0}];this._textSelectionManagerService.replaceTextRanges(i)}_editorSyncHandler(e){var o,s;const t=(o=e.documentLayoutObject.documentModel)==null?void 0:o.getBody(),i=t==null?void 0:t.dataStream,n=t==null?void 0:t.paragraphs;let r=[];i==null||n==null||((s=t==null?void 0:t.textRuns)!=null&&s.length&&(r=t==null?void 0:t.textRuns),this._syncContentAndRender(_,i,n,r))}_syncContentAndRender(e,t,i,n=[]){const r=[_,c.DOCS_NORMAL_EDITOR_UNIT_ID_KEY,c.DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY],o=this._docSkeletonManagerService.getSkeletonByUnitId(e),s=this._currentUniverService.getUniverDocInstance(e),d=this._docViewModelManagerService.getViewModel(e);if(s==null||d==null||o==null)return;const l=s.getBody();l.dataStream=t,l.paragraphs=i,e===c.DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY&&(l.textRuns=[]),n.length>0&&(l.textRuns=n),d.reset(s);const{skeleton:h}=o,S=this._getDocObject();S!=null&&(h.calculate(),r.includes(e)&&S.document.makeDirty())}_calculatePagePosition(e){const{document:t,scene:i}=e,n=i==null?void 0:i.getParent(),{width:r,height:o,pageMarginLeft:s,pageMarginTop:d}=t;if(n==null||r===Number.POSITIVE_INFINITY||o===Number.POSITIVE_INFINITY)return;const{width:l,height:h}=n;let S=0,C=0,j=0,B=0,x=Number.POSITIVE_INFINITY;const{scaleX:z,scaleY:Re}=i.getAncestorScale();l>(r+s*2)*z?(S=l/2-r*z/2,S/=z,j=(l-s*2)/z,x=0):(S=s,j=r+s*2,x=(j-l/z)/2),h>o?(C=h/2-o/2,B=(h-d*2)/Re):(C=d,B=o+d*2),i.resize(j,B+200),t.translate(S,C);const V=i.getViewport(m.VIEWPORT_KEY.VIEW_MAIN);if(x!==Number.POSITIVE_INFINITY&&V!=null){const Ne=V.getBarScroll(x,0).x;V.scrollTo({x:Ne})}return this}_commandExecutedListener(){const e=[U.id];this.disposeWithMe(this._commandService.onCommandExecuted(i=>{e.includes(i.id)&&this._handleOpenZenEditor()}));const t=[m.RichTextEditingMutation.id];this.disposeWithMe(this._commandService.onCommandExecuted(i=>{if(t.includes(i.id)){const n=i.params,{unitId:r}=n;if(r===_){const o=this._currentUniverService.getUniverDocInstance(r),s=o==null?void 0:o.getBody(),d=s==null?void 0:s.dataStream,l=s==null?void 0:s.paragraphs,h=s==null?void 0:s.textRuns;if(this._editorBridgeService.changeEditorDirty(!0),d==null||l==null)return;this._syncContentAndRender(c.DOCS_NORMAL_EDITOR_UNIT_ID_KEY,d,l,h)}}}))}_getDocObject(){return m.getDocObject(this._currentUniverService,this._renderManagerService)}};R=te([c.OnLifecycle(c.LifecycleStages.Steady,R),p(0,c.IUniverInstanceService),p(1,P),p(2,O.IRenderManagerService),p(3,c.ICommandService),p(4,v.IZenZoneService),p(5,T.IEditorBridgeService),p(6,c.IUndoRedoService),p(7,u.Inject(m.TextSelectionManagerService)),p(8,u.Inject(m.DocSkeletonManagerService)),p(9,u.Inject(m.DocViewModelManagerService))],R);const Z={id:"zen-editor.command.cancel-zen-edit",type:c.CommandType.COMMAND,handler:async e=>{const t=e.get(v.IZenZoneService),i=e.get(T.IEditorBridgeService),n=e.get(c.IUniverInstanceService);i.isVisible().visible&&i.changeVisible({visible:!1,eventType:O.DeviceInputEventType.Keyboard,keycode:v.KeyCode.ESC}),t.close();const o=n.getCurrentUniverSheetInstance();return n.focusUniverInstance(o.getUnitId()),i.refreshEditCellState(),!0}},w={id:"zen-editor.command.confirm-zen-edit",type:c.CommandType.COMMAND,handler:async e=>{const t=e.get(v.IZenZoneService),i=e.get(T.IEditorBridgeService),n=e.get(c.IUniverInstanceService);i.isVisible().visible&&i.changeVisible({visible:!1,eventType:O.DeviceInputEventType.PointerDown}),t.close();const o=n.getCurrentUniverSheetInstance();return n.focusUniverInstance(o.getUnitId()),i.refreshEditCellState(),!0}};function ne(){return{id:U.id,group:v.MenuGroup.CONTEXT_MENU_OTHERS,type:v.MenuItemType.BUTTON,title:"rightClick.zenEditor",icon:"AmplifySingle",positions:[v.MenuPosition.CONTEXT_MENU]}}var F={exports:{}},N={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ie=g,re=Symbol.for("react.element"),se=Symbol.for("react.fragment"),oe=Object.prototype.hasOwnProperty,ce=ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ae={key:!0,ref:!0,__self:!0,__source:!0};function Y(e,
|
|
9
|
+
*/var ie=g,re=Symbol.for("react.element"),se=Symbol.for("react.fragment"),oe=Object.prototype.hasOwnProperty,ce=ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ae={key:!0,ref:!0,__self:!0,__source:!0};function Y(e,t,i){var n,r={},o=null,s=null;i!==void 0&&(o=""+i),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)oe.call(t,n)&&!ae.hasOwnProperty(n)&&(r[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)r[n]===void 0&&(r[n]=t[n]);return{$$typeof:re,type:e,key:o,ref:s,props:r,_owner:ce.current}}N.Fragment=se,N.jsx=Y,N.jsxs=Y,F.exports=N;var I=F.exports,f=function(){return f=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f.apply(this,arguments)},de=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i},L=g.forwardRef(function(e,t){var i=e.icon,n=e.id,r=e.className,o=e.extend,s=de(e,["icon","id","className","extend"]),d="univerjs-icon univerjs-icon-".concat(n," ").concat(r||"").trim(),l=g.useRef("_".concat(ve()));return K(i,"".concat(n),{defIds:i.defIds,idSuffix:l.current},f({ref:t,className:d},s),o)});function K(e,t,i,n,r){return g.createElement(e.tag,f(f({key:t},le(e,i,r)),n),(ue(e,i).children||[]).map(function(o,s){return K(o,"".concat(t,"-").concat(e.tag,"-").concat(s),i,void 0,r)}))}function le(e,t,i){var n=f({},e.attrs);i!=null&&i.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=i.colorChannel1);var r=t.defIds;return!r||r.length===0||(e.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+t.idSuffix),Object.entries(n).forEach(function(o){var s=o[0],d=o[1];typeof d=="string"&&(n[s]=d.replace(/url\(#(.*)\)/,"url(#$1".concat(t.idSuffix,")")))})),n}function ue(e,t){var i,n=t.defIds;return!n||n.length===0?e:e.tag==="defs"&&(!((i=e.children)===null||i===void 0)&&i.length)?f(f({},e),{children:e.children.map(function(r){return typeof r.attrs.id=="string"&&n&&n.indexOf(r.attrs.id)>-1?f(f({},r),{attrs:f(f({},r.attrs),{id:r.attrs.id+t.idSuffix})}):r})}):e}function ve(){return Math.random().toString(36).substring(2,8)}L.displayName="UniverIcon";var he={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14.44 3.57291C14.698 3.83093 14.698 4.24927 14.44 4.50729L6.44342 12.5037C6.28721 12.6599 6.03395 12.6599 5.87774 12.5037L1.55992 8.18578C1.3019 7.92776 1.3019 7.50942 1.55993 7.2514C1.81795 6.99338 2.23629 6.99338 2.49431 7.25141L6.01916 10.7763C6.09727 10.8544 6.2239 10.8544 6.30201 10.7763L13.5056 3.57291C13.7636 3.31489 14.1819 3.31489 14.44 3.57291Z",fillRule:"evenodd",clipRule:"evenodd"}}]},H=g.forwardRef(function(e,t){return g.createElement(L,Object.assign({},e,{id:"check-mark-single",ref:t,icon:he}))});H.displayName="CheckMarkSingle";const _e=H;var fe={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4.57061 3.65132C4.31677 3.39748 3.90521 3.39748 3.65137 3.65132C3.39753 3.90516 3.39753 4.31672 3.65137 4.57056L7.08079 7.99998L3.65123 11.4295C3.39739 11.6834 3.39739 12.0949 3.65123 12.3488C3.90507 12.6026 4.31662 12.6026 4.57047 12.3488L8.00003 8.91921L11.4295 12.3487C11.6834 12.6026 12.0949 12.6026 12.3488 12.3487C12.6026 12.0949 12.6026 11.6833 12.3488 11.4295L8.91927 7.99998L12.3486 4.57061C12.6025 4.31677 12.6025 3.90521 12.3486 3.65137C12.0948 3.39753 11.6832 3.39753 11.4294 3.65137L8.00003 7.08074L4.57061 3.65132Z"}}]},X=g.forwardRef(function(e,t){return g.createElement(L,Object.assign({},e,{id:"close-single",ref:t,icon:fe}))});X.displayName="CloseSingle";const Se=X,E={zenEditor:"univer-zen-editor",zenEditorIconWrapper:"univer-zen-editor-icon-wrapper",zenEditorIconContainer:"univer-zen-editor-icon-container",zenEditorIconSuccess:"univer-zen-editor-icon-success",zenEditorIconError:"univer-zen-editor-icon-error",zenEditorCanvasContainer:"univer-zen-editor-canvas-container"},ge="ZEN_EDITOR_PLUGIN_ZEN_EDITOR_COMPONENT";function pe(){const e=g.useRef(null),t=b.useDependency(O.IRenderManagerService),i=b.useDependency(P),n=b.useDependency(c.ICommandService);g.useEffect(()=>{const s=e.current;if(!s)return;const d=t.currentRender$.subscribe(h=>{var C;if(h!==_)return;const S=(C=t.getRenderById(_))==null?void 0:C.engine;S==null||S.setContainer(s)}),l=new ResizeObserver(()=>{const h=s.getBoundingClientRect();i.setPosition(h)});return l.observe(s),()=>{l.unobserve(s),d.unsubscribe()}},[]);function r(){n.executeCommand(Z.id)}function o(){n.executeCommand(w.id)}return I.jsxs("div",{className:E.zenEditor,children:[I.jsxs("div",{className:E.zenEditorIconWrapper,children:[I.jsx("span",{className:W(E.zenEditorIconContainer,E.zenEditorIconError),onClick:r,children:I.jsx(Se,{style:{fontSize:"22px"}})}),I.jsx("span",{className:W(E.zenEditorIconContainer,E.zenEditorIconSuccess),onClick:o,children:I.jsx(_e,{style:{fontSize:"22px"}})})]}),I.jsx("div",{className:E.zenEditorCanvasContainer,ref:e})]})}const Ie={id:w.id,description:"shortcut.sheet.zen-edit-confirm",group:"4_sheet-edit",preconditions:e=>$(e),binding:v.KeyCode.ENTER|v.MetaKeys.ALT},Ee={id:Z.id,description:"shortcut.sheet.zen-edit-cancel",group:"4_sheet-edit",preconditions:e=>$(e),binding:v.KeyCode.ESC};function $(e){return e.getContextValue(c.FOCUSING_DOC)&&e.getContextValue(c.FOCUSING_UNIVER_EDITOR)&&e.getContextValue(c.EDITOR_ACTIVATED)}var me=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,Oe=(e,t,i,n)=>{for(var r=n>1?void 0:n?Ce(t,i):t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&me(t,i,r),r},y=(e,t)=>(i,n)=>t(i,n,e);let D=class extends c.Disposable{constructor(e,t,i,n,r){super(),this._injector=e,this._zenZoneService=t,this._commandService=i,this._menuService=n,this._shortcutService=r,this._initialize()}_initialize(){this._initCustomComponents(),this._initCommands(),this._initMenus(),this._initShortcuts()}_initCustomComponents(){this.disposeWithMe(this._zenZoneService.set(ge,pe))}_initCommands(){[U,Z,w].forEach(e=>{this.disposeWithMe(this._commandService.registerCommand(e))})}_initMenus(){[ne].forEach(e=>{this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(e)))})}_initShortcuts(){[Ie,Ee].forEach(e=>{this.disposeWithMe(this._shortcutService.registerShortcut(e))})}};D=Oe([c.OnLifecycle(c.LifecycleStages.Rendered,D),y(0,u.Inject(u.Injector)),y(1,v.IZenZoneService),y(2,c.ICommandService),y(3,v.IMenuService),y(4,v.IShortcutService)],D);const ye={shortcut:{sheet:{"zen-edit-cancel":"Cancel Zen Edit","zen-edit-confirm":"Confirm Zen Edit"}}},G={shortcut:{sheet:{"zen-edit-cancel":"取消编辑(禅模式状态)","zen-edit-confirm":"放弃编辑(禅模式状态)"}}};var ze=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Te=(e,t,i,n)=>{for(var r=n>1?void 0:n?Me(t,i):t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&ze(t,i,r),r},q=(e,t)=>(i,n)=>t(i,n,e);a.UniverSheetsZenEditorPlugin=(A=class extends c.Plugin{constructor(t,i,n){super("zen-editor"),this._injector=i,this._localeService=n,this._initialize(),this._initializeDependencies(this._injector)}_initialize(){this._localeService.load({zhCN:G})}_initializeDependencies(t){[[D],[R],[P,{useClass:J}]].forEach(n=>t.add(n))}onRendered(){}onDestroy(){}},M(A,"type",c.PluginType.Doc),A),a.UniverSheetsZenEditorPlugin=Te([q(1,u.Inject(u.Injector)),q(2,u.Inject(c.LocaleService))],a.UniverSheetsZenEditorPlugin),a.enUS=ye,a.zhCN=G,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/sheets-zen-editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Zen Editor plugin for Univer Sheets.",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -52,15 +52,15 @@
|
|
|
52
52
|
"clsx": ">=2.0.0",
|
|
53
53
|
"react": ">=16.9.0",
|
|
54
54
|
"rxjs": ">=7.0.0",
|
|
55
|
-
"@univerjs/core": "0.1.
|
|
56
|
-
"@univerjs/
|
|
57
|
-
"@univerjs/
|
|
58
|
-
"@univerjs/
|
|
59
|
-
"@univerjs/
|
|
60
|
-
"@univerjs/ui": "0.1.
|
|
55
|
+
"@univerjs/core": "0.1.2",
|
|
56
|
+
"@univerjs/docs": "0.1.2",
|
|
57
|
+
"@univerjs/design": "0.1.2",
|
|
58
|
+
"@univerjs/sheets-ui": "0.1.2",
|
|
59
|
+
"@univerjs/engine-render": "0.1.2",
|
|
60
|
+
"@univerjs/ui": "0.1.2"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@univerjs/icons": "^0.1.
|
|
63
|
+
"@univerjs/icons": "^0.1.30"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@wendellhu/redi": "^0.13.0",
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
"typescript": "^5.3.3",
|
|
72
72
|
"vite": "^5.1.4",
|
|
73
73
|
"vitest": "^1.3.1",
|
|
74
|
-
"@univerjs/core": "0.1.
|
|
75
|
-
"@univerjs/design": "0.1.
|
|
76
|
-
"@univerjs/
|
|
77
|
-
"@univerjs/
|
|
78
|
-
"@univerjs/
|
|
79
|
-
"@univerjs/
|
|
80
|
-
"@univerjs/ui": "0.1.
|
|
74
|
+
"@univerjs/core": "0.1.2",
|
|
75
|
+
"@univerjs/design": "0.1.2",
|
|
76
|
+
"@univerjs/engine-render": "0.1.2",
|
|
77
|
+
"@univerjs/docs": "0.1.2",
|
|
78
|
+
"@univerjs/sheets-ui": "0.1.2",
|
|
79
|
+
"@univerjs/shared": "0.1.2",
|
|
80
|
+
"@univerjs/ui": "0.1.2"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"test": "vitest run",
|