@univerjs/docs-ui 0.5.4 → 0.5.5-experimental.20250122-3362a4a

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 (58) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +23 -30
  3. package/lib/cjs/locale/en-US.js +1 -1
  4. package/lib/cjs/locale/fa-IR.js +1 -1
  5. package/lib/cjs/locale/fr-FR.js +1 -1
  6. package/lib/cjs/locale/ru-RU.js +1 -1
  7. package/lib/cjs/locale/vi-VN.js +1 -1
  8. package/lib/cjs/locale/zh-CN.js +1 -1
  9. package/lib/cjs/locale/zh-TW.js +1 -1
  10. package/lib/es/facade.js +61 -58
  11. package/lib/es/index.js +7679 -7808
  12. package/lib/es/locale/en-US.js +2 -2
  13. package/lib/es/locale/fa-IR.js +2 -2
  14. package/lib/es/locale/fr-FR.js +2 -2
  15. package/lib/es/locale/ru-RU.js +2 -2
  16. package/lib/es/locale/vi-VN.js +2 -2
  17. package/lib/es/locale/zh-CN.js +2 -2
  18. package/lib/es/locale/zh-TW.js +2 -2
  19. package/lib/index.css +1 -1
  20. package/lib/types/basics/custom-decoration-factory.d.ts +1 -0
  21. package/lib/types/basics/paragraph.d.ts +1 -1
  22. package/lib/types/commands/commands/replace-content.command.d.ts +1 -0
  23. package/lib/types/components/list-type-picker/picker.d.ts +3 -4
  24. package/lib/types/controllers/doc-container-ui-controller.d.ts +1 -1
  25. package/lib/types/controllers/render-controllers/doc-editor-bridge.controller.d.ts +0 -3
  26. package/lib/types/facade/f-document.d.ts +3 -0
  27. package/lib/types/index.d.ts +3 -2
  28. package/lib/types/services/editor/editor-manager.service.d.ts +5 -177
  29. package/lib/types/services/editor/editor.d.ts +15 -77
  30. package/lib/types/services/selection/doc-selection-render.service.d.ts +7 -10
  31. package/lib/types/views/count-bar/CountBar.d.ts +16 -2
  32. package/lib/types/views/count-bar/ZoomSlider.d.ts +16 -2
  33. package/lib/types/views/doc-container/DocContainer.d.ts +5 -5
  34. package/lib/types/views/doc-footer/DocFooter.d.ts +16 -2
  35. package/lib/types/views/header-footer/panel/DocHeaderFooterOptions.d.ts +16 -2
  36. package/lib/types/views/header-footer/panel/DocHeaderFooterPanel.d.ts +16 -2
  37. package/lib/types/views/paragraph-setting/Setting.d.ts +1 -2
  38. package/lib/types/views/paragraph-setting/index.d.ts +16 -2
  39. package/lib/types/views/rich-text-editor/hooks/index.d.ts +17 -0
  40. package/lib/types/views/rich-text-editor/hooks/useEditor.d.ts +11 -0
  41. package/lib/types/views/rich-text-editor/hooks/useKeyboardEvent.d.ts +10 -0
  42. package/lib/types/views/rich-text-editor/hooks/useLeftAndRightArrow.d.ts +3 -0
  43. package/lib/types/views/rich-text-editor/hooks/useOnChange.d.ts +3 -0
  44. package/lib/types/views/rich-text-editor/index.d.ts +22 -0
  45. package/lib/types/views/table/create/TableCreate.d.ts +16 -2
  46. package/lib/umd/facade.js +1 -1
  47. package/lib/umd/index.js +23 -30
  48. package/lib/umd/locale/en-US.js +1 -1
  49. package/lib/umd/locale/fa-IR.js +1 -1
  50. package/lib/umd/locale/fr-FR.js +1 -1
  51. package/lib/umd/locale/ru-RU.js +1 -1
  52. package/lib/umd/locale/vi-VN.js +1 -1
  53. package/lib/umd/locale/zh-CN.js +1 -1
  54. package/lib/umd/locale/zh-TW.js +1 -1
  55. package/package.json +10 -11
  56. package/LICENSE +0 -176
  57. package/lib/types/components/editor/TextEditor.d.ts +0 -36
  58. package/lib/types/components/range-selector/RangeSelector.d.ts +0 -24
@@ -1,7 +1,21 @@
1
- import { default as React } from 'react';
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
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
+ */
2
16
  interface ICountBarProps {
3
17
  changeRatio?: (ratio: string) => void;
4
18
  onChange?: (value: string) => void;
5
19
  }
