@univerjs/uniscript 0.2.12 → 0.2.14

Sign up to get free protection for your applications and to get access to all the features.
package/lib/cjs/index.js CHANGED
@@ -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 f=require$$0,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;g!==void 0&&(e=""+g),a.key!==void 0&&(e=""+a.key),a.ref!==void 0&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)d[b]===void 0&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}__name(q,"q");reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports;const PLUGIN_CONFIG_KEY="uniscript.config",defaultPluginConfig={};var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$3=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$3(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$3(target,key,result),result},"__decorateClass$3"),__decorateParam$3=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$3"),_a;exports.ScriptEditorService=(_a=class extends core.Disposable{constructor(_configService){super();__publicField(this,"_editorInstance",null);this._configService=_configService}setEditorInstance(editor){return this._editorInstance=editor,core.toDisposable(()=>this._editorInstance=null)}getEditorInstance(){return this._editorInstance}requireVscodeEditor(){if(!window.MonacoEnvironment){const config=this._configService.getConfig(PLUGIN_CONFIG_KEY);window.MonacoEnvironment={getWorkerUrl:config==null?void 0:config.getWorkerUrl}}}},__name(_a,"ScriptEditorService"),_a);exports.ScriptEditorService=__decorateClass$3([__decorateParam$3(0,core.IConfigService)],exports.ScriptEditorService);var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor,__decorateClass$2=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$2(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$2(target,key,result),result},"__decorateClass$2"),__decorateParam$2=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$2");const IUniscriptExecutionService=core.createIdentifier("univer.uniscript.execution-service");var _a2;let UniscriptExecutionService=(_a2=class extends core.Disposable{constructor(_logService,_injector){super(),this._logService=_logService,this._injector=_injector}async execute(code){this._logService.log("[UniscriptExecutionService]","executing Uniscript...");const apiInstance=facade.FUniver.newAPI(this._injector),scriptFunction=new Function("univerAPI",`(() => {${code}})()`);try{return scriptFunction(apiInstance),!0}catch(e){return this._logService.error(e),!1}}},__name(_a2,"UniscriptExecutionService"),_a2);UniscriptExecutionService=__decorateClass$2([__decorateParam$2(0,core.ILogService),__decorateParam$2(1,core.Inject(core.Injector))],UniscriptExecutionService);const scriptEditorPanel="univer-script-editor-panel",scriptEditorContent="univer-script-editor-content",scriptEditorActions="univer-script-editor-actions",styles={scriptEditorPanel,scriptEditorContent,scriptEditorActions};function ScriptEditorPanel(){const editorContentRef=require$$0.useRef(null),editorContainerRef=require$$0.useRef(null),monacoEditorRef=require$$0.useRef(null),localeService=core.useDependency(core.LocaleService),shortcutService=core.useDependency(ui.IShortcutService),editorService=core.useDependency(exports.ScriptEditorService);require$$0.useEffect(()=>{const containerElement=editorContainerRef.current,contentElement=editorContentRef.current;let disposableCollection=null,resizeObserver=null;if(containerElement&&contentElement){editorService.requireVscodeEditor();const monacoEditor$1=monacoEditorRef.current=monacoEditor.editor.create(containerElement,{value:"",language:"javascript"});resizeObserver=new ResizeObserver(()=>{let timer=requestIdleCallback(()=>{if(!timer)return;const{height,width}=contentElement.getBoundingClientRect();monacoEditor$1.layout({width,height}),timer=void 0})}),resizeObserver.observe(contentElement);let terminateEscaping;disposableCollection=new core.DisposableCollection,disposableCollection.add(editorService.setEditorInstance(monacoEditor$1)),disposableCollection.add(monacoEditor$1.onDidFocusEditorWidget(()=>{terminateEscaping=shortcutService.forceEscape()})),disposableCollection.add(monacoEditor$1.onDidBlurEditorWidget(()=>{terminateEscaping==null||terminateEscaping.dispose(),terminateEscaping=void 0})),disposableCollection.add(core.toDisposable(()=>terminateEscaping==null?void 0:terminateEscaping.dispose()))}return()=>{resizeObserver&&contentElement&&resizeObserver.unobserve(contentElement),disposableCollection==null||disposableCollection.dispose()}},[editorService,shortcutService]);const startExecution=useExecution(monacoEditorRef);return jsxRuntimeExports.jsxs("div",{className:styles.scriptEditorPanel,children:[jsxRuntimeExports.jsx("div",{className:styles.scriptEditorContent,ref:editorContentRef,children:jsxRuntimeExports.jsx("div",{className:styles.scriptEditorContainer,ref:editorContainerRef})}),jsxRuntimeExports.jsx("div",{className:styles.scriptEditorActions,children:jsxRuntimeExports.jsx(design.Button,{type:"primary",size:"small",onClick:startExecution,children:localeService.t("script-panel.panel.execute")})})]})}__name(ScriptEditorPanel,"ScriptEditorPanel");function useExecution(monacoEditorRef){const scriptService=core.useDependency(IUniscriptExecutionService),messageService=core.useDependency(ui.IMessageService),localeService=core.useDependency(core.LocaleService);return require$$0.useCallback(()=>{var _a5;const model=(_a5=monacoEditorRef.current)==null?void 0:_a5.getModel();model&&scriptService.execute(model.getValue()).then(()=>{messageService.show({content:localeService.t("uniscript.message.success"),type:design.MessageType.Success})}).catch(()=>{messageService.show({content:localeService.t("uniscript.message.failed"),type:design.MessageType.Error})})},[localeService,messageService,monacoEditorRef,scriptService])}__name(useExecution,"useExecution");function UniscriptMenuItemFactory(accessor){return{id:ToggleScriptPanelOperation.id,title:"toggle-script-panel",tooltip:"script-panel.tooltip.menu-button",icon:"CodeSingle",type:ui.MenuItemType.BUTTON,hidden$:ui.getMenuHiddenObservable(accessor,core.UniverInstanceType.UNIVER_SHEET),disabled$:sheetsUi.getCurrentRangeDisable$(accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetEditPermission,sheets.WorksheetSetCellStylePermission,sheets.WorksheetSetCellValuePermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(UniscriptMenuItemFactory,"UniscriptMenuItemFactory");const menuSchema={[ui.RibbonStartGroup.OTHERS]:{[ToggleScriptPanelOperation.id]:{order:5,menuItemFactory:UniscriptMenuItemFactory}}};var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__decorateClass$1=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$1(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$1(target,key,result),result},"__decorateClass$1"),__decorateParam$1=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$1"),_a3;let UniscriptController=(_a3=class extends core.Disposable{constructor(_menuManagerService,commandService,componentManager){super(),this._menuManagerService=_menuManagerService,this._menuManagerService.mergeMenu(menuSchema),this.disposeWithMe(componentManager.register(ScriptPanelComponentName,ScriptEditorPanel)),this.disposeWithMe(commandService.registerCommand(ToggleScriptPanelOperation))}},__name(_a3,"UniscriptController"),_a3);UniscriptController=__decorateClass$1([core.OnLifecycle(core.LifecycleStages.Steady,UniscriptController),__decorateParam$1(0,ui.IMenuManagerService),__decorateParam$1(1,core.ICommandService),__decorateParam$1(2,core.Inject(ui.ComponentManager))],UniscriptController);var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),__decorateParam=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam");const PLUGIN_NAME="uniscript";var _a4;exports.UniverUniscriptPlugin=(_a4=class extends core.Plugin{constructor(_config=defaultPluginConfig,_injector,_configService){super(),this._config=_config,this._injector=_injector,this._configService=_configService;const{menu,...rest}=this._config;menu&&this._configService.setConfig("menu",menu,{merge:!0}),this._configService.setConfig(PLUGIN_CONFIG_KEY,rest)}onStarting(){const injector=this._injector;[[UniscriptController],[exports.ScriptEditorService],[ScriptPanelService]].forEach(d=>injector.add(d)),this.registerExecution()}registerExecution(){this._injector.add([IUniscriptExecutionService,{useClass:UniscriptExecutionService}])}},__name(_a4,"UniverUniscriptPlugin"),__publicField(_a4,"pluginName",PLUGIN_NAME),_a4);exports.UniverUniscriptPlugin=__decorateClass([__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.IConfigService)],exports.UniverUniscriptPlugin);exports.IUniscriptExecutionService=IUniscriptExecutionService;exports.ToggleScriptPanelOperation=ToggleScriptPanelOperation;
9
+ */var f=require$$0,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;g!==void 0&&(e=""+g),a.key!==void 0&&(e=""+a.key),a.ref!==void 0&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)d[b]===void 0&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}__name(q,"q");reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports;const PLUGIN_CONFIG_KEY="uniscript.config",defaultPluginConfig={};var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$3=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$3(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$3(target,key,result),result},"__decorateClass$3"),__decorateParam$3=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$3"),_a;exports.ScriptEditorService=(_a=class extends core.Disposable{constructor(_configService){super();__publicField(this,"_editorInstance",null);this._configService=_configService}setEditorInstance(editor){return this._editorInstance=editor,core.toDisposable(()=>this._editorInstance=null)}getEditorInstance(){return this._editorInstance}requireVscodeEditor(){if(!window.MonacoEnvironment){const config=this._configService.getConfig(PLUGIN_CONFIG_KEY);window.MonacoEnvironment={getWorkerUrl:config==null?void 0:config.getWorkerUrl}}}},__name(_a,"ScriptEditorService"),_a);exports.ScriptEditorService=__decorateClass$3([__decorateParam$3(0,core.IConfigService)],exports.ScriptEditorService);var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor,__decorateClass$2=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$2(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$2(target,key,result),result},"__decorateClass$2"),__decorateParam$2=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$2");const IUniscriptExecutionService=core.createIdentifier("univer.uniscript.execution-service");var _a2;let UniscriptExecutionService=(_a2=class extends core.Disposable{constructor(_logService,_injector){super(),this._logService=_logService,this._injector=_injector}async execute(code){this._logService.log("[UniscriptExecutionService]","executing Uniscript...");const apiInstance=facade.FUniver.newAPI(this._injector),scriptFunction=new Function("univerAPI",`(() => {${code}})()`);try{return scriptFunction(apiInstance),!0}catch(e){return this._logService.error(e),!1}}},__name(_a2,"UniscriptExecutionService"),_a2);UniscriptExecutionService=__decorateClass$2([__decorateParam$2(0,core.ILogService),__decorateParam$2(1,core.Inject(core.Injector))],UniscriptExecutionService);const scriptEditorPanel="univer-script-editor-panel",scriptEditorContent="univer-script-editor-content",scriptEditorActions="univer-script-editor-actions",styles={scriptEditorPanel,scriptEditorContent,scriptEditorActions};function ScriptEditorPanel(){const editorContentRef=require$$0.useRef(null),editorContainerRef=require$$0.useRef(null),monacoEditorRef=require$$0.useRef(null),localeService=core.useDependency(core.LocaleService),shortcutService=core.useDependency(ui.IShortcutService),editorService=core.useDependency(exports.ScriptEditorService);require$$0.useEffect(()=>{const containerElement=editorContainerRef.current,contentElement=editorContentRef.current;let disposableCollection=null,resizeObserver=null;if(containerElement&&contentElement){editorService.requireVscodeEditor();const monacoEditor$1=monacoEditorRef.current=monacoEditor.editor.create(containerElement,{value:"",language:"javascript"});resizeObserver=new ResizeObserver(()=>{let timer=requestIdleCallback(()=>{if(!timer)return;const{height,width}=contentElement.getBoundingClientRect();monacoEditor$1.layout({width,height}),timer=void 0})}),resizeObserver.observe(contentElement);let terminateEscaping;disposableCollection=new core.DisposableCollection,disposableCollection.add(editorService.setEditorInstance(monacoEditor$1)),disposableCollection.add(monacoEditor$1.onDidFocusEditorWidget(()=>{terminateEscaping=shortcutService.forceEscape()})),disposableCollection.add(monacoEditor$1.onDidBlurEditorWidget(()=>{terminateEscaping==null||terminateEscaping.dispose(),terminateEscaping=void 0})),disposableCollection.add(core.toDisposable(()=>terminateEscaping==null?void 0:terminateEscaping.dispose()))}return()=>{resizeObserver&&contentElement&&resizeObserver.unobserve(contentElement),disposableCollection==null||disposableCollection.dispose()}},[editorService,shortcutService]);const startExecution=useExecution(monacoEditorRef);return jsxRuntimeExports.jsxs("div",{className:styles.scriptEditorPanel,children:[jsxRuntimeExports.jsx("div",{className:styles.scriptEditorContent,ref:editorContentRef,children:jsxRuntimeExports.jsx("div",{className:styles.scriptEditorContainer,ref:editorContainerRef})}),jsxRuntimeExports.jsx("div",{className:styles.scriptEditorActions,children:jsxRuntimeExports.jsx(design.Button,{type:"primary",size:"small",onClick:startExecution,children:localeService.t("script-panel.panel.execute")})})]})}__name(ScriptEditorPanel,"ScriptEditorPanel");function useExecution(monacoEditorRef){const scriptService=core.useDependency(IUniscriptExecutionService),messageService=core.useDependency(ui.IMessageService),localeService=core.useDependency(core.LocaleService);return require$$0.useCallback(()=>{var _a5;const model=(_a5=monacoEditorRef.current)==null?void 0:_a5.getModel();model&&scriptService.execute(model.getValue()).then(()=>{messageService.show({content:localeService.t("uniscript.message.success"),type:design.MessageType.Success})}).catch(()=>{messageService.show({content:localeService.t("uniscript.message.failed"),type:design.MessageType.Error})})},[localeService,messageService,monacoEditorRef,scriptService])}__name(useExecution,"useExecution");function UniscriptMenuItemFactory(accessor){return{id:ToggleScriptPanelOperation.id,title:"toggle-script-panel",tooltip:"script-panel.tooltip.menu-button",icon:"CodeSingle",type:ui.MenuItemType.BUTTON,hidden$:ui.getMenuHiddenObservable(accessor,core.UniverInstanceType.UNIVER_SHEET),disabled$:sheetsUi.getCurrentRangeDisable$(accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetEditPermission,sheets.WorksheetSetCellStylePermission,sheets.WorksheetSetCellValuePermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(UniscriptMenuItemFactory,"UniscriptMenuItemFactory");const menuSchema={[ui.RibbonStartGroup.OTHERS]:{[ToggleScriptPanelOperation.id]:{order:5,menuItemFactory:UniscriptMenuItemFactory}}};var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__decorateClass$1=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$1(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$1(target,key,result),result},"__decorateClass$1"),__decorateParam$1=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$1"),_a3;let UniscriptController=(_a3=class extends core.Disposable{constructor(_menuManagerService,commandService,componentManager){super(),this._menuManagerService=_menuManagerService,this._menuManagerService.mergeMenu(menuSchema),this.disposeWithMe(componentManager.register(ScriptPanelComponentName,ScriptEditorPanel)),this.disposeWithMe(commandService.registerCommand(ToggleScriptPanelOperation))}},__name(_a3,"UniscriptController"),_a3);UniscriptController=__decorateClass$1([core.OnLifecycle(core.LifecycleStages.Steady,UniscriptController),__decorateParam$1(0,ui.IMenuManagerService),__decorateParam$1(1,core.ICommandService),__decorateParam$1(2,core.Inject(ui.ComponentManager))],UniscriptController);var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),__decorateParam=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam");const PLUGIN_NAME="UNIVER_UNISCRIPT_PLUGIN";var _a4;exports.UniverUniscriptPlugin=(_a4=class extends core.Plugin{constructor(_config=defaultPluginConfig,_injector,_configService){super(),this._config=_config,this._injector=_injector,this._configService=_configService;const{menu,...rest}=this._config;menu&&this._configService.setConfig("menu",menu,{merge:!0}),this._configService.setConfig(PLUGIN_CONFIG_KEY,rest)}onStarting(){const injector=this._injector;[[UniscriptController],[exports.ScriptEditorService],[ScriptPanelService]].forEach(d=>injector.add(d)),this.registerExecution()}registerExecution(){this._injector.add([IUniscriptExecutionService,{useClass:UniscriptExecutionService}])}},__name(_a4,"UniverUniscriptPlugin"),__publicField(_a4,"pluginName",PLUGIN_NAME),_a4);exports.UniverUniscriptPlugin=__decorateClass([__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.IConfigService)],exports.UniverUniscriptPlugin);exports.IUniscriptExecutionService=IUniscriptExecutionService;exports.ToggleScriptPanelOperation=ToggleScriptPanelOperation;
package/lib/es/index.js CHANGED
@@ -229,7 +229,7 @@ var __defProp2 = Object.defineProperty, __getOwnPropDesc = Object.getOwnProperty
229
229
  (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
230
230
  return kind && result && __defProp2(target, key, result), result;
231
231
  }, "__decorateClass"), __decorateParam = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam");
