@univerjs/uniscript 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/ca-ES.js +1 -1
  3. package/lib/cjs/locale/en-US.js +1 -1
  4. package/lib/cjs/locale/es-ES.js +1 -1
  5. package/lib/cjs/locale/fa-IR.js +1 -1
  6. package/lib/cjs/locale/fr-FR.js +1 -1
  7. package/lib/cjs/locale/ja-JP.js +1 -1
  8. package/lib/cjs/locale/ko-KR.js +1 -1
  9. package/lib/cjs/locale/ru-RU.js +1 -1
  10. package/lib/cjs/locale/sk-SK.js +1 -1
  11. package/lib/cjs/locale/vi-VN.js +1 -1
  12. package/lib/cjs/locale/zh-CN.js +1 -1
  13. package/lib/cjs/locale/zh-TW.js +1 -1
  14. package/lib/es/index.js +1 -237
  15. package/lib/es/locale/ca-ES.js +1 -20
  16. package/lib/es/locale/en-US.js +1 -20
  17. package/lib/es/locale/es-ES.js +1 -20
  18. package/lib/es/locale/fa-IR.js +1 -20
  19. package/lib/es/locale/fr-FR.js +1 -20
  20. package/lib/es/locale/ja-JP.js +1 -20
  21. package/lib/es/locale/ko-KR.js +1 -20
  22. package/lib/es/locale/ru-RU.js +1 -20
  23. package/lib/es/locale/sk-SK.js +1 -20
  24. package/lib/es/locale/vi-VN.js +1 -20
  25. package/lib/es/locale/zh-CN.js +1 -20
  26. package/lib/es/locale/zh-TW.js +1 -20
  27. package/lib/index.css +19 -1
  28. package/lib/index.js +1 -237
  29. package/lib/locale/ca-ES.js +1 -20
  30. package/lib/locale/en-US.js +1 -20
  31. package/lib/locale/es-ES.js +1 -20
  32. package/lib/locale/fa-IR.js +1 -20
  33. package/lib/locale/fr-FR.js +1 -20
  34. package/lib/locale/ja-JP.js +1 -20
  35. package/lib/locale/ko-KR.js +1 -20
  36. package/lib/locale/ru-RU.js +1 -20
  37. package/lib/locale/sk-SK.js +1 -20
  38. package/lib/locale/vi-VN.js +1 -20
  39. package/lib/locale/zh-CN.js +1 -20
  40. package/lib/locale/zh-TW.js +1 -20
  41. package/lib/types/commands/operations/panel.operation.d.ts +16 -1
  42. package/lib/types/config/config.d.ts +16 -1
  43. package/lib/types/controllers/uniscript.controller.d.ts +15 -0
  44. package/lib/types/locale/ca-ES.d.ts +16 -1
  45. package/lib/types/locale/es-ES.d.ts +16 -1
  46. package/lib/types/locale/fa-IR.d.ts +16 -1
  47. package/lib/types/locale/fr-FR.d.ts +16 -1
  48. package/lib/types/locale/ja-JP.d.ts +16 -1
  49. package/lib/types/locale/ko-KR.d.ts +16 -1
  50. package/lib/types/locale/ru-RU.d.ts +16 -1
  51. package/lib/types/locale/sk-SK.d.ts +16 -1
  52. package/lib/types/locale/vi-VN.d.ts +16 -1
  53. package/lib/types/locale/zh-CN.d.ts +16 -1
  54. package/lib/types/locale/zh-TW.d.ts +16 -1
  55. package/lib/types/menu/menu.d.ts +17 -2
  56. package/lib/types/menu/schema.d.ts +16 -1
  57. package/lib/types/plugin.d.ts +16 -1
  58. package/lib/types/services/script-editor.service.d.ts +18 -2
  59. package/lib/types/services/script-execution.service.d.ts +16 -1
  60. package/lib/types/services/script-panel.service.d.ts +16 -1
  61. package/lib/umd/index.js +1 -1
  62. package/lib/umd/locale/ca-ES.js +1 -1
  63. package/lib/umd/locale/en-US.js +1 -1
  64. package/lib/umd/locale/es-ES.js +1 -1
  65. package/lib/umd/locale/fa-IR.js +1 -1
  66. package/lib/umd/locale/fr-FR.js +1 -1
  67. package/lib/umd/locale/ja-JP.js +1 -1
  68. package/lib/umd/locale/ko-KR.js +1 -1
  69. package/lib/umd/locale/ru-RU.js +1 -1
  70. package/lib/umd/locale/sk-SK.js +1 -1
  71. package/lib/umd/locale/vi-VN.js +1 -1
  72. package/lib/umd/locale/zh-CN.js +1 -1
  73. package/lib/umd/locale/zh-TW.js +1 -1
  74. package/package.json +11 -11
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { IAccessor } from '@univerjs/core';
2
- import { IMenuButtonItem } from '@univerjs/ui';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IAccessor } from '@univerjs/core';
17
+ import type { IMenuButtonItem } from '@univerjs/ui';
3
18
  export declare function UniscriptMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