6
- export declare function CountBar(props: ICountBarProps): React.JSX.Element;
20
+ export declare function CountBar(props: ICountBarProps): import("react/jsx-runtime").JSX.Element;
7
21
  export {};
@@ -1,2 +1,16 @@
1
- import { default as React } from 'react';
2
- export declare function ZoomSlider(): React.JSX.Element;
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
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
+ export declare function ZoomSlider(): import("react/jsx-runtime").JSX.Element;
@@ -13,8 +13,8 @@ export declare class DocContainer extends Component<IBaseDocContainerProps> {
13
13
  leftContentTop: number;
14
14
  rightBorderX: number;
15
15
  rightBorderY: number;
16
- splitLeftRef: React.RefObject<HTMLDivElement>;
17
- contentRef: React.RefObject<HTMLDivElement>;
16
+ splitLeftRef: React.RefObject<HTMLDivElement | null>;
17
+ contentRef: React.RefObject<HTMLDivElement | null>;
18
18
  constructor(props: IBaseDocContainerProps);
19
19
  /**
20
20
  * split mouse down
@@ -31,8 +31,8 @@ export declare class DocContainer extends Component<IBaseDocContainerProps> {
31
31
  * @param e
32
32
  */
33
33
  handleSplitBarMouseUp: (e: MouseEvent) => void;
34
- getContentRef(): React.RefObject<HTMLDivElement>;
35
- getSplitLeftRef(): React.RefObject<HTMLDivElement>;
34
+ getContentRef(): React.RefObject<HTMLDivElement | null>;
35
+ getSplitLeftRef(): React.RefObject<HTMLDivElement | null>;
36
36
  /**
37
37
  * Modify Dom Skin
38
38
  */
@@ -42,6 +42,6 @@ export declare class DocContainer extends Component<IBaseDocContainerProps> {
42
42
  *
43
43
  * @returns {void}
44
44
  */
45
- render(): React.JSX.Element;
45
+ render(): import("react/jsx-runtime").JSX.Element;
46
46
  }
47
47
  export {};
@@ -1,2 +1,16 @@
1
- import { default as React } from 'react';
2
- export declare const DocFooter: () => React.JSX.Element;
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
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
+ export declare const DocFooter: () => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,19 @@
1
- import { default as React } from 'react';
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
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
+ */
2
16
  export interface IDocHeaderFooterOptionsProps {
3
17
  unitId: string;
4
18
  }
5
- export declare const DocHeaderFooterOptions: (props: IDocHeaderFooterOptionsProps) => React.JSX.Element;
19
+ export declare const DocHeaderFooterOptions: (props: IDocHeaderFooterOptionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,16 @@
1
- import { default as React } from 'react';
2
- export declare const DocHeaderFooterPanel: () => React.JSX.Element;
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
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
+ export declare const DocHeaderFooterPanel: () => import("react/jsx-runtime").JSX.Element;
@@ -13,5 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import * as React from 'react';
17
- export declare function ParagraphSetting(): React.JSX.Element;
16
+ export declare function ParagraphSetting(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,16 @@
1
- import { default as React } from 'react';
2
- export declare function ParagraphSettingIndex(): React.JSX.Element;
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
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
+ export declare function ParagraphSettingIndex(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
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
+ export { type IKeyboardEventConfig, useKeyboardEvent } from './useKeyboardEvent';
17
+ export { useResize } from './useResize';
@@ -0,0 +1,11 @@
1
+ import { IDocumentData, Nullable } from '@univerjs/core';
2
+ import { RefObject } from 'react';
3
+ import { Editor } from '../../../services/editor/editor';
4
+ export interface IUseEditorProps {
5
+ editorId: string;
6
+ initialValue: Nullable<IDocumentData>;
7
+ container: RefObject<HTMLDivElement>;
8
+ autoFocus?: boolean;
9
+ isSingle?: boolean;
10
+ }
11
+ export declare function useEditor(opts: IUseEditorProps): Editor | undefined;
@@ -0,0 +1,10 @@
1
+ import { KeyCode, MetaKeys } from '@univerjs/ui';
2
+ import { Editor } from '../../../services/editor/editor';
3
+ export interface IKeyboardEventConfig {
4
+ keyCodes: {
5
+ keyCode: KeyCode;
6
+ metaKey?: MetaKeys;
7
+ }[];
8
+ handler: (keyCode: KeyCode, metaKey?: MetaKeys) => void;
9
+ }
10
+ export declare function useKeyboardEvent(isNeed: boolean, config?: IKeyboardEventConfig, editor?: Editor): void;
@@ -0,0 +1,3 @@
1
+ import { Editor } from '../../../services/editor/editor';
2
+ import { KeyCode, MetaKeys } from '@univerjs/ui';
3
+ export declare const useLeftAndRightArrow: (isNeed: boolean, selectingMode: boolean, editor?: Editor, onMoveInEditor?: (keyCode: KeyCode, metaKey?: MetaKeys) => void) => void;
@@ -0,0 +1,3 @@
1
+ import { IDocumentData } from '@univerjs/core';
2
+ import { Editor } from '../../../services/editor/editor';
3
+ export declare function useOnChange(editor: Editor | undefined, onChange: (data: IDocumentData) => void): void;
@@ -0,0 +1,22 @@
1
+ import { Editor } from '../../services/editor/editor';
2
+ import { IKeyboardEventConfig } from './hooks';
3
+ import { IDocumentData } from '@univerjs/core';
4
+ import { default as React } from 'react';
5
+ export interface IRichTextEditorProps {
6
+ className?: string;
7
+ autoFocus?: boolean;
8
+ onFocusChange?: (isFocus: boolean) => void;
9
+ initialValue?: IDocumentData;
10
+ onClickOutside?: () => void;
11
+ keyboardEventConfig?: IKeyboardEventConfig;
12
+ moveCursor?: boolean;
13
+ style?: React.CSSProperties;
14
+ isSingle?: boolean;
15
+ placeholder?: string;
16
+ editorId?: string;
17
+ onHeightChange?: (height: number) => void;
18
+ onChange?: (data: IDocumentData) => void;
19
+ maxHeight?: number;
20
+ defaultHeight?: number;
21
+ }
22
+ export declare const RichTextEditor: React.ForwardRefExoticComponent<IRichTextEditorProps & React.RefAttributes<Editor>>;
@@ -1,4 +1,18 @@
1
- import { default as React } from 'react';
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
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
+ */
2
16
  interface IDocCreateTableConfirmProps {
3
17
  handleRowColChange: (rowCount: number, colCount: number) => void;
4
18
  tableCreateParams: {
@@ -6,5 +20,5 @@ interface IDocCreateTableConfirmProps {
6
20
  colCount: number;
7
21
  };
8
22
  }
9
- export declare const DocCreateTableConfirm: ({ handleRowColChange, tableCreateParams, }: IDocCreateTableConfirmProps) => React.JSX.Element;
23
+ export declare const DocCreateTableConfirm: ({ handleRowColChange, tableCreateParams, }: IDocCreateTableConfirmProps) => import("react/jsx-runtime").JSX.Element;
10
24
  export {};
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("@univerjs/core"),require("@univerjs/docs-ui"),require("@univerjs/engine-render")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/docs-ui","@univerjs/engine-render"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.UniverDocsUiFacade={},t.UniverCore,t.UniverDocsUi,t.UniverEngineRender))})(this,function(t,e,a,m){"use strict";var f=Object.defineProperty;var D=(t,e,a)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var v=(t,e,a)=>D(t,typeof e!="symbol"?e+"":e,a);var h=Object.defineProperty,_=Object.getOwnPropertyDescriptor,I=(u,n,i,r)=>{for(var s=r>1?void 0:r?_(n,i):n,c=u.length-1,o;c>=0;c--)(o=u[c])&&(s=(r?o(n,i,s):o(s))||s);return r&&s&&h(n,i,s),s},d=(u,n)=>(i,r)=>n(i,r,u);t.FDocument=class{constructor(n,i,r,s,c,o){v(this,"id");this._documentDataModel=n,this._injector=i,this._univerInstanceService=r,this._commandService=s,this._resourceManagerService=c,this._renderManagerService=o,this.id=this._documentDataModel.getUnitId()}getId(){return this._documentDataModel.getUnitId()}getName(){return this.getSnapshot().title||""}getSnapshot(){const n=this._resourceManagerService.getResourcesByType(this.id,e.UniverInstanceType.UNIVER_DOC),i=this._documentDataModel.getSnapshot();return i.resources=n,i}undo(){return this._univerInstanceService.focusUnit(this.id),this._commandService.executeCommand(e.UndoCommand.id)}redo(){return this._univerInstanceService.focusUnit(this.id),this._commandService.executeCommand(e.RedoCommand.id)}appendText(n){const i=this.id,{body:r}=this.getSnapshot();if(!r)throw new Error("The document body is empty");const s=r.dataStream.length-2,c={startOffset:s,endOffset:s,collapsed:!0,segmentId:""},{segmentId:o}=c;return this._commandService.executeCommand(a.InsertCommand.id,{unitId:i,body:{dataStream:n},range:c,segmentId:o})}setSelection(n,i){var s;const r=(s=this._renderManagerService.getRenderById(this.getId()))==null?void 0:s.with(a.DocSelectionRenderService);r==null||r.removeAllRanges(),r==null||r.addDocRanges([{startOffset:n,endOffset:i,rangeType:e.DOC_RANGE_TYPE.TEXT}],!0)}},t.FDocument=I([d(1,e.Inject(e.Injector)),d(2,e.IUniverInstanceService),d(3,e.ICommandService),d(4,e.IResourceManagerService),d(5,m.IRenderManagerService)],t.FDocument);class g extends e.FUniver{createUniverDoc(n){const i=this._univerInstanceService.createUnit(e.UniverInstanceType.UNIVER_DOC,n);return this._injector.createInstance(t.FDocument,i)}getActiveDocument(){const n=this._univerInstanceService.getCurrentUnitForType(e.UniverInstanceType.UNIVER_DOC);return n?this._injector.createInstance(t.FDocument,n):null}getUniverDoc(n){const i=this._univerInstanceService.getUniverDocInstance(n);return i?this._injector.createInstance(t.FDocument,i):null}}e.FUniver.extend(g),Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ (function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@univerjs/core"),require("@univerjs/docs-ui"),require("@univerjs/engine-render")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/docs-ui","@univerjs/engine-render"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global.UniverDocsUiFacade={},global.UniverCore,global.UniverDocsUi,global.UniverEngineRender))})(this,function(exports2,core,docsUi,engineRender){"use strict";var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);var _a;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");exports2.FDocument=(_a=class{constructor(_documentDataModel,_injector,_univerInstanceService,_commandService,_resourceManagerService,_renderManagerService){__publicField(this,"id");this._documentDataModel=_documentDataModel,this._injector=_injector,this._univerInstanceService=_univerInstanceService,this._commandService=_commandService,this._resourceManagerService=_resourceManagerService,this._renderManagerService=_renderManagerService,this.id=this._documentDataModel.getUnitId()}getId(){return this._documentDataModel.getUnitId()}getName(){return this.getSnapshot().title||""}getSnapshot(){const resources=this._resourceManagerService.getResourcesByType(this.id,core.UniverInstanceType.UNIVER_DOC),snapshot=this._documentDataModel.getSnapshot();return snapshot.resources=resources,snapshot}undo(){return this._univerInstanceService.focusUnit(this.id),this._commandService.executeCommand(core.UndoCommand.id)}redo(){return this._univerInstanceService.focusUnit(this.id),this._commandService.executeCommand(core.RedoCommand.id)}appendText(text){const unitId=this.id,{body}=this.getSnapshot();if(!body)throw new Error("The document body is empty");const lastPosition=body.dataStream.length-2,activeRange={startOffset:lastPosition,endOffset:lastPosition,collapsed:!0,segmentId:""},{segmentId}=activeRange;return this._commandService.executeCommand(docsUi.InsertCommand.id,{unitId,body:{dataStream:text},range:activeRange,segmentId})}setSelection(startOffset,endOffset){var _a2;const docSelectionRenderService=(_a2=this._renderManagerService.getRenderById(this.getId()))==null?void 0:_a2.with(docsUi.DocSelectionRenderService);docSelectionRenderService==null||docSelectionRenderService.removeAllRanges(),docSelectionRenderService==null||docSelectionRenderService.addDocRanges([{startOffset,endOffset,rangeType:core.DOC_RANGE_TYPE.TEXT}],!0)}},__name(_a,"FDocument"),_a),exports2.FDocument=__decorateClass([__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.IUniverInstanceService),__decorateParam(3,core.ICommandService),__decorateParam(4,core.IResourceManagerService),__decorateParam(5,engineRender.IRenderManagerService)],exports2.FDocument);const _FUniverDocsMixin=class _FUniverDocsMixin extends core.FUniver{createUniverDoc(data){const document=this._univerInstanceService.createUnit(core.UniverInstanceType.UNIVER_DOC,data);return this._injector.createInstance(exports2.FDocument,document)}getActiveDocument(){const document=this._univerInstanceService.getCurrentUnitForType(core.UniverInstanceType.UNIVER_DOC);return document?this._injector.createInstance(exports2.FDocument,document):null}getUniverDoc(id){const document=this._univerInstanceService.getUniverDocInstance(id);return document?this._injector.createInstance(exports2.FDocument,document):null}};__name(_FUniverDocsMixin,"FUniverDocsMixin");let FUniverDocsMixin=_FUniverDocsMixin;core.FUniver.extend(FUniverDocsMixin),Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});