232
- const PLUGIN_NAME = "uniscript";
232
+ const PLUGIN_NAME = "UNIVER_UNISCRIPT_PLUGIN";
233
233
  var _a4;
234
234
  let UniverUniscriptPlugin = (_a4 = class extends Plugin {
235
235
  constructor(_config = defaultPluginConfig, _injector, _configService) {
@@ -5,7 +5,7 @@ export declare class UniverUniscriptPlugin extends Plugin {
5
5
  protected _injector: Injector;
6
6
  private readonly _configService;
7
7
  static pluginName: string;
8
- constructor(_config: Partial<IUniverUniscriptConfig>, _injector: Injector, _configService: IConfigService);
8
+ constructor(_config: Partial<IUniverUniscriptConfig> | undefined, _injector: Injector, _configService: IConfigService);
9
9
  onStarting(): void;
10
10
  /**
11
11
  * Allows being overridden, replacing with a new UniscriptExecutionService.
@@ -1,5 +1,5 @@
1
1
  import { Disposable, ILogService, Injector } from '@univerjs/core';
2
- export declare const IUniscriptExecutionService: import('@univerjs/core').IdentifierDecorator<IUniscriptExecutionService>;
2
+ export declare const IUniscriptExecutionService: import('@wendellhu/redi').IdentifierDecorator<IUniscriptExecutionService>;
3
3
  export interface IUniscriptExecutionService {
4
4
  execute(code: string): Promise<boolean>;
5
5
  }
package/lib/umd/index.js CHANGED
@@ -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 f=require$$0,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;g!==void 0&&(e=""+g),a.key!==void 0&&(e=""+a.key),a.ref!==void 0&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)d[b]===void 0&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}__name(q,"q"),reactJsxRuntime_production_min.Fragment=l,reactJsxRuntime_production_min.jsx=q,reactJsxRuntime_production_min.jsxs=q,jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports;const PLUGIN_CONFIG_KEY="uniscript.config",defaultPluginConfig={};var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$3=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$3(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$3(target,key,result),result},"__decorateClass$3"),__decorateParam$3=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$3");exports2.ScriptEditorService=(_a=class extends core.Disposable{constructor(_configService){super();__publicField(this,"_editorInstance",null);this._configService=_configService}setEditorInstance(editor){return this._editorInstance=editor,core.toDisposable(()=>this._editorInstance=null)}getEditorInstance(){return this._editorInstance}requireVscodeEditor(){if(!window.MonacoEnvironment){const config=this._configService.getConfig(PLUGIN_CONFIG_KEY);window.MonacoEnvironment={getWorkerUrl:config==null?void 0:config.getWorkerUrl}}}},__name(_a,"ScriptEditorService"),_a),exports2.ScriptEditorService=__decorateClass$3([__decorateParam$3(0,core.IConfigService)],exports2.ScriptEditorService);var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor,__decorateClass$2=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$2(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$2(target,key,result),result},"__decorateClass$2"),__decorateParam$2=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$2");const IUniscriptExecutionService=core.createIdentifier("univer.uniscript.execution-service");let UniscriptExecutionService=(_b=class extends core.Disposable{constructor(_logService,_injector){super(),this._logService=_logService,this._injector=_injector}async execute(code){this._logService.log("[UniscriptExecutionService]","executing Uniscript...");const apiInstance=facade.FUniver.newAPI(this._injector),scriptFunction=new Function("univerAPI",`(() => {${code}})()`);try{return scriptFunction(apiInstance),!0}catch(e){return this._logService.error(e),!1}}},__name(_b,"UniscriptExecutionService"),_b);UniscriptExecutionService=__decorateClass$2([__decorateParam$2(0,core.ILogService),__decorateParam$2(1,core.Inject(core.Injector))],UniscriptExecutionService);const styles={scriptEditorPanel:"univer-script-editor-panel",scriptEditorContent:"univer-script-editor-content",scriptEditorActions:"univer-script-editor-actions"};function ScriptEditorPanel(){const editorContentRef=require$$0.useRef(null),editorContainerRef=require$$0.useRef(null),monacoEditorRef=require$$0.useRef(null),localeService=core.useDependency(core.LocaleService),shortcutService=core.useDependency(ui.IShortcutService),editorService=core.useDependency(exports2.ScriptEditorService);require$$0.useEffect(()=>{const containerElement=editorContainerRef.current,contentElement=editorContentRef.current;let disposableCollection=null,resizeObserver=null;if(containerElement&&contentElement){editorService.requireVscodeEditor();const monacoEditor$1=monacoEditorRef.current=monacoEditor.editor.create(containerElement,{value:"",language:"javascript"});resizeObserver=new ResizeObserver(()=>{let timer=requestIdleCallback(()=>{if(!timer)return;const{height,width}=contentElement.getBoundingClientRect();monacoEditor$1.layout({width,height}),timer=void 0})}),resizeObserver.observe(contentElement);let terminateEscaping;disposableCollection=new core.DisposableCollection,disposableCollection.add(editorService.setEditorInstance(monacoEditor$1)),disposableCollection.add(monacoEditor$1.onDidFocusEditorWidget(()=>{terminateEscaping=shortcutService.forceEscape()})),disposableCollection.add(monacoEditor$1.onDidBlurEditorWidget(()=>{terminateEscaping==null||terminateEscaping.dispose(),terminateEscaping=void 0})),disposableCollection.add(core.toDisposable(()=>terminateEscaping==null?void 0:terminateEscaping.dispose()))}return()=>{resizeObserver&&contentElement&&resizeObserver.unobserve(contentElement),disposableCollection==null||disposableCollection.dispose()}},[editorService,shortcutService]);const startExecution=useExecution(monacoEditorRef);return jsxRuntimeExports.jsxs("div",{className:styles.scriptEditorPanel,children:[jsxRuntimeExports.jsx("div",{className:styles.scriptEditorContent,ref:editorContentRef,children:jsxRuntimeExports.jsx("div",{className:styles.scriptEditorContainer,ref:editorContainerRef})}),jsxRuntimeExports.jsx("div",{className:styles.scriptEditorActions,children:jsxRuntimeExports.jsx(design.Button,{type:"primary",size:"small",onClick:startExecution,children:localeService.t("script-panel.panel.execute")})})]})}__name(ScriptEditorPanel,"ScriptEditorPanel");function useExecution(monacoEditorRef){const scriptService=core.useDependency(IUniscriptExecutionService),messageService=core.useDependency(ui.IMessageService),localeService=core.useDependency(core.LocaleService);return require$$0.useCallback(()=>{var _a2;const model=(_a2=monacoEditorRef.current)==null?void 0:_a2.getModel();model&&scriptService.execute(model.getValue()).then(()=>{messageService.show({content:localeService.t("uniscript.message.success"),type:design.MessageType.Success})}).catch(()=>{messageService.show({content:localeService.t("uniscript.message.failed"),type:design.MessageType.Error})})},[localeService,messageService,monacoEditorRef,scriptService])}__name(useExecution,"useExecution");function UniscriptMenuItemFactory(accessor){return{id:ToggleScriptPanelOperation.id,title:"toggle-script-panel",tooltip:"script-panel.tooltip.menu-button",icon:"CodeSingle",type:ui.MenuItemType.BUTTON,hidden$:ui.getMenuHiddenObservable(accessor,core.UniverInstanceType.UNIVER_SHEET),disabled$:sheetsUi.getCurrentRangeDisable$(accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetEditPermission,sheets.WorksheetSetCellStylePermission,sheets.WorksheetSetCellValuePermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(UniscriptMenuItemFactory,"UniscriptMenuItemFactory");const menuSchema={[ui.RibbonStartGroup.OTHERS]:{[ToggleScriptPanelOperation.id]:{order:5,menuItemFactory:UniscriptMenuItemFactory}}};var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__decorateClass$1=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$1(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$1(target,key,result),result},"__decorateClass$1"),__decorateParam$1=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$1");let UniscriptController=(_c=class extends core.Disposable{constructor(_menuManagerService,commandService,componentManager){super(),this._menuManagerService=_menuManagerService,this._menuManagerService.mergeMenu(menuSchema),this.disposeWithMe(componentManager.register(ScriptPanelComponentName,ScriptEditorPanel)),this.disposeWithMe(commandService.registerCommand(ToggleScriptPanelOperation))}},__name(_c,"UniscriptController"),_c);UniscriptController=__decorateClass$1([core.OnLifecycle(core.LifecycleStages.Steady,UniscriptController),__decorateParam$1(0,ui.IMenuManagerService),__decorateParam$1(1,core.ICommandService),__decorateParam$1(2,core.Inject(ui.ComponentManager))],UniscriptController);var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),__decorateParam=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam");const PLUGIN_NAME="uniscript";exports2.UniverUniscriptPlugin=(_d=class extends core.Plugin{constructor(_config=defaultPluginConfig,_injector,_configService){super(),this._config=_config,this._injector=_injector,this._configService=_configService;const{menu,...rest}=this._config;menu&&this._configService.setConfig("menu",menu,{merge:!0}),this._configService.setConfig(PLUGIN_CONFIG_KEY,rest)}onStarting(){const injector=this._injector;[[UniscriptController],[exports2.ScriptEditorService],[ScriptPanelService]].forEach(d=>injector.add(d)),this.registerExecution()}registerExecution(){this._injector.add([IUniscriptExecutionService,{useClass:UniscriptExecutionService}])}},__name(_d,"UniverUniscriptPlugin"),__publicField(_d,"pluginName",PLUGIN_NAME),_d),exports2.UniverUniscriptPlugin=__decorateClass([__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.IConfigService)],exports2.UniverUniscriptPlugin),exports2.IUniscriptExecutionService=IUniscriptExecutionService,exports2.ToggleScriptPanelOperation=ToggleScriptPanelOperation,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
9
+ */var f=require$$0,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;g!==void 0&&(e=""+g),a.key!==void 0&&(e=""+a.key),a.ref!==void 0&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)d[b]===void 0&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}__name(q,"q"),reactJsxRuntime_production_min.Fragment=l,reactJsxRuntime_production_min.jsx=q,reactJsxRuntime_production_min.jsxs=q,jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports;const PLUGIN_CONFIG_KEY="uniscript.config",defaultPluginConfig={};var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$3=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$3(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$3(target,key,result),result},"__decorateClass$3"),__decorateParam$3=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$3");exports2.ScriptEditorService=(_a=class extends core.Disposable{constructor(_configService){super();__publicField(this,"_editorInstance",null);this._configService=_configService}setEditorInstance(editor){return this._editorInstance=editor,core.toDisposable(()=>this._editorInstance=null)}getEditorInstance(){return this._editorInstance}requireVscodeEditor(){if(!window.MonacoEnvironment){const config=this._configService.getConfig(PLUGIN_CONFIG_KEY);window.MonacoEnvironment={getWorkerUrl:config==null?void 0:config.getWorkerUrl}}}},__name(_a,"ScriptEditorService"),_a),exports2.ScriptEditorService=__decorateClass$3([__decorateParam$3(0,core.IConfigService)],exports2.ScriptEditorService);var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor,__decorateClass$2=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$2(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$2(target,key,result),result},"__decorateClass$2"),__decorateParam$2=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$2");const IUniscriptExecutionService=core.createIdentifier("univer.uniscript.execution-service");let UniscriptExecutionService=(_b=class extends core.Disposable{constructor(_logService,_injector){super(),this._logService=_logService,this._injector=_injector}async execute(code){this._logService.log("[UniscriptExecutionService]","executing Uniscript...");const apiInstance=facade.FUniver.newAPI(this._injector),scriptFunction=new Function("univerAPI",`(() => {${code}})()`);try{return scriptFunction(apiInstance),!0}catch(e){return this._logService.error(e),!1}}},__name(_b,"UniscriptExecutionService"),_b);UniscriptExecutionService=__decorateClass$2([__decorateParam$2(0,core.ILogService),__decorateParam$2(1,core.Inject(core.Injector))],UniscriptExecutionService);const styles={scriptEditorPanel:"univer-script-editor-panel",scriptEditorContent:"univer-script-editor-content",scriptEditorActions:"univer-script-editor-actions"};function ScriptEditorPanel(){const editorContentRef=require$$0.useRef(null),editorContainerRef=require$$0.useRef(null),monacoEditorRef=require$$0.useRef(null),localeService=core.useDependency(core.LocaleService),shortcutService=core.useDependency(ui.IShortcutService),editorService=core.useDependency(exports2.ScriptEditorService);require$$0.useEffect(()=>{const containerElement=editorContainerRef.current,contentElement=editorContentRef.current;let disposableCollection=null,resizeObserver=null;if(containerElement&&contentElement){editorService.requireVscodeEditor();const monacoEditor$1=monacoEditorRef.current=monacoEditor.editor.create(containerElement,{value:"",language:"javascript"});resizeObserver=new ResizeObserver(()=>{let timer=requestIdleCallback(()=>{if(!timer)return;const{height,width}=contentElement.getBoundingClientRect();monacoEditor$1.layout({width,height}),timer=void 0})}),resizeObserver.observe(contentElement);let terminateEscaping;disposableCollection=new core.DisposableCollection,disposableCollection.add(editorService.setEditorInstance(monacoEditor$1)),disposableCollection.add(monacoEditor$1.onDidFocusEditorWidget(()=>{terminateEscaping=shortcutService.forceEscape()})),disposableCollection.add(monacoEditor$1.onDidBlurEditorWidget(()=>{terminateEscaping==null||terminateEscaping.dispose(),terminateEscaping=void 0})),disposableCollection.add(core.toDisposable(()=>terminateEscaping==null?void 0:terminateEscaping.dispose()))}return()=>{resizeObserver&&contentElement&&resizeObserver.unobserve(contentElement),disposableCollection==null||disposableCollection.dispose()}},[editorService,shortcutService]);const startExecution=useExecution(monacoEditorRef);return jsxRuntimeExports.jsxs("div",{className:styles.scriptEditorPanel,children:[jsxRuntimeExports.jsx("div",{className:styles.scriptEditorContent,ref:editorContentRef,children:jsxRuntimeExports.jsx("div",{className:styles.scriptEditorContainer,ref:editorContainerRef})}),jsxRuntimeExports.jsx("div",{className:styles.scriptEditorActions,children:jsxRuntimeExports.jsx(design.Button,{type:"primary",size:"small",onClick:startExecution,children:localeService.t("script-panel.panel.execute")})})]})}__name(ScriptEditorPanel,"ScriptEditorPanel");function useExecution(monacoEditorRef){const scriptService=core.useDependency(IUniscriptExecutionService),messageService=core.useDependency(ui.IMessageService),localeService=core.useDependency(core.LocaleService);return require$$0.useCallback(()=>{var _a2;const model=(_a2=monacoEditorRef.current)==null?void 0:_a2.getModel();model&&scriptService.execute(model.getValue()).then(()=>{messageService.show({content:localeService.t("uniscript.message.success"),type:design.MessageType.Success})}).catch(()=>{messageService.show({content:localeService.t("uniscript.message.failed"),type:design.MessageType.Error})})},[localeService,messageService,monacoEditorRef,scriptService])}__name(useExecution,"useExecution");function UniscriptMenuItemFactory(accessor){return{id:ToggleScriptPanelOperation.id,title:"toggle-script-panel",tooltip:"script-panel.tooltip.menu-button",icon:"CodeSingle",type:ui.MenuItemType.BUTTON,hidden$:ui.getMenuHiddenObservable(accessor,core.UniverInstanceType.UNIVER_SHEET),disabled$:sheetsUi.getCurrentRangeDisable$(accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetEditPermission,sheets.WorksheetSetCellStylePermission,sheets.WorksheetSetCellValuePermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(UniscriptMenuItemFactory,"UniscriptMenuItemFactory");const menuSchema={[ui.RibbonStartGroup.OTHERS]:{[ToggleScriptPanelOperation.id]:{order:5,menuItemFactory:UniscriptMenuItemFactory}}};var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__decorateClass$1=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$1(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$1(target,key,result),result},"__decorateClass$1"),__decorateParam$1=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$1");let UniscriptController=(_c=class extends core.Disposable{constructor(_menuManagerService,commandService,componentManager){super(),this._menuManagerService=_menuManagerService,this._menuManagerService.mergeMenu(menuSchema),this.disposeWithMe(componentManager.register(ScriptPanelComponentName,ScriptEditorPanel)),this.disposeWithMe(commandService.registerCommand(ToggleScriptPanelOperation))}},__name(_c,"UniscriptController"),_c);UniscriptController=__decorateClass$1([core.OnLifecycle(core.LifecycleStages.Steady,UniscriptController),__decorateParam$1(0,ui.IMenuManagerService),__decorateParam$1(1,core.ICommandService),__decorateParam$1(2,core.Inject(ui.ComponentManager))],UniscriptController);var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),__decorateParam=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam");const PLUGIN_NAME="UNIVER_UNISCRIPT_PLUGIN";exports2.UniverUniscriptPlugin=(_d=class extends core.Plugin{constructor(_config=defaultPluginConfig,_injector,_configService){super(),this._config=_config,this._injector=_injector,this._configService=_configService;const{menu,...rest}=this._config;menu&&this._configService.setConfig("menu",menu,{merge:!0}),this._configService.setConfig(PLUGIN_CONFIG_KEY,rest)}onStarting(){const injector=this._injector;[[UniscriptController],[exports2.ScriptEditorService],[ScriptPanelService]].forEach(d=>injector.add(d)),this.registerExecution()}registerExecution(){this._injector.add([IUniscriptExecutionService,{useClass:UniscriptExecutionService}])}},__name(_d,"UniverUniscriptPlugin"),__publicField(_d,"pluginName",PLUGIN_NAME),_d),exports2.UniverUniscriptPlugin=__decorateClass([__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.IConfigService)],exports2.UniverUniscriptPlugin),exports2.IUniscriptExecutionService=IUniscriptExecutionService,exports2.ToggleScriptPanelOperation=ToggleScriptPanelOperation,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/uniscript",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "private": false,
5
5
  "description": "UI component library for building exceptional Univer.",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -53,31 +53,31 @@