@@ -1,2 +1,17 @@
1
- import { MenuSchemaType } from '@univerjs/ui';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { MenuSchemaType } from '@univerjs/ui';
2
17
  export declare const menuSchema: MenuSchemaType;
@@ -1,4 +1,19 @@
1
- import { IUniverUniscriptConfig } from './config/config';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IUniverUniscriptConfig } from './config/config';
2
17
  import { IConfigService, Injector, Plugin } from '@univerjs/core';
3
18
  export declare class UniverUniscriptPlugin extends Plugin {
4
19
  private readonly _config;
@@ -1,5 +1,21 @@
1
- import { IDisposable, Disposable, IConfigService } from '@univerjs/core';
2
- import { editor } from 'monaco-editor';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDisposable } from '@univerjs/core';
17
+ import type { editor } from 'monaco-editor';
18
+ import { Disposable, IConfigService } from '@univerjs/core';
3
19
  /**
4
20
  * This service is for loading monaco editor and its resources. It also holds the
5
21
  * monaco editor instance so user can interact with the editor programmatically.
@@ -1,5 +1,20 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  import { Disposable, ILogService, Injector } from '@univerjs/core';
2
- export declare const IUniscriptExecutionService: import('@wendellhu/redi').IdentifierDecorator<IUniscriptExecutionService>;
17
+ export declare const IUniscriptExecutionService: import("@wendellhu/redi").IdentifierDecorator<IUniscriptExecutionService>;
3
18
  export interface IUniscriptExecutionService {
4
19
  execute(code: string): Promise<boolean>;
5
20
  }
@@ -1,7 +1,22 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  import { Disposable } from '@univerjs/core';
2
17
  export declare class ScriptPanelService extends Disposable {
3
18
  private _open$;
4
- open$: import('rxjs').Observable<boolean>;
19
+ open$: import("rxjs").Observable<boolean>;
5
20
  get isOpen(): boolean;
6
21
  dispose(): void;
7
22
  open(): void;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(s,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("@univerjs/core"),require("@univerjs/ui"),require("rxjs"),require("@univerjs/sheets"),require("@univerjs/sheets-ui"),require("react/jsx-runtime"),require("@univerjs/design"),require("monaco-editor"),require("react"),require("@univerjs/core/facade")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/ui","rxjs","@univerjs/sheets","@univerjs/sheets-ui","react/jsx-runtime","@univerjs/design","monaco-editor","react","@univerjs/core/facade"],i):(s=typeof globalThis<"u"?globalThis:s||self,i(s.UniverUniscript={},s.UniverCore,s.UniverUi,s.rxjs,s.UniverSheets,s.UniverSheetsUi,s.React,s.UniverDesign,s.monaco,s.React,s.UniverCoreFacade))})(this,(function(s,i,a,C,v,R,h,j,k,g,q){"use strict";var te=Object.defineProperty;var ne=(s,i,a)=>i in s?te(s,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[i]=a;var p=(s,i,a)=>ne(s,typeof i!="symbol"?i+"":i,a);var S;class O extends i.Disposable{constructor(){super(...arguments);p(this,"_open$",new C.BehaviorSubject(!1));p(this,"open$",this._open$.pipe(C.distinctUntilChanged()))}get isOpen(){return this._open$.getValue()}dispose(){super.dispose(),this._open$.next(!1),this._open$.complete()}open(){this._open$.next(!0)}close(){this._open$.next(!1)}}const D="ScriptPanel",_={type:i.CommandType.OPERATION,id:"univer.operation.toggle-script-panel",handler:t=>{const e=t.get(O),n=t.get(a.ISidebarService);return e.isOpen?(e.close(),n.close()):(e.open(),n.open({header:{title:"script-panel.title"},children:{label:D},width:600})),!0}},w={name:"@univerjs/uniscript",version:"0.17.0"},b="uniscript.config",$={};function W(t){return{id:_.id,title:"toggle-script-panel",tooltip:"script-panel.tooltip.menu-button",icon:"CodeIcon",type:a.MenuItemType.BUTTON,hidden$:a.getMenuHiddenObservable(t,i.UniverInstanceType.UNIVER_SHEET),disabled$:R.getCurrentRangeDisable$(t,{workbookTypes:[v.WorkbookEditablePermission],worksheetTypes:[v.WorksheetEditPermission,v.WorksheetSetCellStylePermission,v.WorksheetSetCellValuePermission],rangeTypes:[v.RangeProtectionPermissionEditPoint]})}}const F={[a.RibbonOthersGroup.OTHERS]:{[_.id]:{order:0,menuItemFactory:W}}};var V=Object.getOwnPropertyDescriptor,B=(t,e,n,r)=>{for(var c=r>1?void 0:r?V(e,n):e,o=t.length-1,u;o>=0;o--)(u=t[o])&&(c=u(c)||c);return c},L=(t,e)=>(n,r)=>e(n,r,t);s.ScriptEditorService=class extends i.Disposable{constructor(n){super();p(this,"_editorInstance",null);this._configService=n}dispose(){super.dispose(),this._editorInstance&&this._editorInstance.dispose()}setEditorInstance(n){return this._editorInstance=n,i.toDisposable(()=>this._editorInstance=null)}getEditorInstance(){return this._editorInstance}requireVscodeEditor(){if(!window.MonacoEnvironment){const n=this._configService.getConfig(b);window.MonacoEnvironment={getWorkerUrl:n==null?void 0:n.getWorkerUrl}}}},s.ScriptEditorService=B([L(0,i.IConfigService)],s.ScriptEditorService);var G=Object.getOwnPropertyDescriptor,A=(t,e,n,r)=>{for(var c=r>1?void 0:r?G(e,n):e,o=t.length-1,u;o>=0;o--)(u=t[o])&&(c=u(c)||c);return c},T=(t,e)=>(n,r)=>e(n,r,t);const E=i.createIdentifier("univer.uniscript.execution-service");let U=class extends i.Disposable{constructor(t,e){super(),this._logService=t,this._injector=e}async execute(t){this._logService.log("[UniscriptExecutionService]","executing Uniscript...");const e=q.FUniver.newAPI(this._injector),n=new Function("univerAPI",`(() => {${t}})()`);try{return n(e),!0}catch(r){return this._logService.error(r),!1}}};U=A([T(0,i.ILogService),T(1,i.Inject(i.Injector))],U);function H(){const t=g.useRef(null),e=g.useRef(null),n=g.useRef(null),r=a.useDependency(i.LocaleService),c=a.useDependency(a.IShortcutService),o=a.useDependency(s.ScriptEditorService),u=a.useDependency(i.ThemeService);g.useEffect(()=>{const M=e.current,f=t.current;let d=null,I=null;if(M&&f){o.requireVscodeEditor();const P=n.current=k.editor.create(M,{value:"",language:"javascript",theme:u.darkMode?"vs-dark":"vs-light"});I=new ResizeObserver(()=>{let N=requestIdleCallback(()=>{if(!N)return;const{height:Z,width:ee}=f.getBoundingClientRect();P.layout({width:ee,height:Z}),N=void 0})}),I.observe(f);let l;d=new i.DisposableCollection,d.add(o.setEditorInstance(P)),d.add(P.onDidFocusEditorWidget(()=>{l=c.forceEscape()})),d.add(P.onDidBlurEditorWidget(()=>{l==null||l.dispose(),l=void 0})),d.add(i.toDisposable(()=>l==null?void 0:l.dispose()))}return()=>{I&&f&&I.unobserve(f),d==null||d.dispose()}},[o,c]);const X=z(n);return h.jsxs("div",{className:"univer-h-full",children:[h.jsx("div",{ref:t,className:"univer-h-[calc(100%-60px)] univer-w-full univer-overflow-hidden",children:h.jsx("div",{ref:e})}),h.jsx("div",{className:"univer-mt-2.5",children:h.jsx(j.Button,{variant:"primary",onClick:X,children:r.t("script-panel.panel.execute")})})]})}function z(t){const e=a.useDependency(E),n=a.useDependency(a.IMessageService),r=a.useDependency(i.LocaleService);return g.useCallback(()=>{var o;const c=(o=t.current)==null?void 0:o.getModel();c&&e.execute(c.getValue()).then(()=>{n.show({content:r.t("uniscript.message.success"),type:j.MessageType.Success})}).catch(()=>{n.show({content:r.t("uniscript.message.failed"),type:j.MessageType.Error})})},[r,n,t,e])}var K=Object.getOwnPropertyDescriptor,Y=(t,e,n,r)=>{for(var c=r>1?void 0:r?K(e,n):e,o=t.length-1,u;o>=0;o--)(u=t[o])&&(c=u(c)||c);return c},y=(t,e)=>(n,r)=>e(n,r,t);let m=class extends i.Disposable{constructor(t,e,n){super(),this._menuManagerService=t,this._menuManagerService.mergeMenu(F),this.disposeWithMe(n.register(D,H)),this.disposeWithMe(e.registerCommand(_))}};m=Y([y(0,a.IMenuManagerService),y(1,i.ICommandService),y(2,i.Inject(a.ComponentManager))],m);var J=Object.getOwnPropertyDescriptor,Q=(t,e,n,r)=>{for(var c=r>1?void 0:r?J(e,n):e,o=t.length-1,u;o>=0;o--)(u=t[o])&&(c=u(c)||c);return c},x=(t,e)=>(n,r)=>e(n,r,t);s.UniverUniscriptPlugin=(S=class extends i.Plugin{constructor(e=$,n,r){super(),this._config=e,this._injector=n,this._configService=r;const{menu:c,...o}=i.merge({},$,this._config);c&&this._configService.setConfig("menu",c,{merge:!0}),this._configService.setConfig(b,o)}onStarting(){const e=this._injector;[[m],[s.ScriptEditorService],[O]].forEach(r=>e.add(r)),this.registerExecution()}onSteady(){this._injector.get(m)}registerExecution(){this._injector.add([E,{useClass:U}])}},p(S,"pluginName","UNIVER_UNISCRIPT_PLUGIN"),p(S,"packageName",w.name),p(S,"version",w.version),S),s.UniverUniscriptPlugin=Q([x(1,i.Inject(i.Injector)),x(2,i.IConfigService)],s.UniverUniscriptPlugin),s.IUniscriptExecutionService=E,s.ToggleScriptPanelOperation=_,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@univerjs/core`),require(`@univerjs/ui`),require(`rxjs`),require(`@univerjs/sheets`),require(`@univerjs/sheets-ui`),require(`@univerjs/design`),require(`monaco-editor`),require(`react`),require(`@univerjs/core/facade`),require(`react/jsx-runtime`)):typeof define==`function`&&define.amd?define([`exports`,`@univerjs/core`,`@univerjs/ui`,`rxjs`,`@univerjs/sheets`,`@univerjs/sheets-ui`,`@univerjs/design`,`monaco-editor`,`react`,`@univerjs/core/facade`,`react/jsx-runtime`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverUniscript={},e.UniverCore,e.UniverUi,e.rxjs,e.UniverSheets,e.UniverSheetsUi,e.UniverDesign,e.monaco,e.React,e.UniverCoreFacade,e.React))})(this,function(e,t,n,r,i,a,o,s,c,l,u){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function d(e){"@babel/helpers - typeof";return d=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},d(e)}function f(e,t){if(d(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(d(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function p(e){var t=f(e,`string`);return d(t)==`symbol`?t:t+``}function m(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=class extends t.Disposable{constructor(...e){super(...e),m(this,`_open$`,new r.BehaviorSubject(!1)),m(this,`open$`,this._open$.pipe((0,r.distinctUntilChanged)()))}get isOpen(){return this._open$.getValue()}dispose(){super.dispose(),this._open$.next(!1),this._open$.complete()}open(){this._open$.next(!0)}close(){this._open$.next(!1)}};let g=`ScriptPanel`,_={type:t.CommandType.OPERATION,id:`univer.operation.toggle-script-panel`,handler:e=>{let t=e.get(h),r=e.get(n.ISidebarService);return t.isOpen?(t.close(),r.close()):(t.open(),r.open({header:{title:`script-panel.title`},children:{label:g},width:600})),!0}};var v=`@univerjs/uniscript`,y=`0.18.0`;let b=`uniscript.config`;Symbol(b);let x={};function S(e){return{id:_.id,title:`toggle-script-panel`,tooltip:`script-panel.tooltip.menu-button`,icon:`CodeIcon`,type:n.MenuItemType.BUTTON,hidden$:(0,n.getMenuHiddenObservable)(e,t.UniverInstanceType.UNIVER_SHEET),disabled$:(0,a.getCurrentRangeDisable$)(e,{workbookTypes:[i.WorkbookEditablePermission],worksheetTypes:[i.WorksheetEditPermission,i.WorksheetSetCellStylePermission,i.WorksheetSetCellValuePermission],rangeTypes:[i.RangeProtectionPermissionEditPoint]})}}let C={[n.RibbonOthersGroup.OTHERS]:{[_.id]:{order:0,menuItemFactory:S}}};function w(e,t){return function(n,r){t(n,r,e)}}function T(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let E=class extends t.Disposable{constructor(e){super(),this._configService=e,m(this,`_editorInstance`,null)}dispose(){super.dispose(),this._editorInstance&&this._editorInstance.dispose()}setEditorInstance(e){return this._editorInstance=e,(0,t.toDisposable)(()=>this._editorInstance=null)}getEditorInstance(){return this._editorInstance}requireVscodeEditor(){if(!window.MonacoEnvironment){let e=this._configService.getConfig(b);window.MonacoEnvironment={getWorkerUrl:e==null?void 0:e.getWorkerUrl}}}};E=T([w(0,t.IConfigService)],E);let D=(0,t.createIdentifier)(`univer.uniscript.execution-service`),O=class extends t.Disposable{constructor(e,t){super(),this._logService=e,this._injector=t}async execute(e){this._logService.log(`[UniscriptExecutionService]`,`executing Uniscript...`);let t=l.FUniver.newAPI(this._injector),n=Function(`univerAPI`,`(() => {${e}})()`);try{return n(t),!0}catch(e){return this._logService.error(e),!1}}};O=T([w(0,t.ILogService),w(1,(0,t.Inject)(t.Injector))],O);function k(){let e=(0,c.useRef)(null),r=(0,c.useRef)(null),i=(0,c.useRef)(null),a=(0,n.useDependency)(t.LocaleService),l=(0,n.useDependency)(n.IShortcutService),d=(0,n.useDependency)(E),f=(0,n.useDependency)(t.ThemeService);(0,c.useEffect)(()=>{let n=r.current,a=e.current,o=null,c=null;if(n&&a){d.requireVscodeEditor();let e=i.current=s.editor.create(n,{value:``,language:`javascript`,theme:f.darkMode?`vs-dark`:`vs-light`});c=new ResizeObserver(()=>{let t=requestIdleCallback(()=>{if(!t)return;let{height:n,width:r}=a.getBoundingClientRect();e.layout({width:r,height:n}),t=void 0})}),c.observe(a);let r;o=new t.DisposableCollection,o.add(d.setEditorInstance(e)),o.add(e.onDidFocusEditorWidget(()=>{r=l.forceEscape()})),o.add(e.onDidBlurEditorWidget(()=>{r==null||r.dispose(),r=void 0})),o.add((0,t.toDisposable)(()=>r==null?void 0:r.dispose()))}return()=>{c&&a&&c.unobserve(a),o==null||o.dispose()}},[d,l]);let p=A(i);return(0,u.jsxs)(`div`,{className:`univer-h-full`,children:[(0,u.jsx)(`div`,{ref:e,className:`univer-h-[calc(100%-60px)] univer-w-full univer-overflow-hidden`,children:(0,u.jsx)(`div`,{ref:r})}),(0,u.jsx)(`div`,{className:`univer-mt-2.5`,children:(0,u.jsx)(o.Button,{variant:`primary`,onClick:p,children:a.t(`script-panel.panel.execute`)})})]})}function A(e){let r=(0,n.useDependency)(D),i=(0,n.useDependency)(n.IMessageService),a=(0,n.useDependency)(t.LocaleService);return(0,c.useCallback)(()=>{var t;let n=(t=e.current)==null?void 0:t.getModel();n&&r.execute(n.getValue()).then(()=>{i.show({content:a.t(`uniscript.message.success`),type:o.MessageType.Success})}).catch(()=>{i.show({content:a.t(`uniscript.message.failed`),type:o.MessageType.Error})})},[a,i,e,r])}let j=class extends t.Disposable{constructor(e,t,n){super(),this._menuManagerService=e,this._menuManagerService.mergeMenu(C),this.disposeWithMe(n.register(g,k)),this.disposeWithMe(t.registerCommand(_))}};j=T([w(0,n.IMenuManagerService),w(1,t.ICommandService),w(2,(0,t.Inject)(n.ComponentManager))],j);let M=class extends t.Plugin{constructor(e=x,n,r){super(),this._config=e,this._injector=n,this._configService=r;let{menu:i,...a}=(0,t.merge)({},x,this._config);i&&this._configService.setConfig(`menu`,i,{merge:!0}),this._configService.setConfig(b,a)}onStarting(){let e=this._injector;[[j],[E],[h]].forEach(t=>e.add(t)),this.registerExecution()}onSteady(){this._injector.get(j)}registerExecution(){this._injector.add([D,{useClass:O}])}};m(M,`pluginName`,`UNIVER_UNISCRIPT_PLUGIN`),m(M,`packageName`,v),m(M,`version`,y),M=T([w(1,(0,t.Inject)(t.Injector)),w(2,t.IConfigService)],M),e.IUniscriptExecutionService=D,Object.defineProperty(e,`ScriptEditorService`,{enumerable:!0,get:function(){return E}}),e.ToggleScriptPanelOperation=_,Object.defineProperty(e,`UniverUniscriptPlugin`,{enumerable:!0,get:function(){return M}})});
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptCaES=t())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"Mostra/Oculta el panell Uniscript"},panel:{execute:"Executa l'script"}},uniscript:{message:{success:"Execució correcta",failed:"Execució fallida"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptCaES=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`Mostra/Oculta el panell Uniscript`},panel:{execute:`Executa l'script`}},uniscript:{message:{success:`Execució correcta`,failed:`Execució fallida`}}}});
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptEnUS=i())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"Toggle Uniscript Panel"},panel:{execute:"Execute Script"}},uniscript:{message:{success:"Execution Success",failed:"Execution Failed"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptEnUS=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`Toggle Uniscript Panel`},panel:{execute:`Execute Script`}},uniscript:{message:{success:`Execution Success`,failed:`Execution Failed`}}}});
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptEsES=i())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"Mostrar/Ocultar panel de Uniscript"},panel:{execute:"Ejecutar script"}},uniscript:{message:{success:"Ejecución exitosa",failed:"Ejecución fallida"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptEsES=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`Mostrar/Ocultar panel de Uniscript`},panel:{execute:`Ejecutar script`}},uniscript:{message:{success:`Ejecución exitosa`,failed:`Ejecución fallida`}}}});
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptFaIR=i())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"نمایش/مخفی کردن پنل Uniscript"},panel:{execute:"اجرای اسکریپت"}},uniscript:{message:{success:"اجرای موفق",failed:"اجرای ناموفق"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptFaIR=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`نمایش/مخفی کردن پنل Uniscript`},panel:{execute:`اجرای اسکریپت`}},uniscript:{message:{success:`اجرای موفق`,failed:`اجرای ناموفق`}}}});
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptFrFR=i())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"Basculer le panneau Uniscript"},panel:{execute:"Exécuter le script"}},uniscript:{message:{success:"Exécution réussie",failed:"Échec de l'exécution"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptFrFR=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`Basculer le panneau Uniscript`},panel:{execute:`Exécuter le script`}},uniscript:{message:{success:`Exécution réussie`,failed:`Échec de l'exécution`}}}});
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptJaJP=i())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"Uniscriptパネルを切り替え"},panel:{execute:"スクリプトを実行"}},uniscript:{message:{success:"実行に成功しました",failed:"実行に失敗しました"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptJaJP=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`Uniscriptパネルを切り替え`},panel:{execute:`スクリプトを実行`}},uniscript:{message:{success:`実行に成功しました`,failed:`実行に失敗しました`}}}});
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptKoKR=i())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"Uniscript 패널 전환"},panel:{execute:"스크립트 실행"}},uniscript:{message:{success:"실행 성공",failed:"실행 실패"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptKoKR=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`Uniscript 패널 전환`},panel:{execute:`스크립트 실행`}},uniscript:{message:{success:`실행 성공`,failed:`실행 실패`}}}});
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptRuRU=t())})(this,(function(){"use strict";return{"script-panel":{title:"Юнискрипт",tooltip:{"menu-button":"Переключить панель Юнискрипт"},panel:{execute:"Выполнить скрипт"}},uniscript:{message:{success:"Выполнение успешно",failed:"Выполнение не удалось"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptRuRU=t())})(this,function(){return{"script-panel":{title:`Юнискрипт`,tooltip:{"menu-button":`Переключить панель Юнискрипт`},panel:{execute:`Выполнить скрипт`}},uniscript:{message:{success:`Выполнение успешно`,failed:`Выполнение не удалось`}}}});
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptSkSK=i())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"Prepnúť panel Uniscript"},panel:{execute:"Spustiť skript"}},uniscript:{message:{success:"Spustenie úspešné",failed:"Spustenie zlyhalo"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptSkSK=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`Prepnúť panel Uniscript`},panel:{execute:`Spustiť skript`}},uniscript:{message:{success:`Spustenie úspešné`,failed:`Spustenie zlyhalo`}}}});
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptViVN=i())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"Mở/Thu gọn bảng điều khiển Uniscript"},panel:{execute:"Thực thi Uniscript"}},uniscript:{message:{success:"Thực thi thành công",failed:"Thực thi thất bại"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptViVN=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`Mở/Thu gọn bảng điều khiển Uniscript`},panel:{execute:`Thực thi Uniscript`}},uniscript:{message:{success:`Thực thi thành công`,failed:`Thực thi thất bại`}}}});
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptZhCN=i())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"打开收起 Uniscript 面板"},panel:{execute:"执行 Uniscript"}},uniscript:{message:{success:"执行成功",failed:"执行失败"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptZhCN=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`打开收起 Uniscript 面板`},panel:{execute:`执行 Uniscript`}},uniscript:{message:{success:`执行成功`,failed:`执行失败`}}}});
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverUniscriptZhTW=i())})(this,(function(){"use strict";return{"script-panel":{title:"Uniscript",tooltip:{"menu-button":"打開收起 Uniscript 面板"},panel:{execute:"執行 Uniscript"}},uniscript:{message:{success:"執行成功",failed:"執行失敗"}}}}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverUniscriptZhTW=t())})(this,function(){return{"script-panel":{title:`Uniscript`,tooltip:{"menu-button":`打開收起 Uniscript 面板`},panel:{execute:`執行 Uniscript`}},uniscript:{message:{success:`執行成功`,failed:`執行失敗`}}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/uniscript",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "private": false,
5
5
  "description": "UI component library for building exceptional Univer.",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -50,17 +50,16 @@
50
50
  "lib"
51
51
  ],
52
52
  "peerDependencies": {
53
- "monaco-editor": ">=0.50.0",
54
53
  "react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
55
54
  "rxjs": ">=7.0.0"
56
55
  },
57
56
  "dependencies": {
58
57
  "monaco-editor": "0.55.1",
59
- "@univerjs/design": "0.17.0",
60
- "@univerjs/sheets-ui": "0.17.0",
61
- "@univerjs/core": "0.17.0",
62
- "@univerjs/ui": "0.17.0",
63
- "@univerjs/sheets": "0.17.0"
58
+ "@univerjs/design": "0.18.0",
59
+ "@univerjs/sheets": "0.18.0",
60
+ "@univerjs/core": "0.18.0",
61
+ "@univerjs/ui": "0.18.0",
62
+ "@univerjs/sheets-ui": "0.18.0"
64
63
  },
65
64
  "devDependencies": {
66
65
  "postcss": "^8.5.8",
@@ -68,16 +67,17 @@
68
67
  "rxjs": "^7.8.2",
69
68
  "tailwindcss": "3.4.18",
70
69
  "typescript": "^5.9.3",
71
- "vite": "^7.3.1",
72
- "vitest": "^4.0.18",
73
- "@univerjs-infra/shared": "0.17.0"
70
+ "vitest": "^4.1.0",
71
+ "@univerjs-infra/shared": "0.18.0"
74
72
  },
75
73
  "scripts": {
76
74
  "test": "vitest run",
77
75
  "test:watch": "vitest",
78
76
  "coverage": "vitest run --coverage",
79
77
  "typecheck": "tsc --noEmit",
80
- "build": "univer-cli build"
78
+ "build:bundle": "univer-cli build",
79
+ "build:types": "tsc -p tsconfig.node.json",
80
+ "build": "pnpm run build:bundle && pnpm run build:types"
81
81
  },
82
82
  "module": "./lib/es/index.js"
83
83
  }