53
53
  "monaco-editor": ">=0.44.0",
54
54
  "react": "^16.9.0 || ^17.0.0 || ^18.0.0",
55
55
  "rxjs": ">=7.0.0",
56
- "@univerjs/core": "0.2.12",
57
- "@univerjs/facade": "0.2.12",
58
- "@univerjs/sheets-ui": "0.2.12",
59
- "@univerjs/ui": "0.2.12",
60
- "@univerjs/sheets": "0.2.12",
61
- "@univerjs/design": "0.2.12"
56
+ "@univerjs/design": "0.2.14",
57
+ "@univerjs/core": "0.2.14",
58
+ "@univerjs/sheets": "0.2.14",
59
+ "@univerjs/sheets-ui": "0.2.14",
60
+ "@univerjs/ui": "0.2.14",
61
+ "@univerjs/facade": "0.2.14"
62
62
  },
63
63
  "dependencies": {
64
- "@univerjs/protocol": "0.1.39-alpha.15"
64
+ "@univerjs/protocol": "0.1.39-alpha.15",
65
+ "monaco-editor": "0.51.0",
66
+ "@univerjs/core": "0.2.14",
67
+ "@univerjs/design": "0.2.14",
68
+ "@univerjs/facade": "0.2.14",
69
+ "@univerjs/sheets": "0.2.14",
70
+ "@univerjs/sheets-ui": "0.2.14",
71
+ "@univerjs/ui": "0.2.14"
65
72
  },
66
73
  "devDependencies": {
67
74
  "@types/react": "^18.3.5",
68
75
  "less": "^4.2.0",
69
- "monaco-editor": "0.51.0",
70
76
  "rxjs": "^7.8.1",
71
- "typescript": "^5.5.4",
72
- "vite": "^5.4.2",
77
+ "typescript": "^5.6.2",
78
+ "vite": "^5.4.4",
73
79
  "vitest": "^2.0.5",
74
- "@univerjs/core": "0.2.12",
75
- "@univerjs/design": "0.2.12",
76
- "@univerjs/facade": "0.2.12",
77
- "@univerjs/sheets": "0.2.12",
78
- "@univerjs/shared": "0.2.12",
79
- "@univerjs/sheets-ui": "0.2.12",
80
- "@univerjs/ui": "0.2.12"
80
+ "@univerjs-infra/shared": "0.2.14"
81
81
  },
82
82
  "univerSpace": {
83
83
  ".": {